diff --git a/lock.json b/lock.json index 9b0b0f76..4adedfce 100644 --- a/lock.json +++ b/lock.json @@ -140,7 +140,9 @@ "version": "v0.3", "revision": "909568be09de550ed094403c2bf8a261b5bb730a", "packages": [ - "proto" + "gogoproto", + "proto", + "sortkeys" ] }, { @@ -255,7 +257,7 @@ { "name": "github.com/opencontainers/runtime-tools", "branch": "master", - "revision": "06e17eef1ab6e13f4f37308a16727510ab81414f", + "revision": "2d92f6557e64d4f9a0e799a75fdf153cec13dffa", "packages": [ "generate" ] @@ -368,8 +370,7 @@ "branch": "master", "revision": "21807b270ec15d19215659a5caa08b17f66d6f44", "packages": [ - "pkg/fields", - "pkg/selection" + "pkg/fields" ] }, { @@ -383,7 +384,7 @@ { "name": "k8s.io/kubernetes", "branch": "master", - "revision": "550f8be73aac92c7c23b1783d3db17f8660019f6", + "revision": "760d8e98e8f6ad27aaf50b1a030cb9e7b6859aab", "packages": [ "pkg/fields", "pkg/kubelet/api/v1alpha1/runtime" diff --git a/vendor/github.com/containers/image/signature/fixtures/dir-img-manifest-digest-error/manifest.json b/vendor/github.com/containers/image/signature/fixtures/dir-img-manifest-digest-error/manifest.json new file mode 120000 index 00000000..3dee14b4 --- /dev/null +++ b/vendor/github.com/containers/image/signature/fixtures/dir-img-manifest-digest-error/manifest.json @@ -0,0 +1 @@ +../v2s1-invalid-signatures.manifest.json \ No newline at end of file diff --git a/vendor/github.com/containers/image/signature/fixtures/dir-img-manifest-digest-error/signature-1 b/vendor/github.com/containers/image/signature/fixtures/dir-img-manifest-digest-error/signature-1 new file mode 120000 index 00000000..f010fd4c --- /dev/null +++ b/vendor/github.com/containers/image/signature/fixtures/dir-img-manifest-digest-error/signature-1 @@ -0,0 +1 @@ +../dir-img-valid/signature-1 \ No newline at end of file diff --git a/vendor/github.com/containers/image/signature/fixtures/dir-img-mixed/manifest.json b/vendor/github.com/containers/image/signature/fixtures/dir-img-mixed/manifest.json new file mode 120000 index 00000000..ff7d2ffa --- /dev/null +++ b/vendor/github.com/containers/image/signature/fixtures/dir-img-mixed/manifest.json @@ -0,0 +1 @@ +../dir-img-valid/manifest.json \ No newline at end of file diff --git a/vendor/github.com/containers/image/signature/fixtures/dir-img-mixed/signature-1 b/vendor/github.com/containers/image/signature/fixtures/dir-img-mixed/signature-1 new file mode 120000 index 00000000..b27cdc45 --- /dev/null +++ b/vendor/github.com/containers/image/signature/fixtures/dir-img-mixed/signature-1 @@ -0,0 +1 @@ +../invalid-blob.signature \ No newline at end of file diff --git a/vendor/github.com/containers/image/signature/fixtures/dir-img-mixed/signature-2 b/vendor/github.com/containers/image/signature/fixtures/dir-img-mixed/signature-2 new file mode 120000 index 00000000..f010fd4c --- /dev/null +++ b/vendor/github.com/containers/image/signature/fixtures/dir-img-mixed/signature-2 @@ -0,0 +1 @@ +../dir-img-valid/signature-1 \ No newline at end of file diff --git a/vendor/github.com/containers/image/signature/fixtures/dir-img-modified-manifest/signature-1 b/vendor/github.com/containers/image/signature/fixtures/dir-img-modified-manifest/signature-1 new file mode 120000 index 00000000..f010fd4c --- /dev/null +++ b/vendor/github.com/containers/image/signature/fixtures/dir-img-modified-manifest/signature-1 @@ -0,0 +1 @@ +../dir-img-valid/signature-1 \ No newline at end of file diff --git a/vendor/github.com/containers/image/signature/fixtures/dir-img-no-manifest/signature-1 b/vendor/github.com/containers/image/signature/fixtures/dir-img-no-manifest/signature-1 new file mode 120000 index 00000000..f010fd4c --- /dev/null +++ b/vendor/github.com/containers/image/signature/fixtures/dir-img-no-manifest/signature-1 @@ -0,0 +1 @@ +../dir-img-valid/signature-1 \ No newline at end of file diff --git a/vendor/github.com/containers/image/signature/fixtures/dir-img-unsigned/manifest.json b/vendor/github.com/containers/image/signature/fixtures/dir-img-unsigned/manifest.json new file mode 120000 index 00000000..ff7d2ffa --- /dev/null +++ b/vendor/github.com/containers/image/signature/fixtures/dir-img-unsigned/manifest.json @@ -0,0 +1 @@ +../dir-img-valid/manifest.json \ No newline at end of file diff --git a/vendor/github.com/containers/image/signature/fixtures/dir-img-valid-2/manifest.json b/vendor/github.com/containers/image/signature/fixtures/dir-img-valid-2/manifest.json new file mode 120000 index 00000000..ff7d2ffa --- /dev/null +++ b/vendor/github.com/containers/image/signature/fixtures/dir-img-valid-2/manifest.json @@ -0,0 +1 @@ +../dir-img-valid/manifest.json \ No newline at end of file diff --git a/vendor/github.com/containers/image/signature/fixtures/dir-img-valid-2/signature-1 b/vendor/github.com/containers/image/signature/fixtures/dir-img-valid-2/signature-1 new file mode 120000 index 00000000..f010fd4c --- /dev/null +++ b/vendor/github.com/containers/image/signature/fixtures/dir-img-valid-2/signature-1 @@ -0,0 +1 @@ +../dir-img-valid/signature-1 \ No newline at end of file diff --git a/vendor/github.com/containers/image/signature/fixtures/dir-img-valid/manifest.json b/vendor/github.com/containers/image/signature/fixtures/dir-img-valid/manifest.json new file mode 120000 index 00000000..c5bd2543 --- /dev/null +++ b/vendor/github.com/containers/image/signature/fixtures/dir-img-valid/manifest.json @@ -0,0 +1 @@ +../image.manifest.json \ No newline at end of file diff --git a/vendor/github.com/containers/storage/hack/make/.build-deb/docker-engine.docker.default b/vendor/github.com/containers/storage/hack/make/.build-deb/docker-engine.docker.default new file mode 120000 index 00000000..4278533d --- /dev/null +++ b/vendor/github.com/containers/storage/hack/make/.build-deb/docker-engine.docker.default @@ -0,0 +1 @@ +../../../contrib/init/sysvinit-debian/docker.default \ No newline at end of file diff --git a/vendor/github.com/containers/storage/hack/make/.build-deb/docker-engine.docker.init b/vendor/github.com/containers/storage/hack/make/.build-deb/docker-engine.docker.init new file mode 120000 index 00000000..8cb89d30 --- /dev/null +++ b/vendor/github.com/containers/storage/hack/make/.build-deb/docker-engine.docker.init @@ -0,0 +1 @@ +../../../contrib/init/sysvinit-debian/docker \ No newline at end of file diff --git a/vendor/github.com/containers/storage/hack/make/.build-deb/docker-engine.docker.upstart b/vendor/github.com/containers/storage/hack/make/.build-deb/docker-engine.docker.upstart new file mode 120000 index 00000000..7e1b64a3 --- /dev/null +++ b/vendor/github.com/containers/storage/hack/make/.build-deb/docker-engine.docker.upstart @@ -0,0 +1 @@ +../../../contrib/init/upstart/docker.conf \ No newline at end of file diff --git a/vendor/github.com/containers/storage/hack/make/.build-deb/docker-engine.udev b/vendor/github.com/containers/storage/hack/make/.build-deb/docker-engine.udev new file mode 120000 index 00000000..914a3619 --- /dev/null +++ b/vendor/github.com/containers/storage/hack/make/.build-deb/docker-engine.udev @@ -0,0 +1 @@ +../../../contrib/udev/80-docker.rules \ No newline at end of file diff --git a/vendor/github.com/docker/docker/hack/make/.build-deb/docker-engine.docker.default b/vendor/github.com/docker/docker/hack/make/.build-deb/docker-engine.docker.default new file mode 120000 index 00000000..4278533d --- /dev/null +++ b/vendor/github.com/docker/docker/hack/make/.build-deb/docker-engine.docker.default @@ -0,0 +1 @@ +../../../contrib/init/sysvinit-debian/docker.default \ No newline at end of file diff --git a/vendor/github.com/docker/docker/hack/make/.build-deb/docker-engine.docker.init b/vendor/github.com/docker/docker/hack/make/.build-deb/docker-engine.docker.init new file mode 120000 index 00000000..8cb89d30 --- /dev/null +++ b/vendor/github.com/docker/docker/hack/make/.build-deb/docker-engine.docker.init @@ -0,0 +1 @@ +../../../contrib/init/sysvinit-debian/docker \ No newline at end of file diff --git a/vendor/github.com/docker/docker/hack/make/.build-deb/docker-engine.docker.upstart b/vendor/github.com/docker/docker/hack/make/.build-deb/docker-engine.docker.upstart new file mode 120000 index 00000000..7e1b64a3 --- /dev/null +++ b/vendor/github.com/docker/docker/hack/make/.build-deb/docker-engine.docker.upstart @@ -0,0 +1 @@ +../../../contrib/init/upstart/docker.conf \ No newline at end of file diff --git a/vendor/github.com/docker/docker/hack/make/.build-deb/docker-engine.udev b/vendor/github.com/docker/docker/hack/make/.build-deb/docker-engine.udev new file mode 120000 index 00000000..914a3619 --- /dev/null +++ b/vendor/github.com/docker/docker/hack/make/.build-deb/docker-engine.udev @@ -0,0 +1 @@ +../../../contrib/udev/80-docker.rules \ No newline at end of file diff --git a/vendor/github.com/docker/docker/project/CONTRIBUTORS.md b/vendor/github.com/docker/docker/project/CONTRIBUTORS.md new file mode 120000 index 00000000..44fcc634 --- /dev/null +++ b/vendor/github.com/docker/docker/project/CONTRIBUTORS.md @@ -0,0 +1 @@ +../CONTRIBUTING.md \ No newline at end of file diff --git a/vendor/github.com/opencontainers/runtime-tools/cmd/oci-runtime-tool/generate.go b/vendor/github.com/opencontainers/runtime-tools/cmd/oci-runtime-tool/generate.go index f1f7d23e..225a16dd 100644 --- a/vendor/github.com/opencontainers/runtime-tools/cmd/oci-runtime-tool/generate.go +++ b/vendor/github.com/opencontainers/runtime-tools/cmd/oci-runtime-tool/generate.go @@ -24,7 +24,6 @@ var generateFlags = []cli.Flag{ cli.StringSliceFlag{Name: "bind", Usage: "bind mount directories src:dest[:options...]"}, cli.StringSliceFlag{Name: "cap-add", Usage: "add Linux capabilities"}, cli.StringSliceFlag{Name: "cap-drop", Usage: "drop Linux capabilities"}, - cli.StringFlag{Name: "cgroup", Usage: "cgroup namespace"}, cli.StringFlag{Name: "cgroups-path", Usage: "specify the path to the cgroups"}, cli.StringFlag{Name: "cwd", Value: "/", Usage: "current working directory for the process"}, cli.BoolFlag{Name: "disable-oom-kill", Usage: "disable OOM Killer"}, @@ -34,7 +33,6 @@ var generateFlags = []cli.Flag{ cli.StringSliceFlag{Name: "gidmappings", Usage: "add GIDMappings e.g HostID:ContainerID:Size"}, cli.StringSliceFlag{Name: "groups", Usage: "supplementary groups for the process"}, cli.StringFlag{Name: "hostname", Usage: "hostname value for the container"}, - cli.StringFlag{Name: "ipc", Usage: "ipc namespace"}, cli.StringSliceFlag{Name: "label", Usage: "add annotations to the configuration e.g. key=value"}, cli.Uint64Flag{Name: "linux-cpu-shares", Usage: "the relative share of CPU time available to the tasks in a cgroup"}, cli.Uint64Flag{Name: "linux-cpu-period", Usage: "the CPU period to be used for hardcapping (in usecs)"}, @@ -47,21 +45,21 @@ var generateFlags = []cli.Flag{ cli.Uint64Flag{Name: "linux-mem-swap", Usage: "total memory limit (memory + swap) (in bytes)"}, cli.Uint64Flag{Name: "linux-mem-swappiness", Usage: "how aggressive the kernel will swap memory pages (Range from 0 to 100)"}, cli.StringFlag{Name: "linux-mems", Usage: "list of memory nodes in the cpuset (default is to use any available memory node)"}, + cli.StringSliceFlag{Name: "linux-namespace-add", Usage: "adds a namespace to the set of namespaces to create or join of the form 'ns[:path]'"}, + cli.StringSliceFlag{Name: "linux-namespace-remove", Usage: "removes a namespace from the set of namespaces to create or join of the form 'ns'"}, + cli.BoolFlag{Name: "linux-namespace-remove-all", Usage: "removes all namespaces from the set of namespaces created or joined"}, cli.IntFlag{Name: "linux-network-classid", Usage: "specifies class identifier tagged by container's network packets"}, cli.StringSliceFlag{Name: "linux-network-priorities", Usage: "specifies priorities of network traffic"}, cli.Int64Flag{Name: "linux-pids-limit", Usage: "maximum number of PIDs"}, cli.Uint64Flag{Name: "linux-realtime-period", Usage: "CPU period to be used for realtime scheduling (in usecs)"}, cli.Uint64Flag{Name: "linux-realtime-runtime", Usage: "the time realtime scheduling may use (in usecs)"}, cli.StringSliceFlag{Name: "masked-paths", Usage: "specifies paths can not be read inside container"}, - cli.StringFlag{Name: "mount", Usage: "mount namespace"}, cli.StringFlag{Name: "mount-cgroups", Value: "no", Usage: "mount cgroups (rw,ro,no)"}, cli.StringFlag{Name: "mount-label", Usage: "selinux mount context label"}, - cli.StringFlag{Name: "network", Usage: "network namespace"}, cli.BoolFlag{Name: "no-new-privileges", Usage: "set no new privileges bit for the container process"}, cli.IntFlag{Name: "oom-score-adj", Usage: "oom_score_adj for the container"}, cli.StringFlag{Name: "os", Value: runtime.GOOS, Usage: "operating system the container is created for"}, cli.StringFlag{Name: "output", Usage: "output file (defaults to stdout)"}, - cli.StringFlag{Name: "pid", Usage: "pid namespace"}, cli.StringSliceFlag{Name: "poststart", Usage: "set command to run in poststart hooks"}, cli.StringSliceFlag{Name: "poststop", Usage: "set command to run in poststop hooks"}, cli.StringSliceFlag{Name: "prestart", Usage: "set command to run in prestart hooks"}, @@ -91,8 +89,6 @@ var generateFlags = []cli.Flag{ cli.BoolFlag{Name: "tty", Usage: "allocate a new tty for the container process"}, cli.IntFlag{Name: "uid", Usage: "uid for the process"}, cli.StringSliceFlag{Name: "uidmappings", Usage: "add UIDMappings e.g HostID:ContainerID:Size"}, - cli.StringFlag{Name: "user", Usage: "user namespace"}, - cli.StringFlag{Name: "uts", Usage: "uts namespace"}, } var generateCommand = cli.Command{ @@ -280,8 +276,6 @@ func setupSpec(g *generate.Generator, context *cli.Context) error { } } - needsNewUser := false - var uidMaps, gidMaps []string if context.IsSet("uidmappings") { @@ -292,12 +286,11 @@ func setupSpec(g *generate.Generator, context *cli.Context) error { gidMaps = context.StringSlice("gidmappings") } + // Add default user namespace. if len(uidMaps) > 0 || len(gidMaps) > 0 { - needsNewUser = true + g.AddOrReplaceLinuxNamespace("user", "") } - setupLinuxNamespaces(context, g, needsNewUser) - if context.IsSet("tmpfs") { tmpfsSlice := context.StringSlice("tmpfs") for _, s := range tmpfsSlice { @@ -457,6 +450,32 @@ func setupSpec(g *generate.Generator, context *cli.Context) error { } } + if context.IsSet("linux-namespace-add") { + namespaces := context.StringSlice("linux-namespace-add") + for _, ns := range namespaces { + name, path, err := parseNamespace(ns) + if err != nil { + return err + } + if err := g.AddOrReplaceLinuxNamespace(name, path); err != nil { + return err + } + } + } + + if context.IsSet("linux-namespace-remove") { + namespaces := context.StringSlice("linux-namespace-remove") + for _, name := range namespaces { + if err := g.RemoveLinuxNamespace(name); err != nil { + return err + } + } + } + + if context.Bool("linux-namespace-remove-all") { + g.ClearLinuxNamespaces() + } + if context.IsSet("rlimits-add") { rlimits := context.StringSlice("rlimits-add") for _, rlimit := range rlimits { @@ -486,20 +505,6 @@ func setupSpec(g *generate.Generator, context *cli.Context) error { return err } -func setupLinuxNamespaces(context *cli.Context, g *generate.Generator, needsNewUser bool) { - for _, nsName := range generate.Namespaces { - if !context.IsSet(nsName) && !(needsNewUser && nsName == "user") { - continue - } - nsPath := context.String(nsName) - if nsPath == "host" { - g.RemoveLinuxNamespace(nsName) - continue - } - g.AddOrReplaceLinuxNamespace(nsName, nsPath) - } -} - func parseIDMapping(idms string) (uint32, uint32, uint32, error) { idm := strings.Split(idms, ":") if len(idm) != 3 { @@ -604,6 +609,22 @@ func parseRlimit(rlimit string) (string, uint64, uint64, error) { return parts[0], uint64(hard), uint64(soft), nil } +func parseNamespace(ns string) (string, string, error) { + parts := strings.SplitN(ns, ":", 2) + if len(parts) == 0 || parts[0] == "" { + return "", "", fmt.Errorf("invalid namespace value: %s", ns) + } + + nsType := parts[0] + nsPath := "" + + if len(parts) == 2 { + nsPath = parts[1] + } + + return nsType, nsPath, nil +} + func addSeccomp(context *cli.Context, g *generate.Generator) error { // Set the DefaultAction of seccomp diff --git a/vendor/github.com/opencontainers/runtime-tools/completions/bash/oci-runtime-tool b/vendor/github.com/opencontainers/runtime-tools/completions/bash/oci-runtime-tool index 879145f2..6327425a 100644 --- a/vendor/github.com/opencontainers/runtime-tools/completions/bash/oci-runtime-tool +++ b/vendor/github.com/opencontainers/runtime-tools/completions/bash/oci-runtime-tool @@ -297,72 +297,80 @@ _oci-runtime-tool_help() { _oci-runtime-tool_generate() { local options_with_args=" - --arch - --apparmor - --args - --bind - --cap-add - --cap-drop - --cgroup - --cgroup-path - --cwd - --disable-oom-kill - --env - --env-file - --gid - --gidmappings - --groups - --hostname - --help - --ipc - --label - --linux-network-classid - --linux-network-priorities - --linux-pids-limit - --masked-paths - --mount - --mount-cgroups - --mount-label - --network - --os - --output - --pid - --poststart - --poststop - --prestart - --readonly-paths - --rootfs-path - --rootfs-propagation - --rlimits-add - --rlimits-remove - --rlimits-remove-all - --seccomp-allow - --seccomp-arch - --seccomp-default - --seccomp-default-force - --seccomp-errno - --seccomp-kill - --seccomp-only - --seccomp-remove - --seccomp-remove-all - --seccomp-trace - --seccomp-trap - --seccomp-syscalls - --selinux-label - --sysctl - --tmplate - --tmpfs - --uid - --uidmappings - --user - --uts + --apparmor + --arch + --args + --bind + --cap-add + --cap-drop + --cgroups-path + --cwd + --env + --env-file + --gid + --gidmappings + --groups + --hostname + --label + --linux-cpu-shares + --linux-cpu-period + --linux-cpu-quota + --linux-cpus + --linux-mem-kernel-limit + --linux-mem-kernel-tcp + --linux-mem-limit + --linux-mem-reservation + --linux-mem-swap + --linux-mem-swappiness + --linux-mems + --linux-namespace-add + --linux-namespace-remove + --linux-network-classid + --linux-network-priorities + --linux-pids-limit + --linux-realtime-period + --linux-realtime-runtime + --masked-paths + --mount-cgroups + --mount-label + --oom-score-adj + --os + --output + --poststart + --poststop + --prestart + --readonly-paths + --rootfs-path + --rootfs-propagation + --rlimits-add + --rlimits-remove + --seccomp-allow + --seccomp-arch + --seccomp-default + --seccomp-default-force + --seccomp-errno + --seccomp-kill + --seccomp-remove + --seccomp-trace + --seccomp-trap + --selinux-label + --sysctl + --template + --tmpfs + --uid + --uidmappings " local boolean_options=" - --no-new-privileges - --privileged - --rootfs-readonly - --tty + --disable-oom-kill + --linux-namespace-remove-all + --no-new-privileges + --privileged + --rlimits-remove-all + --rootfs-readonly + --seccomp-only + --seccomp-remove-all + --tty " local all_options="$options_with_args $boolean_options" diff --git a/vendor/github.com/opencontainers/runtime-tools/man/oci-runtime-tool-generate.1.md b/vendor/github.com/opencontainers/runtime-tools/man/oci-runtime-tool-generate.1.md index 49880768..43f74f8e 100644 --- a/vendor/github.com/opencontainers/runtime-tools/man/oci-runtime-tool-generate.1.md +++ b/vendor/github.com/opencontainers/runtime-tools/man/oci-runtime-tool-generate.1.md @@ -45,12 +45,6 @@ read the configuration from `config.json`. **--cap-drop**=[] Drop Linux capabilities -**--cgroup**=*PATH* - Use a Cgroup namespace where *PATH* is an existing Cgroup namespace file - to join. The special *PATH* empty-string creates a new namespace. - The special *PATH* `host` removes any existing Cgroup namespace from - the configuration. - **--cgroups-path**="" Specifies the path to the cgroups relative to the cgroups mount point. @@ -65,7 +59,7 @@ read the configuration from `config.json`. This option allows you to specify arbitrary environment variables that are available for the process that will be launched inside of the container. - + **--env-file**=[] Set environment variables from a file. This option sets environment variables in the container from the @@ -88,12 +82,6 @@ read the configuration from `config.json`. **--hostname**="" Set the container host name that is available inside the container. -**--ipc**=*PATH* - Use an IPC namespace where *PATH* is an existing IPC namespace file - to join. The special *PATH* empty-string creates a new namespace. - The special *PATH* `host` removes any existing IPC namespace from the - configuration. - **--label**=[] Add annotations to the configuration e.g. key=value. Currently, key containing equals sign is not supported. @@ -131,6 +119,20 @@ read the configuration from `config.json`. **--linux-mems**=MEMS Sets the list of memory nodes in the cpuset (default is to use any available memory node). +**--linux-namespace-add**=NSNAME[:PATH] + Adds or replaces the given linux namespace NSNAME with a namespace entry that + has a path of PATH. Omitting PATH means that a new namespace will be created + by the container. + +**--linux-namespace-remove**=NSNAME + Removes a namespace from the set of namespaces configured in the container, + so that the host's namespace will be used by the container instead of + creating or joining another namespace. + +**--linux-namespace-remove-all** + Removes all namespaces from the set of namespaces configured for a container, + such that the container will effectively run on the host. + **--linux-network-classid**=CLASSID Specifies network class identifier which will be tagged by container's network packets. @@ -153,12 +155,6 @@ read the configuration from `config.json`. Specifies paths can not be read inside container. e.g. --masked-paths=/proc/kcore This option can be specified multiple times. -**--mount**=*PATH* - Use a mount namespace where *PATH* is an existing mount namespace file - to join. The special *PATH* empty-string creates a new namespace. - The special *PATH* `host` removes any existing mount namespace from the - configuration. - **--mount-cgroups**=[rw|ro|no] Mount cgroups. The default is *no*. @@ -174,12 +170,6 @@ read the configuration from `config.json`. "system_u:object_r:usr_t:s0" might be a good label for a readonly container, "system_u:system_r:svirt_sandbox_file_t:s0:c1,c2" for a read/write container. -**--network**=*PATH* - Use a network namespace where *PATH* is an existing network namespace file - to join. The special *PATH* empty-string creates a new namespace. - The special *PATH* `host` removes any existing network namespace from the - configuration. - **--no-new-privileges**=true|false Set no new privileges bit for the container process. Setting this flag will block the container processes from gaining any additional privileges @@ -197,12 +187,6 @@ read the configuration from `config.json`. file at *PATH* (overwriting the existing content if a file already exists at *PATH*). -**--pid**=*PATH* - Use a PID namespace where *PATH* is an existing PID namespace file - to join. The special *PATH* empty-string creates a new namespace. - The special *PATH* `host` removes any existing PID namespace from - the configuration. - **--poststart**=CMD[:ARGS...] Set command to run in poststart hooks. Can be specified multiple times. The multiple commands will be run in order before the container process @@ -330,18 +314,6 @@ read the configuration from `config.json`. **--uidmappings** Add UIDMappings e.g HostUID:ContainerID:Size. Implies **--user=**. -**--user**=*PATH* - Use a user namespace where *PATH* is an existing user namespace file - to join. The special *PATH* empty-string creates a new namespace. - The special *PATH* `host` removes any existing user namespace from - the configuration. - -**--uts**=*PATH* - Use a UTS namespace where *PATH* is an existing UTS namespace file - to join. The special *PATH* empty-string creates a new namespace. - The special *PATH* `host` removes any existing UTS namespace from - the configuration. - # EXAMPLES ## Generating container in read-only mode diff --git a/vendor/k8s.io/kubernetes/.bazelrc b/vendor/k8s.io/kubernetes/.bazelrc new file mode 100644 index 00000000..0ceb744e --- /dev/null +++ b/vendor/k8s.io/kubernetes/.bazelrc @@ -0,0 +1,6 @@ +# Show us information about failures. +build --verbose_failures +test --test_output=errors + +# Retry tests up to 3 times if they fail. +test --flaky_test_attempts=3 diff --git a/vendor/k8s.io/kubernetes/.generated_docs b/vendor/k8s.io/kubernetes/.generated_docs index 1d24a4e8..1ce648ed 100644 --- a/vendor/k8s.io/kubernetes/.generated_docs +++ b/vendor/k8s.io/kubernetes/.generated_docs @@ -58,6 +58,7 @@ docs/man/man1/kubectl-create.1 docs/man/man1/kubectl-delete.1 docs/man/man1/kubectl-describe.1 docs/man/man1/kubectl-drain.1 +docs/man/man1/kubectl-edit-configmap.1 docs/man/man1/kubectl-edit.1 docs/man/man1/kubectl-exec.1 docs/man/man1/kubectl-explain.1 @@ -142,6 +143,7 @@ docs/user-guide/kubectl/kubectl_delete.md docs/user-guide/kubectl/kubectl_describe.md docs/user-guide/kubectl/kubectl_drain.md docs/user-guide/kubectl/kubectl_edit.md +docs/user-guide/kubectl/kubectl_edit_configmap.md docs/user-guide/kubectl/kubectl_exec.md docs/user-guide/kubectl/kubectl_explain.md docs/user-guide/kubectl/kubectl_expose.md diff --git a/vendor/k8s.io/kubernetes/BUILD.bazel b/vendor/k8s.io/kubernetes/BUILD.bazel index 62975b34..339affff 100644 --- a/vendor/k8s.io/kubernetes/BUILD.bazel +++ b/vendor/k8s.io/kubernetes/BUILD.bazel @@ -12,6 +12,7 @@ gcs_upload( name = "ci-artifacts", data = [ "//build/debs", + "//build/release-tars", ], ) @@ -51,13 +52,3 @@ filegroup( ], tags = ["automanaged"], ) - -pkg_tar( - name = "kubernetes-src", - extension = "tar.gz", - files = [ - ":all-srcs", - ], - package_dir = "kubernetes", - strip_prefix = "//", -) diff --git a/vendor/k8s.io/kubernetes/Godeps/Godeps.json b/vendor/k8s.io/kubernetes/Godeps/Godeps.json index 3bd35f9d..06146de8 100644 --- a/vendor/k8s.io/kubernetes/Godeps/Godeps.json +++ b/vendor/k8s.io/kubernetes/Godeps/Godeps.json @@ -128,6 +128,10 @@ "Comment": "v0.8.1-6-gab50d12", "Rev": "ab50d12e88f57788bf84b83fef2be236eb1fcc0b" }, + { + "ImportPath": "github.com/armon/circbuf", + "Rev": "bbbad097214e2918d8543d5201d12bfd7bca254d" + }, { "ImportPath": "github.com/asaskevich/govalidator", "Comment": "v4-12-g593d645", @@ -135,143 +139,163 @@ }, { "ImportPath": "github.com/aws/aws-sdk-go/aws", - "Comment": "v1.0.8", - "Rev": "c924893c38ecc04b18d7aab8a7aa561cb8b4c4cc" + "Comment": "v1.6.10", + "Rev": "63ce630574a5ec05ecd8e8de5cea16332a5a684d" }, { "ImportPath": "github.com/aws/aws-sdk-go/aws/awserr", - "Comment": "v1.0.8", - "Rev": "c924893c38ecc04b18d7aab8a7aa561cb8b4c4cc" + "Comment": "v1.6.10", + "Rev": "63ce630574a5ec05ecd8e8de5cea16332a5a684d" }, { "ImportPath": "github.com/aws/aws-sdk-go/aws/awsutil", - "Comment": "v1.0.8", - "Rev": "c924893c38ecc04b18d7aab8a7aa561cb8b4c4cc" + "Comment": "v1.6.10", + "Rev": "63ce630574a5ec05ecd8e8de5cea16332a5a684d" }, { "ImportPath": "github.com/aws/aws-sdk-go/aws/client", - "Comment": "v1.0.8", - "Rev": "c924893c38ecc04b18d7aab8a7aa561cb8b4c4cc" + "Comment": "v1.6.10", + "Rev": "63ce630574a5ec05ecd8e8de5cea16332a5a684d" }, { "ImportPath": "github.com/aws/aws-sdk-go/aws/client/metadata", - "Comment": "v1.0.8", - "Rev": "c924893c38ecc04b18d7aab8a7aa561cb8b4c4cc" + "Comment": "v1.6.10", + "Rev": "63ce630574a5ec05ecd8e8de5cea16332a5a684d" }, { "ImportPath": "github.com/aws/aws-sdk-go/aws/corehandlers", - "Comment": "v1.0.8", - "Rev": "c924893c38ecc04b18d7aab8a7aa561cb8b4c4cc" + "Comment": "v1.6.10", + "Rev": "63ce630574a5ec05ecd8e8de5cea16332a5a684d" }, { "ImportPath": "github.com/aws/aws-sdk-go/aws/credentials", - "Comment": "v1.0.8", - "Rev": "c924893c38ecc04b18d7aab8a7aa561cb8b4c4cc" + "Comment": "v1.6.10", + "Rev": "63ce630574a5ec05ecd8e8de5cea16332a5a684d" }, { "ImportPath": "github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds", - "Comment": "v1.0.8", - "Rev": "c924893c38ecc04b18d7aab8a7aa561cb8b4c4cc" + "Comment": "v1.6.10", + "Rev": "63ce630574a5ec05ecd8e8de5cea16332a5a684d" + }, + { + "ImportPath": "github.com/aws/aws-sdk-go/aws/credentials/endpointcreds", + "Comment": "v1.6.10", + "Rev": "63ce630574a5ec05ecd8e8de5cea16332a5a684d" + }, + { + "ImportPath": "github.com/aws/aws-sdk-go/aws/credentials/stscreds", + "Comment": "v1.6.10", + "Rev": "63ce630574a5ec05ecd8e8de5cea16332a5a684d" }, { "ImportPath": "github.com/aws/aws-sdk-go/aws/defaults", - "Comment": "v1.0.8", - "Rev": "c924893c38ecc04b18d7aab8a7aa561cb8b4c4cc" + "Comment": "v1.6.10", + "Rev": "63ce630574a5ec05ecd8e8de5cea16332a5a684d" }, { "ImportPath": "github.com/aws/aws-sdk-go/aws/ec2metadata", - "Comment": "v1.0.8", - "Rev": "c924893c38ecc04b18d7aab8a7aa561cb8b4c4cc" + "Comment": "v1.6.10", + "Rev": "63ce630574a5ec05ecd8e8de5cea16332a5a684d" + }, + { + "ImportPath": "github.com/aws/aws-sdk-go/aws/endpoints", + "Comment": "v1.6.10", + "Rev": "63ce630574a5ec05ecd8e8de5cea16332a5a684d" }, { "ImportPath": "github.com/aws/aws-sdk-go/aws/request", - "Comment": "v1.0.8", - "Rev": "c924893c38ecc04b18d7aab8a7aa561cb8b4c4cc" + "Comment": "v1.6.10", + "Rev": "63ce630574a5ec05ecd8e8de5cea16332a5a684d" }, { "ImportPath": "github.com/aws/aws-sdk-go/aws/session", - "Comment": "v1.0.8", - "Rev": "c924893c38ecc04b18d7aab8a7aa561cb8b4c4cc" + "Comment": "v1.6.10", + "Rev": "63ce630574a5ec05ecd8e8de5cea16332a5a684d" }, { - "ImportPath": "github.com/aws/aws-sdk-go/private/endpoints", - "Comment": "v1.0.8", - "Rev": "c924893c38ecc04b18d7aab8a7aa561cb8b4c4cc" + "ImportPath": "github.com/aws/aws-sdk-go/aws/signer/v4", + "Comment": "v1.6.10", + "Rev": "63ce630574a5ec05ecd8e8de5cea16332a5a684d" + }, + { + "ImportPath": "github.com/aws/aws-sdk-go/private/protocol", + "Comment": "v1.6.10", + "Rev": "63ce630574a5ec05ecd8e8de5cea16332a5a684d" }, { "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/ec2query", - "Comment": "v1.0.8", - "Rev": "c924893c38ecc04b18d7aab8a7aa561cb8b4c4cc" + "Comment": "v1.6.10", + "Rev": "63ce630574a5ec05ecd8e8de5cea16332a5a684d" }, { "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/json/jsonutil", - "Comment": "v1.0.8", - "Rev": "c924893c38ecc04b18d7aab8a7aa561cb8b4c4cc" + "Comment": "v1.6.10", + "Rev": "63ce630574a5ec05ecd8e8de5cea16332a5a684d" }, { "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/jsonrpc", - "Comment": "v1.0.8", - "Rev": "c924893c38ecc04b18d7aab8a7aa561cb8b4c4cc" + "Comment": "v1.6.10", + "Rev": "63ce630574a5ec05ecd8e8de5cea16332a5a684d" }, { "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/query", - "Comment": "v1.0.8", - "Rev": "c924893c38ecc04b18d7aab8a7aa561cb8b4c4cc" + "Comment": "v1.6.10", + "Rev": "63ce630574a5ec05ecd8e8de5cea16332a5a684d" }, { "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/query/queryutil", - "Comment": "v1.0.8", - "Rev": "c924893c38ecc04b18d7aab8a7aa561cb8b4c4cc" + "Comment": "v1.6.10", + "Rev": "63ce630574a5ec05ecd8e8de5cea16332a5a684d" }, { "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/rest", - "Comment": "v1.0.8", - "Rev": "c924893c38ecc04b18d7aab8a7aa561cb8b4c4cc" + "Comment": "v1.6.10", + "Rev": "63ce630574a5ec05ecd8e8de5cea16332a5a684d" }, { "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/restxml", - "Comment": "v1.0.8", - "Rev": "c924893c38ecc04b18d7aab8a7aa561cb8b4c4cc" + "Comment": "v1.6.10", + "Rev": "63ce630574a5ec05ecd8e8de5cea16332a5a684d" }, { "ImportPath": "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil", - "Comment": "v1.0.8", - "Rev": "c924893c38ecc04b18d7aab8a7aa561cb8b4c4cc" - }, - { - "ImportPath": "github.com/aws/aws-sdk-go/private/signer/v4", - "Comment": "v1.0.8", - "Rev": "c924893c38ecc04b18d7aab8a7aa561cb8b4c4cc" + "Comment": "v1.6.10", + "Rev": "63ce630574a5ec05ecd8e8de5cea16332a5a684d" }, { "ImportPath": "github.com/aws/aws-sdk-go/private/waiter", - "Comment": "v1.0.8", - "Rev": "c924893c38ecc04b18d7aab8a7aa561cb8b4c4cc" + "Comment": "v1.6.10", + "Rev": "63ce630574a5ec05ecd8e8de5cea16332a5a684d" }, { "ImportPath": "github.com/aws/aws-sdk-go/service/autoscaling", - "Comment": "v1.0.8", - "Rev": "c924893c38ecc04b18d7aab8a7aa561cb8b4c4cc" + "Comment": "v1.6.10", + "Rev": "63ce630574a5ec05ecd8e8de5cea16332a5a684d" }, { "ImportPath": "github.com/aws/aws-sdk-go/service/ec2", - "Comment": "v1.0.8", - "Rev": "c924893c38ecc04b18d7aab8a7aa561cb8b4c4cc" + "Comment": "v1.6.10", + "Rev": "63ce630574a5ec05ecd8e8de5cea16332a5a684d" }, { "ImportPath": "github.com/aws/aws-sdk-go/service/ecr", - "Comment": "v1.0.8", - "Rev": "c924893c38ecc04b18d7aab8a7aa561cb8b4c4cc" + "Comment": "v1.6.10", + "Rev": "63ce630574a5ec05ecd8e8de5cea16332a5a684d" }, { "ImportPath": "github.com/aws/aws-sdk-go/service/elb", - "Comment": "v1.0.8", - "Rev": "c924893c38ecc04b18d7aab8a7aa561cb8b4c4cc" + "Comment": "v1.6.10", + "Rev": "63ce630574a5ec05ecd8e8de5cea16332a5a684d" }, { "ImportPath": "github.com/aws/aws-sdk-go/service/route53", - "Comment": "v1.0.8", - "Rev": "c924893c38ecc04b18d7aab8a7aa561cb8b4c4cc" + "Comment": "v1.6.10", + "Rev": "63ce630574a5ec05ecd8e8de5cea16332a5a684d" + }, + { + "ImportPath": "github.com/aws/aws-sdk-go/service/sts", + "Comment": "v1.6.10", + "Rev": "63ce630574a5ec05ecd8e8de5cea16332a5a684d" }, { "ImportPath": "github.com/beorn7/perks/quantile", @@ -728,7 +752,7 @@ }, { "ImportPath": "github.com/coreos/rkt/api/v1alpha", - "Comment": "v1.11.0-59-ga83419b", + "Comment": "v1.11.0-59-ga83419be", "Rev": "a83419be28ac626876f94a28b4df2dbc9eac7448" }, { @@ -751,12 +775,12 @@ }, { "ImportPath": "github.com/docker/distribution/digest", - "Comment": "v2.4.0-rc.1-38-gcd27f17", + "Comment": "v2.4.0-rc.1-38-gcd27f179", "Rev": "cd27f179f2c10c5d300e6d09025b538c475b0d51" }, { "ImportPath": "github.com/docker/distribution/reference", - "Comment": "v2.4.0-rc.1-38-gcd27f17", + "Comment": "v2.4.0-rc.1-38-gcd27f179", "Rev": "cd27f179f2c10c5d300e6d09025b538c475b0d51" }, { @@ -1000,127 +1024,127 @@ }, { "ImportPath": "github.com/gogo/protobuf/gogoproto", - "Comment": "v0.2-33-ge18d7aa", + "Comment": "v0.2-33-ge18d7aa8", "Rev": "e18d7aa8f8c624c915db340349aad4c49b10d173" }, { "ImportPath": "github.com/gogo/protobuf/plugin/compare", - "Comment": "v0.2-33-ge18d7aa", + "Comment": "v0.2-33-ge18d7aa8", "Rev": "e18d7aa8f8c624c915db340349aad4c49b10d173" }, { "ImportPath": "github.com/gogo/protobuf/plugin/defaultcheck", - "Comment": "v0.2-33-ge18d7aa", + "Comment": "v0.2-33-ge18d7aa8", "Rev": "e18d7aa8f8c624c915db340349aad4c49b10d173" }, { "ImportPath": "github.com/gogo/protobuf/plugin/description", - "Comment": "v0.2-33-ge18d7aa", + "Comment": "v0.2-33-ge18d7aa8", "Rev": "e18d7aa8f8c624c915db340349aad4c49b10d173" }, { "ImportPath": "github.com/gogo/protobuf/plugin/embedcheck", - "Comment": "v0.2-33-ge18d7aa", + "Comment": "v0.2-33-ge18d7aa8", "Rev": "e18d7aa8f8c624c915db340349aad4c49b10d173" }, { "ImportPath": "github.com/gogo/protobuf/plugin/enumstringer", - "Comment": "v0.2-33-ge18d7aa", + "Comment": "v0.2-33-ge18d7aa8", "Rev": "e18d7aa8f8c624c915db340349aad4c49b10d173" }, { "ImportPath": "github.com/gogo/protobuf/plugin/equal", - "Comment": "v0.2-33-ge18d7aa", + "Comment": "v0.2-33-ge18d7aa8", "Rev": "e18d7aa8f8c624c915db340349aad4c49b10d173" }, { "ImportPath": "github.com/gogo/protobuf/plugin/face", - "Comment": "v0.2-33-ge18d7aa", + "Comment": "v0.2-33-ge18d7aa8", "Rev": "e18d7aa8f8c624c915db340349aad4c49b10d173" }, { "ImportPath": "github.com/gogo/protobuf/plugin/gostring", - "Comment": "v0.2-33-ge18d7aa", + "Comment": "v0.2-33-ge18d7aa8", "Rev": "e18d7aa8f8c624c915db340349aad4c49b10d173" }, { "ImportPath": "github.com/gogo/protobuf/plugin/marshalto", - "Comment": "v0.2-33-ge18d7aa", + "Comment": "v0.2-33-ge18d7aa8", "Rev": "e18d7aa8f8c624c915db340349aad4c49b10d173" }, { "ImportPath": "github.com/gogo/protobuf/plugin/oneofcheck", - "Comment": "v0.2-33-ge18d7aa", + "Comment": "v0.2-33-ge18d7aa8", "Rev": "e18d7aa8f8c624c915db340349aad4c49b10d173" }, { "ImportPath": "github.com/gogo/protobuf/plugin/populate", - "Comment": "v0.2-33-ge18d7aa", + "Comment": "v0.2-33-ge18d7aa8", "Rev": "e18d7aa8f8c624c915db340349aad4c49b10d173" }, { "ImportPath": "github.com/gogo/protobuf/plugin/size", - "Comment": "v0.2-33-ge18d7aa", + "Comment": "v0.2-33-ge18d7aa8", "Rev": "e18d7aa8f8c624c915db340349aad4c49b10d173" }, { "ImportPath": "github.com/gogo/protobuf/plugin/stringer", - "Comment": "v0.2-33-ge18d7aa", + "Comment": "v0.2-33-ge18d7aa8", "Rev": "e18d7aa8f8c624c915db340349aad4c49b10d173" }, { "ImportPath": "github.com/gogo/protobuf/plugin/testgen", - "Comment": "v0.2-33-ge18d7aa", + "Comment": "v0.2-33-ge18d7aa8", "Rev": "e18d7aa8f8c624c915db340349aad4c49b10d173" }, { "ImportPath": "github.com/gogo/protobuf/plugin/union", - "Comment": "v0.2-33-ge18d7aa", + "Comment": "v0.2-33-ge18d7aa8", "Rev": "e18d7aa8f8c624c915db340349aad4c49b10d173" }, { "ImportPath": "github.com/gogo/protobuf/plugin/unmarshal", - "Comment": "v0.2-33-ge18d7aa", + "Comment": "v0.2-33-ge18d7aa8", "Rev": "e18d7aa8f8c624c915db340349aad4c49b10d173" }, { "ImportPath": "github.com/gogo/protobuf/proto", - "Comment": "v0.2-33-ge18d7aa", + "Comment": "v0.2-33-ge18d7aa8", "Rev": "e18d7aa8f8c624c915db340349aad4c49b10d173" }, { "ImportPath": "github.com/gogo/protobuf/protoc-gen-gogo/descriptor", - "Comment": "v0.2-33-ge18d7aa", + "Comment": "v0.2-33-ge18d7aa8", "Rev": "e18d7aa8f8c624c915db340349aad4c49b10d173" }, { "ImportPath": "github.com/gogo/protobuf/protoc-gen-gogo/generator", - "Comment": "v0.2-33-ge18d7aa", + "Comment": "v0.2-33-ge18d7aa8", "Rev": "e18d7aa8f8c624c915db340349aad4c49b10d173" }, { "ImportPath": "github.com/gogo/protobuf/protoc-gen-gogo/grpc", - "Comment": "v0.2-33-ge18d7aa", + "Comment": "v0.2-33-ge18d7aa8", "Rev": "e18d7aa8f8c624c915db340349aad4c49b10d173" }, { "ImportPath": "github.com/gogo/protobuf/protoc-gen-gogo/plugin", - "Comment": "v0.2-33-ge18d7aa", + "Comment": "v0.2-33-ge18d7aa8", "Rev": "e18d7aa8f8c624c915db340349aad4c49b10d173" }, { "ImportPath": "github.com/gogo/protobuf/sortkeys", - "Comment": "v0.2-33-ge18d7aa", + "Comment": "v0.2-33-ge18d7aa8", "Rev": "e18d7aa8f8c624c915db340349aad4c49b10d173" }, { "ImportPath": "github.com/gogo/protobuf/vanity", - "Comment": "v0.2-33-ge18d7aa", + "Comment": "v0.2-33-ge18d7aa8", "Rev": "e18d7aa8f8c624c915db340349aad4c49b10d173" }, { "ImportPath": "github.com/gogo/protobuf/vanity/command", - "Comment": "v0.2-33-ge18d7aa", + "Comment": "v0.2-33-ge18d7aa8", "Rev": "e18d7aa8f8c624c915db340349aad4c49b10d173" }, { @@ -1149,203 +1173,203 @@ }, { "ImportPath": "github.com/google/cadvisor/api", - "Comment": "v0.24.0-alpha1-56-ga726d13", - "Rev": "a726d13de8cb32860e73d72a78dc8e0124267709" + "Comment": "v0.24.0-alpha1-82-gc30a9e7", + "Rev": "c30a9e7d3642fffb422f08be34a7bbc15d69cdbf" }, { "ImportPath": "github.com/google/cadvisor/cache/memory", - "Comment": "v0.24.0-alpha1-56-ga726d13", - "Rev": "a726d13de8cb32860e73d72a78dc8e0124267709" + "Comment": "v0.24.0-alpha1-82-gc30a9e7", + "Rev": "c30a9e7d3642fffb422f08be34a7bbc15d69cdbf" }, { "ImportPath": "github.com/google/cadvisor/client/v2", - "Comment": "v0.24.0-alpha1-56-ga726d13", - "Rev": "a726d13de8cb32860e73d72a78dc8e0124267709" + "Comment": "v0.24.0-alpha1-82-gc30a9e7", + "Rev": "c30a9e7d3642fffb422f08be34a7bbc15d69cdbf" }, { "ImportPath": "github.com/google/cadvisor/collector", - "Comment": "v0.24.0-alpha1-56-ga726d13", - "Rev": "a726d13de8cb32860e73d72a78dc8e0124267709" + "Comment": "v0.24.0-alpha1-82-gc30a9e7", + "Rev": "c30a9e7d3642fffb422f08be34a7bbc15d69cdbf" }, { "ImportPath": "github.com/google/cadvisor/container", - "Comment": "v0.24.0-alpha1-56-ga726d13", - "Rev": "a726d13de8cb32860e73d72a78dc8e0124267709" + "Comment": "v0.24.0-alpha1-82-gc30a9e7", + "Rev": "c30a9e7d3642fffb422f08be34a7bbc15d69cdbf" }, { "ImportPath": "github.com/google/cadvisor/container/common", - "Comment": "v0.24.0-alpha1-56-ga726d13", - "Rev": "a726d13de8cb32860e73d72a78dc8e0124267709" + "Comment": "v0.24.0-alpha1-82-gc30a9e7", + "Rev": "c30a9e7d3642fffb422f08be34a7bbc15d69cdbf" }, { "ImportPath": "github.com/google/cadvisor/container/docker", - "Comment": "v0.24.0-alpha1-56-ga726d13", - "Rev": "a726d13de8cb32860e73d72a78dc8e0124267709" + "Comment": "v0.24.0-alpha1-82-gc30a9e7", + "Rev": "c30a9e7d3642fffb422f08be34a7bbc15d69cdbf" }, { "ImportPath": "github.com/google/cadvisor/container/libcontainer", - "Comment": "v0.24.0-alpha1-56-ga726d13", - "Rev": "a726d13de8cb32860e73d72a78dc8e0124267709" + "Comment": "v0.24.0-alpha1-82-gc30a9e7", + "Rev": "c30a9e7d3642fffb422f08be34a7bbc15d69cdbf" }, { "ImportPath": "github.com/google/cadvisor/container/raw", - "Comment": "v0.24.0-alpha1-56-ga726d13", - "Rev": "a726d13de8cb32860e73d72a78dc8e0124267709" + "Comment": "v0.24.0-alpha1-82-gc30a9e7", + "Rev": "c30a9e7d3642fffb422f08be34a7bbc15d69cdbf" }, { "ImportPath": "github.com/google/cadvisor/container/rkt", - "Comment": "v0.24.0-alpha1-56-ga726d13", - "Rev": "a726d13de8cb32860e73d72a78dc8e0124267709" + "Comment": "v0.24.0-alpha1-82-gc30a9e7", + "Rev": "c30a9e7d3642fffb422f08be34a7bbc15d69cdbf" }, { "ImportPath": "github.com/google/cadvisor/container/systemd", - "Comment": "v0.24.0-alpha1-56-ga726d13", - "Rev": "a726d13de8cb32860e73d72a78dc8e0124267709" + "Comment": "v0.24.0-alpha1-82-gc30a9e7", + "Rev": "c30a9e7d3642fffb422f08be34a7bbc15d69cdbf" }, { "ImportPath": "github.com/google/cadvisor/devicemapper", - "Comment": "v0.24.0-alpha1-56-ga726d13", - "Rev": "a726d13de8cb32860e73d72a78dc8e0124267709" + "Comment": "v0.24.0-alpha1-82-gc30a9e7", + "Rev": "c30a9e7d3642fffb422f08be34a7bbc15d69cdbf" }, { "ImportPath": "github.com/google/cadvisor/events", - "Comment": "v0.24.0-alpha1-56-ga726d13", - "Rev": "a726d13de8cb32860e73d72a78dc8e0124267709" + "Comment": "v0.24.0-alpha1-82-gc30a9e7", + "Rev": "c30a9e7d3642fffb422f08be34a7bbc15d69cdbf" }, { "ImportPath": "github.com/google/cadvisor/fs", - "Comment": "v0.24.0-alpha1-56-ga726d13", - "Rev": "a726d13de8cb32860e73d72a78dc8e0124267709" + "Comment": "v0.24.0-alpha1-82-gc30a9e7", + "Rev": "c30a9e7d3642fffb422f08be34a7bbc15d69cdbf" }, { "ImportPath": "github.com/google/cadvisor/healthz", - "Comment": "v0.24.0-alpha1-56-ga726d13", - "Rev": "a726d13de8cb32860e73d72a78dc8e0124267709" + "Comment": "v0.24.0-alpha1-82-gc30a9e7", + "Rev": "c30a9e7d3642fffb422f08be34a7bbc15d69cdbf" }, { "ImportPath": "github.com/google/cadvisor/http", - "Comment": "v0.24.0-alpha1-56-ga726d13", - "Rev": "a726d13de8cb32860e73d72a78dc8e0124267709" + "Comment": "v0.24.0-alpha1-82-gc30a9e7", + "Rev": "c30a9e7d3642fffb422f08be34a7bbc15d69cdbf" }, { "ImportPath": "github.com/google/cadvisor/http/mux", - "Comment": "v0.24.0-alpha1-56-ga726d13", - "Rev": "a726d13de8cb32860e73d72a78dc8e0124267709" + "Comment": "v0.24.0-alpha1-82-gc30a9e7", + "Rev": "c30a9e7d3642fffb422f08be34a7bbc15d69cdbf" }, { "ImportPath": "github.com/google/cadvisor/info/v1", - "Comment": "v0.24.0-alpha1-56-ga726d13", - "Rev": "a726d13de8cb32860e73d72a78dc8e0124267709" + "Comment": "v0.24.0-alpha1-82-gc30a9e7", + "Rev": "c30a9e7d3642fffb422f08be34a7bbc15d69cdbf" }, { "ImportPath": "github.com/google/cadvisor/info/v2", - "Comment": "v0.24.0-alpha1-56-ga726d13", - "Rev": "a726d13de8cb32860e73d72a78dc8e0124267709" + "Comment": "v0.24.0-alpha1-82-gc30a9e7", + "Rev": "c30a9e7d3642fffb422f08be34a7bbc15d69cdbf" }, { "ImportPath": "github.com/google/cadvisor/machine", - "Comment": "v0.24.0-alpha1-56-ga726d13", - "Rev": "a726d13de8cb32860e73d72a78dc8e0124267709" + "Comment": "v0.24.0-alpha1-82-gc30a9e7", + "Rev": "c30a9e7d3642fffb422f08be34a7bbc15d69cdbf" }, { "ImportPath": "github.com/google/cadvisor/manager", - "Comment": "v0.24.0-alpha1-56-ga726d13", - "Rev": "a726d13de8cb32860e73d72a78dc8e0124267709" + "Comment": "v0.24.0-alpha1-82-gc30a9e7", + "Rev": "c30a9e7d3642fffb422f08be34a7bbc15d69cdbf" }, { "ImportPath": "github.com/google/cadvisor/manager/watcher", - "Comment": "v0.24.0-alpha1-56-ga726d13", - "Rev": "a726d13de8cb32860e73d72a78dc8e0124267709" + "Comment": "v0.24.0-alpha1-82-gc30a9e7", + "Rev": "c30a9e7d3642fffb422f08be34a7bbc15d69cdbf" }, { "ImportPath": "github.com/google/cadvisor/manager/watcher/raw", - "Comment": "v0.24.0-alpha1-56-ga726d13", - "Rev": "a726d13de8cb32860e73d72a78dc8e0124267709" + "Comment": "v0.24.0-alpha1-82-gc30a9e7", + "Rev": "c30a9e7d3642fffb422f08be34a7bbc15d69cdbf" }, { "ImportPath": "github.com/google/cadvisor/manager/watcher/rkt", - "Comment": "v0.24.0-alpha1-56-ga726d13", - "Rev": "a726d13de8cb32860e73d72a78dc8e0124267709" + "Comment": "v0.24.0-alpha1-82-gc30a9e7", + "Rev": "c30a9e7d3642fffb422f08be34a7bbc15d69cdbf" }, { "ImportPath": "github.com/google/cadvisor/metrics", - "Comment": "v0.24.0-alpha1-56-ga726d13", - "Rev": "a726d13de8cb32860e73d72a78dc8e0124267709" + "Comment": "v0.24.0-alpha1-82-gc30a9e7", + "Rev": "c30a9e7d3642fffb422f08be34a7bbc15d69cdbf" }, { "ImportPath": "github.com/google/cadvisor/pages", - "Comment": "v0.24.0-alpha1-56-ga726d13", - "Rev": "a726d13de8cb32860e73d72a78dc8e0124267709" + "Comment": "v0.24.0-alpha1-82-gc30a9e7", + "Rev": "c30a9e7d3642fffb422f08be34a7bbc15d69cdbf" }, { "ImportPath": "github.com/google/cadvisor/pages/static", - "Comment": "v0.24.0-alpha1-56-ga726d13", - "Rev": "a726d13de8cb32860e73d72a78dc8e0124267709" + "Comment": "v0.24.0-alpha1-82-gc30a9e7", + "Rev": "c30a9e7d3642fffb422f08be34a7bbc15d69cdbf" }, { "ImportPath": "github.com/google/cadvisor/storage", - "Comment": "v0.24.0-alpha1-56-ga726d13", - "Rev": "a726d13de8cb32860e73d72a78dc8e0124267709" + "Comment": "v0.24.0-alpha1-82-gc30a9e7", + "Rev": "c30a9e7d3642fffb422f08be34a7bbc15d69cdbf" }, { "ImportPath": "github.com/google/cadvisor/summary", - "Comment": "v0.24.0-alpha1-56-ga726d13", - "Rev": "a726d13de8cb32860e73d72a78dc8e0124267709" + "Comment": "v0.24.0-alpha1-82-gc30a9e7", + "Rev": "c30a9e7d3642fffb422f08be34a7bbc15d69cdbf" }, { "ImportPath": "github.com/google/cadvisor/utils", - "Comment": "v0.24.0-alpha1-56-ga726d13", - "Rev": "a726d13de8cb32860e73d72a78dc8e0124267709" + "Comment": "v0.24.0-alpha1-82-gc30a9e7", + "Rev": "c30a9e7d3642fffb422f08be34a7bbc15d69cdbf" }, { "ImportPath": "github.com/google/cadvisor/utils/cloudinfo", - "Comment": "v0.24.0-alpha1-56-ga726d13", - "Rev": "a726d13de8cb32860e73d72a78dc8e0124267709" + "Comment": "v0.24.0-alpha1-82-gc30a9e7", + "Rev": "c30a9e7d3642fffb422f08be34a7bbc15d69cdbf" }, { "ImportPath": "github.com/google/cadvisor/utils/cpuload", - "Comment": "v0.24.0-alpha1-56-ga726d13", - "Rev": "a726d13de8cb32860e73d72a78dc8e0124267709" + "Comment": "v0.24.0-alpha1-82-gc30a9e7", + "Rev": "c30a9e7d3642fffb422f08be34a7bbc15d69cdbf" }, { "ImportPath": "github.com/google/cadvisor/utils/cpuload/netlink", - "Comment": "v0.24.0-alpha1-56-ga726d13", - "Rev": "a726d13de8cb32860e73d72a78dc8e0124267709" + "Comment": "v0.24.0-alpha1-82-gc30a9e7", + "Rev": "c30a9e7d3642fffb422f08be34a7bbc15d69cdbf" }, { "ImportPath": "github.com/google/cadvisor/utils/docker", - "Comment": "v0.24.0-alpha1-56-ga726d13", - "Rev": "a726d13de8cb32860e73d72a78dc8e0124267709" + "Comment": "v0.24.0-alpha1-82-gc30a9e7", + "Rev": "c30a9e7d3642fffb422f08be34a7bbc15d69cdbf" }, { "ImportPath": "github.com/google/cadvisor/utils/oomparser", - "Comment": "v0.24.0-alpha1-56-ga726d13", - "Rev": "a726d13de8cb32860e73d72a78dc8e0124267709" + "Comment": "v0.24.0-alpha1-82-gc30a9e7", + "Rev": "c30a9e7d3642fffb422f08be34a7bbc15d69cdbf" }, { "ImportPath": "github.com/google/cadvisor/utils/sysfs", - "Comment": "v0.24.0-alpha1-56-ga726d13", - "Rev": "a726d13de8cb32860e73d72a78dc8e0124267709" + "Comment": "v0.24.0-alpha1-82-gc30a9e7", + "Rev": "c30a9e7d3642fffb422f08be34a7bbc15d69cdbf" }, { "ImportPath": "github.com/google/cadvisor/utils/sysinfo", - "Comment": "v0.24.0-alpha1-56-ga726d13", - "Rev": "a726d13de8cb32860e73d72a78dc8e0124267709" + "Comment": "v0.24.0-alpha1-82-gc30a9e7", + "Rev": "c30a9e7d3642fffb422f08be34a7bbc15d69cdbf" }, { "ImportPath": "github.com/google/cadvisor/utils/tail", - "Comment": "v0.24.0-alpha1-56-ga726d13", - "Rev": "a726d13de8cb32860e73d72a78dc8e0124267709" + "Comment": "v0.24.0-alpha1-82-gc30a9e7", + "Rev": "c30a9e7d3642fffb422f08be34a7bbc15d69cdbf" }, { "ImportPath": "github.com/google/cadvisor/validate", - "Comment": "v0.24.0-alpha1-56-ga726d13", - "Rev": "a726d13de8cb32860e73d72a78dc8e0124267709" + "Comment": "v0.24.0-alpha1-82-gc30a9e7", + "Rev": "c30a9e7d3642fffb422f08be34a7bbc15d69cdbf" }, { "ImportPath": "github.com/google/cadvisor/version", - "Comment": "v0.24.0-alpha1-56-ga726d13", - "Rev": "a726d13de8cb32860e73d72a78dc8e0124267709" + "Comment": "v0.24.0-alpha1-82-gc30a9e7", + "Rev": "c30a9e7d3642fffb422f08be34a7bbc15d69cdbf" }, { "ImportPath": "github.com/google/certificate-transparency/go", @@ -1922,187 +1946,187 @@ }, { "ImportPath": "github.com/rackspace/gophercloud", - "Comment": "v1.0.0-1012-ge00690e", + "Comment": "v1.0.0-1012-ge00690e8", "Rev": "e00690e87603abe613e9f02c816c7c4bef82e063" }, { "ImportPath": "github.com/rackspace/gophercloud/openstack", - "Comment": "v1.0.0-1012-ge00690e", + "Comment": "v1.0.0-1012-ge00690e8", "Rev": "e00690e87603abe613e9f02c816c7c4bef82e063" }, { "ImportPath": "github.com/rackspace/gophercloud/openstack/blockstorage/v1/volumes", - "Comment": "v1.0.0-1012-ge00690e", + "Comment": "v1.0.0-1012-ge00690e8", "Rev": "e00690e87603abe613e9f02c816c7c4bef82e063" }, { "ImportPath": "github.com/rackspace/gophercloud/openstack/common/extensions", - "Comment": "v1.0.0-1012-ge00690e", + "Comment": "v1.0.0-1012-ge00690e8", "Rev": "e00690e87603abe613e9f02c816c7c4bef82e063" }, { "ImportPath": "github.com/rackspace/gophercloud/openstack/compute/v2/extensions/bootfromvolume", - "Comment": "v1.0.0-1012-ge00690e", + "Comment": "v1.0.0-1012-ge00690e8", "Rev": "e00690e87603abe613e9f02c816c7c4bef82e063" }, { "ImportPath": "github.com/rackspace/gophercloud/openstack/compute/v2/extensions/diskconfig", - "Comment": "v1.0.0-1012-ge00690e", + "Comment": "v1.0.0-1012-ge00690e8", "Rev": "e00690e87603abe613e9f02c816c7c4bef82e063" }, { "ImportPath": "github.com/rackspace/gophercloud/openstack/compute/v2/extensions/volumeattach", - "Comment": "v1.0.0-1012-ge00690e", + "Comment": "v1.0.0-1012-ge00690e8", "Rev": "e00690e87603abe613e9f02c816c7c4bef82e063" }, { "ImportPath": "github.com/rackspace/gophercloud/openstack/compute/v2/flavors", - "Comment": "v1.0.0-1012-ge00690e", + "Comment": "v1.0.0-1012-ge00690e8", "Rev": "e00690e87603abe613e9f02c816c7c4bef82e063" }, { "ImportPath": "github.com/rackspace/gophercloud/openstack/compute/v2/images", - "Comment": "v1.0.0-1012-ge00690e", + "Comment": "v1.0.0-1012-ge00690e8", "Rev": "e00690e87603abe613e9f02c816c7c4bef82e063" }, { "ImportPath": "github.com/rackspace/gophercloud/openstack/compute/v2/servers", - "Comment": "v1.0.0-1012-ge00690e", + "Comment": "v1.0.0-1012-ge00690e8", "Rev": "e00690e87603abe613e9f02c816c7c4bef82e063" }, { "ImportPath": "github.com/rackspace/gophercloud/openstack/identity/v2/tenants", - "Comment": "v1.0.0-1012-ge00690e", + "Comment": "v1.0.0-1012-ge00690e8", "Rev": "e00690e87603abe613e9f02c816c7c4bef82e063" }, { "ImportPath": "github.com/rackspace/gophercloud/openstack/identity/v2/tokens", - "Comment": "v1.0.0-1012-ge00690e", + "Comment": "v1.0.0-1012-ge00690e8", "Rev": "e00690e87603abe613e9f02c816c7c4bef82e063" }, { "ImportPath": "github.com/rackspace/gophercloud/openstack/identity/v3/extensions/trust", - "Comment": "v1.0.0-1012-ge00690e", + "Comment": "v1.0.0-1012-ge00690e8", "Rev": "e00690e87603abe613e9f02c816c7c4bef82e063" }, { "ImportPath": "github.com/rackspace/gophercloud/openstack/identity/v3/tokens", - "Comment": "v1.0.0-1012-ge00690e", + "Comment": "v1.0.0-1012-ge00690e8", "Rev": "e00690e87603abe613e9f02c816c7c4bef82e063" }, { "ImportPath": "github.com/rackspace/gophercloud/openstack/networking/v2/extensions", - "Comment": "v1.0.0-1012-ge00690e", + "Comment": "v1.0.0-1012-ge00690e8", "Rev": "e00690e87603abe613e9f02c816c7c4bef82e063" }, { "ImportPath": "github.com/rackspace/gophercloud/openstack/networking/v2/extensions/layer3/floatingips", - "Comment": "v1.0.0-1012-ge00690e", + "Comment": "v1.0.0-1012-ge00690e8", "Rev": "e00690e87603abe613e9f02c816c7c4bef82e063" }, { "ImportPath": "github.com/rackspace/gophercloud/openstack/networking/v2/extensions/layer3/routers", - "Comment": "v1.0.0-1012-ge00690e", + "Comment": "v1.0.0-1012-ge00690e8", "Rev": "e00690e87603abe613e9f02c816c7c4bef82e063" }, { "ImportPath": "github.com/rackspace/gophercloud/openstack/networking/v2/extensions/lbaas/members", - "Comment": "v1.0.0-1012-ge00690e", + "Comment": "v1.0.0-1012-ge00690e8", "Rev": "e00690e87603abe613e9f02c816c7c4bef82e063" }, { "ImportPath": "github.com/rackspace/gophercloud/openstack/networking/v2/extensions/lbaas/monitors", - "Comment": "v1.0.0-1012-ge00690e", + "Comment": "v1.0.0-1012-ge00690e8", "Rev": "e00690e87603abe613e9f02c816c7c4bef82e063" }, { "ImportPath": "github.com/rackspace/gophercloud/openstack/networking/v2/extensions/lbaas/pools", - "Comment": "v1.0.0-1012-ge00690e", + "Comment": "v1.0.0-1012-ge00690e8", "Rev": "e00690e87603abe613e9f02c816c7c4bef82e063" }, { "ImportPath": "github.com/rackspace/gophercloud/openstack/networking/v2/extensions/lbaas/vips", - "Comment": "v1.0.0-1012-ge00690e", + "Comment": "v1.0.0-1012-ge00690e8", "Rev": "e00690e87603abe613e9f02c816c7c4bef82e063" }, { "ImportPath": "github.com/rackspace/gophercloud/openstack/networking/v2/extensions/lbaas_v2/listeners", - "Comment": "v1.0.0-1012-ge00690e", + "Comment": "v1.0.0-1012-ge00690e8", "Rev": "e00690e87603abe613e9f02c816c7c4bef82e063" }, { "ImportPath": "github.com/rackspace/gophercloud/openstack/networking/v2/extensions/lbaas_v2/loadbalancers", - "Comment": "v1.0.0-1012-ge00690e", + "Comment": "v1.0.0-1012-ge00690e8", "Rev": "e00690e87603abe613e9f02c816c7c4bef82e063" }, { "ImportPath": "github.com/rackspace/gophercloud/openstack/networking/v2/extensions/lbaas_v2/monitors", - "Comment": "v1.0.0-1012-ge00690e", + "Comment": "v1.0.0-1012-ge00690e8", "Rev": "e00690e87603abe613e9f02c816c7c4bef82e063" }, { "ImportPath": "github.com/rackspace/gophercloud/openstack/networking/v2/extensions/lbaas_v2/pools", - "Comment": "v1.0.0-1012-ge00690e", + "Comment": "v1.0.0-1012-ge00690e8", "Rev": "e00690e87603abe613e9f02c816c7c4bef82e063" }, { "ImportPath": "github.com/rackspace/gophercloud/openstack/networking/v2/extensions/security/groups", - "Comment": "v1.0.0-1012-ge00690e", + "Comment": "v1.0.0-1012-ge00690e8", "Rev": "e00690e87603abe613e9f02c816c7c4bef82e063" }, { "ImportPath": "github.com/rackspace/gophercloud/openstack/networking/v2/extensions/security/rules", - "Comment": "v1.0.0-1012-ge00690e", + "Comment": "v1.0.0-1012-ge00690e8", "Rev": "e00690e87603abe613e9f02c816c7c4bef82e063" }, { "ImportPath": "github.com/rackspace/gophercloud/openstack/networking/v2/ports", - "Comment": "v1.0.0-1012-ge00690e", + "Comment": "v1.0.0-1012-ge00690e8", "Rev": "e00690e87603abe613e9f02c816c7c4bef82e063" }, { "ImportPath": "github.com/rackspace/gophercloud/openstack/utils", - "Comment": "v1.0.0-1012-ge00690e", + "Comment": "v1.0.0-1012-ge00690e8", "Rev": "e00690e87603abe613e9f02c816c7c4bef82e063" }, { "ImportPath": "github.com/rackspace/gophercloud/pagination", - "Comment": "v1.0.0-1012-ge00690e", + "Comment": "v1.0.0-1012-ge00690e8", "Rev": "e00690e87603abe613e9f02c816c7c4bef82e063" }, { "ImportPath": "github.com/rackspace/gophercloud/rackspace", - "Comment": "v1.0.0-1012-ge00690e", + "Comment": "v1.0.0-1012-ge00690e8", "Rev": "e00690e87603abe613e9f02c816c7c4bef82e063" }, { "ImportPath": "github.com/rackspace/gophercloud/rackspace/blockstorage/v1/volumes", - "Comment": "v1.0.0-1012-ge00690e", + "Comment": "v1.0.0-1012-ge00690e8", "Rev": "e00690e87603abe613e9f02c816c7c4bef82e063" }, { "ImportPath": "github.com/rackspace/gophercloud/rackspace/compute/v2/servers", - "Comment": "v1.0.0-1012-ge00690e", + "Comment": "v1.0.0-1012-ge00690e8", "Rev": "e00690e87603abe613e9f02c816c7c4bef82e063" }, { "ImportPath": "github.com/rackspace/gophercloud/rackspace/compute/v2/volumeattach", - "Comment": "v1.0.0-1012-ge00690e", + "Comment": "v1.0.0-1012-ge00690e8", "Rev": "e00690e87603abe613e9f02c816c7c4bef82e063" }, { "ImportPath": "github.com/rackspace/gophercloud/rackspace/identity/v2/tokens", - "Comment": "v1.0.0-1012-ge00690e", + "Comment": "v1.0.0-1012-ge00690e8", "Rev": "e00690e87603abe613e9f02c816c7c4bef82e063" }, { "ImportPath": "github.com/rackspace/gophercloud/testhelper", - "Comment": "v1.0.0-1012-ge00690e", + "Comment": "v1.0.0-1012-ge00690e8", "Rev": "e00690e87603abe613e9f02c816c7c4bef82e063" }, { "ImportPath": "github.com/rackspace/gophercloud/testhelper/client", - "Comment": "v1.0.0-1012-ge00690e", + "Comment": "v1.0.0-1012-ge00690e8", "Rev": "e00690e87603abe613e9f02c816c7c4bef82e063" }, { @@ -2639,43 +2663,43 @@ }, { "ImportPath": "k8s.io/gengo/args", - "Rev": "3c6a809462caf39389d70d9ea787ed24c5acffed" + "Rev": "c118aa8edfff53fe5b69127a970f54b6cf3a7563" }, { "ImportPath": "k8s.io/gengo/examples/deepcopy-gen/generators", - "Rev": "3c6a809462caf39389d70d9ea787ed24c5acffed" + "Rev": "c118aa8edfff53fe5b69127a970f54b6cf3a7563" }, { "ImportPath": "k8s.io/gengo/examples/defaulter-gen/generators", - "Rev": "3c6a809462caf39389d70d9ea787ed24c5acffed" + "Rev": "c118aa8edfff53fe5b69127a970f54b6cf3a7563" }, { "ImportPath": "k8s.io/gengo/examples/import-boss/generators", - "Rev": "3c6a809462caf39389d70d9ea787ed24c5acffed" + "Rev": "c118aa8edfff53fe5b69127a970f54b6cf3a7563" }, { "ImportPath": "k8s.io/gengo/examples/set-gen/generators", - "Rev": "3c6a809462caf39389d70d9ea787ed24c5acffed" + "Rev": "c118aa8edfff53fe5b69127a970f54b6cf3a7563" }, { "ImportPath": "k8s.io/gengo/examples/set-gen/sets", - "Rev": "3c6a809462caf39389d70d9ea787ed24c5acffed" + "Rev": "c118aa8edfff53fe5b69127a970f54b6cf3a7563" }, { "ImportPath": "k8s.io/gengo/generator", - "Rev": "3c6a809462caf39389d70d9ea787ed24c5acffed" + "Rev": "c118aa8edfff53fe5b69127a970f54b6cf3a7563" }, { "ImportPath": "k8s.io/gengo/namer", - "Rev": "3c6a809462caf39389d70d9ea787ed24c5acffed" + "Rev": "c118aa8edfff53fe5b69127a970f54b6cf3a7563" }, { "ImportPath": "k8s.io/gengo/parser", - "Rev": "3c6a809462caf39389d70d9ea787ed24c5acffed" + "Rev": "c118aa8edfff53fe5b69127a970f54b6cf3a7563" }, { "ImportPath": "k8s.io/gengo/types", - "Rev": "3c6a809462caf39389d70d9ea787ed24c5acffed" + "Rev": "c118aa8edfff53fe5b69127a970f54b6cf3a7563" }, { "ImportPath": "k8s.io/heapster/metrics/api/v1/types", diff --git a/vendor/k8s.io/kubernetes/Godeps/LICENSES b/vendor/k8s.io/kubernetes/Godeps/LICENSES index 09a24720..beccada1 100644 --- a/vendor/k8s.io/kubernetes/Godeps/LICENSES +++ b/vendor/k8s.io/kubernetes/Godeps/LICENSES @@ -1546,6 +1546,34 @@ Apache License ================================================================================ +================================================================================ += vendor/github.com/armon/circbuf licensed under: = + +The MIT License (MIT) + +Copyright (c) 2013 Armon Dadgar + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + += vendor/github.com/armon/circbuf/LICENSE d2d77030c0183e3d1e66d26dc1f243be - +================================================================================ + + ================================================================================ = vendor/github.com/asaskevich/govalidator licensed under: = @@ -3254,6 +3282,426 @@ SOFTWARE. ================================================================================ +================================================================================ += vendor/github.com/aws/aws-sdk-go/aws/credentials/endpointcreds licensed under: = + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + += vendor/github.com/aws/aws-sdk-go/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 - +================================================================================ + + +================================================================================ += vendor/github.com/aws/aws-sdk-go/aws/credentials/stscreds licensed under: = + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + += vendor/github.com/aws/aws-sdk-go/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 - +================================================================================ + + ================================================================================ = vendor/github.com/aws/aws-sdk-go/aws/defaults licensed under: = @@ -3674,6 +4122,216 @@ SOFTWARE. ================================================================================ +================================================================================ += vendor/github.com/aws/aws-sdk-go/aws/endpoints licensed under: = + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + += vendor/github.com/aws/aws-sdk-go/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 - +================================================================================ + + ================================================================================ = vendor/github.com/aws/aws-sdk-go/aws/request licensed under: = @@ -4095,7 +4753,217 @@ SOFTWARE. ================================================================================ -= vendor/github.com/aws/aws-sdk-go/private/endpoints licensed under: = += vendor/github.com/aws/aws-sdk-go/aws/signer/v4 licensed under: = + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + += vendor/github.com/aws/aws-sdk-go/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 - +================================================================================ + + +================================================================================ += vendor/github.com/aws/aws-sdk-go/private/protocol licensed under: = Apache License @@ -5984,216 +6852,6 @@ SOFTWARE. ================================================================================ -================================================================================ -= vendor/github.com/aws/aws-sdk-go/private/signer/v4 licensed under: = - - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - -= vendor/github.com/aws/aws-sdk-go/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 - -================================================================================ - - ================================================================================ = vendor/github.com/aws/aws-sdk-go/private/waiter licensed under: = @@ -7454,6 +8112,216 @@ SOFTWARE. ================================================================================ +================================================================================ += vendor/github.com/aws/aws-sdk-go/service/sts licensed under: = + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + += vendor/github.com/aws/aws-sdk-go/LICENSE.txt 3b83ef96387f14655fc854ddc3c6bd57 - +================================================================================ + + ================================================================================ = vendor/github.com/Azure/azure-sdk-for-go/arm/compute licensed under: = diff --git a/vendor/k8s.io/kubernetes/Makefile b/vendor/k8s.io/kubernetes/Makefile index b3c688ac..36ff991e 100644 --- a/vendor/k8s.io/kubernetes/Makefile +++ b/vendor/k8s.io/kubernetes/Makefile @@ -470,7 +470,7 @@ help: endif # Non-dockerized bazel rules. -.PHONY: bazel-build bazel-test +.PHONY: bazel-build bazel-test bazel-release ifeq ($(PRINT_HELP),y) define BAZEL_BUILD_HELP_INFO @@ -498,5 +498,19 @@ endef @echo "$$BAZEL_TEST_HELP_INFO" else bazel-test: - bazel test --test_output=errors //cmd/... //pkg/... //federation/... //plugin/... //build/... //third_party/... //hack/... + bazel test //cmd/... //pkg/... //federation/... //plugin/... //build/... //third_party/... //hack/... //hack:verify-all +endif + +ifeq ($(PRINT_HELP),y) +define BAZEL_BUILD_HELP_INFO +# Build release tars with bazel +# +# Example: +# make bazel-release +endef +bazel-release: + @echo "$$BAZEL_BUILD_HELP_INFO" +else +bazel-release: + bazel build //build/release-tars endif diff --git a/vendor/k8s.io/kubernetes/OWNERS b/vendor/k8s.io/kubernetes/OWNERS index 1a0bc5a8..0d5bc3b3 100644 --- a/vendor/k8s.io/kubernetes/OWNERS +++ b/vendor/k8s.io/kubernetes/OWNERS @@ -1,4 +1,11 @@ -assignees: +reviewers: + - brendandburns + - dchen1107 + - jbeda + - lavalamp + - smarterclayton + - thockin +approvers: - bgrant0607 - brendandburns - dchen1107 diff --git a/vendor/k8s.io/kubernetes/OWNERS_ALIASES b/vendor/k8s.io/kubernetes/OWNERS_ALIASES index 2cf0e5d9..7c810435 100644 --- a/vendor/k8s.io/kubernetes/OWNERS_ALIASES +++ b/vendor/k8s.io/kubernetes/OWNERS_ALIASES @@ -29,3 +29,21 @@ aliases: - ixdy - rmmh - spxtr + sig-node-reviewers: + - Random-Liu + - dashpole + - dchen1107 + - derekwaynecarr + - dims + - euank + - feiskyer + - mtaufen + - ncdc + - pmorie + - resouer + - sjpotter + - timstclair + - tmrts + - vishh + - yifan-gu + - yujuhong diff --git a/vendor/k8s.io/kubernetes/WORKSPACE b/vendor/k8s.io/kubernetes/WORKSPACE index b370d6f8..27391cc5 100644 --- a/vendor/k8s.io/kubernetes/WORKSPACE +++ b/vendor/k8s.io/kubernetes/WORKSPACE @@ -10,6 +10,12 @@ git_repository( remote = "https://github.com/kubernetes/release.git", ) +git_repository( + name = "io_bazel", + commit = "3b29803eb528ff525c7024190ffbf4b08c598cf2", + remote = "https://github.com/ixdy/bazel.git", +) + load("@io_bazel_rules_go//go:def.bzl", "go_repositories") go_repositories() @@ -23,8 +29,8 @@ debs = ( ), ( "libc_deb", - "ee4d9dea08728e2c2bbf43d819c3c7e61798245fab4b983ae910865980f791ad", - "http://ftp.us.debian.org/debian/pool/main/g/glibc/libc6_2.19-18+deb8u6_amd64.deb", + "6bbd506b171a9f29b09fde77e2749c0aa0c1439058df9d1a6408d464069b7dd6", + "http://ftp.us.debian.org/debian/pool/main/g/glibc/libc6_2.24-9_amd64.deb", ), ( "iptables_deb", diff --git a/vendor/k8s.io/kubernetes/api/openapi-spec/swagger.json b/vendor/k8s.io/kubernetes/api/openapi-spec/swagger.json index c51f7d33..078c5486 100644 --- a/vendor/k8s.io/kubernetes/api/openapi-spec/swagger.json +++ b/vendor/k8s.io/kubernetes/api/openapi-spec/swagger.json @@ -20389,7 +20389,7 @@ } } }, - "/apis/certificates.k8s.io/v1alpha1/": { + "/apis/certificates.k8s.io/v1beta1/": { "get": { "description": "get available resources", "consumes": [ @@ -20406,9 +20406,9 @@ "https" ], "tags": [ - "certificates_v1alpha1" + "certificates_v1beta1" ], - "operationId": "getCertificatesV1alpha1APIResources", + "operationId": "getCertificatesV1beta1APIResources", "responses": { "200": { "description": "OK", @@ -20422,7 +20422,7 @@ } } }, - "/apis/certificates.k8s.io/v1alpha1/certificatesigningrequests": { + "/apis/certificates.k8s.io/v1beta1/certificatesigningrequests": { "get": { "description": "list or watch objects of kind CertificateSigningRequest", "consumes": [ @@ -20439,9 +20439,9 @@ "https" ], "tags": [ - "certificates_v1alpha1" + "certificates_v1beta1" ], - "operationId": "listCertificatesV1alpha1CertificateSigningRequest", + "operationId": "listCertificatesV1beta1CertificateSigningRequest", "parameters": [ { "uniqueItems": true, @@ -20483,7 +20483,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1.CertificateSigningRequestList" + "$ref": "#/definitions/v1beta1.CertificateSigningRequestList" } }, "401": { @@ -20505,16 +20505,16 @@ "https" ], "tags": [ - "certificates_v1alpha1" + "certificates_v1beta1" ], - "operationId": "createCertificatesV1alpha1CertificateSigningRequest", + "operationId": "createCertificatesV1beta1CertificateSigningRequest", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1alpha1.CertificateSigningRequest" + "$ref": "#/definitions/v1beta1.CertificateSigningRequest" } } ], @@ -20522,7 +20522,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1.CertificateSigningRequest" + "$ref": "#/definitions/v1beta1.CertificateSigningRequest" } }, "401": { @@ -20544,9 +20544,9 @@ "https" ], "tags": [ - "certificates_v1alpha1" + "certificates_v1beta1" ], - "operationId": "deleteCertificatesV1alpha1CollectionCertificateSigningRequest", + "operationId": "deleteCertificatesV1beta1CollectionCertificateSigningRequest", "parameters": [ { "uniqueItems": true, @@ -20606,7 +20606,7 @@ } ] }, - "/apis/certificates.k8s.io/v1alpha1/certificatesigningrequests/{name}": { + "/apis/certificates.k8s.io/v1beta1/certificatesigningrequests/{name}": { "get": { "description": "read the specified CertificateSigningRequest", "consumes": [ @@ -20621,9 +20621,9 @@ "https" ], "tags": [ - "certificates_v1alpha1" + "certificates_v1beta1" ], - "operationId": "readCertificatesV1alpha1CertificateSigningRequest", + "operationId": "readCertificatesV1beta1CertificateSigningRequest", "parameters": [ { "uniqueItems": true, @@ -20644,7 +20644,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1.CertificateSigningRequest" + "$ref": "#/definitions/v1beta1.CertificateSigningRequest" } }, "401": { @@ -20666,16 +20666,16 @@ "https" ], "tags": [ - "certificates_v1alpha1" + "certificates_v1beta1" ], - "operationId": "replaceCertificatesV1alpha1CertificateSigningRequest", + "operationId": "replaceCertificatesV1beta1CertificateSigningRequest", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1alpha1.CertificateSigningRequest" + "$ref": "#/definitions/v1beta1.CertificateSigningRequest" } } ], @@ -20683,7 +20683,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1.CertificateSigningRequest" + "$ref": "#/definitions/v1beta1.CertificateSigningRequest" } }, "401": { @@ -20705,9 +20705,9 @@ "https" ], "tags": [ - "certificates_v1alpha1" + "certificates_v1beta1" ], - "operationId": "deleteCertificatesV1alpha1CertificateSigningRequest", + "operationId": "deleteCertificatesV1beta1CertificateSigningRequest", "parameters": [ { "name": "body", @@ -20760,9 +20760,9 @@ "https" ], "tags": [ - "certificates_v1alpha1" + "certificates_v1beta1" ], - "operationId": "patchCertificatesV1alpha1CertificateSigningRequest", + "operationId": "patchCertificatesV1beta1CertificateSigningRequest", "parameters": [ { "name": "body", @@ -20777,7 +20777,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1.CertificateSigningRequest" + "$ref": "#/definitions/v1beta1.CertificateSigningRequest" } }, "401": { @@ -20803,7 +20803,7 @@ } ] }, - "/apis/certificates.k8s.io/v1alpha1/certificatesigningrequests/{name}/approval": { + "/apis/certificates.k8s.io/v1beta1/certificatesigningrequests/{name}/approval": { "put": { "description": "replace approval of the specified CertificateSigningRequest", "consumes": [ @@ -20818,14 +20818,14 @@ "https" ], "tags": [ - "certificates_v1alpha1" + "certificates_v1beta1" ], - "operationId": "replaceCertificatesV1alpha1CertificateSigningRequestApproval", + "operationId": "replaceCertificatesV1beta1CertificateSigningRequestApproval", "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1.CertificateSigningRequest" + "$ref": "#/definitions/v1beta1.CertificateSigningRequest" } }, "401": { @@ -20839,7 +20839,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1alpha1.CertificateSigningRequest" + "$ref": "#/definitions/v1beta1.CertificateSigningRequest" } }, { @@ -20859,7 +20859,7 @@ } ] }, - "/apis/certificates.k8s.io/v1alpha1/certificatesigningrequests/{name}/status": { + "/apis/certificates.k8s.io/v1beta1/certificatesigningrequests/{name}/status": { "put": { "description": "replace status of the specified CertificateSigningRequest", "consumes": [ @@ -20874,14 +20874,14 @@ "https" ], "tags": [ - "certificates_v1alpha1" + "certificates_v1beta1" ], - "operationId": "replaceCertificatesV1alpha1CertificateSigningRequestStatus", + "operationId": "replaceCertificatesV1beta1CertificateSigningRequestStatus", "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1.CertificateSigningRequest" + "$ref": "#/definitions/v1beta1.CertificateSigningRequest" } }, "401": { @@ -20895,7 +20895,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1alpha1.CertificateSigningRequest" + "$ref": "#/definitions/v1beta1.CertificateSigningRequest" } }, { @@ -20915,7 +20915,7 @@ } ] }, - "/apis/certificates.k8s.io/v1alpha1/watch/certificatesigningrequests": { + "/apis/certificates.k8s.io/v1beta1/watch/certificatesigningrequests": { "get": { "description": "watch individual changes to a list of CertificateSigningRequest", "consumes": [ @@ -20932,9 +20932,9 @@ "https" ], "tags": [ - "certificates_v1alpha1" + "certificates_v1beta1" ], - "operationId": "watchCertificatesV1alpha1CertificateSigningRequestList", + "operationId": "watchCertificatesV1beta1CertificateSigningRequestList", "responses": { "200": { "description": "OK", @@ -20992,7 +20992,7 @@ } ] }, - "/apis/certificates.k8s.io/v1alpha1/watch/certificatesigningrequests/{name}": { + "/apis/certificates.k8s.io/v1beta1/watch/certificatesigningrequests/{name}": { "get": { "description": "watch changes to an object of kind CertificateSigningRequest", "consumes": [ @@ -21009,9 +21009,9 @@ "https" ], "tags": [ - "certificates_v1alpha1" + "certificates_v1beta1" ], - "operationId": "watchCertificatesV1alpha1CertificateSigningRequest", + "operationId": "watchCertificatesV1beta1CertificateSigningRequest", "responses": { "200": { "description": "OK", @@ -31232,6 +31232,2519 @@ } ] }, + "/apis/rbac.authorization.k8s.io/v1beta1/": { + "get": { + "description": "get available resources", + "consumes": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "getRbacAuthorizationV1beta1APIResources", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.APIResourceList" + } + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/apis/rbac.authorization.k8s.io/v1beta1/clusterrolebindings": { + "get": { + "description": "list or watch objects of kind ClusterRoleBinding", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "listRbacAuthorizationV1beta1ClusterRoleBinding", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.ClusterRoleBindingList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "post": { + "description": "create a ClusterRoleBinding", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "createRbacAuthorizationV1beta1ClusterRoleBinding", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1.ClusterRoleBinding" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.ClusterRoleBinding" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete collection of ClusterRoleBinding", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "deleteRbacAuthorizationV1beta1CollectionClusterRoleBinding", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1beta1/clusterrolebindings/{name}": { + "get": { + "description": "read the specified ClusterRoleBinding", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "readRbacAuthorizationV1beta1ClusterRoleBinding", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.ClusterRoleBinding" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace the specified ClusterRoleBinding", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "replaceRbacAuthorizationV1beta1ClusterRoleBinding", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1.ClusterRoleBinding" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.ClusterRoleBinding" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete a ClusterRoleBinding", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "deleteRbacAuthorizationV1beta1ClusterRoleBinding", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.DeleteOptions" + } + }, + { + "uniqueItems": true, + "type": "integer", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "name": "gracePeriodSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "name": "orphanDependents", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update the specified ClusterRoleBinding", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "patchRbacAuthorizationV1beta1ClusterRoleBinding", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.Patch" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.ClusterRoleBinding" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the ClusterRoleBinding", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1beta1/clusterroles": { + "get": { + "description": "list or watch objects of kind ClusterRole", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "listRbacAuthorizationV1beta1ClusterRole", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.ClusterRoleList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "post": { + "description": "create a ClusterRole", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "createRbacAuthorizationV1beta1ClusterRole", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1.ClusterRole" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.ClusterRole" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete collection of ClusterRole", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "deleteRbacAuthorizationV1beta1CollectionClusterRole", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1beta1/clusterroles/{name}": { + "get": { + "description": "read the specified ClusterRole", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "readRbacAuthorizationV1beta1ClusterRole", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.ClusterRole" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace the specified ClusterRole", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "replaceRbacAuthorizationV1beta1ClusterRole", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1.ClusterRole" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.ClusterRole" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete a ClusterRole", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "deleteRbacAuthorizationV1beta1ClusterRole", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.DeleteOptions" + } + }, + { + "uniqueItems": true, + "type": "integer", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "name": "gracePeriodSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "name": "orphanDependents", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update the specified ClusterRole", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "patchRbacAuthorizationV1beta1ClusterRole", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.Patch" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.ClusterRole" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the ClusterRole", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/rolebindings": { + "get": { + "description": "list or watch objects of kind RoleBinding", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "listRbacAuthorizationV1beta1NamespacedRoleBinding", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.RoleBindingList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "post": { + "description": "create a RoleBinding", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "createRbacAuthorizationV1beta1NamespacedRoleBinding", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1.RoleBinding" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.RoleBinding" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete collection of RoleBinding", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "deleteRbacAuthorizationV1beta1CollectionNamespacedRoleBinding", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/rolebindings/{name}": { + "get": { + "description": "read the specified RoleBinding", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "readRbacAuthorizationV1beta1NamespacedRoleBinding", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.RoleBinding" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace the specified RoleBinding", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "replaceRbacAuthorizationV1beta1NamespacedRoleBinding", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1.RoleBinding" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.RoleBinding" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete a RoleBinding", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "deleteRbacAuthorizationV1beta1NamespacedRoleBinding", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.DeleteOptions" + } + }, + { + "uniqueItems": true, + "type": "integer", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "name": "gracePeriodSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "name": "orphanDependents", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update the specified RoleBinding", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "patchRbacAuthorizationV1beta1NamespacedRoleBinding", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.Patch" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.RoleBinding" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the RoleBinding", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/roles": { + "get": { + "description": "list or watch objects of kind Role", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "listRbacAuthorizationV1beta1NamespacedRole", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.RoleList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "post": { + "description": "create a Role", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "createRbacAuthorizationV1beta1NamespacedRole", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1.Role" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.Role" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete collection of Role", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "deleteRbacAuthorizationV1beta1CollectionNamespacedRole", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/roles/{name}": { + "get": { + "description": "read the specified Role", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "readRbacAuthorizationV1beta1NamespacedRole", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.Role" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace the specified Role", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "replaceRbacAuthorizationV1beta1NamespacedRole", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1.Role" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.Role" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete a Role", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "deleteRbacAuthorizationV1beta1NamespacedRole", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.DeleteOptions" + } + }, + { + "uniqueItems": true, + "type": "integer", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "name": "gracePeriodSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "name": "orphanDependents", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update the specified Role", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "patchRbacAuthorizationV1beta1NamespacedRole", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.Patch" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.Role" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the Role", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1beta1/rolebindings": { + "get": { + "description": "list or watch objects of kind RoleBinding", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "listRbacAuthorizationV1beta1RoleBindingForAllNamespaces", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.RoleBindingList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1beta1/roles": { + "get": { + "description": "list or watch objects of kind Role", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "listRbacAuthorizationV1beta1RoleForAllNamespaces", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.RoleList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1beta1/watch/clusterrolebindings": { + "get": { + "description": "watch individual changes to a list of ClusterRoleBinding", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "watchRbacAuthorizationV1beta1ClusterRoleBindingList", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.WatchEvent" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1beta1/watch/clusterrolebindings/{name}": { + "get": { + "description": "watch changes to an object of kind ClusterRoleBinding", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "watchRbacAuthorizationV1beta1ClusterRoleBinding", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.WatchEvent" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "name of the ClusterRoleBinding", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1beta1/watch/clusterroles": { + "get": { + "description": "watch individual changes to a list of ClusterRole", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "watchRbacAuthorizationV1beta1ClusterRoleList", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.WatchEvent" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1beta1/watch/clusterroles/{name}": { + "get": { + "description": "watch changes to an object of kind ClusterRole", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "watchRbacAuthorizationV1beta1ClusterRole", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.WatchEvent" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "name of the ClusterRole", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1beta1/watch/namespaces/{namespace}/rolebindings": { + "get": { + "description": "watch individual changes to a list of RoleBinding", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "watchRbacAuthorizationV1beta1NamespacedRoleBindingList", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.WatchEvent" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1beta1/watch/namespaces/{namespace}/rolebindings/{name}": { + "get": { + "description": "watch changes to an object of kind RoleBinding", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "watchRbacAuthorizationV1beta1NamespacedRoleBinding", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.WatchEvent" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "name of the RoleBinding", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1beta1/watch/namespaces/{namespace}/roles": { + "get": { + "description": "watch individual changes to a list of Role", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "watchRbacAuthorizationV1beta1NamespacedRoleList", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.WatchEvent" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1beta1/watch/namespaces/{namespace}/roles/{name}": { + "get": { + "description": "watch changes to an object of kind Role", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "watchRbacAuthorizationV1beta1NamespacedRole", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.WatchEvent" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "name of the Role", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1beta1/watch/rolebindings": { + "get": { + "description": "watch individual changes to a list of RoleBinding", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "watchRbacAuthorizationV1beta1RoleBindingListForAllNamespaces", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.WatchEvent" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1beta1/watch/roles": { + "get": { + "description": "watch individual changes to a list of Role", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "watchRbacAuthorizationV1beta1RoleListForAllNamespaces", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.WatchEvent" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, "/apis/storage.k8s.io/": { "get": { "description": "get information of a group", @@ -32399,6 +34912,10 @@ "name": { "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names", "type": "string" + }, + "optional": { + "description": "Specify whether the ConfigMap must be defined", + "type": "boolean" } } }, @@ -32415,6 +34932,10 @@ "name": { "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names", "type": "string" + }, + "optional": { + "description": "Specify whether the ConfigMap or it's key must be defined", + "type": "boolean" } } }, @@ -32454,7 +34975,7 @@ "format": "int32" }, "items": { - "description": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error. Paths must be relative and may not contain the '..' path or start with '..'.", + "description": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.", "type": "array", "items": { "$ref": "#/definitions/v1.KeyToPath" @@ -32463,6 +34984,10 @@ "name": { "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names", "type": "string" + }, + "optional": { + "description": "Specify whether the ConfigMap or it's keys must be defined", + "type": "boolean" } } }, @@ -32548,7 +35073,11 @@ "type": "boolean" }, "terminationMessagePath": { - "description": "Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated.", + "description": "Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated.", + "type": "string" + }, + "terminationMessagePolicy": { + "description": "Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.", "type": "string" }, "tty": { @@ -32775,7 +35304,7 @@ } }, "v1.DeleteOptions": { - "description": "DeleteOptions may be provided when deleting an API object", + "description": "DeleteOptions may be provided when deleting an API object.", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", @@ -32986,6 +35515,10 @@ "prefix": { "description": "An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.", "type": "string" + }, + "secretRef": { + "description": "The Secret to select from", + "$ref": "#/definitions/v1.SecretEnvSource" } } }, @@ -35021,6 +37554,10 @@ "description": "Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: http://kubernetes.io/docs/user-guide/pod-states#restartpolicy", "type": "string" }, + "schedulername": { + "description": "If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler.", + "type": "string" + }, "securityContext": { "description": "SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field.", "$ref": "#/definitions/v1.PodSecurityContext" @@ -35686,6 +38223,19 @@ } } }, + "v1.SecretEnvSource": { + "description": "SecretEnvSource selects a Secret to populate the environment variables with.\n\nThe contents of the target Secret's Data field will represent the key-value pairs as environment variables.", + "properties": { + "name": { + "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names", + "type": "string" + }, + "optional": { + "description": "Specify whether the Secret must be defined", + "type": "boolean" + } + } + }, "v1.SecretKeySelector": { "description": "SecretKeySelector selects a key of a Secret.", "required": [ @@ -35699,6 +38249,10 @@ "name": { "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names", "type": "string" + }, + "optional": { + "description": "Specify whether the Secret or it's key must be defined", + "type": "boolean" } } }, @@ -35738,12 +38292,16 @@ "format": "int32" }, "items": { - "description": "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error. Paths must be relative and may not contain the '..' path or start with '..'.", + "description": "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.", "type": "array", "items": { "$ref": "#/definitions/v1.KeyToPath" } }, + "optional": { + "description": "Specify whether the Secret or it's keys must be defined", + "type": "boolean" + }, "secretName": { "description": "Name of the secret in the pod's namespace to use. More info: http://kubernetes.io/docs/user-guide/volumes#secrets", "type": "string" @@ -36285,126 +38843,6 @@ } } }, - "v1alpha1.CertificateSigningRequest": { - "description": "Describes a certificate signing request", - "properties": { - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "$ref": "#/definitions/v1.ObjectMeta" - }, - "spec": { - "description": "The certificate request itself and any additional information.", - "$ref": "#/definitions/v1alpha1.CertificateSigningRequestSpec" - }, - "status": { - "description": "Derived information about the request.", - "$ref": "#/definitions/v1alpha1.CertificateSigningRequestStatus" - } - } - }, - "v1alpha1.CertificateSigningRequestCondition": { - "required": [ - "type" - ], - "properties": { - "lastUpdateTime": { - "description": "timestamp for the last update to this condition", - "$ref": "#/definitions/v1.Time" - }, - "message": { - "description": "human readable message with details about the request state", - "type": "string" - }, - "reason": { - "description": "brief reason for the request state", - "type": "string" - }, - "type": { - "description": "request approval state, currently Approved or Denied.", - "type": "string" - } - } - }, - "v1alpha1.CertificateSigningRequestList": { - "required": [ - "items" - ], - "properties": { - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", - "type": "string" - }, - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/v1alpha1.CertificateSigningRequest" - } - }, - "kind": { - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "$ref": "#/definitions/v1.ListMeta" - } - } - }, - "v1alpha1.CertificateSigningRequestSpec": { - "description": "This information is immutable after the request is created. Only the Request and ExtraInfo fields can be set on creation, other fields are derived by Kubernetes and cannot be modified by users.", - "required": [ - "request" - ], - "properties": { - "groups": { - "type": "array", - "items": { - "type": "string" - } - }, - "request": { - "description": "Base64-encoded PKCS#10 CSR data", - "type": "string", - "format": "byte" - }, - "uid": { - "type": "string" - }, - "usages": { - "description": "allowedUsages specifies a set of usage contexts the key will be valid for. See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3\n https://tools.ietf.org/html/rfc5280#section-4.2.1.12", - "type": "array", - "items": { - "type": "string" - } - }, - "username": { - "description": "Information about the requesting user (if relevant) See user.Info interface for details", - "type": "string" - } - } - }, - "v1alpha1.CertificateSigningRequestStatus": { - "properties": { - "certificate": { - "description": "If request was approved, the controller will place the issued certificate here.", - "type": "string", - "format": "byte" - }, - "conditions": { - "description": "Conditions applied to the request, such as approval or denial.", - "type": "array", - "items": { - "$ref": "#/definitions/v1alpha1.CertificateSigningRequestCondition" - } - } - } - }, "v1alpha1.ClusterRole": { "description": "ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.", "required": [ @@ -36531,10 +38969,6 @@ "type": "string" } }, - "attributeRestrictions": { - "description": "AttributeRestrictions will vary depending on what the Authorizer/AuthorizationAttributeBuilder pair supports. If the Authorizer does not recognize how to handle the AttributeRestrictions, the Authorizer should report an error.", - "$ref": "#/definitions/runtime.RawExtension" - }, "nonResourceURLs": { "description": "NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path This name is intentionally different than the internal type so that the DefaultConvert works nicely and because the ordering may be different. Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as \"pods\" or \"secrets\") or non-resource URL paths (such as \"/api\"), but not both.", "type": "array", @@ -36746,6 +39180,239 @@ } } }, + "v1beta1.CertificateSigningRequest": { + "description": "Describes a certificate signing request", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1.ObjectMeta" + }, + "spec": { + "description": "The certificate request itself and any additional information.", + "$ref": "#/definitions/v1beta1.CertificateSigningRequestSpec" + }, + "status": { + "description": "Derived information about the request.", + "$ref": "#/definitions/v1beta1.CertificateSigningRequestStatus" + } + } + }, + "v1beta1.CertificateSigningRequestCondition": { + "required": [ + "type" + ], + "properties": { + "lastUpdateTime": { + "description": "timestamp for the last update to this condition", + "$ref": "#/definitions/v1.Time" + }, + "message": { + "description": "human readable message with details about the request state", + "type": "string" + }, + "reason": { + "description": "brief reason for the request state", + "type": "string" + }, + "type": { + "description": "request approval state, currently Approved or Denied.", + "type": "string" + } + } + }, + "v1beta1.CertificateSigningRequestList": { + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/v1beta1.CertificateSigningRequest" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1.ListMeta" + } + } + }, + "v1beta1.CertificateSigningRequestSpec": { + "description": "This information is immutable after the request is created. Only the Request and ExtraInfo fields can be set on creation, other fields are derived by Kubernetes and cannot be modified by users.", + "required": [ + "request" + ], + "properties": { + "groups": { + "type": "array", + "items": { + "type": "string" + } + }, + "request": { + "description": "Base64-encoded PKCS#10 CSR data", + "type": "string", + "format": "byte" + }, + "uid": { + "type": "string" + }, + "usages": { + "description": "allowedUsages specifies a set of usage contexts the key will be valid for. See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3\n https://tools.ietf.org/html/rfc5280#section-4.2.1.12", + "type": "array", + "items": { + "type": "string" + } + }, + "username": { + "description": "Information about the requesting user (if relevant) See user.Info interface for details", + "type": "string" + } + } + }, + "v1beta1.CertificateSigningRequestStatus": { + "properties": { + "certificate": { + "description": "If request was approved, the controller will place the issued certificate here.", + "type": "string", + "format": "byte" + }, + "conditions": { + "description": "Conditions applied to the request, such as approval or denial.", + "type": "array", + "items": { + "$ref": "#/definitions/v1beta1.CertificateSigningRequestCondition" + } + } + } + }, + "v1beta1.ClusterRole": { + "description": "ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.", + "required": [ + "rules" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata.", + "$ref": "#/definitions/v1.ObjectMeta" + }, + "rules": { + "description": "Rules holds all the PolicyRules for this ClusterRole", + "type": "array", + "items": { + "$ref": "#/definitions/v1beta1.PolicyRule" + } + } + } + }, + "v1beta1.ClusterRoleBinding": { + "description": "ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject.", + "required": [ + "subjects", + "roleRef" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata.", + "$ref": "#/definitions/v1.ObjectMeta" + }, + "roleRef": { + "description": "RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", + "$ref": "#/definitions/v1beta1.RoleRef" + }, + "subjects": { + "description": "Subjects holds references to the objects the role applies to.", + "type": "array", + "items": { + "$ref": "#/definitions/v1beta1.Subject" + } + } + } + }, + "v1beta1.ClusterRoleBindingList": { + "description": "ClusterRoleBindingList is a collection of ClusterRoleBindings", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "Items is a list of ClusterRoleBindings", + "type": "array", + "items": { + "$ref": "#/definitions/v1beta1.ClusterRoleBinding" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata.", + "$ref": "#/definitions/v1.ListMeta" + } + } + }, + "v1beta1.ClusterRoleList": { + "description": "ClusterRoleList is a collection of ClusterRoles", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "Items is a list of ClusterRoles", + "type": "array", + "items": { + "$ref": "#/definitions/v1beta1.ClusterRole" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata.", + "$ref": "#/definitions/v1.ListMeta" + } + } + }, "v1beta1.DaemonSet": { "description": "DaemonSet represents the configuration of a daemon set.", "properties": { @@ -37801,6 +40468,49 @@ } } }, + "v1beta1.PolicyRule": { + "description": "PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.", + "required": [ + "verbs" + ], + "properties": { + "apiGroups": { + "description": "APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed.", + "type": "array", + "items": { + "type": "string" + } + }, + "nonResourceURLs": { + "description": "NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as \"pods\" or \"secrets\") or non-resource URL paths (such as \"/api\"), but not both.", + "type": "array", + "items": { + "type": "string" + } + }, + "resourceNames": { + "description": "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.", + "type": "array", + "items": { + "type": "string" + } + }, + "resources": { + "description": "Resources is a list of resources this rule applies to. ResourceAll represents all resources.", + "type": "array", + "items": { + "type": "string" + } + }, + "verbs": { + "description": "Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, "v1beta1.ReplicaSet": { "description": "ReplicaSet represents the configuration of a ReplicaSet.", "properties": { @@ -37978,6 +40688,141 @@ } } }, + "v1beta1.Role": { + "description": "Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.", + "required": [ + "rules" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata.", + "$ref": "#/definitions/v1.ObjectMeta" + }, + "rules": { + "description": "Rules holds all the PolicyRules for this Role", + "type": "array", + "items": { + "$ref": "#/definitions/v1beta1.PolicyRule" + } + } + } + }, + "v1beta1.RoleBinding": { + "description": "RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace.", + "required": [ + "subjects", + "roleRef" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata.", + "$ref": "#/definitions/v1.ObjectMeta" + }, + "roleRef": { + "description": "RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", + "$ref": "#/definitions/v1beta1.RoleRef" + }, + "subjects": { + "description": "Subjects holds references to the objects the role applies to.", + "type": "array", + "items": { + "$ref": "#/definitions/v1beta1.Subject" + } + } + } + }, + "v1beta1.RoleBindingList": { + "description": "RoleBindingList is a collection of RoleBindings", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "Items is a list of RoleBindings", + "type": "array", + "items": { + "$ref": "#/definitions/v1beta1.RoleBinding" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata.", + "$ref": "#/definitions/v1.ListMeta" + } + } + }, + "v1beta1.RoleList": { + "description": "RoleList is a collection of Roles", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "Items is a list of Roles", + "type": "array", + "items": { + "$ref": "#/definitions/v1beta1.Role" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata.", + "$ref": "#/definitions/v1.ListMeta" + } + } + }, + "v1beta1.RoleRef": { + "description": "RoleRef contains information that points to the role being used", + "required": [ + "apiGroup", + "kind", + "name" + ], + "properties": { + "apiGroup": { + "description": "APIGroup is the group for the resource being referenced", + "type": "string" + }, + "kind": { + "description": "Kind is the type of resource being referenced", + "type": "string" + }, + "name": { + "description": "Name is the name of resource being referenced", + "type": "string" + } + } + }, "v1beta1.RollbackConfig": { "properties": { "revision": { @@ -38292,6 +41137,31 @@ } } }, + "v1beta1.Subject": { + "description": "Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names.", + "required": [ + "kind", + "name" + ], + "properties": { + "apiVersion": { + "description": "APIVersion holds the API group and version of the referenced object.", + "type": "string" + }, + "kind": { + "description": "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\". If the Authorizer does not recognized the kind value, the Authorizer should report an error.", + "type": "string" + }, + "name": { + "description": "Name of the object being referenced.", + "type": "string" + }, + "namespace": { + "description": "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty the Authorizer should report an error.", + "type": "string" + } + } + }, "v1beta1.SubjectAccessReview": { "description": "SubjectAccessReview checks whether or not a user or group can perform an action.", "required": [ diff --git a/vendor/k8s.io/kubernetes/api/swagger-spec/apps_v1beta1.json b/vendor/k8s.io/kubernetes/api/swagger-spec/apps_v1beta1.json index 3f428c03..236cdf61 100644 --- a/vendor/k8s.io/kubernetes/api/swagger-spec/apps_v1beta1.json +++ b/vendor/k8s.io/kubernetes/api/swagger-spec/apps_v1beta1.json @@ -1353,6 +1353,10 @@ "affinity": { "$ref": "v1.Affinity", "description": "If specified, the pod's scheduling constraints" + }, + "schedulername": { + "type": "string", + "description": "If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler." } } }, @@ -1570,12 +1574,16 @@ "items": { "$ref": "v1.KeyToPath" }, - "description": "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error. Paths must be relative and may not contain the '..' path or start with '..'." + "description": "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'." }, "defaultMode": { "type": "integer", "format": "int32", "description": "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the Secret or it's keys must be defined" } } }, @@ -2001,12 +2009,16 @@ "items": { "$ref": "v1.KeyToPath" }, - "description": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error. Paths must be relative and may not contain the '..' path or start with '..'." + "description": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'." }, "defaultMode": { "type": "integer", "format": "int32", "description": "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the ConfigMap or it's keys must be defined" } } }, @@ -2187,7 +2199,11 @@ }, "terminationMessagePath": { "type": "string", - "description": "Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated." + "description": "Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated." + }, + "terminationMessagePolicy": { + "type": "string", + "description": "Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated." }, "imagePullPolicy": { "type": "string", @@ -2253,6 +2269,10 @@ "configMapRef": { "$ref": "v1.ConfigMapEnvSource", "description": "The ConfigMap to select from" + }, + "secretRef": { + "$ref": "v1.SecretEnvSource", + "description": "The Secret to select from" } } }, @@ -2263,6 +2283,24 @@ "name": { "type": "string", "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names" + }, + "optional": { + "type": "boolean", + "description": "Specify whether the ConfigMap must be defined" + } + } + }, + "v1.SecretEnvSource": { + "id": "v1.SecretEnvSource", + "description": "SecretEnvSource selects a Secret to populate the environment variables with.\n\nThe contents of the target Secret's Data field will represent the key-value pairs as environment variables.", + "properties": { + "name": { + "type": "string", + "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names" + }, + "optional": { + "type": "boolean", + "description": "Specify whether the Secret must be defined" } } }, @@ -2323,6 +2361,10 @@ "key": { "type": "string", "description": "The key to select." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the ConfigMap or it's key must be defined" } } }, @@ -2340,6 +2382,10 @@ "key": { "type": "string", "description": "The key of the secret to select from. Must be a valid secret key." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the Secret or it's key must be defined" } } }, @@ -3040,7 +3086,7 @@ }, "v1.DeleteOptions": { "id": "v1.DeleteOptions", - "description": "DeleteOptions may be provided when deleting an API object", + "description": "DeleteOptions may be provided when deleting an API object.", "properties": { "kind": { "type": "string", diff --git a/vendor/k8s.io/kubernetes/api/swagger-spec/autoscaling_v1.json b/vendor/k8s.io/kubernetes/api/swagger-spec/autoscaling_v1.json index a099dced..8fa496ad 100644 --- a/vendor/k8s.io/kubernetes/api/swagger-spec/autoscaling_v1.json +++ b/vendor/k8s.io/kubernetes/api/swagger-spec/autoscaling_v1.json @@ -1371,7 +1371,7 @@ }, "v1.DeleteOptions": { "id": "v1.DeleteOptions", - "description": "DeleteOptions may be provided when deleting an API object", + "description": "DeleteOptions may be provided when deleting an API object.", "properties": { "kind": { "type": "string", diff --git a/vendor/k8s.io/kubernetes/api/swagger-spec/batch_v1.json b/vendor/k8s.io/kubernetes/api/swagger-spec/batch_v1.json index a88f41ce..4f06bb88 100644 --- a/vendor/k8s.io/kubernetes/api/swagger-spec/batch_v1.json +++ b/vendor/k8s.io/kubernetes/api/swagger-spec/batch_v1.json @@ -1358,6 +1358,10 @@ "affinity": { "$ref": "v1.Affinity", "description": "If specified, the pod's scheduling constraints" + }, + "schedulername": { + "type": "string", + "description": "If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler." } } }, @@ -1575,12 +1579,16 @@ "items": { "$ref": "v1.KeyToPath" }, - "description": "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error. Paths must be relative and may not contain the '..' path or start with '..'." + "description": "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'." }, "defaultMode": { "type": "integer", "format": "int32", "description": "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the Secret or it's keys must be defined" } } }, @@ -2006,12 +2014,16 @@ "items": { "$ref": "v1.KeyToPath" }, - "description": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error. Paths must be relative and may not contain the '..' path or start with '..'." + "description": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'." }, "defaultMode": { "type": "integer", "format": "int32", "description": "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the ConfigMap or it's keys must be defined" } } }, @@ -2192,7 +2204,11 @@ }, "terminationMessagePath": { "type": "string", - "description": "Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated." + "description": "Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated." + }, + "terminationMessagePolicy": { + "type": "string", + "description": "Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated." }, "imagePullPolicy": { "type": "string", @@ -2258,6 +2274,10 @@ "configMapRef": { "$ref": "v1.ConfigMapEnvSource", "description": "The ConfigMap to select from" + }, + "secretRef": { + "$ref": "v1.SecretEnvSource", + "description": "The Secret to select from" } } }, @@ -2268,6 +2288,24 @@ "name": { "type": "string", "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names" + }, + "optional": { + "type": "boolean", + "description": "Specify whether the ConfigMap must be defined" + } + } + }, + "v1.SecretEnvSource": { + "id": "v1.SecretEnvSource", + "description": "SecretEnvSource selects a Secret to populate the environment variables with.\n\nThe contents of the target Secret's Data field will represent the key-value pairs as environment variables.", + "properties": { + "name": { + "type": "string", + "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names" + }, + "optional": { + "type": "boolean", + "description": "Specify whether the Secret must be defined" } } }, @@ -2328,6 +2366,10 @@ "key": { "type": "string", "description": "The key to select." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the ConfigMap or it's key must be defined" } } }, @@ -2345,6 +2387,10 @@ "key": { "type": "string", "description": "The key of the secret to select from. Must be a valid secret key." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the Secret or it's key must be defined" } } }, @@ -3020,7 +3066,7 @@ }, "v1.DeleteOptions": { "id": "v1.DeleteOptions", - "description": "DeleteOptions may be provided when deleting an API object", + "description": "DeleteOptions may be provided when deleting an API object.", "properties": { "kind": { "type": "string", diff --git a/vendor/k8s.io/kubernetes/api/swagger-spec/certificates.k8s.io_v1beta1.json b/vendor/k8s.io/kubernetes/api/swagger-spec/certificates.k8s.io_v1beta1.json new file mode 100644 index 00000000..55a8cab6 --- /dev/null +++ b/vendor/k8s.io/kubernetes/api/swagger-spec/certificates.k8s.io_v1beta1.json @@ -0,0 +1,1173 @@ +{ + "swaggerVersion": "1.2", + "apiVersion": "certificates.k8s.io/v1beta1", + "basePath": "https://10.10.10.10:6443", + "resourcePath": "/apis/certificates.k8s.io/v1beta1", + "info": { + "title": "", + "description": "" + }, + "apis": [ + { + "path": "/apis/certificates.k8s.io/v1beta1/certificatesigningrequests", + "description": "API at /apis/certificates.k8s.io/v1beta1", + "operations": [ + { + "type": "v1beta1.CertificateSigningRequestList", + "method": "GET", + "summary": "list or watch objects of kind CertificateSigningRequest", + "nickname": "listCertificateSigningRequest", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "labelSelector", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "fieldSelector", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "boolean", + "paramType": "query", + "name": "watch", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "resourceVersion", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "required": false, + "allowMultiple": false + }, + { + "type": "integer", + "paramType": "query", + "name": "timeoutSeconds", + "description": "Timeout for the list/watch call.", + "required": false, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1beta1.CertificateSigningRequestList" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "consumes": [ + "*/*" + ] + }, + { + "type": "v1beta1.CertificateSigningRequest", + "method": "POST", + "summary": "create a CertificateSigningRequest", + "nickname": "createCertificateSigningRequest", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "v1beta1.CertificateSigningRequest", + "paramType": "body", + "name": "body", + "description": "", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1beta1.CertificateSigningRequest" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "*/*" + ] + }, + { + "type": "v1.Status", + "method": "DELETE", + "summary": "delete collection of CertificateSigningRequest", + "nickname": "deletecollectionCertificateSigningRequest", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "labelSelector", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "fieldSelector", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "boolean", + "paramType": "query", + "name": "watch", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "resourceVersion", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "required": false, + "allowMultiple": false + }, + { + "type": "integer", + "paramType": "query", + "name": "timeoutSeconds", + "description": "Timeout for the list/watch call.", + "required": false, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1.Status" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "*/*" + ] + } + ] + }, + { + "path": "/apis/certificates.k8s.io/v1beta1/watch/certificatesigningrequests", + "description": "API at /apis/certificates.k8s.io/v1beta1", + "operations": [ + { + "type": "v1.WatchEvent", + "method": "GET", + "summary": "watch individual changes to a list of CertificateSigningRequest", + "nickname": "watchCertificateSigningRequestList", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "labelSelector", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "fieldSelector", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "boolean", + "paramType": "query", + "name": "watch", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "resourceVersion", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "required": false, + "allowMultiple": false + }, + { + "type": "integer", + "paramType": "query", + "name": "timeoutSeconds", + "description": "Timeout for the list/watch call.", + "required": false, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1.WatchEvent" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "consumes": [ + "*/*" + ] + } + ] + }, + { + "path": "/apis/certificates.k8s.io/v1beta1/certificatesigningrequests/{name}", + "description": "API at /apis/certificates.k8s.io/v1beta1", + "operations": [ + { + "type": "v1beta1.CertificateSigningRequest", + "method": "GET", + "summary": "read the specified CertificateSigningRequest", + "nickname": "readCertificateSigningRequest", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "boolean", + "paramType": "query", + "name": "export", + "description": "Should this value be exported. Export strips fields that a user can not specify.", + "required": false, + "allowMultiple": false + }, + { + "type": "boolean", + "paramType": "query", + "name": "exact", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the CertificateSigningRequest", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1beta1.CertificateSigningRequest" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "*/*" + ] + }, + { + "type": "v1beta1.CertificateSigningRequest", + "method": "PUT", + "summary": "replace the specified CertificateSigningRequest", + "nickname": "replaceCertificateSigningRequest", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "v1beta1.CertificateSigningRequest", + "paramType": "body", + "name": "body", + "description": "", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the CertificateSigningRequest", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1beta1.CertificateSigningRequest" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "*/*" + ] + }, + { + "type": "v1beta1.CertificateSigningRequest", + "method": "PATCH", + "summary": "partially update the specified CertificateSigningRequest", + "nickname": "patchCertificateSigningRequest", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "v1.Patch", + "paramType": "body", + "name": "body", + "description": "", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the CertificateSigningRequest", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1beta1.CertificateSigningRequest" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ] + }, + { + "type": "v1.Status", + "method": "DELETE", + "summary": "delete a CertificateSigningRequest", + "nickname": "deleteCertificateSigningRequest", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "v1.DeleteOptions", + "paramType": "body", + "name": "body", + "description": "", + "required": true, + "allowMultiple": false + }, + { + "type": "integer", + "paramType": "query", + "name": "gracePeriodSeconds", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "required": false, + "allowMultiple": false + }, + { + "type": "boolean", + "paramType": "query", + "name": "orphanDependents", + "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the CertificateSigningRequest", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1.Status" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "*/*" + ] + } + ] + }, + { + "path": "/apis/certificates.k8s.io/v1beta1/watch/certificatesigningrequests/{name}", + "description": "API at /apis/certificates.k8s.io/v1beta1", + "operations": [ + { + "type": "v1.WatchEvent", + "method": "GET", + "summary": "watch changes to an object of kind CertificateSigningRequest", + "nickname": "watchCertificateSigningRequest", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "labelSelector", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "fieldSelector", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "boolean", + "paramType": "query", + "name": "watch", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "resourceVersion", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "required": false, + "allowMultiple": false + }, + { + "type": "integer", + "paramType": "query", + "name": "timeoutSeconds", + "description": "Timeout for the list/watch call.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the CertificateSigningRequest", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1.WatchEvent" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "consumes": [ + "*/*" + ] + } + ] + }, + { + "path": "/apis/certificates.k8s.io/v1beta1/certificatesigningrequests/{name}/approval", + "description": "API at /apis/certificates.k8s.io/v1beta1", + "operations": [ + { + "type": "v1beta1.CertificateSigningRequest", + "method": "PUT", + "summary": "replace approval of the specified CertificateSigningRequest", + "nickname": "replaceCertificateSigningRequestApproval", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "v1beta1.CertificateSigningRequest", + "paramType": "body", + "name": "body", + "description": "", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the CertificateSigningRequest", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1beta1.CertificateSigningRequest" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "*/*" + ] + } + ] + }, + { + "path": "/apis/certificates.k8s.io/v1beta1/certificatesigningrequests/{name}/status", + "description": "API at /apis/certificates.k8s.io/v1beta1", + "operations": [ + { + "type": "v1beta1.CertificateSigningRequest", + "method": "PUT", + "summary": "replace status of the specified CertificateSigningRequest", + "nickname": "replaceCertificateSigningRequestStatus", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "v1beta1.CertificateSigningRequest", + "paramType": "body", + "name": "body", + "description": "", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the CertificateSigningRequest", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1beta1.CertificateSigningRequest" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "*/*" + ] + } + ] + }, + { + "path": "/apis/certificates.k8s.io/v1beta1", + "description": "API at /apis/certificates.k8s.io/v1beta1", + "operations": [ + { + "type": "v1.APIResourceList", + "method": "GET", + "summary": "get available resources", + "nickname": "getAPIResources", + "parameters": [], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ] + } + ] + } + ], + "models": { + "v1beta1.CertificateSigningRequestList": { + "id": "v1beta1.CertificateSigningRequestList", + "required": [ + "items" + ], + "properties": { + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" + }, + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" + }, + "metadata": { + "$ref": "v1.ListMeta" + }, + "items": { + "type": "array", + "items": { + "$ref": "v1beta1.CertificateSigningRequest" + } + } + } + }, + "v1.ListMeta": { + "id": "v1.ListMeta", + "description": "ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.", + "properties": { + "selfLink": { + "type": "string", + "description": "SelfLink is a URL representing this object. Populated by the system. Read-only." + }, + "resourceVersion": { + "type": "string", + "description": "String that identifies the server's internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency" + } + } + }, + "v1beta1.CertificateSigningRequest": { + "id": "v1beta1.CertificateSigningRequest", + "description": "Describes a certificate signing request", + "properties": { + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" + }, + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" + }, + "metadata": { + "$ref": "v1.ObjectMeta" + }, + "spec": { + "$ref": "v1beta1.CertificateSigningRequestSpec", + "description": "The certificate request itself and any additional information." + }, + "status": { + "$ref": "v1beta1.CertificateSigningRequestStatus", + "description": "Derived information about the request." + } + } + }, + "v1.ObjectMeta": { + "id": "v1.ObjectMeta", + "description": "ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.", + "properties": { + "name": { + "type": "string", + "description": "Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names" + }, + "generateName": { + "type": "string", + "description": "GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.\n\nIf this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).\n\nApplied only if Name is not specified. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#idempotency" + }, + "namespace": { + "type": "string", + "description": "Namespace defines the space within each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.\n\nMust be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces" + }, + "selfLink": { + "type": "string", + "description": "SelfLink is a URL representing this object. Populated by the system. Read-only." + }, + "uid": { + "type": "string", + "description": "UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.\n\nPopulated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids" + }, + "resourceVersion": { + "type": "string", + "description": "An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.\n\nPopulated by the system. Read-only. Value must be treated as opaque by clients and . More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency" + }, + "generation": { + "type": "integer", + "format": "int64", + "description": "A sequence number representing a specific generation of the desired state. Populated by the system. Read-only." + }, + "creationTimestamp": { + "type": "string", + "description": "CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system. Read-only. Null for lists. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata" + }, + "deletionTimestamp": { + "type": "string", + "description": "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field. Once set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested. Read-only. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata" + }, + "deletionGracePeriodSeconds": { + "type": "integer", + "format": "int64", + "description": "Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only." + }, + "labels": { + "type": "object", + "description": "Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels" + }, + "annotations": { + "type": "object", + "description": "Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations" + }, + "ownerReferences": { + "type": "array", + "items": { + "$ref": "v1.OwnerReference" + }, + "description": "List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller." + }, + "finalizers": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed." + }, + "clusterName": { + "type": "string", + "description": "The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request." + } + } + }, + "v1.OwnerReference": { + "id": "v1.OwnerReference", + "description": "OwnerReference contains enough information to let you identify an owning object. Currently, an owning object must be in the same namespace, so there is no namespace field.", + "required": [ + "apiVersion", + "kind", + "name", + "uid" + ], + "properties": { + "apiVersion": { + "type": "string", + "description": "API version of the referent." + }, + "kind": { + "type": "string", + "description": "Kind of the referent. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" + }, + "name": { + "type": "string", + "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names" + }, + "uid": { + "type": "string", + "description": "UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids" + }, + "controller": { + "type": "boolean", + "description": "If true, this reference points to the managing controller." + } + } + }, + "v1beta1.CertificateSigningRequestSpec": { + "id": "v1beta1.CertificateSigningRequestSpec", + "description": "This information is immutable after the request is created. Only the Request and ExtraInfo fields can be set on creation, other fields are derived by Kubernetes and cannot be modified by users.", + "required": [ + "request" + ], + "properties": { + "request": { + "type": "string", + "description": "Base64-encoded PKCS#10 CSR data" + }, + "usages": { + "type": "array", + "items": { + "$ref": "v1beta1.KeyUsage" + }, + "description": "allowedUsages specifies a set of usage contexts the key will be valid for. See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3\n https://tools.ietf.org/html/rfc5280#section-4.2.1.12" + }, + "username": { + "type": "string", + "description": "Information about the requesting user (if relevant) See user.Info interface for details" + }, + "uid": { + "type": "string" + }, + "groups": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1beta1.KeyUsage": { + "id": "v1beta1.KeyUsage", + "properties": {} + }, + "v1beta1.CertificateSigningRequestStatus": { + "id": "v1beta1.CertificateSigningRequestStatus", + "properties": { + "conditions": { + "type": "array", + "items": { + "$ref": "v1beta1.CertificateSigningRequestCondition" + }, + "description": "Conditions applied to the request, such as approval or denial." + }, + "certificate": { + "type": "string", + "description": "If request was approved, the controller will place the issued certificate here." + } + } + }, + "v1beta1.CertificateSigningRequestCondition": { + "id": "v1beta1.CertificateSigningRequestCondition", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "description": "request approval state, currently Approved or Denied." + }, + "reason": { + "type": "string", + "description": "brief reason for the request state" + }, + "message": { + "type": "string", + "description": "human readable message with details about the request state" + }, + "lastUpdateTime": { + "type": "string", + "description": "timestamp for the last update to this condition" + } + } + }, + "v1.Status": { + "id": "v1.Status", + "description": "Status is a return value for calls that don't return other objects.", + "properties": { + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" + }, + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" + }, + "metadata": { + "$ref": "v1.ListMeta", + "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" + }, + "status": { + "type": "string", + "description": "Status of the operation. One of: \"Success\" or \"Failure\". More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status" + }, + "message": { + "type": "string", + "description": "A human-readable description of the status of this operation." + }, + "reason": { + "type": "string", + "description": "A machine-readable description of why this operation is in the \"Failure\" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it." + }, + "details": { + "$ref": "v1.StatusDetails", + "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type." + }, + "code": { + "type": "integer", + "format": "int32", + "description": "Suggested HTTP return code for this status, 0 if not set." + } + } + }, + "v1.StatusDetails": { + "id": "v1.StatusDetails", + "description": "StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined.", + "properties": { + "name": { + "type": "string", + "description": "The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described)." + }, + "group": { + "type": "string", + "description": "The group attribute of the resource associated with the status StatusReason." + }, + "kind": { + "type": "string", + "description": "The kind attribute of the resource associated with the status StatusReason. On some operations may differ from the requested resource Kind. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" + }, + "causes": { + "type": "array", + "items": { + "$ref": "v1.StatusCause" + }, + "description": "The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes." + }, + "retryAfterSeconds": { + "type": "integer", + "format": "int32", + "description": "If specified, the time in seconds before the operation should be retried." + } + } + }, + "v1.StatusCause": { + "id": "v1.StatusCause", + "description": "StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.", + "properties": { + "reason": { + "type": "string", + "description": "A machine-readable description of the cause of the error. If this value is empty there is no information available." + }, + "message": { + "type": "string", + "description": "A human-readable description of the cause of the error. This field may be presented as-is to a reader." + }, + "field": { + "type": "string", + "description": "The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. Optional.\n\nExamples:\n \"name\" - the field \"name\" on the current resource\n \"items[0].name\" - the field \"name\" on the first array entry in \"items\"" + } + } + }, + "v1.WatchEvent": { + "id": "v1.WatchEvent", + "required": [ + "type", + "object" + ], + "properties": { + "type": { + "type": "string" + }, + "object": { + "type": "string" + } + } + }, + "v1.Patch": { + "id": "v1.Patch", + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "properties": {} + }, + "v1.DeleteOptions": { + "id": "v1.DeleteOptions", + "description": "DeleteOptions may be provided when deleting an API object.", + "properties": { + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" + }, + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" + }, + "gracePeriodSeconds": { + "type": "integer", + "format": "int64", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately." + }, + "preconditions": { + "$ref": "v1.Preconditions", + "description": "Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned." + }, + "orphanDependents": { + "type": "boolean", + "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list." + } + } + }, + "v1.Preconditions": { + "id": "v1.Preconditions", + "description": "Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.", + "properties": { + "uid": { + "$ref": "types.UID", + "description": "Specifies the target UID." + } + } + }, + "types.UID": { + "id": "types.UID", + "properties": {} + }, + "v1.APIResourceList": { + "id": "v1.APIResourceList", + "description": "APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced.", + "required": [ + "groupVersion", + "resources" + ], + "properties": { + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" + }, + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" + }, + "groupVersion": { + "type": "string", + "description": "groupVersion is the group and version this APIResourceList is for." + }, + "resources": { + "type": "array", + "items": { + "$ref": "v1.APIResource" + }, + "description": "resources contains the name of the resources and if they are namespaced." + } + } + }, + "v1.APIResource": { + "id": "v1.APIResource", + "description": "APIResource specifies the name of a resource and whether it is namespaced.", + "required": [ + "name", + "namespaced", + "kind", + "verbs" + ], + "properties": { + "name": { + "type": "string", + "description": "name is the name of the resource." + }, + "namespaced": { + "type": "boolean", + "description": "namespaced indicates if a resource is namespaced or not." + }, + "kind": { + "type": "string", + "description": "kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo')" + }, + "verbs": { + "type": "array", + "items": { + "type": "string" + }, + "description": "verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy)" + } + } + } + } + } diff --git a/vendor/k8s.io/kubernetes/api/swagger-spec/extensions_v1beta1.json b/vendor/k8s.io/kubernetes/api/swagger-spec/extensions_v1beta1.json index 761ff3c5..427217be 100644 --- a/vendor/k8s.io/kubernetes/api/swagger-spec/extensions_v1beta1.json +++ b/vendor/k8s.io/kubernetes/api/swagger-spec/extensions_v1beta1.json @@ -7730,6 +7730,10 @@ "affinity": { "$ref": "v1.Affinity", "description": "If specified, the pod's scheduling constraints" + }, + "schedulername": { + "type": "string", + "description": "If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler." } } }, @@ -7947,12 +7951,16 @@ "items": { "$ref": "v1.KeyToPath" }, - "description": "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error. Paths must be relative and may not contain the '..' path or start with '..'." + "description": "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'." }, "defaultMode": { "type": "integer", "format": "int32", "description": "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the Secret or it's keys must be defined" } } }, @@ -8378,12 +8386,16 @@ "items": { "$ref": "v1.KeyToPath" }, - "description": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error. Paths must be relative and may not contain the '..' path or start with '..'." + "description": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'." }, "defaultMode": { "type": "integer", "format": "int32", "description": "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the ConfigMap or it's keys must be defined" } } }, @@ -8564,7 +8576,11 @@ }, "terminationMessagePath": { "type": "string", - "description": "Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated." + "description": "Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated." + }, + "terminationMessagePolicy": { + "type": "string", + "description": "Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated." }, "imagePullPolicy": { "type": "string", @@ -8630,6 +8646,10 @@ "configMapRef": { "$ref": "v1.ConfigMapEnvSource", "description": "The ConfigMap to select from" + }, + "secretRef": { + "$ref": "v1.SecretEnvSource", + "description": "The Secret to select from" } } }, @@ -8640,6 +8660,24 @@ "name": { "type": "string", "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names" + }, + "optional": { + "type": "boolean", + "description": "Specify whether the ConfigMap must be defined" + } + } + }, + "v1.SecretEnvSource": { + "id": "v1.SecretEnvSource", + "description": "SecretEnvSource selects a Secret to populate the environment variables with.\n\nThe contents of the target Secret's Data field will represent the key-value pairs as environment variables.", + "properties": { + "name": { + "type": "string", + "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names" + }, + "optional": { + "type": "boolean", + "description": "Specify whether the Secret must be defined" } } }, @@ -8700,6 +8738,10 @@ "key": { "type": "string", "description": "The key to select." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the ConfigMap or it's key must be defined" } } }, @@ -8717,6 +8759,10 @@ "key": { "type": "string", "description": "The key of the secret to select from. Must be a valid secret key." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the Secret or it's key must be defined" } } }, @@ -9359,7 +9405,7 @@ }, "v1.DeleteOptions": { "id": "v1.DeleteOptions", - "description": "DeleteOptions may be provided when deleting an API object", + "description": "DeleteOptions may be provided when deleting an API object.", "properties": { "kind": { "type": "string", diff --git a/vendor/k8s.io/kubernetes/api/swagger-spec/policy_v1beta1.json b/vendor/k8s.io/kubernetes/api/swagger-spec/policy_v1beta1.json index 2ec2acd1..d1411b0e 100644 --- a/vendor/k8s.io/kubernetes/api/swagger-spec/policy_v1beta1.json +++ b/vendor/k8s.io/kubernetes/api/swagger-spec/policy_v1beta1.json @@ -1381,7 +1381,7 @@ }, "v1.DeleteOptions": { "id": "v1.DeleteOptions", - "description": "DeleteOptions may be provided when deleting an API object", + "description": "DeleteOptions may be provided when deleting an API object.", "properties": { "kind": { "type": "string", diff --git a/vendor/k8s.io/kubernetes/api/swagger-spec/rbac.authorization.k8s.io_v1alpha1.json b/vendor/k8s.io/kubernetes/api/swagger-spec/rbac.authorization.k8s.io_v1alpha1.json index b83a9925..fc89ba41 100644 --- a/vendor/k8s.io/kubernetes/api/swagger-spec/rbac.authorization.k8s.io_v1alpha1.json +++ b/vendor/k8s.io/kubernetes/api/swagger-spec/rbac.authorization.k8s.io_v1alpha1.json @@ -3068,7 +3068,7 @@ }, "v1.DeleteOptions": { "id": "v1.DeleteOptions", - "description": "DeleteOptions may be provided when deleting an API object", + "description": "DeleteOptions may be provided when deleting an API object.", "properties": { "kind": { "type": "string", @@ -3177,10 +3177,6 @@ }, "description": "Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds." }, - "attributeRestrictions": { - "type": "string", - "description": "AttributeRestrictions will vary depending on what the Authorizer/AuthorizationAttributeBuilder pair supports. If the Authorizer does not recognize how to handle the AttributeRestrictions, the Authorizer should report an error." - }, "apiGroups": { "type": "array", "items": { diff --git a/vendor/k8s.io/kubernetes/api/swagger-spec/rbac.authorization.k8s.io_v1beta1.json b/vendor/k8s.io/kubernetes/api/swagger-spec/rbac.authorization.k8s.io_v1beta1.json new file mode 100644 index 00000000..915c9f3a --- /dev/null +++ b/vendor/k8s.io/kubernetes/api/swagger-spec/rbac.authorization.k8s.io_v1beta1.json @@ -0,0 +1,3388 @@ +{ + "swaggerVersion": "1.2", + "apiVersion": "rbac.authorization.k8s.io/v1beta1", + "basePath": "https://10.10.10.10:6443", + "resourcePath": "/apis/rbac.authorization.k8s.io/v1beta1", + "info": { + "title": "", + "description": "" + }, + "apis": [ + { + "path": "/apis/rbac.authorization.k8s.io/v1beta1/clusterrolebindings", + "description": "API at /apis/rbac.authorization.k8s.io/v1beta1", + "operations": [ + { + "type": "v1beta1.ClusterRoleBindingList", + "method": "GET", + "summary": "list or watch objects of kind ClusterRoleBinding", + "nickname": "listClusterRoleBinding", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "labelSelector", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "fieldSelector", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "boolean", + "paramType": "query", + "name": "watch", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "resourceVersion", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "required": false, + "allowMultiple": false + }, + { + "type": "integer", + "paramType": "query", + "name": "timeoutSeconds", + "description": "Timeout for the list/watch call.", + "required": false, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1beta1.ClusterRoleBindingList" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "consumes": [ + "*/*" + ] + }, + { + "type": "v1beta1.ClusterRoleBinding", + "method": "POST", + "summary": "create a ClusterRoleBinding", + "nickname": "createClusterRoleBinding", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "v1beta1.ClusterRoleBinding", + "paramType": "body", + "name": "body", + "description": "", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1beta1.ClusterRoleBinding" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "*/*" + ] + }, + { + "type": "v1.Status", + "method": "DELETE", + "summary": "delete collection of ClusterRoleBinding", + "nickname": "deletecollectionClusterRoleBinding", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "labelSelector", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "fieldSelector", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "boolean", + "paramType": "query", + "name": "watch", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "resourceVersion", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "required": false, + "allowMultiple": false + }, + { + "type": "integer", + "paramType": "query", + "name": "timeoutSeconds", + "description": "Timeout for the list/watch call.", + "required": false, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1.Status" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "*/*" + ] + } + ] + }, + { + "path": "/apis/rbac.authorization.k8s.io/v1beta1/watch/clusterrolebindings", + "description": "API at /apis/rbac.authorization.k8s.io/v1beta1", + "operations": [ + { + "type": "v1.WatchEvent", + "method": "GET", + "summary": "watch individual changes to a list of ClusterRoleBinding", + "nickname": "watchClusterRoleBindingList", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "labelSelector", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "fieldSelector", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "boolean", + "paramType": "query", + "name": "watch", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "resourceVersion", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "required": false, + "allowMultiple": false + }, + { + "type": "integer", + "paramType": "query", + "name": "timeoutSeconds", + "description": "Timeout for the list/watch call.", + "required": false, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1.WatchEvent" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "consumes": [ + "*/*" + ] + } + ] + }, + { + "path": "/apis/rbac.authorization.k8s.io/v1beta1/clusterrolebindings/{name}", + "description": "API at /apis/rbac.authorization.k8s.io/v1beta1", + "operations": [ + { + "type": "v1beta1.ClusterRoleBinding", + "method": "GET", + "summary": "read the specified ClusterRoleBinding", + "nickname": "readClusterRoleBinding", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the ClusterRoleBinding", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1beta1.ClusterRoleBinding" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "*/*" + ] + }, + { + "type": "v1beta1.ClusterRoleBinding", + "method": "PUT", + "summary": "replace the specified ClusterRoleBinding", + "nickname": "replaceClusterRoleBinding", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "v1beta1.ClusterRoleBinding", + "paramType": "body", + "name": "body", + "description": "", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the ClusterRoleBinding", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1beta1.ClusterRoleBinding" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "*/*" + ] + }, + { + "type": "v1beta1.ClusterRoleBinding", + "method": "PATCH", + "summary": "partially update the specified ClusterRoleBinding", + "nickname": "patchClusterRoleBinding", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "v1.Patch", + "paramType": "body", + "name": "body", + "description": "", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the ClusterRoleBinding", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1beta1.ClusterRoleBinding" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ] + }, + { + "type": "v1.Status", + "method": "DELETE", + "summary": "delete a ClusterRoleBinding", + "nickname": "deleteClusterRoleBinding", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "v1.DeleteOptions", + "paramType": "body", + "name": "body", + "description": "", + "required": true, + "allowMultiple": false + }, + { + "type": "integer", + "paramType": "query", + "name": "gracePeriodSeconds", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "required": false, + "allowMultiple": false + }, + { + "type": "boolean", + "paramType": "query", + "name": "orphanDependents", + "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the ClusterRoleBinding", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1.Status" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "*/*" + ] + } + ] + }, + { + "path": "/apis/rbac.authorization.k8s.io/v1beta1/watch/clusterrolebindings/{name}", + "description": "API at /apis/rbac.authorization.k8s.io/v1beta1", + "operations": [ + { + "type": "v1.WatchEvent", + "method": "GET", + "summary": "watch changes to an object of kind ClusterRoleBinding", + "nickname": "watchClusterRoleBinding", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "labelSelector", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "fieldSelector", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "boolean", + "paramType": "query", + "name": "watch", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "resourceVersion", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "required": false, + "allowMultiple": false + }, + { + "type": "integer", + "paramType": "query", + "name": "timeoutSeconds", + "description": "Timeout for the list/watch call.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the ClusterRoleBinding", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1.WatchEvent" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "consumes": [ + "*/*" + ] + } + ] + }, + { + "path": "/apis/rbac.authorization.k8s.io/v1beta1/clusterroles", + "description": "API at /apis/rbac.authorization.k8s.io/v1beta1", + "operations": [ + { + "type": "v1beta1.ClusterRoleList", + "method": "GET", + "summary": "list or watch objects of kind ClusterRole", + "nickname": "listClusterRole", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "labelSelector", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "fieldSelector", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "boolean", + "paramType": "query", + "name": "watch", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "resourceVersion", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "required": false, + "allowMultiple": false + }, + { + "type": "integer", + "paramType": "query", + "name": "timeoutSeconds", + "description": "Timeout for the list/watch call.", + "required": false, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1beta1.ClusterRoleList" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "consumes": [ + "*/*" + ] + }, + { + "type": "v1beta1.ClusterRole", + "method": "POST", + "summary": "create a ClusterRole", + "nickname": "createClusterRole", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "v1beta1.ClusterRole", + "paramType": "body", + "name": "body", + "description": "", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1beta1.ClusterRole" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "*/*" + ] + }, + { + "type": "v1.Status", + "method": "DELETE", + "summary": "delete collection of ClusterRole", + "nickname": "deletecollectionClusterRole", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "labelSelector", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "fieldSelector", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "boolean", + "paramType": "query", + "name": "watch", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "resourceVersion", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "required": false, + "allowMultiple": false + }, + { + "type": "integer", + "paramType": "query", + "name": "timeoutSeconds", + "description": "Timeout for the list/watch call.", + "required": false, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1.Status" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "*/*" + ] + } + ] + }, + { + "path": "/apis/rbac.authorization.k8s.io/v1beta1/watch/clusterroles", + "description": "API at /apis/rbac.authorization.k8s.io/v1beta1", + "operations": [ + { + "type": "v1.WatchEvent", + "method": "GET", + "summary": "watch individual changes to a list of ClusterRole", + "nickname": "watchClusterRoleList", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "labelSelector", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "fieldSelector", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "boolean", + "paramType": "query", + "name": "watch", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "resourceVersion", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "required": false, + "allowMultiple": false + }, + { + "type": "integer", + "paramType": "query", + "name": "timeoutSeconds", + "description": "Timeout for the list/watch call.", + "required": false, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1.WatchEvent" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "consumes": [ + "*/*" + ] + } + ] + }, + { + "path": "/apis/rbac.authorization.k8s.io/v1beta1/clusterroles/{name}", + "description": "API at /apis/rbac.authorization.k8s.io/v1beta1", + "operations": [ + { + "type": "v1beta1.ClusterRole", + "method": "GET", + "summary": "read the specified ClusterRole", + "nickname": "readClusterRole", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the ClusterRole", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1beta1.ClusterRole" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "*/*" + ] + }, + { + "type": "v1beta1.ClusterRole", + "method": "PUT", + "summary": "replace the specified ClusterRole", + "nickname": "replaceClusterRole", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "v1beta1.ClusterRole", + "paramType": "body", + "name": "body", + "description": "", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the ClusterRole", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1beta1.ClusterRole" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "*/*" + ] + }, + { + "type": "v1beta1.ClusterRole", + "method": "PATCH", + "summary": "partially update the specified ClusterRole", + "nickname": "patchClusterRole", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "v1.Patch", + "paramType": "body", + "name": "body", + "description": "", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the ClusterRole", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1beta1.ClusterRole" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ] + }, + { + "type": "v1.Status", + "method": "DELETE", + "summary": "delete a ClusterRole", + "nickname": "deleteClusterRole", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "v1.DeleteOptions", + "paramType": "body", + "name": "body", + "description": "", + "required": true, + "allowMultiple": false + }, + { + "type": "integer", + "paramType": "query", + "name": "gracePeriodSeconds", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "required": false, + "allowMultiple": false + }, + { + "type": "boolean", + "paramType": "query", + "name": "orphanDependents", + "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the ClusterRole", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1.Status" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "*/*" + ] + } + ] + }, + { + "path": "/apis/rbac.authorization.k8s.io/v1beta1/watch/clusterroles/{name}", + "description": "API at /apis/rbac.authorization.k8s.io/v1beta1", + "operations": [ + { + "type": "v1.WatchEvent", + "method": "GET", + "summary": "watch changes to an object of kind ClusterRole", + "nickname": "watchClusterRole", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "labelSelector", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "fieldSelector", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "boolean", + "paramType": "query", + "name": "watch", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "resourceVersion", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "required": false, + "allowMultiple": false + }, + { + "type": "integer", + "paramType": "query", + "name": "timeoutSeconds", + "description": "Timeout for the list/watch call.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the ClusterRole", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1.WatchEvent" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "consumes": [ + "*/*" + ] + } + ] + }, + { + "path": "/apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/rolebindings", + "description": "API at /apis/rbac.authorization.k8s.io/v1beta1", + "operations": [ + { + "type": "v1beta1.RoleBindingList", + "method": "GET", + "summary": "list or watch objects of kind RoleBinding", + "nickname": "listNamespacedRoleBinding", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "labelSelector", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "fieldSelector", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "boolean", + "paramType": "query", + "name": "watch", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "resourceVersion", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "required": false, + "allowMultiple": false + }, + { + "type": "integer", + "paramType": "query", + "name": "timeoutSeconds", + "description": "Timeout for the list/watch call.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "namespace", + "description": "object name and auth scope, such as for teams and projects", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1beta1.RoleBindingList" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "consumes": [ + "*/*" + ] + }, + { + "type": "v1beta1.RoleBinding", + "method": "POST", + "summary": "create a RoleBinding", + "nickname": "createNamespacedRoleBinding", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "v1beta1.RoleBinding", + "paramType": "body", + "name": "body", + "description": "", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "namespace", + "description": "object name and auth scope, such as for teams and projects", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1beta1.RoleBinding" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "*/*" + ] + }, + { + "type": "v1.Status", + "method": "DELETE", + "summary": "delete collection of RoleBinding", + "nickname": "deletecollectionNamespacedRoleBinding", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "labelSelector", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "fieldSelector", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "boolean", + "paramType": "query", + "name": "watch", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "resourceVersion", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "required": false, + "allowMultiple": false + }, + { + "type": "integer", + "paramType": "query", + "name": "timeoutSeconds", + "description": "Timeout for the list/watch call.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "namespace", + "description": "object name and auth scope, such as for teams and projects", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1.Status" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "*/*" + ] + } + ] + }, + { + "path": "/apis/rbac.authorization.k8s.io/v1beta1/watch/namespaces/{namespace}/rolebindings", + "description": "API at /apis/rbac.authorization.k8s.io/v1beta1", + "operations": [ + { + "type": "v1.WatchEvent", + "method": "GET", + "summary": "watch individual changes to a list of RoleBinding", + "nickname": "watchNamespacedRoleBindingList", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "labelSelector", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "fieldSelector", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "boolean", + "paramType": "query", + "name": "watch", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "resourceVersion", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "required": false, + "allowMultiple": false + }, + { + "type": "integer", + "paramType": "query", + "name": "timeoutSeconds", + "description": "Timeout for the list/watch call.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "namespace", + "description": "object name and auth scope, such as for teams and projects", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1.WatchEvent" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "consumes": [ + "*/*" + ] + } + ] + }, + { + "path": "/apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/rolebindings/{name}", + "description": "API at /apis/rbac.authorization.k8s.io/v1beta1", + "operations": [ + { + "type": "v1beta1.RoleBinding", + "method": "GET", + "summary": "read the specified RoleBinding", + "nickname": "readNamespacedRoleBinding", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "namespace", + "description": "object name and auth scope, such as for teams and projects", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the RoleBinding", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1beta1.RoleBinding" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "*/*" + ] + }, + { + "type": "v1beta1.RoleBinding", + "method": "PUT", + "summary": "replace the specified RoleBinding", + "nickname": "replaceNamespacedRoleBinding", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "v1beta1.RoleBinding", + "paramType": "body", + "name": "body", + "description": "", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "namespace", + "description": "object name and auth scope, such as for teams and projects", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the RoleBinding", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1beta1.RoleBinding" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "*/*" + ] + }, + { + "type": "v1beta1.RoleBinding", + "method": "PATCH", + "summary": "partially update the specified RoleBinding", + "nickname": "patchNamespacedRoleBinding", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "v1.Patch", + "paramType": "body", + "name": "body", + "description": "", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "namespace", + "description": "object name and auth scope, such as for teams and projects", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the RoleBinding", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1beta1.RoleBinding" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ] + }, + { + "type": "v1.Status", + "method": "DELETE", + "summary": "delete a RoleBinding", + "nickname": "deleteNamespacedRoleBinding", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "v1.DeleteOptions", + "paramType": "body", + "name": "body", + "description": "", + "required": true, + "allowMultiple": false + }, + { + "type": "integer", + "paramType": "query", + "name": "gracePeriodSeconds", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "required": false, + "allowMultiple": false + }, + { + "type": "boolean", + "paramType": "query", + "name": "orphanDependents", + "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "namespace", + "description": "object name and auth scope, such as for teams and projects", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the RoleBinding", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1.Status" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "*/*" + ] + } + ] + }, + { + "path": "/apis/rbac.authorization.k8s.io/v1beta1/watch/namespaces/{namespace}/rolebindings/{name}", + "description": "API at /apis/rbac.authorization.k8s.io/v1beta1", + "operations": [ + { + "type": "v1.WatchEvent", + "method": "GET", + "summary": "watch changes to an object of kind RoleBinding", + "nickname": "watchNamespacedRoleBinding", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "labelSelector", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "fieldSelector", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "boolean", + "paramType": "query", + "name": "watch", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "resourceVersion", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "required": false, + "allowMultiple": false + }, + { + "type": "integer", + "paramType": "query", + "name": "timeoutSeconds", + "description": "Timeout for the list/watch call.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "namespace", + "description": "object name and auth scope, such as for teams and projects", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the RoleBinding", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1.WatchEvent" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "consumes": [ + "*/*" + ] + } + ] + }, + { + "path": "/apis/rbac.authorization.k8s.io/v1beta1/rolebindings", + "description": "API at /apis/rbac.authorization.k8s.io/v1beta1", + "operations": [ + { + "type": "v1beta1.RoleBindingList", + "method": "GET", + "summary": "list or watch objects of kind RoleBinding", + "nickname": "listRoleBindingForAllNamespaces", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "labelSelector", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "fieldSelector", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "boolean", + "paramType": "query", + "name": "watch", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "resourceVersion", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "required": false, + "allowMultiple": false + }, + { + "type": "integer", + "paramType": "query", + "name": "timeoutSeconds", + "description": "Timeout for the list/watch call.", + "required": false, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1beta1.RoleBindingList" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "consumes": [ + "*/*" + ] + } + ] + }, + { + "path": "/apis/rbac.authorization.k8s.io/v1beta1/watch/rolebindings", + "description": "API at /apis/rbac.authorization.k8s.io/v1beta1", + "operations": [ + { + "type": "v1.WatchEvent", + "method": "GET", + "summary": "watch individual changes to a list of RoleBinding", + "nickname": "watchRoleBindingListForAllNamespaces", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "labelSelector", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "fieldSelector", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "boolean", + "paramType": "query", + "name": "watch", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "resourceVersion", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "required": false, + "allowMultiple": false + }, + { + "type": "integer", + "paramType": "query", + "name": "timeoutSeconds", + "description": "Timeout for the list/watch call.", + "required": false, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1.WatchEvent" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "consumes": [ + "*/*" + ] + } + ] + }, + { + "path": "/apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/roles", + "description": "API at /apis/rbac.authorization.k8s.io/v1beta1", + "operations": [ + { + "type": "v1beta1.RoleList", + "method": "GET", + "summary": "list or watch objects of kind Role", + "nickname": "listNamespacedRole", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "labelSelector", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "fieldSelector", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "boolean", + "paramType": "query", + "name": "watch", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "resourceVersion", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "required": false, + "allowMultiple": false + }, + { + "type": "integer", + "paramType": "query", + "name": "timeoutSeconds", + "description": "Timeout for the list/watch call.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "namespace", + "description": "object name and auth scope, such as for teams and projects", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1beta1.RoleList" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "consumes": [ + "*/*" + ] + }, + { + "type": "v1beta1.Role", + "method": "POST", + "summary": "create a Role", + "nickname": "createNamespacedRole", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "v1beta1.Role", + "paramType": "body", + "name": "body", + "description": "", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "namespace", + "description": "object name and auth scope, such as for teams and projects", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1beta1.Role" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "*/*" + ] + }, + { + "type": "v1.Status", + "method": "DELETE", + "summary": "delete collection of Role", + "nickname": "deletecollectionNamespacedRole", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "labelSelector", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "fieldSelector", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "boolean", + "paramType": "query", + "name": "watch", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "resourceVersion", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "required": false, + "allowMultiple": false + }, + { + "type": "integer", + "paramType": "query", + "name": "timeoutSeconds", + "description": "Timeout for the list/watch call.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "namespace", + "description": "object name and auth scope, such as for teams and projects", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1.Status" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "*/*" + ] + } + ] + }, + { + "path": "/apis/rbac.authorization.k8s.io/v1beta1/watch/namespaces/{namespace}/roles", + "description": "API at /apis/rbac.authorization.k8s.io/v1beta1", + "operations": [ + { + "type": "v1.WatchEvent", + "method": "GET", + "summary": "watch individual changes to a list of Role", + "nickname": "watchNamespacedRoleList", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "labelSelector", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "fieldSelector", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "boolean", + "paramType": "query", + "name": "watch", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "resourceVersion", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "required": false, + "allowMultiple": false + }, + { + "type": "integer", + "paramType": "query", + "name": "timeoutSeconds", + "description": "Timeout for the list/watch call.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "namespace", + "description": "object name and auth scope, such as for teams and projects", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1.WatchEvent" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "consumes": [ + "*/*" + ] + } + ] + }, + { + "path": "/apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/roles/{name}", + "description": "API at /apis/rbac.authorization.k8s.io/v1beta1", + "operations": [ + { + "type": "v1beta1.Role", + "method": "GET", + "summary": "read the specified Role", + "nickname": "readNamespacedRole", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "namespace", + "description": "object name and auth scope, such as for teams and projects", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the Role", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1beta1.Role" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "*/*" + ] + }, + { + "type": "v1beta1.Role", + "method": "PUT", + "summary": "replace the specified Role", + "nickname": "replaceNamespacedRole", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "v1beta1.Role", + "paramType": "body", + "name": "body", + "description": "", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "namespace", + "description": "object name and auth scope, such as for teams and projects", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the Role", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1beta1.Role" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "*/*" + ] + }, + { + "type": "v1beta1.Role", + "method": "PATCH", + "summary": "partially update the specified Role", + "nickname": "patchNamespacedRole", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "v1.Patch", + "paramType": "body", + "name": "body", + "description": "", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "namespace", + "description": "object name and auth scope, such as for teams and projects", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the Role", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1beta1.Role" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ] + }, + { + "type": "v1.Status", + "method": "DELETE", + "summary": "delete a Role", + "nickname": "deleteNamespacedRole", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "v1.DeleteOptions", + "paramType": "body", + "name": "body", + "description": "", + "required": true, + "allowMultiple": false + }, + { + "type": "integer", + "paramType": "query", + "name": "gracePeriodSeconds", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "required": false, + "allowMultiple": false + }, + { + "type": "boolean", + "paramType": "query", + "name": "orphanDependents", + "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "namespace", + "description": "object name and auth scope, such as for teams and projects", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the Role", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1.Status" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "*/*" + ] + } + ] + }, + { + "path": "/apis/rbac.authorization.k8s.io/v1beta1/watch/namespaces/{namespace}/roles/{name}", + "description": "API at /apis/rbac.authorization.k8s.io/v1beta1", + "operations": [ + { + "type": "v1.WatchEvent", + "method": "GET", + "summary": "watch changes to an object of kind Role", + "nickname": "watchNamespacedRole", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "labelSelector", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "fieldSelector", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "boolean", + "paramType": "query", + "name": "watch", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "resourceVersion", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "required": false, + "allowMultiple": false + }, + { + "type": "integer", + "paramType": "query", + "name": "timeoutSeconds", + "description": "Timeout for the list/watch call.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "namespace", + "description": "object name and auth scope, such as for teams and projects", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the Role", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1.WatchEvent" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "consumes": [ + "*/*" + ] + } + ] + }, + { + "path": "/apis/rbac.authorization.k8s.io/v1beta1/roles", + "description": "API at /apis/rbac.authorization.k8s.io/v1beta1", + "operations": [ + { + "type": "v1beta1.RoleList", + "method": "GET", + "summary": "list or watch objects of kind Role", + "nickname": "listRoleForAllNamespaces", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "labelSelector", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "fieldSelector", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "boolean", + "paramType": "query", + "name": "watch", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "resourceVersion", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "required": false, + "allowMultiple": false + }, + { + "type": "integer", + "paramType": "query", + "name": "timeoutSeconds", + "description": "Timeout for the list/watch call.", + "required": false, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1beta1.RoleList" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "consumes": [ + "*/*" + ] + } + ] + }, + { + "path": "/apis/rbac.authorization.k8s.io/v1beta1/watch/roles", + "description": "API at /apis/rbac.authorization.k8s.io/v1beta1", + "operations": [ + { + "type": "v1.WatchEvent", + "method": "GET", + "summary": "watch individual changes to a list of Role", + "nickname": "watchRoleListForAllNamespaces", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "labelSelector", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "fieldSelector", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "boolean", + "paramType": "query", + "name": "watch", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "resourceVersion", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "required": false, + "allowMultiple": false + }, + { + "type": "integer", + "paramType": "query", + "name": "timeoutSeconds", + "description": "Timeout for the list/watch call.", + "required": false, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1.WatchEvent" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "consumes": [ + "*/*" + ] + } + ] + }, + { + "path": "/apis/rbac.authorization.k8s.io/v1beta1", + "description": "API at /apis/rbac.authorization.k8s.io/v1beta1", + "operations": [ + { + "type": "v1.APIResourceList", + "method": "GET", + "summary": "get available resources", + "nickname": "getAPIResources", + "parameters": [], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ] + } + ] + } + ], + "models": { + "v1beta1.ClusterRoleBindingList": { + "id": "v1beta1.ClusterRoleBindingList", + "description": "ClusterRoleBindingList is a collection of ClusterRoleBindings", + "required": [ + "items" + ], + "properties": { + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" + }, + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" + }, + "metadata": { + "$ref": "v1.ListMeta", + "description": "Standard object's metadata." + }, + "items": { + "type": "array", + "items": { + "$ref": "v1beta1.ClusterRoleBinding" + }, + "description": "Items is a list of ClusterRoleBindings" + } + } + }, + "v1.ListMeta": { + "id": "v1.ListMeta", + "description": "ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.", + "properties": { + "selfLink": { + "type": "string", + "description": "SelfLink is a URL representing this object. Populated by the system. Read-only." + }, + "resourceVersion": { + "type": "string", + "description": "String that identifies the server's internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency" + } + } + }, + "v1beta1.ClusterRoleBinding": { + "id": "v1beta1.ClusterRoleBinding", + "description": "ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject.", + "required": [ + "subjects", + "roleRef" + ], + "properties": { + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" + }, + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" + }, + "metadata": { + "$ref": "v1.ObjectMeta", + "description": "Standard object's metadata." + }, + "subjects": { + "type": "array", + "items": { + "$ref": "v1beta1.Subject" + }, + "description": "Subjects holds references to the objects the role applies to." + }, + "roleRef": { + "$ref": "v1beta1.RoleRef", + "description": "RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error." + } + } + }, + "v1.ObjectMeta": { + "id": "v1.ObjectMeta", + "description": "ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.", + "properties": { + "name": { + "type": "string", + "description": "Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names" + }, + "generateName": { + "type": "string", + "description": "GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.\n\nIf this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).\n\nApplied only if Name is not specified. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#idempotency" + }, + "namespace": { + "type": "string", + "description": "Namespace defines the space within each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.\n\nMust be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces" + }, + "selfLink": { + "type": "string", + "description": "SelfLink is a URL representing this object. Populated by the system. Read-only." + }, + "uid": { + "type": "string", + "description": "UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.\n\nPopulated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids" + }, + "resourceVersion": { + "type": "string", + "description": "An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.\n\nPopulated by the system. Read-only. Value must be treated as opaque by clients and . More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency" + }, + "generation": { + "type": "integer", + "format": "int64", + "description": "A sequence number representing a specific generation of the desired state. Populated by the system. Read-only." + }, + "creationTimestamp": { + "type": "string", + "description": "CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system. Read-only. Null for lists. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata" + }, + "deletionTimestamp": { + "type": "string", + "description": "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field. Once set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested. Read-only. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata" + }, + "deletionGracePeriodSeconds": { + "type": "integer", + "format": "int64", + "description": "Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only." + }, + "labels": { + "type": "object", + "description": "Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels" + }, + "annotations": { + "type": "object", + "description": "Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations" + }, + "ownerReferences": { + "type": "array", + "items": { + "$ref": "v1.OwnerReference" + }, + "description": "List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller." + }, + "finalizers": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed." + }, + "clusterName": { + "type": "string", + "description": "The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request." + } + } + }, + "v1.OwnerReference": { + "id": "v1.OwnerReference", + "description": "OwnerReference contains enough information to let you identify an owning object. Currently, an owning object must be in the same namespace, so there is no namespace field.", + "required": [ + "apiVersion", + "kind", + "name", + "uid" + ], + "properties": { + "apiVersion": { + "type": "string", + "description": "API version of the referent." + }, + "kind": { + "type": "string", + "description": "Kind of the referent. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" + }, + "name": { + "type": "string", + "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names" + }, + "uid": { + "type": "string", + "description": "UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids" + }, + "controller": { + "type": "boolean", + "description": "If true, this reference points to the managing controller." + } + } + }, + "v1beta1.Subject": { + "id": "v1beta1.Subject", + "description": "Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names.", + "required": [ + "kind", + "name" + ], + "properties": { + "kind": { + "type": "string", + "description": "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\". If the Authorizer does not recognized the kind value, the Authorizer should report an error." + }, + "apiVersion": { + "type": "string", + "description": "APIVersion holds the API group and version of the referenced object." + }, + "name": { + "type": "string", + "description": "Name of the object being referenced." + }, + "namespace": { + "type": "string", + "description": "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty the Authorizer should report an error." + } + } + }, + "v1beta1.RoleRef": { + "id": "v1beta1.RoleRef", + "description": "RoleRef contains information that points to the role being used", + "required": [ + "apiGroup", + "kind", + "name" + ], + "properties": { + "apiGroup": { + "type": "string", + "description": "APIGroup is the group for the resource being referenced" + }, + "kind": { + "type": "string", + "description": "Kind is the type of resource being referenced" + }, + "name": { + "type": "string", + "description": "Name is the name of resource being referenced" + } + } + }, + "v1.Status": { + "id": "v1.Status", + "description": "Status is a return value for calls that don't return other objects.", + "properties": { + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" + }, + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" + }, + "metadata": { + "$ref": "v1.ListMeta", + "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" + }, + "status": { + "type": "string", + "description": "Status of the operation. One of: \"Success\" or \"Failure\". More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status" + }, + "message": { + "type": "string", + "description": "A human-readable description of the status of this operation." + }, + "reason": { + "type": "string", + "description": "A machine-readable description of why this operation is in the \"Failure\" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it." + }, + "details": { + "$ref": "v1.StatusDetails", + "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type." + }, + "code": { + "type": "integer", + "format": "int32", + "description": "Suggested HTTP return code for this status, 0 if not set." + } + } + }, + "v1.StatusDetails": { + "id": "v1.StatusDetails", + "description": "StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined.", + "properties": { + "name": { + "type": "string", + "description": "The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described)." + }, + "group": { + "type": "string", + "description": "The group attribute of the resource associated with the status StatusReason." + }, + "kind": { + "type": "string", + "description": "The kind attribute of the resource associated with the status StatusReason. On some operations may differ from the requested resource Kind. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" + }, + "causes": { + "type": "array", + "items": { + "$ref": "v1.StatusCause" + }, + "description": "The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes." + }, + "retryAfterSeconds": { + "type": "integer", + "format": "int32", + "description": "If specified, the time in seconds before the operation should be retried." + } + } + }, + "v1.StatusCause": { + "id": "v1.StatusCause", + "description": "StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.", + "properties": { + "reason": { + "type": "string", + "description": "A machine-readable description of the cause of the error. If this value is empty there is no information available." + }, + "message": { + "type": "string", + "description": "A human-readable description of the cause of the error. This field may be presented as-is to a reader." + }, + "field": { + "type": "string", + "description": "The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. Optional.\n\nExamples:\n \"name\" - the field \"name\" on the current resource\n \"items[0].name\" - the field \"name\" on the first array entry in \"items\"" + } + } + }, + "v1.WatchEvent": { + "id": "v1.WatchEvent", + "required": [ + "type", + "object" + ], + "properties": { + "type": { + "type": "string" + }, + "object": { + "type": "string" + } + } + }, + "v1.Patch": { + "id": "v1.Patch", + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "properties": {} + }, + "v1.DeleteOptions": { + "id": "v1.DeleteOptions", + "description": "DeleteOptions may be provided when deleting an API object.", + "properties": { + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" + }, + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" + }, + "gracePeriodSeconds": { + "type": "integer", + "format": "int64", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately." + }, + "preconditions": { + "$ref": "v1.Preconditions", + "description": "Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned." + }, + "orphanDependents": { + "type": "boolean", + "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list." + } + } + }, + "v1.Preconditions": { + "id": "v1.Preconditions", + "description": "Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.", + "properties": { + "uid": { + "$ref": "types.UID", + "description": "Specifies the target UID." + } + } + }, + "types.UID": { + "id": "types.UID", + "properties": {} + }, + "v1beta1.ClusterRoleList": { + "id": "v1beta1.ClusterRoleList", + "description": "ClusterRoleList is a collection of ClusterRoles", + "required": [ + "items" + ], + "properties": { + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" + }, + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" + }, + "metadata": { + "$ref": "v1.ListMeta", + "description": "Standard object's metadata." + }, + "items": { + "type": "array", + "items": { + "$ref": "v1beta1.ClusterRole" + }, + "description": "Items is a list of ClusterRoles" + } + } + }, + "v1beta1.ClusterRole": { + "id": "v1beta1.ClusterRole", + "description": "ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.", + "required": [ + "rules" + ], + "properties": { + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" + }, + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" + }, + "metadata": { + "$ref": "v1.ObjectMeta", + "description": "Standard object's metadata." + }, + "rules": { + "type": "array", + "items": { + "$ref": "v1beta1.PolicyRule" + }, + "description": "Rules holds all the PolicyRules for this ClusterRole" + } + } + }, + "v1beta1.PolicyRule": { + "id": "v1beta1.PolicyRule", + "description": "PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.", + "required": [ + "verbs" + ], + "properties": { + "verbs": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds." + }, + "apiGroups": { + "type": "array", + "items": { + "type": "string" + }, + "description": "APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed." + }, + "resources": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Resources is a list of resources this rule applies to. ResourceAll represents all resources." + }, + "resourceNames": { + "type": "array", + "items": { + "type": "string" + }, + "description": "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed." + }, + "nonResourceURLs": { + "type": "array", + "items": { + "type": "string" + }, + "description": "NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as \"pods\" or \"secrets\") or non-resource URL paths (such as \"/api\"), but not both." + } + } + }, + "v1beta1.RoleBindingList": { + "id": "v1beta1.RoleBindingList", + "description": "RoleBindingList is a collection of RoleBindings", + "required": [ + "items" + ], + "properties": { + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" + }, + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" + }, + "metadata": { + "$ref": "v1.ListMeta", + "description": "Standard object's metadata." + }, + "items": { + "type": "array", + "items": { + "$ref": "v1beta1.RoleBinding" + }, + "description": "Items is a list of RoleBindings" + } + } + }, + "v1beta1.RoleBinding": { + "id": "v1beta1.RoleBinding", + "description": "RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace.", + "required": [ + "subjects", + "roleRef" + ], + "properties": { + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" + }, + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" + }, + "metadata": { + "$ref": "v1.ObjectMeta", + "description": "Standard object's metadata." + }, + "subjects": { + "type": "array", + "items": { + "$ref": "v1beta1.Subject" + }, + "description": "Subjects holds references to the objects the role applies to." + }, + "roleRef": { + "$ref": "v1beta1.RoleRef", + "description": "RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error." + } + } + }, + "v1beta1.RoleList": { + "id": "v1beta1.RoleList", + "description": "RoleList is a collection of Roles", + "required": [ + "items" + ], + "properties": { + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" + }, + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" + }, + "metadata": { + "$ref": "v1.ListMeta", + "description": "Standard object's metadata." + }, + "items": { + "type": "array", + "items": { + "$ref": "v1beta1.Role" + }, + "description": "Items is a list of Roles" + } + } + }, + "v1beta1.Role": { + "id": "v1beta1.Role", + "description": "Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.", + "required": [ + "rules" + ], + "properties": { + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" + }, + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" + }, + "metadata": { + "$ref": "v1.ObjectMeta", + "description": "Standard object's metadata." + }, + "rules": { + "type": "array", + "items": { + "$ref": "v1beta1.PolicyRule" + }, + "description": "Rules holds all the PolicyRules for this Role" + } + } + }, + "v1.APIResourceList": { + "id": "v1.APIResourceList", + "description": "APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced.", + "required": [ + "groupVersion", + "resources" + ], + "properties": { + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" + }, + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" + }, + "groupVersion": { + "type": "string", + "description": "groupVersion is the group and version this APIResourceList is for." + }, + "resources": { + "type": "array", + "items": { + "$ref": "v1.APIResource" + }, + "description": "resources contains the name of the resources and if they are namespaced." + } + } + }, + "v1.APIResource": { + "id": "v1.APIResource", + "description": "APIResource specifies the name of a resource and whether it is namespaced.", + "required": [ + "name", + "namespaced", + "kind", + "verbs" + ], + "properties": { + "name": { + "type": "string", + "description": "name is the name of the resource." + }, + "namespaced": { + "type": "boolean", + "description": "namespaced indicates if a resource is namespaced or not." + }, + "kind": { + "type": "string", + "description": "kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo')" + }, + "verbs": { + "type": "array", + "items": { + "type": "string" + }, + "description": "verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy)" + } + } + } + } + } diff --git a/vendor/k8s.io/kubernetes/api/swagger-spec/resourceListing.json b/vendor/k8s.io/kubernetes/api/swagger-spec/resourceListing.json index a327c435..e943df7c 100644 --- a/vendor/k8s.io/kubernetes/api/swagger-spec/resourceListing.json +++ b/vendor/k8s.io/kubernetes/api/swagger-spec/resourceListing.json @@ -66,8 +66,8 @@ "description": "get information of a group" }, { - "path": "/apis/certificates.k8s.io/v1alpha1", - "description": "API at /apis/certificates.k8s.io/v1alpha1" + "path": "/apis/certificates.k8s.io/v1beta1", + "description": "API at /apis/certificates.k8s.io/v1beta1" }, { "path": "/apis/certificates.k8s.io", @@ -89,6 +89,10 @@ "path": "/apis/policy", "description": "get information of a group" }, + { + "path": "/apis/rbac.authorization.k8s.io/v1beta1", + "description": "API at /apis/rbac.authorization.k8s.io/v1beta1" + }, { "path": "/apis/rbac.authorization.k8s.io/v1alpha1", "description": "API at /apis/rbac.authorization.k8s.io/v1alpha1" diff --git a/vendor/k8s.io/kubernetes/api/swagger-spec/storage.k8s.io_v1beta1.json b/vendor/k8s.io/kubernetes/api/swagger-spec/storage.k8s.io_v1beta1.json index 2ab814f5..78e0ca0f 100644 --- a/vendor/k8s.io/kubernetes/api/swagger-spec/storage.k8s.io_v1beta1.json +++ b/vendor/k8s.io/kubernetes/api/swagger-spec/storage.k8s.io_v1beta1.json @@ -894,7 +894,7 @@ }, "v1.DeleteOptions": { "id": "v1.DeleteOptions", - "description": "DeleteOptions may be provided when deleting an API object", + "description": "DeleteOptions may be provided when deleting an API object.", "properties": { "kind": { "type": "string", diff --git a/vendor/k8s.io/kubernetes/api/swagger-spec/v1.json b/vendor/k8s.io/kubernetes/api/swagger-spec/v1.json index f22c7988..f05737bd 100644 --- a/vendor/k8s.io/kubernetes/api/swagger-spec/v1.json +++ b/vendor/k8s.io/kubernetes/api/swagger-spec/v1.json @@ -16597,7 +16597,7 @@ }, "v1.DeleteOptions": { "id": "v1.DeleteOptions", - "description": "DeleteOptions may be provided when deleting an API object", + "description": "DeleteOptions may be provided when deleting an API object.", "properties": { "kind": { "type": "string", @@ -18272,6 +18272,10 @@ "affinity": { "$ref": "v1.Affinity", "description": "If specified, the pod's scheduling constraints" + }, + "schedulername": { + "type": "string", + "description": "If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler." } } }, @@ -18424,12 +18428,16 @@ "items": { "$ref": "v1.KeyToPath" }, - "description": "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error. Paths must be relative and may not contain the '..' path or start with '..'." + "description": "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'." }, "defaultMode": { "type": "integer", "format": "int32", "description": "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the Secret or it's keys must be defined" } } }, @@ -18568,12 +18576,16 @@ "items": { "$ref": "v1.KeyToPath" }, - "description": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error. Paths must be relative and may not contain the '..' path or start with '..'." + "description": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'." }, "defaultMode": { "type": "integer", "format": "int32", "description": "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the ConfigMap or it's keys must be defined" } } }, @@ -18656,7 +18668,11 @@ }, "terminationMessagePath": { "type": "string", - "description": "Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated." + "description": "Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated." + }, + "terminationMessagePolicy": { + "type": "string", + "description": "Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated." }, "imagePullPolicy": { "type": "string", @@ -18722,6 +18738,10 @@ "configMapRef": { "$ref": "v1.ConfigMapEnvSource", "description": "The ConfigMap to select from" + }, + "secretRef": { + "$ref": "v1.SecretEnvSource", + "description": "The Secret to select from" } } }, @@ -18732,6 +18752,24 @@ "name": { "type": "string", "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names" + }, + "optional": { + "type": "boolean", + "description": "Specify whether the ConfigMap must be defined" + } + } + }, + "v1.SecretEnvSource": { + "id": "v1.SecretEnvSource", + "description": "SecretEnvSource selects a Secret to populate the environment variables with.\n\nThe contents of the target Secret's Data field will represent the key-value pairs as environment variables.", + "properties": { + "name": { + "type": "string", + "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names" + }, + "optional": { + "type": "boolean", + "description": "Specify whether the Secret must be defined" } } }, @@ -18792,6 +18830,10 @@ "key": { "type": "string", "description": "The key to select." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the ConfigMap or it's key must be defined" } } }, @@ -18809,6 +18851,10 @@ "key": { "type": "string", "description": "The key of the secret to select from. Must be a valid secret key." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the Secret or it's key must be defined" } } }, diff --git a/vendor/k8s.io/kubernetes/build/BUILD b/vendor/k8s.io/kubernetes/build/BUILD index 0803af5f..dbf1f0e3 100644 --- a/vendor/k8s.io/kubernetes/build/BUILD +++ b/vendor/k8s.io/kubernetes/build/BUILD @@ -1,6 +1,22 @@ package(default_visibility = ["//visibility:public"]) -load("@bazel_tools//tools/build_defs/docker:docker.bzl", "docker_build") +load("@io_bazel//tools/build_defs/docker:docker.bzl", "docker_build") + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], +) + +filegroup( + name = "all-srcs", + srcs = [ + ":package-srcs", + "//build/debs:all-srcs", + "//build/release-tars:all-srcs", + ], + tags = ["automanaged"], +) docker_build( name = "busybox", @@ -34,43 +50,59 @@ docker_build( ], ) +DOCKERIZED_BINARIES = { + "kube-apiserver": { + "base": ":busybox-libc", + "target": "//cmd/kube-apiserver:kube-apiserver", + }, + "kube-controller-manager": { + "base": ":busybox-libc", + "target": "//cmd/kube-controller-manager:kube-controller-manager", + }, + "kube-scheduler": { + "base": ":busybox-libc", + "target": "//plugin/cmd/kube-scheduler:kube-scheduler", + }, + "kube-aggregator": { + "base": ":busybox-libc", + "target": "//cmd/kube-aggregator:kube-aggregator", + }, + "kube-proxy": { + "base": ":busybox-net", + "target": "//cmd/kube-proxy:kube-proxy", + }, +} + +[genrule( + name = binary + "_docker_tag", + srcs = [meta["target"]], + outs = [binary + ".docker_tag"], + # Currently each target has two outputs, the binary and its library, so hash only the first item (the binary). + # This can be made less hacky when we have static linking working. + cmd = "md5sum $(locations " + meta["target"] + ") | grep '" + binary + "'$$ | cut -f1 -d' ' | tr -d '\n' > $@", +) for binary, meta in DOCKERIZED_BINARIES.items()] + [docker_build( name = binary, - base = ":busybox-libc", + base = meta["base"], cmd = ["/usr/bin/" + binary], debs = [ "//build/debs:%s.deb" % binary, ], - repository = "gcr.io/google-containers", -) for binary in [ - "kube-apiserver", - "kube-controller-manager", - "kube-scheduler", - "kube-aggregator", -]] - -docker_build( - name = "kube-proxy", - base = ":busybox-net", - cmd = ["/usr/bin/kube-proxy"], - debs = [ - "//build/debs:kube-proxy.deb", + image_tags = [ + "@%s.docker_tag" % binary, ], - repository = "gcr.io/google-containers", -) + repository = "gcr.io/google_containers/" + binary, + repository_append_package = False, + symlinks = { + # Some cluster startup scripts expect to find the binaries in /usr/local/bin, + # but the debs install the binaries into /usr/bin. + "/usr/local/bin/" + binary: "/usr/bin/" + binary, + }, +) for binary, meta in DOCKERIZED_BINARIES.items()] filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//build/debs:all-srcs", - ], - tags = ["automanaged"], + name = "docker-artifacts", + srcs = [":%s.tar" % binary for binary in DOCKERIZED_BINARIES.keys()] + + [":%s.docker_tag" % binary for binary in DOCKERIZED_BINARIES.keys()], ) diff --git a/vendor/k8s.io/kubernetes/build/OWNERS b/vendor/k8s.io/kubernetes/build/OWNERS index 8ed24bb7..85cb3c62 100644 --- a/vendor/k8s.io/kubernetes/build/OWNERS +++ b/vendor/k8s.io/kubernetes/build/OWNERS @@ -1,4 +1,10 @@ -assignees: +reviewers: + - ihmccreery + - ixdy + - jbeda + - lavalamp + - zmerlynn +approvers: - ihmccreery - ixdy - jbeda diff --git a/vendor/k8s.io/kubernetes/build/lib/release.sh b/vendor/k8s.io/kubernetes/build/lib/release.sh index ade70c5f..64c4621d 100644 --- a/vendor/k8s.io/kubernetes/build/lib/release.sh +++ b/vendor/k8s.io/kubernetes/build/lib/release.sh @@ -356,34 +356,37 @@ function kube::release::package_salt_tarball() { function kube::release::package_kube_manifests_tarball() { kube::log::status "Building tarball: manifests" + local salt_dir="${KUBE_ROOT}/cluster/saltbase/salt" + local release_stage="${RELEASE_STAGE}/manifests/kubernetes" rm -rf "${release_stage}" - local dst_dir="${release_stage}/gci-trusty" - mkdir -p "${dst_dir}" - local salt_dir="${KUBE_ROOT}/cluster/saltbase/salt" - cp "${salt_dir}/cluster-autoscaler/cluster-autoscaler.manifest" "${dst_dir}/" + mkdir -p "${release_stage}" cp "${salt_dir}/fluentd-gcp/fluentd-gcp.yaml" "${release_stage}/" cp "${salt_dir}/kube-registry-proxy/kube-registry-proxy.yaml" "${release_stage}/" cp "${salt_dir}/kube-proxy/kube-proxy.manifest" "${release_stage}/" - cp "${salt_dir}/etcd/etcd.manifest" "${dst_dir}" - cp "${salt_dir}/kube-scheduler/kube-scheduler.manifest" "${dst_dir}" - cp "${salt_dir}/kube-apiserver/kube-apiserver.manifest" "${dst_dir}" - cp "${salt_dir}/kube-apiserver/abac-authz-policy.jsonl" "${dst_dir}" - cp "${salt_dir}/kube-controller-manager/kube-controller-manager.manifest" "${dst_dir}" - cp "${salt_dir}/kube-addons/kube-addon-manager.yaml" "${dst_dir}" - cp "${salt_dir}/l7-gcp/glbc.manifest" "${dst_dir}" - cp "${salt_dir}/rescheduler/rescheduler.manifest" "${dst_dir}/" - cp "${salt_dir}/e2e-image-puller/e2e-image-puller.manifest" "${dst_dir}/" - cp "${KUBE_ROOT}/cluster/gce/trusty/configure-helper.sh" "${dst_dir}/trusty-configure-helper.sh" - cp "${KUBE_ROOT}/cluster/gce/gci/configure-helper.sh" "${dst_dir}/gci-configure-helper.sh" - cp "${KUBE_ROOT}/cluster/gce/gci/mounter/mounter" "${dst_dir}/gci-mounter" - cp "${KUBE_ROOT}/cluster/gce/gci/health-monitor.sh" "${dst_dir}/health-monitor.sh" - cp "${KUBE_ROOT}/cluster/gce/container-linux/configure-helper.sh" "${dst_dir}/container-linux-configure-helper.sh" - cp -r "${salt_dir}/kube-admission-controls/limit-range" "${dst_dir}" + + local gci_dst_dir="${release_stage}/gci-trusty" + mkdir -p "${gci_dst_dir}" + cp "${salt_dir}/cluster-autoscaler/cluster-autoscaler.manifest" "${gci_dst_dir}/" + cp "${salt_dir}/etcd/etcd.manifest" "${gci_dst_dir}" + cp "${salt_dir}/kube-scheduler/kube-scheduler.manifest" "${gci_dst_dir}" + cp "${salt_dir}/kube-apiserver/kube-apiserver.manifest" "${gci_dst_dir}" + cp "${salt_dir}/kube-apiserver/abac-authz-policy.jsonl" "${gci_dst_dir}" + cp "${salt_dir}/kube-controller-manager/kube-controller-manager.manifest" "${gci_dst_dir}" + cp "${salt_dir}/kube-addons/kube-addon-manager.yaml" "${gci_dst_dir}" + cp "${salt_dir}/l7-gcp/glbc.manifest" "${gci_dst_dir}" + cp "${salt_dir}/rescheduler/rescheduler.manifest" "${gci_dst_dir}/" + cp "${salt_dir}/e2e-image-puller/e2e-image-puller.manifest" "${gci_dst_dir}/" + cp "${KUBE_ROOT}/cluster/gce/trusty/configure-helper.sh" "${gci_dst_dir}/trusty-configure-helper.sh" + cp "${KUBE_ROOT}/cluster/gce/gci/configure-helper.sh" "${gci_dst_dir}/gci-configure-helper.sh" + cp "${KUBE_ROOT}/cluster/gce/gci/mounter/mounter" "${gci_dst_dir}/gci-mounter" + cp "${KUBE_ROOT}/cluster/gce/gci/health-monitor.sh" "${gci_dst_dir}/health-monitor.sh" + cp "${KUBE_ROOT}/cluster/gce/container-linux/configure-helper.sh" "${gci_dst_dir}/container-linux-configure-helper.sh" + cp -r "${salt_dir}/kube-admission-controls/limit-range" "${gci_dst_dir}" local objects objects=$(cd "${KUBE_ROOT}/cluster/addons" && find . \( -name \*.yaml -or -name \*.yaml.in -or -name \*.json \) | grep -v demo) - tar c -C "${KUBE_ROOT}/cluster/addons" ${objects} | tar x -C "${dst_dir}" + tar c -C "${KUBE_ROOT}/cluster/addons" ${objects} | tar x -C "${gci_dst_dir}" kube::release::clean_cruft diff --git a/vendor/k8s.io/kubernetes/build/pause/Makefile b/vendor/k8s.io/kubernetes/build/pause/Makefile index 69e92028..6739d5cd 100644 --- a/vendor/k8s.io/kubernetes/build/pause/Makefile +++ b/vendor/k8s.io/kubernetes/build/pause/Makefile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -.PHONY: all push push-legacy container clean +.PHONY: all push push-legacy container clean orphan REGISTRY ?= gcr.io/google_containers IMAGE = $(REGISTRY)/pause-$(ARCH) @@ -25,7 +25,7 @@ ARCH ?= amd64 ALL_ARCH = amd64 arm arm64 ppc64le s390x -CFLAGS = -Os -Wall -static +CFLAGS = -Os -Wall -Werror -static KUBE_CROSS_IMAGE ?= gcr.io/google_containers/kube-cross KUBE_CROSS_VERSION ?= $(shell cat ../build-image/cross/VERSION) @@ -97,5 +97,16 @@ ifeq ($(ARCH),amd64) endif touch $@ +# Useful for testing, not automatically included in container image +orphan: bin/orphan-$(ARCH) +bin/orphan-$(ARCH): orphan.c + mkdir -p bin + docker run -u $$(id -u):$$(id -g) -v $$(pwd):/build \ + $(KUBE_CROSS_IMAGE):$(KUBE_CROSS_VERSION) \ + /bin/bash -c "\ + cd /build && \ + $(TRIPLE)-gcc $(CFLAGS) -o $@ $^ && \ + $(TRIPLE)-strip $@" + clean: rm -rf .container-* .push-* bin/ diff --git a/vendor/k8s.io/kubernetes/pkg/types/unix_user_id.go b/vendor/k8s.io/kubernetes/build/pause/orphan.c similarity index 56% rename from vendor/k8s.io/kubernetes/pkg/types/unix_user_id.go rename to vendor/k8s.io/kubernetes/build/pause/orphan.c index dc770c11..07f490de 100644 --- a/vendor/k8s.io/kubernetes/pkg/types/unix_user_id.go +++ b/vendor/k8s.io/kubernetes/build/pause/orphan.c @@ -14,10 +14,23 @@ See the License for the specific language governing permissions and limitations under the License. */ -package types +/* Creates a zombie to be reaped by init. Useful for testing. */ -// int64 is used as a safe bet against wrap-around (uid's are general -// int32) and to support uid_t -1, and -2. +#include +#include -type UnixUserID int64 -type UnixGroupID int64 +int main() { + pid_t pid; + pid = fork(); + if (pid == 0) { + while (getppid() > 1) + ; + printf("Child exiting: pid=%d ppid=%d\n", getpid(), getppid()); + return 0; + } else if (pid > 0) { + printf("Parent exiting: pid=%d ppid=%d\n", getpid(), getppid()); + return 0; + } + perror("Could not create child"); + return 1; +} diff --git a/vendor/k8s.io/kubernetes/build/pause/pause.c b/vendor/k8s.io/kubernetes/build/pause/pause.c index ffbceb69..f9853915 100644 --- a/vendor/k8s.io/kubernetes/build/pause/pause.c +++ b/vendor/k8s.io/kubernetes/build/pause/pause.c @@ -17,20 +17,36 @@ limitations under the License. #include #include #include +#include +#include #include static void sigdown(int signo) { - psignal(signo, "shutting down, got signal"); - exit(0); + psignal(signo, "Shutting down, got signal"); + exit(0); +} + +static void sigreap(int signo) { + while (waitpid(-1, NULL, WNOHANG) > 0) + ; } int main() { - if (signal(SIGINT, sigdown) == SIG_ERR) - return 1; - if (signal(SIGTERM, sigdown) == SIG_ERR) - return 2; - signal(SIGKILL, sigdown); - for (;;) pause(); - fprintf(stderr, "error: infinite loop terminated\n"); - return 42; + if (getpid() != 1) + /* Not an error because pause sees use outside of infra containers. */ + fprintf(stderr, "Warning: pause should be the first process in a pod\n"); + + if (sigaction(SIGINT, &(struct sigaction){.sa_handler = sigdown}, NULL) < 0) + return 1; + if (sigaction(SIGTERM, &(struct sigaction){.sa_handler = sigdown}, NULL) < 0) + return 2; + if (sigaction(SIGCHLD, &(struct sigaction){.sa_handler = sigreap, + .sa_flags = SA_NOCLDSTOP}, + NULL) < 0) + return 3; + + for (;;) + pause(); + fprintf(stderr, "Error: infinite loop terminated\n"); + return 42; } diff --git a/vendor/k8s.io/kubernetes/build/release-tars/BUILD b/vendor/k8s.io/kubernetes/build/release-tars/BUILD new file mode 100644 index 00000000..2acc3786 --- /dev/null +++ b/vendor/k8s.io/kubernetes/build/release-tars/BUILD @@ -0,0 +1,261 @@ +package(default_visibility = ["//visibility:public"]) + +load("@bazel_tools//tools/build_defs/pkg:pkg.bzl", "pkg_tar") + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], +) + +config_setting( + name = "embed_license_targets", + values = { + "define": "EMBED_LICENSE_TARGETS=true", + }, + visibility = ["//visibility:private"], +) + +pkg_tar( + name = "kubernetes-src", + extension = "tar.gz", + files = [ + "//:all-srcs", + ], + package_dir = "kubernetes", + strip_prefix = "//", +) + +# FIXME: this should be configurable/auto-detected +PLATFORM_ARCH_STRING = "linux-amd64" + +# KUBE_CLIENT_TARGETS +CLIENT_TARGETS = [ + "//cmd/kubectl", + "//federation/cmd/kubefed", +] + +# KUBE_NODE_TARGETS +NODE_TARGETS = [ + "//cmd/kube-proxy", + "//cmd/kubelet", +] + +# KUBE_SERVER_TARGETS +# No need to duplicate CLIENT_TARGETS or NODE_TARGETS here, +# since we include them in the actual build rule. +SERVER_TARGETS = [ + "//cmd/hyperkube", + "//cmd/kube-aggregator", + "//cmd/kube-apiserver", + "//cmd/kube-controller-manager", + "//cmd/kube-discovery", + "//cmd/kubeadm", + "//plugin/cmd/kube-scheduler", +] + +# kube::golang::test_targets +TEST_BINARY_TARGETS = [ + "//cmd/gendocs", + "//cmd/genkubedocs", + "//cmd/genman", + "//cmd/genswaggertypedocs", + "//cmd/genyaml", + "//cmd/linkcheck", + "//cmd/mungedocs", + "//examples/k8petstore/web-server/src", + "//federation/cmd/genfeddocs", + "//test/e2e:e2e.test", + "//vendor:github.com/onsi/ginkgo/ginkgo_bin", + "//cmd/kubemark", # TODO: server platforms only + "//test/e2e_node:e2e_node.test", # TODO: server platforms only +] + +TEST_PORTABLE_TARGETS = [ + "//federation/develop:all-srcs", + "//hack:e2e.go", + "//hack:federated-ginkgo-e2e.sh", + "//hack:get-build.sh", + "//hack:ginkgo-e2e.sh", + "//hack/e2e-internal:all-srcs", + "//hack/lib:all-srcs", + "//test/e2e/testing-manifests:all-srcs", + "//test/kubemark:all-srcs", +] + +# Included in node and server tarballs. +LICENSE_TARGETS = [ + "//:Godeps/LICENSES", + ":kubernetes-src.tar.gz", +] + +pkg_tar( + name = "_client-bin", + files = CLIENT_TARGETS, + mode = "0755", + package_dir = "client/bin", + visibility = ["//visibility:private"], +) + +pkg_tar( + name = "kubernetes-client-%s" % PLATFORM_ARCH_STRING, + extension = "tar.gz", + package_dir = "kubernetes", + deps = [ + ":_client-bin", + ], +) + +pkg_tar( + name = "_node-bin", + files = NODE_TARGETS + CLIENT_TARGETS, + mode = "0755", + package_dir = "node/bin", + visibility = ["//visibility:private"], +) + +pkg_tar( + name = "kubernetes-node-%s" % PLATFORM_ARCH_STRING, + extension = "tar.gz", + files = select({ + ":embed_license_targets": LICENSE_TARGETS, + "//conditions:default": [], + }), + mode = "0644", + package_dir = "kubernetes", + deps = [ + ":_node-bin", + ], +) + +pkg_tar( + name = "_server-bin", + files = SERVER_TARGETS + NODE_TARGETS + CLIENT_TARGETS + [ + "//build:docker-artifacts", + ], + mode = "0755", + package_dir = "server/bin", + visibility = ["//visibility:private"], +) + +genrule( + name = "dummy", + outs = [".dummy"], + cmd = "touch $@", +) + +# Some of the startup scripts fail if there isn't an addons/ directory in the server tarball. +pkg_tar( + name = "_server-addons", + files = [ + ":.dummy", + ], + package_dir = "addons", + visibility = ["//visibility:private"], +) + +pkg_tar( + name = "kubernetes-server-%s" % PLATFORM_ARCH_STRING, + extension = "tar.gz", + files = select({ + ":embed_license_targets": LICENSE_TARGETS, + "//conditions:default": [], + }), + mode = "0644", + package_dir = "kubernetes", + deps = [ + ":_server-addons", + ":_server-bin", + ], +) + +pkg_tar( + name = "_test-bin", + files = TEST_BINARY_TARGETS, + mode = "0755", + package_dir = "platforms/" + PLATFORM_ARCH_STRING.replace("-", "/"), + # TODO: how to make this multiplatform? + visibility = ["//visibility:private"], +) + +pkg_tar( + name = "kubernetes-test", + extension = "tar.gz", + files = TEST_PORTABLE_TARGETS, + package_dir = "kubernetes", + strip_prefix = "//", + deps = [ + # TODO: how to make this multiplatform? + ":_test-bin", + ], +) + +pkg_tar( + name = "_full_server", + files = [ + ":kubernetes-manifests.tar.gz", + ":kubernetes-salt.tar.gz", + ], + package_dir = "server", + visibility = ["//visibility:private"], +) + +pkg_tar( + name = "kubernetes", + extension = "tar.gz", + files = [ + # TODO: the version file + "//:README.md", + "//:Vagrantfile", + "//cluster:all-srcs", + "//docs:all-srcs", + "//examples:all-srcs", + "//third_party/htpasswd:all-srcs", + ] + select({ + ":embed_license_targets": ["//:Godeps/LICENSES"], + "//conditions:default": [], + }), + package_dir = "kubernetes", + strip_prefix = "//", + deps = [ + ":_full_server", + "//federation:release", + ], +) + +pkg_tar( + name = "kubernetes-manifests", + extension = "tar.gz", + deps = [ + "//cluster:manifests", + ], +) + +pkg_tar( + name = "kubernetes-salt", + extension = "tar.gz", + deps = [ + "//cluster/saltbase:salt", + ], +) + +filegroup( + name = "release-tars", + srcs = [ + ":kubernetes.tar.gz", + ":kubernetes-client-%s.tar.gz" % PLATFORM_ARCH_STRING, + ":kubernetes-node-%s.tar.gz" % PLATFORM_ARCH_STRING, + ":kubernetes-server-%s.tar.gz" % PLATFORM_ARCH_STRING, + ":kubernetes-manifests.tar.gz", + ":kubernetes-salt.tar.gz", + ":kubernetes-src.tar.gz", + ":kubernetes-test.tar.gz", + ], +) diff --git a/vendor/k8s.io/kubernetes/cluster/BUILD b/vendor/k8s.io/kubernetes/cluster/BUILD index ebc128fa..58250110 100644 --- a/vendor/k8s.io/kubernetes/cluster/BUILD +++ b/vendor/k8s.io/kubernetes/cluster/BUILD @@ -1,5 +1,7 @@ package(default_visibility = ["//visibility:public"]) +load("@bazel_tools//tools/build_defs/pkg:pkg.bzl", "pkg_tar") + licenses(["notice"]) filegroup( @@ -14,6 +16,31 @@ filegroup( srcs = [ ":package-srcs", "//cluster/addons:all-srcs", + "//cluster/gce:all-srcs", + "//cluster/saltbase:all-srcs", ], tags = ["automanaged"], ) + +# All of the manifests that are expected to be in a "gci-trusty" +# subdir of the manifests tarball. +pkg_tar( + name = "_manifests-gci-trusty", + package_dir = "gci-trusty", + visibility = ["//visibility:private"], + deps = [ + "//cluster/addons", + "//cluster/gce:gci-trusty-manifests", + "//cluster/saltbase:gci-trusty-salt-manifests", + ], +) + +pkg_tar( + name = "manifests", + mode = "0644", + package_dir = "kubernetes", + deps = [ + ":_manifests-gci-trusty", + "//cluster/saltbase:salt-manifests", + ], +) diff --git a/vendor/k8s.io/kubernetes/cluster/OWNERS b/vendor/k8s.io/kubernetes/cluster/OWNERS index 2716fee8..4e3f7877 100644 --- a/vendor/k8s.io/kubernetes/cluster/OWNERS +++ b/vendor/k8s.io/kubernetes/cluster/OWNERS @@ -1,4 +1,10 @@ -assignees: +reviewers: + - eparis + - jbeda + - mikedanese + - roberthbailey + - zmerlynn +approvers: - eparis - jbeda - mikedanese diff --git a/vendor/k8s.io/kubernetes/cluster/addons/BUILD b/vendor/k8s.io/kubernetes/cluster/addons/BUILD index 056847ca..cb6b276b 100644 --- a/vendor/k8s.io/kubernetes/cluster/addons/BUILD +++ b/vendor/k8s.io/kubernetes/cluster/addons/BUILD @@ -4,21 +4,14 @@ load("@bazel_tools//tools/build_defs/pkg:pkg.bzl", "pkg_tar") filegroup( name = "addon-srcs", - srcs = glob([ - "calico-policy-controller/*", - "cluster-loadbalancing/*", - "cluster-monitoring/*", - "dashboard/*", - "dns/*", - "etcd-empty-dir-cleanup/*", - "fluentd-elasticsearch/*", - "fluentd-gcp/*", - "gci/*", - "node-problem-detector/*", - "podsecuritypolicies/*", - "python-image/*", - "registry/*", - ]), + srcs = glob( + [ + "**/*.json", + "**/*.yaml", + "**/*.yaml.in", + ], + exclude = ["**/*demo*/**"], + ), ) pkg_tar( @@ -27,6 +20,7 @@ pkg_tar( files = [ ":addon-srcs", ], + mode = "0644", strip_prefix = ".", ) diff --git a/vendor/k8s.io/kubernetes/cluster/addons/cluster-monitoring/OWNERS b/vendor/k8s.io/kubernetes/cluster/addons/cluster-monitoring/OWNERS index 1e5be5fb..570bdb28 100644 --- a/vendor/k8s.io/kubernetes/cluster/addons/cluster-monitoring/OWNERS +++ b/vendor/k8s.io/kubernetes/cluster/addons/cluster-monitoring/OWNERS @@ -1,3 +1,6 @@ -assignees: - - DirectXMan12 - - piosz +approvers: +- DirectXMan12 +- piosz +reviewers: +- DirectXMan12 +- piosz diff --git a/vendor/k8s.io/kubernetes/cluster/addons/dns-horizontal-autoscaler/OWNERS b/vendor/k8s.io/kubernetes/cluster/addons/dns-horizontal-autoscaler/OWNERS index cbf63883..b9e1c0e5 100644 --- a/vendor/k8s.io/kubernetes/cluster/addons/dns-horizontal-autoscaler/OWNERS +++ b/vendor/k8s.io/kubernetes/cluster/addons/dns-horizontal-autoscaler/OWNERS @@ -1,3 +1,6 @@ -assignees: +approvers: +- bowei +- mrhohn +reviewers: - bowei - mrhohn diff --git a/vendor/k8s.io/kubernetes/cluster/addons/dns/OWNERS b/vendor/k8s.io/kubernetes/cluster/addons/dns/OWNERS index cbf63883..b9e1c0e5 100644 --- a/vendor/k8s.io/kubernetes/cluster/addons/dns/OWNERS +++ b/vendor/k8s.io/kubernetes/cluster/addons/dns/OWNERS @@ -1,3 +1,6 @@ -assignees: +approvers: +- bowei +- mrhohn +reviewers: - bowei - mrhohn diff --git a/vendor/k8s.io/kubernetes/cluster/addons/dns/kubedns-controller.yaml.base b/vendor/k8s.io/kubernetes/cluster/addons/dns/kubedns-controller.yaml.base index c6136592..30b17d53 100644 --- a/vendor/k8s.io/kubernetes/cluster/addons/dns/kubedns-controller.yaml.base +++ b/vendor/k8s.io/kubernetes/cluster/addons/dns/kubedns-controller.yaml.base @@ -47,7 +47,7 @@ spec: spec: containers: - name: kubedns - image: gcr.io/google_containers/k8s-dns-kube-dns-amd64:1.10.1 + image: gcr.io/google_containers/k8s-dns-kube-dns-amd64:1.11.0 resources: # TODO: Set memory limits when we've profiled the container for large # clusters, then set request = limit to keep this container in @@ -96,7 +96,7 @@ spec: name: metrics protocol: TCP - name: dnsmasq - image: gcr.io/google_containers/k8s-dns-dnsmasq-amd64:1.10.1 + image: gcr.io/google_containers/k8s-dns-dnsmasq-amd64:1.11.0 livenessProbe: httpGet: path: /healthcheck/dnsmasq @@ -124,7 +124,7 @@ spec: cpu: 150m memory: 10Mi - name: sidecar - image: gcr.io/google_containers/k8s-dns-sidecar-amd64:1.10.1 + image: gcr.io/google_containers/k8s-dns-sidecar-amd64:1.11.0 livenessProbe: httpGet: path: /metrics diff --git a/vendor/k8s.io/kubernetes/cluster/addons/dns/kubedns-controller.yaml.in b/vendor/k8s.io/kubernetes/cluster/addons/dns/kubedns-controller.yaml.in index db852896..2bbeb7ab 100644 --- a/vendor/k8s.io/kubernetes/cluster/addons/dns/kubedns-controller.yaml.in +++ b/vendor/k8s.io/kubernetes/cluster/addons/dns/kubedns-controller.yaml.in @@ -47,7 +47,7 @@ spec: spec: containers: - name: kubedns - image: gcr.io/google_containers/k8s-dns-kube-dns-amd64:1.10.1 + image: gcr.io/google_containers/k8s-dns-kube-dns-amd64:1.11.0 resources: # TODO: Set memory limits when we've profiled the container for large # clusters, then set request = limit to keep this container in @@ -96,7 +96,7 @@ spec: name: metrics protocol: TCP - name: dnsmasq - image: gcr.io/google_containers/k8s-dns-dnsmasq-amd64:1.10.1 + image: gcr.io/google_containers/k8s-dns-dnsmasq-amd64:1.11.0 livenessProbe: httpGet: path: /healthcheck/dnsmasq @@ -124,7 +124,7 @@ spec: cpu: 150m memory: 10Mi - name: sidecar - image: gcr.io/google_containers/k8s-dns-sidecar-amd64:1.10.1 + image: gcr.io/google_containers/k8s-dns-sidecar-amd64:1.11.0 livenessProbe: httpGet: path: /metrics diff --git a/vendor/k8s.io/kubernetes/cluster/addons/dns/kubedns-controller.yaml.sed b/vendor/k8s.io/kubernetes/cluster/addons/dns/kubedns-controller.yaml.sed index 424287bc..ab7d82ac 100644 --- a/vendor/k8s.io/kubernetes/cluster/addons/dns/kubedns-controller.yaml.sed +++ b/vendor/k8s.io/kubernetes/cluster/addons/dns/kubedns-controller.yaml.sed @@ -47,7 +47,7 @@ spec: spec: containers: - name: kubedns - image: gcr.io/google_containers/k8s-dns-kube-dns-amd64:1.10.1 + image: gcr.io/google_containers/k8s-dns-kube-dns-amd64:1.11.0 resources: # TODO: Set memory limits when we've profiled the container for large # clusters, then set request = limit to keep this container in @@ -95,7 +95,7 @@ spec: name: metrics protocol: TCP - name: dnsmasq - image: gcr.io/google_containers/k8s-dns-dnsmasq-amd64:1.10.1 + image: gcr.io/google_containers/k8s-dns-dnsmasq-amd64:1.11.0 livenessProbe: httpGet: path: /healthcheck/dnsmasq @@ -123,7 +123,7 @@ spec: cpu: 150m memory: 10Mi - name: sidecar - image: gcr.io/google_containers/k8s-dns-sidecar-amd64:1.10.1 + image: gcr.io/google_containers/k8s-dns-sidecar-amd64:1.11.0 livenessProbe: httpGet: path: /metrics diff --git a/vendor/k8s.io/kubernetes/cluster/addons/e2e-rbac-bindings/e2e-user-binding.yaml b/vendor/k8s.io/kubernetes/cluster/addons/e2e-rbac-bindings/e2e-user-binding.yaml deleted file mode 100644 index e70d320a..00000000 --- a/vendor/k8s.io/kubernetes/cluster/addons/e2e-rbac-bindings/e2e-user-binding.yaml +++ /dev/null @@ -1,19 +0,0 @@ -# This is the main user for the e2e tests. This is ok to leave long term -# since the first user in the test can reasonably be high power -# its kubecfg in gce -# TODO consider provisioning each test its namespace and giving it an -# admin user. This still has to exist, but e2e wouldn't normally use it -apiVersion: rbac.authorization.k8s.io/v1alpha1 -kind: ClusterRoleBinding -metadata: - name: e2e-user-cluster-admin - labels: - kubernetes.io/cluster-service: "true" -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: cluster-admin -subjects: -- apiVersion: rbac/v1alpha1 - kind: User - name: kubecfg diff --git a/vendor/k8s.io/kubernetes/cluster/addons/fluentd-elasticsearch/OWNERS b/vendor/k8s.io/kubernetes/cluster/addons/fluentd-elasticsearch/OWNERS index 005315d5..b2e859ee 100644 --- a/vendor/k8s.io/kubernetes/cluster/addons/fluentd-elasticsearch/OWNERS +++ b/vendor/k8s.io/kubernetes/cluster/addons/fluentd-elasticsearch/OWNERS @@ -1,3 +1,6 @@ -assignees: - - Crassirostris - - piosz +approvers: +- Crassirostris +- piosz +reviewers: +- Crassirostris +- piosz diff --git a/vendor/k8s.io/kubernetes/cluster/addons/fluentd-elasticsearch/es-controller.yaml b/vendor/k8s.io/kubernetes/cluster/addons/fluentd-elasticsearch/es-controller.yaml index ea03c737..b6f24cde 100644 --- a/vendor/k8s.io/kubernetes/cluster/addons/fluentd-elasticsearch/es-controller.yaml +++ b/vendor/k8s.io/kubernetes/cluster/addons/fluentd-elasticsearch/es-controller.yaml @@ -20,7 +20,7 @@ spec: kubernetes.io/cluster-service: "true" spec: containers: - - image: gcr.io/google_containers/elasticsearch:v2.4.1 + - image: gcr.io/google_containers/elasticsearch:v2.4.1-1 name: elasticsearch-logging resources: # need more cpu upon initialization, therefore burstable class diff --git a/vendor/k8s.io/kubernetes/cluster/addons/fluentd-elasticsearch/es-image/Makefile b/vendor/k8s.io/kubernetes/cluster/addons/fluentd-elasticsearch/es-image/Makefile index d7e17b93..f6bba5a2 100755 --- a/vendor/k8s.io/kubernetes/cluster/addons/fluentd-elasticsearch/es-image/Makefile +++ b/vendor/k8s.io/kubernetes/cluster/addons/fluentd-elasticsearch/es-image/Makefile @@ -16,7 +16,7 @@ # The current value of the tag to be used for building and # pushing an image to gcr.io -TAG = v2.4.1 +TAG = v2.4.1-1 build: elasticsearch_logging_discovery docker build --pull -t gcr.io/google_containers/elasticsearch:$(TAG) . diff --git a/vendor/k8s.io/kubernetes/cluster/addons/fluentd-elasticsearch/es-image/config/elasticsearch.yml b/vendor/k8s.io/kubernetes/cluster/addons/fluentd-elasticsearch/es-image/config/elasticsearch.yml index 848a07a2..a2ea62e9 100644 --- a/vendor/k8s.io/kubernetes/cluster/addons/fluentd-elasticsearch/es-image/config/elasticsearch.yml +++ b/vendor/k8s.io/kubernetes/cluster/addons/fluentd-elasticsearch/es-image/config/elasticsearch.yml @@ -1,5 +1,6 @@ cluster.name: kubernetes-logging +node.name: ${NODE_NAME} node.master: ${NODE_MASTER} node.data: ${NODE_DATA} diff --git a/vendor/k8s.io/kubernetes/cluster/addons/fluentd-elasticsearch/es-image/elasticsearch_logging_discovery.go b/vendor/k8s.io/kubernetes/cluster/addons/fluentd-elasticsearch/es-image/elasticsearch_logging_discovery.go index 91610191..265000be 100644 --- a/vendor/k8s.io/kubernetes/cluster/addons/fluentd-elasticsearch/es-image/elasticsearch_logging_discovery.go +++ b/vendor/k8s.io/kubernetes/cluster/addons/fluentd-elasticsearch/es-image/elasticsearch_logging_discovery.go @@ -24,9 +24,10 @@ import ( "time" "github.com/golang/glog" + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" - "k8s.io/kubernetes/pkg/client/restclient" ) func flattenSubsets(subsets []api.EndpointSubset) []string { @@ -52,10 +53,10 @@ func main() { if err != nil { glog.Fatalf("Failed to make client: %v", err) } - namespace := api.NamespaceSystem + namespace := metav1.NamespaceSystem envNamespace := os.Getenv("NAMESPACE") if envNamespace != "" { - if _, err := client.Core().Namespaces().Get(envNamespace); err != nil { + if _, err := client.Core().Namespaces().Get(envNamespace, meta_v1.GetOptions{}); err != nil { glog.Fatalf("%s namespace doesn't exist: %v", envNamespace, err) } namespace = envNamespace @@ -65,7 +66,7 @@ func main() { // Look for endpoints associated with the Elasticsearch loggging service. // First wait for the service to become available. for t := time.Now(); time.Since(t) < 5*time.Minute; time.Sleep(10 * time.Second) { - elasticsearch, err = client.Core().Services(namespace).Get("elasticsearch-logging") + elasticsearch, err = client.Core().Services(namespace).Get("elasticsearch-logging", meta_v1.GetOptions{}) if err == nil { break } @@ -82,7 +83,7 @@ func main() { // Wait for some endpoints. count := 0 for t := time.Now(); time.Since(t) < 5*time.Minute; time.Sleep(10 * time.Second) { - endpoints, err = client.Core().Endpoints(namespace).Get("elasticsearch-logging") + endpoints, err = client.Core().Endpoints(namespace).Get("elasticsearch-logging", meta_v1.GetOptions{}) if err != nil { continue } diff --git a/vendor/k8s.io/kubernetes/cluster/addons/fluentd-elasticsearch/es-image/run.sh b/vendor/k8s.io/kubernetes/cluster/addons/fluentd-elasticsearch/es-image/run.sh index 5d5f026d..6d334f69 100755 --- a/vendor/k8s.io/kubernetes/cluster/addons/fluentd-elasticsearch/es-image/run.sh +++ b/vendor/k8s.io/kubernetes/cluster/addons/fluentd-elasticsearch/es-image/run.sh @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +export NODE_NAME=${NODE_NAME:-${HOSTNAME}} export NODE_MASTER=${NODE_MASTER:-true} export NODE_DATA=${NODE_DATA:-true} export HTTP_PORT=${HTTP_PORT:-9200} diff --git a/vendor/k8s.io/kubernetes/cluster/addons/fluentd-gcp/OWNERS b/vendor/k8s.io/kubernetes/cluster/addons/fluentd-gcp/OWNERS index 005315d5..b2e859ee 100644 --- a/vendor/k8s.io/kubernetes/cluster/addons/fluentd-gcp/OWNERS +++ b/vendor/k8s.io/kubernetes/cluster/addons/fluentd-gcp/OWNERS @@ -1,3 +1,6 @@ -assignees: - - Crassirostris - - piosz +approvers: +- Crassirostris +- piosz +reviewers: +- Crassirostris +- piosz diff --git a/vendor/k8s.io/kubernetes/cluster/addons/fluentd-gcp/fluentd-gcp-ds.yaml b/vendor/k8s.io/kubernetes/cluster/addons/fluentd-gcp/fluentd-gcp-ds.yaml index e070f6f3..a9418633 100644 --- a/vendor/k8s.io/kubernetes/cluster/addons/fluentd-gcp/fluentd-gcp-ds.yaml +++ b/vendor/k8s.io/kubernetes/cluster/addons/fluentd-gcp/fluentd-gcp-ds.yaml @@ -2,23 +2,23 @@ apiVersion: extensions/v1beta1 kind: DaemonSet metadata: - name: fluentd-gcp-v1.31 + name: fluentd-gcp-v1.34 namespace: kube-system labels: k8s-app: fluentd-gcp kubernetes.io/cluster-service: "true" - version: v1.31 + version: v1.34 spec: template: metadata: labels: k8s-app: fluentd-gcp kubernetes.io/cluster-service: "true" - version: v1.31 + version: v1.34 spec: containers: - name: fluentd-gcp - image: gcr.io/google_containers/fluentd-gcp:1.32 + image: gcr.io/google_containers/fluentd-gcp:1.34 # If fluentd consumes its own logs, the following situation may happen: # fluentd fails to send a chunk to the server => writes it to the log => # tries to send this message to the server => fails to send a chunk and so on. @@ -40,8 +40,6 @@ spec: - name: varlibdockercontainers mountPath: /var/lib/docker/containers readOnly: true - - name: libsystemddir - mountPath: /host/lib # Liveness probe is aimed to help in situarions where fluentd # silently hangs for no apparent reasons until manual restart. # The idea of this probe is that if fluentd is not queueing or @@ -84,6 +82,3 @@ spec: - name: varlibdockercontainers hostPath: path: /var/lib/docker/containers - - name: libsystemddir - hostPath: - path: /usr/lib64 diff --git a/vendor/k8s.io/kubernetes/cluster/addons/fluentd-gcp/fluentd-gcp-image/Dockerfile b/vendor/k8s.io/kubernetes/cluster/addons/fluentd-gcp/fluentd-gcp-image/Dockerfile index 1481fd73..2b38e4ae 100644 --- a/vendor/k8s.io/kubernetes/cluster/addons/fluentd-gcp/fluentd-gcp-image/Dockerfile +++ b/vendor/k8s.io/kubernetes/cluster/addons/fluentd-gcp/fluentd-gcp-image/Dockerfile @@ -36,6 +36,7 @@ RUN apt-get -qq update && \ td-agent-gem install --no-document fluent-plugin-record-reformer -v 0.8.2 && \ td-agent-gem install --no-document fluent-plugin-systemd -v 0.0.5 && \ td-agent-gem install --no-document fluent-plugin-google-cloud -v 0.5.2 && \ + td-agent-gem install --no-document fluent-plugin-detect-exceptions -v 0.0.4 && \ # Remove build tools apt-get remove -y -qq gcc make && \ apt-get autoremove -y -qq && \ diff --git a/vendor/k8s.io/kubernetes/cluster/addons/fluentd-gcp/fluentd-gcp-image/Makefile b/vendor/k8s.io/kubernetes/cluster/addons/fluentd-gcp/fluentd-gcp-image/Makefile index c3c92206..1d998d33 100644 --- a/vendor/k8s.io/kubernetes/cluster/addons/fluentd-gcp/fluentd-gcp-image/Makefile +++ b/vendor/k8s.io/kubernetes/cluster/addons/fluentd-gcp/fluentd-gcp-image/Makefile @@ -26,7 +26,7 @@ .PHONY: build push PREFIX=gcr.io/google_containers -TAG = 1.32 +TAG = 1.34 build: docker build --pull -t $(PREFIX)/fluentd-gcp:$(TAG) . diff --git a/vendor/k8s.io/kubernetes/cluster/addons/fluentd-gcp/fluentd-gcp-image/fluent.conf b/vendor/k8s.io/kubernetes/cluster/addons/fluentd-gcp/fluentd-gcp-image/fluent.conf index 18a33384..3477072f 100644 --- a/vendor/k8s.io/kubernetes/cluster/addons/fluentd-gcp/fluentd-gcp-image/fluent.conf +++ b/vendor/k8s.io/kubernetes/cluster/addons/fluentd-gcp/fluentd-gcp-image/fluent.conf @@ -70,7 +70,18 @@ type record_reformer enable_ruby true - tag kubernetes.${tag_suffix[4].split('-')[0..-2].join('-')} + tag raw.kubernetes.${tag_suffix[4].split('-')[0..-2].join('-')} + + +# Detect exceptions in the log output and forward them as one log entry. + + type detect_exceptions + remove_tag_prefix raw + message log + stream stream + multiline_flush_interval 5 + max_bytes 500000 + max_lines 1000 # Example: diff --git a/vendor/k8s.io/kubernetes/cluster/addons/fluentd-gcp/fluentd-gcp-image/run.sh b/vendor/k8s.io/kubernetes/cluster/addons/fluentd-gcp/fluentd-gcp-image/run.sh index c1ec1036..48cf7b21 100755 --- a/vendor/k8s.io/kubernetes/cluster/addons/fluentd-gcp/fluentd-gcp-image/run.sh +++ b/vendor/k8s.io/kubernetes/cluster/addons/fluentd-gcp/fluentd-gcp-image/run.sh @@ -17,12 +17,6 @@ # For systems without journald mkdir -p /var/log/journal -if [ -e /host/lib/libsystemd* ] -then - rm /lib/x86_64-linux-gnu/libsystemd* - cp /host/lib/libsystemd* /lib/x86_64-linux-gnu/ -fi - LD_PRELOAD=/opt/td-agent/embedded/lib/libjemalloc.so RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR=0.9 diff --git a/vendor/k8s.io/kubernetes/cluster/aws/config-default.sh b/vendor/k8s.io/kubernetes/cluster/aws/config-default.sh index 0427892c..23fa3237 100644 --- a/vendor/k8s.io/kubernetes/cluster/aws/config-default.sh +++ b/vendor/k8s.io/kubernetes/cluster/aws/config-default.sh @@ -151,7 +151,7 @@ NODE_OS_DISTRIBUTION="${KUBE_OS_DISTRIBUTION}" KUBE_NODE_IMAGE="${KUBE_NODE_IMAGE:-}" COREOS_CHANNEL="${COREOS_CHANNEL:-alpha}" CONTAINER_RUNTIME="${KUBE_CONTAINER_RUNTIME:-docker}" -RKT_VERSION="${KUBE_RKT_VERSION:-1.14.0}" +RKT_VERSION="${KUBE_RKT_VERSION:-1.23.0}" NETWORK_PROVIDER="${NETWORK_PROVIDER:-kubenet}" # kubenet, opencontrail, flannel diff --git a/vendor/k8s.io/kubernetes/cluster/aws/config-test.sh b/vendor/k8s.io/kubernetes/cluster/aws/config-test.sh index 78ad8d87..27b4d756 100755 --- a/vendor/k8s.io/kubernetes/cluster/aws/config-test.sh +++ b/vendor/k8s.io/kubernetes/cluster/aws/config-test.sh @@ -137,7 +137,7 @@ NODE_OS_DISTRIBUTION="${KUBE_OS_DISTRIBUTION}" KUBE_NODE_IMAGE="${KUBE_NODE_IMAGE:-}" COREOS_CHANNEL="${COREOS_CHANNEL:-alpha}" CONTAINER_RUNTIME="${KUBE_CONTAINER_RUNTIME:-docker}" -RKT_VERSION="${KUBE_RKT_VERSION:-1.14.0}" +RKT_VERSION="${KUBE_RKT_VERSION:-1.23.0}" NETWORK_PROVIDER="${NETWORK_PROVIDER:-kubenet}" # kubenet, opencontrail, flannel diff --git a/vendor/k8s.io/kubernetes/cluster/aws/util.sh b/vendor/k8s.io/kubernetes/cluster/aws/util.sh index 6a6d36c6..7529b214 100755 --- a/vendor/k8s.io/kubernetes/cluster/aws/util.sh +++ b/vendor/k8s.io/kubernetes/cluster/aws/util.sh @@ -570,18 +570,6 @@ function verify-prereqs { fi } - -# Create a temp dir that'll be deleted at the end of this bash session. -# -# Vars set: -# KUBE_TEMP -function ensure-temp-dir { - if [[ -z ${KUBE_TEMP-} ]]; then - KUBE_TEMP=$(mktemp -d -t kubernetes.XXXXXX) - trap 'rm -rf "${KUBE_TEMP}"' EXIT - fi -} - # Take the local tar files and upload them to S3. They will then be # downloaded by the master as part of the start up script for the master. # diff --git a/vendor/k8s.io/kubernetes/cluster/azure-legacy/util.sh b/vendor/k8s.io/kubernetes/cluster/azure-legacy/util.sh index b2c7c434..d71fabab 100644 --- a/vendor/k8s.io/kubernetes/cluster/azure-legacy/util.sh +++ b/vendor/k8s.io/kubernetes/cluster/azure-legacy/util.sh @@ -100,17 +100,6 @@ function verify-prereqs { echo "==> CONTAINER: $CONTAINER" } -# Create a temp dir that'll be deleted at the end of this bash session. -# -# Vars set: -# KUBE_TEMP -function ensure-temp-dir { - if [[ -z ${KUBE_TEMP-} ]]; then - KUBE_TEMP=$(mktemp -d -t kubernetes.XXXXXX) - trap 'rm -rf "${KUBE_TEMP}"' EXIT - fi -} - # Take the local tar files and upload them to Azure Storage. They will then be # downloaded by the master as part of the start up script for the master. # diff --git a/vendor/k8s.io/kubernetes/cluster/common.sh b/vendor/k8s.io/kubernetes/cluster/common.sh index c6b89ea6..52c187c3 100755 --- a/vendor/k8s.io/kubernetes/cluster/common.sh +++ b/vendor/k8s.io/kubernetes/cluster/common.sh @@ -308,6 +308,17 @@ function load-or-gen-kube-bearertoken() { fi } +# Create a temp dir that'll be deleted at the end of this bash session. +# +# Vars set: +# KUBE_TEMP +function ensure-temp-dir { + if [[ -z ${KUBE_TEMP-} ]]; then + KUBE_TEMP=$(mktemp -d -t kubernetes.XXXXXX) + trap 'rm -rf "${KUBE_TEMP}"' EXIT + fi +} + # Get the master IP for the current-context in kubeconfig if one exists. # # Assumed vars: @@ -412,6 +423,30 @@ function tars_from_version() { fi } +# Search for the specified tarball in the various known output locations, +# echoing the location if found. +# +# Assumed vars: +# KUBE_ROOT +# +# Args: +# $1 name of tarball to search for +function find-tar() { + local -r tarball=$1 + locations=( + "${KUBE_ROOT}/server/${tarball}" + "${KUBE_ROOT}/_output/release-tars/${tarball}" + "${KUBE_ROOT}/bazel-bin/build/release-tars/${tarball}" + ) + location=$( (ls -t "${locations[@]}" 2>/dev/null || true) | head -1 ) + + if [[ ! -f "${location}" ]]; then + echo "!!! Cannot find ${tarball}" >&2 + exit 1 + fi + echo "${location}" +} + # Verify and find the various tar files that we are going to use on the server. # # Assumed vars: @@ -421,36 +456,14 @@ function tars_from_version() { # SALT_TAR # KUBE_MANIFESTS_TAR function find-release-tars() { - SERVER_BINARY_TAR="${KUBE_ROOT}/server/kubernetes-server-linux-amd64.tar.gz" - if [[ ! -f "${SERVER_BINARY_TAR}" ]]; then - SERVER_BINARY_TAR="${KUBE_ROOT}/_output/release-tars/kubernetes-server-linux-amd64.tar.gz" - fi - if [[ ! -f "${SERVER_BINARY_TAR}" ]]; then - echo "!!! Cannot find kubernetes-server-linux-amd64.tar.gz" >&2 - exit 1 - fi - - SALT_TAR="${KUBE_ROOT}/server/kubernetes-salt.tar.gz" - if [[ ! -f "${SALT_TAR}" ]]; then - SALT_TAR="${KUBE_ROOT}/_output/release-tars/kubernetes-salt.tar.gz" - fi - if [[ ! -f "${SALT_TAR}" ]]; then - echo "!!! Cannot find kubernetes-salt.tar.gz" >&2 - exit 1 - fi + SERVER_BINARY_TAR=$(find-tar kubernetes-server-linux-amd64.tar.gz) + SALT_TAR=$(find-tar kubernetes-salt.tar.gz) # This tarball is used by GCI, Ubuntu Trusty, and Container Linux. KUBE_MANIFESTS_TAR= if [[ "${MASTER_OS_DISTRIBUTION:-}" == "trusty" || "${MASTER_OS_DISTRIBUTION:-}" == "gci" || "${MASTER_OS_DISTRIBUTION:-}" == "container-linux" ]] || \ [[ "${NODE_OS_DISTRIBUTION:-}" == "trusty" || "${NODE_OS_DISTRIBUTION:-}" == "gci" || "${NODE_OS_DISTRIBUTION:-}" == "container-linux" ]] ; then - KUBE_MANIFESTS_TAR="${KUBE_ROOT}/server/kubernetes-manifests.tar.gz" - if [[ ! -f "${KUBE_MANIFESTS_TAR}" ]]; then - KUBE_MANIFESTS_TAR="${KUBE_ROOT}/_output/release-tars/kubernetes-manifests.tar.gz" - fi - if [[ ! -f "${KUBE_MANIFESTS_TAR}" ]]; then - echo "!!! Cannot find kubernetes-manifests.tar.gz" >&2 - exit 1 - fi + KUBE_MANIFESTS_TAR=$(find-tar kubernetes-manifests.tar.gz) fi } @@ -573,6 +586,7 @@ function build-kube-master-certs { KUBEAPISERVER_CERT: $(yaml-quote ${KUBEAPISERVER_CERT_BASE64:-}) KUBEAPISERVER_KEY: $(yaml-quote ${KUBEAPISERVER_KEY_BASE64:-}) KUBELET_AUTH_CA_CERT: $(yaml-quote ${KUBELET_AUTH_CA_CERT_BASE64:-}) +CA_KEY: $(yaml-quote ${CA_KEY_BASE64:-}) EOF } @@ -719,7 +733,7 @@ ENABLE_MANIFEST_URL: $(yaml-quote ${ENABLE_MANIFEST_URL:-false}) MANIFEST_URL: $(yaml-quote ${MANIFEST_URL:-}) MANIFEST_URL_HEADER: $(yaml-quote ${MANIFEST_URL_HEADER:-}) NUM_NODES: $(yaml-quote ${NUM_NODES}) -STORAGE_BACKEND: $(yaml-quote ${STORAGE_BACKEND:-etcd2}) +STORAGE_BACKEND: $(yaml-quote ${STORAGE_BACKEND:-etcd3}) ENABLE_GARBAGE_COLLECTOR: $(yaml-quote ${ENABLE_GARBAGE_COLLECTOR:-}) MASTER_ADVERTISE_ADDRESS: $(yaml-quote ${MASTER_ADVERTISE_ADDRESS:-}) ETCD_CA_KEY: $(yaml-quote ${ETCD_CA_KEY_BASE64:-}) @@ -948,6 +962,7 @@ function create-certs { CERT_DIR="${KUBE_TEMP}/easy-rsa-master/easyrsa3" # By default, linux wraps base64 output every 76 cols, so we use 'tr -d' to remove whitespaces. # Note 'base64 -w0' doesn't work on Mac OS X, which has different flags. + CA_KEY_BASE64=$(cat "${CERT_DIR}/pki/private/ca.key" | base64 | tr -d '\r\n') CA_CERT_BASE64=$(cat "${CERT_DIR}/pki/ca.crt" | base64 | tr -d '\r\n') MASTER_CERT_BASE64=$(cat "${CERT_DIR}/pki/issued/${MASTER_NAME}.crt" | base64 | tr -d '\r\n') MASTER_KEY_BASE64=$(cat "${CERT_DIR}/pki/private/${MASTER_NAME}.key" | base64 | tr -d '\r\n') @@ -995,7 +1010,12 @@ function generate-certs { mv "kubelet.pem" "pki/issued/kubelet.crt" rm -f "kubelet.csr" - ./easyrsa build-client-full kubecfg nopass + # Make a superuser client cert with subject "O=system:masters, CN=kubecfg" + ./easyrsa --dn-mode=org \ + --req-cn=kubecfg --req-org=system:masters \ + --req-c= --req-st= --req-city= --req-email= --req-ou= \ + build-client-full kubecfg nopass + cd ../kubelet ./easyrsa init-pki ./easyrsa --batch "--req-cn=kubelet@$(date +%s)" build-ca nopass @@ -1049,7 +1069,7 @@ function update-or-verify-gcloud() { ${sudo_prefix} gcloud ${gcloud_prompt:-} components install beta ${sudo_prefix} gcloud ${gcloud_prompt:-} components update else - local version=$(${sudo_prefix} gcloud version --format=json) + local version=$(gcloud version --format=json) python -c' import json,sys from distutils import version diff --git a/vendor/k8s.io/kubernetes/cluster/gce/BUILD b/vendor/k8s.io/kubernetes/cluster/gce/BUILD new file mode 100644 index 00000000..012508fc --- /dev/null +++ b/vendor/k8s.io/kubernetes/cluster/gce/BUILD @@ -0,0 +1,37 @@ +package(default_visibility = ["//visibility:public"]) + +load("@bazel_tools//tools/build_defs/pkg:pkg.bzl", "pkg_tar") + +pkg_tar( + name = "gci-trusty-manifests", + files = [ + "container-linux/configure-helper.sh", + "gci/configure-helper.sh", + "gci/health-monitor.sh", + "gci/mounter/mounter", + "trusty/configure-helper.sh", + ], + mode = "0755", + strip_prefix = ".", + # pkg_tar doesn't support renaming the files we add, so instead create symlinks. + symlinks = { + "container-linux-configure-helper.sh": "container-linux/configure-helper.sh", + "gci-configure-helper.sh": "gci/configure-helper.sh", + "health-monitor.sh": "gci/health-monitor.sh", + "gci-mounter": "gci/mounter/mounter", + "trusty-configure-helper.sh": "trusty/configure-helper.sh", + }, +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], +) diff --git a/vendor/k8s.io/kubernetes/cluster/gce/config-default.sh b/vendor/k8s.io/kubernetes/cluster/gce/config-default.sh index a63a2cc9..8144e26c 100755 --- a/vendor/k8s.io/kubernetes/cluster/gce/config-default.sh +++ b/vendor/k8s.io/kubernetes/cluster/gce/config-default.sh @@ -46,18 +46,26 @@ if [[ "${NODE_OS_DISTRIBUTION}" == "coreos" ]]; then NODE_OS_DISTRIBUTION="container-linux" fi +if [[ "${MASTER_OS_DISTRIBUTION}" == "cos" ]]; then + MASTER_OS_DISTRIBUTION="gci" +fi + +if [[ "${NODE_OS_DISTRIBUTION}" == "cos" ]]; then + NODE_OS_DISTRIBUTION="gci" +fi + # By default a cluster will be started with the master on GCI and nodes on # containervm. If you are updating the containervm version, update this # variable. Also please update corresponding image for node e2e at: # https://github.com/kubernetes/kubernetes/blob/master/test/e2e_node/jenkins/image-config.yaml -CVM_VERSION=container-vm-v20161208 +CVM_VERSION=${CVM_VERSION:-container-vm-v20170117} GCI_VERSION=${KUBE_GCI_VERSION:-gci-dev-56-8977-0-0} MASTER_IMAGE=${KUBE_GCE_MASTER_IMAGE:-} MASTER_IMAGE_PROJECT=${KUBE_GCE_MASTER_PROJECT:-google-containers} NODE_IMAGE=${KUBE_GCE_NODE_IMAGE:-${CVM_VERSION}} NODE_IMAGE_PROJECT=${KUBE_GCE_NODE_PROJECT:-google-containers} CONTAINER_RUNTIME=${KUBE_CONTAINER_RUNTIME:-docker} -RKT_VERSION=${KUBE_RKT_VERSION:-1.14.0} +RKT_VERSION=${KUBE_RKT_VERSION:-1.23.0} RKT_STAGE1_IMAGE=${KUBE_RKT_STAGE1_IMAGE:-coreos.com/rkt/stage1-coreos} NETWORK=${KUBE_GCE_NETWORK:-default} diff --git a/vendor/k8s.io/kubernetes/cluster/gce/config-test.sh b/vendor/k8s.io/kubernetes/cluster/gce/config-test.sh index c32a2928..26678f21 100755 --- a/vendor/k8s.io/kubernetes/cluster/gce/config-test.sh +++ b/vendor/k8s.io/kubernetes/cluster/gce/config-test.sh @@ -47,11 +47,19 @@ if [[ "${NODE_OS_DISTRIBUTION}" == "coreos" ]]; then NODE_OS_DISTRIBUTION="container-linux" fi +if [[ "${MASTER_OS_DISTRIBUTION}" == "cos" ]]; then + MASTER_OS_DISTRIBUTION="gci" +fi + +if [[ "${NODE_OS_DISTRIBUTION}" == "cos" ]]; then + NODE_OS_DISTRIBUTION="gci" +fi + # By default a cluster will be started with the master on GCI and nodes on # containervm. If you are updating the containervm version, update this # variable. Also please update corresponding image for node e2e at: # https://github.com/kubernetes/kubernetes/blob/master/test/e2e_node/jenkins/image-config.yaml -CVM_VERSION=container-vm-v20161208 +CVM_VERSION=${CVM_VERSION:-container-vm-v20170117} GCI_VERSION=${KUBE_GCI_VERSION:-gci-dev-56-8977-0-0} MASTER_IMAGE=${KUBE_GCE_MASTER_IMAGE:-} MASTER_IMAGE_PROJECT=${KUBE_GCE_MASTER_PROJECT:-google-containers} @@ -59,7 +67,7 @@ NODE_IMAGE=${KUBE_GCE_NODE_IMAGE:-${CVM_VERSION}} NODE_IMAGE_PROJECT=${KUBE_GCE_NODE_PROJECT:-google-containers} CONTAINER_RUNTIME=${KUBE_CONTAINER_RUNTIME:-docker} GCI_DOCKER_VERSION=${KUBE_GCI_DOCKER_VERSION:-} -RKT_VERSION=${KUBE_RKT_VERSION:-1.14.0} +RKT_VERSION=${KUBE_RKT_VERSION:-1.23.0} RKT_STAGE1_IMAGE=${KUBE_RKT_STAGE1_IMAGE:-coreos.com/rkt/stage1-coreos} NETWORK=${KUBE_GCE_NETWORK:-e2e} diff --git a/vendor/k8s.io/kubernetes/cluster/gce/container-linux/OWNERS b/vendor/k8s.io/kubernetes/cluster/gce/container-linux/OWNERS index 087c1e4e..6b3b69dd 100644 --- a/vendor/k8s.io/kubernetes/cluster/gce/container-linux/OWNERS +++ b/vendor/k8s.io/kubernetes/cluster/gce/container-linux/OWNERS @@ -1,4 +1,8 @@ -assignees: - - euank - - yifan-gu - - ethernetdan +approvers: +- euank +- yifan-gu +- ethernetdan +reviewers: +- euank +- yifan-gu +- ethernetdan diff --git a/vendor/k8s.io/kubernetes/cluster/gce/gci/configure-helper.sh b/vendor/k8s.io/kubernetes/cluster/gce/gci/configure-helper.sh index 2cc37037..98e210dd 100644 --- a/vendor/k8s.io/kubernetes/cluster/gce/gci/configure-helper.sh +++ b/vendor/k8s.io/kubernetes/cluster/gce/gci/configure-helper.sh @@ -68,7 +68,7 @@ function safe-format-and-mount() { # Format only if the disk is not already formatted. if ! tune2fs -l "${device}" ; then echo "Formatting '${device}'" - mkfs.ext4 -F -E lazy_itable_init=0,lazy_journal_init=0,discard "${device}" + mkfs.ext4 -F "${device}" fi mkdir -p "${mountpoint}" @@ -215,6 +215,9 @@ function create-master-auth { echo "${MASTER_CERT}" | base64 --decode > "${auth_dir}/server.cert" echo "${MASTER_KEY}" | base64 --decode > "${auth_dir}/server.key" fi + if [[ ! -z "${CA_KEY:-}" ]]; then + echo "${CA_KEY}" | base64 --decode > "${auth_dir}/ca.key" + fi if [ ! -e "${auth_dir}/kubeapiserver.cert" ] && [[ ! -z "${KUBEAPISERVER_CERT:-}" ]] && [[ ! -z "${KUBEAPISERVER_KEY:-}" ]]; then echo "${KUBEAPISERVER_CERT}" | base64 --decode > "${auth_dir}/kubeapiserver.cert" echo "${KUBEAPISERVER_KEY}" | base64 --decode > "${auth_dir}/kubeapiserver.key" @@ -971,6 +974,10 @@ function start-kube-controller-manager { if [[ -n "${CLUSTER_IP_RANGE:-}" ]]; then params+=" --cluster-cidr=${CLUSTER_IP_RANGE}" fi + if [[ -n "${CA_KEY:-}" ]]; then + params+=" --cluster-signing-cert-file=/etc/srv/kubernetes/ca.crt" + params+=" --cluster-signing-key-file=/etc/srv/kubernetes/ca.key" + fi if [[ -n "${SERVICE_CLUSTER_IP_RANGE:-}" ]]; then params+=" --service-cluster-ip-range=${SERVICE_CLUSTER_IP_RANGE}" fi diff --git a/vendor/k8s.io/kubernetes/cluster/gce/util.sh b/vendor/k8s.io/kubernetes/cluster/gce/util.sh index 8688f50c..fe119957 100755 --- a/vendor/k8s.io/kubernetes/cluster/gce/util.sh +++ b/vendor/k8s.io/kubernetes/cluster/gce/util.sh @@ -116,17 +116,6 @@ function verify-prereqs() { update-or-verify-gcloud } -# Create a temp dir that'll be deleted at the end of this bash session. -# -# Vars set: -# KUBE_TEMP -function ensure-temp-dir() { - if [[ -z ${KUBE_TEMP-} ]]; then - KUBE_TEMP=$(mktemp -d -t kubernetes.XXXXXX) - trap 'rm -rf "${KUBE_TEMP}"' EXIT - fi -} - # Use the gcloud defaults to find the project. If it is already set in the # environment then go with that. # diff --git a/vendor/k8s.io/kubernetes/cluster/images/hyperkube/Makefile b/vendor/k8s.io/kubernetes/cluster/images/hyperkube/Makefile index 2244d882..6c684977 100644 --- a/vendor/k8s.io/kubernetes/cluster/images/hyperkube/Makefile +++ b/vendor/k8s.io/kubernetes/cluster/images/hyperkube/Makefile @@ -21,6 +21,7 @@ REGISTRY?=gcr.io/google_containers ARCH?=amd64 TEMP_DIR:=$(shell mktemp -d -t hyperkubeXXXXXX) CNI_RELEASE=07a8a28637e97b22eb8dfe710eeae1344f69d16e +CACHEBUST?=1 UNAME_S:=$(shell uname -s) ifeq ($(UNAME_S),Darwin) @@ -78,7 +79,9 @@ endif cd ${TEMP_DIR} && sed -i.back "s|ARCH|${ARCH}|g" addons/singlenode/*.yaml addons/multinode/*.yaml static-pods/*.json cd ${TEMP_DIR} && sed -i.back "s|ARCH|${QEMUARCH}|g" Dockerfile cd ${TEMP_DIR} && sed -i.back "s|BASEIMAGE|${BASEIMAGE}|g" Dockerfile +ifeq ($(CACHEBUST),1) cd ${TEMP_DIR} && sed -i.back "s|CACHEBUST|$(shell uuidgen)|g" Dockerfile +endif cd ${TEMP_DIR} && sed -i.back "s|-amd64|-${ARCH}|g" addons/singlenode/*.yaml addons/multinode/*.yaml cd ${TEMP_DIR} && sed -i.back "s|__PILLAR__DNS__SERVER__|10.0.0.10|g" addons/singlenode/kubedns*.yaml addons/multinode/kubedns*.yaml cd ${TEMP_DIR} && sed -i.back "s|__PILLAR__DNS__DOMAIN__|cluster.local|g;s|__PILLAR__FEDERATIONS__DOMAIN__MAP__||g;" addons/singlenode/kubedns*.yaml addons/multinode/kubedns*.yaml diff --git a/vendor/k8s.io/kubernetes/cluster/juju/layers/kubernetes/templates/kubedns-controller.yaml b/vendor/k8s.io/kubernetes/cluster/juju/layers/kubernetes/templates/kubedns-controller.yaml index ac7b9fd3..d5107213 100644 --- a/vendor/k8s.io/kubernetes/cluster/juju/layers/kubernetes/templates/kubedns-controller.yaml +++ b/vendor/k8s.io/kubernetes/cluster/juju/layers/kubernetes/templates/kubedns-controller.yaml @@ -46,7 +46,7 @@ spec: spec: containers: - name: kubedns - image: gcr.io/google_containers/kubedns-{{ arch }}:1.9 + image: gcr.io/google_containers/k8s-dns-kube-dns-{{ arch }}:1.11.0 resources: # TODO: Set memory limits when we've profiled the container for large # clusters, then set request = limit to keep this container in @@ -120,7 +120,7 @@ spec: name: dns-tcp protocol: TCP - name: sidecar - image: gcr.io/google_containers/k8s-dns-sidecar-amd64:1.10.0 + image: gcr.io/google_containers/k8s-dns-sidecar-amd64:1.11.0 livenessProbe: httpGet: path: /metrics diff --git a/vendor/k8s.io/kubernetes/cluster/kubeadm.sh b/vendor/k8s.io/kubernetes/cluster/kubeadm.sh index 557cb10b..54cfb3d3 100755 --- a/vendor/k8s.io/kubernetes/cluster/kubeadm.sh +++ b/vendor/k8s.io/kubernetes/cluster/kubeadm.sh @@ -76,6 +76,7 @@ if [[ -z "${KUBEADM_PATH:-}" ]]; then "${KUBE_ROOT}/_output/bin/kubeadm" "${KUBE_ROOT}/_output/dockerized/bin/${host_os}/${host_arch}/kubeadm" "${KUBE_ROOT}/_output/local/bin/${host_os}/${host_arch}/kubeadm" + "${KUBE_ROOT}/bazel-bin/cmd/kubectl/kubeadm" "${KUBE_ROOT}/platforms/${host_os}/${host_arch}/kubeadm" ) kubeadm=$( (ls -t "${locations[@]}" 2>/dev/null || true) | head -1 ) diff --git a/vendor/k8s.io/kubernetes/cluster/kubectl.sh b/vendor/k8s.io/kubernetes/cluster/kubectl.sh index 7c37f28f..2e0c3c4d 100755 --- a/vendor/k8s.io/kubernetes/cluster/kubectl.sh +++ b/vendor/k8s.io/kubernetes/cluster/kubectl.sh @@ -88,6 +88,7 @@ if [[ -z "${KUBECTL_PATH:-}" ]]; then "${KUBE_ROOT}/_output/bin/kubectl" "${KUBE_ROOT}/_output/dockerized/bin/${host_os}/${host_arch}/kubectl" "${KUBE_ROOT}/_output/local/bin/${host_os}/${host_arch}/kubectl" + "${KUBE_ROOT}/bazel-bin/cmd/kubectl/kubectl" "${KUBE_ROOT}/platforms/${host_os}/${host_arch}/kubectl" ) kubectl=$( (ls -t "${locations[@]}" 2>/dev/null || true) | head -1 ) diff --git a/vendor/k8s.io/kubernetes/cluster/openstack-heat/config-default.sh b/vendor/k8s.io/kubernetes/cluster/openstack-heat/config-default.sh index 03442d97..8f1bb6ff 100644 --- a/vendor/k8s.io/kubernetes/cluster/openstack-heat/config-default.sh +++ b/vendor/k8s.io/kubernetes/cluster/openstack-heat/config-default.sh @@ -17,7 +17,7 @@ ## Contains configuration values for the Openstack cluster # Stack name -STACK_NAME=${STACK_NAME:-KubernetesStack} +STACK_NAME=${STACK_NAME:-kube-stack} # Keypair for kubernetes stack KUBERNETES_KEYPAIR_NAME=${KUBERNETES_KEYPAIR_NAME:-kubernetes_keypair} diff --git a/vendor/k8s.io/kubernetes/cluster/openstack-heat/kubernetes-heat/kubeminion.yaml b/vendor/k8s.io/kubernetes/cluster/openstack-heat/kubernetes-heat/kubeminion.yaml index 10c1b76e..0d4f0712 100644 --- a/vendor/k8s.io/kubernetes/cluster/openstack-heat/kubernetes-heat/kubeminion.yaml +++ b/vendor/k8s.io/kubernetes/cluster/openstack-heat/kubernetes-heat/kubeminion.yaml @@ -251,6 +251,7 @@ resources: server_name_post_fix: type: OS::Heat::RandomString properties: + character_classes: [{'class': 'lowercase', 'min': 1}] length: 8 kube_minion: diff --git a/vendor/k8s.io/kubernetes/cluster/openstack-heat/util.sh b/vendor/k8s.io/kubernetes/cluster/openstack-heat/util.sh index 4eec9513..53781a88 100644 --- a/vendor/k8s.io/kubernetes/cluster/openstack-heat/util.sh +++ b/vendor/k8s.io/kubernetes/cluster/openstack-heat/util.sh @@ -186,7 +186,13 @@ function run-heat-script() { # Automatically detect swift url if it wasn't specified if [[ -z $SWIFT_SERVER_URL ]]; then - SWIFT_SERVER_URL=$(openstack catalog show object-store --format value | egrep -o "publicURL: (.+)$" | cut -d" " -f2) + local rgx="" + if [ "$OS_IDENTITY_API_VERSION" = "3" ]; then + rgx="public: (.+)$" + else + rgx="publicURL: (.+)$" + fi + SWIFT_SERVER_URL=$(openstack catalog show object-store --format value | egrep -o "$rgx" | cut -d" " -f2) fi local swift_repo_url="${SWIFT_SERVER_URL}/kubernetes" diff --git a/vendor/k8s.io/kubernetes/cluster/photon-controller/util.sh b/vendor/k8s.io/kubernetes/cluster/photon-controller/util.sh index a6e769f7..bc9d0b57 100755 --- a/vendor/k8s.io/kubernetes/cluster/photon-controller/util.sh +++ b/vendor/k8s.io/kubernetes/cluster/photon-controller/util.sh @@ -1030,18 +1030,6 @@ function verify-cmd-in-path { } } -# -# Checks that KUBE_TEMP is set, or sets it -# If it sets it, it also creates the temporary directory -# and sets up a trap so that we delete it when we exit -# -function ensure-temp-dir { - if [[ -z ${KUBE_TEMP-} ]]; then - KUBE_TEMP=$(mktemp -d -t kubernetes.XXXXXX) - trap-add "rm -rf '${KUBE_TEMP}'" EXIT - fi -} - # # Repeatedly try a command over ssh until it succeeds or until five minutes have passed # The timeout isn't exact, since we assume the command runs instantaneously, and diff --git a/vendor/k8s.io/kubernetes/cluster/saltbase/BUILD b/vendor/k8s.io/kubernetes/cluster/saltbase/BUILD new file mode 100644 index 00000000..2ffcf082 --- /dev/null +++ b/vendor/k8s.io/kubernetes/cluster/saltbase/BUILD @@ -0,0 +1,87 @@ +package(default_visibility = ["//visibility:public"]) + +load("@bazel_tools//tools/build_defs/pkg:pkg.bzl", "pkg_tar") + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], +) + +# TODO(#3579): This is a temporary hack. It gathers up the yaml, +# yaml.in, json files in cluster/addons (minus any demos) and overlays +# them into kube-addons, where we expect them. +# These files are expected in a salt/kube-addons subdirectory. +pkg_tar( + name = "_salt_kube-addons", + package_dir = "salt/kube-addons", + strip_prefix = "/cluster/addons", + visibility = ["//visibility:private"], + deps = [ + "//cluster/addons", + ], +) + +pkg_tar( + name = "salt", + files = glob( + ["**"], + exclude = ["BUILD"], + ), + mode = "0644", + modes = { + "install.sh": "0755", + }, + package_dir = "kubernetes/saltbase", + strip_prefix = ".", + deps = [ + ":_salt_kube-addons", + ], +) + +# The following are used in the kubernetes salt tarball. +pkg_tar( + name = "salt-manifests", + files = [ + "salt/fluentd-gcp/fluentd-gcp.yaml", + "salt/kube-proxy/kube-proxy.manifest", + "salt/kube-registry-proxy/kube-registry-proxy.yaml", + ], + mode = "0644", +) + +pkg_tar( + name = "_kube-admission-controls", + files = glob(["salt/kube-admission-controls/limit-range/**"]), + mode = "0644", + # Maintain limit-range/ subdirectory in tarball + strip_prefix = "./salt/kube-admission-controls/", + visibility = ["//visibility:private"], +) + +pkg_tar( + name = "gci-trusty-salt-manifests", + files = [ + "salt/cluster-autoscaler/cluster-autoscaler.manifest", + "salt/e2e-image-puller/e2e-image-puller.manifest", + "salt/etcd/etcd.manifest", + "salt/kube-addons/kube-addon-manager.yaml", + "salt/kube-apiserver/abac-authz-policy.jsonl", + "salt/kube-apiserver/kube-apiserver.manifest", + "salt/kube-controller-manager/kube-controller-manager.manifest", + "salt/kube-scheduler/kube-scheduler.manifest", + "salt/l7-gcp/glbc.manifest", + "salt/rescheduler/rescheduler.manifest", + ], + mode = "0644", + deps = [ + "_kube-admission-controls", + ], +) diff --git a/vendor/k8s.io/kubernetes/cluster/saltbase/salt/fluentd-gcp/OWNERS b/vendor/k8s.io/kubernetes/cluster/saltbase/salt/fluentd-gcp/OWNERS index 005315d5..b2e859ee 100644 --- a/vendor/k8s.io/kubernetes/cluster/saltbase/salt/fluentd-gcp/OWNERS +++ b/vendor/k8s.io/kubernetes/cluster/saltbase/salt/fluentd-gcp/OWNERS @@ -1,3 +1,6 @@ -assignees: - - Crassirostris - - piosz +approvers: +- Crassirostris +- piosz +reviewers: +- Crassirostris +- piosz diff --git a/vendor/k8s.io/kubernetes/cluster/saltbase/salt/fluentd-gcp/fluentd-gcp.yaml b/vendor/k8s.io/kubernetes/cluster/saltbase/salt/fluentd-gcp/fluentd-gcp.yaml index d1816a4f..9d350987 100644 --- a/vendor/k8s.io/kubernetes/cluster/saltbase/salt/fluentd-gcp/fluentd-gcp.yaml +++ b/vendor/k8s.io/kubernetes/cluster/saltbase/salt/fluentd-gcp/fluentd-gcp.yaml @@ -10,7 +10,7 @@ spec: dnsPolicy: Default containers: - name: fluentd-cloud-logging - image: gcr.io/google_containers/fluentd-gcp:1.32 + image: gcr.io/google_containers/fluentd-gcp:1.34 # If fluentd consumes its own logs, the following situation may happen: # fluentd fails to send a chunk to the server => writes it to the log => # tries to send this message to the server => fails to send a chunk and so on. @@ -34,8 +34,6 @@ spec: - name: varlibdockercontainers mountPath: /var/lib/docker/containers readOnly: true - - name: libsystemddir - mountPath: /host/lib # Liveness probe is aimed to help in situarions where fluentd # silently hangs for no apparent reasons until manual restart. # The idea of this probe is that if fluentd is not queueing or @@ -51,10 +49,23 @@ spec: - '/bin/sh' - '-c' - > - LIVENESS_THRESHOLD_SECONDS=${LIVENESS_THRESHOLD_SECONDS:-600}; + LIVENESS_THRESHOLD_SECONDS=${LIVENESS_THRESHOLD_SECONDS:-300}; + STUCK_THRESHOLD_SECONDS=${LIVENESS_THRESHOLD_SECONDS:-900}; + if [ ! -e /var/log/fluentd-buffers ]; + then + exit 1; + fi; LAST_MODIFIED_DATE=`stat /var/log/fluentd-buffers | grep Modify | sed -r "s/Modify: (.*)/\1/"`; LAST_MODIFIED_TIMESTAMP=`date -d "$LAST_MODIFIED_DATE" +%s`; - if [ `date +%s` -gt `expr $LAST_MODIFIED_TIMESTAMP + $LIVENESS_THRESHOLD_SECONDS` ]; then exit 1; fi; + if [ `date +%s` -gt `expr $LAST_MODIFIED_TIMESTAMP + $STUCK_THRESHOLD_SECONDS` ]; + then + rm -rf /var/log/fluentd-buffers; + exit 1; + fi; + if [ `date +%s` -gt `expr $LAST_MODIFIED_TIMESTAMP + $LIVENESS_THRESHOLD_SECONDS` ]; + then + exit 1; + fi; terminationGracePeriodSeconds: 30 volumes: - name: varlog @@ -63,6 +74,3 @@ spec: - name: varlibdockercontainers hostPath: path: /var/lib/docker/containers - - name: libsystemddir - hostPath: - path: /usr/lib64 diff --git a/vendor/k8s.io/kubernetes/cluster/saltbase/salt/generate-cert/make-ca-cert.sh b/vendor/k8s.io/kubernetes/cluster/saltbase/salt/generate-cert/make-ca-cert.sh index ac227a2c..f4e23a81 100755 --- a/vendor/k8s.io/kubernetes/cluster/saltbase/salt/generate-cert/make-ca-cert.sh +++ b/vendor/k8s.io/kubernetes/cluster/saltbase/salt/generate-cert/make-ca-cert.sh @@ -99,7 +99,11 @@ else cp -p pki/issued/kubernetes-master.crt "${cert_dir}/server.cert" > /dev/null 2>&1 cp -p pki/private/kubernetes-master.key "${cert_dir}/server.key" > /dev/null 2>&1 fi -./easyrsa build-client-full kubecfg nopass > /dev/null 2>&1 +# Make a superuser client cert with subject "O=system:masters, CN=kubecfg" +./easyrsa --dn-mode=org \ + --req-cn=kubecfg --req-org=system:masters \ + --req-c= --req-st= --req-city= --req-email= --req-ou= \ + build-client-full kubecfg nopass > /dev/null 2>&1 cp -p pki/ca.crt "${cert_dir}/ca.crt" cp -p pki/issued/kubecfg.crt "${cert_dir}/kubecfg.crt" cp -p pki/private/kubecfg.key "${cert_dir}/kubecfg.key" diff --git a/vendor/k8s.io/kubernetes/cluster/saltbase/salt/helpers/safe_format_and_mount b/vendor/k8s.io/kubernetes/cluster/saltbase/salt/helpers/safe_format_and_mount index 90be230a..53cfe6cc 100644 --- a/vendor/k8s.io/kubernetes/cluster/saltbase/salt/helpers/safe_format_and_mount +++ b/vendor/k8s.io/kubernetes/cluster/saltbase/salt/helpers/safe_format_and_mount @@ -22,12 +22,9 @@ FSCK=fsck.ext4 MOUNT_OPTIONS="discard,defaults" -MKFS="mkfs.ext4 -E lazy_itable_init=0,lazy_journal_init=0 -F" +MKFS="mkfs.ext4 -F" if [ -e /etc/redhat-release ]; then - if grep -q '6\..' /etc/redhat-release; then - # lazy_journal_init is not recognized in redhat 6 - MKFS="mkfs.ext4 -E lazy_itable_init=0 -F" - elif grep -q '7\..' /etc/redhat-release; then + if grep -q '7\..' /etc/redhat-release; then FSCK=fsck.xfs MKFS=mkfs.xfs fi diff --git a/vendor/k8s.io/kubernetes/cluster/vagrant/util.sh b/vendor/k8s.io/kubernetes/cluster/vagrant/util.sh index 23255f79..0b4be7fd 100755 --- a/vendor/k8s.io/kubernetes/cluster/vagrant/util.sh +++ b/vendor/k8s.io/kubernetes/cluster/vagrant/util.sh @@ -104,17 +104,6 @@ function verify-prereqs { export USING_KUBE_SCRIPTS=true } -# Create a temp dir that'll be deleted at the end of this bash session. -# -# Vars set: -# KUBE_TEMP -function ensure-temp-dir { - if [[ -z ${KUBE_TEMP-} ]]; then - export KUBE_TEMP=$(mktemp -d -t kubernetes.XXXXXX) - trap 'rm -rf "${KUBE_TEMP}"' EXIT - fi -} - # Create a set of provision scripts for the master and each of the nodes function create-provision-scripts { ensure-temp-dir diff --git a/vendor/k8s.io/kubernetes/cluster/windows/kube-startup.ps1 b/vendor/k8s.io/kubernetes/cluster/windows/kube-startup.ps1 new file mode 100644 index 00000000..4f531407 --- /dev/null +++ b/vendor/k8s.io/kubernetes/cluster/windows/kube-startup.ps1 @@ -0,0 +1,91 @@ +# Copyright 2016 The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# kube-startup.ps1 is used to run kubelet and kubeproxy as a process. It uses nssm (https://nssm.cc/) process manager to register kubelet and kube-proxy process, +# The processes can be viewed using TaskManager(Taskmgr.exe). +# Please note that this startup script does not start the API server. Kubernetes control plane currently runs on Linux +# and only Kubelet and Kube-Proxy can be run on Windows + +param ( + [Parameter(Mandatory=$true)][string]$ContainerNetwork, + [string]$InterfaceForServiceIP = "vEthernet (HNS Internal NIC)", + [string]$LogDirectory = "C:\temp", + [Parameter(Mandatory=$true)][string]$Hostname, + [Parameter(Mandatory=$true)][string]$APIServer, + [string]$InfraContainerImage = "apprenda/pause", + [string]$ClusterDNS = "10.0.0.10", + [string]$KubeletExePath = ".\kubelet.exe", + [string]$KubeProxyExePath = ".\kube-proxy.exe" +) + +$kubeletDirectory = (Get-Item $KubeletExePath).Directory.FullName +$kubeproxyDirectory = (Get-Item $KubeProxyExePath).Directory.FullName + +# Assemble the Kubelet executable arguments +$kubeletArgs = @("--hostname-override=$Hostname","--pod-infra-container-image=$InfraContainerImage","--resolv-conf=""""","--api-servers=$APIServer","--cluster-dns=$ClusterDNS") +# Assemble the kube-proxy executable arguments +$kubeproxyArgs = @("--hostname-override=$Hostname","--proxy-mode=userspace","--bind-address=$Hostname","--master=$APIServer") + +# Setup kubelet service +nssm install kubelet "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" +nssm set kubelet Application "$KubeletExePath" +nssm set kubelet AppDirectory "$kubeletDirectory" +nssm set kubelet AppParameters $kubeletArgs +nssm set kubelet DisplayName kubelet +nssm set kubelet Description kubelet +nssm set kubelet Start SERVICE_AUTO_START +nssm set kubelet ObjectName LocalSystem +nssm set kubelet Type SERVICE_WIN32_OWN_PROCESS +# Delay restart if application runs for less than 1500 ms +nssm set kubelet AppThrottle 1500 +nssm set kubelet AppStdout "$LogDirectory\kubelet.log" +nssm set kubelet AppStderr "$LogDirectory\kubelet.err.log" +nssm set kubelet AppStdoutCreationDisposition 4 +nssm set kubelet AppStderrCreationDisposition 4 +nssm set kubelet AppRotateFiles 1 +nssm set kubelet AppRotateOnline 1 +# Rotate Logs Every 24 hours or 1 gb +nssm set kubelet AppRotateSeconds 86400 +nssm set kubelet AppRotateBytes 1073741824 +nssm set kubelet AppEnvironmentExtra CONTAINER_NETWORK=$ContainerNetwork + + +# Setup kube-proxy service +nssm install kube-proxy "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" +nssm set kube-proxy Application "$KubeProxyExePath" +nssm set kube-proxy AppDirectory "$kubeproxyDirectory" +nssm set kube-proxy AppParameters $kubeproxyArgs +nssm set kube-proxy DisplayName kube-proxy +nssm set kube-proxy Description kube-proxy +nssm set kube-proxy Start SERVICE_AUTO_START +nssm set kube-proxy ObjectName LocalSystem +nssm set kube-proxy Type SERVICE_WIN32_OWN_PROCESS +# Delay restart if application runs for less than 1500 ms +nssm set kube-proxy AppThrottle 1500 +nssm set kube-proxy AppStdout "$LogDirectory\kube-proxy.log" +nssm set kube-proxy AppStderr "$LogDirectory\kube-proxy.err.log" +nssm set kube-proxy AppStdoutCreationDisposition 4 +nssm set kube-proxy AppStderrCreationDisposition 4 +nssm set kube-proxy AppRotateFiles 1 +nssm set kube-proxy AppRotateOnline 1 +# Rotate Logs Every 24 hours or 1 gb +nssm set kube-proxy AppRotateSeconds 86400 +nssm set kube-proxy AppRotateBytes 1073741824 +nssm set kube-proxy AppEnvironmentExtra INTERFACE_TO_ADD_SERVICE_IP=$InterfaceForServiceIP + +# Start kubelet and kube-proxy Services +echo "Starting kubelet" +Start-Service kubelet +echo "Starting kube-proxy" +Start-Service kube-proxy diff --git a/vendor/k8s.io/kubernetes/cmd/OWNERS b/vendor/k8s.io/kubernetes/cmd/OWNERS index 03ca52f2..82e379f3 100644 --- a/vendor/k8s.io/kubernetes/cmd/OWNERS +++ b/vendor/k8s.io/kubernetes/cmd/OWNERS @@ -1,4 +1,9 @@ -assignees: +reviewers: + - dchen1107 + - lavalamp + - mikedanese + - thockin +approvers: - dchen1107 - lavalamp - mikedanese diff --git a/vendor/k8s.io/kubernetes/cmd/cloud-controller-manager/BUILD b/vendor/k8s.io/kubernetes/cmd/cloud-controller-manager/BUILD index c5c360cc..39a1cbef 100644 --- a/vendor/k8s.io/kubernetes/cmd/cloud-controller-manager/BUILD +++ b/vendor/k8s.io/kubernetes/cmd/cloud-controller-manager/BUILD @@ -30,7 +30,7 @@ go_library( "//pkg/version/verflag:go_default_library", "//vendor:github.com/golang/glog", "//vendor:github.com/spf13/pflag", - "//vendor:k8s.io/apiserver/pkg/healthz", + "//vendor:k8s.io/apiserver/pkg/server/healthz", ], ) diff --git a/vendor/k8s.io/kubernetes/cmd/cloud-controller-manager/app/BUILD b/vendor/k8s.io/kubernetes/cmd/cloud-controller-manager/app/BUILD index ddb913b7..f3a1fc23 100644 --- a/vendor/k8s.io/kubernetes/cmd/cloud-controller-manager/app/BUILD +++ b/vendor/k8s.io/kubernetes/cmd/cloud-controller-manager/app/BUILD @@ -19,8 +19,6 @@ go_library( "//pkg/client/leaderelection:go_default_library", "//pkg/client/leaderelection/resourcelock:go_default_library", "//pkg/client/record:go_default_library", - "//pkg/client/restclient:go_default_library", - "//pkg/client/unversioned/clientcmd:go_default_library", "//pkg/cloudprovider:go_default_library", "//pkg/controller:go_default_library", "//pkg/controller/cloud:go_default_library", @@ -32,8 +30,11 @@ go_library( "//vendor:github.com/prometheus/client_golang/prometheus", "//vendor:github.com/spf13/cobra", "//vendor:github.com/spf13/pflag", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/util/wait", - "//vendor:k8s.io/apiserver/pkg/healthz", + "//vendor:k8s.io/apiserver/pkg/server/healthz", + "//vendor:k8s.io/client-go/rest", + "//vendor:k8s.io/client-go/tools/clientcmd", ], ) diff --git a/vendor/k8s.io/kubernetes/cmd/cloud-controller-manager/app/controllermanager.go b/vendor/k8s.io/kubernetes/cmd/cloud-controller-manager/app/controllermanager.go index 8e32bbe6..9946ff65 100644 --- a/vendor/k8s.io/kubernetes/cmd/cloud-controller-manager/app/controllermanager.go +++ b/vendor/k8s.io/kubernetes/cmd/cloud-controller-manager/app/controllermanager.go @@ -25,8 +25,11 @@ import ( "strconv" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/apiserver/pkg/healthz" + "k8s.io/apiserver/pkg/server/healthz" + restclient "k8s.io/client-go/rest" + "k8s.io/client-go/tools/clientcmd" "k8s.io/kubernetes/cmd/cloud-controller-manager/app/options" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" @@ -34,8 +37,6 @@ import ( "k8s.io/kubernetes/pkg/client/leaderelection" "k8s.io/kubernetes/pkg/client/leaderelection/resourcelock" "k8s.io/kubernetes/pkg/client/record" - "k8s.io/kubernetes/pkg/client/restclient" - "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" "k8s.io/kubernetes/pkg/cloudprovider" "k8s.io/kubernetes/pkg/controller" nodecontroller "k8s.io/kubernetes/pkg/controller/cloud" @@ -158,7 +159,7 @@ func Run(s *options.CloudControllerManagerServer, cloud cloudprovider.Interface) // Lock required for leader election rl := resourcelock.EndpointsLock{ - EndpointsMeta: v1.ObjectMeta{ + EndpointsMeta: metav1.ObjectMeta{ Namespace: "kube-system", Name: "cloud-controller-manager", }, diff --git a/vendor/k8s.io/kubernetes/cmd/cloud-controller-manager/controller-manager.go b/vendor/k8s.io/kubernetes/cmd/cloud-controller-manager/controller-manager.go index 8840aaaa..7cd7a4c7 100644 --- a/vendor/k8s.io/kubernetes/cmd/cloud-controller-manager/controller-manager.go +++ b/vendor/k8s.io/kubernetes/cmd/cloud-controller-manager/controller-manager.go @@ -23,7 +23,7 @@ import ( "fmt" "os" - "k8s.io/apiserver/pkg/healthz" + "k8s.io/apiserver/pkg/server/healthz" "k8s.io/kubernetes/cmd/cloud-controller-manager/app" "k8s.io/kubernetes/cmd/cloud-controller-manager/app/options" _ "k8s.io/kubernetes/pkg/client/metrics/prometheus" // for client metric registration diff --git a/vendor/k8s.io/kubernetes/cmd/hyperkube/BUILD b/vendor/k8s.io/kubernetes/cmd/hyperkube/BUILD index ccafec89..abc675b8 100644 --- a/vendor/k8s.io/kubernetes/cmd/hyperkube/BUILD +++ b/vendor/k8s.io/kubernetes/cmd/hyperkube/BUILD @@ -66,7 +66,7 @@ go_library( "//plugin/cmd/kube-scheduler/app:go_default_library", "//plugin/cmd/kube-scheduler/app/options:go_default_library", "//vendor:github.com/spf13/pflag", - "//vendor:k8s.io/apiserver/pkg/healthz", + "//vendor:k8s.io/apiserver/pkg/server/healthz", ], ) diff --git a/vendor/k8s.io/kubernetes/cmd/hyperkube/kube-proxy.go b/vendor/k8s.io/kubernetes/cmd/hyperkube/kube-proxy.go index 1110852c..72828703 100644 --- a/vendor/k8s.io/kubernetes/cmd/hyperkube/kube-proxy.go +++ b/vendor/k8s.io/kubernetes/cmd/hyperkube/kube-proxy.go @@ -17,7 +17,7 @@ limitations under the License. package main import ( - "k8s.io/apiserver/pkg/healthz" + "k8s.io/apiserver/pkg/server/healthz" "k8s.io/kubernetes/cmd/kube-proxy/app" "k8s.io/kubernetes/cmd/kube-proxy/app/options" ) diff --git a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration/install/BUILD b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration/install/BUILD index 63246ac0..d7ebd07e 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration/install/BUILD +++ b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration/install/BUILD @@ -14,7 +14,10 @@ go_library( deps = [ "//cmd/kube-aggregator/pkg/apis/apiregistration:go_default_library", "//cmd/kube-aggregator/pkg/apis/apiregistration/v1alpha1:go_default_library", - "//pkg/apimachinery/announced:go_default_library", + "//pkg/api:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apimachinery/announced", + "//vendor:k8s.io/apimachinery/pkg/apimachinery/registered", + "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/sets", ], ) diff --git a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration/install/install.go b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration/install/install.go index ac1d7bb3..d0153691 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration/install/install.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration/install/install.go @@ -17,13 +17,21 @@ limitations under the License. package install import ( + "k8s.io/apimachinery/pkg/apimachinery/announced" + "k8s.io/apimachinery/pkg/apimachinery/registered" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration" "k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration/v1alpha1" - "k8s.io/kubernetes/pkg/apimachinery/announced" + "k8s.io/kubernetes/pkg/api" ) func init() { + Install(api.GroupFactoryRegistry, api.Registry, api.Scheme) +} + +// Install registers the API group and adds types to a scheme +func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) { if err := announced.NewGroupMetaFactory( &announced.GroupMetaFactoryArgs{ GroupName: apiregistration.GroupName, @@ -35,7 +43,7 @@ func init() { announced.VersionToSchemeFunc{ v1alpha1.SchemeGroupVersion.Version: v1alpha1.AddToScheme, }, - ).Announce().RegisterAndEnable(); err != nil { + ).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil { panic(err) } } diff --git a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration/register.go b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration/register.go index 28ef491f..aa9a02c1 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration/register.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration/register.go @@ -50,7 +50,7 @@ func addKnownTypes(scheme *runtime.Scheme) error { &APIServiceList{}, &kapi.ListOptions{}, - &kapi.DeleteOptions{}, + &metav1.DeleteOptions{}, &metav1.GetOptions{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) diff --git a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration/types.go b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration/types.go index 4a540a7c..cabe68d0 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration/types.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration/types.go @@ -16,10 +16,7 @@ limitations under the License. package apiregistration -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - kapi "k8s.io/kubernetes/pkg/api" -) +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" // APIServiceList is a list of APIService objects. type APIServiceList struct { @@ -75,7 +72,7 @@ type APIServiceStatus struct { // Name must be "version.group". type APIService struct { metav1.TypeMeta - kapi.ObjectMeta + metav1.ObjectMeta // Spec contains information for locating and communicating with a server Spec APIServiceSpec diff --git a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration/v1alpha1/BUILD b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration/v1alpha1/BUILD index cda8bc31..f4814fa9 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration/v1alpha1/BUILD +++ b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration/v1alpha1/BUILD @@ -20,7 +20,6 @@ go_library( tags = ["automanaged"], deps = [ "//cmd/kube-aggregator/pkg/apis/apiregistration:go_default_library", - "//pkg/api/v1:go_default_library", "//vendor:github.com/ugorji/go/codec", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/conversion", diff --git a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration/v1alpha1/register.go b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration/v1alpha1/register.go index 6e3d7118..f056093e 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration/v1alpha1/register.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration/v1alpha1/register.go @@ -20,7 +20,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/api/v1" ) const GroupName = "apiregistration.k8s.io" @@ -38,10 +37,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &APIService{}, &APIServiceList{}, - - &v1.ListOptions{}, - &v1.DeleteOptions{}, - &metav1.GetOptions{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil diff --git a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration/v1alpha1/types.generated.go b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration/v1alpha1/types.generated.go index dd6c9fc4..5e0b3a93 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration/v1alpha1/types.generated.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration/v1alpha1/types.generated.go @@ -26,8 +26,7 @@ import ( "fmt" codec1978 "github.com/ugorji/go/codec" pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - pkg3_types "k8s.io/apimachinery/pkg/types" - pkg2_v1 "k8s.io/kubernetes/pkg/api/v1" + pkg2_types "k8s.io/apimachinery/pkg/types" "reflect" "runtime" time "time" @@ -64,10 +63,9 @@ func init() { } if false { // reference the types, but skip this branch at build/run time var v0 pkg1_v1.TypeMeta - var v1 pkg3_types.UID - var v2 pkg2_v1.ObjectMeta - var v3 time.Time - _, _, _, _ = v0, v1, v2, v3 + var v1 pkg2_types.UID + var v2 time.Time + _, _, _ = v0, v1, v2 } } @@ -1340,7 +1338,13 @@ func (x *APIService) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -1350,7 +1354,13 @@ func (x *APIService) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -1474,24 +1484,30 @@ func (x *APIService) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = APIServiceSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = APIServiceStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -1504,16 +1520,16 @@ func (x *APIService) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1521,21 +1537,21 @@ func (x *APIService) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1543,38 +1559,44 @@ func (x *APIService) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1582,16 +1604,16 @@ func (x *APIService) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = APIServiceSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1599,21 +1621,21 @@ func (x *APIService) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = APIServiceStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } diff --git a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration/v1alpha1/types.go b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration/v1alpha1/types.go index 3bbc47b5..8f329894 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration/v1alpha1/types.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration/v1alpha1/types.go @@ -16,10 +16,7 @@ limitations under the License. package v1alpha1 -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - kapi "k8s.io/kubernetes/pkg/api/v1" -) +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" // APIServiceList is a list of APIService objects. type APIServiceList struct { @@ -74,8 +71,8 @@ type APIServiceStatus struct { // APIService represents a server for a particular GroupVersion. // Name must be "version.group". type APIService struct { - metav1.TypeMeta `json:",inline"` - kapi.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec contains information for locating and communicating with a server Spec APIServiceSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` diff --git a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration/v1alpha1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration/v1alpha1/zz_generated.conversion.go index 27c9a97f..debd300b 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration/v1alpha1/zz_generated.conversion.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration/v1alpha1/zz_generated.conversion.go @@ -49,10 +49,7 @@ func RegisterConversions(scheme *runtime.Scheme) error { } func autoConvert_v1alpha1_APIService_To_apiregistration_APIService(in *APIService, out *apiregistration.APIService, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1alpha1_APIServiceSpec_To_apiregistration_APIServiceSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -67,10 +64,7 @@ func Convert_v1alpha1_APIService_To_apiregistration_APIService(in *APIService, o } func autoConvert_apiregistration_APIService_To_v1alpha1_APIService(in *apiregistration.APIService, out *APIService, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_apiregistration_APIServiceSpec_To_v1alpha1_APIServiceSpec(&in.Spec, &out.Spec, s); err != nil { return err } diff --git a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration/v1alpha1/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration/v1alpha1/zz_generated.deepcopy.go index 9ed7285c..0cde9442 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration/v1alpha1/zz_generated.deepcopy.go @@ -21,9 +21,9 @@ limitations under the License. package v1alpha1 import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - v1 "k8s.io/kubernetes/pkg/api/v1" reflect "reflect" ) @@ -48,8 +48,10 @@ func DeepCopy_v1alpha1_APIService(in interface{}, out interface{}, c *conversion in := in.(*APIService) out := out.(*APIService) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v1alpha1_APIServiceSpec(&in.Spec, &out.Spec, c); err != nil { return err diff --git a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration/zz_generated.deepcopy.go index 3b7c610f..07b2ea48 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration/zz_generated.deepcopy.go @@ -21,9 +21,9 @@ limitations under the License. package apiregistration import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - api "k8s.io/kubernetes/pkg/api" reflect "reflect" ) @@ -48,8 +48,10 @@ func DeepCopy_apiregistration_APIService(in interface{}, out interface{}, c *con in := in.(*APIService) out := out.(*APIService) *out = *in - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_apiregistration_APIServiceSpec(&in.Spec, &out.Spec, c); err != nil { return err diff --git a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apiserver/BUILD b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apiserver/BUILD index f10dcc9d..ee945be5 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apiserver/BUILD +++ b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apiserver/BUILD @@ -8,54 +8,6 @@ load( "go_test", ) -go_library( - name = "go_default_library", - srcs = [ - "apiserver.go", - "apiservice_controller.go", - "handler_apis.go", - "handler_proxy.go", - ], - tags = ["automanaged"], - deps = [ - "//cmd/kube-aggregator/pkg/apis/apiregistration:go_default_library", - "//cmd/kube-aggregator/pkg/apis/apiregistration/v1alpha1:go_default_library", - "//cmd/kube-aggregator/pkg/client/clientset_generated/clientset:go_default_library", - "//cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset:go_default_library", - "//cmd/kube-aggregator/pkg/client/informers:go_default_library", - "//cmd/kube-aggregator/pkg/client/informers/apiregistration/internalversion:go_default_library", - "//cmd/kube-aggregator/pkg/client/listers/apiregistration/internalversion:go_default_library", - "//cmd/kube-aggregator/pkg/registry/apiservice/etcd:go_default_library", - "//pkg/api:go_default_library", - "//pkg/auth/handlers:go_default_library", - "//pkg/client/cache:go_default_library", - "//pkg/client/clientset_generated/clientset:go_default_library", - "//pkg/client/informers/informers_generated:go_default_library", - "//pkg/client/listers/core/v1:go_default_library", - "//pkg/client/restclient:go_default_library", - "//pkg/client/transport:go_default_library", - "//pkg/controller:go_default_library", - "//pkg/genericapiserver:go_default_library", - "//pkg/genericapiserver/api/filters:go_default_library", - "//pkg/genericapiserver/api/handlers/responsewriters:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", - "//pkg/genericapiserver/filters:go_default_library", - "//pkg/registry/generic:go_default_library", - "//pkg/registry/generic/rest:go_default_library", - "//pkg/util/httpstream/spdy:go_default_library", - "//pkg/util/workqueue:go_default_library", - "//pkg/version:go_default_library", - "//vendor:github.com/golang/glog", - "//vendor:k8s.io/apimachinery/pkg/api/errors", - "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", - "//vendor:k8s.io/apimachinery/pkg/labels", - "//vendor:k8s.io/apimachinery/pkg/runtime", - "//vendor:k8s.io/apimachinery/pkg/util/runtime", - "//vendor:k8s.io/apimachinery/pkg/util/wait", - "//vendor:k8s.io/apiserver/pkg/request", - ], -) - go_test( name = "go_default_test", srcs = [ @@ -76,7 +28,54 @@ go_test( "//vendor:k8s.io/apimachinery/pkg/util/diff", "//vendor:k8s.io/apimachinery/pkg/util/sets", "//vendor:k8s.io/apiserver/pkg/authentication/user", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", + ], +) + +go_library( + name = "go_default_library", + srcs = [ + "apiserver.go", + "apiservice_controller.go", + "handler_apis.go", + "handler_proxy.go", + ], + tags = ["automanaged"], + deps = [ + "//cmd/kube-aggregator/pkg/apis/apiregistration:go_default_library", + "//cmd/kube-aggregator/pkg/apis/apiregistration/v1alpha1:go_default_library", + "//cmd/kube-aggregator/pkg/client/clientset_generated/clientset:go_default_library", + "//cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset:go_default_library", + "//cmd/kube-aggregator/pkg/client/informers:go_default_library", + "//cmd/kube-aggregator/pkg/client/informers/apiregistration/internalversion:go_default_library", + "//cmd/kube-aggregator/pkg/client/listers/apiregistration/internalversion:go_default_library", + "//cmd/kube-aggregator/pkg/registry/apiservice/etcd:go_default_library", + "//pkg/api:go_default_library", + "//pkg/client/cache:go_default_library", + "//pkg/client/clientset_generated/clientset:go_default_library", + "//pkg/client/informers/informers_generated:go_default_library", + "//pkg/client/listers/core/v1:go_default_library", + "//pkg/controller:go_default_library", + "//pkg/genericapiserver/endpoints/filters:go_default_library", + "//pkg/genericapiserver/endpoints/handlers/responsewriters:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic/rest:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", + "//pkg/genericapiserver/server:go_default_library", + "//pkg/genericapiserver/server/filters:go_default_library", + "//pkg/util/httpstream/spdy:go_default_library", + "//pkg/util/workqueue:go_default_library", + "//pkg/version:go_default_library", + "//vendor:github.com/golang/glog", + "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/labels", + "//vendor:k8s.io/apimachinery/pkg/runtime", + "//vendor:k8s.io/apimachinery/pkg/util/runtime", + "//vendor:k8s.io/apimachinery/pkg/util/wait", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", + "//vendor:k8s.io/client-go/rest", + "//vendor:k8s.io/client-go/transport", ], ) diff --git a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apiserver/apiserver.go b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apiserver/apiserver.go index 7ebc5c3d..c779e83b 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apiserver/apiserver.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apiserver/apiserver.go @@ -22,16 +22,15 @@ import ( "time" "k8s.io/apimachinery/pkg/util/wait" - genericapirequest "k8s.io/apiserver/pkg/request" - authhandlers "k8s.io/kubernetes/pkg/auth/handlers" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" kubeclientset "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" kubeinformers "k8s.io/kubernetes/pkg/client/informers/informers_generated" v1listers "k8s.io/kubernetes/pkg/client/listers/core/v1" - "k8s.io/kubernetes/pkg/genericapiserver" - genericapifilters "k8s.io/kubernetes/pkg/genericapiserver/api/filters" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" - genericfilters "k8s.io/kubernetes/pkg/genericapiserver/filters" - "k8s.io/kubernetes/pkg/registry/generic" + genericapifilters "k8s.io/kubernetes/pkg/genericapiserver/endpoints/filters" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" + genericapiserver "k8s.io/kubernetes/pkg/genericapiserver/server" + genericfilters "k8s.io/kubernetes/pkg/genericapiserver/server/filters" "k8s.io/kubernetes/pkg/version" "k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration" @@ -191,7 +190,7 @@ func (h *handlerChainConfig) handlerChain(apiHandler http.Handler, c *genericapi handler = genericapifilters.WithImpersonation(handler, c.RequestContextMapper, c.Authorizer) // audit to stdout to help with debugging as we get this started handler = genericapifilters.WithAudit(handler, c.RequestContextMapper, os.Stdout) - handler = authhandlers.WithAuthentication(handler, c.RequestContextMapper, c.Authenticator, authhandlers.Unauthorized(c.SupportsBasicAuth)) + handler = genericapifilters.WithAuthentication(handler, c.RequestContextMapper, c.Authenticator, genericapifilters.Unauthorized(c.SupportsBasicAuth)) handler = genericfilters.WithCORS(handler, c.CorsAllowedOriginList, nil, nil, nil, "true") handler = genericfilters.WithPanicRecovery(handler, c.RequestContextMapper) diff --git a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apiserver/handler_apis.go b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apiserver/handler_apis.go index 7748df73..8671e21c 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apiserver/handler_apis.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apiserver/handler_apis.go @@ -26,7 +26,7 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/api" v1listers "k8s.io/kubernetes/pkg/client/listers/core/v1" - "k8s.io/kubernetes/pkg/genericapiserver/api/handlers/responsewriters" + "k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers/responsewriters" apiregistrationapi "k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration" apiregistrationv1alpha1api "k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration/v1alpha1" diff --git a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apiserver/handler_apis_test.go b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apiserver/handler_apis_test.go index 12d16d7e..a1cd3d79 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apiserver/handler_apis_test.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apiserver/handler_apis_test.go @@ -111,7 +111,7 @@ func TestAPIs(t *testing.T) { name: "simple add", apiservices: []*apiregistration.APIService{ { - ObjectMeta: api.ObjectMeta{Name: "v1.foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "v1.foo"}, Spec: apiregistration.APIServiceSpec{ Service: apiregistration.ServiceReference{ Namespace: "ns", @@ -123,7 +123,7 @@ func TestAPIs(t *testing.T) { }, }, { - ObjectMeta: api.ObjectMeta{Name: "v1.bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "v1.bar"}, Spec: apiregistration.APIServiceSpec{ Service: apiregistration.ServiceReference{ Namespace: "ns", @@ -172,7 +172,7 @@ func TestAPIs(t *testing.T) { name: "sorting", apiservices: []*apiregistration.APIService{ { - ObjectMeta: api.ObjectMeta{Name: "v1.foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "v1.foo"}, Spec: apiregistration.APIServiceSpec{ Service: apiregistration.ServiceReference{ Namespace: "ns", @@ -184,7 +184,7 @@ func TestAPIs(t *testing.T) { }, }, { - ObjectMeta: api.ObjectMeta{Name: "v2.bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "v2.bar"}, Spec: apiregistration.APIServiceSpec{ Service: apiregistration.ServiceReference{ Namespace: "ns", @@ -196,7 +196,7 @@ func TestAPIs(t *testing.T) { }, }, { - ObjectMeta: api.ObjectMeta{Name: "v2.foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "v2.foo"}, Spec: apiregistration.APIServiceSpec{ Service: apiregistration.ServiceReference{ Namespace: "ns", @@ -208,7 +208,7 @@ func TestAPIs(t *testing.T) { }, }, { - ObjectMeta: api.ObjectMeta{Name: "v1.bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "v1.bar"}, Spec: apiregistration.APIServiceSpec{ Service: apiregistration.ServiceReference{ Namespace: "ns", @@ -277,9 +277,9 @@ func TestAPIs(t *testing.T) { for _, o := range tc.apiservices { indexer.Add(o) } - serviceIndexer.Add(&corev1.Service{ObjectMeta: corev1.ObjectMeta{Namespace: "ns", Name: "api"}}) + serviceIndexer.Add(&corev1.Service{ObjectMeta: metav1.ObjectMeta{Namespace: "ns", Name: "api"}}) endpointsIndexer.Add(&corev1.Endpoints{ - ObjectMeta: corev1.ObjectMeta{Namespace: "ns", Name: "api"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "ns", Name: "api"}, Subsets: []corev1.EndpointSubset{ {Addresses: []corev1.EndpointAddress{{}}}, }, @@ -352,7 +352,7 @@ func TestAPIGroup(t *testing.T) { group: "foo", apiservices: []*apiregistration.APIService{ { - ObjectMeta: api.ObjectMeta{Name: "v1.foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "v1.foo"}, Spec: apiregistration.APIServiceSpec{ Service: apiregistration.ServiceReference{ Namespace: "ns", @@ -364,7 +364,7 @@ func TestAPIGroup(t *testing.T) { }, }, { - ObjectMeta: api.ObjectMeta{Name: "v2.bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "v2.bar"}, Spec: apiregistration.APIServiceSpec{ Service: apiregistration.ServiceReference{ Namespace: "ns", @@ -376,7 +376,7 @@ func TestAPIGroup(t *testing.T) { }, }, { - ObjectMeta: api.ObjectMeta{Name: "v2.foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "v2.foo"}, Spec: apiregistration.APIServiceSpec{ Service: apiregistration.ServiceReference{ Namespace: "ns", @@ -388,7 +388,7 @@ func TestAPIGroup(t *testing.T) { }, }, { - ObjectMeta: api.ObjectMeta{Name: "v1.bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "v1.bar"}, Spec: apiregistration.APIServiceSpec{ Service: apiregistration.ServiceReference{ Namespace: "ns", @@ -434,9 +434,9 @@ func TestAPIGroup(t *testing.T) { for _, o := range tc.apiservices { indexer.Add(o) } - serviceIndexer.Add(&corev1.Service{ObjectMeta: corev1.ObjectMeta{Namespace: "ns", Name: "api"}}) + serviceIndexer.Add(&corev1.Service{ObjectMeta: metav1.ObjectMeta{Namespace: "ns", Name: "api"}}) endpointsIndexer.Add(&corev1.Endpoints{ - ObjectMeta: corev1.ObjectMeta{Namespace: "ns", Name: "api"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "ns", Name: "api"}, Subsets: []corev1.EndpointSubset{ {Addresses: []corev1.EndpointAddress{{}}}, }, diff --git a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apiserver/handler_proxy.go b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apiserver/handler_proxy.go index df635838..2f8a35ce 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apiserver/handler_proxy.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apiserver/handler_proxy.go @@ -22,11 +22,11 @@ import ( "sync" "k8s.io/apimachinery/pkg/runtime" - genericapirequest "k8s.io/apiserver/pkg/request" - "k8s.io/kubernetes/pkg/client/restclient" - "k8s.io/kubernetes/pkg/client/transport" - "k8s.io/kubernetes/pkg/genericapiserver/api/handlers/responsewriters" - genericrest "k8s.io/kubernetes/pkg/registry/generic/rest" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" + restclient "k8s.io/client-go/rest" + "k8s.io/client-go/transport" + "k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers/responsewriters" + genericrest "k8s.io/kubernetes/pkg/genericapiserver/registry/generic/rest" "k8s.io/kubernetes/pkg/util/httpstream/spdy" apiregistrationapi "k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration" diff --git a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apiserver/handler_proxy_test.go b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apiserver/handler_proxy_test.go index 10a6f0ba..512f4bb3 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apiserver/handler_proxy_test.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/apiserver/handler_proxy_test.go @@ -25,10 +25,10 @@ import ( "strings" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apiserver/pkg/authentication/user" - genericapirequest "k8s.io/apiserver/pkg/request" - "k8s.io/kubernetes/pkg/api" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration" ) @@ -103,7 +103,7 @@ func TestProxyHandler(t *testing.T) { }, "no user": { apiService: &apiregistration.APIService{ - ObjectMeta: api.ObjectMeta{Name: "v1.foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "v1.foo"}, Spec: apiregistration.APIServiceSpec{ Group: "foo", Version: "v1", @@ -119,7 +119,7 @@ func TestProxyHandler(t *testing.T) { }, path: "/request/path", apiService: &apiregistration.APIService{ - ObjectMeta: api.ObjectMeta{Name: "v1.foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "v1.foo"}, Spec: apiregistration.APIServiceSpec{ Group: "foo", Version: "v1", @@ -144,7 +144,7 @@ func TestProxyHandler(t *testing.T) { }, path: "/request/path", apiService: &apiregistration.APIService{ - ObjectMeta: api.ObjectMeta{Name: "v1.foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "v1.foo"}, Spec: apiregistration.APIServiceSpec{ Group: "foo", Version: "v1", diff --git a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/BUILD b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/BUILD index bde00c57..414ccc15 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/BUILD +++ b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/BUILD @@ -16,11 +16,11 @@ go_library( tags = ["automanaged"], deps = [ "//cmd/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1alpha1:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/typed/discovery:go_default_library", - "//pkg/util/flowcontrol:go_default_library", - "//plugin/pkg/client/auth:go_default_library", "//vendor:github.com/golang/glog", + "//vendor:k8s.io/client-go/plugin/pkg/client/auth", + "//vendor:k8s.io/client-go/rest", + "//vendor:k8s.io/client-go/util/flowcontrol", ], ) diff --git a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/clientset.go b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/clientset.go index 6195f108..9a357a39 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/clientset.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/clientset.go @@ -18,11 +18,11 @@ package clientset import ( "github.com/golang/glog" + _ "k8s.io/client-go/plugin/pkg/client/auth" + rest "k8s.io/client-go/rest" + "k8s.io/client-go/util/flowcontrol" v1alpha1apiregistration "k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1alpha1" - restclient "k8s.io/kubernetes/pkg/client/restclient" discovery "k8s.io/kubernetes/pkg/client/typed/discovery" - "k8s.io/kubernetes/pkg/util/flowcontrol" - _ "k8s.io/kubernetes/plugin/pkg/client/auth" ) type Interface interface { @@ -65,7 +65,7 @@ func (c *Clientset) Discovery() discovery.DiscoveryInterface { } // NewForConfig creates a new Clientset for the given config. -func NewForConfig(c *restclient.Config) (*Clientset, error) { +func NewForConfig(c *rest.Config) (*Clientset, error) { configShallowCopy := *c if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) @@ -87,7 +87,7 @@ func NewForConfig(c *restclient.Config) (*Clientset, error) { // NewForConfigOrDie creates a new Clientset for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *Clientset { +func NewForConfigOrDie(c *rest.Config) *Clientset { var cs Clientset cs.ApiregistrationV1alpha1Client = v1alpha1apiregistration.NewForConfigOrDie(c) @@ -96,7 +96,7 @@ func NewForConfigOrDie(c *restclient.Config) *Clientset { } // New creates a new Clientset for the given RESTClient. -func New(c restclient.Interface) *Clientset { +func New(c rest.Interface) *Clientset { var cs Clientset cs.ApiregistrationV1alpha1Client = v1alpha1apiregistration.New(c) diff --git a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1alpha1/BUILD b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1alpha1/BUILD index 78a40fe3..4b2970dd 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1alpha1/BUILD +++ b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1alpha1/BUILD @@ -19,12 +19,12 @@ go_library( deps = [ "//cmd/kube-aggregator/pkg/apis/apiregistration/v1alpha1:go_default_library", "//pkg/api:go_default_library", - "//pkg/api/v1:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/runtime/serializer", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1alpha1/apiregistration_client.go b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1alpha1/apiregistration_client.go index b4b98713..743e2603 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1alpha1/apiregistration_client.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1alpha1/apiregistration_client.go @@ -20,18 +20,18 @@ import ( fmt "fmt" schema "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type ApiregistrationV1alpha1Interface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface APIServicesGetter } // ApiregistrationV1alpha1Client is used to interact with features provided by the apiregistration.k8s.io group. type ApiregistrationV1alpha1Client struct { - restClient restclient.Interface + restClient rest.Interface } func (c *ApiregistrationV1alpha1Client) APIServices() APIServiceInterface { @@ -39,12 +39,12 @@ func (c *ApiregistrationV1alpha1Client) APIServices() APIServiceInterface { } // NewForConfig creates a new ApiregistrationV1alpha1Client for the given config. -func NewForConfig(c *restclient.Config) (*ApiregistrationV1alpha1Client, error) { +func NewForConfig(c *rest.Config) (*ApiregistrationV1alpha1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -53,7 +53,7 @@ func NewForConfig(c *restclient.Config) (*ApiregistrationV1alpha1Client, error) // NewForConfigOrDie creates a new ApiregistrationV1alpha1Client for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *ApiregistrationV1alpha1Client { +func NewForConfigOrDie(c *rest.Config) *ApiregistrationV1alpha1Client { client, err := NewForConfig(c) if err != nil { panic(err) @@ -62,11 +62,11 @@ func NewForConfigOrDie(c *restclient.Config) *ApiregistrationV1alpha1Client { } // New creates a new ApiregistrationV1alpha1Client for the given RESTClient. -func New(c restclient.Interface) *ApiregistrationV1alpha1Client { +func New(c rest.Interface) *ApiregistrationV1alpha1Client { return &ApiregistrationV1alpha1Client{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { gv, err := schema.ParseGroupVersion("apiregistration.k8s.io/v1alpha1") if err != nil { return err @@ -77,7 +77,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/apis" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } copyGroupVersion := gv config.GroupVersion = ©GroupVersion @@ -89,7 +89,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *ApiregistrationV1alpha1Client) RESTClient() restclient.Interface { +func (c *ApiregistrationV1alpha1Client) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1alpha1/apiservice.go b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1alpha1/apiservice.go index 3c31fcb4..f0ea5821 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1alpha1/apiservice.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1alpha1/apiservice.go @@ -17,12 +17,12 @@ limitations under the License. package v1alpha1 import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" v1alpha1 "k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration/v1alpha1" api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // APIServicesGetter has a method to return a APIServiceInterface. @@ -38,16 +38,16 @@ type APIServiceInterface interface { UpdateStatus(*v1alpha1.APIService) (*v1alpha1.APIService, error) Delete(name string, options *v1.DeleteOptions) error DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options meta_v1.GetOptions) (*v1alpha1.APIService, error) + Get(name string, options v1.GetOptions) (*v1alpha1.APIService, error) List(opts v1.ListOptions) (*v1alpha1.APIServiceList, error) Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.APIService, err error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.APIService, err error) APIServiceExpansion } // aPIServices implements APIServiceInterface type aPIServices struct { - client restclient.Interface + client rest.Interface } // newAPIServices returns a APIServices @@ -116,7 +116,7 @@ func (c *aPIServices) DeleteCollection(options *v1.DeleteOptions, listOptions v1 } // Get takes name of the aPIService, and returns the corresponding aPIService object, and an error if there is any. -func (c *aPIServices) Get(name string, options meta_v1.GetOptions) (result *v1alpha1.APIService, err error) { +func (c *aPIServices) Get(name string, options v1.GetOptions) (result *v1alpha1.APIService, err error) { result = &v1alpha1.APIService{} err = c.client.Get(). Resource("apiservices"). @@ -148,7 +148,7 @@ func (c *aPIServices) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched aPIService. -func (c *aPIServices) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.APIService, err error) { +func (c *aPIServices) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.APIService, err error) { result = &v1alpha1.APIService{} err = c.client.Patch(pt). Resource("apiservices"). diff --git a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1alpha1/fake/BUILD b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1alpha1/fake/BUILD index 9b37f5f4..c1d8b283 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1alpha1/fake/BUILD +++ b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1alpha1/fake/BUILD @@ -18,14 +18,13 @@ go_library( deps = [ "//cmd/kube-aggregator/pkg/apis/apiregistration/v1alpha1:go_default_library", "//cmd/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1alpha1:go_default_library", - "//pkg/api:go_default_library", - "//pkg/api/v1:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1alpha1/fake/fake_apiregistration_client.go b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1alpha1/fake/fake_apiregistration_client.go index d4a242fb..48040a27 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1alpha1/fake/fake_apiregistration_client.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1alpha1/fake/fake_apiregistration_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" v1alpha1 "k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1alpha1" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -32,7 +32,7 @@ func (c *FakeApiregistrationV1alpha1) APIServices() v1alpha1.APIServiceInterface // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeApiregistrationV1alpha1) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeApiregistrationV1alpha1) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1alpha1/fake/fake_apiservice.go b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1alpha1/fake/fake_apiservice.go index e759a576..308fb1cd 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1alpha1/fake/fake_apiservice.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1alpha1/fake/fake_apiservice.go @@ -17,13 +17,12 @@ limitations under the License. package fake import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" v1alpha1 "k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration/v1alpha1" - api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -74,7 +73,7 @@ func (c *FakeAPIServices) DeleteCollection(options *v1.DeleteOptions, listOption return err } -func (c *FakeAPIServices) Get(name string, options meta_v1.GetOptions) (result *v1alpha1.APIService, err error) { +func (c *FakeAPIServices) Get(name string, options v1.GetOptions) (result *v1alpha1.APIService, err error) { obj, err := c.Fake. Invokes(core.NewRootGetAction(apiservicesResource, name), &v1alpha1.APIService{}) if obj == nil { @@ -110,7 +109,7 @@ func (c *FakeAPIServices) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched aPIService. -func (c *FakeAPIServices) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.APIService, err error) { +func (c *FakeAPIServices) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.APIService, err error) { obj, err := c.Fake. Invokes(core.NewRootPatchSubresourceAction(apiservicesResource, name, data, subresources...), &v1alpha1.APIService{}) if obj == nil { diff --git a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/BUILD b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/BUILD index a59b5d53..c823fa44 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/BUILD +++ b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/BUILD @@ -16,11 +16,11 @@ go_library( tags = ["automanaged"], deps = [ "//cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/typed/discovery:go_default_library", - "//pkg/util/flowcontrol:go_default_library", - "//plugin/pkg/client/auth:go_default_library", "//vendor:github.com/golang/glog", + "//vendor:k8s.io/client-go/plugin/pkg/client/auth", + "//vendor:k8s.io/client-go/rest", + "//vendor:k8s.io/client-go/util/flowcontrol", ], ) diff --git a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/clientset.go b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/clientset.go index 64a53e67..0d86bb3f 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/clientset.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/clientset.go @@ -18,11 +18,11 @@ package internalclientset import ( "github.com/golang/glog" + _ "k8s.io/client-go/plugin/pkg/client/auth" + rest "k8s.io/client-go/rest" + "k8s.io/client-go/util/flowcontrol" internalversionapiregistration "k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion" - restclient "k8s.io/kubernetes/pkg/client/restclient" discovery "k8s.io/kubernetes/pkg/client/typed/discovery" - "k8s.io/kubernetes/pkg/util/flowcontrol" - _ "k8s.io/kubernetes/plugin/pkg/client/auth" ) type Interface interface { @@ -54,7 +54,7 @@ func (c *Clientset) Discovery() discovery.DiscoveryInterface { } // NewForConfig creates a new Clientset for the given config. -func NewForConfig(c *restclient.Config) (*Clientset, error) { +func NewForConfig(c *rest.Config) (*Clientset, error) { configShallowCopy := *c if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) @@ -76,7 +76,7 @@ func NewForConfig(c *restclient.Config) (*Clientset, error) { // NewForConfigOrDie creates a new Clientset for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *Clientset { +func NewForConfigOrDie(c *rest.Config) *Clientset { var cs Clientset cs.ApiregistrationClient = internalversionapiregistration.NewForConfigOrDie(c) @@ -85,7 +85,7 @@ func NewForConfigOrDie(c *restclient.Config) *Clientset { } // New creates a new Clientset for the given RESTClient. -func New(c restclient.Interface) *Clientset { +func New(c rest.Interface) *Clientset { var cs Clientset cs.ApiregistrationClient = internalversionapiregistration.New(c) diff --git a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion/BUILD b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion/BUILD index 7f4d283e..76b6bd31 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion/BUILD +++ b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion/BUILD @@ -19,9 +19,10 @@ go_library( deps = [ "//cmd/kube-aggregator/pkg/apis/apiregistration:go_default_library", "//pkg/api:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion/apiregistration_client.go b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion/apiregistration_client.go index c936c16c..f4a65d36 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion/apiregistration_client.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion/apiregistration_client.go @@ -17,18 +17,18 @@ limitations under the License. package internalversion import ( + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type ApiregistrationInterface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface APIServicesGetter } // ApiregistrationClient is used to interact with features provided by the apiregistration.k8s.io group. type ApiregistrationClient struct { - restClient restclient.Interface + restClient rest.Interface } func (c *ApiregistrationClient) APIServices() APIServiceInterface { @@ -36,12 +36,12 @@ func (c *ApiregistrationClient) APIServices() APIServiceInterface { } // NewForConfig creates a new ApiregistrationClient for the given config. -func NewForConfig(c *restclient.Config) (*ApiregistrationClient, error) { +func NewForConfig(c *rest.Config) (*ApiregistrationClient, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -50,7 +50,7 @@ func NewForConfig(c *restclient.Config) (*ApiregistrationClient, error) { // NewForConfigOrDie creates a new ApiregistrationClient for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *ApiregistrationClient { +func NewForConfigOrDie(c *rest.Config) *ApiregistrationClient { client, err := NewForConfig(c) if err != nil { panic(err) @@ -59,11 +59,11 @@ func NewForConfigOrDie(c *restclient.Config) *ApiregistrationClient { } // New creates a new ApiregistrationClient for the given RESTClient. -func New(c restclient.Interface) *ApiregistrationClient { +func New(c rest.Interface) *ApiregistrationClient { return &ApiregistrationClient{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { // if apiregistration group is not registered, return an error g, err := api.Registry.Group("apiregistration.k8s.io") if err != nil { @@ -71,7 +71,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/apis" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } if config.GroupVersion == nil || config.GroupVersion.Group != g.GroupVersion.Group { copyGroupVersion := g.GroupVersion @@ -90,7 +90,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *ApiregistrationClient) RESTClient() restclient.Interface { +func (c *ApiregistrationClient) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion/apiservice.go b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion/apiservice.go index 6392e7ce..78d194a0 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion/apiservice.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion/apiservice.go @@ -18,10 +18,11 @@ package internalversion import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" apiregistration "k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // APIServicesGetter has a method to return a APIServiceInterface. @@ -35,18 +36,18 @@ type APIServiceInterface interface { Create(*apiregistration.APIService) (*apiregistration.APIService, error) Update(*apiregistration.APIService) (*apiregistration.APIService, error) UpdateStatus(*apiregistration.APIService) (*apiregistration.APIService, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error Get(name string, options v1.GetOptions) (*apiregistration.APIService, error) - List(opts api.ListOptions) (*apiregistration.APIServiceList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *apiregistration.APIService, err error) + List(opts v1.ListOptions) (*apiregistration.APIServiceList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *apiregistration.APIService, err error) APIServiceExpansion } // aPIServices implements APIServiceInterface type aPIServices struct { - client restclient.Interface + client rest.Interface } // newAPIServices returns a APIServices @@ -95,7 +96,7 @@ func (c *aPIServices) UpdateStatus(aPIService *apiregistration.APIService) (resu } // Delete takes name of the aPIService and deletes it. Returns an error if one occurs. -func (c *aPIServices) Delete(name string, options *api.DeleteOptions) error { +func (c *aPIServices) Delete(name string, options *v1.DeleteOptions) error { return c.client.Delete(). Resource("apiservices"). Name(name). @@ -105,7 +106,7 @@ func (c *aPIServices) Delete(name string, options *api.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *aPIServices) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *aPIServices) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { return c.client.Delete(). Resource("apiservices"). VersionedParams(&listOptions, api.ParameterCodec). @@ -127,7 +128,7 @@ func (c *aPIServices) Get(name string, options v1.GetOptions) (result *apiregist } // List takes label and field selectors, and returns the list of APIServices that match those selectors. -func (c *aPIServices) List(opts api.ListOptions) (result *apiregistration.APIServiceList, err error) { +func (c *aPIServices) List(opts v1.ListOptions) (result *apiregistration.APIServiceList, err error) { result = &apiregistration.APIServiceList{} err = c.client.Get(). Resource("apiservices"). @@ -138,7 +139,7 @@ func (c *aPIServices) List(opts api.ListOptions) (result *apiregistration.APISer } // Watch returns a watch.Interface that watches the requested aPIServices. -func (c *aPIServices) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *aPIServices) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Resource("apiservices"). @@ -147,7 +148,7 @@ func (c *aPIServices) Watch(opts api.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched aPIService. -func (c *aPIServices) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *apiregistration.APIService, err error) { +func (c *aPIServices) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *apiregistration.APIService, err error) { result = &apiregistration.APIService{} err = c.client.Patch(pt). Resource("apiservices"). diff --git a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion/fake/BUILD b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion/fake/BUILD index db33eeac..906a253c 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion/fake/BUILD +++ b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion/fake/BUILD @@ -18,13 +18,13 @@ go_library( deps = [ "//cmd/kube-aggregator/pkg/apis/apiregistration:go_default_library", "//cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion:go_default_library", - "//pkg/api:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion/fake/fake_apiregistration_client.go b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion/fake/fake_apiregistration_client.go index 887fb550..4d9020e8 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion/fake/fake_apiregistration_client.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion/fake/fake_apiregistration_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" internalversion "k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -32,7 +32,7 @@ func (c *FakeApiregistration) APIServices() internalversion.APIServiceInterface // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeApiregistration) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeApiregistration) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion/fake/fake_apiservice.go b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion/fake/fake_apiservice.go index af9daf55..dc477397 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion/fake/fake_apiservice.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion/fake/fake_apiservice.go @@ -20,9 +20,9 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" apiregistration "k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration" - api "k8s.io/kubernetes/pkg/api" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -60,13 +60,13 @@ func (c *FakeAPIServices) UpdateStatus(aPIService *apiregistration.APIService) ( return obj.(*apiregistration.APIService), err } -func (c *FakeAPIServices) Delete(name string, options *api.DeleteOptions) error { +func (c *FakeAPIServices) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewRootDeleteAction(apiservicesResource, name), &apiregistration.APIService{}) return err } -func (c *FakeAPIServices) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *FakeAPIServices) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := core.NewRootDeleteCollectionAction(apiservicesResource, listOptions) _, err := c.Fake.Invokes(action, &apiregistration.APIServiceList{}) @@ -82,7 +82,7 @@ func (c *FakeAPIServices) Get(name string, options v1.GetOptions) (result *apire return obj.(*apiregistration.APIService), err } -func (c *FakeAPIServices) List(opts api.ListOptions) (result *apiregistration.APIServiceList, err error) { +func (c *FakeAPIServices) List(opts v1.ListOptions) (result *apiregistration.APIServiceList, err error) { obj, err := c.Fake. Invokes(core.NewRootListAction(apiservicesResource, opts), &apiregistration.APIServiceList{}) if obj == nil { @@ -103,13 +103,13 @@ func (c *FakeAPIServices) List(opts api.ListOptions) (result *apiregistration.AP } // Watch returns a watch.Interface that watches the requested aPIServices. -func (c *FakeAPIServices) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *FakeAPIServices) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewRootWatchAction(apiservicesResource, opts)) } // Patch applies the patch and returns the patched aPIService. -func (c *FakeAPIServices) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *apiregistration.APIService, err error) { +func (c *FakeAPIServices) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *apiregistration.APIService, err error) { obj, err := c.Fake. Invokes(core.NewRootPatchSubresourceAction(apiservicesResource, name, data, subresources...), &apiregistration.APIService{}) if obj == nil { diff --git a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/informers/apiregistration/internalversion/BUILD b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/informers/apiregistration/internalversion/BUILD index 884bf8fc..726f0c8b 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/informers/apiregistration/internalversion/BUILD +++ b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/informers/apiregistration/internalversion/BUILD @@ -19,9 +19,8 @@ go_library( "//cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset:go_default_library", "//cmd/kube-aggregator/pkg/client/informers/internalinterfaces:go_default_library", "//cmd/kube-aggregator/pkg/client/listers/apiregistration/internalversion:go_default_library", - "//pkg/api:go_default_library", - "//pkg/api/v1:go_default_library", "//pkg/client/cache:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/watch", ], diff --git a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/informers/apiregistration/internalversion/apiservice.go b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/informers/apiregistration/internalversion/apiservice.go index 5cbea4ef..e25c690c 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/informers/apiregistration/internalversion/apiservice.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/informers/apiregistration/internalversion/apiservice.go @@ -19,14 +19,13 @@ limitations under the License. package internalversion import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" apiregistration "k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration" internalclientset "k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset" internalinterfaces "k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/informers/internalinterfaces" internalversion "k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/listers/apiregistration/internalversion" - api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" cache "k8s.io/kubernetes/pkg/client/cache" time "time" ) @@ -46,18 +45,10 @@ func newAPIServiceInformer(client internalclientset.Interface, resyncPeriod time sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Apiregistration().APIServices().List(internalOptions) + return client.Apiregistration().APIServices().List(options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Apiregistration().APIServices().Watch(internalOptions) + return client.Apiregistration().APIServices().Watch(options) }, }, &apiregistration.APIService{}, diff --git a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/informers/apiregistration/v1alpha1/BUILD b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/informers/apiregistration/v1alpha1/BUILD index 62c012ce..7cbf4dbb 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/informers/apiregistration/v1alpha1/BUILD +++ b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/informers/apiregistration/v1alpha1/BUILD @@ -19,8 +19,8 @@ go_library( "//cmd/kube-aggregator/pkg/client/clientset_generated/clientset:go_default_library", "//cmd/kube-aggregator/pkg/client/informers/internalinterfaces:go_default_library", "//cmd/kube-aggregator/pkg/client/listers/apiregistration/v1alpha1:go_default_library", - "//pkg/api/v1:go_default_library", "//pkg/client/cache:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/watch", ], diff --git a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/informers/apiregistration/v1alpha1/apiservice.go b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/informers/apiregistration/v1alpha1/apiservice.go index ca3ddf73..3e2fb20b 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/informers/apiregistration/v1alpha1/apiservice.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/informers/apiregistration/v1alpha1/apiservice.go @@ -19,13 +19,13 @@ limitations under the License. package v1alpha1 import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" apiregistration_v1alpha1 "k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration/v1alpha1" clientset "k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/clientset" internalinterfaces "k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/informers/internalinterfaces" v1alpha1 "k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/listers/apiregistration/v1alpha1" - v1 "k8s.io/kubernetes/pkg/api/v1" cache "k8s.io/kubernetes/pkg/client/cache" time "time" ) diff --git a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/informers/factory.go b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/informers/factory.go index a75006ae..14618dd4 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/informers/factory.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/informers/factory.go @@ -20,6 +20,7 @@ package informers import ( runtime "k8s.io/apimachinery/pkg/runtime" + schema "k8s.io/apimachinery/pkg/runtime/schema" clientset "k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/clientset" internalclientset "k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/clientset_generated/internalclientset" apiregistration "k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/informers/apiregistration" @@ -104,6 +105,7 @@ func (f *sharedInformerFactory) VersionedInformerFor(obj runtime.Object, newFunc // API group versions. type SharedInformerFactory interface { internalinterfaces.SharedInformerFactory + ForResource(resource schema.GroupVersionResource) (GenericInformer, error) Apiregistration() apiregistration.Interface } diff --git a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/listers/apiregistration/internalversion/BUILD b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/listers/apiregistration/internalversion/BUILD index 197c0d70..93d3d345 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/listers/apiregistration/internalversion/BUILD +++ b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/listers/apiregistration/internalversion/BUILD @@ -16,9 +16,9 @@ go_library( tags = ["automanaged"], deps = [ "//cmd/kube-aggregator/pkg/apis/apiregistration:go_default_library", - "//pkg/api:go_default_library", "//pkg/client/cache:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", ], ) diff --git a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/listers/apiregistration/internalversion/apiservice.go b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/listers/apiregistration/internalversion/apiservice.go index 6b4ffb06..30446f28 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/listers/apiregistration/internalversion/apiservice.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/listers/apiregistration/internalversion/apiservice.go @@ -20,9 +20,9 @@ package internalversion import ( "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" apiregistration "k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration" - api "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/cache" ) @@ -55,7 +55,7 @@ func (s *aPIServiceLister) List(selector labels.Selector) (ret []*apiregistratio // Get retrieves the APIService from the index for a given name. func (s *aPIServiceLister) Get(name string) (*apiregistration.APIService, error) { - key := &apiregistration.APIService{ObjectMeta: api.ObjectMeta{Name: name}} + key := &apiregistration.APIService{ObjectMeta: v1.ObjectMeta{Name: name}} obj, exists, err := s.indexer.Get(key) if err != nil { return nil, err diff --git a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/listers/apiregistration/v1alpha1/BUILD b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/listers/apiregistration/v1alpha1/BUILD index db0d4b33..8aa6ee95 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/listers/apiregistration/v1alpha1/BUILD +++ b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/listers/apiregistration/v1alpha1/BUILD @@ -17,9 +17,9 @@ go_library( deps = [ "//cmd/kube-aggregator/pkg/apis/apiregistration:go_default_library", "//cmd/kube-aggregator/pkg/apis/apiregistration/v1alpha1:go_default_library", - "//pkg/api/v1:go_default_library", "//pkg/client/cache:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", ], ) diff --git a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/listers/apiregistration/v1alpha1/apiservice.go b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/listers/apiregistration/v1alpha1/apiservice.go index 364a3d81..c339b8ef 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/listers/apiregistration/v1alpha1/apiservice.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/client/listers/apiregistration/v1alpha1/apiservice.go @@ -20,10 +20,10 @@ package v1alpha1 import ( "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" apiregistration "k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration" v1alpha1 "k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration/v1alpha1" - v1 "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/cache" ) diff --git a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/cmd/server/BUILD b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/cmd/server/BUILD index eab2da5d..f137ac89 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/cmd/server/BUILD +++ b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/cmd/server/BUILD @@ -17,19 +17,19 @@ go_library( "//cmd/kube-aggregator/pkg/legacy:go_default_library", "//pkg/api:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", - "//pkg/client/restclient:go_default_library", - "//pkg/genericapiserver:go_default_library", - "//pkg/genericapiserver/filters:go_default_library", - "//pkg/genericapiserver/options:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic/registry:go_default_library", + "//pkg/genericapiserver/server:go_default_library", + "//pkg/genericapiserver/server/filters:go_default_library", + "//pkg/genericapiserver/server/options:go_default_library", "//pkg/kubectl/cmd/util:go_default_library", - "//pkg/registry/generic:go_default_library", - "//pkg/registry/generic/registry:go_default_library", "//pkg/storage/storagebackend:go_default_library", "//vendor:github.com/pborman/uuid", "//vendor:github.com/spf13/cobra", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/util/sets", "//vendor:k8s.io/apimachinery/pkg/util/wait", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/cmd/server/start.go b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/cmd/server/start.go index e8bfe229..cd6cb15d 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/cmd/server/start.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/cmd/server/start.go @@ -27,17 +27,17 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/wait" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/cmd/kube-aggregator/pkg/apiserver" "k8s.io/kubernetes/cmd/kube-aggregator/pkg/legacy" "k8s.io/kubernetes/pkg/api" kubeclientset "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/client/restclient" - "k8s.io/kubernetes/pkg/genericapiserver" - "k8s.io/kubernetes/pkg/genericapiserver/filters" - genericoptions "k8s.io/kubernetes/pkg/genericapiserver/options" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry" + genericapiserver "k8s.io/kubernetes/pkg/genericapiserver/server" + "k8s.io/kubernetes/pkg/genericapiserver/server/filters" + genericoptions "k8s.io/kubernetes/pkg/genericapiserver/server/options" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" - "k8s.io/kubernetes/pkg/registry/generic" - "k8s.io/kubernetes/pkg/registry/generic/registry" "k8s.io/kubernetes/pkg/storage/storagebackend" "k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration/v1alpha1" diff --git a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/registry/apiservice/BUILD b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/registry/apiservice/BUILD index 990a9d33..ab0054c6 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/registry/apiservice/BUILD +++ b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/registry/apiservice/BUILD @@ -15,13 +15,13 @@ go_library( "//cmd/kube-aggregator/pkg/apis/apiregistration:go_default_library", "//cmd/kube-aggregator/pkg/apis/apiregistration/validation:go_default_library", "//pkg/api:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", "//pkg/storage:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/validation/field", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", "//vendor:k8s.io/apiserver/pkg/storage/names", ], ) diff --git a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/registry/apiservice/etcd/BUILD b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/registry/apiservice/etcd/BUILD index c6ebc964..dc886842 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/registry/apiservice/etcd/BUILD +++ b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/registry/apiservice/etcd/BUILD @@ -14,8 +14,8 @@ go_library( deps = [ "//cmd/kube-aggregator/pkg/apis/apiregistration:go_default_library", "//cmd/kube-aggregator/pkg/registry/apiservice:go_default_library", - "//pkg/registry/generic:go_default_library", - "//pkg/registry/generic/registry:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic/registry:go_default_library", "//vendor:k8s.io/apimachinery/pkg/runtime", ], ) diff --git a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/registry/apiservice/etcd/etcd.go b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/registry/apiservice/etcd/etcd.go index 0002ce3b..f50a19cd 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/registry/apiservice/etcd/etcd.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/registry/apiservice/etcd/etcd.go @@ -20,8 +20,8 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration" "k8s.io/kubernetes/cmd/kube-aggregator/pkg/registry/apiservice" - "k8s.io/kubernetes/pkg/registry/generic" - genericregistry "k8s.io/kubernetes/pkg/registry/generic/registry" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + genericregistry "k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry" ) // rest implements a RESTStorage for API services against etcd diff --git a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/registry/apiservice/strategy.go b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/registry/apiservice/strategy.go index 0e9a7317..ef790d4b 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/registry/apiservice/strategy.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-aggregator/pkg/registry/apiservice/strategy.go @@ -19,14 +19,14 @@ package apiservice import ( "fmt" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/validation/field" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/storage/names" kapi "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" "k8s.io/kubernetes/pkg/storage" "k8s.io/kubernetes/cmd/kube-aggregator/pkg/apis/apiregistration" diff --git a/vendor/k8s.io/kubernetes/cmd/kube-apiserver/app/BUILD b/vendor/k8s.io/kubernetes/cmd/kube-apiserver/app/BUILD index aba7acdb..272d87b6 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-apiserver/app/BUILD +++ b/vendor/k8s.io/kubernetes/cmd/kube-apiserver/app/BUILD @@ -16,7 +16,6 @@ go_library( tags = ["automanaged"], deps = [ "//cmd/kube-apiserver/app/options:go_default_library", - "//pkg/admission:go_default_library", "//pkg/api:go_default_library", "//pkg/apis/autoscaling:go_default_library", "//pkg/apis/batch:go_default_library", @@ -28,8 +27,8 @@ go_library( "//pkg/controller/informers:go_default_library", "//pkg/controller/serviceaccount:go_default_library", "//pkg/generated/openapi:go_default_library", - "//pkg/genericapiserver:go_default_library", - "//pkg/genericapiserver/filters:go_default_library", + "//pkg/genericapiserver/server:go_default_library", + "//pkg/genericapiserver/server/filters:go_default_library", "//pkg/kubeapiserver:go_default_library", "//pkg/kubeapiserver/admission:go_default_library", "//pkg/kubeapiserver/authenticator:go_default_library", @@ -65,6 +64,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/util/net", "//vendor:k8s.io/apimachinery/pkg/util/sets", "//vendor:k8s.io/apimachinery/pkg/util/wait", + "//vendor:k8s.io/apiserver/pkg/admission", ], ) diff --git a/vendor/k8s.io/kubernetes/cmd/kube-apiserver/app/options/BUILD b/vendor/k8s.io/kubernetes/cmd/kube-apiserver/app/options/BUILD index 8818816e..2437577c 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-apiserver/app/options/BUILD +++ b/vendor/k8s.io/kubernetes/cmd/kube-apiserver/app/options/BUILD @@ -18,7 +18,7 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/api/validation:go_default_library", - "//pkg/genericapiserver/options:go_default_library", + "//pkg/genericapiserver/server/options:go_default_library", "//pkg/kubeapiserver/options:go_default_library", "//pkg/kubelet/client:go_default_library", "//pkg/master/ports:go_default_library", diff --git a/vendor/k8s.io/kubernetes/cmd/kube-apiserver/app/options/options.go b/vendor/k8s.io/kubernetes/cmd/kube-apiserver/app/options/options.go index be1c35ad..50e34205 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-apiserver/app/options/options.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-apiserver/app/options/options.go @@ -24,7 +24,7 @@ import ( utilnet "k8s.io/apimachinery/pkg/util/net" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/validation" - genericoptions "k8s.io/kubernetes/pkg/genericapiserver/options" + genericoptions "k8s.io/kubernetes/pkg/genericapiserver/server/options" kubeoptions "k8s.io/kubernetes/pkg/kubeapiserver/options" kubeletclient "k8s.io/kubernetes/pkg/kubelet/client" "k8s.io/kubernetes/pkg/master/ports" diff --git a/vendor/k8s.io/kubernetes/cmd/kube-apiserver/app/server.go b/vendor/k8s.io/kubernetes/cmd/kube-apiserver/app/server.go index f3a2f07b..8ca36236 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-apiserver/app/server.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-apiserver/app/server.go @@ -40,8 +40,8 @@ import ( utilnet "k8s.io/apimachinery/pkg/util/net" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/apiserver/pkg/admission" "k8s.io/kubernetes/cmd/kube-apiserver/app/options" - "k8s.io/kubernetes/pkg/admission" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/autoscaling" "k8s.io/kubernetes/pkg/apis/batch" @@ -52,8 +52,8 @@ import ( "k8s.io/kubernetes/pkg/controller/informers" serviceaccountcontroller "k8s.io/kubernetes/pkg/controller/serviceaccount" generatedopenapi "k8s.io/kubernetes/pkg/generated/openapi" - "k8s.io/kubernetes/pkg/genericapiserver" - "k8s.io/kubernetes/pkg/genericapiserver/filters" + genericapiserver "k8s.io/kubernetes/pkg/genericapiserver/server" + "k8s.io/kubernetes/pkg/genericapiserver/server/filters" "k8s.io/kubernetes/pkg/kubeapiserver" kubeadmission "k8s.io/kubernetes/pkg/kubeapiserver/admission" kubeauthenticator "k8s.io/kubernetes/pkg/kubeapiserver/authenticator" @@ -97,6 +97,8 @@ func Run(s *options.ServerRunOptions) error { return fmt.Errorf("error setting the external host value: %v", err) } + s.Authentication.ApplyAuthorization(s.Authorization) + // validate options if errs := s.Validate(); len(errs) != 0 { return utilerrors.NewAggregate(errs) @@ -273,7 +275,11 @@ func Run(s *options.ServerRunOptions) error { admissionControlPluginNames := strings.Split(s.GenericServerRunOptions.AdmissionControl, ",") pluginInitializer := kubeadmission.NewPluginInitializer(client, sharedInformers, apiAuthorizer) - admissionController, err := admission.NewFromPlugins(admissionControlPluginNames, s.GenericServerRunOptions.AdmissionControlConfigFile, pluginInitializer) + admissionConfigProvider, err := kubeadmission.ReadAdmissionConfiguration(admissionControlPluginNames, s.GenericServerRunOptions.AdmissionControlConfigFile) + if err != nil { + return fmt.Errorf("failed to read plugin config: %v", err) + } + admissionController, err := admission.NewFromPlugins(admissionControlPluginNames, admissionConfigProvider, pluginInitializer) if err != nil { return fmt.Errorf("failed to initialize plugins: %v", err) } diff --git a/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/BUILD b/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/BUILD index fa5a3dc0..5dc7b5e7 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/BUILD +++ b/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/BUILD @@ -28,7 +28,7 @@ go_library( "//pkg/version/prometheus:go_default_library", "//pkg/version/verflag:go_default_library", "//vendor:github.com/spf13/pflag", - "//vendor:k8s.io/apiserver/pkg/healthz", + "//vendor:k8s.io/apiserver/pkg/server/healthz", ], ) diff --git a/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/BUILD b/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/BUILD index 25a8765d..1fd44893 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/BUILD +++ b/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/BUILD @@ -34,10 +34,8 @@ go_library( "//pkg/client/leaderelection:go_default_library", "//pkg/client/leaderelection/resourcelock:go_default_library", "//pkg/client/record:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/typed/discovery:go_default_library", "//pkg/client/typed/dynamic:go_default_library", - "//pkg/client/unversioned/clientcmd:go_default_library", "//pkg/cloudprovider:go_default_library", "//pkg/cloudprovider/providers:go_default_library", "//pkg/cloudprovider/providers/aws:go_default_library", @@ -59,7 +57,6 @@ go_library( "//pkg/controller/job:go_default_library", "//pkg/controller/namespace:go_default_library", "//pkg/controller/node:go_default_library", - "//pkg/controller/petset:go_default_library", "//pkg/controller/podautoscaler:go_default_library", "//pkg/controller/podautoscaler/metrics:go_default_library", "//pkg/controller/podgc:go_default_library", @@ -69,11 +66,11 @@ go_library( "//pkg/controller/route:go_default_library", "//pkg/controller/service:go_default_library", "//pkg/controller/serviceaccount:go_default_library", + "//pkg/controller/statefulset:go_default_library", "//pkg/controller/volume/attachdetach:go_default_library", "//pkg/controller/volume/persistentvolume:go_default_library", "//pkg/quota/install:go_default_library", "//pkg/serviceaccount:go_default_library", - "//pkg/util/cert:go_default_library", "//pkg/util/config:go_default_library", "//pkg/util/configz:go_default_library", "//pkg/util/io:go_default_library", @@ -100,7 +97,10 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/runtime/serializer", "//vendor:k8s.io/apimachinery/pkg/util/sets", "//vendor:k8s.io/apimachinery/pkg/util/wait", - "//vendor:k8s.io/apiserver/pkg/healthz", + "//vendor:k8s.io/apiserver/pkg/server/healthz", + "//vendor:k8s.io/client-go/rest", + "//vendor:k8s.io/client-go/tools/clientcmd", + "//vendor:k8s.io/client-go/util/cert", ], ) diff --git a/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/apps.go b/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/apps.go index d95ea4c8..e5b13862 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/apps.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/apps.go @@ -22,7 +22,7 @@ package app import ( "k8s.io/apimachinery/pkg/runtime/schema" - petset "k8s.io/kubernetes/pkg/controller/petset" + "k8s.io/kubernetes/pkg/controller/statefulset" ) func startStatefulSetController(ctx ControllerContext) (bool, error) { @@ -30,7 +30,7 @@ func startStatefulSetController(ctx ControllerContext) (bool, error) { return false, nil } resyncPeriod := ResyncPeriod(&ctx.Options)() - go petset.NewStatefulSetController( + go statefulset.NewStatefulSetController( ctx.InformerFactory.Pods().Informer(), ctx.ClientBuilder.ClientOrDie("statefulset-controller"), resyncPeriod, diff --git a/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/certificates.go b/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/certificates.go index fb8631e1..760d1efd 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/certificates.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/certificates.go @@ -28,7 +28,7 @@ import ( ) func startCSRController(ctx ControllerContext) (bool, error) { - if !ctx.AvailableResources[schema.GroupVersionResource{Group: "certificates.k8s.io", Version: "v1alpha1", Resource: "certificatesigningrequests"}] { + if !ctx.AvailableResources[schema.GroupVersionResource{Group: "certificates.k8s.io", Version: "v1beta1", Resource: "certificatesigningrequests"}] { return false, nil } resyncPeriod := ResyncPeriod(&ctx.Options)() diff --git a/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/controllermanager.go b/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/controllermanager.go index 95d55cb4..6f3b11b8 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/controllermanager.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/controllermanager.go @@ -31,10 +31,14 @@ import ( "strconv" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/apiserver/pkg/healthz" + "k8s.io/apiserver/pkg/server/healthz" + restclient "k8s.io/client-go/rest" + "k8s.io/client-go/tools/clientcmd" + certutil "k8s.io/client-go/util/cert" "k8s.io/kubernetes/cmd/kube-controller-manager/app/options" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" @@ -42,9 +46,7 @@ import ( "k8s.io/kubernetes/pkg/client/leaderelection" "k8s.io/kubernetes/pkg/client/leaderelection/resourcelock" "k8s.io/kubernetes/pkg/client/record" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/typed/discovery" - "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" "k8s.io/kubernetes/pkg/cloudprovider" "k8s.io/kubernetes/pkg/controller" "k8s.io/kubernetes/pkg/controller/informers" @@ -55,7 +57,6 @@ import ( "k8s.io/kubernetes/pkg/controller/volume/attachdetach" persistentvolumecontroller "k8s.io/kubernetes/pkg/controller/volume/persistentvolume" "k8s.io/kubernetes/pkg/serviceaccount" - certutil "k8s.io/kubernetes/pkg/util/cert" "k8s.io/kubernetes/pkg/util/configz" "github.com/golang/glog" @@ -178,7 +179,7 @@ func Run(s *options.CMServer) error { // TODO: enable other lock types rl := resourcelock.EndpointsLock{ - EndpointsMeta: v1.ObjectMeta{ + EndpointsMeta: metav1.ObjectMeta{ Namespace: "kube-system", Name: "kube-controller-manager", }, diff --git a/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/options/BUILD b/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/options/BUILD index d61571e7..4ec72b73 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/options/BUILD +++ b/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/options/BUILD @@ -16,10 +16,10 @@ go_library( "//pkg/client/leaderelection:go_default_library", "//pkg/master/ports:go_default_library", "//pkg/util/config:go_default_library", - "//pkg/util/errors:go_default_library", - "//pkg/util/sets:go_default_library", "//vendor:github.com/spf13/pflag", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/util/errors", + "//vendor:k8s.io/apimachinery/pkg/util/sets", ], ) diff --git a/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/options/options.go b/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/options/options.go index 88111f37..cf9255e3 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/options/options.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/app/options/options.go @@ -24,12 +24,12 @@ import ( "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + utilerrors "k8s.io/apimachinery/pkg/util/errors" + "k8s.io/apimachinery/pkg/util/sets" "k8s.io/kubernetes/pkg/apis/componentconfig" "k8s.io/kubernetes/pkg/client/leaderelection" "k8s.io/kubernetes/pkg/master/ports" "k8s.io/kubernetes/pkg/util/config" - utilerrors "k8s.io/kubernetes/pkg/util/errors" - "k8s.io/kubernetes/pkg/util/sets" "github.com/spf13/pflag" ) diff --git a/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/controller-manager.go b/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/controller-manager.go index 3f5c83b4..feff1f70 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/controller-manager.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-controller-manager/controller-manager.go @@ -24,7 +24,7 @@ import ( "fmt" "os" - "k8s.io/apiserver/pkg/healthz" + "k8s.io/apiserver/pkg/server/healthz" "k8s.io/kubernetes/cmd/kube-controller-manager/app" "k8s.io/kubernetes/cmd/kube-controller-manager/app/options" _ "k8s.io/kubernetes/pkg/client/metrics/prometheus" // for client metric registration diff --git a/vendor/k8s.io/kubernetes/cmd/kube-proxy/BUILD b/vendor/k8s.io/kubernetes/cmd/kube-proxy/BUILD index 6d756659..21b74db0 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-proxy/BUILD +++ b/vendor/k8s.io/kubernetes/cmd/kube-proxy/BUILD @@ -27,7 +27,7 @@ go_library( "//pkg/version/prometheus:go_default_library", "//pkg/version/verflag:go_default_library", "//vendor:github.com/spf13/pflag", - "//vendor:k8s.io/apiserver/pkg/healthz", + "//vendor:k8s.io/apiserver/pkg/server/healthz", ], ) diff --git a/vendor/k8s.io/kubernetes/cmd/kube-proxy/app/BUILD b/vendor/k8s.io/kubernetes/cmd/kube-proxy/app/BUILD index cdba4d2d..1a1c68ea 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-proxy/app/BUILD +++ b/vendor/k8s.io/kubernetes/cmd/kube-proxy/app/BUILD @@ -22,8 +22,6 @@ go_library( "//pkg/client/clientset_generated/internalclientset:go_default_library", "//pkg/client/clientset_generated/internalclientset/typed/core/internalversion:go_default_library", "//pkg/client/record:go_default_library", - "//pkg/client/unversioned/clientcmd:go_default_library", - "//pkg/client/unversioned/clientcmd/api:go_default_library", "//pkg/proxy:go_default_library", "//pkg/proxy/config:go_default_library", "//pkg/proxy/iptables:go_default_library", @@ -46,6 +44,8 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/net", "//vendor:k8s.io/apimachinery/pkg/util/wait", + "//vendor:k8s.io/client-go/tools/clientcmd", + "//vendor:k8s.io/client-go/tools/clientcmd/api", ], ) 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 4cf5b295..214c75d6 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-proxy/app/server.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-proxy/app/server.go @@ -32,14 +32,14 @@ import ( "k8s.io/apimachinery/pkg/types" utilnet "k8s.io/apimachinery/pkg/util/net" "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/client-go/tools/clientcmd" + clientcmdapi "k8s.io/client-go/tools/clientcmd/api" "k8s.io/kubernetes/cmd/kube-proxy/app/options" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" unversionedcore "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion" "k8s.io/kubernetes/pkg/client/record" - "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" - clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api" "k8s.io/kubernetes/pkg/proxy" proxyconfig "k8s.io/kubernetes/pkg/proxy/config" "k8s.io/kubernetes/pkg/proxy/iptables" diff --git a/vendor/k8s.io/kubernetes/cmd/kube-proxy/proxy.go b/vendor/k8s.io/kubernetes/cmd/kube-proxy/proxy.go index 54732eec..a4702f1f 100644 --- a/vendor/k8s.io/kubernetes/cmd/kube-proxy/proxy.go +++ b/vendor/k8s.io/kubernetes/cmd/kube-proxy/proxy.go @@ -20,7 +20,7 @@ import ( "fmt" "os" - "k8s.io/apiserver/pkg/healthz" + "k8s.io/apiserver/pkg/server/healthz" "k8s.io/kubernetes/cmd/kube-proxy/app" "k8s.io/kubernetes/cmd/kube-proxy/app/options" _ "k8s.io/kubernetes/pkg/client/metrics/prometheus" // for client metric registration diff --git a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/BUILD b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/BUILD index 3e721be2..8f49b8be 100644 --- a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/BUILD +++ b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/BUILD @@ -32,10 +32,12 @@ filegroup( ":package-srcs", "//cmd/kubeadm/app/apis/kubeadm:all-srcs", "//cmd/kubeadm/app/cmd:all-srcs", + "//cmd/kubeadm/app/constants:all-srcs", "//cmd/kubeadm/app/discovery:all-srcs", "//cmd/kubeadm/app/images:all-srcs", "//cmd/kubeadm/app/master:all-srcs", "//cmd/kubeadm/app/node:all-srcs", + "//cmd/kubeadm/app/phases/apiconfig:all-srcs", "//cmd/kubeadm/app/phases/certs:all-srcs", "//cmd/kubeadm/app/phases/kubeconfig:all-srcs", "//cmd/kubeadm/app/preflight:all-srcs", diff --git a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/BUILD b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/BUILD index 6bb73d96..16d85729 100644 --- a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/BUILD +++ b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/BUILD @@ -17,7 +17,6 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", diff --git a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/install/BUILD b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/install/BUILD index 7d80e485..b93bb41f 100644 --- a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/install/BUILD +++ b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/install/BUILD @@ -17,7 +17,10 @@ go_library( deps = [ "//cmd/kubeadm/app/apis/kubeadm:go_default_library", "//cmd/kubeadm/app/apis/kubeadm/v1alpha1:go_default_library", - "//pkg/apimachinery/announced:go_default_library", + "//pkg/api:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apimachinery/announced", + "//vendor:k8s.io/apimachinery/pkg/apimachinery/registered", + "//vendor:k8s.io/apimachinery/pkg/runtime", ], ) diff --git a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/install/install.go b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/install/install.go index e27b6291..4e26b00e 100644 --- a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/install/install.go +++ b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/install/install.go @@ -17,12 +17,20 @@ limitations under the License. package install import ( + "k8s.io/apimachinery/pkg/apimachinery/announced" + "k8s.io/apimachinery/pkg/apimachinery/registered" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm" "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1alpha1" - "k8s.io/kubernetes/pkg/apimachinery/announced" + "k8s.io/kubernetes/pkg/api" ) func init() { + Install(api.GroupFactoryRegistry, api.Registry, api.Scheme) +} + +// Install registers the API group and adds types to a scheme +func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) { if err := announced.NewGroupMetaFactory( &announced.GroupMetaFactoryArgs{ GroupName: kubeadm.GroupName, @@ -33,7 +41,7 @@ func init() { announced.VersionToSchemeFunc{ v1alpha1.SchemeGroupVersion.Version: v1alpha1.AddToScheme, }, - ).Announce().RegisterAndEnable(); err != nil { + ).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil { panic(err) } } diff --git a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/register.go b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/register.go index 40f71023..05a829c0 100644 --- a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/register.go +++ b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/register.go @@ -17,10 +17,8 @@ limitations under the License. package kubeadm import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/api" ) // GroupName is the group name use in this package @@ -49,9 +47,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { &MasterConfiguration{}, &NodeConfiguration{}, &ClusterInfo{}, - &api.ListOptions{}, - &api.DeleteOptions{}, - &metav1.ExportOptions{}, ) return nil } diff --git a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/types.go b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/types.go index f922bf0e..aa6f6e00 100644 --- a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/types.go +++ b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/types.go @@ -39,6 +39,7 @@ type MasterConfiguration struct { Networking Networking KubernetesVersion string CloudProvider string + AuthorizationMode string } type API struct { diff --git a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1alpha1/BUILD b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1alpha1/BUILD index 245a85a3..45a09ceb 100644 --- a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1alpha1/BUILD +++ b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1alpha1/BUILD @@ -18,7 +18,6 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api/v1:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", diff --git a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1alpha1/defaults.go b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1alpha1/defaults.go index f676020e..23785f3a 100644 --- a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1alpha1/defaults.go +++ b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1alpha1/defaults.go @@ -16,17 +16,18 @@ limitations under the License. package v1alpha1 -import ( - "k8s.io/apimachinery/pkg/runtime" -) +import "k8s.io/apimachinery/pkg/runtime" const ( - DefaultServiceDNSDomain = "cluster.local" - DefaultServicesSubnet = "10.96.0.0/12" - DefaultKubernetesVersion = "stable" - DefaultKubernetesFallbackVersion = "v1.5.0" + DefaultServiceDNSDomain = "cluster.local" + DefaultServicesSubnet = "10.96.0.0/12" + DefaultKubernetesVersion = "stable" + // This is only for clusters without internet, were the latest stable version can't be determined + DefaultKubernetesFallbackVersion = "v1.5.2" DefaultAPIBindPort = 6443 DefaultDiscoveryBindPort = 9898 + // TODO: Default this to RBAC when DefaultKubernetesFallbackVersion is v1.6-something + DefaultAuthorizationMode = "AlwaysAllow" ) func addDefaultingFuncs(scheme *runtime.Scheme) error { @@ -56,4 +57,8 @@ func SetDefaults_MasterConfiguration(obj *MasterConfiguration) { if obj.Discovery.Token == nil && obj.Discovery.File == nil && obj.Discovery.HTTPS == nil { obj.Discovery.Token = &TokenDiscovery{} } + + if obj.AuthorizationMode == "" { + obj.AuthorizationMode = DefaultAuthorizationMode + } } diff --git a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1alpha1/register.go b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1alpha1/register.go index 95ebf6d6..31496f3c 100644 --- a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1alpha1/register.go +++ b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1alpha1/register.go @@ -20,7 +20,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/api/v1" ) // GroupName is the group name use in this package @@ -49,10 +48,8 @@ func addKnownTypes(scheme *runtime.Scheme) error { &MasterConfiguration{}, &NodeConfiguration{}, &ClusterInfo{}, - &v1.ListOptions{}, - &v1.DeleteOptions{}, - &metav1.ExportOptions{}, ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil } diff --git a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1alpha1/types.go b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1alpha1/types.go index cc26c3de..91dca1f9 100644 --- a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1alpha1/types.go +++ b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1alpha1/types.go @@ -29,6 +29,7 @@ type MasterConfiguration struct { Networking Networking `json:"networking"` KubernetesVersion string `json:"kubernetesVersion"` CloudProvider string `json:"cloudProvider"` + AuthorizationMode string `json:"authorizationMode"` } type API struct { diff --git a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/cmd/BUILD b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/cmd/BUILD index 84fd2dc7..981b09b3 100644 --- a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/cmd/BUILD +++ b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/cmd/BUILD @@ -12,6 +12,7 @@ go_library( name = "go_default_library", srcs = [ "cmd.go", + "defaults.go", "init.go", "join.go", "reset.go", @@ -24,25 +25,29 @@ go_library( "//cmd/kubeadm/app/apis/kubeadm/v1alpha1:go_default_library", "//cmd/kubeadm/app/apis/kubeadm/validation:go_default_library", "//cmd/kubeadm/app/cmd/flags:go_default_library", + "//cmd/kubeadm/app/constants:go_default_library", "//cmd/kubeadm/app/discovery:go_default_library", "//cmd/kubeadm/app/master:go_default_library", "//cmd/kubeadm/app/node:go_default_library", + "//cmd/kubeadm/app/phases/apiconfig:go_default_library", "//cmd/kubeadm/app/phases/certs:go_default_library", "//cmd/kubeadm/app/phases/kubeconfig:go_default_library", "//cmd/kubeadm/app/preflight:go_default_library", "//cmd/kubeadm/app/util:go_default_library", "//pkg/api:go_default_library", - "//pkg/api/v1:go_default_library", - "//pkg/fields:go_default_library", "//pkg/kubectl:go_default_library", "//pkg/kubectl/cmd/util:go_default_library", "//pkg/util/flag:go_default_library", "//pkg/util/initsystem:go_default_library", "//pkg/version:go_default_library", + "//vendor:github.com/blang/semver", "//vendor:github.com/renstrom/dedent", "//vendor:github.com/spf13/cobra", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/net", + "//vendor:k8s.io/client-go/util/cert", ], ) @@ -54,7 +59,10 @@ go_test( ], library = ":go_default_library", tags = ["automanaged"], - deps = ["//cmd/kubeadm/app/preflight:go_default_library"], + deps = [ + "//cmd/kubeadm/app/phases/kubeconfig:go_default_library", + "//cmd/kubeadm/app/preflight:go_default_library", + ], ) filegroup( diff --git a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/cmd/defaults.go b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/cmd/defaults.go new file mode 100644 index 00000000..c834f05c --- /dev/null +++ b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/cmd/defaults.go @@ -0,0 +1,94 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package cmd + +import ( + "fmt" + "strconv" + + netutil "k8s.io/apimachinery/pkg/util/net" + kubeadmapi "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm" + kubeadmapiext "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1alpha1" + kubeadmutil "k8s.io/kubernetes/cmd/kubeadm/app/util" + + "github.com/blang/semver" +) + +var ( + // Maximum version when using AllowAll as the default authz mode. Everything above this will use RBAC by default. + allowAllMaxVersion = semver.MustParse("1.6.0-alpha.0") +) + +func setInitDynamicDefaults(cfg *kubeadmapi.MasterConfiguration) error { + // Auto-detect the IP + if len(cfg.API.AdvertiseAddresses) == 0 { + ip, err := netutil.ChooseHostInterface() + if err != nil { + return err + } + cfg.API.AdvertiseAddresses = []string{ip.String()} + } + + // Validate version argument + ver, err := kubeadmutil.KubernetesReleaseVersion(cfg.KubernetesVersion) + if err != nil { + if cfg.KubernetesVersion != kubeadmapiext.DefaultKubernetesVersion { + return err + } else { + ver = kubeadmapiext.DefaultKubernetesFallbackVersion + } + } + cfg.KubernetesVersion = ver + fmt.Println("[init] Using Kubernetes version:", ver) + + // Omit the "v" in the beginning, otherwise semver will fail + // If the version is newer than the specified version, RBAC v1beta1 support is enabled in the apiserver so we can default to RBAC + k8sVersion, err := semver.Parse(cfg.KubernetesVersion[1:]) + if k8sVersion.GT(allowAllMaxVersion) { + cfg.AuthorizationMode = "RBAC" + } + + fmt.Println("[init] Using Authorization mode:", cfg.AuthorizationMode) + + // Warn about the limitations with the current cloudprovider solution. + if cfg.CloudProvider != "" { + fmt.Println("[init] WARNING: For cloudprovider integrations to work --cloud-provider must be set for all kubelets in the cluster.") + fmt.Println("\t(/etc/systemd/system/kubelet.service.d/10-kubeadm.conf should be edited for this purpose)") + } + + // Validate token if any, otherwise generate + if cfg.Discovery.Token != nil { + if cfg.Discovery.Token.ID != "" && cfg.Discovery.Token.Secret != "" { + fmt.Printf("[init] A token has been provided, validating [%s]\n", kubeadmutil.BearerToken(cfg.Discovery.Token)) + if valid, err := kubeadmutil.ValidateToken(cfg.Discovery.Token); valid == false { + return err + } + } else { + fmt.Println("[init] A token has not been provided, generating one") + if err := kubeadmutil.GenerateToken(cfg.Discovery.Token); err != nil { + return err + } + } + + // If there aren't any addresses specified, default to the first advertised address which can be user-provided or the default network interface's IP address + if len(cfg.Discovery.Token.Addresses) == 0 { + cfg.Discovery.Token.Addresses = []string{cfg.API.AdvertiseAddresses[0] + ":" + strconv.Itoa(kubeadmapiext.DefaultDiscoveryBindPort)} + } + } + + return nil +} diff --git a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/cmd/init.go b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/cmd/init.go index 061f37ee..3a447bae 100644 --- a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/cmd/init.go +++ b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/cmd/init.go @@ -21,23 +21,20 @@ import ( "io" "io/ioutil" "path" - "strconv" "github.com/renstrom/dedent" "github.com/spf13/cobra" + "k8s.io/apimachinery/pkg/runtime" kubeadmapi "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm" kubeadmapiext "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1alpha1" "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/validation" "k8s.io/kubernetes/cmd/kubeadm/app/cmd/flags" "k8s.io/kubernetes/cmd/kubeadm/app/discovery" kubemaster "k8s.io/kubernetes/cmd/kubeadm/app/master" - + "k8s.io/kubernetes/cmd/kubeadm/app/phases/apiconfig" certphase "k8s.io/kubernetes/cmd/kubeadm/app/phases/certs" kubeconfigphase "k8s.io/kubernetes/cmd/kubeadm/app/phases/kubeconfig" - - "k8s.io/apimachinery/pkg/runtime" - netutil "k8s.io/apimachinery/pkg/util/net" "k8s.io/kubernetes/cmd/kubeadm/app/preflight" kubeadmutil "k8s.io/kubernetes/cmd/kubeadm/app/util" "k8s.io/kubernetes/pkg/api" @@ -66,11 +63,12 @@ func NewCmdInit(out io.Writer) *cobra.Command { var cfgPath string var skipPreFlight bool + var selfHosted bool cmd := &cobra.Command{ Use: "init", Short: "Run this in order to set up the Kubernetes master", Run: func(cmd *cobra.Command, args []string) { - i, err := NewInit(cfgPath, &cfg, skipPreFlight) + i, err := NewInit(cfgPath, &cfg, skipPreFlight, selfHosted) kubeadmutil.CheckErr(err) kubeadmutil.CheckErr(i.Validate()) kubeadmutil.CheckErr(i.Run(out)) @@ -115,7 +113,7 @@ func NewCmdInit(out io.Writer) *cobra.Command { cmd.PersistentFlags().BoolVar( &skipPreFlight, "skip-preflight-checks", skipPreFlight, - "skip preflight checks normally run before modifying the system", + "Skip preflight checks normally run before modifying the system", ) cmd.PersistentFlags().Var( @@ -123,14 +121,15 @@ func NewCmdInit(out io.Writer) *cobra.Command { "The discovery method kubeadm will use for connecting nodes to the master", ) + cmd.PersistentFlags().BoolVar( + &selfHosted, "self-hosted", selfHosted, + "Enable self-hosted control plane", + ) + return cmd } -type Init struct { - cfg *kubeadmapi.MasterConfiguration -} - -func NewInit(cfgPath string, cfg *kubeadmapi.MasterConfiguration, skipPreFlight bool) (*Init, error) { +func NewInit(cfgPath string, cfg *kubeadmapi.MasterConfiguration, skipPreFlight bool, selfHosted bool) (*Init, error) { fmt.Println("[kubeadm] WARNING: kubeadm is in alpha, please do not use it for production clusters.") @@ -144,13 +143,10 @@ func NewInit(cfgPath string, cfg *kubeadmapi.MasterConfiguration, skipPreFlight } } - // Auto-detect the IP - if len(cfg.API.AdvertiseAddresses) == 0 { - ip, err := netutil.ChooseHostInterface() - if err != nil { - return nil, err - } - cfg.API.AdvertiseAddresses = []string{ip.String()} + // Set defaults dynamically that the API group defaulting can't (by fetching information from the internet, looking up network interfaces, etc.) + err := setInitDynamicDefaults(cfg) + if err != nil { + return nil, err } if !skipPreFlight { @@ -172,27 +168,15 @@ func NewInit(cfgPath string, cfg *kubeadmapi.MasterConfiguration, skipPreFlight // Try to start the kubelet service in case it's inactive preflight.TryStartKubelet() - // validate version argument - ver, err := kubeadmutil.KubernetesReleaseVersion(cfg.KubernetesVersion) - if err != nil { - if cfg.KubernetesVersion != kubeadmapiext.DefaultKubernetesVersion { - return nil, err - } else { - ver = kubeadmapiext.DefaultKubernetesFallbackVersion - } - } - cfg.KubernetesVersion = ver - fmt.Println("[init] Using Kubernetes version:", ver) - - // Warn about the limitations with the current cloudprovider solution. - if cfg.CloudProvider != "" { - fmt.Println("WARNING: For cloudprovider integrations to work --cloud-provider must be set for all kubelets in the cluster.") - fmt.Println("\t(/etc/systemd/system/kubelet.service.d/10-kubeadm.conf should be edited for this purpose)") - } - - return &Init{cfg: cfg}, nil + return &Init{cfg: cfg, selfHosted: selfHosted}, nil } +type Init struct { + cfg *kubeadmapi.MasterConfiguration + selfHosted bool +} + +// Validate validates configuration passed to "kubeadm init" func (i *Init) Validate() error { return validation.ValidateMasterConfiguration(i.cfg).ToAggregate() } @@ -201,32 +185,11 @@ func (i *Init) Validate() error { func (i *Init) Run(out io.Writer) error { // PHASE 1: Generate certificates - caCert, err := certphase.CreatePKIAssets(i.cfg, kubeadmapi.GlobalEnvParams.HostPKIPath) + err := certphase.CreatePKIAssets(i.cfg, kubeadmapi.GlobalEnvParams.HostPKIPath) if err != nil { return err } - // Exception: - if i.cfg.Discovery.Token != nil { - // Validate token - if valid, err := kubeadmutil.ValidateToken(i.cfg.Discovery.Token); valid == false { - return err - } - - // Make sure there is at least one address - if len(i.cfg.Discovery.Token.Addresses) == 0 { - ip, err := netutil.ChooseHostInterface() - if err != nil { - return err - } - i.cfg.Discovery.Token.Addresses = []string{ip.String() + ":" + strconv.Itoa(kubeadmapiext.DefaultDiscoveryBindPort)} - } - - if err := kubemaster.CreateTokenAuthFile(kubeadmutil.BearerToken(i.cfg.Discovery.Token)); err != nil { - return err - } - } - // PHASE 2: Generate kubeconfig files for the admin and the kubelet // TODO this is not great, but there is only one address we can use here @@ -238,6 +201,14 @@ func (i *Init) Run(out io.Writer) error { return err } + // TODO: It's not great to have an exception for token here, but necessary because the apiserver doesn't handle this properly in the API yet + // but relies on files on disk for now, which is daunting. + if i.cfg.Discovery.Token != nil { + if err := kubemaster.CreateTokenAuthFile(kubeadmutil.BearerToken(i.cfg.Discovery.Token)); err != nil { + return err + } + } + // Phase 3: Bootstrap the control plane if err := kubemaster.WriteStaticPodManifests(i.cfg); err != nil { return err @@ -248,13 +219,31 @@ func (i *Init) Run(out io.Writer) error { return err } + if i.cfg.AuthorizationMode == "RBAC" { + err = apiconfig.CreateBootstrapRBACClusterRole(client) + if err != nil { + return err + } + + err = apiconfig.CreateKubeDNSRBACClusterRole(client) + if err != nil { + return err + } + + // TODO: remove this when https://github.com/kubernetes/kubeadm/issues/114 is fixed + err = apiconfig.CreateKubeProxyClusterRoleBinding(client) + if err != nil { + return err + } + } + if err := kubemaster.UpdateMasterRoleLabelsAndTaints(client, false); err != nil { return err } if i.cfg.Discovery.Token != nil { fmt.Printf("[token-discovery] Using token: %s\n", kubeadmutil.BearerToken(i.cfg.Discovery.Token)) - if err := kubemaster.CreateDiscoveryDeploymentAndSecret(i.cfg, client, caCert); err != nil { + if err := kubemaster.CreateDiscoveryDeploymentAndSecret(i.cfg, client); err != nil { return err } if err := kubeadmutil.UpdateOrCreateToken(client, i.cfg.Discovery.Token, kubeadmutil.DefaultTokenDuration); err != nil { @@ -262,6 +251,16 @@ func (i *Init) Run(out io.Writer) error { } } + // Is deployment type self-hosted? + if i.selfHosted { + // Temporary control plane is up, now we create our self hosted control + // plane components and remove the static manifests: + fmt.Println("[init] Creating self-hosted control plane...") + if err := kubemaster.CreateSelfHostedControlPlane(i.cfg, client); err != nil { + return err + } + } + if err := kubemaster.CreateEssentialAddons(i.cfg, client); err != nil { return err } diff --git a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/cmd/join.go b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/cmd/join.go index 22545b11..268483dd 100644 --- a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/cmd/join.go +++ b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/cmd/join.go @@ -20,15 +20,17 @@ import ( "fmt" "io" "io/ioutil" - "path" + "path/filepath" "github.com/renstrom/dedent" "github.com/spf13/cobra" "k8s.io/apimachinery/pkg/runtime" + certutil "k8s.io/client-go/util/cert" kubeadmapi "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm" kubeadmapiext "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1alpha1" "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/validation" + kubeadmconstants "k8s.io/kubernetes/cmd/kubeadm/app/constants" "k8s.io/kubernetes/cmd/kubeadm/app/discovery" kubenode "k8s.io/kubernetes/cmd/kubeadm/app/node" kubeconfigphase "k8s.io/kubernetes/cmd/kubeadm/app/phases/kubeconfig" @@ -136,10 +138,20 @@ func (j *Join) Run(out io.Writer) error { if err := kubenode.PerformTLSBootstrap(cfg); err != nil { return err } - if err := kubeconfigphase.WriteKubeconfigToDisk(path.Join(kubeadmapi.GlobalEnvParams.KubernetesDir, kubeconfigphase.KubeletKubeConfigFileName), cfg); err != nil { + + kubeconfigFile := filepath.Join(kubeadmapi.GlobalEnvParams.KubernetesDir, kubeconfigphase.KubeletKubeConfigFileName) + if err := kubeconfigphase.WriteKubeconfigToDisk(kubeconfigFile, cfg); err != nil { return err } + // Write the ca certificate to disk so kubelet can use it for authentication + cluster := cfg.Contexts[cfg.CurrentContext].Cluster + caCertFile := filepath.Join(kubeadmapi.GlobalEnvParams.HostPKIPath, kubeadmconstants.CACertName) + err = certutil.WriteCert(caCertFile, cfg.Clusters[cluster].CertificateAuthorityData) + if err != nil { + return fmt.Errorf("couldn't save the CA certificate to disk: %v", err) + } + fmt.Fprintf(out, joinDoneMsgf) return nil } diff --git a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/cmd/reset.go b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/cmd/reset.go index 4e94a57e..ae13d4be 100644 --- a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/cmd/reset.go +++ b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/cmd/reset.go @@ -21,12 +21,14 @@ import ( "io" "os" "os/exec" - "path" + "path/filepath" "strings" "github.com/spf13/cobra" kubeadmapi "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm" + kubeadmconstants "k8s.io/kubernetes/cmd/kubeadm/app/constants" + "k8s.io/kubernetes/cmd/kubeadm/app/phases/kubeconfig" "k8s.io/kubernetes/cmd/kubeadm/app/preflight" kubeadmutil "k8s.io/kubernetes/cmd/kubeadm/app/util" "k8s.io/kubernetes/pkg/util/initsystem" @@ -108,7 +110,7 @@ func (r *Reset) Run(out io.Writer) error { fmt.Printf("[reset] Failed to unmount mounted directories in /var/lib/kubelet: %s\n", string(umountOutputBytes)) } - dockerCheck := preflight.ServiceCheck{Service: "docker"} + dockerCheck := preflight.ServiceCheck{Service: "docker", CheckIfActive: true} if warnings, errors := dockerCheck.Check(); len(warnings) == 0 && len(errors) == 0 { fmt.Println("[reset] Removing kubernetes-managed containers") if err := exec.Command("sh", "-c", "docker ps | grep 'k8s_' | awk '{print $1}' | xargs -r docker rm --force --volumes").Run(); err != nil { @@ -122,7 +124,7 @@ func (r *Reset) Run(out io.Writer) error { // Only clear etcd data when the etcd manifest is found. In case it is not found, we must assume that the user // provided external etcd endpoints. In that case, it is his own responsibility to reset etcd - etcdManifestPath := path.Join(kubeadmapi.GlobalEnvParams.KubernetesDir, "manifests/etcd.json") + etcdManifestPath := filepath.Join(kubeadmapi.GlobalEnvParams.KubernetesDir, "manifests/etcd.json") if _, err := os.Stat(etcdManifestPath); err == nil { dirsToClean = append(dirsToClean, "/var/lib/etcd") } else { @@ -150,7 +152,7 @@ func drainAndRemoveNode(removeNode bool) error { hostname = strings.ToLower(hostname) // TODO: Use the "native" k8s client for this once we're confident the versioned is working - kubeConfigPath := path.Join(kubeadmapi.GlobalEnvParams.KubernetesDir, "kubelet.conf") + kubeConfigPath := filepath.Join(kubeadmapi.GlobalEnvParams.KubernetesDir, kubeconfig.KubeletKubeConfigFileName) getNodesCmd := fmt.Sprintf("kubectl --kubeconfig %s get nodes | grep %s", kubeConfigPath, hostname) output, err := exec.Command("sh", "-c", getNodesCmd).Output() @@ -179,14 +181,14 @@ func drainAndRemoveNode(removeNode bool) error { } // cleanDir removes everything in a directory, but not the directory itself -func cleanDir(filepath string) error { +func cleanDir(filePath string) error { // If the directory doesn't even exist there's nothing to do, and we do // not consider this an error - if _, err := os.Stat(filepath); os.IsNotExist(err) { + if _, err := os.Stat(filePath); os.IsNotExist(err) { return nil } - d, err := os.Open(filepath) + d, err := os.Open(filePath) if err != nil { return err } @@ -196,7 +198,7 @@ func cleanDir(filepath string) error { return err } for _, name := range names { - err = os.RemoveAll(path.Join(filepath, name)) + err = os.RemoveAll(filepath.Join(filePath, name)) if err != nil { return err } @@ -207,7 +209,7 @@ func cleanDir(filepath string) error { // resetConfigDir is used to cleanup the files kubeadm writes in /etc/kubernetes/. func resetConfigDir(configPathDir, pkiPathDir string) { dirsToClean := []string{ - path.Join(configPathDir, "manifests"), + filepath.Join(configPathDir, "manifests"), pkiPathDir, } fmt.Printf("[reset] Deleting contents of config directories: %v\n", dirsToClean) @@ -219,8 +221,9 @@ func resetConfigDir(configPathDir, pkiPathDir string) { } filesToClean := []string{ - path.Join(configPathDir, "admin.conf"), - path.Join(configPathDir, "kubelet.conf"), + filepath.Join(configPathDir, kubeconfig.AdminKubeConfigFileName), + filepath.Join(configPathDir, kubeconfig.KubeletKubeConfigFileName), + filepath.Join(configPathDir, kubeadmconstants.CACertName), } fmt.Printf("[reset] Deleting files: %v\n", filesToClean) for _, path := range filesToClean { diff --git a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/cmd/reset_test.go b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/cmd/reset_test.go index 529195e6..3558572d 100644 --- a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/cmd/reset_test.go +++ b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/cmd/reset_test.go @@ -22,6 +22,7 @@ import ( "path/filepath" "testing" + "k8s.io/kubernetes/cmd/kubeadm/app/phases/kubeconfig" "k8s.io/kubernetes/cmd/kubeadm/app/preflight" ) @@ -63,8 +64,8 @@ func TestConfigDirCleaner(t *testing.T) { "manifests/etcd.json", "manifests/kube-apiserver.json", "pki/ca.pem", - "admin.conf", - "kubelet.conf", + kubeconfig.AdminKubeConfigFileName, + kubeconfig.KubeletKubeConfigFileName, }, verifyExists: []string{ "manifests", @@ -77,7 +78,7 @@ func TestConfigDirCleaner(t *testing.T) { }, setupFiles: []string{ "pki/ca.pem", - "kubelet.conf", + kubeconfig.KubeletKubeConfigFileName, }, verifyExists: []string{ "pki", @@ -95,8 +96,8 @@ func TestConfigDirCleaner(t *testing.T) { "manifests/etcd.json", "manifests/kube-apiserver.json", "pki/ca.pem", - "admin.conf", - "kubelet.conf", + kubeconfig.AdminKubeConfigFileName, + kubeconfig.KubeletKubeConfigFileName, "cloud-config", }, verifyExists: []string{ @@ -115,8 +116,8 @@ func TestConfigDirCleaner(t *testing.T) { "manifests/etcd.json", "manifests/kube-apiserver.json", "pki/ca.pem", - "admin.conf", - "kubelet.conf", + kubeconfig.AdminKubeConfigFileName, + kubeconfig.KubeletKubeConfigFileName, ".cloud-config", ".mydir/.myfile", }, @@ -166,8 +167,8 @@ func TestConfigDirCleaner(t *testing.T) { // Verify the files we cleanup implicitly in every test: assertExists(t, tmpDir) - assertNotExists(t, filepath.Join(tmpDir, "admin.conf")) - assertNotExists(t, filepath.Join(tmpDir, "kubelet.conf")) + assertNotExists(t, filepath.Join(tmpDir, kubeconfig.AdminKubeConfigFileName)) + assertNotExists(t, filepath.Join(tmpDir, kubeconfig.KubeletKubeConfigFileName)) assertDirEmpty(t, filepath.Join(tmpDir, "manifests")) assertDirEmpty(t, filepath.Join(tmpDir, "pki")) diff --git a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/cmd/token.go b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/cmd/token.go index 8c60e39f..c6c99578 100644 --- a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/cmd/token.go +++ b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/cmd/token.go @@ -27,12 +27,13 @@ import ( "github.com/renstrom/dedent" "github.com/spf13/cobra" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" kubeadmapi "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm" kubemaster "k8s.io/kubernetes/cmd/kubeadm/app/master" + "k8s.io/kubernetes/cmd/kubeadm/app/phases/kubeconfig" kubeadmutil "k8s.io/kubernetes/cmd/kubeadm/app/util" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/api/v1" - "k8s.io/kubernetes/pkg/fields" "k8s.io/kubernetes/pkg/kubectl" ) @@ -123,7 +124,7 @@ func NewCmdTokenGenerate(out io.Writer) *cobra.Command { // RunCreateToken generates a new bootstrap token and stores it as a secret on the server. func RunCreateToken(out io.Writer, cmd *cobra.Command, tokenDuration time.Duration, token string) error { - client, err := kubemaster.CreateClientFromFile(path.Join(kubeadmapi.GlobalEnvParams.KubernetesDir, "admin.conf")) + client, err := kubemaster.CreateClientFromFile(path.Join(kubeadmapi.GlobalEnvParams.KubernetesDir, kubeconfig.AdminKubeConfigFileName)) if err != nil { return err } @@ -156,7 +157,7 @@ func RunGenerateToken(out io.Writer) error { // RunListTokens lists details on all existing bootstrap tokens on the server. func RunListTokens(out io.Writer, errW io.Writer, cmd *cobra.Command) error { - client, err := kubemaster.CreateClientFromFile(path.Join(kubeadmapi.GlobalEnvParams.KubernetesDir, "admin.conf")) + client, err := kubemaster.CreateClientFromFile(path.Join(kubeadmapi.GlobalEnvParams.KubernetesDir, kubeconfig.AdminKubeConfigFileName)) if err != nil { return err } @@ -166,11 +167,11 @@ func RunListTokens(out io.Writer, errW io.Writer, cmd *cobra.Command) error { api.SecretTypeField: string(api.SecretTypeBootstrapToken), }, ) - listOptions := v1.ListOptions{ + listOptions := metav1.ListOptions{ FieldSelector: tokenSelector.String(), } - results, err := client.Secrets(api.NamespaceSystem).List(listOptions) + results, err := client.Secrets(metav1.NamespaceSystem).List(listOptions) if err != nil { return fmt.Errorf("failed to list bootstrap tokens [%v]", err) } @@ -215,13 +216,13 @@ func RunDeleteToken(out io.Writer, cmd *cobra.Command, tokenId string) error { return err } - client, err := kubemaster.CreateClientFromFile(path.Join(kubeadmapi.GlobalEnvParams.KubernetesDir, "admin.conf")) + client, err := kubemaster.CreateClientFromFile(path.Join(kubeadmapi.GlobalEnvParams.KubernetesDir, kubeconfig.AdminKubeConfigFileName)) if err != nil { return err } tokenSecretName := fmt.Sprintf("%s%s", kubeadmutil.BootstrapTokenSecretPrefix, tokenId) - if err := client.Secrets(api.NamespaceSystem).Delete(tokenSecretName, nil); err != nil { + if err := client.Secrets(metav1.NamespaceSystem).Delete(tokenSecretName, nil); err != nil { return fmt.Errorf("failed to delete bootstrap token [%v]", err) } fmt.Fprintf(out, "[token] bootstrap token deleted: %s\n", tokenId) diff --git a/vendor/k8s.io/kubernetes/pkg/util/homedir/BUILD b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/constants/BUILD similarity index 93% rename from vendor/k8s.io/kubernetes/pkg/util/homedir/BUILD rename to vendor/k8s.io/kubernetes/cmd/kubeadm/app/constants/BUILD index 3454c2c0..04ffa549 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/homedir/BUILD +++ b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/constants/BUILD @@ -9,7 +9,7 @@ load( go_library( name = "go_default_library", - srcs = ["homedir.go"], + srcs = ["constants.go"], tags = ["automanaged"], ) diff --git a/vendor/k8s.io/kubernetes/pkg/selection/operator.go b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/constants/constants.go similarity index 55% rename from vendor/k8s.io/kubernetes/pkg/selection/operator.go rename to vendor/k8s.io/kubernetes/cmd/kubeadm/app/constants/constants.go index 298f798c..c25ee190 100644 --- a/vendor/k8s.io/kubernetes/pkg/selection/operator.go +++ b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/constants/constants.go @@ -14,20 +14,18 @@ See the License for the specific language governing permissions and limitations under the License. */ -package selection - -// Operator represents a key/field's relationship to value(s). -// See labels.Requirement and fields.Requirement for more details. -type Operator string +package constants const ( - DoesNotExist Operator = "!" - Equals Operator = "=" - DoubleEquals Operator = "==" - In Operator = "in" - NotEquals Operator = "!=" - NotIn Operator = "notin" - Exists Operator = "exists" - GreaterThan Operator = "gt" - LessThan Operator = "lt" + CACertAndKeyBaseName = "ca" + CACertName = "ca.crt" + CAKeyName = "ca.key" + + APIServerCertAndKeyBaseName = "apiserver" + APIServerCertName = "apiserver.crt" + APIServerKeyName = "apiserver.key" + + APIServerKubeletClientCertAndKeyBaseName = "apiserver-kubelet-client" + APIServerKubeletClientCertName = "apiserver-kubelet-client.crt" + APIServerKubeletClientKeyName = "apiserver-kubelet-client.key" ) diff --git a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/discovery/BUILD b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/discovery/BUILD index f6132dbb..5f4d4d85 100644 --- a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/discovery/BUILD +++ b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/discovery/BUILD @@ -22,9 +22,9 @@ go_library( "//cmd/kubeadm/app/discovery/token:go_default_library", "//cmd/kubeadm/app/node:go_default_library", "//cmd/kubeadm/app/util:go_default_library", - "//pkg/client/unversioned/clientcmd:go_default_library", - "//pkg/client/unversioned/clientcmd/api:go_default_library", "//vendor:github.com/spf13/pflag", + "//vendor:k8s.io/client-go/tools/clientcmd", + "//vendor:k8s.io/client-go/tools/clientcmd/api", ], ) diff --git a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/discovery/discovery.go b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/discovery/discovery.go index 38ade986..7cf6178b 100644 --- a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/discovery/discovery.go +++ b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/discovery/discovery.go @@ -21,11 +21,11 @@ import ( "io/ioutil" "net/http" + "k8s.io/client-go/tools/clientcmd" + clientcmdapi "k8s.io/client-go/tools/clientcmd/api" kubeadmapi "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm" kubenode "k8s.io/kubernetes/cmd/kubeadm/app/node" kubeadmutil "k8s.io/kubernetes/cmd/kubeadm/app/util" - "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" - clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api" ) // For identifies and executes the desired discovery mechanism. diff --git a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/images/images.go b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/images/images.go index bb908624..4b789935 100644 --- a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/images/images.go +++ b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/images/images.go @@ -39,10 +39,8 @@ const ( gcrPrefix = "gcr.io/google_containers" etcdVersion = "3.0.14-kubeadm" - kubeDNSVersion = "1.10.1" - dnsmasqVersion = "1.10.1" - kubeDNSSidecarVersion = "1.10.1" - pauseVersion = "3.0" + kubeDNSVersion = "1.11.0" + pauseVersion = "3.0" ) func GetCoreImage(image string, cfg *kubeadmapi.MasterConfiguration, overrideImage string) string { @@ -63,8 +61,8 @@ func GetAddonImage(image string) string { repoPrefix := kubeadmapi.GlobalEnvParams.RepositoryPrefix return map[string]string{ KubeDNSImage: fmt.Sprintf("%s/%s-%s:%s", repoPrefix, KubeDNSImage, runtime.GOARCH, kubeDNSVersion), - KubeDNSmasqImage: fmt.Sprintf("%s/%s-%s:%s", repoPrefix, KubeDNSmasqImage, runtime.GOARCH, dnsmasqVersion), - KubeDNSSidecarImage: fmt.Sprintf("%s/%s-%s:%s", repoPrefix, KubeDNSSidecarImage, runtime.GOARCH, kubeDNSSidecarVersion), + KubeDNSmasqImage: fmt.Sprintf("%s/%s-%s:%s", repoPrefix, KubeDNSmasqImage, runtime.GOARCH, kubeDNSVersion), + KubeDNSSidecarImage: fmt.Sprintf("%s/%s-%s:%s", repoPrefix, KubeDNSSidecarImage, runtime.GOARCH, kubeDNSVersion), Pause: fmt.Sprintf("%s/%s-%s:%s", repoPrefix, Pause, runtime.GOARCH, pauseVersion), }[image] } diff --git a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/images/images_test.go b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/images/images_test.go index 36e322ec..258e70ed 100644 --- a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/images/images_test.go +++ b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/images/images_test.go @@ -88,11 +88,11 @@ func TestGetAddonImage(t *testing.T) { }, { KubeDNSmasqImage, - fmt.Sprintf("%s/%s-%s:%s", gcrPrefix, KubeDNSmasqImage, runtime.GOARCH, dnsmasqVersion), + fmt.Sprintf("%s/%s-%s:%s", gcrPrefix, KubeDNSmasqImage, runtime.GOARCH, kubeDNSVersion), }, { KubeDNSSidecarImage, - fmt.Sprintf("%s/%s-%s:%s", gcrPrefix, KubeDNSSidecarImage, runtime.GOARCH, kubeDNSSidecarVersion), + fmt.Sprintf("%s/%s-%s:%s", gcrPrefix, KubeDNSSidecarImage, runtime.GOARCH, kubeDNSVersion), }, { Pause, diff --git a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/master/BUILD b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/master/BUILD index 319a756f..b3b57075 100644 --- a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/master/BUILD +++ b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/master/BUILD @@ -15,30 +15,32 @@ go_library( "apiclient.go", "discovery.go", "manifests.go", + "selfhosted.go", "tokens.go", ], tags = ["automanaged"], deps = [ "//cmd/kubeadm/app/apis/kubeadm:go_default_library", "//cmd/kubeadm/app/apis/kubeadm/v1alpha1:go_default_library", + "//cmd/kubeadm/app/constants:go_default_library", "//cmd/kubeadm/app/images:go_default_library", + "//cmd/kubeadm/app/phases/kubeconfig:go_default_library", "//cmd/kubeadm/app/util:go_default_library", - "//pkg/api:go_default_library", "//pkg/api/resource:go_default_library", "//pkg/api/v1:go_default_library", "//pkg/apis/extensions/v1beta1:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", - "//pkg/client/unversioned/clientcmd:go_default_library", - "//pkg/client/unversioned/clientcmd/api:go_default_library", "//pkg/kubectl/cmd/util:go_default_library", "//pkg/registry/core/service/ipallocator:go_default_library", - "//pkg/util/cert:go_default_library", "//pkg/util/intstr:go_default_library", "//pkg/util/uuid:go_default_library", "//vendor:github.com/blang/semver", "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/util/wait", + "//vendor:k8s.io/client-go/tools/clientcmd", + "//vendor:k8s.io/client-go/tools/clientcmd/api", + "//vendor:k8s.io/client-go/util/cert", ], ) diff --git a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/master/addons.go b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/master/addons.go index 1121513a..9d682fe0 100644 --- a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/master/addons.go +++ b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/master/addons.go @@ -21,9 +21,10 @@ import ( "net" "path" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" kubeadmapi "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm" "k8s.io/kubernetes/cmd/kubeadm/app/images" - "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/cmd/kubeadm/app/phases/kubeconfig" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" @@ -31,6 +32,8 @@ import ( "k8s.io/kubernetes/pkg/util/intstr" ) +const KubeDNS = "kube-dns" + func createKubeProxyPodSpec(cfg *kubeadmapi.MasterConfiguration) v1.PodSpec { privilegedTrue := true return v1.PodSpec{ @@ -68,7 +71,7 @@ func createKubeProxyPodSpec(cfg *kubeadmapi.MasterConfiguration) v1.PodSpec { { Name: "kubeconfig", VolumeSource: v1.VolumeSource{ - HostPath: &v1.HostPathVolumeSource{Path: path.Join(kubeadmapi.GlobalEnvParams.KubernetesDir, "kubelet.conf")}, + HostPath: &v1.HostPathVolumeSource{Path: path.Join(kubeadmapi.GlobalEnvParams.KubernetesDir, kubeconfig.KubeletKubeConfigFileName)}, }, }, { @@ -86,6 +89,7 @@ func createKubeDNSPodSpec(cfg *kubeadmapi.MasterConfiguration) v1.PodSpec { dnsmasqPort := int32(53) return v1.PodSpec{ + ServiceAccountName: KubeDNS, Containers: []v1.Container{ // DNS server { @@ -250,7 +254,7 @@ func createKubeDNSServiceSpec(cfg *kubeadmapi.MasterConfiguration) (*v1.ServiceS } return &v1.ServiceSpec{ - Selector: map[string]string{"name": "kube-dns"}, + Selector: map[string]string{"name": KubeDNS}, Ports: []v1.ServicePort{ {Name: "dns", Port: 53, Protocol: v1.ProtocolUDP}, {Name: "dns-tcp", Port: 53, Protocol: v1.ProtocolTCP}, @@ -264,17 +268,21 @@ func CreateEssentialAddons(cfg *kubeadmapi.MasterConfiguration, client *clientse SetMasterTaintTolerations(&kubeProxyDaemonSet.Spec.Template.ObjectMeta) SetNodeAffinity(&kubeProxyDaemonSet.Spec.Template.ObjectMeta, NativeArchitectureNodeAffinity()) - if _, err := client.Extensions().DaemonSets(api.NamespaceSystem).Create(kubeProxyDaemonSet); err != nil { + if _, err := client.Extensions().DaemonSets(metav1.NamespaceSystem).Create(kubeProxyDaemonSet); err != nil { return fmt.Errorf("failed creating essential kube-proxy addon [%v]", err) } fmt.Println("[addons] Created essential addon: kube-proxy") - kubeDNSDeployment := NewDeployment("kube-dns", 1, createKubeDNSPodSpec(cfg)) + kubeDNSDeployment := NewDeployment(KubeDNS, 1, createKubeDNSPodSpec(cfg)) SetMasterTaintTolerations(&kubeDNSDeployment.Spec.Template.ObjectMeta) SetNodeAffinity(&kubeDNSDeployment.Spec.Template.ObjectMeta, NativeArchitectureNodeAffinity()) - - if _, err := client.Extensions().Deployments(api.NamespaceSystem).Create(kubeDNSDeployment); err != nil { + kubeDNSServiceAccount := &v1.ServiceAccount{} + kubeDNSServiceAccount.ObjectMeta.Name = KubeDNS + if _, err := client.ServiceAccounts(metav1.NamespaceSystem).Create(kubeDNSServiceAccount); err != nil { + return fmt.Errorf("failed creating kube-dns service account [%v]", err) + } + if _, err := client.Extensions().Deployments(metav1.NamespaceSystem).Create(kubeDNSDeployment); err != nil { return fmt.Errorf("failed creating essential kube-dns addon [%v]", err) } @@ -283,9 +291,9 @@ func CreateEssentialAddons(cfg *kubeadmapi.MasterConfiguration, client *clientse return fmt.Errorf("failed creating essential kube-dns addon [%v]", err) } - kubeDNSService := NewService("kube-dns", *kubeDNSServiceSpec) + kubeDNSService := NewService(KubeDNS, *kubeDNSServiceSpec) kubeDNSService.ObjectMeta.Labels["kubernetes.io/name"] = "KubeDNS" - if _, err := client.Services(api.NamespaceSystem).Create(kubeDNSService); err != nil { + if _, err := client.Services(metav1.NamespaceSystem).Create(kubeDNSService); err != nil { return fmt.Errorf("failed creating essential kube-dns addon [%v]", err) } diff --git a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/master/apiclient.go b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/master/apiclient.go index 982c0d0e..d1331ee6 100644 --- a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/master/apiclient.go +++ b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/master/apiclient.go @@ -25,17 +25,17 @@ import ( apierrs "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/client-go/tools/clientcmd" + clientcmdapi "k8s.io/client-go/tools/clientcmd/api" "k8s.io/kubernetes/cmd/kubeadm/app/images" - "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" extensions "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" - clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api" ) const apiCallRetryInterval = 500 * time.Millisecond +// TODO: This method shouldn't exist as a standalone function but be integrated into CreateClientFromFile func createAPIClient(adminKubeconfig *clientcmdapi.Config) (*clientset.Clientset, error) { adminClientConfig, err := clientcmd.NewDefaultClientConfig( *adminKubeconfig, @@ -65,36 +65,14 @@ func CreateClientAndWaitForAPI(file string) (*clientset.Clientset, error) { if err != nil { return nil, err } + fmt.Println("[apiclient] Created API client, waiting for the control plane to become ready") - - start := time.Now() - wait.PollInfinite(apiCallRetryInterval, func() (bool, error) { - cs, err := client.ComponentStatuses().List(v1.ListOptions{}) - if err != nil { - return false, nil - } - // TODO(phase2) must revisit this when we implement HA - if len(cs.Items) < 3 { - fmt.Println("[apiclient] Not all control plane components are ready yet") - return false, nil - } - for _, item := range cs.Items { - for _, condition := range item.Conditions { - if condition.Type != v1.ComponentHealthy { - fmt.Printf("[apiclient] Control plane component %q is still unhealthy: %#v\n", item.ObjectMeta.Name, item.Conditions) - return false, nil - } - } - } - - fmt.Printf("[apiclient] All control plane components are healthy after %f seconds\n", time.Since(start).Seconds()) - return true, nil - }) + WaitForAPI(client) fmt.Println("[apiclient] Waiting for at least one node to register and become ready") - start = time.Now() + start := time.Now() wait.PollInfinite(apiCallRetryInterval, func() (bool, error) { - nodeList, err := client.Nodes().List(v1.ListOptions{}) + nodeList, err := client.Nodes().List(metav1.ListOptions{}) if err != nil { fmt.Println("[apiclient] Temporarily unable to list nodes (will retry)") return false, nil @@ -124,14 +102,44 @@ func standardLabels(n string) map[string]string { } } +func WaitForAPI(client *clientset.Clientset) { + start := time.Now() + wait.PollInfinite(apiCallRetryInterval, func() (bool, error) { + // TODO: use /healthz API instead of this + cs, err := client.ComponentStatuses().List(metav1.ListOptions{}) + if err != nil { + if apierrs.IsForbidden(err) { + fmt.Println("[apiclient] Waiting for API server authorization") + } + return false, nil + } + + // TODO(phase2) must revisit this when we implement HA + if len(cs.Items) < 3 { + return false, nil + } + for _, item := range cs.Items { + for _, condition := range item.Conditions { + if condition.Type != v1.ComponentHealthy { + fmt.Printf("[apiclient] Control plane component %q is still unhealthy: %#v\n", item.ObjectMeta.Name, item.Conditions) + return false, nil + } + } + } + + fmt.Printf("[apiclient] All control plane components are healthy after %f seconds\n", time.Since(start).Seconds()) + return true, nil + }) +} + func NewDaemonSet(daemonName string, podSpec v1.PodSpec) *extensions.DaemonSet { l := standardLabels(daemonName) return &extensions.DaemonSet{ - ObjectMeta: v1.ObjectMeta{Name: daemonName}, + ObjectMeta: metav1.ObjectMeta{Name: daemonName}, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: l}, Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{Labels: l}, + ObjectMeta: metav1.ObjectMeta{Labels: l}, Spec: podSpec, }, }, @@ -141,7 +149,7 @@ func NewDaemonSet(daemonName string, podSpec v1.PodSpec) *extensions.DaemonSet { func NewService(serviceName string, spec v1.ServiceSpec) *v1.Service { l := standardLabels(serviceName) return &v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: serviceName, Labels: l, }, @@ -152,12 +160,12 @@ func NewService(serviceName string, spec v1.ServiceSpec) *v1.Service { func NewDeployment(deploymentName string, replicas int32, podSpec v1.PodSpec) *extensions.Deployment { l := standardLabels(deploymentName) return &extensions.Deployment{ - ObjectMeta: v1.ObjectMeta{Name: deploymentName}, + ObjectMeta: metav1.ObjectMeta{Name: deploymentName}, Spec: extensions.DeploymentSpec{ Replicas: &replicas, Selector: &metav1.LabelSelector{MatchLabels: l}, Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{Labels: l}, + ObjectMeta: metav1.ObjectMeta{Labels: l}, Spec: podSpec, }, }, @@ -167,7 +175,7 @@ func NewDeployment(deploymentName string, replicas int32, podSpec v1.PodSpec) *e // It's safe to do this for alpha, as we don't have HA and there is no way we can get // more then one node here (TODO(phase1+) use os.Hostname) func findMyself(client *clientset.Clientset) (*v1.Node, error) { - nodeList, err := client.Nodes().List(v1.ListOptions{}) + nodeList, err := client.Nodes().List(metav1.ListOptions{}) if err != nil { return nil, fmt.Errorf("unable to list nodes [%v]", err) } @@ -213,7 +221,7 @@ func UpdateMasterRoleLabelsAndTaints(client *clientset.Clientset, schedulable bo return nil } -func SetMasterTaintTolerations(meta *v1.ObjectMeta) { +func SetMasterTaintTolerations(meta *metav1.ObjectMeta) { tolerationsAnnotation, _ := json.Marshal([]v1.Toleration{{Key: "dedicated", Value: "master", Effect: "NoSchedule"}}) if meta.Annotations == nil { meta.Annotations = map[string]string{} @@ -222,7 +230,7 @@ func SetMasterTaintTolerations(meta *v1.ObjectMeta) { } // SetNodeAffinity is a basic helper to set meta.Annotations[v1.AffinityAnnotationKey] for one or more v1.NodeSelectorRequirement(s) -func SetNodeAffinity(meta *v1.ObjectMeta, expr ...v1.NodeSelectorRequirement) { +func SetNodeAffinity(meta *metav1.ObjectMeta, expr ...v1.NodeSelectorRequirement) { nodeAffinity := &v1.NodeAffinity{ RequiredDuringSchedulingIgnoredDuringExecution: &v1.NodeSelector{ NodeSelectorTerms: []v1.NodeSelectorTerm{{MatchExpressions: expr}}, @@ -265,7 +273,7 @@ func createDummyDeployment(client *clientset.Clientset) { wait.PollInfinite(apiCallRetryInterval, func() (bool, error) { // TODO: we should check the error, as some cases may be fatal - if _, err := client.Extensions().Deployments(api.NamespaceSystem).Create(dummyDeployment); err != nil { + if _, err := client.Extensions().Deployments(metav1.NamespaceSystem).Create(dummyDeployment); err != nil { fmt.Printf("[apiclient] Failed to create test deployment [%v] (will retry)\n", err) return false, nil } @@ -273,7 +281,7 @@ func createDummyDeployment(client *clientset.Clientset) { }) wait.PollInfinite(apiCallRetryInterval, func() (bool, error) { - d, err := client.Extensions().Deployments(api.NamespaceSystem).Get("dummy", metav1.GetOptions{}) + d, err := client.Extensions().Deployments(metav1.NamespaceSystem).Get("dummy", metav1.GetOptions{}) if err != nil { fmt.Printf("[apiclient] Failed to get test deployment [%v] (will retry)\n", err) return false, nil @@ -287,7 +295,7 @@ func createDummyDeployment(client *clientset.Clientset) { fmt.Println("[apiclient] Test deployment succeeded") // TODO: In the future, make sure the ReplicaSet and Pod are garbage collected - if err := client.Extensions().Deployments(api.NamespaceSystem).Delete("dummy", &v1.DeleteOptions{}); err != nil { + if err := client.Extensions().Deployments(metav1.NamespaceSystem).Delete("dummy", &metav1.DeleteOptions{}); err != nil { fmt.Printf("[apiclient] Failed to delete test deployment [%v] (will ignore)\n", err) } } diff --git a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/master/discovery.go b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/master/discovery.go index 4416e576..cc4d2b44 100644 --- a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/master/discovery.go +++ b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/master/discovery.go @@ -20,18 +20,19 @@ import ( "crypto/x509" "encoding/json" "fmt" + "path" "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/wait" + certutil "k8s.io/client-go/util/cert" kubeadmapi "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm" kubeadmapiext "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1alpha1" + kubeadmconstants "k8s.io/kubernetes/cmd/kubeadm/app/constants" kubeadmutil "k8s.io/kubernetes/cmd/kubeadm/app/util" - "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" extensions "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - certutil "k8s.io/kubernetes/pkg/util/cert" ) type kubeDiscovery struct { @@ -109,7 +110,7 @@ func newKubeDiscovery(cfg *kubeadmapi.MasterConfiguration, caCert *x509.Certific kd := kubeDiscovery{ Deployment: NewDeployment(kubeDiscoveryName, 1, newKubeDiscoveryPodSpec(cfg)), Secret: &v1.Secret{ - ObjectMeta: v1.ObjectMeta{Name: kubeDiscoverySecretName}, + ObjectMeta: metav1.ObjectMeta{Name: kubeDiscoverySecretName}, Type: v1.SecretTypeOpaque, Data: encodeKubeDiscoverySecretData(cfg.Discovery.Token, cfg.API, caCert), }, @@ -121,13 +122,23 @@ func newKubeDiscovery(cfg *kubeadmapi.MasterConfiguration, caCert *x509.Certific return kd } -func CreateDiscoveryDeploymentAndSecret(cfg *kubeadmapi.MasterConfiguration, client *clientset.Clientset, caCert *x509.Certificate) error { +func CreateDiscoveryDeploymentAndSecret(cfg *kubeadmapi.MasterConfiguration, client *clientset.Clientset) error { + caCertificatePath := path.Join(kubeadmapi.GlobalEnvParams.HostPKIPath, kubeadmconstants.CACertName) + caCerts, err := certutil.CertsFromFile(caCertificatePath) + if err != nil { + return fmt.Errorf("couldn't load the CA certificate file %s: %v", caCertificatePath, err) + } + + // We are only putting one certificate in the certificate pem file, so it's safe to just pick the first one + // TODO: Support multiple certs here in order to be able to rotate certs + caCert := caCerts[0] + kd := newKubeDiscovery(cfg, caCert) - if _, err := client.Extensions().Deployments(api.NamespaceSystem).Create(kd.Deployment); err != nil { + if _, err := client.Extensions().Deployments(metav1.NamespaceSystem).Create(kd.Deployment); err != nil { return fmt.Errorf("failed to create %q deployment [%v]", kubeDiscoveryName, err) } - if _, err := client.Secrets(api.NamespaceSystem).Create(kd.Secret); err != nil { + if _, err := client.Secrets(metav1.NamespaceSystem).Create(kd.Secret); err != nil { return fmt.Errorf("failed to create %q secret [%v]", kubeDiscoverySecretName, err) } @@ -135,7 +146,7 @@ func CreateDiscoveryDeploymentAndSecret(cfg *kubeadmapi.MasterConfiguration, cli start := time.Now() wait.PollInfinite(apiCallRetryInterval, func() (bool, error) { - d, err := client.Extensions().Deployments(api.NamespaceSystem).Get(kubeDiscoveryName, metav1.GetOptions{}) + d, err := client.Extensions().Deployments(metav1.NamespaceSystem).Get(kubeDiscoveryName, metav1.GetOptions{}) if err != nil { return false, nil } diff --git a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/master/manifests.go b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/master/manifests.go index 1bf3fe35..b234b700 100644 --- a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/master/manifests.go +++ b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/master/manifests.go @@ -26,6 +26,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" kubeadmapi "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm" + kubeadmconstants "k8s.io/kubernetes/cmd/kubeadm/app/constants" "k8s.io/kubernetes/cmd/kubeadm/app/images" "k8s.io/kubernetes/pkg/api/resource" api "k8s.io/kubernetes/pkg/api/v1" @@ -40,15 +41,17 @@ const ( DefaultClusterName = "kubernetes" DefaultCloudConfigPath = "/etc/kubernetes/cloud-config" - etcd = "etcd" - apiServer = "apiserver" - controllerManager = "controller-manager" - scheduler = "scheduler" - proxy = "proxy" - kubeAPIServer = "kube-apiserver" - kubeControllerManager = "kube-controller-manager" - kubeScheduler = "kube-scheduler" - kubeProxy = "kube-proxy" + etcd = "etcd" + apiServer = "apiserver" + controllerManager = "controller-manager" + scheduler = "scheduler" + proxy = "proxy" + kubeAPIServer = "kube-apiserver" + kubeControllerManager = "kube-controller-manager" + kubeScheduler = "kube-scheduler" + kubeProxy = "kube-proxy" + authorizationPolicyFile = "abac_policy.json" + authorizationWebhookConfigFile = "webhook_authz.conf" ) var ( @@ -80,7 +83,7 @@ func WriteStaticPodManifests(cfg *kubeadmapi.MasterConfiguration) error { kubeAPIServer: componentPod(api.Container{ Name: kubeAPIServer, Image: images.GetCoreImage(images.KubeAPIServerImage, cfg, kubeadmapi.GlobalEnvParams.HyperkubeImage), - Command: getAPIServerCommand(cfg), + Command: getAPIServerCommand(cfg, false), VolumeMounts: volumeMounts, LivenessProbe: componentProbe(8080, "/healthz"), Resources: componentResources("250m"), @@ -89,7 +92,7 @@ func WriteStaticPodManifests(cfg *kubeadmapi.MasterConfiguration) error { kubeControllerManager: componentPod(api.Container{ Name: kubeControllerManager, Image: images.GetCoreImage(images.KubeControllerManagerImage, cfg, kubeadmapi.GlobalEnvParams.HyperkubeImage), - Command: getControllerManagerCommand(cfg), + Command: getControllerManagerCommand(cfg, false), VolumeMounts: volumeMounts, LivenessProbe: componentProbe(10252, "/healthz"), Resources: componentResources("200m"), @@ -98,7 +101,7 @@ func WriteStaticPodManifests(cfg *kubeadmapi.MasterConfiguration) error { kubeScheduler: componentPod(api.Container{ Name: kubeScheduler, Image: images.GetCoreImage(images.KubeSchedulerImage, cfg, kubeadmapi.GlobalEnvParams.HyperkubeImage), - Command: getSchedulerCommand(cfg), + Command: getSchedulerCommand(cfg, false), LivenessProbe: componentProbe(10251, "/healthz"), Resources: componentResources("100m"), Env: getProxyEnvVars(), @@ -215,6 +218,23 @@ func pkiVolumeMount() api.VolumeMount { } } +func flockVolume() api.Volume { + return api.Volume{ + Name: "var-lock", + VolumeSource: api.VolumeSource{ + HostPath: &api.HostPathVolumeSource{Path: "/var/lock"}, + }, + } +} + +func flockVolumeMount() api.VolumeMount { + return api.VolumeMount{ + Name: "var-lock", + MountPath: "/var/lock", + ReadOnly: false, + } +} + func k8sVolume(cfg *kubeadmapi.MasterConfiguration) api.Volume { return api.Volume{ Name: "k8s", @@ -261,7 +281,7 @@ func componentPod(container api.Container, volumes ...api.Volume) api.Pod { APIVersion: "v1", Kind: "Pod", }, - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: container.Name, Namespace: "kube-system", Labels: map[string]string{"component": container.Name, "tier": "control-plane"}, @@ -282,23 +302,51 @@ func getComponentBaseCommand(component string) []string { return []string{"kube-" + component} } -func getAPIServerCommand(cfg *kubeadmapi.MasterConfiguration) []string { - command := append(getComponentBaseCommand(apiServer), +func getCertFilePath(certName string) string { + return path.Join(kubeadmapi.GlobalEnvParams.HostPKIPath, certName) +} + +func getAPIServerCommand(cfg *kubeadmapi.MasterConfiguration, selfHosted bool) []string { + var command []string + + // self-hosted apiserver needs to wait on a lock + if selfHosted { + command = []string{"/usr/bin/flock", "--exclusive", "--timeout=30", "/var/lock/api-server.lock"} + } + + command = append(getComponentBaseCommand(apiServer), "--insecure-bind-address=127.0.0.1", "--admission-control=NamespaceLifecycle,LimitRanger,ServiceAccount,PersistentVolumeLabel,DefaultStorageClass,ResourceQuota", "--service-cluster-ip-range="+cfg.Networking.ServiceSubnet, - "--service-account-key-file="+kubeadmapi.GlobalEnvParams.HostPKIPath+"/apiserver-key.pem", - "--client-ca-file="+kubeadmapi.GlobalEnvParams.HostPKIPath+"/ca.pem", - "--tls-cert-file="+kubeadmapi.GlobalEnvParams.HostPKIPath+"/apiserver.pem", - "--tls-private-key-file="+kubeadmapi.GlobalEnvParams.HostPKIPath+"/apiserver-key.pem", + "--service-account-key-file="+getCertFilePath(kubeadmconstants.APIServerKeyName), + "--client-ca-file="+getCertFilePath(kubeadmconstants.CACertName), + "--tls-cert-file="+getCertFilePath(kubeadmconstants.APIServerCertName), + "--tls-private-key-file="+getCertFilePath(kubeadmconstants.APIServerKeyName), + "--kubelet-client-certificate="+getCertFilePath(kubeadmconstants.APIServerKubeletClientCertName), + "--kubelet-client-key="+getCertFilePath(kubeadmconstants.APIServerKubeletClientKeyName), "--token-auth-file="+kubeadmapi.GlobalEnvParams.HostPKIPath+"/tokens.csv", fmt.Sprintf("--secure-port=%d", cfg.API.Port), "--allow-privileged", + "--storage-backend=etcd3", ) + if cfg.AuthorizationMode != "" { + command = append(command, "--authorization-mode="+cfg.AuthorizationMode) + switch cfg.AuthorizationMode { + case "ABAC": + command = append(command, "--authorization-policy-file="+path.Join(kubeadmapi.GlobalEnvParams.KubernetesDir, authorizationPolicyFile)) + case "Webhook": + command = append(command, "--authorization-webhook-config-file="+path.Join(kubeadmapi.GlobalEnvParams.KubernetesDir, authorizationWebhookConfigFile)) + } + } + // Use first address we are given if len(cfg.API.AdvertiseAddresses) > 0 { - command = append(command, fmt.Sprintf("--advertise-address=%s", cfg.API.AdvertiseAddresses[0])) + if selfHosted { + command = append(command, "--advertise-address=$(POD_IP)") + } else { + command = append(command, fmt.Sprintf("--advertise-address=%s", cfg.API.AdvertiseAddresses[0])) + } } if len(cfg.KubernetesVersion) != 0 { @@ -347,17 +395,24 @@ func getAPIServerCommand(cfg *kubeadmapi.MasterConfiguration) []string { return command } -func getControllerManagerCommand(cfg *kubeadmapi.MasterConfiguration) []string { - command := append(getComponentBaseCommand(controllerManager), +func getControllerManagerCommand(cfg *kubeadmapi.MasterConfiguration, selfHosted bool) []string { + var command []string + + // self-hosted controller-manager needs to wait on a lock + if selfHosted { + command = []string{"/usr/bin/flock", "--exclusive", "--timeout=30", "/var/lock/controller-manager.lock"} + } + + command = append(getComponentBaseCommand(controllerManager), "--address=127.0.0.1", "--leader-elect", "--master=127.0.0.1:8080", "--cluster-name="+DefaultClusterName, - "--root-ca-file="+kubeadmapi.GlobalEnvParams.HostPKIPath+"/ca.pem", - "--service-account-private-key-file="+kubeadmapi.GlobalEnvParams.HostPKIPath+"/apiserver-key.pem", - "--cluster-signing-cert-file="+kubeadmapi.GlobalEnvParams.HostPKIPath+"/ca.pem", - "--cluster-signing-key-file="+kubeadmapi.GlobalEnvParams.HostPKIPath+"/ca-key.pem", - "--insecure-experimental-approve-all-kubelet-csrs-for-group=system:kubelet-bootstrap", + "--root-ca-file="+getCertFilePath(kubeadmconstants.CACertName), + "--service-account-private-key-file="+getCertFilePath(kubeadmconstants.APIServerKeyName), + "--cluster-signing-cert-file="+getCertFilePath(kubeadmconstants.CACertName), + "--cluster-signing-key-file="+getCertFilePath(kubeadmconstants.CAKeyName), + "--insecure-experimental-approve-all-kubelet-csrs-for-group="+KubeletBootstrapGroup, ) if cfg.CloudProvider != "" { @@ -374,15 +429,25 @@ func getControllerManagerCommand(cfg *kubeadmapi.MasterConfiguration) []string { if cfg.Networking.PodSubnet != "" { command = append(command, "--allocate-node-cidrs=true", "--cluster-cidr="+cfg.Networking.PodSubnet) } + return command } -func getSchedulerCommand(cfg *kubeadmapi.MasterConfiguration) []string { - return append(getComponentBaseCommand(scheduler), +func getSchedulerCommand(cfg *kubeadmapi.MasterConfiguration, selfHosted bool) []string { + var command []string + + // self-hosted apiserver needs to wait on a lock + if selfHosted { + command = []string{"/usr/bin/flock", "--exclusive", "--timeout=30", "/var/lock/api-server.lock"} + } + + command = append(getComponentBaseCommand(scheduler), "--address=127.0.0.1", "--leader-elect", "--master=127.0.0.1:8080", ) + + return command } func getProxyCommand(cfg *kubeadmapi.MasterConfiguration) []string { @@ -406,3 +471,16 @@ func getProxyEnvVars() []api.EnvVar { } return envs } + +func getSelfHostedAPIServerEnv() []api.EnvVar { + podIPEnvVar := api.EnvVar{ + Name: "POD_IP", + ValueFrom: &api.EnvVarSource{ + FieldRef: &api.ObjectFieldSelector{ + FieldPath: "status.podIP", + }, + }, + } + + return append(getProxyEnvVars(), podIPEnvVar) +} diff --git a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/master/manifests_test.go b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/master/manifests_test.go index 1e0c228b..b20d70b9 100644 --- a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/master/manifests_test.go +++ b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/master/manifests_test.go @@ -33,7 +33,7 @@ func TestWriteStaticPodManifests(t *testing.T) { if err != nil { t.Fatalf("Couldn't create tmpdir") } - defer os.Remove(tmpdir) + defer os.RemoveAll(tmpdir) // set up tmp GlobalEnvParams values for testing oldEnv := kubeadmapi.GlobalEnvParams @@ -372,13 +372,16 @@ func TestGetAPIServerCommand(t *testing.T) { "--insecure-bind-address=127.0.0.1", "--admission-control=NamespaceLifecycle,LimitRanger,ServiceAccount,PersistentVolumeLabel,DefaultStorageClass,ResourceQuota", "--service-cluster-ip-range=bar", - "--service-account-key-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/apiserver-key.pem", - "--client-ca-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/ca.pem", - "--tls-cert-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/apiserver.pem", - "--tls-private-key-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/apiserver-key.pem", + "--service-account-key-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/apiserver.key", + "--client-ca-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/ca.crt", + "--tls-cert-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/apiserver.crt", + "--tls-private-key-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/apiserver.key", + "--kubelet-client-certificate=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/apiserver-kubelet-client.crt", + "--kubelet-client-key=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/apiserver-kubelet-client.key", "--token-auth-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/tokens.csv", fmt.Sprintf("--secure-port=%d", 123), "--allow-privileged", + "--storage-backend=etcd3", "--etcd-servers=http://127.0.0.1:2379", }, }, @@ -392,13 +395,16 @@ func TestGetAPIServerCommand(t *testing.T) { "--insecure-bind-address=127.0.0.1", "--admission-control=NamespaceLifecycle,LimitRanger,ServiceAccount,PersistentVolumeLabel,DefaultStorageClass,ResourceQuota", "--service-cluster-ip-range=bar", - "--service-account-key-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/apiserver-key.pem", - "--client-ca-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/ca.pem", - "--tls-cert-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/apiserver.pem", - "--tls-private-key-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/apiserver-key.pem", + "--service-account-key-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/apiserver.key", + "--client-ca-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/ca.crt", + "--tls-cert-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/apiserver.crt", + "--tls-private-key-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/apiserver.key", + "--kubelet-client-certificate=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/apiserver-kubelet-client.crt", + "--kubelet-client-key=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/apiserver-kubelet-client.key", "--token-auth-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/tokens.csv", fmt.Sprintf("--secure-port=%d", 123), "--allow-privileged", + "--storage-backend=etcd3", "--advertise-address=foo", "--etcd-servers=http://127.0.0.1:2379", }, @@ -414,13 +420,16 @@ func TestGetAPIServerCommand(t *testing.T) { "--insecure-bind-address=127.0.0.1", "--admission-control=NamespaceLifecycle,LimitRanger,ServiceAccount,PersistentVolumeLabel,DefaultStorageClass,ResourceQuota", "--service-cluster-ip-range=bar", - "--service-account-key-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/apiserver-key.pem", - "--client-ca-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/ca.pem", - "--tls-cert-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/apiserver.pem", - "--tls-private-key-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/apiserver-key.pem", + "--service-account-key-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/apiserver.key", + "--client-ca-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/ca.crt", + "--tls-cert-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/apiserver.crt", + "--tls-private-key-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/apiserver.key", + "--kubelet-client-certificate=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/apiserver-kubelet-client.crt", + "--kubelet-client-key=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/apiserver-kubelet-client.key", "--token-auth-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/tokens.csv", fmt.Sprintf("--secure-port=%d", 123), "--allow-privileged", + "--storage-backend=etcd3", "--etcd-servers=http://127.0.0.1:2379", "--etcd-certfile=fiz", "--etcd-keyfile=faz", @@ -438,13 +447,16 @@ func TestGetAPIServerCommand(t *testing.T) { "--insecure-bind-address=127.0.0.1", "--admission-control=NamespaceLifecycle,LimitRanger,ServiceAccount,PersistentVolumeLabel,DefaultStorageClass,ResourceQuota", "--service-cluster-ip-range=bar", - "--service-account-key-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/apiserver-key.pem", - "--client-ca-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/ca.pem", - "--tls-cert-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/apiserver.pem", - "--tls-private-key-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/apiserver-key.pem", + "--service-account-key-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/apiserver.key", + "--client-ca-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/ca.crt", + "--tls-cert-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/apiserver.crt", + "--tls-private-key-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/apiserver.key", + "--kubelet-client-certificate=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/apiserver-kubelet-client.crt", + "--kubelet-client-key=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/apiserver-kubelet-client.key", "--token-auth-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/tokens.csv", fmt.Sprintf("--secure-port=%d", 123), "--allow-privileged", + "--storage-backend=etcd3", "--advertise-address=foo", "--kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname", "--anonymous-auth=false", @@ -454,7 +466,7 @@ func TestGetAPIServerCommand(t *testing.T) { } for _, rt := range tests { - actual := getAPIServerCommand(rt.cfg) + actual := getAPIServerCommand(rt.cfg, false) for i := range actual { if actual[i] != rt.expected[i] { t.Errorf( @@ -480,11 +492,11 @@ func TestGetControllerManagerCommand(t *testing.T) { "--leader-elect", "--master=127.0.0.1:8080", "--cluster-name=" + DefaultClusterName, - "--root-ca-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/ca.pem", - "--service-account-private-key-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/apiserver-key.pem", - "--cluster-signing-cert-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/ca.pem", - "--cluster-signing-key-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/ca-key.pem", - "--insecure-experimental-approve-all-kubelet-csrs-for-group=system:kubelet-bootstrap", + "--root-ca-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/ca.crt", + "--service-account-private-key-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/apiserver.key", + "--cluster-signing-cert-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/ca.crt", + "--cluster-signing-key-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/ca.key", + "--insecure-experimental-approve-all-kubelet-csrs-for-group=kubeadm:kubelet-bootstrap", }, }, { @@ -495,11 +507,11 @@ func TestGetControllerManagerCommand(t *testing.T) { "--leader-elect", "--master=127.0.0.1:8080", "--cluster-name=" + DefaultClusterName, - "--root-ca-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/ca.pem", - "--service-account-private-key-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/apiserver-key.pem", - "--cluster-signing-cert-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/ca.pem", - "--cluster-signing-key-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/ca-key.pem", - "--insecure-experimental-approve-all-kubelet-csrs-for-group=system:kubelet-bootstrap", + "--root-ca-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/ca.crt", + "--service-account-private-key-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/apiserver.key", + "--cluster-signing-cert-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/ca.crt", + "--cluster-signing-key-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/ca.key", + "--insecure-experimental-approve-all-kubelet-csrs-for-group=kubeadm:kubelet-bootstrap", "--cloud-provider=foo", }, }, @@ -511,11 +523,11 @@ func TestGetControllerManagerCommand(t *testing.T) { "--leader-elect", "--master=127.0.0.1:8080", "--cluster-name=" + DefaultClusterName, - "--root-ca-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/ca.pem", - "--service-account-private-key-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/apiserver-key.pem", - "--cluster-signing-cert-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/ca.pem", - "--cluster-signing-key-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/ca-key.pem", - "--insecure-experimental-approve-all-kubelet-csrs-for-group=system:kubelet-bootstrap", + "--root-ca-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/ca.crt", + "--service-account-private-key-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/apiserver.key", + "--cluster-signing-cert-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/ca.crt", + "--cluster-signing-key-file=" + kubeadmapi.GlobalEnvParams.HostPKIPath + "/ca.key", + "--insecure-experimental-approve-all-kubelet-csrs-for-group=kubeadm:kubelet-bootstrap", "--allocate-node-cidrs=true", "--cluster-cidr=bar", }, @@ -523,7 +535,7 @@ func TestGetControllerManagerCommand(t *testing.T) { } for _, rt := range tests { - actual := getControllerManagerCommand(rt.cfg) + actual := getControllerManagerCommand(rt.cfg, false) for i := range actual { if actual[i] != rt.expected[i] { t.Errorf( @@ -553,7 +565,7 @@ func TestGetSchedulerCommand(t *testing.T) { } for _, rt := range tests { - actual := getSchedulerCommand(rt.cfg) + actual := getSchedulerCommand(rt.cfg, false) for i := range actual { if actual[i] != rt.expected[i] { t.Errorf( diff --git a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/master/selfhosted.go b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/master/selfhosted.go new file mode 100644 index 00000000..031a1a74 --- /dev/null +++ b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/master/selfhosted.go @@ -0,0 +1,330 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package master + +import ( + "encoding/json" + "fmt" + "os" + "path" + "time" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/wait" + kubeadmapi "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm" + "k8s.io/kubernetes/cmd/kubeadm/app/images" + "k8s.io/kubernetes/pkg/api/v1" + ext "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" + "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" +) + +func CreateSelfHostedControlPlane(cfg *kubeadmapi.MasterConfiguration, client *clientset.Clientset) error { + volumes := []v1.Volume{k8sVolume(cfg)} + volumeMounts := []v1.VolumeMount{k8sVolumeMount()} + if isCertsVolumeMountNeeded() { + volumes = append(volumes, certsVolume(cfg)) + volumeMounts = append(volumeMounts, certsVolumeMount()) + } + + if isPkiVolumeMountNeeded() { + volumes = append(volumes, pkiVolume(cfg)) + volumeMounts = append(volumeMounts, pkiVolumeMount()) + } + + // Need lock for self-hosted + volumes = append(volumes, flockVolume()) + volumeMounts = append(volumeMounts, flockVolumeMount()) + + if err := launchSelfHostedAPIServer(cfg, client, volumes, volumeMounts); err != nil { + return err + } + + if err := launchSelfHostedScheduler(cfg, client, volumes, volumeMounts); err != nil { + return err + } + + if err := launchSelfHostedControllerManager(cfg, client, volumes, volumeMounts); err != nil { + return err + } + + return nil +} + +func launchSelfHostedAPIServer(cfg *kubeadmapi.MasterConfiguration, client *clientset.Clientset, volumes []v1.Volume, volumeMounts []v1.VolumeMount) error { + start := time.Now() + + apiServer := getAPIServerDS(cfg, volumes, volumeMounts) + if _, err := client.Extensions().DaemonSets(metav1.NamespaceSystem).Create(&apiServer); err != nil { + return fmt.Errorf("failed to create self-hosted %q daemon set [%v]", kubeAPIServer, err) + } + + wait.PollInfinite(apiCallRetryInterval, func() (bool, error) { + // TODO: This might be pointless, checking the pods is probably enough. + // It does however get us a count of how many there should be which may be useful + // with HA. + apiDS, err := client.DaemonSets(metav1.NamespaceSystem).Get("self-hosted-"+kubeAPIServer, + metav1.GetOptions{}) + if err != nil { + fmt.Println("[self-hosted] error getting apiserver DaemonSet:", err) + return false, nil + } + fmt.Printf("[self-hosted] %s DaemonSet current=%d, desired=%d\n", + kubeAPIServer, + apiDS.Status.CurrentNumberScheduled, + apiDS.Status.DesiredNumberScheduled) + + if apiDS.Status.CurrentNumberScheduled != apiDS.Status.DesiredNumberScheduled { + return false, nil + } + + return true, nil + }) + + // Wait for self-hosted API server to take ownership + waitForPodsWithLabel(client, "self-hosted-"+kubeAPIServer, true) + + // Remove temporary API server + apiServerStaticManifestPath := buildStaticManifestFilepath(kubeAPIServer) + if err := os.RemoveAll(apiServerStaticManifestPath); err != nil { + return fmt.Errorf("unable to delete temporary API server manifest [%v]", err) + } + + WaitForAPI(client) + + fmt.Printf("[self-hosted] self-hosted kube-apiserver ready after %f seconds\n", time.Since(start).Seconds()) + return nil +} + +func launchSelfHostedControllerManager(cfg *kubeadmapi.MasterConfiguration, client *clientset.Clientset, volumes []v1.Volume, volumeMounts []v1.VolumeMount) error { + start := time.Now() + + ctrlMgr := getControllerManagerDeployment(cfg, volumes, volumeMounts) + if _, err := client.Extensions().Deployments(metav1.NamespaceSystem).Create(&ctrlMgr); err != nil { + return fmt.Errorf("failed to create self-hosted %q deployment [%v]", kubeControllerManager, err) + } + + waitForPodsWithLabel(client, "self-hosted-"+kubeControllerManager, false) + + ctrlMgrStaticManifestPath := buildStaticManifestFilepath(kubeControllerManager) + if err := os.RemoveAll(ctrlMgrStaticManifestPath); err != nil { + return fmt.Errorf("unable to delete temporary controller manager manifest [%v]", err) + } + + fmt.Printf("[self-hosted] self-hosted kube-controller-manager ready after %f seconds\n", time.Since(start).Seconds()) + return nil + +} + +func launchSelfHostedScheduler(cfg *kubeadmapi.MasterConfiguration, client *clientset.Clientset, volumes []v1.Volume, volumeMounts []v1.VolumeMount) error { + start := time.Now() + scheduler := getSchedulerDeployment(cfg) + if _, err := client.Extensions().Deployments(metav1.NamespaceSystem).Create(&scheduler); err != nil { + return fmt.Errorf("failed to create self-hosted %q deployment [%v]", kubeScheduler, err) + } + + waitForPodsWithLabel(client, "self-hosted-"+kubeScheduler, false) + + schedulerStaticManifestPath := buildStaticManifestFilepath(kubeScheduler) + if err := os.RemoveAll(schedulerStaticManifestPath); err != nil { + return fmt.Errorf("unable to delete temporary scheduler manifest [%v]", err) + } + + fmt.Printf("[self-hosted] self-hosted kube-scheduler ready after %f seconds\n", time.Since(start).Seconds()) + return nil +} + +// waitForPodsWithLabel will lookup pods with the given label and wait until they are all +// reporting status as running. +func waitForPodsWithLabel(client *clientset.Clientset, appLabel string, mustBeRunning bool) { + wait.PollInfinite(apiCallRetryInterval, func() (bool, error) { + // TODO: Do we need a stronger label link than this? + listOpts := metav1.ListOptions{LabelSelector: fmt.Sprintf("k8s-app=%s", appLabel)} + apiPods, err := client.Pods(metav1.NamespaceSystem).List(listOpts) + if err != nil { + fmt.Printf("[self-hosted] error getting %s pods [%v]\n", appLabel, err) + return false, nil + } + fmt.Printf("[self-hosted] Found %d %s pods\n", len(apiPods.Items), appLabel) + + // TODO: HA + if int32(len(apiPods.Items)) != 1 { + return false, nil + } + for _, pod := range apiPods.Items { + fmt.Printf("[self-hosted] Pod %s status: %s\n", pod.Name, pod.Status.Phase) + if mustBeRunning && pod.Status.Phase != "Running" { + return false, nil + } + } + + return true, nil + }) +} + +// Sources from bootkube templates.go +func getAPIServerDS(cfg *kubeadmapi.MasterConfiguration, volumes []v1.Volume, volumeMounts []v1.VolumeMount) ext.DaemonSet { + ds := ext.DaemonSet{ + TypeMeta: metav1.TypeMeta{ + APIVersion: "extensions/v1beta1", + Kind: "DaemonSet", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: "self-hosted-" + kubeAPIServer, + Namespace: "kube-system", + Labels: map[string]string{"k8s-app": "self-hosted-" + kubeAPIServer}, + }, + Spec: ext.DaemonSetSpec{ + Template: v1.PodTemplateSpec{ + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{ + "k8s-app": "self-hosted-" + kubeAPIServer, + "component": kubeAPIServer, + "tier": "control-plane", + }, + Annotations: map[string]string{ + v1.TolerationsAnnotationKey: getMasterToleration(), + }, + }, + Spec: v1.PodSpec{ + NodeSelector: map[string]string{metav1.NodeLabelKubeadmAlphaRole: metav1.NodeLabelRoleMaster}, + HostNetwork: true, + Volumes: volumes, + Containers: []v1.Container{ + { + Name: "self-hosted-" + kubeAPIServer, + Image: images.GetCoreImage(images.KubeAPIServerImage, cfg, kubeadmapi.GlobalEnvParams.HyperkubeImage), + Command: getAPIServerCommand(cfg, true), + Env: getSelfHostedAPIServerEnv(), + VolumeMounts: volumeMounts, + LivenessProbe: componentProbe(8080, "/healthz"), + Resources: componentResources("250m"), + }, + }, + }, + }, + }, + } + return ds +} + +func getControllerManagerDeployment(cfg *kubeadmapi.MasterConfiguration, volumes []v1.Volume, volumeMounts []v1.VolumeMount) ext.Deployment { + d := ext.Deployment{ + TypeMeta: metav1.TypeMeta{ + APIVersion: "extensions/v1beta1", + Kind: "Deployment", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: "self-hosted-" + kubeControllerManager, + Namespace: "kube-system", + Labels: map[string]string{"k8s-app": "self-hosted-" + kubeControllerManager}, + }, + Spec: ext.DeploymentSpec{ + // TODO bootkube uses 2 replicas + Template: v1.PodTemplateSpec{ + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{ + "k8s-app": "self-hosted-" + kubeControllerManager, + "component": kubeControllerManager, + "tier": "control-plane", + }, + Annotations: map[string]string{ + v1.TolerationsAnnotationKey: getMasterToleration(), + }, + }, + Spec: v1.PodSpec{ + NodeSelector: map[string]string{metav1.NodeLabelKubeadmAlphaRole: metav1.NodeLabelRoleMaster}, + HostNetwork: true, + Volumes: volumes, + Containers: []v1.Container{ + { + Name: "self-hosted-" + kubeControllerManager, + Image: images.GetCoreImage(images.KubeControllerManagerImage, cfg, kubeadmapi.GlobalEnvParams.HyperkubeImage), + Command: getControllerManagerCommand(cfg, true), + VolumeMounts: volumeMounts, + LivenessProbe: componentProbe(10252, "/healthz"), + Resources: componentResources("200m"), + Env: getProxyEnvVars(), + }, + }, + DNSPolicy: v1.DNSDefault, + }, + }, + }, + } + return d +} + +func getSchedulerDeployment(cfg *kubeadmapi.MasterConfiguration) ext.Deployment { + d := ext.Deployment{ + TypeMeta: metav1.TypeMeta{ + APIVersion: "extensions/v1beta1", + Kind: "Deployment", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: "self-hosted-" + kubeScheduler, + Namespace: "kube-system", + Labels: map[string]string{"k8s-app": "self-hosted-" + kubeScheduler}, + }, + Spec: ext.DeploymentSpec{ + // TODO bootkube uses 2 replicas + Template: v1.PodTemplateSpec{ + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{ + "k8s-app": "self-hosted-" + kubeScheduler, + "component": kubeScheduler, + "tier": "control-plane", + }, + Annotations: map[string]string{ + v1.TolerationsAnnotationKey: getMasterToleration(), + }, + }, + Spec: v1.PodSpec{ + NodeSelector: map[string]string{metav1.NodeLabelKubeadmAlphaRole: metav1.NodeLabelRoleMaster}, + HostNetwork: true, + Containers: []v1.Container{ + { + Name: "self-hosted-" + kubeScheduler, + Image: images.GetCoreImage(images.KubeSchedulerImage, cfg, kubeadmapi.GlobalEnvParams.HyperkubeImage), + Command: getSchedulerCommand(cfg, true), + LivenessProbe: componentProbe(10251, "/healthz"), + Resources: componentResources("100m"), + Env: getProxyEnvVars(), + }, + }, + }, + }, + }, + } + return d +} + +func buildStaticManifestFilepath(name string) string { + return path.Join(kubeadmapi.GlobalEnvParams.KubernetesDir, "manifests", name+".json") +} + +func getMasterToleration() string { + // Tolerate the master taint we add to our master nodes, as this can and should + // run there. + // TODO: Duplicated above + masterToleration, _ := json.Marshal([]v1.Toleration{{ + Key: "dedicated", + Value: "master", + Operator: v1.TolerationOpEqual, + Effect: v1.TaintEffectNoSchedule, + }}) + return string(masterToleration) +} diff --git a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/master/tokens.go b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/master/tokens.go index 3e410ec9..40bebe1d 100644 --- a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/master/tokens.go +++ b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/master/tokens.go @@ -27,12 +27,19 @@ import ( "k8s.io/kubernetes/pkg/util/uuid" ) +const ( + // TODO: prefix with kubeadm prefix + KubeletBootstrapUser = "kubeadm-node-csr" + + KubeletBootstrapGroup = "kubeadm:kubelet-bootstrap" +) + func CreateTokenAuthFile(bt string) error { tokenAuthFilePath := path.Join(kubeadmapi.GlobalEnvParams.HostPKIPath, "tokens.csv") if err := os.MkdirAll(kubeadmapi.GlobalEnvParams.HostPKIPath, 0700); err != nil { return fmt.Errorf("failed to create directory %q [%v]", kubeadmapi.GlobalEnvParams.HostPKIPath, err) } - serialized := []byte(fmt.Sprintf("%s,kubeadm-node-csr,%s,system:kubelet-bootstrap\n", bt, uuid.NewUUID())) + serialized := []byte(fmt.Sprintf("%s,%s,%s,%s\n", bt, KubeletBootstrapUser, uuid.NewUUID(), KubeletBootstrapGroup)) // DumpReaderToFile create a file with mode 0600 if err := cmdutil.DumpReaderToFile(bytes.NewReader(serialized), tokenAuthFilePath); err != nil { return fmt.Errorf("failed to save token auth file (%q) [%v]", tokenAuthFilePath, err) diff --git a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/node/BUILD b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/node/BUILD index 749e63f1..9db972cf 100644 --- a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/node/BUILD +++ b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/node/BUILD @@ -20,16 +20,17 @@ go_library( "//cmd/kubeadm/app/apis/kubeadm:go_default_library", "//cmd/kubeadm/app/phases/kubeconfig:go_default_library", "//cmd/kubeadm/app/util:go_default_library", - "//pkg/api/v1:go_default_library", "//pkg/apis/certificates:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", - "//pkg/client/unversioned/clientcmd:go_default_library", - "//pkg/client/unversioned/clientcmd/api:go_default_library", "//pkg/kubelet/util/csr:go_default_library", - "//pkg/util/cert:go_default_library", "//vendor:github.com/square/go-jose", + "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/wait", + "//vendor:k8s.io/client-go/tools/clientcmd", + "//vendor:k8s.io/client-go/tools/clientcmd/api", + "//vendor:k8s.io/client-go/util/cert", ], ) @@ -44,10 +45,10 @@ go_test( deps = [ "//cmd/kubeadm/app/apis/kubeadm:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/typed/discovery:go_default_library", - "//pkg/version:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/version", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/node/bootstrap.go b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/node/bootstrap.go index c40fc16c..9207e4d4 100644 --- a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/node/bootstrap.go +++ b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/node/bootstrap.go @@ -22,16 +22,17 @@ import ( "sync" "time" + apierrs "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/client-go/tools/clientcmd" + clientcmdapi "k8s.io/client-go/tools/clientcmd/api" kubeadmapi "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm" kubeconfigphase "k8s.io/kubernetes/cmd/kubeadm/app/phases/kubeconfig" kubeadmutil "k8s.io/kubernetes/cmd/kubeadm/app/util" - "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/apis/certificates" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" - clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api" ) // retryTimeout between the subsequent attempts to connect @@ -128,14 +129,9 @@ func checkForNodeNameDuplicates(clientSet *clientset.Clientset) error { if err != nil { return fmt.Errorf("Failed to get node hostname [%v]", err) } - nodeList, err := clientSet.Nodes().List(v1.ListOptions{}) - if err != nil { - return fmt.Errorf("Failed to list the nodes in the cluster: [%v]\n", err) - } - for _, node := range nodeList.Items { - if hostName == node.Name { - return fmt.Errorf("Node with name [%q] already exists.", node.Name) - } + _, err = clientSet.Nodes().Get(hostName, metav1.GetOptions{}) + if err != nil && !apierrs.IsNotFound(err) { + return err } return nil } diff --git a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/node/bootstrap_test.go b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/node/bootstrap_test.go index ac73975b..e206c376 100644 --- a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/node/bootstrap_test.go +++ b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/node/bootstrap_test.go @@ -23,11 +23,11 @@ import ( "testing" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/version" + restclient "k8s.io/client-go/rest" kubeadmapi "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/typed/discovery" - "k8s.io/kubernetes/pkg/version" ) func TestEstablishMasterConnection(t *testing.T) { diff --git a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/node/csr.go b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/node/csr.go index aaee8643..8771c31e 100644 --- a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/node/csr.go +++ b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/node/csr.go @@ -21,11 +21,11 @@ import ( "os" "k8s.io/apimachinery/pkg/types" + "k8s.io/client-go/tools/clientcmd" + clientcmdapi "k8s.io/client-go/tools/clientcmd/api" + certutil "k8s.io/client-go/util/cert" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" - clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api" "k8s.io/kubernetes/pkg/kubelet/util/csr" - certutil "k8s.io/kubernetes/pkg/util/cert" ) // PerformTLSBootstrap executes a node certificate signing request. diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/serializer/yaml/BUILD b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/phases/apiconfig/BUILD similarity index 63% rename from vendor/k8s.io/kubernetes/pkg/runtime/serializer/yaml/BUILD rename to vendor/k8s.io/kubernetes/cmd/kubeadm/app/phases/apiconfig/BUILD index 59809b86..9978455b 100644 --- a/vendor/k8s.io/kubernetes/pkg/runtime/serializer/yaml/BUILD +++ b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/phases/apiconfig/BUILD @@ -9,12 +9,13 @@ load( go_library( name = "go_default_library", - srcs = ["yaml.go"], + srcs = ["clusterroles.go"], tags = ["automanaged"], deps = [ - "//pkg/runtime:go_default_library", - "//pkg/runtime/schema:go_default_library", - "//pkg/util/yaml:go_default_library", + "//cmd/kubeadm/app/master:go_default_library", + "//pkg/apis/rbac/v1beta1:go_default_library", + "//pkg/client/clientset_generated/clientset:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", ], ) diff --git a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/phases/apiconfig/clusterroles.go b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/phases/apiconfig/clusterroles.go new file mode 100644 index 00000000..446eaab1 --- /dev/null +++ b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/phases/apiconfig/clusterroles.go @@ -0,0 +1,113 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package apiconfig + +import ( + "fmt" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/kubernetes/cmd/kubeadm/app/master" + rbac "k8s.io/kubernetes/pkg/apis/rbac/v1beta1" + "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" +) + +// CreateBootstrapRBACClusterRole grants the system:node-bootstrapper role to the group we created the bootstrap credential with +func CreateBootstrapRBACClusterRole(clientset *clientset.Clientset) error { + clusterRoleBinding := rbac.ClusterRoleBinding{ + ObjectMeta: metav1.ObjectMeta{ + Name: "kubeadm:kubelet-bootstrap", + }, + RoleRef: rbac.RoleRef{ + APIGroup: "rbac.authorization.k8s.io", + Kind: "ClusterRole", + Name: "system:node-bootstrapper", + }, + Subjects: []rbac.Subject{ + {Kind: "Group", Name: master.KubeletBootstrapGroup}, + }, + } + if _, err := clientset.Rbac().ClusterRoleBindings().Create(&clusterRoleBinding); err != nil { + return err + } + fmt.Println("[apiconfig] Created node bootstrapper RBAC rules") + + return nil +} + +// CreateKubeDNSRBACClusterRole creates the necessary ClusterRole for kube-dns +func CreateKubeDNSRBACClusterRole(clientset *clientset.Clientset) error { + clusterRole := rbac.ClusterRole{ + ObjectMeta: metav1.ObjectMeta{Name: "kubeadm:" + master.KubeDNS}, + Rules: []rbac.PolicyRule{ + rbac.NewRule("list", "watch").Groups("").Resources("endpoints", "services").RuleOrDie(), + // TODO: remove watch rule when https://github.com/kubernetes/kubernetes/pull/38816 gets merged + rbac.NewRule("get", "list", "watch").Groups("").Resources("configmaps").RuleOrDie(), + }, + } + if _, err := clientset.Rbac().ClusterRoles().Create(&clusterRole); err != nil { + return err + } + + subject := rbac.Subject{ + Kind: "ServiceAccount", + Name: master.KubeDNS, + Namespace: metav1.NamespaceSystem, + } + + clusterRoleBinding := rbac.ClusterRoleBinding{ + ObjectMeta: metav1.ObjectMeta{ + Name: "kubeadm:" + master.KubeDNS, + }, + RoleRef: rbac.RoleRef{ + APIGroup: "rbac.authorization.k8s.io", + Kind: "ClusterRole", + Name: clusterRole.Name, + }, + Subjects: []rbac.Subject{subject}, + } + if _, err := clientset.Rbac().ClusterRoleBindings().Create(&clusterRoleBinding); err != nil { + return err + } + fmt.Println("[apiconfig] Created kube-dns RBAC rules") + + return nil +} + +// CreateKubeProxyClusterRoleBinding grants the system:node-proxier role to the nodes group, +// since kubelet credentials are used to run the kube-proxy +// TODO: give the kube-proxy its own credential and stop requiring this +func CreateKubeProxyClusterRoleBinding(clientset *clientset.Clientset) error { + clusterRoleBinding := rbac.ClusterRoleBinding{ + ObjectMeta: metav1.ObjectMeta{ + Name: "kubeadm:node-proxier", + }, + RoleRef: rbac.RoleRef{ + APIGroup: "rbac.authorization.k8s.io", + Kind: "ClusterRole", + Name: "system:node-proxier", + }, + Subjects: []rbac.Subject{ + {Kind: "Group", Name: "system:nodes"}, + }, + } + if _, err := clientset.Rbac().ClusterRoleBindings().Create(&clusterRoleBinding); err != nil { + return err + } + fmt.Println("[apiconfig] Created kube-proxy RBAC rules") + + return nil +} diff --git a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/phases/certs/BUILD b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/phases/certs/BUILD index 83b7f6da..2e064438 100644 --- a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/phases/certs/BUILD +++ b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/phases/certs/BUILD @@ -10,15 +10,12 @@ load( go_test( name = "go_default_test", - srcs = [ - "certs_test.go", - "pki_helpers_test.go", - ], + srcs = ["certs_test.go"], library = ":go_default_library", tags = ["automanaged"], deps = [ "//cmd/kubeadm/app/apis/kubeadm:go_default_library", - "//pkg/util/cert:go_default_library", + "//vendor:k8s.io/client-go/util/cert", ], ) @@ -27,13 +24,15 @@ go_library( srcs = [ "certs.go", "doc.go", - "pki_helpers.go", ], tags = ["automanaged"], deps = [ "//cmd/kubeadm/app/apis/kubeadm:go_default_library", + "//cmd/kubeadm/app/constants:go_default_library", + "//cmd/kubeadm/app/phases/certs/pkiutil:go_default_library", "//pkg/registry/core/service/ipallocator:go_default_library", - "//pkg/util/cert:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/util/sets", + "//vendor:k8s.io/client-go/util/cert", ], ) @@ -46,6 +45,9 @@ filegroup( filegroup( name = "all-srcs", - srcs = [":package-srcs"], + srcs = [ + ":package-srcs", + "//cmd/kubeadm/app/phases/certs/pkiutil:all-srcs", + ], tags = ["automanaged"], ) diff --git a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/phases/certs/certs.go b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/phases/certs/certs.go index cd0396eb..4db869d1 100644 --- a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/phases/certs/certs.go +++ b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/phases/certs/certs.go @@ -17,21 +17,30 @@ limitations under the License. package certs import ( + "crypto/rsa" "crypto/x509" "fmt" "net" "os" + setutil "k8s.io/apimachinery/pkg/util/sets" + certutil "k8s.io/client-go/util/cert" kubeadmapi "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm" + kubeadmconstants "k8s.io/kubernetes/cmd/kubeadm/app/constants" + "k8s.io/kubernetes/cmd/kubeadm/app/phases/certs/pkiutil" "k8s.io/kubernetes/pkg/registry/core/service/ipallocator" - certutil "k8s.io/kubernetes/pkg/util/cert" ) +// TODO: Integration test cases +// no files exist => create all four files +// valid ca.{crt,key} exists => create apiserver.{crt,key} +// valid ca.{crt,key} and apiserver.{crt,key} exists => do nothing +// invalid ca.{crt,key} exists => error +// only one of the .crt or .key file exists => error + // CreatePKIAssets will create and write to disk all PKI assets necessary to establish the control plane. -// It first generates a self-signed CA certificate, a server certificate (signed by the CA) and a key for -// signing service account tokens. It returns CA key and certificate, which is convenient for use with -// client config funcs. -func CreatePKIAssets(cfg *kubeadmapi.MasterConfiguration, pkiPath string) (*x509.Certificate, error) { +// It generates a self-signed CA certificate and a server certificate (signed by the CA) +func CreatePKIAssets(cfg *kubeadmapi.MasterConfiguration, pkiDir string) error { altNames := certutil.AltNames{} // First, define all domains this cert should be signed for @@ -43,7 +52,7 @@ func CreatePKIAssets(cfg *kubeadmapi.MasterConfiguration, pkiPath string) (*x509 } hostname, err := os.Hostname() if err != nil { - return nil, fmt.Errorf("couldn't get the hostname: %v", err) + return fmt.Errorf("couldn't get the hostname: %v", err) } altNames.DNSNames = append(cfg.API.ExternalDNSNames, hostname) altNames.DNSNames = append(altNames.DNSNames, internalAPIServerFQDN...) @@ -53,50 +62,136 @@ func CreatePKIAssets(cfg *kubeadmapi.MasterConfiguration, pkiPath string) (*x509 if ip := net.ParseIP(a); ip != nil { altNames.IPs = append(altNames.IPs, ip) } else { - return nil, fmt.Errorf("could not parse ip %q", a) + return fmt.Errorf("could not parse ip %q", a) } } // and lastly, extract the internal IP address for the API server _, n, err := net.ParseCIDR(cfg.Networking.ServiceSubnet) if err != nil { - return nil, fmt.Errorf("error parsing CIDR %q: %v", cfg.Networking.ServiceSubnet, err) + return fmt.Errorf("error parsing CIDR %q: %v", cfg.Networking.ServiceSubnet, err) } internalAPIServerVirtualIP, err := ipallocator.GetIndexedIP(n, 1) if err != nil { - return nil, fmt.Errorf("unable to allocate IP address for the API server from the given CIDR (%q) [%v]", &cfg.Networking.ServiceSubnet, err) + return fmt.Errorf("unable to allocate IP address for the API server from the given CIDR (%q) [%v]", &cfg.Networking.ServiceSubnet, err) } altNames.IPs = append(altNames.IPs, internalAPIServerVirtualIP) - caKey, caCert, err := newCertificateAuthority() - if err != nil { - return nil, fmt.Errorf("failure while creating CA keys and certificate [%v]", err) + var caCert *x509.Certificate + var caKey *rsa.PrivateKey + // If at least one of them exists, we should try to load them + // In the case that only one exists, there will most likely be an error anyway + if pkiutil.CertOrKeyExist(pkiDir, kubeadmconstants.CACertAndKeyBaseName) { + // Try to load ca.crt and ca.key from the PKI directory + caCert, caKey, err = pkiutil.TryLoadCertAndKeyFromDisk(pkiDir, kubeadmconstants.CACertAndKeyBaseName) + if err != nil || caCert == nil || caKey == nil { + return fmt.Errorf("certificate and/or key existed but they could not be loaded properly") + } + + // The certificate and key could be loaded, but the certificate is not a CA + if !caCert.IsCA { + return fmt.Errorf("certificate and key could be loaded but the certificate is not a CA") + } + + fmt.Println("[certificates] Using the existing CA certificate and key.") + } else { + // The certificate and the key did NOT exist, let's generate them now + caCert, caKey, err = pkiutil.NewCertificateAuthority() + if err != nil { + return fmt.Errorf("failure while generating CA certificate and key [%v]", err) + } + + if err = pkiutil.WriteCertAndKey(pkiDir, kubeadmconstants.CACertAndKeyBaseName, caCert, caKey); err != nil { + return fmt.Errorf("failure while saving CA certificate and key [%v]", err) + } + fmt.Println("[certificates] Generated CA certificate and key.") } - if err := writeKeysAndCert(pkiPath, "ca", caKey, caCert); err != nil { - return nil, fmt.Errorf("failure while saving CA keys and certificate [%v]", err) - } - fmt.Println("[certificates] Generated Certificate Authority key and certificate.") + // If at least one of them exists, we should try to load them + // In the case that only one exists, there will most likely be an error anyway + if pkiutil.CertOrKeyExist(pkiDir, kubeadmconstants.APIServerCertAndKeyBaseName) { + // Try to load apiserver.crt and apiserver.key from the PKI directory + apiCert, apiKey, err := pkiutil.TryLoadCertAndKeyFromDisk(pkiDir, kubeadmconstants.APIServerCertAndKeyBaseName) + if err != nil || apiCert == nil || apiKey == nil { + return fmt.Errorf("certificate and/or key existed but they could not be loaded properly") + } - apiKey, apiCert, err := newServerKeyAndCert(caCert, caKey, altNames) - if err != nil { - return nil, fmt.Errorf("failure while creating API server keys and certificate [%v]", err) + fmt.Println("[certificates] Using the existing API Server certificate and key.") + } else { + // The certificate and the key did NOT exist, let's generate them now + // TODO: Add a test case to verify that this cert has the x509.ExtKeyUsageServerAuth flag + config := certutil.Config{ + CommonName: "kube-apiserver", + AltNames: altNames, + Usages: []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth}, + } + apiCert, apiKey, err := pkiutil.NewCertAndKey(caCert, caKey, config) + if err != nil { + return fmt.Errorf("failure while creating API server key and certificate [%v]", err) + } + + if err = pkiutil.WriteCertAndKey(pkiDir, kubeadmconstants.APIServerCertAndKeyBaseName, apiCert, apiKey); err != nil { + return fmt.Errorf("failure while saving API server certificate and key [%v]", err) + } + fmt.Println("[certificates] Generated API server certificate and key.") } - if err := writeKeysAndCert(pkiPath, "apiserver", apiKey, apiCert); err != nil { - return nil, fmt.Errorf("failure while saving API server keys and certificate [%v]", err) - } - fmt.Println("[certificates] Generated API Server key and certificate") + // If at least one of them exists, we should try to load them + // In the case that only one exists, there will most likely be an error anyway + if pkiutil.CertOrKeyExist(pkiDir, kubeadmconstants.APIServerKubeletClientCertAndKeyBaseName) { + // Try to load apiserver-kubelet-client.crt and apiserver-kubelet-client.key from the PKI directory + apiCert, apiKey, err := pkiutil.TryLoadCertAndKeyFromDisk(pkiDir, kubeadmconstants.APIServerKubeletClientCertAndKeyBaseName) + if err != nil || apiCert == nil || apiKey == nil { + return fmt.Errorf("certificate and/or key existed but they could not be loaded properly") + } - // Generate a private key for service accounts - saKey, err := certutil.NewPrivateKey() - if err != nil { - return nil, fmt.Errorf("failure while creating service account signing keys [%v]", err) + fmt.Println("[certificates] Using the existing API Server kubelet client certificate and key.") + } else { + // The certificate and the key did NOT exist, let's generate them now + // TODO: Add a test case to verify that this cert has the x509.ExtKeyUsageClientAuth flag + config := certutil.Config{ + CommonName: "kube-apiserver-kubelet-client", + Organization: []string{"system:masters"}, + Usages: []x509.ExtKeyUsage{x509.ExtKeyUsageClientAuth}, + } + apiClientCert, apiClientKey, err := pkiutil.NewCertAndKey(caCert, caKey, config) + if err != nil { + return fmt.Errorf("failure while creating API server kubelet client key and certificate [%v]", err) + } + + if err = pkiutil.WriteCertAndKey(pkiDir, kubeadmconstants.APIServerKubeletClientCertAndKeyBaseName, apiClientCert, apiClientKey); err != nil { + return fmt.Errorf("failure while saving API server kubelet client certificate and key [%v]", err) + } + fmt.Println("[certificates] Generated API server kubelet client certificate and key.") } - if err := writeKeysAndCert(pkiPath, "sa", saKey, nil); err != nil { - return nil, fmt.Errorf("failure while saving service account signing keys [%v]", err) - } - fmt.Println("[certificates] Generated Service Account signing keys") - fmt.Printf("[certificates] Created keys and certificates in %q\n", pkiPath) - return caCert, nil + + fmt.Printf("[certificates] Valid certificates and keys now exist in %q\n", pkiDir) + + return nil +} + +// Verify that the cert is valid for all IPs and DNS names it should be valid for +func checkAltNamesExist(IPs []net.IP, DNSNames []string, altNames certutil.AltNames) bool { + dnsset := setutil.NewString(DNSNames...) + + for _, dnsNameThatShouldExist := range altNames.DNSNames { + if !dnsset.Has(dnsNameThatShouldExist) { + return false + } + } + + for _, ipThatShouldExist := range altNames.IPs { + found := false + for _, ip := range IPs { + if ip.Equal(ipThatShouldExist) { + found = true + break + } + } + + if !found { + return false + } + } + return true } diff --git a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/phases/certs/certs_test.go b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/phases/certs/certs_test.go index 2377646f..8b1eb7a4 100644 --- a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/phases/certs/certs_test.go +++ b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/phases/certs/certs_test.go @@ -19,9 +19,11 @@ package certs import ( "fmt" "io/ioutil" + "net" "os" "testing" + certutil "k8s.io/client-go/util/cert" kubeadmapi "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm" ) @@ -65,7 +67,7 @@ func TestCreatePKIAssets(t *testing.T) { }, } for _, rt := range tests { - _, actual := CreatePKIAssets(rt.cfg, fmt.Sprintf("%s/etc/kubernetes/pki", tmpdir)) + actual := CreatePKIAssets(rt.cfg, fmt.Sprintf("%s/etc/kubernetes/pki", tmpdir)) if (actual == nil) != rt.expected { t.Errorf( "failed CreatePKIAssets with an error:\n\texpected: %t\n\t actual: %t", @@ -75,3 +77,52 @@ func TestCreatePKIAssets(t *testing.T) { } } } + +func TestCheckAltNamesExist(t *testing.T) { + var tests = []struct { + IPs []net.IP + DNSNames []string + requiredAltNames certutil.AltNames + succeed bool + }{ + { + // equal + requiredAltNames: certutil.AltNames{IPs: []net.IP{net.ParseIP("1.1.1.1"), net.ParseIP("192.168.1.2")}, DNSNames: []string{"foo", "bar", "baz"}}, + IPs: []net.IP{net.ParseIP("1.1.1.1"), net.ParseIP("192.168.1.2")}, + DNSNames: []string{"foo", "bar", "baz"}, + succeed: true, + }, + { + // the loaded cert has more ips than required, ok + requiredAltNames: certutil.AltNames{IPs: []net.IP{net.ParseIP("1.1.1.1"), net.ParseIP("192.168.1.2")}, DNSNames: []string{"foo", "bar", "baz"}}, + IPs: []net.IP{net.ParseIP("192.168.2.5"), net.ParseIP("1.1.1.1"), net.ParseIP("192.168.1.2")}, + DNSNames: []string{"a", "foo", "b", "bar", "baz"}, + succeed: true, + }, + { + // the loaded cert doesn't have all ips + requiredAltNames: certutil.AltNames{IPs: []net.IP{net.ParseIP("1.1.1.1"), net.ParseIP("192.168.2.5"), net.ParseIP("192.168.1.2")}, DNSNames: []string{"foo", "bar", "baz"}}, + IPs: []net.IP{net.ParseIP("1.1.1.1"), net.ParseIP("192.168.1.2")}, + DNSNames: []string{"foo", "bar", "baz"}, + succeed: false, + }, + { + // the loaded cert doesn't have all ips + requiredAltNames: certutil.AltNames{IPs: []net.IP{net.ParseIP("1.1.1.1"), net.ParseIP("192.168.1.2")}, DNSNames: []string{"foo", "bar", "b", "baz"}}, + IPs: []net.IP{net.ParseIP("1.1.1.1"), net.ParseIP("192.168.1.2")}, + DNSNames: []string{"foo", "bar", "baz"}, + succeed: false, + }, + } + + for _, rt := range tests { + succeeded := checkAltNamesExist(rt.IPs, rt.DNSNames, rt.requiredAltNames) + if succeeded != rt.succeed { + t.Errorf( + "failed checkAltNamesExist:\n\texpected: %t\n\t actual: %t", + rt.succeed, + succeeded, + ) + } + } +} diff --git a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/phases/certs/doc.go b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/phases/certs/doc.go index e92cf488..99786657 100644 --- a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/phases/certs/doc.go +++ b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/phases/certs/doc.go @@ -30,12 +30,9 @@ package certs OUTPUTS: Files to PKIPath (default /etc/kubernetes/pki): - - apiserver-key.pem - - apiserver-pub.pem - - apiserver.pem - - ca-key.pem - - ca-pub.pem - - ca.pem - - sa-key.pem - - sa-pub.pem + - ca.crt + - ca.key + - apiserver.crt + - apiserver.key + */ diff --git a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/phases/certs/pki_helpers.go b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/phases/certs/pki_helpers.go deleted file mode 100644 index fab73001..00000000 --- a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/phases/certs/pki_helpers.go +++ /dev/null @@ -1,110 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package certs - -import ( - "crypto/rsa" - "crypto/x509" - "fmt" - "path" - - certutil "k8s.io/kubernetes/pkg/util/cert" -) - -func newCertificateAuthority() (*rsa.PrivateKey, *x509.Certificate, error) { - key, err := certutil.NewPrivateKey() - if err != nil { - return nil, nil, fmt.Errorf("unable to create private key [%v]", err) - } - - config := certutil.Config{ - CommonName: "kubernetes", - } - - cert, err := certutil.NewSelfSignedCACert(config, key) - if err != nil { - return nil, nil, fmt.Errorf("unable to create self-signed certificate [%v]", err) - } - - return key, cert, nil -} - -func newServerKeyAndCert(caCert *x509.Certificate, caKey *rsa.PrivateKey, altNames certutil.AltNames) (*rsa.PrivateKey, *x509.Certificate, error) { - key, err := certutil.NewPrivateKey() - if err != nil { - return nil, nil, fmt.Errorf("unable to create private key [%v]", err) - } - - config := certutil.Config{ - CommonName: "kube-apiserver", - AltNames: altNames, - } - cert, err := certutil.NewSignedCert(config, key, caCert, caKey) - if err != nil { - return nil, nil, fmt.Errorf("unable to sign certificate [%v]", err) - } - - return key, cert, nil -} - -func NewClientKeyAndCert(caCert *x509.Certificate, caKey *rsa.PrivateKey) (*rsa.PrivateKey, *x509.Certificate, error) { - key, err := certutil.NewPrivateKey() - if err != nil { - return nil, nil, fmt.Errorf("unable to create private key [%v]", err) - } - - config := certutil.Config{ - CommonName: "kubernetes-client", - } - cert, err := certutil.NewSignedCert(config, key, caCert, caKey) - if err != nil { - return nil, nil, fmt.Errorf("unable to sign certificate [%v]", err) - } - - return key, cert, nil -} - -func writeKeysAndCert(pkiPath string, name string, key *rsa.PrivateKey, cert *x509.Certificate) error { - publicKeyPath, privateKeyPath, certificatePath := pathsKeysCerts(pkiPath, name) - - if key != nil { - if err := certutil.WriteKey(privateKeyPath, certutil.EncodePrivateKeyPEM(key)); err != nil { - return fmt.Errorf("unable to write private key file (%q) [%v]", privateKeyPath, err) - } - if pubKey, err := certutil.EncodePublicKeyPEM(&key.PublicKey); err == nil { - if err := certutil.WriteKey(publicKeyPath, pubKey); err != nil { - return fmt.Errorf("unable to write public key file (%q) [%v]", publicKeyPath, err) - } - } else { - return fmt.Errorf("unable to encode public key to PEM [%v]", err) - } - } - - if cert != nil { - if err := certutil.WriteCert(certificatePath, certutil.EncodeCertPEM(cert)); err != nil { - return fmt.Errorf("unable to write certificate file (%q) [%v]", certificatePath, err) - } - } - - return nil -} - -func pathsKeysCerts(pkiPath, name string) (string, string, string) { - return path.Join(pkiPath, fmt.Sprintf("%s-pub.pem", name)), - path.Join(pkiPath, fmt.Sprintf("%s-key.pem", name)), - path.Join(pkiPath, fmt.Sprintf("%s.pem", name)) -} diff --git a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/phases/certs/pki_helpers_test.go b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/phases/certs/pki_helpers_test.go deleted file mode 100644 index a0e72f4a..00000000 --- a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/phases/certs/pki_helpers_test.go +++ /dev/null @@ -1,171 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package certs - -import ( - "crypto/rand" - "crypto/rsa" - "crypto/x509" - "io/ioutil" - "os" - "testing" - - certutil "k8s.io/kubernetes/pkg/util/cert" -) - -func TestNewCertificateAuthority(t *testing.T) { - r, x, err := newCertificateAuthority() - - if r == nil { - t.Errorf( - "failed newCertificateAuthority, rsa key == nil", - ) - } - if x == nil { - t.Errorf( - "failed newCertificateAuthority, x509 cert == nil", - ) - } - if err != nil { - t.Errorf( - "failed newCertificateAuthority with an error: %v", - err, - ) - } -} - -func TestNewServerKeyAndCert(t *testing.T) { - var tests = []struct { - caKeySize int - expected bool - }{ - { - // RSA key too small - caKeySize: 128, - expected: false, - }, - { - // Should succeed - caKeySize: 2048, - expected: true, - }, - } - - for _, rt := range tests { - caKey, err := rsa.GenerateKey(rand.Reader, rt.caKeySize) - if err != nil { - t.Fatalf("Couldn't create rsa Private Key") - } - caCert := &x509.Certificate{} - altNames := certutil.AltNames{} - _, _, actual := newServerKeyAndCert(caCert, caKey, altNames) - if (actual == nil) != rt.expected { - t.Errorf( - "failed newServerKeyAndCert:\n\texpected: %t\n\t actual: %t", - rt.expected, - (actual == nil), - ) - } - } -} - -func TestNewClientKeyAndCert(t *testing.T) { - var tests = []struct { - caKeySize int - expected bool - }{ - { - // RSA key too small - caKeySize: 128, - expected: false, - }, - { - caKeySize: 2048, - expected: true, - }, - } - - for _, rt := range tests { - caKey, err := rsa.GenerateKey(rand.Reader, rt.caKeySize) - if err != nil { - t.Fatalf("Couldn't create rsa Private Key") - } - caCert := &x509.Certificate{} - _, _, actual := NewClientKeyAndCert(caCert, caKey) - if (actual == nil) != rt.expected { - t.Errorf( - "failed NewClientKeyAndCert:\n\texpected: %t\n\t actual: %t", - rt.expected, - (actual == nil), - ) - } - } -} - -func TestWriteKeysAndCert(t *testing.T) { - tmpdir, err := ioutil.TempDir("", "") - if err != nil { - t.Fatalf("Couldn't create tmpdir") - } - defer os.Remove(tmpdir) - - caKey, err := rsa.GenerateKey(rand.Reader, 2048) - if err != nil { - t.Fatalf("Couldn't create rsa Private Key") - } - caCert := &x509.Certificate{} - actual := writeKeysAndCert(tmpdir, "foo", caKey, caCert) - if actual != nil { - t.Errorf( - "failed writeKeysAndCert with an error: %v", - actual, - ) - } -} - -func TestPathsKeysCerts(t *testing.T) { - var tests = []struct { - pkiPath string - name string - expected []string - }{ - { - pkiPath: "foo", - name: "bar", - expected: []string{"foo/bar-pub.pem", "foo/bar-key.pem", "foo/bar.pem"}, - }, - { - pkiPath: "bar", - name: "foo", - expected: []string{"bar/foo-pub.pem", "bar/foo-key.pem", "bar/foo.pem"}, - }, - } - - for _, rt := range tests { - a, b, c := pathsKeysCerts(rt.pkiPath, rt.name) - all := []string{a, b, c} - for i := range all { - if all[i] != rt.expected[i] { - t.Errorf( - "failed pathsKeysCerts:\n\texpected: %s\n\t actual: %s", - rt.expected[i], - all[i], - ) - } - } - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/util/testing/BUILD b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/phases/certs/pkiutil/BUILD similarity index 76% rename from vendor/k8s.io/kubernetes/pkg/util/testing/BUILD rename to vendor/k8s.io/kubernetes/cmd/kubeadm/app/phases/certs/pkiutil/BUILD index ea8679ad..623f4a7a 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/testing/BUILD +++ b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/phases/certs/pkiutil/BUILD @@ -8,20 +8,19 @@ load( "go_test", ) -go_library( - name = "go_default_library", - srcs = [ - "fake_handler.go", - "tmpdir.go", - ], - tags = ["automanaged"], -) - go_test( name = "go_default_test", - srcs = ["fake_handler_test.go"], + srcs = ["pki_helpers_test.go"], library = ":go_default_library", tags = ["automanaged"], + deps = ["//vendor:k8s.io/client-go/util/cert"], +) + +go_library( + name = "go_default_library", + srcs = ["pki_helpers.go"], + tags = ["automanaged"], + deps = ["//vendor:k8s.io/client-go/util/cert"], ) filegroup( diff --git a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/phases/certs/pkiutil/pki_helpers.go b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/phases/certs/pkiutil/pki_helpers.go new file mode 100644 index 00000000..5a95160d --- /dev/null +++ b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/phases/certs/pkiutil/pki_helpers.go @@ -0,0 +1,145 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package pkiutil + +import ( + "crypto/ecdsa" + "crypto/rsa" + "crypto/x509" + "fmt" + "os" + "path" + "time" + + certutil "k8s.io/client-go/util/cert" +) + +// TODO: It should be able to generate different types of private keys, at least: RSA and ECDSA (and in the future maybe Ed25519 as well) +// TODO: See if it makes sense to move this package directly to pkg/util/cert + +func NewCertificateAuthority() (*x509.Certificate, *rsa.PrivateKey, error) { + key, err := certutil.NewPrivateKey() + if err != nil { + return nil, nil, fmt.Errorf("unable to create private key [%v]", err) + } + + config := certutil.Config{ + CommonName: "kubernetes", + } + cert, err := certutil.NewSelfSignedCACert(config, key) + if err != nil { + return nil, nil, fmt.Errorf("unable to create self-signed certificate [%v]", err) + } + + return cert, key, nil +} + +func NewCertAndKey(caCert *x509.Certificate, caKey *rsa.PrivateKey, config certutil.Config) (*x509.Certificate, *rsa.PrivateKey, error) { + key, err := certutil.NewPrivateKey() + if err != nil { + return nil, nil, fmt.Errorf("unable to create private key [%v]", err) + } + + cert, err := certutil.NewSignedCert(config, key, caCert, caKey) + if err != nil { + return nil, nil, fmt.Errorf("unable to sign certificate [%v]", err) + } + + return cert, key, nil +} + +func WriteCertAndKey(pkiPath string, name string, cert *x509.Certificate, key *rsa.PrivateKey) error { + certificatePath, privateKeyPath := pathsForCertAndKey(pkiPath, name) + + if cert == nil { + return fmt.Errorf("certificate cannot be nil when writing to file") + } + if cert == nil { + return fmt.Errorf("private key cannot be nil when writing to file") + } + + if err := certutil.WriteKey(privateKeyPath, certutil.EncodePrivateKeyPEM(key)); err != nil { + return fmt.Errorf("unable to write private key to file %q: [%v]", privateKeyPath, err) + } + + if err := certutil.WriteCert(certificatePath, certutil.EncodeCertPEM(cert)); err != nil { + return fmt.Errorf("unable to write certificate to file %q: [%v]", certificatePath, err) + } + + return nil +} + +// CertOrKeyExist retuns a boolean whether the cert or the key exists +func CertOrKeyExist(pkiPath, name string) bool { + certificatePath, privateKeyPath := pathsForCertAndKey(pkiPath, name) + + _, certErr := os.Stat(certificatePath) + _, keyErr := os.Stat(privateKeyPath) + if os.IsNotExist(certErr) && os.IsNotExist(keyErr) { + // The cert or the key did not exist + return false + } + + // Both files exist or one of them + return true +} + +// TryLoadCertAndKeyFromDisk tries to load a cert and a key from the disk and validates that they are valid +func TryLoadCertAndKeyFromDisk(pkiPath, name string) (*x509.Certificate, *rsa.PrivateKey, error) { + certificatePath, privateKeyPath := pathsForCertAndKey(pkiPath, name) + + certs, err := certutil.CertsFromFile(certificatePath) + if err != nil { + return nil, nil, fmt.Errorf("couldn't load the certificate file %s: %v", certificatePath, err) + } + + // We are only putting one certificate in the certificate pem file, so it's safe to just pick the first one + // TODO: Support multiple certs here in order to be able to rotate certs + cert := certs[0] + + // Parse the private key from a file + privKey, err := certutil.PrivateKeyFromFile(privateKeyPath) + if err != nil { + return nil, nil, fmt.Errorf("couldn't load the private key file %s: %v", privateKeyPath, err) + } + var key *rsa.PrivateKey + switch k := privKey.(type) { + case *rsa.PrivateKey: + key = k + case *ecdsa.PrivateKey: + // TODO: Abstract rsa.PrivateKey away and make certutil.NewSignedCert accept a ecdsa.PrivateKey as well + // After that, we can support generating kubeconfig files from ecdsa private keys as well + return nil, nil, fmt.Errorf("the private key file %s isn't in RSA format", privateKeyPath) + default: + return nil, nil, fmt.Errorf("the private key file %s isn't in RSA format", privateKeyPath) + } + + // Check so that the certificate is valid now + now := time.Now() + if now.Before(cert.NotBefore) { + return nil, nil, fmt.Errorf("the certificate is not valid yet") + } + if now.After(cert.NotAfter) { + return nil, nil, fmt.Errorf("the certificate is has expired") + } + + return cert, key, nil +} + +func pathsForCertAndKey(pkiPath, name string) (string, string) { + return path.Join(pkiPath, fmt.Sprintf("%s.crt", name)), path.Join(pkiPath, fmt.Sprintf("%s.key", name)) +} diff --git a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/phases/certs/pkiutil/pki_helpers_test.go b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/phases/certs/pkiutil/pki_helpers_test.go new file mode 100644 index 00000000..c73624b1 --- /dev/null +++ b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/phases/certs/pkiutil/pki_helpers_test.go @@ -0,0 +1,109 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package pkiutil + +import ( + "crypto/rand" + "crypto/rsa" + "crypto/x509" + "io/ioutil" + "os" + "testing" + + certutil "k8s.io/client-go/util/cert" +) + +func TestNewCertificateAuthority(t *testing.T) { + cert, key, err := NewCertificateAuthority() + + if cert == nil { + t.Errorf( + "failed NewCertificateAuthority, cert == nil", + ) + } + if key == nil { + t.Errorf( + "failed NewCertificateAuthority, key == nil", + ) + } + if err != nil { + t.Errorf( + "failed NewCertificateAuthority with an error: %v", + err, + ) + } +} + +func TestNewCertAndKey(t *testing.T) { + var tests = []struct { + caKeySize int + expected bool + }{ + { + // RSA key too small + caKeySize: 128, + expected: false, + }, + { + // Should succeed + caKeySize: 2048, + expected: true, + }, + } + + for _, rt := range tests { + caKey, err := rsa.GenerateKey(rand.Reader, rt.caKeySize) + if err != nil { + t.Fatalf("Couldn't create rsa Private Key") + } + caCert := &x509.Certificate{} + config := certutil.Config{ + CommonName: "test", + Organization: []string{"test"}, + Usages: []x509.ExtKeyUsage{x509.ExtKeyUsageClientAuth}, + } + _, _, actual := NewCertAndKey(caCert, caKey, config) + if (actual == nil) != rt.expected { + t.Errorf( + "failed NewCertAndKey:\n\texpected: %t\n\t actual: %t", + rt.expected, + (actual == nil), + ) + } + } +} + +func TestWriteCertAndKey(t *testing.T) { + tmpdir, err := ioutil.TempDir("", "") + if err != nil { + t.Fatalf("Couldn't create tmpdir") + } + defer os.Remove(tmpdir) + + caKey, err := rsa.GenerateKey(rand.Reader, 2048) + if err != nil { + t.Fatalf("Couldn't create rsa Private Key") + } + caCert := &x509.Certificate{} + actual := WriteCertAndKey(tmpdir, "foo", caCert, caKey) + if actual != nil { + t.Errorf( + "failed WriteCertAndKey with an error: %v", + actual, + ) + } +} diff --git a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/phases/kubeconfig/BUILD b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/phases/kubeconfig/BUILD index cb2fcdbc..ae0c3fdc 100644 --- a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/phases/kubeconfig/BUILD +++ b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/phases/kubeconfig/BUILD @@ -24,10 +24,11 @@ go_library( ], tags = ["automanaged"], deps = [ - "//cmd/kubeadm/app/phases/certs:go_default_library", - "//pkg/client/unversioned/clientcmd:go_default_library", - "//pkg/client/unversioned/clientcmd/api:go_default_library", - "//pkg/util/cert:go_default_library", + "//cmd/kubeadm/app/constants:go_default_library", + "//cmd/kubeadm/app/phases/certs/pkiutil:go_default_library", + "//vendor:k8s.io/client-go/tools/clientcmd", + "//vendor:k8s.io/client-go/tools/clientcmd/api", + "//vendor:k8s.io/client-go/util/cert", ], ) diff --git a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/phases/kubeconfig/kubeconfig.go b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/phases/kubeconfig/kubeconfig.go index afb1739f..0a9b1279 100644 --- a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/phases/kubeconfig/kubeconfig.go +++ b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/phases/kubeconfig/kubeconfig.go @@ -17,105 +17,155 @@ limitations under the License. package kubeconfig import ( - "crypto/ecdsa" + "bytes" "crypto/rsa" "crypto/x509" "fmt" + "io/ioutil" "os" - "path" + "path/filepath" - certphase "k8s.io/kubernetes/cmd/kubeadm/app/phases/certs" - "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" - clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api" - certutil "k8s.io/kubernetes/pkg/util/cert" + "k8s.io/client-go/tools/clientcmd" + clientcmdapi "k8s.io/client-go/tools/clientcmd/api" + certutil "k8s.io/client-go/util/cert" + kubeadmconstants "k8s.io/kubernetes/cmd/kubeadm/app/constants" + "k8s.io/kubernetes/cmd/kubeadm/app/phases/certs/pkiutil" ) const ( - KubernetesDirPermissions = 0700 - AdminKubeConfigFileName = "admin.conf" - KubeletKubeConfigFileName = "kubelet.conf" + KubernetesDirPermissions = 0700 + KubeConfigFilePermissions = 0600 + AdminKubeConfigFileName = "admin.conf" + AdminKubeConfigClientName = "kubernetes-admin" + KubeletKubeConfigFileName = "kubelet.conf" + KubeletKubeConfigClientName = "kubelet" ) -// This function is called from the main init and does the work for the default phase behaviour // TODO: Make an integration test for this function that runs after the certificates phase // and makes sure that those two phases work well together... -func CreateAdminAndKubeletKubeConfig(masterEndpoint, pkiDir, outDir string) error { - // Parse the certificate from a file - caCertPath := path.Join(pkiDir, "ca.pem") - caCerts, err := certutil.CertsFromFile(caCertPath) - if err != nil { - return fmt.Errorf("couldn't load the CA cert file %s: %v", caCertPath, err) - } - // We are only putting one certificate in the CA certificate pem file, so it's safe to just use the first one - caCert := caCerts[0] - // Parse the rsa private key from a file - caKeyPath := path.Join(pkiDir, "ca-key.pem") - priv, err := certutil.PrivateKeyFromFile(caKeyPath) - if err != nil { - return fmt.Errorf("couldn't load the CA private key file %s: %v", caKeyPath, err) - } - var caKey *rsa.PrivateKey - switch k := priv.(type) { - case *rsa.PrivateKey: - caKey = k - case *ecdsa.PrivateKey: - // TODO: Abstract rsa.PrivateKey away and make certutil.NewSignedCert accept a ecdsa.PrivateKey as well - // After that, we can support generating kubeconfig files from ecdsa private keys as well - return fmt.Errorf("the CA private key file %s isn't in RSA format", caKeyPath) - default: - return fmt.Errorf("the CA private key file %s isn't in RSA format", caKeyPath) +// TODO: Integration test cases: +// /etc/kubernetes/{admin,kubelet}.conf don't exist => generate kubeconfig files +// /etc/kubernetes/{admin,kubelet}.conf and certs in /etc/kubernetes/pki exist => don't touch anything as long as everything's valid +// /etc/kubernetes/{admin,kubelet}.conf exist but the server URL is invalid in those files => error +// /etc/kubernetes/{admin,kubelet}.conf exist but the CA cert doesn't match what's in the pki dir => error +// /etc/kubernetes/{admin,kubelet}.conf exist but not certs => certs will be generated and conflict with the kubeconfig files => error + +// CreateAdminAndKubeletKubeConfig is called from the main init and does the work for the default phase behaviour +func CreateAdminAndKubeletKubeConfig(masterEndpoint, pkiDir, outDir string) error { + + // Try to load ca.crt and ca.key from the PKI directory + caCert, caKey, err := pkiutil.TryLoadCertAndKeyFromDisk(pkiDir, kubeadmconstants.CACertAndKeyBaseName) + if err != nil || caCert == nil || caKey == nil { + return fmt.Errorf("couldn't create a kubeconfig; the CA files couldn't be loaded: %v", err) } // User admin should have full access to the cluster - if err := createKubeConfigFileForClient(masterEndpoint, "admin", outDir, caCert, caKey); err != nil { - return fmt.Errorf("couldn't create a kubeconfig file for admin: %v", err) + // TODO: Add test case that make sure this cert has the x509.ExtKeyUsageClientAuth flag + adminCertConfig := certutil.Config{ + CommonName: AdminKubeConfigClientName, + Organization: []string{"system:masters"}, + Usages: []x509.ExtKeyUsage{x509.ExtKeyUsageClientAuth}, + } + adminKubeConfigFilePath := filepath.Join(outDir, AdminKubeConfigFileName) + if err := createKubeConfigFileForClient(masterEndpoint, adminKubeConfigFilePath, adminCertConfig, caCert, caKey); err != nil { + return fmt.Errorf("couldn't create config for %s: %v", AdminKubeConfigClientName, err) } - // TODO: The kubelet should have limited access to the cluster - if err := createKubeConfigFileForClient(masterEndpoint, "kubelet", outDir, caCert, caKey); err != nil { - return fmt.Errorf("couldn't create a kubeconfig file for kubelet: %v", err) + // TODO: The kubelet should have limited access to the cluster. Right now, this gives kubelet basically root access + // and we do need that in the bootstrap phase, but we should swap it out after the control plane is up + // TODO: Add test case that make sure this cert has the x509.ExtKeyUsageClientAuth flag + kubeletCertConfig := certutil.Config{ + CommonName: KubeletKubeConfigClientName, + Organization: []string{"system:nodes"}, + Usages: []x509.ExtKeyUsage{x509.ExtKeyUsageClientAuth}, + } + kubeletKubeConfigFilePath := filepath.Join(outDir, KubeletKubeConfigFileName) + if err := createKubeConfigFileForClient(masterEndpoint, kubeletKubeConfigFilePath, kubeletCertConfig, caCert, caKey); err != nil { + return fmt.Errorf("couldn't create a kubeconfig file for %s: %v", KubeletKubeConfigClientName, err) } + // TODO make credentials for the controller-manager, scheduler and kube-proxy return nil } -func createKubeConfigFileForClient(masterEndpoint, client, outDir string, caCert *x509.Certificate, caKey *rsa.PrivateKey) error { - key, cert, err := certphase.NewClientKeyAndCert(caCert, caKey) +func createKubeConfigFileForClient(masterEndpoint, kubeConfigFilePath string, config certutil.Config, caCert *x509.Certificate, caKey *rsa.PrivateKey) error { + cert, key, err := pkiutil.NewCertAndKey(caCert, caKey, config) if err != nil { - return fmt.Errorf("failure while creating %s client certificate [%v]", client, err) + return fmt.Errorf("failure while creating %s client certificate [%v]", config.CommonName, err) } - config := MakeClientConfigWithCerts( + kubeconfig := MakeClientConfigWithCerts( masterEndpoint, "kubernetes", - client, + config.CommonName, certutil.EncodeCertPEM(caCert), certutil.EncodePrivateKeyPEM(key), certutil.EncodeCertPEM(cert), ) - // Write it now to a file - filepath := path.Join(outDir, fmt.Sprintf("%s.conf", client)) - return WriteKubeconfigToDisk(filepath, config) + // Write it now to a file if there already isn't a valid one + return writeKubeconfigToDiskIfNotExists(kubeConfigFilePath, kubeconfig) } -func WriteKubeconfigToDisk(filepath string, kubeconfig *clientcmdapi.Config) error { - // Make sure the dir exists or can be created - if err := os.MkdirAll(path.Dir(filepath), KubernetesDirPermissions); err != nil { - return fmt.Errorf("failed to create directory %q [%v]", path.Dir(filepath), err) +func WriteKubeconfigToDisk(filename string, kubeconfig *clientcmdapi.Config) error { + // Convert the KubeConfig object to a byte array + content, err := clientcmd.Write(*kubeconfig) + if err != nil { + return err } - // If err == nil, the file exists. Oops, we don't allow the file to exist already, fail. - if _, err := os.Stat(filepath); err == nil { - return fmt.Errorf("kubeconfig file %s already exists, but must not exist.", filepath) + // Create the directory if it does not exist + dir := filepath.Dir(filename) + if _, err := os.Stat(dir); os.IsNotExist(err) { + if err = os.MkdirAll(dir, KubernetesDirPermissions); err != nil { + return err + } } - if err := clientcmd.WriteToFile(*kubeconfig, filepath); err != nil { - return fmt.Errorf("failed to write to %q [%v]", filepath, err) + // No such kubeconfig file exists; write that kubeconfig down to disk then + if err := ioutil.WriteFile(filename, content, KubeConfigFilePermissions); err != nil { + return err } - fmt.Printf("[kubeconfig] Wrote KubeConfig file to disk: %q\n", filepath) + fmt.Printf("[kubeconfig] Wrote KubeConfig file to disk: %q\n", filename) + return nil +} + +// writeKubeconfigToDiskIfNotExists saves the KubeConfig struct to disk if there isn't any file at the given path +// If there already is a KubeConfig file at the given path; kubeadm tries to load it and check if the values in the +// existing and the expected config equals. If they do; kubeadm will just skip writing the file as it's up-to-date, +// but if a file exists but has old content or isn't a kubeconfig file, this function returns an error. +func writeKubeconfigToDiskIfNotExists(filename string, expectedConfig *clientcmdapi.Config) error { + // Check if the file exist, and if it doesn't, just write it to disk + if _, err := os.Stat(filename); os.IsNotExist(err) { + return WriteKubeconfigToDisk(filename, expectedConfig) + } + + // The kubeconfig already exists, let's check if it has got the same CA and server URL + currentConfig, err := clientcmd.LoadFromFile(filename) + if err != nil { + return fmt.Errorf("failed to load kubeconfig that already exists on disk [%v]", err) + } + + expectedCtx := expectedConfig.CurrentContext + expectedCluster := expectedConfig.Contexts[expectedCtx].Cluster + currentCtx := currentConfig.CurrentContext + currentCluster := currentConfig.Contexts[currentCtx].Cluster + // If the current CA cert on disk doesn't match the expected CA cert, error out because we have a file, but it's stale + if !bytes.Equal(currentConfig.Clusters[currentCluster].CertificateAuthorityData, expectedConfig.Clusters[expectedCluster].CertificateAuthorityData) { + return fmt.Errorf("a kubeconfig file %q exists already but has got the wrong CA cert", filename) + } + // If the current API Server location on disk doesn't match the expected API server, error out because we have a file, but it's stale + if currentConfig.Clusters[currentCluster].Server != expectedConfig.Clusters[expectedCluster].Server { + return fmt.Errorf("a kubeconfig file %q exists already but has got the wrong API Server URL", filename) + } + + // kubeadm doesn't validate the existing kubeconfig file more than this (kubeadm trusts the client certs to be valid) + // Basically, if we find a kubeconfig file with the same path; the same CA cert and the same server URL; + // kubeadm thinks those files are equal and doesn't bother writing a new file + fmt.Printf("[kubeconfig] Using existing up-to-date KubeConfig file: %q\n", filename) + return nil } diff --git a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/phases/kubeconfig/kubeconfig_test.go b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/phases/kubeconfig/kubeconfig_test.go index b5432267..d85bf3de 100644 --- a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/phases/kubeconfig/kubeconfig_test.go +++ b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/phases/kubeconfig/kubeconfig_test.go @@ -142,7 +142,7 @@ func TestWriteKubeconfigToDisk(t *testing.T) { if err != nil { t.Fatalf("Couldn't create tmpdir") } - defer os.Remove(tmpdir) + defer os.RemoveAll(tmpdir) // set up tmp GlobalEnvParams values for testing oldEnv := kubeadmapi.GlobalEnvParams diff --git a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/preflight/BUILD b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/preflight/BUILD index d714bc5d..23933156 100644 --- a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/preflight/BUILD +++ b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/preflight/BUILD @@ -14,6 +14,8 @@ go_library( tags = ["automanaged"], deps = [ "//cmd/kubeadm/app/apis/kubeadm:go_default_library", + "//cmd/kubeadm/app/constants:go_default_library", + "//cmd/kubeadm/app/phases/kubeconfig:go_default_library", "//pkg/api/validation:go_default_library", "//pkg/util/initsystem:go_default_library", "//pkg/util/node:go_default_library", diff --git a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/preflight/checks.go b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/preflight/checks.go index ba6f484a..2d3b4d51 100644 --- a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/preflight/checks.go +++ b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/preflight/checks.go @@ -25,10 +25,12 @@ import ( "net/http" "os" "os/exec" - "path" + "path/filepath" utilerrors "k8s.io/apimachinery/pkg/util/errors" kubeadmapi "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm" + kubeadmconstants "k8s.io/kubernetes/cmd/kubeadm/app/constants" + "k8s.io/kubernetes/cmd/kubeadm/app/phases/kubeconfig" "k8s.io/kubernetes/pkg/api/validation" "k8s.io/kubernetes/pkg/util/initsystem" "k8s.io/kubernetes/pkg/util/node" @@ -212,7 +214,7 @@ func (fcc FileContentCheck) Check() (warnings, errors []error) { } -// InPathCheck checks if the given executable is present in the path. +// InPathCheck checks if the given executable is present in the path type InPathCheck struct { executable string mandatory bool @@ -317,11 +319,8 @@ func RunInitMasterChecks(cfg *kubeadmapi.MasterConfiguration) error { PortOpenCheck{port: 10251}, PortOpenCheck{port: 10252}, HTTPProxyCheck{Proto: "https", Host: cfg.API.AdvertiseAddresses[0], Port: int(cfg.API.Port)}, - DirAvailableCheck{Path: path.Join(kubeadmapi.GlobalEnvParams.KubernetesDir, "manifests")}, - DirAvailableCheck{Path: kubeadmapi.GlobalEnvParams.HostPKIPath}, + DirAvailableCheck{Path: filepath.Join(kubeadmapi.GlobalEnvParams.KubernetesDir, "manifests")}, DirAvailableCheck{Path: "/var/lib/kubelet"}, - FileAvailableCheck{Path: path.Join(kubeadmapi.GlobalEnvParams.KubernetesDir, "admin.conf")}, - FileAvailableCheck{Path: path.Join(kubeadmapi.GlobalEnvParams.KubernetesDir, "kubelet.conf")}, FileContentCheck{Path: bridgenf, Content: []byte{'1'}}, InPathCheck{executable: "ip", mandatory: true}, InPathCheck{executable: "iptables", mandatory: true}, @@ -353,9 +352,10 @@ func RunJoinNodeChecks(cfg *kubeadmapi.NodeConfiguration) error { ServiceCheck{Service: "kubelet", CheckIfActive: false}, ServiceCheck{Service: "docker", CheckIfActive: true}, PortOpenCheck{port: 10250}, - DirAvailableCheck{Path: path.Join(kubeadmapi.GlobalEnvParams.KubernetesDir, "manifests")}, + DirAvailableCheck{Path: filepath.Join(kubeadmapi.GlobalEnvParams.KubernetesDir, "manifests")}, DirAvailableCheck{Path: "/var/lib/kubelet"}, - FileAvailableCheck{Path: path.Join(kubeadmapi.GlobalEnvParams.KubernetesDir, "kubelet.conf")}, + FileAvailableCheck{Path: filepath.Join(kubeadmapi.GlobalEnvParams.KubernetesDir, kubeadmconstants.CACertName)}, + FileAvailableCheck{Path: filepath.Join(kubeadmapi.GlobalEnvParams.KubernetesDir, kubeconfig.KubeletKubeConfigFileName)}, FileContentCheck{Path: bridgenf, Content: []byte{'1'}}, InPathCheck{executable: "ip", mandatory: true}, InPathCheck{executable: "iptables", mandatory: true}, diff --git a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/util/tokens.go b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/util/tokens.go index 355be56e..e173cd32 100644 --- a/vendor/k8s.io/kubernetes/cmd/kubeadm/app/util/tokens.go +++ b/vendor/k8s.io/kubernetes/cmd/kubeadm/app/util/tokens.go @@ -136,11 +136,11 @@ func UpdateOrCreateToken(client *clientset.Clientset, d *kubeadmapi.TokenDiscove secretName := fmt.Sprintf("%s%s", BootstrapTokenSecretPrefix, d.ID) var lastErr error for i := 0; i < tokenCreateRetries; i++ { - secret, err := client.Secrets(api.NamespaceSystem).Get(secretName, metav1.GetOptions{}) + secret, err := client.Secrets(metav1.NamespaceSystem).Get(secretName, metav1.GetOptions{}) if err == nil { // Secret with this ID already exists, update it: secret.Data = encodeTokenSecretData(d, tokenDuration) - if _, err := client.Secrets(api.NamespaceSystem).Update(secret); err == nil { + if _, err := client.Secrets(metav1.NamespaceSystem).Update(secret); err == nil { return nil } else { lastErr = err @@ -151,13 +151,13 @@ func UpdateOrCreateToken(client *clientset.Clientset, d *kubeadmapi.TokenDiscove // Secret does not already exist: if apierrors.IsNotFound(err) { secret = &v1.Secret{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: secretName, }, Type: api.SecretTypeBootstrapToken, Data: encodeTokenSecretData(d, tokenDuration), } - if _, err := client.Secrets(api.NamespaceSystem).Create(secret); err == nil { + if _, err := client.Secrets(metav1.NamespaceSystem).Create(secret); err == nil { return nil } else { lastErr = err diff --git a/vendor/k8s.io/kubernetes/cmd/kubelet/OWNERS b/vendor/k8s.io/kubernetes/cmd/kubelet/OWNERS index c0b8d3ac..7c254dd3 100644 --- a/vendor/k8s.io/kubernetes/cmd/kubelet/OWNERS +++ b/vendor/k8s.io/kubernetes/cmd/kubelet/OWNERS @@ -1,4 +1,8 @@ -assignees: - - dchen1107 - - vishh - - yujuhong +approvers: +- dchen1107 +- derekwaynecarr +- Random-Liu +- vishh +- yujuhong +reviewers: +- sig-node-reviewers diff --git a/vendor/k8s.io/kubernetes/cmd/kubelet/app/BUILD b/vendor/k8s.io/kubernetes/cmd/kubelet/app/BUILD index 38c96506..4fec04b3 100644 --- a/vendor/k8s.io/kubernetes/cmd/kubelet/app/BUILD +++ b/vendor/k8s.io/kubernetes/cmd/kubelet/app/BUILD @@ -17,10 +17,10 @@ go_test( library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/client/restclient:go_default_library", "//pkg/kubelet:go_default_library", "//pkg/util/config:go_default_library", "//vendor:k8s.io/apimachinery/pkg/util/diff", + "//vendor:k8s.io/client-go/rest", ], ) @@ -44,13 +44,9 @@ go_library( "//pkg/capabilities:go_default_library", "//pkg/client/chaosclient:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", - "//pkg/client/clientset_generated/clientset/typed/certificates/v1alpha1:go_default_library", + "//pkg/client/clientset_generated/clientset/typed/certificates/v1beta1:go_default_library", "//pkg/client/clientset_generated/clientset/typed/core/v1:go_default_library", "//pkg/client/record:go_default_library", - "//pkg/client/restclient:go_default_library", - "//pkg/client/unversioned/auth:go_default_library", - "//pkg/client/unversioned/clientcmd:go_default_library", - "//pkg/client/unversioned/clientcmd/api:go_default_library", "//pkg/cloudprovider:go_default_library", "//pkg/cloudprovider/providers:go_default_library", "//pkg/credentialprovider:go_default_library", @@ -71,7 +67,6 @@ go_library( "//pkg/kubelet/server:go_default_library", "//pkg/kubelet/types:go_default_library", "//pkg/kubelet/util/csr:go_default_library", - "//pkg/util/cert:go_default_library", "//pkg/util/config:go_default_library", "//pkg/util/configz:go_default_library", "//pkg/util/flock:go_default_library", @@ -115,7 +110,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/util/wait", "//vendor:k8s.io/apiserver/pkg/authentication/authenticator", "//vendor:k8s.io/apiserver/pkg/authorization/authorizer", - "//vendor:k8s.io/apiserver/pkg/healthz", + "//vendor:k8s.io/apiserver/pkg/server/healthz", "//vendor:k8s.io/client-go/kubernetes", "//vendor:k8s.io/client-go/kubernetes/typed/authentication/v1beta1", "//vendor:k8s.io/client-go/kubernetes/typed/authorization/v1beta1", @@ -123,6 +118,7 @@ go_library( "//vendor:k8s.io/client-go/tools/auth", "//vendor:k8s.io/client-go/tools/clientcmd", "//vendor:k8s.io/client-go/tools/clientcmd/api", + "//vendor:k8s.io/client-go/util/cert", ], ) diff --git a/vendor/k8s.io/kubernetes/cmd/kubelet/app/OWNERS b/vendor/k8s.io/kubernetes/cmd/kubelet/app/OWNERS new file mode 100755 index 00000000..9c8026c5 --- /dev/null +++ b/vendor/k8s.io/kubernetes/cmd/kubelet/app/OWNERS @@ -0,0 +1,2 @@ +reviewers: +- sig-node-reviewers diff --git a/vendor/k8s.io/kubernetes/cmd/kubelet/app/bootstrap.go b/vendor/k8s.io/kubernetes/cmd/kubelet/app/bootstrap.go index 8915b5f7..cdc7ff21 100644 --- a/vendor/k8s.io/kubernetes/cmd/kubelet/app/bootstrap.go +++ b/vendor/k8s.io/kubernetes/cmd/kubelet/app/bootstrap.go @@ -26,12 +26,12 @@ import ( "github.com/golang/glog" "k8s.io/apimachinery/pkg/types" - unversionedcertificates "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1alpha1" - "k8s.io/kubernetes/pkg/client/restclient" - "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" - clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api" + restclient "k8s.io/client-go/rest" + "k8s.io/client-go/tools/clientcmd" + clientcmdapi "k8s.io/client-go/tools/clientcmd/api" + certutil "k8s.io/client-go/util/cert" + certificates "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1" "k8s.io/kubernetes/pkg/kubelet/util/csr" - certutil "k8s.io/kubernetes/pkg/util/cert" ) const ( @@ -62,7 +62,7 @@ func bootstrapClientCert(kubeconfigPath string, bootstrapPath string, certDir st if err != nil { return fmt.Errorf("unable to load bootstrap kubeconfig: %v", err) } - bootstrapClient, err := unversionedcertificates.NewForConfig(bootstrapClientConfig) + bootstrapClient, err := certificates.NewForConfig(bootstrapClientConfig) if err != nil { return fmt.Errorf("unable to create certificates signing request client: %v", err) } diff --git a/vendor/k8s.io/kubernetes/cmd/kubelet/app/bootstrap_test.go b/vendor/k8s.io/kubernetes/cmd/kubelet/app/bootstrap_test.go index 6e827ab4..9f60028e 100644 --- a/vendor/k8s.io/kubernetes/cmd/kubelet/app/bootstrap_test.go +++ b/vendor/k8s.io/kubernetes/cmd/kubelet/app/bootstrap_test.go @@ -23,7 +23,7 @@ import ( "testing" "k8s.io/apimachinery/pkg/util/diff" - "k8s.io/kubernetes/pkg/client/restclient" + restclient "k8s.io/client-go/rest" ) func TestLoadRESTClientConfig(t *testing.T) { diff --git a/vendor/k8s.io/kubernetes/cmd/kubelet/app/options/options.go b/vendor/k8s.io/kubernetes/cmd/kubelet/app/options/options.go index fbcf8b16..8de599a7 100644 --- a/vendor/k8s.io/kubernetes/cmd/kubelet/app/options/options.go +++ b/vendor/k8s.io/kubernetes/cmd/kubelet/app/options/options.go @@ -213,7 +213,9 @@ func (s *KubeletServer) AddFlags(fs *pflag.FlagSet) { fs.MarkDeprecated("babysit-daemons", "Will be removed in a future version.") fs.Int32Var(&s.MaxPods, "max-pods", s.MaxPods, "Number of Pods that can run on this Kubelet.") fs.Int32Var(&s.NvidiaGPUs, "experimental-nvidia-gpus", s.NvidiaGPUs, "Number of NVIDIA GPU devices on this node. Only 0 (default) and 1 are currently supported.") + // TODO(#40229): Remove the docker-exec-handler flag. fs.StringVar(&s.DockerExecHandlerName, "docker-exec-handler", s.DockerExecHandlerName, "Handler to use when executing a command in a container. Valid values are 'native' and 'nsenter'. Defaults to 'native'.") + fs.MarkDeprecated("docker-exec-handler", "this flag will be removed and only the 'native' handler will be supported in the future.") fs.StringVar(&s.NonMasqueradeCIDR, "non-masquerade-cidr", s.NonMasqueradeCIDR, "Traffic to IPs outside this range will use IP masquerade.") fs.StringVar(&s.PodCIDR, "pod-cidr", "", "The CIDR to use for pod IP addresses, only used in standalone mode. In cluster mode, this is obtained from the master.") fs.StringVar(&s.ResolverConfig, "resolv-conf", s.ResolverConfig, "Resolver configuration file used as the basis for the container DNS resolution configuration.") @@ -251,6 +253,7 @@ func (s *KubeletServer) AddFlags(fs *pflag.FlagSet) { fs.BoolVar(&s.ExperimentalKernelMemcgNotification, "experimental-kernel-memcg-notification", s.ExperimentalKernelMemcgNotification, "If enabled, the kubelet will integrate with the kernel memcg notification to determine if memory eviction thresholds are crossed rather than polling.") fs.Int32Var(&s.PodsPerCore, "pods-per-core", s.PodsPerCore, "Number of Pods per core that can run on this Kubelet. The total number of Pods on this Kubelet cannot exceed max-pods, so max-pods will be used if this calculation results in a larger number of Pods allowed on the Kubelet. A value of 0 disables this limit.") fs.BoolVar(&s.ProtectKernelDefaults, "protect-kernel-defaults", s.ProtectKernelDefaults, "Default kubelet behaviour for kernel tuning. If set, kubelet errors if any of kernel tunables is different than kubelet defaults.") + fs.BoolVar(&s.KeepTerminatedPodVolumes, "keep-terminated-pod-volumes", s.KeepTerminatedPodVolumes, "Keep terminated pod volumes mounted to the node after the pod terminates. Can be useful for debugging volume related issues.") // CRI flags. fs.BoolVar(&s.EnableCRI, "experimental-cri", s.EnableCRI, "[Experimental] Enable the Container Runtime Interface (CRI) integration. If --container-runtime is set to \"remote\", Kubelet will communicate with the runtime/image CRI server listening on the endpoint specified by --remote-runtime-endpoint/--remote-image-endpoint. If --container-runtime is set to \"docker\", Kubelet will launch a in-process CRI server on behalf of docker, and communicate over a default endpoint.") diff --git a/vendor/k8s.io/kubernetes/cmd/kubelet/app/server.go b/vendor/k8s.io/kubernetes/cmd/kubelet/app/server.go index bcc87409..552e90ab 100644 --- a/vendor/k8s.io/kubernetes/cmd/kubelet/app/server.go +++ b/vendor/k8s.io/kubernetes/cmd/kubelet/app/server.go @@ -36,7 +36,7 @@ import ( "github.com/spf13/cobra" "github.com/spf13/pflag" - "k8s.io/apiserver/pkg/healthz" + "k8s.io/apiserver/pkg/server/healthz" clientgoclientset "k8s.io/client-go/kubernetes" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -44,6 +44,12 @@ import ( "k8s.io/apimachinery/pkg/types" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/wait" + restclient "k8s.io/client-go/rest" + clientauth "k8s.io/client-go/tools/auth" + "k8s.io/client-go/tools/clientcmd" + clientcmdapi "k8s.io/client-go/tools/clientcmd/api" + "k8s.io/client-go/util/cert" + certutil "k8s.io/client-go/util/cert" "k8s.io/kubernetes/cmd/kubelet/app/options" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" @@ -54,10 +60,6 @@ import ( "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" v1core "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1" "k8s.io/kubernetes/pkg/client/record" - "k8s.io/kubernetes/pkg/client/restclient" - clientauth "k8s.io/kubernetes/pkg/client/unversioned/auth" - "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" - clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api" "k8s.io/kubernetes/pkg/cloudprovider" "k8s.io/kubernetes/pkg/credentialprovider" "k8s.io/kubernetes/pkg/kubelet" @@ -68,8 +70,6 @@ import ( "k8s.io/kubernetes/pkg/kubelet/dockertools" "k8s.io/kubernetes/pkg/kubelet/server" kubetypes "k8s.io/kubernetes/pkg/kubelet/types" - "k8s.io/kubernetes/pkg/util/cert" - certutil "k8s.io/kubernetes/pkg/util/cert" utilconfig "k8s.io/kubernetes/pkg/util/config" "k8s.io/kubernetes/pkg/util/configz" "k8s.io/kubernetes/pkg/util/flock" @@ -356,6 +356,8 @@ func run(s *options.KubeletServer, kubeDeps *kubelet.KubeletDeps) (err error) { if err != nil { return err } + } else { + glog.Errorf("failed to init dynamic Kubelet configuration sync: %v", err) } } } diff --git a/vendor/k8s.io/kubernetes/cmd/kubemark/BUILD b/vendor/k8s.io/kubernetes/cmd/kubemark/BUILD index 287d3d70..a8ea9693 100644 --- a/vendor/k8s.io/kubernetes/cmd/kubemark/BUILD +++ b/vendor/k8s.io/kubernetes/cmd/kubemark/BUILD @@ -24,8 +24,6 @@ go_library( "//pkg/client/clientset_generated/internalclientset:go_default_library", "//pkg/client/metrics/prometheus:go_default_library", "//pkg/client/record:go_default_library", - "//pkg/client/restclient:go_default_library", - "//pkg/client/unversioned/clientcmd:go_default_library", "//pkg/kubelet/cadvisor/testing:go_default_library", "//pkg/kubelet/cm:go_default_library", "//pkg/kubelet/dockertools:go_default_library", @@ -37,6 +35,8 @@ go_library( "//vendor:github.com/golang/glog", "//vendor:github.com/spf13/pflag", "//vendor:k8s.io/apimachinery/pkg/util/sets", + "//vendor:k8s.io/client-go/rest", + "//vendor:k8s.io/client-go/tools/clientcmd", ], ) diff --git a/vendor/k8s.io/kubernetes/cmd/kubemark/hollow-node.go b/vendor/k8s.io/kubernetes/cmd/kubemark/hollow-node.go index dea77efa..42d2287e 100644 --- a/vendor/k8s.io/kubernetes/cmd/kubemark/hollow-node.go +++ b/vendor/k8s.io/kubernetes/cmd/kubemark/hollow-node.go @@ -20,13 +20,13 @@ import ( "fmt" "k8s.io/apimachinery/pkg/util/sets" + restclient "k8s.io/client-go/rest" + "k8s.io/client-go/tools/clientcmd" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" _ "k8s.io/kubernetes/pkg/client/metrics/prometheus" // for client metric registration "k8s.io/kubernetes/pkg/client/record" - "k8s.io/kubernetes/pkg/client/restclient" - "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" cadvisortest "k8s.io/kubernetes/pkg/kubelet/cadvisor/testing" "k8s.io/kubernetes/pkg/kubelet/cm" "k8s.io/kubernetes/pkg/kubelet/dockertools" @@ -110,7 +110,7 @@ func main() { cadvisorInterface := new(cadvisortest.Fake) containerManager := cm.NewStubContainerManager() - fakeDockerClient := dockertools.NewFakeDockerClient() + fakeDockerClient := dockertools.NewFakeDockerClient().WithTraceDisabled() fakeDockerClient.EnableSleep = true hollowKubelet := kubemark.NewHollowKubelet( diff --git a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/OWNERS b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/OWNERS index 9ec923fd..b44539f2 100644 --- a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/OWNERS +++ b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/OWNERS @@ -1,3 +1,6 @@ -assignees: - - lavalamp - - wojtek-t +approvers: +- lavalamp +- wojtek-t +reviewers: +- lavalamp +- wojtek-t diff --git a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/OWNERS b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/OWNERS index 4cf5f970..0c408a1a 100644 --- a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/OWNERS +++ b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/OWNERS @@ -1,4 +1,8 @@ -assignees: - - lavalamp - - wojtek-t - - caesarxuchao +approvers: +- lavalamp +- wojtek-t +- caesarxuchao +reviewers: +- lavalamp +- wojtek-t +- caesarxuchao diff --git a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/generators/fake/generator_fake_for_group.go b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/generators/fake/generator_fake_for_group.go index fdd4f2da..e3913714 100644 --- a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/generators/fake/generator_fake_for_group.go +++ b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/generators/fake/generator_fake_for_group.go @@ -60,7 +60,7 @@ func (g *genFakeForGroup) Imports(c *generator.Context) (imports []string) { func (g *genFakeForGroup) GenerateType(c *generator.Context, t *types.Type, w io.Writer) error { sw := generator.NewSnippetWriter(w, c, "$", "$") const pkgTestingCore = "k8s.io/kubernetes/pkg/client/testing/core" - const pkgRESTClient = "k8s.io/kubernetes/pkg/client/restclient" + const pkgRESTClient = "k8s.io/client-go/rest" m := map[string]interface{}{ "group": g.group, "GroupVersion": namer.IC(g.group) + namer.IC(g.version), diff --git a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/generators/fake/generator_fake_for_type.go b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/generators/fake/generator_fake_for_type.go index 5a7d0052..cd93f395 100644 --- a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/generators/fake/generator_fake_for_type.go +++ b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/generators/fake/generator_fake_for_type.go @@ -115,10 +115,13 @@ func (g *genFakeForType) GenerateType(c *generator.Context, t *types.Type, w io. "group": canonicalGroup, "groupName": groupName, "version": g.version, - "watchInterface": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/watch", Name: "Interface"}), - "GroupVersionResource": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/runtime/schema", Name: "GroupVersionResource"}), - "PatchType": c.Universe.Type(types.Name{Package: "k8s.io/kubernetes/pkg/api", Name: "PatchType"}), + "DeleteOptions": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "DeleteOptions"}), + "ListOptions": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "ListOptions"}), + "GetOptions": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "GetOptions"}), "Everything": c.Universe.Function(types.Name{Package: "k8s.io/apimachinery/pkg/labels", Name: "Everything"}), + "GroupVersionResource": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/runtime/schema", Name: "GroupVersionResource"}), + "PatchType": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/types", Name: "PatchType"}), + "watchInterface": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/watch", Name: "Interface"}), "NewRootListAction": c.Universe.Function(types.Name{Package: pkgTestingCore, Name: "NewRootListAction"}), "NewListAction": c.Universe.Function(types.Name{Package: pkgTestingCore, Name: "NewListAction"}), @@ -143,15 +146,6 @@ func (g *genFakeForType) GenerateType(c *generator.Context, t *types.Type, w io. "ExtractFromListOptions": c.Universe.Function(types.Name{Package: pkgTestingCore, Name: "ExtractFromListOptions"}), } - if g.version == "" { - m["DeleteOptions"] = c.Universe.Type(types.Name{Package: "k8s.io/kubernetes/pkg/api", Name: "DeleteOptions"}) - m["ListOptions"] = c.Universe.Type(types.Name{Package: "k8s.io/kubernetes/pkg/api", Name: "ListOptions"}) - } else { - m["DeleteOptions"] = c.Universe.Type(types.Name{Package: "k8s.io/kubernetes/pkg/api/v1", Name: "DeleteOptions"}) - m["ListOptions"] = c.Universe.Type(types.Name{Package: "k8s.io/kubernetes/pkg/api/v1", Name: "ListOptions"}) - } - m["GetOptions"] = c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "GetOptions"}) - noMethods := extractBoolTagOrDie("noMethods", t.SecondClosestCommentLines) == true if namespaced { diff --git a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/generators/generator_for_clientset.go b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/generators/generator_for_clientset.go index fc33fb61..e82ac985 100644 --- a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/generators/generator_for_clientset.go +++ b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/generators/generator_for_clientset.go @@ -62,9 +62,9 @@ func (g *genClientset) Imports(c *generator.Context) (imports []string) { } } imports = append(imports, "github.com/golang/glog") - imports = append(imports, "k8s.io/kubernetes/pkg/util/flowcontrol") + imports = append(imports, "k8s.io/client-go/util/flowcontrol") // import solely to initialize client auth plugins. - imports = append(imports, "_ \"k8s.io/kubernetes/plugin/pkg/client/auth\"") + imports = append(imports, "_ \"k8s.io/client-go/plugin/pkg/client/auth\"") return } @@ -73,7 +73,7 @@ func (g *genClientset) GenerateType(c *generator.Context, t *types.Type, w io.Wr // perhaps we can adapt the go2ild framework to this kind of usage. sw := generator.NewSnippetWriter(w, c, "$", "$") const pkgDiscovery = "k8s.io/kubernetes/pkg/client/typed/discovery" - const pkgRESTClient = "k8s.io/kubernetes/pkg/client/restclient" + const pkgRESTClient = "k8s.io/client-go/rest" allGroups := clientgentypes.ToGroupVersionPackages(g.groups) diff --git a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/generators/generator_for_group.go b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/generators/generator_for_group.go index 7dabf1ea..158ab9db 100644 --- a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/generators/generator_for_group.go +++ b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/generators/generator_for_group.go @@ -57,7 +57,7 @@ func (g *genGroup) Imports(c *generator.Context) (imports []string) { func (g *genGroup) GenerateType(c *generator.Context, t *types.Type, w io.Writer) error { sw := generator.NewSnippetWriter(w, c, "$", "$") - const pkgRESTClient = "k8s.io/kubernetes/pkg/client/restclient" + const pkgRESTClient = "k8s.io/client-go/rest" const pkgAPI = "k8s.io/kubernetes/pkg/api" const pkgSerializer = "k8s.io/apimachinery/pkg/runtime/serializer" const pkgUnversioned = "k8s.io/kubernetes/pkg/api/unversioned" diff --git a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/generators/generator_for_type.go b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/generators/generator_for_type.go index e5ed252d..76e7fe50 100644 --- a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/generators/generator_for_type.go +++ b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/generators/generator_for_type.go @@ -81,24 +81,18 @@ func (g *genClientForType) GenerateType(c *generator.Context, t *types.Type, w i "type": t, "package": pkg, "Package": namer.IC(pkg), + "namespaced": namespaced, "Group": namer.IC(g.group), "GroupVersion": namer.IC(g.group) + namer.IC(g.version), + "DeleteOptions": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "DeleteOptions"}), + "ListOptions": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "ListOptions"}), + "GetOptions": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "GetOptions"}), + "PatchType": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/types", Name: "PatchType"}), "watchInterface": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/watch", Name: "Interface"}), - "RESTClientInterface": c.Universe.Type(types.Name{Package: "k8s.io/kubernetes/pkg/client/restclient", Name: "Interface"}), + "RESTClientInterface": c.Universe.Type(types.Name{Package: "k8s.io/client-go/rest", Name: "Interface"}), "apiParameterCodec": c.Universe.Type(types.Name{Package: "k8s.io/kubernetes/pkg/api", Name: "ParameterCodec"}), - "PatchType": c.Universe.Type(types.Name{Package: "k8s.io/kubernetes/pkg/api", Name: "PatchType"}), - "namespaced": namespaced, } - if g.version == "" { - m["DeleteOptions"] = c.Universe.Type(types.Name{Package: "k8s.io/kubernetes/pkg/api", Name: "DeleteOptions"}) - m["ListOptions"] = c.Universe.Type(types.Name{Package: "k8s.io/kubernetes/pkg/api", Name: "ListOptions"}) - } else { - m["DeleteOptions"] = c.Universe.Type(types.Name{Package: "k8s.io/kubernetes/pkg/api/v1", Name: "DeleteOptions"}) - m["ListOptions"] = c.Universe.Type(types.Name{Package: "k8s.io/kubernetes/pkg/api/v1", Name: "ListOptions"}) - } - m["GetOptions"] = c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "GetOptions"}) - sw.Do(getterComment, m) if namespaced { sw.Do(getterNamesapced, m) diff --git a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/main.go b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/main.go index accdaff8..1f3c0b9e 100644 --- a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/main.go +++ b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/main.go @@ -160,7 +160,7 @@ func main() { }) dependencies := []string{ - "k8s.io/kubernetes/pkg/fields", + "k8s.io/apimachinery/pkg/fields", "k8s.io/apimachinery/pkg/labels", "k8s.io/apimachinery/pkg/watch", "k8s.io/apimachinery/pkg/apimachinery/registered", diff --git a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/test_apis/testgroup/BUILD b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/test_apis/testgroup/BUILD index e5e53a18..eef8ff9e 100644 --- a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/test_apis/testgroup/BUILD +++ b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/test_apis/testgroup/BUILD @@ -16,7 +16,6 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", diff --git a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/test_apis/testgroup/install/install.go b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/test_apis/testgroup/install/install.go index 36e58056..01312992 100644 --- a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/test_apis/testgroup/install/install.go +++ b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/test_apis/testgroup/install/install.go @@ -85,7 +85,7 @@ func newRESTMapper(externalVersions []schema.GroupVersion) meta.RESTMapper { ignoredKinds := sets.NewString() - return api.NewDefaultRESTMapper(externalVersions, interfacesFor, importPrefix, ignoredKinds, rootScoped) + return meta.NewDefaultRESTMapperFromScheme(externalVersions, interfacesFor, importPrefix, ignoredKinds, rootScoped, api.Scheme) } // InterfacesFor returns the default Codec and ResourceVersioner for a given version diff --git a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/test_apis/testgroup/register.go b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/test_apis/testgroup/register.go index bf9d9328..df25d849 100644 --- a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/test_apis/testgroup/register.go +++ b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/test_apis/testgroup/register.go @@ -19,7 +19,6 @@ package testgroup import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/api" ) var SchemeGroupVersion = schema.GroupVersion{Group: "testgroup.k8s.io", Version: runtime.APIVersionInternal} @@ -36,9 +35,7 @@ func addKnownTypes(scheme *runtime.Scheme) error { &TestTypeList{}, ) - scheme.AddKnownTypes(SchemeGroupVersion, - &api.ListOptions{}, - ) + scheme.AddKnownTypes(SchemeGroupVersion) return nil } diff --git a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/test_apis/testgroup/types.go b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/test_apis/testgroup/types.go index 0e8d8743..8e013734 100644 --- a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/test_apis/testgroup/types.go +++ b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/test_apis/testgroup/types.go @@ -16,16 +16,13 @@ limitations under the License. package testgroup -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/kubernetes/pkg/api" -) +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" // +genclient=true type TestType struct { metav1.TypeMeta - api.ObjectMeta + metav1.ObjectMeta Status TestTypeStatus } diff --git a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/test_apis/testgroup/v1/BUILD b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/test_apis/testgroup/v1/BUILD index 6dfe859b..edaafc3f 100644 --- a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/test_apis/testgroup/v1/BUILD +++ b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/test_apis/testgroup/v1/BUILD @@ -17,7 +17,6 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api/v1:go_default_library", "//vendor:github.com/ugorji/go/codec", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", diff --git a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/test_apis/testgroup/v1/register.go b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/test_apis/testgroup/v1/register.go index 65230b6c..95463b15 100644 --- a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/test_apis/testgroup/v1/register.go +++ b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/test_apis/testgroup/v1/register.go @@ -20,7 +20,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/api/v1" ) var SchemeGroupVersion = schema.GroupVersion{Group: "testgroup.k8s.io", Version: "v1"} @@ -38,10 +37,7 @@ func addKnownTypes(scheme *runtime.Scheme) error { ) scheme.AddKnownTypes(SchemeGroupVersion, - &v1.ListOptions{}, - &v1.DeleteOptions{}, &metav1.Status{}, - &metav1.ExportOptions{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil diff --git a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/test_apis/testgroup/v1/types.generated.go b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/test_apis/testgroup/v1/types.generated.go index 3feeb1fa..228af6fb 100644 --- a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/test_apis/testgroup/v1/types.generated.go +++ b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/test_apis/testgroup/v1/types.generated.go @@ -26,8 +26,7 @@ import ( "fmt" codec1978 "github.com/ugorji/go/codec" pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - pkg3_types "k8s.io/apimachinery/pkg/types" - pkg2_v1 "k8s.io/kubernetes/pkg/api/v1" + pkg2_types "k8s.io/apimachinery/pkg/types" "reflect" "runtime" time "time" @@ -64,10 +63,9 @@ func init() { } if false { // reference the types, but skip this branch at build/run time var v0 pkg1_v1.TypeMeta - var v1 pkg3_types.UID - var v2 pkg2_v1.ObjectMeta - var v3 time.Time - _, _, _, _ = v0, v1, v2, v3 + var v1 pkg2_types.UID + var v2 time.Time + _, _, _ = v0, v1, v2 } } @@ -159,7 +157,13 @@ func (x *TestType) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -169,7 +173,13 @@ func (x *TestType) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -276,17 +286,23 @@ func (x *TestType) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "status": if r.TryDecodeAsNil() { x.Status = TestTypeStatus{} } else { - yyv9 := &x.Status - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Status + yyv10.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -299,16 +315,16 @@ func (x *TestType) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + var yyj11 int + var yyb11 bool + var yyhl11 bool = l >= 0 + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -316,21 +332,21 @@ func (x *TestType) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv11 := &x.Kind - yym12 := z.DecBinary() - _ = yym12 + yyv12 := &x.Kind + yym13 := z.DecBinary() + _ = yym13 if false { } else { - *((*string)(yyv11)) = r.DecodeString() + *((*string)(yyv12)) = r.DecodeString() } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -338,38 +354,44 @@ func (x *TestType) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv13 := &x.APIVersion - yym14 := z.DecBinary() - _ = yym14 + yyv14 := &x.APIVersion + yym15 := z.DecBinary() + _ = yym15 if false { } else { - *((*string)(yyv13)) = r.DecodeString() + *((*string)(yyv14)) = r.DecodeString() } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv15 := &x.ObjectMeta - yyv15.CodecDecodeSelf(d) + yyv16 := &x.ObjectMeta + yym17 := z.DecBinary() + _ = yym17 + if false { + } else if z.HasExtensions() && z.DecExt(yyv16) { + } else { + z.DecFallback(yyv16, false) + } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -377,21 +399,21 @@ func (x *TestType) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = TestTypeStatus{} } else { - yyv16 := &x.Status - yyv16.CodecDecodeSelf(d) + yyv18 := &x.Status + yyv18.CodecDecodeSelf(d) } for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj10-1, "") + z.DecStructFieldNotFound(yyj11-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } diff --git a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/test_apis/testgroup/v1/types.go b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/test_apis/testgroup/v1/types.go index 39fddeea..96e30452 100644 --- a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/test_apis/testgroup/v1/types.go +++ b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/test_apis/testgroup/v1/types.go @@ -16,10 +16,7 @@ limitations under the License. package v1 -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - apiv1 "k8s.io/kubernetes/pkg/api/v1" -) +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" // +genclient=true @@ -30,7 +27,7 @@ type TestType struct { // unversioned objects in the generate file that is not used anywhere other than this test type. // +k8s:openapi-gen=false // +optional - apiv1.ObjectMeta `json:"metadata,omitempty"` + metav1.ObjectMeta `json:"metadata,omitempty"` // +optional Status TestTypeStatus `json:"status,omitempty"` } diff --git a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/BUILD b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/BUILD index 2d14abf5..2c5b27e5 100644 --- a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/BUILD +++ b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/BUILD @@ -17,11 +17,11 @@ go_library( tags = ["automanaged"], deps = [ "//cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/typed/discovery:go_default_library", - "//pkg/util/flowcontrol:go_default_library", - "//plugin/pkg/client/auth:go_default_library", "//vendor:github.com/golang/glog", + "//vendor:k8s.io/client-go/plugin/pkg/client/auth", + "//vendor:k8s.io/client-go/rest", + "//vendor:k8s.io/client-go/util/flowcontrol", ], ) @@ -31,8 +31,8 @@ go_test( library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/client/restclient:go_default_library", - "//pkg/util/flowcontrol:go_default_library", + "//vendor:k8s.io/client-go/rest", + "//vendor:k8s.io/client-go/util/flowcontrol", ], ) diff --git a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/clientset.go b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/clientset.go index 34c4b9a9..3b48200a 100644 --- a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/clientset.go +++ b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/clientset.go @@ -18,11 +18,11 @@ package test_internalclientset import ( "github.com/golang/glog" + _ "k8s.io/client-go/plugin/pkg/client/auth" + rest "k8s.io/client-go/rest" + "k8s.io/client-go/util/flowcontrol" internalversiontestgroup "k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion" - restclient "k8s.io/kubernetes/pkg/client/restclient" discovery "k8s.io/kubernetes/pkg/client/typed/discovery" - "k8s.io/kubernetes/pkg/util/flowcontrol" - _ "k8s.io/kubernetes/plugin/pkg/client/auth" ) type Interface interface { @@ -54,7 +54,7 @@ func (c *Clientset) Discovery() discovery.DiscoveryInterface { } // NewForConfig creates a new Clientset for the given config. -func NewForConfig(c *restclient.Config) (*Clientset, error) { +func NewForConfig(c *rest.Config) (*Clientset, error) { configShallowCopy := *c if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) @@ -76,7 +76,7 @@ func NewForConfig(c *restclient.Config) (*Clientset, error) { // NewForConfigOrDie creates a new Clientset for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *Clientset { +func NewForConfigOrDie(c *rest.Config) *Clientset { var cs Clientset cs.TestgroupClient = internalversiontestgroup.NewForConfigOrDie(c) @@ -85,7 +85,7 @@ func NewForConfigOrDie(c *restclient.Config) *Clientset { } // New creates a new Clientset for the given RESTClient. -func New(c restclient.Interface) *Clientset { +func New(c rest.Interface) *Clientset { var cs Clientset cs.TestgroupClient = internalversiontestgroup.New(c) diff --git a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/clientset_test.go b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/clientset_test.go index e6558f2b..39cc4d9b 100644 --- a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/clientset_test.go +++ b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/clientset_test.go @@ -19,8 +19,8 @@ package test_internalclientset import ( "testing" - restclient "k8s.io/kubernetes/pkg/client/restclient" - "k8s.io/kubernetes/pkg/util/flowcontrol" + restclient "k8s.io/client-go/rest" + "k8s.io/client-go/util/flowcontrol" ) func ClientSetRateLimiterTest(t *testing.T) { diff --git a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion/BUILD b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion/BUILD index 145b4e2c..7c883a18 100644 --- a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion/BUILD +++ b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion/BUILD @@ -19,9 +19,10 @@ go_library( deps = [ "//cmd/libs/go2idl/client-gen/test_apis/testgroup:go_default_library", "//pkg/api:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion/fake/BUILD b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion/fake/BUILD index 3e8b32f8..b5b8992d 100644 --- a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion/fake/BUILD +++ b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion/fake/BUILD @@ -18,13 +18,13 @@ go_library( deps = [ "//cmd/libs/go2idl/client-gen/test_apis/testgroup:go_default_library", "//cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion:go_default_library", - "//pkg/api:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion/fake/fake_testgroup_client.go b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion/fake/fake_testgroup_client.go index 7dbd0242..63669d98 100644 --- a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion/fake/fake_testgroup_client.go +++ b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion/fake/fake_testgroup_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" internalversion "k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -32,7 +32,7 @@ func (c *FakeTestgroup) TestTypes(namespace string) internalversion.TestTypeInte // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeTestgroup) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeTestgroup) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion/fake/fake_testtype.go b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion/fake/fake_testtype.go index 3768ac36..284e065d 100644 --- a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion/fake/fake_testtype.go +++ b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion/fake/fake_testtype.go @@ -20,9 +20,9 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testgroup "k8s.io/kubernetes/cmd/libs/go2idl/client-gen/test_apis/testgroup" - api "k8s.io/kubernetes/pkg/api" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -64,14 +64,14 @@ func (c *FakeTestTypes) UpdateStatus(testType *testgroup.TestType) (*testgroup.T return obj.(*testgroup.TestType), err } -func (c *FakeTestTypes) Delete(name string, options *api.DeleteOptions) error { +func (c *FakeTestTypes) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewDeleteAction(testtypesResource, c.ns, name), &testgroup.TestType{}) return err } -func (c *FakeTestTypes) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *FakeTestTypes) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := core.NewDeleteCollectionAction(testtypesResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &testgroup.TestTypeList{}) @@ -88,7 +88,7 @@ func (c *FakeTestTypes) Get(name string, options v1.GetOptions) (result *testgro return obj.(*testgroup.TestType), err } -func (c *FakeTestTypes) List(opts api.ListOptions) (result *testgroup.TestTypeList, err error) { +func (c *FakeTestTypes) List(opts v1.ListOptions) (result *testgroup.TestTypeList, err error) { obj, err := c.Fake. Invokes(core.NewListAction(testtypesResource, c.ns, opts), &testgroup.TestTypeList{}) @@ -110,14 +110,14 @@ func (c *FakeTestTypes) List(opts api.ListOptions) (result *testgroup.TestTypeLi } // Watch returns a watch.Interface that watches the requested testTypes. -func (c *FakeTestTypes) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *FakeTestTypes) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewWatchAction(testtypesResource, c.ns, opts)) } // Patch applies the patch and returns the patched testType. -func (c *FakeTestTypes) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *testgroup.TestType, err error) { +func (c *FakeTestTypes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *testgroup.TestType, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(testtypesResource, c.ns, name, data, subresources...), &testgroup.TestType{}) diff --git a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion/testgroup_client.go b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion/testgroup_client.go index 730ae66c..bb2855b5 100644 --- a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion/testgroup_client.go +++ b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion/testgroup_client.go @@ -17,18 +17,18 @@ limitations under the License. package internalversion import ( + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type TestgroupInterface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface TestTypesGetter } // TestgroupClient is used to interact with features provided by the testgroup.k8s.io group. type TestgroupClient struct { - restClient restclient.Interface + restClient rest.Interface } func (c *TestgroupClient) TestTypes(namespace string) TestTypeInterface { @@ -36,12 +36,12 @@ func (c *TestgroupClient) TestTypes(namespace string) TestTypeInterface { } // NewForConfig creates a new TestgroupClient for the given config. -func NewForConfig(c *restclient.Config) (*TestgroupClient, error) { +func NewForConfig(c *rest.Config) (*TestgroupClient, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -50,7 +50,7 @@ func NewForConfig(c *restclient.Config) (*TestgroupClient, error) { // NewForConfigOrDie creates a new TestgroupClient for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *TestgroupClient { +func NewForConfigOrDie(c *rest.Config) *TestgroupClient { client, err := NewForConfig(c) if err != nil { panic(err) @@ -59,11 +59,11 @@ func NewForConfigOrDie(c *restclient.Config) *TestgroupClient { } // New creates a new TestgroupClient for the given RESTClient. -func New(c restclient.Interface) *TestgroupClient { +func New(c rest.Interface) *TestgroupClient { return &TestgroupClient{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { // if testgroup group is not registered, return an error g, err := api.Registry.Group("testgroup.k8s.io") if err != nil { @@ -71,7 +71,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/apis" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } if config.GroupVersion == nil || config.GroupVersion.Group != g.GroupVersion.Group { copyGroupVersion := g.GroupVersion @@ -90,7 +90,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *TestgroupClient) RESTClient() restclient.Interface { +func (c *TestgroupClient) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion/testtype.go b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion/testtype.go index 3f70d5fe..b7466945 100644 --- a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion/testtype.go +++ b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion/testtype.go @@ -18,10 +18,11 @@ package internalversion import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" testgroup "k8s.io/kubernetes/cmd/libs/go2idl/client-gen/test_apis/testgroup" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // TestTypesGetter has a method to return a TestTypeInterface. @@ -35,18 +36,18 @@ type TestTypeInterface interface { Create(*testgroup.TestType) (*testgroup.TestType, error) Update(*testgroup.TestType) (*testgroup.TestType, error) UpdateStatus(*testgroup.TestType) (*testgroup.TestType, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error Get(name string, options v1.GetOptions) (*testgroup.TestType, error) - List(opts api.ListOptions) (*testgroup.TestTypeList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *testgroup.TestType, err error) + List(opts v1.ListOptions) (*testgroup.TestTypeList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *testgroup.TestType, err error) TestTypeExpansion } // testTypes implements TestTypeInterface type testTypes struct { - client restclient.Interface + client rest.Interface ns string } @@ -100,7 +101,7 @@ func (c *testTypes) UpdateStatus(testType *testgroup.TestType) (result *testgrou } // Delete takes name of the testType and deletes it. Returns an error if one occurs. -func (c *testTypes) Delete(name string, options *api.DeleteOptions) error { +func (c *testTypes) Delete(name string, options *v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("testtypes"). @@ -111,7 +112,7 @@ func (c *testTypes) Delete(name string, options *api.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *testTypes) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *testTypes) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("testtypes"). @@ -135,7 +136,7 @@ func (c *testTypes) Get(name string, options v1.GetOptions) (result *testgroup.T } // List takes label and field selectors, and returns the list of TestTypes that match those selectors. -func (c *testTypes) List(opts api.ListOptions) (result *testgroup.TestTypeList, err error) { +func (c *testTypes) List(opts v1.ListOptions) (result *testgroup.TestTypeList, err error) { result = &testgroup.TestTypeList{} err = c.client.Get(). Namespace(c.ns). @@ -147,7 +148,7 @@ func (c *testTypes) List(opts api.ListOptions) (result *testgroup.TestTypeList, } // Watch returns a watch.Interface that watches the requested testTypes. -func (c *testTypes) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *testTypes) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -157,7 +158,7 @@ func (c *testTypes) Watch(opts api.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched testType. -func (c *testTypes) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *testgroup.TestType, err error) { +func (c *testTypes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *testgroup.TestType, err error) { result = &testgroup.TestType{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/conversion-gen/generators/conversion.go b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/conversion-gen/generators/conversion.go index 6d0ab3c1..11027c2b 100644 --- a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/conversion-gen/generators/conversion.go +++ b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/conversion-gen/generators/conversion.go @@ -657,7 +657,7 @@ func (g *genConversion) doSlice(inType, outType *types.Type, sw *generator.Snipp } else if g.convertibleOnlyWithinPackage(inType.Elem, outType.Elem) { sw.Do("if err := "+nameTmpl+"(&(*in)[i], &(*out)[i], s); err != nil {\n", argsFromType(inType.Elem, outType.Elem)) } else { - // TODO: This triggers on v1.ObjectMeta <-> api.ObjectMeta and + // TODO: This triggers on metav1.ObjectMeta <-> metav1.ObjectMeta and // similar because neither package is the target package, and // we really don't know which package will have the conversion // function defined. This fires on basically every object diff --git a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/go-to-protobuf/OWNERS b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/go-to-protobuf/OWNERS index de40b15f..05d4b2a6 100644 --- a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/go-to-protobuf/OWNERS +++ b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/go-to-protobuf/OWNERS @@ -1,2 +1,4 @@ -assignees: - - smarterclayton +approvers: +- smarterclayton +reviewers: +- smarterclayton diff --git a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/go-to-protobuf/protobuf/cmd.go b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/go-to-protobuf/protobuf/cmd.go index c04e8efe..fc5bd4ac 100644 --- a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/go-to-protobuf/protobuf/cmd.go +++ b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/go-to-protobuf/protobuf/cmd.go @@ -77,8 +77,9 @@ func New() *Generator { `k8s.io/kubernetes/pkg/apis/apps/v1beta1`, `k8s.io/kubernetes/pkg/apis/authentication/v1beta1`, `k8s.io/kubernetes/pkg/apis/rbac/v1alpha1`, + `k8s.io/kubernetes/pkg/apis/rbac/v1beta1`, `k8s.io/kubernetes/federation/apis/federation/v1beta1`, - `k8s.io/kubernetes/pkg/apis/certificates/v1alpha1`, + `k8s.io/kubernetes/pkg/apis/certificates/v1beta1`, `k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1`, `k8s.io/kubernetes/pkg/apis/storage/v1beta1`, }, ","), diff --git a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/informer-gen/generators/factory.go b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/informer-gen/generators/factory.go index d1f723e3..883f052a 100644 --- a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/informer-gen/generators/factory.go +++ b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/informer-gen/generators/factory.go @@ -83,6 +83,7 @@ func (g *factoryGenerator) GenerateType(c *generator.Context, t *types.Type, w i "internalClientSetInterface": c.Universe.Type(types.Name{Package: g.internalClientSetPackage, Name: "Interface"}), "reflectType": c.Universe.Type(reflectType), "runtimeObject": c.Universe.Type(runtimeObject), + "schemaGroupVersionResource": c.Universe.Type(schemaGroupVersionResource), "syncMutex": c.Universe.Type(syncMutex), "timeDuration": c.Universe.Type(timeDuration), "versionedClientSetInterface": c.Universe.Type(types.Name{Package: g.versionedClientSetPackage, Name: "Interface"}), @@ -171,6 +172,7 @@ var sharedInformerFactoryInterface = ` // API group versions. type SharedInformerFactory interface { {{.informerFactoryInterface|raw}} + ForResource(resource {{.schemaGroupVersionResource|raw}}) (GenericInformer, error) {{$gvInterfaces := .gvInterfaces}} {{range $groupName, $group := .groupVersions}}{{$groupName}}() {{index $gvInterfaces $groupName|raw}} diff --git a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/informer-gen/generators/informer.go b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/informer-gen/generators/informer.go index 49399c2d..07984532 100644 --- a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/informer-gen/generators/informer.go +++ b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/informer-gen/generators/informer.go @@ -69,16 +69,14 @@ func (g *informerGenerator) GenerateType(c *generator.Context, t *types.Type, w listerPackage := fmt.Sprintf("%s/%s/%s", g.listersPackage, g.groupVersion.Group.NonEmpty(), strings.ToLower(g.groupVersion.Version.NonEmpty())) var ( - clientSetInterface, namespaceAll *types.Type - informerFor string + clientSetInterface *types.Type + informerFor string ) if len(g.groupVersion.Version) == 0 { clientSetInterface = c.Universe.Type(types.Name{Package: g.internalClientSetPackage, Name: "Interface"}) - namespaceAll = c.Universe.Type(apiNamespaceAll) informerFor = "InternalInformerFor" } else { clientSetInterface = c.Universe.Type(types.Name{Package: g.versionedClientSetPackage, Name: "Interface"}) - namespaceAll = c.Universe.Type(v1NamespaceAll) informerFor = "VersionedInformerFor" } @@ -96,7 +94,7 @@ func (g *informerGenerator) GenerateType(c *generator.Context, t *types.Type, w "interfacesSharedInformerFactory": c.Universe.Type(types.Name{Package: g.internalInterfacesPackage, Name: "SharedInformerFactory"}), "listOptions": c.Universe.Type(listOptions), "lister": c.Universe.Type(types.Name{Package: listerPackage, Name: t.Name.Name + "Lister"}), - "namespaceAll": namespaceAll, + "namespaceAll": c.Universe.Type(metav1NamespaceAll), "namespaced": !extractBoolTagOrDie("nonNamespaced", t.SecondClosestCommentLines), "newLister": c.Universe.Function(types.Name{Package: listerPackage, Name: "New" + t.Name.Name + "Lister"}), "runtimeObject": c.Universe.Type(runtimeObject), @@ -140,18 +138,10 @@ func new$.type|public$Informer(client $.clientSetInterface|raw$, resyncPeriod $. sharedIndexInformer := $.cacheNewSharedIndexInformer|raw$( &$.cacheListWatch|raw${ ListFunc: func(options $.v1ListOptions|raw$) ($.runtimeObject|raw$, error) { - var internalOptions $.listOptions|raw$ - if err := $.apiScheme|raw$.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.$.group$$.version$().$.type|publicPlural$($if .namespaced$$.namespaceAll|raw$$end$).List(internalOptions) + return client.$.group$$.version$().$.type|publicPlural$($if .namespaced$$.namespaceAll|raw$$end$).List(options) }, WatchFunc: func(options $.v1ListOptions|raw$) ($.watchInterface|raw$, error) { - var internalOptions $.listOptions|raw$ - if err := $.apiScheme|raw$.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.$.group$$.version$().$.type|publicPlural$($if .namespaced$$.namespaceAll|raw$$end$).Watch(internalOptions) + return client.$.group$$.version$().$.type|publicPlural$($if .namespaced$$.namespaceAll|raw$$end$).Watch(options) }, }, &$.type|raw${}, diff --git a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/informer-gen/generators/packages.go b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/informer-gen/generators/packages.go index 255da268..54fc0dec 100644 --- a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/informer-gen/generators/packages.go +++ b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/informer-gen/generators/packages.go @@ -74,7 +74,7 @@ func generatedBy() string { } // objectMetaForPackage returns the type of ObjectMeta used by package p. -func objectMetaForPackage(p *types.Package) (*types.Type, error) { +func objectMetaForPackage(p *types.Package) (*types.Type, bool, error) { generatingForPackage := false for _, t := range p.Types { // filter out types which dont have genclient=true. @@ -84,19 +84,19 @@ func objectMetaForPackage(p *types.Package) (*types.Type, error) { generatingForPackage = true for _, member := range t.Members { if member.Name == "ObjectMeta" { - return member.Type, nil + return member.Type, isInternal(member), nil } } } if generatingForPackage { - return nil, fmt.Errorf("unable to find ObjectMeta for any types in package %s", p.Path) + return nil, false, fmt.Errorf("unable to find ObjectMeta for any types in package %s", p.Path) } - return nil, nil + return nil, false, nil } -// isInternal returns true if t's package is k8s.io/kubernetes/pkg/api. -func isInternal(t *types.Type) bool { - return t.Name.Package == "k8s.io/kubernetes/pkg/api" +// isInternal returns true if the tags for a member do not contain a json tag +func isInternal(m types.Member) bool { + return !strings.Contains(m.Tags, "json") } func packageForGroup(base string, group clientgentypes.Group) string { @@ -128,7 +128,7 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat for _, inputDir := range arguments.InputDirs { p := context.Universe.Package(inputDir) - objectMeta, err := objectMetaForPackage(p) + objectMeta, internal, err := objectMetaForPackage(p) if err != nil { glog.Fatal(err) } @@ -139,7 +139,7 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat var gv clientgentypes.GroupVersion - if isInternal(objectMeta) { + if internal { lastSlash := strings.LastIndex(p.Path, "/") if lastSlash == -1 { glog.Fatalf("error constructing internal group version for package %q", p.Path) diff --git a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/informer-gen/generators/types.go b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/informer-gen/generators/types.go index 06d2fac8..3a15b819 100644 --- a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/informer-gen/generators/types.go +++ b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/informer-gen/generators/types.go @@ -19,7 +19,6 @@ package generators import "k8s.io/gengo/types" var ( - apiNamespaceAll = types.Name{Package: "k8s.io/kubernetes/pkg/api", Name: "NamespaceAll"} apiScheme = types.Name{Package: "k8s.io/kubernetes/pkg/api", Name: "Scheme"} cacheGenericLister = types.Name{Package: "k8s.io/kubernetes/pkg/client/cache", Name: "GenericLister"} cacheIndexers = types.Name{Package: "k8s.io/kubernetes/pkg/client/cache", Name: "Indexers"} @@ -36,7 +35,7 @@ var ( schemaGroupVersionResource = types.Name{Package: "k8s.io/apimachinery/pkg/runtime/schema", Name: "GroupVersionResource"} syncMutex = types.Name{Package: "sync", Name: "Mutex"} timeDuration = types.Name{Package: "time", Name: "Duration"} - v1ListOptions = types.Name{Package: "k8s.io/kubernetes/pkg/api/v1", Name: "ListOptions"} - v1NamespaceAll = types.Name{Package: "k8s.io/kubernetes/pkg/api/v1", Name: "NamespaceAll"} + v1ListOptions = types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "ListOptions"} + metav1NamespaceAll = types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "NamespaceAll"} watchInterface = types.Name{Package: "k8s.io/apimachinery/pkg/watch", Name: "Interface"} ) diff --git a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/lister-gen/generators/lister.go b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/lister-gen/generators/lister.go index 23749f2e..ecbbdced 100644 --- a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/lister-gen/generators/lister.go +++ b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/lister-gen/generators/lister.go @@ -87,7 +87,7 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat for _, inputDir := range arguments.InputDirs { p := context.Universe.Package(inputDir) - objectMeta, err := objectMetaForPackage(p) + objectMeta, internal, err := objectMetaForPackage(p) if err != nil { glog.Fatal(err) } @@ -99,7 +99,7 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat var gv clientgentypes.GroupVersion var internalGVPkg string - if isInternal(objectMeta) { + if internal { lastSlash := strings.LastIndex(p.Path, "/") if lastSlash == -1 { glog.Fatalf("error constructing internal group version for package %q", p.Path) @@ -165,7 +165,7 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat } // objectMetaForPackage returns the type of ObjectMeta used by package p. -func objectMetaForPackage(p *types.Package) (*types.Type, error) { +func objectMetaForPackage(p *types.Package) (*types.Type, bool, error) { generatingForPackage := false for _, t := range p.Types { // filter out types which dont have genclient=true. @@ -175,19 +175,19 @@ func objectMetaForPackage(p *types.Package) (*types.Type, error) { generatingForPackage = true for _, member := range t.Members { if member.Name == "ObjectMeta" { - return member.Type, nil + return member.Type, isInternal(member), nil } } } if generatingForPackage { - return nil, fmt.Errorf("unable to find ObjectMeta for any types in package %s", p.Path) + return nil, false, fmt.Errorf("unable to find ObjectMeta for any types in package %s", p.Path) } - return nil, nil + return nil, false, nil } -// isInternal returns true if t's package is k8s.io/kubernetes/pkg/api. -func isInternal(t *types.Type) bool { - return t.Name.Package == "k8s.io/kubernetes/pkg/api" +// isInternal returns true if the tags for a member do not contain a json tag +func isInternal(m types.Member) bool { + return !strings.Contains(m.Tags, "json") } // listerGenerator produces a file of listers for a given GroupVersion and diff --git a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/set-gen/main.go b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/set-gen/main.go index 4ea82b94..b9e66abc 100644 --- a/vendor/k8s.io/kubernetes/cmd/libs/go2idl/set-gen/main.go +++ b/vendor/k8s.io/kubernetes/cmd/libs/go2idl/set-gen/main.go @@ -40,7 +40,7 @@ func main() { // Override defaults. These are Kubernetes specific input and output // locations. arguments.InputDirs = []string{"k8s.io/kubernetes/pkg/util/sets/types"} - arguments.OutputPackagePath = "k8s.io/kubernetes/pkg/util/sets" + arguments.OutputPackagePath = "k8s.io/apimachinery/pkg/util/sets" arguments.GoHeaderFilePath = filepath.Join(args.DefaultSourceTree(), "k8s.io/kubernetes/hack/boilerplate/boilerplate.go.txt") if err := arguments.Execute( diff --git a/vendor/k8s.io/kubernetes/docs/OWNERS b/vendor/k8s.io/kubernetes/docs/OWNERS index 1c719a4d..0f4d3337 100644 --- a/vendor/k8s.io/kubernetes/docs/OWNERS +++ b/vendor/k8s.io/kubernetes/docs/OWNERS @@ -1,5 +1,8 @@ -assignees: - - bgrant0607 +reviewers: + - brendandburns + - smarterclayton + - thockin +approvers: - brendandburns - smarterclayton - thockin diff --git a/vendor/k8s.io/kubernetes/docs/api-reference/apps/v1beta1/definitions.html b/vendor/k8s.io/kubernetes/docs/api-reference/apps/v1beta1/definitions.html index 4167fea1..4a9a7803 100755 --- a/vendor/k8s.io/kubernetes/docs/api-reference/apps/v1beta1/definitions.html +++ b/vendor/k8s.io/kubernetes/docs/api-reference/apps/v1beta1/definitions.html @@ -1387,7 +1387,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

items

-

If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error. Paths must be relative and may not contain the .. path or start with ...

+

If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the .. path or start with ...

false

v1.KeyToPath array

@@ -1399,6 +1399,13 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

integer (int32)

+ +

optional

+

Specify whether the ConfigMap or it’s keys must be defined

+

false

+

boolean

+

false

+ @@ -1512,6 +1519,50 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; } + +
+

v1.SecretEnvSource

+
+

SecretEnvSource selects a Secret to populate the environment variables with.

+
+
+

The contents of the target Secret’s Data field will represent the key-value pairs as environment variables.

+
+ +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionRequiredSchemaDefault

name

Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names

false

string

optional

Specify whether the Secret must be defined

false

boolean

false

+

v1.StatusDetails

@@ -1766,7 +1817,14 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

terminationMessagePath

-

Optional: Path at which the file to which the container’s termination message will be written is mounted into the container’s filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated.

+

Optional: Path at which the file to which the container’s termination message will be written is mounted into the container’s filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated.

+

false

+

string

+ + + +

terminationMessagePolicy

+

Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.

false

string

@@ -2555,6 +2613,13 @@ Populated by the system when a graceful deletion is requested. Read-only. More i

v1.ConfigMapEnvSource

+ +

secretRef

+

The Secret to select from

+

false

+

v1.SecretEnvSource

+ + @@ -3143,7 +3208,7 @@ Populated by the system when a graceful deletion is requested. Read-only. More i

items

-

If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error. Paths must be relative and may not contain the .. path or start with ...

+

If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the .. path or start with ...

false

v1.KeyToPath array

@@ -3155,6 +3220,13 @@ Populated by the system when a graceful deletion is requested. Read-only. More i

integer (int32)

+ +

optional

+

Specify whether the Secret or it’s keys must be defined

+

false

+

boolean

+

false

+ @@ -3652,7 +3724,7 @@ Populated by the system when a graceful deletion is requested. Read-only. More i

v1.DeleteOptions

-

DeleteOptions may be provided when deleting an API object

+

DeleteOptions may be provided when deleting an API object.

@@ -4004,6 +4076,13 @@ The StatefulSet guarantees that a given network identity will always map to the + + + + + + +

string

optional

Specify whether the ConfigMap must be defined

false

boolean

false

@@ -4217,6 +4296,13 @@ The StatefulSet guarantees that a given network identity will always map to the

string

+ +

optional

+

Specify whether the Secret or it’s key must be defined

+

false

+

boolean

+

false

+ @@ -4511,6 +4597,13 @@ The StatefulSet guarantees that a given network identity will always map to the

v1.Affinity

+ +

schedulername

+

If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler.

+

false

+

string

+ + @@ -4655,6 +4748,13 @@ The StatefulSet guarantees that a given network identity will always map to the

string

+ +

optional

+

Specify whether the ConfigMap or it’s key must be defined

+

false

+

boolean

+

false

+ @@ -4960,7 +5060,7 @@ Examples:
diff --git a/vendor/k8s.io/kubernetes/docs/api-reference/autoscaling/v1/definitions.html b/vendor/k8s.io/kubernetes/docs/api-reference/autoscaling/v1/definitions.html index d2fedc56..5e324499 100755 --- a/vendor/k8s.io/kubernetes/docs/api-reference/autoscaling/v1/definitions.html +++ b/vendor/k8s.io/kubernetes/docs/api-reference/autoscaling/v1/definitions.html @@ -446,7 +446,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

v1.DeleteOptions

-

DeleteOptions may be provided when deleting an API object

+

DeleteOptions may be provided when deleting an API object.

@@ -1375,7 +1375,7 @@ Examples:
diff --git a/vendor/k8s.io/kubernetes/docs/api-reference/batch/v1/definitions.html b/vendor/k8s.io/kubernetes/docs/api-reference/batch/v1/definitions.html index 07b1b54a..d11fd7de 100755 --- a/vendor/k8s.io/kubernetes/docs/api-reference/batch/v1/definitions.html +++ b/vendor/k8s.io/kubernetes/docs/api-reference/batch/v1/definitions.html @@ -1291,7 +1291,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; } - + @@ -1303,6 +1303,13 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; } + + + + + + +

items

If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error. Paths must be relative and may not contain the .. path or start with ...

If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the .. path or start with ...

false

v1.KeyToPath array

integer (int32)

optional

Specify whether the ConfigMap or it’s keys must be defined

false

boolean

false

@@ -1416,6 +1423,50 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; } +
+
+

v1.SecretEnvSource

+
+

SecretEnvSource selects a Secret to populate the environment variables with.

+
+
+

The contents of the target Secret’s Data field will represent the key-value pairs as environment variables.

+
+ +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionRequiredSchemaDefault

name

Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names

false

string

optional

Specify whether the Secret must be defined

false

boolean

false

+

v1.StatusDetails

@@ -1670,7 +1721,14 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

terminationMessagePath

-

Optional: Path at which the file to which the container’s termination message will be written is mounted into the container’s filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated.

+

Optional: Path at which the file to which the container’s termination message will be written is mounted into the container’s filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated.

+

false

+

string

+ + + +

terminationMessagePolicy

+

Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.

false

string

@@ -2466,6 +2524,13 @@ Populated by the system when a graceful deletion is requested. Read-only. More i

v1.ConfigMapEnvSource

+ +

secretRef

+

The Secret to select from

+

false

+

v1.SecretEnvSource

+ + @@ -3130,7 +3195,7 @@ Populated by the system when a graceful deletion is requested. Read-only. More i

items

-

If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error. Paths must be relative and may not contain the .. path or start with ...

+

If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the .. path or start with ...

false

v1.KeyToPath array

@@ -3142,6 +3207,13 @@ Populated by the system when a graceful deletion is requested. Read-only. More i

integer (int32)

+ +

optional

+

Specify whether the Secret or it’s keys must be defined

+

false

+

boolean

+

false

+ @@ -3704,7 +3776,7 @@ Populated by the system when a graceful deletion is requested. Read-only. More i

v1.DeleteOptions

-

DeleteOptions may be provided when deleting an API object

+

DeleteOptions may be provided when deleting an API object.

@@ -3991,6 +4063,13 @@ Populated by the system when a graceful deletion is requested. Read-only. More i + + + + + + +

string

optional

Specify whether the ConfigMap must be defined

false

boolean

false

@@ -4204,6 +4283,13 @@ Populated by the system when a graceful deletion is requested. Read-only. More i

string

+ +

optional

+

Specify whether the Secret or it’s key must be defined

+

false

+

boolean

+

false

+ @@ -4498,6 +4584,13 @@ Populated by the system when a graceful deletion is requested. Read-only. More i

v1.Affinity

+ +

schedulername

+

If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler.

+

false

+

string

+ + @@ -4642,6 +4735,13 @@ Populated by the system when a graceful deletion is requested. Read-only. More i

string

+ +

optional

+

Specify whether the ConfigMap or it’s key must be defined

+

false

+

boolean

+

false

+ @@ -4892,7 +4992,7 @@ Examples:
diff --git a/vendor/k8s.io/kubernetes/docs/api-reference/certificates.k8s.io/v1alpha1/definitions.html b/vendor/k8s.io/kubernetes/docs/api-reference/certificates.k8s.io/v1beta1/definitions.html similarity index 98% rename from vendor/k8s.io/kubernetes/docs/api-reference/certificates.k8s.io/v1alpha1/definitions.html rename to vendor/k8s.io/kubernetes/docs/api-reference/certificates.k8s.io/v1beta1/definitions.html index 17c52d0d..68adc897 100755 --- a/vendor/k8s.io/kubernetes/docs/api-reference/certificates.k8s.io/v1alpha1/definitions.html +++ b/vendor/k8s.io/kubernetes/docs/api-reference/certificates.k8s.io/v1beta1/definitions.html @@ -370,10 +370,10 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; } @@ -436,58 +436,6 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; } -
-
-

v1alpha1.CertificateSigningRequestList

- ------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameDescriptionRequiredSchemaDefault

kind

Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

false

string

apiVersion

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

false

string

metadata

false

v1.ListMeta

items

true

v1alpha1.CertificateSigningRequest array

-

v1.Patch

@@ -498,7 +446,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

v1.DeleteOptions

-

DeleteOptions may be provided when deleting an API object

+

DeleteOptions may be provided when deleting an API object.

@@ -556,69 +504,6 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
-
-
-

v1alpha1.CertificateSigningRequestSpec

-
-

This information is immutable after the request is created. Only the Request and ExtraInfo fields can be set on creation, other fields are derived by Kubernetes and cannot be modified by users.

-
- ------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameDescriptionRequiredSchemaDefault

request

Base64-encoded PKCS#10 CSR data

true

string

usages

allowedUsages specifies a set of usage contexts the key will be valid for. See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3
- https://tools.ietf.org/html/rfc5280#section-4.2.1.12

false

v1alpha1.KeyUsage array

username

Information about the requesting user (if relevant) See user.Info interface for details

false

string

uid

false

string

groups

false

string array

-

v1.ListMeta

@@ -662,7 +547,10 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
-

v1alpha1.CertificateSigningRequestStatus

+

v1beta1.CertificateSigningRequestSpec

+
+

This information is immutable after the request is created. Only the Request and ExtraInfo fields can be set on creation, other fields are derived by Kubernetes and cannot be modified by users.

+
@@ -682,19 +570,41 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; } - - - - + + + + - - + + + + + + + + + + + + + + + + + + + + + + +

conditions

Conditions applied to the request, such as approval or denial.

false

v1alpha1.CertificateSigningRequestCondition array

request

Base64-encoded PKCS#10 CSR data

true

string

certificate

If request was approved, the controller will place the issued certificate here.

usages

allowedUsages specifies a set of usage contexts the key will be valid for. See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3
+ https://tools.ietf.org/html/rfc5280#section-4.2.1.12

false

v1beta1.KeyUsage array

username

Information about the requesting user (if relevant) See user.Info interface for details

false

string

uid

false

string

groups

false

string array

@@ -760,58 +670,6 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; } -
-
-

v1alpha1.CertificateSigningRequestCondition

- ------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameDescriptionRequiredSchemaDefault

type

request approval state, currently Approved or Denied.

true

string

reason

brief reason for the request state

false

string

message

human readable message with details about the request state

false

string

lastUpdateTime

timestamp for the last update to this condition

false

string

-

v1.Preconditions

@@ -848,10 +706,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
-

v1alpha1.CertificateSigningRequest

-
-

Describes a certificate signing request

-
+

v1beta1.CertificateSigningRequestList

@@ -888,21 +743,14 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; } - + - - - - + - - - - - - + + @@ -993,7 +841,65 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
-

v1alpha1.KeyUsage

+

v1beta1.CertificateSigningRequest

+
+

Describes a certificate signing request

+
+

metadata

false

v1.ObjectMeta

v1.ListMeta

spec

The certificate request itself and any additional information.

false

v1alpha1.CertificateSigningRequestSpec

items

status

Derived information about the request.

false

v1alpha1.CertificateSigningRequestStatus

true

v1beta1.CertificateSigningRequest array

+++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionRequiredSchemaDefault

kind

Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

false

string

apiVersion

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

false

string

metadata

false

v1.ObjectMeta

spec

The certificate request itself and any additional information.

false

v1beta1.CertificateSigningRequestSpec

status

Derived information about the request.

false

v1beta1.CertificateSigningRequestStatus

@@ -1300,6 +1206,62 @@ Populated by the system when a graceful deletion is requested. Read-only. More i

types.UID

+
+
+

v1beta1.CertificateSigningRequestCondition

+ +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionRequiredSchemaDefault

type

request approval state, currently Approved or Denied.

true

string

reason

brief reason for the request state

false

string

message

human readable message with details about the request state

false

string

lastUpdateTime

timestamp for the last update to this condition

false

string

+ +
+
+

v1beta1.KeyUsage

+

v1.StatusCause

@@ -1352,6 +1314,44 @@ Examples:
+
+
+

v1beta1.CertificateSigningRequestStatus

+ +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionRequiredSchemaDefault

conditions

Conditions applied to the request, such as approval or denial.

false

v1beta1.CertificateSigningRequestCondition array

certificate

If request was approved, the controller will place the issued certificate here.

false

string

+

any

@@ -1364,7 +1364,7 @@ Examples:
diff --git a/vendor/k8s.io/kubernetes/docs/api-reference/certificates.k8s.io/v1alpha1/operations.html b/vendor/k8s.io/kubernetes/docs/api-reference/certificates.k8s.io/v1beta1/operations.html similarity index 96% rename from vendor/k8s.io/kubernetes/docs/api-reference/certificates.k8s.io/v1alpha1/operations.html rename to vendor/k8s.io/kubernetes/docs/api-reference/certificates.k8s.io/v1beta1/operations.html index e5195cd7..4c938258 100755 --- a/vendor/k8s.io/kubernetes/docs/api-reference/certificates.k8s.io/v1alpha1/operations.html +++ b/vendor/k8s.io/kubernetes/docs/api-reference/certificates.k8s.io/v1beta1/operations.html @@ -371,7 +371,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

get available resources

-
GET /apis/certificates.k8s.io/v1alpha1
+
GET /apis/certificates.k8s.io/v1beta1
@@ -436,7 +436,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
  • -

    apiscertificates.k8s.iov1alpha1

    +

    apiscertificates.k8s.iov1beta1

@@ -446,7 +446,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

list or watch objects of kind CertificateSigningRequest

-
GET /apis/certificates.k8s.io/v1alpha1/certificatesigningrequests
+
GET /apis/certificates.k8s.io/v1beta1/certificatesigningrequests
@@ -542,7 +542,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

200

success

-

v1alpha1.CertificateSigningRequestList

+

v1beta1.CertificateSigningRequestList

@@ -585,7 +585,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
  • -

    apiscertificates.k8s.iov1alpha1

    +

    apiscertificates.k8s.iov1beta1

@@ -595,7 +595,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

delete collection of CertificateSigningRequest

-
DELETE /apis/certificates.k8s.io/v1alpha1/certificatesigningrequests
+
DELETE /apis/certificates.k8s.io/v1beta1/certificatesigningrequests
@@ -728,7 +728,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
  • -

    apiscertificates.k8s.iov1alpha1

    +

    apiscertificates.k8s.iov1beta1

@@ -738,7 +738,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

create a CertificateSigningRequest

-
POST /apis/certificates.k8s.io/v1alpha1/certificatesigningrequests
+
POST /apis/certificates.k8s.io/v1beta1/certificatesigningrequests
@@ -776,7 +776,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

body

true

-

v1alpha1.CertificateSigningRequest

+

v1beta1.CertificateSigningRequest

@@ -802,7 +802,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

200

success

-

v1alpha1.CertificateSigningRequest

+

v1beta1.CertificateSigningRequest

@@ -839,7 +839,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
  • -

    apiscertificates.k8s.iov1alpha1

    +

    apiscertificates.k8s.iov1beta1

@@ -849,7 +849,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

read the specified CertificateSigningRequest

-
GET /apis/certificates.k8s.io/v1alpha1/certificatesigningrequests/{name}
+
GET /apis/certificates.k8s.io/v1beta1/certificatesigningrequests/{name}
@@ -929,7 +929,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

200

success

-

v1alpha1.CertificateSigningRequest

+

v1beta1.CertificateSigningRequest

@@ -966,7 +966,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
  • -

    apiscertificates.k8s.iov1alpha1

    +

    apiscertificates.k8s.iov1beta1

@@ -976,7 +976,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

replace the specified CertificateSigningRequest

-
PUT /apis/certificates.k8s.io/v1alpha1/certificatesigningrequests/{name}
+
PUT /apis/certificates.k8s.io/v1beta1/certificatesigningrequests/{name}
@@ -1014,7 +1014,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

body

true

-

v1alpha1.CertificateSigningRequest

+

v1beta1.CertificateSigningRequest

@@ -1048,7 +1048,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

200

success

-

v1alpha1.CertificateSigningRequest

+

v1beta1.CertificateSigningRequest

@@ -1085,7 +1085,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
  • -

    apiscertificates.k8s.iov1alpha1

    +

    apiscertificates.k8s.iov1beta1

@@ -1095,7 +1095,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

delete a CertificateSigningRequest

-
DELETE /apis/certificates.k8s.io/v1alpha1/certificatesigningrequests/{name}
+
DELETE /apis/certificates.k8s.io/v1beta1/certificatesigningrequests/{name}
@@ -1220,7 +1220,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
  • -

    apiscertificates.k8s.iov1alpha1

    +

    apiscertificates.k8s.iov1beta1

@@ -1230,7 +1230,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

partially update the specified CertificateSigningRequest

-
PATCH /apis/certificates.k8s.io/v1alpha1/certificatesigningrequests/{name}
+
PATCH /apis/certificates.k8s.io/v1beta1/certificatesigningrequests/{name}
@@ -1302,7 +1302,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

200

success

-

v1alpha1.CertificateSigningRequest

+

v1beta1.CertificateSigningRequest

@@ -1345,7 +1345,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
  • -

    apiscertificates.k8s.iov1alpha1

    +

    apiscertificates.k8s.iov1beta1

@@ -1355,7 +1355,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

replace approval of the specified CertificateSigningRequest

-
PUT /apis/certificates.k8s.io/v1alpha1/certificatesigningrequests/{name}/approval
+
PUT /apis/certificates.k8s.io/v1beta1/certificatesigningrequests/{name}/approval
@@ -1393,7 +1393,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

body

true

-

v1alpha1.CertificateSigningRequest

+

v1beta1.CertificateSigningRequest

@@ -1427,7 +1427,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

200

success

-

v1alpha1.CertificateSigningRequest

+

v1beta1.CertificateSigningRequest

@@ -1464,7 +1464,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
  • -

    apiscertificates.k8s.iov1alpha1

    +

    apiscertificates.k8s.iov1beta1

@@ -1474,7 +1474,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

replace status of the specified CertificateSigningRequest

-
PUT /apis/certificates.k8s.io/v1alpha1/certificatesigningrequests/{name}/status
+
PUT /apis/certificates.k8s.io/v1beta1/certificatesigningrequests/{name}/status
@@ -1512,7 +1512,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

body

true

-

v1alpha1.CertificateSigningRequest

+

v1beta1.CertificateSigningRequest

@@ -1546,7 +1546,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

200

success

-

v1alpha1.CertificateSigningRequest

+

v1beta1.CertificateSigningRequest

@@ -1583,7 +1583,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
  • -

    apiscertificates.k8s.iov1alpha1

    +

    apiscertificates.k8s.iov1beta1

@@ -1593,7 +1593,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

watch individual changes to a list of CertificateSigningRequest

-
GET /apis/certificates.k8s.io/v1alpha1/watch/certificatesigningrequests
+
GET /apis/certificates.k8s.io/v1beta1/watch/certificatesigningrequests
@@ -1732,7 +1732,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
  • -

    apiscertificates.k8s.iov1alpha1

    +

    apiscertificates.k8s.iov1beta1

@@ -1742,7 +1742,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

watch changes to an object of kind CertificateSigningRequest

-
GET /apis/certificates.k8s.io/v1alpha1/watch/certificatesigningrequests/{name}
+
GET /apis/certificates.k8s.io/v1beta1/watch/certificatesigningrequests/{name}
@@ -1889,7 +1889,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
  • -

    apiscertificates.k8s.iov1alpha1

    +

    apiscertificates.k8s.iov1beta1

@@ -1900,7 +1900,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
diff --git a/vendor/k8s.io/kubernetes/docs/api-reference/extensions/v1beta1/definitions.html b/vendor/k8s.io/kubernetes/docs/api-reference/extensions/v1beta1/definitions.html index 35181779..825a94e6 100755 --- a/vendor/k8s.io/kubernetes/docs/api-reference/extensions/v1beta1/definitions.html +++ b/vendor/k8s.io/kubernetes/docs/api-reference/extensions/v1beta1/definitions.html @@ -1600,7 +1600,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

items

-

If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error. Paths must be relative and may not contain the .. path or start with ...

+

If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the .. path or start with ...

false

v1.KeyToPath array

@@ -1612,6 +1612,13 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

integer (int32)

+ +

optional

+

Specify whether the ConfigMap or it’s keys must be defined

+

false

+

boolean

+

false

+ @@ -1663,6 +1670,50 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; } +
+
+

v1.SecretEnvSource

+
+

SecretEnvSource selects a Secret to populate the environment variables with.

+
+
+

The contents of the target Secret’s Data field will represent the key-value pairs as environment variables.

+
+ +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionRequiredSchemaDefault

name

Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names

false

string

optional

Specify whether the Secret must be defined

false

boolean

false

+

v1.Capabilities

@@ -2406,6 +2457,13 @@ Populated by the system when a graceful deletion is requested. Read-only. More i

v1.ConfigMapEnvSource

+ +

secretRef

+

The Secret to select from

+

false

+

v1.SecretEnvSource

+ + @@ -2784,7 +2842,7 @@ Populated by the system when a graceful deletion is requested. Read-only. More i

items

-

If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error. Paths must be relative and may not contain the .. path or start with ...

+

If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the .. path or start with ...

false

v1.KeyToPath array

@@ -2796,6 +2854,13 @@ Populated by the system when a graceful deletion is requested. Read-only. More i

integer (int32)

+ +

optional

+

Specify whether the Secret or it’s keys must be defined

+

false

+

boolean

+

false

+ @@ -3187,7 +3252,7 @@ Populated by the system when a graceful deletion is requested. Read-only. More i

v1.DeleteOptions

-

DeleteOptions may be provided when deleting an API object

+

DeleteOptions may be provided when deleting an API object.

@@ -3795,6 +3860,13 @@ Populated by the system when a graceful deletion is requested. Read-only. More i + + + + + + +

string

optional

Specify whether the Secret or it’s key must be defined

false

boolean

false

@@ -4124,6 +4196,13 @@ Populated by the system when a graceful deletion is requested. Read-only. More i

v1.Affinity

+ +

schedulername

+

If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler.

+

false

+

string

+ + @@ -5714,7 +5793,14 @@ Both these may change in the future. Incoming requests are matched against the h

terminationMessagePath

-

Optional: Path at which the file to which the container’s termination message will be written is mounted into the container’s filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated.

+

Optional: Path at which the file to which the container’s termination message will be written is mounted into the container’s filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated.

+

false

+

string

+ + + +

terminationMessagePolicy

+

Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.

false

string

@@ -7113,6 +7199,13 @@ Both these may change in the future. Incoming requests are matched against the h

string

+ +

optional

+

Specify whether the ConfigMap must be defined

+

false

+

boolean

+

false

+ @@ -7332,6 +7425,13 @@ Both these may change in the future. Incoming requests are matched against the h

string

+ +

optional

+

Specify whether the ConfigMap or it’s key must be defined

+

false

+

boolean

+

false

+ @@ -7509,7 +7609,7 @@ Both these may change in the future. Incoming requests are matched against the h
diff --git a/vendor/k8s.io/kubernetes/docs/api-reference/policy/v1beta1/definitions.html b/vendor/k8s.io/kubernetes/docs/api-reference/policy/v1beta1/definitions.html index 87cdeb61..6ae30833 100755 --- a/vendor/k8s.io/kubernetes/docs/api-reference/policy/v1beta1/definitions.html +++ b/vendor/k8s.io/kubernetes/docs/api-reference/policy/v1beta1/definitions.html @@ -508,7 +508,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

v1.DeleteOptions

-

DeleteOptions may be provided when deleting an API object

+

DeleteOptions may be provided when deleting an API object.

@@ -1409,7 +1409,7 @@ Examples:
diff --git a/vendor/k8s.io/kubernetes/docs/api-reference/rbac.authorization.k8s.io/v1alpha1/definitions.html b/vendor/k8s.io/kubernetes/docs/api-reference/rbac.authorization.k8s.io/v1alpha1/definitions.html index 89f069f0..6e5877e8 100755 --- a/vendor/k8s.io/kubernetes/docs/api-reference/rbac.authorization.k8s.io/v1alpha1/definitions.html +++ b/vendor/k8s.io/kubernetes/docs/api-reference/rbac.authorization.k8s.io/v1alpha1/definitions.html @@ -464,7 +464,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

v1.DeleteOptions

-

DeleteOptions may be provided when deleting an API object

+

DeleteOptions may be provided when deleting an API object.

@@ -1529,13 +1529,6 @@ Populated by the system when a graceful deletion is requested. Read-only. More i - - - - - - - @@ -1737,7 +1730,7 @@ Examples:
diff --git a/vendor/k8s.io/kubernetes/docs/api-reference/rbac.authorization.k8s.io/v1beta1/definitions.html b/vendor/k8s.io/kubernetes/docs/api-reference/rbac.authorization.k8s.io/v1beta1/definitions.html new file mode 100755 index 00000000..d1c919ec --- /dev/null +++ b/vendor/k8s.io/kubernetes/docs/api-reference/rbac.authorization.k8s.io/v1beta1/definitions.html @@ -0,0 +1,1737 @@ + + + + + + +Top Level API Objects + + + + +
+ +
+

Definitions

+
+
+

v1.APIResourceList

+
+

APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced.

+
+

attributeRestrictions

AttributeRestrictions will vary depending on what the Authorizer/AuthorizationAttributeBuilder pair supports. If the Authorizer does not recognize how to handle the AttributeRestrictions, the Authorizer should report an error.

false

string

apiGroups

APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed.

false

+++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionRequiredSchemaDefault

kind

Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

false

string

apiVersion

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

false

string

groupVersion

groupVersion is the group and version this APIResourceList is for.

true

string

resources

resources contains the name of the resources and if they are namespaced.

true

v1.APIResource array

+ +
+
+

v1.Patch

+
+

Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.

+
+
+
+

v1beta1.ClusterRole

+
+

ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.

+
+ +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionRequiredSchemaDefault

kind

Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

false

string

apiVersion

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

false

string

metadata

Standard object’s metadata.

false

v1.ObjectMeta

rules

Rules holds all the PolicyRules for this ClusterRole

true

v1beta1.PolicyRule array

+ +
+
+

v1.DeleteOptions

+
+

DeleteOptions may be provided when deleting an API object.

+
+ +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionRequiredSchemaDefault

kind

Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

false

string

apiVersion

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

false

string

gracePeriodSeconds

The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.

false

integer (int64)

preconditions

Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.

false

v1.Preconditions

orphanDependents

Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object’s finalizers list.

false

boolean

false

+ +
+
+

v1.ListMeta

+
+

ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.

+
+ +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionRequiredSchemaDefault

selfLink

SelfLink is a URL representing this object. Populated by the system. Read-only.

false

string

resourceVersion

String that identifies the server’s internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency

false

string

+ +
+
+

v1beta1.ClusterRoleBinding

+
+

ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject.

+
+ +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionRequiredSchemaDefault

kind

Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

false

string

apiVersion

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

false

string

metadata

Standard object’s metadata.

false

v1.ObjectMeta

subjects

Subjects holds references to the objects the role applies to.

true

v1beta1.Subject array

roleRef

RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.

true

v1beta1.RoleRef

+ +
+
+

v1beta1.ClusterRoleBindingList

+
+

ClusterRoleBindingList is a collection of ClusterRoleBindings

+
+ +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionRequiredSchemaDefault

kind

Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

false

string

apiVersion

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

false

string

metadata

Standard object’s metadata.

false

v1.ListMeta

items

Items is a list of ClusterRoleBindings

true

v1beta1.ClusterRoleBinding array

+ +
+
+

v1.StatusDetails

+
+

StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined.

+
+ +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionRequiredSchemaDefault

name

The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described).

false

string

group

The group attribute of the resource associated with the status StatusReason.

false

string

kind

The kind attribute of the resource associated with the status StatusReason. On some operations may differ from the requested resource Kind. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

false

string

causes

The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes.

false

v1.StatusCause array

retryAfterSeconds

If specified, the time in seconds before the operation should be retried.

false

integer (int32)

+ +
+
+

v1beta1.ClusterRoleList

+
+

ClusterRoleList is a collection of ClusterRoles

+
+ +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionRequiredSchemaDefault

kind

Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

false

string

apiVersion

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

false

string

metadata

Standard object’s metadata.

false

v1.ListMeta

items

Items is a list of ClusterRoles

true

v1beta1.ClusterRole array

+ +
+
+

v1.Preconditions

+
+

Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.

+
+ +++++++ + + + + + + + + + + + + + + + + + + +
NameDescriptionRequiredSchemaDefault

uid

Specifies the target UID.

false

types.UID

+ +
+
+

v1.Status

+
+

Status is a return value for calls that don’t return other objects.

+
+ +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionRequiredSchemaDefault

kind

Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

false

string

apiVersion

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

false

string

metadata

Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

false

v1.ListMeta

status

Status of the operation. One of: "Success" or "Failure". More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status

false

string

message

A human-readable description of the status of this operation.

false

string

reason

A machine-readable description of why this operation is in the "Failure" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it.

false

string

details

Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.

false

v1.StatusDetails

code

Suggested HTTP return code for this status, 0 if not set.

false

integer (int32)

+ +
+
+

v1.WatchEvent

+ +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionRequiredSchemaDefault

type

true

string

object

true

string

+ +
+
+

v1beta1.RoleList

+
+

RoleList is a collection of Roles

+
+ +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionRequiredSchemaDefault

kind

Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

false

string

apiVersion

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

false

string

metadata

Standard object’s metadata.

false

v1.ListMeta

items

Items is a list of Roles

true

v1beta1.Role array

+ +
+
+

v1.ObjectMeta

+
+

ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.

+
+ +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionRequiredSchemaDefault

name

Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names

false

string

generateName

GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.
+
+If this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).
+
+Applied only if Name is not specified. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#idempotency

false

string

namespace

Namespace defines the space within each name must be unique. An empty namespace is equivalent to the "default" namespace, but "default" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.
+
+Must be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces

false

string

selfLink

SelfLink is a URL representing this object. Populated by the system. Read-only.

false

string

uid

UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.
+
+Populated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids

false

string

resourceVersion

An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.
+
+Populated by the system. Read-only. Value must be treated as opaque by clients and . More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency

false

string

generation

A sequence number representing a specific generation of the desired state. Populated by the system. Read-only.

false

integer (int64)

creationTimestamp

CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.
+
+Populated by the system. Read-only. Null for lists. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata

false

string

deletionTimestamp

DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field. Once set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested.
+
+Populated by the system when a graceful deletion is requested. Read-only. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata

false

string

deletionGracePeriodSeconds

Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only.

false

integer (int64)

labels

Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels

false

object

annotations

Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations

false

object

ownerReferences

List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller.

false

v1.OwnerReference array

finalizers

Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed.

false

string array

clusterName

The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.

false

string

+ +
+
+

v1.OwnerReference

+
+

OwnerReference contains enough information to let you identify an owning object. Currently, an owning object must be in the same namespace, so there is no namespace field.

+
+ +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionRequiredSchemaDefault

apiVersion

API version of the referent.

true

string

kind

Kind of the referent. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

true

string

name

Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names

true

string

uid

UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids

true

string

controller

If true, this reference points to the managing controller.

false

boolean

false

+ +
+
+

v1beta1.Subject

+
+

Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names.

+
+ +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionRequiredSchemaDefault

kind

Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount". If the Authorizer does not recognized the kind value, the Authorizer should report an error.

true

string

apiVersion

APIVersion holds the API group and version of the referenced object.

false

string

name

Name of the object being referenced.

true

string

namespace

Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty the Authorizer should report an error.

false

string

+ +
+
+

v1.APIResource

+
+

APIResource specifies the name of a resource and whether it is namespaced.

+
+ +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionRequiredSchemaDefault

name

name is the name of the resource.

true

string

namespaced

namespaced indicates if a resource is namespaced or not.

true

boolean

false

kind

kind is the kind for the resource (e.g. Foo is the kind for a resource foo)

true

string

verbs

verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy)

true

string array

+ +
+
+

types.UID

+ +
+
+

v1beta1.Role

+
+

Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.

+
+ +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionRequiredSchemaDefault

kind

Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

false

string

apiVersion

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

false

string

metadata

Standard object’s metadata.

false

v1.ObjectMeta

rules

Rules holds all the PolicyRules for this Role

true

v1beta1.PolicyRule array

+ +
+
+

v1.StatusCause

+
+

StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.

+
+ +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionRequiredSchemaDefault

reason

A machine-readable description of the cause of the error. If this value is empty there is no information available.

false

string

message

A human-readable description of the cause of the error. This field may be presented as-is to a reader.

false

string

field

The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. Optional.
+
+Examples:
+ "name" - the field "name" on the current resource
+ "items[0].name" - the field "name" on the first array entry in "items"

false

string

+ +
+
+

v1beta1.PolicyRule

+
+

PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.

+
+ +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionRequiredSchemaDefault

verbs

Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.

true

string array

apiGroups

APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed.

false

string array

resources

Resources is a list of resources this rule applies to. ResourceAll represents all resources.

false

string array

resourceNames

ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.

false

string array

nonResourceURLs

NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both.

false

string array

+ +
+
+

v1beta1.RoleRef

+
+

RoleRef contains information that points to the role being used

+
+ +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionRequiredSchemaDefault

apiGroup

APIGroup is the group for the resource being referenced

true

string

kind

Kind is the type of resource being referenced

true

string

name

Name is the name of resource being referenced

true

string

+ +
+
+

v1beta1.RoleBinding

+
+

RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace.

+
+ +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionRequiredSchemaDefault

kind

Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

false

string

apiVersion

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

false

string

metadata

Standard object’s metadata.

false

v1.ObjectMeta

subjects

Subjects holds references to the objects the role applies to.

true

v1beta1.Subject array

roleRef

RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.

true

v1beta1.RoleRef

+ +
+
+

v1beta1.RoleBindingList

+
+

RoleBindingList is a collection of RoleBindings

+
+ +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionRequiredSchemaDefault

kind

Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

false

string

apiVersion

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

false

string

metadata

Standard object’s metadata.

false

v1.ListMeta

items

Items is a list of RoleBindings

true

v1beta1.RoleBinding array

+ +
+
+

any

+
+

Represents an untyped JSON map - see the description of the field for more info about the structure of this object.

+
+
+
+
+
+ + + \ No newline at end of file diff --git a/vendor/k8s.io/kubernetes/docs/api-reference/rbac.authorization.k8s.io/v1beta1/operations.html b/vendor/k8s.io/kubernetes/docs/api-reference/rbac.authorization.k8s.io/v1beta1/operations.html new file mode 100755 index 00000000..6dcdcb09 --- /dev/null +++ b/vendor/k8s.io/kubernetes/docs/api-reference/rbac.authorization.k8s.io/v1beta1/operations.html @@ -0,0 +1,5990 @@ + + + + + + +Operations + + + + +
+
+

Operations

+
+
+

get available resources

+
+
+
GET /apis/rbac.authorization.k8s.io/v1beta1
+
+
+
+

Responses

+ +++++ + + + + + + + + + + + + + + +
HTTP CodeDescriptionSchema

default

success

v1.APIResourceList

+ +
+
+

Consumes

+
+
    +
  • +

    application/json

    +
  • +
  • +

    application/yaml

    +
  • +
  • +

    application/vnd.kubernetes.protobuf

    +
  • +
+
+
+
+

Produces

+
+
    +
  • +

    application/json

    +
  • +
  • +

    application/yaml

    +
  • +
  • +

    application/vnd.kubernetes.protobuf

    +
  • +
+
+
+
+

Tags

+
+
    +
  • +

    apisrbac.authorization.k8s.iov1beta1

    +
  • +
+
+
+
+
+

list or watch objects of kind ClusterRoleBinding

+
+
+
GET /apis/rbac.authorization.k8s.io/v1beta1/clusterrolebindings
+
+
+
+

Parameters

+ ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

QueryParameter

labelSelector

A selector to restrict the list of returned objects by their labels. Defaults to everything.

false

string

QueryParameter

fieldSelector

A selector to restrict the list of returned objects by their fields. Defaults to everything.

false

string

QueryParameter

watch

Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

false

boolean

QueryParameter

resourceVersion

When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it’s 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.

false

string

QueryParameter

timeoutSeconds

Timeout for the list/watch call.

false

integer (int32)

+ +
+
+

Responses

+ +++++ + + + + + + + + + + + + + + +
HTTP CodeDescriptionSchema

200

success

v1beta1.ClusterRoleBindingList

+ +
+
+

Consumes

+
+
    +
  • +

    /

    +
  • +
+
+
+
+

Produces

+
+
    +
  • +

    application/json

    +
  • +
  • +

    application/yaml

    +
  • +
  • +

    application/vnd.kubernetes.protobuf

    +
  • +
  • +

    application/json;stream=watch

    +
  • +
  • +

    application/vnd.kubernetes.protobuf;stream=watch

    +
  • +
+
+
+
+

Tags

+
+
    +
  • +

    apisrbac.authorization.k8s.iov1beta1

    +
  • +
+
+
+
+
+

delete collection of ClusterRoleBinding

+
+
+
DELETE /apis/rbac.authorization.k8s.io/v1beta1/clusterrolebindings
+
+
+
+

Parameters

+ ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

QueryParameter

labelSelector

A selector to restrict the list of returned objects by their labels. Defaults to everything.

false

string

QueryParameter

fieldSelector

A selector to restrict the list of returned objects by their fields. Defaults to everything.

false

string

QueryParameter

watch

Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

false

boolean

QueryParameter

resourceVersion

When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it’s 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.

false

string

QueryParameter

timeoutSeconds

Timeout for the list/watch call.

false

integer (int32)

+ +
+
+

Responses

+ +++++ + + + + + + + + + + + + + + +
HTTP CodeDescriptionSchema

200

success

v1.Status

+ +
+
+

Consumes

+
+
    +
  • +

    /

    +
  • +
+
+
+
+

Produces

+
+
    +
  • +

    application/json

    +
  • +
  • +

    application/yaml

    +
  • +
  • +

    application/vnd.kubernetes.protobuf

    +
  • +
+
+
+
+

Tags

+
+
    +
  • +

    apisrbac.authorization.k8s.iov1beta1

    +
  • +
+
+
+
+
+

create a ClusterRoleBinding

+
+
+
POST /apis/rbac.authorization.k8s.io/v1beta1/clusterrolebindings
+
+
+
+

Parameters

+ ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

BodyParameter

body

true

v1beta1.ClusterRoleBinding

+ +
+
+

Responses

+ +++++ + + + + + + + + + + + + + + +
HTTP CodeDescriptionSchema

200

success

v1beta1.ClusterRoleBinding

+ +
+
+

Consumes

+
+
    +
  • +

    /

    +
  • +
+
+
+
+

Produces

+
+
    +
  • +

    application/json

    +
  • +
  • +

    application/yaml

    +
  • +
  • +

    application/vnd.kubernetes.protobuf

    +
  • +
+
+
+
+

Tags

+
+
    +
  • +

    apisrbac.authorization.k8s.iov1beta1

    +
  • +
+
+
+
+
+

read the specified ClusterRoleBinding

+
+
+
GET /apis/rbac.authorization.k8s.io/v1beta1/clusterrolebindings/{name}
+
+
+
+

Parameters

+ ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

PathParameter

name

name of the ClusterRoleBinding

true

string

+ +
+
+

Responses

+ +++++ + + + + + + + + + + + + + + +
HTTP CodeDescriptionSchema

200

success

v1beta1.ClusterRoleBinding

+ +
+
+

Consumes

+
+
    +
  • +

    /

    +
  • +
+
+
+
+

Produces

+
+
    +
  • +

    application/json

    +
  • +
  • +

    application/yaml

    +
  • +
  • +

    application/vnd.kubernetes.protobuf

    +
  • +
+
+
+
+

Tags

+
+
    +
  • +

    apisrbac.authorization.k8s.iov1beta1

    +
  • +
+
+
+
+
+

replace the specified ClusterRoleBinding

+
+
+
PUT /apis/rbac.authorization.k8s.io/v1beta1/clusterrolebindings/{name}
+
+
+
+

Parameters

+ ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

BodyParameter

body

true

v1beta1.ClusterRoleBinding

PathParameter

name

name of the ClusterRoleBinding

true

string

+ +
+
+

Responses

+ +++++ + + + + + + + + + + + + + + +
HTTP CodeDescriptionSchema

200

success

v1beta1.ClusterRoleBinding

+ +
+
+

Consumes

+
+
    +
  • +

    /

    +
  • +
+
+
+
+

Produces

+
+
    +
  • +

    application/json

    +
  • +
  • +

    application/yaml

    +
  • +
  • +

    application/vnd.kubernetes.protobuf

    +
  • +
+
+
+
+

Tags

+
+
    +
  • +

    apisrbac.authorization.k8s.iov1beta1

    +
  • +
+
+
+
+
+

delete a ClusterRoleBinding

+
+
+
DELETE /apis/rbac.authorization.k8s.io/v1beta1/clusterrolebindings/{name}
+
+
+
+

Parameters

+ ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

BodyParameter

body

true

v1.DeleteOptions

QueryParameter

gracePeriodSeconds

The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.

false

integer (int32)

QueryParameter

orphanDependents

Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object’s finalizers list.

false

boolean

PathParameter

name

name of the ClusterRoleBinding

true

string

+ +
+
+

Responses

+ +++++ + + + + + + + + + + + + + + +
HTTP CodeDescriptionSchema

200

success

v1.Status

+ +
+
+

Consumes

+
+
    +
  • +

    /

    +
  • +
+
+
+
+

Produces

+
+
    +
  • +

    application/json

    +
  • +
  • +

    application/yaml

    +
  • +
  • +

    application/vnd.kubernetes.protobuf

    +
  • +
+
+
+
+

Tags

+
+
    +
  • +

    apisrbac.authorization.k8s.iov1beta1

    +
  • +
+
+
+
+
+

partially update the specified ClusterRoleBinding

+
+
+
PATCH /apis/rbac.authorization.k8s.io/v1beta1/clusterrolebindings/{name}
+
+
+
+

Parameters

+ ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

BodyParameter

body

true

v1.Patch

PathParameter

name

name of the ClusterRoleBinding

true

string

+ +
+
+

Responses

+ +++++ + + + + + + + + + + + + + + +
HTTP CodeDescriptionSchema

200

success

v1beta1.ClusterRoleBinding

+ +
+
+

Consumes

+
+
    +
  • +

    application/json-patch+json

    +
  • +
  • +

    application/merge-patch+json

    +
  • +
  • +

    application/strategic-merge-patch+json

    +
  • +
+
+
+
+

Produces

+
+
    +
  • +

    application/json

    +
  • +
  • +

    application/yaml

    +
  • +
  • +

    application/vnd.kubernetes.protobuf

    +
  • +
+
+
+
+

Tags

+
+
    +
  • +

    apisrbac.authorization.k8s.iov1beta1

    +
  • +
+
+
+
+
+

list or watch objects of kind ClusterRole

+
+
+
GET /apis/rbac.authorization.k8s.io/v1beta1/clusterroles
+
+
+
+

Parameters

+ ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

QueryParameter

labelSelector

A selector to restrict the list of returned objects by their labels. Defaults to everything.

false

string

QueryParameter

fieldSelector

A selector to restrict the list of returned objects by their fields. Defaults to everything.

false

string

QueryParameter

watch

Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

false

boolean

QueryParameter

resourceVersion

When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it’s 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.

false

string

QueryParameter

timeoutSeconds

Timeout for the list/watch call.

false

integer (int32)

+ +
+
+

Responses

+ +++++ + + + + + + + + + + + + + + +
HTTP CodeDescriptionSchema

200

success

v1beta1.ClusterRoleList

+ +
+
+

Consumes

+
+
    +
  • +

    /

    +
  • +
+
+
+
+

Produces

+
+
    +
  • +

    application/json

    +
  • +
  • +

    application/yaml

    +
  • +
  • +

    application/vnd.kubernetes.protobuf

    +
  • +
  • +

    application/json;stream=watch

    +
  • +
  • +

    application/vnd.kubernetes.protobuf;stream=watch

    +
  • +
+
+
+
+

Tags

+
+
    +
  • +

    apisrbac.authorization.k8s.iov1beta1

    +
  • +
+
+
+
+
+

delete collection of ClusterRole

+
+
+
DELETE /apis/rbac.authorization.k8s.io/v1beta1/clusterroles
+
+
+
+

Parameters

+ ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

QueryParameter

labelSelector

A selector to restrict the list of returned objects by their labels. Defaults to everything.

false

string

QueryParameter

fieldSelector

A selector to restrict the list of returned objects by their fields. Defaults to everything.

false

string

QueryParameter

watch

Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

false

boolean

QueryParameter

resourceVersion

When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it’s 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.

false

string

QueryParameter

timeoutSeconds

Timeout for the list/watch call.

false

integer (int32)

+ +
+
+

Responses

+ +++++ + + + + + + + + + + + + + + +
HTTP CodeDescriptionSchema

200

success

v1.Status

+ +
+
+

Consumes

+
+
    +
  • +

    /

    +
  • +
+
+
+
+

Produces

+
+
    +
  • +

    application/json

    +
  • +
  • +

    application/yaml

    +
  • +
  • +

    application/vnd.kubernetes.protobuf

    +
  • +
+
+
+
+

Tags

+
+
    +
  • +

    apisrbac.authorization.k8s.iov1beta1

    +
  • +
+
+
+
+
+

create a ClusterRole

+
+
+
POST /apis/rbac.authorization.k8s.io/v1beta1/clusterroles
+
+
+
+

Parameters

+ ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

BodyParameter

body

true

v1beta1.ClusterRole

+ +
+
+

Responses

+ +++++ + + + + + + + + + + + + + + +
HTTP CodeDescriptionSchema

200

success

v1beta1.ClusterRole

+ +
+
+

Consumes

+
+
    +
  • +

    /

    +
  • +
+
+
+
+

Produces

+
+
    +
  • +

    application/json

    +
  • +
  • +

    application/yaml

    +
  • +
  • +

    application/vnd.kubernetes.protobuf

    +
  • +
+
+
+
+

Tags

+
+
    +
  • +

    apisrbac.authorization.k8s.iov1beta1

    +
  • +
+
+
+
+
+

read the specified ClusterRole

+
+
+
GET /apis/rbac.authorization.k8s.io/v1beta1/clusterroles/{name}
+
+
+
+

Parameters

+ ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

PathParameter

name

name of the ClusterRole

true

string

+ +
+
+

Responses

+ +++++ + + + + + + + + + + + + + + +
HTTP CodeDescriptionSchema

200

success

v1beta1.ClusterRole

+ +
+
+

Consumes

+
+
    +
  • +

    /

    +
  • +
+
+
+
+

Produces

+
+
    +
  • +

    application/json

    +
  • +
  • +

    application/yaml

    +
  • +
  • +

    application/vnd.kubernetes.protobuf

    +
  • +
+
+
+
+

Tags

+
+
    +
  • +

    apisrbac.authorization.k8s.iov1beta1

    +
  • +
+
+
+
+
+

replace the specified ClusterRole

+
+
+
PUT /apis/rbac.authorization.k8s.io/v1beta1/clusterroles/{name}
+
+
+
+

Parameters

+ ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

BodyParameter

body

true

v1beta1.ClusterRole

PathParameter

name

name of the ClusterRole

true

string

+ +
+
+

Responses

+ +++++ + + + + + + + + + + + + + + +
HTTP CodeDescriptionSchema

200

success

v1beta1.ClusterRole

+ +
+
+

Consumes

+
+
    +
  • +

    /

    +
  • +
+
+
+
+

Produces

+
+
    +
  • +

    application/json

    +
  • +
  • +

    application/yaml

    +
  • +
  • +

    application/vnd.kubernetes.protobuf

    +
  • +
+
+
+
+

Tags

+
+
    +
  • +

    apisrbac.authorization.k8s.iov1beta1

    +
  • +
+
+
+
+
+

delete a ClusterRole

+
+
+
DELETE /apis/rbac.authorization.k8s.io/v1beta1/clusterroles/{name}
+
+
+
+

Parameters

+ ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

BodyParameter

body

true

v1.DeleteOptions

QueryParameter

gracePeriodSeconds

The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.

false

integer (int32)

QueryParameter

orphanDependents

Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object’s finalizers list.

false

boolean

PathParameter

name

name of the ClusterRole

true

string

+ +
+
+

Responses

+ +++++ + + + + + + + + + + + + + + +
HTTP CodeDescriptionSchema

200

success

v1.Status

+ +
+
+

Consumes

+
+
    +
  • +

    /

    +
  • +
+
+
+
+

Produces

+
+
    +
  • +

    application/json

    +
  • +
  • +

    application/yaml

    +
  • +
  • +

    application/vnd.kubernetes.protobuf

    +
  • +
+
+
+
+

Tags

+
+
    +
  • +

    apisrbac.authorization.k8s.iov1beta1

    +
  • +
+
+
+
+
+

partially update the specified ClusterRole

+
+
+
PATCH /apis/rbac.authorization.k8s.io/v1beta1/clusterroles/{name}
+
+
+
+

Parameters

+ ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

BodyParameter

body

true

v1.Patch

PathParameter

name

name of the ClusterRole

true

string

+ +
+
+

Responses

+ +++++ + + + + + + + + + + + + + + +
HTTP CodeDescriptionSchema

200

success

v1beta1.ClusterRole

+ +
+
+

Consumes

+
+
    +
  • +

    application/json-patch+json

    +
  • +
  • +

    application/merge-patch+json

    +
  • +
  • +

    application/strategic-merge-patch+json

    +
  • +
+
+
+
+

Produces

+
+
    +
  • +

    application/json

    +
  • +
  • +

    application/yaml

    +
  • +
  • +

    application/vnd.kubernetes.protobuf

    +
  • +
+
+
+
+

Tags

+
+
    +
  • +

    apisrbac.authorization.k8s.iov1beta1

    +
  • +
+
+
+
+
+

list or watch objects of kind RoleBinding

+
+
+
GET /apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/rolebindings
+
+
+
+

Parameters

+ ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

QueryParameter

labelSelector

A selector to restrict the list of returned objects by their labels. Defaults to everything.

false

string

QueryParameter

fieldSelector

A selector to restrict the list of returned objects by their fields. Defaults to everything.

false

string

QueryParameter

watch

Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

false

boolean

QueryParameter

resourceVersion

When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it’s 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.

false

string

QueryParameter

timeoutSeconds

Timeout for the list/watch call.

false

integer (int32)

PathParameter

namespace

object name and auth scope, such as for teams and projects

true

string

+ +
+
+

Responses

+ +++++ + + + + + + + + + + + + + + +
HTTP CodeDescriptionSchema

200

success

v1beta1.RoleBindingList

+ +
+
+

Consumes

+
+
    +
  • +

    /

    +
  • +
+
+
+
+

Produces

+
+
    +
  • +

    application/json

    +
  • +
  • +

    application/yaml

    +
  • +
  • +

    application/vnd.kubernetes.protobuf

    +
  • +
  • +

    application/json;stream=watch

    +
  • +
  • +

    application/vnd.kubernetes.protobuf;stream=watch

    +
  • +
+
+
+
+

Tags

+
+
    +
  • +

    apisrbac.authorization.k8s.iov1beta1

    +
  • +
+
+
+
+
+

delete collection of RoleBinding

+
+
+
DELETE /apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/rolebindings
+
+
+
+

Parameters

+ ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

QueryParameter

labelSelector

A selector to restrict the list of returned objects by their labels. Defaults to everything.

false

string

QueryParameter

fieldSelector

A selector to restrict the list of returned objects by their fields. Defaults to everything.

false

string

QueryParameter

watch

Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

false

boolean

QueryParameter

resourceVersion

When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it’s 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.

false

string

QueryParameter

timeoutSeconds

Timeout for the list/watch call.

false

integer (int32)

PathParameter

namespace

object name and auth scope, such as for teams and projects

true

string

+ +
+
+

Responses

+ +++++ + + + + + + + + + + + + + + +
HTTP CodeDescriptionSchema

200

success

v1.Status

+ +
+
+

Consumes

+
+
    +
  • +

    /

    +
  • +
+
+
+
+

Produces

+
+
    +
  • +

    application/json

    +
  • +
  • +

    application/yaml

    +
  • +
  • +

    application/vnd.kubernetes.protobuf

    +
  • +
+
+
+
+

Tags

+
+
    +
  • +

    apisrbac.authorization.k8s.iov1beta1

    +
  • +
+
+
+
+
+

create a RoleBinding

+
+
+
POST /apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/rolebindings
+
+
+
+

Parameters

+ ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

BodyParameter

body

true

v1beta1.RoleBinding

PathParameter

namespace

object name and auth scope, such as for teams and projects

true

string

+ +
+
+

Responses

+ +++++ + + + + + + + + + + + + + + +
HTTP CodeDescriptionSchema

200

success

v1beta1.RoleBinding

+ +
+
+

Consumes

+
+
    +
  • +

    /

    +
  • +
+
+
+
+

Produces

+
+
    +
  • +

    application/json

    +
  • +
  • +

    application/yaml

    +
  • +
  • +

    application/vnd.kubernetes.protobuf

    +
  • +
+
+
+
+

Tags

+
+
    +
  • +

    apisrbac.authorization.k8s.iov1beta1

    +
  • +
+
+
+
+
+

read the specified RoleBinding

+
+
+
GET /apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/rolebindings/{name}
+
+
+
+

Parameters

+ ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

PathParameter

namespace

object name and auth scope, such as for teams and projects

true

string

PathParameter

name

name of the RoleBinding

true

string

+ +
+
+

Responses

+ +++++ + + + + + + + + + + + + + + +
HTTP CodeDescriptionSchema

200

success

v1beta1.RoleBinding

+ +
+
+

Consumes

+
+
    +
  • +

    /

    +
  • +
+
+
+
+

Produces

+
+
    +
  • +

    application/json

    +
  • +
  • +

    application/yaml

    +
  • +
  • +

    application/vnd.kubernetes.protobuf

    +
  • +
+
+
+
+

Tags

+
+
    +
  • +

    apisrbac.authorization.k8s.iov1beta1

    +
  • +
+
+
+
+
+

replace the specified RoleBinding

+
+
+
PUT /apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/rolebindings/{name}
+
+
+
+

Parameters

+ ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

BodyParameter

body

true

v1beta1.RoleBinding

PathParameter

namespace

object name and auth scope, such as for teams and projects

true

string

PathParameter

name

name of the RoleBinding

true

string

+ +
+
+

Responses

+ +++++ + + + + + + + + + + + + + + +
HTTP CodeDescriptionSchema

200

success

v1beta1.RoleBinding

+ +
+
+

Consumes

+
+
    +
  • +

    /

    +
  • +
+
+
+
+

Produces

+
+
    +
  • +

    application/json

    +
  • +
  • +

    application/yaml

    +
  • +
  • +

    application/vnd.kubernetes.protobuf

    +
  • +
+
+
+
+

Tags

+
+
    +
  • +

    apisrbac.authorization.k8s.iov1beta1

    +
  • +
+
+
+
+
+

delete a RoleBinding

+
+
+
DELETE /apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/rolebindings/{name}
+
+
+
+

Parameters

+ ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

BodyParameter

body

true

v1.DeleteOptions

QueryParameter

gracePeriodSeconds

The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.

false

integer (int32)

QueryParameter

orphanDependents

Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object’s finalizers list.

false

boolean

PathParameter

namespace

object name and auth scope, such as for teams and projects

true

string

PathParameter

name

name of the RoleBinding

true

string

+ +
+
+

Responses

+ +++++ + + + + + + + + + + + + + + +
HTTP CodeDescriptionSchema

200

success

v1.Status

+ +
+
+

Consumes

+
+
    +
  • +

    /

    +
  • +
+
+
+
+

Produces

+
+
    +
  • +

    application/json

    +
  • +
  • +

    application/yaml

    +
  • +
  • +

    application/vnd.kubernetes.protobuf

    +
  • +
+
+
+
+

Tags

+
+
    +
  • +

    apisrbac.authorization.k8s.iov1beta1

    +
  • +
+
+
+
+
+

partially update the specified RoleBinding

+
+
+
PATCH /apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/rolebindings/{name}
+
+
+
+

Parameters

+ ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

BodyParameter

body

true

v1.Patch

PathParameter

namespace

object name and auth scope, such as for teams and projects

true

string

PathParameter

name

name of the RoleBinding

true

string

+ +
+
+

Responses

+ +++++ + + + + + + + + + + + + + + +
HTTP CodeDescriptionSchema

200

success

v1beta1.RoleBinding

+ +
+
+

Consumes

+
+
    +
  • +

    application/json-patch+json

    +
  • +
  • +

    application/merge-patch+json

    +
  • +
  • +

    application/strategic-merge-patch+json

    +
  • +
+
+
+
+

Produces

+
+
    +
  • +

    application/json

    +
  • +
  • +

    application/yaml

    +
  • +
  • +

    application/vnd.kubernetes.protobuf

    +
  • +
+
+
+
+

Tags

+
+
    +
  • +

    apisrbac.authorization.k8s.iov1beta1

    +
  • +
+
+
+
+
+

list or watch objects of kind Role

+
+
+
GET /apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/roles
+
+
+
+

Parameters

+ ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

QueryParameter

labelSelector

A selector to restrict the list of returned objects by their labels. Defaults to everything.

false

string

QueryParameter

fieldSelector

A selector to restrict the list of returned objects by their fields. Defaults to everything.

false

string

QueryParameter

watch

Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

false

boolean

QueryParameter

resourceVersion

When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it’s 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.

false

string

QueryParameter

timeoutSeconds

Timeout for the list/watch call.

false

integer (int32)

PathParameter

namespace

object name and auth scope, such as for teams and projects

true

string

+ +
+
+

Responses

+ +++++ + + + + + + + + + + + + + + +
HTTP CodeDescriptionSchema

200

success

v1beta1.RoleList

+ +
+
+

Consumes

+
+
    +
  • +

    /

    +
  • +
+
+
+
+

Produces

+
+
    +
  • +

    application/json

    +
  • +
  • +

    application/yaml

    +
  • +
  • +

    application/vnd.kubernetes.protobuf

    +
  • +
  • +

    application/json;stream=watch

    +
  • +
  • +

    application/vnd.kubernetes.protobuf;stream=watch

    +
  • +
+
+
+
+

Tags

+
+
    +
  • +

    apisrbac.authorization.k8s.iov1beta1

    +
  • +
+
+
+
+
+

delete collection of Role

+
+
+
DELETE /apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/roles
+
+
+
+

Parameters

+ ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

QueryParameter

labelSelector

A selector to restrict the list of returned objects by their labels. Defaults to everything.

false

string

QueryParameter

fieldSelector

A selector to restrict the list of returned objects by their fields. Defaults to everything.

false

string

QueryParameter

watch

Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

false

boolean

QueryParameter

resourceVersion

When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it’s 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.

false

string

QueryParameter

timeoutSeconds

Timeout for the list/watch call.

false

integer (int32)

PathParameter

namespace

object name and auth scope, such as for teams and projects

true

string

+ +
+
+

Responses

+ +++++ + + + + + + + + + + + + + + +
HTTP CodeDescriptionSchema

200

success

v1.Status

+ +
+
+

Consumes

+
+
    +
  • +

    /

    +
  • +
+
+
+
+

Produces

+
+
    +
  • +

    application/json

    +
  • +
  • +

    application/yaml

    +
  • +
  • +

    application/vnd.kubernetes.protobuf

    +
  • +
+
+
+
+

Tags

+
+
    +
  • +

    apisrbac.authorization.k8s.iov1beta1

    +
  • +
+
+
+
+
+

create a Role

+
+
+
POST /apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/roles
+
+
+
+

Parameters

+ ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

BodyParameter

body

true

v1beta1.Role

PathParameter

namespace

object name and auth scope, such as for teams and projects

true

string

+ +
+
+

Responses

+ +++++ + + + + + + + + + + + + + + +
HTTP CodeDescriptionSchema

200

success

v1beta1.Role

+ +
+
+

Consumes

+
+
    +
  • +

    /

    +
  • +
+
+
+
+

Produces

+
+
    +
  • +

    application/json

    +
  • +
  • +

    application/yaml

    +
  • +
  • +

    application/vnd.kubernetes.protobuf

    +
  • +
+
+
+
+

Tags

+
+
    +
  • +

    apisrbac.authorization.k8s.iov1beta1

    +
  • +
+
+
+
+
+

read the specified Role

+
+
+
GET /apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/roles/{name}
+
+
+
+

Parameters

+ ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

PathParameter

namespace

object name and auth scope, such as for teams and projects

true

string

PathParameter

name

name of the Role

true

string

+ +
+
+

Responses

+ +++++ + + + + + + + + + + + + + + +
HTTP CodeDescriptionSchema

200

success

v1beta1.Role

+ +
+
+

Consumes

+
+
    +
  • +

    /

    +
  • +
+
+
+
+

Produces

+
+
    +
  • +

    application/json

    +
  • +
  • +

    application/yaml

    +
  • +
  • +

    application/vnd.kubernetes.protobuf

    +
  • +
+
+
+
+

Tags

+
+
    +
  • +

    apisrbac.authorization.k8s.iov1beta1

    +
  • +
+
+
+
+
+

replace the specified Role

+
+
+
PUT /apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/roles/{name}
+
+
+
+

Parameters

+ ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

BodyParameter

body

true

v1beta1.Role

PathParameter

namespace

object name and auth scope, such as for teams and projects

true

string

PathParameter

name

name of the Role

true

string

+ +
+
+

Responses

+ +++++ + + + + + + + + + + + + + + +
HTTP CodeDescriptionSchema

200

success

v1beta1.Role

+ +
+
+

Consumes

+
+
    +
  • +

    /

    +
  • +
+
+
+
+

Produces

+
+
    +
  • +

    application/json

    +
  • +
  • +

    application/yaml

    +
  • +
  • +

    application/vnd.kubernetes.protobuf

    +
  • +
+
+
+
+

Tags

+
+
    +
  • +

    apisrbac.authorization.k8s.iov1beta1

    +
  • +
+
+
+
+
+

delete a Role

+
+
+
DELETE /apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/roles/{name}
+
+
+
+

Parameters

+ ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

BodyParameter

body

true

v1.DeleteOptions

QueryParameter

gracePeriodSeconds

The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.

false

integer (int32)

QueryParameter

orphanDependents

Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object’s finalizers list.

false

boolean

PathParameter

namespace

object name and auth scope, such as for teams and projects

true

string

PathParameter

name

name of the Role

true

string

+ +
+
+

Responses

+ +++++ + + + + + + + + + + + + + + +
HTTP CodeDescriptionSchema

200

success

v1.Status

+ +
+
+

Consumes

+
+
    +
  • +

    /

    +
  • +
+
+
+
+

Produces

+
+
    +
  • +

    application/json

    +
  • +
  • +

    application/yaml

    +
  • +
  • +

    application/vnd.kubernetes.protobuf

    +
  • +
+
+
+
+

Tags

+
+
    +
  • +

    apisrbac.authorization.k8s.iov1beta1

    +
  • +
+
+
+
+
+

partially update the specified Role

+
+
+
PATCH /apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/roles/{name}
+
+
+
+

Parameters

+ ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

BodyParameter

body

true

v1.Patch

PathParameter

namespace

object name and auth scope, such as for teams and projects

true

string

PathParameter

name

name of the Role

true

string

+ +
+
+

Responses

+ +++++ + + + + + + + + + + + + + + +
HTTP CodeDescriptionSchema

200

success

v1beta1.Role

+ +
+
+

Consumes

+
+
    +
  • +

    application/json-patch+json

    +
  • +
  • +

    application/merge-patch+json

    +
  • +
  • +

    application/strategic-merge-patch+json

    +
  • +
+
+
+
+

Produces

+
+
    +
  • +

    application/json

    +
  • +
  • +

    application/yaml

    +
  • +
  • +

    application/vnd.kubernetes.protobuf

    +
  • +
+
+
+
+

Tags

+
+
    +
  • +

    apisrbac.authorization.k8s.iov1beta1

    +
  • +
+
+
+
+
+

list or watch objects of kind RoleBinding

+
+
+
GET /apis/rbac.authorization.k8s.io/v1beta1/rolebindings
+
+
+
+

Parameters

+ ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

QueryParameter

labelSelector

A selector to restrict the list of returned objects by their labels. Defaults to everything.

false

string

QueryParameter

fieldSelector

A selector to restrict the list of returned objects by their fields. Defaults to everything.

false

string

QueryParameter

watch

Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

false

boolean

QueryParameter

resourceVersion

When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it’s 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.

false

string

QueryParameter

timeoutSeconds

Timeout for the list/watch call.

false

integer (int32)

+ +
+
+

Responses

+ +++++ + + + + + + + + + + + + + + +
HTTP CodeDescriptionSchema

200

success

v1beta1.RoleBindingList

+ +
+
+

Consumes

+
+
    +
  • +

    /

    +
  • +
+
+
+
+

Produces

+
+
    +
  • +

    application/json

    +
  • +
  • +

    application/yaml

    +
  • +
  • +

    application/vnd.kubernetes.protobuf

    +
  • +
  • +

    application/json;stream=watch

    +
  • +
  • +

    application/vnd.kubernetes.protobuf;stream=watch

    +
  • +
+
+
+
+

Tags

+
+
    +
  • +

    apisrbac.authorization.k8s.iov1beta1

    +
  • +
+
+
+
+
+

list or watch objects of kind Role

+
+
+
GET /apis/rbac.authorization.k8s.io/v1beta1/roles
+
+
+
+

Parameters

+ ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

QueryParameter

labelSelector

A selector to restrict the list of returned objects by their labels. Defaults to everything.

false

string

QueryParameter

fieldSelector

A selector to restrict the list of returned objects by their fields. Defaults to everything.

false

string

QueryParameter

watch

Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

false

boolean

QueryParameter

resourceVersion

When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it’s 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.

false

string

QueryParameter

timeoutSeconds

Timeout for the list/watch call.

false

integer (int32)

+ +
+
+

Responses

+ +++++ + + + + + + + + + + + + + + +
HTTP CodeDescriptionSchema

200

success

v1beta1.RoleList

+ +
+
+

Consumes

+
+
    +
  • +

    /

    +
  • +
+
+
+
+

Produces

+
+
    +
  • +

    application/json

    +
  • +
  • +

    application/yaml

    +
  • +
  • +

    application/vnd.kubernetes.protobuf

    +
  • +
  • +

    application/json;stream=watch

    +
  • +
  • +

    application/vnd.kubernetes.protobuf;stream=watch

    +
  • +
+
+
+
+

Tags

+
+
    +
  • +

    apisrbac.authorization.k8s.iov1beta1

    +
  • +
+
+
+
+
+

watch individual changes to a list of ClusterRoleBinding

+
+
+
GET /apis/rbac.authorization.k8s.io/v1beta1/watch/clusterrolebindings
+
+
+
+

Parameters

+ ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

QueryParameter

labelSelector

A selector to restrict the list of returned objects by their labels. Defaults to everything.

false

string

QueryParameter

fieldSelector

A selector to restrict the list of returned objects by their fields. Defaults to everything.

false

string

QueryParameter

watch

Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

false

boolean

QueryParameter

resourceVersion

When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it’s 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.

false

string

QueryParameter

timeoutSeconds

Timeout for the list/watch call.

false

integer (int32)

+ +
+
+

Responses

+ +++++ + + + + + + + + + + + + + + +
HTTP CodeDescriptionSchema

200

success

v1.WatchEvent

+ +
+
+

Consumes

+
+
    +
  • +

    /

    +
  • +
+
+
+
+

Produces

+
+
    +
  • +

    application/json

    +
  • +
  • +

    application/yaml

    +
  • +
  • +

    application/vnd.kubernetes.protobuf

    +
  • +
  • +

    application/json;stream=watch

    +
  • +
  • +

    application/vnd.kubernetes.protobuf;stream=watch

    +
  • +
+
+
+
+

Tags

+
+
    +
  • +

    apisrbac.authorization.k8s.iov1beta1

    +
  • +
+
+
+
+
+

watch changes to an object of kind ClusterRoleBinding

+
+
+
GET /apis/rbac.authorization.k8s.io/v1beta1/watch/clusterrolebindings/{name}
+
+
+
+

Parameters

+ ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

QueryParameter

labelSelector

A selector to restrict the list of returned objects by their labels. Defaults to everything.

false

string

QueryParameter

fieldSelector

A selector to restrict the list of returned objects by their fields. Defaults to everything.

false

string

QueryParameter

watch

Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

false

boolean

QueryParameter

resourceVersion

When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it’s 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.

false

string

QueryParameter

timeoutSeconds

Timeout for the list/watch call.

false

integer (int32)

PathParameter

name

name of the ClusterRoleBinding

true

string

+ +
+
+

Responses

+ +++++ + + + + + + + + + + + + + + +
HTTP CodeDescriptionSchema

200

success

v1.WatchEvent

+ +
+
+

Consumes

+
+
    +
  • +

    /

    +
  • +
+
+
+
+

Produces

+
+
    +
  • +

    application/json

    +
  • +
  • +

    application/yaml

    +
  • +
  • +

    application/vnd.kubernetes.protobuf

    +
  • +
  • +

    application/json;stream=watch

    +
  • +
  • +

    application/vnd.kubernetes.protobuf;stream=watch

    +
  • +
+
+
+
+

Tags

+
+
    +
  • +

    apisrbac.authorization.k8s.iov1beta1

    +
  • +
+
+
+
+
+

watch individual changes to a list of ClusterRole

+
+
+
GET /apis/rbac.authorization.k8s.io/v1beta1/watch/clusterroles
+
+
+
+

Parameters

+ ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

QueryParameter

labelSelector

A selector to restrict the list of returned objects by their labels. Defaults to everything.

false

string

QueryParameter

fieldSelector

A selector to restrict the list of returned objects by their fields. Defaults to everything.

false

string

QueryParameter

watch

Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

false

boolean

QueryParameter

resourceVersion

When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it’s 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.

false

string

QueryParameter

timeoutSeconds

Timeout for the list/watch call.

false

integer (int32)

+ +
+
+

Responses

+ +++++ + + + + + + + + + + + + + + +
HTTP CodeDescriptionSchema

200

success

v1.WatchEvent

+ +
+
+

Consumes

+
+
    +
  • +

    /

    +
  • +
+
+
+
+

Produces

+
+
    +
  • +

    application/json

    +
  • +
  • +

    application/yaml

    +
  • +
  • +

    application/vnd.kubernetes.protobuf

    +
  • +
  • +

    application/json;stream=watch

    +
  • +
  • +

    application/vnd.kubernetes.protobuf;stream=watch

    +
  • +
+
+
+
+

Tags

+
+
    +
  • +

    apisrbac.authorization.k8s.iov1beta1

    +
  • +
+
+
+
+
+

watch changes to an object of kind ClusterRole

+
+
+
GET /apis/rbac.authorization.k8s.io/v1beta1/watch/clusterroles/{name}
+
+
+
+

Parameters

+ ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

QueryParameter

labelSelector

A selector to restrict the list of returned objects by their labels. Defaults to everything.

false

string

QueryParameter

fieldSelector

A selector to restrict the list of returned objects by their fields. Defaults to everything.

false

string

QueryParameter

watch

Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

false

boolean

QueryParameter

resourceVersion

When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it’s 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.

false

string

QueryParameter

timeoutSeconds

Timeout for the list/watch call.

false

integer (int32)

PathParameter

name

name of the ClusterRole

true

string

+ +
+
+

Responses

+ +++++ + + + + + + + + + + + + + + +
HTTP CodeDescriptionSchema

200

success

v1.WatchEvent

+ +
+
+

Consumes

+
+
    +
  • +

    /

    +
  • +
+
+
+
+

Produces

+
+
    +
  • +

    application/json

    +
  • +
  • +

    application/yaml

    +
  • +
  • +

    application/vnd.kubernetes.protobuf

    +
  • +
  • +

    application/json;stream=watch

    +
  • +
  • +

    application/vnd.kubernetes.protobuf;stream=watch

    +
  • +
+
+
+
+

Tags

+
+
    +
  • +

    apisrbac.authorization.k8s.iov1beta1

    +
  • +
+
+
+
+
+

watch individual changes to a list of RoleBinding

+
+
+
GET /apis/rbac.authorization.k8s.io/v1beta1/watch/namespaces/{namespace}/rolebindings
+
+
+
+

Parameters

+ ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

QueryParameter

labelSelector

A selector to restrict the list of returned objects by their labels. Defaults to everything.

false

string

QueryParameter

fieldSelector

A selector to restrict the list of returned objects by their fields. Defaults to everything.

false

string

QueryParameter

watch

Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

false

boolean

QueryParameter

resourceVersion

When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it’s 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.

false

string

QueryParameter

timeoutSeconds

Timeout for the list/watch call.

false

integer (int32)

PathParameter

namespace

object name and auth scope, such as for teams and projects

true

string

+ +
+
+

Responses

+ +++++ + + + + + + + + + + + + + + +
HTTP CodeDescriptionSchema

200

success

v1.WatchEvent

+ +
+
+

Consumes

+
+
    +
  • +

    /

    +
  • +
+
+
+
+

Produces

+
+
    +
  • +

    application/json

    +
  • +
  • +

    application/yaml

    +
  • +
  • +

    application/vnd.kubernetes.protobuf

    +
  • +
  • +

    application/json;stream=watch

    +
  • +
  • +

    application/vnd.kubernetes.protobuf;stream=watch

    +
  • +
+
+
+
+

Tags

+
+
    +
  • +

    apisrbac.authorization.k8s.iov1beta1

    +
  • +
+
+
+
+
+

watch changes to an object of kind RoleBinding

+
+
+
GET /apis/rbac.authorization.k8s.io/v1beta1/watch/namespaces/{namespace}/rolebindings/{name}
+
+
+
+

Parameters

+ ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

QueryParameter

labelSelector

A selector to restrict the list of returned objects by their labels. Defaults to everything.

false

string

QueryParameter

fieldSelector

A selector to restrict the list of returned objects by their fields. Defaults to everything.

false

string

QueryParameter

watch

Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

false

boolean

QueryParameter

resourceVersion

When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it’s 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.

false

string

QueryParameter

timeoutSeconds

Timeout for the list/watch call.

false

integer (int32)

PathParameter

namespace

object name and auth scope, such as for teams and projects

true

string

PathParameter

name

name of the RoleBinding

true

string

+ +
+
+

Responses

+ +++++ + + + + + + + + + + + + + + +
HTTP CodeDescriptionSchema

200

success

v1.WatchEvent

+ +
+
+

Consumes

+
+
    +
  • +

    /

    +
  • +
+
+
+
+

Produces

+
+
    +
  • +

    application/json

    +
  • +
  • +

    application/yaml

    +
  • +
  • +

    application/vnd.kubernetes.protobuf

    +
  • +
  • +

    application/json;stream=watch

    +
  • +
  • +

    application/vnd.kubernetes.protobuf;stream=watch

    +
  • +
+
+
+
+

Tags

+
+
    +
  • +

    apisrbac.authorization.k8s.iov1beta1

    +
  • +
+
+
+
+
+

watch individual changes to a list of Role

+
+
+
GET /apis/rbac.authorization.k8s.io/v1beta1/watch/namespaces/{namespace}/roles
+
+
+
+

Parameters

+ ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

QueryParameter

labelSelector

A selector to restrict the list of returned objects by their labels. Defaults to everything.

false

string

QueryParameter

fieldSelector

A selector to restrict the list of returned objects by their fields. Defaults to everything.

false

string

QueryParameter

watch

Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

false

boolean

QueryParameter

resourceVersion

When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it’s 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.

false

string

QueryParameter

timeoutSeconds

Timeout for the list/watch call.

false

integer (int32)

PathParameter

namespace

object name and auth scope, such as for teams and projects

true

string

+ +
+
+

Responses

+ +++++ + + + + + + + + + + + + + + +
HTTP CodeDescriptionSchema

200

success

v1.WatchEvent

+ +
+
+

Consumes

+
+
    +
  • +

    /

    +
  • +
+
+
+
+

Produces

+
+
    +
  • +

    application/json

    +
  • +
  • +

    application/yaml

    +
  • +
  • +

    application/vnd.kubernetes.protobuf

    +
  • +
  • +

    application/json;stream=watch

    +
  • +
  • +

    application/vnd.kubernetes.protobuf;stream=watch

    +
  • +
+
+
+
+

Tags

+
+
    +
  • +

    apisrbac.authorization.k8s.iov1beta1

    +
  • +
+
+
+
+
+

watch changes to an object of kind Role

+
+
+
GET /apis/rbac.authorization.k8s.io/v1beta1/watch/namespaces/{namespace}/roles/{name}
+
+
+
+

Parameters

+ ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

QueryParameter

labelSelector

A selector to restrict the list of returned objects by their labels. Defaults to everything.

false

string

QueryParameter

fieldSelector

A selector to restrict the list of returned objects by their fields. Defaults to everything.

false

string

QueryParameter

watch

Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

false

boolean

QueryParameter

resourceVersion

When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it’s 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.

false

string

QueryParameter

timeoutSeconds

Timeout for the list/watch call.

false

integer (int32)

PathParameter

namespace

object name and auth scope, such as for teams and projects

true

string

PathParameter

name

name of the Role

true

string

+ +
+
+

Responses

+ +++++ + + + + + + + + + + + + + + +
HTTP CodeDescriptionSchema

200

success

v1.WatchEvent

+ +
+
+

Consumes

+
+
    +
  • +

    /

    +
  • +
+
+
+
+

Produces

+
+
    +
  • +

    application/json

    +
  • +
  • +

    application/yaml

    +
  • +
  • +

    application/vnd.kubernetes.protobuf

    +
  • +
  • +

    application/json;stream=watch

    +
  • +
  • +

    application/vnd.kubernetes.protobuf;stream=watch

    +
  • +
+
+
+
+

Tags

+
+
    +
  • +

    apisrbac.authorization.k8s.iov1beta1

    +
  • +
+
+
+
+
+

watch individual changes to a list of RoleBinding

+
+
+
GET /apis/rbac.authorization.k8s.io/v1beta1/watch/rolebindings
+
+
+
+

Parameters

+ ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

QueryParameter

labelSelector

A selector to restrict the list of returned objects by their labels. Defaults to everything.

false

string

QueryParameter

fieldSelector

A selector to restrict the list of returned objects by their fields. Defaults to everything.

false

string

QueryParameter

watch

Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

false

boolean

QueryParameter

resourceVersion

When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it’s 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.

false

string

QueryParameter

timeoutSeconds

Timeout for the list/watch call.

false

integer (int32)

+ +
+
+

Responses

+ +++++ + + + + + + + + + + + + + + +
HTTP CodeDescriptionSchema

200

success

v1.WatchEvent

+ +
+
+

Consumes

+
+
    +
  • +

    /

    +
  • +
+
+
+
+

Produces

+
+
    +
  • +

    application/json

    +
  • +
  • +

    application/yaml

    +
  • +
  • +

    application/vnd.kubernetes.protobuf

    +
  • +
  • +

    application/json;stream=watch

    +
  • +
  • +

    application/vnd.kubernetes.protobuf;stream=watch

    +
  • +
+
+
+
+

Tags

+
+
    +
  • +

    apisrbac.authorization.k8s.iov1beta1

    +
  • +
+
+
+
+
+

watch individual changes to a list of Role

+
+
+
GET /apis/rbac.authorization.k8s.io/v1beta1/watch/roles
+
+
+
+

Parameters

+ ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

QueryParameter

labelSelector

A selector to restrict the list of returned objects by their labels. Defaults to everything.

false

string

QueryParameter

fieldSelector

A selector to restrict the list of returned objects by their fields. Defaults to everything.

false

string

QueryParameter

watch

Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

false

boolean

QueryParameter

resourceVersion

When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it’s 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.

false

string

QueryParameter

timeoutSeconds

Timeout for the list/watch call.

false

integer (int32)

+ +
+
+

Responses

+ +++++ + + + + + + + + + + + + + + +
HTTP CodeDescriptionSchema

200

success

v1.WatchEvent

+ +
+
+

Consumes

+
+
    +
  • +

    /

    +
  • +
+
+
+
+

Produces

+
+
    +
  • +

    application/json

    +
  • +
  • +

    application/yaml

    +
  • +
  • +

    application/vnd.kubernetes.protobuf

    +
  • +
  • +

    application/json;stream=watch

    +
  • +
  • +

    application/vnd.kubernetes.protobuf;stream=watch

    +
  • +
+
+
+
+

Tags

+
+
    +
  • +

    apisrbac.authorization.k8s.iov1beta1

    +
  • +
+
+
+
+
+
+
+ + + \ No newline at end of file diff --git a/vendor/k8s.io/kubernetes/docs/api-reference/storage.k8s.io/v1beta1/definitions.html b/vendor/k8s.io/kubernetes/docs/api-reference/storage.k8s.io/v1beta1/definitions.html index a95ad544..41f0f8a5 100755 --- a/vendor/k8s.io/kubernetes/docs/api-reference/storage.k8s.io/v1beta1/definitions.html +++ b/vendor/k8s.io/kubernetes/docs/api-reference/storage.k8s.io/v1beta1/definitions.html @@ -501,7 +501,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

v1.DeleteOptions

-

DeleteOptions may be provided when deleting an API object

+

DeleteOptions may be provided when deleting an API object.

@@ -1213,7 +1213,7 @@ Examples:
diff --git a/vendor/k8s.io/kubernetes/docs/api-reference/v1/definitions.html b/vendor/k8s.io/kubernetes/docs/api-reference/v1/definitions.html index 7cbfa2cb..284852e7 100755 --- a/vendor/k8s.io/kubernetes/docs/api-reference/v1/definitions.html +++ b/vendor/k8s.io/kubernetes/docs/api-reference/v1/definitions.html @@ -457,9 +457,6 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

v1.PersistentVolumeClaimList

  • -

    v1.DeleteOptions

    -
  • -
  • v1.ComponentStatus

  • @@ -1524,7 +1521,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
  • - + @@ -1536,6 +1533,13 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; } + + + + + + +

    items

    If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error. Paths must be relative and may not contain the .. path or start with ...

    If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the .. path or start with ...

    false

    v1.KeyToPath array

    integer (int32)

    optional

    Specify whether the ConfigMap or it’s keys must be defined

    false

    boolean

    false

    @@ -1704,6 +1708,50 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; } +
    +
    +

    v1.SecretEnvSource

    +
    +

    SecretEnvSource selects a Secret to populate the environment variables with.

    +
    +
    +

    The contents of the target Secret’s Data field will represent the key-value pairs as environment variables.

    +
    + +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameDescriptionRequiredSchemaDefault

    name

    Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names

    false

    string

    optional

    Specify whether the Secret must be defined

    false

    boolean

    false

    +

    v1.ScaleStatus

    @@ -2550,6 +2598,13 @@ Populated by the system when a graceful deletion is requested. Read-only. More i

    v1.ConfigMapEnvSource

    + +

    secretRef

    +

    The Secret to select from

    +

    false

    +

    v1.SecretEnvSource

    + + @@ -3252,7 +3307,7 @@ The resulting set of endpoints can be viewed as:

    items

    -

    If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error. Paths must be relative and may not contain the .. path or start with ...

    +

    If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the .. path or start with ...

    false

    v1.KeyToPath array

    @@ -3264,6 +3319,13 @@ The resulting set of endpoints can be viewed as:

    integer (int32)

    + +

    optional

    +

    Specify whether the Secret or it’s keys must be defined

    +

    false

    +

    boolean

    +

    false

    + @@ -3880,7 +3942,7 @@ The resulting set of endpoints can be viewed as:

    v1.DeleteOptions

    -

    DeleteOptions may be provided when deleting an API object

    +

    DeleteOptions may be provided when deleting an API object.

    @@ -4343,6 +4405,13 @@ The resulting set of endpoints can be viewed as:
    + + + + + + +

    string

    optional

    Specify whether the Secret or it’s key must be defined

    false

    boolean

    false

    @@ -4762,6 +4831,13 @@ The resulting set of endpoints can be viewed as:

    v1.Affinity

    + +

    schedulername

    +

    If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler.

    +

    false

    +

    string

    + + @@ -6329,7 +6405,14 @@ Examples:

    terminationMessagePath

    -

    Optional: Path at which the file to which the container’s termination message will be written is mounted into the container’s filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated.

    +

    Optional: Path at which the file to which the container’s termination message will be written is mounted into the container’s filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated.

    +

    false

    +

    string

    + + + +

    terminationMessagePolicy

    +

    Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.

    false

    string

    @@ -8477,6 +8560,13 @@ Examples:

    string

    + +

    optional

    +

    Specify whether the ConfigMap must be defined

    +

    false

    +

    boolean

    +

    false

    + @@ -8717,6 +8807,13 @@ Examples:

    string

    + +

    optional

    +

    Specify whether the ConfigMap or it’s key must be defined

    +

    false

    +

    boolean

    +

    false

    + @@ -9136,7 +9233,7 @@ Examples:
    diff --git a/vendor/k8s.io/kubernetes/docs/getting-started-guides/logging.md b/vendor/k8s.io/kubernetes/docs/getting-started-guides/logging.md index 79203324..fe231be8 100644 --- a/vendor/k8s.io/kubernetes/docs/getting-started-guides/logging.md +++ b/vendor/k8s.io/kubernetes/docs/getting-started-guides/logging.md @@ -1,4 +1,4 @@ -This file has moved to: http://kubernetes.github.io/docs/getting-started-guides/logging/ +This file has moved to: https://kubernetes.io/docs/user-guide/logging/overview/ diff --git a/vendor/k8s.io/kubernetes/docs/man/man1/kubectl-edit-configmap.1 b/vendor/k8s.io/kubernetes/docs/man/man1/kubectl-edit-configmap.1 new file mode 100644 index 00000000..b6fd7a0f --- /dev/null +++ b/vendor/k8s.io/kubernetes/docs/man/man1/kubectl-edit-configmap.1 @@ -0,0 +1,3 @@ +This file is autogenerated, but we've stopped checking such files into the +repository to reduce the need for rebases. Please run hack/generate-docs.sh to +populate this file. diff --git a/vendor/k8s.io/kubernetes/docs/user-guide/kubectl/kubectl_edit_configmap.md b/vendor/k8s.io/kubernetes/docs/user-guide/kubectl/kubectl_edit_configmap.md new file mode 100644 index 00000000..b8075178 --- /dev/null +++ b/vendor/k8s.io/kubernetes/docs/user-guide/kubectl/kubectl_edit_configmap.md @@ -0,0 +1,7 @@ +This file is autogenerated, but we've stopped checking such files into the +repository to reduce the need for rebases. Please run hack/generate-docs.sh to +populate this file. + + +[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_edit_configmap.md?pixel)]() + diff --git a/vendor/k8s.io/kubernetes/examples/BUILD b/vendor/k8s.io/kubernetes/examples/BUILD index 46bb96cc..5fdb14be 100644 --- a/vendor/k8s.io/kubernetes/examples/BUILD +++ b/vendor/k8s.io/kubernetes/examples/BUILD @@ -50,6 +50,7 @@ go_test( "//plugin/pkg/scheduler/api:go_default_library", "//plugin/pkg/scheduler/api/latest:go_default_library", "//vendor:github.com/golang/glog", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/validation/field", diff --git a/vendor/k8s.io/kubernetes/examples/OWNERS b/vendor/k8s.io/kubernetes/examples/OWNERS index 3dacd67d..30bb8b07 100644 --- a/vendor/k8s.io/kubernetes/examples/OWNERS +++ b/vendor/k8s.io/kubernetes/examples/OWNERS @@ -1,5 +1,8 @@ -assignees: - - bgrant0607 +reviewers: + - brendandburns + - thockin + - zmerlynn +approvers: - brendandburns - thockin - zmerlynn diff --git a/vendor/k8s.io/kubernetes/examples/apiserver/BUILD b/vendor/k8s.io/kubernetes/examples/apiserver/BUILD index 2761d972..38ae7c0e 100644 --- a/vendor/k8s.io/kubernetes/examples/apiserver/BUILD +++ b/vendor/k8s.io/kubernetes/examples/apiserver/BUILD @@ -16,12 +16,12 @@ go_library( "//cmd/libs/go2idl/client-gen/test_apis/testgroup/v1:go_default_library", "//examples/apiserver/rest:go_default_library", "//pkg/api:go_default_library", - "//pkg/genericapiserver:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", "//pkg/genericapiserver/authorizer:go_default_library", - "//pkg/genericapiserver/options:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", + "//pkg/genericapiserver/server:go_default_library", + "//pkg/genericapiserver/server/options:go_default_library", "//pkg/kubeapiserver/options:go_default_library", - "//pkg/registry/generic:go_default_library", "//pkg/storage/storagebackend:go_default_library", "//vendor:github.com/golang/glog", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", diff --git a/vendor/k8s.io/kubernetes/examples/apiserver/apiserver.go b/vendor/k8s.io/kubernetes/examples/apiserver/apiserver.go index c0de9d7b..bf443c98 100644 --- a/vendor/k8s.io/kubernetes/examples/apiserver/apiserver.go +++ b/vendor/k8s.io/kubernetes/examples/apiserver/apiserver.go @@ -24,12 +24,12 @@ import ( "k8s.io/kubernetes/cmd/libs/go2idl/client-gen/test_apis/testgroup/v1" testgroupetcd "k8s.io/kubernetes/examples/apiserver/rest" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/genericapiserver" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" "k8s.io/kubernetes/pkg/genericapiserver/authorizer" - genericoptions "k8s.io/kubernetes/pkg/genericapiserver/options" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" + genericapiserver "k8s.io/kubernetes/pkg/genericapiserver/server" + genericoptions "k8s.io/kubernetes/pkg/genericapiserver/server/options" kubeoptions "k8s.io/kubernetes/pkg/kubeapiserver/options" - "k8s.io/kubernetes/pkg/registry/generic" "k8s.io/kubernetes/pkg/storage/storagebackend" // Install the testgroup API diff --git a/vendor/k8s.io/kubernetes/examples/apiserver/rest/BUILD b/vendor/k8s.io/kubernetes/examples/apiserver/rest/BUILD index ec7e10d1..b8dad676 100644 --- a/vendor/k8s.io/kubernetes/examples/apiserver/rest/BUILD +++ b/vendor/k8s.io/kubernetes/examples/apiserver/rest/BUILD @@ -14,14 +14,14 @@ go_library( deps = [ "//cmd/libs/go2idl/client-gen/test_apis/testgroup:go_default_library", "//pkg/api:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/registry/generic:go_default_library", - "//pkg/registry/generic/registry:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic/registry:go_default_library", "//pkg/storage:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/validation/field", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", "//vendor:k8s.io/apiserver/pkg/storage/names", ], ) diff --git a/vendor/k8s.io/kubernetes/examples/apiserver/rest/reststorage.go b/vendor/k8s.io/kubernetes/examples/apiserver/rest/reststorage.go index 6b597b59..e13461a0 100644 --- a/vendor/k8s.io/kubernetes/examples/apiserver/rest/reststorage.go +++ b/vendor/k8s.io/kubernetes/examples/apiserver/rest/reststorage.go @@ -19,16 +19,16 @@ package rest import ( "fmt" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/validation/field" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/storage/names" "k8s.io/kubernetes/cmd/libs/go2idl/client-gen/test_apis/testgroup" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/registry/generic" - genericregistry "k8s.io/kubernetes/pkg/registry/generic/registry" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + genericregistry "k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry" "k8s.io/kubernetes/pkg/storage" ) diff --git a/vendor/k8s.io/kubernetes/examples/cluster-dns/README.md b/vendor/k8s.io/kubernetes/examples/cluster-dns/README.md index 798e0b97..11f6ba62 100644 --- a/vendor/k8s.io/kubernetes/examples/cluster-dns/README.md +++ b/vendor/k8s.io/kubernetes/examples/cluster-dns/README.md @@ -4,7 +4,7 @@ This is a toy example demonstrating how to use kubernetes DNS. ### Step Zero: Prerequisites -This example assumes that you have forked the repository and [turned up a Kubernetes cluster](../../docs/getting-started-guides/). Make sure DNS is enabled in your setup, see [DNS doc](../../build/kube-dns/). +This example assumes that you have forked the repository and [turned up a Kubernetes cluster](../../docs/getting-started-guides/). Make sure DNS is enabled in your setup, see [DNS doc](https://github.com/kubernetes/dns). ```sh $ cd kubernetes diff --git a/vendor/k8s.io/kubernetes/examples/examples_test.go b/vendor/k8s.io/kubernetes/examples/examples_test.go index 1d970ce6..79131a8f 100644 --- a/vendor/k8s.io/kubernetes/examples/examples_test.go +++ b/vendor/k8s.io/kubernetes/examples/examples_test.go @@ -26,6 +26,8 @@ import ( "testing" "github.com/golang/glog" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/validation/field" @@ -48,7 +50,7 @@ func validateObject(obj runtime.Object) (errors field.ErrorList) { switch t := obj.(type) { case *api.ReplicationController: if t.Namespace == "" { - t.Namespace = api.NamespaceDefault + t.Namespace = metav1.NamespaceDefault } errors = validation.ValidateReplicationController(t) case *api.ReplicationControllerList: @@ -57,7 +59,7 @@ func validateObject(obj runtime.Object) (errors field.ErrorList) { } case *api.Service: if t.Namespace == "" { - t.Namespace = api.NamespaceDefault + t.Namespace = metav1.NamespaceDefault } errors = validation.ValidateService(t) case *api.ServiceList: @@ -66,7 +68,7 @@ func validateObject(obj runtime.Object) (errors field.ErrorList) { } case *api.Pod: if t.Namespace == "" { - t.Namespace = api.NamespaceDefault + t.Namespace = metav1.NamespaceDefault } errors = validation.ValidatePod(t) case *api.PodList: @@ -77,44 +79,44 @@ func validateObject(obj runtime.Object) (errors field.ErrorList) { errors = validation.ValidatePersistentVolume(t) case *api.PersistentVolumeClaim: if t.Namespace == "" { - t.Namespace = api.NamespaceDefault + t.Namespace = metav1.NamespaceDefault } errors = validation.ValidatePersistentVolumeClaim(t) case *api.PodTemplate: if t.Namespace == "" { - t.Namespace = api.NamespaceDefault + t.Namespace = metav1.NamespaceDefault } errors = validation.ValidatePodTemplate(t) case *api.Endpoints: if t.Namespace == "" { - t.Namespace = api.NamespaceDefault + t.Namespace = metav1.NamespaceDefault } errors = validation.ValidateEndpoints(t) case *api.Namespace: errors = validation.ValidateNamespace(t) case *api.Secret: if t.Namespace == "" { - t.Namespace = api.NamespaceDefault + t.Namespace = metav1.NamespaceDefault } errors = validation.ValidateSecret(t) case *api.LimitRange: if t.Namespace == "" { - t.Namespace = api.NamespaceDefault + t.Namespace = metav1.NamespaceDefault } errors = validation.ValidateLimitRange(t) case *api.ResourceQuota: if t.Namespace == "" { - t.Namespace = api.NamespaceDefault + t.Namespace = metav1.NamespaceDefault } errors = validation.ValidateResourceQuota(t) case *extensions.Deployment: if t.Namespace == "" { - t.Namespace = api.NamespaceDefault + t.Namespace = metav1.NamespaceDefault } errors = expvalidation.ValidateDeployment(t) case *batch.Job: if t.Namespace == "" { - t.Namespace = api.NamespaceDefault + t.Namespace = metav1.NamespaceDefault } // Job needs generateSelector called before validation, and job.Validate does this. // See: https://github.com/kubernetes/kubernetes/issues/20951#issuecomment-187787040 @@ -122,17 +124,17 @@ func validateObject(obj runtime.Object) (errors field.ErrorList) { errors = job.Strategy.Validate(nil, t) case *extensions.Ingress: if t.Namespace == "" { - t.Namespace = api.NamespaceDefault + t.Namespace = metav1.NamespaceDefault } errors = expvalidation.ValidateIngress(t) case *extensions.DaemonSet: if t.Namespace == "" { - t.Namespace = api.NamespaceDefault + t.Namespace = metav1.NamespaceDefault } errors = expvalidation.ValidateDaemonSet(t) case *apps.StatefulSet: if t.Namespace == "" { - t.Namespace = api.NamespaceDefault + t.Namespace = metav1.NamespaceDefault } errors = appsvalidation.ValidateStatefulSet(t) default: diff --git a/vendor/k8s.io/kubernetes/examples/guestbook/README.md b/vendor/k8s.io/kubernetes/examples/guestbook/README.md index d6b3beea..10169b74 100644 --- a/vendor/k8s.io/kubernetes/examples/guestbook/README.md +++ b/vendor/k8s.io/kubernetes/examples/guestbook/README.md @@ -103,11 +103,11 @@ Before continuing to the gory details, we also recommend you to read [Quick walk #### Define a Deployment -To start the redis master, use the file `examples/guestbook/redis-master-deployment.yaml`, which describes a single [pod](../../docs/user-guide/pods.md) running a redis key-value server in a container. +To start the redis master, use the file [redis-master-deployment.yaml](redis-master-deployment.yaml), which describes a single [pod](../../docs/user-guide/pods.md) running a redis key-value server in a container. Although we have a single instance of our redis master, we are using a [Deployment](../../docs/user-guide/deployments.md) to enforce that exactly one pod keeps running. E.g., if the node were to go down, the Deployment will ensure that the redis master gets restarted on a healthy node. (In our simplified example, this could result in data loss.) -The file `examples/guestbook/redis-master-deployment.yaml` defines the redis master Deployment: +The file [redis-master-deployment.yaml](redis-master-deployment.yaml) defines the redis master Deployment: @@ -161,7 +161,7 @@ A Kubernetes [Service](../../docs/user-guide/services.md) is a named load balanc Services find the pods to load balance based on the pods' labels. The selector field of the Service description determines which pods will receive the traffic sent to the Service, and the `port` and `targetPort` information defines what port the Service proxy will run at. -The file `examples/guestbook/redis-master-service.yaml` defines the redis master Service: +The file [redis-master-service.yaml](redis-master-deployment.yaml) defines the redis master Service: @@ -233,7 +233,7 @@ This example has been configured to use the DNS service by default. If your cluster does not have the DNS service enabled, then you can use environment variables by setting the `GET_HOSTS_FROM` env value in both -`examples/guestbook/redis-slave-deployment.yaml` and `examples/guestbook/frontend-deployment.yaml` +[redis-slave-deployment.yaml](redis-slave-deployment.yaml) and [frontend-deployment.yaml](frontend-deployment.yaml) from `dns` to `env` before you start up the app. (However, this is unlikely to be necessary. You can check for the DNS service in the list of the cluster's services by running `kubectl --namespace=kube-system get rc -l k8s-app=kube-dns`.) @@ -345,7 +345,7 @@ In Kubernetes, a Deployment is responsible for managing multiple instances of a Just like the master, we want to have a Service to proxy connections to the redis slaves. In this case, in addition to discovery, the slave Service will provide transparent load balancing to web app clients. This time we put the Service and Deployment into one [file](../../docs/user-guide/managing-deployments.md#organizing-resource-configurations). Grouping related objects together in a single file is often better than having separate files. -The specification for the slaves is in `examples/guestbook/all-in-one/redis-slave.yaml`: +The specification for the slaves is in [all-in-one/redis-slave.yaml](all-in-one/redis-slave.yaml): @@ -455,7 +455,7 @@ A frontend pod is a simple PHP server that is configured to talk to either the s Again we'll create a set of replicated frontend pods instantiated by a Deployment — this time, with three replicas. As with the other pods, we now want to create a Service to group the frontend pods. -The Deployment and Service are described in the file `frontend.yaml`: +The Deployment and Service are described in the file [all-in-one/frontend.yaml](all-in-one/frontend.yaml): @@ -529,7 +529,7 @@ spec: For supported cloud providers, such as Google Compute Engine or Google Container Engine, you can specify to use an external load balancer in the service `spec`, to expose the service onto an external load balancer IP. -To do this, uncomment the `type: LoadBalancer` line in the `frontend.yaml` file before you start the service. +To do this, uncomment the `type: LoadBalancer` line in the [all-in-one/frontend.yaml](all-in-one/frontend.yaml) file before you start the service. [See the appendix below](#appendix-accessing-the-guestbook-site-externally) on accessing the guestbook site externally for more details. diff --git a/vendor/k8s.io/kubernetes/examples/https-nginx/BUILD b/vendor/k8s.io/kubernetes/examples/https-nginx/BUILD index 5a9022d8..fe10e2ae 100644 --- a/vendor/k8s.io/kubernetes/examples/https-nginx/BUILD +++ b/vendor/k8s.io/kubernetes/examples/https-nginx/BUILD @@ -21,6 +21,7 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/api/install:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", ], ) diff --git a/vendor/k8s.io/kubernetes/examples/https-nginx/make_secret.go b/vendor/k8s.io/kubernetes/examples/https-nginx/make_secret.go index 055c3cee..8299b504 100644 --- a/vendor/k8s.io/kubernetes/examples/https-nginx/make_secret.go +++ b/vendor/k8s.io/kubernetes/examples/https-nginx/make_secret.go @@ -26,6 +26,7 @@ import ( "io/ioutil" "log" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/api" @@ -57,7 +58,7 @@ func main() { nginxCrt := read(*crt) nginxKey := read(*key) secret := &api.Secret{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "nginxsecret", }, Data: map[string][]byte{ diff --git a/vendor/k8s.io/kubernetes/examples/mysql-wordpress-pd/OWNERS b/vendor/k8s.io/kubernetes/examples/mysql-wordpress-pd/OWNERS index f4d6cdc2..d349c8ee 100644 --- a/vendor/k8s.io/kubernetes/examples/mysql-wordpress-pd/OWNERS +++ b/vendor/k8s.io/kubernetes/examples/mysql-wordpress-pd/OWNERS @@ -1,2 +1,20 @@ -assignees: - - jeffmendoza +approvers: +- jeffmendoza +reviewers: +- thockin +- lavalamp +- brendandburns +- caesarxuchao +- mikedanese +- davidopp +- pmorie +- dchen1107 +- janetkuo +- roberthbailey +- eparis +- mwielgus +- jlowdermilk +- david-mcmahon +- jeffvance +- jeffmendoza +- RichieEscarez diff --git a/vendor/k8s.io/kubernetes/examples/mysql-wordpress-pd/README.md b/vendor/k8s.io/kubernetes/examples/mysql-wordpress-pd/README.md index 2881c0ce..75673d36 100644 --- a/vendor/k8s.io/kubernetes/examples/mysql-wordpress-pd/README.md +++ b/vendor/k8s.io/kubernetes/examples/mysql-wordpress-pd/README.md @@ -67,7 +67,7 @@ this example. * Kubernetes version 1.2 is required due to using newer features, such at PV Claims and Deployments. Run `kubectl version` to see your cluster version. -* [Cluster DNS](../../build/kube-dns/) will be used for service discovery. +* [Cluster DNS](https://github.com/kubernetes/dns) will be used for service discovery. * An [external load balancer](http://kubernetes.io/docs/user-guide/services/#type-loadbalancer) will be used to access WordPress. * [Persistent Volume Claims](http://kubernetes.io/docs/user-guide/persistent-volumes/) diff --git a/vendor/k8s.io/kubernetes/examples/sharing-clusters/BUILD b/vendor/k8s.io/kubernetes/examples/sharing-clusters/BUILD index 80d52acf..65ce957a 100644 --- a/vendor/k8s.io/kubernetes/examples/sharing-clusters/BUILD +++ b/vendor/k8s.io/kubernetes/examples/sharing-clusters/BUILD @@ -20,6 +20,7 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/api:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", ], ) diff --git a/vendor/k8s.io/kubernetes/examples/sharing-clusters/make_secret.go b/vendor/k8s.io/kubernetes/examples/sharing-clusters/make_secret.go index 88cd8aea..4721c116 100644 --- a/vendor/k8s.io/kubernetes/examples/sharing-clusters/make_secret.go +++ b/vendor/k8s.io/kubernetes/examples/sharing-clusters/make_secret.go @@ -23,6 +23,7 @@ import ( "io/ioutil" "log" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/api" ) @@ -50,7 +51,7 @@ func main() { } cfg := read(*kubeconfig) secret := &api.Secret{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: *name, Namespace: *ns, }, diff --git a/vendor/k8s.io/kubernetes/examples/spark/README.md b/vendor/k8s.io/kubernetes/examples/spark/README.md index 9699fbb3..8ea4f6a4 100644 --- a/vendor/k8s.io/kubernetes/examples/spark/README.md +++ b/vendor/k8s.io/kubernetes/examples/spark/README.md @@ -24,7 +24,7 @@ This example assumes - You have a Kubernetes cluster installed and running. - That you have installed the ```kubectl``` command line tool installed in your path and configured to talk to your Kubernetes cluster -- That your Kubernetes cluster is running [kube-dns](../../build/kube-dns/) or an equivalent integration. +- That your Kubernetes cluster is running [kube-dns](https://github.com/kubernetes/dns) or an equivalent integration. Optionally, your Kubernetes cluster should be configured with a Loadbalancer integration (automatically configured via kube-up or GKE) diff --git a/vendor/k8s.io/kubernetes/examples/storage/cassandra/cassandra-statefulset.yaml b/vendor/k8s.io/kubernetes/examples/storage/cassandra/cassandra-statefulset.yaml index d6f3b1ce..489094a2 100644 --- a/vendor/k8s.io/kubernetes/examples/storage/cassandra/cassandra-statefulset.yaml +++ b/vendor/k8s.io/kubernetes/examples/storage/cassandra/cassandra-statefulset.yaml @@ -34,6 +34,10 @@ spec: capabilities: add: - IPC_LOCK + lifecycle: + preStop: + exec: + command: ["/bin/sh", "-c", "PID=$(pidof java) && kill $PID && while ps -p $PID > /dev/null; do sleep 1; done"] env: - name: MAX_HEAP_SIZE value: 512M diff --git a/vendor/k8s.io/kubernetes/federation/BUILD b/vendor/k8s.io/kubernetes/federation/BUILD index 2cf445b2..e82b8a58 100644 --- a/vendor/k8s.io/kubernetes/federation/BUILD +++ b/vendor/k8s.io/kubernetes/federation/BUILD @@ -2,6 +2,8 @@ package(default_visibility = ["//visibility:public"]) licenses(["notice"]) +load("@bazel_tools//tools/build_defs/pkg:pkg.bzl", "pkg_tar") + filegroup( name = "package-srcs", srcs = glob(["**"]), @@ -23,6 +25,7 @@ filegroup( "//federation/cmd/federation-controller-manager:all-srcs", "//federation/cmd/genfeddocs:all-srcs", "//federation/cmd/kubefed:all-srcs", + "//federation/develop:all-srcs", "//federation/pkg/dnsprovider:all-srcs", "//federation/pkg/federation-controller:all-srcs", "//federation/pkg/kubefed:all-srcs", @@ -30,3 +33,12 @@ filegroup( ], tags = ["automanaged"], ) + +pkg_tar( + name = "release", + files = glob([ + "deploy/**", + "manifests/**", + ]) + ["//federation/cluster:all-srcs"], + package_dir = "federation", +) diff --git a/vendor/k8s.io/kubernetes/federation/OWNERS b/vendor/k8s.io/kubernetes/federation/OWNERS index a3de529f..95a79198 100644 --- a/vendor/k8s.io/kubernetes/federation/OWNERS +++ b/vendor/k8s.io/kubernetes/federation/OWNERS @@ -1,6 +1,13 @@ -assignees: - - quinton-hoole - - madhusudancs - - mml - - nikhiljindal +reviewers: - colhom + - csbell + - irfanurrehman + - madhusudancs + - mwielgus + - nikhiljindal + - shashidharatd +approvers: + - csbell + - madhusudancs + - mwielgus + - nikhiljindal diff --git a/vendor/k8s.io/kubernetes/federation/apis/core/BUILD b/vendor/k8s.io/kubernetes/federation/apis/core/BUILD index 3a022c04..e16cca85 100644 --- a/vendor/k8s.io/kubernetes/federation/apis/core/BUILD +++ b/vendor/k8s.io/kubernetes/federation/apis/core/BUILD @@ -11,15 +11,12 @@ go_library( name = "go_default_library", srcs = [ "conversion.go", - "defaults.go", "register.go", ], tags = ["automanaged"], deps = [ "//pkg/api:go_default_library", - "//pkg/fields:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", - "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/runtime/serializer", diff --git a/vendor/k8s.io/kubernetes/federation/apis/core/install/install.go b/vendor/k8s.io/kubernetes/federation/apis/core/install/install.go index ef75d2f4..b93f383c 100644 --- a/vendor/k8s.io/kubernetes/federation/apis/core/install/install.go +++ b/vendor/k8s.io/kubernetes/federation/apis/core/install/install.go @@ -99,7 +99,7 @@ func newRESTMapper(externalVersions []schema.GroupVersion) meta.RESTMapper { "DeleteOptions", "Status") - mapper := api.NewDefaultRESTMapperFromScheme(externalVersions, interfacesFor, importPrefix, ignoredKinds, rootScoped, core.Scheme) + mapper := meta.NewDefaultRESTMapperFromScheme(externalVersions, interfacesFor, importPrefix, ignoredKinds, rootScoped, core.Scheme) // setup aliases for groups of resources mapper.AddResourceAlias("all", userResources...) diff --git a/vendor/k8s.io/kubernetes/federation/apis/core/register.go b/vendor/k8s.io/kubernetes/federation/apis/core/register.go index c75e7e5b..195d8b99 100644 --- a/vendor/k8s.io/kubernetes/federation/apis/core/register.go +++ b/vendor/k8s.io/kubernetes/federation/apis/core/register.go @@ -54,7 +54,7 @@ func Resource(resource string) schema.GroupResource { } var ( - SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, addDefaultingFuncs, addConversionFuncs) + SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, addConversionFuncs) AddToScheme = SchemeBuilder.AddToScheme ) @@ -67,8 +67,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { &api.Service{}, &api.Namespace{}, &api.NamespaceList{}, - &api.ListOptions{}, - &api.DeleteOptions{}, &api.Secret{}, &api.SecretList{}, &api.Event{}, @@ -79,7 +77,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { // Register Unversioned types under their own special group scheme.AddUnversionedTypes(Unversioned, - &metav1.ExportOptions{}, &metav1.Status{}, &metav1.APIVersions{}, &metav1.APIGroupList{}, diff --git a/vendor/k8s.io/kubernetes/federation/apis/core/v1/register.go b/vendor/k8s.io/kubernetes/federation/apis/core/v1/register.go index 60ffe080..4c6af575 100644 --- a/vendor/k8s.io/kubernetes/federation/apis/core/v1/register.go +++ b/vendor/k8s.io/kubernetes/federation/apis/core/v1/register.go @@ -41,8 +41,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { &v1.Namespace{}, &v1.NamespaceList{}, &v1.ServiceList{}, - &v1.ListOptions{}, - &v1.DeleteOptions{}, &v1.Secret{}, &v1.SecretList{}, &v1.Event{}, diff --git a/vendor/k8s.io/kubernetes/federation/apis/federation/install/install.go b/vendor/k8s.io/kubernetes/federation/apis/federation/install/install.go index 2396cf2b..5ce961d4 100644 --- a/vendor/k8s.io/kubernetes/federation/apis/federation/install/install.go +++ b/vendor/k8s.io/kubernetes/federation/apis/federation/install/install.go @@ -92,7 +92,7 @@ func newRESTMapper(externalVersions []schema.GroupVersion) meta.RESTMapper { ignoredKinds := sets.NewString() - return api.NewDefaultRESTMapper(externalVersions, interfacesFor, importPrefix, ignoredKinds, rootScoped) + return meta.NewDefaultRESTMapperFromScheme(externalVersions, interfacesFor, importPrefix, ignoredKinds, rootScoped, api.Scheme) } // interfacesFor returns the default Codec and ResourceVersioner for a given version diff --git a/vendor/k8s.io/kubernetes/federation/apis/federation/install/install_test.go b/vendor/k8s.io/kubernetes/federation/apis/federation/install/install_test.go index 1f6653ad..393bedd2 100644 --- a/vendor/k8s.io/kubernetes/federation/apis/federation/install/install_test.go +++ b/vendor/k8s.io/kubernetes/federation/apis/federation/install/install_test.go @@ -28,7 +28,7 @@ import ( ) func TestResourceVersioner(t *testing.T) { - cluster := federation.Cluster{ObjectMeta: api.ObjectMeta{ResourceVersion: "10"}} + cluster := federation.Cluster{ObjectMeta: metav1.ObjectMeta{ResourceVersion: "10"}} version, err := accessor.ResourceVersion(&cluster) if err != nil { t.Fatalf("unexpected error: %v", err) @@ -105,7 +105,7 @@ func TestRESTMapper(t *testing.T) { t.Errorf("unexpected: %#v, expected: %#v", mapping, interfaces) } - rc := &federation.Cluster{ObjectMeta: api.ObjectMeta{Name: "foo"}} + rc := &federation.Cluster{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} name, err := mapping.MetadataAccessor.Name(rc) if err != nil { t.Errorf("unexpected error: %v", err) diff --git a/vendor/k8s.io/kubernetes/federation/apis/federation/register.go b/vendor/k8s.io/kubernetes/federation/apis/federation/register.go index a99744ce..78f54810 100644 --- a/vendor/k8s.io/kubernetes/federation/apis/federation/register.go +++ b/vendor/k8s.io/kubernetes/federation/apis/federation/register.go @@ -19,7 +19,6 @@ package federation import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/api" ) // GroupName is the group name use in this package @@ -47,8 +46,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &Cluster{}, &ClusterList{}, - &api.ListOptions{}, - &api.DeleteOptions{}, ) return nil } diff --git a/vendor/k8s.io/kubernetes/federation/apis/federation/types.go b/vendor/k8s.io/kubernetes/federation/apis/federation/types.go index fdd32fa1..fb83be48 100644 --- a/vendor/k8s.io/kubernetes/federation/apis/federation/types.go +++ b/vendor/k8s.io/kubernetes/federation/apis/federation/types.go @@ -99,7 +99,7 @@ type Cluster struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - api.ObjectMeta + metav1.ObjectMeta // Spec defines the behavior of the Cluster. // +optional diff --git a/vendor/k8s.io/kubernetes/federation/apis/federation/v1beta1/generated.pb.go b/vendor/k8s.io/kubernetes/federation/apis/federation/v1beta1/generated.pb.go index 1de1fe65..6e36ab72 100644 --- a/vendor/k8s.io/kubernetes/federation/apis/federation/v1beta1/generated.pb.go +++ b/vendor/k8s.io/kubernetes/federation/apis/federation/v1beta1/generated.pb.go @@ -468,7 +468,7 @@ func (this *Cluster) String() string { return "nil" } s := strings.Join([]string{`&Cluster{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ClusterSpec", "ClusterSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ClusterStatus", "ClusterStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -1487,56 +1487,56 @@ var ( ) var fileDescriptorGenerated = []byte{ - // 806 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xa4, 0x54, 0xcd, 0x6a, 0xeb, 0x46, - 0x14, 0xb6, 0xfc, 0x7b, 0x3d, 0xa9, 0xdb, 0xcb, 0xd0, 0x82, 0xeb, 0x85, 0x7c, 0x31, 0xa5, 0xf8, - 0x96, 0x56, 0xc2, 0xa6, 0x94, 0x0b, 0xa5, 0x85, 0x2b, 0x5f, 0x0a, 0x01, 0x87, 0x94, 0x49, 0x28, - 0x25, 0x14, 0x8a, 0x2c, 0x1f, 0x2b, 0xaa, 0xad, 0x1f, 0x66, 0x46, 0x06, 0x67, 0xd5, 0x07, 0xe8, - 0xa2, 0x0f, 0xd1, 0x37, 0x28, 0x7d, 0x87, 0xec, 0x9a, 0x45, 0x17, 0x59, 0x99, 0xc6, 0x7d, 0x8b, - 0xac, 0xca, 0x8c, 0x46, 0xb2, 0x15, 0xc5, 0x69, 0x6f, 0xb2, 0xd3, 0x39, 0x3a, 0xe7, 0xfb, 0xbe, - 0x39, 0x7f, 0xe8, 0xcd, 0xfc, 0x15, 0x33, 0xbc, 0xd0, 0x9c, 0xc7, 0x13, 0xa0, 0x01, 0x70, 0x60, - 0xe6, 0x0c, 0xa6, 0x40, 0x6d, 0xee, 0x85, 0x81, 0x69, 0x47, 0x5e, 0xce, 0x5e, 0x0e, 0x26, 0xc0, - 0xed, 0x81, 0xe9, 0x42, 0x20, 0x5c, 0x30, 0x35, 0x22, 0x1a, 0xf2, 0x10, 0x7f, 0x9e, 0xa0, 0x18, - 0x5b, 0x14, 0x63, 0x9b, 0x65, 0x08, 0x94, 0x5d, 0x5b, 0xa1, 0x74, 0x3e, 0x73, 0x3d, 0x7e, 0x1e, - 0x4f, 0x0c, 0x27, 0xf4, 0x4d, 0x37, 0x74, 0x43, 0x53, 0x82, 0x4d, 0xe2, 0x99, 0xb4, 0xa4, 0x21, - 0xbf, 0x12, 0x92, 0x8e, 0x22, 0x11, 0xa2, 0x7c, 0xdb, 0x39, 0xf7, 0x02, 0xa0, 0x2b, 0x33, 0x9a, - 0xbb, 0x89, 0x4a, 0x1f, 0xb8, 0x6d, 0x2e, 0x0b, 0xd2, 0x3a, 0xe6, 0xbe, 0x2c, 0x1a, 0x07, 0xdc, - 0xf3, 0xa1, 0x90, 0xf0, 0xc5, 0x7f, 0x25, 0x30, 0xe7, 0x1c, 0x7c, 0xbb, 0x90, 0x37, 0x2c, 0x56, - 0x52, 0x89, 0x33, 0x29, 0xb0, 0x30, 0xa6, 0x4e, 0x91, 0xeb, 0xd3, 0xfd, 0x39, 0xf7, 0x3c, 0x65, - 0x70, 0x7f, 0x74, 0xcc, 0xbd, 0x85, 0xe9, 0x05, 0x9c, 0x71, 0x7a, 0x37, 0xa5, 0xf7, 0x47, 0x19, - 0x35, 0x46, 0x8b, 0x98, 0x71, 0xa0, 0xf8, 0x7b, 0xf4, 0x4c, 0x14, 0x69, 0x6a, 0x73, 0xbb, 0xad, - 0xbd, 0xd0, 0xfa, 0x07, 0xc3, 0xbe, 0x51, 0xec, 0x5b, 0x34, 0x77, 0x45, 0xc3, 0x8c, 0xe5, 0xc0, - 0x38, 0x9e, 0xfc, 0x04, 0x0e, 0x3f, 0x02, 0x6e, 0x5b, 0xf8, 0x72, 0xdd, 0x2d, 0x6d, 0xd6, 0x5d, - 0xb4, 0xf5, 0x91, 0x0c, 0x0d, 0x3b, 0xa8, 0xca, 0x22, 0x70, 0xda, 0x65, 0x89, 0xfa, 0xda, 0x78, - 0xcc, 0x34, 0x18, 0x4a, 0xe6, 0x49, 0x04, 0x8e, 0xf5, 0x8e, 0xa2, 0xab, 0x0a, 0x8b, 0x48, 0x70, - 0x3c, 0x47, 0x75, 0xc6, 0x6d, 0x1e, 0xb3, 0x76, 0x45, 0xd2, 0x8c, 0x9e, 0x46, 0x23, 0xa1, 0xac, - 0x77, 0x15, 0x51, 0x3d, 0xb1, 0x89, 0xa2, 0xe8, 0x5d, 0x57, 0xd0, 0x73, 0x15, 0x39, 0x0a, 0x83, - 0xa9, 0x27, 0x20, 0xf0, 0x2b, 0x54, 0xe5, 0xab, 0x08, 0x64, 0xf1, 0x9a, 0xd6, 0x47, 0xa9, 0xc6, - 0xd3, 0x55, 0x04, 0xb7, 0xeb, 0xee, 0xfb, 0x77, 0xe3, 0x85, 0x9f, 0xc8, 0x0c, 0xfc, 0x5d, 0xa6, - 0xbd, 0x2c, 0x73, 0xbf, 0xce, 0xd3, 0xde, 0xae, 0xbb, 0x0f, 0x4e, 0x82, 0x91, 0x61, 0xe6, 0x65, - 0x62, 0x17, 0xb5, 0x16, 0x36, 0xe3, 0xdf, 0xd2, 0x70, 0x02, 0xa7, 0x9e, 0x0f, 0xaa, 0x34, 0x9f, - 0xa4, 0xa5, 0xd9, 0x9d, 0xe1, 0xb4, 0xb3, 0xcc, 0x10, 0x7d, 0x13, 0xfd, 0x15, 0x19, 0xd6, 0x07, - 0x4a, 0x4a, 0x6b, 0xbc, 0x0b, 0x44, 0xf2, 0xb8, 0x78, 0x89, 0xb0, 0x70, 0x9c, 0x52, 0x3b, 0x60, - 0xc9, 0xe3, 0x04, 0x5b, 0xf5, 0xad, 0xd9, 0x3a, 0x8a, 0x0d, 0x8f, 0x0b, 0x68, 0xe4, 0x1e, 0x06, - 0xfc, 0x31, 0xaa, 0x53, 0xb0, 0x59, 0x18, 0xb4, 0x6b, 0xb2, 0x70, 0x59, 0xbf, 0x88, 0xf4, 0x12, - 0xf5, 0x17, 0xbf, 0x44, 0x0d, 0x1f, 0x18, 0xb3, 0x5d, 0x68, 0xd7, 0x65, 0xe0, 0x7b, 0x2a, 0xb0, - 0x71, 0x94, 0xb8, 0x49, 0xfa, 0xbf, 0xf7, 0xa7, 0x86, 0x0e, 0x54, 0xab, 0xc6, 0x1e, 0xe3, 0xf8, - 0x87, 0xc2, 0x5a, 0x18, 0xff, 0xef, 0x41, 0x22, 0x5b, 0x2e, 0xc7, 0x73, 0xc5, 0xf5, 0x2c, 0xf5, - 0xec, 0xac, 0xc6, 0x04, 0xd5, 0x3c, 0x0e, 0xbe, 0x68, 0x7c, 0xa5, 0x7f, 0x30, 0xfc, 0xea, 0x49, - 0x43, 0x6b, 0xb5, 0x14, 0x53, 0xed, 0x50, 0x60, 0x92, 0x04, 0xba, 0xf7, 0x5b, 0x39, 0x7b, 0x91, - 0xd8, 0x17, 0xfc, 0xbb, 0x86, 0x3a, 0x0c, 0xe8, 0x12, 0xe8, 0xeb, 0xe9, 0x94, 0x02, 0x63, 0xd6, - 0x6a, 0xb4, 0xf0, 0x20, 0xe0, 0xa3, 0xc3, 0x37, 0x84, 0xb5, 0x35, 0xa9, 0xe4, 0xf8, 0x71, 0x4a, - 0x4e, 0xf6, 0xe1, 0x5a, 0x3d, 0xa5, 0xad, 0xb3, 0x37, 0x84, 0x91, 0x07, 0x64, 0xe1, 0x1f, 0x51, - 0x93, 0x81, 0x43, 0x81, 0x13, 0x98, 0xa9, 0x4b, 0x32, 0x7c, 0xf8, 0x3e, 0x8d, 0x43, 0xc7, 0x5e, - 0x24, 0x07, 0x89, 0xc0, 0x0c, 0x28, 0x04, 0x0e, 0x58, 0xad, 0xcd, 0xba, 0xdb, 0x3c, 0x49, 0x81, - 0xc8, 0x16, 0xb3, 0xf7, 0x97, 0x86, 0x5a, 0xb9, 0xed, 0xc7, 0x17, 0x08, 0x39, 0xe9, 0x66, 0xa5, - 0x75, 0xf9, 0xe6, 0x49, 0x1d, 0xca, 0x16, 0x75, 0x7b, 0x31, 0x33, 0x17, 0x23, 0x3b, 0x6c, 0xb8, - 0x8b, 0x6a, 0x17, 0x61, 0x00, 0xac, 0x5d, 0x7b, 0x51, 0xe9, 0x37, 0xad, 0xa6, 0xe8, 0xea, 0x99, - 0x70, 0x90, 0xc4, 0x9f, 0x8c, 0xbe, 0xeb, 0x85, 0x81, 0x9a, 0xe8, 0x9d, 0xd1, 0x17, 0x5e, 0xa2, - 0xfe, 0xf6, 0x7e, 0xd1, 0xd0, 0x87, 0x7b, 0x4b, 0x8e, 0x87, 0x08, 0x39, 0x99, 0xa5, 0x2e, 0xd7, - 0x56, 0x5a, 0xf6, 0x87, 0xec, 0x44, 0xe1, 0x2f, 0x51, 0x2b, 0xd7, 0x27, 0x75, 0xb4, 0xb2, 0x4b, - 0x91, 0x63, 0x23, 0xf9, 0x58, 0xeb, 0xe5, 0xe5, 0x8d, 0x5e, 0xba, 0xba, 0xd1, 0x4b, 0xd7, 0x37, - 0x7a, 0xe9, 0xe7, 0x8d, 0xae, 0x5d, 0x6e, 0x74, 0xed, 0x6a, 0xa3, 0x6b, 0x7f, 0x6f, 0x74, 0xed, - 0xd7, 0x7f, 0xf4, 0xd2, 0x59, 0x43, 0xd5, 0xec, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x15, 0xe8, - 0xc4, 0x9a, 0x7c, 0x08, 0x00, 0x00, + // 802 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xa4, 0x54, 0x4d, 0x6b, 0x33, 0x55, + 0x14, 0xce, 0xe4, 0xb3, 0xb9, 0x35, 0x5a, 0x2e, 0x0a, 0x31, 0x8b, 0x49, 0x09, 0x22, 0xad, 0xe8, + 0x8c, 0x09, 0x22, 0x05, 0x51, 0xe8, 0xa4, 0x08, 0x85, 0x96, 0xca, 0x6d, 0x71, 0x51, 0x04, 0x9d, + 0x4c, 0x4e, 0xa6, 0x63, 0x32, 0x1f, 0xdc, 0x7b, 0x27, 0x90, 0xae, 0xfc, 0x01, 0x2e, 0xfc, 0x11, + 0xfe, 0x03, 0xd7, 0xee, 0xbb, 0xb3, 0x0b, 0x17, 0x5d, 0x05, 0x1b, 0xff, 0x45, 0x57, 0x2f, 0xf7, + 0xce, 0xcd, 0x24, 0xd3, 0x24, 0x7d, 0xfb, 0xb6, 0xbb, 0x39, 0x67, 0xce, 0x79, 0x9e, 0xe7, 0x9e, + 0x2f, 0x74, 0x34, 0x3c, 0x60, 0x86, 0x17, 0x9a, 0xc3, 0xb8, 0x07, 0x34, 0x00, 0x0e, 0xcc, 0x1c, + 0x40, 0x1f, 0xa8, 0xcd, 0xbd, 0x30, 0x30, 0xed, 0xc8, 0xcb, 0xd8, 0xe3, 0x76, 0x0f, 0xb8, 0xdd, + 0x36, 0x5d, 0x08, 0x84, 0x0b, 0xfa, 0x46, 0x44, 0x43, 0x1e, 0xe2, 0xaf, 0x12, 0x14, 0x63, 0x81, + 0x62, 0x2c, 0xb2, 0x0c, 0x81, 0xb2, 0x6c, 0x2b, 0x94, 0xc6, 0x17, 0xae, 0xc7, 0xaf, 0xe2, 0x9e, + 0xe1, 0x84, 0xbe, 0xe9, 0x86, 0x6e, 0x68, 0x4a, 0xb0, 0x5e, 0x3c, 0x90, 0x96, 0x34, 0xe4, 0x57, + 0x42, 0xd2, 0x50, 0x24, 0x42, 0x94, 0x6f, 0x3b, 0x57, 0x5e, 0x00, 0x74, 0x62, 0x46, 0x43, 0x37, + 0x51, 0xe9, 0x03, 0xb7, 0xcd, 0xf1, 0x8a, 0xb4, 0x86, 0xb9, 0x29, 0x8b, 0xc6, 0x01, 0xf7, 0x7c, + 0x58, 0x49, 0xf8, 0xfa, 0x6d, 0x09, 0xcc, 0xb9, 0x02, 0xdf, 0x5e, 0xc9, 0xeb, 0xac, 0x56, 0x52, + 0x89, 0x33, 0x29, 0xb0, 0x30, 0xa6, 0xce, 0x2a, 0xd7, 0xe7, 0x9b, 0x73, 0xd6, 0x3c, 0xa5, 0xbd, + 0x3e, 0x3a, 0xe6, 0xde, 0xc8, 0xf4, 0x02, 0xce, 0x38, 0x7d, 0x9c, 0xd2, 0xfa, 0x3b, 0x8f, 0x2a, + 0xdd, 0x51, 0xcc, 0x38, 0x50, 0xfc, 0x0b, 0xda, 0x12, 0x45, 0xea, 0xdb, 0xdc, 0xae, 0x6b, 0xbb, + 0xda, 0xde, 0x76, 0xe7, 0x4b, 0x43, 0xf5, 0x6d, 0xf9, 0xad, 0x46, 0x34, 0x74, 0x93, 0x96, 0x89, + 0x68, 0x63, 0xdc, 0x36, 0xce, 0x7a, 0xbf, 0x82, 0xc3, 0x4f, 0x81, 0xdb, 0x16, 0xbe, 0x99, 0x36, + 0x73, 0xb3, 0x69, 0x13, 0x2d, 0x7c, 0x24, 0x45, 0xc5, 0x0e, 0x2a, 0xb2, 0x08, 0x9c, 0x7a, 0x5e, + 0xa2, 0x1f, 0x1a, 0x2f, 0x99, 0x0a, 0x43, 0xc9, 0x3d, 0x8f, 0xc0, 0xb1, 0xde, 0x53, 0x74, 0x45, + 0x61, 0x11, 0x09, 0x8e, 0x87, 0xa8, 0xcc, 0xb8, 0xcd, 0x63, 0x56, 0x2f, 0x48, 0x9a, 0xee, 0xeb, + 0x68, 0x24, 0x94, 0xf5, 0xbe, 0x22, 0x2a, 0x27, 0x36, 0x51, 0x14, 0xad, 0xbb, 0x02, 0xda, 0x51, + 0x91, 0xdd, 0x30, 0xe8, 0x7b, 0x02, 0x02, 0x1f, 0xa0, 0x22, 0x9f, 0x44, 0x20, 0x8b, 0x58, 0xb5, + 0x3e, 0x99, 0x6b, 0xbc, 0x98, 0x44, 0xf0, 0x30, 0x6d, 0x7e, 0xf8, 0x38, 0x5e, 0xf8, 0x89, 0xcc, + 0xc0, 0x3f, 0xa6, 0xda, 0xf3, 0x32, 0xf7, 0xbb, 0x2c, 0xed, 0xc3, 0xb4, 0xf9, 0xe4, 0x44, 0x18, + 0x29, 0x66, 0x56, 0x26, 0x76, 0x51, 0x6d, 0x64, 0x33, 0xfe, 0x03, 0x0d, 0x7b, 0x70, 0xe1, 0xf9, + 0xa0, 0x4a, 0xf3, 0xd9, 0xf3, 0xfa, 0x2b, 0x32, 0xac, 0x8f, 0x94, 0x94, 0xda, 0xc9, 0x32, 0x10, + 0xc9, 0xe2, 0xe2, 0x31, 0xc2, 0xc2, 0x71, 0x41, 0xed, 0x80, 0x25, 0x8f, 0x13, 0x6c, 0xc5, 0x77, + 0x66, 0x6b, 0x28, 0x36, 0x7c, 0xb2, 0x82, 0x46, 0xd6, 0x30, 0xe0, 0x4f, 0x51, 0x99, 0x82, 0xcd, + 0xc2, 0xa0, 0x5e, 0x92, 0x85, 0x4b, 0xfb, 0x45, 0xa4, 0x97, 0xa8, 0xbf, 0x78, 0x1f, 0x55, 0x7c, + 0x60, 0xcc, 0x76, 0xa1, 0x5e, 0x96, 0x81, 0x1f, 0xa8, 0xc0, 0xca, 0x69, 0xe2, 0x26, 0xf3, 0xff, + 0xad, 0x7f, 0x34, 0xb4, 0xad, 0x5a, 0x75, 0xe2, 0x31, 0x8e, 0x7f, 0x5a, 0x59, 0x0f, 0xe3, 0x79, + 0x0f, 0x12, 0xd9, 0x72, 0x39, 0x76, 0x14, 0xd7, 0xd6, 0xdc, 0xb3, 0xb4, 0x1a, 0x3d, 0x54, 0xf2, + 0x38, 0xf8, 0xa2, 0xf1, 0x85, 0xbd, 0xed, 0xce, 0xb7, 0xaf, 0x1a, 0x5a, 0xab, 0xa6, 0x98, 0x4a, + 0xc7, 0x02, 0x93, 0x24, 0xd0, 0xad, 0x3f, 0xf3, 0xe9, 0x8b, 0xc4, 0xbe, 0xe0, 0xbf, 0x34, 0xd4, + 0x60, 0x40, 0xc7, 0x40, 0x0f, 0xfb, 0x7d, 0x0a, 0x8c, 0x59, 0x93, 0xee, 0xc8, 0x83, 0x80, 0x77, + 0x8f, 0x8f, 0x08, 0xab, 0x6b, 0x52, 0xc9, 0xd9, 0xcb, 0x94, 0x9c, 0x6f, 0xc2, 0xb5, 0x5a, 0x4a, + 0x5b, 0x63, 0x63, 0x08, 0x23, 0x4f, 0xc8, 0xc2, 0x3f, 0xa3, 0x2a, 0x03, 0x87, 0x02, 0x27, 0x30, + 0x50, 0x97, 0xa4, 0xb3, 0x46, 0xa3, 0x6a, 0x83, 0x6c, 0x40, 0xe8, 0xd8, 0xa3, 0xe4, 0x20, 0x11, + 0x18, 0x00, 0x85, 0xc0, 0x01, 0xab, 0x36, 0x9b, 0x36, 0xab, 0xe7, 0x73, 0x20, 0xb2, 0xc0, 0x6c, + 0xfd, 0xab, 0xa1, 0x5a, 0x66, 0xfb, 0xf1, 0x35, 0x42, 0xce, 0x7c, 0xb3, 0xe6, 0x75, 0xf9, 0xfe, + 0x55, 0x1d, 0x4a, 0x17, 0x75, 0x71, 0x31, 0x53, 0x17, 0x23, 0x4b, 0x6c, 0xb8, 0x89, 0x4a, 0xd7, + 0x61, 0x00, 0xac, 0x5e, 0xda, 0x2d, 0xec, 0x55, 0xad, 0xaa, 0xe8, 0xea, 0xa5, 0x70, 0x90, 0xc4, + 0x9f, 0x8c, 0xbe, 0xeb, 0x85, 0x81, 0x9a, 0xe8, 0xa5, 0xd1, 0x17, 0x5e, 0xa2, 0xfe, 0xb6, 0x7e, + 0xd7, 0xd0, 0xc7, 0x1b, 0x4b, 0x8e, 0x3b, 0x08, 0x39, 0xa9, 0xa5, 0x2e, 0xd7, 0x42, 0x5a, 0xfa, + 0x87, 0x2c, 0x45, 0xe1, 0x6f, 0x50, 0x2d, 0xd3, 0x27, 0x75, 0xb4, 0xd2, 0x4b, 0x91, 0x61, 0x23, + 0xd9, 0x58, 0x6b, 0xff, 0xe6, 0x5e, 0xcf, 0xdd, 0xde, 0xeb, 0xb9, 0xbb, 0x7b, 0x3d, 0xf7, 0xdb, + 0x4c, 0xd7, 0x6e, 0x66, 0xba, 0x76, 0x3b, 0xd3, 0xb5, 0xff, 0x66, 0xba, 0xf6, 0xc7, 0xff, 0x7a, + 0xee, 0xb2, 0xa2, 0x6a, 0xf6, 0x26, 0x00, 0x00, 0xff, 0xff, 0x4c, 0x52, 0x01, 0x24, 0x84, 0x08, + 0x00, 0x00, } diff --git a/vendor/k8s.io/kubernetes/federation/apis/federation/v1beta1/generated.proto b/vendor/k8s.io/kubernetes/federation/apis/federation/v1beta1/generated.proto index c37f7b96..0be7a854 100644 --- a/vendor/k8s.io/kubernetes/federation/apis/federation/v1beta1/generated.proto +++ b/vendor/k8s.io/kubernetes/federation/apis/federation/v1beta1/generated.proto @@ -36,7 +36,7 @@ message Cluster { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec defines the behavior of the Cluster. // +optional diff --git a/vendor/k8s.io/kubernetes/federation/apis/federation/v1beta1/register.go b/vendor/k8s.io/kubernetes/federation/apis/federation/v1beta1/register.go index b1c9eda5..0a772ff1 100644 --- a/vendor/k8s.io/kubernetes/federation/apis/federation/v1beta1/register.go +++ b/vendor/k8s.io/kubernetes/federation/apis/federation/v1beta1/register.go @@ -20,7 +20,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/api/v1" ) // GroupName is the group name use in this package @@ -38,10 +37,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &Cluster{}, &ClusterList{}, - &v1.ListOptions{}, - &v1.DeleteOptions{}, - &metav1.ExportOptions{}, - &metav1.GetOptions{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil diff --git a/vendor/k8s.io/kubernetes/federation/apis/federation/v1beta1/types.generated.go b/vendor/k8s.io/kubernetes/federation/apis/federation/v1beta1/types.generated.go index 7fc8a043..a4b1540b 100644 --- a/vendor/k8s.io/kubernetes/federation/apis/federation/v1beta1/types.generated.go +++ b/vendor/k8s.io/kubernetes/federation/apis/federation/v1beta1/types.generated.go @@ -1441,7 +1441,13 @@ func (x *Cluster) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -1451,7 +1457,13 @@ func (x *Cluster) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -1575,24 +1587,30 @@ func (x *Cluster) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg1_v1.ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = ClusterSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = ClusterStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -1605,16 +1623,16 @@ func (x *Cluster) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1622,21 +1640,21 @@ func (x *Cluster) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1644,38 +1662,44 @@ func (x *Cluster) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg1_v1.ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1683,16 +1707,16 @@ func (x *Cluster) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = ClusterSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1700,21 +1724,21 @@ func (x *Cluster) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = ClusterStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } diff --git a/vendor/k8s.io/kubernetes/federation/apis/federation/v1beta1/types.go b/vendor/k8s.io/kubernetes/federation/apis/federation/v1beta1/types.go index 82ecf595..2fd0d367 100644 --- a/vendor/k8s.io/kubernetes/federation/apis/federation/v1beta1/types.go +++ b/vendor/k8s.io/kubernetes/federation/apis/federation/v1beta1/types.go @@ -99,7 +99,7 @@ type Cluster struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec defines the behavior of the Cluster. // +optional diff --git a/vendor/k8s.io/kubernetes/federation/apis/federation/v1beta1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/federation/apis/federation/v1beta1/zz_generated.conversion.go index ee57a6a9..f3b6d142 100644 --- a/vendor/k8s.io/kubernetes/federation/apis/federation/v1beta1/zz_generated.conversion.go +++ b/vendor/k8s.io/kubernetes/federation/apis/federation/v1beta1/zz_generated.conversion.go @@ -53,10 +53,7 @@ func RegisterConversions(scheme *runtime.Scheme) error { } func autoConvert_v1beta1_Cluster_To_federation_Cluster(in *Cluster, out *federation.Cluster, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_ClusterSpec_To_federation_ClusterSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -71,10 +68,7 @@ func Convert_v1beta1_Cluster_To_federation_Cluster(in *Cluster, out *federation. } func autoConvert_federation_Cluster_To_v1beta1_Cluster(in *federation.Cluster, out *Cluster, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_federation_ClusterSpec_To_v1beta1_ClusterSpec(&in.Spec, &out.Spec, s); err != nil { return err } diff --git a/vendor/k8s.io/kubernetes/federation/apis/federation/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/federation/apis/federation/v1beta1/zz_generated.deepcopy.go index 111d0be1..c2a4b3eb 100644 --- a/vendor/k8s.io/kubernetes/federation/apis/federation/v1beta1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/federation/apis/federation/v1beta1/zz_generated.deepcopy.go @@ -21,9 +21,10 @@ limitations under the License. package v1beta1 import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - v1 "k8s.io/kubernetes/pkg/api/v1" + api_v1 "k8s.io/kubernetes/pkg/api/v1" reflect "reflect" ) @@ -49,8 +50,10 @@ func DeepCopy_v1beta1_Cluster(in interface{}, out interface{}, c *conversion.Clo in := in.(*Cluster) out := out.(*Cluster) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v1beta1_ClusterSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -99,13 +102,11 @@ func DeepCopy_v1beta1_ClusterSpec(in interface{}, out interface{}, c *conversion if in.ServerAddressByClientCIDRs != nil { in, out := &in.ServerAddressByClientCIDRs, &out.ServerAddressByClientCIDRs *out = make([]ServerAddressByClientCIDR, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.SecretRef != nil { in, out := &in.SecretRef, &out.SecretRef - *out = new(v1.LocalObjectReference) + *out = new(api_v1.LocalObjectReference) **out = **in } return nil diff --git a/vendor/k8s.io/kubernetes/federation/apis/federation/validation/BUILD b/vendor/k8s.io/kubernetes/federation/apis/federation/validation/BUILD index 1678c5d5..d8e09483 100644 --- a/vendor/k8s.io/kubernetes/federation/apis/federation/validation/BUILD +++ b/vendor/k8s.io/kubernetes/federation/apis/federation/validation/BUILD @@ -27,6 +27,7 @@ go_test( deps = [ "//federation/apis/federation:go_default_library", "//pkg/api:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", ], ) diff --git a/vendor/k8s.io/kubernetes/federation/apis/federation/validation/validation_test.go b/vendor/k8s.io/kubernetes/federation/apis/federation/validation/validation_test.go index d1ec2dc8..cf1d57b4 100644 --- a/vendor/k8s.io/kubernetes/federation/apis/federation/validation/validation_test.go +++ b/vendor/k8s.io/kubernetes/federation/apis/federation/validation/validation_test.go @@ -19,6 +19,7 @@ package validation import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/federation/apis/federation" "k8s.io/kubernetes/pkg/api" ) @@ -26,7 +27,7 @@ import ( func TestValidateCluster(t *testing.T) { successCases := []federation.Cluster{ { - ObjectMeta: api.ObjectMeta{Name: "cluster-s"}, + ObjectMeta: metav1.ObjectMeta{Name: "cluster-s"}, Spec: federation.ClusterSpec{ ServerAddressByClientCIDRs: []federation.ServerAddressByClientCIDR{ { @@ -46,15 +47,15 @@ func TestValidateCluster(t *testing.T) { errorCases := map[string]federation.Cluster{ "missing cluster addresses": { - ObjectMeta: api.ObjectMeta{Name: "cluster-f"}, + ObjectMeta: metav1.ObjectMeta{Name: "cluster-f"}, }, "empty cluster addresses": { - ObjectMeta: api.ObjectMeta{Name: "cluster-f"}, + ObjectMeta: metav1.ObjectMeta{Name: "cluster-f"}, Spec: federation.ClusterSpec{ ServerAddressByClientCIDRs: []federation.ServerAddressByClientCIDR{}, }}, "invalid_label": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "cluster-f", Labels: map[string]string{ "NoUppercaseOrSpecialCharsLike=Equals": "bar", @@ -62,7 +63,7 @@ func TestValidateCluster(t *testing.T) { }, }, "invalid cluster name (is a subdomain)": { - ObjectMeta: api.ObjectMeta{Name: "mycluster.mycompany"}, + ObjectMeta: metav1.ObjectMeta{Name: "mycluster.mycompany"}, Spec: federation.ClusterSpec{ ServerAddressByClientCIDRs: []federation.ServerAddressByClientCIDR{ { @@ -89,7 +90,7 @@ func TestValidateClusterUpdate(t *testing.T) { successCases := []clusterUpdateTest{ { old: federation.Cluster{ - ObjectMeta: api.ObjectMeta{Name: "cluster-s"}, + ObjectMeta: metav1.ObjectMeta{Name: "cluster-s"}, Spec: federation.ClusterSpec{ ServerAddressByClientCIDRs: []federation.ServerAddressByClientCIDR{ { @@ -100,7 +101,7 @@ func TestValidateClusterUpdate(t *testing.T) { }, }, update: federation.Cluster{ - ObjectMeta: api.ObjectMeta{Name: "cluster-s"}, + ObjectMeta: metav1.ObjectMeta{Name: "cluster-s"}, Spec: federation.ClusterSpec{ ServerAddressByClientCIDRs: []federation.ServerAddressByClientCIDR{ { @@ -124,7 +125,7 @@ func TestValidateClusterUpdate(t *testing.T) { errorCases := map[string]clusterUpdateTest{ "cluster name changed": { old: federation.Cluster{ - ObjectMeta: api.ObjectMeta{Name: "cluster-s"}, + ObjectMeta: metav1.ObjectMeta{Name: "cluster-s"}, Spec: federation.ClusterSpec{ ServerAddressByClientCIDRs: []federation.ServerAddressByClientCIDR{ { @@ -135,7 +136,7 @@ func TestValidateClusterUpdate(t *testing.T) { }, }, update: federation.Cluster{ - ObjectMeta: api.ObjectMeta{Name: "cluster-newname"}, + ObjectMeta: metav1.ObjectMeta{Name: "cluster-newname"}, Spec: federation.ClusterSpec{ ServerAddressByClientCIDRs: []federation.ServerAddressByClientCIDR{ { @@ -163,7 +164,7 @@ func TestValidateClusterStatusUpdate(t *testing.T) { successCases := []clusterUpdateTest{ { old: federation.Cluster{ - ObjectMeta: api.ObjectMeta{Name: "cluster-s"}, + ObjectMeta: metav1.ObjectMeta{Name: "cluster-s"}, Spec: federation.ClusterSpec{ ServerAddressByClientCIDRs: []federation.ServerAddressByClientCIDR{ { @@ -179,7 +180,7 @@ func TestValidateClusterStatusUpdate(t *testing.T) { }, }, update: federation.Cluster{ - ObjectMeta: api.ObjectMeta{Name: "cluster-s"}, + ObjectMeta: metav1.ObjectMeta{Name: "cluster-s"}, Spec: federation.ClusterSpec{ ServerAddressByClientCIDRs: []federation.ServerAddressByClientCIDR{ { diff --git a/vendor/k8s.io/kubernetes/federation/apis/federation/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/federation/apis/federation/zz_generated.deepcopy.go index 9a05d2e3..16e0011d 100644 --- a/vendor/k8s.io/kubernetes/federation/apis/federation/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/federation/apis/federation/zz_generated.deepcopy.go @@ -21,6 +21,7 @@ limitations under the License. package federation import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" api "k8s.io/kubernetes/pkg/api" @@ -51,8 +52,10 @@ func DeepCopy_federation_Cluster(in interface{}, out interface{}, c *conversion. in := in.(*Cluster) out := out.(*Cluster) *out = *in - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_federation_ClusterSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -115,9 +118,7 @@ func DeepCopy_federation_ClusterSpec(in interface{}, out interface{}, c *convers if in.ServerAddressByClientCIDRs != nil { in, out := &in.ServerAddressByClientCIDRs, &out.ServerAddressByClientCIDRs *out = make([]ServerAddressByClientCIDR, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.SecretRef != nil { in, out := &in.SecretRef, &out.SecretRef diff --git a/vendor/k8s.io/kubernetes/federation/apis/openapi-spec/swagger.json b/vendor/k8s.io/kubernetes/federation/apis/openapi-spec/swagger.json index a1640bdb..249e6e11 100644 --- a/vendor/k8s.io/kubernetes/federation/apis/openapi-spec/swagger.json +++ b/vendor/k8s.io/kubernetes/federation/apis/openapi-spec/swagger.json @@ -3883,6 +3883,937 @@ } } }, + "/apis/autoscaling/": { + "get": { + "description": "get information of a group", + "consumes": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "autoscaling" + ], + "operationId": "getAutoscalingAPIGroup", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.APIGroup" + } + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/apis/autoscaling/v1/": { + "get": { + "description": "get available resources", + "consumes": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "autoscaling_v1" + ], + "operationId": "getAutoscalingV1APIResources", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.APIResourceList" + } + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/apis/autoscaling/v1/horizontalpodautoscalers": { + "get": { + "description": "list or watch objects of kind HorizontalPodAutoscaler", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "autoscaling_v1" + ], + "operationId": "listAutoscalingV1HorizontalPodAutoscalerForAllNamespaces", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.HorizontalPodAutoscalerList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers": { + "get": { + "description": "list or watch objects of kind HorizontalPodAutoscaler", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "autoscaling_v1" + ], + "operationId": "listAutoscalingV1NamespacedHorizontalPodAutoscaler", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.HorizontalPodAutoscalerList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "post": { + "description": "create a HorizontalPodAutoscaler", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "autoscaling_v1" + ], + "operationId": "createAutoscalingV1NamespacedHorizontalPodAutoscaler", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.HorizontalPodAutoscaler" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.HorizontalPodAutoscaler" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete collection of HorizontalPodAutoscaler", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "autoscaling_v1" + ], + "operationId": "deleteAutoscalingV1CollectionNamespacedHorizontalPodAutoscaler", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}": { + "get": { + "description": "read the specified HorizontalPodAutoscaler", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "autoscaling_v1" + ], + "operationId": "readAutoscalingV1NamespacedHorizontalPodAutoscaler", + "parameters": [ + { + "uniqueItems": true, + "type": "boolean", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", + "name": "exact", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Should this value be exported. Export strips fields that a user can not specify.", + "name": "export", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.HorizontalPodAutoscaler" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace the specified HorizontalPodAutoscaler", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "autoscaling_v1" + ], + "operationId": "replaceAutoscalingV1NamespacedHorizontalPodAutoscaler", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.HorizontalPodAutoscaler" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.HorizontalPodAutoscaler" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete a HorizontalPodAutoscaler", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "autoscaling_v1" + ], + "operationId": "deleteAutoscalingV1NamespacedHorizontalPodAutoscaler", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.DeleteOptions" + } + }, + { + "uniqueItems": true, + "type": "integer", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "name": "gracePeriodSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "name": "orphanDependents", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update the specified HorizontalPodAutoscaler", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "autoscaling_v1" + ], + "operationId": "patchAutoscalingV1NamespacedHorizontalPodAutoscaler", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.Patch" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.HorizontalPodAutoscaler" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the HorizontalPodAutoscaler", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status": { + "get": { + "description": "read status of the specified HorizontalPodAutoscaler", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "autoscaling_v1" + ], + "operationId": "readAutoscalingV1NamespacedHorizontalPodAutoscalerStatus", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.HorizontalPodAutoscaler" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace status of the specified HorizontalPodAutoscaler", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "autoscaling_v1" + ], + "operationId": "replaceAutoscalingV1NamespacedHorizontalPodAutoscalerStatus", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.HorizontalPodAutoscaler" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.HorizontalPodAutoscaler" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update status of the specified HorizontalPodAutoscaler", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "autoscaling_v1" + ], + "operationId": "patchAutoscalingV1NamespacedHorizontalPodAutoscalerStatus", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.Patch" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.HorizontalPodAutoscaler" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the HorizontalPodAutoscaler", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/autoscaling/v1/watch/horizontalpodautoscalers": { + "get": { + "description": "watch individual changes to a list of HorizontalPodAutoscaler", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "autoscaling_v1" + ], + "operationId": "watchAutoscalingV1HorizontalPodAutoscalerListForAllNamespaces", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.WatchEvent" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/autoscaling/v1/watch/namespaces/{namespace}/horizontalpodautoscalers": { + "get": { + "description": "watch individual changes to a list of HorizontalPodAutoscaler", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "autoscaling_v1" + ], + "operationId": "watchAutoscalingV1NamespacedHorizontalPodAutoscalerList", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.WatchEvent" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/autoscaling/v1/watch/namespaces/{namespace}/horizontalpodautoscalers/{name}": { + "get": { + "description": "watch changes to an object of kind HorizontalPodAutoscaler", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "autoscaling_v1" + ], + "operationId": "watchAutoscalingV1NamespacedHorizontalPodAutoscaler", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.WatchEvent" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "name of the HorizontalPodAutoscaler", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, "/apis/batch/": { "get": { "description": "get information of a group", @@ -9815,6 +10746,10 @@ "name": { "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names", "type": "string" + }, + "optional": { + "description": "Specify whether the ConfigMap must be defined", + "type": "boolean" } } }, @@ -9831,6 +10766,10 @@ "name": { "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names", "type": "string" + }, + "optional": { + "description": "Specify whether the ConfigMap or it's key must be defined", + "type": "boolean" } } }, @@ -9870,7 +10809,7 @@ "format": "int32" }, "items": { - "description": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error. Paths must be relative and may not contain the '..' path or start with '..'.", + "description": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.", "type": "array", "items": { "$ref": "#/definitions/v1.KeyToPath" @@ -9879,6 +10818,10 @@ "name": { "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names", "type": "string" + }, + "optional": { + "description": "Specify whether the ConfigMap or it's keys must be defined", + "type": "boolean" } } }, @@ -9964,7 +10907,11 @@ "type": "boolean" }, "terminationMessagePath": { - "description": "Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated.", + "description": "Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated.", + "type": "string" + }, + "terminationMessagePolicy": { + "description": "Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.", "type": "string" }, "tty": { @@ -10014,8 +10961,29 @@ } } }, + "v1.CrossVersionObjectReference": { + "description": "CrossVersionObjectReference contains enough information to let you identify the referred resource.", + "required": [ + "kind", + "name" + ], + "properties": { + "apiVersion": { + "description": "API version of the referent", + "type": "string" + }, + "kind": { + "description": "Kind of the referent; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds\"", + "type": "string" + }, + "name": { + "description": "Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names", + "type": "string" + } + } + }, "v1.DeleteOptions": { - "description": "DeleteOptions may be provided when deleting an API object", + "description": "DeleteOptions may be provided when deleting an API object.", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", @@ -10101,6 +11069,10 @@ "prefix": { "description": "An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.", "type": "string" + }, + "secretRef": { + "description": "The Secret to select from", + "$ref": "#/definitions/v1.SecretEnvSource" } } }, @@ -10472,6 +11444,119 @@ } } }, + "v1.HorizontalPodAutoscaler": { + "description": "configuration of a horizontal pod autoscaler.", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", + "$ref": "#/definitions/v1.ObjectMeta" + }, + "spec": { + "description": "behaviour of autoscaler. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status.", + "$ref": "#/definitions/v1.HorizontalPodAutoscalerSpec" + }, + "status": { + "description": "current information about the autoscaler.", + "$ref": "#/definitions/v1.HorizontalPodAutoscalerStatus" + } + } + }, + "v1.HorizontalPodAutoscalerList": { + "description": "list of horizontal pod autoscaler objects.", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "list of horizontal pod autoscaler objects.", + "type": "array", + "items": { + "$ref": "#/definitions/v1.HorizontalPodAutoscaler" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard list metadata.", + "$ref": "#/definitions/v1.ListMeta" + } + } + }, + "v1.HorizontalPodAutoscalerSpec": { + "description": "specification of a horizontal pod autoscaler.", + "required": [ + "scaleTargetRef", + "maxReplicas" + ], + "properties": { + "maxReplicas": { + "description": "upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.", + "type": "integer", + "format": "int32" + }, + "minReplicas": { + "description": "lower limit for the number of pods that can be set by the autoscaler, default 1.", + "type": "integer", + "format": "int32" + }, + "scaleTargetRef": { + "description": "reference to scaled resource; horizontal pod autoscaler will learn the current resource consumption and will set the desired number of pods by using its Scale subresource.", + "$ref": "#/definitions/v1.CrossVersionObjectReference" + }, + "targetCPUUtilizationPercentage": { + "description": "target average CPU utilization (represented as a percentage of requested CPU) over all the pods; if not specified the default autoscaling policy will be used.", + "type": "integer", + "format": "int32" + } + } + }, + "v1.HorizontalPodAutoscalerStatus": { + "description": "current status of a horizontal pod autoscaler", + "required": [ + "currentReplicas", + "desiredReplicas" + ], + "properties": { + "currentCPUUtilizationPercentage": { + "description": "current average CPU utilization over all pods, represented as a percentage of requested CPU, e.g. 70 means that an average pod is using now 70% of its requested CPU.", + "type": "integer", + "format": "int32" + }, + "currentReplicas": { + "description": "current number of replicas of pods managed by this autoscaler.", + "type": "integer", + "format": "int32" + }, + "desiredReplicas": { + "description": "desired number of replicas of pods managed by this autoscaler.", + "type": "integer", + "format": "int32" + }, + "lastScaleTime": { + "description": "last time the HorizontalPodAutoscaler scaled the number of pods; used by the autoscaler to control how often the number of pods is changed.", + "$ref": "#/definitions/v1.Time" + }, + "observedGeneration": { + "description": "most recent generation observed by this autoscaler.", + "type": "integer", + "format": "int64" + } + } + }, "v1.HostPathVolumeSource": { "description": "Represents a host path mapped into a pod. Host path volumes do not support ownership management or SELinux relabeling.", "required": [ @@ -11313,6 +12398,10 @@ "description": "Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: http://kubernetes.io/docs/user-guide/pod-states#restartpolicy", "type": "string" }, + "schedulername": { + "description": "If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler.", + "type": "string" + }, "securityContext": { "description": "SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field.", "$ref": "#/definitions/v1.PodSecurityContext" @@ -11594,6 +12683,19 @@ } } }, + "v1.SecretEnvSource": { + "description": "SecretEnvSource selects a Secret to populate the environment variables with.\n\nThe contents of the target Secret's Data field will represent the key-value pairs as environment variables.", + "properties": { + "name": { + "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names", + "type": "string" + }, + "optional": { + "description": "Specify whether the Secret must be defined", + "type": "boolean" + } + } + }, "v1.SecretKeySelector": { "description": "SecretKeySelector selects a key of a Secret.", "required": [ @@ -11607,6 +12709,10 @@ "name": { "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names", "type": "string" + }, + "optional": { + "description": "Specify whether the Secret or it's key must be defined", + "type": "boolean" } } }, @@ -11646,12 +12752,16 @@ "format": "int32" }, "items": { - "description": "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error. Paths must be relative and may not contain the '..' path or start with '..'.", + "description": "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.", "type": "array", "items": { "$ref": "#/definitions/v1.KeyToPath" } }, + "optional": { + "description": "Specify whether the Secret or it's keys must be defined", + "type": "boolean" + }, "secretName": { "description": "Name of the secret in the pod's namespace to use. More info: http://kubernetes.io/docs/user-guide/volumes#secrets", "type": "string" diff --git a/vendor/k8s.io/kubernetes/federation/apis/swagger-spec/extensions_v1beta1.json b/vendor/k8s.io/kubernetes/federation/apis/swagger-spec/extensions_v1beta1.json index e9bb1abc..b2f8c7b5 100644 --- a/vendor/k8s.io/kubernetes/federation/apis/swagger-spec/extensions_v1beta1.json +++ b/vendor/k8s.io/kubernetes/federation/apis/swagger-spec/extensions_v1beta1.json @@ -4640,6 +4640,10 @@ "affinity": { "$ref": "v1.Affinity", "description": "If specified, the pod's scheduling constraints" + }, + "schedulername": { + "type": "string", + "description": "If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler." } } }, @@ -4857,12 +4861,16 @@ "items": { "$ref": "v1.KeyToPath" }, - "description": "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error. Paths must be relative and may not contain the '..' path or start with '..'." + "description": "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'." }, "defaultMode": { "type": "integer", "format": "int32", "description": "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the Secret or it's keys must be defined" } } }, @@ -5288,12 +5296,16 @@ "items": { "$ref": "v1.KeyToPath" }, - "description": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error. Paths must be relative and may not contain the '..' path or start with '..'." + "description": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'." }, "defaultMode": { "type": "integer", "format": "int32", "description": "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the ConfigMap or it's keys must be defined" } } }, @@ -5474,7 +5486,11 @@ }, "terminationMessagePath": { "type": "string", - "description": "Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated." + "description": "Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated." + }, + "terminationMessagePolicy": { + "type": "string", + "description": "Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated." }, "imagePullPolicy": { "type": "string", @@ -5540,6 +5556,10 @@ "configMapRef": { "$ref": "v1.ConfigMapEnvSource", "description": "The ConfigMap to select from" + }, + "secretRef": { + "$ref": "v1.SecretEnvSource", + "description": "The Secret to select from" } } }, @@ -5550,6 +5570,24 @@ "name": { "type": "string", "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names" + }, + "optional": { + "type": "boolean", + "description": "Specify whether the ConfigMap must be defined" + } + } + }, + "v1.SecretEnvSource": { + "id": "v1.SecretEnvSource", + "description": "SecretEnvSource selects a Secret to populate the environment variables with.\n\nThe contents of the target Secret's Data field will represent the key-value pairs as environment variables.", + "properties": { + "name": { + "type": "string", + "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names" + }, + "optional": { + "type": "boolean", + "description": "Specify whether the Secret must be defined" } } }, @@ -5610,6 +5648,10 @@ "key": { "type": "string", "description": "The key to select." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the ConfigMap or it's key must be defined" } } }, @@ -5627,6 +5669,10 @@ "key": { "type": "string", "description": "The key of the secret to select from. Must be a valid secret key." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the Secret or it's key must be defined" } } }, @@ -6269,7 +6315,7 @@ }, "v1.DeleteOptions": { "id": "v1.DeleteOptions", - "description": "DeleteOptions may be provided when deleting an API object", + "description": "DeleteOptions may be provided when deleting an API object.", "properties": { "kind": { "type": "string", diff --git a/vendor/k8s.io/kubernetes/federation/apis/swagger-spec/federation_v1beta1.json b/vendor/k8s.io/kubernetes/federation/apis/swagger-spec/federation_v1beta1.json index d70492bf..5d390455 100644 --- a/vendor/k8s.io/kubernetes/federation/apis/swagger-spec/federation_v1beta1.json +++ b/vendor/k8s.io/kubernetes/federation/apis/swagger-spec/federation_v1beta1.json @@ -1050,7 +1050,7 @@ }, "v1.DeleteOptions": { "id": "v1.DeleteOptions", - "description": "DeleteOptions may be provided when deleting an API object", + "description": "DeleteOptions may be provided when deleting an API object.", "properties": { "kind": { "type": "string", diff --git a/vendor/k8s.io/kubernetes/federation/apis/swagger-spec/resourceListing.json b/vendor/k8s.io/kubernetes/federation/apis/swagger-spec/resourceListing.json index 80d13488..bd8cb4e1 100644 --- a/vendor/k8s.io/kubernetes/federation/apis/swagger-spec/resourceListing.json +++ b/vendor/k8s.io/kubernetes/federation/apis/swagger-spec/resourceListing.json @@ -48,6 +48,14 @@ { "path": "/apis/batch", "description": "get information of a group" + }, + { + "path": "/apis/autoscaling/v1", + "description": "API at /apis/autoscaling/v1" + }, + { + "path": "/apis/autoscaling", + "description": "get information of a group" } ], "apiVersion": "", diff --git a/vendor/k8s.io/kubernetes/federation/apis/swagger-spec/v1.json b/vendor/k8s.io/kubernetes/federation/apis/swagger-spec/v1.json index 5e356d10..0fca44cc 100644 --- a/vendor/k8s.io/kubernetes/federation/apis/swagger-spec/v1.json +++ b/vendor/k8s.io/kubernetes/federation/apis/swagger-spec/v1.json @@ -4466,7 +4466,7 @@ }, "v1.DeleteOptions": { "id": "v1.DeleteOptions", - "description": "DeleteOptions may be provided when deleting an API object", + "description": "DeleteOptions may be provided when deleting an API object.", "properties": { "kind": { "type": "string", diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/BUILD b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/BUILD index b342b923..784c78a2 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/BUILD +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/BUILD @@ -17,15 +17,16 @@ go_library( tags = ["automanaged"], deps = [ "//federation/apis/federation/install:go_default_library", + "//federation/client/clientset_generated/federation_clientset/typed/autoscaling/v1:go_default_library", "//federation/client/clientset_generated/federation_clientset/typed/batch/v1:go_default_library", "//federation/client/clientset_generated/federation_clientset/typed/core/v1:go_default_library", "//federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1:go_default_library", "//federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/typed/discovery:go_default_library", - "//pkg/util/flowcontrol:go_default_library", - "//plugin/pkg/client/auth:go_default_library", "//vendor:github.com/golang/glog", + "//vendor:k8s.io/client-go/plugin/pkg/client/auth", + "//vendor:k8s.io/client-go/rest", + "//vendor:k8s.io/client-go/util/flowcontrol", ], ) @@ -41,6 +42,7 @@ filegroup( srcs = [ ":package-srcs", "//federation/client/clientset_generated/federation_clientset/fake:all-srcs", + "//federation/client/clientset_generated/federation_clientset/typed/autoscaling/v1:all-srcs", "//federation/client/clientset_generated/federation_clientset/typed/batch/v1:all-srcs", "//federation/client/clientset_generated/federation_clientset/typed/core/v1:all-srcs", "//federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1:all-srcs", diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/clientset.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/clientset.go index b9f91ba5..c1f7d756 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/clientset.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/clientset.go @@ -18,14 +18,15 @@ package federation_clientset import ( "github.com/golang/glog" + _ "k8s.io/client-go/plugin/pkg/client/auth" + rest "k8s.io/client-go/rest" + "k8s.io/client-go/util/flowcontrol" + v1autoscaling "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/autoscaling/v1" v1batch "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/batch/v1" v1core "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1" v1beta1extensions "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1" v1beta1federation "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1" - restclient "k8s.io/kubernetes/pkg/client/restclient" discovery "k8s.io/kubernetes/pkg/client/typed/discovery" - "k8s.io/kubernetes/pkg/util/flowcontrol" - _ "k8s.io/kubernetes/plugin/pkg/client/auth" ) type Interface interface { @@ -33,6 +34,9 @@ type Interface interface { CoreV1() v1core.CoreV1Interface // Deprecated: please explicitly pick a version if possible. Core() v1core.CoreV1Interface + AutoscalingV1() v1autoscaling.AutoscalingV1Interface + // Deprecated: please explicitly pick a version if possible. + Autoscaling() v1autoscaling.AutoscalingV1Interface BatchV1() v1batch.BatchV1Interface // Deprecated: please explicitly pick a version if possible. Batch() v1batch.BatchV1Interface @@ -49,6 +53,7 @@ type Interface interface { type Clientset struct { *discovery.DiscoveryClient *v1core.CoreV1Client + *v1autoscaling.AutoscalingV1Client *v1batch.BatchV1Client *v1beta1extensions.ExtensionsV1beta1Client *v1beta1federation.FederationV1beta1Client @@ -71,6 +76,23 @@ func (c *Clientset) Core() v1core.CoreV1Interface { return c.CoreV1Client } +// AutoscalingV1 retrieves the AutoscalingV1Client +func (c *Clientset) AutoscalingV1() v1autoscaling.AutoscalingV1Interface { + if c == nil { + return nil + } + return c.AutoscalingV1Client +} + +// Deprecated: Autoscaling retrieves the default version of AutoscalingClient. +// Please explicitly pick a version. +func (c *Clientset) Autoscaling() v1autoscaling.AutoscalingV1Interface { + if c == nil { + return nil + } + return c.AutoscalingV1Client +} + // BatchV1 retrieves the BatchV1Client func (c *Clientset) BatchV1() v1batch.BatchV1Interface { if c == nil { @@ -131,7 +153,7 @@ func (c *Clientset) Discovery() discovery.DiscoveryInterface { } // NewForConfig creates a new Clientset for the given config. -func NewForConfig(c *restclient.Config) (*Clientset, error) { +func NewForConfig(c *rest.Config) (*Clientset, error) { configShallowCopy := *c if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) @@ -142,6 +164,10 @@ func NewForConfig(c *restclient.Config) (*Clientset, error) { if err != nil { return nil, err } + cs.AutoscalingV1Client, err = v1autoscaling.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } cs.BatchV1Client, err = v1batch.NewForConfig(&configShallowCopy) if err != nil { return nil, err @@ -165,9 +191,10 @@ func NewForConfig(c *restclient.Config) (*Clientset, error) { // NewForConfigOrDie creates a new Clientset for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *Clientset { +func NewForConfigOrDie(c *rest.Config) *Clientset { var cs Clientset cs.CoreV1Client = v1core.NewForConfigOrDie(c) + cs.AutoscalingV1Client = v1autoscaling.NewForConfigOrDie(c) cs.BatchV1Client = v1batch.NewForConfigOrDie(c) cs.ExtensionsV1beta1Client = v1beta1extensions.NewForConfigOrDie(c) cs.FederationV1beta1Client = v1beta1federation.NewForConfigOrDie(c) @@ -177,9 +204,10 @@ func NewForConfigOrDie(c *restclient.Config) *Clientset { } // New creates a new Clientset for the given RESTClient. -func New(c restclient.Interface) *Clientset { +func New(c rest.Interface) *Clientset { var cs Clientset cs.CoreV1Client = v1core.New(c) + cs.AutoscalingV1Client = v1autoscaling.New(c) cs.BatchV1Client = v1batch.New(c) cs.ExtensionsV1beta1Client = v1beta1extensions.New(c) cs.FederationV1beta1Client = v1beta1federation.New(c) diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/doc.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/doc.go index 4436df65..9aa53e2b 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/doc.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1] +// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job,autoscaling/v1/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1,autoscaling/v1] // This package has the automatically generated clientset. package federation_clientset diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/fake/BUILD b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/fake/BUILD index e2e25c4a..d247d7fd 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/fake/BUILD +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/fake/BUILD @@ -16,6 +16,8 @@ go_library( tags = ["automanaged"], deps = [ "//federation/client/clientset_generated/federation_clientset:go_default_library", + "//federation/client/clientset_generated/federation_clientset/typed/autoscaling/v1:go_default_library", + "//federation/client/clientset_generated/federation_clientset/typed/autoscaling/v1/fake:go_default_library", "//federation/client/clientset_generated/federation_clientset/typed/batch/v1:go_default_library", "//federation/client/clientset_generated/federation_clientset/typed/batch/v1/fake:go_default_library", "//federation/client/clientset_generated/federation_clientset/typed/core/v1:go_default_library", diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/fake/clientset_generated.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/fake/clientset_generated.go index eeaea4cf..56c0df23 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/fake/clientset_generated.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/fake/clientset_generated.go @@ -20,6 +20,8 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" clientset "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset" + v1autoscaling "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/autoscaling/v1" + fakev1autoscaling "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/autoscaling/v1/fake" v1batch "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/batch/v1" fakev1batch "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/batch/v1/fake" v1core "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1" @@ -77,6 +79,16 @@ func (c *Clientset) Core() v1core.CoreV1Interface { return &fakev1core.FakeCoreV1{Fake: &c.Fake} } +// AutoscalingV1 retrieves the AutoscalingV1Client +func (c *Clientset) AutoscalingV1() v1autoscaling.AutoscalingV1Interface { + return &fakev1autoscaling.FakeAutoscalingV1{Fake: &c.Fake} +} + +// Autoscaling retrieves the AutoscalingV1Client +func (c *Clientset) Autoscaling() v1autoscaling.AutoscalingV1Interface { + return &fakev1autoscaling.FakeAutoscalingV1{Fake: &c.Fake} +} + // BatchV1 retrieves the BatchV1Client func (c *Clientset) BatchV1() v1batch.BatchV1Interface { return &fakev1batch.FakeBatchV1{Fake: &c.Fake} diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/fake/doc.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/fake/doc.go index 78881445..05a5434b 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/fake/doc.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/fake/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1] +// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job,autoscaling/v1/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1,autoscaling/v1] // This package has the automatically generated fake clientset. package fake diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/BUILD b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/autoscaling/v1/BUILD similarity index 66% rename from vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/BUILD rename to vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/autoscaling/v1/BUILD index 67af08e2..e736a714 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/BUILD +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/autoscaling/v1/BUILD @@ -10,20 +10,21 @@ load( go_library( name = "go_default_library", srcs = [ + "autoscaling_client.go", "doc.go", "generated_expansion.go", - "poddisruptionbudget.go", - "policy_client.go", + "horizontalpodautoscaler.go", ], tags = ["automanaged"], deps = [ "//pkg/api:go_default_library", - "//pkg/api/v1:go_default_library", - "//pkg/apis/policy/v1alpha1:go_default_library", - "//pkg/client/restclient:go_default_library", + "//pkg/apis/autoscaling/v1:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/runtime/serializer", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) @@ -38,7 +39,7 @@ filegroup( name = "all-srcs", srcs = [ ":package-srcs", - "//pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/fake:all-srcs", + "//federation/client/clientset_generated/federation_clientset/typed/autoscaling/v1/fake:all-srcs", ], tags = ["automanaged"], ) diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1alpha1/policy_client.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/autoscaling/v1/autoscaling_client.go similarity index 56% rename from vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1alpha1/policy_client.go rename to vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/autoscaling/v1/autoscaling_client.go index 353a8e6f..0b501982 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1alpha1/policy_client.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/autoscaling/v1/autoscaling_client.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,33 +14,32 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package v1 import ( fmt "fmt" - - "k8s.io/apimachinery/pkg/runtime/schema" + schema "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" - api "k8s.io/client-go/pkg/api" rest "k8s.io/client-go/rest" + api "k8s.io/kubernetes/pkg/api" ) -type PolicyV1alpha1Interface interface { +type AutoscalingV1Interface interface { RESTClient() rest.Interface - PodDisruptionBudgetsGetter + HorizontalPodAutoscalersGetter } -// PolicyV1alpha1Client is used to interact with features provided by the k8s.io/kubernetes/pkg/apimachinery/registered.Group group. -type PolicyV1alpha1Client struct { +// AutoscalingV1Client is used to interact with features provided by the autoscaling group. +type AutoscalingV1Client struct { restClient rest.Interface } -func (c *PolicyV1alpha1Client) PodDisruptionBudgets(namespace string) PodDisruptionBudgetInterface { - return newPodDisruptionBudgets(c, namespace) +func (c *AutoscalingV1Client) HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerInterface { + return newHorizontalPodAutoscalers(c, namespace) } -// NewForConfig creates a new PolicyV1alpha1Client for the given config. -func NewForConfig(c *rest.Config) (*PolicyV1alpha1Client, error) { +// NewForConfig creates a new AutoscalingV1Client for the given config. +func NewForConfig(c *rest.Config) (*AutoscalingV1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err @@ -49,12 +48,12 @@ func NewForConfig(c *rest.Config) (*PolicyV1alpha1Client, error) { if err != nil { return nil, err } - return &PolicyV1alpha1Client{client}, nil + return &AutoscalingV1Client{client}, nil } -// NewForConfigOrDie creates a new PolicyV1alpha1Client for the given config and +// NewForConfigOrDie creates a new AutoscalingV1Client for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *PolicyV1alpha1Client { +func NewForConfigOrDie(c *rest.Config) *AutoscalingV1Client { client, err := NewForConfig(c) if err != nil { panic(err) @@ -62,19 +61,19 @@ func NewForConfigOrDie(c *rest.Config) *PolicyV1alpha1Client { return client } -// New creates a new PolicyV1alpha1Client for the given RESTClient. -func New(c rest.Interface) *PolicyV1alpha1Client { - return &PolicyV1alpha1Client{c} +// New creates a new AutoscalingV1Client for the given RESTClient. +func New(c rest.Interface) *AutoscalingV1Client { + return &AutoscalingV1Client{c} } func setConfigDefaults(config *rest.Config) error { - gv, err := schema.ParseGroupVersion("policy/v1alpha1") + gv, err := schema.ParseGroupVersion("autoscaling/v1") if err != nil { return err } - // if policy/v1alpha1 is not enabled, return an error + // if autoscaling/v1 is not enabled, return an error if !api.Registry.IsEnabledVersion(gv) { - return fmt.Errorf("policy/v1alpha1 is not enabled") + return fmt.Errorf("autoscaling/v1 is not enabled") } config.APIPath = "/apis" if config.UserAgent == "" { @@ -90,7 +89,7 @@ func setConfigDefaults(config *rest.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *PolicyV1alpha1Client) RESTClient() rest.Interface { +func (c *AutoscalingV1Client) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/doc.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/autoscaling/v1/doc.go similarity index 55% rename from vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/doc.go rename to vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/autoscaling/v1/doc.go index bc5df818..7205930b 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/doc.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/autoscaling/v1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1alpha1,rbac/v1alpha1,storage/v1beta1] +// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job,autoscaling/v1/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1,autoscaling/v1] // This package has the automatically generated typed clients. -package v1alpha1 +package v1 diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/fake/BUILD b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/autoscaling/v1/fake/BUILD similarity index 64% rename from vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/fake/BUILD rename to vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/autoscaling/v1/fake/BUILD index 49e2d91f..4838d918 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/fake/BUILD +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/autoscaling/v1/fake/BUILD @@ -11,20 +11,20 @@ go_library( name = "go_default_library", srcs = [ "doc.go", - "fake_poddisruptionbudget.go", - "fake_policy_client.go", + "fake_autoscaling_client.go", + "fake_horizontalpodautoscaler.go", ], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", - "//pkg/api/v1:go_default_library", - "//pkg/apis/policy/v1alpha1:go_default_library", - "//pkg/client/clientset_generated/clientset/typed/policy/v1alpha1:go_default_library", - "//pkg/client/restclient:go_default_library", + "//federation/client/clientset_generated/federation_clientset/typed/autoscaling/v1:go_default_library", + "//pkg/apis/autoscaling/v1:go_default_library", "//pkg/client/testing/core:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/fake/doc.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/autoscaling/v1/fake/doc.go similarity index 56% rename from vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/fake/doc.go rename to vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/autoscaling/v1/fake/doc.go index b320cb63..91682eb2 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/fake/doc.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/autoscaling/v1/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1alpha1,rbac/v1alpha1,storage/v1beta1] +// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job,autoscaling/v1/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1,autoscaling/v1] // Package fake has the automatically generated clients. package fake diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1alpha1/fake/fake_policy_client.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/autoscaling/v1/fake/fake_autoscaling_client.go similarity index 62% rename from vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1alpha1/fake/fake_policy_client.go rename to vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/autoscaling/v1/fake/fake_autoscaling_client.go index 8b233265..8d005c87 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1alpha1/fake/fake_policy_client.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/autoscaling/v1/fake/fake_autoscaling_client.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -17,22 +17,22 @@ limitations under the License. package fake import ( - v1alpha1 "k8s.io/client-go/kubernetes/typed/policy/v1alpha1" rest "k8s.io/client-go/rest" - testing "k8s.io/client-go/testing" + v1 "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/autoscaling/v1" + core "k8s.io/kubernetes/pkg/client/testing/core" ) -type FakePolicyV1alpha1 struct { - *testing.Fake +type FakeAutoscalingV1 struct { + *core.Fake } -func (c *FakePolicyV1alpha1) PodDisruptionBudgets(namespace string) v1alpha1.PodDisruptionBudgetInterface { - return &FakePodDisruptionBudgets{c, namespace} +func (c *FakeAutoscalingV1) HorizontalPodAutoscalers(namespace string) v1.HorizontalPodAutoscalerInterface { + return &FakeHorizontalPodAutoscalers{c, namespace} } // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakePolicyV1alpha1) RESTClient() rest.Interface { +func (c *FakeAutoscalingV1) RESTClient() rest.Interface { var ret *rest.RESTClient return ret } diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/autoscaling/v1/fake/fake_horizontalpodautoscaler.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/autoscaling/v1/fake/fake_horizontalpodautoscaler.go new file mode 100644 index 00000000..5a97833e --- /dev/null +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/autoscaling/v1/fake/fake_horizontalpodautoscaler.go @@ -0,0 +1,128 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package fake + +import ( + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + v1 "k8s.io/kubernetes/pkg/apis/autoscaling/v1" + core "k8s.io/kubernetes/pkg/client/testing/core" +) + +// FakeHorizontalPodAutoscalers implements HorizontalPodAutoscalerInterface +type FakeHorizontalPodAutoscalers struct { + Fake *FakeAutoscalingV1 + ns string +} + +var horizontalpodautoscalersResource = schema.GroupVersionResource{Group: "autoscaling", Version: "v1", Resource: "horizontalpodautoscalers"} + +func (c *FakeHorizontalPodAutoscalers) Create(horizontalPodAutoscaler *v1.HorizontalPodAutoscaler) (result *v1.HorizontalPodAutoscaler, err error) { + obj, err := c.Fake. + Invokes(core.NewCreateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &v1.HorizontalPodAutoscaler{}) + + if obj == nil { + return nil, err + } + return obj.(*v1.HorizontalPodAutoscaler), err +} + +func (c *FakeHorizontalPodAutoscalers) Update(horizontalPodAutoscaler *v1.HorizontalPodAutoscaler) (result *v1.HorizontalPodAutoscaler, err error) { + obj, err := c.Fake. + Invokes(core.NewUpdateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &v1.HorizontalPodAutoscaler{}) + + if obj == nil { + return nil, err + } + return obj.(*v1.HorizontalPodAutoscaler), err +} + +func (c *FakeHorizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *v1.HorizontalPodAutoscaler) (*v1.HorizontalPodAutoscaler, error) { + obj, err := c.Fake. + Invokes(core.NewUpdateSubresourceAction(horizontalpodautoscalersResource, "status", c.ns, horizontalPodAutoscaler), &v1.HorizontalPodAutoscaler{}) + + if obj == nil { + return nil, err + } + return obj.(*v1.HorizontalPodAutoscaler), err +} + +func (c *FakeHorizontalPodAutoscalers) Delete(name string, options *meta_v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(core.NewDeleteAction(horizontalpodautoscalersResource, c.ns, name), &v1.HorizontalPodAutoscaler{}) + + return err +} + +func (c *FakeHorizontalPodAutoscalers) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { + action := core.NewDeleteCollectionAction(horizontalpodautoscalersResource, c.ns, listOptions) + + _, err := c.Fake.Invokes(action, &v1.HorizontalPodAutoscalerList{}) + return err +} + +func (c *FakeHorizontalPodAutoscalers) Get(name string, options meta_v1.GetOptions) (result *v1.HorizontalPodAutoscaler, err error) { + obj, err := c.Fake. + Invokes(core.NewGetAction(horizontalpodautoscalersResource, c.ns, name), &v1.HorizontalPodAutoscaler{}) + + if obj == nil { + return nil, err + } + return obj.(*v1.HorizontalPodAutoscaler), err +} + +func (c *FakeHorizontalPodAutoscalers) List(opts meta_v1.ListOptions) (result *v1.HorizontalPodAutoscalerList, err error) { + obj, err := c.Fake. + Invokes(core.NewListAction(horizontalpodautoscalersResource, c.ns, opts), &v1.HorizontalPodAutoscalerList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := core.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1.HorizontalPodAutoscalerList{} + for _, item := range obj.(*v1.HorizontalPodAutoscalerList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers. +func (c *FakeHorizontalPodAutoscalers) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(core.NewWatchAction(horizontalpodautoscalersResource, c.ns, opts)) + +} + +// Patch applies the patch and returns the patched horizontalPodAutoscaler. +func (c *FakeHorizontalPodAutoscalers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.HorizontalPodAutoscaler, err error) { + obj, err := c.Fake. + Invokes(core.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, name, data, subresources...), &v1.HorizontalPodAutoscaler{}) + + if obj == nil { + return nil, err + } + return obj.(*v1.HorizontalPodAutoscaler), err +} diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/generated_expansion.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/autoscaling/v1/generated_expansion.go similarity index 83% rename from vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/generated_expansion.go rename to vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/autoscaling/v1/generated_expansion.go index a2e74c84..effefbd5 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/generated_expansion.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/autoscaling/v1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package v1 -type PodDisruptionBudgetExpansion interface{} +type HorizontalPodAutoscalerExpansion interface{} diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/autoscaling/v1/horizontalpodautoscaler.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/autoscaling/v1/horizontalpodautoscaler.go new file mode 100644 index 00000000..c0891dd5 --- /dev/null +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/autoscaling/v1/horizontalpodautoscaler.go @@ -0,0 +1,172 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" + api "k8s.io/kubernetes/pkg/api" + v1 "k8s.io/kubernetes/pkg/apis/autoscaling/v1" +) + +// HorizontalPodAutoscalersGetter has a method to return a HorizontalPodAutoscalerInterface. +// A group's client should implement this interface. +type HorizontalPodAutoscalersGetter interface { + HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerInterface +} + +// HorizontalPodAutoscalerInterface has methods to work with HorizontalPodAutoscaler resources. +type HorizontalPodAutoscalerInterface interface { + Create(*v1.HorizontalPodAutoscaler) (*v1.HorizontalPodAutoscaler, error) + Update(*v1.HorizontalPodAutoscaler) (*v1.HorizontalPodAutoscaler, error) + UpdateStatus(*v1.HorizontalPodAutoscaler) (*v1.HorizontalPodAutoscaler, error) + Delete(name string, options *meta_v1.DeleteOptions) error + DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error + Get(name string, options meta_v1.GetOptions) (*v1.HorizontalPodAutoscaler, error) + List(opts meta_v1.ListOptions) (*v1.HorizontalPodAutoscalerList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.HorizontalPodAutoscaler, err error) + HorizontalPodAutoscalerExpansion +} + +// horizontalPodAutoscalers implements HorizontalPodAutoscalerInterface +type horizontalPodAutoscalers struct { + client rest.Interface + ns string +} + +// newHorizontalPodAutoscalers returns a HorizontalPodAutoscalers +func newHorizontalPodAutoscalers(c *AutoscalingV1Client, namespace string) *horizontalPodAutoscalers { + return &horizontalPodAutoscalers{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Create takes the representation of a horizontalPodAutoscaler and creates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any. +func (c *horizontalPodAutoscalers) Create(horizontalPodAutoscaler *v1.HorizontalPodAutoscaler) (result *v1.HorizontalPodAutoscaler, err error) { + result = &v1.HorizontalPodAutoscaler{} + err = c.client.Post(). + Namespace(c.ns). + Resource("horizontalpodautoscalers"). + Body(horizontalPodAutoscaler). + Do(). + Into(result) + return +} + +// Update takes the representation of a horizontalPodAutoscaler and updates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any. +func (c *horizontalPodAutoscalers) Update(horizontalPodAutoscaler *v1.HorizontalPodAutoscaler) (result *v1.HorizontalPodAutoscaler, err error) { + result = &v1.HorizontalPodAutoscaler{} + err = c.client.Put(). + Namespace(c.ns). + Resource("horizontalpodautoscalers"). + Name(horizontalPodAutoscaler.Name). + Body(horizontalPodAutoscaler). + Do(). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus(). + +func (c *horizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *v1.HorizontalPodAutoscaler) (result *v1.HorizontalPodAutoscaler, err error) { + result = &v1.HorizontalPodAutoscaler{} + err = c.client.Put(). + Namespace(c.ns). + Resource("horizontalpodautoscalers"). + Name(horizontalPodAutoscaler.Name). + SubResource("status"). + Body(horizontalPodAutoscaler). + Do(). + Into(result) + return +} + +// Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs. +func (c *horizontalPodAutoscalers) Delete(name string, options *meta_v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("horizontalpodautoscalers"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *horizontalPodAutoscalers) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("horizontalpodautoscalers"). + VersionedParams(&listOptions, api.ParameterCodec). + Body(options). + Do(). + Error() +} + +// Get takes name of the horizontalPodAutoscaler, and returns the corresponding horizontalPodAutoscaler object, and an error if there is any. +func (c *horizontalPodAutoscalers) Get(name string, options meta_v1.GetOptions) (result *v1.HorizontalPodAutoscaler, err error) { + result = &v1.HorizontalPodAutoscaler{} + err = c.client.Get(). + Namespace(c.ns). + Resource("horizontalpodautoscalers"). + Name(name). + VersionedParams(&options, api.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors. +func (c *horizontalPodAutoscalers) List(opts meta_v1.ListOptions) (result *v1.HorizontalPodAutoscalerList, err error) { + result = &v1.HorizontalPodAutoscalerList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("horizontalpodautoscalers"). + VersionedParams(&opts, api.ParameterCodec). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers. +func (c *horizontalPodAutoscalers) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { + return c.client.Get(). + Prefix("watch"). + Namespace(c.ns). + Resource("horizontalpodautoscalers"). + VersionedParams(&opts, api.ParameterCodec). + Watch() +} + +// Patch applies the patch and returns the patched horizontalPodAutoscaler. +func (c *horizontalPodAutoscalers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.HorizontalPodAutoscaler, err error) { + result = &v1.HorizontalPodAutoscaler{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("horizontalpodautoscalers"). + SubResource(subresources...). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/batch/v1/BUILD b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/batch/v1/BUILD index eb4f7d4b..5cc3bbff 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/batch/v1/BUILD +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/batch/v1/BUILD @@ -18,13 +18,13 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/api:go_default_library", - "//pkg/api/v1:go_default_library", "//pkg/apis/batch/v1:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/runtime/serializer", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/batch/v1/batch_client.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/batch/v1/batch_client.go index def6f1e3..2c1dba16 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/batch/v1/batch_client.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/batch/v1/batch_client.go @@ -20,18 +20,18 @@ import ( fmt "fmt" schema "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type BatchV1Interface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface JobsGetter } // BatchV1Client is used to interact with features provided by the batch group. type BatchV1Client struct { - restClient restclient.Interface + restClient rest.Interface } func (c *BatchV1Client) Jobs(namespace string) JobInterface { @@ -39,12 +39,12 @@ func (c *BatchV1Client) Jobs(namespace string) JobInterface { } // NewForConfig creates a new BatchV1Client for the given config. -func NewForConfig(c *restclient.Config) (*BatchV1Client, error) { +func NewForConfig(c *rest.Config) (*BatchV1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -53,7 +53,7 @@ func NewForConfig(c *restclient.Config) (*BatchV1Client, error) { // NewForConfigOrDie creates a new BatchV1Client for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *BatchV1Client { +func NewForConfigOrDie(c *rest.Config) *BatchV1Client { client, err := NewForConfig(c) if err != nil { panic(err) @@ -62,11 +62,11 @@ func NewForConfigOrDie(c *restclient.Config) *BatchV1Client { } // New creates a new BatchV1Client for the given RESTClient. -func New(c restclient.Interface) *BatchV1Client { +func New(c rest.Interface) *BatchV1Client { return &BatchV1Client{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { gv, err := schema.ParseGroupVersion("batch/v1") if err != nil { return err @@ -77,7 +77,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/apis" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } copyGroupVersion := gv config.GroupVersion = ©GroupVersion @@ -89,7 +89,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *BatchV1Client) RESTClient() restclient.Interface { +func (c *BatchV1Client) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/batch/v1/doc.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/batch/v1/doc.go index 1416283f..7205930b 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/batch/v1/doc.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/batch/v1/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1] +// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job,autoscaling/v1/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1,autoscaling/v1] // This package has the automatically generated typed clients. package v1 diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/batch/v1/fake/BUILD b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/batch/v1/fake/BUILD index 13b6e1d5..b43c984a 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/batch/v1/fake/BUILD +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/batch/v1/fake/BUILD @@ -17,15 +17,14 @@ go_library( tags = ["automanaged"], deps = [ "//federation/client/clientset_generated/federation_clientset/typed/batch/v1:go_default_library", - "//pkg/api:go_default_library", - "//pkg/api/v1:go_default_library", "//pkg/apis/batch/v1:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/batch/v1/fake/doc.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/batch/v1/fake/doc.go index 0a5c6b14..91682eb2 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/batch/v1/fake/doc.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/batch/v1/fake/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1] +// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job,autoscaling/v1/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1,autoscaling/v1] // Package fake has the automatically generated clients. package fake diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/batch/v1/fake/fake_batch_client.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/batch/v1/fake/fake_batch_client.go index 0e3ac228..6cdcb989 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/batch/v1/fake/fake_batch_client.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/batch/v1/fake/fake_batch_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" v1 "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/batch/v1" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -32,7 +32,7 @@ func (c *FakeBatchV1) Jobs(namespace string) v1.JobInterface { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeBatchV1) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeBatchV1) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/batch/v1/fake/fake_job.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/batch/v1/fake/fake_job.go index 87d4e73b..5537b124 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/batch/v1/fake/fake_job.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/batch/v1/fake/fake_job.go @@ -20,9 +20,8 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" - api_v1 "k8s.io/kubernetes/pkg/api/v1" v1 "k8s.io/kubernetes/pkg/apis/batch/v1" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -65,14 +64,14 @@ func (c *FakeJobs) UpdateStatus(job *v1.Job) (*v1.Job, error) { return obj.(*v1.Job), err } -func (c *FakeJobs) Delete(name string, options *api_v1.DeleteOptions) error { +func (c *FakeJobs) Delete(name string, options *meta_v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewDeleteAction(jobsResource, c.ns, name), &v1.Job{}) return err } -func (c *FakeJobs) DeleteCollection(options *api_v1.DeleteOptions, listOptions api_v1.ListOptions) error { +func (c *FakeJobs) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { action := core.NewDeleteCollectionAction(jobsResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &v1.JobList{}) @@ -89,7 +88,7 @@ func (c *FakeJobs) Get(name string, options meta_v1.GetOptions) (result *v1.Job, return obj.(*v1.Job), err } -func (c *FakeJobs) List(opts api_v1.ListOptions) (result *v1.JobList, err error) { +func (c *FakeJobs) List(opts meta_v1.ListOptions) (result *v1.JobList, err error) { obj, err := c.Fake. Invokes(core.NewListAction(jobsResource, c.ns, opts), &v1.JobList{}) @@ -111,14 +110,14 @@ func (c *FakeJobs) List(opts api_v1.ListOptions) (result *v1.JobList, err error) } // Watch returns a watch.Interface that watches the requested jobs. -func (c *FakeJobs) Watch(opts api_v1.ListOptions) (watch.Interface, error) { +func (c *FakeJobs) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewWatchAction(jobsResource, c.ns, opts)) } // Patch applies the patch and returns the patched job. -func (c *FakeJobs) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Job, err error) { +func (c *FakeJobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Job, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(jobsResource, c.ns, name, data, subresources...), &v1.Job{}) diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/batch/v1/job.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/batch/v1/job.go index 85a42fb8..ad38e23e 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/batch/v1/job.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/batch/v1/job.go @@ -18,11 +18,11 @@ package v1 import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - api_v1 "k8s.io/kubernetes/pkg/api/v1" v1 "k8s.io/kubernetes/pkg/apis/batch/v1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // JobsGetter has a method to return a JobInterface. @@ -36,18 +36,18 @@ type JobInterface interface { Create(*v1.Job) (*v1.Job, error) Update(*v1.Job) (*v1.Job, error) UpdateStatus(*v1.Job) (*v1.Job, error) - Delete(name string, options *api_v1.DeleteOptions) error - DeleteCollection(options *api_v1.DeleteOptions, listOptions api_v1.ListOptions) error + Delete(name string, options *meta_v1.DeleteOptions) error + DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error Get(name string, options meta_v1.GetOptions) (*v1.Job, error) - List(opts api_v1.ListOptions) (*v1.JobList, error) - Watch(opts api_v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Job, err error) + List(opts meta_v1.ListOptions) (*v1.JobList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Job, err error) JobExpansion } // jobs implements JobInterface type jobs struct { - client restclient.Interface + client rest.Interface ns string } @@ -101,7 +101,7 @@ func (c *jobs) UpdateStatus(job *v1.Job) (result *v1.Job, err error) { } // Delete takes name of the job and deletes it. Returns an error if one occurs. -func (c *jobs) Delete(name string, options *api_v1.DeleteOptions) error { +func (c *jobs) Delete(name string, options *meta_v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("jobs"). @@ -112,7 +112,7 @@ func (c *jobs) Delete(name string, options *api_v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *jobs) DeleteCollection(options *api_v1.DeleteOptions, listOptions api_v1.ListOptions) error { +func (c *jobs) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("jobs"). @@ -136,7 +136,7 @@ func (c *jobs) Get(name string, options meta_v1.GetOptions) (result *v1.Job, err } // List takes label and field selectors, and returns the list of Jobs that match those selectors. -func (c *jobs) List(opts api_v1.ListOptions) (result *v1.JobList, err error) { +func (c *jobs) List(opts meta_v1.ListOptions) (result *v1.JobList, err error) { result = &v1.JobList{} err = c.client.Get(). Namespace(c.ns). @@ -148,7 +148,7 @@ func (c *jobs) List(opts api_v1.ListOptions) (result *v1.JobList, err error) { } // Watch returns a watch.Interface that watches the requested jobs. -func (c *jobs) Watch(opts api_v1.ListOptions) (watch.Interface, error) { +func (c *jobs) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -158,7 +158,7 @@ func (c *jobs) Watch(opts api_v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched job. -func (c *jobs) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Job, err error) { +func (c *jobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Job, err error) { result = &v1.Job{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/BUILD b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/BUILD index 31b0e4dd..65a5de4c 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/BUILD +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/BUILD @@ -24,11 +24,12 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/api/v1:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/runtime/serializer", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/configmap.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/configmap.go index ccd1a9fe..05ea6339 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/configmap.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/configmap.go @@ -18,10 +18,11 @@ package v1 import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // ConfigMapsGetter has a method to return a ConfigMapInterface. @@ -34,18 +35,18 @@ type ConfigMapsGetter interface { type ConfigMapInterface interface { Create(*v1.ConfigMap) (*v1.ConfigMap, error) Update(*v1.ConfigMap) (*v1.ConfigMap, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Delete(name string, options *meta_v1.DeleteOptions) error + DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error Get(name string, options meta_v1.GetOptions) (*v1.ConfigMap, error) - List(opts v1.ListOptions) (*v1.ConfigMapList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ConfigMap, err error) + List(opts meta_v1.ListOptions) (*v1.ConfigMapList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ConfigMap, err error) ConfigMapExpansion } // configMaps implements ConfigMapInterface type configMaps struct { - client restclient.Interface + client rest.Interface ns string } @@ -83,7 +84,7 @@ func (c *configMaps) Update(configMap *v1.ConfigMap) (result *v1.ConfigMap, err } // Delete takes name of the configMap and deletes it. Returns an error if one occurs. -func (c *configMaps) Delete(name string, options *v1.DeleteOptions) error { +func (c *configMaps) Delete(name string, options *meta_v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("configmaps"). @@ -94,7 +95,7 @@ func (c *configMaps) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *configMaps) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *configMaps) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("configmaps"). @@ -118,7 +119,7 @@ func (c *configMaps) Get(name string, options meta_v1.GetOptions) (result *v1.Co } // List takes label and field selectors, and returns the list of ConfigMaps that match those selectors. -func (c *configMaps) List(opts v1.ListOptions) (result *v1.ConfigMapList, err error) { +func (c *configMaps) List(opts meta_v1.ListOptions) (result *v1.ConfigMapList, err error) { result = &v1.ConfigMapList{} err = c.client.Get(). Namespace(c.ns). @@ -130,7 +131,7 @@ func (c *configMaps) List(opts v1.ListOptions) (result *v1.ConfigMapList, err er } // Watch returns a watch.Interface that watches the requested configMaps. -func (c *configMaps) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *configMaps) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -140,7 +141,7 @@ func (c *configMaps) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched configMap. -func (c *configMaps) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ConfigMap, err error) { +func (c *configMaps) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ConfigMap, err error) { result = &v1.ConfigMap{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/core_client.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/core_client.go index 93245f8b..ad08c466 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/core_client.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/core_client.go @@ -20,12 +20,12 @@ import ( fmt "fmt" schema "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type CoreV1Interface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface ConfigMapsGetter EventsGetter NamespacesGetter @@ -35,7 +35,7 @@ type CoreV1Interface interface { // CoreV1Client is used to interact with features provided by the group. type CoreV1Client struct { - restClient restclient.Interface + restClient rest.Interface } func (c *CoreV1Client) ConfigMaps(namespace string) ConfigMapInterface { @@ -59,12 +59,12 @@ func (c *CoreV1Client) Services(namespace string) ServiceInterface { } // NewForConfig creates a new CoreV1Client for the given config. -func NewForConfig(c *restclient.Config) (*CoreV1Client, error) { +func NewForConfig(c *rest.Config) (*CoreV1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -73,7 +73,7 @@ func NewForConfig(c *restclient.Config) (*CoreV1Client, error) { // NewForConfigOrDie creates a new CoreV1Client for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *CoreV1Client { +func NewForConfigOrDie(c *rest.Config) *CoreV1Client { client, err := NewForConfig(c) if err != nil { panic(err) @@ -82,11 +82,11 @@ func NewForConfigOrDie(c *restclient.Config) *CoreV1Client { } // New creates a new CoreV1Client for the given RESTClient. -func New(c restclient.Interface) *CoreV1Client { +func New(c rest.Interface) *CoreV1Client { return &CoreV1Client{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { gv, err := schema.ParseGroupVersion("/v1") if err != nil { return err @@ -97,7 +97,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/api" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } copyGroupVersion := gv config.GroupVersion = ©GroupVersion @@ -109,7 +109,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *CoreV1Client) RESTClient() restclient.Interface { +func (c *CoreV1Client) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/doc.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/doc.go index 1416283f..7205930b 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/doc.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1] +// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job,autoscaling/v1/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1,autoscaling/v1] // This package has the automatically generated typed clients. package v1 diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/event.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/event.go index 9f029cf5..0d103dae 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/event.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/event.go @@ -18,10 +18,11 @@ package v1 import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // EventsGetter has a method to return a EventInterface. @@ -34,18 +35,18 @@ type EventsGetter interface { type EventInterface interface { Create(*v1.Event) (*v1.Event, error) Update(*v1.Event) (*v1.Event, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Delete(name string, options *meta_v1.DeleteOptions) error + DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error Get(name string, options meta_v1.GetOptions) (*v1.Event, error) - List(opts v1.ListOptions) (*v1.EventList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Event, err error) + List(opts meta_v1.ListOptions) (*v1.EventList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Event, err error) EventExpansion } // events implements EventInterface type events struct { - client restclient.Interface + client rest.Interface ns string } @@ -83,7 +84,7 @@ func (c *events) Update(event *v1.Event) (result *v1.Event, err error) { } // Delete takes name of the event and deletes it. Returns an error if one occurs. -func (c *events) Delete(name string, options *v1.DeleteOptions) error { +func (c *events) Delete(name string, options *meta_v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("events"). @@ -94,7 +95,7 @@ func (c *events) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *events) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *events) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("events"). @@ -118,7 +119,7 @@ func (c *events) Get(name string, options meta_v1.GetOptions) (result *v1.Event, } // List takes label and field selectors, and returns the list of Events that match those selectors. -func (c *events) List(opts v1.ListOptions) (result *v1.EventList, err error) { +func (c *events) List(opts meta_v1.ListOptions) (result *v1.EventList, err error) { result = &v1.EventList{} err = c.client.Get(). Namespace(c.ns). @@ -130,7 +131,7 @@ func (c *events) List(opts v1.ListOptions) (result *v1.EventList, err error) { } // Watch returns a watch.Interface that watches the requested events. -func (c *events) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *events) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -140,7 +141,7 @@ func (c *events) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched event. -func (c *events) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Event, err error) { +func (c *events) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Event, err error) { result = &v1.Event{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/fake/BUILD b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/fake/BUILD index 7cbda764..5b30c920 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/fake/BUILD +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/fake/BUILD @@ -22,14 +22,14 @@ go_library( tags = ["automanaged"], deps = [ "//federation/client/clientset_generated/federation_clientset/typed/core/v1:go_default_library", - "//pkg/api:go_default_library", "//pkg/api/v1:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/fake/doc.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/fake/doc.go index 0a5c6b14..91682eb2 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/fake/doc.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/fake/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1] +// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job,autoscaling/v1/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1,autoscaling/v1] // Package fake has the automatically generated clients. package fake diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/fake/fake_configmap.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/fake/fake_configmap.go index 450d4303..a320a452 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/fake/fake_configmap.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/fake/fake_configmap.go @@ -20,8 +20,8 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -54,14 +54,14 @@ func (c *FakeConfigMaps) Update(configMap *v1.ConfigMap) (result *v1.ConfigMap, return obj.(*v1.ConfigMap), err } -func (c *FakeConfigMaps) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeConfigMaps) Delete(name string, options *meta_v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewDeleteAction(configmapsResource, c.ns, name), &v1.ConfigMap{}) return err } -func (c *FakeConfigMaps) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *FakeConfigMaps) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { action := core.NewDeleteCollectionAction(configmapsResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &v1.ConfigMapList{}) @@ -78,7 +78,7 @@ func (c *FakeConfigMaps) Get(name string, options meta_v1.GetOptions) (result *v return obj.(*v1.ConfigMap), err } -func (c *FakeConfigMaps) List(opts v1.ListOptions) (result *v1.ConfigMapList, err error) { +func (c *FakeConfigMaps) List(opts meta_v1.ListOptions) (result *v1.ConfigMapList, err error) { obj, err := c.Fake. Invokes(core.NewListAction(configmapsResource, c.ns, opts), &v1.ConfigMapList{}) @@ -100,14 +100,14 @@ func (c *FakeConfigMaps) List(opts v1.ListOptions) (result *v1.ConfigMapList, er } // Watch returns a watch.Interface that watches the requested configMaps. -func (c *FakeConfigMaps) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeConfigMaps) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewWatchAction(configmapsResource, c.ns, opts)) } // Patch applies the patch and returns the patched configMap. -func (c *FakeConfigMaps) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ConfigMap, err error) { +func (c *FakeConfigMaps) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ConfigMap, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(configmapsResource, c.ns, name, data, subresources...), &v1.ConfigMap{}) diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/fake/fake_core_client.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/fake/fake_core_client.go index 3fcd8b59..a95b91b6 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/fake/fake_core_client.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/fake/fake_core_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" v1 "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -48,7 +48,7 @@ func (c *FakeCoreV1) Services(namespace string) v1.ServiceInterface { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeCoreV1) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeCoreV1) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/fake/fake_event.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/fake/fake_event.go index dafa4623..611300ee 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/fake/fake_event.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/fake/fake_event.go @@ -20,8 +20,8 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -54,14 +54,14 @@ func (c *FakeEvents) Update(event *v1.Event) (result *v1.Event, err error) { return obj.(*v1.Event), err } -func (c *FakeEvents) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeEvents) Delete(name string, options *meta_v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewDeleteAction(eventsResource, c.ns, name), &v1.Event{}) return err } -func (c *FakeEvents) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *FakeEvents) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { action := core.NewDeleteCollectionAction(eventsResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &v1.EventList{}) @@ -78,7 +78,7 @@ func (c *FakeEvents) Get(name string, options meta_v1.GetOptions) (result *v1.Ev return obj.(*v1.Event), err } -func (c *FakeEvents) List(opts v1.ListOptions) (result *v1.EventList, err error) { +func (c *FakeEvents) List(opts meta_v1.ListOptions) (result *v1.EventList, err error) { obj, err := c.Fake. Invokes(core.NewListAction(eventsResource, c.ns, opts), &v1.EventList{}) @@ -100,14 +100,14 @@ func (c *FakeEvents) List(opts v1.ListOptions) (result *v1.EventList, err error) } // Watch returns a watch.Interface that watches the requested events. -func (c *FakeEvents) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeEvents) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewWatchAction(eventsResource, c.ns, opts)) } // Patch applies the patch and returns the patched event. -func (c *FakeEvents) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Event, err error) { +func (c *FakeEvents) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Event, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(eventsResource, c.ns, name, data, subresources...), &v1.Event{}) diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/fake/fake_namespace.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/fake/fake_namespace.go index d52b73cf..90c6bbd6 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/fake/fake_namespace.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/fake/fake_namespace.go @@ -20,8 +20,8 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -60,13 +60,13 @@ func (c *FakeNamespaces) UpdateStatus(namespace *v1.Namespace) (*v1.Namespace, e return obj.(*v1.Namespace), err } -func (c *FakeNamespaces) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeNamespaces) Delete(name string, options *meta_v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewRootDeleteAction(namespacesResource, name), &v1.Namespace{}) return err } -func (c *FakeNamespaces) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *FakeNamespaces) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { action := core.NewRootDeleteCollectionAction(namespacesResource, listOptions) _, err := c.Fake.Invokes(action, &v1.NamespaceList{}) @@ -82,7 +82,7 @@ func (c *FakeNamespaces) Get(name string, options meta_v1.GetOptions) (result *v return obj.(*v1.Namespace), err } -func (c *FakeNamespaces) List(opts v1.ListOptions) (result *v1.NamespaceList, err error) { +func (c *FakeNamespaces) List(opts meta_v1.ListOptions) (result *v1.NamespaceList, err error) { obj, err := c.Fake. Invokes(core.NewRootListAction(namespacesResource, opts), &v1.NamespaceList{}) if obj == nil { @@ -103,13 +103,13 @@ func (c *FakeNamespaces) List(opts v1.ListOptions) (result *v1.NamespaceList, er } // Watch returns a watch.Interface that watches the requested namespaces. -func (c *FakeNamespaces) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeNamespaces) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewRootWatchAction(namespacesResource, opts)) } // Patch applies the patch and returns the patched namespace. -func (c *FakeNamespaces) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Namespace, err error) { +func (c *FakeNamespaces) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Namespace, err error) { obj, err := c.Fake. Invokes(core.NewRootPatchSubresourceAction(namespacesResource, name, data, subresources...), &v1.Namespace{}) if obj == nil { diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/fake/fake_secret.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/fake/fake_secret.go index 969cb75e..9ed22038 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/fake/fake_secret.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/fake/fake_secret.go @@ -20,8 +20,8 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -54,14 +54,14 @@ func (c *FakeSecrets) Update(secret *v1.Secret) (result *v1.Secret, err error) { return obj.(*v1.Secret), err } -func (c *FakeSecrets) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeSecrets) Delete(name string, options *meta_v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewDeleteAction(secretsResource, c.ns, name), &v1.Secret{}) return err } -func (c *FakeSecrets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *FakeSecrets) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { action := core.NewDeleteCollectionAction(secretsResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &v1.SecretList{}) @@ -78,7 +78,7 @@ func (c *FakeSecrets) Get(name string, options meta_v1.GetOptions) (result *v1.S return obj.(*v1.Secret), err } -func (c *FakeSecrets) List(opts v1.ListOptions) (result *v1.SecretList, err error) { +func (c *FakeSecrets) List(opts meta_v1.ListOptions) (result *v1.SecretList, err error) { obj, err := c.Fake. Invokes(core.NewListAction(secretsResource, c.ns, opts), &v1.SecretList{}) @@ -100,14 +100,14 @@ func (c *FakeSecrets) List(opts v1.ListOptions) (result *v1.SecretList, err erro } // Watch returns a watch.Interface that watches the requested secrets. -func (c *FakeSecrets) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeSecrets) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewWatchAction(secretsResource, c.ns, opts)) } // Patch applies the patch and returns the patched secret. -func (c *FakeSecrets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Secret, err error) { +func (c *FakeSecrets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Secret, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(secretsResource, c.ns, name, data, subresources...), &v1.Secret{}) diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/fake/fake_service.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/fake/fake_service.go index 422748c5..ba891a36 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/fake/fake_service.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/fake/fake_service.go @@ -20,8 +20,8 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -64,14 +64,14 @@ func (c *FakeServices) UpdateStatus(service *v1.Service) (*v1.Service, error) { return obj.(*v1.Service), err } -func (c *FakeServices) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeServices) Delete(name string, options *meta_v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewDeleteAction(servicesResource, c.ns, name), &v1.Service{}) return err } -func (c *FakeServices) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *FakeServices) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { action := core.NewDeleteCollectionAction(servicesResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &v1.ServiceList{}) @@ -88,7 +88,7 @@ func (c *FakeServices) Get(name string, options meta_v1.GetOptions) (result *v1. return obj.(*v1.Service), err } -func (c *FakeServices) List(opts v1.ListOptions) (result *v1.ServiceList, err error) { +func (c *FakeServices) List(opts meta_v1.ListOptions) (result *v1.ServiceList, err error) { obj, err := c.Fake. Invokes(core.NewListAction(servicesResource, c.ns, opts), &v1.ServiceList{}) @@ -110,14 +110,14 @@ func (c *FakeServices) List(opts v1.ListOptions) (result *v1.ServiceList, err er } // Watch returns a watch.Interface that watches the requested services. -func (c *FakeServices) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeServices) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewWatchAction(servicesResource, c.ns, opts)) } // Patch applies the patch and returns the patched service. -func (c *FakeServices) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Service, err error) { +func (c *FakeServices) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Service, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(servicesResource, c.ns, name, data, subresources...), &v1.Service{}) diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/namespace.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/namespace.go index 857c958c..ce3a7a34 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/namespace.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/namespace.go @@ -18,10 +18,11 @@ package v1 import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // NamespacesGetter has a method to return a NamespaceInterface. @@ -35,18 +36,18 @@ type NamespaceInterface interface { Create(*v1.Namespace) (*v1.Namespace, error) Update(*v1.Namespace) (*v1.Namespace, error) UpdateStatus(*v1.Namespace) (*v1.Namespace, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Delete(name string, options *meta_v1.DeleteOptions) error + DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error Get(name string, options meta_v1.GetOptions) (*v1.Namespace, error) - List(opts v1.ListOptions) (*v1.NamespaceList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Namespace, err error) + List(opts meta_v1.ListOptions) (*v1.NamespaceList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Namespace, err error) NamespaceExpansion } // namespaces implements NamespaceInterface type namespaces struct { - client restclient.Interface + client rest.Interface } // newNamespaces returns a Namespaces @@ -95,7 +96,7 @@ func (c *namespaces) UpdateStatus(namespace *v1.Namespace) (result *v1.Namespace } // Delete takes name of the namespace and deletes it. Returns an error if one occurs. -func (c *namespaces) Delete(name string, options *v1.DeleteOptions) error { +func (c *namespaces) Delete(name string, options *meta_v1.DeleteOptions) error { return c.client.Delete(). Resource("namespaces"). Name(name). @@ -105,7 +106,7 @@ func (c *namespaces) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *namespaces) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *namespaces) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Resource("namespaces"). VersionedParams(&listOptions, api.ParameterCodec). @@ -127,7 +128,7 @@ func (c *namespaces) Get(name string, options meta_v1.GetOptions) (result *v1.Na } // List takes label and field selectors, and returns the list of Namespaces that match those selectors. -func (c *namespaces) List(opts v1.ListOptions) (result *v1.NamespaceList, err error) { +func (c *namespaces) List(opts meta_v1.ListOptions) (result *v1.NamespaceList, err error) { result = &v1.NamespaceList{} err = c.client.Get(). Resource("namespaces"). @@ -138,7 +139,7 @@ func (c *namespaces) List(opts v1.ListOptions) (result *v1.NamespaceList, err er } // Watch returns a watch.Interface that watches the requested namespaces. -func (c *namespaces) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *namespaces) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Resource("namespaces"). @@ -147,7 +148,7 @@ func (c *namespaces) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched namespace. -func (c *namespaces) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Namespace, err error) { +func (c *namespaces) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Namespace, err error) { result = &v1.Namespace{} err = c.client.Patch(pt). Resource("namespaces"). diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/secret.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/secret.go index ff24378d..2d2bb0fa 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/secret.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/secret.go @@ -18,10 +18,11 @@ package v1 import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // SecretsGetter has a method to return a SecretInterface. @@ -34,18 +35,18 @@ type SecretsGetter interface { type SecretInterface interface { Create(*v1.Secret) (*v1.Secret, error) Update(*v1.Secret) (*v1.Secret, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Delete(name string, options *meta_v1.DeleteOptions) error + DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error Get(name string, options meta_v1.GetOptions) (*v1.Secret, error) - List(opts v1.ListOptions) (*v1.SecretList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Secret, err error) + List(opts meta_v1.ListOptions) (*v1.SecretList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Secret, err error) SecretExpansion } // secrets implements SecretInterface type secrets struct { - client restclient.Interface + client rest.Interface ns string } @@ -83,7 +84,7 @@ func (c *secrets) Update(secret *v1.Secret) (result *v1.Secret, err error) { } // Delete takes name of the secret and deletes it. Returns an error if one occurs. -func (c *secrets) Delete(name string, options *v1.DeleteOptions) error { +func (c *secrets) Delete(name string, options *meta_v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("secrets"). @@ -94,7 +95,7 @@ func (c *secrets) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *secrets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *secrets) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("secrets"). @@ -118,7 +119,7 @@ func (c *secrets) Get(name string, options meta_v1.GetOptions) (result *v1.Secre } // List takes label and field selectors, and returns the list of Secrets that match those selectors. -func (c *secrets) List(opts v1.ListOptions) (result *v1.SecretList, err error) { +func (c *secrets) List(opts meta_v1.ListOptions) (result *v1.SecretList, err error) { result = &v1.SecretList{} err = c.client.Get(). Namespace(c.ns). @@ -130,7 +131,7 @@ func (c *secrets) List(opts v1.ListOptions) (result *v1.SecretList, err error) { } // Watch returns a watch.Interface that watches the requested secrets. -func (c *secrets) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *secrets) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -140,7 +141,7 @@ func (c *secrets) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched secret. -func (c *secrets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Secret, err error) { +func (c *secrets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Secret, err error) { result = &v1.Secret{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/service.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/service.go index f1e8f733..489c0d48 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/service.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/core/v1/service.go @@ -18,10 +18,11 @@ package v1 import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // ServicesGetter has a method to return a ServiceInterface. @@ -35,18 +36,18 @@ type ServiceInterface interface { Create(*v1.Service) (*v1.Service, error) Update(*v1.Service) (*v1.Service, error) UpdateStatus(*v1.Service) (*v1.Service, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Delete(name string, options *meta_v1.DeleteOptions) error + DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error Get(name string, options meta_v1.GetOptions) (*v1.Service, error) - List(opts v1.ListOptions) (*v1.ServiceList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Service, err error) + List(opts meta_v1.ListOptions) (*v1.ServiceList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Service, err error) ServiceExpansion } // services implements ServiceInterface type services struct { - client restclient.Interface + client rest.Interface ns string } @@ -100,7 +101,7 @@ func (c *services) UpdateStatus(service *v1.Service) (result *v1.Service, err er } // Delete takes name of the service and deletes it. Returns an error if one occurs. -func (c *services) Delete(name string, options *v1.DeleteOptions) error { +func (c *services) Delete(name string, options *meta_v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("services"). @@ -111,7 +112,7 @@ func (c *services) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *services) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *services) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("services"). @@ -135,7 +136,7 @@ func (c *services) Get(name string, options meta_v1.GetOptions) (result *v1.Serv } // List takes label and field selectors, and returns the list of Services that match those selectors. -func (c *services) List(opts v1.ListOptions) (result *v1.ServiceList, err error) { +func (c *services) List(opts meta_v1.ListOptions) (result *v1.ServiceList, err error) { result = &v1.ServiceList{} err = c.client.Get(). Namespace(c.ns). @@ -147,7 +148,7 @@ func (c *services) List(opts v1.ListOptions) (result *v1.ServiceList, err error) } // Watch returns a watch.Interface that watches the requested services. -func (c *services) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *services) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -157,7 +158,7 @@ func (c *services) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched service. -func (c *services) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Service, err error) { +func (c *services) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Service, err error) { result = &v1.Service{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/BUILD b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/BUILD index e694c46d..aab8bc98 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/BUILD +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/BUILD @@ -22,13 +22,13 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/api:go_default_library", - "//pkg/api/v1:go_default_library", "//pkg/apis/extensions/v1beta1:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/runtime/serializer", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/daemonset.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/daemonset.go index a777b86f..54690c48 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/daemonset.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/daemonset.go @@ -17,12 +17,12 @@ limitations under the License. package v1beta1 import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // DaemonSetsGetter has a method to return a DaemonSetInterface. @@ -38,16 +38,16 @@ type DaemonSetInterface interface { UpdateStatus(*v1beta1.DaemonSet) (*v1beta1.DaemonSet, error) Delete(name string, options *v1.DeleteOptions) error DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options meta_v1.GetOptions) (*v1beta1.DaemonSet, error) + Get(name string, options v1.GetOptions) (*v1beta1.DaemonSet, error) List(opts v1.ListOptions) (*v1beta1.DaemonSetList, error) Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.DaemonSet, err error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.DaemonSet, err error) DaemonSetExpansion } // daemonSets implements DaemonSetInterface type daemonSets struct { - client restclient.Interface + client rest.Interface ns string } @@ -123,7 +123,7 @@ func (c *daemonSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1. } // Get takes name of the daemonSet, and returns the corresponding daemonSet object, and an error if there is any. -func (c *daemonSets) Get(name string, options meta_v1.GetOptions) (result *v1beta1.DaemonSet, err error) { +func (c *daemonSets) Get(name string, options v1.GetOptions) (result *v1beta1.DaemonSet, err error) { result = &v1beta1.DaemonSet{} err = c.client.Get(). Namespace(c.ns). @@ -158,7 +158,7 @@ func (c *daemonSets) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched daemonSet. -func (c *daemonSets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.DaemonSet, err error) { +func (c *daemonSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.DaemonSet, err error) { result = &v1beta1.DaemonSet{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/deployment.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/deployment.go index 37397b38..fa786296 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/deployment.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/deployment.go @@ -17,12 +17,12 @@ limitations under the License. package v1beta1 import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // DeploymentsGetter has a method to return a DeploymentInterface. @@ -38,16 +38,16 @@ type DeploymentInterface interface { UpdateStatus(*v1beta1.Deployment) (*v1beta1.Deployment, error) Delete(name string, options *v1.DeleteOptions) error DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options meta_v1.GetOptions) (*v1beta1.Deployment, error) + Get(name string, options v1.GetOptions) (*v1beta1.Deployment, error) List(opts v1.ListOptions) (*v1beta1.DeploymentList, error) Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error) DeploymentExpansion } // deployments implements DeploymentInterface type deployments struct { - client restclient.Interface + client rest.Interface ns string } @@ -123,7 +123,7 @@ func (c *deployments) DeleteCollection(options *v1.DeleteOptions, listOptions v1 } // Get takes name of the deployment, and returns the corresponding deployment object, and an error if there is any. -func (c *deployments) Get(name string, options meta_v1.GetOptions) (result *v1beta1.Deployment, err error) { +func (c *deployments) Get(name string, options v1.GetOptions) (result *v1beta1.Deployment, err error) { result = &v1beta1.Deployment{} err = c.client.Get(). Namespace(c.ns). @@ -158,7 +158,7 @@ func (c *deployments) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched deployment. -func (c *deployments) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error) { +func (c *deployments) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error) { result = &v1beta1.Deployment{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/doc.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/doc.go index 9329e027..73f020db 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/doc.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1] +// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job,autoscaling/v1/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1,autoscaling/v1] // This package has the automatically generated typed clients. package v1beta1 diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/extensions_client.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/extensions_client.go index 5994f8bf..893c8d2a 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/extensions_client.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/extensions_client.go @@ -20,12 +20,12 @@ import ( fmt "fmt" schema "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type ExtensionsV1beta1Interface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface DaemonSetsGetter DeploymentsGetter IngressesGetter @@ -34,7 +34,7 @@ type ExtensionsV1beta1Interface interface { // ExtensionsV1beta1Client is used to interact with features provided by the extensions group. type ExtensionsV1beta1Client struct { - restClient restclient.Interface + restClient rest.Interface } func (c *ExtensionsV1beta1Client) DaemonSets(namespace string) DaemonSetInterface { @@ -54,12 +54,12 @@ func (c *ExtensionsV1beta1Client) ReplicaSets(namespace string) ReplicaSetInterf } // NewForConfig creates a new ExtensionsV1beta1Client for the given config. -func NewForConfig(c *restclient.Config) (*ExtensionsV1beta1Client, error) { +func NewForConfig(c *rest.Config) (*ExtensionsV1beta1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -68,7 +68,7 @@ func NewForConfig(c *restclient.Config) (*ExtensionsV1beta1Client, error) { // NewForConfigOrDie creates a new ExtensionsV1beta1Client for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *ExtensionsV1beta1Client { +func NewForConfigOrDie(c *rest.Config) *ExtensionsV1beta1Client { client, err := NewForConfig(c) if err != nil { panic(err) @@ -77,11 +77,11 @@ func NewForConfigOrDie(c *restclient.Config) *ExtensionsV1beta1Client { } // New creates a new ExtensionsV1beta1Client for the given RESTClient. -func New(c restclient.Interface) *ExtensionsV1beta1Client { +func New(c rest.Interface) *ExtensionsV1beta1Client { return &ExtensionsV1beta1Client{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { gv, err := schema.ParseGroupVersion("extensions/v1beta1") if err != nil { return err @@ -92,7 +92,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/apis" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } copyGroupVersion := gv config.GroupVersion = ©GroupVersion @@ -104,7 +104,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *ExtensionsV1beta1Client) RESTClient() restclient.Interface { +func (c *ExtensionsV1beta1Client) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/fake/BUILD b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/fake/BUILD index 9413216a..847c6d7d 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/fake/BUILD +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/fake/BUILD @@ -21,15 +21,14 @@ go_library( tags = ["automanaged"], deps = [ "//federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1:go_default_library", - "//pkg/api:go_default_library", - "//pkg/api/v1:go_default_library", "//pkg/apis/extensions/v1beta1:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/fake/doc.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/fake/doc.go index 0a5c6b14..91682eb2 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/fake/doc.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/fake/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1] +// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job,autoscaling/v1/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1,autoscaling/v1] // Package fake has the automatically generated clients. package fake diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/fake/fake_daemonset.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/fake/fake_daemonset.go index 0ec6bd3d..1af9a446 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/fake/fake_daemonset.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/fake/fake_daemonset.go @@ -17,12 +17,11 @@ limitations under the License. package fake import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -79,7 +78,7 @@ func (c *FakeDaemonSets) DeleteCollection(options *v1.DeleteOptions, listOptions return err } -func (c *FakeDaemonSets) Get(name string, options meta_v1.GetOptions) (result *v1beta1.DaemonSet, err error) { +func (c *FakeDaemonSets) Get(name string, options v1.GetOptions) (result *v1beta1.DaemonSet, err error) { obj, err := c.Fake. Invokes(core.NewGetAction(daemonsetsResource, c.ns, name), &v1beta1.DaemonSet{}) @@ -118,7 +117,7 @@ func (c *FakeDaemonSets) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched daemonSet. -func (c *FakeDaemonSets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.DaemonSet, err error) { +func (c *FakeDaemonSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.DaemonSet, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(daemonsetsResource, c.ns, name, data, subresources...), &v1beta1.DaemonSet{}) diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/fake/fake_deployment.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/fake/fake_deployment.go index 91007324..f49ab7e7 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/fake/fake_deployment.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/fake/fake_deployment.go @@ -17,12 +17,11 @@ limitations under the License. package fake import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -79,7 +78,7 @@ func (c *FakeDeployments) DeleteCollection(options *v1.DeleteOptions, listOption return err } -func (c *FakeDeployments) Get(name string, options meta_v1.GetOptions) (result *v1beta1.Deployment, err error) { +func (c *FakeDeployments) Get(name string, options v1.GetOptions) (result *v1beta1.Deployment, err error) { obj, err := c.Fake. Invokes(core.NewGetAction(deploymentsResource, c.ns, name), &v1beta1.Deployment{}) @@ -118,7 +117,7 @@ func (c *FakeDeployments) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched deployment. -func (c *FakeDeployments) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error) { +func (c *FakeDeployments) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(deploymentsResource, c.ns, name, data, subresources...), &v1beta1.Deployment{}) diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/fake/fake_extensions_client.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/fake/fake_extensions_client.go index e42de1f6..3442070b 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/fake/fake_extensions_client.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/fake/fake_extensions_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" v1beta1 "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -44,7 +44,7 @@ func (c *FakeExtensionsV1beta1) ReplicaSets(namespace string) v1beta1.ReplicaSet // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeExtensionsV1beta1) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeExtensionsV1beta1) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/fake/fake_ingress.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/fake/fake_ingress.go index 27858fe8..277717bb 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/fake/fake_ingress.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/fake/fake_ingress.go @@ -17,12 +17,11 @@ limitations under the License. package fake import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -79,7 +78,7 @@ func (c *FakeIngresses) DeleteCollection(options *v1.DeleteOptions, listOptions return err } -func (c *FakeIngresses) Get(name string, options meta_v1.GetOptions) (result *v1beta1.Ingress, err error) { +func (c *FakeIngresses) Get(name string, options v1.GetOptions) (result *v1beta1.Ingress, err error) { obj, err := c.Fake. Invokes(core.NewGetAction(ingressesResource, c.ns, name), &v1beta1.Ingress{}) @@ -118,7 +117,7 @@ func (c *FakeIngresses) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched ingress. -func (c *FakeIngresses) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.Ingress, err error) { +func (c *FakeIngresses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Ingress, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(ingressesResource, c.ns, name, data, subresources...), &v1beta1.Ingress{}) diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/fake/fake_replicaset.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/fake/fake_replicaset.go index b0fce2a8..3835577b 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/fake/fake_replicaset.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/fake/fake_replicaset.go @@ -17,12 +17,11 @@ limitations under the License. package fake import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -79,7 +78,7 @@ func (c *FakeReplicaSets) DeleteCollection(options *v1.DeleteOptions, listOption return err } -func (c *FakeReplicaSets) Get(name string, options meta_v1.GetOptions) (result *v1beta1.ReplicaSet, err error) { +func (c *FakeReplicaSets) Get(name string, options v1.GetOptions) (result *v1beta1.ReplicaSet, err error) { obj, err := c.Fake. Invokes(core.NewGetAction(replicasetsResource, c.ns, name), &v1beta1.ReplicaSet{}) @@ -118,7 +117,7 @@ func (c *FakeReplicaSets) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched replicaSet. -func (c *FakeReplicaSets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.ReplicaSet, err error) { +func (c *FakeReplicaSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ReplicaSet, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(replicasetsResource, c.ns, name, data, subresources...), &v1beta1.ReplicaSet{}) diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/ingress.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/ingress.go index 53812326..685d1ea7 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/ingress.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/ingress.go @@ -17,12 +17,12 @@ limitations under the License. package v1beta1 import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // IngressesGetter has a method to return a IngressInterface. @@ -38,16 +38,16 @@ type IngressInterface interface { UpdateStatus(*v1beta1.Ingress) (*v1beta1.Ingress, error) Delete(name string, options *v1.DeleteOptions) error DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options meta_v1.GetOptions) (*v1beta1.Ingress, error) + Get(name string, options v1.GetOptions) (*v1beta1.Ingress, error) List(opts v1.ListOptions) (*v1beta1.IngressList, error) Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.Ingress, err error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Ingress, err error) IngressExpansion } // ingresses implements IngressInterface type ingresses struct { - client restclient.Interface + client rest.Interface ns string } @@ -123,7 +123,7 @@ func (c *ingresses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.L } // Get takes name of the ingress, and returns the corresponding ingress object, and an error if there is any. -func (c *ingresses) Get(name string, options meta_v1.GetOptions) (result *v1beta1.Ingress, err error) { +func (c *ingresses) Get(name string, options v1.GetOptions) (result *v1beta1.Ingress, err error) { result = &v1beta1.Ingress{} err = c.client.Get(). Namespace(c.ns). @@ -158,7 +158,7 @@ func (c *ingresses) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched ingress. -func (c *ingresses) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.Ingress, err error) { +func (c *ingresses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Ingress, err error) { result = &v1beta1.Ingress{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/replicaset.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/replicaset.go index e0a493bc..5069fab5 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/replicaset.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/extensions/v1beta1/replicaset.go @@ -17,12 +17,12 @@ limitations under the License. package v1beta1 import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // ReplicaSetsGetter has a method to return a ReplicaSetInterface. @@ -38,16 +38,16 @@ type ReplicaSetInterface interface { UpdateStatus(*v1beta1.ReplicaSet) (*v1beta1.ReplicaSet, error) Delete(name string, options *v1.DeleteOptions) error DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options meta_v1.GetOptions) (*v1beta1.ReplicaSet, error) + Get(name string, options v1.GetOptions) (*v1beta1.ReplicaSet, error) List(opts v1.ListOptions) (*v1beta1.ReplicaSetList, error) Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.ReplicaSet, err error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ReplicaSet, err error) ReplicaSetExpansion } // replicaSets implements ReplicaSetInterface type replicaSets struct { - client restclient.Interface + client rest.Interface ns string } @@ -123,7 +123,7 @@ func (c *replicaSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1 } // Get takes name of the replicaSet, and returns the corresponding replicaSet object, and an error if there is any. -func (c *replicaSets) Get(name string, options meta_v1.GetOptions) (result *v1beta1.ReplicaSet, err error) { +func (c *replicaSets) Get(name string, options v1.GetOptions) (result *v1beta1.ReplicaSet, err error) { result = &v1beta1.ReplicaSet{} err = c.client.Get(). Namespace(c.ns). @@ -158,7 +158,7 @@ func (c *replicaSets) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched replicaSet. -func (c *replicaSets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.ReplicaSet, err error) { +func (c *replicaSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ReplicaSet, err error) { result = &v1beta1.ReplicaSet{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1/BUILD b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1/BUILD index 1e7808ef..9cafb8f4 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1/BUILD +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1/BUILD @@ -19,12 +19,12 @@ go_library( deps = [ "//federation/apis/federation/v1beta1:go_default_library", "//pkg/api:go_default_library", - "//pkg/api/v1:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/runtime/serializer", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1/cluster.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1/cluster.go index 1d8aed35..7ca5fc9c 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1/cluster.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1/cluster.go @@ -17,12 +17,12 @@ limitations under the License. package v1beta1 import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" v1beta1 "k8s.io/kubernetes/federation/apis/federation/v1beta1" api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // ClustersGetter has a method to return a ClusterInterface. @@ -38,16 +38,16 @@ type ClusterInterface interface { UpdateStatus(*v1beta1.Cluster) (*v1beta1.Cluster, error) Delete(name string, options *v1.DeleteOptions) error DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options meta_v1.GetOptions) (*v1beta1.Cluster, error) + Get(name string, options v1.GetOptions) (*v1beta1.Cluster, error) List(opts v1.ListOptions) (*v1beta1.ClusterList, error) Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.Cluster, err error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Cluster, err error) ClusterExpansion } // clusters implements ClusterInterface type clusters struct { - client restclient.Interface + client rest.Interface } // newClusters returns a Clusters @@ -116,7 +116,7 @@ func (c *clusters) DeleteCollection(options *v1.DeleteOptions, listOptions v1.Li } // Get takes name of the cluster, and returns the corresponding cluster object, and an error if there is any. -func (c *clusters) Get(name string, options meta_v1.GetOptions) (result *v1beta1.Cluster, err error) { +func (c *clusters) Get(name string, options v1.GetOptions) (result *v1beta1.Cluster, err error) { result = &v1beta1.Cluster{} err = c.client.Get(). Resource("clusters"). @@ -148,7 +148,7 @@ func (c *clusters) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched cluster. -func (c *clusters) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.Cluster, err error) { +func (c *clusters) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Cluster, err error) { result = &v1beta1.Cluster{} err = c.client.Patch(pt). Resource("clusters"). diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1/doc.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1/doc.go index 9329e027..73f020db 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1/doc.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1] +// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job,autoscaling/v1/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1,autoscaling/v1] // This package has the automatically generated typed clients. package v1beta1 diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1/fake/BUILD b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1/fake/BUILD index 188ce836..d282e077 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1/fake/BUILD +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1/fake/BUILD @@ -18,14 +18,13 @@ go_library( deps = [ "//federation/apis/federation/v1beta1:go_default_library", "//federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1:go_default_library", - "//pkg/api:go_default_library", - "//pkg/api/v1:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1/fake/doc.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1/fake/doc.go index 0a5c6b14..91682eb2 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1/fake/doc.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1/fake/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1] +// This package is generated by client-gen with arguments: --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job,autoscaling/v1/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/v1beta1,api/v1,extensions/v1beta1,batch/v1,autoscaling/v1] // Package fake has the automatically generated clients. package fake diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1/fake/fake_cluster.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1/fake/fake_cluster.go index 603e2199..e0a67927 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1/fake/fake_cluster.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1/fake/fake_cluster.go @@ -17,13 +17,12 @@ limitations under the License. package fake import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" v1beta1 "k8s.io/kubernetes/federation/apis/federation/v1beta1" - api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -74,7 +73,7 @@ func (c *FakeClusters) DeleteCollection(options *v1.DeleteOptions, listOptions v return err } -func (c *FakeClusters) Get(name string, options meta_v1.GetOptions) (result *v1beta1.Cluster, err error) { +func (c *FakeClusters) Get(name string, options v1.GetOptions) (result *v1beta1.Cluster, err error) { obj, err := c.Fake. Invokes(core.NewRootGetAction(clustersResource, name), &v1beta1.Cluster{}) if obj == nil { @@ -110,7 +109,7 @@ func (c *FakeClusters) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched cluster. -func (c *FakeClusters) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.Cluster, err error) { +func (c *FakeClusters) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Cluster, err error) { obj, err := c.Fake. Invokes(core.NewRootPatchSubresourceAction(clustersResource, name, data, subresources...), &v1beta1.Cluster{}) if obj == nil { diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1/fake/fake_federation_client.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1/fake/fake_federation_client.go index 4d74cade..1128a199 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1/fake/fake_federation_client.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1/fake/fake_federation_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" v1beta1 "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -32,7 +32,7 @@ func (c *FakeFederationV1beta1) Clusters() v1beta1.ClusterInterface { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeFederationV1beta1) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeFederationV1beta1) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1/federation_client.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1/federation_client.go index db28a80c..b51bfda2 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1/federation_client.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1/federation_client.go @@ -20,18 +20,18 @@ import ( fmt "fmt" schema "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type FederationV1beta1Interface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface ClustersGetter } // FederationV1beta1Client is used to interact with features provided by the federation group. type FederationV1beta1Client struct { - restClient restclient.Interface + restClient rest.Interface } func (c *FederationV1beta1Client) Clusters() ClusterInterface { @@ -39,12 +39,12 @@ func (c *FederationV1beta1Client) Clusters() ClusterInterface { } // NewForConfig creates a new FederationV1beta1Client for the given config. -func NewForConfig(c *restclient.Config) (*FederationV1beta1Client, error) { +func NewForConfig(c *rest.Config) (*FederationV1beta1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -53,7 +53,7 @@ func NewForConfig(c *restclient.Config) (*FederationV1beta1Client, error) { // NewForConfigOrDie creates a new FederationV1beta1Client for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *FederationV1beta1Client { +func NewForConfigOrDie(c *rest.Config) *FederationV1beta1Client { client, err := NewForConfig(c) if err != nil { panic(err) @@ -62,11 +62,11 @@ func NewForConfigOrDie(c *restclient.Config) *FederationV1beta1Client { } // New creates a new FederationV1beta1Client for the given RESTClient. -func New(c restclient.Interface) *FederationV1beta1Client { +func New(c rest.Interface) *FederationV1beta1Client { return &FederationV1beta1Client{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { gv, err := schema.ParseGroupVersion("federation/v1beta1") if err != nil { return err @@ -77,7 +77,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/apis" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } copyGroupVersion := gv config.GroupVersion = ©GroupVersion @@ -89,7 +89,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FederationV1beta1Client) RESTClient() restclient.Interface { +func (c *FederationV1beta1Client) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/BUILD b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/BUILD index 964d13df..7b9f997f 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/BUILD +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/BUILD @@ -17,15 +17,16 @@ go_library( tags = ["automanaged"], deps = [ "//federation/apis/federation/install:go_default_library", + "//federation/client/clientset_generated/federation_internalclientset/typed/autoscaling/internalversion:go_default_library", "//federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion:go_default_library", "//federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion:go_default_library", "//federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion:go_default_library", "//federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/typed/discovery:go_default_library", - "//pkg/util/flowcontrol:go_default_library", - "//plugin/pkg/client/auth:go_default_library", "//vendor:github.com/golang/glog", + "//vendor:k8s.io/client-go/plugin/pkg/client/auth", + "//vendor:k8s.io/client-go/rest", + "//vendor:k8s.io/client-go/util/flowcontrol", ], ) @@ -41,6 +42,7 @@ filegroup( srcs = [ ":package-srcs", "//federation/client/clientset_generated/federation_internalclientset/fake:all-srcs", + "//federation/client/clientset_generated/federation_internalclientset/typed/autoscaling/internalversion:all-srcs", "//federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion:all-srcs", "//federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion:all-srcs", "//federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion:all-srcs", diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/clientset.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/clientset.go index 6d9bb063..fad1601c 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/clientset.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/clientset.go @@ -18,20 +18,23 @@ package federation_internalclientset import ( "github.com/golang/glog" + _ "k8s.io/client-go/plugin/pkg/client/auth" + rest "k8s.io/client-go/rest" + "k8s.io/client-go/util/flowcontrol" + internalversionautoscaling "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/autoscaling/internalversion" internalversionbatch "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion" internalversioncore "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion" internalversionextensions "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion" internalversionfederation "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion" - restclient "k8s.io/kubernetes/pkg/client/restclient" discovery "k8s.io/kubernetes/pkg/client/typed/discovery" - "k8s.io/kubernetes/pkg/util/flowcontrol" - _ "k8s.io/kubernetes/plugin/pkg/client/auth" ) type Interface interface { Discovery() discovery.DiscoveryInterface Core() internalversioncore.CoreInterface + Autoscaling() internalversionautoscaling.AutoscalingInterface + Batch() internalversionbatch.BatchInterface Extensions() internalversionextensions.ExtensionsInterface @@ -44,6 +47,7 @@ type Interface interface { type Clientset struct { *discovery.DiscoveryClient *internalversioncore.CoreClient + *internalversionautoscaling.AutoscalingClient *internalversionbatch.BatchClient *internalversionextensions.ExtensionsClient *internalversionfederation.FederationClient @@ -57,6 +61,14 @@ func (c *Clientset) Core() internalversioncore.CoreInterface { return c.CoreClient } +// Autoscaling retrieves the AutoscalingClient +func (c *Clientset) Autoscaling() internalversionautoscaling.AutoscalingInterface { + if c == nil { + return nil + } + return c.AutoscalingClient +} + // Batch retrieves the BatchClient func (c *Clientset) Batch() internalversionbatch.BatchInterface { if c == nil { @@ -90,7 +102,7 @@ func (c *Clientset) Discovery() discovery.DiscoveryInterface { } // NewForConfig creates a new Clientset for the given config. -func NewForConfig(c *restclient.Config) (*Clientset, error) { +func NewForConfig(c *rest.Config) (*Clientset, error) { configShallowCopy := *c if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) @@ -101,6 +113,10 @@ func NewForConfig(c *restclient.Config) (*Clientset, error) { if err != nil { return nil, err } + cs.AutoscalingClient, err = internalversionautoscaling.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } cs.BatchClient, err = internalversionbatch.NewForConfig(&configShallowCopy) if err != nil { return nil, err @@ -124,9 +140,10 @@ func NewForConfig(c *restclient.Config) (*Clientset, error) { // NewForConfigOrDie creates a new Clientset for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *Clientset { +func NewForConfigOrDie(c *rest.Config) *Clientset { var cs Clientset cs.CoreClient = internalversioncore.NewForConfigOrDie(c) + cs.AutoscalingClient = internalversionautoscaling.NewForConfigOrDie(c) cs.BatchClient = internalversionbatch.NewForConfigOrDie(c) cs.ExtensionsClient = internalversionextensions.NewForConfigOrDie(c) cs.FederationClient = internalversionfederation.NewForConfigOrDie(c) @@ -136,9 +153,10 @@ func NewForConfigOrDie(c *restclient.Config) *Clientset { } // New creates a new Clientset for the given RESTClient. -func New(c restclient.Interface) *Clientset { +func New(c rest.Interface) *Clientset { var cs Clientset cs.CoreClient = internalversioncore.New(c) + cs.AutoscalingClient = internalversionautoscaling.New(c) cs.BatchClient = internalversionbatch.New(c) cs.ExtensionsClient = internalversionextensions.New(c) cs.FederationClient = internalversionfederation.New(c) diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/doc.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/doc.go index 90067b7d..b74afe7d 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/doc.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/Service,api/Namespace,extensions/ReplicaSet,api/Secret,extensions/Ingress,extensions/Deployment,extensions/DaemonSet,api/ConfigMap,api/Event,batch/Job] --input=[../../federation/apis/federation/,api/,extensions/,batch/] +// This package is generated by client-gen with arguments: --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/Service,api/Namespace,extensions/ReplicaSet,api/Secret,extensions/Ingress,extensions/Deployment,extensions/DaemonSet,api/ConfigMap,api/Event,batch/Job,autoscaling/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/,api/,extensions/,batch/,autoscaling/] // This package has the automatically generated clientset. package federation_internalclientset diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/fake/BUILD b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/fake/BUILD index 7f6ab8ad..78998607 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/fake/BUILD +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/fake/BUILD @@ -16,6 +16,8 @@ go_library( tags = ["automanaged"], deps = [ "//federation/client/clientset_generated/federation_internalclientset:go_default_library", + "//federation/client/clientset_generated/federation_internalclientset/typed/autoscaling/internalversion:go_default_library", + "//federation/client/clientset_generated/federation_internalclientset/typed/autoscaling/internalversion/fake:go_default_library", "//federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion:go_default_library", "//federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion/fake:go_default_library", "//federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion:go_default_library", diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/fake/clientset_generated.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/fake/clientset_generated.go index fefa283e..00b5104a 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/fake/clientset_generated.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/fake/clientset_generated.go @@ -20,6 +20,8 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" clientset "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset" + internalversionautoscaling "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/autoscaling/internalversion" + fakeinternalversionautoscaling "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/autoscaling/internalversion/fake" internalversionbatch "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion" fakeinternalversionbatch "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion/fake" internalversioncore "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion" @@ -72,6 +74,11 @@ func (c *Clientset) Core() internalversioncore.CoreInterface { return &fakeinternalversioncore.FakeCore{Fake: &c.Fake} } +// Autoscaling retrieves the AutoscalingClient +func (c *Clientset) Autoscaling() internalversionautoscaling.AutoscalingInterface { + return &fakeinternalversionautoscaling.FakeAutoscaling{Fake: &c.Fake} +} + // Batch retrieves the BatchClient func (c *Clientset) Batch() internalversionbatch.BatchInterface { return &fakeinternalversionbatch.FakeBatch{Fake: &c.Fake} diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/fake/doc.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/fake/doc.go index 5d9d5bf5..61e9ad46 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/fake/doc.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/fake/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/Service,api/Namespace,extensions/ReplicaSet,api/Secret,extensions/Ingress,extensions/Deployment,extensions/DaemonSet,api/ConfigMap,api/Event,batch/Job] --input=[../../federation/apis/federation/,api/,extensions/,batch/] +// This package is generated by client-gen with arguments: --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/Service,api/Namespace,extensions/ReplicaSet,api/Secret,extensions/Ingress,extensions/Deployment,extensions/DaemonSet,api/ConfigMap,api/Event,batch/Job,autoscaling/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/,api/,extensions/,batch/,autoscaling/] // This package has the automatically generated fake clientset. package fake diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/autoscaling/internalversion/BUILD b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/autoscaling/internalversion/BUILD new file mode 100644 index 00000000..a4e32ff4 --- /dev/null +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/autoscaling/internalversion/BUILD @@ -0,0 +1,43 @@ +package(default_visibility = ["//visibility:public"]) + +licenses(["notice"]) + +load( + "@io_bazel_rules_go//go:def.bzl", + "go_library", +) + +go_library( + name = "go_default_library", + srcs = [ + "autoscaling_client.go", + "doc.go", + "generated_expansion.go", + "horizontalpodautoscaler.go", + ], + tags = ["automanaged"], + deps = [ + "//pkg/api:go_default_library", + "//pkg/apis/autoscaling:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/types", + "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", + ], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [ + ":package-srcs", + "//federation/client/clientset_generated/federation_internalclientset/typed/autoscaling/internalversion/fake:all-srcs", + ], + tags = ["automanaged"], +) diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/autoscaling/internalversion/autoscaling_client.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/autoscaling/internalversion/autoscaling_client.go new file mode 100644 index 00000000..325e11ba --- /dev/null +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/autoscaling/internalversion/autoscaling_client.go @@ -0,0 +1,98 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package internalversion + +import ( + rest "k8s.io/client-go/rest" + api "k8s.io/kubernetes/pkg/api" +) + +type AutoscalingInterface interface { + RESTClient() rest.Interface + HorizontalPodAutoscalersGetter +} + +// AutoscalingClient is used to interact with features provided by the autoscaling group. +type AutoscalingClient struct { + restClient rest.Interface +} + +func (c *AutoscalingClient) HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerInterface { + return newHorizontalPodAutoscalers(c, namespace) +} + +// NewForConfig creates a new AutoscalingClient for the given config. +func NewForConfig(c *rest.Config) (*AutoscalingClient, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &AutoscalingClient{client}, nil +} + +// NewForConfigOrDie creates a new AutoscalingClient for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *AutoscalingClient { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new AutoscalingClient for the given RESTClient. +func New(c rest.Interface) *AutoscalingClient { + return &AutoscalingClient{c} +} + +func setConfigDefaults(config *rest.Config) error { + // if autoscaling group is not registered, return an error + g, err := api.Registry.Group("autoscaling") + if err != nil { + return err + } + config.APIPath = "/apis" + if config.UserAgent == "" { + config.UserAgent = rest.DefaultKubernetesUserAgent() + } + if config.GroupVersion == nil || config.GroupVersion.Group != g.GroupVersion.Group { + copyGroupVersion := g.GroupVersion + config.GroupVersion = ©GroupVersion + } + config.NegotiatedSerializer = api.Codecs + + if config.QPS == 0 { + config.QPS = 5 + } + if config.Burst == 0 { + config.Burst = 10 + } + return nil +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *AutoscalingClient) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1alpha1/doc.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/autoscaling/internalversion/doc.go similarity index 57% rename from vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1alpha1/doc.go rename to vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/autoscaling/internalversion/doc.go index bc5df818..8ffebfae 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1alpha1/doc.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/autoscaling/internalversion/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1alpha1,rbac/v1alpha1,storage/v1beta1] +// This package is generated by client-gen with arguments: --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/Service,api/Namespace,extensions/ReplicaSet,api/Secret,extensions/Ingress,extensions/Deployment,extensions/DaemonSet,api/ConfigMap,api/Event,batch/Job,autoscaling/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/,api/,extensions/,batch/,autoscaling/] // This package has the automatically generated typed clients. -package v1alpha1 +package internalversion diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/autoscaling/internalversion/fake/BUILD b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/autoscaling/internalversion/fake/BUILD new file mode 100644 index 00000000..d0ebba60 --- /dev/null +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/autoscaling/internalversion/fake/BUILD @@ -0,0 +1,42 @@ +package(default_visibility = ["//visibility:public"]) + +licenses(["notice"]) + +load( + "@io_bazel_rules_go//go:def.bzl", + "go_library", +) + +go_library( + name = "go_default_library", + srcs = [ + "doc.go", + "fake_autoscaling_client.go", + "fake_horizontalpodautoscaler.go", + ], + tags = ["automanaged"], + deps = [ + "//federation/client/clientset_generated/federation_internalclientset/typed/autoscaling/internalversion:go_default_library", + "//pkg/apis/autoscaling:go_default_library", + "//pkg/client/testing/core:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/labels", + "//vendor:k8s.io/apimachinery/pkg/runtime/schema", + "//vendor:k8s.io/apimachinery/pkg/types", + "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", + ], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], +) diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1alpha1/fake/doc.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/autoscaling/internalversion/fake/doc.go similarity index 59% rename from vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1alpha1/fake/doc.go rename to vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/autoscaling/internalversion/fake/doc.go index b320cb63..6f13dc4e 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1alpha1/fake/doc.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/autoscaling/internalversion/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1alpha1,rbac/v1alpha1,storage/v1beta1] +// This package is generated by client-gen with arguments: --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/Service,api/Namespace,extensions/ReplicaSet,api/Secret,extensions/Ingress,extensions/Deployment,extensions/DaemonSet,api/ConfigMap,api/Event,batch/Job,autoscaling/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/,api/,extensions/,batch/,autoscaling/] // Package fake has the automatically generated clients. package fake diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/fake/fake_policy_client.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/autoscaling/internalversion/fake/fake_autoscaling_client.go similarity index 60% rename from vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/fake/fake_policy_client.go rename to vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/autoscaling/internalversion/fake/fake_autoscaling_client.go index 9c6f3740..a2f8bcb9 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/fake/fake_policy_client.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/autoscaling/internalversion/fake/fake_autoscaling_client.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -17,22 +17,22 @@ limitations under the License. package fake import ( - v1alpha1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1" - restclient "k8s.io/kubernetes/pkg/client/restclient" + rest "k8s.io/client-go/rest" + internalversion "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/autoscaling/internalversion" core "k8s.io/kubernetes/pkg/client/testing/core" ) -type FakePolicyV1alpha1 struct { +type FakeAutoscaling struct { *core.Fake } -func (c *FakePolicyV1alpha1) PodDisruptionBudgets(namespace string) v1alpha1.PodDisruptionBudgetInterface { - return &FakePodDisruptionBudgets{c, namespace} +func (c *FakeAutoscaling) HorizontalPodAutoscalers(namespace string) internalversion.HorizontalPodAutoscalerInterface { + return &FakeHorizontalPodAutoscalers{c, namespace} } // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakePolicyV1alpha1) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeAutoscaling) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/autoscaling/internalversion/fake/fake_horizontalpodautoscaler.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/autoscaling/internalversion/fake/fake_horizontalpodautoscaler.go new file mode 100644 index 00000000..e0db5c0b --- /dev/null +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/autoscaling/internalversion/fake/fake_horizontalpodautoscaler.go @@ -0,0 +1,128 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package fake + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + autoscaling "k8s.io/kubernetes/pkg/apis/autoscaling" + core "k8s.io/kubernetes/pkg/client/testing/core" +) + +// FakeHorizontalPodAutoscalers implements HorizontalPodAutoscalerInterface +type FakeHorizontalPodAutoscalers struct { + Fake *FakeAutoscaling + ns string +} + +var horizontalpodautoscalersResource = schema.GroupVersionResource{Group: "autoscaling", Version: "", Resource: "horizontalpodautoscalers"} + +func (c *FakeHorizontalPodAutoscalers) Create(horizontalPodAutoscaler *autoscaling.HorizontalPodAutoscaler) (result *autoscaling.HorizontalPodAutoscaler, err error) { + obj, err := c.Fake. + Invokes(core.NewCreateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &autoscaling.HorizontalPodAutoscaler{}) + + if obj == nil { + return nil, err + } + return obj.(*autoscaling.HorizontalPodAutoscaler), err +} + +func (c *FakeHorizontalPodAutoscalers) Update(horizontalPodAutoscaler *autoscaling.HorizontalPodAutoscaler) (result *autoscaling.HorizontalPodAutoscaler, err error) { + obj, err := c.Fake. + Invokes(core.NewUpdateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &autoscaling.HorizontalPodAutoscaler{}) + + if obj == nil { + return nil, err + } + return obj.(*autoscaling.HorizontalPodAutoscaler), err +} + +func (c *FakeHorizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *autoscaling.HorizontalPodAutoscaler) (*autoscaling.HorizontalPodAutoscaler, error) { + obj, err := c.Fake. + Invokes(core.NewUpdateSubresourceAction(horizontalpodautoscalersResource, "status", c.ns, horizontalPodAutoscaler), &autoscaling.HorizontalPodAutoscaler{}) + + if obj == nil { + return nil, err + } + return obj.(*autoscaling.HorizontalPodAutoscaler), err +} + +func (c *FakeHorizontalPodAutoscalers) Delete(name string, options *v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(core.NewDeleteAction(horizontalpodautoscalersResource, c.ns, name), &autoscaling.HorizontalPodAutoscaler{}) + + return err +} + +func (c *FakeHorizontalPodAutoscalers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + action := core.NewDeleteCollectionAction(horizontalpodautoscalersResource, c.ns, listOptions) + + _, err := c.Fake.Invokes(action, &autoscaling.HorizontalPodAutoscalerList{}) + return err +} + +func (c *FakeHorizontalPodAutoscalers) Get(name string, options v1.GetOptions) (result *autoscaling.HorizontalPodAutoscaler, err error) { + obj, err := c.Fake. + Invokes(core.NewGetAction(horizontalpodautoscalersResource, c.ns, name), &autoscaling.HorizontalPodAutoscaler{}) + + if obj == nil { + return nil, err + } + return obj.(*autoscaling.HorizontalPodAutoscaler), err +} + +func (c *FakeHorizontalPodAutoscalers) List(opts v1.ListOptions) (result *autoscaling.HorizontalPodAutoscalerList, err error) { + obj, err := c.Fake. + Invokes(core.NewListAction(horizontalpodautoscalersResource, c.ns, opts), &autoscaling.HorizontalPodAutoscalerList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := core.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &autoscaling.HorizontalPodAutoscalerList{} + for _, item := range obj.(*autoscaling.HorizontalPodAutoscalerList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers. +func (c *FakeHorizontalPodAutoscalers) Watch(opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(core.NewWatchAction(horizontalpodautoscalersResource, c.ns, opts)) + +} + +// Patch applies the patch and returns the patched horizontalPodAutoscaler. +func (c *FakeHorizontalPodAutoscalers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *autoscaling.HorizontalPodAutoscaler, err error) { + obj, err := c.Fake. + Invokes(core.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, name, data, subresources...), &autoscaling.HorizontalPodAutoscaler{}) + + if obj == nil { + return nil, err + } + return obj.(*autoscaling.HorizontalPodAutoscaler), err +} diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/autoscaling/internalversion/generated_expansion.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/autoscaling/internalversion/generated_expansion.go new file mode 100644 index 00000000..bf7296c5 --- /dev/null +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/autoscaling/internalversion/generated_expansion.go @@ -0,0 +1,19 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package internalversion + +type HorizontalPodAutoscalerExpansion interface{} diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/autoscaling/internalversion/horizontalpodautoscaler.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/autoscaling/internalversion/horizontalpodautoscaler.go new file mode 100644 index 00000000..e0b8b0b1 --- /dev/null +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/autoscaling/internalversion/horizontalpodautoscaler.go @@ -0,0 +1,172 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package internalversion + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" + api "k8s.io/kubernetes/pkg/api" + autoscaling "k8s.io/kubernetes/pkg/apis/autoscaling" +) + +// HorizontalPodAutoscalersGetter has a method to return a HorizontalPodAutoscalerInterface. +// A group's client should implement this interface. +type HorizontalPodAutoscalersGetter interface { + HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerInterface +} + +// HorizontalPodAutoscalerInterface has methods to work with HorizontalPodAutoscaler resources. +type HorizontalPodAutoscalerInterface interface { + Create(*autoscaling.HorizontalPodAutoscaler) (*autoscaling.HorizontalPodAutoscaler, error) + Update(*autoscaling.HorizontalPodAutoscaler) (*autoscaling.HorizontalPodAutoscaler, error) + UpdateStatus(*autoscaling.HorizontalPodAutoscaler) (*autoscaling.HorizontalPodAutoscaler, error) + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Get(name string, options v1.GetOptions) (*autoscaling.HorizontalPodAutoscaler, error) + List(opts v1.ListOptions) (*autoscaling.HorizontalPodAutoscalerList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *autoscaling.HorizontalPodAutoscaler, err error) + HorizontalPodAutoscalerExpansion +} + +// horizontalPodAutoscalers implements HorizontalPodAutoscalerInterface +type horizontalPodAutoscalers struct { + client rest.Interface + ns string +} + +// newHorizontalPodAutoscalers returns a HorizontalPodAutoscalers +func newHorizontalPodAutoscalers(c *AutoscalingClient, namespace string) *horizontalPodAutoscalers { + return &horizontalPodAutoscalers{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Create takes the representation of a horizontalPodAutoscaler and creates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any. +func (c *horizontalPodAutoscalers) Create(horizontalPodAutoscaler *autoscaling.HorizontalPodAutoscaler) (result *autoscaling.HorizontalPodAutoscaler, err error) { + result = &autoscaling.HorizontalPodAutoscaler{} + err = c.client.Post(). + Namespace(c.ns). + Resource("horizontalpodautoscalers"). + Body(horizontalPodAutoscaler). + Do(). + Into(result) + return +} + +// Update takes the representation of a horizontalPodAutoscaler and updates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any. +func (c *horizontalPodAutoscalers) Update(horizontalPodAutoscaler *autoscaling.HorizontalPodAutoscaler) (result *autoscaling.HorizontalPodAutoscaler, err error) { + result = &autoscaling.HorizontalPodAutoscaler{} + err = c.client.Put(). + Namespace(c.ns). + Resource("horizontalpodautoscalers"). + Name(horizontalPodAutoscaler.Name). + Body(horizontalPodAutoscaler). + Do(). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus(). + +func (c *horizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *autoscaling.HorizontalPodAutoscaler) (result *autoscaling.HorizontalPodAutoscaler, err error) { + result = &autoscaling.HorizontalPodAutoscaler{} + err = c.client.Put(). + Namespace(c.ns). + Resource("horizontalpodautoscalers"). + Name(horizontalPodAutoscaler.Name). + SubResource("status"). + Body(horizontalPodAutoscaler). + Do(). + Into(result) + return +} + +// Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs. +func (c *horizontalPodAutoscalers) Delete(name string, options *v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("horizontalpodautoscalers"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *horizontalPodAutoscalers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("horizontalpodautoscalers"). + VersionedParams(&listOptions, api.ParameterCodec). + Body(options). + Do(). + Error() +} + +// Get takes name of the horizontalPodAutoscaler, and returns the corresponding horizontalPodAutoscaler object, and an error if there is any. +func (c *horizontalPodAutoscalers) Get(name string, options v1.GetOptions) (result *autoscaling.HorizontalPodAutoscaler, err error) { + result = &autoscaling.HorizontalPodAutoscaler{} + err = c.client.Get(). + Namespace(c.ns). + Resource("horizontalpodautoscalers"). + Name(name). + VersionedParams(&options, api.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors. +func (c *horizontalPodAutoscalers) List(opts v1.ListOptions) (result *autoscaling.HorizontalPodAutoscalerList, err error) { + result = &autoscaling.HorizontalPodAutoscalerList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("horizontalpodautoscalers"). + VersionedParams(&opts, api.ParameterCodec). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers. +func (c *horizontalPodAutoscalers) Watch(opts v1.ListOptions) (watch.Interface, error) { + return c.client.Get(). + Prefix("watch"). + Namespace(c.ns). + Resource("horizontalpodautoscalers"). + VersionedParams(&opts, api.ParameterCodec). + Watch() +} + +// Patch applies the patch and returns the patched horizontalPodAutoscaler. +func (c *horizontalPodAutoscalers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *autoscaling.HorizontalPodAutoscaler, err error) { + result = &autoscaling.HorizontalPodAutoscaler{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("horizontalpodautoscalers"). + SubResource(subresources...). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion/BUILD b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion/BUILD index 63d94b63..c71f24ee 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion/BUILD +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion/BUILD @@ -19,9 +19,10 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/apis/batch:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion/batch_client.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion/batch_client.go index 94887790..613297f3 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion/batch_client.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion/batch_client.go @@ -17,18 +17,18 @@ limitations under the License. package internalversion import ( + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type BatchInterface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface JobsGetter } // BatchClient is used to interact with features provided by the batch group. type BatchClient struct { - restClient restclient.Interface + restClient rest.Interface } func (c *BatchClient) Jobs(namespace string) JobInterface { @@ -36,12 +36,12 @@ func (c *BatchClient) Jobs(namespace string) JobInterface { } // NewForConfig creates a new BatchClient for the given config. -func NewForConfig(c *restclient.Config) (*BatchClient, error) { +func NewForConfig(c *rest.Config) (*BatchClient, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -50,7 +50,7 @@ func NewForConfig(c *restclient.Config) (*BatchClient, error) { // NewForConfigOrDie creates a new BatchClient for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *BatchClient { +func NewForConfigOrDie(c *rest.Config) *BatchClient { client, err := NewForConfig(c) if err != nil { panic(err) @@ -59,11 +59,11 @@ func NewForConfigOrDie(c *restclient.Config) *BatchClient { } // New creates a new BatchClient for the given RESTClient. -func New(c restclient.Interface) *BatchClient { +func New(c rest.Interface) *BatchClient { return &BatchClient{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { // if batch group is not registered, return an error g, err := api.Registry.Group("batch") if err != nil { @@ -71,7 +71,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/apis" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } if config.GroupVersion == nil || config.GroupVersion.Group != g.GroupVersion.Group { copyGroupVersion := g.GroupVersion @@ -90,7 +90,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *BatchClient) RESTClient() restclient.Interface { +func (c *BatchClient) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion/doc.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion/doc.go index 90ba8be0..8ffebfae 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion/doc.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/Service,api/Namespace,extensions/ReplicaSet,api/Secret,extensions/Ingress,extensions/Deployment,extensions/DaemonSet,api/ConfigMap,api/Event,batch/Job] --input=[../../federation/apis/federation/,api/,extensions/,batch/] +// This package is generated by client-gen with arguments: --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/Service,api/Namespace,extensions/ReplicaSet,api/Secret,extensions/Ingress,extensions/Deployment,extensions/DaemonSet,api/ConfigMap,api/Event,batch/Job,autoscaling/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/,api/,extensions/,batch/,autoscaling/] // This package has the automatically generated typed clients. package internalversion diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion/fake/BUILD b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion/fake/BUILD index 969699f6..fd7d2766 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion/fake/BUILD +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion/fake/BUILD @@ -17,14 +17,14 @@ go_library( tags = ["automanaged"], deps = [ "//federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion:go_default_library", - "//pkg/api:go_default_library", "//pkg/apis/batch:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion/fake/doc.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion/fake/doc.go index f45ab010..6f13dc4e 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion/fake/doc.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion/fake/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/Service,api/Namespace,extensions/ReplicaSet,api/Secret,extensions/Ingress,extensions/Deployment,extensions/DaemonSet,api/ConfigMap,api/Event,batch/Job] --input=[../../federation/apis/federation/,api/,extensions/,batch/] +// This package is generated by client-gen with arguments: --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/Service,api/Namespace,extensions/ReplicaSet,api/Secret,extensions/Ingress,extensions/Deployment,extensions/DaemonSet,api/ConfigMap,api/Event,batch/Job,autoscaling/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/,api/,extensions/,batch/,autoscaling/] // Package fake has the automatically generated clients. package fake diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion/fake/fake_batch_client.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion/fake/fake_batch_client.go index 8484b5a6..a5d989d3 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion/fake/fake_batch_client.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion/fake/fake_batch_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" internalversion "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -32,7 +32,7 @@ func (c *FakeBatch) Jobs(namespace string) internalversion.JobInterface { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeBatch) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeBatch) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion/fake/fake_job.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion/fake/fake_job.go index 46283e3d..db3f9027 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion/fake/fake_job.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion/fake/fake_job.go @@ -20,8 +20,8 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" batch "k8s.io/kubernetes/pkg/apis/batch" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -64,14 +64,14 @@ func (c *FakeJobs) UpdateStatus(job *batch.Job) (*batch.Job, error) { return obj.(*batch.Job), err } -func (c *FakeJobs) Delete(name string, options *api.DeleteOptions) error { +func (c *FakeJobs) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewDeleteAction(jobsResource, c.ns, name), &batch.Job{}) return err } -func (c *FakeJobs) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *FakeJobs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := core.NewDeleteCollectionAction(jobsResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &batch.JobList{}) @@ -88,7 +88,7 @@ func (c *FakeJobs) Get(name string, options v1.GetOptions) (result *batch.Job, e return obj.(*batch.Job), err } -func (c *FakeJobs) List(opts api.ListOptions) (result *batch.JobList, err error) { +func (c *FakeJobs) List(opts v1.ListOptions) (result *batch.JobList, err error) { obj, err := c.Fake. Invokes(core.NewListAction(jobsResource, c.ns, opts), &batch.JobList{}) @@ -110,14 +110,14 @@ func (c *FakeJobs) List(opts api.ListOptions) (result *batch.JobList, err error) } // Watch returns a watch.Interface that watches the requested jobs. -func (c *FakeJobs) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *FakeJobs) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewWatchAction(jobsResource, c.ns, opts)) } // Patch applies the patch and returns the patched job. -func (c *FakeJobs) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *batch.Job, err error) { +func (c *FakeJobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *batch.Job, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(jobsResource, c.ns, name, data, subresources...), &batch.Job{}) diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion/job.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion/job.go index 46c58b1f..2b0c4a7d 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion/job.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/batch/internalversion/job.go @@ -18,10 +18,11 @@ package internalversion import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" batch "k8s.io/kubernetes/pkg/apis/batch" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // JobsGetter has a method to return a JobInterface. @@ -35,18 +36,18 @@ type JobInterface interface { Create(*batch.Job) (*batch.Job, error) Update(*batch.Job) (*batch.Job, error) UpdateStatus(*batch.Job) (*batch.Job, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error Get(name string, options v1.GetOptions) (*batch.Job, error) - List(opts api.ListOptions) (*batch.JobList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *batch.Job, err error) + List(opts v1.ListOptions) (*batch.JobList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *batch.Job, err error) JobExpansion } // jobs implements JobInterface type jobs struct { - client restclient.Interface + client rest.Interface ns string } @@ -100,7 +101,7 @@ func (c *jobs) UpdateStatus(job *batch.Job) (result *batch.Job, err error) { } // Delete takes name of the job and deletes it. Returns an error if one occurs. -func (c *jobs) Delete(name string, options *api.DeleteOptions) error { +func (c *jobs) Delete(name string, options *v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("jobs"). @@ -111,7 +112,7 @@ func (c *jobs) Delete(name string, options *api.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *jobs) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *jobs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("jobs"). @@ -135,7 +136,7 @@ func (c *jobs) Get(name string, options v1.GetOptions) (result *batch.Job, err e } // List takes label and field selectors, and returns the list of Jobs that match those selectors. -func (c *jobs) List(opts api.ListOptions) (result *batch.JobList, err error) { +func (c *jobs) List(opts v1.ListOptions) (result *batch.JobList, err error) { result = &batch.JobList{} err = c.client.Get(). Namespace(c.ns). @@ -147,7 +148,7 @@ func (c *jobs) List(opts api.ListOptions) (result *batch.JobList, err error) { } // Watch returns a watch.Interface that watches the requested jobs. -func (c *jobs) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *jobs) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -157,7 +158,7 @@ func (c *jobs) Watch(opts api.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched job. -func (c *jobs) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *batch.Job, err error) { +func (c *jobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *batch.Job, err error) { result = &batch.Job{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/BUILD b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/BUILD index 41210f53..50951d4a 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/BUILD +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/BUILD @@ -23,9 +23,10 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/api:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/configmap.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/configmap.go index 9dcd3a93..cf9b31f0 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/configmap.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/configmap.go @@ -18,9 +18,10 @@ package internalversion import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // ConfigMapsGetter has a method to return a ConfigMapInterface. @@ -33,18 +34,18 @@ type ConfigMapsGetter interface { type ConfigMapInterface interface { Create(*api.ConfigMap) (*api.ConfigMap, error) Update(*api.ConfigMap) (*api.ConfigMap, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error Get(name string, options v1.GetOptions) (*api.ConfigMap, error) - List(opts api.ListOptions) (*api.ConfigMapList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.ConfigMap, err error) + List(opts v1.ListOptions) (*api.ConfigMapList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.ConfigMap, err error) ConfigMapExpansion } // configMaps implements ConfigMapInterface type configMaps struct { - client restclient.Interface + client rest.Interface ns string } @@ -82,7 +83,7 @@ func (c *configMaps) Update(configMap *api.ConfigMap) (result *api.ConfigMap, er } // Delete takes name of the configMap and deletes it. Returns an error if one occurs. -func (c *configMaps) Delete(name string, options *api.DeleteOptions) error { +func (c *configMaps) Delete(name string, options *v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("configmaps"). @@ -93,7 +94,7 @@ func (c *configMaps) Delete(name string, options *api.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *configMaps) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *configMaps) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("configmaps"). @@ -117,7 +118,7 @@ func (c *configMaps) Get(name string, options v1.GetOptions) (result *api.Config } // List takes label and field selectors, and returns the list of ConfigMaps that match those selectors. -func (c *configMaps) List(opts api.ListOptions) (result *api.ConfigMapList, err error) { +func (c *configMaps) List(opts v1.ListOptions) (result *api.ConfigMapList, err error) { result = &api.ConfigMapList{} err = c.client.Get(). Namespace(c.ns). @@ -129,7 +130,7 @@ func (c *configMaps) List(opts api.ListOptions) (result *api.ConfigMapList, err } // Watch returns a watch.Interface that watches the requested configMaps. -func (c *configMaps) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *configMaps) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -139,7 +140,7 @@ func (c *configMaps) Watch(opts api.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched configMap. -func (c *configMaps) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.ConfigMap, err error) { +func (c *configMaps) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.ConfigMap, err error) { result = &api.ConfigMap{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/core_client.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/core_client.go index e4b87f95..ea41ad9d 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/core_client.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/core_client.go @@ -17,12 +17,12 @@ limitations under the License. package internalversion import ( + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type CoreInterface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface ConfigMapsGetter EventsGetter NamespacesGetter @@ -32,7 +32,7 @@ type CoreInterface interface { // CoreClient is used to interact with features provided by the group. type CoreClient struct { - restClient restclient.Interface + restClient rest.Interface } func (c *CoreClient) ConfigMaps(namespace string) ConfigMapInterface { @@ -56,12 +56,12 @@ func (c *CoreClient) Services(namespace string) ServiceInterface { } // NewForConfig creates a new CoreClient for the given config. -func NewForConfig(c *restclient.Config) (*CoreClient, error) { +func NewForConfig(c *rest.Config) (*CoreClient, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -70,7 +70,7 @@ func NewForConfig(c *restclient.Config) (*CoreClient, error) { // NewForConfigOrDie creates a new CoreClient for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *CoreClient { +func NewForConfigOrDie(c *rest.Config) *CoreClient { client, err := NewForConfig(c) if err != nil { panic(err) @@ -79,11 +79,11 @@ func NewForConfigOrDie(c *restclient.Config) *CoreClient { } // New creates a new CoreClient for the given RESTClient. -func New(c restclient.Interface) *CoreClient { +func New(c rest.Interface) *CoreClient { return &CoreClient{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { // if core group is not registered, return an error g, err := api.Registry.Group("") if err != nil { @@ -91,7 +91,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/api" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } if config.GroupVersion == nil || config.GroupVersion.Group != g.GroupVersion.Group { copyGroupVersion := g.GroupVersion @@ -110,7 +110,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *CoreClient) RESTClient() restclient.Interface { +func (c *CoreClient) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/doc.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/doc.go index 90ba8be0..8ffebfae 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/doc.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/Service,api/Namespace,extensions/ReplicaSet,api/Secret,extensions/Ingress,extensions/Deployment,extensions/DaemonSet,api/ConfigMap,api/Event,batch/Job] --input=[../../federation/apis/federation/,api/,extensions/,batch/] +// This package is generated by client-gen with arguments: --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/Service,api/Namespace,extensions/ReplicaSet,api/Secret,extensions/Ingress,extensions/Deployment,extensions/DaemonSet,api/ConfigMap,api/Event,batch/Job,autoscaling/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/,api/,extensions/,batch/,autoscaling/] // This package has the automatically generated typed clients. package internalversion diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/event.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/event.go index 3dcd0f75..1159ca37 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/event.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/event.go @@ -18,9 +18,10 @@ package internalversion import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // EventsGetter has a method to return a EventInterface. @@ -33,18 +34,18 @@ type EventsGetter interface { type EventInterface interface { Create(*api.Event) (*api.Event, error) Update(*api.Event) (*api.Event, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error Get(name string, options v1.GetOptions) (*api.Event, error) - List(opts api.ListOptions) (*api.EventList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.Event, err error) + List(opts v1.ListOptions) (*api.EventList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.Event, err error) EventExpansion } // events implements EventInterface type events struct { - client restclient.Interface + client rest.Interface ns string } @@ -82,7 +83,7 @@ func (c *events) Update(event *api.Event) (result *api.Event, err error) { } // Delete takes name of the event and deletes it. Returns an error if one occurs. -func (c *events) Delete(name string, options *api.DeleteOptions) error { +func (c *events) Delete(name string, options *v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("events"). @@ -93,7 +94,7 @@ func (c *events) Delete(name string, options *api.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *events) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *events) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("events"). @@ -117,7 +118,7 @@ func (c *events) Get(name string, options v1.GetOptions) (result *api.Event, err } // List takes label and field selectors, and returns the list of Events that match those selectors. -func (c *events) List(opts api.ListOptions) (result *api.EventList, err error) { +func (c *events) List(opts v1.ListOptions) (result *api.EventList, err error) { result = &api.EventList{} err = c.client.Get(). Namespace(c.ns). @@ -129,7 +130,7 @@ func (c *events) List(opts api.ListOptions) (result *api.EventList, err error) { } // Watch returns a watch.Interface that watches the requested events. -func (c *events) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *events) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -139,7 +140,7 @@ func (c *events) Watch(opts api.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched event. -func (c *events) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.Event, err error) { +func (c *events) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.Event, err error) { result = &api.Event{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/fake/BUILD b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/fake/BUILD index d2571b3d..78547efd 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/fake/BUILD +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/fake/BUILD @@ -23,12 +23,13 @@ go_library( deps = [ "//federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion:go_default_library", "//pkg/api:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/fake/doc.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/fake/doc.go index f45ab010..6f13dc4e 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/fake/doc.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/fake/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/Service,api/Namespace,extensions/ReplicaSet,api/Secret,extensions/Ingress,extensions/Deployment,extensions/DaemonSet,api/ConfigMap,api/Event,batch/Job] --input=[../../federation/apis/federation/,api/,extensions/,batch/] +// This package is generated by client-gen with arguments: --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/Service,api/Namespace,extensions/ReplicaSet,api/Secret,extensions/Ingress,extensions/Deployment,extensions/DaemonSet,api/ConfigMap,api/Event,batch/Job,autoscaling/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/,api/,extensions/,batch/,autoscaling/] // Package fake has the automatically generated clients. package fake diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/fake/fake_configmap.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/fake/fake_configmap.go index ca7da8b8..f4bf6710 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/fake/fake_configmap.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/fake/fake_configmap.go @@ -20,6 +20,7 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/kubernetes/pkg/api" core "k8s.io/kubernetes/pkg/client/testing/core" @@ -53,14 +54,14 @@ func (c *FakeConfigMaps) Update(configMap *api.ConfigMap) (result *api.ConfigMap return obj.(*api.ConfigMap), err } -func (c *FakeConfigMaps) Delete(name string, options *api.DeleteOptions) error { +func (c *FakeConfigMaps) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewDeleteAction(configmapsResource, c.ns, name), &api.ConfigMap{}) return err } -func (c *FakeConfigMaps) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *FakeConfigMaps) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := core.NewDeleteCollectionAction(configmapsResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &api.ConfigMapList{}) @@ -77,7 +78,7 @@ func (c *FakeConfigMaps) Get(name string, options v1.GetOptions) (result *api.Co return obj.(*api.ConfigMap), err } -func (c *FakeConfigMaps) List(opts api.ListOptions) (result *api.ConfigMapList, err error) { +func (c *FakeConfigMaps) List(opts v1.ListOptions) (result *api.ConfigMapList, err error) { obj, err := c.Fake. Invokes(core.NewListAction(configmapsResource, c.ns, opts), &api.ConfigMapList{}) @@ -99,14 +100,14 @@ func (c *FakeConfigMaps) List(opts api.ListOptions) (result *api.ConfigMapList, } // Watch returns a watch.Interface that watches the requested configMaps. -func (c *FakeConfigMaps) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *FakeConfigMaps) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewWatchAction(configmapsResource, c.ns, opts)) } // Patch applies the patch and returns the patched configMap. -func (c *FakeConfigMaps) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.ConfigMap, err error) { +func (c *FakeConfigMaps) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.ConfigMap, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(configmapsResource, c.ns, name, data, subresources...), &api.ConfigMap{}) diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/fake/fake_core_client.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/fake/fake_core_client.go index 31264b0f..a19f8d86 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/fake/fake_core_client.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/fake/fake_core_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" internalversion "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -48,7 +48,7 @@ func (c *FakeCore) Services(namespace string) internalversion.ServiceInterface { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeCore) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeCore) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/fake/fake_event.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/fake/fake_event.go index f0bfbe93..78f526f8 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/fake/fake_event.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/fake/fake_event.go @@ -20,6 +20,7 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/kubernetes/pkg/api" core "k8s.io/kubernetes/pkg/client/testing/core" @@ -53,14 +54,14 @@ func (c *FakeEvents) Update(event *api.Event) (result *api.Event, err error) { return obj.(*api.Event), err } -func (c *FakeEvents) Delete(name string, options *api.DeleteOptions) error { +func (c *FakeEvents) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewDeleteAction(eventsResource, c.ns, name), &api.Event{}) return err } -func (c *FakeEvents) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *FakeEvents) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := core.NewDeleteCollectionAction(eventsResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &api.EventList{}) @@ -77,7 +78,7 @@ func (c *FakeEvents) Get(name string, options v1.GetOptions) (result *api.Event, return obj.(*api.Event), err } -func (c *FakeEvents) List(opts api.ListOptions) (result *api.EventList, err error) { +func (c *FakeEvents) List(opts v1.ListOptions) (result *api.EventList, err error) { obj, err := c.Fake. Invokes(core.NewListAction(eventsResource, c.ns, opts), &api.EventList{}) @@ -99,14 +100,14 @@ func (c *FakeEvents) List(opts api.ListOptions) (result *api.EventList, err erro } // Watch returns a watch.Interface that watches the requested events. -func (c *FakeEvents) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *FakeEvents) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewWatchAction(eventsResource, c.ns, opts)) } // Patch applies the patch and returns the patched event. -func (c *FakeEvents) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.Event, err error) { +func (c *FakeEvents) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.Event, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(eventsResource, c.ns, name, data, subresources...), &api.Event{}) diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/fake/fake_namespace.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/fake/fake_namespace.go index 9a6cf610..d56a744a 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/fake/fake_namespace.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/fake/fake_namespace.go @@ -20,6 +20,7 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/kubernetes/pkg/api" core "k8s.io/kubernetes/pkg/client/testing/core" @@ -59,13 +60,13 @@ func (c *FakeNamespaces) UpdateStatus(namespace *api.Namespace) (*api.Namespace, return obj.(*api.Namespace), err } -func (c *FakeNamespaces) Delete(name string, options *api.DeleteOptions) error { +func (c *FakeNamespaces) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewRootDeleteAction(namespacesResource, name), &api.Namespace{}) return err } -func (c *FakeNamespaces) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *FakeNamespaces) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := core.NewRootDeleteCollectionAction(namespacesResource, listOptions) _, err := c.Fake.Invokes(action, &api.NamespaceList{}) @@ -81,7 +82,7 @@ func (c *FakeNamespaces) Get(name string, options v1.GetOptions) (result *api.Na return obj.(*api.Namespace), err } -func (c *FakeNamespaces) List(opts api.ListOptions) (result *api.NamespaceList, err error) { +func (c *FakeNamespaces) List(opts v1.ListOptions) (result *api.NamespaceList, err error) { obj, err := c.Fake. Invokes(core.NewRootListAction(namespacesResource, opts), &api.NamespaceList{}) if obj == nil { @@ -102,13 +103,13 @@ func (c *FakeNamespaces) List(opts api.ListOptions) (result *api.NamespaceList, } // Watch returns a watch.Interface that watches the requested namespaces. -func (c *FakeNamespaces) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *FakeNamespaces) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewRootWatchAction(namespacesResource, opts)) } // Patch applies the patch and returns the patched namespace. -func (c *FakeNamespaces) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.Namespace, err error) { +func (c *FakeNamespaces) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.Namespace, err error) { obj, err := c.Fake. Invokes(core.NewRootPatchSubresourceAction(namespacesResource, name, data, subresources...), &api.Namespace{}) if obj == nil { diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/fake/fake_secret.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/fake/fake_secret.go index 6451df68..76600c49 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/fake/fake_secret.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/fake/fake_secret.go @@ -20,6 +20,7 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/kubernetes/pkg/api" core "k8s.io/kubernetes/pkg/client/testing/core" @@ -53,14 +54,14 @@ func (c *FakeSecrets) Update(secret *api.Secret) (result *api.Secret, err error) return obj.(*api.Secret), err } -func (c *FakeSecrets) Delete(name string, options *api.DeleteOptions) error { +func (c *FakeSecrets) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewDeleteAction(secretsResource, c.ns, name), &api.Secret{}) return err } -func (c *FakeSecrets) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *FakeSecrets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := core.NewDeleteCollectionAction(secretsResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &api.SecretList{}) @@ -77,7 +78,7 @@ func (c *FakeSecrets) Get(name string, options v1.GetOptions) (result *api.Secre return obj.(*api.Secret), err } -func (c *FakeSecrets) List(opts api.ListOptions) (result *api.SecretList, err error) { +func (c *FakeSecrets) List(opts v1.ListOptions) (result *api.SecretList, err error) { obj, err := c.Fake. Invokes(core.NewListAction(secretsResource, c.ns, opts), &api.SecretList{}) @@ -99,14 +100,14 @@ func (c *FakeSecrets) List(opts api.ListOptions) (result *api.SecretList, err er } // Watch returns a watch.Interface that watches the requested secrets. -func (c *FakeSecrets) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *FakeSecrets) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewWatchAction(secretsResource, c.ns, opts)) } // Patch applies the patch and returns the patched secret. -func (c *FakeSecrets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.Secret, err error) { +func (c *FakeSecrets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.Secret, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(secretsResource, c.ns, name, data, subresources...), &api.Secret{}) diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/fake/fake_service.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/fake/fake_service.go index 5cc5c2d6..8e98d16b 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/fake/fake_service.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/fake/fake_service.go @@ -20,6 +20,7 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/kubernetes/pkg/api" core "k8s.io/kubernetes/pkg/client/testing/core" @@ -63,14 +64,14 @@ func (c *FakeServices) UpdateStatus(service *api.Service) (*api.Service, error) return obj.(*api.Service), err } -func (c *FakeServices) Delete(name string, options *api.DeleteOptions) error { +func (c *FakeServices) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewDeleteAction(servicesResource, c.ns, name), &api.Service{}) return err } -func (c *FakeServices) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *FakeServices) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := core.NewDeleteCollectionAction(servicesResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &api.ServiceList{}) @@ -87,7 +88,7 @@ func (c *FakeServices) Get(name string, options v1.GetOptions) (result *api.Serv return obj.(*api.Service), err } -func (c *FakeServices) List(opts api.ListOptions) (result *api.ServiceList, err error) { +func (c *FakeServices) List(opts v1.ListOptions) (result *api.ServiceList, err error) { obj, err := c.Fake. Invokes(core.NewListAction(servicesResource, c.ns, opts), &api.ServiceList{}) @@ -109,14 +110,14 @@ func (c *FakeServices) List(opts api.ListOptions) (result *api.ServiceList, err } // Watch returns a watch.Interface that watches the requested services. -func (c *FakeServices) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *FakeServices) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewWatchAction(servicesResource, c.ns, opts)) } // Patch applies the patch and returns the patched service. -func (c *FakeServices) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.Service, err error) { +func (c *FakeServices) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.Service, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(servicesResource, c.ns, name, data, subresources...), &api.Service{}) diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/namespace.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/namespace.go index 40b6e54e..fbcdd140 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/namespace.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/namespace.go @@ -18,9 +18,10 @@ package internalversion import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // NamespacesGetter has a method to return a NamespaceInterface. @@ -34,18 +35,18 @@ type NamespaceInterface interface { Create(*api.Namespace) (*api.Namespace, error) Update(*api.Namespace) (*api.Namespace, error) UpdateStatus(*api.Namespace) (*api.Namespace, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error Get(name string, options v1.GetOptions) (*api.Namespace, error) - List(opts api.ListOptions) (*api.NamespaceList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.Namespace, err error) + List(opts v1.ListOptions) (*api.NamespaceList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.Namespace, err error) NamespaceExpansion } // namespaces implements NamespaceInterface type namespaces struct { - client restclient.Interface + client rest.Interface } // newNamespaces returns a Namespaces @@ -94,7 +95,7 @@ func (c *namespaces) UpdateStatus(namespace *api.Namespace) (result *api.Namespa } // Delete takes name of the namespace and deletes it. Returns an error if one occurs. -func (c *namespaces) Delete(name string, options *api.DeleteOptions) error { +func (c *namespaces) Delete(name string, options *v1.DeleteOptions) error { return c.client.Delete(). Resource("namespaces"). Name(name). @@ -104,7 +105,7 @@ func (c *namespaces) Delete(name string, options *api.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *namespaces) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *namespaces) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { return c.client.Delete(). Resource("namespaces"). VersionedParams(&listOptions, api.ParameterCodec). @@ -126,7 +127,7 @@ func (c *namespaces) Get(name string, options v1.GetOptions) (result *api.Namesp } // List takes label and field selectors, and returns the list of Namespaces that match those selectors. -func (c *namespaces) List(opts api.ListOptions) (result *api.NamespaceList, err error) { +func (c *namespaces) List(opts v1.ListOptions) (result *api.NamespaceList, err error) { result = &api.NamespaceList{} err = c.client.Get(). Resource("namespaces"). @@ -137,7 +138,7 @@ func (c *namespaces) List(opts api.ListOptions) (result *api.NamespaceList, err } // Watch returns a watch.Interface that watches the requested namespaces. -func (c *namespaces) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *namespaces) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Resource("namespaces"). @@ -146,7 +147,7 @@ func (c *namespaces) Watch(opts api.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched namespace. -func (c *namespaces) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.Namespace, err error) { +func (c *namespaces) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.Namespace, err error) { result = &api.Namespace{} err = c.client.Patch(pt). Resource("namespaces"). diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/secret.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/secret.go index 632636f1..d91f0d9d 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/secret.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/secret.go @@ -18,9 +18,10 @@ package internalversion import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // SecretsGetter has a method to return a SecretInterface. @@ -33,18 +34,18 @@ type SecretsGetter interface { type SecretInterface interface { Create(*api.Secret) (*api.Secret, error) Update(*api.Secret) (*api.Secret, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error Get(name string, options v1.GetOptions) (*api.Secret, error) - List(opts api.ListOptions) (*api.SecretList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.Secret, err error) + List(opts v1.ListOptions) (*api.SecretList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.Secret, err error) SecretExpansion } // secrets implements SecretInterface type secrets struct { - client restclient.Interface + client rest.Interface ns string } @@ -82,7 +83,7 @@ func (c *secrets) Update(secret *api.Secret) (result *api.Secret, err error) { } // Delete takes name of the secret and deletes it. Returns an error if one occurs. -func (c *secrets) Delete(name string, options *api.DeleteOptions) error { +func (c *secrets) Delete(name string, options *v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("secrets"). @@ -93,7 +94,7 @@ func (c *secrets) Delete(name string, options *api.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *secrets) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *secrets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("secrets"). @@ -117,7 +118,7 @@ func (c *secrets) Get(name string, options v1.GetOptions) (result *api.Secret, e } // List takes label and field selectors, and returns the list of Secrets that match those selectors. -func (c *secrets) List(opts api.ListOptions) (result *api.SecretList, err error) { +func (c *secrets) List(opts v1.ListOptions) (result *api.SecretList, err error) { result = &api.SecretList{} err = c.client.Get(). Namespace(c.ns). @@ -129,7 +130,7 @@ func (c *secrets) List(opts api.ListOptions) (result *api.SecretList, err error) } // Watch returns a watch.Interface that watches the requested secrets. -func (c *secrets) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *secrets) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -139,7 +140,7 @@ func (c *secrets) Watch(opts api.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched secret. -func (c *secrets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.Secret, err error) { +func (c *secrets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.Secret, err error) { result = &api.Secret{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/service.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/service.go index 4aff717f..abb74194 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/service.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/core/internalversion/service.go @@ -18,9 +18,10 @@ package internalversion import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // ServicesGetter has a method to return a ServiceInterface. @@ -34,18 +35,18 @@ type ServiceInterface interface { Create(*api.Service) (*api.Service, error) Update(*api.Service) (*api.Service, error) UpdateStatus(*api.Service) (*api.Service, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error Get(name string, options v1.GetOptions) (*api.Service, error) - List(opts api.ListOptions) (*api.ServiceList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.Service, err error) + List(opts v1.ListOptions) (*api.ServiceList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.Service, err error) ServiceExpansion } // services implements ServiceInterface type services struct { - client restclient.Interface + client rest.Interface ns string } @@ -99,7 +100,7 @@ func (c *services) UpdateStatus(service *api.Service) (result *api.Service, err } // Delete takes name of the service and deletes it. Returns an error if one occurs. -func (c *services) Delete(name string, options *api.DeleteOptions) error { +func (c *services) Delete(name string, options *v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("services"). @@ -110,7 +111,7 @@ func (c *services) Delete(name string, options *api.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *services) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *services) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("services"). @@ -134,7 +135,7 @@ func (c *services) Get(name string, options v1.GetOptions) (result *api.Service, } // List takes label and field selectors, and returns the list of Services that match those selectors. -func (c *services) List(opts api.ListOptions) (result *api.ServiceList, err error) { +func (c *services) List(opts v1.ListOptions) (result *api.ServiceList, err error) { result = &api.ServiceList{} err = c.client.Get(). Namespace(c.ns). @@ -146,7 +147,7 @@ func (c *services) List(opts api.ListOptions) (result *api.ServiceList, err erro } // Watch returns a watch.Interface that watches the requested services. -func (c *services) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *services) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -156,7 +157,7 @@ func (c *services) Watch(opts api.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched service. -func (c *services) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.Service, err error) { +func (c *services) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.Service, err error) { result = &api.Service{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/BUILD b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/BUILD index 7e9a88ed..bf69571a 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/BUILD +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/BUILD @@ -22,9 +22,10 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/apis/extensions:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/daemonset.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/daemonset.go index 9e9dcee2..e172f810 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/daemonset.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/daemonset.go @@ -18,10 +18,11 @@ package internalversion import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" extensions "k8s.io/kubernetes/pkg/apis/extensions" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // DaemonSetsGetter has a method to return a DaemonSetInterface. @@ -35,18 +36,18 @@ type DaemonSetInterface interface { Create(*extensions.DaemonSet) (*extensions.DaemonSet, error) Update(*extensions.DaemonSet) (*extensions.DaemonSet, error) UpdateStatus(*extensions.DaemonSet) (*extensions.DaemonSet, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error Get(name string, options v1.GetOptions) (*extensions.DaemonSet, error) - List(opts api.ListOptions) (*extensions.DaemonSetList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *extensions.DaemonSet, err error) + List(opts v1.ListOptions) (*extensions.DaemonSetList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *extensions.DaemonSet, err error) DaemonSetExpansion } // daemonSets implements DaemonSetInterface type daemonSets struct { - client restclient.Interface + client rest.Interface ns string } @@ -100,7 +101,7 @@ func (c *daemonSets) UpdateStatus(daemonSet *extensions.DaemonSet) (result *exte } // Delete takes name of the daemonSet and deletes it. Returns an error if one occurs. -func (c *daemonSets) Delete(name string, options *api.DeleteOptions) error { +func (c *daemonSets) Delete(name string, options *v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("daemonsets"). @@ -111,7 +112,7 @@ func (c *daemonSets) Delete(name string, options *api.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *daemonSets) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *daemonSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("daemonsets"). @@ -135,7 +136,7 @@ func (c *daemonSets) Get(name string, options v1.GetOptions) (result *extensions } // List takes label and field selectors, and returns the list of DaemonSets that match those selectors. -func (c *daemonSets) List(opts api.ListOptions) (result *extensions.DaemonSetList, err error) { +func (c *daemonSets) List(opts v1.ListOptions) (result *extensions.DaemonSetList, err error) { result = &extensions.DaemonSetList{} err = c.client.Get(). Namespace(c.ns). @@ -147,7 +148,7 @@ func (c *daemonSets) List(opts api.ListOptions) (result *extensions.DaemonSetLis } // Watch returns a watch.Interface that watches the requested daemonSets. -func (c *daemonSets) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *daemonSets) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -157,7 +158,7 @@ func (c *daemonSets) Watch(opts api.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched daemonSet. -func (c *daemonSets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *extensions.DaemonSet, err error) { +func (c *daemonSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *extensions.DaemonSet, err error) { result = &extensions.DaemonSet{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/deployment.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/deployment.go index 949f30e2..cb525a95 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/deployment.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/deployment.go @@ -18,10 +18,11 @@ package internalversion import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" extensions "k8s.io/kubernetes/pkg/apis/extensions" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // DeploymentsGetter has a method to return a DeploymentInterface. @@ -35,18 +36,18 @@ type DeploymentInterface interface { Create(*extensions.Deployment) (*extensions.Deployment, error) Update(*extensions.Deployment) (*extensions.Deployment, error) UpdateStatus(*extensions.Deployment) (*extensions.Deployment, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error Get(name string, options v1.GetOptions) (*extensions.Deployment, error) - List(opts api.ListOptions) (*extensions.DeploymentList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *extensions.Deployment, err error) + List(opts v1.ListOptions) (*extensions.DeploymentList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *extensions.Deployment, err error) DeploymentExpansion } // deployments implements DeploymentInterface type deployments struct { - client restclient.Interface + client rest.Interface ns string } @@ -100,7 +101,7 @@ func (c *deployments) UpdateStatus(deployment *extensions.Deployment) (result *e } // Delete takes name of the deployment and deletes it. Returns an error if one occurs. -func (c *deployments) Delete(name string, options *api.DeleteOptions) error { +func (c *deployments) Delete(name string, options *v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("deployments"). @@ -111,7 +112,7 @@ func (c *deployments) Delete(name string, options *api.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *deployments) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *deployments) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("deployments"). @@ -135,7 +136,7 @@ func (c *deployments) Get(name string, options v1.GetOptions) (result *extension } // List takes label and field selectors, and returns the list of Deployments that match those selectors. -func (c *deployments) List(opts api.ListOptions) (result *extensions.DeploymentList, err error) { +func (c *deployments) List(opts v1.ListOptions) (result *extensions.DeploymentList, err error) { result = &extensions.DeploymentList{} err = c.client.Get(). Namespace(c.ns). @@ -147,7 +148,7 @@ func (c *deployments) List(opts api.ListOptions) (result *extensions.DeploymentL } // Watch returns a watch.Interface that watches the requested deployments. -func (c *deployments) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *deployments) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -157,7 +158,7 @@ func (c *deployments) Watch(opts api.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched deployment. -func (c *deployments) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *extensions.Deployment, err error) { +func (c *deployments) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *extensions.Deployment, err error) { result = &extensions.Deployment{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/doc.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/doc.go index 90ba8be0..8ffebfae 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/doc.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/Service,api/Namespace,extensions/ReplicaSet,api/Secret,extensions/Ingress,extensions/Deployment,extensions/DaemonSet,api/ConfigMap,api/Event,batch/Job] --input=[../../federation/apis/federation/,api/,extensions/,batch/] +// This package is generated by client-gen with arguments: --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/Service,api/Namespace,extensions/ReplicaSet,api/Secret,extensions/Ingress,extensions/Deployment,extensions/DaemonSet,api/ConfigMap,api/Event,batch/Job,autoscaling/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/,api/,extensions/,batch/,autoscaling/] // This package has the automatically generated typed clients. package internalversion diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/extensions_client.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/extensions_client.go index 86065d6c..9f37c172 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/extensions_client.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/extensions_client.go @@ -17,12 +17,12 @@ limitations under the License. package internalversion import ( + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type ExtensionsInterface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface DaemonSetsGetter DeploymentsGetter IngressesGetter @@ -31,7 +31,7 @@ type ExtensionsInterface interface { // ExtensionsClient is used to interact with features provided by the extensions group. type ExtensionsClient struct { - restClient restclient.Interface + restClient rest.Interface } func (c *ExtensionsClient) DaemonSets(namespace string) DaemonSetInterface { @@ -51,12 +51,12 @@ func (c *ExtensionsClient) ReplicaSets(namespace string) ReplicaSetInterface { } // NewForConfig creates a new ExtensionsClient for the given config. -func NewForConfig(c *restclient.Config) (*ExtensionsClient, error) { +func NewForConfig(c *rest.Config) (*ExtensionsClient, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -65,7 +65,7 @@ func NewForConfig(c *restclient.Config) (*ExtensionsClient, error) { // NewForConfigOrDie creates a new ExtensionsClient for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *ExtensionsClient { +func NewForConfigOrDie(c *rest.Config) *ExtensionsClient { client, err := NewForConfig(c) if err != nil { panic(err) @@ -74,11 +74,11 @@ func NewForConfigOrDie(c *restclient.Config) *ExtensionsClient { } // New creates a new ExtensionsClient for the given RESTClient. -func New(c restclient.Interface) *ExtensionsClient { +func New(c rest.Interface) *ExtensionsClient { return &ExtensionsClient{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { // if extensions group is not registered, return an error g, err := api.Registry.Group("extensions") if err != nil { @@ -86,7 +86,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/apis" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } if config.GroupVersion == nil || config.GroupVersion.Group != g.GroupVersion.Group { copyGroupVersion := g.GroupVersion @@ -105,7 +105,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *ExtensionsClient) RESTClient() restclient.Interface { +func (c *ExtensionsClient) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/fake/BUILD b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/fake/BUILD index 6f283c59..5b9acf12 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/fake/BUILD +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/fake/BUILD @@ -20,14 +20,14 @@ go_library( tags = ["automanaged"], deps = [ "//federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion:go_default_library", - "//pkg/api:go_default_library", "//pkg/apis/extensions:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/fake/doc.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/fake/doc.go index f45ab010..6f13dc4e 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/fake/doc.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/fake/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/Service,api/Namespace,extensions/ReplicaSet,api/Secret,extensions/Ingress,extensions/Deployment,extensions/DaemonSet,api/ConfigMap,api/Event,batch/Job] --input=[../../federation/apis/federation/,api/,extensions/,batch/] +// This package is generated by client-gen with arguments: --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/Service,api/Namespace,extensions/ReplicaSet,api/Secret,extensions/Ingress,extensions/Deployment,extensions/DaemonSet,api/ConfigMap,api/Event,batch/Job,autoscaling/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/,api/,extensions/,batch/,autoscaling/] // Package fake has the automatically generated clients. package fake diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/fake/fake_daemonset.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/fake/fake_daemonset.go index 86c9ce4b..92351898 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/fake/fake_daemonset.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/fake/fake_daemonset.go @@ -20,8 +20,8 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" extensions "k8s.io/kubernetes/pkg/apis/extensions" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -64,14 +64,14 @@ func (c *FakeDaemonSets) UpdateStatus(daemonSet *extensions.DaemonSet) (*extensi return obj.(*extensions.DaemonSet), err } -func (c *FakeDaemonSets) Delete(name string, options *api.DeleteOptions) error { +func (c *FakeDaemonSets) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewDeleteAction(daemonsetsResource, c.ns, name), &extensions.DaemonSet{}) return err } -func (c *FakeDaemonSets) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *FakeDaemonSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := core.NewDeleteCollectionAction(daemonsetsResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &extensions.DaemonSetList{}) @@ -88,7 +88,7 @@ func (c *FakeDaemonSets) Get(name string, options v1.GetOptions) (result *extens return obj.(*extensions.DaemonSet), err } -func (c *FakeDaemonSets) List(opts api.ListOptions) (result *extensions.DaemonSetList, err error) { +func (c *FakeDaemonSets) List(opts v1.ListOptions) (result *extensions.DaemonSetList, err error) { obj, err := c.Fake. Invokes(core.NewListAction(daemonsetsResource, c.ns, opts), &extensions.DaemonSetList{}) @@ -110,14 +110,14 @@ func (c *FakeDaemonSets) List(opts api.ListOptions) (result *extensions.DaemonSe } // Watch returns a watch.Interface that watches the requested daemonSets. -func (c *FakeDaemonSets) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *FakeDaemonSets) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewWatchAction(daemonsetsResource, c.ns, opts)) } // Patch applies the patch and returns the patched daemonSet. -func (c *FakeDaemonSets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *extensions.DaemonSet, err error) { +func (c *FakeDaemonSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *extensions.DaemonSet, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(daemonsetsResource, c.ns, name, data, subresources...), &extensions.DaemonSet{}) diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/fake/fake_deployment.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/fake/fake_deployment.go index a9a9f629..0155cff3 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/fake/fake_deployment.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/fake/fake_deployment.go @@ -20,8 +20,8 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" extensions "k8s.io/kubernetes/pkg/apis/extensions" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -64,14 +64,14 @@ func (c *FakeDeployments) UpdateStatus(deployment *extensions.Deployment) (*exte return obj.(*extensions.Deployment), err } -func (c *FakeDeployments) Delete(name string, options *api.DeleteOptions) error { +func (c *FakeDeployments) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewDeleteAction(deploymentsResource, c.ns, name), &extensions.Deployment{}) return err } -func (c *FakeDeployments) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *FakeDeployments) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := core.NewDeleteCollectionAction(deploymentsResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &extensions.DeploymentList{}) @@ -88,7 +88,7 @@ func (c *FakeDeployments) Get(name string, options v1.GetOptions) (result *exten return obj.(*extensions.Deployment), err } -func (c *FakeDeployments) List(opts api.ListOptions) (result *extensions.DeploymentList, err error) { +func (c *FakeDeployments) List(opts v1.ListOptions) (result *extensions.DeploymentList, err error) { obj, err := c.Fake. Invokes(core.NewListAction(deploymentsResource, c.ns, opts), &extensions.DeploymentList{}) @@ -110,14 +110,14 @@ func (c *FakeDeployments) List(opts api.ListOptions) (result *extensions.Deploym } // Watch returns a watch.Interface that watches the requested deployments. -func (c *FakeDeployments) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *FakeDeployments) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewWatchAction(deploymentsResource, c.ns, opts)) } // Patch applies the patch and returns the patched deployment. -func (c *FakeDeployments) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *extensions.Deployment, err error) { +func (c *FakeDeployments) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *extensions.Deployment, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(deploymentsResource, c.ns, name, data, subresources...), &extensions.Deployment{}) diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/fake/fake_extensions_client.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/fake/fake_extensions_client.go index 2267ec5c..23ac7065 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/fake/fake_extensions_client.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/fake/fake_extensions_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" internalversion "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -44,7 +44,7 @@ func (c *FakeExtensions) ReplicaSets(namespace string) internalversion.ReplicaSe // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeExtensions) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeExtensions) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/fake/fake_ingress.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/fake/fake_ingress.go index 50a748e0..7521342e 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/fake/fake_ingress.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/fake/fake_ingress.go @@ -20,8 +20,8 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" extensions "k8s.io/kubernetes/pkg/apis/extensions" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -64,14 +64,14 @@ func (c *FakeIngresses) UpdateStatus(ingress *extensions.Ingress) (*extensions.I return obj.(*extensions.Ingress), err } -func (c *FakeIngresses) Delete(name string, options *api.DeleteOptions) error { +func (c *FakeIngresses) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewDeleteAction(ingressesResource, c.ns, name), &extensions.Ingress{}) return err } -func (c *FakeIngresses) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *FakeIngresses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := core.NewDeleteCollectionAction(ingressesResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &extensions.IngressList{}) @@ -88,7 +88,7 @@ func (c *FakeIngresses) Get(name string, options v1.GetOptions) (result *extensi return obj.(*extensions.Ingress), err } -func (c *FakeIngresses) List(opts api.ListOptions) (result *extensions.IngressList, err error) { +func (c *FakeIngresses) List(opts v1.ListOptions) (result *extensions.IngressList, err error) { obj, err := c.Fake. Invokes(core.NewListAction(ingressesResource, c.ns, opts), &extensions.IngressList{}) @@ -110,14 +110,14 @@ func (c *FakeIngresses) List(opts api.ListOptions) (result *extensions.IngressLi } // Watch returns a watch.Interface that watches the requested ingresses. -func (c *FakeIngresses) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *FakeIngresses) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewWatchAction(ingressesResource, c.ns, opts)) } // Patch applies the patch and returns the patched ingress. -func (c *FakeIngresses) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *extensions.Ingress, err error) { +func (c *FakeIngresses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *extensions.Ingress, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(ingressesResource, c.ns, name, data, subresources...), &extensions.Ingress{}) diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/fake/fake_replicaset.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/fake/fake_replicaset.go index 2dad6fec..3fe846e6 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/fake/fake_replicaset.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/fake/fake_replicaset.go @@ -20,8 +20,8 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" extensions "k8s.io/kubernetes/pkg/apis/extensions" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -64,14 +64,14 @@ func (c *FakeReplicaSets) UpdateStatus(replicaSet *extensions.ReplicaSet) (*exte return obj.(*extensions.ReplicaSet), err } -func (c *FakeReplicaSets) Delete(name string, options *api.DeleteOptions) error { +func (c *FakeReplicaSets) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewDeleteAction(replicasetsResource, c.ns, name), &extensions.ReplicaSet{}) return err } -func (c *FakeReplicaSets) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *FakeReplicaSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := core.NewDeleteCollectionAction(replicasetsResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &extensions.ReplicaSetList{}) @@ -88,7 +88,7 @@ func (c *FakeReplicaSets) Get(name string, options v1.GetOptions) (result *exten return obj.(*extensions.ReplicaSet), err } -func (c *FakeReplicaSets) List(opts api.ListOptions) (result *extensions.ReplicaSetList, err error) { +func (c *FakeReplicaSets) List(opts v1.ListOptions) (result *extensions.ReplicaSetList, err error) { obj, err := c.Fake. Invokes(core.NewListAction(replicasetsResource, c.ns, opts), &extensions.ReplicaSetList{}) @@ -110,14 +110,14 @@ func (c *FakeReplicaSets) List(opts api.ListOptions) (result *extensions.Replica } // Watch returns a watch.Interface that watches the requested replicaSets. -func (c *FakeReplicaSets) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *FakeReplicaSets) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewWatchAction(replicasetsResource, c.ns, opts)) } // Patch applies the patch and returns the patched replicaSet. -func (c *FakeReplicaSets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *extensions.ReplicaSet, err error) { +func (c *FakeReplicaSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *extensions.ReplicaSet, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(replicasetsResource, c.ns, name, data, subresources...), &extensions.ReplicaSet{}) diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/ingress.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/ingress.go index a72a901d..e1db937b 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/ingress.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/ingress.go @@ -18,10 +18,11 @@ package internalversion import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" extensions "k8s.io/kubernetes/pkg/apis/extensions" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // IngressesGetter has a method to return a IngressInterface. @@ -35,18 +36,18 @@ type IngressInterface interface { Create(*extensions.Ingress) (*extensions.Ingress, error) Update(*extensions.Ingress) (*extensions.Ingress, error) UpdateStatus(*extensions.Ingress) (*extensions.Ingress, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error Get(name string, options v1.GetOptions) (*extensions.Ingress, error) - List(opts api.ListOptions) (*extensions.IngressList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *extensions.Ingress, err error) + List(opts v1.ListOptions) (*extensions.IngressList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *extensions.Ingress, err error) IngressExpansion } // ingresses implements IngressInterface type ingresses struct { - client restclient.Interface + client rest.Interface ns string } @@ -100,7 +101,7 @@ func (c *ingresses) UpdateStatus(ingress *extensions.Ingress) (result *extension } // Delete takes name of the ingress and deletes it. Returns an error if one occurs. -func (c *ingresses) Delete(name string, options *api.DeleteOptions) error { +func (c *ingresses) Delete(name string, options *v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("ingresses"). @@ -111,7 +112,7 @@ func (c *ingresses) Delete(name string, options *api.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *ingresses) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *ingresses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("ingresses"). @@ -135,7 +136,7 @@ func (c *ingresses) Get(name string, options v1.GetOptions) (result *extensions. } // List takes label and field selectors, and returns the list of Ingresses that match those selectors. -func (c *ingresses) List(opts api.ListOptions) (result *extensions.IngressList, err error) { +func (c *ingresses) List(opts v1.ListOptions) (result *extensions.IngressList, err error) { result = &extensions.IngressList{} err = c.client.Get(). Namespace(c.ns). @@ -147,7 +148,7 @@ func (c *ingresses) List(opts api.ListOptions) (result *extensions.IngressList, } // Watch returns a watch.Interface that watches the requested ingresses. -func (c *ingresses) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *ingresses) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -157,7 +158,7 @@ func (c *ingresses) Watch(opts api.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched ingress. -func (c *ingresses) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *extensions.Ingress, err error) { +func (c *ingresses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *extensions.Ingress, err error) { result = &extensions.Ingress{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/replicaset.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/replicaset.go index 249c9c60..35ad547e 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/replicaset.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/extensions/internalversion/replicaset.go @@ -18,10 +18,11 @@ package internalversion import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" extensions "k8s.io/kubernetes/pkg/apis/extensions" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // ReplicaSetsGetter has a method to return a ReplicaSetInterface. @@ -35,18 +36,18 @@ type ReplicaSetInterface interface { Create(*extensions.ReplicaSet) (*extensions.ReplicaSet, error) Update(*extensions.ReplicaSet) (*extensions.ReplicaSet, error) UpdateStatus(*extensions.ReplicaSet) (*extensions.ReplicaSet, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error Get(name string, options v1.GetOptions) (*extensions.ReplicaSet, error) - List(opts api.ListOptions) (*extensions.ReplicaSetList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *extensions.ReplicaSet, err error) + List(opts v1.ListOptions) (*extensions.ReplicaSetList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *extensions.ReplicaSet, err error) ReplicaSetExpansion } // replicaSets implements ReplicaSetInterface type replicaSets struct { - client restclient.Interface + client rest.Interface ns string } @@ -100,7 +101,7 @@ func (c *replicaSets) UpdateStatus(replicaSet *extensions.ReplicaSet) (result *e } // Delete takes name of the replicaSet and deletes it. Returns an error if one occurs. -func (c *replicaSets) Delete(name string, options *api.DeleteOptions) error { +func (c *replicaSets) Delete(name string, options *v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("replicasets"). @@ -111,7 +112,7 @@ func (c *replicaSets) Delete(name string, options *api.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *replicaSets) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *replicaSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("replicasets"). @@ -135,7 +136,7 @@ func (c *replicaSets) Get(name string, options v1.GetOptions) (result *extension } // List takes label and field selectors, and returns the list of ReplicaSets that match those selectors. -func (c *replicaSets) List(opts api.ListOptions) (result *extensions.ReplicaSetList, err error) { +func (c *replicaSets) List(opts v1.ListOptions) (result *extensions.ReplicaSetList, err error) { result = &extensions.ReplicaSetList{} err = c.client.Get(). Namespace(c.ns). @@ -147,7 +148,7 @@ func (c *replicaSets) List(opts api.ListOptions) (result *extensions.ReplicaSetL } // Watch returns a watch.Interface that watches the requested replicaSets. -func (c *replicaSets) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *replicaSets) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -157,7 +158,7 @@ func (c *replicaSets) Watch(opts api.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched replicaSet. -func (c *replicaSets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *extensions.ReplicaSet, err error) { +func (c *replicaSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *extensions.ReplicaSet, err error) { result = &extensions.ReplicaSet{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion/BUILD b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion/BUILD index 8957c4b7..2a4c6bca 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion/BUILD +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion/BUILD @@ -19,9 +19,10 @@ go_library( deps = [ "//federation/apis/federation:go_default_library", "//pkg/api:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion/cluster.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion/cluster.go index cd1c134d..7355ae26 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion/cluster.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion/cluster.go @@ -18,10 +18,11 @@ package internalversion import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" federation "k8s.io/kubernetes/federation/apis/federation" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // ClustersGetter has a method to return a ClusterInterface. @@ -35,18 +36,18 @@ type ClusterInterface interface { Create(*federation.Cluster) (*federation.Cluster, error) Update(*federation.Cluster) (*federation.Cluster, error) UpdateStatus(*federation.Cluster) (*federation.Cluster, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error Get(name string, options v1.GetOptions) (*federation.Cluster, error) - List(opts api.ListOptions) (*federation.ClusterList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *federation.Cluster, err error) + List(opts v1.ListOptions) (*federation.ClusterList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *federation.Cluster, err error) ClusterExpansion } // clusters implements ClusterInterface type clusters struct { - client restclient.Interface + client rest.Interface } // newClusters returns a Clusters @@ -95,7 +96,7 @@ func (c *clusters) UpdateStatus(cluster *federation.Cluster) (result *federation } // Delete takes name of the cluster and deletes it. Returns an error if one occurs. -func (c *clusters) Delete(name string, options *api.DeleteOptions) error { +func (c *clusters) Delete(name string, options *v1.DeleteOptions) error { return c.client.Delete(). Resource("clusters"). Name(name). @@ -105,7 +106,7 @@ func (c *clusters) Delete(name string, options *api.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *clusters) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *clusters) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { return c.client.Delete(). Resource("clusters"). VersionedParams(&listOptions, api.ParameterCodec). @@ -127,7 +128,7 @@ func (c *clusters) Get(name string, options v1.GetOptions) (result *federation.C } // List takes label and field selectors, and returns the list of Clusters that match those selectors. -func (c *clusters) List(opts api.ListOptions) (result *federation.ClusterList, err error) { +func (c *clusters) List(opts v1.ListOptions) (result *federation.ClusterList, err error) { result = &federation.ClusterList{} err = c.client.Get(). Resource("clusters"). @@ -138,7 +139,7 @@ func (c *clusters) List(opts api.ListOptions) (result *federation.ClusterList, e } // Watch returns a watch.Interface that watches the requested clusters. -func (c *clusters) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *clusters) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Resource("clusters"). @@ -147,7 +148,7 @@ func (c *clusters) Watch(opts api.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched cluster. -func (c *clusters) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *federation.Cluster, err error) { +func (c *clusters) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *federation.Cluster, err error) { result = &federation.Cluster{} err = c.client.Patch(pt). Resource("clusters"). diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion/doc.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion/doc.go index 90ba8be0..8ffebfae 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion/doc.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/Service,api/Namespace,extensions/ReplicaSet,api/Secret,extensions/Ingress,extensions/Deployment,extensions/DaemonSet,api/ConfigMap,api/Event,batch/Job] --input=[../../federation/apis/federation/,api/,extensions/,batch/] +// This package is generated by client-gen with arguments: --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/Service,api/Namespace,extensions/ReplicaSet,api/Secret,extensions/Ingress,extensions/Deployment,extensions/DaemonSet,api/ConfigMap,api/Event,batch/Job,autoscaling/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/,api/,extensions/,batch/,autoscaling/] // This package has the automatically generated typed clients. package internalversion diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion/fake/BUILD b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion/fake/BUILD index 628e1d4e..bba51fa6 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion/fake/BUILD +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion/fake/BUILD @@ -18,13 +18,13 @@ go_library( deps = [ "//federation/apis/federation:go_default_library", "//federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion:go_default_library", - "//pkg/api:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion/fake/doc.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion/fake/doc.go index f45ab010..6f13dc4e 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion/fake/doc.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion/fake/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/Service,api/Namespace,extensions/ReplicaSet,api/Secret,extensions/Ingress,extensions/Deployment,extensions/DaemonSet,api/ConfigMap,api/Event,batch/Job] --input=[../../federation/apis/federation/,api/,extensions/,batch/] +// This package is generated by client-gen with arguments: --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/Service,api/Namespace,extensions/ReplicaSet,api/Secret,extensions/Ingress,extensions/Deployment,extensions/DaemonSet,api/ConfigMap,api/Event,batch/Job,autoscaling/HorizontalPodAutoscaler] --input=[../../federation/apis/federation/,api/,extensions/,batch/,autoscaling/] // Package fake has the automatically generated clients. package fake diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion/fake/fake_cluster.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion/fake/fake_cluster.go index a19ad8e0..7eea65f6 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion/fake/fake_cluster.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion/fake/fake_cluster.go @@ -20,9 +20,9 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" federation "k8s.io/kubernetes/federation/apis/federation" - api "k8s.io/kubernetes/pkg/api" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -60,13 +60,13 @@ func (c *FakeClusters) UpdateStatus(cluster *federation.Cluster) (*federation.Cl return obj.(*federation.Cluster), err } -func (c *FakeClusters) Delete(name string, options *api.DeleteOptions) error { +func (c *FakeClusters) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewRootDeleteAction(clustersResource, name), &federation.Cluster{}) return err } -func (c *FakeClusters) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *FakeClusters) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := core.NewRootDeleteCollectionAction(clustersResource, listOptions) _, err := c.Fake.Invokes(action, &federation.ClusterList{}) @@ -82,7 +82,7 @@ func (c *FakeClusters) Get(name string, options v1.GetOptions) (result *federati return obj.(*federation.Cluster), err } -func (c *FakeClusters) List(opts api.ListOptions) (result *federation.ClusterList, err error) { +func (c *FakeClusters) List(opts v1.ListOptions) (result *federation.ClusterList, err error) { obj, err := c.Fake. Invokes(core.NewRootListAction(clustersResource, opts), &federation.ClusterList{}) if obj == nil { @@ -103,13 +103,13 @@ func (c *FakeClusters) List(opts api.ListOptions) (result *federation.ClusterLis } // Watch returns a watch.Interface that watches the requested clusters. -func (c *FakeClusters) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *FakeClusters) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewRootWatchAction(clustersResource, opts)) } // Patch applies the patch and returns the patched cluster. -func (c *FakeClusters) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *federation.Cluster, err error) { +func (c *FakeClusters) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *federation.Cluster, err error) { obj, err := c.Fake. Invokes(core.NewRootPatchSubresourceAction(clustersResource, name, data, subresources...), &federation.Cluster{}) if obj == nil { diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion/fake/fake_federation_client.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion/fake/fake_federation_client.go index 6e96cdf9..0bd29d43 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion/fake/fake_federation_client.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion/fake/fake_federation_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" internalversion "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -32,7 +32,7 @@ func (c *FakeFederation) Clusters() internalversion.ClusterInterface { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeFederation) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeFederation) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion/federation_client.go b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion/federation_client.go index 17367d12..e9108f0f 100644 --- a/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion/federation_client.go +++ b/vendor/k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion/federation_client.go @@ -17,18 +17,18 @@ limitations under the License. package internalversion import ( + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type FederationInterface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface ClustersGetter } // FederationClient is used to interact with features provided by the federation group. type FederationClient struct { - restClient restclient.Interface + restClient rest.Interface } func (c *FederationClient) Clusters() ClusterInterface { @@ -36,12 +36,12 @@ func (c *FederationClient) Clusters() ClusterInterface { } // NewForConfig creates a new FederationClient for the given config. -func NewForConfig(c *restclient.Config) (*FederationClient, error) { +func NewForConfig(c *rest.Config) (*FederationClient, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -50,7 +50,7 @@ func NewForConfig(c *restclient.Config) (*FederationClient, error) { // NewForConfigOrDie creates a new FederationClient for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *FederationClient { +func NewForConfigOrDie(c *rest.Config) *FederationClient { client, err := NewForConfig(c) if err != nil { panic(err) @@ -59,11 +59,11 @@ func NewForConfigOrDie(c *restclient.Config) *FederationClient { } // New creates a new FederationClient for the given RESTClient. -func New(c restclient.Interface) *FederationClient { +func New(c rest.Interface) *FederationClient { return &FederationClient{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { // if federation group is not registered, return an error g, err := api.Registry.Group("federation") if err != nil { @@ -71,7 +71,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/apis" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } if config.GroupVersion == nil || config.GroupVersion.Group != g.GroupVersion.Group { copyGroupVersion := g.GroupVersion @@ -90,7 +90,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FederationClient) RESTClient() restclient.Interface { +func (c *FederationClient) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/vendor/k8s.io/kubernetes/federation/cluster/federation-up.sh b/vendor/k8s.io/kubernetes/federation/cluster/federation-up.sh index 1486060f..bd13d797 100755 --- a/vendor/k8s.io/kubernetes/federation/cluster/federation-up.sh +++ b/vendor/k8s.io/kubernetes/federation/cluster/federation-up.sh @@ -82,6 +82,10 @@ if [[ "${USE_KUBEFED}" == "true" ]]; then init create_cluster_secrets else - export FEDERATION_IMAGE_TAG="$(echo ${KUBERNETES_RELEASE:-} | tr + _)" + # Read the version back from the versions file if no version is given. + readonly kube_version="$(cat ${KUBE_ROOT}/_output/federation/versions | python -c '\ +import json, sys;\ +print json.load(sys.stdin)["KUBE_VERSION"]')" + export FEDERATION_IMAGE_TAG="$(echo ${KUBERNETES_RELEASE:-${kube_version}} | tr + _)" create-federation-api-objects fi diff --git a/vendor/k8s.io/kubernetes/federation/cmd/federation-apiserver/OWNERS b/vendor/k8s.io/kubernetes/federation/cmd/federation-apiserver/OWNERS index c5bdda2d..fe144587 100644 --- a/vendor/k8s.io/kubernetes/federation/cmd/federation-apiserver/OWNERS +++ b/vendor/k8s.io/kubernetes/federation/cmd/federation-apiserver/OWNERS @@ -1,5 +1,10 @@ -assignees: - - lavalamp - - smarterclayton - - nikhiljindal - - krousey +approvers: +- lavalamp +- smarterclayton +- nikhiljindal +- krousey +reviewers: +- lavalamp +- smarterclayton +- nikhiljindal +- krousey diff --git a/vendor/k8s.io/kubernetes/federation/cmd/federation-apiserver/app/BUILD b/vendor/k8s.io/kubernetes/federation/cmd/federation-apiserver/app/BUILD index 7dcfacca..f559adc5 100644 --- a/vendor/k8s.io/kubernetes/federation/cmd/federation-apiserver/app/BUILD +++ b/vendor/k8s.io/kubernetes/federation/cmd/federation-apiserver/app/BUILD @@ -10,6 +10,7 @@ load( go_library( name = "go_default_library", srcs = [ + "autoscaling.go", "batch.go", "core.go", "extensions.go", @@ -26,9 +27,10 @@ go_library( "//federation/apis/federation/install:go_default_library", "//federation/cmd/federation-apiserver/app/options:go_default_library", "//federation/registry/cluster/etcd:go_default_library", - "//pkg/admission:go_default_library", "//pkg/api:go_default_library", "//pkg/api/install:go_default_library", + "//pkg/apis/autoscaling:go_default_library", + "//pkg/apis/autoscaling/install:go_default_library", "//pkg/apis/batch:go_default_library", "//pkg/apis/batch/install:go_default_library", "//pkg/apis/extensions:go_default_library", @@ -37,11 +39,14 @@ go_library( "//pkg/cloudprovider/providers:go_default_library", "//pkg/controller/informers:go_default_library", "//pkg/generated/openapi:go_default_library", - "//pkg/genericapiserver:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", - "//pkg/genericapiserver/filters:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic/registry:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", + "//pkg/genericapiserver/server:go_default_library", + "//pkg/genericapiserver/server/filters:go_default_library", "//pkg/kubeapiserver:go_default_library", "//pkg/kubeapiserver/admission:go_default_library", + "//pkg/registry/autoscaling/horizontalpodautoscaler/storage:go_default_library", "//pkg/registry/batch/job/storage:go_default_library", "//pkg/registry/cachesize:go_default_library", "//pkg/registry/core/configmap/storage:go_default_library", @@ -53,8 +58,6 @@ go_library( "//pkg/registry/extensions/deployment/storage:go_default_library", "//pkg/registry/extensions/ingress/storage:go_default_library", "//pkg/registry/extensions/replicaset/storage:go_default_library", - "//pkg/registry/generic:go_default_library", - "//pkg/registry/generic/registry:go_default_library", "//pkg/routes:go_default_library", "//pkg/version:go_default_library", "//plugin/pkg/admission/admit:go_default_library", @@ -69,6 +72,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/util/errors", "//vendor:k8s.io/apimachinery/pkg/util/sets", "//vendor:k8s.io/apimachinery/pkg/util/wait", + "//vendor:k8s.io/apiserver/pkg/admission", ], ) diff --git a/vendor/k8s.io/kubernetes/federation/cmd/federation-apiserver/app/autoscaling.go b/vendor/k8s.io/kubernetes/federation/cmd/federation-apiserver/app/autoscaling.go new file mode 100644 index 00000000..ac7655ca --- /dev/null +++ b/vendor/k8s.io/kubernetes/federation/cmd/federation-apiserver/app/autoscaling.go @@ -0,0 +1,51 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package app + +import ( + "github.com/golang/glog" + "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/apis/autoscaling" + _ "k8s.io/kubernetes/pkg/apis/autoscaling/install" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" + genericapiserver "k8s.io/kubernetes/pkg/genericapiserver/server" + hpastorage "k8s.io/kubernetes/pkg/registry/autoscaling/horizontalpodautoscaler/storage" +) + +func installAutoscalingAPIs(g *genericapiserver.GenericAPIServer, optsGetter generic.RESTOptionsGetter) { + hpaStorage, hpaStatusStorage := hpastorage.NewREST(optsGetter) + + autoscalingResources := map[string]rest.Storage{ + "horizontalpodautoscalers": hpaStorage, + "horizontalpodautoscalers/status": hpaStatusStorage, + } + autoscalingGroupMeta := api.Registry.GroupOrDie(autoscaling.GroupName) + apiGroupInfo := genericapiserver.APIGroupInfo{ + GroupMeta: *autoscalingGroupMeta, + VersionedResourcesStorageMap: map[string]map[string]rest.Storage{ + "v1": autoscalingResources, + }, + OptionsExternalVersion: &api.Registry.GroupOrDie(api.GroupName).GroupVersion, + Scheme: api.Scheme, + ParameterCodec: api.ParameterCodec, + NegotiatedSerializer: api.Codecs, + } + if err := g.InstallAPIGroup(&apiGroupInfo); err != nil { + glog.Fatalf("Error in registering group versions: %v", err) + } +} diff --git a/vendor/k8s.io/kubernetes/federation/cmd/federation-apiserver/app/batch.go b/vendor/k8s.io/kubernetes/federation/cmd/federation-apiserver/app/batch.go index f86134ff..d085b329 100644 --- a/vendor/k8s.io/kubernetes/federation/cmd/federation-apiserver/app/batch.go +++ b/vendor/k8s.io/kubernetes/federation/cmd/federation-apiserver/app/batch.go @@ -21,10 +21,10 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/batch" _ "k8s.io/kubernetes/pkg/apis/batch/install" - "k8s.io/kubernetes/pkg/genericapiserver" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" + genericapiserver "k8s.io/kubernetes/pkg/genericapiserver/server" jobstorage "k8s.io/kubernetes/pkg/registry/batch/job/storage" - "k8s.io/kubernetes/pkg/registry/generic" ) func installBatchAPIs(g *genericapiserver.GenericAPIServer, optsGetter generic.RESTOptionsGetter) { diff --git a/vendor/k8s.io/kubernetes/federation/cmd/federation-apiserver/app/core.go b/vendor/k8s.io/kubernetes/federation/cmd/federation-apiserver/app/core.go index 225d2c8f..27ba016b 100644 --- a/vendor/k8s.io/kubernetes/federation/cmd/federation-apiserver/app/core.go +++ b/vendor/k8s.io/kubernetes/federation/cmd/federation-apiserver/app/core.go @@ -31,14 +31,14 @@ import ( "k8s.io/kubernetes/federation/apis/core/v1" "k8s.io/kubernetes/federation/cmd/federation-apiserver/app/options" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/genericapiserver" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" + genericapiserver "k8s.io/kubernetes/pkg/genericapiserver/server" configmapstore "k8s.io/kubernetes/pkg/registry/core/configmap/storage" eventstore "k8s.io/kubernetes/pkg/registry/core/event/storage" namespacestore "k8s.io/kubernetes/pkg/registry/core/namespace/storage" secretstore "k8s.io/kubernetes/pkg/registry/core/secret/storage" servicestore "k8s.io/kubernetes/pkg/registry/core/service/storage" - "k8s.io/kubernetes/pkg/registry/generic" ) func installCoreAPIs(s *options.ServerRunOptions, g *genericapiserver.GenericAPIServer, optsGetter generic.RESTOptionsGetter) { diff --git a/vendor/k8s.io/kubernetes/federation/cmd/federation-apiserver/app/extensions.go b/vendor/k8s.io/kubernetes/federation/cmd/federation-apiserver/app/extensions.go index d36c9356..21705fd8 100644 --- a/vendor/k8s.io/kubernetes/federation/cmd/federation-apiserver/app/extensions.go +++ b/vendor/k8s.io/kubernetes/federation/cmd/federation-apiserver/app/extensions.go @@ -21,13 +21,13 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/extensions" _ "k8s.io/kubernetes/pkg/apis/extensions/install" - "k8s.io/kubernetes/pkg/genericapiserver" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" + genericapiserver "k8s.io/kubernetes/pkg/genericapiserver/server" daemonsetstore "k8s.io/kubernetes/pkg/registry/extensions/daemonset/storage" deploymentstore "k8s.io/kubernetes/pkg/registry/extensions/deployment/storage" ingressstore "k8s.io/kubernetes/pkg/registry/extensions/ingress/storage" replicasetstore "k8s.io/kubernetes/pkg/registry/extensions/replicaset/storage" - "k8s.io/kubernetes/pkg/registry/generic" ) func installExtensionsAPIs(g *genericapiserver.GenericAPIServer, optsGetter generic.RESTOptionsGetter) { diff --git a/vendor/k8s.io/kubernetes/federation/cmd/federation-apiserver/app/federation.go b/vendor/k8s.io/kubernetes/federation/cmd/federation-apiserver/app/federation.go index 41fa96ae..1ba1932b 100644 --- a/vendor/k8s.io/kubernetes/federation/cmd/federation-apiserver/app/federation.go +++ b/vendor/k8s.io/kubernetes/federation/cmd/federation-apiserver/app/federation.go @@ -21,9 +21,9 @@ import ( "k8s.io/kubernetes/federation/apis/federation" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/genericapiserver" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" - "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" + genericapiserver "k8s.io/kubernetes/pkg/genericapiserver/server" _ "k8s.io/kubernetes/federation/apis/federation/install" clusteretcd "k8s.io/kubernetes/federation/registry/cluster/etcd" diff --git a/vendor/k8s.io/kubernetes/federation/cmd/federation-apiserver/app/options/BUILD b/vendor/k8s.io/kubernetes/federation/cmd/federation-apiserver/app/options/BUILD index 2b714256..f5e88f11 100644 --- a/vendor/k8s.io/kubernetes/federation/cmd/federation-apiserver/app/options/BUILD +++ b/vendor/k8s.io/kubernetes/federation/cmd/federation-apiserver/app/options/BUILD @@ -15,7 +15,7 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/genericapiserver/options:go_default_library", + "//pkg/genericapiserver/server/options:go_default_library", "//pkg/kubeapiserver/options:go_default_library", "//vendor:github.com/spf13/pflag", ], diff --git a/vendor/k8s.io/kubernetes/federation/cmd/federation-apiserver/app/options/options.go b/vendor/k8s.io/kubernetes/federation/cmd/federation-apiserver/app/options/options.go index 413965d0..0908e0c5 100644 --- a/vendor/k8s.io/kubernetes/federation/cmd/federation-apiserver/app/options/options.go +++ b/vendor/k8s.io/kubernetes/federation/cmd/federation-apiserver/app/options/options.go @@ -20,7 +20,7 @@ package options import ( "time" - genericoptions "k8s.io/kubernetes/pkg/genericapiserver/options" + genericoptions "k8s.io/kubernetes/pkg/genericapiserver/server/options" kubeoptions "k8s.io/kubernetes/pkg/kubeapiserver/options" "github.com/spf13/pflag" diff --git a/vendor/k8s.io/kubernetes/federation/cmd/federation-apiserver/app/server.go b/vendor/k8s.io/kubernetes/federation/cmd/federation-apiserver/app/server.go index dfb454fc..6fe05949 100644 --- a/vendor/k8s.io/kubernetes/federation/cmd/federation-apiserver/app/server.go +++ b/vendor/k8s.io/kubernetes/federation/cmd/federation-apiserver/app/server.go @@ -33,19 +33,19 @@ import ( utilerrors "k8s.io/apimachinery/pkg/util/errors" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/apiserver/pkg/admission" "k8s.io/kubernetes/federation/cmd/federation-apiserver/app/options" - "k8s.io/kubernetes/pkg/admission" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" "k8s.io/kubernetes/pkg/controller/informers" "k8s.io/kubernetes/pkg/generated/openapi" - "k8s.io/kubernetes/pkg/genericapiserver" - "k8s.io/kubernetes/pkg/genericapiserver/filters" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + genericregistry "k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry" + genericapiserver "k8s.io/kubernetes/pkg/genericapiserver/server" + "k8s.io/kubernetes/pkg/genericapiserver/server/filters" "k8s.io/kubernetes/pkg/kubeapiserver" kubeapiserveradmission "k8s.io/kubernetes/pkg/kubeapiserver/admission" "k8s.io/kubernetes/pkg/registry/cachesize" - "k8s.io/kubernetes/pkg/registry/generic" - genericregistry "k8s.io/kubernetes/pkg/registry/generic/registry" "k8s.io/kubernetes/pkg/routes" "k8s.io/kubernetes/pkg/version" ) @@ -79,12 +79,13 @@ func Run(s *options.ServerRunOptions) error { return fmt.Errorf("error setting the external host value: %v", err) } + s.Authentication.ApplyAuthorization(s.Authorization) + // validate options if errs := s.Validate(); len(errs) != 0 { return utilerrors.NewAggregate(errs) } - // create config from options genericConfig := genericapiserver.NewConfig(). // create the new config ApplyOptions(s.GenericServerRunOptions). // apply the options selected ApplyInsecureServingOptions(s.InsecureServing) @@ -159,7 +160,11 @@ func Run(s *options.ServerRunOptions) error { admissionControlPluginNames := strings.Split(s.GenericServerRunOptions.AdmissionControl, ",") pluginInitializer := kubeapiserveradmission.NewPluginInitializer(client, sharedInformers, apiAuthorizer) - admissionController, err := admission.NewFromPlugins(admissionControlPluginNames, s.GenericServerRunOptions.AdmissionControlConfigFile, pluginInitializer) + admissionConfigProvider, err := kubeapiserveradmission.ReadAdmissionConfiguration(admissionControlPluginNames, s.GenericServerRunOptions.AdmissionControlConfigFile) + if err != nil { + return fmt.Errorf("failed to read plugin config: %v", err) + } + admissionController, err := admission.NewFromPlugins(admissionControlPluginNames, admissionConfigProvider, pluginInitializer) if err != nil { return fmt.Errorf("failed to initialize plugins: %v", err) } @@ -208,6 +213,7 @@ func Run(s *options.ServerRunOptions) error { installCoreAPIs(s, m, restOptionsFactory) installExtensionsAPIs(m, restOptionsFactory) installBatchAPIs(m, restOptionsFactory) + installAutoscalingAPIs(m, restOptionsFactory) sharedInformers.Start(wait.NeverStop) m.PrepareRun().Run(wait.NeverStop) diff --git a/vendor/k8s.io/kubernetes/federation/cmd/federation-controller-manager/BUILD b/vendor/k8s.io/kubernetes/federation/cmd/federation-controller-manager/BUILD index 1d219d51..b49af5dc 100644 --- a/vendor/k8s.io/kubernetes/federation/cmd/federation-controller-manager/BUILD +++ b/vendor/k8s.io/kubernetes/federation/cmd/federation-controller-manager/BUILD @@ -26,7 +26,7 @@ go_library( "//pkg/util/workqueue/prometheus:go_default_library", "//pkg/version/verflag:go_default_library", "//vendor:github.com/spf13/pflag", - "//vendor:k8s.io/apiserver/pkg/healthz", + "//vendor:k8s.io/apiserver/pkg/server/healthz", ], ) diff --git a/vendor/k8s.io/kubernetes/federation/cmd/federation-controller-manager/OWNERS b/vendor/k8s.io/kubernetes/federation/cmd/federation-controller-manager/OWNERS index c6b4c5c4..690aeaab 100644 --- a/vendor/k8s.io/kubernetes/federation/cmd/federation-controller-manager/OWNERS +++ b/vendor/k8s.io/kubernetes/federation/cmd/federation-controller-manager/OWNERS @@ -1,4 +1,8 @@ -assignees: - - quinton-hoole - - nikhiljindal - - madhusundancs +approvers: +- quinton-hoole +- nikhiljindal +- madhusundancs +reviewers: +- quinton-hoole +- nikhiljindal +- madhusundancs diff --git a/vendor/k8s.io/kubernetes/federation/cmd/federation-controller-manager/app/BUILD b/vendor/k8s.io/kubernetes/federation/cmd/federation-controller-manager/app/BUILD index 71dfaaee..4bd67337 100644 --- a/vendor/k8s.io/kubernetes/federation/cmd/federation-controller-manager/app/BUILD +++ b/vendor/k8s.io/kubernetes/federation/cmd/federation-controller-manager/app/BUILD @@ -32,9 +32,7 @@ go_library( "//federation/pkg/federation-controller/secret:go_default_library", "//federation/pkg/federation-controller/service:go_default_library", "//federation/pkg/federation-controller/util:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/typed/discovery:go_default_library", - "//pkg/client/unversioned/clientcmd:go_default_library", "//pkg/util/config:go_default_library", "//pkg/util/configz:go_default_library", "//pkg/version:go_default_library", @@ -45,7 +43,9 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/util/wait", - "//vendor:k8s.io/apiserver/pkg/healthz", + "//vendor:k8s.io/apiserver/pkg/server/healthz", + "//vendor:k8s.io/client-go/rest", + "//vendor:k8s.io/client-go/tools/clientcmd", ], ) diff --git a/vendor/k8s.io/kubernetes/federation/cmd/federation-controller-manager/app/controllermanager.go b/vendor/k8s.io/kubernetes/federation/cmd/federation-controller-manager/app/controllermanager.go index 41a4806a..a153753c 100644 --- a/vendor/k8s.io/kubernetes/federation/cmd/federation-controller-manager/app/controllermanager.go +++ b/vendor/k8s.io/kubernetes/federation/cmd/federation-controller-manager/app/controllermanager.go @@ -28,7 +28,9 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/apiserver/pkg/healthz" + "k8s.io/apiserver/pkg/server/healthz" + restclient "k8s.io/client-go/rest" + "k8s.io/client-go/tools/clientcmd" federationclientset "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset" "k8s.io/kubernetes/federation/cmd/federation-controller-manager/app/options" "k8s.io/kubernetes/federation/pkg/dnsprovider" @@ -42,8 +44,6 @@ import ( secretcontroller "k8s.io/kubernetes/federation/pkg/federation-controller/secret" servicecontroller "k8s.io/kubernetes/federation/pkg/federation-controller/service" "k8s.io/kubernetes/federation/pkg/federation-controller/util" - "k8s.io/kubernetes/pkg/client/restclient" - "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" "k8s.io/kubernetes/pkg/util/configz" "k8s.io/kubernetes/pkg/version" diff --git a/vendor/k8s.io/kubernetes/federation/cmd/federation-controller-manager/controller-manager.go b/vendor/k8s.io/kubernetes/federation/cmd/federation-controller-manager/controller-manager.go index 839d4340..05f0de7c 100644 --- a/vendor/k8s.io/kubernetes/federation/cmd/federation-controller-manager/controller-manager.go +++ b/vendor/k8s.io/kubernetes/federation/cmd/federation-controller-manager/controller-manager.go @@ -21,7 +21,7 @@ import ( "os" "github.com/spf13/pflag" - "k8s.io/apiserver/pkg/healthz" + "k8s.io/apiserver/pkg/server/healthz" "k8s.io/kubernetes/federation/cmd/federation-controller-manager/app" "k8s.io/kubernetes/federation/cmd/federation-controller-manager/app/options" "k8s.io/kubernetes/pkg/util/flag" diff --git a/vendor/k8s.io/kubernetes/pkg/selection/BUILD b/vendor/k8s.io/kubernetes/federation/develop/BUILD similarity index 64% rename from vendor/k8s.io/kubernetes/pkg/selection/BUILD rename to vendor/k8s.io/kubernetes/federation/develop/BUILD index fbedd42b..6cc62052 100644 --- a/vendor/k8s.io/kubernetes/pkg/selection/BUILD +++ b/vendor/k8s.io/kubernetes/federation/develop/BUILD @@ -2,17 +2,6 @@ package(default_visibility = ["//visibility:public"]) licenses(["notice"]) -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["operator.go"], - tags = ["automanaged"], -) - filegroup( name = "package-srcs", srcs = glob(["**"]), diff --git a/vendor/k8s.io/kubernetes/federation/docs/api-reference/extensions/v1beta1/definitions.html b/vendor/k8s.io/kubernetes/federation/docs/api-reference/extensions/v1beta1/definitions.html index c15cf027..821137d7 100755 --- a/vendor/k8s.io/kubernetes/federation/docs/api-reference/extensions/v1beta1/definitions.html +++ b/vendor/k8s.io/kubernetes/federation/docs/api-reference/extensions/v1beta1/definitions.html @@ -4923,7 +4923,14 @@ Both these may change in the future. Incoming requests are matched against the h

    terminationMessagePath

    -

    Optional: Path at which the file to which the container’s termination message will be written is mounted into the container’s filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated.

    +

    Optional: Path at which the file to which the container’s termination message will be written is mounted into the container’s filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated.

    +

    false

    +

    string

    + + + +

    terminationMessagePolicy

    +

    Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.

    false

    string

    @@ -6263,7 +6270,7 @@ Both these may change in the future. Incoming requests are matched against the h
    diff --git a/vendor/k8s.io/kubernetes/federation/manifests/.gitignore b/vendor/k8s.io/kubernetes/federation/manifests/.gitignore deleted file mode 100644 index b1280e87..00000000 --- a/vendor/k8s.io/kubernetes/federation/manifests/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/federated-image.tag diff --git a/vendor/k8s.io/kubernetes/federation/pkg/dnsprovider/providers/coredns/rrchangeset.go b/vendor/k8s.io/kubernetes/federation/pkg/dnsprovider/providers/coredns/rrchangeset.go index 8820ab46..ac8c84ed 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/dnsprovider/providers/coredns/rrchangeset.go +++ b/vendor/k8s.io/kubernetes/federation/pkg/dnsprovider/providers/coredns/rrchangeset.go @@ -19,10 +19,11 @@ package coredns import ( "encoding/json" "fmt" + "hash/fnv" + etcdc "github.com/coreos/etcd/client" dnsmsg "github.com/miekg/coredns/middleware/etcd/msg" "golang.org/x/net/context" - "hash/fnv" "k8s.io/kubernetes/federation/pkg/dnsprovider" ) diff --git a/vendor/k8s.io/kubernetes/federation/pkg/dnsprovider/providers/coredns/stubs/corednsapi.go b/vendor/k8s.io/kubernetes/federation/pkg/dnsprovider/providers/coredns/stubs/corednsapi.go index c3241e64..4e392257 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/dnsprovider/providers/coredns/stubs/corednsapi.go +++ b/vendor/k8s.io/kubernetes/federation/pkg/dnsprovider/providers/coredns/stubs/corednsapi.go @@ -18,9 +18,10 @@ limitations under the License. package stubs import ( + "strings" + etcd "github.com/coreos/etcd/client" "golang.org/x/net/context" - "strings" ) // Compile time check for interface conformance diff --git a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/OWNERS b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/OWNERS index 144e50df..571c01c0 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/OWNERS +++ b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/OWNERS @@ -1,4 +1,8 @@ -assignees: - - quinton-hoole - - nikhiljindal - - madhusudancs +approvers: +- quinton-hoole +- nikhiljindal +- madhusudancs +reviewers: +- quinton-hoole +- nikhiljindal +- madhusudancs diff --git a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/cluster/BUILD b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/cluster/BUILD index c8e1980d..00d568f4 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/cluster/BUILD +++ b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/cluster/BUILD @@ -25,7 +25,6 @@ go_library( "//pkg/api/v1:go_default_library", "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/internalclientset:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/typed/discovery:go_default_library", "//pkg/controller:go_default_library", "//vendor:github.com/golang/glog", @@ -35,6 +34,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/util/sets", "//vendor:k8s.io/apimachinery/pkg/util/wait", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) @@ -49,11 +49,11 @@ go_test( "//federation/pkg/federation-controller/util:go_default_library", "//pkg/api/testapi:go_default_library", "//pkg/api/v1:go_default_library", - "//pkg/client/restclient:go_default_library", - "//pkg/client/unversioned/clientcmd:go_default_library", - "//pkg/client/unversioned/clientcmd/api:go_default_library", "//pkg/util/uuid:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/client-go/rest", + "//vendor:k8s.io/client-go/tools/clientcmd", + "//vendor:k8s.io/client-go/tools/clientcmd/api", ], ) diff --git a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/cluster/cluster_client.go b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/cluster/cluster_client.go index 9a338453..d2cb53e2 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/cluster/cluster_client.go +++ b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/cluster/cluster_client.go @@ -23,12 +23,12 @@ import ( "github.com/golang/glog" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/sets" + restclient "k8s.io/client-go/rest" federation_v1beta1 "k8s.io/kubernetes/federation/apis/federation/v1beta1" "k8s.io/kubernetes/federation/pkg/federation-controller/util" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/typed/discovery" ) @@ -142,7 +142,7 @@ func getRegionNameForNode(node api.Node) (string, error) { // Find the names of all zones and the region in which we have nodes in this cluster. func getZoneNames(client *clientset.Clientset) (zones []string, region string, err error) { zoneNames := sets.NewString() - nodes, err := client.Core().Nodes().List(api.ListOptions{}) + nodes, err := client.Core().Nodes().List(metav1.ListOptions{}) if err != nil { glog.Errorf("Failed to list nodes while getting zone names: %v", err) return nil, "", err diff --git a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/cluster/clustercontroller.go b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/cluster/clustercontroller.go index 89c20833..d41ad536 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/cluster/clustercontroller.go +++ b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/cluster/clustercontroller.go @@ -21,6 +21,7 @@ import ( "time" "github.com/golang/glog" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/sets" @@ -29,7 +30,6 @@ import ( federationv1beta1 "k8s.io/kubernetes/federation/apis/federation/v1beta1" clustercache "k8s.io/kubernetes/federation/client/cache" federationclientset "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset" - "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/cache" "k8s.io/kubernetes/pkg/controller" ) @@ -64,10 +64,10 @@ func NewclusterController(federationClient federationclientset.Interface, cluste } cc.clusterStore.Store, cc.clusterController = cache.NewInformer( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { return cc.federationClient.Federation().Clusters().List(options) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { return cc.federationClient.Federation().Clusters().Watch(options) }, }, @@ -134,7 +134,7 @@ func (cc *ClusterController) GetClusterStatus(cluster *federationv1beta1.Cluster // UpdateClusterStatus checks cluster status and get the metrics from cluster's restapi func (cc *ClusterController) UpdateClusterStatus() error { - clusters, err := cc.federationClient.Federation().Clusters().List(v1.ListOptions{}) + clusters, err := cc.federationClient.Federation().Clusters().List(metav1.ListOptions{}) if err != nil { return err } diff --git a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/cluster/clustercontroller_test.go b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/cluster/clustercontroller_test.go index 76190b1f..44dcce1f 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/cluster/clustercontroller_test.go +++ b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/cluster/clustercontroller_test.go @@ -24,21 +24,21 @@ import ( "testing" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + restclient "k8s.io/client-go/rest" + "k8s.io/client-go/tools/clientcmd" + clientcmdapi "k8s.io/client-go/tools/clientcmd/api" federationv1beta1 "k8s.io/kubernetes/federation/apis/federation/v1beta1" federationclientset "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset" controllerutil "k8s.io/kubernetes/federation/pkg/federation-controller/util" "k8s.io/kubernetes/pkg/api/testapi" "k8s.io/kubernetes/pkg/api/v1" - "k8s.io/kubernetes/pkg/client/restclient" - "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" - clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api" "k8s.io/kubernetes/pkg/util/uuid" ) func newCluster(clusterName string, serverUrl string) *federationv1beta1.Cluster { cluster := federationv1beta1.Cluster{ TypeMeta: metav1.TypeMeta{APIVersion: testapi.Federation.GroupVersion().String()}, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: uuid.NewUUID(), Name: clusterName, }, diff --git a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/configmap/BUILD b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/configmap/BUILD index a236e7f9..3266cfca 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/configmap/BUILD +++ b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/configmap/BUILD @@ -23,11 +23,12 @@ go_library( "//pkg/client/clientset_generated/clientset:go_default_library", "//pkg/client/record:go_default_library", "//pkg/controller:go_default_library", - "//pkg/util/flowcontrol:go_default_library", "//vendor:github.com/golang/glog", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/util/flowcontrol", ], ) @@ -45,6 +46,7 @@ go_test( "//pkg/client/clientset_generated/clientset:go_default_library", "//pkg/client/clientset_generated/clientset/fake:go_default_library", "//vendor:github.com/stretchr/testify/assert", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/wait", diff --git a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/configmap/configmap_controller.go b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/configmap/configmap_controller.go index 7424a61f..4445a2a7 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/configmap/configmap_controller.go +++ b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/configmap/configmap_controller.go @@ -19,9 +19,11 @@ package configmap import ( "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" pkgruntime "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/util/flowcontrol" federationapi "k8s.io/kubernetes/federation/apis/federation/v1beta1" federationclientset "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset" "k8s.io/kubernetes/federation/pkg/federation-controller/util" @@ -32,7 +34,6 @@ import ( kubeclientset "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/pkg/client/record" "k8s.io/kubernetes/pkg/controller" - "k8s.io/kubernetes/pkg/util/flowcontrol" "github.com/golang/glog" ) @@ -98,11 +99,11 @@ func NewConfigMapController(client federationclientset.Interface) *ConfigMapCont // Start informer on federated API servers on configmaps that should be federated. configmapcontroller.configmapInformerStore, configmapcontroller.configmapInformerController = cache.NewInformer( &cache.ListWatch{ - ListFunc: func(options apiv1.ListOptions) (pkgruntime.Object, error) { - return client.Core().ConfigMaps(apiv1.NamespaceAll).List(options) + ListFunc: func(options metav1.ListOptions) (pkgruntime.Object, error) { + return client.Core().ConfigMaps(metav1.NamespaceAll).List(options) }, - WatchFunc: func(options apiv1.ListOptions) (watch.Interface, error) { - return client.Core().ConfigMaps(apiv1.NamespaceAll).Watch(options) + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + return client.Core().ConfigMaps(metav1.NamespaceAll).Watch(options) }, }, &apiv1.ConfigMap{}, @@ -115,11 +116,11 @@ func NewConfigMapController(client federationclientset.Interface) *ConfigMapCont func(cluster *federationapi.Cluster, targetClient kubeclientset.Interface) (cache.Store, cache.Controller) { return cache.NewInformer( &cache.ListWatch{ - ListFunc: func(options apiv1.ListOptions) (pkgruntime.Object, error) { - return targetClient.Core().ConfigMaps(apiv1.NamespaceAll).List(options) + ListFunc: func(options metav1.ListOptions) (pkgruntime.Object, error) { + return targetClient.Core().ConfigMaps(metav1.NamespaceAll).List(options) }, - WatchFunc: func(options apiv1.ListOptions) (watch.Interface, error) { - return targetClient.Core().ConfigMaps(apiv1.NamespaceAll).Watch(options) + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + return targetClient.Core().ConfigMaps(metav1.NamespaceAll).Watch(options) }, }, &apiv1.ConfigMap{}, @@ -155,7 +156,7 @@ func NewConfigMapController(client federationclientset.Interface) *ConfigMapCont }, func(client kubeclientset.Interface, obj pkgruntime.Object) error { configmap := obj.(*apiv1.ConfigMap) - err := client.Core().ConfigMaps(configmap.Namespace).Delete(configmap.Name, &apiv1.DeleteOptions{}) + err := client.Core().ConfigMaps(configmap.Namespace).Delete(configmap.Name, &metav1.DeleteOptions{}) return err }) return configmapcontroller diff --git a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/configmap/configmap_controller_test.go b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/configmap/configmap_controller_test.go index 57e45543..718a831e 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/configmap/configmap_controller_test.go +++ b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/configmap/configmap_controller_test.go @@ -21,6 +21,7 @@ import ( "testing" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/wait" @@ -78,7 +79,7 @@ func TestConfigMapController(t *testing.T) { configmapController.Run(stop) configmap1 := &apiv1.ConfigMap{ - ObjectMeta: apiv1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test-configmap", Namespace: "ns", SelfLink: "/api/v1/namespaces/ns/configmaps/test-configmap", diff --git a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/daemonset/BUILD b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/daemonset/BUILD index eff72f90..cc903d20 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/daemonset/BUILD +++ b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/daemonset/BUILD @@ -25,12 +25,13 @@ go_library( "//pkg/client/clientset_generated/clientset:go_default_library", "//pkg/client/record:go_default_library", "//pkg/controller:go_default_library", - "//pkg/util/flowcontrol:go_default_library", "//vendor:github.com/golang/glog", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/util/flowcontrol", ], ) diff --git a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/daemonset/daemonset_controller.go b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/daemonset/daemonset_controller.go index 540105a6..55116246 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/daemonset/daemonset_controller.go +++ b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/daemonset/daemonset_controller.go @@ -22,9 +22,11 @@ import ( "time" "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" pkgruntime "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/util/flowcontrol" federationapi "k8s.io/kubernetes/federation/apis/federation/v1beta1" federationclientset "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset" "k8s.io/kubernetes/federation/pkg/federation-controller/util" @@ -37,7 +39,6 @@ import ( kubeclientset "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/pkg/client/record" "k8s.io/kubernetes/pkg/controller" - "k8s.io/kubernetes/pkg/util/flowcontrol" "github.com/golang/glog" ) @@ -105,11 +106,11 @@ func NewDaemonSetController(client federationclientset.Interface) *DaemonSetCont // Start informer in federated API servers on daemonsets that should be federated. daemonsetcontroller.daemonsetInformerStore, daemonsetcontroller.daemonsetInformerController = cache.NewInformer( &cache.ListWatch{ - ListFunc: func(options apiv1.ListOptions) (pkgruntime.Object, error) { - return client.Extensions().DaemonSets(apiv1.NamespaceAll).List(options) + ListFunc: func(options metav1.ListOptions) (pkgruntime.Object, error) { + return client.Extensions().DaemonSets(metav1.NamespaceAll).List(options) }, - WatchFunc: func(options apiv1.ListOptions) (watch.Interface, error) { - return client.Extensions().DaemonSets(apiv1.NamespaceAll).Watch(options) + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + return client.Extensions().DaemonSets(metav1.NamespaceAll).Watch(options) }, }, &extensionsv1.DaemonSet{}, @@ -122,11 +123,11 @@ func NewDaemonSetController(client federationclientset.Interface) *DaemonSetCont func(cluster *federationapi.Cluster, targetClient kubeclientset.Interface) (cache.Store, cache.Controller) { return cache.NewInformer( &cache.ListWatch{ - ListFunc: func(options apiv1.ListOptions) (pkgruntime.Object, error) { - return targetClient.Extensions().DaemonSets(apiv1.NamespaceAll).List(options) + ListFunc: func(options metav1.ListOptions) (pkgruntime.Object, error) { + return targetClient.Extensions().DaemonSets(metav1.NamespaceAll).List(options) }, - WatchFunc: func(options apiv1.ListOptions) (watch.Interface, error) { - return targetClient.Extensions().DaemonSets(apiv1.NamespaceAll).Watch(options) + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + return targetClient.Extensions().DaemonSets(metav1.NamespaceAll).Watch(options) }, }, &extensionsv1.DaemonSet{}, @@ -175,7 +176,7 @@ func NewDaemonSetController(client federationclientset.Interface) *DaemonSetCont func(client kubeclientset.Interface, obj pkgruntime.Object) error { daemonset := obj.(*extensionsv1.DaemonSet) glog.V(4).Infof("Attempting to delete daemonset: %s/%s", daemonset.Namespace, daemonset.Name) - err := client.Extensions().DaemonSets(daemonset.Namespace).Delete(daemonset.Name, &apiv1.DeleteOptions{}) + err := client.Extensions().DaemonSets(daemonset.Namespace).Delete(daemonset.Name, &metav1.DeleteOptions{}) if err != nil { glog.Errorf("Error deleting daemonset %s/%s/: %v", daemonset.Namespace, daemonset.Name, err) } else { diff --git a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/daemonset/daemonset_controller_test.go b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/daemonset/daemonset_controller_test.go index d5cc707c..18036f35 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/daemonset/daemonset_controller_test.go +++ b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/daemonset/daemonset_controller_test.go @@ -82,7 +82,7 @@ func TestDaemonSetController(t *testing.T) { daemonsetController.Run(stop) daemonset1 := extensionsv1.DaemonSet{ - ObjectMeta: apiv1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test-daemonset", Namespace: "ns", SelfLink: "/api/v1/namespaces/ns/daemonsets/test-daemonset", diff --git a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/deployment/BUILD b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/deployment/BUILD index cc7d390c..89b59d93 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/deployment/BUILD +++ b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/deployment/BUILD @@ -28,13 +28,14 @@ go_library( "//pkg/client/clientset_generated/clientset:go_default_library", "//pkg/client/record:go_default_library", "//pkg/controller:go_default_library", - "//pkg/util/flowcontrol:go_default_library", "//pkg/util/workqueue:go_default_library", "//vendor:github.com/golang/glog", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/wait", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/util/flowcontrol", ], ) @@ -53,6 +54,7 @@ go_test( "//pkg/client/clientset_generated/clientset/fake:go_default_library", "//vendor:github.com/stretchr/testify/assert", "//vendor:k8s.io/apimachinery/pkg/api/meta", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/wait", diff --git a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/deployment/deploymentcontroller.go b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/deployment/deploymentcontroller.go index ae9b652e..02ea4630 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/deployment/deploymentcontroller.go +++ b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/deployment/deploymentcontroller.go @@ -26,9 +26,11 @@ import ( "github.com/golang/glog" "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/util/flowcontrol" fed "k8s.io/kubernetes/federation/apis/federation" fedv1 "k8s.io/kubernetes/federation/apis/federation/v1beta1" fedclientset "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset" @@ -44,7 +46,6 @@ import ( kubeclientset "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/pkg/client/record" "k8s.io/kubernetes/pkg/controller" - "k8s.io/kubernetes/pkg/util/flowcontrol" "k8s.io/kubernetes/pkg/util/workqueue" ) @@ -122,11 +123,11 @@ func NewDeploymentController(federationClient fedclientset.Interface) *Deploymen deploymentFedInformerFactory := func(cluster *fedv1.Cluster, clientset kubeclientset.Interface) (cache.Store, cache.Controller) { return cache.NewInformer( &cache.ListWatch{ - ListFunc: func(options apiv1.ListOptions) (runtime.Object, error) { - return clientset.Extensions().Deployments(apiv1.NamespaceAll).List(options) + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + return clientset.Extensions().Deployments(metav1.NamespaceAll).List(options) }, - WatchFunc: func(options apiv1.ListOptions) (watch.Interface, error) { - return clientset.Extensions().Deployments(apiv1.NamespaceAll).Watch(options) + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + return clientset.Extensions().Deployments(metav1.NamespaceAll).Watch(options) }, }, &extensionsv1.Deployment{}, @@ -149,11 +150,11 @@ func NewDeploymentController(federationClient fedclientset.Interface) *Deploymen podFedInformerFactory := func(cluster *fedv1.Cluster, clientset kubeclientset.Interface) (cache.Store, cache.Controller) { return cache.NewInformer( &cache.ListWatch{ - ListFunc: func(options apiv1.ListOptions) (runtime.Object, error) { - return clientset.Core().Pods(apiv1.NamespaceAll).List(options) + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + return clientset.Core().Pods(metav1.NamespaceAll).List(options) }, - WatchFunc: func(options apiv1.ListOptions) (watch.Interface, error) { - return clientset.Core().Pods(apiv1.NamespaceAll).Watch(options) + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + return clientset.Core().Pods(metav1.NamespaceAll).Watch(options) }, }, &apiv1.Pod{}, @@ -169,11 +170,11 @@ func NewDeploymentController(federationClient fedclientset.Interface) *Deploymen fdc.deploymentStore, fdc.deploymentController = cache.NewInformer( &cache.ListWatch{ - ListFunc: func(options apiv1.ListOptions) (runtime.Object, error) { - return fdc.fedClient.Extensions().Deployments(apiv1.NamespaceAll).List(options) + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + return fdc.fedClient.Extensions().Deployments(metav1.NamespaceAll).List(options) }, - WatchFunc: func(options apiv1.ListOptions) (watch.Interface, error) { - return fdc.fedClient.Extensions().Deployments(apiv1.NamespaceAll).Watch(options) + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + return fdc.fedClient.Extensions().Deployments(metav1.NamespaceAll).Watch(options) }, }, &extensionsv1.Deployment{}, @@ -196,7 +197,7 @@ func NewDeploymentController(federationClient fedclientset.Interface) *Deploymen }, func(client kubeclientset.Interface, obj runtime.Object) error { rs := obj.(*extensionsv1.Deployment) - err := client.Extensions().Deployments(rs.Namespace).Delete(rs.Name, &apiv1.DeleteOptions{}) + err := client.Extensions().Deployments(rs.Namespace).Delete(rs.Name, &metav1.DeleteOptions{}) return err }) diff --git a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/deployment/deploymentcontroller_test.go b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/deployment/deploymentcontroller_test.go index ed544e5b..2fd6d92d 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/deployment/deploymentcontroller_test.go +++ b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/deployment/deploymentcontroller_test.go @@ -23,6 +23,7 @@ import ( "time" "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/wait" @@ -174,9 +175,9 @@ func GetDeploymentFromChan(c chan runtime.Object) *extensionsv1.Deployment { func newDeploymentWithReplicas(name string, replicas int32) *extensionsv1.Deployment { return &extensionsv1.Deployment{ - ObjectMeta: apiv1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, - Namespace: apiv1.NamespaceDefault, + Namespace: metav1.NamespaceDefault, SelfLink: "/api/v1/namespaces/default/deployments/name", }, Spec: extensionsv1.DeploymentSpec{ diff --git a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/ingress/BUILD b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/ingress/BUILD index c2394a0b..62077c9d 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/ingress/BUILD +++ b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/ingress/BUILD @@ -25,13 +25,14 @@ go_library( "//pkg/client/clientset_generated/clientset:go_default_library", "//pkg/client/record:go_default_library", "//pkg/controller:go_default_library", - "//pkg/util/flowcontrol:go_default_library", "//vendor:github.com/golang/glog", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/util/flowcontrol", ], ) @@ -54,6 +55,7 @@ go_test( "//vendor:github.com/golang/glog", "//vendor:github.com/stretchr/testify/assert", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/wait", diff --git a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/ingress/ingress_controller.go b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/ingress/ingress_controller.go index b6346190..21c7c276 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/ingress/ingress_controller.go +++ b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/ingress/ingress_controller.go @@ -22,10 +22,12 @@ import ( "time" "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" pkgruntime "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/util/flowcontrol" federationapi "k8s.io/kubernetes/federation/apis/federation/v1beta1" federationclientset "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset" "k8s.io/kubernetes/federation/pkg/federation-controller/util" @@ -38,7 +40,6 @@ import ( kubeclientset "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/pkg/client/record" "k8s.io/kubernetes/pkg/controller" - "k8s.io/kubernetes/pkg/util/flowcontrol" "github.com/golang/glog" ) @@ -139,11 +140,11 @@ func NewIngressController(client federationclientset.Interface) *IngressControll // Start informer in federated API servers on ingresses that should be federated. ic.ingressInformerStore, ic.ingressInformerController = cache.NewInformer( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (pkgruntime.Object, error) { - return client.Extensions().Ingresses(api.NamespaceAll).List(options) + ListFunc: func(options metav1.ListOptions) (pkgruntime.Object, error) { + return client.Extensions().Ingresses(metav1.NamespaceAll).List(options) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - return client.Extensions().Ingresses(api.NamespaceAll).Watch(options) + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + return client.Extensions().Ingresses(metav1.NamespaceAll).Watch(options) }, }, &extensionsv1beta1.Ingress{}, @@ -160,11 +161,11 @@ func NewIngressController(client federationclientset.Interface) *IngressControll func(cluster *federationapi.Cluster, targetClient kubeclientset.Interface) (cache.Store, cache.Controller) { return cache.NewInformer( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (pkgruntime.Object, error) { - return targetClient.Extensions().Ingresses(api.NamespaceAll).List(options) + ListFunc: func(options metav1.ListOptions) (pkgruntime.Object, error) { + return targetClient.Extensions().Ingresses(metav1.NamespaceAll).List(options) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - return targetClient.Extensions().Ingresses(api.NamespaceAll).Watch(options) + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + return targetClient.Extensions().Ingresses(metav1.NamespaceAll).Watch(options) }, }, &extensionsv1beta1.Ingress{}, @@ -193,13 +194,13 @@ func NewIngressController(client federationclientset.Interface) *IngressControll glog.V(4).Infof("Returning new informer for cluster %q", cluster.Name) return cache.NewInformer( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (pkgruntime.Object, error) { + ListFunc: func(options metav1.ListOptions) (pkgruntime.Object, error) { if targetClient == nil { glog.Errorf("Internal error: targetClient is nil") } return targetClient.Core().ConfigMaps(uidConfigMapNamespace).List(options) // we only want to list one by name - unfortunately Kubernetes don't have a selector for that. }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if targetClient == nil { glog.Errorf("Internal error: targetClient is nil") } @@ -251,7 +252,7 @@ func NewIngressController(client federationclientset.Interface) *IngressControll func(client kubeclientset.Interface, obj pkgruntime.Object) error { ingress := obj.(*extensionsv1beta1.Ingress) glog.V(4).Infof("Attempting to delete Ingress: %v", ingress) - err := client.Extensions().Ingresses(ingress.Namespace).Delete(ingress.Name, &v1.DeleteOptions{}) + err := client.Extensions().Ingresses(ingress.Namespace).Delete(ingress.Name, &metav1.DeleteOptions{}) return err }) @@ -280,7 +281,7 @@ func NewIngressController(client federationclientset.Interface) *IngressControll configMap := obj.(*v1.ConfigMap) configMapName := types.NamespacedName{Name: configMap.Name, Namespace: configMap.Namespace} glog.Errorf("Internal error: Incorrectly attempting to delete ConfigMap: %q", configMapName) - err := client.Core().ConfigMaps(configMap.Namespace).Delete(configMap.Name, &v1.DeleteOptions{}) + err := client.Core().ConfigMaps(configMap.Namespace).Delete(configMap.Name, &metav1.DeleteOptions{}) return err }) @@ -764,9 +765,9 @@ func (ic *IngressController) reconcileIngress(ingress types.NamespacedName) { if err != nil { glog.Errorf("Error deep copying Spec: %v", err) } - objMetaCopy, ok := objMeta.(*v1.ObjectMeta) + objMetaCopy, ok := objMeta.(*metav1.ObjectMeta) if !ok { - glog.Errorf("Internal error: Failed to cast to *v1.ObjectMeta: %v", objMeta) + glog.Errorf("Internal error: Failed to cast to *metav1.ObjectMeta: %v", objMeta) } desiredIngress.ObjectMeta = *objMetaCopy objSpecCopy, ok := objSpec.(*extensionsv1beta1.IngressSpec) @@ -857,9 +858,9 @@ func (ic *IngressController) reconcileIngress(ingress types.NamespacedName) { glog.Errorf("Error deep copying ObjectMeta: %v", err) ic.deliverIngress(ingress, ic.ingressReviewDelay, true) } - objMetaCopy, ok := objMeta.(*v1.ObjectMeta) + objMetaCopy, ok := objMeta.(*metav1.ObjectMeta) if !ok { - glog.Errorf("Internal error: Failed to cast to v1.ObjectMeta: %v", objMeta) + glog.Errorf("Internal error: Failed to cast to metav1.ObjectMeta: %v", objMeta) ic.deliverIngress(ingress, ic.ingressReviewDelay, true) } desiredIngress.ObjectMeta = *objMetaCopy diff --git a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/ingress/ingress_controller_test.go b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/ingress/ingress_controller_test.go index 1221c5e4..2b52ee4c 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/ingress/ingress_controller_test.go +++ b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/ingress/ingress_controller_test.go @@ -23,6 +23,7 @@ import ( "time" "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/wait" @@ -108,7 +109,7 @@ func TestIngressController(t *testing.T) { // Add another test without that annotation when // https://github.com/kubernetes/kubernetes/issues/36540 is fixed. fedIngress := extensionsv1beta1.Ingress{ - ObjectMeta: apiv1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test-ingress", Namespace: "mynamespace", SelfLink: "/api/v1/namespaces/mynamespace/ingress/test-ingress", @@ -282,7 +283,7 @@ func GetClusterFromChan(c chan runtime.Object) *federationapi.Cluster { func NewConfigMap(uid string) *apiv1.ConfigMap { return &apiv1.ConfigMap{ - ObjectMeta: apiv1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: uidConfigMapName, Namespace: uidConfigMapNamespace, SelfLink: "/api/v1/namespaces/" + uidConfigMapNamespace + "/configmap/" + uidConfigMapName, diff --git a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/namespace/BUILD b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/namespace/BUILD index 9ee3f79c..b75e6bce 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/namespace/BUILD +++ b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/namespace/BUILD @@ -24,11 +24,12 @@ go_library( "//pkg/client/clientset_generated/clientset:go_default_library", "//pkg/client/record:go_default_library", "//pkg/controller:go_default_library", - "//pkg/util/flowcontrol:go_default_library", "//vendor:github.com/golang/glog", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/util/flowcontrol", ], ) diff --git a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/namespace/namespace_controller.go b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/namespace/namespace_controller.go index 58f543cb..8bb06cd0 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/namespace/namespace_controller.go +++ b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/namespace/namespace_controller.go @@ -21,8 +21,10 @@ import ( "time" "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/util/flowcontrol" federationapi "k8s.io/kubernetes/federation/apis/federation/v1beta1" federationclientset "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset" "k8s.io/kubernetes/federation/pkg/federation-controller/util" @@ -34,7 +36,6 @@ import ( kubeclientset "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/pkg/client/record" "k8s.io/kubernetes/pkg/controller" - "k8s.io/kubernetes/pkg/util/flowcontrol" "github.com/golang/glog" ) @@ -102,10 +103,10 @@ func NewNamespaceController(client federationclientset.Interface) *NamespaceCont // Start informer in federated API servers on namespaces that should be federated. nc.namespaceInformerStore, nc.namespaceInformerController = cache.NewInformer( &cache.ListWatch{ - ListFunc: func(options apiv1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { return client.Core().Namespaces().List(options) }, - WatchFunc: func(options apiv1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { return client.Core().Namespaces().Watch(options) }, }, @@ -119,10 +120,10 @@ func NewNamespaceController(client federationclientset.Interface) *NamespaceCont func(cluster *federationapi.Cluster, targetClient kubeclientset.Interface) (cache.Store, cache.Controller) { return cache.NewInformer( &cache.ListWatch{ - ListFunc: func(options apiv1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { return targetClient.Core().Namespaces().List(options) }, - WatchFunc: func(options apiv1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { return targetClient.Core().Namespaces().Watch(options) }, }, @@ -156,7 +157,7 @@ func NewNamespaceController(client federationclientset.Interface) *NamespaceCont }, func(client kubeclientset.Interface, obj runtime.Object) error { namespace := obj.(*apiv1.Namespace) - err := client.Core().Namespaces().Delete(namespace.Name, &apiv1.DeleteOptions{}) + err := client.Core().Namespaces().Delete(namespace.Name, &metav1.DeleteOptions{}) // IsNotFound error is fine since that means the object is deleted already. if errors.IsNotFound(err) { return nil @@ -491,31 +492,31 @@ func (nc *NamespaceController) removeKubernetesFinalizer(namespace *apiv1.Namesp // Right now there are just 7 types of objects: Deployments, DaemonSets, ReplicaSet, Secret, Ingress, Events and Service. // Temporarily these items are simply deleted one by one to squeeze this code into 1.4. // TODO: Make it generic (like in the regular namespace controller) and parallel. - err := nc.federatedApiClient.Core().Services(namespace.Name).DeleteCollection(&apiv1.DeleteOptions{}, apiv1.ListOptions{}) + err := nc.federatedApiClient.Core().Services(namespace.Name).DeleteCollection(&metav1.DeleteOptions{}, metav1.ListOptions{}) if err != nil { return nil, fmt.Errorf("failed to delete service list: %v", err) } - err = nc.federatedApiClient.Extensions().ReplicaSets(namespace.Name).DeleteCollection(&apiv1.DeleteOptions{}, apiv1.ListOptions{}) + err = nc.federatedApiClient.Extensions().ReplicaSets(namespace.Name).DeleteCollection(&metav1.DeleteOptions{}, metav1.ListOptions{}) if err != nil { return nil, fmt.Errorf("failed to delete replicaset list from namespace: %v", err) } - err = nc.federatedApiClient.Core().Secrets(namespace.Name).DeleteCollection(&apiv1.DeleteOptions{}, apiv1.ListOptions{}) + err = nc.federatedApiClient.Core().Secrets(namespace.Name).DeleteCollection(&metav1.DeleteOptions{}, metav1.ListOptions{}) if err != nil { return nil, fmt.Errorf("failed to delete secret list from namespace: %v", err) } - err = nc.federatedApiClient.Extensions().Ingresses(namespace.Name).DeleteCollection(&apiv1.DeleteOptions{}, apiv1.ListOptions{}) + err = nc.federatedApiClient.Extensions().Ingresses(namespace.Name).DeleteCollection(&metav1.DeleteOptions{}, metav1.ListOptions{}) if err != nil { return nil, fmt.Errorf("failed to delete ingresses list from namespace: %v", err) } - err = nc.federatedApiClient.Extensions().DaemonSets(namespace.Name).DeleteCollection(&apiv1.DeleteOptions{}, apiv1.ListOptions{}) + err = nc.federatedApiClient.Extensions().DaemonSets(namespace.Name).DeleteCollection(&metav1.DeleteOptions{}, metav1.ListOptions{}) if err != nil { return nil, fmt.Errorf("failed to delete daemonsets list from namespace: %v", err) } - err = nc.federatedApiClient.Extensions().Deployments(namespace.Name).DeleteCollection(&apiv1.DeleteOptions{}, apiv1.ListOptions{}) + err = nc.federatedApiClient.Extensions().Deployments(namespace.Name).DeleteCollection(&metav1.DeleteOptions{}, metav1.ListOptions{}) if err != nil { return nil, fmt.Errorf("failed to delete deployments list from namespace: %v", err) } - err = nc.federatedApiClient.Core().Events(namespace.Name).DeleteCollection(&apiv1.DeleteOptions{}, apiv1.ListOptions{}) + err = nc.federatedApiClient.Core().Events(namespace.Name).DeleteCollection(&metav1.DeleteOptions{}, metav1.ListOptions{}) if err != nil { return nil, fmt.Errorf("failed to delete events list from namespace: %v", err) } diff --git a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/namespace/namespace_controller_test.go b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/namespace/namespace_controller_test.go index e9599314..08387bf6 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/namespace/namespace_controller_test.go +++ b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/namespace/namespace_controller_test.go @@ -42,7 +42,7 @@ func TestNamespaceController(t *testing.T) { cluster1 := NewCluster("cluster1", apiv1.ConditionTrue) cluster2 := NewCluster("cluster2", apiv1.ConditionTrue) ns1 := apiv1.Namespace{ - ObjectMeta: apiv1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test-namespace", SelfLink: "/api/v1/namespaces/test-namespace", }, @@ -71,19 +71,19 @@ func TestNamespaceController(t *testing.T) { RegisterFakeList("replicasets", &fakeClient.Fake, &extensionsv1.ReplicaSetList{Items: []extensionsv1.ReplicaSet{ { - ObjectMeta: apiv1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test-rs", Namespace: ns1.Namespace, }}}}) RegisterFakeList("secrets", &fakeClient.Fake, &apiv1.SecretList{Items: []apiv1.Secret{ { - ObjectMeta: apiv1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test-secret", Namespace: ns1.Namespace, }}}}) RegisterFakeList("services", &fakeClient.Fake, &apiv1.ServiceList{Items: []apiv1.Service{ { - ObjectMeta: apiv1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test-service", Namespace: ns1.Namespace, }}}}) diff --git a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/replicaset/BUILD b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/replicaset/BUILD index d369c378..0ffa93b6 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/replicaset/BUILD +++ b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/replicaset/BUILD @@ -26,15 +26,17 @@ go_library( "//pkg/apis/extensions/v1beta1:go_default_library", "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", + "//pkg/client/legacylisters:go_default_library", "//pkg/client/record:go_default_library", "//pkg/controller:go_default_library", - "//pkg/util/flowcontrol:go_default_library", "//pkg/util/workqueue:go_default_library", "//vendor:github.com/golang/glog", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/wait", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/util/flowcontrol", ], ) diff --git a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/replicaset/replicasetcontroller.go b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/replicaset/replicasetcontroller.go index f7811f70..98a39514 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/replicaset/replicasetcontroller.go +++ b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/replicaset/replicasetcontroller.go @@ -26,9 +26,11 @@ import ( "github.com/golang/glog" "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/util/flowcontrol" fed "k8s.io/kubernetes/federation/apis/federation" fedv1 "k8s.io/kubernetes/federation/apis/federation/v1beta1" fedclientset "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset" @@ -42,9 +44,9 @@ import ( extensionsv1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" "k8s.io/kubernetes/pkg/client/cache" kubeclientset "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" + "k8s.io/kubernetes/pkg/client/legacylisters" "k8s.io/kubernetes/pkg/client/record" "k8s.io/kubernetes/pkg/controller" - "k8s.io/kubernetes/pkg/util/flowcontrol" "k8s.io/kubernetes/pkg/util/workqueue" ) @@ -81,7 +83,7 @@ type ReplicaSetController struct { fedClient fedclientset.Interface replicaSetController cache.Controller - replicaSetStore cache.StoreToReplicaSetLister + replicaSetStore listers.StoreToReplicaSetLister fedReplicaSetInformer fedutil.FederatedInformer fedPodInformer fedutil.FederatedInformer @@ -124,11 +126,11 @@ func NewReplicaSetController(federationClient fedclientset.Interface) *ReplicaSe replicaSetFedInformerFactory := func(cluster *fedv1.Cluster, clientset kubeclientset.Interface) (cache.Store, cache.Controller) { return cache.NewInformer( &cache.ListWatch{ - ListFunc: func(options apiv1.ListOptions) (runtime.Object, error) { - return clientset.Extensions().ReplicaSets(apiv1.NamespaceAll).List(options) + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + return clientset.Extensions().ReplicaSets(metav1.NamespaceAll).List(options) }, - WatchFunc: func(options apiv1.ListOptions) (watch.Interface, error) { - return clientset.Extensions().ReplicaSets(apiv1.NamespaceAll).Watch(options) + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + return clientset.Extensions().ReplicaSets(metav1.NamespaceAll).Watch(options) }, }, &extensionsv1.ReplicaSet{}, @@ -151,11 +153,11 @@ func NewReplicaSetController(federationClient fedclientset.Interface) *ReplicaSe podFedInformerFactory := func(cluster *fedv1.Cluster, clientset kubeclientset.Interface) (cache.Store, cache.Controller) { return cache.NewInformer( &cache.ListWatch{ - ListFunc: func(options apiv1.ListOptions) (runtime.Object, error) { - return clientset.Core().Pods(apiv1.NamespaceAll).List(options) + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + return clientset.Core().Pods(metav1.NamespaceAll).List(options) }, - WatchFunc: func(options apiv1.ListOptions) (watch.Interface, error) { - return clientset.Core().Pods(apiv1.NamespaceAll).Watch(options) + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + return clientset.Core().Pods(metav1.NamespaceAll).Watch(options) }, }, &apiv1.Pod{}, @@ -171,11 +173,11 @@ func NewReplicaSetController(federationClient fedclientset.Interface) *ReplicaSe frsc.replicaSetStore.Indexer, frsc.replicaSetController = cache.NewIndexerInformer( &cache.ListWatch{ - ListFunc: func(options apiv1.ListOptions) (runtime.Object, error) { - return frsc.fedClient.Extensions().ReplicaSets(apiv1.NamespaceAll).List(options) + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + return frsc.fedClient.Extensions().ReplicaSets(metav1.NamespaceAll).List(options) }, - WatchFunc: func(options apiv1.ListOptions) (watch.Interface, error) { - return frsc.fedClient.Extensions().ReplicaSets(apiv1.NamespaceAll).Watch(options) + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + return frsc.fedClient.Extensions().ReplicaSets(metav1.NamespaceAll).Watch(options) }, }, &extensionsv1.ReplicaSet{}, @@ -199,7 +201,7 @@ func NewReplicaSetController(federationClient fedclientset.Interface) *ReplicaSe }, func(client kubeclientset.Interface, obj runtime.Object) error { rs := obj.(*extensionsv1.ReplicaSet) - err := client.Extensions().ReplicaSets(rs.Namespace).Delete(rs.Name, &apiv1.DeleteOptions{}) + err := client.Extensions().ReplicaSets(rs.Namespace).Delete(rs.Name, &metav1.DeleteOptions{}) return err }) diff --git a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/replicaset/replicasetcontroller_test.go b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/replicaset/replicasetcontroller_test.go index 007aa3cd..3d94ae2a 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/replicaset/replicasetcontroller_test.go +++ b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/replicaset/replicasetcontroller_test.go @@ -119,30 +119,30 @@ func TestReplicaSetController(t *testing.T) { go replicaSetController.Run(1, stopChan) rs := newReplicaSetWithReplicas("rs", 9) - rs, _ = fedclientset.Extensions().ReplicaSets(apiv1.NamespaceDefault).Create(rs) + rs, _ = fedclientset.Extensions().ReplicaSets(metav1.NamespaceDefault).Create(rs) fedrswatch.Add(rs) time.Sleep(1 * time.Second) - rs1, _ := kube1clientset.Extensions().ReplicaSets(apiv1.NamespaceDefault).Get(rs.Name, metav1.GetOptions{}) + rs1, _ := kube1clientset.Extensions().ReplicaSets(metav1.NamespaceDefault).Get(rs.Name, metav1.GetOptions{}) kube1rswatch.Add(rs1) rs1.Status.Replicas = *rs1.Spec.Replicas rs1.Status.FullyLabeledReplicas = *rs1.Spec.Replicas rs1.Status.ReadyReplicas = *rs1.Spec.Replicas rs1.Status.AvailableReplicas = *rs1.Spec.Replicas - rs1, _ = kube1clientset.Extensions().ReplicaSets(apiv1.NamespaceDefault).UpdateStatus(rs1) + rs1, _ = kube1clientset.Extensions().ReplicaSets(metav1.NamespaceDefault).UpdateStatus(rs1) kube1rswatch.Modify(rs1) - rs2, _ := kube2clientset.Extensions().ReplicaSets(apiv1.NamespaceDefault).Get(rs.Name, metav1.GetOptions{}) + rs2, _ := kube2clientset.Extensions().ReplicaSets(metav1.NamespaceDefault).Get(rs.Name, metav1.GetOptions{}) kube2rswatch.Add(rs2) rs2.Status.Replicas = *rs2.Spec.Replicas rs2.Status.FullyLabeledReplicas = *rs2.Spec.Replicas rs2.Status.ReadyReplicas = *rs2.Spec.Replicas rs2.Status.AvailableReplicas = *rs2.Spec.Replicas - rs2, _ = kube2clientset.Extensions().ReplicaSets(apiv1.NamespaceDefault).UpdateStatus(rs2) + rs2, _ = kube2clientset.Extensions().ReplicaSets(metav1.NamespaceDefault).UpdateStatus(rs2) kube2rswatch.Modify(rs2) time.Sleep(1 * time.Second) - rs, _ = fedclientset.Extensions().ReplicaSets(apiv1.NamespaceDefault).Get(rs.Name, metav1.GetOptions{}) + rs, _ = fedclientset.Extensions().ReplicaSets(metav1.NamespaceDefault).Get(rs.Name, metav1.GetOptions{}) assert.Equal(t, *rs.Spec.Replicas, *rs1.Spec.Replicas+*rs2.Spec.Replicas) assert.Equal(t, rs.Status.Replicas, rs1.Status.Replicas+rs2.Status.Replicas) assert.Equal(t, rs.Status.FullyLabeledReplicas, rs1.Status.FullyLabeledReplicas+rs2.Status.FullyLabeledReplicas) @@ -151,28 +151,28 @@ func TestReplicaSetController(t *testing.T) { var replicas int32 = 20 rs.Spec.Replicas = &replicas - rs, _ = fedclientset.Extensions().ReplicaSets(apiv1.NamespaceDefault).Update(rs) + rs, _ = fedclientset.Extensions().ReplicaSets(metav1.NamespaceDefault).Update(rs) fedrswatch.Modify(rs) time.Sleep(1 * time.Second) - rs1, _ = kube1clientset.Extensions().ReplicaSets(apiv1.NamespaceDefault).Get(rs.Name, metav1.GetOptions{}) + rs1, _ = kube1clientset.Extensions().ReplicaSets(metav1.NamespaceDefault).Get(rs.Name, metav1.GetOptions{}) rs1.Status.Replicas = *rs1.Spec.Replicas rs1.Status.FullyLabeledReplicas = *rs1.Spec.Replicas rs1.Status.ReadyReplicas = *rs1.Spec.Replicas rs1.Status.AvailableReplicas = *rs1.Spec.Replicas - rs1, _ = kube1clientset.Extensions().ReplicaSets(apiv1.NamespaceDefault).UpdateStatus(rs1) + rs1, _ = kube1clientset.Extensions().ReplicaSets(metav1.NamespaceDefault).UpdateStatus(rs1) kube1rswatch.Modify(rs1) - rs2, _ = kube2clientset.Extensions().ReplicaSets(apiv1.NamespaceDefault).Get(rs.Name, metav1.GetOptions{}) + rs2, _ = kube2clientset.Extensions().ReplicaSets(metav1.NamespaceDefault).Get(rs.Name, metav1.GetOptions{}) rs2.Status.Replicas = *rs2.Spec.Replicas rs2.Status.FullyLabeledReplicas = *rs2.Spec.Replicas rs2.Status.ReadyReplicas = *rs2.Spec.Replicas rs2.Status.AvailableReplicas = *rs2.Spec.Replicas - rs2, _ = kube2clientset.Extensions().ReplicaSets(apiv1.NamespaceDefault).UpdateStatus(rs2) + rs2, _ = kube2clientset.Extensions().ReplicaSets(metav1.NamespaceDefault).UpdateStatus(rs2) kube2rswatch.Modify(rs2) time.Sleep(1 * time.Second) - rs, _ = fedclientset.Extensions().ReplicaSets(apiv1.NamespaceDefault).Get(rs.Name, metav1.GetOptions{}) + rs, _ = fedclientset.Extensions().ReplicaSets(metav1.NamespaceDefault).Get(rs.Name, metav1.GetOptions{}) assert.Equal(t, *rs.Spec.Replicas, *rs1.Spec.Replicas+*rs2.Spec.Replicas) assert.Equal(t, rs.Status.Replicas, rs1.Status.Replicas+rs2.Status.Replicas) assert.Equal(t, rs.Status.FullyLabeledReplicas, rs1.Status.FullyLabeledReplicas+rs2.Status.FullyLabeledReplicas) @@ -182,9 +182,9 @@ func TestReplicaSetController(t *testing.T) { func newReplicaSetWithReplicas(name string, replicas int32) *extensionsv1.ReplicaSet { return &extensionsv1.ReplicaSet{ - ObjectMeta: apiv1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, - Namespace: apiv1.NamespaceDefault, + Namespace: metav1.NamespaceDefault, SelfLink: "/api/v1/namespaces/default/replicasets/name", }, Spec: extensionsv1.ReplicaSetSpec{ diff --git a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/secret/BUILD b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/secret/BUILD index e73f9409..ff2eeab2 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/secret/BUILD +++ b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/secret/BUILD @@ -24,12 +24,13 @@ go_library( "//pkg/client/clientset_generated/clientset:go_default_library", "//pkg/client/record:go_default_library", "//pkg/controller:go_default_library", - "//pkg/util/flowcontrol:go_default_library", "//vendor:github.com/golang/glog", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/util/flowcontrol", ], ) @@ -49,6 +50,7 @@ go_test( "//pkg/client/clientset_generated/clientset/fake:go_default_library", "//vendor:github.com/golang/glog", "//vendor:github.com/stretchr/testify/assert", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/wait", diff --git a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/secret/secret_controller.go b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/secret/secret_controller.go index e507c698..14879c27 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/secret/secret_controller.go +++ b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/secret/secret_controller.go @@ -21,9 +21,11 @@ import ( "time" "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" pkgruntime "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/util/flowcontrol" federationapi "k8s.io/kubernetes/federation/apis/federation/v1beta1" federationclientset "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset" "k8s.io/kubernetes/federation/pkg/federation-controller/util" @@ -35,7 +37,6 @@ import ( kubeclientset "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/pkg/client/record" "k8s.io/kubernetes/pkg/controller" - "k8s.io/kubernetes/pkg/util/flowcontrol" "github.com/golang/glog" ) @@ -103,11 +104,11 @@ func NewSecretController(client federationclientset.Interface) *SecretController // Start informer in federated API servers on secrets that should be federated. secretcontroller.secretInformerStore, secretcontroller.secretInformerController = cache.NewInformer( &cache.ListWatch{ - ListFunc: func(options apiv1.ListOptions) (pkgruntime.Object, error) { - return client.Core().Secrets(apiv1.NamespaceAll).List(options) + ListFunc: func(options metav1.ListOptions) (pkgruntime.Object, error) { + return client.Core().Secrets(metav1.NamespaceAll).List(options) }, - WatchFunc: func(options apiv1.ListOptions) (watch.Interface, error) { - return client.Core().Secrets(apiv1.NamespaceAll).Watch(options) + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + return client.Core().Secrets(metav1.NamespaceAll).Watch(options) }, }, &apiv1.Secret{}, @@ -120,11 +121,11 @@ func NewSecretController(client federationclientset.Interface) *SecretController func(cluster *federationapi.Cluster, targetClient kubeclientset.Interface) (cache.Store, cache.Controller) { return cache.NewInformer( &cache.ListWatch{ - ListFunc: func(options apiv1.ListOptions) (pkgruntime.Object, error) { - return targetClient.Core().Secrets(apiv1.NamespaceAll).List(options) + ListFunc: func(options metav1.ListOptions) (pkgruntime.Object, error) { + return targetClient.Core().Secrets(metav1.NamespaceAll).List(options) }, - WatchFunc: func(options apiv1.ListOptions) (watch.Interface, error) { - return targetClient.Core().Secrets(apiv1.NamespaceAll).Watch(options) + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + return targetClient.Core().Secrets(metav1.NamespaceAll).Watch(options) }, }, &apiv1.Secret{}, @@ -160,7 +161,7 @@ func NewSecretController(client federationclientset.Interface) *SecretController }, func(client kubeclientset.Interface, obj pkgruntime.Object) error { secret := obj.(*apiv1.Secret) - err := client.Core().Secrets(secret.Namespace).Delete(secret.Name, &apiv1.DeleteOptions{}) + err := client.Core().Secrets(secret.Namespace).Delete(secret.Name, &metav1.DeleteOptions{}) return err }) diff --git a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/secret/secret_controller_test.go b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/secret/secret_controller_test.go index 183678bd..c62aad64 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/secret/secret_controller_test.go +++ b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/secret/secret_controller_test.go @@ -22,6 +22,7 @@ import ( "testing" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/wait" @@ -82,7 +83,7 @@ func TestSecretController(t *testing.T) { secretController.Run(stop) secret1 := apiv1.Secret{ - ObjectMeta: apiv1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test-secret", Namespace: "ns", SelfLink: "/api/v1/namespaces/ns/secrets/test-secret", diff --git a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/service/BUILD b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/service/BUILD index cc8234fa..5d95a557 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/service/BUILD +++ b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/service/BUILD @@ -31,8 +31,8 @@ go_library( "//pkg/api/v1:go_default_library", "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", + "//pkg/client/legacylisters:go_default_library", "//pkg/client/record:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/controller:go_default_library", "//pkg/util/workqueue:go_default_library", "//vendor:github.com/golang/glog", @@ -44,6 +44,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/util/sets", "//vendor:k8s.io/apimachinery/pkg/util/wait", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) @@ -61,6 +62,7 @@ go_test( "//federation/apis/federation/v1beta1:go_default_library", "//federation/pkg/dnsprovider/providers/google/clouddns:go_default_library", "//pkg/api/v1:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/util/sets", ], ) diff --git a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/service/cluster_helper.go b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/service/cluster_helper.go index 24267853..3e4f4375 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/service/cluster_helper.go +++ b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/service/cluster_helper.go @@ -19,14 +19,16 @@ package service import ( "sync" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" pkgruntime "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apimachinery/pkg/watch" + restclient "k8s.io/client-go/rest" v1beta1 "k8s.io/kubernetes/federation/apis/federation/v1beta1" v1 "k8s.io/kubernetes/pkg/api/v1" cache "k8s.io/kubernetes/pkg/client/cache" kubeclientset "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/client/restclient" + "k8s.io/kubernetes/pkg/client/legacylisters" "k8s.io/kubernetes/pkg/util/workqueue" "reflect" @@ -39,11 +41,11 @@ type clusterCache struct { clientset *kubeclientset.Clientset cluster *v1beta1.Cluster // A store of services, populated by the serviceController - serviceStore cache.StoreToServiceLister + serviceStore listers.StoreToServiceLister // Watches changes to all services serviceController cache.Controller // A store of endpoint, populated by the serviceController - endpointStore cache.StoreToEndpointsLister + endpointStore listers.StoreToEndpointsLister // Watches changes to all endpoints endpointController cache.Controller // services that need to be synced @@ -91,11 +93,11 @@ func (cc *clusterClientCache) startClusterLW(cluster *v1beta1.Cluster, clusterNa } cachedClusterClient.endpointStore.Store, cachedClusterClient.endpointController = cache.NewInformer( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (pkgruntime.Object, error) { - return clientset.Core().Endpoints(v1.NamespaceAll).List(options) + ListFunc: func(options metav1.ListOptions) (pkgruntime.Object, error) { + return clientset.Core().Endpoints(metav1.NamespaceAll).List(options) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - return clientset.Core().Endpoints(v1.NamespaceAll).Watch(options) + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + return clientset.Core().Endpoints(metav1.NamespaceAll).Watch(options) }, }, &v1.Endpoints{}, @@ -115,11 +117,11 @@ func (cc *clusterClientCache) startClusterLW(cluster *v1beta1.Cluster, clusterNa cachedClusterClient.serviceStore.Indexer, cachedClusterClient.serviceController = cache.NewIndexerInformer( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (pkgruntime.Object, error) { - return clientset.Core().Services(v1.NamespaceAll).List(options) + ListFunc: func(options metav1.ListOptions) (pkgruntime.Object, error) { + return clientset.Core().Services(metav1.NamespaceAll).List(options) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - return clientset.Core().Services(v1.NamespaceAll).Watch(options) + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + return clientset.Core().Services(metav1.NamespaceAll).Watch(options) }, }, &v1.Service{}, diff --git a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/service/dns_test.go b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/service/dns_test.go index e9e84354..6836449e 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/service/dns_test.go +++ b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/service/dns_test.go @@ -24,6 +24,7 @@ import ( "reflect" "sort" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/kubernetes/federation/apis/federation/v1beta1" "k8s.io/kubernetes/federation/pkg/dnsprovider/providers/google/clouddns" // Only for unit testing purposes. @@ -40,7 +41,7 @@ func TestServiceController_ensureDnsRecords(t *testing.T) { { name: "withip", service: v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "servicename", Namespace: "servicenamespace", }, @@ -58,7 +59,7 @@ func TestServiceController_ensureDnsRecords(t *testing.T) { { name: "withname", service: v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "servicename", Namespace: "servicenamespace", }, @@ -74,7 +75,7 @@ func TestServiceController_ensureDnsRecords(t *testing.T) { { name: "noendpoints", service: v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "servicename", Namespace: "servicenamespace", }, diff --git a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/service/service_helper_test.go b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/service/service_helper_test.go index 78b7f871..03c154a2 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/service/service_helper_test.go +++ b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/service/service_helper_test.go @@ -20,6 +20,7 @@ import ( "reflect" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" ) @@ -74,7 +75,7 @@ func TestProcessServiceUpdate(t *testing.T) { "diff-cluster", &cachedService{ lastState: &v1.Service{ - ObjectMeta: v1.ObjectMeta{Name: "bar1"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar1"}, }, serviceStatusMap: map[string]v1.LoadBalancerStatus{ "foo2": {Ingress: []v1.LoadBalancerIngress{{IP: "ip1", Hostname: ""}}}, diff --git a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/service/servicecontroller.go b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/service/servicecontroller.go index 961e7c27..6cc67095 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/service/servicecontroller.go +++ b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/service/servicecontroller.go @@ -43,6 +43,7 @@ import ( v1 "k8s.io/kubernetes/pkg/api/v1" cache "k8s.io/kubernetes/pkg/client/cache" kubeclientset "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" + "k8s.io/kubernetes/pkg/client/legacylisters" "k8s.io/kubernetes/pkg/client/record" "k8s.io/kubernetes/pkg/controller" "k8s.io/kubernetes/pkg/util/workqueue" @@ -119,7 +120,7 @@ type ServiceController struct { serviceCache *serviceCache clusterCache *clusterClientCache // A store of services, populated by the serviceController - serviceStore cache.StoreToServiceLister + serviceStore listers.StoreToServiceLister // Watches changes to all services serviceController cache.Controller federatedInformer fedutil.FederatedInformer @@ -180,11 +181,11 @@ func New(federationClient fedclientset.Interface, dns dnsprovider.Interface, s.clusterDeliverer = util.NewDelayingDeliverer() s.serviceStore.Indexer, s.serviceController = cache.NewIndexerInformer( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (pkgruntime.Object, error) { - return s.federationClient.Core().Services(v1.NamespaceAll).List(options) + ListFunc: func(options metav1.ListOptions) (pkgruntime.Object, error) { + return s.federationClient.Core().Services(metav1.NamespaceAll).List(options) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - return s.federationClient.Core().Services(v1.NamespaceAll).Watch(options) + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + return s.federationClient.Core().Services(metav1.NamespaceAll).Watch(options) }, }, &v1.Service{}, @@ -203,10 +204,10 @@ func New(federationClient fedclientset.Interface, dns dnsprovider.Interface, ) s.clusterStore.Store, s.clusterController = cache.NewInformer( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (pkgruntime.Object, error) { + ListFunc: func(options metav1.ListOptions) (pkgruntime.Object, error) { return s.federationClient.Federation().Clusters().List(options) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { return s.federationClient.Federation().Clusters().Watch(options) }, }, @@ -248,11 +249,11 @@ func New(federationClient fedclientset.Interface, dns dnsprovider.Interface, fedInformerFactory := func(cluster *v1beta1.Cluster, targetClient kubeclientset.Interface) (cache.Store, cache.Controller) { return cache.NewInformer( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (pkgruntime.Object, error) { - return targetClient.Core().Services(v1.NamespaceAll).List(options) + ListFunc: func(options metav1.ListOptions) (pkgruntime.Object, error) { + return targetClient.Core().Services(metav1.NamespaceAll).List(options) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - return targetClient.Core().Services(v1.NamespaceAll).Watch(options) + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + return targetClient.Core().Services(metav1.NamespaceAll).Watch(options) }, }, &v1.Service{}, @@ -281,7 +282,7 @@ func New(federationClient fedclientset.Interface, dns dnsprovider.Interface, }, func(client kubeclientset.Interface, obj pkgruntime.Object) error { svc := obj.(*v1.Service) - err := client.Core().Services(svc.Namespace).Delete(svc.Name, &v1.DeleteOptions{}) + err := client.Core().Services(svc.Namespace).Delete(svc.Name, &metav1.DeleteOptions{}) return err }) diff --git a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/BUILD b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/BUILD index 6a81dca1..e47b57b5 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/BUILD +++ b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/BUILD @@ -21,7 +21,6 @@ go_library( "handlers.go", "meta.go", "secret.go", - "versionize_listoptions.go", ], tags = ["automanaged"], deps = [ @@ -33,17 +32,17 @@ go_library( "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", "//pkg/client/clientset_generated/internalclientset:go_default_library", - "//pkg/client/restclient:go_default_library", - "//pkg/client/unversioned/clientcmd:go_default_library", - "//pkg/client/unversioned/clientcmd/api:go_default_library", "//pkg/controller/deployment/util:go_default_library", - "//pkg/util/flowcontrol:go_default_library", "//vendor:github.com/golang/glog", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/net", "//vendor:k8s.io/apimachinery/pkg/util/wait", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", + "//vendor:k8s.io/client-go/tools/clientcmd", + "//vendor:k8s.io/client-go/tools/clientcmd/api", + "//vendor:k8s.io/client-go/util/flowcontrol", ], ) @@ -70,6 +69,7 @@ go_test( "//pkg/client/testing/core:go_default_library", "//pkg/controller/deployment/util:go_default_library", "//vendor:github.com/stretchr/testify/assert", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/watch", ], diff --git a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/backoff.go b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/backoff.go index ff18e8be..b5b01213 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/backoff.go +++ b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/backoff.go @@ -19,7 +19,7 @@ package util import ( "time" - "k8s.io/kubernetes/pkg/util/flowcontrol" + "k8s.io/client-go/util/flowcontrol" ) func StartBackoffGC(backoff *flowcontrol.Backoff, stopCh <-chan struct{}) { diff --git a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/cluster_util.go b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/cluster_util.go index d500331a..7a575773 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/cluster_util.go +++ b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/cluster_util.go @@ -26,13 +26,13 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" utilnet "k8s.io/apimachinery/pkg/util/net" "k8s.io/apimachinery/pkg/util/wait" + restclient "k8s.io/client-go/rest" + "k8s.io/client-go/tools/clientcmd" + clientcmdapi "k8s.io/client-go/tools/clientcmd/api" federation_v1beta1 "k8s.io/kubernetes/federation/apis/federation/v1beta1" fedclientset "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset" "k8s.io/kubernetes/pkg/api" clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" - "k8s.io/kubernetes/pkg/client/restclient" - "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" - clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api" ) const ( diff --git a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/deployment.go b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/deployment.go index ee14484d..c4f4c0f9 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/deployment.go +++ b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/deployment.go @@ -19,7 +19,7 @@ package util import ( "reflect" - api_v1 "k8s.io/kubernetes/pkg/api/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" extensions_v1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" deputils "k8s.io/kubernetes/pkg/controller/deployment/util" ) @@ -60,7 +60,7 @@ func DeploymentEquivalent(a, b *extensions_v1.Deployment) bool { } // Copies object meta for Deployment, skipping revision information. -func DeepCopyDeploymentObjectMeta(meta api_v1.ObjectMeta) api_v1.ObjectMeta { +func DeepCopyDeploymentObjectMeta(meta metav1.ObjectMeta) metav1.ObjectMeta { meta = DeepCopyRelevantObjectMeta(meta) delete(meta.Annotations, deputils.RevisionAnnotation) return meta diff --git a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/deployment_test.go b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/deployment_test.go index 451a68d5..4550c672 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/deployment_test.go +++ b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/deployment_test.go @@ -19,7 +19,7 @@ package util import ( "testing" - apiv1 "k8s.io/kubernetes/pkg/api/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" extensionsv1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" deputils "k8s.io/kubernetes/pkg/controller/deployment/util" @@ -58,9 +58,9 @@ func TestDeploymentCopy(t *testing.T) { func newDeployment() *extensionsv1.Deployment { replicas := int32(5) return &extensionsv1.Deployment{ - ObjectMeta: apiv1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "wrr", - Namespace: apiv1.NamespaceDefault, + Namespace: metav1.NamespaceDefault, SelfLink: "/api/v1/namespaces/default/deployments/name123", }, Spec: extensionsv1.DeploymentSpec{ diff --git a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/eventsink/BUILD b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/eventsink/BUILD index 1bf10015..bdf0d788 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/eventsink/BUILD +++ b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/eventsink/BUILD @@ -14,9 +14,9 @@ go_library( tags = ["automanaged"], deps = [ "//federation/client/clientset_generated/federation_clientset:go_default_library", - "//pkg/api:go_default_library", "//pkg/api/v1:go_default_library", "//pkg/client/record:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/types", ], ) @@ -31,6 +31,7 @@ go_test( "//pkg/api/v1:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:github.com/stretchr/testify/assert", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", ], ) diff --git a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/eventsink/eventsink.go b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/eventsink/eventsink.go index cb7c2ca5..3793aae7 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/eventsink/eventsink.go +++ b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/eventsink/eventsink.go @@ -17,8 +17,8 @@ limitations under the License. package eventsink import ( + "k8s.io/apimachinery/pkg/types" fedclientset "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset" - api "k8s.io/kubernetes/pkg/api" api_v1 "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/record" ) @@ -46,5 +46,5 @@ func (fes *FederatedEventSink) Update(event *api_v1.Event) (*api_v1.Event, error } func (fes *FederatedEventSink) Patch(event *api_v1.Event, data []byte) (*api_v1.Event, error) { - return fes.clientset.Core().Events(event.Namespace).Patch(event.Name, api.StrategicMergePatchType, data) + return fes.clientset.Core().Events(event.Namespace).Patch(event.Name, types.StrategicMergePatchType, data) } diff --git a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/eventsink/eventsink_test.go b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/eventsink/eventsink_test.go index dd9fa6d1..3364d0ca 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/eventsink/eventsink_test.go +++ b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/eventsink/eventsink_test.go @@ -19,6 +19,7 @@ package eventsink import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" fakefedclientset "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/fake" . "k8s.io/kubernetes/federation/pkg/federation-controller/util/test" @@ -46,7 +47,7 @@ func TestEventSink(t *testing.T) { }) event := apiv1.Event{ - ObjectMeta: apiv1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "bzium", Namespace: "ns", }, diff --git a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/federated_informer.go b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/federated_informer.go index 2ef0beb9..5e1e4653 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/federated_informer.go +++ b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/federated_informer.go @@ -22,14 +22,15 @@ import ( "sync" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" pkgruntime "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" + restclient "k8s.io/client-go/rest" federationapi "k8s.io/kubernetes/federation/apis/federation/v1beta1" federationclientset "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset" apiv1 "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/cache" kubeclientset "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/client/restclient" "github.com/golang/glog" ) @@ -160,10 +161,10 @@ func NewFederatedInformer( federatedInformer.clusterInformer.store, federatedInformer.clusterInformer.controller = cache.NewInformer( &cache.ListWatch{ - ListFunc: func(options apiv1.ListOptions) (pkgruntime.Object, error) { + ListFunc: func(options metav1.ListOptions) (pkgruntime.Object, error) { return federationClient.Federation().Clusters().List(options) }, - WatchFunc: func(options apiv1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { return federationClient.Federation().Clusters().Watch(options) }, }, diff --git a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/federated_informer_test.go b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/federated_informer_test.go index 8c02998c..2898b348 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/federated_informer_test.go +++ b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/federated_informer_test.go @@ -20,6 +20,7 @@ import ( "testing" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" federationapi "k8s.io/kubernetes/federation/apis/federation/v1beta1" @@ -40,7 +41,7 @@ func TestFederatedInformer(t *testing.T) { // Add a single cluster to federation and remove it when needed. cluster := federationapi.Cluster{ - ObjectMeta: apiv1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "mycluster", }, Status: federationapi.ClusterStatus{ @@ -65,7 +66,7 @@ func TestFederatedInformer(t *testing.T) { fakeKubeClient := &fakekubeclientset.Clientset{} // There is a single service ns1/s1 in cluster mycluster. service := apiv1.Service{ - ObjectMeta: apiv1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "ns1", Name: "s1", }, @@ -80,11 +81,11 @@ func TestFederatedInformer(t *testing.T) { targetInformerFactory := func(cluster *federationapi.Cluster, clientset kubeclientset.Interface) (cache.Store, cache.Controller) { return cache.NewInformer( &cache.ListWatch{ - ListFunc: func(options apiv1.ListOptions) (runtime.Object, error) { - return clientset.Core().Services(apiv1.NamespaceAll).List(options) + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + return clientset.Core().Services(metav1.NamespaceAll).List(options) }, - WatchFunc: func(options apiv1.ListOptions) (watch.Interface, error) { - return clientset.Core().Services(apiv1.NamespaceAll).Watch(options) + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + return clientset.Core().Services(metav1.NamespaceAll).Watch(options) }, }, &apiv1.Service{}, diff --git a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/federated_updater_test.go b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/federated_updater_test.go index 7ce203b8..43a44818 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/federated_updater_test.go +++ b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/federated_updater_test.go @@ -21,6 +21,7 @@ import ( "testing" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" pkgruntime "k8s.io/apimachinery/pkg/runtime" federationapi "k8s.io/kubernetes/federation/apis/federation/v1beta1" apiv1 "k8s.io/kubernetes/pkg/api/v1" @@ -136,7 +137,7 @@ func TestFederatedUpdaterTimeout(t *testing.T) { func makeService(cluster, name string) *apiv1.Service { return &apiv1.Service{ - ObjectMeta: apiv1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "ns1", Name: name, }, diff --git a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/handlers.go b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/handlers.go index 76c23279..db47af02 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/handlers.go +++ b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/handlers.go @@ -20,8 +20,8 @@ import ( "fmt" "reflect" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" pkgruntime "k8s.io/apimachinery/pkg/runtime" - apiv1 "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/cache" ) @@ -68,8 +68,8 @@ func NewTriggerOnMetaAndSpecChanges(triggerFunc func(pkgruntime.Object)) *cache. }, UpdateFunc: func(old, cur interface{}) { curObj := cur.(pkgruntime.Object) - oldMeta := getFieldOrPanic(old, "ObjectMeta").(apiv1.ObjectMeta) - curMeta := getFieldOrPanic(cur, "ObjectMeta").(apiv1.ObjectMeta) + oldMeta := getFieldOrPanic(old, "ObjectMeta").(metav1.ObjectMeta) + curMeta := getFieldOrPanic(cur, "ObjectMeta").(metav1.ObjectMeta) if !ObjectMetaEquivalent(oldMeta, curMeta) || !reflect.DeepEqual(getFieldOrPanic(old, "Spec"), getFieldOrPanic(cur, "Spec")) { triggerFunc(curObj) diff --git a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/handlers_test.go b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/handlers_test.go index c9a46c7c..05410107 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/handlers_test.go +++ b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/handlers_test.go @@ -19,6 +19,7 @@ package util import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" pkgruntime "k8s.io/apimachinery/pkg/runtime" apiv1 "k8s.io/kubernetes/pkg/api/v1" @@ -28,13 +29,13 @@ import ( func TestHandlers(t *testing.T) { // There is a single service ns1/s1 in cluster mycluster. service := apiv1.Service{ - ObjectMeta: apiv1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "ns1", Name: "s1", }, } service2 := apiv1.Service{ - ObjectMeta: apiv1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "ns1", Name: "s1", Annotations: map[string]string{ @@ -82,7 +83,7 @@ func TestHandlers(t *testing.T) { assert.True(t, triggered()) service3 := apiv1.Service{ - ObjectMeta: apiv1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "ns1", Name: "s1", }, diff --git a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/meta.go b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/meta.go index 6f9a9433..50e5e03a 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/meta.go +++ b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/meta.go @@ -19,16 +19,16 @@ package util import ( "reflect" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/api" - api_v1 "k8s.io/kubernetes/pkg/api/v1" ) // Copies cluster-independent, user provided data from the given ObjectMeta struct. If in // the future the ObjectMeta structure is expanded then any field that is not populated // by the api server should be included here. -func copyObjectMeta(obj api_v1.ObjectMeta) api_v1.ObjectMeta { - return api_v1.ObjectMeta{ +func copyObjectMeta(obj metav1.ObjectMeta) metav1.ObjectMeta { + return metav1.ObjectMeta{ Name: obj.Name, Namespace: obj.Namespace, Labels: obj.Labels, @@ -39,7 +39,7 @@ func copyObjectMeta(obj api_v1.ObjectMeta) api_v1.ObjectMeta { // Deep copies cluster-independent, user provided data from the given ObjectMeta struct. If in // the future the ObjectMeta structure is expanded then any field that is not populated // by the api server should be included here. -func DeepCopyRelevantObjectMeta(obj api_v1.ObjectMeta) api_v1.ObjectMeta { +func DeepCopyRelevantObjectMeta(obj metav1.ObjectMeta) metav1.ObjectMeta { copyMeta := copyObjectMeta(obj) if obj.Labels != nil { copyMeta.Labels = make(map[string]string) @@ -59,7 +59,7 @@ func DeepCopyRelevantObjectMeta(obj api_v1.ObjectMeta) api_v1.ObjectMeta { // Checks if cluster-independent, user provided data in two given ObjectMeta are equal. If in // the future the ObjectMeta structure is expanded then any field that is not populated // by the api server should be included here. -func ObjectMetaEquivalent(a, b api_v1.ObjectMeta) bool { +func ObjectMetaEquivalent(a, b metav1.ObjectMeta) bool { if a.Name != b.Name { return false } @@ -78,8 +78,8 @@ func ObjectMetaEquivalent(a, b api_v1.ObjectMeta) bool { // Checks if cluster-independent, user provided data in ObjectMeta and Spec in two given top // level api objects are equivalent. func ObjectMetaAndSpecEquivalent(a, b runtime.Object) bool { - objectMetaA := reflect.ValueOf(a).Elem().FieldByName("ObjectMeta").Interface().(api_v1.ObjectMeta) - objectMetaB := reflect.ValueOf(b).Elem().FieldByName("ObjectMeta").Interface().(api_v1.ObjectMeta) + objectMetaA := reflect.ValueOf(a).Elem().FieldByName("ObjectMeta").Interface().(metav1.ObjectMeta) + objectMetaB := reflect.ValueOf(b).Elem().FieldByName("ObjectMeta").Interface().(metav1.ObjectMeta) specA := reflect.ValueOf(a).Elem().FieldByName("Spec").Interface() specB := reflect.ValueOf(b).Elem().FieldByName("Spec").Interface() return ObjectMetaEquivalent(objectMetaA, objectMetaB) && reflect.DeepEqual(specA, specB) diff --git a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/meta_test.go b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/meta_test.go index 2a23cacb..3ee53b1d 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/meta_test.go +++ b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/meta_test.go @@ -19,51 +19,52 @@ package util import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" api_v1 "k8s.io/kubernetes/pkg/api/v1" "github.com/stretchr/testify/assert" ) func TestObjectMeta(t *testing.T) { - o1 := api_v1.ObjectMeta{ + o1 := metav1.ObjectMeta{ Namespace: "ns1", Name: "s1", UID: "1231231412", ResourceVersion: "999", } o2 := copyObjectMeta(o1) - o3 := api_v1.ObjectMeta{ + o3 := metav1.ObjectMeta{ Namespace: "ns1", Name: "s1", UID: "1231231412", Annotations: map[string]string{"A": "B"}, } - o4 := api_v1.ObjectMeta{ + o4 := metav1.ObjectMeta{ Namespace: "ns1", Name: "s1", UID: "1231255531412", Annotations: map[string]string{"A": "B"}, } - o5 := api_v1.ObjectMeta{ + o5 := metav1.ObjectMeta{ Namespace: "ns1", Name: "s1", ResourceVersion: "1231231412", Annotations: map[string]string{"A": "B"}, } - o6 := api_v1.ObjectMeta{ + o6 := metav1.ObjectMeta{ Namespace: "ns1", Name: "s1", ResourceVersion: "1231255531412", Annotations: map[string]string{"A": "B"}, } - o7 := api_v1.ObjectMeta{ + o7 := metav1.ObjectMeta{ Namespace: "ns1", Name: "s1", ResourceVersion: "1231255531412", Annotations: map[string]string{}, Labels: map[string]string{}, } - o8 := api_v1.ObjectMeta{ + o8 := metav1.ObjectMeta{ Namespace: "ns1", Name: "s1", ResourceVersion: "1231255531412", @@ -82,7 +83,7 @@ func TestObjectMeta(t *testing.T) { func TestObjectMetaAndSpec(t *testing.T) { s1 := api_v1.Service{ - ObjectMeta: api_v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "ns1", Name: "s1", }, @@ -92,7 +93,7 @@ func TestObjectMetaAndSpec(t *testing.T) { } s1b := s1 s2 := api_v1.Service{ - ObjectMeta: api_v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "ns1", Name: "s2", }, @@ -101,7 +102,7 @@ func TestObjectMetaAndSpec(t *testing.T) { }, } s3 := api_v1.Service{ - ObjectMeta: api_v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "ns1", Name: "s1", }, diff --git a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/podanalyzer/pod_helper_test.go b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/podanalyzer/pod_helper_test.go index 7a69d0e3..3f84afe0 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/podanalyzer/pod_helper_test.go +++ b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/podanalyzer/pod_helper_test.go @@ -95,7 +95,7 @@ func TestAnalyze(t *testing.T) { func newReplicaSet(selectorMap map[string]string) *v1beta1.ReplicaSet { replicas := int32(3) rs := &v1beta1.ReplicaSet{ - ObjectMeta: api_v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foobar", Namespace: "default", }, @@ -109,7 +109,7 @@ func newReplicaSet(selectorMap map[string]string) *v1beta1.ReplicaSet { func newPod(name string, rs *v1beta1.ReplicaSet, status api_v1.PodStatus) *api_v1.Pod { return &api_v1.Pod{ - ObjectMeta: api_v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: rs.Namespace, Labels: rs.Spec.Selector.MatchLabels, diff --git a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/test/BUILD b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/test/BUILD index afe41267..75895544 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/test/BUILD +++ b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/test/BUILD @@ -18,6 +18,7 @@ go_library( "//pkg/api/v1:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:github.com/golang/glog", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/wait", "//vendor:k8s.io/apimachinery/pkg/watch", diff --git a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/test/test_helper.go b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/test/test_helper.go index 89fd7c18..ca1ed596 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/test/test_helper.go +++ b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/test/test_helper.go @@ -24,6 +24,7 @@ import ( "sync" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apimachinery/pkg/watch" @@ -264,7 +265,7 @@ func CheckObjectFromChan(c chan runtime.Object, checkFunction CheckingFunction) } // CompareObjectMeta returns an error when the given objects are not equivalent. -func CompareObjectMeta(a, b apiv1.ObjectMeta) error { +func CompareObjectMeta(a, b metav1.ObjectMeta) error { if a.Namespace != b.Namespace { return fmt.Errorf("Different namespace expected:%s observed:%s", a.Namespace, b.Namespace) } @@ -288,7 +289,7 @@ func ToFederatedInformerForTestOnly(informer util.FederatedInformer) util.Federa // NewCluster builds a new cluster object. func NewCluster(name string, readyStatus apiv1.ConditionStatus) *federationapi.Cluster { return &federationapi.Cluster{ - ObjectMeta: apiv1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Annotations: map[string]string{}, }, diff --git a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/versionize_listoptions.go b/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/versionize_listoptions.go deleted file mode 100644 index 1f6ef7d3..00000000 --- a/vendor/k8s.io/kubernetes/federation/pkg/federation-controller/util/versionize_listoptions.go +++ /dev/null @@ -1,40 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package util - -import ( - "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/api/v1" -) - -// TODO: remove this when Reflector takes an interface rather than a particular ListOptions as input parameter. -func VersionizeV1ListOptions(in api.ListOptions) (out v1.ListOptions) { - if in.LabelSelector != nil { - out.LabelSelector = in.LabelSelector.String() - } else { - out.LabelSelector = "" - } - if in.FieldSelector != nil { - out.FieldSelector = in.FieldSelector.String() - } else { - out.FieldSelector = "" - } - out.Watch = in.Watch - out.ResourceVersion = in.ResourceVersion - out.TimeoutSeconds = in.TimeoutSeconds - return out -} diff --git a/vendor/k8s.io/kubernetes/federation/pkg/kubefed/BUILD b/vendor/k8s.io/kubernetes/federation/pkg/kubefed/BUILD index 6258ab78..794134c2 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/kubefed/BUILD +++ b/vendor/k8s.io/kubernetes/federation/pkg/kubefed/BUILD @@ -20,9 +20,6 @@ go_library( "//federation/apis/federation:go_default_library", "//federation/pkg/kubefed/init:go_default_library", "//federation/pkg/kubefed/util:go_default_library", - "//pkg/api:go_default_library", - "//pkg/client/unversioned/clientcmd:go_default_library", - "//pkg/client/unversioned/clientcmd/api:go_default_library", "//pkg/kubectl:go_default_library", "//pkg/kubectl/cmd:go_default_library", "//pkg/kubectl/cmd/templates:go_default_library", @@ -32,8 +29,11 @@ go_library( "//vendor:github.com/golang/glog", "//vendor:github.com/spf13/cobra", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", + "//vendor:k8s.io/client-go/tools/clientcmd", + "//vendor:k8s.io/client-go/tools/clientcmd/api", ], ) @@ -55,13 +55,13 @@ go_test( "//pkg/api/v1:go_default_library", "//pkg/client/restclient/fake:go_default_library", "//pkg/client/typed/dynamic:go_default_library", - "//pkg/client/unversioned/clientcmd:go_default_library", - "//pkg/client/unversioned/clientcmd/api:go_default_library", "//pkg/kubectl/cmd/testing:go_default_library", "//pkg/kubectl/cmd/util:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/util/diff", + "//vendor:k8s.io/client-go/tools/clientcmd", + "//vendor:k8s.io/client-go/tools/clientcmd/api", ], ) diff --git a/vendor/k8s.io/kubernetes/federation/pkg/kubefed/init/BUILD b/vendor/k8s.io/kubernetes/federation/pkg/kubefed/init/BUILD index 2de432e1..d036f431 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/kubefed/init/BUILD +++ b/vendor/k8s.io/kubernetes/federation/pkg/kubefed/init/BUILD @@ -19,17 +19,17 @@ go_library( "//pkg/api/resource:go_default_library", "//pkg/apis/extensions:go_default_library", "//pkg/client/clientset_generated/internalclientset:go_default_library", - "//pkg/client/unversioned/clientcmd:go_default_library", - "//pkg/client/unversioned/clientcmd/api:go_default_library", "//pkg/kubectl/cmd/templates:go_default_library", "//pkg/kubectl/cmd/util:go_default_library", - "//pkg/util/cert:go_default_library", - "//pkg/util/cert/triple:go_default_library", "//pkg/util/intstr:go_default_library", "//pkg/version:go_default_library", "//vendor:github.com/spf13/cobra", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/util/wait", + "//vendor:k8s.io/client-go/tools/clientcmd", + "//vendor:k8s.io/client-go/tools/clientcmd/api", + "//vendor:k8s.io/client-go/util/cert", + "//vendor:k8s.io/client-go/util/cert/triple", ], ) @@ -48,13 +48,13 @@ go_test( "//pkg/apis/extensions/v1beta1:go_default_library", "//pkg/client/restclient/fake:go_default_library", "//pkg/client/typed/dynamic:go_default_library", - "//pkg/client/unversioned/clientcmd:go_default_library", "//pkg/kubectl/cmd/testing:go_default_library", "//pkg/kubectl/cmd/util:go_default_library", "//pkg/util/intstr:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/util/diff", + "//vendor:k8s.io/client-go/tools/clientcmd", ], ) diff --git a/vendor/k8s.io/kubernetes/federation/pkg/kubefed/init/init.go b/vendor/k8s.io/kubernetes/federation/pkg/kubefed/init/init.go index f5a06a0d..b0704c5b 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/kubefed/init/init.go +++ b/vendor/k8s.io/kubernetes/federation/pkg/kubefed/init/init.go @@ -38,18 +38,18 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/client-go/tools/clientcmd" + clientcmdapi "k8s.io/client-go/tools/clientcmd/api" + certutil "k8s.io/client-go/util/cert" + triple "k8s.io/client-go/util/cert/triple" kubeadmkubeconfigphase "k8s.io/kubernetes/cmd/kubeadm/app/phases/kubeconfig" "k8s.io/kubernetes/federation/pkg/kubefed/util" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/apis/extensions" client "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" - "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" - clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api" "k8s.io/kubernetes/pkg/kubectl/cmd/templates" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" - certutil "k8s.io/kubernetes/pkg/util/cert" - triple "k8s.io/kubernetes/pkg/util/cert/triple" "k8s.io/kubernetes/pkg/util/intstr" "k8s.io/kubernetes/pkg/version" @@ -250,7 +250,7 @@ func initFederation(cmdOut io.Writer, config util.AdminConfig, cmd *cobra.Comman func createNamespace(clientset *client.Clientset, namespace string, dryRun bool) (*api.Namespace, error) { ns := &api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: namespace, }, } @@ -264,7 +264,7 @@ func createNamespace(clientset *client.Clientset, namespace string, dryRun bool) func createService(clientset *client.Clientset, namespace, svcName string, dryRun bool) (*api.Service, error) { svc := &api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: svcName, Namespace: namespace, Labels: componentLabel, @@ -334,11 +334,11 @@ func genCerts(svcNamespace, name, svcName, localDNSZoneName string, ips, hostnam if err != nil { return nil, fmt.Errorf("failed to create federation API server key and certificate: %v", err) } - cm, err := triple.NewClientKeyPair(ca, ControllerManagerCN) + cm, err := triple.NewClientKeyPair(ca, ControllerManagerCN, nil) if err != nil { return nil, fmt.Errorf("failed to create federation controller manager client key and certificate: %v", err) } - admin, err := triple.NewClientKeyPair(ca, AdminCN) + admin, err := triple.NewClientKeyPair(ca, AdminCN, nil) if err != nil { return nil, fmt.Errorf("failed to create client key and certificate for an admin: %v", err) } @@ -353,7 +353,7 @@ func genCerts(svcNamespace, name, svcName, localDNSZoneName string, ips, hostnam func createAPIServerCredentialsSecret(clientset *client.Clientset, namespace, credentialsName string, entKeyPairs *entityKeyPairs, dryRun bool) (*api.Secret, error) { // Build the secret object with API server credentials. secret := &api.Secret{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: credentialsName, Namespace: namespace, }, @@ -391,7 +391,7 @@ func createPVC(clientset *client.Clientset, namespace, svcName, etcdPVCapacity s } pvc := &api.PersistentVolumeClaim{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: fmt.Sprintf("%s-etcd-claim", svcName), Namespace: namespace, Labels: componentLabel, @@ -438,7 +438,7 @@ func createAPIServer(clientset *client.Clientset, namespace, name, image, creden dataVolumeName := "etcddata" dep := &extensions.Deployment{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: namespace, Labels: componentLabel, @@ -446,7 +446,7 @@ func createAPIServer(clientset *client.Clientset, namespace, name, image, creden Spec: extensions.DeploymentSpec{ Replicas: 1, Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Labels: apiserverPodLabels, }, @@ -522,7 +522,7 @@ func createAPIServer(clientset *client.Clientset, namespace, name, image, creden func createControllerManager(clientset *client.Clientset, namespace, name, svcName, cmName, image, kubeconfigName, dnsZoneName, dnsProvider string, dryRun bool) (*extensions.Deployment, error) { dep := &extensions.Deployment{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: cmName, Namespace: namespace, Labels: componentLabel, @@ -530,7 +530,7 @@ func createControllerManager(clientset *client.Clientset, namespace, name, svcNa Spec: extensions.DeploymentSpec{ Replicas: 1, Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: cmName, Labels: controllerManagerPodLabels, }, @@ -592,7 +592,7 @@ func createControllerManager(clientset *client.Clientset, namespace, name, svcNa func waitForPods(clientset *client.Clientset, fedPods []string, namespace string) error { err := wait.PollInfinite(podWaitInterval, func() (bool, error) { podCheck := len(fedPods) - podList, err := clientset.Core().Pods(namespace).List(api.ListOptions{}) + podList, err := clientset.Core().Pods(namespace).List(metav1.ListOptions{}) if err != nil { return false, nil } diff --git a/vendor/k8s.io/kubernetes/federation/pkg/kubefed/init/init_test.go b/vendor/k8s.io/kubernetes/federation/pkg/kubefed/init/init_test.go index 06504e27..660bf101 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/kubefed/init/init_test.go +++ b/vendor/k8s.io/kubernetes/federation/pkg/kubefed/init/init_test.go @@ -33,6 +33,7 @@ import ( "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/diff" + "k8s.io/client-go/tools/clientcmd" kubefedtesting "k8s.io/kubernetes/federation/pkg/kubefed/testing" "k8s.io/kubernetes/federation/pkg/kubefed/util" "k8s.io/kubernetes/pkg/api" @@ -42,7 +43,6 @@ import ( "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" "k8s.io/kubernetes/pkg/client/restclient/fake" "k8s.io/kubernetes/pkg/client/typed/dynamic" - "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" cmdtesting "k8s.io/kubernetes/pkg/kubectl/cmd/testing" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" "k8s.io/kubernetes/pkg/util/intstr" @@ -465,7 +465,7 @@ func fakeInitHostFactory(federationName, namespaceName, ip, dnsZoneName, image, Kind: "Namespace", APIVersion: testapi.Default.GroupVersion().String(), }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: namespaceName, }, } @@ -475,7 +475,7 @@ func fakeInitHostFactory(federationName, namespaceName, ip, dnsZoneName, image, Kind: "Service", APIVersion: testapi.Default.GroupVersion().String(), }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: namespaceName, Name: svcName, Labels: componentLabel, @@ -510,7 +510,7 @@ func fakeInitHostFactory(federationName, namespaceName, ip, dnsZoneName, image, Kind: "Secret", APIVersion: testapi.Default.GroupVersion().String(), }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: credSecretName, Namespace: namespaceName, }, @@ -522,7 +522,7 @@ func fakeInitHostFactory(federationName, namespaceName, ip, dnsZoneName, image, Kind: "Secret", APIVersion: testapi.Default.GroupVersion().String(), }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: cmKubeconfigSecretName, Namespace: namespaceName, }, @@ -534,7 +534,7 @@ func fakeInitHostFactory(federationName, namespaceName, ip, dnsZoneName, image, Kind: "PersistentVolumeClaim", APIVersion: testapi.Default.GroupVersion().String(), }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: pvcName, Namespace: namespaceName, Labels: componentLabel, @@ -559,7 +559,7 @@ func fakeInitHostFactory(federationName, namespaceName, ip, dnsZoneName, image, Kind: "Deployment", APIVersion: testapi.Extensions.GroupVersion().String(), }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: svcName, Namespace: namespaceName, Labels: componentLabel, @@ -568,7 +568,7 @@ func fakeInitHostFactory(federationName, namespaceName, ip, dnsZoneName, image, Replicas: &replicas, Selector: nil, Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: svcName, Labels: apiserverPodLabels, }, @@ -652,7 +652,7 @@ func fakeInitHostFactory(federationName, namespaceName, ip, dnsZoneName, image, Kind: "Deployment", APIVersion: testapi.Extensions.GroupVersion().String(), }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: cmName, Namespace: namespaceName, Labels: componentLabel, @@ -661,7 +661,7 @@ func fakeInitHostFactory(federationName, namespaceName, ip, dnsZoneName, image, Replicas: &replicas, Selector: nil, Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: cmName, Labels: controllerManagerPodLabels, }, @@ -720,7 +720,7 @@ func fakeInitHostFactory(federationName, namespaceName, ip, dnsZoneName, image, Kind: "Pod", APIVersion: testapi.Extensions.GroupVersion().String(), }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: svcName, Namespace: namespaceName, }, @@ -734,7 +734,7 @@ func fakeInitHostFactory(federationName, namespaceName, ip, dnsZoneName, image, Kind: "Pod", APIVersion: testapi.Extensions.GroupVersion().String(), }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: cmName, Namespace: namespaceName, }, diff --git a/vendor/k8s.io/kubernetes/federation/pkg/kubefed/join.go b/vendor/k8s.io/kubernetes/federation/pkg/kubefed/join.go index 2ae32819..18ca6c52 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/kubefed/join.go +++ b/vendor/k8s.io/kubernetes/federation/pkg/kubefed/join.go @@ -22,8 +22,8 @@ import ( "strings" "k8s.io/apimachinery/pkg/runtime" + clientcmdapi "k8s.io/client-go/tools/clientcmd/api" "k8s.io/kubernetes/federation/pkg/kubefed/util" - clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api" "k8s.io/kubernetes/pkg/kubectl" kubectlcmd "k8s.io/kubernetes/pkg/kubectl/cmd" "k8s.io/kubernetes/pkg/kubectl/cmd/templates" diff --git a/vendor/k8s.io/kubernetes/federation/pkg/kubefed/join_test.go b/vendor/k8s.io/kubernetes/federation/pkg/kubefed/join_test.go index ab87b9e1..0bd75448 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/kubefed/join_test.go +++ b/vendor/k8s.io/kubernetes/federation/pkg/kubefed/join_test.go @@ -25,6 +25,8 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/diff" + "k8s.io/client-go/tools/clientcmd" + clientcmdapi "k8s.io/client-go/tools/clientcmd/api" federationapi "k8s.io/kubernetes/federation/apis/federation/v1beta1" kubefedtesting "k8s.io/kubernetes/federation/pkg/kubefed/testing" "k8s.io/kubernetes/federation/pkg/kubefed/util" @@ -33,8 +35,6 @@ import ( "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/restclient/fake" "k8s.io/kubernetes/pkg/client/typed/dynamic" - "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" - clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api" cmdtesting "k8s.io/kubernetes/pkg/kubectl/cmd/testing" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" ) @@ -237,7 +237,7 @@ func fakeJoinHostFactory(clusterName, clusterCtx, secretName, server, token stri Kind: "Secret", APIVersion: "v1", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: secretName, Namespace: util.DefaultFederationSystemNamespace, }, @@ -277,7 +277,7 @@ func fakeJoinHostFactory(clusterName, clusterCtx, secretName, server, token stri func fakeCluster(clusterName, secretName, server string) federationapi.Cluster { return federationapi.Cluster{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: clusterName, }, Spec: federationapi.ClusterSpec{ diff --git a/vendor/k8s.io/kubernetes/federation/pkg/kubefed/kubefed.go b/vendor/k8s.io/kubernetes/federation/pkg/kubefed/kubefed.go index df9bf979..9e0a40de 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/kubefed/kubefed.go +++ b/vendor/k8s.io/kubernetes/federation/pkg/kubefed/kubefed.go @@ -19,9 +19,9 @@ package kubefed import ( "io" + "k8s.io/client-go/tools/clientcmd" kubefedinit "k8s.io/kubernetes/federation/pkg/kubefed/init" "k8s.io/kubernetes/federation/pkg/kubefed/util" - "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" kubectl "k8s.io/kubernetes/pkg/kubectl/cmd" "k8s.io/kubernetes/pkg/kubectl/cmd/templates" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" diff --git a/vendor/k8s.io/kubernetes/federation/pkg/kubefed/testing/BUILD b/vendor/k8s.io/kubernetes/federation/pkg/kubefed/testing/BUILD index 211c87bc..326f5bfe 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/kubefed/testing/BUILD +++ b/vendor/k8s.io/kubernetes/federation/pkg/kubefed/testing/BUILD @@ -15,11 +15,11 @@ go_library( "//federation/client/clientset_generated/federation_clientset:go_default_library", "//federation/pkg/kubefed/util:go_default_library", "//pkg/api:go_default_library", - "//pkg/client/restclient:go_default_library", - "//pkg/client/unversioned/clientcmd:go_default_library", - "//pkg/client/unversioned/clientcmd/api:go_default_library", "//pkg/kubectl/cmd/util:go_default_library", "//vendor:k8s.io/apimachinery/pkg/runtime", + "//vendor:k8s.io/client-go/rest", + "//vendor:k8s.io/client-go/tools/clientcmd", + "//vendor:k8s.io/client-go/tools/clientcmd/api", ], ) diff --git a/vendor/k8s.io/kubernetes/federation/pkg/kubefed/testing/testing.go b/vendor/k8s.io/kubernetes/federation/pkg/kubefed/testing/testing.go index 10f91de4..884d9c58 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/kubefed/testing/testing.go +++ b/vendor/k8s.io/kubernetes/federation/pkg/kubefed/testing/testing.go @@ -24,12 +24,12 @@ import ( "os" "k8s.io/apimachinery/pkg/runtime" + restclient "k8s.io/client-go/rest" + "k8s.io/client-go/tools/clientcmd" + clientcmdapi "k8s.io/client-go/tools/clientcmd/api" fedclient "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset" "k8s.io/kubernetes/federation/pkg/kubefed/util" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/client/restclient" - "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" - clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" ) diff --git a/vendor/k8s.io/kubernetes/federation/pkg/kubefed/unjoin.go b/vendor/k8s.io/kubernetes/federation/pkg/kubefed/unjoin.go index 1eb8d82d..4a9be8d0 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/kubefed/unjoin.go +++ b/vendor/k8s.io/kubernetes/federation/pkg/kubefed/unjoin.go @@ -22,10 +22,10 @@ import ( "net/url" "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" federationapi "k8s.io/kubernetes/federation/apis/federation" "k8s.io/kubernetes/federation/pkg/kubefed/util" - "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/kubectl/cmd/templates" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" "k8s.io/kubernetes/pkg/kubectl/resource" @@ -139,7 +139,7 @@ func deleteSecret(hostFactory cmdutil.Factory, name, namespace string) error { if err != nil { return err } - return clientset.Core().Secrets(namespace).Delete(name, &api.DeleteOptions{}) + return clientset.Core().Secrets(namespace).Delete(name, &metav1.DeleteOptions{}) } // isNotFound checks if the given error is a NotFound status error. diff --git a/vendor/k8s.io/kubernetes/federation/pkg/kubefed/util/BUILD b/vendor/k8s.io/kubernetes/federation/pkg/kubefed/util/BUILD index 648da264..0e177823 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/kubefed/util/BUILD +++ b/vendor/k8s.io/kubernetes/federation/pkg/kubefed/util/BUILD @@ -15,11 +15,12 @@ go_library( "//federation/client/clientset_generated/federation_clientset:go_default_library", "//pkg/api:go_default_library", "//pkg/client/clientset_generated/internalclientset:go_default_library", - "//pkg/client/unversioned/clientcmd:go_default_library", - "//pkg/client/unversioned/clientcmd/api:go_default_library", "//pkg/kubectl/cmd:go_default_library", "//pkg/kubectl/cmd/util:go_default_library", "//vendor:github.com/spf13/cobra", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/client-go/tools/clientcmd", + "//vendor:k8s.io/client-go/tools/clientcmd/api", ], ) diff --git a/vendor/k8s.io/kubernetes/federation/pkg/kubefed/util/util.go b/vendor/k8s.io/kubernetes/federation/pkg/kubefed/util/util.go index 358223df..cf0ea426 100644 --- a/vendor/k8s.io/kubernetes/federation/pkg/kubefed/util/util.go +++ b/vendor/k8s.io/kubernetes/federation/pkg/kubefed/util/util.go @@ -17,11 +17,12 @@ limitations under the License. package util import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/tools/clientcmd" + clientcmdapi "k8s.io/client-go/tools/clientcmd/api" fedclient "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset" "k8s.io/kubernetes/pkg/api" client "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" - "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" - clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api" kubectlcmd "k8s.io/kubernetes/pkg/kubectl/cmd" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" @@ -135,7 +136,7 @@ func CreateKubeconfigSecret(clientset *client.Clientset, kubeconfig *clientcmdap // Build the secret object with the minified and flattened // kubeconfig content. secret := &api.Secret{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: namespace, }, diff --git a/vendor/k8s.io/kubernetes/federation/registry/cluster/BUILD b/vendor/k8s.io/kubernetes/federation/registry/cluster/BUILD index 30a6c7d3..0b44bbbe 100644 --- a/vendor/k8s.io/kubernetes/federation/registry/cluster/BUILD +++ b/vendor/k8s.io/kubernetes/federation/registry/cluster/BUILD @@ -19,16 +19,17 @@ go_library( "//federation/apis/federation:go_default_library", "//federation/apis/federation/validation:go_default_library", "//pkg/api:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", - "//pkg/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/storage:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/internalversion", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/validation/field", "//vendor:k8s.io/apimachinery/pkg/watch", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", "//vendor:k8s.io/apiserver/pkg/storage/names", ], ) @@ -42,9 +43,10 @@ go_test( "//federation/apis/federation:go_default_library", "//pkg/api:go_default_library", "//pkg/api/testing:go_default_library", - "//pkg/fields:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) diff --git a/vendor/k8s.io/kubernetes/federation/registry/cluster/etcd/BUILD b/vendor/k8s.io/kubernetes/federation/registry/cluster/etcd/BUILD index e14acafd..43387d95 100644 --- a/vendor/k8s.io/kubernetes/federation/registry/cluster/etcd/BUILD +++ b/vendor/k8s.io/kubernetes/federation/registry/cluster/etcd/BUILD @@ -15,11 +15,11 @@ go_library( deps = [ "//federation/apis/federation:go_default_library", "//federation/registry/cluster:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", - "//pkg/registry/generic:go_default_library", - "//pkg/registry/generic/registry:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic/registry:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//vendor:k8s.io/apimachinery/pkg/runtime", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) @@ -31,10 +31,11 @@ go_test( deps = [ "//federation/apis/federation:go_default_library", "//pkg/api:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", "//pkg/registry/registrytest:go_default_library", "//pkg/storage/etcd/testing:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", ], diff --git a/vendor/k8s.io/kubernetes/federation/registry/cluster/etcd/etcd.go b/vendor/k8s.io/kubernetes/federation/registry/cluster/etcd/etcd.go index f2e66b5b..68013b3a 100644 --- a/vendor/k8s.io/kubernetes/federation/registry/cluster/etcd/etcd.go +++ b/vendor/k8s.io/kubernetes/federation/registry/cluster/etcd/etcd.go @@ -18,12 +18,12 @@ package etcd import ( "k8s.io/apimachinery/pkg/runtime" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/federation/apis/federation" "k8s.io/kubernetes/federation/registry/cluster" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" - "k8s.io/kubernetes/pkg/registry/generic" - genericregistry "k8s.io/kubernetes/pkg/registry/generic/registry" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + genericregistry "k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" ) type REST struct { diff --git a/vendor/k8s.io/kubernetes/federation/registry/cluster/etcd/etcd_test.go b/vendor/k8s.io/kubernetes/federation/registry/cluster/etcd/etcd_test.go index 9e44ed66..62b72224 100644 --- a/vendor/k8s.io/kubernetes/federation/registry/cluster/etcd/etcd_test.go +++ b/vendor/k8s.io/kubernetes/federation/registry/cluster/etcd/etcd_test.go @@ -19,12 +19,13 @@ package etcd import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/federation/apis/federation" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" "k8s.io/kubernetes/pkg/registry/registrytest" etcdtesting "k8s.io/kubernetes/pkg/storage/etcd/testing" ) @@ -43,7 +44,7 @@ func newStorage(t *testing.T) (*REST, *etcdtesting.EtcdTestServer) { func validNewCluster() *federation.Cluster { return &federation.Cluster{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{ "name": "foo", @@ -70,11 +71,11 @@ func TestCreate(t *testing.T) { defer server.Terminate(t) test := registrytest.New(t, storage.Store).ClusterScope() cluster := validNewCluster() - cluster.ObjectMeta = api.ObjectMeta{GenerateName: "foo"} + cluster.ObjectMeta = metav1.ObjectMeta{GenerateName: "foo"} test.TestCreate( cluster, &federation.Cluster{ - ObjectMeta: api.ObjectMeta{Name: "-a123-a_"}, + ObjectMeta: metav1.ObjectMeta{Name: "-a123-a_"}, }, ) } diff --git a/vendor/k8s.io/kubernetes/federation/registry/cluster/registry.go b/vendor/k8s.io/kubernetes/federation/registry/cluster/registry.go index bad6e6d5..b3213759 100644 --- a/vendor/k8s.io/kubernetes/federation/registry/cluster/registry.go +++ b/vendor/k8s.io/kubernetes/federation/registry/cluster/registry.go @@ -17,18 +17,19 @@ limitations under the License. package cluster import ( + metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/watch" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/federation/apis/federation" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" ) // Registry is an interface implemented by things that know how to store Cluster objects. type Registry interface { - ListClusters(ctx genericapirequest.Context, options *api.ListOptions) (*federation.ClusterList, error) - WatchCluster(ctx genericapirequest.Context, options *api.ListOptions) (watch.Interface, error) + ListClusters(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (*federation.ClusterList, error) + WatchCluster(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (watch.Interface, error) GetCluster(ctx genericapirequest.Context, name string, options *metav1.GetOptions) (*federation.Cluster, error) CreateCluster(ctx genericapirequest.Context, cluster *federation.Cluster) error UpdateCluster(ctx genericapirequest.Context, cluster *federation.Cluster) error @@ -46,7 +47,7 @@ func NewRegistry(s rest.StandardStorage) Registry { return &storage{s} } -func (s *storage) ListClusters(ctx genericapirequest.Context, options *api.ListOptions) (*federation.ClusterList, error) { +func (s *storage) ListClusters(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (*federation.ClusterList, error) { obj, err := s.List(ctx, options) if err != nil { return nil, err @@ -54,7 +55,7 @@ func (s *storage) ListClusters(ctx genericapirequest.Context, options *api.ListO return obj.(*federation.ClusterList), nil } -func (s *storage) WatchCluster(ctx genericapirequest.Context, options *api.ListOptions) (watch.Interface, error) { +func (s *storage) WatchCluster(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (watch.Interface, error) { return s.Watch(ctx, options) } diff --git a/vendor/k8s.io/kubernetes/federation/registry/cluster/strategy.go b/vendor/k8s.io/kubernetes/federation/registry/cluster/strategy.go index a9c9a156..36dcfd11 100644 --- a/vendor/k8s.io/kubernetes/federation/registry/cluster/strategy.go +++ b/vendor/k8s.io/kubernetes/federation/registry/cluster/strategy.go @@ -19,16 +19,16 @@ package cluster import ( "fmt" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/validation/field" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/storage/names" "k8s.io/kubernetes/federation/apis/federation" "k8s.io/kubernetes/federation/apis/federation/validation" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" apistorage "k8s.io/kubernetes/pkg/storage" ) diff --git a/vendor/k8s.io/kubernetes/federation/registry/cluster/strategy_test.go b/vendor/k8s.io/kubernetes/federation/registry/cluster/strategy_test.go index 85a30492..f01a8297 100644 --- a/vendor/k8s.io/kubernetes/federation/registry/cluster/strategy_test.go +++ b/vendor/k8s.io/kubernetes/federation/registry/cluster/strategy_test.go @@ -21,17 +21,18 @@ import ( "reflect" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/federation/apis/federation" "k8s.io/kubernetes/pkg/api" apitesting "k8s.io/kubernetes/pkg/api/testing" - "k8s.io/kubernetes/pkg/fields" ) func validNewCluster() *federation.Cluster { return &federation.Cluster{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", ResourceVersion: "4", Labels: map[string]string{ @@ -57,7 +58,7 @@ func validNewCluster() *federation.Cluster { func invalidNewCluster() *federation.Cluster { // Create a cluster with empty ServerAddressByClientCIDRs (which is a required field). return &federation.Cluster{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo2", ResourceVersion: "5", }, diff --git a/vendor/k8s.io/kubernetes/hack/.linted_packages b/vendor/k8s.io/kubernetes/hack/.linted_packages index 23390faa..14b4dd85 100644 --- a/vendor/k8s.io/kubernetes/hack/.linted_packages +++ b/vendor/k8s.io/kubernetes/hack/.linted_packages @@ -8,7 +8,6 @@ cmd/genkubedocs cmd/genman cmd/genswaggertypedocs cmd/genyaml -cmd/integration cmd/kube-aggregator cmd/kube-aggregator/pkg/apis/apiregistration/install cmd/kube-aggregator/pkg/client/informers @@ -25,31 +24,25 @@ cmd/kube-controller-manager/app/options cmd/kube-discovery cmd/kube-proxy cmd/kubeadm -cmd/kubeadm cmd/kubeadm/app/apis/kubeadm/install +cmd/kubeadm/app/phases/apiconfig +cmd/kubeadm/app/phases/certs cmd/kubectl cmd/kubelet cmd/libs/go2idl/client-gen cmd/libs/go2idl/client-gen/generators cmd/libs/go2idl/client-gen/test_apis/testgroup/install -cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup.k8s.io/internalversion cmd/libs/go2idl/conversion-gen cmd/libs/go2idl/deepcopy-gen cmd/libs/go2idl/defaulter-gen -cmd/libs/go2idl/generator cmd/libs/go2idl/go-to-protobuf cmd/libs/go2idl/go-to-protobuf/protoc-gen-gogo cmd/libs/go2idl/import-boss cmd/libs/go2idl/informer-gen cmd/libs/go2idl/lister-gen cmd/libs/go2idl/openapi-gen -cmd/libs/go2idl/parser cmd/libs/go2idl/set-gen -cmd/libs/go2idl/set-gen/generators cmd/linkcheck -docs/user-guide/environment-guide/containers/backend -docs/user-guide/environment-guide/containers/show -docs/user-guide/liveness/image examples examples/apiserver/server examples/explorer @@ -68,15 +61,14 @@ pkg/api/annotations pkg/api/errors pkg/api/events pkg/api/install +pkg/api/meta pkg/api/resource pkg/api/service pkg/api/v1 pkg/api/v1/service -pkg/apimachinery pkg/apis/abac/v0 pkg/apis/abac/v1beta1 pkg/apis/apps/install -pkg/apis/authentication.k8s.io/install pkg/apis/authentication/install pkg/apis/authorization/install pkg/apis/autoscaling/install @@ -94,8 +86,7 @@ pkg/apis/rbac/install pkg/apis/rbac/v1alpha1 pkg/apis/storage/install pkg/apis/storage/validation -pkg/auth/authenticator -pkg/auth/authorizer/union +pkg/client/cache pkg/client/conditions pkg/client/informers/informers_generated/apps pkg/client/informers/informers_generated/apps/internalversion @@ -109,7 +100,7 @@ pkg/client/informers/informers_generated/batch/v1 pkg/client/informers/informers_generated/batch/v2alpha1 pkg/client/informers/informers_generated/certificates pkg/client/informers/informers_generated/certificates/internalversion -pkg/client/informers/informers_generated/certificates/v1alpha1 +pkg/client/informers/informers_generated/certificates/v1beta1 pkg/client/informers/informers_generated/core pkg/client/informers/informers_generated/core/internalversion pkg/client/informers/informers_generated/core/v1 @@ -122,11 +113,11 @@ pkg/client/informers/informers_generated/policy/v1beta1 pkg/client/informers/informers_generated/rbac pkg/client/informers/informers_generated/rbac/internalversion pkg/client/informers/informers_generated/rbac/v1alpha1 +pkg/client/informers/informers_generated/rbac/v1beta1 pkg/client/informers/informers_generated/storage pkg/client/informers/informers_generated/storage/internalversion pkg/client/informers/informers_generated/storage/v1beta1 pkg/client/listers/apps/internalversion -pkg/client/listers/apps/v1alpha1 pkg/client/listers/apps/v1beta1 pkg/client/listers/authentication/internalversion pkg/client/listers/authentication/v1beta1 @@ -138,7 +129,7 @@ pkg/client/listers/batch/internalversion pkg/client/listers/batch/v1 pkg/client/listers/batch/v2alpha1 pkg/client/listers/certificates/internalversion -pkg/client/listers/certificates/v1alpha1 +pkg/client/listers/certificates/v1beta1 pkg/client/listers/core/internalversion pkg/client/listers/core/v1 pkg/client/listers/extensions/internalversion @@ -150,64 +141,51 @@ pkg/client/listers/policy/v1alpha1 pkg/client/listers/policy/v1beta1 pkg/client/listers/rbac/internalversion pkg/client/listers/rbac/v1alpha1 +pkg/client/listers/rbac/v1beta1 pkg/client/listers/storage/internalversion pkg/client/listers/storage/v1beta1 pkg/client/metrics pkg/client/metrics/prometheus -pkg/client/restclient/watch pkg/client/testing/core pkg/client/typed/discovery pkg/client/unversioned -pkg/client/unversioned/adapters/internalclientset -pkg/client/unversioned/auth pkg/client/unversioned/remotecommand pkg/cloudprovider/providers pkg/cloudprovider/providers/azure pkg/cloudprovider/providers/cloudstack -pkg/controller/framework -pkg/controller/volume pkg/controller/volume/attachdetach/cache pkg/controller/volume/attachdetach/populator pkg/controller/volume/attachdetach/reconciler -pkg/controller/volume/cache -pkg/controller/volume/populator -pkg/controller/volume/reconciler -pkg/controller/volume/statusupdater +pkg/conversion pkg/conversion/queryparams pkg/credentialprovider/aws -pkg/genericapiserver/api/audit -pkg/genericapiserver/api/handlers/responsewriters -pkg/genericapiserver/api/openapi -pkg/genericapiserver/api/request -pkg/genericapiserver/filters -pkg/genericapiserver/mux -pkg/genericapiserver/routes +pkg/fields +pkg/genericapiserver +pkg/genericapiserver/endpoints/handlers/responsewriters +pkg/genericapiserver/endpoints/openapi +pkg/genericapiserver/registry +pkg/genericapiserver/server/filters +pkg/genericapiserver/server/mux +pkg/genericapiserver/server/routes pkg/hyperkube pkg/kubelet/api pkg/kubelet/container pkg/kubelet/envvars pkg/kubelet/eviction -pkg/kubelet/sysctls pkg/kubelet/util/csr pkg/kubelet/util/format pkg/kubelet/util/ioutils -pkg/kubelet/volume -pkg/kubelet/volume/cache -pkg/kubelet/volume/populator -pkg/kubelet/volume/reconciler pkg/kubelet/volumemanager pkg/kubelet/volumemanager/cache pkg/kubelet/volumemanager/populator pkg/kubelet/volumemanager/reconciler +pkg/labels pkg/proxy/config pkg/proxy/healthcheck pkg/quota pkg/quota/install pkg/registry pkg/registry/authorization/util -pkg/registry/clusterrole/storage -pkg/registry/clusterrolebinding/storage -pkg/registry/configmap/storage pkg/registry/core/configmap/storage pkg/registry/core/endpoint pkg/registry/core/node/rest @@ -216,30 +194,20 @@ pkg/registry/core/rangeallocation pkg/registry/core/service/ipallocator/controller pkg/registry/core/service/ipallocator/storage pkg/registry/core/serviceaccount -pkg/registry/endpoint pkg/registry/extensions/podsecuritypolicy/storage pkg/registry/extensions/thirdpartyresource pkg/registry/extensions/thirdpartyresource/storage -pkg/registry/node/rest -pkg/registry/pod/storage -pkg/registry/podsecuritypolicy/storage -pkg/registry/rangeallocation pkg/registry/rbac/clusterrole/storage pkg/registry/rbac/clusterrolebinding/storage pkg/registry/rbac/role/storage pkg/registry/rbac/rolebinding/storage -pkg/registry/role/storage -pkg/registry/rolebinding/storage -pkg/registry/service/ipallocator/controller -pkg/registry/service/ipallocator/storage -pkg/registry/serviceaccount -pkg/registry/thirdpartyresource -pkg/registry/thirdpartyresource/storage pkg/runtime +pkg/runtime/serializer pkg/runtime/serializer/json -pkg/runtime/serializer/recognizer/testing +pkg/runtime/serializer/protobuf +pkg/runtime/serializer/recognizer +pkg/runtime/serializer/streaming pkg/runtime/serializer/versioning -pkg/runtime/serializer/yaml pkg/security pkg/security/podsecuritypolicy/apparmor pkg/security/podsecuritypolicy/capabilities @@ -248,14 +216,13 @@ pkg/serviceaccount pkg/storage pkg/storage/etcd3 pkg/storage/storagebackend/factory +pkg/types pkg/util/async -pkg/util/cert -pkg/util/codeinspector +pkg/util/errors pkg/util/flock -pkg/util/flushwriter +pkg/util/framer pkg/util/goroutinemap pkg/util/hash -pkg/util/homedir pkg/util/i18n pkg/util/interrupt pkg/util/io @@ -264,14 +231,18 @@ pkg/util/limitwriter pkg/util/logs pkg/util/maps pkg/util/metrics +pkg/util/net pkg/util/netsh pkg/util/rand -pkg/util/ratelimit -pkg/util/replicaset -pkg/util/restoptions +pkg/util/runtime +pkg/util/sets +pkg/util/tail +pkg/util/validation pkg/util/validation/field pkg/util/version +pkg/util/wait pkg/util/workqueue +pkg/util/yaml pkg/version/prometheus pkg/volume pkg/volume/downwardapi @@ -299,14 +270,36 @@ plugin/pkg/auth/authenticator plugin/pkg/auth/authenticator/password plugin/pkg/auth/authenticator/password/allow plugin/pkg/auth/authenticator/request/basicauth -plugin/pkg/auth/authenticator/request/union -plugin/pkg/auth/authenticator/request/x509 plugin/pkg/auth/authorizer plugin/pkg/auth/authorizer/rbac/bootstrappolicy -plugin/pkg/client/auth -plugin/pkg/client/auth/gcp -test/e2e/cleanup -test/e2e/generated +staging/src/k8s.io/apimachinery/pkg/api/errors +staging/src/k8s.io/apimachinery/pkg/apimachinery +staging/src/k8s.io/apimachinery/pkg/conversion/queryparams +staging/src/k8s.io/apimachinery/pkg/runtime +staging/src/k8s.io/apimachinery/pkg/runtime/serializer/json +staging/src/k8s.io/apimachinery/pkg/runtime/serializer/recognizer/testing +staging/src/k8s.io/apimachinery/pkg/runtime/serializer/versioning +staging/src/k8s.io/apimachinery/pkg/runtime/serializer/yaml +staging/src/k8s.io/apimachinery/pkg/util/json +staging/src/k8s.io/apimachinery/pkg/util/validation/field +staging/src/k8s.io/apimachinery/pkg/version +staging/src/k8s.io/apimachinery/pkg/watch +staging/src/k8s.io/apiserver/pkg/authentication/authenticator +staging/src/k8s.io/apiserver/pkg/authentication/request/union +staging/src/k8s.io/apiserver/pkg/authentication/request/x509 +staging/src/k8s.io/apiserver/pkg/authorization/union +staging/src/k8s.io/apiserver/pkg/endpoints/request +staging/src/k8s.io/apiserver/pkg/server +staging/src/k8s.io/apiserver/pkg/storage/names +staging/src/k8s.io/apiserver/pkg/util/flushwriter +staging/src/k8s.io/client-go/discovery +staging/src/k8s.io/client-go/plugin/pkg/client/auth +staging/src/k8s.io/client-go/plugin/pkg/client/auth/gcp +staging/src/k8s.io/client-go/rest/watch +staging/src/k8s.io/client-go/tools/auth +staging/src/k8s.io/client-go/tools/metrics +staging/src/k8s.io/client-go/util/cert +staging/src/k8s.io/client-go/util/homedir test/e2e/perftype test/e2e_node/runner/local test/images/clusterapi-tester @@ -330,4 +323,3 @@ test/integration/objectmeta test/integration/openshift test/soak/cauldron test/soak/serve_hostnames -third_party/forked/golang/expansion diff --git a/vendor/k8s.io/kubernetes/hack/BUILD b/vendor/k8s.io/kubernetes/hack/BUILD index afd55d43..e74bf8fb 100644 --- a/vendor/k8s.io/kubernetes/hack/BUILD +++ b/vendor/k8s.io/kubernetes/hack/BUILD @@ -14,6 +14,23 @@ filegroup( srcs = [ ":package-srcs", "//hack/boilerplate:all-srcs", + "//hack/e2e-internal:all-srcs", + "//hack/lib:all-srcs", ], tags = ["automanaged"], ) + +sh_test( + name = "verify-boilerplate", + srcs = ["verify-boilerplate.sh"], + data = ["//:all-srcs"], + tags = ["manual"], +) + +test_suite( + name = "verify-all", + tags = ["manual"], + tests = [ + "verify-boilerplate", + ], +) diff --git a/vendor/k8s.io/kubernetes/hack/OWNERS b/vendor/k8s.io/kubernetes/hack/OWNERS index 12b89b2a..4e27e641 100644 --- a/vendor/k8s.io/kubernetes/hack/OWNERS +++ b/vendor/k8s.io/kubernetes/hack/OWNERS @@ -1,4 +1,12 @@ -assignees: +reviewers: + - eparis + - ihmccreery + - ixdy + - jbeda + - lavalamp + - spxtr + - zmerlynn +approvers: - eparis - ihmccreery - ixdy diff --git a/vendor/k8s.io/kubernetes/hack/build-ui.sh b/vendor/k8s.io/kubernetes/hack/build-ui.sh index 85afb1ea..c084f554 100755 --- a/vendor/k8s.io/kubernetes/hack/build-ui.sh +++ b/vendor/k8s.io/kubernetes/hack/build-ui.sh @@ -37,7 +37,7 @@ readonly SWAGGER_PKG="swagger" function kube::hack::build_ui() { local pkg="$1" local src="$2" - local output_file="pkg/genericapiserver/routes/data/${pkg}/datafile.go" + local output_file="pkg/genericapiserver/server/routes/data/${pkg}/datafile.go" go-bindata -nocompress -o "${output_file}" -prefix ${PWD} -pkg "${pkg}" "${src}" diff --git a/vendor/k8s.io/kubernetes/pkg/util/cert/triple/BUILD b/vendor/k8s.io/kubernetes/hack/e2e-internal/BUILD similarity index 58% rename from vendor/k8s.io/kubernetes/pkg/util/cert/triple/BUILD rename to vendor/k8s.io/kubernetes/hack/e2e-internal/BUILD index 02247f6c..6cc62052 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/cert/triple/BUILD +++ b/vendor/k8s.io/kubernetes/hack/e2e-internal/BUILD @@ -2,18 +2,6 @@ package(default_visibility = ["//visibility:public"]) licenses(["notice"]) -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["triple.go"], - tags = ["automanaged"], - deps = ["//pkg/util/cert:go_default_library"], -) - filegroup( name = "package-srcs", srcs = glob(["**"]), diff --git a/vendor/k8s.io/kubernetes/hack/lib/BUILD b/vendor/k8s.io/kubernetes/hack/lib/BUILD new file mode 100644 index 00000000..6cc62052 --- /dev/null +++ b/vendor/k8s.io/kubernetes/hack/lib/BUILD @@ -0,0 +1,16 @@ +package(default_visibility = ["//visibility:public"]) + +licenses(["notice"]) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], +) diff --git a/vendor/k8s.io/kubernetes/hack/lib/golang.sh b/vendor/k8s.io/kubernetes/hack/lib/golang.sh index eefdc9ba..4cf842d1 100755 --- a/vendor/k8s.io/kubernetes/hack/lib/golang.sh +++ b/vendor/k8s.io/kubernetes/hack/lib/golang.sh @@ -21,11 +21,13 @@ readonly KUBE_GOPATH="${KUBE_OUTPUT}/go" # The set of server targets that we are only building for Linux # Note: if you are adding something here, you might need to add it to # kube::build::source_targets in build/common.sh as well. +# If you update this list, please also update build/release-tars/BUILD. kube::golang::server_targets() { local targets=( cmd/kube-proxy cmd/kube-apiserver cmd/kube-controller-manager + cmd/cloud-controller-manager cmd/kubelet cmd/kubeadm cmd/hyperkube @@ -40,6 +42,7 @@ readonly KUBE_SERVER_TARGETS=($(kube::golang::server_targets)) readonly KUBE_SERVER_BINARIES=("${KUBE_SERVER_TARGETS[@]##*/}") # The set of server targets that we are only building for Kubernetes nodes +# If you update this list, please also update build/release-tars/BUILD. kube::golang::node_targets() { local targets=( cmd/kube-proxy @@ -122,6 +125,7 @@ else fi # The set of client targets that we are building for all platforms +# If you update this list, please also update build/release-tars/BUILD. readonly KUBE_CLIENT_TARGETS=( cmd/kubectl federation/cmd/kubefed @@ -130,6 +134,7 @@ readonly KUBE_CLIENT_BINARIES=("${KUBE_CLIENT_TARGETS[@]##*/}") readonly KUBE_CLIENT_BINARIES_WIN=("${KUBE_CLIENT_BINARIES[@]/%/.exe}") # The set of test targets that we are building for all platforms +# If you update this list, please also update build/release-tars/BUILD. kube::golang::test_targets() { local targets=( cmd/gendocs @@ -149,6 +154,7 @@ kube::golang::test_targets() { readonly KUBE_TEST_TARGETS=($(kube::golang::test_targets)) readonly KUBE_TEST_BINARIES=("${KUBE_TEST_TARGETS[@]##*/}") readonly KUBE_TEST_BINARIES_WIN=("${KUBE_TEST_BINARIES[@]/%/.exe}") +# If you update this list, please also update build/release-tars/BUILD. readonly KUBE_TEST_PORTABLE=( test/e2e/testing-manifests test/kubemark @@ -164,6 +170,7 @@ readonly KUBE_TEST_PORTABLE=( # Test targets which run on the Kubernetes clusters directly, so we only # need to target server platforms. # These binaries will be distributed in the kubernetes-test tarball. +# If you update this list, please also update build/release-tars/BUILD. readonly KUBE_TEST_SERVER_TARGETS=( cmd/kubemark vendor/github.com/onsi/ginkgo/ginkgo @@ -186,6 +193,7 @@ readonly KUBE_ALL_TARGETS=( readonly KUBE_ALL_BINARIES=("${KUBE_ALL_TARGETS[@]##*/}") readonly KUBE_STATIC_LIBRARIES=( + cloud-controller-manager kube-apiserver kube-controller-manager kube-scheduler diff --git a/vendor/k8s.io/kubernetes/hack/lib/init.sh b/vendor/k8s.io/kubernetes/hack/lib/init.sh index e4b25545..6943c84f 100644 --- a/vendor/k8s.io/kubernetes/hack/lib/init.sh +++ b/vendor/k8s.io/kubernetes/hack/lib/init.sh @@ -59,10 +59,11 @@ authorization.k8s.io/v1beta1 \ autoscaling/v1 \ batch/v1 \ batch/v2alpha1 \ -certificates.k8s.io/v1alpha1 \ +certificates.k8s.io/v1beta1 \ extensions/v1beta1 \ imagepolicy.k8s.io/v1alpha1 \ policy/v1beta1 \ +rbac.authorization.k8s.io/v1beta1 \ rbac.authorization.k8s.io/v1alpha1 \ storage.k8s.io/v1beta1\ }" diff --git a/vendor/k8s.io/kubernetes/hack/lib/util.sh b/vendor/k8s.io/kubernetes/hack/lib/util.sh index e6cada20..3702cec3 100755 --- a/vendor/k8s.io/kubernetes/hack/lib/util.sh +++ b/vendor/k8s.io/kubernetes/hack/lib/util.sh @@ -167,12 +167,19 @@ kube::util::host_platform() { kube::util::find-binary-for-platform() { local -r lookfor="$1" local -r platform="$2" - local -r locations=( + local locations=( "${KUBE_ROOT}/_output/bin/${lookfor}" "${KUBE_ROOT}/_output/dockerized/bin/${platform}/${lookfor}" "${KUBE_ROOT}/_output/local/bin/${platform}/${lookfor}" "${KUBE_ROOT}/platforms/${platform}/${lookfor}" ) + # Also search for binary in bazel build tree. + # In some cases we have to name the binary $BINARY_bin, since there was a + # directory named $BINARY next to it. + locations+=($(find "${KUBE_ROOT}/bazel-bin/" -type f -executable \ + \( -name "${lookfor}" -o -name "${lookfor}_bin" \) 2>/dev/null || true) ) + + # List most recently-updated location. local -r bin=$( (ls -t "${locations[@]}" 2>/dev/null || true) | head -1 ) echo -n "${bin}" } @@ -313,22 +320,31 @@ kube::util::group-version-to-pkg-path() { case "${group_version}" in # both group and version are "", this occurs when we generate deep copies for internal objects of the legacy v1 API. __internal) - echo "api" + echo "pkg/api" ;; v1) - echo "api/v1" + echo "pkg/api/v1" + ;; + federation/v1beta1) + echo "federation/apis/federation/v1beta1" + ;; + meta/v1) + echo "vendor/k8s.io/apimachinery/pkg/apis/meta/v1" + ;; + meta/v1) + echo "../vendor/k8s.io/apimachinery/pkg/apis/meta/v1" ;; unversioned) - echo "api/unversioned" + echo "pkg/api/unversioned" ;; *.k8s.io) - echo "apis/${group_version%.*k8s.io}" + echo "pkg/apis/${group_version%.*k8s.io}" ;; *.k8s.io/*) - echo "apis/${group_version/.*k8s.io/}" + echo "pkg/apis/${group_version/.*k8s.io/}" ;; *) - echo "apis/${group_version%__internal}" + echo "pkg/apis/${group_version%__internal}" ;; esac } diff --git a/vendor/k8s.io/kubernetes/hack/local-up-cluster.sh b/vendor/k8s.io/kubernetes/hack/local-up-cluster.sh index 43be48e6..f218465a 100755 --- a/vendor/k8s.io/kubernetes/hack/local-up-cluster.sh +++ b/vendor/k8s.io/kubernetes/hack/local-up-cluster.sh @@ -417,7 +417,10 @@ function start_apiserver { # Wait for kube-apiserver to come up before launching the rest of the components. echo "Waiting for apiserver to come up" - kube::util::wait_for_url "https://${API_HOST}:${API_SECURE_PORT}/version" "apiserver: " 1 ${WAIT_FOR_URL_API_SERVER} || exit 1 + # this uses the API port because if you don't have any authenticator, you can't seem to use the secure port at all. + # this matches what happened with the combination in 1.4. + # TODO change this conditionally based on whether API_PORT is on or off + kube::util::wait_for_url "http://${API_HOST}:${API_PORT}/version" "apiserver: " 1 ${WAIT_FOR_URL_API_SERVER} || exit 1 # Create kubeconfigs for all components, using client certs kube::util::write_client_kubeconfig "${CONTROLPLANE_SUDO}" "${CERT_DIR}" "${ROOT_CA_FILE}" "${API_HOST}" "${API_SECURE_PORT}" admin @@ -533,6 +536,7 @@ function start_kubelet { --experimental-cgroups-per-qos=${EXPERIMENTAL_CGROUPS_PER_QOS} \ --cgroup-driver=${CGROUP_DRIVER} \ --cgroup-root=${CGROUP_ROOT} \ + --keep-terminated-pod-volumes=true \ ${auth_args} \ ${dns_args} \ ${net_plugin_dir_args} \ diff --git a/vendor/k8s.io/kubernetes/hack/make-rules/test-cmd-util.sh b/vendor/k8s.io/kubernetes/hack/make-rules/test-cmd-util.sh index fdd83b8b..667d0956 100644 --- a/vendor/k8s.io/kubernetes/hack/make-rules/test-cmd-util.sh +++ b/vendor/k8s.io/kubernetes/hack/make-rules/test-cmd-util.sh @@ -900,6 +900,22 @@ run_kubectl_apply_tests() { kubectl delete svc prune-svc 2>&1 "${kube_flags[@]}" } +# Runs tests related to kubectl create --filename(-f) --selector(-l). +run_kubectl_create_filter_tests() { + ## kubectl create -f with label selector should only create matching objects + # Pre-Condition: no POD exists + kube::test::get_object_assert pods "{{range.items}}{{$id_field}}:{{end}}" '' + # create + kubectl create -l unique-label=bingbang -f hack/testdata/filter "${kube_flags[@]}" + # check right pod exists + kube::test::get_object_assert 'pods selector-test-pod' "{{${labels_field}.name}}" 'selector-test-pod' + # check wrong pod doesn't exist + output_message=$(! kubectl get pods selector-test-pod-dont-apply 2>&1 "${kube_flags[@]}") + kube::test::if_has_string "${output_message}" 'pods "selector-test-pod-dont-apply" not found' + # cleanup + kubectl delete pods selector-test-pod +} + # Runs tests for --save-config tests. run_save_config_tests() { ## Configuration annotations should be set when --save-config is enabled @@ -2043,7 +2059,7 @@ run_deployment_tests() { kubectl apply -f hack/testdata/deployment-revision2.yaml "${kube_flags[@]}" kube::test::get_object_assert deployment.extensions "{{range.items}}{{$deployment_image_field}}:{{end}}" "${IMAGE_DEPLOYMENT_R2}:" # Rollback to revision 1 with dry-run - should be no-op - kubectl rollout undo deployment nginx --to-revision=1 --dry-run=true "${kube_flags[@]}" + kubectl rollout undo deployment nginx --dry-run=true "${kube_flags[@]}" | grep "test-cmd" kube::test::get_object_assert deployment.extensions "{{range.items}}{{$deployment_image_field}}:{{end}}" "${IMAGE_DEPLOYMENT_R2}:" # Rollback to revision 1 kubectl rollout undo deployment nginx --to-revision=1 "${kube_flags[@]}" @@ -2592,6 +2608,7 @@ runTests() { # run for federation apiserver as well. run_kubectl_apply_tests run_kubectl_run_tests + run_kubectl_create_filter_tests fi ############### diff --git a/vendor/k8s.io/kubernetes/hack/make-rules/test.sh b/vendor/k8s.io/kubernetes/hack/make-rules/test.sh index cd2286f0..26714e43 100755 --- a/vendor/k8s.io/kubernetes/hack/make-rules/test.sh +++ b/vendor/k8s.io/kubernetes/hack/make-rules/test.sh @@ -57,6 +57,10 @@ kube::test::find_dirs() { -o -path './test/e2e_node/system/*' \ -name '*_test.go' -print0 | xargs -0n1 dirname | sed "s|^\./|${KUBE_GO_PACKAGE}/|" | LC_ALL=C sort -u + # run tests for client-go + find ./staging/src/k8s.io/client-go -name '*_test.go' \ + -name '*_test.go' -print0 | xargs -0n1 dirname | sed 's|^\./staging/src/|./vendor/|' | LC_ALL=C sort -u + # run tests for apiserver find ./staging/src/k8s.io/apiserver -name '*_test.go' \ -name '*_test.go' -print0 | xargs -0n1 dirname | sed 's|^\./staging/src/|./vendor/|' | LC_ALL=C sort -u diff --git a/vendor/k8s.io/kubernetes/hack/testdata/csr.yml b/vendor/k8s.io/kubernetes/hack/testdata/csr.yml index 7e842460..b52f48c0 100644 --- a/vendor/k8s.io/kubernetes/hack/testdata/csr.yml +++ b/vendor/k8s.io/kubernetes/hack/testdata/csr.yml @@ -1,4 +1,4 @@ -apiVersion: certificates.k8s.io/v1alpha1 +apiVersion: certificates.k8s.io/v1beta1 kind: CertificateSigningRequest metadata: name: foo diff --git a/vendor/k8s.io/kubernetes/hack/update-api-reference-docs.sh b/vendor/k8s.io/kubernetes/hack/update-api-reference-docs.sh index 6dae42e1..6fb808f7 100755 --- a/vendor/k8s.io/kubernetes/hack/update-api-reference-docs.sh +++ b/vendor/k8s.io/kubernetes/hack/update-api-reference-docs.sh @@ -44,7 +44,7 @@ for gv in "${ALL_GROUP_VERSIONS[@]}"; do fi INTERESTING_GROUP_VERSIONS+=(${gv}) - GV_DIRS+=("${REPO_DIR}/pkg/$(kube::util::group-version-to-pkg-path "${gv}")") + GV_DIRS+=("${REPO_DIR}/$(kube::util::group-version-to-pkg-path "${gv}")") done GROUP_VERSIONS="${INTERESTING_GROUP_VERSIONS[@]}" GV_DIRS="${GV_DIRS[@]}" kube::swagger::gen_api_ref_docs "${SWAGGER_SPEC_PATH}" "${OUTPUT}" diff --git a/vendor/k8s.io/kubernetes/hack/update-codegen.sh b/vendor/k8s.io/kubernetes/hack/update-codegen.sh index fbcf998c..7b798d23 100755 --- a/vendor/k8s.io/kubernetes/hack/update-codegen.sh +++ b/vendor/k8s.io/kubernetes/hack/update-codegen.sh @@ -25,14 +25,12 @@ kube::golang::setup_env BUILD_TARGETS=( cmd/libs/go2idl/client-gen - cmd/libs/go2idl/set-gen cmd/libs/go2idl/lister-gen cmd/libs/go2idl/informer-gen ) make -C "${KUBE_ROOT}" WHAT="${BUILD_TARGETS[*]}" clientgen=$(kube::util::find-binary "client-gen") -setgen=$(kube::util::find-binary "set-gen") listergen=$(kube::util::find-binary "lister-gen") informergen=$(kube::util::find-binary "informer-gen") @@ -45,7 +43,8 @@ GV_DIRS=() for gv in "${GROUP_VERSIONS[@]}"; do # add items, but strip off any leading apis/ you find to match command expectations api_dir=$(kube::util::group-version-to-pkg-path "${gv}") - pkg_dir=${api_dir#apis/} + nopkg_dir=${api_dir#pkg/} + pkg_dir=${nopkg_dir#apis/} # skip groups that aren't being served, clients for these don't matter if [[ " ${KUBE_NONSERVER_GROUP_VERSIONS} " == *" ${gv} "* ]]; then @@ -63,9 +62,8 @@ ${clientgen} "$@" ${clientgen} -t "$@" ${clientgen} --clientset-name="clientset" --input="${GV_DIRS_CSV}" "$@" # Clientgen for federation clientset. -${clientgen} --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --input="../../federation/apis/federation/","api/","extensions/","batch/" --included-types-overrides="api/Service,api/Namespace,extensions/ReplicaSet,api/Secret,extensions/Ingress,extensions/Deployment,extensions/DaemonSet,api/ConfigMap,api/Event,batch/Job" "$@" -${clientgen} --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --input="../../federation/apis/federation/v1beta1","api/v1","extensions/v1beta1","batch/v1" --included-types-overrides="api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job" "$@" -${setgen} "$@" +${clientgen} --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --input="../../federation/apis/federation/","api/","extensions/","batch/","autoscaling/" --included-types-overrides="api/Service,api/Namespace,extensions/ReplicaSet,api/Secret,extensions/Ingress,extensions/Deployment,extensions/DaemonSet,api/ConfigMap,api/Event,batch/Job,autoscaling/HorizontalPodAutoscaler" "$@" +${clientgen} --clientset-name=federation_clientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --input="../../federation/apis/federation/v1beta1","api/v1","extensions/v1beta1","batch/v1","autoscaling/v1" --included-types-overrides="api/v1/Service,api/v1/Namespace,extensions/v1beta1/ReplicaSet,api/v1/Secret,extensions/v1beta1/Ingress,extensions/v1beta1/Deployment,extensions/v1beta1/DaemonSet,api/v1/ConfigMap,api/v1/Event,batch/v1/Job,autoscaling/v1/HorizontalPodAutoscaler" "$@" LISTERGEN_APIS=( pkg/api diff --git a/vendor/k8s.io/kubernetes/hack/update-federation-api-reference-docs.sh b/vendor/k8s.io/kubernetes/hack/update-federation-api-reference-docs.sh index 7d0a160a..c4f7e681 100755 --- a/vendor/k8s.io/kubernetes/hack/update-federation-api-reference-docs.sh +++ b/vendor/k8s.io/kubernetes/hack/update-federation-api-reference-docs.sh @@ -39,9 +39,9 @@ GROUP_VERSIONS=("federation/v1beta1" "v1" "extensions/v1beta1") GV_DIRS=() for gv in "${GROUP_VERSIONS[@]}"; do if [[ ${gv} == "federation/v1beta1" ]]; then - GV_DIRS+=("${REPO_DIR}/federation/$(kube::util::group-version-to-pkg-path "${gv}")") + GV_DIRS+=("${REPO_DIR}/$(kube::util::group-version-to-pkg-path "${gv}")") else - GV_DIRS+=("${REPO_DIR}/pkg/$(kube::util::group-version-to-pkg-path "${gv}")") + GV_DIRS+=("${REPO_DIR}/$(kube::util::group-version-to-pkg-path "${gv}")") fi done diff --git a/vendor/k8s.io/kubernetes/hack/update-federation-generated-swagger-docs.sh b/vendor/k8s.io/kubernetes/hack/update-federation-generated-swagger-docs.sh index dc566b7e..c6ff916b 100755 --- a/vendor/k8s.io/kubernetes/hack/update-federation-generated-swagger-docs.sh +++ b/vendor/k8s.io/kubernetes/hack/update-federation-generated-swagger-docs.sh @@ -31,7 +31,7 @@ kube::golang::setup_env GROUP_VERSIONS=(federation/v1beta1) GV_DIRS=() for gv in "${GROUP_VERSIONS[@]}"; do - GV_DIRS+=("federation/$(kube::util::group-version-to-pkg-path "${gv}")") + GV_DIRS+=("$(kube::util::group-version-to-pkg-path "${gv}")") done # To avoid compile errors, remove the currently existing files. diff --git a/vendor/k8s.io/kubernetes/hack/update-generated-runtime-dockerized.sh b/vendor/k8s.io/kubernetes/hack/update-generated-runtime-dockerized.sh index 7816dc3b..28898e93 100755 --- a/vendor/k8s.io/kubernetes/hack/update-generated-runtime-dockerized.sh +++ b/vendor/k8s.io/kubernetes/hack/update-generated-runtime-dockerized.sh @@ -29,7 +29,7 @@ BINS=( ) make -C "${KUBE_ROOT}" WHAT="${BINS[*]}" -if [[ -z "$(which protoc)" || "$(protoc --version)" != "libprotoc 3.0."* ]]; then +if [[ -z "$(which protoc)" || "$(protoc --version)" != "libprotoc 3."* ]]; then echo "Generating protobuf requires protoc 3.0.0-beta1 or newer. Please download and" echo "install the platform appropriate Protobuf package for your OS: " echo @@ -46,8 +46,17 @@ function cleanup { trap cleanup EXIT gogopath=$(dirname $(kube::util::find-binary "protoc-gen-gogo")) -export PATH=$gogopath:$PATH -protoc -I${KUBE_REMOTE_RUNTIME_ROOT} --gogo_out=plugins=grpc:${KUBE_REMOTE_RUNTIME_ROOT} ${KUBE_REMOTE_RUNTIME_ROOT}/api.proto + +PATH="${gogopath}:${PATH}" \ + protoc \ + --proto_path="${KUBE_REMOTE_RUNTIME_ROOT}" \ + --proto_path="${KUBE_ROOT}/vendor" \ + --gogo_out=plugins=grpc:${KUBE_REMOTE_RUNTIME_ROOT} ${KUBE_REMOTE_RUNTIME_ROOT}/api.proto + +# Update boilerplate for the generated file. echo "$(cat hack/boilerplate/boilerplate.go.txt ${KUBE_REMOTE_RUNTIME_ROOT}/api.pb.go)" > ${KUBE_REMOTE_RUNTIME_ROOT}/api.pb.go sed -i".bak" "s/Copyright YEAR/Copyright $(date '+%Y')/g" ${KUBE_REMOTE_RUNTIME_ROOT}/api.pb.go +# Run gofmt to clean up the generated code. +kube::golang::verify_go_version +gofmt -l -s -w ${KUBE_REMOTE_RUNTIME_ROOT}/api.pb.go diff --git a/vendor/k8s.io/kubernetes/hack/update-generated-swagger-docs.sh b/vendor/k8s.io/kubernetes/hack/update-generated-swagger-docs.sh index 34e676c0..3fa23dfe 100755 --- a/vendor/k8s.io/kubernetes/hack/update-generated-swagger-docs.sh +++ b/vendor/k8s.io/kubernetes/hack/update-generated-swagger-docs.sh @@ -32,8 +32,8 @@ GROUP_VERSIONS=(meta/v1 ${KUBE_AVAILABLE_GROUP_VERSIONS}) # To avoid compile errors, remove the currently existing files. for group_version in "${GROUP_VERSIONS[@]}"; do - rm -f "pkg/$(kube::util::group-version-to-pkg-path "${group_version}")/types_swagger_doc_generated.go" + rm -f "$(kube::util::group-version-to-pkg-path "${group_version}")/types_swagger_doc_generated.go" done for group_version in "${GROUP_VERSIONS[@]}"; do - kube::swagger::gen_types_swagger_doc "${group_version}" "pkg/$(kube::util::group-version-to-pkg-path "${group_version}")" + kube::swagger::gen_types_swagger_doc "${group_version}" "$(kube::util::group-version-to-pkg-path "${group_version}")" done diff --git a/vendor/k8s.io/kubernetes/hack/verify-flags/exceptions.txt b/vendor/k8s.io/kubernetes/hack/verify-flags/exceptions.txt index 8e8dd2e3..4ca2b129 100644 --- a/vendor/k8s.io/kubernetes/hack/verify-flags/exceptions.txt +++ b/vendor/k8s.io/kubernetes/hack/verify-flags/exceptions.txt @@ -67,7 +67,6 @@ cluster/saltbase/salt/kubelet/default:{% if grains['feature_gates'] is defined - cluster/saltbase/salt/kubelet/default:{% if pillar.get('non_masquerade_cidr','') -%} cluster/saltbase/salt/opencontrail-networking-master/init.sls: - 'SERVICE_CLUSTER_IP_RANGE': '{{ pillar.get('service_cluster_ip_range') }}' cluster/saltbase/salt/opencontrail-networking-minion/init.sls: - 'SERVICE_CLUSTER_IP_RANGE': '{{ pillar.get('service_cluster_ip_range') }}' -cluster/saltbase/salt/supervisor/kubelet-checker.sh: {% set kubelet_port = pillar['kubelet_port'] -%} cluster/saltbase/salt/supervisor/supervisor_watcher.sh:# Apply oom_score_adj: -901 to processes cluster/ubuntu/util.sh: local node_ip=${1} cluster/vagrant/provision-utils.sh: api_servers: '$(echo "$MASTER_IP" | sed -e "s/'/''/g")' @@ -105,14 +104,14 @@ hack/test-update-storage-objects.sh: local storage_media_type=${3:-""} hack/test-update-storage-objects.sh: local storage_versions=${2:-""} hack/test-update-storage-objects.sh: source_file=${test_data[0]} hack/test-update-storage-objects.sh:# source_file,resource,namespace,name,old_version,new_version -pkg/kubelet/api/v1alpha1/runtime/api.pb.go: ContainerPort *int32 `protobuf:"varint,2,opt,name=container_port,json=containerPort" json:"container_port,omitempty"` -pkg/kubelet/api/v1alpha1/runtime/api.pb.go: OomScoreAdj *int64 `protobuf:"varint,5,opt,name=oom_score_adj,json=oomScoreAdj" json:"oom_score_adj,omitempty"` -pkg/kubelet/api/v1alpha1/runtime/api.pb.go: PodCidr *string `protobuf:"bytes,1,opt,name=pod_cidr,json=podCidr" json:"pod_cidr,omitempty"` -pkg/kubelet/api/v1alpha1/runtime/api.pb.go: RuntimeConfig *RuntimeConfig `protobuf:"bytes,1,opt,name=runtime_config,json=runtimeConfig" json:"runtime_config,omitempty"` -pkg/kubelet/api/v1alpha1/runtime/api.proto: optional RuntimeConfig runtime_config = 1; -pkg/kubelet/api/v1alpha1/runtime/api.proto: optional int32 container_port = 2; -pkg/kubelet/api/v1alpha1/runtime/api.proto: optional int64 oom_score_adj = 5; -pkg/kubelet/api/v1alpha1/runtime/api.proto: optional string pod_cidr = 1; +pkg/kubelet/api/v1alpha1/runtime/api.pb.go: ContainerPort int32 `protobuf:"varint,2,opt,name=container_port,json=containerPort,proto3" json:"container_port,omitempty"` +pkg/kubelet/api/v1alpha1/runtime/api.pb.go: OomScoreAdj int64 `protobuf:"varint,5,opt,name=oom_score_adj,json=oomScoreAdj,proto3" json:"oom_score_adj,omitempty"` +pkg/kubelet/api/v1alpha1/runtime/api.pb.go: PodCidr string `protobuf:"bytes,1,opt,name=pod_cidr,json=podCidr,proto3" json:"pod_cidr,omitempty"` +pkg/kubelet/api/v1alpha1/runtime/api.pb.go: RuntimeConfig *RuntimeConfig `protobuf:"bytes,1,opt,name=runtime_config,json=runtimeConfig" json:"runtime_config,omitempty"` +pkg/kubelet/api/v1alpha1/runtime/api.proto: RuntimeConfig runtime_config = 1; +pkg/kubelet/api/v1alpha1/runtime/api.proto: int32 container_port = 2; +pkg/kubelet/api/v1alpha1/runtime/api.proto: int64 oom_score_adj = 5; +pkg/kubelet/api/v1alpha1/runtime/api.proto: string pod_cidr = 1; pkg/kubelet/cm/container_manager_linux.go: glog.V(3).Infof("Failed to apply oom_score_adj %d for pid %d: %v", oomScoreAdj, pid, err) pkg/kubelet/cm/container_manager_linux.go: glog.V(5).Infof("attempting to apply oom_score_adj of %d to pid %d", oomScoreAdj, pid) pkg/kubelet/network/hairpin/hairpin.go: hairpinModeRelativePath = "hairpin_mode" @@ -124,11 +123,17 @@ pkg/util/oom/oom_linux.go: oomScoreAdjPath := path.Join("/proc", pidStr, "oom_sc pkg/util/oom/oom_linux.go:// Writes 'value' to /proc//oom_score_adj for all processes in cgroup cgroupName. pkg/util/oom/oom_linux.go:// Writes 'value' to /proc//oom_score_adj. PID = 0 means self test/e2e/common/configmap.go: Command: []string{"/mt", "--break_on_expected_content=false", "--retry_time=120", "--file_content_in_loop=/etc/configmap-volume/data-1"}, +test/e2e/common/configmap.go: Command: []string{"/mt", "--break_on_expected_content=false", "--retry_time=120", "--file_content_in_loop=/etc/configmap-volumes/create/data-1"}, +test/e2e/common/configmap.go: Command: []string{"/mt", "--break_on_expected_content=false", "--retry_time=120", "--file_content_in_loop=/etc/configmap-volumes/delete/data-1"}, +test/e2e/common/configmap.go: Command: []string{"/mt", "--break_on_expected_content=false", "--retry_time=120", "--file_content_in_loop=/etc/configmap-volumes/update/data-3"}, test/e2e/common/downwardapi_volume.go: Command: []string{"/mt", "--break_on_expected_content=false", "--retry_time=120", "--file_content_in_loop=" + filePath}, test/e2e/common/host_path.go: fmt.Sprintf("--file_content_in_loop=%v", filePath), test/e2e/common/host_path.go: fmt.Sprintf("--file_content_in_loop=%v", filePathInReader), test/e2e/common/host_path.go: fmt.Sprintf("--retry_time=%d", retryDuration), test/e2e/common/host_path.go: fmt.Sprintf("--retry_time=%d", retryDuration), +test/e2e/common/secrets.go: Command: []string{"/mt", "--break_on_expected_content=false", "--retry_time=120", "--file_content_in_loop=/etc/secret-volumes/create/data-1"}, +test/e2e/common/secrets.go: Command: []string{"/mt", "--break_on_expected_content=false", "--retry_time=120", "--file_content_in_loop=/etc/secret-volumes/delete/data-1"}, +test/e2e/common/secrets.go: Command: []string{"/mt", "--break_on_expected_content=false", "--retry_time=120", "--file_content_in_loop=/etc/secret-volumes/update/data-3"}, test/e2e_node/container_manager_test.go: return fmt.Errorf("expected pid %d's oom_score_adj to be %d; found %d", pid, expectedOOMScoreAdj, oomScore) test/e2e_node/container_manager_test.go: return fmt.Errorf("expected pid %d's oom_score_adj to be < %d; found %d", pid, expectedMaxOOMScoreAdj, oomScore) test/e2e_node/container_manager_test.go: return fmt.Errorf("expected pid %d's oom_score_adj to be >= %d; found %d", pid, expectedMinOOMScoreAdj, oomScore) diff --git a/vendor/k8s.io/kubernetes/hack/verify-flags/known-flags.txt b/vendor/k8s.io/kubernetes/hack/verify-flags/known-flags.txt index 124127c4..9ce98f91 100644 --- a/vendor/k8s.io/kubernetes/hack/verify-flags/known-flags.txt +++ b/vendor/k8s.io/kubernetes/hack/verify-flags/known-flags.txt @@ -97,6 +97,7 @@ concurrent-resource-quota-syncs concurrent-serviceaccount-token-syncs concurrent-service-syncs config-map +config-map-data config-map-namespace config-sync-period configure-cloud-routes @@ -308,6 +309,7 @@ junit-file-number k8s-bin-dir k8s-build-output keep-gogoproto +keep-terminated-pod-volumes km-path kops-admin-access kops-cluster @@ -542,6 +544,7 @@ seccomp-profile-root secondary-node-eviction-rate secret-name secure-port +self-hosted serialize-image-pulls server-start-timeout service-account-key-file diff --git a/vendor/k8s.io/kubernetes/hack/verify-godeps.sh b/vendor/k8s.io/kubernetes/hack/verify-godeps.sh index e492bf64..391e5ff4 100755 --- a/vendor/k8s.io/kubernetes/hack/verify-godeps.sh +++ b/vendor/k8s.io/kubernetes/hack/verify-godeps.sh @@ -28,14 +28,17 @@ preload-dep() { org="$1" project="$2" sha="$3" + # project_dir ($4) is optional, if unset we will generate it + if [[ -z ${4:-} ]]; then + project_dir="${GOPATH}/src/${org}/${project}.git" + else + project_dir="${4}" + fi - org_dir="${GOPATH}/src/${org}" - mkdir -p "${org_dir}" - pushd "${org_dir}" > /dev/null - git clone "https://${org}/${project}.git" > /dev/null 2>&1 - pushd "${org_dir}/${project}" > /dev/null - git checkout "${sha}" > /dev/null 2>&1 - popd > /dev/null + echo "**HACK** preloading dep for ${org} ${project} at ${sha} into ${project_dir}" + git clone "https://${org}/${project}" "${project_dir}" > /dev/null 2>&1 + pushd "${project_dir}" > /dev/null + git checkout "${sha}" popd > /dev/null } @@ -50,9 +53,17 @@ if ! [[ ${KUBE_FORCE_VERIFY_CHECKS:-} =~ ^[yY]$ ]] && \ exit 0 fi -# Create a nice clean place to put our new godeps -_tmpdir="$(mktemp -d -t gopath.XXXXXX)" -KEEP_TMP=false +if [[ -z ${TMP_GOPATH:-} ]]; then + # Create a nice clean place to put our new godeps + _tmpdir="$(mktemp -d -t gopath.XXXXXX)" +else + # reuse what we might have saved previously + _tmpdir="${TMP_GOPATH}" +fi + +if [[ -z ${KEEP_TMP:-} ]]; then + KEEP_TMP=false +fi function cleanup { if [ "${KEEP_TMP}" == "true" ]; then echo "Leaving ${_tmpdir} for you to examine or copy. Please delete it manually when finished. (rm -rf ${_tmpdir})" diff --git a/vendor/k8s.io/kubernetes/hack/verify-golint.sh b/vendor/k8s.io/kubernetes/hack/verify-golint.sh index 74242ac3..b8c575b9 100755 --- a/vendor/k8s.io/kubernetes/hack/verify-golint.sh +++ b/vendor/k8s.io/kubernetes/hack/verify-golint.sh @@ -55,7 +55,7 @@ export IFS=$'\n' # as the prefix, however if we run it outside it returns the full path of the file # with a leading underscore. We'll need to support both scenarios for all_packages. all_packages=( - $(go list -e ./... | egrep -v "/(third_party|vendor|staging|generated|clientset_generated)" | sed -e 's|^k8s.io/kubernetes/||' -e "s|^_${KUBE_ROOT}/\?||") + $(go list -e ./... | egrep -v "/(third_party|vendor|staging/src/k8s.io/client-go/pkg|generated|clientset_generated)" | sed -e 's|^k8s.io/kubernetes/||' -e "s|^_${KUBE_ROOT}/\?||") ) linted_packages=( $(cat $linted_file) @@ -76,6 +76,12 @@ for p in "${all_packages[@]}"; do fi done +# Check that all linted_packages actually still exist +gone=() +for p in "${linted_packages[@]}"; do + array_contains "$p" "${all_packages[@]}" || gone+=( "$p" ) +done + # Check to be sure all the packages that should pass lint are. if [ ${#errors[@]} -eq 0 ]; then echo 'Congratulations! All Go source files have been linted.' @@ -94,18 +100,29 @@ fi # check to make sure all packages that pass lint are in the linted file. echo -if [ ${#linted[@]} -eq 0 ]; then +if [ ${#linted[@]} -eq 0 -a ${#gone[@]} -eq 0 ]; then echo 'Success! All packages that should pass lint are listed in the linted file.' else { - echo "Some packages passed golint but are not listed in hack/.linted_packages." - echo "Please add them in alphabetical order:" - echo - for p in "${linted[@]}"; do - echo " echo $p >> hack/.linted_packages" - done - echo " LC_ALL=C sort -o hack/.linted_packages hack/.linted_packages" - echo + if [ ${#gone[@]} -gt 0 ]; then + echo "Some packages in hack/.linted_packages do not exist anymore. Please remove them" + echo "from hack/.linted_packages:" + echo + for p in "${gone[@]}"; do + echo " $p" + done + echo + fi + if [ ${#linted[@]} -gt 0 ]; then + echo "Some packages passed golint but are not listed in hack/.linted_packages." + echo "Please add them in alphabetical order:" + echo + for p in "${linted[@]}"; do + echo " echo $p >> hack/.linted_packages" + done + echo " LC_ALL=C sort -o hack/.linted_packages hack/.linted_packages" + echo + fi echo 'You can test via this script and commit the result.' echo } >&2 diff --git a/vendor/k8s.io/kubernetes/hack/verify-staging-imports.sh b/vendor/k8s.io/kubernetes/hack/verify-staging-imports.sh index 56944b40..d8f07389 100755 --- a/vendor/k8s.io/kubernetes/hack/verify-staging-imports.sh +++ b/vendor/k8s.io/kubernetes/hack/verify-staging-imports.sh @@ -25,10 +25,15 @@ kube::golang::setup_env for dep in $(ls -1 ${KUBE_ROOT}/staging/src/k8s.io/); do - if go list -f {{.Deps}} ./vendor/k8s.io/${dep}/... | sed 's/ /\n/g' - | grep k8s.io/kubernetes | grep -v 'k8s.io/kubernetes/vendor' | LC_ALL=C sort -u | grep -e "."; then + if go list -f {{.Deps}} ./vendor/k8s.io/${dep}/... | tr " " '\n' | grep k8s.io/kubernetes | grep -v 'k8s.io/kubernetes/vendor' | LC_ALL=C sort -u | grep -e "."; then echo "${dep} has a cyclical dependency" exit 1 fi done +if grep -rq '// import "k8s.io/kubernetes/' 'staging/'; then + echo 'file has "// import "k8s.io/kubernetes/"' + exit 1 +fi + exit 0 \ No newline at end of file diff --git a/vendor/k8s.io/kubernetes/logo/OWNERS b/vendor/k8s.io/kubernetes/logo/OWNERS index d22a1891..82fc53c3 100644 --- a/vendor/k8s.io/kubernetes/logo/OWNERS +++ b/vendor/k8s.io/kubernetes/logo/OWNERS @@ -1,2 +1,4 @@ -assignees: +reviewers: + - thockin +approvers: - thockin diff --git a/vendor/k8s.io/kubernetes/pkg/BUILD b/vendor/k8s.io/kubernetes/pkg/BUILD index d9137605..11d20c8c 100644 --- a/vendor/k8s.io/kubernetes/pkg/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/BUILD @@ -13,9 +13,8 @@ filegroup( name = "all-srcs", srcs = [ ":package-srcs", - "//pkg/admission:all-srcs", "//pkg/api:all-srcs", - "//pkg/apimachinery:all-srcs", + "//pkg/apimachinery/tests:all-srcs", "//pkg/apis/abac:all-srcs", "//pkg/apis/apps:all-srcs", "//pkg/apis/authentication:all-srcs", @@ -31,7 +30,6 @@ filegroup( "//pkg/apis/rbac:all-srcs", "//pkg/apis/storage:all-srcs", "//pkg/auth/authorizer/abac:all-srcs", - "//pkg/auth/handlers:all-srcs", "//pkg/auth/user:all-srcs", "//pkg/capabilities:all-srcs", "//pkg/client/cache:all-srcs", @@ -41,6 +39,7 @@ filegroup( "//pkg/client/conditions:all-srcs", "//pkg/client/informers/informers_generated:all-srcs", "//pkg/client/leaderelection:all-srcs", + "//pkg/client/legacylisters:all-srcs", "//pkg/client/listers/apps/internalversion:all-srcs", "//pkg/client/listers/apps/v1beta1:all-srcs", "//pkg/client/listers/authentication/internalversion:all-srcs", @@ -53,7 +52,7 @@ filegroup( "//pkg/client/listers/batch/v1:all-srcs", "//pkg/client/listers/batch/v2alpha1:all-srcs", "//pkg/client/listers/certificates/internalversion:all-srcs", - "//pkg/client/listers/certificates/v1alpha1:all-srcs", + "//pkg/client/listers/certificates/v1beta1:all-srcs", "//pkg/client/listers/core/internalversion:all-srcs", "//pkg/client/listers/core/v1:all-srcs", "//pkg/client/listers/extensions/internalversion:all-srcs", @@ -65,16 +64,16 @@ filegroup( "//pkg/client/listers/policy/v1beta1:all-srcs", "//pkg/client/listers/rbac/internalversion:all-srcs", "//pkg/client/listers/rbac/v1alpha1:all-srcs", + "//pkg/client/listers/rbac/v1beta1:all-srcs", "//pkg/client/listers/storage/internalversion:all-srcs", "//pkg/client/listers/storage/v1beta1:all-srcs", "//pkg/client/metrics:all-srcs", "//pkg/client/record:all-srcs", - "//pkg/client/restclient:all-srcs", + "//pkg/client/restclient/fake:all-srcs", "//pkg/client/retry:all-srcs", "//pkg/client/testdata:all-srcs", "//pkg/client/testing/cache:all-srcs", "//pkg/client/testing/core:all-srcs", - "//pkg/client/transport:all-srcs", "//pkg/client/typed/discovery:all-srcs", "//pkg/client/typed/dynamic:all-srcs", "//pkg/client/unversioned:all-srcs", @@ -102,7 +101,6 @@ filegroup( "//pkg/runtime:all-srcs", "//pkg/security:all-srcs", "//pkg/securitycontext:all-srcs", - "//pkg/selection:all-srcs", "//pkg/serviceaccount:all-srcs", "//pkg/ssh:all-srcs", "//pkg/storage:all-srcs", diff --git a/vendor/k8s.io/kubernetes/pkg/OWNERS b/vendor/k8s.io/kubernetes/pkg/OWNERS index c79bb80f..1b48f841 100644 --- a/vendor/k8s.io/kubernetes/pkg/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/OWNERS @@ -1,4 +1,10 @@ -assignees: +reviewers: + - brendandburns + - dchen1107 + - lavalamp + - smarterclayton + - thockin +approvers: - brendandburns - dchen1107 - lavalamp diff --git a/vendor/k8s.io/kubernetes/pkg/admission/BUILD b/vendor/k8s.io/kubernetes/pkg/admission/BUILD deleted file mode 100644 index 65b296da..00000000 --- a/vendor/k8s.io/kubernetes/pkg/admission/BUILD +++ /dev/null @@ -1,66 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = [ - "attributes.go", - "chain.go", - "config.go", - "errors.go", - "handler.go", - "interfaces.go", - "plugins.go", - ], - tags = ["automanaged"], - deps = [ - "//pkg/api:go_default_library", - "//pkg/apis/componentconfig:go_default_library", - "//pkg/apis/componentconfig/v1alpha1:go_default_library", - "//pkg/util/sets:go_default_library", - "//vendor:github.com/ghodss/yaml", - "//vendor:github.com/golang/glog", - "//vendor:k8s.io/apimachinery/pkg/api/errors", - "//vendor:k8s.io/apimachinery/pkg/api/meta", - "//vendor:k8s.io/apimachinery/pkg/runtime", - "//vendor:k8s.io/apimachinery/pkg/runtime/schema", - "//vendor:k8s.io/apimachinery/pkg/util/errors", - "//vendor:k8s.io/apimachinery/pkg/util/sets", - "//vendor:k8s.io/apiserver/pkg/authentication/user", - ], -) - -go_test( - name = "go_default_test", - srcs = [ - "chain_test.go", - "config_test.go", - ], - library = ":go_default_library", - tags = ["automanaged"], - deps = [ - "//pkg/apis/componentconfig:go_default_library", - "//pkg/apis/componentconfig/install:go_default_library", - "//vendor:k8s.io/apimachinery/pkg/runtime/schema", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/vendor/k8s.io/kubernetes/pkg/api/BUILD b/vendor/k8s.io/kubernetes/pkg/api/BUILD index 85ee59f3..24919406 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/api/BUILD @@ -16,7 +16,7 @@ go_library( "doc.go", "field_constants.go", "helpers.go", - "mapper.go", + "json.go", "meta.go", "ref.go", "register.go", @@ -27,14 +27,15 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/api/resource:go_default_library", - "//pkg/fields:go_default_library", "//pkg/util/intstr:go_default_library", "//pkg/util/labels:go_default_library", "//vendor:github.com/davecgh/go-spew/spew", "//vendor:k8s.io/apimachinery/pkg/api/meta", + "//vendor:k8s.io/apimachinery/pkg/apimachinery/announced", "//vendor:k8s.io/apimachinery/pkg/apimachinery/registered", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/conversion", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", @@ -42,7 +43,6 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/selection", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/sets", - "//vendor:k8s.io/apimachinery/pkg/util/validation/field", ], ) @@ -74,6 +74,7 @@ go_test( "meta_test.go", "serialization_proto_test.go", "serialization_test.go", + "unstructured_test.go", ], tags = ["automanaged"], deps = [ @@ -99,6 +100,7 @@ go_test( "//vendor:k8s.io/apimachinery/pkg/runtime/serializer/streaming", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/diff", + "//vendor:k8s.io/apimachinery/pkg/util/json", "//vendor:k8s.io/apimachinery/pkg/util/sets", "//vendor:k8s.io/apimachinery/pkg/watch", ], diff --git a/vendor/k8s.io/kubernetes/pkg/api/OWNERS b/vendor/k8s.io/kubernetes/pkg/api/OWNERS index 569ba5b5..3a9b0c6d 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/api/OWNERS @@ -1,5 +1,4 @@ approvers: -- bgrant0607 - erictune - lavalamp - smarterclayton @@ -9,7 +8,6 @@ reviewers: - lavalamp - smarterclayton - wojtek-t -- bgrant0607 - deads2k - yujuhong - brendandburns diff --git a/vendor/k8s.io/kubernetes/pkg/api/conversion.go b/vendor/k8s.io/kubernetes/pkg/api/conversion.go index c62f5ede..42081357 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/conversion.go +++ b/vendor/k8s.io/kubernetes/pkg/api/conversion.go @@ -18,14 +18,15 @@ package api import ( "fmt" + "strconv" + "strings" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/conversion" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/util/validation/field" "k8s.io/kubernetes/pkg/api/resource" - "k8s.io/kubernetes/pkg/fields" "k8s.io/kubernetes/pkg/util/intstr" utillabels "k8s.io/kubernetes/pkg/util/labels" ) @@ -67,6 +68,8 @@ func addConversionFuncs(scheme *runtime.Scheme) error { Convert_map_to_unversioned_LabelSelector, Convert_unversioned_LabelSelector_to_map, + + Convert_Slice_string_To_Slice_int32, ) } @@ -243,8 +246,21 @@ func Convert_map_to_unversioned_LabelSelector(in *map[string]string, out *metav1 func Convert_unversioned_LabelSelector_to_map(in *metav1.LabelSelector, out *map[string]string, s conversion.Scope) error { var err error *out, err = metav1.LabelSelectorAsMap(in) - if err != nil { - err = field.Invalid(field.NewPath("labelSelector"), *in, fmt.Sprintf("cannot convert to old selector: %v", err)) - } return err } + +// Convert_Slice_string_To_Slice_int32 converts multiple query parameters or +// a single query parameter with a comma delimited value to multiple int32. +// This is used for port forwarding which needs the ports as int32. +func Convert_Slice_string_To_Slice_int32(in *[]string, out *[]int32, s conversion.Scope) error { + for _, s := range *in { + for _, v := range strings.Split(s, ",") { + x, err := strconv.ParseUint(v, 10, 16) + if err != nil { + return fmt.Errorf("cannot convert to []int32: %v", err) + } + *out = append(*out, int32(x)) + } + } + return nil +} diff --git a/vendor/k8s.io/kubernetes/pkg/api/deep_copy_test.go b/vendor/k8s.io/kubernetes/pkg/api/deep_copy_test.go index 514e667f..b1a0e002 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/deep_copy_test.go +++ b/vendor/k8s.io/kubernetes/pkg/api/deep_copy_test.go @@ -41,7 +41,7 @@ var benchmarkPod api.Pod = api.Pod{ Kind: "Pod", APIVersion: "v1", }, - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "etcd-server-e2e-test-wojtekt-master", Namespace: "default", SelfLink: "/api/v1/namespaces/default/pods/etcd-server-e2e-test-wojtekt-master", diff --git a/vendor/k8s.io/kubernetes/pkg/api/defaulting_test.go b/vendor/k8s.io/kubernetes/pkg/api/defaulting_test.go index d5e61c01..65d576e9 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/defaulting_test.go +++ b/vendor/k8s.io/kubernetes/pkg/api/defaulting_test.go @@ -54,49 +54,49 @@ func TestVerifyDefaulting(t *testing.T) { func TestDefaulting(t *testing.T) { // these are the known types with defaulters - you must add to this list if you add a top level defaulter typesWithDefaulting := map[schema.GroupVersionKind]struct{}{ - {Group: "", Version: "v1", Kind: "ConfigMap"}: {}, - {Group: "", Version: "v1", Kind: "ConfigMapList"}: {}, - {Group: "", Version: "v1", Kind: "Endpoints"}: {}, - {Group: "", Version: "v1", Kind: "EndpointsList"}: {}, - {Group: "", Version: "v1", Kind: "Namespace"}: {}, - {Group: "", Version: "v1", Kind: "NamespaceList"}: {}, - {Group: "", Version: "v1", Kind: "Node"}: {}, - {Group: "", Version: "v1", Kind: "NodeList"}: {}, - {Group: "", Version: "v1", Kind: "PersistentVolume"}: {}, - {Group: "", Version: "v1", Kind: "PersistentVolumeList"}: {}, - {Group: "", Version: "v1", Kind: "PersistentVolumeClaim"}: {}, - {Group: "", Version: "v1", Kind: "PersistentVolumeClaimList"}: {}, - {Group: "", Version: "v1", Kind: "PodAttachOptions"}: {}, - {Group: "", Version: "v1", Kind: "PodExecOptions"}: {}, - {Group: "", Version: "v1", Kind: "Pod"}: {}, - {Group: "", Version: "v1", Kind: "PodList"}: {}, - {Group: "", Version: "v1", Kind: "PodTemplate"}: {}, - {Group: "", Version: "v1", Kind: "PodTemplateList"}: {}, - {Group: "", Version: "v1", Kind: "ReplicationController"}: {}, - {Group: "", Version: "v1", Kind: "ReplicationControllerList"}: {}, - {Group: "", Version: "v1", Kind: "Secret"}: {}, - {Group: "", Version: "v1", Kind: "SecretList"}: {}, - {Group: "", Version: "v1", Kind: "Service"}: {}, - {Group: "", Version: "v1", Kind: "ServiceList"}: {}, - {Group: "apps", Version: "v1beta1", Kind: "StatefulSet"}: {}, - {Group: "apps", Version: "v1beta1", Kind: "StatefulSetList"}: {}, - {Group: "autoscaling", Version: "v1", Kind: "HorizontalPodAutoscaler"}: {}, - {Group: "autoscaling", Version: "v1", Kind: "HorizontalPodAutoscalerList"}: {}, - {Group: "batch", Version: "v1", Kind: "Job"}: {}, - {Group: "batch", Version: "v1", Kind: "JobList"}: {}, - {Group: "batch", Version: "v2alpha1", Kind: "CronJob"}: {}, - {Group: "batch", Version: "v2alpha1", Kind: "CronJobList"}: {}, - {Group: "batch", Version: "v2alpha1", Kind: "Job"}: {}, - {Group: "batch", Version: "v2alpha1", Kind: "JobList"}: {}, - {Group: "batch", Version: "v2alpha1", Kind: "JobTemplate"}: {}, - {Group: "batch", Version: "v2alpha1", Kind: "ScheduledJob"}: {}, - {Group: "batch", Version: "v2alpha1", Kind: "ScheduledJobList"}: {}, - {Group: "certificates.k8s.io", Version: "v1alpha1", Kind: "CertificateSigningRequest"}: {}, - {Group: "certificates.k8s.io", Version: "v1alpha1", Kind: "CertificateSigningRequestList"}: {}, - {Group: "componentconfig", Version: "v1alpha1", Kind: "KubeProxyConfiguration"}: {}, - {Group: "componentconfig", Version: "v1alpha1", Kind: "KubeSchedulerConfiguration"}: {}, - {Group: "componentconfig", Version: "v1alpha1", Kind: "KubeletConfiguration"}: {}, - {Group: "kubeadm.k8s.io", Version: "v1alpha1", Kind: "MasterConfiguration"}: {}, + {Group: "", Version: "v1", Kind: "ConfigMap"}: {}, + {Group: "", Version: "v1", Kind: "ConfigMapList"}: {}, + {Group: "", Version: "v1", Kind: "Endpoints"}: {}, + {Group: "", Version: "v1", Kind: "EndpointsList"}: {}, + {Group: "", Version: "v1", Kind: "Namespace"}: {}, + {Group: "", Version: "v1", Kind: "NamespaceList"}: {}, + {Group: "", Version: "v1", Kind: "Node"}: {}, + {Group: "", Version: "v1", Kind: "NodeList"}: {}, + {Group: "", Version: "v1", Kind: "PersistentVolume"}: {}, + {Group: "", Version: "v1", Kind: "PersistentVolumeList"}: {}, + {Group: "", Version: "v1", Kind: "PersistentVolumeClaim"}: {}, + {Group: "", Version: "v1", Kind: "PersistentVolumeClaimList"}: {}, + {Group: "", Version: "v1", Kind: "PodAttachOptions"}: {}, + {Group: "", Version: "v1", Kind: "PodExecOptions"}: {}, + {Group: "", Version: "v1", Kind: "Pod"}: {}, + {Group: "", Version: "v1", Kind: "PodList"}: {}, + {Group: "", Version: "v1", Kind: "PodTemplate"}: {}, + {Group: "", Version: "v1", Kind: "PodTemplateList"}: {}, + {Group: "", Version: "v1", Kind: "ReplicationController"}: {}, + {Group: "", Version: "v1", Kind: "ReplicationControllerList"}: {}, + {Group: "", Version: "v1", Kind: "Secret"}: {}, + {Group: "", Version: "v1", Kind: "SecretList"}: {}, + {Group: "", Version: "v1", Kind: "Service"}: {}, + {Group: "", Version: "v1", Kind: "ServiceList"}: {}, + {Group: "apps", Version: "v1beta1", Kind: "StatefulSet"}: {}, + {Group: "apps", Version: "v1beta1", Kind: "StatefulSetList"}: {}, + {Group: "autoscaling", Version: "v1", Kind: "HorizontalPodAutoscaler"}: {}, + {Group: "autoscaling", Version: "v1", Kind: "HorizontalPodAutoscalerList"}: {}, + {Group: "batch", Version: "v1", Kind: "Job"}: {}, + {Group: "batch", Version: "v1", Kind: "JobList"}: {}, + {Group: "batch", Version: "v2alpha1", Kind: "CronJob"}: {}, + {Group: "batch", Version: "v2alpha1", Kind: "CronJobList"}: {}, + {Group: "batch", Version: "v2alpha1", Kind: "Job"}: {}, + {Group: "batch", Version: "v2alpha1", Kind: "JobList"}: {}, + {Group: "batch", Version: "v2alpha1", Kind: "JobTemplate"}: {}, + {Group: "batch", Version: "v2alpha1", Kind: "ScheduledJob"}: {}, + {Group: "batch", Version: "v2alpha1", Kind: "ScheduledJobList"}: {}, + {Group: "certificates.k8s.io", Version: "v1beta1", Kind: "CertificateSigningRequest"}: {}, + {Group: "certificates.k8s.io", Version: "v1beta1", Kind: "CertificateSigningRequestList"}: {}, + {Group: "componentconfig", Version: "v1alpha1", Kind: "KubeProxyConfiguration"}: {}, + {Group: "componentconfig", Version: "v1alpha1", Kind: "KubeSchedulerConfiguration"}: {}, + {Group: "componentconfig", Version: "v1alpha1", Kind: "KubeletConfiguration"}: {}, + {Group: "kubeadm.k8s.io", Version: "v1alpha1", Kind: "MasterConfiguration"}: {}, // This object contains only int fields which currently breaks the defaulting test because // it's pretty stupid. Once we add non integer fields, we should uncomment this. // {Group: "kubeadm.k8s.io", Version: "v1alpha1", Kind: "NodeConfiguration"}: {}, @@ -112,6 +112,10 @@ func TestDefaulting(t *testing.T) { {Group: "rbac.authorization.k8s.io", Version: "v1alpha1", Kind: "ClusterRoleBindingList"}: {}, {Group: "rbac.authorization.k8s.io", Version: "v1alpha1", Kind: "RoleBinding"}: {}, {Group: "rbac.authorization.k8s.io", Version: "v1alpha1", Kind: "RoleBindingList"}: {}, + {Group: "rbac.authorization.k8s.io", Version: "v1beta1", Kind: "ClusterRoleBinding"}: {}, + {Group: "rbac.authorization.k8s.io", Version: "v1beta1", Kind: "ClusterRoleBindingList"}: {}, + {Group: "rbac.authorization.k8s.io", Version: "v1beta1", Kind: "RoleBinding"}: {}, + {Group: "rbac.authorization.k8s.io", Version: "v1beta1", Kind: "RoleBindingList"}: {}, } f := fuzz.New().NilChance(.5).NumElements(1, 1).RandSource(rand.NewSource(1)) diff --git a/vendor/k8s.io/kubernetes/pkg/api/defaults.go b/vendor/k8s.io/kubernetes/pkg/api/defaults.go index 1d9ad8f9..baa49a8d 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/defaults.go +++ b/vendor/k8s.io/kubernetes/pkg/api/defaults.go @@ -17,9 +17,9 @@ limitations under the License. package api import ( + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" - "k8s.io/kubernetes/pkg/fields" ) func addDefaultingFuncs(scheme *runtime.Scheme) error { diff --git a/vendor/k8s.io/kubernetes/pkg/api/errors/storage/storage.go b/vendor/k8s.io/kubernetes/pkg/api/errors/storage/storage.go index 2ec787e2..7dd1bcd8 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/errors/storage/storage.go +++ b/vendor/k8s.io/kubernetes/pkg/api/errors/storage/storage.go @@ -65,7 +65,7 @@ func InterpretCreateError(err error, qualifiedResource schema.GroupResource, nam // operation into the appropriate API error. func InterpretUpdateError(err error, qualifiedResource schema.GroupResource, name string) error { switch { - case storage.IsTestFailed(err), storage.IsNodeExist(err), storage.IsInvalidObj(err): + case storage.IsConflict(err), storage.IsNodeExist(err), storage.IsInvalidObj(err): return errors.NewConflict(qualifiedResource, name, err) case storage.IsUnreachable(err): return errors.NewServerTimeout(qualifiedResource, "update", 2) // TODO: make configurable or handled at a higher level @@ -86,7 +86,7 @@ func InterpretDeleteError(err error, qualifiedResource schema.GroupResource, nam return errors.NewNotFound(qualifiedResource, name) case storage.IsUnreachable(err): return errors.NewServerTimeout(qualifiedResource, "delete", 2) // TODO: make configurable or handled at a higher level - case storage.IsTestFailed(err), storage.IsNodeExist(err), storage.IsInvalidObj(err): + case storage.IsConflict(err), storage.IsNodeExist(err), storage.IsInvalidObj(err): return errors.NewConflict(qualifiedResource, name, err) case storage.IsInternalError(err): return errors.NewInternalError(err) diff --git a/vendor/k8s.io/kubernetes/pkg/api/helpers.go b/vendor/k8s.io/kubernetes/pkg/api/helpers.go index 775866ce..7dcf93ba 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/helpers.go +++ b/vendor/k8s.io/kubernetes/pkg/api/helpers.go @@ -18,23 +18,21 @@ package api import ( "crypto/md5" - "encoding/json" "fmt" "reflect" "strings" "time" + "github.com/davecgh/go-spew/spew" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/conversion" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/selection" - "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/kubernetes/pkg/api/resource" - "k8s.io/kubernetes/pkg/fields" - - "github.com/davecgh/go-spew/spew" ) // Conversion error conveniently packages up errors in conversions. @@ -51,6 +49,23 @@ func (c *ConversionError) Error() string { ) } +const ( + // annotation key prefix used to identify non-convertible json paths. + NonConvertibleAnnotationPrefix = "non-convertible.kubernetes.io" +) + +// NonConvertibleFields iterates over the provided map and filters out all but +// any keys with the "non-convertible.kubernetes.io" prefix. +func NonConvertibleFields(annotations map[string]string) map[string]string { + nonConvertibleKeys := map[string]string{} + for key, value := range annotations { + if strings.HasPrefix(key, NonConvertibleAnnotationPrefix) { + nonConvertibleKeys[key] = value + } + } + return nonConvertibleKeys +} + // Semantic can do semantic deep equality checks for api objects. // Example: api.Semantic.DeepEqual(aPod, aPodWithNonNilButEmptyMaps) == true var Semantic = conversion.EqualitiesOrDie( @@ -212,27 +227,6 @@ func IsIntegerResourceName(str string) bool { return integerResources.Has(str) || IsOpaqueIntResourceName(ResourceName(str)) } -// NewDeleteOptions returns a DeleteOptions indicating the resource should -// be deleted within the specified grace period. Use zero to indicate -// immediate deletion. If you would prefer to use the default grace period, -// use &api.DeleteOptions{} directly. -func NewDeleteOptions(grace int64) *DeleteOptions { - return &DeleteOptions{GracePeriodSeconds: &grace} -} - -// NewPreconditionDeleteOptions returns a DeleteOptions with a UID precondition set. -func NewPreconditionDeleteOptions(uid string) *DeleteOptions { - u := types.UID(uid) - p := Preconditions{UID: &u} - return &DeleteOptions{Preconditions: &p} -} - -// NewUIDPreconditions returns a Preconditions with UID set. -func NewUIDPreconditions(uid string) *Preconditions { - u := types.UID(uid) - return &Preconditions{UID: &u} -} - // this function aims to check if the service's ClusterIP is set or not // the objective is not to perform validation here func IsServiceIPSet(service *Service) bool { @@ -271,14 +265,6 @@ func IsStandardFinalizerName(str string) bool { return standardFinalizers.Has(str) } -// SingleObject returns a ListOptions for watching a single object. -func SingleObject(meta ObjectMeta) ListOptions { - return ListOptions{ - FieldSelector: fields.OneTermEqualSelector("metadata.name", meta.Name), - ResourceVersion: meta.ResourceVersion, - } -} - // AddToNodeAddresses appends the NodeAddresses to the passed-by-pointer slice, // only if they do not already exist func AddToNodeAddresses(addresses *[]NodeAddress, addAddresses ...NodeAddress) { @@ -486,32 +472,6 @@ const ( UnsafeSysctlsPodAnnotationKey string = "security.alpha.kubernetes.io/unsafe-sysctls" ) -// GetTolerationsFromPodAnnotations gets the json serialized tolerations data from Pod.Annotations -// and converts it to the []Toleration type in api. -func GetTolerationsFromPodAnnotations(annotations map[string]string) ([]Toleration, error) { - var tolerations []Toleration - if len(annotations) > 0 && annotations[TolerationsAnnotationKey] != "" { - err := json.Unmarshal([]byte(annotations[TolerationsAnnotationKey]), &tolerations) - if err != nil { - return tolerations, err - } - } - return tolerations, nil -} - -// GetTaintsFromNodeAnnotations gets the json serialized taints data from Pod.Annotations -// and converts it to the []Taint type in api. -func GetTaintsFromNodeAnnotations(annotations map[string]string) ([]Taint, error) { - var taints []Taint - if len(annotations) > 0 && annotations[TaintsAnnotationKey] != "" { - err := json.Unmarshal([]byte(annotations[TaintsAnnotationKey]), &taints) - if err != nil { - return []Taint{}, err - } - } - return taints, nil -} - // TolerationToleratesTaint checks if the toleration tolerates the taint. func TolerationToleratesTaint(toleration *Toleration, taint *Taint) bool { if len(toleration.Effect) != 0 && toleration.Effect != taint.Effect { @@ -557,17 +517,6 @@ func (t *Taint) ToString() string { return fmt.Sprintf("%v=%v:%v", t.Key, t.Value, t.Effect) } -func GetAvoidPodsFromNodeAnnotations(annotations map[string]string) (AvoidPods, error) { - var avoidPods AvoidPods - if len(annotations) > 0 && annotations[PreferAvoidPodsAnnotationKey] != "" { - err := json.Unmarshal([]byte(annotations[PreferAvoidPodsAnnotationKey]), &avoidPods) - if err != nil { - return avoidPods, err - } - } - return avoidPods, nil -} - // SysctlsFromPodAnnotations parses the sysctl annotations into a slice of safe Sysctls // and a slice of unsafe Sysctls. This is only a convenience wrapper around // SysctlsFromPodAnnotation. diff --git a/vendor/k8s.io/kubernetes/pkg/api/helpers_test.go b/vendor/k8s.io/kubernetes/pkg/api/helpers_test.go index 68a97770..bb19f933 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/helpers_test.go +++ b/vendor/k8s.io/kubernetes/pkg/api/helpers_test.go @@ -21,7 +21,6 @@ import ( "strings" "testing" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/kubernetes/pkg/api/resource" ) @@ -342,102 +341,6 @@ func TestMatchTaint(t *testing.T) { } } -func TestGetAvoidPodsFromNode(t *testing.T) { - controllerFlag := true - testCases := []struct { - node *Node - expectValue AvoidPods - expectErr bool - }{ - { - node: &Node{}, - expectValue: AvoidPods{}, - expectErr: false, - }, - { - node: &Node{ - ObjectMeta: ObjectMeta{ - Annotations: map[string]string{ - PreferAvoidPodsAnnotationKey: ` - { - "preferAvoidPods": [ - { - "podSignature": { - "podController": { - "apiVersion": "v1", - "kind": "ReplicationController", - "name": "foo", - "uid": "abcdef123456", - "controller": true - } - }, - "reason": "some reason", - "message": "some message" - } - ] - }`, - }, - }, - }, - expectValue: AvoidPods{ - PreferAvoidPods: []PreferAvoidPodsEntry{ - { - PodSignature: PodSignature{ - PodController: &metav1.OwnerReference{ - APIVersion: "v1", - Kind: "ReplicationController", - Name: "foo", - UID: "abcdef123456", - Controller: &controllerFlag, - }, - }, - Reason: "some reason", - Message: "some message", - }, - }, - }, - expectErr: false, - }, - { - node: &Node{ - // Missing end symbol of "podController" and "podSignature" - ObjectMeta: ObjectMeta{ - Annotations: map[string]string{ - PreferAvoidPodsAnnotationKey: ` - { - "preferAvoidPods": [ - { - "podSignature": { - "podController": { - "kind": "ReplicationController", - "apiVersion": "v1" - "reason": "some reason", - "message": "some message" - } - ] - }`, - }, - }, - }, - expectValue: AvoidPods{}, - expectErr: true, - }, - } - - for i, tc := range testCases { - v, err := GetAvoidPodsFromNodeAnnotations(tc.node.Annotations) - if err == nil && tc.expectErr { - t.Errorf("[%v]expected error but got none.", i) - } - if err != nil && !tc.expectErr { - t.Errorf("[%v]did not expect error but got: %v", i, err) - } - if !reflect.DeepEqual(tc.expectValue, v) { - t.Errorf("[%v]expect value %v but got %v with %v", i, tc.expectValue, v, v.PreferAvoidPods[0].PodSignature.PodController.Controller) - } - } -} - func TestSysctlsFromPodAnnotation(t *testing.T) { type Test struct { annotation string diff --git a/vendor/k8s.io/kubernetes/pkg/api/install/install.go b/vendor/k8s.io/kubernetes/pkg/api/install/install.go index 9fcaa1b9..ed729a42 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/install/install.go +++ b/vendor/k8s.io/kubernetes/pkg/api/install/install.go @@ -102,6 +102,7 @@ func newRESTMapper(externalVersions []schema.GroupVersion) meta.RESTMapper { "PodLogOptions", "PodExecOptions", "PodAttachOptions", + "PodPortForwardOptions", "PodProxyOptions", "NodeProxyOptions", "ServiceProxyOptions", @@ -109,7 +110,7 @@ func newRESTMapper(externalVersions []schema.GroupVersion) meta.RESTMapper { "ThirdPartyResourceData", "ThirdPartyResourceList") - mapper := api.NewDefaultRESTMapper(externalVersions, interfacesFor, importPrefix, ignoredKinds, rootScoped) + mapper := meta.NewDefaultRESTMapperFromScheme(externalVersions, interfacesFor, importPrefix, ignoredKinds, rootScoped, api.Scheme) return mapper } diff --git a/vendor/k8s.io/kubernetes/pkg/api/install/install_test.go b/vendor/k8s.io/kubernetes/pkg/api/install/install_test.go index 582d97bf..9ede3ca1 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/install/install_test.go +++ b/vendor/k8s.io/kubernetes/pkg/api/install/install_test.go @@ -28,7 +28,7 @@ import ( ) func TestResourceVersioner(t *testing.T) { - pod := internal.Pod{ObjectMeta: internal.ObjectMeta{ResourceVersion: "10"}} + pod := internal.Pod{ObjectMeta: metav1.ObjectMeta{ResourceVersion: "10"}} version, err := accessor.ResourceVersion(&pod) if err != nil { t.Fatalf("unexpected error: %v", err) @@ -106,7 +106,7 @@ func TestRESTMapper(t *testing.T) { t.Errorf("unexpected: %#v, expected: %#v", mapping, interfaces) } - rc := &internal.ReplicationController{ObjectMeta: internal.ObjectMeta{Name: "foo"}} + rc := &internal.ReplicationController{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} name, err := mapping.MetadataAccessor.Name(rc) if err != nil { t.Errorf("unexpected error: %v", err) diff --git a/vendor/k8s.io/kubernetes/pkg/api/json.go b/vendor/k8s.io/kubernetes/pkg/api/json.go new file mode 100644 index 00000000..fbc7444e --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/api/json.go @@ -0,0 +1,40 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package api + +import "encoding/json" + +// This file implements json marshaling/unmarshaling interfaces on objects that are currently marshaled into annotations +// to prevent anyone from marshaling these internal structs. + +var _ = json.Marshaler(Taint{}) +var _ = json.Unmarshaler(&Taint{}) + +func (Taint) MarshalJSON() ([]byte, error) { panic("do not marshal internal struct") } +func (*Taint) UnmarshalJSON([]byte) error { panic("do not unmarshal to internal struct") } + +var _ = json.Marshaler(Toleration{}) +var _ = json.Unmarshaler(&Toleration{}) + +func (Toleration) MarshalJSON() ([]byte, error) { panic("do not marshal internal struct") } +func (*Toleration) UnmarshalJSON([]byte) error { panic("do not unmarshal to internal struct") } + +var _ = json.Marshaler(&AvoidPods{}) +var _ = json.Unmarshaler(&AvoidPods{}) + +func (AvoidPods) MarshalJSON() ([]byte, error) { panic("do not marshal internal struct") } +func (*AvoidPods) UnmarshalJSON([]byte) error { panic("do not unmarshal to internal struct") } diff --git a/vendor/k8s.io/kubernetes/pkg/api/meta.go b/vendor/k8s.io/kubernetes/pkg/api/meta.go index 7ad2e1d3..3df6a2e7 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/meta.go +++ b/vendor/k8s.io/kubernetes/pkg/api/meta.go @@ -17,109 +17,11 @@ limitations under the License. package api import ( - "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/conversion" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/types" ) // HasObjectMetaSystemFieldValues returns true if fields that are managed by the system on ObjectMeta have values. -func HasObjectMetaSystemFieldValues(meta *ObjectMeta) bool { +func HasObjectMetaSystemFieldValues(meta *metav1.ObjectMeta) bool { return !meta.CreationTimestamp.Time.IsZero() || len(meta.UID) != 0 } - -// ObjectMetaFor returns a pointer to a provided object's ObjectMeta. -// TODO: allow runtime.Unknown to extract this object -// TODO: Remove this function and use meta.Accessor() instead. -func ObjectMetaFor(obj runtime.Object) (*ObjectMeta, error) { - v, err := conversion.EnforcePtr(obj) - if err != nil { - return nil, err - } - var meta *ObjectMeta - err = runtime.FieldPtr(v, "ObjectMeta", &meta) - return meta, err -} - -// ListMetaFor returns a pointer to a provided object's ListMeta, -// or an error if the object does not have that pointer. -// TODO: allow runtime.Unknown to extract this object -func ListMetaFor(obj runtime.Object) (*metav1.ListMeta, error) { - v, err := conversion.EnforcePtr(obj) - if err != nil { - return nil, err - } - var meta *metav1.ListMeta - err = runtime.FieldPtr(v, "ListMeta", &meta) - return meta, err -} - -func (obj *ObjectMeta) GetObjectMeta() meta.Object { return obj } - -// Namespace implements meta.Object for any object with an ObjectMeta typed field. Allows -// fast, direct access to metadata fields for API objects. -func (meta *ObjectMeta) GetNamespace() string { return meta.Namespace } -func (meta *ObjectMeta) SetNamespace(namespace string) { meta.Namespace = namespace } -func (meta *ObjectMeta) GetName() string { return meta.Name } -func (meta *ObjectMeta) SetName(name string) { meta.Name = name } -func (meta *ObjectMeta) GetGenerateName() string { return meta.GenerateName } -func (meta *ObjectMeta) SetGenerateName(generateName string) { meta.GenerateName = generateName } -func (meta *ObjectMeta) GetUID() types.UID { return meta.UID } -func (meta *ObjectMeta) SetUID(uid types.UID) { meta.UID = uid } -func (meta *ObjectMeta) GetResourceVersion() string { return meta.ResourceVersion } -func (meta *ObjectMeta) SetResourceVersion(version string) { meta.ResourceVersion = version } -func (meta *ObjectMeta) GetSelfLink() string { return meta.SelfLink } -func (meta *ObjectMeta) SetSelfLink(selfLink string) { meta.SelfLink = selfLink } -func (meta *ObjectMeta) GetCreationTimestamp() metav1.Time { return meta.CreationTimestamp } -func (meta *ObjectMeta) SetCreationTimestamp(creationTimestamp metav1.Time) { - meta.CreationTimestamp = creationTimestamp -} -func (meta *ObjectMeta) GetDeletionTimestamp() *metav1.Time { return meta.DeletionTimestamp } -func (meta *ObjectMeta) SetDeletionTimestamp(deletionTimestamp *metav1.Time) { - meta.DeletionTimestamp = deletionTimestamp -} -func (meta *ObjectMeta) GetLabels() map[string]string { return meta.Labels } -func (meta *ObjectMeta) SetLabels(labels map[string]string) { meta.Labels = labels } -func (meta *ObjectMeta) GetAnnotations() map[string]string { return meta.Annotations } -func (meta *ObjectMeta) SetAnnotations(annotations map[string]string) { meta.Annotations = annotations } -func (meta *ObjectMeta) GetFinalizers() []string { return meta.Finalizers } -func (meta *ObjectMeta) SetFinalizers(finalizers []string) { meta.Finalizers = finalizers } - -func (meta *ObjectMeta) GetOwnerReferences() []metav1.OwnerReference { - ret := make([]metav1.OwnerReference, len(meta.OwnerReferences)) - for i := 0; i < len(meta.OwnerReferences); i++ { - ret[i].Kind = meta.OwnerReferences[i].Kind - ret[i].Name = meta.OwnerReferences[i].Name - ret[i].UID = meta.OwnerReferences[i].UID - ret[i].APIVersion = meta.OwnerReferences[i].APIVersion - if meta.OwnerReferences[i].Controller != nil { - value := *meta.OwnerReferences[i].Controller - ret[i].Controller = &value - } - } - return ret -} - -func (meta *ObjectMeta) SetOwnerReferences(references []metav1.OwnerReference) { - newReferences := make([]metav1.OwnerReference, len(references)) - for i := 0; i < len(references); i++ { - newReferences[i].Kind = references[i].Kind - newReferences[i].Name = references[i].Name - newReferences[i].UID = references[i].UID - newReferences[i].APIVersion = references[i].APIVersion - if references[i].Controller != nil { - value := *references[i].Controller - newReferences[i].Controller = &value - } - } - meta.OwnerReferences = newReferences -} - -func (meta *ObjectMeta) GetClusterName() string { - return meta.ClusterName -} -func (meta *ObjectMeta) SetClusterName(clusterName string) { - meta.ClusterName = clusterName -} diff --git a/vendor/k8s.io/kubernetes/pkg/api/meta/BUILD b/vendor/k8s.io/kubernetes/pkg/api/meta/BUILD index b1c0a21e..711339ed 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/meta/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/api/meta/BUILD @@ -5,50 +5,12 @@ licenses(["notice"]) load( "@io_bazel_rules_go//go:def.bzl", "go_library", - "go_test", ) go_library( name = "go_default_library", - srcs = [ - "doc.go", - "errors.go", - "firsthit_restmapper.go", - "help.go", - "interfaces.go", - "meta.go", - "multirestmapper.go", - "priority.go", - "restmapper.go", - "unstructured.go", - ], + srcs = ["doc.go"], tags = ["automanaged"], - deps = [ - "//pkg/apis/meta/v1:go_default_library", - "//pkg/apis/meta/v1/unstructured:go_default_library", - "//pkg/conversion:go_default_library", - "//pkg/runtime:go_default_library", - "//pkg/runtime/schema:go_default_library", - "//pkg/types:go_default_library", - "//pkg/util/errors:go_default_library", - "//pkg/util/sets:go_default_library", - "//vendor:github.com/golang/glog", - ], -) - -go_test( - name = "go_default_test", - srcs = [ - "multirestmapper_test.go", - "priority_test.go", - "restmapper_test.go", - ], - library = ":go_default_library", - tags = ["automanaged"], - deps = [ - "//pkg/runtime:go_default_library", - "//pkg/runtime/schema:go_default_library", - ], ) filegroup( diff --git a/vendor/k8s.io/kubernetes/pkg/api/meta/OWNERS b/vendor/k8s.io/kubernetes/pkg/api/meta/OWNERS deleted file mode 100755 index 6044c031..00000000 --- a/vendor/k8s.io/kubernetes/pkg/api/meta/OWNERS +++ /dev/null @@ -1,26 +0,0 @@ -reviewers: -- thockin -- smarterclayton -- wojtek-t -- deads2k -- brendandburns -- derekwaynecarr -- caesarxuchao -- mikedanese -- liggitt -- nikhiljindal -- gmarek -- kargakis -- janetkuo -- ncdc -- eparis -- dims -- krousey -- markturansky -- fabioy -- resouer -- david-mcmahon -- mfojtik -- jianhuiz -- feihujiang -- ghodss diff --git a/vendor/k8s.io/kubernetes/pkg/api/meta/doc.go b/vendor/k8s.io/kubernetes/pkg/api/meta/doc.go index 50007adb..06da7357 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/meta/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/api/meta/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Package meta provides functions for retrieving API metadata from objects -// belonging to the Kubernetes API -package meta // import "k8s.io/kubernetes/pkg/api/meta" +// Package meta only exists until heapster rebases +// TODO genericapiserver remove this empty package. Godep fails without this because heapster relies +// on this package. This will allow us to start splitting packages, but will force +// heapster to update on their next kube rebase. +package meta diff --git a/vendor/k8s.io/kubernetes/pkg/api/meta/errors.go b/vendor/k8s.io/kubernetes/pkg/api/meta/errors.go deleted file mode 100644 index 0e5c6db6..00000000 --- a/vendor/k8s.io/kubernetes/pkg/api/meta/errors.go +++ /dev/null @@ -1,105 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package meta - -import ( - "fmt" - - "k8s.io/kubernetes/pkg/runtime/schema" -) - -// AmbiguousResourceError is returned if the RESTMapper finds multiple matches for a resource -type AmbiguousResourceError struct { - PartialResource schema.GroupVersionResource - - MatchingResources []schema.GroupVersionResource - MatchingKinds []schema.GroupVersionKind -} - -func (e *AmbiguousResourceError) Error() string { - switch { - case len(e.MatchingKinds) > 0 && len(e.MatchingResources) > 0: - return fmt.Sprintf("%v matches multiple resources %v and kinds %v", e.PartialResource, e.MatchingResources, e.MatchingKinds) - case len(e.MatchingKinds) > 0: - return fmt.Sprintf("%v matches multiple kinds %v", e.PartialResource, e.MatchingKinds) - case len(e.MatchingResources) > 0: - return fmt.Sprintf("%v matches multiple resources %v", e.PartialResource, e.MatchingResources) - } - return fmt.Sprintf("%v matches multiple resources or kinds", e.PartialResource) -} - -// AmbiguousKindError is returned if the RESTMapper finds multiple matches for a kind -type AmbiguousKindError struct { - PartialKind schema.GroupVersionKind - - MatchingResources []schema.GroupVersionResource - MatchingKinds []schema.GroupVersionKind -} - -func (e *AmbiguousKindError) Error() string { - switch { - case len(e.MatchingKinds) > 0 && len(e.MatchingResources) > 0: - return fmt.Sprintf("%v matches multiple resources %v and kinds %v", e.PartialKind, e.MatchingResources, e.MatchingKinds) - case len(e.MatchingKinds) > 0: - return fmt.Sprintf("%v matches multiple kinds %v", e.PartialKind, e.MatchingKinds) - case len(e.MatchingResources) > 0: - return fmt.Sprintf("%v matches multiple resources %v", e.PartialKind, e.MatchingResources) - } - return fmt.Sprintf("%v matches multiple resources or kinds", e.PartialKind) -} - -func IsAmbiguousError(err error) bool { - if err == nil { - return false - } - switch err.(type) { - case *AmbiguousResourceError, *AmbiguousKindError: - return true - default: - return false - } -} - -// NoResourceMatchError is returned if the RESTMapper can't find any match for a resource -type NoResourceMatchError struct { - PartialResource schema.GroupVersionResource -} - -func (e *NoResourceMatchError) Error() string { - return fmt.Sprintf("no matches for %v", e.PartialResource) -} - -// NoKindMatchError is returned if the RESTMapper can't find any match for a kind -type NoKindMatchError struct { - PartialKind schema.GroupVersionKind -} - -func (e *NoKindMatchError) Error() string { - return fmt.Sprintf("no matches for %v", e.PartialKind) -} - -func IsNoMatchError(err error) bool { - if err == nil { - return false - } - switch err.(type) { - case *NoResourceMatchError, *NoKindMatchError: - return true - default: - return false - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/api/meta/firsthit_restmapper.go b/vendor/k8s.io/kubernetes/pkg/api/meta/firsthit_restmapper.go deleted file mode 100644 index 23b9fc4d..00000000 --- a/vendor/k8s.io/kubernetes/pkg/api/meta/firsthit_restmapper.go +++ /dev/null @@ -1,97 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package meta - -import ( - "fmt" - - "k8s.io/kubernetes/pkg/runtime/schema" - utilerrors "k8s.io/kubernetes/pkg/util/errors" -) - -// FirstHitRESTMapper is a wrapper for multiple RESTMappers which returns the -// first successful result for the singular requests -type FirstHitRESTMapper struct { - MultiRESTMapper -} - -func (m FirstHitRESTMapper) String() string { - return fmt.Sprintf("FirstHitRESTMapper{\n\t%v\n}", m.MultiRESTMapper) -} - -func (m FirstHitRESTMapper) ResourceFor(resource schema.GroupVersionResource) (schema.GroupVersionResource, error) { - errors := []error{} - for _, t := range m.MultiRESTMapper { - ret, err := t.ResourceFor(resource) - if err == nil { - return ret, nil - } - errors = append(errors, err) - } - - return schema.GroupVersionResource{}, collapseAggregateErrors(errors) -} - -func (m FirstHitRESTMapper) KindFor(resource schema.GroupVersionResource) (schema.GroupVersionKind, error) { - errors := []error{} - for _, t := range m.MultiRESTMapper { - ret, err := t.KindFor(resource) - if err == nil { - return ret, nil - } - errors = append(errors, err) - } - - return schema.GroupVersionKind{}, collapseAggregateErrors(errors) -} - -// RESTMapping provides the REST mapping for the resource based on the -// kind and version. This implementation supports multiple REST schemas and -// return the first match. -func (m FirstHitRESTMapper) RESTMapping(gk schema.GroupKind, versions ...string) (*RESTMapping, error) { - errors := []error{} - for _, t := range m.MultiRESTMapper { - ret, err := t.RESTMapping(gk, versions...) - if err == nil { - return ret, nil - } - errors = append(errors, err) - } - - return nil, collapseAggregateErrors(errors) -} - -// collapseAggregateErrors returns the minimal errors. it handles empty as nil, handles one item in a list -// by returning the item, and collapses all NoMatchErrors to a single one (since they should all be the same) -func collapseAggregateErrors(errors []error) error { - if len(errors) == 0 { - return nil - } - if len(errors) == 1 { - return errors[0] - } - - allNoMatchErrors := true - for _, err := range errors { - allNoMatchErrors = allNoMatchErrors && IsNoMatchError(err) - } - if allNoMatchErrors { - return errors[0] - } - - return utilerrors.NewAggregate(errors) -} diff --git a/vendor/k8s.io/kubernetes/pkg/api/meta/help.go b/vendor/k8s.io/kubernetes/pkg/api/meta/help.go deleted file mode 100644 index a1255a09..00000000 --- a/vendor/k8s.io/kubernetes/pkg/api/meta/help.go +++ /dev/null @@ -1,199 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package meta - -import ( - "fmt" - "reflect" - - "k8s.io/kubernetes/pkg/conversion" - "k8s.io/kubernetes/pkg/runtime" -) - -// IsListType returns true if the provided Object has a slice called Items -func IsListType(obj runtime.Object) bool { - // if we're a runtime.Unstructured, check whether this is a list. - // TODO: refactor GetItemsPtr to use an interface that returns []runtime.Object - if unstructured, ok := obj.(runtime.Unstructured); ok { - return unstructured.IsList() - } - - _, err := GetItemsPtr(obj) - return err == nil -} - -// GetItemsPtr returns a pointer to the list object's Items member. -// If 'list' doesn't have an Items member, it's not really a list type -// and an error will be returned. -// This function will either return a pointer to a slice, or an error, but not both. -func GetItemsPtr(list runtime.Object) (interface{}, error) { - v, err := conversion.EnforcePtr(list) - if err != nil { - return nil, err - } - - items := v.FieldByName("Items") - if !items.IsValid() { - return nil, fmt.Errorf("no Items field in %#v", list) - } - switch items.Kind() { - case reflect.Interface, reflect.Ptr: - target := reflect.TypeOf(items.Interface()).Elem() - if target.Kind() != reflect.Slice { - return nil, fmt.Errorf("items: Expected slice, got %s", target.Kind()) - } - return items.Interface(), nil - case reflect.Slice: - return items.Addr().Interface(), nil - default: - return nil, fmt.Errorf("items: Expected slice, got %s", items.Kind()) - } -} - -// EachListItem invokes fn on each runtime.Object in the list. Any error immediately terminates -// the loop. -func EachListItem(obj runtime.Object, fn func(runtime.Object) error) error { - // TODO: Change to an interface call? - itemsPtr, err := GetItemsPtr(obj) - if err != nil { - return err - } - items, err := conversion.EnforcePtr(itemsPtr) - if err != nil { - return err - } - len := items.Len() - if len == 0 { - return nil - } - takeAddr := false - if elemType := items.Type().Elem(); elemType.Kind() != reflect.Ptr && elemType.Kind() != reflect.Interface { - if !items.Index(0).CanAddr() { - return fmt.Errorf("unable to take address of items in %T for EachListItem", obj) - } - takeAddr = true - } - - for i := 0; i < len; i++ { - raw := items.Index(i) - if takeAddr { - raw = raw.Addr() - } - switch item := raw.Interface().(type) { - case *runtime.RawExtension: - if err := fn(item.Object); err != nil { - return err - } - case runtime.Object: - if err := fn(item); err != nil { - return err - } - default: - obj, ok := item.(runtime.Object) - if !ok { - return fmt.Errorf("%v: item[%v]: Expected object, got %#v(%s)", obj, i, raw.Interface(), raw.Kind()) - } - if err := fn(obj); err != nil { - return err - } - } - } - return nil -} - -// ExtractList returns obj's Items element as an array of runtime.Objects. -// Returns an error if obj is not a List type (does not have an Items member). -func ExtractList(obj runtime.Object) ([]runtime.Object, error) { - itemsPtr, err := GetItemsPtr(obj) - if err != nil { - return nil, err - } - items, err := conversion.EnforcePtr(itemsPtr) - if err != nil { - return nil, err - } - list := make([]runtime.Object, items.Len()) - for i := range list { - raw := items.Index(i) - switch item := raw.Interface().(type) { - case runtime.RawExtension: - switch { - case item.Object != nil: - list[i] = item.Object - case item.Raw != nil: - // TODO: Set ContentEncoding and ContentType correctly. - list[i] = &runtime.Unknown{Raw: item.Raw} - default: - list[i] = nil - } - case runtime.Object: - list[i] = item - default: - var found bool - if list[i], found = raw.Addr().Interface().(runtime.Object); !found { - return nil, fmt.Errorf("%v: item[%v]: Expected object, got %#v(%s)", obj, i, raw.Interface(), raw.Kind()) - } - } - } - return list, nil -} - -// objectSliceType is the type of a slice of Objects -var objectSliceType = reflect.TypeOf([]runtime.Object{}) - -// SetList sets the given list object's Items member have the elements given in -// objects. -// Returns an error if list is not a List type (does not have an Items member), -// or if any of the objects are not of the right type. -func SetList(list runtime.Object, objects []runtime.Object) error { - itemsPtr, err := GetItemsPtr(list) - if err != nil { - return err - } - items, err := conversion.EnforcePtr(itemsPtr) - if err != nil { - return err - } - if items.Type() == objectSliceType { - items.Set(reflect.ValueOf(objects)) - return nil - } - slice := reflect.MakeSlice(items.Type(), len(objects), len(objects)) - for i := range objects { - dest := slice.Index(i) - - // check to see if you're directly assignable - if reflect.TypeOf(objects[i]).AssignableTo(dest.Type()) { - dest.Set(reflect.ValueOf(objects[i])) - continue - } - - src, err := conversion.EnforcePtr(objects[i]) - if err != nil { - return err - } - if src.Type().AssignableTo(dest.Type()) { - dest.Set(src) - } else if src.Type().ConvertibleTo(dest.Type()) { - dest.Set(src.Convert(dest.Type())) - } else { - return fmt.Errorf("item[%d]: can't assign or convert %v into %v", i, src.Type(), dest.Type()) - } - } - items.Set(slice) - return nil -} diff --git a/vendor/k8s.io/kubernetes/pkg/api/meta/interfaces.go b/vendor/k8s.io/kubernetes/pkg/api/meta/interfaces.go deleted file mode 100644 index 41cd0d01..00000000 --- a/vendor/k8s.io/kubernetes/pkg/api/meta/interfaces.go +++ /dev/null @@ -1,188 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package meta - -import ( - metav1 "k8s.io/kubernetes/pkg/apis/meta/v1" - "k8s.io/kubernetes/pkg/apis/meta/v1/unstructured" - "k8s.io/kubernetes/pkg/runtime" - "k8s.io/kubernetes/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/types" -) - -// VersionInterfaces contains the interfaces one should use for dealing with types of a particular version. -type VersionInterfaces struct { - runtime.ObjectConvertor - MetadataAccessor -} - -type ObjectMetaAccessor interface { - GetObjectMeta() Object -} - -// Object lets you work with object metadata from any of the versioned or -// internal API objects. Attempting to set or retrieve a field on an object that does -// not support that field (Name, UID, Namespace on lists) will be a no-op and return -// a default value. -type Object interface { - GetNamespace() string - SetNamespace(namespace string) - GetName() string - SetName(name string) - GetGenerateName() string - SetGenerateName(name string) - GetUID() types.UID - SetUID(uid types.UID) - GetResourceVersion() string - SetResourceVersion(version string) - GetSelfLink() string - SetSelfLink(selfLink string) - GetCreationTimestamp() metav1.Time - SetCreationTimestamp(timestamp metav1.Time) - GetDeletionTimestamp() *metav1.Time - SetDeletionTimestamp(timestamp *metav1.Time) - GetLabels() map[string]string - SetLabels(labels map[string]string) - GetAnnotations() map[string]string - SetAnnotations(annotations map[string]string) - GetFinalizers() []string - SetFinalizers(finalizers []string) - GetOwnerReferences() []metav1.OwnerReference - SetOwnerReferences([]metav1.OwnerReference) - GetClusterName() string - SetClusterName(clusterName string) -} - -// TODO: move me to pkg/apis/meta/v1/unstructured once Object is moved to pkg/apis/meta/v1 -var _ Object = &unstructured.Unstructured{} - -type ListMetaAccessor interface { - GetListMeta() List -} - -// List lets you work with list metadata from any of the versioned or -// internal API objects. Attempting to set or retrieve a field on an object that does -// not support that field will be a no-op and return a default value. -type List metav1.List - -// Type exposes the type and APIVersion of versioned or internal API objects. -type Type metav1.Type - -// MetadataAccessor lets you work with object and list metadata from any of the versioned or -// internal API objects. Attempting to set or retrieve a field on an object that does -// not support that field (Name, UID, Namespace on lists) will be a no-op and return -// a default value. -// -// MetadataAccessor exposes Interface in a way that can be used with multiple objects. -type MetadataAccessor interface { - APIVersion(obj runtime.Object) (string, error) - SetAPIVersion(obj runtime.Object, version string) error - - Kind(obj runtime.Object) (string, error) - SetKind(obj runtime.Object, kind string) error - - Namespace(obj runtime.Object) (string, error) - SetNamespace(obj runtime.Object, namespace string) error - - Name(obj runtime.Object) (string, error) - SetName(obj runtime.Object, name string) error - - GenerateName(obj runtime.Object) (string, error) - SetGenerateName(obj runtime.Object, name string) error - - UID(obj runtime.Object) (types.UID, error) - SetUID(obj runtime.Object, uid types.UID) error - - SelfLink(obj runtime.Object) (string, error) - SetSelfLink(obj runtime.Object, selfLink string) error - - Labels(obj runtime.Object) (map[string]string, error) - SetLabels(obj runtime.Object, labels map[string]string) error - - Annotations(obj runtime.Object) (map[string]string, error) - SetAnnotations(obj runtime.Object, annotations map[string]string) error - - runtime.ResourceVersioner -} - -type RESTScopeName string - -const ( - RESTScopeNameNamespace RESTScopeName = "namespace" - RESTScopeNameRoot RESTScopeName = "root" -) - -// RESTScope contains the information needed to deal with REST resources that are in a resource hierarchy -type RESTScope interface { - // Name of the scope - Name() RESTScopeName - // ParamName is the optional name of the parameter that should be inserted in the resource url - // If empty, no param will be inserted - ParamName() string - // ArgumentName is the optional name that should be used for the variable holding the value. - ArgumentName() string - // ParamDescription is the optional description to use to document the parameter in api documentation - ParamDescription() string -} - -// RESTMapping contains the information needed to deal with objects of a specific -// resource and kind in a RESTful manner. -type RESTMapping struct { - // Resource is a string representing the name of this resource as a REST client would see it - Resource string - - GroupVersionKind schema.GroupVersionKind - - // Scope contains the information needed to deal with REST Resources that are in a resource hierarchy - Scope RESTScope - - runtime.ObjectConvertor - MetadataAccessor -} - -// RESTMapper allows clients to map resources to kind, and map kind and version -// to interfaces for manipulating those objects. It is primarily intended for -// consumers of Kubernetes compatible REST APIs as defined in docs/devel/api-conventions.md. -// -// The Kubernetes API provides versioned resources and object kinds which are scoped -// to API groups. In other words, kinds and resources should not be assumed to be -// unique across groups. -// -// TODO: split into sub-interfaces -type RESTMapper interface { - // KindFor takes a partial resource and returns the single match. Returns an error if there are multiple matches - KindFor(resource schema.GroupVersionResource) (schema.GroupVersionKind, error) - - // KindsFor takes a partial resource and returns the list of potential kinds in priority order - KindsFor(resource schema.GroupVersionResource) ([]schema.GroupVersionKind, error) - - // ResourceFor takes a partial resource and returns the single match. Returns an error if there are multiple matches - ResourceFor(input schema.GroupVersionResource) (schema.GroupVersionResource, error) - - // ResourcesFor takes a partial resource and returns the list of potential resource in priority order - ResourcesFor(input schema.GroupVersionResource) ([]schema.GroupVersionResource, error) - - // RESTMapping identifies a preferred resource mapping for the provided group kind. - RESTMapping(gk schema.GroupKind, versions ...string) (*RESTMapping, error) - // RESTMappings returns all resource mappings for the provided group kind if no - // version search is provided. Otherwise identifies a preferred resource mapping for - // the provided version(s). - RESTMappings(gk schema.GroupKind, versions ...string) ([]*RESTMapping, error) - - AliasesForResource(resource string) ([]string, bool) - ResourceSingularizer(resource string) (singular string, err error) -} diff --git a/vendor/k8s.io/kubernetes/pkg/api/meta/meta.go b/vendor/k8s.io/kubernetes/pkg/api/meta/meta.go deleted file mode 100644 index 363c7814..00000000 --- a/vendor/k8s.io/kubernetes/pkg/api/meta/meta.go +++ /dev/null @@ -1,567 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package meta - -import ( - "fmt" - "reflect" - - metav1 "k8s.io/kubernetes/pkg/apis/meta/v1" - "k8s.io/kubernetes/pkg/conversion" - "k8s.io/kubernetes/pkg/runtime" - "k8s.io/kubernetes/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/types" - - "github.com/golang/glog" -) - -// errNotList is returned when an object implements the Object style interfaces but not the List style -// interfaces. -var errNotList = fmt.Errorf("object does not implement the List interfaces") - -// ListAccessor returns a List interface for the provided object or an error if the object does -// not provide List. -// IMPORTANT: Objects are a superset of lists, so all Objects return List metadata. Do not use this -// check to determine whether an object *is* a List. -// TODO: return bool instead of error -func ListAccessor(obj interface{}) (List, error) { - switch t := obj.(type) { - case List: - return t, nil - case metav1.List: - return t, nil - case ListMetaAccessor: - if m := t.GetListMeta(); m != nil { - return m, nil - } - return nil, errNotList - case metav1.ListMetaAccessor: - if m := t.GetListMeta(); m != nil { - return m, nil - } - return nil, errNotList - case Object: - return t, nil - case ObjectMetaAccessor: - if m := t.GetObjectMeta(); m != nil { - return m, nil - } - return nil, errNotList - default: - return nil, errNotList - } -} - -// errNotObject is returned when an object implements the List style interfaces but not the Object style -// interfaces. -var errNotObject = fmt.Errorf("object does not implement the Object interfaces") - -// Accessor takes an arbitrary object pointer and returns meta.Interface. -// obj must be a pointer to an API type. An error is returned if the minimum -// required fields are missing. Fields that are not required return the default -// value and are a no-op if set. -// TODO: return bool instead of error -func Accessor(obj interface{}) (Object, error) { - switch t := obj.(type) { - case Object: - return t, nil - case ObjectMetaAccessor: - if m := t.GetObjectMeta(); m != nil { - return m, nil - } - return nil, errNotObject - case List, metav1.List, ListMetaAccessor, metav1.ListMetaAccessor: - return nil, errNotObject - default: - return nil, errNotObject - } -} - -// TypeAccessor returns an interface that allows retrieving and modifying the APIVersion -// and Kind of an in-memory internal object. -// TODO: this interface is used to test code that does not have ObjectMeta or ListMeta -// in round tripping (objects which can use apiVersion/kind, but do not fit the Kube -// api conventions). -func TypeAccessor(obj interface{}) (Type, error) { - if typed, ok := obj.(runtime.Object); ok { - return objectAccessor{typed}, nil - } - v, err := conversion.EnforcePtr(obj) - if err != nil { - return nil, err - } - t := v.Type() - if v.Kind() != reflect.Struct { - return nil, fmt.Errorf("expected struct, but got %v: %v (%#v)", v.Kind(), t, v.Interface()) - } - - typeMeta := v.FieldByName("TypeMeta") - if !typeMeta.IsValid() { - return nil, fmt.Errorf("struct %v lacks embedded TypeMeta type", t) - } - a := &genericAccessor{} - if err := extractFromTypeMeta(typeMeta, a); err != nil { - return nil, fmt.Errorf("unable to find type fields on %#v: %v", typeMeta, err) - } - return a, nil -} - -type objectAccessor struct { - runtime.Object -} - -func (obj objectAccessor) GetKind() string { - return obj.GetObjectKind().GroupVersionKind().Kind -} - -func (obj objectAccessor) SetKind(kind string) { - gvk := obj.GetObjectKind().GroupVersionKind() - gvk.Kind = kind - obj.GetObjectKind().SetGroupVersionKind(gvk) -} - -func (obj objectAccessor) GetAPIVersion() string { - return obj.GetObjectKind().GroupVersionKind().GroupVersion().String() -} - -func (obj objectAccessor) SetAPIVersion(version string) { - gvk := obj.GetObjectKind().GroupVersionKind() - gv, err := schema.ParseGroupVersion(version) - if err != nil { - gv = schema.GroupVersion{Version: version} - } - gvk.Group, gvk.Version = gv.Group, gv.Version - obj.GetObjectKind().SetGroupVersionKind(gvk) -} - -// NewAccessor returns a MetadataAccessor that can retrieve -// or manipulate resource version on objects derived from core API -// metadata concepts. -func NewAccessor() MetadataAccessor { - return resourceAccessor{} -} - -// resourceAccessor implements ResourceVersioner and SelfLinker. -type resourceAccessor struct{} - -func (resourceAccessor) Kind(obj runtime.Object) (string, error) { - return objectAccessor{obj}.GetKind(), nil -} - -func (resourceAccessor) SetKind(obj runtime.Object, kind string) error { - objectAccessor{obj}.SetKind(kind) - return nil -} - -func (resourceAccessor) APIVersion(obj runtime.Object) (string, error) { - return objectAccessor{obj}.GetAPIVersion(), nil -} - -func (resourceAccessor) SetAPIVersion(obj runtime.Object, version string) error { - objectAccessor{obj}.SetAPIVersion(version) - return nil -} - -func (resourceAccessor) Namespace(obj runtime.Object) (string, error) { - accessor, err := Accessor(obj) - if err != nil { - return "", err - } - return accessor.GetNamespace(), nil -} - -func (resourceAccessor) SetNamespace(obj runtime.Object, namespace string) error { - accessor, err := Accessor(obj) - if err != nil { - return err - } - accessor.SetNamespace(namespace) - return nil -} - -func (resourceAccessor) Name(obj runtime.Object) (string, error) { - accessor, err := Accessor(obj) - if err != nil { - return "", err - } - return accessor.GetName(), nil -} - -func (resourceAccessor) SetName(obj runtime.Object, name string) error { - accessor, err := Accessor(obj) - if err != nil { - return err - } - accessor.SetName(name) - return nil -} - -func (resourceAccessor) GenerateName(obj runtime.Object) (string, error) { - accessor, err := Accessor(obj) - if err != nil { - return "", err - } - return accessor.GetGenerateName(), nil -} - -func (resourceAccessor) SetGenerateName(obj runtime.Object, name string) error { - accessor, err := Accessor(obj) - if err != nil { - return err - } - accessor.SetGenerateName(name) - return nil -} - -func (resourceAccessor) UID(obj runtime.Object) (types.UID, error) { - accessor, err := Accessor(obj) - if err != nil { - return "", err - } - return accessor.GetUID(), nil -} - -func (resourceAccessor) SetUID(obj runtime.Object, uid types.UID) error { - accessor, err := Accessor(obj) - if err != nil { - return err - } - accessor.SetUID(uid) - return nil -} - -func (resourceAccessor) SelfLink(obj runtime.Object) (string, error) { - accessor, err := ListAccessor(obj) - if err != nil { - return "", err - } - return accessor.GetSelfLink(), nil -} - -func (resourceAccessor) SetSelfLink(obj runtime.Object, selfLink string) error { - accessor, err := ListAccessor(obj) - if err != nil { - return err - } - accessor.SetSelfLink(selfLink) - return nil -} - -func (resourceAccessor) Labels(obj runtime.Object) (map[string]string, error) { - accessor, err := Accessor(obj) - if err != nil { - return nil, err - } - return accessor.GetLabels(), nil -} - -func (resourceAccessor) SetLabels(obj runtime.Object, labels map[string]string) error { - accessor, err := Accessor(obj) - if err != nil { - return err - } - accessor.SetLabels(labels) - return nil -} - -func (resourceAccessor) Annotations(obj runtime.Object) (map[string]string, error) { - accessor, err := Accessor(obj) - if err != nil { - return nil, err - } - return accessor.GetAnnotations(), nil -} - -func (resourceAccessor) SetAnnotations(obj runtime.Object, annotations map[string]string) error { - accessor, err := Accessor(obj) - if err != nil { - return err - } - accessor.SetAnnotations(annotations) - return nil -} - -func (resourceAccessor) ResourceVersion(obj runtime.Object) (string, error) { - accessor, err := ListAccessor(obj) - if err != nil { - return "", err - } - return accessor.GetResourceVersion(), nil -} - -func (resourceAccessor) SetResourceVersion(obj runtime.Object, version string) error { - accessor, err := ListAccessor(obj) - if err != nil { - return err - } - accessor.SetResourceVersion(version) - return nil -} - -// extractFromOwnerReference extracts v to o. v is the OwnerReferences field of an object. -func extractFromOwnerReference(v reflect.Value, o *metav1.OwnerReference) error { - if err := runtime.Field(v, "APIVersion", &o.APIVersion); err != nil { - return err - } - if err := runtime.Field(v, "Kind", &o.Kind); err != nil { - return err - } - if err := runtime.Field(v, "Name", &o.Name); err != nil { - return err - } - if err := runtime.Field(v, "UID", &o.UID); err != nil { - return err - } - var controllerPtr *bool - if err := runtime.Field(v, "Controller", &controllerPtr); err != nil { - return err - } - if controllerPtr != nil { - controller := *controllerPtr - o.Controller = &controller - } - return nil -} - -// setOwnerReference sets v to o. v is the OwnerReferences field of an object. -func setOwnerReference(v reflect.Value, o *metav1.OwnerReference) error { - if err := runtime.SetField(o.APIVersion, v, "APIVersion"); err != nil { - return err - } - if err := runtime.SetField(o.Kind, v, "Kind"); err != nil { - return err - } - if err := runtime.SetField(o.Name, v, "Name"); err != nil { - return err - } - if err := runtime.SetField(o.UID, v, "UID"); err != nil { - return err - } - if o.Controller != nil { - controller := *(o.Controller) - if err := runtime.SetField(&controller, v, "Controller"); err != nil { - return err - } - } - return nil -} - -// genericAccessor contains pointers to strings that can modify an arbitrary -// struct and implements the Accessor interface. -type genericAccessor struct { - namespace *string - name *string - generateName *string - uid *types.UID - apiVersion *string - kind *string - resourceVersion *string - selfLink *string - creationTimestamp *metav1.Time - deletionTimestamp **metav1.Time - labels *map[string]string - annotations *map[string]string - ownerReferences reflect.Value - finalizers *[]string -} - -func (a genericAccessor) GetNamespace() string { - if a.namespace == nil { - return "" - } - return *a.namespace -} - -func (a genericAccessor) SetNamespace(namespace string) { - if a.namespace == nil { - return - } - *a.namespace = namespace -} - -func (a genericAccessor) GetName() string { - if a.name == nil { - return "" - } - return *a.name -} - -func (a genericAccessor) SetName(name string) { - if a.name == nil { - return - } - *a.name = name -} - -func (a genericAccessor) GetGenerateName() string { - if a.generateName == nil { - return "" - } - return *a.generateName -} - -func (a genericAccessor) SetGenerateName(generateName string) { - if a.generateName == nil { - return - } - *a.generateName = generateName -} - -func (a genericAccessor) GetUID() types.UID { - if a.uid == nil { - return "" - } - return *a.uid -} - -func (a genericAccessor) SetUID(uid types.UID) { - if a.uid == nil { - return - } - *a.uid = uid -} - -func (a genericAccessor) GetAPIVersion() string { - return *a.apiVersion -} - -func (a genericAccessor) SetAPIVersion(version string) { - *a.apiVersion = version -} - -func (a genericAccessor) GetKind() string { - return *a.kind -} - -func (a genericAccessor) SetKind(kind string) { - *a.kind = kind -} - -func (a genericAccessor) GetResourceVersion() string { - return *a.resourceVersion -} - -func (a genericAccessor) SetResourceVersion(version string) { - *a.resourceVersion = version -} - -func (a genericAccessor) GetSelfLink() string { - return *a.selfLink -} - -func (a genericAccessor) SetSelfLink(selfLink string) { - *a.selfLink = selfLink -} - -func (a genericAccessor) GetCreationTimestamp() metav1.Time { - return *a.creationTimestamp -} - -func (a genericAccessor) SetCreationTimestamp(timestamp metav1.Time) { - *a.creationTimestamp = timestamp -} - -func (a genericAccessor) GetDeletionTimestamp() *metav1.Time { - return *a.deletionTimestamp -} - -func (a genericAccessor) SetDeletionTimestamp(timestamp *metav1.Time) { - *a.deletionTimestamp = timestamp -} - -func (a genericAccessor) GetLabels() map[string]string { - if a.labels == nil { - return nil - } - return *a.labels -} - -func (a genericAccessor) SetLabels(labels map[string]string) { - *a.labels = labels -} - -func (a genericAccessor) GetAnnotations() map[string]string { - if a.annotations == nil { - return nil - } - return *a.annotations -} - -func (a genericAccessor) SetAnnotations(annotations map[string]string) { - if a.annotations == nil { - emptyAnnotations := make(map[string]string) - a.annotations = &emptyAnnotations - } - *a.annotations = annotations -} - -func (a genericAccessor) GetFinalizers() []string { - if a.finalizers == nil { - return nil - } - return *a.finalizers -} - -func (a genericAccessor) SetFinalizers(finalizers []string) { - *a.finalizers = finalizers -} - -func (a genericAccessor) GetOwnerReferences() []metav1.OwnerReference { - var ret []metav1.OwnerReference - s := a.ownerReferences - if s.Kind() != reflect.Ptr || s.Elem().Kind() != reflect.Slice { - glog.Errorf("expect %v to be a pointer to slice", s) - return ret - } - s = s.Elem() - // Set the capacity to one element greater to avoid copy if the caller later append an element. - ret = make([]metav1.OwnerReference, s.Len(), s.Len()+1) - for i := 0; i < s.Len(); i++ { - if err := extractFromOwnerReference(s.Index(i), &ret[i]); err != nil { - glog.Errorf("extractFromOwnerReference failed: %v", err) - return ret - } - } - return ret -} - -func (a genericAccessor) SetOwnerReferences(references []metav1.OwnerReference) { - s := a.ownerReferences - if s.Kind() != reflect.Ptr || s.Elem().Kind() != reflect.Slice { - glog.Errorf("expect %v to be a pointer to slice", s) - } - s = s.Elem() - newReferences := reflect.MakeSlice(s.Type(), len(references), len(references)) - for i := 0; i < len(references); i++ { - if err := setOwnerReference(newReferences.Index(i), &references[i]); err != nil { - glog.Errorf("setOwnerReference failed: %v", err) - return - } - } - s.Set(newReferences) -} - -// extractFromTypeMeta extracts pointers to version and kind fields from an object -func extractFromTypeMeta(v reflect.Value, a *genericAccessor) error { - if err := runtime.FieldPtr(v, "APIVersion", &a.apiVersion); err != nil { - return err - } - if err := runtime.FieldPtr(v, "Kind", &a.kind); err != nil { - return err - } - return nil -} diff --git a/vendor/k8s.io/kubernetes/pkg/api/meta/multirestmapper.go b/vendor/k8s.io/kubernetes/pkg/api/meta/multirestmapper.go deleted file mode 100644 index 816eb321..00000000 --- a/vendor/k8s.io/kubernetes/pkg/api/meta/multirestmapper.go +++ /dev/null @@ -1,231 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package meta - -import ( - "fmt" - "strings" - - "k8s.io/kubernetes/pkg/runtime/schema" - utilerrors "k8s.io/kubernetes/pkg/util/errors" - "k8s.io/kubernetes/pkg/util/sets" -) - -// MultiRESTMapper is a wrapper for multiple RESTMappers. -type MultiRESTMapper []RESTMapper - -func (m MultiRESTMapper) String() string { - nested := []string{} - for _, t := range m { - currString := fmt.Sprintf("%v", t) - splitStrings := strings.Split(currString, "\n") - nested = append(nested, strings.Join(splitStrings, "\n\t")) - } - - return fmt.Sprintf("MultiRESTMapper{\n\t%s\n}", strings.Join(nested, "\n\t")) -} - -// ResourceSingularizer converts a REST resource name from plural to singular (e.g., from pods to pod) -// This implementation supports multiple REST schemas and return the first match. -func (m MultiRESTMapper) ResourceSingularizer(resource string) (singular string, err error) { - for _, t := range m { - singular, err = t.ResourceSingularizer(resource) - if err == nil { - return - } - } - return -} - -func (m MultiRESTMapper) ResourcesFor(resource schema.GroupVersionResource) ([]schema.GroupVersionResource, error) { - allGVRs := []schema.GroupVersionResource{} - for _, t := range m { - gvrs, err := t.ResourcesFor(resource) - // ignore "no match" errors, but any other error percolates back up - if IsNoMatchError(err) { - continue - } - if err != nil { - return nil, err - } - - // walk the existing values to de-dup - for _, curr := range gvrs { - found := false - for _, existing := range allGVRs { - if curr == existing { - found = true - break - } - } - - if !found { - allGVRs = append(allGVRs, curr) - } - } - } - - if len(allGVRs) == 0 { - return nil, &NoResourceMatchError{PartialResource: resource} - } - - return allGVRs, nil -} - -func (m MultiRESTMapper) KindsFor(resource schema.GroupVersionResource) (gvk []schema.GroupVersionKind, err error) { - allGVKs := []schema.GroupVersionKind{} - for _, t := range m { - gvks, err := t.KindsFor(resource) - // ignore "no match" errors, but any other error percolates back up - if IsNoMatchError(err) { - continue - } - if err != nil { - return nil, err - } - - // walk the existing values to de-dup - for _, curr := range gvks { - found := false - for _, existing := range allGVKs { - if curr == existing { - found = true - break - } - } - - if !found { - allGVKs = append(allGVKs, curr) - } - } - } - - if len(allGVKs) == 0 { - return nil, &NoResourceMatchError{PartialResource: resource} - } - - return allGVKs, nil -} - -func (m MultiRESTMapper) ResourceFor(resource schema.GroupVersionResource) (schema.GroupVersionResource, error) { - resources, err := m.ResourcesFor(resource) - if err != nil { - return schema.GroupVersionResource{}, err - } - if len(resources) == 1 { - return resources[0], nil - } - - return schema.GroupVersionResource{}, &AmbiguousResourceError{PartialResource: resource, MatchingResources: resources} -} - -func (m MultiRESTMapper) KindFor(resource schema.GroupVersionResource) (schema.GroupVersionKind, error) { - kinds, err := m.KindsFor(resource) - if err != nil { - return schema.GroupVersionKind{}, err - } - if len(kinds) == 1 { - return kinds[0], nil - } - - return schema.GroupVersionKind{}, &AmbiguousResourceError{PartialResource: resource, MatchingKinds: kinds} -} - -// RESTMapping provides the REST mapping for the resource based on the -// kind and version. This implementation supports multiple REST schemas and -// return the first match. -func (m MultiRESTMapper) RESTMapping(gk schema.GroupKind, versions ...string) (*RESTMapping, error) { - allMappings := []*RESTMapping{} - errors := []error{} - - for _, t := range m { - currMapping, err := t.RESTMapping(gk, versions...) - // ignore "no match" errors, but any other error percolates back up - if IsNoMatchError(err) { - continue - } - if err != nil { - errors = append(errors, err) - continue - } - - allMappings = append(allMappings, currMapping) - } - - // if we got exactly one mapping, then use it even if other requested failed - if len(allMappings) == 1 { - return allMappings[0], nil - } - if len(allMappings) > 1 { - var kinds []schema.GroupVersionKind - for _, m := range allMappings { - kinds = append(kinds, m.GroupVersionKind) - } - return nil, &AmbiguousKindError{PartialKind: gk.WithVersion(""), MatchingKinds: kinds} - } - if len(errors) > 0 { - return nil, utilerrors.NewAggregate(errors) - } - return nil, &NoKindMatchError{PartialKind: gk.WithVersion("")} -} - -// RESTMappings returns all possible RESTMappings for the provided group kind, or an error -// if the type is not recognized. -func (m MultiRESTMapper) RESTMappings(gk schema.GroupKind, versions ...string) ([]*RESTMapping, error) { - var allMappings []*RESTMapping - var errors []error - - for _, t := range m { - currMappings, err := t.RESTMappings(gk, versions...) - // ignore "no match" errors, but any other error percolates back up - if IsNoMatchError(err) { - continue - } - if err != nil { - errors = append(errors, err) - continue - } - allMappings = append(allMappings, currMappings...) - } - if len(errors) > 0 { - return nil, utilerrors.NewAggregate(errors) - } - if len(allMappings) == 0 { - return nil, &NoKindMatchError{PartialKind: gk.WithVersion("")} - } - return allMappings, nil -} - -// AliasesForResource finds the first alias response for the provided mappers. -func (m MultiRESTMapper) AliasesForResource(alias string) ([]string, bool) { - seenAliases := sets.NewString() - allAliases := []string{} - handled := false - - for _, t := range m { - if currAliases, currOk := t.AliasesForResource(alias); currOk { - for _, currAlias := range currAliases { - if !seenAliases.Has(currAlias) { - allAliases = append(allAliases, currAlias) - seenAliases.Insert(currAlias) - } - } - handled = true - } - } - return allAliases, handled -} diff --git a/vendor/k8s.io/kubernetes/pkg/api/meta/multirestmapper_test.go b/vendor/k8s.io/kubernetes/pkg/api/meta/multirestmapper_test.go deleted file mode 100644 index 6d306c37..00000000 --- a/vendor/k8s.io/kubernetes/pkg/api/meta/multirestmapper_test.go +++ /dev/null @@ -1,359 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package meta - -import ( - "errors" - "reflect" - "testing" - - "k8s.io/kubernetes/pkg/runtime/schema" -) - -func TestMultiRESTMapperResourceFor(t *testing.T) { - tcs := []struct { - name string - - mapper MultiRESTMapper - input schema.GroupVersionResource - result schema.GroupVersionResource - err error - }{ - { - name: "empty", - mapper: MultiRESTMapper{}, - input: schema.GroupVersionResource{Resource: "foo"}, - result: schema.GroupVersionResource{}, - err: &NoResourceMatchError{PartialResource: schema.GroupVersionResource{Resource: "foo"}}, - }, - { - name: "ignore not found", - mapper: MultiRESTMapper{fixedRESTMapper{err: &NoResourceMatchError{PartialResource: schema.GroupVersionResource{Resource: "IGNORE_THIS"}}}}, - input: schema.GroupVersionResource{Resource: "foo"}, - result: schema.GroupVersionResource{}, - err: &NoResourceMatchError{PartialResource: schema.GroupVersionResource{Resource: "foo"}}, - }, - { - name: "accept first failure", - mapper: MultiRESTMapper{fixedRESTMapper{err: errors.New("fail on this")}, fixedRESTMapper{resourcesFor: []schema.GroupVersionResource{{Resource: "unused"}}}}, - input: schema.GroupVersionResource{Resource: "foo"}, - result: schema.GroupVersionResource{}, - err: errors.New("fail on this"), - }, - } - - for _, tc := range tcs { - actualResult, actualErr := tc.mapper.ResourceFor(tc.input) - if e, a := tc.result, actualResult; e != a { - t.Errorf("%s: expected %v, got %v", tc.name, e, a) - } - switch { - case tc.err == nil && actualErr == nil: - case tc.err == nil: - t.Errorf("%s: unexpected error: %v", tc.name, actualErr) - case actualErr == nil: - t.Errorf("%s: expected error: %v got nil", tc.name, tc.err) - case tc.err.Error() != actualErr.Error(): - t.Errorf("%s: expected %v, got %v", tc.name, tc.err, actualErr) - } - } -} - -func TestMultiRESTMapperResourcesFor(t *testing.T) { - tcs := []struct { - name string - - mapper MultiRESTMapper - input schema.GroupVersionResource - result []schema.GroupVersionResource - err error - }{ - { - name: "empty", - mapper: MultiRESTMapper{}, - input: schema.GroupVersionResource{Resource: "foo"}, - result: nil, - err: &NoResourceMatchError{PartialResource: schema.GroupVersionResource{Resource: "foo"}}, - }, - { - name: "ignore not found", - mapper: MultiRESTMapper{fixedRESTMapper{err: &NoResourceMatchError{PartialResource: schema.GroupVersionResource{Resource: "IGNORE_THIS"}}}}, - input: schema.GroupVersionResource{Resource: "foo"}, - result: nil, - err: &NoResourceMatchError{PartialResource: schema.GroupVersionResource{Resource: "foo"}}, - }, - { - name: "accept first failure", - mapper: MultiRESTMapper{fixedRESTMapper{err: errors.New("fail on this")}, fixedRESTMapper{resourcesFor: []schema.GroupVersionResource{{Resource: "unused"}}}}, - input: schema.GroupVersionResource{Resource: "foo"}, - result: nil, - err: errors.New("fail on this"), - }, - { - name: "union and dedup", - mapper: MultiRESTMapper{ - fixedRESTMapper{resourcesFor: []schema.GroupVersionResource{{Resource: "dupe"}, {Resource: "first"}}}, - fixedRESTMapper{resourcesFor: []schema.GroupVersionResource{{Resource: "dupe"}, {Resource: "second"}}}, - }, - input: schema.GroupVersionResource{Resource: "foo"}, - result: []schema.GroupVersionResource{{Resource: "dupe"}, {Resource: "first"}, {Resource: "second"}}, - }, - { - name: "skip not and continue", - mapper: MultiRESTMapper{ - fixedRESTMapper{err: &NoResourceMatchError{PartialResource: schema.GroupVersionResource{Resource: "IGNORE_THIS"}}}, - fixedRESTMapper{resourcesFor: []schema.GroupVersionResource{{Resource: "first"}, {Resource: "second"}}}, - }, - input: schema.GroupVersionResource{Resource: "foo"}, - result: []schema.GroupVersionResource{{Resource: "first"}, {Resource: "second"}}, - }, - } - - for _, tc := range tcs { - actualResult, actualErr := tc.mapper.ResourcesFor(tc.input) - if e, a := tc.result, actualResult; !reflect.DeepEqual(e, a) { - t.Errorf("%s: expected %v, got %v", tc.name, e, a) - } - switch { - case tc.err == nil && actualErr == nil: - case tc.err == nil: - t.Errorf("%s: unexpected error: %v", tc.name, actualErr) - case actualErr == nil: - t.Errorf("%s: expected error: %v got nil", tc.name, tc.err) - case tc.err.Error() != actualErr.Error(): - t.Errorf("%s: expected %v, got %v", tc.name, tc.err, actualErr) - } - } -} - -func TestMultiRESTMapperKindsFor(t *testing.T) { - tcs := []struct { - name string - - mapper MultiRESTMapper - input schema.GroupVersionResource - result []schema.GroupVersionKind - err error - }{ - { - name: "empty", - mapper: MultiRESTMapper{}, - input: schema.GroupVersionResource{Resource: "foo"}, - result: nil, - err: &NoResourceMatchError{PartialResource: schema.GroupVersionResource{Resource: "foo"}}, - }, - { - name: "ignore not found", - mapper: MultiRESTMapper{fixedRESTMapper{err: &NoResourceMatchError{PartialResource: schema.GroupVersionResource{Resource: "IGNORE_THIS"}}}}, - input: schema.GroupVersionResource{Resource: "foo"}, - result: nil, - err: &NoResourceMatchError{PartialResource: schema.GroupVersionResource{Resource: "foo"}}, - }, - { - name: "accept first failure", - mapper: MultiRESTMapper{fixedRESTMapper{err: errors.New("fail on this")}, fixedRESTMapper{kindsFor: []schema.GroupVersionKind{{Kind: "unused"}}}}, - input: schema.GroupVersionResource{Resource: "foo"}, - result: nil, - err: errors.New("fail on this"), - }, - { - name: "union and dedup", - mapper: MultiRESTMapper{ - fixedRESTMapper{kindsFor: []schema.GroupVersionKind{{Kind: "dupe"}, {Kind: "first"}}}, - fixedRESTMapper{kindsFor: []schema.GroupVersionKind{{Kind: "dupe"}, {Kind: "second"}}}, - }, - input: schema.GroupVersionResource{Resource: "foo"}, - result: []schema.GroupVersionKind{{Kind: "dupe"}, {Kind: "first"}, {Kind: "second"}}, - }, - { - name: "skip not and continue", - mapper: MultiRESTMapper{ - fixedRESTMapper{err: &NoResourceMatchError{PartialResource: schema.GroupVersionResource{Resource: "IGNORE_THIS"}}}, - fixedRESTMapper{kindsFor: []schema.GroupVersionKind{{Kind: "first"}, {Kind: "second"}}}, - }, - input: schema.GroupVersionResource{Resource: "foo"}, - result: []schema.GroupVersionKind{{Kind: "first"}, {Kind: "second"}}, - }, - } - - for _, tc := range tcs { - actualResult, actualErr := tc.mapper.KindsFor(tc.input) - if e, a := tc.result, actualResult; !reflect.DeepEqual(e, a) { - t.Errorf("%s: expected %v, got %v", tc.name, e, a) - } - switch { - case tc.err == nil && actualErr == nil: - case tc.err == nil: - t.Errorf("%s: unexpected error: %v", tc.name, actualErr) - case actualErr == nil: - t.Errorf("%s: expected error: %v got nil", tc.name, tc.err) - case tc.err.Error() != actualErr.Error(): - t.Errorf("%s: expected %v, got %v", tc.name, tc.err, actualErr) - } - } -} - -func TestMultiRESTMapperKindFor(t *testing.T) { - tcs := []struct { - name string - - mapper MultiRESTMapper - input schema.GroupVersionResource - result schema.GroupVersionKind - err error - }{ - { - name: "empty", - mapper: MultiRESTMapper{}, - input: schema.GroupVersionResource{Resource: "foo"}, - result: schema.GroupVersionKind{}, - err: &NoResourceMatchError{PartialResource: schema.GroupVersionResource{Resource: "foo"}}, - }, - { - name: "ignore not found", - mapper: MultiRESTMapper{fixedRESTMapper{err: &NoResourceMatchError{PartialResource: schema.GroupVersionResource{Resource: "IGNORE_THIS"}}}}, - input: schema.GroupVersionResource{Resource: "foo"}, - result: schema.GroupVersionKind{}, - err: &NoResourceMatchError{PartialResource: schema.GroupVersionResource{Resource: "foo"}}, - }, - { - name: "accept first failure", - mapper: MultiRESTMapper{fixedRESTMapper{err: errors.New("fail on this")}, fixedRESTMapper{kindsFor: []schema.GroupVersionKind{{Kind: "unused"}}}}, - input: schema.GroupVersionResource{Resource: "foo"}, - result: schema.GroupVersionKind{}, - err: errors.New("fail on this"), - }, - } - - for _, tc := range tcs { - actualResult, actualErr := tc.mapper.KindFor(tc.input) - if e, a := tc.result, actualResult; e != a { - t.Errorf("%s: expected %v, got %v", tc.name, e, a) - } - switch { - case tc.err == nil && actualErr == nil: - case tc.err == nil: - t.Errorf("%s: unexpected error: %v", tc.name, actualErr) - case actualErr == nil: - t.Errorf("%s: expected error: %v got nil", tc.name, tc.err) - case tc.err.Error() != actualErr.Error(): - t.Errorf("%s: expected %v, got %v", tc.name, tc.err, actualErr) - } - } -} - -func TestMultiRESTMapperRESTMappings(t *testing.T) { - mapping1, mapping2 := &RESTMapping{}, &RESTMapping{} - tcs := []struct { - name string - - mapper MultiRESTMapper - input schema.GroupKind - result []*RESTMapping - err error - }{ - { - name: "empty", - mapper: MultiRESTMapper{}, - input: schema.GroupKind{Kind: "Foo"}, - result: nil, - err: &NoKindMatchError{PartialKind: schema.GroupVersionKind{Kind: "Foo"}}, - }, - { - name: "ignore not found", - mapper: MultiRESTMapper{fixedRESTMapper{err: &NoKindMatchError{PartialKind: schema.GroupVersionKind{Kind: "IGNORE_THIS"}}}}, - input: schema.GroupKind{Kind: "Foo"}, - result: nil, - err: &NoKindMatchError{PartialKind: schema.GroupVersionKind{Kind: "Foo"}}, - }, - { - name: "accept first failure", - mapper: MultiRESTMapper{fixedRESTMapper{err: errors.New("fail on this")}, fixedRESTMapper{mappings: []*RESTMapping{mapping1}}}, - input: schema.GroupKind{Kind: "Foo"}, - result: nil, - err: errors.New("fail on this"), - }, - { - name: "return both", - mapper: MultiRESTMapper{fixedRESTMapper{mappings: []*RESTMapping{mapping1}}, fixedRESTMapper{mappings: []*RESTMapping{mapping2}}}, - input: schema.GroupKind{Kind: "Foo"}, - result: []*RESTMapping{mapping1, mapping2}, - }, - } - - for _, tc := range tcs { - actualResult, actualErr := tc.mapper.RESTMappings(tc.input) - if e, a := tc.result, actualResult; !reflect.DeepEqual(e, a) { - t.Errorf("%s: expected %v, got %v", tc.name, e, a) - } - switch { - case tc.err == nil && actualErr == nil: - case tc.err == nil: - t.Errorf("%s: unexpected error: %v", tc.name, actualErr) - case actualErr == nil: - t.Errorf("%s: expected error: %v got nil", tc.name, tc.err) - case tc.err.Error() != actualErr.Error(): - t.Errorf("%s: expected %v, got %v", tc.name, tc.err, actualErr) - } - } -} - -type fixedRESTMapper struct { - resourcesFor []schema.GroupVersionResource - kindsFor []schema.GroupVersionKind - resourceFor schema.GroupVersionResource - kindFor schema.GroupVersionKind - mappings []*RESTMapping - - err error -} - -func (m fixedRESTMapper) ResourceSingularizer(resource string) (singular string, err error) { - return "", m.err -} - -func (m fixedRESTMapper) ResourcesFor(resource schema.GroupVersionResource) ([]schema.GroupVersionResource, error) { - return m.resourcesFor, m.err -} - -func (m fixedRESTMapper) KindsFor(resource schema.GroupVersionResource) (gvk []schema.GroupVersionKind, err error) { - return m.kindsFor, m.err -} - -func (m fixedRESTMapper) ResourceFor(resource schema.GroupVersionResource) (schema.GroupVersionResource, error) { - return m.resourceFor, m.err -} - -func (m fixedRESTMapper) KindFor(resource schema.GroupVersionResource) (schema.GroupVersionKind, error) { - return m.kindFor, m.err -} - -func (m fixedRESTMapper) RESTMapping(gk schema.GroupKind, versions ...string) (mapping *RESTMapping, err error) { - return nil, m.err -} - -func (m fixedRESTMapper) RESTMappings(gk schema.GroupKind, versions ...string) (mappings []*RESTMapping, err error) { - return m.mappings, m.err -} - -func (m fixedRESTMapper) AliasesForResource(alias string) (aliases []string, ok bool) { - return nil, false -} - -func (m fixedRESTMapper) ResourceIsValid(resource schema.GroupVersionResource) bool { - return false -} diff --git a/vendor/k8s.io/kubernetes/pkg/api/meta/priority.go b/vendor/k8s.io/kubernetes/pkg/api/meta/priority.go deleted file mode 100644 index b9dca1a5..00000000 --- a/vendor/k8s.io/kubernetes/pkg/api/meta/priority.go +++ /dev/null @@ -1,226 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package meta - -import ( - "fmt" - - "k8s.io/kubernetes/pkg/runtime/schema" -) - -const ( - AnyGroup = "*" - AnyVersion = "*" - AnyResource = "*" - AnyKind = "*" -) - -// PriorityRESTMapper is a wrapper for automatically choosing a particular Resource or Kind -// when multiple matches are possible -type PriorityRESTMapper struct { - // Delegate is the RESTMapper to use to locate all the Kind and Resource matches - Delegate RESTMapper - - // ResourcePriority is a list of priority patterns to apply to matching resources. - // The list of all matching resources is narrowed based on the patterns until only one remains. - // A pattern with no matches is skipped. A pattern with more than one match uses its - // matches as the list to continue matching against. - ResourcePriority []schema.GroupVersionResource - - // KindPriority is a list of priority patterns to apply to matching kinds. - // The list of all matching kinds is narrowed based on the patterns until only one remains. - // A pattern with no matches is skipped. A pattern with more than one match uses its - // matches as the list to continue matching against. - KindPriority []schema.GroupVersionKind -} - -func (m PriorityRESTMapper) String() string { - return fmt.Sprintf("PriorityRESTMapper{\n\t%v\n\t%v\n\t%v\n}", m.ResourcePriority, m.KindPriority, m.Delegate) -} - -// ResourceFor finds all resources, then passes them through the ResourcePriority patterns to find a single matching hit. -func (m PriorityRESTMapper) ResourceFor(partiallySpecifiedResource schema.GroupVersionResource) (schema.GroupVersionResource, error) { - originalGVRs, err := m.Delegate.ResourcesFor(partiallySpecifiedResource) - if err != nil { - return schema.GroupVersionResource{}, err - } - if len(originalGVRs) == 1 { - return originalGVRs[0], nil - } - - remainingGVRs := append([]schema.GroupVersionResource{}, originalGVRs...) - for _, pattern := range m.ResourcePriority { - matchedGVRs := []schema.GroupVersionResource{} - for _, gvr := range remainingGVRs { - if resourceMatches(pattern, gvr) { - matchedGVRs = append(matchedGVRs, gvr) - } - } - - switch len(matchedGVRs) { - case 0: - // if you have no matches, then nothing matched this pattern just move to the next - continue - case 1: - // one match, return - return matchedGVRs[0], nil - default: - // more than one match, use the matched hits as the list moving to the next pattern. - // this way you can have a series of selection criteria - remainingGVRs = matchedGVRs - } - } - - return schema.GroupVersionResource{}, &AmbiguousResourceError{PartialResource: partiallySpecifiedResource, MatchingResources: originalGVRs} -} - -// KindFor finds all kinds, then passes them through the KindPriority patterns to find a single matching hit. -func (m PriorityRESTMapper) KindFor(partiallySpecifiedResource schema.GroupVersionResource) (schema.GroupVersionKind, error) { - originalGVKs, err := m.Delegate.KindsFor(partiallySpecifiedResource) - if err != nil { - return schema.GroupVersionKind{}, err - } - if len(originalGVKs) == 1 { - return originalGVKs[0], nil - } - - remainingGVKs := append([]schema.GroupVersionKind{}, originalGVKs...) - for _, pattern := range m.KindPriority { - matchedGVKs := []schema.GroupVersionKind{} - for _, gvr := range remainingGVKs { - if kindMatches(pattern, gvr) { - matchedGVKs = append(matchedGVKs, gvr) - } - } - - switch len(matchedGVKs) { - case 0: - // if you have no matches, then nothing matched this pattern just move to the next - continue - case 1: - // one match, return - return matchedGVKs[0], nil - default: - // more than one match, use the matched hits as the list moving to the next pattern. - // this way you can have a series of selection criteria - remainingGVKs = matchedGVKs - } - } - - return schema.GroupVersionKind{}, &AmbiguousResourceError{PartialResource: partiallySpecifiedResource, MatchingKinds: originalGVKs} -} - -func resourceMatches(pattern schema.GroupVersionResource, resource schema.GroupVersionResource) bool { - if pattern.Group != AnyGroup && pattern.Group != resource.Group { - return false - } - if pattern.Version != AnyVersion && pattern.Version != resource.Version { - return false - } - if pattern.Resource != AnyResource && pattern.Resource != resource.Resource { - return false - } - - return true -} - -func kindMatches(pattern schema.GroupVersionKind, kind schema.GroupVersionKind) bool { - if pattern.Group != AnyGroup && pattern.Group != kind.Group { - return false - } - if pattern.Version != AnyVersion && pattern.Version != kind.Version { - return false - } - if pattern.Kind != AnyKind && pattern.Kind != kind.Kind { - return false - } - - return true -} - -func (m PriorityRESTMapper) RESTMapping(gk schema.GroupKind, versions ...string) (mapping *RESTMapping, err error) { - mappings, err := m.Delegate.RESTMappings(gk) - if err != nil { - return nil, err - } - - // any versions the user provides take priority - priorities := m.KindPriority - if len(versions) > 0 { - priorities = make([]schema.GroupVersionKind, 0, len(m.KindPriority)+len(versions)) - for _, version := range versions { - gv := schema.GroupVersion{ - Version: version, - Group: gk.Group, - } - priorities = append(priorities, gv.WithKind(AnyKind)) - } - priorities = append(priorities, m.KindPriority...) - } - - remaining := append([]*RESTMapping{}, mappings...) - for _, pattern := range priorities { - var matching []*RESTMapping - for _, m := range remaining { - if kindMatches(pattern, m.GroupVersionKind) { - matching = append(matching, m) - } - } - - switch len(matching) { - case 0: - // if you have no matches, then nothing matched this pattern just move to the next - continue - case 1: - // one match, return - return matching[0], nil - default: - // more than one match, use the matched hits as the list moving to the next pattern. - // this way you can have a series of selection criteria - remaining = matching - } - } - if len(remaining) == 1 { - return remaining[0], nil - } - - var kinds []schema.GroupVersionKind - for _, m := range mappings { - kinds = append(kinds, m.GroupVersionKind) - } - return nil, &AmbiguousKindError{PartialKind: gk.WithVersion(""), MatchingKinds: kinds} -} - -func (m PriorityRESTMapper) RESTMappings(gk schema.GroupKind, versions ...string) ([]*RESTMapping, error) { - return m.Delegate.RESTMappings(gk, versions...) -} - -func (m PriorityRESTMapper) AliasesForResource(alias string) (aliases []string, ok bool) { - return m.Delegate.AliasesForResource(alias) -} - -func (m PriorityRESTMapper) ResourceSingularizer(resource string) (singular string, err error) { - return m.Delegate.ResourceSingularizer(resource) -} - -func (m PriorityRESTMapper) ResourcesFor(partiallySpecifiedResource schema.GroupVersionResource) ([]schema.GroupVersionResource, error) { - return m.Delegate.ResourcesFor(partiallySpecifiedResource) -} - -func (m PriorityRESTMapper) KindsFor(partiallySpecifiedResource schema.GroupVersionResource) (gvk []schema.GroupVersionKind, err error) { - return m.Delegate.KindsFor(partiallySpecifiedResource) -} diff --git a/vendor/k8s.io/kubernetes/pkg/api/meta/priority_test.go b/vendor/k8s.io/kubernetes/pkg/api/meta/priority_test.go deleted file mode 100644 index 45229eee..00000000 --- a/vendor/k8s.io/kubernetes/pkg/api/meta/priority_test.go +++ /dev/null @@ -1,346 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package meta - -import ( - "errors" - "reflect" - "strings" - "testing" - - "k8s.io/kubernetes/pkg/runtime/schema" -) - -func TestPriorityRESTMapperResourceForErrorHandling(t *testing.T) { - tcs := []struct { - name string - - delegate RESTMapper - resourcePatterns []schema.GroupVersionResource - result schema.GroupVersionResource - err string - }{ - { - name: "single hit", - delegate: fixedRESTMapper{resourcesFor: []schema.GroupVersionResource{{Resource: "single-hit"}}}, - result: schema.GroupVersionResource{Resource: "single-hit"}, - }, - { - name: "ambiguous match", - delegate: fixedRESTMapper{resourcesFor: []schema.GroupVersionResource{ - {Group: "one", Version: "a", Resource: "first"}, - {Group: "two", Version: "b", Resource: "second"}, - }}, - err: "matches multiple resources", - }, - { - name: "group selection", - delegate: fixedRESTMapper{resourcesFor: []schema.GroupVersionResource{ - {Group: "one", Version: "a", Resource: "first"}, - {Group: "two", Version: "b", Resource: "second"}, - }}, - resourcePatterns: []schema.GroupVersionResource{ - {Group: "one", Version: AnyVersion, Resource: AnyResource}, - }, - result: schema.GroupVersionResource{Group: "one", Version: "a", Resource: "first"}, - }, - { - name: "empty match continues", - delegate: fixedRESTMapper{resourcesFor: []schema.GroupVersionResource{ - {Group: "one", Version: "a", Resource: "first"}, - {Group: "two", Version: "b", Resource: "second"}, - }}, - resourcePatterns: []schema.GroupVersionResource{ - {Group: "fail", Version: AnyVersion, Resource: AnyResource}, - {Group: "one", Version: AnyVersion, Resource: AnyResource}, - }, - result: schema.GroupVersionResource{Group: "one", Version: "a", Resource: "first"}, - }, - { - name: "group followed by version selection", - delegate: fixedRESTMapper{resourcesFor: []schema.GroupVersionResource{ - {Group: "one", Version: "a", Resource: "first"}, - {Group: "two", Version: "b", Resource: "second"}, - {Group: "one", Version: "c", Resource: "third"}, - }}, - resourcePatterns: []schema.GroupVersionResource{ - {Group: "one", Version: AnyVersion, Resource: AnyResource}, - {Group: AnyGroup, Version: "a", Resource: AnyResource}, - }, - result: schema.GroupVersionResource{Group: "one", Version: "a", Resource: "first"}, - }, - { - name: "resource selection", - delegate: fixedRESTMapper{resourcesFor: []schema.GroupVersionResource{ - {Group: "one", Version: "a", Resource: "first"}, - {Group: "one", Version: "a", Resource: "second"}, - }}, - resourcePatterns: []schema.GroupVersionResource{ - {Group: AnyGroup, Version: AnyVersion, Resource: "second"}, - }, - result: schema.GroupVersionResource{Group: "one", Version: "a", Resource: "second"}, - }, - } - - for _, tc := range tcs { - mapper := PriorityRESTMapper{Delegate: tc.delegate, ResourcePriority: tc.resourcePatterns} - - actualResult, actualErr := mapper.ResourceFor(schema.GroupVersionResource{}) - if e, a := tc.result, actualResult; e != a { - t.Errorf("%s: expected %v, got %v", tc.name, e, a) - } - if len(tc.err) == 0 && actualErr == nil { - continue - } - if len(tc.err) > 0 && actualErr == nil { - t.Errorf("%s: missing expected err: %v", tc.name, tc.err) - continue - } - if !strings.Contains(actualErr.Error(), tc.err) { - t.Errorf("%s: expected %v, got %v", tc.name, tc.err, actualErr) - } - } -} - -func TestPriorityRESTMapperKindForErrorHandling(t *testing.T) { - tcs := []struct { - name string - - delegate RESTMapper - kindPatterns []schema.GroupVersionKind - result schema.GroupVersionKind - err string - }{ - { - name: "single hit", - delegate: fixedRESTMapper{kindsFor: []schema.GroupVersionKind{{Kind: "single-hit"}}}, - result: schema.GroupVersionKind{Kind: "single-hit"}, - }, - { - name: "ambiguous match", - delegate: fixedRESTMapper{kindsFor: []schema.GroupVersionKind{ - {Group: "one", Version: "a", Kind: "first"}, - {Group: "two", Version: "b", Kind: "second"}, - }}, - err: "matches multiple kinds", - }, - { - name: "group selection", - delegate: fixedRESTMapper{kindsFor: []schema.GroupVersionKind{ - {Group: "one", Version: "a", Kind: "first"}, - {Group: "two", Version: "b", Kind: "second"}, - }}, - kindPatterns: []schema.GroupVersionKind{ - {Group: "one", Version: AnyVersion, Kind: AnyKind}, - }, - result: schema.GroupVersionKind{Group: "one", Version: "a", Kind: "first"}, - }, - { - name: "empty match continues", - delegate: fixedRESTMapper{kindsFor: []schema.GroupVersionKind{ - {Group: "one", Version: "a", Kind: "first"}, - {Group: "two", Version: "b", Kind: "second"}, - }}, - kindPatterns: []schema.GroupVersionKind{ - {Group: "fail", Version: AnyVersion, Kind: AnyKind}, - {Group: "one", Version: AnyVersion, Kind: AnyKind}, - }, - result: schema.GroupVersionKind{Group: "one", Version: "a", Kind: "first"}, - }, - { - name: "group followed by version selection", - delegate: fixedRESTMapper{kindsFor: []schema.GroupVersionKind{ - {Group: "one", Version: "a", Kind: "first"}, - {Group: "two", Version: "b", Kind: "second"}, - {Group: "one", Version: "c", Kind: "third"}, - }}, - kindPatterns: []schema.GroupVersionKind{ - {Group: "one", Version: AnyVersion, Kind: AnyKind}, - {Group: AnyGroup, Version: "a", Kind: AnyKind}, - }, - result: schema.GroupVersionKind{Group: "one", Version: "a", Kind: "first"}, - }, - { - name: "kind selection", - delegate: fixedRESTMapper{kindsFor: []schema.GroupVersionKind{ - {Group: "one", Version: "a", Kind: "first"}, - {Group: "one", Version: "a", Kind: "second"}, - }}, - kindPatterns: []schema.GroupVersionKind{ - {Group: AnyGroup, Version: AnyVersion, Kind: "second"}, - }, - result: schema.GroupVersionKind{Group: "one", Version: "a", Kind: "second"}, - }, - } - - for _, tc := range tcs { - mapper := PriorityRESTMapper{Delegate: tc.delegate, KindPriority: tc.kindPatterns} - - actualResult, actualErr := mapper.KindFor(schema.GroupVersionResource{}) - if e, a := tc.result, actualResult; e != a { - t.Errorf("%s: expected %v, got %v", tc.name, e, a) - } - if len(tc.err) == 0 && actualErr == nil { - continue - } - if len(tc.err) > 0 && actualErr == nil { - t.Errorf("%s: missing expected err: %v", tc.name, tc.err) - continue - } - if !strings.Contains(actualErr.Error(), tc.err) { - t.Errorf("%s: expected %v, got %v", tc.name, tc.err, actualErr) - } - } -} - -func TestPriorityRESTMapperRESTMapping(t *testing.T) { - mapping1 := &RESTMapping{ - GroupVersionKind: schema.GroupVersionKind{Kind: "Foo", Version: "v1alpha1"}, - } - mapping2 := &RESTMapping{ - GroupVersionKind: schema.GroupVersionKind{Kind: "Foo", Version: "v1"}, - } - mapping3 := &RESTMapping{ - GroupVersionKind: schema.GroupVersionKind{Group: "other", Kind: "Foo", Version: "v1"}, - } - allMappers := MultiRESTMapper{ - fixedRESTMapper{mappings: []*RESTMapping{mapping1}}, - fixedRESTMapper{mappings: []*RESTMapping{mapping2}}, - fixedRESTMapper{mappings: []*RESTMapping{mapping3}}, - } - tcs := []struct { - name string - - mapper PriorityRESTMapper - input schema.GroupKind - result *RESTMapping - err error - }{ - { - name: "empty", - mapper: PriorityRESTMapper{Delegate: MultiRESTMapper{}}, - input: schema.GroupKind{Kind: "Foo"}, - err: &NoKindMatchError{PartialKind: schema.GroupVersionKind{Kind: "Foo"}}, - }, - { - name: "ignore not found", - mapper: PriorityRESTMapper{Delegate: MultiRESTMapper{fixedRESTMapper{err: &NoKindMatchError{PartialKind: schema.GroupVersionKind{Kind: "IGNORE_THIS"}}}}}, - input: schema.GroupKind{Kind: "Foo"}, - err: &NoKindMatchError{PartialKind: schema.GroupVersionKind{Kind: "Foo"}}, - }, - { - name: "accept first failure", - mapper: PriorityRESTMapper{Delegate: MultiRESTMapper{fixedRESTMapper{err: errors.New("fail on this")}, fixedRESTMapper{mappings: []*RESTMapping{mapping1}}}}, - input: schema.GroupKind{Kind: "Foo"}, - err: errors.New("fail on this"), - }, - { - name: "return error for ambiguous", - mapper: PriorityRESTMapper{ - Delegate: allMappers, - }, - input: schema.GroupKind{Kind: "Foo"}, - err: &AmbiguousKindError{ - PartialKind: schema.GroupVersionKind{Kind: "Foo"}, - MatchingKinds: []schema.GroupVersionKind{ - {Kind: "Foo", Version: "v1alpha1"}, - {Kind: "Foo", Version: "v1"}, - {Group: "other", Kind: "Foo", Version: "v1"}, - }, - }, - }, - { - name: "accept only item", - mapper: PriorityRESTMapper{ - Delegate: fixedRESTMapper{mappings: []*RESTMapping{mapping1}}, - }, - input: schema.GroupKind{Kind: "Foo"}, - result: mapping1, - }, - { - name: "return single priority", - mapper: PriorityRESTMapper{ - Delegate: allMappers, - KindPriority: []schema.GroupVersionKind{{Version: "v1", Kind: AnyKind}, {Version: "v1alpha1", Kind: AnyKind}}, - }, - input: schema.GroupKind{Kind: "Foo"}, - result: mapping2, - }, - { - name: "return out of group match", - mapper: PriorityRESTMapper{ - Delegate: allMappers, - KindPriority: []schema.GroupVersionKind{{Group: AnyGroup, Version: "v1", Kind: AnyKind}, {Group: "other", Version: AnyVersion, Kind: AnyKind}}, - }, - input: schema.GroupKind{Kind: "Foo"}, - result: mapping3, - }, - } - - for _, tc := range tcs { - actualResult, actualErr := tc.mapper.RESTMapping(tc.input) - if e, a := tc.result, actualResult; !reflect.DeepEqual(e, a) { - t.Errorf("%s: expected %v, got %v", tc.name, e, a) - } - switch { - case tc.err == nil && actualErr == nil: - case tc.err == nil: - t.Errorf("%s: unexpected error: %v", tc.name, actualErr) - case actualErr == nil: - t.Errorf("%s: expected error: %v got nil", tc.name, tc.err) - case tc.err.Error() != actualErr.Error(): - t.Errorf("%s: expected %v, got %v", tc.name, tc.err, actualErr) - } - } -} - -func TestPriorityRESTMapperRESTMappingHonorsUserVersion(t *testing.T) { - mappingV2alpha1 := &RESTMapping{ - GroupVersionKind: schema.GroupVersionKind{Group: "Bar", Kind: "Foo", Version: "v2alpha1"}, - } - mappingV1 := &RESTMapping{ - GroupVersionKind: schema.GroupVersionKind{Group: "Bar", Kind: "Foo", Version: "v1"}, - } - - allMappers := MultiRESTMapper{ - fixedRESTMapper{mappings: []*RESTMapping{mappingV2alpha1}}, - fixedRESTMapper{mappings: []*RESTMapping{mappingV1}}, - } - - mapper := PriorityRESTMapper{ - Delegate: allMappers, - KindPriority: []schema.GroupVersionKind{{Group: "Bar", Version: "v2alpha1", Kind: AnyKind}, {Group: "Bar", Version: AnyVersion, Kind: AnyKind}}, - } - - outMapping1, err := mapper.RESTMapping(schema.GroupKind{Group: "Bar", Kind: "Foo"}, "v1") - if err != nil { - t.Errorf("unexpected error: %v", err) - } - - if outMapping1 != mappingV1 { - t.Errorf("asked for version %v, expected mapping for %v, got mapping for %v", "v1", mappingV1.GroupVersionKind, outMapping1.GroupVersionKind) - } - - outMapping2, err := mapper.RESTMapping(schema.GroupKind{Group: "Bar", Kind: "Foo"}, "v2alpha1") - if err != nil { - t.Errorf("unexpected error: %v", err) - } - - if outMapping2 != mappingV2alpha1 { - t.Errorf("asked for version %v, expected mapping for %v, got mapping for %v", "v2alpha1", mappingV2alpha1.GroupVersionKind, outMapping2.GroupVersionKind) - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/api/meta/restmapper.go b/vendor/k8s.io/kubernetes/pkg/api/meta/restmapper.go deleted file mode 100644 index eb2f6382..00000000 --- a/vendor/k8s.io/kubernetes/pkg/api/meta/restmapper.go +++ /dev/null @@ -1,566 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// TODO: move everything in this file to pkg/api/rest -package meta - -import ( - "fmt" - "sort" - "strings" - - "k8s.io/kubernetes/pkg/runtime" - "k8s.io/kubernetes/pkg/runtime/schema" -) - -// Implements RESTScope interface -type restScope struct { - name RESTScopeName - paramName string - argumentName string - paramDescription string -} - -func (r *restScope) Name() RESTScopeName { - return r.name -} -func (r *restScope) ParamName() string { - return r.paramName -} -func (r *restScope) ArgumentName() string { - return r.argumentName -} -func (r *restScope) ParamDescription() string { - return r.paramDescription -} - -var RESTScopeNamespace = &restScope{ - name: RESTScopeNameNamespace, - paramName: "namespaces", - argumentName: "namespace", - paramDescription: "object name and auth scope, such as for teams and projects", -} - -var RESTScopeRoot = &restScope{ - name: RESTScopeNameRoot, -} - -// DefaultRESTMapper exposes mappings between the types defined in a -// runtime.Scheme. It assumes that all types defined the provided scheme -// can be mapped with the provided MetadataAccessor and Codec interfaces. -// -// The resource name of a Kind is defined as the lowercase, -// English-plural version of the Kind string. -// When converting from resource to Kind, the singular version of the -// resource name is also accepted for convenience. -// -// TODO: Only accept plural for some operations for increased control? -// (`get pod bar` vs `get pods bar`) -type DefaultRESTMapper struct { - defaultGroupVersions []schema.GroupVersion - - resourceToKind map[schema.GroupVersionResource]schema.GroupVersionKind - kindToPluralResource map[schema.GroupVersionKind]schema.GroupVersionResource - kindToScope map[schema.GroupVersionKind]RESTScope - singularToPlural map[schema.GroupVersionResource]schema.GroupVersionResource - pluralToSingular map[schema.GroupVersionResource]schema.GroupVersionResource - - interfacesFunc VersionInterfacesFunc - - // aliasToResource is used for mapping aliases to resources - aliasToResource map[string][]string -} - -func (m *DefaultRESTMapper) String() string { - return fmt.Sprintf("DefaultRESTMapper{kindToPluralResource=%v}", m.kindToPluralResource) -} - -var _ RESTMapper = &DefaultRESTMapper{} - -// VersionInterfacesFunc returns the appropriate typer, and metadata accessor for a -// given api version, or an error if no such api version exists. -type VersionInterfacesFunc func(version schema.GroupVersion) (*VersionInterfaces, error) - -// NewDefaultRESTMapper initializes a mapping between Kind and APIVersion -// to a resource name and back based on the objects in a runtime.Scheme -// and the Kubernetes API conventions. Takes a group name, a priority list of the versions -// to search when an object has no default version (set empty to return an error), -// and a function that retrieves the correct metadata for a given version. -func NewDefaultRESTMapper(defaultGroupVersions []schema.GroupVersion, f VersionInterfacesFunc) *DefaultRESTMapper { - resourceToKind := make(map[schema.GroupVersionResource]schema.GroupVersionKind) - kindToPluralResource := make(map[schema.GroupVersionKind]schema.GroupVersionResource) - kindToScope := make(map[schema.GroupVersionKind]RESTScope) - singularToPlural := make(map[schema.GroupVersionResource]schema.GroupVersionResource) - pluralToSingular := make(map[schema.GroupVersionResource]schema.GroupVersionResource) - aliasToResource := make(map[string][]string) - // TODO: verify name mappings work correctly when versions differ - - return &DefaultRESTMapper{ - resourceToKind: resourceToKind, - kindToPluralResource: kindToPluralResource, - kindToScope: kindToScope, - defaultGroupVersions: defaultGroupVersions, - singularToPlural: singularToPlural, - pluralToSingular: pluralToSingular, - aliasToResource: aliasToResource, - interfacesFunc: f, - } -} - -func (m *DefaultRESTMapper) Add(kind schema.GroupVersionKind, scope RESTScope) { - plural, singular := KindToResource(kind) - - m.singularToPlural[singular] = plural - m.pluralToSingular[plural] = singular - - m.resourceToKind[singular] = kind - m.resourceToKind[plural] = kind - - m.kindToPluralResource[kind] = plural - m.kindToScope[kind] = scope -} - -// unpluralizedSuffixes is a list of resource suffixes that are the same plural and singular -// This is only is only necessary because some bits of code are lazy and don't actually use the RESTMapper like they should. -// TODO eliminate this so that different callers can correctly map to resources. This probably means updating all -// callers to use the RESTMapper they mean. -var unpluralizedSuffixes = []string{ - "endpoints", -} - -// KindToResource converts Kind to a resource name. -// Broken. This method only "sort of" works when used outside of this package. It assumes that Kinds and Resources match -// and they aren't guaranteed to do so. -func KindToResource(kind schema.GroupVersionKind) ( /*plural*/ schema.GroupVersionResource /*singular*/, schema.GroupVersionResource) { - kindName := kind.Kind - if len(kindName) == 0 { - return schema.GroupVersionResource{}, schema.GroupVersionResource{} - } - singularName := strings.ToLower(kindName) - singular := kind.GroupVersion().WithResource(singularName) - - for _, skip := range unpluralizedSuffixes { - if strings.HasSuffix(singularName, skip) { - return singular, singular - } - } - - switch string(singularName[len(singularName)-1]) { - case "s": - return kind.GroupVersion().WithResource(singularName + "es"), singular - case "y": - return kind.GroupVersion().WithResource(strings.TrimSuffix(singularName, "y") + "ies"), singular - } - - return kind.GroupVersion().WithResource(singularName + "s"), singular -} - -// ResourceSingularizer implements RESTMapper -// It converts a resource name from plural to singular (e.g., from pods to pod) -func (m *DefaultRESTMapper) ResourceSingularizer(resourceType string) (string, error) { - partialResource := schema.GroupVersionResource{Resource: resourceType} - resources, err := m.ResourcesFor(partialResource) - if err != nil { - return resourceType, err - } - - singular := schema.GroupVersionResource{} - for _, curr := range resources { - currSingular, ok := m.pluralToSingular[curr] - if !ok { - continue - } - if singular.Empty() { - singular = currSingular - continue - } - - if currSingular.Resource != singular.Resource { - return resourceType, fmt.Errorf("multiple possible singular resources (%v) found for %v", resources, resourceType) - } - } - - if singular.Empty() { - return resourceType, fmt.Errorf("no singular of resource %v has been defined", resourceType) - } - - return singular.Resource, nil -} - -// coerceResourceForMatching makes the resource lower case and converts internal versions to unspecified (legacy behavior) -func coerceResourceForMatching(resource schema.GroupVersionResource) schema.GroupVersionResource { - resource.Resource = strings.ToLower(resource.Resource) - if resource.Version == runtime.APIVersionInternal { - resource.Version = "" - } - - return resource -} - -func (m *DefaultRESTMapper) ResourcesFor(input schema.GroupVersionResource) ([]schema.GroupVersionResource, error) { - resource := coerceResourceForMatching(input) - - hasResource := len(resource.Resource) > 0 - hasGroup := len(resource.Group) > 0 - hasVersion := len(resource.Version) > 0 - - if !hasResource { - return nil, fmt.Errorf("a resource must be present, got: %v", resource) - } - - ret := []schema.GroupVersionResource{} - switch { - case hasGroup && hasVersion: - // fully qualified. Find the exact match - for plural, singular := range m.pluralToSingular { - if singular == resource { - ret = append(ret, plural) - break - } - if plural == resource { - ret = append(ret, plural) - break - } - } - - case hasGroup: - // given a group, prefer an exact match. If you don't find one, resort to a prefix match on group - foundExactMatch := false - requestedGroupResource := resource.GroupResource() - for plural, singular := range m.pluralToSingular { - if singular.GroupResource() == requestedGroupResource { - foundExactMatch = true - ret = append(ret, plural) - } - if plural.GroupResource() == requestedGroupResource { - foundExactMatch = true - ret = append(ret, plural) - } - } - - // if you didn't find an exact match, match on group prefixing. This allows storageclass.storage to match - // storageclass.storage.k8s.io - if !foundExactMatch { - for plural, singular := range m.pluralToSingular { - if !strings.HasPrefix(plural.Group, requestedGroupResource.Group) { - continue - } - if singular.Resource == requestedGroupResource.Resource { - ret = append(ret, plural) - } - if plural.Resource == requestedGroupResource.Resource { - ret = append(ret, plural) - } - } - - } - - case hasVersion: - for plural, singular := range m.pluralToSingular { - if singular.Version == resource.Version && singular.Resource == resource.Resource { - ret = append(ret, plural) - } - if plural.Version == resource.Version && plural.Resource == resource.Resource { - ret = append(ret, plural) - } - } - - default: - for plural, singular := range m.pluralToSingular { - if singular.Resource == resource.Resource { - ret = append(ret, plural) - } - if plural.Resource == resource.Resource { - ret = append(ret, plural) - } - } - } - - if len(ret) == 0 { - return nil, &NoResourceMatchError{PartialResource: resource} - } - - sort.Sort(resourceByPreferredGroupVersion{ret, m.defaultGroupVersions}) - return ret, nil -} - -func (m *DefaultRESTMapper) ResourceFor(resource schema.GroupVersionResource) (schema.GroupVersionResource, error) { - resources, err := m.ResourcesFor(resource) - if err != nil { - return schema.GroupVersionResource{}, err - } - if len(resources) == 1 { - return resources[0], nil - } - - return schema.GroupVersionResource{}, &AmbiguousResourceError{PartialResource: resource, MatchingResources: resources} -} - -func (m *DefaultRESTMapper) KindsFor(input schema.GroupVersionResource) ([]schema.GroupVersionKind, error) { - resource := coerceResourceForMatching(input) - - hasResource := len(resource.Resource) > 0 - hasGroup := len(resource.Group) > 0 - hasVersion := len(resource.Version) > 0 - - if !hasResource { - return nil, fmt.Errorf("a resource must be present, got: %v", resource) - } - - ret := []schema.GroupVersionKind{} - switch { - // fully qualified. Find the exact match - case hasGroup && hasVersion: - kind, exists := m.resourceToKind[resource] - if exists { - ret = append(ret, kind) - } - - case hasGroup: - foundExactMatch := false - requestedGroupResource := resource.GroupResource() - for currResource, currKind := range m.resourceToKind { - if currResource.GroupResource() == requestedGroupResource { - foundExactMatch = true - ret = append(ret, currKind) - } - } - - // if you didn't find an exact match, match on group prefixing. This allows storageclass.storage to match - // storageclass.storage.k8s.io - if !foundExactMatch { - for currResource, currKind := range m.resourceToKind { - if !strings.HasPrefix(currResource.Group, requestedGroupResource.Group) { - continue - } - if currResource.Resource == requestedGroupResource.Resource { - ret = append(ret, currKind) - } - } - - } - - case hasVersion: - for currResource, currKind := range m.resourceToKind { - if currResource.Version == resource.Version && currResource.Resource == resource.Resource { - ret = append(ret, currKind) - } - } - - default: - for currResource, currKind := range m.resourceToKind { - if currResource.Resource == resource.Resource { - ret = append(ret, currKind) - } - } - } - - if len(ret) == 0 { - return nil, &NoResourceMatchError{PartialResource: input} - } - - sort.Sort(kindByPreferredGroupVersion{ret, m.defaultGroupVersions}) - return ret, nil -} - -func (m *DefaultRESTMapper) KindFor(resource schema.GroupVersionResource) (schema.GroupVersionKind, error) { - kinds, err := m.KindsFor(resource) - if err != nil { - return schema.GroupVersionKind{}, err - } - if len(kinds) == 1 { - return kinds[0], nil - } - - return schema.GroupVersionKind{}, &AmbiguousResourceError{PartialResource: resource, MatchingKinds: kinds} -} - -type kindByPreferredGroupVersion struct { - list []schema.GroupVersionKind - sortOrder []schema.GroupVersion -} - -func (o kindByPreferredGroupVersion) Len() int { return len(o.list) } -func (o kindByPreferredGroupVersion) Swap(i, j int) { o.list[i], o.list[j] = o.list[j], o.list[i] } -func (o kindByPreferredGroupVersion) Less(i, j int) bool { - lhs := o.list[i] - rhs := o.list[j] - if lhs == rhs { - return false - } - - if lhs.GroupVersion() == rhs.GroupVersion() { - return lhs.Kind < rhs.Kind - } - - // otherwise, the difference is in the GroupVersion, so we need to sort with respect to the preferred order - lhsIndex := -1 - rhsIndex := -1 - - for i := range o.sortOrder { - if o.sortOrder[i] == lhs.GroupVersion() { - lhsIndex = i - } - if o.sortOrder[i] == rhs.GroupVersion() { - rhsIndex = i - } - } - - if rhsIndex == -1 { - return true - } - - return lhsIndex < rhsIndex -} - -type resourceByPreferredGroupVersion struct { - list []schema.GroupVersionResource - sortOrder []schema.GroupVersion -} - -func (o resourceByPreferredGroupVersion) Len() int { return len(o.list) } -func (o resourceByPreferredGroupVersion) Swap(i, j int) { o.list[i], o.list[j] = o.list[j], o.list[i] } -func (o resourceByPreferredGroupVersion) Less(i, j int) bool { - lhs := o.list[i] - rhs := o.list[j] - if lhs == rhs { - return false - } - - if lhs.GroupVersion() == rhs.GroupVersion() { - return lhs.Resource < rhs.Resource - } - - // otherwise, the difference is in the GroupVersion, so we need to sort with respect to the preferred order - lhsIndex := -1 - rhsIndex := -1 - - for i := range o.sortOrder { - if o.sortOrder[i] == lhs.GroupVersion() { - lhsIndex = i - } - if o.sortOrder[i] == rhs.GroupVersion() { - rhsIndex = i - } - } - - if rhsIndex == -1 { - return true - } - - return lhsIndex < rhsIndex -} - -// RESTMapping returns a struct representing the resource path and conversion interfaces a -// RESTClient should use to operate on the provided group/kind in order of versions. If a version search -// order is not provided, the search order provided to DefaultRESTMapper will be used to resolve which -// version should be used to access the named group/kind. -func (m *DefaultRESTMapper) RESTMapping(gk schema.GroupKind, versions ...string) (*RESTMapping, error) { - mappings, err := m.RESTMappings(gk, versions...) - if err != nil { - return nil, err - } - if len(mappings) == 0 { - return nil, &NoKindMatchError{PartialKind: gk.WithVersion("")} - } - // since we rely on RESTMappings method - // take the first match and return to the caller - // as this was the existing behavior. - return mappings[0], nil -} - -// RESTMappings returns the RESTMappings for the provided group kind. If a version search order -// is not provided, the search order provided to DefaultRESTMapper will be used. -func (m *DefaultRESTMapper) RESTMappings(gk schema.GroupKind, versions ...string) ([]*RESTMapping, error) { - mappings := make([]*RESTMapping, 0) - potentialGVK := make([]schema.GroupVersionKind, 0) - hadVersion := false - - // Pick an appropriate version - for _, version := range versions { - if len(version) == 0 || version == runtime.APIVersionInternal { - continue - } - currGVK := gk.WithVersion(version) - hadVersion = true - if _, ok := m.kindToPluralResource[currGVK]; ok { - potentialGVK = append(potentialGVK, currGVK) - break - } - } - // Use the default preferred versions - if !hadVersion && len(potentialGVK) == 0 { - for _, gv := range m.defaultGroupVersions { - if gv.Group != gk.Group { - continue - } - potentialGVK = append(potentialGVK, gk.WithVersion(gv.Version)) - } - } - - if len(potentialGVK) == 0 { - return nil, &NoKindMatchError{PartialKind: gk.WithVersion("")} - } - - for _, gvk := range potentialGVK { - //Ensure we have a REST mapping - res, ok := m.kindToPluralResource[gvk] - if !ok { - continue - } - - // Ensure we have a REST scope - scope, ok := m.kindToScope[gvk] - if !ok { - return nil, fmt.Errorf("the provided version %q and kind %q cannot be mapped to a supported scope", gvk.GroupVersion(), gvk.Kind) - } - - interfaces, err := m.interfacesFunc(gvk.GroupVersion()) - if err != nil { - return nil, fmt.Errorf("the provided version %q has no relevant versions: %v", gvk.GroupVersion().String(), err) - } - - mappings = append(mappings, &RESTMapping{ - Resource: res.Resource, - GroupVersionKind: gvk, - Scope: scope, - - ObjectConvertor: interfaces.ObjectConvertor, - MetadataAccessor: interfaces.MetadataAccessor, - }) - } - - if len(mappings) == 0 { - return nil, &NoResourceMatchError{PartialResource: schema.GroupVersionResource{Group: gk.Group, Resource: gk.Kind}} - } - return mappings, nil -} - -// AddResourceAlias maps aliases to resources -func (m *DefaultRESTMapper) AddResourceAlias(alias string, resources ...string) { - if len(resources) == 0 { - return - } - m.aliasToResource[alias] = resources -} - -// AliasesForResource returns whether a resource has an alias or not -func (m *DefaultRESTMapper) AliasesForResource(alias string) ([]string, bool) { - if res, ok := m.aliasToResource[alias]; ok { - return res, true - } - return nil, false -} diff --git a/vendor/k8s.io/kubernetes/pkg/api/meta/restmapper_test.go b/vendor/k8s.io/kubernetes/pkg/api/meta/restmapper_test.go deleted file mode 100644 index 6ab9fb64..00000000 --- a/vendor/k8s.io/kubernetes/pkg/api/meta/restmapper_test.go +++ /dev/null @@ -1,751 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package meta - -import ( - "errors" - "reflect" - "strings" - "testing" - - "k8s.io/kubernetes/pkg/runtime" - "k8s.io/kubernetes/pkg/runtime/schema" -) - -type fakeConvertor struct{} - -func (fakeConvertor) Convert(in, out, context interface{}) error { - return nil -} - -func (fakeConvertor) ConvertToVersion(in runtime.Object, _ runtime.GroupVersioner) (runtime.Object, error) { - return in, nil -} - -func (fakeConvertor) ConvertFieldLabel(version, kind, label, value string) (string, string, error) { - return label, value, nil -} - -var validAccessor = resourceAccessor{} -var validConvertor = fakeConvertor{} - -func fakeInterfaces(version schema.GroupVersion) (*VersionInterfaces, error) { - return &VersionInterfaces{ObjectConvertor: validConvertor, MetadataAccessor: validAccessor}, nil -} - -var unmatchedErr = errors.New("no version") - -func unmatchedVersionInterfaces(version schema.GroupVersion) (*VersionInterfaces, error) { - return nil, unmatchedErr -} - -func TestRESTMapperVersionAndKindForResource(t *testing.T) { - testGroup := "test.group" - testVersion := "test" - testGroupVersion := schema.GroupVersion{Group: testGroup, Version: testVersion} - - testCases := []struct { - Resource schema.GroupVersionResource - GroupVersionToRegister schema.GroupVersion - ExpectedGVK schema.GroupVersionKind - Err bool - }{ - {Resource: schema.GroupVersionResource{Resource: "internalobjec"}, Err: true}, - {Resource: schema.GroupVersionResource{Resource: "internalObjec"}, Err: true}, - - {Resource: schema.GroupVersionResource{Resource: "internalobject"}, ExpectedGVK: testGroupVersion.WithKind("InternalObject")}, - {Resource: schema.GroupVersionResource{Resource: "internalobjects"}, ExpectedGVK: testGroupVersion.WithKind("InternalObject")}, - } - for i, testCase := range testCases { - mapper := NewDefaultRESTMapper([]schema.GroupVersion{testGroupVersion}, fakeInterfaces) - if len(testCase.ExpectedGVK.Kind) != 0 { - mapper.Add(testCase.ExpectedGVK, RESTScopeNamespace) - } - actualGVK, err := mapper.KindFor(testCase.Resource) - - hasErr := err != nil - if hasErr != testCase.Err { - t.Errorf("%d: unexpected error behavior %t: %v", i, testCase.Err, err) - continue - } - if err != nil { - continue - } - - if actualGVK != testCase.ExpectedGVK { - t.Errorf("%d: unexpected version and kind: e=%s a=%s", i, testCase.ExpectedGVK, actualGVK) - } - } -} - -func TestRESTMapperGroupForResource(t *testing.T) { - testCases := []struct { - Resource schema.GroupVersionResource - GroupVersionKind schema.GroupVersionKind - Err bool - }{ - {Resource: schema.GroupVersionResource{Resource: "myObject"}, GroupVersionKind: schema.GroupVersionKind{Group: "testapi", Version: "test", Kind: "MyObject"}}, - {Resource: schema.GroupVersionResource{Resource: "myobject"}, GroupVersionKind: schema.GroupVersionKind{Group: "testapi2", Version: "test", Kind: "MyObject"}}, - {Resource: schema.GroupVersionResource{Resource: "myObje"}, Err: true, GroupVersionKind: schema.GroupVersionKind{Group: "testapi", Version: "test", Kind: "MyObject"}}, - {Resource: schema.GroupVersionResource{Resource: "myobje"}, Err: true, GroupVersionKind: schema.GroupVersionKind{Group: "testapi", Version: "test", Kind: "MyObject"}}, - } - for i, testCase := range testCases { - mapper := NewDefaultRESTMapper([]schema.GroupVersion{testCase.GroupVersionKind.GroupVersion()}, fakeInterfaces) - mapper.Add(testCase.GroupVersionKind, RESTScopeNamespace) - - actualGVK, err := mapper.KindFor(testCase.Resource) - if testCase.Err { - if err == nil { - t.Errorf("%d: expected error", i) - } - } else if err != nil { - t.Errorf("%d: unexpected error: %v", i, err) - } else if actualGVK != testCase.GroupVersionKind { - t.Errorf("%d: expected group %q, got %q", i, testCase.GroupVersionKind, actualGVK) - } - } -} - -func TestRESTMapperKindsFor(t *testing.T) { - testCases := []struct { - Name string - PreferredOrder []schema.GroupVersion - KindsToRegister []schema.GroupVersionKind - PartialResourceToRequest schema.GroupVersionResource - - ExpectedKinds []schema.GroupVersionKind - ExpectedKindErr string - }{ - { - // exact matches are prefered - Name: "groups, with group exact", - PreferredOrder: []schema.GroupVersion{ - {Group: "first-group-1", Version: "first-version"}, - {Group: "first-group", Version: "first-version"}, - }, - KindsToRegister: []schema.GroupVersionKind{ - {Group: "first-group-1", Version: "first-version", Kind: "my-kind"}, - {Group: "first-group", Version: "first-version", Kind: "my-kind"}, - }, - PartialResourceToRequest: schema.GroupVersionResource{Group: "first-group", Resource: "my-kind"}, - - ExpectedKinds: []schema.GroupVersionKind{ - {Group: "first-group", Version: "first-version", Kind: "my-kind"}, - }, - }, - - { - // group prefixes work - Name: "groups, with group prefix", - PreferredOrder: []schema.GroupVersion{ - {Group: "second-group", Version: "first-version"}, - {Group: "first-group", Version: "first-version"}, - }, - KindsToRegister: []schema.GroupVersionKind{ - {Group: "first-group", Version: "first-version", Kind: "my-kind"}, - {Group: "second-group", Version: "first-version", Kind: "my-kind"}, - }, - PartialResourceToRequest: schema.GroupVersionResource{Group: "first", Resource: "my-kind"}, - - ExpectedKinds: []schema.GroupVersionKind{ - {Group: "first-group", Version: "first-version", Kind: "my-kind"}, - }, - }, - - { - // group prefixes can be ambiguous - Name: "groups, with ambiguous group prefix", - PreferredOrder: []schema.GroupVersion{ - {Group: "first-group-1", Version: "first-version"}, - {Group: "first-group", Version: "first-version"}, - }, - KindsToRegister: []schema.GroupVersionKind{ - {Group: "first-group-1", Version: "first-version", Kind: "my-kind"}, - {Group: "first-group", Version: "first-version", Kind: "my-kind"}, - }, - PartialResourceToRequest: schema.GroupVersionResource{Group: "first", Resource: "my-kind"}, - - ExpectedKinds: []schema.GroupVersionKind{ - {Group: "first-group-1", Version: "first-version", Kind: "my-kind"}, - {Group: "first-group", Version: "first-version", Kind: "my-kind"}, - }, - ExpectedKindErr: " matches multiple kinds ", - }, - - { - Name: "ambiguous groups, with preference order", - PreferredOrder: []schema.GroupVersion{ - {Group: "second-group", Version: "first-version"}, - {Group: "first-group", Version: "first-version"}, - }, - KindsToRegister: []schema.GroupVersionKind{ - {Group: "first-group", Version: "first-version", Kind: "my-kind"}, - {Group: "first-group", Version: "first-version", Kind: "your-kind"}, - {Group: "second-group", Version: "first-version", Kind: "my-kind"}, - {Group: "second-group", Version: "first-version", Kind: "your-kind"}, - }, - PartialResourceToRequest: schema.GroupVersionResource{Resource: "my-kinds"}, - - ExpectedKinds: []schema.GroupVersionKind{ - {Group: "second-group", Version: "first-version", Kind: "my-kind"}, - {Group: "first-group", Version: "first-version", Kind: "my-kind"}, - }, - ExpectedKindErr: " matches multiple kinds ", - }, - - { - Name: "ambiguous groups, with explicit group match", - PreferredOrder: []schema.GroupVersion{ - {Group: "second-group", Version: "first-version"}, - {Group: "first-group", Version: "first-version"}, - }, - KindsToRegister: []schema.GroupVersionKind{ - {Group: "first-group", Version: "first-version", Kind: "my-kind"}, - {Group: "first-group", Version: "first-version", Kind: "your-kind"}, - {Group: "second-group", Version: "first-version", Kind: "my-kind"}, - {Group: "second-group", Version: "first-version", Kind: "your-kind"}, - }, - PartialResourceToRequest: schema.GroupVersionResource{Group: "first-group", Resource: "my-kinds"}, - - ExpectedKinds: []schema.GroupVersionKind{ - {Group: "first-group", Version: "first-version", Kind: "my-kind"}, - }, - }, - - { - Name: "ambiguous groups, with ambiguous version match", - PreferredOrder: []schema.GroupVersion{ - {Group: "first-group", Version: "first-version"}, - {Group: "second-group", Version: "first-version"}, - }, - KindsToRegister: []schema.GroupVersionKind{ - {Group: "first-group", Version: "first-version", Kind: "my-kind"}, - {Group: "first-group", Version: "first-version", Kind: "your-kind"}, - {Group: "second-group", Version: "first-version", Kind: "my-kind"}, - {Group: "second-group", Version: "first-version", Kind: "your-kind"}, - }, - PartialResourceToRequest: schema.GroupVersionResource{Version: "first-version", Resource: "my-kinds"}, - - ExpectedKinds: []schema.GroupVersionKind{ - {Group: "first-group", Version: "first-version", Kind: "my-kind"}, - {Group: "second-group", Version: "first-version", Kind: "my-kind"}, - }, - ExpectedKindErr: " matches multiple kinds ", - }, - } - for _, testCase := range testCases { - tcName := testCase.Name - mapper := NewDefaultRESTMapper(testCase.PreferredOrder, fakeInterfaces) - for _, kind := range testCase.KindsToRegister { - mapper.Add(kind, RESTScopeNamespace) - } - - actualKinds, err := mapper.KindsFor(testCase.PartialResourceToRequest) - if err != nil { - t.Errorf("%s: unexpected error: %v", tcName, err) - continue - } - if !reflect.DeepEqual(testCase.ExpectedKinds, actualKinds) { - t.Errorf("%s: expected %v, got %v", tcName, testCase.ExpectedKinds, actualKinds) - } - - singleKind, err := mapper.KindFor(testCase.PartialResourceToRequest) - if err == nil && len(testCase.ExpectedKindErr) != 0 { - t.Errorf("%s: expected error: %v", tcName, testCase.ExpectedKindErr) - continue - } - if err != nil { - if len(testCase.ExpectedKindErr) == 0 { - t.Errorf("%s: unexpected error: %v", tcName, err) - continue - } else { - if !strings.Contains(err.Error(), testCase.ExpectedKindErr) { - t.Errorf("%s: expected %v, got %v", tcName, testCase.ExpectedKindErr, err) - continue - } - } - - } else { - if testCase.ExpectedKinds[0] != singleKind { - t.Errorf("%s: expected %v, got %v", tcName, testCase.ExpectedKinds[0], singleKind) - } - - } - } -} - -func TestRESTMapperResourcesFor(t *testing.T) { - testCases := []struct { - Name string - PreferredOrder []schema.GroupVersion - KindsToRegister []schema.GroupVersionKind - PluralPartialResourceToRequest schema.GroupVersionResource - SingularPartialResourceToRequest schema.GroupVersionResource - - ExpectedResources []schema.GroupVersionResource - ExpectedResourceErr string - }{ - { - // exact matches are prefered - Name: "groups, with group exact", - PreferredOrder: []schema.GroupVersion{ - {Group: "first-group-1", Version: "first-version"}, - {Group: "first-group", Version: "first-version"}, - }, - KindsToRegister: []schema.GroupVersionKind{ - {Group: "first-group-1", Version: "first-version", Kind: "my-kind"}, - {Group: "first-group", Version: "first-version", Kind: "my-kind"}, - }, - PluralPartialResourceToRequest: schema.GroupVersionResource{Group: "first-group", Resource: "my-kinds"}, - SingularPartialResourceToRequest: schema.GroupVersionResource{Group: "first-group", Resource: "my-kind"}, - - ExpectedResources: []schema.GroupVersionResource{ - {Group: "first-group", Version: "first-version", Resource: "my-kinds"}, - }, - }, - - { - // group prefixes work - Name: "groups, with group prefix", - PreferredOrder: []schema.GroupVersion{ - {Group: "second-group", Version: "first-version"}, - {Group: "first-group", Version: "first-version"}, - }, - KindsToRegister: []schema.GroupVersionKind{ - {Group: "first-group", Version: "first-version", Kind: "my-kind"}, - {Group: "second-group", Version: "first-version", Kind: "my-kind"}, - }, - PluralPartialResourceToRequest: schema.GroupVersionResource{Group: "first", Resource: "my-kinds"}, - SingularPartialResourceToRequest: schema.GroupVersionResource{Group: "first", Resource: "my-kind"}, - - ExpectedResources: []schema.GroupVersionResource{ - {Group: "first-group", Version: "first-version", Resource: "my-kinds"}, - }, - }, - - { - // group prefixes can be ambiguous - Name: "groups, with ambiguous group prefix", - PreferredOrder: []schema.GroupVersion{ - {Group: "first-group-1", Version: "first-version"}, - {Group: "first-group", Version: "first-version"}, - }, - KindsToRegister: []schema.GroupVersionKind{ - {Group: "first-group-1", Version: "first-version", Kind: "my-kind"}, - {Group: "first-group", Version: "first-version", Kind: "my-kind"}, - }, - PluralPartialResourceToRequest: schema.GroupVersionResource{Group: "first", Resource: "my-kinds"}, - SingularPartialResourceToRequest: schema.GroupVersionResource{Group: "first", Resource: "my-kind"}, - - ExpectedResources: []schema.GroupVersionResource{ - {Group: "first-group-1", Version: "first-version", Resource: "my-kinds"}, - {Group: "first-group", Version: "first-version", Resource: "my-kinds"}, - }, - ExpectedResourceErr: " matches multiple resources ", - }, - - { - Name: "ambiguous groups, with preference order", - PreferredOrder: []schema.GroupVersion{ - {Group: "second-group", Version: "first-version"}, - {Group: "first-group", Version: "first-version"}, - }, - KindsToRegister: []schema.GroupVersionKind{ - {Group: "first-group", Version: "first-version", Kind: "my-kind"}, - {Group: "first-group", Version: "first-version", Kind: "your-kind"}, - {Group: "second-group", Version: "first-version", Kind: "my-kind"}, - {Group: "second-group", Version: "first-version", Kind: "your-kind"}, - }, - PluralPartialResourceToRequest: schema.GroupVersionResource{Resource: "my-kinds"}, - SingularPartialResourceToRequest: schema.GroupVersionResource{Resource: "my-kind"}, - - ExpectedResources: []schema.GroupVersionResource{ - {Group: "second-group", Version: "first-version", Resource: "my-kinds"}, - {Group: "first-group", Version: "first-version", Resource: "my-kinds"}, - }, - ExpectedResourceErr: " matches multiple resources ", - }, - - { - Name: "ambiguous groups, with explicit group match", - PreferredOrder: []schema.GroupVersion{ - {Group: "second-group", Version: "first-version"}, - {Group: "first-group", Version: "first-version"}, - }, - KindsToRegister: []schema.GroupVersionKind{ - {Group: "first-group", Version: "first-version", Kind: "my-kind"}, - {Group: "first-group", Version: "first-version", Kind: "your-kind"}, - {Group: "second-group", Version: "first-version", Kind: "my-kind"}, - {Group: "second-group", Version: "first-version", Kind: "your-kind"}, - }, - PluralPartialResourceToRequest: schema.GroupVersionResource{Group: "first-group", Resource: "my-kinds"}, - SingularPartialResourceToRequest: schema.GroupVersionResource{Group: "first-group", Resource: "my-kind"}, - - ExpectedResources: []schema.GroupVersionResource{ - {Group: "first-group", Version: "first-version", Resource: "my-kinds"}, - }, - }, - - { - Name: "ambiguous groups, with ambiguous version match", - PreferredOrder: []schema.GroupVersion{ - {Group: "first-group", Version: "first-version"}, - {Group: "second-group", Version: "first-version"}, - }, - KindsToRegister: []schema.GroupVersionKind{ - {Group: "first-group", Version: "first-version", Kind: "my-kind"}, - {Group: "first-group", Version: "first-version", Kind: "your-kind"}, - {Group: "second-group", Version: "first-version", Kind: "my-kind"}, - {Group: "second-group", Version: "first-version", Kind: "your-kind"}, - }, - PluralPartialResourceToRequest: schema.GroupVersionResource{Version: "first-version", Resource: "my-kinds"}, - SingularPartialResourceToRequest: schema.GroupVersionResource{Version: "first-version", Resource: "my-kind"}, - - ExpectedResources: []schema.GroupVersionResource{ - {Group: "first-group", Version: "first-version", Resource: "my-kinds"}, - {Group: "second-group", Version: "first-version", Resource: "my-kinds"}, - }, - ExpectedResourceErr: " matches multiple resources ", - }, - } - for _, testCase := range testCases { - tcName := testCase.Name - - for _, partialResource := range []schema.GroupVersionResource{testCase.PluralPartialResourceToRequest, testCase.SingularPartialResourceToRequest} { - mapper := NewDefaultRESTMapper(testCase.PreferredOrder, fakeInterfaces) - for _, kind := range testCase.KindsToRegister { - mapper.Add(kind, RESTScopeNamespace) - } - - actualResources, err := mapper.ResourcesFor(partialResource) - if err != nil { - t.Errorf("%s: unexpected error: %v", tcName, err) - continue - } - if !reflect.DeepEqual(testCase.ExpectedResources, actualResources) { - t.Errorf("%s: expected %v, got %v", tcName, testCase.ExpectedResources, actualResources) - } - - singleResource, err := mapper.ResourceFor(partialResource) - if err == nil && len(testCase.ExpectedResourceErr) != 0 { - t.Errorf("%s: expected error: %v", tcName, testCase.ExpectedResourceErr) - continue - } - if err != nil { - if len(testCase.ExpectedResourceErr) == 0 { - t.Errorf("%s: unexpected error: %v", tcName, err) - continue - } else { - if !strings.Contains(err.Error(), testCase.ExpectedResourceErr) { - t.Errorf("%s: expected %v, got %v", tcName, testCase.ExpectedResourceErr, err) - continue - } - } - - } else { - if testCase.ExpectedResources[0] != singleResource { - t.Errorf("%s: expected %v, got %v", tcName, testCase.ExpectedResources[0], singleResource) - } - - } - } - } -} - -func TestKindToResource(t *testing.T) { - testCases := []struct { - Kind string - Plural, Singular string - }{ - {Kind: "Pod", Plural: "pods", Singular: "pod"}, - - {Kind: "ReplicationController", Plural: "replicationcontrollers", Singular: "replicationcontroller"}, - - // Add "ies" when ending with "y" - {Kind: "ImageRepository", Plural: "imagerepositories", Singular: "imagerepository"}, - // Add "es" when ending with "s" - {Kind: "miss", Plural: "misses", Singular: "miss"}, - // Add "s" otherwise - {Kind: "lowercase", Plural: "lowercases", Singular: "lowercase"}, - } - for i, testCase := range testCases { - version := schema.GroupVersion{} - - plural, singular := KindToResource(version.WithKind(testCase.Kind)) - if singular != version.WithResource(testCase.Singular) || plural != version.WithResource(testCase.Plural) { - t.Errorf("%d: unexpected plural and singular: %v %v", i, plural, singular) - } - } -} - -func TestRESTMapperResourceSingularizer(t *testing.T) { - testGroupVersion := schema.GroupVersion{Group: "tgroup", Version: "test"} - - testCases := []struct { - Kind string - Plural string - Singular string - }{ - {Kind: "Pod", Plural: "pods", Singular: "pod"}, - {Kind: "ReplicationController", Plural: "replicationcontrollers", Singular: "replicationcontroller"}, - {Kind: "ImageRepository", Plural: "imagerepositories", Singular: "imagerepository"}, - {Kind: "Status", Plural: "statuses", Singular: "status"}, - - {Kind: "lowercase", Plural: "lowercases", Singular: "lowercase"}, - // TODO this test is broken. This updates to reflect actual behavior. Kinds are expected to be singular - // old (incorrect), coment: Don't add extra s if the original object is already plural - {Kind: "lowercases", Plural: "lowercaseses", Singular: "lowercases"}, - } - for i, testCase := range testCases { - mapper := NewDefaultRESTMapper([]schema.GroupVersion{testGroupVersion}, fakeInterfaces) - // create singular/plural mapping - mapper.Add(testGroupVersion.WithKind(testCase.Kind), RESTScopeNamespace) - - singular, err := mapper.ResourceSingularizer(testCase.Plural) - if err != nil { - t.Errorf("%d: unexpected error: %v", i, err) - } - if singular != testCase.Singular { - t.Errorf("%d: mismatched singular: got %v, expected %v", i, singular, testCase.Singular) - } - } -} - -func TestRESTMapperRESTMapping(t *testing.T) { - testGroup := "tgroup" - testGroupVersion := schema.GroupVersion{Group: testGroup, Version: "test"} - internalGroupVersion := schema.GroupVersion{Group: testGroup, Version: "test"} - - testCases := []struct { - Kind string - APIGroupVersions []schema.GroupVersion - DefaultVersions []schema.GroupVersion - - Resource string - ExpectedGroupVersion *schema.GroupVersion - Err bool - }{ - {Kind: "Unknown", Err: true}, - {Kind: "InternalObject", Err: true}, - - {DefaultVersions: []schema.GroupVersion{testGroupVersion}, Kind: "Unknown", Err: true}, - - {DefaultVersions: []schema.GroupVersion{testGroupVersion}, Kind: "InternalObject", APIGroupVersions: []schema.GroupVersion{{Group: testGroup, Version: "test"}}, Resource: "internalobjects"}, - {DefaultVersions: []schema.GroupVersion{testGroupVersion}, Kind: "InternalObject", APIGroupVersions: []schema.GroupVersion{{Group: testGroup, Version: "test"}}, Resource: "internalobjects"}, - - {DefaultVersions: []schema.GroupVersion{testGroupVersion}, Kind: "InternalObject", APIGroupVersions: []schema.GroupVersion{{Group: testGroup, Version: "test"}}, Resource: "internalobjects"}, - - {DefaultVersions: []schema.GroupVersion{testGroupVersion}, Kind: "InternalObject", APIGroupVersions: []schema.GroupVersion{}, Resource: "internalobjects", ExpectedGroupVersion: &schema.GroupVersion{Group: testGroup, Version: "test"}}, - - {DefaultVersions: []schema.GroupVersion{testGroupVersion}, Kind: "InternalObject", APIGroupVersions: []schema.GroupVersion{{Group: testGroup, Version: "test"}}, Resource: "internalobjects"}, - - // TODO: add test for a resource that exists in one version but not another - } - for i, testCase := range testCases { - mapper := NewDefaultRESTMapper(testCase.DefaultVersions, fakeInterfaces) - mapper.Add(internalGroupVersion.WithKind("InternalObject"), RESTScopeNamespace) - - preferredVersions := []string{} - for _, gv := range testCase.APIGroupVersions { - preferredVersions = append(preferredVersions, gv.Version) - } - gk := schema.GroupKind{Group: testGroup, Kind: testCase.Kind} - - mapping, err := mapper.RESTMapping(gk, preferredVersions...) - hasErr := err != nil - if hasErr != testCase.Err { - t.Errorf("%d: unexpected error behavior %t: %v", i, testCase.Err, err) - } - if hasErr { - continue - } - if mapping.Resource != testCase.Resource { - t.Errorf("%d: unexpected resource: %#v", i, mapping) - } - - if mapping.MetadataAccessor == nil || mapping.ObjectConvertor == nil { - t.Errorf("%d: missing codec and accessor: %#v", i, mapping) - } - - groupVersion := testCase.ExpectedGroupVersion - if groupVersion == nil { - groupVersion = &testCase.APIGroupVersions[0] - } - if mapping.GroupVersionKind.GroupVersion() != *groupVersion { - t.Errorf("%d: unexpected version: %#v", i, mapping) - } - - } -} - -func TestRESTMapperRESTMappingSelectsVersion(t *testing.T) { - expectedGroupVersion1 := schema.GroupVersion{Group: "tgroup", Version: "test1"} - expectedGroupVersion2 := schema.GroupVersion{Group: "tgroup", Version: "test2"} - expectedGroupVersion3 := schema.GroupVersion{Group: "tgroup", Version: "test3"} - internalObjectGK := schema.GroupKind{Group: "tgroup", Kind: "InternalObject"} - otherObjectGK := schema.GroupKind{Group: "tgroup", Kind: "OtherObject"} - - mapper := NewDefaultRESTMapper([]schema.GroupVersion{expectedGroupVersion1, expectedGroupVersion2}, fakeInterfaces) - mapper.Add(expectedGroupVersion1.WithKind("InternalObject"), RESTScopeNamespace) - mapper.Add(expectedGroupVersion2.WithKind("OtherObject"), RESTScopeNamespace) - - // pick default matching object kind based on search order - mapping, err := mapper.RESTMapping(otherObjectGK) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - if mapping.Resource != "otherobjects" || mapping.GroupVersionKind.GroupVersion() != expectedGroupVersion2 { - t.Errorf("unexpected mapping: %#v", mapping) - } - - mapping, err = mapper.RESTMapping(internalObjectGK) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - if mapping.Resource != "internalobjects" || mapping.GroupVersionKind.GroupVersion() != expectedGroupVersion1 { - t.Errorf("unexpected mapping: %#v", mapping) - } - - // mismatch of version - mapping, err = mapper.RESTMapping(internalObjectGK, expectedGroupVersion2.Version) - if err == nil { - t.Errorf("unexpected non-error") - } - mapping, err = mapper.RESTMapping(otherObjectGK, expectedGroupVersion1.Version) - if err == nil { - t.Errorf("unexpected non-error") - } - - // not in the search versions - mapping, err = mapper.RESTMapping(otherObjectGK, expectedGroupVersion3.Version) - if err == nil { - t.Errorf("unexpected non-error") - } - - // explicit search order - mapping, err = mapper.RESTMapping(otherObjectGK, expectedGroupVersion3.Version, expectedGroupVersion1.Version) - if err == nil { - t.Errorf("unexpected non-error") - } - - mapping, err = mapper.RESTMapping(otherObjectGK, expectedGroupVersion3.Version, expectedGroupVersion2.Version) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - if mapping.Resource != "otherobjects" || mapping.GroupVersionKind.GroupVersion() != expectedGroupVersion2 { - t.Errorf("unexpected mapping: %#v", mapping) - } -} - -func TestRESTMapperRESTMappings(t *testing.T) { - testGroup := "tgroup" - testGroupVersion := schema.GroupVersion{Group: testGroup, Version: "v1"} - - testCases := []struct { - Kind string - APIGroupVersions []schema.GroupVersion - DefaultVersions []schema.GroupVersion - AddGroupVersionKind []schema.GroupVersionKind - - ExpectedRESTMappings []*RESTMapping - Err bool - }{ - {Kind: "Unknown", Err: true}, - {Kind: "InternalObject", Err: true}, - - {DefaultVersions: []schema.GroupVersion{testGroupVersion}, Kind: "Unknown", Err: true}, - - // ask for specific version - not available - thus error - {DefaultVersions: []schema.GroupVersion{testGroupVersion}, Kind: "InternalObject", APIGroupVersions: []schema.GroupVersion{{Group: testGroup, Version: "v2"}}, Err: true}, - - // ask for specific version - available - check ExpectedRESTMappings - { - DefaultVersions: []schema.GroupVersion{testGroupVersion}, - Kind: "InternalObject", - APIGroupVersions: []schema.GroupVersion{{Group: testGroup, Version: "v2"}}, - AddGroupVersionKind: []schema.GroupVersionKind{schema.GroupVersion{Group: testGroup, Version: "v2"}.WithKind("InternalObject")}, - ExpectedRESTMappings: []*RESTMapping{{Resource: "internalobjects", GroupVersionKind: schema.GroupVersionKind{Group: testGroup, Version: "v2", Kind: "InternalObject"}}}, - }, - - // ask for specific versions - only one available - check ExpectedRESTMappings - { - DefaultVersions: []schema.GroupVersion{testGroupVersion}, - Kind: "InternalObject", - APIGroupVersions: []schema.GroupVersion{{Group: testGroup, Version: "v3"}, {Group: testGroup, Version: "v2"}}, - AddGroupVersionKind: []schema.GroupVersionKind{schema.GroupVersion{Group: testGroup, Version: "v2"}.WithKind("InternalObject")}, - ExpectedRESTMappings: []*RESTMapping{{Resource: "internalobjects", GroupVersionKind: schema.GroupVersionKind{Group: testGroup, Version: "v2", Kind: "InternalObject"}}}, - }, - - // do not ask for specific version - search through default versions - check ExpectedRESTMappings - { - DefaultVersions: []schema.GroupVersion{testGroupVersion, {Group: testGroup, Version: "v2"}}, - Kind: "InternalObject", - AddGroupVersionKind: []schema.GroupVersionKind{schema.GroupVersion{Group: testGroup, Version: "v1"}.WithKind("InternalObject"), schema.GroupVersion{Group: testGroup, Version: "v2"}.WithKind("InternalObject")}, - ExpectedRESTMappings: []*RESTMapping{{Resource: "internalobjects", GroupVersionKind: schema.GroupVersionKind{Group: testGroup, Version: "v1", Kind: "InternalObject"}}, {Resource: "internalobjects", GroupVersionKind: schema.GroupVersionKind{Group: testGroup, Version: "v2", Kind: "InternalObject"}}}, - }, - } - - for i, testCase := range testCases { - mapper := NewDefaultRESTMapper(testCase.DefaultVersions, fakeInterfaces) - for _, gvk := range testCase.AddGroupVersionKind { - mapper.Add(gvk, RESTScopeNamespace) - } - - preferredVersions := []string{} - for _, gv := range testCase.APIGroupVersions { - preferredVersions = append(preferredVersions, gv.Version) - } - gk := schema.GroupKind{Group: testGroup, Kind: testCase.Kind} - - mappings, err := mapper.RESTMappings(gk, preferredVersions...) - hasErr := err != nil - if hasErr != testCase.Err { - t.Errorf("%d: unexpected error behavior %t: %v", i, testCase.Err, err) - } - if hasErr { - continue - } - if len(mappings) != len(testCase.ExpectedRESTMappings) { - t.Errorf("%d: unexpected number = %d of rest mappings was returned, expected = %d", i, len(mappings), len(testCase.ExpectedRESTMappings)) - } - for j, mapping := range mappings { - exp := testCase.ExpectedRESTMappings[j] - if mapping.Resource != exp.Resource { - t.Errorf("%d - %d: unexpected resource: %#v", i, j, mapping) - } - if mapping.MetadataAccessor == nil || mapping.ObjectConvertor == nil { - t.Errorf("%d - %d: missing codec and accessor: %#v", i, j, mapping) - } - if mapping.GroupVersionKind != exp.GroupVersionKind { - t.Errorf("%d - %d: unexpected GroupVersionKind: %#v", i, j, mapping) - } - } - } -} - -func TestRESTMapperReportsErrorOnBadVersion(t *testing.T) { - expectedGroupVersion1 := schema.GroupVersion{Group: "tgroup", Version: "test1"} - expectedGroupVersion2 := schema.GroupVersion{Group: "tgroup", Version: "test2"} - internalObjectGK := schema.GroupKind{Group: "tgroup", Kind: "InternalObject"} - - mapper := NewDefaultRESTMapper([]schema.GroupVersion{expectedGroupVersion1, expectedGroupVersion2}, unmatchedVersionInterfaces) - mapper.Add(expectedGroupVersion1.WithKind("InternalObject"), RESTScopeNamespace) - _, err := mapper.RESTMapping(internalObjectGK, expectedGroupVersion1.Version) - if err == nil { - t.Errorf("unexpected non-error") - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/api/meta_test.go b/vendor/k8s.io/kubernetes/pkg/api/meta_test.go index cf876f91..ab355ecc 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/meta_test.go +++ b/vendor/k8s.io/kubernetes/pkg/api/meta_test.go @@ -29,9 +29,9 @@ import ( "k8s.io/kubernetes/pkg/api" ) -var _ meta.Object = &api.ObjectMeta{} +var _ metav1.Object = &metav1.ObjectMeta{} -func getObjectMetaAndOwnerReferences() (objectMeta api.ObjectMeta, metaOwnerReferences []metav1.OwnerReference) { +func getObjectMetaAndOwnerReferences() (objectMeta metav1.ObjectMeta, metaOwnerReferences []metav1.OwnerReference) { fuzz.New().NilChance(.5).NumElements(1, 5).Fuzz(&objectMeta) references := objectMeta.OwnerReferences metaOwnerReferences = make([]metav1.OwnerReference, 0) @@ -60,7 +60,7 @@ func testGetOwnerReferences(t *testing.T) { func testSetOwnerReferences(t *testing.T) { expected, newRefs := getObjectMetaAndOwnerReferences() - objectMeta := &api.ObjectMeta{} + objectMeta := &metav1.ObjectMeta{} objectMeta.SetOwnerReferences(newRefs) if !reflect.DeepEqual(expected.OwnerReferences, objectMeta.OwnerReferences) { t.Errorf("expect: %#v\n got: %#v", expected.OwnerReferences, objectMeta.OwnerReferences) @@ -86,7 +86,7 @@ func TestAccessorImplementations(t *testing.T) { t.Errorf("%v (%v) does not implement runtime.Object", gv.WithKind(kind), knownType) } lm, isLM := obj.(meta.ListMetaAccessor) - om, isOM := obj.(meta.ObjectMetaAccessor) + om, isOM := obj.(metav1.ObjectMetaAccessor) switch { case isLM && isOM: t.Errorf("%v (%v) implements ListMetaAccessor and ObjectMetaAccessor", gv.WithKind(kind), knownType) diff --git a/vendor/k8s.io/kubernetes/pkg/api/ref_test.go b/vendor/k8s.io/kubernetes/pkg/api/ref_test.go index f3cb29bc..ac22a636 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/ref_test.go +++ b/vendor/k8s.io/kubernetes/pkg/api/ref_test.go @@ -31,7 +31,7 @@ func (obj *FakeAPIObject) GetObjectKind() schema.ObjectKind { return schema.Empt type ExtensionAPIObject struct { metav1.TypeMeta - ObjectMeta + metav1.ObjectMeta } func (obj *ExtensionAPIObject) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta } @@ -53,7 +53,7 @@ func TestGetReference(t *testing.T) { }{ "pod": { obj: &Pod{ - ObjectMeta: ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", UID: "bar", ResourceVersion: "42", @@ -88,7 +88,7 @@ func TestGetReference(t *testing.T) { TypeMeta: metav1.TypeMeta{ Kind: "ExtensionAPIObject", }, - ObjectMeta: ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", UID: "bar", ResourceVersion: "42", diff --git a/vendor/k8s.io/kubernetes/pkg/api/register.go b/vendor/k8s.io/kubernetes/pkg/api/register.go index 1847e0c0..e9d9b414 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/register.go +++ b/vendor/k8s.io/kubernetes/pkg/api/register.go @@ -19,6 +19,7 @@ package api import ( "os" + "k8s.io/apimachinery/pkg/apimachinery/announced" "k8s.io/apimachinery/pkg/apimachinery/registered" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" @@ -26,6 +27,9 @@ import ( "k8s.io/apimachinery/pkg/runtime/serializer" ) +// GroupFactoryRegistry is the APIGroupFactoryRegistry (overlaps a bit with Registry, see comments in package for details) +var GroupFactoryRegistry = make(announced.APIGroupFactoryRegistry) + // Registry is an instance of an API registry. This is an interim step to start removing the idea of a global // API registry. var Registry = registered.NewOrDie(os.Getenv("KUBE_API_VERSIONS")) @@ -120,11 +124,10 @@ func addKnownTypes(scheme *runtime.Scheme) error { &PersistentVolumeList{}, &PersistentVolumeClaim{}, &PersistentVolumeClaimList{}, - &DeleteOptions{}, - &ListOptions{}, &PodAttachOptions{}, &PodLogOptions{}, &PodExecOptions{}, + &PodPortForwardOptions{}, &PodProxyOptions{}, &ComponentStatus{}, &ComponentStatusList{}, diff --git a/vendor/k8s.io/kubernetes/pkg/api/serialization_proto_test.go b/vendor/k8s.io/kubernetes/pkg/api/serialization_proto_test.go index 3bf82cb3..37d14e48 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/serialization_proto_test.go +++ b/vendor/k8s.io/kubernetes/pkg/api/serialization_proto_test.go @@ -23,6 +23,7 @@ import ( "testing" "github.com/gogo/protobuf/proto" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/runtime/serializer/protobuf" @@ -51,7 +52,7 @@ func init() { } func TestUniversalDeserializer(t *testing.T) { - expected := &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "test"}} + expected := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "test"}} d := api.Codecs.UniversalDeserializer() for _, mediaType := range []string{"application/json", "application/yaml", "application/vnd.kubernetes.protobuf"} { info, ok := runtime.SerializerInfoForMediaType(api.Codecs.SupportedMediaTypes(), mediaType) diff --git a/vendor/k8s.io/kubernetes/pkg/api/serialization_test.go b/vendor/k8s.io/kubernetes/pkg/api/serialization_test.go index eb841ff7..29b9d989 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/serialization_test.go +++ b/vendor/k8s.io/kubernetes/pkg/api/serialization_test.go @@ -28,7 +28,7 @@ import ( "testing" "github.com/davecgh/go-spew/spew" - proto "github.com/golang/protobuf/proto" + "github.com/golang/protobuf/proto" flag "github.com/spf13/pflag" "github.com/ugorji/go/codec" @@ -180,6 +180,10 @@ var nonRoundTrippableTypes = sets.NewString( // the schema by content type, rather than via kind/version included in each // object. "WatchEvent", + // ListOptions is now part of the meta group + "ListOptions", + // Delete options is only read in metav1 + "DeleteOptions", ) var commonKinds = []string{"Status", "ListOptions", "DeleteOptions", "ExportOptions"} @@ -356,7 +360,7 @@ func roundTrip(t *testing.T, codec runtime.Codec, item runtime.Object) { func TestEncodePtr(t *testing.T) { grace := int64(30) pod := &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"name": "foo"}, }, Spec: api.PodSpec{ @@ -366,6 +370,7 @@ func TestEncodePtr(t *testing.T) { TerminationGracePeriodSeconds: &grace, SecurityContext: &api.PodSecurityContext{}, + SchedulerName: api.DefaultSchedulerName, }, } obj := runtime.Object(pod) @@ -518,7 +523,7 @@ const benchmarkSeed = 100 func benchmarkItems() []v1.Pod { apiObjectFuzzer := apitesting.FuzzerFor(nil, api.SchemeGroupVersion, rand.NewSource(benchmarkSeed)) - items := make([]v1.Pod, 2) + items := make([]v1.Pod, 10) for i := range items { var pod api.Pod apiObjectFuzzer.Fuzz(&pod) diff --git a/vendor/k8s.io/kubernetes/pkg/api/testapi/testapi.go b/vendor/k8s.io/kubernetes/pkg/api/testapi/testapi.go index 0772b18c..6abbd527 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/testapi/testapi.go +++ b/vendor/k8s.io/kubernetes/pkg/api/testapi/testapi.go @@ -200,8 +200,8 @@ func init() { externalGroupVersion := schema.GroupVersion{Group: apps.GroupName, Version: api.Registry.GroupOrDie(apps.GroupName).GroupVersion.Version} Groups[apps.GroupName] = TestGroup{ externalGroupVersion: externalGroupVersion, - internalGroupVersion: extensions.SchemeGroupVersion, - internalTypes: api.Scheme.KnownTypes(extensions.SchemeGroupVersion), + internalGroupVersion: apps.SchemeGroupVersion, + internalTypes: api.Scheme.KnownTypes(apps.SchemeGroupVersion), externalTypes: api.Scheme.KnownTypes(externalGroupVersion), } } diff --git a/vendor/k8s.io/kubernetes/pkg/api/testing/BUILD b/vendor/k8s.io/kubernetes/pkg/api/testing/BUILD index 67bc91d9..86e4ba68 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/testing/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/api/testing/BUILD @@ -27,10 +27,10 @@ go_library( "//pkg/apis/extensions:go_default_library", "//pkg/apis/policy:go_default_library", "//pkg/apis/rbac:go_default_library", - "//pkg/fields:go_default_library", "//pkg/util/intstr:go_default_library", "//vendor:github.com/google/gofuzz", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", diff --git a/vendor/k8s.io/kubernetes/pkg/api/testing/conversion.go b/vendor/k8s.io/kubernetes/pkg/api/testing/conversion.go index e3360958..e0609410 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/testing/conversion.go +++ b/vendor/k8s.io/kubernetes/pkg/api/testing/conversion.go @@ -19,8 +19,8 @@ package testing import ( "testing" + "k8s.io/apimachinery/pkg/fields" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/fields" ) // TestSelectableFieldLabelConversions verifies that given resource have field diff --git a/vendor/k8s.io/kubernetes/pkg/api/testing/fuzzer.go b/vendor/k8s.io/kubernetes/pkg/api/testing/fuzzer.go index c2736c69..d73506f6 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/testing/fuzzer.go +++ b/vendor/k8s.io/kubernetes/pkg/api/testing/fuzzer.go @@ -23,7 +23,10 @@ import ( "strconv" "testing" + "github.com/google/gofuzz" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" @@ -38,10 +41,7 @@ import ( "k8s.io/kubernetes/pkg/apis/extensions" "k8s.io/kubernetes/pkg/apis/policy" "k8s.io/kubernetes/pkg/apis/rbac" - "k8s.io/kubernetes/pkg/fields" "k8s.io/kubernetes/pkg/util/intstr" - - "github.com/google/gofuzz" ) // FuzzerFor can randomly populate api objects that are destined for version. @@ -77,7 +77,7 @@ func FuzzerFor(t *testing.T, version schema.GroupVersion, src rand.Source) *fuzz j.APIVersion = "" j.Kind = "" }, - func(j *api.ObjectMeta, c fuzz.Continue) { + func(j *metav1.ObjectMeta, c fuzz.Continue) { j.Name = c.RandString() j.ResourceVersion = strconv.FormatUint(c.RandUint64(), 10) j.SelfLink = c.RandString() @@ -117,6 +117,14 @@ func FuzzerFor(t *testing.T, version schema.GroupVersion, src rand.Source) *fuzz j.Stdout = true j.Stderr = true }, + func(j *api.PodPortForwardOptions, c fuzz.Continue) { + if c.RandBool() { + j.Ports = make([]int32, c.Intn(10)) + for i := range j.Ports { + j.Ports[i] = c.Int31n(65535) + } + } + }, func(s *api.PodSpec, c fuzz.Continue) { c.FuzzNoCustom(s) // has a default value @@ -134,6 +142,9 @@ func FuzzerFor(t *testing.T, version schema.GroupVersion, src rand.Source) *fuzz if s.Affinity == nil { s.Affinity = new(api.Affinity) } + if s.SchedulerName == "" { + s.SchedulerName = api.DefaultSchedulerName + } }, func(j *api.PodPhase, c fuzz.Continue) { statuses := []api.PodPhase{api.PodPending, api.PodRunning, api.PodFailed, api.PodUnknown} @@ -275,6 +286,10 @@ func FuzzerFor(t *testing.T, version schema.GroupVersion, src rand.Source) *fuzz func(s *api.SecretVolumeSource, c fuzz.Continue) { c.FuzzNoCustom(s) // fuzz self without calling this function again + if c.RandBool() { + opt := c.RandBool() + s.Optional = &opt + } // DefaultMode should always be set, it has a default // value and it is expected to be between 0 and 0777 var mode int32 @@ -285,6 +300,10 @@ func FuzzerFor(t *testing.T, version schema.GroupVersion, src rand.Source) *fuzz func(cm *api.ConfigMapVolumeSource, c fuzz.Continue) { c.FuzzNoCustom(cm) // fuzz self without calling this function again + if c.RandBool() { + opt := c.RandBool() + cm.Optional = &opt + } // DefaultMode should always be set, it has a default // value and it is expected to be between 0 and 0777 var mode int32 @@ -347,6 +366,7 @@ func FuzzerFor(t *testing.T, version schema.GroupVersion, src rand.Source) *fuzz func(ct *api.Container, c fuzz.Continue) { c.FuzzNoCustom(ct) // fuzz self without calling this function again ct.TerminationMessagePath = "/" + ct.TerminationMessagePath // Must be non-empty + ct.TerminationMessagePolicy = "File" }, func(p *api.Probe, c fuzz.Continue) { c.FuzzNoCustom(p) @@ -383,10 +403,19 @@ func FuzzerFor(t *testing.T, version schema.GroupVersion, src rand.Source) *fuzz } if c.RandBool() { c.Fuzz(&ev.ConfigMapRef) + } else { + c.Fuzz(&ev.SecretRef) } }, func(cm *api.ConfigMapEnvSource, c fuzz.Continue) { c.FuzzNoCustom(cm) // fuzz self without calling this function again + if c.RandBool() { + opt := c.RandBool() + cm.Optional = &opt + } + }, + func(s *api.SecretEnvSource, c fuzz.Continue) { + c.FuzzNoCustom(s) // fuzz self without calling this function again }, func(sc *api.SecurityContext, c fuzz.Continue) { c.FuzzNoCustom(sc) // fuzz self without calling this function again @@ -562,6 +591,7 @@ func FuzzerFor(t *testing.T, version schema.GroupVersion, src rand.Source) *fuzz obj.API.Port = 20 obj.Networking.ServiceSubnet = "foo" obj.Networking.DNSDomain = "foo" + obj.AuthorizationMode = "foo" obj.Discovery.Token = &kubeadm.TokenDiscovery{} }, func(s *policy.PodDisruptionBudgetStatus, c fuzz.Continue) { diff --git a/vendor/k8s.io/kubernetes/pkg/api/testing/pod_specs.go b/vendor/k8s.io/kubernetes/pkg/api/testing/pod_specs.go index 87300a3d..eb7c4e06 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/testing/pod_specs.go +++ b/vendor/k8s.io/kubernetes/pkg/api/testing/pod_specs.go @@ -29,6 +29,7 @@ func DeepEqualSafePodSpec() api.PodSpec { DNSPolicy: api.DNSClusterFirst, TerminationGracePeriodSeconds: &grace, SecurityContext: &api.PodSecurityContext{}, + SchedulerName: api.DefaultSchedulerName, } } diff --git a/vendor/k8s.io/kubernetes/pkg/api/types.go b/vendor/k8s.io/kubernetes/pkg/api/types.go index cadb7615..c2f933a8 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/types.go +++ b/vendor/k8s.io/kubernetes/pkg/api/types.go @@ -18,11 +18,11 @@ package api import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api/resource" - "k8s.io/kubernetes/pkg/fields" "k8s.io/kubernetes/pkg/util/intstr" ) @@ -57,6 +57,7 @@ import ( // ObjectMeta is metadata that all persisted resources must have, which includes all objects // users must create. +// DEPRECATED: Use k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta instead - this type will be removed soon. type ObjectMeta struct { // Name is unique within a namespace. Name is required when creating resources, although // some resources may allow a client to request the generation of an appropriate name @@ -370,7 +371,7 @@ type PersistentVolumeClaimVolumeSource struct { type PersistentVolume struct { metav1.TypeMeta // +optional - ObjectMeta + metav1.ObjectMeta //Spec defines a persistent volume owned by the cluster // +optional @@ -441,7 +442,7 @@ type PersistentVolumeList struct { type PersistentVolumeClaim struct { metav1.TypeMeta // +optional - ObjectMeta + metav1.ObjectMeta // Spec defines the volume requested by a pod author // +optional @@ -728,8 +729,8 @@ type SecretVolumeSource struct { // key and content is the value. If specified, the listed keys will be // projected into the specified paths, and unlisted keys will not be // present. If a key is specified which is not present in the Secret, - // the volume setup will error. Paths must be relative and may not contain - // the '..' path or start with '..'. + // the volume setup will error unless it is marked optional. Paths must be + // relative and may not contain the '..' path or start with '..'. // +optional Items []KeyToPath // Mode bits to use on created files by default. Must be a value between @@ -739,6 +740,9 @@ type SecretVolumeSource struct { // mode, like fsGroup, and the result can be other mode bits set. // +optional DefaultMode *int32 + // Specify whether the Secret or it's key must be defined + // +optional + Optional *bool } // Represents an NFS mount that lasts the lifetime of a pod. @@ -991,8 +995,8 @@ type ConfigMapVolumeSource struct { // key and content is the value. If specified, the listed keys will be // projected into the specified paths, and unlisted keys will not be // present. If a key is specified which is not present in the ConfigMap, - // the volume setup will error. Paths must be relative and may not contain - // the '..' path or start with '..'. + // the volume setup will error unless it is marked optional. Paths must be + // relative and may not contain the '..' path or start with '..'. // +optional Items []KeyToPath // Mode bits to use on created files by default. Must be a value between @@ -1002,6 +1006,9 @@ type ConfigMapVolumeSource struct { // mode, like fsGroup, and the result can be other mode bits set. // +optional DefaultMode *int32 + // Specify whether the ConfigMap or it's keys must be defined + // +optional + Optional *bool } // Maps a string key to a path within a volume. @@ -1123,6 +1130,9 @@ type ConfigMapKeySelector struct { LocalObjectReference // The key to select. Key string + // Specify whether the ConfigMap or it's key must be defined + // +optional + Optional *bool } // SecretKeySelector selects a key of a Secret. @@ -1131,6 +1141,9 @@ type SecretKeySelector struct { LocalObjectReference // The key of the secret to select from. Must be a valid secret key. Key string + // Specify whether the Secret or it's key must be defined + // +optional + Optional *bool } // EnvFromSource represents the source of a set of ConfigMaps @@ -1141,6 +1154,9 @@ type EnvFromSource struct { // The ConfigMap to select from. //+optional ConfigMapRef *ConfigMapEnvSource + // The Secret to select from. + //+optional + SecretRef *SecretEnvSource } // ConfigMapEnvSource selects a ConfigMap to populate the environment @@ -1151,6 +1167,22 @@ type EnvFromSource struct { type ConfigMapEnvSource struct { // The ConfigMap to select from. LocalObjectReference + // Specify whether the ConfigMap must be defined + // +optional + Optional *bool +} + +// SecretEnvSource selects a Secret to populate the environment +// variables with. +// +// The contents of the target Secret's Data field will represent the +// key-value pairs as environment variables. +type SecretEnvSource struct { + // The Secret to select from. + LocalObjectReference + // Specify whether the Secret must be defined + // +optional + Optional *bool } // HTTPHeader describes a custom header to be used in HTTP probes @@ -1243,6 +1275,19 @@ const ( PullIfNotPresent PullPolicy = "IfNotPresent" ) +// TerminationMessagePolicy describes how termination messages are retrieved from a container. +type TerminationMessagePolicy string + +const ( + // TerminationMessageReadFile is the default behavior and will set the container status message to + // the contents of the container's terminationMessagePath when the container exits. + TerminationMessageReadFile TerminationMessagePolicy = "File" + // TerminationMessageFallbackToLogsOnError will read the most recent contents of the container logs + // for the container status message when the container exits with an error and the + // terminationMessagePath has no contents. + TerminationMessageFallbackToLogsOnError TerminationMessagePolicy = "FallbackToLogsOnError" +) + // Capability represent POSIX capabilities type type Capability string @@ -1318,6 +1363,8 @@ type Container struct { // Required. // +optional TerminationMessagePath string + // +optional + TerminationMessagePolicy TerminationMessagePolicy // Required: Policy for pulling images for this container ImagePullPolicy PullPolicy // Optional: SecurityContext defines the security options the container should be run with. @@ -1855,6 +1902,10 @@ type PodSpec struct { // If specified, the pod's scheduling constraints // +optional Affinity *Affinity + // If specified, the pod will be dispatched by specified scheduler. + // If not specified, the pod will be dispatched by default scheduler. + // +optional + SchedulerName string } // Sysctl defines a kernel parameter to be set @@ -1981,7 +2032,7 @@ type PodStatus struct { type PodStatusResult struct { metav1.TypeMeta // +optional - ObjectMeta + metav1.ObjectMeta // Status represents the current information about a pod. This data may not be up // to date. // +optional @@ -1994,7 +2045,7 @@ type PodStatusResult struct { type Pod struct { metav1.TypeMeta // +optional - ObjectMeta + metav1.ObjectMeta // Spec defines the behavior of a pod. // +optional @@ -2010,7 +2061,7 @@ type Pod struct { type PodTemplateSpec struct { // Metadata of the pods created from this template. // +optional - ObjectMeta + metav1.ObjectMeta // Spec defines the behavior of a pod. // +optional @@ -2023,7 +2074,7 @@ type PodTemplateSpec struct { type PodTemplate struct { metav1.TypeMeta // +optional - ObjectMeta + metav1.ObjectMeta // Template defines the pods that will be created from this pod template // +optional @@ -2128,7 +2179,7 @@ type ReplicationControllerCondition struct { type ReplicationController struct { metav1.TypeMeta // +optional - ObjectMeta + metav1.ObjectMeta // Spec defines the desired behavior of this replication controller. // +optional @@ -2333,7 +2384,7 @@ type ServicePort struct { type Service struct { metav1.TypeMeta // +optional - ObjectMeta + metav1.ObjectMeta // Spec defines the behavior of a service. // +optional @@ -2353,7 +2404,7 @@ type Service struct { type ServiceAccount struct { metav1.TypeMeta // +optional - ObjectMeta + metav1.ObjectMeta // Secrets is the list of secrets allowed to be used by pods running using this ServiceAccount Secrets []ObjectReference @@ -2391,7 +2442,7 @@ type ServiceAccountList struct { type Endpoints struct { metav1.TypeMeta // +optional - ObjectMeta + metav1.ObjectMeta // The set of all endpoints is the union of all subsets. Subsets []EndpointSubset @@ -2713,7 +2764,7 @@ type ResourceList map[ResourceName]resource.Quantity type Node struct { metav1.TypeMeta // +optional - ObjectMeta + metav1.ObjectMeta // Spec defines the behavior of a node. // +optional @@ -2773,7 +2824,7 @@ const ( type Namespace struct { metav1.TypeMeta // +optional - ObjectMeta + metav1.ObjectMeta // Spec defines the behavior of the Namespace. // +optional @@ -2798,7 +2849,7 @@ type Binding struct { metav1.TypeMeta // ObjectMeta describes the object that is being bound. // +optional - ObjectMeta + metav1.ObjectMeta // Target is the object to bind to. Target ObjectReference @@ -2812,6 +2863,7 @@ type Preconditions struct { } // DeleteOptions may be provided when deleting an API object +// DEPRECATED: This type has been moved to meta/v1 and will be removed soon. type DeleteOptions struct { metav1.TypeMeta @@ -2834,6 +2886,7 @@ type DeleteOptions struct { // ListOptions is the query options to a standard REST list call, and has future support for // watch calls. +// DEPRECATED: This type has been moved to meta/v1 and will be removed soon. type ListOptions struct { metav1.TypeMeta @@ -2935,6 +2988,15 @@ type PodExecOptions struct { Command []string } +// PodPortForwardOptions is the query options to a Pod's port forward call +type PodPortForwardOptions struct { + metav1.TypeMeta + + // The list of ports to forward + // +optional + Ports []int32 +} + // PodProxyOptions is the query options to a Pod's proxy call type PodProxyOptions struct { metav1.TypeMeta @@ -3026,7 +3088,7 @@ const ( type Event struct { metav1.TypeMeta // +optional - ObjectMeta + metav1.ObjectMeta // Required. The object that this event is about. // +optional @@ -3129,7 +3191,7 @@ type LimitRangeSpec struct { type LimitRange struct { metav1.TypeMeta // +optional - ObjectMeta + metav1.ObjectMeta // Spec defines the limits enforced // +optional @@ -3219,7 +3281,7 @@ type ResourceQuotaStatus struct { type ResourceQuota struct { metav1.TypeMeta // +optional - ObjectMeta + metav1.ObjectMeta // Spec defines the desired quota // +optional @@ -3247,7 +3309,7 @@ type ResourceQuotaList struct { type Secret struct { metav1.TypeMeta // +optional - ObjectMeta + metav1.ObjectMeta // Data contains the secret data. Each key must be a valid DNS_SUBDOMAIN // or leading dot followed by valid DNS_SUBDOMAIN. @@ -3362,7 +3424,7 @@ type SecretList struct { type ConfigMap struct { metav1.TypeMeta // +optional - ObjectMeta + metav1.ObjectMeta // Data contains the configuration data. // Each key must be a valid DNS_SUBDOMAIN with an optional leading dot. @@ -3421,17 +3483,6 @@ const ( PortForwardRequestIDHeader = "requestID" ) -// Similarly to above, these are constants to support HTTP PATCH utilized by -// both the client and server that didn't make sense for a whole package to be -// dedicated to. -type PatchType string - -const ( - JSONPatchType PatchType = "application/json-patch+json" - MergePatchType PatchType = "application/merge-patch+json" - StrategicMergePatchType PatchType = "application/strategic-merge-patch+json" -) - // Type and constants for component health validation. type ComponentConditionType string @@ -3456,7 +3507,7 @@ type ComponentCondition struct { type ComponentStatus struct { metav1.TypeMeta // +optional - ObjectMeta + metav1.ObjectMeta // +optional Conditions []ComponentCondition @@ -3535,7 +3586,7 @@ type SELinuxOptions struct { type RangeAllocation struct { metav1.TypeMeta // +optional - ObjectMeta + metav1.ObjectMeta // A string representing a unique label for a range of resources, such as a CIDR "10.0.0.0/8" or // port range "10000-30000". Range is not strongly schema'd here. The Range is expected to define // a start and end unless there is an implicit end. diff --git a/vendor/k8s.io/kubernetes/pkg/api/unstructured_test.go b/vendor/k8s.io/kubernetes/pkg/api/unstructured_test.go new file mode 100644 index 00000000..17ea6621 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/api/unstructured_test.go @@ -0,0 +1,180 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package api_test + +import ( + "math/rand" + "reflect" + "testing" + + "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/api/testapi" + apitesting "k8s.io/kubernetes/pkg/api/testing" + "k8s.io/kubernetes/pkg/api/v1" + + "k8s.io/apimachinery/pkg/util/diff" + "k8s.io/apimachinery/pkg/util/json" + + "github.com/google/gofuzz" +) + +func doRoundTrip(t *testing.T, group testapi.TestGroup, kind string) { + // We do fuzzing on the internal version of the object, and only then + // convert to the external version. This is because custom fuzzing + // function are only supported for internal objects. + internalObj, err := api.Scheme.New(group.InternalGroupVersion().WithKind(kind)) + if err != nil { + t.Fatalf("Couldn't create internal object %v: %v", kind, err) + } + seed := rand.Int63() + apitesting.FuzzerFor(t, group.InternalGroupVersion(), rand.NewSource(seed)). + // We are explicitly overwriting custom fuzzing functions, to ensure + // that InitContainers and their statuses are not generated. This is + // because in thise test we are simply doing json operations, in which + // those disappear. + Funcs( + func(s *api.PodSpec, c fuzz.Continue) { + c.FuzzNoCustom(s) + s.InitContainers = nil + }, + func(s *api.PodStatus, c fuzz.Continue) { + c.FuzzNoCustom(s) + s.InitContainerStatuses = nil + }, + ).Fuzz(internalObj) + + item, err := api.Scheme.New(group.GroupVersion().WithKind(kind)) + if err != nil { + t.Fatalf("Couldn't create external object %v: %v", kind, err) + } + if err := api.Scheme.Convert(internalObj, item, nil); err != nil { + t.Fatalf("Conversion for %v failed: %v", kind, err) + } + + data, err := json.Marshal(item) + if err != nil { + t.Errorf("Error when marshaling object: %v", err) + return + } + unstr := make(map[string]interface{}) + err = json.Unmarshal(data, &unstr) + if err != nil { + t.Errorf("Error when unmarshaling to unstructured: %v", err) + return + } + + data, err = json.Marshal(unstr) + if err != nil { + t.Errorf("Error when marshaling unstructured: %v", err) + return + } + unmarshalledObj := reflect.New(reflect.TypeOf(item).Elem()).Interface() + err = json.Unmarshal(data, &unmarshalledObj) + if err != nil { + t.Errorf("Error when unmarshaling to object: %v", err) + return + } + if !api.Semantic.DeepEqual(item, unmarshalledObj) { + t.Errorf("Object changed during JSON operations, diff: %v", diff.ObjectReflectDiff(item, unmarshalledObj)) + return + } + + // TODO; Enable the following part of test once to/from unstructured + // format conversions are implemented. + /* + newUnstr := make(map[string]interface{}) + err = unstructured.NewConverter().ToUnstructured(item, &newUnstr) + if err != nil { + t.Errorf("ToUnstructured failed: %v", err) + return + } + + newObj := reflect.New(reflect.TypeOf(item).Elem()).Interface().(runtime.Object) + err = unstructured.NewConverter().FromUnstructured(newUnstr, newObj) + if err != nil { + t.Errorf("FromUnstructured failed: %v", err) + return + } + + if !api.Semantic.DeepEqual(item, newObj) { + t.Errorf("Object changed, diff: %v", diff.ObjectReflectDiff(item, newObj)) + } + */ +} + +func TestRoundTrip(t *testing.T) { + for groupKey, group := range testapi.Groups { + for kind := range group.ExternalTypes() { + if nonRoundTrippableTypes.Has(kind) { + continue + } + t.Logf("Testing: %v in %v", kind, groupKey) + for i := 0; i < 50; i++ { + doRoundTrip(t, group, kind) + if t.Failed() { + break + } + } + } + } +} + +// TODO; Enable the following benchmark once to/from unstructured +// format conversions are implemented. +/* +func BenchmarkToFromUnstructured(b *testing.B) { + items := benchmarkItems() + size := len(items) + b.ResetTimer() + for i := 0; i < b.N; i++ { + unstr := map[string]interface{}{} + if err := unstructured.NewConverter().ToUnstructured(&items[i%size], &unstr); err != nil { + b.Fatalf("unexpected error: %v", err) + } + obj := v1.Pod{} + if err := unstructured.NewConverter().FromUnstructured(unstr, &obj); err != nil { + b.Fatalf("unexpected error: %v", err) + } + } + b.StopTimer() +} +*/ + +func BenchmarkToFromUnstructuredViaJSON(b *testing.B) { + items := benchmarkItems() + size := len(items) + b.ResetTimer() + for i := 0; i < b.N; i++ { + data, err := json.Marshal(&items[i%size]) + if err != nil { + b.Fatalf("unexpected error: %v", err) + } + unstr := map[string]interface{}{} + if err := json.Unmarshal(data, &unstr); err != nil { + b.Fatalf("unexpected error: %v", err) + } + data, err = json.Marshal(unstr) + if err != nil { + b.Fatalf("unexpected error: %v", err) + } + obj := v1.Pod{} + if err := json.Unmarshal(data, &obj); err != nil { + b.Fatalf("unexpected error: %v", err) + } + } + b.StopTimer() +} diff --git a/vendor/k8s.io/kubernetes/pkg/api/v1/BUILD b/vendor/k8s.io/kubernetes/pkg/api/v1/BUILD index a902eb4b..d74dcf7a 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/v1/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/api/v1/BUILD @@ -33,7 +33,6 @@ go_library( "//pkg/api:go_default_library", "//pkg/api/resource:go_default_library", "//pkg/apis/extensions:go_default_library", - "//pkg/fields:go_default_library", "//pkg/util:go_default_library", "//pkg/util/intstr:go_default_library", "//pkg/util/parsers:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/api/v1/conversion.go b/vendor/k8s.io/kubernetes/pkg/api/v1/conversion.go index 028fbb99..02a99e83 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/v1/conversion.go +++ b/vendor/k8s.io/kubernetes/pkg/api/v1/conversion.go @@ -35,9 +35,6 @@ const ( // Value used to identify mirror pods from pre-v1.1 kubelet. mirrorAnnotationValue_1_0 = "mirror" - - // annotation key prefix used to identify non-convertible json paths. - NonConvertibleAnnotationPrefix = "kubernetes.io/non-convertible" ) // This is a "fast-path" that avoids reflection for common types. It focuses on the objects that are @@ -269,9 +266,7 @@ func addConversionFuncs(scheme *runtime.Scheme) error { } func Convert_v1_ReplicationController_to_extensions_ReplicaSet(in *ReplicationController, out *extensions.ReplicaSet, s conversion.Scope) error { - if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_ReplicationControllerSpec_to_extensions_ReplicaSetSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -304,9 +299,7 @@ func Convert_v1_ReplicationControllerStatus_to_extensions_ReplicaSetStatus(in *R } func Convert_extensions_ReplicaSet_to_v1_ReplicationController(in *extensions.ReplicaSet, out *ReplicationController, s conversion.Scope) error { - if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_extensions_ReplicaSetSpec_to_v1_ReplicationControllerSpec(&in.Spec, &out.Spec, s); err != nil { fieldErr, ok := err.(*field.Error) if !ok { @@ -315,7 +308,7 @@ func Convert_extensions_ReplicaSet_to_v1_ReplicationController(in *extensions.Re if out.Annotations == nil { out.Annotations = make(map[string]string) } - out.Annotations[NonConvertibleAnnotationPrefix+"/"+fieldErr.Field] = reflect.ValueOf(fieldErr.BadValue).String() + out.Annotations[api.NonConvertibleAnnotationPrefix+"/"+fieldErr.Field] = reflect.ValueOf(fieldErr.BadValue).String() } if err := Convert_extensions_ReplicaSetStatus_to_v1_ReplicationControllerStatus(&in.Status, &out.Status, s); err != nil { return err diff --git a/vendor/k8s.io/kubernetes/pkg/api/v1/defaults.go b/vendor/k8s.io/kubernetes/pkg/api/v1/defaults.go index 50950837..cb14c5e4 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/v1/defaults.go +++ b/vendor/k8s.io/kubernetes/pkg/api/v1/defaults.go @@ -121,6 +121,9 @@ func SetDefaults_Container(obj *Container) { if obj.TerminationMessagePath == "" { obj.TerminationMessagePath = TerminationMessagePathDefault } + if obj.TerminationMessagePolicy == "" { + obj.TerminationMessagePolicy = TerminationMessageReadFile + } } func SetDefaults_ServiceSpec(obj *ServiceSpec) { if obj.SessionAffinity == "" { @@ -174,6 +177,9 @@ func SetDefaults_PodSpec(obj *PodSpec) { period := int64(DefaultTerminationGracePeriodSeconds) obj.TerminationGracePeriodSeconds = &period } + if obj.SchedulerName == "" { + obj.SchedulerName = DefaultSchedulerName + } } func SetDefaults_Probe(obj *Probe) { if obj.TimeoutSeconds == 0 { diff --git a/vendor/k8s.io/kubernetes/pkg/api/v1/defaults_test.go b/vendor/k8s.io/kubernetes/pkg/api/v1/defaults_test.go index f1c533a5..61d7ac46 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/v1/defaults_test.go +++ b/vendor/k8s.io/kubernetes/pkg/api/v1/defaults_test.go @@ -21,6 +21,7 @@ import ( "reflect" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/resource" @@ -59,7 +60,7 @@ func TestSetDefaultReplicationController(t *testing.T) { rc: &v1.ReplicationController{ Spec: v1.ReplicationControllerSpec{ Template: &v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "foo": "bar", }, @@ -72,14 +73,14 @@ func TestSetDefaultReplicationController(t *testing.T) { }, { rc: &v1.ReplicationController{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "bar": "foo", }, }, Spec: v1.ReplicationControllerSpec{ Template: &v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "foo": "bar", }, @@ -92,7 +93,7 @@ func TestSetDefaultReplicationController(t *testing.T) { }, { rc: &v1.ReplicationController{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "bar": "foo", }, @@ -102,7 +103,7 @@ func TestSetDefaultReplicationController(t *testing.T) { "some": "other", }, Template: &v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "foo": "bar", }, @@ -120,7 +121,7 @@ func TestSetDefaultReplicationController(t *testing.T) { "some": "other", }, Template: &v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "foo": "bar", }, @@ -173,7 +174,7 @@ func TestSetDefaultReplicationControllerReplicas(t *testing.T) { rc: v1.ReplicationController{ Spec: v1.ReplicationControllerSpec{ Template: &v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "foo": "bar", }, @@ -188,7 +189,7 @@ func TestSetDefaultReplicationControllerReplicas(t *testing.T) { Spec: v1.ReplicationControllerSpec{ Replicas: newInt(0), Template: &v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "foo": "bar", }, @@ -203,7 +204,7 @@ func TestSetDefaultReplicationControllerReplicas(t *testing.T) { Spec: v1.ReplicationControllerSpec{ Replicas: newInt(3), Template: &v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "foo": "bar", }, @@ -254,7 +255,7 @@ func TestSetDefaultReplicationControllerImagePullPolicy(t *testing.T) { rc: v1.ReplicationController{ Spec: v1.ReplicationControllerSpec{ Template: &v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ "pod.beta.kubernetes.io/init-containers": string(containersWithoutPullPolicy), }, @@ -268,7 +269,7 @@ func TestSetDefaultReplicationControllerImagePullPolicy(t *testing.T) { rc: v1.ReplicationController{ Spec: v1.ReplicationControllerSpec{ Template: &v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ "pod.beta.kubernetes.io/init-containers": string(containersWithPullPolicy), }, @@ -724,7 +725,7 @@ func TestDefaultRequestIsNotSetForReplicationController(t *testing.T) { Spec: v1.ReplicationControllerSpec{ Replicas: newInt(3), Template: &v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "foo": "bar", }, @@ -744,7 +745,7 @@ func TestDefaultRequestIsNotSetForReplicationController(t *testing.T) { func TestSetDefaultLimitRangeItem(t *testing.T) { limitRange := &v1.LimitRange{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test-defaults", }, Spec: v1.LimitRangeSpec{ @@ -806,3 +807,12 @@ func TestSetDefaultProbe(t *testing.T) { t.Errorf("Expected probe: %+v\ngot: %+v\n", expectedProbe, actualProbe) } } + +func TestSetDefaultSchedulerName(t *testing.T) { + pod := &v1.Pod{} + + output := roundTrip(t, runtime.Object(pod)).(*v1.Pod) + if output.Spec.SchedulerName != v1.DefaultSchedulerName { + t.Errorf("Expected scheduler name: %+v\ngot: %+v\n", v1.DefaultSchedulerName, output.Spec.SchedulerName) + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/api/v1/generated.pb.go b/vendor/k8s.io/kubernetes/pkg/api/v1/generated.pb.go index 56d236af..bd838ded 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/v1/generated.pb.go +++ b/vendor/k8s.io/kubernetes/pkg/api/v1/generated.pb.go @@ -132,6 +132,7 @@ limitations under the License. PodExecOptions PodList PodLogOptions + PodPortForwardOptions PodProxyOptions PodSecurityContext PodSignature @@ -161,6 +162,7 @@ limitations under the License. ResourceRequirements SELinuxOptions Secret + SecretEnvSource SecretKeySelector SecretList SecretVolumeSource @@ -660,222 +662,230 @@ func (m *PodLogOptions) Reset() { *m = PodLogOptions{} } func (*PodLogOptions) ProtoMessage() {} func (*PodLogOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{106} } +func (m *PodPortForwardOptions) Reset() { *m = PodPortForwardOptions{} } +func (*PodPortForwardOptions) ProtoMessage() {} +func (*PodPortForwardOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{107} } + func (m *PodProxyOptions) Reset() { *m = PodProxyOptions{} } func (*PodProxyOptions) ProtoMessage() {} -func (*PodProxyOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{107} } +func (*PodProxyOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{108} } func (m *PodSecurityContext) Reset() { *m = PodSecurityContext{} } func (*PodSecurityContext) ProtoMessage() {} -func (*PodSecurityContext) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{108} } +func (*PodSecurityContext) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{109} } func (m *PodSignature) Reset() { *m = PodSignature{} } func (*PodSignature) ProtoMessage() {} -func (*PodSignature) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{109} } +func (*PodSignature) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{110} } func (m *PodSpec) Reset() { *m = PodSpec{} } func (*PodSpec) ProtoMessage() {} -func (*PodSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{110} } +func (*PodSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{111} } func (m *PodStatus) Reset() { *m = PodStatus{} } func (*PodStatus) ProtoMessage() {} -func (*PodStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{111} } +func (*PodStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{112} } func (m *PodStatusResult) Reset() { *m = PodStatusResult{} } func (*PodStatusResult) ProtoMessage() {} -func (*PodStatusResult) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{112} } +func (*PodStatusResult) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{113} } func (m *PodTemplate) Reset() { *m = PodTemplate{} } func (*PodTemplate) ProtoMessage() {} -func (*PodTemplate) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{113} } +func (*PodTemplate) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{114} } func (m *PodTemplateList) Reset() { *m = PodTemplateList{} } func (*PodTemplateList) ProtoMessage() {} -func (*PodTemplateList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{114} } +func (*PodTemplateList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{115} } func (m *PodTemplateSpec) Reset() { *m = PodTemplateSpec{} } func (*PodTemplateSpec) ProtoMessage() {} -func (*PodTemplateSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{115} } +func (*PodTemplateSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{116} } func (m *Preconditions) Reset() { *m = Preconditions{} } func (*Preconditions) ProtoMessage() {} -func (*Preconditions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{116} } +func (*Preconditions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{117} } func (m *PreferAvoidPodsEntry) Reset() { *m = PreferAvoidPodsEntry{} } func (*PreferAvoidPodsEntry) ProtoMessage() {} -func (*PreferAvoidPodsEntry) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{117} } +func (*PreferAvoidPodsEntry) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{118} } func (m *PreferredSchedulingTerm) Reset() { *m = PreferredSchedulingTerm{} } func (*PreferredSchedulingTerm) ProtoMessage() {} func (*PreferredSchedulingTerm) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{118} + return fileDescriptorGenerated, []int{119} } func (m *Probe) Reset() { *m = Probe{} } func (*Probe) ProtoMessage() {} -func (*Probe) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{119} } +func (*Probe) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{120} } func (m *QuobyteVolumeSource) Reset() { *m = QuobyteVolumeSource{} } func (*QuobyteVolumeSource) ProtoMessage() {} -func (*QuobyteVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{120} } +func (*QuobyteVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{121} } func (m *RBDVolumeSource) Reset() { *m = RBDVolumeSource{} } func (*RBDVolumeSource) ProtoMessage() {} -func (*RBDVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{121} } +func (*RBDVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{122} } func (m *RangeAllocation) Reset() { *m = RangeAllocation{} } func (*RangeAllocation) ProtoMessage() {} -func (*RangeAllocation) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{122} } +func (*RangeAllocation) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{123} } func (m *ReplicationController) Reset() { *m = ReplicationController{} } func (*ReplicationController) ProtoMessage() {} -func (*ReplicationController) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{123} } +func (*ReplicationController) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{124} } func (m *ReplicationControllerCondition) Reset() { *m = ReplicationControllerCondition{} } func (*ReplicationControllerCondition) ProtoMessage() {} func (*ReplicationControllerCondition) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{124} + return fileDescriptorGenerated, []int{125} } func (m *ReplicationControllerList) Reset() { *m = ReplicationControllerList{} } func (*ReplicationControllerList) ProtoMessage() {} func (*ReplicationControllerList) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{125} + return fileDescriptorGenerated, []int{126} } func (m *ReplicationControllerSpec) Reset() { *m = ReplicationControllerSpec{} } func (*ReplicationControllerSpec) ProtoMessage() {} func (*ReplicationControllerSpec) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{126} + return fileDescriptorGenerated, []int{127} } func (m *ReplicationControllerStatus) Reset() { *m = ReplicationControllerStatus{} } func (*ReplicationControllerStatus) ProtoMessage() {} func (*ReplicationControllerStatus) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{127} + return fileDescriptorGenerated, []int{128} } func (m *ResourceFieldSelector) Reset() { *m = ResourceFieldSelector{} } func (*ResourceFieldSelector) ProtoMessage() {} -func (*ResourceFieldSelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{128} } +func (*ResourceFieldSelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{129} } func (m *ResourceQuota) Reset() { *m = ResourceQuota{} } func (*ResourceQuota) ProtoMessage() {} -func (*ResourceQuota) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{129} } +func (*ResourceQuota) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{130} } func (m *ResourceQuotaList) Reset() { *m = ResourceQuotaList{} } func (*ResourceQuotaList) ProtoMessage() {} -func (*ResourceQuotaList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{130} } +func (*ResourceQuotaList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{131} } func (m *ResourceQuotaSpec) Reset() { *m = ResourceQuotaSpec{} } func (*ResourceQuotaSpec) ProtoMessage() {} -func (*ResourceQuotaSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{131} } +func (*ResourceQuotaSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{132} } func (m *ResourceQuotaStatus) Reset() { *m = ResourceQuotaStatus{} } func (*ResourceQuotaStatus) ProtoMessage() {} -func (*ResourceQuotaStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{132} } +func (*ResourceQuotaStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{133} } func (m *ResourceRequirements) Reset() { *m = ResourceRequirements{} } func (*ResourceRequirements) ProtoMessage() {} -func (*ResourceRequirements) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{133} } +func (*ResourceRequirements) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{134} } func (m *SELinuxOptions) Reset() { *m = SELinuxOptions{} } func (*SELinuxOptions) ProtoMessage() {} -func (*SELinuxOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{134} } +func (*SELinuxOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{135} } func (m *Secret) Reset() { *m = Secret{} } func (*Secret) ProtoMessage() {} -func (*Secret) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{135} } +func (*Secret) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{136} } + +func (m *SecretEnvSource) Reset() { *m = SecretEnvSource{} } +func (*SecretEnvSource) ProtoMessage() {} +func (*SecretEnvSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{137} } func (m *SecretKeySelector) Reset() { *m = SecretKeySelector{} } func (*SecretKeySelector) ProtoMessage() {} -func (*SecretKeySelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{136} } +func (*SecretKeySelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{138} } func (m *SecretList) Reset() { *m = SecretList{} } func (*SecretList) ProtoMessage() {} -func (*SecretList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{137} } +func (*SecretList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{139} } func (m *SecretVolumeSource) Reset() { *m = SecretVolumeSource{} } func (*SecretVolumeSource) ProtoMessage() {} -func (*SecretVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{138} } +func (*SecretVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{140} } func (m *SecurityContext) Reset() { *m = SecurityContext{} } func (*SecurityContext) ProtoMessage() {} -func (*SecurityContext) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{139} } +func (*SecurityContext) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{141} } func (m *SerializedReference) Reset() { *m = SerializedReference{} } func (*SerializedReference) ProtoMessage() {} -func (*SerializedReference) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{140} } +func (*SerializedReference) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{142} } func (m *Service) Reset() { *m = Service{} } func (*Service) ProtoMessage() {} -func (*Service) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{141} } +func (*Service) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{143} } func (m *ServiceAccount) Reset() { *m = ServiceAccount{} } func (*ServiceAccount) ProtoMessage() {} -func (*ServiceAccount) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{142} } +func (*ServiceAccount) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{144} } func (m *ServiceAccountList) Reset() { *m = ServiceAccountList{} } func (*ServiceAccountList) ProtoMessage() {} -func (*ServiceAccountList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{143} } +func (*ServiceAccountList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{145} } func (m *ServiceList) Reset() { *m = ServiceList{} } func (*ServiceList) ProtoMessage() {} -func (*ServiceList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{144} } +func (*ServiceList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{146} } func (m *ServicePort) Reset() { *m = ServicePort{} } func (*ServicePort) ProtoMessage() {} -func (*ServicePort) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{145} } +func (*ServicePort) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{147} } func (m *ServiceProxyOptions) Reset() { *m = ServiceProxyOptions{} } func (*ServiceProxyOptions) ProtoMessage() {} -func (*ServiceProxyOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{146} } +func (*ServiceProxyOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{148} } func (m *ServiceSpec) Reset() { *m = ServiceSpec{} } func (*ServiceSpec) ProtoMessage() {} -func (*ServiceSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{147} } +func (*ServiceSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{149} } func (m *ServiceStatus) Reset() { *m = ServiceStatus{} } func (*ServiceStatus) ProtoMessage() {} -func (*ServiceStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{148} } +func (*ServiceStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{150} } func (m *Sysctl) Reset() { *m = Sysctl{} } func (*Sysctl) ProtoMessage() {} -func (*Sysctl) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{149} } +func (*Sysctl) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{151} } func (m *TCPSocketAction) Reset() { *m = TCPSocketAction{} } func (*TCPSocketAction) ProtoMessage() {} -func (*TCPSocketAction) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{150} } +func (*TCPSocketAction) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{152} } func (m *Taint) Reset() { *m = Taint{} } func (*Taint) ProtoMessage() {} -func (*Taint) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{151} } +func (*Taint) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{153} } func (m *Toleration) Reset() { *m = Toleration{} } func (*Toleration) ProtoMessage() {} -func (*Toleration) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{152} } +func (*Toleration) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{154} } func (m *Volume) Reset() { *m = Volume{} } func (*Volume) ProtoMessage() {} -func (*Volume) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{153} } +func (*Volume) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{155} } func (m *VolumeMount) Reset() { *m = VolumeMount{} } func (*VolumeMount) ProtoMessage() {} -func (*VolumeMount) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{154} } +func (*VolumeMount) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{156} } func (m *VolumeSource) Reset() { *m = VolumeSource{} } func (*VolumeSource) ProtoMessage() {} -func (*VolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{155} } +func (*VolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{157} } func (m *VsphereVirtualDiskVolumeSource) Reset() { *m = VsphereVirtualDiskVolumeSource{} } func (*VsphereVirtualDiskVolumeSource) ProtoMessage() {} func (*VsphereVirtualDiskVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{156} + return fileDescriptorGenerated, []int{158} } func (m *WeightedPodAffinityTerm) Reset() { *m = WeightedPodAffinityTerm{} } func (*WeightedPodAffinityTerm) ProtoMessage() {} func (*WeightedPodAffinityTerm) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{157} + return fileDescriptorGenerated, []int{159} } func init() { @@ -986,6 +996,7 @@ func init() { proto.RegisterType((*PodExecOptions)(nil), "k8s.io.kubernetes.pkg.api.v1.PodExecOptions") proto.RegisterType((*PodList)(nil), "k8s.io.kubernetes.pkg.api.v1.PodList") proto.RegisterType((*PodLogOptions)(nil), "k8s.io.kubernetes.pkg.api.v1.PodLogOptions") + proto.RegisterType((*PodPortForwardOptions)(nil), "k8s.io.kubernetes.pkg.api.v1.PodPortForwardOptions") proto.RegisterType((*PodProxyOptions)(nil), "k8s.io.kubernetes.pkg.api.v1.PodProxyOptions") proto.RegisterType((*PodSecurityContext)(nil), "k8s.io.kubernetes.pkg.api.v1.PodSecurityContext") proto.RegisterType((*PodSignature)(nil), "k8s.io.kubernetes.pkg.api.v1.PodSignature") @@ -1015,6 +1026,7 @@ func init() { proto.RegisterType((*ResourceRequirements)(nil), "k8s.io.kubernetes.pkg.api.v1.ResourceRequirements") proto.RegisterType((*SELinuxOptions)(nil), "k8s.io.kubernetes.pkg.api.v1.SELinuxOptions") proto.RegisterType((*Secret)(nil), "k8s.io.kubernetes.pkg.api.v1.Secret") + proto.RegisterType((*SecretEnvSource)(nil), "k8s.io.kubernetes.pkg.api.v1.SecretEnvSource") proto.RegisterType((*SecretKeySelector)(nil), "k8s.io.kubernetes.pkg.api.v1.SecretKeySelector") proto.RegisterType((*SecretList)(nil), "k8s.io.kubernetes.pkg.api.v1.SecretList") proto.RegisterType((*SecretVolumeSource)(nil), "k8s.io.kubernetes.pkg.api.v1.SecretVolumeSource") @@ -1616,6 +1628,16 @@ func (m *ConfigMapEnvSource) MarshalTo(data []byte) (int, error) { return 0, err } i += n10 + if m.Optional != nil { + data[i] = 0x10 + i++ + if *m.Optional { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } return i, nil } @@ -1646,6 +1668,16 @@ func (m *ConfigMapKeySelector) MarshalTo(data []byte) (int, error) { i++ i = encodeVarintGenerated(data, i, uint64(len(m.Key))) i += copy(data[i:], m.Key) + if m.Optional != nil { + data[i] = 0x18 + i++ + if *m.Optional { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } return i, nil } @@ -1727,6 +1759,16 @@ func (m *ConfigMapVolumeSource) MarshalTo(data []byte) (int, error) { i++ i = encodeVarintGenerated(data, i, uint64(*m.DefaultMode)) } + if m.Optional != nil { + data[i] = 0x20 + i++ + if *m.Optional { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } return i, nil } @@ -1923,6 +1965,12 @@ func (m *Container) MarshalTo(data []byte) (int, error) { i += n } } + data[i] = 0xa2 + i++ + data[i] = 0x1 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.TerminationMessagePolicy))) + i += copy(data[i:], m.TerminationMessagePolicy) return i, nil } @@ -2609,6 +2657,16 @@ func (m *EnvFromSource) MarshalTo(data []byte) (int, error) { } i += n33 } + if m.SecretRef != nil { + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.SecretRef.Size())) + n34, err := m.SecretRef.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n34 + } return i, nil } @@ -2639,11 +2697,11 @@ func (m *EnvVar) MarshalTo(data []byte) (int, error) { data[i] = 0x1a i++ i = encodeVarintGenerated(data, i, uint64(m.ValueFrom.Size())) - n34, err := m.ValueFrom.MarshalTo(data[i:]) + n35, err := m.ValueFrom.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n34 + i += n35 } return i, nil } @@ -2667,42 +2725,42 @@ func (m *EnvVarSource) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.FieldRef.Size())) - n35, err := m.FieldRef.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n35 - } - if m.ResourceFieldRef != nil { - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(m.ResourceFieldRef.Size())) - n36, err := m.ResourceFieldRef.MarshalTo(data[i:]) + n36, err := m.FieldRef.MarshalTo(data[i:]) if err != nil { return 0, err } i += n36 } - if m.ConfigMapKeyRef != nil { - data[i] = 0x1a + if m.ResourceFieldRef != nil { + data[i] = 0x12 i++ - i = encodeVarintGenerated(data, i, uint64(m.ConfigMapKeyRef.Size())) - n37, err := m.ConfigMapKeyRef.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.ResourceFieldRef.Size())) + n37, err := m.ResourceFieldRef.MarshalTo(data[i:]) if err != nil { return 0, err } i += n37 } - if m.SecretKeyRef != nil { - data[i] = 0x22 + if m.ConfigMapKeyRef != nil { + data[i] = 0x1a i++ - i = encodeVarintGenerated(data, i, uint64(m.SecretKeyRef.Size())) - n38, err := m.SecretKeyRef.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.ConfigMapKeyRef.Size())) + n38, err := m.ConfigMapKeyRef.MarshalTo(data[i:]) if err != nil { return 0, err } i += n38 } + if m.SecretKeyRef != nil { + data[i] = 0x22 + i++ + i = encodeVarintGenerated(data, i, uint64(m.SecretKeyRef.Size())) + n39, err := m.SecretKeyRef.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n39 + } return i, nil } @@ -2724,19 +2782,19 @@ func (m *Event) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n39, err := m.ObjectMeta.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n39 - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(m.InvolvedObject.Size())) - n40, err := m.InvolvedObject.MarshalTo(data[i:]) + n40, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } i += n40 + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(m.InvolvedObject.Size())) + n41, err := m.InvolvedObject.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n41 data[i] = 0x1a i++ i = encodeVarintGenerated(data, i, uint64(len(m.Reason))) @@ -2748,27 +2806,27 @@ func (m *Event) MarshalTo(data []byte) (int, error) { data[i] = 0x2a i++ i = encodeVarintGenerated(data, i, uint64(m.Source.Size())) - n41, err := m.Source.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n41 - data[i] = 0x32 - i++ - i = encodeVarintGenerated(data, i, uint64(m.FirstTimestamp.Size())) - n42, err := m.FirstTimestamp.MarshalTo(data[i:]) + n42, err := m.Source.MarshalTo(data[i:]) if err != nil { return 0, err } i += n42 - data[i] = 0x3a + data[i] = 0x32 i++ - i = encodeVarintGenerated(data, i, uint64(m.LastTimestamp.Size())) - n43, err := m.LastTimestamp.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.FirstTimestamp.Size())) + n43, err := m.FirstTimestamp.MarshalTo(data[i:]) if err != nil { return 0, err } i += n43 + data[i] = 0x3a + i++ + i = encodeVarintGenerated(data, i, uint64(m.LastTimestamp.Size())) + n44, err := m.LastTimestamp.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n44 data[i] = 0x40 i++ i = encodeVarintGenerated(data, i, uint64(m.Count)) @@ -2797,11 +2855,11 @@ func (m *EventList) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n44, err := m.ListMeta.MarshalTo(data[i:]) + n45, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n44 + i += n45 if len(m.Items) > 0 { for _, msg := range m.Items { data[i] = 0x12 @@ -2953,11 +3011,11 @@ func (m *FlexVolumeSource) MarshalTo(data []byte) (int, error) { data[i] = 0x1a i++ i = encodeVarintGenerated(data, i, uint64(m.SecretRef.Size())) - n45, err := m.SecretRef.MarshalTo(data[i:]) + n46, err := m.SecretRef.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n45 + i += n46 } data[i] = 0x20 i++ @@ -3136,11 +3194,11 @@ func (m *HTTPGetAction) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.Port.Size())) - n46, err := m.Port.MarshalTo(data[i:]) + n47, err := m.Port.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n46 + i += n47 data[i] = 0x1a i++ i = encodeVarintGenerated(data, i, uint64(len(m.Host))) @@ -3209,32 +3267,32 @@ func (m *Handler) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.Exec.Size())) - n47, err := m.Exec.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n47 - } - if m.HTTPGet != nil { - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(m.HTTPGet.Size())) - n48, err := m.HTTPGet.MarshalTo(data[i:]) + n48, err := m.Exec.MarshalTo(data[i:]) if err != nil { return 0, err } i += n48 } - if m.TCPSocket != nil { - data[i] = 0x1a + if m.HTTPGet != nil { + data[i] = 0x12 i++ - i = encodeVarintGenerated(data, i, uint64(m.TCPSocket.Size())) - n49, err := m.TCPSocket.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.HTTPGet.Size())) + n49, err := m.HTTPGet.MarshalTo(data[i:]) if err != nil { return 0, err } i += n49 } + if m.TCPSocket != nil { + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.TCPSocket.Size())) + n50, err := m.TCPSocket.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n50 + } return i, nil } @@ -3355,21 +3413,21 @@ func (m *Lifecycle) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.PostStart.Size())) - n50, err := m.PostStart.MarshalTo(data[i:]) + n51, err := m.PostStart.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n50 + i += n51 } if m.PreStop != nil { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.PreStop.Size())) - n51, err := m.PreStop.MarshalTo(data[i:]) + n52, err := m.PreStop.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n51 + i += n52 } return i, nil } @@ -3392,19 +3450,19 @@ func (m *LimitRange) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n52, err := m.ObjectMeta.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n52 - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) - n53, err := m.Spec.MarshalTo(data[i:]) + n53, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } i += n53 + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) + n54, err := m.Spec.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n54 return i, nil } @@ -3442,11 +3500,11 @@ func (m *LimitRangeItem) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64((&v).Size())) - n54, err := (&v).MarshalTo(data[i:]) + n55, err := (&v).MarshalTo(data[i:]) if err != nil { return 0, err } - i += n54 + i += n55 } } if len(m.Min) > 0 { @@ -3464,11 +3522,11 @@ func (m *LimitRangeItem) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64((&v).Size())) - n55, err := (&v).MarshalTo(data[i:]) + n56, err := (&v).MarshalTo(data[i:]) if err != nil { return 0, err } - i += n55 + i += n56 } } if len(m.Default) > 0 { @@ -3486,11 +3544,11 @@ func (m *LimitRangeItem) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64((&v).Size())) - n56, err := (&v).MarshalTo(data[i:]) + n57, err := (&v).MarshalTo(data[i:]) if err != nil { return 0, err } - i += n56 + i += n57 } } if len(m.DefaultRequest) > 0 { @@ -3508,11 +3566,11 @@ func (m *LimitRangeItem) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64((&v).Size())) - n57, err := (&v).MarshalTo(data[i:]) + n58, err := (&v).MarshalTo(data[i:]) if err != nil { return 0, err } - i += n57 + i += n58 } } if len(m.MaxLimitRequestRatio) > 0 { @@ -3530,11 +3588,11 @@ func (m *LimitRangeItem) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64((&v).Size())) - n58, err := (&v).MarshalTo(data[i:]) + n59, err := (&v).MarshalTo(data[i:]) if err != nil { return 0, err } - i += n58 + i += n59 } } return i, nil @@ -3558,11 +3616,11 @@ func (m *LimitRangeList) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n59, err := m.ListMeta.MarshalTo(data[i:]) + n60, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n59 + i += n60 if len(m.Items) > 0 { for _, msg := range m.Items { data[i] = 0x12 @@ -3626,11 +3684,11 @@ func (m *List) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n60, err := m.ListMeta.MarshalTo(data[i:]) + n61, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n60 + i += n61 if len(m.Items) > 0 { for _, msg := range m.Items { data[i] = 0x12 @@ -3819,27 +3877,27 @@ func (m *Namespace) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n61, err := m.ObjectMeta.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n61 - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) - n62, err := m.Spec.MarshalTo(data[i:]) + n62, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } i += n62 - data[i] = 0x1a + data[i] = 0x12 i++ - i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) - n63, err := m.Status.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) + n63, err := m.Spec.MarshalTo(data[i:]) if err != nil { return 0, err } i += n63 + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) + n64, err := m.Status.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n64 return i, nil } @@ -3861,11 +3919,11 @@ func (m *NamespaceList) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n64, err := m.ListMeta.MarshalTo(data[i:]) + n65, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n64 + i += n65 if len(m.Items) > 0 { for _, msg := range m.Items { data[i] = 0x12 @@ -3954,27 +4012,27 @@ func (m *Node) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n65, err := m.ObjectMeta.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n65 - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) - n66, err := m.Spec.MarshalTo(data[i:]) + n66, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } i += n66 - data[i] = 0x1a + data[i] = 0x12 i++ - i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) - n67, err := m.Status.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) + n67, err := m.Spec.MarshalTo(data[i:]) if err != nil { return 0, err } i += n67 + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) + n68, err := m.Status.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n68 return i, nil } @@ -4023,11 +4081,11 @@ func (m *NodeAffinity) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.RequiredDuringSchedulingIgnoredDuringExecution.Size())) - n68, err := m.RequiredDuringSchedulingIgnoredDuringExecution.MarshalTo(data[i:]) + n69, err := m.RequiredDuringSchedulingIgnoredDuringExecution.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n68 + i += n69 } if len(m.PreferredDuringSchedulingIgnoredDuringExecution) > 0 { for _, msg := range m.PreferredDuringSchedulingIgnoredDuringExecution { @@ -4070,19 +4128,19 @@ func (m *NodeCondition) MarshalTo(data []byte) (int, error) { data[i] = 0x1a i++ i = encodeVarintGenerated(data, i, uint64(m.LastHeartbeatTime.Size())) - n69, err := m.LastHeartbeatTime.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n69 - data[i] = 0x22 - i++ - i = encodeVarintGenerated(data, i, uint64(m.LastTransitionTime.Size())) - n70, err := m.LastTransitionTime.MarshalTo(data[i:]) + n70, err := m.LastHeartbeatTime.MarshalTo(data[i:]) if err != nil { return 0, err } i += n70 + data[i] = 0x22 + i++ + i = encodeVarintGenerated(data, i, uint64(m.LastTransitionTime.Size())) + n71, err := m.LastTransitionTime.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n71 data[i] = 0x2a i++ i = encodeVarintGenerated(data, i, uint64(len(m.Reason))) @@ -4112,11 +4170,11 @@ func (m *NodeDaemonEndpoints) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.KubeletEndpoint.Size())) - n71, err := m.KubeletEndpoint.MarshalTo(data[i:]) + n72, err := m.KubeletEndpoint.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n71 + i += n72 return i, nil } @@ -4138,11 +4196,11 @@ func (m *NodeList) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n72, err := m.ListMeta.MarshalTo(data[i:]) + n73, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n72 + i += n73 if len(m.Items) > 0 { for _, msg := range m.Items { data[i] = 0x12 @@ -4210,11 +4268,11 @@ func (m *NodeResources) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64((&v).Size())) - n73, err := (&v).MarshalTo(data[i:]) + n74, err := (&v).MarshalTo(data[i:]) if err != nil { return 0, err } - i += n73 + i += n74 } } return i, nil @@ -4389,11 +4447,11 @@ func (m *NodeStatus) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64((&v).Size())) - n74, err := (&v).MarshalTo(data[i:]) + n75, err := (&v).MarshalTo(data[i:]) if err != nil { return 0, err } - i += n74 + i += n75 } } if len(m.Allocatable) > 0 { @@ -4411,11 +4469,11 @@ func (m *NodeStatus) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64((&v).Size())) - n75, err := (&v).MarshalTo(data[i:]) + n76, err := (&v).MarshalTo(data[i:]) if err != nil { return 0, err } - i += n75 + i += n76 } } data[i] = 0x1a @@ -4449,19 +4507,19 @@ func (m *NodeStatus) MarshalTo(data []byte) (int, error) { data[i] = 0x32 i++ i = encodeVarintGenerated(data, i, uint64(m.DaemonEndpoints.Size())) - n76, err := m.DaemonEndpoints.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n76 - data[i] = 0x3a - i++ - i = encodeVarintGenerated(data, i, uint64(m.NodeInfo.Size())) - n77, err := m.NodeInfo.MarshalTo(data[i:]) + n77, err := m.DaemonEndpoints.MarshalTo(data[i:]) if err != nil { return 0, err } i += n77 + data[i] = 0x3a + i++ + i = encodeVarintGenerated(data, i, uint64(m.NodeInfo.Size())) + n78, err := m.NodeInfo.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n78 if len(m.Images) > 0 { for _, msg := range m.Images { data[i] = 0x42 @@ -4633,20 +4691,20 @@ func (m *ObjectMeta) MarshalTo(data []byte) (int, error) { data[i] = 0x42 i++ i = encodeVarintGenerated(data, i, uint64(m.CreationTimestamp.Size())) - n78, err := m.CreationTimestamp.MarshalTo(data[i:]) + n79, err := m.CreationTimestamp.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n78 + i += n79 if m.DeletionTimestamp != nil { data[i] = 0x4a i++ i = encodeVarintGenerated(data, i, uint64(m.DeletionTimestamp.Size())) - n79, err := m.DeletionTimestamp.MarshalTo(data[i:]) + n80, err := m.DeletionTimestamp.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n79 + i += n80 } if m.DeletionGracePeriodSeconds != nil { data[i] = 0x50 @@ -4785,27 +4843,27 @@ func (m *PersistentVolume) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n80, err := m.ObjectMeta.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n80 - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) - n81, err := m.Spec.MarshalTo(data[i:]) + n81, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } i += n81 - data[i] = 0x1a + data[i] = 0x12 i++ - i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) - n82, err := m.Status.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) + n82, err := m.Spec.MarshalTo(data[i:]) if err != nil { return 0, err } i += n82 + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) + n83, err := m.Status.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n83 return i, nil } @@ -4827,27 +4885,27 @@ func (m *PersistentVolumeClaim) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n83, err := m.ObjectMeta.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n83 - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) - n84, err := m.Spec.MarshalTo(data[i:]) + n84, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } i += n84 - data[i] = 0x1a + data[i] = 0x12 i++ - i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) - n85, err := m.Status.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) + n85, err := m.Spec.MarshalTo(data[i:]) if err != nil { return 0, err } i += n85 + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) + n86, err := m.Status.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n86 return i, nil } @@ -4869,11 +4927,11 @@ func (m *PersistentVolumeClaimList) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n86, err := m.ListMeta.MarshalTo(data[i:]) + n87, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n86 + i += n87 if len(m.Items) > 0 { for _, msg := range m.Items { data[i] = 0x12 @@ -4922,11 +4980,11 @@ func (m *PersistentVolumeClaimSpec) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.Resources.Size())) - n87, err := m.Resources.MarshalTo(data[i:]) + n88, err := m.Resources.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n87 + i += n88 data[i] = 0x1a i++ i = encodeVarintGenerated(data, i, uint64(len(m.VolumeName))) @@ -4935,11 +4993,11 @@ func (m *PersistentVolumeClaimSpec) MarshalTo(data []byte) (int, error) { data[i] = 0x22 i++ i = encodeVarintGenerated(data, i, uint64(m.Selector.Size())) - n88, err := m.Selector.MarshalTo(data[i:]) + n89, err := m.Selector.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n88 + i += n89 } return i, nil } @@ -4993,11 +5051,11 @@ func (m *PersistentVolumeClaimStatus) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64((&v).Size())) - n89, err := (&v).MarshalTo(data[i:]) + n90, err := (&v).MarshalTo(data[i:]) if err != nil { return 0, err } - i += n89 + i += n90 } } return i, nil @@ -5051,11 +5109,11 @@ func (m *PersistentVolumeList) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n90, err := m.ListMeta.MarshalTo(data[i:]) + n91, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n90 + i += n91 if len(m.Items) > 0 { for _, msg := range m.Items { data[i] = 0x12 @@ -5090,163 +5148,163 @@ func (m *PersistentVolumeSource) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.GCEPersistentDisk.Size())) - n91, err := m.GCEPersistentDisk.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n91 - } - if m.AWSElasticBlockStore != nil { - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(m.AWSElasticBlockStore.Size())) - n92, err := m.AWSElasticBlockStore.MarshalTo(data[i:]) + n92, err := m.GCEPersistentDisk.MarshalTo(data[i:]) if err != nil { return 0, err } i += n92 } - if m.HostPath != nil { - data[i] = 0x1a + if m.AWSElasticBlockStore != nil { + data[i] = 0x12 i++ - i = encodeVarintGenerated(data, i, uint64(m.HostPath.Size())) - n93, err := m.HostPath.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.AWSElasticBlockStore.Size())) + n93, err := m.AWSElasticBlockStore.MarshalTo(data[i:]) if err != nil { return 0, err } i += n93 } - if m.Glusterfs != nil { - data[i] = 0x22 + if m.HostPath != nil { + data[i] = 0x1a i++ - i = encodeVarintGenerated(data, i, uint64(m.Glusterfs.Size())) - n94, err := m.Glusterfs.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.HostPath.Size())) + n94, err := m.HostPath.MarshalTo(data[i:]) if err != nil { return 0, err } i += n94 } - if m.NFS != nil { - data[i] = 0x2a + if m.Glusterfs != nil { + data[i] = 0x22 i++ - i = encodeVarintGenerated(data, i, uint64(m.NFS.Size())) - n95, err := m.NFS.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.Glusterfs.Size())) + n95, err := m.Glusterfs.MarshalTo(data[i:]) if err != nil { return 0, err } i += n95 } - if m.RBD != nil { - data[i] = 0x32 + if m.NFS != nil { + data[i] = 0x2a i++ - i = encodeVarintGenerated(data, i, uint64(m.RBD.Size())) - n96, err := m.RBD.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.NFS.Size())) + n96, err := m.NFS.MarshalTo(data[i:]) if err != nil { return 0, err } i += n96 } - if m.ISCSI != nil { - data[i] = 0x3a + if m.RBD != nil { + data[i] = 0x32 i++ - i = encodeVarintGenerated(data, i, uint64(m.ISCSI.Size())) - n97, err := m.ISCSI.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.RBD.Size())) + n97, err := m.RBD.MarshalTo(data[i:]) if err != nil { return 0, err } i += n97 } - if m.Cinder != nil { - data[i] = 0x42 + if m.ISCSI != nil { + data[i] = 0x3a i++ - i = encodeVarintGenerated(data, i, uint64(m.Cinder.Size())) - n98, err := m.Cinder.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.ISCSI.Size())) + n98, err := m.ISCSI.MarshalTo(data[i:]) if err != nil { return 0, err } i += n98 } - if m.CephFS != nil { - data[i] = 0x4a + if m.Cinder != nil { + data[i] = 0x42 i++ - i = encodeVarintGenerated(data, i, uint64(m.CephFS.Size())) - n99, err := m.CephFS.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.Cinder.Size())) + n99, err := m.Cinder.MarshalTo(data[i:]) if err != nil { return 0, err } i += n99 } - if m.FC != nil { - data[i] = 0x52 + if m.CephFS != nil { + data[i] = 0x4a i++ - i = encodeVarintGenerated(data, i, uint64(m.FC.Size())) - n100, err := m.FC.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.CephFS.Size())) + n100, err := m.CephFS.MarshalTo(data[i:]) if err != nil { return 0, err } i += n100 } - if m.Flocker != nil { - data[i] = 0x5a + if m.FC != nil { + data[i] = 0x52 i++ - i = encodeVarintGenerated(data, i, uint64(m.Flocker.Size())) - n101, err := m.Flocker.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.FC.Size())) + n101, err := m.FC.MarshalTo(data[i:]) if err != nil { return 0, err } i += n101 } - if m.FlexVolume != nil { - data[i] = 0x62 + if m.Flocker != nil { + data[i] = 0x5a i++ - i = encodeVarintGenerated(data, i, uint64(m.FlexVolume.Size())) - n102, err := m.FlexVolume.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.Flocker.Size())) + n102, err := m.Flocker.MarshalTo(data[i:]) if err != nil { return 0, err } i += n102 } - if m.AzureFile != nil { - data[i] = 0x6a + if m.FlexVolume != nil { + data[i] = 0x62 i++ - i = encodeVarintGenerated(data, i, uint64(m.AzureFile.Size())) - n103, err := m.AzureFile.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.FlexVolume.Size())) + n103, err := m.FlexVolume.MarshalTo(data[i:]) if err != nil { return 0, err } i += n103 } - if m.VsphereVolume != nil { - data[i] = 0x72 + if m.AzureFile != nil { + data[i] = 0x6a i++ - i = encodeVarintGenerated(data, i, uint64(m.VsphereVolume.Size())) - n104, err := m.VsphereVolume.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.AzureFile.Size())) + n104, err := m.AzureFile.MarshalTo(data[i:]) if err != nil { return 0, err } i += n104 } - if m.Quobyte != nil { - data[i] = 0x7a + if m.VsphereVolume != nil { + data[i] = 0x72 i++ - i = encodeVarintGenerated(data, i, uint64(m.Quobyte.Size())) - n105, err := m.Quobyte.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.VsphereVolume.Size())) + n105, err := m.VsphereVolume.MarshalTo(data[i:]) if err != nil { return 0, err } i += n105 } + if m.Quobyte != nil { + data[i] = 0x7a + i++ + i = encodeVarintGenerated(data, i, uint64(m.Quobyte.Size())) + n106, err := m.Quobyte.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n106 + } if m.AzureDisk != nil { data[i] = 0x82 i++ data[i] = 0x1 i++ i = encodeVarintGenerated(data, i, uint64(m.AzureDisk.Size())) - n106, err := m.AzureDisk.MarshalTo(data[i:]) + n107, err := m.AzureDisk.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n106 + i += n107 } if m.PhotonPersistentDisk != nil { data[i] = 0x8a @@ -5254,11 +5312,11 @@ func (m *PersistentVolumeSource) MarshalTo(data []byte) (int, error) { data[i] = 0x1 i++ i = encodeVarintGenerated(data, i, uint64(m.PhotonPersistentDisk.Size())) - n107, err := m.PhotonPersistentDisk.MarshalTo(data[i:]) + n108, err := m.PhotonPersistentDisk.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n107 + i += n108 } return i, nil } @@ -5293,21 +5351,21 @@ func (m *PersistentVolumeSpec) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64((&v).Size())) - n108, err := (&v).MarshalTo(data[i:]) + n109, err := (&v).MarshalTo(data[i:]) if err != nil { return 0, err } - i += n108 + i += n109 } } data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.PersistentVolumeSource.Size())) - n109, err := m.PersistentVolumeSource.MarshalTo(data[i:]) + n110, err := m.PersistentVolumeSource.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n109 + i += n110 if len(m.AccessModes) > 0 { for _, s := range m.AccessModes { data[i] = 0x1a @@ -5327,11 +5385,11 @@ func (m *PersistentVolumeSpec) MarshalTo(data []byte) (int, error) { data[i] = 0x22 i++ i = encodeVarintGenerated(data, i, uint64(m.ClaimRef.Size())) - n110, err := m.ClaimRef.MarshalTo(data[i:]) + n111, err := m.ClaimRef.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n110 + i += n111 } data[i] = 0x2a i++ @@ -5414,27 +5472,27 @@ func (m *Pod) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n111, err := m.ObjectMeta.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n111 - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) - n112, err := m.Spec.MarshalTo(data[i:]) + n112, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } i += n112 - data[i] = 0x1a + data[i] = 0x12 i++ - i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) - n113, err := m.Status.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) + n113, err := m.Spec.MarshalTo(data[i:]) if err != nil { return 0, err } i += n113 + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) + n114, err := m.Status.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n114 return i, nil } @@ -5499,11 +5557,11 @@ func (m *PodAffinityTerm) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.LabelSelector.Size())) - n114, err := m.LabelSelector.MarshalTo(data[i:]) + n115, err := m.LabelSelector.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n114 + i += n115 } if len(m.Namespaces) > 0 { for _, s := range m.Namespaces { @@ -5649,19 +5707,19 @@ func (m *PodCondition) MarshalTo(data []byte) (int, error) { data[i] = 0x1a i++ i = encodeVarintGenerated(data, i, uint64(m.LastProbeTime.Size())) - n115, err := m.LastProbeTime.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n115 - data[i] = 0x22 - i++ - i = encodeVarintGenerated(data, i, uint64(m.LastTransitionTime.Size())) - n116, err := m.LastTransitionTime.MarshalTo(data[i:]) + n116, err := m.LastProbeTime.MarshalTo(data[i:]) if err != nil { return 0, err } i += n116 + data[i] = 0x22 + i++ + i = encodeVarintGenerated(data, i, uint64(m.LastTransitionTime.Size())) + n117, err := m.LastTransitionTime.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n117 data[i] = 0x2a i++ i = encodeVarintGenerated(data, i, uint64(len(m.Reason))) @@ -5760,11 +5818,11 @@ func (m *PodList) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n117, err := m.ListMeta.MarshalTo(data[i:]) + n118, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n117 + i += n118 if len(m.Items) > 0 { for _, msg := range m.Items { data[i] = 0x12 @@ -5824,11 +5882,11 @@ func (m *PodLogOptions) MarshalTo(data []byte) (int, error) { data[i] = 0x2a i++ i = encodeVarintGenerated(data, i, uint64(m.SinceTime.Size())) - n118, err := m.SinceTime.MarshalTo(data[i:]) + n119, err := m.SinceTime.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n118 + i += n119 } data[i] = 0x30 i++ @@ -5851,6 +5909,31 @@ func (m *PodLogOptions) MarshalTo(data []byte) (int, error) { return i, nil } +func (m *PodPortForwardOptions) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *PodPortForwardOptions) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Ports) > 0 { + for _, num := range m.Ports { + data[i] = 0x8 + i++ + i = encodeVarintGenerated(data, i, uint64(num)) + } + } + return i, nil +} + func (m *PodProxyOptions) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) @@ -5892,11 +5975,11 @@ func (m *PodSecurityContext) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.SELinuxOptions.Size())) - n119, err := m.SELinuxOptions.MarshalTo(data[i:]) + n120, err := m.SELinuxOptions.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n119 + i += n120 } if m.RunAsUser != nil { data[i] = 0x10 @@ -5947,11 +6030,11 @@ func (m *PodSignature) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.PodController.Size())) - n120, err := m.PodController.MarshalTo(data[i:]) + n121, err := m.PodController.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n120 + i += n121 } return i, nil } @@ -6070,11 +6153,11 @@ func (m *PodSpec) MarshalTo(data []byte) (int, error) { data[i] = 0x72 i++ i = encodeVarintGenerated(data, i, uint64(m.SecurityContext.Size())) - n121, err := m.SecurityContext.MarshalTo(data[i:]) + n122, err := m.SecurityContext.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n121 + i += n122 } if len(m.ImagePullSecrets) > 0 { for _, msg := range m.ImagePullSecrets { @@ -6106,12 +6189,18 @@ func (m *PodSpec) MarshalTo(data []byte) (int, error) { data[i] = 0x1 i++ i = encodeVarintGenerated(data, i, uint64(m.Affinity.Size())) - n122, err := m.Affinity.MarshalTo(data[i:]) + n123, err := m.Affinity.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n122 + i += n123 } + data[i] = 0x9a + i++ + data[i] = 0x1 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.SchedulerName))) + i += copy(data[i:], m.SchedulerName) return i, nil } @@ -6166,11 +6255,11 @@ func (m *PodStatus) MarshalTo(data []byte) (int, error) { data[i] = 0x3a i++ i = encodeVarintGenerated(data, i, uint64(m.StartTime.Size())) - n123, err := m.StartTime.MarshalTo(data[i:]) + n124, err := m.StartTime.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n123 + i += n124 } if len(m.ContainerStatuses) > 0 { for _, msg := range m.ContainerStatuses { @@ -6209,19 +6298,19 @@ func (m *PodStatusResult) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n124, err := m.ObjectMeta.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n124 - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) - n125, err := m.Status.MarshalTo(data[i:]) + n125, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } i += n125 + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) + n126, err := m.Status.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n126 return i, nil } @@ -6243,19 +6332,19 @@ func (m *PodTemplate) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n126, err := m.ObjectMeta.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n126 - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(m.Template.Size())) - n127, err := m.Template.MarshalTo(data[i:]) + n127, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } i += n127 + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(m.Template.Size())) + n128, err := m.Template.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n128 return i, nil } @@ -6277,11 +6366,11 @@ func (m *PodTemplateList) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n128, err := m.ListMeta.MarshalTo(data[i:]) + n129, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n128 + i += n129 if len(m.Items) > 0 { for _, msg := range m.Items { data[i] = 0x12 @@ -6315,19 +6404,19 @@ func (m *PodTemplateSpec) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n129, err := m.ObjectMeta.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n129 - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) - n130, err := m.Spec.MarshalTo(data[i:]) + n130, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } i += n130 + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) + n131, err := m.Spec.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n131 return i, nil } @@ -6373,19 +6462,19 @@ func (m *PreferAvoidPodsEntry) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.PodSignature.Size())) - n131, err := m.PodSignature.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n131 - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(m.EvictionTime.Size())) - n132, err := m.EvictionTime.MarshalTo(data[i:]) + n132, err := m.PodSignature.MarshalTo(data[i:]) if err != nil { return 0, err } i += n132 + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(m.EvictionTime.Size())) + n133, err := m.EvictionTime.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n133 data[i] = 0x1a i++ i = encodeVarintGenerated(data, i, uint64(len(m.Reason))) @@ -6418,11 +6507,11 @@ func (m *PreferredSchedulingTerm) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.Preference.Size())) - n133, err := m.Preference.MarshalTo(data[i:]) + n134, err := m.Preference.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n133 + i += n134 return i, nil } @@ -6444,11 +6533,11 @@ func (m *Probe) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.Handler.Size())) - n134, err := m.Handler.MarshalTo(data[i:]) + n135, err := m.Handler.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n134 + i += n135 data[i] = 0x10 i++ i = encodeVarintGenerated(data, i, uint64(m.InitialDelaySeconds)) @@ -6563,11 +6652,11 @@ func (m *RBDVolumeSource) MarshalTo(data []byte) (int, error) { data[i] = 0x3a i++ i = encodeVarintGenerated(data, i, uint64(m.SecretRef.Size())) - n135, err := m.SecretRef.MarshalTo(data[i:]) + n136, err := m.SecretRef.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n135 + i += n136 } data[i] = 0x40 i++ @@ -6598,11 +6687,11 @@ func (m *RangeAllocation) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n136, err := m.ObjectMeta.MarshalTo(data[i:]) + n137, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n136 + i += n137 data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(len(m.Range))) @@ -6634,27 +6723,27 @@ func (m *ReplicationController) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n137, err := m.ObjectMeta.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n137 - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) - n138, err := m.Spec.MarshalTo(data[i:]) + n138, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } i += n138 - data[i] = 0x1a + data[i] = 0x12 i++ - i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) - n139, err := m.Status.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) + n139, err := m.Spec.MarshalTo(data[i:]) if err != nil { return 0, err } i += n139 + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) + n140, err := m.Status.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n140 return i, nil } @@ -6684,11 +6773,11 @@ func (m *ReplicationControllerCondition) MarshalTo(data []byte) (int, error) { data[i] = 0x1a i++ i = encodeVarintGenerated(data, i, uint64(m.LastTransitionTime.Size())) - n140, err := m.LastTransitionTime.MarshalTo(data[i:]) + n141, err := m.LastTransitionTime.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n140 + i += n141 data[i] = 0x22 i++ i = encodeVarintGenerated(data, i, uint64(len(m.Reason))) @@ -6718,11 +6807,11 @@ func (m *ReplicationControllerList) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n141, err := m.ListMeta.MarshalTo(data[i:]) + n142, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n141 + i += n142 if len(m.Items) > 0 { for _, msg := range m.Items { data[i] = 0x12 @@ -6779,11 +6868,11 @@ func (m *ReplicationControllerSpec) MarshalTo(data []byte) (int, error) { data[i] = 0x1a i++ i = encodeVarintGenerated(data, i, uint64(m.Template.Size())) - n142, err := m.Template.MarshalTo(data[i:]) + n143, err := m.Template.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n142 + i += n143 } data[i] = 0x20 i++ @@ -6862,11 +6951,11 @@ func (m *ResourceFieldSelector) MarshalTo(data []byte) (int, error) { data[i] = 0x1a i++ i = encodeVarintGenerated(data, i, uint64(m.Divisor.Size())) - n143, err := m.Divisor.MarshalTo(data[i:]) + n144, err := m.Divisor.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n143 + i += n144 return i, nil } @@ -6888,27 +6977,27 @@ func (m *ResourceQuota) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n144, err := m.ObjectMeta.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n144 - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) - n145, err := m.Spec.MarshalTo(data[i:]) + n145, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } i += n145 - data[i] = 0x1a + data[i] = 0x12 i++ - i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) - n146, err := m.Status.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) + n146, err := m.Spec.MarshalTo(data[i:]) if err != nil { return 0, err } i += n146 + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) + n147, err := m.Status.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n147 return i, nil } @@ -6930,11 +7019,11 @@ func (m *ResourceQuotaList) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n147, err := m.ListMeta.MarshalTo(data[i:]) + n148, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n147 + i += n148 if len(m.Items) > 0 { for _, msg := range m.Items { data[i] = 0x12 @@ -6980,11 +7069,11 @@ func (m *ResourceQuotaSpec) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64((&v).Size())) - n148, err := (&v).MarshalTo(data[i:]) + n149, err := (&v).MarshalTo(data[i:]) if err != nil { return 0, err } - i += n148 + i += n149 } } if len(m.Scopes) > 0 { @@ -7035,11 +7124,11 @@ func (m *ResourceQuotaStatus) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64((&v).Size())) - n149, err := (&v).MarshalTo(data[i:]) + n150, err := (&v).MarshalTo(data[i:]) if err != nil { return 0, err } - i += n149 + i += n150 } } if len(m.Used) > 0 { @@ -7057,11 +7146,11 @@ func (m *ResourceQuotaStatus) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64((&v).Size())) - n150, err := (&v).MarshalTo(data[i:]) + n151, err := (&v).MarshalTo(data[i:]) if err != nil { return 0, err } - i += n150 + i += n151 } } return i, nil @@ -7097,11 +7186,11 @@ func (m *ResourceRequirements) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64((&v).Size())) - n151, err := (&v).MarshalTo(data[i:]) + n152, err := (&v).MarshalTo(data[i:]) if err != nil { return 0, err } - i += n151 + i += n152 } } if len(m.Requests) > 0 { @@ -7119,11 +7208,11 @@ func (m *ResourceRequirements) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64((&v).Size())) - n152, err := (&v).MarshalTo(data[i:]) + n153, err := (&v).MarshalTo(data[i:]) if err != nil { return 0, err } - i += n152 + i += n153 } } return i, nil @@ -7181,11 +7270,11 @@ func (m *Secret) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n153, err := m.ObjectMeta.MarshalTo(data[i:]) + n154, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n153 + i += n154 if len(m.Data) > 0 { for k := range m.Data { data[i] = 0x12 @@ -7227,6 +7316,42 @@ func (m *Secret) MarshalTo(data []byte) (int, error) { return i, nil } +func (m *SecretEnvSource) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *SecretEnvSource) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.LocalObjectReference.Size())) + n155, err := m.LocalObjectReference.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n155 + if m.Optional != nil { + data[i] = 0x10 + i++ + if *m.Optional { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + return i, nil +} + func (m *SecretKeySelector) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) @@ -7245,15 +7370,25 @@ func (m *SecretKeySelector) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.LocalObjectReference.Size())) - n154, err := m.LocalObjectReference.MarshalTo(data[i:]) + n156, err := m.LocalObjectReference.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n154 + i += n156 data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(len(m.Key))) i += copy(data[i:], m.Key) + if m.Optional != nil { + data[i] = 0x18 + i++ + if *m.Optional { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } return i, nil } @@ -7275,11 +7410,11 @@ func (m *SecretList) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n155, err := m.ListMeta.MarshalTo(data[i:]) + n157, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n155 + i += n157 if len(m.Items) > 0 { for _, msg := range m.Items { data[i] = 0x12 @@ -7331,6 +7466,16 @@ func (m *SecretVolumeSource) MarshalTo(data []byte) (int, error) { i++ i = encodeVarintGenerated(data, i, uint64(*m.DefaultMode)) } + if m.Optional != nil { + data[i] = 0x20 + i++ + if *m.Optional { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } return i, nil } @@ -7353,11 +7498,11 @@ func (m *SecurityContext) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.Capabilities.Size())) - n156, err := m.Capabilities.MarshalTo(data[i:]) + n158, err := m.Capabilities.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n156 + i += n158 } if m.Privileged != nil { data[i] = 0x10 @@ -7373,11 +7518,11 @@ func (m *SecurityContext) MarshalTo(data []byte) (int, error) { data[i] = 0x1a i++ i = encodeVarintGenerated(data, i, uint64(m.SELinuxOptions.Size())) - n157, err := m.SELinuxOptions.MarshalTo(data[i:]) + n159, err := m.SELinuxOptions.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n157 + i += n159 } if m.RunAsUser != nil { data[i] = 0x20 @@ -7425,11 +7570,11 @@ func (m *SerializedReference) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.Reference.Size())) - n158, err := m.Reference.MarshalTo(data[i:]) + n160, err := m.Reference.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n158 + i += n160 return i, nil } @@ -7451,27 +7596,27 @@ func (m *Service) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n159, err := m.ObjectMeta.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n159 - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) - n160, err := m.Spec.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n160 - data[i] = 0x1a - i++ - i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) - n161, err := m.Status.MarshalTo(data[i:]) + n161, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } i += n161 + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) + n162, err := m.Spec.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n162 + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) + n163, err := m.Status.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n163 return i, nil } @@ -7493,11 +7638,11 @@ func (m *ServiceAccount) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n162, err := m.ObjectMeta.MarshalTo(data[i:]) + n164, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n162 + i += n164 if len(m.Secrets) > 0 { for _, msg := range m.Secrets { data[i] = 0x12 @@ -7543,11 +7688,11 @@ func (m *ServiceAccountList) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n163, err := m.ListMeta.MarshalTo(data[i:]) + n165, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n163 + i += n165 if len(m.Items) > 0 { for _, msg := range m.Items { data[i] = 0x12 @@ -7581,11 +7726,11 @@ func (m *ServiceList) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n164, err := m.ListMeta.MarshalTo(data[i:]) + n166, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n164 + i += n166 if len(m.Items) > 0 { for _, msg := range m.Items { data[i] = 0x12 @@ -7630,11 +7775,11 @@ func (m *ServicePort) MarshalTo(data []byte) (int, error) { data[i] = 0x22 i++ i = encodeVarintGenerated(data, i, uint64(m.TargetPort.Size())) - n165, err := m.TargetPort.MarshalTo(data[i:]) + n167, err := m.TargetPort.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n165 + i += n167 data[i] = 0x28 i++ i = encodeVarintGenerated(data, i, uint64(m.NodePort)) @@ -7793,11 +7938,11 @@ func (m *ServiceStatus) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.LoadBalancer.Size())) - n166, err := m.LoadBalancer.MarshalTo(data[i:]) + n168, err := m.LoadBalancer.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n166 + i += n168 return i, nil } @@ -7845,11 +7990,11 @@ func (m *TCPSocketAction) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.Port.Size())) - n167, err := m.Port.MarshalTo(data[i:]) + n169, err := m.Port.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n167 + i += n169 return i, nil } @@ -7939,11 +8084,11 @@ func (m *Volume) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.VolumeSource.Size())) - n168, err := m.VolumeSource.MarshalTo(data[i:]) + n170, err := m.VolumeSource.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n168 + i += n170 return i, nil } @@ -8004,163 +8149,163 @@ func (m *VolumeSource) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.HostPath.Size())) - n169, err := m.HostPath.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n169 - } - if m.EmptyDir != nil { - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(m.EmptyDir.Size())) - n170, err := m.EmptyDir.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n170 - } - if m.GCEPersistentDisk != nil { - data[i] = 0x1a - i++ - i = encodeVarintGenerated(data, i, uint64(m.GCEPersistentDisk.Size())) - n171, err := m.GCEPersistentDisk.MarshalTo(data[i:]) + n171, err := m.HostPath.MarshalTo(data[i:]) if err != nil { return 0, err } i += n171 } - if m.AWSElasticBlockStore != nil { - data[i] = 0x22 + if m.EmptyDir != nil { + data[i] = 0x12 i++ - i = encodeVarintGenerated(data, i, uint64(m.AWSElasticBlockStore.Size())) - n172, err := m.AWSElasticBlockStore.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.EmptyDir.Size())) + n172, err := m.EmptyDir.MarshalTo(data[i:]) if err != nil { return 0, err } i += n172 } - if m.GitRepo != nil { - data[i] = 0x2a + if m.GCEPersistentDisk != nil { + data[i] = 0x1a i++ - i = encodeVarintGenerated(data, i, uint64(m.GitRepo.Size())) - n173, err := m.GitRepo.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.GCEPersistentDisk.Size())) + n173, err := m.GCEPersistentDisk.MarshalTo(data[i:]) if err != nil { return 0, err } i += n173 } - if m.Secret != nil { - data[i] = 0x32 + if m.AWSElasticBlockStore != nil { + data[i] = 0x22 i++ - i = encodeVarintGenerated(data, i, uint64(m.Secret.Size())) - n174, err := m.Secret.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.AWSElasticBlockStore.Size())) + n174, err := m.AWSElasticBlockStore.MarshalTo(data[i:]) if err != nil { return 0, err } i += n174 } - if m.NFS != nil { - data[i] = 0x3a + if m.GitRepo != nil { + data[i] = 0x2a i++ - i = encodeVarintGenerated(data, i, uint64(m.NFS.Size())) - n175, err := m.NFS.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.GitRepo.Size())) + n175, err := m.GitRepo.MarshalTo(data[i:]) if err != nil { return 0, err } i += n175 } - if m.ISCSI != nil { - data[i] = 0x42 + if m.Secret != nil { + data[i] = 0x32 i++ - i = encodeVarintGenerated(data, i, uint64(m.ISCSI.Size())) - n176, err := m.ISCSI.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.Secret.Size())) + n176, err := m.Secret.MarshalTo(data[i:]) if err != nil { return 0, err } i += n176 } - if m.Glusterfs != nil { - data[i] = 0x4a + if m.NFS != nil { + data[i] = 0x3a i++ - i = encodeVarintGenerated(data, i, uint64(m.Glusterfs.Size())) - n177, err := m.Glusterfs.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.NFS.Size())) + n177, err := m.NFS.MarshalTo(data[i:]) if err != nil { return 0, err } i += n177 } - if m.PersistentVolumeClaim != nil { - data[i] = 0x52 + if m.ISCSI != nil { + data[i] = 0x42 i++ - i = encodeVarintGenerated(data, i, uint64(m.PersistentVolumeClaim.Size())) - n178, err := m.PersistentVolumeClaim.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.ISCSI.Size())) + n178, err := m.ISCSI.MarshalTo(data[i:]) if err != nil { return 0, err } i += n178 } - if m.RBD != nil { - data[i] = 0x5a + if m.Glusterfs != nil { + data[i] = 0x4a i++ - i = encodeVarintGenerated(data, i, uint64(m.RBD.Size())) - n179, err := m.RBD.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.Glusterfs.Size())) + n179, err := m.Glusterfs.MarshalTo(data[i:]) if err != nil { return 0, err } i += n179 } - if m.FlexVolume != nil { - data[i] = 0x62 + if m.PersistentVolumeClaim != nil { + data[i] = 0x52 i++ - i = encodeVarintGenerated(data, i, uint64(m.FlexVolume.Size())) - n180, err := m.FlexVolume.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.PersistentVolumeClaim.Size())) + n180, err := m.PersistentVolumeClaim.MarshalTo(data[i:]) if err != nil { return 0, err } i += n180 } - if m.Cinder != nil { - data[i] = 0x6a + if m.RBD != nil { + data[i] = 0x5a i++ - i = encodeVarintGenerated(data, i, uint64(m.Cinder.Size())) - n181, err := m.Cinder.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.RBD.Size())) + n181, err := m.RBD.MarshalTo(data[i:]) if err != nil { return 0, err } i += n181 } - if m.CephFS != nil { - data[i] = 0x72 + if m.FlexVolume != nil { + data[i] = 0x62 i++ - i = encodeVarintGenerated(data, i, uint64(m.CephFS.Size())) - n182, err := m.CephFS.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.FlexVolume.Size())) + n182, err := m.FlexVolume.MarshalTo(data[i:]) if err != nil { return 0, err } i += n182 } - if m.Flocker != nil { - data[i] = 0x7a + if m.Cinder != nil { + data[i] = 0x6a i++ - i = encodeVarintGenerated(data, i, uint64(m.Flocker.Size())) - n183, err := m.Flocker.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.Cinder.Size())) + n183, err := m.Cinder.MarshalTo(data[i:]) if err != nil { return 0, err } i += n183 } + if m.CephFS != nil { + data[i] = 0x72 + i++ + i = encodeVarintGenerated(data, i, uint64(m.CephFS.Size())) + n184, err := m.CephFS.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n184 + } + if m.Flocker != nil { + data[i] = 0x7a + i++ + i = encodeVarintGenerated(data, i, uint64(m.Flocker.Size())) + n185, err := m.Flocker.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n185 + } if m.DownwardAPI != nil { data[i] = 0x82 i++ data[i] = 0x1 i++ i = encodeVarintGenerated(data, i, uint64(m.DownwardAPI.Size())) - n184, err := m.DownwardAPI.MarshalTo(data[i:]) + n186, err := m.DownwardAPI.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n184 + i += n186 } if m.FC != nil { data[i] = 0x8a @@ -8168,11 +8313,11 @@ func (m *VolumeSource) MarshalTo(data []byte) (int, error) { data[i] = 0x1 i++ i = encodeVarintGenerated(data, i, uint64(m.FC.Size())) - n185, err := m.FC.MarshalTo(data[i:]) + n187, err := m.FC.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n185 + i += n187 } if m.AzureFile != nil { data[i] = 0x92 @@ -8180,11 +8325,11 @@ func (m *VolumeSource) MarshalTo(data []byte) (int, error) { data[i] = 0x1 i++ i = encodeVarintGenerated(data, i, uint64(m.AzureFile.Size())) - n186, err := m.AzureFile.MarshalTo(data[i:]) + n188, err := m.AzureFile.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n186 + i += n188 } if m.ConfigMap != nil { data[i] = 0x9a @@ -8192,11 +8337,11 @@ func (m *VolumeSource) MarshalTo(data []byte) (int, error) { data[i] = 0x1 i++ i = encodeVarintGenerated(data, i, uint64(m.ConfigMap.Size())) - n187, err := m.ConfigMap.MarshalTo(data[i:]) + n189, err := m.ConfigMap.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n187 + i += n189 } if m.VsphereVolume != nil { data[i] = 0xa2 @@ -8204,11 +8349,11 @@ func (m *VolumeSource) MarshalTo(data []byte) (int, error) { data[i] = 0x1 i++ i = encodeVarintGenerated(data, i, uint64(m.VsphereVolume.Size())) - n188, err := m.VsphereVolume.MarshalTo(data[i:]) + n190, err := m.VsphereVolume.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n188 + i += n190 } if m.Quobyte != nil { data[i] = 0xaa @@ -8216,11 +8361,11 @@ func (m *VolumeSource) MarshalTo(data []byte) (int, error) { data[i] = 0x1 i++ i = encodeVarintGenerated(data, i, uint64(m.Quobyte.Size())) - n189, err := m.Quobyte.MarshalTo(data[i:]) + n191, err := m.Quobyte.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n189 + i += n191 } if m.AzureDisk != nil { data[i] = 0xb2 @@ -8228,11 +8373,11 @@ func (m *VolumeSource) MarshalTo(data []byte) (int, error) { data[i] = 0x1 i++ i = encodeVarintGenerated(data, i, uint64(m.AzureDisk.Size())) - n190, err := m.AzureDisk.MarshalTo(data[i:]) + n192, err := m.AzureDisk.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n190 + i += n192 } if m.PhotonPersistentDisk != nil { data[i] = 0xba @@ -8240,11 +8385,11 @@ func (m *VolumeSource) MarshalTo(data []byte) (int, error) { data[i] = 0x1 i++ i = encodeVarintGenerated(data, i, uint64(m.PhotonPersistentDisk.Size())) - n191, err := m.PhotonPersistentDisk.MarshalTo(data[i:]) + n193, err := m.PhotonPersistentDisk.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n191 + i += n193 } return i, nil } @@ -8296,11 +8441,11 @@ func (m *WeightedPodAffinityTerm) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.PodAffinityTerm.Size())) - n192, err := m.PodAffinityTerm.MarshalTo(data[i:]) + n194, err := m.PodAffinityTerm.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n192 + i += n194 return i, nil } @@ -8540,6 +8685,9 @@ func (m *ConfigMapEnvSource) Size() (n int) { _ = l l = m.LocalObjectReference.Size() n += 1 + l + sovGenerated(uint64(l)) + if m.Optional != nil { + n += 2 + } return n } @@ -8550,6 +8698,9 @@ func (m *ConfigMapKeySelector) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) l = len(m.Key) n += 1 + l + sovGenerated(uint64(l)) + if m.Optional != nil { + n += 2 + } return n } @@ -8581,6 +8732,9 @@ func (m *ConfigMapVolumeSource) Size() (n int) { if m.DefaultMode != nil { n += 1 + sovGenerated(uint64(*m.DefaultMode)) } + if m.Optional != nil { + n += 2 + } return n } @@ -8654,6 +8808,8 @@ func (m *Container) Size() (n int) { n += 2 + l + sovGenerated(uint64(l)) } } + l = len(m.TerminationMessagePolicy) + n += 2 + l + sovGenerated(uint64(l)) return n } @@ -8913,6 +9069,10 @@ func (m *EnvFromSource) Size() (n int) { l = m.ConfigMapRef.Size() n += 1 + l + sovGenerated(uint64(l)) } + if m.SecretRef != nil { + l = m.SecretRef.Size() + n += 1 + l + sovGenerated(uint64(l)) + } return n } @@ -10111,6 +10271,17 @@ func (m *PodLogOptions) Size() (n int) { return n } +func (m *PodPortForwardOptions) Size() (n int) { + var l int + _ = l + if len(m.Ports) > 0 { + for _, e := range m.Ports { + n += 1 + sovGenerated(uint64(e)) + } + } + return n +} + func (m *PodProxyOptions) Size() (n int) { var l int _ = l @@ -10213,6 +10384,8 @@ func (m *PodSpec) Size() (n int) { l = m.Affinity.Size() n += 2 + l + sovGenerated(uint64(l)) } + l = len(m.SchedulerName) + n += 2 + l + sovGenerated(uint64(l)) return n } @@ -10624,6 +10797,17 @@ func (m *Secret) Size() (n int) { return n } +func (m *SecretEnvSource) Size() (n int) { + var l int + _ = l + l = m.LocalObjectReference.Size() + n += 1 + l + sovGenerated(uint64(l)) + if m.Optional != nil { + n += 2 + } + return n +} + func (m *SecretKeySelector) Size() (n int) { var l int _ = l @@ -10631,6 +10815,9 @@ func (m *SecretKeySelector) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) l = len(m.Key) n += 1 + l + sovGenerated(uint64(l)) + if m.Optional != nil { + n += 2 + } return n } @@ -10662,6 +10849,9 @@ func (m *SecretVolumeSource) Size() (n int) { if m.DefaultMode != nil { n += 1 + sovGenerated(uint64(*m.DefaultMode)) } + if m.Optional != nil { + n += 2 + } return n } @@ -11111,7 +11301,7 @@ func (this *Binding) String() string { return "nil" } s := strings.Join([]string{`&Binding{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Target:` + strings.Replace(strings.Replace(this.Target.String(), "ObjectReference", "ObjectReference", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -11173,7 +11363,7 @@ func (this *ComponentStatus) String() string { return "nil" } s := strings.Join([]string{`&ComponentStatus{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Conditions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Conditions), "ComponentCondition", "ComponentCondition", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -11205,7 +11395,7 @@ func (this *ConfigMap) String() string { } mapStringForData += "}" s := strings.Join([]string{`&ConfigMap{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Data:` + mapStringForData + `,`, `}`, }, "") @@ -11217,6 +11407,7 @@ func (this *ConfigMapEnvSource) String() string { } s := strings.Join([]string{`&ConfigMapEnvSource{`, `LocalObjectReference:` + strings.Replace(strings.Replace(this.LocalObjectReference.String(), "LocalObjectReference", "LocalObjectReference", 1), `&`, ``, 1) + `,`, + `Optional:` + valueToStringGenerated(this.Optional) + `,`, `}`, }, "") return s @@ -11228,6 +11419,7 @@ func (this *ConfigMapKeySelector) String() string { s := strings.Join([]string{`&ConfigMapKeySelector{`, `LocalObjectReference:` + strings.Replace(strings.Replace(this.LocalObjectReference.String(), "LocalObjectReference", "LocalObjectReference", 1), `&`, ``, 1) + `,`, `Key:` + fmt.Sprintf("%v", this.Key) + `,`, + `Optional:` + valueToStringGenerated(this.Optional) + `,`, `}`, }, "") return s @@ -11251,6 +11443,7 @@ func (this *ConfigMapVolumeSource) String() string { `LocalObjectReference:` + strings.Replace(strings.Replace(this.LocalObjectReference.String(), "LocalObjectReference", "LocalObjectReference", 1), `&`, ``, 1) + `,`, `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "KeyToPath", "KeyToPath", 1), `&`, ``, 1) + `,`, `DefaultMode:` + valueToStringGenerated(this.DefaultMode) + `,`, + `Optional:` + valueToStringGenerated(this.Optional) + `,`, `}`, }, "") return s @@ -11279,6 +11472,7 @@ func (this *Container) String() string { `StdinOnce:` + fmt.Sprintf("%v", this.StdinOnce) + `,`, `TTY:` + fmt.Sprintf("%v", this.TTY) + `,`, `EnvFrom:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.EnvFrom), "EnvFromSource", "EnvFromSource", 1), `&`, ``, 1) + `,`, + `TerminationMessagePolicy:` + fmt.Sprintf("%v", this.TerminationMessagePolicy) + `,`, `}`, }, "") return s @@ -11472,7 +11666,7 @@ func (this *Endpoints) String() string { return "nil" } s := strings.Join([]string{`&Endpoints{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Subsets:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Subsets), "EndpointSubset", "EndpointSubset", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -11496,6 +11690,7 @@ func (this *EnvFromSource) String() string { s := strings.Join([]string{`&EnvFromSource{`, `Prefix:` + fmt.Sprintf("%v", this.Prefix) + `,`, `ConfigMapRef:` + strings.Replace(fmt.Sprintf("%v", this.ConfigMapRef), "ConfigMapEnvSource", "ConfigMapEnvSource", 1) + `,`, + `SecretRef:` + strings.Replace(fmt.Sprintf("%v", this.SecretRef), "SecretEnvSource", "SecretEnvSource", 1) + `,`, `}`, }, "") return s @@ -11530,7 +11725,7 @@ func (this *Event) String() string { return "nil" } s := strings.Join([]string{`&Event{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `InvolvedObject:` + strings.Replace(strings.Replace(this.InvolvedObject.String(), "ObjectReference", "ObjectReference", 1), `&`, ``, 1) + `,`, `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, `Message:` + fmt.Sprintf("%v", this.Message) + `,`, @@ -11750,7 +11945,7 @@ func (this *LimitRange) String() string { return "nil" } s := strings.Join([]string{`&LimitRange{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "LimitRangeSpec", "LimitRangeSpec", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -11915,7 +12110,7 @@ func (this *Namespace) String() string { return "nil" } s := strings.Join([]string{`&Namespace{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "NamespaceSpec", "NamespaceSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "NamespaceStatus", "NamespaceStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -11958,7 +12153,7 @@ func (this *Node) String() string { return "nil" } s := strings.Join([]string{`&Node{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "NodeSpec", "NodeSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "NodeStatus", "NodeStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -12232,7 +12427,7 @@ func (this *PersistentVolume) String() string { return "nil" } s := strings.Join([]string{`&PersistentVolume{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PersistentVolumeSpec", "PersistentVolumeSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "PersistentVolumeStatus", "PersistentVolumeStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -12244,7 +12439,7 @@ func (this *PersistentVolumeClaim) String() string { return "nil" } s := strings.Join([]string{`&PersistentVolumeClaim{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PersistentVolumeClaimSpec", "PersistentVolumeClaimSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "PersistentVolumeClaimStatus", "PersistentVolumeClaimStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -12397,7 +12592,7 @@ func (this *Pod) String() string { return "nil" } s := strings.Join([]string{`&Pod{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PodSpec", "PodSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "PodStatus", "PodStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -12510,6 +12705,16 @@ func (this *PodLogOptions) String() string { }, "") return s } +func (this *PodPortForwardOptions) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PodPortForwardOptions{`, + `Ports:` + fmt.Sprintf("%v", this.Ports) + `,`, + `}`, + }, "") + return s +} func (this *PodProxyOptions) String() string { if this == nil { return "nil" @@ -12577,6 +12782,7 @@ func (this *PodSpec) String() string { `Hostname:` + fmt.Sprintf("%v", this.Hostname) + `,`, `Subdomain:` + fmt.Sprintf("%v", this.Subdomain) + `,`, `Affinity:` + strings.Replace(fmt.Sprintf("%v", this.Affinity), "Affinity", "Affinity", 1) + `,`, + `SchedulerName:` + fmt.Sprintf("%v", this.SchedulerName) + `,`, `}`, }, "") return s @@ -12604,7 +12810,7 @@ func (this *PodStatusResult) String() string { return "nil" } s := strings.Join([]string{`&PodStatusResult{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "PodStatus", "PodStatus", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -12615,7 +12821,7 @@ func (this *PodTemplate) String() string { return "nil" } s := strings.Join([]string{`&PodTemplate{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Template:` + strings.Replace(strings.Replace(this.Template.String(), "PodTemplateSpec", "PodTemplateSpec", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -12637,7 +12843,7 @@ func (this *PodTemplateSpec) String() string { return "nil" } s := strings.Join([]string{`&PodTemplateSpec{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PodSpec", "PodSpec", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -12728,7 +12934,7 @@ func (this *RangeAllocation) String() string { return "nil" } s := strings.Join([]string{`&RangeAllocation{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Range:` + fmt.Sprintf("%v", this.Range) + `,`, `Data:` + valueToStringGenerated(this.Data) + `,`, `}`, @@ -12740,7 +12946,7 @@ func (this *ReplicationController) String() string { return "nil" } s := strings.Join([]string{`&ReplicationController{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ReplicationControllerSpec", "ReplicationControllerSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ReplicationControllerStatus", "ReplicationControllerStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -12827,7 +13033,7 @@ func (this *ResourceQuota) String() string { return "nil" } s := strings.Join([]string{`&ResourceQuota{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ResourceQuotaSpec", "ResourceQuotaSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ResourceQuotaStatus", "ResourceQuotaStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -12966,7 +13172,7 @@ func (this *Secret) String() string { } mapStringForStringData += "}" s := strings.Join([]string{`&Secret{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Data:` + mapStringForData + `,`, `Type:` + fmt.Sprintf("%v", this.Type) + `,`, `StringData:` + mapStringForStringData + `,`, @@ -12974,6 +13180,17 @@ func (this *Secret) String() string { }, "") return s } +func (this *SecretEnvSource) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SecretEnvSource{`, + `LocalObjectReference:` + strings.Replace(strings.Replace(this.LocalObjectReference.String(), "LocalObjectReference", "LocalObjectReference", 1), `&`, ``, 1) + `,`, + `Optional:` + valueToStringGenerated(this.Optional) + `,`, + `}`, + }, "") + return s +} func (this *SecretKeySelector) String() string { if this == nil { return "nil" @@ -12981,6 +13198,7 @@ func (this *SecretKeySelector) String() string { s := strings.Join([]string{`&SecretKeySelector{`, `LocalObjectReference:` + strings.Replace(strings.Replace(this.LocalObjectReference.String(), "LocalObjectReference", "LocalObjectReference", 1), `&`, ``, 1) + `,`, `Key:` + fmt.Sprintf("%v", this.Key) + `,`, + `Optional:` + valueToStringGenerated(this.Optional) + `,`, `}`, }, "") return s @@ -13004,6 +13222,7 @@ func (this *SecretVolumeSource) String() string { `SecretName:` + fmt.Sprintf("%v", this.SecretName) + `,`, `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "KeyToPath", "KeyToPath", 1), `&`, ``, 1) + `,`, `DefaultMode:` + valueToStringGenerated(this.DefaultMode) + `,`, + `Optional:` + valueToStringGenerated(this.Optional) + `,`, `}`, }, "") return s @@ -13038,7 +13257,7 @@ func (this *Service) String() string { return "nil" } s := strings.Join([]string{`&Service{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ServiceSpec", "ServiceSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ServiceStatus", "ServiceStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -13050,7 +13269,7 @@ func (this *ServiceAccount) String() string { return "nil" } s := strings.Join([]string{`&ServiceAccount{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Secrets:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Secrets), "ObjectReference", "ObjectReference", 1), `&`, ``, 1) + `,`, `ImagePullSecrets:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ImagePullSecrets), "LocalObjectReference", "LocalObjectReference", 1), `&`, ``, 1) + `,`, `}`, @@ -15279,6 +15498,27 @@ func (m *ConfigMapEnvSource) Unmarshal(data []byte) error { return err } iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Optional", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Optional = &b default: iNdEx = preIndex skippy, err := skipGenerated(data[iNdEx:]) @@ -15388,6 +15628,27 @@ func (m *ConfigMapKeySelector) Unmarshal(data []byte) error { } m.Key = string(data[iNdEx:postIndex]) iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Optional", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Optional = &b default: iNdEx = preIndex skippy, err := skipGenerated(data[iNdEx:]) @@ -15630,6 +15891,27 @@ func (m *ConfigMapVolumeSource) Unmarshal(data []byte) error { } } m.DefaultMode = &v + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Optional", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Optional = &b default: iNdEx = preIndex skippy, err := skipGenerated(data[iNdEx:]) @@ -16229,6 +16511,35 @@ func (m *Container) Unmarshal(data []byte) error { return err } iNdEx = postIndex + case 20: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TerminationMessagePolicy", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TerminationMessagePolicy = TerminationMessagePolicy(data[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(data[iNdEx:]) @@ -18652,6 +18963,39 @@ func (m *EnvFromSource) Unmarshal(data []byte) error { return err } iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SecretRef", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SecretRef == nil { + m.SecretRef = &SecretEnvSource{} + } + if err := m.SecretRef.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(data[iNdEx:]) @@ -30479,6 +30823,76 @@ func (m *PodLogOptions) Unmarshal(data []byte) error { } return nil } +func (m *PodPortForwardOptions) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PodPortForwardOptions: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PodPortForwardOptions: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Ports", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Ports = append(m.Ports, v) + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *PodProxyOptions) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 @@ -31407,6 +31821,35 @@ func (m *PodSpec) Unmarshal(data []byte) error { return err } iNdEx = postIndex + case 19: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SchedulerName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SchedulerName = string(data[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(data[iNdEx:]) @@ -35815,6 +36258,107 @@ func (m *Secret) Unmarshal(data []byte) error { } return nil } +func (m *SecretEnvSource) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SecretEnvSource: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SecretEnvSource: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LocalObjectReference", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.LocalObjectReference.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Optional", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Optional = &b + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *SecretKeySelector) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 @@ -35903,6 +36447,27 @@ func (m *SecretKeySelector) Unmarshal(data []byte) error { } m.Key = string(data[iNdEx:postIndex]) iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Optional", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Optional = &b default: iNdEx = preIndex skippy, err := skipGenerated(data[iNdEx:]) @@ -36144,6 +36709,27 @@ func (m *SecretVolumeSource) Unmarshal(data []byte) error { } } m.DefaultMode = &v + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Optional", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Optional = &b default: iNdEx = preIndex skippy, err := skipGenerated(data[iNdEx:]) @@ -39586,640 +40172,651 @@ var ( ) var fileDescriptorGenerated = []byte{ - // 10157 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x7d, 0x6d, 0x6c, 0x24, 0xc9, - 0x75, 0x98, 0x7a, 0x86, 0x5f, 0xf3, 0xf8, 0xb9, 0xb5, 0x1f, 0xc7, 0xa3, 0xee, 0x96, 0x7b, 0x7d, - 0xba, 0xd3, 0xde, 0xdd, 0x1e, 0x79, 0xbb, 0x77, 0xa7, 0x5b, 0xe9, 0x94, 0x93, 0x48, 0x0e, 0xb9, - 0x4b, 0xed, 0x07, 0xe7, 0x6a, 0xb8, 0xbb, 0x27, 0xe9, 0x22, 0xa9, 0x39, 0x5d, 0x24, 0x5b, 0xdb, - 0xd3, 0x3d, 0xd7, 0xdd, 0xc3, 0x5d, 0x4a, 0x11, 0xe0, 0xc8, 0x17, 0x1b, 0x81, 0x85, 0x44, 0x49, - 0x20, 0x24, 0x80, 0xf3, 0xa1, 0x04, 0x70, 0xe0, 0xc4, 0x88, 0x1d, 0x45, 0xfe, 0x90, 0x63, 0xc5, - 0x41, 0x10, 0xdb, 0x91, 0x13, 0x24, 0x90, 0x61, 0x20, 0x36, 0x6c, 0x80, 0xf1, 0xd1, 0x41, 0x7e, - 0xe6, 0x47, 0xfc, 0x2b, 0x84, 0x91, 0x04, 0xf5, 0xd9, 0x55, 0x3d, 0x33, 0xec, 0x1e, 0xde, 0x92, - 0x3a, 0x19, 0xf9, 0x37, 0xf3, 0xde, 0xab, 0x57, 0x1f, 0x5d, 0xf5, 0xea, 0xbd, 0x57, 0xaf, 0x5e, - 0xc1, 0xa5, 0xfb, 0x57, 0xe3, 0x39, 0x2f, 0x9c, 0xbf, 0xdf, 0xde, 0x20, 0x51, 0x40, 0x12, 0x12, - 0xcf, 0xb7, 0xee, 0x6f, 0xcd, 0x3b, 0x2d, 0x6f, 0x7e, 0xe7, 0xf2, 0xfc, 0x16, 0x09, 0x48, 0xe4, - 0x24, 0xc4, 0x9d, 0x6b, 0x45, 0x61, 0x12, 0xa2, 0x27, 0x38, 0xf5, 0x5c, 0x4a, 0x3d, 0xd7, 0xba, - 0xbf, 0x35, 0xe7, 0xb4, 0xbc, 0xb9, 0x9d, 0xcb, 0x33, 0x2f, 0x6e, 0x79, 0xc9, 0x76, 0x7b, 0x63, - 0xae, 0x11, 0x36, 0xe7, 0xb7, 0xc2, 0xad, 0x70, 0x9e, 0x15, 0xda, 0x68, 0x6f, 0xb2, 0x7f, 0xec, - 0x0f, 0xfb, 0xc5, 0x99, 0xcd, 0xbc, 0x22, 0xaa, 0x76, 0x5a, 0x5e, 0xd3, 0x69, 0x6c, 0x7b, 0x01, - 0x89, 0x76, 0x65, 0xe5, 0xf1, 0x7c, 0x93, 0x24, 0x4e, 0x97, 0x26, 0xcc, 0xcc, 0xf7, 0x2a, 0x15, - 0xb5, 0x83, 0xc4, 0x6b, 0x92, 0x8e, 0x02, 0x1f, 0xcb, 0x2b, 0x10, 0x37, 0xb6, 0x49, 0xd3, 0xe9, - 0x28, 0x77, 0xa5, 0xf7, 0xc8, 0x44, 0x24, 0x0e, 0xdb, 0x51, 0xa3, 0xb3, 0xae, 0xcb, 0xdd, 0xcb, - 0xb4, 0x13, 0xcf, 0x9f, 0xf7, 0x82, 0x24, 0x4e, 0xa2, 0x6c, 0x11, 0xfb, 0x0f, 0x2c, 0xb8, 0xb0, - 0x70, 0xaf, 0xbe, 0xec, 0x3b, 0x71, 0xe2, 0x35, 0x16, 0xfd, 0xb0, 0x71, 0xbf, 0x9e, 0x84, 0x11, - 0xb9, 0x1b, 0xfa, 0xed, 0x26, 0xa9, 0xb3, 0x7a, 0xd0, 0x25, 0x18, 0xd9, 0x61, 0xff, 0x57, 0xab, - 0xd3, 0xd6, 0x05, 0xeb, 0x62, 0x65, 0x71, 0xea, 0x07, 0x7b, 0xb3, 0x1f, 0xda, 0xdf, 0x9b, 0x1d, - 0xb9, 0x2b, 0xe0, 0x58, 0x51, 0xa0, 0x67, 0x61, 0x68, 0x33, 0x5e, 0xdf, 0x6d, 0x91, 0xe9, 0x12, - 0xa3, 0x9d, 0x10, 0xb4, 0x43, 0x2b, 0x75, 0x0a, 0xc5, 0x02, 0x8b, 0xe6, 0xa1, 0xd2, 0x72, 0xa2, - 0xc4, 0x4b, 0xbc, 0x30, 0x98, 0x2e, 0x5f, 0xb0, 0x2e, 0x0e, 0x2e, 0x9e, 0x12, 0xa4, 0x95, 0x9a, - 0x44, 0xe0, 0x94, 0x86, 0x36, 0x23, 0x22, 0x8e, 0xbb, 0x16, 0xf8, 0xbb, 0xd3, 0x03, 0x17, 0xac, - 0x8b, 0x23, 0x69, 0x33, 0xb0, 0x80, 0x63, 0x45, 0x61, 0x7f, 0xaf, 0x04, 0x23, 0x0b, 0x9b, 0x9b, - 0x5e, 0xe0, 0x25, 0xbb, 0xe8, 0x4b, 0x30, 0x16, 0x84, 0x2e, 0x91, 0xff, 0x59, 0x2f, 0x46, 0xaf, - 0x3c, 0x3f, 0x77, 0xd8, 0x84, 0x9a, 0xbb, 0xad, 0x95, 0x58, 0x9c, 0xda, 0xdf, 0x9b, 0x1d, 0xd3, - 0x21, 0xd8, 0xe0, 0x88, 0xde, 0x86, 0xd1, 0x56, 0xe8, 0xaa, 0x0a, 0x4a, 0xac, 0x82, 0xe7, 0x0e, - 0xaf, 0xa0, 0x96, 0x16, 0x58, 0x9c, 0xdc, 0xdf, 0x9b, 0x1d, 0xd5, 0x00, 0x58, 0x67, 0x87, 0x7c, - 0x98, 0xa4, 0x7f, 0x83, 0xc4, 0x53, 0x35, 0x94, 0x59, 0x0d, 0x2f, 0xe6, 0xd7, 0xa0, 0x15, 0x5a, - 0x3c, 0xbd, 0xbf, 0x37, 0x3b, 0x99, 0x01, 0xe2, 0x2c, 0x6b, 0xfb, 0x2b, 0x30, 0xb1, 0x90, 0x24, - 0x4e, 0x63, 0x9b, 0xb8, 0xfc, 0xfb, 0xa2, 0x57, 0x60, 0x20, 0x70, 0x9a, 0x44, 0x7c, 0xfd, 0x0b, - 0x62, 0xd8, 0x07, 0x6e, 0x3b, 0x4d, 0x72, 0xb0, 0x37, 0x3b, 0x75, 0x27, 0xf0, 0xde, 0x69, 0x8b, - 0x39, 0x43, 0x61, 0x98, 0x51, 0xa3, 0x2b, 0x00, 0x2e, 0xd9, 0xf1, 0x1a, 0xa4, 0xe6, 0x24, 0xdb, - 0x62, 0x36, 0x20, 0x51, 0x16, 0xaa, 0x0a, 0x83, 0x35, 0x2a, 0xfb, 0xeb, 0x16, 0x54, 0x16, 0x76, - 0x42, 0xcf, 0xad, 0x85, 0x6e, 0x8c, 0xda, 0x30, 0xd9, 0x8a, 0xc8, 0x26, 0x89, 0x14, 0x68, 0xda, - 0xba, 0x50, 0xbe, 0x38, 0x7a, 0xe5, 0x4a, 0x4e, 0xbf, 0xcd, 0x42, 0xcb, 0x41, 0x12, 0xed, 0x2e, - 0x3e, 0x26, 0xaa, 0x9e, 0xcc, 0x60, 0x71, 0xb6, 0x0e, 0xfb, 0x6f, 0x95, 0xe0, 0xec, 0xc2, 0x57, - 0xda, 0x11, 0xa9, 0x7a, 0xf1, 0xfd, 0xec, 0x52, 0x70, 0xbd, 0xf8, 0xfe, 0xed, 0x74, 0x30, 0xd4, - 0x1c, 0xac, 0x0a, 0x38, 0x56, 0x14, 0xe8, 0x45, 0x18, 0xa6, 0xbf, 0xef, 0xe0, 0x55, 0xd1, 0xfb, - 0xd3, 0x82, 0x78, 0xb4, 0xea, 0x24, 0x4e, 0x95, 0xa3, 0xb0, 0xa4, 0x41, 0xb7, 0x60, 0xb4, 0xc1, - 0x64, 0xc4, 0xd6, 0xad, 0xd0, 0x25, 0xec, 0x0b, 0x57, 0x16, 0x5f, 0xa0, 0xe4, 0x4b, 0x29, 0xf8, - 0x60, 0x6f, 0x76, 0x9a, 0xb7, 0x4d, 0xb0, 0xd0, 0x70, 0x58, 0x2f, 0x8f, 0x6c, 0xb5, 0x10, 0x07, - 0x18, 0x27, 0xe8, 0xb2, 0x08, 0x2f, 0x6a, 0x6b, 0x6a, 0x90, 0xad, 0xa9, 0xb1, 0x1e, 0xeb, 0xe9, - 0x9f, 0x5b, 0x62, 0x4c, 0x56, 0x3c, 0xdf, 0x14, 0x0f, 0x57, 0x00, 0x62, 0xd2, 0x88, 0x48, 0xa2, - 0x8d, 0x8a, 0xfa, 0xcc, 0x75, 0x85, 0xc1, 0x1a, 0x15, 0x5d, 0xfc, 0xf1, 0xb6, 0x13, 0xb1, 0xd9, - 0x22, 0xc6, 0x46, 0x2d, 0xfe, 0xba, 0x44, 0xe0, 0x94, 0xc6, 0x58, 0xfc, 0xe5, 0xdc, 0xc5, 0xff, - 0xaf, 0x2d, 0x18, 0x5e, 0xf4, 0x02, 0xd7, 0x0b, 0xb6, 0xd0, 0x5b, 0x30, 0x42, 0xa5, 0xb9, 0xeb, - 0x24, 0x8e, 0x58, 0xf7, 0x17, 0x0f, 0x9f, 0x3c, 0x6b, 0x1b, 0x5f, 0x26, 0x8d, 0xe4, 0x16, 0x49, - 0x9c, 0xb4, 0x1b, 0x29, 0x0c, 0x2b, 0x6e, 0xe8, 0x0e, 0x0c, 0x25, 0x4e, 0xb4, 0x45, 0x12, 0xb1, - 0xdc, 0x5f, 0x2c, 0xc2, 0x17, 0xd3, 0xa9, 0x46, 0x82, 0x06, 0x49, 0x05, 0xe3, 0x3a, 0x63, 0x82, - 0x05, 0x33, 0xbb, 0x01, 0x63, 0x4b, 0x4e, 0xcb, 0xd9, 0xf0, 0x7c, 0x2f, 0xf1, 0x48, 0x8c, 0x3e, - 0x0a, 0x65, 0xc7, 0x75, 0xd9, 0xc4, 0xaf, 0x2c, 0x9e, 0xdd, 0xdf, 0x9b, 0x2d, 0x2f, 0xb8, 0xee, - 0xc1, 0xde, 0x2c, 0x28, 0xaa, 0x5d, 0x4c, 0x29, 0xd0, 0xf3, 0x30, 0xe0, 0x46, 0x61, 0x6b, 0xba, - 0xc4, 0x28, 0xcf, 0xd1, 0x15, 0x5a, 0x8d, 0xc2, 0x56, 0x86, 0x94, 0xd1, 0xd8, 0xbf, 0x5d, 0x02, - 0xb4, 0x44, 0x5a, 0xdb, 0x2b, 0x75, 0xe3, 0x5b, 0x5e, 0x84, 0x91, 0x66, 0x18, 0x78, 0x49, 0x18, - 0xc5, 0xa2, 0x42, 0x36, 0x1f, 0x6e, 0x09, 0x18, 0x56, 0x58, 0x74, 0x01, 0x06, 0x5a, 0xe9, 0xb2, - 0x1e, 0x93, 0x22, 0x81, 0x2d, 0x68, 0x86, 0xa1, 0x14, 0xed, 0x98, 0x44, 0x62, 0x1e, 0x2b, 0x8a, - 0x3b, 0x31, 0x89, 0x30, 0xc3, 0xa4, 0x33, 0x87, 0xce, 0x29, 0x31, 0x4b, 0x33, 0x33, 0x87, 0x62, - 0xb0, 0x46, 0x85, 0xbe, 0x08, 0x15, 0xfe, 0x0f, 0x93, 0x4d, 0x36, 0x65, 0x73, 0x85, 0xc1, 0xcd, - 0xb0, 0xe1, 0xf8, 0xd9, 0xc1, 0x1f, 0x67, 0x33, 0x4d, 0x32, 0xc2, 0x29, 0x4f, 0x63, 0xa6, 0x0d, - 0xe5, 0xce, 0xb4, 0xbf, 0x67, 0x01, 0x5a, 0xf2, 0x02, 0x97, 0x44, 0x27, 0xb0, 0x65, 0xf6, 0xb7, - 0x08, 0xfe, 0x98, 0x36, 0x2d, 0x6c, 0xb6, 0xc2, 0x80, 0x04, 0xc9, 0x52, 0x18, 0xb8, 0x7c, 0x1b, - 0xfd, 0x04, 0x0c, 0x24, 0xb4, 0x2a, 0xde, 0xac, 0x67, 0xe5, 0x67, 0xa1, 0x15, 0x1c, 0xec, 0xcd, - 0x9e, 0xeb, 0x2c, 0xc1, 0x9a, 0xc0, 0xca, 0xa0, 0x8f, 0xc3, 0x50, 0x9c, 0x38, 0x49, 0x3b, 0x16, - 0x0d, 0x7d, 0x4a, 0x36, 0xb4, 0xce, 0xa0, 0x07, 0x7b, 0xb3, 0x93, 0xaa, 0x18, 0x07, 0x61, 0x51, - 0x00, 0x3d, 0x07, 0xc3, 0x4d, 0x12, 0xc7, 0xce, 0x96, 0x14, 0x6c, 0x93, 0xa2, 0xec, 0xf0, 0x2d, - 0x0e, 0xc6, 0x12, 0x8f, 0x9e, 0x86, 0x41, 0x12, 0x45, 0x61, 0x24, 0x66, 0xc4, 0xb8, 0x20, 0x1c, - 0x5c, 0xa6, 0x40, 0xcc, 0x71, 0xf6, 0xef, 0x59, 0x30, 0xa9, 0xda, 0xca, 0xeb, 0x3a, 0xc6, 0xa5, - 0xee, 0x02, 0x34, 0x64, 0xc7, 0x62, 0xb6, 0xc0, 0x46, 0xaf, 0xbc, 0x74, 0x38, 0xef, 0xce, 0x81, - 0x4c, 0xeb, 0x50, 0xa0, 0x18, 0x6b, 0x7c, 0xed, 0xff, 0x60, 0xc1, 0xe9, 0x4c, 0x9f, 0x6e, 0x7a, - 0x71, 0x82, 0xde, 0xee, 0xe8, 0xd7, 0x9c, 0xac, 0x5b, 0xd7, 0x2b, 0x65, 0xed, 0xf1, 0x1c, 0xa5, - 0x66, 0x53, 0xdf, 0x8b, 0x79, 0xef, 0xd4, 0x3c, 0x91, 0x10, 0xad, 0x6f, 0x18, 0x06, 0xbd, 0x84, - 0x34, 0x65, 0xb7, 0x5e, 0x2c, 0xd8, 0x2d, 0xde, 0xbe, 0xf4, 0xeb, 0xac, 0x52, 0x1e, 0x98, 0xb3, - 0xb2, 0xff, 0xcc, 0x82, 0xca, 0x52, 0x18, 0x6c, 0x7a, 0x5b, 0xb7, 0x9c, 0xd6, 0x31, 0x7e, 0x97, - 0x3a, 0x0c, 0x30, 0xae, 0xbc, 0xe9, 0x97, 0xf3, 0x9a, 0x2e, 0x1a, 0x34, 0x47, 0xf7, 0x4e, 0xae, - 0x14, 0x28, 0xb1, 0x44, 0x41, 0x98, 0x31, 0x9b, 0x79, 0x0d, 0x2a, 0x8a, 0x00, 0x4d, 0x41, 0xf9, - 0x3e, 0xe1, 0x1a, 0x63, 0x05, 0xd3, 0x9f, 0xe8, 0x0c, 0x0c, 0xee, 0x38, 0x7e, 0x5b, 0x2c, 0x56, - 0xcc, 0xff, 0x7c, 0xa2, 0x74, 0xd5, 0xb2, 0x7f, 0x96, 0xad, 0x38, 0x51, 0xc9, 0x72, 0xb0, 0x23, - 0x84, 0xc1, 0xbb, 0x16, 0x9c, 0xf1, 0xbb, 0x08, 0x21, 0x31, 0x16, 0x47, 0x11, 0x5f, 0x4f, 0x88, - 0x66, 0x9f, 0xe9, 0x86, 0xc5, 0x5d, 0x6b, 0xb3, 0xbf, 0x6f, 0xc1, 0x19, 0xd5, 0xba, 0x1b, 0x64, - 0xb7, 0x4e, 0x7c, 0xd2, 0x48, 0xc2, 0xe8, 0x03, 0xd2, 0x3e, 0xf4, 0x24, 0x1f, 0x69, 0x2e, 0x59, - 0x46, 0x05, 0x83, 0xf2, 0x0d, 0xb2, 0xcb, 0x86, 0xdd, 0xfe, 0x0d, 0x0b, 0xc6, 0x55, 0xf3, 0x4f, - 0x60, 0x59, 0xdc, 0x34, 0x97, 0xc5, 0x47, 0x0b, 0xce, 0xad, 0x1e, 0x0b, 0xe2, 0x1f, 0x95, 0xe0, - 0xac, 0xa2, 0x31, 0xb6, 0x8a, 0x0f, 0xc8, 0xe8, 0xf7, 0xd7, 0xdd, 0x1b, 0x64, 0x77, 0x3d, 0xa4, - 0x7b, 0x7d, 0xf7, 0xee, 0xa2, 0xcb, 0x30, 0xea, 0x92, 0x4d, 0xa7, 0xed, 0x27, 0x4a, 0x95, 0x1d, - 0xe4, 0x36, 0x4e, 0x35, 0x05, 0x63, 0x9d, 0xc6, 0xfe, 0x39, 0x60, 0x22, 0x23, 0x71, 0xe8, 0x47, - 0xa3, 0xca, 0x83, 0x66, 0x71, 0x8c, 0xe9, 0x16, 0x87, 0xb0, 0x2e, 0x9e, 0x86, 0x41, 0xaf, 0x49, - 0xb7, 0x93, 0x92, 0xb9, 0x4b, 0xac, 0x52, 0x20, 0xe6, 0x38, 0xf4, 0x0c, 0x0c, 0x37, 0xc2, 0x66, - 0xd3, 0x09, 0xdc, 0xe9, 0x32, 0x53, 0x67, 0x46, 0xe9, 0x8e, 0xb3, 0xc4, 0x41, 0x58, 0xe2, 0xd0, - 0x13, 0x30, 0xe0, 0x44, 0x5b, 0xf1, 0xf4, 0x00, 0xa3, 0x19, 0xa1, 0x35, 0x2d, 0x44, 0x5b, 0x31, - 0x66, 0x50, 0xaa, 0xa6, 0x3c, 0x08, 0xa3, 0xfb, 0x5e, 0xb0, 0x55, 0xf5, 0x22, 0xa6, 0x73, 0x68, - 0x6a, 0xca, 0x3d, 0x85, 0xc1, 0x1a, 0x15, 0xaa, 0xc1, 0x60, 0x2b, 0x8c, 0x92, 0x78, 0x7a, 0x88, - 0x0d, 0xe7, 0x0b, 0xb9, 0xb3, 0x87, 0xf7, 0xbb, 0x16, 0x46, 0x49, 0xda, 0x15, 0xfa, 0x2f, 0xc6, - 0x9c, 0x11, 0x5a, 0x82, 0x32, 0x09, 0x76, 0xa6, 0x87, 0x19, 0xbf, 0x8f, 0x1c, 0xce, 0x6f, 0x39, - 0xd8, 0xb9, 0xeb, 0x44, 0xe9, 0x22, 0x5a, 0x0e, 0x76, 0x30, 0x2d, 0x8d, 0x1a, 0x50, 0x91, 0xee, - 0x83, 0x78, 0x7a, 0xa4, 0xc8, 0x04, 0xc3, 0x82, 0x1c, 0x93, 0x77, 0xda, 0x5e, 0x44, 0x9a, 0x24, - 0x48, 0xe2, 0x54, 0x57, 0x97, 0xd8, 0x18, 0xa7, 0x7c, 0x51, 0x03, 0xc6, 0xb8, 0x6a, 0x73, 0x2b, - 0x6c, 0x07, 0x49, 0x3c, 0x5d, 0x61, 0x4d, 0xce, 0x31, 0x86, 0xef, 0xa6, 0x25, 0x16, 0xcf, 0x08, - 0xf6, 0x63, 0x1a, 0x30, 0xc6, 0x06, 0x53, 0xf4, 0x36, 0x8c, 0xfb, 0xde, 0x0e, 0x09, 0x48, 0x1c, - 0xd7, 0xa2, 0x70, 0x83, 0x4c, 0x03, 0xeb, 0xcd, 0xd3, 0x79, 0x86, 0x61, 0xb8, 0x41, 0x16, 0x4f, - 0xed, 0xef, 0xcd, 0x8e, 0xdf, 0xd4, 0x4b, 0x63, 0x93, 0x19, 0xfa, 0x22, 0x4c, 0x50, 0x3d, 0xca, - 0x4b, 0xd9, 0x8f, 0x16, 0x67, 0x8f, 0xf6, 0xf7, 0x66, 0x27, 0xb0, 0x51, 0x1c, 0x67, 0xd8, 0xa1, - 0x75, 0xa8, 0xf8, 0xde, 0x26, 0x69, 0xec, 0x36, 0x7c, 0x32, 0x3d, 0xc6, 0x78, 0xe7, 0x2c, 0xb9, - 0x9b, 0x92, 0x9c, 0xeb, 0xae, 0xea, 0x2f, 0x4e, 0x19, 0xa1, 0xbb, 0x70, 0x2e, 0x21, 0x51, 0xd3, - 0x0b, 0x1c, 0xaa, 0x50, 0x08, 0xc5, 0x8a, 0x59, 0xdf, 0xe3, 0x6c, 0xd6, 0x9e, 0x17, 0x03, 0x7b, - 0x6e, 0xbd, 0x2b, 0x15, 0xee, 0x51, 0x1a, 0xad, 0xc1, 0x24, 0x5b, 0x4f, 0xb5, 0xb6, 0xef, 0xd7, - 0x42, 0xdf, 0x6b, 0xec, 0x4e, 0x4f, 0x30, 0x86, 0xcf, 0x48, 0x9b, 0x7a, 0xd5, 0x44, 0x53, 0x9b, - 0x23, 0xfd, 0x87, 0xb3, 0xa5, 0x91, 0x0f, 0x93, 0x31, 0x69, 0xb4, 0x23, 0x2f, 0xd9, 0xa5, 0x73, - 0x9f, 0x3c, 0x4c, 0xa6, 0x27, 0x8b, 0xd8, 0x50, 0x75, 0xb3, 0x10, 0x77, 0x68, 0x64, 0x80, 0x38, - 0xcb, 0x9a, 0x8a, 0x8a, 0x38, 0x71, 0xbd, 0x60, 0x7a, 0x8a, 0x29, 0xcd, 0x6a, 0x7d, 0xd5, 0x29, - 0x10, 0x73, 0x1c, 0x33, 0x49, 0xe9, 0x8f, 0x35, 0x2a, 0x7b, 0x4f, 0x31, 0xc2, 0xd4, 0x24, 0x95, - 0x08, 0x9c, 0xd2, 0xd0, 0xfd, 0x2a, 0x49, 0x76, 0xa7, 0x11, 0x23, 0x55, 0x4b, 0x6d, 0x7d, 0xfd, - 0xb3, 0x98, 0xc2, 0xd1, 0x5d, 0x18, 0x26, 0xc1, 0xce, 0x4a, 0x14, 0x36, 0xa7, 0x4f, 0x17, 0x91, - 0x01, 0xcb, 0x9c, 0x98, 0xef, 0x0a, 0xa9, 0x76, 0x2c, 0xc0, 0x58, 0x32, 0xb3, 0x37, 0x60, 0x42, - 0x89, 0x0b, 0x36, 0xea, 0x68, 0x16, 0x06, 0xa9, 0x44, 0x94, 0x16, 0x5b, 0x85, 0x76, 0x8d, 0x0a, - 0xca, 0x18, 0x73, 0x38, 0xeb, 0x9a, 0xf7, 0x15, 0xb2, 0xb8, 0x9b, 0x10, 0xae, 0xb9, 0x97, 0xb5, - 0xae, 0x49, 0x04, 0x4e, 0x69, 0xec, 0xff, 0xc3, 0xf7, 0xda, 0x54, 0x26, 0x15, 0x90, 0xc7, 0x97, - 0x60, 0x64, 0x3b, 0x8c, 0x13, 0x4a, 0xcd, 0xea, 0x18, 0x4c, 0x77, 0xd7, 0xeb, 0x02, 0x8e, 0x15, - 0x05, 0x7a, 0x1d, 0xc6, 0x1b, 0x7a, 0x05, 0x62, 0x8b, 0x38, 0x2b, 0x8a, 0x98, 0xb5, 0x63, 0x93, - 0x16, 0x5d, 0x85, 0x11, 0xe6, 0xbe, 0x6c, 0x84, 0xbe, 0xb0, 0x11, 0xe4, 0x8e, 0x37, 0x52, 0x13, - 0xf0, 0x03, 0xed, 0x37, 0x56, 0xd4, 0xd4, 0xd2, 0xa2, 0x4d, 0x58, 0xad, 0x09, 0x31, 0xae, 0x2c, - 0xad, 0xeb, 0x0c, 0x8a, 0x05, 0xd6, 0xfe, 0x97, 0x25, 0x6d, 0x94, 0xa9, 0xa6, 0x4b, 0xd0, 0xe7, - 0x60, 0xf8, 0x81, 0xe3, 0x25, 0x5e, 0xb0, 0x25, 0x76, 0xe6, 0x97, 0x0b, 0xca, 0x74, 0x56, 0xfc, - 0x1e, 0x2f, 0xca, 0xf7, 0x1f, 0xf1, 0x07, 0x4b, 0x86, 0x94, 0x77, 0xd4, 0x0e, 0x02, 0xca, 0xbb, - 0xd4, 0x3f, 0x6f, 0xcc, 0x8b, 0x72, 0xde, 0xe2, 0x0f, 0x96, 0x0c, 0xd1, 0x26, 0x80, 0x5c, 0xd5, - 0xc4, 0x15, 0x6e, 0xc3, 0x8f, 0xf5, 0xc3, 0x7e, 0x5d, 0x95, 0x5e, 0x9c, 0xa0, 0x3b, 0x5e, 0xfa, - 0x1f, 0x6b, 0x9c, 0xed, 0x84, 0x29, 0x38, 0x9d, 0xcd, 0x42, 0x9f, 0xa7, 0x0b, 0xcb, 0x89, 0x12, - 0xe2, 0x2e, 0x24, 0x59, 0xcf, 0xeb, 0xe1, 0x7a, 0xda, 0xba, 0xd7, 0x24, 0xfa, 0x22, 0x14, 0x4c, - 0x70, 0xca, 0xcf, 0xfe, 0xb5, 0x32, 0x4c, 0xf7, 0x6a, 0x2e, 0x9d, 0x92, 0xe4, 0xa1, 0x97, 0x2c, - 0x51, 0x15, 0xc4, 0x32, 0xa7, 0xe4, 0xb2, 0x80, 0x63, 0x45, 0x41, 0xe7, 0x46, 0xec, 0x6d, 0x05, - 0x8e, 0x2f, 0xa6, 0xaf, 0x9a, 0x1b, 0x75, 0x06, 0xc5, 0x02, 0x4b, 0xe9, 0x22, 0xe2, 0xc4, 0xc2, - 0x6b, 0xad, 0xcd, 0x21, 0xcc, 0xa0, 0x58, 0x60, 0x75, 0x8b, 0x77, 0x20, 0xc7, 0xe2, 0x35, 0x86, - 0x68, 0xf0, 0xd1, 0x0e, 0x11, 0xfa, 0x02, 0xc0, 0xa6, 0x17, 0x78, 0xf1, 0x36, 0xe3, 0x3e, 0xd4, - 0x37, 0x77, 0xa5, 0xea, 0xac, 0x28, 0x2e, 0x58, 0xe3, 0x88, 0x5e, 0x85, 0x51, 0xb5, 0x3c, 0x57, - 0xab, 0xd3, 0xc3, 0xa6, 0xa7, 0x33, 0x95, 0x55, 0x55, 0xac, 0xd3, 0xd9, 0x5f, 0xce, 0xce, 0x17, - 0xb1, 0x2a, 0xb4, 0xf1, 0xb5, 0x8a, 0x8e, 0x6f, 0xe9, 0xf0, 0xf1, 0xb5, 0xff, 0x6b, 0x19, 0x26, - 0x8d, 0xca, 0xda, 0x71, 0x01, 0x89, 0xf6, 0x26, 0xdd, 0x36, 0x9c, 0x84, 0x88, 0x35, 0x79, 0xa9, - 0x9f, 0x45, 0xa3, 0x6f, 0x32, 0x74, 0x2d, 0x70, 0x4e, 0x68, 0x1b, 0x2a, 0xbe, 0x13, 0x33, 0xdb, - 0x99, 0x88, 0xb5, 0xd8, 0x1f, 0xdb, 0x54, 0xb5, 0x77, 0xe2, 0x44, 0xdb, 0xc5, 0x79, 0x2d, 0x29, - 0x73, 0xba, 0xe7, 0x51, 0x95, 0x43, 0x1e, 0x95, 0xa8, 0xe6, 0x50, 0xbd, 0x64, 0x17, 0x73, 0x1c, - 0xba, 0x0a, 0x63, 0x11, 0x61, 0x33, 0x65, 0x89, 0x6a, 0x55, 0x6c, 0xea, 0x0d, 0xa6, 0xea, 0x17, - 0xd6, 0x70, 0xd8, 0xa0, 0x4c, 0xb5, 0xef, 0xa1, 0x43, 0xb4, 0xef, 0xe7, 0x60, 0x98, 0xfd, 0x50, - 0xb3, 0x42, 0x7d, 0xa1, 0x55, 0x0e, 0xc6, 0x12, 0x9f, 0x9d, 0x44, 0x23, 0x05, 0x27, 0xd1, 0xf3, - 0x30, 0x51, 0x75, 0x48, 0x33, 0x0c, 0x96, 0x03, 0xb7, 0x15, 0x7a, 0x41, 0x82, 0xa6, 0x61, 0x80, - 0xed, 0x27, 0x7c, 0xbd, 0x0f, 0x50, 0x0e, 0x78, 0x80, 0x6a, 0xd0, 0xf6, 0xff, 0xb5, 0x60, 0xbc, - 0x4a, 0x7c, 0x92, 0x90, 0xb5, 0x16, 0xf3, 0xb7, 0xa0, 0x15, 0x40, 0x5b, 0x91, 0xd3, 0x20, 0x35, - 0x12, 0x79, 0xa1, 0x5b, 0x27, 0x8d, 0x30, 0x60, 0x27, 0x0c, 0x74, 0x83, 0x3c, 0xb7, 0xbf, 0x37, - 0x8b, 0xae, 0x75, 0x60, 0x71, 0x97, 0x12, 0xc8, 0x85, 0xf1, 0x56, 0x44, 0x0c, 0x07, 0x91, 0x95, - 0xbf, 0xe1, 0xd7, 0xf4, 0x22, 0x5c, 0x27, 0x35, 0x40, 0xd8, 0x64, 0x8a, 0x3e, 0x0d, 0x53, 0x61, - 0xd4, 0xda, 0x76, 0x82, 0x2a, 0x69, 0x91, 0xc0, 0xa5, 0x8a, 0xb8, 0xf0, 0x02, 0x9e, 0xd9, 0xdf, - 0x9b, 0x9d, 0x5a, 0xcb, 0xe0, 0x70, 0x07, 0xb5, 0xfd, 0x0b, 0x25, 0x38, 0x5b, 0x0d, 0x1f, 0x04, - 0x0f, 0x9c, 0xc8, 0x5d, 0xa8, 0xad, 0x72, 0xed, 0x9a, 0x79, 0x55, 0xa5, 0x37, 0xd7, 0xea, 0xe9, - 0xcd, 0xfd, 0x3c, 0x8c, 0x6c, 0x7a, 0xc4, 0x77, 0x31, 0xd9, 0x14, 0xdd, 0xbb, 0x5c, 0xc4, 0x87, - 0xb3, 0x42, 0xcb, 0x48, 0x4f, 0x03, 0x77, 0x26, 0xaf, 0x08, 0x36, 0x58, 0x31, 0x44, 0x6d, 0x98, - 0x92, 0xe6, 0x83, 0xc4, 0x8a, 0xd5, 0xf1, 0x72, 0x31, 0xeb, 0xc4, 0xac, 0x86, 0x8d, 0x07, 0xce, - 0x30, 0xc4, 0x1d, 0x55, 0x50, 0xb3, 0xaf, 0x49, 0xf7, 0x86, 0x01, 0x36, 0x57, 0x98, 0xd9, 0xc7, - 0xec, 0x52, 0x06, 0xb5, 0xff, 0xa9, 0x05, 0x8f, 0x75, 0x8c, 0x96, 0x30, 0xda, 0xdf, 0x92, 0xd6, - 0x32, 0x3f, 0x8e, 0xca, 0x69, 0x65, 0xd7, 0x31, 0x2f, 0x66, 0x39, 0x97, 0x0a, 0x58, 0xce, 0x6b, - 0x70, 0x66, 0xb9, 0xd9, 0x4a, 0x76, 0xab, 0x9e, 0xe9, 0x84, 0x7e, 0x0d, 0x86, 0x9a, 0xc4, 0xf5, - 0xda, 0x4d, 0xf1, 0x59, 0x67, 0xa5, 0x20, 0xbd, 0xc5, 0xa0, 0x07, 0x7b, 0xb3, 0xe3, 0xf5, 0x24, - 0x8c, 0x9c, 0x2d, 0xc2, 0x01, 0x58, 0x90, 0xdb, 0xef, 0x59, 0x30, 0x29, 0x17, 0xd4, 0x82, 0xeb, - 0x46, 0x24, 0x8e, 0xd1, 0x0c, 0x94, 0xbc, 0x96, 0x60, 0x04, 0x82, 0x51, 0x69, 0xb5, 0x86, 0x4b, - 0x5e, 0x0b, 0x7d, 0x0e, 0x2a, 0xfc, 0xec, 0x22, 0x9d, 0x1c, 0x7d, 0x9e, 0x85, 0x30, 0x93, 0x66, - 0x5d, 0xf2, 0xc0, 0x29, 0x3b, 0xa9, 0x56, 0x32, 0x51, 0x5d, 0x36, 0x3d, 0xe9, 0xd7, 0x05, 0x1c, - 0x2b, 0x0a, 0x74, 0x11, 0x46, 0x82, 0xd0, 0xe5, 0xc7, 0x4a, 0x7c, 0xd3, 0x65, 0x53, 0xee, 0xb6, - 0x80, 0x61, 0x85, 0xb5, 0xbf, 0x61, 0xc1, 0x98, 0xec, 0x63, 0x41, 0x0d, 0x97, 0x2e, 0x92, 0x54, - 0xbb, 0x4d, 0x17, 0x09, 0xd5, 0x50, 0x19, 0xc6, 0x50, 0x4c, 0xcb, 0xfd, 0x28, 0xa6, 0xf6, 0xaf, - 0x97, 0x60, 0x42, 0x36, 0xa7, 0xde, 0xde, 0x88, 0x09, 0xdd, 0xb7, 0x2b, 0x0e, 0x1f, 0x7c, 0x22, - 0xe7, 0xd9, 0x8b, 0x79, 0x26, 0x84, 0xf1, 0xcd, 0x52, 0xbd, 0x60, 0x41, 0xf2, 0xc1, 0x29, 0x4b, - 0xb4, 0x03, 0xa7, 0x82, 0x30, 0x61, 0xfb, 0x81, 0xc2, 0x17, 0xf3, 0x01, 0x67, 0xeb, 0x79, 0x5c, - 0xd4, 0x73, 0xea, 0x76, 0x96, 0x1f, 0xee, 0xac, 0x02, 0xad, 0x49, 0xd7, 0x48, 0x99, 0xd5, 0xf5, - 0x7c, 0xb1, 0xba, 0x7a, 0x7b, 0x46, 0xec, 0xdf, 0xb4, 0xa0, 0x22, 0xc9, 0x8e, 0xf3, 0x10, 0xe0, - 0x1e, 0x0c, 0xc7, 0xec, 0xd3, 0xc8, 0x61, 0xba, 0x54, 0xac, 0xe9, 0xfc, 0x7b, 0xa6, 0x9b, 0x1f, - 0xff, 0x1f, 0x63, 0xc9, 0x8d, 0xb9, 0x36, 0x55, 0x07, 0x3e, 0x70, 0xae, 0x4d, 0xd5, 0xb2, 0x5e, - 0xae, 0x4d, 0xd6, 0x7a, 0xcd, 0x78, 0xa5, 0x1a, 0x5c, 0x2b, 0x22, 0x9b, 0xde, 0xc3, 0xac, 0x06, - 0x57, 0x63, 0x50, 0x2c, 0xb0, 0x68, 0x13, 0xc6, 0x1a, 0xd2, 0x27, 0x9a, 0x8a, 0x8e, 0x97, 0x0a, - 0x7a, 0x5a, 0x95, 0x83, 0x9d, 0x07, 0x67, 0x2c, 0x69, 0x9c, 0xb0, 0xc1, 0xd7, 0xfe, 0x79, 0x0b, - 0x86, 0xb8, 0x4b, 0xac, 0x98, 0x5f, 0x51, 0x73, 0xef, 0xa7, 0x7d, 0xbe, 0x4b, 0x81, 0xc2, 0xdb, - 0x8f, 0xee, 0x41, 0x85, 0xfd, 0x60, 0xe6, 0x7d, 0xb9, 0x48, 0x34, 0x09, 0xaf, 0x5f, 0x34, 0x98, - 0x89, 0xbb, 0xbb, 0x92, 0x01, 0x4e, 0x79, 0xd9, 0xdf, 0x2f, 0x53, 0xb1, 0x94, 0x92, 0x1a, 0xfb, - 0xae, 0x75, 0x12, 0xfb, 0x6e, 0xe9, 0xf8, 0xf7, 0xdd, 0x77, 0x60, 0xb2, 0xa1, 0x1d, 0x44, 0xa4, - 0xbb, 0xfd, 0x95, 0x82, 0x9f, 0x5e, 0x3b, 0xbd, 0xe0, 0x2e, 0xa0, 0x25, 0x93, 0x1d, 0xce, 0xf2, - 0x47, 0x04, 0xc6, 0xf8, 0x11, 0xaf, 0xa8, 0x6f, 0x80, 0xd5, 0x37, 0x9f, 0xeb, 0x6d, 0xe2, 0x25, - 0x54, 0x65, 0x6c, 0xa6, 0xd5, 0x35, 0x46, 0xd8, 0x60, 0x6b, 0xff, 0xed, 0x41, 0x18, 0x5c, 0xde, - 0x21, 0x41, 0x72, 0x8c, 0x62, 0xa8, 0x09, 0x13, 0x5e, 0xb0, 0x13, 0xfa, 0x3b, 0xc4, 0xe5, 0xf8, - 0xa3, 0x6d, 0xb9, 0xe7, 0x44, 0x25, 0x13, 0xab, 0x06, 0x33, 0x9c, 0x61, 0x7e, 0x1c, 0xe6, 0xee, - 0x9b, 0x30, 0xc4, 0x67, 0x84, 0xb0, 0x75, 0x73, 0x5c, 0xc3, 0x6c, 0x40, 0xc5, 0xca, 0x49, 0x8d, - 0x72, 0xee, 0x95, 0x16, 0x8c, 0xd0, 0x97, 0x61, 0x62, 0xd3, 0x8b, 0xe2, 0x84, 0x5a, 0xac, 0x71, - 0xe2, 0x34, 0x5b, 0x47, 0x30, 0x74, 0xd5, 0x88, 0xac, 0x18, 0x9c, 0x70, 0x86, 0x33, 0xda, 0x82, - 0x71, 0x6a, 0x67, 0xa5, 0x55, 0x0d, 0xf7, 0x5d, 0x95, 0xf2, 0x73, 0xdd, 0xd4, 0x19, 0x61, 0x93, - 0x2f, 0x15, 0x45, 0x0d, 0x66, 0x97, 0x8d, 0x30, 0x8d, 0x43, 0x89, 0x22, 0x6e, 0x90, 0x71, 0x1c, - 0x95, 0x68, 0xec, 0x3c, 0xbf, 0x62, 0x4a, 0xb4, 0xf4, 0xd4, 0xde, 0xfe, 0x2e, 0xdd, 0x1f, 0xe9, - 0x18, 0x9e, 0xc0, 0xd6, 0x72, 0xdd, 0xdc, 0x5a, 0x9e, 0x2e, 0xf0, 0x65, 0x7b, 0x6c, 0x2b, 0x5f, - 0x82, 0x51, 0xed, 0xc3, 0xa3, 0x79, 0xa8, 0x34, 0xe4, 0xd1, 0xb3, 0x90, 0xde, 0x4a, 0xbd, 0x51, - 0x67, 0xd2, 0x38, 0xa5, 0xa1, 0xe3, 0x42, 0xd5, 0xc2, 0x6c, 0x80, 0x0a, 0x55, 0x1a, 0x31, 0xc3, - 0xd8, 0x2f, 0x03, 0x2c, 0x3f, 0x24, 0x8d, 0x85, 0x06, 0x8b, 0x8b, 0xd0, 0x8e, 0x8a, 0xac, 0xde, - 0x47, 0x45, 0xf6, 0x77, 0x2c, 0x98, 0x58, 0x59, 0x32, 0xf4, 0xec, 0x39, 0x00, 0xae, 0xaf, 0xde, - 0xbb, 0x77, 0x5b, 0x3a, 0x61, 0xb9, 0xa7, 0x4c, 0x41, 0xb1, 0x46, 0x81, 0x1e, 0x87, 0xb2, 0xdf, - 0x0e, 0x84, 0x1a, 0x39, 0xbc, 0xbf, 0x37, 0x5b, 0xbe, 0xd9, 0x0e, 0x30, 0x85, 0x69, 0x91, 0x20, - 0xe5, 0xc2, 0x91, 0x20, 0xf9, 0xb1, 0x90, 0xdf, 0x2a, 0xc3, 0xd4, 0x8a, 0x4f, 0x1e, 0x1a, 0xad, - 0x7e, 0x16, 0x86, 0xdc, 0xc8, 0xdb, 0x21, 0x51, 0x76, 0x93, 0xae, 0x32, 0x28, 0x16, 0xd8, 0xc2, - 0xc1, 0x29, 0x46, 0x60, 0x4e, 0xf9, 0x98, 0x03, 0x73, 0x72, 0xfb, 0x8c, 0x36, 0x61, 0x38, 0xe4, - 0x66, 0xfe, 0xf4, 0x20, 0x9b, 0x8a, 0xaf, 0x1f, 0xde, 0x98, 0xec, 0xf8, 0xcc, 0x09, 0x27, 0x01, - 0x0f, 0x13, 0x50, 0xb2, 0x4c, 0x40, 0xb1, 0x64, 0x3e, 0xf3, 0x09, 0x18, 0xd3, 0x29, 0xfb, 0x8a, - 0x17, 0xf8, 0x49, 0x0b, 0x4e, 0xaf, 0xf8, 0x61, 0xe3, 0x7e, 0x26, 0x7a, 0xe8, 0x55, 0x18, 0xa5, - 0x8b, 0x29, 0x36, 0x42, 0xea, 0x8c, 0xd8, 0x41, 0x81, 0xc2, 0x3a, 0x9d, 0x56, 0xec, 0xce, 0x9d, - 0xd5, 0x6a, 0xb7, 0x90, 0x43, 0x81, 0xc2, 0x3a, 0x9d, 0xfd, 0x5f, 0x2c, 0x78, 0xf2, 0xda, 0xd2, - 0x72, 0x8d, 0x44, 0xb1, 0x17, 0x27, 0x24, 0x48, 0x3a, 0xa2, 0x1e, 0xa9, 0x3e, 0xe7, 0x6a, 0x4d, - 0x49, 0xf5, 0xb9, 0x2a, 0x6b, 0x85, 0xc0, 0x7e, 0x50, 0x42, 0x7f, 0x7f, 0xde, 0x82, 0xd3, 0xd7, - 0xbc, 0x04, 0x93, 0x56, 0x98, 0x0d, 0x54, 0x8c, 0x48, 0x2b, 0x8c, 0xbd, 0x24, 0x8c, 0x76, 0xb3, - 0x81, 0x8a, 0x58, 0x61, 0xb0, 0x46, 0xc5, 0x6b, 0xde, 0xf1, 0x62, 0xda, 0xd2, 0x92, 0x69, 0x7e, - 0x62, 0x01, 0xc7, 0x8a, 0x82, 0x76, 0xcc, 0xf5, 0x22, 0xa6, 0x2a, 0xec, 0x8a, 0x15, 0xac, 0x3a, - 0x56, 0x95, 0x08, 0x9c, 0xd2, 0xd8, 0x7f, 0xdf, 0x82, 0xb3, 0xd7, 0xfc, 0x76, 0x9c, 0x90, 0x68, - 0x33, 0x36, 0x1a, 0xfb, 0x32, 0x54, 0x88, 0x54, 0xbc, 0x45, 0x5b, 0xd5, 0xa6, 0xa1, 0x34, 0x72, - 0x1e, 0x25, 0xa9, 0xe8, 0x0a, 0x04, 0xe5, 0xf5, 0x17, 0x42, 0xf6, 0x1b, 0x25, 0x18, 0xbf, 0xbe, - 0xbe, 0x5e, 0xbb, 0x46, 0x12, 0x21, 0x25, 0xf3, 0x1d, 0x45, 0x35, 0xcd, 0x4a, 0xd6, 0xf6, 0x96, - 0xcc, 0xaa, 0x6b, 0x27, 0x9e, 0x3f, 0xc7, 0x83, 0xd2, 0xe7, 0x56, 0x83, 0x64, 0x2d, 0xaa, 0x27, - 0x91, 0x17, 0x6c, 0x75, 0xb5, 0xaa, 0xa5, 0x24, 0x2f, 0xf7, 0x92, 0xe4, 0xe8, 0x65, 0x18, 0x62, - 0x71, 0xf4, 0x52, 0xf5, 0xf8, 0xb0, 0xd2, 0x12, 0x18, 0xf4, 0x60, 0x6f, 0xb6, 0x72, 0x07, 0xaf, - 0xf2, 0x3f, 0x58, 0x90, 0xa2, 0x2f, 0xc2, 0xe8, 0x76, 0x92, 0xb4, 0xae, 0x13, 0xc7, 0x25, 0x91, - 0x94, 0x12, 0x39, 0x4a, 0x1a, 0x1d, 0x0c, 0x5e, 0x20, 0x5d, 0x58, 0x29, 0x2c, 0xc6, 0x3a, 0x47, - 0xbb, 0x0e, 0x90, 0xe2, 0x1e, 0x91, 0xe5, 0x61, 0xff, 0xd5, 0x12, 0x0c, 0x5f, 0x77, 0x02, 0xd7, - 0x27, 0x11, 0x5a, 0x81, 0x01, 0xf2, 0x90, 0x34, 0x8a, 0xe9, 0x97, 0xe9, 0x56, 0xc7, 0x3d, 0x5d, - 0xf4, 0x3f, 0x66, 0xe5, 0x11, 0x86, 0x61, 0xda, 0xee, 0x6b, 0x2a, 0x92, 0xf5, 0x85, 0xfc, 0x51, - 0x50, 0x53, 0x82, 0xef, 0x93, 0x02, 0x84, 0x25, 0x23, 0xe6, 0x13, 0x6a, 0xb4, 0xea, 0x54, 0xb8, - 0x25, 0xc5, 0x82, 0xd5, 0xd7, 0x97, 0x6a, 0x9c, 0x5c, 0xf0, 0xe5, 0x3e, 0x21, 0x09, 0xc4, 0x29, - 0x3b, 0xfb, 0x2a, 0x9c, 0x61, 0x47, 0x8a, 0x4e, 0xb2, 0x6d, 0xac, 0x99, 0xdc, 0xc9, 0x69, 0xff, - 0xe3, 0x12, 0x9c, 0x5a, 0xad, 0x2f, 0xd5, 0x4d, 0x6f, 0xde, 0x55, 0x18, 0xe3, 0xdb, 0x33, 0x9d, - 0x74, 0x8e, 0x2f, 0xca, 0x2b, 0x37, 0xf8, 0xba, 0x86, 0xc3, 0x06, 0x25, 0x7a, 0x12, 0xca, 0xde, - 0x3b, 0x41, 0x36, 0x66, 0x69, 0xf5, 0xcd, 0xdb, 0x98, 0xc2, 0x29, 0x9a, 0xee, 0xf4, 0x5c, 0xc4, - 0x29, 0xb4, 0xda, 0xed, 0xdf, 0x80, 0x09, 0x2f, 0x6e, 0xc4, 0xde, 0x6a, 0x40, 0xd7, 0xbf, 0xd3, - 0x90, 0xd3, 0x37, 0x55, 0xcd, 0x69, 0x53, 0x15, 0x16, 0x67, 0xa8, 0x35, 0x79, 0x3b, 0x58, 0x58, - 0x5b, 0xc8, 0x0f, 0x69, 0xfd, 0x32, 0x54, 0x54, 0x78, 0x8f, 0x0c, 0xca, 0xb2, 0xba, 0x07, 0x65, - 0x15, 0x10, 0x38, 0xd2, 0xc7, 0x5a, 0xee, 0xea, 0x63, 0xfd, 0x17, 0x16, 0xa4, 0x91, 0x0c, 0x08, - 0x43, 0xa5, 0x15, 0xb2, 0x03, 0x8c, 0x48, 0x9e, 0x14, 0x3e, 0x93, 0x33, 0x13, 0xf9, 0x4a, 0xe0, - 0x73, 0xa5, 0x26, 0xcb, 0xe2, 0x94, 0x0d, 0xba, 0x09, 0xc3, 0xad, 0x88, 0xd4, 0x13, 0x16, 0x17, - 0xdd, 0x07, 0x47, 0x36, 0xab, 0x6b, 0xbc, 0x24, 0x96, 0x2c, 0xec, 0x5f, 0xb5, 0x00, 0x6e, 0x7a, - 0x4d, 0x2f, 0xc1, 0x4e, 0xb0, 0x45, 0x8e, 0xd1, 0xc8, 0xbb, 0x0d, 0x03, 0x71, 0x8b, 0x34, 0x8a, - 0x1d, 0x3d, 0xa5, 0x2d, 0xaa, 0xb7, 0x48, 0x23, 0xfd, 0x0c, 0xf4, 0x1f, 0x66, 0x7c, 0xec, 0x5f, - 0x04, 0x98, 0x48, 0xc9, 0xa8, 0xa2, 0x8d, 0x5e, 0x34, 0x02, 0x81, 0x1f, 0xcf, 0x04, 0x02, 0x57, - 0x18, 0xb5, 0x16, 0xfb, 0x9b, 0x40, 0xb9, 0xe9, 0x3c, 0x14, 0x7a, 0xfd, 0xab, 0x45, 0x1b, 0x44, - 0x6b, 0x9a, 0xbb, 0xe5, 0x3c, 0xe4, 0x6a, 0xd4, 0x0b, 0x72, 0x02, 0xdd, 0x72, 0x1e, 0x1e, 0xf0, - 0x03, 0x26, 0xb6, 0x02, 0xa9, 0x21, 0xf1, 0xf5, 0xff, 0x96, 0xfe, 0x67, 0x42, 0x91, 0x56, 0xc7, - 0x6a, 0xf5, 0x02, 0xe1, 0x2a, 0xec, 0xb3, 0x56, 0x2f, 0xc8, 0xd6, 0xea, 0x05, 0x05, 0x6a, 0xf5, - 0x02, 0xf4, 0xae, 0x05, 0xc3, 0xc2, 0xc3, 0xce, 0x62, 0xc2, 0x46, 0xaf, 0x7c, 0xbc, 0xaf, 0xaa, - 0x85, 0xab, 0x9e, 0x57, 0x3f, 0x2f, 0x75, 0x47, 0x01, 0xcd, 0x6d, 0x82, 0xac, 0x1a, 0x7d, 0xdb, - 0x82, 0x09, 0xf1, 0x1b, 0x93, 0x77, 0xda, 0x24, 0x4e, 0xc4, 0x2e, 0xf5, 0xe9, 0xa3, 0xb4, 0x46, - 0xb0, 0xe0, 0x8d, 0xfa, 0x98, 0x14, 0x31, 0x26, 0x32, 0xb7, 0x6d, 0x99, 0xf6, 0xa0, 0xef, 0x59, - 0x70, 0xa6, 0xe9, 0x3c, 0xe4, 0x35, 0x72, 0x18, 0x76, 0x12, 0x2f, 0x14, 0x71, 0x6f, 0x2b, 0xfd, - 0xce, 0x93, 0x0e, 0x46, 0xbc, 0xb9, 0x9f, 0x94, 0xc7, 0x9e, 0xdd, 0x48, 0x72, 0x1b, 0xdd, 0xb5, - 0x85, 0x33, 0x2e, 0x8c, 0xc8, 0x89, 0xd9, 0x45, 0x6b, 0x5f, 0xd4, 0x37, 0xe3, 0xc3, 0x57, 0xa0, - 0xf4, 0x6f, 0xcd, 0xbd, 0xd9, 0x76, 0x82, 0xc4, 0x4b, 0x76, 0x35, 0x1d, 0x9f, 0xd5, 0x22, 0x26, - 0xe2, 0x31, 0xd6, 0xb2, 0x0d, 0x63, 0xfa, 0x9c, 0x3b, 0xc6, 0x9a, 0x42, 0x38, 0xdd, 0x65, 0x3e, - 0x1d, 0x63, 0x85, 0x6d, 0x78, 0xbc, 0xe7, 0xbc, 0x38, 0xbe, 0x6a, 0xed, 0x7f, 0x63, 0xe9, 0x02, - 0xf3, 0x04, 0x3c, 0x27, 0xb7, 0x4c, 0xcf, 0xc9, 0xc5, 0xa2, 0x2b, 0xa7, 0x87, 0xfb, 0x64, 0x53, - 0x6f, 0x3e, 0xdd, 0x08, 0xd0, 0x3a, 0x0c, 0xf9, 0x14, 0x22, 0x0f, 0x93, 0x2e, 0xf5, 0xb3, 0x36, - 0x53, 0xdd, 0x82, 0xc1, 0x63, 0x2c, 0x78, 0xd9, 0xdf, 0xb3, 0x60, 0xe0, 0x47, 0x78, 0x49, 0xa1, - 0x83, 0xb5, 0xb8, 0x57, 0x3b, 0x87, 0x9d, 0x07, 0xcb, 0x0f, 0x13, 0x12, 0xc4, 0x4c, 0x95, 0xec, - 0x3a, 0x44, 0xbf, 0x50, 0x82, 0x51, 0x5a, 0x95, 0x0c, 0x07, 0x78, 0x1d, 0xc6, 0x7d, 0x67, 0x83, - 0xf8, 0xd2, 0xdb, 0x9b, 0x35, 0xbb, 0x6e, 0xea, 0x48, 0x6c, 0xd2, 0xd2, 0xc2, 0x9b, 0xba, 0x33, - 0x5c, 0xa8, 0x44, 0xaa, 0xb0, 0xe1, 0x29, 0xc7, 0x26, 0x2d, 0xd5, 0xfc, 0x1f, 0x38, 0x49, 0x63, - 0x5b, 0x98, 0x64, 0xaa, 0xb9, 0xf7, 0x28, 0x10, 0x73, 0x1c, 0x5a, 0x80, 0x49, 0x39, 0x63, 0xef, - 0x52, 0x5b, 0x3d, 0x0c, 0x84, 0xba, 0xa8, 0x2e, 0x36, 0x62, 0x13, 0x8d, 0xb3, 0xf4, 0xe8, 0x13, - 0x30, 0x41, 0x07, 0x27, 0x6c, 0x27, 0x32, 0xd8, 0x61, 0x90, 0x05, 0x3b, 0xb0, 0x88, 0xd5, 0x75, - 0x03, 0x83, 0x33, 0x94, 0xf6, 0x17, 0xe1, 0xf4, 0xcd, 0xd0, 0x71, 0x17, 0x1d, 0xdf, 0x09, 0x1a, - 0x24, 0x5a, 0x0d, 0xb6, 0x72, 0xcf, 0x85, 0xf5, 0xb3, 0xdb, 0x52, 0xde, 0xd9, 0xad, 0x1d, 0x01, - 0xd2, 0x2b, 0x10, 0x61, 0x3a, 0x6f, 0xc3, 0xb0, 0xc7, 0xab, 0x12, 0xd3, 0xf6, 0x72, 0x9e, 0x53, - 0xa9, 0xa3, 0x8d, 0x5a, 0xd8, 0x09, 0x07, 0x60, 0xc9, 0x92, 0x5a, 0x12, 0xdd, 0xbc, 0x50, 0xf9, - 0xc6, 0x9a, 0xfd, 0xd7, 0x2d, 0x98, 0xbc, 0x9d, 0xb9, 0x3d, 0xf7, 0x2c, 0x0c, 0xc5, 0x24, 0xea, - 0xe2, 0x52, 0xab, 0x33, 0x28, 0x16, 0xd8, 0x47, 0x6e, 0xa6, 0xff, 0x4c, 0x09, 0x2a, 0x2c, 0xe0, - 0xb3, 0xe5, 0x34, 0x8e, 0x53, 0x29, 0xbd, 0x65, 0x28, 0xa5, 0x39, 0x46, 0xa2, 0x6a, 0x50, 0x2f, - 0x9d, 0x14, 0xdd, 0x51, 0xb7, 0xc9, 0x0a, 0xd9, 0x87, 0x29, 0x43, 0x7e, 0xf3, 0x68, 0xc2, 0xbc, - 0x7c, 0x26, 0x6f, 0x9a, 0xb1, 0xd3, 0x54, 0x45, 0xfb, 0x81, 0x3b, 0x4d, 0x55, 0x2d, 0xeb, 0x21, - 0x94, 0x6a, 0x5a, 0xe3, 0x99, 0xd8, 0xfe, 0x14, 0x0b, 0xdf, 0x73, 0x7c, 0xef, 0x2b, 0x44, 0x5d, - 0xca, 0x9c, 0x15, 0xe1, 0x78, 0x02, 0x7a, 0xc0, 0xe4, 0x8b, 0xf8, 0xc7, 0xef, 0xda, 0xa6, 0x45, - 0xec, 0xeb, 0x30, 0x99, 0x19, 0x3a, 0xf4, 0x2a, 0x0c, 0xb6, 0xb6, 0x9d, 0x98, 0x64, 0x02, 0x43, - 0x06, 0x6b, 0x14, 0x78, 0xb0, 0x37, 0x3b, 0xa1, 0x0a, 0x30, 0x08, 0xe6, 0xd4, 0xf6, 0x9f, 0x5b, - 0x30, 0x70, 0x3b, 0x74, 0x8f, 0x73, 0x8a, 0x5d, 0x37, 0xa6, 0xd8, 0xb3, 0xf9, 0x37, 0xf4, 0x7b, - 0xce, 0xae, 0x5a, 0x66, 0x76, 0x5d, 0x2c, 0xc0, 0xeb, 0xf0, 0x89, 0xd5, 0x84, 0x51, 0x96, 0x01, - 0x40, 0x44, 0xc4, 0xbc, 0x6c, 0xd8, 0x4f, 0xb3, 0x19, 0xfb, 0x69, 0x52, 0x23, 0xd5, 0xac, 0xa8, - 0xe7, 0x60, 0x58, 0x44, 0x60, 0x64, 0x83, 0x16, 0x05, 0x2d, 0x96, 0x78, 0xfb, 0x5f, 0x95, 0xc1, - 0xc8, 0x38, 0x80, 0x7e, 0xc7, 0x82, 0xb9, 0x88, 0x5f, 0xc3, 0x70, 0xab, 0xed, 0xc8, 0x0b, 0xb6, - 0xea, 0x8d, 0x6d, 0xe2, 0xb6, 0x7d, 0x2f, 0xd8, 0x5a, 0xdd, 0x0a, 0x42, 0x05, 0x5e, 0x7e, 0x48, - 0x1a, 0x6d, 0xe6, 0x5c, 0x2d, 0x9c, 0xe8, 0x40, 0x9d, 0x70, 0x5e, 0xd9, 0xdf, 0x9b, 0x9d, 0xc3, - 0x7d, 0xd5, 0x82, 0xfb, 0x6c, 0x15, 0xfa, 0x43, 0x0b, 0xe6, 0xf9, 0x9d, 0xfb, 0xe2, 0x3d, 0x29, - 0x64, 0x77, 0xd6, 0x24, 0xd3, 0x94, 0xdd, 0x3a, 0x89, 0x9a, 0x8b, 0xaf, 0x89, 0x41, 0x9e, 0xaf, - 0xf5, 0x57, 0x2b, 0xee, 0xb7, 0x99, 0xf6, 0xbf, 0x2b, 0xc3, 0x38, 0x1d, 0xcf, 0xf4, 0xbe, 0xed, - 0xab, 0xc6, 0x34, 0x79, 0x2a, 0x33, 0x4d, 0x4e, 0x19, 0xc4, 0x8f, 0xe6, 0xaa, 0x6d, 0x0c, 0xa7, - 0x7c, 0x27, 0x4e, 0xae, 0x13, 0x27, 0x4a, 0x36, 0x88, 0xc3, 0x0e, 0x14, 0xb3, 0x41, 0x0a, 0x05, - 0xce, 0x28, 0x55, 0x54, 0xcf, 0xcd, 0x2c, 0x33, 0xdc, 0xc9, 0x1f, 0xed, 0x00, 0x62, 0x87, 0x97, - 0x91, 0x13, 0xc4, 0xbc, 0x2f, 0x9e, 0x70, 0xc7, 0xf6, 0x57, 0xeb, 0x8c, 0xa8, 0x15, 0xdd, 0xec, - 0xe0, 0x86, 0xbb, 0xd4, 0xa0, 0x1d, 0x4f, 0x0f, 0x16, 0x3d, 0x9e, 0x1e, 0xca, 0x89, 0x16, 0xfe, - 0x29, 0x0b, 0x4e, 0xd3, 0xcf, 0x62, 0x46, 0x96, 0xc6, 0x28, 0x84, 0x49, 0x3a, 0xed, 0x7c, 0x92, - 0x48, 0x98, 0x58, 0x5f, 0x39, 0x9a, 0xb4, 0xc9, 0x27, 0x55, 0xd7, 0x6e, 0x98, 0xcc, 0x70, 0x96, - 0xbb, 0xfd, 0x1d, 0x0b, 0x58, 0xe8, 0xda, 0x09, 0x6c, 0x62, 0xd7, 0xcc, 0x4d, 0xcc, 0xce, 0x97, - 0x18, 0x3d, 0xf6, 0xaf, 0x57, 0x60, 0x8a, 0x62, 0x6b, 0x51, 0xf8, 0x70, 0x57, 0x2a, 0xd6, 0xf9, - 0x7e, 0xd9, 0x77, 0x4b, 0x7c, 0xd9, 0xa8, 0xfb, 0x64, 0xe8, 0xa7, 0x2d, 0x18, 0x69, 0x38, 0x2d, - 0xa7, 0xc1, 0xf3, 0xb5, 0x14, 0xf0, 0xc1, 0x18, 0xe5, 0xe7, 0x96, 0x44, 0x59, 0xee, 0x3f, 0x78, - 0x49, 0x76, 0x5d, 0x82, 0x73, 0x7d, 0x06, 0xaa, 0xf2, 0x19, 0x0f, 0xc6, 0x0d, 0x66, 0xc7, 0x68, - 0x74, 0xfe, 0xb4, 0xc5, 0x45, 0xbe, 0x32, 0x0c, 0x1e, 0xc0, 0xa9, 0x40, 0xfb, 0x4f, 0x85, 0x99, - 0xd4, 0x83, 0xe7, 0x8a, 0x0b, 0x75, 0x26, 0x03, 0xb5, 0x20, 0xbd, 0x0c, 0x43, 0xdc, 0x59, 0x87, - 0xfd, 0x4f, 0x2c, 0x78, 0x4c, 0x27, 0xd4, 0xae, 0xff, 0xe5, 0xf9, 0x84, 0xab, 0x30, 0x12, 0xb6, - 0x48, 0xe4, 0xa4, 0x46, 0xd0, 0x45, 0x39, 0xfa, 0x6b, 0x02, 0x7e, 0xb0, 0x37, 0x7b, 0x46, 0xe7, - 0x2e, 0xe1, 0x58, 0x95, 0x44, 0x36, 0x0c, 0xb1, 0x71, 0x89, 0xc5, 0xc5, 0x4d, 0x96, 0xbd, 0x84, - 0x9d, 0x84, 0xc4, 0x58, 0x60, 0xec, 0xbf, 0x69, 0xf1, 0xc9, 0xa6, 0x37, 0x1d, 0x7d, 0x15, 0xa6, - 0x9a, 0xd4, 0x5e, 0x5a, 0x7e, 0xd8, 0xa2, 0xdb, 0x28, 0x3b, 0x01, 0xb6, 0x8a, 0x6c, 0x1e, 0x3d, - 0xba, 0xbb, 0x38, 0x2d, 0x5a, 0x3f, 0x75, 0x2b, 0xc3, 0x16, 0x77, 0x54, 0x64, 0xff, 0x91, 0x58, - 0xb1, 0x4c, 0x73, 0x7b, 0x0e, 0x86, 0x5b, 0xa1, 0xbb, 0xb4, 0x5a, 0xc5, 0x62, 0xac, 0x94, 0xc8, - 0xa9, 0x71, 0x30, 0x96, 0x78, 0x74, 0x05, 0x80, 0x3c, 0x4c, 0x48, 0x14, 0x38, 0xbe, 0x3a, 0xb9, - 0x55, 0x8a, 0xd2, 0xb2, 0xc2, 0x60, 0x8d, 0x8a, 0x96, 0x69, 0x45, 0xe1, 0x8e, 0xe7, 0xb2, 0x88, - 0xf9, 0xb2, 0x59, 0xa6, 0xa6, 0x30, 0x58, 0xa3, 0xa2, 0x56, 0x6a, 0x3b, 0x88, 0xf9, 0x26, 0xe6, - 0x6c, 0x88, 0xa4, 0x1b, 0x23, 0xa9, 0x95, 0x7a, 0x47, 0x47, 0x62, 0x93, 0xd6, 0xfe, 0xbd, 0x0a, - 0x40, 0xaa, 0x26, 0xa1, 0x77, 0x3b, 0x57, 0xe8, 0xc7, 0x8a, 0xea, 0x58, 0x8f, 0x6e, 0x79, 0xa2, - 0x6f, 0x5a, 0x30, 0xea, 0xf8, 0x7e, 0xd8, 0x70, 0x12, 0xd6, 0xa3, 0x52, 0x51, 0x59, 0x21, 0x5a, - 0xb2, 0x90, 0x96, 0xe5, 0x8d, 0x79, 0x59, 0x1e, 0xec, 0x69, 0x98, 0xdc, 0xf6, 0xe8, 0x4d, 0x40, - 0x2f, 0x49, 0xf5, 0x9a, 0x7f, 0x94, 0x99, 0xac, 0x7a, 0x5d, 0x61, 0x12, 0x52, 0xd3, 0xac, 0xd1, - 0x17, 0x8d, 0xfc, 0x12, 0x03, 0x45, 0xee, 0x0b, 0x1a, 0x8a, 0x43, 0x5e, 0x6a, 0x09, 0xf4, 0x39, - 0x3d, 0x98, 0x78, 0xb0, 0xc8, 0x85, 0x5c, 0x4d, 0x7f, 0xcd, 0x09, 0x24, 0x4e, 0x60, 0xd2, 0x35, - 0xb7, 0x4a, 0x11, 0x7c, 0x75, 0x39, 0xbf, 0x86, 0xcc, 0x1e, 0x9b, 0x6e, 0x8e, 0x19, 0x04, 0xce, - 0x56, 0x81, 0x3e, 0xc7, 0x43, 0xbd, 0x57, 0x83, 0xcd, 0x50, 0x04, 0x60, 0x5d, 0x2a, 0xf0, 0xcd, - 0x77, 0xe3, 0x84, 0x34, 0x69, 0x99, 0x74, 0x37, 0xbc, 0x2d, 0xb8, 0x60, 0xc5, 0x0f, 0xad, 0xc3, - 0x10, 0xbb, 0x98, 0x12, 0x4f, 0x8f, 0x14, 0x71, 0x95, 0x99, 0xf7, 0x31, 0x53, 0x15, 0x84, 0xfd, - 0x8d, 0xb1, 0xe0, 0x85, 0xae, 0xcb, 0x7b, 0xd1, 0xf1, 0x6a, 0x70, 0x27, 0x26, 0xec, 0x5e, 0x74, - 0x65, 0xf1, 0x23, 0xe9, 0x45, 0x67, 0x0e, 0xef, 0x9a, 0x51, 0xcb, 0x28, 0x49, 0x35, 0x11, 0xf1, - 0x5f, 0x26, 0xea, 0x9a, 0x86, 0x22, 0x0d, 0x35, 0xd3, 0x7a, 0xa5, 0x83, 0x7d, 0xd7, 0x64, 0x86, - 0xb3, 0xdc, 0x4f, 0x70, 0x0f, 0x9c, 0xf1, 0x61, 0x2a, 0xbb, 0x24, 0x8f, 0x71, 0xc7, 0xfd, 0xd3, - 0x01, 0x98, 0x30, 0x27, 0x06, 0x9a, 0x87, 0x8a, 0xd0, 0xa6, 0x54, 0xf2, 0x1e, 0x35, 0xff, 0x6f, - 0x49, 0x04, 0x4e, 0x69, 0x58, 0x1a, 0x23, 0x56, 0x5c, 0x0b, 0xbb, 0x49, 0xd3, 0x18, 0x29, 0x0c, - 0xd6, 0xa8, 0xa8, 0xda, 0xba, 0x11, 0x86, 0x89, 0x12, 0xdc, 0x6a, 0xce, 0x2c, 0x32, 0x28, 0x16, - 0x58, 0x2a, 0xb0, 0xef, 0xd3, 0x0e, 0xf9, 0xa6, 0xcb, 0x4f, 0x09, 0xec, 0x1b, 0x3a, 0x12, 0x9b, - 0xb4, 0x74, 0x03, 0x0a, 0x63, 0x36, 0x09, 0x85, 0x72, 0x9c, 0x86, 0x31, 0xd5, 0xf9, 0x45, 0x2d, - 0x89, 0x47, 0x9f, 0x85, 0xc7, 0xd4, 0xbd, 0x2a, 0xcc, 0x5d, 0xa8, 0xb2, 0xc6, 0x21, 0xc3, 0xbe, - 0x7d, 0x6c, 0xa9, 0x3b, 0x19, 0xee, 0x55, 0x1e, 0xbd, 0x01, 0x13, 0x42, 0xb1, 0x95, 0x1c, 0x87, - 0xcd, 0x53, 0xee, 0x1b, 0x06, 0x16, 0x67, 0xa8, 0x51, 0x15, 0xa6, 0x28, 0x84, 0x69, 0x94, 0x92, - 0x03, 0xbf, 0x1f, 0xa6, 0x76, 0xe6, 0x1b, 0x19, 0x3c, 0xee, 0x28, 0x81, 0x16, 0x60, 0x92, 0xeb, - 0x16, 0xd4, 0x8a, 0x63, 0xdf, 0x41, 0x44, 0x4c, 0xaa, 0x45, 0xb0, 0x66, 0xa2, 0x71, 0x96, 0x1e, - 0x5d, 0x85, 0x31, 0x27, 0x6a, 0x6c, 0x7b, 0x09, 0x69, 0x24, 0xed, 0x88, 0x67, 0x1c, 0xd0, 0xc2, - 0x04, 0x16, 0x34, 0x1c, 0x36, 0x28, 0xed, 0xaf, 0xc0, 0xe9, 0x2e, 0x61, 0xd9, 0x74, 0xe2, 0x38, - 0x2d, 0x4f, 0xf6, 0x29, 0x13, 0x90, 0xb4, 0x50, 0x5b, 0x95, 0xbd, 0xd1, 0xa8, 0xe8, 0xec, 0x64, - 0xbe, 0x63, 0x2d, 0xa7, 0x9e, 0x9a, 0x9d, 0x2b, 0x12, 0x81, 0x53, 0x1a, 0xfb, 0xcf, 0x2a, 0xa0, - 0xb9, 0x5a, 0x0a, 0x84, 0xa1, 0x5c, 0x85, 0x31, 0x99, 0x26, 0x52, 0x4b, 0xcf, 0xa6, 0xba, 0x79, - 0x4d, 0xc3, 0x61, 0x83, 0x92, 0xb6, 0x2d, 0x90, 0x8e, 0xa3, 0x6c, 0xf8, 0x93, 0xf2, 0x28, 0xe1, - 0x94, 0x06, 0x5d, 0x82, 0x91, 0x98, 0xf8, 0x9b, 0x37, 0xbd, 0xe0, 0xbe, 0x98, 0xd8, 0x4a, 0x2a, - 0xd7, 0x05, 0x1c, 0x2b, 0x0a, 0xb4, 0x08, 0xe5, 0xb6, 0xe7, 0x8a, 0xa9, 0x2c, 0x55, 0x86, 0xf2, - 0x9d, 0xd5, 0xea, 0xc1, 0xde, 0xec, 0x53, 0xbd, 0xf2, 0x6c, 0x52, 0x63, 0x3a, 0x9e, 0xa3, 0xcb, - 0x8f, 0x16, 0xee, 0xe6, 0x44, 0x1f, 0xea, 0xd3, 0x89, 0x7e, 0x05, 0x40, 0xf4, 0x5a, 0xce, 0xe5, - 0x72, 0xfa, 0xd5, 0xae, 0x29, 0x0c, 0xd6, 0xa8, 0xa8, 0x49, 0xde, 0x88, 0x88, 0x23, 0xad, 0x56, - 0x1e, 0x36, 0x3c, 0x72, 0x74, 0x93, 0x7c, 0x29, 0xcb, 0x0c, 0x77, 0xf2, 0x47, 0x21, 0x9c, 0x72, - 0xe9, 0x42, 0x32, 0x2a, 0xad, 0xf4, 0x1f, 0xab, 0x4c, 0x2b, 0xac, 0x66, 0x19, 0xe1, 0x4e, 0xde, - 0xe8, 0x0b, 0x30, 0x23, 0x81, 0x9d, 0x37, 0x27, 0xd9, 0x72, 0x29, 0x2f, 0x9e, 0xdf, 0xdf, 0x9b, - 0x9d, 0xa9, 0xf6, 0xa4, 0xc2, 0x87, 0x70, 0x40, 0x6f, 0xc3, 0x10, 0x3b, 0x74, 0x89, 0xa7, 0x47, - 0xd9, 0x6e, 0xf7, 0x4a, 0x51, 0xa7, 0xe3, 0x1c, 0x3b, 0xba, 0x11, 0xb1, 0x9c, 0xe9, 0x49, 0x16, - 0x03, 0x62, 0xc1, 0x13, 0xb5, 0x60, 0xd4, 0x09, 0x82, 0x30, 0x71, 0xb8, 0x12, 0x36, 0x56, 0x44, - 0x8f, 0xd4, 0xaa, 0x58, 0x48, 0xcb, 0xf2, 0x7a, 0x54, 0x80, 0x98, 0x86, 0xc1, 0x7a, 0x15, 0xe8, - 0x01, 0x4c, 0x86, 0x0f, 0xa8, 0xc0, 0x94, 0xe7, 0x0e, 0xf1, 0xf4, 0xb8, 0xd9, 0xb1, 0xc3, 0x3f, - 0xcf, 0x9a, 0x51, 0x58, 0x93, 0x64, 0x26, 0x53, 0x9c, 0xad, 0x05, 0xcd, 0x19, 0x3e, 0xe5, 0x89, - 0x34, 0x62, 0x39, 0xf5, 0x29, 0xeb, 0x2e, 0x64, 0x76, 0x3b, 0x97, 0x47, 0x29, 0x32, 0x89, 0x30, - 0x99, 0xb9, 0x9d, 0x9b, 0xa2, 0xb0, 0x4e, 0x37, 0xf3, 0x71, 0x18, 0xd5, 0x06, 0xbe, 0x9f, 0xd0, - 0xd8, 0x99, 0x37, 0x60, 0x2a, 0x3b, 0xa0, 0x7d, 0x85, 0xd6, 0xfe, 0xaf, 0x12, 0x4c, 0x76, 0x39, - 0xd4, 0xb9, 0xef, 0xb1, 0xf0, 0x6e, 0x43, 0xf4, 0xdd, 0xf0, 0x02, 0x17, 0x33, 0x8c, 0x29, 0xc0, - 0x4a, 0x05, 0x04, 0x98, 0x94, 0xa6, 0xe5, 0x9e, 0xd2, 0x54, 0x08, 0xad, 0x81, 0xf7, 0x23, 0xb4, - 0xcc, 0x7d, 0x62, 0xb0, 0xd0, 0x3e, 0xf1, 0x08, 0x04, 0x9d, 0xb1, 0xd5, 0x0c, 0x17, 0xd8, 0x6a, - 0xbe, 0x5d, 0x82, 0xa9, 0x34, 0x8c, 0x58, 0xe4, 0x8e, 0x3d, 0xbe, 0xb3, 0x82, 0x75, 0xe3, 0xac, - 0x20, 0x2f, 0x25, 0x6c, 0xa6, 0x5d, 0x3d, 0xcf, 0x0d, 0xde, 0xce, 0x9c, 0x1b, 0xbc, 0xd2, 0x27, - 0xdf, 0xc3, 0xcf, 0x10, 0x7e, 0xa9, 0x04, 0x67, 0xb3, 0x45, 0x96, 0x7c, 0xc7, 0x6b, 0x1e, 0xe3, - 0x38, 0x7d, 0xd6, 0x18, 0xa7, 0xd7, 0xfa, 0xeb, 0x0f, 0x6b, 0x5c, 0xcf, 0xc1, 0x72, 0x32, 0x83, - 0xf5, 0xf1, 0xa3, 0x30, 0x3f, 0x7c, 0xc4, 0x7e, 0xdf, 0x82, 0xc7, 0xbb, 0x96, 0x3b, 0x01, 0xaf, - 0xe8, 0x5b, 0xa6, 0x57, 0xf4, 0xe5, 0x23, 0xf4, 0xae, 0x87, 0x9b, 0xf4, 0xbf, 0x97, 0x7a, 0xf4, - 0x8a, 0x79, 0x8e, 0xd6, 0x60, 0xd4, 0x69, 0x34, 0x48, 0x1c, 0xdf, 0x0a, 0x5d, 0x95, 0xd7, 0xe7, - 0x45, 0xb6, 0x97, 0xa4, 0xe0, 0x83, 0xbd, 0xd9, 0x99, 0x2c, 0x8b, 0x14, 0x8d, 0x75, 0x0e, 0x66, - 0xde, 0xaf, 0xd2, 0x31, 0xe5, 0xfd, 0xba, 0x02, 0xb0, 0xa3, 0x2c, 0xd6, 0xac, 0x43, 0x4a, 0xb3, - 0x65, 0x35, 0x2a, 0xf4, 0x97, 0x99, 0x06, 0xc8, 0x23, 0x26, 0x06, 0xcc, 0x9b, 0x87, 0x39, 0xdf, - 0x4f, 0x8f, 0xbe, 0xe0, 0x17, 0x1c, 0x95, 0xf3, 0x4e, 0xb1, 0xb4, 0x7f, 0xb9, 0x0c, 0x1f, 0x3e, - 0x64, 0xd2, 0xa1, 0x05, 0xf3, 0x20, 0xf4, 0x85, 0xac, 0xa7, 0x66, 0xa6, 0x6b, 0x61, 0xc3, 0x75, - 0x93, 0xf9, 0x56, 0xa5, 0xf7, 0xfd, 0xad, 0xbe, 0xa5, 0xfb, 0xd5, 0x78, 0xe0, 0xe3, 0xb5, 0x23, - 0x2f, 0xab, 0x1f, 0x4f, 0x3f, 0xf8, 0xd7, 0x2d, 0x78, 0xaa, 0x6b, 0xa7, 0x8c, 0x70, 0x8b, 0x79, - 0xa8, 0x34, 0x28, 0x50, 0xbb, 0x99, 0x92, 0x5e, 0x09, 0x93, 0x08, 0x9c, 0xd2, 0x18, 0x51, 0x15, - 0xa5, 0xdc, 0xa8, 0x8a, 0xdf, 0xb5, 0xe0, 0x4c, 0xb6, 0x11, 0x27, 0x20, 0x73, 0xea, 0xa6, 0xcc, - 0x99, 0xeb, 0xef, 0xd3, 0xf7, 0x10, 0x37, 0xdf, 0x1e, 0x87, 0x73, 0x1d, 0x3b, 0x15, 0x1f, 0xc5, - 0x9f, 0xb0, 0xe0, 0xd4, 0x16, 0xd3, 0xb4, 0xb5, 0xeb, 0x3f, 0xa2, 0x5f, 0x39, 0x77, 0xa6, 0x0e, - 0xbd, 0x35, 0xc4, 0xed, 0x86, 0x0e, 0x12, 0xdc, 0x59, 0x19, 0xfa, 0x86, 0x05, 0x67, 0x9c, 0x07, - 0x71, 0xc7, 0x2b, 0x04, 0x62, 0x1a, 0xbd, 0x91, 0xe3, 0xd4, 0xca, 0x79, 0xbf, 0x60, 0x71, 0x7a, - 0x7f, 0x6f, 0xf6, 0x4c, 0x37, 0x2a, 0xdc, 0xb5, 0x56, 0xfa, 0x7d, 0xb7, 0xc5, 0xf5, 0x82, 0x62, - 0x17, 0xd9, 0xba, 0x5d, 0x46, 0xe0, 0x22, 0x49, 0x62, 0xb0, 0xe2, 0x88, 0xbe, 0x04, 0x95, 0x2d, - 0x79, 0xe3, 0x27, 0x2b, 0xf2, 0x7a, 0x0c, 0x73, 0xb7, 0x0b, 0x42, 0x3c, 0xe4, 0x5d, 0xa1, 0x70, - 0xca, 0x14, 0x5d, 0x87, 0x72, 0xb0, 0x19, 0x8b, 0xbb, 0xb5, 0x79, 0x41, 0x35, 0x66, 0x08, 0x13, - 0xbf, 0x8e, 0x78, 0x7b, 0xa5, 0x8e, 0x29, 0x0b, 0xca, 0x29, 0xda, 0x70, 0x85, 0x37, 0x37, 0x87, - 0x13, 0x5e, 0xac, 0x76, 0x72, 0xc2, 0x8b, 0x55, 0x4c, 0x59, 0xa0, 0x1a, 0x0c, 0xb2, 0xcb, 0x0b, - 0xc2, 0x55, 0x9b, 0x73, 0xf1, 0xba, 0xe3, 0x8a, 0x06, 0x4f, 0x6a, 0xc7, 0xc0, 0x98, 0x33, 0x42, - 0xeb, 0x30, 0xd4, 0x60, 0x89, 0xb7, 0x85, 0x1d, 0x9d, 0x97, 0x36, 0xa0, 0x23, 0x49, 0x37, 0x3f, - 0x52, 0xe2, 0x70, 0x2c, 0x78, 0x31, 0xae, 0xa4, 0xb5, 0xbd, 0x19, 0x0b, 0x43, 0x39, 0x8f, 0x6b, - 0x47, 0x0a, 0x75, 0xc1, 0x95, 0xc1, 0xb1, 0xe0, 0x85, 0xaa, 0x50, 0xda, 0x6c, 0x88, 0x0c, 0x95, - 0x39, 0x2e, 0x5a, 0xf3, 0x6e, 0xe9, 0xe2, 0xd0, 0xfe, 0xde, 0x6c, 0x69, 0x65, 0x09, 0x97, 0x36, - 0x1b, 0xe8, 0x2d, 0x18, 0xde, 0xe4, 0xb7, 0x05, 0x45, 0x36, 0xca, 0xcb, 0x79, 0x57, 0x1a, 0x3b, - 0xae, 0x16, 0xf2, 0x6b, 0x0d, 0x02, 0x81, 0x25, 0x3b, 0x96, 0x22, 0x4c, 0xdd, 0x7f, 0x14, 0xe9, - 0x28, 0xe7, 0xfa, 0xbb, 0x2f, 0x29, 0xec, 0x47, 0x05, 0xc5, 0x1a, 0x47, 0x3a, 0xe7, 0x1d, 0xf9, - 0x76, 0x00, 0x4b, 0x45, 0x99, 0x3b, 0xe7, 0xbb, 0x3e, 0x35, 0xc0, 0xe7, 0xbc, 0x42, 0xe1, 0x94, - 0x29, 0x6a, 0xc3, 0xf8, 0x4e, 0xdc, 0xda, 0x26, 0x72, 0xe9, 0xb3, 0xfc, 0x94, 0xa3, 0x57, 0x3e, - 0x99, 0x93, 0x74, 0x54, 0x14, 0xf1, 0xa2, 0xa4, 0xed, 0xf8, 0x1d, 0x12, 0x8c, 0xe5, 0x64, 0xba, - 0xab, 0xb3, 0xc5, 0x66, 0x2d, 0xf4, 0x93, 0xbc, 0xd3, 0x0e, 0x37, 0x76, 0x13, 0x22, 0xf2, 0x57, - 0xe6, 0x7c, 0x92, 0x37, 0x39, 0x71, 0xe7, 0x27, 0x11, 0x08, 0x2c, 0xd9, 0xa9, 0x21, 0x63, 0xd2, - 0x78, 0xaa, 0xf0, 0x90, 0x75, 0xf4, 0x21, 0x1d, 0x32, 0x26, 0x7d, 0x53, 0xa6, 0x4c, 0xea, 0xb6, - 0xb6, 0xc3, 0x24, 0x0c, 0x32, 0xb2, 0xff, 0x54, 0x11, 0xa9, 0x5b, 0xeb, 0x52, 0xb2, 0x53, 0xea, - 0x76, 0xa3, 0xc2, 0x5d, 0x6b, 0xb5, 0xff, 0x68, 0xb0, 0x73, 0xbb, 0x65, 0xca, 0xf0, 0xdf, 0xe8, - 0x3c, 0x67, 0xfc, 0x74, 0xff, 0xb6, 0xde, 0x23, 0x3c, 0x71, 0xfc, 0x86, 0x05, 0xe7, 0x5a, 0x5d, - 0x37, 0x53, 0xb1, 0x61, 0xf5, 0x6b, 0x32, 0xf2, 0x01, 0x53, 0xc9, 0x59, 0xbb, 0xe3, 0x71, 0x8f, - 0x3a, 0xb3, 0x0a, 0x68, 0xf9, 0x7d, 0x2b, 0xa0, 0xf7, 0x60, 0x84, 0xe9, 0x4c, 0x69, 0x9e, 0x8c, - 0x3e, 0x53, 0x4b, 0xb0, 0xad, 0x6f, 0x49, 0xb0, 0xc0, 0x8a, 0x19, 0x1d, 0xb8, 0x27, 0xb3, 0x9d, - 0xc0, 0x84, 0xa1, 0x45, 0x56, 0x59, 0xee, 0xdb, 0x58, 0x11, 0x23, 0xf1, 0x64, 0xed, 0x30, 0xe2, - 0x83, 0x3c, 0x02, 0x7c, 0x78, 0x65, 0x27, 0xa9, 0xd0, 0xfe, 0x33, 0xab, 0x8b, 0xfe, 0xc5, 0x4d, - 0x90, 0x4f, 0x9a, 0x26, 0xc8, 0xb3, 0x59, 0x13, 0xa4, 0xc3, 0x5d, 0x60, 0x58, 0x1f, 0xc5, 0x93, - 0x20, 0x16, 0x4d, 0xe4, 0x61, 0xfb, 0x70, 0x21, 0x6f, 0x71, 0xb3, 0x88, 0x1e, 0x57, 0x1d, 0x8f, - 0xa5, 0x11, 0x3d, 0xee, 0x6a, 0x15, 0x33, 0x4c, 0xd1, 0xbb, 0xe0, 0xf6, 0xff, 0xb6, 0xa0, 0x5c, - 0x0b, 0xdd, 0x63, 0x74, 0x7f, 0x5c, 0x33, 0xdc, 0x1f, 0xcf, 0xe4, 0xbe, 0x98, 0xd4, 0xd3, 0xd9, - 0xb1, 0x96, 0x71, 0x76, 0x7c, 0x34, 0x9f, 0xd5, 0xe1, 0xae, 0x8d, 0xef, 0x95, 0x41, 0x7f, 0xf3, - 0x09, 0xfd, 0xe7, 0xa3, 0x04, 0x78, 0x96, 0x8b, 0x3d, 0x03, 0x25, 0xea, 0x60, 0xa1, 0x40, 0xf2, - 0xf2, 0xd7, 0x8f, 0x6d, 0x9c, 0xe7, 0x3d, 0xe2, 0x6d, 0x6d, 0x27, 0xc4, 0xcd, 0x76, 0xec, 0xe4, - 0xe2, 0x3c, 0xff, 0x87, 0x05, 0x93, 0x99, 0xda, 0x91, 0xdf, 0xed, 0xfe, 0xc8, 0x11, 0x1d, 0x1a, - 0xa7, 0x72, 0x2f, 0x9c, 0xcc, 0x01, 0x28, 0x3f, 0xb4, 0x74, 0x3b, 0x30, 0x1d, 0x4c, 0x39, 0xaa, - 0x63, 0xac, 0x51, 0xa0, 0x57, 0x61, 0x34, 0x09, 0x5b, 0xa1, 0x1f, 0x6e, 0xed, 0xde, 0x20, 0x32, - 0x3b, 0x81, 0xf2, 0xe1, 0xaf, 0xa7, 0x28, 0xac, 0xd3, 0xd9, 0xdf, 0x2f, 0x43, 0xf6, 0xc5, 0xb0, - 0xff, 0x3f, 0x4f, 0x7f, 0x7c, 0xe6, 0xe9, 0x1f, 0x58, 0x30, 0x45, 0x6b, 0x67, 0x81, 0x1c, 0x32, - 0x1e, 0x53, 0xe5, 0x43, 0xb7, 0x0e, 0xc9, 0x87, 0xfe, 0x2c, 0x95, 0x76, 0x6e, 0xd8, 0x4e, 0x84, - 0xab, 0x44, 0x13, 0x62, 0x14, 0x8a, 0x05, 0x56, 0xd0, 0x91, 0x28, 0x12, 0x17, 0x55, 0x74, 0x3a, - 0x12, 0x45, 0x58, 0x60, 0x65, 0xba, 0xf4, 0x81, 0x1e, 0xe9, 0xd2, 0x59, 0x7e, 0x1f, 0x11, 0x40, - 0x20, 0xd4, 0x00, 0x2d, 0xbf, 0x8f, 0x8c, 0x2c, 0x48, 0x69, 0xec, 0xef, 0x96, 0x61, 0xac, 0x16, - 0xba, 0x69, 0xa0, 0xf5, 0x2b, 0x46, 0xa0, 0xf5, 0x85, 0x4c, 0xa0, 0xf5, 0x94, 0x4e, 0xfb, 0x68, - 0xe2, 0xac, 0x45, 0x1e, 0x28, 0x96, 0xd0, 0xff, 0x88, 0x31, 0xd6, 0x46, 0x1e, 0x28, 0xc5, 0x08, - 0x9b, 0x7c, 0xff, 0x22, 0xc5, 0x56, 0xff, 0xb9, 0x05, 0x13, 0xb5, 0xd0, 0xa5, 0x13, 0xf4, 0x2f, - 0xd2, 0x6c, 0xd4, 0xb3, 0x47, 0x0d, 0x1d, 0x92, 0x3d, 0xea, 0x97, 0x2c, 0x18, 0xae, 0x85, 0xee, - 0x09, 0xb8, 0x11, 0x57, 0x4c, 0x37, 0xe2, 0x53, 0xb9, 0x92, 0xb7, 0x87, 0xe7, 0xf0, 0x57, 0xcb, - 0x30, 0x4e, 0x5b, 0x1c, 0x6e, 0xc9, 0xef, 0x65, 0x8c, 0x8d, 0x55, 0x60, 0x6c, 0xa8, 0x2a, 0x18, - 0xfa, 0x7e, 0xf8, 0x20, 0xfb, 0xed, 0x56, 0x18, 0x14, 0x0b, 0x2c, 0xba, 0x04, 0x23, 0xad, 0x88, - 0xec, 0x78, 0x61, 0x3b, 0xce, 0x5e, 0x7a, 0xab, 0x09, 0x38, 0x56, 0x14, 0xe8, 0x15, 0x18, 0x8b, - 0xbd, 0xa0, 0x41, 0x64, 0x78, 0xc1, 0x00, 0x0b, 0x2f, 0xe0, 0x09, 0xfa, 0x34, 0x38, 0x36, 0xa8, - 0xd0, 0x3d, 0xa8, 0xb0, 0xff, 0x6c, 0x05, 0xf5, 0x9f, 0x69, 0x9d, 0x67, 0xa7, 0x92, 0x0c, 0x70, - 0xca, 0x0b, 0x5d, 0x01, 0x48, 0x64, 0x20, 0x44, 0x2c, 0xb2, 0x6c, 0x28, 0xbd, 0x54, 0x85, 0x48, - 0xc4, 0x58, 0xa3, 0x42, 0x2f, 0x40, 0x25, 0x71, 0x3c, 0xff, 0xa6, 0x17, 0x90, 0x58, 0x04, 0x92, - 0x88, 0x44, 0xb8, 0x02, 0x88, 0x53, 0x3c, 0xdd, 0xef, 0xd9, 0x95, 0x5b, 0xfe, 0x8a, 0xc3, 0x08, - 0xa3, 0x66, 0xfb, 0xfd, 0x4d, 0x05, 0xc5, 0x1a, 0x85, 0xfd, 0x32, 0xdb, 0xb7, 0xfb, 0x8c, 0xc3, - 0xff, 0x61, 0x09, 0x50, 0x8d, 0x05, 0x5c, 0x18, 0x0f, 0x68, 0x6c, 0xc3, 0x44, 0x4c, 0x6e, 0x7a, - 0x41, 0xfb, 0xa1, 0x60, 0x55, 0xec, 0xe2, 0x43, 0x7d, 0x59, 0x2f, 0xc3, 0x6f, 0x99, 0x9a, 0x30, - 0x9c, 0xe1, 0x4b, 0x87, 0x24, 0x6a, 0x07, 0x0b, 0xf1, 0x9d, 0x98, 0x44, 0xe2, 0xa9, 0x0a, 0x36, - 0x24, 0x58, 0x02, 0x71, 0x8a, 0xa7, 0x53, 0x80, 0xfd, 0xb9, 0x1d, 0x06, 0x38, 0x0c, 0x13, 0x39, - 0x69, 0x58, 0xea, 0x72, 0x0d, 0x8e, 0x0d, 0x2a, 0xb4, 0x02, 0x28, 0x6e, 0xb7, 0x5a, 0x3e, 0x3b, - 0xd3, 0x72, 0xfc, 0x6b, 0x51, 0xd8, 0x6e, 0xf1, 0x98, 0x5b, 0x91, 0xf5, 0xbb, 0xde, 0x81, 0xc5, - 0x5d, 0x4a, 0xd0, 0x25, 0xbf, 0x19, 0xb3, 0xdf, 0xe2, 0x16, 0x2d, 0xf7, 0xad, 0xd5, 0x19, 0x08, - 0x4b, 0x9c, 0xfd, 0x35, 0xb6, 0x4d, 0xb1, 0x37, 0x04, 0x92, 0x76, 0x44, 0x50, 0x13, 0xc6, 0x5b, - 0x6c, 0x2b, 0x4a, 0xa2, 0xd0, 0xf7, 0x89, 0xd4, 0x12, 0x8f, 0x16, 0xf2, 0xc1, 0xb3, 0x86, 0xeb, - 0xec, 0xb0, 0xc9, 0xdd, 0xfe, 0x87, 0xa3, 0x4c, 0xe2, 0x88, 0x63, 0xc5, 0x61, 0x11, 0xd8, 0x29, - 0xf4, 0xb1, 0x8f, 0x14, 0x79, 0x93, 0x27, 0x95, 0xe6, 0x22, 0x4c, 0x14, 0x4b, 0x2e, 0xe8, 0xf3, - 0x2c, 0x6c, 0x99, 0x2f, 0xf3, 0xe2, 0x0f, 0x65, 0x71, 0x7a, 0x23, 0x64, 0x59, 0xb0, 0xc0, 0x1a, - 0x3b, 0x74, 0x13, 0xc6, 0x45, 0xca, 0x79, 0xe1, 0x1c, 0x28, 0x1b, 0x06, 0xf2, 0x38, 0xd6, 0x91, - 0x07, 0x59, 0x00, 0x36, 0x0b, 0xa3, 0x2d, 0x78, 0x52, 0x7b, 0xdc, 0xa6, 0x4b, 0x78, 0x12, 0x97, - 0x1f, 0x4f, 0xed, 0xef, 0xcd, 0x3e, 0xb9, 0x7e, 0x18, 0x21, 0x3e, 0x9c, 0x0f, 0x5a, 0x83, 0xb3, - 0x4e, 0x23, 0xf1, 0x76, 0x48, 0x95, 0x38, 0xae, 0xef, 0x05, 0xc4, 0xbc, 0x6a, 0xfd, 0xf8, 0xfe, - 0xde, 0xec, 0xd9, 0x85, 0x6e, 0x04, 0xb8, 0x7b, 0x39, 0xf4, 0x49, 0xa8, 0xb8, 0x41, 0x2c, 0xc6, - 0x60, 0xc8, 0x78, 0xc7, 0xa7, 0x52, 0xbd, 0x5d, 0x57, 0xfd, 0x4f, 0xff, 0xe0, 0xb4, 0x00, 0x7a, - 0x87, 0x3f, 0x7d, 0xac, 0x6c, 0x12, 0xfe, 0x7e, 0xd4, 0x6b, 0x85, 0xac, 0x60, 0xe3, 0x4a, 0x04, - 0xf7, 0x9b, 0xa9, 0x30, 0x40, 0xe3, 0xb6, 0x84, 0x51, 0x05, 0xfa, 0x0c, 0xa0, 0x98, 0x44, 0x3b, - 0x5e, 0x83, 0x2c, 0x34, 0x58, 0x8e, 0x4a, 0x76, 0x40, 0x37, 0x62, 0xc4, 0xc2, 0xa3, 0x7a, 0x07, - 0x05, 0xee, 0x52, 0x0a, 0x5d, 0xa7, 0x92, 0x47, 0x87, 0x8a, 0xa8, 0x4d, 0xa9, 0xde, 0x4d, 0x57, - 0x49, 0x2b, 0x22, 0x0d, 0x27, 0x21, 0xae, 0xc9, 0x11, 0x67, 0xca, 0xd1, 0xdd, 0x45, 0xa5, 0x06, - 0x07, 0x33, 0xd6, 0xb0, 0x33, 0x3d, 0x38, 0xb5, 0x96, 0xb6, 0xc3, 0x38, 0xb9, 0x4d, 0x92, 0x07, - 0x61, 0x74, 0x9f, 0xf9, 0xdb, 0x47, 0xb4, 0x94, 0x5f, 0x29, 0x0a, 0xeb, 0x74, 0x54, 0x13, 0x62, - 0x07, 0x3d, 0xab, 0x55, 0xe6, 0x45, 0x1f, 0x49, 0xd7, 0xce, 0x75, 0x0e, 0xc6, 0x12, 0x2f, 0x49, - 0x57, 0x6b, 0x4b, 0xcc, 0x23, 0x9e, 0x21, 0x5d, 0xad, 0x2d, 0x61, 0x89, 0x47, 0x61, 0xe7, 0x6b, - 0x49, 0x13, 0x45, 0x4e, 0x27, 0x3a, 0x25, 0x79, 0xc1, 0x07, 0x93, 0x1e, 0xc2, 0x94, 0x7a, 0xb1, - 0x89, 0xe7, 0x62, 0x8c, 0xa7, 0x27, 0x8b, 0x3c, 0xbc, 0xdc, 0x35, 0xa5, 0xa3, 0x0a, 0xd3, 0x5d, - 0xcd, 0xf0, 0xc4, 0x1d, 0xb5, 0x18, 0x29, 0x03, 0xa6, 0x72, 0xd3, 0xbd, 0xcf, 0x43, 0x25, 0x6e, - 0x6f, 0xb8, 0x61, 0xd3, 0xf1, 0x02, 0xe6, 0xb6, 0xd6, 0x9f, 0x11, 0x96, 0x08, 0x9c, 0xd2, 0xa0, - 0x1a, 0x8c, 0x38, 0xf2, 0x05, 0x6d, 0x54, 0xe4, 0x8a, 0xb1, 0x7a, 0x3a, 0x9b, 0xf9, 0x34, 0xd5, - 0x9b, 0xd9, 0x8a, 0xcb, 0xcc, 0xa7, 0xe0, 0x54, 0xc7, 0x2a, 0xe9, 0x2b, 0x52, 0xed, 0x3f, 0x0e, - 0x40, 0x45, 0xb9, 0x8a, 0xd0, 0xbc, 0xe9, 0x0d, 0x7c, 0x3c, 0xeb, 0x0d, 0x1c, 0xa1, 0x7b, 0xba, - 0xee, 0x00, 0xfc, 0x42, 0x97, 0x97, 0x49, 0x9f, 0xcf, 0x9d, 0x16, 0xc5, 0x2f, 0x8e, 0xf4, 0xf1, - 0x6e, 0x6b, 0x6a, 0x2e, 0x0c, 0x1c, 0x6a, 0x2e, 0x14, 0x7c, 0x84, 0x89, 0x1a, 0x06, 0xad, 0xd0, - 0x5d, 0xad, 0x65, 0xdf, 0x18, 0xa9, 0x51, 0x20, 0xe6, 0x38, 0xa6, 0xd0, 0x51, 0x31, 0xcf, 0x14, - 0xba, 0xe1, 0x23, 0x2a, 0x74, 0x92, 0x01, 0x4e, 0x79, 0xa1, 0x1d, 0x38, 0xd5, 0x30, 0x9f, 0x8c, - 0x51, 0xd7, 0x41, 0x5e, 0xec, 0xe3, 0xc9, 0x96, 0xb6, 0x96, 0x1e, 0x7f, 0x29, 0xcb, 0x0f, 0x77, - 0x56, 0x81, 0x5e, 0x87, 0x91, 0x77, 0xc2, 0x78, 0xc9, 0x77, 0xe2, 0x58, 0xc8, 0x3a, 0x19, 0x7a, - 0x3f, 0xf2, 0xe6, 0x5a, 0x9d, 0xc1, 0x0f, 0xf8, 0x5b, 0xf1, 0xf2, 0x2f, 0x56, 0x05, 0xec, 0xef, - 0x73, 0xb7, 0x94, 0x30, 0x54, 0x49, 0xdc, 0xf6, 0x8f, 0x33, 0x13, 0xf5, 0x9a, 0x61, 0x3b, 0x3f, - 0x02, 0x87, 0xe8, 0x6f, 0x59, 0xcc, 0x21, 0xba, 0x4e, 0x9a, 0x2d, 0xdf, 0x49, 0x8e, 0x33, 0x76, - 0xf0, 0xf3, 0x30, 0x92, 0x88, 0x5a, 0x8a, 0xa5, 0xcf, 0xd6, 0x9a, 0xc5, 0x1c, 0xc4, 0x4a, 0x2c, - 0x49, 0x28, 0x56, 0x0c, 0xed, 0x7f, 0xcb, 0xbf, 0x82, 0xc4, 0x9c, 0x80, 0xb5, 0x77, 0xdb, 0xb4, - 0xf6, 0x9e, 0x2b, 0xdc, 0x97, 0x1e, 0x56, 0xdf, 0x2f, 0x9b, 0x3d, 0x60, 0xda, 0xe3, 0x07, 0xdf, - 0x43, 0x6f, 0xaf, 0x81, 0xf9, 0x84, 0x0e, 0x7a, 0x83, 0x47, 0xdf, 0x72, 0x61, 0x7a, 0xa9, 0xef, - 0xc8, 0x5b, 0xfb, 0x57, 0x4a, 0x70, 0x86, 0xfb, 0xe8, 0x16, 0x76, 0x42, 0xcf, 0xad, 0x85, 0xae, - 0x88, 0x45, 0x76, 0x61, 0xac, 0xa5, 0x69, 0xf5, 0xc5, 0x12, 0x2d, 0xe8, 0x76, 0x40, 0xaa, 0x49, - 0xe9, 0x50, 0x6c, 0x70, 0xa5, 0xb5, 0x90, 0x1d, 0xaf, 0xa1, 0x5c, 0x3e, 0xa5, 0xbe, 0xe5, 0x9b, - 0xaa, 0x65, 0x59, 0xe3, 0x83, 0x0d, 0xae, 0xc7, 0x90, 0xe1, 0xdd, 0xfe, 0x39, 0x0b, 0x1e, 0xeb, - 0x91, 0x8c, 0x81, 0x56, 0xf7, 0x80, 0xf9, 0x45, 0xc5, 0x1b, 0x4d, 0xaa, 0x3a, 0xee, 0x2d, 0xc5, - 0x02, 0x8b, 0x36, 0x00, 0xb8, 0xb7, 0x93, 0xbd, 0x86, 0x5b, 0x2a, 0x12, 0x94, 0xd0, 0x71, 0xe9, - 0x59, 0xbb, 0x0f, 0xab, 0xde, 0xbf, 0xd5, 0xb8, 0xda, 0xdf, 0x29, 0xc3, 0x20, 0x7f, 0x90, 0xb3, - 0x06, 0xc3, 0xdb, 0x3c, 0xf5, 0x63, 0x7f, 0x99, 0x27, 0x53, 0xad, 0x8d, 0x03, 0xb0, 0x64, 0x83, - 0x6e, 0xc1, 0x69, 0xaa, 0x22, 0x78, 0x8e, 0x5f, 0x25, 0xbe, 0xb3, 0x2b, 0xcd, 0x00, 0x9e, 0xf6, - 0x5b, 0x66, 0xa8, 0x3d, 0xbd, 0xda, 0x49, 0x82, 0xbb, 0x95, 0x43, 0x6f, 0x74, 0xe4, 0x6e, 0xe2, - 0x29, 0x35, 0xd5, 0x35, 0xaa, 0xc3, 0xf3, 0x37, 0xa1, 0xd7, 0x61, 0xbc, 0xd5, 0x61, 0xf0, 0x68, - 0x2f, 0x2e, 0x9a, 0x46, 0x8e, 0x49, 0x8b, 0xaa, 0x30, 0x15, 0xb7, 0xd9, 0x11, 0xf1, 0xfa, 0x76, - 0x44, 0xe2, 0xed, 0xd0, 0x77, 0xc5, 0x63, 0x61, 0x4a, 0xb9, 0xab, 0x67, 0xf0, 0xb8, 0xa3, 0x04, - 0xe5, 0xb2, 0xe9, 0x78, 0x7e, 0x3b, 0x22, 0x29, 0x97, 0x21, 0x93, 0xcb, 0x4a, 0x06, 0x8f, 0x3b, - 0x4a, 0xd8, 0x7f, 0x62, 0xc1, 0xe9, 0x2e, 0x71, 0x14, 0x3c, 0xba, 0x6f, 0xcb, 0x8b, 0x13, 0x95, - 0xdc, 0x59, 0x8b, 0xee, 0xe3, 0x70, 0xac, 0x28, 0xe8, 0x2c, 0xe4, 0x56, 0x6c, 0xf6, 0x7c, 0x52, - 0x9c, 0x14, 0x0b, 0x6c, 0x7f, 0x99, 0x98, 0xd0, 0x05, 0x18, 0x68, 0xc7, 0x44, 0xbe, 0x5c, 0xaf, - 0x44, 0x14, 0x73, 0x5c, 0x30, 0x0c, 0x55, 0x6a, 0xb6, 0x94, 0xcf, 0x40, 0x53, 0x6a, 0xb8, 0xd7, - 0x80, 0xe3, 0xec, 0x6f, 0x95, 0x61, 0x32, 0x13, 0x4f, 0x45, 0x1b, 0xd2, 0x0c, 0x03, 0x2f, 0x09, - 0x55, 0x16, 0x20, 0xfe, 0xec, 0x09, 0x69, 0x6d, 0xdf, 0x12, 0x70, 0xac, 0x28, 0xd0, 0xb3, 0xe6, - 0xeb, 0xc8, 0x69, 0x9b, 0x17, 0xab, 0xc6, 0x13, 0x6d, 0x45, 0x13, 0xce, 0x3f, 0x0d, 0x03, 0xad, - 0x50, 0x3d, 0xb7, 0xa9, 0x26, 0x3d, 0x5e, 0xac, 0xd6, 0xc2, 0xd0, 0xc7, 0x0c, 0x89, 0x9e, 0x11, - 0xbd, 0xcf, 0x38, 0x4c, 0xb1, 0xe3, 0x86, 0xb1, 0x36, 0x04, 0xcf, 0xc1, 0xf0, 0x7d, 0xb2, 0x1b, - 0x79, 0xc1, 0x56, 0xd6, 0x5d, 0x7c, 0x83, 0x83, 0xb1, 0xc4, 0x9b, 0x49, 0xe5, 0x87, 0x8f, 0x39, - 0xa9, 0xfc, 0x48, 0x6e, 0x48, 0xe8, 0x2f, 0x5a, 0x30, 0xc9, 0x52, 0xe2, 0x89, 0x1b, 0xaa, 0x5e, - 0x18, 0x1c, 0xe3, 0xb6, 0xf8, 0x34, 0x0c, 0x46, 0xb4, 0xb2, 0x6c, 0x3e, 0x68, 0xd6, 0x02, 0xcc, - 0x71, 0xe8, 0x09, 0xf1, 0x02, 0x3e, 0xfd, 0x7c, 0x63, 0x3c, 0xbf, 0x6e, 0xfa, 0x94, 0x3d, 0xbb, - 0x6e, 0x80, 0x49, 0xcb, 0xf7, 0x78, 0x63, 0x53, 0xbf, 0xd0, 0x07, 0xe5, 0xba, 0x41, 0xd7, 0xc6, - 0x3d, 0xaa, 0xeb, 0x06, 0xdd, 0x99, 0x1f, 0xae, 0x82, 0xfe, 0xcf, 0x12, 0x9c, 0xef, 0x5a, 0x2e, - 0x3d, 0x68, 0x5a, 0x31, 0x0e, 0x9a, 0xae, 0x64, 0x0e, 0x9a, 0xec, 0xc3, 0x4b, 0x3f, 0x9a, 0xa3, - 0xa7, 0xee, 0x27, 0x42, 0xe5, 0x13, 0x3c, 0x11, 0x1a, 0x28, 0xaa, 0x2a, 0x0c, 0xe6, 0xa8, 0x0a, - 0xbf, 0x6f, 0xc1, 0xe3, 0x5d, 0x87, 0xec, 0x03, 0x77, 0xbf, 0xa3, 0x6b, 0x2b, 0x7b, 0x28, 0xd0, - 0x7f, 0xa7, 0xdc, 0xa3, 0x57, 0x4c, 0x95, 0xbe, 0x48, 0xa5, 0x0e, 0x43, 0xc6, 0x42, 0x09, 0x1a, - 0xe3, 0x12, 0x87, 0xc3, 0xb0, 0xc2, 0xa2, 0x58, 0xbb, 0x1f, 0xc1, 0x1b, 0xb9, 0x7c, 0xc4, 0x05, - 0x35, 0x67, 0x3a, 0xf2, 0xf4, 0x8b, 0xb6, 0x99, 0x5b, 0x13, 0xe8, 0x9e, 0x66, 0x1c, 0x95, 0x8f, - 0x62, 0x1c, 0x8d, 0x75, 0x37, 0x8c, 0xd0, 0x02, 0x4c, 0x36, 0xbd, 0x80, 0xbd, 0x07, 0x67, 0x6a, - 0x21, 0xea, 0x52, 0xda, 0x2d, 0x13, 0x8d, 0xb3, 0xf4, 0x33, 0xaf, 0xc3, 0xf8, 0xd1, 0x7d, 0x2d, - 0xef, 0x95, 0xe1, 0xc3, 0x87, 0x08, 0x05, 0xbe, 0x1b, 0x18, 0xdf, 0x45, 0xdb, 0x0d, 0x3a, 0xbe, - 0x4d, 0x0d, 0xce, 0x6c, 0xb6, 0x7d, 0x7f, 0x97, 0x85, 0x69, 0x10, 0x57, 0x52, 0x08, 0x0d, 0x4f, - 0xbd, 0xd4, 0xba, 0xd2, 0x85, 0x06, 0x77, 0x2d, 0x89, 0x3e, 0x03, 0x28, 0xdc, 0x60, 0x49, 0x22, - 0xdd, 0xf4, 0x22, 0x31, 0xfb, 0x04, 0xe5, 0x74, 0xa9, 0xae, 0x75, 0x50, 0xe0, 0x2e, 0xa5, 0xa8, - 0xbe, 0xc7, 0x1e, 0x79, 0x55, 0xcd, 0xca, 0xe8, 0x7b, 0x58, 0x47, 0x62, 0x93, 0x16, 0x5d, 0x83, - 0x53, 0xce, 0x8e, 0xe3, 0xf1, 0x34, 0x30, 0x92, 0x01, 0x57, 0xf8, 0x94, 0x37, 0x63, 0x21, 0x4b, - 0x80, 0x3b, 0xcb, 0xa0, 0x96, 0xe1, 0x9e, 0xe2, 0x49, 0xa1, 0x3f, 0x79, 0x84, 0x19, 0x5c, 0xd8, - 0x61, 0x65, 0xff, 0xb1, 0x45, 0xb7, 0xbc, 0x2e, 0xcf, 0x93, 0x19, 0x6f, 0x8e, 0x6b, 0x77, 0x46, - 0x3a, 0xdf, 0x1c, 0x67, 0xbe, 0x60, 0x93, 0x96, 0x4f, 0x8d, 0x38, 0x8d, 0xf2, 0x34, 0xb4, 0x4b, - 0x71, 0x55, 0x4a, 0x51, 0xa0, 0x7b, 0x30, 0xec, 0x7a, 0x3b, 0x5e, 0x1c, 0x46, 0x05, 0x5e, 0xf9, - 0xed, 0x88, 0x1c, 0x4c, 0xa5, 0x65, 0x95, 0x33, 0xc1, 0x92, 0x9b, 0xfd, 0x77, 0x4b, 0x30, 0x2e, - 0xeb, 0x7b, 0xb3, 0x1d, 0x32, 0x19, 0x76, 0x5c, 0x1b, 0xf9, 0x9b, 0xc6, 0x46, 0x3e, 0x5f, 0xec, - 0xbe, 0x18, 0x6b, 0x54, 0xcf, 0x0d, 0xfc, 0xb3, 0x99, 0x0d, 0xfc, 0x72, 0x3f, 0x4c, 0x0f, 0xdf, - 0xb8, 0xff, 0xbd, 0x05, 0xa7, 0x0c, 0xfa, 0x13, 0xd8, 0x3f, 0x6a, 0xe6, 0xfe, 0xf1, 0x42, 0x1f, - 0xbd, 0xe9, 0xb1, 0x6f, 0x7c, 0xa7, 0x94, 0xe9, 0x05, 0xdb, 0x2f, 0xbe, 0x0a, 0x03, 0xdb, 0x4e, - 0xe4, 0x16, 0xcb, 0x83, 0xd6, 0x51, 0x7c, 0xee, 0xba, 0x13, 0xb9, 0x5c, 0xea, 0x5f, 0x52, 0x8f, - 0xa7, 0x38, 0x91, 0x9b, 0x1b, 0xf2, 0xcc, 0x2a, 0x45, 0x57, 0x61, 0x28, 0x6e, 0x84, 0x2d, 0x15, - 0x64, 0x76, 0x81, 0x3f, 0xac, 0x42, 0x21, 0x07, 0x7b, 0xb3, 0xc8, 0xac, 0x8e, 0x82, 0xb1, 0xa0, - 0x9f, 0x21, 0x50, 0x51, 0x55, 0x1f, 0x63, 0x70, 0xed, 0x7b, 0x65, 0x38, 0xdd, 0x65, 0xa6, 0xa0, - 0xaf, 0x19, 0xa3, 0xf6, 0x7a, 0xdf, 0x53, 0xed, 0x7d, 0x8e, 0xdb, 0xd7, 0x98, 0x35, 0xe4, 0x8a, - 0xb9, 0x71, 0x84, 0xea, 0xef, 0xc4, 0x24, 0x5b, 0x3d, 0x05, 0xe5, 0x57, 0x4f, 0xab, 0x3d, 0xa1, - 0xc1, 0xa7, 0xd5, 0xa8, 0x76, 0x1e, 0xe3, 0x37, 0x7e, 0x77, 0x00, 0xce, 0x74, 0xbb, 0x92, 0x8a, - 0x7e, 0xca, 0xca, 0xa4, 0x35, 0x7f, 0xa3, 0xff, 0x7b, 0xad, 0x3c, 0xd7, 0xb9, 0x48, 0xdb, 0x30, - 0x67, 0x26, 0x3a, 0xcf, 0x1d, 0x6d, 0x51, 0x3b, 0xbb, 0xa6, 0x10, 0xf1, 0x04, 0xf5, 0x52, 0x1e, - 0x7c, 0xfa, 0x08, 0x4d, 0x11, 0x39, 0xee, 0xe3, 0xcc, 0x35, 0x05, 0x09, 0xce, 0xbf, 0xa6, 0x20, - 0xdb, 0x30, 0xb3, 0x05, 0xa3, 0x5a, 0xbf, 0x8e, 0x71, 0x0a, 0x78, 0x74, 0x4b, 0xd2, 0x5a, 0x7d, - 0x8c, 0xd3, 0xe0, 0x67, 0x2d, 0xc8, 0x44, 0x90, 0x28, 0x97, 0x8b, 0xd5, 0xd3, 0xe5, 0x72, 0x01, - 0x06, 0xa2, 0xd0, 0x27, 0xd9, 0x74, 0xdb, 0x38, 0xf4, 0x09, 0x66, 0x18, 0xf5, 0x86, 0x62, 0xb9, - 0xd7, 0x1b, 0x8a, 0xd4, 0x16, 0xf7, 0xc9, 0x0e, 0x91, 0x0e, 0x10, 0x25, 0xbc, 0x6f, 0x52, 0x20, - 0xe6, 0x38, 0xfb, 0x77, 0xca, 0x30, 0xc4, 0xbd, 0x0c, 0xc7, 0xb8, 0x2b, 0xd7, 0x84, 0xc1, 0x5f, - 0xe8, 0x7a, 0x28, 0x6f, 0xcd, 0x5c, 0xd5, 0x49, 0x1c, 0x3e, 0xa1, 0x54, 0xdf, 0x52, 0x27, 0x01, - 0x9a, 0x33, 0x7a, 0x3f, 0x93, 0xb1, 0x67, 0x81, 0xf3, 0xd0, 0xc6, 0x62, 0x1b, 0x20, 0x66, 0xaf, - 0x75, 0x51, 0x1e, 0x22, 0x59, 0xdd, 0x2b, 0x85, 0xda, 0x51, 0x57, 0xc5, 0x78, 0x6b, 0xd2, 0x2c, - 0x59, 0x0a, 0x81, 0x35, 0xde, 0x33, 0xaf, 0x41, 0x45, 0x11, 0xe7, 0x29, 0xfa, 0x63, 0xfa, 0x94, - 0xfc, 0x4b, 0x30, 0x99, 0xa9, 0xab, 0x2f, 0x3b, 0xe1, 0xd7, 0x2d, 0x38, 0xd5, 0xf1, 0xf8, 0x2b, - 0x7a, 0xd7, 0x82, 0x33, 0x7e, 0x17, 0xf7, 0x92, 0xf8, 0xc0, 0x47, 0x71, 0x4c, 0x29, 0x23, 0xa1, - 0x1b, 0x16, 0x77, 0xad, 0x4d, 0xa6, 0xdf, 0x2c, 0x75, 0x4f, 0xbf, 0x69, 0xff, 0x8a, 0x05, 0xe2, - 0x93, 0x9d, 0x80, 0x02, 0xb4, 0x6a, 0x2a, 0x40, 0x1f, 0x29, 0x32, 0x0b, 0x7a, 0x68, 0x3e, 0xbf, - 0x6b, 0x01, 0xe2, 0x04, 0xd9, 0x47, 0xfb, 0xb8, 0xb7, 0x4e, 0xd3, 0xd8, 0xd3, 0x69, 0xa3, 0x30, - 0x58, 0xa3, 0xea, 0x33, 0x23, 0xbb, 0x7a, 0xec, 0xaa, 0xd8, 0x8b, 0xfc, 0xe5, 0x02, 0x2f, 0xf2, - 0xff, 0x56, 0x19, 0xb2, 0x41, 0x16, 0xe8, 0x4b, 0x30, 0xd6, 0x70, 0x5a, 0xce, 0x86, 0xe7, 0x7b, - 0x89, 0x47, 0xe2, 0x62, 0x27, 0x46, 0x4b, 0x5a, 0x09, 0xe1, 0xef, 0xd5, 0x20, 0xd8, 0xe0, 0x88, - 0xe6, 0x00, 0x5a, 0x91, 0xb7, 0xe3, 0xf9, 0x64, 0x8b, 0xa9, 0x1d, 0x2c, 0xd6, 0x92, 0x1f, 0x7e, - 0x48, 0x28, 0xd6, 0x28, 0xba, 0x44, 0xf5, 0x95, 0x4f, 0x22, 0xaa, 0x6f, 0xa0, 0xcf, 0xa8, 0xbe, - 0xc1, 0x42, 0x51, 0x7d, 0x18, 0xce, 0x49, 0x37, 0x2d, 0xfd, 0xbf, 0xe2, 0xf9, 0x84, 0xa7, 0xdb, - 0x13, 0xb1, 0x98, 0x33, 0xfb, 0x7b, 0xb3, 0xe7, 0x70, 0x57, 0x0a, 0xdc, 0xa3, 0xa4, 0xdd, 0x86, - 0xd3, 0x75, 0x12, 0x79, 0x2c, 0x0b, 0x92, 0x9b, 0x2e, 0xc0, 0x2f, 0x40, 0x25, 0xca, 0xac, 0xfd, - 0x3e, 0x2f, 0xc8, 0x69, 0x79, 0x34, 0xe4, 0x5a, 0x4f, 0x59, 0xda, 0x7f, 0xad, 0x04, 0xc3, 0x22, - 0x98, 0xe9, 0x18, 0xf7, 0x91, 0x1b, 0x86, 0x75, 0xf7, 0x5c, 0xde, 0xca, 0x65, 0xcd, 0xe9, 0x69, - 0xd7, 0xd5, 0x33, 0x76, 0xdd, 0x0b, 0xc5, 0xd8, 0x1d, 0x6e, 0xd1, 0xfd, 0x66, 0x09, 0x26, 0xcc, - 0xa0, 0xae, 0x63, 0x1c, 0x8e, 0xb7, 0x60, 0x38, 0x16, 0x91, 0x4e, 0xa5, 0x22, 0x41, 0x1e, 0xd9, - 0x4f, 0x9a, 0xbe, 0xee, 0x2f, 0x62, 0x9b, 0x24, 0xbb, 0xae, 0xc1, 0x54, 0xe5, 0x93, 0x08, 0xa6, - 0xb2, 0x7f, 0x9b, 0x89, 0x54, 0x7d, 0x00, 0x4f, 0x60, 0x4b, 0x78, 0xd3, 0x14, 0xbe, 0x97, 0x0a, - 0xcd, 0x04, 0xd1, 0xbc, 0x1e, 0x5b, 0xc3, 0xaf, 0x59, 0x30, 0x2a, 0x08, 0x4f, 0xa0, 0x03, 0x9f, - 0x31, 0x3b, 0xf0, 0x4c, 0xa1, 0x0e, 0xf4, 0x68, 0xf9, 0x3f, 0x28, 0xa9, 0x96, 0xd7, 0xc4, 0x53, - 0xa6, 0xb9, 0xd9, 0x17, 0x47, 0x5a, 0x51, 0x98, 0x84, 0x8d, 0xd0, 0x17, 0x5b, 0xfc, 0x13, 0x69, - 0x10, 0x3c, 0x87, 0x1f, 0x68, 0xbf, 0xb1, 0xa2, 0x66, 0xd1, 0xdd, 0x61, 0x94, 0x88, 0x0d, 0xaa, - 0xdb, 0x43, 0xaa, 0x1b, 0xf2, 0xa1, 0x6a, 0x0a, 0x13, 0xf7, 0x47, 0xfa, 0x7d, 0xa0, 0x35, 0x8d, - 0x69, 0x57, 0x9c, 0xb0, 0xc6, 0x55, 0x86, 0x59, 0xb2, 0x1a, 0x06, 0x4d, 0x17, 0xea, 0x6d, 0x01, - 0xc7, 0x8a, 0xc2, 0x7e, 0x8d, 0x49, 0x58, 0x36, 0x3c, 0xfd, 0x05, 0xaa, 0xff, 0xcc, 0x90, 0x1a, - 0x58, 0xe6, 0x21, 0xb9, 0x0d, 0x83, 0xb4, 0x8b, 0xd2, 0x08, 0x2c, 0x26, 0xce, 0x68, 0x13, 0xf4, - 0xb0, 0xb2, 0x28, 0x89, 0x31, 0x67, 0x83, 0x48, 0x87, 0xdf, 0xfd, 0xb5, 0xc2, 0x12, 0xb2, 0x0f, - 0x4f, 0x3b, 0x4b, 0x61, 0xc3, 0xf2, 0x76, 0xac, 0xd6, 0xb2, 0x19, 0x33, 0x97, 0x24, 0x02, 0xa7, - 0x34, 0x68, 0x5e, 0xe8, 0xea, 0xe6, 0x3b, 0xb7, 0x52, 0x57, 0x97, 0x43, 0xa2, 0x29, 0xeb, 0x97, - 0x61, 0x54, 0xe5, 0x0c, 0xaf, 0xf1, 0xd4, 0xcf, 0x15, 0xae, 0xbd, 0x2c, 0xa7, 0x60, 0xac, 0xd3, - 0xa0, 0x55, 0x38, 0xed, 0xaa, 0xa8, 0xda, 0x5a, 0x7b, 0xc3, 0xf7, 0x1a, 0xb4, 0x28, 0xbf, 0xd7, - 0xf2, 0xd8, 0xfe, 0xde, 0xec, 0xe9, 0x6a, 0x27, 0x1a, 0x77, 0x2b, 0x83, 0xd6, 0x61, 0x32, 0xe6, - 0xb9, 0xd1, 0x65, 0xe8, 0xa4, 0x48, 0x24, 0xf7, 0xbc, 0x74, 0xf8, 0xd7, 0x4d, 0xf4, 0x01, 0x03, - 0x71, 0x99, 0x20, 0x83, 0x2d, 0xb3, 0x2c, 0xd0, 0x1b, 0x30, 0xe1, 0xeb, 0xcf, 0x3c, 0xd5, 0x44, - 0x70, 0xb1, 0x0a, 0x85, 0x30, 0x1e, 0x81, 0xaa, 0xe1, 0x0c, 0x35, 0x7a, 0x0b, 0xa6, 0x75, 0x88, - 0xb8, 0x5f, 0xef, 0x04, 0x5b, 0x24, 0x16, 0x49, 0x99, 0x9f, 0xd8, 0xdf, 0x9b, 0x9d, 0xbe, 0xd9, - 0x83, 0x06, 0xf7, 0x2c, 0x8d, 0xae, 0xc2, 0x98, 0x1c, 0x49, 0x2d, 0xd0, 0x38, 0x0d, 0xc2, 0xd1, - 0x70, 0xd8, 0xa0, 0x7c, 0x7f, 0xe7, 0x1a, 0x5f, 0xa5, 0x85, 0xb5, 0x2d, 0x15, 0x7d, 0x19, 0xc6, - 0xf4, 0x36, 0x0a, 0x29, 0xf9, 0x52, 0xf1, 0xa7, 0xb3, 0xc4, 0xd6, 0xac, 0x5a, 0xae, 0xe3, 0xb0, - 0xc1, 0xdb, 0x5e, 0x83, 0xa1, 0xfa, 0x6e, 0xdc, 0x48, 0xfc, 0x47, 0xf5, 0xc4, 0x71, 0x03, 0x26, - 0x33, 0x6f, 0x01, 0xab, 0x47, 0xa5, 0xad, 0x47, 0xf5, 0xa8, 0xb4, 0xfd, 0x75, 0x0b, 0x06, 0xd7, - 0x1d, 0x2f, 0xff, 0x39, 0x83, 0x22, 0x4d, 0x46, 0xaf, 0xc2, 0x10, 0xd9, 0xdc, 0x24, 0x0d, 0xf9, - 0x48, 0xf5, 0x93, 0x52, 0xa5, 0x59, 0x66, 0x50, 0xba, 0x34, 0x59, 0x65, 0xfc, 0x2f, 0x16, 0xc4, - 0xf6, 0x7f, 0xb2, 0x00, 0xd6, 0x43, 0x5f, 0x1e, 0xd9, 0xe4, 0xb4, 0x64, 0xb1, 0xe3, 0x61, 0x85, - 0x67, 0xbb, 0x3c, 0xac, 0x80, 0x52, 0x86, 0x5d, 0x9e, 0x55, 0x50, 0xbd, 0x29, 0x17, 0xea, 0xcd, - 0x40, 0x3f, 0xbd, 0xf9, 0xa6, 0x05, 0x22, 0x7a, 0xa6, 0xc0, 0x4c, 0x70, 0x65, 0x32, 0x74, 0x23, - 0x73, 0xc6, 0xf3, 0x45, 0x2e, 0xa4, 0x88, 0x7c, 0x19, 0x6a, 0x6e, 0x1a, 0x59, 0x32, 0x0c, 0xae, - 0xd4, 0x90, 0x1f, 0xe5, 0xe8, 0x5b, 0x4c, 0x7f, 0xcc, 0x6f, 0x57, 0x5f, 0x39, 0xc2, 0x58, 0xae, - 0x70, 0xca, 0x58, 0xe5, 0x8a, 0xd2, 0x73, 0x85, 0x4b, 0x04, 0x4e, 0x69, 0xd0, 0x73, 0x30, 0x1c, - 0xb7, 0x37, 0x18, 0x79, 0x26, 0x94, 0xa6, 0xce, 0xc1, 0x58, 0xe2, 0xed, 0x9f, 0x44, 0x60, 0x74, - 0xcd, 0xc8, 0x4b, 0x65, 0x3d, 0xf2, 0xbc, 0x54, 0x6f, 0xc3, 0x08, 0x69, 0xb6, 0x92, 0xdd, 0xaa, - 0x17, 0x15, 0xcb, 0x10, 0xb8, 0x2c, 0xa8, 0x3b, 0xb9, 0x4b, 0x0c, 0x56, 0x1c, 0x7b, 0x64, 0x19, - 0x2b, 0x7f, 0x20, 0xb2, 0x8c, 0x0d, 0xfc, 0x48, 0xb2, 0x8c, 0xbd, 0x05, 0xc3, 0x5b, 0x5e, 0x82, - 0x49, 0x2b, 0x14, 0xf7, 0x10, 0x73, 0xce, 0xc2, 0xae, 0x71, 0xe2, 0xce, 0xd4, 0x41, 0x02, 0x81, - 0x25, 0x3b, 0xb4, 0x0e, 0x43, 0xdc, 0xf6, 0x10, 0x89, 0xbb, 0x5e, 0x2a, 0xe2, 0x95, 0xe9, 0xcc, - 0x61, 0x25, 0xe2, 0xa5, 0x04, 0x2f, 0x99, 0x55, 0x6c, 0xf8, 0xfd, 0x67, 0x15, 0x53, 0xb9, 0xc0, - 0x46, 0x1e, 0x55, 0x2e, 0x30, 0x23, 0xa7, 0x5a, 0xe5, 0x38, 0x72, 0xaa, 0x7d, 0xd3, 0x82, 0xb3, - 0xad, 0x6e, 0x19, 0x09, 0x45, 0x56, 0xaf, 0x4f, 0x1d, 0x21, 0x43, 0xa3, 0x51, 0x35, 0xbb, 0x17, - 0xd6, 0x95, 0x0c, 0x77, 0xaf, 0x58, 0x26, 0x67, 0x1b, 0x7d, 0xff, 0xc9, 0xd9, 0x8e, 0x3b, 0xfd, - 0x57, 0x9a, 0xaa, 0x6d, 0xfc, 0x58, 0x52, 0xb5, 0x4d, 0x3c, 0xc2, 0x54, 0x6d, 0x5a, 0x92, 0xb5, - 0xc9, 0x47, 0x9b, 0x64, 0x6d, 0x1b, 0x46, 0xdd, 0xf0, 0x41, 0xf0, 0xc0, 0x89, 0xdc, 0x85, 0xda, - 0xaa, 0xc8, 0xe9, 0x95, 0x93, 0x40, 0xa2, 0x9a, 0x16, 0x30, 0x6a, 0xe0, 0xee, 0xc7, 0x14, 0x89, - 0x75, 0xd6, 0x22, 0xdd, 0xdc, 0xa9, 0xf7, 0x99, 0x6e, 0xce, 0x48, 0xda, 0x86, 0x8e, 0x23, 0x69, - 0xdb, 0x97, 0xd8, 0x4d, 0xf2, 0x4d, 0x6f, 0xeb, 0x96, 0xd3, 0x9a, 0x3e, 0x5d, 0xa4, 0x86, 0x25, - 0x49, 0xde, 0x59, 0x83, 0x42, 0xe1, 0x94, 0x69, 0x67, 0x5a, 0xb8, 0x33, 0x27, 0x9d, 0x16, 0xee, - 0xec, 0x31, 0xa6, 0x85, 0x3b, 0x77, 0xa2, 0x69, 0xe1, 0x1e, 0xfb, 0x91, 0xa4, 0x85, 0xfb, 0x2b, - 0x70, 0xfe, 0xf0, 0xcf, 0x91, 0xa6, 0x1d, 0xae, 0xa5, 0x2e, 0x83, 0x4c, 0xda, 0x61, 0xa6, 0xea, - 0x68, 0x54, 0x85, 0xb3, 0x53, 0x7d, 0xd7, 0x82, 0xc7, 0x7a, 0x24, 0x71, 0x29, 0x7c, 0x8f, 0xa1, - 0x05, 0x93, 0x2d, 0xb3, 0x68, 0xe1, 0x1b, 0x47, 0x46, 0xd2, 0x18, 0x15, 0x23, 0x97, 0x41, 0xe0, - 0x2c, 0xfb, 0xc5, 0x8f, 0xfc, 0xe0, 0xbd, 0xf3, 0x1f, 0xfa, 0xe1, 0x7b, 0xe7, 0x3f, 0xf4, 0x87, - 0xef, 0x9d, 0xff, 0xd0, 0x4f, 0xec, 0x9f, 0xb7, 0x7e, 0xb0, 0x7f, 0xde, 0xfa, 0xe1, 0xfe, 0x79, - 0xeb, 0x4f, 0xf6, 0xcf, 0x5b, 0xdf, 0xfc, 0xd3, 0xf3, 0x1f, 0xfa, 0x5c, 0x69, 0xe7, 0xf2, 0xff, - 0x0b, 0x00, 0x00, 0xff, 0xff, 0x1f, 0x95, 0x60, 0xd6, 0x7d, 0xb7, 0x00, 0x00, + // 10327 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x7d, 0x6d, 0x6c, 0x24, 0xc7, + 0x95, 0x98, 0x7b, 0x86, 0x5f, 0xf3, 0xf8, 0xb9, 0xb5, 0x1f, 0xa2, 0x68, 0x69, 0xb9, 0x6a, 0x59, + 0xf2, 0x4a, 0x5a, 0x91, 0xde, 0x95, 0x64, 0xad, 0x2d, 0x47, 0x36, 0xc9, 0x21, 0x77, 0xe9, 0x25, + 0x77, 0x47, 0x35, 0xdc, 0x5d, 0xd9, 0x56, 0x2c, 0x35, 0xa7, 0x8b, 0x64, 0x7b, 0x9b, 0xdd, 0xa3, + 0xee, 0x1e, 0xee, 0x52, 0x8e, 0x81, 0x3b, 0x9f, 0x70, 0x87, 0x20, 0x4e, 0xe2, 0xe0, 0x60, 0x20, + 0xc8, 0x07, 0xee, 0x12, 0x20, 0x81, 0x93, 0x43, 0x3e, 0x1c, 0xe7, 0xce, 0x3e, 0x9c, 0x93, 0x20, + 0x97, 0xb3, 0xe3, 0xcb, 0xc7, 0xc1, 0xc1, 0x01, 0xb9, 0xcb, 0x19, 0x60, 0x4e, 0x74, 0x70, 0x3f, + 0xf3, 0x23, 0xf7, 0x8f, 0x09, 0x92, 0xa0, 0x3e, 0xbb, 0xaa, 0x67, 0x86, 0xdd, 0x43, 0x2d, 0x69, + 0xf9, 0x70, 0xff, 0x66, 0xde, 0x7b, 0xf5, 0xea, 0xa3, 0x5f, 0x55, 0xbd, 0xf7, 0xea, 0xd5, 0x2b, + 0xb8, 0x74, 0xef, 0x6a, 0x3c, 0xe3, 0x85, 0xb3, 0xf7, 0x5a, 0xeb, 0x24, 0x0a, 0x48, 0x42, 0xe2, + 0xd9, 0xe6, 0xbd, 0xcd, 0x59, 0xa7, 0xe9, 0xcd, 0xee, 0x5c, 0x9e, 0xdd, 0x24, 0x01, 0x89, 0x9c, + 0x84, 0xb8, 0x33, 0xcd, 0x28, 0x4c, 0x42, 0xf4, 0x18, 0xa7, 0x9e, 0x49, 0xa9, 0x67, 0x9a, 0xf7, + 0x36, 0x67, 0x9c, 0xa6, 0x37, 0xb3, 0x73, 0x79, 0xea, 0xf9, 0x4d, 0x2f, 0xd9, 0x6a, 0xad, 0xcf, + 0x34, 0xc2, 0xed, 0xd9, 0xcd, 0x70, 0x33, 0x9c, 0x65, 0x85, 0xd6, 0x5b, 0x1b, 0xec, 0x1f, 0xfb, + 0xc3, 0x7e, 0x71, 0x66, 0x53, 0x2f, 0x8a, 0xaa, 0x9d, 0xa6, 0xb7, 0xed, 0x34, 0xb6, 0xbc, 0x80, + 0x44, 0xbb, 0xb2, 0xf2, 0x78, 0x76, 0x9b, 0x24, 0x4e, 0x87, 0x26, 0x4c, 0xcd, 0x76, 0x2b, 0x15, + 0xb5, 0x82, 0xc4, 0xdb, 0x26, 0x6d, 0x05, 0x3e, 0x9e, 0x57, 0x20, 0x6e, 0x6c, 0x91, 0x6d, 0xa7, + 0xad, 0xdc, 0x95, 0xee, 0x23, 0x13, 0x91, 0x38, 0x6c, 0x45, 0x8d, 0xf6, 0xba, 0x2e, 0x77, 0x2e, + 0xd3, 0x4a, 0x3c, 0x7f, 0xd6, 0x0b, 0x92, 0x38, 0x89, 0xb2, 0x45, 0xec, 0x3f, 0xb0, 0xe0, 0xc2, + 0xdc, 0xdd, 0xfa, 0xa2, 0xef, 0xc4, 0x89, 0xd7, 0x98, 0xf7, 0xc3, 0xc6, 0xbd, 0x7a, 0x12, 0x46, + 0xe4, 0x4e, 0xe8, 0xb7, 0xb6, 0x49, 0x9d, 0xd5, 0x83, 0x2e, 0xc1, 0xd0, 0x0e, 0xfb, 0xbf, 0x5c, + 0x9d, 0xb4, 0x2e, 0x58, 0x17, 0x2b, 0xf3, 0x13, 0x3f, 0xdc, 0x9b, 0xfe, 0xd0, 0xfe, 0xde, 0xf4, + 0xd0, 0x1d, 0x01, 0xc7, 0x8a, 0x02, 0x3d, 0x0d, 0x03, 0x1b, 0xf1, 0xda, 0x6e, 0x93, 0x4c, 0x96, + 0x18, 0xed, 0x98, 0xa0, 0x1d, 0x58, 0xaa, 0x53, 0x28, 0x16, 0x58, 0x34, 0x0b, 0x95, 0xa6, 0x13, + 0x25, 0x5e, 0xe2, 0x85, 0xc1, 0x64, 0xf9, 0x82, 0x75, 0xb1, 0x7f, 0xfe, 0x94, 0x20, 0xad, 0xd4, + 0x24, 0x02, 0xa7, 0x34, 0xb4, 0x19, 0x11, 0x71, 0xdc, 0x5b, 0x81, 0xbf, 0x3b, 0xd9, 0x77, 0xc1, + 0xba, 0x38, 0x94, 0x36, 0x03, 0x0b, 0x38, 0x56, 0x14, 0xf6, 0x77, 0x4b, 0x30, 0x34, 0xb7, 0xb1, + 0xe1, 0x05, 0x5e, 0xb2, 0x8b, 0xde, 0x82, 0x91, 0x20, 0x74, 0x89, 0xfc, 0xcf, 0x7a, 0x31, 0x7c, + 0xe5, 0xd9, 0x99, 0xc3, 0x04, 0x6a, 0xe6, 0xa6, 0x56, 0x62, 0x7e, 0x62, 0x7f, 0x6f, 0x7a, 0x44, + 0x87, 0x60, 0x83, 0x23, 0x7a, 0x03, 0x86, 0x9b, 0xa1, 0xab, 0x2a, 0x28, 0xb1, 0x0a, 0x9e, 0x39, + 0xbc, 0x82, 0x5a, 0x5a, 0x60, 0x7e, 0x7c, 0x7f, 0x6f, 0x7a, 0x58, 0x03, 0x60, 0x9d, 0x1d, 0xf2, + 0x61, 0x9c, 0xfe, 0x0d, 0x12, 0x4f, 0xd5, 0x50, 0x66, 0x35, 0x3c, 0x9f, 0x5f, 0x83, 0x56, 0x68, + 0xfe, 0xf4, 0xfe, 0xde, 0xf4, 0x78, 0x06, 0x88, 0xb3, 0xac, 0xed, 0x77, 0x60, 0x6c, 0x2e, 0x49, + 0x9c, 0xc6, 0x16, 0x71, 0xf9, 0xf7, 0x45, 0x2f, 0x42, 0x5f, 0xe0, 0x6c, 0x13, 0xf1, 0xf5, 0x2f, + 0x88, 0x61, 0xef, 0xbb, 0xe9, 0x6c, 0x93, 0x83, 0xbd, 0xe9, 0x89, 0xdb, 0x81, 0xf7, 0x76, 0x4b, + 0xc8, 0x0c, 0x85, 0x61, 0x46, 0x8d, 0xae, 0x00, 0xb8, 0x64, 0xc7, 0x6b, 0x90, 0x9a, 0x93, 0x6c, + 0x09, 0x69, 0x40, 0xa2, 0x2c, 0x54, 0x15, 0x06, 0x6b, 0x54, 0xf6, 0x57, 0x2d, 0xa8, 0xcc, 0xed, + 0x84, 0x9e, 0x5b, 0x0b, 0xdd, 0x18, 0xb5, 0x60, 0xbc, 0x19, 0x91, 0x0d, 0x12, 0x29, 0xd0, 0xa4, + 0x75, 0xa1, 0x7c, 0x71, 0xf8, 0xca, 0x95, 0x9c, 0x7e, 0x9b, 0x85, 0x16, 0x83, 0x24, 0xda, 0x9d, + 0x7f, 0x44, 0x54, 0x3d, 0x9e, 0xc1, 0xe2, 0x6c, 0x1d, 0xf6, 0xdf, 0x28, 0xc1, 0xd9, 0xb9, 0x77, + 0x5a, 0x11, 0xa9, 0x7a, 0xf1, 0xbd, 0xec, 0x54, 0x70, 0xbd, 0xf8, 0xde, 0xcd, 0x74, 0x30, 0x94, + 0x0c, 0x56, 0x05, 0x1c, 0x2b, 0x0a, 0xf4, 0x3c, 0x0c, 0xd2, 0xdf, 0xb7, 0xf1, 0xb2, 0xe8, 0xfd, + 0x69, 0x41, 0x3c, 0x5c, 0x75, 0x12, 0xa7, 0xca, 0x51, 0x58, 0xd2, 0xa0, 0x55, 0x18, 0x6e, 0xb0, + 0x35, 0x62, 0x73, 0x35, 0x74, 0x09, 0xfb, 0xc2, 0x95, 0xf9, 0xe7, 0x28, 0xf9, 0x42, 0x0a, 0x3e, + 0xd8, 0x9b, 0x9e, 0xe4, 0x6d, 0x13, 0x2c, 0x34, 0x1c, 0xd6, 0xcb, 0x23, 0x5b, 0x4d, 0xc4, 0x3e, + 0xc6, 0x09, 0x3a, 0x4c, 0xc2, 0x8b, 0xda, 0x9c, 0xea, 0x67, 0x73, 0x6a, 0xa4, 0xcb, 0x7c, 0xfa, + 0xc7, 0x96, 0x18, 0x93, 0x25, 0xcf, 0x37, 0x97, 0x87, 0x2b, 0x00, 0x31, 0x69, 0x44, 0x24, 0xd1, + 0x46, 0x45, 0x7d, 0xe6, 0xba, 0xc2, 0x60, 0x8d, 0x8a, 0x4e, 0xfe, 0x78, 0xcb, 0x89, 0x98, 0xb4, + 0x88, 0xb1, 0x51, 0x93, 0xbf, 0x2e, 0x11, 0x38, 0xa5, 0x31, 0x26, 0x7f, 0x39, 0x77, 0xf2, 0xff, + 0xb6, 0x05, 0x83, 0xf3, 0x5e, 0xe0, 0x7a, 0xc1, 0x26, 0x7a, 0x0b, 0x86, 0xe8, 0x6a, 0xee, 0x3a, + 0x89, 0x23, 0xe6, 0xfd, 0xc7, 0xa4, 0xf0, 0xe8, 0x8b, 0xb2, 0x14, 0x9f, 0x78, 0x86, 0x52, 0x53, + 0x21, 0xba, 0xb5, 0xfe, 0x25, 0xd2, 0x48, 0x56, 0x49, 0xe2, 0xa4, 0xdd, 0x49, 0x61, 0x58, 0x71, + 0x45, 0xb7, 0x61, 0x20, 0x71, 0xa2, 0x4d, 0x92, 0x88, 0x69, 0x9f, 0x33, 0x29, 0x39, 0x0f, 0x4c, + 0x45, 0x8e, 0x04, 0x0d, 0x92, 0x2e, 0x90, 0x6b, 0x8c, 0x09, 0x16, 0xcc, 0xec, 0x06, 0x8c, 0x2c, + 0x38, 0x4d, 0x67, 0xdd, 0xf3, 0xbd, 0xc4, 0x23, 0x31, 0xfa, 0x28, 0x94, 0x1d, 0xd7, 0x65, 0x13, + 0xa0, 0x32, 0x7f, 0x76, 0x7f, 0x6f, 0xba, 0x3c, 0xe7, 0xba, 0x07, 0x7b, 0xd3, 0xa0, 0xa8, 0x76, + 0x31, 0xa5, 0x40, 0xcf, 0x42, 0x9f, 0x1b, 0x85, 0xcd, 0xc9, 0x12, 0xa3, 0x3c, 0x47, 0x67, 0x6a, + 0x35, 0x0a, 0x9b, 0x19, 0x52, 0x46, 0x63, 0x7f, 0xbf, 0x04, 0x68, 0x81, 0x34, 0xb7, 0x96, 0xea, + 0xc6, 0x37, 0xbd, 0x08, 0x43, 0xdb, 0x61, 0xe0, 0x25, 0x61, 0x14, 0x8b, 0x0a, 0x99, 0x5c, 0xac, + 0x0a, 0x18, 0x56, 0x58, 0x74, 0x01, 0xfa, 0x9a, 0xe9, 0xf4, 0x1e, 0x91, 0x4b, 0x03, 0x9b, 0xd8, + 0x0c, 0x43, 0x29, 0x5a, 0x31, 0x89, 0x84, 0x3c, 0x2b, 0x8a, 0xdb, 0x31, 0x89, 0x30, 0xc3, 0xa4, + 0x12, 0x44, 0x65, 0x4b, 0x48, 0x6b, 0x46, 0x82, 0x28, 0x06, 0x6b, 0x54, 0xe8, 0x4d, 0xa8, 0xf0, + 0x7f, 0x98, 0x6c, 0x30, 0xd1, 0xcd, 0x5d, 0x14, 0x56, 0xc2, 0x86, 0xe3, 0x67, 0x07, 0x7f, 0x94, + 0x49, 0x9c, 0x64, 0x84, 0x53, 0x9e, 0x86, 0xc4, 0x0d, 0xe4, 0x4a, 0xdc, 0xdf, 0xb4, 0x00, 0x2d, + 0x78, 0x81, 0x4b, 0xa2, 0x13, 0xd8, 0x3a, 0x7b, 0x9b, 0x0c, 0x3f, 0xa6, 0x4d, 0x0b, 0xb7, 0x9b, + 0x61, 0x40, 0x82, 0x64, 0x21, 0x0c, 0x5c, 0xbe, 0x9d, 0x7e, 0x12, 0xfa, 0x12, 0x5a, 0x15, 0x6f, + 0xd6, 0xd3, 0xf2, 0xb3, 0xd0, 0x0a, 0x0e, 0xf6, 0xa6, 0xcf, 0xb5, 0x97, 0x60, 0x4d, 0x60, 0x65, + 0xd0, 0x27, 0x60, 0x20, 0x4e, 0x9c, 0xa4, 0x15, 0x8b, 0x86, 0x3e, 0x21, 0x1b, 0x5a, 0x67, 0xd0, + 0x83, 0xbd, 0xe9, 0x71, 0x55, 0x8c, 0x83, 0xb0, 0x28, 0x80, 0x9e, 0x81, 0xc1, 0x6d, 0x12, 0xc7, + 0xce, 0xa6, 0x5c, 0xe0, 0xc6, 0x45, 0xd9, 0xc1, 0x55, 0x0e, 0xc6, 0x12, 0x8f, 0x9e, 0x84, 0x7e, + 0x12, 0x45, 0x61, 0x24, 0x24, 0x62, 0x54, 0x10, 0xf6, 0x2f, 0x52, 0x20, 0xe6, 0x38, 0xfb, 0xbf, + 0x59, 0x30, 0xae, 0xda, 0xca, 0xeb, 0x3a, 0x81, 0x29, 0xef, 0x02, 0x34, 0x64, 0x07, 0x63, 0x36, + 0xd1, 0xb4, 0x3a, 0x3a, 0x8b, 0x5f, 0xfb, 0x80, 0xa6, 0x75, 0x28, 0x50, 0x8c, 0x35, 0xbe, 0xf6, + 0xbf, 0xb7, 0xe0, 0x74, 0xa6, 0x6f, 0x2b, 0x5e, 0x9c, 0xa0, 0x37, 0xda, 0xfa, 0x37, 0x53, 0xac, + 0x7f, 0xb4, 0x34, 0xeb, 0x9d, 0x92, 0x17, 0x09, 0xd1, 0xfa, 0x86, 0xa1, 0xdf, 0x4b, 0xc8, 0xb6, + 0xec, 0xd6, 0xf3, 0x05, 0xbb, 0xc5, 0xdb, 0x97, 0x7e, 0xa5, 0x65, 0xca, 0x03, 0x73, 0x56, 0xf6, + 0xff, 0xb6, 0xa0, 0xb2, 0x10, 0x06, 0x1b, 0xde, 0xe6, 0xaa, 0xd3, 0x3c, 0x81, 0xef, 0x53, 0x87, + 0x3e, 0xc6, 0x9d, 0x77, 0xe1, 0x72, 0x5e, 0x17, 0x44, 0xc3, 0x66, 0xe8, 0x9e, 0xca, 0x95, 0x05, + 0xb5, 0x4c, 0x51, 0x10, 0x66, 0xcc, 0xa6, 0x5e, 0x86, 0x8a, 0x22, 0x40, 0x13, 0x50, 0xbe, 0x47, + 0xb8, 0x26, 0x59, 0xc1, 0xf4, 0x27, 0x3a, 0x03, 0xfd, 0x3b, 0x8e, 0xdf, 0x12, 0x93, 0x17, 0xf3, + 0x3f, 0x9f, 0x2c, 0x5d, 0xb5, 0xec, 0xef, 0xb3, 0x19, 0x28, 0x2a, 0x59, 0x0c, 0x76, 0xc4, 0xe2, + 0xf0, 0xae, 0x05, 0x67, 0xfc, 0x0e, 0x8b, 0x92, 0x18, 0x93, 0xa3, 0x2c, 0x67, 0x8f, 0x89, 0x66, + 0x9f, 0xe9, 0x84, 0xc5, 0x1d, 0x6b, 0xa3, 0x6b, 0x7d, 0xd8, 0xa4, 0x02, 0xe7, 0xf8, 0xac, 0xe9, + 0x42, 0x07, 0xb8, 0x25, 0x60, 0x58, 0x61, 0xed, 0x3f, 0xb1, 0xe0, 0x8c, 0xea, 0xc7, 0x0d, 0xb2, + 0x5b, 0x27, 0x3e, 0x69, 0x24, 0x61, 0xf4, 0x41, 0xe9, 0xc9, 0xe3, 0xfc, 0x9b, 0xf0, 0x35, 0x69, + 0x58, 0x30, 0x28, 0xdf, 0x20, 0xbb, 0xfc, 0x03, 0xe9, 0x1d, 0x2d, 0x1f, 0xda, 0xd1, 0xdf, 0xb2, + 0x60, 0x54, 0x75, 0xf4, 0x04, 0xa6, 0xdc, 0x8a, 0x39, 0xe5, 0x3e, 0x5a, 0x50, 0x5e, 0xbb, 0x4c, + 0xb6, 0xdf, 0x2d, 0xc1, 0x59, 0x45, 0x63, 0x6c, 0x47, 0x1f, 0x90, 0xef, 0xd4, 0x5b, 0x77, 0x6f, + 0x90, 0xdd, 0xb5, 0x90, 0xea, 0x13, 0x9d, 0xbb, 0x8b, 0x2e, 0xc3, 0xb0, 0x4b, 0x36, 0x9c, 0x96, + 0x9f, 0x28, 0xb5, 0xb9, 0x9f, 0xdb, 0x53, 0xd5, 0x14, 0x8c, 0x75, 0x1a, 0x43, 0x12, 0xfa, 0x0e, + 0x95, 0x84, 0x5f, 0x19, 0x66, 0x0b, 0x57, 0xe2, 0xd0, 0xcf, 0x4b, 0x55, 0x19, 0xcd, 0x0e, 0x1a, + 0xd1, 0xed, 0x20, 0x61, 0xf3, 0x3c, 0x09, 0xfd, 0xde, 0x36, 0xdd, 0xdc, 0x4a, 0xe6, 0x9e, 0xb5, + 0x4c, 0x81, 0x98, 0xe3, 0xd0, 0x53, 0x30, 0xd8, 0x08, 0xb7, 0xb7, 0x9d, 0xc0, 0x9d, 0x2c, 0x33, + 0xe5, 0x6a, 0x98, 0xee, 0x7f, 0x0b, 0x1c, 0x84, 0x25, 0x0e, 0x3d, 0x06, 0x7d, 0x4e, 0xb4, 0x19, + 0x4f, 0xf6, 0x31, 0x9a, 0x21, 0x5a, 0xd3, 0x5c, 0xb4, 0x19, 0x63, 0x06, 0xa5, 0x4a, 0xd3, 0xfd, + 0x30, 0xba, 0xe7, 0x05, 0x9b, 0x55, 0x2f, 0x62, 0x1a, 0x90, 0xa6, 0x34, 0xdd, 0x55, 0x18, 0xac, + 0x51, 0xa1, 0x1a, 0xf4, 0x37, 0xc3, 0x28, 0x89, 0x27, 0x07, 0xd8, 0xc0, 0x3f, 0x97, 0x2b, 0x67, + 0xbc, 0xdf, 0xb5, 0x30, 0x4a, 0xd2, 0xae, 0xd0, 0x7f, 0x31, 0xe6, 0x8c, 0xd0, 0x02, 0x94, 0x49, + 0xb0, 0x33, 0x39, 0xc8, 0xf8, 0x7d, 0xe4, 0x70, 0x7e, 0x8b, 0xc1, 0xce, 0x1d, 0x27, 0x4a, 0x27, + 0xe6, 0x62, 0xb0, 0x83, 0x69, 0x69, 0xd4, 0x80, 0x8a, 0x74, 0x6a, 0xc4, 0x93, 0x43, 0x45, 0x44, + 0x11, 0x0b, 0x72, 0x4c, 0xde, 0x6e, 0x79, 0x11, 0xd9, 0x26, 0x41, 0x12, 0xa7, 0x16, 0x84, 0xc4, + 0xc6, 0x38, 0xe5, 0x8b, 0x1a, 0x30, 0xc2, 0x15, 0xad, 0xd5, 0xb0, 0x15, 0x24, 0xf1, 0x64, 0x85, + 0x35, 0x39, 0xc7, 0x44, 0xbf, 0x93, 0x96, 0x98, 0x3f, 0x23, 0xd8, 0x8f, 0x68, 0xc0, 0x18, 0x1b, + 0x4c, 0xd1, 0x1b, 0x30, 0xea, 0x7b, 0x3b, 0x24, 0x20, 0x71, 0x5c, 0x8b, 0xc2, 0x75, 0x32, 0x09, + 0xac, 0x37, 0x4f, 0xe6, 0x99, 0xab, 0xe1, 0x3a, 0x99, 0x3f, 0xb5, 0xbf, 0x37, 0x3d, 0xba, 0xa2, + 0x97, 0xc6, 0x26, 0x33, 0xf4, 0x26, 0x8c, 0x51, 0xad, 0xce, 0x4b, 0xd9, 0x0f, 0x17, 0x67, 0x8f, + 0xf6, 0xf7, 0xa6, 0xc7, 0xb0, 0x51, 0x1c, 0x67, 0xd8, 0xa1, 0x35, 0xa8, 0xf8, 0xde, 0x06, 0x69, + 0xec, 0x36, 0x7c, 0x32, 0x39, 0xc2, 0x78, 0xe7, 0x4c, 0xce, 0x15, 0x49, 0xce, 0x35, 0x69, 0xf5, + 0x17, 0xa7, 0x8c, 0xd0, 0x1d, 0x38, 0x97, 0x90, 0x68, 0xdb, 0x0b, 0x1c, 0x3a, 0xa9, 0x84, 0x9a, + 0xc7, 0x7c, 0x02, 0xa3, 0x4c, 0x6a, 0xcf, 0x8b, 0x81, 0x3d, 0xb7, 0xd6, 0x91, 0x0a, 0x77, 0x29, + 0x8d, 0x6e, 0xc1, 0x38, 0x9b, 0x4f, 0xb5, 0x96, 0xef, 0xd7, 0x42, 0xdf, 0x6b, 0xec, 0x4e, 0x8e, + 0x31, 0x86, 0x4f, 0x49, 0x4b, 0x7f, 0xd9, 0x44, 0x53, 0x0b, 0x28, 0xfd, 0x87, 0xb3, 0xa5, 0x91, + 0x0f, 0xe3, 0x31, 0x69, 0xb4, 0x22, 0x2f, 0xd9, 0xa5, 0xb2, 0x4f, 0x1e, 0x24, 0x93, 0xe3, 0x45, + 0x2c, 0xba, 0xba, 0x59, 0x88, 0xbb, 0x59, 0x32, 0x40, 0x9c, 0x65, 0x4d, 0x97, 0x8a, 0x38, 0x71, + 0xbd, 0x60, 0x72, 0x82, 0xad, 0x40, 0x6a, 0x7e, 0xd5, 0x29, 0x10, 0x73, 0x1c, 0x33, 0x94, 0xe9, + 0x8f, 0x5b, 0x74, 0x95, 0x3e, 0xc5, 0x08, 0x53, 0x43, 0x59, 0x22, 0x70, 0x4a, 0x43, 0xf7, 0xc0, + 0x24, 0xd9, 0x9d, 0x44, 0x8c, 0x54, 0x4d, 0xb5, 0xb5, 0xb5, 0xcf, 0x61, 0x0a, 0x47, 0x77, 0x60, + 0x90, 0x04, 0x3b, 0x4b, 0x51, 0xb8, 0x3d, 0x79, 0xba, 0xc8, 0x1a, 0xb0, 0xc8, 0x89, 0xf9, 0xfe, + 0x91, 0xea, 0xea, 0x02, 0x8c, 0x25, 0x33, 0xf4, 0x00, 0x26, 0x3b, 0x7c, 0x25, 0xfe, 0x51, 0xce, + 0xb0, 0x8f, 0xf2, 0x29, 0x51, 0x76, 0x72, 0xad, 0x0b, 0xdd, 0xc1, 0x21, 0x38, 0xdc, 0x95, 0xbb, + 0xbd, 0x0e, 0x63, 0x6a, 0xa1, 0x62, 0xdf, 0x1b, 0x4d, 0x43, 0x3f, 0x5d, 0x8b, 0xa5, 0xe5, 0x5a, + 0xa1, 0x83, 0x4a, 0x97, 0xe8, 0x18, 0x73, 0x38, 0x1b, 0x54, 0xef, 0x1d, 0x32, 0xbf, 0x9b, 0x10, + 0x6e, 0xc1, 0x94, 0xb5, 0x41, 0x95, 0x08, 0x9c, 0xd2, 0xd8, 0xff, 0x97, 0xeb, 0x03, 0xe9, 0x6a, + 0x58, 0x60, 0x27, 0xb8, 0x04, 0x43, 0x5b, 0x61, 0x9c, 0x50, 0x6a, 0x56, 0x47, 0x7f, 0xaa, 0x01, + 0x5c, 0x17, 0x70, 0xac, 0x28, 0xd0, 0x2b, 0x30, 0xda, 0xd0, 0x2b, 0x10, 0xdb, 0xd8, 0x59, 0x51, + 0xc4, 0xac, 0x1d, 0x9b, 0xb4, 0xe8, 0x2a, 0x0c, 0x31, 0x77, 0x6e, 0x23, 0xf4, 0x85, 0xad, 0x24, + 0x77, 0xe5, 0xa1, 0x9a, 0x80, 0x1f, 0x68, 0xbf, 0xb1, 0xa2, 0xa6, 0x16, 0x27, 0x6d, 0xc2, 0x72, + 0x4d, 0x6c, 0x20, 0xca, 0xe2, 0xbc, 0xce, 0xa0, 0x58, 0x60, 0xed, 0x7f, 0x5e, 0xd2, 0x46, 0x99, + 0x6a, 0xfa, 0x04, 0x7d, 0x1e, 0x06, 0xef, 0x3b, 0x5e, 0xe2, 0x05, 0x9b, 0x42, 0x7b, 0x78, 0xa1, + 0xe0, 0x6e, 0xc2, 0x8a, 0xdf, 0xe5, 0x45, 0xf9, 0xce, 0x27, 0xfe, 0x60, 0xc9, 0x90, 0xf2, 0x8e, + 0x5a, 0x41, 0x40, 0x79, 0x97, 0x7a, 0xe7, 0x8d, 0x79, 0x51, 0xce, 0x5b, 0xfc, 0xc1, 0x92, 0x21, + 0xda, 0x00, 0x90, 0xb2, 0x44, 0x5c, 0xe1, 0x46, 0xfd, 0x78, 0x2f, 0xec, 0xd7, 0x54, 0xe9, 0xf9, + 0x31, 0xba, 0xd7, 0xa6, 0xff, 0xb1, 0xc6, 0xd9, 0x4e, 0x98, 0x12, 0xd6, 0xde, 0x2c, 0xf4, 0x05, + 0x3a, 0xa5, 0x9d, 0x28, 0x21, 0xee, 0x5c, 0x92, 0xf5, 0x44, 0x1f, 0xae, 0x4b, 0xae, 0x79, 0xdb, + 0x44, 0x9f, 0xfe, 0x82, 0x09, 0x4e, 0xf9, 0xd9, 0xdf, 0x29, 0xc3, 0x64, 0xb7, 0xe6, 0x52, 0x91, + 0x24, 0x0f, 0xbc, 0x64, 0x81, 0xaa, 0x49, 0x96, 0x29, 0x92, 0x8b, 0x02, 0x8e, 0x15, 0x05, 0x95, + 0x8d, 0xd8, 0xdb, 0x94, 0x56, 0x41, 0x7f, 0x2a, 0x1b, 0x75, 0x06, 0xc5, 0x02, 0x4b, 0xe9, 0x22, + 0xe2, 0xc4, 0xc2, 0x8b, 0xaf, 0xc9, 0x10, 0x66, 0x50, 0x2c, 0xb0, 0xba, 0xe5, 0xdf, 0x97, 0x63, + 0xf9, 0x1b, 0x43, 0xd4, 0xff, 0x70, 0x87, 0x08, 0x7d, 0x11, 0x60, 0xc3, 0x0b, 0xbc, 0x78, 0x8b, + 0x71, 0x1f, 0xe8, 0x99, 0xbb, 0x52, 0xb2, 0x96, 0x14, 0x17, 0xac, 0x71, 0x44, 0x2f, 0xc1, 0xb0, + 0x9a, 0x9e, 0xcb, 0xd5, 0xc9, 0x41, 0xd3, 0xf3, 0x9b, 0xae, 0x55, 0x55, 0xac, 0xd3, 0xd9, 0x5f, + 0xca, 0xca, 0x8b, 0x98, 0x15, 0xda, 0xf8, 0x5a, 0x45, 0xc7, 0xb7, 0x74, 0xf8, 0xf8, 0xda, 0xff, + 0xb5, 0x0c, 0xe3, 0x46, 0x65, 0xad, 0xb8, 0xc0, 0x8a, 0xf6, 0x1a, 0xdd, 0xb0, 0x9c, 0x84, 0x88, + 0x39, 0x79, 0xa9, 0x97, 0x49, 0xa3, 0x6f, 0x6f, 0x74, 0x2e, 0x70, 0x4e, 0x68, 0x0b, 0x2a, 0xbe, + 0x13, 0x33, 0xdf, 0x01, 0x11, 0x73, 0xb1, 0x37, 0xb6, 0xa9, 0xf9, 0xe1, 0xc4, 0x89, 0xb6, 0x7b, + 0xf0, 0x5a, 0x52, 0xe6, 0x74, 0xb7, 0xa5, 0xca, 0x8e, 0x3c, 0x3a, 0x52, 0xcd, 0xa1, 0x1a, 0xd1, + 0x2e, 0xe6, 0x38, 0x74, 0x15, 0x46, 0x22, 0xc2, 0x24, 0x65, 0x81, 0xea, 0x73, 0x4c, 0xf4, 0xfa, + 0x53, 0xc5, 0x0f, 0x6b, 0x38, 0x6c, 0x50, 0xa6, 0x7a, 0xff, 0xc0, 0x21, 0x7a, 0xff, 0x33, 0x30, + 0xc8, 0x7e, 0x28, 0xa9, 0x50, 0x5f, 0x68, 0x99, 0x83, 0xb1, 0xc4, 0x67, 0x85, 0x68, 0xa8, 0xa0, + 0x10, 0x3d, 0x0b, 0x63, 0x55, 0x87, 0x6c, 0x87, 0xc1, 0x62, 0xe0, 0x36, 0x43, 0x2f, 0x48, 0xd0, + 0x24, 0xf4, 0xb1, 0xfd, 0x84, 0xcf, 0xf7, 0x3e, 0xca, 0x01, 0xf7, 0x51, 0xdd, 0xdd, 0xfe, 0x7f, + 0x16, 0x8c, 0x56, 0x89, 0x4f, 0x12, 0xc2, 0xed, 0x9e, 0x18, 0x2d, 0x01, 0xda, 0x8c, 0x9c, 0x06, + 0xa9, 0x91, 0xc8, 0x0b, 0xdd, 0x3a, 0x69, 0x84, 0x01, 0x3b, 0x71, 0xa1, 0x1b, 0xe4, 0xb9, 0xfd, + 0xbd, 0x69, 0x74, 0xad, 0x0d, 0x8b, 0x3b, 0x94, 0x40, 0x2e, 0x8c, 0x36, 0x23, 0x62, 0x38, 0xc8, + 0xac, 0x7c, 0x55, 0xa3, 0xa6, 0x17, 0xe1, 0xda, 0xb0, 0x01, 0xc2, 0x26, 0x53, 0xf4, 0x19, 0x98, + 0x08, 0xa3, 0xe6, 0x96, 0x13, 0x54, 0x49, 0x93, 0x04, 0x2e, 0x35, 0x01, 0x84, 0x59, 0x7f, 0x66, + 0x7f, 0x6f, 0x7a, 0xe2, 0x56, 0x06, 0x87, 0xdb, 0xa8, 0xed, 0x5f, 0x2b, 0xc1, 0xd9, 0x6a, 0x78, + 0x3f, 0xb8, 0xef, 0x44, 0xee, 0x5c, 0x6d, 0x99, 0xeb, 0xf5, 0xcc, 0xbb, 0x2c, 0xbd, 0xda, 0x56, + 0x57, 0xaf, 0xf6, 0x17, 0x60, 0x68, 0xc3, 0x23, 0xbe, 0x8b, 0xc9, 0x86, 0xe8, 0xde, 0xe5, 0x22, + 0x6e, 0xff, 0x25, 0x5a, 0x46, 0xfa, 0x4d, 0xb8, 0xd5, 0xb9, 0x24, 0xd8, 0x60, 0xc5, 0x10, 0xb5, + 0x60, 0x42, 0x1a, 0x2e, 0x12, 0x2b, 0x66, 0xc7, 0x0b, 0xc5, 0xec, 0x22, 0xb3, 0x1a, 0x36, 0x1e, + 0x38, 0xc3, 0x10, 0xb7, 0x55, 0x41, 0x0d, 0xce, 0x6d, 0xba, 0x37, 0xf4, 0x31, 0x59, 0x61, 0x06, + 0x27, 0xb3, 0x9d, 0x19, 0xd4, 0xfe, 0x87, 0x16, 0x3c, 0xd2, 0x36, 0x5a, 0xc2, 0xb1, 0xf0, 0xba, + 0xb4, 0xe8, 0xf9, 0xf1, 0x5c, 0x4e, 0x2b, 0x3b, 0x8e, 0x79, 0x31, 0xeb, 0xbe, 0x94, 0x6f, 0xdd, + 0xdb, 0xb7, 0xe0, 0xcc, 0xe2, 0x76, 0x33, 0xd9, 0xad, 0x7a, 0xa6, 0x33, 0xfe, 0x65, 0x18, 0xd8, + 0x26, 0xae, 0xd7, 0xda, 0x16, 0x9f, 0x75, 0x5a, 0x2e, 0xa4, 0xab, 0x0c, 0x7a, 0xb0, 0x37, 0x3d, + 0x5a, 0x4f, 0xc2, 0xc8, 0xd9, 0x24, 0x1c, 0x80, 0x05, 0xb9, 0xfd, 0x9e, 0x05, 0xe3, 0x72, 0x42, + 0xcd, 0xb9, 0x6e, 0x44, 0xe2, 0x18, 0x4d, 0x41, 0xc9, 0x6b, 0x0a, 0x46, 0x20, 0x18, 0x95, 0x96, + 0x6b, 0xb8, 0xe4, 0x35, 0xd1, 0xe7, 0xa1, 0xc2, 0xcf, 0x70, 0x52, 0xe1, 0xe8, 0xf1, 0x4c, 0x88, + 0x19, 0x53, 0x6b, 0x92, 0x07, 0x4e, 0xd9, 0x49, 0xb5, 0x92, 0x2d, 0xd5, 0x65, 0xf3, 0x44, 0xe1, + 0xba, 0x80, 0x63, 0x45, 0x81, 0x2e, 0xc2, 0x50, 0x10, 0xba, 0xfc, 0x98, 0x8d, 0x6f, 0xba, 0x4c, + 0xe4, 0x6e, 0x0a, 0x18, 0x56, 0x58, 0xfb, 0x6b, 0x16, 0x8c, 0xc8, 0x3e, 0x16, 0xd4, 0x70, 0xe9, + 0x24, 0x49, 0xb5, 0xdb, 0x74, 0x92, 0x50, 0x0d, 0x95, 0x61, 0x0c, 0xc5, 0xb4, 0xdc, 0x8b, 0x62, + 0x6a, 0xff, 0x66, 0x09, 0xc6, 0x64, 0x73, 0xea, 0xad, 0xf5, 0x98, 0xd0, 0x7d, 0xbb, 0xe2, 0xf0, + 0xc1, 0x27, 0x52, 0xce, 0x9e, 0xcf, 0x33, 0x5e, 0x8c, 0x6f, 0x96, 0xea, 0x05, 0x73, 0x92, 0x0f, + 0x4e, 0x59, 0xa2, 0x1d, 0x38, 0x15, 0x84, 0x09, 0xdb, 0x0f, 0x14, 0xbe, 0x98, 0x0f, 0x3c, 0x5b, + 0xcf, 0xa3, 0xa2, 0x9e, 0x53, 0x37, 0xb3, 0xfc, 0x70, 0x7b, 0x15, 0xe8, 0x96, 0x74, 0xca, 0x94, + 0x59, 0x5d, 0xcf, 0x16, 0xab, 0xab, 0xbb, 0x4f, 0xc6, 0xfe, 0x81, 0x05, 0x15, 0x49, 0x76, 0x12, + 0x87, 0x21, 0x77, 0x61, 0x30, 0x66, 0x9f, 0x48, 0x0e, 0xd7, 0xa5, 0x62, 0x5d, 0xe0, 0xdf, 0x35, + 0xdd, 0x04, 0xf9, 0xff, 0x18, 0x4b, 0x6e, 0xcc, 0x0d, 0xab, 0x3a, 0xf2, 0x81, 0x73, 0xc3, 0xaa, + 0x96, 0x75, 0x3f, 0xf3, 0x18, 0x35, 0xcc, 0x67, 0xaa, 0xc9, 0x35, 0x23, 0xb2, 0xe1, 0x3d, 0xc8, + 0x6a, 0x72, 0x35, 0x06, 0xc5, 0x02, 0x8b, 0x36, 0x60, 0xa4, 0x21, 0xfd, 0xb7, 0xe9, 0x12, 0xf2, + 0xb1, 0x82, 0x5e, 0x61, 0x75, 0xc0, 0xc0, 0x83, 0x56, 0x16, 0x34, 0x4e, 0xd8, 0xe0, 0x4b, 0xd7, + 0xa9, 0xf4, 0x0c, 0xb5, 0x5c, 0xd0, 0xd3, 0x11, 0x91, 0x24, 0xad, 0xa1, 0xeb, 0xf1, 0xa9, 0xfd, + 0x4d, 0x0b, 0x06, 0xb8, 0xc3, 0xaf, 0x98, 0xd7, 0x54, 0x3b, 0x3a, 0x49, 0xc7, 0xf3, 0x0e, 0x05, + 0x8a, 0x93, 0x14, 0x74, 0x17, 0x2a, 0xec, 0x07, 0x73, 0x5e, 0x94, 0x8b, 0x44, 0xf0, 0xf0, 0xfa, + 0xf5, 0xa6, 0xde, 0x91, 0x0c, 0x70, 0xca, 0xcb, 0xfe, 0x5e, 0x99, 0x2e, 0x7d, 0x29, 0xa9, 0xb1, + 0xb7, 0x5b, 0x27, 0xb1, 0xb7, 0x97, 0x8e, 0x7f, 0x6f, 0x7f, 0x1b, 0xc6, 0x1b, 0xda, 0xd1, 0x4d, + 0xfa, 0xc5, 0xaf, 0x14, 0x14, 0x2b, 0xed, 0xbc, 0x87, 0x3b, 0xb8, 0x16, 0x4c, 0x76, 0x38, 0xcb, + 0x1f, 0x11, 0x18, 0xe1, 0xf2, 0x20, 0xea, 0xeb, 0x63, 0xf5, 0xcd, 0x16, 0x91, 0x30, 0xbd, 0x32, + 0x26, 0xc5, 0x75, 0x8d, 0x11, 0x36, 0xd8, 0xda, 0x7f, 0xab, 0x1f, 0xfa, 0x17, 0x77, 0x48, 0x90, + 0x9c, 0xc0, 0x52, 0xb7, 0x0d, 0x63, 0x5e, 0xb0, 0x13, 0xfa, 0x3b, 0xc4, 0xe5, 0xf8, 0xa3, 0x6d, + 0xef, 0xe7, 0x44, 0x25, 0x63, 0xcb, 0x06, 0x33, 0x9c, 0x61, 0x7e, 0x1c, 0xa6, 0xf5, 0x6b, 0x30, + 0xc0, 0x25, 0x43, 0xd8, 0xd5, 0x39, 0x0e, 0x70, 0x36, 0xb0, 0x62, 0x06, 0xa5, 0x0e, 0x00, 0xee, + 0x7b, 0x17, 0x8c, 0xd0, 0x97, 0x60, 0x6c, 0xc3, 0x8b, 0xe2, 0x84, 0x5a, 0xc7, 0x71, 0xe2, 0x6c, + 0x37, 0x8f, 0x60, 0x54, 0xab, 0x11, 0x59, 0x32, 0x38, 0xe1, 0x0c, 0x67, 0xb4, 0x09, 0xa3, 0xd4, + 0xa6, 0x4b, 0xab, 0x1a, 0xec, 0xb9, 0x2a, 0xe5, 0x53, 0x5b, 0xd1, 0x19, 0x61, 0x93, 0x2f, 0x5d, + 0x92, 0x1a, 0xcc, 0x06, 0x1c, 0x62, 0xda, 0x8d, 0x5a, 0x92, 0xb8, 0xf1, 0xc7, 0x71, 0x74, 0x65, + 0x63, 0x31, 0x14, 0x15, 0x73, 0x65, 0x4b, 0x23, 0x25, 0xec, 0x6f, 0xd3, 0xbd, 0x98, 0x8e, 0xe1, + 0x09, 0x6c, 0x5f, 0xd7, 0xcd, 0xed, 0xeb, 0xc9, 0x02, 0x5f, 0xb6, 0xcb, 0xd6, 0xf5, 0x16, 0x0c, + 0x6b, 0x1f, 0x1e, 0xcd, 0x42, 0xa5, 0x21, 0x8f, 0xf9, 0xc5, 0x2a, 0xae, 0x54, 0x29, 0x75, 0xfe, + 0x8f, 0x53, 0x1a, 0x3a, 0x2e, 0x54, 0x05, 0xcd, 0x06, 0x05, 0x51, 0x05, 0x15, 0x33, 0x8c, 0xfd, + 0x02, 0xc0, 0xe2, 0x03, 0xd2, 0x98, 0x6b, 0xb0, 0x58, 0x14, 0xed, 0x40, 0xcc, 0xea, 0x7e, 0x20, + 0x66, 0x7f, 0xcb, 0x82, 0xb1, 0xa5, 0x05, 0x43, 0xa7, 0x9f, 0x01, 0xe0, 0xba, 0xf1, 0xdd, 0xbb, + 0x37, 0xa5, 0xc3, 0x97, 0x7b, 0xe5, 0x14, 0x14, 0x6b, 0x14, 0xe8, 0x51, 0x28, 0xfb, 0xad, 0x40, + 0xa8, 0xac, 0x83, 0xfb, 0x7b, 0xd3, 0xe5, 0x95, 0x56, 0x80, 0x29, 0x4c, 0x8b, 0xbe, 0x29, 0x17, + 0x8e, 0xbe, 0xc9, 0x8f, 0x43, 0xfd, 0x46, 0x19, 0x26, 0x96, 0x7c, 0xf2, 0xc0, 0x68, 0xf5, 0xd3, + 0x30, 0xe0, 0x46, 0xde, 0x0e, 0x89, 0xb2, 0x8a, 0x40, 0x95, 0x41, 0xb1, 0xc0, 0x16, 0x0e, 0x08, + 0x7a, 0xb3, 0x7d, 0x23, 0x3f, 0xbe, 0x60, 0xa8, 0xdc, 0x3e, 0xa3, 0x0d, 0x18, 0xe4, 0x07, 0xa8, + 0xf1, 0x64, 0x3f, 0x13, 0xc5, 0x57, 0x0e, 0x6f, 0x4c, 0x76, 0x7c, 0x66, 0x84, 0x43, 0x82, 0x87, + 0x62, 0xa8, 0xb5, 0x4c, 0x40, 0xb1, 0x64, 0x3e, 0xf5, 0x49, 0x18, 0xd1, 0x29, 0x7b, 0x8a, 0xc9, + 0xf8, 0x05, 0x0b, 0x4e, 0x2f, 0xf9, 0x61, 0xe3, 0x5e, 0x26, 0x62, 0xeb, 0x25, 0x18, 0xa6, 0x93, + 0x29, 0x36, 0xc2, 0x19, 0x8d, 0xb8, 0x4d, 0x81, 0xc2, 0x3a, 0x9d, 0x56, 0xec, 0xf6, 0xed, 0xe5, + 0x6a, 0xa7, 0x70, 0x4f, 0x81, 0xc2, 0x3a, 0x9d, 0xfd, 0x7b, 0x16, 0x3c, 0x7e, 0x6d, 0x61, 0xb1, + 0x46, 0xa2, 0xd8, 0x8b, 0x13, 0x12, 0x24, 0x6d, 0x11, 0xa7, 0x54, 0x67, 0x74, 0xb5, 0xa6, 0xa4, + 0x3a, 0x63, 0x95, 0xb5, 0x42, 0x60, 0x3f, 0x28, 0x61, 0xd7, 0xdf, 0xb4, 0xe0, 0xf4, 0x35, 0x2f, + 0xc1, 0xa4, 0x19, 0x66, 0x83, 0x44, 0x23, 0xd2, 0x0c, 0x63, 0x2f, 0x09, 0xa3, 0xdd, 0x6c, 0x90, + 0x28, 0x56, 0x18, 0xac, 0x51, 0xf1, 0x9a, 0x77, 0xbc, 0x98, 0xb6, 0xb4, 0x64, 0x9a, 0xba, 0x58, + 0xc0, 0xb1, 0xa2, 0xa0, 0x1d, 0x73, 0xbd, 0x88, 0xa9, 0x0c, 0xbb, 0x62, 0x06, 0xab, 0x8e, 0x55, + 0x25, 0x02, 0xa7, 0x34, 0xf6, 0xdf, 0xb1, 0xe0, 0xec, 0x35, 0xbf, 0x15, 0x27, 0x24, 0xda, 0x88, + 0x8d, 0xc6, 0xbe, 0x00, 0x15, 0x22, 0x95, 0x7b, 0xd1, 0x56, 0xb5, 0x69, 0x28, 0xad, 0x9f, 0x47, + 0xa8, 0x2a, 0xba, 0x02, 0x81, 0x90, 0xbd, 0x85, 0xed, 0xfd, 0x56, 0x09, 0x46, 0xaf, 0xaf, 0xad, + 0xd5, 0xae, 0x91, 0x44, 0xac, 0x92, 0xf9, 0x4e, 0xa9, 0x9a, 0x66, 0x91, 0x6b, 0x7b, 0x4b, 0x66, + 0xd6, 0xb5, 0x12, 0xcf, 0x9f, 0xe1, 0x17, 0x02, 0x66, 0x96, 0x83, 0xe4, 0x56, 0x54, 0x4f, 0x22, + 0x2f, 0xd8, 0xec, 0x68, 0xc1, 0xcb, 0x95, 0xbc, 0xdc, 0x6d, 0x25, 0x47, 0x2f, 0xc0, 0x00, 0xbb, + 0xc3, 0x20, 0x55, 0x8f, 0x0f, 0x2b, 0x2d, 0x81, 0x41, 0x0f, 0xf6, 0xa6, 0x2b, 0xb7, 0xf1, 0x32, + 0xff, 0x83, 0x05, 0x29, 0x7a, 0x13, 0x86, 0xb7, 0x92, 0xa4, 0x79, 0x9d, 0x38, 0x2e, 0x89, 0xe4, + 0x2a, 0x71, 0xf1, 0xf0, 0x55, 0x82, 0x0e, 0x06, 0x2f, 0x90, 0x4e, 0xac, 0x14, 0x16, 0x63, 0x9d, + 0xa3, 0x5d, 0x07, 0x48, 0x71, 0x0f, 0xc9, 0x02, 0xb1, 0x7f, 0xbe, 0x04, 0x83, 0xd7, 0x9d, 0xc0, + 0xf5, 0x49, 0x84, 0x96, 0xa0, 0x8f, 0x3c, 0x20, 0x0d, 0xb1, 0x8d, 0xe7, 0x34, 0x3d, 0xdd, 0xea, + 0xb8, 0x57, 0x8d, 0xfe, 0xc7, 0xac, 0x3c, 0xc2, 0x30, 0x48, 0xdb, 0x7d, 0x4d, 0x45, 0x0f, 0x3f, + 0x97, 0x3f, 0x0a, 0x4a, 0x24, 0xf8, 0x3e, 0x29, 0x40, 0x58, 0x32, 0x62, 0xfe, 0xa7, 0x46, 0xb3, + 0x4e, 0x17, 0xb7, 0xa4, 0x98, 0x5d, 0xb7, 0xb6, 0x50, 0xe3, 0xe4, 0x82, 0x2f, 0xf7, 0x3f, 0x49, + 0x20, 0x4e, 0xd9, 0xd9, 0x57, 0xe1, 0x0c, 0x3b, 0xbe, 0x74, 0x92, 0x2d, 0x63, 0xce, 0xe4, 0x0a, + 0xa7, 0xfd, 0xf7, 0x4a, 0x70, 0x6a, 0xb9, 0xbe, 0x50, 0x37, 0x3d, 0x87, 0x57, 0x61, 0x84, 0x6f, + 0xcf, 0x54, 0xe8, 0x1c, 0x5f, 0x94, 0x57, 0x2e, 0xf7, 0x35, 0x0d, 0x87, 0x0d, 0x4a, 0xf4, 0x38, + 0x94, 0xbd, 0xb7, 0x83, 0x6c, 0xb4, 0xd7, 0xf2, 0x6b, 0x37, 0x31, 0x85, 0x53, 0x34, 0xdd, 0xe9, + 0xf9, 0x12, 0xa7, 0xd0, 0x6a, 0xb7, 0x7f, 0x15, 0xc6, 0xbc, 0xb8, 0x11, 0x7b, 0xcb, 0x01, 0x9d, + 0xff, 0x4e, 0x43, 0x8a, 0x6f, 0xaa, 0x9a, 0xd3, 0xa6, 0x2a, 0x2c, 0xce, 0x50, 0x6b, 0xeb, 0x6d, + 0x7f, 0x61, 0x6d, 0x21, 0x3f, 0x8c, 0xf8, 0x4b, 0x50, 0x51, 0xe1, 0x4e, 0x32, 0x9c, 0xcd, 0xea, + 0x12, 0xce, 0x96, 0xbf, 0xe0, 0x48, 0x7f, 0x6e, 0xb9, 0xa3, 0x3f, 0xf7, 0x9f, 0x58, 0x90, 0xc6, + 0x6b, 0x20, 0x0c, 0x95, 0x66, 0xc8, 0x0e, 0x4b, 0x22, 0x79, 0x2a, 0xf9, 0x54, 0x8e, 0x24, 0xf2, + 0x99, 0xc0, 0x65, 0xa5, 0x26, 0xcb, 0xe2, 0x94, 0x0d, 0x5a, 0x81, 0xc1, 0x66, 0x44, 0xea, 0x09, + 0x8b, 0x45, 0xef, 0x81, 0x23, 0x93, 0xea, 0x1a, 0x2f, 0x89, 0x25, 0x0b, 0xfb, 0x5f, 0x5b, 0x00, + 0x2b, 0xde, 0xb6, 0x97, 0x60, 0x27, 0xd8, 0x24, 0x27, 0x60, 0xec, 0xdd, 0x84, 0xbe, 0xb8, 0x49, + 0x1a, 0xc5, 0x8e, 0xbb, 0xd2, 0x96, 0xd5, 0x9b, 0xa4, 0x91, 0x7e, 0x0e, 0xfa, 0x0f, 0x33, 0x3e, + 0xf6, 0x3f, 0x05, 0x18, 0x4b, 0xc9, 0xa8, 0xc2, 0x8d, 0x9e, 0x37, 0x82, 0xb0, 0x1f, 0xcd, 0x04, + 0x61, 0x57, 0x18, 0xb5, 0x16, 0x77, 0x9d, 0x40, 0x79, 0xdb, 0x79, 0x20, 0xf4, 0xfb, 0x97, 0x8a, + 0x36, 0x88, 0xd6, 0x34, 0xb3, 0xea, 0x3c, 0xe0, 0xea, 0xd4, 0x73, 0x52, 0x90, 0x56, 0x9d, 0x07, + 0x07, 0xfc, 0x50, 0x8b, 0xcd, 0x44, 0x6a, 0x50, 0x7c, 0xf5, 0xbf, 0xa7, 0xff, 0xd9, 0xe2, 0x48, + 0xab, 0x63, 0xb5, 0x7a, 0x81, 0x70, 0x4f, 0xf6, 0x58, 0xab, 0x17, 0x64, 0x6b, 0xf5, 0x82, 0x02, + 0xb5, 0x7a, 0x01, 0x7a, 0xd7, 0x82, 0x41, 0xe1, 0xd5, 0x67, 0x11, 0x70, 0xc3, 0x57, 0x3e, 0xd1, + 0x53, 0xd5, 0xe2, 0x78, 0x80, 0x57, 0x3f, 0x2b, 0x75, 0x48, 0x01, 0xcd, 0x6d, 0x82, 0xac, 0x1a, + 0xfd, 0xaa, 0x05, 0x63, 0xe2, 0x37, 0x26, 0x6f, 0xb7, 0x48, 0x9c, 0x88, 0xdd, 0xea, 0x33, 0x47, + 0x69, 0x8d, 0x60, 0xc1, 0x1b, 0xf5, 0x71, 0xb9, 0xd4, 0x98, 0xc8, 0xdc, 0xb6, 0x65, 0xda, 0x83, + 0xbe, 0x6b, 0xc1, 0x99, 0x6d, 0xe7, 0x01, 0xaf, 0x91, 0xc3, 0xb0, 0x93, 0x78, 0xa1, 0x88, 0xf2, + 0x5b, 0xea, 0x55, 0x4e, 0xda, 0x18, 0xf1, 0xe6, 0xca, 0x00, 0x9e, 0x33, 0x9d, 0x48, 0x72, 0x1b, + 0xdd, 0xb1, 0x85, 0x53, 0x2e, 0x0c, 0x49, 0xc1, 0xec, 0xa0, 0xbd, 0xcf, 0xeb, 0x9b, 0xf2, 0xe1, + 0x33, 0x50, 0xfa, 0xbb, 0x66, 0x5e, 0x6b, 0x39, 0x41, 0xe2, 0x25, 0xbb, 0x9a, 0xae, 0xcf, 0x6a, + 0x11, 0x82, 0x78, 0x8c, 0xb5, 0x6c, 0xc1, 0x88, 0x2e, 0x73, 0xc7, 0x58, 0x53, 0x08, 0xa7, 0x3b, + 0xc8, 0xd3, 0x31, 0x56, 0xd8, 0x82, 0x47, 0xbb, 0xca, 0xc5, 0xf1, 0x55, 0x6b, 0xff, 0x2b, 0x4b, + 0x5f, 0x30, 0x4f, 0xc0, 0x83, 0xb2, 0x6a, 0x7a, 0x50, 0x2e, 0x16, 0x9d, 0x39, 0x5d, 0xdc, 0x28, + 0x1b, 0x7a, 0xf3, 0xe9, 0x46, 0x80, 0xd6, 0x60, 0xc0, 0xa7, 0x10, 0x79, 0x80, 0x75, 0xa9, 0x97, + 0xb9, 0x99, 0xea, 0x18, 0x0c, 0x1e, 0x63, 0xc1, 0xcb, 0xfe, 0xae, 0x05, 0x7d, 0x3f, 0xc5, 0x8b, + 0x21, 0x6d, 0xac, 0xc5, 0xdd, 0xe6, 0x19, 0xec, 0xdc, 0x5f, 0x7c, 0x90, 0x90, 0x20, 0x66, 0x2a, + 0x65, 0xc7, 0x21, 0xfa, 0xb5, 0x12, 0x0c, 0xd3, 0xaa, 0x64, 0x08, 0xc2, 0x2b, 0x30, 0xea, 0x3b, + 0xeb, 0xc4, 0x97, 0xde, 0xdf, 0xac, 0xf9, 0xb5, 0xa2, 0x23, 0xb1, 0x49, 0x4b, 0x0b, 0x6f, 0xe8, + 0xce, 0x71, 0xa1, 0x1a, 0xa9, 0xc2, 0x86, 0xe7, 0x1c, 0x9b, 0xb4, 0xd4, 0x02, 0xb8, 0xef, 0x24, + 0x8d, 0x2d, 0x61, 0x9a, 0xa9, 0xe6, 0xde, 0xa5, 0x40, 0xcc, 0x71, 0x68, 0x0e, 0xc6, 0xa5, 0xc4, + 0xde, 0xa1, 0x36, 0x7b, 0x18, 0x08, 0xb5, 0x51, 0x5d, 0x2e, 0xc5, 0x26, 0x1a, 0x67, 0xe9, 0xd1, + 0x27, 0x61, 0x8c, 0x0e, 0x4e, 0xd8, 0x4a, 0x64, 0x80, 0x45, 0x3f, 0x0b, 0xb0, 0x60, 0xf1, 0xb9, + 0x6b, 0x06, 0x06, 0x67, 0x28, 0xed, 0x37, 0xe1, 0xf4, 0x4a, 0xe8, 0xb8, 0xf3, 0x8e, 0xef, 0x04, + 0x0d, 0x12, 0x2d, 0x07, 0x9b, 0xb9, 0x67, 0xd1, 0xfa, 0x79, 0x71, 0x29, 0xef, 0xbc, 0xd8, 0x8e, + 0x00, 0xe9, 0x15, 0x88, 0xd0, 0xa0, 0x37, 0x60, 0xd0, 0xe3, 0x55, 0x09, 0xb1, 0xbd, 0x9c, 0xe7, + 0x5c, 0x6a, 0x6b, 0xa3, 0x16, 0xea, 0xc2, 0x01, 0x58, 0xb2, 0xa4, 0x16, 0x45, 0x27, 0x6f, 0x54, + 0xbe, 0xd1, 0x66, 0xff, 0x65, 0x0b, 0xc6, 0x6f, 0x66, 0x6e, 0x2e, 0x3e, 0x0d, 0x03, 0x31, 0x89, + 0x3a, 0xb8, 0xd6, 0xea, 0x0c, 0x8a, 0x05, 0xf6, 0xa1, 0x9b, 0xeb, 0xbf, 0x5c, 0x82, 0x0a, 0x0b, + 0x32, 0x6d, 0x52, 0xeb, 0xe0, 0xf8, 0x95, 0xd3, 0x55, 0x43, 0x39, 0xcd, 0x31, 0x1a, 0x55, 0xc3, + 0xba, 0xe9, 0xa6, 0xe8, 0xb6, 0xba, 0xd1, 0x57, 0xc8, 0x5e, 0x4c, 0x19, 0xf2, 0x5b, 0x5f, 0x63, + 0xe6, 0x05, 0x40, 0x79, 0xdb, 0x8f, 0x9d, 0xe0, 0x2a, 0xda, 0x0f, 0xdc, 0x09, 0xae, 0x6a, 0x59, + 0x97, 0xc5, 0xa9, 0xa6, 0x35, 0x9e, 0x2d, 0xdf, 0x9f, 0x66, 0xa1, 0x83, 0x8e, 0xef, 0xbd, 0x43, + 0xd4, 0xc5, 0xd8, 0x69, 0x11, 0x0a, 0x28, 0xa0, 0x07, 0x6c, 0x9d, 0x11, 0xff, 0xf8, 0xbd, 0xe7, + 0xb4, 0x88, 0x7d, 0x1d, 0xc6, 0x33, 0x43, 0x87, 0x5e, 0x82, 0xfe, 0xe6, 0x96, 0x13, 0x93, 0x4c, + 0x50, 0x4a, 0x7f, 0x8d, 0x02, 0x0f, 0xf6, 0xa6, 0xc7, 0x54, 0x01, 0x06, 0xc1, 0x9c, 0xda, 0x7e, + 0xb7, 0x04, 0x7d, 0x37, 0x43, 0xf7, 0x24, 0x44, 0xed, 0xba, 0x21, 0x6a, 0x4f, 0xe7, 0x67, 0x4d, + 0xe8, 0x2a, 0x65, 0xb5, 0x8c, 0x94, 0x5d, 0x2c, 0xc0, 0xeb, 0x70, 0x01, 0xdb, 0x86, 0x61, 0x96, + 0x95, 0x41, 0x44, 0xe5, 0xbc, 0x60, 0xd8, 0x53, 0xd3, 0x19, 0x7b, 0x6a, 0x5c, 0x23, 0xd5, 0xac, + 0xaa, 0x67, 0x60, 0x50, 0x44, 0x81, 0x64, 0x03, 0x27, 0x05, 0x2d, 0x96, 0x78, 0xfb, 0x5f, 0x94, + 0xc1, 0xc8, 0x02, 0x81, 0x7e, 0x60, 0xc1, 0x4c, 0xc4, 0x2f, 0xa1, 0xb8, 0xd5, 0x56, 0xe4, 0x05, + 0x9b, 0xf5, 0xc6, 0x16, 0x71, 0x5b, 0xbe, 0x17, 0x6c, 0x2e, 0x6f, 0x06, 0xa1, 0x02, 0x2f, 0x3e, + 0x20, 0x8d, 0x16, 0x73, 0xba, 0x16, 0x4e, 0x3e, 0xa1, 0x4e, 0x40, 0xaf, 0xec, 0xef, 0x4d, 0xcf, + 0xe0, 0x9e, 0x6a, 0xc1, 0x3d, 0xb6, 0x0a, 0xfd, 0xa1, 0x05, 0xb3, 0x3c, 0x0f, 0x42, 0xf1, 0x9e, + 0x14, 0xb2, 0x43, 0x6b, 0x92, 0x69, 0xca, 0x6e, 0x8d, 0x44, 0xdb, 0xf3, 0x2f, 0x8b, 0x41, 0x9e, + 0xad, 0xf5, 0x56, 0x2b, 0xee, 0xb5, 0x99, 0xf6, 0xbf, 0x2d, 0xc3, 0x28, 0x1d, 0xcf, 0xf4, 0xee, + 0xf3, 0x4b, 0x86, 0x98, 0x3c, 0x91, 0x11, 0x93, 0x53, 0x06, 0xf1, 0xc3, 0xb9, 0xf6, 0x1c, 0xc3, + 0x29, 0xdf, 0x89, 0x93, 0xeb, 0xc4, 0x89, 0x92, 0x75, 0xe2, 0xb0, 0x83, 0xc6, 0x6c, 0x10, 0x43, + 0x81, 0xb3, 0x4b, 0x15, 0x59, 0xb4, 0x92, 0x65, 0x86, 0xdb, 0xf9, 0xa3, 0x1d, 0x40, 0xec, 0x50, + 0x33, 0x72, 0x82, 0x98, 0xf7, 0xc5, 0x13, 0x6e, 0xda, 0xde, 0x6a, 0x9d, 0x12, 0xb5, 0xa2, 0x95, + 0x36, 0x6e, 0xb8, 0x43, 0x0d, 0xda, 0xb1, 0x75, 0x7f, 0xd1, 0x63, 0xeb, 0x81, 0x9c, 0x88, 0xe5, + 0x5f, 0xb4, 0xe0, 0x34, 0xfd, 0x2c, 0x66, 0x74, 0x6b, 0x8c, 0x42, 0x18, 0xa7, 0x62, 0xe7, 0x93, + 0x44, 0xc2, 0xc4, 0xfc, 0xca, 0xd1, 0xac, 0x4d, 0x3e, 0xa9, 0xfa, 0x76, 0xc3, 0x64, 0x86, 0xb3, + 0xdc, 0xed, 0x6f, 0x59, 0xc0, 0xc2, 0xe7, 0x4e, 0x60, 0x33, 0xbb, 0x66, 0x6e, 0x66, 0x76, 0xfe, + 0x8a, 0xd1, 0x65, 0x1f, 0x7b, 0x11, 0x26, 0x28, 0xb6, 0x16, 0x85, 0x0f, 0x76, 0xa5, 0xa2, 0x9d, + 0xef, 0xaf, 0x7d, 0xb7, 0xc4, 0xa7, 0x8d, 0xba, 0x4d, 0x87, 0x7e, 0xc9, 0x82, 0xa1, 0x86, 0xd3, + 0x74, 0x1a, 0x3c, 0x87, 0x4e, 0x01, 0x9f, 0x8c, 0x51, 0x7e, 0x66, 0x41, 0x94, 0xe5, 0xfe, 0x84, + 0x8f, 0xc9, 0xae, 0x4b, 0x70, 0xae, 0x0f, 0x41, 0x55, 0x3e, 0xe5, 0xc1, 0xa8, 0xc1, 0xec, 0x18, + 0x8d, 0xd0, 0x5f, 0xb2, 0xf8, 0x92, 0xaf, 0x0c, 0x85, 0xfb, 0x70, 0x2a, 0xd0, 0xfe, 0xd3, 0xc5, + 0x4c, 0xea, 0xc5, 0x33, 0xc5, 0x17, 0x75, 0xb6, 0x06, 0x6a, 0x81, 0x82, 0x19, 0x86, 0xb8, 0xbd, + 0x0e, 0xfb, 0xef, 0x5b, 0xf0, 0x88, 0x4e, 0xa8, 0x5d, 0x7e, 0xcc, 0xf3, 0x15, 0x57, 0x61, 0x28, + 0x6c, 0x92, 0xc8, 0x49, 0x8d, 0xa2, 0x8b, 0x72, 0xf4, 0x6f, 0x09, 0xf8, 0xc1, 0xde, 0xf4, 0x19, + 0x9d, 0xbb, 0x84, 0x63, 0x55, 0x12, 0xd9, 0x30, 0xc0, 0xc6, 0x25, 0x16, 0xd7, 0x56, 0x59, 0x46, + 0x19, 0x76, 0x42, 0x12, 0x63, 0x81, 0xb1, 0xff, 0xba, 0xc5, 0x85, 0x4d, 0x6f, 0x3a, 0xfa, 0x32, + 0x4c, 0x6c, 0x53, 0xfb, 0x69, 0xf1, 0x41, 0x93, 0x6e, 0xa3, 0xec, 0x64, 0xd8, 0x2a, 0xb2, 0x79, + 0x74, 0xe9, 0xee, 0xfc, 0xa4, 0x68, 0xfd, 0xc4, 0x6a, 0x86, 0x2d, 0x6e, 0xab, 0xc8, 0xfe, 0x23, + 0x31, 0x63, 0x99, 0x06, 0xf7, 0x0c, 0x0c, 0x36, 0x43, 0x77, 0x61, 0xb9, 0x8a, 0xc5, 0x58, 0xa9, + 0x25, 0xa7, 0xc6, 0xc1, 0x58, 0xe2, 0xd1, 0x15, 0x00, 0xf2, 0x20, 0x21, 0x51, 0xe0, 0xf8, 0xea, + 0x44, 0x57, 0x29, 0x4a, 0x8b, 0x0a, 0x83, 0x35, 0x2a, 0x5a, 0xa6, 0x19, 0x85, 0x3b, 0x9e, 0xcb, + 0xa2, 0xf6, 0xcb, 0x66, 0x99, 0x9a, 0xc2, 0x60, 0x8d, 0x8a, 0x5a, 0xad, 0xad, 0x20, 0xe6, 0x9b, + 0x98, 0xb3, 0x2e, 0x12, 0xa0, 0x0c, 0xa5, 0x56, 0xeb, 0x6d, 0x1d, 0x89, 0x4d, 0x5a, 0xfb, 0xbf, + 0x54, 0x00, 0x52, 0x35, 0x09, 0xbd, 0xdb, 0x3e, 0x43, 0x3f, 0x5e, 0x54, 0xc7, 0x7a, 0x78, 0xd3, + 0x13, 0x7d, 0xdd, 0x82, 0x61, 0xc7, 0xf7, 0xc3, 0x86, 0x93, 0xb0, 0x1e, 0x95, 0x8a, 0xae, 0x15, + 0xa2, 0x25, 0x73, 0x69, 0x59, 0xde, 0x98, 0x17, 0xe4, 0x81, 0x9f, 0x86, 0xc9, 0x6d, 0x8f, 0xde, + 0x04, 0xf4, 0x31, 0xa9, 0x66, 0xf3, 0x8f, 0x32, 0x95, 0x55, 0xb3, 0x2b, 0x6c, 0x85, 0xd4, 0x34, + 0x6c, 0xf4, 0xa6, 0x91, 0xe3, 0xa3, 0xaf, 0xc8, 0x6d, 0x49, 0x43, 0x71, 0xc8, 0x4b, 0xef, 0x81, + 0x3e, 0xaf, 0x07, 0x34, 0xf7, 0x17, 0xb9, 0x8e, 0xac, 0xe9, 0xaf, 0x39, 0xc1, 0xcc, 0x09, 0x8c, + 0xbb, 0xe6, 0x56, 0x29, 0x82, 0xb2, 0x2e, 0xe7, 0xd7, 0x90, 0xd9, 0x63, 0xd3, 0xcd, 0x31, 0x83, + 0xc0, 0xd9, 0x2a, 0xd0, 0xe7, 0x79, 0xb8, 0xf9, 0x72, 0xb0, 0x11, 0x8a, 0xc0, 0xac, 0x4b, 0x05, + 0xbe, 0xf9, 0x6e, 0x9c, 0x90, 0x6d, 0x5a, 0x26, 0xdd, 0x0d, 0x6f, 0x0a, 0x2e, 0x58, 0xf1, 0x43, + 0x6b, 0x30, 0xc0, 0x2e, 0xc7, 0xc4, 0x93, 0x43, 0x45, 0x5c, 0x67, 0xe6, 0x9d, 0xd0, 0x54, 0x05, + 0x61, 0x7f, 0x63, 0x2c, 0x78, 0xa1, 0xeb, 0xf2, 0x56, 0x78, 0xbc, 0x1c, 0xdc, 0x8e, 0x09, 0xbb, + 0x15, 0x5e, 0x99, 0xff, 0x48, 0x7a, 0xcd, 0x9b, 0xc3, 0x3b, 0x66, 0x39, 0x33, 0x4a, 0x52, 0x4d, + 0x44, 0xfc, 0x97, 0xc9, 0xd3, 0x26, 0xa1, 0x48, 0x43, 0xcd, 0x54, 0x6b, 0xe9, 0x60, 0xdf, 0x31, + 0x99, 0xe1, 0x2c, 0xf7, 0x13, 0xdc, 0x03, 0xa7, 0x7c, 0x98, 0xc8, 0x4e, 0xc9, 0x63, 0xdc, 0x71, + 0x7f, 0xd2, 0x07, 0x63, 0xa6, 0x60, 0xa0, 0x59, 0xa8, 0x08, 0x6d, 0x4a, 0x25, 0x52, 0x52, 0xf2, + 0xbf, 0x2a, 0x11, 0x38, 0xa5, 0x61, 0x29, 0xa5, 0x58, 0x71, 0x2d, 0x1c, 0x27, 0x4d, 0x29, 0xa5, + 0x30, 0x58, 0xa3, 0xa2, 0x6a, 0xeb, 0x7a, 0x18, 0x26, 0x6a, 0xe1, 0x56, 0x32, 0x33, 0xcf, 0xa0, + 0x58, 0x60, 0xe9, 0x82, 0x7d, 0x8f, 0x76, 0xc8, 0x37, 0x5d, 0x80, 0x6a, 0xc1, 0xbe, 0xa1, 0x23, + 0xb1, 0x49, 0x4b, 0x37, 0xa0, 0x30, 0x66, 0x42, 0x28, 0x94, 0xe3, 0x34, 0xbc, 0xa9, 0xce, 0x2f, + 0x8b, 0x49, 0x3c, 0xfa, 0x1c, 0x3c, 0xa2, 0xee, 0x76, 0x61, 0xee, 0x52, 0x95, 0x35, 0x0e, 0x18, + 0xf6, 0xed, 0x23, 0x0b, 0x9d, 0xc9, 0x70, 0xb7, 0xf2, 0xe8, 0x55, 0x18, 0x13, 0x8a, 0xad, 0xe4, + 0x38, 0x68, 0x9e, 0x7e, 0xdf, 0x30, 0xb0, 0x38, 0x43, 0x8d, 0xaa, 0x30, 0x41, 0x21, 0x4c, 0xa3, + 0x94, 0x1c, 0xf8, 0x1d, 0x35, 0xb5, 0x33, 0xdf, 0xc8, 0xe0, 0x71, 0x5b, 0x09, 0x34, 0x07, 0xe3, + 0x5c, 0xb7, 0xa0, 0x56, 0x1c, 0xfb, 0x0e, 0x22, 0x92, 0x52, 0x4d, 0x82, 0x5b, 0x26, 0x1a, 0x67, + 0xe9, 0xd1, 0x55, 0x18, 0x71, 0xa2, 0xc6, 0x96, 0x97, 0x90, 0x46, 0xd2, 0x8a, 0x78, 0xbe, 0x05, + 0x2d, 0x7c, 0x60, 0x4e, 0xc3, 0x61, 0x83, 0xd2, 0x7e, 0x07, 0x4e, 0x77, 0x08, 0xdb, 0xa6, 0x82, + 0xe3, 0x34, 0x3d, 0xd9, 0xa7, 0x4c, 0xa0, 0xd2, 0x5c, 0x6d, 0x59, 0xf6, 0x46, 0xa3, 0xa2, 0xd2, + 0xc9, 0x7c, 0xc9, 0x5a, 0x9e, 0x43, 0x25, 0x9d, 0x4b, 0x12, 0x81, 0x53, 0x1a, 0xfb, 0x4f, 0x2b, + 0xa0, 0xb9, 0x5a, 0x0a, 0x84, 0xa7, 0x5c, 0x85, 0x11, 0x99, 0xba, 0x53, 0x4b, 0x99, 0xa7, 0xba, + 0x79, 0x4d, 0xc3, 0x61, 0x83, 0x92, 0xb6, 0x2d, 0x90, 0x0e, 0xa4, 0x6c, 0x58, 0x94, 0xf2, 0x2c, + 0xe1, 0x94, 0x06, 0x5d, 0x82, 0xa1, 0x98, 0xf8, 0x1b, 0x2b, 0x5e, 0x70, 0x4f, 0x08, 0xb6, 0x5a, + 0x95, 0xeb, 0x02, 0x8e, 0x15, 0x05, 0x9a, 0x87, 0x72, 0xcb, 0x73, 0x85, 0x28, 0x4b, 0x95, 0xa1, + 0x7c, 0x7b, 0xb9, 0x7a, 0xb0, 0x37, 0xfd, 0x44, 0xb7, 0xdc, 0xa7, 0xd4, 0x98, 0x8e, 0x67, 0xe8, + 0xf4, 0xa3, 0x85, 0x3b, 0x39, 0xd5, 0x07, 0x7a, 0x74, 0xaa, 0x5f, 0x01, 0x10, 0xbd, 0x96, 0xb2, + 0x5c, 0x4e, 0xbf, 0xda, 0x35, 0x85, 0xc1, 0x1a, 0x15, 0x35, 0xc9, 0x1b, 0x11, 0x71, 0xa4, 0xd5, + 0xca, 0xc3, 0x89, 0x87, 0x8e, 0x6e, 0x92, 0x2f, 0x64, 0x99, 0xe1, 0x76, 0xfe, 0x28, 0x84, 0x53, + 0x2e, 0x9d, 0x48, 0x46, 0xa5, 0x95, 0xde, 0x63, 0x98, 0x69, 0x85, 0xd5, 0x2c, 0x23, 0xdc, 0xce, + 0x1b, 0x7d, 0x11, 0xa6, 0x24, 0xb0, 0xfd, 0xf6, 0x26, 0x9b, 0x2e, 0xe5, 0xf9, 0xf3, 0xfb, 0x7b, + 0xd3, 0x53, 0xd5, 0xae, 0x54, 0xf8, 0x10, 0x0e, 0xe8, 0x0d, 0x18, 0x60, 0x87, 0x30, 0xf1, 0xe4, + 0x30, 0xdb, 0xed, 0x5e, 0x2c, 0x12, 0x09, 0x4f, 0xa5, 0x7e, 0x86, 0x1d, 0xe5, 0x88, 0x18, 0xcf, + 0xf4, 0x64, 0x8b, 0x01, 0xb1, 0xe0, 0x89, 0x9a, 0x30, 0xec, 0x04, 0x41, 0x98, 0x38, 0x5c, 0x09, + 0x1b, 0x29, 0xa2, 0x47, 0x6a, 0x55, 0xcc, 0xa5, 0x65, 0x79, 0x3d, 0x2a, 0x70, 0x4c, 0xc3, 0x60, + 0xbd, 0x0a, 0x74, 0x1f, 0xc6, 0xc3, 0xfb, 0x74, 0xc1, 0x94, 0xe7, 0x10, 0xf1, 0xe4, 0xa8, 0xd9, + 0xb1, 0x1c, 0xaf, 0xaa, 0x51, 0x58, 0x5b, 0xc9, 0x4c, 0xa6, 0x38, 0x5b, 0x0b, 0x9a, 0x31, 0x7c, + 0xcb, 0x63, 0x69, 0x24, 0x73, 0xea, 0x5b, 0xd6, 0x5d, 0xc9, 0xec, 0x86, 0x30, 0x8f, 0x5e, 0x64, + 0x2b, 0xc2, 0x78, 0xe6, 0x86, 0x70, 0x8a, 0xc2, 0x3a, 0xdd, 0xd4, 0x27, 0x60, 0x58, 0x1b, 0xf8, + 0x5e, 0x42, 0x66, 0xa7, 0x5e, 0x85, 0x89, 0xec, 0x80, 0xf6, 0x14, 0x72, 0xfb, 0xbf, 0x4a, 0x30, + 0xde, 0xe1, 0x90, 0xe7, 0x9e, 0xc7, 0xc2, 0xbe, 0x8d, 0xa5, 0xef, 0x86, 0x17, 0xb8, 0x98, 0x61, + 0xcc, 0x05, 0xac, 0x54, 0x60, 0x01, 0x93, 0xab, 0x69, 0xb9, 0xeb, 0x6a, 0x2a, 0x16, 0xad, 0xbe, + 0xf7, 0xb3, 0x68, 0x99, 0xfb, 0x44, 0x7f, 0xa1, 0x7d, 0xe2, 0x21, 0x2c, 0x74, 0xc6, 0x56, 0x33, + 0x58, 0x60, 0xab, 0xf9, 0x66, 0x09, 0x26, 0xd2, 0xf0, 0x62, 0x91, 0xcf, 0xf7, 0xf8, 0xcf, 0x0c, + 0xd6, 0x8c, 0x33, 0x83, 0xbc, 0x74, 0xbd, 0x99, 0xf6, 0x75, 0x3d, 0x3f, 0x78, 0x23, 0x73, 0x7e, + 0xf0, 0x62, 0x8f, 0x7c, 0x0f, 0x3f, 0x4b, 0xf8, 0x4e, 0x09, 0xce, 0x66, 0x8b, 0x2c, 0xf8, 0x8e, + 0xb7, 0x7d, 0x02, 0xe3, 0xf5, 0x39, 0x63, 0xbc, 0x5e, 0xee, 0xad, 0x5f, 0xac, 0x91, 0x5d, 0x07, + 0xcd, 0xc9, 0x0c, 0xda, 0x27, 0x8e, 0xc2, 0xfc, 0xf0, 0x91, 0xfb, 0x7d, 0x0b, 0x1e, 0xed, 0x58, + 0xee, 0x04, 0xbc, 0xa4, 0xaf, 0x9b, 0x5e, 0xd2, 0x17, 0x8e, 0xd0, 0xbb, 0x2e, 0x6e, 0xd3, 0xff, + 0x51, 0xea, 0xd2, 0x2b, 0xe6, 0x49, 0xba, 0x05, 0xc3, 0x4e, 0xa3, 0x41, 0xe2, 0x78, 0x35, 0x74, + 0x55, 0xae, 0xa1, 0xe7, 0xd9, 0xde, 0x92, 0x82, 0x0f, 0xf6, 0xa6, 0xa7, 0xb2, 0x2c, 0x52, 0x34, + 0xd6, 0x39, 0x98, 0x59, 0xd0, 0x4a, 0xc7, 0x94, 0x05, 0xed, 0x0a, 0xc0, 0x8e, 0xb2, 0x60, 0xb3, + 0x0e, 0x2a, 0xcd, 0xb6, 0xd5, 0xa8, 0xd0, 0x5f, 0x64, 0x1a, 0x21, 0x8f, 0xa8, 0xe8, 0x33, 0x6f, + 0x2a, 0xe6, 0x7c, 0x3f, 0x3d, 0x3a, 0x83, 0x5f, 0x88, 0x54, 0xce, 0x3c, 0xc5, 0xd2, 0xfe, 0x97, + 0x65, 0xf8, 0xf0, 0x21, 0x42, 0x87, 0xe6, 0xcc, 0x03, 0xd2, 0xe7, 0xb2, 0x9e, 0x9b, 0xa9, 0x8e, + 0x85, 0x0d, 0x57, 0x4e, 0xe6, 0x5b, 0x95, 0xde, 0xf7, 0xb7, 0xfa, 0x86, 0xee, 0x67, 0xe3, 0x81, + 0x91, 0xd7, 0x8e, 0x3c, 0xad, 0x7e, 0x36, 0xfd, 0xe2, 0x5f, 0xb5, 0xe0, 0x89, 0x8e, 0x9d, 0x32, + 0xc2, 0x31, 0x66, 0xa1, 0xd2, 0xa0, 0x40, 0xed, 0x06, 0x4b, 0x7a, 0x75, 0x4c, 0x22, 0x70, 0x4a, + 0x63, 0x44, 0x5d, 0x94, 0x72, 0xa3, 0x2e, 0x7e, 0xd7, 0x82, 0x33, 0xd9, 0x46, 0x9c, 0xc0, 0x9a, + 0x53, 0x37, 0xd7, 0x9c, 0x99, 0xde, 0x3e, 0x7d, 0x97, 0xe5, 0xe6, 0x57, 0x47, 0xe1, 0x5c, 0xdb, + 0x8e, 0xc5, 0x47, 0xf1, 0xe7, 0x2c, 0x38, 0xb5, 0xc9, 0x34, 0x6f, 0xed, 0x9a, 0x90, 0xe8, 0x57, + 0xce, 0xdd, 0xaa, 0x43, 0x6f, 0x17, 0x71, 0x3b, 0xa2, 0x8d, 0x04, 0xb7, 0x57, 0x86, 0xbe, 0x66, + 0xc1, 0x19, 0xe7, 0x7e, 0xdc, 0xf6, 0x52, 0x84, 0x10, 0xa3, 0x57, 0x73, 0x9c, 0x5c, 0x39, 0x6f, + 0x4c, 0xcc, 0x4f, 0xee, 0xef, 0x4d, 0x9f, 0xe9, 0x44, 0x85, 0x3b, 0xd6, 0x4a, 0xbf, 0xef, 0x96, + 0xb8, 0x86, 0x50, 0xec, 0xc2, 0x5b, 0xa7, 0x4b, 0x0b, 0x7c, 0x49, 0x92, 0x18, 0xac, 0x38, 0xa2, + 0xb7, 0xa0, 0xb2, 0x29, 0x6f, 0x06, 0x65, 0x97, 0xbc, 0x2e, 0xc3, 0xdc, 0xe9, 0x22, 0x11, 0x0f, + 0x8d, 0x57, 0x28, 0x9c, 0x32, 0x45, 0xd7, 0xa1, 0x1c, 0x6c, 0xc4, 0xe2, 0x0e, 0x6e, 0x5e, 0xb0, + 0x8d, 0x19, 0xe2, 0xc4, 0xaf, 0x2d, 0xde, 0x5c, 0xaa, 0x63, 0xca, 0x82, 0x72, 0x8a, 0xd6, 0x5d, + 0xe1, 0xdd, 0xcd, 0xe1, 0x84, 0xe7, 0xab, 0xed, 0x9c, 0xf0, 0x7c, 0x15, 0x53, 0x16, 0xa8, 0x06, + 0xfd, 0xec, 0x92, 0x83, 0x70, 0xdd, 0xe6, 0x5c, 0xd4, 0x6e, 0xbb, 0xca, 0xc1, 0x13, 0xed, 0x31, + 0x30, 0xe6, 0x8c, 0xd0, 0x1a, 0x0c, 0x34, 0x58, 0x52, 0x74, 0x61, 0x57, 0xe7, 0xa5, 0x30, 0x68, + 0x4b, 0xa0, 0xce, 0x8f, 0x98, 0x38, 0x1c, 0x0b, 0x5e, 0x8c, 0x2b, 0x69, 0x6e, 0x6d, 0xc4, 0xc2, + 0x70, 0xce, 0xe3, 0xda, 0x96, 0xde, 0x5e, 0x70, 0x65, 0x70, 0x2c, 0x78, 0xa1, 0x2a, 0x94, 0x36, + 0x1a, 0x22, 0x5f, 0x67, 0x8e, 0xcb, 0xd6, 0xbc, 0x83, 0x3a, 0x3f, 0xb0, 0xbf, 0x37, 0x5d, 0x5a, + 0x5a, 0xc0, 0xa5, 0x8d, 0x06, 0x7a, 0x1d, 0x06, 0x37, 0xf8, 0xad, 0x42, 0x91, 0x9b, 0xf3, 0x72, + 0xde, 0xd5, 0xc7, 0xb6, 0x2b, 0x88, 0xfc, 0xfa, 0x83, 0x40, 0x60, 0xc9, 0x8e, 0xa5, 0x2d, 0x53, + 0xf7, 0x24, 0x45, 0x72, 0xce, 0x99, 0xde, 0xee, 0x55, 0x0a, 0x7b, 0x52, 0x41, 0xb1, 0xc6, 0x91, + 0xca, 0xbc, 0x23, 0xdf, 0x77, 0x60, 0x89, 0x39, 0x73, 0x65, 0xbe, 0xe3, 0x73, 0x10, 0x5c, 0xe6, + 0x15, 0x0a, 0xa7, 0x4c, 0x51, 0x0b, 0x46, 0x77, 0xe2, 0xe6, 0x16, 0x91, 0x53, 0x9f, 0x65, 0xeb, + 0x1c, 0xbe, 0xf2, 0xa9, 0x9c, 0x14, 0xac, 0xa2, 0x88, 0x17, 0x25, 0x2d, 0xc7, 0x6f, 0x5b, 0xc1, + 0x58, 0x9e, 0xa8, 0x3b, 0x3a, 0x5b, 0x6c, 0xd6, 0x42, 0x3f, 0xc9, 0xdb, 0xad, 0x70, 0x7d, 0x37, + 0x21, 0x22, 0x9b, 0x67, 0xce, 0x27, 0x79, 0x8d, 0x13, 0xb7, 0x7f, 0x12, 0x81, 0xc0, 0x92, 0x9d, + 0x1a, 0x32, 0xb6, 0x1a, 0x4f, 0x14, 0x1e, 0xb2, 0xb6, 0x3e, 0xa4, 0x43, 0xc6, 0x56, 0xdf, 0x94, + 0x29, 0x5b, 0x75, 0x9b, 0x5b, 0x61, 0x12, 0x06, 0x99, 0xb5, 0xff, 0x54, 0x91, 0x55, 0xb7, 0xd6, + 0xa1, 0x64, 0xfb, 0xaa, 0xdb, 0x89, 0x0a, 0x77, 0xac, 0xd5, 0xfe, 0xa3, 0xfe, 0xf6, 0xed, 0x96, + 0x29, 0xc3, 0x7f, 0xad, 0xfd, 0xdc, 0xf1, 0x33, 0xbd, 0xdb, 0x7c, 0x0f, 0xf1, 0x04, 0xf2, 0x6b, + 0x16, 0x9c, 0x6b, 0x76, 0xdc, 0x4c, 0xc5, 0x86, 0xd5, 0xab, 0xe9, 0xc8, 0x07, 0x4c, 0xa5, 0xaa, + 0xed, 0x8c, 0xc7, 0x5d, 0xea, 0xcc, 0x2a, 0xa0, 0xe5, 0xf7, 0xad, 0x80, 0xde, 0x85, 0x21, 0xa6, + 0x33, 0xa5, 0x79, 0x35, 0x7a, 0x4c, 0x41, 0xc1, 0xb6, 0xbe, 0x05, 0xc1, 0x02, 0x2b, 0x66, 0x74, + 0xe0, 0x1e, 0xcf, 0x76, 0x02, 0x13, 0x86, 0x16, 0xe9, 0x5c, 0xb9, 0xaf, 0x63, 0x49, 0x8c, 0xc4, + 0xe3, 0xb5, 0xc3, 0x88, 0x0f, 0xf2, 0x08, 0xf0, 0xe1, 0x95, 0x9d, 0xa4, 0x42, 0xfb, 0x8f, 0xac, + 0x0e, 0xfa, 0x17, 0x37, 0x41, 0x3e, 0x65, 0x9a, 0x20, 0x4f, 0x67, 0x4d, 0x90, 0x36, 0xb7, 0x81, + 0x61, 0x7d, 0x14, 0x4f, 0xcc, 0x58, 0x34, 0xe1, 0x87, 0xed, 0xc3, 0x85, 0xbc, 0xc9, 0xcd, 0x22, + 0x7c, 0x5c, 0x75, 0x5c, 0x96, 0x46, 0xf8, 0xb8, 0xcb, 0x55, 0xcc, 0x30, 0x45, 0xef, 0x8c, 0xdb, + 0x3f, 0x5f, 0x82, 0x72, 0x2d, 0x74, 0x4f, 0xc0, 0x0d, 0x72, 0xcd, 0x70, 0x83, 0x3c, 0x95, 0xfb, + 0xba, 0x55, 0x57, 0xa7, 0xc7, 0xad, 0x8c, 0xd3, 0xe3, 0xa3, 0xf9, 0xac, 0x0e, 0x77, 0x71, 0x7c, + 0xb7, 0x0c, 0xfa, 0xfb, 0x5c, 0xe8, 0x3f, 0x1f, 0x25, 0xf0, 0xb3, 0x5c, 0xec, 0xc9, 0x2e, 0x51, + 0x07, 0x0b, 0x11, 0x92, 0x97, 0xc4, 0x7e, 0x66, 0xe3, 0x3f, 0xef, 0x12, 0x6f, 0x73, 0x2b, 0x21, + 0x6e, 0xb6, 0x63, 0x27, 0x17, 0xff, 0xf9, 0x27, 0x16, 0x8c, 0x67, 0x6a, 0x47, 0x7e, 0xa7, 0x7b, + 0x26, 0x47, 0x74, 0x6c, 0x9c, 0xca, 0xbd, 0x98, 0x32, 0x03, 0xa0, 0xfc, 0xd3, 0xd2, 0xfd, 0xc0, + 0x74, 0x31, 0xe5, 0xc0, 0x8e, 0xb1, 0x46, 0x81, 0x5e, 0x82, 0xe1, 0x24, 0x6c, 0x86, 0x7e, 0xb8, + 0xb9, 0x7b, 0x83, 0xc8, 0x6c, 0x06, 0xca, 0xb7, 0xbf, 0x96, 0xa2, 0xb0, 0x4e, 0x67, 0x7f, 0xaf, + 0x0c, 0xd9, 0xd7, 0xdd, 0xfe, 0x5c, 0x4e, 0x7f, 0x76, 0xe4, 0xf4, 0x0f, 0x2c, 0x98, 0xa0, 0xb5, + 0xb3, 0x00, 0x0f, 0x19, 0xa7, 0xa9, 0xb2, 0xc4, 0x5b, 0x87, 0x64, 0x89, 0x7f, 0x9a, 0xae, 0x76, + 0x6e, 0xd8, 0x4a, 0x84, 0xcb, 0x44, 0x5b, 0xc4, 0x28, 0x14, 0x0b, 0xac, 0xa0, 0x23, 0x51, 0x24, + 0x2e, 0xb4, 0xe8, 0x74, 0x24, 0x8a, 0xb0, 0xc0, 0xca, 0x24, 0xf2, 0x7d, 0x5d, 0x92, 0xc8, 0xb3, + 0x7c, 0x40, 0x22, 0xb0, 0x40, 0xa8, 0x03, 0x5a, 0x3e, 0x20, 0x19, 0x71, 0x90, 0xd2, 0xd8, 0xdf, + 0x2e, 0xc3, 0x48, 0x2d, 0x74, 0xd3, 0x00, 0xec, 0x17, 0x8d, 0x00, 0xec, 0x0b, 0x99, 0x00, 0xec, + 0x09, 0x9d, 0xf6, 0xe1, 0xc4, 0x5f, 0x8b, 0xbc, 0x51, 0xec, 0x99, 0x83, 0x23, 0xc6, 0x5e, 0x1b, + 0x79, 0xa3, 0x14, 0x23, 0x6c, 0xf2, 0xfd, 0xb3, 0x14, 0x73, 0xfd, 0x7f, 0x2c, 0x18, 0xab, 0x85, + 0x2e, 0x15, 0xd0, 0x3f, 0x4b, 0xd2, 0xa8, 0x67, 0x9b, 0x1a, 0x38, 0x24, 0xdb, 0xd4, 0x3f, 0xb3, + 0x60, 0xb0, 0x16, 0xba, 0x27, 0xe0, 0x4e, 0x5c, 0x32, 0xdd, 0x89, 0x4f, 0xe4, 0xae, 0xbc, 0x5d, + 0x3c, 0x88, 0xbf, 0x51, 0x86, 0x51, 0xda, 0xe2, 0x70, 0x53, 0x7e, 0x2f, 0x63, 0x6c, 0xac, 0x02, + 0x63, 0x43, 0x55, 0xc2, 0xd0, 0xf7, 0xc3, 0xfb, 0xd9, 0x6f, 0xb7, 0xc4, 0xa0, 0x58, 0x60, 0xd1, + 0x25, 0x18, 0x6a, 0x46, 0x64, 0xc7, 0x0b, 0x5b, 0x71, 0xf6, 0x72, 0x5c, 0x4d, 0xc0, 0xb1, 0xa2, + 0x40, 0x2f, 0xc2, 0x48, 0xec, 0x05, 0x0d, 0x22, 0xc3, 0x0e, 0xfa, 0x58, 0xd8, 0x01, 0x4f, 0xec, + 0xa7, 0xc1, 0xb1, 0x41, 0x85, 0xee, 0x42, 0x85, 0xfd, 0x67, 0x33, 0xa8, 0xf7, 0x2c, 0xf0, 0x3c, + 0x9b, 0x95, 0x64, 0x80, 0x53, 0x5e, 0xe8, 0x0a, 0x40, 0x22, 0x03, 0x24, 0x62, 0x91, 0x95, 0x43, + 0xe9, 0xa5, 0x2a, 0x74, 0x22, 0xc6, 0x1a, 0x15, 0x7a, 0x0e, 0x2a, 0x89, 0xe3, 0xf9, 0x2b, 0x5e, + 0x40, 0x62, 0x11, 0x60, 0x22, 0x92, 0xf4, 0x0a, 0x20, 0x4e, 0xf1, 0x74, 0xbf, 0x67, 0x57, 0x73, + 0xf9, 0x0b, 0x13, 0x43, 0x8c, 0x9a, 0xed, 0xf7, 0x2b, 0x0a, 0x8a, 0x35, 0x0a, 0xfb, 0x2a, 0x9c, + 0xad, 0x85, 0x6e, 0x2d, 0x8c, 0x92, 0xa5, 0x30, 0xba, 0xef, 0x44, 0xae, 0xfc, 0x7e, 0xd3, 0x32, + 0x37, 0x2c, 0xdd, 0x93, 0xfb, 0xb9, 0x87, 0xcd, 0xc8, 0xf5, 0xfa, 0x02, 0xdb, 0xf1, 0x7b, 0x8c, + 0xec, 0xff, 0x51, 0x09, 0x50, 0x8d, 0x85, 0x70, 0x18, 0x0f, 0x92, 0x6c, 0xc1, 0x58, 0x4c, 0x56, + 0xbc, 0xa0, 0xf5, 0x40, 0xb0, 0x2a, 0x76, 0x95, 0xa2, 0xbe, 0xa8, 0x97, 0xe1, 0xf7, 0x58, 0x4d, + 0x18, 0xce, 0xf0, 0xa5, 0x83, 0x19, 0xb5, 0x82, 0xb9, 0xf8, 0x76, 0x4c, 0x22, 0xf1, 0x00, 0x07, + 0x1b, 0x4c, 0x2c, 0x81, 0x38, 0xc5, 0x53, 0xe1, 0x61, 0x7f, 0x6e, 0x86, 0x01, 0x0e, 0xc3, 0x44, + 0x8a, 0x1b, 0x4b, 0xc8, 0xae, 0xc1, 0xb1, 0x41, 0x85, 0x96, 0x00, 0xc5, 0xad, 0x66, 0xd3, 0x67, + 0xa7, 0x62, 0x8e, 0x7f, 0x2d, 0x0a, 0x5b, 0x4d, 0x1e, 0xc5, 0x2b, 0x72, 0x99, 0xd7, 0xdb, 0xb0, + 0xb8, 0x43, 0x09, 0xba, 0x58, 0x6c, 0xc4, 0xec, 0xb7, 0xb8, 0xa7, 0xcb, 0xbd, 0x73, 0x75, 0x06, + 0xc2, 0x12, 0x67, 0x7f, 0x85, 0x6d, 0x70, 0xec, 0x65, 0x84, 0xa4, 0x15, 0x11, 0xb4, 0x0d, 0xa3, + 0x4d, 0xb6, 0x89, 0x25, 0x51, 0xe8, 0xfb, 0x44, 0xea, 0x97, 0x47, 0x0b, 0x22, 0xe1, 0xb9, 0xd0, + 0x75, 0x76, 0xd8, 0xe4, 0x6e, 0xff, 0x78, 0x98, 0xad, 0x55, 0xe2, 0x60, 0x72, 0x50, 0x84, 0x8a, + 0x0a, 0x4d, 0xee, 0x23, 0x45, 0xde, 0x38, 0x4a, 0xf7, 0x01, 0x11, 0x78, 0x8a, 0x25, 0x17, 0xf4, + 0x05, 0x16, 0x08, 0xcd, 0x17, 0x88, 0xe2, 0x4f, 0x94, 0x71, 0x7a, 0x23, 0x08, 0x5a, 0xb0, 0xc0, + 0x1a, 0x3b, 0xb4, 0x02, 0xa3, 0x22, 0x91, 0xbe, 0x70, 0x2f, 0x94, 0x0d, 0x13, 0x7b, 0x14, 0xeb, + 0xc8, 0x83, 0x2c, 0x00, 0x9b, 0x85, 0xd1, 0x26, 0x3c, 0xae, 0x3d, 0x14, 0xd3, 0x21, 0xe0, 0x89, + 0xaf, 0x3c, 0x4f, 0xec, 0xef, 0x4d, 0x3f, 0xbe, 0x76, 0x18, 0x21, 0x3e, 0x9c, 0x0f, 0xba, 0x05, + 0x67, 0x9d, 0x46, 0xe2, 0xed, 0x90, 0x2a, 0x71, 0x5c, 0xdf, 0x0b, 0x88, 0x79, 0x99, 0xfb, 0xd1, + 0xfd, 0xbd, 0xe9, 0xb3, 0x73, 0x9d, 0x08, 0x70, 0xe7, 0x72, 0xe8, 0x53, 0x50, 0x71, 0x83, 0x58, + 0x8c, 0xc1, 0x80, 0xf1, 0x2e, 0x52, 0xa5, 0x7a, 0xb3, 0xae, 0xfa, 0x9f, 0xfe, 0xc1, 0x69, 0x01, + 0xf4, 0x36, 0x7f, 0xe0, 0x5a, 0x59, 0x33, 0xfc, 0x3d, 0xae, 0x97, 0x0b, 0xd9, 0xcf, 0xc6, 0x25, + 0x0b, 0xee, 0x79, 0x53, 0x81, 0x85, 0xc6, 0xfd, 0x0b, 0xa3, 0x0a, 0xf4, 0x59, 0x40, 0x31, 0x89, + 0x76, 0xbc, 0x06, 0x99, 0x6b, 0xb0, 0x6c, 0x98, 0xec, 0x88, 0x6f, 0xc8, 0x88, 0xae, 0x47, 0xf5, + 0x36, 0x0a, 0xdc, 0xa1, 0x14, 0xba, 0x4e, 0x57, 0x1e, 0x1d, 0x2a, 0xe2, 0x40, 0xa5, 0x62, 0x38, + 0x59, 0x25, 0xcd, 0x88, 0x34, 0x9c, 0x84, 0xb8, 0x26, 0x47, 0x9c, 0x29, 0x47, 0xf7, 0x25, 0x95, + 0xf0, 0x1c, 0xcc, 0xe8, 0xc5, 0xf6, 0xa4, 0xe7, 0xd4, 0xce, 0xda, 0x0a, 0xe3, 0xe4, 0x26, 0x49, + 0xee, 0x87, 0xd1, 0x3d, 0xe6, 0xb1, 0x1f, 0xd2, 0x92, 0x8b, 0xa5, 0x28, 0xac, 0xd3, 0x51, 0x1d, + 0x8a, 0x1d, 0x15, 0x2d, 0x57, 0x99, 0x1f, 0x7e, 0x28, 0x9d, 0x3b, 0xd7, 0x39, 0x18, 0x4b, 0xbc, + 0x24, 0x5d, 0xae, 0x2d, 0x30, 0x9f, 0x7a, 0x86, 0x74, 0xb9, 0xb6, 0x80, 0x25, 0x1e, 0x85, 0xed, + 0xaf, 0x4f, 0x8d, 0x15, 0x39, 0xdf, 0x68, 0x5f, 0xc9, 0x0b, 0x3e, 0x40, 0xf5, 0x00, 0x26, 0xd4, + 0x0b, 0x58, 0x3c, 0xeb, 0x63, 0x3c, 0x39, 0x5e, 0xe4, 0x79, 0xed, 0x8e, 0xc9, 0x23, 0x55, 0xe0, + 0xef, 0x72, 0x86, 0x27, 0x6e, 0xab, 0xc5, 0x48, 0x4a, 0x30, 0x91, 0x9b, 0xc4, 0x7e, 0x16, 0x2a, + 0x71, 0x6b, 0xdd, 0x0d, 0xb7, 0x1d, 0x2f, 0x60, 0x8e, 0x6f, 0xfd, 0xb1, 0x68, 0x89, 0xc0, 0x29, + 0x0d, 0xaa, 0xc1, 0x90, 0x23, 0xdf, 0x49, 0x47, 0x45, 0x2e, 0x2d, 0xab, 0x07, 0xd2, 0x99, 0x57, + 0x54, 0xbd, 0x8c, 0xae, 0xb8, 0xa0, 0x57, 0x60, 0x54, 0xdc, 0xba, 0x21, 0x11, 0x6b, 0xf5, 0x69, + 0x33, 0xe4, 0xbb, 0x2e, 0x91, 0x4c, 0xc0, 0x4c, 0xda, 0xa9, 0x4f, 0xc3, 0xa9, 0xb6, 0x29, 0xd6, + 0x53, 0xe0, 0xdc, 0x7f, 0xe8, 0x83, 0x8a, 0xf2, 0x50, 0xa1, 0x59, 0xd3, 0x19, 0xf9, 0x68, 0xd6, + 0x19, 0x39, 0x44, 0x15, 0x02, 0xdd, 0xff, 0xf8, 0xc5, 0x0e, 0x8f, 0xd5, 0x3e, 0x9b, 0x2b, 0x53, + 0xc5, 0xef, 0xb1, 0xf4, 0xf0, 0xa4, 0x6f, 0x6a, 0xa5, 0xf4, 0x1d, 0x6a, 0xa5, 0x14, 0x7c, 0x97, + 0x8a, 0xda, 0x23, 0xcd, 0xd0, 0x5d, 0xae, 0x65, 0x9f, 0x5d, 0xa9, 0x51, 0x20, 0xe6, 0x38, 0xa6, + 0x47, 0xd2, 0x3d, 0x82, 0xe9, 0x91, 0x83, 0x47, 0xd4, 0x23, 0x25, 0x03, 0x9c, 0xf2, 0x42, 0x3b, + 0x70, 0xaa, 0x61, 0xbe, 0xa2, 0xa3, 0x6e, 0xa7, 0x3c, 0xdf, 0xc3, 0x2b, 0x36, 0x2d, 0xed, 0xc5, + 0x80, 0x85, 0x2c, 0x3f, 0xdc, 0x5e, 0x05, 0x7a, 0x05, 0x86, 0xde, 0x0e, 0xe3, 0x05, 0xdf, 0x89, + 0x63, 0xb1, 0x50, 0xca, 0x9b, 0x00, 0x43, 0xaf, 0xdd, 0xaa, 0x33, 0xf8, 0xc1, 0xde, 0xf4, 0x70, + 0x2d, 0x74, 0xe5, 0x5f, 0xac, 0x0a, 0xd8, 0xbf, 0xc3, 0xbd, 0x61, 0xc2, 0x3e, 0x26, 0x71, 0xcb, + 0x3f, 0x89, 0xc4, 0xd9, 0xb7, 0x0c, 0xd3, 0xfd, 0x21, 0xf8, 0x63, 0xff, 0x93, 0xc5, 0xfc, 0xb1, + 0x6b, 0x64, 0xbb, 0xe9, 0x3b, 0xc9, 0x49, 0x84, 0x34, 0x7e, 0x01, 0x86, 0x12, 0x51, 0x5b, 0xb1, + 0xac, 0xdf, 0x5a, 0xf3, 0x98, 0x9f, 0x5a, 0xad, 0x71, 0x12, 0x8a, 0x15, 0x43, 0xfb, 0xdf, 0xf0, + 0xaf, 0x22, 0x31, 0x27, 0x60, 0x74, 0xde, 0x34, 0x8d, 0xce, 0x67, 0x0a, 0xf7, 0xa5, 0x8b, 0xf1, + 0xf9, 0x3d, 0xb3, 0x07, 0x4c, 0x15, 0xfd, 0xd9, 0x39, 0x30, 0xb0, 0x6f, 0x81, 0xf9, 0xda, 0x10, + 0x7a, 0x95, 0x07, 0x09, 0xf3, 0x45, 0xf6, 0x52, 0xcf, 0x01, 0xc2, 0xf6, 0xaf, 0x97, 0xe0, 0x0c, + 0x77, 0x19, 0xce, 0xed, 0x84, 0x9e, 0x5b, 0x0b, 0x5d, 0x11, 0x32, 0xed, 0xc2, 0x48, 0x53, 0x33, + 0x15, 0x8a, 0xe5, 0x83, 0xd0, 0x8d, 0x8b, 0x54, 0x3d, 0xd3, 0xa1, 0xd8, 0xe0, 0x4a, 0x6b, 0x21, + 0x3b, 0x5e, 0x43, 0x79, 0xa0, 0x4a, 0x3d, 0xaf, 0x7b, 0xaa, 0x96, 0x45, 0x8d, 0x0f, 0x36, 0xb8, + 0x1e, 0x43, 0x82, 0x7a, 0xfb, 0x1f, 0x58, 0xf0, 0x48, 0x97, 0x9c, 0x11, 0xb4, 0xba, 0xfb, 0xcc, + 0x4d, 0x2b, 0x9e, 0xb3, 0x52, 0xd5, 0x71, 0xe7, 0x2d, 0x16, 0x58, 0xb4, 0x0e, 0xc0, 0x9d, 0xaf, + 0xec, 0x71, 0xe3, 0x52, 0x91, 0x58, 0x89, 0xb6, 0xbb, 0xd9, 0xda, 0xb5, 0x5d, 0xf5, 0x9c, 0xb1, + 0xc6, 0xd5, 0xfe, 0x56, 0x19, 0xfa, 0xf9, 0xab, 0xa9, 0x35, 0x18, 0xdc, 0xe2, 0x99, 0x2b, 0x7b, + 0x4b, 0x9c, 0x99, 0xaa, 0x82, 0x1c, 0x80, 0x25, 0x1b, 0xb4, 0x0a, 0xa7, 0xa9, 0xde, 0xe1, 0x39, + 0x7e, 0x95, 0xf8, 0xce, 0xae, 0xb4, 0x2d, 0x78, 0xd6, 0x72, 0x99, 0x60, 0xf7, 0xf4, 0x72, 0x3b, + 0x09, 0xee, 0x54, 0x0e, 0xbd, 0xda, 0x96, 0x72, 0x8a, 0x67, 0x04, 0x55, 0xb7, 0xbd, 0x0e, 0x4f, + 0x3b, 0x45, 0xb5, 0x9f, 0x66, 0x9b, 0x15, 0xa5, 0x3d, 0x4e, 0x69, 0x5a, 0x4e, 0x26, 0x2d, 0xaa, + 0xc2, 0x44, 0xdc, 0x62, 0x27, 0xd7, 0x6b, 0x5b, 0x11, 0x89, 0xb7, 0x42, 0xdf, 0x15, 0xef, 0xaa, + 0x29, 0x8d, 0xb1, 0x9e, 0xc1, 0xe3, 0xb6, 0x12, 0x94, 0xcb, 0x86, 0xe3, 0xf9, 0xad, 0x88, 0xa4, + 0x5c, 0x06, 0x4c, 0x2e, 0x4b, 0x19, 0x3c, 0x6e, 0x2b, 0x61, 0xff, 0xb1, 0x05, 0xa7, 0x3b, 0x84, + 0x77, 0xf0, 0xa0, 0xc3, 0x4d, 0x2f, 0x4e, 0x54, 0x6e, 0x6a, 0x2d, 0xe8, 0x90, 0xc3, 0xb1, 0xa2, + 0xa0, 0x52, 0xc8, 0x4d, 0xe3, 0xec, 0xb1, 0xa9, 0x38, 0xc0, 0x16, 0xd8, 0xde, 0x12, 0x48, 0xa1, + 0x0b, 0xd0, 0xd7, 0x8a, 0x49, 0x24, 0x9f, 0x69, 0x92, 0x4b, 0x14, 0xf3, 0x86, 0x30, 0x0c, 0x55, + 0x76, 0x36, 0x95, 0x23, 0x42, 0x53, 0x76, 0xb8, 0x2b, 0x82, 0xe3, 0xec, 0x6f, 0x94, 0x61, 0x3c, + 0x13, 0xe6, 0x45, 0x1b, 0xb2, 0x1d, 0x06, 0x5e, 0x12, 0xaa, 0xa4, 0x45, 0xfc, 0x65, 0x18, 0xd2, + 0xdc, 0x5a, 0x15, 0x70, 0xac, 0x28, 0xd0, 0xd3, 0xe6, 0x13, 0xd6, 0x69, 0x9b, 0xe7, 0xab, 0xc6, + 0x6b, 0x76, 0x45, 0xf3, 0xe5, 0x3f, 0x09, 0x7d, 0xcd, 0x50, 0xbd, 0x4c, 0xaa, 0x84, 0x1e, 0xcf, + 0x57, 0x6b, 0x61, 0xe8, 0x63, 0x86, 0x44, 0x4f, 0x89, 0xde, 0x67, 0xfc, 0xb7, 0xd8, 0x71, 0xc3, + 0x58, 0x1b, 0x82, 0x67, 0x60, 0xf0, 0x1e, 0xd9, 0x8d, 0xbc, 0x60, 0x33, 0xeb, 0xbd, 0xbe, 0xc1, + 0xc1, 0x58, 0xe2, 0xcd, 0x9c, 0xf8, 0x83, 0xc7, 0x9c, 0x13, 0x7f, 0x28, 0x37, 0x52, 0xf5, 0x37, + 0x2c, 0x18, 0x67, 0x99, 0xfc, 0xc4, 0x45, 0x5a, 0x2f, 0x0c, 0x4e, 0x60, 0x7b, 0x7c, 0x12, 0xfa, + 0x23, 0x5a, 0x69, 0x36, 0xad, 0x35, 0x6b, 0x09, 0xe6, 0x38, 0xf4, 0x18, 0xf4, 0xb1, 0x26, 0xd0, + 0xcf, 0x38, 0xc2, 0xd3, 0x04, 0x57, 0x9d, 0xc4, 0xc1, 0x0c, 0xca, 0x6e, 0x45, 0x60, 0xd2, 0xf4, + 0x3d, 0xde, 0xe8, 0xd4, 0xe9, 0xf4, 0x41, 0xbb, 0x15, 0xd1, 0xb1, 0x91, 0x0f, 0xeb, 0x56, 0x44, + 0x67, 0xe6, 0x87, 0xab, 0xa8, 0xff, 0xb3, 0x04, 0xe7, 0x3b, 0x96, 0x4b, 0xcf, 0xc1, 0x96, 0x8c, + 0x73, 0xb0, 0x2b, 0x99, 0x73, 0x30, 0xfb, 0xf0, 0xd2, 0x0f, 0xe7, 0x64, 0xac, 0xf3, 0x81, 0x55, + 0xf9, 0x04, 0x0f, 0xac, 0xfa, 0x8a, 0xaa, 0x0e, 0xfd, 0x39, 0xaa, 0xc3, 0xef, 0x5b, 0xf0, 0x68, + 0xc7, 0x21, 0xfb, 0xc0, 0x5d, 0x43, 0xe9, 0xd8, 0xca, 0x2e, 0x8a, 0xf5, 0x2f, 0x97, 0xbb, 0xf4, + 0x8a, 0xa9, 0xd8, 0x17, 0xe9, 0x2a, 0xc4, 0x90, 0xb1, 0x50, 0x8a, 0x46, 0xf8, 0x0a, 0xc4, 0x61, + 0x58, 0x61, 0x51, 0xac, 0x5d, 0xe3, 0xe0, 0x8d, 0x5c, 0x3c, 0xe2, 0x84, 0x9a, 0x31, 0xbd, 0x85, + 0xfa, 0xfd, 0xe0, 0xcc, 0xe5, 0x0e, 0x74, 0x57, 0x33, 0x9a, 0xca, 0x47, 0x31, 0x9a, 0x46, 0x3a, + 0x1b, 0x4c, 0x68, 0x0e, 0xc6, 0xb7, 0xbd, 0x80, 0x3d, 0xa5, 0x67, 0x6a, 0x25, 0xea, 0x2e, 0xdd, + 0xaa, 0x89, 0xc6, 0x59, 0xfa, 0xa9, 0x57, 0x60, 0xf4, 0xe8, 0x3e, 0x99, 0xf7, 0xca, 0xf0, 0xe1, + 0x43, 0x16, 0x05, 0xbe, 0x3b, 0x18, 0xdf, 0x45, 0xdb, 0x1d, 0xda, 0xbe, 0x4d, 0x0d, 0xce, 0x6c, + 0xb4, 0x7c, 0x7f, 0x97, 0x45, 0x91, 0x10, 0x57, 0x52, 0x08, 0x8d, 0x4f, 0x3d, 0x72, 0xbb, 0xd4, + 0x81, 0x06, 0x77, 0x2c, 0x89, 0x3e, 0x0b, 0x28, 0x5c, 0x67, 0xb9, 0x2e, 0xdd, 0xf4, 0xfe, 0x33, + 0xfb, 0x04, 0xe5, 0x74, 0xaa, 0xde, 0x6a, 0xa3, 0xc0, 0x1d, 0x4a, 0x51, 0xfd, 0x8f, 0xbd, 0x8f, + 0xab, 0x9a, 0x95, 0xd1, 0xff, 0xb0, 0x8e, 0xc4, 0x26, 0x2d, 0xba, 0x06, 0xa7, 0x9c, 0x1d, 0xc7, + 0xe3, 0xd9, 0x6b, 0x24, 0x03, 0xae, 0x00, 0x2a, 0xaf, 0xc7, 0x5c, 0x96, 0x00, 0xb7, 0x97, 0x41, + 0x4d, 0xc3, 0x8d, 0xc5, 0x73, 0x5b, 0x7f, 0xea, 0x08, 0x12, 0x5c, 0xd8, 0xb1, 0x65, 0xff, 0xd8, + 0xa2, 0x5b, 0x5f, 0x87, 0x57, 0xd7, 0x8c, 0xe7, 0xda, 0xb5, 0xab, 0x2d, 0xed, 0xcf, 0xb5, 0x73, + 0x7f, 0xa0, 0x41, 0xcb, 0x45, 0x23, 0x4e, 0x83, 0x51, 0x0d, 0x6d, 0x53, 0xdc, 0xe8, 0x52, 0x14, + 0xe8, 0x2e, 0x0c, 0xba, 0xde, 0x8e, 0x17, 0x87, 0x51, 0x81, 0x07, 0x92, 0xdb, 0x02, 0x1c, 0xd3, + 0xd5, 0xb2, 0xca, 0x99, 0x60, 0xc9, 0xcd, 0xfe, 0x95, 0x12, 0x8c, 0xca, 0xfa, 0x5e, 0x6b, 0x85, + 0x89, 0x73, 0x02, 0x1b, 0xfa, 0x6b, 0xc6, 0x86, 0x3e, 0x5b, 0xec, 0x7a, 0x1b, 0x6b, 0x5c, 0xd7, + 0x8d, 0xfc, 0x73, 0x99, 0x8d, 0xfc, 0x72, 0x2f, 0x4c, 0x0f, 0xdf, 0xc0, 0xff, 0x9d, 0x05, 0xa7, + 0x0c, 0xfa, 0x13, 0xd8, 0x47, 0x6a, 0xe6, 0x3e, 0xf2, 0x5c, 0x0f, 0xbd, 0xe9, 0xb2, 0x7f, 0x7c, + 0xab, 0x94, 0xe9, 0x05, 0xdb, 0x37, 0xbe, 0x0c, 0x7d, 0x5b, 0x4e, 0xe4, 0x16, 0x4b, 0xe3, 0xd6, + 0x56, 0x7c, 0xe6, 0xba, 0x13, 0xb9, 0x7c, 0xf5, 0xbf, 0xa4, 0xde, 0x84, 0x71, 0x22, 0x37, 0x37, + 0x42, 0x9b, 0x55, 0x8a, 0xae, 0xc2, 0x40, 0xdc, 0x08, 0x9b, 0x2a, 0x16, 0xee, 0x02, 0x7f, 0x2f, + 0x86, 0x42, 0x0e, 0xf6, 0xa6, 0x91, 0x59, 0x1d, 0x05, 0x63, 0x41, 0x3f, 0x45, 0xa0, 0xa2, 0xaa, + 0x3e, 0xc6, 0x58, 0xe0, 0xf7, 0xca, 0x70, 0xba, 0x83, 0xa4, 0xa0, 0xaf, 0x18, 0xa3, 0xf6, 0x4a, + 0xcf, 0xa2, 0xf6, 0x3e, 0xc7, 0xed, 0x2b, 0xcc, 0x4a, 0x72, 0x85, 0x6c, 0x1c, 0xa1, 0xfa, 0xdb, + 0x31, 0xc9, 0x56, 0x4f, 0x41, 0xf9, 0xd5, 0xd3, 0x6a, 0x4f, 0x68, 0xf0, 0x69, 0x35, 0xaa, 0x9d, + 0xc7, 0xf8, 0x8d, 0xdf, 0xed, 0x83, 0x33, 0x9d, 0x6e, 0xd0, 0xa2, 0x5f, 0xb4, 0x32, 0x59, 0xda, + 0x5f, 0xed, 0xfd, 0x1a, 0x2e, 0x4f, 0xdd, 0x2e, 0xb2, 0x4e, 0xcc, 0x98, 0x79, 0xdb, 0x73, 0x47, + 0x5b, 0xd4, 0xce, 0x6e, 0x55, 0x44, 0x3c, 0xdf, 0xbe, 0x5c, 0x0f, 0x3e, 0x73, 0x84, 0xa6, 0x88, + 0x94, 0xfd, 0x71, 0xe6, 0x56, 0x85, 0x04, 0xe7, 0xdf, 0xaa, 0x90, 0x6d, 0x98, 0xda, 0x84, 0x61, + 0xad, 0x5f, 0xc7, 0x28, 0x02, 0x1e, 0xdd, 0x9a, 0xb4, 0x56, 0x1f, 0xa3, 0x18, 0xfc, 0x6d, 0x0b, + 0x32, 0xe1, 0x2a, 0xca, 0x15, 0x63, 0x75, 0x75, 0xc5, 0x5c, 0x80, 0xbe, 0x28, 0xf4, 0x49, 0x36, + 0x7b, 0x38, 0x0e, 0x7d, 0x82, 0x19, 0x46, 0x3d, 0x0d, 0x59, 0xee, 0xf6, 0x34, 0x24, 0xb5, 0xcd, + 0x7d, 0xb2, 0x43, 0xa4, 0x63, 0x44, 0x2d, 0xde, 0x2b, 0x14, 0x88, 0x39, 0xce, 0xfe, 0xbd, 0x32, + 0x0c, 0x70, 0xef, 0xc3, 0x09, 0xec, 0xce, 0x35, 0xe1, 0x08, 0x28, 0x74, 0xab, 0x95, 0xb7, 0x6a, + 0xa6, 0xea, 0x24, 0x0e, 0x17, 0x2c, 0xd5, 0xc7, 0xd4, 0x79, 0x80, 0x66, 0x8c, 0x51, 0x98, 0xca, + 0xd8, 0xb7, 0xc0, 0x79, 0x68, 0x63, 0xb2, 0x05, 0x10, 0xb3, 0xc7, 0xc8, 0x28, 0x0f, 0x91, 0x73, + 0xef, 0xc5, 0x42, 0xed, 0xa8, 0xab, 0x62, 0xbc, 0x35, 0x69, 0xb2, 0x2f, 0x85, 0xc0, 0x1a, 0xef, + 0xa9, 0x97, 0xa1, 0xa2, 0x88, 0xf3, 0x14, 0xff, 0x11, 0x5d, 0x34, 0xff, 0x02, 0x8c, 0x67, 0xea, + 0xea, 0xc9, 0x6e, 0xf8, 0x6d, 0x0b, 0xc6, 0x33, 0xaf, 0x28, 0xa3, 0x77, 0x2d, 0x38, 0xe3, 0x77, + 0x70, 0x3e, 0x89, 0xcf, 0x7c, 0x14, 0xb7, 0x95, 0x32, 0x19, 0x3a, 0x61, 0x71, 0xc7, 0xda, 0xa8, + 0x29, 0xc9, 0x5f, 0x56, 0x74, 0x7c, 0x11, 0xfd, 0x37, 0xc2, 0x13, 0x84, 0x72, 0x18, 0x56, 0x58, + 0xfb, 0x27, 0x16, 0x9c, 0x6a, 0x7b, 0xa8, 0xf7, 0x83, 0xd2, 0x0d, 0x91, 0x0a, 0xb5, 0xd4, 0x25, + 0x15, 0xaa, 0xde, 0xcb, 0xf2, 0xa1, 0xbd, 0xfc, 0x75, 0x0b, 0x84, 0x84, 0x9e, 0x80, 0xde, 0xb7, + 0x6c, 0xea, 0x7d, 0x1f, 0x29, 0x22, 0xf4, 0x5d, 0x14, 0xbe, 0x3f, 0xb5, 0x00, 0x71, 0x82, 0xec, + 0x13, 0x8c, 0xdc, 0x79, 0xa9, 0x19, 0x2c, 0xe9, 0x2c, 0x51, 0x18, 0xac, 0x51, 0xf5, 0x98, 0x4f, + 0x5f, 0x3d, 0x5d, 0xd6, 0xb9, 0x61, 0xe8, 0x32, 0x0c, 0x8b, 0xa7, 0x8b, 0x56, 0xd3, 0x67, 0xc9, + 0xc6, 0xd9, 0x03, 0x99, 0x29, 0x18, 0xeb, 0x34, 0xc6, 0xd7, 0xea, 0x3b, 0xf4, 0x6b, 0xfd, 0x4e, + 0x19, 0xb2, 0x21, 0x2f, 0xe8, 0x2d, 0x18, 0x69, 0x38, 0x4d, 0x67, 0xdd, 0xf3, 0xbd, 0xc4, 0x23, + 0x71, 0xb1, 0xa3, 0xb6, 0x05, 0xad, 0x84, 0x70, 0x94, 0x6b, 0x10, 0x6c, 0x70, 0x44, 0x33, 0x00, + 0xcd, 0xc8, 0xdb, 0xf1, 0x7c, 0xb2, 0xc9, 0xf4, 0x32, 0x16, 0x33, 0xcb, 0x4f, 0x8d, 0x24, 0x14, + 0x6b, 0x14, 0x1d, 0x62, 0x2c, 0xcb, 0x27, 0x11, 0x63, 0xd9, 0xd7, 0x63, 0x8c, 0x65, 0x7f, 0xa1, + 0x18, 0x4b, 0x0c, 0xe7, 0xa4, 0x7f, 0x9b, 0xfe, 0x5f, 0xf2, 0x7c, 0xc2, 0xd3, 0x29, 0x8a, 0x98, + 0xda, 0xa9, 0xfd, 0xbd, 0xe9, 0x73, 0xb8, 0x23, 0x05, 0xee, 0x52, 0xd2, 0x6e, 0xc1, 0xe9, 0x3a, + 0x89, 0x3c, 0x96, 0xe5, 0xca, 0x4d, 0x27, 0xf5, 0x17, 0xa1, 0x12, 0x65, 0xd6, 0x93, 0x1e, 0x2f, + 0x3c, 0x6a, 0x79, 0x51, 0xe4, 0xfa, 0x91, 0xb2, 0xb4, 0xff, 0x6a, 0x09, 0x06, 0x45, 0x68, 0xd9, + 0x09, 0x6c, 0xb4, 0x37, 0x0c, 0x33, 0xf8, 0x99, 0xbc, 0xb9, 0xce, 0x9a, 0xd5, 0xd5, 0x00, 0xae, + 0x67, 0x0c, 0xe0, 0xe7, 0x8a, 0xb1, 0x3b, 0xdc, 0xf4, 0xfd, 0x41, 0x09, 0xc6, 0xcc, 0x50, 0xbb, + 0x13, 0x18, 0x96, 0xd7, 0x61, 0x30, 0x16, 0x71, 0x68, 0xa5, 0x22, 0x51, 0x34, 0xd9, 0x4f, 0xac, + 0x7c, 0x1d, 0x32, 0xf2, 0x4c, 0xb2, 0xeb, 0x18, 0xea, 0x56, 0x3e, 0x89, 0x50, 0x37, 0xfb, 0xfb, + 0x6c, 0x31, 0xd6, 0x07, 0xf2, 0x04, 0x36, 0x93, 0xd7, 0xcc, 0x65, 0xfb, 0x52, 0x21, 0x89, 0x10, + 0xcd, 0xeb, 0xb2, 0xa9, 0x7c, 0xc7, 0x82, 0x61, 0x41, 0x78, 0x02, 0x1d, 0xf8, 0xac, 0xd9, 0x81, + 0xa7, 0x0a, 0x75, 0xa0, 0x4b, 0xcb, 0xff, 0x6e, 0x49, 0xb5, 0xbc, 0x26, 0x9e, 0xb4, 0xcd, 0xcd, + 0xb6, 0x39, 0xd4, 0x8c, 0xc2, 0x24, 0x6c, 0x84, 0xbe, 0x50, 0x23, 0x1e, 0x4b, 0x2f, 0x37, 0x70, + 0xf8, 0x81, 0xf6, 0x1b, 0x2b, 0x6a, 0x16, 0x7b, 0x1f, 0x46, 0x89, 0xd8, 0xda, 0x3a, 0x3d, 0xa8, + 0xbb, 0x2e, 0x1f, 0x2c, 0xa7, 0x30, 0x71, 0x2f, 0xa8, 0xd7, 0x87, 0x7a, 0xd3, 0xbb, 0x0a, 0x8a, + 0x13, 0xd6, 0xb8, 0xca, 0x20, 0x58, 0x56, 0x43, 0xbf, 0xe9, 0x7b, 0xbe, 0x29, 0xe0, 0x58, 0x51, + 0xd8, 0x2f, 0xb3, 0x15, 0x97, 0x0d, 0x4f, 0x6f, 0xd7, 0x08, 0xfe, 0xca, 0x80, 0x1a, 0x58, 0xe6, + 0x52, 0xba, 0xa9, 0x5f, 0x56, 0x28, 0xba, 0xac, 0xd1, 0x26, 0xe8, 0x71, 0x7b, 0xe9, 0xdd, 0x06, + 0x44, 0xda, 0x0e, 0x2c, 0x5e, 0x2e, 0xbc, 0x52, 0xf6, 0x70, 0x44, 0xc1, 0x52, 0x14, 0xb1, 0xbc, + 0x2c, 0xcb, 0xb5, 0x6c, 0x86, 0xd4, 0x05, 0x89, 0xc0, 0x29, 0x0d, 0x9a, 0x15, 0x46, 0x8d, 0xf9, + 0xde, 0xb1, 0x34, 0x6a, 0xe4, 0x90, 0x68, 0x56, 0xcd, 0x65, 0x18, 0x56, 0x39, 0xe2, 0x6b, 0x3c, + 0xd5, 0x77, 0x85, 0xeb, 0x3d, 0x8b, 0x29, 0x18, 0xeb, 0x34, 0x68, 0x19, 0x4e, 0xbb, 0x2a, 0xe6, + 0xb9, 0xd6, 0x5a, 0xf7, 0xbd, 0x06, 0x2d, 0xca, 0xef, 0x2b, 0x3d, 0xb2, 0xbf, 0x37, 0x7d, 0xba, + 0xda, 0x8e, 0xc6, 0x9d, 0xca, 0xa0, 0x35, 0x18, 0x8f, 0x79, 0x2e, 0x7c, 0x19, 0xd8, 0x2a, 0x12, + 0x07, 0x3e, 0x2b, 0x4f, 0x4a, 0xea, 0x26, 0xfa, 0x80, 0x81, 0xf8, 0x9a, 0x20, 0x43, 0x61, 0xb3, + 0x2c, 0xd0, 0xab, 0x30, 0xe6, 0xeb, 0xcf, 0x7c, 0xd5, 0x44, 0xe8, 0xb7, 0x8a, 0x29, 0x31, 0x1e, + 0x01, 0xab, 0xe1, 0x0c, 0x35, 0x7a, 0x1d, 0x26, 0x75, 0x88, 0xc8, 0x9f, 0xe0, 0x04, 0x9b, 0x24, + 0x16, 0x49, 0xb8, 0x1f, 0xdb, 0xdf, 0x9b, 0x9e, 0x5c, 0xe9, 0x42, 0x83, 0xbb, 0x96, 0x46, 0x57, + 0x61, 0x44, 0x8e, 0xa4, 0x16, 0x06, 0x9e, 0x46, 0x33, 0x69, 0x38, 0x6c, 0x50, 0xbe, 0xbf, 0x03, + 0xa1, 0x2f, 0xd3, 0xc2, 0xda, 0xd6, 0x8a, 0xbe, 0x04, 0x23, 0x7a, 0x1b, 0xb3, 0x7b, 0x66, 0xfe, + 0xd3, 0x69, 0x62, 0x8b, 0x56, 0x2d, 0xd7, 0x71, 0xd8, 0xe0, 0x6d, 0xdf, 0x82, 0x81, 0xfa, 0x6e, + 0xdc, 0x48, 0xfc, 0x87, 0xf5, 0xd4, 0x75, 0x03, 0xc6, 0x33, 0x6f, 0x42, 0xab, 0xc7, 0xc5, 0xad, + 0x87, 0xf5, 0xb8, 0xb8, 0xfd, 0x55, 0x0b, 0xfa, 0xd7, 0x1c, 0x2f, 0xff, 0xf9, 0x8a, 0x22, 0x4d, + 0x46, 0x2f, 0xc1, 0x00, 0xd9, 0xd8, 0x20, 0x0d, 0xf9, 0x58, 0xf9, 0xe3, 0x52, 0xb5, 0x59, 0x64, + 0x50, 0x3a, 0x35, 0x59, 0x65, 0xfc, 0x2f, 0x16, 0xc4, 0xf6, 0x7f, 0xb4, 0x00, 0xd6, 0x42, 0x5f, + 0x9e, 0x75, 0xe5, 0xb4, 0x64, 0xbe, 0xed, 0x21, 0x8d, 0xa7, 0x3b, 0x3c, 0xa4, 0x81, 0x52, 0x86, + 0x1d, 0x9e, 0xd1, 0x50, 0xbd, 0x29, 0x17, 0xea, 0x4d, 0x5f, 0x2f, 0xbd, 0xf9, 0xba, 0x05, 0x22, + 0x0c, 0xa9, 0x80, 0x24, 0xb8, 0x32, 0xf9, 0xbd, 0x91, 0x19, 0xe5, 0xd9, 0x22, 0xd7, 0x85, 0x44, + 0x3e, 0x14, 0x25, 0x9b, 0x46, 0x16, 0x14, 0x83, 0xab, 0xfd, 0x9b, 0x16, 0x0c, 0x73, 0xf4, 0x2a, + 0xd3, 0x23, 0xf3, 0xdb, 0xd5, 0x53, 0x0e, 0x38, 0x96, 0x1b, 0x9e, 0x32, 0x56, 0xb9, 0xc0, 0xf4, + 0xdc, 0xf0, 0x12, 0x81, 0x53, 0x1a, 0xf4, 0x0c, 0x0c, 0xc6, 0xad, 0x75, 0x46, 0x9e, 0x89, 0x49, + 0xaa, 0x73, 0x30, 0x96, 0x78, 0xfb, 0x17, 0x10, 0x18, 0x5d, 0x33, 0xf2, 0x8e, 0x59, 0x0f, 0x3d, + 0xef, 0xd8, 0x1b, 0x30, 0x44, 0xb6, 0x9b, 0xc9, 0x6e, 0xd5, 0x8b, 0x8a, 0x65, 0x80, 0x5c, 0x14, + 0xd4, 0xed, 0xdc, 0x25, 0x06, 0x2b, 0x8e, 0x5d, 0xb2, 0xc8, 0x95, 0x3f, 0x10, 0x59, 0xe4, 0xfa, + 0x7e, 0x2a, 0x59, 0xe4, 0x5e, 0x87, 0xc1, 0x4d, 0x2f, 0xc1, 0xa4, 0x19, 0x8a, 0xfb, 0xa5, 0x39, + 0x87, 0x87, 0xd7, 0x38, 0x71, 0x7b, 0x6a, 0x28, 0x81, 0xc0, 0x92, 0x1d, 0x5a, 0x83, 0x01, 0x6e, + 0x7b, 0x88, 0xc4, 0x6c, 0x1f, 0x2b, 0xe2, 0xcf, 0x69, 0xcf, 0x51, 0x26, 0x02, 0xcf, 0x04, 0x2f, + 0x99, 0x35, 0x6e, 0xf0, 0xfd, 0x67, 0x8d, 0x53, 0xb9, 0xde, 0x86, 0x1e, 0x56, 0xae, 0x37, 0x23, + 0x67, 0x5e, 0xe5, 0x38, 0x72, 0xe6, 0x7d, 0xdd, 0x82, 0xb3, 0xcd, 0x4e, 0x19, 0x27, 0x45, 0xd6, + 0xb6, 0x4f, 0x1f, 0x21, 0x03, 0xa7, 0x51, 0x35, 0xbb, 0xb5, 0xd7, 0x91, 0x0c, 0x77, 0xae, 0x58, + 0x26, 0xdf, 0x1b, 0x7e, 0xff, 0xc9, 0xf7, 0x8e, 0x3b, 0xbd, 0x5b, 0x9a, 0x8a, 0x6f, 0xf4, 0x58, + 0x52, 0xf1, 0x8d, 0x3d, 0xc4, 0x54, 0x7c, 0x5a, 0x12, 0xbd, 0xf1, 0x87, 0x9b, 0x44, 0x6f, 0x0b, + 0x86, 0xdd, 0xf0, 0x7e, 0x70, 0xdf, 0x89, 0xdc, 0xb9, 0xda, 0xb2, 0xc8, 0xd9, 0x96, 0x93, 0x18, + 0xa4, 0x9a, 0x16, 0x30, 0x6a, 0xe0, 0x8e, 0xcb, 0x14, 0x89, 0x75, 0xd6, 0x22, 0x9d, 0xe0, 0xa9, + 0xf7, 0x99, 0x4e, 0xd0, 0x48, 0xca, 0x87, 0x8e, 0x23, 0x29, 0xdf, 0x5b, 0x2c, 0x43, 0xc0, 0x86, + 0xb7, 0xb9, 0xea, 0x34, 0xd9, 0xad, 0xb6, 0xdc, 0x1a, 0x16, 0x24, 0x79, 0x7b, 0x0d, 0x0a, 0x85, + 0x53, 0xa6, 0xed, 0x69, 0xff, 0xce, 0x9c, 0x74, 0xda, 0xbf, 0xb3, 0xc7, 0x98, 0xf6, 0xef, 0xdc, + 0x89, 0xa6, 0xfd, 0x7b, 0xe4, 0xa7, 0x92, 0xf6, 0xef, 0x2f, 0xc1, 0xf9, 0xc3, 0x3f, 0x47, 0x9a, + 0x56, 0xba, 0x96, 0xba, 0x0c, 0x32, 0x69, 0xa5, 0x99, 0xaa, 0xa3, 0x51, 0x15, 0xce, 0x3e, 0xf6, + 0x6d, 0x0b, 0x1e, 0xe9, 0x92, 0x9c, 0xa7, 0xf0, 0x85, 0x90, 0x26, 0x8c, 0x37, 0xcd, 0xa2, 0x85, + 0xaf, 0x70, 0x19, 0xc9, 0x80, 0x54, 0x70, 0x61, 0x06, 0x81, 0xb3, 0xec, 0xe7, 0x3f, 0xf2, 0xc3, + 0xf7, 0xce, 0x7f, 0xe8, 0x47, 0xef, 0x9d, 0xff, 0xd0, 0x1f, 0xbe, 0x77, 0xfe, 0x43, 0x3f, 0xb7, + 0x7f, 0xde, 0xfa, 0xe1, 0xfe, 0x79, 0xeb, 0x47, 0xfb, 0xe7, 0xad, 0x3f, 0xde, 0x3f, 0x6f, 0x7d, + 0xfd, 0x27, 0xe7, 0x3f, 0xf4, 0xf9, 0xd2, 0xce, 0xe5, 0xff, 0x1f, 0x00, 0x00, 0xff, 0xff, 0xac, + 0x63, 0x67, 0xe3, 0x01, 0xbb, 0x00, 0x00, } diff --git a/vendor/k8s.io/kubernetes/pkg/api/v1/generated.proto b/vendor/k8s.io/kubernetes/pkg/api/v1/generated.proto index 00e26331..73dca3fe 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/v1/generated.proto +++ b/vendor/k8s.io/kubernetes/pkg/api/v1/generated.proto @@ -141,7 +141,7 @@ message Binding { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // The target object that you want to bind to the standard object. optional ObjectReference target = 2; @@ -240,7 +240,7 @@ message ComponentStatus { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // List of component conditions observed // +optional @@ -263,7 +263,7 @@ message ConfigMap { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Data contains the configuration data. // Each key must be a valid DNS_SUBDOMAIN with an optional leading dot. @@ -279,6 +279,10 @@ message ConfigMap { message ConfigMapEnvSource { // The ConfigMap to select from. optional LocalObjectReference localObjectReference = 1; + + // Specify whether the ConfigMap must be defined + // +optional + optional bool optional = 2; } // Selects a key from a ConfigMap. @@ -288,6 +292,10 @@ message ConfigMapKeySelector { // The key to select. optional string key = 2; + + // Specify whether the ConfigMap or it's key must be defined + // +optional + optional bool optional = 3; } // ConfigMapList is a resource containing a list of ConfigMap objects. @@ -314,8 +322,8 @@ message ConfigMapVolumeSource { // key and content is the value. If specified, the listed keys will be // projected into the specified paths, and unlisted keys will not be // present. If a key is specified which is not present in the ConfigMap, - // the volume setup will error. Paths must be relative and may not contain - // the '..' path or start with '..'. + // the volume setup will error unless it is marked optional. Paths must be + // relative and may not contain the '..' path or start with '..'. // +optional repeated KeyToPath items = 2; @@ -326,6 +334,10 @@ message ConfigMapVolumeSource { // mode, like fsGroup, and the result can be other mode bits set. // +optional optional int32 defaultMode = 3; + + // Specify whether the ConfigMap or it's keys must be defined + // +optional + optional bool optional = 4; } // A single application container that you want to run within a pod. @@ -426,11 +438,23 @@ message Container { // Optional: Path at which the file to which the container's termination message // will be written is mounted into the container's filesystem. // Message written is intended to be brief final status, such as an assertion failure message. + // Will be truncated by the node if greater than 4096 bytes. The total message length across + // all containers will be limited to 12kb. // Defaults to /dev/termination-log. // Cannot be updated. // +optional optional string terminationMessagePath = 13; + // Indicate how the termination message should be populated. File will use the contents of + // terminationMessagePath to populate the container status message on both success and failure. + // FallbackToLogsOnError will use the last chunk of container log output if the termination + // message file is empty and the container exited with an error. + // The log output is limited to 2048 bytes or 80 lines, whichever is smaller. + // Defaults to File. + // Cannot be updated. + // +optional + optional string terminationMessagePolicy = 20; + // Image pull policy. // One of Always, Never, IfNotPresent. // Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. @@ -615,6 +639,8 @@ message DaemonEndpoint { } // DeleteOptions may be provided when deleting an API object +// DEPRECATED: This type has been moved to meta/v1 and will be removed soon. +// +k8s:openapi-gen=false message DeleteOptions { // The duration in seconds before the object should be deleted. Value must be non-negative integer. // The value zero indicates delete immediately. If this value is nil, the default grace period for the @@ -767,7 +793,7 @@ message Endpoints { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // The set of all endpoints is the union of all subsets. Addresses are placed into // subsets according to the IPs they share. A single address with multiple ports, @@ -799,6 +825,10 @@ message EnvFromSource { // The ConfigMap to select from // +optional optional ConfigMapEnvSource configMapRef = 2; + + // The Secret to select from + // +optional + optional SecretEnvSource secretRef = 3; } // EnvVar represents an environment variable present in a Container. @@ -848,7 +878,7 @@ message EnvVarSource { message Event { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - optional ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // The object that this event is about. optional ObjectReference involvedObject = 2; @@ -1195,7 +1225,7 @@ message LimitRange { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec defines the limits enforced. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -1260,6 +1290,8 @@ message List { } // ListOptions is the query options to a standard REST list call. +// DEPRECATED: This type has been moved to meta/v1 and will be removed soon. +// +k8s:openapi-gen=false message ListOptions { // A selector to restrict the list of returned objects by their labels. // Defaults to everything. @@ -1347,7 +1379,7 @@ message Namespace { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec defines the behavior of the Namespace. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -1394,7 +1426,7 @@ message Node { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec defines the behavior of a node. // http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -1652,6 +1684,8 @@ message ObjectFieldSelector { // ObjectMeta is metadata that all persisted resources must have, which includes all objects // users must create. +// DEPRECATED: Use k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta instead - this type will be removed soon. +// +k8s:openapi-gen=false message ObjectMeta { // Name must be unique within a namespace. Is required when creating resources, although // some resources may allow a client to request the generation of an appropriate name @@ -1848,7 +1882,7 @@ message PersistentVolume { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec defines a specification of a persistent volume owned by the cluster. // Provisioned by an administrator. @@ -1869,7 +1903,7 @@ message PersistentVolumeClaim { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec defines the desired characteristics of a volume requested by a pod author. // More info: http://kubernetes.io/docs/user-guide/persistent-volumes#persistentvolumeclaims @@ -2111,7 +2145,7 @@ message Pod { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Specification of the desired behavior of the pod. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -2378,6 +2412,19 @@ message PodLogOptions { optional int64 limitBytes = 8; } +// PodPortForwardOptions is the query options to a Pod's port forward call +// when using WebSockets. +// The `port` query parameter must specify the port or +// ports (comma separated) to forward over. +// Port forwarding over SPDY does not use these options. It requires the port +// to be passed in the `port` header as part of request. +message PodPortForwardOptions { + // List of ports to forward + // Required when using WebSockets + // +optional + repeated int32 ports = 1; +} + // PodProxyOptions is the query options to a Pod's proxy call. message PodProxyOptions { // Path is the URL path to use for the current proxy request to pod. @@ -2551,6 +2598,11 @@ message PodSpec { // If specified, the pod's scheduling constraints // +optional optional Affinity affinity = 18; + + // If specified, the pod will be dispatched by specified scheduler. + // If not specified, the pod will be dispatched by default scheduler. + // +optional + optional string schedulername = 19; } // PodStatus represents information about the status of a pod. Status may trail the actual @@ -2607,7 +2659,7 @@ message PodStatusResult { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Most recently observed status of the pod. // This data may not be up to date. @@ -2623,7 +2675,7 @@ message PodTemplate { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Template defines the pods that will be created from this pod template. // http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -2647,7 +2699,7 @@ message PodTemplateSpec { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Specification of the desired behavior of the pod. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -2656,6 +2708,7 @@ message PodTemplateSpec { } // Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out. +// +k8s:openapi-gen=false message Preconditions { // Specifies the target UID. // +optional @@ -2806,7 +2859,7 @@ message RangeAllocation { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Range is string that identifies the range represented by 'data'. optional string range = 2; @@ -2821,7 +2874,7 @@ message ReplicationController { // be the same as the Pod(s) that the replication controller manages. // Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec defines the specification of the desired behavior of the replication controller. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -2947,7 +3000,7 @@ message ResourceQuota { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec defines the desired quota. // http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -3037,7 +3090,7 @@ message Secret { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Data contains the secret data. Each key must be a valid DNS_SUBDOMAIN // or leading dot followed by valid DNS_SUBDOMAIN. @@ -3060,6 +3113,20 @@ message Secret { optional string type = 3; } +// SecretEnvSource selects a Secret to populate the environment +// variables with. +// +// The contents of the target Secret's Data field will represent the +// key-value pairs as environment variables. +message SecretEnvSource { + // The Secret to select from. + optional LocalObjectReference localObjectReference = 1; + + // Specify whether the Secret must be defined + // +optional + optional bool optional = 2; +} + // SecretKeySelector selects a key of a Secret. message SecretKeySelector { // The name of the secret in the pod's namespace to select from. @@ -3067,6 +3134,10 @@ message SecretKeySelector { // The key of the secret to select from. Must be a valid secret key. optional string key = 2; + + // Specify whether the Secret or it's key must be defined + // +optional + optional bool optional = 3; } // SecretList is a list of Secret. @@ -3097,8 +3168,8 @@ message SecretVolumeSource { // key and content is the value. If specified, the listed keys will be // projected into the specified paths, and unlisted keys will not be // present. If a key is specified which is not present in the Secret, - // the volume setup will error. Paths must be relative and may not contain - // the '..' path or start with '..'. + // the volume setup will error unless it is marked optional. Paths must be + // relative and may not contain the '..' path or start with '..'. // +optional repeated KeyToPath items = 2; @@ -3109,6 +3180,10 @@ message SecretVolumeSource { // mode, like fsGroup, and the result can be other mode bits set. // +optional optional int32 defaultMode = 3; + + // Specify whether the Secret or it's keys must be defined + // +optional + optional bool optional = 4; } // SecurityContext holds security configuration that will be applied to a container. @@ -3169,7 +3244,7 @@ message Service { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec defines the behavior of a service. // http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -3192,7 +3267,7 @@ message ServiceAccount { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Secrets is the list of secrets allowed to be used by pods running using this ServiceAccount. // More info: http://kubernetes.io/docs/user-guide/secrets diff --git a/vendor/k8s.io/kubernetes/pkg/api/v1/helpers.go b/vendor/k8s.io/kubernetes/pkg/api/v1/helpers.go index 782180a6..f7f5ec0d 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/v1/helpers.go +++ b/vendor/k8s.io/kubernetes/pkg/api/v1/helpers.go @@ -26,7 +26,6 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/fields" ) // IsOpaqueIntResourceName returns true if the resource name has the opaque @@ -48,7 +47,7 @@ func OpaqueIntResourceName(name string) ResourceName { // NewDeleteOptions returns a DeleteOptions indicating the resource should // be deleted within the specified grace period. Use zero to indicate // immediate deletion. If you would prefer to use the default grace period, -// use &api.DeleteOptions{} directly. +// use &metav1.DeleteOptions{} directly. func NewDeleteOptions(grace int64) *DeleteOptions { return &DeleteOptions{GracePeriodSeconds: &grace} } @@ -86,32 +85,10 @@ var standardFinalizers = sets.NewString( FinalizerOrphan, ) -// HasAnnotation returns a bool if passed in annotation exists -func HasAnnotation(obj ObjectMeta, ann string) bool { - _, found := obj.Annotations[ann] - return found -} - -// SetMetaDataAnnotation sets the annotation and value -func SetMetaDataAnnotation(obj *ObjectMeta, ann string, value string) { - if obj.Annotations == nil { - obj.Annotations = make(map[string]string) - } - obj.Annotations[ann] = value -} - func IsStandardFinalizerName(str string) bool { return standardFinalizers.Has(str) } -// SingleObject returns a ListOptions for watching a single object. -func SingleObject(meta ObjectMeta) ListOptions { - return ListOptions{ - FieldSelector: fields.OneTermEqualSelector("metadata.name", meta.Name).String(), - ResourceVersion: meta.ResourceVersion, - } -} - // AddToNodeAddresses appends the NodeAddresses to the passed-by-pointer slice, // only if they do not already exist func AddToNodeAddresses(addresses *[]NodeAddress, addAddresses ...NodeAddress) { diff --git a/vendor/k8s.io/kubernetes/pkg/api/v1/helpers_test.go b/vendor/k8s.io/kubernetes/pkg/api/v1/helpers_test.go index ebffcfd0..72ffabe8 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/v1/helpers_test.go +++ b/vendor/k8s.io/kubernetes/pkg/api/v1/helpers_test.go @@ -190,7 +190,7 @@ func TestGetAffinityFromPod(t *testing.T) { }, { pod: &Pod{ - ObjectMeta: ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ AffinityAnnotationKey: ` {"nodeAffinity": { "requiredDuringSchedulingIgnoredDuringExecution": { @@ -209,7 +209,7 @@ func TestGetAffinityFromPod(t *testing.T) { }, { pod: &Pod{ - ObjectMeta: ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ AffinityAnnotationKey: ` {"nodeAffinity": { "requiredDuringSchedulingIgnoredDuringExecution": { @@ -350,7 +350,7 @@ func TestGetAvoidPodsFromNode(t *testing.T) { }, { node: &Node{ - ObjectMeta: ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ PreferAvoidPodsAnnotationKey: ` { @@ -395,7 +395,7 @@ func TestGetAvoidPodsFromNode(t *testing.T) { { node: &Node{ // Missing end symbol of "podController" and "podSignature" - ObjectMeta: ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ PreferAvoidPodsAnnotationKey: ` { diff --git a/vendor/k8s.io/kubernetes/pkg/api/v1/meta.go b/vendor/k8s.io/kubernetes/pkg/api/v1/meta.go index 89ea6847..fd30ef1f 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/v1/meta.go +++ b/vendor/k8s.io/kubernetes/pkg/api/v1/meta.go @@ -17,14 +17,13 @@ limitations under the License. package v1 import ( - "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" ) -func (obj *ObjectMeta) GetObjectMeta() meta.Object { return obj } +func (obj *ObjectMeta) GetObjectMeta() metav1.Object { return obj } -// Namespace implements meta.Object for any object with an ObjectMeta typed field. Allows +// Namespace implements metav1.Object for any object with an ObjectMeta typed field. Allows // fast, direct access to metadata fields for API objects. func (meta *ObjectMeta) GetNamespace() string { return meta.Namespace } func (meta *ObjectMeta) SetNamespace(namespace string) { meta.Namespace = namespace } diff --git a/vendor/k8s.io/kubernetes/pkg/api/v1/register.go b/vendor/k8s.io/kubernetes/pkg/api/v1/register.go index 915a66f6..5c2dfddd 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/v1/register.go +++ b/vendor/k8s.io/kubernetes/pkg/api/v1/register.go @@ -74,13 +74,10 @@ func addKnownTypes(scheme *runtime.Scheme) error { &PersistentVolumeList{}, &PersistentVolumeClaim{}, &PersistentVolumeClaimList{}, - &DeleteOptions{}, - &metav1.ExportOptions{}, - &metav1.GetOptions{}, - &ListOptions{}, &PodAttachOptions{}, &PodLogOptions{}, &PodExecOptions{}, + &PodPortForwardOptions{}, &PodProxyOptions{}, &ComponentStatus{}, &ComponentStatusList{}, diff --git a/vendor/k8s.io/kubernetes/pkg/api/v1/types.generated.go b/vendor/k8s.io/kubernetes/pkg/api/v1/types.generated.go index 3bc5cf24..997fea2e 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/v1/types.generated.go +++ b/vendor/k8s.io/kubernetes/pkg/api/v1/types.generated.go @@ -5935,7 +5935,13 @@ func (x *PersistentVolume) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -5945,7 +5951,13 @@ func (x *PersistentVolume) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -6069,24 +6081,30 @@ func (x *PersistentVolume) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = PersistentVolumeSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = PersistentVolumeStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -6099,16 +6117,16 @@ func (x *PersistentVolume) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6116,21 +6134,21 @@ func (x *PersistentVolume) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6138,38 +6156,44 @@ func (x *PersistentVolume) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6177,16 +6201,16 @@ func (x *PersistentVolume) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Spec = PersistentVolumeSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6194,21 +6218,21 @@ func (x *PersistentVolume) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Status = PersistentVolumeStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -8602,7 +8626,13 @@ func (x *PersistentVolumeClaim) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -8612,7 +8642,13 @@ func (x *PersistentVolumeClaim) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -8736,24 +8772,30 @@ func (x *PersistentVolumeClaim) codecDecodeSelfFromMap(l int, d *codec1978.Decod } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = PersistentVolumeClaimSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = PersistentVolumeClaimStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -8766,16 +8808,16 @@ func (x *PersistentVolumeClaim) codecDecodeSelfFromArray(l int, d *codec1978.Dec var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8783,21 +8825,21 @@ func (x *PersistentVolumeClaim) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8805,38 +8847,44 @@ func (x *PersistentVolumeClaim) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8844,16 +8892,16 @@ func (x *PersistentVolumeClaim) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.Spec = PersistentVolumeClaimSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8861,21 +8909,21 @@ func (x *PersistentVolumeClaim) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.Status = PersistentVolumeClaimStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -14093,15 +14141,16 @@ func (x *SecretVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { } else { yysep2 := !z.EncBinary() yy2arr2 := z.EncBasicHandle().StructToArray - var yyq2 [3]bool + var yyq2 [4]bool _, _, _ = yysep2, yyq2, yy2arr2 const yyr2 bool = false yyq2[0] = x.SecretName != "" yyq2[1] = len(x.Items) != 0 yyq2[2] = x.DefaultMode != nil + yyq2[3] = x.Optional != nil var yynn2 int if yyr2 || yy2arr2 { - r.EncodeArrayStart(3) + r.EncodeArrayStart(4) } else { yynn2 = 0 for _, b := range yyq2 { @@ -14205,6 +14254,41 @@ func (x *SecretVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { } } } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { + if x.Optional == nil { + r.EncodeNil() + } else { + yy15 := *x.Optional + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + r.EncodeBool(bool(yy15)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("optional")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Optional == nil { + r.EncodeNil() + } else { + yy17 := *x.Optional + yym18 := z.EncBinary() + _ = yym18 + if false { + } else { + r.EncodeBool(bool(yy17)) + } + } + } + } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { @@ -14306,6 +14390,22 @@ func (x *SecretVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) *((*int32)(x.DefaultMode)) = int32(r.DecodeInt(32)) } } + case "optional": + if r.TryDecodeAsNil() { + if x.Optional != nil { + x.Optional = nil + } + } else { + if x.Optional == nil { + x.Optional = new(bool) + } + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*bool)(x.Optional)) = r.DecodeBool() + } + } default: z.DecStructFieldNotFound(-1, yys3) } // end switch yys3 @@ -14317,16 +14417,16 @@ func (x *SecretVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decode var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb10 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb10 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -14334,21 +14434,21 @@ func (x *SecretVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.SecretName = "" } else { - yyv11 := &x.SecretName - yym12 := z.DecBinary() - _ = yym12 + yyv13 := &x.SecretName + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv11)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb10 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb10 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -14356,21 +14456,21 @@ func (x *SecretVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.Items = nil } else { - yyv13 := &x.Items - yym14 := z.DecBinary() - _ = yym14 + yyv15 := &x.Items + yym16 := z.DecBinary() + _ = yym16 if false { } else { - h.decSliceKeyToPath((*[]KeyToPath)(yyv13), d) + h.decSliceKeyToPath((*[]KeyToPath)(yyv15), d) } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb10 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb10 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -14383,25 +14483,51 @@ func (x *SecretVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Decode if x.DefaultMode == nil { x.DefaultMode = new(int32) } - yym16 := z.DecBinary() - _ = yym16 + yym18 := z.DecBinary() + _ = yym18 if false { } else { *((*int32)(x.DefaultMode)) = int32(r.DecodeInt(32)) } } - for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.Optional != nil { + x.Optional = nil } - if yyb10 { + } else { + if x.Optional == nil { + x.Optional = new(bool) + } + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + *((*bool)(x.Optional)) = r.DecodeBool() + } + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj10-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -16762,15 +16888,16 @@ func (x *ConfigMapVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { } else { yysep2 := !z.EncBinary() yy2arr2 := z.EncBasicHandle().StructToArray - var yyq2 [3]bool + var yyq2 [4]bool _, _, _ = yysep2, yyq2, yy2arr2 const yyr2 bool = false yyq2[0] = x.Name != "" yyq2[1] = len(x.Items) != 0 yyq2[2] = x.DefaultMode != nil + yyq2[3] = x.Optional != nil var yynn2 int if yyr2 || yy2arr2 { - r.EncodeArrayStart(3) + r.EncodeArrayStart(4) } else { yynn2 = 0 for _, b := range yyq2 { @@ -16874,6 +17001,41 @@ func (x *ConfigMapVolumeSource) CodecEncodeSelf(e *codec1978.Encoder) { } } } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { + if x.Optional == nil { + r.EncodeNil() + } else { + yy15 := *x.Optional + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + r.EncodeBool(bool(yy15)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("optional")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Optional == nil { + r.EncodeNil() + } else { + yy17 := *x.Optional + yym18 := z.EncBinary() + _ = yym18 + if false { + } else { + r.EncodeBool(bool(yy17)) + } + } + } + } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { @@ -16975,6 +17137,22 @@ func (x *ConfigMapVolumeSource) codecDecodeSelfFromMap(l int, d *codec1978.Decod *((*int32)(x.DefaultMode)) = int32(r.DecodeInt(32)) } } + case "optional": + if r.TryDecodeAsNil() { + if x.Optional != nil { + x.Optional = nil + } + } else { + if x.Optional == nil { + x.Optional = new(bool) + } + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*bool)(x.Optional)) = r.DecodeBool() + } + } default: z.DecStructFieldNotFound(-1, yys3) } // end switch yys3 @@ -16986,16 +17164,16 @@ func (x *ConfigMapVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Dec var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb10 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb10 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -17003,21 +17181,21 @@ func (x *ConfigMapVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.Name = "" } else { - yyv11 := &x.Name - yym12 := z.DecBinary() - _ = yym12 + yyv13 := &x.Name + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv11)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb10 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb10 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -17025,21 +17203,21 @@ func (x *ConfigMapVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.Items = nil } else { - yyv13 := &x.Items - yym14 := z.DecBinary() - _ = yym14 + yyv15 := &x.Items + yym16 := z.DecBinary() + _ = yym16 if false { } else { - h.decSliceKeyToPath((*[]KeyToPath)(yyv13), d) + h.decSliceKeyToPath((*[]KeyToPath)(yyv15), d) } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb10 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb10 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -17052,25 +17230,51 @@ func (x *ConfigMapVolumeSource) codecDecodeSelfFromArray(l int, d *codec1978.Dec if x.DefaultMode == nil { x.DefaultMode = new(int32) } - yym16 := z.DecBinary() - _ = yym16 + yym18 := z.DecBinary() + _ = yym18 if false { } else { *((*int32)(x.DefaultMode)) = int32(r.DecodeInt(32)) } } - for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.Optional != nil { + x.Optional = nil } - if yyb10 { + } else { + if x.Optional == nil { + x.Optional = new(bool) + } + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + *((*bool)(x.Optional)) = r.DecodeBool() + } + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj10-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -19312,13 +19516,14 @@ func (x *ConfigMapKeySelector) CodecEncodeSelf(e *codec1978.Encoder) { } else { yysep2 := !z.EncBinary() yy2arr2 := z.EncBasicHandle().StructToArray - var yyq2 [2]bool + var yyq2 [3]bool _, _, _ = yysep2, yyq2, yy2arr2 const yyr2 bool = false yyq2[0] = x.Name != "" + yyq2[2] = x.Optional != nil var yynn2 int if yyr2 || yy2arr2 { - r.EncodeArrayStart(2) + r.EncodeArrayStart(3) } else { yynn2 = 1 for _, b := range yyq2 { @@ -19373,6 +19578,41 @@ func (x *ConfigMapKeySelector) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string(x.Key)) } } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + if x.Optional == nil { + r.EncodeNil() + } else { + yy10 := *x.Optional + yym11 := z.EncBinary() + _ = yym11 + if false { + } else { + r.EncodeBool(bool(yy10)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("optional")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Optional == nil { + r.EncodeNil() + } else { + yy12 := *x.Optional + yym13 := z.EncBinary() + _ = yym13 + if false { + } else { + r.EncodeBool(bool(yy12)) + } + } + } + } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { @@ -19458,6 +19698,22 @@ func (x *ConfigMapKeySelector) codecDecodeSelfFromMap(l int, d *codec1978.Decode *((*string)(yyv6)) = r.DecodeString() } } + case "optional": + if r.TryDecodeAsNil() { + if x.Optional != nil { + x.Optional = nil + } + } else { + if x.Optional == nil { + x.Optional = new(bool) + } + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*bool)(x.Optional)) = r.DecodeBool() + } + } default: z.DecStructFieldNotFound(-1, yys3) } // end switch yys3 @@ -19469,16 +19725,16 @@ func (x *ConfigMapKeySelector) codecDecodeSelfFromArray(l int, d *codec1978.Deco var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj8 int - var yyb8 bool - var yyhl8 bool = l >= 0 - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l + var yyj10 int + var yyb10 bool + var yyhl10 bool = l >= 0 + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb8 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb8 { + if yyb10 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -19486,29 +19742,7 @@ func (x *ConfigMapKeySelector) codecDecodeSelfFromArray(l int, d *codec1978.Deco if r.TryDecodeAsNil() { x.Name = "" } else { - yyv9 := &x.Name - yym10 := z.DecBinary() - _ = yym10 - if false { - } else { - *((*string)(yyv9)) = r.DecodeString() - } - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Key = "" - } else { - yyv11 := &x.Key + yyv11 := &x.Name yym12 := z.DecBinary() _ = yym12 if false { @@ -19516,18 +19750,66 @@ func (x *ConfigMapKeySelector) codecDecodeSelfFromArray(l int, d *codec1978.Deco *((*string)(yyv11)) = r.DecodeString() } } - for { - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Key = "" + } else { + yyv13 := &x.Key + yym14 := z.DecBinary() + _ = yym14 + if false { } else { - yyb8 = r.CheckBreak() + *((*string)(yyv13)) = r.DecodeString() } - if yyb8 { + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.Optional != nil { + x.Optional = nil + } + } else { + if x.Optional == nil { + x.Optional = new(bool) + } + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*bool)(x.Optional)) = r.DecodeBool() + } + } + for { + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj8-1, "") + z.DecStructFieldNotFound(yyj10-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -19546,13 +19828,14 @@ func (x *SecretKeySelector) CodecEncodeSelf(e *codec1978.Encoder) { } else { yysep2 := !z.EncBinary() yy2arr2 := z.EncBasicHandle().StructToArray - var yyq2 [2]bool + var yyq2 [3]bool _, _, _ = yysep2, yyq2, yy2arr2 const yyr2 bool = false yyq2[0] = x.Name != "" + yyq2[2] = x.Optional != nil var yynn2 int if yyr2 || yy2arr2 { - r.EncodeArrayStart(2) + r.EncodeArrayStart(3) } else { yynn2 = 1 for _, b := range yyq2 { @@ -19607,6 +19890,41 @@ func (x *SecretKeySelector) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string(x.Key)) } } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + if x.Optional == nil { + r.EncodeNil() + } else { + yy10 := *x.Optional + yym11 := z.EncBinary() + _ = yym11 + if false { + } else { + r.EncodeBool(bool(yy10)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("optional")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Optional == nil { + r.EncodeNil() + } else { + yy12 := *x.Optional + yym13 := z.EncBinary() + _ = yym13 + if false { + } else { + r.EncodeBool(bool(yy12)) + } + } + } + } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { @@ -19692,6 +20010,22 @@ func (x *SecretKeySelector) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) *((*string)(yyv6)) = r.DecodeString() } } + case "optional": + if r.TryDecodeAsNil() { + if x.Optional != nil { + x.Optional = nil + } + } else { + if x.Optional == nil { + x.Optional = new(bool) + } + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*bool)(x.Optional)) = r.DecodeBool() + } + } default: z.DecStructFieldNotFound(-1, yys3) } // end switch yys3 @@ -19703,16 +20037,16 @@ func (x *SecretKeySelector) codecDecodeSelfFromArray(l int, d *codec1978.Decoder var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj8 int - var yyb8 bool - var yyhl8 bool = l >= 0 - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l + var yyj10 int + var yyb10 bool + var yyhl10 bool = l >= 0 + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb8 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb8 { + if yyb10 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -19720,29 +20054,7 @@ func (x *SecretKeySelector) codecDecodeSelfFromArray(l int, d *codec1978.Decoder if r.TryDecodeAsNil() { x.Name = "" } else { - yyv9 := &x.Name - yym10 := z.DecBinary() - _ = yym10 - if false { - } else { - *((*string)(yyv9)) = r.DecodeString() - } - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Key = "" - } else { - yyv11 := &x.Key + yyv11 := &x.Name yym12 := z.DecBinary() _ = yym12 if false { @@ -19750,18 +20062,66 @@ func (x *SecretKeySelector) codecDecodeSelfFromArray(l int, d *codec1978.Decoder *((*string)(yyv11)) = r.DecodeString() } } - for { - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Key = "" + } else { + yyv13 := &x.Key + yym14 := z.DecBinary() + _ = yym14 + if false { } else { - yyb8 = r.CheckBreak() + *((*string)(yyv13)) = r.DecodeString() } - if yyb8 { + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.Optional != nil { + x.Optional = nil + } + } else { + if x.Optional == nil { + x.Optional = new(bool) + } + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*bool)(x.Optional)) = r.DecodeBool() + } + } + for { + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj8-1, "") + z.DecStructFieldNotFound(yyj10-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -19780,14 +20140,15 @@ func (x *EnvFromSource) CodecEncodeSelf(e *codec1978.Encoder) { } else { yysep2 := !z.EncBinary() yy2arr2 := z.EncBasicHandle().StructToArray - var yyq2 [2]bool + var yyq2 [3]bool _, _, _ = yysep2, yyq2, yy2arr2 const yyr2 bool = false yyq2[0] = x.Prefix != "" yyq2[1] = x.ConfigMapRef != nil + yyq2[2] = x.SecretRef != nil var yynn2 int if yyr2 || yy2arr2 { - r.EncodeArrayStart(2) + r.EncodeArrayStart(3) } else { yynn2 = 0 for _, b := range yyq2 { @@ -19846,6 +20207,29 @@ func (x *EnvFromSource) CodecEncodeSelf(e *codec1978.Encoder) { } } } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + if x.SecretRef == nil { + r.EncodeNil() + } else { + x.SecretRef.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("secretRef")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.SecretRef == nil { + r.EncodeNil() + } else { + x.SecretRef.CodecEncodeSelf(e) + } + } + } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { @@ -19930,6 +20314,17 @@ func (x *EnvFromSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } x.ConfigMapRef.CodecDecodeSelf(d) } + case "secretRef": + if r.TryDecodeAsNil() { + if x.SecretRef != nil { + x.SecretRef = nil + } + } else { + if x.SecretRef == nil { + x.SecretRef = new(SecretEnvSource) + } + x.SecretRef.CodecDecodeSelf(d) + } default: z.DecStructFieldNotFound(-1, yys3) } // end switch yys3 @@ -19941,16 +20336,16 @@ func (x *EnvFromSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj7 int - var yyb7 bool - var yyhl7 bool = l >= 0 - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l + var yyj8 int + var yyb8 bool + var yyhl8 bool = l >= 0 + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb7 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb7 { + if yyb8 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -19958,21 +20353,21 @@ func (x *EnvFromSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Prefix = "" } else { - yyv8 := &x.Prefix - yym9 := z.DecBinary() - _ = yym9 + yyv9 := &x.Prefix + yym10 := z.DecBinary() + _ = yym10 if false { } else { - *((*string)(yyv8)) = r.DecodeString() + *((*string)(yyv9)) = r.DecodeString() } } - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb7 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb7 { + if yyb8 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -19987,18 +20382,39 @@ func (x *EnvFromSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.ConfigMapRef.CodecDecodeSelf(d) } - for { - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.SecretRef != nil { + x.SecretRef = nil } - if yyb7 { + } else { + if x.SecretRef == nil { + x.SecretRef = new(SecretEnvSource) + } + x.SecretRef.CodecDecodeSelf(d) + } + for { + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj7-1, "") + z.DecStructFieldNotFound(yyj8-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -20017,13 +20433,14 @@ func (x *ConfigMapEnvSource) CodecEncodeSelf(e *codec1978.Encoder) { } else { yysep2 := !z.EncBinary() yy2arr2 := z.EncBasicHandle().StructToArray - var yyq2 [1]bool + var yyq2 [2]bool _, _, _ = yysep2, yyq2, yy2arr2 const yyr2 bool = false yyq2[0] = x.Name != "" + yyq2[1] = x.Optional != nil var yynn2 int if yyr2 || yy2arr2 { - r.EncodeArrayStart(1) + r.EncodeArrayStart(2) } else { yynn2 = 0 for _, b := range yyq2 { @@ -20059,6 +20476,41 @@ func (x *ConfigMapEnvSource) CodecEncodeSelf(e *codec1978.Encoder) { } } } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + if x.Optional == nil { + r.EncodeNil() + } else { + yy7 := *x.Optional + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeBool(bool(yy7)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("optional")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Optional == nil { + r.EncodeNil() + } else { + yy9 := *x.Optional + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeBool(bool(yy9)) + } + } + } + } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { @@ -20132,6 +20584,22 @@ func (x *ConfigMapEnvSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) *((*string)(yyv4)) = r.DecodeString() } } + case "optional": + if r.TryDecodeAsNil() { + if x.Optional != nil { + x.Optional = nil + } + } else { + if x.Optional == nil { + x.Optional = new(bool) + } + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*bool)(x.Optional)) = r.DecodeBool() + } + } default: z.DecStructFieldNotFound(-1, yys3) } // end switch yys3 @@ -20143,16 +20611,16 @@ func (x *ConfigMapEnvSource) codecDecodeSelfFromArray(l int, d *codec1978.Decode var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj6 int - var yyb6 bool - var yyhl6 bool = l >= 0 - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l + var yyj8 int + var yyb8 bool + var yyhl8 bool = l >= 0 + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb6 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb6 { + if yyb8 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -20160,26 +20628,311 @@ func (x *ConfigMapEnvSource) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.Name = "" } else { - yyv7 := &x.Name - yym8 := z.DecBinary() - _ = yym8 + yyv9 := &x.Name + yym10 := z.DecBinary() + _ = yym10 if false { } else { - *((*string)(yyv7)) = r.DecodeString() + *((*string)(yyv9)) = r.DecodeString() + } + } + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.Optional != nil { + x.Optional = nil + } + } else { + if x.Optional == nil { + x.Optional = new(bool) + } + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*bool)(x.Optional)) = r.DecodeBool() } } for { - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb6 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb6 { + if yyb8 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj6-1, "") + z.DecStructFieldNotFound(yyj8-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *SecretEnvSource) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [2]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Name != "" + yyq2[1] = x.Optional != nil + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(2) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Name)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("name")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Name)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + if x.Optional == nil { + r.EncodeNil() + } else { + yy7 := *x.Optional + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeBool(bool(yy7)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("optional")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Optional == nil { + r.EncodeNil() + } else { + yy9 := *x.Optional + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeBool(bool(yy9)) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *SecretEnvSource) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *SecretEnvSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "name": + if r.TryDecodeAsNil() { + x.Name = "" + } else { + yyv4 := &x.Name + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "optional": + if r.TryDecodeAsNil() { + if x.Optional != nil { + x.Optional = nil + } + } else { + if x.Optional == nil { + x.Optional = new(bool) + } + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*bool)(x.Optional)) = r.DecodeBool() + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *SecretEnvSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj8 int + var yyb8 bool + var yyhl8 bool = l >= 0 + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Name = "" + } else { + yyv9 := &x.Name + yym10 := z.DecBinary() + _ = yym10 + if false { + } else { + *((*string)(yyv9)) = r.DecodeString() + } + } + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.Optional != nil { + x.Optional = nil + } + } else { + if x.Optional == nil { + x.Optional = new(bool) + } + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*bool)(x.Optional)) = r.DecodeBool() + } + } + for { + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj8-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -21905,6 +22658,32 @@ func (x *PullPolicy) CodecDecodeSelf(d *codec1978.Decoder) { } } +func (x TerminationMessagePolicy) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x)) + } +} + +func (x *TerminationMessagePolicy) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + *((*string)(x)) = r.DecodeString() + } +} + func (x Capability) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) @@ -22419,7 +23198,7 @@ func (x *Container) CodecEncodeSelf(e *codec1978.Encoder) { } else { yysep2 := !z.EncBinary() yy2arr2 := z.EncBasicHandle().StructToArray - var yyq2 [19]bool + var yyq2 [20]bool _, _, _ = yysep2, yyq2, yy2arr2 const yyr2 bool = false yyq2[1] = x.Image != "" @@ -22435,14 +23214,15 @@ func (x *Container) CodecEncodeSelf(e *codec1978.Encoder) { yyq2[11] = x.ReadinessProbe != nil yyq2[12] = x.Lifecycle != nil yyq2[13] = x.TerminationMessagePath != "" - yyq2[14] = x.ImagePullPolicy != "" - yyq2[15] = x.SecurityContext != nil - yyq2[16] = x.Stdin != false - yyq2[17] = x.StdinOnce != false - yyq2[18] = x.TTY != false + yyq2[14] = x.TerminationMessagePolicy != "" + yyq2[15] = x.ImagePullPolicy != "" + yyq2[16] = x.SecurityContext != nil + yyq2[17] = x.Stdin != false + yyq2[18] = x.StdinOnce != false + yyq2[19] = x.TTY != false var yynn2 int if yyr2 || yy2arr2 { - r.EncodeArrayStart(19) + r.EncodeArrayStart(20) } else { yynn2 = 1 for _, b := range yyq2 { @@ -22834,12 +23614,27 @@ func (x *Container) CodecEncodeSelf(e *codec1978.Encoder) { if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[14] { - x.ImagePullPolicy.CodecEncodeSelf(e) + x.TerminationMessagePolicy.CodecEncodeSelf(e) } else { r.EncodeString(codecSelferC_UTF81234, "") } } else { if yyq2[14] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("terminationMessagePolicy")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + x.TerminationMessagePolicy.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[15] { + x.ImagePullPolicy.CodecEncodeSelf(e) + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[15] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("imagePullPolicy")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -22848,7 +23643,7 @@ func (x *Container) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[15] { + if yyq2[16] { if x.SecurityContext == nil { r.EncodeNil() } else { @@ -22858,7 +23653,7 @@ func (x *Container) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq2[15] { + if yyq2[16] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("securityContext")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -22869,31 +23664,6 @@ func (x *Container) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[16] { - yym54 := z.EncBinary() - _ = yym54 - if false { - } else { - r.EncodeBool(bool(x.Stdin)) - } - } else { - r.EncodeBool(false) - } - } else { - if yyq2[16] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("stdin")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym55 := z.EncBinary() - _ = yym55 - if false { - } else { - r.EncodeBool(bool(x.Stdin)) - } - } - } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[17] { @@ -22901,7 +23671,7 @@ func (x *Container) CodecEncodeSelf(e *codec1978.Encoder) { _ = yym57 if false { } else { - r.EncodeBool(bool(x.StdinOnce)) + r.EncodeBool(bool(x.Stdin)) } } else { r.EncodeBool(false) @@ -22909,13 +23679,13 @@ func (x *Container) CodecEncodeSelf(e *codec1978.Encoder) { } else { if yyq2[17] { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("stdinOnce")) + r.EncodeString(codecSelferC_UTF81234, string("stdin")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yym58 := z.EncBinary() _ = yym58 if false { } else { - r.EncodeBool(bool(x.StdinOnce)) + r.EncodeBool(bool(x.Stdin)) } } } @@ -22926,7 +23696,7 @@ func (x *Container) CodecEncodeSelf(e *codec1978.Encoder) { _ = yym60 if false { } else { - r.EncodeBool(bool(x.TTY)) + r.EncodeBool(bool(x.StdinOnce)) } } else { r.EncodeBool(false) @@ -22934,11 +23704,36 @@ func (x *Container) CodecEncodeSelf(e *codec1978.Encoder) { } else { if yyq2[18] { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("tty")) + r.EncodeString(codecSelferC_UTF81234, string("stdinOnce")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yym61 := z.EncBinary() _ = yym61 if false { + } else { + r.EncodeBool(bool(x.StdinOnce)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[19] { + yym63 := z.EncBinary() + _ = yym63 + if false { + } else { + r.EncodeBool(bool(x.TTY)) + } + } else { + r.EncodeBool(false) + } + } else { + if yyq2[19] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("tty")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym64 := z.EncBinary() + _ = yym64 + if false { } else { r.EncodeBool(bool(x.TTY)) } @@ -23165,12 +23960,19 @@ func (x *Container) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { *((*string)(yyv26)) = r.DecodeString() } } + case "terminationMessagePolicy": + if r.TryDecodeAsNil() { + x.TerminationMessagePolicy = "" + } else { + yyv28 := &x.TerminationMessagePolicy + yyv28.CodecDecodeSelf(d) + } case "imagePullPolicy": if r.TryDecodeAsNil() { x.ImagePullPolicy = "" } else { - yyv28 := &x.ImagePullPolicy - yyv28.CodecDecodeSelf(d) + yyv29 := &x.ImagePullPolicy + yyv29.CodecDecodeSelf(d) } case "securityContext": if r.TryDecodeAsNil() { @@ -23187,36 +23989,36 @@ func (x *Container) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Stdin = false } else { - yyv30 := &x.Stdin - yym31 := z.DecBinary() - _ = yym31 + yyv31 := &x.Stdin + yym32 := z.DecBinary() + _ = yym32 if false { } else { - *((*bool)(yyv30)) = r.DecodeBool() + *((*bool)(yyv31)) = r.DecodeBool() } } case "stdinOnce": if r.TryDecodeAsNil() { x.StdinOnce = false } else { - yyv32 := &x.StdinOnce - yym33 := z.DecBinary() - _ = yym33 + yyv33 := &x.StdinOnce + yym34 := z.DecBinary() + _ = yym34 if false { } else { - *((*bool)(yyv32)) = r.DecodeBool() + *((*bool)(yyv33)) = r.DecodeBool() } } case "tty": if r.TryDecodeAsNil() { x.TTY = false } else { - yyv34 := &x.TTY - yym35 := z.DecBinary() - _ = yym35 + yyv35 := &x.TTY + yym36 := z.DecBinary() + _ = yym36 if false { } else { - *((*bool)(yyv34)) = r.DecodeBool() + *((*bool)(yyv35)) = r.DecodeBool() } } default: @@ -23230,16 +24032,16 @@ func (x *Container) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj36 int - var yyb36 bool - var yyhl36 bool = l >= 0 - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + var yyj37 int + var yyb37 bool + var yyhl37 bool = l >= 0 + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l } else { - yyb36 = r.CheckBreak() + yyb37 = r.CheckBreak() } - if yyb36 { + if yyb37 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23247,21 +24049,21 @@ func (x *Container) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Name = "" } else { - yyv37 := &x.Name - yym38 := z.DecBinary() - _ = yym38 + yyv38 := &x.Name + yym39 := z.DecBinary() + _ = yym39 if false { } else { - *((*string)(yyv37)) = r.DecodeString() + *((*string)(yyv38)) = r.DecodeString() } } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l } else { - yyb36 = r.CheckBreak() + yyb37 = r.CheckBreak() } - if yyb36 { + if yyb37 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23269,21 +24071,21 @@ func (x *Container) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Image = "" } else { - yyv39 := &x.Image - yym40 := z.DecBinary() - _ = yym40 + yyv40 := &x.Image + yym41 := z.DecBinary() + _ = yym41 if false { } else { - *((*string)(yyv39)) = r.DecodeString() + *((*string)(yyv40)) = r.DecodeString() } } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l } else { - yyb36 = r.CheckBreak() + yyb37 = r.CheckBreak() } - if yyb36 { + if yyb37 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23291,21 +24093,21 @@ func (x *Container) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Command = nil } else { - yyv41 := &x.Command - yym42 := z.DecBinary() - _ = yym42 + yyv42 := &x.Command + yym43 := z.DecBinary() + _ = yym43 if false { } else { - z.F.DecSliceStringX(yyv41, false, d) + z.F.DecSliceStringX(yyv42, false, d) } } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l } else { - yyb36 = r.CheckBreak() + yyb37 = r.CheckBreak() } - if yyb36 { + if yyb37 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23313,21 +24115,21 @@ func (x *Container) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Args = nil } else { - yyv43 := &x.Args - yym44 := z.DecBinary() - _ = yym44 + yyv44 := &x.Args + yym45 := z.DecBinary() + _ = yym45 if false { } else { - z.F.DecSliceStringX(yyv43, false, d) + z.F.DecSliceStringX(yyv44, false, d) } } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l } else { - yyb36 = r.CheckBreak() + yyb37 = r.CheckBreak() } - if yyb36 { + if yyb37 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23335,21 +24137,21 @@ func (x *Container) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.WorkingDir = "" } else { - yyv45 := &x.WorkingDir - yym46 := z.DecBinary() - _ = yym46 + yyv46 := &x.WorkingDir + yym47 := z.DecBinary() + _ = yym47 if false { } else { - *((*string)(yyv45)) = r.DecodeString() + *((*string)(yyv46)) = r.DecodeString() } } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l } else { - yyb36 = r.CheckBreak() + yyb37 = r.CheckBreak() } - if yyb36 { + if yyb37 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23357,21 +24159,21 @@ func (x *Container) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Ports = nil } else { - yyv47 := &x.Ports - yym48 := z.DecBinary() - _ = yym48 + yyv48 := &x.Ports + yym49 := z.DecBinary() + _ = yym49 if false { } else { - h.decSliceContainerPort((*[]ContainerPort)(yyv47), d) + h.decSliceContainerPort((*[]ContainerPort)(yyv48), d) } } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l } else { - yyb36 = r.CheckBreak() + yyb37 = r.CheckBreak() } - if yyb36 { + if yyb37 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23379,21 +24181,21 @@ func (x *Container) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.EnvFrom = nil } else { - yyv49 := &x.EnvFrom - yym50 := z.DecBinary() - _ = yym50 + yyv50 := &x.EnvFrom + yym51 := z.DecBinary() + _ = yym51 if false { } else { - h.decSliceEnvFromSource((*[]EnvFromSource)(yyv49), d) + h.decSliceEnvFromSource((*[]EnvFromSource)(yyv50), d) } } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l } else { - yyb36 = r.CheckBreak() + yyb37 = r.CheckBreak() } - if yyb36 { + if yyb37 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23401,21 +24203,21 @@ func (x *Container) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Env = nil } else { - yyv51 := &x.Env - yym52 := z.DecBinary() - _ = yym52 + yyv52 := &x.Env + yym53 := z.DecBinary() + _ = yym53 if false { } else { - h.decSliceEnvVar((*[]EnvVar)(yyv51), d) + h.decSliceEnvVar((*[]EnvVar)(yyv52), d) } } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l } else { - yyb36 = r.CheckBreak() + yyb37 = r.CheckBreak() } - if yyb36 { + if yyb37 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23423,16 +24225,16 @@ func (x *Container) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Resources = ResourceRequirements{} } else { - yyv53 := &x.Resources - yyv53.CodecDecodeSelf(d) + yyv54 := &x.Resources + yyv54.CodecDecodeSelf(d) } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l } else { - yyb36 = r.CheckBreak() + yyb37 = r.CheckBreak() } - if yyb36 { + if yyb37 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23440,21 +24242,21 @@ func (x *Container) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.VolumeMounts = nil } else { - yyv54 := &x.VolumeMounts - yym55 := z.DecBinary() - _ = yym55 + yyv55 := &x.VolumeMounts + yym56 := z.DecBinary() + _ = yym56 if false { } else { - h.decSliceVolumeMount((*[]VolumeMount)(yyv54), d) + h.decSliceVolumeMount((*[]VolumeMount)(yyv55), d) } } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l } else { - yyb36 = r.CheckBreak() + yyb37 = r.CheckBreak() } - if yyb36 { + if yyb37 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23469,13 +24271,13 @@ func (x *Container) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.LivenessProbe.CodecDecodeSelf(d) } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l } else { - yyb36 = r.CheckBreak() + yyb37 = r.CheckBreak() } - if yyb36 { + if yyb37 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23490,13 +24292,13 @@ func (x *Container) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.ReadinessProbe.CodecDecodeSelf(d) } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l } else { - yyb36 = r.CheckBreak() + yyb37 = r.CheckBreak() } - if yyb36 { + if yyb37 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23511,13 +24313,13 @@ func (x *Container) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.Lifecycle.CodecDecodeSelf(d) } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l } else { - yyb36 = r.CheckBreak() + yyb37 = r.CheckBreak() } - if yyb36 { + if yyb37 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23525,21 +24327,38 @@ func (x *Container) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.TerminationMessagePath = "" } else { - yyv59 := &x.TerminationMessagePath - yym60 := z.DecBinary() - _ = yym60 + yyv60 := &x.TerminationMessagePath + yym61 := z.DecBinary() + _ = yym61 if false { } else { - *((*string)(yyv59)) = r.DecodeString() + *((*string)(yyv60)) = r.DecodeString() } } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l } else { - yyb36 = r.CheckBreak() + yyb37 = r.CheckBreak() } - if yyb36 { + if yyb37 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.TerminationMessagePolicy = "" + } else { + yyv62 := &x.TerminationMessagePolicy + yyv62.CodecDecodeSelf(d) + } + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l + } else { + yyb37 = r.CheckBreak() + } + if yyb37 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23547,16 +24366,16 @@ func (x *Container) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ImagePullPolicy = "" } else { - yyv61 := &x.ImagePullPolicy - yyv61.CodecDecodeSelf(d) + yyv63 := &x.ImagePullPolicy + yyv63.CodecDecodeSelf(d) } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l } else { - yyb36 = r.CheckBreak() + yyb37 = r.CheckBreak() } - if yyb36 { + if yyb37 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23571,13 +24390,13 @@ func (x *Container) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.SecurityContext.CodecDecodeSelf(d) } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l } else { - yyb36 = r.CheckBreak() + yyb37 = r.CheckBreak() } - if yyb36 { + if yyb37 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23585,29 +24404,7 @@ func (x *Container) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Stdin = false } else { - yyv63 := &x.Stdin - yym64 := z.DecBinary() - _ = yym64 - if false { - } else { - *((*bool)(yyv63)) = r.DecodeBool() - } - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.StdinOnce = false - } else { - yyv65 := &x.StdinOnce + yyv65 := &x.Stdin yym66 := z.DecBinary() _ = yym66 if false { @@ -23615,21 +24412,21 @@ func (x *Container) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { *((*bool)(yyv65)) = r.DecodeBool() } } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l } else { - yyb36 = r.CheckBreak() + yyb37 = r.CheckBreak() } - if yyb36 { + if yyb37 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.TTY = false + x.StdinOnce = false } else { - yyv67 := &x.TTY + yyv67 := &x.StdinOnce yym68 := z.DecBinary() _ = yym68 if false { @@ -23637,18 +24434,40 @@ func (x *Container) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { *((*bool)(yyv67)) = r.DecodeBool() } } - for { - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l + } else { + yyb37 = r.CheckBreak() + } + if yyb37 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.TTY = false + } else { + yyv69 := &x.TTY + yym70 := z.DecBinary() + _ = yym70 + if false { } else { - yyb36 = r.CheckBreak() + *((*bool)(yyv69)) = r.DecodeBool() } - if yyb36 { + } + for { + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l + } else { + yyb37 = r.CheckBreak() + } + if yyb37 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj36-1, "") + z.DecStructFieldNotFound(yyj37-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -29724,7 +30543,7 @@ func (x *PodSpec) CodecEncodeSelf(e *codec1978.Encoder) { } else { yysep2 := !z.EncBinary() yy2arr2 := z.EncBasicHandle().StructToArray - var yyq2 [18]bool + var yyq2 [19]bool _, _, _ = yysep2, yyq2, yy2arr2 const yyr2 bool = false yyq2[0] = len(x.Volumes) != 0 @@ -29744,9 +30563,10 @@ func (x *PodSpec) CodecEncodeSelf(e *codec1978.Encoder) { yyq2[15] = x.Hostname != "" yyq2[16] = x.Subdomain != "" yyq2[17] = x.Affinity != nil + yyq2[18] = x.SchedulerName != "" var yynn2 int if yyr2 || yy2arr2 { - r.EncodeArrayStart(18) + r.EncodeArrayStart(19) } else { yynn2 = 1 for _, b := range yyq2 { @@ -30229,6 +31049,31 @@ func (x *PodSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[18] { + yym62 := z.EncBinary() + _ = yym62 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.SchedulerName)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[18] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("schedulername")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym63 := z.EncBinary() + _ = yym63 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.SchedulerName)) + } + } + } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { @@ -30502,6 +31347,18 @@ func (x *PodSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } x.Affinity.CodecDecodeSelf(d) } + case "schedulername": + if r.TryDecodeAsNil() { + x.SchedulerName = "" + } else { + yyv36 := &x.SchedulerName + yym37 := z.DecBinary() + _ = yym37 + if false { + } else { + *((*string)(yyv36)) = r.DecodeString() + } + } default: z.DecStructFieldNotFound(-1, yys3) } // end switch yys3 @@ -30513,16 +31370,16 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj36 int - var yyb36 bool - var yyhl36 bool = l >= 0 - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + var yyj38 int + var yyb38 bool + var yyhl38 bool = l >= 0 + yyj38++ + if yyhl38 { + yyb38 = yyj38 > l } else { - yyb36 = r.CheckBreak() + yyb38 = r.CheckBreak() } - if yyb36 { + if yyb38 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30530,21 +31387,21 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Volumes = nil } else { - yyv37 := &x.Volumes - yym38 := z.DecBinary() - _ = yym38 + yyv39 := &x.Volumes + yym40 := z.DecBinary() + _ = yym40 if false { } else { - h.decSliceVolume((*[]Volume)(yyv37), d) + h.decSliceVolume((*[]Volume)(yyv39), d) } } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj38++ + if yyhl38 { + yyb38 = yyj38 > l } else { - yyb36 = r.CheckBreak() + yyb38 = r.CheckBreak() } - if yyb36 { + if yyb38 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30552,21 +31409,21 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Containers = nil } else { - yyv39 := &x.Containers - yym40 := z.DecBinary() - _ = yym40 + yyv41 := &x.Containers + yym42 := z.DecBinary() + _ = yym42 if false { } else { - h.decSliceContainer((*[]Container)(yyv39), d) + h.decSliceContainer((*[]Container)(yyv41), d) } } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj38++ + if yyhl38 { + yyb38 = yyj38 > l } else { - yyb36 = r.CheckBreak() + yyb38 = r.CheckBreak() } - if yyb36 { + if yyb38 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30574,16 +31431,16 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.RestartPolicy = "" } else { - yyv41 := &x.RestartPolicy - yyv41.CodecDecodeSelf(d) + yyv43 := &x.RestartPolicy + yyv43.CodecDecodeSelf(d) } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj38++ + if yyhl38 { + yyb38 = yyj38 > l } else { - yyb36 = r.CheckBreak() + yyb38 = r.CheckBreak() } - if yyb36 { + if yyb38 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30596,20 +31453,20 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.TerminationGracePeriodSeconds == nil { x.TerminationGracePeriodSeconds = new(int64) } - yym43 := z.DecBinary() - _ = yym43 + yym45 := z.DecBinary() + _ = yym45 if false { } else { *((*int64)(x.TerminationGracePeriodSeconds)) = int64(r.DecodeInt(64)) } } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj38++ + if yyhl38 { + yyb38 = yyj38 > l } else { - yyb36 = r.CheckBreak() + yyb38 = r.CheckBreak() } - if yyb36 { + if yyb38 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30622,20 +31479,20 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.ActiveDeadlineSeconds == nil { x.ActiveDeadlineSeconds = new(int64) } - yym45 := z.DecBinary() - _ = yym45 + yym47 := z.DecBinary() + _ = yym47 if false { } else { *((*int64)(x.ActiveDeadlineSeconds)) = int64(r.DecodeInt(64)) } } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj38++ + if yyhl38 { + yyb38 = yyj38 > l } else { - yyb36 = r.CheckBreak() + yyb38 = r.CheckBreak() } - if yyb36 { + if yyb38 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30643,16 +31500,16 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.DNSPolicy = "" } else { - yyv46 := &x.DNSPolicy - yyv46.CodecDecodeSelf(d) + yyv48 := &x.DNSPolicy + yyv48.CodecDecodeSelf(d) } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj38++ + if yyhl38 { + yyb38 = yyj38 > l } else { - yyb36 = r.CheckBreak() + yyb38 = r.CheckBreak() } - if yyb36 { + if yyb38 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30660,21 +31517,21 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.NodeSelector = nil } else { - yyv47 := &x.NodeSelector - yym48 := z.DecBinary() - _ = yym48 + yyv49 := &x.NodeSelector + yym50 := z.DecBinary() + _ = yym50 if false { } else { - z.F.DecMapStringStringX(yyv47, false, d) + z.F.DecMapStringStringX(yyv49, false, d) } } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj38++ + if yyhl38 { + yyb38 = yyj38 > l } else { - yyb36 = r.CheckBreak() + yyb38 = r.CheckBreak() } - if yyb36 { + if yyb38 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30682,29 +31539,7 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ServiceAccountName = "" } else { - yyv49 := &x.ServiceAccountName - yym50 := z.DecBinary() - _ = yym50 - if false { - } else { - *((*string)(yyv49)) = r.DecodeString() - } - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.DeprecatedServiceAccount = "" - } else { - yyv51 := &x.DeprecatedServiceAccount + yyv51 := &x.ServiceAccountName yym52 := z.DecBinary() _ = yym52 if false { @@ -30712,21 +31547,21 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { *((*string)(yyv51)) = r.DecodeString() } } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj38++ + if yyhl38 { + yyb38 = yyj38 > l } else { - yyb36 = r.CheckBreak() + yyb38 = r.CheckBreak() } - if yyb36 { + if yyb38 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.NodeName = "" + x.DeprecatedServiceAccount = "" } else { - yyv53 := &x.NodeName + yyv53 := &x.DeprecatedServiceAccount yym54 := z.DecBinary() _ = yym54 if false { @@ -30734,13 +31569,35 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { *((*string)(yyv53)) = r.DecodeString() } } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj38++ + if yyhl38 { + yyb38 = yyj38 > l } else { - yyb36 = r.CheckBreak() + yyb38 = r.CheckBreak() } - if yyb36 { + if yyb38 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.NodeName = "" + } else { + yyv55 := &x.NodeName + yym56 := z.DecBinary() + _ = yym56 + if false { + } else { + *((*string)(yyv55)) = r.DecodeString() + } + } + yyj38++ + if yyhl38 { + yyb38 = yyj38 > l + } else { + yyb38 = r.CheckBreak() + } + if yyb38 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30748,29 +31605,7 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.HostNetwork = false } else { - yyv55 := &x.HostNetwork - yym56 := z.DecBinary() - _ = yym56 - if false { - } else { - *((*bool)(yyv55)) = r.DecodeBool() - } - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.HostPID = false - } else { - yyv57 := &x.HostPID + yyv57 := &x.HostNetwork yym58 := z.DecBinary() _ = yym58 if false { @@ -30778,21 +31613,21 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { *((*bool)(yyv57)) = r.DecodeBool() } } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj38++ + if yyhl38 { + yyb38 = yyj38 > l } else { - yyb36 = r.CheckBreak() + yyb38 = r.CheckBreak() } - if yyb36 { + if yyb38 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.HostIPC = false + x.HostPID = false } else { - yyv59 := &x.HostIPC + yyv59 := &x.HostPID yym60 := z.DecBinary() _ = yym60 if false { @@ -30800,13 +31635,35 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { *((*bool)(yyv59)) = r.DecodeBool() } } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj38++ + if yyhl38 { + yyb38 = yyj38 > l } else { - yyb36 = r.CheckBreak() + yyb38 = r.CheckBreak() } - if yyb36 { + if yyb38 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.HostIPC = false + } else { + yyv61 := &x.HostIPC + yym62 := z.DecBinary() + _ = yym62 + if false { + } else { + *((*bool)(yyv61)) = r.DecodeBool() + } + } + yyj38++ + if yyhl38 { + yyb38 = yyj38 > l + } else { + yyb38 = r.CheckBreak() + } + if yyb38 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30821,13 +31678,13 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.SecurityContext.CodecDecodeSelf(d) } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj38++ + if yyhl38 { + yyb38 = yyj38 > l } else { - yyb36 = r.CheckBreak() + yyb38 = r.CheckBreak() } - if yyb36 { + if yyb38 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30835,21 +31692,21 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ImagePullSecrets = nil } else { - yyv62 := &x.ImagePullSecrets - yym63 := z.DecBinary() - _ = yym63 + yyv64 := &x.ImagePullSecrets + yym65 := z.DecBinary() + _ = yym65 if false { } else { - h.decSliceLocalObjectReference((*[]LocalObjectReference)(yyv62), d) + h.decSliceLocalObjectReference((*[]LocalObjectReference)(yyv64), d) } } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj38++ + if yyhl38 { + yyb38 = yyj38 > l } else { - yyb36 = r.CheckBreak() + yyb38 = r.CheckBreak() } - if yyb36 { + if yyb38 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30857,29 +31714,7 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Hostname = "" } else { - yyv64 := &x.Hostname - yym65 := z.DecBinary() - _ = yym65 - if false { - } else { - *((*string)(yyv64)) = r.DecodeString() - } - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Subdomain = "" - } else { - yyv66 := &x.Subdomain + yyv66 := &x.Hostname yym67 := z.DecBinary() _ = yym67 if false { @@ -30887,13 +31722,35 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { *((*string)(yyv66)) = r.DecodeString() } } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj38++ + if yyhl38 { + yyb38 = yyj38 > l } else { - yyb36 = r.CheckBreak() + yyb38 = r.CheckBreak() } - if yyb36 { + if yyb38 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Subdomain = "" + } else { + yyv68 := &x.Subdomain + yym69 := z.DecBinary() + _ = yym69 + if false { + } else { + *((*string)(yyv68)) = r.DecodeString() + } + } + yyj38++ + if yyhl38 { + yyb38 = yyj38 > l + } else { + yyb38 = r.CheckBreak() + } + if yyb38 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30908,18 +31765,40 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.Affinity.CodecDecodeSelf(d) } - for { - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj38++ + if yyhl38 { + yyb38 = yyj38 > l + } else { + yyb38 = r.CheckBreak() + } + if yyb38 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.SchedulerName = "" + } else { + yyv71 := &x.SchedulerName + yym72 := z.DecBinary() + _ = yym72 + if false { } else { - yyb36 = r.CheckBreak() + *((*string)(yyv71)) = r.DecodeString() } - if yyb36 { + } + for { + yyj38++ + if yyhl38 { + yyb38 = yyj38 > l + } else { + yyb38 = r.CheckBreak() + } + if yyb38 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj36-1, "") + z.DecStructFieldNotFound(yyj38-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -32190,7 +33069,13 @@ func (x *PodStatusResult) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -32200,7 +33085,13 @@ func (x *PodStatusResult) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -32307,17 +33198,23 @@ func (x *PodStatusResult) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "status": if r.TryDecodeAsNil() { x.Status = PodStatus{} } else { - yyv9 := &x.Status - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Status + yyv10.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -32330,16 +33227,16 @@ func (x *PodStatusResult) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + var yyj11 int + var yyb11 bool + var yyhl11 bool = l >= 0 + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -32347,21 +33244,21 @@ func (x *PodStatusResult) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv11 := &x.Kind - yym12 := z.DecBinary() - _ = yym12 + yyv12 := &x.Kind + yym13 := z.DecBinary() + _ = yym13 if false { } else { - *((*string)(yyv11)) = r.DecodeString() + *((*string)(yyv12)) = r.DecodeString() } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -32369,38 +33266,44 @@ func (x *PodStatusResult) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv13 := &x.APIVersion - yym14 := z.DecBinary() - _ = yym14 + yyv14 := &x.APIVersion + yym15 := z.DecBinary() + _ = yym15 if false { } else { - *((*string)(yyv13)) = r.DecodeString() + *((*string)(yyv14)) = r.DecodeString() } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv15 := &x.ObjectMeta - yyv15.CodecDecodeSelf(d) + yyv16 := &x.ObjectMeta + yym17 := z.DecBinary() + _ = yym17 + if false { + } else if z.HasExtensions() && z.DecExt(yyv16) { + } else { + z.DecFallback(yyv16, false) + } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -32408,21 +33311,21 @@ func (x *PodStatusResult) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Status = PodStatus{} } else { - yyv16 := &x.Status - yyv16.CodecDecodeSelf(d) + yyv18 := &x.Status + yyv18.CodecDecodeSelf(d) } for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj10-1, "") + z.DecStructFieldNotFound(yyj11-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -32516,7 +33419,13 @@ func (x *Pod) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -32526,7 +33435,13 @@ func (x *Pod) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -32650,24 +33565,30 @@ func (x *Pod) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = PodSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = PodStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -32680,16 +33601,16 @@ func (x *Pod) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -32697,21 +33618,21 @@ func (x *Pod) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -32719,38 +33640,44 @@ func (x *Pod) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -32758,16 +33685,16 @@ func (x *Pod) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = PodSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -32775,21 +33702,21 @@ func (x *Pod) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = PodStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -33198,7 +34125,13 @@ func (x *PodTemplateSpec) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[0] { yy4 := &x.ObjectMeta - yy4.CodecEncodeSelf(e) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else if z.HasExtensions() && z.EncExt(yy4) { + } else { + z.EncFallback(yy4) + } } else { r.EncodeNil() } @@ -33208,7 +34141,13 @@ func (x *PodTemplateSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy6 := &x.ObjectMeta - yy6.CodecEncodeSelf(e) + yym7 := z.EncBinary() + _ = yym7 + if false { + } else if z.HasExtensions() && z.EncExt(yy6) { + } else { + z.EncFallback(yy6) + } } } if yyr2 || yy2arr2 { @@ -33291,17 +34230,23 @@ func (x *PodTemplateSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { switch yys3 { case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv4 := &x.ObjectMeta - yyv4.CodecDecodeSelf(d) + yym5 := z.DecBinary() + _ = yym5 + if false { + } else if z.HasExtensions() && z.DecExt(yyv4) { + } else { + z.DecFallback(yyv4, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = PodSpec{} } else { - yyv5 := &x.Spec - yyv5.CodecDecodeSelf(d) + yyv6 := &x.Spec + yyv6.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -33314,33 +34259,39 @@ func (x *PodTemplateSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj6 int - var yyb6 bool - var yyhl6 bool = l >= 0 - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l + var yyj7 int + var yyb7 bool + var yyhl7 bool = l >= 0 + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb6 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb6 { + if yyb7 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv7 := &x.ObjectMeta - yyv7.CodecDecodeSelf(d) + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb6 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb6 { + if yyb7 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -33348,21 +34299,21 @@ func (x *PodTemplateSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Spec = PodSpec{} } else { - yyv8 := &x.Spec - yyv8.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } for { - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb6 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb6 { + if yyb7 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj6-1, "") + z.DecStructFieldNotFound(yyj7-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -33455,7 +34406,13 @@ func (x *PodTemplate) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -33465,7 +34422,13 @@ func (x *PodTemplate) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -33572,17 +34535,23 @@ func (x *PodTemplate) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "template": if r.TryDecodeAsNil() { x.Template = PodTemplateSpec{} } else { - yyv9 := &x.Template - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Template + yyv10.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -33595,16 +34564,16 @@ func (x *PodTemplate) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + var yyj11 int + var yyb11 bool + var yyhl11 bool = l >= 0 + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -33612,21 +34581,21 @@ func (x *PodTemplate) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv11 := &x.Kind - yym12 := z.DecBinary() - _ = yym12 + yyv12 := &x.Kind + yym13 := z.DecBinary() + _ = yym13 if false { } else { - *((*string)(yyv11)) = r.DecodeString() + *((*string)(yyv12)) = r.DecodeString() } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -33634,38 +34603,44 @@ func (x *PodTemplate) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv13 := &x.APIVersion - yym14 := z.DecBinary() - _ = yym14 + yyv14 := &x.APIVersion + yym15 := z.DecBinary() + _ = yym15 if false { } else { - *((*string)(yyv13)) = r.DecodeString() + *((*string)(yyv14)) = r.DecodeString() } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv15 := &x.ObjectMeta - yyv15.CodecDecodeSelf(d) + yyv16 := &x.ObjectMeta + yym17 := z.DecBinary() + _ = yym17 + if false { + } else if z.HasExtensions() && z.DecExt(yyv16) { + } else { + z.DecFallback(yyv16, false) + } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -33673,21 +34648,21 @@ func (x *PodTemplate) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Template = PodTemplateSpec{} } else { - yyv16 := &x.Template - yyv16.CodecDecodeSelf(d) + yyv18 := &x.Template + yyv18.CodecDecodeSelf(d) } for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj10-1, "") + z.DecStructFieldNotFound(yyj11-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -35429,7 +36404,13 @@ func (x *ReplicationController) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -35439,7 +36420,13 @@ func (x *ReplicationController) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -35563,24 +36550,30 @@ func (x *ReplicationController) codecDecodeSelfFromMap(l int, d *codec1978.Decod } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = ReplicationControllerSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = ReplicationControllerStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -35593,16 +36586,16 @@ func (x *ReplicationController) codecDecodeSelfFromArray(l int, d *codec1978.Dec var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35610,21 +36603,21 @@ func (x *ReplicationController) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35632,38 +36625,44 @@ func (x *ReplicationController) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35671,16 +36670,16 @@ func (x *ReplicationController) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.Spec = ReplicationControllerSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35688,21 +36687,21 @@ func (x *ReplicationController) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.Status = ReplicationControllerStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -37938,7 +38937,13 @@ func (x *Service) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -37948,7 +38953,13 @@ func (x *Service) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -38072,24 +39083,30 @@ func (x *Service) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = ServiceSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = ServiceStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -38102,16 +39119,16 @@ func (x *Service) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -38119,21 +39136,21 @@ func (x *Service) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -38141,38 +39158,44 @@ func (x *Service) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -38180,16 +39203,16 @@ func (x *Service) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = ServiceSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -38197,21 +39220,21 @@ func (x *Service) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = ServiceStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -38673,7 +39696,13 @@ func (x *ServiceAccount) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -38683,7 +39712,13 @@ func (x *ServiceAccount) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -38839,33 +39874,39 @@ func (x *ServiceAccount) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "secrets": if r.TryDecodeAsNil() { x.Secrets = nil } else { - yyv9 := &x.Secrets - yym10 := z.DecBinary() - _ = yym10 + yyv10 := &x.Secrets + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decSliceObjectReference((*[]ObjectReference)(yyv9), d) + h.decSliceObjectReference((*[]ObjectReference)(yyv10), d) } } case "imagePullSecrets": if r.TryDecodeAsNil() { x.ImagePullSecrets = nil } else { - yyv11 := &x.ImagePullSecrets - yym12 := z.DecBinary() - _ = yym12 + yyv12 := &x.ImagePullSecrets + yym13 := z.DecBinary() + _ = yym13 if false { } else { - h.decSliceLocalObjectReference((*[]LocalObjectReference)(yyv11), d) + h.decSliceLocalObjectReference((*[]LocalObjectReference)(yyv12), d) } } default: @@ -38879,16 +39920,16 @@ func (x *ServiceAccount) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj13 int - var yyb13 bool - var yyhl13 bool = l >= 0 - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + var yyj14 int + var yyb14 bool + var yyhl14 bool = l >= 0 + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -38896,21 +39937,21 @@ func (x *ServiceAccount) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv14 := &x.Kind - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.Kind + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -38918,38 +39959,44 @@ func (x *ServiceAccount) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv16 := &x.APIVersion - yym17 := z.DecBinary() - _ = yym17 + yyv17 := &x.APIVersion + yym18 := z.DecBinary() + _ = yym18 if false { } else { - *((*string)(yyv16)) = r.DecodeString() + *((*string)(yyv17)) = r.DecodeString() } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv18 := &x.ObjectMeta - yyv18.CodecDecodeSelf(d) + yyv19 := &x.ObjectMeta + yym20 := z.DecBinary() + _ = yym20 + if false { + } else if z.HasExtensions() && z.DecExt(yyv19) { + } else { + z.DecFallback(yyv19, false) + } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -38957,21 +40004,21 @@ func (x *ServiceAccount) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Secrets = nil } else { - yyv19 := &x.Secrets - yym20 := z.DecBinary() - _ = yym20 + yyv21 := &x.Secrets + yym22 := z.DecBinary() + _ = yym22 if false { } else { - h.decSliceObjectReference((*[]ObjectReference)(yyv19), d) + h.decSliceObjectReference((*[]ObjectReference)(yyv21), d) } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -38979,26 +40026,26 @@ func (x *ServiceAccount) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ImagePullSecrets = nil } else { - yyv21 := &x.ImagePullSecrets - yym22 := z.DecBinary() - _ = yym22 + yyv23 := &x.ImagePullSecrets + yym24 := z.DecBinary() + _ = yym24 if false { } else { - h.decSliceLocalObjectReference((*[]LocalObjectReference)(yyv21), d) + h.decSliceLocalObjectReference((*[]LocalObjectReference)(yyv23), d) } } for { - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj13-1, "") + z.DecStructFieldNotFound(yyj14-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -39458,7 +40505,13 @@ func (x *Endpoints) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -39468,7 +40521,13 @@ func (x *Endpoints) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -39585,21 +40644,27 @@ func (x *Endpoints) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "subsets": if r.TryDecodeAsNil() { x.Subsets = nil } else { - yyv9 := &x.Subsets - yym10 := z.DecBinary() - _ = yym10 + yyv10 := &x.Subsets + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decSliceEndpointSubset((*[]EndpointSubset)(yyv9), d) + h.decSliceEndpointSubset((*[]EndpointSubset)(yyv10), d) } } default: @@ -39613,16 +40678,16 @@ func (x *Endpoints) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39630,21 +40695,21 @@ func (x *Endpoints) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39652,38 +40717,44 @@ func (x *Endpoints) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39691,26 +40762,26 @@ func (x *Endpoints) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Subsets = nil } else { - yyv17 := &x.Subsets - yym18 := z.DecBinary() - _ = yym18 + yyv19 := &x.Subsets + yym20 := z.DecBinary() + _ = yym20 if false { } else { - h.decSliceEndpointSubset((*[]EndpointSubset)(yyv17), d) + h.decSliceEndpointSubset((*[]EndpointSubset)(yyv19), d) } } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -45204,7 +46275,13 @@ func (x *Node) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -45214,7 +46291,13 @@ func (x *Node) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -45338,24 +46421,30 @@ func (x *Node) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = NodeSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = NodeStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -45368,16 +46457,16 @@ func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45385,21 +46474,21 @@ func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45407,38 +46496,44 @@ func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45446,16 +46541,16 @@ func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = NodeSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45463,21 +46558,21 @@ func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = NodeStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -46341,7 +47436,13 @@ func (x *Namespace) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -46351,7 +47452,13 @@ func (x *Namespace) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -46475,24 +47582,30 @@ func (x *Namespace) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = NamespaceSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = NamespaceStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -46505,16 +47618,16 @@ func (x *Namespace) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -46522,21 +47635,21 @@ func (x *Namespace) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -46544,38 +47657,44 @@ func (x *Namespace) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -46583,16 +47702,16 @@ func (x *Namespace) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = NamespaceSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -46600,21 +47719,21 @@ func (x *Namespace) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = NamespaceStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -47074,7 +48193,13 @@ func (x *Binding) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -47084,7 +48209,13 @@ func (x *Binding) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -47185,17 +48316,23 @@ func (x *Binding) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "target": if r.TryDecodeAsNil() { x.Target = ObjectReference{} } else { - yyv9 := &x.Target - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Target + yyv10.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -47208,16 +48345,16 @@ func (x *Binding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + var yyj11 int + var yyb11 bool + var yyhl11 bool = l >= 0 + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -47225,21 +48362,21 @@ func (x *Binding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv11 := &x.Kind - yym12 := z.DecBinary() - _ = yym12 + yyv12 := &x.Kind + yym13 := z.DecBinary() + _ = yym13 if false { } else { - *((*string)(yyv11)) = r.DecodeString() + *((*string)(yyv12)) = r.DecodeString() } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -47247,38 +48384,44 @@ func (x *Binding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv13 := &x.APIVersion - yym14 := z.DecBinary() - _ = yym14 + yyv14 := &x.APIVersion + yym15 := z.DecBinary() + _ = yym15 if false { } else { - *((*string)(yyv13)) = r.DecodeString() + *((*string)(yyv14)) = r.DecodeString() } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv15 := &x.ObjectMeta - yyv15.CodecDecodeSelf(d) + yyv16 := &x.ObjectMeta + yym17 := z.DecBinary() + _ = yym17 + if false { + } else if z.HasExtensions() && z.DecExt(yyv16) { + } else { + z.DecFallback(yyv16, false) + } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -47286,21 +48429,21 @@ func (x *Binding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Target = ObjectReference{} } else { - yyv16 := &x.Target - yyv16.CodecDecodeSelf(d) + yyv18 := &x.Target + yyv18.CodecDecodeSelf(d) } for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj10-1, "") + z.DecStructFieldNotFound(yyj11-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -50474,6 +51617,315 @@ func (x *PodExecOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } +func (x *PodPortForwardOptions) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [3]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = len(x.Ports) != 0 + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(3) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + if x.Ports == nil { + r.EncodeNil() + } else { + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + z.F.EncSliceInt32V(x.Ports, false, e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("ports")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Ports == nil { + r.EncodeNil() + } else { + yym11 := z.EncBinary() + _ = yym11 + if false { + } else { + z.F.EncSliceInt32V(x.Ports, false, e) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *PodPortForwardOptions) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *PodPortForwardOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "ports": + if r.TryDecodeAsNil() { + x.Ports = nil + } else { + yyv8 := &x.Ports + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + z.F.DecSliceInt32X(yyv8, false, d) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *PodPortForwardOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj10 int + var yyb10 bool + var yyhl10 bool = l >= 0 + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv11 := &x.Kind + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*string)(yyv11)) = r.DecodeString() + } + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv13 := &x.APIVersion + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Ports = nil + } else { + yyv15 := &x.Ports + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + z.F.DecSliceInt32X(yyv15, false, d) + } + } + for { + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj10-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + func (x *PodProxyOptions) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) @@ -52719,13 +54171,25 @@ func (x *Event) CodecEncodeSelf(e *codec1978.Encoder) { if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) @@ -53016,105 +54480,111 @@ func (x *Event) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "involvedObject": if r.TryDecodeAsNil() { x.InvolvedObject = ObjectReference{} } else { - yyv9 := &x.InvolvedObject - yyv9.CodecDecodeSelf(d) + yyv10 := &x.InvolvedObject + yyv10.CodecDecodeSelf(d) } case "reason": if r.TryDecodeAsNil() { x.Reason = "" } else { - yyv10 := &x.Reason - yym11 := z.DecBinary() - _ = yym11 + yyv11 := &x.Reason + yym12 := z.DecBinary() + _ = yym12 if false { } else { - *((*string)(yyv10)) = r.DecodeString() + *((*string)(yyv11)) = r.DecodeString() } } case "message": if r.TryDecodeAsNil() { x.Message = "" } else { - yyv12 := &x.Message - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Message + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } case "source": if r.TryDecodeAsNil() { x.Source = EventSource{} } else { - yyv14 := &x.Source - yyv14.CodecDecodeSelf(d) + yyv15 := &x.Source + yyv15.CodecDecodeSelf(d) } case "firstTimestamp": if r.TryDecodeAsNil() { x.FirstTimestamp = pkg2_v1.Time{} } else { - yyv15 := &x.FirstTimestamp - yym16 := z.DecBinary() - _ = yym16 + yyv16 := &x.FirstTimestamp + yym17 := z.DecBinary() + _ = yym17 if false { - } else if z.HasExtensions() && z.DecExt(yyv15) { - } else if yym16 { - z.DecBinaryUnmarshal(yyv15) - } else if !yym16 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv15) + } else if z.HasExtensions() && z.DecExt(yyv16) { + } else if yym17 { + z.DecBinaryUnmarshal(yyv16) + } else if !yym17 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv16) } else { - z.DecFallback(yyv15, false) + z.DecFallback(yyv16, false) } } case "lastTimestamp": if r.TryDecodeAsNil() { x.LastTimestamp = pkg2_v1.Time{} } else { - yyv17 := &x.LastTimestamp - yym18 := z.DecBinary() - _ = yym18 + yyv18 := &x.LastTimestamp + yym19 := z.DecBinary() + _ = yym19 if false { - } else if z.HasExtensions() && z.DecExt(yyv17) { - } else if yym18 { - z.DecBinaryUnmarshal(yyv17) - } else if !yym18 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv17) + } else if z.HasExtensions() && z.DecExt(yyv18) { + } else if yym19 { + z.DecBinaryUnmarshal(yyv18) + } else if !yym19 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv18) } else { - z.DecFallback(yyv17, false) + z.DecFallback(yyv18, false) } } case "count": if r.TryDecodeAsNil() { x.Count = 0 } else { - yyv19 := &x.Count - yym20 := z.DecBinary() - _ = yym20 + yyv20 := &x.Count + yym21 := z.DecBinary() + _ = yym21 if false { } else { - *((*int32)(yyv19)) = int32(r.DecodeInt(32)) + *((*int32)(yyv20)) = int32(r.DecodeInt(32)) } } case "type": if r.TryDecodeAsNil() { x.Type = "" } else { - yyv21 := &x.Type - yym22 := z.DecBinary() - _ = yym22 + yyv22 := &x.Type + yym23 := z.DecBinary() + _ = yym23 if false { } else { - *((*string)(yyv21)) = r.DecodeString() + *((*string)(yyv22)) = r.DecodeString() } } default: @@ -53128,16 +54598,16 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj23 int - var yyb23 bool - var yyhl23 bool = l >= 0 - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l + var yyj24 int + var yyb24 bool + var yyhl24 bool = l >= 0 + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb23 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb23 { + if yyb24 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -53145,21 +54615,21 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv24 := &x.Kind - yym25 := z.DecBinary() - _ = yym25 + yyv25 := &x.Kind + yym26 := z.DecBinary() + _ = yym26 if false { } else { - *((*string)(yyv24)) = r.DecodeString() + *((*string)(yyv25)) = r.DecodeString() } } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb23 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb23 { + if yyb24 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -53167,38 +54637,44 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv26 := &x.APIVersion - yym27 := z.DecBinary() - _ = yym27 + yyv27 := &x.APIVersion + yym28 := z.DecBinary() + _ = yym28 if false { } else { - *((*string)(yyv26)) = r.DecodeString() + *((*string)(yyv27)) = r.DecodeString() } } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb23 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb23 { + if yyb24 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv28 := &x.ObjectMeta - yyv28.CodecDecodeSelf(d) + yyv29 := &x.ObjectMeta + yym30 := z.DecBinary() + _ = yym30 + if false { + } else if z.HasExtensions() && z.DecExt(yyv29) { + } else { + z.DecFallback(yyv29, false) + } } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb23 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb23 { + if yyb24 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -53206,16 +54682,16 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.InvolvedObject = ObjectReference{} } else { - yyv29 := &x.InvolvedObject - yyv29.CodecDecodeSelf(d) + yyv31 := &x.InvolvedObject + yyv31.CodecDecodeSelf(d) } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb23 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb23 { + if yyb24 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -53223,29 +54699,7 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Reason = "" } else { - yyv30 := &x.Reason - yym31 := z.DecBinary() - _ = yym31 - if false { - } else { - *((*string)(yyv30)) = r.DecodeString() - } - } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l - } else { - yyb23 = r.CheckBreak() - } - if yyb23 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Message = "" - } else { - yyv32 := &x.Message + yyv32 := &x.Reason yym33 := z.DecBinary() _ = yym33 if false { @@ -53253,13 +54707,35 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { *((*string)(yyv32)) = r.DecodeString() } } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb23 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb23 { + if yyb24 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Message = "" + } else { + yyv34 := &x.Message + yym35 := z.DecBinary() + _ = yym35 + if false { + } else { + *((*string)(yyv34)) = r.DecodeString() + } + } + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l + } else { + yyb24 = r.CheckBreak() + } + if yyb24 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -53267,16 +54743,16 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Source = EventSource{} } else { - yyv34 := &x.Source - yyv34.CodecDecodeSelf(d) + yyv36 := &x.Source + yyv36.CodecDecodeSelf(d) } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb23 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb23 { + if yyb24 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -53284,34 +54760,7 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.FirstTimestamp = pkg2_v1.Time{} } else { - yyv35 := &x.FirstTimestamp - yym36 := z.DecBinary() - _ = yym36 - if false { - } else if z.HasExtensions() && z.DecExt(yyv35) { - } else if yym36 { - z.DecBinaryUnmarshal(yyv35) - } else if !yym36 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv35) - } else { - z.DecFallback(yyv35, false) - } - } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l - } else { - yyb23 = r.CheckBreak() - } - if yyb23 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.LastTimestamp = pkg2_v1.Time{} - } else { - yyv37 := &x.LastTimestamp + yyv37 := &x.FirstTimestamp yym38 := z.DecBinary() _ = yym38 if false { @@ -53324,13 +54773,40 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { z.DecFallback(yyv37, false) } } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb23 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb23 { + if yyb24 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.LastTimestamp = pkg2_v1.Time{} + } else { + yyv39 := &x.LastTimestamp + yym40 := z.DecBinary() + _ = yym40 + if false { + } else if z.HasExtensions() && z.DecExt(yyv39) { + } else if yym40 { + z.DecBinaryUnmarshal(yyv39) + } else if !yym40 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv39) + } else { + z.DecFallback(yyv39, false) + } + } + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l + } else { + yyb24 = r.CheckBreak() + } + if yyb24 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -53338,21 +54814,21 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Count = 0 } else { - yyv39 := &x.Count - yym40 := z.DecBinary() - _ = yym40 + yyv41 := &x.Count + yym42 := z.DecBinary() + _ = yym42 if false { } else { - *((*int32)(yyv39)) = int32(r.DecodeInt(32)) + *((*int32)(yyv41)) = int32(r.DecodeInt(32)) } } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb23 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb23 { + if yyb24 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -53360,26 +54836,26 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Type = "" } else { - yyv41 := &x.Type - yym42 := z.DecBinary() - _ = yym42 + yyv43 := &x.Type + yym44 := z.DecBinary() + _ = yym44 if false { } else { - *((*string)(yyv41)) = r.DecodeString() + *((*string)(yyv43)) = r.DecodeString() } } for { - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb23 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb23 { + if yyb24 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj23-1, "") + z.DecStructFieldNotFound(yyj24-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -54817,7 +56293,13 @@ func (x *LimitRange) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -54827,7 +56309,13 @@ func (x *LimitRange) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -54934,17 +56422,23 @@ func (x *LimitRange) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = LimitRangeSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -54957,16 +56451,16 @@ func (x *LimitRange) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + var yyj11 int + var yyb11 bool + var yyhl11 bool = l >= 0 + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -54974,21 +56468,21 @@ func (x *LimitRange) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv11 := &x.Kind - yym12 := z.DecBinary() - _ = yym12 + yyv12 := &x.Kind + yym13 := z.DecBinary() + _ = yym13 if false { } else { - *((*string)(yyv11)) = r.DecodeString() + *((*string)(yyv12)) = r.DecodeString() } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -54996,38 +56490,44 @@ func (x *LimitRange) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv13 := &x.APIVersion - yym14 := z.DecBinary() - _ = yym14 + yyv14 := &x.APIVersion + yym15 := z.DecBinary() + _ = yym15 if false { } else { - *((*string)(yyv13)) = r.DecodeString() + *((*string)(yyv14)) = r.DecodeString() } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv15 := &x.ObjectMeta - yyv15.CodecDecodeSelf(d) + yyv16 := &x.ObjectMeta + yym17 := z.DecBinary() + _ = yym17 + if false { + } else if z.HasExtensions() && z.DecExt(yyv16) { + } else { + z.DecFallback(yyv16, false) + } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -55035,21 +56535,21 @@ func (x *LimitRange) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = LimitRangeSpec{} } else { - yyv16 := &x.Spec - yyv16.CodecDecodeSelf(d) + yyv18 := &x.Spec + yyv18.CodecDecodeSelf(d) } for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj10-1, "") + z.DecStructFieldNotFound(yyj11-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -55991,7 +57491,13 @@ func (x *ResourceQuota) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -56001,7 +57507,13 @@ func (x *ResourceQuota) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -56125,24 +57637,30 @@ func (x *ResourceQuota) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = ResourceQuotaSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = ResourceQuotaStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -56155,16 +57673,16 @@ func (x *ResourceQuota) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -56172,21 +57690,21 @@ func (x *ResourceQuota) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -56194,38 +57712,44 @@ func (x *ResourceQuota) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -56233,16 +57757,16 @@ func (x *ResourceQuota) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = ResourceQuotaSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -56250,21 +57774,21 @@ func (x *ResourceQuota) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = ResourceQuotaStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -56727,7 +58251,13 @@ func (x *Secret) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -56737,7 +58267,13 @@ func (x *Secret) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -56908,41 +58444,47 @@ func (x *Secret) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "data": if r.TryDecodeAsNil() { x.Data = nil } else { - yyv9 := &x.Data - yym10 := z.DecBinary() - _ = yym10 + yyv10 := &x.Data + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decMapstringSliceuint8((*map[string][]uint8)(yyv9), d) + h.decMapstringSliceuint8((*map[string][]uint8)(yyv10), d) } } case "stringData": if r.TryDecodeAsNil() { x.StringData = nil } else { - yyv11 := &x.StringData - yym12 := z.DecBinary() - _ = yym12 + yyv12 := &x.StringData + yym13 := z.DecBinary() + _ = yym13 if false { } else { - z.F.DecMapStringStringX(yyv11, false, d) + z.F.DecMapStringStringX(yyv12, false, d) } } case "type": if r.TryDecodeAsNil() { x.Type = "" } else { - yyv13 := &x.Type - yyv13.CodecDecodeSelf(d) + yyv14 := &x.Type + yyv14.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -56955,16 +58497,16 @@ func (x *Secret) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj14 int - var yyb14 bool - var yyhl14 bool = l >= 0 - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l + var yyj15 int + var yyb15 bool + var yyhl15 bool = l >= 0 + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l } else { - yyb14 = r.CheckBreak() + yyb15 = r.CheckBreak() } - if yyb14 { + if yyb15 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -56972,21 +58514,21 @@ func (x *Secret) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv15 := &x.Kind - yym16 := z.DecBinary() - _ = yym16 + yyv16 := &x.Kind + yym17 := z.DecBinary() + _ = yym17 if false { } else { - *((*string)(yyv15)) = r.DecodeString() + *((*string)(yyv16)) = r.DecodeString() } } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l } else { - yyb14 = r.CheckBreak() + yyb15 = r.CheckBreak() } - if yyb14 { + if yyb15 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -56994,38 +58536,44 @@ func (x *Secret) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv17 := &x.APIVersion - yym18 := z.DecBinary() - _ = yym18 + yyv18 := &x.APIVersion + yym19 := z.DecBinary() + _ = yym19 if false { } else { - *((*string)(yyv17)) = r.DecodeString() + *((*string)(yyv18)) = r.DecodeString() } } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l } else { - yyb14 = r.CheckBreak() + yyb15 = r.CheckBreak() } - if yyb14 { + if yyb15 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv19 := &x.ObjectMeta - yyv19.CodecDecodeSelf(d) + yyv20 := &x.ObjectMeta + yym21 := z.DecBinary() + _ = yym21 + if false { + } else if z.HasExtensions() && z.DecExt(yyv20) { + } else { + z.DecFallback(yyv20, false) + } } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l } else { - yyb14 = r.CheckBreak() + yyb15 = r.CheckBreak() } - if yyb14 { + if yyb15 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -57033,21 +58581,21 @@ func (x *Secret) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Data = nil } else { - yyv20 := &x.Data - yym21 := z.DecBinary() - _ = yym21 + yyv22 := &x.Data + yym23 := z.DecBinary() + _ = yym23 if false { } else { - h.decMapstringSliceuint8((*map[string][]uint8)(yyv20), d) + h.decMapstringSliceuint8((*map[string][]uint8)(yyv22), d) } } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l } else { - yyb14 = r.CheckBreak() + yyb15 = r.CheckBreak() } - if yyb14 { + if yyb15 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -57055,21 +58603,21 @@ func (x *Secret) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.StringData = nil } else { - yyv22 := &x.StringData - yym23 := z.DecBinary() - _ = yym23 + yyv24 := &x.StringData + yym25 := z.DecBinary() + _ = yym25 if false { } else { - z.F.DecMapStringStringX(yyv22, false, d) + z.F.DecMapStringStringX(yyv24, false, d) } } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l } else { - yyb14 = r.CheckBreak() + yyb15 = r.CheckBreak() } - if yyb14 { + if yyb15 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -57077,21 +58625,21 @@ func (x *Secret) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Type = "" } else { - yyv24 := &x.Type - yyv24.CodecDecodeSelf(d) + yyv26 := &x.Type + yyv26.CodecDecodeSelf(d) } for { - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l } else { - yyb14 = r.CheckBreak() + yyb15 = r.CheckBreak() } - if yyb14 { + if yyb15 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj14-1, "") + z.DecStructFieldNotFound(yyj15-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -57578,7 +59126,13 @@ func (x *ConfigMap) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -57588,7 +59142,13 @@ func (x *ConfigMap) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -57711,21 +59271,27 @@ func (x *ConfigMap) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "data": if r.TryDecodeAsNil() { x.Data = nil } else { - yyv9 := &x.Data - yym10 := z.DecBinary() - _ = yym10 + yyv10 := &x.Data + yym11 := z.DecBinary() + _ = yym11 if false { } else { - z.F.DecMapStringStringX(yyv9, false, d) + z.F.DecMapStringStringX(yyv10, false, d) } } default: @@ -57739,16 +59305,16 @@ func (x *ConfigMap) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -57756,21 +59322,21 @@ func (x *ConfigMap) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -57778,38 +59344,44 @@ func (x *ConfigMap) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -57817,26 +59389,26 @@ func (x *ConfigMap) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Data = nil } else { - yyv17 := &x.Data - yym18 := z.DecBinary() - _ = yym18 + yyv19 := &x.Data + yym20 := z.DecBinary() + _ = yym20 if false { } else { - z.F.DecMapStringStringX(yyv17, false, d) + z.F.DecMapStringStringX(yyv19, false, d) } } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -58630,7 +60202,13 @@ func (x *ComponentStatus) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -58640,7 +60218,13 @@ func (x *ComponentStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -58763,21 +60347,27 @@ func (x *ComponentStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "conditions": if r.TryDecodeAsNil() { x.Conditions = nil } else { - yyv9 := &x.Conditions - yym10 := z.DecBinary() - _ = yym10 + yyv10 := &x.Conditions + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decSliceComponentCondition((*[]ComponentCondition)(yyv9), d) + h.decSliceComponentCondition((*[]ComponentCondition)(yyv10), d) } } default: @@ -58791,16 +60381,16 @@ func (x *ComponentStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -58808,21 +60398,21 @@ func (x *ComponentStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -58830,38 +60420,44 @@ func (x *ComponentStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -58869,26 +60465,26 @@ func (x *ComponentStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Conditions = nil } else { - yyv17 := &x.Conditions - yym18 := z.DecBinary() - _ = yym18 + yyv19 := &x.Conditions + yym20 := z.DecBinary() + _ = yym20 if false { } else { - h.decSliceComponentCondition((*[]ComponentCondition)(yyv17), d) + h.decSliceComponentCondition((*[]ComponentCondition)(yyv19), d) } } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -60885,7 +62481,13 @@ func (x *RangeAllocation) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -60895,7 +62497,13 @@ func (x *RangeAllocation) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -61031,33 +62639,39 @@ func (x *RangeAllocation) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "range": if r.TryDecodeAsNil() { x.Range = "" } else { - yyv9 := &x.Range - yym10 := z.DecBinary() - _ = yym10 + yyv10 := &x.Range + yym11 := z.DecBinary() + _ = yym11 if false { } else { - *((*string)(yyv9)) = r.DecodeString() + *((*string)(yyv10)) = r.DecodeString() } } case "data": if r.TryDecodeAsNil() { x.Data = nil } else { - yyv11 := &x.Data - yym12 := z.DecBinary() - _ = yym12 + yyv12 := &x.Data + yym13 := z.DecBinary() + _ = yym13 if false { } else { - *yyv11 = r.DecodeBytes(*(*[]byte)(yyv11), false, false) + *yyv12 = r.DecodeBytes(*(*[]byte)(yyv12), false, false) } } default: @@ -61071,16 +62685,16 @@ func (x *RangeAllocation) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj13 int - var yyb13 bool - var yyhl13 bool = l >= 0 - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + var yyj14 int + var yyb14 bool + var yyhl14 bool = l >= 0 + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -61088,21 +62702,21 @@ func (x *RangeAllocation) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv14 := &x.Kind - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.Kind + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -61110,38 +62724,44 @@ func (x *RangeAllocation) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv16 := &x.APIVersion - yym17 := z.DecBinary() - _ = yym17 + yyv17 := &x.APIVersion + yym18 := z.DecBinary() + _ = yym18 if false { } else { - *((*string)(yyv16)) = r.DecodeString() + *((*string)(yyv17)) = r.DecodeString() } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv18 := &x.ObjectMeta - yyv18.CodecDecodeSelf(d) + yyv19 := &x.ObjectMeta + yym20 := z.DecBinary() + _ = yym20 + if false { + } else if z.HasExtensions() && z.DecExt(yyv19) { + } else { + z.DecFallback(yyv19, false) + } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -61149,21 +62769,21 @@ func (x *RangeAllocation) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Range = "" } else { - yyv19 := &x.Range - yym20 := z.DecBinary() - _ = yym20 + yyv21 := &x.Range + yym22 := z.DecBinary() + _ = yym22 if false { } else { - *((*string)(yyv19)) = r.DecodeString() + *((*string)(yyv21)) = r.DecodeString() } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -61171,26 +62791,26 @@ func (x *RangeAllocation) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Data = nil } else { - yyv21 := &x.Data - yym22 := z.DecBinary() - _ = yym22 + yyv23 := &x.Data + yym24 := z.DecBinary() + _ = yym24 if false { } else { - *yyv21 = r.DecodeBytes(*(*[]byte)(yyv21), false, false) + *yyv23 = r.DecodeBytes(*(*[]byte)(yyv23), false, false) } } for { - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj13-1, "") + z.DecStructFieldNotFound(yyj14-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -62198,7 +63818,7 @@ func (x codecSelfer1234) decSliceEnvFromSource(v *[]EnvFromSource, d *codec1978. yyrg1 := len(yyv1) > 0 yyv21 := yyv1 - yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 24) + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 32) if yyrt1 { if yyrl1 <= cap(yyv1) { yyv1 = yyv1[:yyrl1] @@ -63269,7 +64889,7 @@ func (x codecSelfer1234) decSliceContainer(v *[]Container, d *codec1978.Decoder) yyrg1 := len(yyv1) > 0 yyv21 := yyv1 - yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 280) + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 296) if yyrt1 { if yyrl1 <= cap(yyv1) { yyv1 = yyv1[:yyrl1] @@ -63745,7 +65365,7 @@ func (x codecSelfer1234) decSlicePod(v *[]Pod, d *codec1978.Decoder) { yyrg1 := len(yyv1) > 0 yyv21 := yyv1 - yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 688) + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 704) if yyrt1 { if yyrl1 <= cap(yyv1) { yyv1 = yyv1[:yyrl1] @@ -63864,7 +65484,7 @@ func (x codecSelfer1234) decSlicePodTemplate(v *[]PodTemplate, d *codec1978.Deco yyrg1 := len(yyv1) > 0 yyv21 := yyv1 - yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 736) + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 752) if yyrt1 { if yyrl1 <= cap(yyv1) { yyv1 = yyv1[:yyrl1] diff --git a/vendor/k8s.io/kubernetes/pkg/api/v1/types.go b/vendor/k8s.io/kubernetes/pkg/api/v1/types.go index 3dfd4f1e..8483e701 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/v1/types.go +++ b/vendor/k8s.io/kubernetes/pkg/api/v1/types.go @@ -65,6 +65,8 @@ import ( // ObjectMeta is metadata that all persisted resources must have, which includes all objects // users must create. +// DEPRECATED: Use k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta instead - this type will be removed soon. +// +k8s:openapi-gen=false type ObjectMeta struct { // Name must be unique within a namespace. Is required when creating resources, although // some resources may allow a client to request the generation of an appropriate name @@ -118,7 +120,7 @@ type ObjectMeta struct { // Read-only. // More info: http://kubernetes.io/docs/user-guide/identifiers#uids // +optional - UID types.UID `json:"uid,omitempty" protobuf:"bytes,5,opt,name=uid,casttype=k8s.io/kubernetes/pkg/types.UID"` + UID types.UID `json:"uid,omitempty" protobuf:"bytes,5,opt,name=uid,casttype=k8s.io/apimachinery/pkg/types.UID"` // An opaque value that represents the internal version of this object that can // be used by clients to determine when objects have changed. May be used for optimistic @@ -422,7 +424,7 @@ type PersistentVolume struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec defines a specification of a persistent volume owned by the cluster. // Provisioned by an administrator. @@ -514,7 +516,7 @@ type PersistentVolumeClaim struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec defines the desired characteristics of a volume requested by a pod author. // More info: http://kubernetes.io/docs/user-guide/persistent-volumes#persistentvolumeclaims @@ -922,8 +924,8 @@ type SecretVolumeSource struct { // key and content is the value. If specified, the listed keys will be // projected into the specified paths, and unlisted keys will not be // present. If a key is specified which is not present in the Secret, - // the volume setup will error. Paths must be relative and may not contain - // the '..' path or start with '..'. + // the volume setup will error unless it is marked optional. Paths must be + // relative and may not contain the '..' path or start with '..'. // +optional Items []KeyToPath `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"` // Optional: mode bits to use on created files by default. Must be a @@ -933,6 +935,9 @@ type SecretVolumeSource struct { // mode, like fsGroup, and the result can be other mode bits set. // +optional DefaultMode *int32 `json:"defaultMode,omitempty" protobuf:"bytes,3,opt,name=defaultMode"` + // Specify whether the Secret or it's keys must be defined + // +optional + Optional *bool `json:"optional,omitempty" protobuf:"varint,4,opt,name=optional"` } const ( @@ -1079,8 +1084,8 @@ type ConfigMapVolumeSource struct { // key and content is the value. If specified, the listed keys will be // projected into the specified paths, and unlisted keys will not be // present. If a key is specified which is not present in the ConfigMap, - // the volume setup will error. Paths must be relative and may not contain - // the '..' path or start with '..'. + // the volume setup will error unless it is marked optional. Paths must be + // relative and may not contain the '..' path or start with '..'. // +optional Items []KeyToPath `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"` // Optional: mode bits to use on created files by default. Must be a @@ -1090,6 +1095,9 @@ type ConfigMapVolumeSource struct { // mode, like fsGroup, and the result can be other mode bits set. // +optional DefaultMode *int32 `json:"defaultMode,omitempty" protobuf:"varint,3,opt,name=defaultMode"` + // Specify whether the ConfigMap or it's keys must be defined + // +optional + Optional *bool `json:"optional,omitempty" protobuf:"varint,4,opt,name=optional"` } const ( @@ -1223,6 +1231,9 @@ type ConfigMapKeySelector struct { LocalObjectReference `json:",inline" protobuf:"bytes,1,opt,name=localObjectReference"` // The key to select. Key string `json:"key" protobuf:"bytes,2,opt,name=key"` + // Specify whether the ConfigMap or it's key must be defined + // +optional + Optional *bool `json:"optional,omitempty" protobuf:"varint,3,opt,name=optional"` } // SecretKeySelector selects a key of a Secret. @@ -1231,6 +1242,9 @@ type SecretKeySelector struct { LocalObjectReference `json:",inline" protobuf:"bytes,1,opt,name=localObjectReference"` // The key of the secret to select from. Must be a valid secret key. Key string `json:"key" protobuf:"bytes,2,opt,name=key"` + // Specify whether the Secret or it's key must be defined + // +optional + Optional *bool `json:"optional,omitempty" protobuf:"varint,3,opt,name=optional"` } // EnvFromSource represents the source of a set of ConfigMaps @@ -1241,6 +1255,9 @@ type EnvFromSource struct { // The ConfigMap to select from // +optional ConfigMapRef *ConfigMapEnvSource `json:"configMapRef,omitempty" protobuf:"bytes,2,opt,name=configMapRef"` + // The Secret to select from + // +optional + SecretRef *SecretEnvSource `json:"secretRef,omitempty" protobuf:"bytes,3,opt,name=secretRef"` } // ConfigMapEnvSource selects a ConfigMap to populate the environment @@ -1251,6 +1268,22 @@ type EnvFromSource struct { type ConfigMapEnvSource struct { // The ConfigMap to select from. LocalObjectReference `json:",inline" protobuf:"bytes,1,opt,name=localObjectReference"` + // Specify whether the ConfigMap must be defined + // +optional + Optional *bool `json:"optional,omitempty" protobuf:"varint,2,opt,name=optional"` +} + +// SecretEnvSource selects a Secret to populate the environment +// variables with. +// +// The contents of the target Secret's Data field will represent the +// key-value pairs as environment variables. +type SecretEnvSource struct { + // The Secret to select from. + LocalObjectReference `json:",inline" protobuf:"bytes,1,opt,name=localObjectReference"` + // Specify whether the Secret must be defined + // +optional + Optional *bool `json:"optional,omitempty" protobuf:"varint,2,opt,name=optional"` } // HTTPHeader describes a custom header to be used in HTTP probes @@ -1352,6 +1385,19 @@ const ( PullIfNotPresent PullPolicy = "IfNotPresent" ) +// TerminationMessagePolicy describes how termination messages are retrieved from a container. +type TerminationMessagePolicy string + +const ( + // TerminationMessageReadFile is the default behavior and will set the container status message to + // the contents of the container's terminationMessagePath when the container exits. + TerminationMessageReadFile TerminationMessagePolicy = "File" + // TerminationMessageFallbackToLogsOnError will read the most recent contents of the container logs + // for the container status message when the container exits with an error and the + // terminationMessagePath has no contents. + TerminationMessageFallbackToLogsOnError TerminationMessagePolicy = "FallbackToLogsOnError" +) + // Capability represent POSIX capabilities type type Capability string @@ -1469,10 +1515,21 @@ type Container struct { // Optional: Path at which the file to which the container's termination message // will be written is mounted into the container's filesystem. // Message written is intended to be brief final status, such as an assertion failure message. + // Will be truncated by the node if greater than 4096 bytes. The total message length across + // all containers will be limited to 12kb. // Defaults to /dev/termination-log. // Cannot be updated. // +optional TerminationMessagePath string `json:"terminationMessagePath,omitempty" protobuf:"bytes,13,opt,name=terminationMessagePath"` + // Indicate how the termination message should be populated. File will use the contents of + // terminationMessagePath to populate the container status message on both success and failure. + // FallbackToLogsOnError will use the last chunk of container log output if the termination + // message file is empty and the container exited with an error. + // The log output is limited to 2048 bytes or 80 lines, whichever is smaller. + // Defaults to File. + // Cannot be updated. + // +optional + TerminationMessagePolicy TerminationMessagePolicy `json:"terminationMessagePolicy,omitempty" protobuf:"bytes,20,opt,name=terminationMessagePolicy,casttype=TerminationMessagePolicy"` // Image pull policy. // One of Always, Never, IfNotPresent. // Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. @@ -2138,6 +2195,10 @@ type PodSpec struct { // If specified, the pod's scheduling constraints // +optional Affinity *Affinity `json:"affinity,omitempty" protobuf:"bytes,18,opt,name=affinity"` + // If specified, the pod will be dispatched by specified scheduler. + // If not specified, the pod will be dispatched by default scheduler. + // +optional + SchedulerName string `json:"schedulername,omitempty" protobuf:"bytes,19,opt,name=schedulername"` } // PodSecurityContext holds pod-level security attributes and common container settings. @@ -2252,7 +2313,7 @@ type PodStatusResult struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Most recently observed status of the pod. // This data may not be up to date. // Populated by the system. @@ -2271,7 +2332,7 @@ type Pod struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Specification of the desired behavior of the pod. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -2305,7 +2366,7 @@ type PodTemplateSpec struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Specification of the desired behavior of the pod. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -2321,7 +2382,7 @@ type PodTemplate struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Template defines the pods that will be created from this pod template. // http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -2442,7 +2503,7 @@ type ReplicationController struct { // be the same as the Pod(s) that the replication controller manages. // Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec defines the specification of the desired behavior of the replication controller. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -2675,7 +2736,7 @@ type Service struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec defines the behavior of a service. // http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -2719,7 +2780,7 @@ type ServiceAccount struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Secrets is the list of secrets allowed to be used by pods running using this ServiceAccount. // More info: http://kubernetes.io/docs/user-guide/secrets @@ -2766,7 +2827,7 @@ type Endpoints struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // The set of all endpoints is the union of all subsets. Addresses are placed into // subsets according to the IPs they share. A single address with multiple ports, @@ -3124,7 +3185,7 @@ type Node struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec defines the behavior of a node. // http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -3196,7 +3257,7 @@ type Namespace struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec defines the behavior of the Namespace. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -3229,20 +3290,23 @@ type Binding struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // The target object that you want to bind to the standard object. Target ObjectReference `json:"target" protobuf:"bytes,2,opt,name=target"` } // Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out. +// +k8s:openapi-gen=false type Preconditions struct { // Specifies the target UID. // +optional - UID *types.UID `json:"uid,omitempty" protobuf:"bytes,1,opt,name=uid,casttype=k8s.io/kubernetes/pkg/types.UID"` + UID *types.UID `json:"uid,omitempty" protobuf:"bytes,1,opt,name=uid,casttype=k8s.io/apimachinery/pkg/types.UID"` } // DeleteOptions may be provided when deleting an API object +// DEPRECATED: This type has been moved to meta/v1 and will be removed soon. +// +k8s:openapi-gen=false type DeleteOptions struct { metav1.TypeMeta `json:",inline"` @@ -3265,6 +3329,8 @@ type DeleteOptions struct { } // ListOptions is the query options to a standard REST list call. +// DEPRECATED: This type has been moved to meta/v1 and will be removed soon. +// +k8s:openapi-gen=false type ListOptions struct { metav1.TypeMeta `json:",inline"` @@ -3404,6 +3470,21 @@ type PodExecOptions struct { Command []string `json:"command" protobuf:"bytes,6,rep,name=command"` } +// PodPortForwardOptions is the query options to a Pod's port forward call +// when using WebSockets. +// The `port` query parameter must specify the port or +// ports (comma separated) to forward over. +// Port forwarding over SPDY does not use these options. It requires the port +// to be passed in the `port` header as part of request. +type PodPortForwardOptions struct { + metav1.TypeMeta `json:",inline"` + + // List of ports to forward + // Required when using WebSockets + // +optional + Ports []int32 `json:"ports,omitempty" protobuf:"varint,1,rep,name=ports"` +} + // PodProxyOptions is the query options to a Pod's proxy call. type PodProxyOptions struct { metav1.TypeMeta `json:",inline"` @@ -3452,7 +3533,7 @@ type ObjectReference struct { // UID of the referent. // More info: http://kubernetes.io/docs/user-guide/identifiers#uids // +optional - UID types.UID `json:"uid,omitempty" protobuf:"bytes,4,opt,name=uid,casttype=k8s.io/kubernetes/pkg/types.UID"` + UID types.UID `json:"uid,omitempty" protobuf:"bytes,4,opt,name=uid,casttype=k8s.io/apimachinery/pkg/types.UID"` // API version of the referent. // +optional APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,5,opt,name=apiVersion"` @@ -3517,7 +3598,7 @@ type Event struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - ObjectMeta `json:"metadata" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata" protobuf:"bytes,1,opt,name=metadata"` // The object that this event is about. InvolvedObject ObjectReference `json:"involvedObject" protobuf:"bytes,2,opt,name=involvedObject"` @@ -3626,7 +3707,7 @@ type LimitRange struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec defines the limits enforced. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -3724,7 +3805,7 @@ type ResourceQuota struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec defines the desired quota. // http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -3759,7 +3840,7 @@ type Secret struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Data contains the secret data. Each key must be a valid DNS_SUBDOMAIN // or leading dot followed by valid DNS_SUBDOMAIN. @@ -3886,7 +3967,7 @@ type ConfigMap struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Data contains the configuration data. // Each key must be a valid DNS_SUBDOMAIN with an optional leading dot. @@ -3941,7 +4022,7 @@ type ComponentStatus struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // List of component conditions observed // +optional @@ -4059,7 +4140,7 @@ type RangeAllocation struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Range is string that identifies the range represented by 'data'. Range string `json:"range" protobuf:"bytes,2,opt,name=range"` diff --git a/vendor/k8s.io/kubernetes/pkg/api/v1/types_swagger_doc_generated.go b/vendor/k8s.io/kubernetes/pkg/api/v1/types_swagger_doc_generated.go index c15d1992..6eb85766 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/v1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/kubernetes/pkg/api/v1/types_swagger_doc_generated.go @@ -181,7 +181,8 @@ func (ConfigMap) SwaggerDoc() map[string]string { } var map_ConfigMapEnvSource = map[string]string{ - "": "ConfigMapEnvSource selects a ConfigMap to populate the environment variables with.\n\nThe contents of the target ConfigMap's Data field will represent the key-value pairs as environment variables.", + "": "ConfigMapEnvSource selects a ConfigMap to populate the environment variables with.\n\nThe contents of the target ConfigMap's Data field will represent the key-value pairs as environment variables.", + "optional": "Specify whether the ConfigMap must be defined", } func (ConfigMapEnvSource) SwaggerDoc() map[string]string { @@ -189,8 +190,9 @@ func (ConfigMapEnvSource) SwaggerDoc() map[string]string { } var map_ConfigMapKeySelector = map[string]string{ - "": "Selects a key from a ConfigMap.", - "key": "The key to select.", + "": "Selects a key from a ConfigMap.", + "key": "The key to select.", + "optional": "Specify whether the ConfigMap or it's key must be defined", } func (ConfigMapKeySelector) SwaggerDoc() map[string]string { @@ -209,8 +211,9 @@ func (ConfigMapList) SwaggerDoc() map[string]string { var map_ConfigMapVolumeSource = map[string]string{ "": "Adapts a ConfigMap into a volume.\n\nThe contents of the target ConfigMap's Data field will be presented in a volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. ConfigMap volumes support ownership management and SELinux relabeling.", - "items": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error. Paths must be relative and may not contain the '..' path or start with '..'.", + "items": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.", "defaultMode": "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", + "optional": "Specify whether the ConfigMap or it's keys must be defined", } func (ConfigMapVolumeSource) SwaggerDoc() map[string]string { @@ -218,26 +221,27 @@ func (ConfigMapVolumeSource) SwaggerDoc() map[string]string { } var map_Container = map[string]string{ - "": "A single application container that you want to run within a pod.", - "name": "Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.", - "image": "Docker image name. More info: http://kubernetes.io/docs/user-guide/images", - "command": "Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/containers#containers-and-commands", - "args": "Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/containers#containers-and-commands", - "workingDir": "Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated.", - "ports": "List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default \"0.0.0.0\" address inside a container will be accessible from the network. Cannot be updated.", - "envFrom": "List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. An invalid key will prevent the container from starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated.", - "env": "List of environment variables to set in the container. Cannot be updated.", - "resources": "Compute Resources required by this container. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#resources", - "volumeMounts": "Pod volumes to mount into the container's filesystem. Cannot be updated.", - "livenessProbe": "Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/pod-states#container-probes", - "readinessProbe": "Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/pod-states#container-probes", - "lifecycle": "Actions that the management system should take in response to container lifecycle events. Cannot be updated.", - "terminationMessagePath": "Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated.", - "imagePullPolicy": "Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/images#updating-images", - "securityContext": "Security options the pod should run with. More info: http://releases.k8s.io/HEAD/docs/design/security_context.md", - "stdin": "Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false.", - "stdinOnce": "Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false", - "tty": "Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false.", + "": "A single application container that you want to run within a pod.", + "name": "Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.", + "image": "Docker image name. More info: http://kubernetes.io/docs/user-guide/images", + "command": "Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/containers#containers-and-commands", + "args": "Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/containers#containers-and-commands", + "workingDir": "Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated.", + "ports": "List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default \"0.0.0.0\" address inside a container will be accessible from the network. Cannot be updated.", + "envFrom": "List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. An invalid key will prevent the container from starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated.", + "env": "List of environment variables to set in the container. Cannot be updated.", + "resources": "Compute Resources required by this container. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#resources", + "volumeMounts": "Pod volumes to mount into the container's filesystem. Cannot be updated.", + "livenessProbe": "Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/pod-states#container-probes", + "readinessProbe": "Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/pod-states#container-probes", + "lifecycle": "Actions that the management system should take in response to container lifecycle events. Cannot be updated.", + "terminationMessagePath": "Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated.", + "terminationMessagePolicy": "Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.", + "imagePullPolicy": "Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/images#updating-images", + "securityContext": "Security options the pod should run with. More info: http://releases.k8s.io/HEAD/docs/design/security_context.md", + "stdin": "Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false.", + "stdinOnce": "Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false", + "tty": "Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false.", } func (Container) SwaggerDoc() map[string]string { @@ -338,7 +342,7 @@ func (DaemonEndpoint) SwaggerDoc() map[string]string { } var map_DeleteOptions = map[string]string{ - "": "DeleteOptions may be provided when deleting an API object", + "": "DeleteOptions may be provided when deleting an API object DEPRECATED: This type has been moved to meta/v1 and will be removed soon.", "gracePeriodSeconds": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", "preconditions": "Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.", "orphanDependents": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", @@ -437,6 +441,7 @@ var map_EnvFromSource = map[string]string{ "": "EnvFromSource represents the source of a set of ConfigMaps", "prefix": "An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.", "configMapRef": "The ConfigMap to select from", + "secretRef": "The Secret to select from", } func (EnvFromSource) SwaggerDoc() map[string]string { @@ -713,7 +718,7 @@ func (List) SwaggerDoc() map[string]string { } var map_ListOptions = map[string]string{ - "": "ListOptions is the query options to a standard REST list call.", + "": "ListOptions is the query options to a standard REST list call. DEPRECATED: This type has been moved to meta/v1 and will be removed soon.", "labelSelector": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "fieldSelector": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "watch": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", @@ -964,7 +969,7 @@ func (ObjectFieldSelector) SwaggerDoc() map[string]string { } var map_ObjectMeta = map[string]string{ - "": "ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.", + "": "ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create. DEPRECATED: Use k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta instead - this type will be removed soon.", "name": "Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names", "generateName": "GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.\n\nIf this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).\n\nApplied only if Name is not specified. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#idempotency", "namespace": "Namespace defines the space within each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.\n\nMust be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces", @@ -1243,6 +1248,15 @@ func (PodLogOptions) SwaggerDoc() map[string]string { return map_PodLogOptions } +var map_PodPortForwardOptions = map[string]string{ + "": "PodPortForwardOptions is the query options to a Pod's port forward call when using WebSockets. The `port` query parameter must specify the port or ports (comma separated) to forward over. Port forwarding over SPDY does not use these options. It requires the port to be passed in the `port` header as part of request.", + "ports": "List of ports to forward Required when using WebSockets", +} + +func (PodPortForwardOptions) SwaggerDoc() map[string]string { + return map_PodPortForwardOptions +} + var map_PodProxyOptions = map[string]string{ "": "PodProxyOptions is the query options to a Pod's proxy call.", "path": "Path is the URL path to use for the current proxy request to pod.", @@ -1294,6 +1308,7 @@ var map_PodSpec = map[string]string{ "hostname": "Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value.", "subdomain": "If specified, the fully qualified Pod hostname will be \"...svc.\". If not specified, the pod will not have a domainname at all.", "affinity": "If specified, the pod's scheduling constraints", + "schedulername": "If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler.", } func (PodSpec) SwaggerDoc() map[string]string { @@ -1587,9 +1602,19 @@ func (Secret) SwaggerDoc() map[string]string { return map_Secret } +var map_SecretEnvSource = map[string]string{ + "": "SecretEnvSource selects a Secret to populate the environment variables with.\n\nThe contents of the target Secret's Data field will represent the key-value pairs as environment variables.", + "optional": "Specify whether the Secret must be defined", +} + +func (SecretEnvSource) SwaggerDoc() map[string]string { + return map_SecretEnvSource +} + var map_SecretKeySelector = map[string]string{ - "": "SecretKeySelector selects a key of a Secret.", - "key": "The key of the secret to select from. Must be a valid secret key.", + "": "SecretKeySelector selects a key of a Secret.", + "key": "The key of the secret to select from. Must be a valid secret key.", + "optional": "Specify whether the Secret or it's key must be defined", } func (SecretKeySelector) SwaggerDoc() map[string]string { @@ -1609,8 +1634,9 @@ func (SecretList) SwaggerDoc() map[string]string { var map_SecretVolumeSource = map[string]string{ "": "Adapts a Secret into a volume.\n\nThe contents of the target Secret's Data field will be presented in a volume as files using the keys in the Data field as the file names. Secret volumes support ownership management and SELinux relabeling.", "secretName": "Name of the secret in the pod's namespace to use. More info: http://kubernetes.io/docs/user-guide/volumes#secrets", - "items": "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error. Paths must be relative and may not contain the '..' path or start with '..'.", + "items": "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.", "defaultMode": "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", + "optional": "Specify whether the Secret or it's keys must be defined", } func (SecretVolumeSource) SwaggerDoc() map[string]string { diff --git a/vendor/k8s.io/kubernetes/pkg/api/v1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/api/v1/zz_generated.conversion.go index c29f809d..a17e444f 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/v1/zz_generated.conversion.go +++ b/vendor/k8s.io/kubernetes/pkg/api/v1/zz_generated.conversion.go @@ -251,6 +251,8 @@ func RegisterConversions(scheme *runtime.Scheme) error { Convert_api_PodList_To_v1_PodList, Convert_v1_PodLogOptions_To_api_PodLogOptions, Convert_api_PodLogOptions_To_v1_PodLogOptions, + Convert_v1_PodPortForwardOptions_To_api_PodPortForwardOptions, + Convert_api_PodPortForwardOptions_To_v1_PodPortForwardOptions, Convert_v1_PodProxyOptions_To_api_PodProxyOptions, Convert_api_PodProxyOptions_To_v1_PodProxyOptions, Convert_v1_PodSecurityContext_To_api_PodSecurityContext, @@ -309,6 +311,8 @@ func RegisterConversions(scheme *runtime.Scheme) error { Convert_api_SELinuxOptions_To_v1_SELinuxOptions, Convert_v1_Secret_To_api_Secret, Convert_api_Secret_To_v1_Secret, + Convert_v1_SecretEnvSource_To_api_SecretEnvSource, + Convert_api_SecretEnvSource_To_v1_SecretEnvSource, Convert_v1_SecretKeySelector_To_api_SecretKeySelector, Convert_api_SecretKeySelector_To_v1_SecretKeySelector, Convert_v1_SecretList_To_api_SecretList, @@ -489,9 +493,7 @@ func Convert_api_AzureFileVolumeSource_To_v1_AzureFileVolumeSource(in *api.Azure } func autoConvert_v1_Binding_To_api_Binding(in *Binding, out *api.Binding, s conversion.Scope) error { - if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_ObjectReference_To_api_ObjectReference(&in.Target, &out.Target, s); err != nil { return err } @@ -503,9 +505,7 @@ func Convert_v1_Binding_To_api_Binding(in *Binding, out *api.Binding, s conversi } func autoConvert_api_Binding_To_v1_Binding(in *api.Binding, out *Binding, s conversion.Scope) error { - if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_api_ObjectReference_To_v1_ObjectReference(&in.Target, &out.Target, s); err != nil { return err } @@ -611,9 +611,7 @@ func Convert_api_ComponentCondition_To_v1_ComponentCondition(in *api.ComponentCo } func autoConvert_v1_ComponentStatus_To_api_ComponentStatus(in *ComponentStatus, out *api.ComponentStatus, s conversion.Scope) error { - if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.Conditions = *(*[]api.ComponentCondition)(unsafe.Pointer(&in.Conditions)) return nil } @@ -623,9 +621,7 @@ func Convert_v1_ComponentStatus_To_api_ComponentStatus(in *ComponentStatus, out } func autoConvert_api_ComponentStatus_To_v1_ComponentStatus(in *api.ComponentStatus, out *ComponentStatus, s conversion.Scope) error { - if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.Conditions = *(*[]ComponentCondition)(unsafe.Pointer(&in.Conditions)) return nil } @@ -655,9 +651,7 @@ func Convert_api_ComponentStatusList_To_v1_ComponentStatusList(in *api.Component } func autoConvert_v1_ConfigMap_To_api_ConfigMap(in *ConfigMap, out *api.ConfigMap, s conversion.Scope) error { - if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.Data = *(*map[string]string)(unsafe.Pointer(&in.Data)) return nil } @@ -667,9 +661,7 @@ func Convert_v1_ConfigMap_To_api_ConfigMap(in *ConfigMap, out *api.ConfigMap, s } func autoConvert_api_ConfigMap_To_v1_ConfigMap(in *api.ConfigMap, out *ConfigMap, s conversion.Scope) error { - if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.Data = *(*map[string]string)(unsafe.Pointer(&in.Data)) return nil } @@ -682,6 +674,7 @@ func autoConvert_v1_ConfigMapEnvSource_To_api_ConfigMapEnvSource(in *ConfigMapEn if err := Convert_v1_LocalObjectReference_To_api_LocalObjectReference(&in.LocalObjectReference, &out.LocalObjectReference, s); err != nil { return err } + out.Optional = (*bool)(unsafe.Pointer(in.Optional)) return nil } @@ -693,6 +686,7 @@ func autoConvert_api_ConfigMapEnvSource_To_v1_ConfigMapEnvSource(in *api.ConfigM if err := Convert_api_LocalObjectReference_To_v1_LocalObjectReference(&in.LocalObjectReference, &out.LocalObjectReference, s); err != nil { return err } + out.Optional = (*bool)(unsafe.Pointer(in.Optional)) return nil } @@ -705,6 +699,7 @@ func autoConvert_v1_ConfigMapKeySelector_To_api_ConfigMapKeySelector(in *ConfigM return err } out.Key = in.Key + out.Optional = (*bool)(unsafe.Pointer(in.Optional)) return nil } @@ -717,6 +712,7 @@ func autoConvert_api_ConfigMapKeySelector_To_v1_ConfigMapKeySelector(in *api.Con return err } out.Key = in.Key + out.Optional = (*bool)(unsafe.Pointer(in.Optional)) return nil } @@ -750,6 +746,7 @@ func autoConvert_v1_ConfigMapVolumeSource_To_api_ConfigMapVolumeSource(in *Confi } out.Items = *(*[]api.KeyToPath)(unsafe.Pointer(&in.Items)) out.DefaultMode = (*int32)(unsafe.Pointer(in.DefaultMode)) + out.Optional = (*bool)(unsafe.Pointer(in.Optional)) return nil } @@ -763,6 +760,7 @@ func autoConvert_api_ConfigMapVolumeSource_To_v1_ConfigMapVolumeSource(in *api.C } out.Items = *(*[]KeyToPath)(unsafe.Pointer(&in.Items)) out.DefaultMode = (*int32)(unsafe.Pointer(in.DefaultMode)) + out.Optional = (*bool)(unsafe.Pointer(in.Optional)) return nil } @@ -787,6 +785,7 @@ func autoConvert_v1_Container_To_api_Container(in *Container, out *api.Container out.ReadinessProbe = (*api.Probe)(unsafe.Pointer(in.ReadinessProbe)) out.Lifecycle = (*api.Lifecycle)(unsafe.Pointer(in.Lifecycle)) out.TerminationMessagePath = in.TerminationMessagePath + out.TerminationMessagePolicy = api.TerminationMessagePolicy(in.TerminationMessagePolicy) out.ImagePullPolicy = api.PullPolicy(in.ImagePullPolicy) out.SecurityContext = (*api.SecurityContext)(unsafe.Pointer(in.SecurityContext)) out.Stdin = in.Stdin @@ -816,6 +815,7 @@ func autoConvert_api_Container_To_v1_Container(in *api.Container, out *Container out.ReadinessProbe = (*Probe)(unsafe.Pointer(in.ReadinessProbe)) out.Lifecycle = (*Lifecycle)(unsafe.Pointer(in.Lifecycle)) out.TerminationMessagePath = in.TerminationMessagePath + out.TerminationMessagePolicy = TerminationMessagePolicy(in.TerminationMessagePolicy) out.ImagePullPolicy = PullPolicy(in.ImagePullPolicy) out.SecurityContext = (*SecurityContext)(unsafe.Pointer(in.SecurityContext)) out.Stdin = in.Stdin @@ -1175,9 +1175,7 @@ func Convert_api_EndpointSubset_To_v1_EndpointSubset(in *api.EndpointSubset, out } func autoConvert_v1_Endpoints_To_api_Endpoints(in *Endpoints, out *api.Endpoints, s conversion.Scope) error { - if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.Subsets = *(*[]api.EndpointSubset)(unsafe.Pointer(&in.Subsets)) return nil } @@ -1187,9 +1185,7 @@ func Convert_v1_Endpoints_To_api_Endpoints(in *Endpoints, out *api.Endpoints, s } func autoConvert_api_Endpoints_To_v1_Endpoints(in *api.Endpoints, out *Endpoints, s conversion.Scope) error { - if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.Subsets = *(*[]EndpointSubset)(unsafe.Pointer(&in.Subsets)) return nil } @@ -1221,6 +1217,7 @@ func Convert_api_EndpointsList_To_v1_EndpointsList(in *api.EndpointsList, out *E func autoConvert_v1_EnvFromSource_To_api_EnvFromSource(in *EnvFromSource, out *api.EnvFromSource, s conversion.Scope) error { out.Prefix = in.Prefix out.ConfigMapRef = (*api.ConfigMapEnvSource)(unsafe.Pointer(in.ConfigMapRef)) + out.SecretRef = (*api.SecretEnvSource)(unsafe.Pointer(in.SecretRef)) return nil } @@ -1231,6 +1228,7 @@ func Convert_v1_EnvFromSource_To_api_EnvFromSource(in *EnvFromSource, out *api.E func autoConvert_api_EnvFromSource_To_v1_EnvFromSource(in *api.EnvFromSource, out *EnvFromSource, s conversion.Scope) error { out.Prefix = in.Prefix out.ConfigMapRef = (*ConfigMapEnvSource)(unsafe.Pointer(in.ConfigMapRef)) + out.SecretRef = (*SecretEnvSource)(unsafe.Pointer(in.SecretRef)) return nil } @@ -1285,9 +1283,7 @@ func Convert_api_EnvVarSource_To_v1_EnvVarSource(in *api.EnvVarSource, out *EnvV } func autoConvert_v1_Event_To_api_Event(in *Event, out *api.Event, s conversion.Scope) error { - if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_ObjectReference_To_api_ObjectReference(&in.InvolvedObject, &out.InvolvedObject, s); err != nil { return err } @@ -1308,9 +1304,7 @@ func Convert_v1_Event_To_api_Event(in *Event, out *api.Event, s conversion.Scope } func autoConvert_api_Event_To_v1_Event(in *api.Event, out *Event, s conversion.Scope) error { - if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_api_ObjectReference_To_v1_ObjectReference(&in.InvolvedObject, &out.InvolvedObject, s); err != nil { return err } @@ -1683,9 +1677,7 @@ func Convert_api_Lifecycle_To_v1_Lifecycle(in *api.Lifecycle, out *Lifecycle, s } func autoConvert_v1_LimitRange_To_api_LimitRange(in *LimitRange, out *api.LimitRange, s conversion.Scope) error { - if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_LimitRangeSpec_To_api_LimitRangeSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -1697,9 +1689,7 @@ func Convert_v1_LimitRange_To_api_LimitRange(in *LimitRange, out *api.LimitRange } func autoConvert_api_LimitRange_To_v1_LimitRange(in *api.LimitRange, out *LimitRange, s conversion.Scope) error { - if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_api_LimitRangeSpec_To_v1_LimitRangeSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -1929,9 +1919,7 @@ func Convert_api_NFSVolumeSource_To_v1_NFSVolumeSource(in *api.NFSVolumeSource, } func autoConvert_v1_Namespace_To_api_Namespace(in *Namespace, out *api.Namespace, s conversion.Scope) error { - if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_NamespaceSpec_To_api_NamespaceSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -1946,9 +1934,7 @@ func Convert_v1_Namespace_To_api_Namespace(in *Namespace, out *api.Namespace, s } func autoConvert_api_Namespace_To_v1_Namespace(in *api.Namespace, out *Namespace, s conversion.Scope) error { - if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_api_NamespaceSpec_To_v1_NamespaceSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -2019,9 +2005,7 @@ func Convert_api_NamespaceStatus_To_v1_NamespaceStatus(in *api.NamespaceStatus, } func autoConvert_v1_Node_To_api_Node(in *Node, out *api.Node, s conversion.Scope) error { - if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_NodeSpec_To_api_NodeSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -2036,9 +2020,7 @@ func Convert_v1_Node_To_api_Node(in *Node, out *api.Node, s conversion.Scope) er } func autoConvert_api_Node_To_v1_Node(in *api.Node, out *Node, s conversion.Scope) error { - if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_api_NodeSpec_To_v1_NodeSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -2457,9 +2439,7 @@ func Convert_api_ObjectReference_To_v1_ObjectReference(in *api.ObjectReference, } func autoConvert_v1_PersistentVolume_To_api_PersistentVolume(in *PersistentVolume, out *api.PersistentVolume, s conversion.Scope) error { - if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_PersistentVolumeSpec_To_api_PersistentVolumeSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -2474,9 +2454,7 @@ func Convert_v1_PersistentVolume_To_api_PersistentVolume(in *PersistentVolume, o } func autoConvert_api_PersistentVolume_To_v1_PersistentVolume(in *api.PersistentVolume, out *PersistentVolume, s conversion.Scope) error { - if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_api_PersistentVolumeSpec_To_v1_PersistentVolumeSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -2491,9 +2469,7 @@ func Convert_api_PersistentVolume_To_v1_PersistentVolume(in *api.PersistentVolum } func autoConvert_v1_PersistentVolumeClaim_To_api_PersistentVolumeClaim(in *PersistentVolumeClaim, out *api.PersistentVolumeClaim, s conversion.Scope) error { - if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_PersistentVolumeClaimSpec_To_api_PersistentVolumeClaimSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -2508,9 +2484,7 @@ func Convert_v1_PersistentVolumeClaim_To_api_PersistentVolumeClaim(in *Persisten } func autoConvert_api_PersistentVolumeClaim_To_v1_PersistentVolumeClaim(in *api.PersistentVolumeClaim, out *PersistentVolumeClaim, s conversion.Scope) error { - if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_api_PersistentVolumeClaimSpec_To_v1_PersistentVolumeClaimSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -2777,9 +2751,7 @@ func Convert_api_PhotonPersistentDiskVolumeSource_To_v1_PhotonPersistentDiskVolu } func autoConvert_v1_Pod_To_api_Pod(in *Pod, out *api.Pod, s conversion.Scope) error { - if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_PodSpec_To_api_PodSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -2790,9 +2762,7 @@ func autoConvert_v1_Pod_To_api_Pod(in *Pod, out *api.Pod, s conversion.Scope) er } func autoConvert_api_Pod_To_v1_Pod(in *api.Pod, out *Pod, s conversion.Scope) error { - if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_api_PodSpec_To_v1_PodSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -3018,6 +2988,24 @@ func Convert_api_PodLogOptions_To_v1_PodLogOptions(in *api.PodLogOptions, out *P return autoConvert_api_PodLogOptions_To_v1_PodLogOptions(in, out, s) } +func autoConvert_v1_PodPortForwardOptions_To_api_PodPortForwardOptions(in *PodPortForwardOptions, out *api.PodPortForwardOptions, s conversion.Scope) error { + out.Ports = *(*[]int32)(unsafe.Pointer(&in.Ports)) + return nil +} + +func Convert_v1_PodPortForwardOptions_To_api_PodPortForwardOptions(in *PodPortForwardOptions, out *api.PodPortForwardOptions, s conversion.Scope) error { + return autoConvert_v1_PodPortForwardOptions_To_api_PodPortForwardOptions(in, out, s) +} + +func autoConvert_api_PodPortForwardOptions_To_v1_PodPortForwardOptions(in *api.PodPortForwardOptions, out *PodPortForwardOptions, s conversion.Scope) error { + out.Ports = *(*[]int32)(unsafe.Pointer(&in.Ports)) + return nil +} + +func Convert_api_PodPortForwardOptions_To_v1_PodPortForwardOptions(in *api.PodPortForwardOptions, out *PodPortForwardOptions, s conversion.Scope) error { + return autoConvert_api_PodPortForwardOptions_To_v1_PodPortForwardOptions(in, out, s) +} + func autoConvert_v1_PodProxyOptions_To_api_PodProxyOptions(in *PodProxyOptions, out *api.PodProxyOptions, s conversion.Scope) error { out.Path = in.Path return nil @@ -3113,6 +3101,7 @@ func autoConvert_v1_PodSpec_To_api_PodSpec(in *PodSpec, out *api.PodSpec, s conv out.Hostname = in.Hostname out.Subdomain = in.Subdomain out.Affinity = (*api.Affinity)(unsafe.Pointer(in.Affinity)) + out.SchedulerName = in.SchedulerName return nil } @@ -3150,6 +3139,7 @@ func autoConvert_api_PodSpec_To_v1_PodSpec(in *api.PodSpec, out *PodSpec, s conv out.Hostname = in.Hostname out.Subdomain = in.Subdomain out.Affinity = (*Affinity)(unsafe.Pointer(in.Affinity)) + out.SchedulerName = in.SchedulerName return nil } @@ -3190,9 +3180,7 @@ func Convert_api_PodStatus_To_v1_PodStatus(in *api.PodStatus, out *PodStatus, s } func autoConvert_v1_PodStatusResult_To_api_PodStatusResult(in *PodStatusResult, out *api.PodStatusResult, s conversion.Scope) error { - if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_PodStatus_To_api_PodStatus(&in.Status, &out.Status, s); err != nil { return err } @@ -3200,9 +3188,7 @@ func autoConvert_v1_PodStatusResult_To_api_PodStatusResult(in *PodStatusResult, } func autoConvert_api_PodStatusResult_To_v1_PodStatusResult(in *api.PodStatusResult, out *PodStatusResult, s conversion.Scope) error { - if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_api_PodStatus_To_v1_PodStatus(&in.Status, &out.Status, s); err != nil { return err } @@ -3210,9 +3196,7 @@ func autoConvert_api_PodStatusResult_To_v1_PodStatusResult(in *api.PodStatusResu } func autoConvert_v1_PodTemplate_To_api_PodTemplate(in *PodTemplate, out *api.PodTemplate, s conversion.Scope) error { - if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(&in.Template, &out.Template, s); err != nil { return err } @@ -3224,9 +3208,7 @@ func Convert_v1_PodTemplate_To_api_PodTemplate(in *PodTemplate, out *api.PodTemp } func autoConvert_api_PodTemplate_To_v1_PodTemplate(in *api.PodTemplate, out *PodTemplate, s conversion.Scope) error { - if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(&in.Template, &out.Template, s); err != nil { return err } @@ -3278,9 +3260,7 @@ func Convert_api_PodTemplateList_To_v1_PodTemplateList(in *api.PodTemplateList, } func autoConvert_v1_PodTemplateSpec_To_api_PodTemplateSpec(in *PodTemplateSpec, out *api.PodTemplateSpec, s conversion.Scope) error { - if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_PodSpec_To_api_PodSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -3288,9 +3268,7 @@ func autoConvert_v1_PodTemplateSpec_To_api_PodTemplateSpec(in *PodTemplateSpec, } func autoConvert_api_PodTemplateSpec_To_v1_PodTemplateSpec(in *api.PodTemplateSpec, out *PodTemplateSpec, s conversion.Scope) error { - if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_api_PodSpec_To_v1_PodSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -3458,9 +3436,7 @@ func Convert_api_RBDVolumeSource_To_v1_RBDVolumeSource(in *api.RBDVolumeSource, } func autoConvert_v1_RangeAllocation_To_api_RangeAllocation(in *RangeAllocation, out *api.RangeAllocation, s conversion.Scope) error { - if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.Range = in.Range out.Data = *(*[]byte)(unsafe.Pointer(&in.Data)) return nil @@ -3471,9 +3447,7 @@ func Convert_v1_RangeAllocation_To_api_RangeAllocation(in *RangeAllocation, out } func autoConvert_api_RangeAllocation_To_v1_RangeAllocation(in *api.RangeAllocation, out *RangeAllocation, s conversion.Scope) error { - if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.Range = in.Range out.Data = *(*[]byte)(unsafe.Pointer(&in.Data)) return nil @@ -3484,9 +3458,7 @@ func Convert_api_RangeAllocation_To_v1_RangeAllocation(in *api.RangeAllocation, } func autoConvert_v1_ReplicationController_To_api_ReplicationController(in *ReplicationController, out *api.ReplicationController, s conversion.Scope) error { - if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_ReplicationControllerSpec_To_api_ReplicationControllerSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -3501,9 +3473,7 @@ func Convert_v1_ReplicationController_To_api_ReplicationController(in *Replicati } func autoConvert_api_ReplicationController_To_v1_ReplicationController(in *api.ReplicationController, out *ReplicationController, s conversion.Scope) error { - if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_api_ReplicationControllerSpec_To_v1_ReplicationControllerSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -3670,9 +3640,7 @@ func Convert_api_ResourceFieldSelector_To_v1_ResourceFieldSelector(in *api.Resou } func autoConvert_v1_ResourceQuota_To_api_ResourceQuota(in *ResourceQuota, out *api.ResourceQuota, s conversion.Scope) error { - if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_ResourceQuotaSpec_To_api_ResourceQuotaSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -3687,9 +3655,7 @@ func Convert_v1_ResourceQuota_To_api_ResourceQuota(in *ResourceQuota, out *api.R } func autoConvert_api_ResourceQuota_To_v1_ResourceQuota(in *api.ResourceQuota, out *ResourceQuota, s conversion.Scope) error { - if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_api_ResourceQuotaSpec_To_v1_ResourceQuotaSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -3808,9 +3774,7 @@ func Convert_api_SELinuxOptions_To_v1_SELinuxOptions(in *api.SELinuxOptions, out } func autoConvert_v1_Secret_To_api_Secret(in *Secret, out *api.Secret, s conversion.Scope) error { - if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.Data = *(*map[string][]byte)(unsafe.Pointer(&in.Data)) // INFO: in.StringData opted out of conversion generation out.Type = api.SecretType(in.Type) @@ -3818,9 +3782,7 @@ func autoConvert_v1_Secret_To_api_Secret(in *Secret, out *api.Secret, s conversi } func autoConvert_api_Secret_To_v1_Secret(in *api.Secret, out *Secret, s conversion.Scope) error { - if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.Data = *(*map[string][]byte)(unsafe.Pointer(&in.Data)) out.Type = SecretType(in.Type) return nil @@ -3830,11 +3792,36 @@ func Convert_api_Secret_To_v1_Secret(in *api.Secret, out *Secret, s conversion.S return autoConvert_api_Secret_To_v1_Secret(in, out, s) } +func autoConvert_v1_SecretEnvSource_To_api_SecretEnvSource(in *SecretEnvSource, out *api.SecretEnvSource, s conversion.Scope) error { + if err := Convert_v1_LocalObjectReference_To_api_LocalObjectReference(&in.LocalObjectReference, &out.LocalObjectReference, s); err != nil { + return err + } + out.Optional = (*bool)(unsafe.Pointer(in.Optional)) + return nil +} + +func Convert_v1_SecretEnvSource_To_api_SecretEnvSource(in *SecretEnvSource, out *api.SecretEnvSource, s conversion.Scope) error { + return autoConvert_v1_SecretEnvSource_To_api_SecretEnvSource(in, out, s) +} + +func autoConvert_api_SecretEnvSource_To_v1_SecretEnvSource(in *api.SecretEnvSource, out *SecretEnvSource, s conversion.Scope) error { + if err := Convert_api_LocalObjectReference_To_v1_LocalObjectReference(&in.LocalObjectReference, &out.LocalObjectReference, s); err != nil { + return err + } + out.Optional = (*bool)(unsafe.Pointer(in.Optional)) + return nil +} + +func Convert_api_SecretEnvSource_To_v1_SecretEnvSource(in *api.SecretEnvSource, out *SecretEnvSource, s conversion.Scope) error { + return autoConvert_api_SecretEnvSource_To_v1_SecretEnvSource(in, out, s) +} + func autoConvert_v1_SecretKeySelector_To_api_SecretKeySelector(in *SecretKeySelector, out *api.SecretKeySelector, s conversion.Scope) error { if err := Convert_v1_LocalObjectReference_To_api_LocalObjectReference(&in.LocalObjectReference, &out.LocalObjectReference, s); err != nil { return err } out.Key = in.Key + out.Optional = (*bool)(unsafe.Pointer(in.Optional)) return nil } @@ -3847,6 +3834,7 @@ func autoConvert_api_SecretKeySelector_To_v1_SecretKeySelector(in *api.SecretKey return err } out.Key = in.Key + out.Optional = (*bool)(unsafe.Pointer(in.Optional)) return nil } @@ -3898,6 +3886,7 @@ func autoConvert_v1_SecretVolumeSource_To_api_SecretVolumeSource(in *SecretVolum out.SecretName = in.SecretName out.Items = *(*[]api.KeyToPath)(unsafe.Pointer(&in.Items)) out.DefaultMode = (*int32)(unsafe.Pointer(in.DefaultMode)) + out.Optional = (*bool)(unsafe.Pointer(in.Optional)) return nil } @@ -3909,6 +3898,7 @@ func autoConvert_api_SecretVolumeSource_To_v1_SecretVolumeSource(in *api.SecretV out.SecretName = in.SecretName out.Items = *(*[]KeyToPath)(unsafe.Pointer(&in.Items)) out.DefaultMode = (*int32)(unsafe.Pointer(in.DefaultMode)) + out.Optional = (*bool)(unsafe.Pointer(in.Optional)) return nil } @@ -3967,9 +3957,7 @@ func Convert_api_SerializedReference_To_v1_SerializedReference(in *api.Serialize } func autoConvert_v1_Service_To_api_Service(in *Service, out *api.Service, s conversion.Scope) error { - if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_ServiceSpec_To_api_ServiceSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -3984,9 +3972,7 @@ func Convert_v1_Service_To_api_Service(in *Service, out *api.Service, s conversi } func autoConvert_api_Service_To_v1_Service(in *api.Service, out *Service, s conversion.Scope) error { - if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_api_ServiceSpec_To_v1_ServiceSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -4001,9 +3987,7 @@ func Convert_api_Service_To_v1_Service(in *api.Service, out *Service, s conversi } func autoConvert_v1_ServiceAccount_To_api_ServiceAccount(in *ServiceAccount, out *api.ServiceAccount, s conversion.Scope) error { - if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.Secrets = *(*[]api.ObjectReference)(unsafe.Pointer(&in.Secrets)) out.ImagePullSecrets = *(*[]api.LocalObjectReference)(unsafe.Pointer(&in.ImagePullSecrets)) return nil @@ -4014,9 +3998,7 @@ func Convert_v1_ServiceAccount_To_api_ServiceAccount(in *ServiceAccount, out *ap } func autoConvert_api_ServiceAccount_To_v1_ServiceAccount(in *api.ServiceAccount, out *ServiceAccount, s conversion.Scope) error { - if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.Secrets = *(*[]ObjectReference)(unsafe.Pointer(&in.Secrets)) out.ImagePullSecrets = *(*[]LocalObjectReference)(unsafe.Pointer(&in.ImagePullSecrets)) return nil diff --git a/vendor/k8s.io/kubernetes/pkg/api/v1/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/api/v1/zz_generated.deepcopy.go index aeab418f..9fa0625e 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/v1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/pkg/api/v1/zz_generated.deepcopy.go @@ -143,6 +143,7 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error { conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodExecOptions, InType: reflect.TypeOf(&PodExecOptions{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodList, InType: reflect.TypeOf(&PodList{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodLogOptions, InType: reflect.TypeOf(&PodLogOptions{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodPortForwardOptions, InType: reflect.TypeOf(&PodPortForwardOptions{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodProxyOptions, InType: reflect.TypeOf(&PodProxyOptions{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodSecurityContext, InType: reflect.TypeOf(&PodSecurityContext{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodSignature, InType: reflect.TypeOf(&PodSignature{})}, @@ -172,6 +173,7 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error { conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ResourceRequirements, InType: reflect.TypeOf(&ResourceRequirements{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_SELinuxOptions, InType: reflect.TypeOf(&SELinuxOptions{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Secret, InType: reflect.TypeOf(&Secret{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_SecretEnvSource, InType: reflect.TypeOf(&SecretEnvSource{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_SecretKeySelector, InType: reflect.TypeOf(&SecretKeySelector{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_SecretList, InType: reflect.TypeOf(&SecretList{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_SecretVolumeSource, InType: reflect.TypeOf(&SecretVolumeSource{})}, @@ -301,8 +303,10 @@ func DeepCopy_v1_Binding(in interface{}, out interface{}, c *conversion.Cloner) in := in.(*Binding) out := out.(*Binding) *out = *in - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } return nil } @@ -316,16 +320,12 @@ func DeepCopy_v1_Capabilities(in interface{}, out interface{}, c *conversion.Clo if in.Add != nil { in, out := &in.Add, &out.Add *out = make([]Capability, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.Drop != nil { in, out := &in.Drop, &out.Drop *out = make([]Capability, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } @@ -373,15 +373,15 @@ func DeepCopy_v1_ComponentStatus(in interface{}, out interface{}, c *conversion. in := in.(*ComponentStatus) out := out.(*ComponentStatus) *out = *in - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions *out = make([]ComponentCondition, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } @@ -410,8 +410,10 @@ func DeepCopy_v1_ConfigMap(in interface{}, out interface{}, c *conversion.Cloner in := in.(*ConfigMap) out := out.(*ConfigMap) *out = *in - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if in.Data != nil { in, out := &in.Data, &out.Data @@ -429,6 +431,11 @@ func DeepCopy_v1_ConfigMapEnvSource(in interface{}, out interface{}, c *conversi in := in.(*ConfigMapEnvSource) out := out.(*ConfigMapEnvSource) *out = *in + if in.Optional != nil { + in, out := &in.Optional, &out.Optional + *out = new(bool) + **out = **in + } return nil } } @@ -438,6 +445,11 @@ func DeepCopy_v1_ConfigMapKeySelector(in interface{}, out interface{}, c *conver in := in.(*ConfigMapKeySelector) out := out.(*ConfigMapKeySelector) *out = *in + if in.Optional != nil { + in, out := &in.Optional, &out.Optional + *out = new(bool) + **out = **in + } return nil } } @@ -479,6 +491,11 @@ func DeepCopy_v1_ConfigMapVolumeSource(in interface{}, out interface{}, c *conve *out = new(int32) **out = **in } + if in.Optional != nil { + in, out := &in.Optional, &out.Optional + *out = new(bool) + **out = **in + } return nil } } @@ -501,9 +518,7 @@ func DeepCopy_v1_Container(in interface{}, out interface{}, c *conversion.Cloner if in.Ports != nil { in, out := &in.Ports, &out.Ports *out = make([]ContainerPort, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.EnvFrom != nil { in, out := &in.EnvFrom, &out.EnvFrom @@ -529,9 +544,7 @@ func DeepCopy_v1_Container(in interface{}, out interface{}, c *conversion.Cloner if in.VolumeMounts != nil { in, out := &in.VolumeMounts, &out.VolumeMounts *out = make([]VolumeMount, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.LivenessProbe != nil { in, out := &in.LivenessProbe, &out.LivenessProbe @@ -808,9 +821,7 @@ func DeepCopy_v1_EndpointSubset(in interface{}, out interface{}, c *conversion.C if in.Ports != nil { in, out := &in.Ports, &out.Ports *out = make([]EndpointPort, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } @@ -821,8 +832,10 @@ func DeepCopy_v1_Endpoints(in interface{}, out interface{}, c *conversion.Cloner in := in.(*Endpoints) out := out.(*Endpoints) *out = *in - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if in.Subsets != nil { in, out := &in.Subsets, &out.Subsets @@ -863,7 +876,16 @@ func DeepCopy_v1_EnvFromSource(in interface{}, out interface{}, c *conversion.Cl if in.ConfigMapRef != nil { in, out := &in.ConfigMapRef, &out.ConfigMapRef *out = new(ConfigMapEnvSource) - **out = **in + if err := DeepCopy_v1_ConfigMapEnvSource(*in, *out, c); err != nil { + return err + } + } + if in.SecretRef != nil { + in, out := &in.SecretRef, &out.SecretRef + *out = new(SecretEnvSource) + if err := DeepCopy_v1_SecretEnvSource(*in, *out, c); err != nil { + return err + } } return nil } @@ -905,12 +927,16 @@ func DeepCopy_v1_EnvVarSource(in interface{}, out interface{}, c *conversion.Clo if in.ConfigMapKeyRef != nil { in, out := &in.ConfigMapKeyRef, &out.ConfigMapKeyRef *out = new(ConfigMapKeySelector) - **out = **in + if err := DeepCopy_v1_ConfigMapKeySelector(*in, *out, c); err != nil { + return err + } } if in.SecretKeyRef != nil { in, out := &in.SecretKeyRef, &out.SecretKeyRef *out = new(SecretKeySelector) - **out = **in + if err := DeepCopy_v1_SecretKeySelector(*in, *out, c); err != nil { + return err + } } return nil } @@ -921,8 +947,10 @@ func DeepCopy_v1_Event(in interface{}, out interface{}, c *conversion.Cloner) er in := in.(*Event) out := out.(*Event) *out = *in - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } out.FirstTimestamp = in.FirstTimestamp.DeepCopy() out.LastTimestamp = in.LastTimestamp.DeepCopy() @@ -1055,9 +1083,7 @@ func DeepCopy_v1_HTTPGetAction(in interface{}, out interface{}, c *conversion.Cl if in.HTTPHeaders != nil { in, out := &in.HTTPHeaders, &out.HTTPHeaders *out = make([]HTTPHeader, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } @@ -1160,8 +1186,10 @@ func DeepCopy_v1_LimitRange(in interface{}, out interface{}, c *conversion.Clone in := in.(*LimitRange) out := out.(*LimitRange) *out = *in - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if err := DeepCopy_v1_LimitRangeSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -1301,9 +1329,7 @@ func DeepCopy_v1_LoadBalancerStatus(in interface{}, out interface{}, c *conversi if in.Ingress != nil { in, out := &in.Ingress, &out.Ingress *out = make([]LoadBalancerIngress, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } @@ -1332,8 +1358,10 @@ func DeepCopy_v1_Namespace(in interface{}, out interface{}, c *conversion.Cloner in := in.(*Namespace) out := out.(*Namespace) *out = *in - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if err := DeepCopy_v1_NamespaceSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -1368,9 +1396,7 @@ func DeepCopy_v1_NamespaceSpec(in interface{}, out interface{}, c *conversion.Cl if in.Finalizers != nil { in, out := &in.Finalizers, &out.Finalizers *out = make([]FinalizerName, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } @@ -1390,8 +1416,10 @@ func DeepCopy_v1_Node(in interface{}, out interface{}, c *conversion.Cloner) err in := in.(*Node) out := out.(*Node) *out = *in - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if err := DeepCopy_v1_NodeStatus(&in.Status, &out.Status, c); err != nil { return err @@ -1587,9 +1615,7 @@ func DeepCopy_v1_NodeStatus(in interface{}, out interface{}, c *conversion.Clone if in.Addresses != nil { in, out := &in.Addresses, &out.Addresses *out = make([]NodeAddress, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.Images != nil { in, out := &in.Images, &out.Images @@ -1603,16 +1629,12 @@ func DeepCopy_v1_NodeStatus(in interface{}, out interface{}, c *conversion.Clone if in.VolumesInUse != nil { in, out := &in.VolumesInUse, &out.VolumesInUse *out = make([]UniqueVolumeName, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.VolumesAttached != nil { in, out := &in.VolumesAttached, &out.VolumesAttached *out = make([]AttachedVolume, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } @@ -1700,8 +1722,10 @@ func DeepCopy_v1_PersistentVolume(in interface{}, out interface{}, c *conversion in := in.(*PersistentVolume) out := out.(*PersistentVolume) *out = *in - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if err := DeepCopy_v1_PersistentVolumeSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -1715,8 +1739,10 @@ func DeepCopy_v1_PersistentVolumeClaim(in interface{}, out interface{}, c *conve in := in.(*PersistentVolumeClaim) out := out.(*PersistentVolumeClaim) *out = *in - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if err := DeepCopy_v1_PersistentVolumeClaimSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -1754,9 +1780,7 @@ func DeepCopy_v1_PersistentVolumeClaimSpec(in interface{}, out interface{}, c *c if in.AccessModes != nil { in, out := &in.AccessModes, &out.AccessModes *out = make([]PersistentVolumeAccessMode, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.Selector != nil { in, out := &in.Selector, &out.Selector @@ -1781,9 +1805,7 @@ func DeepCopy_v1_PersistentVolumeClaimStatus(in interface{}, out interface{}, c if in.AccessModes != nil { in, out := &in.AccessModes, &out.AccessModes *out = make([]PersistentVolumeAccessMode, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.Capacity != nil { in, out := &in.Capacity, &out.Capacity @@ -1945,9 +1967,7 @@ func DeepCopy_v1_PersistentVolumeSpec(in interface{}, out interface{}, c *conver if in.AccessModes != nil { in, out := &in.AccessModes, &out.AccessModes *out = make([]PersistentVolumeAccessMode, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.ClaimRef != nil { in, out := &in.ClaimRef, &out.ClaimRef @@ -1981,8 +2001,10 @@ func DeepCopy_v1_Pod(in interface{}, out interface{}, c *conversion.Cloner) erro in := in.(*Pod) out := out.(*Pod) *out = *in - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if err := DeepCopy_v1_PodSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -2151,6 +2173,20 @@ func DeepCopy_v1_PodLogOptions(in interface{}, out interface{}, c *conversion.Cl } } +func DeepCopy_v1_PodPortForwardOptions(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*PodPortForwardOptions) + out := out.(*PodPortForwardOptions) + *out = *in + if in.Ports != nil { + in, out := &in.Ports, &out.Ports + *out = make([]int32, len(*in)) + copy(*out, *in) + } + return nil + } +} + func DeepCopy_v1_PodProxyOptions(in interface{}, out interface{}, c *conversion.Cloner) error { { in := in.(*PodProxyOptions) @@ -2270,9 +2306,7 @@ func DeepCopy_v1_PodSpec(in interface{}, out interface{}, c *conversion.Cloner) if in.ImagePullSecrets != nil { in, out := &in.ImagePullSecrets, &out.ImagePullSecrets *out = make([]LocalObjectReference, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.Affinity != nil { in, out := &in.Affinity, &out.Affinity @@ -2331,8 +2365,10 @@ func DeepCopy_v1_PodStatusResult(in interface{}, out interface{}, c *conversion. in := in.(*PodStatusResult) out := out.(*PodStatusResult) *out = *in - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if err := DeepCopy_v1_PodStatus(&in.Status, &out.Status, c); err != nil { return err @@ -2346,8 +2382,10 @@ func DeepCopy_v1_PodTemplate(in interface{}, out interface{}, c *conversion.Clon in := in.(*PodTemplate) out := out.(*PodTemplate) *out = *in - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if err := DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil { return err @@ -2379,8 +2417,10 @@ func DeepCopy_v1_PodTemplateSpec(in interface{}, out interface{}, c *conversion. in := in.(*PodTemplateSpec) out := out.(*PodTemplateSpec) *out = *in - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if err := DeepCopy_v1_PodSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -2473,8 +2513,10 @@ func DeepCopy_v1_RangeAllocation(in interface{}, out interface{}, c *conversion. in := in.(*RangeAllocation) out := out.(*RangeAllocation) *out = *in - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if in.Data != nil { in, out := &in.Data, &out.Data @@ -2490,8 +2532,10 @@ func DeepCopy_v1_ReplicationController(in interface{}, out interface{}, c *conve in := in.(*ReplicationController) out := out.(*ReplicationController) *out = *in - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if err := DeepCopy_v1_ReplicationControllerSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -2592,8 +2636,10 @@ func DeepCopy_v1_ResourceQuota(in interface{}, out interface{}, c *conversion.Cl in := in.(*ResourceQuota) out := out.(*ResourceQuota) *out = *in - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if err := DeepCopy_v1_ResourceQuotaSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -2638,9 +2684,7 @@ func DeepCopy_v1_ResourceQuotaSpec(in interface{}, out interface{}, c *conversio if in.Scopes != nil { in, out := &in.Scopes, &out.Scopes *out = make([]ResourceQuotaScope, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } @@ -2706,8 +2750,10 @@ func DeepCopy_v1_Secret(in interface{}, out interface{}, c *conversion.Cloner) e in := in.(*Secret) out := out.(*Secret) *out = *in - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if in.Data != nil { in, out := &in.Data, &out.Data @@ -2731,11 +2777,30 @@ func DeepCopy_v1_Secret(in interface{}, out interface{}, c *conversion.Cloner) e } } +func DeepCopy_v1_SecretEnvSource(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*SecretEnvSource) + out := out.(*SecretEnvSource) + *out = *in + if in.Optional != nil { + in, out := &in.Optional, &out.Optional + *out = new(bool) + **out = **in + } + return nil + } +} + func DeepCopy_v1_SecretKeySelector(in interface{}, out interface{}, c *conversion.Cloner) error { { in := in.(*SecretKeySelector) out := out.(*SecretKeySelector) *out = *in + if in.Optional != nil { + in, out := &in.Optional, &out.Optional + *out = new(bool) + **out = **in + } return nil } } @@ -2777,6 +2842,11 @@ func DeepCopy_v1_SecretVolumeSource(in interface{}, out interface{}, c *conversi *out = new(int32) **out = **in } + if in.Optional != nil { + in, out := &in.Optional, &out.Optional + *out = new(bool) + **out = **in + } return nil } } @@ -2836,8 +2906,10 @@ func DeepCopy_v1_Service(in interface{}, out interface{}, c *conversion.Cloner) in := in.(*Service) out := out.(*Service) *out = *in - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if err := DeepCopy_v1_ServiceSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -2854,22 +2926,20 @@ func DeepCopy_v1_ServiceAccount(in interface{}, out interface{}, c *conversion.C in := in.(*ServiceAccount) out := out.(*ServiceAccount) *out = *in - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if in.Secrets != nil { in, out := &in.Secrets, &out.Secrets *out = make([]ObjectReference, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.ImagePullSecrets != nil { in, out := &in.ImagePullSecrets, &out.ImagePullSecrets *out = make([]LocalObjectReference, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } @@ -2937,9 +3007,7 @@ func DeepCopy_v1_ServiceSpec(in interface{}, out interface{}, c *conversion.Clon if in.Ports != nil { in, out := &in.Ports, &out.Ports *out = make([]ServicePort, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.Selector != nil { in, out := &in.Selector, &out.Selector diff --git a/vendor/k8s.io/kubernetes/pkg/api/validation/BUILD b/vendor/k8s.io/kubernetes/pkg/api/validation/BUILD index 25f75fbf..6da5cdcc 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/validation/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/api/validation/BUILD @@ -23,6 +23,7 @@ go_library( "//pkg/api/resource:go_default_library", "//pkg/api/service:go_default_library", "//pkg/api/util:go_default_library", + "//pkg/api/v1:go_default_library", "//pkg/api/validation/genericvalidation:go_default_library", "//pkg/apis/storage/util:go_default_library", "//pkg/capabilities:go_default_library", @@ -33,6 +34,7 @@ go_library( "//vendor:github.com/exponent-io/jsonpath", "//vendor:github.com/golang/glog", "//vendor:k8s.io/apimachinery/pkg/api/meta", + "//vendor:k8s.io/apimachinery/pkg/api/validation", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1/unstructured", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1/validation", diff --git a/vendor/k8s.io/kubernetes/pkg/api/validation/OWNERS b/vendor/k8s.io/kubernetes/pkg/api/validation/OWNERS index 97ba3bd9..dda6d486 100755 --- a/vendor/k8s.io/kubernetes/pkg/api/validation/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/api/validation/OWNERS @@ -3,7 +3,6 @@ reviewers: - lavalamp - smarterclayton - wojtek-t -- bgrant0607 - deads2k - yujuhong - brendandburns diff --git a/vendor/k8s.io/kubernetes/pkg/api/validation/events.go b/vendor/k8s.io/kubernetes/pkg/api/validation/events.go index ac5cebfb..a255f58e 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/validation/events.go +++ b/vendor/k8s.io/kubernetes/pkg/api/validation/events.go @@ -20,6 +20,7 @@ import ( "fmt" "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/validation" "k8s.io/apimachinery/pkg/util/validation/field" @@ -34,7 +35,7 @@ func ValidateEvent(event *api.Event) field.ErrorList { // Make sure event.Namespace and the involvedObject.Namespace agree if len(event.InvolvedObject.Namespace) == 0 { // event.Namespace must also be empty (or "default", for compatibility with old clients) - if event.Namespace != api.NamespaceNone && event.Namespace != api.NamespaceDefault { + if event.Namespace != metav1.NamespaceNone && event.Namespace != metav1.NamespaceDefault { allErrs = append(allErrs, field.Invalid(field.NewPath("involvedObject", "namespace"), event.InvolvedObject.Namespace, "does not match event.namespace")) } } else { diff --git a/vendor/k8s.io/kubernetes/pkg/api/validation/events_test.go b/vendor/k8s.io/kubernetes/pkg/api/validation/events_test.go index 3747a30f..0df784f6 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/validation/events_test.go +++ b/vendor/k8s.io/kubernetes/pkg/api/validation/events_test.go @@ -19,6 +19,7 @@ package validation import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api" ) @@ -29,7 +30,7 @@ func TestValidateEvent(t *testing.T) { }{ { &api.Event{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test1", Namespace: "foo", }, @@ -41,7 +42,7 @@ func TestValidateEvent(t *testing.T) { false, }, { &api.Event{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test2", Namespace: "aoeu-_-aoeu", }, @@ -53,9 +54,9 @@ func TestValidateEvent(t *testing.T) { false, }, { &api.Event{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test3", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, InvolvedObject: api.ObjectReference{ APIVersion: "v1", @@ -65,9 +66,9 @@ func TestValidateEvent(t *testing.T) { true, }, { &api.Event{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test4", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, InvolvedObject: api.ObjectReference{ APIVersion: "v1", @@ -77,22 +78,22 @@ func TestValidateEvent(t *testing.T) { true, }, { &api.Event{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test5", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, InvolvedObject: api.ObjectReference{ APIVersion: "extensions/v1beta1", Kind: "NoKind", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, }, true, }, { &api.Event{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test6", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, InvolvedObject: api.ObjectReference{ APIVersion: "extensions/v1beta1", @@ -103,22 +104,22 @@ func TestValidateEvent(t *testing.T) { false, }, { &api.Event{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test7", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, InvolvedObject: api.ObjectReference{ APIVersion: "extensions/v1beta1", Kind: "Job", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, }, true, }, { &api.Event{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test8", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, InvolvedObject: api.ObjectReference{ APIVersion: "other/v1beta1", @@ -129,7 +130,7 @@ func TestValidateEvent(t *testing.T) { false, }, { &api.Event{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test9", Namespace: "foo", }, @@ -142,9 +143,9 @@ func TestValidateEvent(t *testing.T) { true, }, { &api.Event{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test10", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, InvolvedObject: api.ObjectReference{ APIVersion: "extensions", @@ -155,7 +156,7 @@ func TestValidateEvent(t *testing.T) { false, }, { &api.Event{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test11", Namespace: "foo", }, @@ -170,7 +171,7 @@ func TestValidateEvent(t *testing.T) { }, { &api.Event{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test12", Namespace: "foo", }, @@ -184,7 +185,7 @@ func TestValidateEvent(t *testing.T) { }, { &api.Event{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test13", Namespace: "", }, @@ -198,7 +199,7 @@ func TestValidateEvent(t *testing.T) { }, { &api.Event{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test14", Namespace: "foo", }, diff --git a/vendor/k8s.io/kubernetes/pkg/api/validation/genericvalidation/BUILD b/vendor/k8s.io/kubernetes/pkg/api/validation/genericvalidation/BUILD index c88dcca6..55feb408 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/validation/genericvalidation/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/api/validation/genericvalidation/BUILD @@ -12,12 +12,13 @@ go_library( name = "go_default_library", srcs = [ "doc.go", - "validation.go", + "objectmeta.go", ], tags = ["automanaged"], deps = [ "//pkg/api:go_default_library", "//pkg/api/v1:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/api/validation", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1/validation", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", @@ -29,11 +30,11 @@ go_library( go_test( name = "go_default_test", - srcs = ["validation_test.go"], + srcs = ["objectmeta_test.go"], library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/api/validation", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/util/validation/field", ], diff --git a/vendor/k8s.io/kubernetes/pkg/api/validation/genericvalidation/validation.go b/vendor/k8s.io/kubernetes/pkg/api/validation/genericvalidation/objectmeta.go similarity index 80% rename from vendor/k8s.io/kubernetes/pkg/api/validation/genericvalidation/validation.go rename to vendor/k8s.io/kubernetes/pkg/api/validation/genericvalidation/objectmeta.go index 84e769c9..43f1a61b 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/validation/genericvalidation/validation.go +++ b/vendor/k8s.io/kubernetes/pkg/api/validation/genericvalidation/objectmeta.go @@ -20,6 +20,7 @@ import ( "fmt" "strings" + apimachineyvalidation "k8s.io/apimachinery/pkg/api/validation" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1validation "k8s.io/apimachinery/pkg/apis/meta/v1/validation" "k8s.io/apimachinery/pkg/runtime/schema" @@ -34,7 +35,6 @@ import ( // fields by default. var RepairMalformedUpdates bool = true -const IsNegativeErrorMsg string = `must be greater than or equal to 0` const FieldImmutableErrorMsg string = `field is immutable` const totalAnnotationSizeLimitB int = 256 * (1 << 10) // 256 kB @@ -44,67 +44,8 @@ var BannedOwners = map[schema.GroupVersionKind]struct{}{ v1.SchemeGroupVersion.WithKind("Event"): {}, } -// ValidateNameFunc validates that the provided name is valid for a given resource type. -// Not all resources have the same validation rules for names. Prefix is true -// if the name will have a value appended to it. If the name is not valid, -// this returns a list of descriptions of individual characteristics of the -// value that were not valid. Otherwise this returns an empty list or nil. -type ValidateNameFunc func(name string, prefix bool) []string - -// NameIsDNSSubdomain is a ValidateNameFunc for names that must be a DNS subdomain. -func NameIsDNSSubdomain(name string, prefix bool) []string { - if prefix { - name = maskTrailingDash(name) - } - return validation.IsDNS1123Subdomain(name) -} - -// NameIsDNSLabel is a ValidateNameFunc for names that must be a DNS 1123 label. -func NameIsDNSLabel(name string, prefix bool) []string { - if prefix { - name = maskTrailingDash(name) - } - return validation.IsDNS1123Label(name) -} - -// NameIsDNS1035Label is a ValidateNameFunc for names that must be a DNS 952 label. -func NameIsDNS1035Label(name string, prefix bool) []string { - if prefix { - name = maskTrailingDash(name) - } - return validation.IsDNS1035Label(name) -} - -// ValidateNamespaceName can be used to check whether the given namespace name is valid. -// Prefix indicates this name will be used as part of generation, in which case -// trailing dashes are allowed. -var ValidateNamespaceName = NameIsDNSLabel - // ValidateClusterName can be used to check whether the given cluster name is valid. -var ValidateClusterName = NameIsDNS1035Label - -// ValidateServiceAccountName can be used to check whether the given service account name is valid. -// Prefix indicates this name will be used as part of generation, in which case -// trailing dashes are allowed. -var ValidateServiceAccountName = NameIsDNSSubdomain - -// maskTrailingDash replaces the final character of a string with a subdomain safe -// value if is a dash. -func maskTrailingDash(name string) string { - if strings.HasSuffix(name, "-") { - return name[:len(name)-2] + "a" - } - return name -} - -// Validates that given value is not negative. -func ValidateNonnegativeField(value int64, fldPath *field.Path) field.ErrorList { - allErrs := field.ErrorList{} - if value < 0 { - allErrs = append(allErrs, field.Invalid(fldPath, value, IsNegativeErrorMsg)) - } - return allErrs -} +var ValidateClusterName = apimachineyvalidation.NameIsDNS1035Label // ValidateAnnotations validates that a set of annotations are correctly defined. func ValidateAnnotations(annotations map[string]string, fldPath *field.Path) field.ErrorList { @@ -201,7 +142,7 @@ func ValidateImmutableField(newVal, oldVal interface{}, fldPath *field.Path) fie // ValidateObjectMeta validates an object's metadata on creation. It expects that name generation has already // been performed. // It doesn't return an error for rootscoped resources with namespace, because namespace should already be cleared before. -func ValidateObjectMeta(meta *api.ObjectMeta, requiresNamespace bool, nameFn ValidateNameFunc, fldPath *field.Path) field.ErrorList { +func ValidateObjectMeta(meta *metav1.ObjectMeta, requiresNamespace bool, nameFn apimachineyvalidation.ValidateNameFunc, fldPath *field.Path) field.ErrorList { allErrs := field.ErrorList{} if len(meta.GenerateName) != 0 { @@ -223,7 +164,7 @@ func ValidateObjectMeta(meta *api.ObjectMeta, requiresNamespace bool, nameFn Val if len(meta.Namespace) == 0 { allErrs = append(allErrs, field.Required(fldPath.Child("namespace"), "")) } else { - for _, msg := range ValidateNamespaceName(meta.Namespace, false) { + for _, msg := range apimachineyvalidation.ValidateNamespaceName(meta.Namespace, false) { allErrs = append(allErrs, field.Invalid(fldPath.Child("namespace"), meta.Namespace, msg)) } } @@ -237,7 +178,7 @@ func ValidateObjectMeta(meta *api.ObjectMeta, requiresNamespace bool, nameFn Val allErrs = append(allErrs, field.Invalid(fldPath.Child("clusterName"), meta.ClusterName, msg)) } } - allErrs = append(allErrs, ValidateNonnegativeField(meta.Generation, fldPath.Child("generation"))...) + allErrs = append(allErrs, apimachineyvalidation.ValidateNonnegativeField(meta.Generation, fldPath.Child("generation"))...) allErrs = append(allErrs, v1validation.ValidateLabels(meta.Labels, fldPath.Child("labels"))...) allErrs = append(allErrs, ValidateAnnotations(meta.Annotations, fldPath.Child("annotations"))...) allErrs = append(allErrs, ValidateOwnerReferences(meta.OwnerReferences, fldPath.Child("ownerReferences"))...) @@ -248,7 +189,7 @@ func ValidateObjectMeta(meta *api.ObjectMeta, requiresNamespace bool, nameFn Val } // ValidateObjectMetaUpdate validates an object's metadata when updated -func ValidateObjectMetaUpdate(newMeta, oldMeta *api.ObjectMeta, fldPath *field.Path) field.ErrorList { +func ValidateObjectMetaUpdate(newMeta, oldMeta *metav1.ObjectMeta, fldPath *field.Path) field.ErrorList { allErrs := field.ErrorList{} if !RepairMalformedUpdates && newMeta.UID != oldMeta.UID { diff --git a/vendor/k8s.io/kubernetes/pkg/api/validation/genericvalidation/validation_test.go b/vendor/k8s.io/kubernetes/pkg/api/validation/genericvalidation/objectmeta_test.go similarity index 69% rename from vendor/k8s.io/kubernetes/pkg/api/validation/genericvalidation/validation_test.go rename to vendor/k8s.io/kubernetes/pkg/api/validation/genericvalidation/objectmeta_test.go index 1045c298..b0c5573b 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/validation/genericvalidation/validation_test.go +++ b/vendor/k8s.io/kubernetes/pkg/api/validation/genericvalidation/objectmeta_test.go @@ -23,9 +23,9 @@ import ( "testing" "time" + apimachineryvalidation "k8s.io/apimachinery/pkg/api/validation" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/validation/field" - "k8s.io/kubernetes/pkg/api" ) const ( @@ -37,7 +37,7 @@ const ( // Ensure custom name functions are allowed func TestValidateObjectMetaCustomName(t *testing.T) { errs := ValidateObjectMeta( - &api.ObjectMeta{Name: "test", GenerateName: "foo"}, + &metav1.ObjectMeta{Name: "test", GenerateName: "foo"}, false, func(s string, prefix bool) []string { if s == "test" { @@ -57,7 +57,7 @@ func TestValidateObjectMetaCustomName(t *testing.T) { // Ensure namespace names follow dns label format func TestValidateObjectMetaNamespaces(t *testing.T) { errs := ValidateObjectMeta( - &api.ObjectMeta{Name: "test", Namespace: "foo.bar"}, + &metav1.ObjectMeta{Name: "test", Namespace: "foo.bar"}, true, func(s string, prefix bool) []string { return nil @@ -76,7 +76,7 @@ func TestValidateObjectMetaNamespaces(t *testing.T) { b[i] = letters[rand.Intn(len(letters))] } errs = ValidateObjectMeta( - &api.ObjectMeta{Name: "test", Namespace: string(b)}, + &metav1.ObjectMeta{Name: "test", Namespace: string(b)}, true, func(s string, prefix bool) []string { return nil @@ -197,7 +197,7 @@ func TestValidateObjectMetaOwnerReferences(t *testing.T) { for _, tc := range testCases { errs := ValidateObjectMeta( - &api.ObjectMeta{Name: "test", Namespace: "test", OwnerReferences: tc.ownerReferences}, + &metav1.ObjectMeta{Name: "test", Namespace: "test", OwnerReferences: tc.ownerReferences}, true, func(s string, prefix bool) []string { return nil @@ -217,22 +217,22 @@ func TestValidateObjectMetaOwnerReferences(t *testing.T) { func TestValidateObjectMetaUpdateIgnoresCreationTimestamp(t *testing.T) { if errs := ValidateObjectMetaUpdate( - &api.ObjectMeta{Name: "test", ResourceVersion: "1"}, - &api.ObjectMeta{Name: "test", ResourceVersion: "1", CreationTimestamp: metav1.NewTime(time.Unix(10, 0))}, + &metav1.ObjectMeta{Name: "test", ResourceVersion: "1"}, + &metav1.ObjectMeta{Name: "test", ResourceVersion: "1", CreationTimestamp: metav1.NewTime(time.Unix(10, 0))}, field.NewPath("field"), ); len(errs) != 0 { t.Fatalf("unexpected errors: %v", errs) } if errs := ValidateObjectMetaUpdate( - &api.ObjectMeta{Name: "test", ResourceVersion: "1", CreationTimestamp: metav1.NewTime(time.Unix(10, 0))}, - &api.ObjectMeta{Name: "test", ResourceVersion: "1"}, + &metav1.ObjectMeta{Name: "test", ResourceVersion: "1", CreationTimestamp: metav1.NewTime(time.Unix(10, 0))}, + &metav1.ObjectMeta{Name: "test", ResourceVersion: "1"}, field.NewPath("field"), ); len(errs) != 0 { t.Fatalf("unexpected errors: %v", errs) } if errs := ValidateObjectMetaUpdate( - &api.ObjectMeta{Name: "test", ResourceVersion: "1", CreationTimestamp: metav1.NewTime(time.Unix(10, 0))}, - &api.ObjectMeta{Name: "test", ResourceVersion: "1", CreationTimestamp: metav1.NewTime(time.Unix(11, 0))}, + &metav1.ObjectMeta{Name: "test", ResourceVersion: "1", CreationTimestamp: metav1.NewTime(time.Unix(10, 0))}, + &metav1.ObjectMeta{Name: "test", ResourceVersion: "1", CreationTimestamp: metav1.NewTime(time.Unix(11, 0))}, field.NewPath("field"), ); len(errs) != 0 { t.Fatalf("unexpected errors: %v", errs) @@ -241,28 +241,28 @@ func TestValidateObjectMetaUpdateIgnoresCreationTimestamp(t *testing.T) { func TestValidateFinalizersUpdate(t *testing.T) { testcases := map[string]struct { - Old api.ObjectMeta - New api.ObjectMeta + Old metav1.ObjectMeta + New metav1.ObjectMeta ExpectedErr string }{ "invalid adding finalizers": { - Old: api.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionTimestamp: &metav1.Time{}, Finalizers: []string{"x/a"}}, - New: api.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionTimestamp: &metav1.Time{}, Finalizers: []string{"x/a", "y/b"}}, + Old: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionTimestamp: &metav1.Time{}, Finalizers: []string{"x/a"}}, + New: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionTimestamp: &metav1.Time{}, Finalizers: []string{"x/a", "y/b"}}, ExpectedErr: "y/b", }, "invalid changing finalizers": { - Old: api.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionTimestamp: &metav1.Time{}, Finalizers: []string{"x/a"}}, - New: api.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionTimestamp: &metav1.Time{}, Finalizers: []string{"x/b"}}, + Old: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionTimestamp: &metav1.Time{}, Finalizers: []string{"x/a"}}, + New: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionTimestamp: &metav1.Time{}, Finalizers: []string{"x/b"}}, ExpectedErr: "x/b", }, "valid removing finalizers": { - Old: api.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionTimestamp: &metav1.Time{}, Finalizers: []string{"x/a", "y/b"}}, - New: api.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionTimestamp: &metav1.Time{}, Finalizers: []string{"x/a"}}, + Old: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionTimestamp: &metav1.Time{}, Finalizers: []string{"x/a", "y/b"}}, + New: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionTimestamp: &metav1.Time{}, Finalizers: []string{"x/a"}}, ExpectedErr: "", }, "valid adding finalizers for objects not being deleted": { - Old: api.ObjectMeta{Name: "test", ResourceVersion: "1", Finalizers: []string{"x/a"}}, - New: api.ObjectMeta{Name: "test", ResourceVersion: "1", Finalizers: []string{"x/a", "y/b"}}, + Old: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", Finalizers: []string{"x/a"}}, + New: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", Finalizers: []string{"x/a", "y/b"}}, ExpectedErr: "", }, } @@ -285,59 +285,59 @@ func TestValidateObjectMetaUpdatePreventsDeletionFieldMutation(t *testing.T) { gracePeriodLong := int64(40) testcases := map[string]struct { - Old api.ObjectMeta - New api.ObjectMeta - ExpectedNew api.ObjectMeta + Old metav1.ObjectMeta + New metav1.ObjectMeta + ExpectedNew metav1.ObjectMeta ExpectedErrs []string }{ "valid without deletion fields": { - Old: api.ObjectMeta{Name: "test", ResourceVersion: "1"}, - New: api.ObjectMeta{Name: "test", ResourceVersion: "1"}, - ExpectedNew: api.ObjectMeta{Name: "test", ResourceVersion: "1"}, + Old: metav1.ObjectMeta{Name: "test", ResourceVersion: "1"}, + New: metav1.ObjectMeta{Name: "test", ResourceVersion: "1"}, + ExpectedNew: metav1.ObjectMeta{Name: "test", ResourceVersion: "1"}, ExpectedErrs: []string{}, }, "valid with deletion fields": { - Old: api.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionTimestamp: &now, DeletionGracePeriodSeconds: &gracePeriodShort}, - New: api.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionTimestamp: &now, DeletionGracePeriodSeconds: &gracePeriodShort}, - ExpectedNew: api.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionTimestamp: &now, DeletionGracePeriodSeconds: &gracePeriodShort}, + Old: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionTimestamp: &now, DeletionGracePeriodSeconds: &gracePeriodShort}, + New: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionTimestamp: &now, DeletionGracePeriodSeconds: &gracePeriodShort}, + ExpectedNew: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionTimestamp: &now, DeletionGracePeriodSeconds: &gracePeriodShort}, ExpectedErrs: []string{}, }, "invalid set deletionTimestamp": { - Old: api.ObjectMeta{Name: "test", ResourceVersion: "1"}, - New: api.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionTimestamp: &now}, - ExpectedNew: api.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionTimestamp: &now}, + Old: metav1.ObjectMeta{Name: "test", ResourceVersion: "1"}, + New: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionTimestamp: &now}, + ExpectedNew: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionTimestamp: &now}, ExpectedErrs: []string{"field.deletionTimestamp: Invalid value: \"1970-01-01T00:16:40Z\": field is immutable; may only be changed via deletion"}, }, "invalid clear deletionTimestamp": { - Old: api.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionTimestamp: &now}, - New: api.ObjectMeta{Name: "test", ResourceVersion: "1"}, - ExpectedNew: api.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionTimestamp: &now}, + Old: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionTimestamp: &now}, + New: metav1.ObjectMeta{Name: "test", ResourceVersion: "1"}, + ExpectedNew: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionTimestamp: &now}, ExpectedErrs: []string{}, // no errors, validation copies the old value }, "invalid change deletionTimestamp": { - Old: api.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionTimestamp: &now}, - New: api.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionTimestamp: &later}, - ExpectedNew: api.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionTimestamp: &now}, + Old: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionTimestamp: &now}, + New: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionTimestamp: &later}, + ExpectedNew: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionTimestamp: &now}, ExpectedErrs: []string{}, // no errors, validation copies the old value }, "invalid set deletionGracePeriodSeconds": { - Old: api.ObjectMeta{Name: "test", ResourceVersion: "1"}, - New: api.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionGracePeriodSeconds: &gracePeriodShort}, - ExpectedNew: api.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionGracePeriodSeconds: &gracePeriodShort}, + Old: metav1.ObjectMeta{Name: "test", ResourceVersion: "1"}, + New: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionGracePeriodSeconds: &gracePeriodShort}, + ExpectedNew: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionGracePeriodSeconds: &gracePeriodShort}, ExpectedErrs: []string{"field.deletionGracePeriodSeconds: Invalid value: 30: field is immutable; may only be changed via deletion"}, }, "invalid clear deletionGracePeriodSeconds": { - Old: api.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionGracePeriodSeconds: &gracePeriodShort}, - New: api.ObjectMeta{Name: "test", ResourceVersion: "1"}, - ExpectedNew: api.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionGracePeriodSeconds: &gracePeriodShort}, + Old: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionGracePeriodSeconds: &gracePeriodShort}, + New: metav1.ObjectMeta{Name: "test", ResourceVersion: "1"}, + ExpectedNew: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionGracePeriodSeconds: &gracePeriodShort}, ExpectedErrs: []string{}, // no errors, validation copies the old value }, "invalid change deletionGracePeriodSeconds": { - Old: api.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionGracePeriodSeconds: &gracePeriodShort}, - New: api.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionGracePeriodSeconds: &gracePeriodLong}, - ExpectedNew: api.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionGracePeriodSeconds: &gracePeriodLong}, + Old: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionGracePeriodSeconds: &gracePeriodShort}, + New: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionGracePeriodSeconds: &gracePeriodLong}, + ExpectedNew: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionGracePeriodSeconds: &gracePeriodLong}, ExpectedErrs: []string{"field.deletionGracePeriodSeconds: Invalid value: 40: field is immutable; may only be changed via deletion"}, }, } @@ -363,23 +363,23 @@ func TestValidateObjectMetaUpdatePreventsDeletionFieldMutation(t *testing.T) { func TestObjectMetaGenerationUpdate(t *testing.T) { testcases := map[string]struct { - Old api.ObjectMeta - New api.ObjectMeta + Old metav1.ObjectMeta + New metav1.ObjectMeta ExpectedErrs []string }{ "invalid generation change - decremented": { - Old: api.ObjectMeta{Name: "test", ResourceVersion: "1", Generation: 5}, - New: api.ObjectMeta{Name: "test", ResourceVersion: "1", Generation: 4}, + Old: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", Generation: 5}, + New: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", Generation: 4}, ExpectedErrs: []string{"field.generation: Invalid value: 4: must not be decremented"}, }, "valid generation change - incremented by one": { - Old: api.ObjectMeta{Name: "test", ResourceVersion: "1", Generation: 1}, - New: api.ObjectMeta{Name: "test", ResourceVersion: "1", Generation: 2}, + Old: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", Generation: 1}, + New: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", Generation: 2}, ExpectedErrs: []string{}, }, "valid generation field - not updated": { - Old: api.ObjectMeta{Name: "test", ResourceVersion: "1", Generation: 5}, - New: api.ObjectMeta{Name: "test", ResourceVersion: "1", Generation: 5}, + Old: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", Generation: 5}, + New: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", Generation: 5}, ExpectedErrs: []string{}, }, } @@ -407,9 +407,9 @@ func TestObjectMetaGenerationUpdate(t *testing.T) { // Ensure trailing slash is allowed in generate name func TestValidateObjectMetaTrimsTrailingSlash(t *testing.T) { errs := ValidateObjectMeta( - &api.ObjectMeta{Name: "test", GenerateName: "foo-"}, + &metav1.ObjectMeta{Name: "test", GenerateName: "foo-"}, false, - NameIsDNSSubdomain, + apimachineryvalidation.NameIsDNSSubdomain, field.NewPath("field")) if len(errs) != 0 { t.Fatalf("unexpected errors: %v", errs) diff --git a/vendor/k8s.io/kubernetes/pkg/api/validation/schema.go b/vendor/k8s.io/kubernetes/pkg/api/validation/schema.go index bb5ade46..0214ca18 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/validation/schema.go +++ b/vendor/k8s.io/kubernetes/pkg/api/validation/schema.go @@ -253,7 +253,7 @@ func (s *SwaggerSchema) ValidateObject(obj interface{}, fieldName, typeName stri if !ok && s.delegate != nil { fields, mapOk := obj.(map[string]interface{}) if !mapOk { - return append(allErrs, fmt.Errorf("field %s: expected object of type map[string]interface{}, but the actual type is %T", fieldName, obj)) + return append(allErrs, fmt.Errorf("field %s for %s: expected object of type map[string]interface{}, but the actual type is %T", fieldName, typeName, obj)) } if delegated, err := s.delegateIfDifferentApiVersion(&unstructured.Unstructured{Object: fields}); delegated { if err != nil { @@ -273,7 +273,7 @@ func (s *SwaggerSchema) ValidateObject(obj interface{}, fieldName, typeName stri } fields, ok := obj.(map[string]interface{}) if !ok { - return append(allErrs, fmt.Errorf("field %s: expected object of type map[string]interface{}, but the actual type is %T", fieldName, obj)) + return append(allErrs, fmt.Errorf("field %s for %s: expected object of type map[string]interface{}, but the actual type is %T", fieldName, typeName, obj)) } if len(fieldName) > 0 { fieldName = fieldName + "." @@ -281,7 +281,7 @@ func (s *SwaggerSchema) ValidateObject(obj interface{}, fieldName, typeName stri // handle required fields for _, requiredKey := range model.Required { if _, ok := fields[requiredKey]; !ok { - allErrs = append(allErrs, fmt.Errorf("field %s: is required", requiredKey)) + allErrs = append(allErrs, fmt.Errorf("field %s for %s: is required", requiredKey, typeName)) } } for key, value := range fields { diff --git a/vendor/k8s.io/kubernetes/pkg/api/validation/validation.go b/vendor/k8s.io/kubernetes/pkg/api/validation/validation.go index fca61370..eefc981e 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/validation/validation.go +++ b/vendor/k8s.io/kubernetes/pkg/api/validation/validation.go @@ -28,6 +28,7 @@ import ( "github.com/golang/glog" + apimachineryvalidation "k8s.io/apimachinery/pkg/api/validation" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" unversionedvalidation "k8s.io/apimachinery/pkg/apis/meta/v1/validation" "k8s.io/apimachinery/pkg/labels" @@ -38,6 +39,7 @@ import ( utilpod "k8s.io/kubernetes/pkg/api/pod" "k8s.io/kubernetes/pkg/api/resource" apiservice "k8s.io/kubernetes/pkg/api/service" + "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/api/validation/genericvalidation" storageutil "k8s.io/kubernetes/pkg/apis/storage/util" "k8s.io/kubernetes/pkg/capabilities" @@ -50,7 +52,7 @@ import ( // fields by default. var RepairMalformedUpdates bool = genericvalidation.RepairMalformedUpdates -const isNegativeErrorMsg string = genericvalidation.IsNegativeErrorMsg +const isNegativeErrorMsg string = apimachineryvalidation.IsNegativeErrorMsg const isInvalidQuotaResource string = `must be a standard resource for quota` const fieldImmutableErrorMsg string = genericvalidation.FieldImmutableErrorMsg const isNotIntegerErrorMsg string = `must be an integer` @@ -61,8 +63,8 @@ var volumeModeErrorMsg string = "must be a number between 0 and 0777 (octal), bo // BannedOwners is a black list of object that are not allowed to be owners. var BannedOwners = genericvalidation.BannedOwners -// ValidateHasLabel requires that api.ObjectMeta has a Label with key and expectedValue -func ValidateHasLabel(meta api.ObjectMeta, fldPath *field.Path, key, expectedValue string) field.ErrorList { +// ValidateHasLabel requires that metav1.ObjectMeta has a Label with key and expectedValue +func ValidateHasLabel(meta metav1.ObjectMeta, fldPath *field.Path, key, expectedValue string) field.ErrorList { allErrs := field.ErrorList{} actualValue, found := meta.Labels[key] if !found { @@ -175,7 +177,7 @@ func ValidateOwnerReferences(ownerReferences []metav1.OwnerReference, fldPath *f // if the name will have a value appended to it. If the name is not valid, // this returns a list of descriptions of individual characteristics of the // value that were not valid. Otherwise this returns an empty list or nil. -type ValidateNameFunc genericvalidation.ValidateNameFunc +type ValidateNameFunc apimachineryvalidation.ValidateNameFunc // maskTrailingDash replaces the final character of a string with a subdomain safe // value if is a dash. @@ -210,7 +212,7 @@ var ValidateNodeName = NameIsDNSSubdomain // ValidateNamespaceName can be used to check whether the given namespace name is valid. // Prefix indicates this name will be used as part of generation, in which case // trailing dashes are allowed. -var ValidateNamespaceName = genericvalidation.ValidateNamespaceName +var ValidateNamespaceName = apimachineryvalidation.ValidateNamespaceName // ValidateLimitRangeName can be used to check whether the given limit range name is valid. // Prefix indicates this name will be used as part of generation, in which case @@ -231,7 +233,7 @@ var ValidateSecretName = NameIsDNSSubdomain // ValidateServiceAccountName can be used to check whether the given service account name is valid. // Prefix indicates this name will be used as part of generation, in which case // trailing dashes are allowed. -var ValidateServiceAccountName = genericvalidation.ValidateServiceAccountName +var ValidateServiceAccountName = apimachineryvalidation.ValidateServiceAccountName // ValidateEndpointsName can be used to check whether the given endpoints name is valid. // Prefix indicates this name will be used as part of generation, in which case @@ -244,22 +246,22 @@ var ValidateClusterName = genericvalidation.ValidateClusterName // TODO update all references to these functions to point to the genericvalidation ones // NameIsDNSSubdomain is a ValidateNameFunc for names that must be a DNS subdomain. func NameIsDNSSubdomain(name string, prefix bool) []string { - return genericvalidation.NameIsDNSSubdomain(name, prefix) + return apimachineryvalidation.NameIsDNSSubdomain(name, prefix) } // NameIsDNSLabel is a ValidateNameFunc for names that must be a DNS 1123 label. func NameIsDNSLabel(name string, prefix bool) []string { - return genericvalidation.NameIsDNSLabel(name, prefix) + return apimachineryvalidation.NameIsDNSLabel(name, prefix) } // NameIsDNS1035Label is a ValidateNameFunc for names that must be a DNS 952 label. func NameIsDNS1035Label(name string, prefix bool) []string { - return genericvalidation.NameIsDNS1035Label(name, prefix) + return apimachineryvalidation.NameIsDNS1035Label(name, prefix) } // Validates that given value is not negative. func ValidateNonnegativeField(value int64, fldPath *field.Path) field.ErrorList { - return genericvalidation.ValidateNonnegativeField(value, fldPath) + return apimachineryvalidation.ValidateNonnegativeField(value, fldPath) } // Validates that a Quantity is not negative @@ -288,12 +290,12 @@ func ValidateImmutableAnnotation(newVal string, oldVal string, annotation string // been performed. // It doesn't return an error for rootscoped resources with namespace, because namespace should already be cleared before. // TODO: Remove calls to this method scattered in validations of specific resources, e.g., ValidatePodUpdate. -func ValidateObjectMeta(meta *api.ObjectMeta, requiresNamespace bool, nameFn ValidateNameFunc, fldPath *field.Path) field.ErrorList { - return genericvalidation.ValidateObjectMeta(meta, requiresNamespace, genericvalidation.ValidateNameFunc(nameFn), fldPath) +func ValidateObjectMeta(meta *metav1.ObjectMeta, requiresNamespace bool, nameFn ValidateNameFunc, fldPath *field.Path) field.ErrorList { + return genericvalidation.ValidateObjectMeta(meta, requiresNamespace, apimachineryvalidation.ValidateNameFunc(nameFn), fldPath) } // ValidateObjectMetaUpdate validates an object's metadata when updated -func ValidateObjectMetaUpdate(newMeta, oldMeta *api.ObjectMeta, fldPath *field.Path) field.ErrorList { +func ValidateObjectMetaUpdate(newMeta, oldMeta *metav1.ObjectMeta, fldPath *field.Path) field.ErrorList { return genericvalidation.ValidateObjectMetaUpdate(newMeta, oldMeta, fldPath) } @@ -1258,9 +1260,22 @@ func validateEnvFrom(vars []api.EnvFromSource, fldPath *field.Path) field.ErrorL allErrs = append(allErrs, field.Invalid(idxPath.Child("prefix"), ev.Prefix, msg)) } } + + numSources := 0 if ev.ConfigMapRef != nil { + numSources++ allErrs = append(allErrs, validateConfigMapEnvSource(ev.ConfigMapRef, idxPath.Child("configMapRef"))...) } + if ev.SecretRef != nil { + numSources++ + allErrs = append(allErrs, validateSecretEnvSource(ev.SecretRef, idxPath.Child("secretRef"))...) + } + + if numSources == 0 { + allErrs = append(allErrs, field.Invalid(fldPath, "", "must specify one of: `configMapRef` or `secretRef`")) + } else if numSources > 1 { + allErrs = append(allErrs, field.Invalid(fldPath, "", "may not have more than one field specified at a time")) + } } return allErrs } @@ -1273,6 +1288,14 @@ func validateConfigMapEnvSource(configMapSource *api.ConfigMapEnvSource, fldPath return allErrs } +func validateSecretEnvSource(secretSource *api.SecretEnvSource, fldPath *field.Path) field.ErrorList { + allErrs := field.ErrorList{} + if len(secretSource.Name) == 0 { + allErrs = append(allErrs, field.Required(fldPath.Child("name"), "")) + } + return allErrs +} + var validContainerResourceDivisorForCPU = sets.NewString("1m", "1") var validContainerResourceDivisorForMemory = sets.NewString("1", "1k", "1M", "1G", "1T", "1P", "1E", "1Ki", "1Mi", "1Gi", "1Ti", "1Pi", "1Ei") @@ -1574,6 +1597,14 @@ func validateContainers(containers []api.Container, volumes sets.String, fldPath allErrs = append(allErrs, field.Invalid(idxPath.Child("livenessProbe", "successThreshold"), ctr.LivenessProbe.SuccessThreshold, "must be 1")) } + switch ctr.TerminationMessagePolicy { + case api.TerminationMessageReadFile, api.TerminationMessageFallbackToLogsOnError: + case "": + allErrs = append(allErrs, field.Required(idxPath.Child("terminationMessagePolicy"), "must be 'File' or 'FallbackToLogsOnError'")) + default: + allErrs = append(allErrs, field.Invalid(idxPath.Child("terminationMessagePolicy"), ctr.TerminationMessagePolicy, "must be 'File' or 'FallbackToLogsOnError'")) + } + allErrs = append(allErrs, validateProbe(ctr.ReadinessProbe, idxPath.Child("readinessProbe"))...) allErrs = append(allErrs, validateContainerPorts(ctr.Ports, idxPath.Child("ports"))...) allErrs = append(allErrs, validateEnv(ctr.Env, idxPath.Child("env"))...) @@ -1845,11 +1876,16 @@ func ValidateNodeSelector(nodeSelector *api.NodeSelector, fldPath *field.Path) f func ValidateAvoidPodsInNodeAnnotations(annotations map[string]string, fldPath *field.Path) field.ErrorList { allErrs := field.ErrorList{} - avoids, err := api.GetAvoidPodsFromNodeAnnotations(annotations) + v1Avoids, err := v1.GetAvoidPodsFromNodeAnnotations(annotations) if err != nil { allErrs = append(allErrs, field.Invalid(fldPath.Child("AvoidPods"), api.PreferAvoidPodsAnnotationKey, err.Error())) return allErrs } + var avoids api.AvoidPods + if err := v1.Convert_v1_AvoidPods_To_api_AvoidPods(&v1Avoids, &avoids, nil); err != nil { + allErrs = append(allErrs, field.Invalid(fldPath.Child("AvoidPods"), api.PreferAvoidPodsAnnotationKey, err.Error())) + return allErrs + } if len(avoids.PreferAvoidPods) != 0 { for i, pa := range avoids.PreferAvoidPods { @@ -1975,11 +2011,18 @@ func validatePodAffinity(podAffinity *api.PodAffinity, fldPath *field.Path) fiel func ValidateTolerationsInPodAnnotations(annotations map[string]string, fldPath *field.Path) field.ErrorList { allErrs := field.ErrorList{} - tolerations, err := api.GetTolerationsFromPodAnnotations(annotations) + v1Tolerations, err := v1.GetTolerationsFromPodAnnotations(annotations) if err != nil { allErrs = append(allErrs, field.Invalid(fldPath, api.TolerationsAnnotationKey, err.Error())) return allErrs } + tolerations := make([]api.Toleration, len(v1Tolerations)) + for i := range v1Tolerations { + if err := v1.Convert_v1_Toleration_To_api_Toleration(&v1Tolerations[i], &tolerations[i], nil); err != nil { + allErrs = append(allErrs, field.Invalid(fldPath, api.TolerationsAnnotationKey, err.Error())) + return allErrs + } + } if len(tolerations) > 0 { allErrs = append(allErrs, validateTolerations(tolerations, fldPath.Child(api.TolerationsAnnotationKey))...) } @@ -2675,11 +2718,18 @@ func validateTaints(taints []api.Taint, fldPath *field.Path) field.ErrorList { func ValidateTaintsInNodeAnnotations(annotations map[string]string, fldPath *field.Path) field.ErrorList { allErrs := field.ErrorList{} - taints, err := api.GetTaintsFromNodeAnnotations(annotations) + v1Taints, err := v1.GetTaintsFromNodeAnnotations(annotations) if err != nil { allErrs = append(allErrs, field.Invalid(fldPath, api.TaintsAnnotationKey, err.Error())) return allErrs } + taints := make([]api.Taint, len(v1Taints)) + for i := range v1Taints { + if err := v1.Convert_v1_Taint_To_api_Taint(&v1Taints[i], &taints[i], nil); err != nil { + allErrs = append(allErrs, field.Invalid(fldPath, api.TaintsAnnotationKey, err.Error())) + return allErrs + } + } if len(taints) > 0 { allErrs = append(allErrs, validateTaints(taints, fldPath.Child(api.TaintsAnnotationKey))...) } diff --git a/vendor/k8s.io/kubernetes/pkg/api/validation/validation_test.go b/vendor/k8s.io/kubernetes/pkg/api/validation/validation_test.go index 4d062ea7..8e5382b1 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/validation/validation_test.go +++ b/vendor/k8s.io/kubernetes/pkg/api/validation/validation_test.go @@ -53,7 +53,7 @@ func expectPrefix(t *testing.T, prefix string, errs field.ErrorList) { } func testVolume(name string, namespace string, spec api.PersistentVolumeSpec) *api.PersistentVolume { - objMeta := api.ObjectMeta{Name: name} + objMeta := metav1.ObjectMeta{Name: name} if namespace != "" { objMeta.Namespace = namespace } @@ -221,7 +221,7 @@ func TestValidatePersistentVolumes(t *testing.T) { func testVolumeClaim(name string, namespace string, spec api.PersistentVolumeClaimSpec) *api.PersistentVolumeClaim { return &api.PersistentVolumeClaim{ - ObjectMeta: api.ObjectMeta{Name: name, Namespace: namespace}, + ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespace}, Spec: spec, } } @@ -232,7 +232,7 @@ func testVolumeClaimStorageClass(name string, namespace string, annval string, s } return &api.PersistentVolumeClaim{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: namespace, Annotations: annotations, @@ -247,7 +247,7 @@ func testVolumeClaimAnnotation(name string, namespace string, ann string, annval } return &api.PersistentVolumeClaim{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: namespace, Annotations: annotations, @@ -2285,6 +2285,17 @@ func TestValidateEnvFrom(t *testing.T) { LocalObjectReference: api.LocalObjectReference{Name: "abc"}, }, }, + { + SecretRef: &api.SecretEnvSource{ + LocalObjectReference: api.LocalObjectReference{Name: "abc"}, + }, + }, + { + Prefix: "pre_", + SecretRef: &api.SecretEnvSource{ + LocalObjectReference: api.LocalObjectReference{Name: "abc"}, + }, + }, } if errs := validateEnvFrom(successCase, field.NewPath("field")); len(errs) != 0 { t.Errorf("expected success: %v", errs) @@ -2316,6 +2327,46 @@ func TestValidateEnvFrom(t *testing.T) { }, expectedError: `field[0].prefix: Invalid value: "a.b": ` + idErrMsg, }, + { + name: "zero-length name", + envs: []api.EnvFromSource{ + { + SecretRef: &api.SecretEnvSource{ + LocalObjectReference: api.LocalObjectReference{Name: ""}}, + }, + }, + expectedError: "field[0].secretRef.name: Required value", + }, + { + name: "invalid prefix", + envs: []api.EnvFromSource{ + { + Prefix: "a.b", + SecretRef: &api.SecretEnvSource{ + LocalObjectReference: api.LocalObjectReference{Name: "abc"}}, + }, + }, + expectedError: `field[0].prefix: Invalid value: "a.b": ` + idErrMsg, + }, + { + name: "no refs", + envs: []api.EnvFromSource{ + {}, + }, + expectedError: "field: Invalid value: \"\": must specify one of: `configMapRef` or `secretRef`", + }, + { + name: "multiple refs", + envs: []api.EnvFromSource{ + { + SecretRef: &api.SecretEnvSource{ + LocalObjectReference: api.LocalObjectReference{Name: "abc"}}, + ConfigMapRef: &api.ConfigMapEnvSource{ + LocalObjectReference: api.LocalObjectReference{Name: "abc"}}, + }, + }, + expectedError: "field: Invalid value: \"\": may not have more than one field specified at a time", + }, } for _, tc := range errorCases { if errs := validateEnvFrom(tc.envs, field.NewPath("field")); len(errs) == 0 { @@ -2433,11 +2484,11 @@ func TestValidatePullPolicy(t *testing.T) { } testCases := map[string]T{ "NotPresent1": { - api.Container{Name: "abc", Image: "image:latest", ImagePullPolicy: "IfNotPresent"}, + api.Container{Name: "abc", Image: "image:latest", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}, api.PullIfNotPresent, }, "NotPresent2": { - api.Container{Name: "abc1", Image: "image", ImagePullPolicy: "IfNotPresent"}, + api.Container{Name: "abc1", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}, api.PullIfNotPresent, }, "Always1": { @@ -2483,9 +2534,9 @@ func TestValidateContainers(t *testing.T) { }) successCase := []api.Container{ - {Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent"}, - {Name: "123", Image: "image", ImagePullPolicy: "IfNotPresent"}, - {Name: "abc-123", Image: "image", ImagePullPolicy: "IfNotPresent"}, + {Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}, + {Name: "123", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}, + {Name: "abc-123", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}, { Name: "life-123", Image: "image", @@ -2494,7 +2545,8 @@ func TestValidateContainers(t *testing.T) { Exec: &api.ExecAction{Command: []string{"ls", "-l"}}, }, }, - ImagePullPolicy: "IfNotPresent", + ImagePullPolicy: "IfNotPresent", + TerminationMessagePolicy: "File", }, { Name: "resources-test", @@ -2506,7 +2558,8 @@ func TestValidateContainers(t *testing.T) { api.ResourceName("my.org/resource"): resource.MustParse("10m"), }, }, - ImagePullPolicy: "IfNotPresent", + ImagePullPolicy: "IfNotPresent", + TerminationMessagePolicy: "File", }, { Name: "resources-test-with-gpu-with-request", @@ -2523,7 +2576,8 @@ func TestValidateContainers(t *testing.T) { api.ResourceName(api.ResourceNvidiaGPU): resource.MustParse("1"), }, }, - ImagePullPolicy: "IfNotPresent", + ImagePullPolicy: "IfNotPresent", + TerminationMessagePolicy: "File", }, { Name: "resources-test-with-gpu-without-request", @@ -2539,7 +2593,8 @@ func TestValidateContainers(t *testing.T) { api.ResourceName(api.ResourceNvidiaGPU): resource.MustParse("1"), }, }, - ImagePullPolicy: "IfNotPresent", + ImagePullPolicy: "IfNotPresent", + TerminationMessagePolicy: "File", }, { Name: "resources-request-limit-simple", @@ -2552,7 +2607,8 @@ func TestValidateContainers(t *testing.T) { api.ResourceName(api.ResourceCPU): resource.MustParse("10"), }, }, - ImagePullPolicy: "IfNotPresent", + ImagePullPolicy: "IfNotPresent", + TerminationMessagePolicy: "File", }, { Name: "resources-request-limit-edge", @@ -2569,7 +2625,8 @@ func TestValidateContainers(t *testing.T) { api.ResourceName("my.org/resource"): resource.MustParse("10m"), }, }, - ImagePullPolicy: "IfNotPresent", + ImagePullPolicy: "IfNotPresent", + TerminationMessagePolicy: "File", }, { Name: "resources-request-limit-partials", @@ -2584,7 +2641,8 @@ func TestValidateContainers(t *testing.T) { api.ResourceName("my.org/resource"): resource.MustParse("10m"), }, }, - ImagePullPolicy: "IfNotPresent", + ImagePullPolicy: "IfNotPresent", + TerminationMessagePolicy: "File", }, { Name: "resources-request", @@ -2595,7 +2653,8 @@ func TestValidateContainers(t *testing.T) { api.ResourceName(api.ResourceMemory): resource.MustParse("10G"), }, }, - ImagePullPolicy: "IfNotPresent", + ImagePullPolicy: "IfNotPresent", + TerminationMessagePolicy: "File", }, { Name: "same-host-port-different-protocol", @@ -2604,9 +2663,22 @@ func TestValidateContainers(t *testing.T) { {ContainerPort: 80, HostPort: 80, Protocol: "TCP"}, {ContainerPort: 80, HostPort: 80, Protocol: "UDP"}, }, - ImagePullPolicy: "IfNotPresent", + ImagePullPolicy: "IfNotPresent", + TerminationMessagePolicy: "File", }, - {Name: "abc-1234", Image: "image", ImagePullPolicy: "IfNotPresent", SecurityContext: fakeValidSecurityContext(true)}, + { + Name: "fallback-to-logs-termination-message", + Image: "image", + ImagePullPolicy: "IfNotPresent", + TerminationMessagePolicy: "FallbackToLogsOnError", + }, + { + Name: "file-termination-message", + Image: "image", + ImagePullPolicy: "IfNotPresent", + TerminationMessagePolicy: "File", + }, + {Name: "abc-1234", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File", SecurityContext: fakeValidSecurityContext(true)}, } if errs := validateContainers(successCase, volumes, field.NewPath("field")); len(errs) != 0 { t.Errorf("expected success: %v", errs) @@ -2616,26 +2688,26 @@ func TestValidateContainers(t *testing.T) { AllowPrivileged: false, }) errorCases := map[string][]api.Container{ - "zero-length name": {{Name: "", Image: "image", ImagePullPolicy: "IfNotPresent"}}, - "name > 63 characters": {{Name: strings.Repeat("a", 64), Image: "image", ImagePullPolicy: "IfNotPresent"}}, - "name not a DNS label": {{Name: "a.b.c", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + "zero-length name": {{Name: "", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + "name > 63 characters": {{Name: strings.Repeat("a", 64), Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + "name not a DNS label": {{Name: "a.b.c", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, "name not unique": { - {Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent"}, - {Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent"}, + {Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}, + {Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}, }, - "zero-length image": {{Name: "abc", Image: "", ImagePullPolicy: "IfNotPresent"}}, + "zero-length image": {{Name: "abc", Image: "", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, "host port not unique": { {Name: "abc", Image: "image", Ports: []api.ContainerPort{{ContainerPort: 80, HostPort: 80, Protocol: "TCP"}}, - ImagePullPolicy: "IfNotPresent"}, + ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}, {Name: "def", Image: "image", Ports: []api.ContainerPort{{ContainerPort: 81, HostPort: 80, Protocol: "TCP"}}, - ImagePullPolicy: "IfNotPresent"}, + ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}, }, "invalid env var name": { - {Name: "abc", Image: "image", Env: []api.EnvVar{{Name: "ev.1"}}, ImagePullPolicy: "IfNotPresent"}, + {Name: "abc", Image: "image", Env: []api.EnvVar{{Name: "ev.1"}}, ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}, }, "unknown volume name": { {Name: "abc", Image: "image", VolumeMounts: []api.VolumeMount{{Name: "anything", MountPath: "/foo"}}, - ImagePullPolicy: "IfNotPresent"}, + ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}, }, "invalid lifecycle, no exec command.": { { @@ -2646,7 +2718,8 @@ func TestValidateContainers(t *testing.T) { Exec: &api.ExecAction{}, }, }, - ImagePullPolicy: "IfNotPresent", + ImagePullPolicy: "IfNotPresent", + TerminationMessagePolicy: "File", }, }, "invalid lifecycle, no http path.": { @@ -2658,7 +2731,8 @@ func TestValidateContainers(t *testing.T) { HTTPGet: &api.HTTPGetAction{}, }, }, - ImagePullPolicy: "IfNotPresent", + ImagePullPolicy: "IfNotPresent", + TerminationMessagePolicy: "File", }, }, "invalid lifecycle, no tcp socket port.": { @@ -2670,7 +2744,8 @@ func TestValidateContainers(t *testing.T) { TCPSocket: &api.TCPSocketAction{}, }, }, - ImagePullPolicy: "IfNotPresent", + ImagePullPolicy: "IfNotPresent", + TerminationMessagePolicy: "File", }, }, "invalid lifecycle, zero tcp socket port.": { @@ -2684,7 +2759,8 @@ func TestValidateContainers(t *testing.T) { }, }, }, - ImagePullPolicy: "IfNotPresent", + ImagePullPolicy: "IfNotPresent", + TerminationMessagePolicy: "File", }, }, "invalid lifecycle, no action.": { @@ -2694,7 +2770,8 @@ func TestValidateContainers(t *testing.T) { Lifecycle: &api.Lifecycle{ PreStop: &api.Handler{}, }, - ImagePullPolicy: "IfNotPresent", + ImagePullPolicy: "IfNotPresent", + TerminationMessagePolicy: "File", }, }, "invalid liveness probe, no tcp socket port.": { @@ -2706,7 +2783,8 @@ func TestValidateContainers(t *testing.T) { TCPSocket: &api.TCPSocketAction{}, }, }, - ImagePullPolicy: "IfNotPresent", + ImagePullPolicy: "IfNotPresent", + TerminationMessagePolicy: "File", }, }, "invalid liveness probe, no action.": { @@ -2716,7 +2794,24 @@ func TestValidateContainers(t *testing.T) { LivenessProbe: &api.Probe{ Handler: api.Handler{}, }, - ImagePullPolicy: "IfNotPresent", + ImagePullPolicy: "IfNotPresent", + TerminationMessagePolicy: "File", + }, + }, + "invalid message termination policy": { + { + Name: "life-123", + Image: "image", + ImagePullPolicy: "IfNotPresent", + TerminationMessagePolicy: "Unknown", + }, + }, + "empty message termination policy": { + { + Name: "life-123", + Image: "image", + ImagePullPolicy: "IfNotPresent", + TerminationMessagePolicy: "", }, }, "privilege disabled": { @@ -2731,7 +2826,8 @@ func TestValidateContainers(t *testing.T) { "disk": resource.MustParse("10G"), }, }, - ImagePullPolicy: "IfNotPresent", + ImagePullPolicy: "IfNotPresent", + TerminationMessagePolicy: "File", }, }, "Resource CPU invalid": { @@ -2741,7 +2837,8 @@ func TestValidateContainers(t *testing.T) { Resources: api.ResourceRequirements{ Limits: getResourceLimits("-10", "0"), }, - ImagePullPolicy: "IfNotPresent", + ImagePullPolicy: "IfNotPresent", + TerminationMessagePolicy: "File", }, }, "Resource Requests CPU invalid": { @@ -2751,7 +2848,8 @@ func TestValidateContainers(t *testing.T) { Resources: api.ResourceRequirements{ Requests: getResourceLimits("-10", "0"), }, - ImagePullPolicy: "IfNotPresent", + ImagePullPolicy: "IfNotPresent", + TerminationMessagePolicy: "File", }, }, "Resource Memory invalid": { @@ -2761,7 +2859,8 @@ func TestValidateContainers(t *testing.T) { Resources: api.ResourceRequirements{ Limits: getResourceLimits("0", "-10"), }, - ImagePullPolicy: "IfNotPresent", + ImagePullPolicy: "IfNotPresent", + TerminationMessagePolicy: "File", }, }, "Resource GPU limit must match request": { @@ -2780,7 +2879,8 @@ func TestValidateContainers(t *testing.T) { api.ResourceName(api.ResourceNvidiaGPU): resource.MustParse("1"), }, }, - ImagePullPolicy: "IfNotPresent", + TerminationMessagePolicy: "File", + ImagePullPolicy: "IfNotPresent", }, }, "Request limit simple invalid": { @@ -2791,7 +2891,8 @@ func TestValidateContainers(t *testing.T) { Limits: getResourceLimits("5", "3"), Requests: getResourceLimits("6", "3"), }, - ImagePullPolicy: "IfNotPresent", + ImagePullPolicy: "IfNotPresent", + TerminationMessagePolicy: "File", }, }, "Request limit multiple invalid": { @@ -2802,7 +2903,8 @@ func TestValidateContainers(t *testing.T) { Limits: getResourceLimits("5", "3"), Requests: getResourceLimits("6", "4"), }, - ImagePullPolicy: "IfNotPresent", + ImagePullPolicy: "IfNotPresent", + TerminationMessagePolicy: "File", }, }, } @@ -2857,7 +2959,7 @@ func TestValidatePodSpec(t *testing.T) { successCases := []api.PodSpec{ { // Populate basic fields, leave defaults for most. Volumes: []api.Volume{{Name: "vol", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}}}, - Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, }, @@ -2865,8 +2967,8 @@ func TestValidatePodSpec(t *testing.T) { Volumes: []api.Volume{ {Name: "vol", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}}, }, - Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent"}}, - InitContainers: []api.Container{{Name: "ictr", Image: "iimage", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + InitContainers: []api.Container{{Name: "ictr", Image: "iimage", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, RestartPolicy: api.RestartPolicyAlways, NodeSelector: map[string]string{ "key": "value", @@ -2878,8 +2980,9 @@ func TestValidatePodSpec(t *testing.T) { }, { // Populate HostNetwork. Containers: []api.Container{ - {Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", Ports: []api.ContainerPort{ - {HostPort: 8080, ContainerPort: 8080, Protocol: "TCP"}}, + {Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File", + Ports: []api.ContainerPort{ + {HostPort: 8080, ContainerPort: 8080, Protocol: "TCP"}}, }, }, SecurityContext: &api.PodSecurityContext{ @@ -2889,7 +2992,7 @@ func TestValidatePodSpec(t *testing.T) { DNSPolicy: api.DNSClusterFirst, }, { // Populate RunAsUser SupplementalGroups FSGroup with minID 0 - Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, SecurityContext: &api.PodSecurityContext{ SupplementalGroups: []int64{minID}, RunAsUser: &minID, @@ -2899,7 +3002,7 @@ func TestValidatePodSpec(t *testing.T) { DNSPolicy: api.DNSClusterFirst, }, { // Populate RunAsUser SupplementalGroups FSGroup with maxID 2147483647 - Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, SecurityContext: &api.PodSecurityContext{ SupplementalGroups: []int64{maxID}, RunAsUser: &maxID, @@ -2913,7 +3016,7 @@ func TestValidatePodSpec(t *testing.T) { HostIPC: true, }, Volumes: []api.Volume{{Name: "vol", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}}}, - Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, }, @@ -2922,13 +3025,13 @@ func TestValidatePodSpec(t *testing.T) { HostPID: true, }, Volumes: []api.Volume{{Name: "vol", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}}}, - Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, }, { // Populate Affinity. Volumes: []api.Volume{{Name: "vol", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}}}, - Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, }, @@ -2947,7 +3050,7 @@ func TestValidatePodSpec(t *testing.T) { Volumes: []api.Volume{{}}, RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, - Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, }, "no containers": { RestartPolicy: api.RestartPolicyAlways, @@ -2959,7 +3062,7 @@ func TestValidatePodSpec(t *testing.T) { DNSPolicy: api.DNSClusterFirst, }, "bad init container": { - Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, InitContainers: []api.Container{{}}, RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, @@ -2967,10 +3070,10 @@ func TestValidatePodSpec(t *testing.T) { "bad DNS policy": { DNSPolicy: api.DNSPolicy("invalid"), RestartPolicy: api.RestartPolicyAlways, - Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, }, "bad service account name": { - Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, ServiceAccountName: "invalidName", @@ -2978,7 +3081,7 @@ func TestValidatePodSpec(t *testing.T) { "bad restart policy": { RestartPolicy: "UnknowPolicy", DNSPolicy: api.DNSClusterFirst, - Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, }, "with hostNetwork hostPort not equal to containerPort": { Containers: []api.Container{ @@ -2993,7 +3096,7 @@ func TestValidatePodSpec(t *testing.T) { DNSPolicy: api.DNSClusterFirst, }, "bad supplementalGroups large than math.MaxInt32": { - Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, SecurityContext: &api.PodSecurityContext{ HostNetwork: false, SupplementalGroups: []int64{maxID, 1234}, @@ -3002,7 +3105,7 @@ func TestValidatePodSpec(t *testing.T) { DNSPolicy: api.DNSClusterFirst, }, "bad supplementalGroups less than 0": { - Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, SecurityContext: &api.PodSecurityContext{ HostNetwork: false, SupplementalGroups: []int64{minID, 1234}, @@ -3011,7 +3114,7 @@ func TestValidatePodSpec(t *testing.T) { DNSPolicy: api.DNSClusterFirst, }, "bad runAsUser large than math.MaxInt32": { - Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, SecurityContext: &api.PodSecurityContext{ HostNetwork: false, RunAsUser: &maxID, @@ -3020,7 +3123,7 @@ func TestValidatePodSpec(t *testing.T) { DNSPolicy: api.DNSClusterFirst, }, "bad runAsUser less than 0": { - Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, SecurityContext: &api.PodSecurityContext{ HostNetwork: false, RunAsUser: &minID, @@ -3029,7 +3132,7 @@ func TestValidatePodSpec(t *testing.T) { DNSPolicy: api.DNSClusterFirst, }, "bad fsGroup large than math.MaxInt32": { - Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, SecurityContext: &api.PodSecurityContext{ HostNetwork: false, FSGroup: &maxID, @@ -3038,7 +3141,7 @@ func TestValidatePodSpec(t *testing.T) { DNSPolicy: api.DNSClusterFirst, }, "bad fsGroup less than 0": { - Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, SecurityContext: &api.PodSecurityContext{ HostNetwork: false, FSGroup: &minID, @@ -3050,7 +3153,7 @@ func TestValidatePodSpec(t *testing.T) { Volumes: []api.Volume{ {Name: "vol", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}}, }, - Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, RestartPolicy: api.RestartPolicyAlways, NodeSelector: map[string]string{ "key": "value", @@ -3062,7 +3165,7 @@ func TestValidatePodSpec(t *testing.T) { "bad nodeName": { NodeName: "node name", Volumes: []api.Volume{{Name: "vol", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}}}, - Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, }, @@ -3077,7 +3180,7 @@ func TestValidatePodSpec(t *testing.T) { func TestValidatePod(t *testing.T) { validPodSpec := func(affinity *api.Affinity) api.PodSpec { spec := api.PodSpec{ - Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, } @@ -3089,21 +3192,21 @@ func TestValidatePod(t *testing.T) { successCases := []api.Pod{ { // Basic fields. - ObjectMeta: api.ObjectMeta{Name: "123", Namespace: "ns"}, + ObjectMeta: metav1.ObjectMeta{Name: "123", Namespace: "ns"}, Spec: api.PodSpec{ Volumes: []api.Volume{{Name: "vol", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}}}, - Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, }, }, { // Just about everything. - ObjectMeta: api.ObjectMeta{Name: "abc.123.do-re-mi", Namespace: "ns"}, + ObjectMeta: metav1.ObjectMeta{Name: "abc.123.do-re-mi", Namespace: "ns"}, Spec: api.PodSpec{ Volumes: []api.Volume{ {Name: "vol", VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}}, }, - Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, NodeSelector: map[string]string{ @@ -3113,7 +3216,7 @@ func TestValidatePod(t *testing.T) { }, }, { // Serialized node affinity requirements. - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", }, @@ -3166,7 +3269,7 @@ func TestValidatePod(t *testing.T) { ), }, { // Serialized pod affinity in affinity requirements in annotations. - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", // TODO: Uncomment and move this block into Annotations map once @@ -3222,7 +3325,7 @@ func TestValidatePod(t *testing.T) { }), }, { // Serialized pod anti affinity with different Label Operators in affinity requirements in annotations. - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", // TODO: Uncomment and move this block into Annotations map once @@ -3276,7 +3379,7 @@ func TestValidatePod(t *testing.T) { }), }, { // populate tolerations equal operator in annotations. - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", Annotations: map[string]string{ @@ -3292,7 +3395,7 @@ func TestValidatePod(t *testing.T) { Spec: validPodSpec(nil), }, { // populate tolerations exists operator in annotations. - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", Annotations: map[string]string{ @@ -3307,7 +3410,7 @@ func TestValidatePod(t *testing.T) { Spec: validPodSpec(nil), }, { // empty operator is ok for toleration - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", Annotations: map[string]string{ @@ -3322,7 +3425,7 @@ func TestValidatePod(t *testing.T) { Spec: validPodSpec(nil), }, { // empty efffect is ok for toleration - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", Annotations: map[string]string{ @@ -3337,7 +3440,7 @@ func TestValidatePod(t *testing.T) { Spec: validPodSpec(nil), }, { // docker default seccomp profile - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", Annotations: map[string]string{ @@ -3347,7 +3450,7 @@ func TestValidatePod(t *testing.T) { Spec: validPodSpec(nil), }, { // unconfined seccomp profile - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", Annotations: map[string]string{ @@ -3357,7 +3460,7 @@ func TestValidatePod(t *testing.T) { Spec: validPodSpec(nil), }, { // localhost seccomp profile - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", Annotations: map[string]string{ @@ -3367,7 +3470,7 @@ func TestValidatePod(t *testing.T) { Spec: validPodSpec(nil), }, { // localhost seccomp profile for a container - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", Annotations: map[string]string{ @@ -3377,7 +3480,7 @@ func TestValidatePod(t *testing.T) { Spec: validPodSpec(nil), }, { // default AppArmor profile for a container - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", Annotations: map[string]string{ @@ -3387,7 +3490,7 @@ func TestValidatePod(t *testing.T) { Spec: validPodSpec(nil), }, { // default AppArmor profile for an init container - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", Annotations: map[string]string{ @@ -3395,14 +3498,14 @@ func TestValidatePod(t *testing.T) { }, }, Spec: api.PodSpec{ - InitContainers: []api.Container{{Name: "init-ctr", Image: "image", ImagePullPolicy: "IfNotPresent"}}, - Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + InitContainers: []api.Container{{Name: "init-ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, }, }, { // localhost AppArmor profile for a container - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", Annotations: map[string]string{ @@ -3412,7 +3515,7 @@ func TestValidatePod(t *testing.T) { Spec: validPodSpec(nil), }, { // syntactically valid sysctls - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", Annotations: map[string]string{ @@ -3423,7 +3526,7 @@ func TestValidatePod(t *testing.T) { Spec: validPodSpec(nil), }, { // valid opaque integer resources for init container - ObjectMeta: api.ObjectMeta{Name: "valid-opaque-int", Namespace: "ns"}, + ObjectMeta: metav1.ObjectMeta{Name: "valid-opaque-int", Namespace: "ns"}, Spec: api.PodSpec{ InitContainers: []api.Container{ { @@ -3438,17 +3541,18 @@ func TestValidatePod(t *testing.T) { api.OpaqueIntResourceName("A"): resource.MustParse("20"), }, }, + TerminationMessagePolicy: "File", }, }, - Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, }, }, { // valid opaque integer resources for regular container - ObjectMeta: api.ObjectMeta{Name: "valid-opaque-int", Namespace: "ns"}, + ObjectMeta: metav1.ObjectMeta{Name: "valid-opaque-int", Namespace: "ns"}, Spec: api.PodSpec{ - InitContainers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + InitContainers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, Containers: []api.Container{ { Name: "valid-opaque-int", @@ -3462,6 +3566,7 @@ func TestValidatePod(t *testing.T) { api.OpaqueIntResourceName("A"): resource.MustParse("20"), }, }, + TerminationMessagePolicy: "File", }, }, RestartPolicy: api.RestartPolicyAlways, @@ -3477,29 +3582,29 @@ func TestValidatePod(t *testing.T) { errorCases := map[string]api.Pod{ "bad name": { - ObjectMeta: api.ObjectMeta{Name: "", Namespace: "ns"}, + ObjectMeta: metav1.ObjectMeta{Name: "", Namespace: "ns"}, Spec: api.PodSpec{ RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, - Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, }, }, "bad namespace": { - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: ""}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: ""}, Spec: api.PodSpec{ RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, - Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, }, }, "bad spec": { - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: "ns"}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "ns"}, Spec: api.PodSpec{ Containers: []api.Container{{}}, }, }, "bad label": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc", Namespace: "ns", Labels: map[string]string{ @@ -3509,11 +3614,11 @@ func TestValidatePod(t *testing.T) { Spec: api.PodSpec{ RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, - Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, }, }, "invalid node selector requirement in node affinity, operator can't be null": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", }, @@ -3524,7 +3629,6 @@ func TestValidatePod(t *testing.T) { { MatchExpressions: []api.NodeSelectorRequirement{ { - Key: "key1", }, }, @@ -3535,7 +3639,7 @@ func TestValidatePod(t *testing.T) { }), }, "invalid preferredSchedulingTerm in node affinity, weight should be in range 1-100": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", }, @@ -3559,7 +3663,7 @@ func TestValidatePod(t *testing.T) { }), }, "invalid requiredDuringSchedulingIgnoredDuringExecution node selector, nodeSelectorTerms must have at least one term": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", }, @@ -3572,7 +3676,7 @@ func TestValidatePod(t *testing.T) { }), }, "invalid requiredDuringSchedulingIgnoredDuringExecution node selector term, matchExpressions must have at least one node selector requirement": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", }, @@ -3589,7 +3693,7 @@ func TestValidatePod(t *testing.T) { }), }, "invalid weight in preferredDuringSchedulingIgnoredDuringExecution in pod affinity annotations, weight should be in range 1-100": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", }, @@ -3617,7 +3721,7 @@ func TestValidatePod(t *testing.T) { }), }, "invalid labelSelector in preferredDuringSchedulingIgnoredDuringExecution in podaffinity annotations, values should be empty if the operator is Exists": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", }, @@ -3645,7 +3749,7 @@ func TestValidatePod(t *testing.T) { }), }, "invalid name space in preferredDuringSchedulingIgnoredDuringExecution in podaffinity annotations, name space shouldbe valid": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", }, @@ -3672,7 +3776,7 @@ func TestValidatePod(t *testing.T) { }), }, "invalid pod affinity, empty topologyKey is not allowed for hard pod affinity": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", }, @@ -3696,7 +3800,7 @@ func TestValidatePod(t *testing.T) { }), }, "invalid pod anti-affinity, empty topologyKey is not allowed for hard pod anti-affinity": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", }, @@ -3720,7 +3824,7 @@ func TestValidatePod(t *testing.T) { }), }, "invalid pod anti-affinity, empty topologyKey is not allowed for soft pod affinity": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", }, @@ -3747,7 +3851,7 @@ func TestValidatePod(t *testing.T) { }), }, "invalid toleration key": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", Annotations: map[string]string{ @@ -3763,7 +3867,7 @@ func TestValidatePod(t *testing.T) { Spec: validPodSpec(nil), }, "invalid toleration operator": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", Annotations: map[string]string{ @@ -3779,7 +3883,7 @@ func TestValidatePod(t *testing.T) { Spec: validPodSpec(nil), }, "value must be empty when `operator` is 'Exists'": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", Annotations: map[string]string{ @@ -3795,7 +3899,7 @@ func TestValidatePod(t *testing.T) { Spec: validPodSpec(nil), }, "must be a valid pod seccomp profile": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", Annotations: map[string]string{ @@ -3805,7 +3909,7 @@ func TestValidatePod(t *testing.T) { Spec: validPodSpec(nil), }, "must be a valid container seccomp profile": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", Annotations: map[string]string{ @@ -3815,7 +3919,7 @@ func TestValidatePod(t *testing.T) { Spec: validPodSpec(nil), }, "must be a non-empty container name in seccomp annotation": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", Annotations: map[string]string{ @@ -3825,7 +3929,7 @@ func TestValidatePod(t *testing.T) { Spec: validPodSpec(nil), }, "must be a non-empty container profile in seccomp annotation": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", Annotations: map[string]string{ @@ -3835,7 +3939,7 @@ func TestValidatePod(t *testing.T) { Spec: validPodSpec(nil), }, "must be a relative path in a node-local seccomp profile annotation": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", Annotations: map[string]string{ @@ -3845,7 +3949,7 @@ func TestValidatePod(t *testing.T) { Spec: validPodSpec(nil), }, "must not start with '../'": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", Annotations: map[string]string{ @@ -3855,7 +3959,7 @@ func TestValidatePod(t *testing.T) { Spec: validPodSpec(nil), }, "AppArmor profile must apply to a container": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", Annotations: map[string]string{ @@ -3865,14 +3969,14 @@ func TestValidatePod(t *testing.T) { }, }, Spec: api.PodSpec{ - InitContainers: []api.Container{{Name: "init-ctr", Image: "image", ImagePullPolicy: "IfNotPresent"}}, - Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + InitContainers: []api.Container{{Name: "init-ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, }, }, "AppArmor profile format must be valid": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", Annotations: map[string]string{ @@ -3882,7 +3986,7 @@ func TestValidatePod(t *testing.T) { Spec: validPodSpec(nil), }, "only default AppArmor profile may start with runtime/": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", Annotations: map[string]string{ @@ -3892,7 +3996,7 @@ func TestValidatePod(t *testing.T) { Spec: validPodSpec(nil), }, "invalid sysctl annotation": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", Annotations: map[string]string{ @@ -3902,7 +4006,7 @@ func TestValidatePod(t *testing.T) { Spec: validPodSpec(nil), }, "invalid comma-separated sysctl annotation": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", Annotations: map[string]string{ @@ -3912,7 +4016,7 @@ func TestValidatePod(t *testing.T) { Spec: validPodSpec(nil), }, "invalid unsafe sysctl annotation": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", Annotations: map[string]string{ @@ -3922,7 +4026,7 @@ func TestValidatePod(t *testing.T) { Spec: validPodSpec(nil), }, "intersecting safe sysctls and unsafe sysctls annotations": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "123", Namespace: "ns", Annotations: map[string]string{ @@ -3933,7 +4037,7 @@ func TestValidatePod(t *testing.T) { Spec: validPodSpec(nil), }, "invalid opaque integer resource requirement: request must be <= limit": { - ObjectMeta: api.ObjectMeta{Name: "123", Namespace: "ns"}, + ObjectMeta: metav1.ObjectMeta{Name: "123", Namespace: "ns"}, Spec: api.PodSpec{ Containers: []api.Container{ { @@ -3955,7 +4059,7 @@ func TestValidatePod(t *testing.T) { }, }, "invalid fractional opaque integer resource in container request": { - ObjectMeta: api.ObjectMeta{Name: "123", Namespace: "ns"}, + ObjectMeta: metav1.ObjectMeta{Name: "123", Namespace: "ns"}, Spec: api.PodSpec{ Containers: []api.Container{ { @@ -3974,7 +4078,7 @@ func TestValidatePod(t *testing.T) { }, }, "invalid fractional opaque integer resource in init container request": { - ObjectMeta: api.ObjectMeta{Name: "123", Namespace: "ns"}, + ObjectMeta: metav1.ObjectMeta{Name: "123", Namespace: "ns"}, Spec: api.PodSpec{ InitContainers: []api.Container{ { @@ -3988,13 +4092,13 @@ func TestValidatePod(t *testing.T) { }, }, }, - Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, }, }, "invalid fractional opaque integer resource in container limit": { - ObjectMeta: api.ObjectMeta{Name: "123", Namespace: "ns"}, + ObjectMeta: metav1.ObjectMeta{Name: "123", Namespace: "ns"}, Spec: api.PodSpec{ Containers: []api.Container{ { @@ -4016,7 +4120,7 @@ func TestValidatePod(t *testing.T) { }, }, "invalid fractional opaque integer resource in init container limit": { - ObjectMeta: api.ObjectMeta{Name: "123", Namespace: "ns"}, + ObjectMeta: metav1.ObjectMeta{Name: "123", Namespace: "ns"}, Spec: api.PodSpec{ InitContainers: []api.Container{ { @@ -4033,7 +4137,7 @@ func TestValidatePod(t *testing.T) { }, }, }, - Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, }, @@ -4067,17 +4171,17 @@ func TestValidatePodUpdate(t *testing.T) { {api.Pod{}, api.Pod{}, true, "nothing"}, { api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, }, api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar"}, }, false, "ids", }, { api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{ "foo": "bar", @@ -4085,7 +4189,7 @@ func TestValidatePodUpdate(t *testing.T) { }, }, api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{ "bar": "foo", @@ -4097,7 +4201,7 @@ func TestValidatePodUpdate(t *testing.T) { }, { api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Annotations: map[string]string{ "foo": "bar", @@ -4105,7 +4209,7 @@ func TestValidatePodUpdate(t *testing.T) { }, }, api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Annotations: map[string]string{ "bar": "foo", @@ -4117,7 +4221,7 @@ func TestValidatePodUpdate(t *testing.T) { }, { api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Spec: api.PodSpec{ @@ -4129,7 +4233,7 @@ func TestValidatePodUpdate(t *testing.T) { }, }, api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.PodSpec{ Containers: []api.Container{ { @@ -4146,7 +4250,7 @@ func TestValidatePodUpdate(t *testing.T) { }, { api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Spec: api.PodSpec{ @@ -4158,7 +4262,7 @@ func TestValidatePodUpdate(t *testing.T) { }, }, api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.PodSpec{ InitContainers: []api.Container{ { @@ -4175,11 +4279,11 @@ func TestValidatePodUpdate(t *testing.T) { }, { api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.PodSpec{Containers: []api.Container{{Image: "foo:V1"}}}, }, api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo", DeletionTimestamp: &now}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", DeletionTimestamp: &now}, Spec: api.PodSpec{Containers: []api.Container{{Image: "foo:V1"}}}, }, true, @@ -4187,11 +4291,11 @@ func TestValidatePodUpdate(t *testing.T) { }, { api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo", DeletionTimestamp: &now, DeletionGracePeriodSeconds: &grace}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", DeletionTimestamp: &now, DeletionGracePeriodSeconds: &grace}, Spec: api.PodSpec{Containers: []api.Container{{Image: "foo:V1"}}}, }, api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo", DeletionTimestamp: &now, DeletionGracePeriodSeconds: &grace2}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", DeletionTimestamp: &now, DeletionGracePeriodSeconds: &grace2}, Spec: api.PodSpec{Containers: []api.Container{{Image: "foo:V1"}}}, }, false, @@ -4199,7 +4303,7 @@ func TestValidatePodUpdate(t *testing.T) { }, { api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.PodSpec{ Containers: []api.Container{ { @@ -4209,7 +4313,7 @@ func TestValidatePodUpdate(t *testing.T) { }, }, api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.PodSpec{ Containers: []api.Container{ { @@ -4223,7 +4327,7 @@ func TestValidatePodUpdate(t *testing.T) { }, { api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.PodSpec{ InitContainers: []api.Container{ { @@ -4233,7 +4337,7 @@ func TestValidatePodUpdate(t *testing.T) { }, }, api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.PodSpec{ InitContainers: []api.Container{ { @@ -4247,7 +4351,7 @@ func TestValidatePodUpdate(t *testing.T) { }, { api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.PodSpec{ Containers: []api.Container{ {}, @@ -4255,7 +4359,7 @@ func TestValidatePodUpdate(t *testing.T) { }, }, api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.PodSpec{ Containers: []api.Container{ { @@ -4269,7 +4373,7 @@ func TestValidatePodUpdate(t *testing.T) { }, { api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.PodSpec{ InitContainers: []api.Container{ {}, @@ -4277,7 +4381,7 @@ func TestValidatePodUpdate(t *testing.T) { }, }, api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.PodSpec{ InitContainers: []api.Container{ { @@ -4413,7 +4517,7 @@ func TestValidatePodUpdate(t *testing.T) { { api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.PodSpec{ Containers: []api.Container{ { @@ -4426,7 +4530,7 @@ func TestValidatePodUpdate(t *testing.T) { }, }, api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.PodSpec{ Containers: []api.Container{ { @@ -4443,7 +4547,7 @@ func TestValidatePodUpdate(t *testing.T) { }, { api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.PodSpec{ Containers: []api.Container{ { @@ -4456,7 +4560,7 @@ func TestValidatePodUpdate(t *testing.T) { }, }, api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.PodSpec{ Containers: []api.Container{ { @@ -4473,7 +4577,7 @@ func TestValidatePodUpdate(t *testing.T) { }, { api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{ "foo": "bar", @@ -4481,7 +4585,7 @@ func TestValidatePodUpdate(t *testing.T) { }, }, api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{ "Bar": "foo", @@ -4511,7 +4615,7 @@ func TestValidatePodUpdate(t *testing.T) { func makeValidService() api.Service { return api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "valid", Namespace: "valid", Labels: map[string]string{}, @@ -5122,13 +5226,13 @@ func TestValidateReplicationControllerStatusUpdate(t *testing.T) { validSelector := map[string]string{"a": "b"} validPodTemplate := api.PodTemplate{ Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validSelector, }, Spec: api.PodSpec{ RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, - Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, }, }, } @@ -5139,7 +5243,7 @@ func TestValidateReplicationControllerStatusUpdate(t *testing.T) { successCases := []rcUpdateTest{ { old: api.ReplicationController{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: api.ReplicationControllerSpec{ Selector: validSelector, Template: &validPodTemplate.Template, @@ -5149,7 +5253,7 @@ func TestValidateReplicationControllerStatusUpdate(t *testing.T) { }, }, update: api.ReplicationController{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: api.ReplicationControllerSpec{ Replicas: 3, Selector: validSelector, @@ -5171,7 +5275,7 @@ func TestValidateReplicationControllerStatusUpdate(t *testing.T) { errorCases := map[string]rcUpdateTest{ "negative replicas": { old: api.ReplicationController{ - ObjectMeta: api.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "", Namespace: metav1.NamespaceDefault}, Spec: api.ReplicationControllerSpec{ Selector: validSelector, Template: &validPodTemplate.Template, @@ -5181,7 +5285,7 @@ func TestValidateReplicationControllerStatusUpdate(t *testing.T) { }, }, update: api.ReplicationController{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: api.ReplicationControllerSpec{ Replicas: 2, Selector: validSelector, @@ -5205,25 +5309,25 @@ func TestValidateReplicationControllerUpdate(t *testing.T) { validSelector := map[string]string{"a": "b"} validPodTemplate := api.PodTemplate{ Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validSelector, }, Spec: api.PodSpec{ RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, - Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, }, }, } readWriteVolumePodTemplate := api.PodTemplate{ Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validSelector, }, Spec: api.PodSpec{ RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, - Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, Volumes: []api.Volume{{Name: "gcepd", VolumeSource: api.VolumeSource{GCEPersistentDisk: &api.GCEPersistentDiskVolumeSource{PDName: "my-PD", FSType: "ext4", Partition: 1, ReadOnly: false}}}}, }, }, @@ -5235,7 +5339,7 @@ func TestValidateReplicationControllerUpdate(t *testing.T) { RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, }, - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: invalidSelector, }, }, @@ -5247,14 +5351,14 @@ func TestValidateReplicationControllerUpdate(t *testing.T) { successCases := []rcUpdateTest{ { old: api.ReplicationController{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: api.ReplicationControllerSpec{ Selector: validSelector, Template: &validPodTemplate.Template, }, }, update: api.ReplicationController{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: api.ReplicationControllerSpec{ Replicas: 3, Selector: validSelector, @@ -5264,14 +5368,14 @@ func TestValidateReplicationControllerUpdate(t *testing.T) { }, { old: api.ReplicationController{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: api.ReplicationControllerSpec{ Selector: validSelector, Template: &validPodTemplate.Template, }, }, update: api.ReplicationController{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: api.ReplicationControllerSpec{ Replicas: 1, Selector: validSelector, @@ -5290,14 +5394,14 @@ func TestValidateReplicationControllerUpdate(t *testing.T) { errorCases := map[string]rcUpdateTest{ "more than one read/write": { old: api.ReplicationController{ - ObjectMeta: api.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "", Namespace: metav1.NamespaceDefault}, Spec: api.ReplicationControllerSpec{ Selector: validSelector, Template: &validPodTemplate.Template, }, }, update: api.ReplicationController{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: api.ReplicationControllerSpec{ Replicas: 2, Selector: validSelector, @@ -5307,14 +5411,14 @@ func TestValidateReplicationControllerUpdate(t *testing.T) { }, "invalid selector": { old: api.ReplicationController{ - ObjectMeta: api.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "", Namespace: metav1.NamespaceDefault}, Spec: api.ReplicationControllerSpec{ Selector: validSelector, Template: &validPodTemplate.Template, }, }, update: api.ReplicationController{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: api.ReplicationControllerSpec{ Replicas: 2, Selector: invalidSelector, @@ -5324,14 +5428,14 @@ func TestValidateReplicationControllerUpdate(t *testing.T) { }, "invalid pod": { old: api.ReplicationController{ - ObjectMeta: api.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "", Namespace: metav1.NamespaceDefault}, Spec: api.ReplicationControllerSpec{ Selector: validSelector, Template: &validPodTemplate.Template, }, }, update: api.ReplicationController{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: api.ReplicationControllerSpec{ Replicas: 2, Selector: validSelector, @@ -5341,14 +5445,14 @@ func TestValidateReplicationControllerUpdate(t *testing.T) { }, "negative replicas": { old: api.ReplicationController{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: api.ReplicationControllerSpec{ Selector: validSelector, Template: &validPodTemplate.Template, }, }, update: api.ReplicationController{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: api.ReplicationControllerSpec{ Replicas: -1, Selector: validSelector, @@ -5368,26 +5472,26 @@ func TestValidateReplicationController(t *testing.T) { validSelector := map[string]string{"a": "b"} validPodTemplate := api.PodTemplate{ Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validSelector, }, Spec: api.PodSpec{ RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, - Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, }, }, } readWriteVolumePodTemplate := api.PodTemplate{ Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validSelector, }, Spec: api.PodSpec{ Volumes: []api.Volume{{Name: "gcepd", VolumeSource: api.VolumeSource{GCEPersistentDisk: &api.GCEPersistentDiskVolumeSource{PDName: "my-PD", FSType: "ext4", Partition: 1, ReadOnly: false}}}}, RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, - Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, }, }, } @@ -5398,28 +5502,28 @@ func TestValidateReplicationController(t *testing.T) { RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, }, - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: invalidSelector, }, }, } successCases := []api.ReplicationController{ { - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: api.ReplicationControllerSpec{ Selector: validSelector, Template: &validPodTemplate.Template, }, }, { - ObjectMeta: api.ObjectMeta{Name: "abc-123", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc-123", Namespace: metav1.NamespaceDefault}, Spec: api.ReplicationControllerSpec{ Selector: validSelector, Template: &validPodTemplate.Template, }, }, { - ObjectMeta: api.ObjectMeta{Name: "abc-123", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc-123", Namespace: metav1.NamespaceDefault}, Spec: api.ReplicationControllerSpec{ Replicas: 1, Selector: validSelector, @@ -5435,40 +5539,40 @@ func TestValidateReplicationController(t *testing.T) { errorCases := map[string]api.ReplicationController{ "zero-length ID": { - ObjectMeta: api.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "", Namespace: metav1.NamespaceDefault}, Spec: api.ReplicationControllerSpec{ Selector: validSelector, Template: &validPodTemplate.Template, }, }, "missing-namespace": { - ObjectMeta: api.ObjectMeta{Name: "abc-123"}, + ObjectMeta: metav1.ObjectMeta{Name: "abc-123"}, Spec: api.ReplicationControllerSpec{ Selector: validSelector, Template: &validPodTemplate.Template, }, }, "empty selector": { - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: api.ReplicationControllerSpec{ Template: &validPodTemplate.Template, }, }, "selector_doesnt_match": { - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: api.ReplicationControllerSpec{ Selector: map[string]string{"foo": "bar"}, Template: &validPodTemplate.Template, }, }, "invalid manifest": { - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: api.ReplicationControllerSpec{ Selector: validSelector, }, }, "read-write persistent disk with > 1 pod": { - ObjectMeta: api.ObjectMeta{Name: "abc"}, + ObjectMeta: metav1.ObjectMeta{Name: "abc"}, Spec: api.ReplicationControllerSpec{ Replicas: 2, Selector: validSelector, @@ -5476,16 +5580,16 @@ func TestValidateReplicationController(t *testing.T) { }, }, "negative_replicas": { - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: api.ReplicationControllerSpec{ Replicas: -1, Selector: validSelector, }, }, "invalid_label": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc-123", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, Labels: map[string]string{ "NoUppercaseOrSpecialCharsLike=Equals": "bar", }, @@ -5496,9 +5600,9 @@ func TestValidateReplicationController(t *testing.T) { }, }, "invalid_label 2": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc-123", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, Labels: map[string]string{ "NoUppercaseOrSpecialCharsLike=Equals": "bar", }, @@ -5508,9 +5612,9 @@ func TestValidateReplicationController(t *testing.T) { }, }, "invalid_annotation": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc-123", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, Annotations: map[string]string{ "NoUppercaseOrSpecialCharsLike=Equals": "bar", }, @@ -5521,9 +5625,9 @@ func TestValidateReplicationController(t *testing.T) { }, }, "invalid restart policy 1": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc-123", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, Spec: api.ReplicationControllerSpec{ Selector: validSelector, @@ -5531,18 +5635,18 @@ func TestValidateReplicationController(t *testing.T) { Spec: api.PodSpec{ RestartPolicy: api.RestartPolicyOnFailure, DNSPolicy: api.DNSClusterFirst, - Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, }, - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validSelector, }, }, }, }, "invalid restart policy 2": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc-123", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, Spec: api.ReplicationControllerSpec{ Selector: validSelector, @@ -5550,9 +5654,9 @@ func TestValidateReplicationController(t *testing.T) { Spec: api.PodSpec{ RestartPolicy: api.RestartPolicyNever, DNSPolicy: api.DNSClusterFirst, - Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, }, - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validSelector, }, }, @@ -5588,7 +5692,7 @@ func TestValidateNode(t *testing.T) { invalidSelector := map[string]string{"NoUppercaseOrSpecialCharsLike=Equals": "b"} successCases := []api.Node{ { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc", Labels: validSelector, }, @@ -5607,7 +5711,7 @@ func TestValidateNode(t *testing.T) { }, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc", }, Status: api.NodeStatus{ @@ -5624,7 +5728,7 @@ func TestValidateNode(t *testing.T) { }, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "dedicated-node1", // Add a valid taint to a node Annotations: map[string]string{ @@ -5650,7 +5754,7 @@ func TestValidateNode(t *testing.T) { }, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc", Annotations: map[string]string{ api.PreferAvoidPodsAnnotationKey: ` @@ -5695,7 +5799,7 @@ func TestValidateNode(t *testing.T) { errorCases := map[string]api.Node{ "zero-length Name": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "", Labels: validSelector, }, @@ -5711,7 +5815,7 @@ func TestValidateNode(t *testing.T) { }, }, "invalid-labels": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc-123", Labels: invalidSelector, }, @@ -5726,7 +5830,7 @@ func TestValidateNode(t *testing.T) { }, }, "missing-external-id": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc-123", Labels: validSelector, }, @@ -5738,7 +5842,7 @@ func TestValidateNode(t *testing.T) { }, }, "missing-taint-key": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "dedicated-node1", // Add a taint with an empty key to a node Annotations: map[string]string{ @@ -5755,7 +5859,7 @@ func TestValidateNode(t *testing.T) { }, }, "bad-taint-key": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "dedicated-node1", // Add a taint with an empty key to a node Annotations: map[string]string{ @@ -5772,7 +5876,7 @@ func TestValidateNode(t *testing.T) { }, }, "bad-taint-value": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "dedicated-node2", Annotations: map[string]string{ api.TaintsAnnotationKey: ` @@ -5798,7 +5902,7 @@ func TestValidateNode(t *testing.T) { }, }, "missing-taint-effect": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "dedicated-node3", // Add a taint with an empty effect to a node Annotations: map[string]string{ @@ -5824,7 +5928,7 @@ func TestValidateNode(t *testing.T) { }, }, "invalide-taint-effect": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "dedicated-node3", // Add a taint with an empty effect to a node Annotations: map[string]string{ @@ -5850,7 +5954,7 @@ func TestValidateNode(t *testing.T) { }, }, "duplicated-taints-with-same-key-effect": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "dedicated-node1", // Add two taints to the node with the same key and effect; should be rejected. Annotations: map[string]string{ @@ -5871,7 +5975,7 @@ func TestValidateNode(t *testing.T) { }, }, "missing-podSignature": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc-123", Annotations: map[string]string{ api.PreferAvoidPodsAnnotationKey: ` @@ -5897,7 +6001,7 @@ func TestValidateNode(t *testing.T) { }, }, "invalid-podController": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc-123", Annotations: map[string]string{ api.PreferAvoidPodsAnnotationKey: ` @@ -5968,53 +6072,53 @@ func TestValidateNodeUpdate(t *testing.T) { }{ {api.Node{}, api.Node{}, true}, {api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo"}}, api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "bar"}, }, false}, {api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{"foo": "bar"}, }, }, api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{"foo": "baz"}, }, }, true}, {api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, }, api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{"foo": "baz"}, }, }, true}, {api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{"bar": "foo"}, }, }, api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{"foo": "baz"}, }, }, true}, {api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Spec: api.NodeSpec{ PodCIDR: "", }, }, api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Spec: api.NodeSpec{ @@ -6022,14 +6126,14 @@ func TestValidateNodeUpdate(t *testing.T) { }, }, true}, {api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Spec: api.NodeSpec{ PodCIDR: "192.123.0.0/16", }, }, api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Spec: api.NodeSpec{ @@ -6037,7 +6141,7 @@ func TestValidateNodeUpdate(t *testing.T) { }, }, false}, {api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Status: api.NodeStatus{ @@ -6047,7 +6151,7 @@ func TestValidateNodeUpdate(t *testing.T) { }, }, }, api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Status: api.NodeStatus{ @@ -6058,7 +6162,7 @@ func TestValidateNodeUpdate(t *testing.T) { }, }, true}, {api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{"bar": "foo"}, }, @@ -6069,7 +6173,7 @@ func TestValidateNodeUpdate(t *testing.T) { }, }, }, api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{"bar": "fooobaz"}, }, @@ -6081,7 +6185,7 @@ func TestValidateNodeUpdate(t *testing.T) { }, }, true}, {api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{"bar": "foo"}, }, @@ -6091,31 +6195,31 @@ func TestValidateNodeUpdate(t *testing.T) { }, }, }, api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{"bar": "fooobaz"}, }, }, true}, {api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{"foo": "baz"}, }, }, api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{"Foo": "baz"}, }, }, true}, {api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Spec: api.NodeSpec{ Unschedulable: false, }, }, api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Spec: api.NodeSpec{ @@ -6123,14 +6227,14 @@ func TestValidateNodeUpdate(t *testing.T) { }, }, true}, {api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Spec: api.NodeSpec{ Unschedulable: false, }, }, api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Status: api.NodeStatus{ @@ -6141,14 +6245,14 @@ func TestValidateNodeUpdate(t *testing.T) { }, }, false}, {api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Spec: api.NodeSpec{ Unschedulable: false, }, }, api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Status: api.NodeStatus{ @@ -6159,11 +6263,11 @@ func TestValidateNodeUpdate(t *testing.T) { }, }, true}, {api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, }, api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Annotations: map[string]string{ api.PreferAvoidPodsAnnotationKey: ` @@ -6191,11 +6295,11 @@ func TestValidateNodeUpdate(t *testing.T) { }, }, true}, {api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, }, api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Annotations: map[string]string{ api.PreferAvoidPodsAnnotationKey: ` @@ -6211,11 +6315,11 @@ func TestValidateNodeUpdate(t *testing.T) { }, }, false}, {api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, }, api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Annotations: map[string]string{ api.PreferAvoidPodsAnnotationKey: ` @@ -6240,11 +6344,11 @@ func TestValidateNodeUpdate(t *testing.T) { }, }, false}, {api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "valid-opaque-int-resources", }, }, api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "valid-opaque-int-resources", }, Status: api.NodeStatus{ @@ -6257,11 +6361,11 @@ func TestValidateNodeUpdate(t *testing.T) { }, }, true}, {api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "invalid-fractional-opaque-int-capacity", }, }, api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "invalid-fractional-opaque-int-capacity", }, Status: api.NodeStatus{ @@ -6273,11 +6377,11 @@ func TestValidateNodeUpdate(t *testing.T) { }, }, false}, {api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "invalid-fractional-opaque-int-allocatable", }, }, api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "invalid-fractional-opaque-int-allocatable", }, Status: api.NodeStatus{ @@ -6893,7 +6997,7 @@ func TestValidateLimitRange(t *testing.T) { } for _, successCase := range successCases { - limitRange := &api.LimitRange{ObjectMeta: api.ObjectMeta{Name: successCase.name, Namespace: "foo"}, Spec: successCase.spec} + limitRange := &api.LimitRange{ObjectMeta: metav1.ObjectMeta{Name: successCase.name, Namespace: "foo"}, Spec: successCase.spec} if errs := ValidateLimitRange(limitRange); len(errs) != 0 { t.Errorf("Case %v, unexpected error: %v", successCase.name, errs) } @@ -6904,23 +7008,23 @@ func TestValidateLimitRange(t *testing.T) { D string }{ "zero-length-name": { - api.LimitRange{ObjectMeta: api.ObjectMeta{Name: "", Namespace: "foo"}, Spec: api.LimitRangeSpec{}}, + api.LimitRange{ObjectMeta: metav1.ObjectMeta{Name: "", Namespace: "foo"}, Spec: api.LimitRangeSpec{}}, "name or generateName is required", }, "zero-length-namespace": { - api.LimitRange{ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: ""}, Spec: api.LimitRangeSpec{}}, + api.LimitRange{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: ""}, Spec: api.LimitRangeSpec{}}, "", }, "invalid-name": { - api.LimitRange{ObjectMeta: api.ObjectMeta{Name: "^Invalid", Namespace: "foo"}, Spec: api.LimitRangeSpec{}}, + api.LimitRange{ObjectMeta: metav1.ObjectMeta{Name: "^Invalid", Namespace: "foo"}, Spec: api.LimitRangeSpec{}}, dnsSubdomainLabelErrMsg, }, "invalid-namespace": { - api.LimitRange{ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: "^Invalid"}, Spec: api.LimitRangeSpec{}}, + api.LimitRange{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "^Invalid"}, Spec: api.LimitRangeSpec{}}, dnsLabelErrMsg, }, "duplicate-limit-type": { - api.LimitRange{ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: api.LimitRangeSpec{ + api.LimitRange{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: api.LimitRangeSpec{ Limits: []api.LimitRangeItem{ { Type: api.LimitTypePod, @@ -6936,7 +7040,7 @@ func TestValidateLimitRange(t *testing.T) { "", }, "default-limit-type-pod": { - api.LimitRange{ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: api.LimitRangeSpec{ + api.LimitRange{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: api.LimitRangeSpec{ Limits: []api.LimitRangeItem{ { Type: api.LimitTypePod, @@ -6949,7 +7053,7 @@ func TestValidateLimitRange(t *testing.T) { "may not be specified when `type` is 'Pod'", }, "default-request-limit-type-pod": { - api.LimitRange{ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: api.LimitRangeSpec{ + api.LimitRange{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: api.LimitRangeSpec{ Limits: []api.LimitRangeItem{ { Type: api.LimitTypePod, @@ -6962,7 +7066,7 @@ func TestValidateLimitRange(t *testing.T) { "may not be specified when `type` is 'Pod'", }, "min value 100m is greater than max value 10m": { - api.LimitRange{ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: api.LimitRangeSpec{ + api.LimitRange{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: api.LimitRangeSpec{ Limits: []api.LimitRangeItem{ { Type: api.LimitTypePod, @@ -6974,7 +7078,7 @@ func TestValidateLimitRange(t *testing.T) { "min value 100m is greater than max value 10m", }, "invalid spec default outside range": { - api.LimitRange{ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: api.LimitRangeSpec{ + api.LimitRange{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: api.LimitRangeSpec{ Limits: []api.LimitRangeItem{ { Type: api.LimitTypeContainer, @@ -6987,7 +7091,7 @@ func TestValidateLimitRange(t *testing.T) { "default value 2 is greater than max value 1", }, "invalid spec defaultrequest outside range": { - api.LimitRange{ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: api.LimitRangeSpec{ + api.LimitRange{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: api.LimitRangeSpec{ Limits: []api.LimitRangeItem{ { Type: api.LimitTypeContainer, @@ -7000,7 +7104,7 @@ func TestValidateLimitRange(t *testing.T) { "default request value 2 is greater than max value 1", }, "invalid spec defaultrequest more than default": { - api.LimitRange{ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: api.LimitRangeSpec{ + api.LimitRange{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: api.LimitRangeSpec{ Limits: []api.LimitRangeItem{ { Type: api.LimitTypeContainer, @@ -7014,7 +7118,7 @@ func TestValidateLimitRange(t *testing.T) { "default request value 800m is greater than default limit value 500m", }, "invalid spec maxLimitRequestRatio less than 1": { - api.LimitRange{ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: api.LimitRangeSpec{ + api.LimitRange{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: api.LimitRangeSpec{ Limits: []api.LimitRangeItem{ { Type: api.LimitTypePod, @@ -7025,7 +7129,7 @@ func TestValidateLimitRange(t *testing.T) { "ratio 800m is less than 1", }, "invalid spec maxLimitRequestRatio greater than max/min": { - api.LimitRange{ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: api.LimitRangeSpec{ + api.LimitRange{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: api.LimitRangeSpec{ Limits: []api.LimitRangeItem{ { Type: api.LimitTypeContainer, @@ -7038,7 +7142,7 @@ func TestValidateLimitRange(t *testing.T) { "ratio 10 is greater than max/min = 4.000000", }, "invalid non standard limit type": { - api.LimitRange{ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: api.LimitRangeSpec{ + api.LimitRange{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: api.LimitRangeSpec{ Limits: []api.LimitRangeItem{ { Type: "foo", @@ -7053,7 +7157,7 @@ func TestValidateLimitRange(t *testing.T) { "must be a standard limit type or fully qualified", }, "min and max values missing, one required": { - api.LimitRange{ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: api.LimitRangeSpec{ + api.LimitRange{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: api.LimitRangeSpec{ Limits: []api.LimitRangeItem{ { Type: api.LimitTypePersistentVolumeClaim, @@ -7063,7 +7167,7 @@ func TestValidateLimitRange(t *testing.T) { "either minimum or maximum storage value is required, but neither was provided", }, "invalid min greater than max": { - api.LimitRange{ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: api.LimitRangeSpec{ + api.LimitRange{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: api.LimitRangeSpec{ Limits: []api.LimitRangeItem{ { Type: api.LimitTypePersistentVolumeClaim, @@ -7196,42 +7300,42 @@ func TestValidateResourceQuota(t *testing.T) { successCases := []api.ResourceQuota{ { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc", Namespace: "foo", }, Spec: spec, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc", Namespace: "foo", }, Spec: fractionalComputeSpec, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc", Namespace: "foo", }, Spec: terminatingSpec, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc", Namespace: "foo", }, Spec: nonTerminatingSpec, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc", Namespace: "foo", }, Spec: bestEffortSpec, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc", Namespace: "foo", }, @@ -7250,43 +7354,43 @@ func TestValidateResourceQuota(t *testing.T) { D string }{ "zero-length Name": { - api.ResourceQuota{ObjectMeta: api.ObjectMeta{Name: "", Namespace: "foo"}, Spec: spec}, + api.ResourceQuota{ObjectMeta: metav1.ObjectMeta{Name: "", Namespace: "foo"}, Spec: spec}, "name or generateName is required", }, "zero-length Namespace": { - api.ResourceQuota{ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: ""}, Spec: spec}, + api.ResourceQuota{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: ""}, Spec: spec}, "", }, "invalid Name": { - api.ResourceQuota{ObjectMeta: api.ObjectMeta{Name: "^Invalid", Namespace: "foo"}, Spec: spec}, + api.ResourceQuota{ObjectMeta: metav1.ObjectMeta{Name: "^Invalid", Namespace: "foo"}, Spec: spec}, dnsSubdomainLabelErrMsg, }, "invalid Namespace": { - api.ResourceQuota{ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: "^Invalid"}, Spec: spec}, + api.ResourceQuota{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "^Invalid"}, Spec: spec}, dnsLabelErrMsg, }, "negative-limits": { - api.ResourceQuota{ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: negativeSpec}, + api.ResourceQuota{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: negativeSpec}, isNegativeErrorMsg, }, "fractional-api-resource": { - api.ResourceQuota{ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: fractionalPodSpec}, + api.ResourceQuota{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: fractionalPodSpec}, isNotIntegerErrorMsg, }, "invalid-quota-resource": { - api.ResourceQuota{ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: invalidQuotaResourceSpec}, + api.ResourceQuota{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: invalidQuotaResourceSpec}, isInvalidQuotaResource, }, "invalid-quota-terminating-pair": { - api.ResourceQuota{ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: invalidTerminatingScopePairsSpec}, + api.ResourceQuota{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: invalidTerminatingScopePairsSpec}, "conflicting scopes", }, "invalid-quota-besteffort-pair": { - api.ResourceQuota{ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: invalidBestEffortScopePairsSpec}, + api.ResourceQuota{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: invalidBestEffortScopePairsSpec}, "conflicting scopes", }, "invalid-quota-scope-name": { - api.ResourceQuota{ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: invalidScopeNameSpec}, + api.ResourceQuota{ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: "foo"}, Spec: invalidScopeNameSpec}, "unsupported scope", }, } @@ -7308,10 +7412,10 @@ func TestValidateNamespace(t *testing.T) { invalidLabels := map[string]string{"NoUppercaseOrSpecialCharsLike=Equals": "b"} successCases := []api.Namespace{ { - ObjectMeta: api.ObjectMeta{Name: "abc", Labels: validLabels}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Labels: validLabels}, }, { - ObjectMeta: api.ObjectMeta{Name: "abc-123"}, + ObjectMeta: metav1.ObjectMeta{Name: "abc-123"}, Spec: api.NamespaceSpec{ Finalizers: []api.FinalizerName{"example.com/something", "example.com/other"}, }, @@ -7327,15 +7431,15 @@ func TestValidateNamespace(t *testing.T) { D string }{ "zero-length name": { - api.Namespace{ObjectMeta: api.ObjectMeta{Name: ""}}, + api.Namespace{ObjectMeta: metav1.ObjectMeta{Name: ""}}, "", }, "defined-namespace": { - api.Namespace{ObjectMeta: api.ObjectMeta{Name: "abc-123", Namespace: "makesnosense"}}, + api.Namespace{ObjectMeta: metav1.ObjectMeta{Name: "abc-123", Namespace: "makesnosense"}}, "", }, "invalid-labels": { - api.Namespace{ObjectMeta: api.ObjectMeta{Name: "abc", Labels: invalidLabels}}, + api.Namespace{ObjectMeta: metav1.ObjectMeta{Name: "abc", Labels: invalidLabels}}, "", }, } @@ -7355,38 +7459,38 @@ func TestValidateNamespaceFinalizeUpdate(t *testing.T) { }{ {api.Namespace{}, api.Namespace{}, true}, {api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo"}}, api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo"}, Spec: api.NamespaceSpec{ Finalizers: []api.FinalizerName{"Foo"}, }, }, false}, {api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo"}, Spec: api.NamespaceSpec{ Finalizers: []api.FinalizerName{"foo.com/bar"}, }, }, api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo"}, Spec: api.NamespaceSpec{ Finalizers: []api.FinalizerName{"foo.com/bar", "what.com/bar"}, }, }, true}, {api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "fooemptyfinalizer"}, Spec: api.NamespaceSpec{ Finalizers: []api.FinalizerName{"foo.com/bar"}, }, }, api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "fooemptyfinalizer"}, Spec: api.NamespaceSpec{ Finalizers: []api.FinalizerName{"", "foo.com/bar", "what.com/bar"}, @@ -7422,10 +7526,10 @@ func TestValidateNamespaceStatusUpdate(t *testing.T) { }, true}, // Cannot set deletionTimestamp via status update {api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo"}}, api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", DeletionTimestamp: &now}, Status: api.NamespaceStatus{ @@ -7434,11 +7538,11 @@ func TestValidateNamespaceStatusUpdate(t *testing.T) { }, false}, // Can update phase via status update {api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", DeletionTimestamp: &now}}, api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", DeletionTimestamp: &now}, Status: api.NamespaceStatus{ @@ -7446,20 +7550,20 @@ func TestValidateNamespaceStatusUpdate(t *testing.T) { }, }, true}, {api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo"}}, api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo"}, Status: api.NamespaceStatus{ Phase: api.NamespaceTerminating, }, }, false}, {api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo"}}, api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "bar"}, Status: api.NamespaceStatus{ Phase: api.NamespaceTerminating, @@ -7488,62 +7592,62 @@ func TestValidateNamespaceUpdate(t *testing.T) { }{ {api.Namespace{}, api.Namespace{}, true}, {api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo1"}}, api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "bar1"}, }, false}, {api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo2", Labels: map[string]string{"foo": "bar"}, }, }, api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo2", Labels: map[string]string{"foo": "baz"}, }, }, true}, {api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo3", }, }, api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo3", Labels: map[string]string{"foo": "baz"}, }, }, true}, {api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo4", Labels: map[string]string{"bar": "foo"}, }, }, api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo4", Labels: map[string]string{"foo": "baz"}, }, }, true}, {api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo5", Labels: map[string]string{"foo": "baz"}, }, }, api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo5", Labels: map[string]string{"Foo": "baz"}, }, }, true}, {api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo6", Labels: map[string]string{"foo": "baz"}, }, }, api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo6", Labels: map[string]string{"Foo": "baz"}, }, @@ -7573,7 +7677,7 @@ func TestValidateSecret(t *testing.T) { // Opaque secret validation validSecret := func() api.Secret { return api.Secret{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "bar"}, Data: map[string][]byte{ "data-1": []byte("bar"), }, @@ -7607,7 +7711,7 @@ func TestValidateSecret(t *testing.T) { // kubernetes.io/service-account-token secret validation validServiceAccountTokenSecret := func() api.Secret { return api.Secret{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "bar", Annotations: map[string]string{ @@ -7664,7 +7768,7 @@ func TestValidateSecret(t *testing.T) { func TestValidateDockerConfigSecret(t *testing.T) { validDockerSecret := func() api.Secret { return api.Secret{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "bar"}, Type: api.SecretTypeDockercfg, Data: map[string][]byte{ api.DockerConfigKey: []byte(`{"https://index.docker.io/v1/": {"auth": "Y2x1ZWRyb29sZXIwMDAxOnBhc3N3b3Jk","email": "fake@example.com"}}`), @@ -7673,7 +7777,7 @@ func TestValidateDockerConfigSecret(t *testing.T) { } validDockerSecret2 := func() api.Secret { return api.Secret{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "bar"}, Type: api.SecretTypeDockerConfigJson, Data: map[string][]byte{ api.DockerConfigJsonKey: []byte(`{"auths":{"https://index.docker.io/v1/": {"auth": "Y2x1ZWRyb29sZXIwMDAxOnBhc3N3b3Jk","email": "fake@example.com"}}}`), @@ -7725,7 +7829,7 @@ func TestValidateDockerConfigSecret(t *testing.T) { func TestValidateBasicAuthSecret(t *testing.T) { validBasicAuthSecret := func() api.Secret { return api.Secret{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "bar"}, Type: api.SecretTypeBasicAuth, Data: map[string][]byte{ api.BasicAuthUsernameKey: []byte("username"), @@ -7775,7 +7879,7 @@ func TestValidateBasicAuthSecret(t *testing.T) { func TestValidateSSHAuthSecret(t *testing.T) { validSSHAuthSecret := func() api.Secret { return api.Secret{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "bar"}, Type: api.SecretTypeSSHAuth, Data: map[string][]byte{ api.SSHAuthPrivateKey: []byte("foo-bar-baz"), @@ -7809,7 +7913,7 @@ func TestValidateSSHAuthSecret(t *testing.T) { func TestValidateEndpoints(t *testing.T) { successCases := map[string]api.Endpoints{ "simple endpoint": { - ObjectMeta: api.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, + ObjectMeta: metav1.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "10.10.1.1"}, {IP: "10.10.2.2"}}, @@ -7822,10 +7926,10 @@ func TestValidateEndpoints(t *testing.T) { }, }, "empty subsets": { - ObjectMeta: api.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, + ObjectMeta: metav1.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, }, "no name required for singleton port": { - ObjectMeta: api.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, + ObjectMeta: metav1.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "10.10.1.1"}}, @@ -7847,26 +7951,26 @@ func TestValidateEndpoints(t *testing.T) { errorDetail string }{ "missing namespace": { - endpoints: api.Endpoints{ObjectMeta: api.ObjectMeta{Name: "mysvc"}}, + endpoints: api.Endpoints{ObjectMeta: metav1.ObjectMeta{Name: "mysvc"}}, errorType: "FieldValueRequired", }, "missing name": { - endpoints: api.Endpoints{ObjectMeta: api.ObjectMeta{Namespace: "namespace"}}, + endpoints: api.Endpoints{ObjectMeta: metav1.ObjectMeta{Namespace: "namespace"}}, errorType: "FieldValueRequired", }, "invalid namespace": { - endpoints: api.Endpoints{ObjectMeta: api.ObjectMeta{Name: "mysvc", Namespace: "no@#invalid.;chars\"allowed"}}, + endpoints: api.Endpoints{ObjectMeta: metav1.ObjectMeta{Name: "mysvc", Namespace: "no@#invalid.;chars\"allowed"}}, errorType: "FieldValueInvalid", errorDetail: dnsLabelErrMsg, }, "invalid name": { - endpoints: api.Endpoints{ObjectMeta: api.ObjectMeta{Name: "-_Invliad^&Characters", Namespace: "namespace"}}, + endpoints: api.Endpoints{ObjectMeta: metav1.ObjectMeta{Name: "-_Invliad^&Characters", Namespace: "namespace"}}, errorType: "FieldValueInvalid", errorDetail: dnsSubdomainLabelErrMsg, }, "empty addresses": { endpoints: api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, + ObjectMeta: metav1.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, Subsets: []api.EndpointSubset{ { Ports: []api.EndpointPort{{Name: "a", Port: 93, Protocol: "TCP"}}, @@ -7877,7 +7981,7 @@ func TestValidateEndpoints(t *testing.T) { }, "empty ports": { endpoints: api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, + ObjectMeta: metav1.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "10.10.3.3"}}, @@ -7888,7 +7992,7 @@ func TestValidateEndpoints(t *testing.T) { }, "invalid IP": { endpoints: api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, + ObjectMeta: metav1.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "[2001:0db8:85a3:0042:1000:8a2e:0370:7334]"}}, @@ -7901,7 +8005,7 @@ func TestValidateEndpoints(t *testing.T) { }, "Multiple ports, one without name": { endpoints: api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, + ObjectMeta: metav1.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "10.10.1.1"}}, @@ -7913,7 +8017,7 @@ func TestValidateEndpoints(t *testing.T) { }, "Invalid port number": { endpoints: api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, + ObjectMeta: metav1.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "10.10.1.1"}}, @@ -7926,7 +8030,7 @@ func TestValidateEndpoints(t *testing.T) { }, "Invalid protocol": { endpoints: api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, + ObjectMeta: metav1.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "10.10.1.1"}}, @@ -7938,7 +8042,7 @@ func TestValidateEndpoints(t *testing.T) { }, "Address missing IP": { endpoints: api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, + ObjectMeta: metav1.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{}}, @@ -7951,7 +8055,7 @@ func TestValidateEndpoints(t *testing.T) { }, "Port missing number": { endpoints: api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, + ObjectMeta: metav1.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "10.10.1.1"}}, @@ -7964,7 +8068,7 @@ func TestValidateEndpoints(t *testing.T) { }, "Port missing protocol": { endpoints: api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, + ObjectMeta: metav1.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "10.10.1.1"}}, @@ -7976,7 +8080,7 @@ func TestValidateEndpoints(t *testing.T) { }, "Address is loopback": { endpoints: api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, + ObjectMeta: metav1.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, @@ -7989,7 +8093,7 @@ func TestValidateEndpoints(t *testing.T) { }, "Address is link-local": { endpoints: api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, + ObjectMeta: metav1.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "169.254.169.254"}}, @@ -8002,7 +8106,7 @@ func TestValidateEndpoints(t *testing.T) { }, "Address is link-local multicast": { endpoints: api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, + ObjectMeta: metav1.ObjectMeta{Name: "mysvc", Namespace: "namespace"}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "224.0.0.1"}}, @@ -8025,7 +8129,7 @@ func TestValidateEndpoints(t *testing.T) { func TestValidateTLSSecret(t *testing.T) { successCases := map[string]api.Secret{ "emtpy certificate chain": { - ObjectMeta: api.ObjectMeta{Name: "tls-cert", Namespace: "namespace"}, + ObjectMeta: metav1.ObjectMeta{Name: "tls-cert", Namespace: "namespace"}, Data: map[string][]byte{ api.TLSCertKey: []byte("public key"), api.TLSPrivateKeyKey: []byte("private key"), @@ -8044,7 +8148,7 @@ func TestValidateTLSSecret(t *testing.T) { }{ "missing public key": { secrets: api.Secret{ - ObjectMeta: api.ObjectMeta{Name: "tls-cert"}, + ObjectMeta: metav1.ObjectMeta{Name: "tls-cert"}, Data: map[string][]byte{ api.TLSCertKey: []byte("public key"), }, @@ -8053,7 +8157,7 @@ func TestValidateTLSSecret(t *testing.T) { }, "missing private key": { secrets: api.Secret{ - ObjectMeta: api.ObjectMeta{Name: "tls-cert"}, + ObjectMeta: metav1.ObjectMeta{Name: "tls-cert"}, Data: map[string][]byte{ api.TLSCertKey: []byte("public key"), }, @@ -8188,7 +8292,7 @@ func TestValidPodLogOptions(t *testing.T) { func TestValidateConfigMap(t *testing.T) { newConfigMap := func(name, namespace string, data map[string]string) api.ConfigMap { return api.ConfigMap{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: namespace, }, @@ -8244,7 +8348,7 @@ func TestValidateConfigMap(t *testing.T) { func TestValidateConfigMapUpdate(t *testing.T) { newConfigMap := func(version, name, namespace string, data map[string]string) api.ConfigMap { return api.ConfigMap{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: namespace, ResourceVersion: version, @@ -8290,7 +8394,7 @@ func TestValidateConfigMapUpdate(t *testing.T) { } func TestValidateHasLabel(t *testing.T) { - successCase := api.ObjectMeta{ + successCase := metav1.ObjectMeta{ Name: "123", Namespace: "ns", Labels: map[string]string{ @@ -8302,7 +8406,7 @@ func TestValidateHasLabel(t *testing.T) { t.Errorf("expected success: %v", errs) } - missingCase := api.ObjectMeta{ + missingCase := metav1.ObjectMeta{ Name: "123", Namespace: "ns", Labels: map[string]string{ @@ -8313,7 +8417,7 @@ func TestValidateHasLabel(t *testing.T) { t.Errorf("expected failure") } - wrongValueCase := api.ObjectMeta{ + wrongValueCase := metav1.ObjectMeta{ Name: "123", Namespace: "ns", Labels: map[string]string{ @@ -8416,9 +8520,9 @@ func TestValidateSysctls(t *testing.T) { func newNodeNameEndpoint(nodeName string) *api.Endpoints { ep := &api.Endpoints{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, ResourceVersion: "1", }, Subsets: []api.EndpointSubset{ diff --git a/vendor/k8s.io/kubernetes/pkg/api/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/api/zz_generated.deepcopy.go index 8b7ab3ba..f4ccb1f8 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/pkg/api/zz_generated.deepcopy.go @@ -23,10 +23,10 @@ package api import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" + fields "k8s.io/apimachinery/pkg/fields" labels "k8s.io/apimachinery/pkg/labels" runtime "k8s.io/apimachinery/pkg/runtime" types "k8s.io/apimachinery/pkg/types" - fields "k8s.io/kubernetes/pkg/fields" reflect "reflect" ) @@ -146,6 +146,7 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error { conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodExecOptions, InType: reflect.TypeOf(&PodExecOptions{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodList, InType: reflect.TypeOf(&PodList{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodLogOptions, InType: reflect.TypeOf(&PodLogOptions{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodPortForwardOptions, InType: reflect.TypeOf(&PodPortForwardOptions{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodProxyOptions, InType: reflect.TypeOf(&PodProxyOptions{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodSecurityContext, InType: reflect.TypeOf(&PodSecurityContext{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodSignature, InType: reflect.TypeOf(&PodSignature{})}, @@ -175,6 +176,7 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error { conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ResourceRequirements, InType: reflect.TypeOf(&ResourceRequirements{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_SELinuxOptions, InType: reflect.TypeOf(&SELinuxOptions{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Secret, InType: reflect.TypeOf(&Secret{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_SecretEnvSource, InType: reflect.TypeOf(&SecretEnvSource{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_SecretKeySelector, InType: reflect.TypeOf(&SecretKeySelector{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_SecretList, InType: reflect.TypeOf(&SecretList{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_SecretVolumeSource, InType: reflect.TypeOf(&SecretVolumeSource{})}, @@ -304,8 +306,10 @@ func DeepCopy_api_Binding(in interface{}, out interface{}, c *conversion.Cloner) in := in.(*Binding) out := out.(*Binding) *out = *in - if err := DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } return nil } @@ -319,16 +323,12 @@ func DeepCopy_api_Capabilities(in interface{}, out interface{}, c *conversion.Cl if in.Add != nil { in, out := &in.Add, &out.Add *out = make([]Capability, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.Drop != nil { in, out := &in.Drop, &out.Drop *out = make([]Capability, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } @@ -376,15 +376,15 @@ func DeepCopy_api_ComponentStatus(in interface{}, out interface{}, c *conversion in := in.(*ComponentStatus) out := out.(*ComponentStatus) *out = *in - if err := DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions *out = make([]ComponentCondition, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } @@ -413,8 +413,10 @@ func DeepCopy_api_ConfigMap(in interface{}, out interface{}, c *conversion.Clone in := in.(*ConfigMap) out := out.(*ConfigMap) *out = *in - if err := DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.Data != nil { in, out := &in.Data, &out.Data @@ -432,6 +434,11 @@ func DeepCopy_api_ConfigMapEnvSource(in interface{}, out interface{}, c *convers in := in.(*ConfigMapEnvSource) out := out.(*ConfigMapEnvSource) *out = *in + if in.Optional != nil { + in, out := &in.Optional, &out.Optional + *out = new(bool) + **out = **in + } return nil } } @@ -441,6 +448,11 @@ func DeepCopy_api_ConfigMapKeySelector(in interface{}, out interface{}, c *conve in := in.(*ConfigMapKeySelector) out := out.(*ConfigMapKeySelector) *out = *in + if in.Optional != nil { + in, out := &in.Optional, &out.Optional + *out = new(bool) + **out = **in + } return nil } } @@ -482,6 +494,11 @@ func DeepCopy_api_ConfigMapVolumeSource(in interface{}, out interface{}, c *conv *out = new(int32) **out = **in } + if in.Optional != nil { + in, out := &in.Optional, &out.Optional + *out = new(bool) + **out = **in + } return nil } } @@ -504,9 +521,7 @@ func DeepCopy_api_Container(in interface{}, out interface{}, c *conversion.Clone if in.Ports != nil { in, out := &in.Ports, &out.Ports *out = make([]ContainerPort, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.EnvFrom != nil { in, out := &in.EnvFrom, &out.EnvFrom @@ -532,9 +547,7 @@ func DeepCopy_api_Container(in interface{}, out interface{}, c *conversion.Clone if in.VolumeMounts != nil { in, out := &in.VolumeMounts, &out.VolumeMounts *out = make([]VolumeMount, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.LivenessProbe != nil { in, out := &in.LivenessProbe, &out.LivenessProbe @@ -836,9 +849,7 @@ func DeepCopy_api_EndpointSubset(in interface{}, out interface{}, c *conversion. if in.Ports != nil { in, out := &in.Ports, &out.Ports *out = make([]EndpointPort, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } @@ -849,8 +860,10 @@ func DeepCopy_api_Endpoints(in interface{}, out interface{}, c *conversion.Clone in := in.(*Endpoints) out := out.(*Endpoints) *out = *in - if err := DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.Subsets != nil { in, out := &in.Subsets, &out.Subsets @@ -891,7 +904,16 @@ func DeepCopy_api_EnvFromSource(in interface{}, out interface{}, c *conversion.C if in.ConfigMapRef != nil { in, out := &in.ConfigMapRef, &out.ConfigMapRef *out = new(ConfigMapEnvSource) - **out = **in + if err := DeepCopy_api_ConfigMapEnvSource(*in, *out, c); err != nil { + return err + } + } + if in.SecretRef != nil { + in, out := &in.SecretRef, &out.SecretRef + *out = new(SecretEnvSource) + if err := DeepCopy_api_SecretEnvSource(*in, *out, c); err != nil { + return err + } } return nil } @@ -933,12 +955,16 @@ func DeepCopy_api_EnvVarSource(in interface{}, out interface{}, c *conversion.Cl if in.ConfigMapKeyRef != nil { in, out := &in.ConfigMapKeyRef, &out.ConfigMapKeyRef *out = new(ConfigMapKeySelector) - **out = **in + if err := DeepCopy_api_ConfigMapKeySelector(*in, *out, c); err != nil { + return err + } } if in.SecretKeyRef != nil { in, out := &in.SecretKeyRef, &out.SecretKeyRef *out = new(SecretKeySelector) - **out = **in + if err := DeepCopy_api_SecretKeySelector(*in, *out, c); err != nil { + return err + } } return nil } @@ -949,8 +975,10 @@ func DeepCopy_api_Event(in interface{}, out interface{}, c *conversion.Cloner) e in := in.(*Event) out := out.(*Event) *out = *in - if err := DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } out.FirstTimestamp = in.FirstTimestamp.DeepCopy() out.LastTimestamp = in.LastTimestamp.DeepCopy() @@ -1083,9 +1111,7 @@ func DeepCopy_api_HTTPGetAction(in interface{}, out interface{}, c *conversion.C if in.HTTPHeaders != nil { in, out := &in.HTTPHeaders, &out.HTTPHeaders *out = make([]HTTPHeader, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } @@ -1188,8 +1214,10 @@ func DeepCopy_api_LimitRange(in interface{}, out interface{}, c *conversion.Clon in := in.(*LimitRange) out := out.(*LimitRange) *out = *in - if err := DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_api_LimitRangeSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -1345,9 +1373,7 @@ func DeepCopy_api_LoadBalancerStatus(in interface{}, out interface{}, c *convers if in.Ingress != nil { in, out := &in.Ingress, &out.Ingress *out = make([]LoadBalancerIngress, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } @@ -1376,8 +1402,10 @@ func DeepCopy_api_Namespace(in interface{}, out interface{}, c *conversion.Clone in := in.(*Namespace) out := out.(*Namespace) *out = *in - if err := DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_api_NamespaceSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -1412,9 +1440,7 @@ func DeepCopy_api_NamespaceSpec(in interface{}, out interface{}, c *conversion.C if in.Finalizers != nil { in, out := &in.Finalizers, &out.Finalizers *out = make([]FinalizerName, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } @@ -1434,8 +1460,10 @@ func DeepCopy_api_Node(in interface{}, out interface{}, c *conversion.Cloner) er in := in.(*Node) out := out.(*Node) *out = *in - if err := DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_api_NodeStatus(&in.Status, &out.Status, c); err != nil { return err @@ -1631,9 +1659,7 @@ func DeepCopy_api_NodeStatus(in interface{}, out interface{}, c *conversion.Clon if in.Addresses != nil { in, out := &in.Addresses, &out.Addresses *out = make([]NodeAddress, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.Images != nil { in, out := &in.Images, &out.Images @@ -1647,16 +1673,12 @@ func DeepCopy_api_NodeStatus(in interface{}, out interface{}, c *conversion.Clon if in.VolumesInUse != nil { in, out := &in.VolumesInUse, &out.VolumesInUse *out = make([]UniqueVolumeName, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.VolumesAttached != nil { in, out := &in.VolumesAttached, &out.VolumesAttached *out = make([]AttachedVolume, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } @@ -1744,8 +1766,10 @@ func DeepCopy_api_PersistentVolume(in interface{}, out interface{}, c *conversio in := in.(*PersistentVolume) out := out.(*PersistentVolume) *out = *in - if err := DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_api_PersistentVolumeSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -1759,8 +1783,10 @@ func DeepCopy_api_PersistentVolumeClaim(in interface{}, out interface{}, c *conv in := in.(*PersistentVolumeClaim) out := out.(*PersistentVolumeClaim) *out = *in - if err := DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_api_PersistentVolumeClaimSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -1798,9 +1824,7 @@ func DeepCopy_api_PersistentVolumeClaimSpec(in interface{}, out interface{}, c * if in.AccessModes != nil { in, out := &in.AccessModes, &out.AccessModes *out = make([]PersistentVolumeAccessMode, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.Selector != nil { in, out := &in.Selector, &out.Selector @@ -1825,9 +1849,7 @@ func DeepCopy_api_PersistentVolumeClaimStatus(in interface{}, out interface{}, c if in.AccessModes != nil { in, out := &in.AccessModes, &out.AccessModes *out = make([]PersistentVolumeAccessMode, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.Capacity != nil { in, out := &in.Capacity, &out.Capacity @@ -1989,9 +2011,7 @@ func DeepCopy_api_PersistentVolumeSpec(in interface{}, out interface{}, c *conve if in.AccessModes != nil { in, out := &in.AccessModes, &out.AccessModes *out = make([]PersistentVolumeAccessMode, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.ClaimRef != nil { in, out := &in.ClaimRef, &out.ClaimRef @@ -2025,8 +2045,10 @@ func DeepCopy_api_Pod(in interface{}, out interface{}, c *conversion.Cloner) err in := in.(*Pod) out := out.(*Pod) *out = *in - if err := DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_api_PodSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -2195,6 +2217,20 @@ func DeepCopy_api_PodLogOptions(in interface{}, out interface{}, c *conversion.C } } +func DeepCopy_api_PodPortForwardOptions(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*PodPortForwardOptions) + out := out.(*PodPortForwardOptions) + *out = *in + if in.Ports != nil { + in, out := &in.Ports, &out.Ports + *out = make([]int32, len(*in)) + copy(*out, *in) + } + return nil + } +} + func DeepCopy_api_PodProxyOptions(in interface{}, out interface{}, c *conversion.Cloner) error { { in := in.(*PodProxyOptions) @@ -2314,9 +2350,7 @@ func DeepCopy_api_PodSpec(in interface{}, out interface{}, c *conversion.Cloner) if in.ImagePullSecrets != nil { in, out := &in.ImagePullSecrets, &out.ImagePullSecrets *out = make([]LocalObjectReference, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.Affinity != nil { in, out := &in.Affinity, &out.Affinity @@ -2375,8 +2409,10 @@ func DeepCopy_api_PodStatusResult(in interface{}, out interface{}, c *conversion in := in.(*PodStatusResult) out := out.(*PodStatusResult) *out = *in - if err := DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_api_PodStatus(&in.Status, &out.Status, c); err != nil { return err @@ -2390,8 +2426,10 @@ func DeepCopy_api_PodTemplate(in interface{}, out interface{}, c *conversion.Clo in := in.(*PodTemplate) out := out.(*PodTemplate) *out = *in - if err := DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_api_PodTemplateSpec(&in.Template, &out.Template, c); err != nil { return err @@ -2423,8 +2461,10 @@ func DeepCopy_api_PodTemplateSpec(in interface{}, out interface{}, c *conversion in := in.(*PodTemplateSpec) out := out.(*PodTemplateSpec) *out = *in - if err := DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_api_PodSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -2517,8 +2557,10 @@ func DeepCopy_api_RangeAllocation(in interface{}, out interface{}, c *conversion in := in.(*RangeAllocation) out := out.(*RangeAllocation) *out = *in - if err := DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.Data != nil { in, out := &in.Data, &out.Data @@ -2534,8 +2576,10 @@ func DeepCopy_api_ReplicationController(in interface{}, out interface{}, c *conv in := in.(*ReplicationController) out := out.(*ReplicationController) *out = *in - if err := DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_api_ReplicationControllerSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -2631,8 +2675,10 @@ func DeepCopy_api_ResourceQuota(in interface{}, out interface{}, c *conversion.C in := in.(*ResourceQuota) out := out.(*ResourceQuota) *out = *in - if err := DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_api_ResourceQuotaSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -2677,9 +2723,7 @@ func DeepCopy_api_ResourceQuotaSpec(in interface{}, out interface{}, c *conversi if in.Scopes != nil { in, out := &in.Scopes, &out.Scopes *out = make([]ResourceQuotaScope, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } @@ -2745,8 +2789,10 @@ func DeepCopy_api_Secret(in interface{}, out interface{}, c *conversion.Cloner) in := in.(*Secret) out := out.(*Secret) *out = *in - if err := DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.Data != nil { in, out := &in.Data, &out.Data @@ -2763,11 +2809,30 @@ func DeepCopy_api_Secret(in interface{}, out interface{}, c *conversion.Cloner) } } +func DeepCopy_api_SecretEnvSource(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*SecretEnvSource) + out := out.(*SecretEnvSource) + *out = *in + if in.Optional != nil { + in, out := &in.Optional, &out.Optional + *out = new(bool) + **out = **in + } + return nil + } +} + func DeepCopy_api_SecretKeySelector(in interface{}, out interface{}, c *conversion.Cloner) error { { in := in.(*SecretKeySelector) out := out.(*SecretKeySelector) *out = *in + if in.Optional != nil { + in, out := &in.Optional, &out.Optional + *out = new(bool) + **out = **in + } return nil } } @@ -2809,6 +2874,11 @@ func DeepCopy_api_SecretVolumeSource(in interface{}, out interface{}, c *convers *out = new(int32) **out = **in } + if in.Optional != nil { + in, out := &in.Optional, &out.Optional + *out = new(bool) + **out = **in + } return nil } } @@ -2868,8 +2938,10 @@ func DeepCopy_api_Service(in interface{}, out interface{}, c *conversion.Cloner) in := in.(*Service) out := out.(*Service) *out = *in - if err := DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_api_ServiceSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -2886,22 +2958,20 @@ func DeepCopy_api_ServiceAccount(in interface{}, out interface{}, c *conversion. in := in.(*ServiceAccount) out := out.(*ServiceAccount) *out = *in - if err := DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.Secrets != nil { in, out := &in.Secrets, &out.Secrets *out = make([]ObjectReference, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.ImagePullSecrets != nil { in, out := &in.ImagePullSecrets, &out.ImagePullSecrets *out = make([]LocalObjectReference, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } @@ -2969,9 +3039,7 @@ func DeepCopy_api_ServiceSpec(in interface{}, out interface{}, c *conversion.Clo if in.Ports != nil { in, out := &in.Ports, &out.Ports *out = make([]ServicePort, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.Selector != nil { in, out := &in.Selector, &out.Selector diff --git a/vendor/k8s.io/kubernetes/pkg/apimachinery/.readonly b/vendor/k8s.io/kubernetes/pkg/apimachinery/.readonly deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/k8s.io/kubernetes/pkg/apimachinery/BUILD b/vendor/k8s.io/kubernetes/pkg/apimachinery/BUILD deleted file mode 100644 index 643c3ddc..00000000 --- a/vendor/k8s.io/kubernetes/pkg/apimachinery/BUILD +++ /dev/null @@ -1,49 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "types.go", - ], - tags = ["automanaged"], - deps = [ - "//pkg/api/meta:go_default_library", - "//pkg/runtime:go_default_library", - "//pkg/runtime/schema:go_default_library", - ], -) - -go_test( - name = "go_default_test", - srcs = ["types_test.go"], - library = ":go_default_library", - tags = ["automanaged"], - deps = ["//pkg/runtime/schema:go_default_library"], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//pkg/apimachinery/announced:all-srcs", - "//pkg/apimachinery/registered:all-srcs", - "//pkg/apimachinery/tests:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/vendor/k8s.io/kubernetes/pkg/apimachinery/announced/BUILD b/vendor/k8s.io/kubernetes/pkg/apimachinery/announced/BUILD deleted file mode 100644 index b838c731..00000000 --- a/vendor/k8s.io/kubernetes/pkg/apimachinery/announced/BUILD +++ /dev/null @@ -1,49 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = [ - "announced.go", - "group_factory.go", - ], - tags = ["automanaged"], - deps = [ - "//pkg/api:go_default_library", - "//vendor:github.com/golang/glog", - "//vendor:k8s.io/apimachinery/pkg/api/meta", - "//vendor:k8s.io/apimachinery/pkg/apimachinery", - "//vendor:k8s.io/apimachinery/pkg/apimachinery/registered", - "//vendor:k8s.io/apimachinery/pkg/runtime", - "//vendor:k8s.io/apimachinery/pkg/runtime/schema", - "//vendor:k8s.io/apimachinery/pkg/util/sets", - ], -) - -go_test( - name = "go_default_test", - srcs = ["announced_test.go"], - library = ":go_default_library", - tags = ["automanaged"], - deps = ["//vendor:k8s.io/apimachinery/pkg/util/sets"], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/vendor/k8s.io/kubernetes/pkg/apimachinery/doc.go b/vendor/k8s.io/kubernetes/pkg/apimachinery/doc.go deleted file mode 100644 index 9a40e426..00000000 --- a/vendor/k8s.io/kubernetes/pkg/apimachinery/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Package apimachinery contains the generic API machinery code that -// is common to both server and clients. -// This package should never import specific API objects. -package apimachinery // import "k8s.io/kubernetes/pkg/apimachinery" diff --git a/vendor/k8s.io/kubernetes/pkg/apimachinery/registered/.readonly b/vendor/k8s.io/kubernetes/pkg/apimachinery/registered/.readonly deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/k8s.io/kubernetes/pkg/apimachinery/registered/BUILD b/vendor/k8s.io/kubernetes/pkg/apimachinery/registered/BUILD deleted file mode 100644 index def8f899..00000000 --- a/vendor/k8s.io/kubernetes/pkg/apimachinery/registered/BUILD +++ /dev/null @@ -1,46 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = ["registered.go"], - tags = ["automanaged"], - deps = [ - "//pkg/api/meta:go_default_library", - "//pkg/apimachinery:go_default_library", - "//pkg/runtime/schema:go_default_library", - "//pkg/util/sets:go_default_library", - "//vendor:github.com/golang/glog", - ], -) - -go_test( - name = "go_default_test", - srcs = ["registered_test.go"], - library = ":go_default_library", - tags = ["automanaged"], - deps = [ - "//pkg/apimachinery:go_default_library", - "//pkg/runtime/schema:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/vendor/k8s.io/kubernetes/pkg/apimachinery/registered/registered.go b/vendor/k8s.io/kubernetes/pkg/apimachinery/registered/registered.go deleted file mode 100644 index 7baebcd6..00000000 --- a/vendor/k8s.io/kubernetes/pkg/apimachinery/registered/registered.go +++ /dev/null @@ -1,403 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Package to keep track of API Versions that can be registered and are enabled in api.Scheme. -package registered - -import ( - "fmt" - "os" - "sort" - "strings" - - "github.com/golang/glog" - - "k8s.io/kubernetes/pkg/api/meta" - "k8s.io/kubernetes/pkg/apimachinery" - "k8s.io/kubernetes/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/util/sets" -) - -var ( - DefaultAPIRegistrationManager = NewOrDie(os.Getenv("KUBE_API_VERSIONS")) -) - -// APIRegistrationManager provides the concept of what API groups are enabled. -// -// TODO: currently, it also provides a "registered" concept. But it's wrong to -// have both concepts in the same object. Therefore the "announced" package is -// going to take over the registered concept. After all the install packages -// are switched to using the announce package instead of this package, then we -// can combine the registered/enabled concepts in this object. Simplifying this -// isn't easy right now because there are so many callers of this package. -type APIRegistrationManager struct { - // registeredGroupVersions stores all API group versions for which RegisterGroup is called. - registeredVersions map[schema.GroupVersion]struct{} - - // thirdPartyGroupVersions are API versions which are dynamically - // registered (and unregistered) via API calls to the apiserver - thirdPartyGroupVersions []schema.GroupVersion - - // enabledVersions represents all enabled API versions. It should be a - // subset of registeredVersions. Please call EnableVersions() to add - // enabled versions. - enabledVersions map[schema.GroupVersion]struct{} - - // map of group meta for all groups. - groupMetaMap map[string]*apimachinery.GroupMeta - - // envRequestedVersions represents the versions requested via the - // KUBE_API_VERSIONS environment variable. The install package of each group - // checks this list before add their versions to the latest package and - // Scheme. This list is small and order matters, so represent as a slice - envRequestedVersions []schema.GroupVersion -} - -// NewAPIRegistrationManager constructs a new manager. The argument ought to be -// the value of the KUBE_API_VERSIONS env var, or a value of this which you -// wish to test. -func NewAPIRegistrationManager(kubeAPIVersions string) (*APIRegistrationManager, error) { - m := &APIRegistrationManager{ - registeredVersions: map[schema.GroupVersion]struct{}{}, - thirdPartyGroupVersions: []schema.GroupVersion{}, - enabledVersions: map[schema.GroupVersion]struct{}{}, - groupMetaMap: map[string]*apimachinery.GroupMeta{}, - envRequestedVersions: []schema.GroupVersion{}, - } - - if len(kubeAPIVersions) != 0 { - for _, version := range strings.Split(kubeAPIVersions, ",") { - gv, err := schema.ParseGroupVersion(version) - if err != nil { - return nil, fmt.Errorf("invalid api version: %s in KUBE_API_VERSIONS: %s.", - version, kubeAPIVersions) - } - m.envRequestedVersions = append(m.envRequestedVersions, gv) - } - } - return m, nil -} - -func NewOrDie(kubeAPIVersions string) *APIRegistrationManager { - m, err := NewAPIRegistrationManager(kubeAPIVersions) - if err != nil { - glog.Fatalf("Could not construct version manager: %v (KUBE_API_VERSIONS=%q)", err, kubeAPIVersions) - } - return m -} - -// People are calling global functions. Let them continue to do that (for now). -var ( - ValidateEnvRequestedVersions = DefaultAPIRegistrationManager.ValidateEnvRequestedVersions - AllPreferredGroupVersions = DefaultAPIRegistrationManager.AllPreferredGroupVersions - RESTMapper = DefaultAPIRegistrationManager.RESTMapper - GroupOrDie = DefaultAPIRegistrationManager.GroupOrDie - AddThirdPartyAPIGroupVersions = DefaultAPIRegistrationManager.AddThirdPartyAPIGroupVersions - IsThirdPartyAPIGroupVersion = DefaultAPIRegistrationManager.IsThirdPartyAPIGroupVersion - RegisteredGroupVersions = DefaultAPIRegistrationManager.RegisteredGroupVersions - IsRegisteredVersion = DefaultAPIRegistrationManager.IsRegisteredVersion - IsRegistered = DefaultAPIRegistrationManager.IsRegistered - Group = DefaultAPIRegistrationManager.Group - EnabledVersionsForGroup = DefaultAPIRegistrationManager.EnabledVersionsForGroup - EnabledVersions = DefaultAPIRegistrationManager.EnabledVersions - IsEnabledVersion = DefaultAPIRegistrationManager.IsEnabledVersion - IsAllowedVersion = DefaultAPIRegistrationManager.IsAllowedVersion - EnableVersions = DefaultAPIRegistrationManager.EnableVersions - RegisterGroup = DefaultAPIRegistrationManager.RegisterGroup - RegisterVersions = DefaultAPIRegistrationManager.RegisterVersions - InterfacesFor = DefaultAPIRegistrationManager.InterfacesFor -) - -// RegisterVersions adds the given group versions to the list of registered group versions. -func (m *APIRegistrationManager) RegisterVersions(availableVersions []schema.GroupVersion) { - for _, v := range availableVersions { - m.registeredVersions[v] = struct{}{} - } -} - -// RegisterGroup adds the given group to the list of registered groups. -func (m *APIRegistrationManager) RegisterGroup(groupMeta apimachinery.GroupMeta) error { - groupName := groupMeta.GroupVersion.Group - if _, found := m.groupMetaMap[groupName]; found { - return fmt.Errorf("group %v is already registered", m.groupMetaMap) - } - m.groupMetaMap[groupName] = &groupMeta - return nil -} - -// EnableVersions adds the versions for the given group to the list of enabled versions. -// Note that the caller should call RegisterGroup before calling this method. -// The caller of this function is responsible to add the versions to scheme and RESTMapper. -func (m *APIRegistrationManager) EnableVersions(versions ...schema.GroupVersion) error { - var unregisteredVersions []schema.GroupVersion - for _, v := range versions { - if _, found := m.registeredVersions[v]; !found { - unregisteredVersions = append(unregisteredVersions, v) - } - m.enabledVersions[v] = struct{}{} - } - if len(unregisteredVersions) != 0 { - return fmt.Errorf("Please register versions before enabling them: %v", unregisteredVersions) - } - return nil -} - -// IsAllowedVersion returns if the version is allowed by the KUBE_API_VERSIONS -// environment variable. If the environment variable is empty, then it always -// returns true. -func (m *APIRegistrationManager) IsAllowedVersion(v schema.GroupVersion) bool { - if len(m.envRequestedVersions) == 0 { - return true - } - for _, envGV := range m.envRequestedVersions { - if v == envGV { - return true - } - } - return false -} - -// IsEnabledVersion returns if a version is enabled. -func (m *APIRegistrationManager) IsEnabledVersion(v schema.GroupVersion) bool { - _, found := m.enabledVersions[v] - return found -} - -// EnabledVersions returns all enabled versions. Groups are randomly ordered, but versions within groups -// are priority order from best to worst -func (m *APIRegistrationManager) EnabledVersions() []schema.GroupVersion { - ret := []schema.GroupVersion{} - for _, groupMeta := range m.groupMetaMap { - for _, version := range groupMeta.GroupVersions { - if m.IsEnabledVersion(version) { - ret = append(ret, version) - } - } - } - return ret -} - -// EnabledVersionsForGroup returns all enabled versions for a group in order of best to worst -func (m *APIRegistrationManager) EnabledVersionsForGroup(group string) []schema.GroupVersion { - groupMeta, ok := m.groupMetaMap[group] - if !ok { - return []schema.GroupVersion{} - } - - ret := []schema.GroupVersion{} - for _, version := range groupMeta.GroupVersions { - if m.IsEnabledVersion(version) { - ret = append(ret, version) - } - } - return ret -} - -// Group returns the metadata of a group if the group is registered, otherwise -// an error is returned. -func (m *APIRegistrationManager) Group(group string) (*apimachinery.GroupMeta, error) { - groupMeta, found := m.groupMetaMap[group] - if !found { - return nil, fmt.Errorf("group %v has not been registered", group) - } - groupMetaCopy := *groupMeta - return &groupMetaCopy, nil -} - -// IsRegistered takes a string and determines if it's one of the registered groups -func (m *APIRegistrationManager) IsRegistered(group string) bool { - _, found := m.groupMetaMap[group] - return found -} - -// IsRegisteredVersion returns if a version is registered. -func (m *APIRegistrationManager) IsRegisteredVersion(v schema.GroupVersion) bool { - _, found := m.registeredVersions[v] - return found -} - -// RegisteredGroupVersions returns all registered group versions. -func (m *APIRegistrationManager) RegisteredGroupVersions() []schema.GroupVersion { - ret := []schema.GroupVersion{} - for groupVersion := range m.registeredVersions { - ret = append(ret, groupVersion) - } - return ret -} - -// IsThirdPartyAPIGroupVersion returns true if the api version is a user-registered group/version. -func (m *APIRegistrationManager) IsThirdPartyAPIGroupVersion(gv schema.GroupVersion) bool { - for ix := range m.thirdPartyGroupVersions { - if m.thirdPartyGroupVersions[ix] == gv { - return true - } - } - return false -} - -// AddThirdPartyAPIGroupVersions sets the list of third party versions, -// registers them in the API machinery and enables them. -// Skips GroupVersions that are already registered. -// Returns the list of GroupVersions that were skipped. -func (m *APIRegistrationManager) AddThirdPartyAPIGroupVersions(gvs ...schema.GroupVersion) []schema.GroupVersion { - filteredGVs := []schema.GroupVersion{} - skippedGVs := []schema.GroupVersion{} - for ix := range gvs { - if !m.IsRegisteredVersion(gvs[ix]) { - filteredGVs = append(filteredGVs, gvs[ix]) - } else { - glog.V(3).Infof("Skipping %s, because its already registered", gvs[ix].String()) - skippedGVs = append(skippedGVs, gvs[ix]) - } - } - if len(filteredGVs) == 0 { - return skippedGVs - } - m.RegisterVersions(filteredGVs) - m.EnableVersions(filteredGVs...) - m.thirdPartyGroupVersions = append(m.thirdPartyGroupVersions, filteredGVs...) - - return skippedGVs -} - -// InterfacesFor is a union meta.VersionInterfacesFunc func for all registered types -func (m *APIRegistrationManager) InterfacesFor(version schema.GroupVersion) (*meta.VersionInterfaces, error) { - groupMeta, err := m.Group(version.Group) - if err != nil { - return nil, err - } - return groupMeta.InterfacesFor(version) -} - -// TODO: This is an expedient function, because we don't check if a Group is -// supported throughout the code base. We will abandon this function and -// checking the error returned by the Group() function. -func (m *APIRegistrationManager) GroupOrDie(group string) *apimachinery.GroupMeta { - groupMeta, found := m.groupMetaMap[group] - if !found { - if group == "" { - panic("The legacy v1 API is not registered.") - } else { - panic(fmt.Sprintf("Group %s is not registered.", group)) - } - } - groupMetaCopy := *groupMeta - return &groupMetaCopy -} - -// RESTMapper returns a union RESTMapper of all known types with priorities chosen in the following order: -// 1. if KUBE_API_VERSIONS is specified, then KUBE_API_VERSIONS in order, OR -// 1. legacy kube group preferred version, extensions preferred version, metrics perferred version, legacy -// kube any version, extensions any version, metrics any version, all other groups alphabetical preferred version, -// all other groups alphabetical. -func (m *APIRegistrationManager) RESTMapper(versionPatterns ...schema.GroupVersion) meta.RESTMapper { - unionMapper := meta.MultiRESTMapper{} - unionedGroups := sets.NewString() - for enabledVersion := range m.enabledVersions { - if !unionedGroups.Has(enabledVersion.Group) { - unionedGroups.Insert(enabledVersion.Group) - groupMeta := m.groupMetaMap[enabledVersion.Group] - unionMapper = append(unionMapper, groupMeta.RESTMapper) - } - } - - if len(versionPatterns) != 0 { - resourcePriority := []schema.GroupVersionResource{} - kindPriority := []schema.GroupVersionKind{} - for _, versionPriority := range versionPatterns { - resourcePriority = append(resourcePriority, versionPriority.WithResource(meta.AnyResource)) - kindPriority = append(kindPriority, versionPriority.WithKind(meta.AnyKind)) - } - - return meta.PriorityRESTMapper{Delegate: unionMapper, ResourcePriority: resourcePriority, KindPriority: kindPriority} - } - - if len(m.envRequestedVersions) != 0 { - resourcePriority := []schema.GroupVersionResource{} - kindPriority := []schema.GroupVersionKind{} - - for _, versionPriority := range m.envRequestedVersions { - resourcePriority = append(resourcePriority, versionPriority.WithResource(meta.AnyResource)) - kindPriority = append(kindPriority, versionPriority.WithKind(meta.AnyKind)) - } - - return meta.PriorityRESTMapper{Delegate: unionMapper, ResourcePriority: resourcePriority, KindPriority: kindPriority} - } - - prioritizedGroups := []string{"", "extensions", "metrics"} - resourcePriority, kindPriority := m.prioritiesForGroups(prioritizedGroups...) - - prioritizedGroupsSet := sets.NewString(prioritizedGroups...) - remainingGroups := sets.String{} - for enabledVersion := range m.enabledVersions { - if !prioritizedGroupsSet.Has(enabledVersion.Group) { - remainingGroups.Insert(enabledVersion.Group) - } - } - - remainingResourcePriority, remainingKindPriority := m.prioritiesForGroups(remainingGroups.List()...) - resourcePriority = append(resourcePriority, remainingResourcePriority...) - kindPriority = append(kindPriority, remainingKindPriority...) - - return meta.PriorityRESTMapper{Delegate: unionMapper, ResourcePriority: resourcePriority, KindPriority: kindPriority} -} - -// prioritiesForGroups returns the resource and kind priorities for a PriorityRESTMapper, preferring the preferred version of each group first, -// then any non-preferred version of the group second. -func (m *APIRegistrationManager) prioritiesForGroups(groups ...string) ([]schema.GroupVersionResource, []schema.GroupVersionKind) { - resourcePriority := []schema.GroupVersionResource{} - kindPriority := []schema.GroupVersionKind{} - - for _, group := range groups { - availableVersions := m.EnabledVersionsForGroup(group) - if len(availableVersions) > 0 { - resourcePriority = append(resourcePriority, availableVersions[0].WithResource(meta.AnyResource)) - kindPriority = append(kindPriority, availableVersions[0].WithKind(meta.AnyKind)) - } - } - for _, group := range groups { - resourcePriority = append(resourcePriority, schema.GroupVersionResource{Group: group, Version: meta.AnyVersion, Resource: meta.AnyResource}) - kindPriority = append(kindPriority, schema.GroupVersionKind{Group: group, Version: meta.AnyVersion, Kind: meta.AnyKind}) - } - - return resourcePriority, kindPriority -} - -// AllPreferredGroupVersions returns the preferred versions of all registered -// groups in the form of "group1/version1,group2/version2,..." -func (m *APIRegistrationManager) AllPreferredGroupVersions() string { - if len(m.groupMetaMap) == 0 { - return "" - } - var defaults []string - for _, groupMeta := range m.groupMetaMap { - defaults = append(defaults, groupMeta.GroupVersion.String()) - } - sort.Strings(defaults) - return strings.Join(defaults, ",") -} - -// ValidateEnvRequestedVersions returns a list of versions that are requested in -// the KUBE_API_VERSIONS environment variable, but not enabled. -func (m *APIRegistrationManager) ValidateEnvRequestedVersions() []schema.GroupVersion { - var missingVersions []schema.GroupVersion - for _, v := range m.envRequestedVersions { - if _, found := m.enabledVersions[v]; !found { - missingVersions = append(missingVersions, v) - } - } - return missingVersions -} diff --git a/vendor/k8s.io/kubernetes/pkg/apimachinery/registered/registered_test.go b/vendor/k8s.io/kubernetes/pkg/apimachinery/registered/registered_test.go deleted file mode 100644 index c6b68925..00000000 --- a/vendor/k8s.io/kubernetes/pkg/apimachinery/registered/registered_test.go +++ /dev/null @@ -1,148 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package registered - -import ( - "testing" - - "k8s.io/kubernetes/pkg/apimachinery" - "k8s.io/kubernetes/pkg/runtime/schema" -) - -func TestAddThirdPartyVersionsBasic(t *testing.T) { - m, err := NewAPIRegistrationManager("") - if err != nil { - t.Fatalf("Unexpected failure to make a manager: %v", err) - } - - registered := []schema.GroupVersion{ - { - Group: "", - Version: "v1", - }, - } - skipped := registered - thirdParty := []schema.GroupVersion{ - { - Group: "company.com", - Version: "v1", - }, - { - Group: "company.com", - Version: "v2", - }, - } - gvs := append(registered, thirdParty...) - - m.RegisterVersions(registered) - wasSkipped := m.AddThirdPartyAPIGroupVersions(gvs...) - if len(wasSkipped) != len(skipped) { - t.Errorf("Expected %v, found %v", skipped, wasSkipped) - } - for ix := range wasSkipped { - found := false - for _, gv := range skipped { - if gv.String() == wasSkipped[ix].String() { - found = true - break - } - } - if !found { - t.Errorf("Couldn't find %v in %v", wasSkipped[ix], skipped) - } - } - for _, gv := range thirdParty { - if !m.IsThirdPartyAPIGroupVersion(gv) { - t.Errorf("Expected %v to be third party.", gv) - } - } -} - -func TestAddThirdPartyVersionsMultiple(t *testing.T) { - thirdParty := []schema.GroupVersion{ - { - Group: "company.com", - Version: "v1", - }, - { - Group: "company.com", - Version: "v2", - }, - } - m, err := NewAPIRegistrationManager("") - if err != nil { - t.Fatalf("Unexpected failure to make a manager: %v", err) - } - for _, gv := range thirdParty { - wasSkipped := m.AddThirdPartyAPIGroupVersions(gv) - if len(wasSkipped) != 0 { - t.Errorf("Expected length 0, found %v", wasSkipped) - } - } - for _, gv := range thirdParty { - if !m.IsThirdPartyAPIGroupVersion(gv) { - t.Errorf("Expected %v to be third party.", gv) - } - } -} - -func TestAllPreferredGroupVersions(t *testing.T) { - testCases := []struct { - groupMetas []apimachinery.GroupMeta - expect string - }{ - { - groupMetas: []apimachinery.GroupMeta{ - { - GroupVersion: schema.GroupVersion{Group: "group1", Version: "v1"}, - }, - { - GroupVersion: schema.GroupVersion{Group: "group2", Version: "v2"}, - }, - { - GroupVersion: schema.GroupVersion{Group: "", Version: "v1"}, - }, - }, - expect: "group1/v1,group2/v2,v1", - }, - { - groupMetas: []apimachinery.GroupMeta{ - { - GroupVersion: schema.GroupVersion{Group: "", Version: "v1"}, - }, - }, - expect: "v1", - }, - { - groupMetas: []apimachinery.GroupMeta{}, - expect: "", - }, - } - for _, testCase := range testCases { - m, err := NewAPIRegistrationManager("") - if err != nil { - t.Fatalf("Unexpected failure to make a manager: %v", err) - } - for _, groupMeta := range testCase.groupMetas { - m.RegisterGroup(groupMeta) - } - output := m.AllPreferredGroupVersions() - if testCase.expect != output { - t.Errorf("Error. expect: %s, got: %s", testCase.expect, output) - } - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/apimachinery/tests/api_meta_help_test.go b/vendor/k8s.io/kubernetes/pkg/apimachinery/tests/api_meta_help_test.go index 58602fe1..4f690c6b 100644 --- a/vendor/k8s.io/kubernetes/pkg/apimachinery/tests/api_meta_help_test.go +++ b/vendor/k8s.io/kubernetes/pkg/apimachinery/tests/api_meta_help_test.go @@ -21,6 +21,7 @@ import ( "testing" "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" @@ -48,34 +49,34 @@ func TestIsList(t *testing.T) { func TestExtractList(t *testing.T) { list1 := []runtime.Object{ - &api.Pod{ObjectMeta: api.ObjectMeta{Name: "1"}}, - &api.Service{ObjectMeta: api.ObjectMeta{Name: "2"}}, + &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "1"}}, + &api.Service{ObjectMeta: metav1.ObjectMeta{Name: "2"}}, } list2 := &v1.List{ Items: []runtime.RawExtension{ {Raw: []byte("foo")}, {Raw: []byte("bar")}, - {Object: &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "other"}}}, + {Object: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "other"}}}, }, } list3 := &fakePtrValueList{ Items: []*api.Pod{ - {ObjectMeta: api.ObjectMeta{Name: "1"}}, - {ObjectMeta: api.ObjectMeta{Name: "2"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "1"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "2"}}, }, } list4 := &api.PodList{ Items: []api.Pod{ - {ObjectMeta: api.ObjectMeta{Name: "1"}}, - {ObjectMeta: api.ObjectMeta{Name: "2"}}, - {ObjectMeta: api.ObjectMeta{Name: "3"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "1"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "2"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "3"}}, }, } list5 := &v1.PodList{ Items: []v1.Pod{ - {ObjectMeta: v1.ObjectMeta{Name: "1"}}, - {ObjectMeta: v1.ObjectMeta{Name: "2"}}, - {ObjectMeta: v1.ObjectMeta{Name: "3"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "1"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "2"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "3"}}, }, } @@ -141,34 +142,34 @@ func TestExtractList(t *testing.T) { func TestEachListItem(t *testing.T) { list1 := []runtime.Object{ - &api.Pod{ObjectMeta: api.ObjectMeta{Name: "1"}}, - &api.Service{ObjectMeta: api.ObjectMeta{Name: "2"}}, + &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "1"}}, + &api.Service{ObjectMeta: metav1.ObjectMeta{Name: "2"}}, } list2 := &v1.List{ Items: []runtime.RawExtension{ {Raw: []byte("foo")}, {Raw: []byte("bar")}, - {Object: &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "other"}}}, + {Object: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "other"}}}, }, } list3 := &fakePtrValueList{ Items: []*api.Pod{ - {ObjectMeta: api.ObjectMeta{Name: "1"}}, - {ObjectMeta: api.ObjectMeta{Name: "2"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "1"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "2"}}, }, } list4 := &api.PodList{ Items: []api.Pod{ - {ObjectMeta: api.ObjectMeta{Name: "1"}}, - {ObjectMeta: api.ObjectMeta{Name: "2"}}, - {ObjectMeta: api.ObjectMeta{Name: "3"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "1"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "2"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "3"}}, }, } list5 := &v1.PodList{ Items: []v1.Pod{ - {ObjectMeta: v1.ObjectMeta{Name: "1"}}, - {ObjectMeta: v1.ObjectMeta{Name: "2"}}, - {ObjectMeta: v1.ObjectMeta{Name: "3"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "1"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "2"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "3"}}, }, } @@ -261,9 +262,9 @@ func (obj fakePtrValueList) GetObjectKind() schema.ObjectKind { func TestSetList(t *testing.T) { pl := &api.PodList{} list := []runtime.Object{ - &api.Pod{ObjectMeta: api.ObjectMeta{Name: "1"}}, - &api.Pod{ObjectMeta: api.ObjectMeta{Name: "2"}}, - &api.Pod{ObjectMeta: api.ObjectMeta{Name: "3"}}, + &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "1"}}, + &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "2"}}, + &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "3"}}, } err := meta.SetList(pl, list) if err != nil { @@ -282,9 +283,9 @@ func TestSetList(t *testing.T) { func TestSetListToRuntimeObjectArray(t *testing.T) { pl := &api.List{} list := []runtime.Object{ - &api.Pod{ObjectMeta: api.ObjectMeta{Name: "1"}}, - &api.Pod{ObjectMeta: api.ObjectMeta{Name: "2"}}, - &api.Pod{ObjectMeta: api.ObjectMeta{Name: "3"}}, + &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "1"}}, + &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "2"}}, + &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "3"}}, } err := meta.SetList(pl, list) if err != nil { diff --git a/vendor/k8s.io/kubernetes/pkg/apimachinery/tests/api_meta_meta_test.go b/vendor/k8s.io/kubernetes/pkg/apimachinery/tests/api_meta_meta_test.go index d7d39587..f0489fc0 100644 --- a/vendor/k8s.io/kubernetes/pkg/apimachinery/tests/api_meta_meta_test.go +++ b/vendor/k8s.io/kubernetes/pkg/apimachinery/tests/api_meta_meta_test.go @@ -28,13 +28,12 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/api/v1" ) func TestAPIObjectMeta(t *testing.T) { j := &api.Pod{ TypeMeta: metav1.TypeMeta{APIVersion: "/a", Kind: "b"}, - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "bar", Name: "foo", GenerateName: "prefix", @@ -49,13 +48,13 @@ func TestAPIObjectMeta(t *testing.T) { }, }, } - var _ meta.Object = &j.ObjectMeta - var _ meta.ObjectMetaAccessor = j + var _ metav1.Object = &j.ObjectMeta + var _ metav1.ObjectMetaAccessor = j accessor, err := meta.Accessor(j) if err != nil { t.Fatalf("unexpected error: %v", err) } - if accessor != meta.Object(j) { + if accessor != metav1.Object(j) { t.Fatalf("should have returned the same pointer: %#v\n\n%#v", accessor, j) } if e, a := "bar", accessor.GetNamespace(); e != a { @@ -333,7 +332,7 @@ func TestTypeMetaSelfLinker(t *testing.T) { type MyAPIObject2 struct { metav1.TypeMeta - v1.ObjectMeta + metav1.ObjectMeta } func getObjectMetaAndOwnerRefereneces() (myAPIObject2 MyAPIObject2, metaOwnerReferences []metav1.OwnerReference) { @@ -396,7 +395,7 @@ func TestAccessOwnerReferences(t *testing.T) { func BenchmarkAccessorSetFastPath(b *testing.B) { obj := &api.Pod{ TypeMeta: metav1.TypeMeta{APIVersion: "/a", Kind: "b"}, - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "bar", Name: "foo", GenerateName: "prefix", diff --git a/vendor/k8s.io/kubernetes/pkg/apimachinery/tests/apis_meta_v1_unstructed_unstructure_test.go b/vendor/k8s.io/kubernetes/pkg/apimachinery/tests/apis_meta_v1_unstructed_unstructure_test.go index ba5ad0ce..ac74def8 100644 --- a/vendor/k8s.io/kubernetes/pkg/apimachinery/tests/apis_meta_v1_unstructed_unstructure_test.go +++ b/vendor/k8s.io/kubernetes/pkg/apimachinery/tests/apis_meta_v1_unstructed_unstructure_test.go @@ -37,7 +37,7 @@ func TestDecodeUnstructured(t *testing.T) { rawJson := fmt.Sprintf(`{"kind":"Pod","apiVersion":"%s","metadata":{"name":"test"}}`, groupVersionString) pl := &api.List{ Items: []runtime.Object{ - &api.Pod{ObjectMeta: api.ObjectMeta{Name: "1"}}, + &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "1"}}, &runtime.Unknown{ TypeMeta: runtime.TypeMeta{Kind: "Pod", APIVersion: groupVersionString}, Raw: []byte(rawJson), diff --git a/vendor/k8s.io/kubernetes/pkg/apimachinery/tests/runtime_helper_test.go b/vendor/k8s.io/kubernetes/pkg/apimachinery/tests/runtime_helper_test.go index d30ae1d0..e83d1167 100644 --- a/vendor/k8s.io/kubernetes/pkg/apimachinery/tests/runtime_helper_test.go +++ b/vendor/k8s.io/kubernetes/pkg/apimachinery/tests/runtime_helper_test.go @@ -19,6 +19,7 @@ package tests import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" @@ -27,7 +28,7 @@ import ( func TestDecodeList(t *testing.T) { pl := &api.List{ Items: []runtime.Object{ - &api.Pod{ObjectMeta: api.ObjectMeta{Name: "1"}}, + &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "1"}}, &runtime.Unknown{ TypeMeta: runtime.TypeMeta{Kind: "Pod", APIVersion: api.Registry.GroupOrDie(api.GroupName).GroupVersion.String()}, Raw: []byte(`{"kind":"Pod","apiVersion":"` + api.Registry.GroupOrDie(api.GroupName).GroupVersion.String() + `","metadata":{"name":"test"}}`), diff --git a/vendor/k8s.io/kubernetes/pkg/apimachinery/tests/runtime_serializer_protobuf_protobuf_test.go b/vendor/k8s.io/kubernetes/pkg/apimachinery/tests/runtime_serializer_protobuf_protobuf_test.go index 01ad63bd..87ff6802 100644 --- a/vendor/k8s.io/kubernetes/pkg/apimachinery/tests/runtime_serializer_protobuf_protobuf_test.go +++ b/vendor/k8s.io/kubernetes/pkg/apimachinery/tests/runtime_serializer_protobuf_protobuf_test.go @@ -24,6 +24,7 @@ import ( "strings" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/runtime/serializer/protobuf" @@ -273,7 +274,7 @@ func TestProtobufDecode(t *testing.T) { func TestDecodeObjects(t *testing.T) { obj1 := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "cool", }, Spec: v1.PodSpec{ diff --git a/vendor/k8s.io/kubernetes/pkg/apimachinery/types.go b/vendor/k8s.io/kubernetes/pkg/apimachinery/types.go deleted file mode 100644 index 3790b344..00000000 --- a/vendor/k8s.io/kubernetes/pkg/apimachinery/types.go +++ /dev/null @@ -1,87 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package apimachinery - -import ( - "fmt" - - "k8s.io/kubernetes/pkg/api/meta" - "k8s.io/kubernetes/pkg/runtime" - "k8s.io/kubernetes/pkg/runtime/schema" -) - -// GroupMeta stores the metadata of a group. -type GroupMeta struct { - // GroupVersion represents the preferred version of the group. - GroupVersion schema.GroupVersion - - // GroupVersions is Group + all versions in that group. - GroupVersions []schema.GroupVersion - - // SelfLinker can set or get the SelfLink field of all API types. - // TODO: when versioning changes, make this part of each API definition. - // TODO(lavalamp): Combine SelfLinker & ResourceVersioner interfaces, force all uses - // to go through the InterfacesFor method below. - SelfLinker runtime.SelfLinker - - // RESTMapper provides the default mapping between REST paths and the objects declared in api.Scheme and all known - // versions. - RESTMapper meta.RESTMapper - - // InterfacesFor returns the default Codec and ResourceVersioner for a given version - // string, or an error if the version is not known. - // TODO: make this stop being a func pointer and always use the default - // function provided below once every place that populates this field has been changed. - InterfacesFor func(version schema.GroupVersion) (*meta.VersionInterfaces, error) - - // InterfacesByVersion stores the per-version interfaces. - InterfacesByVersion map[schema.GroupVersion]*meta.VersionInterfaces -} - -// DefaultInterfacesFor returns the default Codec and ResourceVersioner for a given version -// string, or an error if the version is not known. -// TODO: Remove the "Default" prefix. -func (gm *GroupMeta) DefaultInterfacesFor(version schema.GroupVersion) (*meta.VersionInterfaces, error) { - if v, ok := gm.InterfacesByVersion[version]; ok { - return v, nil - } - return nil, fmt.Errorf("unsupported storage version: %s (valid: %v)", version, gm.GroupVersions) -} - -// AddVersionInterfaces adds the given version to the group. Only call during -// init, after that GroupMeta objects should be immutable. Not thread safe. -// (If you use this, be sure to set .InterfacesFor = .DefaultInterfacesFor) -// TODO: remove the "Interfaces" suffix and make this also maintain the -// .GroupVersions member. -func (gm *GroupMeta) AddVersionInterfaces(version schema.GroupVersion, interfaces *meta.VersionInterfaces) error { - if e, a := gm.GroupVersion.Group, version.Group; a != e { - return fmt.Errorf("got a version in group %v, but am in group %v", a, e) - } - if gm.InterfacesByVersion == nil { - gm.InterfacesByVersion = make(map[schema.GroupVersion]*meta.VersionInterfaces) - } - gm.InterfacesByVersion[version] = interfaces - - // TODO: refactor to make the below error not possible, this function - // should *set* GroupVersions rather than depend on it. - for _, v := range gm.GroupVersions { - if v == version { - return nil - } - } - return fmt.Errorf("added a version interface without the corresponding version %v being in the list %#v", version, gm.GroupVersions) -} diff --git a/vendor/k8s.io/kubernetes/pkg/apimachinery/types_test.go b/vendor/k8s.io/kubernetes/pkg/apimachinery/types_test.go deleted file mode 100644 index bfaf6b77..00000000 --- a/vendor/k8s.io/kubernetes/pkg/apimachinery/types_test.go +++ /dev/null @@ -1,43 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package apimachinery - -import ( - "testing" - - "k8s.io/kubernetes/pkg/runtime/schema" -) - -func TestAdd(t *testing.T) { - gm := GroupMeta{ - GroupVersion: schema.GroupVersion{ - Group: "test", - Version: "v1", - }, - GroupVersions: []schema.GroupVersion{{Group: "test", Version: "v1"}}, - } - - gm.AddVersionInterfaces(schema.GroupVersion{Group: "test", Version: "v1"}, nil) - if e, a := 1, len(gm.InterfacesByVersion); e != a { - t.Errorf("expected %v, got %v", e, a) - } - - // GroupVersions is unchanged - if e, a := 1, len(gm.GroupVersions); e != a { - t.Errorf("expected %v, got %v", e, a) - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/apis/OWNERS b/vendor/k8s.io/kubernetes/pkg/apis/OWNERS index d67265f5..2554bfcc 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/apis/OWNERS @@ -1,5 +1,4 @@ approvers: -- bgrant0607 - erictune - lavalamp - smarterclayton diff --git a/vendor/k8s.io/kubernetes/pkg/apis/apps/install/BUILD b/vendor/k8s.io/kubernetes/pkg/apis/apps/install/BUILD index 29069efb..4afc6bd7 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/apps/install/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/apis/apps/install/BUILD @@ -12,9 +12,12 @@ go_library( srcs = ["install.go"], tags = ["automanaged"], deps = [ - "//pkg/apimachinery/announced:go_default_library", + "//pkg/api:go_default_library", "//pkg/apis/apps:go_default_library", "//pkg/apis/apps/v1beta1:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apimachinery/announced", + "//vendor:k8s.io/apimachinery/pkg/apimachinery/registered", + "//vendor:k8s.io/apimachinery/pkg/runtime", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/apis/apps/install/install.go b/vendor/k8s.io/kubernetes/pkg/apis/apps/install/install.go index 9b89e3bb..344ddcbf 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/apps/install/install.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/apps/install/install.go @@ -19,12 +19,20 @@ limitations under the License. package install import ( - "k8s.io/kubernetes/pkg/apimachinery/announced" + "k8s.io/apimachinery/pkg/apimachinery/announced" + "k8s.io/apimachinery/pkg/apimachinery/registered" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/apps" "k8s.io/kubernetes/pkg/apis/apps/v1beta1" ) func init() { + Install(api.GroupFactoryRegistry, api.Registry, api.Scheme) +} + +// Install registers the API group and adds types to a scheme +func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) { if err := announced.NewGroupMetaFactory( &announced.GroupMetaFactoryArgs{ GroupName: apps.GroupName, @@ -35,7 +43,7 @@ func init() { announced.VersionToSchemeFunc{ v1beta1.SchemeGroupVersion.Version: v1beta1.AddToScheme, }, - ).Announce().RegisterAndEnable(); err != nil { + ).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil { panic(err) } } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/apps/register.go b/vendor/k8s.io/kubernetes/pkg/apis/apps/register.go index 109b10b1..639c1be4 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/apps/register.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/apps/register.go @@ -19,7 +19,6 @@ package apps import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/api" ) var ( @@ -49,8 +48,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &StatefulSet{}, &StatefulSetList{}, - &api.ListOptions{}, - &api.DeleteOptions{}, ) return nil } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/apps/types.go b/vendor/k8s.io/kubernetes/pkg/apis/apps/types.go index 2079152b..7e3eea61 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/apps/types.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/apps/types.go @@ -32,7 +32,7 @@ import ( type StatefulSet struct { metav1.TypeMeta // +optional - api.ObjectMeta + metav1.ObjectMeta // Spec defines the desired identities of pods in this set. // +optional diff --git a/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/generated.pb.go b/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/generated.pb.go index 59869f2f..a94798b8 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/generated.pb.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/generated.pb.go @@ -343,7 +343,7 @@ func (this *StatefulSet) String() string { return "nil" } s := strings.Join([]string{`&StatefulSet{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "StatefulSetSpec", "StatefulSetSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "StatefulSetStatus", "StatefulSetStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -1034,45 +1034,45 @@ var ( var fileDescriptorGenerated = []byte{ // 645 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x9c, 0x53, 0x4d, 0x6f, 0xd3, 0x40, - 0x10, 0x8d, 0x93, 0xa6, 0x84, 0x4d, 0xf9, 0x5a, 0x2a, 0x14, 0x55, 0xc8, 0xad, 0x72, 0x21, 0x48, - 0xed, 0x5a, 0x69, 0x0b, 0x54, 0x1c, 0x8d, 0x04, 0x42, 0x02, 0x8a, 0x1c, 0x54, 0x41, 0x81, 0xc3, - 0xda, 0x99, 0xa6, 0x4b, 0xfc, 0x25, 0xef, 0x38, 0x12, 0x37, 0x2e, 0x1c, 0xb8, 0xf1, 0x2f, 0xf8, - 0x07, 0xfc, 0x86, 0x8a, 0x53, 0x8f, 0x9c, 0x2a, 0x1a, 0xfe, 0x08, 0xf2, 0x66, 0x93, 0x18, 0x9c, - 0xd0, 0xaa, 0x37, 0xcf, 0xee, 0xbc, 0xf7, 0x66, 0xde, 0x3e, 0x93, 0x07, 0xfd, 0x1d, 0xc9, 0x44, - 0x64, 0xf5, 0x53, 0x17, 0x92, 0x10, 0x10, 0xa4, 0x15, 0xf7, 0x7b, 0x16, 0x8f, 0x85, 0xb4, 0x78, - 0x1c, 0x4b, 0x6b, 0xd0, 0x76, 0x01, 0x79, 0xdb, 0xea, 0x41, 0x08, 0x09, 0x47, 0xe8, 0xb2, 0x38, - 0x89, 0x30, 0xa2, 0x77, 0x46, 0x40, 0x36, 0x05, 0xb2, 0xb8, 0xdf, 0x63, 0x19, 0x90, 0x65, 0x40, - 0xa6, 0x81, 0x2b, 0x1b, 0x3d, 0x81, 0x87, 0xa9, 0xcb, 0xbc, 0x28, 0xb0, 0x7a, 0x51, 0x2f, 0xb2, - 0x14, 0xde, 0x4d, 0x0f, 0x54, 0xa5, 0x0a, 0xf5, 0x35, 0xe2, 0x5d, 0xd9, 0xd6, 0x03, 0xf1, 0x58, - 0x04, 0xdc, 0x3b, 0x14, 0x21, 0x24, 0x1f, 0xa7, 0x23, 0x05, 0x80, 0xdc, 0x1a, 0x14, 0xa6, 0x59, - 0xb1, 0xe6, 0xa1, 0x92, 0x34, 0x44, 0x11, 0x40, 0x01, 0x70, 0xff, 0x2c, 0x80, 0xf4, 0x0e, 0x21, - 0xe0, 0x05, 0xdc, 0xe6, 0x5c, 0xbf, 0xac, 0x04, 0x64, 0x94, 0x26, 0x5e, 0x51, 0x6b, 0x7d, 0x3e, - 0x66, 0xc6, 0x2a, 0xed, 0xd9, 0xdd, 0x29, 0x0a, 0xdf, 0x12, 0x21, 0x4a, 0x4c, 0xfe, 0x85, 0x34, - 0xbf, 0x95, 0x49, 0xbd, 0x83, 0x1c, 0xe1, 0x20, 0xf5, 0x3b, 0x80, 0xf4, 0x35, 0xa9, 0x65, 0x46, - 0x75, 0x39, 0xf2, 0x86, 0xb1, 0x66, 0xb4, 0xea, 0x9b, 0x2d, 0x36, 0xf7, 0xb9, 0xd8, 0xa0, 0xcd, - 0x76, 0xdd, 0x0f, 0xe0, 0xe1, 0x73, 0x40, 0x6e, 0xd3, 0xa3, 0x93, 0xd5, 0xd2, 0xf0, 0x64, 0x95, - 0x4c, 0xcf, 0x9c, 0x09, 0x1b, 0xdd, 0x27, 0x0b, 0x32, 0x06, 0xaf, 0x51, 0x56, 0xac, 0x3b, 0xec, - 0x9c, 0x21, 0x60, 0xb9, 0xe9, 0x3a, 0x31, 0x78, 0xf6, 0x92, 0x56, 0x59, 0xc8, 0x2a, 0x47, 0x71, - 0x52, 0x97, 0x2c, 0x4a, 0xe4, 0x98, 0xca, 0x46, 0x45, 0xb1, 0x3f, 0xbc, 0x10, 0xbb, 0x62, 0xb0, - 0xaf, 0x6a, 0xfe, 0xc5, 0x51, 0xed, 0x68, 0xe6, 0xe6, 0x0f, 0x83, 0x5c, 0xcb, 0x75, 0x3f, 0x13, - 0x12, 0xe9, 0xbb, 0x82, 0x5b, 0x6c, 0xac, 0x9c, 0x4f, 0xc7, 0x54, 0x3b, 0xeb, 0xce, 0x5c, 0xcb, - 0xd0, 0xca, 0xb3, 0xeb, 0x5a, 0xad, 0x36, 0x3e, 0xc9, 0x39, 0xf6, 0x86, 0x54, 0x05, 0x42, 0x20, - 0x1b, 0xe5, 0xb5, 0x4a, 0xab, 0xbe, 0xb9, 0x7d, 0x91, 0xa5, 0xec, 0x2b, 0x5a, 0xa0, 0xfa, 0x34, - 0xa3, 0x72, 0x46, 0x8c, 0xcd, 0xef, 0x95, 0xbf, 0x96, 0xc9, 0xac, 0xa4, 0x2d, 0x52, 0x4b, 0x20, - 0xf6, 0x85, 0xc7, 0xa5, 0x5a, 0xa6, 0x6a, 0x2f, 0x65, 0x83, 0x39, 0xfa, 0xcc, 0x99, 0xdc, 0xd2, - 0xf7, 0xa4, 0x26, 0xc1, 0x07, 0x0f, 0xa3, 0x44, 0x3f, 0xe7, 0xd6, 0x39, 0xd7, 0xe6, 0x2e, 0xf8, - 0x1d, 0x0d, 0x1d, 0xd1, 0x8f, 0x2b, 0x67, 0x42, 0x49, 0xdf, 0x92, 0x1a, 0x42, 0x10, 0xfb, 0x1c, - 0x41, 0xbf, 0xe7, 0xc6, 0xff, 0x33, 0xf8, 0x32, 0xea, 0xbe, 0xd2, 0x00, 0x15, 0x91, 0x89, 0xa9, - 0xe3, 0x53, 0x67, 0x42, 0x48, 0x3f, 0x1b, 0x64, 0x79, 0x10, 0xf9, 0x69, 0x00, 0x8f, 0x7c, 0x2e, - 0x82, 0x71, 0x87, 0x6c, 0x2c, 0x28, 0x93, 0xb7, 0xce, 0x50, 0x82, 0x44, 0x0a, 0x89, 0x10, 0xe2, - 0xde, 0x94, 0xc3, 0xbe, 0xad, 0xf5, 0x96, 0xf7, 0x66, 0x10, 0x3b, 0x33, 0xe5, 0xe8, 0x3d, 0x52, - 0x97, 0x90, 0x0c, 0x84, 0x07, 0x2f, 0x78, 0x00, 0x8d, 0xea, 0x9a, 0xd1, 0xba, 0x6c, 0xdf, 0xd4, - 0x44, 0xf5, 0xce, 0xf4, 0xca, 0xc9, 0xf7, 0x35, 0xbf, 0x18, 0xe4, 0x46, 0x21, 0xb3, 0xf4, 0x31, - 0xa1, 0x91, 0x9b, 0xb5, 0x41, 0xf7, 0xc9, 0xe8, 0x07, 0x17, 0x51, 0xa8, 0x1e, 0xb1, 0x62, 0xdf, - 0x1a, 0x9e, 0xac, 0xd2, 0xdd, 0xc2, 0xad, 0x33, 0x03, 0x41, 0xd7, 0x73, 0x11, 0x28, 0xab, 0x08, - 0x4c, 0xac, 0x2c, 0xc6, 0xc0, 0xbe, 0x7b, 0x74, 0x6a, 0x96, 0x8e, 0x4f, 0xcd, 0xd2, 0xcf, 0x53, - 0xb3, 0xf4, 0x69, 0x68, 0x1a, 0x47, 0x43, 0xd3, 0x38, 0x1e, 0x9a, 0xc6, 0xaf, 0xa1, 0x69, 0x7c, - 0xfd, 0x6d, 0x96, 0xf6, 0x2f, 0xe9, 0x44, 0xfe, 0x09, 0x00, 0x00, 0xff, 0xff, 0xbb, 0xf0, 0xd3, - 0x7e, 0x2c, 0x06, 0x00, 0x00, + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x9c, 0x93, 0xcd, 0x6e, 0xd3, 0x40, + 0x10, 0xc7, 0xe3, 0xa4, 0x29, 0x61, 0x53, 0xbe, 0x96, 0x0a, 0x45, 0x15, 0x72, 0xab, 0x5c, 0x08, + 0x52, 0xbb, 0x26, 0x6d, 0x81, 0x8a, 0xa3, 0x91, 0x40, 0x48, 0x40, 0x91, 0x83, 0x2a, 0x51, 0x40, + 0x62, 0xed, 0x4c, 0xd3, 0x25, 0xfe, 0x92, 0x77, 0x1c, 0x89, 0x1b, 0x17, 0x0e, 0xdc, 0x78, 0x13, + 0x6e, 0x3c, 0x43, 0xc5, 0xa9, 0x47, 0x4e, 0x15, 0x0d, 0x2f, 0x82, 0xbc, 0xd9, 0x24, 0x06, 0x27, + 0x6a, 0xd5, 0x5b, 0x66, 0x3d, 0xff, 0xdf, 0xcc, 0xfc, 0x67, 0x42, 0x1e, 0xf6, 0x77, 0x24, 0x13, + 0x91, 0xd5, 0x4f, 0x5d, 0x48, 0x42, 0x40, 0x90, 0x56, 0xdc, 0xef, 0x59, 0x3c, 0x16, 0xd2, 0xe2, + 0x71, 0x2c, 0xad, 0x41, 0xdb, 0x05, 0xe4, 0x6d, 0xab, 0x07, 0x21, 0x24, 0x1c, 0xa1, 0xcb, 0xe2, + 0x24, 0xc2, 0x88, 0xde, 0x19, 0x09, 0xd9, 0x54, 0xc8, 0xe2, 0x7e, 0x8f, 0x65, 0x42, 0x96, 0x09, + 0x99, 0x16, 0xae, 0x6c, 0xf4, 0x04, 0x1e, 0xa6, 0x2e, 0xf3, 0xa2, 0xc0, 0xea, 0x45, 0xbd, 0xc8, + 0x52, 0x7a, 0x37, 0x3d, 0x50, 0x91, 0x0a, 0xd4, 0xaf, 0x11, 0x77, 0x65, 0x5b, 0x37, 0xc4, 0x63, + 0x11, 0x70, 0xef, 0x50, 0x84, 0x90, 0x7c, 0x9a, 0xb6, 0x14, 0x00, 0x72, 0x6b, 0x50, 0xe8, 0x66, + 0xc5, 0x9a, 0xa7, 0x4a, 0xd2, 0x10, 0x45, 0x00, 0x05, 0xc1, 0x83, 0xb3, 0x04, 0xd2, 0x3b, 0x84, + 0x80, 0x17, 0x74, 0x9b, 0x73, 0xfd, 0xb2, 0x12, 0x90, 0x51, 0x9a, 0x78, 0xc5, 0x5a, 0xeb, 0xf3, + 0x35, 0x33, 0x46, 0x69, 0xcf, 0xce, 0x4e, 0x51, 0xf8, 0x96, 0x08, 0x51, 0x62, 0xf2, 0xbf, 0xa4, + 0xf9, 0xbd, 0x4c, 0xea, 0x1d, 0xe4, 0x08, 0x07, 0xa9, 0xdf, 0x01, 0xa4, 0x1f, 0x48, 0x2d, 0x33, + 0xaa, 0xcb, 0x91, 0x37, 0x8c, 0x35, 0xa3, 0x55, 0xdf, 0xbc, 0xc7, 0xf4, 0xba, 0xf2, 0xf3, 0x4e, + 0x17, 0x96, 0x65, 0xb3, 0x41, 0x9b, 0xed, 0xba, 0x1f, 0xc1, 0xc3, 0x17, 0x80, 0xdc, 0xa6, 0x47, + 0x27, 0xab, 0xa5, 0xe1, 0xc9, 0x2a, 0x99, 0xbe, 0x39, 0x13, 0x2a, 0xdd, 0x27, 0x0b, 0x32, 0x06, + 0xaf, 0x51, 0x56, 0xf4, 0x1d, 0x76, 0xce, 0x63, 0x60, 0xb9, 0x2e, 0x3b, 0x31, 0x78, 0xf6, 0x92, + 0xae, 0xb2, 0x90, 0x45, 0x8e, 0x62, 0x52, 0x97, 0x2c, 0x4a, 0xe4, 0x98, 0xca, 0x46, 0x45, 0xd1, + 0x1f, 0x5d, 0x88, 0xae, 0x08, 0xf6, 0x55, 0xcd, 0x5f, 0x1c, 0xc5, 0x8e, 0x26, 0x37, 0x7f, 0x1a, + 0xe4, 0x5a, 0x2e, 0xfb, 0xb9, 0x90, 0x48, 0xdf, 0x15, 0x5c, 0x63, 0xe7, 0x73, 0x2d, 0x53, 0x2b, + 0xcf, 0xae, 0xeb, 0x6a, 0xb5, 0xf1, 0x4b, 0xce, 0xb1, 0x37, 0xa4, 0x2a, 0x10, 0x02, 0xd9, 0x28, + 0xaf, 0x55, 0x5a, 0xf5, 0xcd, 0xed, 0x8b, 0x0c, 0x65, 0x5f, 0xd1, 0x05, 0xaa, 0xcf, 0x32, 0x94, + 0x33, 0x22, 0x36, 0x7f, 0x54, 0xfe, 0x19, 0x26, 0xb3, 0x92, 0xb6, 0x48, 0x2d, 0x81, 0xd8, 0x17, + 0x1e, 0x97, 0x6a, 0x98, 0xaa, 0xbd, 0x94, 0x35, 0xe6, 0xe8, 0x37, 0x67, 0xf2, 0x95, 0xbe, 0x27, + 0x35, 0x09, 0x3e, 0x78, 0x18, 0x25, 0x7a, 0x9d, 0x5b, 0xe7, 0x1c, 0x9b, 0xbb, 0xe0, 0x77, 0xb4, + 0x74, 0x84, 0x1f, 0x47, 0xce, 0x04, 0x49, 0xdf, 0x92, 0x1a, 0x42, 0x10, 0xfb, 0x1c, 0x41, 0xef, + 0x73, 0x63, 0xfe, 0xe8, 0x19, 0xf6, 0x55, 0xd4, 0x7d, 0xad, 0x05, 0xea, 0x44, 0x26, 0xa6, 0x8e, + 0x5f, 0x9d, 0x09, 0x90, 0x7e, 0x31, 0xc8, 0xf2, 0x20, 0xf2, 0xd3, 0x00, 0x1e, 0xfb, 0x5c, 0x04, + 0xe3, 0x0c, 0xd9, 0x58, 0x50, 0x26, 0x6f, 0x9d, 0x51, 0x09, 0x12, 0x29, 0x24, 0x42, 0x88, 0x7b, + 0x53, 0x86, 0x7d, 0x5b, 0xd7, 0x5b, 0xde, 0x9b, 0x01, 0x76, 0x66, 0x96, 0xa3, 0xf7, 0x49, 0x5d, + 0x42, 0x32, 0x10, 0x1e, 0xbc, 0xe4, 0x01, 0x34, 0xaa, 0x6b, 0x46, 0xeb, 0xb2, 0x7d, 0x53, 0x83, + 0xea, 0x9d, 0xe9, 0x27, 0x27, 0x9f, 0xd7, 0xfc, 0x6a, 0x90, 0x1b, 0x85, 0x9b, 0xa5, 0x4f, 0x08, + 0x8d, 0xdc, 0x2c, 0x0d, 0xba, 0x4f, 0x47, 0x7f, 0x74, 0x11, 0x85, 0x6a, 0x89, 0x15, 0xfb, 0xd6, + 0xf0, 0x64, 0x95, 0xee, 0x16, 0xbe, 0x3a, 0x33, 0x14, 0x74, 0x3d, 0x77, 0x02, 0x65, 0x75, 0x02, + 0x13, 0x2b, 0x8b, 0x67, 0x60, 0xdf, 0x3d, 0x3a, 0x35, 0x4b, 0xc7, 0xa7, 0x66, 0xe9, 0xd7, 0xa9, + 0x59, 0xfa, 0x3c, 0x34, 0x8d, 0xa3, 0xa1, 0x69, 0x1c, 0x0f, 0x4d, 0xe3, 0xf7, 0xd0, 0x34, 0xbe, + 0xfd, 0x31, 0x4b, 0xfb, 0x97, 0xf4, 0x45, 0xfe, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xe5, 0x5a, 0x18, + 0x81, 0x34, 0x06, 0x00, 0x00, } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/generated.proto b/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/generated.proto index 249af7dc..e7555c9d 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/generated.proto +++ b/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/generated.proto @@ -39,7 +39,7 @@ option go_package = "v1beta1"; // map to the same storage identity. message StatefulSet { // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec defines the desired identities of pods in this set. // +optional diff --git a/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/register.go b/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/register.go index 726c63a5..4e7829d9 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/register.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/register.go @@ -20,7 +20,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/api/v1" ) // GroupName is the group name use in this package @@ -44,10 +43,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &StatefulSet{}, &StatefulSetList{}, - &v1.ListOptions{}, - &v1.DeleteOptions{}, - &metav1.ExportOptions{}, - &metav1.GetOptions{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil diff --git a/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/types.generated.go b/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/types.generated.go index 17fa65e9..794d357f 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/types.generated.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/types.generated.go @@ -26,9 +26,9 @@ import ( "fmt" codec1978 "github.com/ugorji/go/codec" pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - pkg3_types "k8s.io/apimachinery/pkg/types" + pkg2_types "k8s.io/apimachinery/pkg/types" pkg4_resource "k8s.io/kubernetes/pkg/api/resource" - pkg2_v1 "k8s.io/kubernetes/pkg/api/v1" + pkg3_v1 "k8s.io/kubernetes/pkg/api/v1" pkg5_intstr "k8s.io/kubernetes/pkg/util/intstr" "reflect" "runtime" @@ -66,9 +66,9 @@ func init() { } if false { // reference the types, but skip this branch at build/run time var v0 pkg1_v1.TypeMeta - var v1 pkg3_types.UID + var v1 pkg2_types.UID var v2 pkg4_resource.Quantity - var v3 pkg2_v1.ObjectMeta + var v3 pkg3_v1.PodTemplateSpec var v4 pkg5_intstr.IntOrString var v5 time.Time _, _, _, _, _, _ = v0, v1, v2, v3, v4, v5 @@ -164,7 +164,13 @@ func (x *StatefulSet) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -174,7 +180,13 @@ func (x *StatefulSet) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -298,24 +310,30 @@ func (x *StatefulSet) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = StatefulSetSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = StatefulSetStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -328,16 +346,16 @@ func (x *StatefulSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -345,21 +363,21 @@ func (x *StatefulSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -367,38 +385,44 @@ func (x *StatefulSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -406,16 +430,16 @@ func (x *StatefulSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = StatefulSetSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -423,21 +447,21 @@ func (x *StatefulSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = StatefulSetStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -566,7 +590,7 @@ func (x *StatefulSetSpec) CodecEncodeSelf(e *codec1978.Encoder) { _ = yym17 if false { } else { - h.encSlicev1_PersistentVolumeClaim(([]pkg2_v1.PersistentVolumeClaim)(x.VolumeClaimTemplates), e) + h.encSlicev1_PersistentVolumeClaim(([]pkg3_v1.PersistentVolumeClaim)(x.VolumeClaimTemplates), e) } } } else { @@ -584,7 +608,7 @@ func (x *StatefulSetSpec) CodecEncodeSelf(e *codec1978.Encoder) { _ = yym18 if false { } else { - h.encSlicev1_PersistentVolumeClaim(([]pkg2_v1.PersistentVolumeClaim)(x.VolumeClaimTemplates), e) + h.encSlicev1_PersistentVolumeClaim(([]pkg3_v1.PersistentVolumeClaim)(x.VolumeClaimTemplates), e) } } } @@ -704,7 +728,7 @@ func (x *StatefulSetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "template": if r.TryDecodeAsNil() { - x.Template = pkg2_v1.PodTemplateSpec{} + x.Template = pkg3_v1.PodTemplateSpec{} } else { yyv8 := &x.Template yyv8.CodecDecodeSelf(d) @@ -718,7 +742,7 @@ func (x *StatefulSetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { _ = yym10 if false { } else { - h.decSlicev1_PersistentVolumeClaim((*[]pkg2_v1.PersistentVolumeClaim)(yyv9), d) + h.decSlicev1_PersistentVolumeClaim((*[]pkg3_v1.PersistentVolumeClaim)(yyv9), d) } } case "serviceName": @@ -812,7 +836,7 @@ func (x *StatefulSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.Template = pkg2_v1.PodTemplateSpec{} + x.Template = pkg3_v1.PodTemplateSpec{} } else { yyv18 := &x.Template yyv18.CodecDecodeSelf(d) @@ -836,7 +860,7 @@ func (x *StatefulSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) _ = yym20 if false { } else { - h.decSlicev1_PersistentVolumeClaim((*[]pkg2_v1.PersistentVolumeClaim)(yyv19), d) + h.decSlicev1_PersistentVolumeClaim((*[]pkg3_v1.PersistentVolumeClaim)(yyv19), d) } } yyj13++ @@ -1497,7 +1521,7 @@ func (x *StatefulSetList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } -func (x codecSelfer1234) encSlicev1_PersistentVolumeClaim(v []pkg2_v1.PersistentVolumeClaim, e *codec1978.Encoder) { +func (x codecSelfer1234) encSlicev1_PersistentVolumeClaim(v []pkg3_v1.PersistentVolumeClaim, e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r @@ -1510,7 +1534,7 @@ func (x codecSelfer1234) encSlicev1_PersistentVolumeClaim(v []pkg2_v1.Persistent z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } -func (x codecSelfer1234) decSlicev1_PersistentVolumeClaim(v *[]pkg2_v1.PersistentVolumeClaim, d *codec1978.Decoder) { +func (x codecSelfer1234) decSlicev1_PersistentVolumeClaim(v *[]pkg3_v1.PersistentVolumeClaim, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r @@ -1521,7 +1545,7 @@ func (x codecSelfer1234) decSlicev1_PersistentVolumeClaim(v *[]pkg2_v1.Persisten _ = yyc1 if yyl1 == 0 { if yyv1 == nil { - yyv1 = []pkg2_v1.PersistentVolumeClaim{} + yyv1 = []pkg3_v1.PersistentVolumeClaim{} yyc1 = true } else if len(yyv1) != 0 { yyv1 = yyv1[:0] @@ -1541,10 +1565,10 @@ func (x codecSelfer1234) decSlicev1_PersistentVolumeClaim(v *[]pkg2_v1.Persisten if yyrl1 <= cap(yyv1) { yyv1 = yyv1[:yyrl1] } else { - yyv1 = make([]pkg2_v1.PersistentVolumeClaim, yyrl1) + yyv1 = make([]pkg3_v1.PersistentVolumeClaim, yyrl1) } } else { - yyv1 = make([]pkg2_v1.PersistentVolumeClaim, yyrl1) + yyv1 = make([]pkg3_v1.PersistentVolumeClaim, yyrl1) } yyc1 = true yyrr1 = len(yyv1) @@ -1559,7 +1583,7 @@ func (x codecSelfer1234) decSlicev1_PersistentVolumeClaim(v *[]pkg2_v1.Persisten for ; yyj1 < yyrr1; yyj1++ { yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv1[yyj1] = pkg2_v1.PersistentVolumeClaim{} + yyv1[yyj1] = pkg3_v1.PersistentVolumeClaim{} } else { yyv2 := &yyv1[yyj1] yyv2.CodecDecodeSelf(d) @@ -1568,10 +1592,10 @@ func (x codecSelfer1234) decSlicev1_PersistentVolumeClaim(v *[]pkg2_v1.Persisten } if yyrt1 { for ; yyj1 < yyl1; yyj1++ { - yyv1 = append(yyv1, pkg2_v1.PersistentVolumeClaim{}) + yyv1 = append(yyv1, pkg3_v1.PersistentVolumeClaim{}) yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv1[yyj1] = pkg2_v1.PersistentVolumeClaim{} + yyv1[yyj1] = pkg3_v1.PersistentVolumeClaim{} } else { yyv3 := &yyv1[yyj1] yyv3.CodecDecodeSelf(d) @@ -1585,13 +1609,13 @@ func (x codecSelfer1234) decSlicev1_PersistentVolumeClaim(v *[]pkg2_v1.Persisten for ; !r.CheckBreak(); yyj1++ { if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, pkg2_v1.PersistentVolumeClaim{}) // var yyz1 pkg2_v1.PersistentVolumeClaim + yyv1 = append(yyv1, pkg3_v1.PersistentVolumeClaim{}) // var yyz1 pkg3_v1.PersistentVolumeClaim yyc1 = true } yyh1.ElemContainerState(yyj1) if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv1[yyj1] = pkg2_v1.PersistentVolumeClaim{} + yyv1[yyj1] = pkg3_v1.PersistentVolumeClaim{} } else { yyv4 := &yyv1[yyj1] yyv4.CodecDecodeSelf(d) @@ -1606,7 +1630,7 @@ func (x codecSelfer1234) decSlicev1_PersistentVolumeClaim(v *[]pkg2_v1.Persisten yyv1 = yyv1[:yyj1] yyc1 = true } else if yyj1 == 0 && yyv1 == nil { - yyv1 = []pkg2_v1.PersistentVolumeClaim{} + yyv1 = []pkg3_v1.PersistentVolumeClaim{} yyc1 = true } } @@ -1655,7 +1679,7 @@ func (x codecSelfer1234) decSliceStatefulSet(v *[]StatefulSet, d *codec1978.Deco yyrg1 := len(yyv1) > 0 yyv21 := yyv1 - yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 808) + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 824) if yyrt1 { if yyrl1 <= cap(yyv1) { yyv1 = yyv1[:yyrl1] diff --git a/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/types.go b/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/types.go index 0b7f74eb..9c53adce 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/types.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/types.go @@ -32,7 +32,7 @@ import ( type StatefulSet struct { metav1.TypeMeta `json:",inline"` // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec defines the desired identities of pods in this set. // +optional diff --git a/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/zz_generated.conversion.go index 4a5d376e..5dbc4970 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/zz_generated.conversion.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/zz_generated.conversion.go @@ -50,10 +50,7 @@ func RegisterConversions(scheme *runtime.Scheme) error { } func autoConvert_v1beta1_StatefulSet_To_apps_StatefulSet(in *StatefulSet, out *apps.StatefulSet, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_StatefulSetSpec_To_apps_StatefulSetSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -68,10 +65,7 @@ func Convert_v1beta1_StatefulSet_To_apps_StatefulSet(in *StatefulSet, out *apps. } func autoConvert_apps_StatefulSet_To_v1beta1_StatefulSet(in *apps.StatefulSet, out *StatefulSet, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_apps_StatefulSetSpec_To_v1beta1_StatefulSetSpec(&in.Spec, &out.Spec, s); err != nil { return err } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/zz_generated.deepcopy.go index 3ebaa3ae..8cc9161b 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/apps/v1beta1/zz_generated.deepcopy.go @@ -21,10 +21,10 @@ limitations under the License. package v1beta1 import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - v1 "k8s.io/kubernetes/pkg/api/v1" + api_v1 "k8s.io/kubernetes/pkg/api/v1" reflect "reflect" ) @@ -48,8 +48,10 @@ func DeepCopy_v1beta1_StatefulSet(in interface{}, out interface{}, c *conversion in := in.(*StatefulSet) out := out.(*StatefulSet) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v1beta1_StatefulSetSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -94,17 +96,17 @@ func DeepCopy_v1beta1_StatefulSetSpec(in interface{}, out interface{}, c *conver if newVal, err := c.DeepCopy(*in); err != nil { return err } else { - *out = newVal.(*meta_v1.LabelSelector) + *out = newVal.(*v1.LabelSelector) } } - if err := v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil { + if err := api_v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil { return err } if in.VolumeClaimTemplates != nil { in, out := &in.VolumeClaimTemplates, &out.VolumeClaimTemplates - *out = make([]v1.PersistentVolumeClaim, len(*in)) + *out = make([]api_v1.PersistentVolumeClaim, len(*in)) for i := range *in { - if err := v1.DeepCopy_v1_PersistentVolumeClaim(&(*in)[i], &(*out)[i], c); err != nil { + if err := api_v1.DeepCopy_v1_PersistentVolumeClaim(&(*in)[i], &(*out)[i], c); err != nil { return err } } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/apps/validation/validation_test.go b/vendor/k8s.io/kubernetes/pkg/apis/apps/validation/validation_test.go index 6b507504..6efff4b5 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/apps/validation/validation_test.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/apps/validation/validation_test.go @@ -29,7 +29,7 @@ func TestValidateStatefulSet(t *testing.T) { validLabels := map[string]string{"a": "b"} validPodTemplate := api.PodTemplate{ Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validLabels, }, Spec: api.PodSpec{ @@ -46,21 +46,21 @@ func TestValidateStatefulSet(t *testing.T) { RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, }, - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: invalidLabels, }, }, } successCases := []apps.StatefulSet{ { - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: apps.StatefulSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validLabels}, Template: validPodTemplate.Template, }, }, { - ObjectMeta: api.ObjectMeta{Name: "abc-123", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc-123", Namespace: metav1.NamespaceDefault}, Spec: apps.StatefulSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validLabels}, Template: validPodTemplate.Template, @@ -75,49 +75,49 @@ func TestValidateStatefulSet(t *testing.T) { errorCases := map[string]apps.StatefulSet{ "zero-length ID": { - ObjectMeta: api.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "", Namespace: metav1.NamespaceDefault}, Spec: apps.StatefulSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validLabels}, Template: validPodTemplate.Template, }, }, "missing-namespace": { - ObjectMeta: api.ObjectMeta{Name: "abc-123"}, + ObjectMeta: metav1.ObjectMeta{Name: "abc-123"}, Spec: apps.StatefulSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validLabels}, Template: validPodTemplate.Template, }, }, "empty selector": { - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: apps.StatefulSetSpec{ Template: validPodTemplate.Template, }, }, "selector_doesnt_match": { - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: apps.StatefulSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"foo": "bar"}}, Template: validPodTemplate.Template, }, }, "invalid manifest": { - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: apps.StatefulSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validLabels}, }, }, "negative_replicas": { - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: apps.StatefulSetSpec{ Replicas: -1, Selector: &metav1.LabelSelector{MatchLabels: validLabels}, }, }, "invalid_label": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc-123", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, Labels: map[string]string{ "NoUppercaseOrSpecialCharsLike=Equals": "bar", }, @@ -128,9 +128,9 @@ func TestValidateStatefulSet(t *testing.T) { }, }, "invalid_label 2": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc-123", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, Labels: map[string]string{ "NoUppercaseOrSpecialCharsLike=Equals": "bar", }, @@ -140,9 +140,9 @@ func TestValidateStatefulSet(t *testing.T) { }, }, "invalid_annotation": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc-123", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, Annotations: map[string]string{ "NoUppercaseOrSpecialCharsLike=Equals": "bar", }, @@ -153,9 +153,9 @@ func TestValidateStatefulSet(t *testing.T) { }, }, "invalid restart policy 1": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc-123", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, Spec: apps.StatefulSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validLabels}, @@ -165,16 +165,16 @@ func TestValidateStatefulSet(t *testing.T) { DNSPolicy: api.DNSClusterFirst, Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent"}}, }, - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validLabels, }, }, }, }, "invalid restart policy 2": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc-123", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, Spec: apps.StatefulSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validLabels}, @@ -184,7 +184,7 @@ func TestValidateStatefulSet(t *testing.T) { DNSPolicy: api.DNSClusterFirst, Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent"}}, }, - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validLabels, }, }, @@ -219,7 +219,7 @@ func TestValidateStatefulSetUpdate(t *testing.T) { validLabels := map[string]string{"a": "b"} validPodTemplate := api.PodTemplate{ Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validLabels, }, Spec: api.PodSpec{ @@ -231,7 +231,7 @@ func TestValidateStatefulSetUpdate(t *testing.T) { } readWriteVolumePodTemplate := api.PodTemplate{ Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validLabels, }, Spec: api.PodSpec{ @@ -249,7 +249,7 @@ func TestValidateStatefulSetUpdate(t *testing.T) { RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, }, - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: invalidLabels, }, }, @@ -261,14 +261,14 @@ func TestValidateStatefulSetUpdate(t *testing.T) { successCases := []psUpdateTest{ { old: apps.StatefulSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: apps.StatefulSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validLabels}, Template: validPodTemplate.Template, }, }, update: apps.StatefulSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: apps.StatefulSetSpec{ Replicas: 3, Selector: &metav1.LabelSelector{MatchLabels: validLabels}, @@ -287,14 +287,14 @@ func TestValidateStatefulSetUpdate(t *testing.T) { errorCases := map[string]psUpdateTest{ "more than one read/write": { old: apps.StatefulSet{ - ObjectMeta: api.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "", Namespace: metav1.NamespaceDefault}, Spec: apps.StatefulSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validLabels}, Template: validPodTemplate.Template, }, }, update: apps.StatefulSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: apps.StatefulSetSpec{ Replicas: 2, Selector: &metav1.LabelSelector{MatchLabels: validLabels}, @@ -304,14 +304,14 @@ func TestValidateStatefulSetUpdate(t *testing.T) { }, "updates to a field other than spec.Replicas": { old: apps.StatefulSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: apps.StatefulSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validLabels}, Template: validPodTemplate.Template, }, }, update: apps.StatefulSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: apps.StatefulSetSpec{ Replicas: 1, Selector: &metav1.LabelSelector{MatchLabels: validLabels}, @@ -321,14 +321,14 @@ func TestValidateStatefulSetUpdate(t *testing.T) { }, "invalid selector": { old: apps.StatefulSet{ - ObjectMeta: api.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "", Namespace: metav1.NamespaceDefault}, Spec: apps.StatefulSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validLabels}, Template: validPodTemplate.Template, }, }, update: apps.StatefulSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: apps.StatefulSetSpec{ Replicas: 2, Selector: &metav1.LabelSelector{MatchLabels: invalidLabels}, @@ -338,14 +338,14 @@ func TestValidateStatefulSetUpdate(t *testing.T) { }, "invalid pod": { old: apps.StatefulSet{ - ObjectMeta: api.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "", Namespace: metav1.NamespaceDefault}, Spec: apps.StatefulSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validLabels}, Template: validPodTemplate.Template, }, }, update: apps.StatefulSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: apps.StatefulSetSpec{ Replicas: 2, Selector: &metav1.LabelSelector{MatchLabels: validLabels}, @@ -355,14 +355,14 @@ func TestValidateStatefulSetUpdate(t *testing.T) { }, "negative replicas": { old: apps.StatefulSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: apps.StatefulSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validLabels}, Template: validPodTemplate.Template, }, }, update: apps.StatefulSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: apps.StatefulSetSpec{ Replicas: -1, Selector: &metav1.LabelSelector{MatchLabels: validLabels}, diff --git a/vendor/k8s.io/kubernetes/pkg/apis/apps/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/apps/zz_generated.deepcopy.go index c1d826e4..26cff149 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/apps/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/apps/zz_generated.deepcopy.go @@ -48,8 +48,10 @@ func DeepCopy_apps_StatefulSet(in interface{}, out interface{}, c *conversion.Cl in := in.(*StatefulSet) out := out.(*StatefulSet) *out = *in - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_apps_StatefulSetSpec(&in.Spec, &out.Spec, c); err != nil { return err diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authentication/BUILD b/vendor/k8s.io/kubernetes/pkg/apis/authentication/BUILD index ac95dcf3..be657255 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/authentication/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/apis/authentication/BUILD @@ -17,7 +17,6 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/conversion", "//vendor:k8s.io/apimachinery/pkg/runtime", diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authentication/install/BUILD b/vendor/k8s.io/kubernetes/pkg/apis/authentication/install/BUILD index 9613ef53..3c0da471 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/authentication/install/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/apis/authentication/install/BUILD @@ -12,9 +12,12 @@ go_library( srcs = ["install.go"], tags = ["automanaged"], deps = [ - "//pkg/apimachinery/announced:go_default_library", + "//pkg/api:go_default_library", "//pkg/apis/authentication:go_default_library", "//pkg/apis/authentication/v1beta1:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apimachinery/announced", + "//vendor:k8s.io/apimachinery/pkg/apimachinery/registered", + "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/sets", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authentication/install/install.go b/vendor/k8s.io/kubernetes/pkg/apis/authentication/install/install.go index d009dcda..8b5e444b 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/authentication/install/install.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/authentication/install/install.go @@ -19,13 +19,21 @@ limitations under the License. package install import ( + "k8s.io/apimachinery/pkg/apimachinery/announced" + "k8s.io/apimachinery/pkg/apimachinery/registered" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/kubernetes/pkg/apimachinery/announced" + "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/authentication" "k8s.io/kubernetes/pkg/apis/authentication/v1beta1" ) func init() { + Install(api.GroupFactoryRegistry, api.Registry, api.Scheme) +} + +// Install registers the API group and adds types to a scheme +func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) { if err := announced.NewGroupMetaFactory( &announced.GroupMetaFactoryArgs{ GroupName: authentication.GroupName, @@ -37,7 +45,7 @@ func init() { announced.VersionToSchemeFunc{ v1beta1.SchemeGroupVersion.Version: v1beta1.AddToScheme, }, - ).Announce().RegisterAndEnable(); err != nil { + ).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil { panic(err) } } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authentication/register.go b/vendor/k8s.io/kubernetes/pkg/apis/authentication/register.go index d6c8b89b..b0ac3c28 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/authentication/register.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/authentication/register.go @@ -17,10 +17,8 @@ limitations under the License. package authentication import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/api" ) // GroupName is the group name use in this package @@ -46,11 +44,6 @@ var ( func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, - &api.ListOptions{}, - &api.DeleteOptions{}, - &metav1.ExportOptions{}, - &metav1.GetOptions{}, - &TokenReview{}, ) return nil diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authentication/types.go b/vendor/k8s.io/kubernetes/pkg/apis/authentication/types.go index c6be6df5..9c1e66b7 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/authentication/types.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/authentication/types.go @@ -18,7 +18,6 @@ package authentication import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/kubernetes/pkg/api" ) const ( @@ -43,9 +42,9 @@ const ( // TokenReview attempts to authenticate a token to a known user. type TokenReview struct { metav1.TypeMeta - // ObjectMeta fulfills the meta.ObjectMetaAccessor interface so that the stock + // ObjectMeta fulfills the metav1.ObjectMetaAccessor interface so that the stock // REST handler paths work - api.ObjectMeta + metav1.ObjectMeta // Spec holds information about the request being evaluated Spec TokenReviewSpec diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/BUILD b/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/BUILD index b82a6b82..d8535569 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/BUILD @@ -24,7 +24,6 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api/v1:go_default_library", "//pkg/apis/authentication:go_default_library", "//vendor:github.com/gogo/protobuf/proto", "//vendor:github.com/gogo/protobuf/sortkeys", diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/generated.pb.go b/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/generated.pb.go index acb697f7..0dff3532 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/generated.pb.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/generated.pb.go @@ -390,7 +390,7 @@ func (this *TokenReview) String() string { return "nil" } s := strings.Join([]string{`&TokenReview{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "TokenReviewSpec", "TokenReviewSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "TokenReviewStatus", "TokenReviewStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -1236,46 +1236,47 @@ var ( ) var fileDescriptorGenerated = []byte{ - // 656 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xa4, 0x53, 0xcd, 0x6e, 0xd3, 0x4c, - 0x14, 0xb5, 0xf3, 0xd3, 0x2f, 0x99, 0x7c, 0x85, 0x32, 0x12, 0x52, 0x14, 0x09, 0x27, 0x0a, 0x9b, - 0x20, 0x95, 0xb1, 0x52, 0xa1, 0x52, 0xb5, 0x62, 0x51, 0xab, 0x05, 0x75, 0x81, 0x90, 0xa6, 0x14, - 0x21, 0x24, 0x16, 0x13, 0xe7, 0xd6, 0x31, 0xae, 0x7f, 0x34, 0x1e, 0xa7, 0x74, 0xd7, 0x47, 0x60, - 0xc9, 0x92, 0xf7, 0xe0, 0x05, 0xba, 0xec, 0x82, 0x05, 0x0b, 0x14, 0x91, 0xf0, 0x22, 0x68, 0xc6, - 0x43, 0x93, 0x36, 0x8d, 0x10, 0xed, 0xce, 0x73, 0xe6, 0x9e, 0x73, 0xee, 0x3d, 0xe3, 0x8b, 0xb6, - 0x83, 0x8d, 0x94, 0xf8, 0xb1, 0x1d, 0x64, 0x3d, 0xe0, 0x11, 0x08, 0x48, 0xed, 0x24, 0xf0, 0x6c, - 0x96, 0xf8, 0xa9, 0xcd, 0x32, 0x31, 0x80, 0x48, 0xf8, 0x2e, 0x13, 0x7e, 0x1c, 0xd9, 0xc3, 0x6e, - 0x0f, 0x04, 0xeb, 0xda, 0x1e, 0x44, 0xc0, 0x99, 0x80, 0x3e, 0x49, 0x78, 0x2c, 0x62, 0xdc, 0xcd, - 0x25, 0xc8, 0x54, 0x82, 0x24, 0x81, 0x47, 0xa4, 0x04, 0xb9, 0x2c, 0x41, 0xb4, 0x44, 0xe3, 0xb1, - 0xe7, 0x8b, 0x41, 0xd6, 0x23, 0x6e, 0x1c, 0xda, 0x5e, 0xec, 0xc5, 0xb6, 0x52, 0xea, 0x65, 0x87, - 0xea, 0xa4, 0x0e, 0xea, 0x2b, 0x77, 0x68, 0x3c, 0xd1, 0x4d, 0xb2, 0xc4, 0x0f, 0x99, 0x3b, 0xf0, - 0x23, 0xe0, 0x27, 0xd3, 0x36, 0x43, 0x10, 0xcc, 0x1e, 0xce, 0xf5, 0xd5, 0xb0, 0x17, 0xb1, 0x78, - 0x16, 0x09, 0x3f, 0x84, 0x39, 0xc2, 0xfa, 0xdf, 0x08, 0xa9, 0x3b, 0x80, 0x90, 0xcd, 0xf1, 0xd6, - 0x16, 0x66, 0x68, 0x73, 0x48, 0xe3, 0x8c, 0xbb, 0xf3, 0x5e, 0xab, 0x8b, 0x39, 0xd7, 0x8c, 0xd2, - 0xbd, 0xbe, 0x3a, 0x13, 0xfe, 0x91, 0xed, 0x47, 0x22, 0x15, 0xfc, 0x2a, 0xa5, 0xfd, 0x14, 0xa1, - 0xdd, 0x8f, 0x82, 0xb3, 0x37, 0xec, 0x28, 0x03, 0xdc, 0x44, 0x65, 0x5f, 0x40, 0x98, 0xd6, 0xcd, - 0x56, 0xb1, 0x53, 0x75, 0xaa, 0x93, 0x51, 0xb3, 0xbc, 0x27, 0x01, 0x9a, 0xe3, 0x9b, 0x95, 0xcf, - 0x5f, 0x9a, 0xc6, 0xe9, 0x8f, 0x96, 0xd1, 0xfe, 0x5a, 0x40, 0xb5, 0xd7, 0x71, 0x00, 0x11, 0x85, - 0xa1, 0x0f, 0xc7, 0xf8, 0x2d, 0xaa, 0xc8, 0x84, 0xfb, 0x4c, 0xb0, 0xba, 0xd9, 0x32, 0x3b, 0xb5, - 0xb5, 0x0e, 0x59, 0xf8, 0xe2, 0x64, 0xd8, 0x25, 0xaf, 0x7a, 0x1f, 0xc0, 0x15, 0x2f, 0x41, 0x30, - 0x07, 0x9f, 0x8d, 0x9a, 0xc6, 0x64, 0xd4, 0x44, 0x53, 0x8c, 0x5e, 0xa8, 0xe1, 0x3e, 0x2a, 0xa5, - 0x09, 0xb8, 0xf5, 0x82, 0x52, 0x75, 0xc8, 0x3f, 0xff, 0x47, 0x64, 0xa6, 0xcf, 0xfd, 0x04, 0x5c, - 0xe7, 0x7f, 0xed, 0x57, 0x92, 0x27, 0xaa, 0xd4, 0xf1, 0x11, 0x5a, 0x4a, 0x05, 0x13, 0x59, 0x5a, - 0x2f, 0x2a, 0x9f, 0x9d, 0x5b, 0xfa, 0x28, 0x2d, 0xe7, 0x8e, 0x76, 0x5a, 0xca, 0xcf, 0x54, 0x7b, - 0xb4, 0xd7, 0xd1, 0xdd, 0x2b, 0x4d, 0xe1, 0x87, 0xa8, 0x2c, 0x24, 0xa4, 0xd2, 0xab, 0x3a, 0xcb, - 0x9a, 0x59, 0xce, 0xeb, 0xf2, 0xbb, 0xf6, 0x37, 0x13, 0xdd, 0x9b, 0x73, 0xc1, 0x5b, 0x68, 0x79, - 0xa6, 0x23, 0xe8, 0x2b, 0x89, 0x8a, 0x73, 0x5f, 0x4b, 0x2c, 0x6f, 0xcf, 0x5e, 0xd2, 0xcb, 0xb5, - 0xf8, 0x3d, 0x2a, 0x65, 0x29, 0x70, 0x1d, 0xef, 0xd6, 0x0d, 0xc6, 0x3e, 0x48, 0x81, 0xef, 0x45, - 0x87, 0xf1, 0x34, 0x57, 0x89, 0x50, 0x25, 0x2b, 0xc7, 0x02, 0xce, 0x63, 0xae, 0x62, 0x9d, 0x19, - 0x6b, 0x57, 0x82, 0x34, 0xbf, 0x6b, 0x8f, 0x0b, 0xa8, 0xf2, 0x47, 0x05, 0xaf, 0xa2, 0x8a, 0x64, - 0x46, 0x2c, 0x04, 0x9d, 0xc5, 0x8a, 0x26, 0xa9, 0x1a, 0x89, 0xd3, 0x8b, 0x0a, 0xfc, 0x00, 0x15, - 0x33, 0xbf, 0xaf, 0xba, 0xaf, 0x3a, 0x35, 0x5d, 0x58, 0x3c, 0xd8, 0xdb, 0xa1, 0x12, 0xc7, 0x6d, - 0xb4, 0xe4, 0xf1, 0x38, 0x4b, 0xe4, 0xb3, 0xca, 0x5f, 0x1a, 0xc9, 0xc7, 0x78, 0xa1, 0x10, 0xaa, - 0x6f, 0x70, 0x80, 0xca, 0x20, 0x77, 0xa0, 0x5e, 0x6a, 0x15, 0x3b, 0xb5, 0xb5, 0xe7, 0xb7, 0x88, - 0x80, 0xa8, 0x65, 0xda, 0x8d, 0x04, 0x3f, 0x99, 0x19, 0x55, 0x62, 0x34, 0xf7, 0x68, 0x1c, 0xeb, - 0x85, 0x53, 0x35, 0x78, 0x05, 0x15, 0x03, 0x38, 0xc9, 0xc7, 0xa4, 0xf2, 0x13, 0xef, 0xa3, 0xf2, - 0x50, 0xee, 0xa2, 0x7e, 0x8f, 0x67, 0x37, 0x68, 0x66, 0xba, 0xd0, 0x34, 0xd7, 0xda, 0x2c, 0x6c, - 0x98, 0xce, 0xa3, 0xb3, 0xb1, 0x65, 0x9c, 0x8f, 0x2d, 0xe3, 0xfb, 0xd8, 0x32, 0x4e, 0x27, 0x96, - 0x79, 0x36, 0xb1, 0xcc, 0xf3, 0x89, 0x65, 0xfe, 0x9c, 0x58, 0xe6, 0xa7, 0x5f, 0x96, 0xf1, 0xee, - 0x3f, 0x2d, 0xf0, 0x3b, 0x00, 0x00, 0xff, 0xff, 0xec, 0x29, 0x42, 0xc3, 0xee, 0x05, 0x00, 0x00, + // 660 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xa4, 0x53, 0xcf, 0x4f, 0x13, 0x41, + 0x14, 0xee, 0xf6, 0x07, 0xb6, 0x53, 0x51, 0x9c, 0xc4, 0xa4, 0x69, 0xe2, 0xb6, 0xa9, 0x17, 0x4c, + 0x70, 0xd6, 0x12, 0x83, 0x04, 0xe2, 0x81, 0x0d, 0x68, 0x38, 0x18, 0x93, 0x41, 0x3c, 0x98, 0x98, + 0x38, 0xdd, 0x3e, 0xb6, 0xe3, 0xb2, 0x3f, 0x32, 0x3b, 0x5b, 0xe4, 0xc6, 0x9f, 0xe0, 0xd1, 0xa3, + 0xff, 0x8b, 0x17, 0x8e, 0x1c, 0x3c, 0x78, 0x30, 0xc4, 0xd6, 0x7f, 0xc4, 0xcc, 0xec, 0x48, 0x0b, + 0x85, 0x18, 0xe1, 0xb6, 0xf3, 0xcd, 0xfb, 0xbe, 0xef, 0xbd, 0x6f, 0xf6, 0xa1, 0x8d, 0x60, 0x35, + 0x25, 0x3c, 0x76, 0x82, 0xac, 0x07, 0x22, 0x02, 0x09, 0xa9, 0x93, 0x04, 0xbe, 0xc3, 0x12, 0x9e, + 0x3a, 0x2c, 0x93, 0x03, 0x88, 0x24, 0xf7, 0x98, 0xe4, 0x71, 0xe4, 0x0c, 0xbb, 0x3d, 0x90, 0xac, + 0xeb, 0xf8, 0x10, 0x81, 0x60, 0x12, 0xfa, 0x24, 0x11, 0xb1, 0x8c, 0x71, 0x37, 0x97, 0x20, 0x13, + 0x09, 0x92, 0x04, 0x3e, 0x51, 0x12, 0xe4, 0xbc, 0x04, 0x31, 0x12, 0xcd, 0xc7, 0x3e, 0x97, 0x83, + 0xac, 0x47, 0xbc, 0x38, 0x74, 0xfc, 0xd8, 0x8f, 0x1d, 0xad, 0xd4, 0xcb, 0xf6, 0xf4, 0x49, 0x1f, + 0xf4, 0x57, 0xee, 0xd0, 0x7c, 0x6a, 0x9a, 0x64, 0x09, 0x0f, 0x99, 0x37, 0xe0, 0x11, 0x88, 0xc3, + 0x49, 0x9b, 0x21, 0x48, 0xe6, 0x0c, 0x67, 0xfa, 0x6a, 0x3a, 0x57, 0xb1, 0x44, 0x16, 0x49, 0x1e, + 0xc2, 0x0c, 0x61, 0xe5, 0x5f, 0x84, 0xd4, 0x1b, 0x40, 0xc8, 0x66, 0x78, 0xcb, 0x57, 0x66, 0xe8, + 0x08, 0x48, 0xe3, 0x4c, 0x78, 0xb3, 0x5e, 0x4b, 0x57, 0x73, 0x2e, 0x19, 0xa5, 0x7b, 0x79, 0x75, + 0x26, 0xf9, 0xbe, 0xc3, 0x23, 0x99, 0x4a, 0x71, 0x91, 0xd2, 0x79, 0x86, 0xd0, 0xd6, 0x27, 0x29, + 0xd8, 0x5b, 0xb6, 0x9f, 0x01, 0x6e, 0xa1, 0x0a, 0x97, 0x10, 0xa6, 0x0d, 0xab, 0x5d, 0x5a, 0xac, + 0xb9, 0xb5, 0xf1, 0x69, 0xab, 0xb2, 0xad, 0x00, 0x9a, 0xe3, 0x6b, 0xd5, 0x2f, 0x5f, 0x5b, 0x85, + 0xa3, 0x9f, 0xed, 0x42, 0xe7, 0x5b, 0x11, 0xd5, 0xdf, 0xc4, 0x01, 0x44, 0x14, 0x86, 0x1c, 0x0e, + 0xf0, 0x07, 0x54, 0x55, 0x09, 0xf7, 0x99, 0x64, 0x0d, 0xab, 0x6d, 0x2d, 0xd6, 0x97, 0x9f, 0x10, + 0xf3, 0xe2, 0xd3, 0x41, 0x4d, 0xde, 0x5c, 0x55, 0x93, 0x61, 0x97, 0xbc, 0xee, 0x7d, 0x04, 0x4f, + 0xbe, 0x02, 0xc9, 0x5c, 0x7c, 0x7c, 0xda, 0x2a, 0x8c, 0x4f, 0x5b, 0x68, 0x82, 0xd1, 0x33, 0x55, + 0xdc, 0x47, 0xe5, 0x34, 0x01, 0xaf, 0x51, 0xd4, 0xea, 0x2e, 0xf9, 0xef, 0xff, 0x89, 0x4c, 0xf5, + 0xbb, 0x93, 0x80, 0xe7, 0xde, 0x36, 0x7e, 0x65, 0x75, 0xa2, 0x5a, 0x1d, 0xef, 0xa3, 0xb9, 0x54, + 0x32, 0x99, 0xa5, 0x8d, 0x92, 0xf6, 0xd9, 0xbc, 0xa1, 0x8f, 0xd6, 0x72, 0xef, 0x18, 0xa7, 0xb9, + 0xfc, 0x4c, 0x8d, 0x47, 0x67, 0x05, 0xdd, 0xbd, 0xd0, 0x14, 0x7e, 0x88, 0x2a, 0x52, 0x41, 0x3a, + 0xc5, 0x9a, 0x3b, 0x6f, 0x98, 0x95, 0xbc, 0x2e, 0xbf, 0xeb, 0x7c, 0xb7, 0xd0, 0xbd, 0x19, 0x17, + 0xbc, 0x8e, 0xe6, 0xa7, 0x3a, 0x82, 0xbe, 0x96, 0xa8, 0xba, 0xf7, 0x8d, 0xc4, 0xfc, 0xc6, 0xf4, + 0x25, 0x3d, 0x5f, 0x8b, 0xdf, 0xa3, 0x72, 0x96, 0x82, 0x30, 0xf1, 0xae, 0x5f, 0x63, 0xec, 0xdd, + 0x14, 0xc4, 0x76, 0xb4, 0x17, 0x4f, 0x72, 0x55, 0x08, 0xd5, 0xb2, 0x6a, 0x2c, 0x10, 0x22, 0x16, + 0x3a, 0xd6, 0xa9, 0xb1, 0xb6, 0x14, 0x48, 0xf3, 0xbb, 0xce, 0xa8, 0x88, 0xaa, 0x7f, 0x55, 0xf0, + 0x12, 0xaa, 0x2a, 0x66, 0xc4, 0x42, 0x30, 0x59, 0x2c, 0x18, 0x92, 0xae, 0x51, 0x38, 0x3d, 0xab, + 0xc0, 0x0f, 0x50, 0x29, 0xe3, 0x7d, 0xdd, 0x7d, 0xcd, 0xad, 0x9b, 0xc2, 0xd2, 0xee, 0xf6, 0x26, + 0x55, 0x38, 0xee, 0xa0, 0x39, 0x5f, 0xc4, 0x59, 0xa2, 0x9e, 0x55, 0xfd, 0xda, 0x48, 0x3d, 0xc6, + 0x4b, 0x8d, 0x50, 0x73, 0x83, 0x03, 0x54, 0x01, 0xb5, 0x0b, 0x8d, 0x72, 0xbb, 0xb4, 0x58, 0x5f, + 0x7e, 0x71, 0x83, 0x08, 0x88, 0x5e, 0xaa, 0xad, 0x48, 0x8a, 0xc3, 0xa9, 0x51, 0x15, 0x46, 0x73, + 0x8f, 0xe6, 0x81, 0x59, 0x3c, 0x5d, 0x83, 0x17, 0x50, 0x29, 0x80, 0xc3, 0x7c, 0x4c, 0xaa, 0x3e, + 0xf1, 0x0e, 0xaa, 0x0c, 0xd5, 0x4e, 0x9a, 0xf7, 0x78, 0x7e, 0x8d, 0x66, 0x26, 0x8b, 0x4d, 0x73, + 0xad, 0xb5, 0xe2, 0xaa, 0xe5, 0x3e, 0x3a, 0x1e, 0xd9, 0x85, 0x93, 0x91, 0x5d, 0xf8, 0x31, 0xb2, + 0x0b, 0x47, 0x63, 0xdb, 0x3a, 0x1e, 0xdb, 0xd6, 0xc9, 0xd8, 0xb6, 0x7e, 0x8d, 0x6d, 0xeb, 0xf3, + 0x6f, 0xbb, 0xf0, 0xee, 0x96, 0x11, 0xf8, 0x13, 0x00, 0x00, 0xff, 0xff, 0x29, 0x85, 0x06, 0x53, + 0xf6, 0x05, 0x00, 0x00, } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/generated.proto b/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/generated.proto index 7df6a8d7..96c1504b 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/generated.proto +++ b/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/generated.proto @@ -45,7 +45,7 @@ message ExtraValue { // plugin in the kube-apiserver. message TokenReview { // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec holds information about the request being evaluated optional TokenReviewSpec spec = 2; diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/register.go b/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/register.go index f29dae3c..ddaa1970 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/register.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/register.go @@ -20,7 +20,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/api/v1" ) // GroupName is the group name use in this package @@ -42,12 +41,8 @@ var ( // Adds the list of known types to api.Scheme. func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, - &v1.ListOptions{}, - &v1.DeleteOptions{}, - &metav1.ExportOptions{}, - &metav1.GetOptions{}, - &TokenReview{}, ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/types.generated.go b/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/types.generated.go index dc81a013..b8990af1 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/types.generated.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/types.generated.go @@ -26,8 +26,7 @@ import ( "fmt" codec1978 "github.com/ugorji/go/codec" pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - pkg3_types "k8s.io/apimachinery/pkg/types" - pkg2_v1 "k8s.io/kubernetes/pkg/api/v1" + pkg2_types "k8s.io/apimachinery/pkg/types" "reflect" "runtime" time "time" @@ -64,10 +63,9 @@ func init() { } if false { // reference the types, but skip this branch at build/run time var v0 pkg1_v1.TypeMeta - var v1 pkg3_types.UID - var v2 pkg2_v1.ObjectMeta - var v3 time.Time - _, _, _, _ = v0, v1, v2, v3 + var v1 pkg2_types.UID + var v2 time.Time + _, _, _ = v0, v1, v2 } } @@ -159,7 +157,13 @@ func (x *TokenReview) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -169,7 +173,13 @@ func (x *TokenReview) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -287,24 +297,30 @@ func (x *TokenReview) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = TokenReviewSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = TokenReviewStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -317,16 +333,16 @@ func (x *TokenReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -334,21 +350,21 @@ func (x *TokenReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -356,38 +372,44 @@ func (x *TokenReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -395,16 +417,16 @@ func (x *TokenReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = TokenReviewSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -412,21 +434,21 @@ func (x *TokenReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = TokenReviewStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/types.go b/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/types.go index ef2e0560..57c96e3b 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/types.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/types.go @@ -20,7 +20,6 @@ import ( "fmt" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/kubernetes/pkg/api/v1" ) // +genclient=true @@ -33,7 +32,7 @@ import ( type TokenReview struct { metav1.TypeMeta `json:",inline"` // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec holds information about the request being evaluated Spec TokenReviewSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/zz_generated.conversion.go index 960ffb34..69f0fc8a 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/zz_generated.conversion.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/zz_generated.conversion.go @@ -47,10 +47,7 @@ func RegisterConversions(scheme *runtime.Scheme) error { } func autoConvert_v1beta1_TokenReview_To_authentication_TokenReview(in *TokenReview, out *authentication.TokenReview, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_TokenReviewSpec_To_authentication_TokenReviewSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -65,10 +62,7 @@ func Convert_v1beta1_TokenReview_To_authentication_TokenReview(in *TokenReview, } func autoConvert_authentication_TokenReview_To_v1beta1_TokenReview(in *authentication.TokenReview, out *TokenReview, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_authentication_TokenReviewSpec_To_v1beta1_TokenReviewSpec(&in.Spec, &out.Spec, s); err != nil { return err } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/zz_generated.deepcopy.go index f7d417ac..01260cc1 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/authentication/v1beta1/zz_generated.deepcopy.go @@ -21,9 +21,9 @@ limitations under the License. package v1beta1 import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - v1 "k8s.io/kubernetes/pkg/api/v1" reflect "reflect" ) @@ -47,8 +47,10 @@ func DeepCopy_v1beta1_TokenReview(in interface{}, out interface{}, c *conversion in := in.(*TokenReview) out := out.(*TokenReview) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v1beta1_TokenReviewStatus(&in.Status, &out.Status, c); err != nil { return err diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authentication/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/authentication/zz_generated.deepcopy.go index fafe595b..ec322c5f 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/authentication/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/authentication/zz_generated.deepcopy.go @@ -21,9 +21,9 @@ limitations under the License. package authentication import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - api "k8s.io/kubernetes/pkg/api" reflect "reflect" ) @@ -47,8 +47,10 @@ func DeepCopy_authentication_TokenReview(in interface{}, out interface{}, c *con in := in.(*TokenReview) out := out.(*TokenReview) *out = *in - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_authentication_TokenReviewStatus(&in.Status, &out.Status, c); err != nil { return err diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authorization/BUILD b/vendor/k8s.io/kubernetes/pkg/apis/authorization/BUILD index cc0da7d2..a25f7777 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/authorization/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/apis/authorization/BUILD @@ -17,7 +17,6 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/conversion", "//vendor:k8s.io/apimachinery/pkg/runtime", diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authorization/install/BUILD b/vendor/k8s.io/kubernetes/pkg/apis/authorization/install/BUILD index e0b27ccd..d3754c38 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/authorization/install/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/apis/authorization/install/BUILD @@ -12,9 +12,12 @@ go_library( srcs = ["install.go"], tags = ["automanaged"], deps = [ - "//pkg/apimachinery/announced:go_default_library", + "//pkg/api:go_default_library", "//pkg/apis/authorization:go_default_library", "//pkg/apis/authorization/v1beta1:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apimachinery/announced", + "//vendor:k8s.io/apimachinery/pkg/apimachinery/registered", + "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/sets", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authorization/install/install.go b/vendor/k8s.io/kubernetes/pkg/apis/authorization/install/install.go index a26fa36e..5b320c85 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/authorization/install/install.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/authorization/install/install.go @@ -19,13 +19,21 @@ limitations under the License. package install import ( + "k8s.io/apimachinery/pkg/apimachinery/announced" + "k8s.io/apimachinery/pkg/apimachinery/registered" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/kubernetes/pkg/apimachinery/announced" + "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/authorization" "k8s.io/kubernetes/pkg/apis/authorization/v1beta1" ) func init() { + Install(api.GroupFactoryRegistry, api.Registry, api.Scheme) +} + +// Install registers the API group and adds types to a scheme +func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) { if err := announced.NewGroupMetaFactory( &announced.GroupMetaFactoryArgs{ GroupName: authorization.GroupName, @@ -37,7 +45,7 @@ func init() { announced.VersionToSchemeFunc{ v1beta1.SchemeGroupVersion.Version: v1beta1.AddToScheme, }, - ).Announce().RegisterAndEnable(); err != nil { + ).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil { panic(err) } } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authorization/register.go b/vendor/k8s.io/kubernetes/pkg/apis/authorization/register.go index 55c6020b..5693885e 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/authorization/register.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/authorization/register.go @@ -17,10 +17,8 @@ limitations under the License. package authorization import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/api" ) // GroupName is the group name use in this package @@ -46,11 +44,6 @@ var ( func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, - &api.ListOptions{}, - &api.DeleteOptions{}, - &metav1.ExportOptions{}, - &metav1.GetOptions{}, - &SelfSubjectAccessReview{}, &SubjectAccessReview{}, &LocalSubjectAccessReview{}, diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authorization/types.go b/vendor/k8s.io/kubernetes/pkg/apis/authorization/types.go index 42f3122b..d8ccfaf3 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/authorization/types.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/authorization/types.go @@ -18,7 +18,6 @@ package authorization import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/kubernetes/pkg/api" ) // +genclient=true @@ -29,7 +28,7 @@ import ( // spec.namespace means "in all namespaces". type SubjectAccessReview struct { metav1.TypeMeta - api.ObjectMeta + metav1.ObjectMeta // Spec holds information about the request being evaluated Spec SubjectAccessReviewSpec @@ -47,7 +46,7 @@ type SubjectAccessReview struct { // to check whether they can perform an action type SelfSubjectAccessReview struct { metav1.TypeMeta - api.ObjectMeta + metav1.ObjectMeta // Spec holds information about the request being evaluated. Spec SelfSubjectAccessReviewSpec @@ -64,7 +63,7 @@ type SelfSubjectAccessReview struct { // checking. type LocalSubjectAccessReview struct { metav1.TypeMeta - api.ObjectMeta + metav1.ObjectMeta // Spec holds information about the request being evaluated. spec.namespace must be equal to the namespace // you made the request against. If empty, it is defaulted. diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/BUILD b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/BUILD index e0044b9e..4ad249d5 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/BUILD @@ -24,7 +24,6 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api/v1:go_default_library", "//pkg/apis/authorization:go_default_library", "//vendor:github.com/gogo/protobuf/proto", "//vendor:github.com/gogo/protobuf/sortkeys", diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/generated.pb.go b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/generated.pb.go index 93771098..44c464ca 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/generated.pb.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/generated.pb.go @@ -670,7 +670,7 @@ func (this *LocalSubjectAccessReview) String() string { return "nil" } s := strings.Join([]string{`&LocalSubjectAccessReview{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "SubjectAccessReviewSpec", "SubjectAccessReviewSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "SubjectAccessReviewStatus", "SubjectAccessReviewStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -709,7 +709,7 @@ func (this *SelfSubjectAccessReview) String() string { return "nil" } s := strings.Join([]string{`&SelfSubjectAccessReview{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "SelfSubjectAccessReviewSpec", "SelfSubjectAccessReviewSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "SubjectAccessReviewStatus", "SubjectAccessReviewStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -732,7 +732,7 @@ func (this *SubjectAccessReview) String() string { return "nil" } s := strings.Join([]string{`&SubjectAccessReview{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "SubjectAccessReviewSpec", "SubjectAccessReviewSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "SubjectAccessReviewStatus", "SubjectAccessReviewStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -2283,61 +2283,62 @@ var ( ) var fileDescriptorGenerated = []byte{ - // 891 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x56, 0x4f, 0x8f, 0xdb, 0x44, - 0x14, 0x8f, 0x93, 0x78, 0x37, 0x99, 0x05, 0xb6, 0x4c, 0x55, 0xd6, 0x5d, 0x24, 0x27, 0x0a, 0x12, - 0xda, 0x4a, 0xc5, 0x66, 0x57, 0xfc, 0xa9, 0x2a, 0x0e, 0xac, 0xc5, 0xaa, 0xaa, 0xa0, 0x05, 0xcd, - 0xc2, 0x0a, 0xc1, 0x69, 0xec, 0x7d, 0x4d, 0x4c, 0x12, 0x8f, 0x35, 0x33, 0x76, 0x09, 0xa7, 0x7e, - 0x00, 0x0e, 0x1c, 0x7b, 0xe4, 0x2b, 0xf0, 0x05, 0xb8, 0xb2, 0xc7, 0x72, 0x41, 0x20, 0xa1, 0x88, - 0x35, 0xdf, 0x82, 0x13, 0xf2, 0x78, 0x12, 0x37, 0x8d, 0x43, 0x15, 0x58, 0xa1, 0x1e, 0x7a, 0xf3, - 0xbc, 0x3f, 0xbf, 0xf7, 0x9b, 0x37, 0xbf, 0xf1, 0x1b, 0xf4, 0xfe, 0xf0, 0x86, 0x70, 0x42, 0xe6, - 0x0e, 0x13, 0x1f, 0x78, 0x04, 0x12, 0x84, 0x1b, 0x0f, 0xfb, 0x2e, 0x8d, 0x43, 0xe1, 0xd2, 0x44, - 0x0e, 0x18, 0x0f, 0xbf, 0xa1, 0x32, 0x64, 0x91, 0x9b, 0xee, 0xfb, 0x20, 0xe9, 0xbe, 0xdb, 0x87, - 0x08, 0x38, 0x95, 0x70, 0xea, 0xc4, 0x9c, 0x49, 0x86, 0xdf, 0x2c, 0x10, 0x9c, 0x12, 0xc1, 0x89, - 0x87, 0x7d, 0x27, 0x47, 0x70, 0x16, 0x10, 0x1c, 0x8d, 0xb0, 0xfb, 0x46, 0x3f, 0x94, 0x83, 0xc4, - 0x77, 0x02, 0x36, 0x76, 0xfb, 0xac, 0xcf, 0x5c, 0x05, 0xe4, 0x27, 0xf7, 0xd4, 0x4a, 0x2d, 0xd4, - 0x57, 0x51, 0x60, 0xf7, 0x2d, 0x4d, 0x91, 0xc6, 0xe1, 0x98, 0x06, 0x83, 0x30, 0x02, 0x3e, 0x29, - 0x49, 0x8e, 0x41, 0x52, 0x37, 0x5d, 0xa2, 0xb5, 0xeb, 0xae, 0xca, 0xe2, 0x49, 0x24, 0xc3, 0x31, - 0x2c, 0x25, 0xbc, 0xf3, 0xb4, 0x04, 0x11, 0x0c, 0x60, 0x4c, 0x97, 0xf2, 0x0e, 0x56, 0x76, 0xd0, - 0xe5, 0x20, 0x58, 0xc2, 0x83, 0xe5, 0x5a, 0xd7, 0x57, 0xe7, 0x54, 0x6c, 0x65, 0xbf, 0x3a, 0x3a, - 0x91, 0xe1, 0xc8, 0x0d, 0x23, 0x29, 0x24, 0x7f, 0x32, 0xa5, 0xf7, 0x2e, 0x42, 0x47, 0x5f, 0x4b, - 0x4e, 0x4f, 0xe8, 0x28, 0x01, 0xdc, 0x41, 0x66, 0x28, 0x61, 0x2c, 0x2c, 0xa3, 0xdb, 0xd8, 0x6b, - 0x7b, 0xed, 0x6c, 0xda, 0x31, 0x6f, 0xe7, 0x06, 0x52, 0xd8, 0x6f, 0xb6, 0x1e, 0x7e, 0xdf, 0xa9, - 0x3d, 0xf8, 0xbd, 0x5b, 0xeb, 0xfd, 0x52, 0x47, 0xd6, 0x47, 0x2c, 0xa0, 0xa3, 0xe3, 0xc4, 0xff, - 0x0a, 0x02, 0x79, 0x18, 0x04, 0x20, 0x04, 0x81, 0x34, 0x84, 0xfb, 0xf8, 0x73, 0xd4, 0xca, 0xdb, - 0x7d, 0x4a, 0x25, 0xb5, 0x8c, 0xae, 0xb1, 0xb7, 0x75, 0xb0, 0xe7, 0xac, 0x3c, 0x7d, 0x27, 0xdd, - 0x77, 0x3e, 0x56, 0x18, 0x77, 0x40, 0x52, 0x0f, 0x9f, 0x4d, 0x3b, 0xb5, 0x6c, 0xda, 0x41, 0xa5, - 0x8d, 0xcc, 0xd1, 0xf0, 0x10, 0x35, 0x45, 0x0c, 0x81, 0x55, 0x57, 0xa8, 0xb7, 0x9d, 0x75, 0x35, - 0xe5, 0x54, 0xd0, 0x3d, 0x8e, 0x21, 0xf0, 0x5e, 0xd0, 0x65, 0x9b, 0xf9, 0x8a, 0xa8, 0x22, 0x58, - 0xa0, 0x0d, 0x21, 0xa9, 0x4c, 0x84, 0xd5, 0x50, 0xe5, 0x3e, 0xbc, 0x98, 0x72, 0x0a, 0xd2, 0x7b, - 0x49, 0x17, 0xdc, 0x28, 0xd6, 0x44, 0x97, 0xea, 0x7d, 0x89, 0xae, 0xdc, 0x65, 0x11, 0xd1, 0x8a, - 0x38, 0x94, 0x92, 0x87, 0x7e, 0x22, 0x41, 0xe0, 0x2e, 0x6a, 0xc6, 0x54, 0x0e, 0x54, 0x43, 0xdb, - 0x25, 0xdf, 0x4f, 0xa8, 0x1c, 0x10, 0xe5, 0xc9, 0x23, 0x52, 0xe0, 0xbe, 0x6a, 0xce, 0x63, 0x11, - 0x27, 0xc0, 0x7d, 0xa2, 0x3c, 0xbd, 0x1f, 0xeb, 0x08, 0x57, 0x40, 0xbb, 0xa8, 0x1d, 0xd1, 0x31, - 0x88, 0x98, 0x06, 0xa0, 0xf1, 0x5f, 0xd6, 0xd9, 0xed, 0xbb, 0x33, 0x07, 0x29, 0x63, 0x9e, 0x5e, - 0x09, 0xbf, 0x86, 0xcc, 0x3e, 0x67, 0x49, 0xac, 0x5a, 0xd7, 0xf6, 0x5e, 0xd4, 0x21, 0xe6, 0xad, - 0xdc, 0x48, 0x0a, 0x1f, 0xbe, 0x86, 0x36, 0x53, 0xe0, 0x22, 0x64, 0x91, 0xd5, 0x54, 0x61, 0xdb, - 0x3a, 0x6c, 0xf3, 0xa4, 0x30, 0x93, 0x99, 0x1f, 0x5f, 0x47, 0xad, 0xd9, 0x2d, 0xb1, 0x4c, 0x15, - 0x7b, 0x49, 0xc7, 0xb6, 0x66, 0x1b, 0x22, 0xf3, 0x08, 0xfc, 0x36, 0xda, 0x12, 0x89, 0x3f, 0x4f, - 0xd8, 0x50, 0x09, 0x97, 0x75, 0xc2, 0xd6, 0x71, 0xe9, 0x22, 0x8f, 0xc7, 0xe5, 0xdb, 0xca, 0xf7, - 0x68, 0x6d, 0x2e, 0x6e, 0x2b, 0x6f, 0x01, 0x51, 0x9e, 0xde, 0x6f, 0x75, 0xb4, 0x73, 0x0c, 0xa3, - 0x7b, 0xff, 0xaf, 0xea, 0xd9, 0x82, 0xea, 0xef, 0xfc, 0x0b, 0x19, 0x56, 0x53, 0x7e, 0xb6, 0x94, - 0xff, 0x53, 0x1d, 0xbd, 0xfa, 0x0f, 0x44, 0xf1, 0xb7, 0x06, 0xc2, 0x7c, 0x49, 0xbc, 0xba, 0xd5, - 0x1f, 0xac, 0xcf, 0x70, 0xf9, 0x22, 0x78, 0xaf, 0x64, 0xd3, 0x4e, 0xc5, 0x05, 0x21, 0x15, 0x75, - 0xf1, 0x43, 0x03, 0x5d, 0x89, 0xaa, 0x6e, 0xaa, 0x3e, 0xa6, 0x5b, 0xeb, 0x33, 0xaa, 0xbc, 0xf8, - 0xde, 0xd5, 0x6c, 0xda, 0xa9, 0xfe, 0x27, 0x90, 0x6a, 0x02, 0xbd, 0x9f, 0xeb, 0xe8, 0xf2, 0xf3, - 0xff, 0xf2, 0xc5, 0xaa, 0xf3, 0xaf, 0x26, 0xda, 0x79, 0xae, 0xcc, 0xff, 0xa8, 0xcc, 0xf9, 0xe0, - 0x68, 0x2c, 0xfe, 0x61, 0x3f, 0x13, 0xc0, 0xf5, 0xe0, 0xe8, 0xce, 0x06, 0x47, 0x53, 0xbd, 0x41, - 0x50, 0x7e, 0x14, 0x6a, 0x68, 0x88, 0xd9, 0xd4, 0x98, 0x20, 0x13, 0xf2, 0x37, 0x8b, 0x65, 0x76, - 0x1b, 0x7b, 0x5b, 0x07, 0x9f, 0x5e, 0x98, 0xd8, 0x1c, 0xf5, 0x14, 0x3a, 0x8a, 0x24, 0x9f, 0x94, - 0x03, 0x4b, 0xd9, 0x48, 0x51, 0x71, 0x37, 0xd5, 0xcf, 0x25, 0x15, 0x83, 0x2f, 0xa1, 0xc6, 0x10, - 0x26, 0xc5, 0xc0, 0x24, 0xf9, 0x27, 0x26, 0xc8, 0x4c, 0xf3, 0x97, 0x94, 0x6e, 0xf4, 0x7b, 0xeb, - 0x53, 0x2b, 0x5f, 0x63, 0xa4, 0x80, 0xba, 0x59, 0xbf, 0x61, 0xf4, 0x7e, 0x30, 0xd0, 0xd5, 0x95, - 0x92, 0xcd, 0xc7, 0x28, 0x1d, 0x8d, 0xd8, 0x7d, 0x38, 0x55, 0x5c, 0x5a, 0xe5, 0x18, 0x3d, 0x2c, - 0xcc, 0x64, 0xe6, 0xc7, 0xaf, 0xa3, 0x0d, 0x0e, 0x54, 0xb0, 0x48, 0x8f, 0xee, 0xb9, 0xda, 0x89, - 0xb2, 0x12, 0xed, 0xc5, 0x87, 0x68, 0x1b, 0xf2, 0xf2, 0x8a, 0xdc, 0x11, 0xe7, 0x8c, 0xeb, 0x23, - 0xdb, 0xd1, 0x09, 0xdb, 0x47, 0x8b, 0x6e, 0xf2, 0x64, 0xbc, 0x77, 0xed, 0xec, 0xdc, 0xae, 0x3d, - 0x3a, 0xb7, 0x6b, 0xbf, 0x9e, 0xdb, 0xb5, 0x07, 0x99, 0x6d, 0x9c, 0x65, 0xb6, 0xf1, 0x28, 0xb3, - 0x8d, 0x3f, 0x32, 0xdb, 0xf8, 0xee, 0x4f, 0xbb, 0xf6, 0xc5, 0xa6, 0xde, 0xf4, 0xdf, 0x01, 0x00, - 0x00, 0xff, 0xff, 0x1f, 0x8b, 0xf7, 0x94, 0x5d, 0x0c, 0x00, 0x00, + // 897 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x56, 0x4f, 0x6f, 0xdc, 0x44, + 0x14, 0x5f, 0xef, 0x9f, 0x64, 0x77, 0x02, 0xa4, 0x4c, 0x55, 0xe2, 0x06, 0xc9, 0xbb, 0x5a, 0x24, + 0x94, 0x4a, 0xc5, 0x6e, 0x22, 0xfe, 0x54, 0x15, 0x07, 0x62, 0x11, 0x55, 0x15, 0xb4, 0xa0, 0x09, + 0xe4, 0x00, 0x17, 0xc6, 0xce, 0xeb, 0xae, 0xd9, 0x5d, 0x8f, 0x35, 0x33, 0x76, 0x09, 0xa7, 0x7e, + 0x00, 0x0e, 0x1c, 0x7b, 0xe4, 0x2b, 0xf0, 0x05, 0xb8, 0x92, 0x63, 0x8f, 0x20, 0xa1, 0x15, 0x31, + 0xdf, 0x82, 0x13, 0x9a, 0xf1, 0xec, 0x3a, 0xdb, 0x75, 0xa8, 0x16, 0x8a, 0xe8, 0xa1, 0x37, 0xfb, + 0xbd, 0xdf, 0xfb, 0xbd, 0xdf, 0xbc, 0x79, 0x33, 0x6f, 0xd0, 0x07, 0xa3, 0x9b, 0xc2, 0x8d, 0x98, + 0x37, 0x4a, 0x03, 0xe0, 0x31, 0x48, 0x10, 0x5e, 0x32, 0x1a, 0x78, 0x34, 0x89, 0x84, 0x47, 0x53, + 0x39, 0x64, 0x3c, 0xfa, 0x96, 0xca, 0x88, 0xc5, 0x5e, 0xb6, 0x1b, 0x80, 0xa4, 0xbb, 0xde, 0x00, + 0x62, 0xe0, 0x54, 0xc2, 0xb1, 0x9b, 0x70, 0x26, 0x19, 0xbe, 0x51, 0x30, 0xb8, 0x25, 0x83, 0x9b, + 0x8c, 0x06, 0xae, 0x62, 0x70, 0x17, 0x18, 0x5c, 0xc3, 0xb0, 0xfd, 0xd6, 0x20, 0x92, 0xc3, 0x34, + 0x70, 0x43, 0x36, 0xf1, 0x06, 0x6c, 0xc0, 0x3c, 0x4d, 0x14, 0xa4, 0xf7, 0xf5, 0x9f, 0xfe, 0xd1, + 0x5f, 0x45, 0x82, 0xed, 0xb7, 0x8d, 0x44, 0x9a, 0x44, 0x13, 0x1a, 0x0e, 0xa3, 0x18, 0xf8, 0x49, + 0x29, 0x72, 0x02, 0x92, 0x7a, 0xd9, 0x92, 0xac, 0x6d, 0xef, 0xa2, 0x28, 0x9e, 0xc6, 0x32, 0x9a, + 0xc0, 0x52, 0xc0, 0xbb, 0x4f, 0x0b, 0x10, 0xe1, 0x10, 0x26, 0x74, 0x29, 0x6e, 0xef, 0xc2, 0x0a, + 0x7a, 0x1c, 0x04, 0x4b, 0x79, 0xb8, 0x9c, 0xeb, 0xfa, 0xc5, 0x31, 0x15, 0x4b, 0xd9, 0xad, 0x46, + 0xa7, 0x32, 0x1a, 0x7b, 0x51, 0x2c, 0x85, 0xe4, 0x4f, 0x86, 0xf4, 0xdf, 0x43, 0xe8, 0xe0, 0x1b, + 0xc9, 0xe9, 0x11, 0x1d, 0xa7, 0x80, 0xbb, 0xa8, 0x15, 0x49, 0x98, 0x08, 0xdb, 0xea, 0x35, 0x76, + 0x3a, 0x7e, 0x27, 0x9f, 0x76, 0x5b, 0x77, 0x94, 0x81, 0x14, 0xf6, 0x5b, 0xed, 0x47, 0x3f, 0x74, + 0x6b, 0x0f, 0x7f, 0xeb, 0xd5, 0xfa, 0xd3, 0x3a, 0xb2, 0x3f, 0x66, 0x21, 0x1d, 0x1f, 0xa6, 0xc1, + 0xd7, 0x10, 0xca, 0xfd, 0x30, 0x04, 0x21, 0x08, 0x64, 0x11, 0x3c, 0xc0, 0x5f, 0xa1, 0xb6, 0x2a, + 0xf7, 0x31, 0x95, 0xd4, 0xb6, 0x7a, 0xd6, 0xce, 0xc6, 0xde, 0x0d, 0xd7, 0xec, 0xfe, 0xf9, 0xaa, + 0x95, 0xfb, 0xaf, 0xd0, 0x6e, 0xb6, 0xeb, 0x7e, 0xa2, 0xb9, 0xee, 0x82, 0xa4, 0x3e, 0x3e, 0x9d, + 0x76, 0x6b, 0xf9, 0xb4, 0x8b, 0x4a, 0x1b, 0x99, 0xb3, 0xe2, 0x11, 0x6a, 0x8a, 0x04, 0x42, 0xbb, + 0xae, 0xd9, 0xef, 0xb8, 0xab, 0xf6, 0x96, 0x5b, 0x21, 0xfb, 0x30, 0x81, 0xd0, 0x7f, 0xc9, 0xa4, + 0x6d, 0xaa, 0x3f, 0xa2, 0x93, 0x60, 0x81, 0xd6, 0x84, 0xa4, 0x32, 0x15, 0x76, 0x43, 0xa7, 0xfb, + 0xe8, 0xd9, 0xa4, 0xd3, 0x94, 0xfe, 0x2b, 0x26, 0xe1, 0x5a, 0xf1, 0x4f, 0x4c, 0xaa, 0xfe, 0x97, + 0xe8, 0xca, 0x3d, 0x16, 0x13, 0xd3, 0x19, 0xfb, 0x52, 0xf2, 0x28, 0x48, 0x25, 0x08, 0xdc, 0x43, + 0xcd, 0x84, 0xca, 0xa1, 0x2e, 0x6c, 0xa7, 0xd4, 0xfb, 0x29, 0x95, 0x43, 0xa2, 0x3d, 0x0a, 0x91, + 0x01, 0x0f, 0x74, 0x71, 0xce, 0x21, 0x8e, 0x80, 0x07, 0x44, 0x7b, 0xfa, 0x3f, 0xd5, 0x11, 0xae, + 0xa0, 0xf6, 0x50, 0x27, 0xa6, 0x13, 0x10, 0x09, 0x0d, 0xc1, 0xf0, 0xbf, 0x6a, 0xa2, 0x3b, 0xf7, + 0x66, 0x0e, 0x52, 0x62, 0x9e, 0x9e, 0x09, 0xbf, 0x81, 0x5a, 0x03, 0xce, 0xd2, 0x44, 0x97, 0xae, + 0xe3, 0xbf, 0x6c, 0x20, 0xad, 0xdb, 0xca, 0x48, 0x0a, 0x1f, 0xbe, 0x86, 0xd6, 0x33, 0xe0, 0x22, + 0x62, 0xb1, 0xdd, 0xd4, 0xb0, 0x4d, 0x03, 0x5b, 0x3f, 0x2a, 0xcc, 0x64, 0xe6, 0xc7, 0xd7, 0x51, + 0x7b, 0x76, 0x5a, 0xec, 0x96, 0xc6, 0x5e, 0x32, 0xd8, 0xf6, 0x6c, 0x41, 0x64, 0x8e, 0xc0, 0xef, + 0xa0, 0x0d, 0x91, 0x06, 0xf3, 0x80, 0x35, 0x1d, 0x70, 0xd9, 0x04, 0x6c, 0x1c, 0x96, 0x2e, 0x72, + 0x1e, 0xa7, 0x96, 0xa5, 0xd6, 0x68, 0xaf, 0x2f, 0x2e, 0x4b, 0x95, 0x80, 0x68, 0x4f, 0xff, 0xac, + 0x8e, 0xb6, 0x0e, 0x61, 0x7c, 0xff, 0xff, 0xe9, 0x7e, 0xb6, 0xd0, 0xfd, 0x77, 0xff, 0x41, 0x3b, + 0x56, 0x4b, 0x7f, 0xbe, 0x4e, 0xc0, 0xcf, 0x75, 0xf4, 0xfa, 0xdf, 0x08, 0xc5, 0xdf, 0x59, 0x08, + 0xf3, 0xa5, 0x26, 0x36, 0x25, 0xff, 0x70, 0x75, 0x85, 0xcb, 0x07, 0xc2, 0x7f, 0x2d, 0x9f, 0x76, + 0x2b, 0x0e, 0x0a, 0xa9, 0xc8, 0x8b, 0x1f, 0x59, 0xe8, 0x4a, 0x5c, 0x75, 0x62, 0xcd, 0x36, 0xdd, + 0x5e, 0x5d, 0x51, 0xe5, 0x05, 0xe0, 0x5f, 0xcd, 0xa7, 0xdd, 0xea, 0xbb, 0x81, 0x54, 0x0b, 0xe8, + 0xff, 0x5a, 0x47, 0x97, 0x5f, 0xdc, 0xd3, 0xff, 0x4d, 0x97, 0xfe, 0xd9, 0x44, 0x5b, 0x2f, 0x3a, + 0xf4, 0x5f, 0x76, 0xe8, 0x7c, 0x90, 0x34, 0x16, 0x6f, 0xdc, 0xcf, 0x05, 0x70, 0x33, 0x48, 0x7a, + 0xb3, 0x41, 0xd2, 0xd4, 0x6f, 0x13, 0xa4, 0xb6, 0x42, 0x0f, 0x11, 0x31, 0x9b, 0x22, 0x27, 0xa8, + 0x05, 0xea, 0x2d, 0x63, 0xb7, 0x7a, 0x8d, 0x9d, 0x8d, 0xbd, 0xcf, 0x9e, 0x59, 0xb3, 0xb9, 0xfa, + 0x89, 0x74, 0x10, 0x4b, 0x7e, 0x52, 0x0e, 0x30, 0x6d, 0x23, 0x45, 0xc6, 0xed, 0xcc, 0x3c, 0xa3, + 0x34, 0x06, 0x5f, 0x42, 0x8d, 0x11, 0x9c, 0x14, 0x03, 0x94, 0xa8, 0x4f, 0x4c, 0x50, 0x2b, 0x53, + 0x2f, 0x2c, 0x53, 0xe8, 0xf7, 0x57, 0x97, 0x56, 0xbe, 0xd2, 0x48, 0x41, 0x75, 0xab, 0x7e, 0xd3, + 0xea, 0xff, 0x68, 0xa1, 0xab, 0x17, 0xb6, 0xac, 0x1a, 0xab, 0x74, 0x3c, 0x66, 0x0f, 0xe0, 0x58, + 0x6b, 0x69, 0x97, 0x63, 0x75, 0xbf, 0x30, 0x93, 0x99, 0x1f, 0xbf, 0x89, 0xd6, 0x38, 0x50, 0xc1, + 0x62, 0x33, 0xca, 0xe7, 0xdd, 0x4e, 0xb4, 0x95, 0x18, 0x2f, 0xde, 0x47, 0x9b, 0xa0, 0xd2, 0x6b, + 0x71, 0x07, 0x9c, 0x33, 0x6e, 0xb6, 0x6c, 0xcb, 0x04, 0x6c, 0x1e, 0x2c, 0xba, 0xc9, 0x93, 0x78, + 0xff, 0xda, 0xe9, 0x99, 0x53, 0x7b, 0x7c, 0xe6, 0xd4, 0x7e, 0x39, 0x73, 0x6a, 0x0f, 0x73, 0xc7, + 0x3a, 0xcd, 0x1d, 0xeb, 0x71, 0xee, 0x58, 0xbf, 0xe7, 0x8e, 0xf5, 0xfd, 0x1f, 0x4e, 0xed, 0x8b, + 0x75, 0xb3, 0xe8, 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0x31, 0x9f, 0xbd, 0x1e, 0x75, 0x0c, 0x00, + 0x00, } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/generated.proto b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/generated.proto index 6afbfb66..26d2b835 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/generated.proto +++ b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/generated.proto @@ -45,7 +45,7 @@ message ExtraValue { // checking. message LocalSubjectAccessReview { // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec holds information about the request being evaluated. spec.namespace must be equal to the namespace // you made the request against. If empty, it is defaulted. @@ -106,7 +106,7 @@ message ResourceAttributes { // to check whether they can perform an action message SelfSubjectAccessReview { // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec holds information about the request being evaluated. user and groups must be empty optional SelfSubjectAccessReviewSpec spec = 2; @@ -131,7 +131,7 @@ message SelfSubjectAccessReviewSpec { // SubjectAccessReview checks whether or not a user or group can perform an action. message SubjectAccessReview { // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec holds information about the request being evaluated optional SubjectAccessReviewSpec spec = 2; diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/register.go b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/register.go index ed6a234a..66549ed8 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/register.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/register.go @@ -20,7 +20,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/api/v1" ) // GroupName is the group name use in this package @@ -42,11 +41,6 @@ var ( // Adds the list of known types to api.Scheme. func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, - &v1.ListOptions{}, - &v1.DeleteOptions{}, - &metav1.ExportOptions{}, - &metav1.GetOptions{}, - &SelfSubjectAccessReview{}, &SubjectAccessReview{}, &LocalSubjectAccessReview{}, diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/types.generated.go b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/types.generated.go index e58a9d5f..939603c5 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/types.generated.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/types.generated.go @@ -26,8 +26,7 @@ import ( "fmt" codec1978 "github.com/ugorji/go/codec" pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - pkg3_types "k8s.io/apimachinery/pkg/types" - pkg2_v1 "k8s.io/kubernetes/pkg/api/v1" + pkg2_types "k8s.io/apimachinery/pkg/types" "reflect" "runtime" time "time" @@ -64,10 +63,9 @@ func init() { } if false { // reference the types, but skip this branch at build/run time var v0 pkg1_v1.TypeMeta - var v1 pkg3_types.UID - var v2 pkg2_v1.ObjectMeta - var v3 time.Time - _, _, _, _ = v0, v1, v2, v3 + var v1 pkg2_types.UID + var v2 time.Time + _, _, _ = v0, v1, v2 } } @@ -159,7 +157,13 @@ func (x *SubjectAccessReview) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -169,7 +173,13 @@ func (x *SubjectAccessReview) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -287,24 +297,30 @@ func (x *SubjectAccessReview) codecDecodeSelfFromMap(l int, d *codec1978.Decoder } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = SubjectAccessReviewSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = SubjectAccessReviewStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -317,16 +333,16 @@ func (x *SubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.Decod var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -334,21 +350,21 @@ func (x *SubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -356,38 +372,44 @@ func (x *SubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -395,16 +417,16 @@ func (x *SubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.Spec = SubjectAccessReviewSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -412,21 +434,21 @@ func (x *SubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.Status = SubjectAccessReviewStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -519,7 +541,13 @@ func (x *SelfSubjectAccessReview) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -529,7 +557,13 @@ func (x *SelfSubjectAccessReview) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -647,24 +681,30 @@ func (x *SelfSubjectAccessReview) codecDecodeSelfFromMap(l int, d *codec1978.Dec } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = SelfSubjectAccessReviewSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = SubjectAccessReviewStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -677,16 +717,16 @@ func (x *SelfSubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.D var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -694,21 +734,21 @@ func (x *SelfSubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.D if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -716,38 +756,44 @@ func (x *SelfSubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.D if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -755,16 +801,16 @@ func (x *SelfSubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.D if r.TryDecodeAsNil() { x.Spec = SelfSubjectAccessReviewSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -772,21 +818,21 @@ func (x *SelfSubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.D if r.TryDecodeAsNil() { x.Status = SubjectAccessReviewStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -879,7 +925,13 @@ func (x *LocalSubjectAccessReview) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -889,7 +941,13 @@ func (x *LocalSubjectAccessReview) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -1007,24 +1065,30 @@ func (x *LocalSubjectAccessReview) codecDecodeSelfFromMap(l int, d *codec1978.De } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = SubjectAccessReviewSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = SubjectAccessReviewStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -1037,16 +1101,16 @@ func (x *LocalSubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978. var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1054,21 +1118,21 @@ func (x *LocalSubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978. if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1076,38 +1140,44 @@ func (x *LocalSubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978. if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1115,16 +1185,16 @@ func (x *LocalSubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978. if r.TryDecodeAsNil() { x.Spec = SubjectAccessReviewSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1132,21 +1202,21 @@ func (x *LocalSubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978. if r.TryDecodeAsNil() { x.Status = SubjectAccessReviewStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/types.go b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/types.go index 65623ae0..8a172742 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/types.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/types.go @@ -20,7 +20,6 @@ import ( "fmt" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/kubernetes/pkg/api/v1" ) // +genclient=true @@ -31,7 +30,7 @@ import ( type SubjectAccessReview struct { metav1.TypeMeta `json:",inline"` // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec holds information about the request being evaluated Spec SubjectAccessReviewSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` @@ -51,7 +50,7 @@ type SubjectAccessReview struct { type SelfSubjectAccessReview struct { metav1.TypeMeta `json:",inline"` // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec holds information about the request being evaluated. user and groups must be empty Spec SelfSubjectAccessReviewSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` @@ -70,7 +69,7 @@ type SelfSubjectAccessReview struct { type LocalSubjectAccessReview struct { metav1.TypeMeta `json:",inline"` // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec holds information about the request being evaluated. spec.namespace must be equal to the namespace // you made the request against. If empty, it is defaulted. diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/zz_generated.conversion.go index 4e96aaf5..92ed181a 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/zz_generated.conversion.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/zz_generated.conversion.go @@ -55,10 +55,7 @@ func RegisterConversions(scheme *runtime.Scheme) error { } func autoConvert_v1beta1_LocalSubjectAccessReview_To_authorization_LocalSubjectAccessReview(in *LocalSubjectAccessReview, out *authorization.LocalSubjectAccessReview, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_SubjectAccessReviewSpec_To_authorization_SubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -73,10 +70,7 @@ func Convert_v1beta1_LocalSubjectAccessReview_To_authorization_LocalSubjectAcces } func autoConvert_authorization_LocalSubjectAccessReview_To_v1beta1_LocalSubjectAccessReview(in *authorization.LocalSubjectAccessReview, out *LocalSubjectAccessReview, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_authorization_SubjectAccessReviewSpec_To_v1beta1_SubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -141,10 +135,7 @@ func Convert_authorization_ResourceAttributes_To_v1beta1_ResourceAttributes(in * } func autoConvert_v1beta1_SelfSubjectAccessReview_To_authorization_SelfSubjectAccessReview(in *SelfSubjectAccessReview, out *authorization.SelfSubjectAccessReview, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_SelfSubjectAccessReviewSpec_To_authorization_SelfSubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -159,10 +150,7 @@ func Convert_v1beta1_SelfSubjectAccessReview_To_authorization_SelfSubjectAccessR } func autoConvert_authorization_SelfSubjectAccessReview_To_v1beta1_SelfSubjectAccessReview(in *authorization.SelfSubjectAccessReview, out *SelfSubjectAccessReview, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_authorization_SelfSubjectAccessReviewSpec_To_v1beta1_SelfSubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -197,10 +185,7 @@ func Convert_authorization_SelfSubjectAccessReviewSpec_To_v1beta1_SelfSubjectAcc } func autoConvert_v1beta1_SubjectAccessReview_To_authorization_SubjectAccessReview(in *SubjectAccessReview, out *authorization.SubjectAccessReview, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_SubjectAccessReviewSpec_To_authorization_SubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -215,10 +200,7 @@ func Convert_v1beta1_SubjectAccessReview_To_authorization_SubjectAccessReview(in } func autoConvert_authorization_SubjectAccessReview_To_v1beta1_SubjectAccessReview(in *authorization.SubjectAccessReview, out *SubjectAccessReview, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_authorization_SubjectAccessReviewSpec_To_v1beta1_SubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil { return err } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/zz_generated.deepcopy.go index 76c0200e..2bbd414a 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/authorization/v1beta1/zz_generated.deepcopy.go @@ -21,9 +21,9 @@ limitations under the License. package v1beta1 import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - v1 "k8s.io/kubernetes/pkg/api/v1" reflect "reflect" ) @@ -51,8 +51,10 @@ func DeepCopy_v1beta1_LocalSubjectAccessReview(in interface{}, out interface{}, in := in.(*LocalSubjectAccessReview) out := out.(*LocalSubjectAccessReview) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v1beta1_SubjectAccessReviewSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -84,8 +86,10 @@ func DeepCopy_v1beta1_SelfSubjectAccessReview(in interface{}, out interface{}, c in := in.(*SelfSubjectAccessReview) out := out.(*SelfSubjectAccessReview) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v1beta1_SelfSubjectAccessReviewSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -118,8 +122,10 @@ func DeepCopy_v1beta1_SubjectAccessReview(in interface{}, out interface{}, c *co in := in.(*SubjectAccessReview) out := out.(*SubjectAccessReview) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v1beta1_SubjectAccessReviewSpec(&in.Spec, &out.Spec, c); err != nil { return err diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authorization/validation/BUILD b/vendor/k8s.io/kubernetes/pkg/apis/authorization/validation/BUILD index 18bb6b82..57851286 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/authorization/validation/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/apis/authorization/validation/BUILD @@ -15,6 +15,7 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/apis/authorization:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/util/validation/field", ], ) @@ -25,8 +26,8 @@ go_test( library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//pkg/apis/authorization:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/util/validation/field", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authorization/validation/validation.go b/vendor/k8s.io/kubernetes/pkg/apis/authorization/validation/validation.go index 5e8a6e01..77757e54 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/authorization/validation/validation.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/authorization/validation/validation.go @@ -17,6 +17,7 @@ limitations under the License. package validation import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/validation/field" "k8s.io/kubernetes/pkg/api" authorizationapi "k8s.io/kubernetes/pkg/apis/authorization" @@ -51,7 +52,7 @@ func ValidateSelfSubjectAccessReviewSpec(spec authorizationapi.SelfSubjectAccess func ValidateSubjectAccessReview(sar *authorizationapi.SubjectAccessReview) field.ErrorList { allErrs := ValidateSubjectAccessReviewSpec(sar.Spec, field.NewPath("spec")) - if !api.Semantic.DeepEqual(api.ObjectMeta{}, sar.ObjectMeta) { + if !api.Semantic.DeepEqual(metav1.ObjectMeta{}, sar.ObjectMeta) { allErrs = append(allErrs, field.Invalid(field.NewPath("metadata"), sar.ObjectMeta, `must be empty`)) } return allErrs @@ -59,7 +60,7 @@ func ValidateSubjectAccessReview(sar *authorizationapi.SubjectAccessReview) fiel func ValidateSelfSubjectAccessReview(sar *authorizationapi.SelfSubjectAccessReview) field.ErrorList { allErrs := ValidateSelfSubjectAccessReviewSpec(sar.Spec, field.NewPath("spec")) - if !api.Semantic.DeepEqual(api.ObjectMeta{}, sar.ObjectMeta) { + if !api.Semantic.DeepEqual(metav1.ObjectMeta{}, sar.ObjectMeta) { allErrs = append(allErrs, field.Invalid(field.NewPath("metadata"), sar.ObjectMeta, `must be empty`)) } return allErrs @@ -70,7 +71,7 @@ func ValidateLocalSubjectAccessReview(sar *authorizationapi.LocalSubjectAccessRe objectMetaShallowCopy := sar.ObjectMeta objectMetaShallowCopy.Namespace = "" - if !api.Semantic.DeepEqual(api.ObjectMeta{}, objectMetaShallowCopy) { + if !api.Semantic.DeepEqual(metav1.ObjectMeta{}, objectMetaShallowCopy) { allErrs = append(allErrs, field.Invalid(field.NewPath("metadata"), sar.ObjectMeta, `must be empty except for namespace`)) } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authorization/validation/validation_test.go b/vendor/k8s.io/kubernetes/pkg/apis/authorization/validation/validation_test.go index 6a7560a3..e96acaf3 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/authorization/validation/validation_test.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/authorization/validation/validation_test.go @@ -20,8 +20,8 @@ import ( "strings" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/validation/field" - "k8s.io/kubernetes/pkg/api" authorizationapi "k8s.io/kubernetes/pkg/apis/authorization" ) @@ -158,7 +158,7 @@ func TestValidateLocalSAR(t *testing.T) { { name: "name", obj: &authorizationapi.LocalSubjectAccessReview{ - ObjectMeta: api.ObjectMeta{Name: "a"}, + ObjectMeta: metav1.ObjectMeta{Name: "a"}, Spec: authorizationapi.SubjectAccessReviewSpec{ ResourceAttributes: &authorizationapi.ResourceAttributes{}, User: "user", @@ -169,7 +169,7 @@ func TestValidateLocalSAR(t *testing.T) { { name: "namespace conflict", obj: &authorizationapi.LocalSubjectAccessReview{ - ObjectMeta: api.ObjectMeta{Namespace: "a"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "a"}, Spec: authorizationapi.SubjectAccessReviewSpec{ ResourceAttributes: &authorizationapi.ResourceAttributes{}, User: "user", @@ -180,7 +180,7 @@ func TestValidateLocalSAR(t *testing.T) { { name: "nonresource", obj: &authorizationapi.LocalSubjectAccessReview{ - ObjectMeta: api.ObjectMeta{Namespace: "a"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "a"}, Spec: authorizationapi.SubjectAccessReviewSpec{ NonResourceAttributes: &authorizationapi.NonResourceAttributes{}, User: "user", diff --git a/vendor/k8s.io/kubernetes/pkg/apis/authorization/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/authorization/zz_generated.deepcopy.go index de1e5949..19ccebda 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/authorization/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/authorization/zz_generated.deepcopy.go @@ -21,9 +21,9 @@ limitations under the License. package authorization import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - api "k8s.io/kubernetes/pkg/api" reflect "reflect" ) @@ -51,8 +51,10 @@ func DeepCopy_authorization_LocalSubjectAccessReview(in interface{}, out interfa in := in.(*LocalSubjectAccessReview) out := out.(*LocalSubjectAccessReview) *out = *in - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_authorization_SubjectAccessReviewSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -84,8 +86,10 @@ func DeepCopy_authorization_SelfSubjectAccessReview(in interface{}, out interfac in := in.(*SelfSubjectAccessReview) out := out.(*SelfSubjectAccessReview) *out = *in - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_authorization_SelfSubjectAccessReviewSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -118,8 +122,10 @@ func DeepCopy_authorization_SubjectAccessReview(in interface{}, out interface{}, in := in.(*SubjectAccessReview) out := out.(*SubjectAccessReview) *out = *in - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_authorization_SubjectAccessReviewSpec(&in.Spec, &out.Spec, c); err != nil { return err diff --git a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/BUILD b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/BUILD index 2f612cbe..7b622f25 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/BUILD @@ -17,7 +17,6 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/conversion", "//vendor:k8s.io/apimachinery/pkg/runtime", diff --git a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/install/BUILD b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/install/BUILD index 919fe82d..42b2c1bf 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/install/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/install/BUILD @@ -12,9 +12,12 @@ go_library( srcs = ["install.go"], tags = ["automanaged"], deps = [ - "//pkg/apimachinery/announced:go_default_library", + "//pkg/api:go_default_library", "//pkg/apis/autoscaling:go_default_library", "//pkg/apis/autoscaling/v1:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apimachinery/announced", + "//vendor:k8s.io/apimachinery/pkg/apimachinery/registered", + "//vendor:k8s.io/apimachinery/pkg/runtime", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/install/install.go b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/install/install.go index 5d498baa..a97c963b 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/install/install.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/install/install.go @@ -19,12 +19,20 @@ limitations under the License. package install import ( - "k8s.io/kubernetes/pkg/apimachinery/announced" + "k8s.io/apimachinery/pkg/apimachinery/announced" + "k8s.io/apimachinery/pkg/apimachinery/registered" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/autoscaling" "k8s.io/kubernetes/pkg/apis/autoscaling/v1" ) func init() { + Install(api.GroupFactoryRegistry, api.Registry, api.Scheme) +} + +// Install registers the API group and adds types to a scheme +func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) { if err := announced.NewGroupMetaFactory( &announced.GroupMetaFactoryArgs{ GroupName: autoscaling.GroupName, @@ -35,7 +43,7 @@ func init() { announced.VersionToSchemeFunc{ v1.SchemeGroupVersion.Version: v1.AddToScheme, }, - ).Announce().RegisterAndEnable(); err != nil { + ).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil { panic(err) } } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/register.go b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/register.go index 1526188f..2bcea84b 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/register.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/register.go @@ -19,7 +19,6 @@ package autoscaling import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/api" ) // GroupName is the group name use in this package @@ -49,8 +48,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { &Scale{}, &HorizontalPodAutoscaler{}, &HorizontalPodAutoscalerList{}, - &api.ListOptions{}, - &api.DeleteOptions{}, ) return nil } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/types.go b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/types.go index 126c2177..55af1907 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/types.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/types.go @@ -18,7 +18,6 @@ package autoscaling import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/kubernetes/pkg/api" ) // Scale represents a scaling request for a resource. @@ -26,7 +25,7 @@ type Scale struct { metav1.TypeMeta // Standard object metadata; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata. // +optional - api.ObjectMeta + metav1.ObjectMeta // defines the behavior of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. // +optional @@ -113,7 +112,7 @@ type HorizontalPodAutoscalerStatus struct { type HorizontalPodAutoscaler struct { metav1.TypeMeta // +optional - api.ObjectMeta + metav1.ObjectMeta // behaviour of autoscaler. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. // +optional diff --git a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/BUILD b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/BUILD index 0d451c93..297f4d3c 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/BUILD @@ -24,7 +24,6 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api/v1:go_default_library", "//pkg/apis/autoscaling:go_default_library", "//vendor:github.com/gogo/protobuf/proto", "//vendor:github.com/ugorji/go/codec", diff --git a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/generated.pb.go b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/generated.pb.go index 45982ab9..a839f993 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/generated.pb.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/generated.pb.go @@ -543,7 +543,7 @@ func (this *HorizontalPodAutoscaler) String() string { return "nil" } s := strings.Join([]string{`&HorizontalPodAutoscaler{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "HorizontalPodAutoscalerSpec", "HorizontalPodAutoscalerSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "HorizontalPodAutoscalerStatus", "HorizontalPodAutoscalerStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -593,7 +593,7 @@ func (this *Scale) String() string { return "nil" } s := strings.Join([]string{`&Scale{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ScaleSpec", "ScaleSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ScaleStatus", "ScaleStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -1731,58 +1731,58 @@ var ( var fileDescriptorGenerated = []byte{ // 855 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xb4, 0x55, 0xcd, 0x6f, 0xdc, 0x44, - 0x14, 0x5f, 0xef, 0x47, 0x95, 0x8e, 0x49, 0x02, 0x83, 0xd4, 0xae, 0x52, 0x61, 0x47, 0x0b, 0x87, - 0x80, 0x8a, 0xad, 0x5d, 0x95, 0x8a, 0x1e, 0xe3, 0xa0, 0xd2, 0x8a, 0x86, 0x46, 0x93, 0xb6, 0x42, - 0x08, 0x21, 0xcd, 0x7a, 0x5f, 0x9d, 0xe9, 0xae, 0x3d, 0xd6, 0xcc, 0x78, 0x05, 0x3d, 0x71, 0xe2, - 0xcc, 0x85, 0x03, 0x7f, 0x0e, 0xb7, 0xdc, 0xe8, 0x91, 0xd3, 0x8a, 0x18, 0xfe, 0x0c, 0x0e, 0xc8, - 0xb3, 0x13, 0xef, 0x57, 0xbc, 0x49, 0x04, 0xdc, 0x76, 0xe6, 0xfd, 0x3e, 0xde, 0xbc, 0xf7, 0xfc, - 0x16, 0x3d, 0x18, 0x7e, 0x2a, 0x3d, 0xc6, 0xfd, 0x61, 0xd6, 0x07, 0x91, 0x80, 0x02, 0xe9, 0xa7, - 0xc3, 0xc8, 0xa7, 0x29, 0x93, 0x3e, 0xcd, 0x14, 0x97, 0x21, 0x1d, 0xb1, 0x24, 0xf2, 0xc7, 0x5d, - 0x3f, 0x82, 0x04, 0x04, 0x55, 0x30, 0xf0, 0x52, 0xc1, 0x15, 0xc7, 0x1f, 0x4e, 0xa9, 0xde, 0x8c, - 0xea, 0xa5, 0xc3, 0xc8, 0x2b, 0xa8, 0xde, 0x1c, 0xd5, 0x1b, 0x77, 0x77, 0x3e, 0x8e, 0x98, 0x3a, - 0xc9, 0xfa, 0x5e, 0xc8, 0x63, 0x3f, 0xe2, 0x11, 0xf7, 0xb5, 0x42, 0x3f, 0x7b, 0xa9, 0x4f, 0xfa, - 0xa0, 0x7f, 0x4d, 0x95, 0x77, 0xee, 0x99, 0xa4, 0x68, 0xca, 0x62, 0x1a, 0x9e, 0xb0, 0x04, 0xc4, - 0xf7, 0xb3, 0xb4, 0x62, 0x50, 0xf4, 0x82, 0x7c, 0x76, 0xfc, 0x2a, 0x96, 0xc8, 0x12, 0xc5, 0x62, - 0x58, 0x21, 0xdc, 0xbf, 0x8c, 0x20, 0xc3, 0x13, 0x88, 0xe9, 0x0a, 0xaf, 0x57, 0x59, 0x33, 0x5f, - 0x80, 0xe4, 0x99, 0x08, 0x57, 0xbd, 0xee, 0x56, 0x73, 0x2e, 0x78, 0x4a, 0xf7, 0x62, 0x74, 0xa6, - 0xd8, 0xc8, 0x67, 0x89, 0x92, 0x4a, 0x2c, 0x53, 0x3a, 0x3f, 0x5b, 0xe8, 0xce, 0x81, 0xe0, 0x52, - 0xbe, 0x00, 0x21, 0x19, 0x4f, 0x9e, 0xf6, 0x5f, 0x41, 0xa8, 0x08, 0xbc, 0x04, 0x01, 0x49, 0x08, - 0x78, 0x17, 0x35, 0x87, 0x2c, 0x19, 0xb4, 0xad, 0x5d, 0x6b, 0xef, 0x66, 0xf0, 0xd6, 0xe9, 0xc4, - 0xad, 0xe5, 0x13, 0xb7, 0xf9, 0x05, 0x4b, 0x06, 0x44, 0x47, 0x0a, 0x44, 0x42, 0x63, 0x68, 0xd7, - 0x17, 0x11, 0x5f, 0xd2, 0x18, 0x88, 0x8e, 0xe0, 0x1e, 0x42, 0x34, 0x65, 0xc6, 0xa0, 0xdd, 0xd0, - 0x38, 0x6c, 0x70, 0x68, 0xff, 0xe8, 0xb1, 0x89, 0x90, 0x39, 0x54, 0xe7, 0xb7, 0x3a, 0xba, 0xfd, - 0x88, 0x0b, 0xf6, 0x9a, 0x27, 0x8a, 0x8e, 0x8e, 0xf8, 0x60, 0xdf, 0x8c, 0x06, 0x08, 0xfc, 0x15, - 0xda, 0x28, 0x9a, 0x39, 0xa0, 0x8a, 0xea, 0xbc, 0xec, 0xde, 0x9e, 0x57, 0x39, 0x54, 0xde, 0xb8, - 0xeb, 0x4d, 0x1f, 0x75, 0x08, 0x8a, 0xce, 0x7c, 0x67, 0x77, 0xa4, 0x54, 0xc3, 0x27, 0xa8, 0x29, - 0x53, 0x08, 0xf5, 0x5b, 0xec, 0xde, 0x43, 0xef, 0xca, 0xa3, 0xea, 0x55, 0xe4, 0x7a, 0x9c, 0x42, - 0x38, 0xab, 0x49, 0x71, 0x22, 0xda, 0x01, 0xa7, 0xe8, 0x86, 0x54, 0x54, 0x65, 0x52, 0xd7, 0xc3, - 0xee, 0x3d, 0xfa, 0x0f, 0xbc, 0xb4, 0x5e, 0xb0, 0x65, 0xdc, 0x6e, 0x4c, 0xcf, 0xc4, 0xf8, 0x74, - 0xfe, 0xb2, 0xd0, 0x9d, 0x0a, 0xe6, 0x13, 0x26, 0x15, 0xfe, 0x66, 0xa5, 0xaa, 0xde, 0x79, 0x4e, - 0xf3, 0x93, 0x3e, 0xcb, 0xaa, 0x40, 0x17, 0xe9, 0x14, 0x6c, 0x5d, 0xdb, 0xb7, 0x8d, 0xf3, 0xc6, - 0xf9, 0xcd, 0x5c, 0x65, 0x23, 0xd4, 0x62, 0x0a, 0x62, 0xd9, 0xae, 0xef, 0x36, 0xf6, 0xec, 0x5e, - 0xf0, 0xef, 0x9f, 0x1b, 0x6c, 0x1a, 0xbb, 0xd6, 0xe3, 0x42, 0x98, 0x4c, 0xf5, 0x3b, 0x7f, 0xd7, - 0x2b, 0x9f, 0x59, 0x94, 0x1f, 0xff, 0x68, 0xa1, 0x2d, 0x7d, 0x7c, 0x46, 0x45, 0x04, 0xc5, 0xa4, - 0x9b, 0xd7, 0x5e, 0xa7, 0xdb, 0x6b, 0xbe, 0x98, 0xe0, 0x96, 0x49, 0x6b, 0xeb, 0x78, 0xc1, 0x85, - 0x2c, 0xb9, 0xe2, 0x2e, 0xb2, 0x63, 0x96, 0x10, 0x48, 0x47, 0x2c, 0xa4, 0x52, 0x8f, 0x5c, 0x2b, - 0xd8, 0xce, 0x27, 0xae, 0x7d, 0x38, 0xbb, 0x26, 0xf3, 0x18, 0xfc, 0x09, 0xb2, 0x63, 0xfa, 0x5d, - 0x49, 0x69, 0x68, 0xca, 0xbb, 0xc6, 0xcf, 0x3e, 0x9c, 0x85, 0xc8, 0x3c, 0x0e, 0xbf, 0x42, 0x8e, - 0xd2, 0xb6, 0x07, 0x47, 0xcf, 0x9f, 0x2b, 0x36, 0x62, 0xaf, 0xa9, 0x62, 0x3c, 0x39, 0x02, 0x11, - 0x42, 0xa2, 0x68, 0x04, 0xed, 0xa6, 0x56, 0xea, 0xe4, 0x13, 0xd7, 0x79, 0xb6, 0x16, 0x49, 0x2e, - 0x51, 0xea, 0xfc, 0xda, 0x40, 0xef, 0xad, 0x9d, 0x4f, 0xfc, 0x10, 0x61, 0xde, 0x97, 0x20, 0xc6, - 0x30, 0xf8, 0x7c, 0xba, 0x8c, 0x8a, 0xad, 0x50, 0xf4, 0xa0, 0x11, 0xdc, 0xca, 0x27, 0x2e, 0x7e, - 0xba, 0x12, 0x25, 0x17, 0x30, 0x70, 0x88, 0x36, 0x47, 0x54, 0xaa, 0x69, 0x95, 0x99, 0x59, 0x40, - 0x76, 0xef, 0xa3, 0xab, 0x0d, 0x6d, 0xc1, 0x08, 0xde, 0xc9, 0x27, 0xee, 0xe6, 0x93, 0x79, 0x11, - 0xb2, 0xa8, 0x89, 0xf7, 0xd1, 0x76, 0x98, 0x09, 0x01, 0x89, 0x5a, 0xaa, 0xfa, 0x6d, 0x53, 0xf5, - 0xed, 0x83, 0xc5, 0x30, 0x59, 0xc6, 0x17, 0x12, 0x03, 0x90, 0x4c, 0xc0, 0xa0, 0x94, 0x68, 0x2e, - 0x4a, 0x7c, 0xb6, 0x18, 0x26, 0xcb, 0x78, 0x1c, 0x23, 0xd7, 0xa8, 0x56, 0x76, 0xb0, 0xa5, 0x25, - 0xdf, 0xcf, 0x27, 0xae, 0x7b, 0xb0, 0x1e, 0x4a, 0x2e, 0xd3, 0xea, 0xfc, 0x52, 0x47, 0x2d, 0x5d, - 0x82, 0xff, 0x71, 0xd3, 0xbe, 0x58, 0xd8, 0xb4, 0xf7, 0xae, 0xf1, 0xed, 0xe9, 0xcc, 0x2a, 0xf7, - 0xea, 0xb7, 0x4b, 0x7b, 0xf5, 0xfe, 0xb5, 0x95, 0xd7, 0x6f, 0xd1, 0x07, 0xe8, 0x66, 0x99, 0x00, - 0xbe, 0x8b, 0x36, 0xc4, 0x79, 0x4f, 0x2d, 0xdd, 0x80, 0x72, 0x05, 0x96, 0xcd, 0x2c, 0x11, 0x1d, - 0x86, 0xec, 0x39, 0x87, 0xeb, 0x91, 0x0b, 0xb4, 0x84, 0x11, 0x84, 0x8a, 0x0b, 0xf3, 0x4f, 0x5b, - 0xa2, 0x8f, 0xcd, 0x3d, 0x29, 0x11, 0xc1, 0x07, 0xa7, 0x67, 0x4e, 0xed, 0xcd, 0x99, 0x53, 0xfb, - 0xfd, 0xcc, 0xa9, 0xfd, 0x90, 0x3b, 0xd6, 0x69, 0xee, 0x58, 0x6f, 0x72, 0xc7, 0xfa, 0x23, 0x77, - 0xac, 0x9f, 0xfe, 0x74, 0x6a, 0x5f, 0xd7, 0xc7, 0xdd, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xe2, - 0xa2, 0xe7, 0x25, 0xc5, 0x09, 0x00, 0x00, + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xbc, 0x55, 0x4f, 0x6f, 0xdc, 0x44, + 0x14, 0x5f, 0xef, 0x9f, 0x2a, 0x1d, 0x93, 0x04, 0x06, 0xa9, 0x5d, 0xa5, 0xc2, 0x8e, 0x16, 0x0e, + 0x05, 0x15, 0x9b, 0x5d, 0x95, 0x8a, 0x1e, 0xe3, 0xa0, 0xd2, 0x8a, 0x86, 0x46, 0x93, 0xb6, 0x07, + 0x84, 0x10, 0xb3, 0xde, 0x57, 0x67, 0xba, 0x6b, 0x8f, 0x35, 0x33, 0x5e, 0x41, 0x4f, 0x9c, 0x38, + 0x73, 0xe1, 0x03, 0xf0, 0x51, 0xb8, 0xe5, 0xd8, 0x1b, 0x9c, 0x56, 0xc4, 0xf0, 0x31, 0x38, 0x20, + 0xcf, 0x4e, 0xbc, 0xff, 0xe2, 0x4d, 0x22, 0x50, 0x6f, 0x3b, 0xf3, 0x7e, 0x7f, 0xde, 0xbc, 0xf7, + 0xfc, 0x16, 0xdd, 0x1f, 0x7e, 0x26, 0x3d, 0xc6, 0xfd, 0x61, 0xd6, 0x07, 0x91, 0x80, 0x02, 0xe9, + 0xa7, 0xc3, 0xc8, 0xa7, 0x29, 0x93, 0x3e, 0xcd, 0x14, 0x97, 0x21, 0x1d, 0xb1, 0x24, 0xf2, 0xc7, + 0x5d, 0x3f, 0x82, 0x04, 0x04, 0x55, 0x30, 0xf0, 0x52, 0xc1, 0x15, 0xc7, 0x1f, 0x4e, 0xa9, 0xde, + 0x8c, 0xea, 0xa5, 0xc3, 0xc8, 0x2b, 0xa8, 0xde, 0x1c, 0xd5, 0x1b, 0x77, 0x77, 0x3e, 0x8e, 0x98, + 0x3a, 0xce, 0xfa, 0x5e, 0xc8, 0x63, 0x3f, 0xe2, 0x11, 0xf7, 0xb5, 0x42, 0x3f, 0x7b, 0xa1, 0x4f, + 0xfa, 0xa0, 0x7f, 0x4d, 0x95, 0x77, 0xee, 0x9a, 0xa4, 0x68, 0xca, 0x62, 0x1a, 0x1e, 0xb3, 0x04, + 0xc4, 0x0f, 0xb3, 0xb4, 0x62, 0x50, 0xf4, 0x9c, 0x7c, 0x76, 0xfc, 0x2a, 0x96, 0xc8, 0x12, 0xc5, + 0x62, 0x58, 0x21, 0xdc, 0xbb, 0x88, 0x20, 0xc3, 0x63, 0x88, 0xe9, 0x0a, 0xaf, 0x57, 0x59, 0x33, + 0x5f, 0x80, 0xe4, 0x99, 0x08, 0x57, 0xbd, 0xee, 0x54, 0x73, 0xce, 0x79, 0x4a, 0xf7, 0x7c, 0x74, + 0xa6, 0xd8, 0xc8, 0x67, 0x89, 0x92, 0x4a, 0x2c, 0x53, 0x3a, 0xbf, 0x58, 0xe8, 0xd6, 0xbe, 0xe0, + 0x52, 0x3e, 0x07, 0x21, 0x19, 0x4f, 0x9e, 0xf4, 0x5f, 0x42, 0xa8, 0x08, 0xbc, 0x00, 0x01, 0x49, + 0x08, 0x78, 0x17, 0x35, 0x87, 0x2c, 0x19, 0xb4, 0xad, 0x5d, 0xeb, 0xf6, 0xf5, 0xe0, 0xad, 0x93, + 0x89, 0x5b, 0xcb, 0x27, 0x6e, 0xf3, 0x4b, 0x96, 0x0c, 0x88, 0x8e, 0x14, 0x88, 0x84, 0xc6, 0xd0, + 0xae, 0x2f, 0x22, 0xbe, 0xa2, 0x31, 0x10, 0x1d, 0xc1, 0x3d, 0x84, 0x68, 0xca, 0x8c, 0x41, 0xbb, + 0xa1, 0x71, 0xd8, 0xe0, 0xd0, 0xde, 0xe1, 0x23, 0x13, 0x21, 0x73, 0xa8, 0xce, 0xef, 0x75, 0x74, + 0xf3, 0x21, 0x17, 0xec, 0x15, 0x4f, 0x14, 0x1d, 0x1d, 0xf2, 0xc1, 0x9e, 0x19, 0x0d, 0x10, 0xf8, + 0x3b, 0xb4, 0x51, 0x34, 0x73, 0x40, 0x15, 0xd5, 0x79, 0xd9, 0xbd, 0x4f, 0x3c, 0x33, 0x54, 0xf3, + 0x3d, 0x99, 0x8d, 0x55, 0x81, 0xf6, 0xc6, 0x5d, 0x6f, 0xfa, 0xb8, 0x03, 0x50, 0x74, 0xe6, 0x3f, + 0xbb, 0x23, 0xa5, 0x2a, 0x3e, 0x46, 0x4d, 0x99, 0x42, 0xa8, 0xdf, 0x64, 0xf7, 0x1e, 0x78, 0x97, + 0x1e, 0x59, 0xaf, 0x22, 0xe7, 0xa3, 0x14, 0xc2, 0x59, 0x6d, 0x8a, 0x13, 0xd1, 0x0e, 0x38, 0x45, + 0xd7, 0xa4, 0xa2, 0x2a, 0x93, 0xba, 0x2e, 0x76, 0xef, 0xe1, 0xff, 0xe0, 0xa5, 0xf5, 0x82, 0x2d, + 0xe3, 0x76, 0x6d, 0x7a, 0x26, 0xc6, 0xa7, 0xf3, 0xb7, 0x85, 0x6e, 0x55, 0x30, 0x1f, 0x33, 0xa9, + 0xf0, 0x37, 0x2b, 0xd5, 0xf5, 0x2e, 0x57, 0xdd, 0x82, 0xad, 0x6b, 0xfb, 0xb6, 0x71, 0xde, 0x38, + 0xbb, 0x99, 0xab, 0x6c, 0x84, 0x5a, 0x4c, 0x41, 0x2c, 0xdb, 0xf5, 0xdd, 0xc6, 0x6d, 0xbb, 0x17, + 0xfc, 0xf7, 0xe7, 0x06, 0x9b, 0xc6, 0xae, 0xf5, 0xa8, 0x10, 0x26, 0x53, 0xfd, 0xce, 0x3f, 0xf5, + 0xca, 0x67, 0x16, 0xe5, 0xc7, 0x3f, 0x59, 0x68, 0x4b, 0x1f, 0x9f, 0x52, 0x11, 0x41, 0x31, 0xf1, + 0xe6, 0xb5, 0x57, 0xe9, 0xf6, 0x9a, 0x2f, 0x27, 0xb8, 0x61, 0xd2, 0xda, 0x3a, 0x5a, 0x70, 0x21, + 0x4b, 0xae, 0xb8, 0x8b, 0xec, 0x98, 0x25, 0x04, 0xd2, 0x11, 0x0b, 0xa9, 0xd4, 0x23, 0xd7, 0x0a, + 0xb6, 0xf3, 0x89, 0x6b, 0x1f, 0xcc, 0xae, 0xc9, 0x3c, 0x06, 0x7f, 0x8a, 0xec, 0x98, 0x7e, 0x5f, + 0x52, 0x1a, 0x9a, 0xf2, 0xae, 0xf1, 0xb3, 0x0f, 0x66, 0x21, 0x32, 0x8f, 0xc3, 0x2f, 0x91, 0xa3, + 0xb4, 0xed, 0xfe, 0xe1, 0xb3, 0x67, 0x8a, 0x8d, 0xd8, 0x2b, 0xaa, 0x18, 0x4f, 0x0e, 0x41, 0x84, + 0x90, 0x28, 0x1a, 0x41, 0xbb, 0xa9, 0x95, 0x3a, 0xf9, 0xc4, 0x75, 0x9e, 0xae, 0x45, 0x92, 0x0b, + 0x94, 0x3a, 0xbf, 0x35, 0xd0, 0x7b, 0x6b, 0xe7, 0x13, 0x3f, 0x40, 0x98, 0xf7, 0x25, 0x88, 0x31, + 0x0c, 0xbe, 0x98, 0x2e, 0xa5, 0x62, 0x3b, 0x14, 0x3d, 0x68, 0x04, 0x37, 0xf2, 0x89, 0x8b, 0x9f, + 0xac, 0x44, 0xc9, 0x39, 0x0c, 0x1c, 0xa2, 0xcd, 0x11, 0x95, 0x6a, 0x5a, 0x65, 0x66, 0x16, 0x91, + 0xdd, 0xfb, 0xe8, 0x72, 0x43, 0x5b, 0x30, 0x82, 0x77, 0xf2, 0x89, 0xbb, 0xf9, 0x78, 0x5e, 0x84, + 0x2c, 0x6a, 0xe2, 0x3d, 0xb4, 0x1d, 0x66, 0x42, 0x40, 0xa2, 0x96, 0xaa, 0x7e, 0xd3, 0x54, 0x7d, + 0x7b, 0x7f, 0x31, 0x4c, 0x96, 0xf1, 0x85, 0xc4, 0x00, 0x24, 0x13, 0x30, 0x28, 0x25, 0x9a, 0x8b, + 0x12, 0x9f, 0x2f, 0x86, 0xc9, 0x32, 0x1e, 0xc7, 0xc8, 0x35, 0xaa, 0x95, 0x1d, 0x6c, 0x69, 0xc9, + 0xf7, 0xf3, 0x89, 0xeb, 0xee, 0xaf, 0x87, 0x92, 0x8b, 0xb4, 0x3a, 0xbf, 0xd6, 0x51, 0x4b, 0x97, + 0xe0, 0x0d, 0x6c, 0xdc, 0xe7, 0x0b, 0x1b, 0xf7, 0xee, 0x15, 0xbe, 0x41, 0x9d, 0x61, 0xe5, 0x7e, + 0xfd, 0x76, 0x69, 0xbf, 0xde, 0xbb, 0xb2, 0xf2, 0xfa, 0x6d, 0x7a, 0x1f, 0x5d, 0x2f, 0x13, 0xc0, + 0x77, 0xd0, 0x86, 0x38, 0xeb, 0xad, 0xa5, 0x1b, 0x51, 0xae, 0xc2, 0xb2, 0xa9, 0x25, 0xa2, 0xc3, + 0x90, 0x3d, 0xe7, 0x70, 0x35, 0x72, 0x81, 0x96, 0x30, 0x82, 0x50, 0x71, 0x61, 0xfe, 0x79, 0x4b, + 0xf4, 0x91, 0xb9, 0x27, 0x25, 0x22, 0xf8, 0xe0, 0xe4, 0xd4, 0xa9, 0xbd, 0x3e, 0x75, 0x6a, 0x7f, + 0x9c, 0x3a, 0xb5, 0x1f, 0x73, 0xc7, 0x3a, 0xc9, 0x1d, 0xeb, 0x75, 0xee, 0x58, 0x7f, 0xe6, 0x8e, + 0xf5, 0xf3, 0x5f, 0x4e, 0xed, 0xeb, 0xfa, 0xb8, 0xfb, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x81, + 0xf7, 0x9a, 0x52, 0xd5, 0x09, 0x00, 0x00, } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/generated.proto b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/generated.proto index e84fdd96..4d4fa8e6 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/generated.proto +++ b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/generated.proto @@ -48,7 +48,7 @@ message CrossVersionObjectReference { message HorizontalPodAutoscaler { // Standard object metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // behaviour of autoscaler. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. // +optional @@ -115,7 +115,7 @@ message HorizontalPodAutoscalerStatus { message Scale { // Standard object metadata; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata. // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // defines the behavior of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. // +optional diff --git a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/register.go b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/register.go index 8f57373b..adb1d767 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/register.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/register.go @@ -20,7 +20,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/api/v1" ) // GroupName is the group name use in this package @@ -45,10 +44,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { &HorizontalPodAutoscaler{}, &HorizontalPodAutoscalerList{}, &Scale{}, - &v1.ListOptions{}, - &v1.DeleteOptions{}, - &metav1.ExportOptions{}, - &metav1.GetOptions{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil diff --git a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/types.generated.go b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/types.generated.go index 2a79a1c6..41e91bad 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/types.generated.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/types.generated.go @@ -26,8 +26,7 @@ import ( "fmt" codec1978 "github.com/ugorji/go/codec" pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - pkg3_types "k8s.io/apimachinery/pkg/types" - pkg2_v1 "k8s.io/kubernetes/pkg/api/v1" + pkg2_types "k8s.io/apimachinery/pkg/types" "reflect" "runtime" time "time" @@ -64,10 +63,9 @@ func init() { } if false { // reference the types, but skip this branch at build/run time var v0 pkg1_v1.Time - var v1 pkg3_types.UID - var v2 pkg2_v1.ObjectMeta - var v3 time.Time - _, _, _, _ = v0, v1, v2, v3 + var v1 pkg2_types.UID + var v2 time.Time + _, _, _ = v0, v1, v2 } } @@ -1291,7 +1289,13 @@ func (x *HorizontalPodAutoscaler) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -1301,7 +1305,13 @@ func (x *HorizontalPodAutoscaler) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -1425,24 +1435,30 @@ func (x *HorizontalPodAutoscaler) codecDecodeSelfFromMap(l int, d *codec1978.Dec } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = HorizontalPodAutoscalerSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = HorizontalPodAutoscalerStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -1455,16 +1471,16 @@ func (x *HorizontalPodAutoscaler) codecDecodeSelfFromArray(l int, d *codec1978.D var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1472,21 +1488,21 @@ func (x *HorizontalPodAutoscaler) codecDecodeSelfFromArray(l int, d *codec1978.D if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1494,38 +1510,44 @@ func (x *HorizontalPodAutoscaler) codecDecodeSelfFromArray(l int, d *codec1978.D if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1533,16 +1555,16 @@ func (x *HorizontalPodAutoscaler) codecDecodeSelfFromArray(l int, d *codec1978.D if r.TryDecodeAsNil() { x.Spec = HorizontalPodAutoscalerSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1550,21 +1572,21 @@ func (x *HorizontalPodAutoscaler) codecDecodeSelfFromArray(l int, d *codec1978.D if r.TryDecodeAsNil() { x.Status = HorizontalPodAutoscalerStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -2026,7 +2048,13 @@ func (x *Scale) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -2036,7 +2064,13 @@ func (x *Scale) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -2160,24 +2194,30 @@ func (x *Scale) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = ScaleSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = ScaleStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -2190,16 +2230,16 @@ func (x *Scale) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2207,21 +2247,21 @@ func (x *Scale) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2229,38 +2269,44 @@ func (x *Scale) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2268,16 +2314,16 @@ func (x *Scale) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = ScaleSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2285,21 +2331,21 @@ func (x *Scale) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = ScaleStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/types.go b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/types.go index 30340b8f..2e867c9c 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/types.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/types.go @@ -16,10 +16,7 @@ limitations under the License. package v1 -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/kubernetes/pkg/api/v1" -) +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" // CrossVersionObjectReference contains enough information to let you identify the referred resource. type CrossVersionObjectReference struct { @@ -78,7 +75,7 @@ type HorizontalPodAutoscaler struct { metav1.TypeMeta `json:",inline"` // Standard object metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // behaviour of autoscaler. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. // +optional @@ -105,7 +102,7 @@ type Scale struct { metav1.TypeMeta `json:",inline"` // Standard object metadata; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata. // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // defines the behavior of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. // +optional diff --git a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/zz_generated.conversion.go index b89c6657..139c6c84 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/zz_generated.conversion.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/zz_generated.conversion.go @@ -78,10 +78,7 @@ func Convert_autoscaling_CrossVersionObjectReference_To_v1_CrossVersionObjectRef } func autoConvert_v1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler(in *HorizontalPodAutoscaler, out *autoscaling.HorizontalPodAutoscaler, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -96,10 +93,7 @@ func Convert_v1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler(i } func autoConvert_autoscaling_HorizontalPodAutoscaler_To_v1_HorizontalPodAutoscaler(in *autoscaling.HorizontalPodAutoscaler, out *HorizontalPodAutoscaler, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_autoscaling_HorizontalPodAutoscalerSpec_To_v1_HorizontalPodAutoscalerSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -188,10 +182,7 @@ func Convert_autoscaling_HorizontalPodAutoscalerStatus_To_v1_HorizontalPodAutosc } func autoConvert_v1_Scale_To_autoscaling_Scale(in *Scale, out *autoscaling.Scale, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_ScaleSpec_To_autoscaling_ScaleSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -206,10 +197,7 @@ func Convert_v1_Scale_To_autoscaling_Scale(in *Scale, out *autoscaling.Scale, s } func autoConvert_autoscaling_Scale_To_v1_Scale(in *autoscaling.Scale, out *Scale, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_autoscaling_ScaleSpec_To_v1_ScaleSpec(&in.Spec, &out.Spec, s); err != nil { return err } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/zz_generated.deepcopy.go index fe31487e..f5c104d8 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/v1/zz_generated.deepcopy.go @@ -24,7 +24,6 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - api_v1 "k8s.io/kubernetes/pkg/api/v1" reflect "reflect" ) @@ -61,8 +60,10 @@ func DeepCopy_v1_HorizontalPodAutoscaler(in interface{}, out interface{}, c *con in := in.(*HorizontalPodAutoscaler) out := out.(*HorizontalPodAutoscaler) *out = *in - if err := api_v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if err := DeepCopy_v1_HorizontalPodAutoscalerSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -140,8 +141,10 @@ func DeepCopy_v1_Scale(in interface{}, out interface{}, c *conversion.Cloner) er in := in.(*Scale) out := out.(*Scale) *out = *in - if err := api_v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } return nil } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/validation/BUILD b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/validation/BUILD index 3dd4c7d0..ec72afaf 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/validation/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/validation/BUILD @@ -28,9 +28,9 @@ go_test( library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//pkg/apis/autoscaling:go_default_library", "//pkg/controller/podautoscaler:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/validation/validation_test.go b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/validation/validation_test.go index bb7fa5fa..9c7acdf6 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/validation/validation_test.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/validation/validation_test.go @@ -20,7 +20,7 @@ import ( "strings" "testing" - "k8s.io/kubernetes/pkg/api" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/apis/autoscaling" "k8s.io/kubernetes/pkg/controller/podautoscaler" ) @@ -28,27 +28,27 @@ import ( func TestValidateScale(t *testing.T) { successCases := []autoscaling.Scale{ { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "frontend", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, Spec: autoscaling.ScaleSpec{ Replicas: 1, }, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "frontend", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, Spec: autoscaling.ScaleSpec{ Replicas: 10, }, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "frontend", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, Spec: autoscaling.ScaleSpec{ Replicas: 0, @@ -68,9 +68,9 @@ func TestValidateScale(t *testing.T) { }{ { scale: autoscaling.Scale{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "frontend", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, Spec: autoscaling.ScaleSpec{ Replicas: -1, @@ -92,9 +92,9 @@ func TestValidateScale(t *testing.T) { func TestValidateHorizontalPodAutoscaler(t *testing.T) { successCases := []autoscaling.HorizontalPodAutoscaler{ { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "myautoscaler", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, Spec: autoscaling.HorizontalPodAutoscalerSpec{ ScaleTargetRef: autoscaling.CrossVersionObjectReference{ @@ -107,9 +107,9 @@ func TestValidateHorizontalPodAutoscaler(t *testing.T) { }, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "myautoscaler", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, Spec: autoscaling.HorizontalPodAutoscalerSpec{ ScaleTargetRef: autoscaling.CrossVersionObjectReference{ @@ -121,9 +121,9 @@ func TestValidateHorizontalPodAutoscaler(t *testing.T) { }, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "myautoscaler", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, Annotations: map[string]string{ podautoscaler.HpaCustomMetricsTargetAnnotationName: "{\"items\":[{\"name\":\"qps\",\"value\":\"20\"}]}", }, @@ -150,7 +150,7 @@ func TestValidateHorizontalPodAutoscaler(t *testing.T) { }{ { horizontalPodAutoscaler: autoscaling.HorizontalPodAutoscaler{ - ObjectMeta: api.ObjectMeta{Name: "myautoscaler", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "myautoscaler", Namespace: metav1.NamespaceDefault}, Spec: autoscaling.HorizontalPodAutoscalerSpec{ ScaleTargetRef: autoscaling.CrossVersionObjectReference{Name: "myrc"}, MinReplicas: newInt32(1), @@ -162,7 +162,7 @@ func TestValidateHorizontalPodAutoscaler(t *testing.T) { }, { horizontalPodAutoscaler: autoscaling.HorizontalPodAutoscaler{ - ObjectMeta: api.ObjectMeta{Name: "myautoscaler", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "myautoscaler", Namespace: metav1.NamespaceDefault}, Spec: autoscaling.HorizontalPodAutoscalerSpec{ ScaleTargetRef: autoscaling.CrossVersionObjectReference{Kind: "..", Name: "myrc"}, MinReplicas: newInt32(1), @@ -174,7 +174,7 @@ func TestValidateHorizontalPodAutoscaler(t *testing.T) { }, { horizontalPodAutoscaler: autoscaling.HorizontalPodAutoscaler{ - ObjectMeta: api.ObjectMeta{Name: "myautoscaler", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "myautoscaler", Namespace: metav1.NamespaceDefault}, Spec: autoscaling.HorizontalPodAutoscalerSpec{ ScaleTargetRef: autoscaling.CrossVersionObjectReference{Kind: "ReplicationController"}, MinReplicas: newInt32(1), @@ -186,7 +186,7 @@ func TestValidateHorizontalPodAutoscaler(t *testing.T) { }, { horizontalPodAutoscaler: autoscaling.HorizontalPodAutoscaler{ - ObjectMeta: api.ObjectMeta{Name: "myautoscaler", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "myautoscaler", Namespace: metav1.NamespaceDefault}, Spec: autoscaling.HorizontalPodAutoscalerSpec{ ScaleTargetRef: autoscaling.CrossVersionObjectReference{Kind: "ReplicationController", Name: ".."}, MinReplicas: newInt32(1), @@ -198,9 +198,9 @@ func TestValidateHorizontalPodAutoscaler(t *testing.T) { }, { horizontalPodAutoscaler: autoscaling.HorizontalPodAutoscaler{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "myautoscaler", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, Spec: autoscaling.HorizontalPodAutoscalerSpec{ ScaleTargetRef: autoscaling.CrossVersionObjectReference{}, @@ -212,9 +212,9 @@ func TestValidateHorizontalPodAutoscaler(t *testing.T) { }, { horizontalPodAutoscaler: autoscaling.HorizontalPodAutoscaler{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "myautoscaler", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, Spec: autoscaling.HorizontalPodAutoscalerSpec{ ScaleTargetRef: autoscaling.CrossVersionObjectReference{}, @@ -226,9 +226,9 @@ func TestValidateHorizontalPodAutoscaler(t *testing.T) { }, { horizontalPodAutoscaler: autoscaling.HorizontalPodAutoscaler{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "myautoscaler", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, Spec: autoscaling.HorizontalPodAutoscalerSpec{ ScaleTargetRef: autoscaling.CrossVersionObjectReference{}, @@ -241,9 +241,9 @@ func TestValidateHorizontalPodAutoscaler(t *testing.T) { }, { horizontalPodAutoscaler: autoscaling.HorizontalPodAutoscaler{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "myautoscaler", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, Annotations: map[string]string{ podautoscaler.HpaCustomMetricsTargetAnnotationName: "broken", }, @@ -261,9 +261,9 @@ func TestValidateHorizontalPodAutoscaler(t *testing.T) { }, { horizontalPodAutoscaler: autoscaling.HorizontalPodAutoscaler{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "myautoscaler", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, Annotations: map[string]string{ podautoscaler.HpaCustomMetricsTargetAnnotationName: "{}", }, @@ -281,9 +281,9 @@ func TestValidateHorizontalPodAutoscaler(t *testing.T) { }, { horizontalPodAutoscaler: autoscaling.HorizontalPodAutoscaler{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "myautoscaler", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, Annotations: map[string]string{ podautoscaler.HpaCustomMetricsTargetAnnotationName: "{\"items\":[{\"value\":\"20\"}]}", }, @@ -301,9 +301,9 @@ func TestValidateHorizontalPodAutoscaler(t *testing.T) { }, { horizontalPodAutoscaler: autoscaling.HorizontalPodAutoscaler{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "myautoscaler", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, Annotations: map[string]string{ podautoscaler.HpaCustomMetricsTargetAnnotationName: "{\"items\":[{\"name\":\"qps\",\"value\":\"0\"}]}", }, diff --git a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/zz_generated.deepcopy.go index eee5fd43..2a62cfb5 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/zz_generated.deepcopy.go @@ -24,7 +24,6 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - api "k8s.io/kubernetes/pkg/api" reflect "reflect" ) @@ -61,8 +60,10 @@ func DeepCopy_autoscaling_HorizontalPodAutoscaler(in interface{}, out interface{ in := in.(*HorizontalPodAutoscaler) out := out.(*HorizontalPodAutoscaler) *out = *in - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_autoscaling_HorizontalPodAutoscalerSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -140,8 +141,10 @@ func DeepCopy_autoscaling_Scale(in interface{}, out interface{}, c *conversion.C in := in.(*Scale) out := out.(*Scale) *out = *in - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } return nil } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/batch/install/BUILD b/vendor/k8s.io/kubernetes/pkg/apis/batch/install/BUILD index 553b59e7..a3bacba7 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/batch/install/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/apis/batch/install/BUILD @@ -12,10 +12,13 @@ go_library( srcs = ["install.go"], tags = ["automanaged"], deps = [ - "//pkg/apimachinery/announced:go_default_library", + "//pkg/api:go_default_library", "//pkg/apis/batch:go_default_library", "//pkg/apis/batch/v1:go_default_library", "//pkg/apis/batch/v2alpha1:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apimachinery/announced", + "//vendor:k8s.io/apimachinery/pkg/apimachinery/registered", + "//vendor:k8s.io/apimachinery/pkg/runtime", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/apis/batch/install/install.go b/vendor/k8s.io/kubernetes/pkg/apis/batch/install/install.go index d10932ce..90befc2e 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/batch/install/install.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/batch/install/install.go @@ -19,13 +19,21 @@ limitations under the License. package install import ( - "k8s.io/kubernetes/pkg/apimachinery/announced" + "k8s.io/apimachinery/pkg/apimachinery/announced" + "k8s.io/apimachinery/pkg/apimachinery/registered" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/batch" "k8s.io/kubernetes/pkg/apis/batch/v1" "k8s.io/kubernetes/pkg/apis/batch/v2alpha1" ) func init() { + Install(api.GroupFactoryRegistry, api.Registry, api.Scheme) +} + +// Install registers the API group and adds types to a scheme +func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) { if err := announced.NewGroupMetaFactory( &announced.GroupMetaFactoryArgs{ GroupName: batch.GroupName, @@ -37,7 +45,7 @@ func init() { v1.SchemeGroupVersion.Version: v1.AddToScheme, v2alpha1.SchemeGroupVersion.Version: v2alpha1.AddToScheme, }, - ).Announce().RegisterAndEnable(); err != nil { + ).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil { panic(err) } } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/batch/register.go b/vendor/k8s.io/kubernetes/pkg/apis/batch/register.go index b28019e4..4601ca4e 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/batch/register.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/batch/register.go @@ -19,7 +19,6 @@ package batch import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/api" ) // GroupName is the group name use in this package @@ -51,8 +50,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { &JobTemplate{}, &CronJob{}, &CronJobList{}, - &api.ListOptions{}, - &api.DeleteOptions{}, ) scheme.AddKnownTypeWithName(SchemeGroupVersion.WithKind("ScheduledJob"), &CronJob{}) scheme.AddKnownTypeWithName(SchemeGroupVersion.WithKind("ScheduledJobList"), &CronJobList{}) diff --git a/vendor/k8s.io/kubernetes/pkg/apis/batch/types.go b/vendor/k8s.io/kubernetes/pkg/apis/batch/types.go index 56a3b15e..ef0037e0 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/batch/types.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/batch/types.go @@ -29,7 +29,7 @@ type Job struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - api.ObjectMeta + metav1.ObjectMeta // Spec is a structure defining the expected behavior of a job. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -60,7 +60,7 @@ type JobTemplate struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - api.ObjectMeta + metav1.ObjectMeta // Template defines jobs that will be created from this template // http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -73,7 +73,7 @@ type JobTemplateSpec struct { // Standard object's metadata of the jobs created from this template. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - api.ObjectMeta + metav1.ObjectMeta // Specification of the desired behavior of the job. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -196,7 +196,7 @@ type CronJob struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - api.ObjectMeta + metav1.ObjectMeta // Spec is a structure defining the expected behavior of a job, including the schedule. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status diff --git a/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/BUILD b/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/BUILD index 44960a30..9271847c 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/BUILD @@ -50,6 +50,7 @@ go_test( "//pkg/api/v1:go_default_library", "//pkg/apis/batch/install:go_default_library", "//pkg/apis/batch/v1:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/defaults_test.go b/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/defaults_test.go index 63b4dc8d..268003b7 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/defaults_test.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/defaults_test.go @@ -20,6 +20,7 @@ import ( "reflect" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/api" _ "k8s.io/kubernetes/pkg/api/install" @@ -39,7 +40,7 @@ func TestSetDefaultJob(t *testing.T) { original: &Job{ Spec: JobSpec{ Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{Labels: defaultLabels}, + ObjectMeta: metav1.ObjectMeta{Labels: defaultLabels}, }, }, }, @@ -53,12 +54,12 @@ func TestSetDefaultJob(t *testing.T) { }, "both unspecified -> sets both to 1 and no default labels": { original: &Job{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"mylabel": "myvalue"}, }, Spec: JobSpec{ Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{Labels: defaultLabels}, + ObjectMeta: metav1.ObjectMeta{Labels: defaultLabels}, }, }, }, @@ -74,7 +75,7 @@ func TestSetDefaultJob(t *testing.T) { Spec: JobSpec{ Parallelism: newInt32(0), Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{Labels: defaultLabels}, + ObjectMeta: metav1.ObjectMeta{Labels: defaultLabels}, }, }, }, @@ -90,7 +91,7 @@ func TestSetDefaultJob(t *testing.T) { Spec: JobSpec{ Parallelism: newInt32(2), Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{Labels: defaultLabels}, + ObjectMeta: metav1.ObjectMeta{Labels: defaultLabels}, }, }, }, @@ -106,7 +107,7 @@ func TestSetDefaultJob(t *testing.T) { Spec: JobSpec{ Completions: newInt32(2), Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{Labels: defaultLabels}, + ObjectMeta: metav1.ObjectMeta{Labels: defaultLabels}, }, }, }, @@ -124,7 +125,7 @@ func TestSetDefaultJob(t *testing.T) { Completions: newInt32(10), Parallelism: newInt32(11), Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{Labels: defaultLabels}, + ObjectMeta: metav1.ObjectMeta{Labels: defaultLabels}, }, }, }, @@ -133,7 +134,7 @@ func TestSetDefaultJob(t *testing.T) { Completions: newInt32(10), Parallelism: newInt32(11), Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{Labels: defaultLabels}, + ObjectMeta: metav1.ObjectMeta{Labels: defaultLabels}, }, }, }, @@ -145,7 +146,7 @@ func TestSetDefaultJob(t *testing.T) { Completions: newInt32(11), Parallelism: newInt32(10), Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{Labels: defaultLabels}, + ObjectMeta: metav1.ObjectMeta{Labels: defaultLabels}, }, }, }, diff --git a/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/generated.pb.go b/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/generated.pb.go index 7dbda3e3..4ac5dc08 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/generated.pb.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/generated.pb.go @@ -468,7 +468,7 @@ func (this *Job) String() string { return "nil" } s := strings.Join([]string{`&Job{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "JobSpec", "JobSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "JobStatus", "JobStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -1520,60 +1520,61 @@ var ( ) var fileDescriptorGenerated = []byte{ - // 879 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x9c, 0x54, 0xcd, 0x6f, 0xe3, 0x44, - 0x14, 0xcf, 0x47, 0xd3, 0x4d, 0xa6, 0x1f, 0xbb, 0x8c, 0x54, 0x29, 0xf4, 0x90, 0xac, 0x02, 0x42, - 0x0b, 0xda, 0xb5, 0x95, 0xee, 0x0a, 0x21, 0x0e, 0x48, 0xb8, 0x08, 0x89, 0xaa, 0x65, 0xab, 0x49, - 0x05, 0x88, 0x8f, 0xc3, 0xd8, 0x7e, 0x4d, 0x87, 0xda, 0x1e, 0xcb, 0x33, 0x8e, 0xd4, 0x1b, 0x37, - 0xae, 0xfc, 0x31, 0x08, 0xf1, 0x27, 0xf4, 0xd8, 0x23, 0xa7, 0x88, 0x9a, 0xff, 0x62, 0x4f, 0x68, - 0xc6, 0xe3, 0x8f, 0x34, 0x69, 0xc9, 0x72, 0xb3, 0xdf, 0xbc, 0xdf, 0xef, 0x7d, 0xfd, 0xde, 0x43, - 0x2f, 0x2f, 0x3f, 0x11, 0x16, 0xe3, 0xf6, 0x65, 0xea, 0x42, 0x12, 0x81, 0x04, 0x61, 0xc7, 0x97, - 0x53, 0x9b, 0xc6, 0x4c, 0xd8, 0x2e, 0x95, 0xde, 0x85, 0x3d, 0x1b, 0xdb, 0x53, 0x88, 0x20, 0xa1, - 0x12, 0x7c, 0x2b, 0x4e, 0xb8, 0xe4, 0xf8, 0xbd, 0x1c, 0x64, 0x55, 0x20, 0x2b, 0xbe, 0x9c, 0x5a, - 0x0a, 0x64, 0x69, 0x90, 0x35, 0x1b, 0xef, 0xbf, 0x98, 0x32, 0x79, 0x91, 0xba, 0x96, 0xc7, 0x43, - 0x7b, 0xca, 0xa7, 0xdc, 0xd6, 0x58, 0x37, 0x3d, 0xd7, 0x7f, 0xfa, 0x47, 0x7f, 0xe5, 0x9c, 0xfb, - 0xaf, 0x4c, 0x22, 0x34, 0x66, 0x21, 0xf5, 0x2e, 0x58, 0x04, 0xc9, 0x55, 0x95, 0x4a, 0x08, 0x92, - 0xae, 0xc8, 0x64, 0xdf, 0xbe, 0x0f, 0x95, 0xa4, 0x91, 0x64, 0x21, 0x2c, 0x01, 0x3e, 0xfe, 0x2f, - 0x80, 0xf0, 0x2e, 0x20, 0xa4, 0x4b, 0xb8, 0x83, 0x7b, 0xfb, 0x64, 0x27, 0x20, 0x78, 0x9a, 0x78, - 0xcb, 0xb1, 0x9e, 0xdf, 0x8f, 0x59, 0x51, 0xca, 0x78, 0xb5, 0x77, 0x2a, 0x59, 0x60, 0xb3, 0x48, - 0x0a, 0x99, 0xdc, 0x85, 0x8c, 0x7e, 0x6d, 0xa1, 0xf6, 0x11, 0x77, 0xf1, 0x77, 0xa8, 0xab, 0x1a, - 0xe4, 0x53, 0x49, 0xfb, 0xcd, 0xa7, 0xcd, 0x67, 0x5b, 0x07, 0xcf, 0xac, 0x7b, 0x47, 0x64, 0xcd, - 0xc6, 0xd6, 0x6b, 0xf7, 0x67, 0xf0, 0xe4, 0x09, 0x48, 0xea, 0xe0, 0xeb, 0xf9, 0xb0, 0x91, 0xcd, - 0x87, 0xa8, 0xb2, 0x91, 0x92, 0x0d, 0x7f, 0x8d, 0x36, 0x44, 0x0c, 0x5e, 0xbf, 0xa5, 0x59, 0x9f, - 0x5b, 0x6b, 0x0c, 0xde, 0x3a, 0xe2, 0xee, 0x24, 0x06, 0xcf, 0xd9, 0x36, 0xcc, 0x1b, 0xea, 0x8f, - 0x68, 0x1e, 0xfc, 0x0d, 0xda, 0x14, 0x92, 0xca, 0x54, 0xf4, 0xdb, 0x9a, 0xd1, 0x5a, 0x9b, 0x51, - 0xa3, 0x9c, 0x5d, 0xc3, 0xb9, 0x99, 0xff, 0x13, 0xc3, 0x36, 0xba, 0x69, 0xa3, 0xed, 0x23, 0xee, - 0x1e, 0xf2, 0xc8, 0x67, 0x92, 0xf1, 0x08, 0xbf, 0x42, 0x1b, 0xf2, 0x2a, 0x06, 0xdd, 0x8e, 0x9e, - 0xf3, 0xb4, 0x48, 0xe5, 0xec, 0x2a, 0x86, 0x37, 0xf3, 0xe1, 0x93, 0xba, 0xaf, 0xb2, 0x11, 0xed, - 0x5d, 0x4b, 0xaf, 0xa5, 0x71, 0x9f, 0x2d, 0x86, 0x7b, 0x33, 0x1f, 0x3e, 0x38, 0x53, 0xab, 0xe4, - 0x5c, 0x4c, 0x0f, 0x4f, 0xd1, 0x4e, 0x40, 0x85, 0x3c, 0x4d, 0xb8, 0x0b, 0x67, 0x2c, 0x04, 0x53, - 0xfd, 0x47, 0x45, 0xf5, 0x75, 0x35, 0x56, 0xf5, 0xab, 0x29, 0xa8, 0xf2, 0x15, 0xc2, 0xd9, 0x33, - 0xa9, 0xec, 0x1c, 0xd7, 0x89, 0xc8, 0x22, 0x2f, 0x9e, 0x21, 0xac, 0x0c, 0x67, 0x09, 0x8d, 0x44, - 0x5e, 0x9c, 0x8a, 0xb6, 0xf1, 0xd6, 0xd1, 0xf6, 0x4d, 0x34, 0x7c, 0xbc, 0xc4, 0x46, 0x56, 0x44, - 0xc0, 0x1f, 0xa0, 0xcd, 0x04, 0xa8, 0xe0, 0x51, 0xbf, 0xa3, 0x1b, 0x57, 0xce, 0x89, 0x68, 0x2b, - 0x31, 0xaf, 0xf8, 0x43, 0xf4, 0x28, 0x04, 0x21, 0xe8, 0x14, 0xfa, 0x9b, 0xda, 0xf1, 0xb1, 0x71, - 0x7c, 0x74, 0x92, 0x9b, 0x49, 0xf1, 0x3e, 0xfa, 0xa3, 0x89, 0x1e, 0x1d, 0x71, 0xf7, 0x98, 0x09, - 0x89, 0x7f, 0x5c, 0x12, 0xb8, 0xb5, 0x5e, 0x31, 0x0a, 0xad, 0x65, 0xfe, 0xc4, 0xc4, 0xe9, 0x16, - 0x96, 0x9a, 0xc8, 0x4f, 0x50, 0x87, 0x49, 0x08, 0xd5, 0xd0, 0xdb, 0x0f, 0xef, 0xce, 0xa2, 0x26, - 0x9d, 0x1d, 0x43, 0xda, 0xf9, 0x4a, 0xc1, 0x49, 0xce, 0x32, 0xfa, 0xb3, 0xad, 0x13, 0x57, 0xaa, - 0xc7, 0x63, 0xb4, 0x15, 0xd3, 0x84, 0x06, 0x01, 0x04, 0x4c, 0x84, 0x3a, 0xf7, 0x8e, 0xf3, 0x38, - 0x9b, 0x0f, 0xb7, 0x4e, 0x2b, 0x33, 0xa9, 0xfb, 0x28, 0x88, 0xc7, 0xc3, 0x38, 0x00, 0xd5, 0xdc, - 0x5c, 0x88, 0x06, 0x72, 0x58, 0x99, 0x49, 0xdd, 0x07, 0xbf, 0x46, 0x7b, 0xd4, 0x93, 0x6c, 0x06, - 0x5f, 0x00, 0xf5, 0x03, 0x16, 0xc1, 0x04, 0x3c, 0x1e, 0xf9, 0xf9, 0x92, 0xb5, 0x9d, 0x77, 0xb3, - 0xf9, 0x70, 0xef, 0xf3, 0x55, 0x0e, 0x64, 0x35, 0x0e, 0xff, 0x84, 0xba, 0x02, 0x02, 0xf0, 0x24, - 0x4f, 0x8c, 0x78, 0x5e, 0xae, 0xd9, 0x6f, 0xea, 0x42, 0x30, 0x31, 0x50, 0x67, 0x5b, 0x35, 0xbc, - 0xf8, 0x23, 0x25, 0x25, 0xfe, 0x14, 0xed, 0x86, 0x34, 0x4a, 0x69, 0xe9, 0xa9, 0x55, 0xd3, 0x75, - 0x70, 0x36, 0x1f, 0xee, 0x9e, 0x2c, 0xbc, 0x90, 0x3b, 0x9e, 0xf8, 0x07, 0xd4, 0x95, 0x10, 0xc6, - 0x01, 0x95, 0xb9, 0x84, 0xb6, 0x0e, 0x5e, 0x3c, 0x7c, 0xeb, 0x4e, 0xb9, 0x7f, 0x66, 0x00, 0xfa, - 0x2c, 0x95, 0x4a, 0x28, 0xac, 0xa4, 0x24, 0x1c, 0xfd, 0xde, 0x46, 0xbd, 0xf2, 0xd8, 0x60, 0x40, - 0xc8, 0x2b, 0x16, 0x5a, 0xf4, 0x9b, 0x5a, 0x1c, 0xe3, 0x75, 0xc5, 0x51, 0x9e, 0x82, 0xea, 0xc2, - 0x96, 0x26, 0x41, 0x6a, 0xc4, 0xf8, 0x5b, 0xd4, 0x13, 0x92, 0x26, 0x52, 0xaf, 0x6a, 0xeb, 0xad, - 0x57, 0x75, 0x27, 0x9b, 0x0f, 0x7b, 0x93, 0x82, 0x80, 0x54, 0x5c, 0xf8, 0x1c, 0xed, 0x56, 0x2a, - 0xf9, 0x9f, 0x67, 0x47, 0x8f, 0xe4, 0x70, 0x81, 0x85, 0xdc, 0x61, 0x55, 0xcb, 0x9f, 0xcb, 0x48, - 0x6b, 0xa5, 0x53, 0x2d, 0x7f, 0xae, 0x39, 0x62, 0x5e, 0xb1, 0x8d, 0x7a, 0x22, 0xf5, 0x3c, 0x00, - 0x1f, 0x7c, 0x3d, 0xf1, 0x8e, 0xf3, 0x8e, 0x71, 0xed, 0x4d, 0x8a, 0x07, 0x52, 0xf9, 0x28, 0xe2, - 0x73, 0xca, 0x02, 0xf0, 0xf5, 0xa4, 0x6b, 0xc4, 0x5f, 0x6a, 0x2b, 0x31, 0xaf, 0xce, 0xfb, 0xd7, - 0xb7, 0x83, 0xc6, 0xcd, 0xed, 0xa0, 0xf1, 0xd7, 0xed, 0xa0, 0xf1, 0x4b, 0x36, 0x68, 0x5e, 0x67, - 0x83, 0xe6, 0x4d, 0x36, 0x68, 0xfe, 0x9d, 0x0d, 0x9a, 0xbf, 0xfd, 0x33, 0x68, 0x7c, 0xdf, 0x9a, - 0x8d, 0xff, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xa1, 0x15, 0xe7, 0x70, 0xeb, 0x08, 0x00, 0x00, + // 881 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x9c, 0x54, 0xdd, 0x6e, 0xe3, 0x44, + 0x14, 0xce, 0x4f, 0xd3, 0x26, 0x93, 0xb6, 0xbb, 0x8c, 0x54, 0x29, 0xf4, 0x22, 0x59, 0x05, 0x84, + 0x0a, 0xda, 0xb5, 0x49, 0x77, 0x85, 0x10, 0x17, 0x48, 0xb8, 0x08, 0x89, 0xaa, 0x65, 0xab, 0x49, + 0x05, 0x12, 0x3f, 0x12, 0x63, 0xfb, 0x34, 0x1d, 0x6a, 0x7b, 0x2c, 0xcf, 0x38, 0x52, 0xef, 0x78, + 0x03, 0x78, 0x18, 0x84, 0x78, 0x84, 0x5e, 0xf6, 0x92, 0xab, 0x88, 0x9a, 0xb7, 0xd8, 0x2b, 0x34, + 0xe3, 0x89, 0xed, 0x34, 0x29, 0xa4, 0xdc, 0xd9, 0x67, 0xbe, 0xef, 0x3b, 0x67, 0xce, 0xf9, 0xce, + 0xa0, 0x97, 0x57, 0x1f, 0x0b, 0x8b, 0x71, 0xfb, 0x2a, 0x75, 0x21, 0x89, 0x40, 0x82, 0xb0, 0xe3, + 0xab, 0x89, 0x4d, 0x63, 0x26, 0x6c, 0x97, 0x4a, 0xef, 0xd2, 0x9e, 0x8e, 0xec, 0x09, 0x44, 0x90, + 0x50, 0x09, 0xbe, 0x15, 0x27, 0x5c, 0x72, 0xfc, 0x4e, 0x4e, 0xb2, 0x4a, 0x92, 0x15, 0x5f, 0x4d, + 0x2c, 0x45, 0xb2, 0x34, 0xc9, 0x9a, 0x8e, 0xf6, 0x5f, 0x4c, 0x98, 0xbc, 0x4c, 0x5d, 0xcb, 0xe3, + 0xa1, 0x3d, 0xe1, 0x13, 0x6e, 0x6b, 0xae, 0x9b, 0x5e, 0xe8, 0x3f, 0xfd, 0xa3, 0xbf, 0x72, 0xcd, + 0xfd, 0x57, 0xa6, 0x10, 0x1a, 0xb3, 0x90, 0x7a, 0x97, 0x2c, 0x82, 0xe4, 0xba, 0x2c, 0x25, 0x04, + 0x49, 0x57, 0x54, 0xb2, 0x6f, 0x3f, 0xc4, 0x4a, 0xd2, 0x48, 0xb2, 0x10, 0x96, 0x08, 0x1f, 0xfd, + 0x17, 0x41, 0x78, 0x97, 0x10, 0xd2, 0x25, 0xde, 0xe1, 0x83, 0x7d, 0xb2, 0x13, 0x10, 0x3c, 0x4d, + 0xbc, 0xe5, 0x5c, 0xcf, 0x1f, 0xe6, 0xac, 0xb8, 0xca, 0x68, 0x35, 0x3a, 0x95, 0x2c, 0xb0, 0x59, + 0x24, 0x85, 0x4c, 0xee, 0x53, 0x86, 0xbf, 0x34, 0x50, 0xf3, 0x98, 0xbb, 0xf8, 0x47, 0xd4, 0x56, + 0x0d, 0xf2, 0xa9, 0xa4, 0xbd, 0xfa, 0xb3, 0xfa, 0x41, 0xf7, 0xf0, 0x43, 0xcb, 0x8c, 0xa8, 0x7a, + 0xcf, 0x72, 0x48, 0x0a, 0x6d, 0x4d, 0x47, 0xd6, 0x6b, 0xf7, 0x27, 0xf0, 0xe4, 0x29, 0x48, 0xea, + 0xe0, 0x9b, 0xd9, 0xa0, 0x96, 0xcd, 0x06, 0xa8, 0x8c, 0x91, 0x42, 0x15, 0x7f, 0x85, 0x36, 0x44, + 0x0c, 0x5e, 0xaf, 0xa1, 0xd5, 0x9f, 0x5b, 0x6b, 0x18, 0xc0, 0x3a, 0xe6, 0xee, 0x38, 0x06, 0xcf, + 0xd9, 0x36, 0xca, 0x1b, 0xea, 0x8f, 0x68, 0x1d, 0xfc, 0x35, 0xda, 0x14, 0x92, 0xca, 0x54, 0xf4, + 0x9a, 0x5a, 0xd1, 0x5a, 0x5b, 0x51, 0xb3, 0x9c, 0x5d, 0xa3, 0xb9, 0x99, 0xff, 0x13, 0xa3, 0x36, + 0xbc, 0x6d, 0xa2, 0xed, 0x63, 0xee, 0x1e, 0xf1, 0xc8, 0x67, 0x92, 0xf1, 0x08, 0xbf, 0x42, 0x1b, + 0xf2, 0x3a, 0x06, 0xdd, 0x96, 0x8e, 0xf3, 0x6c, 0x5e, 0xca, 0xf9, 0x75, 0x0c, 0x6f, 0x66, 0x83, + 0xa7, 0x55, 0xac, 0x8a, 0x11, 0x8d, 0xae, 0x94, 0xd7, 0xd0, 0xbc, 0x4f, 0x17, 0xd3, 0xbd, 0x99, + 0x0d, 0xfe, 0x75, 0xb6, 0x56, 0xa1, 0xb9, 0x58, 0x1e, 0x9e, 0xa0, 0x9d, 0x80, 0x0a, 0x79, 0x96, + 0x70, 0x17, 0xce, 0x59, 0x08, 0xe6, 0xf6, 0x1f, 0xac, 0x37, 0x2d, 0xc5, 0x70, 0xf6, 0x4c, 0x29, + 0x3b, 0x27, 0x55, 0x21, 0xb2, 0xa8, 0x8b, 0xa7, 0x08, 0xab, 0xc0, 0x79, 0x42, 0x23, 0x91, 0x5f, + 0x4e, 0x65, 0xdb, 0x78, 0x74, 0xb6, 0x7d, 0x93, 0x0d, 0x9f, 0x2c, 0xa9, 0x91, 0x15, 0x19, 0xf0, + 0x7b, 0x68, 0x33, 0x01, 0x2a, 0x78, 0xd4, 0x6b, 0xe9, 0xc6, 0x15, 0x73, 0x22, 0x3a, 0x4a, 0xcc, + 0x29, 0x7e, 0x1f, 0x6d, 0x85, 0x20, 0x04, 0x9d, 0x40, 0x6f, 0x53, 0x03, 0x9f, 0x18, 0xe0, 0xd6, + 0x69, 0x1e, 0x26, 0xf3, 0xf3, 0xe1, 0xef, 0x75, 0xb4, 0x75, 0xcc, 0xdd, 0x13, 0x26, 0x24, 0xfe, + 0x7e, 0xc9, 0xe8, 0xd6, 0x7a, 0x97, 0x51, 0x6c, 0x6d, 0xf3, 0xa7, 0x26, 0x4f, 0x7b, 0x1e, 0xa9, + 0x98, 0xfc, 0x14, 0xb5, 0x98, 0x84, 0x50, 0x0d, 0xbd, 0x79, 0xd0, 0x3d, 0x3c, 0x58, 0xd7, 0x93, + 0xce, 0x8e, 0x11, 0x6d, 0x7d, 0xa9, 0xe8, 0x24, 0x57, 0x19, 0xfe, 0xd1, 0xd4, 0x85, 0x2b, 0xd7, + 0xe3, 0x11, 0xea, 0xc6, 0x34, 0xa1, 0x41, 0x00, 0x01, 0x13, 0xa1, 0xae, 0xbd, 0xe5, 0x3c, 0xc9, + 0x66, 0x83, 0xee, 0x59, 0x19, 0x26, 0x55, 0x8c, 0xa2, 0x78, 0x3c, 0x8c, 0x03, 0x50, 0xcd, 0xcd, + 0x8d, 0x68, 0x28, 0x47, 0x65, 0x98, 0x54, 0x31, 0xf8, 0x35, 0xda, 0xa3, 0x9e, 0x64, 0x53, 0xf8, + 0x1c, 0xa8, 0x1f, 0xb0, 0x08, 0xc6, 0xe0, 0xf1, 0xc8, 0xcf, 0x97, 0xac, 0xe9, 0xbc, 0x9d, 0xcd, + 0x06, 0x7b, 0x9f, 0xad, 0x02, 0x90, 0xd5, 0x3c, 0xfc, 0x03, 0x6a, 0x0b, 0x08, 0xc0, 0x93, 0x3c, + 0x31, 0xe6, 0x79, 0xb9, 0x66, 0xbf, 0xa9, 0x0b, 0xc1, 0xd8, 0x50, 0x9d, 0x6d, 0xd5, 0xf0, 0xf9, + 0x1f, 0x29, 0x24, 0xf1, 0x27, 0x68, 0x37, 0xa4, 0x51, 0x4a, 0x0b, 0xa4, 0x76, 0x4d, 0xdb, 0xc1, + 0xd9, 0x6c, 0xb0, 0x7b, 0xba, 0x70, 0x42, 0xee, 0x21, 0xf1, 0x77, 0xa8, 0x2d, 0x21, 0x8c, 0x03, + 0x2a, 0x73, 0x0b, 0x75, 0x0f, 0x5f, 0x3c, 0x3c, 0x2f, 0x55, 0xd2, 0x19, 0xf7, 0xcf, 0x0d, 0x41, + 0x3f, 0x4b, 0x85, 0x13, 0xe6, 0x51, 0x52, 0x08, 0x0e, 0x7f, 0x6b, 0xa2, 0x4e, 0xf1, 0xd8, 0x60, + 0x40, 0xc8, 0x9b, 0x2f, 0xb4, 0xe8, 0xd5, 0xb5, 0x39, 0x46, 0xeb, 0x9a, 0xa3, 0x78, 0x0a, 0xca, + 0x17, 0xb6, 0x08, 0x09, 0x52, 0x11, 0xc6, 0xdf, 0xa0, 0x8e, 0x90, 0x34, 0x91, 0x7a, 0x55, 0x1b, + 0x8f, 0x5e, 0xd5, 0x9d, 0x6c, 0x36, 0xe8, 0x8c, 0xe7, 0x02, 0xa4, 0xd4, 0xc2, 0x17, 0x68, 0xb7, + 0x74, 0xc9, 0xff, 0x7c, 0x76, 0xf4, 0x48, 0x8e, 0x16, 0x54, 0xc8, 0x3d, 0x55, 0xb5, 0xfc, 0xb9, + 0x8d, 0xb4, 0x57, 0x5a, 0xe5, 0xf2, 0xe7, 0x9e, 0x23, 0xe6, 0x14, 0xdb, 0xa8, 0x23, 0x52, 0xcf, + 0x03, 0xf0, 0xc1, 0xd7, 0x13, 0x6f, 0x39, 0x6f, 0x19, 0x68, 0x67, 0x3c, 0x3f, 0x20, 0x25, 0x46, + 0x09, 0x5f, 0x50, 0x16, 0x80, 0xaf, 0x27, 0x5d, 0x11, 0xfe, 0x42, 0x47, 0x89, 0x39, 0x75, 0xde, + 0xbd, 0xb9, 0xeb, 0xd7, 0x6e, 0xef, 0xfa, 0xb5, 0x3f, 0xef, 0xfa, 0xb5, 0x9f, 0xb3, 0x7e, 0xfd, + 0x26, 0xeb, 0xd7, 0x6f, 0xb3, 0x7e, 0xfd, 0xaf, 0xac, 0x5f, 0xff, 0xf5, 0xef, 0x7e, 0xed, 0xdb, + 0xc6, 0x74, 0xf4, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x9a, 0xe5, 0xae, 0xf3, 0x08, 0x00, + 0x00, } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/generated.proto b/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/generated.proto index f159250b..2d84a500 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/generated.proto +++ b/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/generated.proto @@ -36,7 +36,7 @@ message Job { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec is a structure defining the expected behavior of a job. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status diff --git a/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/register.go b/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/register.go index d47aaf89..4ba570d1 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/register.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/register.go @@ -20,7 +20,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/api/v1" ) // GroupName is the group name use in this package @@ -44,10 +43,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &Job{}, &JobList{}, - &v1.ListOptions{}, - &v1.DeleteOptions{}, - &metav1.ExportOptions{}, - &metav1.GetOptions{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil diff --git a/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/types.generated.go b/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/types.generated.go index 3510c59c..64551c90 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/types.generated.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/types.generated.go @@ -26,9 +26,9 @@ import ( "fmt" codec1978 "github.com/ugorji/go/codec" pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - pkg3_types "k8s.io/apimachinery/pkg/types" + pkg2_types "k8s.io/apimachinery/pkg/types" pkg4_resource "k8s.io/kubernetes/pkg/api/resource" - pkg2_v1 "k8s.io/kubernetes/pkg/api/v1" + pkg3_v1 "k8s.io/kubernetes/pkg/api/v1" pkg5_intstr "k8s.io/kubernetes/pkg/util/intstr" "reflect" "runtime" @@ -66,9 +66,9 @@ func init() { } if false { // reference the types, but skip this branch at build/run time var v0 pkg1_v1.TypeMeta - var v1 pkg3_types.UID + var v1 pkg2_types.UID var v2 pkg4_resource.Quantity - var v3 pkg2_v1.ObjectMeta + var v3 pkg3_v1.PodTemplateSpec var v4 pkg5_intstr.IntOrString var v5 time.Time _, _, _, _, _, _ = v0, v1, v2, v3, v4, v5 @@ -164,7 +164,13 @@ func (x *Job) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -174,7 +180,13 @@ func (x *Job) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -298,24 +310,30 @@ func (x *Job) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = JobSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = JobStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -328,16 +346,16 @@ func (x *Job) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -345,21 +363,21 @@ func (x *Job) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -367,38 +385,44 @@ func (x *Job) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -406,16 +430,16 @@ func (x *Job) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = JobSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -423,21 +447,21 @@ func (x *Job) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = JobStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -1175,7 +1199,7 @@ func (x *JobSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "template": if r.TryDecodeAsNil() { - x.Template = pkg2_v1.PodTemplateSpec{} + x.Template = pkg3_v1.PodTemplateSpec{} } else { yyv14 := &x.Template yyv14.CodecDecodeSelf(d) @@ -1337,7 +1361,7 @@ func (x *JobSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.Template = pkg2_v1.PodTemplateSpec{} + x.Template = pkg3_v1.PodTemplateSpec{} } else { yyv26 := &x.Template yyv26.CodecDecodeSelf(d) @@ -2457,7 +2481,7 @@ func (x codecSelfer1234) decSliceJob(v *[]Job, d *codec1978.Decoder) { yyrg1 := len(yyv1) > 0 yyv21 := yyv1 - yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 832) + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 848) if yyrt1 { if yyrl1 <= cap(yyv1) { yyv1 = yyv1[:yyrl1] diff --git a/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/types.go b/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/types.go index 6bdd4036..c59c5d83 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/types.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/types.go @@ -29,7 +29,7 @@ type Job struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec is a structure defining the expected behavior of a job. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status diff --git a/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/zz_generated.conversion.go index e8bdd154..e90b2528 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/zz_generated.conversion.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/zz_generated.conversion.go @@ -52,10 +52,7 @@ func RegisterConversions(scheme *runtime.Scheme) error { } func autoConvert_v1_Job_To_batch_Job(in *Job, out *batch.Job, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_JobSpec_To_batch_JobSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -70,10 +67,7 @@ func Convert_v1_Job_To_batch_Job(in *Job, out *batch.Job, s conversion.Scope) er } func autoConvert_batch_Job_To_v1_Job(in *batch.Job, out *Job, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_batch_JobSpec_To_v1_JobSpec(&in.Spec, &out.Spec, s); err != nil { return err } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/zz_generated.deepcopy.go index ed95a29b..a5f0163a 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/batch/v1/zz_generated.deepcopy.go @@ -49,8 +49,10 @@ func DeepCopy_v1_Job(in interface{}, out interface{}, c *conversion.Cloner) erro in := in.(*Job) out := out.(*Job) *out = *in - if err := api_v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if err := DeepCopy_v1_JobSpec(&in.Spec, &out.Spec, c); err != nil { return err diff --git a/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/BUILD b/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/BUILD index 2e5b2ddb..74289a4b 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/BUILD @@ -50,6 +50,7 @@ go_test( "//pkg/api/v1:go_default_library", "//pkg/apis/batch/install:go_default_library", "//pkg/apis/batch/v2alpha1:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/defaults_test.go b/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/defaults_test.go index 55a44cdf..b8994600 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/defaults_test.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/defaults_test.go @@ -20,6 +20,7 @@ import ( "reflect" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/api" _ "k8s.io/kubernetes/pkg/api/install" @@ -39,7 +40,7 @@ func TestSetDefaultJob(t *testing.T) { original: &Job{ Spec: JobSpec{ Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{Labels: defaultLabels}, + ObjectMeta: metav1.ObjectMeta{Labels: defaultLabels}, }, }, }, @@ -53,12 +54,12 @@ func TestSetDefaultJob(t *testing.T) { }, "both unspecified -> sets both to 1 and no default labels": { original: &Job{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"mylabel": "myvalue"}, }, Spec: JobSpec{ Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{Labels: defaultLabels}, + ObjectMeta: metav1.ObjectMeta{Labels: defaultLabels}, }, }, }, @@ -74,7 +75,7 @@ func TestSetDefaultJob(t *testing.T) { Spec: JobSpec{ Parallelism: newInt32(0), Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{Labels: defaultLabels}, + ObjectMeta: metav1.ObjectMeta{Labels: defaultLabels}, }, }, }, @@ -90,7 +91,7 @@ func TestSetDefaultJob(t *testing.T) { Spec: JobSpec{ Parallelism: newInt32(2), Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{Labels: defaultLabels}, + ObjectMeta: metav1.ObjectMeta{Labels: defaultLabels}, }, }, }, @@ -106,7 +107,7 @@ func TestSetDefaultJob(t *testing.T) { Spec: JobSpec{ Completions: newInt32(2), Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{Labels: defaultLabels}, + ObjectMeta: metav1.ObjectMeta{Labels: defaultLabels}, }, }, }, @@ -124,7 +125,7 @@ func TestSetDefaultJob(t *testing.T) { Completions: newInt32(10), Parallelism: newInt32(11), Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{Labels: defaultLabels}, + ObjectMeta: metav1.ObjectMeta{Labels: defaultLabels}, }, }, }, @@ -133,7 +134,7 @@ func TestSetDefaultJob(t *testing.T) { Completions: newInt32(10), Parallelism: newInt32(11), Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{Labels: defaultLabels}, + ObjectMeta: metav1.ObjectMeta{Labels: defaultLabels}, }, }, }, @@ -145,7 +146,7 @@ func TestSetDefaultJob(t *testing.T) { Completions: newInt32(11), Parallelism: newInt32(10), Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{Labels: defaultLabels}, + ObjectMeta: metav1.ObjectMeta{Labels: defaultLabels}, }, }, }, diff --git a/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/generated.pb.go b/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/generated.pb.go index f50fd8d9..0b46e65e 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/generated.pb.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/generated.pb.go @@ -821,7 +821,7 @@ func (this *CronJob) String() string { return "nil" } s := strings.Join([]string{`&CronJob{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "CronJobSpec", "CronJobSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "CronJobStatus", "CronJobStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -869,7 +869,7 @@ func (this *Job) String() string { return "nil" } s := strings.Join([]string{`&Job{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "JobSpec", "JobSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "JobStatus", "JobStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -937,7 +937,7 @@ func (this *JobTemplate) String() string { return "nil" } s := strings.Join([]string{`&JobTemplate{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Template:` + strings.Replace(strings.Replace(this.Template.String(), "JobTemplateSpec", "JobTemplateSpec", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -948,7 +948,7 @@ func (this *JobTemplateSpec) String() string { return "nil" } s := strings.Join([]string{`&JobTemplateSpec{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "JobSpec", "JobSpec", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -2708,77 +2708,77 @@ var ( var fileDescriptorGenerated = []byte{ // 1158 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xd4, 0x56, 0x4b, 0x6f, 0x23, 0x45, - 0x10, 0xce, 0xd8, 0x89, 0x1f, 0xed, 0xcd, 0xab, 0x21, 0x5a, 0x13, 0x24, 0x3b, 0xb2, 0x04, 0xca, - 0xae, 0x76, 0x67, 0x14, 0x13, 0x2d, 0xcb, 0x1e, 0x90, 0x76, 0x82, 0x90, 0x88, 0x12, 0x6d, 0xd4, - 0xce, 0xb2, 0x2b, 0x08, 0x12, 0xed, 0x71, 0xc7, 0x9e, 0xcd, 0xcc, 0xf4, 0x30, 0xdd, 0x13, 0x29, - 0x37, 0xce, 0x9c, 0x90, 0xf8, 0x01, 0xfc, 0x0d, 0x84, 0xb8, 0x20, 0x71, 0xc8, 0x31, 0x48, 0x1c, - 0x38, 0x59, 0x64, 0xf8, 0x17, 0x39, 0xa1, 0x6e, 0xf7, 0x3c, 0xfc, 0xca, 0xc6, 0x41, 0x8b, 0xc4, - 0xcd, 0x53, 0x5d, 0xdf, 0x57, 0xd5, 0x55, 0x5f, 0x57, 0x19, 0x7c, 0x74, 0xf2, 0x98, 0xe9, 0x36, - 0x35, 0x4e, 0xc2, 0x36, 0x09, 0x3c, 0xc2, 0x09, 0x33, 0xfc, 0x93, 0xae, 0x81, 0x7d, 0x9b, 0x19, - 0x6d, 0xcc, 0xad, 0x9e, 0x71, 0xda, 0xc4, 0x8e, 0xdf, 0xc3, 0x5b, 0x46, 0x97, 0x78, 0x24, 0xc0, - 0x9c, 0x74, 0x74, 0x3f, 0xa0, 0x9c, 0xc2, 0x7b, 0x03, 0xa8, 0x9e, 0x42, 0x75, 0xff, 0xa4, 0xab, - 0x0b, 0xa8, 0x2e, 0xa1, 0x7a, 0x0c, 0x5d, 0x7f, 0xd8, 0xb5, 0x79, 0x2f, 0x6c, 0xeb, 0x16, 0x75, - 0x8d, 0x2e, 0xed, 0x52, 0x43, 0x32, 0xb4, 0xc3, 0x63, 0xf9, 0x25, 0x3f, 0xe4, 0xaf, 0x01, 0xf3, - 0xfa, 0xb6, 0x4a, 0x0a, 0xfb, 0xb6, 0x8b, 0xad, 0x9e, 0xed, 0x91, 0xe0, 0x2c, 0x4d, 0xcb, 0x25, - 0x1c, 0x1b, 0xa7, 0x63, 0xf9, 0xac, 0x1b, 0xd3, 0x50, 0x41, 0xe8, 0x71, 0xdb, 0x25, 0x63, 0x80, - 0x47, 0xaf, 0x03, 0x30, 0xab, 0x47, 0x5c, 0x3c, 0x86, 0x6b, 0x4e, 0xad, 0x99, 0x11, 0x10, 0x46, - 0xc3, 0xc0, 0x1a, 0x8f, 0xf5, 0x60, 0x3a, 0x66, 0xc2, 0x55, 0xb6, 0x26, 0x7b, 0x87, 0xdc, 0x76, - 0x0c, 0xdb, 0xe3, 0x8c, 0x07, 0xa3, 0x90, 0xc6, 0x8f, 0x39, 0x50, 0xdc, 0x09, 0xa8, 0xb7, 0x4b, - 0xdb, 0xf0, 0x25, 0x28, 0x89, 0x22, 0x75, 0x30, 0xc7, 0x55, 0x6d, 0x43, 0xdb, 0xac, 0x34, 0x37, - 0xf5, 0xa9, 0xcd, 0xd2, 0x4f, 0xb7, 0xf4, 0x67, 0xed, 0x57, 0xc4, 0xe2, 0xfb, 0x84, 0x63, 0x13, - 0x9e, 0xf7, 0xeb, 0x73, 0x51, 0xbf, 0x0e, 0x52, 0x1b, 0x4a, 0xd8, 0xe0, 0x4b, 0x30, 0xcf, 0x7c, - 0x62, 0x55, 0x73, 0x92, 0xf5, 0x91, 0x7e, 0x63, 0x09, 0xe8, 0x2a, 0xb7, 0x96, 0x4f, 0x2c, 0xf3, - 0x8e, 0x8a, 0x31, 0x2f, 0xbe, 0x90, 0x64, 0x84, 0x5f, 0x83, 0x02, 0xe3, 0x98, 0x87, 0xac, 0x9a, - 0x97, 0xdc, 0x8f, 0x6f, 0xc1, 0x2d, 0xf1, 0xe6, 0x92, 0x62, 0x2f, 0x0c, 0xbe, 0x91, 0xe2, 0x6d, - 0xfc, 0xa6, 0x81, 0x8a, 0xf2, 0xdc, 0xb3, 0x19, 0x87, 0x47, 0x63, 0x55, 0xd2, 0xe3, 0x98, 0x59, - 0x45, 0xa4, 0x51, 0x85, 0xb7, 0xa8, 0x96, 0x40, 0xcb, 0x5a, 0xad, 0xa8, 0x48, 0xa5, 0xd8, 0x92, - 0xa9, 0xd4, 0x0b, 0xb0, 0x60, 0x73, 0xe2, 0xb2, 0x6a, 0x6e, 0x23, 0xbf, 0x59, 0x69, 0x36, 0x67, - 0xbf, 0x8e, 0xb9, 0xa8, 0xe8, 0x17, 0x3e, 0x13, 0x44, 0x68, 0xc0, 0xd7, 0xf8, 0x2e, 0x9f, 0x5c, - 0x43, 0x94, 0x0f, 0x3e, 0x00, 0x25, 0xa1, 0xd3, 0x4e, 0xe8, 0x10, 0x79, 0x8d, 0x72, 0x9a, 0x56, - 0x4b, 0xd9, 0x51, 0xe2, 0x01, 0x9f, 0x83, 0xbb, 0x8c, 0xe3, 0x80, 0xdb, 0x5e, 0xf7, 0x13, 0x82, - 0x3b, 0x8e, 0xed, 0x91, 0x16, 0xb1, 0xa8, 0xd7, 0x61, 0xb2, 0xa7, 0x79, 0xf3, 0xdd, 0xa8, 0x5f, - 0xbf, 0xdb, 0x9a, 0xec, 0x82, 0xa6, 0x61, 0xe1, 0x11, 0x58, 0xb5, 0xa8, 0x67, 0x85, 0x41, 0x40, - 0x3c, 0xeb, 0xec, 0x80, 0x3a, 0xb6, 0x75, 0x26, 0x1b, 0x59, 0x36, 0x75, 0x95, 0xcd, 0xea, 0xce, - 0xa8, 0xc3, 0xd5, 0x24, 0x23, 0x1a, 0x27, 0x82, 0xef, 0x81, 0x22, 0x0b, 0x99, 0x4f, 0xbc, 0x4e, - 0x75, 0x7e, 0x43, 0xdb, 0x2c, 0x99, 0x95, 0xa8, 0x5f, 0x2f, 0xb6, 0x06, 0x26, 0x14, 0x9f, 0xc1, - 0x6f, 0x40, 0xe5, 0x15, 0x6d, 0x1f, 0x12, 0xd7, 0x77, 0x30, 0x27, 0xd5, 0x05, 0xd9, 0xd3, 0x27, - 0x33, 0x14, 0x7e, 0x37, 0x45, 0x4b, 0x9d, 0xbe, 0xa5, 0x52, 0xaf, 0x64, 0x0e, 0x50, 0x36, 0x46, - 0xe3, 0x0f, 0x0d, 0x2c, 0x0e, 0xa9, 0x0f, 0x3e, 0x07, 0x05, 0x6c, 0x71, 0xfb, 0x54, 0x34, 0x43, - 0x34, 0xfe, 0xe1, 0x4d, 0x5e, 0x1e, 0x22, 0xc7, 0x44, 0x5c, 0x98, 0xa4, 0xe2, 0x7d, 0x2a, 0x49, - 0x90, 0x22, 0x83, 0x0e, 0x58, 0x71, 0x30, 0xe3, 0x71, 0x47, 0x0f, 0x6d, 0x97, 0xc8, 0x5a, 0x54, - 0x9a, 0xf7, 0x6f, 0x26, 0x5a, 0x81, 0x30, 0xdf, 0x8e, 0xfa, 0xf5, 0x95, 0xbd, 0x11, 0x1e, 0x34, - 0xc6, 0xdc, 0xf8, 0x21, 0x07, 0xf2, 0x6f, 0x76, 0x90, 0x1c, 0x0e, 0x0d, 0x92, 0xe6, 0x6c, 0x4d, - 0x9a, 0x3a, 0x44, 0x8e, 0x46, 0x86, 0xc8, 0xf6, 0x8c, 0xbc, 0xd7, 0x0f, 0x90, 0x8b, 0x3c, 0xb8, - 0xb3, 0x4b, 0xdb, 0x3b, 0xd4, 0xeb, 0xd8, 0xdc, 0xa6, 0x1e, 0xdc, 0x06, 0xf3, 0xfc, 0xcc, 0x8f, - 0x9f, 0xdd, 0x46, 0x9c, 0xd0, 0xe1, 0x99, 0x4f, 0xae, 0xfa, 0xf5, 0x95, 0xac, 0xaf, 0xb0, 0x21, - 0xe9, 0x0d, 0x3f, 0x4f, 0x92, 0xcc, 0x49, 0xdc, 0xc7, 0xc3, 0xe1, 0xae, 0xfa, 0xf5, 0x6b, 0x97, - 0x85, 0x9e, 0x70, 0x0e, 0xa7, 0x07, 0xbb, 0x60, 0x51, 0x34, 0xf2, 0x20, 0xa0, 0xed, 0x81, 0x3e, - 0xf2, 0x33, 0xeb, 0x63, 0x4d, 0xa5, 0xb2, 0xb8, 0x97, 0x25, 0x42, 0xc3, 0xbc, 0xf0, 0x14, 0x40, - 0x61, 0x38, 0x0c, 0xb0, 0xc7, 0x06, 0x97, 0xbb, 0x9d, 0x1a, 0xd7, 0x55, 0x34, 0xb8, 0x37, 0xc6, - 0x86, 0x26, 0x44, 0x80, 0xef, 0x83, 0x42, 0x40, 0x30, 0xa3, 0x9e, 0x7c, 0xda, 0xe5, 0xb4, 0x4f, - 0x48, 0x5a, 0x91, 0x3a, 0x85, 0xf7, 0x40, 0xd1, 0x25, 0x8c, 0xe1, 0x2e, 0xa9, 0x16, 0xa4, 0xe3, - 0xb2, 0x72, 0x2c, 0xee, 0x0f, 0xcc, 0x28, 0x3e, 0x6f, 0xfc, 0xa2, 0x81, 0xe2, 0x7f, 0xb3, 0x0f, - 0x5a, 0xc3, 0xfb, 0x40, 0x9f, 0x4d, 0x99, 0x53, 0x76, 0xc1, 0x4f, 0x79, 0x99, 0xbe, 0xdc, 0x03, - 0x5b, 0xa0, 0xe2, 0xe3, 0x00, 0x3b, 0x0e, 0x71, 0x6c, 0xe6, 0xca, 0x1b, 0x2c, 0x98, 0xcb, 0x62, - 0x7a, 0x1d, 0xa4, 0x66, 0x94, 0xf5, 0x11, 0x10, 0x8b, 0xba, 0xbe, 0x43, 0x44, 0x89, 0x07, 0x72, - 0x54, 0x90, 0x9d, 0xd4, 0x8c, 0xb2, 0x3e, 0xf0, 0x19, 0x58, 0x1b, 0x4c, 0xa4, 0xd1, 0xed, 0x91, - 0x97, 0xdb, 0xe3, 0x9d, 0xa8, 0x5f, 0x5f, 0x7b, 0x3a, 0xc9, 0x01, 0x4d, 0xc6, 0xc1, 0xaf, 0x40, - 0x89, 0x11, 0x87, 0x58, 0x9c, 0x06, 0x4a, 0x42, 0x1f, 0xdc, 0xb0, 0xea, 0xb8, 0x4d, 0x9c, 0x96, - 0x82, 0x9a, 0x77, 0xe4, 0xbe, 0x53, 0x5f, 0x28, 0xa1, 0x84, 0x4f, 0xc0, 0x92, 0x8b, 0xbd, 0x10, - 0x27, 0x9e, 0x52, 0x3b, 0x25, 0x13, 0x46, 0xfd, 0xfa, 0xd2, 0xfe, 0xd0, 0x09, 0x1a, 0xf1, 0x84, - 0x5f, 0x82, 0x12, 0x8f, 0x97, 0x49, 0x41, 0xa6, 0xf6, 0x9a, 0x61, 0x7e, 0x40, 0x3b, 0x43, 0xfb, - 0x23, 0xd1, 0x43, 0xb2, 0x3c, 0x12, 0xc2, 0xc6, 0xcf, 0x79, 0x50, 0x4e, 0xb7, 0xc6, 0x09, 0x00, - 0x56, 0xfc, 0xac, 0x99, 0xda, 0x1c, 0x1f, 0xce, 0x26, 0x91, 0x64, 0x2c, 0xa4, 0x93, 0x37, 0x31, - 0x31, 0x94, 0xa1, 0x87, 0x2f, 0x40, 0x59, 0xee, 0x71, 0xf9, 0x6c, 0x73, 0x33, 0x3f, 0xdb, 0xc5, - 0xa8, 0x5f, 0x2f, 0xb7, 0x62, 0x02, 0x94, 0x72, 0xc1, 0x63, 0xb0, 0x94, 0x6a, 0xe5, 0x96, 0x23, - 0x48, 0x36, 0x66, 0x67, 0x88, 0x05, 0x8d, 0xb0, 0x8a, 0x41, 0xa0, 0x76, 0xec, 0xbc, 0x94, 0xec, - 0xb4, 0xa5, 0x69, 0x80, 0x32, 0x0b, 0x2d, 0x8b, 0x90, 0x0e, 0xe9, 0xc8, 0xbe, 0x2f, 0x98, 0xab, - 0xca, 0xb5, 0xdc, 0x8a, 0x0f, 0x50, 0xea, 0x23, 0x88, 0x8f, 0xb1, 0xed, 0x90, 0x8e, 0xec, 0x77, - 0x86, 0xf8, 0x53, 0x69, 0x45, 0xea, 0xb4, 0xf1, 0xbb, 0x06, 0xb2, 0xff, 0x09, 0xde, 0xe0, 0x9e, - 0xec, 0x65, 0x34, 0x98, 0xfb, 0xd7, 0x7f, 0x68, 0xae, 0x13, 0xe4, 0xaf, 0x1a, 0x58, 0x1e, 0xf1, - 0xff, 0xbf, 0xed, 0x7f, 0xf3, 0xfe, 0xf9, 0x65, 0x6d, 0xee, 0xe2, 0xb2, 0x36, 0xf7, 0xe7, 0x65, - 0x6d, 0xee, 0xdb, 0xa8, 0xa6, 0x9d, 0x47, 0x35, 0xed, 0x22, 0xaa, 0x69, 0x7f, 0x45, 0x35, 0xed, - 0xfb, 0xbf, 0x6b, 0x73, 0x5f, 0x94, 0x62, 0x9e, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x00, 0x9d, - 0xf9, 0x2b, 0xfa, 0x0e, 0x00, 0x00, + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xd4, 0x56, 0xcd, 0x6f, 0xe3, 0x44, + 0x14, 0xaf, 0x93, 0x36, 0x1f, 0x93, 0x7e, 0x0e, 0x54, 0x1b, 0x8a, 0x94, 0x54, 0x91, 0x40, 0xdd, + 0xd5, 0xae, 0x4d, 0x43, 0xb5, 0x2c, 0x7b, 0x40, 0x5a, 0x17, 0x21, 0x51, 0xb5, 0xda, 0x6a, 0xd2, + 0x65, 0x11, 0x14, 0x69, 0x27, 0xf6, 0x34, 0xf1, 0xd6, 0xf6, 0x18, 0xcf, 0xb8, 0x52, 0x6e, 0x9c, + 0x39, 0x71, 0xe7, 0x0f, 0xe0, 0x5f, 0x40, 0x88, 0x23, 0x87, 0x72, 0xeb, 0x81, 0x03, 0x5c, 0x22, + 0x6a, 0xfe, 0x8b, 0x9e, 0x90, 0x27, 0xe3, 0x8f, 0x7c, 0x75, 0x9b, 0x22, 0x55, 0xe2, 0xe6, 0x79, + 0xf3, 0x7e, 0xbf, 0x79, 0xf3, 0xde, 0x6f, 0xde, 0x33, 0xf8, 0xf8, 0xf4, 0x09, 0x53, 0x2d, 0xaa, + 0x9d, 0x06, 0x6d, 0xe2, 0xbb, 0x84, 0x13, 0xa6, 0x79, 0xa7, 0x1d, 0x0d, 0x7b, 0x16, 0xd3, 0xda, + 0x98, 0x1b, 0x5d, 0xed, 0xac, 0x89, 0x6d, 0xaf, 0x8b, 0xb7, 0xb5, 0x0e, 0x71, 0x89, 0x8f, 0x39, + 0x31, 0x55, 0xcf, 0xa7, 0x9c, 0xc2, 0xfb, 0x03, 0xa8, 0x9a, 0x42, 0x55, 0xef, 0xb4, 0xa3, 0x46, + 0x50, 0x55, 0x40, 0xd5, 0x18, 0xba, 0xf1, 0xa8, 0x63, 0xf1, 0x6e, 0xd0, 0x56, 0x0d, 0xea, 0x68, + 0x1d, 0xda, 0xa1, 0x9a, 0x60, 0x68, 0x07, 0x27, 0x62, 0x25, 0x16, 0xe2, 0x6b, 0xc0, 0xbc, 0xb1, + 0x23, 0x83, 0xc2, 0x9e, 0xe5, 0x60, 0xa3, 0x6b, 0xb9, 0xc4, 0xef, 0xa5, 0x61, 0x39, 0x84, 0x63, + 0xed, 0x6c, 0x2c, 0x9e, 0x0d, 0x6d, 0x1a, 0xca, 0x0f, 0x5c, 0x6e, 0x39, 0x64, 0x0c, 0xf0, 0xf8, + 0x4d, 0x00, 0x66, 0x74, 0x89, 0x83, 0xc7, 0x70, 0xcd, 0xa9, 0x39, 0xd3, 0x7c, 0xc2, 0x68, 0xe0, + 0x1b, 0xe3, 0x67, 0x3d, 0x9c, 0x8e, 0x99, 0x70, 0x95, 0xed, 0xc9, 0xde, 0x01, 0xb7, 0x6c, 0xcd, + 0x72, 0x39, 0xe3, 0xfe, 0x28, 0xa4, 0xf1, 0x53, 0x0e, 0x14, 0x77, 0x7d, 0xea, 0xee, 0xd1, 0x36, + 0x7c, 0x05, 0x4a, 0x51, 0x92, 0x4c, 0xcc, 0x71, 0x55, 0xd9, 0x54, 0xb6, 0x2a, 0xcd, 0x0f, 0x54, + 0x59, 0xac, 0xec, 0x5d, 0xd3, 0x72, 0x45, 0xde, 0xea, 0xd9, 0xb6, 0xfa, 0xbc, 0xfd, 0x9a, 0x18, + 0xfc, 0x80, 0x70, 0xac, 0xc3, 0xf3, 0x7e, 0x7d, 0x2e, 0xec, 0xd7, 0x41, 0x6a, 0x43, 0x09, 0x2b, + 0xfc, 0x12, 0xcc, 0x33, 0x8f, 0x18, 0xd5, 0x9c, 0x60, 0x7f, 0xac, 0xde, 0x58, 0x0a, 0xaa, 0x8c, + 0xb1, 0xe5, 0x11, 0x43, 0x5f, 0x94, 0x67, 0xcc, 0x47, 0x2b, 0x24, 0x18, 0xe1, 0x2b, 0x50, 0x60, + 0x1c, 0xf3, 0x80, 0x55, 0xf3, 0x82, 0xfb, 0xc9, 0x2d, 0xb8, 0x05, 0x5e, 0x5f, 0x96, 0xec, 0x85, + 0xc1, 0x1a, 0x49, 0xde, 0xc6, 0x6f, 0x0a, 0xa8, 0x48, 0xcf, 0x7d, 0x8b, 0x71, 0x78, 0x3c, 0x96, + 0x2d, 0xf5, 0x66, 0xd9, 0x8a, 0xd0, 0x22, 0x57, 0xab, 0xf2, 0xa4, 0x52, 0x6c, 0xc9, 0x64, 0xea, + 0x25, 0x58, 0xb0, 0x38, 0x71, 0x58, 0x35, 0xb7, 0x99, 0xdf, 0xaa, 0x34, 0x9b, 0xb3, 0x5f, 0x47, + 0x5f, 0x92, 0xf4, 0x0b, 0x9f, 0x47, 0x44, 0x68, 0xc0, 0xd7, 0xf8, 0x3e, 0x9f, 0x5c, 0x23, 0x4a, + 0x1f, 0x7c, 0x08, 0x4a, 0x91, 0x5e, 0xcd, 0xc0, 0x26, 0xe2, 0x1a, 0xe5, 0x34, 0xac, 0x96, 0xb4, + 0xa3, 0xc4, 0x03, 0xbe, 0x00, 0xf7, 0x18, 0xc7, 0x3e, 0xb7, 0xdc, 0xce, 0xa7, 0x04, 0x9b, 0xb6, + 0xe5, 0x92, 0x16, 0x31, 0xa8, 0x6b, 0x32, 0x51, 0xd3, 0xbc, 0xfe, 0x6e, 0xd8, 0xaf, 0xdf, 0x6b, + 0x4d, 0x76, 0x41, 0xd3, 0xb0, 0xf0, 0x18, 0xac, 0x19, 0xd4, 0x35, 0x02, 0xdf, 0x27, 0xae, 0xd1, + 0x3b, 0xa4, 0xb6, 0x65, 0xf4, 0x44, 0x21, 0xcb, 0xba, 0x2a, 0xa3, 0x59, 0xdb, 0x1d, 0x75, 0xb8, + 0x9a, 0x64, 0x44, 0xe3, 0x44, 0xf0, 0x3d, 0x50, 0x64, 0x01, 0xf3, 0x88, 0x6b, 0x56, 0xe7, 0x37, + 0x95, 0xad, 0x92, 0x5e, 0x09, 0xfb, 0xf5, 0x62, 0x6b, 0x60, 0x42, 0xf1, 0x1e, 0xfc, 0x16, 0x54, + 0x5e, 0xd3, 0xf6, 0x11, 0x71, 0x3c, 0x1b, 0x73, 0x52, 0x5d, 0x10, 0x35, 0x7d, 0x3a, 0x43, 0xe2, + 0xf7, 0x52, 0xb4, 0xd0, 0xe9, 0x5b, 0x32, 0xf4, 0x4a, 0x66, 0x03, 0x65, 0xcf, 0x68, 0xfc, 0xa1, + 0x80, 0xa5, 0x21, 0xf5, 0xc1, 0x17, 0xa0, 0x80, 0x0d, 0x6e, 0x9d, 0x45, 0xc5, 0x88, 0x0a, 0xff, + 0x68, 0xfa, 0xf9, 0xe9, 0xcb, 0x43, 0xe4, 0x84, 0x44, 0x17, 0x26, 0xa9, 0x78, 0x9f, 0x09, 0x12, + 0x24, 0xc9, 0xa0, 0x0d, 0x56, 0x6d, 0xcc, 0x78, 0x5c, 0xd1, 0x23, 0xcb, 0x21, 0x22, 0x17, 0x95, + 0xe6, 0x83, 0x9b, 0x89, 0x36, 0x42, 0xe8, 0x6f, 0x87, 0xfd, 0xfa, 0xea, 0xfe, 0x08, 0x0f, 0x1a, + 0x63, 0x6e, 0xfc, 0x98, 0x03, 0xf9, 0xbb, 0x69, 0x28, 0x47, 0x43, 0x0d, 0xa5, 0x39, 0x5b, 0xb1, + 0xa6, 0x36, 0x93, 0xe3, 0x91, 0x66, 0xb2, 0x33, 0x23, 0xef, 0xf5, 0x8d, 0xe4, 0x22, 0x0f, 0x16, + 0xf7, 0x68, 0x7b, 0x97, 0xba, 0xa6, 0xc5, 0x2d, 0xea, 0xc2, 0x1d, 0x30, 0xcf, 0x7b, 0x5e, 0xfc, + 0xfc, 0x36, 0xe3, 0x80, 0x8e, 0x7a, 0x1e, 0xb9, 0xea, 0xd7, 0x57, 0xb3, 0xbe, 0x91, 0x0d, 0x09, + 0x6f, 0xf8, 0x45, 0x12, 0x64, 0x4e, 0xe0, 0x3e, 0x19, 0x3e, 0xee, 0xaa, 0x5f, 0xbf, 0x76, 0x78, + 0xa8, 0x09, 0xe7, 0x70, 0x78, 0xb0, 0x03, 0x96, 0xa2, 0x82, 0x1e, 0xfa, 0xb4, 0x3d, 0xd0, 0x49, + 0x7e, 0x66, 0x9d, 0xac, 0xcb, 0x50, 0x96, 0xf6, 0xb3, 0x44, 0x68, 0x98, 0x17, 0x9e, 0x01, 0x18, + 0x19, 0x8e, 0x7c, 0xec, 0xb2, 0xc1, 0xe5, 0x6e, 0xa7, 0xca, 0x0d, 0x79, 0x1a, 0xdc, 0x1f, 0x63, + 0x43, 0x13, 0x4e, 0x80, 0xef, 0x83, 0x82, 0x4f, 0x30, 0xa3, 0xae, 0x78, 0xe2, 0xe5, 0xb4, 0x4e, + 0x48, 0x58, 0x91, 0xdc, 0x85, 0xf7, 0x41, 0xd1, 0x21, 0x8c, 0xe1, 0x0e, 0xa9, 0x16, 0x84, 0xe3, + 0x8a, 0x74, 0x2c, 0x1e, 0x0c, 0xcc, 0x28, 0xde, 0x6f, 0xfc, 0xaa, 0x80, 0xe2, 0xdd, 0xcc, 0x85, + 0xd6, 0xf0, 0x5c, 0x50, 0x67, 0x53, 0xe6, 0x94, 0x99, 0xf0, 0x73, 0x5e, 0x84, 0x2f, 0xe6, 0xc1, + 0x36, 0xa8, 0x78, 0xd8, 0xc7, 0xb6, 0x4d, 0x6c, 0x8b, 0x39, 0xe2, 0x06, 0x0b, 0xfa, 0x4a, 0xd4, + 0xc5, 0x0e, 0x53, 0x33, 0xca, 0xfa, 0x44, 0x10, 0x83, 0x3a, 0x9e, 0x4d, 0xa2, 0x14, 0x0f, 0xe4, + 0x28, 0x21, 0xbb, 0xa9, 0x19, 0x65, 0x7d, 0xe0, 0x73, 0xb0, 0x3e, 0xe8, 0x4c, 0xa3, 0x53, 0x24, + 0x2f, 0xa6, 0xc8, 0x3b, 0x61, 0xbf, 0xbe, 0xfe, 0x6c, 0x92, 0x03, 0x9a, 0x8c, 0x83, 0xdf, 0x80, + 0x12, 0x23, 0x36, 0x31, 0x38, 0xf5, 0xa5, 0x84, 0x3e, 0xbc, 0x61, 0xd6, 0x71, 0x9b, 0xd8, 0x2d, + 0x09, 0xd5, 0x17, 0xc5, 0xdc, 0x93, 0x2b, 0x94, 0x50, 0xc2, 0xa7, 0x60, 0xd9, 0xc1, 0x6e, 0x80, + 0x13, 0x4f, 0xa1, 0x9d, 0x92, 0x0e, 0xc3, 0x7e, 0x7d, 0xf9, 0x60, 0x68, 0x07, 0x8d, 0x78, 0xc2, + 0xaf, 0x41, 0x89, 0xc7, 0x43, 0xa5, 0x20, 0x42, 0x7b, 0x43, 0x53, 0x3f, 0xa4, 0xe6, 0xd0, 0x1c, + 0x49, 0xf4, 0x90, 0x0c, 0x91, 0x84, 0xb0, 0xf1, 0x4b, 0x1e, 0x94, 0xd3, 0xe9, 0x71, 0x0a, 0x80, + 0x11, 0x3f, 0x6b, 0x26, 0x27, 0xc8, 0x47, 0xb3, 0x49, 0x24, 0x69, 0x0b, 0x69, 0xe7, 0x4d, 0x4c, + 0x0c, 0x65, 0xe8, 0xe1, 0x4b, 0x50, 0x16, 0xf3, 0x5c, 0x3c, 0xdb, 0xdc, 0xcc, 0xcf, 0x76, 0x29, + 0xec, 0xd7, 0xcb, 0xad, 0x98, 0x00, 0xa5, 0x5c, 0xf0, 0x04, 0x2c, 0xa7, 0x5a, 0xb9, 0x65, 0x0b, + 0x12, 0x85, 0xd9, 0x1d, 0x62, 0x41, 0x23, 0xac, 0x51, 0x23, 0x90, 0xb3, 0x76, 0x5e, 0x48, 0x76, + 0xda, 0xf0, 0xd4, 0x40, 0x99, 0x05, 0x86, 0x41, 0x88, 0x49, 0x4c, 0x51, 0xf7, 0x05, 0x7d, 0x4d, + 0xba, 0x96, 0x5b, 0xf1, 0x06, 0x4a, 0x7d, 0x22, 0xe2, 0x13, 0x6c, 0xd9, 0xc4, 0x14, 0xf5, 0xce, + 0x10, 0x7f, 0x26, 0xac, 0x48, 0xee, 0x36, 0xfe, 0x52, 0x40, 0xf6, 0xdf, 0xe0, 0x0e, 0xe6, 0x65, + 0x37, 0xa3, 0xc5, 0xdc, 0x7f, 0xfe, 0xc1, 0xb9, 0x4e, 0x98, 0xbf, 0x2b, 0x60, 0x65, 0xc4, 0xff, + 0xff, 0xfa, 0x3f, 0xa0, 0x3f, 0x38, 0xbf, 0xac, 0xcd, 0x5d, 0x5c, 0xd6, 0xe6, 0xfe, 0xbc, 0xac, + 0xcd, 0x7d, 0x17, 0xd6, 0x94, 0xf3, 0xb0, 0xa6, 0x5c, 0x84, 0x35, 0xe5, 0xef, 0xb0, 0xa6, 0xfc, + 0xf0, 0x4f, 0x6d, 0xee, 0xab, 0x52, 0xcc, 0xf3, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x94, 0x36, + 0x56, 0x74, 0x1a, 0x0f, 0x00, 0x00, } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/generated.proto b/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/generated.proto index 67194ebb..1654920f 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/generated.proto +++ b/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/generated.proto @@ -36,7 +36,7 @@ message CronJob { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec is a structure defining the expected behavior of a job, including the schedule. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -100,7 +100,7 @@ message Job { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec is a structure defining the expected behavior of a job. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -235,7 +235,7 @@ message JobTemplate { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Template defines jobs that will be created from this template // http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -248,7 +248,7 @@ message JobTemplateSpec { // Standard object's metadata of the jobs created from this template. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Specification of the desired behavior of the job. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status diff --git a/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/register.go b/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/register.go index 83c16856..e8e669ab 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/register.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/register.go @@ -20,7 +20,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/api/v1" ) // GroupName is the group name use in this package @@ -47,10 +46,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { &JobTemplate{}, &CronJob{}, &CronJobList{}, - &v1.ListOptions{}, - &v1.DeleteOptions{}, - &metav1.ExportOptions{}, - &metav1.GetOptions{}, ) scheme.AddKnownTypeWithName(SchemeGroupVersion.WithKind("ScheduledJob"), &CronJob{}) scheme.AddKnownTypeWithName(SchemeGroupVersion.WithKind("ScheduledJobList"), &CronJobList{}) diff --git a/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/types.generated.go b/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/types.generated.go index 81bef84a..abdc2707 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/types.generated.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/types.generated.go @@ -26,9 +26,9 @@ import ( "fmt" codec1978 "github.com/ugorji/go/codec" pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - pkg3_types "k8s.io/apimachinery/pkg/types" + pkg2_types "k8s.io/apimachinery/pkg/types" pkg4_resource "k8s.io/kubernetes/pkg/api/resource" - pkg2_v1 "k8s.io/kubernetes/pkg/api/v1" + pkg3_v1 "k8s.io/kubernetes/pkg/api/v1" pkg5_intstr "k8s.io/kubernetes/pkg/util/intstr" "reflect" "runtime" @@ -66,9 +66,9 @@ func init() { } if false { // reference the types, but skip this branch at build/run time var v0 pkg1_v1.TypeMeta - var v1 pkg3_types.UID + var v1 pkg2_types.UID var v2 pkg4_resource.Quantity - var v3 pkg2_v1.ObjectMeta + var v3 pkg3_v1.PodTemplateSpec var v4 pkg5_intstr.IntOrString var v5 time.Time _, _, _, _, _, _ = v0, v1, v2, v3, v4, v5 @@ -164,7 +164,13 @@ func (x *Job) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -174,7 +180,13 @@ func (x *Job) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -298,24 +310,30 @@ func (x *Job) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = JobSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = JobStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -328,16 +346,16 @@ func (x *Job) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -345,21 +363,21 @@ func (x *Job) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -367,38 +385,44 @@ func (x *Job) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -406,16 +430,16 @@ func (x *Job) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = JobSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -423,21 +447,21 @@ func (x *Job) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = JobStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -898,7 +922,13 @@ func (x *JobTemplate) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -908,7 +938,13 @@ func (x *JobTemplate) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -1015,17 +1051,23 @@ func (x *JobTemplate) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "template": if r.TryDecodeAsNil() { x.Template = JobTemplateSpec{} } else { - yyv9 := &x.Template - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Template + yyv10.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -1038,16 +1080,16 @@ func (x *JobTemplate) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + var yyj11 int + var yyb11 bool + var yyhl11 bool = l >= 0 + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1055,21 +1097,21 @@ func (x *JobTemplate) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv11 := &x.Kind - yym12 := z.DecBinary() - _ = yym12 + yyv12 := &x.Kind + yym13 := z.DecBinary() + _ = yym13 if false { } else { - *((*string)(yyv11)) = r.DecodeString() + *((*string)(yyv12)) = r.DecodeString() } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1077,38 +1119,44 @@ func (x *JobTemplate) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv13 := &x.APIVersion - yym14 := z.DecBinary() - _ = yym14 + yyv14 := &x.APIVersion + yym15 := z.DecBinary() + _ = yym15 if false { } else { - *((*string)(yyv13)) = r.DecodeString() + *((*string)(yyv14)) = r.DecodeString() } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv15 := &x.ObjectMeta - yyv15.CodecDecodeSelf(d) + yyv16 := &x.ObjectMeta + yym17 := z.DecBinary() + _ = yym17 + if false { + } else if z.HasExtensions() && z.DecExt(yyv16) { + } else { + z.DecFallback(yyv16, false) + } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1116,21 +1164,21 @@ func (x *JobTemplate) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Template = JobTemplateSpec{} } else { - yyv16 := &x.Template - yyv16.CodecDecodeSelf(d) + yyv18 := &x.Template + yyv18.CodecDecodeSelf(d) } for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj10-1, "") + z.DecStructFieldNotFound(yyj11-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -1171,7 +1219,13 @@ func (x *JobTemplateSpec) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[0] { yy4 := &x.ObjectMeta - yy4.CodecEncodeSelf(e) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else if z.HasExtensions() && z.EncExt(yy4) { + } else { + z.EncFallback(yy4) + } } else { r.EncodeNil() } @@ -1181,7 +1235,13 @@ func (x *JobTemplateSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy6 := &x.ObjectMeta - yy6.CodecEncodeSelf(e) + yym7 := z.EncBinary() + _ = yym7 + if false { + } else if z.HasExtensions() && z.EncExt(yy6) { + } else { + z.EncFallback(yy6) + } } } if yyr2 || yy2arr2 { @@ -1264,17 +1324,23 @@ func (x *JobTemplateSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { switch yys3 { case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv4 := &x.ObjectMeta - yyv4.CodecDecodeSelf(d) + yym5 := z.DecBinary() + _ = yym5 + if false { + } else if z.HasExtensions() && z.DecExt(yyv4) { + } else { + z.DecFallback(yyv4, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = JobSpec{} } else { - yyv5 := &x.Spec - yyv5.CodecDecodeSelf(d) + yyv6 := &x.Spec + yyv6.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -1287,33 +1353,39 @@ func (x *JobTemplateSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj6 int - var yyb6 bool - var yyhl6 bool = l >= 0 - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l + var yyj7 int + var yyb7 bool + var yyhl7 bool = l >= 0 + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb6 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb6 { + if yyb7 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv7 := &x.ObjectMeta - yyv7.CodecDecodeSelf(d) + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb6 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb6 { + if yyb7 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1321,21 +1393,21 @@ func (x *JobTemplateSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Spec = JobSpec{} } else { - yyv8 := &x.Spec - yyv8.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } for { - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb6 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb6 { + if yyb7 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj6-1, "") + z.DecStructFieldNotFound(yyj7-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -1705,7 +1777,7 @@ func (x *JobSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "template": if r.TryDecodeAsNil() { - x.Template = pkg2_v1.PodTemplateSpec{} + x.Template = pkg3_v1.PodTemplateSpec{} } else { yyv14 := &x.Template yyv14.CodecDecodeSelf(d) @@ -1867,7 +1939,7 @@ func (x *JobSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.Template = pkg2_v1.PodTemplateSpec{} + x.Template = pkg3_v1.PodTemplateSpec{} } else { yyv26 := &x.Template yyv26.CodecDecodeSelf(d) @@ -3037,7 +3109,13 @@ func (x *CronJob) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -3047,7 +3125,13 @@ func (x *CronJob) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -3171,24 +3255,30 @@ func (x *CronJob) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = CronJobSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = CronJobStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -3201,16 +3291,16 @@ func (x *CronJob) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3218,21 +3308,21 @@ func (x *CronJob) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3240,38 +3330,44 @@ func (x *CronJob) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3279,16 +3375,16 @@ func (x *CronJob) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = CronJobSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3296,21 +3392,21 @@ func (x *CronJob) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = CronJobStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -4156,7 +4252,7 @@ func (x *CronJobStatus) CodecEncodeSelf(e *codec1978.Encoder) { _ = yym4 if false { } else { - h.encSlicev1_ObjectReference(([]pkg2_v1.ObjectReference)(x.Active), e) + h.encSlicev1_ObjectReference(([]pkg3_v1.ObjectReference)(x.Active), e) } } } else { @@ -4174,7 +4270,7 @@ func (x *CronJobStatus) CodecEncodeSelf(e *codec1978.Encoder) { _ = yym5 if false { } else { - h.encSlicev1_ObjectReference(([]pkg2_v1.ObjectReference)(x.Active), e) + h.encSlicev1_ObjectReference(([]pkg3_v1.ObjectReference)(x.Active), e) } } } @@ -4292,7 +4388,7 @@ func (x *CronJobStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { _ = yym5 if false { } else { - h.decSlicev1_ObjectReference((*[]pkg2_v1.ObjectReference)(yyv4), d) + h.decSlicev1_ObjectReference((*[]pkg3_v1.ObjectReference)(yyv4), d) } } case "lastScheduleTime": @@ -4349,7 +4445,7 @@ func (x *CronJobStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { _ = yym10 if false { } else { - h.decSlicev1_ObjectReference((*[]pkg2_v1.ObjectReference)(yyv9), d) + h.decSlicev1_ObjectReference((*[]pkg3_v1.ObjectReference)(yyv9), d) } } yyj8++ @@ -4438,7 +4534,7 @@ func (x codecSelfer1234) decSliceJob(v *[]Job, d *codec1978.Decoder) { yyrg1 := len(yyv1) > 0 yyv21 := yyv1 - yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 832) + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 848) if yyrt1 { if yyrl1 <= cap(yyv1) { yyv1 = yyv1[:yyrl1] @@ -4676,7 +4772,7 @@ func (x codecSelfer1234) decSliceCronJob(v *[]CronJob, d *codec1978.Decoder) { yyrg1 := len(yyv1) > 0 yyv21 := yyv1 - yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 1080) + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 1096) if yyrt1 { if yyrl1 <= cap(yyv1) { yyv1 = yyv1[:yyrl1] @@ -4756,7 +4852,7 @@ func (x codecSelfer1234) decSliceCronJob(v *[]CronJob, d *codec1978.Decoder) { } } -func (x codecSelfer1234) encSlicev1_ObjectReference(v []pkg2_v1.ObjectReference, e *codec1978.Encoder) { +func (x codecSelfer1234) encSlicev1_ObjectReference(v []pkg3_v1.ObjectReference, e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r @@ -4769,7 +4865,7 @@ func (x codecSelfer1234) encSlicev1_ObjectReference(v []pkg2_v1.ObjectReference, z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } -func (x codecSelfer1234) decSlicev1_ObjectReference(v *[]pkg2_v1.ObjectReference, d *codec1978.Decoder) { +func (x codecSelfer1234) decSlicev1_ObjectReference(v *[]pkg3_v1.ObjectReference, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r @@ -4780,7 +4876,7 @@ func (x codecSelfer1234) decSlicev1_ObjectReference(v *[]pkg2_v1.ObjectReference _ = yyc1 if yyl1 == 0 { if yyv1 == nil { - yyv1 = []pkg2_v1.ObjectReference{} + yyv1 = []pkg3_v1.ObjectReference{} yyc1 = true } else if len(yyv1) != 0 { yyv1 = yyv1[:0] @@ -4800,10 +4896,10 @@ func (x codecSelfer1234) decSlicev1_ObjectReference(v *[]pkg2_v1.ObjectReference if yyrl1 <= cap(yyv1) { yyv1 = yyv1[:yyrl1] } else { - yyv1 = make([]pkg2_v1.ObjectReference, yyrl1) + yyv1 = make([]pkg3_v1.ObjectReference, yyrl1) } } else { - yyv1 = make([]pkg2_v1.ObjectReference, yyrl1) + yyv1 = make([]pkg3_v1.ObjectReference, yyrl1) } yyc1 = true yyrr1 = len(yyv1) @@ -4818,7 +4914,7 @@ func (x codecSelfer1234) decSlicev1_ObjectReference(v *[]pkg2_v1.ObjectReference for ; yyj1 < yyrr1; yyj1++ { yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv1[yyj1] = pkg2_v1.ObjectReference{} + yyv1[yyj1] = pkg3_v1.ObjectReference{} } else { yyv2 := &yyv1[yyj1] yyv2.CodecDecodeSelf(d) @@ -4827,10 +4923,10 @@ func (x codecSelfer1234) decSlicev1_ObjectReference(v *[]pkg2_v1.ObjectReference } if yyrt1 { for ; yyj1 < yyl1; yyj1++ { - yyv1 = append(yyv1, pkg2_v1.ObjectReference{}) + yyv1 = append(yyv1, pkg3_v1.ObjectReference{}) yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv1[yyj1] = pkg2_v1.ObjectReference{} + yyv1[yyj1] = pkg3_v1.ObjectReference{} } else { yyv3 := &yyv1[yyj1] yyv3.CodecDecodeSelf(d) @@ -4844,13 +4940,13 @@ func (x codecSelfer1234) decSlicev1_ObjectReference(v *[]pkg2_v1.ObjectReference for ; !r.CheckBreak(); yyj1++ { if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, pkg2_v1.ObjectReference{}) // var yyz1 pkg2_v1.ObjectReference + yyv1 = append(yyv1, pkg3_v1.ObjectReference{}) // var yyz1 pkg3_v1.ObjectReference yyc1 = true } yyh1.ElemContainerState(yyj1) if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv1[yyj1] = pkg2_v1.ObjectReference{} + yyv1[yyj1] = pkg3_v1.ObjectReference{} } else { yyv4 := &yyv1[yyj1] yyv4.CodecDecodeSelf(d) @@ -4865,7 +4961,7 @@ func (x codecSelfer1234) decSlicev1_ObjectReference(v *[]pkg2_v1.ObjectReference yyv1 = yyv1[:yyj1] yyc1 = true } else if yyj1 == 0 && yyv1 == nil { - yyv1 = []pkg2_v1.ObjectReference{} + yyv1 = []pkg3_v1.ObjectReference{} yyc1 = true } } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/types.go b/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/types.go index ce797a18..e03f8c05 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/types.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/types.go @@ -29,7 +29,7 @@ type Job struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec is a structure defining the expected behavior of a job. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -60,7 +60,7 @@ type JobTemplate struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Template defines jobs that will be created from this template // http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -73,7 +73,7 @@ type JobTemplateSpec struct { // Standard object's metadata of the jobs created from this template. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Specification of the desired behavior of the job. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -202,7 +202,7 @@ type CronJob struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec is a structure defining the expected behavior of a job, including the schedule. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status diff --git a/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/zz_generated.conversion.go index 6d12fb0f..efea0a5a 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/zz_generated.conversion.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/zz_generated.conversion.go @@ -64,10 +64,7 @@ func RegisterConversions(scheme *runtime.Scheme) error { } func autoConvert_v2alpha1_CronJob_To_batch_CronJob(in *CronJob, out *batch.CronJob, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v2alpha1_CronJobSpec_To_batch_CronJobSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -82,10 +79,7 @@ func Convert_v2alpha1_CronJob_To_batch_CronJob(in *CronJob, out *batch.CronJob, } func autoConvert_batch_CronJob_To_v2alpha1_CronJob(in *batch.CronJob, out *CronJob, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_batch_CronJobSpec_To_v2alpha1_CronJobSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -190,10 +184,7 @@ func Convert_batch_CronJobStatus_To_v2alpha1_CronJobStatus(in *batch.CronJobStat } func autoConvert_v2alpha1_Job_To_batch_Job(in *Job, out *batch.Job, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v2alpha1_JobSpec_To_batch_JobSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -208,10 +199,7 @@ func Convert_v2alpha1_Job_To_batch_Job(in *Job, out *batch.Job, s conversion.Sco } func autoConvert_batch_Job_To_v2alpha1_Job(in *batch.Job, out *Job, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_batch_JobSpec_To_v2alpha1_JobSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -346,10 +334,7 @@ func Convert_batch_JobStatus_To_v2alpha1_JobStatus(in *batch.JobStatus, out *Job } func autoConvert_v2alpha1_JobTemplate_To_batch_JobTemplate(in *JobTemplate, out *batch.JobTemplate, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v2alpha1_JobTemplateSpec_To_batch_JobTemplateSpec(&in.Template, &out.Template, s); err != nil { return err } @@ -361,10 +346,7 @@ func Convert_v2alpha1_JobTemplate_To_batch_JobTemplate(in *JobTemplate, out *bat } func autoConvert_batch_JobTemplate_To_v2alpha1_JobTemplate(in *batch.JobTemplate, out *JobTemplate, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_batch_JobTemplateSpec_To_v2alpha1_JobTemplateSpec(&in.Template, &out.Template, s); err != nil { return err } @@ -376,10 +358,7 @@ func Convert_batch_JobTemplate_To_v2alpha1_JobTemplate(in *batch.JobTemplate, ou } func autoConvert_v2alpha1_JobTemplateSpec_To_batch_JobTemplateSpec(in *JobTemplateSpec, out *batch.JobTemplateSpec, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v2alpha1_JobSpec_To_batch_JobSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -391,10 +370,7 @@ func Convert_v2alpha1_JobTemplateSpec_To_batch_JobTemplateSpec(in *JobTemplateSp } func autoConvert_batch_JobTemplateSpec_To_v2alpha1_JobTemplateSpec(in *batch.JobTemplateSpec, out *JobTemplateSpec, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_batch_JobSpec_To_v2alpha1_JobSpec(&in.Spec, &out.Spec, s); err != nil { return err } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/zz_generated.deepcopy.go index 5022416b..09bd21ab 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/batch/v2alpha1/zz_generated.deepcopy.go @@ -21,10 +21,10 @@ limitations under the License. package v2alpha1 import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - v1 "k8s.io/kubernetes/pkg/api/v1" + api_v1 "k8s.io/kubernetes/pkg/api/v1" reflect "reflect" ) @@ -55,8 +55,10 @@ func DeepCopy_v2alpha1_CronJob(in interface{}, out interface{}, c *conversion.Cl in := in.(*CronJob) out := out.(*CronJob) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v2alpha1_CronJobSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -115,14 +117,12 @@ func DeepCopy_v2alpha1_CronJobStatus(in interface{}, out interface{}, c *convers *out = *in if in.Active != nil { in, out := &in.Active, &out.Active - *out = make([]v1.ObjectReference, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + *out = make([]api_v1.ObjectReference, len(*in)) + copy(*out, *in) } if in.LastScheduleTime != nil { in, out := &in.LastScheduleTime, &out.LastScheduleTime - *out = new(meta_v1.Time) + *out = new(v1.Time) **out = (*in).DeepCopy() } return nil @@ -134,8 +134,10 @@ func DeepCopy_v2alpha1_Job(in interface{}, out interface{}, c *conversion.Cloner in := in.(*Job) out := out.(*Job) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v2alpha1_JobSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -201,7 +203,7 @@ func DeepCopy_v2alpha1_JobSpec(in interface{}, out interface{}, c *conversion.Cl if newVal, err := c.DeepCopy(*in); err != nil { return err } else { - *out = newVal.(*meta_v1.LabelSelector) + *out = newVal.(*v1.LabelSelector) } } if in.ManualSelector != nil { @@ -209,7 +211,7 @@ func DeepCopy_v2alpha1_JobSpec(in interface{}, out interface{}, c *conversion.Cl *out = new(bool) **out = **in } - if err := v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil { + if err := api_v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil { return err } return nil @@ -232,12 +234,12 @@ func DeepCopy_v2alpha1_JobStatus(in interface{}, out interface{}, c *conversion. } if in.StartTime != nil { in, out := &in.StartTime, &out.StartTime - *out = new(meta_v1.Time) + *out = new(v1.Time) **out = (*in).DeepCopy() } if in.CompletionTime != nil { in, out := &in.CompletionTime, &out.CompletionTime - *out = new(meta_v1.Time) + *out = new(v1.Time) **out = (*in).DeepCopy() } return nil @@ -249,8 +251,10 @@ func DeepCopy_v2alpha1_JobTemplate(in interface{}, out interface{}, c *conversio in := in.(*JobTemplate) out := out.(*JobTemplate) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v2alpha1_JobTemplateSpec(&in.Template, &out.Template, c); err != nil { return err @@ -264,8 +268,10 @@ func DeepCopy_v2alpha1_JobTemplateSpec(in interface{}, out interface{}, c *conve in := in.(*JobTemplateSpec) out := out.(*JobTemplateSpec) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v2alpha1_JobSpec(&in.Spec, &out.Spec, c); err != nil { return err diff --git a/vendor/k8s.io/kubernetes/pkg/apis/batch/validation/validation_test.go b/vendor/k8s.io/kubernetes/pkg/apis/batch/validation/validation_test.go index b34f28d3..0e60991f 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/batch/validation/validation_test.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/batch/validation/validation_test.go @@ -34,13 +34,13 @@ func getValidManualSelector() *metav1.LabelSelector { func getValidPodTemplateSpecForManual(selector *metav1.LabelSelector) api.PodTemplateSpec { return api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: selector.MatchLabels, }, Spec: api.PodSpec{ RestartPolicy: api.RestartPolicyOnFailure, DNSPolicy: api.DNSClusterFirst, - Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: api.TerminationMessageReadFile}}, }, } } @@ -53,13 +53,13 @@ func getValidGeneratedSelector() *metav1.LabelSelector { func getValidPodTemplateSpecForGenerated(selector *metav1.LabelSelector) api.PodTemplateSpec { return api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: selector.MatchLabels, }, Spec: api.PodSpec{ RestartPolicy: api.RestartPolicyOnFailure, DNSPolicy: api.DNSClusterFirst, - Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: api.TerminationMessageReadFile}}, }, } } @@ -72,9 +72,9 @@ func TestValidateJob(t *testing.T) { successCases := map[string]batch.Job{ "manual selector": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "myjob", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, UID: types.UID("1a2b3c"), }, Spec: batch.JobSpec{ @@ -84,9 +84,9 @@ func TestValidateJob(t *testing.T) { }, }, "generated selector": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "myjob", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, UID: types.UID("1a2b3c"), }, Spec: batch.JobSpec{ @@ -104,9 +104,9 @@ func TestValidateJob(t *testing.T) { negative64 := int64(-1) errorCases := map[string]batch.Job{ "spec.parallelism:must be greater than or equal to 0": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "myjob", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, UID: types.UID("1a2b3c"), }, Spec: batch.JobSpec{ @@ -116,9 +116,9 @@ func TestValidateJob(t *testing.T) { }, }, "spec.completions:must be greater than or equal to 0": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "myjob", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, UID: types.UID("1a2b3c"), }, Spec: batch.JobSpec{ @@ -128,9 +128,9 @@ func TestValidateJob(t *testing.T) { }, }, "spec.activeDeadlineSeconds:must be greater than or equal to 0": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "myjob", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, UID: types.UID("1a2b3c"), }, Spec: batch.JobSpec{ @@ -140,9 +140,9 @@ func TestValidateJob(t *testing.T) { }, }, "spec.selector:Required value": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "myjob", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, UID: types.UID("1a2b3c"), }, Spec: batch.JobSpec{ @@ -150,64 +150,64 @@ func TestValidateJob(t *testing.T) { }, }, "spec.template.metadata.labels: Invalid value: {\"y\":\"z\"}: `selector` does not match template `labels`": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "myjob", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, UID: types.UID("1a2b3c"), }, Spec: batch.JobSpec{ Selector: validManualSelector, ManualSelector: newBool(true), Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"y": "z"}, }, Spec: api.PodSpec{ RestartPolicy: api.RestartPolicyOnFailure, DNSPolicy: api.DNSClusterFirst, - Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: api.TerminationMessageReadFile}}, }, }, }, }, "spec.template.metadata.labels: Invalid value: {\"controller-uid\":\"4d5e6f\"}: `selector` does not match template `labels`": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "myjob", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, UID: types.UID("1a2b3c"), }, Spec: batch.JobSpec{ Selector: validManualSelector, ManualSelector: newBool(true), Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"controller-uid": "4d5e6f"}, }, Spec: api.PodSpec{ RestartPolicy: api.RestartPolicyOnFailure, DNSPolicy: api.DNSClusterFirst, - Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: api.TerminationMessageReadFile}}, }, }, }, }, "spec.template.spec.restartPolicy: Unsupported value": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "myjob", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, UID: types.UID("1a2b3c"), }, Spec: batch.JobSpec{ Selector: validManualSelector, ManualSelector: newBool(true), Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validManualSelector.MatchLabels, }, Spec: api.PodSpec{ RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, - Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: api.TerminationMessageReadFile}}, }, }, }, @@ -237,7 +237,7 @@ func TestValidateJobUpdateStatus(t *testing.T) { successCases := []testcase{ { old: batch.Job{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Status: batch.JobStatus{ Active: 1, Succeeded: 2, @@ -245,7 +245,7 @@ func TestValidateJobUpdateStatus(t *testing.T) { }, }, update: batch.Job{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Status: batch.JobStatus{ Active: 1, Succeeded: 1, @@ -266,9 +266,9 @@ func TestValidateJobUpdateStatus(t *testing.T) { errorCases := map[string]testcase{ "[status.active: Invalid value: -1: must be greater than or equal to 0, status.succeeded: Invalid value: -2: must be greater than or equal to 0]": { old: batch.Job{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, ResourceVersion: "10", }, Status: batch.JobStatus{ @@ -278,9 +278,9 @@ func TestValidateJobUpdateStatus(t *testing.T) { }, }, update: batch.Job{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, ResourceVersion: "10", }, Status: batch.JobStatus{ @@ -311,9 +311,9 @@ func TestValidateCronJob(t *testing.T) { successCases := map[string]batch.CronJob{ "basic scheduled job": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "mycronjob", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, UID: types.UID("1a2b3c"), }, Spec: batch.CronJobSpec{ @@ -327,9 +327,9 @@ func TestValidateCronJob(t *testing.T) { }, }, "non-standard scheduled": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "mycronjob", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, UID: types.UID("1a2b3c"), }, Spec: batch.CronJobSpec{ @@ -354,9 +354,9 @@ func TestValidateCronJob(t *testing.T) { errorCases := map[string]batch.CronJob{ "spec.schedule: Invalid value": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "mycronjob", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, UID: types.UID("1a2b3c"), }, Spec: batch.CronJobSpec{ @@ -370,9 +370,9 @@ func TestValidateCronJob(t *testing.T) { }, }, "spec.schedule: Required value": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "mycronjob", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, UID: types.UID("1a2b3c"), }, Spec: batch.CronJobSpec{ @@ -386,9 +386,9 @@ func TestValidateCronJob(t *testing.T) { }, }, "spec.startingDeadlineSeconds:must be greater than or equal to 0": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "mycronjob", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, UID: types.UID("1a2b3c"), }, Spec: batch.CronJobSpec{ @@ -403,9 +403,9 @@ func TestValidateCronJob(t *testing.T) { }, }, "spec.concurrencyPolicy: Required value": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "mycronjob", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, UID: types.UID("1a2b3c"), }, Spec: batch.CronJobSpec{ @@ -418,9 +418,9 @@ func TestValidateCronJob(t *testing.T) { }, }, "spec.jobTemplate.spec.parallelism:must be greater than or equal to 0": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "mycronjob", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, UID: types.UID("1a2b3c"), }, Spec: batch.CronJobSpec{ @@ -435,9 +435,9 @@ func TestValidateCronJob(t *testing.T) { }, }, "spec.jobTemplate.spec.completions:must be greater than or equal to 0": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "mycronjob", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, UID: types.UID("1a2b3c"), }, Spec: batch.CronJobSpec{ @@ -453,9 +453,9 @@ func TestValidateCronJob(t *testing.T) { }, }, "spec.jobTemplate.spec.activeDeadlineSeconds:must be greater than or equal to 0": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "mycronjob", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, UID: types.UID("1a2b3c"), }, Spec: batch.CronJobSpec{ @@ -470,9 +470,9 @@ func TestValidateCronJob(t *testing.T) { }, }, "spec.jobTemplate.spec.selector: Invalid value: {\"matchLabels\":{\"a\":\"b\"}}: `selector` will be auto-generated": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "mycronjob", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, UID: types.UID("1a2b3c"), }, Spec: batch.CronJobSpec{ @@ -487,9 +487,9 @@ func TestValidateCronJob(t *testing.T) { }, }, "spec.jobTemplate.spec.manualSelector: Unsupported value": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "mycronjob", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, UID: types.UID("1a2b3c"), }, Spec: batch.CronJobSpec{ @@ -504,9 +504,9 @@ func TestValidateCronJob(t *testing.T) { }, }, "spec.jobTemplate.spec.template.spec.restartPolicy: Unsupported value": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "mycronjob", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, UID: types.UID("1a2b3c"), }, Spec: batch.CronJobSpec{ @@ -518,7 +518,7 @@ func TestValidateCronJob(t *testing.T) { Spec: api.PodSpec{ RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, - Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: api.TerminationMessageReadFile}}, }, }, }, diff --git a/vendor/k8s.io/kubernetes/pkg/apis/batch/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/batch/zz_generated.deepcopy.go index 11e44c96..b620c814 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/batch/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/batch/zz_generated.deepcopy.go @@ -55,8 +55,10 @@ func DeepCopy_batch_CronJob(in interface{}, out interface{}, c *conversion.Clone in := in.(*CronJob) out := out.(*CronJob) *out = *in - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_batch_CronJobSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -116,9 +118,7 @@ func DeepCopy_batch_CronJobStatus(in interface{}, out interface{}, c *conversion if in.Active != nil { in, out := &in.Active, &out.Active *out = make([]api.ObjectReference, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.LastScheduleTime != nil { in, out := &in.LastScheduleTime, &out.LastScheduleTime @@ -134,8 +134,10 @@ func DeepCopy_batch_Job(in interface{}, out interface{}, c *conversion.Cloner) e in := in.(*Job) out := out.(*Job) *out = *in - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_batch_JobSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -249,8 +251,10 @@ func DeepCopy_batch_JobTemplate(in interface{}, out interface{}, c *conversion.C in := in.(*JobTemplate) out := out.(*JobTemplate) *out = *in - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_batch_JobTemplateSpec(&in.Template, &out.Template, c); err != nil { return err @@ -264,8 +268,10 @@ func DeepCopy_batch_JobTemplateSpec(in interface{}, out interface{}, c *conversi in := in.(*JobTemplateSpec) out := out.(*JobTemplateSpec) *out = *in - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_batch_JobSpec(&in.Spec, &out.Spec, c); err != nil { return err diff --git a/vendor/k8s.io/kubernetes/pkg/apis/certificates/BUILD b/vendor/k8s.io/kubernetes/pkg/apis/certificates/BUILD index 7512b77c..b1f242be 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/certificates/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/apis/certificates/BUILD @@ -18,7 +18,6 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/conversion", "//vendor:k8s.io/apimachinery/pkg/runtime", @@ -38,7 +37,7 @@ filegroup( srcs = [ ":package-srcs", "//pkg/apis/certificates/install:all-srcs", - "//pkg/apis/certificates/v1alpha1:all-srcs", + "//pkg/apis/certificates/v1beta1:all-srcs", "//pkg/apis/certificates/validation:all-srcs", ], tags = ["automanaged"], diff --git a/vendor/k8s.io/kubernetes/pkg/apis/certificates/install/BUILD b/vendor/k8s.io/kubernetes/pkg/apis/certificates/install/BUILD index 450a534e..1ee09b9f 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/certificates/install/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/apis/certificates/install/BUILD @@ -12,9 +12,12 @@ go_library( srcs = ["install.go"], tags = ["automanaged"], deps = [ - "//pkg/apimachinery/announced:go_default_library", + "//pkg/api:go_default_library", "//pkg/apis/certificates:go_default_library", - "//pkg/apis/certificates/v1alpha1:go_default_library", + "//pkg/apis/certificates/v1beta1:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apimachinery/announced", + "//vendor:k8s.io/apimachinery/pkg/apimachinery/registered", + "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/sets", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/apis/certificates/install/install.go b/vendor/k8s.io/kubernetes/pkg/apis/certificates/install/install.go index b5940759..73844eeb 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/certificates/install/install.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/certificates/install/install.go @@ -19,25 +19,33 @@ limitations under the License. package install import ( + "k8s.io/apimachinery/pkg/apimachinery/announced" + "k8s.io/apimachinery/pkg/apimachinery/registered" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/kubernetes/pkg/apimachinery/announced" + "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/certificates" - "k8s.io/kubernetes/pkg/apis/certificates/v1alpha1" + "k8s.io/kubernetes/pkg/apis/certificates/v1beta1" ) func init() { + Install(api.GroupFactoryRegistry, api.Registry, api.Scheme) +} + +// Install registers the API group and adds types to a scheme +func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) { if err := announced.NewGroupMetaFactory( &announced.GroupMetaFactoryArgs{ GroupName: certificates.GroupName, - VersionPreferenceOrder: []string{v1alpha1.SchemeGroupVersion.Version}, + VersionPreferenceOrder: []string{v1beta1.SchemeGroupVersion.Version}, ImportPrefix: "k8s.io/kubernetes/pkg/apis/certificates", RootScopedKinds: sets.NewString("CertificateSigningRequest"), AddInternalObjectsToScheme: certificates.AddToScheme, }, announced.VersionToSchemeFunc{ - v1alpha1.SchemeGroupVersion.Version: v1alpha1.AddToScheme, + v1beta1.SchemeGroupVersion.Version: v1beta1.AddToScheme, }, - ).Announce().RegisterAndEnable(); err != nil { + ).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil { panic(err) } } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/certificates/register.go b/vendor/k8s.io/kubernetes/pkg/apis/certificates/register.go index fe7dcd4e..f9d228d0 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/certificates/register.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/certificates/register.go @@ -19,7 +19,6 @@ package certificates import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/api" ) var ( @@ -48,8 +47,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &CertificateSigningRequest{}, &CertificateSigningRequestList{}, - &api.ListOptions{}, - &api.DeleteOptions{}, ) return nil } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/certificates/types.go b/vendor/k8s.io/kubernetes/pkg/apis/certificates/types.go index 43394733..4aee19f2 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/certificates/types.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/certificates/types.go @@ -16,10 +16,7 @@ limitations under the License. package certificates -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/kubernetes/pkg/api" -) +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" // +genclient=true // +nonNamespaced=true @@ -28,7 +25,7 @@ import ( type CertificateSigningRequest struct { metav1.TypeMeta // +optional - api.ObjectMeta + metav1.ObjectMeta // The certificate request itself and any additional information. // +optional diff --git a/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/zz_generated.conversion.go deleted file mode 100644 index 3b25e69e..00000000 --- a/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/zz_generated.conversion.go +++ /dev/null @@ -1,175 +0,0 @@ -// +build !ignore_autogenerated - -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was autogenerated by conversion-gen. Do not edit it manually! - -package v1alpha1 - -import ( - conversion "k8s.io/apimachinery/pkg/conversion" - runtime "k8s.io/apimachinery/pkg/runtime" - certificates "k8s.io/kubernetes/pkg/apis/certificates" - unsafe "unsafe" -) - -func init() { - SchemeBuilder.Register(RegisterConversions) -} - -// RegisterConversions adds conversion functions to the given scheme. -// Public to allow building arbitrary schemes. -func RegisterConversions(scheme *runtime.Scheme) error { - return scheme.AddGeneratedConversionFuncs( - Convert_v1alpha1_CertificateSigningRequest_To_certificates_CertificateSigningRequest, - Convert_certificates_CertificateSigningRequest_To_v1alpha1_CertificateSigningRequest, - Convert_v1alpha1_CertificateSigningRequestCondition_To_certificates_CertificateSigningRequestCondition, - Convert_certificates_CertificateSigningRequestCondition_To_v1alpha1_CertificateSigningRequestCondition, - Convert_v1alpha1_CertificateSigningRequestList_To_certificates_CertificateSigningRequestList, - Convert_certificates_CertificateSigningRequestList_To_v1alpha1_CertificateSigningRequestList, - Convert_v1alpha1_CertificateSigningRequestSpec_To_certificates_CertificateSigningRequestSpec, - Convert_certificates_CertificateSigningRequestSpec_To_v1alpha1_CertificateSigningRequestSpec, - Convert_v1alpha1_CertificateSigningRequestStatus_To_certificates_CertificateSigningRequestStatus, - Convert_certificates_CertificateSigningRequestStatus_To_v1alpha1_CertificateSigningRequestStatus, - ) -} - -func autoConvert_v1alpha1_CertificateSigningRequest_To_certificates_CertificateSigningRequest(in *CertificateSigningRequest, out *certificates.CertificateSigningRequest, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } - if err := Convert_v1alpha1_CertificateSigningRequestSpec_To_certificates_CertificateSigningRequestSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha1_CertificateSigningRequestStatus_To_certificates_CertificateSigningRequestStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -func Convert_v1alpha1_CertificateSigningRequest_To_certificates_CertificateSigningRequest(in *CertificateSigningRequest, out *certificates.CertificateSigningRequest, s conversion.Scope) error { - return autoConvert_v1alpha1_CertificateSigningRequest_To_certificates_CertificateSigningRequest(in, out, s) -} - -func autoConvert_certificates_CertificateSigningRequest_To_v1alpha1_CertificateSigningRequest(in *certificates.CertificateSigningRequest, out *CertificateSigningRequest, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } - if err := Convert_certificates_CertificateSigningRequestSpec_To_v1alpha1_CertificateSigningRequestSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_certificates_CertificateSigningRequestStatus_To_v1alpha1_CertificateSigningRequestStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -func Convert_certificates_CertificateSigningRequest_To_v1alpha1_CertificateSigningRequest(in *certificates.CertificateSigningRequest, out *CertificateSigningRequest, s conversion.Scope) error { - return autoConvert_certificates_CertificateSigningRequest_To_v1alpha1_CertificateSigningRequest(in, out, s) -} - -func autoConvert_v1alpha1_CertificateSigningRequestCondition_To_certificates_CertificateSigningRequestCondition(in *CertificateSigningRequestCondition, out *certificates.CertificateSigningRequestCondition, s conversion.Scope) error { - out.Type = certificates.RequestConditionType(in.Type) - out.Reason = in.Reason - out.Message = in.Message - out.LastUpdateTime = in.LastUpdateTime - return nil -} - -func Convert_v1alpha1_CertificateSigningRequestCondition_To_certificates_CertificateSigningRequestCondition(in *CertificateSigningRequestCondition, out *certificates.CertificateSigningRequestCondition, s conversion.Scope) error { - return autoConvert_v1alpha1_CertificateSigningRequestCondition_To_certificates_CertificateSigningRequestCondition(in, out, s) -} - -func autoConvert_certificates_CertificateSigningRequestCondition_To_v1alpha1_CertificateSigningRequestCondition(in *certificates.CertificateSigningRequestCondition, out *CertificateSigningRequestCondition, s conversion.Scope) error { - out.Type = RequestConditionType(in.Type) - out.Reason = in.Reason - out.Message = in.Message - out.LastUpdateTime = in.LastUpdateTime - return nil -} - -func Convert_certificates_CertificateSigningRequestCondition_To_v1alpha1_CertificateSigningRequestCondition(in *certificates.CertificateSigningRequestCondition, out *CertificateSigningRequestCondition, s conversion.Scope) error { - return autoConvert_certificates_CertificateSigningRequestCondition_To_v1alpha1_CertificateSigningRequestCondition(in, out, s) -} - -func autoConvert_v1alpha1_CertificateSigningRequestList_To_certificates_CertificateSigningRequestList(in *CertificateSigningRequestList, out *certificates.CertificateSigningRequestList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]certificates.CertificateSigningRequest)(unsafe.Pointer(&in.Items)) - return nil -} - -func Convert_v1alpha1_CertificateSigningRequestList_To_certificates_CertificateSigningRequestList(in *CertificateSigningRequestList, out *certificates.CertificateSigningRequestList, s conversion.Scope) error { - return autoConvert_v1alpha1_CertificateSigningRequestList_To_certificates_CertificateSigningRequestList(in, out, s) -} - -func autoConvert_certificates_CertificateSigningRequestList_To_v1alpha1_CertificateSigningRequestList(in *certificates.CertificateSigningRequestList, out *CertificateSigningRequestList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]CertificateSigningRequest)(unsafe.Pointer(&in.Items)) - return nil -} - -func Convert_certificates_CertificateSigningRequestList_To_v1alpha1_CertificateSigningRequestList(in *certificates.CertificateSigningRequestList, out *CertificateSigningRequestList, s conversion.Scope) error { - return autoConvert_certificates_CertificateSigningRequestList_To_v1alpha1_CertificateSigningRequestList(in, out, s) -} - -func autoConvert_v1alpha1_CertificateSigningRequestSpec_To_certificates_CertificateSigningRequestSpec(in *CertificateSigningRequestSpec, out *certificates.CertificateSigningRequestSpec, s conversion.Scope) error { - out.Request = *(*[]byte)(unsafe.Pointer(&in.Request)) - out.Usages = *(*[]certificates.KeyUsage)(unsafe.Pointer(&in.Usages)) - out.Username = in.Username - out.UID = in.UID - out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups)) - return nil -} - -func Convert_v1alpha1_CertificateSigningRequestSpec_To_certificates_CertificateSigningRequestSpec(in *CertificateSigningRequestSpec, out *certificates.CertificateSigningRequestSpec, s conversion.Scope) error { - return autoConvert_v1alpha1_CertificateSigningRequestSpec_To_certificates_CertificateSigningRequestSpec(in, out, s) -} - -func autoConvert_certificates_CertificateSigningRequestSpec_To_v1alpha1_CertificateSigningRequestSpec(in *certificates.CertificateSigningRequestSpec, out *CertificateSigningRequestSpec, s conversion.Scope) error { - out.Request = *(*[]byte)(unsafe.Pointer(&in.Request)) - out.Usages = *(*[]KeyUsage)(unsafe.Pointer(&in.Usages)) - out.Username = in.Username - out.UID = in.UID - out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups)) - return nil -} - -func Convert_certificates_CertificateSigningRequestSpec_To_v1alpha1_CertificateSigningRequestSpec(in *certificates.CertificateSigningRequestSpec, out *CertificateSigningRequestSpec, s conversion.Scope) error { - return autoConvert_certificates_CertificateSigningRequestSpec_To_v1alpha1_CertificateSigningRequestSpec(in, out, s) -} - -func autoConvert_v1alpha1_CertificateSigningRequestStatus_To_certificates_CertificateSigningRequestStatus(in *CertificateSigningRequestStatus, out *certificates.CertificateSigningRequestStatus, s conversion.Scope) error { - out.Conditions = *(*[]certificates.CertificateSigningRequestCondition)(unsafe.Pointer(&in.Conditions)) - out.Certificate = *(*[]byte)(unsafe.Pointer(&in.Certificate)) - return nil -} - -func Convert_v1alpha1_CertificateSigningRequestStatus_To_certificates_CertificateSigningRequestStatus(in *CertificateSigningRequestStatus, out *certificates.CertificateSigningRequestStatus, s conversion.Scope) error { - return autoConvert_v1alpha1_CertificateSigningRequestStatus_To_certificates_CertificateSigningRequestStatus(in, out, s) -} - -func autoConvert_certificates_CertificateSigningRequestStatus_To_v1alpha1_CertificateSigningRequestStatus(in *certificates.CertificateSigningRequestStatus, out *CertificateSigningRequestStatus, s conversion.Scope) error { - out.Conditions = *(*[]CertificateSigningRequestCondition)(unsafe.Pointer(&in.Conditions)) - out.Certificate = *(*[]byte)(unsafe.Pointer(&in.Certificate)) - return nil -} - -func Convert_certificates_CertificateSigningRequestStatus_To_v1alpha1_CertificateSigningRequestStatus(in *certificates.CertificateSigningRequestStatus, out *CertificateSigningRequestStatus, s conversion.Scope) error { - return autoConvert_certificates_CertificateSigningRequestStatus_To_v1alpha1_CertificateSigningRequestStatus(in, out, s) -} diff --git a/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/BUILD b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/BUILD similarity index 96% rename from vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/BUILD rename to vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/BUILD index e3bf8884..ba9ec726 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/BUILD @@ -26,7 +26,6 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/api:go_default_library", - "//pkg/api/v1:go_default_library", "//pkg/apis/certificates:go_default_library", "//vendor:github.com/gogo/protobuf/proto", "//vendor:github.com/ugorji/go/codec", diff --git a/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/conversion.go similarity index 98% rename from vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/conversion.go rename to vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/conversion.go index 64571362..c0c58711 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/conversion.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/conversion.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package v1beta1 import ( "fmt" diff --git a/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/defaults.go similarity index 98% rename from vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/defaults.go rename to vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/defaults.go index d4bea720..cd6a29d3 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/defaults.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/defaults.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package v1beta1 import "k8s.io/apimachinery/pkg/runtime" diff --git a/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/doc.go b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/doc.go similarity index 90% rename from vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/doc.go rename to vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/doc.go index a6409ce2..4dde7d5f 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/doc.go @@ -20,4 +20,4 @@ limitations under the License. // +k8s:defaulter-gen=TypeMeta // +groupName=certificates.k8s.io -package v1alpha1 // import "k8s.io/kubernetes/pkg/apis/certificates/v1alpha1" +package v1beta1 // import "k8s.io/kubernetes/pkg/apis/certificates/v1beta1" diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1alpha1/generated.pb.go b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/generated.pb.go similarity index 85% rename from vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1alpha1/generated.pb.go rename to vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/generated.pb.go index 0559f987..36959bf7 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1alpha1/generated.pb.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/generated.pb.go @@ -15,14 +15,14 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. -// source: k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/generated.proto +// source: k8s.io/kubernetes/pkg/apis/certificates/v1beta1/generated.proto // DO NOT EDIT! /* - Package v1alpha1 is a generated protocol buffer package. + Package v1beta1 is a generated protocol buffer package. It is generated from these files: - k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/generated.proto + k8s.io/kubernetes/pkg/apis/certificates/v1beta1/generated.proto It has these top-level messages: CertificateSigningRequest @@ -31,7 +31,7 @@ limitations under the License. CertificateSigningRequestSpec CertificateSigningRequestStatus */ -package v1alpha1 +package v1beta1 import proto "github.com/gogo/protobuf/proto" import fmt "fmt" @@ -82,11 +82,11 @@ func (*CertificateSigningRequestStatus) Descriptor() ([]byte, []int) { } func init() { - proto.RegisterType((*CertificateSigningRequest)(nil), "k8s.io.client-go.pkg.apis.certificates.v1alpha1.CertificateSigningRequest") - proto.RegisterType((*CertificateSigningRequestCondition)(nil), "k8s.io.client-go.pkg.apis.certificates.v1alpha1.CertificateSigningRequestCondition") - proto.RegisterType((*CertificateSigningRequestList)(nil), "k8s.io.client-go.pkg.apis.certificates.v1alpha1.CertificateSigningRequestList") - proto.RegisterType((*CertificateSigningRequestSpec)(nil), "k8s.io.client-go.pkg.apis.certificates.v1alpha1.CertificateSigningRequestSpec") - proto.RegisterType((*CertificateSigningRequestStatus)(nil), "k8s.io.client-go.pkg.apis.certificates.v1alpha1.CertificateSigningRequestStatus") + proto.RegisterType((*CertificateSigningRequest)(nil), "k8s.io.kubernetes.pkg.apis.certificates.v1beta1.CertificateSigningRequest") + proto.RegisterType((*CertificateSigningRequestCondition)(nil), "k8s.io.kubernetes.pkg.apis.certificates.v1beta1.CertificateSigningRequestCondition") + proto.RegisterType((*CertificateSigningRequestList)(nil), "k8s.io.kubernetes.pkg.apis.certificates.v1beta1.CertificateSigningRequestList") + proto.RegisterType((*CertificateSigningRequestSpec)(nil), "k8s.io.kubernetes.pkg.apis.certificates.v1beta1.CertificateSigningRequestSpec") + proto.RegisterType((*CertificateSigningRequestStatus)(nil), "k8s.io.kubernetes.pkg.apis.certificates.v1beta1.CertificateSigningRequestStatus") } func (m *CertificateSigningRequest) Marshal() (data []byte, err error) { size := m.Size() @@ -431,7 +431,7 @@ func (this *CertificateSigningRequest) String() string { return "nil" } s := strings.Join([]string{`&CertificateSigningRequest{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "CertificateSigningRequestSpec", "CertificateSigningRequestSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "CertificateSigningRequestStatus", "CertificateSigningRequestStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -1328,51 +1328,51 @@ var ( ) var fileDescriptorGenerated = []byte{ - // 735 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xac, 0x54, 0xbf, 0x4f, 0x1b, 0x49, - 0x14, 0xf6, 0xda, 0xc6, 0xd8, 0x63, 0x0e, 0x4e, 0xa3, 0x13, 0xf2, 0x21, 0xb1, 0x46, 0xd6, 0xdd, - 0xc9, 0x87, 0xb8, 0xdd, 0xb3, 0x15, 0x45, 0x94, 0xd1, 0x12, 0x29, 0x42, 0x80, 0x50, 0x06, 0x2c, - 0x45, 0x51, 0x9a, 0xf1, 0xfa, 0xb1, 0x1e, 0xcc, 0xfe, 0x60, 0x67, 0x16, 0xc9, 0x5d, 0xca, 0x94, - 0xf9, 0x07, 0xf2, 0xff, 0x50, 0x52, 0xa6, 0x72, 0x82, 0x29, 0x53, 0xa4, 0xa7, 0x8a, 0x66, 0x3c, - 0x6b, 0x3b, 0x18, 0x87, 0x44, 0xa2, 0xf3, 0x7c, 0xf3, 0xde, 0xf7, 0xbd, 0xf9, 0xde, 0xb7, 0x46, - 0xcf, 0x7a, 0xdb, 0xdc, 0x62, 0xa1, 0xdd, 0x4b, 0xda, 0x10, 0x07, 0x20, 0x80, 0xdb, 0x51, 0xcf, - 0xb3, 0x69, 0xc4, 0xb8, 0xed, 0x42, 0x2c, 0xd8, 0x09, 0x73, 0xa9, 0x44, 0x2f, 0x1a, 0xf4, 0x2c, - 0xea, 0xd2, 0x86, 0xed, 0x41, 0x00, 0x31, 0x15, 0xd0, 0xb1, 0xa2, 0x38, 0x14, 0x21, 0xfe, 0x7f, - 0xc4, 0x60, 0x4d, 0x18, 0xac, 0xa8, 0xe7, 0x59, 0x92, 0xc1, 0x9a, 0x66, 0xb0, 0x52, 0x86, 0xb5, - 0xff, 0x3c, 0x26, 0xba, 0x49, 0xdb, 0x72, 0x43, 0xdf, 0xf6, 0x42, 0x2f, 0xb4, 0x15, 0x51, 0x3b, - 0x39, 0x51, 0x27, 0x75, 0x50, 0xbf, 0x46, 0x02, 0x6b, 0x4f, 0xf4, 0x88, 0x34, 0x62, 0x3e, 0x75, - 0xbb, 0x2c, 0x80, 0xb8, 0x3f, 0x19, 0xd2, 0x07, 0x41, 0xed, 0x8b, 0x99, 0xb1, 0xd6, 0xec, 0x79, - 0x5d, 0x71, 0x12, 0x08, 0xe6, 0xc3, 0x4c, 0xc3, 0xd3, 0x87, 0x1a, 0xb8, 0xdb, 0x05, 0x9f, 0xce, - 0xf4, 0x35, 0xe7, 0x3a, 0x68, 0xc7, 0xc0, 0xc3, 0x24, 0x76, 0x67, 0xb5, 0xb6, 0xe6, 0xf7, 0xdc, - 0xf3, 0x94, 0xc6, 0xfd, 0xd5, 0x89, 0x60, 0x67, 0x36, 0x0b, 0x04, 0x17, 0xf1, 0xdd, 0x96, 0xda, - 0x4d, 0x16, 0xfd, 0xb9, 0x33, 0x31, 0xff, 0x88, 0x79, 0x01, 0x0b, 0x3c, 0x02, 0xe7, 0x09, 0x70, - 0x81, 0x5f, 0xa1, 0xa2, 0xb4, 0xad, 0x43, 0x05, 0xad, 0x18, 0x1b, 0x46, 0xbd, 0xdc, 0xac, 0x5b, - 0x73, 0xb7, 0x68, 0x5d, 0x34, 0xac, 0xc3, 0xf6, 0x29, 0xb8, 0xe2, 0x00, 0x04, 0x75, 0xf0, 0xe5, - 0xa0, 0x9a, 0x19, 0x0e, 0xaa, 0x68, 0x82, 0x91, 0x31, 0x1b, 0x3e, 0x47, 0x79, 0x1e, 0x81, 0x5b, - 0xc9, 0x2a, 0xd6, 0x43, 0xeb, 0x57, 0xb3, 0x61, 0xcd, 0x1d, 0xfa, 0x28, 0x02, 0xd7, 0x59, 0xd2, - 0xe2, 0x79, 0x79, 0x22, 0x4a, 0x0a, 0xf7, 0x51, 0x81, 0x0b, 0x2a, 0x12, 0x5e, 0xc9, 0x29, 0xd1, - 0x97, 0x8f, 0x29, 0xaa, 0x88, 0x9d, 0x65, 0x2d, 0x5b, 0x18, 0x9d, 0x89, 0x16, 0xac, 0x7d, 0xc8, - 0xa2, 0xda, 0xdc, 0xde, 0x9d, 0x30, 0xe8, 0x30, 0xc1, 0xc2, 0x00, 0x6f, 0xa3, 0xbc, 0xe8, 0x47, - 0xa0, 0xac, 0x2e, 0x39, 0x7f, 0xa5, 0x6f, 0x38, 0xee, 0x47, 0x70, 0x3b, 0xa8, 0xfe, 0x71, 0xb7, - 0x5e, 0xe2, 0x44, 0x75, 0xe0, 0x7f, 0x50, 0x21, 0x06, 0xca, 0xc3, 0x40, 0x19, 0x5a, 0x9a, 0x0c, - 0x42, 0x14, 0x4a, 0xf4, 0x2d, 0xfe, 0x17, 0x2d, 0xfa, 0xc0, 0x39, 0xf5, 0x40, 0x99, 0x50, 0x72, - 0x56, 0x74, 0xe1, 0xe2, 0xc1, 0x08, 0x26, 0xe9, 0x3d, 0x3e, 0x45, 0xcb, 0x67, 0x94, 0x8b, 0x56, - 0xd4, 0xa1, 0x02, 0x8e, 0x99, 0x0f, 0x95, 0xbc, 0xb2, 0x6d, 0x33, 0xb5, 0x6d, 0x3a, 0xff, 0x13, - 0xe3, 0xe4, 0x86, 0x65, 0x12, 0x64, 0x87, 0xb3, 0xaa, 0xd9, 0x97, 0xf7, 0xbf, 0x63, 0x22, 0x77, - 0x98, 0x6b, 0x5f, 0x0d, 0xb4, 0x3e, 0xd7, 0x9f, 0x7d, 0xc6, 0x05, 0x7e, 0x33, 0x93, 0x44, 0xeb, - 0xe7, 0xe6, 0x90, 0xdd, 0x2a, 0x8f, 0xbf, 0xeb, 0x59, 0x8a, 0x29, 0x32, 0x95, 0xc6, 0x08, 0x2d, - 0x30, 0x01, 0x3e, 0xaf, 0x64, 0x37, 0x72, 0xf5, 0x72, 0x73, 0xef, 0x11, 0x93, 0xe1, 0xfc, 0xa6, - 0x75, 0x17, 0x76, 0xa5, 0x02, 0x19, 0x09, 0xd5, 0xbe, 0xfc, 0xe8, 0xc5, 0x32, 0xb4, 0xf8, 0x6f, - 0xb4, 0x18, 0x8f, 0x8e, 0xea, 0xc1, 0x4b, 0x4e, 0x59, 0xae, 0x49, 0x57, 0x90, 0xf4, 0x0e, 0x6f, - 0xa1, 0x62, 0xc2, 0x21, 0x0e, 0xa8, 0x0f, 0x7a, 0xf7, 0xe3, 0x87, 0xb6, 0x34, 0x4e, 0xc6, 0x15, - 0x78, 0x1d, 0xe5, 0x12, 0xd6, 0xd1, 0xbb, 0x2f, 0xeb, 0xc2, 0x5c, 0x6b, 0xf7, 0x39, 0x91, 0x38, - 0xae, 0xa1, 0x82, 0x17, 0x87, 0x49, 0xc4, 0x2b, 0xf9, 0x8d, 0x5c, 0xbd, 0xe4, 0x20, 0x19, 0xa1, - 0x17, 0x0a, 0x21, 0xfa, 0x06, 0x37, 0x51, 0xb1, 0x07, 0xfd, 0x96, 0xca, 0xd0, 0x82, 0xaa, 0x5a, - 0x95, 0x55, 0x0a, 0xe0, 0xb7, 0x83, 0x6a, 0x71, 0x4f, 0xdf, 0x92, 0x71, 0x5d, 0xed, 0x93, 0x81, - 0xaa, 0x0f, 0x7c, 0x3b, 0xf8, 0x9d, 0x81, 0x90, 0x9b, 0x46, 0x9b, 0x57, 0x0c, 0xb5, 0x89, 0xe3, - 0x47, 0xdc, 0xc4, 0xf8, 0xbb, 0x99, 0xfc, 0x35, 0x8d, 0x21, 0x4e, 0xa6, 0xb4, 0x71, 0x03, 0x95, - 0xa7, 0xb8, 0x95, 0xad, 0x4b, 0xce, 0xca, 0x70, 0x50, 0x2d, 0x4f, 0x91, 0x93, 0xe9, 0x1a, 0x67, - 0xf3, 0xf2, 0xda, 0xcc, 0x5c, 0x5d, 0x9b, 0x99, 0x8f, 0xd7, 0x66, 0xe6, 0xed, 0xd0, 0x34, 0x2e, - 0x87, 0xa6, 0x71, 0x35, 0x34, 0x8d, 0xcf, 0x43, 0xd3, 0x78, 0x7f, 0x63, 0x66, 0x5e, 0x17, 0xd3, - 0x09, 0xbf, 0x05, 0x00, 0x00, 0xff, 0xff, 0x55, 0xe5, 0xc0, 0xfd, 0x4b, 0x07, 0x00, 0x00, + // 731 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xac, 0x54, 0x4d, 0x4f, 0x13, 0x5b, + 0x18, 0xee, 0xb4, 0xa5, 0x1f, 0xa7, 0x5c, 0xb8, 0x39, 0xb9, 0x21, 0xbd, 0x24, 0x4c, 0x49, 0x73, + 0xaf, 0x01, 0x83, 0x33, 0xb6, 0x31, 0x86, 0x9d, 0xc9, 0x60, 0x62, 0x50, 0x50, 0x73, 0xa0, 0x1b, + 0xe3, 0xc2, 0xd3, 0xe9, 0xcb, 0x70, 0x28, 0xf3, 0xe1, 0x9c, 0x33, 0xc4, 0xee, 0xdc, 0xb9, 0xf5, + 0x0f, 0xf8, 0x7f, 0x58, 0xb2, 0x74, 0xd5, 0x48, 0x5d, 0x19, 0x13, 0x7f, 0x00, 0x2b, 0x73, 0x4e, + 0x4f, 0xdb, 0x91, 0x52, 0xc1, 0x84, 0x5d, 0xcf, 0xf3, 0x3e, 0xef, 0xf3, 0xbc, 0x5f, 0x53, 0xf4, + 0xa8, 0xbb, 0xc9, 0x2d, 0x16, 0xda, 0xdd, 0xa4, 0x0d, 0x71, 0x00, 0x02, 0xb8, 0x1d, 0x75, 0x3d, + 0x9b, 0x46, 0x8c, 0xdb, 0x2e, 0xc4, 0x82, 0x1d, 0x30, 0x97, 0x4a, 0xf4, 0xa4, 0xd1, 0x06, 0x41, + 0x1b, 0xb6, 0x07, 0x01, 0xc4, 0x54, 0x40, 0xc7, 0x8a, 0xe2, 0x50, 0x84, 0xd8, 0x1e, 0x0a, 0x58, + 0x13, 0x01, 0x2b, 0xea, 0x7a, 0x96, 0x14, 0xb0, 0xd2, 0x02, 0x96, 0x16, 0x58, 0xbe, 0xe7, 0x31, + 0x71, 0x98, 0xb4, 0x2d, 0x37, 0xf4, 0x6d, 0x2f, 0xf4, 0x42, 0x5b, 0xe9, 0xb4, 0x93, 0x03, 0xf5, + 0x52, 0x0f, 0xf5, 0x6b, 0xa8, 0xbf, 0xfc, 0x40, 0x17, 0x48, 0x23, 0xe6, 0x53, 0xf7, 0x90, 0x05, + 0x10, 0xf7, 0x26, 0x25, 0xfa, 0x20, 0xa8, 0x7d, 0x32, 0x55, 0xd5, 0xb2, 0x3d, 0x2b, 0x2b, 0x4e, + 0x02, 0xc1, 0x7c, 0x98, 0x4a, 0x78, 0x78, 0x5d, 0x02, 0x77, 0x0f, 0xc1, 0xa7, 0x53, 0x79, 0xcd, + 0x99, 0xf3, 0xb3, 0x63, 0xe0, 0x61, 0x12, 0xbb, 0xd3, 0x5e, 0x1b, 0xb3, 0x73, 0xae, 0x68, 0xa5, + 0x71, 0x35, 0x3b, 0x11, 0xec, 0xd8, 0x66, 0x81, 0xe0, 0x22, 0xbe, 0x9c, 0x52, 0xff, 0x96, 0x45, + 0xff, 0x6e, 0x4d, 0x66, 0xbf, 0xc7, 0xbc, 0x80, 0x05, 0x1e, 0x81, 0xb7, 0x09, 0x70, 0x81, 0xdf, + 0xa0, 0x92, 0x1c, 0x5b, 0x87, 0x0a, 0x5a, 0x35, 0x56, 0x8d, 0xb5, 0x4a, 0xf3, 0xbe, 0xa5, 0x97, + 0x98, 0xee, 0x7e, 0xb2, 0x46, 0xc9, 0xb6, 0x4e, 0x1a, 0xd6, 0x8b, 0xf6, 0x11, 0xb8, 0x62, 0x17, + 0x04, 0x75, 0xf0, 0x69, 0xbf, 0x96, 0x19, 0xf4, 0x6b, 0x68, 0x82, 0x91, 0xb1, 0x2a, 0x8e, 0x50, + 0x9e, 0x47, 0xe0, 0x56, 0xb3, 0x4a, 0xfd, 0xb9, 0xf5, 0x87, 0x27, 0x62, 0xcd, 0xac, 0x7d, 0x2f, + 0x02, 0xd7, 0x99, 0xd7, 0xde, 0x79, 0xf9, 0x22, 0xca, 0x09, 0xbf, 0x43, 0x05, 0x2e, 0xa8, 0x48, + 0x78, 0x35, 0xa7, 0x3c, 0x5f, 0xde, 0xa2, 0xa7, 0xd2, 0x75, 0x16, 0xb4, 0x6b, 0x61, 0xf8, 0x26, + 0xda, 0xaf, 0xfe, 0x29, 0x8b, 0xea, 0x33, 0x73, 0xb7, 0xc2, 0xa0, 0xc3, 0x04, 0x0b, 0x03, 0xbc, + 0x89, 0xf2, 0xa2, 0x17, 0x81, 0x1a, 0x78, 0xd9, 0xf9, 0x6f, 0xd4, 0xc2, 0x7e, 0x2f, 0x82, 0x8b, + 0x7e, 0xed, 0x9f, 0xcb, 0x7c, 0x89, 0x13, 0x95, 0x81, 0xef, 0xa0, 0x42, 0x0c, 0x94, 0x87, 0x81, + 0x1a, 0x67, 0x79, 0x52, 0x08, 0x51, 0x28, 0xd1, 0x51, 0xbc, 0x8e, 0x8a, 0x3e, 0x70, 0x4e, 0x3d, + 0x50, 0x33, 0x28, 0x3b, 0x8b, 0x9a, 0x58, 0xdc, 0x1d, 0xc2, 0x64, 0x14, 0xc7, 0x47, 0x68, 0xe1, + 0x98, 0x72, 0xd1, 0x8a, 0x3a, 0x54, 0xc0, 0x3e, 0xf3, 0xa1, 0x9a, 0x57, 0x53, 0xbb, 0x7b, 0xb3, + 0x3b, 0x90, 0x19, 0xce, 0x92, 0x56, 0x5f, 0xd8, 0xf9, 0x45, 0x89, 0x5c, 0x52, 0xae, 0xff, 0x30, + 0xd0, 0xca, 0xcc, 0xf9, 0xec, 0x30, 0x2e, 0xf0, 0xeb, 0xa9, 0x7b, 0xb4, 0x6e, 0x56, 0x87, 0xcc, + 0x56, 0xd7, 0xf8, 0xb7, 0xae, 0xa5, 0x34, 0x42, 0x52, 0xb7, 0x18, 0xa2, 0x39, 0x26, 0xc0, 0xe7, + 0xd5, 0xec, 0x6a, 0x6e, 0xad, 0xd2, 0x7c, 0x7a, 0x7b, 0x87, 0xe1, 0xfc, 0xa5, 0x6d, 0xe7, 0xb6, + 0xa5, 0x01, 0x19, 0xfa, 0xd4, 0xbf, 0xff, 0xae, 0x61, 0x79, 0xb2, 0xf8, 0x7f, 0x54, 0x8c, 0x87, + 0x4f, 0xd5, 0xef, 0xbc, 0x53, 0x91, 0x5b, 0xd2, 0x0c, 0x32, 0x8a, 0xe1, 0x0d, 0x54, 0x4a, 0x38, + 0xc4, 0x01, 0xf5, 0x41, 0xaf, 0x7e, 0xdc, 0x67, 0x4b, 0xe3, 0x64, 0xcc, 0xc0, 0x2b, 0x28, 0x97, + 0xb0, 0x8e, 0x5e, 0x7d, 0x45, 0x13, 0x73, 0xad, 0xed, 0xc7, 0x44, 0xe2, 0xb8, 0x8e, 0x0a, 0x5e, + 0x1c, 0x26, 0x11, 0xaf, 0xe6, 0x57, 0x73, 0x6b, 0x65, 0x07, 0xc9, 0x0b, 0x7a, 0xa2, 0x10, 0xa2, + 0x23, 0xb8, 0x89, 0x4a, 0x5d, 0xe8, 0xb5, 0xd4, 0x09, 0xcd, 0x29, 0xd6, 0x92, 0x64, 0x29, 0x80, + 0x5f, 0xf4, 0x6b, 0xa5, 0x67, 0x3a, 0x4a, 0xc6, 0xbc, 0x7a, 0xdf, 0x40, 0xb5, 0x6b, 0x3e, 0x1d, + 0xfc, 0xc1, 0x40, 0xc8, 0x1d, 0x5d, 0x36, 0xaf, 0x1a, 0x6a, 0x11, 0x7b, 0xb7, 0xb7, 0x88, 0xf1, + 0x57, 0x33, 0xf9, 0x5b, 0x1a, 0x43, 0x9c, 0xa4, 0xac, 0x71, 0x03, 0x55, 0x52, 0xd2, 0x6a, 0xaa, + 0xf3, 0xce, 0xe2, 0xa0, 0x5f, 0xab, 0xa4, 0xc4, 0x49, 0x9a, 0xe3, 0xac, 0x9f, 0x9e, 0x9b, 0x99, + 0xb3, 0x73, 0x33, 0xf3, 0xf9, 0xdc, 0xcc, 0xbc, 0x1f, 0x98, 0xc6, 0xe9, 0xc0, 0x34, 0xce, 0x06, + 0xa6, 0xf1, 0x65, 0x60, 0x1a, 0x1f, 0xbf, 0x9a, 0x99, 0x57, 0x45, 0x5d, 0xe0, 0xcf, 0x00, 0x00, + 0x00, 0xff, 0xff, 0xa8, 0x84, 0xfa, 0xbc, 0x4c, 0x07, 0x00, 0x00, } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/generated.proto b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/generated.proto similarity index 95% rename from vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/generated.proto rename to vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/generated.proto index eb0ef771..cb432875 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/generated.proto +++ b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/generated.proto @@ -19,7 +19,7 @@ limitations under the License. syntax = 'proto2'; -package k8s.io.kubernetes.pkg.apis.certificates.v1alpha1; +package k8s.io.kubernetes.pkg.apis.certificates.v1beta1; import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/generated.proto"; @@ -29,12 +29,12 @@ import "k8s.io/kubernetes/pkg/api/v1/generated.proto"; import "k8s.io/kubernetes/pkg/util/intstr/generated.proto"; // Package-wide variables from generator "generated". -option go_package = "v1alpha1"; +option go_package = "v1beta1"; // Describes a certificate signing request message CertificateSigningRequest { // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // The certificate request itself and any additional information. // +optional diff --git a/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/helpers.go b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/helpers.go similarity index 98% rename from vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/helpers.go rename to vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/helpers.go index 6c89ed09..1375063c 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/helpers.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/helpers.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package v1beta1 import ( "crypto/x509" diff --git a/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/register.go b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/register.go similarity index 92% rename from vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/register.go rename to vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/register.go index 7c0410b3..6574de97 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/register.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/register.go @@ -14,20 +14,19 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package v1beta1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/api/v1" ) // GroupName is the group name use in this package const GroupName = "certificates.k8s.io" // SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"} // Kind takes an unqualified kind and returns a Group qualified GroupKind func Kind(kind string) schema.GroupKind { @@ -49,10 +48,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &CertificateSigningRequest{}, &CertificateSigningRequestList{}, - &v1.ListOptions{}, - &v1.DeleteOptions{}, - &metav1.ExportOptions{}, - &metav1.GetOptions{}, ) // Add the watch version that applies diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1alpha1/types.generated.go b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/types.generated.go similarity index 96% rename from vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1alpha1/types.generated.go rename to vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/types.generated.go index 15e99ef4..b2741033 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1alpha1/types.generated.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/types.generated.go @@ -19,15 +19,14 @@ limitations under the License. // THIS FILE IS AUTO-GENERATED BY codecgen. // ************************************************************ -package v1alpha1 +package v1beta1 import ( "errors" "fmt" codec1978 "github.com/ugorji/go/codec" pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - pkg3_types "k8s.io/apimachinery/pkg/types" - pkg2_v1 "k8s.io/client-go/pkg/api/v1" + pkg2_types "k8s.io/apimachinery/pkg/types" "reflect" "runtime" time "time" @@ -64,10 +63,9 @@ func init() { } if false { // reference the types, but skip this branch at build/run time var v0 pkg1_v1.TypeMeta - var v1 pkg3_types.UID - var v2 pkg2_v1.ObjectMeta - var v3 time.Time - _, _, _, _ = v0, v1, v2, v3 + var v1 pkg2_types.UID + var v2 time.Time + _, _, _ = v0, v1, v2 } } @@ -160,7 +158,13 @@ func (x *CertificateSigningRequest) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -170,7 +174,13 @@ func (x *CertificateSigningRequest) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -294,24 +304,30 @@ func (x *CertificateSigningRequest) codecDecodeSelfFromMap(l int, d *codec1978.D } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = CertificateSigningRequestSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = CertificateSigningRequestStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -324,16 +340,16 @@ func (x *CertificateSigningRequest) codecDecodeSelfFromArray(l int, d *codec1978 var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -341,21 +357,21 @@ func (x *CertificateSigningRequest) codecDecodeSelfFromArray(l int, d *codec1978 if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -363,38 +379,44 @@ func (x *CertificateSigningRequest) codecDecodeSelfFromArray(l int, d *codec1978 if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -402,16 +424,16 @@ func (x *CertificateSigningRequest) codecDecodeSelfFromArray(l int, d *codec1978 if r.TryDecodeAsNil() { x.Spec = CertificateSigningRequestSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -419,21 +441,21 @@ func (x *CertificateSigningRequest) codecDecodeSelfFromArray(l int, d *codec1978 if r.TryDecodeAsNil() { x.Status = CertificateSigningRequestStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1alpha1/types.go b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/types.go similarity index 97% rename from vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1alpha1/types.go rename to vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/types.go index c6f61b10..bdbb6cbf 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1alpha1/types.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/types.go @@ -14,11 +14,10 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package v1beta1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/client-go/pkg/api/v1" ) // +genclient=true @@ -28,7 +27,7 @@ import ( type CertificateSigningRequest struct { metav1.TypeMeta `json:",inline"` // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // The certificate request itself and any additional information. // +optional diff --git a/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/types_swagger_doc_generated.go b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/types_swagger_doc_generated.go similarity index 99% rename from vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/types_swagger_doc_generated.go rename to vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/types_swagger_doc_generated.go index 26a9dceb..46892098 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/types_swagger_doc_generated.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package v1beta1 // This file contains a collection of methods that can be used from go-restful to // generate Swagger API documentation for its models. Please read this PR for more diff --git a/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/zz_generated.conversion.go new file mode 100644 index 00000000..a9a93d57 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/zz_generated.conversion.go @@ -0,0 +1,169 @@ +// +build !ignore_autogenerated + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was autogenerated by conversion-gen. Do not edit it manually! + +package v1beta1 + +import ( + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + certificates "k8s.io/kubernetes/pkg/apis/certificates" + unsafe "unsafe" +) + +func init() { + SchemeBuilder.Register(RegisterConversions) +} + +// RegisterConversions adds conversion functions to the given scheme. +// Public to allow building arbitrary schemes. +func RegisterConversions(scheme *runtime.Scheme) error { + return scheme.AddGeneratedConversionFuncs( + Convert_v1beta1_CertificateSigningRequest_To_certificates_CertificateSigningRequest, + Convert_certificates_CertificateSigningRequest_To_v1beta1_CertificateSigningRequest, + Convert_v1beta1_CertificateSigningRequestCondition_To_certificates_CertificateSigningRequestCondition, + Convert_certificates_CertificateSigningRequestCondition_To_v1beta1_CertificateSigningRequestCondition, + Convert_v1beta1_CertificateSigningRequestList_To_certificates_CertificateSigningRequestList, + Convert_certificates_CertificateSigningRequestList_To_v1beta1_CertificateSigningRequestList, + Convert_v1beta1_CertificateSigningRequestSpec_To_certificates_CertificateSigningRequestSpec, + Convert_certificates_CertificateSigningRequestSpec_To_v1beta1_CertificateSigningRequestSpec, + Convert_v1beta1_CertificateSigningRequestStatus_To_certificates_CertificateSigningRequestStatus, + Convert_certificates_CertificateSigningRequestStatus_To_v1beta1_CertificateSigningRequestStatus, + ) +} + +func autoConvert_v1beta1_CertificateSigningRequest_To_certificates_CertificateSigningRequest(in *CertificateSigningRequest, out *certificates.CertificateSigningRequest, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1beta1_CertificateSigningRequestSpec_To_certificates_CertificateSigningRequestSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1beta1_CertificateSigningRequestStatus_To_certificates_CertificateSigningRequestStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +func Convert_v1beta1_CertificateSigningRequest_To_certificates_CertificateSigningRequest(in *CertificateSigningRequest, out *certificates.CertificateSigningRequest, s conversion.Scope) error { + return autoConvert_v1beta1_CertificateSigningRequest_To_certificates_CertificateSigningRequest(in, out, s) +} + +func autoConvert_certificates_CertificateSigningRequest_To_v1beta1_CertificateSigningRequest(in *certificates.CertificateSigningRequest, out *CertificateSigningRequest, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_certificates_CertificateSigningRequestSpec_To_v1beta1_CertificateSigningRequestSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_certificates_CertificateSigningRequestStatus_To_v1beta1_CertificateSigningRequestStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +func Convert_certificates_CertificateSigningRequest_To_v1beta1_CertificateSigningRequest(in *certificates.CertificateSigningRequest, out *CertificateSigningRequest, s conversion.Scope) error { + return autoConvert_certificates_CertificateSigningRequest_To_v1beta1_CertificateSigningRequest(in, out, s) +} + +func autoConvert_v1beta1_CertificateSigningRequestCondition_To_certificates_CertificateSigningRequestCondition(in *CertificateSigningRequestCondition, out *certificates.CertificateSigningRequestCondition, s conversion.Scope) error { + out.Type = certificates.RequestConditionType(in.Type) + out.Reason = in.Reason + out.Message = in.Message + out.LastUpdateTime = in.LastUpdateTime + return nil +} + +func Convert_v1beta1_CertificateSigningRequestCondition_To_certificates_CertificateSigningRequestCondition(in *CertificateSigningRequestCondition, out *certificates.CertificateSigningRequestCondition, s conversion.Scope) error { + return autoConvert_v1beta1_CertificateSigningRequestCondition_To_certificates_CertificateSigningRequestCondition(in, out, s) +} + +func autoConvert_certificates_CertificateSigningRequestCondition_To_v1beta1_CertificateSigningRequestCondition(in *certificates.CertificateSigningRequestCondition, out *CertificateSigningRequestCondition, s conversion.Scope) error { + out.Type = RequestConditionType(in.Type) + out.Reason = in.Reason + out.Message = in.Message + out.LastUpdateTime = in.LastUpdateTime + return nil +} + +func Convert_certificates_CertificateSigningRequestCondition_To_v1beta1_CertificateSigningRequestCondition(in *certificates.CertificateSigningRequestCondition, out *CertificateSigningRequestCondition, s conversion.Scope) error { + return autoConvert_certificates_CertificateSigningRequestCondition_To_v1beta1_CertificateSigningRequestCondition(in, out, s) +} + +func autoConvert_v1beta1_CertificateSigningRequestList_To_certificates_CertificateSigningRequestList(in *CertificateSigningRequestList, out *certificates.CertificateSigningRequestList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]certificates.CertificateSigningRequest)(unsafe.Pointer(&in.Items)) + return nil +} + +func Convert_v1beta1_CertificateSigningRequestList_To_certificates_CertificateSigningRequestList(in *CertificateSigningRequestList, out *certificates.CertificateSigningRequestList, s conversion.Scope) error { + return autoConvert_v1beta1_CertificateSigningRequestList_To_certificates_CertificateSigningRequestList(in, out, s) +} + +func autoConvert_certificates_CertificateSigningRequestList_To_v1beta1_CertificateSigningRequestList(in *certificates.CertificateSigningRequestList, out *CertificateSigningRequestList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]CertificateSigningRequest)(unsafe.Pointer(&in.Items)) + return nil +} + +func Convert_certificates_CertificateSigningRequestList_To_v1beta1_CertificateSigningRequestList(in *certificates.CertificateSigningRequestList, out *CertificateSigningRequestList, s conversion.Scope) error { + return autoConvert_certificates_CertificateSigningRequestList_To_v1beta1_CertificateSigningRequestList(in, out, s) +} + +func autoConvert_v1beta1_CertificateSigningRequestSpec_To_certificates_CertificateSigningRequestSpec(in *CertificateSigningRequestSpec, out *certificates.CertificateSigningRequestSpec, s conversion.Scope) error { + out.Request = *(*[]byte)(unsafe.Pointer(&in.Request)) + out.Usages = *(*[]certificates.KeyUsage)(unsafe.Pointer(&in.Usages)) + out.Username = in.Username + out.UID = in.UID + out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups)) + return nil +} + +func Convert_v1beta1_CertificateSigningRequestSpec_To_certificates_CertificateSigningRequestSpec(in *CertificateSigningRequestSpec, out *certificates.CertificateSigningRequestSpec, s conversion.Scope) error { + return autoConvert_v1beta1_CertificateSigningRequestSpec_To_certificates_CertificateSigningRequestSpec(in, out, s) +} + +func autoConvert_certificates_CertificateSigningRequestSpec_To_v1beta1_CertificateSigningRequestSpec(in *certificates.CertificateSigningRequestSpec, out *CertificateSigningRequestSpec, s conversion.Scope) error { + out.Request = *(*[]byte)(unsafe.Pointer(&in.Request)) + out.Usages = *(*[]KeyUsage)(unsafe.Pointer(&in.Usages)) + out.Username = in.Username + out.UID = in.UID + out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups)) + return nil +} + +func Convert_certificates_CertificateSigningRequestSpec_To_v1beta1_CertificateSigningRequestSpec(in *certificates.CertificateSigningRequestSpec, out *CertificateSigningRequestSpec, s conversion.Scope) error { + return autoConvert_certificates_CertificateSigningRequestSpec_To_v1beta1_CertificateSigningRequestSpec(in, out, s) +} + +func autoConvert_v1beta1_CertificateSigningRequestStatus_To_certificates_CertificateSigningRequestStatus(in *CertificateSigningRequestStatus, out *certificates.CertificateSigningRequestStatus, s conversion.Scope) error { + out.Conditions = *(*[]certificates.CertificateSigningRequestCondition)(unsafe.Pointer(&in.Conditions)) + out.Certificate = *(*[]byte)(unsafe.Pointer(&in.Certificate)) + return nil +} + +func Convert_v1beta1_CertificateSigningRequestStatus_To_certificates_CertificateSigningRequestStatus(in *CertificateSigningRequestStatus, out *certificates.CertificateSigningRequestStatus, s conversion.Scope) error { + return autoConvert_v1beta1_CertificateSigningRequestStatus_To_certificates_CertificateSigningRequestStatus(in, out, s) +} + +func autoConvert_certificates_CertificateSigningRequestStatus_To_v1beta1_CertificateSigningRequestStatus(in *certificates.CertificateSigningRequestStatus, out *CertificateSigningRequestStatus, s conversion.Scope) error { + out.Conditions = *(*[]CertificateSigningRequestCondition)(unsafe.Pointer(&in.Conditions)) + out.Certificate = *(*[]byte)(unsafe.Pointer(&in.Certificate)) + return nil +} + +func Convert_certificates_CertificateSigningRequestStatus_To_v1beta1_CertificateSigningRequestStatus(in *certificates.CertificateSigningRequestStatus, out *CertificateSigningRequestStatus, s conversion.Scope) error { + return autoConvert_certificates_CertificateSigningRequestStatus_To_v1beta1_CertificateSigningRequestStatus(in, out, s) +} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1alpha1/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/zz_generated.deepcopy.go similarity index 57% rename from vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1alpha1/zz_generated.deepcopy.go rename to vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/zz_generated.deepcopy.go index c5386faa..5db3b92a 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/zz_generated.deepcopy.go @@ -18,12 +18,12 @@ limitations under the License. // This file was autogenerated by deepcopy-gen. Do not edit it manually! -package v1alpha1 +package v1beta1 import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - v1 "k8s.io/client-go/pkg/api/v1" reflect "reflect" ) @@ -35,33 +35,35 @@ func init() { // to allow building arbitrary schemes. func RegisterDeepCopies(scheme *runtime.Scheme) error { return scheme.AddGeneratedDeepCopyFuncs( - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_CertificateSigningRequest, InType: reflect.TypeOf(&CertificateSigningRequest{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_CertificateSigningRequestCondition, InType: reflect.TypeOf(&CertificateSigningRequestCondition{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_CertificateSigningRequestList, InType: reflect.TypeOf(&CertificateSigningRequestList{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_CertificateSigningRequestSpec, InType: reflect.TypeOf(&CertificateSigningRequestSpec{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_CertificateSigningRequestStatus, InType: reflect.TypeOf(&CertificateSigningRequestStatus{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_CertificateSigningRequest, InType: reflect.TypeOf(&CertificateSigningRequest{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_CertificateSigningRequestCondition, InType: reflect.TypeOf(&CertificateSigningRequestCondition{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_CertificateSigningRequestList, InType: reflect.TypeOf(&CertificateSigningRequestList{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_CertificateSigningRequestSpec, InType: reflect.TypeOf(&CertificateSigningRequestSpec{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_CertificateSigningRequestStatus, InType: reflect.TypeOf(&CertificateSigningRequestStatus{})}, ) } -func DeepCopy_v1alpha1_CertificateSigningRequest(in interface{}, out interface{}, c *conversion.Cloner) error { +func DeepCopy_v1beta1_CertificateSigningRequest(in interface{}, out interface{}, c *conversion.Cloner) error { { in := in.(*CertificateSigningRequest) out := out.(*CertificateSigningRequest) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { + return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) + } + if err := DeepCopy_v1beta1_CertificateSigningRequestSpec(&in.Spec, &out.Spec, c); err != nil { return err } - if err := DeepCopy_v1alpha1_CertificateSigningRequestSpec(&in.Spec, &out.Spec, c); err != nil { - return err - } - if err := DeepCopy_v1alpha1_CertificateSigningRequestStatus(&in.Status, &out.Status, c); err != nil { + if err := DeepCopy_v1beta1_CertificateSigningRequestStatus(&in.Status, &out.Status, c); err != nil { return err } return nil } } -func DeepCopy_v1alpha1_CertificateSigningRequestCondition(in interface{}, out interface{}, c *conversion.Cloner) error { +func DeepCopy_v1beta1_CertificateSigningRequestCondition(in interface{}, out interface{}, c *conversion.Cloner) error { { in := in.(*CertificateSigningRequestCondition) out := out.(*CertificateSigningRequestCondition) @@ -71,7 +73,7 @@ func DeepCopy_v1alpha1_CertificateSigningRequestCondition(in interface{}, out in } } -func DeepCopy_v1alpha1_CertificateSigningRequestList(in interface{}, out interface{}, c *conversion.Cloner) error { +func DeepCopy_v1beta1_CertificateSigningRequestList(in interface{}, out interface{}, c *conversion.Cloner) error { { in := in.(*CertificateSigningRequestList) out := out.(*CertificateSigningRequestList) @@ -80,7 +82,7 @@ func DeepCopy_v1alpha1_CertificateSigningRequestList(in interface{}, out interfa in, out := &in.Items, &out.Items *out = make([]CertificateSigningRequest, len(*in)) for i := range *in { - if err := DeepCopy_v1alpha1_CertificateSigningRequest(&(*in)[i], &(*out)[i], c); err != nil { + if err := DeepCopy_v1beta1_CertificateSigningRequest(&(*in)[i], &(*out)[i], c); err != nil { return err } } @@ -89,7 +91,7 @@ func DeepCopy_v1alpha1_CertificateSigningRequestList(in interface{}, out interfa } } -func DeepCopy_v1alpha1_CertificateSigningRequestSpec(in interface{}, out interface{}, c *conversion.Cloner) error { +func DeepCopy_v1beta1_CertificateSigningRequestSpec(in interface{}, out interface{}, c *conversion.Cloner) error { { in := in.(*CertificateSigningRequestSpec) out := out.(*CertificateSigningRequestSpec) @@ -102,9 +104,7 @@ func DeepCopy_v1alpha1_CertificateSigningRequestSpec(in interface{}, out interfa if in.Usages != nil { in, out := &in.Usages, &out.Usages *out = make([]KeyUsage, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.Groups != nil { in, out := &in.Groups, &out.Groups @@ -115,7 +115,7 @@ func DeepCopy_v1alpha1_CertificateSigningRequestSpec(in interface{}, out interfa } } -func DeepCopy_v1alpha1_CertificateSigningRequestStatus(in interface{}, out interface{}, c *conversion.Cloner) error { +func DeepCopy_v1beta1_CertificateSigningRequestStatus(in interface{}, out interface{}, c *conversion.Cloner) error { { in := in.(*CertificateSigningRequestStatus) out := out.(*CertificateSigningRequestStatus) @@ -124,7 +124,7 @@ func DeepCopy_v1alpha1_CertificateSigningRequestStatus(in interface{}, out inter in, out := &in.Conditions, &out.Conditions *out = make([]CertificateSigningRequestCondition, len(*in)) for i := range *in { - if err := DeepCopy_v1alpha1_CertificateSigningRequestCondition(&(*in)[i], &(*out)[i], c); err != nil { + if err := DeepCopy_v1beta1_CertificateSigningRequestCondition(&(*in)[i], &(*out)[i], c); err != nil { return err } } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1alpha1/zz_generated.defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/zz_generated.defaults.go similarity index 98% rename from vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1alpha1/zz_generated.defaults.go rename to vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/zz_generated.defaults.go index d3403d1d..3c5ae036 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1alpha1/zz_generated.defaults.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1beta1/zz_generated.defaults.go @@ -18,7 +18,7 @@ limitations under the License. // This file was autogenerated by defaulter-gen. Do not edit it manually! -package v1alpha1 +package v1beta1 import ( runtime "k8s.io/apimachinery/pkg/runtime" diff --git a/vendor/k8s.io/kubernetes/pkg/apis/certificates/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/certificates/zz_generated.deepcopy.go index 3e5d42ed..2372ca64 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/certificates/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/certificates/zz_generated.deepcopy.go @@ -21,9 +21,9 @@ limitations under the License. package certificates import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - api "k8s.io/kubernetes/pkg/api" reflect "reflect" ) @@ -48,8 +48,10 @@ func DeepCopy_certificates_CertificateSigningRequest(in interface{}, out interfa in := in.(*CertificateSigningRequest) out := out.(*CertificateSigningRequest) *out = *in - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_certificates_CertificateSigningRequestSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -102,9 +104,7 @@ func DeepCopy_certificates_CertificateSigningRequestSpec(in interface{}, out int if in.Usages != nil { in, out := &in.Usages, &out.Usages *out = make([]KeyUsage, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.Groups != nil { in, out := &in.Groups, &out.Groups diff --git a/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/install/BUILD b/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/install/BUILD index 71d531cc..50d322f8 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/install/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/install/BUILD @@ -12,9 +12,12 @@ go_library( srcs = ["install.go"], tags = ["automanaged"], deps = [ - "//pkg/apimachinery/announced:go_default_library", + "//pkg/api:go_default_library", "//pkg/apis/componentconfig:go_default_library", "//pkg/apis/componentconfig/v1alpha1:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apimachinery/announced", + "//vendor:k8s.io/apimachinery/pkg/apimachinery/registered", + "//vendor:k8s.io/apimachinery/pkg/runtime", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/install/install.go b/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/install/install.go index 9bd19416..1d0c5191 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/install/install.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/install/install.go @@ -19,12 +19,20 @@ limitations under the License. package install import ( - "k8s.io/kubernetes/pkg/apimachinery/announced" + "k8s.io/apimachinery/pkg/apimachinery/announced" + "k8s.io/apimachinery/pkg/apimachinery/registered" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/componentconfig" "k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1" ) func init() { + Install(api.GroupFactoryRegistry, api.Registry, api.Scheme) +} + +// Install registers the API group and adds types to a scheme +func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) { if err := announced.NewGroupMetaFactory( &announced.GroupMetaFactoryArgs{ GroupName: componentconfig.GroupName, @@ -35,7 +43,7 @@ func init() { announced.VersionToSchemeFunc{ v1alpha1.SchemeGroupVersion.Version: v1alpha1.AddToScheme, }, - ).Announce().RegisterAndEnable(); err != nil { + ).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil { panic(err) } } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/types.go b/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/types.go index b5a52bb1..707e66f5 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/types.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/types.go @@ -481,6 +481,9 @@ type KubeletConfiguration struct { // (binaries, etc.) to mount the volume are available on the underlying node. If the check is enabled // and fails the mount operation fails. ExperimentalCheckNodeCapabilitiesBeforeMount bool + // This flag, if set, instructs the kubelet to keep volumes from terminated pods mounted to the node. + // This can be useful for debugging volume related issues. + KeepTerminatedPodVolumes bool } type KubeletAuthorizationMode string @@ -561,8 +564,7 @@ type KubeSchedulerConfiguration struct { // kubeAPIBurst is the QPS burst to use while talking with kubernetes apiserver. KubeAPIBurst int32 // schedulerName is name of the scheduler, used to select which pods - // will be processed by this scheduler, based on pod's annotation with - // key 'scheduler.alpha.kubernetes.io/name'. + // will be processed by this scheduler, based on pod's "spec.SchedulerName". SchedulerName string // RequiredDuringScheduling affinity is not symmetric, but there is an implicit PreferredDuringScheduling affinity rule // corresponding to every RequiredDuringScheduling affinity rule. diff --git a/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1/defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1/defaults.go index 78a32975..89e44f10 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1/defaults.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1/defaults.go @@ -277,7 +277,7 @@ func SetDefaults_KubeletConfiguration(obj *KubeletConfiguration) { obj.LowDiskSpaceThresholdMB = 256 } if obj.MasterServiceNamespace == "" { - obj.MasterServiceNamespace = api.NamespaceDefault + obj.MasterServiceNamespace = metav1.NamespaceDefault } if obj.MaxContainerCount == nil { temp := int32(-1) diff --git a/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1/types.go b/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1/types.go index 75919436..a01784ef 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1/types.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1/types.go @@ -122,8 +122,7 @@ type KubeSchedulerConfiguration struct { // kubeAPIBurst is the QPS burst to use while talking with kubernetes apiserver. KubeAPIBurst int `json:"kubeAPIBurst"` // schedulerName is name of the scheduler, used to select which pods - // will be processed by this scheduler, based on pod's annotation with - // key 'scheduler.alpha.kubernetes.io/name'. + // will be processed by this scheduler, based on pod's "spec.SchedulerName". SchedulerName string `json:"schedulerName"` // RequiredDuringScheduling affinity is not symmetric, but there is an implicit PreferredDuringScheduling affinity rule // corresponding to every RequiredDuringScheduling affinity rule. @@ -522,6 +521,9 @@ type KubeletConfiguration struct { // (binaries, etc.) to mount the volume are available on the underlying node. If the check is enabled // and fails the mount operation fails. ExperimentalCheckNodeCapabilitiesBeforeMount bool `json:"experimentalCheckNodeCapabilitiesBeforeMount,omitempty"` + // This flag, if set, instructs the kubelet to keep volumes from terminated pods mounted to the node. + // This can be useful for debugging volume related issues. + KeepTerminatedPodVolumes bool `json:"keepTerminatedPodVolumes,omitempty"` } type KubeletAuthorizationMode string diff --git a/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1/zz_generated.conversion.go index 9dc04b49..3ad8a0ae 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1/zz_generated.conversion.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1/zz_generated.conversion.go @@ -481,6 +481,7 @@ func autoConvert_v1alpha1_KubeletConfiguration_To_componentconfig_KubeletConfigu out.EnableCRI = in.EnableCRI out.ExperimentalFailSwapOn = in.ExperimentalFailSwapOn out.ExperimentalCheckNodeCapabilitiesBeforeMount = in.ExperimentalCheckNodeCapabilitiesBeforeMount + out.KeepTerminatedPodVolumes = in.KeepTerminatedPodVolumes return nil } @@ -652,6 +653,7 @@ func autoConvert_componentconfig_KubeletConfiguration_To_v1alpha1_KubeletConfigu out.EnableCRI = in.EnableCRI out.ExperimentalFailSwapOn = in.ExperimentalFailSwapOn out.ExperimentalCheckNodeCapabilitiesBeforeMount = in.ExperimentalCheckNodeCapabilitiesBeforeMount + out.KeepTerminatedPodVolumes = in.KeepTerminatedPodVolumes return nil } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1/zz_generated.deepcopy.go index c3bf6ee9..3e556882 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1/zz_generated.deepcopy.go @@ -257,9 +257,7 @@ func DeepCopy_v1alpha1_KubeletConfiguration(in interface{}, out interface{}, c * if in.RegisterWithTaints != nil { in, out := &in.RegisterWithTaints, &out.RegisterWithTaints *out = make([]v1.Taint, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.KubeAPIQPS != nil { in, out := &in.KubeAPIQPS, &out.KubeAPIQPS diff --git a/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/zz_generated.deepcopy.go index b32b8878..a88e2731 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/zz_generated.deepcopy.go @@ -197,9 +197,7 @@ func DeepCopy_componentconfig_KubeletConfiguration(in interface{}, out interface if in.RegisterWithTaints != nil { in, out := &in.RegisterWithTaints, &out.RegisterWithTaints *out = make([]api.Taint, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.NodeLabels != nil { in, out := &in.NodeLabels, &out.NodeLabels diff --git a/vendor/k8s.io/kubernetes/pkg/apis/extensions/install/BUILD b/vendor/k8s.io/kubernetes/pkg/apis/extensions/install/BUILD index d544b7bf..53b3892f 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/extensions/install/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/apis/extensions/install/BUILD @@ -12,9 +12,12 @@ go_library( srcs = ["install.go"], tags = ["automanaged"], deps = [ - "//pkg/apimachinery/announced:go_default_library", + "//pkg/api:go_default_library", "//pkg/apis/extensions:go_default_library", "//pkg/apis/extensions/v1beta1:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apimachinery/announced", + "//vendor:k8s.io/apimachinery/pkg/apimachinery/registered", + "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/sets", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/apis/extensions/install/install.go b/vendor/k8s.io/kubernetes/pkg/apis/extensions/install/install.go index 2cf962e9..53f870dd 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/extensions/install/install.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/extensions/install/install.go @@ -19,13 +19,21 @@ limitations under the License. package install import ( + "k8s.io/apimachinery/pkg/apimachinery/announced" + "k8s.io/apimachinery/pkg/apimachinery/registered" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/kubernetes/pkg/apimachinery/announced" + "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/extensions" "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" ) func init() { + Install(api.GroupFactoryRegistry, api.Registry, api.Scheme) +} + +// Install registers the API group and adds types to a scheme +func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) { if err := announced.NewGroupMetaFactory( &announced.GroupMetaFactoryArgs{ GroupName: extensions.GroupName, @@ -37,7 +45,7 @@ func init() { announced.VersionToSchemeFunc{ v1beta1.SchemeGroupVersion.Version: v1beta1.AddToScheme, }, - ).Announce().RegisterAndEnable(); err != nil { + ).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil { panic(err) } } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/extensions/register.go b/vendor/k8s.io/kubernetes/pkg/apis/extensions/register.go index c7fbf67f..192addff 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/extensions/register.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/extensions/register.go @@ -17,10 +17,8 @@ limitations under the License. package extensions import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/autoscaling" ) @@ -64,12 +62,8 @@ func addKnownTypes(scheme *runtime.Scheme) error { &ThirdPartyResourceDataList{}, &Ingress{}, &IngressList{}, - &api.ListOptions{}, - &api.DeleteOptions{}, &ReplicaSet{}, &ReplicaSetList{}, - &metav1.ExportOptions{}, - &metav1.GetOptions{}, &PodSecurityPolicy{}, &PodSecurityPolicyList{}, &NetworkPolicy{}, diff --git a/vendor/k8s.io/kubernetes/pkg/apis/extensions/types.go b/vendor/k8s.io/kubernetes/pkg/apis/extensions/types.go index 94f6e3a2..5c20c551 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/extensions/types.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/extensions/types.go @@ -68,7 +68,7 @@ type Scale struct { metav1.TypeMeta // Standard object metadata; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata. // +optional - api.ObjectMeta + metav1.ObjectMeta // defines the behavior of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. // +optional @@ -117,7 +117,7 @@ type ThirdPartyResource struct { // Standard object metadata // +optional - api.ObjectMeta + metav1.ObjectMeta // Description is the description of this object. // +optional @@ -150,7 +150,7 @@ type ThirdPartyResourceData struct { metav1.TypeMeta // Standard object metadata. // +optional - api.ObjectMeta + metav1.ObjectMeta // Data is the raw JSON data for this data. // +optional @@ -162,7 +162,7 @@ type ThirdPartyResourceData struct { type Deployment struct { metav1.TypeMeta // +optional - api.ObjectMeta + metav1.ObjectMeta // Specification of the desired behavior of the Deployment. // +optional @@ -492,7 +492,7 @@ type DaemonSet struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - api.ObjectMeta + metav1.ObjectMeta // Spec defines the desired behavior of this daemon set. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -541,7 +541,7 @@ type Ingress struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - api.ObjectMeta + metav1.ObjectMeta // Spec is the desired state of the Ingress. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -702,7 +702,7 @@ type IngressBackend struct { type ReplicaSet struct { metav1.TypeMeta // +optional - api.ObjectMeta + metav1.ObjectMeta // Spec defines the desired behavior of this ReplicaSet. // +optional @@ -810,7 +810,7 @@ type ReplicaSetCondition struct { type PodSecurityPolicy struct { metav1.TypeMeta // +optional - api.ObjectMeta + metav1.ObjectMeta // Spec defines the policy enforced. // +optional @@ -1017,7 +1017,7 @@ type PodSecurityPolicyList struct { type NetworkPolicy struct { metav1.TypeMeta // +optional - api.ObjectMeta + metav1.ObjectMeta // Specification of the desired behavior for this NetworkPolicy. // +optional diff --git a/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/defaults_test.go b/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/defaults_test.go index a47d33d6..c8880515 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/defaults_test.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/defaults_test.go @@ -40,8 +40,9 @@ func TestSetDefaultDaemonSet(t *testing.T) { RestartPolicy: v1.RestartPolicyAlways, SecurityContext: &v1.PodSecurityContext{}, TerminationGracePeriodSeconds: &period, + SchedulerName: api.DefaultSchedulerName, }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: defaultLabels, }, } @@ -51,6 +52,7 @@ func TestSetDefaultDaemonSet(t *testing.T) { RestartPolicy: v1.RestartPolicyAlways, SecurityContext: &v1.PodSecurityContext{}, TerminationGracePeriodSeconds: &period, + SchedulerName: api.DefaultSchedulerName, }, } tests := []struct { @@ -64,7 +66,7 @@ func TestSetDefaultDaemonSet(t *testing.T) { }, }, expected: &DaemonSet{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: defaultLabels, }, Spec: DaemonSetSpec{ @@ -77,7 +79,7 @@ func TestSetDefaultDaemonSet(t *testing.T) { }, { // Labels change/defaulting test. original: &DaemonSet{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "bar": "foo", }, @@ -87,7 +89,7 @@ func TestSetDefaultDaemonSet(t *testing.T) { }, }, expected: &DaemonSet{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "bar": "foo", }, @@ -155,6 +157,7 @@ func TestSetDefaultDeployment(t *testing.T) { RestartPolicy: v1.RestartPolicyAlways, SecurityContext: &v1.PodSecurityContext{}, TerminationGracePeriodSeconds: &period, + SchedulerName: api.DefaultSchedulerName, }, } tests := []struct { @@ -293,7 +296,7 @@ func TestSetDefaultReplicaSet(t *testing.T) { rs: &ReplicaSet{ Spec: ReplicaSetSpec{ Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "foo": "bar", }, @@ -306,14 +309,14 @@ func TestSetDefaultReplicaSet(t *testing.T) { }, { rs: &ReplicaSet{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "bar": "foo", }, }, Spec: ReplicaSetSpec{ Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "foo": "bar", }, @@ -326,7 +329,7 @@ func TestSetDefaultReplicaSet(t *testing.T) { }, { rs: &ReplicaSet{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "bar": "foo", }, @@ -338,7 +341,7 @@ func TestSetDefaultReplicaSet(t *testing.T) { }, }, Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "foo": "bar", }, @@ -358,7 +361,7 @@ func TestSetDefaultReplicaSet(t *testing.T) { }, }, Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "foo": "bar", }, @@ -405,7 +408,7 @@ func TestSetDefaultReplicaSetReplicas(t *testing.T) { rs: ReplicaSet{ Spec: ReplicaSetSpec{ Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "foo": "bar", }, @@ -420,7 +423,7 @@ func TestSetDefaultReplicaSetReplicas(t *testing.T) { Spec: ReplicaSetSpec{ Replicas: newInt32(0), Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "foo": "bar", }, @@ -435,7 +438,7 @@ func TestSetDefaultReplicaSetReplicas(t *testing.T) { Spec: ReplicaSetSpec{ Replicas: newInt32(3), Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "foo": "bar", }, @@ -478,7 +481,7 @@ func TestDefaultRequestIsNotSetForReplicaSet(t *testing.T) { Spec: ReplicaSetSpec{ Replicas: newInt32(3), Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "foo": "bar", }, diff --git a/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/generated.pb.go b/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/generated.pb.go index 57c3ba63..ffc4a2f9 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/generated.pb.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/generated.pb.go @@ -3780,7 +3780,7 @@ func (this *DaemonSet) String() string { return "nil" } s := strings.Join([]string{`&DaemonSet{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "DaemonSetSpec", "DaemonSetSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "DaemonSetStatus", "DaemonSetStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -3828,7 +3828,7 @@ func (this *Deployment) String() string { return "nil" } s := strings.Join([]string{`&Deployment{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "DeploymentSpec", "DeploymentSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "DeploymentStatus", "DeploymentStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -3965,7 +3965,7 @@ func (this *HorizontalPodAutoscaler) String() string { return "nil" } s := strings.Join([]string{`&HorizontalPodAutoscaler{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "HorizontalPodAutoscalerSpec", "HorizontalPodAutoscalerSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "HorizontalPodAutoscalerStatus", "HorizontalPodAutoscalerStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -4037,7 +4037,7 @@ func (this *Ingress) String() string { return "nil" } s := strings.Join([]string{`&Ingress{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "IngressSpec", "IngressSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "IngressStatus", "IngressStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -4125,7 +4125,7 @@ func (this *NetworkPolicy) String() string { return "nil" } s := strings.Join([]string{`&NetworkPolicy{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "NetworkPolicySpec", "NetworkPolicySpec", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -4191,7 +4191,7 @@ func (this *PodSecurityPolicy) String() string { return "nil" } s := strings.Join([]string{`&PodSecurityPolicy{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PodSecurityPolicySpec", "PodSecurityPolicySpec", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -4236,7 +4236,7 @@ func (this *ReplicaSet) String() string { return "nil" } s := strings.Join([]string{`&ReplicaSet{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ReplicaSetSpec", "ReplicaSetSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ReplicaSetStatus", "ReplicaSetStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -4353,7 +4353,7 @@ func (this *Scale) String() string { return "nil" } s := strings.Join([]string{`&Scale{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ScaleSpec", "ScaleSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ScaleStatus", "ScaleStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -4421,7 +4421,7 @@ func (this *ThirdPartyResource) String() string { return "nil" } s := strings.Join([]string{`&ThirdPartyResource{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Description:` + fmt.Sprintf("%v", this.Description) + `,`, `Versions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Versions), "APIVersion", "APIVersion", 1), `&`, ``, 1) + `,`, `}`, @@ -4433,7 +4433,7 @@ func (this *ThirdPartyResourceData) String() string { return "nil" } s := strings.Join([]string{`&ThirdPartyResourceData{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Data:` + valueToStringGenerated(this.Data) + `,`, `}`, }, "") @@ -12526,229 +12526,229 @@ var ( ) var fileDescriptorGenerated = []byte{ - // 3576 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe4, 0x5b, 0x4d, 0x6c, 0x1c, 0xc7, - 0x95, 0x56, 0xcf, 0x70, 0x44, 0xf2, 0x51, 0x24, 0xc5, 0x22, 0x4d, 0x8d, 0x69, 0x9b, 0x23, 0xb7, - 0xb1, 0xb6, 0xbc, 0xb0, 0x87, 0x2b, 0x79, 0xe5, 0xb5, 0x65, 0x5b, 0x36, 0x87, 0x14, 0x25, 0x7a, - 0x49, 0x69, 0x5c, 0x43, 0x6a, 0xbd, 0xfe, 0x45, 0x73, 0xa6, 0x38, 0x6c, 0xb1, 0xff, 0xdc, 0x5d, - 0x4d, 0x73, 0x6c, 0x04, 0x36, 0x10, 0xe4, 0xea, 0xf8, 0x96, 0x1c, 0x9c, 0x43, 0x0e, 0x41, 0x4e, - 0x31, 0x62, 0x20, 0x80, 0x91, 0x63, 0x0e, 0x41, 0x04, 0xe4, 0x07, 0x0e, 0x90, 0x20, 0x39, 0x18, - 0x93, 0x88, 0x41, 0x8c, 0xdc, 0x03, 0x5f, 0x94, 0x4b, 0x50, 0xd5, 0xd5, 0xbf, 0xd3, 0x3d, 0xe2, - 0x0c, 0x7f, 0x10, 0x20, 0x37, 0x4e, 0xd5, 0x7b, 0xdf, 0xfb, 0xa9, 0xea, 0xf7, 0x5e, 0x55, 0x3d, - 0xc2, 0x0b, 0xdb, 0xcf, 0x38, 0x65, 0xd5, 0x9c, 0xdb, 0x76, 0x37, 0x88, 0x6d, 0x10, 0x4a, 0x9c, - 0x39, 0x6b, 0xbb, 0x39, 0xa7, 0x58, 0xaa, 0x33, 0x47, 0x76, 0x29, 0x31, 0x1c, 0xd5, 0x34, 0x9c, - 0xb9, 0x9d, 0xf3, 0x1b, 0x84, 0x2a, 0xe7, 0xe7, 0x9a, 0xc4, 0x20, 0xb6, 0x42, 0x49, 0xa3, 0x6c, - 0xd9, 0x26, 0x35, 0xd1, 0x93, 0x1e, 0x7b, 0x39, 0x64, 0x2f, 0x5b, 0xdb, 0xcd, 0x32, 0x63, 0x2f, - 0x87, 0xec, 0x65, 0xc1, 0x3e, 0xf3, 0x64, 0x53, 0xa5, 0x5b, 0xee, 0x46, 0xb9, 0x6e, 0xea, 0x73, - 0x4d, 0xb3, 0x69, 0xce, 0x71, 0x94, 0x0d, 0x77, 0x93, 0xff, 0xe2, 0x3f, 0xf8, 0x5f, 0x1e, 0xfa, - 0xcc, 0x7f, 0x0b, 0xe5, 0x14, 0x4b, 0xd5, 0x95, 0xfa, 0x96, 0x6a, 0x10, 0xbb, 0x15, 0xaa, 0xa7, - 0x13, 0xaa, 0xcc, 0xed, 0x74, 0xe8, 0x34, 0x33, 0x97, 0xc5, 0x65, 0xbb, 0x06, 0x55, 0x75, 0xd2, - 0xc1, 0xf0, 0xf4, 0xbd, 0x18, 0x9c, 0xfa, 0x16, 0xd1, 0x95, 0x0e, 0xbe, 0x0b, 0x99, 0xbe, 0x9b, - 0xb3, 0x89, 0x63, 0xba, 0x76, 0xbd, 0x53, 0xd6, 0x13, 0xd9, 0x3c, 0x29, 0xa6, 0x9c, 0x4f, 0xa7, - 0x76, 0xa9, 0xaa, 0xcd, 0xa9, 0x06, 0x75, 0xa8, 0x9d, 0x64, 0x91, 0xcb, 0x00, 0xf3, 0xd5, 0xe5, - 0x9b, 0xc4, 0x66, 0x9e, 0x47, 0x67, 0x61, 0xc0, 0x50, 0x74, 0x52, 0x94, 0xce, 0x4a, 0xe7, 0x86, - 0x2b, 0xa7, 0x6e, 0xb7, 0x4b, 0x27, 0xf6, 0xda, 0xa5, 0x81, 0xeb, 0x8a, 0x4e, 0x30, 0x9f, 0x91, - 0xdf, 0x80, 0xa9, 0x85, 0xea, 0xfa, 0x9a, 0x62, 0x37, 0x09, 0x5d, 0xa7, 0xaa, 0xa6, 0xbe, 0xa7, - 0x50, 0xc6, 0xb9, 0x08, 0xa7, 0x29, 0x1f, 0xac, 0x12, 0xbb, 0x4e, 0x0c, 0xaa, 0x34, 0x3d, 0x94, - 0x42, 0xa5, 0x28, 0x50, 0x4e, 0xaf, 0x25, 0xe6, 0x71, 0x07, 0x87, 0xfc, 0x1d, 0x09, 0xee, 0x5f, - 0x70, 0x1d, 0x6a, 0xea, 0xab, 0x84, 0xda, 0x6a, 0x7d, 0xc1, 0xb5, 0x6d, 0x62, 0xd0, 0x1a, 0x55, - 0xa8, 0xeb, 0xdc, 0x5b, 0x3b, 0xf4, 0x2a, 0x14, 0x76, 0x14, 0xcd, 0x25, 0xc5, 0xdc, 0x59, 0xe9, - 0xdc, 0xc8, 0x85, 0x27, 0xca, 0x99, 0xfb, 0xad, 0xec, 0xbb, 0xbc, 0xfc, 0x8a, 0xab, 0x18, 0x54, - 0xa5, 0xad, 0xca, 0x94, 0x00, 0x3c, 0x25, 0xa4, 0xde, 0x64, 0x48, 0xd8, 0x03, 0x94, 0x3f, 0x92, - 0xe0, 0xa1, 0x4c, 0xcd, 0x56, 0x54, 0x87, 0x22, 0x1d, 0x0a, 0x2a, 0x25, 0xba, 0x53, 0x94, 0xce, - 0xe6, 0xcf, 0x8d, 0x5c, 0xb8, 0x56, 0xee, 0x69, 0xaf, 0x97, 0x33, 0xc1, 0x2b, 0xa3, 0x42, 0xaf, - 0xc2, 0x32, 0x83, 0xc7, 0x9e, 0x14, 0xf9, 0xdb, 0x12, 0xa0, 0x28, 0x8f, 0xe7, 0xdd, 0x7d, 0xf8, - 0xe8, 0xff, 0x0e, 0xe2, 0xa3, 0x49, 0x01, 0x38, 0xe2, 0x89, 0x8b, 0xb9, 0xe8, 0x43, 0x09, 0xa6, - 0x3b, 0x35, 0xe2, 0xbe, 0xd9, 0x8c, 0xfb, 0x66, 0xfe, 0x00, 0xbe, 0xf1, 0x50, 0x33, 0x9c, 0xf2, - 0xa3, 0x1c, 0x0c, 0x2f, 0x2a, 0x44, 0x37, 0x8d, 0x1a, 0xa1, 0xe8, 0x55, 0x18, 0x62, 0x1f, 0x7d, - 0x43, 0xa1, 0x0a, 0xf7, 0xc7, 0xc8, 0x85, 0x73, 0x5d, 0x8c, 0xdd, 0x39, 0x5f, 0xbe, 0xb1, 0x71, - 0x8b, 0xd4, 0xe9, 0x2a, 0xa1, 0x4a, 0x05, 0x09, 0x7c, 0x08, 0xc7, 0x70, 0x80, 0x86, 0xde, 0x82, - 0x01, 0xc7, 0x22, 0x75, 0xe1, 0xc2, 0xe7, 0x7b, 0x34, 0x27, 0xd0, 0xb0, 0x66, 0x91, 0x7a, 0xb8, - 0x46, 0xec, 0x17, 0xe6, 0xb8, 0x68, 0x13, 0x4e, 0x3a, 0x7c, 0xf1, 0x8b, 0x79, 0x2e, 0xe1, 0x72, - 0xdf, 0x12, 0xbc, 0x2d, 0x34, 0x26, 0x64, 0x9c, 0xf4, 0x7e, 0x63, 0x81, 0x2e, 0xff, 0x4a, 0x82, - 0xd1, 0x80, 0x96, 0xaf, 0xd4, 0x1b, 0x1d, 0x3e, 0x2b, 0xfb, 0xb2, 0xa3, 0xf1, 0x2e, 0x94, 0xce, - 0xa8, 0x99, 0xef, 0x18, 0x37, 0xf7, 0xdc, 0x69, 0x21, 0x6b, 0xc8, 0x1f, 0x89, 0xf8, 0xed, 0x4d, - 0x7f, 0x1f, 0xe4, 0xf8, 0x3e, 0x78, 0xa6, 0x5f, 0xb3, 0x32, 0x96, 0xff, 0x97, 0x51, 0x73, 0x98, - 0x3b, 0xd1, 0x9b, 0x30, 0xe4, 0x10, 0x8d, 0xd4, 0xa9, 0x69, 0x0b, 0x73, 0x9e, 0xda, 0xa7, 0x39, - 0xca, 0x06, 0xd1, 0x6a, 0x82, 0xb5, 0x72, 0x8a, 0xd9, 0xe3, 0xff, 0xc2, 0x01, 0x24, 0x7a, 0x1d, - 0x86, 0x28, 0xd1, 0x2d, 0x4d, 0xa1, 0xfe, 0xe7, 0xf4, 0x64, 0xf7, 0x1d, 0x56, 0x35, 0x1b, 0x6b, - 0x82, 0x81, 0x2f, 0x7e, 0xe0, 0x2c, 0x7f, 0x14, 0x07, 0x80, 0xf2, 0xc7, 0x79, 0x18, 0x4f, 0x2c, - 0x24, 0xba, 0x09, 0xd3, 0x75, 0x2f, 0x38, 0x5c, 0x77, 0xf5, 0x0d, 0x62, 0xd7, 0xea, 0x5b, 0xa4, - 0xe1, 0x6a, 0xa4, 0x21, 0x82, 0xed, 0xac, 0xc0, 0x9b, 0x5e, 0x48, 0xa5, 0xc2, 0x19, 0xdc, 0xe8, - 0x65, 0x40, 0x06, 0x1f, 0x5a, 0x55, 0x1d, 0x27, 0xc0, 0xcc, 0x71, 0xcc, 0x19, 0x81, 0x89, 0xae, - 0x77, 0x50, 0xe0, 0x14, 0x2e, 0xa6, 0x63, 0x83, 0x38, 0xaa, 0x4d, 0x1a, 0x49, 0x1d, 0xf3, 0x71, - 0x1d, 0x17, 0x53, 0xa9, 0x70, 0x06, 0x37, 0xba, 0x08, 0x23, 0x9e, 0x34, 0x4c, 0x94, 0x46, 0xab, - 0x38, 0xc0, 0xc1, 0x82, 0x80, 0x74, 0x3d, 0x9c, 0xc2, 0x51, 0x3a, 0x66, 0x9a, 0xb9, 0xe1, 0x10, - 0x7b, 0x87, 0x34, 0xae, 0x7a, 0xc9, 0x4f, 0x35, 0x8d, 0x62, 0xe1, 0xac, 0x74, 0x2e, 0x1f, 0x9a, - 0x76, 0xa3, 0x83, 0x02, 0xa7, 0x70, 0xc9, 0x3f, 0xce, 0x01, 0x2c, 0x12, 0x4b, 0x33, 0x5b, 0x3a, - 0x31, 0x8e, 0x32, 0xc0, 0xbc, 0x1d, 0x0b, 0x30, 0x2f, 0xf4, 0xfa, 0x9d, 0x04, 0x2a, 0x66, 0x46, - 0x98, 0x66, 0x22, 0xc2, 0xbc, 0xd8, 0xbf, 0x88, 0xee, 0x21, 0xe6, 0x4e, 0x1e, 0x26, 0x43, 0xe2, - 0x05, 0xd3, 0x68, 0xa8, 0xbc, 0x60, 0x78, 0x0e, 0x06, 0x68, 0xcb, 0xf2, 0x13, 0xd5, 0x63, 0xbe, - 0x8a, 0x6b, 0x2d, 0x8b, 0xdc, 0x6d, 0x97, 0xce, 0xa4, 0xb0, 0xb0, 0x29, 0xcc, 0x99, 0xd0, 0xcd, - 0x40, 0xfb, 0x1c, 0x67, 0xbf, 0x1c, 0x17, 0x7e, 0xb7, 0x5d, 0xea, 0x5a, 0x38, 0x95, 0x03, 0xcc, - 0xb8, 0xb2, 0xe8, 0x51, 0x38, 0x69, 0x13, 0xc5, 0x31, 0x0d, 0xbe, 0xbb, 0x86, 0x43, 0xa3, 0x30, - 0x1f, 0xc5, 0x62, 0x16, 0x3d, 0x0e, 0x83, 0x3a, 0x71, 0x1c, 0x56, 0xe4, 0x14, 0x38, 0xe1, 0xb8, - 0x20, 0x1c, 0x5c, 0xf5, 0x86, 0xb1, 0x3f, 0x8f, 0x6e, 0xc1, 0x98, 0xa6, 0x38, 0x74, 0xdd, 0x6a, - 0x28, 0x94, 0xac, 0xa9, 0x3a, 0x29, 0x9e, 0xe4, 0x0e, 0xff, 0xcf, 0xfd, 0xc5, 0x21, 0xc6, 0x51, - 0x99, 0x16, 0xe8, 0x63, 0x2b, 0x31, 0x24, 0x9c, 0x40, 0x46, 0x3b, 0x80, 0xd8, 0xc8, 0x9a, 0xad, - 0x18, 0x8e, 0xe7, 0x32, 0x26, 0x6f, 0xb0, 0x67, 0x79, 0xc1, 0x67, 0xb1, 0xd2, 0x81, 0x86, 0x53, - 0x24, 0xc8, 0xbf, 0x91, 0x60, 0x2c, 0x5c, 0xb0, 0x63, 0xc8, 0x23, 0x6f, 0xc5, 0xf3, 0xc8, 0xb3, - 0x7d, 0x6f, 0xde, 0x8c, 0x44, 0xf2, 0xdd, 0x3c, 0xa0, 0x90, 0x08, 0x9b, 0x9a, 0xb6, 0xa1, 0xd4, - 0xb7, 0xf7, 0x51, 0x5c, 0xfd, 0x40, 0x02, 0xe4, 0xf2, 0x05, 0x69, 0xcc, 0x1b, 0x86, 0x49, 0x79, - 0xd8, 0xf0, 0xd5, 0xfc, 0xff, 0xbe, 0xd5, 0xf4, 0x35, 0x28, 0xaf, 0x77, 0x60, 0x5f, 0x31, 0xa8, - 0xdd, 0x0a, 0x57, 0xac, 0x93, 0x00, 0xa7, 0x28, 0x84, 0xde, 0x01, 0xb0, 0x05, 0xe6, 0x9a, 0x29, - 0x42, 0x40, 0xaf, 0x51, 0xc6, 0x57, 0x6a, 0xc1, 0x34, 0x36, 0xd5, 0x66, 0x18, 0xd0, 0x70, 0x00, - 0x8c, 0x23, 0x42, 0x66, 0xae, 0xc0, 0x99, 0x0c, 0xed, 0xd1, 0x69, 0xc8, 0x6f, 0x93, 0x96, 0xe7, - 0x56, 0xcc, 0xfe, 0x44, 0x53, 0xd1, 0x22, 0x75, 0x58, 0x54, 0x98, 0x97, 0x72, 0xcf, 0x48, 0xf2, - 0x57, 0x85, 0xe8, 0x5e, 0xe3, 0x49, 0xfe, 0x1c, 0x0c, 0xd9, 0xc4, 0xd2, 0xd4, 0xba, 0xe2, 0x88, - 0x34, 0xc8, 0xf3, 0x35, 0x16, 0x63, 0x38, 0x98, 0x8d, 0x95, 0x03, 0xb9, 0xa3, 0x2d, 0x07, 0xf2, - 0x87, 0x5c, 0x0e, 0x20, 0x13, 0x86, 0x1c, 0xca, 0x8e, 0x6e, 0x4d, 0x2f, 0xf7, 0xf5, 0x5e, 0x46, - 0x47, 0x63, 0xb6, 0x07, 0x14, 0x0a, 0xf4, 0x47, 0x70, 0x20, 0x04, 0xcd, 0xc3, 0xb8, 0xae, 0x1a, - 0x3c, 0x89, 0xd6, 0x48, 0xdd, 0x34, 0x1a, 0x0e, 0x0f, 0x76, 0x85, 0xca, 0x19, 0xc1, 0x34, 0xbe, - 0x1a, 0x9f, 0xc6, 0x49, 0x7a, 0xb4, 0x02, 0x53, 0x36, 0xd9, 0x51, 0x99, 0x1a, 0xd7, 0x54, 0x87, - 0x9a, 0x76, 0x6b, 0x45, 0xd5, 0x55, 0xca, 0x43, 0x60, 0xa1, 0x52, 0xdc, 0x6b, 0x97, 0xa6, 0x70, - 0xca, 0x3c, 0x4e, 0xe5, 0x62, 0xd1, 0xd9, 0x52, 0x5c, 0x87, 0x34, 0x78, 0x48, 0x1b, 0x0a, 0xa3, - 0x73, 0x95, 0x8f, 0x62, 0x31, 0x8b, 0xf4, 0xd8, 0xe6, 0x1e, 0x3a, 0x8c, 0xcd, 0x3d, 0x96, 0xbd, - 0xb1, 0xd1, 0x3a, 0x9c, 0xb1, 0x6c, 0xb3, 0x69, 0x13, 0xc7, 0x59, 0x24, 0x4a, 0x43, 0x53, 0x0d, - 0xe2, 0xfb, 0x6b, 0x98, 0xdb, 0xf9, 0xc0, 0x5e, 0xbb, 0x74, 0xa6, 0x9a, 0x4e, 0x82, 0xb3, 0x78, - 0xe5, 0x4f, 0x06, 0xe0, 0x74, 0x32, 0xcb, 0x66, 0x14, 0x33, 0x52, 0x3f, 0xc5, 0x0c, 0x7a, 0x22, - 0xf2, 0xd9, 0x78, 0x95, 0x5e, 0xb0, 0x1b, 0x52, 0x3e, 0x9d, 0x79, 0x18, 0x17, 0x71, 0xc4, 0x9f, - 0x14, 0xe5, 0x5c, 0xb0, 0x1b, 0xd6, 0xe3, 0xd3, 0x38, 0x49, 0x8f, 0xae, 0xc2, 0x84, 0xb2, 0xa3, - 0xa8, 0x9a, 0xb2, 0xa1, 0x91, 0x00, 0xc4, 0x2b, 0xe3, 0xee, 0x17, 0x20, 0x13, 0xf3, 0x49, 0x02, - 0xdc, 0xc9, 0x83, 0x56, 0x61, 0xd2, 0x35, 0x3a, 0xa1, 0xbc, 0xdd, 0xf9, 0x80, 0x80, 0x9a, 0x5c, - 0xef, 0x24, 0xc1, 0x69, 0x7c, 0x68, 0x07, 0xa0, 0xee, 0x17, 0x04, 0x4e, 0xf1, 0x24, 0x8f, 0xd5, - 0x95, 0xbe, 0xbf, 0xad, 0xa0, 0xb6, 0x08, 0x23, 0x62, 0x30, 0xe4, 0xe0, 0x88, 0x24, 0xf4, 0x1c, - 0x8c, 0xda, 0xbc, 0x5e, 0xf5, 0x0d, 0x18, 0xe4, 0x06, 0xdc, 0x27, 0xd8, 0x46, 0x71, 0x74, 0x12, - 0xc7, 0x69, 0xe5, 0xdf, 0x4a, 0xd1, 0x14, 0xe5, 0x7f, 0xbe, 0xe8, 0x52, 0xac, 0xac, 0x7a, 0x34, - 0x51, 0x56, 0x4d, 0x77, 0x72, 0x44, 0xaa, 0xaa, 0x0f, 0x60, 0x94, 0x6d, 0x6b, 0xd5, 0x68, 0x7a, - 0x4b, 0x29, 0x42, 0xe4, 0x52, 0x1f, 0x9f, 0x4e, 0x80, 0x11, 0x49, 0xb5, 0x13, 0xdc, 0xa6, 0xe8, - 0x24, 0x8e, 0xcb, 0x93, 0x3f, 0x93, 0x60, 0x7a, 0xa9, 0x76, 0xd5, 0x36, 0x5d, 0xcb, 0x57, 0xef, - 0x86, 0xe5, 0xf9, 0xea, 0x7f, 0x60, 0xc0, 0x76, 0x35, 0xdf, 0xae, 0x47, 0x7c, 0xbb, 0xb0, 0xab, - 0x31, 0xbb, 0x26, 0x13, 0x5c, 0x9e, 0x51, 0x8c, 0x01, 0xbd, 0x05, 0x27, 0x6d, 0xc5, 0x68, 0x12, - 0x3f, 0x09, 0x3f, 0xdd, 0xa3, 0x35, 0xcb, 0x8b, 0x98, 0xb1, 0x47, 0x4a, 0x41, 0x8e, 0x86, 0x05, - 0xaa, 0xfc, 0x3d, 0x09, 0xc6, 0xaf, 0xad, 0xad, 0x55, 0x97, 0x0d, 0xfe, 0x15, 0x57, 0x15, 0xba, - 0xc5, 0xea, 0x04, 0x4b, 0xa1, 0x5b, 0xc9, 0x3a, 0x81, 0xcd, 0x61, 0x3e, 0x83, 0xb6, 0x60, 0x90, - 0x45, 0x0f, 0x62, 0x34, 0xfa, 0x2c, 0xf1, 0x85, 0xb8, 0x8a, 0x07, 0x12, 0xd6, 0x9f, 0x62, 0x00, - 0xfb, 0xf0, 0xf2, 0xfb, 0x30, 0x15, 0x51, 0x8f, 0xf9, 0x8b, 0x5f, 0xda, 0xa0, 0x3a, 0x14, 0x98, - 0x26, 0xfe, 0x95, 0x4c, 0xaf, 0x37, 0x0c, 0x09, 0x93, 0xc3, 0x3a, 0x8a, 0xfd, 0x72, 0xb0, 0x87, - 0x2d, 0xff, 0x21, 0x07, 0x67, 0xae, 0x99, 0xb6, 0xfa, 0x9e, 0x69, 0x50, 0x45, 0xab, 0x9a, 0x8d, - 0x79, 0x97, 0x9a, 0x4e, 0x5d, 0xd1, 0x88, 0x7d, 0x84, 0x87, 0x27, 0x2d, 0x76, 0x78, 0x7a, 0xb9, - 0x57, 0xcb, 0xd2, 0xf5, 0xcd, 0x3c, 0x49, 0xd1, 0xc4, 0x49, 0x6a, 0xe5, 0x90, 0xe4, 0x75, 0x3f, - 0x56, 0xfd, 0x4d, 0x82, 0x07, 0x32, 0x38, 0x8f, 0xa1, 0xfe, 0xde, 0x8e, 0xd7, 0xdf, 0x4b, 0x87, - 0x63, 0x72, 0x46, 0x31, 0xfe, 0x8f, 0x5c, 0xa6, 0xa9, 0xbc, 0xfc, 0x7b, 0x07, 0x86, 0xf8, 0x2f, - 0x4c, 0x36, 0x85, 0xa9, 0x0b, 0x3d, 0xea, 0x53, 0x73, 0x37, 0xfc, 0xab, 0x4e, 0x4c, 0x36, 0x89, - 0x4d, 0x8c, 0x3a, 0x89, 0x94, 0x46, 0x02, 0x1c, 0x07, 0x62, 0xd0, 0x79, 0x18, 0xe1, 0xa5, 0x4e, - 0x2c, 0x7b, 0x8e, 0xef, 0xb5, 0x4b, 0x23, 0xab, 0xe1, 0x30, 0x8e, 0xd2, 0xa0, 0x8b, 0x30, 0xa2, - 0x2b, 0xbb, 0x89, 0xdc, 0x19, 0xdc, 0x5e, 0xac, 0x86, 0x53, 0x38, 0x4a, 0x87, 0x3e, 0x80, 0xb1, - 0xba, 0xe5, 0x46, 0x6e, 0xda, 0x45, 0xed, 0xd7, 0xab, 0x89, 0x69, 0x97, 0xf6, 0x15, 0xc4, 0xce, - 0x94, 0x0b, 0xd5, 0xf5, 0xc8, 0x18, 0x4e, 0x88, 0x93, 0x7f, 0x96, 0x87, 0x87, 0xba, 0x6e, 0x51, - 0xb4, 0xd4, 0xa5, 0x26, 0x99, 0xee, 0xa1, 0x1e, 0xa9, 0xc3, 0x28, 0x3b, 0x5b, 0x72, 0x77, 0xf3, - 0x83, 0x6b, 0xae, 0xe7, 0x83, 0x2b, 0x4f, 0x31, 0x2b, 0x51, 0x10, 0x1c, 0xc7, 0x64, 0x65, 0x8c, - 0xb8, 0x02, 0xcb, 0x2a, 0x63, 0x16, 0xe2, 0xd3, 0x38, 0x49, 0xcf, 0x20, 0xc4, 0x0d, 0x55, 0xa2, - 0x88, 0x09, 0x20, 0x16, 0xe3, 0xd3, 0x38, 0x49, 0x8f, 0x74, 0x28, 0x09, 0xd4, 0xb8, 0xf7, 0x23, - 0x8f, 0x27, 0x5e, 0x31, 0xf3, 0xc8, 0x5e, 0xbb, 0x54, 0x5a, 0xe8, 0x4e, 0x8a, 0xef, 0x85, 0x25, - 0xaf, 0xc2, 0xe8, 0x35, 0xd3, 0xa1, 0x55, 0xd3, 0xa6, 0x3c, 0x7b, 0xa1, 0x87, 0x20, 0xaf, 0xab, - 0x86, 0x38, 0x2c, 0x8d, 0x08, 0xb5, 0xf3, 0x6c, 0xef, 0xb2, 0x71, 0x3e, 0xad, 0xec, 0x8a, 0x6d, - 0x1d, 0x4e, 0x2b, 0xbb, 0x98, 0x8d, 0xcb, 0x57, 0x61, 0x50, 0x64, 0xc5, 0x28, 0x50, 0xbe, 0x3b, - 0x50, 0x3e, 0x05, 0xe8, 0x87, 0x39, 0x18, 0x14, 0x49, 0xe4, 0x08, 0xd3, 0xc1, 0x1b, 0xb1, 0x74, - 0x70, 0xa9, 0xbf, 0x44, 0x9b, 0x19, 0xfe, 0x1b, 0x89, 0xf0, 0xff, 0x7c, 0x9f, 0xf8, 0xdd, 0xc3, - 0xfd, 0xa7, 0x12, 0x8c, 0xc5, 0x53, 0x3e, 0x0b, 0x28, 0xec, 0x13, 0x52, 0xeb, 0xe4, 0x7a, 0x78, - 0x27, 0x11, 0x04, 0x94, 0x5a, 0x38, 0x85, 0xa3, 0x74, 0x88, 0x04, 0x6c, 0x6c, 0x3b, 0x08, 0xa7, - 0x94, 0x33, 0x94, 0x76, 0xa9, 0xaa, 0x95, 0xbd, 0x97, 0xc3, 0xf2, 0xb2, 0x41, 0x6f, 0xd8, 0x35, - 0x6a, 0xab, 0x46, 0xb3, 0x43, 0x0c, 0xdf, 0x59, 0x51, 0x5c, 0xf9, 0xb6, 0x04, 0x23, 0x42, 0xe1, - 0x63, 0xc8, 0x47, 0xaf, 0xc7, 0xf3, 0xd1, 0xd3, 0x7d, 0x16, 0x53, 0xe9, 0xf9, 0xe7, 0xf3, 0xd0, - 0x14, 0x56, 0x3e, 0xb1, 0xea, 0x6e, 0xcb, 0x74, 0x68, 0xb2, 0xba, 0x63, 0x5f, 0x18, 0xe6, 0x33, - 0xe8, 0x5b, 0x12, 0x9c, 0x56, 0x13, 0x05, 0x97, 0xf0, 0xf4, 0x8b, 0xfd, 0xa9, 0x16, 0xc0, 0x84, - 0xcf, 0xa9, 0xc9, 0x19, 0xdc, 0x21, 0x52, 0x76, 0xa1, 0x83, 0x0a, 0x29, 0x30, 0xb0, 0x45, 0xa9, - 0xd5, 0x67, 0xa6, 0x4c, 0x2b, 0x25, 0x2b, 0x43, 0xdc, 0xfc, 0xb5, 0xb5, 0x2a, 0xe6, 0xd0, 0xf2, - 0xa7, 0xb9, 0xc0, 0x61, 0x35, 0xef, 0x13, 0x09, 0x8a, 0x5d, 0xe9, 0x30, 0x8a, 0xdd, 0x91, 0xb4, - 0x42, 0x17, 0xbd, 0x0a, 0x79, 0xaa, 0xf5, 0x7b, 0x23, 0x28, 0x24, 0xac, 0xad, 0xd4, 0xc2, 0x30, - 0xb5, 0xb6, 0x52, 0xc3, 0x0c, 0x12, 0xbd, 0x0d, 0x05, 0x76, 0x94, 0x60, 0x5f, 0x78, 0xbe, 0xff, - 0x08, 0xc2, 0xfc, 0x15, 0xee, 0x30, 0xf6, 0xcb, 0xc1, 0x1e, 0xae, 0xfc, 0x3e, 0x8c, 0xc6, 0xc2, - 0x00, 0xba, 0x05, 0xa7, 0x34, 0x53, 0x69, 0x54, 0x14, 0x4d, 0x31, 0xea, 0xc4, 0x7f, 0xba, 0xfa, - 0xaf, 0xee, 0x01, 0x71, 0x25, 0xc2, 0x21, 0xc2, 0x49, 0xf0, 0xa4, 0x1d, 0x9d, 0xc3, 0x31, 0x6c, - 0x59, 0x01, 0x08, 0xad, 0x47, 0x25, 0x28, 0xb0, 0x2d, 0xec, 0x1d, 0x0b, 0x86, 0x2b, 0xc3, 0x4c, - 0x57, 0xb6, 0xb3, 0x1d, 0xec, 0x8d, 0xa3, 0x0b, 0x00, 0x0e, 0xa9, 0xdb, 0x84, 0xf2, 0xa8, 0xe3, - 0x5d, 0xbf, 0x07, 0xf1, 0xb7, 0x16, 0xcc, 0xe0, 0x08, 0x95, 0xfc, 0x6b, 0x09, 0x46, 0xaf, 0x13, - 0xfa, 0xae, 0x69, 0x6f, 0x57, 0x4d, 0x4d, 0xad, 0xb7, 0x8e, 0x30, 0xda, 0x6f, 0xc4, 0xa2, 0xfd, - 0x4b, 0x3d, 0xae, 0x55, 0x4c, 0xcb, 0xac, 0x98, 0x2f, 0xff, 0x55, 0x82, 0x62, 0x8c, 0x32, 0x1a, - 0x1e, 0x08, 0x14, 0x2c, 0xd3, 0xa6, 0xfe, 0xc1, 0xea, 0x40, 0x1a, 0xb0, 0x50, 0x1a, 0x39, 0x5a, - 0x31, 0x58, 0xec, 0xa1, 0x33, 0x3b, 0x37, 0x6d, 0x53, 0x17, 0xfb, 0xfd, 0x60, 0x52, 0x08, 0xb1, - 0x43, 0x3b, 0x97, 0x6c, 0x53, 0xc7, 0x1c, 0x5b, 0xfe, 0x9d, 0x04, 0x13, 0x31, 0xca, 0x63, 0x08, - 0xe5, 0x4a, 0x3c, 0x94, 0x3f, 0x7f, 0x10, 0xc3, 0x32, 0x02, 0xfa, 0xd7, 0x49, 0xb3, 0x98, 0x03, - 0xd0, 0x26, 0x8c, 0x58, 0x66, 0xa3, 0x76, 0x08, 0xaf, 0xc5, 0xfc, 0x20, 0x50, 0x0d, 0xb1, 0x70, - 0x14, 0x18, 0xed, 0xc2, 0x84, 0xa1, 0xe8, 0xc4, 0xb1, 0x94, 0x3a, 0xa9, 0x1d, 0xc2, 0x65, 0xf4, - 0x7d, 0x7b, 0xed, 0xd2, 0xc4, 0xf5, 0x24, 0x22, 0xee, 0x14, 0x22, 0xff, 0xa4, 0xc3, 0x6e, 0xd3, - 0xa6, 0xe8, 0x15, 0x18, 0xe2, 0xad, 0x40, 0x75, 0x53, 0x13, 0x29, 0xed, 0x22, 0x5b, 0x9a, 0xaa, - 0x18, 0xbb, 0xdb, 0x2e, 0xfd, 0x47, 0xd7, 0xb7, 0x34, 0x9f, 0x10, 0x07, 0x30, 0x68, 0x05, 0x06, - 0xac, 0xfe, 0x8b, 0x0b, 0x9e, 0x4e, 0x78, 0x45, 0xc1, 0x51, 0xe4, 0xbf, 0x27, 0xd5, 0xe6, 0x49, - 0xe5, 0xd6, 0xa1, 0x2d, 0x57, 0x50, 0xcc, 0x64, 0x2e, 0x99, 0x0d, 0x83, 0x22, 0xb7, 0x8a, 0x5d, - 0x79, 0xf5, 0x20, 0xbb, 0x32, 0x9a, 0x0f, 0x82, 0x7b, 0x1b, 0x7f, 0xd0, 0x17, 0x24, 0xff, 0x5e, - 0x82, 0x09, 0xae, 0x50, 0xdd, 0xb5, 0x55, 0xda, 0x3a, 0xf2, 0xb8, 0xb9, 0x19, 0x8b, 0x9b, 0x8b, - 0x3d, 0x1a, 0xd8, 0xa1, 0x69, 0x66, 0xec, 0xfc, 0x52, 0x82, 0xfb, 0x3a, 0xa8, 0x8f, 0x21, 0xae, - 0x90, 0x78, 0x5c, 0x79, 0xe9, 0xa0, 0x06, 0x66, 0xc4, 0x96, 0xdb, 0x90, 0x62, 0x1e, 0xdf, 0xb0, - 0x17, 0x00, 0x2c, 0x5b, 0xdd, 0x51, 0x35, 0xd2, 0x14, 0xed, 0x1a, 0x43, 0xe1, 0x92, 0x54, 0x83, - 0x19, 0x1c, 0xa1, 0x42, 0xdf, 0x80, 0xe9, 0x06, 0xd9, 0x54, 0x5c, 0x8d, 0xce, 0x37, 0x1a, 0x0b, - 0x8a, 0xa5, 0x6c, 0xa8, 0x9a, 0x4a, 0x55, 0x71, 0x99, 0x39, 0x5c, 0xb9, 0xe2, 0xb5, 0x51, 0xa4, - 0x51, 0xdc, 0x6d, 0x97, 0x1e, 0xeb, 0xfe, 0x06, 0xee, 0x13, 0xb7, 0x70, 0x86, 0x10, 0xf4, 0x4d, - 0x09, 0x8a, 0x36, 0x79, 0xc7, 0x65, 0x67, 0xd7, 0x45, 0xdb, 0xb4, 0x62, 0x1a, 0xe4, 0xb9, 0x06, - 0x57, 0xf7, 0xda, 0xa5, 0x22, 0xce, 0xa0, 0xe9, 0x45, 0x87, 0x4c, 0x41, 0x88, 0xc2, 0xa4, 0xa2, - 0x69, 0xe6, 0xbb, 0x24, 0xee, 0x81, 0x01, 0x2e, 0xbf, 0xb2, 0xd7, 0x2e, 0x4d, 0xce, 0x77, 0x4e, - 0xf7, 0x22, 0x3a, 0x0d, 0x1e, 0xcd, 0xc1, 0xe0, 0x8e, 0xa9, 0xb9, 0x3a, 0x71, 0x8a, 0x05, 0x2e, - 0x89, 0xc5, 0xd9, 0xc1, 0x9b, 0xde, 0xd0, 0xdd, 0x76, 0xe9, 0xe4, 0x52, 0x8d, 0xdf, 0x32, 0xfb, - 0x54, 0xec, 0x3c, 0xc6, 0x2a, 0x24, 0xf1, 0xa9, 0xf3, 0x27, 0xae, 0xa1, 0x30, 0xb6, 0x5c, 0x0b, - 0xa7, 0x70, 0x94, 0x0e, 0xe9, 0x30, 0xbc, 0x25, 0xce, 0xe6, 0x4e, 0x71, 0xb0, 0xaf, 0x9c, 0x17, - 0x3b, 0xdb, 0x57, 0x26, 0x84, 0xc8, 0x61, 0x7f, 0xd8, 0xc1, 0xa1, 0x04, 0xf4, 0x38, 0x0c, 0xf2, - 0x1f, 0xcb, 0x8b, 0xfc, 0x61, 0x6c, 0x28, 0x8c, 0x40, 0xd7, 0xbc, 0x61, 0xec, 0xcf, 0xfb, 0xa4, - 0xcb, 0xd5, 0x05, 0xfe, 0x8e, 0x95, 0x20, 0x5d, 0xae, 0x2e, 0x60, 0x7f, 0x1e, 0x59, 0x30, 0xe8, - 0x90, 0x15, 0xd5, 0x70, 0x77, 0x8b, 0xc0, 0xbf, 0xdc, 0x2b, 0xbd, 0xde, 0xc0, 0x5d, 0xe1, 0xdc, - 0x89, 0x5b, 0xff, 0x50, 0xa2, 0x98, 0xc7, 0xbe, 0x18, 0xb4, 0x0b, 0xc3, 0xb6, 0x6b, 0xcc, 0x3b, - 0xeb, 0x0e, 0xb1, 0x8b, 0x23, 0x5c, 0x66, 0xaf, 0x41, 0x19, 0xfb, 0xfc, 0x49, 0xa9, 0x81, 0x07, - 0x03, 0x0a, 0x1c, 0x0a, 0x43, 0x9f, 0x48, 0x80, 0x1c, 0xd7, 0xb2, 0x34, 0xa2, 0x13, 0x83, 0x2a, - 0x1a, 0x7f, 0x78, 0x70, 0x8a, 0xa7, 0xb8, 0x0e, 0xd5, 0x9e, 0x6f, 0x1e, 0x93, 0x40, 0x49, 0x65, - 0x82, 0x57, 0xbd, 0x4e, 0x52, 0x9c, 0xa2, 0x07, 0x5b, 0x8a, 0x4d, 0x87, 0xff, 0x5d, 0x1c, 0xed, - 0x6b, 0x29, 0xd2, 0x1f, 0x60, 0xc2, 0xa5, 0x10, 0xf3, 0xd8, 0x17, 0x83, 0x6e, 0xc2, 0xb4, 0x4d, - 0x94, 0xc6, 0x0d, 0x43, 0x6b, 0x61, 0xd3, 0xa4, 0x4b, 0xaa, 0x46, 0x9c, 0x96, 0x43, 0x89, 0x5e, - 0x1c, 0xe3, 0xdb, 0x26, 0xe8, 0xf7, 0xc2, 0xa9, 0x54, 0x38, 0x83, 0x9b, 0x37, 0x5b, 0x89, 0x1b, - 0xb3, 0xa3, 0xed, 0xe6, 0x3c, 0x58, 0xb3, 0x55, 0xa8, 0xe2, 0x91, 0x35, 0x5b, 0x45, 0x44, 0x74, - 0xbf, 0x26, 0xfa, 0x3a, 0x07, 0x93, 0x21, 0xf1, 0xbe, 0x9b, 0xad, 0x52, 0x58, 0x8e, 0xa1, 0xd9, - 0x2a, 0xbd, 0x5b, 0x29, 0x7f, 0xd4, 0xdd, 0x4a, 0x47, 0xd0, 0xe4, 0xc5, 0x1b, 0xa0, 0x42, 0x27, - 0xfe, 0xeb, 0x37, 0x40, 0x85, 0xba, 0x66, 0x94, 0x31, 0x3f, 0xcd, 0x45, 0x0d, 0xfa, 0x37, 0xea, - 0xb2, 0x49, 0x69, 0x7a, 0x19, 0xe8, 0xad, 0xe9, 0x45, 0xfe, 0x32, 0x0f, 0xa7, 0x93, 0x5f, 0x6c, - 0xac, 0xd9, 0x42, 0xba, 0x67, 0xb3, 0x45, 0x15, 0xa6, 0x36, 0x5d, 0x4d, 0x6b, 0x71, 0x87, 0x44, - 0xde, 0x19, 0xbc, 0x1b, 0xf9, 0x07, 0x05, 0xe7, 0xd4, 0x52, 0x0a, 0x0d, 0x4e, 0xe5, 0xcc, 0x68, - 0x1c, 0xc9, 0xf7, 0xd5, 0x38, 0xd2, 0xd1, 0xb7, 0x30, 0xb0, 0xff, 0xbe, 0x85, 0xf4, 0x26, 0x90, - 0x42, 0x1f, 0x4d, 0x20, 0x87, 0xd1, 0xb5, 0x91, 0x12, 0xf8, 0xee, 0xd5, 0xb5, 0x21, 0x3f, 0x08, - 0x33, 0x82, 0x8d, 0xfd, 0x5e, 0x30, 0x0d, 0x6a, 0x9b, 0x9a, 0x46, 0xec, 0x45, 0x57, 0xd7, 0x5b, - 0xf2, 0x65, 0x18, 0x8b, 0xb7, 0x0e, 0x79, 0x2b, 0xef, 0x75, 0x33, 0x89, 0x77, 0x92, 0xc8, 0xca, - 0x7b, 0xe3, 0x38, 0xa0, 0x90, 0xff, 0x24, 0xc1, 0x99, 0x8c, 0x06, 0x0a, 0x74, 0x0b, 0xc6, 0x74, - 0x65, 0x37, 0xd2, 0xd6, 0x92, 0x0c, 0x2c, 0xfb, 0x3c, 0x60, 0xf3, 0x67, 0xbf, 0xd5, 0x18, 0x12, - 0x4e, 0x20, 0xf3, 0x6c, 0xab, 0xec, 0xd6, 0x5c, 0xbb, 0x49, 0xfa, 0x3c, 0xc6, 0xf3, 0xcf, 0x77, - 0x55, 0x60, 0xe0, 0x00, 0x4d, 0xfe, 0x4c, 0x82, 0x62, 0x56, 0xe9, 0x85, 0x2e, 0xc6, 0xda, 0x3c, - 0x1e, 0x4e, 0xb4, 0x79, 0x4c, 0x74, 0xf0, 0x1d, 0x53, 0x93, 0xc7, 0xe7, 0x12, 0x4c, 0xa7, 0x97, - 0xa8, 0xe8, 0xa9, 0x98, 0xc6, 0xa5, 0x84, 0xc6, 0xe3, 0x09, 0x2e, 0xa1, 0xef, 0x16, 0x8c, 0x89, - 0x42, 0x56, 0xc0, 0xec, 0xe3, 0x9f, 0x71, 0x76, 0x82, 0x2a, 0xd9, 0x2f, 0xc9, 0xf8, 0x3a, 0xc6, - 0xc7, 0x70, 0x02, 0x57, 0xfe, 0x7e, 0x0e, 0x0a, 0xfc, 0xf5, 0xf3, 0x08, 0xeb, 0xa7, 0xd7, 0x62, - 0xf5, 0x53, 0xaf, 0xff, 0xd4, 0xc1, 0xb5, 0xcb, 0x2c, 0x9d, 0x36, 0x12, 0xa5, 0xd3, 0xa5, 0xbe, - 0xd0, 0xbb, 0x57, 0x4d, 0xcf, 0xc2, 0x70, 0xa0, 0x44, 0x6f, 0x81, 0x9a, 0xd5, 0xa8, 0x23, 0x11, - 0x11, 0x3d, 0x86, 0xf9, 0x9d, 0x58, 0xa2, 0xec, 0xe7, 0xbf, 0xc6, 0x22, 0xb2, 0xcb, 0x7e, 0xaa, - 0xf4, 0x3a, 0x82, 0xc3, 0xf6, 0x85, 0xce, 0x0c, 0x7a, 0x19, 0xc6, 0xbc, 0x7f, 0xbd, 0x0b, 0xae, - 0xcf, 0xf2, 0x7c, 0xf7, 0x06, 0x7d, 0xe6, 0x6b, 0xb1, 0x59, 0x9c, 0xa0, 0x9e, 0x79, 0x0e, 0x46, - 0x63, 0xc2, 0x7a, 0x6a, 0xe0, 0xfd, 0xb9, 0x04, 0x53, 0x69, 0x0d, 0x17, 0xe8, 0x2c, 0x0c, 0x6c, - 0xab, 0xe2, 0x8d, 0x28, 0xf2, 0xae, 0xf6, 0xbf, 0xaa, 0xd1, 0xc0, 0x7c, 0x26, 0xe8, 0xbf, 0xce, - 0x65, 0xf6, 0x5f, 0x5f, 0x00, 0x50, 0x2c, 0x55, 0xfc, 0x3b, 0xa3, 0xb0, 0x2a, 0xd8, 0xbc, 0xe1, - 0x3f, 0x3a, 0xe2, 0x08, 0x15, 0x7f, 0x48, 0x0d, 0xf5, 0x11, 0x45, 0x61, 0xf8, 0xc2, 0x19, 0x51, - 0x35, 0x4a, 0x27, 0xff, 0x42, 0x82, 0x87, 0xef, 0x79, 0x7c, 0x43, 0x95, 0x58, 0x78, 0x28, 0x27, - 0xc2, 0xc3, 0x6c, 0x36, 0xc0, 0x31, 0xb6, 0xb0, 0x7d, 0x94, 0x03, 0xb4, 0xb6, 0xa5, 0xda, 0x8d, - 0xaa, 0x62, 0xd3, 0x16, 0x16, 0x06, 0x1e, 0x61, 0xc0, 0xb8, 0x08, 0x23, 0x0d, 0xe2, 0xd4, 0x6d, - 0x95, 0x3b, 0x49, 0x2c, 0x67, 0xe0, 0xf1, 0xc5, 0x70, 0x0a, 0x47, 0xe9, 0x50, 0x13, 0x86, 0x76, - 0xbc, 0x35, 0xf3, 0x9f, 0xe2, 0x7a, 0xad, 0x7b, 0xc3, 0x1d, 0x10, 0x7e, 0x1f, 0x62, 0xc0, 0xc1, - 0x01, 0xb8, 0xfc, 0xb1, 0x04, 0xd3, 0x9d, 0x0e, 0x59, 0x64, 0xaa, 0x1f, 0x9d, 0x53, 0x1e, 0x84, - 0x01, 0x8e, 0xca, 0xbc, 0x71, 0xca, 0xbb, 0x04, 0x67, 0x12, 0x31, 0x1f, 0x95, 0xbf, 0x92, 0x60, - 0x26, 0x5d, 0xa5, 0x63, 0x38, 0x6d, 0xdc, 0x8a, 0x9f, 0x36, 0x7a, 0xbd, 0x51, 0x48, 0xd7, 0x3b, - 0xe3, 0xe4, 0xd1, 0x4e, 0xf5, 0xfd, 0x31, 0x18, 0xb9, 0x19, 0x37, 0x72, 0xfe, 0xc0, 0x46, 0xa6, - 0x1b, 0x58, 0x79, 0xfc, 0xf6, 0x9d, 0xd9, 0x13, 0x5f, 0xdc, 0x99, 0x3d, 0xf1, 0xc7, 0x3b, 0xb3, - 0x27, 0x3e, 0xdc, 0x9b, 0x95, 0x6e, 0xef, 0xcd, 0x4a, 0x5f, 0xec, 0xcd, 0x4a, 0x7f, 0xde, 0x9b, - 0x95, 0x3e, 0xfe, 0xcb, 0xec, 0x89, 0xd7, 0x06, 0x05, 0xe6, 0x3f, 0x03, 0x00, 0x00, 0xff, 0xff, - 0x09, 0x2f, 0xde, 0x45, 0x6e, 0x3f, 0x00, 0x00, + // 3580 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe4, 0x5b, 0x4f, 0x6c, 0x1b, 0xc7, + 0xd5, 0xf7, 0x92, 0xa2, 0x45, 0x3d, 0x59, 0x92, 0x35, 0x52, 0x64, 0x46, 0x49, 0x44, 0x67, 0x83, + 0x2f, 0x71, 0x3e, 0x24, 0xd4, 0x67, 0xe7, 0x73, 0xbe, 0xc4, 0x49, 0x9c, 0x88, 0x92, 0x65, 0x2b, + 0x9f, 0x64, 0x33, 0x43, 0xc9, 0x4d, 0xf3, 0xb7, 0x2b, 0x72, 0x44, 0xad, 0xb5, 0xff, 0xb2, 0x3b, + 0xab, 0x88, 0x09, 0x8a, 0x04, 0x28, 0x7a, 0x6d, 0x73, 0x6a, 0x73, 0x48, 0x8f, 0x3d, 0xf4, 0x92, + 0x36, 0x40, 0x8b, 0xb4, 0xc7, 0x1e, 0x8a, 0x1a, 0x68, 0x51, 0xa4, 0x40, 0x0b, 0xf4, 0x90, 0x2a, + 0xb5, 0x8a, 0x06, 0xbd, 0x17, 0xb9, 0xb8, 0x97, 0x62, 0x66, 0x67, 0xff, 0x72, 0x57, 0x16, 0x29, + 0x99, 0x28, 0xd0, 0x1b, 0x77, 0xe6, 0xbd, 0xdf, 0xfb, 0x33, 0x33, 0x6f, 0xde, 0xcc, 0x3c, 0xc2, + 0x73, 0x5b, 0x4f, 0x39, 0x15, 0xd5, 0x9c, 0xdd, 0x72, 0xd7, 0x89, 0x6d, 0x10, 0x4a, 0x9c, 0x59, + 0x6b, 0xab, 0x35, 0xab, 0x58, 0xaa, 0x33, 0x4b, 0x76, 0x28, 0x31, 0x1c, 0xd5, 0x34, 0x9c, 0xd9, + 0xed, 0xb3, 0xeb, 0x84, 0x2a, 0x67, 0x67, 0x5b, 0xc4, 0x20, 0xb6, 0x42, 0x49, 0xb3, 0x62, 0xd9, + 0x26, 0x35, 0xd1, 0xe3, 0x1e, 0x7b, 0x25, 0x64, 0xaf, 0x58, 0x5b, 0xad, 0x0a, 0x63, 0xaf, 0x84, + 0xec, 0x15, 0xc1, 0x3e, 0xfd, 0x78, 0x4b, 0xa5, 0x9b, 0xee, 0x7a, 0xa5, 0x61, 0xea, 0xb3, 0x2d, + 0xb3, 0x65, 0xce, 0x72, 0x94, 0x75, 0x77, 0x83, 0x7f, 0xf1, 0x0f, 0xfe, 0xcb, 0x43, 0x9f, 0xfe, + 0x5f, 0xa1, 0x9c, 0x62, 0xa9, 0xba, 0xd2, 0xd8, 0x54, 0x0d, 0x62, 0xb7, 0x43, 0xf5, 0x74, 0x42, + 0x95, 0xd9, 0xed, 0x0e, 0x9d, 0xa6, 0x67, 0xb3, 0xb8, 0x6c, 0xd7, 0xa0, 0xaa, 0x4e, 0x3a, 0x18, + 0x9e, 0xbc, 0x13, 0x83, 0xd3, 0xd8, 0x24, 0xba, 0xd2, 0xc1, 0x77, 0x2e, 0xd3, 0x77, 0xb3, 0x36, + 0x71, 0x4c, 0xd7, 0x6e, 0x74, 0xca, 0x7a, 0x2c, 0x9b, 0x27, 0xc5, 0x94, 0xb3, 0xe9, 0xd4, 0x2e, + 0x55, 0xb5, 0x59, 0xd5, 0xa0, 0x0e, 0xb5, 0x93, 0x2c, 0x72, 0x05, 0x60, 0xae, 0xb6, 0x74, 0x9d, + 0xd8, 0xcc, 0xf3, 0xe8, 0x34, 0x0c, 0x18, 0x8a, 0x4e, 0x4a, 0xd2, 0x69, 0xe9, 0xcc, 0x50, 0xf5, + 0xc4, 0xcd, 0xdd, 0xf2, 0xb1, 0xbd, 0xdd, 0xf2, 0xc0, 0x55, 0x45, 0x27, 0x98, 0xf7, 0xc8, 0xaf, + 0xc1, 0xe4, 0x7c, 0x6d, 0x6d, 0x55, 0xb1, 0x5b, 0x84, 0xae, 0x51, 0x55, 0x53, 0xdf, 0x51, 0x28, + 0xe3, 0x5c, 0x80, 0x93, 0x94, 0x37, 0xd6, 0x88, 0xdd, 0x20, 0x06, 0x55, 0x5a, 0x1e, 0x4a, 0xa1, + 0x5a, 0x12, 0x28, 0x27, 0x57, 0x13, 0xfd, 0xb8, 0x83, 0x43, 0xfe, 0xbe, 0x04, 0xf7, 0xce, 0xbb, + 0x0e, 0x35, 0xf5, 0x15, 0x42, 0x6d, 0xb5, 0x31, 0xef, 0xda, 0x36, 0x31, 0x68, 0x9d, 0x2a, 0xd4, + 0x75, 0xee, 0xac, 0x1d, 0x7a, 0x19, 0x0a, 0xdb, 0x8a, 0xe6, 0x92, 0x52, 0xee, 0xb4, 0x74, 0x66, + 0xf8, 0xdc, 0x63, 0x95, 0xcc, 0xf9, 0x56, 0xf1, 0x5d, 0x5e, 0x79, 0xc9, 0x55, 0x0c, 0xaa, 0xd2, + 0x76, 0x75, 0x52, 0x00, 0x9e, 0x10, 0x52, 0xaf, 0x33, 0x24, 0xec, 0x01, 0xca, 0xdf, 0x91, 0xe0, + 0x81, 0x4c, 0xcd, 0x96, 0x55, 0x87, 0x22, 0x1d, 0x0a, 0x2a, 0x25, 0xba, 0x53, 0x92, 0x4e, 0xe7, + 0xcf, 0x0c, 0x9f, 0xbb, 0x52, 0xe9, 0x6a, 0xae, 0x57, 0x32, 0xc1, 0xab, 0x23, 0x42, 0xaf, 0xc2, + 0x12, 0x83, 0xc7, 0x9e, 0x14, 0xf9, 0xbb, 0x12, 0xa0, 0x28, 0x8f, 0xe7, 0xdd, 0x03, 0xf8, 0xe8, + 0x6b, 0x87, 0xf1, 0xd1, 0x84, 0x00, 0x1c, 0xf6, 0xc4, 0xc5, 0x5c, 0xf4, 0xbe, 0x04, 0x53, 0x9d, + 0x1a, 0x71, 0xdf, 0x6c, 0xc4, 0x7d, 0x33, 0x77, 0x08, 0xdf, 0x78, 0xa8, 0x19, 0x4e, 0xf9, 0x59, + 0x0e, 0x86, 0x16, 0x14, 0xa2, 0x9b, 0x46, 0x9d, 0x50, 0xf4, 0x0d, 0x28, 0xb2, 0x45, 0xdf, 0x54, + 0xa8, 0xc2, 0xfd, 0x31, 0x7c, 0xee, 0x7f, 0x7c, 0xc1, 0xd1, 0xb5, 0x1b, 0x8a, 0x66, 0xd4, 0x95, + 0xed, 0xb3, 0x95, 0x6b, 0xeb, 0x37, 0x48, 0x83, 0xae, 0x10, 0xaa, 0x54, 0x91, 0x90, 0x03, 0x61, + 0x1b, 0x0e, 0x50, 0xd1, 0x1b, 0x30, 0xe0, 0x58, 0xa4, 0x21, 0x5c, 0xf9, 0x6c, 0x97, 0x66, 0x05, + 0x9a, 0xd6, 0x2d, 0xd2, 0x08, 0xc7, 0x8a, 0x7d, 0x61, 0x8e, 0x8b, 0x36, 0xe0, 0xb8, 0xc3, 0x27, + 0x41, 0x29, 0xcf, 0x25, 0x5c, 0xec, 0x59, 0x82, 0x37, 0x95, 0x46, 0x85, 0x8c, 0xe3, 0xde, 0x37, + 0x16, 0xe8, 0xf2, 0x6f, 0x25, 0x18, 0x09, 0x68, 0xf9, 0x88, 0xbd, 0xd6, 0xe1, 0xbb, 0xca, 0xc1, + 0x7c, 0xc7, 0xb8, 0xb9, 0xe7, 0x4e, 0x0a, 0x59, 0x45, 0xbf, 0x25, 0xe2, 0xb7, 0xd7, 0xfd, 0xf9, + 0x90, 0xe3, 0xf3, 0xe1, 0xa9, 0x5e, 0xcd, 0xca, 0x98, 0x06, 0xbf, 0x89, 0x9a, 0xc3, 0xdc, 0x89, + 0x5e, 0x87, 0xa2, 0x43, 0x34, 0xd2, 0xa0, 0xa6, 0x2d, 0xcc, 0x79, 0xe2, 0x80, 0xe6, 0x28, 0xeb, + 0x44, 0xab, 0x0b, 0xd6, 0xea, 0x09, 0x66, 0x8f, 0xff, 0x85, 0x03, 0x48, 0xf4, 0x2a, 0x14, 0x29, + 0xd1, 0x2d, 0x4d, 0xa1, 0xfe, 0xb2, 0x7a, 0x7c, 0x9f, 0x65, 0xb5, 0x7d, 0xb6, 0x52, 0x33, 0x9b, + 0xab, 0x82, 0x81, 0x0f, 0x7e, 0xe0, 0x2c, 0xbf, 0x15, 0x07, 0x80, 0xf2, 0x07, 0x79, 0x18, 0x4b, + 0x0c, 0x24, 0xba, 0x0e, 0x53, 0x0d, 0x2f, 0x48, 0x5c, 0x75, 0xf5, 0x75, 0x62, 0xd7, 0x1b, 0x9b, + 0xa4, 0xe9, 0x6a, 0xa4, 0x29, 0x82, 0xee, 0x8c, 0xc0, 0x9b, 0x9a, 0x4f, 0xa5, 0xc2, 0x19, 0xdc, + 0xe8, 0x45, 0x40, 0x06, 0x6f, 0x5a, 0x51, 0x1d, 0x27, 0xc0, 0xcc, 0x71, 0xcc, 0x69, 0x81, 0x89, + 0xae, 0x76, 0x50, 0xe0, 0x14, 0x2e, 0xa6, 0x63, 0x93, 0x38, 0xaa, 0x4d, 0x9a, 0x49, 0x1d, 0xf3, + 0x71, 0x1d, 0x17, 0x52, 0xa9, 0x70, 0x06, 0x37, 0x3a, 0x0f, 0xc3, 0x9e, 0x34, 0x4c, 0x94, 0x66, + 0xbb, 0x34, 0xc0, 0xc1, 0x82, 0xc0, 0x74, 0x35, 0xec, 0xc2, 0x51, 0x3a, 0x66, 0x9a, 0xb9, 0xee, + 0x10, 0x7b, 0x9b, 0x34, 0x2f, 0x7b, 0x9b, 0xa0, 0x6a, 0x1a, 0xa5, 0xc2, 0x69, 0xe9, 0x4c, 0x3e, + 0x34, 0xed, 0x5a, 0x07, 0x05, 0x4e, 0xe1, 0x92, 0x7f, 0x9e, 0x03, 0x58, 0x20, 0x96, 0x66, 0xb6, + 0x75, 0x62, 0xf4, 0x23, 0xd0, 0xbc, 0x19, 0x0b, 0x34, 0xcf, 0x75, 0xbb, 0x5e, 0x02, 0x55, 0x33, + 0x23, 0x4d, 0x2b, 0x11, 0x69, 0x9e, 0xef, 0x5d, 0xc4, 0xfe, 0xa1, 0xe6, 0x56, 0x1e, 0x26, 0x42, + 0xe2, 0x79, 0xd3, 0x68, 0xaa, 0x3c, 0x81, 0x78, 0x06, 0x06, 0x68, 0xdb, 0xf2, 0x37, 0xae, 0x47, + 0x7c, 0x15, 0x57, 0xdb, 0x16, 0xb9, 0xbd, 0x5b, 0x3e, 0x95, 0xc2, 0xc2, 0xba, 0x30, 0x67, 0x42, + 0xd7, 0x03, 0xed, 0x73, 0x9c, 0xfd, 0x62, 0x5c, 0xf8, 0xed, 0xdd, 0xf2, 0xbe, 0x89, 0x54, 0x25, + 0xc0, 0x8c, 0x2b, 0x8b, 0x1e, 0x86, 0xe3, 0x36, 0x51, 0x1c, 0xd3, 0xe0, 0xb3, 0x6c, 0x28, 0x34, + 0x0a, 0xf3, 0x56, 0x2c, 0x7a, 0xd1, 0xa3, 0x30, 0xa8, 0x13, 0xc7, 0x61, 0x49, 0x4f, 0x81, 0x13, + 0x8e, 0x09, 0xc2, 0xc1, 0x15, 0xaf, 0x19, 0xfb, 0xfd, 0xe8, 0x06, 0x8c, 0x6a, 0x8a, 0x43, 0xd7, + 0xac, 0xa6, 0x42, 0xc9, 0xaa, 0xaa, 0x93, 0xd2, 0x71, 0xee, 0xf0, 0xff, 0x3e, 0xd8, 0x8c, 0x61, + 0x1c, 0xd5, 0x29, 0x81, 0x3e, 0xba, 0x1c, 0x43, 0xc2, 0x09, 0x64, 0xb4, 0x0d, 0x88, 0xb5, 0xac, + 0xda, 0x8a, 0xe1, 0x78, 0x2e, 0x63, 0xf2, 0x06, 0xbb, 0x96, 0x17, 0x2c, 0x8f, 0xe5, 0x0e, 0x34, + 0x9c, 0x22, 0x41, 0xfe, 0x9d, 0x04, 0xa3, 0xe1, 0x80, 0xf5, 0x61, 0x3f, 0x79, 0x23, 0xbe, 0x9f, + 0x3c, 0xdd, 0xf3, 0xe4, 0xcd, 0xd8, 0x50, 0x3e, 0xcc, 0x03, 0x0a, 0x89, 0xb0, 0xa9, 0x69, 0xeb, + 0x4a, 0x63, 0xeb, 0x00, 0xc9, 0xd6, 0x0f, 0x25, 0x40, 0x2e, 0x1f, 0x90, 0xe6, 0x9c, 0x61, 0x98, + 0x94, 0x87, 0x0f, 0x5f, 0xcd, 0xaf, 0xf7, 0xac, 0xa6, 0xaf, 0x41, 0x65, 0xad, 0x03, 0xfb, 0x92, + 0x41, 0xed, 0x76, 0x38, 0x62, 0x9d, 0x04, 0x38, 0x45, 0x21, 0xf4, 0x16, 0x80, 0x2d, 0x30, 0x57, + 0x4d, 0x11, 0x02, 0xba, 0x8d, 0x32, 0xbe, 0x52, 0xf3, 0xa6, 0xb1, 0xa1, 0xb6, 0xc2, 0x80, 0x86, + 0x03, 0x60, 0x1c, 0x11, 0x32, 0x7d, 0x09, 0x4e, 0x65, 0x68, 0x8f, 0x4e, 0x42, 0x7e, 0x8b, 0xb4, + 0x3d, 0xb7, 0x62, 0xf6, 0x13, 0x4d, 0x46, 0x93, 0xd6, 0x21, 0x91, 0x71, 0x5e, 0xc8, 0x3d, 0x25, + 0xc9, 0x5f, 0x16, 0xa2, 0x73, 0x8d, 0x6f, 0xf6, 0x67, 0xa0, 0x68, 0x13, 0x4b, 0x53, 0x1b, 0x8a, + 0x23, 0xb6, 0x43, 0xbe, 0x6f, 0x63, 0xd1, 0x86, 0x83, 0xde, 0x58, 0x5a, 0x90, 0xbb, 0xbb, 0x69, + 0x41, 0xfe, 0x88, 0xd3, 0x02, 0x64, 0x42, 0xd1, 0xa1, 0xec, 0x28, 0xd7, 0xf2, 0xf6, 0xc0, 0xee, + 0xd3, 0xea, 0x68, 0xcc, 0xf6, 0x80, 0x42, 0x81, 0x7e, 0x0b, 0x0e, 0x84, 0xa0, 0x39, 0x18, 0xd3, + 0x55, 0x83, 0x6f, 0xa6, 0x75, 0xd2, 0x30, 0x8d, 0xa6, 0xc3, 0x83, 0x5d, 0xa1, 0x7a, 0x4a, 0x30, + 0x8d, 0xad, 0xc4, 0xbb, 0x71, 0x92, 0x1e, 0x2d, 0xc3, 0xa4, 0x4d, 0xb6, 0x55, 0xa6, 0xc6, 0x15, + 0xd5, 0xa1, 0xa6, 0xdd, 0x5e, 0x56, 0x75, 0x95, 0xf2, 0x10, 0x58, 0xa8, 0x96, 0xf6, 0x76, 0xcb, + 0x93, 0x38, 0xa5, 0x1f, 0xa7, 0x72, 0xb1, 0xe8, 0x6c, 0x29, 0xae, 0x43, 0x9a, 0x3c, 0xa4, 0x15, + 0xc3, 0xe8, 0x5c, 0xe3, 0xad, 0x58, 0xf4, 0x22, 0x3d, 0x36, 0xb9, 0x8b, 0x47, 0x31, 0xb9, 0x47, + 0xb3, 0x27, 0x36, 0x5a, 0x83, 0x53, 0x96, 0x6d, 0xb6, 0x6c, 0xe2, 0x38, 0x0b, 0x44, 0x69, 0x6a, + 0xaa, 0x41, 0x7c, 0x7f, 0x0d, 0x71, 0x3b, 0xef, 0xdb, 0xdb, 0x2d, 0x9f, 0xaa, 0xa5, 0x93, 0xe0, + 0x2c, 0x5e, 0xf9, 0xa3, 0x01, 0x38, 0x99, 0xdc, 0x65, 0x33, 0x92, 0x1a, 0xa9, 0x97, 0xa4, 0x06, + 0x3d, 0x16, 0x59, 0x36, 0x5e, 0xc6, 0x17, 0xcc, 0x86, 0x94, 0xa5, 0x33, 0x07, 0x63, 0x22, 0x8e, + 0xf8, 0x9d, 0x22, 0xad, 0x0b, 0x66, 0xc3, 0x5a, 0xbc, 0x1b, 0x27, 0xe9, 0xd1, 0x65, 0x18, 0x57, + 0xb6, 0x15, 0x55, 0x53, 0xd6, 0x35, 0x12, 0x80, 0x78, 0xe9, 0xdc, 0xbd, 0x02, 0x64, 0x7c, 0x2e, + 0x49, 0x80, 0x3b, 0x79, 0xd0, 0x0a, 0x4c, 0xb8, 0x46, 0x27, 0x94, 0x37, 0x3b, 0xef, 0x13, 0x50, + 0x13, 0x6b, 0x9d, 0x24, 0x38, 0x8d, 0x0f, 0x6d, 0x03, 0x34, 0xfc, 0x84, 0xc0, 0x29, 0x1d, 0xe7, + 0xb1, 0xba, 0xda, 0xf3, 0xda, 0x0a, 0x72, 0x8b, 0x30, 0x22, 0x06, 0x4d, 0x0e, 0x8e, 0x48, 0x42, + 0xcf, 0xc0, 0x88, 0xcd, 0xf3, 0x56, 0xdf, 0x80, 0x41, 0x6e, 0xc0, 0x3d, 0x82, 0x6d, 0x04, 0x47, + 0x3b, 0x71, 0x9c, 0x56, 0xfe, 0xbd, 0x14, 0xdd, 0xa2, 0xfc, 0xe5, 0x8b, 0x2e, 0xc4, 0xd2, 0xaa, + 0x87, 0x13, 0x69, 0xd5, 0x54, 0x27, 0x47, 0x24, 0xab, 0x7a, 0x0f, 0x46, 0xd8, 0xb4, 0x56, 0x8d, + 0x96, 0x37, 0x94, 0x22, 0x44, 0x2e, 0xf6, 0xb0, 0x74, 0x02, 0x8c, 0xc8, 0x56, 0x3b, 0xce, 0x6d, + 0x8a, 0x76, 0xe2, 0xb8, 0x3c, 0xf9, 0x13, 0x09, 0xa6, 0x16, 0xeb, 0x97, 0x6d, 0xd3, 0xb5, 0x7c, + 0xf5, 0xae, 0x59, 0x9e, 0xaf, 0xfe, 0x0f, 0x06, 0x6c, 0x57, 0xf3, 0xed, 0x7a, 0xc8, 0xb7, 0x0b, + 0xbb, 0x1a, 0xb3, 0x6b, 0x22, 0xc1, 0xe5, 0x19, 0xc5, 0x18, 0xd0, 0x1b, 0x70, 0xdc, 0x56, 0x8c, + 0x16, 0xf1, 0x37, 0xe1, 0x27, 0xbb, 0xb4, 0x66, 0x69, 0x01, 0x33, 0xf6, 0x48, 0x2a, 0xc8, 0xd1, + 0xb0, 0x40, 0x95, 0x7f, 0x20, 0xc1, 0xd8, 0x95, 0xd5, 0xd5, 0xda, 0x92, 0xc1, 0x57, 0x71, 0x4d, + 0xa1, 0x9b, 0x2c, 0x4f, 0xb0, 0x14, 0xba, 0x99, 0xcc, 0x13, 0x58, 0x1f, 0xe6, 0x3d, 0x68, 0x13, + 0x06, 0x59, 0xf4, 0x20, 0x46, 0xb3, 0xc7, 0x14, 0x5f, 0x88, 0xab, 0x7a, 0x20, 0x61, 0xfe, 0x29, + 0x1a, 0xb0, 0x0f, 0x2f, 0xbf, 0x0b, 0x93, 0x11, 0xf5, 0x98, 0xbf, 0xf8, 0x25, 0x0e, 0x6a, 0x40, + 0x81, 0x69, 0xe2, 0x5f, 0xd1, 0x74, 0x7b, 0xd3, 0x90, 0x30, 0x39, 0xcc, 0xa3, 0xd8, 0x97, 0x83, + 0x3d, 0x6c, 0xf9, 0x8b, 0x1c, 0x9c, 0xba, 0x62, 0xda, 0xea, 0x3b, 0xa6, 0x41, 0x15, 0xad, 0x66, + 0x36, 0xe7, 0x5c, 0x6a, 0x3a, 0x0d, 0x45, 0x23, 0x76, 0x1f, 0x0e, 0x51, 0x5a, 0xec, 0x10, 0xf5, + 0x62, 0xb7, 0x16, 0xa6, 0xeb, 0x9d, 0x79, 0xa2, 0xa2, 0x89, 0x13, 0xd5, 0xf2, 0x11, 0xc9, 0xdb, + 0xff, 0x78, 0xf5, 0x77, 0x09, 0xee, 0xcb, 0xe0, 0xec, 0x43, 0x1e, 0xbe, 0x15, 0xcf, 0xc3, 0x17, + 0x8f, 0xc6, 0xe4, 0x8c, 0xa4, 0xfc, 0x9f, 0xb9, 0x4c, 0x53, 0x79, 0x1a, 0xf8, 0x16, 0x14, 0xf9, + 0x17, 0x26, 0x1b, 0xc2, 0xd4, 0xf9, 0x2e, 0xf5, 0xa9, 0xbb, 0xeb, 0xfe, 0x15, 0x28, 0x26, 0x1b, + 0xc4, 0x26, 0x46, 0x83, 0x44, 0x52, 0x24, 0x01, 0x8e, 0x03, 0x31, 0xe8, 0x2c, 0x0c, 0xf3, 0x94, + 0x27, 0xb6, 0x8b, 0x8e, 0xed, 0xed, 0x96, 0x87, 0x57, 0xc2, 0x66, 0x1c, 0xa5, 0x41, 0xe7, 0x61, + 0x58, 0x57, 0x76, 0x12, 0x7b, 0x68, 0x70, 0x9b, 0xb1, 0x12, 0x76, 0xe1, 0x28, 0x1d, 0x7a, 0x0f, + 0x46, 0x1b, 0x96, 0x1b, 0xb9, 0x81, 0x17, 0x39, 0x60, 0xb7, 0x26, 0xa6, 0x5d, 0xe6, 0x57, 0x11, + 0x3b, 0x5b, 0xce, 0xd7, 0xd6, 0x22, 0x6d, 0x38, 0x21, 0x4e, 0xfe, 0x65, 0x1e, 0x1e, 0xd8, 0x77, + 0x8a, 0xa2, 0xc5, 0x7d, 0x72, 0x93, 0xa9, 0x2e, 0xf2, 0x92, 0x06, 0x8c, 0xb0, 0x33, 0x26, 0x77, + 0x37, 0x3f, 0xc0, 0xe6, 0xba, 0x3e, 0xc0, 0xf2, 0xad, 0x66, 0x39, 0x0a, 0x82, 0xe3, 0x98, 0x2c, + 0x9d, 0x11, 0x57, 0x62, 0x59, 0xe9, 0xcc, 0x7c, 0xbc, 0x1b, 0x27, 0xe9, 0x19, 0x84, 0xb8, 0xb1, + 0x4a, 0x24, 0x33, 0x01, 0xc4, 0x42, 0xbc, 0x1b, 0x27, 0xe9, 0x91, 0x0e, 0x65, 0x81, 0x1a, 0xf7, + 0x7e, 0xe4, 0x51, 0xc5, 0x4b, 0x6a, 0x1e, 0xda, 0xdb, 0x2d, 0x97, 0xe7, 0xf7, 0x27, 0xc5, 0x77, + 0xc2, 0x92, 0x57, 0x60, 0xe4, 0x8a, 0xe9, 0xd0, 0x9a, 0x69, 0x53, 0xbe, 0x8b, 0xa1, 0x07, 0x20, + 0xaf, 0xab, 0x86, 0x38, 0x34, 0x0d, 0x0b, 0xb5, 0xf3, 0x6c, 0xee, 0xb2, 0x76, 0xde, 0xad, 0xec, + 0x88, 0x69, 0x1d, 0x76, 0x2b, 0x3b, 0x98, 0xb5, 0xcb, 0x97, 0x61, 0x50, 0xec, 0x8e, 0x51, 0xa0, + 0xfc, 0xfe, 0x40, 0xf9, 0x14, 0xa0, 0x1f, 0xe7, 0x60, 0x50, 0x6c, 0x26, 0x7d, 0xd8, 0x16, 0x5e, + 0x8b, 0x6d, 0x0b, 0x17, 0x7a, 0xdb, 0x78, 0x33, 0xb7, 0x81, 0x66, 0x62, 0x1b, 0x78, 0xb6, 0x47, + 0xfc, 0xfd, 0xc3, 0xfe, 0xc7, 0x12, 0x8c, 0xc6, 0x53, 0x00, 0x16, 0x58, 0xd8, 0x52, 0x52, 0x1b, + 0xe4, 0x6a, 0x78, 0x47, 0x11, 0x04, 0x96, 0x7a, 0xd8, 0x85, 0xa3, 0x74, 0x88, 0x04, 0x6c, 0x6c, + 0x5a, 0x08, 0xa7, 0x54, 0x32, 0x94, 0x76, 0xa9, 0xaa, 0x55, 0xbc, 0x97, 0xc5, 0xca, 0x92, 0x41, + 0xaf, 0xd9, 0x75, 0x6a, 0xab, 0x46, 0xab, 0x43, 0x0c, 0x9f, 0x61, 0x51, 0x5c, 0xf9, 0xa6, 0x04, + 0xc3, 0x42, 0xe1, 0x3e, 0xec, 0x4b, 0xaf, 0xc6, 0xf7, 0xa5, 0x27, 0x7b, 0x4c, 0xae, 0xd2, 0xf7, + 0xa1, 0x4f, 0x43, 0x53, 0x58, 0x3a, 0xc5, 0xb2, 0xbd, 0x4d, 0xd3, 0xa1, 0xc9, 0x6c, 0x8f, 0xad, + 0x34, 0xcc, 0x7b, 0xd0, 0xb7, 0x25, 0x38, 0xa9, 0x26, 0x12, 0x30, 0xe1, 0xe9, 0xe7, 0x7b, 0x53, + 0x2d, 0x80, 0x09, 0x9f, 0x5b, 0x93, 0x3d, 0xb8, 0x43, 0xa4, 0xec, 0x42, 0x07, 0x15, 0x52, 0x60, + 0x60, 0x93, 0x52, 0xab, 0xc7, 0x1d, 0x33, 0x2d, 0xb5, 0xac, 0x16, 0xb9, 0xf9, 0xab, 0xab, 0x35, + 0xcc, 0xa1, 0xe5, 0x8f, 0x73, 0x81, 0xc3, 0xea, 0xde, 0x12, 0x09, 0x92, 0x5f, 0xe9, 0x28, 0x92, + 0xdf, 0xe1, 0xb4, 0xc4, 0x17, 0xbd, 0x0c, 0x79, 0xaa, 0xf5, 0x7a, 0x43, 0x28, 0x24, 0xac, 0x2e, + 0xd7, 0xc3, 0x70, 0xb5, 0xba, 0x5c, 0xc7, 0x0c, 0x12, 0xbd, 0x09, 0x05, 0x76, 0xb4, 0x60, 0x2b, + 0x3c, 0xdf, 0x7b, 0x04, 0x61, 0xfe, 0x0a, 0x67, 0x18, 0xfb, 0x72, 0xb0, 0x87, 0x2b, 0xbf, 0x0b, + 0x23, 0xb1, 0x30, 0x80, 0x6e, 0xc0, 0x09, 0xcd, 0x54, 0x9a, 0x55, 0x45, 0x53, 0x8c, 0x06, 0xb1, + 0x93, 0x81, 0x31, 0xfd, 0x72, 0x69, 0x39, 0xc2, 0x21, 0xc2, 0x49, 0xf0, 0xe4, 0x1d, 0xed, 0xc3, + 0x31, 0x6c, 0x59, 0x01, 0x08, 0xad, 0x47, 0x65, 0x28, 0xb0, 0x29, 0xec, 0x1d, 0x13, 0x86, 0xaa, + 0x43, 0x4c, 0x57, 0x36, 0xb3, 0x1d, 0xec, 0xb5, 0xa3, 0x73, 0x00, 0x0e, 0x69, 0xd8, 0x84, 0xf2, + 0xa8, 0xe3, 0x5d, 0xc7, 0x07, 0xf1, 0xb7, 0x1e, 0xf4, 0xe0, 0x08, 0x95, 0xfc, 0x47, 0x09, 0x46, + 0xae, 0x12, 0xfa, 0xb6, 0x69, 0x6f, 0xd5, 0x4c, 0x4d, 0x6d, 0xb4, 0xfb, 0x10, 0xf5, 0xd7, 0x63, + 0x51, 0xff, 0x85, 0x2e, 0xc7, 0x2c, 0xa6, 0x6d, 0x56, 0xec, 0x97, 0xff, 0x26, 0x41, 0x29, 0x46, + 0x19, 0x0d, 0x13, 0x04, 0x0a, 0x96, 0x69, 0x53, 0xff, 0xc0, 0x75, 0x28, 0x0d, 0x58, 0x48, 0x8d, + 0x1c, 0xb9, 0x18, 0x2c, 0xf6, 0xd0, 0x99, 0x9d, 0x1b, 0xb6, 0xa9, 0x8b, 0x79, 0x7f, 0x38, 0x29, + 0x84, 0xd8, 0xa1, 0x9d, 0x8b, 0xb6, 0xa9, 0x63, 0x8e, 0x2d, 0xff, 0x41, 0x82, 0xf1, 0x18, 0x65, + 0x1f, 0x42, 0xba, 0x12, 0x0f, 0xe9, 0xcf, 0x1e, 0xc6, 0xb0, 0x8c, 0xc0, 0xfe, 0x55, 0xd2, 0x2c, + 0xe6, 0x00, 0xb4, 0x01, 0xc3, 0x96, 0xd9, 0xac, 0x1f, 0xc1, 0x6b, 0x32, 0x3f, 0x18, 0xd4, 0x42, + 0x2c, 0x1c, 0x05, 0x46, 0x3b, 0x30, 0x6e, 0x28, 0x3a, 0x71, 0x2c, 0xa5, 0x41, 0xea, 0x47, 0x70, + 0x49, 0x7d, 0xcf, 0xde, 0x6e, 0x79, 0xfc, 0x6a, 0x12, 0x11, 0x77, 0x0a, 0x91, 0x7f, 0xda, 0x61, + 0xb7, 0x69, 0x53, 0xf4, 0x12, 0x14, 0x79, 0xc9, 0x50, 0xc3, 0xd4, 0xc4, 0xd6, 0x76, 0x9e, 0x0d, + 0x4d, 0x4d, 0xb4, 0xdd, 0xde, 0x2d, 0xff, 0xd7, 0xbe, 0x6f, 0x6c, 0x3e, 0x21, 0x0e, 0x60, 0xd0, + 0x32, 0x0c, 0x58, 0xbd, 0x27, 0x19, 0x7c, 0x5b, 0xe1, 0x99, 0x05, 0x47, 0x91, 0xff, 0x91, 0x54, + 0x9b, 0x6f, 0x2e, 0x37, 0x8e, 0x6c, 0xb8, 0x82, 0xa4, 0x26, 0x73, 0xc8, 0x6c, 0x18, 0x14, 0x7b, + 0xac, 0x98, 0x95, 0x97, 0x0f, 0x33, 0x2b, 0xa3, 0xfb, 0x42, 0x70, 0x9f, 0xe3, 0x37, 0xfa, 0x82, + 0xe4, 0x3f, 0x4b, 0x30, 0xce, 0x15, 0x6a, 0xb8, 0xb6, 0x4a, 0xdb, 0x7d, 0x8b, 0x9f, 0x1b, 0xb1, + 0xf8, 0xb9, 0xd0, 0xa5, 0xa1, 0x1d, 0x1a, 0x67, 0xc6, 0xd0, 0xcf, 0x25, 0xb8, 0xa7, 0x83, 0xba, + 0x0f, 0xf1, 0x85, 0xc4, 0xe3, 0xcb, 0x0b, 0x87, 0x35, 0x30, 0x23, 0xc6, 0xdc, 0x84, 0x14, 0xf3, + 0xf8, 0xc4, 0x3d, 0x07, 0x60, 0xd9, 0xea, 0xb6, 0xaa, 0x91, 0x96, 0x28, 0xeb, 0x28, 0x86, 0x43, + 0x52, 0x0b, 0x7a, 0x70, 0x84, 0x0a, 0x7d, 0x13, 0xa6, 0x9a, 0x64, 0x43, 0x71, 0x35, 0x3a, 0xd7, + 0x6c, 0xce, 0x2b, 0x96, 0xb2, 0xae, 0x6a, 0x2a, 0x55, 0xc5, 0x65, 0xe7, 0x50, 0xf5, 0x92, 0x57, + 0x6e, 0x91, 0x46, 0x71, 0x7b, 0xb7, 0xfc, 0xc8, 0xfe, 0x6f, 0xe4, 0x3e, 0x71, 0x1b, 0x67, 0x08, + 0x41, 0xdf, 0x92, 0xa0, 0x64, 0x93, 0xb7, 0x5c, 0x76, 0xa6, 0x5d, 0xb0, 0x4d, 0x2b, 0xa6, 0x41, + 0x9e, 0x6b, 0x70, 0x79, 0x6f, 0xb7, 0x5c, 0xc2, 0x19, 0x34, 0xdd, 0xe8, 0x90, 0x29, 0x08, 0x51, + 0x98, 0x50, 0x34, 0xcd, 0x7c, 0x9b, 0xc4, 0x3d, 0x30, 0xc0, 0xe5, 0x57, 0xf7, 0x76, 0xcb, 0x13, + 0x73, 0x9d, 0xdd, 0xdd, 0x88, 0x4e, 0x83, 0x47, 0xb3, 0x30, 0xb8, 0x6d, 0x6a, 0xae, 0x4e, 0x9c, + 0x52, 0x81, 0x4b, 0x62, 0xf1, 0x76, 0xf0, 0xba, 0xd7, 0x74, 0x7b, 0xb7, 0x7c, 0x7c, 0xb1, 0xce, + 0x6f, 0xa1, 0x7d, 0x2a, 0x76, 0x3e, 0x63, 0x19, 0x93, 0x58, 0xf2, 0xfc, 0x09, 0xac, 0x18, 0xc6, + 0x98, 0x2b, 0x61, 0x17, 0x8e, 0xd2, 0x21, 0x1d, 0x86, 0x36, 0xc5, 0x99, 0xdd, 0x29, 0x0d, 0xf6, + 0xb4, 0xf7, 0xc5, 0xce, 0xfc, 0xd5, 0x71, 0x21, 0x72, 0xc8, 0x6f, 0x76, 0x70, 0x28, 0x01, 0x3d, + 0x0a, 0x83, 0xfc, 0x63, 0x69, 0x81, 0x3f, 0x9c, 0x15, 0xc3, 0x48, 0x74, 0xc5, 0x6b, 0xc6, 0x7e, + 0xbf, 0x4f, 0xba, 0x54, 0x9b, 0xe7, 0xef, 0x5c, 0x09, 0xd2, 0xa5, 0xda, 0x3c, 0xf6, 0xfb, 0x91, + 0x05, 0x83, 0x0e, 0x59, 0x56, 0x0d, 0x77, 0xa7, 0x04, 0x7c, 0xe5, 0x5e, 0xea, 0xf6, 0x66, 0xee, + 0x12, 0xe7, 0x4e, 0xbc, 0x0a, 0x84, 0x12, 0x45, 0x3f, 0xf6, 0xc5, 0xa0, 0x1d, 0x18, 0xb2, 0x5d, + 0x63, 0xce, 0x59, 0x73, 0x88, 0x5d, 0x1a, 0xe6, 0x32, 0xbb, 0x0d, 0xce, 0xd8, 0xe7, 0x4f, 0x4a, + 0x0d, 0x3c, 0x18, 0x50, 0xe0, 0x50, 0x18, 0xfa, 0x48, 0x02, 0xe4, 0xb8, 0x96, 0xa5, 0x11, 0x9d, + 0x18, 0x54, 0xd1, 0xf8, 0xc3, 0x84, 0x53, 0x3a, 0xc1, 0x75, 0xa8, 0x75, 0x7d, 0x23, 0x99, 0x04, + 0x4a, 0x2a, 0x13, 0xbc, 0xfa, 0x75, 0x92, 0xe2, 0x14, 0x3d, 0xd8, 0x50, 0x6c, 0x38, 0xfc, 0x77, + 0x69, 0xa4, 0xa7, 0xa1, 0x48, 0x7f, 0xa0, 0x09, 0x87, 0x42, 0xf4, 0x63, 0x5f, 0x0c, 0xba, 0x0e, + 0x53, 0x36, 0x51, 0x9a, 0xd7, 0x0c, 0xad, 0x8d, 0x4d, 0x93, 0x2e, 0xaa, 0x1a, 0x71, 0xda, 0x0e, + 0x25, 0x7a, 0x69, 0x94, 0x4f, 0x9b, 0xa0, 0x2e, 0x0c, 0xa7, 0x52, 0xe1, 0x0c, 0x6e, 0x5e, 0x94, + 0x25, 0x6e, 0xd2, 0xfa, 0x53, 0xfd, 0x79, 0xb8, 0xa2, 0xac, 0x50, 0xd5, 0xbb, 0x56, 0x94, 0x15, + 0x11, 0xb1, 0xff, 0xf5, 0xd1, 0x57, 0x39, 0x98, 0x08, 0x89, 0x0f, 0x5c, 0x94, 0x95, 0xc2, 0xd2, + 0x87, 0xa2, 0xac, 0xf4, 0xaa, 0xa6, 0xfc, 0xdd, 0xae, 0x6a, 0xba, 0x0b, 0xc5, 0x60, 0xbc, 0x50, + 0x2a, 0x74, 0xe2, 0xbf, 0x7f, 0xa1, 0x54, 0xa8, 0x6b, 0x46, 0x3a, 0xf3, 0x8b, 0x5c, 0xd4, 0xa0, + 0xff, 0xa0, 0x6a, 0x9c, 0x94, 0xe2, 0x98, 0x81, 0xee, 0x8a, 0x63, 0xe4, 0xcf, 0xf3, 0x70, 0x32, + 0xb9, 0x62, 0x63, 0x45, 0x19, 0xd2, 0x1d, 0x8b, 0x32, 0x6a, 0x30, 0xb9, 0xe1, 0x6a, 0x5a, 0x9b, + 0x3b, 0x24, 0xf2, 0x0e, 0xe1, 0xdd, 0xd8, 0xdf, 0x2f, 0x38, 0x27, 0x17, 0x53, 0x68, 0x70, 0x2a, + 0x67, 0x46, 0x81, 0x49, 0xbe, 0xa7, 0x02, 0x93, 0x8e, 0xfa, 0x86, 0x81, 0x83, 0xd7, 0x37, 0xa4, + 0x17, 0x8b, 0x14, 0x7a, 0x28, 0x16, 0x39, 0x8a, 0xea, 0x8e, 0x94, 0xc0, 0x77, 0xa7, 0xea, 0x0e, + 0xf9, 0x7e, 0x98, 0x16, 0x6c, 0xec, 0x7b, 0xde, 0x34, 0xa8, 0x6d, 0x6a, 0x1a, 0xb1, 0x17, 0x5c, + 0x5d, 0x6f, 0xcb, 0x17, 0x61, 0x34, 0x5e, 0x62, 0xe4, 0x8d, 0xbc, 0x57, 0xf5, 0x24, 0xde, 0x51, + 0x22, 0x23, 0xef, 0xb5, 0xe3, 0x80, 0x42, 0xfe, 0x42, 0x82, 0x53, 0x19, 0x85, 0x16, 0xe8, 0x06, + 0x8c, 0xea, 0xca, 0x4e, 0xa4, 0xfc, 0x25, 0x19, 0x58, 0x0e, 0x78, 0xe0, 0xe6, 0xcf, 0x82, 0x2b, + 0x31, 0x24, 0x9c, 0x40, 0x46, 0x2f, 0x43, 0x51, 0x57, 0x76, 0xea, 0xae, 0xdd, 0x22, 0x3d, 0x1e, + 0xeb, 0xf9, 0xf2, 0x5d, 0x11, 0x18, 0x38, 0x40, 0x93, 0x3f, 0x91, 0xa0, 0x94, 0x95, 0x82, 0xa1, + 0xf3, 0xb1, 0x72, 0x90, 0x07, 0x13, 0xe5, 0x20, 0xe3, 0x1d, 0x7c, 0x7d, 0x2a, 0x06, 0xf9, 0x54, + 0x82, 0xa9, 0xf4, 0x54, 0x15, 0x3d, 0x11, 0xd3, 0xb8, 0x9c, 0xd0, 0x78, 0x2c, 0xc1, 0x25, 0xf4, + 0xdd, 0x84, 0x51, 0x91, 0xd0, 0x0a, 0x98, 0x03, 0xfc, 0x89, 0x67, 0x3b, 0xc8, 0x96, 0xfd, 0xd4, + 0x8c, 0x8f, 0x63, 0xbc, 0x0d, 0x27, 0x70, 0xe5, 0x1f, 0xe5, 0xa0, 0xc0, 0x5f, 0x47, 0xfb, 0x90, + 0x47, 0xbd, 0x12, 0xcb, 0xa3, 0xba, 0xfd, 0x33, 0x08, 0xd7, 0x32, 0x33, 0x85, 0x5a, 0x4f, 0xa4, + 0x50, 0x17, 0x7a, 0x42, 0xdf, 0x3f, 0x7b, 0x7a, 0x1a, 0x86, 0x02, 0x25, 0xba, 0x0b, 0xd8, 0xf2, + 0x4f, 0x72, 0x30, 0x1c, 0x11, 0xd1, 0x65, 0xb8, 0xdf, 0x8e, 0x6d, 0x98, 0xbd, 0xfc, 0xeb, 0x2c, + 0x22, 0xbb, 0xe2, 0x6f, 0x99, 0x5e, 0x05, 0x71, 0x58, 0xe6, 0xd0, 0xb9, 0x93, 0x5e, 0x84, 0x51, + 0xef, 0xaf, 0x7b, 0xc1, 0xb5, 0x5a, 0x9e, 0xcf, 0xe2, 0xa0, 0x2e, 0x7d, 0x35, 0xd6, 0x8b, 0x13, + 0xd4, 0xd3, 0xcf, 0xc0, 0x48, 0x4c, 0x58, 0x57, 0x05, 0xbf, 0xbf, 0x92, 0x60, 0x32, 0xad, 0x30, + 0x03, 0x9d, 0x86, 0x81, 0x2d, 0x55, 0xbc, 0x21, 0x45, 0xde, 0xdd, 0xfe, 0x5f, 0x35, 0x9a, 0x98, + 0xf7, 0x04, 0xf5, 0xda, 0xb9, 0xcc, 0x7a, 0xed, 0x73, 0x00, 0x8a, 0xa5, 0x8a, 0xbf, 0x43, 0x0a, + 0xab, 0x82, 0xc9, 0x1b, 0xfe, 0x51, 0x12, 0x47, 0xa8, 0xf8, 0x43, 0x6b, 0xa8, 0x8f, 0x48, 0x0e, + 0xc3, 0x17, 0xd0, 0x88, 0xaa, 0x51, 0x3a, 0xf9, 0xd7, 0x12, 0x3c, 0x78, 0xc7, 0xe3, 0x1c, 0xaa, + 0xc6, 0xc2, 0x44, 0x25, 0x11, 0x26, 0x66, 0xb2, 0x01, 0xfa, 0x58, 0xf2, 0xf6, 0xbd, 0x1c, 0xa0, + 0xd5, 0x4d, 0xd5, 0x6e, 0xd6, 0x14, 0x9b, 0xb6, 0xb1, 0x30, 0xb0, 0x0f, 0x81, 0xe3, 0x3c, 0x0c, + 0x37, 0x89, 0xd3, 0xb0, 0x55, 0xee, 0x2c, 0x31, 0xac, 0x81, 0xe7, 0x17, 0xc2, 0x2e, 0x1c, 0xa5, + 0x43, 0x2d, 0x28, 0x6e, 0x7b, 0x63, 0xe7, 0x3f, 0xd9, 0x75, 0x9b, 0x07, 0x87, 0x33, 0x21, 0x5c, + 0x27, 0xa2, 0xc1, 0xc1, 0x01, 0xb8, 0xfc, 0xa1, 0x04, 0x53, 0x9d, 0x8e, 0x59, 0x60, 0xaa, 0xdf, + 0x7d, 0xe7, 0xdc, 0x0f, 0x03, 0x1c, 0x9d, 0x79, 0xe5, 0x84, 0x77, 0x59, 0xce, 0x24, 0x63, 0xde, + 0x2a, 0x7f, 0x29, 0xc1, 0x74, 0xba, 0x6a, 0x7d, 0x38, 0x85, 0xdc, 0x88, 0x9f, 0x42, 0xba, 0xbd, + 0x71, 0x48, 0xd7, 0x3b, 0xe3, 0x44, 0xb2, 0x9b, 0x3a, 0x06, 0x7d, 0x30, 0x72, 0x23, 0x6e, 0xe4, + 0xdc, 0xa1, 0x8d, 0x4c, 0x37, 0xb0, 0xfa, 0xe8, 0xcd, 0x5b, 0x33, 0xc7, 0x3e, 0xbb, 0x35, 0x73, + 0xec, 0x4f, 0xb7, 0x66, 0x8e, 0xbd, 0xbf, 0x37, 0x23, 0xdd, 0xdc, 0x9b, 0x91, 0x3e, 0xdb, 0x9b, + 0x91, 0xfe, 0xb2, 0x37, 0x23, 0x7d, 0xf0, 0xd7, 0x99, 0x63, 0xaf, 0x0c, 0x0a, 0xcc, 0x7f, 0x05, + 0x00, 0x00, 0xff, 0xff, 0x15, 0x10, 0x78, 0x1f, 0xbe, 0x3f, 0x00, 0x00, } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/generated.proto b/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/generated.proto index 692588b5..d6a2751c 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/generated.proto +++ b/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/generated.proto @@ -74,7 +74,7 @@ message DaemonSet { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec defines the desired behavior of this daemon set. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -148,7 +148,7 @@ message DaemonSetStatus { message Deployment { // Standard object metadata. // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Specification of the desired behavior of the Deployment. // +optional @@ -341,7 +341,7 @@ message HTTPIngressRuleValue { message HorizontalPodAutoscaler { // Standard object metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // behaviour of autoscaler. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. // +optional @@ -431,7 +431,7 @@ message Ingress { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec is the desired state of the Ingress. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -553,7 +553,7 @@ message NetworkPolicy { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Specification of the desired behavior for this NetworkPolicy. // +optional @@ -652,7 +652,7 @@ message PodSecurityPolicy { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // spec defines the policy enforced. // +optional @@ -741,7 +741,7 @@ message ReplicaSet { // be the same as the Pod(s) that the ReplicaSet manages. // Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec defines the specification of the desired behavior of the ReplicaSet. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -911,7 +911,7 @@ message SELinuxStrategyOptions { message Scale { // Standard object metadata; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata. // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // defines the behavior of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. // +optional @@ -984,7 +984,7 @@ message SupplementalGroupsStrategyOptions { message ThirdPartyResource { // Standard object metadata // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Description is the description of this object. // +optional @@ -999,7 +999,7 @@ message ThirdPartyResource { message ThirdPartyResourceData { // Standard object metadata. // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Data is the raw JSON data for this data. // +optional diff --git a/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/register.go b/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/register.go index d0761bc8..6b03fb02 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/register.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/register.go @@ -20,7 +20,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/api/v1" ) // GroupName is the group name use in this package @@ -57,10 +56,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { &ThirdPartyResourceDataList{}, &Ingress{}, &IngressList{}, - &v1.ListOptions{}, - &v1.DeleteOptions{}, - &metav1.ExportOptions{}, - &metav1.GetOptions{}, &ReplicaSet{}, &ReplicaSetList{}, &PodSecurityPolicy{}, diff --git a/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/types.generated.go b/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/types.generated.go index cdcefdca..a08127e8 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/types.generated.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/types.generated.go @@ -26,9 +26,9 @@ import ( "fmt" codec1978 "github.com/ugorji/go/codec" pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - pkg3_types "k8s.io/apimachinery/pkg/types" - pkg4_resource "k8s.io/kubernetes/pkg/api/resource" - pkg2_v1 "k8s.io/kubernetes/pkg/api/v1" + pkg2_types "k8s.io/apimachinery/pkg/types" + pkg3_resource "k8s.io/kubernetes/pkg/api/resource" + pkg4_v1 "k8s.io/kubernetes/pkg/api/v1" pkg5_intstr "k8s.io/kubernetes/pkg/util/intstr" "reflect" "runtime" @@ -66,9 +66,9 @@ func init() { } if false { // reference the types, but skip this branch at build/run time var v0 pkg1_v1.TypeMeta - var v1 pkg3_types.UID - var v2 pkg4_resource.Quantity - var v3 pkg2_v1.ObjectMeta + var v1 pkg2_types.UID + var v2 pkg3_resource.Quantity + var v3 pkg4_v1.PodTemplateSpec var v4 pkg5_intstr.IntOrString var v5 time.Time _, _, _, _, _, _ = v0, v1, v2, v3, v4, v5 @@ -647,7 +647,13 @@ func (x *Scale) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -657,7 +663,13 @@ func (x *Scale) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -781,24 +793,30 @@ func (x *Scale) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = ScaleSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = ScaleStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -811,16 +829,16 @@ func (x *Scale) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -828,21 +846,21 @@ func (x *Scale) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -850,38 +868,44 @@ func (x *Scale) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -889,16 +913,16 @@ func (x *Scale) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = ScaleSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -906,21 +930,21 @@ func (x *Scale) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = ScaleStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -1852,7 +1876,7 @@ func (x *CustomMetricTarget) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } case "value": if r.TryDecodeAsNil() { - x.TargetValue = pkg4_resource.Quantity{} + x.TargetValue = pkg3_resource.Quantity{} } else { yyv6 := &x.TargetValue yym7 := z.DecBinary() @@ -1913,7 +1937,7 @@ func (x *CustomMetricTarget) codecDecodeSelfFromArray(l int, d *codec1978.Decode } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.TargetValue = pkg4_resource.Quantity{} + x.TargetValue = pkg3_resource.Quantity{} } else { yyv11 := &x.TargetValue yym12 := z.DecBinary() @@ -2275,7 +2299,7 @@ func (x *CustomMetricCurrentStatus) codecDecodeSelfFromMap(l int, d *codec1978.D } case "value": if r.TryDecodeAsNil() { - x.CurrentValue = pkg4_resource.Quantity{} + x.CurrentValue = pkg3_resource.Quantity{} } else { yyv6 := &x.CurrentValue yym7 := z.DecBinary() @@ -2336,7 +2360,7 @@ func (x *CustomMetricCurrentStatus) codecDecodeSelfFromArray(l int, d *codec1978 } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.CurrentValue = pkg4_resource.Quantity{} + x.CurrentValue = pkg3_resource.Quantity{} } else { yyv11 := &x.CurrentValue yym12 := z.DecBinary() @@ -3458,7 +3482,13 @@ func (x *HorizontalPodAutoscaler) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -3468,7 +3498,13 @@ func (x *HorizontalPodAutoscaler) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -3592,24 +3628,30 @@ func (x *HorizontalPodAutoscaler) codecDecodeSelfFromMap(l int, d *codec1978.Dec } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = HorizontalPodAutoscalerSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = HorizontalPodAutoscalerStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -3622,16 +3664,16 @@ func (x *HorizontalPodAutoscaler) codecDecodeSelfFromArray(l int, d *codec1978.D var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3639,21 +3681,21 @@ func (x *HorizontalPodAutoscaler) codecDecodeSelfFromArray(l int, d *codec1978.D if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3661,38 +3703,44 @@ func (x *HorizontalPodAutoscaler) codecDecodeSelfFromArray(l int, d *codec1978.D if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3700,16 +3748,16 @@ func (x *HorizontalPodAutoscaler) codecDecodeSelfFromArray(l int, d *codec1978.D if r.TryDecodeAsNil() { x.Spec = HorizontalPodAutoscalerSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3717,21 +3765,21 @@ func (x *HorizontalPodAutoscaler) codecDecodeSelfFromArray(l int, d *codec1978.D if r.TryDecodeAsNil() { x.Status = HorizontalPodAutoscalerStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -4193,7 +4241,13 @@ func (x *ThirdPartyResource) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -4203,7 +4257,13 @@ func (x *ThirdPartyResource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -4351,33 +4411,39 @@ func (x *ThirdPartyResource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "description": if r.TryDecodeAsNil() { x.Description = "" } else { - yyv9 := &x.Description - yym10 := z.DecBinary() - _ = yym10 + yyv10 := &x.Description + yym11 := z.DecBinary() + _ = yym11 if false { } else { - *((*string)(yyv9)) = r.DecodeString() + *((*string)(yyv10)) = r.DecodeString() } } case "versions": if r.TryDecodeAsNil() { x.Versions = nil } else { - yyv11 := &x.Versions - yym12 := z.DecBinary() - _ = yym12 + yyv12 := &x.Versions + yym13 := z.DecBinary() + _ = yym13 if false { } else { - h.decSliceAPIVersion((*[]APIVersion)(yyv11), d) + h.decSliceAPIVersion((*[]APIVersion)(yyv12), d) } } default: @@ -4391,16 +4457,16 @@ func (x *ThirdPartyResource) codecDecodeSelfFromArray(l int, d *codec1978.Decode var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj13 int - var yyb13 bool - var yyhl13 bool = l >= 0 - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + var yyj14 int + var yyb14 bool + var yyhl14 bool = l >= 0 + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4408,21 +4474,21 @@ func (x *ThirdPartyResource) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv14 := &x.Kind - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.Kind + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4430,38 +4496,44 @@ func (x *ThirdPartyResource) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv16 := &x.APIVersion - yym17 := z.DecBinary() - _ = yym17 + yyv17 := &x.APIVersion + yym18 := z.DecBinary() + _ = yym18 if false { } else { - *((*string)(yyv16)) = r.DecodeString() + *((*string)(yyv17)) = r.DecodeString() } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv18 := &x.ObjectMeta - yyv18.CodecDecodeSelf(d) + yyv19 := &x.ObjectMeta + yym20 := z.DecBinary() + _ = yym20 + if false { + } else if z.HasExtensions() && z.DecExt(yyv19) { + } else { + z.DecFallback(yyv19, false) + } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4469,21 +4541,21 @@ func (x *ThirdPartyResource) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.Description = "" } else { - yyv19 := &x.Description - yym20 := z.DecBinary() - _ = yym20 + yyv21 := &x.Description + yym22 := z.DecBinary() + _ = yym22 if false { } else { - *((*string)(yyv19)) = r.DecodeString() + *((*string)(yyv21)) = r.DecodeString() } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4491,26 +4563,26 @@ func (x *ThirdPartyResource) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.Versions = nil } else { - yyv21 := &x.Versions - yym22 := z.DecBinary() - _ = yym22 + yyv23 := &x.Versions + yym24 := z.DecBinary() + _ = yym24 if false { } else { - h.decSliceAPIVersion((*[]APIVersion)(yyv21), d) + h.decSliceAPIVersion((*[]APIVersion)(yyv23), d) } } for { - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj13-1, "") + z.DecStructFieldNotFound(yyj14-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -5152,7 +5224,13 @@ func (x *ThirdPartyResourceData) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -5162,7 +5240,13 @@ func (x *ThirdPartyResourceData) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -5285,21 +5369,27 @@ func (x *ThirdPartyResourceData) codecDecodeSelfFromMap(l int, d *codec1978.Deco } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "data": if r.TryDecodeAsNil() { x.Data = nil } else { - yyv9 := &x.Data - yym10 := z.DecBinary() - _ = yym10 + yyv10 := &x.Data + yym11 := z.DecBinary() + _ = yym11 if false { } else { - *yyv9 = r.DecodeBytes(*(*[]byte)(yyv9), false, false) + *yyv10 = r.DecodeBytes(*(*[]byte)(yyv10), false, false) } } default: @@ -5313,16 +5403,16 @@ func (x *ThirdPartyResourceData) codecDecodeSelfFromArray(l int, d *codec1978.De var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5330,21 +5420,21 @@ func (x *ThirdPartyResourceData) codecDecodeSelfFromArray(l int, d *codec1978.De if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5352,38 +5442,44 @@ func (x *ThirdPartyResourceData) codecDecodeSelfFromArray(l int, d *codec1978.De if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5391,26 +5487,26 @@ func (x *ThirdPartyResourceData) codecDecodeSelfFromArray(l int, d *codec1978.De if r.TryDecodeAsNil() { x.Data = nil } else { - yyv17 := &x.Data - yym18 := z.DecBinary() - _ = yym18 + yyv19 := &x.Data + yym20 := z.DecBinary() + _ = yym20 if false { } else { - *yyv17 = r.DecodeBytes(*(*[]byte)(yyv17), false, false) + *yyv19 = r.DecodeBytes(*(*[]byte)(yyv19), false, false) } } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -5504,7 +5600,13 @@ func (x *Deployment) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -5514,7 +5616,13 @@ func (x *Deployment) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -5638,24 +5746,30 @@ func (x *Deployment) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = DeploymentSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = DeploymentStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -5668,16 +5782,16 @@ func (x *Deployment) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5685,21 +5799,21 @@ func (x *Deployment) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5707,38 +5821,44 @@ func (x *Deployment) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5746,16 +5866,16 @@ func (x *Deployment) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = DeploymentSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5763,21 +5883,21 @@ func (x *Deployment) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = DeploymentStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -6157,7 +6277,7 @@ func (x *DeploymentSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "template": if r.TryDecodeAsNil() { - x.Template = pkg2_v1.PodTemplateSpec{} + x.Template = pkg4_v1.PodTemplateSpec{} } else { yyv8 := &x.Template yyv8.CodecDecodeSelf(d) @@ -6315,7 +6435,7 @@ func (x *DeploymentSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.Template = pkg2_v1.PodTemplateSpec{} + x.Template = pkg4_v1.PodTemplateSpec{} } else { yyv24 := &x.Template yyv24.CodecDecodeSelf(d) @@ -9161,7 +9281,7 @@ func (x *DaemonSetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "template": if r.TryDecodeAsNil() { - x.Template = pkg2_v1.PodTemplateSpec{} + x.Template = pkg4_v1.PodTemplateSpec{} } else { yyv6 := &x.Template yyv6.CodecDecodeSelf(d) @@ -9219,7 +9339,7 @@ func (x *DaemonSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.Template = pkg2_v1.PodTemplateSpec{} + x.Template = pkg4_v1.PodTemplateSpec{} } else { yyv10 := &x.Template yyv10.CodecDecodeSelf(d) @@ -9722,7 +9842,13 @@ func (x *DaemonSet) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -9732,7 +9858,13 @@ func (x *DaemonSet) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -9856,24 +9988,30 @@ func (x *DaemonSet) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = DaemonSetSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = DaemonSetStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -9886,16 +10024,16 @@ func (x *DaemonSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9903,21 +10041,21 @@ func (x *DaemonSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9925,38 +10063,44 @@ func (x *DaemonSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9964,16 +10108,16 @@ func (x *DaemonSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = DaemonSetSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9981,21 +10125,21 @@ func (x *DaemonSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = DaemonSetStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -10825,7 +10969,13 @@ func (x *Ingress) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -10835,7 +10985,13 @@ func (x *Ingress) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -10959,24 +11115,30 @@ func (x *Ingress) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = IngressSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = IngressStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -10989,16 +11151,16 @@ func (x *Ingress) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11006,21 +11168,21 @@ func (x *Ingress) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11028,38 +11190,44 @@ func (x *Ingress) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11067,16 +11235,16 @@ func (x *Ingress) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = IngressSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11084,21 +11252,21 @@ func (x *Ingress) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = IngressStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -12144,7 +12312,7 @@ func (x *IngressStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { switch yys3 { case "loadBalancer": if r.TryDecodeAsNil() { - x.LoadBalancer = pkg2_v1.LoadBalancerStatus{} + x.LoadBalancer = pkg4_v1.LoadBalancerStatus{} } else { yyv4 := &x.LoadBalancer yyv4.CodecDecodeSelf(d) @@ -12175,7 +12343,7 @@ func (x *IngressStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.LoadBalancer = pkg2_v1.LoadBalancerStatus{} + x.LoadBalancer = pkg4_v1.LoadBalancerStatus{} } else { yyv6 := &x.LoadBalancer yyv6.CodecDecodeSelf(d) @@ -13358,7 +13526,13 @@ func (x *ReplicaSet) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -13368,7 +13542,13 @@ func (x *ReplicaSet) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -13492,24 +13672,30 @@ func (x *ReplicaSet) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = ReplicaSetSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = ReplicaSetStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -13522,16 +13708,16 @@ func (x *ReplicaSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -13539,21 +13725,21 @@ func (x *ReplicaSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -13561,38 +13747,44 @@ func (x *ReplicaSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -13600,16 +13792,16 @@ func (x *ReplicaSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = ReplicaSetSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -13617,21 +13809,21 @@ func (x *ReplicaSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = ReplicaSetStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -14258,7 +14450,7 @@ func (x *ReplicaSetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "template": if r.TryDecodeAsNil() { - x.Template = pkg2_v1.PodTemplateSpec{} + x.Template = pkg4_v1.PodTemplateSpec{} } else { yyv10 := &x.Template yyv10.CodecDecodeSelf(d) @@ -14364,7 +14556,7 @@ func (x *ReplicaSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.Template = pkg2_v1.PodTemplateSpec{} + x.Template = pkg4_v1.PodTemplateSpec{} } else { yyv18 := &x.Template yyv18.CodecDecodeSelf(d) @@ -15372,7 +15564,13 @@ func (x *PodSecurityPolicy) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -15382,7 +15580,13 @@ func (x *PodSecurityPolicy) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -15489,17 +15693,23 @@ func (x *PodSecurityPolicy) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = PodSecurityPolicySpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -15512,16 +15722,16 @@ func (x *PodSecurityPolicy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + var yyj11 int + var yyb11 bool + var yyhl11 bool = l >= 0 + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -15529,21 +15739,21 @@ func (x *PodSecurityPolicy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv11 := &x.Kind - yym12 := z.DecBinary() - _ = yym12 + yyv12 := &x.Kind + yym13 := z.DecBinary() + _ = yym13 if false { } else { - *((*string)(yyv11)) = r.DecodeString() + *((*string)(yyv12)) = r.DecodeString() } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -15551,38 +15761,44 @@ func (x *PodSecurityPolicy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv13 := &x.APIVersion - yym14 := z.DecBinary() - _ = yym14 + yyv14 := &x.APIVersion + yym15 := z.DecBinary() + _ = yym15 if false { } else { - *((*string)(yyv13)) = r.DecodeString() + *((*string)(yyv14)) = r.DecodeString() } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv15 := &x.ObjectMeta - yyv15.CodecDecodeSelf(d) + yyv16 := &x.ObjectMeta + yym17 := z.DecBinary() + _ = yym17 + if false { + } else if z.HasExtensions() && z.DecExt(yyv16) { + } else { + z.DecFallback(yyv16, false) + } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -15590,21 +15806,21 @@ func (x *PodSecurityPolicy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder if r.TryDecodeAsNil() { x.Spec = PodSecurityPolicySpec{} } else { - yyv16 := &x.Spec - yyv16.CodecDecodeSelf(d) + yyv18 := &x.Spec + yyv18.CodecDecodeSelf(d) } for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj10-1, "") + z.DecStructFieldNotFound(yyj11-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -15684,7 +15900,7 @@ func (x *PodSecurityPolicySpec) CodecEncodeSelf(e *codec1978.Encoder) { _ = yym7 if false { } else { - h.encSlicev1_Capability(([]pkg2_v1.Capability)(x.DefaultAddCapabilities), e) + h.encSlicev1_Capability(([]pkg4_v1.Capability)(x.DefaultAddCapabilities), e) } } } else { @@ -15702,7 +15918,7 @@ func (x *PodSecurityPolicySpec) CodecEncodeSelf(e *codec1978.Encoder) { _ = yym8 if false { } else { - h.encSlicev1_Capability(([]pkg2_v1.Capability)(x.DefaultAddCapabilities), e) + h.encSlicev1_Capability(([]pkg4_v1.Capability)(x.DefaultAddCapabilities), e) } } } @@ -15717,7 +15933,7 @@ func (x *PodSecurityPolicySpec) CodecEncodeSelf(e *codec1978.Encoder) { _ = yym10 if false { } else { - h.encSlicev1_Capability(([]pkg2_v1.Capability)(x.RequiredDropCapabilities), e) + h.encSlicev1_Capability(([]pkg4_v1.Capability)(x.RequiredDropCapabilities), e) } } } else { @@ -15735,7 +15951,7 @@ func (x *PodSecurityPolicySpec) CodecEncodeSelf(e *codec1978.Encoder) { _ = yym11 if false { } else { - h.encSlicev1_Capability(([]pkg2_v1.Capability)(x.RequiredDropCapabilities), e) + h.encSlicev1_Capability(([]pkg4_v1.Capability)(x.RequiredDropCapabilities), e) } } } @@ -15750,7 +15966,7 @@ func (x *PodSecurityPolicySpec) CodecEncodeSelf(e *codec1978.Encoder) { _ = yym13 if false { } else { - h.encSlicev1_Capability(([]pkg2_v1.Capability)(x.AllowedCapabilities), e) + h.encSlicev1_Capability(([]pkg4_v1.Capability)(x.AllowedCapabilities), e) } } } else { @@ -15768,7 +15984,7 @@ func (x *PodSecurityPolicySpec) CodecEncodeSelf(e *codec1978.Encoder) { _ = yym14 if false { } else { - h.encSlicev1_Capability(([]pkg2_v1.Capability)(x.AllowedCapabilities), e) + h.encSlicev1_Capability(([]pkg4_v1.Capability)(x.AllowedCapabilities), e) } } } @@ -16065,7 +16281,7 @@ func (x *PodSecurityPolicySpec) codecDecodeSelfFromMap(l int, d *codec1978.Decod _ = yym7 if false { } else { - h.decSlicev1_Capability((*[]pkg2_v1.Capability)(yyv6), d) + h.decSlicev1_Capability((*[]pkg4_v1.Capability)(yyv6), d) } } case "requiredDropCapabilities": @@ -16077,7 +16293,7 @@ func (x *PodSecurityPolicySpec) codecDecodeSelfFromMap(l int, d *codec1978.Decod _ = yym9 if false { } else { - h.decSlicev1_Capability((*[]pkg2_v1.Capability)(yyv8), d) + h.decSlicev1_Capability((*[]pkg4_v1.Capability)(yyv8), d) } } case "allowedCapabilities": @@ -16089,7 +16305,7 @@ func (x *PodSecurityPolicySpec) codecDecodeSelfFromMap(l int, d *codec1978.Decod _ = yym11 if false { } else { - h.decSlicev1_Capability((*[]pkg2_v1.Capability)(yyv10), d) + h.decSlicev1_Capability((*[]pkg4_v1.Capability)(yyv10), d) } } case "volumes": @@ -16247,7 +16463,7 @@ func (x *PodSecurityPolicySpec) codecDecodeSelfFromArray(l int, d *codec1978.Dec _ = yym32 if false { } else { - h.decSlicev1_Capability((*[]pkg2_v1.Capability)(yyv31), d) + h.decSlicev1_Capability((*[]pkg4_v1.Capability)(yyv31), d) } } yyj28++ @@ -16269,7 +16485,7 @@ func (x *PodSecurityPolicySpec) codecDecodeSelfFromArray(l int, d *codec1978.Dec _ = yym34 if false { } else { - h.decSlicev1_Capability((*[]pkg2_v1.Capability)(yyv33), d) + h.decSlicev1_Capability((*[]pkg4_v1.Capability)(yyv33), d) } } yyj28++ @@ -16291,7 +16507,7 @@ func (x *PodSecurityPolicySpec) codecDecodeSelfFromArray(l int, d *codec1978.Dec _ = yym36 if false { } else { - h.decSlicev1_Capability((*[]pkg2_v1.Capability)(yyv35), d) + h.decSlicev1_Capability((*[]pkg4_v1.Capability)(yyv35), d) } } yyj28++ @@ -16901,7 +17117,7 @@ func (x *SELinuxStrategyOptions) codecDecodeSelfFromMap(l int, d *codec1978.Deco } } else { if x.SELinuxOptions == nil { - x.SELinuxOptions = new(pkg2_v1.SELinuxOptions) + x.SELinuxOptions = new(pkg4_v1.SELinuxOptions) } x.SELinuxOptions.CodecDecodeSelf(d) } @@ -16953,7 +17169,7 @@ func (x *SELinuxStrategyOptions) codecDecodeSelfFromArray(l int, d *codec1978.De } } else { if x.SELinuxOptions == nil { - x.SELinuxOptions = new(pkg2_v1.SELinuxOptions) + x.SELinuxOptions = new(pkg4_v1.SELinuxOptions) } x.SELinuxOptions.CodecDecodeSelf(d) } @@ -18440,7 +18656,13 @@ func (x *NetworkPolicy) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -18450,7 +18672,13 @@ func (x *NetworkPolicy) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -18557,17 +18785,23 @@ func (x *NetworkPolicy) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = NetworkPolicySpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -18580,16 +18814,16 @@ func (x *NetworkPolicy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + var yyj11 int + var yyb11 bool + var yyhl11 bool = l >= 0 + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -18597,21 +18831,21 @@ func (x *NetworkPolicy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv11 := &x.Kind - yym12 := z.DecBinary() - _ = yym12 + yyv12 := &x.Kind + yym13 := z.DecBinary() + _ = yym13 if false { } else { - *((*string)(yyv11)) = r.DecodeString() + *((*string)(yyv12)) = r.DecodeString() } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -18619,38 +18853,44 @@ func (x *NetworkPolicy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv13 := &x.APIVersion - yym14 := z.DecBinary() - _ = yym14 + yyv14 := &x.APIVersion + yym15 := z.DecBinary() + _ = yym15 if false { } else { - *((*string)(yyv13)) = r.DecodeString() + *((*string)(yyv14)) = r.DecodeString() } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv15 := &x.ObjectMeta - yyv15.CodecDecodeSelf(d) + yyv16 := &x.ObjectMeta + yym17 := z.DecBinary() + _ = yym17 + if false { + } else if z.HasExtensions() && z.DecExt(yyv16) { + } else { + z.DecFallback(yyv16, false) + } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -18658,21 +18898,21 @@ func (x *NetworkPolicy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = NetworkPolicySpec{} } else { - yyv16 := &x.Spec - yyv16.CodecDecodeSelf(d) + yyv18 := &x.Spec + yyv18.CodecDecodeSelf(d) } for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj10-1, "") + z.DecStructFieldNotFound(yyj11-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -19348,7 +19588,7 @@ func (x *NetworkPolicyPort) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } } else { if x.Protocol == nil { - x.Protocol = new(pkg2_v1.Protocol) + x.Protocol = new(pkg4_v1.Protocol) } x.Protocol.CodecDecodeSelf(d) } @@ -19402,7 +19642,7 @@ func (x *NetworkPolicyPort) codecDecodeSelfFromArray(l int, d *codec1978.Decoder } } else { if x.Protocol == nil { - x.Protocol = new(pkg2_v1.Protocol) + x.Protocol = new(pkg4_v1.Protocol) } x.Protocol.CodecDecodeSelf(d) } @@ -20853,7 +21093,7 @@ func (x codecSelfer1234) decSliceDeployment(v *[]Deployment, d *codec1978.Decode yyrg1 := len(yyv1) > 0 yyv21 := yyv1 - yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 872) + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 888) if yyrt1 { if yyrl1 <= cap(yyv1) { yyv1 = yyv1[:yyrl1] @@ -20972,7 +21212,7 @@ func (x codecSelfer1234) decSliceDaemonSet(v *[]DaemonSet, d *codec1978.Decoder) yyrg1 := len(yyv1) > 0 yyv21 := yyv1 - yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 768) + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 784) if yyrt1 { if yyrl1 <= cap(yyv1) { yyv1 = yyv1[:yyrl1] @@ -21686,7 +21926,7 @@ func (x codecSelfer1234) decSliceReplicaSet(v *[]ReplicaSet, d *codec1978.Decode yyrg1 := len(yyv1) > 0 yyv21 := yyv1 - yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 808) + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 824) if yyrt1 { if yyrl1 <= cap(yyv1) { yyv1 = yyv1[:yyrl1] @@ -21885,7 +22125,7 @@ func (x codecSelfer1234) decSliceReplicaSetCondition(v *[]ReplicaSetCondition, d } } -func (x codecSelfer1234) encSlicev1_Capability(v []pkg2_v1.Capability, e *codec1978.Encoder) { +func (x codecSelfer1234) encSlicev1_Capability(v []pkg4_v1.Capability, e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r @@ -21898,7 +22138,7 @@ func (x codecSelfer1234) encSlicev1_Capability(v []pkg2_v1.Capability, e *codec1 z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } -func (x codecSelfer1234) decSlicev1_Capability(v *[]pkg2_v1.Capability, d *codec1978.Decoder) { +func (x codecSelfer1234) decSlicev1_Capability(v *[]pkg4_v1.Capability, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r @@ -21909,7 +22149,7 @@ func (x codecSelfer1234) decSlicev1_Capability(v *[]pkg2_v1.Capability, d *codec _ = yyc1 if yyl1 == 0 { if yyv1 == nil { - yyv1 = []pkg2_v1.Capability{} + yyv1 = []pkg4_v1.Capability{} yyc1 = true } else if len(yyv1) != 0 { yyv1 = yyv1[:0] @@ -21927,10 +22167,10 @@ func (x codecSelfer1234) decSlicev1_Capability(v *[]pkg2_v1.Capability, d *codec if yyrl1 <= cap(yyv1) { yyv1 = yyv1[:yyrl1] } else { - yyv1 = make([]pkg2_v1.Capability, yyrl1) + yyv1 = make([]pkg4_v1.Capability, yyrl1) } } else { - yyv1 = make([]pkg2_v1.Capability, yyrl1) + yyv1 = make([]pkg4_v1.Capability, yyrl1) } yyc1 = true yyrr1 = len(yyv1) @@ -21968,7 +22208,7 @@ func (x codecSelfer1234) decSlicev1_Capability(v *[]pkg2_v1.Capability, d *codec for ; !r.CheckBreak(); yyj1++ { if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, "") // var yyz1 pkg2_v1.Capability + yyv1 = append(yyv1, "") // var yyz1 pkg4_v1.Capability yyc1 = true } yyh1.ElemContainerState(yyj1) @@ -21989,7 +22229,7 @@ func (x codecSelfer1234) decSlicev1_Capability(v *[]pkg2_v1.Capability, d *codec yyv1 = yyv1[:yyj1] yyc1 = true } else if yyj1 == 0 && yyv1 == nil { - yyv1 = []pkg2_v1.Capability{} + yyv1 = []pkg4_v1.Capability{} yyc1 = true } } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/types.go b/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/types.go index 479d5a24..4b3b94d0 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/types.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/types.go @@ -57,7 +57,7 @@ type Scale struct { metav1.TypeMeta `json:",inline"` // Standard object metadata; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata. // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // defines the behavior of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. // +optional @@ -162,7 +162,7 @@ type HorizontalPodAutoscaler struct { metav1.TypeMeta `json:",inline"` // Standard object metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // behaviour of autoscaler. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. // +optional @@ -194,7 +194,7 @@ type ThirdPartyResource struct { // Standard object metadata // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Description is the description of this object. // +optional @@ -229,7 +229,7 @@ type ThirdPartyResourceData struct { metav1.TypeMeta `json:",inline"` // Standard object metadata. // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Data is the raw JSON data for this data. // +optional @@ -243,7 +243,7 @@ type Deployment struct { metav1.TypeMeta `json:",inline"` // Standard object metadata. // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Specification of the desired behavior of the Deployment. // +optional @@ -582,7 +582,7 @@ type DaemonSet struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec defines the desired behavior of this daemon set. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -633,7 +633,7 @@ type Ingress struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec is the desired state of the Ingress. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -798,7 +798,7 @@ type ReplicaSet struct { // be the same as the Pod(s) that the ReplicaSet manages. // Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec defines the specification of the desired behavior of the ReplicaSet. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -920,7 +920,7 @@ type PodSecurityPolicy struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // spec defines the policy enforced. // +optional @@ -1128,7 +1128,7 @@ type NetworkPolicy struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Specification of the desired behavior for this NetworkPolicy. // +optional diff --git a/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/zz_generated.conversion.go index a2556396..cbd5cee3 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/zz_generated.conversion.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/zz_generated.conversion.go @@ -258,10 +258,7 @@ func Convert_extensions_CustomMetricTargetList_To_v1beta1_CustomMetricTargetList } func autoConvert_v1beta1_DaemonSet_To_extensions_DaemonSet(in *DaemonSet, out *extensions.DaemonSet, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_DaemonSetSpec_To_extensions_DaemonSetSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -276,10 +273,7 @@ func Convert_v1beta1_DaemonSet_To_extensions_DaemonSet(in *DaemonSet, out *exten } func autoConvert_extensions_DaemonSet_To_v1beta1_DaemonSet(in *extensions.DaemonSet, out *DaemonSet, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_extensions_DaemonSetSpec_To_v1beta1_DaemonSetSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -384,10 +378,7 @@ func Convert_extensions_DaemonSetStatus_To_v1beta1_DaemonSetStatus(in *extension } func autoConvert_v1beta1_Deployment_To_extensions_Deployment(in *Deployment, out *extensions.Deployment, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_DeploymentSpec_To_extensions_DeploymentSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -402,10 +393,7 @@ func Convert_v1beta1_Deployment_To_extensions_Deployment(in *Deployment, out *ex } func autoConvert_extensions_Deployment_To_v1beta1_Deployment(in *extensions.Deployment, out *Deployment, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_extensions_DeploymentSpec_To_v1beta1_DeploymentSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -672,10 +660,7 @@ func Convert_extensions_HTTPIngressRuleValue_To_v1beta1_HTTPIngressRuleValue(in } func autoConvert_v1beta1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler(in *HorizontalPodAutoscaler, out *autoscaling.HorizontalPodAutoscaler, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -690,10 +675,7 @@ func Convert_v1beta1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutosca } func autoConvert_autoscaling_HorizontalPodAutoscaler_To_v1beta1_HorizontalPodAutoscaler(in *autoscaling.HorizontalPodAutoscaler, out *HorizontalPodAutoscaler, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_autoscaling_HorizontalPodAutoscalerSpec_To_v1beta1_HorizontalPodAutoscalerSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -830,10 +812,7 @@ func Convert_extensions_IDRange_To_v1beta1_IDRange(in *extensions.IDRange, out * } func autoConvert_v1beta1_Ingress_To_extensions_Ingress(in *Ingress, out *extensions.Ingress, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_IngressSpec_To_extensions_IngressSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -848,10 +827,7 @@ func Convert_v1beta1_Ingress_To_extensions_Ingress(in *Ingress, out *extensions. } func autoConvert_extensions_Ingress_To_v1beta1_Ingress(in *extensions.Ingress, out *Ingress, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_extensions_IngressSpec_To_v1beta1_IngressSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -1014,10 +990,7 @@ func Convert_extensions_IngressTLS_To_v1beta1_IngressTLS(in *extensions.IngressT } func autoConvert_v1beta1_NetworkPolicy_To_extensions_NetworkPolicy(in *NetworkPolicy, out *extensions.NetworkPolicy, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_NetworkPolicySpec_To_extensions_NetworkPolicySpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -1029,10 +1002,7 @@ func Convert_v1beta1_NetworkPolicy_To_extensions_NetworkPolicy(in *NetworkPolicy } func autoConvert_extensions_NetworkPolicy_To_v1beta1_NetworkPolicy(in *extensions.NetworkPolicy, out *NetworkPolicy, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_extensions_NetworkPolicySpec_To_v1beta1_NetworkPolicySpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -1144,10 +1114,7 @@ func Convert_extensions_NetworkPolicySpec_To_v1beta1_NetworkPolicySpec(in *exten } func autoConvert_v1beta1_PodSecurityPolicy_To_extensions_PodSecurityPolicy(in *PodSecurityPolicy, out *extensions.PodSecurityPolicy, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_PodSecurityPolicySpec_To_extensions_PodSecurityPolicySpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -1159,10 +1126,7 @@ func Convert_v1beta1_PodSecurityPolicy_To_extensions_PodSecurityPolicy(in *PodSe } func autoConvert_extensions_PodSecurityPolicy_To_v1beta1_PodSecurityPolicy(in *extensions.PodSecurityPolicy, out *PodSecurityPolicy, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_extensions_PodSecurityPolicySpec_To_v1beta1_PodSecurityPolicySpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -1294,10 +1258,7 @@ func Convert_extensions_PodSecurityPolicySpec_To_v1beta1_PodSecurityPolicySpec(i } func autoConvert_v1beta1_ReplicaSet_To_extensions_ReplicaSet(in *ReplicaSet, out *extensions.ReplicaSet, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_ReplicaSetSpec_To_extensions_ReplicaSetSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -1312,10 +1273,7 @@ func Convert_v1beta1_ReplicaSet_To_extensions_ReplicaSet(in *ReplicaSet, out *ex } func autoConvert_extensions_ReplicaSet_To_v1beta1_ReplicaSet(in *extensions.ReplicaSet, out *ReplicaSet, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_extensions_ReplicaSetSpec_To_v1beta1_ReplicaSetSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -1534,10 +1492,7 @@ func Convert_extensions_SELinuxStrategyOptions_To_v1beta1_SELinuxStrategyOptions } func autoConvert_v1beta1_Scale_To_extensions_Scale(in *Scale, out *extensions.Scale, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_ScaleSpec_To_extensions_ScaleSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -1552,10 +1507,7 @@ func Convert_v1beta1_Scale_To_extensions_Scale(in *Scale, out *extensions.Scale, } func autoConvert_extensions_Scale_To_v1beta1_Scale(in *extensions.Scale, out *Scale, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_extensions_ScaleSpec_To_v1beta1_ScaleSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -1621,10 +1573,7 @@ func Convert_extensions_SupplementalGroupsStrategyOptions_To_v1beta1_Supplementa } func autoConvert_v1beta1_ThirdPartyResource_To_extensions_ThirdPartyResource(in *ThirdPartyResource, out *extensions.ThirdPartyResource, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.Description = in.Description out.Versions = *(*[]extensions.APIVersion)(unsafe.Pointer(&in.Versions)) return nil @@ -1635,10 +1584,7 @@ func Convert_v1beta1_ThirdPartyResource_To_extensions_ThirdPartyResource(in *Thi } func autoConvert_extensions_ThirdPartyResource_To_v1beta1_ThirdPartyResource(in *extensions.ThirdPartyResource, out *ThirdPartyResource, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.Description = in.Description out.Versions = *(*[]APIVersion)(unsafe.Pointer(&in.Versions)) return nil @@ -1649,10 +1595,7 @@ func Convert_extensions_ThirdPartyResource_To_v1beta1_ThirdPartyResource(in *ext } func autoConvert_v1beta1_ThirdPartyResourceData_To_extensions_ThirdPartyResourceData(in *ThirdPartyResourceData, out *extensions.ThirdPartyResourceData, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.Data = *(*[]byte)(unsafe.Pointer(&in.Data)) return nil } @@ -1662,10 +1605,7 @@ func Convert_v1beta1_ThirdPartyResourceData_To_extensions_ThirdPartyResourceData } func autoConvert_extensions_ThirdPartyResourceData_To_v1beta1_ThirdPartyResourceData(in *extensions.ThirdPartyResourceData, out *ThirdPartyResourceData, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.Data = *(*[]byte)(unsafe.Pointer(&in.Data)) return nil } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/zz_generated.deepcopy.go index b8790b06..4f8b2815 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/extensions/v1beta1/zz_generated.deepcopy.go @@ -21,10 +21,10 @@ limitations under the License. package v1beta1 import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - v1 "k8s.io/kubernetes/pkg/api/v1" + api_v1 "k8s.io/kubernetes/pkg/api/v1" intstr "k8s.io/kubernetes/pkg/util/intstr" reflect "reflect" ) @@ -181,8 +181,10 @@ func DeepCopy_v1beta1_DaemonSet(in interface{}, out interface{}, c *conversion.C in := in.(*DaemonSet) out := out.(*DaemonSet) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v1beta1_DaemonSetSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -219,10 +221,10 @@ func DeepCopy_v1beta1_DaemonSetSpec(in interface{}, out interface{}, c *conversi if newVal, err := c.DeepCopy(*in); err != nil { return err } else { - *out = newVal.(*meta_v1.LabelSelector) + *out = newVal.(*v1.LabelSelector) } } - if err := v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil { + if err := api_v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil { return err } return nil @@ -243,8 +245,10 @@ func DeepCopy_v1beta1_Deployment(in interface{}, out interface{}, c *conversion. in := in.(*Deployment) out := out.(*Deployment) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v1beta1_DeploymentSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -316,10 +320,10 @@ func DeepCopy_v1beta1_DeploymentSpec(in interface{}, out interface{}, c *convers if newVal, err := c.DeepCopy(*in); err != nil { return err } else { - *out = newVal.(*meta_v1.LabelSelector) + *out = newVal.(*v1.LabelSelector) } } - if err := v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil { + if err := api_v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil { return err } if err := DeepCopy_v1beta1_DeploymentStrategy(&in.Strategy, &out.Strategy, c); err != nil { @@ -386,9 +390,7 @@ func DeepCopy_v1beta1_FSGroupStrategyOptions(in interface{}, out interface{}, c if in.Ranges != nil { in, out := &in.Ranges, &out.Ranges *out = make([]IDRange, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } @@ -411,9 +413,7 @@ func DeepCopy_v1beta1_HTTPIngressRuleValue(in interface{}, out interface{}, c *c if in.Paths != nil { in, out := &in.Paths, &out.Paths *out = make([]HTTPIngressPath, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } @@ -424,8 +424,10 @@ func DeepCopy_v1beta1_HorizontalPodAutoscaler(in interface{}, out interface{}, c in := in.(*HorizontalPodAutoscaler) out := out.(*HorizontalPodAutoscaler) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v1beta1_HorizontalPodAutoscalerSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -486,7 +488,7 @@ func DeepCopy_v1beta1_HorizontalPodAutoscalerStatus(in interface{}, out interfac } if in.LastScaleTime != nil { in, out := &in.LastScaleTime, &out.LastScaleTime - *out = new(meta_v1.Time) + *out = new(v1.Time) **out = (*in).DeepCopy() } if in.CurrentCPUUtilizationPercentage != nil { @@ -521,8 +523,10 @@ func DeepCopy_v1beta1_Ingress(in interface{}, out interface{}, c *conversion.Clo in := in.(*Ingress) out := out.(*Ingress) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v1beta1_IngressSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -626,7 +630,7 @@ func DeepCopy_v1beta1_IngressStatus(in interface{}, out interface{}, c *conversi in := in.(*IngressStatus) out := out.(*IngressStatus) *out = *in - if err := v1.DeepCopy_v1_LoadBalancerStatus(&in.LoadBalancer, &out.LoadBalancer, c); err != nil { + if err := api_v1.DeepCopy_v1_LoadBalancerStatus(&in.LoadBalancer, &out.LoadBalancer, c); err != nil { return err } return nil @@ -652,8 +656,10 @@ func DeepCopy_v1beta1_NetworkPolicy(in interface{}, out interface{}, c *conversi in := in.(*NetworkPolicy) out := out.(*NetworkPolicy) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v1beta1_NetworkPolicySpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -717,7 +723,7 @@ func DeepCopy_v1beta1_NetworkPolicyPeer(in interface{}, out interface{}, c *conv if newVal, err := c.DeepCopy(*in); err != nil { return err } else { - *out = newVal.(*meta_v1.LabelSelector) + *out = newVal.(*v1.LabelSelector) } } if in.NamespaceSelector != nil { @@ -725,7 +731,7 @@ func DeepCopy_v1beta1_NetworkPolicyPeer(in interface{}, out interface{}, c *conv if newVal, err := c.DeepCopy(*in); err != nil { return err } else { - *out = newVal.(*meta_v1.LabelSelector) + *out = newVal.(*v1.LabelSelector) } } return nil @@ -739,7 +745,7 @@ func DeepCopy_v1beta1_NetworkPolicyPort(in interface{}, out interface{}, c *conv *out = *in if in.Protocol != nil { in, out := &in.Protocol, &out.Protocol - *out = new(v1.Protocol) + *out = new(api_v1.Protocol) **out = **in } if in.Port != nil { @@ -759,7 +765,7 @@ func DeepCopy_v1beta1_NetworkPolicySpec(in interface{}, out interface{}, c *conv if newVal, err := c.DeepCopy(&in.PodSelector); err != nil { return err } else { - out.PodSelector = *newVal.(*meta_v1.LabelSelector) + out.PodSelector = *newVal.(*v1.LabelSelector) } if in.Ingress != nil { in, out := &in.Ingress, &out.Ingress @@ -779,8 +785,10 @@ func DeepCopy_v1beta1_PodSecurityPolicy(in interface{}, out interface{}, c *conv in := in.(*PodSecurityPolicy) out := out.(*PodSecurityPolicy) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v1beta1_PodSecurityPolicySpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -814,38 +822,28 @@ func DeepCopy_v1beta1_PodSecurityPolicySpec(in interface{}, out interface{}, c * *out = *in if in.DefaultAddCapabilities != nil { in, out := &in.DefaultAddCapabilities, &out.DefaultAddCapabilities - *out = make([]v1.Capability, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + *out = make([]api_v1.Capability, len(*in)) + copy(*out, *in) } if in.RequiredDropCapabilities != nil { in, out := &in.RequiredDropCapabilities, &out.RequiredDropCapabilities - *out = make([]v1.Capability, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + *out = make([]api_v1.Capability, len(*in)) + copy(*out, *in) } if in.AllowedCapabilities != nil { in, out := &in.AllowedCapabilities, &out.AllowedCapabilities - *out = make([]v1.Capability, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + *out = make([]api_v1.Capability, len(*in)) + copy(*out, *in) } if in.Volumes != nil { in, out := &in.Volumes, &out.Volumes *out = make([]FSType, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.HostPorts != nil { in, out := &in.HostPorts, &out.HostPorts *out = make([]HostPortRange, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if err := DeepCopy_v1beta1_SELinuxStrategyOptions(&in.SELinux, &out.SELinux, c); err != nil { return err @@ -868,8 +866,10 @@ func DeepCopy_v1beta1_ReplicaSet(in interface{}, out interface{}, c *conversion. in := in.(*ReplicaSet) out := out.(*ReplicaSet) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v1beta1_ReplicaSetSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -924,10 +924,10 @@ func DeepCopy_v1beta1_ReplicaSetSpec(in interface{}, out interface{}, c *convers if newVal, err := c.DeepCopy(*in); err != nil { return err } else { - *out = newVal.(*meta_v1.LabelSelector) + *out = newVal.(*v1.LabelSelector) } } - if err := v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil { + if err := api_v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil { return err } return nil @@ -997,9 +997,7 @@ func DeepCopy_v1beta1_RunAsUserStrategyOptions(in interface{}, out interface{}, if in.Ranges != nil { in, out := &in.Ranges, &out.Ranges *out = make([]IDRange, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } @@ -1012,7 +1010,7 @@ func DeepCopy_v1beta1_SELinuxStrategyOptions(in interface{}, out interface{}, c *out = *in if in.SELinuxOptions != nil { in, out := &in.SELinuxOptions, &out.SELinuxOptions - *out = new(v1.SELinuxOptions) + *out = new(api_v1.SELinuxOptions) **out = **in } return nil @@ -1024,8 +1022,10 @@ func DeepCopy_v1beta1_Scale(in interface{}, out interface{}, c *conversion.Clone in := in.(*Scale) out := out.(*Scale) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v1beta1_ScaleStatus(&in.Status, &out.Status, c); err != nil { return err @@ -1076,9 +1076,7 @@ func DeepCopy_v1beta1_SupplementalGroupsStrategyOptions(in interface{}, out inte if in.Ranges != nil { in, out := &in.Ranges, &out.Ranges *out = make([]IDRange, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } @@ -1089,15 +1087,15 @@ func DeepCopy_v1beta1_ThirdPartyResource(in interface{}, out interface{}, c *con in := in.(*ThirdPartyResource) out := out.(*ThirdPartyResource) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.Versions != nil { in, out := &in.Versions, &out.Versions *out = make([]APIVersion, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } @@ -1108,8 +1106,10 @@ func DeepCopy_v1beta1_ThirdPartyResourceData(in interface{}, out interface{}, c in := in.(*ThirdPartyResourceData) out := out.(*ThirdPartyResourceData) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.Data != nil { in, out := &in.Data, &out.Data diff --git a/vendor/k8s.io/kubernetes/pkg/apis/extensions/validation/validation_test.go b/vendor/k8s.io/kubernetes/pkg/apis/extensions/validation/validation_test.go index 70b996e5..3dcc4653 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/extensions/validation/validation_test.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/extensions/validation/validation_test.go @@ -40,7 +40,7 @@ func TestValidateDaemonSetStatusUpdate(t *testing.T) { successCases := []dsUpdateTest{ { old: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Status: extensions.DaemonSetStatus{ CurrentNumberScheduled: 1, NumberMisscheduled: 2, @@ -49,7 +49,7 @@ func TestValidateDaemonSetStatusUpdate(t *testing.T) { }, }, update: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Status: extensions.DaemonSetStatus{ CurrentNumberScheduled: 1, NumberMisscheduled: 1, @@ -70,9 +70,9 @@ func TestValidateDaemonSetStatusUpdate(t *testing.T) { errorCases := map[string]dsUpdateTest{ "negative values": { old: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, ResourceVersion: "10", }, Status: extensions.DaemonSetStatus{ @@ -84,9 +84,9 @@ func TestValidateDaemonSetStatusUpdate(t *testing.T) { }, }, update: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, ResourceVersion: "10", }, Status: extensions.DaemonSetStatus{ @@ -100,9 +100,9 @@ func TestValidateDaemonSetStatusUpdate(t *testing.T) { }, "negative CurrentNumberScheduled": { old: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, ResourceVersion: "10", }, Status: extensions.DaemonSetStatus{ @@ -114,9 +114,9 @@ func TestValidateDaemonSetStatusUpdate(t *testing.T) { }, }, update: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, ResourceVersion: "10", }, Status: extensions.DaemonSetStatus{ @@ -130,9 +130,9 @@ func TestValidateDaemonSetStatusUpdate(t *testing.T) { }, "negative NumberMisscheduled": { old: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, ResourceVersion: "10", }, Status: extensions.DaemonSetStatus{ @@ -144,9 +144,9 @@ func TestValidateDaemonSetStatusUpdate(t *testing.T) { }, }, update: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, ResourceVersion: "10", }, Status: extensions.DaemonSetStatus{ @@ -160,9 +160,9 @@ func TestValidateDaemonSetStatusUpdate(t *testing.T) { }, "negative DesiredNumberScheduled": { old: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, ResourceVersion: "10", }, Status: extensions.DaemonSetStatus{ @@ -174,9 +174,9 @@ func TestValidateDaemonSetStatusUpdate(t *testing.T) { }, }, update: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, ResourceVersion: "10", }, Status: extensions.DaemonSetStatus{ @@ -190,9 +190,9 @@ func TestValidateDaemonSetStatusUpdate(t *testing.T) { }, "negative NumberReady": { old: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, ResourceVersion: "10", }, Status: extensions.DaemonSetStatus{ @@ -204,9 +204,9 @@ func TestValidateDaemonSetStatusUpdate(t *testing.T) { }, }, update: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, ResourceVersion: "10", }, Status: extensions.DaemonSetStatus{ @@ -220,9 +220,9 @@ func TestValidateDaemonSetStatusUpdate(t *testing.T) { }, "negative ObservedGeneration": { old: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, ResourceVersion: "10", }, Status: extensions.DaemonSetStatus{ @@ -234,9 +234,9 @@ func TestValidateDaemonSetStatusUpdate(t *testing.T) { }, }, update: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, ResourceVersion: "10", }, Status: extensions.DaemonSetStatus{ @@ -265,30 +265,30 @@ func TestValidateDaemonSetUpdate(t *testing.T) { validPodSpecAbc := api.PodSpec{ RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, - Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: api.TerminationMessageReadFile}}, } validPodSpecDef := api.PodSpec{ RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, - Containers: []api.Container{{Name: "def", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "def", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: api.TerminationMessageReadFile}}, } validPodSpecNodeSelector := api.PodSpec{ NodeSelector: validSelector, NodeName: "xyz", RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, - Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: api.TerminationMessageReadFile}}, } validPodSpecVolume := api.PodSpec{ Volumes: []api.Volume{{Name: "gcepd", VolumeSource: api.VolumeSource{GCEPersistentDisk: &api.GCEPersistentDiskVolumeSource{PDName: "my-PD", FSType: "ext4", Partition: 1, ReadOnly: false}}}}, RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, - Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: api.TerminationMessageReadFile}}, } validPodTemplateAbc := api.PodTemplate{ Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validSelector, }, Spec: validPodSpecAbc, @@ -296,7 +296,7 @@ func TestValidateDaemonSetUpdate(t *testing.T) { } validPodTemplateNodeSelector := api.PodTemplate{ Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validSelector, }, Spec: validPodSpecNodeSelector, @@ -304,7 +304,7 @@ func TestValidateDaemonSetUpdate(t *testing.T) { } validPodTemplateAbc2 := api.PodTemplate{ Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validSelector2, }, Spec: validPodSpecAbc, @@ -312,7 +312,7 @@ func TestValidateDaemonSetUpdate(t *testing.T) { } validPodTemplateDef := api.PodTemplate{ Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validSelector2, }, Spec: validPodSpecDef, @@ -324,14 +324,14 @@ func TestValidateDaemonSetUpdate(t *testing.T) { RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, }, - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: invalidSelector, }, }, } readWriteVolumePodTemplate := api.PodTemplate{ Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validSelector, }, Spec: validPodSpecVolume, @@ -345,14 +345,14 @@ func TestValidateDaemonSetUpdate(t *testing.T) { successCases := []dsUpdateTest{ { old: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validSelector}, Template: validPodTemplateAbc.Template, }, }, update: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validSelector}, Template: validPodTemplateAbc.Template, @@ -361,14 +361,14 @@ func TestValidateDaemonSetUpdate(t *testing.T) { }, { old: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validSelector}, Template: validPodTemplateAbc.Template, }, }, update: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validSelector2}, Template: validPodTemplateAbc2.Template, @@ -377,14 +377,14 @@ func TestValidateDaemonSetUpdate(t *testing.T) { }, { old: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validSelector}, Template: validPodTemplateAbc.Template, }, }, update: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validSelector}, Template: validPodTemplateNodeSelector.Template, @@ -402,14 +402,14 @@ func TestValidateDaemonSetUpdate(t *testing.T) { errorCases := map[string]dsUpdateTest{ "change daemon name": { old: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "", Namespace: metav1.NamespaceDefault}, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validSelector}, Template: validPodTemplateAbc.Template, }, }, update: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validSelector}, Template: validPodTemplateAbc.Template, @@ -418,14 +418,14 @@ func TestValidateDaemonSetUpdate(t *testing.T) { }, "invalid selector": { old: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "", Namespace: metav1.NamespaceDefault}, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validSelector}, Template: validPodTemplateAbc.Template, }, }, update: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: invalidSelector}, Template: validPodTemplateAbc.Template, @@ -434,14 +434,14 @@ func TestValidateDaemonSetUpdate(t *testing.T) { }, "invalid pod": { old: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "", Namespace: metav1.NamespaceDefault}, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validSelector}, Template: validPodTemplateAbc.Template, }, }, update: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validSelector}, Template: invalidPodTemplate.Template, @@ -450,14 +450,14 @@ func TestValidateDaemonSetUpdate(t *testing.T) { }, "change container image": { old: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "", Namespace: metav1.NamespaceDefault}, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validSelector}, Template: validPodTemplateAbc.Template, }, }, update: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validSelector}, Template: validPodTemplateDef.Template, @@ -466,14 +466,14 @@ func TestValidateDaemonSetUpdate(t *testing.T) { }, "read-write volume": { old: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "", Namespace: metav1.NamespaceDefault}, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validSelector}, Template: validPodTemplateAbc.Template, }, }, update: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validSelector}, Template: readWriteVolumePodTemplate.Template, @@ -482,14 +482,14 @@ func TestValidateDaemonSetUpdate(t *testing.T) { }, "invalid update strategy": { old: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "", Namespace: metav1.NamespaceDefault}, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validSelector}, Template: validPodTemplateAbc.Template, }, }, update: extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: invalidSelector}, Template: validPodTemplateAbc.Template, @@ -508,13 +508,13 @@ func TestValidateDaemonSet(t *testing.T) { validSelector := map[string]string{"a": "b"} validPodTemplate := api.PodTemplate{ Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validSelector, }, Spec: api.PodSpec{ RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, - Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: api.TerminationMessageReadFile}}, }, }, } @@ -525,21 +525,21 @@ func TestValidateDaemonSet(t *testing.T) { RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, }, - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: invalidSelector, }, }, } successCases := []extensions.DaemonSet{ { - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validSelector}, Template: validPodTemplate.Template, }, }, { - ObjectMeta: api.ObjectMeta{Name: "abc-123", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc-123", Namespace: metav1.NamespaceDefault}, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validSelector}, Template: validPodTemplate.Template, @@ -554,49 +554,49 @@ func TestValidateDaemonSet(t *testing.T) { errorCases := map[string]extensions.DaemonSet{ "zero-length ID": { - ObjectMeta: api.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "", Namespace: metav1.NamespaceDefault}, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validSelector}, Template: validPodTemplate.Template, }, }, "missing-namespace": { - ObjectMeta: api.ObjectMeta{Name: "abc-123"}, + ObjectMeta: metav1.ObjectMeta{Name: "abc-123"}, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validSelector}, Template: validPodTemplate.Template, }, }, "nil selector": { - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: extensions.DaemonSetSpec{ Template: validPodTemplate.Template, }, }, "empty selector": { - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{}, Template: validPodTemplate.Template, }, }, "selector_doesnt_match": { - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"foo": "bar"}}, Template: validPodTemplate.Template, }, }, "invalid template": { - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validSelector}, }, }, "invalid_label": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc-123", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, Labels: map[string]string{ "NoUppercaseOrSpecialCharsLike=Equals": "bar", }, @@ -607,9 +607,9 @@ func TestValidateDaemonSet(t *testing.T) { }, }, "invalid_label 2": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc-123", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, Labels: map[string]string{ "NoUppercaseOrSpecialCharsLike=Equals": "bar", }, @@ -619,9 +619,9 @@ func TestValidateDaemonSet(t *testing.T) { }, }, "invalid_annotation": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc-123", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, Annotations: map[string]string{ "NoUppercaseOrSpecialCharsLike=Equals": "bar", }, @@ -632,9 +632,9 @@ func TestValidateDaemonSet(t *testing.T) { }, }, "invalid restart policy 1": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc-123", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validSelector}, @@ -642,18 +642,18 @@ func TestValidateDaemonSet(t *testing.T) { Spec: api.PodSpec{ RestartPolicy: api.RestartPolicyOnFailure, DNSPolicy: api.DNSClusterFirst, - Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: api.TerminationMessageReadFile}}, }, - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validSelector, }, }, }, }, "invalid restart policy 2": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc-123", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validSelector}, @@ -661,9 +661,9 @@ func TestValidateDaemonSet(t *testing.T) { Spec: api.PodSpec{ RestartPolicy: api.RestartPolicyNever, DNSPolicy: api.DNSClusterFirst, - Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: api.TerminationMessageReadFile}}, }, - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validSelector, }, }, @@ -695,9 +695,9 @@ func TestValidateDaemonSet(t *testing.T) { func validDeployment() *extensions.Deployment { return &extensions.Deployment{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, Spec: extensions.DeploymentSpec{ Selector: &metav1.LabelSelector{ @@ -713,9 +713,9 @@ func validDeployment() *extensions.Deployment { }, }, Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, Labels: map[string]string{ "name": "abc", }, @@ -725,9 +725,10 @@ func validDeployment() *extensions.Deployment { DNSPolicy: api.DNSDefault, Containers: []api.Container{ { - Name: "nginx", - Image: "image", - ImagePullPolicy: api.PullNever, + Name: "nginx", + Image: "image", + ImagePullPolicy: api.PullNever, + TerminationMessagePolicy: api.TerminationMessageReadFile, }, }, }, @@ -751,8 +752,8 @@ func TestValidateDeployment(t *testing.T) { errorCases := map[string]*extensions.Deployment{} errorCases["metadata.name: Required value"] = &extensions.Deployment{ - ObjectMeta: api.ObjectMeta{ - Namespace: api.NamespaceDefault, + ObjectMeta: metav1.ObjectMeta{ + Namespace: metav1.NamespaceDefault, }, } // selector should match the labels in pod template. @@ -885,9 +886,9 @@ func TestValidateIngress(t *testing.T) { newValid := func() extensions.Ingress { return extensions.Ingress{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, Spec: extensions.IngressSpec{ Backend: &extensions.IngressBackend{ @@ -989,9 +990,9 @@ func TestValidateIngressTLS(t *testing.T) { newValid := func() extensions.Ingress { return extensions.Ingress{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, Spec: extensions.IngressSpec{ Backend: &extensions.IngressBackend{ @@ -1059,9 +1060,9 @@ func TestValidateIngressStatusUpdate(t *testing.T) { newValid := func() extensions.Ingress { return extensions.Ingress{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, ResourceVersion: "9", }, Spec: extensions.IngressSpec{ @@ -1146,27 +1147,27 @@ func TestValidateIngressStatusUpdate(t *testing.T) { func TestValidateScale(t *testing.T) { successCases := []extensions.Scale{ { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "frontend", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, Spec: extensions.ScaleSpec{ Replicas: 1, }, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "frontend", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, Spec: extensions.ScaleSpec{ Replicas: 10, }, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "frontend", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, Spec: extensions.ScaleSpec{ Replicas: 0, @@ -1186,9 +1187,9 @@ func TestValidateScale(t *testing.T) { }{ { scale: extensions.Scale{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "frontend", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, Spec: extensions.ScaleSpec{ Replicas: -1, @@ -1211,13 +1212,13 @@ func TestValidateReplicaSetStatusUpdate(t *testing.T) { validLabels := map[string]string{"a": "b"} validPodTemplate := api.PodTemplate{ Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validLabels, }, Spec: api.PodSpec{ RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, - Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: api.TerminationMessageReadFile}}, }, }, } @@ -1228,7 +1229,7 @@ func TestValidateReplicaSetStatusUpdate(t *testing.T) { successCases := []rcUpdateTest{ { old: extensions.ReplicaSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: extensions.ReplicaSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validLabels}, Template: validPodTemplate.Template, @@ -1238,7 +1239,7 @@ func TestValidateReplicaSetStatusUpdate(t *testing.T) { }, }, update: extensions.ReplicaSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: extensions.ReplicaSetSpec{ Replicas: 3, Selector: &metav1.LabelSelector{MatchLabels: validLabels}, @@ -1260,7 +1261,7 @@ func TestValidateReplicaSetStatusUpdate(t *testing.T) { errorCases := map[string]rcUpdateTest{ "negative replicas": { old: extensions.ReplicaSet{ - ObjectMeta: api.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "", Namespace: metav1.NamespaceDefault}, Spec: extensions.ReplicaSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validLabels}, Template: validPodTemplate.Template, @@ -1270,7 +1271,7 @@ func TestValidateReplicaSetStatusUpdate(t *testing.T) { }, }, update: extensions.ReplicaSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: extensions.ReplicaSetSpec{ Replicas: 2, Selector: &metav1.LabelSelector{MatchLabels: validLabels}, @@ -1294,25 +1295,25 @@ func TestValidateReplicaSetUpdate(t *testing.T) { validLabels := map[string]string{"a": "b"} validPodTemplate := api.PodTemplate{ Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validLabels, }, Spec: api.PodSpec{ RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, - Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: api.TerminationMessageReadFile}}, }, }, } readWriteVolumePodTemplate := api.PodTemplate{ Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validLabels, }, Spec: api.PodSpec{ RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, - Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: api.TerminationMessageReadFile}}, Volumes: []api.Volume{{Name: "gcepd", VolumeSource: api.VolumeSource{GCEPersistentDisk: &api.GCEPersistentDiskVolumeSource{PDName: "my-PD", FSType: "ext4", Partition: 1, ReadOnly: false}}}}, }, }, @@ -1324,7 +1325,7 @@ func TestValidateReplicaSetUpdate(t *testing.T) { RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, }, - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: invalidLabels, }, }, @@ -1336,14 +1337,14 @@ func TestValidateReplicaSetUpdate(t *testing.T) { successCases := []rcUpdateTest{ { old: extensions.ReplicaSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: extensions.ReplicaSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validLabels}, Template: validPodTemplate.Template, }, }, update: extensions.ReplicaSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: extensions.ReplicaSetSpec{ Replicas: 3, Selector: &metav1.LabelSelector{MatchLabels: validLabels}, @@ -1353,14 +1354,14 @@ func TestValidateReplicaSetUpdate(t *testing.T) { }, { old: extensions.ReplicaSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: extensions.ReplicaSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validLabels}, Template: validPodTemplate.Template, }, }, update: extensions.ReplicaSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: extensions.ReplicaSetSpec{ Replicas: 1, Selector: &metav1.LabelSelector{MatchLabels: validLabels}, @@ -1379,14 +1380,14 @@ func TestValidateReplicaSetUpdate(t *testing.T) { errorCases := map[string]rcUpdateTest{ "more than one read/write": { old: extensions.ReplicaSet{ - ObjectMeta: api.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "", Namespace: metav1.NamespaceDefault}, Spec: extensions.ReplicaSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validLabels}, Template: validPodTemplate.Template, }, }, update: extensions.ReplicaSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: extensions.ReplicaSetSpec{ Replicas: 2, Selector: &metav1.LabelSelector{MatchLabels: validLabels}, @@ -1396,14 +1397,14 @@ func TestValidateReplicaSetUpdate(t *testing.T) { }, "invalid selector": { old: extensions.ReplicaSet{ - ObjectMeta: api.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "", Namespace: metav1.NamespaceDefault}, Spec: extensions.ReplicaSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validLabels}, Template: validPodTemplate.Template, }, }, update: extensions.ReplicaSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: extensions.ReplicaSetSpec{ Replicas: 2, Selector: &metav1.LabelSelector{MatchLabels: invalidLabels}, @@ -1413,14 +1414,14 @@ func TestValidateReplicaSetUpdate(t *testing.T) { }, "invalid pod": { old: extensions.ReplicaSet{ - ObjectMeta: api.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "", Namespace: metav1.NamespaceDefault}, Spec: extensions.ReplicaSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validLabels}, Template: validPodTemplate.Template, }, }, update: extensions.ReplicaSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: extensions.ReplicaSetSpec{ Replicas: 2, Selector: &metav1.LabelSelector{MatchLabels: validLabels}, @@ -1430,14 +1431,14 @@ func TestValidateReplicaSetUpdate(t *testing.T) { }, "negative replicas": { old: extensions.ReplicaSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: extensions.ReplicaSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validLabels}, Template: validPodTemplate.Template, }, }, update: extensions.ReplicaSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: extensions.ReplicaSetSpec{ Replicas: -1, Selector: &metav1.LabelSelector{MatchLabels: validLabels}, @@ -1457,26 +1458,26 @@ func TestValidateReplicaSet(t *testing.T) { validLabels := map[string]string{"a": "b"} validPodTemplate := api.PodTemplate{ Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validLabels, }, Spec: api.PodSpec{ RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, - Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: api.TerminationMessageReadFile}}, }, }, } readWriteVolumePodTemplate := api.PodTemplate{ Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validLabels, }, Spec: api.PodSpec{ Volumes: []api.Volume{{Name: "gcepd", VolumeSource: api.VolumeSource{GCEPersistentDisk: &api.GCEPersistentDiskVolumeSource{PDName: "my-PD", FSType: "ext4", Partition: 1, ReadOnly: false}}}}, RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, - Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: api.TerminationMessageReadFile}}, }, }, } @@ -1487,28 +1488,28 @@ func TestValidateReplicaSet(t *testing.T) { RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, }, - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: invalidLabels, }, }, } successCases := []extensions.ReplicaSet{ { - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: extensions.ReplicaSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validLabels}, Template: validPodTemplate.Template, }, }, { - ObjectMeta: api.ObjectMeta{Name: "abc-123", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc-123", Namespace: metav1.NamespaceDefault}, Spec: extensions.ReplicaSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validLabels}, Template: validPodTemplate.Template, }, }, { - ObjectMeta: api.ObjectMeta{Name: "abc-123", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc-123", Namespace: metav1.NamespaceDefault}, Spec: extensions.ReplicaSetSpec{ Replicas: 1, Selector: &metav1.LabelSelector{MatchLabels: validLabels}, @@ -1524,40 +1525,40 @@ func TestValidateReplicaSet(t *testing.T) { errorCases := map[string]extensions.ReplicaSet{ "zero-length ID": { - ObjectMeta: api.ObjectMeta{Name: "", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "", Namespace: metav1.NamespaceDefault}, Spec: extensions.ReplicaSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validLabels}, Template: validPodTemplate.Template, }, }, "missing-namespace": { - ObjectMeta: api.ObjectMeta{Name: "abc-123"}, + ObjectMeta: metav1.ObjectMeta{Name: "abc-123"}, Spec: extensions.ReplicaSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validLabels}, Template: validPodTemplate.Template, }, }, "empty selector": { - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: extensions.ReplicaSetSpec{ Template: validPodTemplate.Template, }, }, "selector_doesnt_match": { - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: extensions.ReplicaSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"foo": "bar"}}, Template: validPodTemplate.Template, }, }, "invalid manifest": { - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: extensions.ReplicaSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validLabels}, }, }, "read-write persistent disk with > 1 pod": { - ObjectMeta: api.ObjectMeta{Name: "abc"}, + ObjectMeta: metav1.ObjectMeta{Name: "abc"}, Spec: extensions.ReplicaSetSpec{ Replicas: 2, Selector: &metav1.LabelSelector{MatchLabels: validLabels}, @@ -1565,16 +1566,16 @@ func TestValidateReplicaSet(t *testing.T) { }, }, "negative_replicas": { - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: extensions.ReplicaSetSpec{ Replicas: -1, Selector: &metav1.LabelSelector{MatchLabels: validLabels}, }, }, "invalid_label": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc-123", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, Labels: map[string]string{ "NoUppercaseOrSpecialCharsLike=Equals": "bar", }, @@ -1585,9 +1586,9 @@ func TestValidateReplicaSet(t *testing.T) { }, }, "invalid_label 2": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc-123", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, Labels: map[string]string{ "NoUppercaseOrSpecialCharsLike=Equals": "bar", }, @@ -1597,9 +1598,9 @@ func TestValidateReplicaSet(t *testing.T) { }, }, "invalid_annotation": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc-123", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, Annotations: map[string]string{ "NoUppercaseOrSpecialCharsLike=Equals": "bar", }, @@ -1610,9 +1611,9 @@ func TestValidateReplicaSet(t *testing.T) { }, }, "invalid restart policy 1": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc-123", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, Spec: extensions.ReplicaSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validLabels}, @@ -1620,18 +1621,18 @@ func TestValidateReplicaSet(t *testing.T) { Spec: api.PodSpec{ RestartPolicy: api.RestartPolicyOnFailure, DNSPolicy: api.DNSClusterFirst, - Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: api.TerminationMessageReadFile}}, }, - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validLabels, }, }, }, }, "invalid restart policy 2": { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc-123", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, Spec: extensions.ReplicaSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validLabels}, @@ -1639,9 +1640,9 @@ func TestValidateReplicaSet(t *testing.T) { Spec: api.PodSpec{ RestartPolicy: api.RestartPolicyNever, DNSPolicy: api.DNSClusterFirst, - Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "ctr", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: api.TerminationMessageReadFile}}, }, - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validLabels, }, }, @@ -1675,7 +1676,7 @@ func TestValidateReplicaSet(t *testing.T) { func TestValidatePodSecurityPolicy(t *testing.T) { validPSP := func() *extensions.PodSecurityPolicy { return &extensions.PodSecurityPolicy{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Annotations: map[string]string{}, }, @@ -1998,7 +1999,7 @@ func TestValidatePodSecurityPolicy(t *testing.T) { func TestValidatePSPVolumes(t *testing.T) { validPSP := func() *extensions.PodSecurityPolicy { return &extensions.PodSecurityPolicy{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: extensions.PodSecurityPolicySpec{ SELinux: extensions.SELinuxStrategyOptions{ Rule: extensions.SELinuxStrategyRunAsAny, @@ -2033,7 +2034,7 @@ func TestValidatePSPVolumes(t *testing.T) { func TestValidateNetworkPolicy(t *testing.T) { successCases := []extensions.NetworkPolicy{ { - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "bar"}, Spec: extensions.NetworkPolicySpec{ PodSelector: metav1.LabelSelector{ MatchLabels: map[string]string{"a": "b"}, @@ -2042,7 +2043,7 @@ func TestValidateNetworkPolicy(t *testing.T) { }, }, { - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "bar"}, Spec: extensions.NetworkPolicySpec{ PodSelector: metav1.LabelSelector{ MatchLabels: map[string]string{"a": "b"}, @@ -2056,7 +2057,7 @@ func TestValidateNetworkPolicy(t *testing.T) { }, }, { - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "bar"}, Spec: extensions.NetworkPolicySpec{ PodSelector: metav1.LabelSelector{ MatchLabels: map[string]string{"a": "b"}, @@ -2075,7 +2076,7 @@ func TestValidateNetworkPolicy(t *testing.T) { }, }, { - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "bar"}, Spec: extensions.NetworkPolicySpec{ PodSelector: metav1.LabelSelector{ MatchLabels: map[string]string{"a": "b"}, @@ -2105,7 +2106,7 @@ func TestValidateNetworkPolicy(t *testing.T) { invalidSelector := map[string]string{"NoUppercaseOrSpecialCharsLike=Equals": "b"} errorCases := map[string]extensions.NetworkPolicy{ "namespaceSelector and podSelector": { - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "bar"}, Spec: extensions.NetworkPolicySpec{ PodSelector: metav1.LabelSelector{ MatchLabels: map[string]string{"a": "b"}, @@ -2127,7 +2128,7 @@ func TestValidateNetworkPolicy(t *testing.T) { }, }, "invalid spec.podSelector": { - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "bar"}, Spec: extensions.NetworkPolicySpec{ PodSelector: metav1.LabelSelector{ MatchLabels: invalidSelector, @@ -2146,7 +2147,7 @@ func TestValidateNetworkPolicy(t *testing.T) { }, }, "invalid ingress.from.podSelector": { - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "bar"}, Spec: extensions.NetworkPolicySpec{ PodSelector: metav1.LabelSelector{}, Ingress: []extensions.NetworkPolicyIngressRule{ @@ -2163,7 +2164,7 @@ func TestValidateNetworkPolicy(t *testing.T) { }, }, "invalid ingress.from.namespaceSelector": { - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "bar"}, Spec: extensions.NetworkPolicySpec{ PodSelector: metav1.LabelSelector{}, Ingress: []extensions.NetworkPolicyIngressRule{ @@ -2197,7 +2198,7 @@ func TestValidateNetworkPolicyUpdate(t *testing.T) { successCases := []npUpdateTest{ { old: extensions.NetworkPolicy{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "bar"}, Spec: extensions.NetworkPolicySpec{ PodSelector: metav1.LabelSelector{ MatchLabels: map[string]string{"a": "b"}, @@ -2206,7 +2207,7 @@ func TestValidateNetworkPolicyUpdate(t *testing.T) { }, }, update: extensions.NetworkPolicy{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "bar"}, Spec: extensions.NetworkPolicySpec{ PodSelector: metav1.LabelSelector{ MatchLabels: map[string]string{"a": "b"}, @@ -2227,14 +2228,14 @@ func TestValidateNetworkPolicyUpdate(t *testing.T) { errorCases := map[string]npUpdateTest{ "change name": { old: extensions.NetworkPolicy{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "bar"}, Spec: extensions.NetworkPolicySpec{ PodSelector: metav1.LabelSelector{}, Ingress: []extensions.NetworkPolicyIngressRule{}, }, }, update: extensions.NetworkPolicy{ - ObjectMeta: api.ObjectMeta{Name: "baz", Namespace: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "baz", Namespace: "bar"}, Spec: extensions.NetworkPolicySpec{ PodSelector: metav1.LabelSelector{}, Ingress: []extensions.NetworkPolicyIngressRule{}, @@ -2243,14 +2244,14 @@ func TestValidateNetworkPolicyUpdate(t *testing.T) { }, "change spec": { old: extensions.NetworkPolicy{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "bar"}, Spec: extensions.NetworkPolicySpec{ PodSelector: metav1.LabelSelector{}, Ingress: []extensions.NetworkPolicyIngressRule{}, }, }, update: extensions.NetworkPolicy{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "bar"}, Spec: extensions.NetworkPolicySpec{ PodSelector: metav1.LabelSelector{ MatchLabels: map[string]string{"a": "b"}, diff --git a/vendor/k8s.io/kubernetes/pkg/apis/extensions/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/extensions/zz_generated.deepcopy.go index ca292c1b..d01391d9 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/extensions/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/extensions/zz_generated.deepcopy.go @@ -166,8 +166,10 @@ func DeepCopy_extensions_DaemonSet(in interface{}, out interface{}, c *conversio in := in.(*DaemonSet) out := out.(*DaemonSet) *out = *in - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_extensions_DaemonSetSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -228,8 +230,10 @@ func DeepCopy_extensions_Deployment(in interface{}, out interface{}, c *conversi in := in.(*Deployment) out := out.(*Deployment) *out = *in - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_extensions_DeploymentSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -364,9 +368,7 @@ func DeepCopy_extensions_FSGroupStrategyOptions(in interface{}, out interface{}, if in.Ranges != nil { in, out := &in.Ranges, &out.Ranges *out = make([]IDRange, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } @@ -389,9 +391,7 @@ func DeepCopy_extensions_HTTPIngressRuleValue(in interface{}, out interface{}, c if in.Paths != nil { in, out := &in.Paths, &out.Paths *out = make([]HTTPIngressPath, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } @@ -420,8 +420,10 @@ func DeepCopy_extensions_Ingress(in interface{}, out interface{}, c *conversion. in := in.(*Ingress) out := out.(*Ingress) *out = *in - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_extensions_IngressSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -551,8 +553,10 @@ func DeepCopy_extensions_NetworkPolicy(in interface{}, out interface{}, c *conve in := in.(*NetworkPolicy) out := out.(*NetworkPolicy) *out = *in - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_extensions_NetworkPolicySpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -678,8 +682,10 @@ func DeepCopy_extensions_PodSecurityPolicy(in interface{}, out interface{}, c *c in := in.(*PodSecurityPolicy) out := out.(*PodSecurityPolicy) *out = *in - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_extensions_PodSecurityPolicySpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -714,37 +720,27 @@ func DeepCopy_extensions_PodSecurityPolicySpec(in interface{}, out interface{}, if in.DefaultAddCapabilities != nil { in, out := &in.DefaultAddCapabilities, &out.DefaultAddCapabilities *out = make([]api.Capability, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.RequiredDropCapabilities != nil { in, out := &in.RequiredDropCapabilities, &out.RequiredDropCapabilities *out = make([]api.Capability, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.AllowedCapabilities != nil { in, out := &in.AllowedCapabilities, &out.AllowedCapabilities *out = make([]api.Capability, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.Volumes != nil { in, out := &in.Volumes, &out.Volumes *out = make([]FSType, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.HostPorts != nil { in, out := &in.HostPorts, &out.HostPorts *out = make([]HostPortRange, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if err := DeepCopy_extensions_SELinuxStrategyOptions(&in.SELinux, &out.SELinux, c); err != nil { return err @@ -767,8 +763,10 @@ func DeepCopy_extensions_ReplicaSet(in interface{}, out interface{}, c *conversi in := in.(*ReplicaSet) out := out.(*ReplicaSet) *out = *in - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_extensions_ReplicaSetSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -881,9 +879,7 @@ func DeepCopy_extensions_RunAsUserStrategyOptions(in interface{}, out interface{ if in.Ranges != nil { in, out := &in.Ranges, &out.Ranges *out = make([]IDRange, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } @@ -908,8 +904,10 @@ func DeepCopy_extensions_Scale(in interface{}, out interface{}, c *conversion.Cl in := in.(*Scale) out := out.(*Scale) *out = *in - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_extensions_ScaleStatus(&in.Status, &out.Status, c); err != nil { return err @@ -952,9 +950,7 @@ func DeepCopy_extensions_SupplementalGroupsStrategyOptions(in interface{}, out i if in.Ranges != nil { in, out := &in.Ranges, &out.Ranges *out = make([]IDRange, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } @@ -965,15 +961,15 @@ func DeepCopy_extensions_ThirdPartyResource(in interface{}, out interface{}, c * in := in.(*ThirdPartyResource) out := out.(*ThirdPartyResource) *out = *in - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.Versions != nil { in, out := &in.Versions, &out.Versions *out = make([]APIVersion, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } @@ -984,8 +980,10 @@ func DeepCopy_extensions_ThirdPartyResourceData(in interface{}, out interface{}, in := in.(*ThirdPartyResourceData) out := out.(*ThirdPartyResourceData) *out = *in - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.Data != nil { in, out := &in.Data, &out.Data diff --git a/vendor/k8s.io/kubernetes/pkg/apis/imagepolicy/BUILD b/vendor/k8s.io/kubernetes/pkg/apis/imagepolicy/BUILD index 334248c5..f911aa3f 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/imagepolicy/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/apis/imagepolicy/BUILD @@ -17,7 +17,6 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/conversion", "//vendor:k8s.io/apimachinery/pkg/runtime", diff --git a/vendor/k8s.io/kubernetes/pkg/apis/imagepolicy/install/BUILD b/vendor/k8s.io/kubernetes/pkg/apis/imagepolicy/install/BUILD index 01680812..7778bbc2 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/imagepolicy/install/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/apis/imagepolicy/install/BUILD @@ -12,9 +12,12 @@ go_library( srcs = ["install.go"], tags = ["automanaged"], deps = [ - "//pkg/apimachinery/announced:go_default_library", + "//pkg/api:go_default_library", "//pkg/apis/imagepolicy:go_default_library", "//pkg/apis/imagepolicy/v1alpha1:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apimachinery/announced", + "//vendor:k8s.io/apimachinery/pkg/apimachinery/registered", + "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/sets", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/apis/imagepolicy/install/install.go b/vendor/k8s.io/kubernetes/pkg/apis/imagepolicy/install/install.go index 27b5a57a..2e8b28cb 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/imagepolicy/install/install.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/imagepolicy/install/install.go @@ -19,13 +19,21 @@ limitations under the License. package install import ( + "k8s.io/apimachinery/pkg/apimachinery/announced" + "k8s.io/apimachinery/pkg/apimachinery/registered" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/kubernetes/pkg/apimachinery/announced" + "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/imagepolicy" "k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1" ) func init() { + Install(api.GroupFactoryRegistry, api.Registry, api.Scheme) +} + +// Install registers the API group and adds types to a scheme +func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) { if err := announced.NewGroupMetaFactory( &announced.GroupMetaFactoryArgs{ GroupName: imagepolicy.GroupName, @@ -37,7 +45,7 @@ func init() { announced.VersionToSchemeFunc{ v1alpha1.SchemeGroupVersion.Version: v1alpha1.AddToScheme, }, - ).Announce().RegisterAndEnable(); err != nil { + ).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil { panic(err) } } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/imagepolicy/register.go b/vendor/k8s.io/kubernetes/pkg/apis/imagepolicy/register.go index 93efea73..446aaf5e 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/imagepolicy/register.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/imagepolicy/register.go @@ -17,10 +17,8 @@ limitations under the License. package imagepolicy import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/api" ) // GroupName is the group name use in this package @@ -46,11 +44,6 @@ var ( func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, - &api.ListOptions{}, - &api.DeleteOptions{}, - &metav1.ExportOptions{}, - &metav1.GetOptions{}, - &ImageReview{}, ) // metav1.AddToGroupVersion(scheme, SchemeGroupVersion) diff --git a/vendor/k8s.io/kubernetes/pkg/apis/imagepolicy/types.go b/vendor/k8s.io/kubernetes/pkg/apis/imagepolicy/types.go index 8a9cde14..d23d2c8a 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/imagepolicy/types.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/imagepolicy/types.go @@ -18,7 +18,6 @@ package imagepolicy import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/kubernetes/pkg/api" ) // +genclient=true @@ -28,7 +27,7 @@ import ( // ImageReview checks if the set of images in a pod are allowed. type ImageReview struct { metav1.TypeMeta - api.ObjectMeta + metav1.ObjectMeta // Spec holds information about the pod being evaluated Spec ImageReviewSpec diff --git a/vendor/k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1/BUILD b/vendor/k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1/BUILD index 0eb27359..4d8a137a 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1/BUILD @@ -22,7 +22,6 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api/v1:go_default_library", "//pkg/apis/imagepolicy:go_default_library", "//vendor:github.com/gogo/protobuf/proto", "//vendor:github.com/gogo/protobuf/sortkeys", diff --git a/vendor/k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1/generated.pb.go b/vendor/k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1/generated.pb.go index 42ce22c3..2688a9e5 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1/generated.pb.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1/generated.pb.go @@ -316,7 +316,7 @@ func (this *ImageReview) String() string { return "nil" } s := strings.Join([]string{`&ImageReview{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ImageReviewSpec", "ImageReviewSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ImageReviewStatus", "ImageReviewStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -1019,42 +1019,43 @@ var ( ) var fileDescriptorGenerated = []byte{ - // 588 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xa4, 0x92, 0xbf, 0x6f, 0x13, 0x31, - 0x14, 0xc7, 0x73, 0x49, 0x7f, 0xc5, 0x01, 0xda, 0x1a, 0x86, 0x28, 0xc3, 0xb5, 0x0a, 0x12, 0x2a, - 0x08, 0x6c, 0xa5, 0x42, 0xa8, 0x62, 0xa0, 0xf4, 0x10, 0x43, 0x07, 0x40, 0x98, 0x05, 0xb1, 0x39, - 0xd7, 0xd7, 0x8b, 0x9b, 0x3b, 0xfb, 0x74, 0xf6, 0xa5, 0xca, 0x80, 0xc4, 0xc8, 0xc0, 0xc0, 0x7f, - 0xc3, 0xbf, 0xd0, 0xb1, 0x23, 0x53, 0x45, 0xc3, 0x3f, 0x82, 0xce, 0x77, 0xe9, 0x1d, 0x4d, 0x23, - 0x84, 0xb2, 0xf9, 0xf9, 0xf9, 0x7d, 0xbe, 0x5f, 0xbf, 0xf7, 0xd0, 0xfe, 0x70, 0x4f, 0x13, 0xa1, - 0xe8, 0x30, 0xed, 0x43, 0x22, 0xc1, 0x80, 0xa6, 0xf1, 0x30, 0xa0, 0x3c, 0x16, 0x9a, 0x8a, 0x88, - 0x07, 0x10, 0xab, 0x50, 0xf8, 0x63, 0x3a, 0xea, 0xf1, 0x30, 0x1e, 0xf0, 0x1e, 0x0d, 0x40, 0x42, - 0xc2, 0x0d, 0x1c, 0x91, 0x38, 0x51, 0x46, 0x61, 0x9a, 0x03, 0x48, 0x09, 0x20, 0xf1, 0x30, 0x20, - 0x19, 0x80, 0x54, 0x00, 0x64, 0x0a, 0xe8, 0x3c, 0x09, 0x84, 0x19, 0xa4, 0x7d, 0xe2, 0xab, 0x88, - 0x06, 0x2a, 0x50, 0xd4, 0x72, 0xfa, 0xe9, 0xb1, 0x8d, 0x6c, 0x60, 0x4f, 0x39, 0xbf, 0xf3, 0xb4, - 0x30, 0xc8, 0x63, 0x11, 0x71, 0x7f, 0x20, 0x24, 0x24, 0xe3, 0xd2, 0x62, 0x04, 0x86, 0xd3, 0xd1, - 0x8c, 0xab, 0x0e, 0x9d, 0x57, 0x95, 0xa4, 0xd2, 0x88, 0x08, 0x66, 0x0a, 0x9e, 0xfd, 0xab, 0x40, - 0xfb, 0x03, 0x88, 0xf8, 0x4c, 0xdd, 0xee, 0xdc, 0xfe, 0xd1, 0x04, 0xb4, 0x4a, 0x13, 0x7f, 0x56, - 0xeb, 0xf1, 0xfc, 0x9a, 0x1b, 0xbe, 0xd2, 0xbb, 0xf9, 0x75, 0x6a, 0x44, 0x48, 0x85, 0x34, 0xda, - 0x24, 0xd7, 0x4b, 0xba, 0x3f, 0xea, 0xa8, 0x75, 0x98, 0xf5, 0x9e, 0xc1, 0x48, 0xc0, 0x29, 0xfe, - 0x88, 0xd6, 0xb2, 0x46, 0x1d, 0x71, 0xc3, 0xdb, 0xce, 0xb6, 0xb3, 0xd3, 0xda, 0xdd, 0x21, 0x73, - 0xc7, 0x46, 0x46, 0x3d, 0xf2, 0xae, 0x7f, 0x02, 0xbe, 0x79, 0x03, 0x86, 0x7b, 0xf8, 0xec, 0x62, - 0xab, 0x36, 0xb9, 0xd8, 0x42, 0xe5, 0x1d, 0xbb, 0xa2, 0xe1, 0x3e, 0x5a, 0xd2, 0x31, 0xf8, 0xed, - 0xba, 0xa5, 0xbe, 0x24, 0xff, 0xb9, 0x0c, 0xa4, 0xe2, 0xf2, 0x43, 0x0c, 0xbe, 0x77, 0xab, 0x50, - 0x5b, 0xca, 0x22, 0x66, 0xd9, 0xf8, 0x04, 0xad, 0x68, 0xc3, 0x4d, 0xaa, 0xdb, 0x0d, 0xab, 0xe2, - 0x2d, 0xa4, 0x62, 0x49, 0xde, 0x9d, 0x42, 0x67, 0x25, 0x8f, 0x59, 0xa1, 0xd0, 0xdd, 0x47, 0xed, - 0xca, 0xe3, 0x57, 0x4a, 0x1a, 0x9e, 0xad, 0x42, 0xe6, 0x06, 0xdf, 0x47, 0xcb, 0x96, 0x6e, 0x5b, - 0xd8, 0xf4, 0x6e, 0x17, 0x88, 0xe5, 0xbc, 0x20, 0xcf, 0x75, 0xbf, 0x35, 0xd0, 0xfa, 0xb5, 0x4f, - 0xe1, 0xcf, 0x08, 0xf9, 0x53, 0x92, 0x6e, 0x3b, 0xdb, 0x8d, 0x9d, 0xd6, 0xee, 0xe1, 0x22, 0x9f, - 0xf8, 0xcb, 0x57, 0x39, 0xa1, 0xab, 0x6b, 0xcd, 0x2a, 0x82, 0xf8, 0xab, 0x83, 0x5a, 0x5c, 0x4a, - 0x65, 0xb8, 0x11, 0x4a, 0xea, 0x76, 0xdd, 0x1a, 0x78, 0xbf, 0xe8, 0xac, 0xc8, 0x41, 0xc9, 0x7c, - 0x2d, 0x4d, 0x32, 0xf6, 0xee, 0x16, 0x46, 0x5a, 0x95, 0x0c, 0xab, 0x4a, 0x63, 0x8a, 0x9a, 0x92, - 0x47, 0xa0, 0x63, 0xee, 0x83, 0x9d, 0x66, 0xd3, 0xdb, 0x2c, 0x8a, 0x9a, 0x6f, 0xa7, 0x09, 0x56, - 0xbe, 0xe9, 0xbc, 0x40, 0x1b, 0xd7, 0x65, 0xf0, 0x06, 0x6a, 0x0c, 0x61, 0x9c, 0x4f, 0x81, 0x65, - 0x47, 0x7c, 0x0f, 0x2d, 0x8f, 0x78, 0x98, 0x82, 0x5d, 0xc3, 0x26, 0xcb, 0x83, 0xe7, 0xf5, 0x3d, - 0xa7, 0x7b, 0x8c, 0x36, 0x67, 0x86, 0x8f, 0x1f, 0xa2, 0x55, 0x1e, 0x86, 0xea, 0x14, 0x8e, 0x2c, - 0x64, 0xcd, 0x5b, 0x2f, 0x3c, 0xac, 0x1e, 0xe4, 0xd7, 0x6c, 0x9a, 0xc7, 0x0f, 0xd0, 0x4a, 0x02, - 0x5c, 0x2b, 0x99, 0xa3, 0xcb, 0xbd, 0x61, 0xf6, 0x96, 0x15, 0x59, 0xef, 0xd1, 0xd9, 0xa5, 0x5b, - 0x3b, 0xbf, 0x74, 0x6b, 0x3f, 0x2f, 0xdd, 0xda, 0x97, 0x89, 0xeb, 0x9c, 0x4d, 0x5c, 0xe7, 0x7c, - 0xe2, 0x3a, 0xbf, 0x26, 0xae, 0xf3, 0xfd, 0xb7, 0x5b, 0xfb, 0xb4, 0x36, 0xed, 0xe3, 0x9f, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x85, 0x95, 0xf8, 0x16, 0x73, 0x05, 0x00, 0x00, + // 594 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xa4, 0x92, 0x3f, 0x6f, 0x13, 0x4d, + 0x10, 0xc6, 0x7d, 0x76, 0xfe, 0x79, 0xfd, 0xbe, 0x24, 0x59, 0x28, 0x4e, 0x2e, 0x2e, 0x91, 0x91, + 0x50, 0x40, 0xb0, 0x8b, 0x23, 0x84, 0x22, 0x0a, 0x42, 0x0e, 0x51, 0xa4, 0x00, 0xc4, 0xd2, 0x51, + 0xb1, 0xbe, 0x4c, 0xce, 0x1b, 0xdf, 0xed, 0x9e, 0x6e, 0xf7, 0x1c, 0xb9, 0x40, 0xa2, 0xa4, 0xa0, + 0xe0, 0x1b, 0xd1, 0xa6, 0x4c, 0x49, 0x15, 0x11, 0xf3, 0x45, 0xd0, 0xed, 0x9d, 0x73, 0x47, 0x9c, + 0x08, 0xa1, 0x74, 0x3b, 0x3b, 0x3b, 0xbf, 0xe7, 0x99, 0x99, 0x45, 0xbb, 0xa3, 0x1d, 0x4d, 0x84, + 0xa2, 0xa3, 0x6c, 0x00, 0xa9, 0x04, 0x03, 0x9a, 0x26, 0xa3, 0x90, 0xf2, 0x44, 0x68, 0x2a, 0x62, + 0x1e, 0x42, 0xa2, 0x22, 0x11, 0x4c, 0xe8, 0xb8, 0xcf, 0xa3, 0x64, 0xc8, 0xfb, 0x34, 0x04, 0x09, + 0x29, 0x37, 0x70, 0x40, 0x92, 0x54, 0x19, 0x85, 0x69, 0x01, 0x20, 0x15, 0x80, 0x24, 0xa3, 0x90, + 0xe4, 0x00, 0x52, 0x03, 0x90, 0x19, 0xa0, 0xfb, 0x28, 0x14, 0x66, 0x98, 0x0d, 0x48, 0xa0, 0x62, + 0x1a, 0xaa, 0x50, 0x51, 0xcb, 0x19, 0x64, 0x87, 0x36, 0xb2, 0x81, 0x3d, 0x15, 0xfc, 0xee, 0x93, + 0xd2, 0x20, 0x4f, 0x44, 0xcc, 0x83, 0xa1, 0x90, 0x90, 0x4e, 0x2a, 0x8b, 0x31, 0x18, 0x4e, 0xc7, + 0x73, 0xae, 0xba, 0xf4, 0xba, 0xaa, 0x34, 0x93, 0x46, 0xc4, 0x30, 0x57, 0xf0, 0xf4, 0x6f, 0x05, + 0x3a, 0x18, 0x42, 0xcc, 0xe7, 0xea, 0xb6, 0xaf, 0x9d, 0x1f, 0x4d, 0x41, 0xab, 0x2c, 0x0d, 0xe6, + 0xb5, 0x1e, 0x5e, 0x5f, 0x73, 0x45, 0x2b, 0xfd, 0xab, 0x5f, 0x67, 0x46, 0x44, 0x54, 0x48, 0xa3, + 0x4d, 0x7a, 0xb9, 0xa4, 0xf7, 0xbd, 0x89, 0x3a, 0xfb, 0xf9, 0xec, 0x19, 0x8c, 0x05, 0x1c, 0xe3, + 0x8f, 0x68, 0x25, 0x1f, 0xd4, 0x01, 0x37, 0xdc, 0x75, 0x36, 0x9d, 0xad, 0xce, 0xf6, 0x63, 0x52, + 0xae, 0xad, 0xde, 0x6f, 0xb5, 0xb8, 0xfc, 0x35, 0x19, 0xf7, 0xc9, 0xdb, 0xc1, 0x11, 0x04, 0xe6, + 0x35, 0x18, 0xee, 0xe3, 0x93, 0xb3, 0x8d, 0xc6, 0xf4, 0x6c, 0x03, 0x55, 0x77, 0xec, 0x82, 0x8a, + 0x07, 0x68, 0x41, 0x27, 0x10, 0xb8, 0x4d, 0x4b, 0x7f, 0x41, 0xfe, 0xf1, 0x53, 0x90, 0x9a, 0xdb, + 0xf7, 0x09, 0x04, 0xfe, 0x7f, 0xa5, 0xda, 0x42, 0x1e, 0x31, 0xcb, 0xc6, 0x47, 0x68, 0x49, 0x1b, + 0x6e, 0x32, 0xed, 0xb6, 0xac, 0x8a, 0x7f, 0x23, 0x15, 0x4b, 0xf2, 0x6f, 0x95, 0x3a, 0x4b, 0x45, + 0xcc, 0x4a, 0x85, 0xde, 0x2e, 0x72, 0x6b, 0x8f, 0x5f, 0x2a, 0x69, 0x78, 0x3e, 0xa2, 0xdc, 0x0d, + 0xbe, 0x8b, 0x16, 0x2d, 0xdd, 0x8e, 0xb2, 0xed, 0xff, 0x5f, 0x22, 0x16, 0x8b, 0x82, 0x22, 0xd7, + 0xfb, 0xda, 0x42, 0xab, 0x97, 0x9a, 0xc2, 0x9f, 0x10, 0x0a, 0x66, 0x24, 0xed, 0x3a, 0x9b, 0xad, + 0xad, 0xce, 0xf6, 0xfe, 0x4d, 0x9a, 0xf8, 0xc3, 0x57, 0xb5, 0xa1, 0x8b, 0x6b, 0xcd, 0x6a, 0x82, + 0xf8, 0x8b, 0x83, 0x3a, 0x5c, 0x4a, 0x65, 0xb8, 0x11, 0x4a, 0x6a, 0xb7, 0x69, 0x0d, 0xbc, 0xbb, + 0xe9, 0xae, 0xc8, 0x5e, 0xc5, 0x7c, 0x25, 0x4d, 0x3a, 0xf1, 0x6f, 0x97, 0x46, 0x3a, 0xb5, 0x0c, + 0xab, 0x4b, 0x63, 0x8a, 0xda, 0x92, 0xc7, 0xa0, 0x13, 0x1e, 0x80, 0xdd, 0x66, 0xdb, 0x5f, 0x2f, + 0x8b, 0xda, 0x6f, 0x66, 0x09, 0x56, 0xbd, 0xe9, 0x3e, 0x47, 0x6b, 0x97, 0x65, 0xf0, 0x1a, 0x6a, + 0x8d, 0x60, 0x52, 0x6c, 0x81, 0xe5, 0x47, 0x7c, 0x07, 0x2d, 0x8e, 0x79, 0x94, 0x81, 0xfd, 0x86, + 0x6d, 0x56, 0x04, 0xcf, 0x9a, 0x3b, 0x4e, 0xef, 0x10, 0xad, 0xcf, 0x2d, 0x1f, 0xdf, 0x47, 0xcb, + 0x3c, 0x8a, 0xd4, 0x31, 0x1c, 0x58, 0xc8, 0x8a, 0xbf, 0x5a, 0x7a, 0x58, 0xde, 0x2b, 0xae, 0xd9, + 0x2c, 0x8f, 0xef, 0xa1, 0xa5, 0x14, 0xb8, 0x56, 0xb2, 0x40, 0x57, 0xff, 0x86, 0xd9, 0x5b, 0x56, + 0x66, 0xfd, 0x07, 0x27, 0xe7, 0x5e, 0xe3, 0xf4, 0xdc, 0x6b, 0xfc, 0x38, 0xf7, 0x1a, 0x9f, 0xa7, + 0x9e, 0x73, 0x32, 0xf5, 0x9c, 0xd3, 0xa9, 0xe7, 0xfc, 0x9c, 0x7a, 0xce, 0xb7, 0x5f, 0x5e, 0xe3, + 0xc3, 0xca, 0x6c, 0x8e, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x3f, 0x81, 0x72, 0x5a, 0x7b, 0x05, + 0x00, 0x00, } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1/generated.proto b/vendor/k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1/generated.proto index 8e72f540..42d5a606 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1/generated.proto +++ b/vendor/k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1/generated.proto @@ -34,7 +34,7 @@ option go_package = "v1alpha1"; // ImageReview checks if the set of images in a pod are allowed. message ImageReview { // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec holds information about the pod being evaluated optional ImageReviewSpec spec = 2; diff --git a/vendor/k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1/register.go b/vendor/k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1/register.go index 1f3c708c..81ac79a8 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1/register.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1/register.go @@ -20,7 +20,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/api/v1" ) // GroupName is the group name for this API. @@ -42,12 +41,8 @@ var ( // Adds the list of known types to api.Scheme. func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, - &v1.ListOptions{}, - &v1.DeleteOptions{}, - &metav1.ExportOptions{}, - &metav1.GetOptions{}, - &ImageReview{}, ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1/types.generated.go b/vendor/k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1/types.generated.go index acd80e63..3a4372e3 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1/types.generated.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1/types.generated.go @@ -26,8 +26,7 @@ import ( "fmt" codec1978 "github.com/ugorji/go/codec" pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - pkg3_types "k8s.io/apimachinery/pkg/types" - pkg2_v1 "k8s.io/kubernetes/pkg/api/v1" + pkg2_types "k8s.io/apimachinery/pkg/types" "reflect" "runtime" time "time" @@ -64,10 +63,9 @@ func init() { } if false { // reference the types, but skip this branch at build/run time var v0 pkg1_v1.TypeMeta - var v1 pkg3_types.UID - var v2 pkg2_v1.ObjectMeta - var v3 time.Time - _, _, _, _ = v0, v1, v2, v3 + var v1 pkg2_types.UID + var v2 time.Time + _, _, _ = v0, v1, v2 } } @@ -159,7 +157,13 @@ func (x *ImageReview) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -169,7 +173,13 @@ func (x *ImageReview) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -287,24 +297,30 @@ func (x *ImageReview) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = ImageReviewSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = ImageReviewStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -317,16 +333,16 @@ func (x *ImageReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -334,21 +350,21 @@ func (x *ImageReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -356,38 +372,44 @@ func (x *ImageReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -395,16 +417,16 @@ func (x *ImageReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = ImageReviewSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -412,21 +434,21 @@ func (x *ImageReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = ImageReviewStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1/types.go b/vendor/k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1/types.go index 44d0a51c..483e18ff 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1/types.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1/types.go @@ -18,7 +18,6 @@ package v1alpha1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/kubernetes/pkg/api/v1" ) // +genclient=true @@ -29,7 +28,7 @@ import ( type ImageReview struct { metav1.TypeMeta `json:",inline"` // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec holds information about the pod being evaluated Spec ImageReviewSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` diff --git a/vendor/k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1/zz_generated.conversion.go index 6b08859b..520423b7 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1/zz_generated.conversion.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1/zz_generated.conversion.go @@ -47,10 +47,7 @@ func RegisterConversions(scheme *runtime.Scheme) error { } func autoConvert_v1alpha1_ImageReview_To_imagepolicy_ImageReview(in *ImageReview, out *imagepolicy.ImageReview, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1alpha1_ImageReviewSpec_To_imagepolicy_ImageReviewSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -65,10 +62,7 @@ func Convert_v1alpha1_ImageReview_To_imagepolicy_ImageReview(in *ImageReview, ou } func autoConvert_imagepolicy_ImageReview_To_v1alpha1_ImageReview(in *imagepolicy.ImageReview, out *ImageReview, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_imagepolicy_ImageReviewSpec_To_v1alpha1_ImageReviewSpec(&in.Spec, &out.Spec, s); err != nil { return err } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1/zz_generated.deepcopy.go index 5fc919a5..e306af0d 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1/zz_generated.deepcopy.go @@ -21,9 +21,9 @@ limitations under the License. package v1alpha1 import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - v1 "k8s.io/kubernetes/pkg/api/v1" reflect "reflect" ) @@ -47,8 +47,10 @@ func DeepCopy_v1alpha1_ImageReview(in interface{}, out interface{}, c *conversio in := in.(*ImageReview) out := out.(*ImageReview) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v1alpha1_ImageReviewSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -74,9 +76,7 @@ func DeepCopy_v1alpha1_ImageReviewSpec(in interface{}, out interface{}, c *conve if in.Containers != nil { in, out := &in.Containers, &out.Containers *out = make([]ImageReviewContainerSpec, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.Annotations != nil { in, out := &in.Annotations, &out.Annotations diff --git a/vendor/k8s.io/kubernetes/pkg/apis/imagepolicy/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/imagepolicy/zz_generated.deepcopy.go index 7ff4d65e..a2fa6c2e 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/imagepolicy/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/imagepolicy/zz_generated.deepcopy.go @@ -21,9 +21,9 @@ limitations under the License. package imagepolicy import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - api "k8s.io/kubernetes/pkg/api" reflect "reflect" ) @@ -47,8 +47,10 @@ func DeepCopy_imagepolicy_ImageReview(in interface{}, out interface{}, c *conver in := in.(*ImageReview) out := out.(*ImageReview) *out = *in - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_imagepolicy_ImageReviewSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -74,9 +76,7 @@ func DeepCopy_imagepolicy_ImageReviewSpec(in interface{}, out interface{}, c *co if in.Containers != nil { in, out := &in.Containers, &out.Containers *out = make([]ImageReviewContainerSpec, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.Annotations != nil { in, out := &in.Annotations, &out.Annotations diff --git a/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/BUILD b/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/BUILD index 6a20617e..13eaf5a1 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/BUILD @@ -5,63 +5,16 @@ licenses(["notice"]) load( "@io_bazel_rules_go//go:def.bzl", "go_library", - "go_test", ) go_library( name = "go_default_library", - srcs = [ - "doc.go", - "duration.go", - "generated.pb.go", - "group_version.go", - "helpers.go", - "meta.go", - "register.go", - "time.go", - "time_proto.go", - "types.go", - "types_swagger_doc_generated.go", - "watch.go", - "well_known_labels.go", - "zz_generated.deepcopy.go", - "zz_generated.defaults.go", - ], + srcs = ["time.go"], tags = ["automanaged"], deps = [ - "//pkg/conversion:go_default_library", - "//pkg/genericapiserver/openapi/common:go_default_library", - "//pkg/labels:go_default_library", - "//pkg/runtime:go_default_library", - "//pkg/runtime/schema:go_default_library", - "//pkg/selection:go_default_library", - "//pkg/types:go_default_library", - "//pkg/watch:go_default_library", "//vendor:github.com/go-openapi/spec", - "//vendor:github.com/gogo/protobuf/proto", - "//vendor:github.com/gogo/protobuf/sortkeys", "//vendor:github.com/google/gofuzz", - "//vendor:github.com/ugorji/go/codec", - "//vendor:k8s.io/apimachinery/pkg/conversion", - "//vendor:k8s.io/apimachinery/pkg/runtime", - ], -) - -go_test( - name = "go_default_test", - srcs = [ - "duration_test.go", - "group_version_test.go", - "helpers_test.go", - "time_test.go", - "types_test.go", - ], - library = ":go_default_library", - tags = ["automanaged"], - deps = [ - "//pkg/labels:go_default_library", - "//vendor:github.com/ghodss/yaml", - "//vendor:github.com/ugorji/go/codec", + "//vendor:k8s.io/apimachinery/pkg/openapi", ], ) @@ -74,9 +27,6 @@ filegroup( filegroup( name = "all-srcs", - srcs = [ - ":package-srcs", - "//pkg/apis/meta/v1/unstructured:all-srcs", - ], + srcs = [":package-srcs"], tags = ["automanaged"], ) diff --git a/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/OWNERS b/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/OWNERS deleted file mode 100755 index 381a5250..00000000 --- a/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/OWNERS +++ /dev/null @@ -1,33 +0,0 @@ -reviewers: -- thockin -- smarterclayton -- wojtek-t -- deads2k -- brendandburns -- caesarxuchao -- liggitt -- nikhiljindal -- gmarek -- erictune -- davidopp -- sttts -- quinton-hoole -- kargakis -- luxas -- janetkuo -- justinsb -- ncdc -- timothysc -- soltysh -- dims -- madhusudancs -- hongchaodeng -- krousey -- mml -- mbohlool -- david-mcmahon -- therc -- mqliang -- kevin-wangzefeng -- jianhuiz -- feihujiang diff --git a/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/duration.go b/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/duration.go deleted file mode 100644 index fea458df..00000000 --- a/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/duration.go +++ /dev/null @@ -1,47 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1 - -import ( - "encoding/json" - "time" -) - -// Duration is a wrapper around time.Duration which supports correct -// marshaling to YAML and JSON. In particular, it marshals into strings, which -// can be used as map keys in json. -type Duration struct { - time.Duration `protobuf:"varint,1,opt,name=duration,casttype=time.Duration"` -} - -// UnmarshalJSON implements the json.Unmarshaller interface. -func (d *Duration) UnmarshalJSON(b []byte) error { - var str string - json.Unmarshal(b, &str) - - pd, err := time.ParseDuration(str) - if err != nil { - return err - } - d.Duration = pd - return nil -} - -// MarshalJSON implements the json.Marshaler interface. -func (d Duration) MarshalJSON() ([]byte, error) { - return json.Marshal(d.Duration.String()) -} diff --git a/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/duration_test.go b/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/duration_test.go deleted file mode 100644 index 7230cb28..00000000 --- a/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/duration_test.go +++ /dev/null @@ -1,153 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1 - -import ( - "encoding/json" - "testing" - "time" - - "github.com/ghodss/yaml" -) - -type DurationHolder struct { - D Duration `json:"d"` -} - -func TestDurationMarshalYAML(t *testing.T) { - cases := []struct { - input Duration - result string - }{ - {Duration{5 * time.Second}, "d: 5s\n"}, - {Duration{2 * time.Minute}, "d: 2m0s\n"}, - {Duration{time.Hour + 3*time.Millisecond}, "d: 1h0m0.003s\n"}, - } - - for _, c := range cases { - input := DurationHolder{c.input} - result, err := yaml.Marshal(&input) - if err != nil { - t.Errorf("Failed to marshal input: %q: %v", input, err) - } - if string(result) != c.result { - t.Errorf("Failed to marshal input: %q: expected %q, got %q", input, c.result, string(result)) - } - } -} - -func TestDurationUnmarshalYAML(t *testing.T) { - cases := []struct { - input string - result Duration - }{ - {"d: 0s\n", Duration{}}, - {"d: 5s\n", Duration{5 * time.Second}}, - {"d: 2m0s\n", Duration{2 * time.Minute}}, - {"d: 1h0m0.003s\n", Duration{time.Hour + 3*time.Millisecond}}, - - // Units with zero values can optionally be dropped - {"d: 2m\n", Duration{2 * time.Minute}}, - {"d: 1h0.003s\n", Duration{time.Hour + 3*time.Millisecond}}, - } - - for _, c := range cases { - var result DurationHolder - if err := yaml.Unmarshal([]byte(c.input), &result); err != nil { - t.Errorf("Failed to unmarshal input %q: %v", c.input, err) - } - if result.D != c.result { - t.Errorf("Failed to unmarshal input %q: expected %q, got %q", c.input, c.result, result) - } - } -} - -func TestDurationMarshalJSON(t *testing.T) { - cases := []struct { - input Duration - result string - }{ - {Duration{5 * time.Second}, `{"d":"5s"}`}, - {Duration{2 * time.Minute}, `{"d":"2m0s"}`}, - {Duration{time.Hour + 3*time.Millisecond}, `{"d":"1h0m0.003s"}`}, - } - - for _, c := range cases { - input := DurationHolder{c.input} - result, err := json.Marshal(&input) - if err != nil { - t.Errorf("Failed to marshal input: %q: %v", input, err) - } - if string(result) != c.result { - t.Errorf("Failed to marshal input: %q: expected %q, got %q", input, c.result, string(result)) - } - } -} - -func TestDurationUnmarshalJSON(t *testing.T) { - cases := []struct { - input string - result Duration - }{ - {`{"d":"0s"}`, Duration{}}, - {`{"d":"5s"}`, Duration{5 * time.Second}}, - {`{"d":"2m0s"}`, Duration{2 * time.Minute}}, - {`{"d":"1h0m0.003s"}`, Duration{time.Hour + 3*time.Millisecond}}, - - // Units with zero values can optionally be dropped - {`{"d":"2m"}`, Duration{2 * time.Minute}}, - {`{"d":"1h0.003s"}`, Duration{time.Hour + 3*time.Millisecond}}, - } - - for _, c := range cases { - var result DurationHolder - if err := json.Unmarshal([]byte(c.input), &result); err != nil { - t.Errorf("Failed to unmarshal input %q: %v", c.input, err) - } - if result.D != c.result { - t.Errorf("Failed to unmarshal input %q: expected %q, got %q", c.input, c.result, result) - } - } -} - -func TestDurationMarshalJSONUnmarshalYAML(t *testing.T) { - cases := []struct { - input Duration - }{ - {Duration{}}, - {Duration{5 * time.Second}}, - {Duration{2 * time.Minute}}, - {Duration{time.Hour + 3*time.Millisecond}}, - } - - for i, c := range cases { - input := DurationHolder{c.input} - jsonMarshalled, err := json.Marshal(&input) - if err != nil { - t.Errorf("%d-1: Failed to marshal input: '%v': %v", i, input, err) - } - - var result DurationHolder - if err := yaml.Unmarshal(jsonMarshalled, &result); err != nil { - t.Errorf("%d-2: Failed to unmarshal '%+v': %v", i, string(jsonMarshalled), err) - } - - if input.D != result.D { - t.Errorf("%d-4: Failed to marshal input '%#v': got %#v", i, input, result) - } - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/generated.pb.go b/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/generated.pb.go deleted file mode 100644 index 50e95375..00000000 --- a/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/generated.pb.go +++ /dev/null @@ -1,5288 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by protoc-gen-gogo. -// source: k8s.io/kubernetes/pkg/apis/meta/v1/generated.proto -// DO NOT EDIT! - -/* - Package v1 is a generated protocol buffer package. - - It is generated from these files: - k8s.io/kubernetes/pkg/apis/meta/v1/generated.proto - - It has these top-level messages: - APIGroup - APIGroupList - APIResource - APIResourceList - APIVersions - Duration - ExportOptions - GetOptions - GroupKind - GroupResource - GroupVersion - GroupVersionForDiscovery - GroupVersionKind - GroupVersionResource - LabelSelector - LabelSelectorRequirement - ListMeta - OwnerReference - RootPaths - ServerAddressByClientCIDR - Status - StatusCause - StatusDetails - Time - Timestamp - TypeMeta - Verbs - WatchEvent -*/ -package v1 - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" - -import time "time" -import k8s_io_kubernetes_pkg_types "k8s.io/kubernetes/pkg/types" - -import strings "strings" -import reflect "reflect" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -const _ = proto.GoGoProtoPackageIsVersion1 - -func (m *APIGroup) Reset() { *m = APIGroup{} } -func (*APIGroup) ProtoMessage() {} -func (*APIGroup) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} } - -func (m *APIGroupList) Reset() { *m = APIGroupList{} } -func (*APIGroupList) ProtoMessage() {} -func (*APIGroupList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} } - -func (m *APIResource) Reset() { *m = APIResource{} } -func (*APIResource) ProtoMessage() {} -func (*APIResource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} } - -func (m *APIResourceList) Reset() { *m = APIResourceList{} } -func (*APIResourceList) ProtoMessage() {} -func (*APIResourceList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} } - -func (m *APIVersions) Reset() { *m = APIVersions{} } -func (*APIVersions) ProtoMessage() {} -func (*APIVersions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} } - -func (m *Duration) Reset() { *m = Duration{} } -func (*Duration) ProtoMessage() {} -func (*Duration) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} } - -func (m *ExportOptions) Reset() { *m = ExportOptions{} } -func (*ExportOptions) ProtoMessage() {} -func (*ExportOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} } - -func (m *GetOptions) Reset() { *m = GetOptions{} } -func (*GetOptions) ProtoMessage() {} -func (*GetOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} } - -func (m *GroupKind) Reset() { *m = GroupKind{} } -func (*GroupKind) ProtoMessage() {} -func (*GroupKind) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} } - -func (m *GroupResource) Reset() { *m = GroupResource{} } -func (*GroupResource) ProtoMessage() {} -func (*GroupResource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} } - -func (m *GroupVersion) Reset() { *m = GroupVersion{} } -func (*GroupVersion) ProtoMessage() {} -func (*GroupVersion) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{10} } - -func (m *GroupVersionForDiscovery) Reset() { *m = GroupVersionForDiscovery{} } -func (*GroupVersionForDiscovery) ProtoMessage() {} -func (*GroupVersionForDiscovery) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{11} -} - -func (m *GroupVersionKind) Reset() { *m = GroupVersionKind{} } -func (*GroupVersionKind) ProtoMessage() {} -func (*GroupVersionKind) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{12} } - -func (m *GroupVersionResource) Reset() { *m = GroupVersionResource{} } -func (*GroupVersionResource) ProtoMessage() {} -func (*GroupVersionResource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{13} } - -func (m *LabelSelector) Reset() { *m = LabelSelector{} } -func (*LabelSelector) ProtoMessage() {} -func (*LabelSelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{14} } - -func (m *LabelSelectorRequirement) Reset() { *m = LabelSelectorRequirement{} } -func (*LabelSelectorRequirement) ProtoMessage() {} -func (*LabelSelectorRequirement) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{15} -} - -func (m *ListMeta) Reset() { *m = ListMeta{} } -func (*ListMeta) ProtoMessage() {} -func (*ListMeta) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{16} } - -func (m *OwnerReference) Reset() { *m = OwnerReference{} } -func (*OwnerReference) ProtoMessage() {} -func (*OwnerReference) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{17} } - -func (m *RootPaths) Reset() { *m = RootPaths{} } -func (*RootPaths) ProtoMessage() {} -func (*RootPaths) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{18} } - -func (m *ServerAddressByClientCIDR) Reset() { *m = ServerAddressByClientCIDR{} } -func (*ServerAddressByClientCIDR) ProtoMessage() {} -func (*ServerAddressByClientCIDR) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{19} -} - -func (m *Status) Reset() { *m = Status{} } -func (*Status) ProtoMessage() {} -func (*Status) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{20} } - -func (m *StatusCause) Reset() { *m = StatusCause{} } -func (*StatusCause) ProtoMessage() {} -func (*StatusCause) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{21} } - -func (m *StatusDetails) Reset() { *m = StatusDetails{} } -func (*StatusDetails) ProtoMessage() {} -func (*StatusDetails) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{22} } - -func (m *Time) Reset() { *m = Time{} } -func (*Time) ProtoMessage() {} -func (*Time) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{23} } - -func (m *Timestamp) Reset() { *m = Timestamp{} } -func (*Timestamp) ProtoMessage() {} -func (*Timestamp) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{24} } - -func (m *TypeMeta) Reset() { *m = TypeMeta{} } -func (*TypeMeta) ProtoMessage() {} -func (*TypeMeta) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{25} } - -func (m *Verbs) Reset() { *m = Verbs{} } -func (*Verbs) ProtoMessage() {} -func (*Verbs) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{26} } - -func (m *WatchEvent) Reset() { *m = WatchEvent{} } -func (*WatchEvent) ProtoMessage() {} -func (*WatchEvent) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{27} } - -func init() { - proto.RegisterType((*APIGroup)(nil), "k8s.io.kubernetes.pkg.apis.meta.v1.APIGroup") - proto.RegisterType((*APIGroupList)(nil), "k8s.io.kubernetes.pkg.apis.meta.v1.APIGroupList") - proto.RegisterType((*APIResource)(nil), "k8s.io.kubernetes.pkg.apis.meta.v1.APIResource") - proto.RegisterType((*APIResourceList)(nil), "k8s.io.kubernetes.pkg.apis.meta.v1.APIResourceList") - proto.RegisterType((*APIVersions)(nil), "k8s.io.kubernetes.pkg.apis.meta.v1.APIVersions") - proto.RegisterType((*Duration)(nil), "k8s.io.kubernetes.pkg.apis.meta.v1.Duration") - proto.RegisterType((*ExportOptions)(nil), "k8s.io.kubernetes.pkg.apis.meta.v1.ExportOptions") - proto.RegisterType((*GetOptions)(nil), "k8s.io.kubernetes.pkg.apis.meta.v1.GetOptions") - proto.RegisterType((*GroupKind)(nil), "k8s.io.kubernetes.pkg.apis.meta.v1.GroupKind") - proto.RegisterType((*GroupResource)(nil), "k8s.io.kubernetes.pkg.apis.meta.v1.GroupResource") - proto.RegisterType((*GroupVersion)(nil), "k8s.io.kubernetes.pkg.apis.meta.v1.GroupVersion") - proto.RegisterType((*GroupVersionForDiscovery)(nil), "k8s.io.kubernetes.pkg.apis.meta.v1.GroupVersionForDiscovery") - proto.RegisterType((*GroupVersionKind)(nil), "k8s.io.kubernetes.pkg.apis.meta.v1.GroupVersionKind") - proto.RegisterType((*GroupVersionResource)(nil), "k8s.io.kubernetes.pkg.apis.meta.v1.GroupVersionResource") - proto.RegisterType((*LabelSelector)(nil), "k8s.io.kubernetes.pkg.apis.meta.v1.LabelSelector") - proto.RegisterType((*LabelSelectorRequirement)(nil), "k8s.io.kubernetes.pkg.apis.meta.v1.LabelSelectorRequirement") - proto.RegisterType((*ListMeta)(nil), "k8s.io.kubernetes.pkg.apis.meta.v1.ListMeta") - proto.RegisterType((*OwnerReference)(nil), "k8s.io.kubernetes.pkg.apis.meta.v1.OwnerReference") - proto.RegisterType((*RootPaths)(nil), "k8s.io.kubernetes.pkg.apis.meta.v1.RootPaths") - proto.RegisterType((*ServerAddressByClientCIDR)(nil), "k8s.io.kubernetes.pkg.apis.meta.v1.ServerAddressByClientCIDR") - proto.RegisterType((*Status)(nil), "k8s.io.kubernetes.pkg.apis.meta.v1.Status") - proto.RegisterType((*StatusCause)(nil), "k8s.io.kubernetes.pkg.apis.meta.v1.StatusCause") - proto.RegisterType((*StatusDetails)(nil), "k8s.io.kubernetes.pkg.apis.meta.v1.StatusDetails") - proto.RegisterType((*Time)(nil), "k8s.io.kubernetes.pkg.apis.meta.v1.Time") - proto.RegisterType((*Timestamp)(nil), "k8s.io.kubernetes.pkg.apis.meta.v1.Timestamp") - proto.RegisterType((*TypeMeta)(nil), "k8s.io.kubernetes.pkg.apis.meta.v1.TypeMeta") - proto.RegisterType((*Verbs)(nil), "k8s.io.kubernetes.pkg.apis.meta.v1.Verbs") - proto.RegisterType((*WatchEvent)(nil), "k8s.io.kubernetes.pkg.apis.meta.v1.WatchEvent") -} -func (m *APIGroup) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *APIGroup) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.Name))) - i += copy(data[i:], m.Name) - if len(m.Versions) > 0 { - for _, msg := range m.Versions { - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - data[i] = 0x1a - i++ - i = encodeVarintGenerated(data, i, uint64(m.PreferredVersion.Size())) - n1, err := m.PreferredVersion.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n1 - if len(m.ServerAddressByClientCIDRs) > 0 { - for _, msg := range m.ServerAddressByClientCIDRs { - data[i] = 0x22 - i++ - i = encodeVarintGenerated(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - return i, nil -} - -func (m *APIGroupList) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *APIGroupList) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Groups) > 0 { - for _, msg := range m.Groups { - data[i] = 0xa - i++ - i = encodeVarintGenerated(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - return i, nil -} - -func (m *APIResource) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *APIResource) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.Name))) - i += copy(data[i:], m.Name) - data[i] = 0x10 - i++ - if m.Namespaced { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - data[i] = 0x1a - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.Kind))) - i += copy(data[i:], m.Kind) - if m.Verbs != nil { - data[i] = 0x22 - i++ - i = encodeVarintGenerated(data, i, uint64(m.Verbs.Size())) - n2, err := m.Verbs.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n2 - } - return i, nil -} - -func (m *APIResourceList) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *APIResourceList) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.GroupVersion))) - i += copy(data[i:], m.GroupVersion) - if len(m.APIResources) > 0 { - for _, msg := range m.APIResources { - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - return i, nil -} - -func (m *APIVersions) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *APIVersions) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Versions) > 0 { - for _, s := range m.Versions { - data[i] = 0xa - i++ - l = len(s) - for l >= 1<<7 { - data[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - data[i] = uint8(l) - i++ - i += copy(data[i:], s) - } - } - if len(m.ServerAddressByClientCIDRs) > 0 { - for _, msg := range m.ServerAddressByClientCIDRs { - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - return i, nil -} - -func (m *Duration) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Duration) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0x8 - i++ - i = encodeVarintGenerated(data, i, uint64(m.Duration)) - return i, nil -} - -func (m *ExportOptions) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *ExportOptions) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0x8 - i++ - if m.Export { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - data[i] = 0x10 - i++ - if m.Exact { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - return i, nil -} - -func (m *GetOptions) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *GetOptions) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.ResourceVersion))) - i += copy(data[i:], m.ResourceVersion) - return i, nil -} - -func (m *GroupKind) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *GroupKind) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.Group))) - i += copy(data[i:], m.Group) - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.Kind))) - i += copy(data[i:], m.Kind) - return i, nil -} - -func (m *GroupResource) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *GroupResource) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.Group))) - i += copy(data[i:], m.Group) - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.Resource))) - i += copy(data[i:], m.Resource) - return i, nil -} - -func (m *GroupVersion) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *GroupVersion) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.Group))) - i += copy(data[i:], m.Group) - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.Version))) - i += copy(data[i:], m.Version) - return i, nil -} - -func (m *GroupVersionForDiscovery) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *GroupVersionForDiscovery) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.GroupVersion))) - i += copy(data[i:], m.GroupVersion) - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.Version))) - i += copy(data[i:], m.Version) - return i, nil -} - -func (m *GroupVersionKind) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *GroupVersionKind) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.Group))) - i += copy(data[i:], m.Group) - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.Version))) - i += copy(data[i:], m.Version) - data[i] = 0x1a - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.Kind))) - i += copy(data[i:], m.Kind) - return i, nil -} - -func (m *GroupVersionResource) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *GroupVersionResource) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.Group))) - i += copy(data[i:], m.Group) - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.Version))) - i += copy(data[i:], m.Version) - data[i] = 0x1a - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.Resource))) - i += copy(data[i:], m.Resource) - return i, nil -} - -func (m *LabelSelector) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *LabelSelector) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.MatchLabels) > 0 { - for k := range m.MatchLabels { - data[i] = 0xa - i++ - v := m.MatchLabels[k] - mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) - i = encodeVarintGenerated(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintGenerated(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(len(v))) - i += copy(data[i:], v) - } - } - if len(m.MatchExpressions) > 0 { - for _, msg := range m.MatchExpressions { - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - return i, nil -} - -func (m *LabelSelectorRequirement) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *LabelSelectorRequirement) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.Key))) - i += copy(data[i:], m.Key) - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.Operator))) - i += copy(data[i:], m.Operator) - if len(m.Values) > 0 { - for _, s := range m.Values { - data[i] = 0x1a - i++ - l = len(s) - for l >= 1<<7 { - data[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - data[i] = uint8(l) - i++ - i += copy(data[i:], s) - } - } - return i, nil -} - -func (m *ListMeta) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *ListMeta) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.SelfLink))) - i += copy(data[i:], m.SelfLink) - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.ResourceVersion))) - i += copy(data[i:], m.ResourceVersion) - return i, nil -} - -func (m *OwnerReference) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *OwnerReference) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.Kind))) - i += copy(data[i:], m.Kind) - data[i] = 0x1a - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.Name))) - i += copy(data[i:], m.Name) - data[i] = 0x22 - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.UID))) - i += copy(data[i:], m.UID) - data[i] = 0x2a - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.APIVersion))) - i += copy(data[i:], m.APIVersion) - if m.Controller != nil { - data[i] = 0x30 - i++ - if *m.Controller { - data[i] = 1 - } else { - data[i] = 0 - } - i++ - } - return i, nil -} - -func (m *RootPaths) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *RootPaths) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Paths) > 0 { - for _, s := range m.Paths { - data[i] = 0xa - i++ - l = len(s) - for l >= 1<<7 { - data[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - data[i] = uint8(l) - i++ - i += copy(data[i:], s) - } - } - return i, nil -} - -func (m *ServerAddressByClientCIDR) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *ServerAddressByClientCIDR) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.ClientCIDR))) - i += copy(data[i:], m.ClientCIDR) - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.ServerAddress))) - i += copy(data[i:], m.ServerAddress) - return i, nil -} - -func (m *Status) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Status) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n3, err := m.ListMeta.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n3 - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.Status))) - i += copy(data[i:], m.Status) - data[i] = 0x1a - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.Message))) - i += copy(data[i:], m.Message) - data[i] = 0x22 - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.Reason))) - i += copy(data[i:], m.Reason) - if m.Details != nil { - data[i] = 0x2a - i++ - i = encodeVarintGenerated(data, i, uint64(m.Details.Size())) - n4, err := m.Details.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n4 - } - data[i] = 0x30 - i++ - i = encodeVarintGenerated(data, i, uint64(m.Code)) - return i, nil -} - -func (m *StatusCause) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *StatusCause) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.Type))) - i += copy(data[i:], m.Type) - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.Message))) - i += copy(data[i:], m.Message) - data[i] = 0x1a - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.Field))) - i += copy(data[i:], m.Field) - return i, nil -} - -func (m *StatusDetails) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *StatusDetails) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.Name))) - i += copy(data[i:], m.Name) - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.Group))) - i += copy(data[i:], m.Group) - data[i] = 0x1a - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.Kind))) - i += copy(data[i:], m.Kind) - if len(m.Causes) > 0 { - for _, msg := range m.Causes { - data[i] = 0x22 - i++ - i = encodeVarintGenerated(data, i, uint64(msg.Size())) - n, err := msg.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n - } - } - data[i] = 0x28 - i++ - i = encodeVarintGenerated(data, i, uint64(m.RetryAfterSeconds)) - return i, nil -} - -func (m *Timestamp) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Timestamp) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0x8 - i++ - i = encodeVarintGenerated(data, i, uint64(m.Seconds)) - data[i] = 0x10 - i++ - i = encodeVarintGenerated(data, i, uint64(m.Nanos)) - return i, nil -} - -func (m *TypeMeta) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *TypeMeta) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.Kind))) - i += copy(data[i:], m.Kind) - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.APIVersion))) - i += copy(data[i:], m.APIVersion) - return i, nil -} - -func (m Verbs) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m Verbs) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m) > 0 { - for _, s := range m { - data[i] = 0xa - i++ - l = len(s) - for l >= 1<<7 { - data[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - data[i] = uint8(l) - i++ - i += copy(data[i:], s) - } - } - return i, nil -} - -func (m *WatchEvent) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *WatchEvent) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.Type))) - i += copy(data[i:], m.Type) - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(m.Object.Size())) - n5, err := m.Object.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n5 - return i, nil -} - -func encodeFixed64Generated(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Generated(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintGenerated(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func (m *APIGroup) Size() (n int) { - var l int - _ = l - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Versions) > 0 { - for _, e := range m.Versions { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - l = m.PreferredVersion.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.ServerAddressByClientCIDRs) > 0 { - for _, e := range m.ServerAddressByClientCIDRs { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *APIGroupList) Size() (n int) { - var l int - _ = l - if len(m.Groups) > 0 { - for _, e := range m.Groups { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *APIResource) Size() (n int) { - var l int - _ = l - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - n += 2 - l = len(m.Kind) - n += 1 + l + sovGenerated(uint64(l)) - if m.Verbs != nil { - l = m.Verbs.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *APIResourceList) Size() (n int) { - var l int - _ = l - l = len(m.GroupVersion) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.APIResources) > 0 { - for _, e := range m.APIResources { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *APIVersions) Size() (n int) { - var l int - _ = l - if len(m.Versions) > 0 { - for _, s := range m.Versions { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - if len(m.ServerAddressByClientCIDRs) > 0 { - for _, e := range m.ServerAddressByClientCIDRs { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *Duration) Size() (n int) { - var l int - _ = l - n += 1 + sovGenerated(uint64(m.Duration)) - return n -} - -func (m *ExportOptions) Size() (n int) { - var l int - _ = l - n += 2 - n += 2 - return n -} - -func (m *GetOptions) Size() (n int) { - var l int - _ = l - l = len(m.ResourceVersion) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *GroupKind) Size() (n int) { - var l int - _ = l - l = len(m.Group) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Kind) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *GroupResource) Size() (n int) { - var l int - _ = l - l = len(m.Group) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Resource) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *GroupVersion) Size() (n int) { - var l int - _ = l - l = len(m.Group) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Version) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *GroupVersionForDiscovery) Size() (n int) { - var l int - _ = l - l = len(m.GroupVersion) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Version) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *GroupVersionKind) Size() (n int) { - var l int - _ = l - l = len(m.Group) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Version) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Kind) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *GroupVersionResource) Size() (n int) { - var l int - _ = l - l = len(m.Group) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Version) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Resource) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *LabelSelector) Size() (n int) { - var l int - _ = l - if len(m.MatchLabels) > 0 { - for k, v := range m.MatchLabels { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) - n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) - } - } - if len(m.MatchExpressions) > 0 { - for _, e := range m.MatchExpressions { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *LabelSelectorRequirement) Size() (n int) { - var l int - _ = l - l = len(m.Key) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Operator) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Values) > 0 { - for _, s := range m.Values { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *ListMeta) Size() (n int) { - var l int - _ = l - l = len(m.SelfLink) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.ResourceVersion) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *OwnerReference) Size() (n int) { - var l int - _ = l - l = len(m.Kind) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.UID) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.APIVersion) - n += 1 + l + sovGenerated(uint64(l)) - if m.Controller != nil { - n += 2 - } - return n -} - -func (m *RootPaths) Size() (n int) { - var l int - _ = l - if len(m.Paths) > 0 { - for _, s := range m.Paths { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *ServerAddressByClientCIDR) Size() (n int) { - var l int - _ = l - l = len(m.ClientCIDR) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.ServerAddress) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *Status) Size() (n int) { - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Status) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Message) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Reason) - n += 1 + l + sovGenerated(uint64(l)) - if m.Details != nil { - l = m.Details.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - n += 1 + sovGenerated(uint64(m.Code)) - return n -} - -func (m *StatusCause) Size() (n int) { - var l int - _ = l - l = len(m.Type) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Message) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Field) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *StatusDetails) Size() (n int) { - var l int - _ = l - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Group) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Kind) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Causes) > 0 { - for _, e := range m.Causes { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - n += 1 + sovGenerated(uint64(m.RetryAfterSeconds)) - return n -} - -func (m *Timestamp) Size() (n int) { - var l int - _ = l - n += 1 + sovGenerated(uint64(m.Seconds)) - n += 1 + sovGenerated(uint64(m.Nanos)) - return n -} - -func (m *TypeMeta) Size() (n int) { - var l int - _ = l - l = len(m.Kind) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.APIVersion) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m Verbs) Size() (n int) { - var l int - _ = l - if len(m) > 0 { - for _, s := range m { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *WatchEvent) Size() (n int) { - var l int - _ = l - l = len(m.Type) - n += 1 + l + sovGenerated(uint64(l)) - l = m.Object.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func sovGenerated(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozGenerated(x uint64) (n int) { - return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *APIGroup) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&APIGroup{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Versions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Versions), "GroupVersionForDiscovery", "GroupVersionForDiscovery", 1), `&`, ``, 1) + `,`, - `PreferredVersion:` + strings.Replace(strings.Replace(this.PreferredVersion.String(), "GroupVersionForDiscovery", "GroupVersionForDiscovery", 1), `&`, ``, 1) + `,`, - `ServerAddressByClientCIDRs:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ServerAddressByClientCIDRs), "ServerAddressByClientCIDR", "ServerAddressByClientCIDR", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *APIGroupList) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&APIGroupList{`, - `Groups:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Groups), "APIGroup", "APIGroup", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *APIResource) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&APIResource{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Namespaced:` + fmt.Sprintf("%v", this.Namespaced) + `,`, - `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`, - `Verbs:` + strings.Replace(fmt.Sprintf("%v", this.Verbs), "Verbs", "Verbs", 1) + `,`, - `}`, - }, "") - return s -} -func (this *APIResourceList) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&APIResourceList{`, - `GroupVersion:` + fmt.Sprintf("%v", this.GroupVersion) + `,`, - `APIResources:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.APIResources), "APIResource", "APIResource", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *Duration) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Duration{`, - `Duration:` + fmt.Sprintf("%v", this.Duration) + `,`, - `}`, - }, "") - return s -} -func (this *ExportOptions) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ExportOptions{`, - `Export:` + fmt.Sprintf("%v", this.Export) + `,`, - `Exact:` + fmt.Sprintf("%v", this.Exact) + `,`, - `}`, - }, "") - return s -} -func (this *GetOptions) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&GetOptions{`, - `ResourceVersion:` + fmt.Sprintf("%v", this.ResourceVersion) + `,`, - `}`, - }, "") - return s -} -func (this *GroupVersionForDiscovery) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&GroupVersionForDiscovery{`, - `GroupVersion:` + fmt.Sprintf("%v", this.GroupVersion) + `,`, - `Version:` + fmt.Sprintf("%v", this.Version) + `,`, - `}`, - }, "") - return s -} -func (this *LabelSelector) String() string { - if this == nil { - return "nil" - } - keysForMatchLabels := make([]string, 0, len(this.MatchLabels)) - for k := range this.MatchLabels { - keysForMatchLabels = append(keysForMatchLabels, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForMatchLabels) - mapStringForMatchLabels := "map[string]string{" - for _, k := range keysForMatchLabels { - mapStringForMatchLabels += fmt.Sprintf("%v: %v,", k, this.MatchLabels[k]) - } - mapStringForMatchLabels += "}" - s := strings.Join([]string{`&LabelSelector{`, - `MatchLabels:` + mapStringForMatchLabels + `,`, - `MatchExpressions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.MatchExpressions), "LabelSelectorRequirement", "LabelSelectorRequirement", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *LabelSelectorRequirement) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&LabelSelectorRequirement{`, - `Key:` + fmt.Sprintf("%v", this.Key) + `,`, - `Operator:` + fmt.Sprintf("%v", this.Operator) + `,`, - `Values:` + fmt.Sprintf("%v", this.Values) + `,`, - `}`, - }, "") - return s -} -func (this *ListMeta) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ListMeta{`, - `SelfLink:` + fmt.Sprintf("%v", this.SelfLink) + `,`, - `ResourceVersion:` + fmt.Sprintf("%v", this.ResourceVersion) + `,`, - `}`, - }, "") - return s -} -func (this *OwnerReference) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&OwnerReference{`, - `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `UID:` + fmt.Sprintf("%v", this.UID) + `,`, - `APIVersion:` + fmt.Sprintf("%v", this.APIVersion) + `,`, - `Controller:` + valueToStringGenerated(this.Controller) + `,`, - `}`, - }, "") - return s -} -func (this *RootPaths) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&RootPaths{`, - `Paths:` + fmt.Sprintf("%v", this.Paths) + `,`, - `}`, - }, "") - return s -} -func (this *ServerAddressByClientCIDR) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ServerAddressByClientCIDR{`, - `ClientCIDR:` + fmt.Sprintf("%v", this.ClientCIDR) + `,`, - `ServerAddress:` + fmt.Sprintf("%v", this.ServerAddress) + `,`, - `}`, - }, "") - return s -} -func (this *Status) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Status{`, - `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "ListMeta", 1), `&`, ``, 1) + `,`, - `Status:` + fmt.Sprintf("%v", this.Status) + `,`, - `Message:` + fmt.Sprintf("%v", this.Message) + `,`, - `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, - `Details:` + strings.Replace(fmt.Sprintf("%v", this.Details), "StatusDetails", "StatusDetails", 1) + `,`, - `Code:` + fmt.Sprintf("%v", this.Code) + `,`, - `}`, - }, "") - return s -} -func (this *StatusCause) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&StatusCause{`, - `Type:` + fmt.Sprintf("%v", this.Type) + `,`, - `Message:` + fmt.Sprintf("%v", this.Message) + `,`, - `Field:` + fmt.Sprintf("%v", this.Field) + `,`, - `}`, - }, "") - return s -} -func (this *StatusDetails) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&StatusDetails{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Group:` + fmt.Sprintf("%v", this.Group) + `,`, - `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`, - `Causes:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Causes), "StatusCause", "StatusCause", 1), `&`, ``, 1) + `,`, - `RetryAfterSeconds:` + fmt.Sprintf("%v", this.RetryAfterSeconds) + `,`, - `}`, - }, "") - return s -} -func (this *Timestamp) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Timestamp{`, - `Seconds:` + fmt.Sprintf("%v", this.Seconds) + `,`, - `Nanos:` + fmt.Sprintf("%v", this.Nanos) + `,`, - `}`, - }, "") - return s -} -func (this *TypeMeta) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TypeMeta{`, - `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`, - `APIVersion:` + fmt.Sprintf("%v", this.APIVersion) + `,`, - `}`, - }, "") - return s -} -func (this *WatchEvent) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&WatchEvent{`, - `Type:` + fmt.Sprintf("%v", this.Type) + `,`, - `Object:` + strings.Replace(strings.Replace(this.Object.String(), "RawExtension", "k8s_io_kubernetes_pkg_runtime.RawExtension", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func valueToStringGenerated(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *APIGroup) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: APIGroup: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: APIGroup: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Versions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Versions = append(m.Versions, GroupVersionForDiscovery{}) - if err := m.Versions[len(m.Versions)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PreferredVersion", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.PreferredVersion.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ServerAddressByClientCIDRs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ServerAddressByClientCIDRs = append(m.ServerAddressByClientCIDRs, ServerAddressByClientCIDR{}) - if err := m.ServerAddressByClientCIDRs[len(m.ServerAddressByClientCIDRs)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *APIGroupList) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: APIGroupList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: APIGroupList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Groups", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Groups = append(m.Groups, APIGroup{}) - if err := m.Groups[len(m.Groups)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *APIResource) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: APIResource: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: APIResource: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespaced", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Namespaced = bool(v != 0) - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Kind = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Verbs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Verbs == nil { - m.Verbs = Verbs{} - } - if err := m.Verbs.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *APIResourceList) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: APIResourceList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: APIResourceList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GroupVersion", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.GroupVersion = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field APIResources", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.APIResources = append(m.APIResources, APIResource{}) - if err := m.APIResources[len(m.APIResources)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *APIVersions) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: APIVersions: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: APIVersions: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Versions", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Versions = append(m.Versions, string(data[iNdEx:postIndex])) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ServerAddressByClientCIDRs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ServerAddressByClientCIDRs = append(m.ServerAddressByClientCIDRs, ServerAddressByClientCIDR{}) - if err := m.ServerAddressByClientCIDRs[len(m.ServerAddressByClientCIDRs)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Duration) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Duration: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Duration: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) - } - m.Duration = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Duration |= (time.Duration(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ExportOptions) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ExportOptions: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExportOptions: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Export", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Export = bool(v != 0) - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Exact", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Exact = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GetOptions) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GetOptions: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetOptions: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceVersion", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResourceVersion = string(data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GroupKind) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GroupKind: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GroupKind: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Group = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Kind = string(data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GroupResource) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GroupResource: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GroupResource: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Group = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Resource = string(data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GroupVersion) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GroupVersion: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GroupVersion: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Group = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Version = string(data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GroupVersionForDiscovery) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GroupVersionForDiscovery: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GroupVersionForDiscovery: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GroupVersion", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.GroupVersion = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Version = string(data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GroupVersionKind) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GroupVersionKind: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GroupVersionKind: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Group = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Version = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Kind = string(data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GroupVersionResource) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GroupVersionResource: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GroupVersionResource: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Group = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Version = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Resource = string(data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LabelSelector) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LabelSelector: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LabelSelector: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MatchLabels", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthGenerated - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthGenerated - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue := string(data[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - if m.MatchLabels == nil { - m.MatchLabels = make(map[string]string) - } - m.MatchLabels[mapkey] = mapvalue - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MatchExpressions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MatchExpressions = append(m.MatchExpressions, LabelSelectorRequirement{}) - if err := m.MatchExpressions[len(m.MatchExpressions)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LabelSelectorRequirement) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LabelSelectorRequirement: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LabelSelectorRequirement: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Operator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Operator = LabelSelectorOperator(data[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Values = append(m.Values, string(data[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ListMeta) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ListMeta: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ListMeta: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SelfLink", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SelfLink = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceVersion", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResourceVersion = string(data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *OwnerReference) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: OwnerReference: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OwnerReference: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Kind = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.UID = k8s_io_kubernetes_pkg_types.UID(data[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field APIVersion", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.APIVersion = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Controller = &b - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RootPaths) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RootPaths: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RootPaths: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Paths", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Paths = append(m.Paths, string(data[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ServerAddressByClientCIDR) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ServerAddressByClientCIDR: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ServerAddressByClientCIDR: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClientCIDR", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClientCIDR = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ServerAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ServerAddress = string(data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Status) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Status: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Status: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ListMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Status = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Message = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Reason = StatusReason(data[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Details", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Details == nil { - m.Details = &StatusDetails{} - } - if err := m.Details.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) - } - m.Code = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Code |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StatusCause) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StatusCause: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StatusCause: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = CauseType(data[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Message = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field = string(data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StatusDetails) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StatusDetails: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StatusDetails: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Group = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Kind = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Causes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Causes = append(m.Causes, StatusCause{}) - if err := m.Causes[len(m.Causes)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RetryAfterSeconds", wireType) - } - m.RetryAfterSeconds = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.RetryAfterSeconds |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Timestamp) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Timestamp: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Timestamp: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Seconds", wireType) - } - m.Seconds = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Seconds |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Nanos", wireType) - } - m.Nanos = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - m.Nanos |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TypeMeta) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TypeMeta: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TypeMeta: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Kind = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field APIVersion", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.APIVersion = string(data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Verbs) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Verbs: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Verbs: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - *m = append(*m, string(data[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *WatchEvent) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: WatchEvent: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: WatchEvent: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Object", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Object.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGenerated(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthGenerated - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipGenerated(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") -) - -var fileDescriptorGenerated = []byte{ - // 1598 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x58, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xf7, 0xda, 0xb1, 0x6b, 0x3f, 0xc7, 0x4d, 0xba, 0xa4, 0xc2, 0x8d, 0x84, 0x1d, 0xb6, 0x08, - 0xa5, 0xa2, 0x5d, 0x2b, 0x11, 0x42, 0x55, 0xa1, 0x88, 0x6c, 0x92, 0x56, 0xa1, 0x4d, 0x13, 0x4d, - 0xfa, 0x07, 0x95, 0x1e, 0xd8, 0x78, 0x27, 0xce, 0x36, 0xf6, 0xee, 0x32, 0x33, 0x76, 0x63, 0x71, - 0xa0, 0x82, 0x0b, 0x07, 0x84, 0x7a, 0x44, 0x1c, 0x50, 0x23, 0xf1, 0x01, 0xf8, 0x0a, 0xdc, 0x7a, - 0xa3, 0xdc, 0x38, 0x20, 0x8b, 0x06, 0x71, 0xe2, 0x1b, 0xe4, 0x84, 0x66, 0x76, 0x66, 0xbd, 0x76, - 0xe2, 0x66, 0xa3, 0x72, 0xe0, 0x14, 0xcf, 0xfb, 0xf3, 0x7b, 0x6f, 0xde, 0xfc, 0xe6, 0xcd, 0xdb, - 0xc0, 0xfc, 0xce, 0x65, 0x6a, 0xba, 0x7e, 0x6d, 0xa7, 0xbd, 0x89, 0x89, 0x87, 0x19, 0xa6, 0xb5, - 0x60, 0xa7, 0x51, 0xb3, 0x03, 0x97, 0xd6, 0x5a, 0x98, 0xd9, 0xb5, 0xce, 0x5c, 0xad, 0x81, 0x3d, - 0x4c, 0x6c, 0x86, 0x1d, 0x33, 0x20, 0x3e, 0xf3, 0x75, 0x23, 0xf4, 0x31, 0xfb, 0x3e, 0x66, 0xb0, - 0xd3, 0x30, 0xb9, 0x8f, 0xc9, 0x7d, 0xcc, 0xce, 0xdc, 0xf4, 0xa5, 0x86, 0xcb, 0xb6, 0xdb, 0x9b, - 0x66, 0xdd, 0x6f, 0xd5, 0x1a, 0x7e, 0xc3, 0xaf, 0x09, 0xd7, 0xcd, 0xf6, 0x96, 0x58, 0x89, 0x85, - 0xf8, 0x15, 0x42, 0x4e, 0x5f, 0x3a, 0x3a, 0x0d, 0xd2, 0xf6, 0x98, 0xdb, 0xc2, 0xc3, 0x19, 0x4c, - 0xbf, 0xfb, 0x72, 0x73, 0x5a, 0xdf, 0xc6, 0x2d, 0xfb, 0x90, 0xd7, 0xdc, 0xd1, 0x5e, 0x6d, 0xe6, - 0x36, 0x6b, 0xae, 0xc7, 0x28, 0x23, 0xc3, 0x2e, 0xc6, 0x2f, 0x19, 0xc8, 0x2f, 0xac, 0xaf, 0x5c, - 0x27, 0x7e, 0x3b, 0xd0, 0x67, 0x60, 0xcc, 0xb3, 0x5b, 0xb8, 0xac, 0xcd, 0x68, 0xb3, 0x05, 0x6b, - 0xfc, 0x59, 0xaf, 0x9a, 0xda, 0xef, 0x55, 0xc7, 0x6e, 0xd9, 0x2d, 0x8c, 0x84, 0x46, 0x7f, 0x08, - 0xf9, 0x0e, 0x26, 0xd4, 0xf5, 0x3d, 0x5a, 0x4e, 0xcf, 0x64, 0x66, 0x8b, 0xf3, 0x1f, 0x98, 0xc7, - 0x17, 0xcb, 0x14, 0xf0, 0x77, 0x43, 0xc7, 0x6b, 0x3e, 0x59, 0x72, 0x69, 0xdd, 0xef, 0x60, 0xd2, - 0xb5, 0x26, 0x65, 0x8c, 0xbc, 0x54, 0x52, 0x14, 0xe1, 0xeb, 0x5f, 0x69, 0x30, 0x19, 0x10, 0xbc, - 0x85, 0x09, 0xc1, 0x8e, 0xd4, 0x97, 0x33, 0x33, 0xda, 0x2b, 0x07, 0x2d, 0xcb, 0xa0, 0x93, 0xeb, - 0x43, 0xe8, 0xe8, 0x50, 0x3c, 0x7d, 0x4f, 0x83, 0x69, 0x8a, 0x49, 0x07, 0x93, 0x05, 0xc7, 0x21, - 0x98, 0x52, 0xab, 0xbb, 0xd8, 0x74, 0xb1, 0xc7, 0x16, 0x57, 0x96, 0x10, 0x2d, 0x8f, 0x89, 0x1a, - 0x5c, 0x4d, 0x92, 0xce, 0xc6, 0x28, 0x14, 0xcb, 0x90, 0xf9, 0x4c, 0x8f, 0x34, 0xa1, 0xe8, 0x25, - 0x49, 0x18, 0x0e, 0x8c, 0xab, 0x23, 0xbc, 0xe9, 0x52, 0xa6, 0xdf, 0x86, 0x5c, 0x83, 0x2f, 0x68, - 0x59, 0x13, 0xe9, 0x5d, 0x4c, 0x92, 0x9e, 0x42, 0xb0, 0x4e, 0xcb, 0x6c, 0x72, 0x62, 0x49, 0x91, - 0xc4, 0x32, 0x7e, 0xd3, 0xa0, 0xb8, 0xb0, 0xbe, 0x82, 0x30, 0xf5, 0xdb, 0xa4, 0x8e, 0x13, 0x90, - 0x65, 0x1e, 0x80, 0xff, 0xa5, 0x81, 0x5d, 0xc7, 0x4e, 0x39, 0x3d, 0xa3, 0xcd, 0xe6, 0x2d, 0x5d, - 0xda, 0xc1, 0xad, 0x48, 0x83, 0x62, 0x56, 0x1c, 0x75, 0xc7, 0xf5, 0x1c, 0x71, 0xce, 0x31, 0xd4, - 0x1b, 0xae, 0xe7, 0x20, 0xa1, 0xd1, 0x3f, 0x86, 0x6c, 0x07, 0x93, 0x4d, 0x5e, 0x7b, 0x4e, 0x85, - 0x0b, 0x49, 0x36, 0x77, 0x97, 0x3b, 0x58, 0x85, 0xfd, 0x5e, 0x35, 0x2b, 0x7e, 0xa2, 0x10, 0xc2, - 0xf8, 0x59, 0x83, 0x89, 0xd8, 0x9e, 0x44, 0xf5, 0x2e, 0xc3, 0x78, 0x23, 0xc6, 0x1c, 0xb9, 0xbf, - 0x29, 0x99, 0xc9, 0x78, 0x9c, 0x55, 0x68, 0xc0, 0x52, 0xaf, 0x43, 0x81, 0x48, 0x24, 0x75, 0x3b, - 0x6a, 0x09, 0x4b, 0xaf, 0x32, 0xe8, 0xc7, 0x89, 0x09, 0x29, 0xea, 0xe3, 0x1a, 0x7f, 0x87, 0xc7, - 0xa0, 0xee, 0x8b, 0x3e, 0x1b, 0xbb, 0x91, 0xfc, 0xb8, 0x0b, 0xd6, 0xf8, 0x88, 0xfb, 0x74, 0x0c, - 0x95, 0xd3, 0xff, 0x03, 0x2a, 0x5f, 0xc9, 0x7f, 0xff, 0xb4, 0x9a, 0x7a, 0xfc, 0xc7, 0x4c, 0xca, - 0x58, 0x81, 0xfc, 0x52, 0x9b, 0xd8, 0x8c, 0x17, 0xf6, 0x2a, 0xe4, 0x1d, 0xf9, 0x5b, 0x1c, 0x47, - 0xc6, 0x7a, 0x53, 0xf5, 0x0d, 0x65, 0x73, 0xd0, 0xab, 0x96, 0x78, 0x6b, 0x34, 0x95, 0x00, 0x45, - 0x2e, 0xc6, 0x03, 0x28, 0x2d, 0xef, 0x06, 0x3e, 0x61, 0x6b, 0x01, 0x13, 0x95, 0x78, 0x1b, 0x72, - 0x58, 0x08, 0x04, 0x5a, 0xbe, 0x4f, 0xf9, 0xd0, 0x0c, 0x49, 0xad, 0x7e, 0x1e, 0xb2, 0x78, 0xd7, - 0xae, 0x33, 0xc9, 0xdd, 0x92, 0x34, 0xcb, 0x2e, 0x73, 0x21, 0x0a, 0x75, 0xc6, 0x1a, 0xc0, 0x75, - 0x1c, 0x41, 0x2f, 0xc0, 0x84, 0x3a, 0xab, 0x41, 0x02, 0xbd, 0x2e, 0x9d, 0x27, 0xd0, 0xa0, 0x1a, - 0x0d, 0xdb, 0x1b, 0x0f, 0xa0, 0x20, 0x48, 0xc6, 0x39, 0xcf, 0x53, 0x10, 0x1c, 0x93, 0x28, 0x51, - 0x0a, 0xc2, 0x02, 0x85, 0xba, 0xe8, 0xd2, 0xa4, 0x47, 0x5d, 0x9a, 0x58, 0x5d, 0x9b, 0x50, 0x0a, - 0x7d, 0xd5, 0x3d, 0x4e, 0x14, 0xe1, 0x22, 0xe4, 0x55, 0x9a, 0x32, 0x4a, 0xd4, 0xb9, 0x15, 0x10, - 0x8a, 0x2c, 0x62, 0xd1, 0xb6, 0x61, 0xe0, 0xc2, 0x24, 0x0b, 0x76, 0x01, 0x4e, 0x49, 0xd2, 0xca, - 0x58, 0x13, 0xd2, 0xec, 0x94, 0xaa, 0x99, 0xd2, 0xc7, 0x22, 0x7d, 0x09, 0xe5, 0x51, 0x0d, 0xff, - 0x15, 0xae, 0x74, 0xf2, 0x54, 0x8c, 0xef, 0x34, 0x98, 0x8c, 0x23, 0x25, 0x3f, 0xbe, 0xe4, 0x41, - 0x8e, 0x6f, 0x8f, 0xb1, 0x8a, 0xfc, 0xa8, 0xc1, 0xd4, 0xc0, 0xd6, 0x4e, 0x74, 0xe2, 0x27, 0x48, - 0x2a, 0x4e, 0x8e, 0xcc, 0x09, 0xc8, 0xf1, 0x6b, 0x1a, 0x4a, 0x37, 0xed, 0x4d, 0xdc, 0xdc, 0xc0, - 0x4d, 0x5c, 0x67, 0x3e, 0xd1, 0xbb, 0x50, 0x6c, 0xd9, 0xac, 0xbe, 0x2d, 0xa4, 0xea, 0xf9, 0xb2, - 0x92, 0xb4, 0xa4, 0x01, 0x1c, 0x73, 0xb5, 0x0f, 0xb2, 0xec, 0x31, 0xd2, 0xb5, 0x5e, 0x93, 0x09, - 0x15, 0x63, 0x1a, 0x14, 0x8f, 0x25, 0xa6, 0x0d, 0xb1, 0x5e, 0xde, 0x0d, 0x78, 0x5f, 0x3a, 0xe9, - 0x88, 0x33, 0x90, 0x00, 0xc2, 0x9f, 0xb7, 0x5d, 0x82, 0x5b, 0xd8, 0x63, 0xfd, 0x69, 0x63, 0x75, - 0x08, 0x1d, 0x1d, 0x8a, 0x37, 0xfd, 0x21, 0x4c, 0x0e, 0xa7, 0xae, 0x4f, 0x42, 0x66, 0x07, 0x77, - 0xc3, 0xb3, 0x42, 0xfc, 0xa7, 0x3e, 0x05, 0xd9, 0x8e, 0xdd, 0x6c, 0xcb, 0x9b, 0x88, 0xc2, 0xc5, - 0x95, 0xf4, 0x65, 0xcd, 0xf8, 0x49, 0x83, 0xf2, 0xa8, 0x44, 0xf4, 0x37, 0x62, 0x40, 0x56, 0x51, - 0x66, 0x95, 0xb9, 0x81, 0xbb, 0x21, 0xea, 0x32, 0xe4, 0xfd, 0x80, 0xcf, 0x86, 0x3e, 0x91, 0x27, - 0x7e, 0x41, 0x9d, 0xe2, 0x9a, 0x94, 0x1f, 0xf4, 0xaa, 0x67, 0x07, 0xe0, 0x95, 0x02, 0x45, 0xae, - 0xba, 0x01, 0x39, 0x91, 0x0f, 0x2d, 0x67, 0xc4, 0x6b, 0x04, 0xbc, 0xaf, 0xde, 0x15, 0x12, 0x24, - 0x35, 0xc6, 0x17, 0x90, 0xe7, 0x4f, 0xed, 0x2a, 0x66, 0x36, 0x27, 0x0f, 0xc5, 0xcd, 0xad, 0x9b, - 0xae, 0xb7, 0x23, 0x53, 0x8b, 0xc8, 0xb3, 0x21, 0xe5, 0x28, 0xb2, 0x38, 0xaa, 0xbd, 0xa6, 0x4f, - 0xd8, 0x5e, 0x0f, 0x34, 0x38, 0xbd, 0xf6, 0xc8, 0xc3, 0x04, 0xf1, 0x51, 0x0f, 0x7b, 0xe1, 0x28, - 0x23, 0x6e, 0x95, 0x36, 0x72, 0xe8, 0x50, 0xc3, 0x4e, 0x66, 0xe4, 0xb0, 0xf3, 0x11, 0x64, 0xda, - 0xae, 0x23, 0x86, 0x92, 0x82, 0x65, 0xaa, 0xea, 0xde, 0x59, 0x59, 0x3a, 0xe8, 0x55, 0xab, 0x47, - 0xcf, 0xe5, 0xac, 0x1b, 0x60, 0x6a, 0xde, 0x59, 0x59, 0x42, 0xdc, 0x95, 0x8f, 0x4b, 0x76, 0xe0, - 0xaa, 0x6d, 0x65, 0x05, 0x50, 0x34, 0x2e, 0xf5, 0x9f, 0x7c, 0x14, 0xb3, 0xd2, 0x4d, 0x80, 0xba, - 0xef, 0x31, 0xe2, 0x37, 0x9b, 0x98, 0x94, 0x73, 0xe1, 0x6b, 0xc6, 0xed, 0x17, 0x23, 0x29, 0x8a, - 0x59, 0x18, 0x17, 0xa1, 0x80, 0x7c, 0x9f, 0xad, 0xdb, 0x6c, 0x9b, 0xea, 0x55, 0xc8, 0x06, 0xfc, - 0x87, 0x9c, 0x1b, 0xc4, 0x78, 0x24, 0x34, 0x28, 0x94, 0x1b, 0xdf, 0x6a, 0x70, 0x6e, 0xe4, 0x43, - 0xce, 0xf3, 0xad, 0x47, 0x2b, 0x59, 0xbb, 0x28, 0xdf, 0xbe, 0x1d, 0x8a, 0x59, 0xe9, 0xef, 0x43, - 0x69, 0xe0, 0xf5, 0x97, 0xa7, 0x77, 0x56, 0xba, 0x95, 0x06, 0xa2, 0xa1, 0x41, 0x5b, 0xe3, 0x9f, - 0x34, 0xe4, 0x36, 0x98, 0xcd, 0xda, 0x54, 0xbf, 0x0f, 0x79, 0x7e, 0xf1, 0x1c, 0x9b, 0xd9, 0x22, - 0x72, 0xc2, 0x21, 0x57, 0xb1, 0xae, 0xcf, 0x31, 0x25, 0x41, 0x11, 0x1e, 0x9f, 0x0e, 0xa8, 0x88, - 0x22, 0x93, 0x8b, 0xa6, 0x83, 0x30, 0x36, 0x92, 0x5a, 0xde, 0x21, 0x5b, 0x98, 0x52, 0xbb, 0xa1, - 0x68, 0x11, 0x75, 0xc8, 0xd5, 0x50, 0x8c, 0x94, 0x5e, 0x7f, 0x0f, 0x72, 0x04, 0xdb, 0xd4, 0xf7, - 0x24, 0x3f, 0x2a, 0x0a, 0x12, 0x09, 0xe9, 0x41, 0xaf, 0x3a, 0x2e, 0xc1, 0xc5, 0x1a, 0x49, 0x6b, - 0xfd, 0x13, 0x38, 0xe5, 0x60, 0x66, 0xbb, 0x4d, 0x2a, 0xf8, 0x50, 0x9c, 0x9f, 0x4b, 0x34, 0x9e, - 0x09, 0xa8, 0xa5, 0xd0, 0xd1, 0x2a, 0xf2, 0x8c, 0xe4, 0x02, 0x29, 0x38, 0x4e, 0xe8, 0xba, 0xef, - 0x60, 0x41, 0x99, 0x6c, 0x9f, 0xd0, 0x8b, 0xbe, 0x83, 0x91, 0xd0, 0x18, 0x4f, 0x34, 0x28, 0x86, - 0x48, 0x8b, 0x76, 0x9b, 0x62, 0x7d, 0x2e, 0xda, 0x43, 0x78, 0xd4, 0xe7, 0x94, 0xcf, 0xed, 0x6e, - 0x80, 0x0f, 0x7a, 0xd5, 0x82, 0x30, 0xe3, 0x8b, 0x28, 0xfd, 0x58, 0x85, 0xd2, 0xc7, 0x54, 0xe8, - 0x3c, 0x64, 0xb7, 0x5c, 0xdc, 0x54, 0x2f, 0x5b, 0xf4, 0x26, 0x5d, 0xe3, 0x42, 0x14, 0xea, 0x8c, - 0x1f, 0xd2, 0x50, 0x1a, 0xd8, 0x5c, 0x82, 0x8f, 0x90, 0xe8, 0xb1, 0x4b, 0x27, 0x18, 0xa0, 0x46, - 0x7f, 0x75, 0xdc, 0x83, 0x5c, 0x9d, 0xef, 0x4f, 0x7d, 0xf2, 0xd5, 0x92, 0x1f, 0x84, 0xa8, 0x4b, - 0x9f, 0x45, 0x62, 0x49, 0x91, 0x84, 0xd3, 0xaf, 0xc3, 0x19, 0x82, 0x19, 0xe9, 0x2e, 0x6c, 0x31, - 0x4c, 0x36, 0x70, 0xdd, 0xf7, 0x9c, 0xf0, 0xb0, 0xb3, 0x51, 0x85, 0xcf, 0xa0, 0x61, 0x03, 0x74, - 0xd8, 0xc7, 0x68, 0xc2, 0xd8, 0x6d, 0xb7, 0x85, 0x79, 0xd1, 0xa9, 0x84, 0x09, 0x67, 0xe5, 0xa8, - 0xe8, 0xca, 0x59, 0xe9, 0x79, 0x6d, 0x3c, 0xdb, 0xf3, 0x43, 0xa2, 0x67, 0xfb, 0xb5, 0xb9, 0xc5, - 0x85, 0x28, 0xd4, 0x5d, 0x99, 0xe2, 0xef, 0xf5, 0x37, 0x7b, 0xd5, 0xd4, 0x93, 0xbd, 0x6a, 0xea, - 0xe9, 0x9e, 0x7c, 0xbb, 0x3f, 0x85, 0x02, 0x8f, 0x46, 0x99, 0xdd, 0x0a, 0xfe, 0xeb, 0x90, 0xc6, - 0x67, 0x90, 0xe7, 0x3c, 0x12, 0xef, 0xc3, 0xf1, 0xbd, 0x79, 0xb0, 0x6f, 0xa6, 0x93, 0xf4, 0x4d, - 0x63, 0x1e, 0xc2, 0x0f, 0x41, 0xde, 0x03, 0x5d, 0x86, 0x5b, 0x03, 0x3d, 0x70, 0x85, 0x0b, 0x50, - 0x28, 0x8f, 0x8d, 0x2b, 0x5f, 0x6b, 0x00, 0xf7, 0xc4, 0x8b, 0xdd, 0xe1, 0xcf, 0xe9, 0x0c, 0x8c, - 0xf1, 0x06, 0x3e, 0x9c, 0x98, 0xb8, 0x00, 0x42, 0xa3, 0x6f, 0x40, 0xce, 0xdf, 0x7c, 0x88, 0xe5, - 0xf7, 0x43, 0x71, 0xfe, 0x9d, 0x11, 0x9c, 0x91, 0xff, 0xd5, 0x31, 0x91, 0xfd, 0x68, 0x79, 0x97, - 0x61, 0x8f, 0x67, 0xd8, 0xe7, 0xcb, 0x9a, 0x80, 0x40, 0x12, 0xca, 0x7a, 0xeb, 0xd9, 0x8b, 0x4a, - 0xea, 0xf9, 0x8b, 0x4a, 0xea, 0xf7, 0x17, 0x95, 0xd4, 0xe3, 0xfd, 0x8a, 0xf6, 0x6c, 0xbf, 0xa2, - 0x3d, 0xdf, 0xaf, 0x68, 0x7f, 0xee, 0x57, 0xb4, 0x27, 0x7f, 0x55, 0x52, 0xf7, 0xd3, 0x9d, 0xb9, - 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x94, 0x53, 0x56, 0x06, 0xf6, 0x12, 0x00, 0x00, -} diff --git a/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/generated.proto b/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/generated.proto deleted file mode 100644 index cad0bf7e..00000000 --- a/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/generated.proto +++ /dev/null @@ -1,462 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - - -// This file was autogenerated by go-to-protobuf. Do not edit it manually! - -syntax = 'proto2'; - -package k8s.io.kubernetes.pkg.apis.meta.v1; - -import "k8s.io/kubernetes/pkg/runtime/generated.proto"; -import "k8s.io/kubernetes/pkg/runtime/schema/generated.proto"; -import "k8s.io/kubernetes/pkg/util/intstr/generated.proto"; - -// Package-wide variables from generator "generated". -option go_package = "v1"; - -// APIGroup contains the name, the supported versions, and the preferred version -// of a group. -message APIGroup { - // name is the name of the group. - optional string name = 1; - - // versions are the versions supported in this group. - repeated GroupVersionForDiscovery versions = 2; - - // preferredVersion is the version preferred by the API server, which - // probably is the storage version. - // +optional - optional GroupVersionForDiscovery preferredVersion = 3; - - // a map of client CIDR to server address that is serving this group. - // This is to help clients reach servers in the most network-efficient way possible. - // Clients can use the appropriate server address as per the CIDR that they match. - // In case of multiple matches, clients should use the longest matching CIDR. - // The server returns only those CIDRs that it thinks that the client can match. - // For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. - // Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP. - repeated ServerAddressByClientCIDR serverAddressByClientCIDRs = 4; -} - -// APIGroupList is a list of APIGroup, to allow clients to discover the API at -// /apis. -message APIGroupList { - // groups is a list of APIGroup. - repeated APIGroup groups = 1; -} - -// APIResource specifies the name of a resource and whether it is namespaced. -message APIResource { - // name is the name of the resource. - optional string name = 1; - - // namespaced indicates if a resource is namespaced or not. - optional bool namespaced = 2; - - // kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo') - optional string kind = 3; - - // verbs is a list of supported kube verbs (this includes get, list, watch, create, - // update, patch, delete, deletecollection, and proxy) - optional Verbs verbs = 4; -} - -// APIResourceList is a list of APIResource, it is used to expose the name of the -// resources supported in a specific group and version, and if the resource -// is namespaced. -message APIResourceList { - // groupVersion is the group and version this APIResourceList is for. - optional string groupVersion = 1; - - // resources contains the name of the resources and if they are namespaced. - repeated APIResource resources = 2; -} - -// APIVersions lists the versions that are available, to allow clients to -// discover the API at /api, which is the root path of the legacy v1 API. -// -// +protobuf.options.(gogoproto.goproto_stringer)=false -message APIVersions { - // versions are the api versions that are available. - repeated string versions = 1; - - // a map of client CIDR to server address that is serving this group. - // This is to help clients reach servers in the most network-efficient way possible. - // Clients can use the appropriate server address as per the CIDR that they match. - // In case of multiple matches, clients should use the longest matching CIDR. - // The server returns only those CIDRs that it thinks that the client can match. - // For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. - // Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP. - repeated ServerAddressByClientCIDR serverAddressByClientCIDRs = 2; -} - -// Duration is a wrapper around time.Duration which supports correct -// marshaling to YAML and JSON. In particular, it marshals into strings, which -// can be used as map keys in json. -message Duration { - optional int64 duration = 1; -} - -// ExportOptions is the query options to the standard REST get call. -message ExportOptions { - // Should this value be exported. Export strips fields that a user can not specify. - optional bool export = 1; - - // Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. - optional bool exact = 2; -} - -// GetOptions is the standard query options to the standard REST get call. -message GetOptions { - // When specified: - // - if unset, then the result is returned from remote storage based on quorum-read flag; - // - if it's 0, then we simply return what we currently have in cache, no guarantee; - // - if set to non zero, then the result is at least as fresh as given rv. - optional string resourceVersion = 1; -} - -// GroupKind specifies a Group and a Kind, but does not force a version. This is useful for identifying -// concepts during lookup stages without having partially valid types -// -// +protobuf.options.(gogoproto.goproto_stringer)=false -message GroupKind { - optional string group = 1; - - optional string kind = 2; -} - -// GroupResource specifies a Group and a Resource, but does not force a version. This is useful for identifying -// concepts during lookup stages without having partially valid types -// -// +protobuf.options.(gogoproto.goproto_stringer)=false -message GroupResource { - optional string group = 1; - - optional string resource = 2; -} - -// GroupVersion contains the "group" and the "version", which uniquely identifies the API. -// -// +protobuf.options.(gogoproto.goproto_stringer)=false -message GroupVersion { - optional string group = 1; - - optional string version = 2; -} - -// GroupVersion contains the "group/version" and "version" string of a version. -// It is made a struct to keep extensibility. -message GroupVersionForDiscovery { - // groupVersion specifies the API group and version in the form "group/version" - optional string groupVersion = 1; - - // version specifies the version in the form of "version". This is to save - // the clients the trouble of splitting the GroupVersion. - optional string version = 2; -} - -// GroupVersionKind unambiguously identifies a kind. It doesn't anonymously include GroupVersion -// to avoid automatic coersion. It doesn't use a GroupVersion to avoid custom marshalling -// -// +protobuf.options.(gogoproto.goproto_stringer)=false -message GroupVersionKind { - optional string group = 1; - - optional string version = 2; - - optional string kind = 3; -} - -// GroupVersionResource unambiguously identifies a resource. It doesn't anonymously include GroupVersion -// to avoid automatic coersion. It doesn't use a GroupVersion to avoid custom marshalling -// -// +protobuf.options.(gogoproto.goproto_stringer)=false -message GroupVersionResource { - optional string group = 1; - - optional string version = 2; - - optional string resource = 3; -} - -// A label selector is a label query over a set of resources. The result of matchLabels and -// matchExpressions are ANDed. An empty label selector matches all objects. A null -// label selector matches no objects. -message LabelSelector { - // matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - // map is equivalent to an element of matchExpressions, whose key field is "key", the - // operator is "In", and the values array contains only "value". The requirements are ANDed. - // +optional - map matchLabels = 1; - - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - // +optional - repeated LabelSelectorRequirement matchExpressions = 2; -} - -// A label selector requirement is a selector that contains values, a key, and an operator that -// relates the key and values. -message LabelSelectorRequirement { - // key is the label key that the selector applies to. - optional string key = 1; - - // operator represents a key's relationship to a set of values. - // Valid operators ard In, NotIn, Exists and DoesNotExist. - optional string operator = 2; - - // values is an array of string values. If the operator is In or NotIn, - // the values array must be non-empty. If the operator is Exists or DoesNotExist, - // the values array must be empty. This array is replaced during a strategic - // merge patch. - // +optional - repeated string values = 3; -} - -// ListMeta describes metadata that synthetic resources must have, including lists and -// various status objects. A resource may have only one of {ObjectMeta, ListMeta}. -message ListMeta { - // SelfLink is a URL representing this object. - // Populated by the system. - // Read-only. - // +optional - optional string selfLink = 1; - - // String that identifies the server's internal version of this object that - // can be used by clients to determine when objects have changed. - // Value must be treated as opaque by clients and passed unmodified back to the server. - // Populated by the system. - // Read-only. - // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency - // +optional - optional string resourceVersion = 2; -} - -// OwnerReference contains enough information to let you identify an owning -// object. Currently, an owning object must be in the same namespace, so there -// is no namespace field. -message OwnerReference { - // API version of the referent. - optional string apiVersion = 5; - - // Kind of the referent. - // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds - optional string kind = 1; - - // Name of the referent. - // More info: http://kubernetes.io/docs/user-guide/identifiers#names - optional string name = 3; - - // UID of the referent. - // More info: http://kubernetes.io/docs/user-guide/identifiers#uids - optional string uid = 4; - - // If true, this reference points to the managing controller. - // +optional - optional bool controller = 6; -} - -// RootPaths lists the paths available at root. -// For example: "/healthz", "/apis". -message RootPaths { - // paths are the paths available at root. - repeated string paths = 1; -} - -// ServerAddressByClientCIDR helps the client to determine the server address that they should use, depending on the clientCIDR that they match. -message ServerAddressByClientCIDR { - // The CIDR with which clients can match their IP to figure out the server address that they should use. - optional string clientCIDR = 1; - - // Address of this server, suitable for a client that matches the above CIDR. - // This can be a hostname, hostname:port, IP or IP:port. - optional string serverAddress = 2; -} - -// Status is a return value for calls that don't return other objects. -message Status { - // Standard list metadata. - // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds - // +optional - optional ListMeta metadata = 1; - - // Status of the operation. - // One of: "Success" or "Failure". - // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status - // +optional - optional string status = 2; - - // A human-readable description of the status of this operation. - // +optional - optional string message = 3; - - // A machine-readable description of why this operation is in the - // "Failure" status. If this value is empty there - // is no information available. A Reason clarifies an HTTP status - // code but does not override it. - // +optional - optional string reason = 4; - - // Extended data associated with the reason. Each reason may define its - // own extended details. This field is optional and the data returned - // is not guaranteed to conform to any schema except that defined by - // the reason type. - // +optional - optional StatusDetails details = 5; - - // Suggested HTTP return code for this status, 0 if not set. - // +optional - optional int32 code = 6; -} - -// StatusCause provides more information about an api.Status failure, including -// cases when multiple errors are encountered. -message StatusCause { - // A machine-readable description of the cause of the error. If this value is - // empty there is no information available. - // +optional - optional string reason = 1; - - // A human-readable description of the cause of the error. This field may be - // presented as-is to a reader. - // +optional - optional string message = 2; - - // The field of the resource that has caused this error, as named by its JSON - // serialization. May include dot and postfix notation for nested attributes. - // Arrays are zero-indexed. Fields may appear more than once in an array of - // causes due to fields having multiple errors. - // Optional. - // - // Examples: - // "name" - the field "name" on the current resource - // "items[0].name" - the field "name" on the first array entry in "items" - // +optional - optional string field = 3; -} - -// StatusDetails is a set of additional properties that MAY be set by the -// server to provide additional information about a response. The Reason -// field of a Status object defines what attributes will be set. Clients -// must ignore fields that do not match the defined type of each attribute, -// and should assume that any attribute may be empty, invalid, or under -// defined. -message StatusDetails { - // The name attribute of the resource associated with the status StatusReason - // (when there is a single name which can be described). - // +optional - optional string name = 1; - - // The group attribute of the resource associated with the status StatusReason. - // +optional - optional string group = 2; - - // The kind attribute of the resource associated with the status StatusReason. - // On some operations may differ from the requested resource Kind. - // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds - // +optional - optional string kind = 3; - - // The Causes array includes more details associated with the StatusReason - // failure. Not all StatusReasons may provide detailed causes. - // +optional - repeated StatusCause causes = 4; - - // If specified, the time in seconds before the operation should be retried. - // +optional - optional int32 retryAfterSeconds = 5; -} - -// Time is a wrapper around time.Time which supports correct -// marshaling to YAML and JSON. Wrappers are provided for many -// of the factory methods that the time package offers. -// -// +protobuf.options.marshal=false -// +protobuf.as=Timestamp -// +protobuf.options.(gogoproto.goproto_stringer)=false -message Time { - // Represents seconds of UTC time since Unix epoch - // 1970-01-01T00:00:00Z. Must be from from 0001-01-01T00:00:00Z to - // 9999-12-31T23:59:59Z inclusive. - optional int64 seconds = 1; - - // Non-negative fractions of a second at nanosecond resolution. Negative - // second values with fractions must still have non-negative nanos values - // that count forward in time. Must be from 0 to 999,999,999 - // inclusive. This field may be limited in precision depending on context. - optional int32 nanos = 2; -} - -// Timestamp is a struct that is equivalent to Time, but intended for -// protobuf marshalling/unmarshalling. It is generated into a serialization -// that matches Time. Do not use in Go structs. -message Timestamp { - // Represents seconds of UTC time since Unix epoch - // 1970-01-01T00:00:00Z. Must be from from 0001-01-01T00:00:00Z to - // 9999-12-31T23:59:59Z inclusive. - optional int64 seconds = 1; - - // Non-negative fractions of a second at nanosecond resolution. Negative - // second values with fractions must still have non-negative nanos values - // that count forward in time. Must be from 0 to 999,999,999 - // inclusive. This field may be limited in precision depending on context. - optional int32 nanos = 2; -} - -// TypeMeta describes an individual object in an API response or request -// with strings representing the type of the object and its API schema version. -// Structures that are versioned or persisted should inline TypeMeta. -message TypeMeta { - // Kind is a string value representing the REST resource this object represents. - // Servers may infer this from the endpoint the client submits requests to. - // Cannot be updated. - // In CamelCase. - // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds - // +optional - optional string kind = 1; - - // APIVersion defines the versioned schema of this representation of an object. - // Servers should convert recognized schemas to the latest internal value, and - // may reject unrecognized values. - // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources - // +optional - optional string apiVersion = 2; -} - -// Verbs masks the value so protobuf can generate -// -// +protobuf.nullable=true -// +protobuf.options.(gogoproto.goproto_stringer)=false -message Verbs { - // items, if empty, will result in an empty slice - - repeated string items = 1; -} - -// Event represents a single event to a watched resource. -// -// +protobuf=true -message WatchEvent { - optional string type = 1; - - // Object is: - // * If Type is Added or Modified: the new state of the object. - // * If Type is Deleted: the state of the object immediately before deletion. - // * If Type is Error: *Status is recommended; other types may make sense - // depending on context. - optional k8s.io.kubernetes.pkg.runtime.RawExtension object = 2; -} - diff --git a/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/group_version.go b/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/group_version.go deleted file mode 100644 index 304a9e05..00000000 --- a/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/group_version.go +++ /dev/null @@ -1,148 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1 - -import ( - "encoding/json" - "fmt" - "strings" - - "k8s.io/kubernetes/pkg/runtime/schema" -) - -// GroupResource specifies a Group and a Resource, but does not force a version. This is useful for identifying -// concepts during lookup stages without having partially valid types -// -// +protobuf.options.(gogoproto.goproto_stringer)=false -type GroupResource struct { - Group string `protobuf:"bytes,1,opt,name=group"` - Resource string `protobuf:"bytes,2,opt,name=resource"` -} - -func (gr *GroupResource) String() string { - if len(gr.Group) == 0 { - return gr.Resource - } - return gr.Resource + "." + gr.Group -} - -// GroupVersionResource unambiguously identifies a resource. It doesn't anonymously include GroupVersion -// to avoid automatic coersion. It doesn't use a GroupVersion to avoid custom marshalling -// -// +protobuf.options.(gogoproto.goproto_stringer)=false -type GroupVersionResource struct { - Group string `protobuf:"bytes,1,opt,name=group"` - Version string `protobuf:"bytes,2,opt,name=version"` - Resource string `protobuf:"bytes,3,opt,name=resource"` -} - -func (gvr *GroupVersionResource) String() string { - return strings.Join([]string{gvr.Group, "/", gvr.Version, ", Resource=", gvr.Resource}, "") -} - -// GroupKind specifies a Group and a Kind, but does not force a version. This is useful for identifying -// concepts during lookup stages without having partially valid types -// -// +protobuf.options.(gogoproto.goproto_stringer)=false -type GroupKind struct { - Group string `protobuf:"bytes,1,opt,name=group"` - Kind string `protobuf:"bytes,2,opt,name=kind"` -} - -func (gk *GroupKind) String() string { - if len(gk.Group) == 0 { - return gk.Kind - } - return gk.Kind + "." + gk.Group -} - -// GroupVersionKind unambiguously identifies a kind. It doesn't anonymously include GroupVersion -// to avoid automatic coersion. It doesn't use a GroupVersion to avoid custom marshalling -// -// +protobuf.options.(gogoproto.goproto_stringer)=false -type GroupVersionKind struct { - Group string `protobuf:"bytes,1,opt,name=group"` - Version string `protobuf:"bytes,2,opt,name=version"` - Kind string `protobuf:"bytes,3,opt,name=kind"` -} - -func (gvk GroupVersionKind) String() string { - return gvk.Group + "/" + gvk.Version + ", Kind=" + gvk.Kind -} - -// GroupVersion contains the "group" and the "version", which uniquely identifies the API. -// -// +protobuf.options.(gogoproto.goproto_stringer)=false -type GroupVersion struct { - Group string `protobuf:"bytes,1,opt,name=group"` - Version string `protobuf:"bytes,2,opt,name=version"` -} - -// Empty returns true if group and version are empty -func (gv GroupVersion) Empty() bool { - return len(gv.Group) == 0 && len(gv.Version) == 0 -} - -// String puts "group" and "version" into a single "group/version" string. For the legacy v1 -// it returns "v1". -func (gv GroupVersion) String() string { - // special case the internal apiVersion for the legacy kube types - if gv.Empty() { - return "" - } - - // special case of "v1" for backward compatibility - if len(gv.Group) == 0 && gv.Version == "v1" { - return gv.Version - } - if len(gv.Group) > 0 { - return gv.Group + "/" + gv.Version - } - return gv.Version -} - -// MarshalJSON implements the json.Marshaller interface. -func (gv GroupVersion) MarshalJSON() ([]byte, error) { - s := gv.String() - if strings.Count(s, "/") > 1 { - return []byte{}, fmt.Errorf("illegal GroupVersion %v: contains more than one /", s) - } - return json.Marshal(s) -} - -func (gv *GroupVersion) unmarshal(value []byte) error { - var s string - if err := json.Unmarshal(value, &s); err != nil { - return err - } - parsed, err := schema.ParseGroupVersion(s) - if err != nil { - return err - } - gv.Group, gv.Version = parsed.Group, parsed.Version - return nil -} - -// UnmarshalJSON implements the json.Unmarshaller interface. -func (gv *GroupVersion) UnmarshalJSON(value []byte) error { - return gv.unmarshal(value) -} - -// UnmarshalTEXT implements the Ugorji's encoding.TextUnmarshaler interface. -func (gv *GroupVersion) UnmarshalText(value []byte) error { - return gv.unmarshal(value) -} diff --git a/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/group_version_test.go b/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/group_version_test.go deleted file mode 100644 index 5daf9010..00000000 --- a/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/group_version_test.go +++ /dev/null @@ -1,78 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1 - -import ( - "encoding/json" - "reflect" - "testing" - - "github.com/ugorji/go/codec" -) - -type GroupVersionHolder struct { - GV GroupVersion `json:"val"` -} - -func TestGroupVersionUnmarshalJSON(t *testing.T) { - cases := []struct { - input []byte - expect GroupVersion - }{ - {[]byte(`{"val": "v1"}`), GroupVersion{"", "v1"}}, - {[]byte(`{"val": "extensions/v1beta1"}`), GroupVersion{"extensions", "v1beta1"}}, - } - - for _, c := range cases { - var result GroupVersionHolder - // test golang lib's JSON codec - if err := json.Unmarshal([]byte(c.input), &result); err != nil { - t.Errorf("JSON codec failed to unmarshal input '%v': %v", c.input, err) - } - if !reflect.DeepEqual(result.GV, c.expect) { - t.Errorf("JSON codec failed to unmarshal input '%s': expected %+v, got %+v", c.input, c.expect, result.GV) - } - // test the Ugorji codec - if err := codec.NewDecoderBytes(c.input, new(codec.JsonHandle)).Decode(&result); err != nil { - t.Errorf("Ugorji codec failed to unmarshal input '%v': %v", c.input, err) - } - if !reflect.DeepEqual(result.GV, c.expect) { - t.Errorf("Ugorji codec failed to unmarshal input '%s': expected %+v, got %+v", c.input, c.expect, result.GV) - } - } -} - -func TestGroupVersionMarshalJSON(t *testing.T) { - cases := []struct { - input GroupVersion - expect []byte - }{ - {GroupVersion{"", "v1"}, []byte(`{"val":"v1"}`)}, - {GroupVersion{"extensions", "v1beta1"}, []byte(`{"val":"extensions/v1beta1"}`)}, - } - - for _, c := range cases { - input := GroupVersionHolder{c.input} - result, err := json.Marshal(&input) - if err != nil { - t.Errorf("Failed to marshal input '%v': %v", input, err) - } - if !reflect.DeepEqual(result, c.expect) { - t.Errorf("Failed to marshal input '%+v': expected: %s, got: %s", input, c.expect, result) - } - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/helpers.go b/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/helpers.go deleted file mode 100644 index 908c2920..00000000 --- a/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/helpers.go +++ /dev/null @@ -1,183 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1 - -import ( - "fmt" - - "k8s.io/kubernetes/pkg/labels" - "k8s.io/kubernetes/pkg/selection" -) - -// LabelSelectorAsSelector converts the LabelSelector api type into a struct that implements -// labels.Selector -// Note: This function should be kept in sync with the selector methods in pkg/labels/selector.go -func LabelSelectorAsSelector(ps *LabelSelector) (labels.Selector, error) { - if ps == nil { - return labels.Nothing(), nil - } - if len(ps.MatchLabels)+len(ps.MatchExpressions) == 0 { - return labels.Everything(), nil - } - selector := labels.NewSelector() - for k, v := range ps.MatchLabels { - r, err := labels.NewRequirement(k, selection.Equals, []string{v}) - if err != nil { - return nil, err - } - selector = selector.Add(*r) - } - for _, expr := range ps.MatchExpressions { - var op selection.Operator - switch expr.Operator { - case LabelSelectorOpIn: - op = selection.In - case LabelSelectorOpNotIn: - op = selection.NotIn - case LabelSelectorOpExists: - op = selection.Exists - case LabelSelectorOpDoesNotExist: - op = selection.DoesNotExist - default: - return nil, fmt.Errorf("%q is not a valid pod selector operator", expr.Operator) - } - r, err := labels.NewRequirement(expr.Key, op, append([]string(nil), expr.Values...)) - if err != nil { - return nil, err - } - selector = selector.Add(*r) - } - return selector, nil -} - -// LabelSelectorAsMap converts the LabelSelector api type into a map of strings, ie. the -// original structure of a label selector. Operators that cannot be converted into plain -// labels (Exists, DoesNotExist, NotIn, and In with more than one value) will result in -// an error. -func LabelSelectorAsMap(ps *LabelSelector) (map[string]string, error) { - if ps == nil { - return nil, nil - } - selector := map[string]string{} - for k, v := range ps.MatchLabels { - selector[k] = v - } - for _, expr := range ps.MatchExpressions { - switch expr.Operator { - case LabelSelectorOpIn: - if len(expr.Values) != 1 { - return selector, fmt.Errorf("operator %q without a single value cannot be converted into the old label selector format", expr.Operator) - } - // Should we do anything in case this will override a previous key-value pair? - selector[expr.Key] = expr.Values[0] - case LabelSelectorOpNotIn, LabelSelectorOpExists, LabelSelectorOpDoesNotExist: - return selector, fmt.Errorf("operator %q cannot be converted into the old label selector format", expr.Operator) - default: - return selector, fmt.Errorf("%q is not a valid selector operator", expr.Operator) - } - } - return selector, nil -} - -// ParseToLabelSelector parses a string representing a selector into a LabelSelector object. -// Note: This function should be kept in sync with the parser in pkg/labels/selector.go -func ParseToLabelSelector(selector string) (*LabelSelector, error) { - reqs, err := labels.ParseToRequirements(selector) - if err != nil { - return nil, fmt.Errorf("couldn't parse the selector string \"%s\": %v", selector, err) - } - - labelSelector := &LabelSelector{ - MatchLabels: map[string]string{}, - MatchExpressions: []LabelSelectorRequirement{}, - } - for _, req := range reqs { - var op LabelSelectorOperator - switch req.Operator() { - case selection.Equals, selection.DoubleEquals: - vals := req.Values() - if vals.Len() != 1 { - return nil, fmt.Errorf("equals operator must have exactly one value") - } - val, ok := vals.PopAny() - if !ok { - return nil, fmt.Errorf("equals operator has exactly one value but it cannot be retrieved") - } - labelSelector.MatchLabels[req.Key()] = val - continue - case selection.In: - op = LabelSelectorOpIn - case selection.NotIn: - op = LabelSelectorOpNotIn - case selection.Exists: - op = LabelSelectorOpExists - case selection.DoesNotExist: - op = LabelSelectorOpDoesNotExist - case selection.GreaterThan, selection.LessThan: - // Adding a separate case for these operators to indicate that this is deliberate - return nil, fmt.Errorf("%q isn't supported in label selectors", req.Operator()) - default: - return nil, fmt.Errorf("%q is not a valid label selector operator", req.Operator()) - } - labelSelector.MatchExpressions = append(labelSelector.MatchExpressions, LabelSelectorRequirement{ - Key: req.Key(), - Operator: op, - Values: req.Values().List(), - }) - } - return labelSelector, nil -} - -// SetAsLabelSelector converts the labels.Set object into a LabelSelector api object. -func SetAsLabelSelector(ls labels.Set) *LabelSelector { - if ls == nil { - return nil - } - - selector := &LabelSelector{ - MatchLabels: make(map[string]string), - } - for label, value := range ls { - selector.MatchLabels[label] = value - } - - return selector -} - -// FormatLabelSelector convert labelSelector into plain string -func FormatLabelSelector(labelSelector *LabelSelector) string { - selector, err := LabelSelectorAsSelector(labelSelector) - if err != nil { - return "" - } - - l := selector.String() - if len(l) == 0 { - l = "" - } - return l -} - -func ExtractGroupVersions(l *APIGroupList) []string { - var groupVersions []string - for _, g := range l.Groups { - for _, gv := range g.Versions { - groupVersions = append(groupVersions, gv.GroupVersion) - } - } - return groupVersions -} diff --git a/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/helpers_test.go b/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/helpers_test.go deleted file mode 100644 index 84fd55d4..00000000 --- a/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/helpers_test.go +++ /dev/null @@ -1,154 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1 - -import ( - "reflect" - "strings" - "testing" - - "k8s.io/kubernetes/pkg/labels" -) - -func TestLabelSelectorAsSelector(t *testing.T) { - matchLabels := map[string]string{"foo": "bar"} - matchExpressions := []LabelSelectorRequirement{{ - Key: "baz", - Operator: LabelSelectorOpIn, - Values: []string{"qux", "norf"}, - }} - mustParse := func(s string) labels.Selector { - out, e := labels.Parse(s) - if e != nil { - panic(e) - } - return out - } - tc := []struct { - in *LabelSelector - out labels.Selector - expectErr bool - }{ - {in: nil, out: labels.Nothing()}, - {in: &LabelSelector{}, out: labels.Everything()}, - { - in: &LabelSelector{MatchLabels: matchLabels}, - out: mustParse("foo=bar"), - }, - { - in: &LabelSelector{MatchExpressions: matchExpressions}, - out: mustParse("baz in (norf,qux)"), - }, - { - in: &LabelSelector{MatchLabels: matchLabels, MatchExpressions: matchExpressions}, - out: mustParse("baz in (norf,qux),foo=bar"), - }, - { - in: &LabelSelector{ - MatchExpressions: []LabelSelectorRequirement{{ - Key: "baz", - Operator: LabelSelectorOpExists, - Values: []string{"qux", "norf"}, - }}, - }, - expectErr: true, - }, - } - - for i, tc := range tc { - out, err := LabelSelectorAsSelector(tc.in) - if err == nil && tc.expectErr { - t.Errorf("[%v]expected error but got none.", i) - } - if err != nil && !tc.expectErr { - t.Errorf("[%v]did not expect error but got: %v", i, err) - } - if !reflect.DeepEqual(out, tc.out) { - t.Errorf("[%v]expected:\n\t%+v\nbut got:\n\t%+v", i, tc.out, out) - } - } -} - -func TestLabelSelectorAsMap(t *testing.T) { - matchLabels := map[string]string{"foo": "bar"} - matchExpressions := func(operator LabelSelectorOperator, values []string) []LabelSelectorRequirement { - return []LabelSelectorRequirement{{ - Key: "baz", - Operator: operator, - Values: values, - }} - } - - tests := []struct { - in *LabelSelector - out map[string]string - errString string - }{ - {in: nil, out: nil}, - { - in: &LabelSelector{MatchLabels: matchLabels}, - out: map[string]string{"foo": "bar"}, - }, - { - in: &LabelSelector{MatchLabels: matchLabels, MatchExpressions: matchExpressions(LabelSelectorOpIn, []string{"norf"})}, - out: map[string]string{"foo": "bar", "baz": "norf"}, - }, - { - in: &LabelSelector{MatchExpressions: matchExpressions(LabelSelectorOpIn, []string{"norf"})}, - out: map[string]string{"baz": "norf"}, - }, - { - in: &LabelSelector{MatchLabels: matchLabels, MatchExpressions: matchExpressions(LabelSelectorOpIn, []string{"norf", "qux"})}, - out: map[string]string{"foo": "bar"}, - errString: "without a single value cannot be converted", - }, - { - in: &LabelSelector{MatchExpressions: matchExpressions(LabelSelectorOpNotIn, []string{"norf", "qux"})}, - out: map[string]string{}, - errString: "cannot be converted", - }, - { - in: &LabelSelector{MatchLabels: matchLabels, MatchExpressions: matchExpressions(LabelSelectorOpExists, []string{})}, - out: map[string]string{"foo": "bar"}, - errString: "cannot be converted", - }, - { - in: &LabelSelector{MatchExpressions: matchExpressions(LabelSelectorOpDoesNotExist, []string{})}, - out: map[string]string{}, - errString: "cannot be converted", - }, - } - - for i, tc := range tests { - out, err := LabelSelectorAsMap(tc.in) - if err == nil && len(tc.errString) > 0 { - t.Errorf("[%v]expected error but got none.", i) - continue - } - if err != nil && len(tc.errString) == 0 { - t.Errorf("[%v]did not expect error but got: %v", i, err) - continue - } - if err != nil && len(tc.errString) > 0 && !strings.Contains(err.Error(), tc.errString) { - t.Errorf("[%v]expected error with %q but got: %v", i, tc.errString, err) - continue - } - if !reflect.DeepEqual(out, tc.out) { - t.Errorf("[%v]expected:\n\t%+v\nbut got:\n\t%+v", i, tc.out, out) - } - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/meta.go b/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/meta.go deleted file mode 100644 index 5d9113a7..00000000 --- a/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/meta.go +++ /dev/null @@ -1,66 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1 - -import ( - "k8s.io/kubernetes/pkg/runtime/schema" -) - -// ListMetaAccessor retrieves the list interface from an object -// TODO: move this, and TypeMeta and ListMeta, to a different package -type ListMetaAccessor interface { - GetListMeta() List -} - -// List lets you work with list metadata from any of the versioned or -// internal API objects. Attempting to set or retrieve a field on an object that does -// not support that field will be a no-op and return a default value. -// TODO: move this, and TypeMeta and ListMeta, to a different package -type List interface { - GetResourceVersion() string - SetResourceVersion(version string) - GetSelfLink() string - SetSelfLink(selfLink string) -} - -// Type exposes the type and APIVersion of versioned or internal API objects. -// TODO: move this, and TypeMeta and ListMeta, to a different package -type Type interface { - GetAPIVersion() string - SetAPIVersion(version string) - GetKind() string - SetKind(kind string) -} - -func (meta *ListMeta) GetResourceVersion() string { return meta.ResourceVersion } -func (meta *ListMeta) SetResourceVersion(version string) { meta.ResourceVersion = version } -func (meta *ListMeta) GetSelfLink() string { return meta.SelfLink } -func (meta *ListMeta) SetSelfLink(selfLink string) { meta.SelfLink = selfLink } - -func (obj *TypeMeta) GetObjectKind() schema.ObjectKind { return obj } - -// SetGroupVersionKind satisfies the ObjectKind interface for all objects that embed TypeMeta -func (obj *TypeMeta) SetGroupVersionKind(gvk schema.GroupVersionKind) { - obj.APIVersion, obj.Kind = gvk.ToAPIVersionAndKind() -} - -// GroupVersionKind satisfies the ObjectKind interface for all objects that embed TypeMeta -func (obj *TypeMeta) GroupVersionKind() schema.GroupVersionKind { - return schema.FromAPIVersionAndKind(obj.APIVersion, obj.Kind) -} - -func (obj *ListMeta) GetListMeta() List { return obj } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/register.go b/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/register.go deleted file mode 100644 index 959cb0db..00000000 --- a/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/register.go +++ /dev/null @@ -1,51 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1 - -import ( - "k8s.io/kubernetes/pkg/runtime" - "k8s.io/kubernetes/pkg/runtime/schema" -) - -// GroupName is the group name for this API. -const GroupName = "meta.k8s.io" - -// SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = schema.GroupVersion{Group: "", Version: ""} - -// WatchEventKind is name reserved for serializing watch events. -const WatchEventKind = "WatchEvent" - -// Kind takes an unqualified kind and returns a Group qualified GroupKind -func Kind(kind string) schema.GroupKind { - return SchemeGroupVersion.WithKind(kind).GroupKind() -} - -// AddToGroupVersion registers common meta types into schemas. -func AddToGroupVersion(scheme *runtime.Scheme, groupVersion schema.GroupVersion) { - scheme.AddKnownTypeWithName(groupVersion.WithKind(WatchEventKind), &WatchEvent{}) - scheme.AddKnownTypeWithName( - schema.GroupVersion{Group: groupVersion.Group, Version: runtime.APIVersionInternal}.WithKind(WatchEventKind), - &InternalEvent{}, - ) - scheme.AddConversionFuncs( - Convert_versioned_Event_to_watch_Event, - Convert_versioned_InternalEvent_to_versioned_Event, - Convert_watch_Event_to_versioned_Event, - Convert_versioned_Event_to_versioned_InternalEvent, - ) -} diff --git a/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/time.go b/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/time.go index 6de5a8be..a1e01f34 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/time.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/time.go @@ -20,7 +20,7 @@ import ( "encoding/json" "time" - "k8s.io/kubernetes/pkg/genericapiserver/openapi/common" + "k8s.io/apimachinery/pkg/openapi" "github.com/go-openapi/spec" "github.com/google/gofuzz" @@ -145,8 +145,8 @@ func (t Time) MarshalJSON() ([]byte, error) { return json.Marshal(t.UTC().Format(time.RFC3339)) } -func (_ Time) OpenAPIDefinition() common.OpenAPIDefinition { - return common.OpenAPIDefinition{ +func (_ Time) OpenAPIDefinition() openapi.OpenAPIDefinition { + return openapi.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Type: []string{"string"}, diff --git a/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/time_proto.go b/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/time_proto.go deleted file mode 100644 index aea28e41..00000000 --- a/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/time_proto.go +++ /dev/null @@ -1,85 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1 - -import ( - "time" -) - -// Timestamp is a struct that is equivalent to Time, but intended for -// protobuf marshalling/unmarshalling. It is generated into a serialization -// that matches Time. Do not use in Go structs. -type Timestamp struct { - // Represents seconds of UTC time since Unix epoch - // 1970-01-01T00:00:00Z. Must be from from 0001-01-01T00:00:00Z to - // 9999-12-31T23:59:59Z inclusive. - Seconds int64 `json:"seconds" protobuf:"varint,1,opt,name=seconds"` - // Non-negative fractions of a second at nanosecond resolution. Negative - // second values with fractions must still have non-negative nanos values - // that count forward in time. Must be from 0 to 999,999,999 - // inclusive. This field may be limited in precision depending on context. - Nanos int32 `json:"nanos" protobuf:"varint,2,opt,name=nanos"` -} - -// Timestamp returns the Time as a new Timestamp value. -func (m *Time) ProtoTime() *Timestamp { - if m == nil { - return &Timestamp{} - } - return &Timestamp{ - Seconds: m.Time.Unix(), - Nanos: int32(m.Time.Nanosecond()), - } -} - -// Size implements the protobuf marshalling interface. -func (m *Time) Size() (n int) { - if m == nil || m.Time.IsZero() { - return 0 - } - return m.ProtoTime().Size() -} - -// Reset implements the protobuf marshalling interface. -func (m *Time) Unmarshal(data []byte) error { - if len(data) == 0 { - m.Time = time.Time{} - return nil - } - p := Timestamp{} - if err := p.Unmarshal(data); err != nil { - return err - } - m.Time = time.Unix(p.Seconds, int64(p.Nanos)).Local() - return nil -} - -// Marshal implements the protobuf marshalling interface. -func (m *Time) Marshal() (data []byte, err error) { - if m == nil || m.Time.IsZero() { - return nil, nil - } - return m.ProtoTime().Marshal() -} - -// MarshalTo implements the protobuf marshalling interface. -func (m *Time) MarshalTo(data []byte) (int, error) { - if m == nil || m.Time.IsZero() { - return 0, nil - } - return m.ProtoTime().MarshalTo(data) -} diff --git a/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/time_test.go b/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/time_test.go deleted file mode 100644 index 3ab1d5fd..00000000 --- a/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/time_test.go +++ /dev/null @@ -1,173 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1 - -import ( - "encoding/json" - "reflect" - "testing" - "time" - - "github.com/ghodss/yaml" -) - -type TimeHolder struct { - T Time `json:"t"` -} - -func TestTimeMarshalYAML(t *testing.T) { - cases := []struct { - input Time - result string - }{ - {Time{}, "t: null\n"}, - {Date(1998, time.May, 5, 1, 5, 5, 50, time.FixedZone("test", -4*60*60)), "t: 1998-05-05T05:05:05Z\n"}, - {Date(1998, time.May, 5, 5, 5, 5, 0, time.UTC), "t: 1998-05-05T05:05:05Z\n"}, - } - - for _, c := range cases { - input := TimeHolder{c.input} - result, err := yaml.Marshal(&input) - if err != nil { - t.Errorf("Failed to marshal input: '%v': %v", input, err) - } - if string(result) != c.result { - t.Errorf("Failed to marshal input: '%v': expected %+v, got %q", input, c.result, string(result)) - } - } -} - -func TestTimeUnmarshalYAML(t *testing.T) { - cases := []struct { - input string - result Time - }{ - {"t: null\n", Time{}}, - {"t: 1998-05-05T05:05:05Z\n", Time{Date(1998, time.May, 5, 5, 5, 5, 0, time.UTC).Local()}}, - } - - for _, c := range cases { - var result TimeHolder - if err := yaml.Unmarshal([]byte(c.input), &result); err != nil { - t.Errorf("Failed to unmarshal input '%v': %v", c.input, err) - } - if result.T != c.result { - t.Errorf("Failed to unmarshal input '%v': expected %+v, got %+v", c.input, c.result, result) - } - } -} - -func TestTimeMarshalJSON(t *testing.T) { - cases := []struct { - input Time - result string - }{ - {Time{}, "{\"t\":null}"}, - {Date(1998, time.May, 5, 5, 5, 5, 50, time.UTC), "{\"t\":\"1998-05-05T05:05:05Z\"}"}, - {Date(1998, time.May, 5, 5, 5, 5, 0, time.UTC), "{\"t\":\"1998-05-05T05:05:05Z\"}"}, - } - - for _, c := range cases { - input := TimeHolder{c.input} - result, err := json.Marshal(&input) - if err != nil { - t.Errorf("Failed to marshal input: '%v': %v", input, err) - } - if string(result) != c.result { - t.Errorf("Failed to marshal input: '%v': expected %+v, got %q", input, c.result, string(result)) - } - } -} - -func TestTimeUnmarshalJSON(t *testing.T) { - cases := []struct { - input string - result Time - }{ - {"{\"t\":null}", Time{}}, - {"{\"t\":\"1998-05-05T05:05:05Z\"}", Time{Date(1998, time.May, 5, 5, 5, 5, 0, time.UTC).Local()}}, - } - - for _, c := range cases { - var result TimeHolder - if err := json.Unmarshal([]byte(c.input), &result); err != nil { - t.Errorf("Failed to unmarshal input '%v': %v", c.input, err) - } - if result.T != c.result { - t.Errorf("Failed to unmarshal input '%v': expected %+v, got %+v", c.input, c.result, result) - } - } -} - -func TestTimeMarshalJSONUnmarshalYAML(t *testing.T) { - cases := []struct { - input Time - }{ - {Time{}}, - {Date(1998, time.May, 5, 5, 5, 5, 50, time.Local).Rfc3339Copy()}, - {Date(1998, time.May, 5, 5, 5, 5, 0, time.Local).Rfc3339Copy()}, - } - - for i, c := range cases { - input := TimeHolder{c.input} - jsonMarshalled, err := json.Marshal(&input) - if err != nil { - t.Errorf("%d-1: Failed to marshal input: '%v': %v", i, input, err) - } - - var result TimeHolder - err = yaml.Unmarshal(jsonMarshalled, &result) - if err != nil { - t.Errorf("%d-2: Failed to unmarshal '%+v': %v", i, string(jsonMarshalled), err) - } - - iN, iO := input.T.Zone() - oN, oO := result.T.Zone() - if iN != oN || iO != oO { - t.Errorf("%d-3: Time zones differ before and after serialization %s:%d %s:%d", i, iN, iO, oN, oO) - } - - if input.T.UnixNano() != result.T.UnixNano() { - t.Errorf("%d-4: Failed to marshal input '%#v': got %#v", i, input, result) - } - } -} - -func TestTimeProto(t *testing.T) { - cases := []struct { - input Time - }{ - {Time{}}, - {Date(1998, time.May, 5, 1, 5, 5, 50, time.Local)}, - {Date(1998, time.May, 5, 5, 5, 5, 0, time.Local)}, - } - - for _, c := range cases { - input := c.input - data, err := input.Marshal() - if err != nil { - t.Fatalf("Failed to marshal input: '%v': %v", input, err) - } - time := Time{} - if err := time.Unmarshal(data); err != nil { - t.Fatalf("Failed to unmarshal output: '%v': %v", input, err) - } - if !reflect.DeepEqual(input, time) { - t.Errorf("Marshal->Unmarshal is not idempotent: '%v' vs '%v'", input, time) - } - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/types.go b/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/types.go deleted file mode 100644 index 443cb41f..00000000 --- a/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/types.go +++ /dev/null @@ -1,553 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Package unversioned contains API types that are common to all versions. -// -// The package contains two categories of types: -// - external (serialized) types that lack their own version (e.g TypeMeta) -// - internal (never-serialized) types that are needed by several different -// api groups, and so live here, to avoid duplication and/or import loops -// (e.g. LabelSelector). -// In the future, we will probably move these categories of objects into -// separate packages. -package v1 - -import ( - "fmt" - "strings" - - "github.com/ugorji/go/codec" - - "k8s.io/kubernetes/pkg/types" -) - -// TypeMeta describes an individual object in an API response or request -// with strings representing the type of the object and its API schema version. -// Structures that are versioned or persisted should inline TypeMeta. -type TypeMeta struct { - // Kind is a string value representing the REST resource this object represents. - // Servers may infer this from the endpoint the client submits requests to. - // Cannot be updated. - // In CamelCase. - // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds - // +optional - Kind string `json:"kind,omitempty" protobuf:"bytes,1,opt,name=kind"` - - // APIVersion defines the versioned schema of this representation of an object. - // Servers should convert recognized schemas to the latest internal value, and - // may reject unrecognized values. - // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources - // +optional - APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,2,opt,name=apiVersion"` -} - -// ListMeta describes metadata that synthetic resources must have, including lists and -// various status objects. A resource may have only one of {ObjectMeta, ListMeta}. -type ListMeta struct { - // SelfLink is a URL representing this object. - // Populated by the system. - // Read-only. - // +optional - SelfLink string `json:"selfLink,omitempty" protobuf:"bytes,1,opt,name=selfLink"` - - // String that identifies the server's internal version of this object that - // can be used by clients to determine when objects have changed. - // Value must be treated as opaque by clients and passed unmodified back to the server. - // Populated by the system. - // Read-only. - // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency - // +optional - ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,2,opt,name=resourceVersion"` -} - -// OwnerReference contains enough information to let you identify an owning -// object. Currently, an owning object must be in the same namespace, so there -// is no namespace field. -type OwnerReference struct { - // API version of the referent. - APIVersion string `json:"apiVersion" protobuf:"bytes,5,opt,name=apiVersion"` - // Kind of the referent. - // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds - Kind string `json:"kind" protobuf:"bytes,1,opt,name=kind"` - // Name of the referent. - // More info: http://kubernetes.io/docs/user-guide/identifiers#names - Name string `json:"name" protobuf:"bytes,3,opt,name=name"` - // UID of the referent. - // More info: http://kubernetes.io/docs/user-guide/identifiers#uids - UID types.UID `json:"uid" protobuf:"bytes,4,opt,name=uid,casttype=k8s.io/kubernetes/pkg/types.UID"` - // If true, this reference points to the managing controller. - // +optional - Controller *bool `json:"controller,omitempty" protobuf:"varint,6,opt,name=controller"` -} - -// ExportOptions is the query options to the standard REST get call. -type ExportOptions struct { - TypeMeta `json:",inline"` - // Should this value be exported. Export strips fields that a user can not specify. - Export bool `json:"export" protobuf:"varint,1,opt,name=export"` - // Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. - Exact bool `json:"exact" protobuf:"varint,2,opt,name=exact"` -} - -// GetOptions is the standard query options to the standard REST get call. -type GetOptions struct { - TypeMeta `json:",inline"` - // When specified: - // - if unset, then the result is returned from remote storage based on quorum-read flag; - // - if it's 0, then we simply return what we currently have in cache, no guarantee; - // - if set to non zero, then the result is at least as fresh as given rv. - ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,1,opt,name=resourceVersion"` -} - -// Status is a return value for calls that don't return other objects. -type Status struct { - TypeMeta `json:",inline"` - // Standard list metadata. - // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds - // +optional - ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // Status of the operation. - // One of: "Success" or "Failure". - // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status - // +optional - Status string `json:"status,omitempty" protobuf:"bytes,2,opt,name=status"` - // A human-readable description of the status of this operation. - // +optional - Message string `json:"message,omitempty" protobuf:"bytes,3,opt,name=message"` - // A machine-readable description of why this operation is in the - // "Failure" status. If this value is empty there - // is no information available. A Reason clarifies an HTTP status - // code but does not override it. - // +optional - Reason StatusReason `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason,casttype=StatusReason"` - // Extended data associated with the reason. Each reason may define its - // own extended details. This field is optional and the data returned - // is not guaranteed to conform to any schema except that defined by - // the reason type. - // +optional - Details *StatusDetails `json:"details,omitempty" protobuf:"bytes,5,opt,name=details"` - // Suggested HTTP return code for this status, 0 if not set. - // +optional - Code int32 `json:"code,omitempty" protobuf:"varint,6,opt,name=code"` -} - -// StatusDetails is a set of additional properties that MAY be set by the -// server to provide additional information about a response. The Reason -// field of a Status object defines what attributes will be set. Clients -// must ignore fields that do not match the defined type of each attribute, -// and should assume that any attribute may be empty, invalid, or under -// defined. -type StatusDetails struct { - // The name attribute of the resource associated with the status StatusReason - // (when there is a single name which can be described). - // +optional - Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"` - // The group attribute of the resource associated with the status StatusReason. - // +optional - Group string `json:"group,omitempty" protobuf:"bytes,2,opt,name=group"` - // The kind attribute of the resource associated with the status StatusReason. - // On some operations may differ from the requested resource Kind. - // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds - // +optional - Kind string `json:"kind,omitempty" protobuf:"bytes,3,opt,name=kind"` - // The Causes array includes more details associated with the StatusReason - // failure. Not all StatusReasons may provide detailed causes. - // +optional - Causes []StatusCause `json:"causes,omitempty" protobuf:"bytes,4,rep,name=causes"` - // If specified, the time in seconds before the operation should be retried. - // +optional - RetryAfterSeconds int32 `json:"retryAfterSeconds,omitempty" protobuf:"varint,5,opt,name=retryAfterSeconds"` -} - -// Values of Status.Status -const ( - StatusSuccess = "Success" - StatusFailure = "Failure" -) - -// StatusReason is an enumeration of possible failure causes. Each StatusReason -// must map to a single HTTP status code, but multiple reasons may map -// to the same HTTP status code. -// TODO: move to apiserver -type StatusReason string - -const ( - // StatusReasonUnknown means the server has declined to indicate a specific reason. - // The details field may contain other information about this error. - // Status code 500. - StatusReasonUnknown StatusReason = "" - - // StatusReasonUnauthorized means the server can be reached and understood the request, but requires - // the user to present appropriate authorization credentials (identified by the WWW-Authenticate header) - // in order for the action to be completed. If the user has specified credentials on the request, the - // server considers them insufficient. - // Status code 401 - StatusReasonUnauthorized StatusReason = "Unauthorized" - - // StatusReasonForbidden means the server can be reached and understood the request, but refuses - // to take any further action. It is the result of the server being configured to deny access for some reason - // to the requested resource by the client. - // Details (optional): - // "kind" string - the kind attribute of the forbidden resource - // on some operations may differ from the requested - // resource. - // "id" string - the identifier of the forbidden resource - // Status code 403 - StatusReasonForbidden StatusReason = "Forbidden" - - // StatusReasonNotFound means one or more resources required for this operation - // could not be found. - // Details (optional): - // "kind" string - the kind attribute of the missing resource - // on some operations may differ from the requested - // resource. - // "id" string - the identifier of the missing resource - // Status code 404 - StatusReasonNotFound StatusReason = "NotFound" - - // StatusReasonAlreadyExists means the resource you are creating already exists. - // Details (optional): - // "kind" string - the kind attribute of the conflicting resource - // "id" string - the identifier of the conflicting resource - // Status code 409 - StatusReasonAlreadyExists StatusReason = "AlreadyExists" - - // StatusReasonConflict means the requested operation cannot be completed - // due to a conflict in the operation. The client may need to alter the - // request. Each resource may define custom details that indicate the - // nature of the conflict. - // Status code 409 - StatusReasonConflict StatusReason = "Conflict" - - // StatusReasonGone means the item is no longer available at the server and no - // forwarding address is known. - // Status code 410 - StatusReasonGone StatusReason = "Gone" - - // StatusReasonInvalid means the requested create or update operation cannot be - // completed due to invalid data provided as part of the request. The client may - // need to alter the request. When set, the client may use the StatusDetails - // message field as a summary of the issues encountered. - // Details (optional): - // "kind" string - the kind attribute of the invalid resource - // "id" string - the identifier of the invalid resource - // "causes" - one or more StatusCause entries indicating the data in the - // provided resource that was invalid. The code, message, and - // field attributes will be set. - // Status code 422 - StatusReasonInvalid StatusReason = "Invalid" - - // StatusReasonServerTimeout means the server can be reached and understood the request, - // but cannot complete the action in a reasonable time. The client should retry the request. - // This is may be due to temporary server load or a transient communication issue with - // another server. Status code 500 is used because the HTTP spec provides no suitable - // server-requested client retry and the 5xx class represents actionable errors. - // Details (optional): - // "kind" string - the kind attribute of the resource being acted on. - // "id" string - the operation that is being attempted. - // "retryAfterSeconds" int32 - the number of seconds before the operation should be retried - // Status code 500 - StatusReasonServerTimeout StatusReason = "ServerTimeout" - - // StatusReasonTimeout means that the request could not be completed within the given time. - // Clients can get this response only when they specified a timeout param in the request, - // or if the server cannot complete the operation within a reasonable amount of time. - // The request might succeed with an increased value of timeout param. The client *should* - // wait at least the number of seconds specified by the retryAfterSeconds field. - // Details (optional): - // "retryAfterSeconds" int32 - the number of seconds before the operation should be retried - // Status code 504 - StatusReasonTimeout StatusReason = "Timeout" - - // StatusReasonBadRequest means that the request itself was invalid, because the request - // doesn't make any sense, for example deleting a read-only object. This is different than - // StatusReasonInvalid above which indicates that the API call could possibly succeed, but the - // data was invalid. API calls that return BadRequest can never succeed. - StatusReasonBadRequest StatusReason = "BadRequest" - - // StatusReasonMethodNotAllowed means that the action the client attempted to perform on the - // resource was not supported by the code - for instance, attempting to delete a resource that - // can only be created. API calls that return MethodNotAllowed can never succeed. - StatusReasonMethodNotAllowed StatusReason = "MethodNotAllowed" - - // StatusReasonInternalError indicates that an internal error occurred, it is unexpected - // and the outcome of the call is unknown. - // Details (optional): - // "causes" - The original error - // Status code 500 - StatusReasonInternalError StatusReason = "InternalError" - - // StatusReasonExpired indicates that the request is invalid because the content you are requesting - // has expired and is no longer available. It is typically associated with watches that can't be - // serviced. - // Status code 410 (gone) - StatusReasonExpired StatusReason = "Expired" - - // StatusReasonServiceUnavailable means that the request itself was valid, - // but the requested service is unavailable at this time. - // Retrying the request after some time might succeed. - // Status code 503 - StatusReasonServiceUnavailable StatusReason = "ServiceUnavailable" -) - -// StatusCause provides more information about an api.Status failure, including -// cases when multiple errors are encountered. -type StatusCause struct { - // A machine-readable description of the cause of the error. If this value is - // empty there is no information available. - // +optional - Type CauseType `json:"reason,omitempty" protobuf:"bytes,1,opt,name=reason,casttype=CauseType"` - // A human-readable description of the cause of the error. This field may be - // presented as-is to a reader. - // +optional - Message string `json:"message,omitempty" protobuf:"bytes,2,opt,name=message"` - // The field of the resource that has caused this error, as named by its JSON - // serialization. May include dot and postfix notation for nested attributes. - // Arrays are zero-indexed. Fields may appear more than once in an array of - // causes due to fields having multiple errors. - // Optional. - // - // Examples: - // "name" - the field "name" on the current resource - // "items[0].name" - the field "name" on the first array entry in "items" - // +optional - Field string `json:"field,omitempty" protobuf:"bytes,3,opt,name=field"` -} - -// CauseType is a machine readable value providing more detail about what -// occurred in a status response. An operation may have multiple causes for a -// status (whether Failure or Success). -type CauseType string - -const ( - // CauseTypeFieldValueNotFound is used to report failure to find a requested value - // (e.g. looking up an ID). - CauseTypeFieldValueNotFound CauseType = "FieldValueNotFound" - // CauseTypeFieldValueRequired is used to report required values that are not - // provided (e.g. empty strings, null values, or empty arrays). - CauseTypeFieldValueRequired CauseType = "FieldValueRequired" - // CauseTypeFieldValueDuplicate is used to report collisions of values that must be - // unique (e.g. unique IDs). - CauseTypeFieldValueDuplicate CauseType = "FieldValueDuplicate" - // CauseTypeFieldValueInvalid is used to report malformed values (e.g. failed regex - // match). - CauseTypeFieldValueInvalid CauseType = "FieldValueInvalid" - // CauseTypeFieldValueNotSupported is used to report valid (as per formatting rules) - // values that can not be handled (e.g. an enumerated string). - CauseTypeFieldValueNotSupported CauseType = "FieldValueNotSupported" - // CauseTypeUnexpectedServerResponse is used to report when the server responded to the client - // without the expected return type. The presence of this cause indicates the error may be - // due to an intervening proxy or the server software malfunctioning. - CauseTypeUnexpectedServerResponse CauseType = "UnexpectedServerResponse" -) - -// APIVersions lists the versions that are available, to allow clients to -// discover the API at /api, which is the root path of the legacy v1 API. -// -// +protobuf.options.(gogoproto.goproto_stringer)=false -type APIVersions struct { - TypeMeta `json:",inline"` - // versions are the api versions that are available. - Versions []string `json:"versions" protobuf:"bytes,1,rep,name=versions"` - // a map of client CIDR to server address that is serving this group. - // This is to help clients reach servers in the most network-efficient way possible. - // Clients can use the appropriate server address as per the CIDR that they match. - // In case of multiple matches, clients should use the longest matching CIDR. - // The server returns only those CIDRs that it thinks that the client can match. - // For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. - // Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP. - ServerAddressByClientCIDRs []ServerAddressByClientCIDR `json:"serverAddressByClientCIDRs" protobuf:"bytes,2,rep,name=serverAddressByClientCIDRs"` -} - -// APIGroupList is a list of APIGroup, to allow clients to discover the API at -// /apis. -type APIGroupList struct { - TypeMeta `json:",inline"` - // groups is a list of APIGroup. - Groups []APIGroup `json:"groups" protobuf:"bytes,1,rep,name=groups"` -} - -// APIGroup contains the name, the supported versions, and the preferred version -// of a group. -type APIGroup struct { - TypeMeta `json:",inline"` - // name is the name of the group. - Name string `json:"name" protobuf:"bytes,1,opt,name=name"` - // versions are the versions supported in this group. - Versions []GroupVersionForDiscovery `json:"versions" protobuf:"bytes,2,rep,name=versions"` - // preferredVersion is the version preferred by the API server, which - // probably is the storage version. - // +optional - PreferredVersion GroupVersionForDiscovery `json:"preferredVersion,omitempty" protobuf:"bytes,3,opt,name=preferredVersion"` - // a map of client CIDR to server address that is serving this group. - // This is to help clients reach servers in the most network-efficient way possible. - // Clients can use the appropriate server address as per the CIDR that they match. - // In case of multiple matches, clients should use the longest matching CIDR. - // The server returns only those CIDRs that it thinks that the client can match. - // For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. - // Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP. - ServerAddressByClientCIDRs []ServerAddressByClientCIDR `json:"serverAddressByClientCIDRs" protobuf:"bytes,4,rep,name=serverAddressByClientCIDRs"` -} - -// ServerAddressByClientCIDR helps the client to determine the server address that they should use, depending on the clientCIDR that they match. -type ServerAddressByClientCIDR struct { - // The CIDR with which clients can match their IP to figure out the server address that they should use. - ClientCIDR string `json:"clientCIDR" protobuf:"bytes,1,opt,name=clientCIDR"` - // Address of this server, suitable for a client that matches the above CIDR. - // This can be a hostname, hostname:port, IP or IP:port. - ServerAddress string `json:"serverAddress" protobuf:"bytes,2,opt,name=serverAddress"` -} - -// GroupVersion contains the "group/version" and "version" string of a version. -// It is made a struct to keep extensibility. -type GroupVersionForDiscovery struct { - // groupVersion specifies the API group and version in the form "group/version" - GroupVersion string `json:"groupVersion" protobuf:"bytes,1,opt,name=groupVersion"` - // version specifies the version in the form of "version". This is to save - // the clients the trouble of splitting the GroupVersion. - Version string `json:"version" protobuf:"bytes,2,opt,name=version"` -} - -// APIResource specifies the name of a resource and whether it is namespaced. -type APIResource struct { - // name is the name of the resource. - Name string `json:"name" protobuf:"bytes,1,opt,name=name"` - // namespaced indicates if a resource is namespaced or not. - Namespaced bool `json:"namespaced" protobuf:"varint,2,opt,name=namespaced"` - // kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo') - Kind string `json:"kind" protobuf:"bytes,3,opt,name=kind"` - // verbs is a list of supported kube verbs (this includes get, list, watch, create, - // update, patch, delete, deletecollection, and proxy) - Verbs Verbs `json:"verbs" protobuf:"bytes,4,opt,name=verbs"` -} - -// Verbs masks the value so protobuf can generate -// -// +protobuf.nullable=true -// +protobuf.options.(gogoproto.goproto_stringer)=false -type Verbs []string - -func (vs Verbs) String() string { - return fmt.Sprintf("%v", []string(vs)) -} - -// CodecEncodeSelf is part of the codec.Selfer interface. -func (vs *Verbs) CodecEncodeSelf(encoder *codec.Encoder) { - encoder.Encode(vs) -} - -// CodecDecodeSelf is part of the codec.Selfer interface. It is overwritten here to make sure -// that an empty verbs list is not decoded as nil. On the other hand, an undefined verbs list -// will lead to nil because this decoding for Verbs is not invoked. -// -// TODO(sttts): this is due to a ugorji regression: https://github.com/ugorji/go/issues/119. Remove the -// workaround when the regression is fixed. -func (vs *Verbs) CodecDecodeSelf(decoder *codec.Decoder) { - m := []string{} - decoder.Decode(&m) - if len(m) == 0 { - *vs = []string{} - } else { - *vs = m - } -} - -// APIResourceList is a list of APIResource, it is used to expose the name of the -// resources supported in a specific group and version, and if the resource -// is namespaced. -type APIResourceList struct { - TypeMeta `json:",inline"` - // groupVersion is the group and version this APIResourceList is for. - GroupVersion string `json:"groupVersion" protobuf:"bytes,1,opt,name=groupVersion"` - // resources contains the name of the resources and if they are namespaced. - APIResources []APIResource `json:"resources" protobuf:"bytes,2,rep,name=resources"` -} - -// RootPaths lists the paths available at root. -// For example: "/healthz", "/apis". -type RootPaths struct { - // paths are the paths available at root. - Paths []string `json:"paths" protobuf:"bytes,1,rep,name=paths"` -} - -// TODO: remove me when watch is refactored -func LabelSelectorQueryParam(version string) string { - return "labelSelector" -} - -// TODO: remove me when watch is refactored -func FieldSelectorQueryParam(version string) string { - return "fieldSelector" -} - -// String returns available api versions as a human-friendly version string. -func (apiVersions APIVersions) String() string { - return strings.Join(apiVersions.Versions, ",") -} - -func (apiVersions APIVersions) GoString() string { - return apiVersions.String() -} - -// Patch is provided to give a concrete name and type to the Kubernetes PATCH request body. -type Patch struct{} - -// Note: -// There are two different styles of label selectors used in versioned types: -// an older style which is represented as just a string in versioned types, and a -// newer style that is structured. LabelSelector is an internal representation for the -// latter style. - -// A label selector is a label query over a set of resources. The result of matchLabels and -// matchExpressions are ANDed. An empty label selector matches all objects. A null -// label selector matches no objects. -type LabelSelector struct { - // matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - // map is equivalent to an element of matchExpressions, whose key field is "key", the - // operator is "In", and the values array contains only "value". The requirements are ANDed. - // +optional - MatchLabels map[string]string `json:"matchLabels,omitempty" protobuf:"bytes,1,rep,name=matchLabels"` - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - // +optional - MatchExpressions []LabelSelectorRequirement `json:"matchExpressions,omitempty" protobuf:"bytes,2,rep,name=matchExpressions"` -} - -// A label selector requirement is a selector that contains values, a key, and an operator that -// relates the key and values. -type LabelSelectorRequirement struct { - // key is the label key that the selector applies to. - Key string `json:"key" patchStrategy:"merge" patchMergeKey:"key" protobuf:"bytes,1,opt,name=key"` - // operator represents a key's relationship to a set of values. - // Valid operators ard In, NotIn, Exists and DoesNotExist. - Operator LabelSelectorOperator `json:"operator" protobuf:"bytes,2,opt,name=operator,casttype=LabelSelectorOperator"` - // values is an array of string values. If the operator is In or NotIn, - // the values array must be non-empty. If the operator is Exists or DoesNotExist, - // the values array must be empty. This array is replaced during a strategic - // merge patch. - // +optional - Values []string `json:"values,omitempty" protobuf:"bytes,3,rep,name=values"` -} - -// A label selector operator is the set of operators that can be used in a selector requirement. -type LabelSelectorOperator string - -const ( - LabelSelectorOpIn LabelSelectorOperator = "In" - LabelSelectorOpNotIn LabelSelectorOperator = "NotIn" - LabelSelectorOpExists LabelSelectorOperator = "Exists" - LabelSelectorOpDoesNotExist LabelSelectorOperator = "DoesNotExist" -) diff --git a/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/types_swagger_doc_generated.go b/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/types_swagger_doc_generated.go deleted file mode 100644 index 0cc65f1b..00000000 --- a/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/types_swagger_doc_generated.go +++ /dev/null @@ -1,231 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1 - -// This file contains a collection of methods that can be used from go-restful to -// generate Swagger API documentation for its models. Please read this PR for more -// information on the implementation: https://github.com/emicklei/go-restful/pull/215 -// -// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if -// they are on one line! For multiple line or blocks that you want to ignore use ---. -// Any context after a --- is ignored. -// -// Those methods can be generated by using hack/update-generated-swagger-docs.sh - -// AUTO-GENERATED FUNCTIONS START HERE -var map_APIGroup = map[string]string{ - "": "APIGroup contains the name, the supported versions, and the preferred version of a group.", - "name": "name is the name of the group.", - "versions": "versions are the versions supported in this group.", - "preferredVersion": "preferredVersion is the version preferred by the API server, which probably is the storage version.", - "serverAddressByClientCIDRs": "a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP.", -} - -func (APIGroup) SwaggerDoc() map[string]string { - return map_APIGroup -} - -var map_APIGroupList = map[string]string{ - "": "APIGroupList is a list of APIGroup, to allow clients to discover the API at /apis.", - "groups": "groups is a list of APIGroup.", -} - -func (APIGroupList) SwaggerDoc() map[string]string { - return map_APIGroupList -} - -var map_APIResource = map[string]string{ - "": "APIResource specifies the name of a resource and whether it is namespaced.", - "name": "name is the name of the resource.", - "namespaced": "namespaced indicates if a resource is namespaced or not.", - "kind": "kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo')", - "verbs": "verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy)", -} - -func (APIResource) SwaggerDoc() map[string]string { - return map_APIResource -} - -var map_APIResourceList = map[string]string{ - "": "APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced.", - "groupVersion": "groupVersion is the group and version this APIResourceList is for.", - "resources": "resources contains the name of the resources and if they are namespaced.", -} - -func (APIResourceList) SwaggerDoc() map[string]string { - return map_APIResourceList -} - -var map_APIVersions = map[string]string{ - "": "APIVersions lists the versions that are available, to allow clients to discover the API at /api, which is the root path of the legacy v1 API.", - "versions": "versions are the api versions that are available.", - "serverAddressByClientCIDRs": "a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP.", -} - -func (APIVersions) SwaggerDoc() map[string]string { - return map_APIVersions -} - -var map_ExportOptions = map[string]string{ - "": "ExportOptions is the query options to the standard REST get call.", - "export": "Should this value be exported. Export strips fields that a user can not specify.", - "exact": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", -} - -func (ExportOptions) SwaggerDoc() map[string]string { - return map_ExportOptions -} - -var map_GetOptions = map[string]string{ - "": "GetOptions is the standard query options to the standard REST get call.", - "resourceVersion": "When specified: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", -} - -func (GetOptions) SwaggerDoc() map[string]string { - return map_GetOptions -} - -var map_GroupVersionForDiscovery = map[string]string{ - "": "GroupVersion contains the \"group/version\" and \"version\" string of a version. It is made a struct to keep extensibility.", - "groupVersion": "groupVersion specifies the API group and version in the form \"group/version\"", - "version": "version specifies the version in the form of \"version\". This is to save the clients the trouble of splitting the GroupVersion.", -} - -func (GroupVersionForDiscovery) SwaggerDoc() map[string]string { - return map_GroupVersionForDiscovery -} - -var map_LabelSelector = map[string]string{ - "": "A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.", - "matchLabels": "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.", - "matchExpressions": "matchExpressions is a list of label selector requirements. The requirements are ANDed.", -} - -func (LabelSelector) SwaggerDoc() map[string]string { - return map_LabelSelector -} - -var map_LabelSelectorRequirement = map[string]string{ - "": "A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.", - "key": "key is the label key that the selector applies to.", - "operator": "operator represents a key's relationship to a set of values. Valid operators ard In, NotIn, Exists and DoesNotExist.", - "values": "values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.", -} - -func (LabelSelectorRequirement) SwaggerDoc() map[string]string { - return map_LabelSelectorRequirement -} - -var map_ListMeta = map[string]string{ - "": "ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.", - "selfLink": "SelfLink is a URL representing this object. Populated by the system. Read-only.", - "resourceVersion": "String that identifies the server's internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency", -} - -func (ListMeta) SwaggerDoc() map[string]string { - return map_ListMeta -} - -var map_OwnerReference = map[string]string{ - "": "OwnerReference contains enough information to let you identify an owning object. Currently, an owning object must be in the same namespace, so there is no namespace field.", - "apiVersion": "API version of the referent.", - "kind": "Kind of the referent. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", - "name": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names", - "uid": "UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids", - "controller": "If true, this reference points to the managing controller.", -} - -func (OwnerReference) SwaggerDoc() map[string]string { - return map_OwnerReference -} - -var map_Patch = map[string]string{ - "": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", -} - -func (Patch) SwaggerDoc() map[string]string { - return map_Patch -} - -var map_RootPaths = map[string]string{ - "": "RootPaths lists the paths available at root. For example: \"/healthz\", \"/apis\".", - "paths": "paths are the paths available at root.", -} - -func (RootPaths) SwaggerDoc() map[string]string { - return map_RootPaths -} - -var map_ServerAddressByClientCIDR = map[string]string{ - "": "ServerAddressByClientCIDR helps the client to determine the server address that they should use, depending on the clientCIDR that they match.", - "clientCIDR": "The CIDR with which clients can match their IP to figure out the server address that they should use.", - "serverAddress": "Address of this server, suitable for a client that matches the above CIDR. This can be a hostname, hostname:port, IP or IP:port.", -} - -func (ServerAddressByClientCIDR) SwaggerDoc() map[string]string { - return map_ServerAddressByClientCIDR -} - -var map_Status = map[string]string{ - "": "Status is a return value for calls that don't return other objects.", - "metadata": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", - "status": "Status of the operation. One of: \"Success\" or \"Failure\". More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", - "message": "A human-readable description of the status of this operation.", - "reason": "A machine-readable description of why this operation is in the \"Failure\" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it.", - "details": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.", - "code": "Suggested HTTP return code for this status, 0 if not set.", -} - -func (Status) SwaggerDoc() map[string]string { - return map_Status -} - -var map_StatusCause = map[string]string{ - "": "StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.", - "reason": "A machine-readable description of the cause of the error. If this value is empty there is no information available.", - "message": "A human-readable description of the cause of the error. This field may be presented as-is to a reader.", - "field": "The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. Optional.\n\nExamples:\n \"name\" - the field \"name\" on the current resource\n \"items[0].name\" - the field \"name\" on the first array entry in \"items\"", -} - -func (StatusCause) SwaggerDoc() map[string]string { - return map_StatusCause -} - -var map_StatusDetails = map[string]string{ - "": "StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined.", - "name": "The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described).", - "group": "The group attribute of the resource associated with the status StatusReason.", - "kind": "The kind attribute of the resource associated with the status StatusReason. On some operations may differ from the requested resource Kind. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", - "causes": "The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes.", - "retryAfterSeconds": "If specified, the time in seconds before the operation should be retried.", -} - -func (StatusDetails) SwaggerDoc() map[string]string { - return map_StatusDetails -} - -var map_TypeMeta = map[string]string{ - "": "TypeMeta describes an individual object in an API response or request with strings representing the type of the object and its API schema version. Structures that are versioned or persisted should inline TypeMeta.", - "kind": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", - "apiVersion": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", -} - -func (TypeMeta) SwaggerDoc() map[string]string { - return map_TypeMeta -} - -// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/types_test.go b/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/types_test.go deleted file mode 100644 index 540ba713..00000000 --- a/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/types_test.go +++ /dev/null @@ -1,112 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1 - -import ( - "encoding/json" - "reflect" - "testing" - - "github.com/ugorji/go/codec" -) - -func TestVerbsMarshalJSON(t *testing.T) { - cases := []struct { - input APIResource - result string - }{ - {APIResource{}, `{"name":"","namespaced":false,"kind":"","verbs":null}`}, - {APIResource{Verbs: Verbs([]string{})}, `{"name":"","namespaced":false,"kind":"","verbs":[]}`}, - {APIResource{Verbs: Verbs([]string{"delete"})}, `{"name":"","namespaced":false,"kind":"","verbs":["delete"]}`}, - } - - for i, c := range cases { - result, err := json.Marshal(&c.input) - if err != nil { - t.Errorf("[%d] Failed to marshal input: '%v': %v", i, c.input, err) - } - if string(result) != c.result { - t.Errorf("[%d] Failed to marshal input: '%v': expected %+v, got %q", i, c.input, c.result, string(result)) - } - } -} - -func TestVerbsUnmarshalJSON(t *testing.T) { - cases := []struct { - input string - result APIResource - }{ - {`{}`, APIResource{}}, - {`{"verbs":null}`, APIResource{}}, - {`{"verbs":[]}`, APIResource{Verbs: Verbs([]string{})}}, - {`{"verbs":["delete"]}`, APIResource{Verbs: Verbs([]string{"delete"})}}, - } - - for i, c := range cases { - var result APIResource - if err := codec.NewDecoderBytes([]byte(c.input), new(codec.JsonHandle)).Decode(&result); err != nil { - t.Errorf("[%d] Failed to unmarshal input '%v': %v", i, c.input, err) - } - if !reflect.DeepEqual(result, c.result) { - t.Errorf("[%d] Failed to unmarshal input '%v': expected %+v, got %+v", i, c.input, c.result, result) - } - } -} - -func TestVerbsUgorjiUnmarshalJSON(t *testing.T) { - cases := []struct { - input string - result APIResource - }{ - {`{}`, APIResource{}}, - {`{"verbs":null}`, APIResource{}}, - {`{"verbs":[]}`, APIResource{Verbs: Verbs([]string{})}}, - {`{"verbs":["delete"]}`, APIResource{Verbs: Verbs([]string{"delete"})}}, - } - - for i, c := range cases { - var result APIResource - if err := json.Unmarshal([]byte(c.input), &result); err != nil { - t.Errorf("[%d] Failed to unmarshal input '%v': %v", i, c.input, err) - } - if !reflect.DeepEqual(result, c.result) { - t.Errorf("[%d] Failed to unmarshal input '%v': expected %+v, got %+v", i, c.input, c.result, result) - } - } -} - -func TestVerbsProto(t *testing.T) { - cases := []APIResource{ - {}, - {Verbs: Verbs([]string{})}, - {Verbs: Verbs([]string{"delete"})}, - } - - for _, input := range cases { - data, err := input.Marshal() - if err != nil { - t.Fatalf("Failed to marshal input: '%v': %v", input, err) - } - resource := APIResource{} - if err := resource.Unmarshal(data); err != nil { - t.Fatalf("Failed to unmarshal output: '%v': %v", input, err) - } - if !reflect.DeepEqual(input, resource) { - t.Errorf("Marshal->Unmarshal is not idempotent: '%v' vs '%v'", input, resource) - } - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/unstructured/.readonly b/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/unstructured/.readonly deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/unstructured/BUILD b/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/unstructured/BUILD deleted file mode 100644 index c6f2a2d9..00000000 --- a/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/unstructured/BUILD +++ /dev/null @@ -1,35 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["unstructured.go"], - tags = ["automanaged"], - deps = [ - "//pkg/apis/meta/v1:go_default_library", - "//pkg/runtime:go_default_library", - "//pkg/runtime/schema:go_default_library", - "//pkg/types:go_default_library", - "//pkg/util/json:go_default_library", - "//vendor:github.com/golang/glog", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/unstructured/unstructured.go b/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/unstructured/unstructured.go deleted file mode 100644 index 10412021..00000000 --- a/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/unstructured/unstructured.go +++ /dev/null @@ -1,659 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package unstructured - -import ( - "bytes" - gojson "encoding/json" - "errors" - "fmt" - "io" - "strings" - - "github.com/golang/glog" - - metav1 "k8s.io/kubernetes/pkg/apis/meta/v1" - "k8s.io/kubernetes/pkg/runtime" - "k8s.io/kubernetes/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/types" - "k8s.io/kubernetes/pkg/util/json" -) - -// Unstructured allows objects that do not have Golang structs registered to be manipulated -// generically. This can be used to deal with the API objects from a plug-in. Unstructured -// objects still have functioning TypeMeta features-- kind, version, etc. -// -// WARNING: This object has accessors for the v1 standard metadata. You *MUST NOT* use this -// type if you are dealing with objects that are not in the server meta v1 schema. -// -// TODO: make the serialization part of this type distinct from the field accessors. -type Unstructured struct { - // Object is a JSON compatible map with string, float, int, bool, []interface{}, or - // map[string]interface{} - // children. - Object map[string]interface{} -} - -var _ runtime.Unstructured = &Unstructured{} -var _ runtime.Unstructured = &UnstructuredList{} - -func (obj *Unstructured) GetObjectKind() schema.ObjectKind { return obj } -func (obj *UnstructuredList) GetObjectKind() schema.ObjectKind { return obj } - -func (obj *Unstructured) IsUnstructuredObject() {} -func (obj *UnstructuredList) IsUnstructuredObject() {} - -func (obj *Unstructured) IsList() bool { - if obj.Object != nil { - _, ok := obj.Object["items"] - return ok - } - return false -} -func (obj *UnstructuredList) IsList() bool { return true } - -func (obj *Unstructured) UnstructuredContent() map[string]interface{} { - if obj.Object == nil { - obj.Object = make(map[string]interface{}) - } - return obj.Object -} -func (obj *UnstructuredList) UnstructuredContent() map[string]interface{} { - if obj.Object == nil { - obj.Object = make(map[string]interface{}) - } - return obj.Object -} - -// MarshalJSON ensures that the unstructured object produces proper -// JSON when passed to Go's standard JSON library. -func (u *Unstructured) MarshalJSON() ([]byte, error) { - var buf bytes.Buffer - err := UnstructuredJSONScheme.Encode(u, &buf) - return buf.Bytes(), err -} - -// UnmarshalJSON ensures that the unstructured object properly decodes -// JSON when passed to Go's standard JSON library. -func (u *Unstructured) UnmarshalJSON(b []byte) error { - _, _, err := UnstructuredJSONScheme.Decode(b, nil, u) - return err -} - -func getNestedField(obj map[string]interface{}, fields ...string) interface{} { - var val interface{} = obj - for _, field := range fields { - if _, ok := val.(map[string]interface{}); !ok { - return nil - } - val = val.(map[string]interface{})[field] - } - return val -} - -func getNestedString(obj map[string]interface{}, fields ...string) string { - if str, ok := getNestedField(obj, fields...).(string); ok { - return str - } - return "" -} - -func getNestedSlice(obj map[string]interface{}, fields ...string) []string { - if m, ok := getNestedField(obj, fields...).([]interface{}); ok { - strSlice := make([]string, 0, len(m)) - for _, v := range m { - if str, ok := v.(string); ok { - strSlice = append(strSlice, str) - } - } - return strSlice - } - return nil -} - -func getNestedMap(obj map[string]interface{}, fields ...string) map[string]string { - if m, ok := getNestedField(obj, fields...).(map[string]interface{}); ok { - strMap := make(map[string]string, len(m)) - for k, v := range m { - if str, ok := v.(string); ok { - strMap[k] = str - } - } - return strMap - } - return nil -} - -func setNestedField(obj map[string]interface{}, value interface{}, fields ...string) { - m := obj - if len(fields) > 1 { - for _, field := range fields[0 : len(fields)-1] { - if _, ok := m[field].(map[string]interface{}); !ok { - m[field] = make(map[string]interface{}) - } - m = m[field].(map[string]interface{}) - } - } - m[fields[len(fields)-1]] = value -} - -func setNestedSlice(obj map[string]interface{}, value []string, fields ...string) { - m := make([]interface{}, 0, len(value)) - for _, v := range value { - m = append(m, v) - } - setNestedField(obj, m, fields...) -} - -func setNestedMap(obj map[string]interface{}, value map[string]string, fields ...string) { - m := make(map[string]interface{}, len(value)) - for k, v := range value { - m[k] = v - } - setNestedField(obj, m, fields...) -} - -func (u *Unstructured) setNestedField(value interface{}, fields ...string) { - if u.Object == nil { - u.Object = make(map[string]interface{}) - } - setNestedField(u.Object, value, fields...) -} - -func (u *Unstructured) setNestedSlice(value []string, fields ...string) { - if u.Object == nil { - u.Object = make(map[string]interface{}) - } - setNestedSlice(u.Object, value, fields...) -} - -func (u *Unstructured) setNestedMap(value map[string]string, fields ...string) { - if u.Object == nil { - u.Object = make(map[string]interface{}) - } - setNestedMap(u.Object, value, fields...) -} - -func extractOwnerReference(src interface{}) metav1.OwnerReference { - v := src.(map[string]interface{}) - controllerPtr, ok := (getNestedField(v, "controller")).(*bool) - if !ok { - controllerPtr = nil - } else { - if controllerPtr != nil { - controller := *controllerPtr - controllerPtr = &controller - } - } - return metav1.OwnerReference{ - Kind: getNestedString(v, "kind"), - Name: getNestedString(v, "name"), - APIVersion: getNestedString(v, "apiVersion"), - UID: (types.UID)(getNestedString(v, "uid")), - Controller: controllerPtr, - } -} - -func setOwnerReference(src metav1.OwnerReference) map[string]interface{} { - ret := make(map[string]interface{}) - controllerPtr := src.Controller - if controllerPtr != nil { - controller := *controllerPtr - controllerPtr = &controller - } - setNestedField(ret, src.Kind, "kind") - setNestedField(ret, src.Name, "name") - setNestedField(ret, src.APIVersion, "apiVersion") - setNestedField(ret, string(src.UID), "uid") - setNestedField(ret, controllerPtr, "controller") - return ret -} - -func getOwnerReferences(object map[string]interface{}) ([]map[string]interface{}, error) { - field := getNestedField(object, "metadata", "ownerReferences") - if field == nil { - return nil, fmt.Errorf("cannot find field metadata.ownerReferences in %v", object) - } - ownerReferences, ok := field.([]map[string]interface{}) - if ok { - return ownerReferences, nil - } - // TODO: This is hacky... - interfaces, ok := field.([]interface{}) - if !ok { - return nil, fmt.Errorf("expect metadata.ownerReferences to be a slice in %#v", object) - } - ownerReferences = make([]map[string]interface{}, 0, len(interfaces)) - for i := 0; i < len(interfaces); i++ { - r, ok := interfaces[i].(map[string]interface{}) - if !ok { - return nil, fmt.Errorf("expect element metadata.ownerReferences to be a map[string]interface{} in %#v", object) - } - ownerReferences = append(ownerReferences, r) - } - return ownerReferences, nil -} - -func (u *Unstructured) GetOwnerReferences() []metav1.OwnerReference { - original, err := getOwnerReferences(u.Object) - if err != nil { - glog.V(6).Info(err) - return nil - } - ret := make([]metav1.OwnerReference, 0, len(original)) - for i := 0; i < len(original); i++ { - ret = append(ret, extractOwnerReference(original[i])) - } - return ret -} - -func (u *Unstructured) SetOwnerReferences(references []metav1.OwnerReference) { - var newReferences = make([]map[string]interface{}, 0, len(references)) - for i := 0; i < len(references); i++ { - newReferences = append(newReferences, setOwnerReference(references[i])) - } - u.setNestedField(newReferences, "metadata", "ownerReferences") -} - -func (u *Unstructured) GetAPIVersion() string { - return getNestedString(u.Object, "apiVersion") -} - -func (u *Unstructured) SetAPIVersion(version string) { - u.setNestedField(version, "apiVersion") -} - -func (u *Unstructured) GetKind() string { - return getNestedString(u.Object, "kind") -} - -func (u *Unstructured) SetKind(kind string) { - u.setNestedField(kind, "kind") -} - -func (u *Unstructured) GetNamespace() string { - return getNestedString(u.Object, "metadata", "namespace") -} - -func (u *Unstructured) SetNamespace(namespace string) { - u.setNestedField(namespace, "metadata", "namespace") -} - -func (u *Unstructured) GetName() string { - return getNestedString(u.Object, "metadata", "name") -} - -func (u *Unstructured) SetName(name string) { - u.setNestedField(name, "metadata", "name") -} - -func (u *Unstructured) GetGenerateName() string { - return getNestedString(u.Object, "metadata", "generateName") -} - -func (u *Unstructured) SetGenerateName(name string) { - u.setNestedField(name, "metadata", "generateName") -} - -func (u *Unstructured) GetUID() types.UID { - return types.UID(getNestedString(u.Object, "metadata", "uid")) -} - -func (u *Unstructured) SetUID(uid types.UID) { - u.setNestedField(string(uid), "metadata", "uid") -} - -func (u *Unstructured) GetResourceVersion() string { - return getNestedString(u.Object, "metadata", "resourceVersion") -} - -func (u *Unstructured) SetResourceVersion(version string) { - u.setNestedField(version, "metadata", "resourceVersion") -} - -func (u *Unstructured) GetSelfLink() string { - return getNestedString(u.Object, "metadata", "selfLink") -} - -func (u *Unstructured) SetSelfLink(selfLink string) { - u.setNestedField(selfLink, "metadata", "selfLink") -} - -func (u *Unstructured) GetCreationTimestamp() metav1.Time { - var timestamp metav1.Time - timestamp.UnmarshalQueryParameter(getNestedString(u.Object, "metadata", "creationTimestamp")) - return timestamp -} - -func (u *Unstructured) SetCreationTimestamp(timestamp metav1.Time) { - ts, _ := timestamp.MarshalQueryParameter() - u.setNestedField(ts, "metadata", "creationTimestamp") -} - -func (u *Unstructured) GetDeletionTimestamp() *metav1.Time { - var timestamp metav1.Time - timestamp.UnmarshalQueryParameter(getNestedString(u.Object, "metadata", "deletionTimestamp")) - if timestamp.IsZero() { - return nil - } - return ×tamp -} - -func (u *Unstructured) SetDeletionTimestamp(timestamp *metav1.Time) { - ts, _ := timestamp.MarshalQueryParameter() - u.setNestedField(ts, "metadata", "deletionTimestamp") -} - -func (u *Unstructured) GetLabels() map[string]string { - return getNestedMap(u.Object, "metadata", "labels") -} - -func (u *Unstructured) SetLabels(labels map[string]string) { - u.setNestedMap(labels, "metadata", "labels") -} - -func (u *Unstructured) GetAnnotations() map[string]string { - return getNestedMap(u.Object, "metadata", "annotations") -} - -func (u *Unstructured) SetAnnotations(annotations map[string]string) { - u.setNestedMap(annotations, "metadata", "annotations") -} - -func (u *Unstructured) SetGroupVersionKind(gvk schema.GroupVersionKind) { - u.SetAPIVersion(gvk.GroupVersion().String()) - u.SetKind(gvk.Kind) -} - -func (u *Unstructured) GroupVersionKind() schema.GroupVersionKind { - gv, err := schema.ParseGroupVersion(u.GetAPIVersion()) - if err != nil { - return schema.GroupVersionKind{} - } - gvk := gv.WithKind(u.GetKind()) - return gvk -} - -func (u *Unstructured) GetFinalizers() []string { - return getNestedSlice(u.Object, "metadata", "finalizers") -} - -func (u *Unstructured) SetFinalizers(finalizers []string) { - u.setNestedSlice(finalizers, "metadata", "finalizers") -} - -func (u *Unstructured) GetClusterName() string { - return getNestedString(u.Object, "metadata", "clusterName") -} - -func (u *Unstructured) SetClusterName(clusterName string) { - u.setNestedField(clusterName, "metadata", "clusterName") -} - -// UnstructuredList allows lists that do not have Golang structs -// registered to be manipulated generically. This can be used to deal -// with the API lists from a plug-in. -type UnstructuredList struct { - Object map[string]interface{} - - // Items is a list of unstructured objects. - Items []*Unstructured `json:"items"` -} - -// MarshalJSON ensures that the unstructured list object produces proper -// JSON when passed to Go's standard JSON library. -func (u *UnstructuredList) MarshalJSON() ([]byte, error) { - var buf bytes.Buffer - err := UnstructuredJSONScheme.Encode(u, &buf) - return buf.Bytes(), err -} - -// UnmarshalJSON ensures that the unstructured list object properly -// decodes JSON when passed to Go's standard JSON library. -func (u *UnstructuredList) UnmarshalJSON(b []byte) error { - _, _, err := UnstructuredJSONScheme.Decode(b, nil, u) - return err -} - -func (u *UnstructuredList) setNestedField(value interface{}, fields ...string) { - if u.Object == nil { - u.Object = make(map[string]interface{}) - } - setNestedField(u.Object, value, fields...) -} - -func (u *UnstructuredList) GetAPIVersion() string { - return getNestedString(u.Object, "apiVersion") -} - -func (u *UnstructuredList) SetAPIVersion(version string) { - u.setNestedField(version, "apiVersion") -} - -func (u *UnstructuredList) GetKind() string { - return getNestedString(u.Object, "kind") -} - -func (u *UnstructuredList) SetKind(kind string) { - u.setNestedField(kind, "kind") -} - -func (u *UnstructuredList) GetResourceVersion() string { - return getNestedString(u.Object, "metadata", "resourceVersion") -} - -func (u *UnstructuredList) SetResourceVersion(version string) { - u.setNestedField(version, "metadata", "resourceVersion") -} - -func (u *UnstructuredList) GetSelfLink() string { - return getNestedString(u.Object, "metadata", "selfLink") -} - -func (u *UnstructuredList) SetSelfLink(selfLink string) { - u.setNestedField(selfLink, "metadata", "selfLink") -} - -func (u *UnstructuredList) SetGroupVersionKind(gvk schema.GroupVersionKind) { - u.SetAPIVersion(gvk.GroupVersion().String()) - u.SetKind(gvk.Kind) -} - -func (u *UnstructuredList) GroupVersionKind() schema.GroupVersionKind { - gv, err := schema.ParseGroupVersion(u.GetAPIVersion()) - if err != nil { - return schema.GroupVersionKind{} - } - gvk := gv.WithKind(u.GetKind()) - return gvk -} - -// UnstructuredJSONScheme is capable of converting JSON data into the Unstructured -// type, which can be used for generic access to objects without a predefined scheme. -// TODO: move into serializer/json. -var UnstructuredJSONScheme runtime.Codec = unstructuredJSONScheme{} - -type unstructuredJSONScheme struct{} - -func (s unstructuredJSONScheme) Decode(data []byte, _ *schema.GroupVersionKind, obj runtime.Object) (runtime.Object, *schema.GroupVersionKind, error) { - var err error - if obj != nil { - err = s.decodeInto(data, obj) - } else { - obj, err = s.decode(data) - } - - if err != nil { - return nil, nil, err - } - - gvk := obj.GetObjectKind().GroupVersionKind() - if len(gvk.Kind) == 0 { - return nil, &gvk, runtime.NewMissingKindErr(string(data)) - } - - return obj, &gvk, nil -} - -func (unstructuredJSONScheme) Encode(obj runtime.Object, w io.Writer) error { - switch t := obj.(type) { - case *Unstructured: - return json.NewEncoder(w).Encode(t.Object) - case *UnstructuredList: - items := make([]map[string]interface{}, 0, len(t.Items)) - for _, i := range t.Items { - items = append(items, i.Object) - } - t.Object["items"] = items - defer func() { delete(t.Object, "items") }() - return json.NewEncoder(w).Encode(t.Object) - case *runtime.Unknown: - // TODO: Unstructured needs to deal with ContentType. - _, err := w.Write(t.Raw) - return err - default: - return json.NewEncoder(w).Encode(t) - } -} - -func (s unstructuredJSONScheme) decode(data []byte) (runtime.Object, error) { - type detector struct { - Items gojson.RawMessage - } - var det detector - if err := json.Unmarshal(data, &det); err != nil { - return nil, err - } - - if det.Items != nil { - list := &UnstructuredList{} - err := s.decodeToList(data, list) - return list, err - } - - // No Items field, so it wasn't a list. - unstruct := &Unstructured{} - err := s.decodeToUnstructured(data, unstruct) - return unstruct, err -} - -func (s unstructuredJSONScheme) decodeInto(data []byte, obj runtime.Object) error { - switch x := obj.(type) { - case *Unstructured: - return s.decodeToUnstructured(data, x) - case *UnstructuredList: - return s.decodeToList(data, x) - case *runtime.VersionedObjects: - o, err := s.decode(data) - if err == nil { - x.Objects = []runtime.Object{o} - } - return err - default: - return json.Unmarshal(data, x) - } -} - -func (unstructuredJSONScheme) decodeToUnstructured(data []byte, unstruct *Unstructured) error { - m := make(map[string]interface{}) - if err := json.Unmarshal(data, &m); err != nil { - return err - } - - unstruct.Object = m - - return nil -} - -func (s unstructuredJSONScheme) decodeToList(data []byte, list *UnstructuredList) error { - type decodeList struct { - Items []gojson.RawMessage - } - - var dList decodeList - if err := json.Unmarshal(data, &dList); err != nil { - return err - } - - if err := json.Unmarshal(data, &list.Object); err != nil { - return err - } - - // For typed lists, e.g., a PodList, API server doesn't set each item's - // APIVersion and Kind. We need to set it. - listAPIVersion := list.GetAPIVersion() - listKind := list.GetKind() - itemKind := strings.TrimSuffix(listKind, "List") - - delete(list.Object, "items") - list.Items = nil - for _, i := range dList.Items { - unstruct := &Unstructured{} - if err := s.decodeToUnstructured([]byte(i), unstruct); err != nil { - return err - } - // This is hacky. Set the item's Kind and APIVersion to those inferred - // from the List. - if len(unstruct.GetKind()) == 0 && len(unstruct.GetAPIVersion()) == 0 { - unstruct.SetKind(itemKind) - unstruct.SetAPIVersion(listAPIVersion) - } - list.Items = append(list.Items, unstruct) - } - return nil -} - -// UnstructuredObjectConverter is an ObjectConverter for use with -// Unstructured objects. Since it has no schema or type information, -// it will only succeed for no-op conversions. This is provided as a -// sane implementation for APIs that require an object converter. -type UnstructuredObjectConverter struct{} - -func (UnstructuredObjectConverter) Convert(in, out, context interface{}) error { - unstructIn, ok := in.(*Unstructured) - if !ok { - return fmt.Errorf("input type %T in not valid for unstructured conversion", in) - } - - unstructOut, ok := out.(*Unstructured) - if !ok { - return fmt.Errorf("output type %T in not valid for unstructured conversion", out) - } - - // maybe deep copy the map? It is documented in the - // ObjectConverter interface that this function is not - // guaranteeed to not mutate the input. Or maybe set the input - // object to nil. - unstructOut.Object = unstructIn.Object - return nil -} - -func (UnstructuredObjectConverter) ConvertToVersion(in runtime.Object, target runtime.GroupVersioner) (runtime.Object, error) { - if kind := in.GetObjectKind().GroupVersionKind(); !kind.Empty() { - gvk, ok := target.KindForGroupVersionKinds([]schema.GroupVersionKind{kind}) - if !ok { - // TODO: should this be a typed error? - return nil, fmt.Errorf("%v is unstructured and is not suitable for converting to %q", kind, target) - } - in.GetObjectKind().SetGroupVersionKind(gvk) - } - return in, nil -} - -func (UnstructuredObjectConverter) ConvertFieldLabel(version, kind, label, value string) (string, string, error) { - return "", "", errors.New("unstructured cannot convert field labels") -} diff --git a/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/watch.go b/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/watch.go deleted file mode 100644 index 126848e7..00000000 --- a/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/watch.go +++ /dev/null @@ -1,80 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1 - -import ( - "k8s.io/kubernetes/pkg/conversion" - "k8s.io/kubernetes/pkg/runtime" - "k8s.io/kubernetes/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/watch" -) - -// Event represents a single event to a watched resource. -// -// +protobuf=true -type WatchEvent struct { - Type string `json:"type" protobuf:"bytes,1,opt,name=type"` - - // Object is: - // * If Type is Added or Modified: the new state of the object. - // * If Type is Deleted: the state of the object immediately before deletion. - // * If Type is Error: *Status is recommended; other types may make sense - // depending on context. - Object runtime.RawExtension `json:"object" protobuf:"bytes,2,opt,name=object"` -} - -func Convert_watch_Event_to_versioned_Event(in *watch.Event, out *WatchEvent, s conversion.Scope) error { - out.Type = string(in.Type) - switch t := in.Object.(type) { - case *runtime.Unknown: - // TODO: handle other fields on Unknown and detect type - out.Object.Raw = t.Raw - case nil: - default: - out.Object.Object = in.Object - } - return nil -} - -func Convert_versioned_InternalEvent_to_versioned_Event(in *InternalEvent, out *WatchEvent, s conversion.Scope) error { - return Convert_watch_Event_to_versioned_Event((*watch.Event)(in), out, s) -} - -func Convert_versioned_Event_to_watch_Event(in *WatchEvent, out *watch.Event, s conversion.Scope) error { - out.Type = watch.EventType(in.Type) - if in.Object.Object != nil { - out.Object = in.Object.Object - } else if in.Object.Raw != nil { - // TODO: handle other fields on Unknown and detect type - out.Object = &runtime.Unknown{ - Raw: in.Object.Raw, - ContentType: runtime.ContentTypeJSON, - } - } - return nil -} - -func Convert_versioned_Event_to_versioned_InternalEvent(in *WatchEvent, out *InternalEvent, s conversion.Scope) error { - return Convert_versioned_Event_to_watch_Event(in, (*watch.Event)(out), s) -} - -// InternalEvent makes watch.Event versioned -// +protobuf=false -type InternalEvent watch.Event - -func (e *InternalEvent) GetObjectKind() schema.ObjectKind { return schema.EmptyObjectKind } -func (e *WatchEvent) GetObjectKind() schema.ObjectKind { return schema.EmptyObjectKind } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/well_known_labels.go b/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/well_known_labels.go deleted file mode 100644 index da003cd6..00000000 --- a/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/well_known_labels.go +++ /dev/null @@ -1,73 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1 - -const ( - // If you add a new topology domain here, also consider adding it to the set of default values - // for the scheduler's --failure-domain command-line argument. - LabelHostname = "kubernetes.io/hostname" - LabelZoneFailureDomain = "failure-domain.beta.kubernetes.io/zone" - LabelZoneRegion = "failure-domain.beta.kubernetes.io/region" - - LabelInstanceType = "beta.kubernetes.io/instance-type" - - LabelOS = "beta.kubernetes.io/os" - LabelArch = "beta.kubernetes.io/arch" - - // Historically fluentd was a manifest pod the was migrated to DaemonSet. - // To avoid situation during cluster upgrade when there are two instances - // of fluentd running on a node, kubelet need to mark node on which - // fluentd in not running as a manifest pod with LabelFluentdDsReady. - LabelFluentdDsReady = "alpha.kubernetes.io/fluentd-ds-ready" -) - -// Role labels are applied to Nodes to mark their purpose. In particular, we -// usually want to distinguish the master, so that we can isolate privileged -// pods and operations. -// -// Originally we relied on not registering the master, on the fact that the -// master was Unschedulable, and on static manifests for master components. -// But we now do register masters in many environments, are generally moving -// away from static manifests (for better manageability), and working towards -// deprecating the unschedulable field (replacing it with taints & tolerations -// instead). -// -// Even with tainting, a label remains the easiest way of making a positive -// selection, so that pods can schedule only to master nodes for example, and -// thus installations will likely define a label for their master nodes. -// -// So that we can recognize master nodes in consequent places though (such as -// kubectl get nodes), we encourage installations to use the well-known labels. -// We define NodeLabelRole, which is the preferred form, but we will also recognize -// other forms that are known to be in widespread use (NodeLabelKubeadmAlphaRole). - -const ( - // NodeLabelRole is the preferred label applied to a Node as a hint that it has a particular purpose (defined by the value). - NodeLabelRole = "kubernetes.io/role" - - // NodeLabelKubeadmAlphaRole is a label that kubeadm applies to a Node as a hint that it has a particular purpose. - // Use of NodeLabelRole is preferred. - NodeLabelKubeadmAlphaRole = "kubeadm.alpha.kubernetes.io/role" - - // NodeLabelRoleMaster is the value of a NodeLabelRole or NodeLabelKubeadmAlphaRole label, indicating a master node. - // A master node typically runs kubernetes system components and will not typically run user workloads. - NodeLabelRoleMaster = "master" - - // NodeLabelRoleNode is the value of a NodeLabelRole or NodeLabelKubeadmAlphaRole label, indicating a "normal" node, - // as opposed to a RoleMaster node. - NodeLabelRoleNode = "node" -) diff --git a/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/zz_generated.deepcopy.go deleted file mode 100644 index d22355b7..00000000 --- a/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/zz_generated.deepcopy.go +++ /dev/null @@ -1,428 +0,0 @@ -// +build !ignore_autogenerated - -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was autogenerated by deepcopy-gen. Do not edit it manually! - -package v1 - -import ( - conversion "k8s.io/apimachinery/pkg/conversion" - runtime "k8s.io/kubernetes/pkg/runtime" - reflect "reflect" -) - -// GetGeneratedDeepCopyFuncs returns the generated funcs, since we aren't registering them. -func GetGeneratedDeepCopyFuncs() []conversion.GeneratedDeepCopyFunc { - return []conversion.GeneratedDeepCopyFunc{ - {Fn: DeepCopy_v1_APIGroup, InType: reflect.TypeOf(&APIGroup{})}, - {Fn: DeepCopy_v1_APIGroupList, InType: reflect.TypeOf(&APIGroupList{})}, - {Fn: DeepCopy_v1_APIResource, InType: reflect.TypeOf(&APIResource{})}, - {Fn: DeepCopy_v1_APIResourceList, InType: reflect.TypeOf(&APIResourceList{})}, - {Fn: DeepCopy_v1_APIVersions, InType: reflect.TypeOf(&APIVersions{})}, - {Fn: DeepCopy_v1_Duration, InType: reflect.TypeOf(&Duration{})}, - {Fn: DeepCopy_v1_ExportOptions, InType: reflect.TypeOf(&ExportOptions{})}, - {Fn: DeepCopy_v1_GetOptions, InType: reflect.TypeOf(&GetOptions{})}, - {Fn: DeepCopy_v1_GroupKind, InType: reflect.TypeOf(&GroupKind{})}, - {Fn: DeepCopy_v1_GroupResource, InType: reflect.TypeOf(&GroupResource{})}, - {Fn: DeepCopy_v1_GroupVersion, InType: reflect.TypeOf(&GroupVersion{})}, - {Fn: DeepCopy_v1_GroupVersionForDiscovery, InType: reflect.TypeOf(&GroupVersionForDiscovery{})}, - {Fn: DeepCopy_v1_GroupVersionKind, InType: reflect.TypeOf(&GroupVersionKind{})}, - {Fn: DeepCopy_v1_GroupVersionResource, InType: reflect.TypeOf(&GroupVersionResource{})}, - {Fn: DeepCopy_v1_InternalEvent, InType: reflect.TypeOf(&InternalEvent{})}, - {Fn: DeepCopy_v1_LabelSelector, InType: reflect.TypeOf(&LabelSelector{})}, - {Fn: DeepCopy_v1_LabelSelectorRequirement, InType: reflect.TypeOf(&LabelSelectorRequirement{})}, - {Fn: DeepCopy_v1_ListMeta, InType: reflect.TypeOf(&ListMeta{})}, - {Fn: DeepCopy_v1_OwnerReference, InType: reflect.TypeOf(&OwnerReference{})}, - {Fn: DeepCopy_v1_Patch, InType: reflect.TypeOf(&Patch{})}, - {Fn: DeepCopy_v1_RootPaths, InType: reflect.TypeOf(&RootPaths{})}, - {Fn: DeepCopy_v1_ServerAddressByClientCIDR, InType: reflect.TypeOf(&ServerAddressByClientCIDR{})}, - {Fn: DeepCopy_v1_Status, InType: reflect.TypeOf(&Status{})}, - {Fn: DeepCopy_v1_StatusCause, InType: reflect.TypeOf(&StatusCause{})}, - {Fn: DeepCopy_v1_StatusDetails, InType: reflect.TypeOf(&StatusDetails{})}, - {Fn: DeepCopy_v1_Time, InType: reflect.TypeOf(&Time{})}, - {Fn: DeepCopy_v1_Timestamp, InType: reflect.TypeOf(&Timestamp{})}, - {Fn: DeepCopy_v1_TypeMeta, InType: reflect.TypeOf(&TypeMeta{})}, - {Fn: DeepCopy_v1_WatchEvent, InType: reflect.TypeOf(&WatchEvent{})}, - } -} - -func DeepCopy_v1_APIGroup(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*APIGroup) - out := out.(*APIGroup) - *out = *in - if in.Versions != nil { - in, out := &in.Versions, &out.Versions - *out = make([]GroupVersionForDiscovery, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } - } - if in.ServerAddressByClientCIDRs != nil { - in, out := &in.ServerAddressByClientCIDRs, &out.ServerAddressByClientCIDRs - *out = make([]ServerAddressByClientCIDR, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } - } - return nil - } -} - -func DeepCopy_v1_APIGroupList(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*APIGroupList) - out := out.(*APIGroupList) - *out = *in - if in.Groups != nil { - in, out := &in.Groups, &out.Groups - *out = make([]APIGroup, len(*in)) - for i := range *in { - if err := DeepCopy_v1_APIGroup(&(*in)[i], &(*out)[i], c); err != nil { - return err - } - } - } - return nil - } -} - -func DeepCopy_v1_APIResource(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*APIResource) - out := out.(*APIResource) - *out = *in - if in.Verbs != nil { - in, out := &in.Verbs, &out.Verbs - *out = make(Verbs, len(*in)) - copy(*out, *in) - } - return nil - } -} - -func DeepCopy_v1_APIResourceList(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*APIResourceList) - out := out.(*APIResourceList) - *out = *in - if in.APIResources != nil { - in, out := &in.APIResources, &out.APIResources - *out = make([]APIResource, len(*in)) - for i := range *in { - if err := DeepCopy_v1_APIResource(&(*in)[i], &(*out)[i], c); err != nil { - return err - } - } - } - return nil - } -} - -func DeepCopy_v1_APIVersions(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*APIVersions) - out := out.(*APIVersions) - *out = *in - if in.Versions != nil { - in, out := &in.Versions, &out.Versions - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.ServerAddressByClientCIDRs != nil { - in, out := &in.ServerAddressByClientCIDRs, &out.ServerAddressByClientCIDRs - *out = make([]ServerAddressByClientCIDR, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } - } - return nil - } -} - -func DeepCopy_v1_Duration(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*Duration) - out := out.(*Duration) - *out = *in - return nil - } -} - -func DeepCopy_v1_ExportOptions(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*ExportOptions) - out := out.(*ExportOptions) - *out = *in - return nil - } -} - -func DeepCopy_v1_GetOptions(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*GetOptions) - out := out.(*GetOptions) - *out = *in - return nil - } -} - -func DeepCopy_v1_GroupKind(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*GroupKind) - out := out.(*GroupKind) - *out = *in - return nil - } -} - -func DeepCopy_v1_GroupResource(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*GroupResource) - out := out.(*GroupResource) - *out = *in - return nil - } -} - -func DeepCopy_v1_GroupVersion(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*GroupVersion) - out := out.(*GroupVersion) - *out = *in - return nil - } -} - -func DeepCopy_v1_GroupVersionForDiscovery(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*GroupVersionForDiscovery) - out := out.(*GroupVersionForDiscovery) - *out = *in - return nil - } -} - -func DeepCopy_v1_GroupVersionKind(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*GroupVersionKind) - out := out.(*GroupVersionKind) - *out = *in - return nil - } -} - -func DeepCopy_v1_GroupVersionResource(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*GroupVersionResource) - out := out.(*GroupVersionResource) - *out = *in - return nil - } -} - -func DeepCopy_v1_InternalEvent(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*InternalEvent) - out := out.(*InternalEvent) - *out = *in - // in.Object is kind 'Interface' - if in.Object != nil { - if newVal, err := c.DeepCopy(&in.Object); err != nil { - return err - } else { - out.Object = *newVal.(*runtime.Object) - } - } - return nil - } -} - -func DeepCopy_v1_LabelSelector(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*LabelSelector) - out := out.(*LabelSelector) - *out = *in - if in.MatchLabels != nil { - in, out := &in.MatchLabels, &out.MatchLabels - *out = make(map[string]string) - for key, val := range *in { - (*out)[key] = val - } - } - if in.MatchExpressions != nil { - in, out := &in.MatchExpressions, &out.MatchExpressions - *out = make([]LabelSelectorRequirement, len(*in)) - for i := range *in { - if err := DeepCopy_v1_LabelSelectorRequirement(&(*in)[i], &(*out)[i], c); err != nil { - return err - } - } - } - return nil - } -} - -func DeepCopy_v1_LabelSelectorRequirement(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*LabelSelectorRequirement) - out := out.(*LabelSelectorRequirement) - *out = *in - if in.Values != nil { - in, out := &in.Values, &out.Values - *out = make([]string, len(*in)) - copy(*out, *in) - } - return nil - } -} - -func DeepCopy_v1_ListMeta(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*ListMeta) - out := out.(*ListMeta) - *out = *in - return nil - } -} - -func DeepCopy_v1_OwnerReference(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*OwnerReference) - out := out.(*OwnerReference) - *out = *in - if in.Controller != nil { - in, out := &in.Controller, &out.Controller - *out = new(bool) - **out = **in - } - return nil - } -} - -func DeepCopy_v1_Patch(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*Patch) - out := out.(*Patch) - *out = *in - return nil - } -} - -func DeepCopy_v1_RootPaths(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*RootPaths) - out := out.(*RootPaths) - *out = *in - if in.Paths != nil { - in, out := &in.Paths, &out.Paths - *out = make([]string, len(*in)) - copy(*out, *in) - } - return nil - } -} - -func DeepCopy_v1_ServerAddressByClientCIDR(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*ServerAddressByClientCIDR) - out := out.(*ServerAddressByClientCIDR) - *out = *in - return nil - } -} - -func DeepCopy_v1_Status(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*Status) - out := out.(*Status) - *out = *in - if in.Details != nil { - in, out := &in.Details, &out.Details - *out = new(StatusDetails) - if err := DeepCopy_v1_StatusDetails(*in, *out, c); err != nil { - return err - } - } - return nil - } -} - -func DeepCopy_v1_StatusCause(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*StatusCause) - out := out.(*StatusCause) - *out = *in - return nil - } -} - -func DeepCopy_v1_StatusDetails(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*StatusDetails) - out := out.(*StatusDetails) - *out = *in - if in.Causes != nil { - in, out := &in.Causes, &out.Causes - *out = make([]StatusCause, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } - } - return nil - } -} - -func DeepCopy_v1_Time(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*Time) - out := out.(*Time) - *out = in.DeepCopy() - return nil - } -} - -func DeepCopy_v1_Timestamp(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*Timestamp) - out := out.(*Timestamp) - *out = *in - return nil - } -} - -func DeepCopy_v1_TypeMeta(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*TypeMeta) - out := out.(*TypeMeta) - *out = *in - return nil - } -} - -func DeepCopy_v1_WatchEvent(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*WatchEvent) - out := out.(*WatchEvent) - *out = *in - if err := runtime.DeepCopy_runtime_RawExtension(&in.Object, &out.Object, c); err != nil { - return err - } - return nil - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/zz_generated.defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/zz_generated.defaults.go deleted file mode 100644 index 6df448eb..00000000 --- a/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/zz_generated.defaults.go +++ /dev/null @@ -1,32 +0,0 @@ -// +build !ignore_autogenerated - -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was autogenerated by defaulter-gen. Do not edit it manually! - -package v1 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// RegisterDefaults adds defaulters functions to the given scheme. -// Public to allow building arbitrary schemes. -// All generated defaulters are covering - they call all nested defaulters. -func RegisterDefaults(scheme *runtime.Scheme) error { - return nil -} diff --git a/vendor/k8s.io/kubernetes/pkg/apis/policy/BUILD b/vendor/k8s.io/kubernetes/pkg/apis/policy/BUILD index 2cbc6f94..3a367537 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/policy/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/apis/policy/BUILD @@ -17,7 +17,6 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//pkg/util/intstr:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/conversion", diff --git a/vendor/k8s.io/kubernetes/pkg/apis/policy/install/BUILD b/vendor/k8s.io/kubernetes/pkg/apis/policy/install/BUILD index 6eb561b2..6d5c3b8f 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/policy/install/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/apis/policy/install/BUILD @@ -12,9 +12,12 @@ go_library( srcs = ["install.go"], tags = ["automanaged"], deps = [ - "//pkg/apimachinery/announced:go_default_library", + "//pkg/api:go_default_library", "//pkg/apis/policy:go_default_library", "//pkg/apis/policy/v1beta1:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apimachinery/announced", + "//vendor:k8s.io/apimachinery/pkg/apimachinery/registered", + "//vendor:k8s.io/apimachinery/pkg/runtime", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/apis/policy/install/install.go b/vendor/k8s.io/kubernetes/pkg/apis/policy/install/install.go index 69db365b..76129575 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/policy/install/install.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/policy/install/install.go @@ -19,12 +19,20 @@ limitations under the License. package install import ( - "k8s.io/kubernetes/pkg/apimachinery/announced" + "k8s.io/apimachinery/pkg/apimachinery/announced" + "k8s.io/apimachinery/pkg/apimachinery/registered" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/policy" "k8s.io/kubernetes/pkg/apis/policy/v1beta1" ) func init() { + Install(api.GroupFactoryRegistry, api.Registry, api.Scheme) +} + +// Install registers the API group and adds types to a scheme +func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) { if err := announced.NewGroupMetaFactory( &announced.GroupMetaFactoryArgs{ GroupName: policy.GroupName, @@ -35,7 +43,7 @@ func init() { announced.VersionToSchemeFunc{ v1beta1.SchemeGroupVersion.Version: v1beta1.AddToScheme, }, - ).Announce().RegisterAndEnable(); err != nil { + ).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil { panic(err) } } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/policy/register.go b/vendor/k8s.io/kubernetes/pkg/apis/policy/register.go index a3a1a35a..5aadc3f1 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/policy/register.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/policy/register.go @@ -17,10 +17,8 @@ limitations under the License. package policy import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/api" ) // GroupName is the group name use in this package @@ -48,11 +46,6 @@ var ( func addKnownTypes(scheme *runtime.Scheme) error { // TODO this gets cleaned up when the types are fixed scheme.AddKnownTypes(SchemeGroupVersion, - &api.ListOptions{}, - &api.DeleteOptions{}, - &metav1.ExportOptions{}, - &metav1.GetOptions{}, - &PodDisruptionBudget{}, &PodDisruptionBudgetList{}, &Eviction{}, diff --git a/vendor/k8s.io/kubernetes/pkg/apis/policy/types.go b/vendor/k8s.io/kubernetes/pkg/apis/policy/types.go index 69fc8208..22a56773 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/policy/types.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/policy/types.go @@ -18,7 +18,6 @@ package policy import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/util/intstr" ) @@ -77,7 +76,7 @@ type PodDisruptionBudgetStatus struct { type PodDisruptionBudget struct { metav1.TypeMeta // +optional - api.ObjectMeta + metav1.ObjectMeta // Specification of the desired behavior of the PodDisruptionBudget. // +optional @@ -106,9 +105,9 @@ type Eviction struct { // ObjectMeta describes the pod that is being evicted. // +optional - api.ObjectMeta + metav1.ObjectMeta // DeleteOptions may be provided // +optional - DeleteOptions *api.DeleteOptions + DeleteOptions *metav1.DeleteOptions } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/BUILD b/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/BUILD index 8496ae52..0a71750d 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/BUILD @@ -16,7 +16,6 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api/v1:go_default_library", "//pkg/util/intstr:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", diff --git a/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/register.go b/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/register.go index 4d2c767a..6f515361 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/register.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/register.go @@ -20,7 +20,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/api/v1" ) // GroupName is the group name use in this package @@ -45,10 +44,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { &PodDisruptionBudget{}, &PodDisruptionBudgetList{}, &Eviction{}, - &v1.ListOptions{}, - &v1.DeleteOptions{}, - &metav1.ExportOptions{}, - &metav1.GetOptions{}, ) // Add the watch version that applies metav1.AddToGroupVersion(scheme, SchemeGroupVersion) diff --git a/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/types.go b/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/types.go index ea81547b..8ce3aba9 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/types.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/policy/v1alpha1/types.go @@ -18,7 +18,6 @@ package v1alpha1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/util/intstr" ) @@ -59,7 +58,7 @@ type PodDisruptionBudgetStatus struct { type PodDisruptionBudget struct { metav1.TypeMeta `json:",inline"` // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Specification of the desired behavior of the PodDisruptionBudget. // +optional @@ -85,9 +84,9 @@ type Eviction struct { // ObjectMeta describes the pod that is being evicted. // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // DeleteOptions may be provided // +optional - DeleteOptions *v1.DeleteOptions `json:"deleteOptions,omitempty" protobuf:"bytes,2,opt,name=deleteOptions"` + DeleteOptions *metav1.DeleteOptions `json:"deleteOptions,omitempty" protobuf:"bytes,2,opt,name=deleteOptions"` } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/BUILD b/vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/BUILD index b7e7a579..407f07a0 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/BUILD @@ -21,8 +21,6 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", - "//pkg/api/v1:go_default_library", "//pkg/apis/policy:go_default_library", "//pkg/util/intstr:go_default_library", "//vendor:github.com/gogo/protobuf/proto", diff --git a/vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/generated.pb.go b/vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/generated.pb.go index 6120c60a..16a83db9 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/generated.pb.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/generated.pb.go @@ -39,8 +39,6 @@ import math "math" import k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" -import k8s_io_kubernetes_pkg_api_v1 "k8s.io/kubernetes/pkg/api/v1" - import strings "strings" import reflect "reflect" import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" @@ -407,8 +405,8 @@ func (this *Eviction) String() string { return "nil" } s := strings.Join([]string{`&Eviction{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `DeleteOptions:` + strings.Replace(fmt.Sprintf("%v", this.DeleteOptions), "DeleteOptions", "k8s_io_kubernetes_pkg_api_v1.DeleteOptions", 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `DeleteOptions:` + strings.Replace(fmt.Sprintf("%v", this.DeleteOptions), "DeleteOptions", "k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions", 1) + `,`, `}`, }, "") return s @@ -418,7 +416,7 @@ func (this *PodDisruptionBudget) String() string { return "nil" } s := strings.Join([]string{`&PodDisruptionBudget{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PodDisruptionBudgetSpec", "PodDisruptionBudgetSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "PodDisruptionBudgetStatus", "PodDisruptionBudgetStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -566,7 +564,7 @@ func (m *Eviction) Unmarshal(data []byte) error { return io.ErrUnexpectedEOF } if m.DeleteOptions == nil { - m.DeleteOptions = &k8s_io_kubernetes_pkg_api_v1.DeleteOptions{} + m.DeleteOptions = &k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions{} } if err := m.DeleteOptions.Unmarshal(data[iNdEx:postIndex]); err != nil { return err @@ -1324,54 +1322,54 @@ var ( ) var fileDescriptorGenerated = []byte{ - // 777 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xb4, 0x94, 0x4d, 0x6f, 0xe3, 0x44, - 0x18, 0xc7, 0xe3, 0x26, 0x29, 0x61, 0x9a, 0x54, 0x65, 0xa0, 0x10, 0x22, 0xe1, 0xa2, 0x9c, 0x5a, - 0x5e, 0xc6, 0x4a, 0x41, 0xa8, 0x70, 0xa8, 0xa8, 0x49, 0x05, 0x45, 0x54, 0xa9, 0x5c, 0x24, 0x10, - 0x82, 0xc3, 0xd8, 0x7e, 0x70, 0x86, 0xf8, 0x4d, 0x33, 0xe3, 0x40, 0x6e, 0x7c, 0x84, 0x3d, 0xec, - 0x37, 0xda, 0x4b, 0xb5, 0xa7, 0x1e, 0xf7, 0xb0, 0xaa, 0xb6, 0xd9, 0xcf, 0xb0, 0xf7, 0x95, 0xed, - 0xc9, 0x8b, 0xf3, 0xb2, 0x5b, 0xa9, 0xbb, 0x37, 0xcf, 0xcc, 0xf3, 0xfb, 0xff, 0x9f, 0xe7, 0x99, - 0x67, 0x8c, 0xbe, 0x1d, 0x1c, 0x09, 0xc2, 0x22, 0x63, 0x90, 0xd8, 0xc0, 0x43, 0x90, 0x20, 0x8c, - 0x78, 0xe0, 0x19, 0x34, 0x66, 0xc2, 0x88, 0x23, 0x9f, 0x39, 0x23, 0x63, 0xd8, 0xb1, 0x41, 0xd2, - 0x8e, 0xe1, 0x41, 0x08, 0x9c, 0x4a, 0x70, 0x49, 0xcc, 0x23, 0x19, 0xe1, 0x83, 0x1c, 0x25, 0x33, - 0x94, 0xc4, 0x03, 0x8f, 0xa4, 0x28, 0xc9, 0x51, 0xa2, 0xd0, 0xd6, 0x97, 0x1e, 0x93, 0xfd, 0xc4, - 0x26, 0x4e, 0x14, 0x18, 0x5e, 0xe4, 0x45, 0x46, 0xa6, 0x60, 0x27, 0x7f, 0x67, 0xab, 0x6c, 0x91, - 0x7d, 0xe5, 0xca, 0xad, 0xaf, 0x55, 0x52, 0x34, 0x66, 0x01, 0x75, 0xfa, 0x2c, 0x04, 0x3e, 0x9a, - 0xa5, 0x15, 0x80, 0xa4, 0xc6, 0x70, 0x29, 0x9f, 0x96, 0xb1, 0x8e, 0xe2, 0x49, 0x28, 0x59, 0x00, - 0x4b, 0xc0, 0x37, 0xaf, 0x03, 0x84, 0xd3, 0x87, 0x80, 0x2e, 0x71, 0x87, 0x6b, 0x7b, 0x66, 0x70, - 0x10, 0x51, 0xc2, 0x9d, 0x65, 0xaf, 0x2f, 0xd6, 0x33, 0x2b, 0x4a, 0xe9, 0xac, 0x8e, 0x4e, 0x24, - 0xf3, 0x0d, 0x16, 0x4a, 0x21, 0xf9, 0x22, 0xd2, 0x7e, 0xac, 0xa1, 0xda, 0xe9, 0x90, 0x39, 0x92, - 0x45, 0x21, 0xfe, 0x1d, 0xd5, 0xd2, 0x2e, 0xb9, 0x54, 0xd2, 0xa6, 0xf6, 0xa9, 0xb6, 0xbf, 0x75, - 0xb8, 0x4f, 0xd6, 0xde, 0x16, 0x19, 0x76, 0x48, 0xcf, 0xfe, 0x07, 0x1c, 0x79, 0x0e, 0x92, 0x9a, - 0xf8, 0xea, 0x66, 0xaf, 0x34, 0xbe, 0xd9, 0x43, 0xb3, 0x3d, 0x6b, 0xaa, 0x86, 0x5d, 0xd4, 0x70, - 0xc1, 0x07, 0x09, 0xbd, 0x38, 0x75, 0x12, 0xcd, 0x8d, 0x4c, 0xfe, 0xf3, 0x57, 0xcb, 0x77, 0xe7, - 0x11, 0xf3, 0xbd, 0xf1, 0xcd, 0x5e, 0xa3, 0xb0, 0x65, 0x15, 0x45, 0xdb, 0x8f, 0x36, 0xd0, 0xfb, - 0x17, 0x91, 0xdb, 0x65, 0x82, 0x27, 0xd9, 0x96, 0x99, 0xb8, 0x1e, 0xc8, 0xb7, 0x5a, 0x57, 0x45, - 0xc4, 0xe0, 0xa8, 0x72, 0x4c, 0x72, 0xe7, 0xd9, 0x26, 0x2b, 0xf2, 0xbc, 0x8c, 0xc1, 0x31, 0xeb, - 0xca, 0xaf, 0x92, 0xae, 0xac, 0x4c, 0x1d, 0xfb, 0x68, 0x53, 0x48, 0x2a, 0x13, 0xd1, 0x2c, 0x67, - 0x3e, 0xdd, 0x7b, 0xfa, 0x64, 0x5a, 0xe6, 0xb6, 0x72, 0xda, 0xcc, 0xd7, 0x96, 0xf2, 0x68, 0x3f, - 0xd5, 0xd0, 0x47, 0x2b, 0xa8, 0x5f, 0x98, 0x90, 0xf8, 0xcf, 0xa5, 0x4e, 0x92, 0x49, 0x2e, 0xf3, - 0xcf, 0x61, 0x96, 0x4d, 0x1a, 0x9d, 0x76, 0x34, 0xa5, 0xb3, 0x7e, 0xee, 0x28, 0xd7, 0xda, 0x64, - 0x67, 0xae, 0x9b, 0x0e, 0xaa, 0x32, 0x09, 0x41, 0x3a, 0x1d, 0xe5, 0xfd, 0xad, 0xc3, 0xe3, 0xfb, - 0x95, 0x69, 0x36, 0x94, 0x55, 0xf5, 0x2c, 0x15, 0xb5, 0x72, 0xed, 0xf6, 0x78, 0x75, 0x79, 0x69, - 0xbb, 0x71, 0x1f, 0xd5, 0x03, 0x16, 0x9e, 0x0c, 0x29, 0xf3, 0xa9, 0xed, 0xc3, 0x62, 0x89, 0x0b, - 0x79, 0xa4, 0xef, 0x8a, 0xe4, 0xef, 0x8a, 0x9c, 0x85, 0xb2, 0xc7, 0x2f, 0x25, 0x67, 0xa1, 0x67, - 0x7e, 0xa0, 0x7c, 0xeb, 0xe7, 0x73, 0x5a, 0x56, 0x41, 0x19, 0xff, 0x85, 0x6a, 0x02, 0x7c, 0x70, - 0x64, 0xc4, 0xd5, 0xf0, 0x7c, 0x75, 0xc7, 0x46, 0x52, 0x1b, 0xfc, 0x4b, 0x85, 0x9a, 0xf5, 0xb4, - 0x93, 0x93, 0x95, 0x35, 0x95, 0x6c, 0xbf, 0xa8, 0xa0, 0x8f, 0xd7, 0xde, 0x3c, 0xfe, 0x19, 0xe1, - 0xc8, 0x16, 0xc0, 0x87, 0xe0, 0xfe, 0x98, 0xff, 0x0f, 0x58, 0x14, 0x66, 0xc5, 0x96, 0xcd, 0x96, - 0x4a, 0x1e, 0xf7, 0x96, 0x22, 0xac, 0x15, 0x14, 0x7e, 0xa8, 0xa1, 0x86, 0x9b, 0xdb, 0x80, 0x7b, - 0x11, 0xb9, 0x93, 0xcb, 0xfb, 0xed, 0x4d, 0xcc, 0x28, 0xe9, 0xce, 0x2b, 0x9f, 0x86, 0x92, 0x8f, - 0xcc, 0x5d, 0x95, 0x60, 0xa3, 0x70, 0x66, 0x15, 0x93, 0xc0, 0xe7, 0x08, 0xbb, 0x53, 0x49, 0x71, - 0xe2, 0xfb, 0xd1, 0xbf, 0xe0, 0x66, 0xcf, 0xa7, 0x6a, 0x7e, 0xa2, 0x14, 0x76, 0x0b, 0xbe, 0x93, - 0x20, 0x6b, 0x05, 0x88, 0x8f, 0xd1, 0xb6, 0x93, 0x70, 0x0e, 0xa1, 0xfc, 0x09, 0xa8, 0x2f, 0xfb, - 0xa3, 0x66, 0x25, 0x93, 0xfa, 0x50, 0x49, 0x6d, 0xff, 0x50, 0x38, 0xb5, 0x16, 0xa2, 0x53, 0xde, - 0x05, 0xc1, 0x38, 0xb8, 0x13, 0xbe, 0x5a, 0xe4, 0xbb, 0x85, 0x53, 0x6b, 0x21, 0x1a, 0x1f, 0xa1, - 0x3a, 0xfc, 0x17, 0x83, 0x33, 0xe9, 0xf1, 0x66, 0x46, 0x4f, 0x07, 0xed, 0x74, 0xee, 0xcc, 0x2a, - 0x44, 0xb6, 0x7c, 0x84, 0x97, 0x9b, 0x88, 0x77, 0x50, 0x79, 0x00, 0xa3, 0xec, 0xca, 0xdf, 0xb5, - 0xd2, 0x4f, 0xfc, 0x3d, 0xaa, 0x0e, 0xa9, 0x9f, 0x80, 0x9a, 0xc6, 0xcf, 0xee, 0x36, 0x8d, 0xbf, - 0xb2, 0x00, 0xac, 0x1c, 0xfc, 0x6e, 0xe3, 0x48, 0x33, 0x0f, 0xae, 0x6e, 0xf5, 0xd2, 0xf5, 0xad, - 0x5e, 0x7a, 0x72, 0xab, 0x97, 0xfe, 0x1f, 0xeb, 0xda, 0xd5, 0x58, 0xd7, 0xae, 0xc7, 0xba, 0xf6, - 0x6c, 0xac, 0x6b, 0x0f, 0x9e, 0xeb, 0xa5, 0x3f, 0xde, 0x51, 0x97, 0xfe, 0x32, 0x00, 0x00, 0xff, - 0xff, 0xf9, 0xf8, 0x35, 0x20, 0x43, 0x08, 0x00, 0x00, + // 773 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xbc, 0x94, 0xcd, 0x6e, 0xeb, 0x44, + 0x14, 0xc7, 0xe3, 0x26, 0x29, 0x61, 0x9a, 0x54, 0x65, 0xa0, 0x10, 0x22, 0xe1, 0xa2, 0xac, 0x5a, + 0x04, 0x63, 0x52, 0x10, 0x2a, 0x2c, 0x2a, 0x6a, 0x52, 0x41, 0x51, 0xab, 0x54, 0x2e, 0x12, 0x12, + 0x02, 0x89, 0xb1, 0x7d, 0x70, 0x86, 0xf8, 0x4b, 0x33, 0xe3, 0x40, 0x76, 0x3c, 0x02, 0x0b, 0x1e, + 0xaa, 0x12, 0x9b, 0x2e, 0x11, 0x42, 0x15, 0xcd, 0x7d, 0x86, 0xbb, 0xbf, 0xb2, 0x3d, 0xf9, 0x70, + 0x3e, 0x74, 0x73, 0xd5, 0xab, 0xbb, 0xf3, 0xcc, 0x9c, 0xdf, 0xff, 0x7f, 0xce, 0x99, 0x33, 0x46, + 0x9f, 0x0f, 0x4e, 0x04, 0x61, 0x91, 0x31, 0x48, 0x6c, 0xe0, 0x21, 0x48, 0x10, 0x46, 0x3c, 0xf0, + 0x0c, 0x1a, 0x33, 0x61, 0xc4, 0x91, 0xcf, 0x9c, 0x91, 0x31, 0xec, 0xd8, 0x20, 0x69, 0xc7, 0xf0, + 0x20, 0x04, 0x4e, 0x25, 0xb8, 0x24, 0xe6, 0x91, 0x8c, 0xf0, 0x51, 0x8e, 0x92, 0x19, 0x4a, 0xe2, + 0x81, 0x47, 0x52, 0x94, 0xe4, 0x28, 0x51, 0x68, 0xeb, 0x23, 0x8f, 0xc9, 0x7e, 0x62, 0x13, 0x27, + 0x0a, 0x0c, 0x2f, 0xf2, 0x22, 0x23, 0x53, 0xb0, 0x93, 0x5f, 0xb2, 0x55, 0xb6, 0xc8, 0xbe, 0x72, + 0xe5, 0xd6, 0xa7, 0x2a, 0x29, 0x1a, 0xb3, 0x80, 0x3a, 0x7d, 0x16, 0x02, 0x1f, 0xcd, 0xd2, 0x0a, + 0x40, 0x52, 0x63, 0xb8, 0x94, 0x4f, 0xcb, 0x58, 0x47, 0xf1, 0x24, 0x94, 0x2c, 0x80, 0x25, 0xe0, + 0xb3, 0xe7, 0x01, 0xc2, 0xe9, 0x43, 0x40, 0x97, 0xb8, 0xe3, 0xb5, 0x3d, 0x33, 0x38, 0x88, 0x28, + 0xe1, 0xce, 0xb2, 0xd7, 0x87, 0xeb, 0x99, 0x15, 0xa5, 0x74, 0x56, 0x47, 0x27, 0x92, 0xf9, 0x06, + 0x0b, 0xa5, 0x90, 0x7c, 0x11, 0x69, 0xff, 0xab, 0xa1, 0xda, 0xf9, 0x90, 0x39, 0x92, 0x45, 0x21, + 0xfe, 0x19, 0xd5, 0xd2, 0x2e, 0xb9, 0x54, 0xd2, 0xa6, 0xf6, 0xbe, 0x76, 0xb8, 0x73, 0xfc, 0x31, + 0x51, 0xb7, 0x35, 0x5f, 0xec, 0xec, 0xbe, 0xd2, 0x68, 0x32, 0xec, 0x90, 0x9e, 0xfd, 0x2b, 0x38, + 0xf2, 0x0a, 0x24, 0x35, 0xf1, 0xed, 0xfd, 0x41, 0x69, 0x7c, 0x7f, 0x80, 0x66, 0x7b, 0xd6, 0x54, + 0x15, 0xfb, 0xa8, 0xe1, 0x82, 0x0f, 0x12, 0x7a, 0x71, 0xea, 0x28, 0x9a, 0x5b, 0x99, 0xcd, 0x27, + 0x9b, 0xd9, 0x74, 0xe7, 0x51, 0xf3, 0x8d, 0xf1, 0xfd, 0x41, 0xa3, 0xb0, 0x65, 0x15, 0xc5, 0xdb, + 0x7f, 0x6f, 0xa1, 0x37, 0xaf, 0x23, 0xb7, 0xcb, 0x04, 0x4f, 0xb2, 0x2d, 0x33, 0x71, 0x3d, 0x90, + 0xaf, 0xa0, 0x4e, 0x17, 0x55, 0x44, 0x0c, 0x8e, 0x2a, 0xcf, 0x24, 0x1b, 0xcf, 0x3c, 0x59, 0x91, + 0xef, 0x4d, 0x0c, 0x8e, 0x59, 0x57, 0x7e, 0x95, 0x74, 0x65, 0x65, 0xea, 0xd8, 0x47, 0xdb, 0x42, + 0x52, 0x99, 0x88, 0x66, 0x39, 0xf3, 0xe9, 0x3e, 0xd2, 0x27, 0xd3, 0x32, 0x77, 0x95, 0xd3, 0x76, + 0xbe, 0xb6, 0x94, 0x47, 0xfb, 0x3f, 0x0d, 0xbd, 0xb3, 0x82, 0xba, 0x64, 0x42, 0xe2, 0x1f, 0x97, + 0x3a, 0x4a, 0x36, 0xeb, 0x68, 0x4a, 0x67, 0xfd, 0xdc, 0x53, 0xae, 0xb5, 0xc9, 0xce, 0x5c, 0x37, + 0x1d, 0x54, 0x65, 0x12, 0x82, 0x74, 0x5a, 0xca, 0x87, 0x3b, 0xc7, 0xa7, 0x8f, 0x2b, 0xd3, 0x6c, + 0x28, 0xab, 0xea, 0x45, 0x2a, 0x6a, 0xe5, 0xda, 0xed, 0xf1, 0xea, 0xf2, 0xd2, 0x76, 0xe3, 0x3e, + 0xaa, 0x07, 0x2c, 0x3c, 0x1b, 0x52, 0xe6, 0x53, 0xdb, 0x87, 0xc5, 0x12, 0x17, 0xf2, 0x48, 0xdf, + 0x1b, 0xc9, 0xdf, 0x1b, 0xb9, 0x08, 0x65, 0x8f, 0xdf, 0x48, 0xce, 0x42, 0xcf, 0x7c, 0x4b, 0xf9, + 0xd6, 0xaf, 0xe6, 0xb4, 0xac, 0x82, 0x32, 0xfe, 0x09, 0xd5, 0x04, 0xf8, 0xe0, 0xc8, 0x88, 0xbf, + 0xd8, 0xdb, 0xb8, 0xa4, 0x36, 0xf8, 0x37, 0x0a, 0x35, 0xeb, 0x69, 0x27, 0x27, 0x2b, 0x6b, 0x2a, + 0xd9, 0x7e, 0x5a, 0x41, 0xef, 0xae, 0xbd, 0x79, 0xfc, 0x2d, 0xc2, 0x91, 0x2d, 0x80, 0x0f, 0xc1, + 0xfd, 0x3a, 0xff, 0x4f, 0xb0, 0x28, 0xcc, 0x8a, 0x2d, 0x9b, 0x2d, 0x95, 0x3c, 0xee, 0x2d, 0x45, + 0x58, 0x2b, 0x28, 0xfc, 0x97, 0x86, 0x1a, 0x6e, 0x6e, 0x03, 0xee, 0x75, 0xe4, 0x4e, 0x2e, 0xef, + 0xfb, 0x97, 0x31, 0xa3, 0xa4, 0x3b, 0xaf, 0x7c, 0x1e, 0x4a, 0x3e, 0x32, 0xf7, 0x55, 0x82, 0x8d, + 0xc2, 0x99, 0x55, 0x4c, 0x02, 0x5f, 0x21, 0xec, 0x4e, 0x25, 0xc5, 0x99, 0xef, 0x47, 0xbf, 0x81, + 0x9b, 0x3d, 0x9f, 0xaa, 0xf9, 0x9e, 0x52, 0xd8, 0x2f, 0xf8, 0x4e, 0x82, 0xac, 0x15, 0x20, 0x3e, + 0x45, 0xbb, 0x4e, 0xc2, 0x39, 0x84, 0xf2, 0x1b, 0xa0, 0xbe, 0xec, 0x8f, 0x9a, 0x95, 0x4c, 0xea, + 0x6d, 0x25, 0xb5, 0xfb, 0x55, 0xe1, 0xd4, 0x5a, 0x88, 0x4e, 0x79, 0x17, 0x04, 0xe3, 0xe0, 0x4e, + 0xf8, 0x6a, 0x91, 0xef, 0x16, 0x4e, 0xad, 0x85, 0x68, 0x7c, 0x82, 0xea, 0xf0, 0x7b, 0x0c, 0xce, + 0xa4, 0xc7, 0xdb, 0x19, 0x3d, 0x1d, 0xb4, 0xf3, 0xb9, 0x33, 0xab, 0x10, 0xd9, 0xf2, 0x11, 0x5e, + 0x6e, 0x22, 0xde, 0x43, 0xe5, 0x01, 0x8c, 0xb2, 0x2b, 0x7f, 0xdd, 0x4a, 0x3f, 0xf1, 0x97, 0xa8, + 0x3a, 0xa4, 0x7e, 0x02, 0x6a, 0x1a, 0x3f, 0xd8, 0x6c, 0x1a, 0xbf, 0x63, 0x01, 0x58, 0x39, 0xf8, + 0xc5, 0xd6, 0x89, 0x66, 0x1e, 0xdd, 0x3e, 0xe8, 0xa5, 0xbb, 0x07, 0xbd, 0xf4, 0xcf, 0x83, 0x5e, + 0xfa, 0x63, 0xac, 0x6b, 0xb7, 0x63, 0x5d, 0xbb, 0x1b, 0xeb, 0xda, 0xff, 0x63, 0x5d, 0xfb, 0xf3, + 0x89, 0x5e, 0xfa, 0xe1, 0x35, 0x75, 0xe9, 0xcf, 0x02, 0x00, 0x00, 0xff, 0xff, 0xca, 0xf1, 0x55, + 0x25, 0x5b, 0x08, 0x00, 0x00, } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/generated.proto b/vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/generated.proto index 8f172d3b..4d74c13c 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/generated.proto +++ b/vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/generated.proto @@ -36,15 +36,15 @@ option go_package = "v1beta1"; // created by POSTing to .../pods//evictions. message Eviction { // ObjectMeta describes the pod that is being evicted. - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // DeleteOptions may be provided - optional k8s.io.kubernetes.pkg.api.v1.DeleteOptions deleteOptions = 2; + optional k8s.io.apimachinery.pkg.apis.meta.v1.DeleteOptions deleteOptions = 2; } // PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods message PodDisruptionBudget { - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Specification of the desired behavior of the PodDisruptionBudget. optional PodDisruptionBudgetSpec spec = 2; diff --git a/vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/register.go b/vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/register.go index 4c16e4a3..52bd65c8 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/register.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/register.go @@ -20,7 +20,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/api/v1" ) // GroupName is the group name use in this package @@ -45,10 +44,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { &PodDisruptionBudget{}, &PodDisruptionBudgetList{}, &Eviction{}, - &v1.ListOptions{}, - &v1.DeleteOptions{}, - &metav1.ExportOptions{}, - &metav1.GetOptions{}, ) // Add the watch version that applies metav1.AddToGroupVersion(scheme, SchemeGroupVersion) diff --git a/vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/types.generated.go b/vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/types.generated.go index 078c7a6f..9ab50514 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/types.generated.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/types.generated.go @@ -26,8 +26,7 @@ import ( "fmt" codec1978 "github.com/ugorji/go/codec" pkg2_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - pkg4_types "k8s.io/apimachinery/pkg/types" - pkg3_v1 "k8s.io/kubernetes/pkg/api/v1" + pkg3_types "k8s.io/apimachinery/pkg/types" pkg1_intstr "k8s.io/kubernetes/pkg/util/intstr" "reflect" "runtime" @@ -65,11 +64,10 @@ func init() { } if false { // reference the types, but skip this branch at build/run time var v0 pkg2_v1.LabelSelector - var v1 pkg4_types.UID - var v2 pkg3_v1.ObjectMeta - var v3 pkg1_intstr.IntOrString - var v4 time.Time - _, _, _, _, _ = v0, v1, v2, v3, v4 + var v1 pkg3_types.UID + var v2 pkg1_intstr.IntOrString + var v3 time.Time + _, _, _, _ = v0, v1, v2, v3 } } @@ -891,7 +889,13 @@ func (x *PodDisruptionBudget) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -901,7 +905,13 @@ func (x *PodDisruptionBudget) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -1025,24 +1035,30 @@ func (x *PodDisruptionBudget) codecDecodeSelfFromMap(l int, d *codec1978.Decoder } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg3_v1.ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = PodDisruptionBudgetSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = PodDisruptionBudgetStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -1055,16 +1071,16 @@ func (x *PodDisruptionBudget) codecDecodeSelfFromArray(l int, d *codec1978.Decod var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1072,21 +1088,21 @@ func (x *PodDisruptionBudget) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1094,38 +1110,44 @@ func (x *PodDisruptionBudget) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg3_v1.ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1133,16 +1155,16 @@ func (x *PodDisruptionBudget) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.Spec = PodDisruptionBudgetSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1150,21 +1172,21 @@ func (x *PodDisruptionBudget) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.Status = PodDisruptionBudgetStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -1625,7 +1647,13 @@ func (x *Eviction) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -1635,7 +1663,13 @@ func (x *Eviction) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -1644,7 +1678,13 @@ func (x *Eviction) CodecEncodeSelf(e *codec1978.Encoder) { if x.DeleteOptions == nil { r.EncodeNil() } else { - x.DeleteOptions.CodecEncodeSelf(e) + yym15 := z.EncBinary() + _ = yym15 + if false { + } else if z.HasExtensions() && z.EncExt(x.DeleteOptions) { + } else { + z.EncFallback(x.DeleteOptions) + } } } else { r.EncodeNil() @@ -1657,7 +1697,13 @@ func (x *Eviction) CodecEncodeSelf(e *codec1978.Encoder) { if x.DeleteOptions == nil { r.EncodeNil() } else { - x.DeleteOptions.CodecEncodeSelf(e) + yym16 := z.EncBinary() + _ = yym16 + if false { + } else if z.HasExtensions() && z.EncExt(x.DeleteOptions) { + } else { + z.EncFallback(x.DeleteOptions) + } } } } @@ -1748,10 +1794,16 @@ func (x *Eviction) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg3_v1.ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "deleteOptions": if r.TryDecodeAsNil() { @@ -1760,9 +1812,15 @@ func (x *Eviction) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } else { if x.DeleteOptions == nil { - x.DeleteOptions = new(pkg3_v1.DeleteOptions) + x.DeleteOptions = new(pkg2_v1.DeleteOptions) + } + yym11 := z.DecBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.DecExt(x.DeleteOptions) { + } else { + z.DecFallback(x.DeleteOptions, false) } - x.DeleteOptions.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -1775,16 +1833,16 @@ func (x *Eviction) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb10 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb10 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1792,29 +1850,7 @@ func (x *Eviction) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv11 := &x.Kind - yym12 := z.DecBinary() - _ = yym12 - if false { - } else { - *((*string)(yyv11)) = r.DecodeString() - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.APIVersion = "" - } else { - yyv13 := &x.APIVersion + yyv13 := &x.Kind yym14 := z.DecBinary() _ = yym14 if false { @@ -1822,30 +1858,58 @@ func (x *Eviction) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { *((*string)(yyv13)) = r.DecodeString() } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb10 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb10 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg3_v1.ObjectMeta{} + x.APIVersion = "" } else { - yyv15 := &x.ObjectMeta - yyv15.CodecDecodeSelf(d) + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb10 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb10 { + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg2_v1.ObjectMeta{} + } else { + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1856,22 +1920,28 @@ func (x *Eviction) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } } else { if x.DeleteOptions == nil { - x.DeleteOptions = new(pkg3_v1.DeleteOptions) + x.DeleteOptions = new(pkg2_v1.DeleteOptions) + } + yym20 := z.DecBinary() + _ = yym20 + if false { + } else if z.HasExtensions() && z.DecExt(x.DeleteOptions) { + } else { + z.DecFallback(x.DeleteOptions, false) } - x.DeleteOptions.CodecDecodeSelf(d) } for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb10 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb10 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj10-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/types.go b/vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/types.go index 8db3b555..7177a0c2 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/types.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/types.go @@ -18,7 +18,6 @@ package v1beta1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/util/intstr" ) @@ -73,8 +72,8 @@ type PodDisruptionBudgetStatus struct { // PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods type PodDisruptionBudget struct { - metav1.TypeMeta `json:",inline"` - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Specification of the desired behavior of the PodDisruptionBudget. Spec PodDisruptionBudgetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` @@ -99,8 +98,8 @@ type Eviction struct { metav1.TypeMeta `json:",inline"` // ObjectMeta describes the pod that is being evicted. - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // DeleteOptions may be provided - DeleteOptions *v1.DeleteOptions `json:"deleteOptions,omitempty" protobuf:"bytes,2,opt,name=deleteOptions"` + DeleteOptions *metav1.DeleteOptions `json:"deleteOptions,omitempty" protobuf:"bytes,2,opt,name=deleteOptions"` } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/zz_generated.conversion.go index 2aa739da..9b58c7b6 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/zz_generated.conversion.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/zz_generated.conversion.go @@ -21,11 +21,9 @@ limitations under the License. package v1beta1 import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" policy "k8s.io/kubernetes/pkg/apis/policy" unsafe "unsafe" ) @@ -52,11 +50,8 @@ func RegisterConversions(scheme *runtime.Scheme) error { } func autoConvert_v1beta1_Eviction_To_policy_Eviction(in *Eviction, out *policy.Eviction, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } - out.DeleteOptions = (*api.DeleteOptions)(unsafe.Pointer(in.DeleteOptions)) + out.ObjectMeta = in.ObjectMeta + out.DeleteOptions = (*v1.DeleteOptions)(unsafe.Pointer(in.DeleteOptions)) return nil } @@ -65,10 +60,7 @@ func Convert_v1beta1_Eviction_To_policy_Eviction(in *Eviction, out *policy.Evict } func autoConvert_policy_Eviction_To_v1beta1_Eviction(in *policy.Eviction, out *Eviction, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.DeleteOptions = (*v1.DeleteOptions)(unsafe.Pointer(in.DeleteOptions)) return nil } @@ -78,10 +70,7 @@ func Convert_policy_Eviction_To_v1beta1_Eviction(in *policy.Eviction, out *Evict } func autoConvert_v1beta1_PodDisruptionBudget_To_policy_PodDisruptionBudget(in *PodDisruptionBudget, out *policy.PodDisruptionBudget, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_PodDisruptionBudgetSpec_To_policy_PodDisruptionBudgetSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -96,10 +85,7 @@ func Convert_v1beta1_PodDisruptionBudget_To_policy_PodDisruptionBudget(in *PodDi } func autoConvert_policy_PodDisruptionBudget_To_v1beta1_PodDisruptionBudget(in *policy.PodDisruptionBudget, out *PodDisruptionBudget, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_policy_PodDisruptionBudgetSpec_To_v1beta1_PodDisruptionBudgetSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -135,7 +121,7 @@ func Convert_policy_PodDisruptionBudgetList_To_v1beta1_PodDisruptionBudgetList(i func autoConvert_v1beta1_PodDisruptionBudgetSpec_To_policy_PodDisruptionBudgetSpec(in *PodDisruptionBudgetSpec, out *policy.PodDisruptionBudgetSpec, s conversion.Scope) error { out.MinAvailable = in.MinAvailable - out.Selector = (*meta_v1.LabelSelector)(unsafe.Pointer(in.Selector)) + out.Selector = (*v1.LabelSelector)(unsafe.Pointer(in.Selector)) return nil } @@ -145,7 +131,7 @@ func Convert_v1beta1_PodDisruptionBudgetSpec_To_policy_PodDisruptionBudgetSpec(i func autoConvert_policy_PodDisruptionBudgetSpec_To_v1beta1_PodDisruptionBudgetSpec(in *policy.PodDisruptionBudgetSpec, out *PodDisruptionBudgetSpec, s conversion.Scope) error { out.MinAvailable = in.MinAvailable - out.Selector = (*meta_v1.LabelSelector)(unsafe.Pointer(in.Selector)) + out.Selector = (*v1.LabelSelector)(unsafe.Pointer(in.Selector)) return nil } @@ -155,7 +141,7 @@ func Convert_policy_PodDisruptionBudgetSpec_To_v1beta1_PodDisruptionBudgetSpec(i func autoConvert_v1beta1_PodDisruptionBudgetStatus_To_policy_PodDisruptionBudgetStatus(in *PodDisruptionBudgetStatus, out *policy.PodDisruptionBudgetStatus, s conversion.Scope) error { out.ObservedGeneration = in.ObservedGeneration - out.DisruptedPods = *(*map[string]meta_v1.Time)(unsafe.Pointer(&in.DisruptedPods)) + out.DisruptedPods = *(*map[string]v1.Time)(unsafe.Pointer(&in.DisruptedPods)) out.PodDisruptionsAllowed = in.PodDisruptionsAllowed out.CurrentHealthy = in.CurrentHealthy out.DesiredHealthy = in.DesiredHealthy @@ -169,7 +155,7 @@ func Convert_v1beta1_PodDisruptionBudgetStatus_To_policy_PodDisruptionBudgetStat func autoConvert_policy_PodDisruptionBudgetStatus_To_v1beta1_PodDisruptionBudgetStatus(in *policy.PodDisruptionBudgetStatus, out *PodDisruptionBudgetStatus, s conversion.Scope) error { out.ObservedGeneration = in.ObservedGeneration - out.DisruptedPods = *(*map[string]meta_v1.Time)(unsafe.Pointer(&in.DisruptedPods)) + out.DisruptedPods = *(*map[string]v1.Time)(unsafe.Pointer(&in.DisruptedPods)) out.PodDisruptionsAllowed = in.PodDisruptionsAllowed out.CurrentHealthy = in.CurrentHealthy out.DesiredHealthy = in.DesiredHealthy diff --git a/vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/zz_generated.deepcopy.go index 2d75a4d6..395e6689 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/policy/v1beta1/zz_generated.deepcopy.go @@ -21,10 +21,9 @@ limitations under the License. package v1beta1 import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - v1 "k8s.io/kubernetes/pkg/api/v1" reflect "reflect" ) @@ -49,14 +48,17 @@ func DeepCopy_v1beta1_Eviction(in interface{}, out interface{}, c *conversion.Cl in := in.(*Eviction) out := out.(*Eviction) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.DeleteOptions != nil { in, out := &in.DeleteOptions, &out.DeleteOptions - *out = new(v1.DeleteOptions) - if err := v1.DeepCopy_v1_DeleteOptions(*in, *out, c); err != nil { + if newVal, err := c.DeepCopy(*in); err != nil { return err + } else { + *out = newVal.(*v1.DeleteOptions) } } return nil @@ -68,8 +70,10 @@ func DeepCopy_v1beta1_PodDisruptionBudget(in interface{}, out interface{}, c *co in := in.(*PodDisruptionBudget) out := out.(*PodDisruptionBudget) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v1beta1_PodDisruptionBudgetSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -109,7 +113,7 @@ func DeepCopy_v1beta1_PodDisruptionBudgetSpec(in interface{}, out interface{}, c if newVal, err := c.DeepCopy(*in); err != nil { return err } else { - *out = newVal.(*meta_v1.LabelSelector) + *out = newVal.(*v1.LabelSelector) } } return nil @@ -123,7 +127,7 @@ func DeepCopy_v1beta1_PodDisruptionBudgetStatus(in interface{}, out interface{}, *out = *in if in.DisruptedPods != nil { in, out := &in.DisruptedPods, &out.DisruptedPods - *out = make(map[string]meta_v1.Time) + *out = make(map[string]v1.Time) for key, val := range *in { (*out)[key] = val.DeepCopy() } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/policy/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/policy/zz_generated.deepcopy.go index 3278f271..298ec5fd 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/policy/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/policy/zz_generated.deepcopy.go @@ -24,7 +24,6 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - api "k8s.io/kubernetes/pkg/api" reflect "reflect" ) @@ -49,14 +48,17 @@ func DeepCopy_policy_Eviction(in interface{}, out interface{}, c *conversion.Clo in := in.(*Eviction) out := out.(*Eviction) *out = *in - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.DeleteOptions != nil { in, out := &in.DeleteOptions, &out.DeleteOptions - *out = new(api.DeleteOptions) - if err := api.DeepCopy_api_DeleteOptions(*in, *out, c); err != nil { + if newVal, err := c.DeepCopy(*in); err != nil { return err + } else { + *out = newVal.(*v1.DeleteOptions) } } return nil @@ -68,8 +70,10 @@ func DeepCopy_policy_PodDisruptionBudget(in interface{}, out interface{}, c *con in := in.(*PodDisruptionBudget) out := out.(*PodDisruptionBudget) *out = *in - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_policy_PodDisruptionBudgetSpec(&in.Spec, &out.Spec, c); err != nil { return err diff --git a/vendor/k8s.io/kubernetes/pkg/apis/rbac/BUILD b/vendor/k8s.io/kubernetes/pkg/apis/rbac/BUILD index ef449cf8..2373bf70 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/rbac/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/BUILD @@ -18,7 +18,6 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/conversion", "//vendor:k8s.io/apimachinery/pkg/runtime", @@ -40,6 +39,7 @@ filegroup( ":package-srcs", "//pkg/apis/rbac/install:all-srcs", "//pkg/apis/rbac/v1alpha1:all-srcs", + "//pkg/apis/rbac/v1beta1:all-srcs", "//pkg/apis/rbac/validation:all-srcs", ], tags = ["automanaged"], diff --git a/vendor/k8s.io/kubernetes/pkg/apis/rbac/helpers.go b/vendor/k8s.io/kubernetes/pkg/apis/rbac/helpers.go index d0c2c1c0..55875a11 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/rbac/helpers.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/helpers.go @@ -20,9 +20,9 @@ import ( "fmt" "strings" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/kubernetes/pkg/api" ) func RoleRefGroupKind(roleRef RoleRef) schema.GroupKind { @@ -208,7 +208,7 @@ type ClusterRoleBindingBuilder struct { func NewClusterBinding(clusterRoleName string) *ClusterRoleBindingBuilder { return &ClusterRoleBindingBuilder{ ClusterRoleBinding: ClusterRoleBinding{ - ObjectMeta: api.ObjectMeta{Name: clusterRoleName}, + ObjectMeta: metav1.ObjectMeta{Name: clusterRoleName}, RoleRef: RoleRef{ APIGroup: GroupName, Kind: "ClusterRole", diff --git a/vendor/k8s.io/kubernetes/pkg/apis/rbac/install/BUILD b/vendor/k8s.io/kubernetes/pkg/apis/rbac/install/BUILD index 6846511c..45a8aaa2 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/rbac/install/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/install/BUILD @@ -12,9 +12,13 @@ go_library( srcs = ["install.go"], tags = ["automanaged"], deps = [ - "//pkg/apimachinery/announced:go_default_library", + "//pkg/api:go_default_library", "//pkg/apis/rbac:go_default_library", "//pkg/apis/rbac/v1alpha1:go_default_library", + "//pkg/apis/rbac/v1beta1:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apimachinery/announced", + "//vendor:k8s.io/apimachinery/pkg/apimachinery/registered", + "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/sets", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/apis/rbac/install/install.go b/vendor/k8s.io/kubernetes/pkg/apis/rbac/install/install.go index 378fc48e..36067ed1 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/rbac/install/install.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/install/install.go @@ -19,25 +19,35 @@ limitations under the License. package install import ( + "k8s.io/apimachinery/pkg/apimachinery/announced" + "k8s.io/apimachinery/pkg/apimachinery/registered" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/kubernetes/pkg/apimachinery/announced" + "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/rbac" "k8s.io/kubernetes/pkg/apis/rbac/v1alpha1" + "k8s.io/kubernetes/pkg/apis/rbac/v1beta1" ) func init() { + Install(api.GroupFactoryRegistry, api.Registry, api.Scheme) +} + +// Install registers the API group and adds types to a scheme +func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) { if err := announced.NewGroupMetaFactory( &announced.GroupMetaFactoryArgs{ GroupName: rbac.GroupName, - VersionPreferenceOrder: []string{v1alpha1.SchemeGroupVersion.Version}, + VersionPreferenceOrder: []string{v1beta1.SchemeGroupVersion.Version, v1alpha1.SchemeGroupVersion.Version}, ImportPrefix: "k8s.io/kubernetes/pkg/apis/rbac", RootScopedKinds: sets.NewString("ClusterRole", "ClusterRoleBinding"), AddInternalObjectsToScheme: rbac.AddToScheme, }, announced.VersionToSchemeFunc{ + v1beta1.SchemeGroupVersion.Version: v1beta1.AddToScheme, v1alpha1.SchemeGroupVersion.Version: v1alpha1.AddToScheme, }, - ).Announce().RegisterAndEnable(); err != nil { + ).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil { panic(err) } } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/rbac/register.go b/vendor/k8s.io/kubernetes/pkg/apis/rbac/register.go index 25305221..a7403d34 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/rbac/register.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/register.go @@ -20,7 +20,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/api" ) const GroupName = "rbac.authorization.k8s.io" @@ -55,11 +54,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { &ClusterRoleBinding{}, &ClusterRoleBindingList{}, &ClusterRoleList{}, - - &api.ListOptions{}, - &api.DeleteOptions{}, - &metav1.ExportOptions{}, - &metav1.GetOptions{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil diff --git a/vendor/k8s.io/kubernetes/pkg/apis/rbac/types.go b/vendor/k8s.io/kubernetes/pkg/apis/rbac/types.go index dd9826bb..87abe1a7 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/rbac/types.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/types.go @@ -18,8 +18,6 @@ package rbac import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/kubernetes/pkg/api" ) // Authorization is calculated against @@ -43,12 +41,9 @@ const ( type PolicyRule struct { // Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds. Verbs []string - // AttributeRestrictions will vary depending on what the Authorizer/AuthorizationAttributeBuilder pair supports. - // If the Authorizer does not recognize how to handle the AttributeRestrictions, the Authorizer should report an error. - AttributeRestrictions runtime.Object + // APIGroups is the name of the APIGroup that contains the resources. // If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed. - APIGroups []string // Resources is a list of resources this rule applies to. ResourceAll represents all resources. Resources []string @@ -94,7 +89,7 @@ type RoleRef struct { type Role struct { metav1.TypeMeta // Standard object's metadata. - api.ObjectMeta + metav1.ObjectMeta // Rules holds all the PolicyRules for this Role Rules []PolicyRule @@ -107,7 +102,7 @@ type Role struct { // namespace only have effect in that namespace. type RoleBinding struct { metav1.TypeMeta - api.ObjectMeta + metav1.ObjectMeta // Subjects holds references to the objects the role applies to. Subjects []Subject @@ -144,7 +139,7 @@ type RoleList struct { type ClusterRole struct { metav1.TypeMeta // Standard object's metadata. - api.ObjectMeta + metav1.ObjectMeta // Rules holds all the PolicyRules for this ClusterRole Rules []PolicyRule @@ -158,7 +153,7 @@ type ClusterRole struct { type ClusterRoleBinding struct { metav1.TypeMeta // Standard object's metadata. - api.ObjectMeta + metav1.ObjectMeta // Subjects holds references to the objects the role applies to. Subjects []Subject diff --git a/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/BUILD b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/BUILD index e653efc7..e7534657 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/BUILD @@ -26,7 +26,6 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api/v1:go_default_library", "//pkg/apis/rbac:go_default_library", "//vendor:github.com/gogo/protobuf/proto", "//vendor:github.com/ugorji/go/codec", diff --git a/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/generated.pb.go b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/generated.pb.go index bfe80ced..bac673c9 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/generated.pb.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/generated.pb.go @@ -344,14 +344,6 @@ func (m *PolicyRule) MarshalTo(data []byte) (int, error) { i += copy(data[i:], s) } } - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(m.AttributeRestrictions.Size())) - n7, err := m.AttributeRestrictions.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n7 if len(m.APIGroups) > 0 { for _, s := range m.APIGroups { data[i] = 0x1a @@ -433,11 +425,11 @@ func (m *PolicyRuleBuilder) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.PolicyRule.Size())) - n8, err := m.PolicyRule.MarshalTo(data[i:]) + n7, err := m.PolicyRule.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n8 + i += n7 return i, nil } @@ -459,11 +451,11 @@ func (m *Role) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n9, err := m.ObjectMeta.MarshalTo(data[i:]) + n8, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n9 + i += n8 if len(m.Rules) > 0 { for _, msg := range m.Rules { data[i] = 0x12 @@ -497,11 +489,11 @@ func (m *RoleBinding) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n10, err := m.ObjectMeta.MarshalTo(data[i:]) + n9, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n10 + i += n9 if len(m.Subjects) > 0 { for _, msg := range m.Subjects { data[i] = 0x12 @@ -517,11 +509,11 @@ func (m *RoleBinding) MarshalTo(data []byte) (int, error) { data[i] = 0x1a i++ i = encodeVarintGenerated(data, i, uint64(m.RoleRef.Size())) - n11, err := m.RoleRef.MarshalTo(data[i:]) + n10, err := m.RoleRef.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n11 + i += n10 return i, nil } @@ -543,11 +535,11 @@ func (m *RoleBindingList) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n12, err := m.ListMeta.MarshalTo(data[i:]) + n11, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n12 + i += n11 if len(m.Items) > 0 { for _, msg := range m.Items { data[i] = 0x12 @@ -581,11 +573,11 @@ func (m *RoleList) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n13, err := m.ListMeta.MarshalTo(data[i:]) + n12, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n13 + i += n12 if len(m.Items) > 0 { for _, msg := range m.Items { data[i] = 0x12 @@ -767,8 +759,6 @@ func (m *PolicyRule) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) } } - l = m.AttributeRestrictions.Size() - n += 1 + l + sovGenerated(uint64(l)) if len(m.APIGroups) > 0 { for _, s := range m.APIGroups { l = len(s) @@ -906,7 +896,7 @@ func (this *ClusterRole) String() string { return "nil" } s := strings.Join([]string{`&ClusterRole{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Rules:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Rules), "PolicyRule", "PolicyRule", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -917,7 +907,7 @@ func (this *ClusterRoleBinding) String() string { return "nil" } s := strings.Join([]string{`&ClusterRoleBinding{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Subjects:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Subjects), "Subject", "Subject", 1), `&`, ``, 1) + `,`, `RoleRef:` + strings.Replace(strings.Replace(this.RoleRef.String(), "RoleRef", "RoleRef", 1), `&`, ``, 1) + `,`, `}`, @@ -962,7 +952,6 @@ func (this *PolicyRule) String() string { } s := strings.Join([]string{`&PolicyRule{`, `Verbs:` + fmt.Sprintf("%v", this.Verbs) + `,`, - `AttributeRestrictions:` + strings.Replace(strings.Replace(this.AttributeRestrictions.String(), "RawExtension", "k8s_io_apimachinery_pkg_runtime.RawExtension", 1), `&`, ``, 1) + `,`, `APIGroups:` + fmt.Sprintf("%v", this.APIGroups) + `,`, `Resources:` + fmt.Sprintf("%v", this.Resources) + `,`, `ResourceNames:` + fmt.Sprintf("%v", this.ResourceNames) + `,`, @@ -986,7 +975,7 @@ func (this *Role) String() string { return "nil" } s := strings.Join([]string{`&Role{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Rules:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Rules), "PolicyRule", "PolicyRule", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -997,7 +986,7 @@ func (this *RoleBinding) String() string { return "nil" } s := strings.Join([]string{`&RoleBinding{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Subjects:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Subjects), "Subject", "Subject", 1), `&`, ``, 1) + `,`, `RoleRef:` + strings.Replace(strings.Replace(this.RoleRef.String(), "RoleRef", "RoleRef", 1), `&`, ``, 1) + `,`, `}`, @@ -1671,36 +1660,6 @@ func (m *PolicyRule) Unmarshal(data []byte) error { } m.Verbs = append(m.Verbs, string(data[iNdEx:postIndex])) iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AttributeRestrictions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.AttributeRestrictions.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field APIGroups", wireType) @@ -2801,61 +2760,58 @@ var ( ) var fileDescriptorGenerated = []byte{ - // 895 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x55, 0xcf, 0x8b, 0x23, 0x45, - 0x14, 0x4e, 0x4d, 0x12, 0x27, 0x79, 0xe3, 0x30, 0x4e, 0xc9, 0x4a, 0x3b, 0x60, 0x32, 0xe4, 0x14, - 0x74, 0xb7, 0x9b, 0x0c, 0xab, 0xee, 0x41, 0x0f, 0xd3, 0x22, 0x32, 0xb8, 0x8e, 0x43, 0x2d, 0x2e, - 0xba, 0x2c, 0x48, 0xa5, 0x53, 0x9b, 0x94, 0xe9, 0x74, 0x37, 0x55, 0xd5, 0xa3, 0x8b, 0x08, 0x22, - 0x1e, 0x3c, 0xfa, 0x57, 0xec, 0xcd, 0x8b, 0x57, 0xf1, 0xe2, 0x69, 0xc0, 0xcb, 0x1e, 0xf5, 0x12, - 0x9c, 0xf8, 0x8f, 0x48, 0x75, 0xaa, 0x7f, 0xcc, 0x76, 0x87, 0xf9, 0x21, 0x0e, 0x08, 0x7b, 0x4a, - 0xea, 0xbd, 0xef, 0x7b, 0xf5, 0xbd, 0x7a, 0x55, 0x5f, 0xc3, 0x9d, 0xe9, 0x1d, 0x69, 0xf3, 0xd0, - 0x99, 0xc6, 0x43, 0x26, 0x02, 0xa6, 0x98, 0x74, 0xa2, 0xe9, 0xd8, 0xa1, 0x11, 0x97, 0x8e, 0x18, - 0x52, 0xcf, 0x39, 0x1e, 0x50, 0x3f, 0x9a, 0xd0, 0x81, 0x33, 0x66, 0x01, 0x13, 0x54, 0xb1, 0x91, - 0x1d, 0x89, 0x50, 0x85, 0xb8, 0xbf, 0x64, 0xda, 0x39, 0xd3, 0x8e, 0xa6, 0x63, 0x5b, 0x33, 0x6d, - 0xcd, 0xb4, 0x53, 0xe6, 0xce, 0xad, 0x31, 0x57, 0x93, 0x78, 0x68, 0x7b, 0xe1, 0xcc, 0x19, 0x87, - 0xe3, 0xd0, 0x49, 0x0a, 0x0c, 0xe3, 0x47, 0xc9, 0x2a, 0x59, 0x24, 0xff, 0x96, 0x85, 0x77, 0x6e, - 0x1b, 0x49, 0x34, 0xe2, 0x33, 0xea, 0x4d, 0x78, 0xc0, 0xc4, 0xe3, 0x5c, 0xd4, 0x8c, 0x29, 0xea, - 0x1c, 0x97, 0xe4, 0xec, 0x38, 0xab, 0x58, 0x22, 0x0e, 0x14, 0x9f, 0xb1, 0x12, 0xe1, 0xad, 0xf3, - 0x08, 0xd2, 0x9b, 0xb0, 0x19, 0x2d, 0xf1, 0xf6, 0x56, 0x9e, 0x98, 0x23, 0x98, 0x0c, 0x63, 0xe1, - 0x95, 0xf7, 0xba, 0xb9, 0x9a, 0x53, 0xd1, 0xca, 0xa0, 0x1a, 0x1d, 0x2b, 0xee, 0x3b, 0x3c, 0x50, - 0x52, 0x89, 0x67, 0x29, 0xbd, 0xdf, 0x10, 0x6c, 0xbc, 0xe7, 0xc7, 0x52, 0x31, 0x41, 0x42, 0x9f, - 0xe1, 0x4f, 0xa1, 0xa5, 0x0f, 0x6a, 0x44, 0x15, 0xb5, 0xd0, 0x2e, 0xea, 0x6f, 0xec, 0xf5, 0xed, - 0x95, 0xf3, 0xb2, 0x8f, 0x07, 0xf6, 0xc7, 0xc3, 0x2f, 0x98, 0xa7, 0x3e, 0x62, 0x8a, 0xba, 0xf8, - 0x64, 0xde, 0xad, 0x2d, 0xe6, 0x5d, 0xc8, 0x63, 0x24, 0xab, 0x86, 0x3f, 0x83, 0xa6, 0x88, 0x7d, - 0x26, 0xad, 0xb5, 0xdd, 0x7a, 0x7f, 0x63, 0xef, 0xb6, 0x7d, 0xd1, 0x6b, 0x60, 0x1f, 0x85, 0x3e, - 0xf7, 0x1e, 0x93, 0xd8, 0x67, 0xee, 0xa6, 0xd9, 0xa2, 0xa9, 0x57, 0x92, 0x2c, 0x2b, 0xf6, 0x7e, - 0x5a, 0x03, 0x5c, 0x68, 0xc2, 0xe5, 0xc1, 0x88, 0x07, 0xe3, 0xff, 0xb0, 0x97, 0xcf, 0xa1, 0x25, - 0xe3, 0x24, 0x91, 0xb6, 0x33, 0xb8, 0x78, 0x3b, 0xf7, 0x96, 0x4c, 0xf7, 0x25, 0xb3, 0x45, 0xcb, - 0x04, 0x24, 0xc9, 0x8a, 0xe2, 0x87, 0xb0, 0x2e, 0x42, 0x9f, 0x11, 0xf6, 0xc8, 0xaa, 0x27, 0xca, - 0x2f, 0x51, 0x9f, 0x2c, 0x89, 0xee, 0x96, 0xa9, 0xbf, 0x6e, 0x02, 0x24, 0x2d, 0xd9, 0x7b, 0x82, - 0xe0, 0xd5, 0xf2, 0x79, 0xb9, 0x31, 0xf7, 0x47, 0x4c, 0xe0, 0x1f, 0x10, 0x60, 0xaf, 0x94, 0x35, - 0x27, 0xf8, 0xce, 0xc5, 0x75, 0x54, 0xec, 0xb0, 0x63, 0x24, 0x55, 0x4c, 0x8b, 0x54, 0xec, 0xd9, - 0xfb, 0x13, 0xc1, 0x2b, 0x65, 0xe8, 0x5d, 0x2e, 0x15, 0x7e, 0x58, 0x1a, 0xae, 0x9d, 0x4a, 0x2b, - 0x3e, 0xcc, 0x5c, 0x9c, 0x46, 0xeb, 0x21, 0x6b, 0x76, 0x32, 0xe2, 0xec, 0xfc, 0xd3, 0x48, 0x61, - 0xc0, 0x14, 0x9a, 0x5c, 0xb1, 0x59, 0x3a, 0xdd, 0x7f, 0xd7, 0x75, 0x76, 0x69, 0x0f, 0x74, 0x49, - 0xb2, 0xac, 0xdc, 0xfb, 0x1d, 0xc1, 0x56, 0x01, 0x7c, 0x0d, 0x4d, 0x3d, 0x38, 0xdb, 0xd4, 0x9b, - 0x57, 0x6b, 0xaa, 0xba, 0x9b, 0xef, 0xeb, 0x00, 0xf9, 0x3b, 0xc5, 0x5d, 0x68, 0x1e, 0x33, 0x31, - 0x94, 0x16, 0xda, 0xad, 0xf7, 0xdb, 0x6e, 0x5b, 0xe3, 0xef, 0xeb, 0x00, 0x59, 0xc6, 0xf1, 0x77, - 0x08, 0x6e, 0x50, 0xa5, 0x04, 0x1f, 0xc6, 0x8a, 0x11, 0x26, 0x95, 0xe0, 0x9e, 0xe2, 0x61, 0xa0, - 0xc5, 0xe9, 0xbe, 0x6f, 0xad, 0xec, 0xdb, 0xb8, 0xac, 0x4d, 0xe8, 0x97, 0xef, 0x7f, 0xa5, 0x58, - 0x20, 0x79, 0x18, 0xb8, 0xaf, 0x19, 0x51, 0x37, 0xf6, 0xab, 0x6a, 0x92, 0xea, 0xad, 0xf0, 0x1b, - 0xd0, 0xa6, 0x11, 0xff, 0x40, 0x84, 0x71, 0x24, 0xad, 0x7a, 0xa2, 0x74, 0x73, 0x31, 0xef, 0xb6, - 0xf7, 0x8f, 0x0e, 0x96, 0x41, 0x92, 0xe7, 0x35, 0x38, 0xb5, 0x69, 0x69, 0x35, 0x72, 0x30, 0x49, - 0x83, 0x24, 0xcf, 0xe3, 0xb7, 0x61, 0x33, 0x5d, 0x1c, 0xd2, 0x19, 0x93, 0x56, 0x33, 0x21, 0x6c, - 0x2f, 0xe6, 0xdd, 0x4d, 0x52, 0x4c, 0x90, 0xb3, 0x38, 0xfc, 0x2e, 0x6c, 0x05, 0x61, 0x90, 0x42, - 0x3e, 0x21, 0x77, 0xa5, 0xf5, 0x42, 0x42, 0x7d, 0x79, 0x31, 0xef, 0x6e, 0x1d, 0x9e, 0x4d, 0x91, - 0x67, 0xb1, 0xbd, 0x6f, 0x60, 0xbb, 0xe0, 0x96, 0xe6, 0x41, 0x4f, 0x00, 0xa2, 0x2c, 0x68, 0xee, - 0xd5, 0xd5, 0xec, 0x37, 0x73, 0xc5, 0x3c, 0x46, 0x0a, 0xb5, 0x7b, 0xbf, 0x20, 0x68, 0xfc, 0x7f, - 0x3f, 0x23, 0x4f, 0xd6, 0x60, 0xe3, 0xf9, 0xf7, 0xe3, 0x02, 0xdf, 0x0f, 0x6d, 0x5d, 0xd7, 0xeb, - 0xc7, 0x57, 0xb7, 0xae, 0xf3, 0x8d, 0xf8, 0x57, 0x04, 0xad, 0x6b, 0x72, 0xe0, 0x7b, 0x67, 0xdb, - 0xb0, 0x2f, 0xd9, 0x46, 0xb5, 0xfe, 0xaf, 0x21, 0x9d, 0x10, 0xbe, 0x09, 0xad, 0xd4, 0xb0, 0x12, - 0xf5, 0xed, 0x5c, 0x4d, 0xea, 0x69, 0x24, 0x43, 0xe0, 0x5d, 0x68, 0x4c, 0x79, 0x30, 0x4a, 0x1c, - 0xb7, 0xed, 0xbe, 0x68, 0x90, 0x8d, 0x0f, 0x79, 0x30, 0x22, 0x49, 0x46, 0x23, 0x02, 0x3a, 0x63, - 0xc9, 0x1d, 0x2a, 0x20, 0xb4, 0x55, 0x91, 0x24, 0xd3, 0xfb, 0x19, 0xc1, 0xba, 0xb9, 0x7f, 0x59, - 0x3d, 0xb4, 0xb2, 0xde, 0x1e, 0x00, 0x8d, 0xf8, 0x7d, 0x26, 0xb4, 0x69, 0x9b, 0x7d, 0xb3, 0x97, - 0xb2, 0x7f, 0x74, 0x60, 0x32, 0xa4, 0x80, 0x3a, 0x5f, 0x03, 0x76, 0xa0, 0xad, 0x7f, 0x65, 0x44, - 0x3d, 0x66, 0x35, 0x12, 0xd8, 0xb6, 0x81, 0xb5, 0x0f, 0xd3, 0x04, 0xc9, 0x31, 0xee, 0xeb, 0x27, - 0xa7, 0x9d, 0xda, 0xd3, 0xd3, 0x4e, 0xed, 0x8f, 0xd3, 0x4e, 0xed, 0xdb, 0x45, 0x07, 0x9d, 0x2c, - 0x3a, 0xe8, 0xe9, 0xa2, 0x83, 0xfe, 0x5a, 0x74, 0xd0, 0x8f, 0x7f, 0x77, 0x6a, 0x0f, 0x5a, 0xe9, - 0xc1, 0xff, 0x13, 0x00, 0x00, 0xff, 0xff, 0xf9, 0x52, 0x01, 0xe6, 0xe8, 0x0c, 0x00, 0x00, + // 840 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x54, 0xcf, 0x6b, 0x24, 0x45, + 0x14, 0x9e, 0x4a, 0x66, 0xcc, 0xcc, 0x8b, 0x21, 0xa6, 0x04, 0x69, 0x73, 0xe8, 0x09, 0x7d, 0x0a, + 0xba, 0x76, 0x3b, 0x61, 0xd5, 0x3d, 0xe8, 0x61, 0xdb, 0x83, 0x04, 0xd7, 0x18, 0x6a, 0x71, 0xc1, + 0x65, 0x41, 0x6b, 0x7a, 0x6a, 0x67, 0xca, 0xe9, 0x5f, 0x54, 0x75, 0x07, 0x16, 0x11, 0x3c, 0x7a, + 0xf4, 0xaf, 0xf0, 0xe8, 0x41, 0xf0, 0xe8, 0xc9, 0x4b, 0xd0, 0xcb, 0x1e, 0xf5, 0x32, 0x98, 0xf6, + 0x0f, 0x51, 0xba, 0xba, 0xfa, 0x47, 0xd2, 0x13, 0xf2, 0x43, 0x18, 0x10, 0xf6, 0x34, 0x53, 0xef, + 0x7d, 0xdf, 0xab, 0xf7, 0xbd, 0x57, 0xfd, 0xc1, 0xbd, 0xf9, 0x3d, 0x69, 0xf3, 0xc8, 0x99, 0xa7, + 0x63, 0x26, 0x42, 0x96, 0x30, 0xe9, 0xc4, 0xf3, 0xa9, 0x43, 0x63, 0x2e, 0x1d, 0x31, 0xa6, 0x9e, + 0x73, 0x32, 0xa2, 0x7e, 0x3c, 0xa3, 0x23, 0x67, 0xca, 0x42, 0x26, 0x68, 0xc2, 0x26, 0x76, 0x2c, + 0xa2, 0x24, 0xc2, 0xfb, 0x05, 0xd3, 0xae, 0x99, 0x76, 0x3c, 0x9f, 0xda, 0x39, 0xd3, 0xce, 0x99, + 0x76, 0xc9, 0xdc, 0x7d, 0x6b, 0xca, 0x93, 0x59, 0x3a, 0xb6, 0xbd, 0x28, 0x70, 0xa6, 0xd1, 0x34, + 0x72, 0x54, 0x81, 0x71, 0xfa, 0x54, 0x9d, 0xd4, 0x41, 0xfd, 0x2b, 0x0a, 0xef, 0xde, 0xd5, 0x2d, + 0xd1, 0x98, 0x07, 0xd4, 0x9b, 0xf1, 0x90, 0x89, 0x67, 0x75, 0x53, 0x01, 0x4b, 0xa8, 0x73, 0xd2, + 0x6a, 0x67, 0xd7, 0xb9, 0x8c, 0x25, 0xd2, 0x30, 0xe1, 0x01, 0x6b, 0x11, 0xde, 0xbd, 0x8a, 0x20, + 0xbd, 0x19, 0x0b, 0x68, 0x8b, 0x77, 0x70, 0xe9, 0xc4, 0x1c, 0xc1, 0x64, 0x94, 0x0a, 0xaf, 0x7d, + 0xd7, 0x9d, 0xcb, 0x39, 0x4b, 0xa4, 0x8c, 0x96, 0xa3, 0xd3, 0x84, 0xfb, 0x0e, 0x0f, 0x13, 0x99, + 0x88, 0x8b, 0x14, 0xeb, 0x37, 0x04, 0x9b, 0x1f, 0xfa, 0xa9, 0x4c, 0x98, 0x20, 0x91, 0xcf, 0xf0, + 0x97, 0xd0, 0xcf, 0x07, 0x35, 0xa1, 0x09, 0x35, 0xd0, 0x1e, 0xda, 0xdf, 0x3c, 0x78, 0xdb, 0xd6, + 0xfb, 0x6a, 0xea, 0xad, 0x37, 0x96, 0xa3, 0xed, 0x93, 0x91, 0xfd, 0xe9, 0xf8, 0x2b, 0xe6, 0x25, + 0x9f, 0xb0, 0x84, 0xba, 0xf8, 0x74, 0x31, 0xec, 0x64, 0x8b, 0x21, 0xd4, 0x31, 0x52, 0x55, 0xc5, + 0x9f, 0x43, 0x4f, 0xa4, 0x3e, 0x93, 0xc6, 0xda, 0xde, 0xfa, 0xfe, 0xe6, 0xc1, 0x5d, 0xfb, 0xba, + 0xcf, 0xc1, 0x3e, 0x8e, 0x7c, 0xee, 0x3d, 0x23, 0xa9, 0xcf, 0xdc, 0x2d, 0x7d, 0x45, 0x2f, 0x3f, + 0x49, 0x52, 0x54, 0xb4, 0x7e, 0x5e, 0x03, 0xdc, 0x10, 0xe3, 0xf2, 0x70, 0xc2, 0xc3, 0xe9, 0x0a, + 0x34, 0x7d, 0x01, 0x7d, 0x99, 0xaa, 0x44, 0x29, 0x6b, 0x74, 0x7d, 0x59, 0x0f, 0x0b, 0xa6, 0xfb, + 0x8a, 0xbe, 0xa2, 0xaf, 0x03, 0x92, 0x54, 0x45, 0xf1, 0x13, 0xd8, 0x10, 0x91, 0xcf, 0x08, 0x7b, + 0x6a, 0xac, 0x2b, 0x05, 0x37, 0xa8, 0x4f, 0x0a, 0xa2, 0xbb, 0xad, 0xeb, 0x6f, 0xe8, 0x00, 0x29, + 0x4b, 0x5a, 0x3f, 0x20, 0x78, 0xbd, 0x3d, 0x37, 0x37, 0xe5, 0xfe, 0x84, 0x09, 0xfc, 0x1d, 0x02, + 0xec, 0xb5, 0xb2, 0x7a, 0x92, 0xef, 0x5f, 0xbf, 0x8f, 0x25, 0x37, 0xec, 0xea, 0x96, 0x96, 0x6c, + 0x8d, 0x2c, 0xb9, 0xd3, 0xfa, 0x13, 0xc1, 0x6b, 0x6d, 0xe8, 0x03, 0x2e, 0x13, 0xfc, 0xa4, 0xb5, + 0x64, 0xfb, 0x7a, 0x4b, 0xce, 0xd9, 0x6a, 0xc5, 0xd5, 0xfc, 0xcb, 0x48, 0x63, 0xc1, 0x14, 0x7a, + 0x3c, 0x61, 0x41, 0xb9, 0xdd, 0xff, 0xa6, 0xba, 0x7a, 0xbc, 0x87, 0x79, 0x49, 0x52, 0x54, 0xb6, + 0x7e, 0x47, 0xb0, 0xdd, 0x00, 0xaf, 0x40, 0xd4, 0xe3, 0xf3, 0xa2, 0xde, 0xb9, 0x9d, 0xa8, 0xe5, + 0x6a, 0xfe, 0x41, 0x00, 0xf5, 0xf7, 0x8a, 0x87, 0xd0, 0x3b, 0x61, 0x62, 0x2c, 0x0d, 0xb4, 0xb7, + 0xbe, 0x3f, 0x70, 0x07, 0x39, 0xfe, 0x51, 0x1e, 0x20, 0x45, 0x1c, 0xbf, 0x09, 0x03, 0x1a, 0xf3, + 0x8f, 0x44, 0x94, 0xc6, 0xd2, 0x58, 0x57, 0xa0, 0xad, 0x6c, 0x31, 0x1c, 0xdc, 0x3f, 0x3e, 0x2c, + 0x82, 0xa4, 0xce, 0xe7, 0xe0, 0xd2, 0x31, 0xa5, 0xd1, 0xad, 0xc1, 0xa4, 0x0c, 0x92, 0x3a, 0x8f, + 0xdf, 0x83, 0xad, 0xf2, 0x70, 0x44, 0x03, 0x26, 0x8d, 0x9e, 0x22, 0xec, 0x64, 0x8b, 0xe1, 0x16, + 0x69, 0x26, 0xc8, 0x79, 0x1c, 0xfe, 0x00, 0xb6, 0xc3, 0x28, 0x2c, 0x21, 0x9f, 0x91, 0x07, 0xd2, + 0x78, 0x49, 0x51, 0x5f, 0xcd, 0x16, 0xc3, 0xed, 0xa3, 0xf3, 0x29, 0x72, 0x11, 0x6b, 0x7d, 0x03, + 0x3b, 0x0d, 0xc3, 0xd2, 0xdf, 0xd2, 0x0c, 0x20, 0xae, 0x82, 0x7a, 0xa5, 0xb7, 0x73, 0xc0, 0xca, + 0x90, 0xea, 0x18, 0x69, 0xd4, 0xb6, 0x7e, 0x45, 0xd0, 0xfd, 0xff, 0x3b, 0xfa, 0x8f, 0x6b, 0xb0, + 0xf9, 0xc2, 0xca, 0x6f, 0x60, 0xe5, 0xb9, 0x8b, 0xac, 0xd6, 0x1a, 0x6f, 0xef, 0x22, 0x57, 0x7b, + 0xe2, 0x2f, 0x08, 0xfa, 0x2b, 0x32, 0xc3, 0x87, 0xe7, 0x65, 0xd8, 0x37, 0x94, 0xb1, 0xbc, 0xff, + 0xaf, 0xa1, 0xdc, 0x10, 0xbe, 0x03, 0xfd, 0xd2, 0xc0, 0x54, 0xf7, 0x83, 0xba, 0x9b, 0xd2, 0xe3, + 0x48, 0x85, 0xc0, 0x7b, 0xd0, 0x9d, 0xf3, 0x70, 0x62, 0xac, 0x29, 0xe4, 0xcb, 0x1a, 0xd9, 0xfd, + 0x98, 0x87, 0x13, 0xa2, 0x32, 0x39, 0x22, 0xa4, 0x01, 0x53, 0x6f, 0xa8, 0x81, 0xc8, 0xad, 0x8b, + 0xa8, 0x8c, 0xf5, 0x13, 0x82, 0x0d, 0xfd, 0xfe, 0xaa, 0x7a, 0xe8, 0xd2, 0x7a, 0x07, 0x00, 0x34, + 0xe6, 0x8f, 0x98, 0x90, 0x3c, 0x0a, 0xf5, 0xbd, 0xd5, 0x97, 0x72, 0xff, 0xf8, 0x50, 0x67, 0x48, + 0x03, 0x75, 0x75, 0x0f, 0xd8, 0x81, 0x41, 0xfe, 0x2b, 0x63, 0xea, 0x31, 0xa3, 0xab, 0x60, 0x3b, + 0x1a, 0x36, 0x38, 0x2a, 0x13, 0xa4, 0xc6, 0xb8, 0x6f, 0x9c, 0x9e, 0x99, 0x9d, 0xe7, 0x67, 0x66, + 0xe7, 0x8f, 0x33, 0xb3, 0xf3, 0x6d, 0x66, 0xa2, 0xd3, 0xcc, 0x44, 0xcf, 0x33, 0x13, 0xfd, 0x95, + 0x99, 0xe8, 0xfb, 0xbf, 0xcd, 0xce, 0xe3, 0x7e, 0x39, 0xf8, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, + 0x57, 0x75, 0x75, 0xfb, 0x83, 0x0c, 0x00, 0x00, } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/generated.proto b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/generated.proto index 8e6d4013..6837061e 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/generated.proto +++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/generated.proto @@ -35,7 +35,7 @@ option go_package = "v1alpha1"; message ClusterRole { // Standard object's metadata. // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Rules holds all the PolicyRules for this ClusterRole repeated PolicyRule rules = 2; @@ -46,7 +46,7 @@ message ClusterRole { message ClusterRoleBinding { // Standard object's metadata. // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Subjects holds references to the objects the role applies to. repeated Subject subjects = 2; @@ -90,11 +90,6 @@ message PolicyRule { // Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds. repeated string verbs = 1; - // AttributeRestrictions will vary depending on what the Authorizer/AuthorizationAttributeBuilder pair supports. - // If the Authorizer does not recognize how to handle the AttributeRestrictions, the Authorizer should report an error. - // +optional - optional k8s.io.apimachinery.pkg.runtime.RawExtension attributeRestrictions = 2; - // APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of // the enumerated resources in any API group will be allowed. // +optional @@ -128,7 +123,7 @@ message PolicyRuleBuilder { message Role { // Standard object's metadata. // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Rules holds all the PolicyRules for this Role repeated PolicyRule rules = 2; @@ -140,7 +135,7 @@ message Role { message RoleBinding { // Standard object's metadata. // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Subjects holds references to the objects the role applies to. repeated Subject subjects = 2; diff --git a/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/helpers.go b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/helpers.go index 78ca3a12..81ecaef2 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/helpers.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/helpers.go @@ -19,7 +19,7 @@ package v1alpha1 import ( "fmt" - "k8s.io/kubernetes/pkg/api/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // +k8s:deepcopy-gen=false @@ -100,7 +100,7 @@ type ClusterRoleBindingBuilder struct { func NewClusterBinding(clusterRoleName string) *ClusterRoleBindingBuilder { return &ClusterRoleBindingBuilder{ ClusterRoleBinding: ClusterRoleBinding{ - ObjectMeta: v1.ObjectMeta{Name: clusterRoleName}, + ObjectMeta: metav1.ObjectMeta{Name: clusterRoleName}, RoleRef: RoleRef{ APIGroup: GroupName, Kind: "ClusterRole", diff --git a/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/register.go b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/register.go index e7f10246..3977e99c 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/register.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/register.go @@ -20,7 +20,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/api/v1" ) const GroupName = "rbac.authorization.k8s.io" @@ -50,11 +49,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { &ClusterRoleBinding{}, &ClusterRoleBindingList{}, &ClusterRoleList{}, - - &v1.ListOptions{}, - &v1.DeleteOptions{}, - &metav1.ExportOptions{}, - &metav1.GetOptions{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil diff --git a/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/types.generated.go b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/types.generated.go index bb305b86..64ba53a9 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/types.generated.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/types.generated.go @@ -25,10 +25,8 @@ import ( "errors" "fmt" codec1978 "github.com/ugorji/go/codec" - pkg2_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - pkg1_runtime "k8s.io/apimachinery/pkg/runtime" - pkg4_types "k8s.io/apimachinery/pkg/types" - pkg3_v1 "k8s.io/kubernetes/pkg/api/v1" + pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + pkg2_types "k8s.io/apimachinery/pkg/types" "reflect" "runtime" time "time" @@ -64,12 +62,10 @@ func init() { panic(err) } if false { // reference the types, but skip this branch at build/run time - var v0 pkg2_v1.TypeMeta - var v1 pkg1_runtime.RawExtension - var v2 pkg4_types.UID - var v3 pkg3_v1.ObjectMeta - var v4 time.Time - _, _, _, _, _ = v0, v1, v2, v3, v4 + var v0 pkg1_v1.TypeMeta + var v1 pkg2_types.UID + var v2 time.Time + _, _, _ = v0, v1, v2 } } @@ -87,17 +83,16 @@ func (x *PolicyRule) CodecEncodeSelf(e *codec1978.Encoder) { } else { yysep2 := !z.EncBinary() yy2arr2 := z.EncBasicHandle().StructToArray - var yyq2 [6]bool + var yyq2 [5]bool _, _, _ = yysep2, yyq2, yy2arr2 const yyr2 bool = false - yyq2[1] = true - yyq2[2] = len(x.APIGroups) != 0 - yyq2[3] = len(x.Resources) != 0 - yyq2[4] = len(x.ResourceNames) != 0 - yyq2[5] = len(x.NonResourceURLs) != 0 + yyq2[1] = len(x.APIGroups) != 0 + yyq2[2] = len(x.Resources) != 0 + yyq2[3] = len(x.ResourceNames) != 0 + yyq2[4] = len(x.NonResourceURLs) != 0 var yynn2 int if yyr2 || yy2arr2 { - r.EncodeArrayStart(6) + r.EncodeArrayStart(5) } else { yynn2 = 1 for _, b := range yyq2 { @@ -138,62 +133,29 @@ func (x *PolicyRule) CodecEncodeSelf(e *codec1978.Encoder) { if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[1] { - yy7 := &x.AttributeRestrictions - yym8 := z.EncBinary() - _ = yym8 - if false { - } else if z.HasExtensions() && z.EncExt(yy7) { - } else if !yym8 && z.IsJSONHandle() { - z.EncJSONMarshal(yy7) + if x.APIGroups == nil { + r.EncodeNil() } else { - z.EncFallback(yy7) + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + z.F.EncSliceStringV(x.APIGroups, false, e) + } } } else { r.EncodeNil() } } else { if yyq2[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("attributeRestrictions")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy9 := &x.AttributeRestrictions - yym10 := z.EncBinary() - _ = yym10 - if false { - } else if z.HasExtensions() && z.EncExt(yy9) { - } else if !yym10 && z.IsJSONHandle() { - z.EncJSONMarshal(yy9) - } else { - z.EncFallback(yy9) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[2] { - if x.APIGroups == nil { - r.EncodeNil() - } else { - yym12 := z.EncBinary() - _ = yym12 - if false { - } else { - z.F.EncSliceStringV(x.APIGroups, false, e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiGroups")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.APIGroups == nil { r.EncodeNil() } else { - yym13 := z.EncBinary() - _ = yym13 + yym8 := z.EncBinary() + _ = yym8 if false { } else { z.F.EncSliceStringV(x.APIGroups, false, e) @@ -203,12 +165,12 @@ func (x *PolicyRule) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[3] { + if yyq2[2] { if x.Resources == nil { r.EncodeNil() } else { - yym15 := z.EncBinary() - _ = yym15 + yym10 := z.EncBinary() + _ = yym10 if false { } else { z.F.EncSliceStringV(x.Resources, false, e) @@ -218,15 +180,15 @@ func (x *PolicyRule) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq2[3] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("resources")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Resources == nil { r.EncodeNil() } else { - yym16 := z.EncBinary() - _ = yym16 + yym11 := z.EncBinary() + _ = yym11 if false { } else { z.F.EncSliceStringV(x.Resources, false, e) @@ -236,12 +198,12 @@ func (x *PolicyRule) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[4] { + if yyq2[3] { if x.ResourceNames == nil { r.EncodeNil() } else { - yym18 := z.EncBinary() - _ = yym18 + yym13 := z.EncBinary() + _ = yym13 if false { } else { z.F.EncSliceStringV(x.ResourceNames, false, e) @@ -251,15 +213,15 @@ func (x *PolicyRule) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq2[4] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("resourceNames")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.ResourceNames == nil { r.EncodeNil() } else { - yym19 := z.EncBinary() - _ = yym19 + yym14 := z.EncBinary() + _ = yym14 if false { } else { z.F.EncSliceStringV(x.ResourceNames, false, e) @@ -269,12 +231,12 @@ func (x *PolicyRule) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[5] { + if yyq2[4] { if x.NonResourceURLs == nil { r.EncodeNil() } else { - yym21 := z.EncBinary() - _ = yym21 + yym16 := z.EncBinary() + _ = yym16 if false { } else { z.F.EncSliceStringV(x.NonResourceURLs, false, e) @@ -284,15 +246,15 @@ func (x *PolicyRule) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq2[5] { + if yyq2[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("nonResourceURLs")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.NonResourceURLs == nil { r.EncodeNil() } else { - yym22 := z.EncBinary() - _ = yym22 + yym17 := z.EncBinary() + _ = yym17 if false { } else { z.F.EncSliceStringV(x.NonResourceURLs, false, e) @@ -373,26 +335,23 @@ func (x *PolicyRule) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { z.F.DecSliceStringX(yyv4, false, d) } } - case "attributeRestrictions": - if r.TryDecodeAsNil() { - x.AttributeRestrictions = pkg1_runtime.RawExtension{} - } else { - yyv6 := &x.AttributeRestrictions - yym7 := z.DecBinary() - _ = yym7 - if false { - } else if z.HasExtensions() && z.DecExt(yyv6) { - } else if !yym7 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv6) - } else { - z.DecFallback(yyv6, false) - } - } case "apiGroups": if r.TryDecodeAsNil() { x.APIGroups = nil } else { - yyv8 := &x.APIGroups + yyv6 := &x.APIGroups + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + z.F.DecSliceStringX(yyv6, false, d) + } + } + case "resources": + if r.TryDecodeAsNil() { + x.Resources = nil + } else { + yyv8 := &x.Resources yym9 := z.DecBinary() _ = yym9 if false { @@ -400,11 +359,11 @@ func (x *PolicyRule) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { z.F.DecSliceStringX(yyv8, false, d) } } - case "resources": + case "resourceNames": if r.TryDecodeAsNil() { - x.Resources = nil + x.ResourceNames = nil } else { - yyv10 := &x.Resources + yyv10 := &x.ResourceNames yym11 := z.DecBinary() _ = yym11 if false { @@ -412,11 +371,11 @@ func (x *PolicyRule) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { z.F.DecSliceStringX(yyv10, false, d) } } - case "resourceNames": + case "nonResourceURLs": if r.TryDecodeAsNil() { - x.ResourceNames = nil + x.NonResourceURLs = nil } else { - yyv12 := &x.ResourceNames + yyv12 := &x.NonResourceURLs yym13 := z.DecBinary() _ = yym13 if false { @@ -424,18 +383,6 @@ func (x *PolicyRule) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { z.F.DecSliceStringX(yyv12, false, d) } } - case "nonResourceURLs": - if r.TryDecodeAsNil() { - x.NonResourceURLs = nil - } else { - yyv14 := &x.NonResourceURLs - yym15 := z.DecBinary() - _ = yym15 - if false { - } else { - z.F.DecSliceStringX(yyv14, false, d) - } - } default: z.DecStructFieldNotFound(-1, yys3) } // end switch yys3 @@ -447,16 +394,16 @@ func (x *PolicyRule) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj16 int - var yyb16 bool - var yyhl16 bool = l >= 0 - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l + var yyj14 int + var yyb14 bool + var yyhl14 bool = l >= 0 + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb16 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb16 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -464,46 +411,21 @@ func (x *PolicyRule) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Verbs = nil } else { - yyv17 := &x.Verbs - yym18 := z.DecBinary() - _ = yym18 + yyv15 := &x.Verbs + yym16 := z.DecBinary() + _ = yym16 if false { } else { - z.F.DecSliceStringX(yyv17, false, d) + z.F.DecSliceStringX(yyv15, false, d) } } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb16 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb16 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.AttributeRestrictions = pkg1_runtime.RawExtension{} - } else { - yyv19 := &x.AttributeRestrictions - yym20 := z.DecBinary() - _ = yym20 - if false { - } else if z.HasExtensions() && z.DecExt(yyv19) { - } else if !yym20 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv19) - } else { - z.DecFallback(yyv19, false) - } - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -511,21 +433,21 @@ func (x *PolicyRule) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIGroups = nil } else { - yyv21 := &x.APIGroups - yym22 := z.DecBinary() - _ = yym22 + yyv17 := &x.APIGroups + yym18 := z.DecBinary() + _ = yym18 if false { } else { - z.F.DecSliceStringX(yyv21, false, d) + z.F.DecSliceStringX(yyv17, false, d) } } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb16 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb16 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -533,21 +455,21 @@ func (x *PolicyRule) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Resources = nil } else { - yyv23 := &x.Resources - yym24 := z.DecBinary() - _ = yym24 + yyv19 := &x.Resources + yym20 := z.DecBinary() + _ = yym20 if false { } else { - z.F.DecSliceStringX(yyv23, false, d) + z.F.DecSliceStringX(yyv19, false, d) } } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb16 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb16 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -555,21 +477,21 @@ func (x *PolicyRule) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ResourceNames = nil } else { - yyv25 := &x.ResourceNames - yym26 := z.DecBinary() - _ = yym26 + yyv21 := &x.ResourceNames + yym22 := z.DecBinary() + _ = yym22 if false { } else { - z.F.DecSliceStringX(yyv25, false, d) + z.F.DecSliceStringX(yyv21, false, d) } } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb16 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb16 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -577,26 +499,26 @@ func (x *PolicyRule) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.NonResourceURLs = nil } else { - yyv27 := &x.NonResourceURLs - yym28 := z.DecBinary() - _ = yym28 + yyv23 := &x.NonResourceURLs + yym24 := z.DecBinary() + _ = yym24 if false { } else { - z.F.DecSliceStringX(yyv27, false, d) + z.F.DecSliceStringX(yyv23, false, d) } } for { - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb16 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb16 { + if yyb14 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj16-1, "") + z.DecStructFieldNotFound(yyj14-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -1315,7 +1237,13 @@ func (x *Role) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -1325,7 +1253,13 @@ func (x *Role) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -1442,21 +1376,27 @@ func (x *Role) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg3_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "rules": if r.TryDecodeAsNil() { x.Rules = nil } else { - yyv9 := &x.Rules - yym10 := z.DecBinary() - _ = yym10 + yyv10 := &x.Rules + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decSlicePolicyRule((*[]PolicyRule)(yyv9), d) + h.decSlicePolicyRule((*[]PolicyRule)(yyv10), d) } } default: @@ -1470,16 +1410,16 @@ func (x *Role) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1487,21 +1427,21 @@ func (x *Role) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1509,38 +1449,44 @@ func (x *Role) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg3_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1548,26 +1494,26 @@ func (x *Role) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Rules = nil } else { - yyv17 := &x.Rules - yym18 := z.DecBinary() - _ = yym18 + yyv19 := &x.Rules + yym20 := z.DecBinary() + _ = yym20 if false { } else { - h.decSlicePolicyRule((*[]PolicyRule)(yyv17), d) + h.decSlicePolicyRule((*[]PolicyRule)(yyv19), d) } } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -1659,7 +1605,13 @@ func (x *RoleBinding) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -1669,7 +1621,13 @@ func (x *RoleBinding) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -1797,29 +1755,35 @@ func (x *RoleBinding) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg3_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "subjects": if r.TryDecodeAsNil() { x.Subjects = nil } else { - yyv9 := &x.Subjects - yym10 := z.DecBinary() - _ = yym10 + yyv10 := &x.Subjects + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decSliceSubject((*[]Subject)(yyv9), d) + h.decSliceSubject((*[]Subject)(yyv10), d) } } case "roleRef": if r.TryDecodeAsNil() { x.RoleRef = RoleRef{} } else { - yyv11 := &x.RoleRef - yyv11.CodecDecodeSelf(d) + yyv12 := &x.RoleRef + yyv12.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -1832,16 +1796,16 @@ func (x *RoleBinding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj12 int - var yyb12 bool - var yyhl12 bool = l >= 0 - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l + var yyj13 int + var yyb13 bool + var yyhl13 bool = l >= 0 + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb12 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb12 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1849,21 +1813,21 @@ func (x *RoleBinding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv13 := &x.Kind - yym14 := z.DecBinary() - _ = yym14 + yyv14 := &x.Kind + yym15 := z.DecBinary() + _ = yym15 if false { } else { - *((*string)(yyv13)) = r.DecodeString() + *((*string)(yyv14)) = r.DecodeString() } } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb12 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb12 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1871,38 +1835,44 @@ func (x *RoleBinding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv15 := &x.APIVersion - yym16 := z.DecBinary() - _ = yym16 + yyv16 := &x.APIVersion + yym17 := z.DecBinary() + _ = yym17 if false { } else { - *((*string)(yyv15)) = r.DecodeString() + *((*string)(yyv16)) = r.DecodeString() } } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb12 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb12 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg3_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv17 := &x.ObjectMeta - yyv17.CodecDecodeSelf(d) + yyv18 := &x.ObjectMeta + yym19 := z.DecBinary() + _ = yym19 + if false { + } else if z.HasExtensions() && z.DecExt(yyv18) { + } else { + z.DecFallback(yyv18, false) + } } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb12 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb12 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1910,21 +1880,21 @@ func (x *RoleBinding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Subjects = nil } else { - yyv18 := &x.Subjects - yym19 := z.DecBinary() - _ = yym19 + yyv20 := &x.Subjects + yym21 := z.DecBinary() + _ = yym21 if false { } else { - h.decSliceSubject((*[]Subject)(yyv18), d) + h.decSliceSubject((*[]Subject)(yyv20), d) } } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb12 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb12 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1932,21 +1902,21 @@ func (x *RoleBinding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.RoleRef = RoleRef{} } else { - yyv20 := &x.RoleRef - yyv20.CodecDecodeSelf(d) + yyv22 := &x.RoleRef + yyv22.CodecDecodeSelf(d) } for { - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb12 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb12 { + if yyb13 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj12-1, "") + z.DecStructFieldNotFound(yyj13-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -2177,7 +2147,7 @@ func (x *RoleBindingList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ListMeta = pkg2_v1.ListMeta{} + x.ListMeta = pkg1_v1.ListMeta{} } else { yyv8 := &x.ListMeta yym9 := z.DecBinary() @@ -2270,7 +2240,7 @@ func (x *RoleBindingList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ListMeta = pkg2_v1.ListMeta{} + x.ListMeta = pkg1_v1.ListMeta{} } else { yyv17 := &x.ListMeta yym18 := z.DecBinary() @@ -2545,7 +2515,7 @@ func (x *RoleList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ListMeta = pkg2_v1.ListMeta{} + x.ListMeta = pkg1_v1.ListMeta{} } else { yyv8 := &x.ListMeta yym9 := z.DecBinary() @@ -2638,7 +2608,7 @@ func (x *RoleList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ListMeta = pkg2_v1.ListMeta{} + x.ListMeta = pkg1_v1.ListMeta{} } else { yyv17 := &x.ListMeta yym18 := z.DecBinary() @@ -2774,7 +2744,13 @@ func (x *ClusterRole) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -2784,7 +2760,13 @@ func (x *ClusterRole) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -2901,21 +2883,27 @@ func (x *ClusterRole) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg3_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "rules": if r.TryDecodeAsNil() { x.Rules = nil } else { - yyv9 := &x.Rules - yym10 := z.DecBinary() - _ = yym10 + yyv10 := &x.Rules + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decSlicePolicyRule((*[]PolicyRule)(yyv9), d) + h.decSlicePolicyRule((*[]PolicyRule)(yyv10), d) } } default: @@ -2929,16 +2917,16 @@ func (x *ClusterRole) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2946,21 +2934,21 @@ func (x *ClusterRole) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2968,38 +2956,44 @@ func (x *ClusterRole) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg3_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3007,26 +3001,26 @@ func (x *ClusterRole) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Rules = nil } else { - yyv17 := &x.Rules - yym18 := z.DecBinary() - _ = yym18 + yyv19 := &x.Rules + yym20 := z.DecBinary() + _ = yym20 if false { } else { - h.decSlicePolicyRule((*[]PolicyRule)(yyv17), d) + h.decSlicePolicyRule((*[]PolicyRule)(yyv19), d) } } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -3118,7 +3112,13 @@ func (x *ClusterRoleBinding) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -3128,7 +3128,13 @@ func (x *ClusterRoleBinding) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -3256,29 +3262,35 @@ func (x *ClusterRoleBinding) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg3_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "subjects": if r.TryDecodeAsNil() { x.Subjects = nil } else { - yyv9 := &x.Subjects - yym10 := z.DecBinary() - _ = yym10 + yyv10 := &x.Subjects + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decSliceSubject((*[]Subject)(yyv9), d) + h.decSliceSubject((*[]Subject)(yyv10), d) } } case "roleRef": if r.TryDecodeAsNil() { x.RoleRef = RoleRef{} } else { - yyv11 := &x.RoleRef - yyv11.CodecDecodeSelf(d) + yyv12 := &x.RoleRef + yyv12.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -3291,16 +3303,16 @@ func (x *ClusterRoleBinding) codecDecodeSelfFromArray(l int, d *codec1978.Decode var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj12 int - var yyb12 bool - var yyhl12 bool = l >= 0 - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l + var yyj13 int + var yyb13 bool + var yyhl13 bool = l >= 0 + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb12 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb12 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3308,21 +3320,21 @@ func (x *ClusterRoleBinding) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv13 := &x.Kind - yym14 := z.DecBinary() - _ = yym14 + yyv14 := &x.Kind + yym15 := z.DecBinary() + _ = yym15 if false { } else { - *((*string)(yyv13)) = r.DecodeString() + *((*string)(yyv14)) = r.DecodeString() } } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb12 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb12 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3330,38 +3342,44 @@ func (x *ClusterRoleBinding) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv15 := &x.APIVersion - yym16 := z.DecBinary() - _ = yym16 + yyv16 := &x.APIVersion + yym17 := z.DecBinary() + _ = yym17 if false { } else { - *((*string)(yyv15)) = r.DecodeString() + *((*string)(yyv16)) = r.DecodeString() } } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb12 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb12 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg3_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv17 := &x.ObjectMeta - yyv17.CodecDecodeSelf(d) + yyv18 := &x.ObjectMeta + yym19 := z.DecBinary() + _ = yym19 + if false { + } else if z.HasExtensions() && z.DecExt(yyv18) { + } else { + z.DecFallback(yyv18, false) + } } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb12 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb12 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3369,21 +3387,21 @@ func (x *ClusterRoleBinding) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.Subjects = nil } else { - yyv18 := &x.Subjects - yym19 := z.DecBinary() - _ = yym19 + yyv20 := &x.Subjects + yym21 := z.DecBinary() + _ = yym21 if false { } else { - h.decSliceSubject((*[]Subject)(yyv18), d) + h.decSliceSubject((*[]Subject)(yyv20), d) } } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb12 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb12 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3391,21 +3409,21 @@ func (x *ClusterRoleBinding) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.RoleRef = RoleRef{} } else { - yyv20 := &x.RoleRef - yyv20.CodecDecodeSelf(d) + yyv22 := &x.RoleRef + yyv22.CodecDecodeSelf(d) } for { - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb12 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb12 { + if yyb13 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj12-1, "") + z.DecStructFieldNotFound(yyj13-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -3636,7 +3654,7 @@ func (x *ClusterRoleBindingList) codecDecodeSelfFromMap(l int, d *codec1978.Deco } case "metadata": if r.TryDecodeAsNil() { - x.ListMeta = pkg2_v1.ListMeta{} + x.ListMeta = pkg1_v1.ListMeta{} } else { yyv8 := &x.ListMeta yym9 := z.DecBinary() @@ -3729,7 +3747,7 @@ func (x *ClusterRoleBindingList) codecDecodeSelfFromArray(l int, d *codec1978.De } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ListMeta = pkg2_v1.ListMeta{} + x.ListMeta = pkg1_v1.ListMeta{} } else { yyv17 := &x.ListMeta yym18 := z.DecBinary() @@ -4004,7 +4022,7 @@ func (x *ClusterRoleList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ListMeta = pkg2_v1.ListMeta{} + x.ListMeta = pkg1_v1.ListMeta{} } else { yyv8 := &x.ListMeta yym9 := z.DecBinary() @@ -4097,7 +4115,7 @@ func (x *ClusterRoleList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ListMeta = pkg2_v1.ListMeta{} + x.ListMeta = pkg1_v1.ListMeta{} } else { yyv17 := &x.ListMeta yym18 := z.DecBinary() @@ -4185,7 +4203,7 @@ func (x codecSelfer1234) decSlicePolicyRule(v *[]PolicyRule, d *codec1978.Decode yyrg1 := len(yyv1) > 0 yyv21 := yyv1 - yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 160) + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 120) if yyrt1 { if yyrl1 <= cap(yyv1) { yyv1 = yyv1[:yyrl1] diff --git a/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/types.go b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/types.go index 06d63283..6649d601 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/types.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/types.go @@ -18,8 +18,6 @@ package v1alpha1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/kubernetes/pkg/api/v1" ) // Authorization is calculated against @@ -48,10 +46,6 @@ const ( type PolicyRule struct { // Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds. Verbs []string `json:"verbs" protobuf:"bytes,1,rep,name=verbs"` - // AttributeRestrictions will vary depending on what the Authorizer/AuthorizationAttributeBuilder pair supports. - // If the Authorizer does not recognize how to handle the AttributeRestrictions, the Authorizer should report an error. - // +optional - AttributeRestrictions runtime.RawExtension `json:"attributeRestrictions,omitempty" protobuf:"bytes,2,opt,name=attributeRestrictions"` // APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of // the enumerated resources in any API group will be allowed. @@ -106,7 +100,7 @@ type Role struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Rules holds all the PolicyRules for this Role Rules []PolicyRule `json:"rules" protobuf:"bytes,2,rep,name=rules"` @@ -121,7 +115,7 @@ type RoleBinding struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Subjects holds references to the objects the role applies to. Subjects []Subject `json:"subjects" protobuf:"bytes,2,rep,name=subjects"` @@ -161,7 +155,7 @@ type ClusterRole struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Rules holds all the PolicyRules for this ClusterRole Rules []PolicyRule `json:"rules" protobuf:"bytes,2,rep,name=rules"` @@ -176,7 +170,7 @@ type ClusterRoleBinding struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Subjects holds references to the objects the role applies to. Subjects []Subject `json:"subjects" protobuf:"bytes,2,rep,name=subjects"` diff --git a/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/types_swagger_doc_generated.go b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/types_swagger_doc_generated.go index 633bae97..79cc0294 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/types_swagger_doc_generated.go @@ -69,13 +69,12 @@ func (ClusterRoleList) SwaggerDoc() map[string]string { } var map_PolicyRule = map[string]string{ - "": "PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.", - "verbs": "Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.", - "attributeRestrictions": "AttributeRestrictions will vary depending on what the Authorizer/AuthorizationAttributeBuilder pair supports. If the Authorizer does not recognize how to handle the AttributeRestrictions, the Authorizer should report an error.", - "apiGroups": "APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed.", - "resources": "Resources is a list of resources this rule applies to. ResourceAll represents all resources.", - "resourceNames": "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.", - "nonResourceURLs": "NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path This name is intentionally different than the internal type so that the DefaultConvert works nicely and because the ordering may be different. Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as \"pods\" or \"secrets\") or non-resource URL paths (such as \"/api\"), but not both.", + "": "PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.", + "verbs": "Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.", + "apiGroups": "APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed.", + "resources": "Resources is a list of resources this rule applies to. ResourceAll represents all resources.", + "resourceNames": "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.", + "nonResourceURLs": "NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path This name is intentionally different than the internal type so that the DefaultConvert works nicely and because the ordering may be different. Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as \"pods\" or \"secrets\") or non-resource URL paths (such as \"/api\"), but not both.", } func (PolicyRule) SwaggerDoc() map[string]string { diff --git a/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/zz_generated.conversion.go index 3ec38549..f76ce9dd 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/zz_generated.conversion.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/zz_generated.conversion.go @@ -65,21 +65,8 @@ func RegisterConversions(scheme *runtime.Scheme) error { } func autoConvert_v1alpha1_ClusterRole_To_rbac_ClusterRole(in *ClusterRole, out *rbac.ClusterRole, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } - if in.Rules != nil { - in, out := &in.Rules, &out.Rules - *out = make([]rbac.PolicyRule, len(*in)) - for i := range *in { - if err := Convert_v1alpha1_PolicyRule_To_rbac_PolicyRule(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Rules = nil - } + out.ObjectMeta = in.ObjectMeta + out.Rules = *(*[]rbac.PolicyRule)(unsafe.Pointer(&in.Rules)) return nil } @@ -88,21 +75,8 @@ func Convert_v1alpha1_ClusterRole_To_rbac_ClusterRole(in *ClusterRole, out *rbac } func autoConvert_rbac_ClusterRole_To_v1alpha1_ClusterRole(in *rbac.ClusterRole, out *ClusterRole, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } - if in.Rules != nil { - in, out := &in.Rules, &out.Rules - *out = make([]PolicyRule, len(*in)) - for i := range *in { - if err := Convert_rbac_PolicyRule_To_v1alpha1_PolicyRule(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Rules = nil - } + out.ObjectMeta = in.ObjectMeta + out.Rules = *(*[]PolicyRule)(unsafe.Pointer(&in.Rules)) return nil } @@ -111,10 +85,7 @@ func Convert_rbac_ClusterRole_To_v1alpha1_ClusterRole(in *rbac.ClusterRole, out } func autoConvert_v1alpha1_ClusterRoleBinding_To_rbac_ClusterRoleBinding(in *ClusterRoleBinding, out *rbac.ClusterRoleBinding, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if in.Subjects != nil { in, out := &in.Subjects, &out.Subjects *out = make([]rbac.Subject, len(*in)) @@ -137,10 +108,7 @@ func Convert_v1alpha1_ClusterRoleBinding_To_rbac_ClusterRoleBinding(in *ClusterR } func autoConvert_rbac_ClusterRoleBinding_To_v1alpha1_ClusterRoleBinding(in *rbac.ClusterRoleBinding, out *ClusterRoleBinding, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if in.Subjects != nil { in, out := &in.Subjects, &out.Subjects *out = make([]Subject, len(*in)) @@ -226,17 +194,7 @@ func Convert_rbac_ClusterRoleBindingList_To_v1alpha1_ClusterRoleBindingList(in * func autoConvert_v1alpha1_ClusterRoleList_To_rbac_ClusterRoleList(in *ClusterRoleList, out *rbac.ClusterRoleList, s conversion.Scope) error { out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]rbac.ClusterRole, len(*in)) - for i := range *in { - if err := Convert_v1alpha1_ClusterRole_To_rbac_ClusterRole(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } + out.Items = *(*[]rbac.ClusterRole)(unsafe.Pointer(&in.Items)) return nil } @@ -246,17 +204,7 @@ func Convert_v1alpha1_ClusterRoleList_To_rbac_ClusterRoleList(in *ClusterRoleLis func autoConvert_rbac_ClusterRoleList_To_v1alpha1_ClusterRoleList(in *rbac.ClusterRoleList, out *ClusterRoleList, s conversion.Scope) error { out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ClusterRole, len(*in)) - for i := range *in { - if err := Convert_rbac_ClusterRole_To_v1alpha1_ClusterRole(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } + out.Items = *(*[]ClusterRole)(unsafe.Pointer(&in.Items)) return nil } @@ -266,9 +214,6 @@ func Convert_rbac_ClusterRoleList_To_v1alpha1_ClusterRoleList(in *rbac.ClusterRo func autoConvert_v1alpha1_PolicyRule_To_rbac_PolicyRule(in *PolicyRule, out *rbac.PolicyRule, s conversion.Scope) error { out.Verbs = *(*[]string)(unsafe.Pointer(&in.Verbs)) - if err := runtime.Convert_runtime_RawExtension_To_runtime_Object(&in.AttributeRestrictions, &out.AttributeRestrictions, s); err != nil { - return err - } out.APIGroups = *(*[]string)(unsafe.Pointer(&in.APIGroups)) out.Resources = *(*[]string)(unsafe.Pointer(&in.Resources)) out.ResourceNames = *(*[]string)(unsafe.Pointer(&in.ResourceNames)) @@ -282,9 +227,6 @@ func Convert_v1alpha1_PolicyRule_To_rbac_PolicyRule(in *PolicyRule, out *rbac.Po func autoConvert_rbac_PolicyRule_To_v1alpha1_PolicyRule(in *rbac.PolicyRule, out *PolicyRule, s conversion.Scope) error { out.Verbs = *(*[]string)(unsafe.Pointer(&in.Verbs)) - if err := runtime.Convert_runtime_Object_To_runtime_RawExtension(&in.AttributeRestrictions, &out.AttributeRestrictions, s); err != nil { - return err - } out.APIGroups = *(*[]string)(unsafe.Pointer(&in.APIGroups)) out.Resources = *(*[]string)(unsafe.Pointer(&in.Resources)) out.ResourceNames = *(*[]string)(unsafe.Pointer(&in.ResourceNames)) @@ -319,21 +261,8 @@ func Convert_rbac_PolicyRuleBuilder_To_v1alpha1_PolicyRuleBuilder(in *rbac.Polic } func autoConvert_v1alpha1_Role_To_rbac_Role(in *Role, out *rbac.Role, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } - if in.Rules != nil { - in, out := &in.Rules, &out.Rules - *out = make([]rbac.PolicyRule, len(*in)) - for i := range *in { - if err := Convert_v1alpha1_PolicyRule_To_rbac_PolicyRule(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Rules = nil - } + out.ObjectMeta = in.ObjectMeta + out.Rules = *(*[]rbac.PolicyRule)(unsafe.Pointer(&in.Rules)) return nil } @@ -342,21 +271,8 @@ func Convert_v1alpha1_Role_To_rbac_Role(in *Role, out *rbac.Role, s conversion.S } func autoConvert_rbac_Role_To_v1alpha1_Role(in *rbac.Role, out *Role, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } - if in.Rules != nil { - in, out := &in.Rules, &out.Rules - *out = make([]PolicyRule, len(*in)) - for i := range *in { - if err := Convert_rbac_PolicyRule_To_v1alpha1_PolicyRule(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Rules = nil - } + out.ObjectMeta = in.ObjectMeta + out.Rules = *(*[]PolicyRule)(unsafe.Pointer(&in.Rules)) return nil } @@ -365,10 +281,7 @@ func Convert_rbac_Role_To_v1alpha1_Role(in *rbac.Role, out *Role, s conversion.S } func autoConvert_v1alpha1_RoleBinding_To_rbac_RoleBinding(in *RoleBinding, out *rbac.RoleBinding, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if in.Subjects != nil { in, out := &in.Subjects, &out.Subjects *out = make([]rbac.Subject, len(*in)) @@ -391,10 +304,7 @@ func Convert_v1alpha1_RoleBinding_To_rbac_RoleBinding(in *RoleBinding, out *rbac } func autoConvert_rbac_RoleBinding_To_v1alpha1_RoleBinding(in *rbac.RoleBinding, out *RoleBinding, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if in.Subjects != nil { in, out := &in.Subjects, &out.Subjects *out = make([]Subject, len(*in)) @@ -458,17 +368,7 @@ func Convert_rbac_RoleBindingList_To_v1alpha1_RoleBindingList(in *rbac.RoleBindi func autoConvert_v1alpha1_RoleList_To_rbac_RoleList(in *RoleList, out *rbac.RoleList, s conversion.Scope) error { out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]rbac.Role, len(*in)) - for i := range *in { - if err := Convert_v1alpha1_Role_To_rbac_Role(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } + out.Items = *(*[]rbac.Role)(unsafe.Pointer(&in.Items)) return nil } @@ -478,17 +378,7 @@ func Convert_v1alpha1_RoleList_To_rbac_RoleList(in *RoleList, out *rbac.RoleList func autoConvert_rbac_RoleList_To_v1alpha1_RoleList(in *rbac.RoleList, out *RoleList, s conversion.Scope) error { out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Role, len(*in)) - for i := range *in { - if err := Convert_rbac_Role_To_v1alpha1_Role(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } + out.Items = *(*[]Role)(unsafe.Pointer(&in.Items)) return nil } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/zz_generated.deepcopy.go index 43d11509..f4dfd3ca 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1alpha1/zz_generated.deepcopy.go @@ -21,9 +21,9 @@ limitations under the License. package v1alpha1 import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - v1 "k8s.io/kubernetes/pkg/api/v1" reflect "reflect" ) @@ -54,8 +54,10 @@ func DeepCopy_v1alpha1_ClusterRole(in interface{}, out interface{}, c *conversio in := in.(*ClusterRole) out := out.(*ClusterRole) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.Rules != nil { in, out := &in.Rules, &out.Rules @@ -75,15 +77,15 @@ func DeepCopy_v1alpha1_ClusterRoleBinding(in interface{}, out interface{}, c *co in := in.(*ClusterRoleBinding) out := out.(*ClusterRoleBinding) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.Subjects != nil { in, out := &in.Subjects, &out.Subjects *out = make([]Subject, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } @@ -135,11 +137,6 @@ func DeepCopy_v1alpha1_PolicyRule(in interface{}, out interface{}, c *conversion *out = make([]string, len(*in)) copy(*out, *in) } - if newVal, err := c.DeepCopy(&in.AttributeRestrictions); err != nil { - return err - } else { - out.AttributeRestrictions = *newVal.(*runtime.RawExtension) - } if in.APIGroups != nil { in, out := &in.APIGroups, &out.APIGroups *out = make([]string, len(*in)) @@ -169,8 +166,10 @@ func DeepCopy_v1alpha1_Role(in interface{}, out interface{}, c *conversion.Clone in := in.(*Role) out := out.(*Role) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.Rules != nil { in, out := &in.Rules, &out.Rules @@ -190,15 +189,15 @@ func DeepCopy_v1alpha1_RoleBinding(in interface{}, out interface{}, c *conversio in := in.(*RoleBinding) out := out.(*RoleBinding) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.Subjects != nil { in, out := &in.Subjects, &out.Subjects *out = make([]Subject, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } diff --git a/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/v1/BUILD b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/BUILD similarity index 57% rename from vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/v1/BUILD rename to vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/BUILD index dbae4de1..9794c8ae 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/v1/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/BUILD @@ -10,16 +10,28 @@ load( go_library( name = "go_default_library", srcs = [ - "conversion.go", + "defaults.go", + "doc.go", + "generated.pb.go", + "helpers.go", "register.go", + "types.generated.go", "types.go", + "types_swagger_doc_generated.go", + "zz_generated.conversion.go", + "zz_generated.deepcopy.go", + "zz_generated.defaults.go", ], tags = ["automanaged"], deps = [ - "//pkg/client/unversioned/clientcmd/api:go_default_library", + "//pkg/apis/rbac:go_default_library", + "//vendor:github.com/gogo/protobuf/proto", + "//vendor:github.com/ugorji/go/codec", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/conversion", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", + "//vendor:k8s.io/apimachinery/pkg/types", ], ) diff --git a/vendor/k8s.io/kubernetes/federation/apis/core/defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/defaults.go similarity index 62% rename from vendor/k8s.io/kubernetes/federation/apis/core/defaults.go rename to vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/defaults.go index a66093fa..76638eef 100644 --- a/vendor/k8s.io/kubernetes/federation/apis/core/defaults.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/defaults.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,24 +14,27 @@ See the License for the specific language governing permissions and limitations under the License. */ -package core +package v1beta1 import ( - "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" - "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/fields" ) func addDefaultingFuncs(scheme *runtime.Scheme) error { + RegisterDefaults(scheme) return scheme.AddDefaultingFuncs( - func(obj *api.ListOptions) { - if obj.LabelSelector == nil { - obj.LabelSelector = labels.Everything() - } - if obj.FieldSelector == nil { - obj.FieldSelector = fields.Everything() - } - }, + SetDefaults_ClusterRoleBinding, + SetDefaults_RoleBinding, ) } + +func SetDefaults_ClusterRoleBinding(obj *ClusterRoleBinding) { + if len(obj.RoleRef.APIGroup) == 0 { + obj.RoleRef.APIGroup = GroupName + } +} +func SetDefaults_RoleBinding(obj *RoleBinding) { + if len(obj.RoleRef.APIGroup) == 0 { + obj.RoleRef.APIGroup = GroupName + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/doc.go b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/doc.go similarity index 68% rename from vendor/k8s.io/kubernetes/pkg/apis/meta/v1/doc.go rename to vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/doc.go index 045c600e..3339c256 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/meta/v1/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ See the License for the specific language governing permissions and limitations under the License. */ -// +k8s:deepcopy-gen=package -// +k8s:openapi-gen=false +// +k8s:deepcopy-gen=package,register +// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/rbac +// +k8s:openapi-gen=true // +k8s:defaulter-gen=TypeMeta -// +groupName=meta.k8s.io -package v1 +// +groupName=rbac.authorization.k8s.io +package v1beta1 // import "k8s.io/kubernetes/pkg/apis/rbac/v1beta1" diff --git a/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/generated.pb.go b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/generated.pb.go new file mode 100644 index 00000000..ac6306d3 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/generated.pb.go @@ -0,0 +1,2817 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by protoc-gen-gogo. +// source: k8s.io/kubernetes/pkg/apis/rbac/v1beta1/generated.proto +// DO NOT EDIT! + +/* + Package v1beta1 is a generated protocol buffer package. + + It is generated from these files: + k8s.io/kubernetes/pkg/apis/rbac/v1beta1/generated.proto + + It has these top-level messages: + ClusterRole + ClusterRoleBinding + ClusterRoleBindingBuilder + ClusterRoleBindingList + ClusterRoleList + PolicyRule + PolicyRuleBuilder + Role + RoleBinding + RoleBindingList + RoleList + RoleRef + Subject +*/ +package v1beta1 + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +import strings "strings" +import reflect "reflect" + +import io "io" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +const _ = proto.GoGoProtoPackageIsVersion1 + +func (m *ClusterRole) Reset() { *m = ClusterRole{} } +func (*ClusterRole) ProtoMessage() {} +func (*ClusterRole) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} } + +func (m *ClusterRoleBinding) Reset() { *m = ClusterRoleBinding{} } +func (*ClusterRoleBinding) ProtoMessage() {} +func (*ClusterRoleBinding) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} } + +func (m *ClusterRoleBindingBuilder) Reset() { *m = ClusterRoleBindingBuilder{} } +func (*ClusterRoleBindingBuilder) ProtoMessage() {} +func (*ClusterRoleBindingBuilder) Descriptor() ([]byte, []int) { + return fileDescriptorGenerated, []int{2} +} + +func (m *ClusterRoleBindingList) Reset() { *m = ClusterRoleBindingList{} } +func (*ClusterRoleBindingList) ProtoMessage() {} +func (*ClusterRoleBindingList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} } + +func (m *ClusterRoleList) Reset() { *m = ClusterRoleList{} } +func (*ClusterRoleList) ProtoMessage() {} +func (*ClusterRoleList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} } + +func (m *PolicyRule) Reset() { *m = PolicyRule{} } +func (*PolicyRule) ProtoMessage() {} +func (*PolicyRule) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} } + +func (m *PolicyRuleBuilder) Reset() { *m = PolicyRuleBuilder{} } +func (*PolicyRuleBuilder) ProtoMessage() {} +func (*PolicyRuleBuilder) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} } + +func (m *Role) Reset() { *m = Role{} } +func (*Role) ProtoMessage() {} +func (*Role) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} } + +func (m *RoleBinding) Reset() { *m = RoleBinding{} } +func (*RoleBinding) ProtoMessage() {} +func (*RoleBinding) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} } + +func (m *RoleBindingList) Reset() { *m = RoleBindingList{} } +func (*RoleBindingList) ProtoMessage() {} +func (*RoleBindingList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} } + +func (m *RoleList) Reset() { *m = RoleList{} } +func (*RoleList) ProtoMessage() {} +func (*RoleList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{10} } + +func (m *RoleRef) Reset() { *m = RoleRef{} } +func (*RoleRef) ProtoMessage() {} +func (*RoleRef) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{11} } + +func (m *Subject) Reset() { *m = Subject{} } +func (*Subject) ProtoMessage() {} +func (*Subject) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{12} } + +func init() { + proto.RegisterType((*ClusterRole)(nil), "k8s.io.kubernetes.pkg.apis.rbac.v1beta1.ClusterRole") + proto.RegisterType((*ClusterRoleBinding)(nil), "k8s.io.kubernetes.pkg.apis.rbac.v1beta1.ClusterRoleBinding") + proto.RegisterType((*ClusterRoleBindingBuilder)(nil), "k8s.io.kubernetes.pkg.apis.rbac.v1beta1.ClusterRoleBindingBuilder") + proto.RegisterType((*ClusterRoleBindingList)(nil), "k8s.io.kubernetes.pkg.apis.rbac.v1beta1.ClusterRoleBindingList") + proto.RegisterType((*ClusterRoleList)(nil), "k8s.io.kubernetes.pkg.apis.rbac.v1beta1.ClusterRoleList") + proto.RegisterType((*PolicyRule)(nil), "k8s.io.kubernetes.pkg.apis.rbac.v1beta1.PolicyRule") + proto.RegisterType((*PolicyRuleBuilder)(nil), "k8s.io.kubernetes.pkg.apis.rbac.v1beta1.PolicyRuleBuilder") + proto.RegisterType((*Role)(nil), "k8s.io.kubernetes.pkg.apis.rbac.v1beta1.Role") + proto.RegisterType((*RoleBinding)(nil), "k8s.io.kubernetes.pkg.apis.rbac.v1beta1.RoleBinding") + proto.RegisterType((*RoleBindingList)(nil), "k8s.io.kubernetes.pkg.apis.rbac.v1beta1.RoleBindingList") + proto.RegisterType((*RoleList)(nil), "k8s.io.kubernetes.pkg.apis.rbac.v1beta1.RoleList") + proto.RegisterType((*RoleRef)(nil), "k8s.io.kubernetes.pkg.apis.rbac.v1beta1.RoleRef") + proto.RegisterType((*Subject)(nil), "k8s.io.kubernetes.pkg.apis.rbac.v1beta1.Subject") +} +func (m *ClusterRole) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ClusterRole) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) + n1, err := m.ObjectMeta.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n1 + if len(m.Rules) > 0 { + for _, msg := range m.Rules { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *ClusterRoleBinding) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ClusterRoleBinding) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) + n2, err := m.ObjectMeta.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n2 + if len(m.Subjects) > 0 { + for _, msg := range m.Subjects { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.RoleRef.Size())) + n3, err := m.RoleRef.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n3 + return i, nil +} + +func (m *ClusterRoleBindingBuilder) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ClusterRoleBindingBuilder) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.ClusterRoleBinding.Size())) + n4, err := m.ClusterRoleBinding.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n4 + return i, nil +} + +func (m *ClusterRoleBindingList) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ClusterRoleBindingList) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) + n5, err := m.ListMeta.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n5 + if len(m.Items) > 0 { + for _, msg := range m.Items { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *ClusterRoleList) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ClusterRoleList) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) + n6, err := m.ListMeta.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n6 + if len(m.Items) > 0 { + for _, msg := range m.Items { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *PolicyRule) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *PolicyRule) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Verbs) > 0 { + for _, s := range m.Verbs { + data[i] = 0xa + i++ + l = len(s) + for l >= 1<<7 { + data[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + data[i] = uint8(l) + i++ + i += copy(data[i:], s) + } + } + if len(m.APIGroups) > 0 { + for _, s := range m.APIGroups { + data[i] = 0x12 + i++ + l = len(s) + for l >= 1<<7 { + data[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + data[i] = uint8(l) + i++ + i += copy(data[i:], s) + } + } + if len(m.Resources) > 0 { + for _, s := range m.Resources { + data[i] = 0x1a + i++ + l = len(s) + for l >= 1<<7 { + data[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + data[i] = uint8(l) + i++ + i += copy(data[i:], s) + } + } + if len(m.ResourceNames) > 0 { + for _, s := range m.ResourceNames { + data[i] = 0x22 + i++ + l = len(s) + for l >= 1<<7 { + data[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + data[i] = uint8(l) + i++ + i += copy(data[i:], s) + } + } + if len(m.NonResourceURLs) > 0 { + for _, s := range m.NonResourceURLs { + data[i] = 0x2a + i++ + l = len(s) + for l >= 1<<7 { + data[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + data[i] = uint8(l) + i++ + i += copy(data[i:], s) + } + } + return i, nil +} + +func (m *PolicyRuleBuilder) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *PolicyRuleBuilder) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.PolicyRule.Size())) + n7, err := m.PolicyRule.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n7 + return i, nil +} + +func (m *Role) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Role) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) + n8, err := m.ObjectMeta.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n8 + if len(m.Rules) > 0 { + for _, msg := range m.Rules { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *RoleBinding) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *RoleBinding) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) + n9, err := m.ObjectMeta.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n9 + if len(m.Subjects) > 0 { + for _, msg := range m.Subjects { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.RoleRef.Size())) + n10, err := m.RoleRef.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n10 + return i, nil +} + +func (m *RoleBindingList) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *RoleBindingList) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) + n11, err := m.ListMeta.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n11 + if len(m.Items) > 0 { + for _, msg := range m.Items { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *RoleList) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *RoleList) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) + n12, err := m.ListMeta.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n12 + if len(m.Items) > 0 { + for _, msg := range m.Items { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *RoleRef) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *RoleRef) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.APIGroup))) + i += copy(data[i:], m.APIGroup) + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Kind))) + i += copy(data[i:], m.Kind) + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Name))) + i += copy(data[i:], m.Name) + return i, nil +} + +func (m *Subject) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Subject) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Kind))) + i += copy(data[i:], m.Kind) + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.APIVersion))) + i += copy(data[i:], m.APIVersion) + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Name))) + i += copy(data[i:], m.Name) + data[i] = 0x22 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Namespace))) + i += copy(data[i:], m.Namespace) + return i, nil +} + +func encodeFixed64Generated(data []byte, offset int, v uint64) int { + data[offset] = uint8(v) + data[offset+1] = uint8(v >> 8) + data[offset+2] = uint8(v >> 16) + data[offset+3] = uint8(v >> 24) + data[offset+4] = uint8(v >> 32) + data[offset+5] = uint8(v >> 40) + data[offset+6] = uint8(v >> 48) + data[offset+7] = uint8(v >> 56) + return offset + 8 +} +func encodeFixed32Generated(data []byte, offset int, v uint32) int { + data[offset] = uint8(v) + data[offset+1] = uint8(v >> 8) + data[offset+2] = uint8(v >> 16) + data[offset+3] = uint8(v >> 24) + return offset + 4 +} +func encodeVarintGenerated(data []byte, offset int, v uint64) int { + for v >= 1<<7 { + data[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + data[offset] = uint8(v) + return offset + 1 +} +func (m *ClusterRole) Size() (n int) { + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Rules) > 0 { + for _, e := range m.Rules { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *ClusterRoleBinding) Size() (n int) { + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Subjects) > 0 { + for _, e := range m.Subjects { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + l = m.RoleRef.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *ClusterRoleBindingBuilder) Size() (n int) { + var l int + _ = l + l = m.ClusterRoleBinding.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *ClusterRoleBindingList) Size() (n int) { + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *ClusterRoleList) Size() (n int) { + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *PolicyRule) Size() (n int) { + var l int + _ = l + if len(m.Verbs) > 0 { + for _, s := range m.Verbs { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.APIGroups) > 0 { + for _, s := range m.APIGroups { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.Resources) > 0 { + for _, s := range m.Resources { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.ResourceNames) > 0 { + for _, s := range m.ResourceNames { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.NonResourceURLs) > 0 { + for _, s := range m.NonResourceURLs { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *PolicyRuleBuilder) Size() (n int) { + var l int + _ = l + l = m.PolicyRule.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *Role) Size() (n int) { + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Rules) > 0 { + for _, e := range m.Rules { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *RoleBinding) Size() (n int) { + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Subjects) > 0 { + for _, e := range m.Subjects { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + l = m.RoleRef.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *RoleBindingList) Size() (n int) { + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *RoleList) Size() (n int) { + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *RoleRef) Size() (n int) { + var l int + _ = l + l = len(m.APIGroup) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Kind) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *Subject) Size() (n int) { + var l int + _ = l + l = len(m.Kind) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.APIVersion) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Namespace) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func sovGenerated(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozGenerated(x uint64) (n int) { + return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *ClusterRole) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ClusterRole{`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Rules:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Rules), "PolicyRule", "PolicyRule", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ClusterRoleBinding) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ClusterRoleBinding{`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Subjects:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Subjects), "Subject", "Subject", 1), `&`, ``, 1) + `,`, + `RoleRef:` + strings.Replace(strings.Replace(this.RoleRef.String(), "RoleRef", "RoleRef", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ClusterRoleBindingBuilder) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ClusterRoleBindingBuilder{`, + `ClusterRoleBinding:` + strings.Replace(strings.Replace(this.ClusterRoleBinding.String(), "ClusterRoleBinding", "ClusterRoleBinding", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ClusterRoleBindingList) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ClusterRoleBindingList{`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "ClusterRoleBinding", "ClusterRoleBinding", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ClusterRoleList) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ClusterRoleList{`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "ClusterRole", "ClusterRole", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *PolicyRule) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PolicyRule{`, + `Verbs:` + fmt.Sprintf("%v", this.Verbs) + `,`, + `APIGroups:` + fmt.Sprintf("%v", this.APIGroups) + `,`, + `Resources:` + fmt.Sprintf("%v", this.Resources) + `,`, + `ResourceNames:` + fmt.Sprintf("%v", this.ResourceNames) + `,`, + `NonResourceURLs:` + fmt.Sprintf("%v", this.NonResourceURLs) + `,`, + `}`, + }, "") + return s +} +func (this *PolicyRuleBuilder) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PolicyRuleBuilder{`, + `PolicyRule:` + strings.Replace(strings.Replace(this.PolicyRule.String(), "PolicyRule", "PolicyRule", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *Role) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Role{`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Rules:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Rules), "PolicyRule", "PolicyRule", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *RoleBinding) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RoleBinding{`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Subjects:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Subjects), "Subject", "Subject", 1), `&`, ``, 1) + `,`, + `RoleRef:` + strings.Replace(strings.Replace(this.RoleRef.String(), "RoleRef", "RoleRef", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *RoleBindingList) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RoleBindingList{`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "RoleBinding", "RoleBinding", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *RoleList) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RoleList{`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "Role", "Role", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *RoleRef) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RoleRef{`, + `APIGroup:` + fmt.Sprintf("%v", this.APIGroup) + `,`, + `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `}`, + }, "") + return s +} +func (this *Subject) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Subject{`, + `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`, + `APIVersion:` + fmt.Sprintf("%v", this.APIVersion) + `,`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, + `}`, + }, "") + return s +} +func valueToStringGenerated(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *ClusterRole) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ClusterRole: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ClusterRole: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Rules = append(m.Rules, PolicyRule{}) + if err := m.Rules[len(m.Rules)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ClusterRoleBinding) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ClusterRoleBinding: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ClusterRoleBinding: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Subjects", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Subjects = append(m.Subjects, Subject{}) + if err := m.Subjects[len(m.Subjects)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RoleRef", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.RoleRef.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ClusterRoleBindingBuilder) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ClusterRoleBindingBuilder: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ClusterRoleBindingBuilder: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClusterRoleBinding", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ClusterRoleBinding.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ClusterRoleBindingList) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ClusterRoleBindingList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ClusterRoleBindingList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ListMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, ClusterRoleBinding{}) + if err := m.Items[len(m.Items)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ClusterRoleList) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ClusterRoleList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ClusterRoleList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ListMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, ClusterRole{}) + if err := m.Items[len(m.Items)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PolicyRule) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PolicyRule: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PolicyRule: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Verbs", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Verbs = append(m.Verbs, string(data[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field APIGroups", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.APIGroups = append(m.APIGroups, string(data[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Resources = append(m.Resources, string(data[iNdEx:postIndex])) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceNames", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ResourceNames = append(m.ResourceNames, string(data[iNdEx:postIndex])) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonResourceURLs", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NonResourceURLs = append(m.NonResourceURLs, string(data[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PolicyRuleBuilder) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PolicyRuleBuilder: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PolicyRuleBuilder: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PolicyRule", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.PolicyRule.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Role) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Role: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Role: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Rules = append(m.Rules, PolicyRule{}) + if err := m.Rules[len(m.Rules)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RoleBinding) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RoleBinding: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RoleBinding: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Subjects", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Subjects = append(m.Subjects, Subject{}) + if err := m.Subjects[len(m.Subjects)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RoleRef", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.RoleRef.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RoleBindingList) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RoleBindingList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RoleBindingList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ListMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, RoleBinding{}) + if err := m.Items[len(m.Items)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RoleList) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RoleList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RoleList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ListMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, Role{}) + if err := m.Items[len(m.Items)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RoleRef) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RoleRef: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RoleRef: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field APIGroup", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.APIGroup = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Kind = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Subject) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Subject: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Subject: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Kind = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field APIVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.APIVersion = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Namespace = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenerated(data []byte) (n int, err error) { + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if data[iNdEx-1] < 0x80 { + break + } + } + return iNdEx, nil + case 1: + iNdEx += 8 + return iNdEx, nil + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + iNdEx += length + if length < 0 { + return 0, ErrInvalidLengthGenerated + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skipGenerated(data[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + } + return iNdEx, nil + case 4: + return iNdEx, nil + case 5: + iNdEx += 4 + return iNdEx, nil + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + } + panic("unreachable") +} + +var ( + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorGenerated = []byte{ + // 838 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x54, 0xbf, 0x6f, 0xe4, 0x44, + 0x14, 0xde, 0x49, 0x76, 0x95, 0xdd, 0x17, 0xa2, 0x90, 0x41, 0x42, 0x26, 0x85, 0x37, 0x72, 0x43, + 0x10, 0x77, 0xf6, 0x25, 0x9c, 0x38, 0x24, 0x44, 0x71, 0xa6, 0x40, 0x11, 0x47, 0x88, 0x06, 0x71, + 0xe2, 0x97, 0xd0, 0xcd, 0x7a, 0xe7, 0x9c, 0x61, 0xfd, 0x4b, 0x33, 0xe3, 0x48, 0x27, 0x28, 0xe8, + 0x68, 0xf9, 0x27, 0xe8, 0xa8, 0xa0, 0xa5, 0xa2, 0x0a, 0x54, 0x57, 0x5e, 0xb5, 0x22, 0xe6, 0x0f, + 0x01, 0xd9, 0x1e, 0xff, 0xd8, 0xf3, 0x46, 0x59, 0x82, 0x14, 0x09, 0x89, 0x6a, 0x77, 0xde, 0xfb, + 0xbe, 0x37, 0xef, 0x7b, 0x6f, 0xfc, 0xc1, 0xbd, 0xd9, 0x5b, 0xd2, 0xe6, 0xb1, 0x33, 0x4b, 0x27, + 0x4c, 0x44, 0x4c, 0x31, 0xe9, 0x24, 0x33, 0xdf, 0xa1, 0x09, 0x97, 0x8e, 0x98, 0x50, 0xcf, 0x39, + 0x3b, 0x98, 0x30, 0x45, 0x0f, 0x1c, 0x9f, 0x45, 0x4c, 0x50, 0xc5, 0xa6, 0x76, 0x22, 0x62, 0x15, + 0xe3, 0x57, 0x4b, 0xa2, 0xdd, 0x10, 0xed, 0x64, 0xe6, 0xdb, 0x39, 0xd1, 0xce, 0x89, 0xb6, 0x26, + 0xee, 0xde, 0xf6, 0xb9, 0x3a, 0x4d, 0x27, 0xb6, 0x17, 0x87, 0x8e, 0x1f, 0xfb, 0xb1, 0x53, 0xf0, + 0x27, 0xe9, 0xe3, 0xe2, 0x54, 0x1c, 0x8a, 0x7f, 0x65, 0xdd, 0xdd, 0xbb, 0xba, 0x21, 0x9a, 0xf0, + 0x90, 0x7a, 0xa7, 0x3c, 0x62, 0xe2, 0x49, 0xd3, 0x52, 0xc8, 0x14, 0x75, 0xce, 0x3a, 0xdd, 0xec, + 0x3a, 0x97, 0xb1, 0x44, 0x1a, 0x29, 0x1e, 0xb2, 0x0e, 0xe1, 0xcd, 0xab, 0x08, 0xd2, 0x3b, 0x65, + 0x21, 0xed, 0xf0, 0x0e, 0x2f, 0x9d, 0x97, 0x23, 0x98, 0x8c, 0x53, 0xe1, 0x75, 0xef, 0xba, 0x75, + 0x39, 0x67, 0x89, 0x94, 0x83, 0xe5, 0xe8, 0x54, 0xf1, 0xc0, 0xe1, 0x91, 0x92, 0x4a, 0x3c, 0x4f, + 0xb1, 0x7e, 0x43, 0xb0, 0xf9, 0x6e, 0x90, 0x4a, 0xc5, 0x04, 0x89, 0x03, 0x86, 0x1f, 0xc1, 0x30, + 0x1f, 0xd4, 0x94, 0x2a, 0x6a, 0xa0, 0x3d, 0xb4, 0xbf, 0x79, 0x78, 0xc7, 0xd6, 0xeb, 0x6a, 0xeb, + 0x6d, 0x16, 0x96, 0xa3, 0xed, 0xb3, 0x03, 0xfb, 0xc3, 0xc9, 0x57, 0xcc, 0x53, 0x1f, 0x30, 0x45, + 0x5d, 0x7c, 0x3e, 0x1f, 0xf7, 0xb2, 0xf9, 0x18, 0x9a, 0x18, 0xa9, 0xab, 0xe2, 0x4f, 0x60, 0x20, + 0xd2, 0x80, 0x49, 0x63, 0x6d, 0x6f, 0x7d, 0x7f, 0xf3, 0xf0, 0x0d, 0x7b, 0xc5, 0xd7, 0x60, 0x9f, + 0xc4, 0x01, 0xf7, 0x9e, 0x90, 0x34, 0x60, 0xee, 0x96, 0xbe, 0x61, 0x90, 0x9f, 0x24, 0x29, 0x0b, + 0x5a, 0x3f, 0xaf, 0x01, 0x6e, 0x69, 0x71, 0x79, 0x34, 0xe5, 0x91, 0x7f, 0x03, 0x92, 0xbe, 0x84, + 0xa1, 0x4c, 0x8b, 0x44, 0xa5, 0xea, 0xce, 0xca, 0xaa, 0x3e, 0x2a, 0x89, 0xee, 0x8b, 0xfa, 0x86, + 0xa1, 0x0e, 0x48, 0x52, 0xd7, 0xc4, 0x9f, 0xc3, 0x86, 0x88, 0x03, 0x46, 0xd8, 0x63, 0x63, 0x7d, + 0x51, 0xc0, 0x95, 0xe5, 0x49, 0xc9, 0x73, 0xb7, 0x75, 0xf9, 0x0d, 0x1d, 0x20, 0x55, 0x45, 0xeb, + 0x07, 0x04, 0xaf, 0x74, 0xa7, 0xe6, 0xa6, 0x3c, 0x98, 0x32, 0x81, 0xbf, 0x43, 0x80, 0xbd, 0x4e, + 0x56, 0xcf, 0xf1, 0xed, 0x95, 0xdb, 0x58, 0x72, 0xc1, 0xae, 0xee, 0x68, 0xc9, 0xca, 0xc8, 0x92, + 0x2b, 0xad, 0x67, 0x08, 0x5e, 0xee, 0x42, 0x1f, 0x70, 0xa9, 0xf0, 0x17, 0x9d, 0x0d, 0xdb, 0xab, + 0x6d, 0x38, 0x67, 0x17, 0xfb, 0xad, 0xa7, 0x5f, 0x45, 0x5a, 0xdb, 0x7d, 0x04, 0x03, 0xae, 0x58, + 0x58, 0xad, 0xf6, 0x5f, 0x89, 0xae, 0x1f, 0xee, 0x51, 0x5e, 0x91, 0x94, 0x85, 0xad, 0xdf, 0x11, + 0x6c, 0xb7, 0xc0, 0x37, 0xa0, 0xe9, 0xd3, 0x45, 0x4d, 0x77, 0xaf, 0xa5, 0x69, 0xb9, 0x98, 0xbf, + 0x10, 0x40, 0xf3, 0xa9, 0xe2, 0x31, 0x0c, 0xce, 0x98, 0x98, 0x48, 0x03, 0xed, 0xad, 0xef, 0x8f, + 0xdc, 0x51, 0x8e, 0x7f, 0x98, 0x07, 0x48, 0x19, 0xc7, 0xaf, 0xc3, 0x88, 0x26, 0xfc, 0x3d, 0x11, + 0xa7, 0x49, 0xd9, 0xce, 0xc8, 0xdd, 0xca, 0xe6, 0xe3, 0xd1, 0xfd, 0x93, 0xa3, 0x32, 0x48, 0x9a, + 0x7c, 0x0e, 0xae, 0xbc, 0x52, 0x1a, 0xeb, 0x0d, 0x98, 0x54, 0x41, 0xd2, 0xe4, 0xf1, 0x3d, 0xd8, + 0xaa, 0x0e, 0xc7, 0x34, 0x64, 0xd2, 0xe8, 0x17, 0x84, 0x9d, 0x6c, 0x3e, 0xde, 0x22, 0xed, 0x04, + 0x59, 0xc4, 0xe1, 0x77, 0x60, 0x3b, 0x8a, 0xa3, 0x0a, 0xf2, 0x31, 0x79, 0x20, 0x8d, 0x41, 0x41, + 0x7d, 0x29, 0x9b, 0x8f, 0xb7, 0x8f, 0x17, 0x53, 0xe4, 0x79, 0xac, 0xf5, 0x0d, 0xec, 0xb4, 0xbc, + 0x4a, 0x7f, 0x48, 0x3e, 0x40, 0x52, 0x07, 0xf5, 0x46, 0xaf, 0xe5, 0x7d, 0xb5, 0x15, 0x35, 0x31, + 0xd2, 0x2a, 0x6d, 0xfd, 0x8a, 0xa0, 0xff, 0x9f, 0xb7, 0xf2, 0x1f, 0xd7, 0x60, 0xf3, 0x7f, 0x0f, + 0x5f, 0xd9, 0xc3, 0x73, 0x03, 0xb9, 0x59, 0x53, 0xbc, 0xb6, 0x81, 0x5c, 0xed, 0x86, 0xbf, 0x20, + 0x18, 0xde, 0x90, 0x0d, 0x92, 0x45, 0x15, 0xb7, 0xff, 0x99, 0x8a, 0xe5, 0xed, 0x7f, 0x0d, 0xd5, + 0x7e, 0xf0, 0x2d, 0x18, 0x56, 0xd6, 0x55, 0x34, 0x3f, 0x6a, 0x9a, 0xa9, 0xdc, 0x8d, 0xd4, 0x08, + 0xbc, 0x07, 0xfd, 0x19, 0x8f, 0xa6, 0xc6, 0x5a, 0x81, 0x7c, 0x41, 0x23, 0xfb, 0xef, 0xf3, 0x68, + 0x4a, 0x8a, 0x4c, 0x8e, 0x88, 0x68, 0xc8, 0x8a, 0x07, 0xd4, 0x42, 0xe4, 0xa6, 0x45, 0x8a, 0x8c, + 0xf5, 0x13, 0x82, 0x0d, 0xfd, 0xf8, 0xea, 0x7a, 0xe8, 0xd2, 0x7a, 0x87, 0x00, 0x34, 0xe1, 0x0f, + 0x99, 0x90, 0x3c, 0x8e, 0xf4, 0xbd, 0xf5, 0x57, 0x72, 0xff, 0xe4, 0x48, 0x67, 0x48, 0x0b, 0x75, + 0x75, 0x0f, 0xd8, 0x81, 0x51, 0xfe, 0x2b, 0x13, 0xea, 0x31, 0xa3, 0x5f, 0xc0, 0x76, 0x34, 0x6c, + 0x74, 0x5c, 0x25, 0x48, 0x83, 0x71, 0x5f, 0x3b, 0xbf, 0x30, 0x7b, 0x4f, 0x2f, 0xcc, 0xde, 0xb3, + 0x0b, 0xb3, 0xf7, 0x6d, 0x66, 0xa2, 0xf3, 0xcc, 0x44, 0x4f, 0x33, 0x13, 0xfd, 0x91, 0x99, 0xe8, + 0xfb, 0x3f, 0xcd, 0xde, 0x67, 0x1b, 0x7a, 0xee, 0x7f, 0x07, 0x00, 0x00, 0xff, 0xff, 0x2f, 0x1d, + 0x32, 0x0f, 0x74, 0x0c, 0x00, 0x00, +} diff --git a/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/generated.proto b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/generated.proto new file mode 100644 index 00000000..c2cb2c74 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/generated.proto @@ -0,0 +1,198 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + + +// This file was autogenerated by go-to-protobuf. Do not edit it manually! + +syntax = 'proto2'; + +package k8s.io.kubernetes.pkg.apis.rbac.v1beta1; + +import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; +import "k8s.io/kubernetes/pkg/api/resource/generated.proto"; +import "k8s.io/kubernetes/pkg/api/v1/generated.proto"; +import "k8s.io/kubernetes/pkg/util/intstr/generated.proto"; + +// Package-wide variables from generator "generated". +option go_package = "v1beta1"; + +// ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. +message ClusterRole { + // Standard object's metadata. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // Rules holds all the PolicyRules for this ClusterRole + repeated PolicyRule rules = 2; +} + +// ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, +// and adds who information via Subject. +message ClusterRoleBinding { + // Standard object's metadata. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // Subjects holds references to the objects the role applies to. + repeated Subject subjects = 2; + + // RoleRef can only reference a ClusterRole in the global namespace. + // If the RoleRef cannot be resolved, the Authorizer must return an error. + optional RoleRef roleRef = 3; +} + +// +k8s:deepcopy-gen=false +// ClusterRoleBindingBuilder let's us attach methods. A no-no for API types. +// We use it to construct bindings in code. It's more compact than trying to write them +// out in a literal. +message ClusterRoleBindingBuilder { + optional ClusterRoleBinding clusterRoleBinding = 1; +} + +// ClusterRoleBindingList is a collection of ClusterRoleBindings +message ClusterRoleBindingList { + // Standard object's metadata. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // Items is a list of ClusterRoleBindings + repeated ClusterRoleBinding items = 2; +} + +// ClusterRoleList is a collection of ClusterRoles +message ClusterRoleList { + // Standard object's metadata. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // Items is a list of ClusterRoles + repeated ClusterRole items = 2; +} + +// PolicyRule holds information that describes a policy rule, but does not contain information +// about who the rule applies to or which namespace the rule applies to. +message PolicyRule { + // Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds. + repeated string verbs = 1; + + // APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of + // the enumerated resources in any API group will be allowed. + // +optional + repeated string apiGroups = 2; + + // Resources is a list of resources this rule applies to. ResourceAll represents all resources. + // +optional + repeated string resources = 3; + + // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. + // +optional + repeated string resourceNames = 4; + + // NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path + // Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. + // Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both. + // +optional + repeated string nonResourceURLs = 5; +} + +// +k8s:deepcopy-gen=false +// PolicyRuleBuilder let's us attach methods. A no-no for API types. +// We use it to construct rules in code. It's more compact than trying to write them +// out in a literal and allows us to perform some basic checking during construction +message PolicyRuleBuilder { + optional PolicyRule policyRule = 1; +} + +// Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. +message Role { + // Standard object's metadata. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // Rules holds all the PolicyRules for this Role + repeated PolicyRule rules = 2; +} + +// RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. +// It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given +// namespace only have effect in that namespace. +message RoleBinding { + // Standard object's metadata. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // Subjects holds references to the objects the role applies to. + repeated Subject subjects = 2; + + // RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. + // If the RoleRef cannot be resolved, the Authorizer must return an error. + optional RoleRef roleRef = 3; +} + +// RoleBindingList is a collection of RoleBindings +message RoleBindingList { + // Standard object's metadata. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // Items is a list of RoleBindings + repeated RoleBinding items = 2; +} + +// RoleList is a collection of Roles +message RoleList { + // Standard object's metadata. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // Items is a list of Roles + repeated Role items = 2; +} + +// RoleRef contains information that points to the role being used +message RoleRef { + // APIGroup is the group for the resource being referenced + optional string apiGroup = 1; + + // Kind is the type of resource being referenced + optional string kind = 2; + + // Name is the name of resource being referenced + optional string name = 3; +} + +// Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, +// or a value for non-objects such as user and group names. +message Subject { + // Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount". + // If the Authorizer does not recognized the kind value, the Authorizer should report an error. + optional string kind = 1; + + // APIVersion holds the API group and version of the referenced object. + // +optional + optional string apiVersion = 2; + + // Name of the object being referenced. + optional string name = 3; + + // Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty + // the Authorizer should report an error. + // +optional + optional string namespace = 4; +} + diff --git a/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/helpers.go b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/helpers.go new file mode 100644 index 00000000..f38776f2 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/helpers.go @@ -0,0 +1,148 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + "fmt" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +k8s:deepcopy-gen=false +// PolicyRuleBuilder let's us attach methods. A no-no for API types. +// We use it to construct rules in code. It's more compact than trying to write them +// out in a literal and allows us to perform some basic checking during construction +type PolicyRuleBuilder struct { + PolicyRule PolicyRule `protobuf:"bytes,1,opt,name=policyRule"` +} + +func NewRule(verbs ...string) *PolicyRuleBuilder { + return &PolicyRuleBuilder{ + PolicyRule: PolicyRule{Verbs: verbs}, + } +} + +func (r *PolicyRuleBuilder) Groups(groups ...string) *PolicyRuleBuilder { + r.PolicyRule.APIGroups = append(r.PolicyRule.APIGroups, groups...) + return r +} + +func (r *PolicyRuleBuilder) Resources(resources ...string) *PolicyRuleBuilder { + r.PolicyRule.Resources = append(r.PolicyRule.Resources, resources...) + return r +} + +func (r *PolicyRuleBuilder) Names(names ...string) *PolicyRuleBuilder { + r.PolicyRule.ResourceNames = append(r.PolicyRule.ResourceNames, names...) + return r +} + +func (r *PolicyRuleBuilder) URLs(urls ...string) *PolicyRuleBuilder { + r.PolicyRule.NonResourceURLs = append(r.PolicyRule.NonResourceURLs, urls...) + return r +} + +func (r *PolicyRuleBuilder) RuleOrDie() PolicyRule { + ret, err := r.Rule() + if err != nil { + panic(err) + } + return ret +} + +func (r *PolicyRuleBuilder) Rule() (PolicyRule, error) { + if len(r.PolicyRule.Verbs) == 0 { + return PolicyRule{}, fmt.Errorf("verbs are required: %#v", r.PolicyRule) + } + + switch { + case len(r.PolicyRule.NonResourceURLs) > 0: + if len(r.PolicyRule.APIGroups) != 0 || len(r.PolicyRule.Resources) != 0 || len(r.PolicyRule.ResourceNames) != 0 { + return PolicyRule{}, fmt.Errorf("non-resource rule may not have apiGroups, resources, or resourceNames: %#v", r.PolicyRule) + } + case len(r.PolicyRule.Resources) > 0: + if len(r.PolicyRule.NonResourceURLs) != 0 { + return PolicyRule{}, fmt.Errorf("resource rule may not have nonResourceURLs: %#v", r.PolicyRule) + } + if len(r.PolicyRule.APIGroups) == 0 { + // this a common bug + return PolicyRule{}, fmt.Errorf("resource rule must have apiGroups: %#v", r.PolicyRule) + } + default: + return PolicyRule{}, fmt.Errorf("a rule must have either nonResourceURLs or resources: %#v", r.PolicyRule) + } + + return r.PolicyRule, nil +} + +// +k8s:deepcopy-gen=false +// ClusterRoleBindingBuilder let's us attach methods. A no-no for API types. +// We use it to construct bindings in code. It's more compact than trying to write them +// out in a literal. +type ClusterRoleBindingBuilder struct { + ClusterRoleBinding ClusterRoleBinding `protobuf:"bytes,1,opt,name=clusterRoleBinding"` +} + +func NewClusterBinding(clusterRoleName string) *ClusterRoleBindingBuilder { + return &ClusterRoleBindingBuilder{ + ClusterRoleBinding: ClusterRoleBinding{ + ObjectMeta: metav1.ObjectMeta{Name: clusterRoleName}, + RoleRef: RoleRef{ + APIGroup: GroupName, + Kind: "ClusterRole", + Name: clusterRoleName, + }, + }, + } +} + +func (r *ClusterRoleBindingBuilder) Groups(groups ...string) *ClusterRoleBindingBuilder { + for _, group := range groups { + r.ClusterRoleBinding.Subjects = append(r.ClusterRoleBinding.Subjects, Subject{Kind: GroupKind, Name: group}) + } + return r +} + +func (r *ClusterRoleBindingBuilder) Users(users ...string) *ClusterRoleBindingBuilder { + for _, user := range users { + r.ClusterRoleBinding.Subjects = append(r.ClusterRoleBinding.Subjects, Subject{Kind: UserKind, Name: user}) + } + return r +} + +func (r *ClusterRoleBindingBuilder) SAs(namespace string, serviceAccountNames ...string) *ClusterRoleBindingBuilder { + for _, saName := range serviceAccountNames { + r.ClusterRoleBinding.Subjects = append(r.ClusterRoleBinding.Subjects, Subject{Kind: ServiceAccountKind, Namespace: namespace, Name: saName}) + } + return r +} + +func (r *ClusterRoleBindingBuilder) BindingOrDie() ClusterRoleBinding { + ret, err := r.Binding() + if err != nil { + panic(err) + } + return ret +} + +func (r *ClusterRoleBindingBuilder) Binding() (ClusterRoleBinding, error) { + if len(r.ClusterRoleBinding.Subjects) == 0 { + return ClusterRoleBinding{}, fmt.Errorf("subjects are required: %#v", r.ClusterRoleBinding) + } + + return r.ClusterRoleBinding, nil +} diff --git a/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/register.go b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/register.go similarity index 52% rename from vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/register.go rename to vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/register.go index 2eec3881..cab2e77e 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/register.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/register.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,33 +14,42 @@ See the License for the specific language governing permissions and limitations under the License. */ -package api +package v1beta1 import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" ) +const GroupName = "rbac.authorization.k8s.io" + // SchemeGroupVersion is group version used to register these objects -// TODO this should be in the "kubeconfig" group -var SchemeGroupVersion = schema.GroupVersion{Group: "", Version: runtime.APIVersionInternal} +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"} + +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} var ( - SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) + SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, addDefaultingFuncs) AddToScheme = SchemeBuilder.AddToScheme ) +// Adds the list of known types to api.Scheme. func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, - &Config{}, + &Role{}, + &RoleBinding{}, + &RoleBindingList{}, + &RoleList{}, + + &ClusterRole{}, + &ClusterRoleBinding{}, + &ClusterRoleBindingList{}, + &ClusterRoleList{}, ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil } - -func (obj *Config) GetObjectKind() schema.ObjectKind { return obj } -func (obj *Config) SetGroupVersionKind(gvk schema.GroupVersionKind) { - obj.APIVersion, obj.Kind = gvk.ToAPIVersionAndKind() -} -func (obj *Config) GroupVersionKind() schema.GroupVersionKind { - return schema.FromAPIVersionAndKind(obj.APIVersion, obj.Kind) -} diff --git a/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/types.generated.go b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/types.generated.go new file mode 100644 index 00000000..db87af94 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/types.generated.go @@ -0,0 +1,4879 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// ************************************************************ +// DO NOT EDIT. +// THIS FILE IS AUTO-GENERATED BY codecgen. +// ************************************************************ + +package v1beta1 + +import ( + "errors" + "fmt" + codec1978 "github.com/ugorji/go/codec" + pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + pkg2_types "k8s.io/apimachinery/pkg/types" + "reflect" + "runtime" + time "time" +) + +const ( + // ----- content types ---- + codecSelferC_UTF81234 = 1 + codecSelferC_RAW1234 = 0 + // ----- value types used ---- + codecSelferValueTypeArray1234 = 10 + codecSelferValueTypeMap1234 = 9 + // ----- containerStateValues ---- + codecSelfer_containerMapKey1234 = 2 + codecSelfer_containerMapValue1234 = 3 + codecSelfer_containerMapEnd1234 = 4 + codecSelfer_containerArrayElem1234 = 6 + codecSelfer_containerArrayEnd1234 = 7 +) + +var ( + codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits()) + codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`) +) + +type codecSelfer1234 struct{} + +func init() { + if codec1978.GenVersion != 5 { + _, file, _, _ := runtime.Caller(0) + err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v", + 5, codec1978.GenVersion, file) + panic(err) + } + if false { // reference the types, but skip this branch at build/run time + var v0 pkg1_v1.TypeMeta + var v1 pkg2_types.UID + var v2 time.Time + _, _, _ = v0, v1, v2 + } +} + +func (x *PolicyRule) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[1] = len(x.APIGroups) != 0 + yyq2[2] = len(x.Resources) != 0 + yyq2[3] = len(x.ResourceNames) != 0 + yyq2[4] = len(x.NonResourceURLs) != 0 + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(5) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.Verbs == nil { + r.EncodeNil() + } else { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + z.F.EncSliceStringV(x.Verbs, false, e) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("verbs")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Verbs == nil { + r.EncodeNil() + } else { + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + z.F.EncSliceStringV(x.Verbs, false, e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + if x.APIGroups == nil { + r.EncodeNil() + } else { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + z.F.EncSliceStringV(x.APIGroups, false, e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiGroups")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.APIGroups == nil { + r.EncodeNil() + } else { + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + z.F.EncSliceStringV(x.APIGroups, false, e) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + if x.Resources == nil { + r.EncodeNil() + } else { + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + z.F.EncSliceStringV(x.Resources, false, e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("resources")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Resources == nil { + r.EncodeNil() + } else { + yym11 := z.EncBinary() + _ = yym11 + if false { + } else { + z.F.EncSliceStringV(x.Resources, false, e) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { + if x.ResourceNames == nil { + r.EncodeNil() + } else { + yym13 := z.EncBinary() + _ = yym13 + if false { + } else { + z.F.EncSliceStringV(x.ResourceNames, false, e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("resourceNames")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.ResourceNames == nil { + r.EncodeNil() + } else { + yym14 := z.EncBinary() + _ = yym14 + if false { + } else { + z.F.EncSliceStringV(x.ResourceNames, false, e) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[4] { + if x.NonResourceURLs == nil { + r.EncodeNil() + } else { + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + z.F.EncSliceStringV(x.NonResourceURLs, false, e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[4] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("nonResourceURLs")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.NonResourceURLs == nil { + r.EncodeNil() + } else { + yym17 := z.EncBinary() + _ = yym17 + if false { + } else { + z.F.EncSliceStringV(x.NonResourceURLs, false, e) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *PolicyRule) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *PolicyRule) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "verbs": + if r.TryDecodeAsNil() { + x.Verbs = nil + } else { + yyv4 := &x.Verbs + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + z.F.DecSliceStringX(yyv4, false, d) + } + } + case "apiGroups": + if r.TryDecodeAsNil() { + x.APIGroups = nil + } else { + yyv6 := &x.APIGroups + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + z.F.DecSliceStringX(yyv6, false, d) + } + } + case "resources": + if r.TryDecodeAsNil() { + x.Resources = nil + } else { + yyv8 := &x.Resources + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + z.F.DecSliceStringX(yyv8, false, d) + } + } + case "resourceNames": + if r.TryDecodeAsNil() { + x.ResourceNames = nil + } else { + yyv10 := &x.ResourceNames + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + z.F.DecSliceStringX(yyv10, false, d) + } + } + case "nonResourceURLs": + if r.TryDecodeAsNil() { + x.NonResourceURLs = nil + } else { + yyv12 := &x.NonResourceURLs + yym13 := z.DecBinary() + _ = yym13 + if false { + } else { + z.F.DecSliceStringX(yyv12, false, d) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *PolicyRule) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj14 int + var yyb14 bool + var yyhl14 bool = l >= 0 + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Verbs = nil + } else { + yyv15 := &x.Verbs + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + z.F.DecSliceStringX(yyv15, false, d) + } + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIGroups = nil + } else { + yyv17 := &x.APIGroups + yym18 := z.DecBinary() + _ = yym18 + if false { + } else { + z.F.DecSliceStringX(yyv17, false, d) + } + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Resources = nil + } else { + yyv19 := &x.Resources + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + z.F.DecSliceStringX(yyv19, false, d) + } + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ResourceNames = nil + } else { + yyv21 := &x.ResourceNames + yym22 := z.DecBinary() + _ = yym22 + if false { + } else { + z.F.DecSliceStringX(yyv21, false, d) + } + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.NonResourceURLs = nil + } else { + yyv23 := &x.NonResourceURLs + yym24 := z.DecBinary() + _ = yym24 + if false { + } else { + z.F.DecSliceStringX(yyv23, false, d) + } + } + for { + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj14-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *Subject) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[1] = x.APIVersion != "" + yyq2[3] = x.Namespace != "" + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(4) + } else { + yynn2 = 2 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Name)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("name")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Name)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { + yym13 := z.EncBinary() + _ = yym13 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Namespace)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("namespace")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym14 := z.EncBinary() + _ = yym14 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Namespace)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *Subject) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *Subject) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "name": + if r.TryDecodeAsNil() { + x.Name = "" + } else { + yyv8 := &x.Name + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*string)(yyv8)) = r.DecodeString() + } + } + case "namespace": + if r.TryDecodeAsNil() { + x.Namespace = "" + } else { + yyv10 := &x.Namespace + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*string)(yyv10)) = r.DecodeString() + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *Subject) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Name = "" + } else { + yyv17 := &x.Name + yym18 := z.DecBinary() + _ = yym18 + if false { + } else { + *((*string)(yyv17)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Namespace = "" + } else { + yyv19 := &x.Namespace + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + *((*string)(yyv19)) = r.DecodeString() + } + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj12-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *RoleRef) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [3]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(3) + } else { + yynn2 = 3 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIGroup)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiGroup")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIGroup)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Name)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("name")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Name)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *RoleRef) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *RoleRef) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "apiGroup": + if r.TryDecodeAsNil() { + x.APIGroup = "" + } else { + yyv4 := &x.APIGroup + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv6 := &x.Kind + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "name": + if r.TryDecodeAsNil() { + x.Name = "" + } else { + yyv8 := &x.Name + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*string)(yyv8)) = r.DecodeString() + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *RoleRef) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj10 int + var yyb10 bool + var yyhl10 bool = l >= 0 + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIGroup = "" + } else { + yyv11 := &x.APIGroup + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*string)(yyv11)) = r.DecodeString() + } + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Name = "" + } else { + yyv15 := &x.Name + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + for { + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj10-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *Role) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(4) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.Rules == nil { + r.EncodeNil() + } else { + yym15 := z.EncBinary() + _ = yym15 + if false { + } else { + h.encSlicePolicyRule(([]PolicyRule)(x.Rules), e) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("rules")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Rules == nil { + r.EncodeNil() + } else { + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + h.encSlicePolicyRule(([]PolicyRule)(x.Rules), e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *Role) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *Role) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "metadata": + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg1_v1.ObjectMeta{} + } else { + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } + } + case "rules": + if r.TryDecodeAsNil() { + x.Rules = nil + } else { + yyv10 := &x.Rules + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + h.decSlicePolicyRule((*[]PolicyRule)(yyv10), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *Role) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg1_v1.ObjectMeta{} + } else { + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Rules = nil + } else { + yyv19 := &x.Rules + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + h.decSlicePolicyRule((*[]PolicyRule)(yyv19), d) + } + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj12-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *RoleBinding) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(5) + } else { + yynn2 = 2 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.Subjects == nil { + r.EncodeNil() + } else { + yym15 := z.EncBinary() + _ = yym15 + if false { + } else { + h.encSliceSubject(([]Subject)(x.Subjects), e) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("subjects")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Subjects == nil { + r.EncodeNil() + } else { + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + h.encSliceSubject(([]Subject)(x.Subjects), e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy18 := &x.RoleRef + yy18.CodecEncodeSelf(e) + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("roleRef")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy20 := &x.RoleRef + yy20.CodecEncodeSelf(e) + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *RoleBinding) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *RoleBinding) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "metadata": + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg1_v1.ObjectMeta{} + } else { + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } + } + case "subjects": + if r.TryDecodeAsNil() { + x.Subjects = nil + } else { + yyv10 := &x.Subjects + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + h.decSliceSubject((*[]Subject)(yyv10), d) + } + } + case "roleRef": + if r.TryDecodeAsNil() { + x.RoleRef = RoleRef{} + } else { + yyv12 := &x.RoleRef + yyv12.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *RoleBinding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj13 int + var yyb13 bool + var yyhl13 bool = l >= 0 + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv14 := &x.Kind + yym15 := z.DecBinary() + _ = yym15 + if false { + } else { + *((*string)(yyv14)) = r.DecodeString() + } + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv16 := &x.APIVersion + yym17 := z.DecBinary() + _ = yym17 + if false { + } else { + *((*string)(yyv16)) = r.DecodeString() + } + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg1_v1.ObjectMeta{} + } else { + yyv18 := &x.ObjectMeta + yym19 := z.DecBinary() + _ = yym19 + if false { + } else if z.HasExtensions() && z.DecExt(yyv18) { + } else { + z.DecFallback(yyv18, false) + } + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Subjects = nil + } else { + yyv20 := &x.Subjects + yym21 := z.DecBinary() + _ = yym21 + if false { + } else { + h.decSliceSubject((*[]Subject)(yyv20), d) + } + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.RoleRef = RoleRef{} + } else { + yyv22 := &x.RoleRef + yyv22.CodecDecodeSelf(d) + } + for { + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj13-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *RoleBindingList) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(4) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yy10 := &x.ListMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy12 := &x.ListMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym15 := z.EncBinary() + _ = yym15 + if false { + } else { + h.encSliceRoleBinding(([]RoleBinding)(x.Items), e) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("items")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + h.encSliceRoleBinding(([]RoleBinding)(x.Items), e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *RoleBindingList) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *RoleBindingList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "metadata": + if r.TryDecodeAsNil() { + x.ListMeta = pkg1_v1.ListMeta{} + } else { + yyv8 := &x.ListMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } + } + case "items": + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv10 := &x.Items + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + h.decSliceRoleBinding((*[]RoleBinding)(yyv10), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *RoleBindingList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ListMeta = pkg1_v1.ListMeta{} + } else { + yyv17 := &x.ListMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv19 := &x.Items + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + h.decSliceRoleBinding((*[]RoleBinding)(yyv19), d) + } + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj12-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *RoleList) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(4) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yy10 := &x.ListMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy12 := &x.ListMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym15 := z.EncBinary() + _ = yym15 + if false { + } else { + h.encSliceRole(([]Role)(x.Items), e) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("items")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + h.encSliceRole(([]Role)(x.Items), e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *RoleList) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *RoleList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "metadata": + if r.TryDecodeAsNil() { + x.ListMeta = pkg1_v1.ListMeta{} + } else { + yyv8 := &x.ListMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } + } + case "items": + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv10 := &x.Items + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + h.decSliceRole((*[]Role)(yyv10), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *RoleList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ListMeta = pkg1_v1.ListMeta{} + } else { + yyv17 := &x.ListMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv19 := &x.Items + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + h.decSliceRole((*[]Role)(yyv19), d) + } + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj12-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *ClusterRole) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(4) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.Rules == nil { + r.EncodeNil() + } else { + yym15 := z.EncBinary() + _ = yym15 + if false { + } else { + h.encSlicePolicyRule(([]PolicyRule)(x.Rules), e) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("rules")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Rules == nil { + r.EncodeNil() + } else { + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + h.encSlicePolicyRule(([]PolicyRule)(x.Rules), e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *ClusterRole) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *ClusterRole) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "metadata": + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg1_v1.ObjectMeta{} + } else { + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } + } + case "rules": + if r.TryDecodeAsNil() { + x.Rules = nil + } else { + yyv10 := &x.Rules + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + h.decSlicePolicyRule((*[]PolicyRule)(yyv10), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *ClusterRole) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg1_v1.ObjectMeta{} + } else { + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Rules = nil + } else { + yyv19 := &x.Rules + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + h.decSlicePolicyRule((*[]PolicyRule)(yyv19), d) + } + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj12-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *ClusterRoleBinding) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(5) + } else { + yynn2 = 2 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.Subjects == nil { + r.EncodeNil() + } else { + yym15 := z.EncBinary() + _ = yym15 + if false { + } else { + h.encSliceSubject(([]Subject)(x.Subjects), e) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("subjects")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Subjects == nil { + r.EncodeNil() + } else { + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + h.encSliceSubject(([]Subject)(x.Subjects), e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy18 := &x.RoleRef + yy18.CodecEncodeSelf(e) + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("roleRef")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy20 := &x.RoleRef + yy20.CodecEncodeSelf(e) + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *ClusterRoleBinding) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *ClusterRoleBinding) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "metadata": + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg1_v1.ObjectMeta{} + } else { + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } + } + case "subjects": + if r.TryDecodeAsNil() { + x.Subjects = nil + } else { + yyv10 := &x.Subjects + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + h.decSliceSubject((*[]Subject)(yyv10), d) + } + } + case "roleRef": + if r.TryDecodeAsNil() { + x.RoleRef = RoleRef{} + } else { + yyv12 := &x.RoleRef + yyv12.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *ClusterRoleBinding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj13 int + var yyb13 bool + var yyhl13 bool = l >= 0 + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv14 := &x.Kind + yym15 := z.DecBinary() + _ = yym15 + if false { + } else { + *((*string)(yyv14)) = r.DecodeString() + } + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv16 := &x.APIVersion + yym17 := z.DecBinary() + _ = yym17 + if false { + } else { + *((*string)(yyv16)) = r.DecodeString() + } + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg1_v1.ObjectMeta{} + } else { + yyv18 := &x.ObjectMeta + yym19 := z.DecBinary() + _ = yym19 + if false { + } else if z.HasExtensions() && z.DecExt(yyv18) { + } else { + z.DecFallback(yyv18, false) + } + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Subjects = nil + } else { + yyv20 := &x.Subjects + yym21 := z.DecBinary() + _ = yym21 + if false { + } else { + h.decSliceSubject((*[]Subject)(yyv20), d) + } + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.RoleRef = RoleRef{} + } else { + yyv22 := &x.RoleRef + yyv22.CodecDecodeSelf(d) + } + for { + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj13-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *ClusterRoleBindingList) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(4) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yy10 := &x.ListMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy12 := &x.ListMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym15 := z.EncBinary() + _ = yym15 + if false { + } else { + h.encSliceClusterRoleBinding(([]ClusterRoleBinding)(x.Items), e) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("items")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + h.encSliceClusterRoleBinding(([]ClusterRoleBinding)(x.Items), e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *ClusterRoleBindingList) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *ClusterRoleBindingList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "metadata": + if r.TryDecodeAsNil() { + x.ListMeta = pkg1_v1.ListMeta{} + } else { + yyv8 := &x.ListMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } + } + case "items": + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv10 := &x.Items + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + h.decSliceClusterRoleBinding((*[]ClusterRoleBinding)(yyv10), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *ClusterRoleBindingList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ListMeta = pkg1_v1.ListMeta{} + } else { + yyv17 := &x.ListMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv19 := &x.Items + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + h.decSliceClusterRoleBinding((*[]ClusterRoleBinding)(yyv19), d) + } + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj12-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *ClusterRoleList) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(4) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yy10 := &x.ListMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy12 := &x.ListMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym15 := z.EncBinary() + _ = yym15 + if false { + } else { + h.encSliceClusterRole(([]ClusterRole)(x.Items), e) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("items")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + h.encSliceClusterRole(([]ClusterRole)(x.Items), e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *ClusterRoleList) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *ClusterRoleList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "metadata": + if r.TryDecodeAsNil() { + x.ListMeta = pkg1_v1.ListMeta{} + } else { + yyv8 := &x.ListMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } + } + case "items": + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv10 := &x.Items + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + h.decSliceClusterRole((*[]ClusterRole)(yyv10), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *ClusterRoleList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ListMeta = pkg1_v1.ListMeta{} + } else { + yyv17 := &x.ListMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv19 := &x.Items + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + h.decSliceClusterRole((*[]ClusterRole)(yyv19), d) + } + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj12-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) encSlicePolicyRule(v []PolicyRule, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSlicePolicyRule(v *[]PolicyRule, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []PolicyRule{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true + } + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { + + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 120) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] + } else { + yyv1 = make([]PolicyRule, yyrl1) + } + } else { + yyv1 = make([]PolicyRule, yyrl1) + } + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) + } + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true + } + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = PolicyRule{} + } else { + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) + } + + } + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, PolicyRule{}) + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = PolicyRule{} + } else { + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { + + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, PolicyRule{}) // var yyz1 PolicyRule + yyc1 = true + } + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { + if r.TryDecodeAsNil() { + yyv1[yyj1] = PolicyRule{} + } else { + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []PolicyRule{} + yyc1 = true + } + } + yyh1.End() + if yyc1 { + *v = yyv1 + } +} + +func (x codecSelfer1234) encSliceSubject(v []Subject, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceSubject(v *[]Subject, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []Subject{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true + } + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { + + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 64) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] + } else { + yyv1 = make([]Subject, yyrl1) + } + } else { + yyv1 = make([]Subject, yyrl1) + } + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) + } + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true + } + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = Subject{} + } else { + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) + } + + } + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, Subject{}) + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = Subject{} + } else { + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { + + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, Subject{}) // var yyz1 Subject + yyc1 = true + } + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { + if r.TryDecodeAsNil() { + yyv1[yyj1] = Subject{} + } else { + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []Subject{} + yyc1 = true + } + } + yyh1.End() + if yyc1 { + *v = yyv1 + } +} + +func (x codecSelfer1234) encSliceRoleBinding(v []RoleBinding, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceRoleBinding(v *[]RoleBinding, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []RoleBinding{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true + } + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { + + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 328) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] + } else { + yyv1 = make([]RoleBinding, yyrl1) + } + } else { + yyv1 = make([]RoleBinding, yyrl1) + } + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) + } + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true + } + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = RoleBinding{} + } else { + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) + } + + } + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, RoleBinding{}) + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = RoleBinding{} + } else { + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { + + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, RoleBinding{}) // var yyz1 RoleBinding + yyc1 = true + } + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { + if r.TryDecodeAsNil() { + yyv1[yyj1] = RoleBinding{} + } else { + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []RoleBinding{} + yyc1 = true + } + } + yyh1.End() + if yyc1 { + *v = yyv1 + } +} + +func (x codecSelfer1234) encSliceRole(v []Role, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceRole(v *[]Role, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []Role{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true + } + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { + + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 280) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] + } else { + yyv1 = make([]Role, yyrl1) + } + } else { + yyv1 = make([]Role, yyrl1) + } + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) + } + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true + } + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = Role{} + } else { + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) + } + + } + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, Role{}) + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = Role{} + } else { + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { + + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, Role{}) // var yyz1 Role + yyc1 = true + } + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { + if r.TryDecodeAsNil() { + yyv1[yyj1] = Role{} + } else { + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []Role{} + yyc1 = true + } + } + yyh1.End() + if yyc1 { + *v = yyv1 + } +} + +func (x codecSelfer1234) encSliceClusterRoleBinding(v []ClusterRoleBinding, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceClusterRoleBinding(v *[]ClusterRoleBinding, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []ClusterRoleBinding{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true + } + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { + + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 328) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] + } else { + yyv1 = make([]ClusterRoleBinding, yyrl1) + } + } else { + yyv1 = make([]ClusterRoleBinding, yyrl1) + } + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) + } + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true + } + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = ClusterRoleBinding{} + } else { + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) + } + + } + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, ClusterRoleBinding{}) + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = ClusterRoleBinding{} + } else { + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { + + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, ClusterRoleBinding{}) // var yyz1 ClusterRoleBinding + yyc1 = true + } + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { + if r.TryDecodeAsNil() { + yyv1[yyj1] = ClusterRoleBinding{} + } else { + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []ClusterRoleBinding{} + yyc1 = true + } + } + yyh1.End() + if yyc1 { + *v = yyv1 + } +} + +func (x codecSelfer1234) encSliceClusterRole(v []ClusterRole, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceClusterRole(v *[]ClusterRole, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []ClusterRole{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true + } + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { + + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 280) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] + } else { + yyv1 = make([]ClusterRole, yyrl1) + } + } else { + yyv1 = make([]ClusterRole, yyrl1) + } + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) + } + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true + } + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = ClusterRole{} + } else { + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) + } + + } + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, ClusterRole{}) + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = ClusterRole{} + } else { + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { + + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, ClusterRole{}) // var yyz1 ClusterRole + yyc1 = true + } + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { + if r.TryDecodeAsNil() { + yyv1[yyj1] = ClusterRole{} + } else { + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []ClusterRole{} + yyc1 = true + } + } + yyh1.End() + if yyc1 { + *v = yyv1 + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/types.go b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/types.go new file mode 100644 index 00000000..8d0fd032 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/types.go @@ -0,0 +1,202 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// Authorization is calculated against +// 1. evaluation of ClusterRoleBindings - short circuit on match +// 2. evaluation of RoleBindings in the namespace requested - short circuit on match +// 3. deny by default + +const ( + APIGroupAll = "*" + ResourceAll = "*" + VerbAll = "*" + NonResourceAll = "*" + + GroupKind = "Group" + ServiceAccountKind = "ServiceAccount" + UserKind = "User" +) + +// Authorization is calculated against +// 1. evaluation of ClusterRoleBindings - short circuit on match +// 2. evaluation of RoleBindings in the namespace requested - short circuit on match +// 3. deny by default + +// PolicyRule holds information that describes a policy rule, but does not contain information +// about who the rule applies to or which namespace the rule applies to. +type PolicyRule struct { + // Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds. + Verbs []string `json:"verbs" protobuf:"bytes,1,rep,name=verbs"` + + // APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of + // the enumerated resources in any API group will be allowed. + // +optional + APIGroups []string `json:"apiGroups,omitempty" protobuf:"bytes,2,rep,name=apiGroups"` + // Resources is a list of resources this rule applies to. ResourceAll represents all resources. + // +optional + Resources []string `json:"resources,omitempty" protobuf:"bytes,3,rep,name=resources"` + // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. + // +optional + ResourceNames []string `json:"resourceNames,omitempty" protobuf:"bytes,4,rep,name=resourceNames"` + + // NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path + // Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. + // Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both. + // +optional + NonResourceURLs []string `json:"nonResourceURLs,omitempty" protobuf:"bytes,5,rep,name=nonResourceURLs"` +} + +// Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, +// or a value for non-objects such as user and group names. +type Subject struct { + // Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount". + // If the Authorizer does not recognized the kind value, the Authorizer should report an error. + Kind string `json:"kind" protobuf:"bytes,1,opt,name=kind"` + // APIVersion holds the API group and version of the referenced object. + // +optional + APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,2,opt.name=apiVersion"` + // Name of the object being referenced. + Name string `json:"name" protobuf:"bytes,3,opt,name=name"` + // Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty + // the Authorizer should report an error. + // +optional + Namespace string `json:"namespace,omitempty" protobuf:"bytes,4,opt,name=namespace"` +} + +// RoleRef contains information that points to the role being used +type RoleRef struct { + // APIGroup is the group for the resource being referenced + APIGroup string `json:"apiGroup" protobuf:"bytes,1,opt,name=apiGroup"` + // Kind is the type of resource being referenced + Kind string `json:"kind" protobuf:"bytes,2,opt,name=kind"` + // Name is the name of resource being referenced + Name string `json:"name" protobuf:"bytes,3,opt,name=name"` +} + +// +genclient=true + +// Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. +type Role struct { + metav1.TypeMeta `json:",inline"` + // Standard object's metadata. + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Rules holds all the PolicyRules for this Role + Rules []PolicyRule `json:"rules" protobuf:"bytes,2,rep,name=rules"` +} + +// +genclient=true + +// RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. +// It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given +// namespace only have effect in that namespace. +type RoleBinding struct { + metav1.TypeMeta `json:",inline"` + // Standard object's metadata. + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Subjects holds references to the objects the role applies to. + Subjects []Subject `json:"subjects" protobuf:"bytes,2,rep,name=subjects"` + + // RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. + // If the RoleRef cannot be resolved, the Authorizer must return an error. + RoleRef RoleRef `json:"roleRef" protobuf:"bytes,3,opt,name=roleRef"` +} + +// RoleBindingList is a collection of RoleBindings +type RoleBindingList struct { + metav1.TypeMeta `json:",inline"` + // Standard object's metadata. + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Items is a list of RoleBindings + Items []RoleBinding `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// RoleList is a collection of Roles +type RoleList struct { + metav1.TypeMeta `json:",inline"` + // Standard object's metadata. + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Items is a list of Roles + Items []Role `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// +genclient=true +// +nonNamespaced=true + +// ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. +type ClusterRole struct { + metav1.TypeMeta `json:",inline"` + // Standard object's metadata. + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Rules holds all the PolicyRules for this ClusterRole + Rules []PolicyRule `json:"rules" protobuf:"bytes,2,rep,name=rules"` +} + +// +genclient=true +// +nonNamespaced=true + +// ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, +// and adds who information via Subject. +type ClusterRoleBinding struct { + metav1.TypeMeta `json:",inline"` + // Standard object's metadata. + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Subjects holds references to the objects the role applies to. + Subjects []Subject `json:"subjects" protobuf:"bytes,2,rep,name=subjects"` + + // RoleRef can only reference a ClusterRole in the global namespace. + // If the RoleRef cannot be resolved, the Authorizer must return an error. + RoleRef RoleRef `json:"roleRef" protobuf:"bytes,3,opt,name=roleRef"` +} + +// ClusterRoleBindingList is a collection of ClusterRoleBindings +type ClusterRoleBindingList struct { + metav1.TypeMeta `json:",inline"` + // Standard object's metadata. + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Items is a list of ClusterRoleBindings + Items []ClusterRoleBinding `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// ClusterRoleList is a collection of ClusterRoles +type ClusterRoleList struct { + metav1.TypeMeta `json:",inline"` + // Standard object's metadata. + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Items is a list of ClusterRoles + Items []ClusterRole `json:"items" protobuf:"bytes,2,rep,name=items"` +} diff --git a/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/types_swagger_doc_generated.go new file mode 100644 index 00000000..a6682bd3 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/types_swagger_doc_generated.go @@ -0,0 +1,148 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +// This file contains a collection of methods that can be used from go-restful to +// generate Swagger API documentation for its models. Please read this PR for more +// information on the implementation: https://github.com/emicklei/go-restful/pull/215 +// +// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if +// they are on one line! For multiple line or blocks that you want to ignore use ---. +// Any context after a --- is ignored. +// +// Those methods can be generated by using hack/update-generated-swagger-docs.sh + +// AUTO-GENERATED FUNCTIONS START HERE +var map_ClusterRole = map[string]string{ + "": "ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.", + "metadata": "Standard object's metadata.", + "rules": "Rules holds all the PolicyRules for this ClusterRole", +} + +func (ClusterRole) SwaggerDoc() map[string]string { + return map_ClusterRole +} + +var map_ClusterRoleBinding = map[string]string{ + "": "ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject.", + "metadata": "Standard object's metadata.", + "subjects": "Subjects holds references to the objects the role applies to.", + "roleRef": "RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", +} + +func (ClusterRoleBinding) SwaggerDoc() map[string]string { + return map_ClusterRoleBinding +} + +var map_ClusterRoleBindingList = map[string]string{ + "": "ClusterRoleBindingList is a collection of ClusterRoleBindings", + "metadata": "Standard object's metadata.", + "items": "Items is a list of ClusterRoleBindings", +} + +func (ClusterRoleBindingList) SwaggerDoc() map[string]string { + return map_ClusterRoleBindingList +} + +var map_ClusterRoleList = map[string]string{ + "": "ClusterRoleList is a collection of ClusterRoles", + "metadata": "Standard object's metadata.", + "items": "Items is a list of ClusterRoles", +} + +func (ClusterRoleList) SwaggerDoc() map[string]string { + return map_ClusterRoleList +} + +var map_PolicyRule = map[string]string{ + "": "PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.", + "verbs": "Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.", + "apiGroups": "APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed.", + "resources": "Resources is a list of resources this rule applies to. ResourceAll represents all resources.", + "resourceNames": "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.", + "nonResourceURLs": "NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as \"pods\" or \"secrets\") or non-resource URL paths (such as \"/api\"), but not both.", +} + +func (PolicyRule) SwaggerDoc() map[string]string { + return map_PolicyRule +} + +var map_Role = map[string]string{ + "": "Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.", + "metadata": "Standard object's metadata.", + "rules": "Rules holds all the PolicyRules for this Role", +} + +func (Role) SwaggerDoc() map[string]string { + return map_Role +} + +var map_RoleBinding = map[string]string{ + "": "RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace.", + "metadata": "Standard object's metadata.", + "subjects": "Subjects holds references to the objects the role applies to.", + "roleRef": "RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", +} + +func (RoleBinding) SwaggerDoc() map[string]string { + return map_RoleBinding +} + +var map_RoleBindingList = map[string]string{ + "": "RoleBindingList is a collection of RoleBindings", + "metadata": "Standard object's metadata.", + "items": "Items is a list of RoleBindings", +} + +func (RoleBindingList) SwaggerDoc() map[string]string { + return map_RoleBindingList +} + +var map_RoleList = map[string]string{ + "": "RoleList is a collection of Roles", + "metadata": "Standard object's metadata.", + "items": "Items is a list of Roles", +} + +func (RoleList) SwaggerDoc() map[string]string { + return map_RoleList +} + +var map_RoleRef = map[string]string{ + "": "RoleRef contains information that points to the role being used", + "apiGroup": "APIGroup is the group for the resource being referenced", + "kind": "Kind is the type of resource being referenced", + "name": "Name is the name of resource being referenced", +} + +func (RoleRef) SwaggerDoc() map[string]string { + return map_RoleRef +} + +var map_Subject = map[string]string{ + "": "Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names.", + "kind": "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\". If the Authorizer does not recognized the kind value, the Authorizer should report an error.", + "apiVersion": "APIVersion holds the API group and version of the referenced object.", + "name": "Name of the object being referenced.", + "namespace": "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty the Authorizer should report an error.", +} + +func (Subject) SwaggerDoc() map[string]string { + return map_Subject +} + +// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/zz_generated.conversion.go new file mode 100644 index 00000000..536366b7 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/zz_generated.conversion.go @@ -0,0 +1,353 @@ +// +build !ignore_autogenerated + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was autogenerated by conversion-gen. Do not edit it manually! + +package v1beta1 + +import ( + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + rbac "k8s.io/kubernetes/pkg/apis/rbac" + unsafe "unsafe" +) + +func init() { + SchemeBuilder.Register(RegisterConversions) +} + +// RegisterConversions adds conversion functions to the given scheme. +// Public to allow building arbitrary schemes. +func RegisterConversions(scheme *runtime.Scheme) error { + return scheme.AddGeneratedConversionFuncs( + Convert_v1beta1_ClusterRole_To_rbac_ClusterRole, + Convert_rbac_ClusterRole_To_v1beta1_ClusterRole, + Convert_v1beta1_ClusterRoleBinding_To_rbac_ClusterRoleBinding, + Convert_rbac_ClusterRoleBinding_To_v1beta1_ClusterRoleBinding, + Convert_v1beta1_ClusterRoleBindingBuilder_To_rbac_ClusterRoleBindingBuilder, + Convert_rbac_ClusterRoleBindingBuilder_To_v1beta1_ClusterRoleBindingBuilder, + Convert_v1beta1_ClusterRoleBindingList_To_rbac_ClusterRoleBindingList, + Convert_rbac_ClusterRoleBindingList_To_v1beta1_ClusterRoleBindingList, + Convert_v1beta1_ClusterRoleList_To_rbac_ClusterRoleList, + Convert_rbac_ClusterRoleList_To_v1beta1_ClusterRoleList, + Convert_v1beta1_PolicyRule_To_rbac_PolicyRule, + Convert_rbac_PolicyRule_To_v1beta1_PolicyRule, + Convert_v1beta1_PolicyRuleBuilder_To_rbac_PolicyRuleBuilder, + Convert_rbac_PolicyRuleBuilder_To_v1beta1_PolicyRuleBuilder, + Convert_v1beta1_Role_To_rbac_Role, + Convert_rbac_Role_To_v1beta1_Role, + Convert_v1beta1_RoleBinding_To_rbac_RoleBinding, + Convert_rbac_RoleBinding_To_v1beta1_RoleBinding, + Convert_v1beta1_RoleBindingList_To_rbac_RoleBindingList, + Convert_rbac_RoleBindingList_To_v1beta1_RoleBindingList, + Convert_v1beta1_RoleList_To_rbac_RoleList, + Convert_rbac_RoleList_To_v1beta1_RoleList, + Convert_v1beta1_RoleRef_To_rbac_RoleRef, + Convert_rbac_RoleRef_To_v1beta1_RoleRef, + Convert_v1beta1_Subject_To_rbac_Subject, + Convert_rbac_Subject_To_v1beta1_Subject, + ) +} + +func autoConvert_v1beta1_ClusterRole_To_rbac_ClusterRole(in *ClusterRole, out *rbac.ClusterRole, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Rules = *(*[]rbac.PolicyRule)(unsafe.Pointer(&in.Rules)) + return nil +} + +func Convert_v1beta1_ClusterRole_To_rbac_ClusterRole(in *ClusterRole, out *rbac.ClusterRole, s conversion.Scope) error { + return autoConvert_v1beta1_ClusterRole_To_rbac_ClusterRole(in, out, s) +} + +func autoConvert_rbac_ClusterRole_To_v1beta1_ClusterRole(in *rbac.ClusterRole, out *ClusterRole, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Rules = *(*[]PolicyRule)(unsafe.Pointer(&in.Rules)) + return nil +} + +func Convert_rbac_ClusterRole_To_v1beta1_ClusterRole(in *rbac.ClusterRole, out *ClusterRole, s conversion.Scope) error { + return autoConvert_rbac_ClusterRole_To_v1beta1_ClusterRole(in, out, s) +} + +func autoConvert_v1beta1_ClusterRoleBinding_To_rbac_ClusterRoleBinding(in *ClusterRoleBinding, out *rbac.ClusterRoleBinding, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Subjects = *(*[]rbac.Subject)(unsafe.Pointer(&in.Subjects)) + if err := Convert_v1beta1_RoleRef_To_rbac_RoleRef(&in.RoleRef, &out.RoleRef, s); err != nil { + return err + } + return nil +} + +func Convert_v1beta1_ClusterRoleBinding_To_rbac_ClusterRoleBinding(in *ClusterRoleBinding, out *rbac.ClusterRoleBinding, s conversion.Scope) error { + return autoConvert_v1beta1_ClusterRoleBinding_To_rbac_ClusterRoleBinding(in, out, s) +} + +func autoConvert_rbac_ClusterRoleBinding_To_v1beta1_ClusterRoleBinding(in *rbac.ClusterRoleBinding, out *ClusterRoleBinding, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Subjects = *(*[]Subject)(unsafe.Pointer(&in.Subjects)) + if err := Convert_rbac_RoleRef_To_v1beta1_RoleRef(&in.RoleRef, &out.RoleRef, s); err != nil { + return err + } + return nil +} + +func Convert_rbac_ClusterRoleBinding_To_v1beta1_ClusterRoleBinding(in *rbac.ClusterRoleBinding, out *ClusterRoleBinding, s conversion.Scope) error { + return autoConvert_rbac_ClusterRoleBinding_To_v1beta1_ClusterRoleBinding(in, out, s) +} + +func autoConvert_v1beta1_ClusterRoleBindingBuilder_To_rbac_ClusterRoleBindingBuilder(in *ClusterRoleBindingBuilder, out *rbac.ClusterRoleBindingBuilder, s conversion.Scope) error { + if err := Convert_v1beta1_ClusterRoleBinding_To_rbac_ClusterRoleBinding(&in.ClusterRoleBinding, &out.ClusterRoleBinding, s); err != nil { + return err + } + return nil +} + +func Convert_v1beta1_ClusterRoleBindingBuilder_To_rbac_ClusterRoleBindingBuilder(in *ClusterRoleBindingBuilder, out *rbac.ClusterRoleBindingBuilder, s conversion.Scope) error { + return autoConvert_v1beta1_ClusterRoleBindingBuilder_To_rbac_ClusterRoleBindingBuilder(in, out, s) +} + +func autoConvert_rbac_ClusterRoleBindingBuilder_To_v1beta1_ClusterRoleBindingBuilder(in *rbac.ClusterRoleBindingBuilder, out *ClusterRoleBindingBuilder, s conversion.Scope) error { + if err := Convert_rbac_ClusterRoleBinding_To_v1beta1_ClusterRoleBinding(&in.ClusterRoleBinding, &out.ClusterRoleBinding, s); err != nil { + return err + } + return nil +} + +func Convert_rbac_ClusterRoleBindingBuilder_To_v1beta1_ClusterRoleBindingBuilder(in *rbac.ClusterRoleBindingBuilder, out *ClusterRoleBindingBuilder, s conversion.Scope) error { + return autoConvert_rbac_ClusterRoleBindingBuilder_To_v1beta1_ClusterRoleBindingBuilder(in, out, s) +} + +func autoConvert_v1beta1_ClusterRoleBindingList_To_rbac_ClusterRoleBindingList(in *ClusterRoleBindingList, out *rbac.ClusterRoleBindingList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]rbac.ClusterRoleBinding)(unsafe.Pointer(&in.Items)) + return nil +} + +func Convert_v1beta1_ClusterRoleBindingList_To_rbac_ClusterRoleBindingList(in *ClusterRoleBindingList, out *rbac.ClusterRoleBindingList, s conversion.Scope) error { + return autoConvert_v1beta1_ClusterRoleBindingList_To_rbac_ClusterRoleBindingList(in, out, s) +} + +func autoConvert_rbac_ClusterRoleBindingList_To_v1beta1_ClusterRoleBindingList(in *rbac.ClusterRoleBindingList, out *ClusterRoleBindingList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]ClusterRoleBinding)(unsafe.Pointer(&in.Items)) + return nil +} + +func Convert_rbac_ClusterRoleBindingList_To_v1beta1_ClusterRoleBindingList(in *rbac.ClusterRoleBindingList, out *ClusterRoleBindingList, s conversion.Scope) error { + return autoConvert_rbac_ClusterRoleBindingList_To_v1beta1_ClusterRoleBindingList(in, out, s) +} + +func autoConvert_v1beta1_ClusterRoleList_To_rbac_ClusterRoleList(in *ClusterRoleList, out *rbac.ClusterRoleList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]rbac.ClusterRole)(unsafe.Pointer(&in.Items)) + return nil +} + +func Convert_v1beta1_ClusterRoleList_To_rbac_ClusterRoleList(in *ClusterRoleList, out *rbac.ClusterRoleList, s conversion.Scope) error { + return autoConvert_v1beta1_ClusterRoleList_To_rbac_ClusterRoleList(in, out, s) +} + +func autoConvert_rbac_ClusterRoleList_To_v1beta1_ClusterRoleList(in *rbac.ClusterRoleList, out *ClusterRoleList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]ClusterRole)(unsafe.Pointer(&in.Items)) + return nil +} + +func Convert_rbac_ClusterRoleList_To_v1beta1_ClusterRoleList(in *rbac.ClusterRoleList, out *ClusterRoleList, s conversion.Scope) error { + return autoConvert_rbac_ClusterRoleList_To_v1beta1_ClusterRoleList(in, out, s) +} + +func autoConvert_v1beta1_PolicyRule_To_rbac_PolicyRule(in *PolicyRule, out *rbac.PolicyRule, s conversion.Scope) error { + out.Verbs = *(*[]string)(unsafe.Pointer(&in.Verbs)) + out.APIGroups = *(*[]string)(unsafe.Pointer(&in.APIGroups)) + out.Resources = *(*[]string)(unsafe.Pointer(&in.Resources)) + out.ResourceNames = *(*[]string)(unsafe.Pointer(&in.ResourceNames)) + out.NonResourceURLs = *(*[]string)(unsafe.Pointer(&in.NonResourceURLs)) + return nil +} + +func Convert_v1beta1_PolicyRule_To_rbac_PolicyRule(in *PolicyRule, out *rbac.PolicyRule, s conversion.Scope) error { + return autoConvert_v1beta1_PolicyRule_To_rbac_PolicyRule(in, out, s) +} + +func autoConvert_rbac_PolicyRule_To_v1beta1_PolicyRule(in *rbac.PolicyRule, out *PolicyRule, s conversion.Scope) error { + out.Verbs = *(*[]string)(unsafe.Pointer(&in.Verbs)) + out.APIGroups = *(*[]string)(unsafe.Pointer(&in.APIGroups)) + out.Resources = *(*[]string)(unsafe.Pointer(&in.Resources)) + out.ResourceNames = *(*[]string)(unsafe.Pointer(&in.ResourceNames)) + out.NonResourceURLs = *(*[]string)(unsafe.Pointer(&in.NonResourceURLs)) + return nil +} + +func Convert_rbac_PolicyRule_To_v1beta1_PolicyRule(in *rbac.PolicyRule, out *PolicyRule, s conversion.Scope) error { + return autoConvert_rbac_PolicyRule_To_v1beta1_PolicyRule(in, out, s) +} + +func autoConvert_v1beta1_PolicyRuleBuilder_To_rbac_PolicyRuleBuilder(in *PolicyRuleBuilder, out *rbac.PolicyRuleBuilder, s conversion.Scope) error { + if err := Convert_v1beta1_PolicyRule_To_rbac_PolicyRule(&in.PolicyRule, &out.PolicyRule, s); err != nil { + return err + } + return nil +} + +func Convert_v1beta1_PolicyRuleBuilder_To_rbac_PolicyRuleBuilder(in *PolicyRuleBuilder, out *rbac.PolicyRuleBuilder, s conversion.Scope) error { + return autoConvert_v1beta1_PolicyRuleBuilder_To_rbac_PolicyRuleBuilder(in, out, s) +} + +func autoConvert_rbac_PolicyRuleBuilder_To_v1beta1_PolicyRuleBuilder(in *rbac.PolicyRuleBuilder, out *PolicyRuleBuilder, s conversion.Scope) error { + if err := Convert_rbac_PolicyRule_To_v1beta1_PolicyRule(&in.PolicyRule, &out.PolicyRule, s); err != nil { + return err + } + return nil +} + +func Convert_rbac_PolicyRuleBuilder_To_v1beta1_PolicyRuleBuilder(in *rbac.PolicyRuleBuilder, out *PolicyRuleBuilder, s conversion.Scope) error { + return autoConvert_rbac_PolicyRuleBuilder_To_v1beta1_PolicyRuleBuilder(in, out, s) +} + +func autoConvert_v1beta1_Role_To_rbac_Role(in *Role, out *rbac.Role, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Rules = *(*[]rbac.PolicyRule)(unsafe.Pointer(&in.Rules)) + return nil +} + +func Convert_v1beta1_Role_To_rbac_Role(in *Role, out *rbac.Role, s conversion.Scope) error { + return autoConvert_v1beta1_Role_To_rbac_Role(in, out, s) +} + +func autoConvert_rbac_Role_To_v1beta1_Role(in *rbac.Role, out *Role, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Rules = *(*[]PolicyRule)(unsafe.Pointer(&in.Rules)) + return nil +} + +func Convert_rbac_Role_To_v1beta1_Role(in *rbac.Role, out *Role, s conversion.Scope) error { + return autoConvert_rbac_Role_To_v1beta1_Role(in, out, s) +} + +func autoConvert_v1beta1_RoleBinding_To_rbac_RoleBinding(in *RoleBinding, out *rbac.RoleBinding, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Subjects = *(*[]rbac.Subject)(unsafe.Pointer(&in.Subjects)) + if err := Convert_v1beta1_RoleRef_To_rbac_RoleRef(&in.RoleRef, &out.RoleRef, s); err != nil { + return err + } + return nil +} + +func Convert_v1beta1_RoleBinding_To_rbac_RoleBinding(in *RoleBinding, out *rbac.RoleBinding, s conversion.Scope) error { + return autoConvert_v1beta1_RoleBinding_To_rbac_RoleBinding(in, out, s) +} + +func autoConvert_rbac_RoleBinding_To_v1beta1_RoleBinding(in *rbac.RoleBinding, out *RoleBinding, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Subjects = *(*[]Subject)(unsafe.Pointer(&in.Subjects)) + if err := Convert_rbac_RoleRef_To_v1beta1_RoleRef(&in.RoleRef, &out.RoleRef, s); err != nil { + return err + } + return nil +} + +func Convert_rbac_RoleBinding_To_v1beta1_RoleBinding(in *rbac.RoleBinding, out *RoleBinding, s conversion.Scope) error { + return autoConvert_rbac_RoleBinding_To_v1beta1_RoleBinding(in, out, s) +} + +func autoConvert_v1beta1_RoleBindingList_To_rbac_RoleBindingList(in *RoleBindingList, out *rbac.RoleBindingList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]rbac.RoleBinding)(unsafe.Pointer(&in.Items)) + return nil +} + +func Convert_v1beta1_RoleBindingList_To_rbac_RoleBindingList(in *RoleBindingList, out *rbac.RoleBindingList, s conversion.Scope) error { + return autoConvert_v1beta1_RoleBindingList_To_rbac_RoleBindingList(in, out, s) +} + +func autoConvert_rbac_RoleBindingList_To_v1beta1_RoleBindingList(in *rbac.RoleBindingList, out *RoleBindingList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]RoleBinding)(unsafe.Pointer(&in.Items)) + return nil +} + +func Convert_rbac_RoleBindingList_To_v1beta1_RoleBindingList(in *rbac.RoleBindingList, out *RoleBindingList, s conversion.Scope) error { + return autoConvert_rbac_RoleBindingList_To_v1beta1_RoleBindingList(in, out, s) +} + +func autoConvert_v1beta1_RoleList_To_rbac_RoleList(in *RoleList, out *rbac.RoleList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]rbac.Role)(unsafe.Pointer(&in.Items)) + return nil +} + +func Convert_v1beta1_RoleList_To_rbac_RoleList(in *RoleList, out *rbac.RoleList, s conversion.Scope) error { + return autoConvert_v1beta1_RoleList_To_rbac_RoleList(in, out, s) +} + +func autoConvert_rbac_RoleList_To_v1beta1_RoleList(in *rbac.RoleList, out *RoleList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]Role)(unsafe.Pointer(&in.Items)) + return nil +} + +func Convert_rbac_RoleList_To_v1beta1_RoleList(in *rbac.RoleList, out *RoleList, s conversion.Scope) error { + return autoConvert_rbac_RoleList_To_v1beta1_RoleList(in, out, s) +} + +func autoConvert_v1beta1_RoleRef_To_rbac_RoleRef(in *RoleRef, out *rbac.RoleRef, s conversion.Scope) error { + out.APIGroup = in.APIGroup + out.Kind = in.Kind + out.Name = in.Name + return nil +} + +func Convert_v1beta1_RoleRef_To_rbac_RoleRef(in *RoleRef, out *rbac.RoleRef, s conversion.Scope) error { + return autoConvert_v1beta1_RoleRef_To_rbac_RoleRef(in, out, s) +} + +func autoConvert_rbac_RoleRef_To_v1beta1_RoleRef(in *rbac.RoleRef, out *RoleRef, s conversion.Scope) error { + out.APIGroup = in.APIGroup + out.Kind = in.Kind + out.Name = in.Name + return nil +} + +func Convert_rbac_RoleRef_To_v1beta1_RoleRef(in *rbac.RoleRef, out *RoleRef, s conversion.Scope) error { + return autoConvert_rbac_RoleRef_To_v1beta1_RoleRef(in, out, s) +} + +func autoConvert_v1beta1_Subject_To_rbac_Subject(in *Subject, out *rbac.Subject, s conversion.Scope) error { + out.Kind = in.Kind + out.APIVersion = in.APIVersion + out.Name = in.Name + out.Namespace = in.Namespace + return nil +} + +func Convert_v1beta1_Subject_To_rbac_Subject(in *Subject, out *rbac.Subject, s conversion.Scope) error { + return autoConvert_v1beta1_Subject_To_rbac_Subject(in, out, s) +} + +func autoConvert_rbac_Subject_To_v1beta1_Subject(in *rbac.Subject, out *Subject, s conversion.Scope) error { + out.Kind = in.Kind + out.APIVersion = in.APIVersion + out.Name = in.Name + out.Namespace = in.Namespace + return nil +} + +func Convert_rbac_Subject_To_v1beta1_Subject(in *rbac.Subject, out *Subject, s conversion.Scope) error { + return autoConvert_rbac_Subject_To_v1beta1_Subject(in, out, s) +} diff --git a/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/zz_generated.deepcopy.go new file mode 100644 index 00000000..dccae9b4 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/zz_generated.deepcopy.go @@ -0,0 +1,258 @@ +// +build !ignore_autogenerated + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was autogenerated by deepcopy-gen. Do not edit it manually! + +package v1beta1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + reflect "reflect" +) + +func init() { + SchemeBuilder.Register(RegisterDeepCopies) +} + +// RegisterDeepCopies adds deep-copy functions to the given scheme. Public +// to allow building arbitrary schemes. +func RegisterDeepCopies(scheme *runtime.Scheme) error { + return scheme.AddGeneratedDeepCopyFuncs( + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ClusterRole, InType: reflect.TypeOf(&ClusterRole{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ClusterRoleBinding, InType: reflect.TypeOf(&ClusterRoleBinding{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ClusterRoleBindingList, InType: reflect.TypeOf(&ClusterRoleBindingList{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ClusterRoleList, InType: reflect.TypeOf(&ClusterRoleList{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_PolicyRule, InType: reflect.TypeOf(&PolicyRule{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_Role, InType: reflect.TypeOf(&Role{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_RoleBinding, InType: reflect.TypeOf(&RoleBinding{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_RoleBindingList, InType: reflect.TypeOf(&RoleBindingList{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_RoleList, InType: reflect.TypeOf(&RoleList{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_RoleRef, InType: reflect.TypeOf(&RoleRef{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_Subject, InType: reflect.TypeOf(&Subject{})}, + ) +} + +func DeepCopy_v1beta1_ClusterRole(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*ClusterRole) + out := out.(*ClusterRole) + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { + return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) + } + if in.Rules != nil { + in, out := &in.Rules, &out.Rules + *out = make([]PolicyRule, len(*in)) + for i := range *in { + if err := DeepCopy_v1beta1_PolicyRule(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } + } + return nil + } +} + +func DeepCopy_v1beta1_ClusterRoleBinding(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*ClusterRoleBinding) + out := out.(*ClusterRoleBinding) + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { + return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) + } + if in.Subjects != nil { + in, out := &in.Subjects, &out.Subjects + *out = make([]Subject, len(*in)) + copy(*out, *in) + } + return nil + } +} + +func DeepCopy_v1beta1_ClusterRoleBindingList(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*ClusterRoleBindingList) + out := out.(*ClusterRoleBindingList) + *out = *in + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ClusterRoleBinding, len(*in)) + for i := range *in { + if err := DeepCopy_v1beta1_ClusterRoleBinding(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } + } + return nil + } +} + +func DeepCopy_v1beta1_ClusterRoleList(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*ClusterRoleList) + out := out.(*ClusterRoleList) + *out = *in + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ClusterRole, len(*in)) + for i := range *in { + if err := DeepCopy_v1beta1_ClusterRole(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } + } + return nil + } +} + +func DeepCopy_v1beta1_PolicyRule(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*PolicyRule) + out := out.(*PolicyRule) + *out = *in + if in.Verbs != nil { + in, out := &in.Verbs, &out.Verbs + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.APIGroups != nil { + in, out := &in.APIGroups, &out.APIGroups + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Resources != nil { + in, out := &in.Resources, &out.Resources + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.ResourceNames != nil { + in, out := &in.ResourceNames, &out.ResourceNames + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.NonResourceURLs != nil { + in, out := &in.NonResourceURLs, &out.NonResourceURLs + *out = make([]string, len(*in)) + copy(*out, *in) + } + return nil + } +} + +func DeepCopy_v1beta1_Role(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*Role) + out := out.(*Role) + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { + return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) + } + if in.Rules != nil { + in, out := &in.Rules, &out.Rules + *out = make([]PolicyRule, len(*in)) + for i := range *in { + if err := DeepCopy_v1beta1_PolicyRule(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } + } + return nil + } +} + +func DeepCopy_v1beta1_RoleBinding(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*RoleBinding) + out := out.(*RoleBinding) + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { + return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) + } + if in.Subjects != nil { + in, out := &in.Subjects, &out.Subjects + *out = make([]Subject, len(*in)) + copy(*out, *in) + } + return nil + } +} + +func DeepCopy_v1beta1_RoleBindingList(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*RoleBindingList) + out := out.(*RoleBindingList) + *out = *in + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]RoleBinding, len(*in)) + for i := range *in { + if err := DeepCopy_v1beta1_RoleBinding(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } + } + return nil + } +} + +func DeepCopy_v1beta1_RoleList(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*RoleList) + out := out.(*RoleList) + *out = *in + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Role, len(*in)) + for i := range *in { + if err := DeepCopy_v1beta1_Role(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } + } + return nil + } +} + +func DeepCopy_v1beta1_RoleRef(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*RoleRef) + out := out.(*RoleRef) + *out = *in + return nil + } +} + +func DeepCopy_v1beta1_Subject(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*Subject) + out := out.(*Subject) + *out = *in + return nil + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/zz_generated.defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/zz_generated.defaults.go new file mode 100644 index 00000000..2529a633 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/v1beta1/zz_generated.defaults.go @@ -0,0 +1,58 @@ +// +build !ignore_autogenerated + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was autogenerated by defaulter-gen. Do not edit it manually! + +package v1beta1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + scheme.AddTypeDefaultingFunc(&ClusterRoleBinding{}, func(obj interface{}) { SetObjectDefaults_ClusterRoleBinding(obj.(*ClusterRoleBinding)) }) + scheme.AddTypeDefaultingFunc(&ClusterRoleBindingList{}, func(obj interface{}) { SetObjectDefaults_ClusterRoleBindingList(obj.(*ClusterRoleBindingList)) }) + scheme.AddTypeDefaultingFunc(&RoleBinding{}, func(obj interface{}) { SetObjectDefaults_RoleBinding(obj.(*RoleBinding)) }) + scheme.AddTypeDefaultingFunc(&RoleBindingList{}, func(obj interface{}) { SetObjectDefaults_RoleBindingList(obj.(*RoleBindingList)) }) + return nil +} + +func SetObjectDefaults_ClusterRoleBinding(in *ClusterRoleBinding) { + SetDefaults_ClusterRoleBinding(in) +} + +func SetObjectDefaults_ClusterRoleBindingList(in *ClusterRoleBindingList) { + for i := range in.Items { + a := &in.Items[i] + SetObjectDefaults_ClusterRoleBinding(a) + } +} + +func SetObjectDefaults_RoleBinding(in *RoleBinding) { + SetDefaults_RoleBinding(in) +} + +func SetObjectDefaults_RoleBindingList(in *RoleBindingList) { + for i := range in.Items { + a := &in.Items[i] + SetObjectDefaults_RoleBinding(a) + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/apis/rbac/validation/BUILD b/vendor/k8s.io/kubernetes/pkg/apis/rbac/validation/BUILD index 44341728..eeb39a6f 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/rbac/validation/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/validation/BUILD @@ -26,8 +26,8 @@ go_test( library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//pkg/apis/rbac:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/util/validation/field", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/apis/rbac/validation/validation_test.go b/vendor/k8s.io/kubernetes/pkg/apis/rbac/validation/validation_test.go index 4868a92e..25416b00 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/rbac/validation/validation_test.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/validation/validation_test.go @@ -19,15 +19,15 @@ package validation import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/validation/field" - "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/rbac" ) func TestValidateClusterRoleBinding(t *testing.T) { errs := ValidateClusterRoleBinding( &rbac.ClusterRoleBinding{ - ObjectMeta: api.ObjectMeta{Name: "master"}, + ObjectMeta: metav1.ObjectMeta{Name: "master"}, RoleRef: rbac.RoleRef{APIGroup: rbac.GroupName, Kind: "ClusterRole", Name: "valid"}, Subjects: []rbac.Subject{ {Name: "validsaname", Namespace: "foo", Kind: rbac.ServiceAccountKind}, @@ -47,7 +47,7 @@ func TestValidateClusterRoleBinding(t *testing.T) { }{ "bad group": { A: rbac.ClusterRoleBinding{ - ObjectMeta: api.ObjectMeta{Name: "default"}, + ObjectMeta: metav1.ObjectMeta{Name: "default"}, RoleRef: rbac.RoleRef{APIGroup: "rbac.GroupName", Kind: "ClusterRole", Name: "valid"}, }, T: field.ErrorTypeNotSupported, @@ -55,7 +55,7 @@ func TestValidateClusterRoleBinding(t *testing.T) { }, "bad kind": { A: rbac.ClusterRoleBinding{ - ObjectMeta: api.ObjectMeta{Name: "default"}, + ObjectMeta: metav1.ObjectMeta{Name: "default"}, RoleRef: rbac.RoleRef{APIGroup: rbac.GroupName, Kind: "Type", Name: "valid"}, }, T: field.ErrorTypeNotSupported, @@ -63,7 +63,7 @@ func TestValidateClusterRoleBinding(t *testing.T) { }, "reference role": { A: rbac.ClusterRoleBinding{ - ObjectMeta: api.ObjectMeta{Name: "default"}, + ObjectMeta: metav1.ObjectMeta{Name: "default"}, RoleRef: rbac.RoleRef{APIGroup: rbac.GroupName, Kind: "Role", Name: "valid"}, }, T: field.ErrorTypeNotSupported, @@ -71,7 +71,7 @@ func TestValidateClusterRoleBinding(t *testing.T) { }, "zero-length name": { A: rbac.ClusterRoleBinding{ - ObjectMeta: api.ObjectMeta{}, + ObjectMeta: metav1.ObjectMeta{}, RoleRef: rbac.RoleRef{APIGroup: rbac.GroupName, Kind: "ClusterRole", Name: "valid"}, }, T: field.ErrorTypeRequired, @@ -79,7 +79,7 @@ func TestValidateClusterRoleBinding(t *testing.T) { }, "bad role": { A: rbac.ClusterRoleBinding{ - ObjectMeta: api.ObjectMeta{Name: "default"}, + ObjectMeta: metav1.ObjectMeta{Name: "default"}, RoleRef: rbac.RoleRef{APIGroup: rbac.GroupName, Kind: "ClusterRole"}, }, T: field.ErrorTypeRequired, @@ -87,7 +87,7 @@ func TestValidateClusterRoleBinding(t *testing.T) { }, "bad subject kind": { A: rbac.ClusterRoleBinding{ - ObjectMeta: api.ObjectMeta{Name: "master"}, + ObjectMeta: metav1.ObjectMeta{Name: "master"}, RoleRef: rbac.RoleRef{APIGroup: rbac.GroupName, Kind: "ClusterRole", Name: "valid"}, Subjects: []rbac.Subject{{Name: "subject"}}, }, @@ -96,7 +96,7 @@ func TestValidateClusterRoleBinding(t *testing.T) { }, "bad subject name": { A: rbac.ClusterRoleBinding{ - ObjectMeta: api.ObjectMeta{Name: "master"}, + ObjectMeta: metav1.ObjectMeta{Name: "master"}, RoleRef: rbac.RoleRef{APIGroup: rbac.GroupName, Kind: "ClusterRole", Name: "valid"}, Subjects: []rbac.Subject{{Namespace: "foo", Name: "subject:bad", Kind: rbac.ServiceAccountKind}}, }, @@ -105,7 +105,7 @@ func TestValidateClusterRoleBinding(t *testing.T) { }, "missing SA namespace": { A: rbac.ClusterRoleBinding{ - ObjectMeta: api.ObjectMeta{Name: "master"}, + ObjectMeta: metav1.ObjectMeta{Name: "master"}, RoleRef: rbac.RoleRef{APIGroup: rbac.GroupName, Kind: "ClusterRole", Name: "valid"}, Subjects: []rbac.Subject{{Name: "good", Kind: rbac.ServiceAccountKind}}, }, @@ -114,7 +114,7 @@ func TestValidateClusterRoleBinding(t *testing.T) { }, "missing subject name": { A: rbac.ClusterRoleBinding{ - ObjectMeta: api.ObjectMeta{Name: "master"}, + ObjectMeta: metav1.ObjectMeta{Name: "master"}, RoleRef: rbac.RoleRef{APIGroup: rbac.GroupName, Kind: "ClusterRole", Name: "valid"}, Subjects: []rbac.Subject{{Namespace: "foo", Kind: rbac.ServiceAccountKind}}, }, @@ -142,7 +142,7 @@ func TestValidateClusterRoleBinding(t *testing.T) { func TestValidateRoleBinding(t *testing.T) { errs := ValidateRoleBinding( &rbac.RoleBinding{ - ObjectMeta: api.ObjectMeta{Namespace: api.NamespaceDefault, Name: "master"}, + ObjectMeta: metav1.ObjectMeta{Namespace: metav1.NamespaceDefault, Name: "master"}, RoleRef: rbac.RoleRef{APIGroup: rbac.GroupName, Kind: "Role", Name: "valid"}, Subjects: []rbac.Subject{ {Name: "validsaname", Kind: rbac.ServiceAccountKind}, @@ -162,7 +162,7 @@ func TestValidateRoleBinding(t *testing.T) { }{ "bad group": { A: rbac.RoleBinding{ - ObjectMeta: api.ObjectMeta{Namespace: api.NamespaceDefault, Name: "default"}, + ObjectMeta: metav1.ObjectMeta{Namespace: metav1.NamespaceDefault, Name: "default"}, RoleRef: rbac.RoleRef{APIGroup: "rbac.GroupName", Kind: "ClusterRole", Name: "valid"}, }, T: field.ErrorTypeNotSupported, @@ -170,7 +170,7 @@ func TestValidateRoleBinding(t *testing.T) { }, "bad kind": { A: rbac.RoleBinding{ - ObjectMeta: api.ObjectMeta{Namespace: api.NamespaceDefault, Name: "default"}, + ObjectMeta: metav1.ObjectMeta{Namespace: metav1.NamespaceDefault, Name: "default"}, RoleRef: rbac.RoleRef{APIGroup: rbac.GroupName, Kind: "Type", Name: "valid"}, }, T: field.ErrorTypeNotSupported, @@ -178,7 +178,7 @@ func TestValidateRoleBinding(t *testing.T) { }, "zero-length namespace": { A: rbac.RoleBinding{ - ObjectMeta: api.ObjectMeta{Name: "default"}, + ObjectMeta: metav1.ObjectMeta{Name: "default"}, RoleRef: rbac.RoleRef{APIGroup: rbac.GroupName, Kind: "Role", Name: "valid"}, }, T: field.ErrorTypeRequired, @@ -186,7 +186,7 @@ func TestValidateRoleBinding(t *testing.T) { }, "zero-length name": { A: rbac.RoleBinding{ - ObjectMeta: api.ObjectMeta{Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Namespace: metav1.NamespaceDefault}, RoleRef: rbac.RoleRef{APIGroup: rbac.GroupName, Kind: "Role", Name: "valid"}, }, T: field.ErrorTypeRequired, @@ -194,7 +194,7 @@ func TestValidateRoleBinding(t *testing.T) { }, "bad role": { A: rbac.RoleBinding{ - ObjectMeta: api.ObjectMeta{Namespace: api.NamespaceDefault, Name: "default"}, + ObjectMeta: metav1.ObjectMeta{Namespace: metav1.NamespaceDefault, Name: "default"}, RoleRef: rbac.RoleRef{APIGroup: rbac.GroupName, Kind: "Role"}, }, T: field.ErrorTypeRequired, @@ -202,7 +202,7 @@ func TestValidateRoleBinding(t *testing.T) { }, "bad subject kind": { A: rbac.RoleBinding{ - ObjectMeta: api.ObjectMeta{Namespace: api.NamespaceDefault, Name: "master"}, + ObjectMeta: metav1.ObjectMeta{Namespace: metav1.NamespaceDefault, Name: "master"}, RoleRef: rbac.RoleRef{APIGroup: rbac.GroupName, Kind: "Role", Name: "valid"}, Subjects: []rbac.Subject{{Name: "subject"}}, }, @@ -211,7 +211,7 @@ func TestValidateRoleBinding(t *testing.T) { }, "bad subject name": { A: rbac.RoleBinding{ - ObjectMeta: api.ObjectMeta{Namespace: api.NamespaceDefault, Name: "master"}, + ObjectMeta: metav1.ObjectMeta{Namespace: metav1.NamespaceDefault, Name: "master"}, RoleRef: rbac.RoleRef{APIGroup: rbac.GroupName, Kind: "Role", Name: "valid"}, Subjects: []rbac.Subject{{Name: "subject:bad", Kind: rbac.ServiceAccountKind}}, }, @@ -220,7 +220,7 @@ func TestValidateRoleBinding(t *testing.T) { }, "missing subject name": { A: rbac.RoleBinding{ - ObjectMeta: api.ObjectMeta{Namespace: api.NamespaceDefault, Name: "master"}, + ObjectMeta: metav1.ObjectMeta{Namespace: metav1.NamespaceDefault, Name: "master"}, RoleRef: rbac.RoleRef{APIGroup: rbac.GroupName, Kind: "Role", Name: "valid"}, Subjects: []rbac.Subject{{Kind: rbac.ServiceAccountKind}}, }, @@ -247,13 +247,13 @@ func TestValidateRoleBinding(t *testing.T) { func TestValidateRoleBindingUpdate(t *testing.T) { old := &rbac.RoleBinding{ - ObjectMeta: api.ObjectMeta{Namespace: api.NamespaceDefault, Name: "master", ResourceVersion: "1"}, + ObjectMeta: metav1.ObjectMeta{Namespace: metav1.NamespaceDefault, Name: "master", ResourceVersion: "1"}, RoleRef: rbac.RoleRef{APIGroup: rbac.GroupName, Kind: "Role", Name: "valid"}, } errs := ValidateRoleBindingUpdate( &rbac.RoleBinding{ - ObjectMeta: api.ObjectMeta{Namespace: api.NamespaceDefault, Name: "master", ResourceVersion: "1"}, + ObjectMeta: metav1.ObjectMeta{Namespace: metav1.NamespaceDefault, Name: "master", ResourceVersion: "1"}, RoleRef: rbac.RoleRef{APIGroup: rbac.GroupName, Kind: "Role", Name: "valid"}, }, old, @@ -269,7 +269,7 @@ func TestValidateRoleBindingUpdate(t *testing.T) { }{ "changedRef": { A: rbac.RoleBinding{ - ObjectMeta: api.ObjectMeta{Namespace: api.NamespaceDefault, Name: "master", ResourceVersion: "1"}, + ObjectMeta: metav1.ObjectMeta{Namespace: metav1.NamespaceDefault, Name: "master", ResourceVersion: "1"}, RoleRef: rbac.RoleRef{APIGroup: rbac.GroupName, Kind: "Role", Name: "changed"}, }, T: field.ErrorTypeInvalid, @@ -354,7 +354,7 @@ func (v ValidateClusterRoleTest) test(t *testing.T) { func TestValidateRoleZeroLengthNamespace(t *testing.T) { ValidateRoleTest{ role: rbac.Role{ - ObjectMeta: api.ObjectMeta{Name: "default"}, + ObjectMeta: metav1.ObjectMeta{Name: "default"}, }, wantErr: true, errType: field.ErrorTypeRequired, @@ -365,7 +365,7 @@ func TestValidateRoleZeroLengthNamespace(t *testing.T) { func TestValidateRoleZeroLengthName(t *testing.T) { ValidateRoleTest{ role: rbac.Role{ - ObjectMeta: api.ObjectMeta{Namespace: "default"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "default"}, }, wantErr: true, errType: field.ErrorTypeRequired, @@ -376,7 +376,7 @@ func TestValidateRoleZeroLengthName(t *testing.T) { func TestValidateRoleValidRole(t *testing.T) { ValidateRoleTest{ role: rbac.Role{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "default", Name: "default", }, @@ -388,7 +388,7 @@ func TestValidateRoleValidRole(t *testing.T) { func TestValidateRoleValidRoleNoNamespace(t *testing.T) { ValidateClusterRoleTest{ role: rbac.ClusterRole{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "default", }, }, @@ -399,7 +399,7 @@ func TestValidateRoleValidRoleNoNamespace(t *testing.T) { func TestValidateRoleNonResourceURL(t *testing.T) { ValidateClusterRoleTest{ role: rbac.ClusterRole{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "default", }, Rules: []rbac.PolicyRule{ @@ -416,7 +416,7 @@ func TestValidateRoleNonResourceURL(t *testing.T) { func TestValidateRoleNamespacedNonResourceURL(t *testing.T) { ValidateRoleTest{ role: rbac.Role{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "default", Name: "default", }, @@ -437,7 +437,7 @@ func TestValidateRoleNamespacedNonResourceURL(t *testing.T) { func TestValidateRoleNonResourceURLNoVerbs(t *testing.T) { ValidateClusterRoleTest{ role: rbac.ClusterRole{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "default", }, Rules: []rbac.PolicyRule{ @@ -456,7 +456,7 @@ func TestValidateRoleNonResourceURLNoVerbs(t *testing.T) { func TestValidateRoleMixedNonResourceAndResource(t *testing.T) { ValidateRoleTest{ role: rbac.Role{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "default", Namespace: "default", }, @@ -478,7 +478,7 @@ func TestValidateRoleMixedNonResourceAndResource(t *testing.T) { func TestValidateRoleValidResource(t *testing.T) { ValidateRoleTest{ role: rbac.Role{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "default", Namespace: "default", }, @@ -497,7 +497,7 @@ func TestValidateRoleValidResource(t *testing.T) { func TestValidateRoleNoAPIGroup(t *testing.T) { ValidateRoleTest{ role: rbac.Role{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "default", Namespace: "default", }, @@ -517,7 +517,7 @@ func TestValidateRoleNoAPIGroup(t *testing.T) { func TestValidateRoleNoResources(t *testing.T) { ValidateRoleTest{ role: rbac.Role{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "default", Namespace: "default", }, diff --git a/vendor/k8s.io/kubernetes/pkg/apis/rbac/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/rbac/zz_generated.deepcopy.go index 1120b428..db5d08cd 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/rbac/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/rbac/zz_generated.deepcopy.go @@ -21,9 +21,9 @@ limitations under the License. package rbac import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - api "k8s.io/kubernetes/pkg/api" reflect "reflect" ) @@ -54,8 +54,10 @@ func DeepCopy_rbac_ClusterRole(in interface{}, out interface{}, c *conversion.Cl in := in.(*ClusterRole) out := out.(*ClusterRole) *out = *in - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.Rules != nil { in, out := &in.Rules, &out.Rules @@ -75,15 +77,15 @@ func DeepCopy_rbac_ClusterRoleBinding(in interface{}, out interface{}, c *conver in := in.(*ClusterRoleBinding) out := out.(*ClusterRoleBinding) *out = *in - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.Subjects != nil { in, out := &in.Subjects, &out.Subjects *out = make([]Subject, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } @@ -135,14 +137,6 @@ func DeepCopy_rbac_PolicyRule(in interface{}, out interface{}, c *conversion.Clo *out = make([]string, len(*in)) copy(*out, *in) } - // in.AttributeRestrictions is kind 'Interface' - if in.AttributeRestrictions != nil { - if newVal, err := c.DeepCopy(&in.AttributeRestrictions); err != nil { - return err - } else { - out.AttributeRestrictions = *newVal.(*runtime.Object) - } - } if in.APIGroups != nil { in, out := &in.APIGroups, &out.APIGroups *out = make([]string, len(*in)) @@ -172,8 +166,10 @@ func DeepCopy_rbac_Role(in interface{}, out interface{}, c *conversion.Cloner) e in := in.(*Role) out := out.(*Role) *out = *in - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.Rules != nil { in, out := &in.Rules, &out.Rules @@ -193,15 +189,15 @@ func DeepCopy_rbac_RoleBinding(in interface{}, out interface{}, c *conversion.Cl in := in.(*RoleBinding) out := out.(*RoleBinding) *out = *in - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.Subjects != nil { in, out := &in.Subjects, &out.Subjects *out = make([]Subject, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/storage/BUILD b/vendor/k8s.io/kubernetes/pkg/apis/storage/BUILD index eb60d28d..fc2be2fc 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/storage/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/apis/storage/BUILD @@ -17,7 +17,6 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/conversion", "//vendor:k8s.io/apimachinery/pkg/runtime", diff --git a/vendor/k8s.io/kubernetes/pkg/apis/storage/install/BUILD b/vendor/k8s.io/kubernetes/pkg/apis/storage/install/BUILD index 21aadc85..45a3189c 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/storage/install/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/apis/storage/install/BUILD @@ -12,9 +12,12 @@ go_library( srcs = ["install.go"], tags = ["automanaged"], deps = [ - "//pkg/apimachinery/announced:go_default_library", + "//pkg/api:go_default_library", "//pkg/apis/storage:go_default_library", "//pkg/apis/storage/v1beta1:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apimachinery/announced", + "//vendor:k8s.io/apimachinery/pkg/apimachinery/registered", + "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/sets", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/apis/storage/install/install.go b/vendor/k8s.io/kubernetes/pkg/apis/storage/install/install.go index bfd3328b..955c7e79 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/storage/install/install.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/storage/install/install.go @@ -19,13 +19,21 @@ limitations under the License. package install import ( + "k8s.io/apimachinery/pkg/apimachinery/announced" + "k8s.io/apimachinery/pkg/apimachinery/registered" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/kubernetes/pkg/apimachinery/announced" + "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/storage" "k8s.io/kubernetes/pkg/apis/storage/v1beta1" ) func init() { + Install(api.GroupFactoryRegistry, api.Registry, api.Scheme) +} + +// Install registers the API group and adds types to a scheme +func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) { if err := announced.NewGroupMetaFactory( &announced.GroupMetaFactoryArgs{ GroupName: storage.GroupName, @@ -37,7 +45,7 @@ func init() { announced.VersionToSchemeFunc{ v1beta1.SchemeGroupVersion.Version: v1beta1.AddToScheme, }, - ).Announce().RegisterAndEnable(); err != nil { + ).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil { panic(err) } } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/storage/register.go b/vendor/k8s.io/kubernetes/pkg/apis/storage/register.go index 1e2a5ef6..aaa619b4 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/storage/register.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/storage/register.go @@ -17,10 +17,8 @@ limitations under the License. package storage import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/api" ) // GroupName is the group name use in this package @@ -46,11 +44,6 @@ var ( func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, - &api.ListOptions{}, - &api.DeleteOptions{}, - &metav1.ExportOptions{}, - &metav1.GetOptions{}, - &StorageClass{}, &StorageClassList{}, ) diff --git a/vendor/k8s.io/kubernetes/pkg/apis/storage/types.go b/vendor/k8s.io/kubernetes/pkg/apis/storage/types.go index c64b9ff3..3d589de5 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/storage/types.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/storage/types.go @@ -16,10 +16,7 @@ limitations under the License. package storage -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/kubernetes/pkg/api" -) +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" // +genclient=true // +nonNamespaced=true @@ -33,7 +30,7 @@ import ( type StorageClass struct { metav1.TypeMeta // +optional - api.ObjectMeta + metav1.ObjectMeta // provisioner is the driver expected to handle this StorageClass. // This is an optionally-prefixed name, like a label key. diff --git a/vendor/k8s.io/kubernetes/pkg/apis/storage/util/BUILD b/vendor/k8s.io/kubernetes/pkg/apis/storage/util/BUILD index 98994e14..ae41502e 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/storage/util/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/apis/storage/util/BUILD @@ -11,7 +11,10 @@ go_library( name = "go_default_library", srcs = ["helpers.go"], tags = ["automanaged"], - deps = ["//pkg/api:go_default_library"], + deps = [ + "//pkg/api:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + ], ) filegroup( diff --git a/vendor/k8s.io/kubernetes/pkg/apis/storage/util/helpers.go b/vendor/k8s.io/kubernetes/pkg/apis/storage/util/helpers.go index 49eada99..8df24acb 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/storage/util/helpers.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/storage/util/helpers.go @@ -17,6 +17,7 @@ limitations under the License. package util import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api" ) @@ -75,7 +76,7 @@ func GetClaimStorageClass(claim *api.PersistentVolumeClaim) string { // GetStorageClassAnnotation returns the StorageClass value // if the annotation is set, empty string if not // TODO: remove Alpha and Beta when no longer used or needed -func GetStorageClassAnnotation(obj api.ObjectMeta) string { +func GetStorageClassAnnotation(obj metav1.ObjectMeta) string { if class, ok := obj.Annotations[StorageClassAnnotation]; ok { return class } @@ -92,7 +93,7 @@ func GetStorageClassAnnotation(obj api.ObjectMeta) string { // HasStorageClassAnnotation returns a boolean // if the annotation is set // TODO: remove Alpha and Beta when no longer used or needed -func HasStorageClassAnnotation(obj api.ObjectMeta) bool { +func HasStorageClassAnnotation(obj metav1.ObjectMeta) bool { if _, found := obj.Annotations[StorageClassAnnotation]; found { return found } @@ -110,7 +111,7 @@ func HasStorageClassAnnotation(obj api.ObjectMeta) bool { // IsDefaultAnnotationText returns a pretty Yes/No String if // the annotation is set // TODO: remove Beta when no longer needed -func IsDefaultAnnotationText(obj api.ObjectMeta) string { +func IsDefaultAnnotationText(obj metav1.ObjectMeta) string { if obj.Annotations[IsDefaultStorageClassAnnotation] == "true" { return "Yes" } @@ -124,7 +125,7 @@ func IsDefaultAnnotationText(obj api.ObjectMeta) string { // IsDefaultAnnotation returns a boolean if // the annotation is set // TODO: remove Beta when no longer needed -func IsDefaultAnnotation(obj api.ObjectMeta) bool { +func IsDefaultAnnotation(obj metav1.ObjectMeta) bool { if obj.Annotations[IsDefaultStorageClassAnnotation] == "true" { return true } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/BUILD b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/BUILD index 6f171021..5d325ea3 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/BUILD @@ -22,7 +22,6 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api/v1:go_default_library", "//pkg/apis/storage:go_default_library", "//vendor:github.com/gogo/protobuf/proto", "//vendor:github.com/gogo/protobuf/sortkeys", diff --git a/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/generated.pb.go b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/generated.pb.go index 284e1cb8..561cf5ab 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/generated.pb.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/generated.pb.go @@ -233,7 +233,7 @@ func (this *StorageClass) String() string { } mapStringForParameters += "}" s := strings.Join([]string{`&StorageClass{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Provisioner:` + fmt.Sprintf("%v", this.Provisioner) + `,`, `Parameters:` + mapStringForParameters + `,`, `}`, @@ -696,36 +696,36 @@ var ( ) var fileDescriptorGenerated = []byte{ - // 483 bytes of a gzipped FileDescriptorProto + // 481 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x9c, 0x92, 0xcf, 0x8b, 0xd3, 0x40, 0x14, 0xc7, 0x93, 0x96, 0xe2, 0xee, 0x54, 0xb1, 0x44, 0x0f, 0xa5, 0x87, 0x6c, 0xd9, 0x53, 0x15, - 0x9d, 0xa1, 0x45, 0xa5, 0x2c, 0x78, 0xa9, 0x08, 0x0a, 0x8a, 0x4b, 0xbc, 0x88, 0xe8, 0x61, 0x92, - 0x7d, 0xa6, 0x63, 0x9a, 0x4c, 0x98, 0x79, 0x09, 0x14, 0x3c, 0xf8, 0x27, 0xf8, 0x67, 0xf5, 0xe6, - 0x1e, 0x3d, 0xc8, 0x62, 0xe3, 0x3f, 0x22, 0xf9, 0xb1, 0x9b, 0xb0, 0x69, 0x51, 0xbc, 0xe5, 0xcd, - 0xbc, 0xcf, 0xf7, 0xbd, 0xef, 0x37, 0x43, 0x4e, 0x82, 0xb9, 0xa6, 0x42, 0xb2, 0x20, 0x71, 0x41, - 0x45, 0x80, 0xa0, 0x59, 0x1c, 0xf8, 0x8c, 0xc7, 0x42, 0x33, 0x8d, 0x52, 0x71, 0x1f, 0x58, 0x3a, - 0x75, 0x01, 0xf9, 0x94, 0xf9, 0x10, 0x81, 0xe2, 0x08, 0x67, 0x34, 0x56, 0x12, 0xa5, 0x75, 0xbf, - 0x64, 0x69, 0xcd, 0xd2, 0x38, 0xf0, 0x69, 0xce, 0xd2, 0x8a, 0xa5, 0x15, 0x3b, 0x7a, 0xe8, 0x0b, - 0x5c, 0x26, 0x2e, 0xf5, 0x64, 0xc8, 0x7c, 0xe9, 0x4b, 0x56, 0x48, 0xb8, 0xc9, 0xa7, 0xa2, 0x2a, - 0x8a, 0xe2, 0xab, 0x94, 0x1e, 0x3d, 0xaa, 0xd6, 0xe2, 0xb1, 0x08, 0xb9, 0xb7, 0x14, 0x11, 0xa8, - 0x75, 0xbd, 0x58, 0x08, 0xc8, 0x59, 0xda, 0x5a, 0x68, 0xc4, 0xf6, 0x51, 0x2a, 0x89, 0x50, 0x84, - 0xd0, 0x02, 0x9e, 0xfc, 0x0d, 0xd0, 0xde, 0x12, 0x42, 0xde, 0xe2, 0x66, 0x7b, 0x53, 0x63, 0x0a, - 0xb4, 0x4c, 0x94, 0xd7, 0x9e, 0xf5, 0x60, 0x3f, 0xb3, 0xc3, 0xca, 0x74, 0x77, 0x77, 0x82, 0x62, - 0xc5, 0x44, 0x84, 0x1a, 0xd5, 0x75, 0xe4, 0xf8, 0x67, 0x87, 0xdc, 0x7c, 0x5b, 0xc6, 0xfe, 0x6c, - 0xc5, 0xb5, 0xb6, 0xde, 0x91, 0x83, 0x3c, 0xa9, 0x33, 0x8e, 0x7c, 0x68, 0x8e, 0xcd, 0x49, 0x7f, - 0x36, 0xa1, 0x7b, 0x7f, 0x19, 0x4d, 0xa7, 0xf4, 0x8d, 0xfb, 0x19, 0x3c, 0x7c, 0x0d, 0xc8, 0x17, - 0xd6, 0xe6, 0xe2, 0xc8, 0xc8, 0x2e, 0x8e, 0x48, 0x7d, 0xe6, 0x5c, 0xa9, 0x59, 0x8f, 0x49, 0x3f, - 0x56, 0x32, 0x15, 0x5a, 0xc8, 0x08, 0xd4, 0xb0, 0x33, 0x36, 0x27, 0x87, 0x8b, 0x3b, 0x15, 0xd2, - 0x3f, 0xad, 0xaf, 0x9c, 0x66, 0x9f, 0xf5, 0x85, 0x90, 0x98, 0x2b, 0x1e, 0x02, 0x82, 0xd2, 0xc3, - 0xee, 0xb8, 0x3b, 0xe9, 0xcf, 0x5e, 0xd0, 0x7f, 0x7f, 0x45, 0xb4, 0x69, 0x8f, 0x9e, 0x5e, 0x49, - 0x3d, 0x8f, 0x50, 0xad, 0xeb, 0x95, 0xeb, 0x0b, 0xa7, 0x31, 0x6f, 0xf4, 0x94, 0xdc, 0xbe, 0x86, - 0x58, 0x03, 0xd2, 0x0d, 0x60, 0x5d, 0x84, 0x73, 0xe8, 0xe4, 0x9f, 0xd6, 0x5d, 0xd2, 0x4b, 0xf9, - 0x2a, 0x81, 0xd2, 0x93, 0x53, 0x16, 0x27, 0x9d, 0xb9, 0x79, 0xfc, 0xdd, 0x24, 0x83, 0xe6, 0xfc, - 0x57, 0x42, 0xa3, 0xf5, 0xa1, 0x15, 0x31, 0xbd, 0xf4, 0xd3, 0x7c, 0x53, 0xb5, 0xa3, 0xbc, 0x3b, - 0x8f, 0x3a, 0xa7, 0x8b, 0xa0, 0x07, 0xd5, 0xd6, 0x07, 0x97, 0x27, 0x8d, 0x98, 0x3f, 0x92, 0x9e, - 0x40, 0x08, 0xf5, 0xb0, 0x53, 0x44, 0x35, 0xff, 0xdf, 0xa8, 0x16, 0xb7, 0xaa, 0x21, 0xbd, 0x97, - 0xb9, 0x9c, 0x53, 0xaa, 0x2e, 0xee, 0x6d, 0xb6, 0xb6, 0x71, 0xbe, 0xb5, 0x8d, 0x1f, 0x5b, 0xdb, - 0xf8, 0x9a, 0xd9, 0xe6, 0x26, 0xb3, 0xcd, 0xf3, 0xcc, 0x36, 0x7f, 0x65, 0xb6, 0xf9, 0xed, 0xb7, - 0x6d, 0xbc, 0xbf, 0x51, 0xa9, 0xfd, 0x09, 0x00, 0x00, 0xff, 0xff, 0x7c, 0x5e, 0x19, 0x8e, 0x27, - 0x04, 0x00, 0x00, + 0x9d, 0xb1, 0x45, 0xa5, 0x2c, 0x78, 0xa9, 0x08, 0x0a, 0x8a, 0x4b, 0xbc, 0x89, 0x82, 0x93, 0xec, + 0x33, 0x1d, 0xd3, 0x64, 0xc2, 0xcc, 0x4b, 0xa0, 0xe0, 0xc1, 0x3f, 0xc1, 0x3f, 0xab, 0x37, 0xf7, + 0xe8, 0x69, 0xb1, 0xd1, 0x3f, 0x44, 0xf2, 0xc3, 0x4d, 0xd8, 0x6c, 0x71, 0xd9, 0x5b, 0xde, 0xcc, + 0xfb, 0x7c, 0xdf, 0xf7, 0x7d, 0x27, 0xe4, 0x28, 0x98, 0x6b, 0x2a, 0x24, 0x0b, 0x12, 0x17, 0x54, + 0x04, 0x08, 0x9a, 0xc5, 0x81, 0xcf, 0x78, 0x2c, 0x34, 0xd3, 0x28, 0x15, 0xf7, 0x81, 0xa5, 0x53, + 0x17, 0x90, 0x4f, 0x99, 0x0f, 0x11, 0x28, 0x8e, 0x70, 0x42, 0x63, 0x25, 0x51, 0x5a, 0xf7, 0x4b, + 0x96, 0xd6, 0x2c, 0x8d, 0x03, 0x9f, 0xe6, 0x2c, 0xad, 0x58, 0x5a, 0xb1, 0xa3, 0x87, 0xbe, 0xc0, + 0x65, 0xe2, 0x52, 0x4f, 0x86, 0xcc, 0x97, 0xbe, 0x64, 0x85, 0x84, 0x9b, 0x7c, 0x2e, 0xaa, 0xa2, + 0x28, 0xbe, 0x4a, 0xe9, 0xd1, 0xe3, 0xca, 0x16, 0x8f, 0x45, 0xc8, 0xbd, 0xa5, 0x88, 0x40, 0xad, + 0x6b, 0x63, 0x21, 0x20, 0x67, 0x69, 0xcb, 0xd0, 0x88, 0xed, 0xa2, 0x54, 0x12, 0xa1, 0x08, 0xa1, + 0x05, 0x3c, 0xfd, 0x1f, 0xa0, 0xbd, 0x25, 0x84, 0xbc, 0xc5, 0xcd, 0x76, 0xa6, 0xc6, 0x14, 0x68, + 0x99, 0x28, 0xaf, 0x3d, 0xeb, 0xc1, 0x6e, 0xe6, 0x92, 0x55, 0xa6, 0x97, 0x77, 0x27, 0x28, 0x56, + 0x4c, 0x44, 0xa8, 0x51, 0x5d, 0x44, 0x0e, 0xff, 0x74, 0xc8, 0xcd, 0x77, 0x65, 0xec, 0xcf, 0x57, + 0x5c, 0x6b, 0xeb, 0x13, 0xd9, 0xcb, 0x93, 0x3a, 0xe1, 0xc8, 0x87, 0xe6, 0xd8, 0x9c, 0xf4, 0x67, + 0x8f, 0x68, 0xf5, 0x64, 0xcd, 0x85, 0xeb, 0x47, 0xcb, 0xbb, 0x69, 0x3a, 0xa5, 0x6f, 0xdd, 0x2f, + 0xe0, 0xe1, 0x1b, 0x40, 0xbe, 0xb0, 0x36, 0x67, 0x07, 0x46, 0x76, 0x76, 0x40, 0xea, 0x33, 0xe7, + 0x5c, 0xd5, 0x7a, 0x42, 0xfa, 0xb1, 0x92, 0xa9, 0xd0, 0x42, 0x46, 0xa0, 0x86, 0x9d, 0xb1, 0x39, + 0xd9, 0x5f, 0xdc, 0xa9, 0x90, 0xfe, 0x71, 0x7d, 0xe5, 0x34, 0xfb, 0xac, 0xaf, 0x84, 0xc4, 0x5c, + 0xf1, 0x10, 0x10, 0x94, 0x1e, 0x76, 0xc7, 0xdd, 0x49, 0x7f, 0xf6, 0x92, 0x5e, 0xfd, 0x6f, 0xa2, + 0xcd, 0x35, 0xe9, 0xf1, 0xb9, 0xd4, 0x8b, 0x08, 0xd5, 0xba, 0xb6, 0x5c, 0x5f, 0x38, 0x8d, 0x79, + 0xa3, 0x67, 0xe4, 0xf6, 0x05, 0xc4, 0x1a, 0x90, 0x6e, 0x00, 0xeb, 0x22, 0xa4, 0x7d, 0x27, 0xff, + 0xb4, 0xee, 0x92, 0x5e, 0xca, 0x57, 0x09, 0x94, 0x3b, 0x39, 0x65, 0x71, 0xd4, 0x99, 0x9b, 0x87, + 0x3f, 0x4c, 0x32, 0x68, 0xce, 0x7f, 0x2d, 0x34, 0x5a, 0x1f, 0x5a, 0x51, 0xd3, 0xab, 0x45, 0x9d, + 0xd3, 0x45, 0xd0, 0x83, 0xca, 0xf5, 0xde, 0xbf, 0x93, 0x46, 0xcc, 0x1f, 0x49, 0x4f, 0x20, 0x84, + 0x7a, 0xd8, 0x29, 0xa2, 0x9a, 0x5f, 0x37, 0xaa, 0xc5, 0xad, 0x6a, 0x48, 0xef, 0x55, 0x2e, 0xe7, + 0x94, 0xaa, 0x8b, 0x7b, 0x9b, 0xad, 0x6d, 0x9c, 0x6e, 0x6d, 0xe3, 0xe7, 0xd6, 0x36, 0xbe, 0x65, + 0xb6, 0xb9, 0xc9, 0x6c, 0xf3, 0x34, 0xb3, 0xcd, 0x5f, 0x99, 0x6d, 0x7e, 0xff, 0x6d, 0x1b, 0xef, + 0x6f, 0x54, 0x6a, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xfe, 0xb6, 0x02, 0x5f, 0x2f, 0x04, 0x00, + 0x00, } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/generated.proto b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/generated.proto index 6b3c7b84..8c89490b 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/generated.proto +++ b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/generated.proto @@ -40,7 +40,7 @@ message StorageClass { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Provisioner indicates the type of the provisioner. optional string provisioner = 2; diff --git a/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/register.go b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/register.go index aa056f16..70087f37 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/register.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/register.go @@ -20,7 +20,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/api/v1" ) // GroupName is the group name use in this package @@ -42,11 +41,6 @@ var ( // Adds the list of known types to api.Scheme. func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, - &v1.ListOptions{}, - &v1.DeleteOptions{}, - &metav1.ExportOptions{}, - &metav1.GetOptions{}, - &StorageClass{}, &StorageClassList{}, ) diff --git a/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/types.generated.go b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/types.generated.go index 98cffee4..ddc516b2 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/types.generated.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/types.generated.go @@ -26,8 +26,7 @@ import ( "fmt" codec1978 "github.com/ugorji/go/codec" pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - pkg3_types "k8s.io/apimachinery/pkg/types" - pkg2_v1 "k8s.io/kubernetes/pkg/api/v1" + pkg2_types "k8s.io/apimachinery/pkg/types" "reflect" "runtime" time "time" @@ -64,10 +63,9 @@ func init() { } if false { // reference the types, but skip this branch at build/run time var v0 pkg1_v1.TypeMeta - var v1 pkg3_types.UID - var v2 pkg2_v1.ObjectMeta - var v3 time.Time - _, _, _, _ = v0, v1, v2, v3 + var v1 pkg2_types.UID + var v2 time.Time + _, _, _ = v0, v1, v2 } } @@ -159,7 +157,13 @@ func (x *StorageClass) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -169,7 +173,13 @@ func (x *StorageClass) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -311,33 +321,39 @@ func (x *StorageClass) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "provisioner": if r.TryDecodeAsNil() { x.Provisioner = "" } else { - yyv9 := &x.Provisioner - yym10 := z.DecBinary() - _ = yym10 + yyv10 := &x.Provisioner + yym11 := z.DecBinary() + _ = yym11 if false { } else { - *((*string)(yyv9)) = r.DecodeString() + *((*string)(yyv10)) = r.DecodeString() } } case "parameters": if r.TryDecodeAsNil() { x.Parameters = nil } else { - yyv11 := &x.Parameters - yym12 := z.DecBinary() - _ = yym12 + yyv12 := &x.Parameters + yym13 := z.DecBinary() + _ = yym13 if false { } else { - z.F.DecMapStringStringX(yyv11, false, d) + z.F.DecMapStringStringX(yyv12, false, d) } } default: @@ -351,16 +367,16 @@ func (x *StorageClass) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj13 int - var yyb13 bool - var yyhl13 bool = l >= 0 - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + var yyj14 int + var yyb14 bool + var yyhl14 bool = l >= 0 + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -368,21 +384,21 @@ func (x *StorageClass) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv14 := &x.Kind - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.Kind + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -390,38 +406,44 @@ func (x *StorageClass) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv16 := &x.APIVersion - yym17 := z.DecBinary() - _ = yym17 + yyv17 := &x.APIVersion + yym18 := z.DecBinary() + _ = yym18 if false { } else { - *((*string)(yyv16)) = r.DecodeString() + *((*string)(yyv17)) = r.DecodeString() } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv18 := &x.ObjectMeta - yyv18.CodecDecodeSelf(d) + yyv19 := &x.ObjectMeta + yym20 := z.DecBinary() + _ = yym20 + if false { + } else if z.HasExtensions() && z.DecExt(yyv19) { + } else { + z.DecFallback(yyv19, false) + } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -429,21 +451,21 @@ func (x *StorageClass) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Provisioner = "" } else { - yyv19 := &x.Provisioner - yym20 := z.DecBinary() - _ = yym20 + yyv21 := &x.Provisioner + yym22 := z.DecBinary() + _ = yym22 if false { } else { - *((*string)(yyv19)) = r.DecodeString() + *((*string)(yyv21)) = r.DecodeString() } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -451,26 +473,26 @@ func (x *StorageClass) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Parameters = nil } else { - yyv21 := &x.Parameters - yym22 := z.DecBinary() - _ = yym22 + yyv23 := &x.Parameters + yym24 := z.DecBinary() + _ = yym24 if false { } else { - z.F.DecMapStringStringX(yyv21, false, d) + z.F.DecMapStringStringX(yyv23, false, d) } } for { - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj13-1, "") + z.DecStructFieldNotFound(yyj14-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/types.go b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/types.go index b5fba8a4..afbd5bcd 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/types.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/types.go @@ -18,7 +18,6 @@ package v1beta1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/kubernetes/pkg/api/v1" ) // +genclient=true @@ -34,7 +33,7 @@ type StorageClass struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Provisioner indicates the type of the provisioner. Provisioner string `json:"provisioner" protobuf:"bytes,2,opt,name=provisioner"` diff --git a/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/util/BUILD b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/util/BUILD index 452870c2..3d639390 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/util/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/util/BUILD @@ -11,7 +11,10 @@ go_library( name = "go_default_library", srcs = ["helpers.go"], tags = ["automanaged"], - deps = ["//pkg/api/v1:go_default_library"], + deps = [ + "//pkg/api/v1:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + ], ) filegroup( diff --git a/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/util/helpers.go b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/util/helpers.go index 3aa0aafc..39c4f6f3 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/util/helpers.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/util/helpers.go @@ -16,7 +16,10 @@ limitations under the License. package util -import "k8s.io/kubernetes/pkg/api/v1" +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/kubernetes/pkg/api/v1" +) // IsDefaultStorageClassAnnotation represents a StorageClass annotation that // marks a class as the default StorageClass @@ -73,7 +76,7 @@ func GetClaimStorageClass(claim *v1.PersistentVolumeClaim) string { // GetStorageClassAnnotation returns the StorageClass value // if the annotation is set, empty string if not // TODO: remove Alpha and Beta when no longer used or needed -func GetStorageClassAnnotation(obj v1.ObjectMeta) string { +func GetStorageClassAnnotation(obj metav1.ObjectMeta) string { if class, ok := obj.Annotations[StorageClassAnnotation]; ok { return class } @@ -90,7 +93,7 @@ func GetStorageClassAnnotation(obj v1.ObjectMeta) string { // HasStorageClassAnnotation returns a boolean // if the annotation is set // TODO: remove Alpha and Beta when no longer used or needed -func HasStorageClassAnnotation(obj v1.ObjectMeta) bool { +func HasStorageClassAnnotation(obj metav1.ObjectMeta) bool { if _, found := obj.Annotations[StorageClassAnnotation]; found { return found } @@ -108,7 +111,7 @@ func HasStorageClassAnnotation(obj v1.ObjectMeta) bool { // IsDefaultAnnotationText returns a pretty Yes/No String if // the annotation is set // TODO: remove Beta when no longer needed -func IsDefaultAnnotationText(obj v1.ObjectMeta) string { +func IsDefaultAnnotationText(obj metav1.ObjectMeta) string { if obj.Annotations[IsDefaultStorageClassAnnotation] == "true" { return "Yes" } @@ -122,7 +125,7 @@ func IsDefaultAnnotationText(obj v1.ObjectMeta) string { // IsDefaultAnnotation returns a boolean if // the annotation is set // TODO: remove Beta when no longer needed -func IsDefaultAnnotation(obj v1.ObjectMeta) bool { +func IsDefaultAnnotation(obj metav1.ObjectMeta) bool { if obj.Annotations[IsDefaultStorageClassAnnotation] == "true" { return true } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/zz_generated.conversion.go index d1c2111d..55a2b744 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/zz_generated.conversion.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/zz_generated.conversion.go @@ -43,10 +43,7 @@ func RegisterConversions(scheme *runtime.Scheme) error { } func autoConvert_v1beta1_StorageClass_To_storage_StorageClass(in *StorageClass, out *storage.StorageClass, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.Provisioner = in.Provisioner out.Parameters = *(*map[string]string)(unsafe.Pointer(&in.Parameters)) return nil @@ -57,10 +54,7 @@ func Convert_v1beta1_StorageClass_To_storage_StorageClass(in *StorageClass, out } func autoConvert_storage_StorageClass_To_v1beta1_StorageClass(in *storage.StorageClass, out *StorageClass, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.Provisioner = in.Provisioner out.Parameters = *(*map[string]string)(unsafe.Pointer(&in.Parameters)) return nil diff --git a/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/zz_generated.deepcopy.go index 00a860cf..f2ea4f2f 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/storage/v1beta1/zz_generated.deepcopy.go @@ -21,9 +21,9 @@ limitations under the License. package v1beta1 import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - v1 "k8s.io/kubernetes/pkg/api/v1" reflect "reflect" ) @@ -45,8 +45,10 @@ func DeepCopy_v1beta1_StorageClass(in interface{}, out interface{}, c *conversio in := in.(*StorageClass) out := out.(*StorageClass) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.Parameters != nil { in, out := &in.Parameters, &out.Parameters diff --git a/vendor/k8s.io/kubernetes/pkg/apis/storage/validation/BUILD b/vendor/k8s.io/kubernetes/pkg/apis/storage/validation/BUILD index cc8689a9..562a1d7f 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/storage/validation/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/apis/storage/validation/BUILD @@ -26,8 +26,8 @@ go_test( library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//pkg/apis/storage:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/apis/storage/validation/validation_test.go b/vendor/k8s.io/kubernetes/pkg/apis/storage/validation/validation_test.go index 96e0764c..d113ea39 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/storage/validation/validation_test.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/storage/validation/validation_test.go @@ -20,7 +20,7 @@ import ( "fmt" "testing" - "k8s.io/kubernetes/pkg/api" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/apis/storage" ) @@ -28,18 +28,18 @@ func TestValidateStorageClass(t *testing.T) { successCases := []storage.StorageClass{ { // empty parameters - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Provisioner: "kubernetes.io/foo-provisioner", Parameters: map[string]string{}, }, { // nil parameters - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Provisioner: "kubernetes.io/foo-provisioner", }, { // some parameters - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Provisioner: "kubernetes.io/foo-provisioner", Parameters: map[string]string{ "kubernetes.io/foo-parameter": "free/form/string", @@ -68,26 +68,26 @@ func TestValidateStorageClass(t *testing.T) { errorCases := map[string]storage.StorageClass{ "namespace is present": { - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "bar"}, Provisioner: "kubernetes.io/foo-provisioner", }, "invalid provisioner": { - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Provisioner: "kubernetes.io/invalid/provisioner", }, "invalid empty parameter name": { - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Provisioner: "kubernetes.io/foo", Parameters: map[string]string{ "": "value", }, }, "provisioner: Required value": { - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Provisioner: "", }, "too long parameters": { - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Provisioner: "kubernetes.io/foo", Parameters: longParameters, }, diff --git a/vendor/k8s.io/kubernetes/pkg/apis/storage/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/storage/zz_generated.deepcopy.go index 4eef1152..2ef9f176 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/storage/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/storage/zz_generated.deepcopy.go @@ -21,9 +21,9 @@ limitations under the License. package storage import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - api "k8s.io/kubernetes/pkg/api" reflect "reflect" ) @@ -45,8 +45,10 @@ func DeepCopy_storage_StorageClass(in interface{}, out interface{}, c *conversio in := in.(*StorageClass) out := out.(*StorageClass) *out = *in - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.Parameters != nil { in, out := &in.Parameters, &out.Parameters diff --git a/vendor/k8s.io/kubernetes/pkg/auth/handlers/BUILD b/vendor/k8s.io/kubernetes/pkg/auth/handlers/BUILD deleted file mode 100644 index 02ff1019..00000000 --- a/vendor/k8s.io/kubernetes/pkg/auth/handlers/BUILD +++ /dev/null @@ -1,46 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = ["handlers.go"], - tags = ["automanaged"], - deps = [ - "//vendor:github.com/golang/glog", - "//vendor:github.com/prometheus/client_golang/prometheus", - "//vendor:k8s.io/apiserver/pkg/authentication/authenticator", - "//vendor:k8s.io/apiserver/pkg/request", - ], -) - -go_test( - name = "go_default_test", - srcs = ["handlers_test.go"], - library = ":go_default_library", - tags = ["automanaged"], - deps = [ - "//vendor:k8s.io/apiserver/pkg/authentication/authenticator", - "//vendor:k8s.io/apiserver/pkg/authentication/user", - "//vendor:k8s.io/apiserver/pkg/request", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/vendor/k8s.io/kubernetes/pkg/client/cache/BUILD b/vendor/k8s.io/kubernetes/pkg/client/cache/BUILD index a1182dd2..68c1c52d 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/cache/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/cache/BUILD @@ -20,9 +20,6 @@ go_library( "fifo.go", "index.go", "listers.go", - "listers_core.go", - "listers_extensions.go", - "listers_rbac.go", "listwatch.go", "mutation_detector.go", "reflector.go", @@ -34,22 +31,11 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/api:go_default_library", - "//pkg/api/v1:go_default_library", - "//pkg/apis/apps/v1beta1:go_default_library", - "//pkg/apis/certificates/v1alpha1:go_default_library", - "//pkg/apis/extensions:go_default_library", - "//pkg/apis/extensions/v1beta1:go_default_library", - "//pkg/apis/policy/v1beta1:go_default_library", - "//pkg/apis/rbac:go_default_library", - "//pkg/apis/storage:go_default_library", - "//pkg/apis/storage/v1beta1:go_default_library", - "//pkg/client/restclient:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/util/clock:go_default_library", "//vendor:github.com/golang/glog", "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/api/meta", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", @@ -58,6 +44,8 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/util/sets", "//vendor:k8s.io/apimachinery/pkg/util/wait", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", + "//vendor:k8s.io/client-go/util/clock", ], ) @@ -69,8 +57,6 @@ go_test( "expiration_cache_test.go", "fifo_test.go", "index_test.go", - "listers_test.go", - "listwatch_test.go", "mutation_detector_test.go", "processor_listener_test.go", "reflector_test.go", @@ -81,23 +67,15 @@ go_test( tags = ["automanaged"], deps = [ "//pkg/api:go_default_library", - "//pkg/api/testapi:go_default_library", "//pkg/api/v1:go_default_library", - "//pkg/apis/extensions/v1beta1:go_default_library", - "//pkg/client/clientset_generated/internalclientset:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/cache:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/util/clock:go_default_library", - "//pkg/util/testing:go_default_library", "//vendor:github.com/google/gofuzz", - "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", - "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/sets", "//vendor:k8s.io/apimachinery/pkg/util/wait", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/util/clock", ], ) @@ -113,3 +91,22 @@ filegroup( srcs = [":package-srcs"], tags = ["automanaged"], ) + +go_test( + name = "go_default_xtest", + srcs = ["listwatch_test.go"], + tags = ["automanaged"], + deps = [ + "//pkg/api:go_default_library", + "//pkg/api/testapi:go_default_library", + "//pkg/api/v1:go_default_library", + "//pkg/client/cache:go_default_library", + "//pkg/client/clientset_generated/internalclientset:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", + "//vendor:k8s.io/apimachinery/pkg/runtime", + "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", + "//vendor:k8s.io/client-go/util/testing", + ], +) diff --git a/vendor/k8s.io/kubernetes/pkg/client/cache/controller_test.go b/vendor/k8s.io/kubernetes/pkg/client/cache/controller_test.go index d3d76f41..542e37db 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/cache/controller_test.go +++ b/vendor/k8s.io/kubernetes/pkg/client/cache/controller_test.go @@ -23,6 +23,7 @@ import ( "testing" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/wait" @@ -101,7 +102,7 @@ func Example() { for _, name := range testIDs { // Note that these pods are not valid-- the fake source doesn't // call validation or anything. - source.Add(&v1.Pod{ObjectMeta: v1.ObjectMeta{Name: name}}) + source.Add(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: name}}) } // Let's wait for the controller to process the things we just added. @@ -158,7 +159,7 @@ func ExampleNewInformer() { for _, name := range testIDs { // Note that these pods are not valid-- the fake source doesn't // call validation or anything. - source.Add(&v1.Pod{ObjectMeta: v1.ObjectMeta{Name: name}}) + source.Add(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: name}}) } // Let's wait for the controller to process the things we just added. @@ -317,7 +318,7 @@ func TestUpdate(t *testing.T) { pod := func(name, check string, final bool) *v1.Pod { p := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Labels: map[string]string{"check": check}, }, @@ -350,12 +351,12 @@ func TestUpdate(t *testing.T) { watchCh := make(chan struct{}) _, controller := NewInformer( &testLW{ - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { watch, err := source.Watch(options) close(watchCh) return watch, err }, - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { return source.List(options) }, }, diff --git a/vendor/k8s.io/kubernetes/pkg/client/cache/expiration_cache.go b/vendor/k8s.io/kubernetes/pkg/client/cache/expiration_cache.go index 88ef89b3..befac1c7 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/cache/expiration_cache.go +++ b/vendor/k8s.io/kubernetes/pkg/client/cache/expiration_cache.go @@ -21,7 +21,7 @@ import ( "time" "github.com/golang/glog" - "k8s.io/kubernetes/pkg/util/clock" + "k8s.io/client-go/util/clock" ) // ExpirationCache implements the store interface diff --git a/vendor/k8s.io/kubernetes/pkg/client/cache/expiration_cache_fakes.go b/vendor/k8s.io/kubernetes/pkg/client/cache/expiration_cache_fakes.go index 7f5b81f2..ab2f5768 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/cache/expiration_cache_fakes.go +++ b/vendor/k8s.io/kubernetes/pkg/client/cache/expiration_cache_fakes.go @@ -18,7 +18,7 @@ package cache import ( "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/kubernetes/pkg/util/clock" + "k8s.io/client-go/util/clock" ) type fakeThreadSafeMap struct { diff --git a/vendor/k8s.io/kubernetes/pkg/client/cache/expiration_cache_test.go b/vendor/k8s.io/kubernetes/pkg/client/cache/expiration_cache_test.go index c2cae091..17139d59 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/cache/expiration_cache_test.go +++ b/vendor/k8s.io/kubernetes/pkg/client/cache/expiration_cache_test.go @@ -23,7 +23,7 @@ import ( "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/kubernetes/pkg/util/clock" + "k8s.io/client-go/util/clock" ) func TestTTLExpirationBasic(t *testing.T) { diff --git a/vendor/k8s.io/kubernetes/pkg/client/cache/index_test.go b/vendor/k8s.io/kubernetes/pkg/client/cache/index_test.go index debb7bab..3d78b9b7 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/cache/index_test.go +++ b/vendor/k8s.io/kubernetes/pkg/client/cache/index_test.go @@ -20,6 +20,7 @@ import ( "strings" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" ) @@ -32,9 +33,9 @@ func testIndexFunc(obj interface{}) ([]string, error) { func TestGetIndexFuncValues(t *testing.T) { index := NewIndexer(MetaNamespaceKeyFunc, Indexers{"testmodes": testIndexFunc}) - pod1 := &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "one", Labels: map[string]string{"foo": "bar"}}} - pod2 := &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "two", Labels: map[string]string{"foo": "bar"}}} - pod3 := &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "tre", Labels: map[string]string{"foo": "biz"}}} + pod1 := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "one", Labels: map[string]string{"foo": "bar"}}} + pod2 := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "two", Labels: map[string]string{"foo": "bar"}}} + pod3 := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "tre", Labels: map[string]string{"foo": "biz"}}} index.Add(pod1) index.Add(pod2) @@ -62,9 +63,9 @@ func testUsersIndexFunc(obj interface{}) ([]string, error) { func TestMultiIndexKeys(t *testing.T) { index := NewIndexer(MetaNamespaceKeyFunc, Indexers{"byUser": testUsersIndexFunc}) - pod1 := &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "one", Annotations: map[string]string{"users": "ernie,bert"}}} - pod2 := &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "two", Annotations: map[string]string{"users": "bert,oscar"}}} - pod3 := &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "tre", Annotations: map[string]string{"users": "ernie,elmo"}}} + pod1 := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "one", Annotations: map[string]string{"users": "ernie,bert"}}} + pod2 := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "two", Annotations: map[string]string{"users": "bert,oscar"}}} + pod3 := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "tre", Annotations: map[string]string{"users": "ernie,elmo"}}} index.Add(pod1) index.Add(pod2) diff --git a/vendor/k8s.io/kubernetes/pkg/client/cache/listers.go b/vendor/k8s.io/kubernetes/pkg/client/cache/listers.go index dc43b118..27d51a6b 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/cache/listers.go +++ b/vendor/k8s.io/kubernetes/pkg/client/cache/listers.go @@ -17,22 +17,14 @@ limitations under the License. package cache import ( - "fmt" - "github.com/golang/glog" + "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/api/v1" - apps "k8s.io/kubernetes/pkg/apis/apps/v1beta1" - certificates "k8s.io/kubernetes/pkg/apis/certificates/v1alpha1" - extensions "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" - policy "k8s.io/kubernetes/pkg/apis/policy/v1beta1" - storageinternal "k8s.io/kubernetes/pkg/apis/storage" - storage "k8s.io/kubernetes/pkg/apis/storage/v1beta1" ) // AppendFunc is used to add a matching item to whatever list the caller is using @@ -52,7 +44,7 @@ func ListAll(store Store, selector labels.Selector, appendFn AppendFunc) error { } func ListAllByNamespace(indexer Indexer, namespace string, selector labels.Selector, appendFn AppendFunc) error { - if namespace == v1.NamespaceAll { + if namespace == metav1.NamespaceAll { for _, m := range indexer.List() { metadata, err := meta.Accessor(m) if err != nil { @@ -65,7 +57,7 @@ func ListAllByNamespace(indexer Indexer, namespace string, selector labels.Selec return nil } - items, err := indexer.Index(NamespaceIndex, &v1.ObjectMeta{Namespace: namespace}) + items, err := indexer.Index(NamespaceIndex, &metav1.ObjectMeta{Namespace: namespace}) if err != nil { // Ignore error; do slow search without index. glog.Warningf("can not retrieve list of objects using index : %v", err) @@ -166,315 +158,3 @@ func (s *genericNamespaceLister) Get(name string) (runtime.Object, error) { } return obj.(runtime.Object), nil } - -// TODO: generate these classes and methods for all resources of interest using -// a script. Can use "go generate" once 1.4 is supported by all users. - -// NodeConditionPredicate is a function that indicates whether the given node's conditions meet -// some set of criteria defined by the function. -type NodeConditionPredicate func(node *v1.Node) bool - -// StoreToNodeLister makes a Store have the List method of the client.NodeInterface -// The Store must contain (only) Nodes. -type StoreToNodeLister struct { - Store -} - -func (s *StoreToNodeLister) List() (machines v1.NodeList, err error) { - for _, m := range s.Store.List() { - machines.Items = append(machines.Items, *(m.(*v1.Node))) - } - return machines, nil -} - -// NodeCondition returns a storeToNodeConditionLister -func (s *StoreToNodeLister) NodeCondition(predicate NodeConditionPredicate) storeToNodeConditionLister { - // TODO: Move this filtering server side. Currently our selectors don't facilitate searching through a list so we - // have the reflector filter out the Unschedulable field and sift through node conditions in the lister. - return storeToNodeConditionLister{s.Store, predicate} -} - -// storeToNodeConditionLister filters and returns nodes matching the given type and status from the store. -type storeToNodeConditionLister struct { - store Store - predicate NodeConditionPredicate -} - -// List returns a list of nodes that match the conditions defined by the predicate functions in the storeToNodeConditionLister. -func (s storeToNodeConditionLister) List() (nodes []*v1.Node, err error) { - for _, m := range s.store.List() { - node := m.(*v1.Node) - if s.predicate(node) { - nodes = append(nodes, node) - } else { - glog.V(5).Infof("Node %s matches none of the conditions", node.Name) - } - } - return -} - -// StoreToDaemonSetLister gives a store List and Exists methods. The store must contain only DaemonSets. -type StoreToDaemonSetLister struct { - Store -} - -// Exists checks if the given daemon set exists in the store. -func (s *StoreToDaemonSetLister) Exists(ds *extensions.DaemonSet) (bool, error) { - _, exists, err := s.Store.Get(ds) - if err != nil { - return false, err - } - return exists, nil -} - -// List lists all daemon sets in the store. -// TODO: converge on the interface in pkg/client -func (s *StoreToDaemonSetLister) List() (dss extensions.DaemonSetList, err error) { - for _, c := range s.Store.List() { - dss.Items = append(dss.Items, *(c.(*extensions.DaemonSet))) - } - return dss, nil -} - -// GetPodDaemonSets returns a list of daemon sets managing a pod. -// Returns an error if and only if no matching daemon sets are found. -func (s *StoreToDaemonSetLister) GetPodDaemonSets(pod *v1.Pod) (daemonSets []extensions.DaemonSet, err error) { - var selector labels.Selector - var daemonSet extensions.DaemonSet - - if len(pod.Labels) == 0 { - err = fmt.Errorf("no daemon sets found for pod %v because it has no labels", pod.Name) - return - } - - for _, m := range s.Store.List() { - daemonSet = *m.(*extensions.DaemonSet) - if daemonSet.Namespace != pod.Namespace { - continue - } - selector, err = metav1.LabelSelectorAsSelector(daemonSet.Spec.Selector) - if err != nil { - // this should not happen if the DaemonSet passed validation - return nil, err - } - - // If a daemonSet with a nil or empty selector creeps in, it should match nothing, not everything. - if selector.Empty() || !selector.Matches(labels.Set(pod.Labels)) { - continue - } - daemonSets = append(daemonSets, daemonSet) - } - if len(daemonSets) == 0 { - err = fmt.Errorf("could not find daemon set for pod %s in namespace %s with labels: %v", pod.Name, pod.Namespace, pod.Labels) - } - return -} - -// StoreToEndpointsLister makes a Store that lists endpoints. -type StoreToEndpointsLister struct { - Store -} - -// List lists all endpoints in the store. -func (s *StoreToEndpointsLister) List() (services v1.EndpointsList, err error) { - for _, m := range s.Store.List() { - services.Items = append(services.Items, *(m.(*v1.Endpoints))) - } - return services, nil -} - -// GetServiceEndpoints returns the endpoints of a service, matched on service name. -func (s *StoreToEndpointsLister) GetServiceEndpoints(svc *v1.Service) (ep v1.Endpoints, err error) { - for _, m := range s.Store.List() { - ep = *m.(*v1.Endpoints) - if svc.Name == ep.Name && svc.Namespace == ep.Namespace { - return ep, nil - } - } - err = fmt.Errorf("could not find endpoints for service: %v", svc.Name) - return -} - -// Typed wrapper around a store of PersistentVolumes -type StoreToPVFetcher struct { - Store -} - -// GetPersistentVolumeInfo returns cached data for the PersistentVolume 'id'. -func (s *StoreToPVFetcher) GetPersistentVolumeInfo(id string) (*v1.PersistentVolume, error) { - o, exists, err := s.Get(&v1.PersistentVolume{ObjectMeta: v1.ObjectMeta{Name: id}}) - - if err != nil { - return nil, fmt.Errorf("error retrieving PersistentVolume '%v' from cache: %v", id, err) - } - - if !exists { - return nil, fmt.Errorf("PersistentVolume '%v' not found", id) - } - - return o.(*v1.PersistentVolume), nil -} - -// StoreToStatefulSetLister gives a store List and Exists methods. The store must contain only StatefulSets. -type StoreToStatefulSetLister struct { - Store -} - -// Exists checks if the given StatefulSet exists in the store. -func (s *StoreToStatefulSetLister) Exists(ps *apps.StatefulSet) (bool, error) { - _, exists, err := s.Store.Get(ps) - if err != nil { - return false, err - } - return exists, nil -} - -// List lists all StatefulSets in the store. -func (s *StoreToStatefulSetLister) List() (psList []apps.StatefulSet, err error) { - for _, ps := range s.Store.List() { - psList = append(psList, *(ps.(*apps.StatefulSet))) - } - return psList, nil -} - -type storeStatefulSetsNamespacer struct { - store Store - namespace string -} - -func (s *StoreToStatefulSetLister) StatefulSets(namespace string) storeStatefulSetsNamespacer { - return storeStatefulSetsNamespacer{s.Store, namespace} -} - -// GetPodStatefulSets returns a list of StatefulSets managing a pod. Returns an error only if no matching StatefulSets are found. -func (s *StoreToStatefulSetLister) GetPodStatefulSets(pod *v1.Pod) (psList []apps.StatefulSet, err error) { - var selector labels.Selector - var ps apps.StatefulSet - - if len(pod.Labels) == 0 { - err = fmt.Errorf("no StatefulSets found for pod %v because it has no labels", pod.Name) - return - } - - for _, m := range s.Store.List() { - ps = *m.(*apps.StatefulSet) - if ps.Namespace != pod.Namespace { - continue - } - selector, err = metav1.LabelSelectorAsSelector(ps.Spec.Selector) - if err != nil { - err = fmt.Errorf("invalid selector: %v", err) - return - } - - // If a StatefulSet with a nil or empty selector creeps in, it should match nothing, not everything. - if selector.Empty() || !selector.Matches(labels.Set(pod.Labels)) { - continue - } - psList = append(psList, ps) - } - if len(psList) == 0 { - err = fmt.Errorf("could not find StatefulSet for pod %s in namespace %s with labels: %v", pod.Name, pod.Namespace, pod.Labels) - } - return -} - -// StoreToCertificateRequestLister gives a store List and Exists methods. The store must contain only CertificateRequests. -type StoreToCertificateRequestLister struct { - Store -} - -// Exists checks if the given csr exists in the store. -func (s *StoreToCertificateRequestLister) Exists(csr *certificates.CertificateSigningRequest) (bool, error) { - _, exists, err := s.Store.Get(csr) - if err != nil { - return false, err - } - return exists, nil -} - -// StoreToCertificateRequestLister lists all csrs in the store. -func (s *StoreToCertificateRequestLister) List() (csrs certificates.CertificateSigningRequestList, err error) { - for _, c := range s.Store.List() { - csrs.Items = append(csrs.Items, *(c.(*certificates.CertificateSigningRequest))) - } - return csrs, nil -} - -type StoreToPodDisruptionBudgetLister struct { - Store -} - -// GetPodPodDisruptionBudgets returns a list of PodDisruptionBudgets matching a pod. Returns an error only if no matching PodDisruptionBudgets are found. -func (s *StoreToPodDisruptionBudgetLister) GetPodPodDisruptionBudgets(pod *v1.Pod) (pdbList []policy.PodDisruptionBudget, err error) { - var selector labels.Selector - - if len(pod.Labels) == 0 { - err = fmt.Errorf("no PodDisruptionBudgets found for pod %v because it has no labels", pod.Name) - return - } - - for _, m := range s.Store.List() { - pdb, ok := m.(*policy.PodDisruptionBudget) - if !ok { - glog.Errorf("Unexpected: %v is not a PodDisruptionBudget", m) - continue - } - if pdb.Namespace != pod.Namespace { - continue - } - selector, err = metav1.LabelSelectorAsSelector(pdb.Spec.Selector) - if err != nil { - glog.Warningf("invalid selector: %v", err) - // TODO(mml): add an event to the PDB - continue - } - - // If a PDB with a nil or empty selector creeps in, it should match nothing, not everything. - if selector.Empty() || !selector.Matches(labels.Set(pod.Labels)) { - continue - } - pdbList = append(pdbList, *pdb) - } - if len(pdbList) == 0 { - err = fmt.Errorf("could not find PodDisruptionBudget for pod %s in namespace %s with labels: %v", pod.Name, pod.Namespace, pod.Labels) - } - return -} - -// StorageClassLister knows how to list storage classes -type StorageClassLister interface { - List(selector labels.Selector) (ret []*storage.StorageClass, err error) - Get(name string) (*storage.StorageClass, error) -} - -// storageClassLister implements StorageClassLister -type storageClassLister struct { - indexer Indexer -} - -// NewStorageClassLister returns a new lister. -func NewStorageClassLister(indexer Indexer) StorageClassLister { - return &storageClassLister{indexer: indexer} -} - -// List returns a list of storage classes -func (s *storageClassLister) List(selector labels.Selector) (ret []*storage.StorageClass, err error) { - err = ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*storage.StorageClass)) - }) - return ret, err -} - -// Get returns storage class with name 'name'. -func (s *storageClassLister) Get(name string) (*storage.StorageClass, error) { - key := &storage.StorageClass{ObjectMeta: v1.ObjectMeta{Name: name}} - obj, exists, err := s.indexer.Get(key) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(storageinternal.Resource("storageclass"), name) - } - return obj.(*storage.StorageClass), nil -} diff --git a/vendor/k8s.io/kubernetes/pkg/client/cache/listwatch.go b/vendor/k8s.io/kubernetes/pkg/client/cache/listwatch.go index f4299a7f..1261e758 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/cache/listwatch.go +++ b/vendor/k8s.io/kubernetes/pkg/client/cache/listwatch.go @@ -20,28 +20,27 @@ import ( "time" "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" - "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/api/v1" - "k8s.io/kubernetes/pkg/client/restclient" - "k8s.io/kubernetes/pkg/fields" + restclient "k8s.io/client-go/rest" ) // ListerWatcher is any object that knows how to perform an initial list and start a watch on a resource. type ListerWatcher interface { // List should return a list type object; the Items field will be extracted, and the // ResourceVersion field will be used to start the watch in the right place. - List(options v1.ListOptions) (runtime.Object, error) + List(options metav1.ListOptions) (runtime.Object, error) // Watch should begin a watch at the specified version. - Watch(options v1.ListOptions) (watch.Interface, error) + Watch(options metav1.ListOptions) (watch.Interface, error) } // ListFunc knows how to list resources -type ListFunc func(options v1.ListOptions) (runtime.Object, error) +type ListFunc func(options metav1.ListOptions) (runtime.Object, error) // WatchFunc knows how to watch resources -type WatchFunc func(options v1.ListOptions) (watch.Interface, error) +type WatchFunc func(options metav1.ListOptions) (watch.Interface, error) // ListWatch knows how to list and watch a set of apiserver resources. It satisfies the ListerWatcher interface. // It is a convenience function for users of NewReflector, etc. @@ -58,28 +57,28 @@ type Getter interface { // NewListWatchFromClient creates a new ListWatch from the specified client, resource, namespace and field selector. func NewListWatchFromClient(c Getter, resource string, namespace string, fieldSelector fields.Selector) *ListWatch { - listFunc := func(options v1.ListOptions) (runtime.Object, error) { + listFunc := func(options metav1.ListOptions) (runtime.Object, error) { return c.Get(). Namespace(namespace). Resource(resource). - VersionedParams(&options, api.ParameterCodec). + VersionedParams(&options, metav1.ParameterCodec). FieldsSelectorParam(fieldSelector). Do(). Get() } - watchFunc := func(options v1.ListOptions) (watch.Interface, error) { + watchFunc := func(options metav1.ListOptions) (watch.Interface, error) { return c.Get(). Prefix("watch"). Namespace(namespace). Resource(resource). - VersionedParams(&options, api.ParameterCodec). + VersionedParams(&options, metav1.ParameterCodec). FieldsSelectorParam(fieldSelector). Watch() } return &ListWatch{ListFunc: listFunc, WatchFunc: watchFunc} } -func timeoutFromListOptions(options v1.ListOptions) time.Duration { +func timeoutFromListOptions(options metav1.ListOptions) time.Duration { if options.TimeoutSeconds != nil { return time.Duration(*options.TimeoutSeconds) * time.Second } @@ -87,12 +86,12 @@ func timeoutFromListOptions(options v1.ListOptions) time.Duration { } // List a set of apiserver resources -func (lw *ListWatch) List(options v1.ListOptions) (runtime.Object, error) { +func (lw *ListWatch) List(options metav1.ListOptions) (runtime.Object, error) { return lw.ListFunc(options) } // Watch a set of apiserver resources -func (lw *ListWatch) Watch(options v1.ListOptions) (watch.Interface, error) { +func (lw *ListWatch) Watch(options metav1.ListOptions) (watch.Interface, error) { return lw.WatchFunc(options) } @@ -102,7 +101,7 @@ func ListWatchUntil(timeout time.Duration, lw ListerWatcher, conditions ...watch return nil, nil } - list, err := lw.List(v1.ListOptions{}) + list, err := lw.List(metav1.ListOptions{}) if err != nil { return nil, err } @@ -154,7 +153,7 @@ func ListWatchUntil(timeout time.Duration, lw ListerWatcher, conditions ...watch } currResourceVersion := metaObj.GetResourceVersion() - watchInterface, err := lw.Watch(v1.ListOptions{ResourceVersion: currResourceVersion}) + watchInterface, err := lw.Watch(metav1.ListOptions{ResourceVersion: currResourceVersion}) if err != nil { return nil, err } diff --git a/vendor/k8s.io/kubernetes/pkg/client/cache/listwatch_test.go b/vendor/k8s.io/kubernetes/pkg/client/cache/listwatch_test.go index 167a9416..6e74fbaf 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/cache/listwatch_test.go +++ b/vendor/k8s.io/kubernetes/pkg/client/cache/listwatch_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package cache +package cache_test import ( "net/http/httptest" @@ -23,15 +23,16 @@ import ( "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" + restclient "k8s.io/client-go/rest" + utiltesting "k8s.io/client-go/util/testing" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" "k8s.io/kubernetes/pkg/api/v1" + . "k8s.io/kubernetes/pkg/client/cache" clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" - "k8s.io/kubernetes/pkg/client/restclient" - "k8s.io/kubernetes/pkg/fields" - utiltesting "k8s.io/kubernetes/pkg/util/testing" ) func parseSelectorOrDie(s string) fields.Selector { @@ -69,18 +70,18 @@ func TestListWatchesCanList(t *testing.T) { }{ // Node { - location: testapi.Default.ResourcePath("nodes", v1.NamespaceAll, ""), + location: testapi.Default.ResourcePath("nodes", metav1.NamespaceAll, ""), resource: "nodes", - namespace: v1.NamespaceAll, + namespace: metav1.NamespaceAll, fieldSelector: parseSelectorOrDie(""), }, // pod with "assigned" field selector. { location: buildLocation( - testapi.Default.ResourcePath("pods", v1.NamespaceAll, ""), + testapi.Default.ResourcePath("pods", metav1.NamespaceAll, ""), buildQueryValues(url.Values{fieldSelectorQueryParamName: []string{"spec.host="}})), resource: "pods", - namespace: v1.NamespaceAll, + namespace: metav1.NamespaceAll, fieldSelector: fields.Set{"spec.host": ""}.AsSelector(), }, // pod in namespace "foo" @@ -104,7 +105,7 @@ func TestListWatchesCanList(t *testing.T) { client := clientset.NewForConfigOrDie(&restclient.Config{Host: server.URL, ContentConfig: restclient.ContentConfig{GroupVersion: &api.Registry.GroupOrDie(v1.GroupName).GroupVersion}}) lw := NewListWatchFromClient(client.Core().RESTClient(), item.resource, item.namespace, item.fieldSelector) // This test merely tests that the correct request is made. - lw.List(v1.ListOptions{}) + lw.List(metav1.ListOptions{}) handler.ValidateRequest(t, item.location, "GET", nil) } } @@ -121,30 +122,30 @@ func TestListWatchesCanWatch(t *testing.T) { // Node { location: buildLocation( - testapi.Default.ResourcePathWithPrefix("watch", "nodes", v1.NamespaceAll, ""), + testapi.Default.ResourcePathWithPrefix("watch", "nodes", metav1.NamespaceAll, ""), buildQueryValues(url.Values{})), rv: "", resource: "nodes", - namespace: v1.NamespaceAll, + namespace: metav1.NamespaceAll, fieldSelector: parseSelectorOrDie(""), }, { location: buildLocation( - testapi.Default.ResourcePathWithPrefix("watch", "nodes", v1.NamespaceAll, ""), + testapi.Default.ResourcePathWithPrefix("watch", "nodes", metav1.NamespaceAll, ""), buildQueryValues(url.Values{"resourceVersion": []string{"42"}})), rv: "42", resource: "nodes", - namespace: v1.NamespaceAll, + namespace: metav1.NamespaceAll, fieldSelector: parseSelectorOrDie(""), }, // pod with "assigned" field selector. { location: buildLocation( - testapi.Default.ResourcePathWithPrefix("watch", "pods", v1.NamespaceAll, ""), + testapi.Default.ResourcePathWithPrefix("watch", "pods", metav1.NamespaceAll, ""), buildQueryValues(url.Values{fieldSelectorQueryParamName: []string{"spec.host="}, "resourceVersion": []string{"0"}})), rv: "0", resource: "pods", - namespace: v1.NamespaceAll, + namespace: metav1.NamespaceAll, fieldSelector: fields.Set{"spec.host": ""}.AsSelector(), }, // pod with namespace foo and assigned field selector @@ -170,7 +171,7 @@ func TestListWatchesCanWatch(t *testing.T) { client := clientset.NewForConfigOrDie(&restclient.Config{Host: server.URL, ContentConfig: restclient.ContentConfig{GroupVersion: &api.Registry.GroupOrDie(v1.GroupName).GroupVersion}}) lw := NewListWatchFromClient(client.Core().RESTClient(), item.resource, item.namespace, item.fieldSelector) // This test merely tests that the correct request is made. - lw.Watch(v1.ListOptions{ResourceVersion: item.rv}) + lw.Watch(metav1.ListOptions{ResourceVersion: item.rv}) handler.ValidateRequest(t, item.location, "GET", nil) } } @@ -180,11 +181,11 @@ type lw struct { watch watch.Interface } -func (w lw) List(options v1.ListOptions) (runtime.Object, error) { +func (w lw) List(options metav1.ListOptions) (runtime.Object, error) { return w.list, nil } -func (w lw) Watch(options v1.ListOptions) (watch.Interface, error) { +func (w lw) Watch(options metav1.ListOptions) (watch.Interface, error) { return w.watch, nil } diff --git a/vendor/k8s.io/kubernetes/pkg/client/cache/mutation_detector_test.go b/vendor/k8s.io/kubernetes/pkg/client/cache/mutation_detector_test.go index 77da4994..66cf36f9 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/cache/mutation_detector_test.go +++ b/vendor/k8s.io/kubernetes/pkg/client/cache/mutation_detector_test.go @@ -22,6 +22,7 @@ import ( "testing" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" "k8s.io/kubernetes/pkg/api/v1" @@ -30,15 +31,15 @@ import ( func TestMutationDetector(t *testing.T) { fakeWatch := watch.NewFake() lw := &testLW{ - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { return fakeWatch, nil }, - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { return &v1.PodList{}, nil }, } pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "anything", Labels: map[string]string{"check": "foo"}, }, diff --git a/vendor/k8s.io/kubernetes/pkg/client/cache/reflector.go b/vendor/k8s.io/kubernetes/pkg/client/cache/reflector.go index c638e97e..d3144e1a 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/cache/reflector.go +++ b/vendor/k8s.io/kubernetes/pkg/client/cache/reflector.go @@ -36,11 +36,11 @@ import ( "github.com/golang/glog" apierrs "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apimachinery/pkg/watch" - "k8s.io/kubernetes/pkg/api/v1" ) // Reflector watches a specified resource and causes all changes to be reflected in the given store. @@ -239,7 +239,7 @@ func (r *Reflector) ListAndWatch(stopCh <-chan struct{}) error { // Explicitly set "0" as resource version - it's fine for the List() // to be served from cache and potentially be delayed relative to // etcd contents. Reflector framework will catch up via Watch() eventually. - options := v1.ListOptions{ResourceVersion: "0"} + options := metav1.ListOptions{ResourceVersion: "0"} list, err := r.listerWatcher.List(options) if err != nil { return fmt.Errorf("%s: Failed to list %v: %v", r.name, r.expectedType, err) @@ -282,7 +282,7 @@ func (r *Reflector) ListAndWatch(stopCh <-chan struct{}) error { for { timemoutseconds := int64(minWatchTimeout.Seconds() * (rand.Float64() + 1.0)) - options = v1.ListOptions{ + options = metav1.ListOptions{ ResourceVersion: resourceVersion, // We want to avoid situations of hanging watchers. Stop any wachers that do not // receive any events within the timeout window. diff --git a/vendor/k8s.io/kubernetes/pkg/client/cache/reflector_test.go b/vendor/k8s.io/kubernetes/pkg/client/cache/reflector_test.go index 728d39a4..70ce055e 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/cache/reflector_test.go +++ b/vendor/k8s.io/kubernetes/pkg/client/cache/reflector_test.go @@ -34,26 +34,26 @@ import ( var nevererrc chan error type testLW struct { - ListFunc func(options v1.ListOptions) (runtime.Object, error) - WatchFunc func(options v1.ListOptions) (watch.Interface, error) + ListFunc func(options metav1.ListOptions) (runtime.Object, error) + WatchFunc func(options metav1.ListOptions) (watch.Interface, error) } -func (t *testLW) List(options v1.ListOptions) (runtime.Object, error) { +func (t *testLW) List(options metav1.ListOptions) (runtime.Object, error) { return t.ListFunc(options) } -func (t *testLW) Watch(options v1.ListOptions) (watch.Interface, error) { +func (t *testLW) Watch(options metav1.ListOptions) (watch.Interface, error) { return t.WatchFunc(options) } func TestCloseWatchChannelOnError(t *testing.T) { r := NewReflector(&testLW{}, &v1.Pod{}, NewStore(MetaNamespaceKeyFunc), 0) - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "bar"}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "bar"}} fw := watch.NewFake() r.listerWatcher = &testLW{ - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { return fw, nil }, - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { return &v1.PodList{ListMeta: metav1.ListMeta{ResourceVersion: "1"}}, nil }, } @@ -76,17 +76,17 @@ func TestRunUntil(t *testing.T) { r := NewReflector(&testLW{}, &v1.Pod{}, store, 0) fw := watch.NewFake() r.listerWatcher = &testLW{ - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { return fw, nil }, - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { return &v1.PodList{ListMeta: metav1.ListMeta{ResourceVersion: "1"}}, nil }, } r.RunUntil(stopCh) // Synchronously add a dummy pod into the watch channel so we // know the RunUntil go routine is in the watch handler. - fw.Add(&v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "bar"}}) + fw.Add(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "bar"}}) close(stopCh) select { case _, ok := <-fw.ResultChan(): @@ -142,13 +142,13 @@ func TestReflectorWatchHandler(t *testing.T) { s := NewStore(MetaNamespaceKeyFunc) g := NewReflector(&testLW{}, &v1.Pod{}, s, 0) fw := watch.NewFake() - s.Add(&v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "foo"}}) - s.Add(&v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "bar"}}) + s.Add(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}) + s.Add(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "bar"}}) go func() { - fw.Add(&v1.Service{ObjectMeta: v1.ObjectMeta{Name: "rejected"}}) - fw.Delete(&v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "foo"}}) - fw.Modify(&v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "bar", ResourceVersion: "55"}}) - fw.Add(&v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "baz", ResourceVersion: "32"}}) + fw.Add(&v1.Service{ObjectMeta: metav1.ObjectMeta{Name: "rejected"}}) + fw.Delete(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}) + fw.Modify(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "bar", ResourceVersion: "55"}}) + fw.Add(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "baz", ResourceVersion: "32"}}) fw.Stop() }() var resumeRV string @@ -158,7 +158,7 @@ func TestReflectorWatchHandler(t *testing.T) { } mkPod := func(id string, rv string) *v1.Pod { - return &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: id, ResourceVersion: rv}} + return &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: id, ResourceVersion: rv}} } table := []struct { @@ -215,7 +215,7 @@ func TestReflectorListAndWatch(t *testing.T) { // inject an error. expectedRVs := []string{"1", "3"} lw := &testLW{ - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { rv := options.ResourceVersion fw := watch.NewFake() if e, a := expectedRVs[0], rv; e != a { @@ -227,7 +227,7 @@ func TestReflectorListAndWatch(t *testing.T) { go func() { createdFakes <- fw }() return fw, nil }, - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { return &v1.PodList{ListMeta: metav1.ListMeta{ResourceVersion: "1"}}, nil }, } @@ -242,7 +242,7 @@ func TestReflectorListAndWatch(t *testing.T) { fw = <-createdFakes } sendingRV := strconv.FormatUint(uint64(i+2), 10) - fw.Add(&v1.Pod{ObjectMeta: v1.ObjectMeta{Name: id, ResourceVersion: sendingRV}}) + fw.Add(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: id, ResourceVersion: sendingRV}}) if sendingRV == "3" { // Inject a failure. fw.Stop() @@ -268,7 +268,7 @@ func TestReflectorListAndWatch(t *testing.T) { func TestReflectorListAndWatchWithErrors(t *testing.T) { mkPod := func(id string, rv string) *v1.Pod { - return &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: id, ResourceVersion: rv}} + return &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: id, ResourceVersion: rv}} } mkList := func(rv string, pods ...*v1.Pod) *v1.PodList { list := &v1.PodList{ListMeta: metav1.ListMeta{ResourceVersion: rv}} @@ -331,7 +331,7 @@ func TestReflectorListAndWatchWithErrors(t *testing.T) { } watchRet, watchErr := item.events, item.watchErr lw := &testLW{ - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if watchErr != nil { return nil, watchErr } @@ -345,7 +345,7 @@ func TestReflectorListAndWatchWithErrors(t *testing.T) { }() return fw, nil }, - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { return item.list, item.listErr }, } @@ -369,11 +369,11 @@ func TestReflectorResync(t *testing.T) { } lw := &testLW{ - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { fw := watch.NewFake() return fw, nil }, - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { return &v1.PodList{ListMeta: metav1.ListMeta{ResourceVersion: "0"}}, nil }, } diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/BUILD b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/BUILD index b5f45547..c1ee76cf 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/BUILD @@ -34,17 +34,18 @@ go_library( "//pkg/client/clientset_generated/clientset/typed/autoscaling/v1:go_default_library", "//pkg/client/clientset_generated/clientset/typed/batch/v1:go_default_library", "//pkg/client/clientset_generated/clientset/typed/batch/v2alpha1:go_default_library", - "//pkg/client/clientset_generated/clientset/typed/certificates/v1alpha1:go_default_library", + "//pkg/client/clientset_generated/clientset/typed/certificates/v1beta1:go_default_library", "//pkg/client/clientset_generated/clientset/typed/core/v1:go_default_library", "//pkg/client/clientset_generated/clientset/typed/extensions/v1beta1:go_default_library", "//pkg/client/clientset_generated/clientset/typed/policy/v1beta1:go_default_library", "//pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1:go_default_library", + "//pkg/client/clientset_generated/clientset/typed/rbac/v1beta1:go_default_library", "//pkg/client/clientset_generated/clientset/typed/storage/v1beta1:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/typed/discovery:go_default_library", - "//pkg/util/flowcontrol:go_default_library", - "//plugin/pkg/client/auth:go_default_library", "//vendor:github.com/golang/glog", + "//vendor:k8s.io/client-go/plugin/pkg/client/auth", + "//vendor:k8s.io/client-go/rest", + "//vendor:k8s.io/client-go/util/flowcontrol", ], ) @@ -66,12 +67,12 @@ filegroup( "//pkg/client/clientset_generated/clientset/typed/autoscaling/v1:all-srcs", "//pkg/client/clientset_generated/clientset/typed/batch/v1:all-srcs", "//pkg/client/clientset_generated/clientset/typed/batch/v2alpha1:all-srcs", - "//pkg/client/clientset_generated/clientset/typed/certificates/v1alpha1:all-srcs", + "//pkg/client/clientset_generated/clientset/typed/certificates/v1beta1:all-srcs", "//pkg/client/clientset_generated/clientset/typed/core/v1:all-srcs", "//pkg/client/clientset_generated/clientset/typed/extensions/v1beta1:all-srcs", - "//pkg/client/clientset_generated/clientset/typed/policy/v1alpha1:all-srcs", "//pkg/client/clientset_generated/clientset/typed/policy/v1beta1:all-srcs", "//pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1:all-srcs", + "//pkg/client/clientset_generated/clientset/typed/rbac/v1beta1:all-srcs", "//pkg/client/clientset_generated/clientset/typed/storage/v1beta1:all-srcs", ], tags = ["automanaged"], diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/clientset.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/clientset.go index 98745441..da82a165 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/clientset.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/clientset.go @@ -18,22 +18,23 @@ package clientset import ( "github.com/golang/glog" + _ "k8s.io/client-go/plugin/pkg/client/auth" + rest "k8s.io/client-go/rest" + "k8s.io/client-go/util/flowcontrol" v1beta1apps "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1" v1beta1authentication "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1" v1beta1authorization "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1" v1autoscaling "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v1" v1batch "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v1" v2alpha1batch "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1" - v1alpha1certificates "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1alpha1" + v1beta1certificates "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1" v1core "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1" v1beta1extensions "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1" v1beta1policy "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1" v1alpha1rbac "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1" + v1beta1rbac "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1" v1beta1storage "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1beta1" - restclient "k8s.io/kubernetes/pkg/client/restclient" discovery "k8s.io/kubernetes/pkg/client/typed/discovery" - "k8s.io/kubernetes/pkg/util/flowcontrol" - _ "k8s.io/kubernetes/plugin/pkg/client/auth" ) type Interface interface { @@ -58,18 +59,20 @@ type Interface interface { Batch() v1batch.BatchV1Interface BatchV2alpha1() v2alpha1batch.BatchV2alpha1Interface - CertificatesV1alpha1() v1alpha1certificates.CertificatesV1alpha1Interface + CertificatesV1beta1() v1beta1certificates.CertificatesV1beta1Interface // Deprecated: please explicitly pick a version if possible. - Certificates() v1alpha1certificates.CertificatesV1alpha1Interface + Certificates() v1beta1certificates.CertificatesV1beta1Interface ExtensionsV1beta1() v1beta1extensions.ExtensionsV1beta1Interface // Deprecated: please explicitly pick a version if possible. Extensions() v1beta1extensions.ExtensionsV1beta1Interface PolicyV1beta1() v1beta1policy.PolicyV1beta1Interface // Deprecated: please explicitly pick a version if possible. Policy() v1beta1policy.PolicyV1beta1Interface - RbacV1alpha1() v1alpha1rbac.RbacV1alpha1Interface + RbacV1beta1() v1beta1rbac.RbacV1beta1Interface // Deprecated: please explicitly pick a version if possible. - Rbac() v1alpha1rbac.RbacV1alpha1Interface + Rbac() v1beta1rbac.RbacV1beta1Interface + RbacV1alpha1() v1alpha1rbac.RbacV1alpha1Interface + StorageV1beta1() v1beta1storage.StorageV1beta1Interface // Deprecated: please explicitly pick a version if possible. Storage() v1beta1storage.StorageV1beta1Interface @@ -86,9 +89,10 @@ type Clientset struct { *v1autoscaling.AutoscalingV1Client *v1batch.BatchV1Client *v2alpha1batch.BatchV2alpha1Client - *v1alpha1certificates.CertificatesV1alpha1Client + *v1beta1certificates.CertificatesV1beta1Client *v1beta1extensions.ExtensionsV1beta1Client *v1beta1policy.PolicyV1beta1Client + *v1beta1rbac.RbacV1beta1Client *v1alpha1rbac.RbacV1alpha1Client *v1beta1storage.StorageV1beta1Client } @@ -203,21 +207,21 @@ func (c *Clientset) BatchV2alpha1() v2alpha1batch.BatchV2alpha1Interface { return c.BatchV2alpha1Client } -// CertificatesV1alpha1 retrieves the CertificatesV1alpha1Client -func (c *Clientset) CertificatesV1alpha1() v1alpha1certificates.CertificatesV1alpha1Interface { +// CertificatesV1beta1 retrieves the CertificatesV1beta1Client +func (c *Clientset) CertificatesV1beta1() v1beta1certificates.CertificatesV1beta1Interface { if c == nil { return nil } - return c.CertificatesV1alpha1Client + return c.CertificatesV1beta1Client } // Deprecated: Certificates retrieves the default version of CertificatesClient. // Please explicitly pick a version. -func (c *Clientset) Certificates() v1alpha1certificates.CertificatesV1alpha1Interface { +func (c *Clientset) Certificates() v1beta1certificates.CertificatesV1beta1Interface { if c == nil { return nil } - return c.CertificatesV1alpha1Client + return c.CertificatesV1beta1Client } // ExtensionsV1beta1 retrieves the ExtensionsV1beta1Client @@ -254,17 +258,25 @@ func (c *Clientset) Policy() v1beta1policy.PolicyV1beta1Interface { return c.PolicyV1beta1Client } -// RbacV1alpha1 retrieves the RbacV1alpha1Client -func (c *Clientset) RbacV1alpha1() v1alpha1rbac.RbacV1alpha1Interface { +// RbacV1beta1 retrieves the RbacV1beta1Client +func (c *Clientset) RbacV1beta1() v1beta1rbac.RbacV1beta1Interface { if c == nil { return nil } - return c.RbacV1alpha1Client + return c.RbacV1beta1Client } // Deprecated: Rbac retrieves the default version of RbacClient. // Please explicitly pick a version. -func (c *Clientset) Rbac() v1alpha1rbac.RbacV1alpha1Interface { +func (c *Clientset) Rbac() v1beta1rbac.RbacV1beta1Interface { + if c == nil { + return nil + } + return c.RbacV1beta1Client +} + +// RbacV1alpha1 retrieves the RbacV1alpha1Client +func (c *Clientset) RbacV1alpha1() v1alpha1rbac.RbacV1alpha1Interface { if c == nil { return nil } @@ -297,7 +309,7 @@ func (c *Clientset) Discovery() discovery.DiscoveryInterface { } // NewForConfig creates a new Clientset for the given config. -func NewForConfig(c *restclient.Config) (*Clientset, error) { +func NewForConfig(c *rest.Config) (*Clientset, error) { configShallowCopy := *c if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) @@ -332,7 +344,7 @@ func NewForConfig(c *restclient.Config) (*Clientset, error) { if err != nil { return nil, err } - cs.CertificatesV1alpha1Client, err = v1alpha1certificates.NewForConfig(&configShallowCopy) + cs.CertificatesV1beta1Client, err = v1beta1certificates.NewForConfig(&configShallowCopy) if err != nil { return nil, err } @@ -344,6 +356,10 @@ func NewForConfig(c *restclient.Config) (*Clientset, error) { if err != nil { return nil, err } + cs.RbacV1beta1Client, err = v1beta1rbac.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } cs.RbacV1alpha1Client, err = v1alpha1rbac.NewForConfig(&configShallowCopy) if err != nil { return nil, err @@ -363,7 +379,7 @@ func NewForConfig(c *restclient.Config) (*Clientset, error) { // NewForConfigOrDie creates a new Clientset for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *Clientset { +func NewForConfigOrDie(c *rest.Config) *Clientset { var cs Clientset cs.CoreV1Client = v1core.NewForConfigOrDie(c) cs.AppsV1beta1Client = v1beta1apps.NewForConfigOrDie(c) @@ -372,9 +388,10 @@ func NewForConfigOrDie(c *restclient.Config) *Clientset { cs.AutoscalingV1Client = v1autoscaling.NewForConfigOrDie(c) cs.BatchV1Client = v1batch.NewForConfigOrDie(c) cs.BatchV2alpha1Client = v2alpha1batch.NewForConfigOrDie(c) - cs.CertificatesV1alpha1Client = v1alpha1certificates.NewForConfigOrDie(c) + cs.CertificatesV1beta1Client = v1beta1certificates.NewForConfigOrDie(c) cs.ExtensionsV1beta1Client = v1beta1extensions.NewForConfigOrDie(c) cs.PolicyV1beta1Client = v1beta1policy.NewForConfigOrDie(c) + cs.RbacV1beta1Client = v1beta1rbac.NewForConfigOrDie(c) cs.RbacV1alpha1Client = v1alpha1rbac.NewForConfigOrDie(c) cs.StorageV1beta1Client = v1beta1storage.NewForConfigOrDie(c) @@ -383,7 +400,7 @@ func NewForConfigOrDie(c *restclient.Config) *Clientset { } // New creates a new Clientset for the given RESTClient. -func New(c restclient.Interface) *Clientset { +func New(c rest.Interface) *Clientset { var cs Clientset cs.CoreV1Client = v1core.New(c) cs.AppsV1beta1Client = v1beta1apps.New(c) @@ -392,9 +409,10 @@ func New(c restclient.Interface) *Clientset { cs.AutoscalingV1Client = v1autoscaling.New(c) cs.BatchV1Client = v1batch.New(c) cs.BatchV2alpha1Client = v2alpha1batch.New(c) - cs.CertificatesV1alpha1Client = v1alpha1certificates.New(c) + cs.CertificatesV1beta1Client = v1beta1certificates.New(c) cs.ExtensionsV1beta1Client = v1beta1extensions.New(c) cs.PolicyV1beta1Client = v1beta1policy.New(c) + cs.RbacV1beta1Client = v1beta1rbac.New(c) cs.RbacV1alpha1Client = v1alpha1rbac.New(c) cs.StorageV1beta1Client = v1beta1storage.New(c) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/doc.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/doc.go index 30b86bde..d916c87b 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1] +// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1] // This package has the automatically generated clientset. package clientset diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake/BUILD b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake/BUILD index 1e1aa74f..7a033bc6 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake/BUILD @@ -29,8 +29,8 @@ go_library( "//pkg/client/clientset_generated/clientset/typed/batch/v1/fake:go_default_library", "//pkg/client/clientset_generated/clientset/typed/batch/v2alpha1:go_default_library", "//pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/fake:go_default_library", - "//pkg/client/clientset_generated/clientset/typed/certificates/v1alpha1:go_default_library", - "//pkg/client/clientset_generated/clientset/typed/certificates/v1alpha1/fake:go_default_library", + "//pkg/client/clientset_generated/clientset/typed/certificates/v1beta1:go_default_library", + "//pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/fake:go_default_library", "//pkg/client/clientset_generated/clientset/typed/core/v1:go_default_library", "//pkg/client/clientset_generated/clientset/typed/core/v1/fake:go_default_library", "//pkg/client/clientset_generated/clientset/typed/extensions/v1beta1:go_default_library", @@ -39,6 +39,8 @@ go_library( "//pkg/client/clientset_generated/clientset/typed/policy/v1beta1/fake:go_default_library", "//pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1:go_default_library", "//pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/fake:go_default_library", + "//pkg/client/clientset_generated/clientset/typed/rbac/v1beta1:go_default_library", + "//pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/fake:go_default_library", "//pkg/client/clientset_generated/clientset/typed/storage/v1beta1:go_default_library", "//pkg/client/clientset_generated/clientset/typed/storage/v1beta1/fake:go_default_library", "//pkg/client/testing/core:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake/clientset_generated.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake/clientset_generated.go index bb030ddf..909fbd63 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake/clientset_generated.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake/clientset_generated.go @@ -33,8 +33,8 @@ import ( fakev1batch "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v1/fake" v2alpha1batch "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1" fakev2alpha1batch "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/fake" - v1alpha1certificates "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1alpha1" - fakev1alpha1certificates "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1alpha1/fake" + v1beta1certificates "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1" + fakev1beta1certificates "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/fake" v1core "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1" fakev1core "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake" v1beta1extensions "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1" @@ -43,6 +43,8 @@ import ( fakev1beta1policy "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/fake" v1alpha1rbac "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1" fakev1alpha1rbac "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/fake" + v1beta1rbac "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1" + fakev1beta1rbac "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/fake" v1beta1storage "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1beta1" fakev1beta1storage "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/fake" "k8s.io/kubernetes/pkg/client/testing/core" @@ -148,14 +150,14 @@ func (c *Clientset) BatchV2alpha1() v2alpha1batch.BatchV2alpha1Interface { return &fakev2alpha1batch.FakeBatchV2alpha1{Fake: &c.Fake} } -// CertificatesV1alpha1 retrieves the CertificatesV1alpha1Client -func (c *Clientset) CertificatesV1alpha1() v1alpha1certificates.CertificatesV1alpha1Interface { - return &fakev1alpha1certificates.FakeCertificatesV1alpha1{Fake: &c.Fake} +// CertificatesV1beta1 retrieves the CertificatesV1beta1Client +func (c *Clientset) CertificatesV1beta1() v1beta1certificates.CertificatesV1beta1Interface { + return &fakev1beta1certificates.FakeCertificatesV1beta1{Fake: &c.Fake} } -// Certificates retrieves the CertificatesV1alpha1Client -func (c *Clientset) Certificates() v1alpha1certificates.CertificatesV1alpha1Interface { - return &fakev1alpha1certificates.FakeCertificatesV1alpha1{Fake: &c.Fake} +// Certificates retrieves the CertificatesV1beta1Client +func (c *Clientset) Certificates() v1beta1certificates.CertificatesV1beta1Interface { + return &fakev1beta1certificates.FakeCertificatesV1beta1{Fake: &c.Fake} } // ExtensionsV1beta1 retrieves the ExtensionsV1beta1Client @@ -178,13 +180,18 @@ func (c *Clientset) Policy() v1beta1policy.PolicyV1beta1Interface { return &fakev1beta1policy.FakePolicyV1beta1{Fake: &c.Fake} } -// RbacV1alpha1 retrieves the RbacV1alpha1Client -func (c *Clientset) RbacV1alpha1() v1alpha1rbac.RbacV1alpha1Interface { - return &fakev1alpha1rbac.FakeRbacV1alpha1{Fake: &c.Fake} +// RbacV1beta1 retrieves the RbacV1beta1Client +func (c *Clientset) RbacV1beta1() v1beta1rbac.RbacV1beta1Interface { + return &fakev1beta1rbac.FakeRbacV1beta1{Fake: &c.Fake} } -// Rbac retrieves the RbacV1alpha1Client -func (c *Clientset) Rbac() v1alpha1rbac.RbacV1alpha1Interface { +// Rbac retrieves the RbacV1beta1Client +func (c *Clientset) Rbac() v1beta1rbac.RbacV1beta1Interface { + return &fakev1beta1rbac.FakeRbacV1beta1{Fake: &c.Fake} +} + +// RbacV1alpha1 retrieves the RbacV1alpha1Client +func (c *Clientset) RbacV1alpha1() v1alpha1rbac.RbacV1alpha1Interface { return &fakev1alpha1rbac.FakeRbacV1alpha1{Fake: &c.Fake} } diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake/doc.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake/doc.go index ab373a87..f2bc62de 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1] +// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1] // This package has the automatically generated fake clientset. package fake diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/BUILD b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/BUILD index b0b3defc..8c49c700 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/BUILD @@ -18,13 +18,13 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/api:go_default_library", - "//pkg/api/v1:go_default_library", "//pkg/apis/apps/v1beta1:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/runtime/serializer", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/apps_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/apps_client.go index 535dae43..e84cddea 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/apps_client.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/apps_client.go @@ -20,18 +20,18 @@ import ( fmt "fmt" schema "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type AppsV1beta1Interface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface StatefulSetsGetter } // AppsV1beta1Client is used to interact with features provided by the apps group. type AppsV1beta1Client struct { - restClient restclient.Interface + restClient rest.Interface } func (c *AppsV1beta1Client) StatefulSets(namespace string) StatefulSetInterface { @@ -39,12 +39,12 @@ func (c *AppsV1beta1Client) StatefulSets(namespace string) StatefulSetInterface } // NewForConfig creates a new AppsV1beta1Client for the given config. -func NewForConfig(c *restclient.Config) (*AppsV1beta1Client, error) { +func NewForConfig(c *rest.Config) (*AppsV1beta1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -53,7 +53,7 @@ func NewForConfig(c *restclient.Config) (*AppsV1beta1Client, error) { // NewForConfigOrDie creates a new AppsV1beta1Client for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *AppsV1beta1Client { +func NewForConfigOrDie(c *rest.Config) *AppsV1beta1Client { client, err := NewForConfig(c) if err != nil { panic(err) @@ -62,11 +62,11 @@ func NewForConfigOrDie(c *restclient.Config) *AppsV1beta1Client { } // New creates a new AppsV1beta1Client for the given RESTClient. -func New(c restclient.Interface) *AppsV1beta1Client { +func New(c rest.Interface) *AppsV1beta1Client { return &AppsV1beta1Client{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { gv, err := schema.ParseGroupVersion("apps/v1beta1") if err != nil { return err @@ -77,7 +77,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/apis" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } copyGroupVersion := gv config.GroupVersion = ©GroupVersion @@ -89,7 +89,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *AppsV1beta1Client) RESTClient() restclient.Interface { +func (c *AppsV1beta1Client) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/doc.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/doc.go index e596bf01..0e58290b 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1] +// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1] // This package has the automatically generated typed clients. package v1beta1 diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/fake/BUILD b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/fake/BUILD index 782783b2..630c0f20 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/fake/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/fake/BUILD @@ -16,16 +16,15 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", - "//pkg/api/v1:go_default_library", "//pkg/apis/apps/v1beta1:go_default_library", "//pkg/client/clientset_generated/clientset/typed/apps/v1beta1:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/fake/doc.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/fake/doc.go index ea928c21..c4753e08 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/fake/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/fake/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1] +// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1] // Package fake has the automatically generated clients. package fake diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/fake/fake_apps_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/fake/fake_apps_client.go index 815cbc8b..ae22f079 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/fake/fake_apps_client.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/fake/fake_apps_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" v1beta1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -32,7 +32,7 @@ func (c *FakeAppsV1beta1) StatefulSets(namespace string) v1beta1.StatefulSetInte // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeAppsV1beta1) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeAppsV1beta1) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/fake/fake_statefulset.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/fake/fake_statefulset.go index d1575d8e..18792031 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/fake/fake_statefulset.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/fake/fake_statefulset.go @@ -17,12 +17,11 @@ limitations under the License. package fake import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" v1beta1 "k8s.io/kubernetes/pkg/apis/apps/v1beta1" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -79,7 +78,7 @@ func (c *FakeStatefulSets) DeleteCollection(options *v1.DeleteOptions, listOptio return err } -func (c *FakeStatefulSets) Get(name string, options meta_v1.GetOptions) (result *v1beta1.StatefulSet, err error) { +func (c *FakeStatefulSets) Get(name string, options v1.GetOptions) (result *v1beta1.StatefulSet, err error) { obj, err := c.Fake. Invokes(core.NewGetAction(statefulsetsResource, c.ns, name), &v1beta1.StatefulSet{}) @@ -118,7 +117,7 @@ func (c *FakeStatefulSets) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched statefulSet. -func (c *FakeStatefulSets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.StatefulSet, err error) { +func (c *FakeStatefulSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.StatefulSet, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(statefulsetsResource, c.ns, name, data, subresources...), &v1beta1.StatefulSet{}) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/statefulset.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/statefulset.go index 1686a3b2..7a993a26 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/statefulset.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/statefulset.go @@ -17,12 +17,12 @@ limitations under the License. package v1beta1 import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" v1beta1 "k8s.io/kubernetes/pkg/apis/apps/v1beta1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // StatefulSetsGetter has a method to return a StatefulSetInterface. @@ -38,16 +38,16 @@ type StatefulSetInterface interface { UpdateStatus(*v1beta1.StatefulSet) (*v1beta1.StatefulSet, error) Delete(name string, options *v1.DeleteOptions) error DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options meta_v1.GetOptions) (*v1beta1.StatefulSet, error) + Get(name string, options v1.GetOptions) (*v1beta1.StatefulSet, error) List(opts v1.ListOptions) (*v1beta1.StatefulSetList, error) Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.StatefulSet, err error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.StatefulSet, err error) StatefulSetExpansion } // statefulSets implements StatefulSetInterface type statefulSets struct { - client restclient.Interface + client rest.Interface ns string } @@ -123,7 +123,7 @@ func (c *statefulSets) DeleteCollection(options *v1.DeleteOptions, listOptions v } // Get takes name of the statefulSet, and returns the corresponding statefulSet object, and an error if there is any. -func (c *statefulSets) Get(name string, options meta_v1.GetOptions) (result *v1beta1.StatefulSet, err error) { +func (c *statefulSets) Get(name string, options v1.GetOptions) (result *v1beta1.StatefulSet, err error) { result = &v1beta1.StatefulSet{} err = c.client.Get(). Namespace(c.ns). @@ -158,7 +158,7 @@ func (c *statefulSets) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched statefulSet. -func (c *statefulSets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.StatefulSet, err error) { +func (c *statefulSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.StatefulSet, err error) { result = &v1beta1.StatefulSet{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/BUILD b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/BUILD index 96b33eec..06e0edd0 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/BUILD @@ -20,9 +20,9 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/apis/authentication/v1beta1:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/runtime/serializer", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/authentication_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/authentication_client.go index bb60779a..b4107ae6 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/authentication_client.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/authentication_client.go @@ -20,18 +20,18 @@ import ( fmt "fmt" schema "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type AuthenticationV1beta1Interface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface TokenReviewsGetter } // AuthenticationV1beta1Client is used to interact with features provided by the authentication.k8s.io group. type AuthenticationV1beta1Client struct { - restClient restclient.Interface + restClient rest.Interface } func (c *AuthenticationV1beta1Client) TokenReviews() TokenReviewInterface { @@ -39,12 +39,12 @@ func (c *AuthenticationV1beta1Client) TokenReviews() TokenReviewInterface { } // NewForConfig creates a new AuthenticationV1beta1Client for the given config. -func NewForConfig(c *restclient.Config) (*AuthenticationV1beta1Client, error) { +func NewForConfig(c *rest.Config) (*AuthenticationV1beta1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -53,7 +53,7 @@ func NewForConfig(c *restclient.Config) (*AuthenticationV1beta1Client, error) { // NewForConfigOrDie creates a new AuthenticationV1beta1Client for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *AuthenticationV1beta1Client { +func NewForConfigOrDie(c *rest.Config) *AuthenticationV1beta1Client { client, err := NewForConfig(c) if err != nil { panic(err) @@ -62,11 +62,11 @@ func NewForConfigOrDie(c *restclient.Config) *AuthenticationV1beta1Client { } // New creates a new AuthenticationV1beta1Client for the given RESTClient. -func New(c restclient.Interface) *AuthenticationV1beta1Client { +func New(c rest.Interface) *AuthenticationV1beta1Client { return &AuthenticationV1beta1Client{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { gv, err := schema.ParseGroupVersion("authentication.k8s.io/v1beta1") if err != nil { return err @@ -77,7 +77,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/apis" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } copyGroupVersion := gv config.GroupVersion = ©GroupVersion @@ -89,7 +89,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *AuthenticationV1beta1Client) RESTClient() restclient.Interface { +func (c *AuthenticationV1beta1Client) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/doc.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/doc.go index e596bf01..0e58290b 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1] +// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1] // This package has the automatically generated typed clients. package v1beta1 diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/fake/BUILD b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/fake/BUILD index 241141bb..02d4e95b 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/fake/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/fake/BUILD @@ -19,8 +19,8 @@ go_library( deps = [ "//pkg/apis/authentication/v1beta1:go_default_library", "//pkg/client/clientset_generated/clientset/typed/authentication/v1beta1:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/fake/doc.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/fake/doc.go index ea928c21..c4753e08 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/fake/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/fake/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1] +// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1] // Package fake has the automatically generated clients. package fake diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/fake/fake_authentication_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/fake/fake_authentication_client.go index 61ed5c9f..460d7dd8 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/fake/fake_authentication_client.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/fake/fake_authentication_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" v1beta1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -32,7 +32,7 @@ func (c *FakeAuthenticationV1beta1) TokenReviews() v1beta1.TokenReviewInterface // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeAuthenticationV1beta1) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeAuthenticationV1beta1) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/tokenreview.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/tokenreview.go index 584713f5..7f9f1e9f 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/tokenreview.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1/tokenreview.go @@ -17,7 +17,7 @@ limitations under the License. package v1beta1 import ( - restclient "k8s.io/kubernetes/pkg/client/restclient" + rest "k8s.io/client-go/rest" ) // TokenReviewsGetter has a method to return a TokenReviewInterface. @@ -33,7 +33,7 @@ type TokenReviewInterface interface { // tokenReviews implements TokenReviewInterface type tokenReviews struct { - client restclient.Interface + client rest.Interface } // newTokenReviews returns a TokenReviews diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/BUILD b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/BUILD index 9b89c253..17adcb15 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/BUILD @@ -24,9 +24,9 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/apis/authorization/v1beta1:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/runtime/serializer", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/authorization_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/authorization_client.go index 0768137d..57c8cdb4 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/authorization_client.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/authorization_client.go @@ -20,12 +20,12 @@ import ( fmt "fmt" schema "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type AuthorizationV1beta1Interface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface LocalSubjectAccessReviewsGetter SelfSubjectAccessReviewsGetter SubjectAccessReviewsGetter @@ -33,7 +33,7 @@ type AuthorizationV1beta1Interface interface { // AuthorizationV1beta1Client is used to interact with features provided by the authorization.k8s.io group. type AuthorizationV1beta1Client struct { - restClient restclient.Interface + restClient rest.Interface } func (c *AuthorizationV1beta1Client) LocalSubjectAccessReviews(namespace string) LocalSubjectAccessReviewInterface { @@ -49,12 +49,12 @@ func (c *AuthorizationV1beta1Client) SubjectAccessReviews() SubjectAccessReviewI } // NewForConfig creates a new AuthorizationV1beta1Client for the given config. -func NewForConfig(c *restclient.Config) (*AuthorizationV1beta1Client, error) { +func NewForConfig(c *rest.Config) (*AuthorizationV1beta1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -63,7 +63,7 @@ func NewForConfig(c *restclient.Config) (*AuthorizationV1beta1Client, error) { // NewForConfigOrDie creates a new AuthorizationV1beta1Client for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *AuthorizationV1beta1Client { +func NewForConfigOrDie(c *rest.Config) *AuthorizationV1beta1Client { client, err := NewForConfig(c) if err != nil { panic(err) @@ -72,11 +72,11 @@ func NewForConfigOrDie(c *restclient.Config) *AuthorizationV1beta1Client { } // New creates a new AuthorizationV1beta1Client for the given RESTClient. -func New(c restclient.Interface) *AuthorizationV1beta1Client { +func New(c rest.Interface) *AuthorizationV1beta1Client { return &AuthorizationV1beta1Client{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { gv, err := schema.ParseGroupVersion("authorization.k8s.io/v1beta1") if err != nil { return err @@ -87,7 +87,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/apis" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } copyGroupVersion := gv config.GroupVersion = ©GroupVersion @@ -99,7 +99,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *AuthorizationV1beta1Client) RESTClient() restclient.Interface { +func (c *AuthorizationV1beta1Client) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/doc.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/doc.go index e596bf01..0e58290b 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1] +// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1] // This package has the automatically generated typed clients. package v1beta1 diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/fake/BUILD b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/fake/BUILD index 684ecb63..7c92cf62 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/fake/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/fake/BUILD @@ -24,8 +24,8 @@ go_library( deps = [ "//pkg/apis/authorization/v1beta1:go_default_library", "//pkg/client/clientset_generated/clientset/typed/authorization/v1beta1:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/fake/doc.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/fake/doc.go index ea928c21..c4753e08 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/fake/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/fake/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1] +// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1] // Package fake has the automatically generated clients. package fake diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/fake/fake_authorization_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/fake/fake_authorization_client.go index b15f5161..b528ba04 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/fake/fake_authorization_client.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/fake/fake_authorization_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" v1beta1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -40,7 +40,7 @@ func (c *FakeAuthorizationV1beta1) SubjectAccessReviews() v1beta1.SubjectAccessR // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeAuthorizationV1beta1) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeAuthorizationV1beta1) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/localsubjectaccessreview.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/localsubjectaccessreview.go index f9209a94..9b8e1034 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/localsubjectaccessreview.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/localsubjectaccessreview.go @@ -17,7 +17,7 @@ limitations under the License. package v1beta1 import ( - restclient "k8s.io/kubernetes/pkg/client/restclient" + rest "k8s.io/client-go/rest" ) // LocalSubjectAccessReviewsGetter has a method to return a LocalSubjectAccessReviewInterface. @@ -33,7 +33,7 @@ type LocalSubjectAccessReviewInterface interface { // localSubjectAccessReviews implements LocalSubjectAccessReviewInterface type localSubjectAccessReviews struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/selfsubjectaccessreview.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/selfsubjectaccessreview.go index 571bb294..1ef3e49a 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/selfsubjectaccessreview.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/selfsubjectaccessreview.go @@ -17,7 +17,7 @@ limitations under the License. package v1beta1 import ( - restclient "k8s.io/kubernetes/pkg/client/restclient" + rest "k8s.io/client-go/rest" ) // SelfSubjectAccessReviewsGetter has a method to return a SelfSubjectAccessReviewInterface. @@ -33,7 +33,7 @@ type SelfSubjectAccessReviewInterface interface { // selfSubjectAccessReviews implements SelfSubjectAccessReviewInterface type selfSubjectAccessReviews struct { - client restclient.Interface + client rest.Interface } // newSelfSubjectAccessReviews returns a SelfSubjectAccessReviews diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/subjectaccessreview.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/subjectaccessreview.go index 22e7ea00..cd60e9df 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/subjectaccessreview.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1/subjectaccessreview.go @@ -17,7 +17,7 @@ limitations under the License. package v1beta1 import ( - restclient "k8s.io/kubernetes/pkg/client/restclient" + rest "k8s.io/client-go/rest" ) // SubjectAccessReviewsGetter has a method to return a SubjectAccessReviewInterface. @@ -33,7 +33,7 @@ type SubjectAccessReviewInterface interface { // subjectAccessReviews implements SubjectAccessReviewInterface type subjectAccessReviews struct { - client restclient.Interface + client rest.Interface } // newSubjectAccessReviews returns a SubjectAccessReviews diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/BUILD b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/BUILD index 8969cd79..3018c13d 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/BUILD @@ -18,13 +18,13 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/api:go_default_library", - "//pkg/api/v1:go_default_library", "//pkg/apis/autoscaling/v1:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/runtime/serializer", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/autoscaling_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/autoscaling_client.go index d0aaf869..0b501982 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/autoscaling_client.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/autoscaling_client.go @@ -20,18 +20,18 @@ import ( fmt "fmt" schema "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type AutoscalingV1Interface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface HorizontalPodAutoscalersGetter } // AutoscalingV1Client is used to interact with features provided by the autoscaling group. type AutoscalingV1Client struct { - restClient restclient.Interface + restClient rest.Interface } func (c *AutoscalingV1Client) HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerInterface { @@ -39,12 +39,12 @@ func (c *AutoscalingV1Client) HorizontalPodAutoscalers(namespace string) Horizon } // NewForConfig creates a new AutoscalingV1Client for the given config. -func NewForConfig(c *restclient.Config) (*AutoscalingV1Client, error) { +func NewForConfig(c *rest.Config) (*AutoscalingV1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -53,7 +53,7 @@ func NewForConfig(c *restclient.Config) (*AutoscalingV1Client, error) { // NewForConfigOrDie creates a new AutoscalingV1Client for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *AutoscalingV1Client { +func NewForConfigOrDie(c *rest.Config) *AutoscalingV1Client { client, err := NewForConfig(c) if err != nil { panic(err) @@ -62,11 +62,11 @@ func NewForConfigOrDie(c *restclient.Config) *AutoscalingV1Client { } // New creates a new AutoscalingV1Client for the given RESTClient. -func New(c restclient.Interface) *AutoscalingV1Client { +func New(c rest.Interface) *AutoscalingV1Client { return &AutoscalingV1Client{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { gv, err := schema.ParseGroupVersion("autoscaling/v1") if err != nil { return err @@ -77,7 +77,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/apis" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } copyGroupVersion := gv config.GroupVersion = ©GroupVersion @@ -89,7 +89,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *AutoscalingV1Client) RESTClient() restclient.Interface { +func (c *AutoscalingV1Client) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/doc.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/doc.go index acd71f25..4b43d84f 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1] +// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1] // This package has the automatically generated typed clients. package v1 diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/fake/BUILD b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/fake/BUILD index 404d3615..d5105cde 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/fake/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/fake/BUILD @@ -16,16 +16,15 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", - "//pkg/api/v1:go_default_library", "//pkg/apis/autoscaling/v1:go_default_library", "//pkg/client/clientset_generated/clientset/typed/autoscaling/v1:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/fake/doc.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/fake/doc.go index ea928c21..c4753e08 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/fake/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/fake/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1] +// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1] // Package fake has the automatically generated clients. package fake diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/fake/fake_autoscaling_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/fake/fake_autoscaling_client.go index 6db35b01..13fef5bd 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/fake/fake_autoscaling_client.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/fake/fake_autoscaling_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" v1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v1" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -32,7 +32,7 @@ func (c *FakeAutoscalingV1) HorizontalPodAutoscalers(namespace string) v1.Horizo // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeAutoscalingV1) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeAutoscalingV1) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/fake/fake_horizontalpodautoscaler.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/fake/fake_horizontalpodautoscaler.go index fa4ce02d..5a97833e 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/fake/fake_horizontalpodautoscaler.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/fake/fake_horizontalpodautoscaler.go @@ -20,9 +20,8 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" - api_v1 "k8s.io/kubernetes/pkg/api/v1" v1 "k8s.io/kubernetes/pkg/apis/autoscaling/v1" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -65,14 +64,14 @@ func (c *FakeHorizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *v1. return obj.(*v1.HorizontalPodAutoscaler), err } -func (c *FakeHorizontalPodAutoscalers) Delete(name string, options *api_v1.DeleteOptions) error { +func (c *FakeHorizontalPodAutoscalers) Delete(name string, options *meta_v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewDeleteAction(horizontalpodautoscalersResource, c.ns, name), &v1.HorizontalPodAutoscaler{}) return err } -func (c *FakeHorizontalPodAutoscalers) DeleteCollection(options *api_v1.DeleteOptions, listOptions api_v1.ListOptions) error { +func (c *FakeHorizontalPodAutoscalers) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { action := core.NewDeleteCollectionAction(horizontalpodautoscalersResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &v1.HorizontalPodAutoscalerList{}) @@ -89,7 +88,7 @@ func (c *FakeHorizontalPodAutoscalers) Get(name string, options meta_v1.GetOptio return obj.(*v1.HorizontalPodAutoscaler), err } -func (c *FakeHorizontalPodAutoscalers) List(opts api_v1.ListOptions) (result *v1.HorizontalPodAutoscalerList, err error) { +func (c *FakeHorizontalPodAutoscalers) List(opts meta_v1.ListOptions) (result *v1.HorizontalPodAutoscalerList, err error) { obj, err := c.Fake. Invokes(core.NewListAction(horizontalpodautoscalersResource, c.ns, opts), &v1.HorizontalPodAutoscalerList{}) @@ -111,14 +110,14 @@ func (c *FakeHorizontalPodAutoscalers) List(opts api_v1.ListOptions) (result *v1 } // Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers. -func (c *FakeHorizontalPodAutoscalers) Watch(opts api_v1.ListOptions) (watch.Interface, error) { +func (c *FakeHorizontalPodAutoscalers) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewWatchAction(horizontalpodautoscalersResource, c.ns, opts)) } // Patch applies the patch and returns the patched horizontalPodAutoscaler. -func (c *FakeHorizontalPodAutoscalers) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.HorizontalPodAutoscaler, err error) { +func (c *FakeHorizontalPodAutoscalers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.HorizontalPodAutoscaler, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, name, data, subresources...), &v1.HorizontalPodAutoscaler{}) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/horizontalpodautoscaler.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/horizontalpodautoscaler.go index 333041a4..c0891dd5 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/horizontalpodautoscaler.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v1/horizontalpodautoscaler.go @@ -18,11 +18,11 @@ package v1 import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - api_v1 "k8s.io/kubernetes/pkg/api/v1" v1 "k8s.io/kubernetes/pkg/apis/autoscaling/v1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // HorizontalPodAutoscalersGetter has a method to return a HorizontalPodAutoscalerInterface. @@ -36,18 +36,18 @@ type HorizontalPodAutoscalerInterface interface { Create(*v1.HorizontalPodAutoscaler) (*v1.HorizontalPodAutoscaler, error) Update(*v1.HorizontalPodAutoscaler) (*v1.HorizontalPodAutoscaler, error) UpdateStatus(*v1.HorizontalPodAutoscaler) (*v1.HorizontalPodAutoscaler, error) - Delete(name string, options *api_v1.DeleteOptions) error - DeleteCollection(options *api_v1.DeleteOptions, listOptions api_v1.ListOptions) error + Delete(name string, options *meta_v1.DeleteOptions) error + DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error Get(name string, options meta_v1.GetOptions) (*v1.HorizontalPodAutoscaler, error) - List(opts api_v1.ListOptions) (*v1.HorizontalPodAutoscalerList, error) - Watch(opts api_v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.HorizontalPodAutoscaler, err error) + List(opts meta_v1.ListOptions) (*v1.HorizontalPodAutoscalerList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.HorizontalPodAutoscaler, err error) HorizontalPodAutoscalerExpansion } // horizontalPodAutoscalers implements HorizontalPodAutoscalerInterface type horizontalPodAutoscalers struct { - client restclient.Interface + client rest.Interface ns string } @@ -101,7 +101,7 @@ func (c *horizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *v1.Hori } // Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs. -func (c *horizontalPodAutoscalers) Delete(name string, options *api_v1.DeleteOptions) error { +func (c *horizontalPodAutoscalers) Delete(name string, options *meta_v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("horizontalpodautoscalers"). @@ -112,7 +112,7 @@ func (c *horizontalPodAutoscalers) Delete(name string, options *api_v1.DeleteOpt } // DeleteCollection deletes a collection of objects. -func (c *horizontalPodAutoscalers) DeleteCollection(options *api_v1.DeleteOptions, listOptions api_v1.ListOptions) error { +func (c *horizontalPodAutoscalers) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("horizontalpodautoscalers"). @@ -136,7 +136,7 @@ func (c *horizontalPodAutoscalers) Get(name string, options meta_v1.GetOptions) } // List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors. -func (c *horizontalPodAutoscalers) List(opts api_v1.ListOptions) (result *v1.HorizontalPodAutoscalerList, err error) { +func (c *horizontalPodAutoscalers) List(opts meta_v1.ListOptions) (result *v1.HorizontalPodAutoscalerList, err error) { result = &v1.HorizontalPodAutoscalerList{} err = c.client.Get(). Namespace(c.ns). @@ -148,7 +148,7 @@ func (c *horizontalPodAutoscalers) List(opts api_v1.ListOptions) (result *v1.Hor } // Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers. -func (c *horizontalPodAutoscalers) Watch(opts api_v1.ListOptions) (watch.Interface, error) { +func (c *horizontalPodAutoscalers) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -158,7 +158,7 @@ func (c *horizontalPodAutoscalers) Watch(opts api_v1.ListOptions) (watch.Interfa } // Patch applies the patch and returns the patched horizontalPodAutoscaler. -func (c *horizontalPodAutoscalers) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.HorizontalPodAutoscaler, err error) { +func (c *horizontalPodAutoscalers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.HorizontalPodAutoscaler, err error) { result = &v1.HorizontalPodAutoscaler{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v1/BUILD b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v1/BUILD index e44f2d18..18a60597 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v1/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v1/BUILD @@ -18,13 +18,13 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/api:go_default_library", - "//pkg/api/v1:go_default_library", "//pkg/apis/batch/v1:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/runtime/serializer", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v1/batch_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v1/batch_client.go index def6f1e3..2c1dba16 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v1/batch_client.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v1/batch_client.go @@ -20,18 +20,18 @@ import ( fmt "fmt" schema "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type BatchV1Interface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface JobsGetter } // BatchV1Client is used to interact with features provided by the batch group. type BatchV1Client struct { - restClient restclient.Interface + restClient rest.Interface } func (c *BatchV1Client) Jobs(namespace string) JobInterface { @@ -39,12 +39,12 @@ func (c *BatchV1Client) Jobs(namespace string) JobInterface { } // NewForConfig creates a new BatchV1Client for the given config. -func NewForConfig(c *restclient.Config) (*BatchV1Client, error) { +func NewForConfig(c *rest.Config) (*BatchV1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -53,7 +53,7 @@ func NewForConfig(c *restclient.Config) (*BatchV1Client, error) { // NewForConfigOrDie creates a new BatchV1Client for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *BatchV1Client { +func NewForConfigOrDie(c *rest.Config) *BatchV1Client { client, err := NewForConfig(c) if err != nil { panic(err) @@ -62,11 +62,11 @@ func NewForConfigOrDie(c *restclient.Config) *BatchV1Client { } // New creates a new BatchV1Client for the given RESTClient. -func New(c restclient.Interface) *BatchV1Client { +func New(c rest.Interface) *BatchV1Client { return &BatchV1Client{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { gv, err := schema.ParseGroupVersion("batch/v1") if err != nil { return err @@ -77,7 +77,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/apis" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } copyGroupVersion := gv config.GroupVersion = ©GroupVersion @@ -89,7 +89,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *BatchV1Client) RESTClient() restclient.Interface { +func (c *BatchV1Client) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v1/doc.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v1/doc.go index acd71f25..4b43d84f 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v1/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v1/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1] +// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1] // This package has the automatically generated typed clients. package v1 diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v1/fake/BUILD b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v1/fake/BUILD index 0096e514..d31eaf56 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v1/fake/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v1/fake/BUILD @@ -16,16 +16,15 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", - "//pkg/api/v1:go_default_library", "//pkg/apis/batch/v1:go_default_library", "//pkg/client/clientset_generated/clientset/typed/batch/v1:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v1/fake/doc.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v1/fake/doc.go index ea928c21..c4753e08 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v1/fake/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v1/fake/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1] +// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1] // Package fake has the automatically generated clients. package fake diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v1/fake/fake_batch_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v1/fake/fake_batch_client.go index b764cddf..ae9b99f4 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v1/fake/fake_batch_client.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v1/fake/fake_batch_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" v1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v1" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -32,7 +32,7 @@ func (c *FakeBatchV1) Jobs(namespace string) v1.JobInterface { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeBatchV1) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeBatchV1) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v1/fake/fake_job.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v1/fake/fake_job.go index 87d4e73b..5537b124 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v1/fake/fake_job.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v1/fake/fake_job.go @@ -20,9 +20,8 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" - api_v1 "k8s.io/kubernetes/pkg/api/v1" v1 "k8s.io/kubernetes/pkg/apis/batch/v1" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -65,14 +64,14 @@ func (c *FakeJobs) UpdateStatus(job *v1.Job) (*v1.Job, error) { return obj.(*v1.Job), err } -func (c *FakeJobs) Delete(name string, options *api_v1.DeleteOptions) error { +func (c *FakeJobs) Delete(name string, options *meta_v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewDeleteAction(jobsResource, c.ns, name), &v1.Job{}) return err } -func (c *FakeJobs) DeleteCollection(options *api_v1.DeleteOptions, listOptions api_v1.ListOptions) error { +func (c *FakeJobs) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { action := core.NewDeleteCollectionAction(jobsResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &v1.JobList{}) @@ -89,7 +88,7 @@ func (c *FakeJobs) Get(name string, options meta_v1.GetOptions) (result *v1.Job, return obj.(*v1.Job), err } -func (c *FakeJobs) List(opts api_v1.ListOptions) (result *v1.JobList, err error) { +func (c *FakeJobs) List(opts meta_v1.ListOptions) (result *v1.JobList, err error) { obj, err := c.Fake. Invokes(core.NewListAction(jobsResource, c.ns, opts), &v1.JobList{}) @@ -111,14 +110,14 @@ func (c *FakeJobs) List(opts api_v1.ListOptions) (result *v1.JobList, err error) } // Watch returns a watch.Interface that watches the requested jobs. -func (c *FakeJobs) Watch(opts api_v1.ListOptions) (watch.Interface, error) { +func (c *FakeJobs) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewWatchAction(jobsResource, c.ns, opts)) } // Patch applies the patch and returns the patched job. -func (c *FakeJobs) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Job, err error) { +func (c *FakeJobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Job, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(jobsResource, c.ns, name, data, subresources...), &v1.Job{}) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v1/job.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v1/job.go index 85a42fb8..ad38e23e 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v1/job.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v1/job.go @@ -18,11 +18,11 @@ package v1 import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - api_v1 "k8s.io/kubernetes/pkg/api/v1" v1 "k8s.io/kubernetes/pkg/apis/batch/v1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // JobsGetter has a method to return a JobInterface. @@ -36,18 +36,18 @@ type JobInterface interface { Create(*v1.Job) (*v1.Job, error) Update(*v1.Job) (*v1.Job, error) UpdateStatus(*v1.Job) (*v1.Job, error) - Delete(name string, options *api_v1.DeleteOptions) error - DeleteCollection(options *api_v1.DeleteOptions, listOptions api_v1.ListOptions) error + Delete(name string, options *meta_v1.DeleteOptions) error + DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error Get(name string, options meta_v1.GetOptions) (*v1.Job, error) - List(opts api_v1.ListOptions) (*v1.JobList, error) - Watch(opts api_v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Job, err error) + List(opts meta_v1.ListOptions) (*v1.JobList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Job, err error) JobExpansion } // jobs implements JobInterface type jobs struct { - client restclient.Interface + client rest.Interface ns string } @@ -101,7 +101,7 @@ func (c *jobs) UpdateStatus(job *v1.Job) (result *v1.Job, err error) { } // Delete takes name of the job and deletes it. Returns an error if one occurs. -func (c *jobs) Delete(name string, options *api_v1.DeleteOptions) error { +func (c *jobs) Delete(name string, options *meta_v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("jobs"). @@ -112,7 +112,7 @@ func (c *jobs) Delete(name string, options *api_v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *jobs) DeleteCollection(options *api_v1.DeleteOptions, listOptions api_v1.ListOptions) error { +func (c *jobs) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("jobs"). @@ -136,7 +136,7 @@ func (c *jobs) Get(name string, options meta_v1.GetOptions) (result *v1.Job, err } // List takes label and field selectors, and returns the list of Jobs that match those selectors. -func (c *jobs) List(opts api_v1.ListOptions) (result *v1.JobList, err error) { +func (c *jobs) List(opts meta_v1.ListOptions) (result *v1.JobList, err error) { result = &v1.JobList{} err = c.client.Get(). Namespace(c.ns). @@ -148,7 +148,7 @@ func (c *jobs) List(opts api_v1.ListOptions) (result *v1.JobList, err error) { } // Watch returns a watch.Interface that watches the requested jobs. -func (c *jobs) Watch(opts api_v1.ListOptions) (watch.Interface, error) { +func (c *jobs) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -158,7 +158,7 @@ func (c *jobs) Watch(opts api_v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched job. -func (c *jobs) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Job, err error) { +func (c *jobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Job, err error) { result = &v1.Job{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/BUILD b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/BUILD index baef93dd..819b3b56 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/BUILD @@ -19,13 +19,13 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/api:go_default_library", - "//pkg/api/v1:go_default_library", "//pkg/apis/batch/v2alpha1:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/runtime/serializer", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/batch_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/batch_client.go index 044517c2..9757b4f7 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/batch_client.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/batch_client.go @@ -20,19 +20,19 @@ import ( fmt "fmt" schema "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type BatchV2alpha1Interface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface CronJobsGetter JobsGetter } // BatchV2alpha1Client is used to interact with features provided by the batch group. type BatchV2alpha1Client struct { - restClient restclient.Interface + restClient rest.Interface } func (c *BatchV2alpha1Client) CronJobs(namespace string) CronJobInterface { @@ -44,12 +44,12 @@ func (c *BatchV2alpha1Client) Jobs(namespace string) JobInterface { } // NewForConfig creates a new BatchV2alpha1Client for the given config. -func NewForConfig(c *restclient.Config) (*BatchV2alpha1Client, error) { +func NewForConfig(c *rest.Config) (*BatchV2alpha1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -58,7 +58,7 @@ func NewForConfig(c *restclient.Config) (*BatchV2alpha1Client, error) { // NewForConfigOrDie creates a new BatchV2alpha1Client for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *BatchV2alpha1Client { +func NewForConfigOrDie(c *rest.Config) *BatchV2alpha1Client { client, err := NewForConfig(c) if err != nil { panic(err) @@ -67,11 +67,11 @@ func NewForConfigOrDie(c *restclient.Config) *BatchV2alpha1Client { } // New creates a new BatchV2alpha1Client for the given RESTClient. -func New(c restclient.Interface) *BatchV2alpha1Client { +func New(c rest.Interface) *BatchV2alpha1Client { return &BatchV2alpha1Client{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { gv, err := schema.ParseGroupVersion("batch/v2alpha1") if err != nil { return err @@ -82,7 +82,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/apis" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } copyGroupVersion := gv config.GroupVersion = ©GroupVersion @@ -94,7 +94,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *BatchV2alpha1Client) RESTClient() restclient.Interface { +func (c *BatchV2alpha1Client) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/cronjob.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/cronjob.go index fbcb4656..e7608e69 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/cronjob.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/cronjob.go @@ -17,12 +17,12 @@ limitations under the License. package v2alpha1 import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" v2alpha1 "k8s.io/kubernetes/pkg/apis/batch/v2alpha1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // CronJobsGetter has a method to return a CronJobInterface. @@ -38,16 +38,16 @@ type CronJobInterface interface { UpdateStatus(*v2alpha1.CronJob) (*v2alpha1.CronJob, error) Delete(name string, options *v1.DeleteOptions) error DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options meta_v1.GetOptions) (*v2alpha1.CronJob, error) + Get(name string, options v1.GetOptions) (*v2alpha1.CronJob, error) List(opts v1.ListOptions) (*v2alpha1.CronJobList, error) Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v2alpha1.CronJob, err error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2alpha1.CronJob, err error) CronJobExpansion } // cronJobs implements CronJobInterface type cronJobs struct { - client restclient.Interface + client rest.Interface ns string } @@ -123,7 +123,7 @@ func (c *cronJobs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.Li } // Get takes name of the cronJob, and returns the corresponding cronJob object, and an error if there is any. -func (c *cronJobs) Get(name string, options meta_v1.GetOptions) (result *v2alpha1.CronJob, err error) { +func (c *cronJobs) Get(name string, options v1.GetOptions) (result *v2alpha1.CronJob, err error) { result = &v2alpha1.CronJob{} err = c.client.Get(). Namespace(c.ns). @@ -158,7 +158,7 @@ func (c *cronJobs) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched cronJob. -func (c *cronJobs) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v2alpha1.CronJob, err error) { +func (c *cronJobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2alpha1.CronJob, err error) { result = &v2alpha1.CronJob{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/doc.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/doc.go index 59c111e7..e1d1a76d 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1] +// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1] // This package has the automatically generated typed clients. package v2alpha1 diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/fake/BUILD b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/fake/BUILD index 2323ebc6..ffcadd7f 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/fake/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/fake/BUILD @@ -17,16 +17,15 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", - "//pkg/api/v1:go_default_library", "//pkg/apis/batch/v2alpha1:go_default_library", "//pkg/client/clientset_generated/clientset/typed/batch/v2alpha1:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/fake/doc.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/fake/doc.go index ea928c21..c4753e08 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/fake/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/fake/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1] +// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1] // Package fake has the automatically generated clients. package fake diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/fake/fake_batch_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/fake/fake_batch_client.go index 3e2a1f6f..aff53da5 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/fake/fake_batch_client.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/fake/fake_batch_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" v2alpha1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -36,7 +36,7 @@ func (c *FakeBatchV2alpha1) Jobs(namespace string) v2alpha1.JobInterface { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeBatchV2alpha1) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeBatchV2alpha1) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/fake/fake_cronjob.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/fake/fake_cronjob.go index 12b1ee4b..7d9fc98f 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/fake/fake_cronjob.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/fake/fake_cronjob.go @@ -17,12 +17,11 @@ limitations under the License. package fake import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" v2alpha1 "k8s.io/kubernetes/pkg/apis/batch/v2alpha1" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -79,7 +78,7 @@ func (c *FakeCronJobs) DeleteCollection(options *v1.DeleteOptions, listOptions v return err } -func (c *FakeCronJobs) Get(name string, options meta_v1.GetOptions) (result *v2alpha1.CronJob, err error) { +func (c *FakeCronJobs) Get(name string, options v1.GetOptions) (result *v2alpha1.CronJob, err error) { obj, err := c.Fake. Invokes(core.NewGetAction(cronjobsResource, c.ns, name), &v2alpha1.CronJob{}) @@ -118,7 +117,7 @@ func (c *FakeCronJobs) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched cronJob. -func (c *FakeCronJobs) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v2alpha1.CronJob, err error) { +func (c *FakeCronJobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2alpha1.CronJob, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(cronjobsResource, c.ns, name, data, subresources...), &v2alpha1.CronJob{}) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/fake/fake_job.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/fake/fake_job.go index 88920f95..d9088bba 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/fake/fake_job.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/fake/fake_job.go @@ -17,12 +17,11 @@ limitations under the License. package fake import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" v2alpha1 "k8s.io/kubernetes/pkg/apis/batch/v2alpha1" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -79,7 +78,7 @@ func (c *FakeJobs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.Li return err } -func (c *FakeJobs) Get(name string, options meta_v1.GetOptions) (result *v2alpha1.Job, err error) { +func (c *FakeJobs) Get(name string, options v1.GetOptions) (result *v2alpha1.Job, err error) { obj, err := c.Fake. Invokes(core.NewGetAction(jobsResource, c.ns, name), &v2alpha1.Job{}) @@ -118,7 +117,7 @@ func (c *FakeJobs) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched job. -func (c *FakeJobs) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v2alpha1.Job, err error) { +func (c *FakeJobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2alpha1.Job, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(jobsResource, c.ns, name, data, subresources...), &v2alpha1.Job{}) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/job.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/job.go index 1bfde0b0..29aafb64 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/job.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/job.go @@ -17,12 +17,12 @@ limitations under the License. package v2alpha1 import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" v2alpha1 "k8s.io/kubernetes/pkg/apis/batch/v2alpha1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // JobsGetter has a method to return a JobInterface. @@ -38,16 +38,16 @@ type JobInterface interface { UpdateStatus(*v2alpha1.Job) (*v2alpha1.Job, error) Delete(name string, options *v1.DeleteOptions) error DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options meta_v1.GetOptions) (*v2alpha1.Job, error) + Get(name string, options v1.GetOptions) (*v2alpha1.Job, error) List(opts v1.ListOptions) (*v2alpha1.JobList, error) Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v2alpha1.Job, err error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2alpha1.Job, err error) JobExpansion } // jobs implements JobInterface type jobs struct { - client restclient.Interface + client rest.Interface ns string } @@ -123,7 +123,7 @@ func (c *jobs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOp } // Get takes name of the job, and returns the corresponding job object, and an error if there is any. -func (c *jobs) Get(name string, options meta_v1.GetOptions) (result *v2alpha1.Job, err error) { +func (c *jobs) Get(name string, options v1.GetOptions) (result *v2alpha1.Job, err error) { result = &v2alpha1.Job{} err = c.client.Get(). Namespace(c.ns). @@ -158,7 +158,7 @@ func (c *jobs) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched job. -func (c *jobs) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v2alpha1.Job, err error) { +func (c *jobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2alpha1.Job, err error) { result = &v2alpha1.Job{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1alpha1/BUILD b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/BUILD similarity index 84% rename from vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1alpha1/BUILD rename to vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/BUILD index 043343ce..2ada215e 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1alpha1/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/BUILD @@ -19,13 +19,13 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/api:go_default_library", - "//pkg/api/v1:go_default_library", - "//pkg/apis/certificates/v1alpha1:go_default_library", - "//pkg/client/restclient:go_default_library", + "//pkg/apis/certificates/v1beta1:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/runtime/serializer", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) @@ -40,7 +40,7 @@ filegroup( name = "all-srcs", srcs = [ ":package-srcs", - "//pkg/client/clientset_generated/clientset/typed/certificates/v1alpha1/fake:all-srcs", + "//pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/fake:all-srcs", ], tags = ["automanaged"], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1alpha1/certificates_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/certificates_client.go similarity index 52% rename from vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1alpha1/certificates_client.go rename to vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/certificates_client.go index 1112c559..27f77d35 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1alpha1/certificates_client.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/certificates_client.go @@ -14,46 +14,46 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package v1beta1 import ( fmt "fmt" schema "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) -type CertificatesV1alpha1Interface interface { - RESTClient() restclient.Interface +type CertificatesV1beta1Interface interface { + RESTClient() rest.Interface CertificateSigningRequestsGetter } -// CertificatesV1alpha1Client is used to interact with features provided by the certificates.k8s.io group. -type CertificatesV1alpha1Client struct { - restClient restclient.Interface +// CertificatesV1beta1Client is used to interact with features provided by the certificates.k8s.io group. +type CertificatesV1beta1Client struct { + restClient rest.Interface } -func (c *CertificatesV1alpha1Client) CertificateSigningRequests() CertificateSigningRequestInterface { +func (c *CertificatesV1beta1Client) CertificateSigningRequests() CertificateSigningRequestInterface { return newCertificateSigningRequests(c) } -// NewForConfig creates a new CertificatesV1alpha1Client for the given config. -func NewForConfig(c *restclient.Config) (*CertificatesV1alpha1Client, error) { +// NewForConfig creates a new CertificatesV1beta1Client for the given config. +func NewForConfig(c *rest.Config) (*CertificatesV1beta1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } - return &CertificatesV1alpha1Client{client}, nil + return &CertificatesV1beta1Client{client}, nil } -// NewForConfigOrDie creates a new CertificatesV1alpha1Client for the given config and +// NewForConfigOrDie creates a new CertificatesV1beta1Client for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *CertificatesV1alpha1Client { +func NewForConfigOrDie(c *rest.Config) *CertificatesV1beta1Client { client, err := NewForConfig(c) if err != nil { panic(err) @@ -61,23 +61,23 @@ func NewForConfigOrDie(c *restclient.Config) *CertificatesV1alpha1Client { return client } -// New creates a new CertificatesV1alpha1Client for the given RESTClient. -func New(c restclient.Interface) *CertificatesV1alpha1Client { - return &CertificatesV1alpha1Client{c} +// New creates a new CertificatesV1beta1Client for the given RESTClient. +func New(c rest.Interface) *CertificatesV1beta1Client { + return &CertificatesV1beta1Client{c} } -func setConfigDefaults(config *restclient.Config) error { - gv, err := schema.ParseGroupVersion("certificates.k8s.io/v1alpha1") +func setConfigDefaults(config *rest.Config) error { + gv, err := schema.ParseGroupVersion("certificates.k8s.io/v1beta1") if err != nil { return err } - // if certificates.k8s.io/v1alpha1 is not enabled, return an error + // if certificates.k8s.io/v1beta1 is not enabled, return an error if !api.Registry.IsEnabledVersion(gv) { - return fmt.Errorf("certificates.k8s.io/v1alpha1 is not enabled") + return fmt.Errorf("certificates.k8s.io/v1beta1 is not enabled") } config.APIPath = "/apis" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } copyGroupVersion := gv config.GroupVersion = ©GroupVersion @@ -89,7 +89,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *CertificatesV1alpha1Client) RESTClient() restclient.Interface { +func (c *CertificatesV1beta1Client) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1alpha1/certificatesigningrequest.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/certificatesigningrequest.go similarity index 72% rename from vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1alpha1/certificatesigningrequest.go rename to vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/certificatesigningrequest.go index 885a247a..33f8eb6e 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1alpha1/certificatesigningrequest.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/certificatesigningrequest.go @@ -14,15 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package v1beta1 import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/client-go/pkg/api" - v1 "k8s.io/client-go/pkg/api/v1" - v1alpha1 "k8s.io/client-go/pkg/apis/certificates/v1alpha1" rest "k8s.io/client-go/rest" + api "k8s.io/kubernetes/pkg/api" + v1beta1 "k8s.io/kubernetes/pkg/apis/certificates/v1beta1" ) // CertificateSigningRequestsGetter has a method to return a CertificateSigningRequestInterface. @@ -33,15 +33,15 @@ type CertificateSigningRequestsGetter interface { // CertificateSigningRequestInterface has methods to work with CertificateSigningRequest resources. type CertificateSigningRequestInterface interface { - Create(*v1alpha1.CertificateSigningRequest) (*v1alpha1.CertificateSigningRequest, error) - Update(*v1alpha1.CertificateSigningRequest) (*v1alpha1.CertificateSigningRequest, error) - UpdateStatus(*v1alpha1.CertificateSigningRequest) (*v1alpha1.CertificateSigningRequest, error) + Create(*v1beta1.CertificateSigningRequest) (*v1beta1.CertificateSigningRequest, error) + Update(*v1beta1.CertificateSigningRequest) (*v1beta1.CertificateSigningRequest, error) + UpdateStatus(*v1beta1.CertificateSigningRequest) (*v1beta1.CertificateSigningRequest, error) Delete(name string, options *v1.DeleteOptions) error DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options meta_v1.GetOptions) (*v1alpha1.CertificateSigningRequest, error) - List(opts v1.ListOptions) (*v1alpha1.CertificateSigningRequestList, error) + Get(name string, options v1.GetOptions) (*v1beta1.CertificateSigningRequest, error) + List(opts v1.ListOptions) (*v1beta1.CertificateSigningRequestList, error) Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.CertificateSigningRequest, err error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CertificateSigningRequest, err error) CertificateSigningRequestExpansion } @@ -51,15 +51,15 @@ type certificateSigningRequests struct { } // newCertificateSigningRequests returns a CertificateSigningRequests -func newCertificateSigningRequests(c *CertificatesV1alpha1Client) *certificateSigningRequests { +func newCertificateSigningRequests(c *CertificatesV1beta1Client) *certificateSigningRequests { return &certificateSigningRequests{ client: c.RESTClient(), } } // Create takes the representation of a certificateSigningRequest and creates it. Returns the server's representation of the certificateSigningRequest, and an error, if there is any. -func (c *certificateSigningRequests) Create(certificateSigningRequest *v1alpha1.CertificateSigningRequest) (result *v1alpha1.CertificateSigningRequest, err error) { - result = &v1alpha1.CertificateSigningRequest{} +func (c *certificateSigningRequests) Create(certificateSigningRequest *v1beta1.CertificateSigningRequest) (result *v1beta1.CertificateSigningRequest, err error) { + result = &v1beta1.CertificateSigningRequest{} err = c.client.Post(). Resource("certificatesigningrequests"). Body(certificateSigningRequest). @@ -69,8 +69,8 @@ func (c *certificateSigningRequests) Create(certificateSigningRequest *v1alpha1. } // Update takes the representation of a certificateSigningRequest and updates it. Returns the server's representation of the certificateSigningRequest, and an error, if there is any. -func (c *certificateSigningRequests) Update(certificateSigningRequest *v1alpha1.CertificateSigningRequest) (result *v1alpha1.CertificateSigningRequest, err error) { - result = &v1alpha1.CertificateSigningRequest{} +func (c *certificateSigningRequests) Update(certificateSigningRequest *v1beta1.CertificateSigningRequest) (result *v1beta1.CertificateSigningRequest, err error) { + result = &v1beta1.CertificateSigningRequest{} err = c.client.Put(). Resource("certificatesigningrequests"). Name(certificateSigningRequest.Name). @@ -83,8 +83,8 @@ func (c *certificateSigningRequests) Update(certificateSigningRequest *v1alpha1. // UpdateStatus was generated because the type contains a Status member. // Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus(). -func (c *certificateSigningRequests) UpdateStatus(certificateSigningRequest *v1alpha1.CertificateSigningRequest) (result *v1alpha1.CertificateSigningRequest, err error) { - result = &v1alpha1.CertificateSigningRequest{} +func (c *certificateSigningRequests) UpdateStatus(certificateSigningRequest *v1beta1.CertificateSigningRequest) (result *v1beta1.CertificateSigningRequest, err error) { + result = &v1beta1.CertificateSigningRequest{} err = c.client.Put(). Resource("certificatesigningrequests"). Name(certificateSigningRequest.Name). @@ -116,8 +116,8 @@ func (c *certificateSigningRequests) DeleteCollection(options *v1.DeleteOptions, } // Get takes name of the certificateSigningRequest, and returns the corresponding certificateSigningRequest object, and an error if there is any. -func (c *certificateSigningRequests) Get(name string, options meta_v1.GetOptions) (result *v1alpha1.CertificateSigningRequest, err error) { - result = &v1alpha1.CertificateSigningRequest{} +func (c *certificateSigningRequests) Get(name string, options v1.GetOptions) (result *v1beta1.CertificateSigningRequest, err error) { + result = &v1beta1.CertificateSigningRequest{} err = c.client.Get(). Resource("certificatesigningrequests"). Name(name). @@ -128,8 +128,8 @@ func (c *certificateSigningRequests) Get(name string, options meta_v1.GetOptions } // List takes label and field selectors, and returns the list of CertificateSigningRequests that match those selectors. -func (c *certificateSigningRequests) List(opts v1.ListOptions) (result *v1alpha1.CertificateSigningRequestList, err error) { - result = &v1alpha1.CertificateSigningRequestList{} +func (c *certificateSigningRequests) List(opts v1.ListOptions) (result *v1beta1.CertificateSigningRequestList, err error) { + result = &v1beta1.CertificateSigningRequestList{} err = c.client.Get(). Resource("certificatesigningrequests"). VersionedParams(&opts, api.ParameterCodec). @@ -148,8 +148,8 @@ func (c *certificateSigningRequests) Watch(opts v1.ListOptions) (watch.Interface } // Patch applies the patch and returns the patched certificateSigningRequest. -func (c *certificateSigningRequests) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.CertificateSigningRequest, err error) { - result = &v1alpha1.CertificateSigningRequest{} +func (c *certificateSigningRequests) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CertificateSigningRequest, err error) { + result = &v1beta1.CertificateSigningRequest{} err = c.client.Patch(pt). Resource("certificatesigningrequests"). SubResource(subresources...). diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1alpha1/certificatesigningrequest_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/certificatesigningrequest_expansion.go similarity index 90% rename from vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1alpha1/certificatesigningrequest_expansion.go rename to vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/certificatesigningrequest_expansion.go index 580f92c2..e7db4598 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1alpha1/certificatesigningrequest_expansion.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/certificatesigningrequest_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,10 +14,10 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package v1beta1 import ( - certificates "k8s.io/client-go/pkg/apis/certificates/v1alpha1" + certificates "k8s.io/kubernetes/pkg/apis/certificates/v1beta1" ) type CertificateSigningRequestExpansion interface { diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1alpha1/doc.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/doc.go similarity index 87% rename from vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1alpha1/doc.go rename to vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/doc.go index f7b1fe66..0e58290b 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1alpha1/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1] +// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1] // This package has the automatically generated typed clients. -package v1alpha1 +package v1beta1 diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1alpha1/fake/BUILD b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/fake/BUILD similarity index 80% rename from vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1alpha1/fake/BUILD rename to vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/fake/BUILD index 3b56fca8..81fe17db 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1alpha1/fake/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/fake/BUILD @@ -17,16 +17,15 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", - "//pkg/api/v1:go_default_library", - "//pkg/apis/certificates/v1alpha1:go_default_library", - "//pkg/client/clientset_generated/clientset/typed/certificates/v1alpha1:go_default_library", - "//pkg/client/restclient:go_default_library", + "//pkg/apis/certificates/v1beta1:go_default_library", + "//pkg/client/clientset_generated/clientset/typed/certificates/v1beta1:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1alpha1/fake/doc.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/fake/doc.go similarity index 88% rename from vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1alpha1/fake/doc.go rename to vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/fake/doc.go index ea928c21..c4753e08 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1alpha1/fake/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/fake/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1] +// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1] // Package fake has the automatically generated clients. package fake diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1alpha1/fake/fake_certificates_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/fake/fake_certificates_client.go similarity index 67% rename from vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1alpha1/fake/fake_certificates_client.go rename to vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/fake/fake_certificates_client.go index 4b069733..a8877370 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1alpha1/fake/fake_certificates_client.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/fake/fake_certificates_client.go @@ -17,22 +17,22 @@ limitations under the License. package fake import ( - v1alpha1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1alpha1" - restclient "k8s.io/kubernetes/pkg/client/restclient" + rest "k8s.io/client-go/rest" + v1beta1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1" core "k8s.io/kubernetes/pkg/client/testing/core" ) -type FakeCertificatesV1alpha1 struct { +type FakeCertificatesV1beta1 struct { *core.Fake } -func (c *FakeCertificatesV1alpha1) CertificateSigningRequests() v1alpha1.CertificateSigningRequestInterface { +func (c *FakeCertificatesV1beta1) CertificateSigningRequests() v1beta1.CertificateSigningRequestInterface { return &FakeCertificateSigningRequests{c} } // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeCertificatesV1alpha1) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeCertificatesV1beta1) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1alpha1/fake/fake_certificatesigningrequest.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/fake/fake_certificatesigningrequest.go similarity index 61% rename from vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1alpha1/fake/fake_certificatesigningrequest.go rename to vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/fake/fake_certificatesigningrequest.go index 22bb8efc..5be9fb34 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1alpha1/fake/fake_certificatesigningrequest.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/fake/fake_certificatesigningrequest.go @@ -17,75 +17,74 @@ limitations under the License. package fake import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" - v1alpha1 "k8s.io/kubernetes/pkg/apis/certificates/v1alpha1" + v1beta1 "k8s.io/kubernetes/pkg/apis/certificates/v1beta1" core "k8s.io/kubernetes/pkg/client/testing/core" ) // FakeCertificateSigningRequests implements CertificateSigningRequestInterface type FakeCertificateSigningRequests struct { - Fake *FakeCertificatesV1alpha1 + Fake *FakeCertificatesV1beta1 } -var certificatesigningrequestsResource = schema.GroupVersionResource{Group: "certificates.k8s.io", Version: "v1alpha1", Resource: "certificatesigningrequests"} +var certificatesigningrequestsResource = schema.GroupVersionResource{Group: "certificates.k8s.io", Version: "v1beta1", Resource: "certificatesigningrequests"} -func (c *FakeCertificateSigningRequests) Create(certificateSigningRequest *v1alpha1.CertificateSigningRequest) (result *v1alpha1.CertificateSigningRequest, err error) { +func (c *FakeCertificateSigningRequests) Create(certificateSigningRequest *v1beta1.CertificateSigningRequest) (result *v1beta1.CertificateSigningRequest, err error) { obj, err := c.Fake. - Invokes(core.NewRootCreateAction(certificatesigningrequestsResource, certificateSigningRequest), &v1alpha1.CertificateSigningRequest{}) + Invokes(core.NewRootCreateAction(certificatesigningrequestsResource, certificateSigningRequest), &v1beta1.CertificateSigningRequest{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.CertificateSigningRequest), err + return obj.(*v1beta1.CertificateSigningRequest), err } -func (c *FakeCertificateSigningRequests) Update(certificateSigningRequest *v1alpha1.CertificateSigningRequest) (result *v1alpha1.CertificateSigningRequest, err error) { +func (c *FakeCertificateSigningRequests) Update(certificateSigningRequest *v1beta1.CertificateSigningRequest) (result *v1beta1.CertificateSigningRequest, err error) { obj, err := c.Fake. - Invokes(core.NewRootUpdateAction(certificatesigningrequestsResource, certificateSigningRequest), &v1alpha1.CertificateSigningRequest{}) + Invokes(core.NewRootUpdateAction(certificatesigningrequestsResource, certificateSigningRequest), &v1beta1.CertificateSigningRequest{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.CertificateSigningRequest), err + return obj.(*v1beta1.CertificateSigningRequest), err } -func (c *FakeCertificateSigningRequests) UpdateStatus(certificateSigningRequest *v1alpha1.CertificateSigningRequest) (*v1alpha1.CertificateSigningRequest, error) { +func (c *FakeCertificateSigningRequests) UpdateStatus(certificateSigningRequest *v1beta1.CertificateSigningRequest) (*v1beta1.CertificateSigningRequest, error) { obj, err := c.Fake. - Invokes(core.NewRootUpdateSubresourceAction(certificatesigningrequestsResource, "status", certificateSigningRequest), &v1alpha1.CertificateSigningRequest{}) + Invokes(core.NewRootUpdateSubresourceAction(certificatesigningrequestsResource, "status", certificateSigningRequest), &v1beta1.CertificateSigningRequest{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.CertificateSigningRequest), err + return obj.(*v1beta1.CertificateSigningRequest), err } func (c *FakeCertificateSigningRequests) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. - Invokes(core.NewRootDeleteAction(certificatesigningrequestsResource, name), &v1alpha1.CertificateSigningRequest{}) + Invokes(core.NewRootDeleteAction(certificatesigningrequestsResource, name), &v1beta1.CertificateSigningRequest{}) return err } func (c *FakeCertificateSigningRequests) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := core.NewRootDeleteCollectionAction(certificatesigningrequestsResource, listOptions) - _, err := c.Fake.Invokes(action, &v1alpha1.CertificateSigningRequestList{}) + _, err := c.Fake.Invokes(action, &v1beta1.CertificateSigningRequestList{}) return err } -func (c *FakeCertificateSigningRequests) Get(name string, options meta_v1.GetOptions) (result *v1alpha1.CertificateSigningRequest, err error) { +func (c *FakeCertificateSigningRequests) Get(name string, options v1.GetOptions) (result *v1beta1.CertificateSigningRequest, err error) { obj, err := c.Fake. - Invokes(core.NewRootGetAction(certificatesigningrequestsResource, name), &v1alpha1.CertificateSigningRequest{}) + Invokes(core.NewRootGetAction(certificatesigningrequestsResource, name), &v1beta1.CertificateSigningRequest{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.CertificateSigningRequest), err + return obj.(*v1beta1.CertificateSigningRequest), err } -func (c *FakeCertificateSigningRequests) List(opts v1.ListOptions) (result *v1alpha1.CertificateSigningRequestList, err error) { +func (c *FakeCertificateSigningRequests) List(opts v1.ListOptions) (result *v1beta1.CertificateSigningRequestList, err error) { obj, err := c.Fake. - Invokes(core.NewRootListAction(certificatesigningrequestsResource, opts), &v1alpha1.CertificateSigningRequestList{}) + Invokes(core.NewRootListAction(certificatesigningrequestsResource, opts), &v1beta1.CertificateSigningRequestList{}) if obj == nil { return nil, err } @@ -94,8 +93,8 @@ func (c *FakeCertificateSigningRequests) List(opts v1.ListOptions) (result *v1al if label == nil { label = labels.Everything() } - list := &v1alpha1.CertificateSigningRequestList{} - for _, item := range obj.(*v1alpha1.CertificateSigningRequestList).Items { + list := &v1beta1.CertificateSigningRequestList{} + for _, item := range obj.(*v1beta1.CertificateSigningRequestList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -110,11 +109,11 @@ func (c *FakeCertificateSigningRequests) Watch(opts v1.ListOptions) (watch.Inter } // Patch applies the patch and returns the patched certificateSigningRequest. -func (c *FakeCertificateSigningRequests) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.CertificateSigningRequest, err error) { +func (c *FakeCertificateSigningRequests) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CertificateSigningRequest, err error) { obj, err := c.Fake. - Invokes(core.NewRootPatchSubresourceAction(certificatesigningrequestsResource, name, data, subresources...), &v1alpha1.CertificateSigningRequest{}) + Invokes(core.NewRootPatchSubresourceAction(certificatesigningrequestsResource, name, data, subresources...), &v1beta1.CertificateSigningRequest{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.CertificateSigningRequest), err + return obj.(*v1beta1.CertificateSigningRequest), err } diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1alpha1/fake/fake_certificatesigningrequest_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/fake/fake_certificatesigningrequest_expansion.go similarity index 91% rename from vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1alpha1/fake/fake_certificatesigningrequest_expansion.go rename to vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/fake/fake_certificatesigningrequest_expansion.go index 38cddc6a..2359d12e 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1alpha1/fake/fake_certificatesigningrequest_expansion.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/fake/fake_certificatesigningrequest_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -17,7 +17,7 @@ limitations under the License. package fake import ( - certificates "k8s.io/kubernetes/pkg/apis/certificates/v1alpha1" + certificates "k8s.io/kubernetes/pkg/apis/certificates/v1beta1" "k8s.io/kubernetes/pkg/client/testing/core" ) diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1alpha1/generated_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/generated_expansion.go similarity index 97% rename from vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1alpha1/generated_expansion.go rename to vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/generated_expansion.go index 48a74f4a..2b7e8ca0 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1alpha1/generated_expansion.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/generated_expansion.go @@ -14,4 +14,4 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package v1beta1 diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/BUILD b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/BUILD index c679f09d..3b71b94c 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/BUILD @@ -40,14 +40,15 @@ go_library( "//pkg/api:go_default_library", "//pkg/api/v1:go_default_library", "//pkg/apis/policy/v1beta1:go_default_library", - "//pkg/client/restclient:go_default_library", - "//pkg/fields:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/runtime/serializer", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/net", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/componentstatus.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/componentstatus.go index 923b8c0b..95657c04 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/componentstatus.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/componentstatus.go @@ -18,10 +18,11 @@ package v1 import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // ComponentStatusesGetter has a method to return a ComponentStatusInterface. @@ -34,18 +35,18 @@ type ComponentStatusesGetter interface { type ComponentStatusInterface interface { Create(*v1.ComponentStatus) (*v1.ComponentStatus, error) Update(*v1.ComponentStatus) (*v1.ComponentStatus, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Delete(name string, options *meta_v1.DeleteOptions) error + DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error Get(name string, options meta_v1.GetOptions) (*v1.ComponentStatus, error) - List(opts v1.ListOptions) (*v1.ComponentStatusList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ComponentStatus, err error) + List(opts meta_v1.ListOptions) (*v1.ComponentStatusList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ComponentStatus, err error) ComponentStatusExpansion } // componentStatuses implements ComponentStatusInterface type componentStatuses struct { - client restclient.Interface + client rest.Interface } // newComponentStatuses returns a ComponentStatuses @@ -79,7 +80,7 @@ func (c *componentStatuses) Update(componentStatus *v1.ComponentStatus) (result } // Delete takes name of the componentStatus and deletes it. Returns an error if one occurs. -func (c *componentStatuses) Delete(name string, options *v1.DeleteOptions) error { +func (c *componentStatuses) Delete(name string, options *meta_v1.DeleteOptions) error { return c.client.Delete(). Resource("componentstatuses"). Name(name). @@ -89,7 +90,7 @@ func (c *componentStatuses) Delete(name string, options *v1.DeleteOptions) error } // DeleteCollection deletes a collection of objects. -func (c *componentStatuses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *componentStatuses) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Resource("componentstatuses"). VersionedParams(&listOptions, api.ParameterCodec). @@ -111,7 +112,7 @@ func (c *componentStatuses) Get(name string, options meta_v1.GetOptions) (result } // List takes label and field selectors, and returns the list of ComponentStatuses that match those selectors. -func (c *componentStatuses) List(opts v1.ListOptions) (result *v1.ComponentStatusList, err error) { +func (c *componentStatuses) List(opts meta_v1.ListOptions) (result *v1.ComponentStatusList, err error) { result = &v1.ComponentStatusList{} err = c.client.Get(). Resource("componentstatuses"). @@ -122,7 +123,7 @@ func (c *componentStatuses) List(opts v1.ListOptions) (result *v1.ComponentStatu } // Watch returns a watch.Interface that watches the requested componentStatuses. -func (c *componentStatuses) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *componentStatuses) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Resource("componentstatuses"). @@ -131,7 +132,7 @@ func (c *componentStatuses) Watch(opts v1.ListOptions) (watch.Interface, error) } // Patch applies the patch and returns the patched componentStatus. -func (c *componentStatuses) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ComponentStatus, err error) { +func (c *componentStatuses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ComponentStatus, err error) { result = &v1.ComponentStatus{} err = c.client.Patch(pt). Resource("componentstatuses"). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/configmap.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/configmap.go index ccd1a9fe..05ea6339 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/configmap.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/configmap.go @@ -18,10 +18,11 @@ package v1 import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // ConfigMapsGetter has a method to return a ConfigMapInterface. @@ -34,18 +35,18 @@ type ConfigMapsGetter interface { type ConfigMapInterface interface { Create(*v1.ConfigMap) (*v1.ConfigMap, error) Update(*v1.ConfigMap) (*v1.ConfigMap, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Delete(name string, options *meta_v1.DeleteOptions) error + DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error Get(name string, options meta_v1.GetOptions) (*v1.ConfigMap, error) - List(opts v1.ListOptions) (*v1.ConfigMapList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ConfigMap, err error) + List(opts meta_v1.ListOptions) (*v1.ConfigMapList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ConfigMap, err error) ConfigMapExpansion } // configMaps implements ConfigMapInterface type configMaps struct { - client restclient.Interface + client rest.Interface ns string } @@ -83,7 +84,7 @@ func (c *configMaps) Update(configMap *v1.ConfigMap) (result *v1.ConfigMap, err } // Delete takes name of the configMap and deletes it. Returns an error if one occurs. -func (c *configMaps) Delete(name string, options *v1.DeleteOptions) error { +func (c *configMaps) Delete(name string, options *meta_v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("configmaps"). @@ -94,7 +95,7 @@ func (c *configMaps) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *configMaps) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *configMaps) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("configmaps"). @@ -118,7 +119,7 @@ func (c *configMaps) Get(name string, options meta_v1.GetOptions) (result *v1.Co } // List takes label and field selectors, and returns the list of ConfigMaps that match those selectors. -func (c *configMaps) List(opts v1.ListOptions) (result *v1.ConfigMapList, err error) { +func (c *configMaps) List(opts meta_v1.ListOptions) (result *v1.ConfigMapList, err error) { result = &v1.ConfigMapList{} err = c.client.Get(). Namespace(c.ns). @@ -130,7 +131,7 @@ func (c *configMaps) List(opts v1.ListOptions) (result *v1.ConfigMapList, err er } // Watch returns a watch.Interface that watches the requested configMaps. -func (c *configMaps) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *configMaps) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -140,7 +141,7 @@ func (c *configMaps) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched configMap. -func (c *configMaps) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ConfigMap, err error) { +func (c *configMaps) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ConfigMap, err error) { result = &v1.ConfigMap{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/core_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/core_client.go index ecb04548..0bd232da 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/core_client.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/core_client.go @@ -20,12 +20,12 @@ import ( fmt "fmt" schema "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type CoreV1Interface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface ComponentStatusesGetter ConfigMapsGetter EndpointsGetter @@ -46,7 +46,7 @@ type CoreV1Interface interface { // CoreV1Client is used to interact with features provided by the group. type CoreV1Client struct { - restClient restclient.Interface + restClient rest.Interface } func (c *CoreV1Client) ComponentStatuses() ComponentStatusInterface { @@ -114,12 +114,12 @@ func (c *CoreV1Client) ServiceAccounts(namespace string) ServiceAccountInterface } // NewForConfig creates a new CoreV1Client for the given config. -func NewForConfig(c *restclient.Config) (*CoreV1Client, error) { +func NewForConfig(c *rest.Config) (*CoreV1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -128,7 +128,7 @@ func NewForConfig(c *restclient.Config) (*CoreV1Client, error) { // NewForConfigOrDie creates a new CoreV1Client for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *CoreV1Client { +func NewForConfigOrDie(c *rest.Config) *CoreV1Client { client, err := NewForConfig(c) if err != nil { panic(err) @@ -137,11 +137,11 @@ func NewForConfigOrDie(c *restclient.Config) *CoreV1Client { } // New creates a new CoreV1Client for the given RESTClient. -func New(c restclient.Interface) *CoreV1Client { +func New(c rest.Interface) *CoreV1Client { return &CoreV1Client{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { gv, err := schema.ParseGroupVersion("/v1") if err != nil { return err @@ -152,7 +152,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/api" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } copyGroupVersion := gv config.GroupVersion = ©GroupVersion @@ -164,7 +164,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *CoreV1Client) RESTClient() restclient.Interface { +func (c *CoreV1Client) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/doc.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/doc.go index acd71f25..4b43d84f 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1] +// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1] // This package has the automatically generated typed clients. package v1 diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/endpoints.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/endpoints.go index 16361e50..e4067aad 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/endpoints.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/endpoints.go @@ -18,10 +18,11 @@ package v1 import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // EndpointsGetter has a method to return a EndpointsInterface. @@ -34,18 +35,18 @@ type EndpointsGetter interface { type EndpointsInterface interface { Create(*v1.Endpoints) (*v1.Endpoints, error) Update(*v1.Endpoints) (*v1.Endpoints, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Delete(name string, options *meta_v1.DeleteOptions) error + DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error Get(name string, options meta_v1.GetOptions) (*v1.Endpoints, error) - List(opts v1.ListOptions) (*v1.EndpointsList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Endpoints, err error) + List(opts meta_v1.ListOptions) (*v1.EndpointsList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Endpoints, err error) EndpointsExpansion } // endpoints implements EndpointsInterface type endpoints struct { - client restclient.Interface + client rest.Interface ns string } @@ -83,7 +84,7 @@ func (c *endpoints) Update(endpoints *v1.Endpoints) (result *v1.Endpoints, err e } // Delete takes name of the endpoints and deletes it. Returns an error if one occurs. -func (c *endpoints) Delete(name string, options *v1.DeleteOptions) error { +func (c *endpoints) Delete(name string, options *meta_v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("endpoints"). @@ -94,7 +95,7 @@ func (c *endpoints) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *endpoints) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *endpoints) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("endpoints"). @@ -118,7 +119,7 @@ func (c *endpoints) Get(name string, options meta_v1.GetOptions) (result *v1.End } // List takes label and field selectors, and returns the list of Endpoints that match those selectors. -func (c *endpoints) List(opts v1.ListOptions) (result *v1.EndpointsList, err error) { +func (c *endpoints) List(opts meta_v1.ListOptions) (result *v1.EndpointsList, err error) { result = &v1.EndpointsList{} err = c.client.Get(). Namespace(c.ns). @@ -130,7 +131,7 @@ func (c *endpoints) List(opts v1.ListOptions) (result *v1.EndpointsList, err err } // Watch returns a watch.Interface that watches the requested endpoints. -func (c *endpoints) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *endpoints) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -140,7 +141,7 @@ func (c *endpoints) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched endpoints. -func (c *endpoints) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Endpoints, err error) { +func (c *endpoints) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Endpoints, err error) { result = &v1.Endpoints{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/event.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/event.go index 9f029cf5..0d103dae 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/event.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/event.go @@ -18,10 +18,11 @@ package v1 import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // EventsGetter has a method to return a EventInterface. @@ -34,18 +35,18 @@ type EventsGetter interface { type EventInterface interface { Create(*v1.Event) (*v1.Event, error) Update(*v1.Event) (*v1.Event, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Delete(name string, options *meta_v1.DeleteOptions) error + DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error Get(name string, options meta_v1.GetOptions) (*v1.Event, error) - List(opts v1.ListOptions) (*v1.EventList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Event, err error) + List(opts meta_v1.ListOptions) (*v1.EventList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Event, err error) EventExpansion } // events implements EventInterface type events struct { - client restclient.Interface + client rest.Interface ns string } @@ -83,7 +84,7 @@ func (c *events) Update(event *v1.Event) (result *v1.Event, err error) { } // Delete takes name of the event and deletes it. Returns an error if one occurs. -func (c *events) Delete(name string, options *v1.DeleteOptions) error { +func (c *events) Delete(name string, options *meta_v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("events"). @@ -94,7 +95,7 @@ func (c *events) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *events) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *events) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("events"). @@ -118,7 +119,7 @@ func (c *events) Get(name string, options meta_v1.GetOptions) (result *v1.Event, } // List takes label and field selectors, and returns the list of Events that match those selectors. -func (c *events) List(opts v1.ListOptions) (result *v1.EventList, err error) { +func (c *events) List(opts meta_v1.ListOptions) (result *v1.EventList, err error) { result = &v1.EventList{} err = c.client.Get(). Namespace(c.ns). @@ -130,7 +131,7 @@ func (c *events) List(opts v1.ListOptions) (result *v1.EventList, err error) { } // Watch returns a watch.Interface that watches the requested events. -func (c *events) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *events) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -140,7 +141,7 @@ func (c *events) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched event. -func (c *events) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Event, err error) { +func (c *events) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Event, err error) { result = &v1.Event{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/event_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/event_expansion.go index 12545949..d6ac1b57 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/event_expansion.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/event_expansion.go @@ -19,10 +19,12 @@ package v1 import ( "fmt" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" - "k8s.io/kubernetes/pkg/fields" ) // The EventExpansion interface allows manually adding extra methods to the EventInterface. @@ -84,7 +86,7 @@ func (e *events) PatchWithEventNamespace(incompleteEvent *v1.Event, data []byte) return nil, fmt.Errorf("can't patch an event with namespace '%v' in namespace '%v'", incompleteEvent.Namespace, e.ns) } result := &v1.Event{} - err := e.client.Patch(api.StrategicMergePatchType). + err := e.client.Patch(types.StrategicMergePatchType). NamespaceIfScoped(incompleteEvent.Namespace, len(incompleteEvent.Namespace) > 0). Resource("events"). Name(incompleteEvent.Name). @@ -116,7 +118,7 @@ func (e *events) Search(objOrRef runtime.Object) (*v1.EventList, error) { refUID = &stringRefUID } fieldSelector := e.GetFieldSelector(&ref.Name, &ref.Namespace, refKind, refUID) - return e.List(v1.ListOptions{FieldSelector: fieldSelector.String()}) + return e.List(metav1.ListOptions{FieldSelector: fieldSelector.String()}) } // Returns the appropriate field selector based on the API version being used to communicate with the server. diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/BUILD b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/BUILD index 89327c93..f94c0f48 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/BUILD @@ -40,14 +40,15 @@ go_library( "//pkg/api/v1:go_default_library", "//pkg/apis/policy/v1beta1:go_default_library", "//pkg/client/clientset_generated/clientset/typed/core/v1:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", - "//pkg/fields:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/doc.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/doc.go index ea928c21..c4753e08 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1] +// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1] // Package fake has the automatically generated clients. package fake diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_componentstatus.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_componentstatus.go index 9b2d7c86..0beddc66 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_componentstatus.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_componentstatus.go @@ -20,8 +20,8 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -51,13 +51,13 @@ func (c *FakeComponentStatuses) Update(componentStatus *v1.ComponentStatus) (res return obj.(*v1.ComponentStatus), err } -func (c *FakeComponentStatuses) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeComponentStatuses) Delete(name string, options *meta_v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewRootDeleteAction(componentstatusesResource, name), &v1.ComponentStatus{}) return err } -func (c *FakeComponentStatuses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *FakeComponentStatuses) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { action := core.NewRootDeleteCollectionAction(componentstatusesResource, listOptions) _, err := c.Fake.Invokes(action, &v1.ComponentStatusList{}) @@ -73,7 +73,7 @@ func (c *FakeComponentStatuses) Get(name string, options meta_v1.GetOptions) (re return obj.(*v1.ComponentStatus), err } -func (c *FakeComponentStatuses) List(opts v1.ListOptions) (result *v1.ComponentStatusList, err error) { +func (c *FakeComponentStatuses) List(opts meta_v1.ListOptions) (result *v1.ComponentStatusList, err error) { obj, err := c.Fake. Invokes(core.NewRootListAction(componentstatusesResource, opts), &v1.ComponentStatusList{}) if obj == nil { @@ -94,13 +94,13 @@ func (c *FakeComponentStatuses) List(opts v1.ListOptions) (result *v1.ComponentS } // Watch returns a watch.Interface that watches the requested componentStatuses. -func (c *FakeComponentStatuses) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeComponentStatuses) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewRootWatchAction(componentstatusesResource, opts)) } // Patch applies the patch and returns the patched componentStatus. -func (c *FakeComponentStatuses) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ComponentStatus, err error) { +func (c *FakeComponentStatuses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ComponentStatus, err error) { obj, err := c.Fake. Invokes(core.NewRootPatchSubresourceAction(componentstatusesResource, name, data, subresources...), &v1.ComponentStatus{}) if obj == nil { diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_configmap.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_configmap.go index 450d4303..a320a452 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_configmap.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_configmap.go @@ -20,8 +20,8 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -54,14 +54,14 @@ func (c *FakeConfigMaps) Update(configMap *v1.ConfigMap) (result *v1.ConfigMap, return obj.(*v1.ConfigMap), err } -func (c *FakeConfigMaps) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeConfigMaps) Delete(name string, options *meta_v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewDeleteAction(configmapsResource, c.ns, name), &v1.ConfigMap{}) return err } -func (c *FakeConfigMaps) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *FakeConfigMaps) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { action := core.NewDeleteCollectionAction(configmapsResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &v1.ConfigMapList{}) @@ -78,7 +78,7 @@ func (c *FakeConfigMaps) Get(name string, options meta_v1.GetOptions) (result *v return obj.(*v1.ConfigMap), err } -func (c *FakeConfigMaps) List(opts v1.ListOptions) (result *v1.ConfigMapList, err error) { +func (c *FakeConfigMaps) List(opts meta_v1.ListOptions) (result *v1.ConfigMapList, err error) { obj, err := c.Fake. Invokes(core.NewListAction(configmapsResource, c.ns, opts), &v1.ConfigMapList{}) @@ -100,14 +100,14 @@ func (c *FakeConfigMaps) List(opts v1.ListOptions) (result *v1.ConfigMapList, er } // Watch returns a watch.Interface that watches the requested configMaps. -func (c *FakeConfigMaps) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeConfigMaps) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewWatchAction(configmapsResource, c.ns, opts)) } // Patch applies the patch and returns the patched configMap. -func (c *FakeConfigMaps) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ConfigMap, err error) { +func (c *FakeConfigMaps) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ConfigMap, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(configmapsResource, c.ns, name, data, subresources...), &v1.ConfigMap{}) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_core_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_core_client.go index fcf04dfe..98fd03a0 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_core_client.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_core_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" v1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -92,7 +92,7 @@ func (c *FakeCoreV1) ServiceAccounts(namespace string) v1.ServiceAccountInterfac // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeCoreV1) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeCoreV1) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_endpoints.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_endpoints.go index 06a26f1e..2ea0083a 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_endpoints.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_endpoints.go @@ -20,8 +20,8 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -54,14 +54,14 @@ func (c *FakeEndpoints) Update(endpoints *v1.Endpoints) (result *v1.Endpoints, e return obj.(*v1.Endpoints), err } -func (c *FakeEndpoints) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeEndpoints) Delete(name string, options *meta_v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewDeleteAction(endpointsResource, c.ns, name), &v1.Endpoints{}) return err } -func (c *FakeEndpoints) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *FakeEndpoints) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { action := core.NewDeleteCollectionAction(endpointsResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &v1.EndpointsList{}) @@ -78,7 +78,7 @@ func (c *FakeEndpoints) Get(name string, options meta_v1.GetOptions) (result *v1 return obj.(*v1.Endpoints), err } -func (c *FakeEndpoints) List(opts v1.ListOptions) (result *v1.EndpointsList, err error) { +func (c *FakeEndpoints) List(opts meta_v1.ListOptions) (result *v1.EndpointsList, err error) { obj, err := c.Fake. Invokes(core.NewListAction(endpointsResource, c.ns, opts), &v1.EndpointsList{}) @@ -100,14 +100,14 @@ func (c *FakeEndpoints) List(opts v1.ListOptions) (result *v1.EndpointsList, err } // Watch returns a watch.Interface that watches the requested endpoints. -func (c *FakeEndpoints) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeEndpoints) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewWatchAction(endpointsResource, c.ns, opts)) } // Patch applies the patch and returns the patched endpoints. -func (c *FakeEndpoints) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Endpoints, err error) { +func (c *FakeEndpoints) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Endpoints, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(endpointsResource, c.ns, name, data, subresources...), &v1.Endpoints{}) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_event.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_event.go index dafa4623..611300ee 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_event.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_event.go @@ -20,8 +20,8 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -54,14 +54,14 @@ func (c *FakeEvents) Update(event *v1.Event) (result *v1.Event, err error) { return obj.(*v1.Event), err } -func (c *FakeEvents) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeEvents) Delete(name string, options *meta_v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewDeleteAction(eventsResource, c.ns, name), &v1.Event{}) return err } -func (c *FakeEvents) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *FakeEvents) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { action := core.NewDeleteCollectionAction(eventsResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &v1.EventList{}) @@ -78,7 +78,7 @@ func (c *FakeEvents) Get(name string, options meta_v1.GetOptions) (result *v1.Ev return obj.(*v1.Event), err } -func (c *FakeEvents) List(opts v1.ListOptions) (result *v1.EventList, err error) { +func (c *FakeEvents) List(opts meta_v1.ListOptions) (result *v1.EventList, err error) { obj, err := c.Fake. Invokes(core.NewListAction(eventsResource, c.ns, opts), &v1.EventList{}) @@ -100,14 +100,14 @@ func (c *FakeEvents) List(opts v1.ListOptions) (result *v1.EventList, err error) } // Watch returns a watch.Interface that watches the requested events. -func (c *FakeEvents) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeEvents) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewWatchAction(eventsResource, c.ns, opts)) } // Patch applies the patch and returns the patched event. -func (c *FakeEvents) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Event, err error) { +func (c *FakeEvents) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Event, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(eventsResource, c.ns, name, data, subresources...), &v1.Event{}) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_event_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_event_expansion.go index ee3eeb6a..56c745fd 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_event_expansion.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_event_expansion.go @@ -17,11 +17,11 @@ limitations under the License. package fake import ( + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/testing/core" - "k8s.io/kubernetes/pkg/fields" ) func (c *FakeEvents) CreateWithEventNamespace(event *v1.Event) (*v1.Event, error) { diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_limitrange.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_limitrange.go index 935db2e3..c4b05071 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_limitrange.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_limitrange.go @@ -20,8 +20,8 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -54,14 +54,14 @@ func (c *FakeLimitRanges) Update(limitRange *v1.LimitRange) (result *v1.LimitRan return obj.(*v1.LimitRange), err } -func (c *FakeLimitRanges) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeLimitRanges) Delete(name string, options *meta_v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewDeleteAction(limitrangesResource, c.ns, name), &v1.LimitRange{}) return err } -func (c *FakeLimitRanges) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *FakeLimitRanges) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { action := core.NewDeleteCollectionAction(limitrangesResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &v1.LimitRangeList{}) @@ -78,7 +78,7 @@ func (c *FakeLimitRanges) Get(name string, options meta_v1.GetOptions) (result * return obj.(*v1.LimitRange), err } -func (c *FakeLimitRanges) List(opts v1.ListOptions) (result *v1.LimitRangeList, err error) { +func (c *FakeLimitRanges) List(opts meta_v1.ListOptions) (result *v1.LimitRangeList, err error) { obj, err := c.Fake. Invokes(core.NewListAction(limitrangesResource, c.ns, opts), &v1.LimitRangeList{}) @@ -100,14 +100,14 @@ func (c *FakeLimitRanges) List(opts v1.ListOptions) (result *v1.LimitRangeList, } // Watch returns a watch.Interface that watches the requested limitRanges. -func (c *FakeLimitRanges) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeLimitRanges) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewWatchAction(limitrangesResource, c.ns, opts)) } // Patch applies the patch and returns the patched limitRange. -func (c *FakeLimitRanges) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.LimitRange, err error) { +func (c *FakeLimitRanges) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.LimitRange, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(limitrangesResource, c.ns, name, data, subresources...), &v1.LimitRange{}) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_namespace.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_namespace.go index d52b73cf..90c6bbd6 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_namespace.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_namespace.go @@ -20,8 +20,8 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -60,13 +60,13 @@ func (c *FakeNamespaces) UpdateStatus(namespace *v1.Namespace) (*v1.Namespace, e return obj.(*v1.Namespace), err } -func (c *FakeNamespaces) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeNamespaces) Delete(name string, options *meta_v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewRootDeleteAction(namespacesResource, name), &v1.Namespace{}) return err } -func (c *FakeNamespaces) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *FakeNamespaces) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { action := core.NewRootDeleteCollectionAction(namespacesResource, listOptions) _, err := c.Fake.Invokes(action, &v1.NamespaceList{}) @@ -82,7 +82,7 @@ func (c *FakeNamespaces) Get(name string, options meta_v1.GetOptions) (result *v return obj.(*v1.Namespace), err } -func (c *FakeNamespaces) List(opts v1.ListOptions) (result *v1.NamespaceList, err error) { +func (c *FakeNamespaces) List(opts meta_v1.ListOptions) (result *v1.NamespaceList, err error) { obj, err := c.Fake. Invokes(core.NewRootListAction(namespacesResource, opts), &v1.NamespaceList{}) if obj == nil { @@ -103,13 +103,13 @@ func (c *FakeNamespaces) List(opts v1.ListOptions) (result *v1.NamespaceList, er } // Watch returns a watch.Interface that watches the requested namespaces. -func (c *FakeNamespaces) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeNamespaces) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewRootWatchAction(namespacesResource, opts)) } // Patch applies the patch and returns the patched namespace. -func (c *FakeNamespaces) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Namespace, err error) { +func (c *FakeNamespaces) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Namespace, err error) { obj, err := c.Fake. Invokes(core.NewRootPatchSubresourceAction(namespacesResource, name, data, subresources...), &v1.Namespace{}) if obj == nil { diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_node.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_node.go index 03363a5d..cfccbb60 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_node.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_node.go @@ -20,8 +20,8 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -60,13 +60,13 @@ func (c *FakeNodes) UpdateStatus(node *v1.Node) (*v1.Node, error) { return obj.(*v1.Node), err } -func (c *FakeNodes) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeNodes) Delete(name string, options *meta_v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewRootDeleteAction(nodesResource, name), &v1.Node{}) return err } -func (c *FakeNodes) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *FakeNodes) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { action := core.NewRootDeleteCollectionAction(nodesResource, listOptions) _, err := c.Fake.Invokes(action, &v1.NodeList{}) @@ -82,7 +82,7 @@ func (c *FakeNodes) Get(name string, options meta_v1.GetOptions) (result *v1.Nod return obj.(*v1.Node), err } -func (c *FakeNodes) List(opts v1.ListOptions) (result *v1.NodeList, err error) { +func (c *FakeNodes) List(opts meta_v1.ListOptions) (result *v1.NodeList, err error) { obj, err := c.Fake. Invokes(core.NewRootListAction(nodesResource, opts), &v1.NodeList{}) if obj == nil { @@ -103,13 +103,13 @@ func (c *FakeNodes) List(opts v1.ListOptions) (result *v1.NodeList, err error) { } // Watch returns a watch.Interface that watches the requested nodes. -func (c *FakeNodes) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeNodes) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewRootWatchAction(nodesResource, opts)) } // Patch applies the patch and returns the patched node. -func (c *FakeNodes) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Node, err error) { +func (c *FakeNodes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Node, err error) { obj, err := c.Fake. Invokes(core.NewRootPatchSubresourceAction(nodesResource, name, data, subresources...), &v1.Node{}) if obj == nil { diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_persistentvolume.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_persistentvolume.go index 9f600d01..3d9d8304 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_persistentvolume.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_persistentvolume.go @@ -20,8 +20,8 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -60,13 +60,13 @@ func (c *FakePersistentVolumes) UpdateStatus(persistentVolume *v1.PersistentVolu return obj.(*v1.PersistentVolume), err } -func (c *FakePersistentVolumes) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakePersistentVolumes) Delete(name string, options *meta_v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewRootDeleteAction(persistentvolumesResource, name), &v1.PersistentVolume{}) return err } -func (c *FakePersistentVolumes) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *FakePersistentVolumes) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { action := core.NewRootDeleteCollectionAction(persistentvolumesResource, listOptions) _, err := c.Fake.Invokes(action, &v1.PersistentVolumeList{}) @@ -82,7 +82,7 @@ func (c *FakePersistentVolumes) Get(name string, options meta_v1.GetOptions) (re return obj.(*v1.PersistentVolume), err } -func (c *FakePersistentVolumes) List(opts v1.ListOptions) (result *v1.PersistentVolumeList, err error) { +func (c *FakePersistentVolumes) List(opts meta_v1.ListOptions) (result *v1.PersistentVolumeList, err error) { obj, err := c.Fake. Invokes(core.NewRootListAction(persistentvolumesResource, opts), &v1.PersistentVolumeList{}) if obj == nil { @@ -103,13 +103,13 @@ func (c *FakePersistentVolumes) List(opts v1.ListOptions) (result *v1.Persistent } // Watch returns a watch.Interface that watches the requested persistentVolumes. -func (c *FakePersistentVolumes) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakePersistentVolumes) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewRootWatchAction(persistentvolumesResource, opts)) } // Patch applies the patch and returns the patched persistentVolume. -func (c *FakePersistentVolumes) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolume, err error) { +func (c *FakePersistentVolumes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolume, err error) { obj, err := c.Fake. Invokes(core.NewRootPatchSubresourceAction(persistentvolumesResource, name, data, subresources...), &v1.PersistentVolume{}) if obj == nil { diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_persistentvolumeclaim.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_persistentvolumeclaim.go index d072c8f3..06b6b149 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_persistentvolumeclaim.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_persistentvolumeclaim.go @@ -20,8 +20,8 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -64,14 +64,14 @@ func (c *FakePersistentVolumeClaims) UpdateStatus(persistentVolumeClaim *v1.Pers return obj.(*v1.PersistentVolumeClaim), err } -func (c *FakePersistentVolumeClaims) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakePersistentVolumeClaims) Delete(name string, options *meta_v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewDeleteAction(persistentvolumeclaimsResource, c.ns, name), &v1.PersistentVolumeClaim{}) return err } -func (c *FakePersistentVolumeClaims) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *FakePersistentVolumeClaims) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { action := core.NewDeleteCollectionAction(persistentvolumeclaimsResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &v1.PersistentVolumeClaimList{}) @@ -88,7 +88,7 @@ func (c *FakePersistentVolumeClaims) Get(name string, options meta_v1.GetOptions return obj.(*v1.PersistentVolumeClaim), err } -func (c *FakePersistentVolumeClaims) List(opts v1.ListOptions) (result *v1.PersistentVolumeClaimList, err error) { +func (c *FakePersistentVolumeClaims) List(opts meta_v1.ListOptions) (result *v1.PersistentVolumeClaimList, err error) { obj, err := c.Fake. Invokes(core.NewListAction(persistentvolumeclaimsResource, c.ns, opts), &v1.PersistentVolumeClaimList{}) @@ -110,14 +110,14 @@ func (c *FakePersistentVolumeClaims) List(opts v1.ListOptions) (result *v1.Persi } // Watch returns a watch.Interface that watches the requested persistentVolumeClaims. -func (c *FakePersistentVolumeClaims) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakePersistentVolumeClaims) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewWatchAction(persistentvolumeclaimsResource, c.ns, opts)) } // Patch applies the patch and returns the patched persistentVolumeClaim. -func (c *FakePersistentVolumeClaims) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolumeClaim, err error) { +func (c *FakePersistentVolumeClaims) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolumeClaim, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(persistentvolumeclaimsResource, c.ns, name, data, subresources...), &v1.PersistentVolumeClaim{}) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_pod.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_pod.go index 80cd4e7b..4d6ed312 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_pod.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_pod.go @@ -20,8 +20,8 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -64,14 +64,14 @@ func (c *FakePods) UpdateStatus(pod *v1.Pod) (*v1.Pod, error) { return obj.(*v1.Pod), err } -func (c *FakePods) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakePods) Delete(name string, options *meta_v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewDeleteAction(podsResource, c.ns, name), &v1.Pod{}) return err } -func (c *FakePods) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *FakePods) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { action := core.NewDeleteCollectionAction(podsResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &v1.PodList{}) @@ -88,7 +88,7 @@ func (c *FakePods) Get(name string, options meta_v1.GetOptions) (result *v1.Pod, return obj.(*v1.Pod), err } -func (c *FakePods) List(opts v1.ListOptions) (result *v1.PodList, err error) { +func (c *FakePods) List(opts meta_v1.ListOptions) (result *v1.PodList, err error) { obj, err := c.Fake. Invokes(core.NewListAction(podsResource, c.ns, opts), &v1.PodList{}) @@ -110,14 +110,14 @@ func (c *FakePods) List(opts v1.ListOptions) (result *v1.PodList, err error) { } // Watch returns a watch.Interface that watches the requested pods. -func (c *FakePods) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakePods) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewWatchAction(podsResource, c.ns, opts)) } // Patch applies the patch and returns the patched pod. -func (c *FakePods) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Pod, err error) { +func (c *FakePods) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Pod, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(podsResource, c.ns, name, data, subresources...), &v1.Pod{}) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_pod_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_pod_expansion.go index 6180bb4e..e215baf2 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_pod_expansion.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_pod_expansion.go @@ -17,9 +17,9 @@ limitations under the License. package fake import ( + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api/v1" policy "k8s.io/kubernetes/pkg/apis/policy/v1beta1" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/testing/core" ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_podtemplate.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_podtemplate.go index b2bcce16..e68bbff3 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_podtemplate.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_podtemplate.go @@ -20,8 +20,8 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -54,14 +54,14 @@ func (c *FakePodTemplates) Update(podTemplate *v1.PodTemplate) (result *v1.PodTe return obj.(*v1.PodTemplate), err } -func (c *FakePodTemplates) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakePodTemplates) Delete(name string, options *meta_v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewDeleteAction(podtemplatesResource, c.ns, name), &v1.PodTemplate{}) return err } -func (c *FakePodTemplates) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *FakePodTemplates) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { action := core.NewDeleteCollectionAction(podtemplatesResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &v1.PodTemplateList{}) @@ -78,7 +78,7 @@ func (c *FakePodTemplates) Get(name string, options meta_v1.GetOptions) (result return obj.(*v1.PodTemplate), err } -func (c *FakePodTemplates) List(opts v1.ListOptions) (result *v1.PodTemplateList, err error) { +func (c *FakePodTemplates) List(opts meta_v1.ListOptions) (result *v1.PodTemplateList, err error) { obj, err := c.Fake. Invokes(core.NewListAction(podtemplatesResource, c.ns, opts), &v1.PodTemplateList{}) @@ -100,14 +100,14 @@ func (c *FakePodTemplates) List(opts v1.ListOptions) (result *v1.PodTemplateList } // Watch returns a watch.Interface that watches the requested podTemplates. -func (c *FakePodTemplates) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakePodTemplates) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewWatchAction(podtemplatesResource, c.ns, opts)) } // Patch applies the patch and returns the patched podTemplate. -func (c *FakePodTemplates) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.PodTemplate, err error) { +func (c *FakePodTemplates) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PodTemplate, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(podtemplatesResource, c.ns, name, data, subresources...), &v1.PodTemplate{}) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_replicationcontroller.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_replicationcontroller.go index 2ac73f2c..7bf7a8b7 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_replicationcontroller.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_replicationcontroller.go @@ -20,8 +20,8 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -64,14 +64,14 @@ func (c *FakeReplicationControllers) UpdateStatus(replicationController *v1.Repl return obj.(*v1.ReplicationController), err } -func (c *FakeReplicationControllers) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeReplicationControllers) Delete(name string, options *meta_v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewDeleteAction(replicationcontrollersResource, c.ns, name), &v1.ReplicationController{}) return err } -func (c *FakeReplicationControllers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *FakeReplicationControllers) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { action := core.NewDeleteCollectionAction(replicationcontrollersResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &v1.ReplicationControllerList{}) @@ -88,7 +88,7 @@ func (c *FakeReplicationControllers) Get(name string, options meta_v1.GetOptions return obj.(*v1.ReplicationController), err } -func (c *FakeReplicationControllers) List(opts v1.ListOptions) (result *v1.ReplicationControllerList, err error) { +func (c *FakeReplicationControllers) List(opts meta_v1.ListOptions) (result *v1.ReplicationControllerList, err error) { obj, err := c.Fake. Invokes(core.NewListAction(replicationcontrollersResource, c.ns, opts), &v1.ReplicationControllerList{}) @@ -110,14 +110,14 @@ func (c *FakeReplicationControllers) List(opts v1.ListOptions) (result *v1.Repli } // Watch returns a watch.Interface that watches the requested replicationControllers. -func (c *FakeReplicationControllers) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeReplicationControllers) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewWatchAction(replicationcontrollersResource, c.ns, opts)) } // Patch applies the patch and returns the patched replicationController. -func (c *FakeReplicationControllers) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ReplicationController, err error) { +func (c *FakeReplicationControllers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ReplicationController, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(replicationcontrollersResource, c.ns, name, data, subresources...), &v1.ReplicationController{}) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_resourcequota.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_resourcequota.go index e488bed4..69439cb6 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_resourcequota.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_resourcequota.go @@ -20,8 +20,8 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -64,14 +64,14 @@ func (c *FakeResourceQuotas) UpdateStatus(resourceQuota *v1.ResourceQuota) (*v1. return obj.(*v1.ResourceQuota), err } -func (c *FakeResourceQuotas) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeResourceQuotas) Delete(name string, options *meta_v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewDeleteAction(resourcequotasResource, c.ns, name), &v1.ResourceQuota{}) return err } -func (c *FakeResourceQuotas) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *FakeResourceQuotas) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { action := core.NewDeleteCollectionAction(resourcequotasResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &v1.ResourceQuotaList{}) @@ -88,7 +88,7 @@ func (c *FakeResourceQuotas) Get(name string, options meta_v1.GetOptions) (resul return obj.(*v1.ResourceQuota), err } -func (c *FakeResourceQuotas) List(opts v1.ListOptions) (result *v1.ResourceQuotaList, err error) { +func (c *FakeResourceQuotas) List(opts meta_v1.ListOptions) (result *v1.ResourceQuotaList, err error) { obj, err := c.Fake. Invokes(core.NewListAction(resourcequotasResource, c.ns, opts), &v1.ResourceQuotaList{}) @@ -110,14 +110,14 @@ func (c *FakeResourceQuotas) List(opts v1.ListOptions) (result *v1.ResourceQuota } // Watch returns a watch.Interface that watches the requested resourceQuotas. -func (c *FakeResourceQuotas) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeResourceQuotas) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewWatchAction(resourcequotasResource, c.ns, opts)) } // Patch applies the patch and returns the patched resourceQuota. -func (c *FakeResourceQuotas) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ResourceQuota, err error) { +func (c *FakeResourceQuotas) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ResourceQuota, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(resourcequotasResource, c.ns, name, data, subresources...), &v1.ResourceQuota{}) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_secret.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_secret.go index 969cb75e..9ed22038 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_secret.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_secret.go @@ -20,8 +20,8 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -54,14 +54,14 @@ func (c *FakeSecrets) Update(secret *v1.Secret) (result *v1.Secret, err error) { return obj.(*v1.Secret), err } -func (c *FakeSecrets) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeSecrets) Delete(name string, options *meta_v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewDeleteAction(secretsResource, c.ns, name), &v1.Secret{}) return err } -func (c *FakeSecrets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *FakeSecrets) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { action := core.NewDeleteCollectionAction(secretsResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &v1.SecretList{}) @@ -78,7 +78,7 @@ func (c *FakeSecrets) Get(name string, options meta_v1.GetOptions) (result *v1.S return obj.(*v1.Secret), err } -func (c *FakeSecrets) List(opts v1.ListOptions) (result *v1.SecretList, err error) { +func (c *FakeSecrets) List(opts meta_v1.ListOptions) (result *v1.SecretList, err error) { obj, err := c.Fake. Invokes(core.NewListAction(secretsResource, c.ns, opts), &v1.SecretList{}) @@ -100,14 +100,14 @@ func (c *FakeSecrets) List(opts v1.ListOptions) (result *v1.SecretList, err erro } // Watch returns a watch.Interface that watches the requested secrets. -func (c *FakeSecrets) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeSecrets) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewWatchAction(secretsResource, c.ns, opts)) } // Patch applies the patch and returns the patched secret. -func (c *FakeSecrets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Secret, err error) { +func (c *FakeSecrets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Secret, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(secretsResource, c.ns, name, data, subresources...), &v1.Secret{}) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_service.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_service.go index 422748c5..ba891a36 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_service.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_service.go @@ -20,8 +20,8 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -64,14 +64,14 @@ func (c *FakeServices) UpdateStatus(service *v1.Service) (*v1.Service, error) { return obj.(*v1.Service), err } -func (c *FakeServices) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeServices) Delete(name string, options *meta_v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewDeleteAction(servicesResource, c.ns, name), &v1.Service{}) return err } -func (c *FakeServices) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *FakeServices) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { action := core.NewDeleteCollectionAction(servicesResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &v1.ServiceList{}) @@ -88,7 +88,7 @@ func (c *FakeServices) Get(name string, options meta_v1.GetOptions) (result *v1. return obj.(*v1.Service), err } -func (c *FakeServices) List(opts v1.ListOptions) (result *v1.ServiceList, err error) { +func (c *FakeServices) List(opts meta_v1.ListOptions) (result *v1.ServiceList, err error) { obj, err := c.Fake. Invokes(core.NewListAction(servicesResource, c.ns, opts), &v1.ServiceList{}) @@ -110,14 +110,14 @@ func (c *FakeServices) List(opts v1.ListOptions) (result *v1.ServiceList, err er } // Watch returns a watch.Interface that watches the requested services. -func (c *FakeServices) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeServices) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewWatchAction(servicesResource, c.ns, opts)) } // Patch applies the patch and returns the patched service. -func (c *FakeServices) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Service, err error) { +func (c *FakeServices) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Service, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(servicesResource, c.ns, name, data, subresources...), &v1.Service{}) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_service_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_service_expansion.go index 978585f6..51d6fa8d 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_service_expansion.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_service_expansion.go @@ -17,7 +17,7 @@ limitations under the License. package fake import ( - "k8s.io/kubernetes/pkg/client/restclient" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/client/testing/core" ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_serviceaccount.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_serviceaccount.go index 2b8815d3..130a9df9 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_serviceaccount.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake/fake_serviceaccount.go @@ -20,8 +20,8 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -54,14 +54,14 @@ func (c *FakeServiceAccounts) Update(serviceAccount *v1.ServiceAccount) (result return obj.(*v1.ServiceAccount), err } -func (c *FakeServiceAccounts) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeServiceAccounts) Delete(name string, options *meta_v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewDeleteAction(serviceaccountsResource, c.ns, name), &v1.ServiceAccount{}) return err } -func (c *FakeServiceAccounts) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *FakeServiceAccounts) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { action := core.NewDeleteCollectionAction(serviceaccountsResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &v1.ServiceAccountList{}) @@ -78,7 +78,7 @@ func (c *FakeServiceAccounts) Get(name string, options meta_v1.GetOptions) (resu return obj.(*v1.ServiceAccount), err } -func (c *FakeServiceAccounts) List(opts v1.ListOptions) (result *v1.ServiceAccountList, err error) { +func (c *FakeServiceAccounts) List(opts meta_v1.ListOptions) (result *v1.ServiceAccountList, err error) { obj, err := c.Fake. Invokes(core.NewListAction(serviceaccountsResource, c.ns, opts), &v1.ServiceAccountList{}) @@ -100,14 +100,14 @@ func (c *FakeServiceAccounts) List(opts v1.ListOptions) (result *v1.ServiceAccou } // Watch returns a watch.Interface that watches the requested serviceAccounts. -func (c *FakeServiceAccounts) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeServiceAccounts) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewWatchAction(serviceaccountsResource, c.ns, opts)) } // Patch applies the patch and returns the patched serviceAccount. -func (c *FakeServiceAccounts) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ServiceAccount, err error) { +func (c *FakeServiceAccounts) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ServiceAccount, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(serviceaccountsResource, c.ns, name, data, subresources...), &v1.ServiceAccount{}) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/limitrange.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/limitrange.go index e4acfd72..a8817f4d 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/limitrange.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/limitrange.go @@ -18,10 +18,11 @@ package v1 import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // LimitRangesGetter has a method to return a LimitRangeInterface. @@ -34,18 +35,18 @@ type LimitRangesGetter interface { type LimitRangeInterface interface { Create(*v1.LimitRange) (*v1.LimitRange, error) Update(*v1.LimitRange) (*v1.LimitRange, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Delete(name string, options *meta_v1.DeleteOptions) error + DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error Get(name string, options meta_v1.GetOptions) (*v1.LimitRange, error) - List(opts v1.ListOptions) (*v1.LimitRangeList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.LimitRange, err error) + List(opts meta_v1.ListOptions) (*v1.LimitRangeList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.LimitRange, err error) LimitRangeExpansion } // limitRanges implements LimitRangeInterface type limitRanges struct { - client restclient.Interface + client rest.Interface ns string } @@ -83,7 +84,7 @@ func (c *limitRanges) Update(limitRange *v1.LimitRange) (result *v1.LimitRange, } // Delete takes name of the limitRange and deletes it. Returns an error if one occurs. -func (c *limitRanges) Delete(name string, options *v1.DeleteOptions) error { +func (c *limitRanges) Delete(name string, options *meta_v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("limitranges"). @@ -94,7 +95,7 @@ func (c *limitRanges) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *limitRanges) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *limitRanges) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("limitranges"). @@ -118,7 +119,7 @@ func (c *limitRanges) Get(name string, options meta_v1.GetOptions) (result *v1.L } // List takes label and field selectors, and returns the list of LimitRanges that match those selectors. -func (c *limitRanges) List(opts v1.ListOptions) (result *v1.LimitRangeList, err error) { +func (c *limitRanges) List(opts meta_v1.ListOptions) (result *v1.LimitRangeList, err error) { result = &v1.LimitRangeList{} err = c.client.Get(). Namespace(c.ns). @@ -130,7 +131,7 @@ func (c *limitRanges) List(opts v1.ListOptions) (result *v1.LimitRangeList, err } // Watch returns a watch.Interface that watches the requested limitRanges. -func (c *limitRanges) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *limitRanges) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -140,7 +141,7 @@ func (c *limitRanges) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched limitRange. -func (c *limitRanges) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.LimitRange, err error) { +func (c *limitRanges) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.LimitRange, err error) { result = &v1.LimitRange{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/namespace.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/namespace.go index 857c958c..ce3a7a34 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/namespace.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/namespace.go @@ -18,10 +18,11 @@ package v1 import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // NamespacesGetter has a method to return a NamespaceInterface. @@ -35,18 +36,18 @@ type NamespaceInterface interface { Create(*v1.Namespace) (*v1.Namespace, error) Update(*v1.Namespace) (*v1.Namespace, error) UpdateStatus(*v1.Namespace) (*v1.Namespace, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Delete(name string, options *meta_v1.DeleteOptions) error + DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error Get(name string, options meta_v1.GetOptions) (*v1.Namespace, error) - List(opts v1.ListOptions) (*v1.NamespaceList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Namespace, err error) + List(opts meta_v1.ListOptions) (*v1.NamespaceList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Namespace, err error) NamespaceExpansion } // namespaces implements NamespaceInterface type namespaces struct { - client restclient.Interface + client rest.Interface } // newNamespaces returns a Namespaces @@ -95,7 +96,7 @@ func (c *namespaces) UpdateStatus(namespace *v1.Namespace) (result *v1.Namespace } // Delete takes name of the namespace and deletes it. Returns an error if one occurs. -func (c *namespaces) Delete(name string, options *v1.DeleteOptions) error { +func (c *namespaces) Delete(name string, options *meta_v1.DeleteOptions) error { return c.client.Delete(). Resource("namespaces"). Name(name). @@ -105,7 +106,7 @@ func (c *namespaces) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *namespaces) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *namespaces) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Resource("namespaces"). VersionedParams(&listOptions, api.ParameterCodec). @@ -127,7 +128,7 @@ func (c *namespaces) Get(name string, options meta_v1.GetOptions) (result *v1.Na } // List takes label and field selectors, and returns the list of Namespaces that match those selectors. -func (c *namespaces) List(opts v1.ListOptions) (result *v1.NamespaceList, err error) { +func (c *namespaces) List(opts meta_v1.ListOptions) (result *v1.NamespaceList, err error) { result = &v1.NamespaceList{} err = c.client.Get(). Resource("namespaces"). @@ -138,7 +139,7 @@ func (c *namespaces) List(opts v1.ListOptions) (result *v1.NamespaceList, err er } // Watch returns a watch.Interface that watches the requested namespaces. -func (c *namespaces) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *namespaces) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Resource("namespaces"). @@ -147,7 +148,7 @@ func (c *namespaces) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched namespace. -func (c *namespaces) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Namespace, err error) { +func (c *namespaces) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Namespace, err error) { result = &v1.Namespace{} err = c.client.Patch(pt). Resource("namespaces"). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/node.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/node.go index 7f5ed6e8..4c38b09c 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/node.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/node.go @@ -18,10 +18,11 @@ package v1 import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // NodesGetter has a method to return a NodeInterface. @@ -35,18 +36,18 @@ type NodeInterface interface { Create(*v1.Node) (*v1.Node, error) Update(*v1.Node) (*v1.Node, error) UpdateStatus(*v1.Node) (*v1.Node, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Delete(name string, options *meta_v1.DeleteOptions) error + DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error Get(name string, options meta_v1.GetOptions) (*v1.Node, error) - List(opts v1.ListOptions) (*v1.NodeList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Node, err error) + List(opts meta_v1.ListOptions) (*v1.NodeList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Node, err error) NodeExpansion } // nodes implements NodeInterface type nodes struct { - client restclient.Interface + client rest.Interface } // newNodes returns a Nodes @@ -95,7 +96,7 @@ func (c *nodes) UpdateStatus(node *v1.Node) (result *v1.Node, err error) { } // Delete takes name of the node and deletes it. Returns an error if one occurs. -func (c *nodes) Delete(name string, options *v1.DeleteOptions) error { +func (c *nodes) Delete(name string, options *meta_v1.DeleteOptions) error { return c.client.Delete(). Resource("nodes"). Name(name). @@ -105,7 +106,7 @@ func (c *nodes) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *nodes) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *nodes) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Resource("nodes"). VersionedParams(&listOptions, api.ParameterCodec). @@ -127,7 +128,7 @@ func (c *nodes) Get(name string, options meta_v1.GetOptions) (result *v1.Node, e } // List takes label and field selectors, and returns the list of Nodes that match those selectors. -func (c *nodes) List(opts v1.ListOptions) (result *v1.NodeList, err error) { +func (c *nodes) List(opts meta_v1.ListOptions) (result *v1.NodeList, err error) { result = &v1.NodeList{} err = c.client.Get(). Resource("nodes"). @@ -138,7 +139,7 @@ func (c *nodes) List(opts v1.ListOptions) (result *v1.NodeList, err error) { } // Watch returns a watch.Interface that watches the requested nodes. -func (c *nodes) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *nodes) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Resource("nodes"). @@ -147,7 +148,7 @@ func (c *nodes) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched node. -func (c *nodes) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Node, err error) { +func (c *nodes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Node, err error) { result = &v1.Node{} err = c.client.Patch(pt). Resource("nodes"). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/node_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/node_expansion.go index b7689538..cd61419c 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/node_expansion.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/node_expansion.go @@ -17,7 +17,7 @@ limitations under the License. package v1 import ( - "k8s.io/kubernetes/pkg/api" + "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api/v1" ) @@ -32,7 +32,7 @@ type NodeExpansion interface { // the node that the server returns, or an error. func (c *nodes) PatchStatus(nodeName string, data []byte) (*v1.Node, error) { result := &v1.Node{} - err := c.client.Patch(api.StrategicMergePatchType). + err := c.client.Patch(types.StrategicMergePatchType). Resource("nodes"). Name(nodeName). SubResource("status"). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/persistentvolume.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/persistentvolume.go index 06f3de50..1d46d254 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/persistentvolume.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/persistentvolume.go @@ -18,10 +18,11 @@ package v1 import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // PersistentVolumesGetter has a method to return a PersistentVolumeInterface. @@ -35,18 +36,18 @@ type PersistentVolumeInterface interface { Create(*v1.PersistentVolume) (*v1.PersistentVolume, error) Update(*v1.PersistentVolume) (*v1.PersistentVolume, error) UpdateStatus(*v1.PersistentVolume) (*v1.PersistentVolume, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Delete(name string, options *meta_v1.DeleteOptions) error + DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error Get(name string, options meta_v1.GetOptions) (*v1.PersistentVolume, error) - List(opts v1.ListOptions) (*v1.PersistentVolumeList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolume, err error) + List(opts meta_v1.ListOptions) (*v1.PersistentVolumeList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolume, err error) PersistentVolumeExpansion } // persistentVolumes implements PersistentVolumeInterface type persistentVolumes struct { - client restclient.Interface + client rest.Interface } // newPersistentVolumes returns a PersistentVolumes @@ -95,7 +96,7 @@ func (c *persistentVolumes) UpdateStatus(persistentVolume *v1.PersistentVolume) } // Delete takes name of the persistentVolume and deletes it. Returns an error if one occurs. -func (c *persistentVolumes) Delete(name string, options *v1.DeleteOptions) error { +func (c *persistentVolumes) Delete(name string, options *meta_v1.DeleteOptions) error { return c.client.Delete(). Resource("persistentvolumes"). Name(name). @@ -105,7 +106,7 @@ func (c *persistentVolumes) Delete(name string, options *v1.DeleteOptions) error } // DeleteCollection deletes a collection of objects. -func (c *persistentVolumes) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *persistentVolumes) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Resource("persistentvolumes"). VersionedParams(&listOptions, api.ParameterCodec). @@ -127,7 +128,7 @@ func (c *persistentVolumes) Get(name string, options meta_v1.GetOptions) (result } // List takes label and field selectors, and returns the list of PersistentVolumes that match those selectors. -func (c *persistentVolumes) List(opts v1.ListOptions) (result *v1.PersistentVolumeList, err error) { +func (c *persistentVolumes) List(opts meta_v1.ListOptions) (result *v1.PersistentVolumeList, err error) { result = &v1.PersistentVolumeList{} err = c.client.Get(). Resource("persistentvolumes"). @@ -138,7 +139,7 @@ func (c *persistentVolumes) List(opts v1.ListOptions) (result *v1.PersistentVolu } // Watch returns a watch.Interface that watches the requested persistentVolumes. -func (c *persistentVolumes) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *persistentVolumes) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Resource("persistentvolumes"). @@ -147,7 +148,7 @@ func (c *persistentVolumes) Watch(opts v1.ListOptions) (watch.Interface, error) } // Patch applies the patch and returns the patched persistentVolume. -func (c *persistentVolumes) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolume, err error) { +func (c *persistentVolumes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolume, err error) { result = &v1.PersistentVolume{} err = c.client.Patch(pt). Resource("persistentvolumes"). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/persistentvolumeclaim.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/persistentvolumeclaim.go index a482723f..87f480b8 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/persistentvolumeclaim.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/persistentvolumeclaim.go @@ -18,10 +18,11 @@ package v1 import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // PersistentVolumeClaimsGetter has a method to return a PersistentVolumeClaimInterface. @@ -35,18 +36,18 @@ type PersistentVolumeClaimInterface interface { Create(*v1.PersistentVolumeClaim) (*v1.PersistentVolumeClaim, error) Update(*v1.PersistentVolumeClaim) (*v1.PersistentVolumeClaim, error) UpdateStatus(*v1.PersistentVolumeClaim) (*v1.PersistentVolumeClaim, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Delete(name string, options *meta_v1.DeleteOptions) error + DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error Get(name string, options meta_v1.GetOptions) (*v1.PersistentVolumeClaim, error) - List(opts v1.ListOptions) (*v1.PersistentVolumeClaimList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolumeClaim, err error) + List(opts meta_v1.ListOptions) (*v1.PersistentVolumeClaimList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolumeClaim, err error) PersistentVolumeClaimExpansion } // persistentVolumeClaims implements PersistentVolumeClaimInterface type persistentVolumeClaims struct { - client restclient.Interface + client rest.Interface ns string } @@ -100,7 +101,7 @@ func (c *persistentVolumeClaims) UpdateStatus(persistentVolumeClaim *v1.Persiste } // Delete takes name of the persistentVolumeClaim and deletes it. Returns an error if one occurs. -func (c *persistentVolumeClaims) Delete(name string, options *v1.DeleteOptions) error { +func (c *persistentVolumeClaims) Delete(name string, options *meta_v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("persistentvolumeclaims"). @@ -111,7 +112,7 @@ func (c *persistentVolumeClaims) Delete(name string, options *v1.DeleteOptions) } // DeleteCollection deletes a collection of objects. -func (c *persistentVolumeClaims) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *persistentVolumeClaims) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("persistentvolumeclaims"). @@ -135,7 +136,7 @@ func (c *persistentVolumeClaims) Get(name string, options meta_v1.GetOptions) (r } // List takes label and field selectors, and returns the list of PersistentVolumeClaims that match those selectors. -func (c *persistentVolumeClaims) List(opts v1.ListOptions) (result *v1.PersistentVolumeClaimList, err error) { +func (c *persistentVolumeClaims) List(opts meta_v1.ListOptions) (result *v1.PersistentVolumeClaimList, err error) { result = &v1.PersistentVolumeClaimList{} err = c.client.Get(). Namespace(c.ns). @@ -147,7 +148,7 @@ func (c *persistentVolumeClaims) List(opts v1.ListOptions) (result *v1.Persisten } // Watch returns a watch.Interface that watches the requested persistentVolumeClaims. -func (c *persistentVolumeClaims) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *persistentVolumeClaims) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -157,7 +158,7 @@ func (c *persistentVolumeClaims) Watch(opts v1.ListOptions) (watch.Interface, er } // Patch applies the patch and returns the patched persistentVolumeClaim. -func (c *persistentVolumeClaims) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolumeClaim, err error) { +func (c *persistentVolumeClaims) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolumeClaim, err error) { result = &v1.PersistentVolumeClaim{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/pod.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/pod.go index e279b8a9..1ab02c09 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/pod.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/pod.go @@ -18,10 +18,11 @@ package v1 import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // PodsGetter has a method to return a PodInterface. @@ -35,18 +36,18 @@ type PodInterface interface { Create(*v1.Pod) (*v1.Pod, error) Update(*v1.Pod) (*v1.Pod, error) UpdateStatus(*v1.Pod) (*v1.Pod, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Delete(name string, options *meta_v1.DeleteOptions) error + DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error Get(name string, options meta_v1.GetOptions) (*v1.Pod, error) - List(opts v1.ListOptions) (*v1.PodList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Pod, err error) + List(opts meta_v1.ListOptions) (*v1.PodList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Pod, err error) PodExpansion } // pods implements PodInterface type pods struct { - client restclient.Interface + client rest.Interface ns string } @@ -100,7 +101,7 @@ func (c *pods) UpdateStatus(pod *v1.Pod) (result *v1.Pod, err error) { } // Delete takes name of the pod and deletes it. Returns an error if one occurs. -func (c *pods) Delete(name string, options *v1.DeleteOptions) error { +func (c *pods) Delete(name string, options *meta_v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("pods"). @@ -111,7 +112,7 @@ func (c *pods) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *pods) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *pods) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("pods"). @@ -135,7 +136,7 @@ func (c *pods) Get(name string, options meta_v1.GetOptions) (result *v1.Pod, err } // List takes label and field selectors, and returns the list of Pods that match those selectors. -func (c *pods) List(opts v1.ListOptions) (result *v1.PodList, err error) { +func (c *pods) List(opts meta_v1.ListOptions) (result *v1.PodList, err error) { result = &v1.PodList{} err = c.client.Get(). Namespace(c.ns). @@ -147,7 +148,7 @@ func (c *pods) List(opts v1.ListOptions) (result *v1.PodList, err error) { } // Watch returns a watch.Interface that watches the requested pods. -func (c *pods) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *pods) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -157,7 +158,7 @@ func (c *pods) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched pod. -func (c *pods) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Pod, err error) { +func (c *pods) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Pod, err error) { result = &v1.Pod{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/pod_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/pod_expansion.go index 14f8bf31..d91af537 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/pod_expansion.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/pod_expansion.go @@ -17,10 +17,10 @@ limitations under the License. package v1 import ( + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" policy "k8s.io/kubernetes/pkg/apis/policy/v1beta1" - "k8s.io/kubernetes/pkg/client/restclient" ) // The PodExpansion interface allows manually adding extra methods to the PodInterface. diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/podtemplate.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/podtemplate.go index fd835247..b934bc86 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/podtemplate.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/podtemplate.go @@ -18,10 +18,11 @@ package v1 import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // PodTemplatesGetter has a method to return a PodTemplateInterface. @@ -34,18 +35,18 @@ type PodTemplatesGetter interface { type PodTemplateInterface interface { Create(*v1.PodTemplate) (*v1.PodTemplate, error) Update(*v1.PodTemplate) (*v1.PodTemplate, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Delete(name string, options *meta_v1.DeleteOptions) error + DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error Get(name string, options meta_v1.GetOptions) (*v1.PodTemplate, error) - List(opts v1.ListOptions) (*v1.PodTemplateList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.PodTemplate, err error) + List(opts meta_v1.ListOptions) (*v1.PodTemplateList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PodTemplate, err error) PodTemplateExpansion } // podTemplates implements PodTemplateInterface type podTemplates struct { - client restclient.Interface + client rest.Interface ns string } @@ -83,7 +84,7 @@ func (c *podTemplates) Update(podTemplate *v1.PodTemplate) (result *v1.PodTempla } // Delete takes name of the podTemplate and deletes it. Returns an error if one occurs. -func (c *podTemplates) Delete(name string, options *v1.DeleteOptions) error { +func (c *podTemplates) Delete(name string, options *meta_v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("podtemplates"). @@ -94,7 +95,7 @@ func (c *podTemplates) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *podTemplates) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *podTemplates) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("podtemplates"). @@ -118,7 +119,7 @@ func (c *podTemplates) Get(name string, options meta_v1.GetOptions) (result *v1. } // List takes label and field selectors, and returns the list of PodTemplates that match those selectors. -func (c *podTemplates) List(opts v1.ListOptions) (result *v1.PodTemplateList, err error) { +func (c *podTemplates) List(opts meta_v1.ListOptions) (result *v1.PodTemplateList, err error) { result = &v1.PodTemplateList{} err = c.client.Get(). Namespace(c.ns). @@ -130,7 +131,7 @@ func (c *podTemplates) List(opts v1.ListOptions) (result *v1.PodTemplateList, er } // Watch returns a watch.Interface that watches the requested podTemplates. -func (c *podTemplates) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *podTemplates) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -140,7 +141,7 @@ func (c *podTemplates) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched podTemplate. -func (c *podTemplates) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.PodTemplate, err error) { +func (c *podTemplates) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PodTemplate, err error) { result = &v1.PodTemplate{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/replicationcontroller.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/replicationcontroller.go index 8c45dcac..5b055afa 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/replicationcontroller.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/replicationcontroller.go @@ -18,10 +18,11 @@ package v1 import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // ReplicationControllersGetter has a method to return a ReplicationControllerInterface. @@ -35,18 +36,18 @@ type ReplicationControllerInterface interface { Create(*v1.ReplicationController) (*v1.ReplicationController, error) Update(*v1.ReplicationController) (*v1.ReplicationController, error) UpdateStatus(*v1.ReplicationController) (*v1.ReplicationController, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Delete(name string, options *meta_v1.DeleteOptions) error + DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error Get(name string, options meta_v1.GetOptions) (*v1.ReplicationController, error) - List(opts v1.ListOptions) (*v1.ReplicationControllerList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ReplicationController, err error) + List(opts meta_v1.ListOptions) (*v1.ReplicationControllerList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ReplicationController, err error) ReplicationControllerExpansion } // replicationControllers implements ReplicationControllerInterface type replicationControllers struct { - client restclient.Interface + client rest.Interface ns string } @@ -100,7 +101,7 @@ func (c *replicationControllers) UpdateStatus(replicationController *v1.Replicat } // Delete takes name of the replicationController and deletes it. Returns an error if one occurs. -func (c *replicationControllers) Delete(name string, options *v1.DeleteOptions) error { +func (c *replicationControllers) Delete(name string, options *meta_v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("replicationcontrollers"). @@ -111,7 +112,7 @@ func (c *replicationControllers) Delete(name string, options *v1.DeleteOptions) } // DeleteCollection deletes a collection of objects. -func (c *replicationControllers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *replicationControllers) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("replicationcontrollers"). @@ -135,7 +136,7 @@ func (c *replicationControllers) Get(name string, options meta_v1.GetOptions) (r } // List takes label and field selectors, and returns the list of ReplicationControllers that match those selectors. -func (c *replicationControllers) List(opts v1.ListOptions) (result *v1.ReplicationControllerList, err error) { +func (c *replicationControllers) List(opts meta_v1.ListOptions) (result *v1.ReplicationControllerList, err error) { result = &v1.ReplicationControllerList{} err = c.client.Get(). Namespace(c.ns). @@ -147,7 +148,7 @@ func (c *replicationControllers) List(opts v1.ListOptions) (result *v1.Replicati } // Watch returns a watch.Interface that watches the requested replicationControllers. -func (c *replicationControllers) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *replicationControllers) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -157,7 +158,7 @@ func (c *replicationControllers) Watch(opts v1.ListOptions) (watch.Interface, er } // Patch applies the patch and returns the patched replicationController. -func (c *replicationControllers) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ReplicationController, err error) { +func (c *replicationControllers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ReplicationController, err error) { result = &v1.ReplicationController{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/resourcequota.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/resourcequota.go index 02b1012b..b45ab0fe 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/resourcequota.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/resourcequota.go @@ -18,10 +18,11 @@ package v1 import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // ResourceQuotasGetter has a method to return a ResourceQuotaInterface. @@ -35,18 +36,18 @@ type ResourceQuotaInterface interface { Create(*v1.ResourceQuota) (*v1.ResourceQuota, error) Update(*v1.ResourceQuota) (*v1.ResourceQuota, error) UpdateStatus(*v1.ResourceQuota) (*v1.ResourceQuota, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Delete(name string, options *meta_v1.DeleteOptions) error + DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error Get(name string, options meta_v1.GetOptions) (*v1.ResourceQuota, error) - List(opts v1.ListOptions) (*v1.ResourceQuotaList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ResourceQuota, err error) + List(opts meta_v1.ListOptions) (*v1.ResourceQuotaList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ResourceQuota, err error) ResourceQuotaExpansion } // resourceQuotas implements ResourceQuotaInterface type resourceQuotas struct { - client restclient.Interface + client rest.Interface ns string } @@ -100,7 +101,7 @@ func (c *resourceQuotas) UpdateStatus(resourceQuota *v1.ResourceQuota) (result * } // Delete takes name of the resourceQuota and deletes it. Returns an error if one occurs. -func (c *resourceQuotas) Delete(name string, options *v1.DeleteOptions) error { +func (c *resourceQuotas) Delete(name string, options *meta_v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("resourcequotas"). @@ -111,7 +112,7 @@ func (c *resourceQuotas) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *resourceQuotas) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *resourceQuotas) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("resourcequotas"). @@ -135,7 +136,7 @@ func (c *resourceQuotas) Get(name string, options meta_v1.GetOptions) (result *v } // List takes label and field selectors, and returns the list of ResourceQuotas that match those selectors. -func (c *resourceQuotas) List(opts v1.ListOptions) (result *v1.ResourceQuotaList, err error) { +func (c *resourceQuotas) List(opts meta_v1.ListOptions) (result *v1.ResourceQuotaList, err error) { result = &v1.ResourceQuotaList{} err = c.client.Get(). Namespace(c.ns). @@ -147,7 +148,7 @@ func (c *resourceQuotas) List(opts v1.ListOptions) (result *v1.ResourceQuotaList } // Watch returns a watch.Interface that watches the requested resourceQuotas. -func (c *resourceQuotas) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *resourceQuotas) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -157,7 +158,7 @@ func (c *resourceQuotas) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched resourceQuota. -func (c *resourceQuotas) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ResourceQuota, err error) { +func (c *resourceQuotas) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ResourceQuota, err error) { result = &v1.ResourceQuota{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/secret.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/secret.go index ff24378d..2d2bb0fa 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/secret.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/secret.go @@ -18,10 +18,11 @@ package v1 import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // SecretsGetter has a method to return a SecretInterface. @@ -34,18 +35,18 @@ type SecretsGetter interface { type SecretInterface interface { Create(*v1.Secret) (*v1.Secret, error) Update(*v1.Secret) (*v1.Secret, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Delete(name string, options *meta_v1.DeleteOptions) error + DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error Get(name string, options meta_v1.GetOptions) (*v1.Secret, error) - List(opts v1.ListOptions) (*v1.SecretList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Secret, err error) + List(opts meta_v1.ListOptions) (*v1.SecretList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Secret, err error) SecretExpansion } // secrets implements SecretInterface type secrets struct { - client restclient.Interface + client rest.Interface ns string } @@ -83,7 +84,7 @@ func (c *secrets) Update(secret *v1.Secret) (result *v1.Secret, err error) { } // Delete takes name of the secret and deletes it. Returns an error if one occurs. -func (c *secrets) Delete(name string, options *v1.DeleteOptions) error { +func (c *secrets) Delete(name string, options *meta_v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("secrets"). @@ -94,7 +95,7 @@ func (c *secrets) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *secrets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *secrets) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("secrets"). @@ -118,7 +119,7 @@ func (c *secrets) Get(name string, options meta_v1.GetOptions) (result *v1.Secre } // List takes label and field selectors, and returns the list of Secrets that match those selectors. -func (c *secrets) List(opts v1.ListOptions) (result *v1.SecretList, err error) { +func (c *secrets) List(opts meta_v1.ListOptions) (result *v1.SecretList, err error) { result = &v1.SecretList{} err = c.client.Get(). Namespace(c.ns). @@ -130,7 +131,7 @@ func (c *secrets) List(opts v1.ListOptions) (result *v1.SecretList, err error) { } // Watch returns a watch.Interface that watches the requested secrets. -func (c *secrets) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *secrets) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -140,7 +141,7 @@ func (c *secrets) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched secret. -func (c *secrets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Secret, err error) { +func (c *secrets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Secret, err error) { result = &v1.Secret{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/service.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/service.go index f1e8f733..489c0d48 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/service.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/service.go @@ -18,10 +18,11 @@ package v1 import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // ServicesGetter has a method to return a ServiceInterface. @@ -35,18 +36,18 @@ type ServiceInterface interface { Create(*v1.Service) (*v1.Service, error) Update(*v1.Service) (*v1.Service, error) UpdateStatus(*v1.Service) (*v1.Service, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Delete(name string, options *meta_v1.DeleteOptions) error + DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error Get(name string, options meta_v1.GetOptions) (*v1.Service, error) - List(opts v1.ListOptions) (*v1.ServiceList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Service, err error) + List(opts meta_v1.ListOptions) (*v1.ServiceList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Service, err error) ServiceExpansion } // services implements ServiceInterface type services struct { - client restclient.Interface + client rest.Interface ns string } @@ -100,7 +101,7 @@ func (c *services) UpdateStatus(service *v1.Service) (result *v1.Service, err er } // Delete takes name of the service and deletes it. Returns an error if one occurs. -func (c *services) Delete(name string, options *v1.DeleteOptions) error { +func (c *services) Delete(name string, options *meta_v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("services"). @@ -111,7 +112,7 @@ func (c *services) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *services) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *services) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("services"). @@ -135,7 +136,7 @@ func (c *services) Get(name string, options meta_v1.GetOptions) (result *v1.Serv } // List takes label and field selectors, and returns the list of Services that match those selectors. -func (c *services) List(opts v1.ListOptions) (result *v1.ServiceList, err error) { +func (c *services) List(opts meta_v1.ListOptions) (result *v1.ServiceList, err error) { result = &v1.ServiceList{} err = c.client.Get(). Namespace(c.ns). @@ -147,7 +148,7 @@ func (c *services) List(opts v1.ListOptions) (result *v1.ServiceList, err error) } // Watch returns a watch.Interface that watches the requested services. -func (c *services) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *services) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -157,7 +158,7 @@ func (c *services) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched service. -func (c *services) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Service, err error) { +func (c *services) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Service, err error) { result = &v1.Service{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/service_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/service_expansion.go index 03dca75a..d2bb531d 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/service_expansion.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/service_expansion.go @@ -18,7 +18,7 @@ package v1 import ( "k8s.io/apimachinery/pkg/util/net" - "k8s.io/kubernetes/pkg/client/restclient" + restclient "k8s.io/client-go/rest" ) // The ServiceExpansion interface allows manually adding extra methods to the ServiceInterface. diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/serviceaccount.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/serviceaccount.go index 93f7b162..e1f05670 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/serviceaccount.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/serviceaccount.go @@ -18,10 +18,11 @@ package v1 import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // ServiceAccountsGetter has a method to return a ServiceAccountInterface. @@ -34,18 +35,18 @@ type ServiceAccountsGetter interface { type ServiceAccountInterface interface { Create(*v1.ServiceAccount) (*v1.ServiceAccount, error) Update(*v1.ServiceAccount) (*v1.ServiceAccount, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Delete(name string, options *meta_v1.DeleteOptions) error + DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error Get(name string, options meta_v1.GetOptions) (*v1.ServiceAccount, error) - List(opts v1.ListOptions) (*v1.ServiceAccountList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ServiceAccount, err error) + List(opts meta_v1.ListOptions) (*v1.ServiceAccountList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ServiceAccount, err error) ServiceAccountExpansion } // serviceAccounts implements ServiceAccountInterface type serviceAccounts struct { - client restclient.Interface + client rest.Interface ns string } @@ -83,7 +84,7 @@ func (c *serviceAccounts) Update(serviceAccount *v1.ServiceAccount) (result *v1. } // Delete takes name of the serviceAccount and deletes it. Returns an error if one occurs. -func (c *serviceAccounts) Delete(name string, options *v1.DeleteOptions) error { +func (c *serviceAccounts) Delete(name string, options *meta_v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("serviceaccounts"). @@ -94,7 +95,7 @@ func (c *serviceAccounts) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *serviceAccounts) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *serviceAccounts) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("serviceaccounts"). @@ -118,7 +119,7 @@ func (c *serviceAccounts) Get(name string, options meta_v1.GetOptions) (result * } // List takes label and field selectors, and returns the list of ServiceAccounts that match those selectors. -func (c *serviceAccounts) List(opts v1.ListOptions) (result *v1.ServiceAccountList, err error) { +func (c *serviceAccounts) List(opts meta_v1.ListOptions) (result *v1.ServiceAccountList, err error) { result = &v1.ServiceAccountList{} err = c.client.Get(). Namespace(c.ns). @@ -130,7 +131,7 @@ func (c *serviceAccounts) List(opts v1.ListOptions) (result *v1.ServiceAccountLi } // Watch returns a watch.Interface that watches the requested serviceAccounts. -func (c *serviceAccounts) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *serviceAccounts) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -140,7 +141,7 @@ func (c *serviceAccounts) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched serviceAccount. -func (c *serviceAccounts) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ServiceAccount, err error) { +func (c *serviceAccounts) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ServiceAccount, err error) { result = &v1.ServiceAccount{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/BUILD b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/BUILD index 7356470c..184b5469 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/BUILD @@ -26,14 +26,14 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/api:go_default_library", - "//pkg/api/v1:go_default_library", "//pkg/apis/extensions/v1beta1:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/meta", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/runtime/serializer", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/daemonset.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/daemonset.go index a777b86f..54690c48 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/daemonset.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/daemonset.go @@ -17,12 +17,12 @@ limitations under the License. package v1beta1 import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // DaemonSetsGetter has a method to return a DaemonSetInterface. @@ -38,16 +38,16 @@ type DaemonSetInterface interface { UpdateStatus(*v1beta1.DaemonSet) (*v1beta1.DaemonSet, error) Delete(name string, options *v1.DeleteOptions) error DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options meta_v1.GetOptions) (*v1beta1.DaemonSet, error) + Get(name string, options v1.GetOptions) (*v1beta1.DaemonSet, error) List(opts v1.ListOptions) (*v1beta1.DaemonSetList, error) Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.DaemonSet, err error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.DaemonSet, err error) DaemonSetExpansion } // daemonSets implements DaemonSetInterface type daemonSets struct { - client restclient.Interface + client rest.Interface ns string } @@ -123,7 +123,7 @@ func (c *daemonSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1. } // Get takes name of the daemonSet, and returns the corresponding daemonSet object, and an error if there is any. -func (c *daemonSets) Get(name string, options meta_v1.GetOptions) (result *v1beta1.DaemonSet, err error) { +func (c *daemonSets) Get(name string, options v1.GetOptions) (result *v1beta1.DaemonSet, err error) { result = &v1beta1.DaemonSet{} err = c.client.Get(). Namespace(c.ns). @@ -158,7 +158,7 @@ func (c *daemonSets) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched daemonSet. -func (c *daemonSets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.DaemonSet, err error) { +func (c *daemonSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.DaemonSet, err error) { result = &v1beta1.DaemonSet{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/deployment.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/deployment.go index 37397b38..fa786296 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/deployment.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/deployment.go @@ -17,12 +17,12 @@ limitations under the License. package v1beta1 import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // DeploymentsGetter has a method to return a DeploymentInterface. @@ -38,16 +38,16 @@ type DeploymentInterface interface { UpdateStatus(*v1beta1.Deployment) (*v1beta1.Deployment, error) Delete(name string, options *v1.DeleteOptions) error DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options meta_v1.GetOptions) (*v1beta1.Deployment, error) + Get(name string, options v1.GetOptions) (*v1beta1.Deployment, error) List(opts v1.ListOptions) (*v1beta1.DeploymentList, error) Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error) DeploymentExpansion } // deployments implements DeploymentInterface type deployments struct { - client restclient.Interface + client rest.Interface ns string } @@ -123,7 +123,7 @@ func (c *deployments) DeleteCollection(options *v1.DeleteOptions, listOptions v1 } // Get takes name of the deployment, and returns the corresponding deployment object, and an error if there is any. -func (c *deployments) Get(name string, options meta_v1.GetOptions) (result *v1beta1.Deployment, err error) { +func (c *deployments) Get(name string, options v1.GetOptions) (result *v1beta1.Deployment, err error) { result = &v1beta1.Deployment{} err = c.client.Get(). Namespace(c.ns). @@ -158,7 +158,7 @@ func (c *deployments) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched deployment. -func (c *deployments) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error) { +func (c *deployments) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error) { result = &v1beta1.Deployment{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/doc.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/doc.go index e596bf01..0e58290b 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1] +// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1] // This package has the automatically generated typed clients. package v1beta1 diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/extensions_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/extensions_client.go index 646cd504..d646e5a1 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/extensions_client.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/extensions_client.go @@ -20,12 +20,12 @@ import ( fmt "fmt" schema "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type ExtensionsV1beta1Interface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface DaemonSetsGetter DeploymentsGetter IngressesGetter @@ -37,7 +37,7 @@ type ExtensionsV1beta1Interface interface { // ExtensionsV1beta1Client is used to interact with features provided by the extensions group. type ExtensionsV1beta1Client struct { - restClient restclient.Interface + restClient rest.Interface } func (c *ExtensionsV1beta1Client) DaemonSets(namespace string) DaemonSetInterface { @@ -69,12 +69,12 @@ func (c *ExtensionsV1beta1Client) ThirdPartyResources() ThirdPartyResourceInterf } // NewForConfig creates a new ExtensionsV1beta1Client for the given config. -func NewForConfig(c *restclient.Config) (*ExtensionsV1beta1Client, error) { +func NewForConfig(c *rest.Config) (*ExtensionsV1beta1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -83,7 +83,7 @@ func NewForConfig(c *restclient.Config) (*ExtensionsV1beta1Client, error) { // NewForConfigOrDie creates a new ExtensionsV1beta1Client for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *ExtensionsV1beta1Client { +func NewForConfigOrDie(c *rest.Config) *ExtensionsV1beta1Client { client, err := NewForConfig(c) if err != nil { panic(err) @@ -92,11 +92,11 @@ func NewForConfigOrDie(c *restclient.Config) *ExtensionsV1beta1Client { } // New creates a new ExtensionsV1beta1Client for the given RESTClient. -func New(c restclient.Interface) *ExtensionsV1beta1Client { +func New(c rest.Interface) *ExtensionsV1beta1Client { return &ExtensionsV1beta1Client{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { gv, err := schema.ParseGroupVersion("extensions/v1beta1") if err != nil { return err @@ -107,7 +107,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/apis" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } copyGroupVersion := gv config.GroupVersion = ©GroupVersion @@ -119,7 +119,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *ExtensionsV1beta1Client) RESTClient() restclient.Interface { +func (c *ExtensionsV1beta1Client) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/fake/BUILD b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/fake/BUILD index 7c8bc4c8..7a0c6ec5 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/fake/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/fake/BUILD @@ -24,16 +24,15 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", - "//pkg/api/v1:go_default_library", "//pkg/apis/extensions/v1beta1:go_default_library", "//pkg/client/clientset_generated/clientset/typed/extensions/v1beta1:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/fake/doc.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/fake/doc.go index ea928c21..c4753e08 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/fake/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/fake/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1] +// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1] // Package fake has the automatically generated clients. package fake diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/fake/fake_daemonset.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/fake/fake_daemonset.go index 0ec6bd3d..1af9a446 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/fake/fake_daemonset.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/fake/fake_daemonset.go @@ -17,12 +17,11 @@ limitations under the License. package fake import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -79,7 +78,7 @@ func (c *FakeDaemonSets) DeleteCollection(options *v1.DeleteOptions, listOptions return err } -func (c *FakeDaemonSets) Get(name string, options meta_v1.GetOptions) (result *v1beta1.DaemonSet, err error) { +func (c *FakeDaemonSets) Get(name string, options v1.GetOptions) (result *v1beta1.DaemonSet, err error) { obj, err := c.Fake. Invokes(core.NewGetAction(daemonsetsResource, c.ns, name), &v1beta1.DaemonSet{}) @@ -118,7 +117,7 @@ func (c *FakeDaemonSets) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched daemonSet. -func (c *FakeDaemonSets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.DaemonSet, err error) { +func (c *FakeDaemonSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.DaemonSet, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(daemonsetsResource, c.ns, name, data, subresources...), &v1beta1.DaemonSet{}) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/fake/fake_deployment.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/fake/fake_deployment.go index 91007324..f49ab7e7 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/fake/fake_deployment.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/fake/fake_deployment.go @@ -17,12 +17,11 @@ limitations under the License. package fake import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -79,7 +78,7 @@ func (c *FakeDeployments) DeleteCollection(options *v1.DeleteOptions, listOption return err } -func (c *FakeDeployments) Get(name string, options meta_v1.GetOptions) (result *v1beta1.Deployment, err error) { +func (c *FakeDeployments) Get(name string, options v1.GetOptions) (result *v1beta1.Deployment, err error) { obj, err := c.Fake. Invokes(core.NewGetAction(deploymentsResource, c.ns, name), &v1beta1.Deployment{}) @@ -118,7 +117,7 @@ func (c *FakeDeployments) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched deployment. -func (c *FakeDeployments) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error) { +func (c *FakeDeployments) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(deploymentsResource, c.ns, name, data, subresources...), &v1beta1.Deployment{}) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/fake/fake_extensions_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/fake/fake_extensions_client.go index a6e5207c..84749284 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/fake/fake_extensions_client.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/fake/fake_extensions_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" v1beta1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -56,7 +56,7 @@ func (c *FakeExtensionsV1beta1) ThirdPartyResources() v1beta1.ThirdPartyResource // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeExtensionsV1beta1) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeExtensionsV1beta1) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/fake/fake_ingress.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/fake/fake_ingress.go index 27858fe8..277717bb 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/fake/fake_ingress.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/fake/fake_ingress.go @@ -17,12 +17,11 @@ limitations under the License. package fake import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -79,7 +78,7 @@ func (c *FakeIngresses) DeleteCollection(options *v1.DeleteOptions, listOptions return err } -func (c *FakeIngresses) Get(name string, options meta_v1.GetOptions) (result *v1beta1.Ingress, err error) { +func (c *FakeIngresses) Get(name string, options v1.GetOptions) (result *v1beta1.Ingress, err error) { obj, err := c.Fake. Invokes(core.NewGetAction(ingressesResource, c.ns, name), &v1beta1.Ingress{}) @@ -118,7 +117,7 @@ func (c *FakeIngresses) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched ingress. -func (c *FakeIngresses) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.Ingress, err error) { +func (c *FakeIngresses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Ingress, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(ingressesResource, c.ns, name, data, subresources...), &v1beta1.Ingress{}) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/fake/fake_podsecuritypolicy.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/fake/fake_podsecuritypolicy.go index 0aede399..38bc1284 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/fake/fake_podsecuritypolicy.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/fake/fake_podsecuritypolicy.go @@ -17,12 +17,11 @@ limitations under the License. package fake import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -65,7 +64,7 @@ func (c *FakePodSecurityPolicies) DeleteCollection(options *v1.DeleteOptions, li return err } -func (c *FakePodSecurityPolicies) Get(name string, options meta_v1.GetOptions) (result *v1beta1.PodSecurityPolicy, err error) { +func (c *FakePodSecurityPolicies) Get(name string, options v1.GetOptions) (result *v1beta1.PodSecurityPolicy, err error) { obj, err := c.Fake. Invokes(core.NewRootGetAction(podsecuritypoliciesResource, name), &v1beta1.PodSecurityPolicy{}) if obj == nil { @@ -101,7 +100,7 @@ func (c *FakePodSecurityPolicies) Watch(opts v1.ListOptions) (watch.Interface, e } // Patch applies the patch and returns the patched podSecurityPolicy. -func (c *FakePodSecurityPolicies) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.PodSecurityPolicy, err error) { +func (c *FakePodSecurityPolicies) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.PodSecurityPolicy, err error) { obj, err := c.Fake. Invokes(core.NewRootPatchSubresourceAction(podsecuritypoliciesResource, name, data, subresources...), &v1beta1.PodSecurityPolicy{}) if obj == nil { diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/fake/fake_replicaset.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/fake/fake_replicaset.go index b0fce2a8..3835577b 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/fake/fake_replicaset.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/fake/fake_replicaset.go @@ -17,12 +17,11 @@ limitations under the License. package fake import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -79,7 +78,7 @@ func (c *FakeReplicaSets) DeleteCollection(options *v1.DeleteOptions, listOption return err } -func (c *FakeReplicaSets) Get(name string, options meta_v1.GetOptions) (result *v1beta1.ReplicaSet, err error) { +func (c *FakeReplicaSets) Get(name string, options v1.GetOptions) (result *v1beta1.ReplicaSet, err error) { obj, err := c.Fake. Invokes(core.NewGetAction(replicasetsResource, c.ns, name), &v1beta1.ReplicaSet{}) @@ -118,7 +117,7 @@ func (c *FakeReplicaSets) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched replicaSet. -func (c *FakeReplicaSets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.ReplicaSet, err error) { +func (c *FakeReplicaSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ReplicaSet, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(replicasetsResource, c.ns, name, data, subresources...), &v1beta1.ReplicaSet{}) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/fake/fake_thirdpartyresource.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/fake/fake_thirdpartyresource.go index b59bec46..119baf8a 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/fake/fake_thirdpartyresource.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/fake/fake_thirdpartyresource.go @@ -17,12 +17,11 @@ limitations under the License. package fake import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -65,7 +64,7 @@ func (c *FakeThirdPartyResources) DeleteCollection(options *v1.DeleteOptions, li return err } -func (c *FakeThirdPartyResources) Get(name string, options meta_v1.GetOptions) (result *v1beta1.ThirdPartyResource, err error) { +func (c *FakeThirdPartyResources) Get(name string, options v1.GetOptions) (result *v1beta1.ThirdPartyResource, err error) { obj, err := c.Fake. Invokes(core.NewRootGetAction(thirdpartyresourcesResource, name), &v1beta1.ThirdPartyResource{}) if obj == nil { @@ -101,7 +100,7 @@ func (c *FakeThirdPartyResources) Watch(opts v1.ListOptions) (watch.Interface, e } // Patch applies the patch and returns the patched thirdPartyResource. -func (c *FakeThirdPartyResources) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.ThirdPartyResource, err error) { +func (c *FakeThirdPartyResources) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ThirdPartyResource, err error) { obj, err := c.Fake. Invokes(core.NewRootPatchSubresourceAction(thirdpartyresourcesResource, name, data, subresources...), &v1beta1.ThirdPartyResource{}) if obj == nil { diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/ingress.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/ingress.go index 53812326..685d1ea7 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/ingress.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/ingress.go @@ -17,12 +17,12 @@ limitations under the License. package v1beta1 import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // IngressesGetter has a method to return a IngressInterface. @@ -38,16 +38,16 @@ type IngressInterface interface { UpdateStatus(*v1beta1.Ingress) (*v1beta1.Ingress, error) Delete(name string, options *v1.DeleteOptions) error DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options meta_v1.GetOptions) (*v1beta1.Ingress, error) + Get(name string, options v1.GetOptions) (*v1beta1.Ingress, error) List(opts v1.ListOptions) (*v1beta1.IngressList, error) Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.Ingress, err error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Ingress, err error) IngressExpansion } // ingresses implements IngressInterface type ingresses struct { - client restclient.Interface + client rest.Interface ns string } @@ -123,7 +123,7 @@ func (c *ingresses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.L } // Get takes name of the ingress, and returns the corresponding ingress object, and an error if there is any. -func (c *ingresses) Get(name string, options meta_v1.GetOptions) (result *v1beta1.Ingress, err error) { +func (c *ingresses) Get(name string, options v1.GetOptions) (result *v1beta1.Ingress, err error) { result = &v1beta1.Ingress{} err = c.client.Get(). Namespace(c.ns). @@ -158,7 +158,7 @@ func (c *ingresses) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched ingress. -func (c *ingresses) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.Ingress, err error) { +func (c *ingresses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Ingress, err error) { result = &v1beta1.Ingress{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/podsecuritypolicy.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/podsecuritypolicy.go index 404366b6..e495a1ef 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/podsecuritypolicy.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/podsecuritypolicy.go @@ -17,12 +17,12 @@ limitations under the License. package v1beta1 import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // PodSecurityPoliciesGetter has a method to return a PodSecurityPolicyInterface. @@ -37,16 +37,16 @@ type PodSecurityPolicyInterface interface { Update(*v1beta1.PodSecurityPolicy) (*v1beta1.PodSecurityPolicy, error) Delete(name string, options *v1.DeleteOptions) error DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options meta_v1.GetOptions) (*v1beta1.PodSecurityPolicy, error) + Get(name string, options v1.GetOptions) (*v1beta1.PodSecurityPolicy, error) List(opts v1.ListOptions) (*v1beta1.PodSecurityPolicyList, error) Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.PodSecurityPolicy, err error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.PodSecurityPolicy, err error) PodSecurityPolicyExpansion } // podSecurityPolicies implements PodSecurityPolicyInterface type podSecurityPolicies struct { - client restclient.Interface + client rest.Interface } // newPodSecurityPolicies returns a PodSecurityPolicies @@ -100,7 +100,7 @@ func (c *podSecurityPolicies) DeleteCollection(options *v1.DeleteOptions, listOp } // Get takes name of the podSecurityPolicy, and returns the corresponding podSecurityPolicy object, and an error if there is any. -func (c *podSecurityPolicies) Get(name string, options meta_v1.GetOptions) (result *v1beta1.PodSecurityPolicy, err error) { +func (c *podSecurityPolicies) Get(name string, options v1.GetOptions) (result *v1beta1.PodSecurityPolicy, err error) { result = &v1beta1.PodSecurityPolicy{} err = c.client.Get(). Resource("podsecuritypolicies"). @@ -132,7 +132,7 @@ func (c *podSecurityPolicies) Watch(opts v1.ListOptions) (watch.Interface, error } // Patch applies the patch and returns the patched podSecurityPolicy. -func (c *podSecurityPolicies) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.PodSecurityPolicy, err error) { +func (c *podSecurityPolicies) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.PodSecurityPolicy, err error) { result = &v1beta1.PodSecurityPolicy{} err = c.client.Patch(pt). Resource("podsecuritypolicies"). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/replicaset.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/replicaset.go index e0a493bc..5069fab5 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/replicaset.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/replicaset.go @@ -17,12 +17,12 @@ limitations under the License. package v1beta1 import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // ReplicaSetsGetter has a method to return a ReplicaSetInterface. @@ -38,16 +38,16 @@ type ReplicaSetInterface interface { UpdateStatus(*v1beta1.ReplicaSet) (*v1beta1.ReplicaSet, error) Delete(name string, options *v1.DeleteOptions) error DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options meta_v1.GetOptions) (*v1beta1.ReplicaSet, error) + Get(name string, options v1.GetOptions) (*v1beta1.ReplicaSet, error) List(opts v1.ListOptions) (*v1beta1.ReplicaSetList, error) Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.ReplicaSet, err error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ReplicaSet, err error) ReplicaSetExpansion } // replicaSets implements ReplicaSetInterface type replicaSets struct { - client restclient.Interface + client rest.Interface ns string } @@ -123,7 +123,7 @@ func (c *replicaSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1 } // Get takes name of the replicaSet, and returns the corresponding replicaSet object, and an error if there is any. -func (c *replicaSets) Get(name string, options meta_v1.GetOptions) (result *v1beta1.ReplicaSet, err error) { +func (c *replicaSets) Get(name string, options v1.GetOptions) (result *v1beta1.ReplicaSet, err error) { result = &v1beta1.ReplicaSet{} err = c.client.Get(). Namespace(c.ns). @@ -158,7 +158,7 @@ func (c *replicaSets) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched replicaSet. -func (c *replicaSets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.ReplicaSet, err error) { +func (c *replicaSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ReplicaSet, err error) { result = &v1beta1.ReplicaSet{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/scale.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/scale.go index 3900aaa0..733012ad 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/scale.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/scale.go @@ -17,7 +17,7 @@ limitations under the License. package v1beta1 import ( - restclient "k8s.io/kubernetes/pkg/client/restclient" + rest "k8s.io/client-go/rest" ) // ScalesGetter has a method to return a ScaleInterface. @@ -33,7 +33,7 @@ type ScaleInterface interface { // scales implements ScaleInterface type scales struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/thirdpartyresource.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/thirdpartyresource.go index 51a49524..404d6112 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/thirdpartyresource.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1/thirdpartyresource.go @@ -17,12 +17,12 @@ limitations under the License. package v1beta1 import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // ThirdPartyResourcesGetter has a method to return a ThirdPartyResourceInterface. @@ -37,16 +37,16 @@ type ThirdPartyResourceInterface interface { Update(*v1beta1.ThirdPartyResource) (*v1beta1.ThirdPartyResource, error) Delete(name string, options *v1.DeleteOptions) error DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options meta_v1.GetOptions) (*v1beta1.ThirdPartyResource, error) + Get(name string, options v1.GetOptions) (*v1beta1.ThirdPartyResource, error) List(opts v1.ListOptions) (*v1beta1.ThirdPartyResourceList, error) Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.ThirdPartyResource, err error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ThirdPartyResource, err error) ThirdPartyResourceExpansion } // thirdPartyResources implements ThirdPartyResourceInterface type thirdPartyResources struct { - client restclient.Interface + client rest.Interface } // newThirdPartyResources returns a ThirdPartyResources @@ -100,7 +100,7 @@ func (c *thirdPartyResources) DeleteCollection(options *v1.DeleteOptions, listOp } // Get takes name of the thirdPartyResource, and returns the corresponding thirdPartyResource object, and an error if there is any. -func (c *thirdPartyResources) Get(name string, options meta_v1.GetOptions) (result *v1beta1.ThirdPartyResource, err error) { +func (c *thirdPartyResources) Get(name string, options v1.GetOptions) (result *v1beta1.ThirdPartyResource, err error) { result = &v1beta1.ThirdPartyResource{} err = c.client.Get(). Resource("thirdpartyresources"). @@ -132,7 +132,7 @@ func (c *thirdPartyResources) Watch(opts v1.ListOptions) (watch.Interface, error } // Patch applies the patch and returns the patched thirdPartyResource. -func (c *thirdPartyResources) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.ThirdPartyResource, err error) { +func (c *thirdPartyResources) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ThirdPartyResource, err error) { result = &v1beta1.ThirdPartyResource{} err = c.client.Patch(pt). Resource("thirdpartyresources"). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/fake/fake_poddisruptionbudget.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/fake/fake_poddisruptionbudget.go deleted file mode 100644 index fcd71896..00000000 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/fake/fake_poddisruptionbudget.go +++ /dev/null @@ -1,128 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package fake - -import ( - labels "k8s.io/apimachinery/pkg/labels" - "k8s.io/apimachinery/pkg/runtime/schema" - watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" - v1alpha1 "k8s.io/kubernetes/pkg/apis/policy/v1alpha1" - core "k8s.io/kubernetes/pkg/client/testing/core" -) - -// FakePodDisruptionBudgets implements PodDisruptionBudgetInterface -type FakePodDisruptionBudgets struct { - Fake *FakePolicyV1alpha1 - ns string -} - -var poddisruptionbudgetsResource = schema.GroupVersionResource{Group: "policy", Version: "v1alpha1", Resource: "poddisruptionbudgets"} - -func (c *FakePodDisruptionBudgets) Create(podDisruptionBudget *v1alpha1.PodDisruptionBudget) (result *v1alpha1.PodDisruptionBudget, err error) { - obj, err := c.Fake. - Invokes(core.NewCreateAction(poddisruptionbudgetsResource, c.ns, podDisruptionBudget), &v1alpha1.PodDisruptionBudget{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.PodDisruptionBudget), err -} - -func (c *FakePodDisruptionBudgets) Update(podDisruptionBudget *v1alpha1.PodDisruptionBudget) (result *v1alpha1.PodDisruptionBudget, err error) { - obj, err := c.Fake. - Invokes(core.NewUpdateAction(poddisruptionbudgetsResource, c.ns, podDisruptionBudget), &v1alpha1.PodDisruptionBudget{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.PodDisruptionBudget), err -} - -func (c *FakePodDisruptionBudgets) UpdateStatus(podDisruptionBudget *v1alpha1.PodDisruptionBudget) (*v1alpha1.PodDisruptionBudget, error) { - obj, err := c.Fake. - Invokes(core.NewUpdateSubresourceAction(poddisruptionbudgetsResource, "status", c.ns, podDisruptionBudget), &v1alpha1.PodDisruptionBudget{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.PodDisruptionBudget), err -} - -func (c *FakePodDisruptionBudgets) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(core.NewDeleteAction(poddisruptionbudgetsResource, c.ns, name), &v1alpha1.PodDisruptionBudget{}) - - return err -} - -func (c *FakePodDisruptionBudgets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := core.NewDeleteCollectionAction(poddisruptionbudgetsResource, c.ns, listOptions) - - _, err := c.Fake.Invokes(action, &v1alpha1.PodDisruptionBudgetList{}) - return err -} - -func (c *FakePodDisruptionBudgets) Get(name string) (result *v1alpha1.PodDisruptionBudget, err error) { - obj, err := c.Fake. - Invokes(core.NewGetAction(poddisruptionbudgetsResource, c.ns, name), &v1alpha1.PodDisruptionBudget{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.PodDisruptionBudget), err -} - -func (c *FakePodDisruptionBudgets) List(opts v1.ListOptions) (result *v1alpha1.PodDisruptionBudgetList, err error) { - obj, err := c.Fake. - Invokes(core.NewListAction(poddisruptionbudgetsResource, c.ns, opts), &v1alpha1.PodDisruptionBudgetList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := core.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1alpha1.PodDisruptionBudgetList{} - for _, item := range obj.(*v1alpha1.PodDisruptionBudgetList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested podDisruptionBudgets. -func (c *FakePodDisruptionBudgets) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(core.NewWatchAction(poddisruptionbudgetsResource, c.ns, opts)) - -} - -// Patch applies the patch and returns the patched podDisruptionBudget. -func (c *FakePodDisruptionBudgets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.PodDisruptionBudget, err error) { - obj, err := c.Fake. - Invokes(core.NewPatchSubresourceAction(poddisruptionbudgetsResource, c.ns, name, data, subresources...), &v1alpha1.PodDisruptionBudget{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.PodDisruptionBudget), err -} diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/poddisruptionbudget.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/poddisruptionbudget.go deleted file mode 100644 index 2bed3cc4..00000000 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/poddisruptionbudget.go +++ /dev/null @@ -1,167 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1 - -import ( - watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" - v1alpha1 "k8s.io/kubernetes/pkg/apis/policy/v1alpha1" - restclient "k8s.io/kubernetes/pkg/client/restclient" -) - -// PodDisruptionBudgetsGetter has a method to return a PodDisruptionBudgetInterface. -// A group's client should implement this interface. -type PodDisruptionBudgetsGetter interface { - PodDisruptionBudgets(namespace string) PodDisruptionBudgetInterface -} - -// PodDisruptionBudgetInterface has methods to work with PodDisruptionBudget resources. -type PodDisruptionBudgetInterface interface { - Create(*v1alpha1.PodDisruptionBudget) (*v1alpha1.PodDisruptionBudget, error) - Update(*v1alpha1.PodDisruptionBudget) (*v1alpha1.PodDisruptionBudget, error) - UpdateStatus(*v1alpha1.PodDisruptionBudget) (*v1alpha1.PodDisruptionBudget, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string) (*v1alpha1.PodDisruptionBudget, error) - List(opts v1.ListOptions) (*v1alpha1.PodDisruptionBudgetList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.PodDisruptionBudget, err error) - PodDisruptionBudgetExpansion -} - -// podDisruptionBudgets implements PodDisruptionBudgetInterface -type podDisruptionBudgets struct { - client restclient.Interface - ns string -} - -// newPodDisruptionBudgets returns a PodDisruptionBudgets -func newPodDisruptionBudgets(c *PolicyV1alpha1Client, namespace string) *podDisruptionBudgets { - return &podDisruptionBudgets{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Create takes the representation of a podDisruptionBudget and creates it. Returns the server's representation of the podDisruptionBudget, and an error, if there is any. -func (c *podDisruptionBudgets) Create(podDisruptionBudget *v1alpha1.PodDisruptionBudget) (result *v1alpha1.PodDisruptionBudget, err error) { - result = &v1alpha1.PodDisruptionBudget{} - err = c.client.Post(). - Namespace(c.ns). - Resource("poddisruptionbudgets"). - Body(podDisruptionBudget). - Do(). - Into(result) - return -} - -// Update takes the representation of a podDisruptionBudget and updates it. Returns the server's representation of the podDisruptionBudget, and an error, if there is any. -func (c *podDisruptionBudgets) Update(podDisruptionBudget *v1alpha1.PodDisruptionBudget) (result *v1alpha1.PodDisruptionBudget, err error) { - result = &v1alpha1.PodDisruptionBudget{} - err = c.client.Put(). - Namespace(c.ns). - Resource("poddisruptionbudgets"). - Name(podDisruptionBudget.Name). - Body(podDisruptionBudget). - Do(). - Into(result) - return -} - -func (c *podDisruptionBudgets) UpdateStatus(podDisruptionBudget *v1alpha1.PodDisruptionBudget) (result *v1alpha1.PodDisruptionBudget, err error) { - result = &v1alpha1.PodDisruptionBudget{} - err = c.client.Put(). - Namespace(c.ns). - Resource("poddisruptionbudgets"). - Name(podDisruptionBudget.Name). - SubResource("status"). - Body(podDisruptionBudget). - Do(). - Into(result) - return -} - -// Delete takes name of the podDisruptionBudget and deletes it. Returns an error if one occurs. -func (c *podDisruptionBudgets) Delete(name string, options *v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("poddisruptionbudgets"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *podDisruptionBudgets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("poddisruptionbudgets"). - VersionedParams(&listOptions, api.ParameterCodec). - Body(options). - Do(). - Error() -} - -// Get takes name of the podDisruptionBudget, and returns the corresponding podDisruptionBudget object, and an error if there is any. -func (c *podDisruptionBudgets) Get(name string) (result *v1alpha1.PodDisruptionBudget, err error) { - result = &v1alpha1.PodDisruptionBudget{} - err = c.client.Get(). - Namespace(c.ns). - Resource("poddisruptionbudgets"). - Name(name). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of PodDisruptionBudgets that match those selectors. -func (c *podDisruptionBudgets) List(opts v1.ListOptions) (result *v1alpha1.PodDisruptionBudgetList, err error) { - result = &v1alpha1.PodDisruptionBudgetList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("poddisruptionbudgets"). - VersionedParams(&opts, api.ParameterCodec). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested podDisruptionBudgets. -func (c *podDisruptionBudgets) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.client.Get(). - Prefix("watch"). - Namespace(c.ns). - Resource("poddisruptionbudgets"). - VersionedParams(&opts, api.ParameterCodec). - Watch() -} - -// Patch applies the patch and returns the patched podDisruptionBudget. -func (c *podDisruptionBudgets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.PodDisruptionBudget, err error) { - result = &v1alpha1.PodDisruptionBudget{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("poddisruptionbudgets"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/policy_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/policy_client.go deleted file mode 100644 index 989faf1b..00000000 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1alpha1/policy_client.go +++ /dev/null @@ -1,98 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1 - -import ( - fmt "fmt" - - "k8s.io/apimachinery/pkg/runtime/schema" - serializer "k8s.io/apimachinery/pkg/runtime/serializer" - api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" -) - -type PolicyV1alpha1Interface interface { - RESTClient() restclient.Interface - PodDisruptionBudgetsGetter -} - -// PolicyV1alpha1Client is used to interact with features provided by the k8s.io/kubernetes/pkg/apimachinery/registered.Group group. -type PolicyV1alpha1Client struct { - restClient restclient.Interface -} - -func (c *PolicyV1alpha1Client) PodDisruptionBudgets(namespace string) PodDisruptionBudgetInterface { - return newPodDisruptionBudgets(c, namespace) -} - -// NewForConfig creates a new PolicyV1alpha1Client for the given config. -func NewForConfig(c *restclient.Config) (*PolicyV1alpha1Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := restclient.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &PolicyV1alpha1Client{client}, nil -} - -// NewForConfigOrDie creates a new PolicyV1alpha1Client for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *PolicyV1alpha1Client { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new PolicyV1alpha1Client for the given RESTClient. -func New(c restclient.Interface) *PolicyV1alpha1Client { - return &PolicyV1alpha1Client{c} -} - -func setConfigDefaults(config *restclient.Config) error { - gv, err := schema.ParseGroupVersion("policy/v1alpha1") - if err != nil { - return err - } - // if policy/v1alpha1 is not enabled, return an error - if !api.Registry.IsEnabledVersion(gv) { - return fmt.Errorf("policy/v1alpha1 is not enabled") - } - config.APIPath = "/apis" - if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() - } - copyGroupVersion := gv - config.GroupVersion = ©GroupVersion - - config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: api.Codecs} - - return nil -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *PolicyV1alpha1Client) RESTClient() restclient.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/BUILD b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/BUILD index f57d564a..7da57f8e 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/BUILD @@ -20,13 +20,13 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/api:go_default_library", - "//pkg/api/v1:go_default_library", "//pkg/apis/policy/v1beta1:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/runtime/serializer", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/doc.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/doc.go index e596bf01..0e58290b 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1] +// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1] // This package has the automatically generated typed clients. package v1beta1 diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/eviction.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/eviction.go index 3137a97a..9c4133e3 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/eviction.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/eviction.go @@ -17,7 +17,7 @@ limitations under the License. package v1beta1 import ( - restclient "k8s.io/kubernetes/pkg/client/restclient" + rest "k8s.io/client-go/rest" ) // EvictionsGetter has a method to return a EvictionInterface. @@ -33,7 +33,7 @@ type EvictionInterface interface { // evictions implements EvictionInterface type evictions struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/fake/BUILD b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/fake/BUILD index 559da0a6..eae1bdb0 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/fake/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/fake/BUILD @@ -18,16 +18,15 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", - "//pkg/api/v1:go_default_library", "//pkg/apis/policy/v1beta1:go_default_library", "//pkg/client/clientset_generated/clientset/typed/policy/v1beta1:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/fake/doc.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/fake/doc.go index ea928c21..c4753e08 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/fake/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/fake/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1] +// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1] // Package fake has the automatically generated clients. package fake diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/fake/fake_poddisruptionbudget.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/fake/fake_poddisruptionbudget.go index 1b1abf18..b308ad95 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/fake/fake_poddisruptionbudget.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/fake/fake_poddisruptionbudget.go @@ -17,12 +17,11 @@ limitations under the License. package fake import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" v1beta1 "k8s.io/kubernetes/pkg/apis/policy/v1beta1" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -79,7 +78,7 @@ func (c *FakePodDisruptionBudgets) DeleteCollection(options *v1.DeleteOptions, l return err } -func (c *FakePodDisruptionBudgets) Get(name string, options meta_v1.GetOptions) (result *v1beta1.PodDisruptionBudget, err error) { +func (c *FakePodDisruptionBudgets) Get(name string, options v1.GetOptions) (result *v1beta1.PodDisruptionBudget, err error) { obj, err := c.Fake. Invokes(core.NewGetAction(poddisruptionbudgetsResource, c.ns, name), &v1beta1.PodDisruptionBudget{}) @@ -118,7 +117,7 @@ func (c *FakePodDisruptionBudgets) Watch(opts v1.ListOptions) (watch.Interface, } // Patch applies the patch and returns the patched podDisruptionBudget. -func (c *FakePodDisruptionBudgets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.PodDisruptionBudget, err error) { +func (c *FakePodDisruptionBudgets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.PodDisruptionBudget, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(poddisruptionbudgetsResource, c.ns, name, data, subresources...), &v1beta1.PodDisruptionBudget{}) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/fake/fake_policy_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/fake/fake_policy_client.go index 36fa3bec..d25b1753 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/fake/fake_policy_client.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/fake/fake_policy_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" v1beta1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -36,7 +36,7 @@ func (c *FakePolicyV1beta1) PodDisruptionBudgets(namespace string) v1beta1.PodDi // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakePolicyV1beta1) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakePolicyV1beta1) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/poddisruptionbudget.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/poddisruptionbudget.go index f38d1892..7d0fa710 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/poddisruptionbudget.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/poddisruptionbudget.go @@ -17,12 +17,12 @@ limitations under the License. package v1beta1 import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" v1beta1 "k8s.io/kubernetes/pkg/apis/policy/v1beta1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // PodDisruptionBudgetsGetter has a method to return a PodDisruptionBudgetInterface. @@ -38,16 +38,16 @@ type PodDisruptionBudgetInterface interface { UpdateStatus(*v1beta1.PodDisruptionBudget) (*v1beta1.PodDisruptionBudget, error) Delete(name string, options *v1.DeleteOptions) error DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options meta_v1.GetOptions) (*v1beta1.PodDisruptionBudget, error) + Get(name string, options v1.GetOptions) (*v1beta1.PodDisruptionBudget, error) List(opts v1.ListOptions) (*v1beta1.PodDisruptionBudgetList, error) Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.PodDisruptionBudget, err error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.PodDisruptionBudget, err error) PodDisruptionBudgetExpansion } // podDisruptionBudgets implements PodDisruptionBudgetInterface type podDisruptionBudgets struct { - client restclient.Interface + client rest.Interface ns string } @@ -123,7 +123,7 @@ func (c *podDisruptionBudgets) DeleteCollection(options *v1.DeleteOptions, listO } // Get takes name of the podDisruptionBudget, and returns the corresponding podDisruptionBudget object, and an error if there is any. -func (c *podDisruptionBudgets) Get(name string, options meta_v1.GetOptions) (result *v1beta1.PodDisruptionBudget, err error) { +func (c *podDisruptionBudgets) Get(name string, options v1.GetOptions) (result *v1beta1.PodDisruptionBudget, err error) { result = &v1beta1.PodDisruptionBudget{} err = c.client.Get(). Namespace(c.ns). @@ -158,7 +158,7 @@ func (c *podDisruptionBudgets) Watch(opts v1.ListOptions) (watch.Interface, erro } // Patch applies the patch and returns the patched podDisruptionBudget. -func (c *podDisruptionBudgets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.PodDisruptionBudget, err error) { +func (c *podDisruptionBudgets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.PodDisruptionBudget, err error) { result = &v1beta1.PodDisruptionBudget{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/policy_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/policy_client.go index a501ea13..c542fcfe 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/policy_client.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/policy_client.go @@ -20,19 +20,19 @@ import ( fmt "fmt" schema "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type PolicyV1beta1Interface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface EvictionsGetter PodDisruptionBudgetsGetter } // PolicyV1beta1Client is used to interact with features provided by the policy group. type PolicyV1beta1Client struct { - restClient restclient.Interface + restClient rest.Interface } func (c *PolicyV1beta1Client) Evictions(namespace string) EvictionInterface { @@ -44,12 +44,12 @@ func (c *PolicyV1beta1Client) PodDisruptionBudgets(namespace string) PodDisrupti } // NewForConfig creates a new PolicyV1beta1Client for the given config. -func NewForConfig(c *restclient.Config) (*PolicyV1beta1Client, error) { +func NewForConfig(c *rest.Config) (*PolicyV1beta1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -58,7 +58,7 @@ func NewForConfig(c *restclient.Config) (*PolicyV1beta1Client, error) { // NewForConfigOrDie creates a new PolicyV1beta1Client for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *PolicyV1beta1Client { +func NewForConfigOrDie(c *rest.Config) *PolicyV1beta1Client { client, err := NewForConfig(c) if err != nil { panic(err) @@ -67,11 +67,11 @@ func NewForConfigOrDie(c *restclient.Config) *PolicyV1beta1Client { } // New creates a new PolicyV1beta1Client for the given RESTClient. -func New(c restclient.Interface) *PolicyV1beta1Client { +func New(c rest.Interface) *PolicyV1beta1Client { return &PolicyV1beta1Client{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { gv, err := schema.ParseGroupVersion("policy/v1beta1") if err != nil { return err @@ -82,7 +82,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/apis" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } copyGroupVersion := gv config.GroupVersion = ©GroupVersion @@ -94,7 +94,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *PolicyV1beta1Client) RESTClient() restclient.Interface { +func (c *PolicyV1beta1Client) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/BUILD b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/BUILD index f0fe1154..6d02a149 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/BUILD @@ -21,13 +21,13 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/api:go_default_library", - "//pkg/api/v1:go_default_library", "//pkg/apis/rbac/v1alpha1:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/runtime/serializer", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/clusterrole.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/clusterrole.go index adb2f2b6..b4cbdcc7 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/clusterrole.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/clusterrole.go @@ -17,12 +17,12 @@ limitations under the License. package v1alpha1 import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" v1alpha1 "k8s.io/kubernetes/pkg/apis/rbac/v1alpha1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // ClusterRolesGetter has a method to return a ClusterRoleInterface. @@ -37,16 +37,16 @@ type ClusterRoleInterface interface { Update(*v1alpha1.ClusterRole) (*v1alpha1.ClusterRole, error) Delete(name string, options *v1.DeleteOptions) error DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options meta_v1.GetOptions) (*v1alpha1.ClusterRole, error) + Get(name string, options v1.GetOptions) (*v1alpha1.ClusterRole, error) List(opts v1.ListOptions) (*v1alpha1.ClusterRoleList, error) Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterRole, err error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterRole, err error) ClusterRoleExpansion } // clusterRoles implements ClusterRoleInterface type clusterRoles struct { - client restclient.Interface + client rest.Interface } // newClusterRoles returns a ClusterRoles @@ -100,7 +100,7 @@ func (c *clusterRoles) DeleteCollection(options *v1.DeleteOptions, listOptions v } // Get takes name of the clusterRole, and returns the corresponding clusterRole object, and an error if there is any. -func (c *clusterRoles) Get(name string, options meta_v1.GetOptions) (result *v1alpha1.ClusterRole, err error) { +func (c *clusterRoles) Get(name string, options v1.GetOptions) (result *v1alpha1.ClusterRole, err error) { result = &v1alpha1.ClusterRole{} err = c.client.Get(). Resource("clusterroles"). @@ -132,7 +132,7 @@ func (c *clusterRoles) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched clusterRole. -func (c *clusterRoles) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterRole, err error) { +func (c *clusterRoles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterRole, err error) { result = &v1alpha1.ClusterRole{} err = c.client.Patch(pt). Resource("clusterroles"). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/clusterrolebinding.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/clusterrolebinding.go index 3703bafc..ca6999c6 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/clusterrolebinding.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/clusterrolebinding.go @@ -17,12 +17,12 @@ limitations under the License. package v1alpha1 import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" v1alpha1 "k8s.io/kubernetes/pkg/apis/rbac/v1alpha1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // ClusterRoleBindingsGetter has a method to return a ClusterRoleBindingInterface. @@ -37,16 +37,16 @@ type ClusterRoleBindingInterface interface { Update(*v1alpha1.ClusterRoleBinding) (*v1alpha1.ClusterRoleBinding, error) Delete(name string, options *v1.DeleteOptions) error DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options meta_v1.GetOptions) (*v1alpha1.ClusterRoleBinding, error) + Get(name string, options v1.GetOptions) (*v1alpha1.ClusterRoleBinding, error) List(opts v1.ListOptions) (*v1alpha1.ClusterRoleBindingList, error) Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterRoleBinding, err error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterRoleBinding, err error) ClusterRoleBindingExpansion } // clusterRoleBindings implements ClusterRoleBindingInterface type clusterRoleBindings struct { - client restclient.Interface + client rest.Interface } // newClusterRoleBindings returns a ClusterRoleBindings @@ -100,7 +100,7 @@ func (c *clusterRoleBindings) DeleteCollection(options *v1.DeleteOptions, listOp } // Get takes name of the clusterRoleBinding, and returns the corresponding clusterRoleBinding object, and an error if there is any. -func (c *clusterRoleBindings) Get(name string, options meta_v1.GetOptions) (result *v1alpha1.ClusterRoleBinding, err error) { +func (c *clusterRoleBindings) Get(name string, options v1.GetOptions) (result *v1alpha1.ClusterRoleBinding, err error) { result = &v1alpha1.ClusterRoleBinding{} err = c.client.Get(). Resource("clusterrolebindings"). @@ -132,7 +132,7 @@ func (c *clusterRoleBindings) Watch(opts v1.ListOptions) (watch.Interface, error } // Patch applies the patch and returns the patched clusterRoleBinding. -func (c *clusterRoleBindings) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterRoleBinding, err error) { +func (c *clusterRoleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterRoleBinding, err error) { result = &v1alpha1.ClusterRoleBinding{} err = c.client.Patch(pt). Resource("clusterrolebindings"). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/doc.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/doc.go index f7b1fe66..69d4d845 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1] +// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1] // This package has the automatically generated typed clients. package v1alpha1 diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/fake/BUILD b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/fake/BUILD index 2a35f226..b4b3dd96 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/fake/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/fake/BUILD @@ -19,16 +19,15 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", - "//pkg/api/v1:go_default_library", "//pkg/apis/rbac/v1alpha1:go_default_library", "//pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/fake/doc.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/fake/doc.go index ea928c21..c4753e08 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/fake/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/fake/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1] +// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1] // Package fake has the automatically generated clients. package fake diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/fake/fake_clusterrole.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/fake/fake_clusterrole.go index 7efacdde..b73cb1da 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/fake/fake_clusterrole.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/fake/fake_clusterrole.go @@ -17,12 +17,11 @@ limitations under the License. package fake import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" v1alpha1 "k8s.io/kubernetes/pkg/apis/rbac/v1alpha1" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -65,7 +64,7 @@ func (c *FakeClusterRoles) DeleteCollection(options *v1.DeleteOptions, listOptio return err } -func (c *FakeClusterRoles) Get(name string, options meta_v1.GetOptions) (result *v1alpha1.ClusterRole, err error) { +func (c *FakeClusterRoles) Get(name string, options v1.GetOptions) (result *v1alpha1.ClusterRole, err error) { obj, err := c.Fake. Invokes(core.NewRootGetAction(clusterrolesResource, name), &v1alpha1.ClusterRole{}) if obj == nil { @@ -101,7 +100,7 @@ func (c *FakeClusterRoles) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched clusterRole. -func (c *FakeClusterRoles) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterRole, err error) { +func (c *FakeClusterRoles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterRole, err error) { obj, err := c.Fake. Invokes(core.NewRootPatchSubresourceAction(clusterrolesResource, name, data, subresources...), &v1alpha1.ClusterRole{}) if obj == nil { diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/fake/fake_clusterrolebinding.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/fake/fake_clusterrolebinding.go index bb637a3c..3d319a7b 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/fake/fake_clusterrolebinding.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/fake/fake_clusterrolebinding.go @@ -17,12 +17,11 @@ limitations under the License. package fake import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" v1alpha1 "k8s.io/kubernetes/pkg/apis/rbac/v1alpha1" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -65,7 +64,7 @@ func (c *FakeClusterRoleBindings) DeleteCollection(options *v1.DeleteOptions, li return err } -func (c *FakeClusterRoleBindings) Get(name string, options meta_v1.GetOptions) (result *v1alpha1.ClusterRoleBinding, err error) { +func (c *FakeClusterRoleBindings) Get(name string, options v1.GetOptions) (result *v1alpha1.ClusterRoleBinding, err error) { obj, err := c.Fake. Invokes(core.NewRootGetAction(clusterrolebindingsResource, name), &v1alpha1.ClusterRoleBinding{}) if obj == nil { @@ -101,7 +100,7 @@ func (c *FakeClusterRoleBindings) Watch(opts v1.ListOptions) (watch.Interface, e } // Patch applies the patch and returns the patched clusterRoleBinding. -func (c *FakeClusterRoleBindings) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterRoleBinding, err error) { +func (c *FakeClusterRoleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterRoleBinding, err error) { obj, err := c.Fake. Invokes(core.NewRootPatchSubresourceAction(clusterrolebindingsResource, name, data, subresources...), &v1alpha1.ClusterRoleBinding{}) if obj == nil { diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/fake/fake_rbac_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/fake/fake_rbac_client.go index 1b370bfd..5216e04b 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/fake/fake_rbac_client.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/fake/fake_rbac_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" v1alpha1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -44,7 +44,7 @@ func (c *FakeRbacV1alpha1) RoleBindings(namespace string) v1alpha1.RoleBindingIn // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeRbacV1alpha1) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeRbacV1alpha1) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/fake/fake_role.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/fake/fake_role.go index 6aed363d..e20405b1 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/fake/fake_role.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/fake/fake_role.go @@ -17,12 +17,11 @@ limitations under the License. package fake import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" v1alpha1 "k8s.io/kubernetes/pkg/apis/rbac/v1alpha1" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -69,7 +68,7 @@ func (c *FakeRoles) DeleteCollection(options *v1.DeleteOptions, listOptions v1.L return err } -func (c *FakeRoles) Get(name string, options meta_v1.GetOptions) (result *v1alpha1.Role, err error) { +func (c *FakeRoles) Get(name string, options v1.GetOptions) (result *v1alpha1.Role, err error) { obj, err := c.Fake. Invokes(core.NewGetAction(rolesResource, c.ns, name), &v1alpha1.Role{}) @@ -108,7 +107,7 @@ func (c *FakeRoles) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched role. -func (c *FakeRoles) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.Role, err error) { +func (c *FakeRoles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Role, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(rolesResource, c.ns, name, data, subresources...), &v1alpha1.Role{}) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/fake/fake_rolebinding.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/fake/fake_rolebinding.go index d321ba34..3221d9bd 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/fake/fake_rolebinding.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/fake/fake_rolebinding.go @@ -17,12 +17,11 @@ limitations under the License. package fake import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" v1alpha1 "k8s.io/kubernetes/pkg/apis/rbac/v1alpha1" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -69,7 +68,7 @@ func (c *FakeRoleBindings) DeleteCollection(options *v1.DeleteOptions, listOptio return err } -func (c *FakeRoleBindings) Get(name string, options meta_v1.GetOptions) (result *v1alpha1.RoleBinding, err error) { +func (c *FakeRoleBindings) Get(name string, options v1.GetOptions) (result *v1alpha1.RoleBinding, err error) { obj, err := c.Fake. Invokes(core.NewGetAction(rolebindingsResource, c.ns, name), &v1alpha1.RoleBinding{}) @@ -108,7 +107,7 @@ func (c *FakeRoleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched roleBinding. -func (c *FakeRoleBindings) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.RoleBinding, err error) { +func (c *FakeRoleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.RoleBinding, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(rolebindingsResource, c.ns, name, data, subresources...), &v1alpha1.RoleBinding{}) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/rbac_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/rbac_client.go index 52bf74a0..42f077ca 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/rbac_client.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/rbac_client.go @@ -20,12 +20,12 @@ import ( fmt "fmt" schema "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type RbacV1alpha1Interface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface ClusterRolesGetter ClusterRoleBindingsGetter RolesGetter @@ -34,7 +34,7 @@ type RbacV1alpha1Interface interface { // RbacV1alpha1Client is used to interact with features provided by the rbac.authorization.k8s.io group. type RbacV1alpha1Client struct { - restClient restclient.Interface + restClient rest.Interface } func (c *RbacV1alpha1Client) ClusterRoles() ClusterRoleInterface { @@ -54,12 +54,12 @@ func (c *RbacV1alpha1Client) RoleBindings(namespace string) RoleBindingInterface } // NewForConfig creates a new RbacV1alpha1Client for the given config. -func NewForConfig(c *restclient.Config) (*RbacV1alpha1Client, error) { +func NewForConfig(c *rest.Config) (*RbacV1alpha1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -68,7 +68,7 @@ func NewForConfig(c *restclient.Config) (*RbacV1alpha1Client, error) { // NewForConfigOrDie creates a new RbacV1alpha1Client for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *RbacV1alpha1Client { +func NewForConfigOrDie(c *rest.Config) *RbacV1alpha1Client { client, err := NewForConfig(c) if err != nil { panic(err) @@ -77,11 +77,11 @@ func NewForConfigOrDie(c *restclient.Config) *RbacV1alpha1Client { } // New creates a new RbacV1alpha1Client for the given RESTClient. -func New(c restclient.Interface) *RbacV1alpha1Client { +func New(c rest.Interface) *RbacV1alpha1Client { return &RbacV1alpha1Client{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { gv, err := schema.ParseGroupVersion("rbac.authorization.k8s.io/v1alpha1") if err != nil { return err @@ -92,7 +92,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/apis" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } copyGroupVersion := gv config.GroupVersion = ©GroupVersion @@ -104,7 +104,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *RbacV1alpha1Client) RESTClient() restclient.Interface { +func (c *RbacV1alpha1Client) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/role.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/role.go index 53b82203..6df31e33 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/role.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/role.go @@ -17,12 +17,12 @@ limitations under the License. package v1alpha1 import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" v1alpha1 "k8s.io/kubernetes/pkg/apis/rbac/v1alpha1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // RolesGetter has a method to return a RoleInterface. @@ -37,16 +37,16 @@ type RoleInterface interface { Update(*v1alpha1.Role) (*v1alpha1.Role, error) Delete(name string, options *v1.DeleteOptions) error DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options meta_v1.GetOptions) (*v1alpha1.Role, error) + Get(name string, options v1.GetOptions) (*v1alpha1.Role, error) List(opts v1.ListOptions) (*v1alpha1.RoleList, error) Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.Role, err error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Role, err error) RoleExpansion } // roles implements RoleInterface type roles struct { - client restclient.Interface + client rest.Interface ns string } @@ -106,7 +106,7 @@ func (c *roles) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListO } // Get takes name of the role, and returns the corresponding role object, and an error if there is any. -func (c *roles) Get(name string, options meta_v1.GetOptions) (result *v1alpha1.Role, err error) { +func (c *roles) Get(name string, options v1.GetOptions) (result *v1alpha1.Role, err error) { result = &v1alpha1.Role{} err = c.client.Get(). Namespace(c.ns). @@ -141,7 +141,7 @@ func (c *roles) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched role. -func (c *roles) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.Role, err error) { +func (c *roles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Role, err error) { result = &v1alpha1.Role{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/rolebinding.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/rolebinding.go index 274bd187..f41334ab 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/rolebinding.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/rolebinding.go @@ -17,12 +17,12 @@ limitations under the License. package v1alpha1 import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" v1alpha1 "k8s.io/kubernetes/pkg/apis/rbac/v1alpha1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // RoleBindingsGetter has a method to return a RoleBindingInterface. @@ -37,16 +37,16 @@ type RoleBindingInterface interface { Update(*v1alpha1.RoleBinding) (*v1alpha1.RoleBinding, error) Delete(name string, options *v1.DeleteOptions) error DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options meta_v1.GetOptions) (*v1alpha1.RoleBinding, error) + Get(name string, options v1.GetOptions) (*v1alpha1.RoleBinding, error) List(opts v1.ListOptions) (*v1alpha1.RoleBindingList, error) Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.RoleBinding, err error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.RoleBinding, err error) RoleBindingExpansion } // roleBindings implements RoleBindingInterface type roleBindings struct { - client restclient.Interface + client rest.Interface ns string } @@ -106,7 +106,7 @@ func (c *roleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v } // Get takes name of the roleBinding, and returns the corresponding roleBinding object, and an error if there is any. -func (c *roleBindings) Get(name string, options meta_v1.GetOptions) (result *v1alpha1.RoleBinding, err error) { +func (c *roleBindings) Get(name string, options v1.GetOptions) (result *v1alpha1.RoleBinding, err error) { result = &v1alpha1.RoleBinding{} err = c.client.Get(). Namespace(c.ns). @@ -141,7 +141,7 @@ func (c *roleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched roleBinding. -func (c *roleBindings) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.RoleBinding, err error) { +func (c *roleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.RoleBinding, err error) { result = &v1alpha1.RoleBinding{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/BUILD b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/BUILD new file mode 100644 index 00000000..11d1ad18 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/BUILD @@ -0,0 +1,48 @@ +package(default_visibility = ["//visibility:public"]) + +licenses(["notice"]) + +load( + "@io_bazel_rules_go//go:def.bzl", + "go_library", +) + +go_library( + name = "go_default_library", + srcs = [ + "clusterrole.go", + "clusterrolebinding.go", + "doc.go", + "generated_expansion.go", + "rbac_client.go", + "role.go", + "rolebinding.go", + ], + tags = ["automanaged"], + deps = [ + "//pkg/api:go_default_library", + "//pkg/apis/rbac/v1beta1:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/runtime/schema", + "//vendor:k8s.io/apimachinery/pkg/runtime/serializer", + "//vendor:k8s.io/apimachinery/pkg/types", + "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", + ], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [ + ":package-srcs", + "//pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/fake:all-srcs", + ], + tags = ["automanaged"], +) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/clusterrole.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/clusterrole.go new file mode 100644 index 00000000..28392a59 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/clusterrole.go @@ -0,0 +1,145 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" + api "k8s.io/kubernetes/pkg/api" + v1beta1 "k8s.io/kubernetes/pkg/apis/rbac/v1beta1" +) + +// ClusterRolesGetter has a method to return a ClusterRoleInterface. +// A group's client should implement this interface. +type ClusterRolesGetter interface { + ClusterRoles() ClusterRoleInterface +} + +// ClusterRoleInterface has methods to work with ClusterRole resources. +type ClusterRoleInterface interface { + Create(*v1beta1.ClusterRole) (*v1beta1.ClusterRole, error) + Update(*v1beta1.ClusterRole) (*v1beta1.ClusterRole, error) + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Get(name string, options v1.GetOptions) (*v1beta1.ClusterRole, error) + List(opts v1.ListOptions) (*v1beta1.ClusterRoleList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ClusterRole, err error) + ClusterRoleExpansion +} + +// clusterRoles implements ClusterRoleInterface +type clusterRoles struct { + client rest.Interface +} + +// newClusterRoles returns a ClusterRoles +func newClusterRoles(c *RbacV1beta1Client) *clusterRoles { + return &clusterRoles{ + client: c.RESTClient(), + } +} + +// Create takes the representation of a clusterRole and creates it. Returns the server's representation of the clusterRole, and an error, if there is any. +func (c *clusterRoles) Create(clusterRole *v1beta1.ClusterRole) (result *v1beta1.ClusterRole, err error) { + result = &v1beta1.ClusterRole{} + err = c.client.Post(). + Resource("clusterroles"). + Body(clusterRole). + Do(). + Into(result) + return +} + +// Update takes the representation of a clusterRole and updates it. Returns the server's representation of the clusterRole, and an error, if there is any. +func (c *clusterRoles) Update(clusterRole *v1beta1.ClusterRole) (result *v1beta1.ClusterRole, err error) { + result = &v1beta1.ClusterRole{} + err = c.client.Put(). + Resource("clusterroles"). + Name(clusterRole.Name). + Body(clusterRole). + Do(). + Into(result) + return +} + +// Delete takes name of the clusterRole and deletes it. Returns an error if one occurs. +func (c *clusterRoles) Delete(name string, options *v1.DeleteOptions) error { + return c.client.Delete(). + Resource("clusterroles"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *clusterRoles) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + return c.client.Delete(). + Resource("clusterroles"). + VersionedParams(&listOptions, api.ParameterCodec). + Body(options). + Do(). + Error() +} + +// Get takes name of the clusterRole, and returns the corresponding clusterRole object, and an error if there is any. +func (c *clusterRoles) Get(name string, options v1.GetOptions) (result *v1beta1.ClusterRole, err error) { + result = &v1beta1.ClusterRole{} + err = c.client.Get(). + Resource("clusterroles"). + Name(name). + VersionedParams(&options, api.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of ClusterRoles that match those selectors. +func (c *clusterRoles) List(opts v1.ListOptions) (result *v1beta1.ClusterRoleList, err error) { + result = &v1beta1.ClusterRoleList{} + err = c.client.Get(). + Resource("clusterroles"). + VersionedParams(&opts, api.ParameterCodec). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested clusterRoles. +func (c *clusterRoles) Watch(opts v1.ListOptions) (watch.Interface, error) { + return c.client.Get(). + Prefix("watch"). + Resource("clusterroles"). + VersionedParams(&opts, api.ParameterCodec). + Watch() +} + +// Patch applies the patch and returns the patched clusterRole. +func (c *clusterRoles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ClusterRole, err error) { + result = &v1beta1.ClusterRole{} + err = c.client.Patch(pt). + Resource("clusterroles"). + SubResource(subresources...). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/clusterrolebinding.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/clusterrolebinding.go new file mode 100644 index 00000000..a714003b --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/clusterrolebinding.go @@ -0,0 +1,145 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" + api "k8s.io/kubernetes/pkg/api" + v1beta1 "k8s.io/kubernetes/pkg/apis/rbac/v1beta1" +) + +// ClusterRoleBindingsGetter has a method to return a ClusterRoleBindingInterface. +// A group's client should implement this interface. +type ClusterRoleBindingsGetter interface { + ClusterRoleBindings() ClusterRoleBindingInterface +} + +// ClusterRoleBindingInterface has methods to work with ClusterRoleBinding resources. +type ClusterRoleBindingInterface interface { + Create(*v1beta1.ClusterRoleBinding) (*v1beta1.ClusterRoleBinding, error) + Update(*v1beta1.ClusterRoleBinding) (*v1beta1.ClusterRoleBinding, error) + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Get(name string, options v1.GetOptions) (*v1beta1.ClusterRoleBinding, error) + List(opts v1.ListOptions) (*v1beta1.ClusterRoleBindingList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ClusterRoleBinding, err error) + ClusterRoleBindingExpansion +} + +// clusterRoleBindings implements ClusterRoleBindingInterface +type clusterRoleBindings struct { + client rest.Interface +} + +// newClusterRoleBindings returns a ClusterRoleBindings +func newClusterRoleBindings(c *RbacV1beta1Client) *clusterRoleBindings { + return &clusterRoleBindings{ + client: c.RESTClient(), + } +} + +// Create takes the representation of a clusterRoleBinding and creates it. Returns the server's representation of the clusterRoleBinding, and an error, if there is any. +func (c *clusterRoleBindings) Create(clusterRoleBinding *v1beta1.ClusterRoleBinding) (result *v1beta1.ClusterRoleBinding, err error) { + result = &v1beta1.ClusterRoleBinding{} + err = c.client.Post(). + Resource("clusterrolebindings"). + Body(clusterRoleBinding). + Do(). + Into(result) + return +} + +// Update takes the representation of a clusterRoleBinding and updates it. Returns the server's representation of the clusterRoleBinding, and an error, if there is any. +func (c *clusterRoleBindings) Update(clusterRoleBinding *v1beta1.ClusterRoleBinding) (result *v1beta1.ClusterRoleBinding, err error) { + result = &v1beta1.ClusterRoleBinding{} + err = c.client.Put(). + Resource("clusterrolebindings"). + Name(clusterRoleBinding.Name). + Body(clusterRoleBinding). + Do(). + Into(result) + return +} + +// Delete takes name of the clusterRoleBinding and deletes it. Returns an error if one occurs. +func (c *clusterRoleBindings) Delete(name string, options *v1.DeleteOptions) error { + return c.client.Delete(). + Resource("clusterrolebindings"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *clusterRoleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + return c.client.Delete(). + Resource("clusterrolebindings"). + VersionedParams(&listOptions, api.ParameterCodec). + Body(options). + Do(). + Error() +} + +// Get takes name of the clusterRoleBinding, and returns the corresponding clusterRoleBinding object, and an error if there is any. +func (c *clusterRoleBindings) Get(name string, options v1.GetOptions) (result *v1beta1.ClusterRoleBinding, err error) { + result = &v1beta1.ClusterRoleBinding{} + err = c.client.Get(). + Resource("clusterrolebindings"). + Name(name). + VersionedParams(&options, api.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of ClusterRoleBindings that match those selectors. +func (c *clusterRoleBindings) List(opts v1.ListOptions) (result *v1beta1.ClusterRoleBindingList, err error) { + result = &v1beta1.ClusterRoleBindingList{} + err = c.client.Get(). + Resource("clusterrolebindings"). + VersionedParams(&opts, api.ParameterCodec). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested clusterRoleBindings. +func (c *clusterRoleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { + return c.client.Get(). + Prefix("watch"). + Resource("clusterrolebindings"). + VersionedParams(&opts, api.ParameterCodec). + Watch() +} + +// Patch applies the patch and returns the patched clusterRoleBinding. +func (c *clusterRoleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ClusterRoleBinding, err error) { + result = &v1beta1.ClusterRoleBinding{} + err = c.client.Patch(pt). + Resource("clusterrolebindings"). + SubResource(subresources...). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1alpha1/doc.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/doc.go similarity index 87% rename from vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1alpha1/doc.go rename to vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/doc.go index f7b1fe66..0e58290b 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1alpha1/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1] +// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1] // This package has the automatically generated typed clients. -package v1alpha1 +package v1beta1 diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/fake/BUILD b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/fake/BUILD new file mode 100644 index 00000000..578f2389 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/fake/BUILD @@ -0,0 +1,45 @@ +package(default_visibility = ["//visibility:public"]) + +licenses(["notice"]) + +load( + "@io_bazel_rules_go//go:def.bzl", + "go_library", +) + +go_library( + name = "go_default_library", + srcs = [ + "doc.go", + "fake_clusterrole.go", + "fake_clusterrolebinding.go", + "fake_rbac_client.go", + "fake_role.go", + "fake_rolebinding.go", + ], + tags = ["automanaged"], + deps = [ + "//pkg/apis/rbac/v1beta1:go_default_library", + "//pkg/client/clientset_generated/clientset/typed/rbac/v1beta1:go_default_library", + "//pkg/client/testing/core:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/labels", + "//vendor:k8s.io/apimachinery/pkg/runtime/schema", + "//vendor:k8s.io/apimachinery/pkg/types", + "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", + ], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], +) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1alpha1/fake/doc.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/fake/doc.go similarity index 88% rename from vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1alpha1/fake/doc.go rename to vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/fake/doc.go index ea928c21..c4753e08 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1alpha1/fake/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/fake/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1] +// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1] // Package fake has the automatically generated clients. package fake diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/fake/fake_clusterrole.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/fake/fake_clusterrole.go new file mode 100644 index 00000000..b2e2e4e4 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/fake/fake_clusterrole.go @@ -0,0 +1,110 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package fake + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + v1beta1 "k8s.io/kubernetes/pkg/apis/rbac/v1beta1" + core "k8s.io/kubernetes/pkg/client/testing/core" +) + +// FakeClusterRoles implements ClusterRoleInterface +type FakeClusterRoles struct { + Fake *FakeRbacV1beta1 +} + +var clusterrolesResource = schema.GroupVersionResource{Group: "rbac.authorization.k8s.io", Version: "v1beta1", Resource: "clusterroles"} + +func (c *FakeClusterRoles) Create(clusterRole *v1beta1.ClusterRole) (result *v1beta1.ClusterRole, err error) { + obj, err := c.Fake. + Invokes(core.NewRootCreateAction(clusterrolesResource, clusterRole), &v1beta1.ClusterRole{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.ClusterRole), err +} + +func (c *FakeClusterRoles) Update(clusterRole *v1beta1.ClusterRole) (result *v1beta1.ClusterRole, err error) { + obj, err := c.Fake. + Invokes(core.NewRootUpdateAction(clusterrolesResource, clusterRole), &v1beta1.ClusterRole{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.ClusterRole), err +} + +func (c *FakeClusterRoles) Delete(name string, options *v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(core.NewRootDeleteAction(clusterrolesResource, name), &v1beta1.ClusterRole{}) + return err +} + +func (c *FakeClusterRoles) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + action := core.NewRootDeleteCollectionAction(clusterrolesResource, listOptions) + + _, err := c.Fake.Invokes(action, &v1beta1.ClusterRoleList{}) + return err +} + +func (c *FakeClusterRoles) Get(name string, options v1.GetOptions) (result *v1beta1.ClusterRole, err error) { + obj, err := c.Fake. + Invokes(core.NewRootGetAction(clusterrolesResource, name), &v1beta1.ClusterRole{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.ClusterRole), err +} + +func (c *FakeClusterRoles) List(opts v1.ListOptions) (result *v1beta1.ClusterRoleList, err error) { + obj, err := c.Fake. + Invokes(core.NewRootListAction(clusterrolesResource, opts), &v1beta1.ClusterRoleList{}) + if obj == nil { + return nil, err + } + + label, _, _ := core.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.ClusterRoleList{} + for _, item := range obj.(*v1beta1.ClusterRoleList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested clusterRoles. +func (c *FakeClusterRoles) Watch(opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(core.NewRootWatchAction(clusterrolesResource, opts)) +} + +// Patch applies the patch and returns the patched clusterRole. +func (c *FakeClusterRoles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ClusterRole, err error) { + obj, err := c.Fake. + Invokes(core.NewRootPatchSubresourceAction(clusterrolesResource, name, data, subresources...), &v1beta1.ClusterRole{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.ClusterRole), err +} diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/fake/fake_clusterrolebinding.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/fake/fake_clusterrolebinding.go new file mode 100644 index 00000000..1c78500a --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/fake/fake_clusterrolebinding.go @@ -0,0 +1,110 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package fake + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + v1beta1 "k8s.io/kubernetes/pkg/apis/rbac/v1beta1" + core "k8s.io/kubernetes/pkg/client/testing/core" +) + +// FakeClusterRoleBindings implements ClusterRoleBindingInterface +type FakeClusterRoleBindings struct { + Fake *FakeRbacV1beta1 +} + +var clusterrolebindingsResource = schema.GroupVersionResource{Group: "rbac.authorization.k8s.io", Version: "v1beta1", Resource: "clusterrolebindings"} + +func (c *FakeClusterRoleBindings) Create(clusterRoleBinding *v1beta1.ClusterRoleBinding) (result *v1beta1.ClusterRoleBinding, err error) { + obj, err := c.Fake. + Invokes(core.NewRootCreateAction(clusterrolebindingsResource, clusterRoleBinding), &v1beta1.ClusterRoleBinding{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.ClusterRoleBinding), err +} + +func (c *FakeClusterRoleBindings) Update(clusterRoleBinding *v1beta1.ClusterRoleBinding) (result *v1beta1.ClusterRoleBinding, err error) { + obj, err := c.Fake. + Invokes(core.NewRootUpdateAction(clusterrolebindingsResource, clusterRoleBinding), &v1beta1.ClusterRoleBinding{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.ClusterRoleBinding), err +} + +func (c *FakeClusterRoleBindings) Delete(name string, options *v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(core.NewRootDeleteAction(clusterrolebindingsResource, name), &v1beta1.ClusterRoleBinding{}) + return err +} + +func (c *FakeClusterRoleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + action := core.NewRootDeleteCollectionAction(clusterrolebindingsResource, listOptions) + + _, err := c.Fake.Invokes(action, &v1beta1.ClusterRoleBindingList{}) + return err +} + +func (c *FakeClusterRoleBindings) Get(name string, options v1.GetOptions) (result *v1beta1.ClusterRoleBinding, err error) { + obj, err := c.Fake. + Invokes(core.NewRootGetAction(clusterrolebindingsResource, name), &v1beta1.ClusterRoleBinding{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.ClusterRoleBinding), err +} + +func (c *FakeClusterRoleBindings) List(opts v1.ListOptions) (result *v1beta1.ClusterRoleBindingList, err error) { + obj, err := c.Fake. + Invokes(core.NewRootListAction(clusterrolebindingsResource, opts), &v1beta1.ClusterRoleBindingList{}) + if obj == nil { + return nil, err + } + + label, _, _ := core.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.ClusterRoleBindingList{} + for _, item := range obj.(*v1beta1.ClusterRoleBindingList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested clusterRoleBindings. +func (c *FakeClusterRoleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(core.NewRootWatchAction(clusterrolebindingsResource, opts)) +} + +// Patch applies the patch and returns the patched clusterRoleBinding. +func (c *FakeClusterRoleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ClusterRoleBinding, err error) { + obj, err := c.Fake. + Invokes(core.NewRootPatchSubresourceAction(clusterrolebindingsResource, name, data, subresources...), &v1beta1.ClusterRoleBinding{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.ClusterRoleBinding), err +} diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/fake/fake_rbac_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/fake/fake_rbac_client.go new file mode 100644 index 00000000..2ce1900f --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/fake/fake_rbac_client.go @@ -0,0 +1,50 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package fake + +import ( + rest "k8s.io/client-go/rest" + v1beta1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1" + core "k8s.io/kubernetes/pkg/client/testing/core" +) + +type FakeRbacV1beta1 struct { + *core.Fake +} + +func (c *FakeRbacV1beta1) ClusterRoles() v1beta1.ClusterRoleInterface { + return &FakeClusterRoles{c} +} + +func (c *FakeRbacV1beta1) ClusterRoleBindings() v1beta1.ClusterRoleBindingInterface { + return &FakeClusterRoleBindings{c} +} + +func (c *FakeRbacV1beta1) Roles(namespace string) v1beta1.RoleInterface { + return &FakeRoles{c, namespace} +} + +func (c *FakeRbacV1beta1) RoleBindings(namespace string) v1beta1.RoleBindingInterface { + return &FakeRoleBindings{c, namespace} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeRbacV1beta1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/fake/fake_role.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/fake/fake_role.go new file mode 100644 index 00000000..12edda0b --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/fake/fake_role.go @@ -0,0 +1,118 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package fake + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + v1beta1 "k8s.io/kubernetes/pkg/apis/rbac/v1beta1" + core "k8s.io/kubernetes/pkg/client/testing/core" +) + +// FakeRoles implements RoleInterface +type FakeRoles struct { + Fake *FakeRbacV1beta1 + ns string +} + +var rolesResource = schema.GroupVersionResource{Group: "rbac.authorization.k8s.io", Version: "v1beta1", Resource: "roles"} + +func (c *FakeRoles) Create(role *v1beta1.Role) (result *v1beta1.Role, err error) { + obj, err := c.Fake. + Invokes(core.NewCreateAction(rolesResource, c.ns, role), &v1beta1.Role{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Role), err +} + +func (c *FakeRoles) Update(role *v1beta1.Role) (result *v1beta1.Role, err error) { + obj, err := c.Fake. + Invokes(core.NewUpdateAction(rolesResource, c.ns, role), &v1beta1.Role{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Role), err +} + +func (c *FakeRoles) Delete(name string, options *v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(core.NewDeleteAction(rolesResource, c.ns, name), &v1beta1.Role{}) + + return err +} + +func (c *FakeRoles) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + action := core.NewDeleteCollectionAction(rolesResource, c.ns, listOptions) + + _, err := c.Fake.Invokes(action, &v1beta1.RoleList{}) + return err +} + +func (c *FakeRoles) Get(name string, options v1.GetOptions) (result *v1beta1.Role, err error) { + obj, err := c.Fake. + Invokes(core.NewGetAction(rolesResource, c.ns, name), &v1beta1.Role{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Role), err +} + +func (c *FakeRoles) List(opts v1.ListOptions) (result *v1beta1.RoleList, err error) { + obj, err := c.Fake. + Invokes(core.NewListAction(rolesResource, c.ns, opts), &v1beta1.RoleList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := core.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.RoleList{} + for _, item := range obj.(*v1beta1.RoleList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested roles. +func (c *FakeRoles) Watch(opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(core.NewWatchAction(rolesResource, c.ns, opts)) + +} + +// Patch applies the patch and returns the patched role. +func (c *FakeRoles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Role, err error) { + obj, err := c.Fake. + Invokes(core.NewPatchSubresourceAction(rolesResource, c.ns, name, data, subresources...), &v1beta1.Role{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Role), err +} diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/fake/fake_rolebinding.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/fake/fake_rolebinding.go new file mode 100644 index 00000000..1d1b0a37 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/fake/fake_rolebinding.go @@ -0,0 +1,118 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package fake + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + v1beta1 "k8s.io/kubernetes/pkg/apis/rbac/v1beta1" + core "k8s.io/kubernetes/pkg/client/testing/core" +) + +// FakeRoleBindings implements RoleBindingInterface +type FakeRoleBindings struct { + Fake *FakeRbacV1beta1 + ns string +} + +var rolebindingsResource = schema.GroupVersionResource{Group: "rbac.authorization.k8s.io", Version: "v1beta1", Resource: "rolebindings"} + +func (c *FakeRoleBindings) Create(roleBinding *v1beta1.RoleBinding) (result *v1beta1.RoleBinding, err error) { + obj, err := c.Fake. + Invokes(core.NewCreateAction(rolebindingsResource, c.ns, roleBinding), &v1beta1.RoleBinding{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.RoleBinding), err +} + +func (c *FakeRoleBindings) Update(roleBinding *v1beta1.RoleBinding) (result *v1beta1.RoleBinding, err error) { + obj, err := c.Fake. + Invokes(core.NewUpdateAction(rolebindingsResource, c.ns, roleBinding), &v1beta1.RoleBinding{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.RoleBinding), err +} + +func (c *FakeRoleBindings) Delete(name string, options *v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(core.NewDeleteAction(rolebindingsResource, c.ns, name), &v1beta1.RoleBinding{}) + + return err +} + +func (c *FakeRoleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + action := core.NewDeleteCollectionAction(rolebindingsResource, c.ns, listOptions) + + _, err := c.Fake.Invokes(action, &v1beta1.RoleBindingList{}) + return err +} + +func (c *FakeRoleBindings) Get(name string, options v1.GetOptions) (result *v1beta1.RoleBinding, err error) { + obj, err := c.Fake. + Invokes(core.NewGetAction(rolebindingsResource, c.ns, name), &v1beta1.RoleBinding{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.RoleBinding), err +} + +func (c *FakeRoleBindings) List(opts v1.ListOptions) (result *v1beta1.RoleBindingList, err error) { + obj, err := c.Fake. + Invokes(core.NewListAction(rolebindingsResource, c.ns, opts), &v1beta1.RoleBindingList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := core.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.RoleBindingList{} + for _, item := range obj.(*v1beta1.RoleBindingList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested roleBindings. +func (c *FakeRoleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(core.NewWatchAction(rolebindingsResource, c.ns, opts)) + +} + +// Patch applies the patch and returns the patched roleBinding. +func (c *FakeRoleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.RoleBinding, err error) { + obj, err := c.Fake. + Invokes(core.NewPatchSubresourceAction(rolebindingsResource, c.ns, name, data, subresources...), &v1beta1.RoleBinding{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.RoleBinding), err +} diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/generated_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/generated_expansion.go new file mode 100644 index 00000000..d7f80c00 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/generated_expansion.go @@ -0,0 +1,25 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +type ClusterRoleExpansion interface{} + +type ClusterRoleBindingExpansion interface{} + +type RoleExpansion interface{} + +type RoleBindingExpansion interface{} diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/rbac_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/rbac_client.go new file mode 100644 index 00000000..dbce6708 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/rbac_client.go @@ -0,0 +1,112 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + fmt "fmt" + schema "k8s.io/apimachinery/pkg/runtime/schema" + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + rest "k8s.io/client-go/rest" + api "k8s.io/kubernetes/pkg/api" +) + +type RbacV1beta1Interface interface { + RESTClient() rest.Interface + ClusterRolesGetter + ClusterRoleBindingsGetter + RolesGetter + RoleBindingsGetter +} + +// RbacV1beta1Client is used to interact with features provided by the rbac.authorization.k8s.io group. +type RbacV1beta1Client struct { + restClient rest.Interface +} + +func (c *RbacV1beta1Client) ClusterRoles() ClusterRoleInterface { + return newClusterRoles(c) +} + +func (c *RbacV1beta1Client) ClusterRoleBindings() ClusterRoleBindingInterface { + return newClusterRoleBindings(c) +} + +func (c *RbacV1beta1Client) Roles(namespace string) RoleInterface { + return newRoles(c, namespace) +} + +func (c *RbacV1beta1Client) RoleBindings(namespace string) RoleBindingInterface { + return newRoleBindings(c, namespace) +} + +// NewForConfig creates a new RbacV1beta1Client for the given config. +func NewForConfig(c *rest.Config) (*RbacV1beta1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &RbacV1beta1Client{client}, nil +} + +// NewForConfigOrDie creates a new RbacV1beta1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *RbacV1beta1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new RbacV1beta1Client for the given RESTClient. +func New(c rest.Interface) *RbacV1beta1Client { + return &RbacV1beta1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv, err := schema.ParseGroupVersion("rbac.authorization.k8s.io/v1beta1") + if err != nil { + return err + } + // if rbac.authorization.k8s.io/v1beta1 is not enabled, return an error + if !api.Registry.IsEnabledVersion(gv) { + return fmt.Errorf("rbac.authorization.k8s.io/v1beta1 is not enabled") + } + config.APIPath = "/apis" + if config.UserAgent == "" { + config.UserAgent = rest.DefaultKubernetesUserAgent() + } + copyGroupVersion := gv + config.GroupVersion = ©GroupVersion + + config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: api.Codecs} + + return nil +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *RbacV1beta1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/role.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/role.go new file mode 100644 index 00000000..2967976c --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/role.go @@ -0,0 +1,155 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" + api "k8s.io/kubernetes/pkg/api" + v1beta1 "k8s.io/kubernetes/pkg/apis/rbac/v1beta1" +) + +// RolesGetter has a method to return a RoleInterface. +// A group's client should implement this interface. +type RolesGetter interface { + Roles(namespace string) RoleInterface +} + +// RoleInterface has methods to work with Role resources. +type RoleInterface interface { + Create(*v1beta1.Role) (*v1beta1.Role, error) + Update(*v1beta1.Role) (*v1beta1.Role, error) + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Get(name string, options v1.GetOptions) (*v1beta1.Role, error) + List(opts v1.ListOptions) (*v1beta1.RoleList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Role, err error) + RoleExpansion +} + +// roles implements RoleInterface +type roles struct { + client rest.Interface + ns string +} + +// newRoles returns a Roles +func newRoles(c *RbacV1beta1Client, namespace string) *roles { + return &roles{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Create takes the representation of a role and creates it. Returns the server's representation of the role, and an error, if there is any. +func (c *roles) Create(role *v1beta1.Role) (result *v1beta1.Role, err error) { + result = &v1beta1.Role{} + err = c.client.Post(). + Namespace(c.ns). + Resource("roles"). + Body(role). + Do(). + Into(result) + return +} + +// Update takes the representation of a role and updates it. Returns the server's representation of the role, and an error, if there is any. +func (c *roles) Update(role *v1beta1.Role) (result *v1beta1.Role, err error) { + result = &v1beta1.Role{} + err = c.client.Put(). + Namespace(c.ns). + Resource("roles"). + Name(role.Name). + Body(role). + Do(). + Into(result) + return +} + +// Delete takes name of the role and deletes it. Returns an error if one occurs. +func (c *roles) Delete(name string, options *v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("roles"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *roles) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("roles"). + VersionedParams(&listOptions, api.ParameterCodec). + Body(options). + Do(). + Error() +} + +// Get takes name of the role, and returns the corresponding role object, and an error if there is any. +func (c *roles) Get(name string, options v1.GetOptions) (result *v1beta1.Role, err error) { + result = &v1beta1.Role{} + err = c.client.Get(). + Namespace(c.ns). + Resource("roles"). + Name(name). + VersionedParams(&options, api.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of Roles that match those selectors. +func (c *roles) List(opts v1.ListOptions) (result *v1beta1.RoleList, err error) { + result = &v1beta1.RoleList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("roles"). + VersionedParams(&opts, api.ParameterCodec). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested roles. +func (c *roles) Watch(opts v1.ListOptions) (watch.Interface, error) { + return c.client.Get(). + Prefix("watch"). + Namespace(c.ns). + Resource("roles"). + VersionedParams(&opts, api.ParameterCodec). + Watch() +} + +// Patch applies the patch and returns the patched role. +func (c *roles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Role, err error) { + result = &v1beta1.Role{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("roles"). + SubResource(subresources...). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/rolebinding.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/rolebinding.go new file mode 100644 index 00000000..719e4e67 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/rolebinding.go @@ -0,0 +1,155 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" + api "k8s.io/kubernetes/pkg/api" + v1beta1 "k8s.io/kubernetes/pkg/apis/rbac/v1beta1" +) + +// RoleBindingsGetter has a method to return a RoleBindingInterface. +// A group's client should implement this interface. +type RoleBindingsGetter interface { + RoleBindings(namespace string) RoleBindingInterface +} + +// RoleBindingInterface has methods to work with RoleBinding resources. +type RoleBindingInterface interface { + Create(*v1beta1.RoleBinding) (*v1beta1.RoleBinding, error) + Update(*v1beta1.RoleBinding) (*v1beta1.RoleBinding, error) + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Get(name string, options v1.GetOptions) (*v1beta1.RoleBinding, error) + List(opts v1.ListOptions) (*v1beta1.RoleBindingList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.RoleBinding, err error) + RoleBindingExpansion +} + +// roleBindings implements RoleBindingInterface +type roleBindings struct { + client rest.Interface + ns string +} + +// newRoleBindings returns a RoleBindings +func newRoleBindings(c *RbacV1beta1Client, namespace string) *roleBindings { + return &roleBindings{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Create takes the representation of a roleBinding and creates it. Returns the server's representation of the roleBinding, and an error, if there is any. +func (c *roleBindings) Create(roleBinding *v1beta1.RoleBinding) (result *v1beta1.RoleBinding, err error) { + result = &v1beta1.RoleBinding{} + err = c.client.Post(). + Namespace(c.ns). + Resource("rolebindings"). + Body(roleBinding). + Do(). + Into(result) + return +} + +// Update takes the representation of a roleBinding and updates it. Returns the server's representation of the roleBinding, and an error, if there is any. +func (c *roleBindings) Update(roleBinding *v1beta1.RoleBinding) (result *v1beta1.RoleBinding, err error) { + result = &v1beta1.RoleBinding{} + err = c.client.Put(). + Namespace(c.ns). + Resource("rolebindings"). + Name(roleBinding.Name). + Body(roleBinding). + Do(). + Into(result) + return +} + +// Delete takes name of the roleBinding and deletes it. Returns an error if one occurs. +func (c *roleBindings) Delete(name string, options *v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("rolebindings"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *roleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("rolebindings"). + VersionedParams(&listOptions, api.ParameterCodec). + Body(options). + Do(). + Error() +} + +// Get takes name of the roleBinding, and returns the corresponding roleBinding object, and an error if there is any. +func (c *roleBindings) Get(name string, options v1.GetOptions) (result *v1beta1.RoleBinding, err error) { + result = &v1beta1.RoleBinding{} + err = c.client.Get(). + Namespace(c.ns). + Resource("rolebindings"). + Name(name). + VersionedParams(&options, api.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of RoleBindings that match those selectors. +func (c *roleBindings) List(opts v1.ListOptions) (result *v1beta1.RoleBindingList, err error) { + result = &v1beta1.RoleBindingList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("rolebindings"). + VersionedParams(&opts, api.ParameterCodec). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested roleBindings. +func (c *roleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { + return c.client.Get(). + Prefix("watch"). + Namespace(c.ns). + Resource("rolebindings"). + VersionedParams(&opts, api.ParameterCodec). + Watch() +} + +// Patch applies the patch and returns the patched roleBinding. +func (c *roleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.RoleBinding, err error) { + result = &v1beta1.RoleBinding{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("rolebindings"). + SubResource(subresources...). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/BUILD b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/BUILD index daea28ed..bb394e92 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/BUILD @@ -18,13 +18,13 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/api:go_default_library", - "//pkg/api/v1:go_default_library", "//pkg/apis/storage/v1beta1:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/runtime/serializer", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/doc.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/doc.go index e596bf01..0e58290b 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1] +// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1] // This package has the automatically generated typed clients. package v1beta1 diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/fake/BUILD b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/fake/BUILD index a0f2d920..7b95a59b 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/fake/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/fake/BUILD @@ -16,16 +16,15 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", - "//pkg/api/v1:go_default_library", "//pkg/apis/storage/v1beta1:go_default_library", "//pkg/client/clientset_generated/clientset/typed/storage/v1beta1:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/fake/doc.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/fake/doc.go index ea928c21..c4753e08 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/fake/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/fake/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1] +// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1] // Package fake has the automatically generated clients. package fake diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/fake/fake_storage_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/fake/fake_storage_client.go index 83394b20..ac585806 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/fake/fake_storage_client.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/fake/fake_storage_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" v1beta1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1beta1" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -32,7 +32,7 @@ func (c *FakeStorageV1beta1) StorageClasses() v1beta1.StorageClassInterface { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeStorageV1beta1) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeStorageV1beta1) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/fake/fake_storageclass.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/fake/fake_storageclass.go index ac200a59..881e5272 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/fake/fake_storageclass.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/fake/fake_storageclass.go @@ -17,12 +17,11 @@ limitations under the License. package fake import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" v1beta1 "k8s.io/kubernetes/pkg/apis/storage/v1beta1" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -65,7 +64,7 @@ func (c *FakeStorageClasses) DeleteCollection(options *v1.DeleteOptions, listOpt return err } -func (c *FakeStorageClasses) Get(name string, options meta_v1.GetOptions) (result *v1beta1.StorageClass, err error) { +func (c *FakeStorageClasses) Get(name string, options v1.GetOptions) (result *v1beta1.StorageClass, err error) { obj, err := c.Fake. Invokes(core.NewRootGetAction(storageclassesResource, name), &v1beta1.StorageClass{}) if obj == nil { @@ -101,7 +100,7 @@ func (c *FakeStorageClasses) Watch(opts v1.ListOptions) (watch.Interface, error) } // Patch applies the patch and returns the patched storageClass. -func (c *FakeStorageClasses) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.StorageClass, err error) { +func (c *FakeStorageClasses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.StorageClass, err error) { obj, err := c.Fake. Invokes(core.NewRootPatchSubresourceAction(storageclassesResource, name, data, subresources...), &v1beta1.StorageClass{}) if obj == nil { diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/storage_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/storage_client.go index 142c14a9..fa29839b 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/storage_client.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/storage_client.go @@ -20,18 +20,18 @@ import ( fmt "fmt" schema "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type StorageV1beta1Interface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface StorageClassesGetter } // StorageV1beta1Client is used to interact with features provided by the storage.k8s.io group. type StorageV1beta1Client struct { - restClient restclient.Interface + restClient rest.Interface } func (c *StorageV1beta1Client) StorageClasses() StorageClassInterface { @@ -39,12 +39,12 @@ func (c *StorageV1beta1Client) StorageClasses() StorageClassInterface { } // NewForConfig creates a new StorageV1beta1Client for the given config. -func NewForConfig(c *restclient.Config) (*StorageV1beta1Client, error) { +func NewForConfig(c *rest.Config) (*StorageV1beta1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -53,7 +53,7 @@ func NewForConfig(c *restclient.Config) (*StorageV1beta1Client, error) { // NewForConfigOrDie creates a new StorageV1beta1Client for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *StorageV1beta1Client { +func NewForConfigOrDie(c *rest.Config) *StorageV1beta1Client { client, err := NewForConfig(c) if err != nil { panic(err) @@ -62,11 +62,11 @@ func NewForConfigOrDie(c *restclient.Config) *StorageV1beta1Client { } // New creates a new StorageV1beta1Client for the given RESTClient. -func New(c restclient.Interface) *StorageV1beta1Client { +func New(c rest.Interface) *StorageV1beta1Client { return &StorageV1beta1Client{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { gv, err := schema.ParseGroupVersion("storage.k8s.io/v1beta1") if err != nil { return err @@ -77,7 +77,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/apis" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } copyGroupVersion := gv config.GroupVersion = ©GroupVersion @@ -89,7 +89,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *StorageV1beta1Client) RESTClient() restclient.Interface { +func (c *StorageV1beta1Client) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/storageclass.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/storageclass.go index 964a73d1..12da7597 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/storageclass.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/storageclass.go @@ -17,12 +17,12 @@ limitations under the License. package v1beta1 import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" v1beta1 "k8s.io/kubernetes/pkg/apis/storage/v1beta1" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // StorageClassesGetter has a method to return a StorageClassInterface. @@ -37,16 +37,16 @@ type StorageClassInterface interface { Update(*v1beta1.StorageClass) (*v1beta1.StorageClass, error) Delete(name string, options *v1.DeleteOptions) error DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options meta_v1.GetOptions) (*v1beta1.StorageClass, error) + Get(name string, options v1.GetOptions) (*v1beta1.StorageClass, error) List(opts v1.ListOptions) (*v1beta1.StorageClassList, error) Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.StorageClass, err error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.StorageClass, err error) StorageClassExpansion } // storageClasses implements StorageClassInterface type storageClasses struct { - client restclient.Interface + client rest.Interface } // newStorageClasses returns a StorageClasses @@ -100,7 +100,7 @@ func (c *storageClasses) DeleteCollection(options *v1.DeleteOptions, listOptions } // Get takes name of the storageClass, and returns the corresponding storageClass object, and an error if there is any. -func (c *storageClasses) Get(name string, options meta_v1.GetOptions) (result *v1beta1.StorageClass, err error) { +func (c *storageClasses) Get(name string, options v1.GetOptions) (result *v1beta1.StorageClass, err error) { result = &v1beta1.StorageClass{} err = c.client.Get(). Resource("storageclasses"). @@ -132,7 +132,7 @@ func (c *storageClasses) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched storageClass. -func (c *storageClasses) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.StorageClass, err error) { +func (c *storageClasses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.StorageClass, err error) { result = &v1beta1.StorageClass{} err = c.client.Patch(pt). Resource("storageclasses"). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/BUILD b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/BUILD index e6f83b05..d45072e5 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/BUILD @@ -40,11 +40,11 @@ go_library( "//pkg/client/clientset_generated/internalclientset/typed/policy/internalversion:go_default_library", "//pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion:go_default_library", "//pkg/client/clientset_generated/internalclientset/typed/storage/internalversion:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/typed/discovery:go_default_library", - "//pkg/util/flowcontrol:go_default_library", - "//plugin/pkg/client/auth:go_default_library", "//vendor:github.com/golang/glog", + "//vendor:k8s.io/client-go/plugin/pkg/client/auth", + "//vendor:k8s.io/client-go/rest", + "//vendor:k8s.io/client-go/util/flowcontrol", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/clientset.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/clientset.go index 985eb1f0..fea7aed7 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/clientset.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/clientset.go @@ -18,6 +18,9 @@ package internalclientset import ( "github.com/golang/glog" + _ "k8s.io/client-go/plugin/pkg/client/auth" + rest "k8s.io/client-go/rest" + "k8s.io/client-go/util/flowcontrol" internalversionapps "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion" internalversionauthentication "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion" internalversionauthorization "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion" @@ -29,10 +32,7 @@ import ( internalversionpolicy "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion" internalversionrbac "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion" internalversionstorage "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion" - restclient "k8s.io/kubernetes/pkg/client/restclient" discovery "k8s.io/kubernetes/pkg/client/typed/discovery" - "k8s.io/kubernetes/pkg/util/flowcontrol" - _ "k8s.io/kubernetes/plugin/pkg/client/auth" ) type Interface interface { @@ -174,7 +174,7 @@ func (c *Clientset) Discovery() discovery.DiscoveryInterface { } // NewForConfig creates a new Clientset for the given config. -func NewForConfig(c *restclient.Config) (*Clientset, error) { +func NewForConfig(c *rest.Config) (*Clientset, error) { configShallowCopy := *c if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) @@ -236,7 +236,7 @@ func NewForConfig(c *restclient.Config) (*Clientset, error) { // NewForConfigOrDie creates a new Clientset for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *Clientset { +func NewForConfigOrDie(c *rest.Config) *Clientset { var cs Clientset cs.CoreClient = internalversioncore.NewForConfigOrDie(c) cs.AppsClient = internalversionapps.NewForConfigOrDie(c) @@ -255,7 +255,7 @@ func NewForConfigOrDie(c *restclient.Config) *Clientset { } // New creates a new Clientset for the given RESTClient. -func New(c restclient.Interface) *Clientset { +func New(c rest.Interface) *Clientset { var cs Clientset cs.CoreClient = internalversioncore.New(c) cs.AppsClient = internalversionapps.New(c) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/BUILD b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/BUILD index cb63b79f..a8f6c124 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/BUILD @@ -19,9 +19,10 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/apis/apps:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/apps_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/apps_client.go index c5fa3524..df9653ad 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/apps_client.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/apps_client.go @@ -17,18 +17,18 @@ limitations under the License. package internalversion import ( + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type AppsInterface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface StatefulSetsGetter } // AppsClient is used to interact with features provided by the apps group. type AppsClient struct { - restClient restclient.Interface + restClient rest.Interface } func (c *AppsClient) StatefulSets(namespace string) StatefulSetInterface { @@ -36,12 +36,12 @@ func (c *AppsClient) StatefulSets(namespace string) StatefulSetInterface { } // NewForConfig creates a new AppsClient for the given config. -func NewForConfig(c *restclient.Config) (*AppsClient, error) { +func NewForConfig(c *rest.Config) (*AppsClient, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -50,7 +50,7 @@ func NewForConfig(c *restclient.Config) (*AppsClient, error) { // NewForConfigOrDie creates a new AppsClient for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *AppsClient { +func NewForConfigOrDie(c *rest.Config) *AppsClient { client, err := NewForConfig(c) if err != nil { panic(err) @@ -59,11 +59,11 @@ func NewForConfigOrDie(c *restclient.Config) *AppsClient { } // New creates a new AppsClient for the given RESTClient. -func New(c restclient.Interface) *AppsClient { +func New(c rest.Interface) *AppsClient { return &AppsClient{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { // if apps group is not registered, return an error g, err := api.Registry.Group("apps") if err != nil { @@ -71,7 +71,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/apis" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } if config.GroupVersion == nil || config.GroupVersion.Group != g.GroupVersion.Group { copyGroupVersion := g.GroupVersion @@ -90,7 +90,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *AppsClient) RESTClient() restclient.Interface { +func (c *AppsClient) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/fake/BUILD b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/fake/BUILD index 9295f79c..34b44411 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/fake/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/fake/BUILD @@ -16,15 +16,15 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//pkg/apis/apps:go_default_library", "//pkg/client/clientset_generated/internalclientset/typed/apps/internalversion:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/fake/fake_apps_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/fake/fake_apps_client.go index 9b1f71c1..69f39aea 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/fake/fake_apps_client.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/fake/fake_apps_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" internalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -32,7 +32,7 @@ func (c *FakeApps) StatefulSets(namespace string) internalversion.StatefulSetInt // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeApps) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeApps) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/fake/fake_statefulset.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/fake/fake_statefulset.go index 4b45cb26..d42f642d 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/fake/fake_statefulset.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/fake/fake_statefulset.go @@ -20,8 +20,8 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" apps "k8s.io/kubernetes/pkg/apis/apps" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -64,14 +64,14 @@ func (c *FakeStatefulSets) UpdateStatus(statefulSet *apps.StatefulSet) (*apps.St return obj.(*apps.StatefulSet), err } -func (c *FakeStatefulSets) Delete(name string, options *api.DeleteOptions) error { +func (c *FakeStatefulSets) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewDeleteAction(statefulsetsResource, c.ns, name), &apps.StatefulSet{}) return err } -func (c *FakeStatefulSets) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *FakeStatefulSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := core.NewDeleteCollectionAction(statefulsetsResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &apps.StatefulSetList{}) @@ -88,7 +88,7 @@ func (c *FakeStatefulSets) Get(name string, options v1.GetOptions) (result *apps return obj.(*apps.StatefulSet), err } -func (c *FakeStatefulSets) List(opts api.ListOptions) (result *apps.StatefulSetList, err error) { +func (c *FakeStatefulSets) List(opts v1.ListOptions) (result *apps.StatefulSetList, err error) { obj, err := c.Fake. Invokes(core.NewListAction(statefulsetsResource, c.ns, opts), &apps.StatefulSetList{}) @@ -110,14 +110,14 @@ func (c *FakeStatefulSets) List(opts api.ListOptions) (result *apps.StatefulSetL } // Watch returns a watch.Interface that watches the requested statefulSets. -func (c *FakeStatefulSets) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *FakeStatefulSets) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewWatchAction(statefulsetsResource, c.ns, opts)) } // Patch applies the patch and returns the patched statefulSet. -func (c *FakeStatefulSets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *apps.StatefulSet, err error) { +func (c *FakeStatefulSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *apps.StatefulSet, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(statefulsetsResource, c.ns, name, data, subresources...), &apps.StatefulSet{}) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/statefulset.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/statefulset.go index bb16bb7f..471cc843 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/statefulset.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion/statefulset.go @@ -18,10 +18,11 @@ package internalversion import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" apps "k8s.io/kubernetes/pkg/apis/apps" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // StatefulSetsGetter has a method to return a StatefulSetInterface. @@ -35,18 +36,18 @@ type StatefulSetInterface interface { Create(*apps.StatefulSet) (*apps.StatefulSet, error) Update(*apps.StatefulSet) (*apps.StatefulSet, error) UpdateStatus(*apps.StatefulSet) (*apps.StatefulSet, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error Get(name string, options v1.GetOptions) (*apps.StatefulSet, error) - List(opts api.ListOptions) (*apps.StatefulSetList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *apps.StatefulSet, err error) + List(opts v1.ListOptions) (*apps.StatefulSetList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *apps.StatefulSet, err error) StatefulSetExpansion } // statefulSets implements StatefulSetInterface type statefulSets struct { - client restclient.Interface + client rest.Interface ns string } @@ -100,7 +101,7 @@ func (c *statefulSets) UpdateStatus(statefulSet *apps.StatefulSet) (result *apps } // Delete takes name of the statefulSet and deletes it. Returns an error if one occurs. -func (c *statefulSets) Delete(name string, options *api.DeleteOptions) error { +func (c *statefulSets) Delete(name string, options *v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("statefulsets"). @@ -111,7 +112,7 @@ func (c *statefulSets) Delete(name string, options *api.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *statefulSets) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *statefulSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("statefulsets"). @@ -135,7 +136,7 @@ func (c *statefulSets) Get(name string, options v1.GetOptions) (result *apps.Sta } // List takes label and field selectors, and returns the list of StatefulSets that match those selectors. -func (c *statefulSets) List(opts api.ListOptions) (result *apps.StatefulSetList, err error) { +func (c *statefulSets) List(opts v1.ListOptions) (result *apps.StatefulSetList, err error) { result = &apps.StatefulSetList{} err = c.client.Get(). Namespace(c.ns). @@ -147,7 +148,7 @@ func (c *statefulSets) List(opts api.ListOptions) (result *apps.StatefulSetList, } // Watch returns a watch.Interface that watches the requested statefulSets. -func (c *statefulSets) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *statefulSets) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -157,7 +158,7 @@ func (c *statefulSets) Watch(opts api.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched statefulSet. -func (c *statefulSets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *apps.StatefulSet, err error) { +func (c *statefulSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *apps.StatefulSet, err error) { result = &apps.StatefulSet{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/BUILD b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/BUILD index 93c17e89..89dbc891 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/BUILD @@ -20,7 +20,7 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/apis/authentication:go_default_library", - "//pkg/client/restclient:go_default_library", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/authentication_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/authentication_client.go index ff45ce11..ea971cd6 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/authentication_client.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/authentication_client.go @@ -17,18 +17,18 @@ limitations under the License. package internalversion import ( + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type AuthenticationInterface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface TokenReviewsGetter } // AuthenticationClient is used to interact with features provided by the authentication.k8s.io group. type AuthenticationClient struct { - restClient restclient.Interface + restClient rest.Interface } func (c *AuthenticationClient) TokenReviews() TokenReviewInterface { @@ -36,12 +36,12 @@ func (c *AuthenticationClient) TokenReviews() TokenReviewInterface { } // NewForConfig creates a new AuthenticationClient for the given config. -func NewForConfig(c *restclient.Config) (*AuthenticationClient, error) { +func NewForConfig(c *rest.Config) (*AuthenticationClient, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -50,7 +50,7 @@ func NewForConfig(c *restclient.Config) (*AuthenticationClient, error) { // NewForConfigOrDie creates a new AuthenticationClient for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *AuthenticationClient { +func NewForConfigOrDie(c *rest.Config) *AuthenticationClient { client, err := NewForConfig(c) if err != nil { panic(err) @@ -59,11 +59,11 @@ func NewForConfigOrDie(c *restclient.Config) *AuthenticationClient { } // New creates a new AuthenticationClient for the given RESTClient. -func New(c restclient.Interface) *AuthenticationClient { +func New(c rest.Interface) *AuthenticationClient { return &AuthenticationClient{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { // if authentication group is not registered, return an error g, err := api.Registry.Group("authentication.k8s.io") if err != nil { @@ -71,7 +71,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/apis" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } if config.GroupVersion == nil || config.GroupVersion.Group != g.GroupVersion.Group { copyGroupVersion := g.GroupVersion @@ -90,7 +90,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *AuthenticationClient) RESTClient() restclient.Interface { +func (c *AuthenticationClient) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/fake/BUILD b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/fake/BUILD index 96f14348..fce2c0e7 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/fake/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/fake/BUILD @@ -20,8 +20,8 @@ go_library( deps = [ "//pkg/apis/authentication:go_default_library", "//pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/fake/fake_authentication_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/fake/fake_authentication_client.go index 20f3330e..93da718a 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/fake/fake_authentication_client.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/fake/fake_authentication_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" internalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -32,7 +32,7 @@ func (c *FakeAuthentication) TokenReviews() internalversion.TokenReviewInterface // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeAuthentication) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeAuthentication) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/tokenreview.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/tokenreview.go index d6cbc51f..c0880edb 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/tokenreview.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion/tokenreview.go @@ -17,7 +17,7 @@ limitations under the License. package internalversion import ( - restclient "k8s.io/kubernetes/pkg/client/restclient" + rest "k8s.io/client-go/rest" ) // TokenReviewsGetter has a method to return a TokenReviewInterface. @@ -33,7 +33,7 @@ type TokenReviewInterface interface { // tokenReviews implements TokenReviewInterface type tokenReviews struct { - client restclient.Interface + client rest.Interface } // newTokenReviews returns a TokenReviews diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/BUILD b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/BUILD index cccce09f..7701656a 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/BUILD @@ -24,7 +24,7 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/apis/authorization:go_default_library", - "//pkg/client/restclient:go_default_library", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/authorization_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/authorization_client.go index fdda05a6..9bbd0541 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/authorization_client.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/authorization_client.go @@ -17,12 +17,12 @@ limitations under the License. package internalversion import ( + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type AuthorizationInterface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface LocalSubjectAccessReviewsGetter SelfSubjectAccessReviewsGetter SubjectAccessReviewsGetter @@ -30,7 +30,7 @@ type AuthorizationInterface interface { // AuthorizationClient is used to interact with features provided by the authorization.k8s.io group. type AuthorizationClient struct { - restClient restclient.Interface + restClient rest.Interface } func (c *AuthorizationClient) LocalSubjectAccessReviews(namespace string) LocalSubjectAccessReviewInterface { @@ -46,12 +46,12 @@ func (c *AuthorizationClient) SubjectAccessReviews() SubjectAccessReviewInterfac } // NewForConfig creates a new AuthorizationClient for the given config. -func NewForConfig(c *restclient.Config) (*AuthorizationClient, error) { +func NewForConfig(c *rest.Config) (*AuthorizationClient, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -60,7 +60,7 @@ func NewForConfig(c *restclient.Config) (*AuthorizationClient, error) { // NewForConfigOrDie creates a new AuthorizationClient for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *AuthorizationClient { +func NewForConfigOrDie(c *rest.Config) *AuthorizationClient { client, err := NewForConfig(c) if err != nil { panic(err) @@ -69,11 +69,11 @@ func NewForConfigOrDie(c *restclient.Config) *AuthorizationClient { } // New creates a new AuthorizationClient for the given RESTClient. -func New(c restclient.Interface) *AuthorizationClient { +func New(c rest.Interface) *AuthorizationClient { return &AuthorizationClient{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { // if authorization group is not registered, return an error g, err := api.Registry.Group("authorization.k8s.io") if err != nil { @@ -81,7 +81,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/apis" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } if config.GroupVersion == nil || config.GroupVersion.Group != g.GroupVersion.Group { copyGroupVersion := g.GroupVersion @@ -100,7 +100,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *AuthorizationClient) RESTClient() restclient.Interface { +func (c *AuthorizationClient) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/fake/BUILD b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/fake/BUILD index 704513ac..4f3bd44c 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/fake/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/fake/BUILD @@ -24,8 +24,8 @@ go_library( deps = [ "//pkg/apis/authorization:go_default_library", "//pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/fake/fake_authorization_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/fake/fake_authorization_client.go index 5c34558d..4c32605c 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/fake/fake_authorization_client.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/fake/fake_authorization_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" internalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -40,7 +40,7 @@ func (c *FakeAuthorization) SubjectAccessReviews() internalversion.SubjectAccess // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeAuthorization) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeAuthorization) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/localsubjectaccessreview.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/localsubjectaccessreview.go index cc580565..bf02fad7 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/localsubjectaccessreview.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/localsubjectaccessreview.go @@ -17,7 +17,7 @@ limitations under the License. package internalversion import ( - restclient "k8s.io/kubernetes/pkg/client/restclient" + rest "k8s.io/client-go/rest" ) // LocalSubjectAccessReviewsGetter has a method to return a LocalSubjectAccessReviewInterface. @@ -33,7 +33,7 @@ type LocalSubjectAccessReviewInterface interface { // localSubjectAccessReviews implements LocalSubjectAccessReviewInterface type localSubjectAccessReviews struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/selfsubjectaccessreview.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/selfsubjectaccessreview.go index 961e37c8..cb19357c 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/selfsubjectaccessreview.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/selfsubjectaccessreview.go @@ -17,7 +17,7 @@ limitations under the License. package internalversion import ( - restclient "k8s.io/kubernetes/pkg/client/restclient" + rest "k8s.io/client-go/rest" ) // SelfSubjectAccessReviewsGetter has a method to return a SelfSubjectAccessReviewInterface. @@ -33,7 +33,7 @@ type SelfSubjectAccessReviewInterface interface { // selfSubjectAccessReviews implements SelfSubjectAccessReviewInterface type selfSubjectAccessReviews struct { - client restclient.Interface + client rest.Interface } // newSelfSubjectAccessReviews returns a SelfSubjectAccessReviews diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/subjectaccessreview.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/subjectaccessreview.go index e11f0162..456b469b 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/subjectaccessreview.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion/subjectaccessreview.go @@ -17,7 +17,7 @@ limitations under the License. package internalversion import ( - restclient "k8s.io/kubernetes/pkg/client/restclient" + rest "k8s.io/client-go/rest" ) // SubjectAccessReviewsGetter has a method to return a SubjectAccessReviewInterface. @@ -33,7 +33,7 @@ type SubjectAccessReviewInterface interface { // subjectAccessReviews implements SubjectAccessReviewInterface type subjectAccessReviews struct { - client restclient.Interface + client rest.Interface } // newSubjectAccessReviews returns a SubjectAccessReviews diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/BUILD b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/BUILD index 8c50b837..d5f2d174 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/BUILD @@ -19,9 +19,10 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/apis/autoscaling:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/autoscaling_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/autoscaling_client.go index 0384256c..325e11ba 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/autoscaling_client.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/autoscaling_client.go @@ -17,18 +17,18 @@ limitations under the License. package internalversion import ( + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type AutoscalingInterface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface HorizontalPodAutoscalersGetter } // AutoscalingClient is used to interact with features provided by the autoscaling group. type AutoscalingClient struct { - restClient restclient.Interface + restClient rest.Interface } func (c *AutoscalingClient) HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerInterface { @@ -36,12 +36,12 @@ func (c *AutoscalingClient) HorizontalPodAutoscalers(namespace string) Horizonta } // NewForConfig creates a new AutoscalingClient for the given config. -func NewForConfig(c *restclient.Config) (*AutoscalingClient, error) { +func NewForConfig(c *rest.Config) (*AutoscalingClient, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -50,7 +50,7 @@ func NewForConfig(c *restclient.Config) (*AutoscalingClient, error) { // NewForConfigOrDie creates a new AutoscalingClient for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *AutoscalingClient { +func NewForConfigOrDie(c *rest.Config) *AutoscalingClient { client, err := NewForConfig(c) if err != nil { panic(err) @@ -59,11 +59,11 @@ func NewForConfigOrDie(c *restclient.Config) *AutoscalingClient { } // New creates a new AutoscalingClient for the given RESTClient. -func New(c restclient.Interface) *AutoscalingClient { +func New(c rest.Interface) *AutoscalingClient { return &AutoscalingClient{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { // if autoscaling group is not registered, return an error g, err := api.Registry.Group("autoscaling") if err != nil { @@ -71,7 +71,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/apis" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } if config.GroupVersion == nil || config.GroupVersion.Group != g.GroupVersion.Group { copyGroupVersion := g.GroupVersion @@ -90,7 +90,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *AutoscalingClient) RESTClient() restclient.Interface { +func (c *AutoscalingClient) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/fake/BUILD b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/fake/BUILD index 6460cd93..115fa61d 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/fake/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/fake/BUILD @@ -16,15 +16,15 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//pkg/apis/autoscaling:go_default_library", "//pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/fake/fake_autoscaling_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/fake/fake_autoscaling_client.go index 07e96215..e427da90 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/fake/fake_autoscaling_client.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/fake/fake_autoscaling_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" internalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -32,7 +32,7 @@ func (c *FakeAutoscaling) HorizontalPodAutoscalers(namespace string) internalver // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeAutoscaling) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeAutoscaling) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/fake/fake_horizontalpodautoscaler.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/fake/fake_horizontalpodautoscaler.go index e6d7bdeb..e0db5c0b 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/fake/fake_horizontalpodautoscaler.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/fake/fake_horizontalpodautoscaler.go @@ -20,8 +20,8 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" autoscaling "k8s.io/kubernetes/pkg/apis/autoscaling" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -64,14 +64,14 @@ func (c *FakeHorizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *aut return obj.(*autoscaling.HorizontalPodAutoscaler), err } -func (c *FakeHorizontalPodAutoscalers) Delete(name string, options *api.DeleteOptions) error { +func (c *FakeHorizontalPodAutoscalers) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewDeleteAction(horizontalpodautoscalersResource, c.ns, name), &autoscaling.HorizontalPodAutoscaler{}) return err } -func (c *FakeHorizontalPodAutoscalers) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *FakeHorizontalPodAutoscalers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := core.NewDeleteCollectionAction(horizontalpodautoscalersResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &autoscaling.HorizontalPodAutoscalerList{}) @@ -88,7 +88,7 @@ func (c *FakeHorizontalPodAutoscalers) Get(name string, options v1.GetOptions) ( return obj.(*autoscaling.HorizontalPodAutoscaler), err } -func (c *FakeHorizontalPodAutoscalers) List(opts api.ListOptions) (result *autoscaling.HorizontalPodAutoscalerList, err error) { +func (c *FakeHorizontalPodAutoscalers) List(opts v1.ListOptions) (result *autoscaling.HorizontalPodAutoscalerList, err error) { obj, err := c.Fake. Invokes(core.NewListAction(horizontalpodautoscalersResource, c.ns, opts), &autoscaling.HorizontalPodAutoscalerList{}) @@ -110,14 +110,14 @@ func (c *FakeHorizontalPodAutoscalers) List(opts api.ListOptions) (result *autos } // Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers. -func (c *FakeHorizontalPodAutoscalers) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *FakeHorizontalPodAutoscalers) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewWatchAction(horizontalpodautoscalersResource, c.ns, opts)) } // Patch applies the patch and returns the patched horizontalPodAutoscaler. -func (c *FakeHorizontalPodAutoscalers) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *autoscaling.HorizontalPodAutoscaler, err error) { +func (c *FakeHorizontalPodAutoscalers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *autoscaling.HorizontalPodAutoscaler, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, name, data, subresources...), &autoscaling.HorizontalPodAutoscaler{}) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/horizontalpodautoscaler.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/horizontalpodautoscaler.go index 302b94eb..e0b8b0b1 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/horizontalpodautoscaler.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion/horizontalpodautoscaler.go @@ -18,10 +18,11 @@ package internalversion import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" autoscaling "k8s.io/kubernetes/pkg/apis/autoscaling" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // HorizontalPodAutoscalersGetter has a method to return a HorizontalPodAutoscalerInterface. @@ -35,18 +36,18 @@ type HorizontalPodAutoscalerInterface interface { Create(*autoscaling.HorizontalPodAutoscaler) (*autoscaling.HorizontalPodAutoscaler, error) Update(*autoscaling.HorizontalPodAutoscaler) (*autoscaling.HorizontalPodAutoscaler, error) UpdateStatus(*autoscaling.HorizontalPodAutoscaler) (*autoscaling.HorizontalPodAutoscaler, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error Get(name string, options v1.GetOptions) (*autoscaling.HorizontalPodAutoscaler, error) - List(opts api.ListOptions) (*autoscaling.HorizontalPodAutoscalerList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *autoscaling.HorizontalPodAutoscaler, err error) + List(opts v1.ListOptions) (*autoscaling.HorizontalPodAutoscalerList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *autoscaling.HorizontalPodAutoscaler, err error) HorizontalPodAutoscalerExpansion } // horizontalPodAutoscalers implements HorizontalPodAutoscalerInterface type horizontalPodAutoscalers struct { - client restclient.Interface + client rest.Interface ns string } @@ -100,7 +101,7 @@ func (c *horizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *autosca } // Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs. -func (c *horizontalPodAutoscalers) Delete(name string, options *api.DeleteOptions) error { +func (c *horizontalPodAutoscalers) Delete(name string, options *v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("horizontalpodautoscalers"). @@ -111,7 +112,7 @@ func (c *horizontalPodAutoscalers) Delete(name string, options *api.DeleteOption } // DeleteCollection deletes a collection of objects. -func (c *horizontalPodAutoscalers) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *horizontalPodAutoscalers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("horizontalpodautoscalers"). @@ -135,7 +136,7 @@ func (c *horizontalPodAutoscalers) Get(name string, options v1.GetOptions) (resu } // List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors. -func (c *horizontalPodAutoscalers) List(opts api.ListOptions) (result *autoscaling.HorizontalPodAutoscalerList, err error) { +func (c *horizontalPodAutoscalers) List(opts v1.ListOptions) (result *autoscaling.HorizontalPodAutoscalerList, err error) { result = &autoscaling.HorizontalPodAutoscalerList{} err = c.client.Get(). Namespace(c.ns). @@ -147,7 +148,7 @@ func (c *horizontalPodAutoscalers) List(opts api.ListOptions) (result *autoscali } // Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers. -func (c *horizontalPodAutoscalers) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *horizontalPodAutoscalers) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -157,7 +158,7 @@ func (c *horizontalPodAutoscalers) Watch(opts api.ListOptions) (watch.Interface, } // Patch applies the patch and returns the patched horizontalPodAutoscaler. -func (c *horizontalPodAutoscalers) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *autoscaling.HorizontalPodAutoscaler, err error) { +func (c *horizontalPodAutoscalers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *autoscaling.HorizontalPodAutoscaler, err error) { result = &autoscaling.HorizontalPodAutoscaler{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/BUILD b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/BUILD index f9b956f1..ddad5320 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/BUILD @@ -20,9 +20,10 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/apis/batch:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/batch_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/batch_client.go index 6b3525b3..90866b44 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/batch_client.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/batch_client.go @@ -17,19 +17,19 @@ limitations under the License. package internalversion import ( + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type BatchInterface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface CronJobsGetter JobsGetter } // BatchClient is used to interact with features provided by the batch group. type BatchClient struct { - restClient restclient.Interface + restClient rest.Interface } func (c *BatchClient) CronJobs(namespace string) CronJobInterface { @@ -41,12 +41,12 @@ func (c *BatchClient) Jobs(namespace string) JobInterface { } // NewForConfig creates a new BatchClient for the given config. -func NewForConfig(c *restclient.Config) (*BatchClient, error) { +func NewForConfig(c *rest.Config) (*BatchClient, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -55,7 +55,7 @@ func NewForConfig(c *restclient.Config) (*BatchClient, error) { // NewForConfigOrDie creates a new BatchClient for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *BatchClient { +func NewForConfigOrDie(c *rest.Config) *BatchClient { client, err := NewForConfig(c) if err != nil { panic(err) @@ -64,11 +64,11 @@ func NewForConfigOrDie(c *restclient.Config) *BatchClient { } // New creates a new BatchClient for the given RESTClient. -func New(c restclient.Interface) *BatchClient { +func New(c rest.Interface) *BatchClient { return &BatchClient{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { // if batch group is not registered, return an error g, err := api.Registry.Group("batch") if err != nil { @@ -76,7 +76,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/apis" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } if config.GroupVersion == nil || config.GroupVersion.Group != g.GroupVersion.Group { copyGroupVersion := g.GroupVersion @@ -95,7 +95,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *BatchClient) RESTClient() restclient.Interface { +func (c *BatchClient) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/cronjob.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/cronjob.go index 3a98f717..0b7048c8 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/cronjob.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/cronjob.go @@ -18,10 +18,11 @@ package internalversion import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" batch "k8s.io/kubernetes/pkg/apis/batch" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // CronJobsGetter has a method to return a CronJobInterface. @@ -35,18 +36,18 @@ type CronJobInterface interface { Create(*batch.CronJob) (*batch.CronJob, error) Update(*batch.CronJob) (*batch.CronJob, error) UpdateStatus(*batch.CronJob) (*batch.CronJob, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error Get(name string, options v1.GetOptions) (*batch.CronJob, error) - List(opts api.ListOptions) (*batch.CronJobList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *batch.CronJob, err error) + List(opts v1.ListOptions) (*batch.CronJobList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *batch.CronJob, err error) CronJobExpansion } // cronJobs implements CronJobInterface type cronJobs struct { - client restclient.Interface + client rest.Interface ns string } @@ -100,7 +101,7 @@ func (c *cronJobs) UpdateStatus(cronJob *batch.CronJob) (result *batch.CronJob, } // Delete takes name of the cronJob and deletes it. Returns an error if one occurs. -func (c *cronJobs) Delete(name string, options *api.DeleteOptions) error { +func (c *cronJobs) Delete(name string, options *v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("cronjobs"). @@ -111,7 +112,7 @@ func (c *cronJobs) Delete(name string, options *api.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *cronJobs) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *cronJobs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("cronjobs"). @@ -135,7 +136,7 @@ func (c *cronJobs) Get(name string, options v1.GetOptions) (result *batch.CronJo } // List takes label and field selectors, and returns the list of CronJobs that match those selectors. -func (c *cronJobs) List(opts api.ListOptions) (result *batch.CronJobList, err error) { +func (c *cronJobs) List(opts v1.ListOptions) (result *batch.CronJobList, err error) { result = &batch.CronJobList{} err = c.client.Get(). Namespace(c.ns). @@ -147,7 +148,7 @@ func (c *cronJobs) List(opts api.ListOptions) (result *batch.CronJobList, err er } // Watch returns a watch.Interface that watches the requested cronJobs. -func (c *cronJobs) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *cronJobs) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -157,7 +158,7 @@ func (c *cronJobs) Watch(opts api.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched cronJob. -func (c *cronJobs) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *batch.CronJob, err error) { +func (c *cronJobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *batch.CronJob, err error) { result = &batch.CronJob{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/fake/BUILD b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/fake/BUILD index e9d6e369..63fe05cf 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/fake/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/fake/BUILD @@ -17,15 +17,15 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//pkg/apis/batch:go_default_library", "//pkg/client/clientset_generated/internalclientset/typed/batch/internalversion:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/fake/fake_batch_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/fake/fake_batch_client.go index 8adbdac5..a1ad34c6 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/fake/fake_batch_client.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/fake/fake_batch_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" internalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -36,7 +36,7 @@ func (c *FakeBatch) Jobs(namespace string) internalversion.JobInterface { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeBatch) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeBatch) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/fake/fake_cronjob.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/fake/fake_cronjob.go index 500e9fb5..b8551c78 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/fake/fake_cronjob.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/fake/fake_cronjob.go @@ -20,8 +20,8 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" batch "k8s.io/kubernetes/pkg/apis/batch" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -64,14 +64,14 @@ func (c *FakeCronJobs) UpdateStatus(cronJob *batch.CronJob) (*batch.CronJob, err return obj.(*batch.CronJob), err } -func (c *FakeCronJobs) Delete(name string, options *api.DeleteOptions) error { +func (c *FakeCronJobs) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewDeleteAction(cronjobsResource, c.ns, name), &batch.CronJob{}) return err } -func (c *FakeCronJobs) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *FakeCronJobs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := core.NewDeleteCollectionAction(cronjobsResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &batch.CronJobList{}) @@ -88,7 +88,7 @@ func (c *FakeCronJobs) Get(name string, options v1.GetOptions) (result *batch.Cr return obj.(*batch.CronJob), err } -func (c *FakeCronJobs) List(opts api.ListOptions) (result *batch.CronJobList, err error) { +func (c *FakeCronJobs) List(opts v1.ListOptions) (result *batch.CronJobList, err error) { obj, err := c.Fake. Invokes(core.NewListAction(cronjobsResource, c.ns, opts), &batch.CronJobList{}) @@ -110,14 +110,14 @@ func (c *FakeCronJobs) List(opts api.ListOptions) (result *batch.CronJobList, er } // Watch returns a watch.Interface that watches the requested cronJobs. -func (c *FakeCronJobs) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *FakeCronJobs) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewWatchAction(cronjobsResource, c.ns, opts)) } // Patch applies the patch and returns the patched cronJob. -func (c *FakeCronJobs) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *batch.CronJob, err error) { +func (c *FakeCronJobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *batch.CronJob, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(cronjobsResource, c.ns, name, data, subresources...), &batch.CronJob{}) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/fake/fake_job.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/fake/fake_job.go index 46283e3d..db3f9027 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/fake/fake_job.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/fake/fake_job.go @@ -20,8 +20,8 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" batch "k8s.io/kubernetes/pkg/apis/batch" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -64,14 +64,14 @@ func (c *FakeJobs) UpdateStatus(job *batch.Job) (*batch.Job, error) { return obj.(*batch.Job), err } -func (c *FakeJobs) Delete(name string, options *api.DeleteOptions) error { +func (c *FakeJobs) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewDeleteAction(jobsResource, c.ns, name), &batch.Job{}) return err } -func (c *FakeJobs) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *FakeJobs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := core.NewDeleteCollectionAction(jobsResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &batch.JobList{}) @@ -88,7 +88,7 @@ func (c *FakeJobs) Get(name string, options v1.GetOptions) (result *batch.Job, e return obj.(*batch.Job), err } -func (c *FakeJobs) List(opts api.ListOptions) (result *batch.JobList, err error) { +func (c *FakeJobs) List(opts v1.ListOptions) (result *batch.JobList, err error) { obj, err := c.Fake. Invokes(core.NewListAction(jobsResource, c.ns, opts), &batch.JobList{}) @@ -110,14 +110,14 @@ func (c *FakeJobs) List(opts api.ListOptions) (result *batch.JobList, err error) } // Watch returns a watch.Interface that watches the requested jobs. -func (c *FakeJobs) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *FakeJobs) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewWatchAction(jobsResource, c.ns, opts)) } // Patch applies the patch and returns the patched job. -func (c *FakeJobs) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *batch.Job, err error) { +func (c *FakeJobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *batch.Job, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(jobsResource, c.ns, name, data, subresources...), &batch.Job{}) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/job.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/job.go index 46c58b1f..2b0c4a7d 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/job.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/batch/internalversion/job.go @@ -18,10 +18,11 @@ package internalversion import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" batch "k8s.io/kubernetes/pkg/apis/batch" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // JobsGetter has a method to return a JobInterface. @@ -35,18 +36,18 @@ type JobInterface interface { Create(*batch.Job) (*batch.Job, error) Update(*batch.Job) (*batch.Job, error) UpdateStatus(*batch.Job) (*batch.Job, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error Get(name string, options v1.GetOptions) (*batch.Job, error) - List(opts api.ListOptions) (*batch.JobList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *batch.Job, err error) + List(opts v1.ListOptions) (*batch.JobList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *batch.Job, err error) JobExpansion } // jobs implements JobInterface type jobs struct { - client restclient.Interface + client rest.Interface ns string } @@ -100,7 +101,7 @@ func (c *jobs) UpdateStatus(job *batch.Job) (result *batch.Job, err error) { } // Delete takes name of the job and deletes it. Returns an error if one occurs. -func (c *jobs) Delete(name string, options *api.DeleteOptions) error { +func (c *jobs) Delete(name string, options *v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("jobs"). @@ -111,7 +112,7 @@ func (c *jobs) Delete(name string, options *api.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *jobs) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *jobs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("jobs"). @@ -135,7 +136,7 @@ func (c *jobs) Get(name string, options v1.GetOptions) (result *batch.Job, err e } // List takes label and field selectors, and returns the list of Jobs that match those selectors. -func (c *jobs) List(opts api.ListOptions) (result *batch.JobList, err error) { +func (c *jobs) List(opts v1.ListOptions) (result *batch.JobList, err error) { result = &batch.JobList{} err = c.client.Get(). Namespace(c.ns). @@ -147,7 +148,7 @@ func (c *jobs) List(opts api.ListOptions) (result *batch.JobList, err error) { } // Watch returns a watch.Interface that watches the requested jobs. -func (c *jobs) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *jobs) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -157,7 +158,7 @@ func (c *jobs) Watch(opts api.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched job. -func (c *jobs) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *batch.Job, err error) { +func (c *jobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *batch.Job, err error) { result = &batch.Job{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/BUILD b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/BUILD index 4f1acde5..baf0d851 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/BUILD @@ -20,9 +20,10 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/apis/certificates:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/certificates_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/certificates_client.go index 78146615..692461bc 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/certificates_client.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/certificates_client.go @@ -17,18 +17,18 @@ limitations under the License. package internalversion import ( + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type CertificatesInterface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface CertificateSigningRequestsGetter } // CertificatesClient is used to interact with features provided by the certificates.k8s.io group. type CertificatesClient struct { - restClient restclient.Interface + restClient rest.Interface } func (c *CertificatesClient) CertificateSigningRequests() CertificateSigningRequestInterface { @@ -36,12 +36,12 @@ func (c *CertificatesClient) CertificateSigningRequests() CertificateSigningRequ } // NewForConfig creates a new CertificatesClient for the given config. -func NewForConfig(c *restclient.Config) (*CertificatesClient, error) { +func NewForConfig(c *rest.Config) (*CertificatesClient, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -50,7 +50,7 @@ func NewForConfig(c *restclient.Config) (*CertificatesClient, error) { // NewForConfigOrDie creates a new CertificatesClient for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *CertificatesClient { +func NewForConfigOrDie(c *rest.Config) *CertificatesClient { client, err := NewForConfig(c) if err != nil { panic(err) @@ -59,11 +59,11 @@ func NewForConfigOrDie(c *restclient.Config) *CertificatesClient { } // New creates a new CertificatesClient for the given RESTClient. -func New(c restclient.Interface) *CertificatesClient { +func New(c rest.Interface) *CertificatesClient { return &CertificatesClient{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { // if certificates group is not registered, return an error g, err := api.Registry.Group("certificates.k8s.io") if err != nil { @@ -71,7 +71,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/apis" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } if config.GroupVersion == nil || config.GroupVersion.Group != g.GroupVersion.Group { copyGroupVersion := g.GroupVersion @@ -90,7 +90,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *CertificatesClient) RESTClient() restclient.Interface { +func (c *CertificatesClient) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/certificatesigningrequest.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/certificatesigningrequest.go index 5abb7935..c1d5c037 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/certificatesigningrequest.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/certificatesigningrequest.go @@ -18,10 +18,11 @@ package internalversion import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" certificates "k8s.io/kubernetes/pkg/apis/certificates" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // CertificateSigningRequestsGetter has a method to return a CertificateSigningRequestInterface. @@ -35,18 +36,18 @@ type CertificateSigningRequestInterface interface { Create(*certificates.CertificateSigningRequest) (*certificates.CertificateSigningRequest, error) Update(*certificates.CertificateSigningRequest) (*certificates.CertificateSigningRequest, error) UpdateStatus(*certificates.CertificateSigningRequest) (*certificates.CertificateSigningRequest, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error Get(name string, options v1.GetOptions) (*certificates.CertificateSigningRequest, error) - List(opts api.ListOptions) (*certificates.CertificateSigningRequestList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *certificates.CertificateSigningRequest, err error) + List(opts v1.ListOptions) (*certificates.CertificateSigningRequestList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *certificates.CertificateSigningRequest, err error) CertificateSigningRequestExpansion } // certificateSigningRequests implements CertificateSigningRequestInterface type certificateSigningRequests struct { - client restclient.Interface + client rest.Interface } // newCertificateSigningRequests returns a CertificateSigningRequests @@ -95,7 +96,7 @@ func (c *certificateSigningRequests) UpdateStatus(certificateSigningRequest *cer } // Delete takes name of the certificateSigningRequest and deletes it. Returns an error if one occurs. -func (c *certificateSigningRequests) Delete(name string, options *api.DeleteOptions) error { +func (c *certificateSigningRequests) Delete(name string, options *v1.DeleteOptions) error { return c.client.Delete(). Resource("certificatesigningrequests"). Name(name). @@ -105,7 +106,7 @@ func (c *certificateSigningRequests) Delete(name string, options *api.DeleteOpti } // DeleteCollection deletes a collection of objects. -func (c *certificateSigningRequests) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *certificateSigningRequests) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { return c.client.Delete(). Resource("certificatesigningrequests"). VersionedParams(&listOptions, api.ParameterCodec). @@ -127,7 +128,7 @@ func (c *certificateSigningRequests) Get(name string, options v1.GetOptions) (re } // List takes label and field selectors, and returns the list of CertificateSigningRequests that match those selectors. -func (c *certificateSigningRequests) List(opts api.ListOptions) (result *certificates.CertificateSigningRequestList, err error) { +func (c *certificateSigningRequests) List(opts v1.ListOptions) (result *certificates.CertificateSigningRequestList, err error) { result = &certificates.CertificateSigningRequestList{} err = c.client.Get(). Resource("certificatesigningrequests"). @@ -138,7 +139,7 @@ func (c *certificateSigningRequests) List(opts api.ListOptions) (result *certifi } // Watch returns a watch.Interface that watches the requested certificateSigningRequests. -func (c *certificateSigningRequests) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *certificateSigningRequests) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Resource("certificatesigningrequests"). @@ -147,7 +148,7 @@ func (c *certificateSigningRequests) Watch(opts api.ListOptions) (watch.Interfac } // Patch applies the patch and returns the patched certificateSigningRequest. -func (c *certificateSigningRequests) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *certificates.CertificateSigningRequest, err error) { +func (c *certificateSigningRequests) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *certificates.CertificateSigningRequest, err error) { result = &certificates.CertificateSigningRequest{} err = c.client.Patch(pt). Resource("certificatesigningrequests"). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/fake/BUILD b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/fake/BUILD index 3cb6cbf3..56fb98ce 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/fake/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/fake/BUILD @@ -17,15 +17,15 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//pkg/apis/certificates:go_default_library", "//pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/fake/fake_certificates_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/fake/fake_certificates_client.go index 9ea0c45c..dfb1a2d8 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/fake/fake_certificates_client.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/fake/fake_certificates_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" internalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -32,7 +32,7 @@ func (c *FakeCertificates) CertificateSigningRequests() internalversion.Certific // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeCertificates) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeCertificates) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/fake/fake_certificatesigningrequest.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/fake/fake_certificatesigningrequest.go index afb66a46..35404cec 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/fake/fake_certificatesigningrequest.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion/fake/fake_certificatesigningrequest.go @@ -20,8 +20,8 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" certificates "k8s.io/kubernetes/pkg/apis/certificates" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -60,13 +60,13 @@ func (c *FakeCertificateSigningRequests) UpdateStatus(certificateSigningRequest return obj.(*certificates.CertificateSigningRequest), err } -func (c *FakeCertificateSigningRequests) Delete(name string, options *api.DeleteOptions) error { +func (c *FakeCertificateSigningRequests) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewRootDeleteAction(certificatesigningrequestsResource, name), &certificates.CertificateSigningRequest{}) return err } -func (c *FakeCertificateSigningRequests) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *FakeCertificateSigningRequests) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := core.NewRootDeleteCollectionAction(certificatesigningrequestsResource, listOptions) _, err := c.Fake.Invokes(action, &certificates.CertificateSigningRequestList{}) @@ -82,7 +82,7 @@ func (c *FakeCertificateSigningRequests) Get(name string, options v1.GetOptions) return obj.(*certificates.CertificateSigningRequest), err } -func (c *FakeCertificateSigningRequests) List(opts api.ListOptions) (result *certificates.CertificateSigningRequestList, err error) { +func (c *FakeCertificateSigningRequests) List(opts v1.ListOptions) (result *certificates.CertificateSigningRequestList, err error) { obj, err := c.Fake. Invokes(core.NewRootListAction(certificatesigningrequestsResource, opts), &certificates.CertificateSigningRequestList{}) if obj == nil { @@ -103,13 +103,13 @@ func (c *FakeCertificateSigningRequests) List(opts api.ListOptions) (result *cer } // Watch returns a watch.Interface that watches the requested certificateSigningRequests. -func (c *FakeCertificateSigningRequests) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *FakeCertificateSigningRequests) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewRootWatchAction(certificatesigningrequestsResource, opts)) } // Patch applies the patch and returns the patched certificateSigningRequest. -func (c *FakeCertificateSigningRequests) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *certificates.CertificateSigningRequest, err error) { +func (c *FakeCertificateSigningRequests) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *certificates.CertificateSigningRequest, err error) { obj, err := c.Fake. Invokes(core.NewRootPatchSubresourceAction(certificatesigningrequestsResource, name, data, subresources...), &certificates.CertificateSigningRequest{}) if obj == nil { diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/BUILD b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/BUILD index 4acaab44..cbde75b7 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/BUILD @@ -39,12 +39,13 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/api/v1:go_default_library", - "//pkg/client/restclient:go_default_library", - "//pkg/fields:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/runtime", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/net", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/componentstatus.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/componentstatus.go index 17af756b..ca48c86f 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/componentstatus.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/componentstatus.go @@ -18,9 +18,10 @@ package internalversion import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // ComponentStatusesGetter has a method to return a ComponentStatusInterface. @@ -33,18 +34,18 @@ type ComponentStatusesGetter interface { type ComponentStatusInterface interface { Create(*api.ComponentStatus) (*api.ComponentStatus, error) Update(*api.ComponentStatus) (*api.ComponentStatus, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error Get(name string, options v1.GetOptions) (*api.ComponentStatus, error) - List(opts api.ListOptions) (*api.ComponentStatusList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.ComponentStatus, err error) + List(opts v1.ListOptions) (*api.ComponentStatusList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.ComponentStatus, err error) ComponentStatusExpansion } // componentStatuses implements ComponentStatusInterface type componentStatuses struct { - client restclient.Interface + client rest.Interface } // newComponentStatuses returns a ComponentStatuses @@ -78,7 +79,7 @@ func (c *componentStatuses) Update(componentStatus *api.ComponentStatus) (result } // Delete takes name of the componentStatus and deletes it. Returns an error if one occurs. -func (c *componentStatuses) Delete(name string, options *api.DeleteOptions) error { +func (c *componentStatuses) Delete(name string, options *v1.DeleteOptions) error { return c.client.Delete(). Resource("componentstatuses"). Name(name). @@ -88,7 +89,7 @@ func (c *componentStatuses) Delete(name string, options *api.DeleteOptions) erro } // DeleteCollection deletes a collection of objects. -func (c *componentStatuses) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *componentStatuses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { return c.client.Delete(). Resource("componentstatuses"). VersionedParams(&listOptions, api.ParameterCodec). @@ -110,7 +111,7 @@ func (c *componentStatuses) Get(name string, options v1.GetOptions) (result *api } // List takes label and field selectors, and returns the list of ComponentStatuses that match those selectors. -func (c *componentStatuses) List(opts api.ListOptions) (result *api.ComponentStatusList, err error) { +func (c *componentStatuses) List(opts v1.ListOptions) (result *api.ComponentStatusList, err error) { result = &api.ComponentStatusList{} err = c.client.Get(). Resource("componentstatuses"). @@ -121,7 +122,7 @@ func (c *componentStatuses) List(opts api.ListOptions) (result *api.ComponentSta } // Watch returns a watch.Interface that watches the requested componentStatuses. -func (c *componentStatuses) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *componentStatuses) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Resource("componentstatuses"). @@ -130,7 +131,7 @@ func (c *componentStatuses) Watch(opts api.ListOptions) (watch.Interface, error) } // Patch applies the patch and returns the patched componentStatus. -func (c *componentStatuses) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.ComponentStatus, err error) { +func (c *componentStatuses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.ComponentStatus, err error) { result = &api.ComponentStatus{} err = c.client.Patch(pt). Resource("componentstatuses"). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/configmap.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/configmap.go index 9dcd3a93..cf9b31f0 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/configmap.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/configmap.go @@ -18,9 +18,10 @@ package internalversion import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // ConfigMapsGetter has a method to return a ConfigMapInterface. @@ -33,18 +34,18 @@ type ConfigMapsGetter interface { type ConfigMapInterface interface { Create(*api.ConfigMap) (*api.ConfigMap, error) Update(*api.ConfigMap) (*api.ConfigMap, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error Get(name string, options v1.GetOptions) (*api.ConfigMap, error) - List(opts api.ListOptions) (*api.ConfigMapList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.ConfigMap, err error) + List(opts v1.ListOptions) (*api.ConfigMapList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.ConfigMap, err error) ConfigMapExpansion } // configMaps implements ConfigMapInterface type configMaps struct { - client restclient.Interface + client rest.Interface ns string } @@ -82,7 +83,7 @@ func (c *configMaps) Update(configMap *api.ConfigMap) (result *api.ConfigMap, er } // Delete takes name of the configMap and deletes it. Returns an error if one occurs. -func (c *configMaps) Delete(name string, options *api.DeleteOptions) error { +func (c *configMaps) Delete(name string, options *v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("configmaps"). @@ -93,7 +94,7 @@ func (c *configMaps) Delete(name string, options *api.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *configMaps) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *configMaps) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("configmaps"). @@ -117,7 +118,7 @@ func (c *configMaps) Get(name string, options v1.GetOptions) (result *api.Config } // List takes label and field selectors, and returns the list of ConfigMaps that match those selectors. -func (c *configMaps) List(opts api.ListOptions) (result *api.ConfigMapList, err error) { +func (c *configMaps) List(opts v1.ListOptions) (result *api.ConfigMapList, err error) { result = &api.ConfigMapList{} err = c.client.Get(). Namespace(c.ns). @@ -129,7 +130,7 @@ func (c *configMaps) List(opts api.ListOptions) (result *api.ConfigMapList, err } // Watch returns a watch.Interface that watches the requested configMaps. -func (c *configMaps) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *configMaps) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -139,7 +140,7 @@ func (c *configMaps) Watch(opts api.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched configMap. -func (c *configMaps) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.ConfigMap, err error) { +func (c *configMaps) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.ConfigMap, err error) { result = &api.ConfigMap{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/core_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/core_client.go index 39fe89d6..b20f0005 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/core_client.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/core_client.go @@ -17,12 +17,12 @@ limitations under the License. package internalversion import ( + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type CoreInterface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface ComponentStatusesGetter ConfigMapsGetter EndpointsGetter @@ -43,7 +43,7 @@ type CoreInterface interface { // CoreClient is used to interact with features provided by the group. type CoreClient struct { - restClient restclient.Interface + restClient rest.Interface } func (c *CoreClient) ComponentStatuses() ComponentStatusInterface { @@ -111,12 +111,12 @@ func (c *CoreClient) ServiceAccounts(namespace string) ServiceAccountInterface { } // NewForConfig creates a new CoreClient for the given config. -func NewForConfig(c *restclient.Config) (*CoreClient, error) { +func NewForConfig(c *rest.Config) (*CoreClient, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -125,7 +125,7 @@ func NewForConfig(c *restclient.Config) (*CoreClient, error) { // NewForConfigOrDie creates a new CoreClient for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *CoreClient { +func NewForConfigOrDie(c *rest.Config) *CoreClient { client, err := NewForConfig(c) if err != nil { panic(err) @@ -134,11 +134,11 @@ func NewForConfigOrDie(c *restclient.Config) *CoreClient { } // New creates a new CoreClient for the given RESTClient. -func New(c restclient.Interface) *CoreClient { +func New(c rest.Interface) *CoreClient { return &CoreClient{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { // if core group is not registered, return an error g, err := api.Registry.Group("") if err != nil { @@ -146,7 +146,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/api" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } if config.GroupVersion == nil || config.GroupVersion.Group != g.GroupVersion.Group { copyGroupVersion := g.GroupVersion @@ -165,7 +165,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *CoreClient) RESTClient() restclient.Interface { +func (c *CoreClient) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/endpoints.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/endpoints.go index 9434d632..0ab38b36 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/endpoints.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/endpoints.go @@ -18,9 +18,10 @@ package internalversion import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // EndpointsGetter has a method to return a EndpointsInterface. @@ -33,18 +34,18 @@ type EndpointsGetter interface { type EndpointsInterface interface { Create(*api.Endpoints) (*api.Endpoints, error) Update(*api.Endpoints) (*api.Endpoints, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error Get(name string, options v1.GetOptions) (*api.Endpoints, error) - List(opts api.ListOptions) (*api.EndpointsList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.Endpoints, err error) + List(opts v1.ListOptions) (*api.EndpointsList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.Endpoints, err error) EndpointsExpansion } // endpoints implements EndpointsInterface type endpoints struct { - client restclient.Interface + client rest.Interface ns string } @@ -82,7 +83,7 @@ func (c *endpoints) Update(endpoints *api.Endpoints) (result *api.Endpoints, err } // Delete takes name of the endpoints and deletes it. Returns an error if one occurs. -func (c *endpoints) Delete(name string, options *api.DeleteOptions) error { +func (c *endpoints) Delete(name string, options *v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("endpoints"). @@ -93,7 +94,7 @@ func (c *endpoints) Delete(name string, options *api.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *endpoints) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *endpoints) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("endpoints"). @@ -117,7 +118,7 @@ func (c *endpoints) Get(name string, options v1.GetOptions) (result *api.Endpoin } // List takes label and field selectors, and returns the list of Endpoints that match those selectors. -func (c *endpoints) List(opts api.ListOptions) (result *api.EndpointsList, err error) { +func (c *endpoints) List(opts v1.ListOptions) (result *api.EndpointsList, err error) { result = &api.EndpointsList{} err = c.client.Get(). Namespace(c.ns). @@ -129,7 +130,7 @@ func (c *endpoints) List(opts api.ListOptions) (result *api.EndpointsList, err e } // Watch returns a watch.Interface that watches the requested endpoints. -func (c *endpoints) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *endpoints) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -139,7 +140,7 @@ func (c *endpoints) Watch(opts api.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched endpoints. -func (c *endpoints) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.Endpoints, err error) { +func (c *endpoints) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.Endpoints, err error) { result = &api.Endpoints{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/event.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/event.go index 3dcd0f75..1159ca37 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/event.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/event.go @@ -18,9 +18,10 @@ package internalversion import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // EventsGetter has a method to return a EventInterface. @@ -33,18 +34,18 @@ type EventsGetter interface { type EventInterface interface { Create(*api.Event) (*api.Event, error) Update(*api.Event) (*api.Event, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error Get(name string, options v1.GetOptions) (*api.Event, error) - List(opts api.ListOptions) (*api.EventList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.Event, err error) + List(opts v1.ListOptions) (*api.EventList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.Event, err error) EventExpansion } // events implements EventInterface type events struct { - client restclient.Interface + client rest.Interface ns string } @@ -82,7 +83,7 @@ func (c *events) Update(event *api.Event) (result *api.Event, err error) { } // Delete takes name of the event and deletes it. Returns an error if one occurs. -func (c *events) Delete(name string, options *api.DeleteOptions) error { +func (c *events) Delete(name string, options *v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("events"). @@ -93,7 +94,7 @@ func (c *events) Delete(name string, options *api.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *events) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *events) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("events"). @@ -117,7 +118,7 @@ func (c *events) Get(name string, options v1.GetOptions) (result *api.Event, err } // List takes label and field selectors, and returns the list of Events that match those selectors. -func (c *events) List(opts api.ListOptions) (result *api.EventList, err error) { +func (c *events) List(opts v1.ListOptions) (result *api.EventList, err error) { result = &api.EventList{} err = c.client.Get(). Namespace(c.ns). @@ -129,7 +130,7 @@ func (c *events) List(opts api.ListOptions) (result *api.EventList, err error) { } // Watch returns a watch.Interface that watches the requested events. -func (c *events) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *events) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -139,7 +140,7 @@ func (c *events) Watch(opts api.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched event. -func (c *events) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.Event, err error) { +func (c *events) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.Event, err error) { result = &api.Event{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/event_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/event_expansion.go index f7556b3d..6d78f82b 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/event_expansion.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/event_expansion.go @@ -19,10 +19,12 @@ package internalversion import ( "fmt" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" - "k8s.io/kubernetes/pkg/fields" ) // The EventExpansion interface allows manually adding extra methods to the EventInterface. @@ -84,7 +86,7 @@ func (e *events) PatchWithEventNamespace(incompleteEvent *api.Event, data []byte return nil, fmt.Errorf("can't patch an event with namespace '%v' in namespace '%v'", incompleteEvent.Namespace, e.ns) } result := &api.Event{} - err := e.client.Patch(api.StrategicMergePatchType). + err := e.client.Patch(types.StrategicMergePatchType). NamespaceIfScoped(incompleteEvent.Namespace, len(incompleteEvent.Namespace) > 0). Resource("events"). Name(incompleteEvent.Name). @@ -116,7 +118,7 @@ func (e *events) Search(objOrRef runtime.Object) (*api.EventList, error) { refUID = &stringRefUID } fieldSelector := e.GetFieldSelector(&ref.Name, &ref.Namespace, refKind, refUID) - return e.List(api.ListOptions{FieldSelector: fieldSelector}) + return e.List(metav1.ListOptions{FieldSelector: fieldSelector.String()}) } // Returns the appropriate field selector based on the API version being used to communicate with the server. diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/BUILD b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/BUILD index bc5886e0..03d34850 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/BUILD @@ -38,14 +38,15 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/client/clientset_generated/internalclientset/typed/core/internalversion:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", - "//pkg/fields:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_componentstatus.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_componentstatus.go index 35d22a0b..25a02016 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_componentstatus.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_componentstatus.go @@ -20,6 +20,7 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/kubernetes/pkg/api" core "k8s.io/kubernetes/pkg/client/testing/core" @@ -50,13 +51,13 @@ func (c *FakeComponentStatuses) Update(componentStatus *api.ComponentStatus) (re return obj.(*api.ComponentStatus), err } -func (c *FakeComponentStatuses) Delete(name string, options *api.DeleteOptions) error { +func (c *FakeComponentStatuses) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewRootDeleteAction(componentstatusesResource, name), &api.ComponentStatus{}) return err } -func (c *FakeComponentStatuses) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *FakeComponentStatuses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := core.NewRootDeleteCollectionAction(componentstatusesResource, listOptions) _, err := c.Fake.Invokes(action, &api.ComponentStatusList{}) @@ -72,7 +73,7 @@ func (c *FakeComponentStatuses) Get(name string, options v1.GetOptions) (result return obj.(*api.ComponentStatus), err } -func (c *FakeComponentStatuses) List(opts api.ListOptions) (result *api.ComponentStatusList, err error) { +func (c *FakeComponentStatuses) List(opts v1.ListOptions) (result *api.ComponentStatusList, err error) { obj, err := c.Fake. Invokes(core.NewRootListAction(componentstatusesResource, opts), &api.ComponentStatusList{}) if obj == nil { @@ -93,13 +94,13 @@ func (c *FakeComponentStatuses) List(opts api.ListOptions) (result *api.Componen } // Watch returns a watch.Interface that watches the requested componentStatuses. -func (c *FakeComponentStatuses) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *FakeComponentStatuses) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewRootWatchAction(componentstatusesResource, opts)) } // Patch applies the patch and returns the patched componentStatus. -func (c *FakeComponentStatuses) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.ComponentStatus, err error) { +func (c *FakeComponentStatuses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.ComponentStatus, err error) { obj, err := c.Fake. Invokes(core.NewRootPatchSubresourceAction(componentstatusesResource, name, data, subresources...), &api.ComponentStatus{}) if obj == nil { diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_configmap.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_configmap.go index ca7da8b8..f4bf6710 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_configmap.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_configmap.go @@ -20,6 +20,7 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/kubernetes/pkg/api" core "k8s.io/kubernetes/pkg/client/testing/core" @@ -53,14 +54,14 @@ func (c *FakeConfigMaps) Update(configMap *api.ConfigMap) (result *api.ConfigMap return obj.(*api.ConfigMap), err } -func (c *FakeConfigMaps) Delete(name string, options *api.DeleteOptions) error { +func (c *FakeConfigMaps) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewDeleteAction(configmapsResource, c.ns, name), &api.ConfigMap{}) return err } -func (c *FakeConfigMaps) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *FakeConfigMaps) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := core.NewDeleteCollectionAction(configmapsResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &api.ConfigMapList{}) @@ -77,7 +78,7 @@ func (c *FakeConfigMaps) Get(name string, options v1.GetOptions) (result *api.Co return obj.(*api.ConfigMap), err } -func (c *FakeConfigMaps) List(opts api.ListOptions) (result *api.ConfigMapList, err error) { +func (c *FakeConfigMaps) List(opts v1.ListOptions) (result *api.ConfigMapList, err error) { obj, err := c.Fake. Invokes(core.NewListAction(configmapsResource, c.ns, opts), &api.ConfigMapList{}) @@ -99,14 +100,14 @@ func (c *FakeConfigMaps) List(opts api.ListOptions) (result *api.ConfigMapList, } // Watch returns a watch.Interface that watches the requested configMaps. -func (c *FakeConfigMaps) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *FakeConfigMaps) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewWatchAction(configmapsResource, c.ns, opts)) } // Patch applies the patch and returns the patched configMap. -func (c *FakeConfigMaps) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.ConfigMap, err error) { +func (c *FakeConfigMaps) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.ConfigMap, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(configmapsResource, c.ns, name, data, subresources...), &api.ConfigMap{}) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_core_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_core_client.go index 10f001b4..da9719b5 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_core_client.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_core_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" internalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -92,7 +92,7 @@ func (c *FakeCore) ServiceAccounts(namespace string) internalversion.ServiceAcco // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeCore) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeCore) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_endpoints.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_endpoints.go index a7d80e9a..432add05 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_endpoints.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_endpoints.go @@ -20,6 +20,7 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/kubernetes/pkg/api" core "k8s.io/kubernetes/pkg/client/testing/core" @@ -53,14 +54,14 @@ func (c *FakeEndpoints) Update(endpoints *api.Endpoints) (result *api.Endpoints, return obj.(*api.Endpoints), err } -func (c *FakeEndpoints) Delete(name string, options *api.DeleteOptions) error { +func (c *FakeEndpoints) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewDeleteAction(endpointsResource, c.ns, name), &api.Endpoints{}) return err } -func (c *FakeEndpoints) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *FakeEndpoints) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := core.NewDeleteCollectionAction(endpointsResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &api.EndpointsList{}) @@ -77,7 +78,7 @@ func (c *FakeEndpoints) Get(name string, options v1.GetOptions) (result *api.End return obj.(*api.Endpoints), err } -func (c *FakeEndpoints) List(opts api.ListOptions) (result *api.EndpointsList, err error) { +func (c *FakeEndpoints) List(opts v1.ListOptions) (result *api.EndpointsList, err error) { obj, err := c.Fake. Invokes(core.NewListAction(endpointsResource, c.ns, opts), &api.EndpointsList{}) @@ -99,14 +100,14 @@ func (c *FakeEndpoints) List(opts api.ListOptions) (result *api.EndpointsList, e } // Watch returns a watch.Interface that watches the requested endpoints. -func (c *FakeEndpoints) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *FakeEndpoints) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewWatchAction(endpointsResource, c.ns, opts)) } // Patch applies the patch and returns the patched endpoints. -func (c *FakeEndpoints) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.Endpoints, err error) { +func (c *FakeEndpoints) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.Endpoints, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(endpointsResource, c.ns, name, data, subresources...), &api.Endpoints{}) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_event.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_event.go index f0bfbe93..78f526f8 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_event.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_event.go @@ -20,6 +20,7 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/kubernetes/pkg/api" core "k8s.io/kubernetes/pkg/client/testing/core" @@ -53,14 +54,14 @@ func (c *FakeEvents) Update(event *api.Event) (result *api.Event, err error) { return obj.(*api.Event), err } -func (c *FakeEvents) Delete(name string, options *api.DeleteOptions) error { +func (c *FakeEvents) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewDeleteAction(eventsResource, c.ns, name), &api.Event{}) return err } -func (c *FakeEvents) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *FakeEvents) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := core.NewDeleteCollectionAction(eventsResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &api.EventList{}) @@ -77,7 +78,7 @@ func (c *FakeEvents) Get(name string, options v1.GetOptions) (result *api.Event, return obj.(*api.Event), err } -func (c *FakeEvents) List(opts api.ListOptions) (result *api.EventList, err error) { +func (c *FakeEvents) List(opts v1.ListOptions) (result *api.EventList, err error) { obj, err := c.Fake. Invokes(core.NewListAction(eventsResource, c.ns, opts), &api.EventList{}) @@ -99,14 +100,14 @@ func (c *FakeEvents) List(opts api.ListOptions) (result *api.EventList, err erro } // Watch returns a watch.Interface that watches the requested events. -func (c *FakeEvents) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *FakeEvents) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewWatchAction(eventsResource, c.ns, opts)) } // Patch applies the patch and returns the patched event. -func (c *FakeEvents) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.Event, err error) { +func (c *FakeEvents) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.Event, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(eventsResource, c.ns, name, data, subresources...), &api.Event{}) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_event_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_event_expansion.go index da0bfbe1..5d133114 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_event_expansion.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_event_expansion.go @@ -17,10 +17,11 @@ limitations under the License. package fake import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/testing/core" - "k8s.io/kubernetes/pkg/fields" ) func (c *FakeEvents) CreateWithEventNamespace(event *api.Event) (*api.Event, error) { @@ -66,9 +67,9 @@ func (c *FakeEvents) PatchWithEventNamespace(event *api.Event, data []byte) (*ap // Search returns a list of events matching the specified object. func (c *FakeEvents) Search(objOrRef runtime.Object) (*api.EventList, error) { - action := core.NewRootListAction(eventsResource, api.ListOptions{}) + action := core.NewRootListAction(eventsResource, metav1.ListOptions{}) if c.ns != "" { - action = core.NewListAction(eventsResource, c.ns, api.ListOptions{}) + action = core.NewListAction(eventsResource, c.ns, metav1.ListOptions{}) } obj, err := c.Fake.Invokes(action, &api.EventList{}) if obj == nil { diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_limitrange.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_limitrange.go index 8137de3c..60b64368 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_limitrange.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_limitrange.go @@ -20,6 +20,7 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/kubernetes/pkg/api" core "k8s.io/kubernetes/pkg/client/testing/core" @@ -53,14 +54,14 @@ func (c *FakeLimitRanges) Update(limitRange *api.LimitRange) (result *api.LimitR return obj.(*api.LimitRange), err } -func (c *FakeLimitRanges) Delete(name string, options *api.DeleteOptions) error { +func (c *FakeLimitRanges) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewDeleteAction(limitrangesResource, c.ns, name), &api.LimitRange{}) return err } -func (c *FakeLimitRanges) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *FakeLimitRanges) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := core.NewDeleteCollectionAction(limitrangesResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &api.LimitRangeList{}) @@ -77,7 +78,7 @@ func (c *FakeLimitRanges) Get(name string, options v1.GetOptions) (result *api.L return obj.(*api.LimitRange), err } -func (c *FakeLimitRanges) List(opts api.ListOptions) (result *api.LimitRangeList, err error) { +func (c *FakeLimitRanges) List(opts v1.ListOptions) (result *api.LimitRangeList, err error) { obj, err := c.Fake. Invokes(core.NewListAction(limitrangesResource, c.ns, opts), &api.LimitRangeList{}) @@ -99,14 +100,14 @@ func (c *FakeLimitRanges) List(opts api.ListOptions) (result *api.LimitRangeList } // Watch returns a watch.Interface that watches the requested limitRanges. -func (c *FakeLimitRanges) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *FakeLimitRanges) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewWatchAction(limitrangesResource, c.ns, opts)) } // Patch applies the patch and returns the patched limitRange. -func (c *FakeLimitRanges) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.LimitRange, err error) { +func (c *FakeLimitRanges) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.LimitRange, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(limitrangesResource, c.ns, name, data, subresources...), &api.LimitRange{}) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_namespace.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_namespace.go index 9a6cf610..d56a744a 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_namespace.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_namespace.go @@ -20,6 +20,7 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/kubernetes/pkg/api" core "k8s.io/kubernetes/pkg/client/testing/core" @@ -59,13 +60,13 @@ func (c *FakeNamespaces) UpdateStatus(namespace *api.Namespace) (*api.Namespace, return obj.(*api.Namespace), err } -func (c *FakeNamespaces) Delete(name string, options *api.DeleteOptions) error { +func (c *FakeNamespaces) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewRootDeleteAction(namespacesResource, name), &api.Namespace{}) return err } -func (c *FakeNamespaces) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *FakeNamespaces) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := core.NewRootDeleteCollectionAction(namespacesResource, listOptions) _, err := c.Fake.Invokes(action, &api.NamespaceList{}) @@ -81,7 +82,7 @@ func (c *FakeNamespaces) Get(name string, options v1.GetOptions) (result *api.Na return obj.(*api.Namespace), err } -func (c *FakeNamespaces) List(opts api.ListOptions) (result *api.NamespaceList, err error) { +func (c *FakeNamespaces) List(opts v1.ListOptions) (result *api.NamespaceList, err error) { obj, err := c.Fake. Invokes(core.NewRootListAction(namespacesResource, opts), &api.NamespaceList{}) if obj == nil { @@ -102,13 +103,13 @@ func (c *FakeNamespaces) List(opts api.ListOptions) (result *api.NamespaceList, } // Watch returns a watch.Interface that watches the requested namespaces. -func (c *FakeNamespaces) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *FakeNamespaces) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewRootWatchAction(namespacesResource, opts)) } // Patch applies the patch and returns the patched namespace. -func (c *FakeNamespaces) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.Namespace, err error) { +func (c *FakeNamespaces) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.Namespace, err error) { obj, err := c.Fake. Invokes(core.NewRootPatchSubresourceAction(namespacesResource, name, data, subresources...), &api.Namespace{}) if obj == nil { diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_node.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_node.go index 2a77712c..92b76c93 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_node.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_node.go @@ -20,6 +20,7 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/kubernetes/pkg/api" core "k8s.io/kubernetes/pkg/client/testing/core" @@ -59,13 +60,13 @@ func (c *FakeNodes) UpdateStatus(node *api.Node) (*api.Node, error) { return obj.(*api.Node), err } -func (c *FakeNodes) Delete(name string, options *api.DeleteOptions) error { +func (c *FakeNodes) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewRootDeleteAction(nodesResource, name), &api.Node{}) return err } -func (c *FakeNodes) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *FakeNodes) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := core.NewRootDeleteCollectionAction(nodesResource, listOptions) _, err := c.Fake.Invokes(action, &api.NodeList{}) @@ -81,7 +82,7 @@ func (c *FakeNodes) Get(name string, options v1.GetOptions) (result *api.Node, e return obj.(*api.Node), err } -func (c *FakeNodes) List(opts api.ListOptions) (result *api.NodeList, err error) { +func (c *FakeNodes) List(opts v1.ListOptions) (result *api.NodeList, err error) { obj, err := c.Fake. Invokes(core.NewRootListAction(nodesResource, opts), &api.NodeList{}) if obj == nil { @@ -102,13 +103,13 @@ func (c *FakeNodes) List(opts api.ListOptions) (result *api.NodeList, err error) } // Watch returns a watch.Interface that watches the requested nodes. -func (c *FakeNodes) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *FakeNodes) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewRootWatchAction(nodesResource, opts)) } // Patch applies the patch and returns the patched node. -func (c *FakeNodes) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.Node, err error) { +func (c *FakeNodes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.Node, err error) { obj, err := c.Fake. Invokes(core.NewRootPatchSubresourceAction(nodesResource, name, data, subresources...), &api.Node{}) if obj == nil { diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_persistentvolume.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_persistentvolume.go index 28452904..7bd7d4d1 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_persistentvolume.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_persistentvolume.go @@ -20,6 +20,7 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/kubernetes/pkg/api" core "k8s.io/kubernetes/pkg/client/testing/core" @@ -59,13 +60,13 @@ func (c *FakePersistentVolumes) UpdateStatus(persistentVolume *api.PersistentVol return obj.(*api.PersistentVolume), err } -func (c *FakePersistentVolumes) Delete(name string, options *api.DeleteOptions) error { +func (c *FakePersistentVolumes) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewRootDeleteAction(persistentvolumesResource, name), &api.PersistentVolume{}) return err } -func (c *FakePersistentVolumes) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *FakePersistentVolumes) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := core.NewRootDeleteCollectionAction(persistentvolumesResource, listOptions) _, err := c.Fake.Invokes(action, &api.PersistentVolumeList{}) @@ -81,7 +82,7 @@ func (c *FakePersistentVolumes) Get(name string, options v1.GetOptions) (result return obj.(*api.PersistentVolume), err } -func (c *FakePersistentVolumes) List(opts api.ListOptions) (result *api.PersistentVolumeList, err error) { +func (c *FakePersistentVolumes) List(opts v1.ListOptions) (result *api.PersistentVolumeList, err error) { obj, err := c.Fake. Invokes(core.NewRootListAction(persistentvolumesResource, opts), &api.PersistentVolumeList{}) if obj == nil { @@ -102,13 +103,13 @@ func (c *FakePersistentVolumes) List(opts api.ListOptions) (result *api.Persiste } // Watch returns a watch.Interface that watches the requested persistentVolumes. -func (c *FakePersistentVolumes) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *FakePersistentVolumes) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewRootWatchAction(persistentvolumesResource, opts)) } // Patch applies the patch and returns the patched persistentVolume. -func (c *FakePersistentVolumes) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.PersistentVolume, err error) { +func (c *FakePersistentVolumes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.PersistentVolume, err error) { obj, err := c.Fake. Invokes(core.NewRootPatchSubresourceAction(persistentvolumesResource, name, data, subresources...), &api.PersistentVolume{}) if obj == nil { diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_persistentvolumeclaim.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_persistentvolumeclaim.go index 7823a7ce..a759e734 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_persistentvolumeclaim.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_persistentvolumeclaim.go @@ -20,6 +20,7 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/kubernetes/pkg/api" core "k8s.io/kubernetes/pkg/client/testing/core" @@ -63,14 +64,14 @@ func (c *FakePersistentVolumeClaims) UpdateStatus(persistentVolumeClaim *api.Per return obj.(*api.PersistentVolumeClaim), err } -func (c *FakePersistentVolumeClaims) Delete(name string, options *api.DeleteOptions) error { +func (c *FakePersistentVolumeClaims) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewDeleteAction(persistentvolumeclaimsResource, c.ns, name), &api.PersistentVolumeClaim{}) return err } -func (c *FakePersistentVolumeClaims) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *FakePersistentVolumeClaims) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := core.NewDeleteCollectionAction(persistentvolumeclaimsResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &api.PersistentVolumeClaimList{}) @@ -87,7 +88,7 @@ func (c *FakePersistentVolumeClaims) Get(name string, options v1.GetOptions) (re return obj.(*api.PersistentVolumeClaim), err } -func (c *FakePersistentVolumeClaims) List(opts api.ListOptions) (result *api.PersistentVolumeClaimList, err error) { +func (c *FakePersistentVolumeClaims) List(opts v1.ListOptions) (result *api.PersistentVolumeClaimList, err error) { obj, err := c.Fake. Invokes(core.NewListAction(persistentvolumeclaimsResource, c.ns, opts), &api.PersistentVolumeClaimList{}) @@ -109,14 +110,14 @@ func (c *FakePersistentVolumeClaims) List(opts api.ListOptions) (result *api.Per } // Watch returns a watch.Interface that watches the requested persistentVolumeClaims. -func (c *FakePersistentVolumeClaims) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *FakePersistentVolumeClaims) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewWatchAction(persistentvolumeclaimsResource, c.ns, opts)) } // Patch applies the patch and returns the patched persistentVolumeClaim. -func (c *FakePersistentVolumeClaims) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.PersistentVolumeClaim, err error) { +func (c *FakePersistentVolumeClaims) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.PersistentVolumeClaim, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(persistentvolumeclaimsResource, c.ns, name, data, subresources...), &api.PersistentVolumeClaim{}) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_pod.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_pod.go index cdf59c84..a37ed8f2 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_pod.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_pod.go @@ -20,6 +20,7 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/kubernetes/pkg/api" core "k8s.io/kubernetes/pkg/client/testing/core" @@ -63,14 +64,14 @@ func (c *FakePods) UpdateStatus(pod *api.Pod) (*api.Pod, error) { return obj.(*api.Pod), err } -func (c *FakePods) Delete(name string, options *api.DeleteOptions) error { +func (c *FakePods) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewDeleteAction(podsResource, c.ns, name), &api.Pod{}) return err } -func (c *FakePods) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *FakePods) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := core.NewDeleteCollectionAction(podsResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &api.PodList{}) @@ -87,7 +88,7 @@ func (c *FakePods) Get(name string, options v1.GetOptions) (result *api.Pod, err return obj.(*api.Pod), err } -func (c *FakePods) List(opts api.ListOptions) (result *api.PodList, err error) { +func (c *FakePods) List(opts v1.ListOptions) (result *api.PodList, err error) { obj, err := c.Fake. Invokes(core.NewListAction(podsResource, c.ns, opts), &api.PodList{}) @@ -109,14 +110,14 @@ func (c *FakePods) List(opts api.ListOptions) (result *api.PodList, err error) { } // Watch returns a watch.Interface that watches the requested pods. -func (c *FakePods) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *FakePods) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewWatchAction(podsResource, c.ns, opts)) } // Patch applies the patch and returns the patched pod. -func (c *FakePods) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.Pod, err error) { +func (c *FakePods) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.Pod, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(podsResource, c.ns, name, data, subresources...), &api.Pod{}) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_pod_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_pod_expansion.go index 26343982..9ae5c27e 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_pod_expansion.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_pod_expansion.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/testing/core" ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_podtemplate.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_podtemplate.go index e3fa73df..6849279c 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_podtemplate.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_podtemplate.go @@ -20,6 +20,7 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/kubernetes/pkg/api" core "k8s.io/kubernetes/pkg/client/testing/core" @@ -53,14 +54,14 @@ func (c *FakePodTemplates) Update(podTemplate *api.PodTemplate) (result *api.Pod return obj.(*api.PodTemplate), err } -func (c *FakePodTemplates) Delete(name string, options *api.DeleteOptions) error { +func (c *FakePodTemplates) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewDeleteAction(podtemplatesResource, c.ns, name), &api.PodTemplate{}) return err } -func (c *FakePodTemplates) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *FakePodTemplates) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := core.NewDeleteCollectionAction(podtemplatesResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &api.PodTemplateList{}) @@ -77,7 +78,7 @@ func (c *FakePodTemplates) Get(name string, options v1.GetOptions) (result *api. return obj.(*api.PodTemplate), err } -func (c *FakePodTemplates) List(opts api.ListOptions) (result *api.PodTemplateList, err error) { +func (c *FakePodTemplates) List(opts v1.ListOptions) (result *api.PodTemplateList, err error) { obj, err := c.Fake. Invokes(core.NewListAction(podtemplatesResource, c.ns, opts), &api.PodTemplateList{}) @@ -99,14 +100,14 @@ func (c *FakePodTemplates) List(opts api.ListOptions) (result *api.PodTemplateLi } // Watch returns a watch.Interface that watches the requested podTemplates. -func (c *FakePodTemplates) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *FakePodTemplates) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewWatchAction(podtemplatesResource, c.ns, opts)) } // Patch applies the patch and returns the patched podTemplate. -func (c *FakePodTemplates) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.PodTemplate, err error) { +func (c *FakePodTemplates) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.PodTemplate, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(podtemplatesResource, c.ns, name, data, subresources...), &api.PodTemplate{}) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_replicationcontroller.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_replicationcontroller.go index bc54d003..219f05f0 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_replicationcontroller.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_replicationcontroller.go @@ -20,6 +20,7 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/kubernetes/pkg/api" core "k8s.io/kubernetes/pkg/client/testing/core" @@ -63,14 +64,14 @@ func (c *FakeReplicationControllers) UpdateStatus(replicationController *api.Rep return obj.(*api.ReplicationController), err } -func (c *FakeReplicationControllers) Delete(name string, options *api.DeleteOptions) error { +func (c *FakeReplicationControllers) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewDeleteAction(replicationcontrollersResource, c.ns, name), &api.ReplicationController{}) return err } -func (c *FakeReplicationControllers) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *FakeReplicationControllers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := core.NewDeleteCollectionAction(replicationcontrollersResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &api.ReplicationControllerList{}) @@ -87,7 +88,7 @@ func (c *FakeReplicationControllers) Get(name string, options v1.GetOptions) (re return obj.(*api.ReplicationController), err } -func (c *FakeReplicationControllers) List(opts api.ListOptions) (result *api.ReplicationControllerList, err error) { +func (c *FakeReplicationControllers) List(opts v1.ListOptions) (result *api.ReplicationControllerList, err error) { obj, err := c.Fake. Invokes(core.NewListAction(replicationcontrollersResource, c.ns, opts), &api.ReplicationControllerList{}) @@ -109,14 +110,14 @@ func (c *FakeReplicationControllers) List(opts api.ListOptions) (result *api.Rep } // Watch returns a watch.Interface that watches the requested replicationControllers. -func (c *FakeReplicationControllers) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *FakeReplicationControllers) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewWatchAction(replicationcontrollersResource, c.ns, opts)) } // Patch applies the patch and returns the patched replicationController. -func (c *FakeReplicationControllers) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.ReplicationController, err error) { +func (c *FakeReplicationControllers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.ReplicationController, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(replicationcontrollersResource, c.ns, name, data, subresources...), &api.ReplicationController{}) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_resourcequota.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_resourcequota.go index e70257d0..8b43ed6d 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_resourcequota.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_resourcequota.go @@ -20,6 +20,7 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/kubernetes/pkg/api" core "k8s.io/kubernetes/pkg/client/testing/core" @@ -63,14 +64,14 @@ func (c *FakeResourceQuotas) UpdateStatus(resourceQuota *api.ResourceQuota) (*ap return obj.(*api.ResourceQuota), err } -func (c *FakeResourceQuotas) Delete(name string, options *api.DeleteOptions) error { +func (c *FakeResourceQuotas) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewDeleteAction(resourcequotasResource, c.ns, name), &api.ResourceQuota{}) return err } -func (c *FakeResourceQuotas) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *FakeResourceQuotas) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := core.NewDeleteCollectionAction(resourcequotasResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &api.ResourceQuotaList{}) @@ -87,7 +88,7 @@ func (c *FakeResourceQuotas) Get(name string, options v1.GetOptions) (result *ap return obj.(*api.ResourceQuota), err } -func (c *FakeResourceQuotas) List(opts api.ListOptions) (result *api.ResourceQuotaList, err error) { +func (c *FakeResourceQuotas) List(opts v1.ListOptions) (result *api.ResourceQuotaList, err error) { obj, err := c.Fake. Invokes(core.NewListAction(resourcequotasResource, c.ns, opts), &api.ResourceQuotaList{}) @@ -109,14 +110,14 @@ func (c *FakeResourceQuotas) List(opts api.ListOptions) (result *api.ResourceQuo } // Watch returns a watch.Interface that watches the requested resourceQuotas. -func (c *FakeResourceQuotas) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *FakeResourceQuotas) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewWatchAction(resourcequotasResource, c.ns, opts)) } // Patch applies the patch and returns the patched resourceQuota. -func (c *FakeResourceQuotas) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.ResourceQuota, err error) { +func (c *FakeResourceQuotas) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.ResourceQuota, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(resourcequotasResource, c.ns, name, data, subresources...), &api.ResourceQuota{}) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_secret.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_secret.go index 6451df68..76600c49 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_secret.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_secret.go @@ -20,6 +20,7 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/kubernetes/pkg/api" core "k8s.io/kubernetes/pkg/client/testing/core" @@ -53,14 +54,14 @@ func (c *FakeSecrets) Update(secret *api.Secret) (result *api.Secret, err error) return obj.(*api.Secret), err } -func (c *FakeSecrets) Delete(name string, options *api.DeleteOptions) error { +func (c *FakeSecrets) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewDeleteAction(secretsResource, c.ns, name), &api.Secret{}) return err } -func (c *FakeSecrets) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *FakeSecrets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := core.NewDeleteCollectionAction(secretsResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &api.SecretList{}) @@ -77,7 +78,7 @@ func (c *FakeSecrets) Get(name string, options v1.GetOptions) (result *api.Secre return obj.(*api.Secret), err } -func (c *FakeSecrets) List(opts api.ListOptions) (result *api.SecretList, err error) { +func (c *FakeSecrets) List(opts v1.ListOptions) (result *api.SecretList, err error) { obj, err := c.Fake. Invokes(core.NewListAction(secretsResource, c.ns, opts), &api.SecretList{}) @@ -99,14 +100,14 @@ func (c *FakeSecrets) List(opts api.ListOptions) (result *api.SecretList, err er } // Watch returns a watch.Interface that watches the requested secrets. -func (c *FakeSecrets) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *FakeSecrets) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewWatchAction(secretsResource, c.ns, opts)) } // Patch applies the patch and returns the patched secret. -func (c *FakeSecrets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.Secret, err error) { +func (c *FakeSecrets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.Secret, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(secretsResource, c.ns, name, data, subresources...), &api.Secret{}) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_service.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_service.go index 5cc5c2d6..8e98d16b 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_service.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_service.go @@ -20,6 +20,7 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/kubernetes/pkg/api" core "k8s.io/kubernetes/pkg/client/testing/core" @@ -63,14 +64,14 @@ func (c *FakeServices) UpdateStatus(service *api.Service) (*api.Service, error) return obj.(*api.Service), err } -func (c *FakeServices) Delete(name string, options *api.DeleteOptions) error { +func (c *FakeServices) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewDeleteAction(servicesResource, c.ns, name), &api.Service{}) return err } -func (c *FakeServices) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *FakeServices) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := core.NewDeleteCollectionAction(servicesResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &api.ServiceList{}) @@ -87,7 +88,7 @@ func (c *FakeServices) Get(name string, options v1.GetOptions) (result *api.Serv return obj.(*api.Service), err } -func (c *FakeServices) List(opts api.ListOptions) (result *api.ServiceList, err error) { +func (c *FakeServices) List(opts v1.ListOptions) (result *api.ServiceList, err error) { obj, err := c.Fake. Invokes(core.NewListAction(servicesResource, c.ns, opts), &api.ServiceList{}) @@ -109,14 +110,14 @@ func (c *FakeServices) List(opts api.ListOptions) (result *api.ServiceList, err } // Watch returns a watch.Interface that watches the requested services. -func (c *FakeServices) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *FakeServices) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewWatchAction(servicesResource, c.ns, opts)) } // Patch applies the patch and returns the patched service. -func (c *FakeServices) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.Service, err error) { +func (c *FakeServices) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.Service, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(servicesResource, c.ns, name, data, subresources...), &api.Service{}) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_service_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_service_expansion.go index 978585f6..51d6fa8d 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_service_expansion.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_service_expansion.go @@ -17,7 +17,7 @@ limitations under the License. package fake import ( - "k8s.io/kubernetes/pkg/client/restclient" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/client/testing/core" ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_serviceaccount.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_serviceaccount.go index f0b93a10..06e58703 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_serviceaccount.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/fake/fake_serviceaccount.go @@ -20,6 +20,7 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/kubernetes/pkg/api" core "k8s.io/kubernetes/pkg/client/testing/core" @@ -53,14 +54,14 @@ func (c *FakeServiceAccounts) Update(serviceAccount *api.ServiceAccount) (result return obj.(*api.ServiceAccount), err } -func (c *FakeServiceAccounts) Delete(name string, options *api.DeleteOptions) error { +func (c *FakeServiceAccounts) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewDeleteAction(serviceaccountsResource, c.ns, name), &api.ServiceAccount{}) return err } -func (c *FakeServiceAccounts) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *FakeServiceAccounts) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := core.NewDeleteCollectionAction(serviceaccountsResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &api.ServiceAccountList{}) @@ -77,7 +78,7 @@ func (c *FakeServiceAccounts) Get(name string, options v1.GetOptions) (result *a return obj.(*api.ServiceAccount), err } -func (c *FakeServiceAccounts) List(opts api.ListOptions) (result *api.ServiceAccountList, err error) { +func (c *FakeServiceAccounts) List(opts v1.ListOptions) (result *api.ServiceAccountList, err error) { obj, err := c.Fake. Invokes(core.NewListAction(serviceaccountsResource, c.ns, opts), &api.ServiceAccountList{}) @@ -99,14 +100,14 @@ func (c *FakeServiceAccounts) List(opts api.ListOptions) (result *api.ServiceAcc } // Watch returns a watch.Interface that watches the requested serviceAccounts. -func (c *FakeServiceAccounts) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *FakeServiceAccounts) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewWatchAction(serviceaccountsResource, c.ns, opts)) } // Patch applies the patch and returns the patched serviceAccount. -func (c *FakeServiceAccounts) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.ServiceAccount, err error) { +func (c *FakeServiceAccounts) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.ServiceAccount, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(serviceaccountsResource, c.ns, name, data, subresources...), &api.ServiceAccount{}) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/limitrange.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/limitrange.go index 168a999f..e5b47fc2 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/limitrange.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/limitrange.go @@ -18,9 +18,10 @@ package internalversion import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // LimitRangesGetter has a method to return a LimitRangeInterface. @@ -33,18 +34,18 @@ type LimitRangesGetter interface { type LimitRangeInterface interface { Create(*api.LimitRange) (*api.LimitRange, error) Update(*api.LimitRange) (*api.LimitRange, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error Get(name string, options v1.GetOptions) (*api.LimitRange, error) - List(opts api.ListOptions) (*api.LimitRangeList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.LimitRange, err error) + List(opts v1.ListOptions) (*api.LimitRangeList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.LimitRange, err error) LimitRangeExpansion } // limitRanges implements LimitRangeInterface type limitRanges struct { - client restclient.Interface + client rest.Interface ns string } @@ -82,7 +83,7 @@ func (c *limitRanges) Update(limitRange *api.LimitRange) (result *api.LimitRange } // Delete takes name of the limitRange and deletes it. Returns an error if one occurs. -func (c *limitRanges) Delete(name string, options *api.DeleteOptions) error { +func (c *limitRanges) Delete(name string, options *v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("limitranges"). @@ -93,7 +94,7 @@ func (c *limitRanges) Delete(name string, options *api.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *limitRanges) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *limitRanges) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("limitranges"). @@ -117,7 +118,7 @@ func (c *limitRanges) Get(name string, options v1.GetOptions) (result *api.Limit } // List takes label and field selectors, and returns the list of LimitRanges that match those selectors. -func (c *limitRanges) List(opts api.ListOptions) (result *api.LimitRangeList, err error) { +func (c *limitRanges) List(opts v1.ListOptions) (result *api.LimitRangeList, err error) { result = &api.LimitRangeList{} err = c.client.Get(). Namespace(c.ns). @@ -129,7 +130,7 @@ func (c *limitRanges) List(opts api.ListOptions) (result *api.LimitRangeList, er } // Watch returns a watch.Interface that watches the requested limitRanges. -func (c *limitRanges) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *limitRanges) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -139,7 +140,7 @@ func (c *limitRanges) Watch(opts api.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched limitRange. -func (c *limitRanges) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.LimitRange, err error) { +func (c *limitRanges) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.LimitRange, err error) { result = &api.LimitRange{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/namespace.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/namespace.go index 40b6e54e..fbcdd140 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/namespace.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/namespace.go @@ -18,9 +18,10 @@ package internalversion import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // NamespacesGetter has a method to return a NamespaceInterface. @@ -34,18 +35,18 @@ type NamespaceInterface interface { Create(*api.Namespace) (*api.Namespace, error) Update(*api.Namespace) (*api.Namespace, error) UpdateStatus(*api.Namespace) (*api.Namespace, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error Get(name string, options v1.GetOptions) (*api.Namespace, error) - List(opts api.ListOptions) (*api.NamespaceList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.Namespace, err error) + List(opts v1.ListOptions) (*api.NamespaceList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.Namespace, err error) NamespaceExpansion } // namespaces implements NamespaceInterface type namespaces struct { - client restclient.Interface + client rest.Interface } // newNamespaces returns a Namespaces @@ -94,7 +95,7 @@ func (c *namespaces) UpdateStatus(namespace *api.Namespace) (result *api.Namespa } // Delete takes name of the namespace and deletes it. Returns an error if one occurs. -func (c *namespaces) Delete(name string, options *api.DeleteOptions) error { +func (c *namespaces) Delete(name string, options *v1.DeleteOptions) error { return c.client.Delete(). Resource("namespaces"). Name(name). @@ -104,7 +105,7 @@ func (c *namespaces) Delete(name string, options *api.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *namespaces) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *namespaces) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { return c.client.Delete(). Resource("namespaces"). VersionedParams(&listOptions, api.ParameterCodec). @@ -126,7 +127,7 @@ func (c *namespaces) Get(name string, options v1.GetOptions) (result *api.Namesp } // List takes label and field selectors, and returns the list of Namespaces that match those selectors. -func (c *namespaces) List(opts api.ListOptions) (result *api.NamespaceList, err error) { +func (c *namespaces) List(opts v1.ListOptions) (result *api.NamespaceList, err error) { result = &api.NamespaceList{} err = c.client.Get(). Resource("namespaces"). @@ -137,7 +138,7 @@ func (c *namespaces) List(opts api.ListOptions) (result *api.NamespaceList, err } // Watch returns a watch.Interface that watches the requested namespaces. -func (c *namespaces) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *namespaces) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Resource("namespaces"). @@ -146,7 +147,7 @@ func (c *namespaces) Watch(opts api.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched namespace. -func (c *namespaces) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.Namespace, err error) { +func (c *namespaces) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.Namespace, err error) { result = &api.Namespace{} err = c.client.Patch(pt). Resource("namespaces"). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/node.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/node.go index ff58064f..39dce9e3 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/node.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/node.go @@ -18,9 +18,10 @@ package internalversion import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // NodesGetter has a method to return a NodeInterface. @@ -34,18 +35,18 @@ type NodeInterface interface { Create(*api.Node) (*api.Node, error) Update(*api.Node) (*api.Node, error) UpdateStatus(*api.Node) (*api.Node, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error Get(name string, options v1.GetOptions) (*api.Node, error) - List(opts api.ListOptions) (*api.NodeList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.Node, err error) + List(opts v1.ListOptions) (*api.NodeList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.Node, err error) NodeExpansion } // nodes implements NodeInterface type nodes struct { - client restclient.Interface + client rest.Interface } // newNodes returns a Nodes @@ -94,7 +95,7 @@ func (c *nodes) UpdateStatus(node *api.Node) (result *api.Node, err error) { } // Delete takes name of the node and deletes it. Returns an error if one occurs. -func (c *nodes) Delete(name string, options *api.DeleteOptions) error { +func (c *nodes) Delete(name string, options *v1.DeleteOptions) error { return c.client.Delete(). Resource("nodes"). Name(name). @@ -104,7 +105,7 @@ func (c *nodes) Delete(name string, options *api.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *nodes) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *nodes) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { return c.client.Delete(). Resource("nodes"). VersionedParams(&listOptions, api.ParameterCodec). @@ -126,7 +127,7 @@ func (c *nodes) Get(name string, options v1.GetOptions) (result *api.Node, err e } // List takes label and field selectors, and returns the list of Nodes that match those selectors. -func (c *nodes) List(opts api.ListOptions) (result *api.NodeList, err error) { +func (c *nodes) List(opts v1.ListOptions) (result *api.NodeList, err error) { result = &api.NodeList{} err = c.client.Get(). Resource("nodes"). @@ -137,7 +138,7 @@ func (c *nodes) List(opts api.ListOptions) (result *api.NodeList, err error) { } // Watch returns a watch.Interface that watches the requested nodes. -func (c *nodes) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *nodes) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Resource("nodes"). @@ -146,7 +147,7 @@ func (c *nodes) Watch(opts api.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched node. -func (c *nodes) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.Node, err error) { +func (c *nodes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.Node, err error) { result = &api.Node{} err = c.client.Patch(pt). Resource("nodes"). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/node_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/node_expansion.go index ec917502..b02fa083 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/node_expansion.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/node_expansion.go @@ -16,7 +16,10 @@ limitations under the License. package internalversion -import "k8s.io/kubernetes/pkg/api" +import ( + "k8s.io/apimachinery/pkg/types" + "k8s.io/kubernetes/pkg/api" +) // The NodeExpansion interface allows manually adding extra methods to the NodeInterface. type NodeExpansion interface { @@ -29,7 +32,7 @@ type NodeExpansion interface { // the node that the server returns, or an error. func (c *nodes) PatchStatus(nodeName string, data []byte) (*api.Node, error) { result := &api.Node{} - err := c.client.Patch(api.StrategicMergePatchType). + err := c.client.Patch(types.StrategicMergePatchType). Resource("nodes"). Name(nodeName). SubResource("status"). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/persistentvolume.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/persistentvolume.go index de06a7d0..7e6698a1 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/persistentvolume.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/persistentvolume.go @@ -18,9 +18,10 @@ package internalversion import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // PersistentVolumesGetter has a method to return a PersistentVolumeInterface. @@ -34,18 +35,18 @@ type PersistentVolumeInterface interface { Create(*api.PersistentVolume) (*api.PersistentVolume, error) Update(*api.PersistentVolume) (*api.PersistentVolume, error) UpdateStatus(*api.PersistentVolume) (*api.PersistentVolume, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error Get(name string, options v1.GetOptions) (*api.PersistentVolume, error) - List(opts api.ListOptions) (*api.PersistentVolumeList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.PersistentVolume, err error) + List(opts v1.ListOptions) (*api.PersistentVolumeList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.PersistentVolume, err error) PersistentVolumeExpansion } // persistentVolumes implements PersistentVolumeInterface type persistentVolumes struct { - client restclient.Interface + client rest.Interface } // newPersistentVolumes returns a PersistentVolumes @@ -94,7 +95,7 @@ func (c *persistentVolumes) UpdateStatus(persistentVolume *api.PersistentVolume) } // Delete takes name of the persistentVolume and deletes it. Returns an error if one occurs. -func (c *persistentVolumes) Delete(name string, options *api.DeleteOptions) error { +func (c *persistentVolumes) Delete(name string, options *v1.DeleteOptions) error { return c.client.Delete(). Resource("persistentvolumes"). Name(name). @@ -104,7 +105,7 @@ func (c *persistentVolumes) Delete(name string, options *api.DeleteOptions) erro } // DeleteCollection deletes a collection of objects. -func (c *persistentVolumes) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *persistentVolumes) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { return c.client.Delete(). Resource("persistentvolumes"). VersionedParams(&listOptions, api.ParameterCodec). @@ -126,7 +127,7 @@ func (c *persistentVolumes) Get(name string, options v1.GetOptions) (result *api } // List takes label and field selectors, and returns the list of PersistentVolumes that match those selectors. -func (c *persistentVolumes) List(opts api.ListOptions) (result *api.PersistentVolumeList, err error) { +func (c *persistentVolumes) List(opts v1.ListOptions) (result *api.PersistentVolumeList, err error) { result = &api.PersistentVolumeList{} err = c.client.Get(). Resource("persistentvolumes"). @@ -137,7 +138,7 @@ func (c *persistentVolumes) List(opts api.ListOptions) (result *api.PersistentVo } // Watch returns a watch.Interface that watches the requested persistentVolumes. -func (c *persistentVolumes) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *persistentVolumes) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Resource("persistentvolumes"). @@ -146,7 +147,7 @@ func (c *persistentVolumes) Watch(opts api.ListOptions) (watch.Interface, error) } // Patch applies the patch and returns the patched persistentVolume. -func (c *persistentVolumes) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.PersistentVolume, err error) { +func (c *persistentVolumes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.PersistentVolume, err error) { result = &api.PersistentVolume{} err = c.client.Patch(pt). Resource("persistentvolumes"). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/persistentvolumeclaim.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/persistentvolumeclaim.go index 89d0a8c9..e3187cd3 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/persistentvolumeclaim.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/persistentvolumeclaim.go @@ -18,9 +18,10 @@ package internalversion import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // PersistentVolumeClaimsGetter has a method to return a PersistentVolumeClaimInterface. @@ -34,18 +35,18 @@ type PersistentVolumeClaimInterface interface { Create(*api.PersistentVolumeClaim) (*api.PersistentVolumeClaim, error) Update(*api.PersistentVolumeClaim) (*api.PersistentVolumeClaim, error) UpdateStatus(*api.PersistentVolumeClaim) (*api.PersistentVolumeClaim, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error Get(name string, options v1.GetOptions) (*api.PersistentVolumeClaim, error) - List(opts api.ListOptions) (*api.PersistentVolumeClaimList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.PersistentVolumeClaim, err error) + List(opts v1.ListOptions) (*api.PersistentVolumeClaimList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.PersistentVolumeClaim, err error) PersistentVolumeClaimExpansion } // persistentVolumeClaims implements PersistentVolumeClaimInterface type persistentVolumeClaims struct { - client restclient.Interface + client rest.Interface ns string } @@ -99,7 +100,7 @@ func (c *persistentVolumeClaims) UpdateStatus(persistentVolumeClaim *api.Persist } // Delete takes name of the persistentVolumeClaim and deletes it. Returns an error if one occurs. -func (c *persistentVolumeClaims) Delete(name string, options *api.DeleteOptions) error { +func (c *persistentVolumeClaims) Delete(name string, options *v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("persistentvolumeclaims"). @@ -110,7 +111,7 @@ func (c *persistentVolumeClaims) Delete(name string, options *api.DeleteOptions) } // DeleteCollection deletes a collection of objects. -func (c *persistentVolumeClaims) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *persistentVolumeClaims) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("persistentvolumeclaims"). @@ -134,7 +135,7 @@ func (c *persistentVolumeClaims) Get(name string, options v1.GetOptions) (result } // List takes label and field selectors, and returns the list of PersistentVolumeClaims that match those selectors. -func (c *persistentVolumeClaims) List(opts api.ListOptions) (result *api.PersistentVolumeClaimList, err error) { +func (c *persistentVolumeClaims) List(opts v1.ListOptions) (result *api.PersistentVolumeClaimList, err error) { result = &api.PersistentVolumeClaimList{} err = c.client.Get(). Namespace(c.ns). @@ -146,7 +147,7 @@ func (c *persistentVolumeClaims) List(opts api.ListOptions) (result *api.Persist } // Watch returns a watch.Interface that watches the requested persistentVolumeClaims. -func (c *persistentVolumeClaims) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *persistentVolumeClaims) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -156,7 +157,7 @@ func (c *persistentVolumeClaims) Watch(opts api.ListOptions) (watch.Interface, e } // Patch applies the patch and returns the patched persistentVolumeClaim. -func (c *persistentVolumeClaims) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.PersistentVolumeClaim, err error) { +func (c *persistentVolumeClaims) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.PersistentVolumeClaim, err error) { result = &api.PersistentVolumeClaim{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/pod.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/pod.go index 52fcd815..56f3df94 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/pod.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/pod.go @@ -18,9 +18,10 @@ package internalversion import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // PodsGetter has a method to return a PodInterface. @@ -34,18 +35,18 @@ type PodInterface interface { Create(*api.Pod) (*api.Pod, error) Update(*api.Pod) (*api.Pod, error) UpdateStatus(*api.Pod) (*api.Pod, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error Get(name string, options v1.GetOptions) (*api.Pod, error) - List(opts api.ListOptions) (*api.PodList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.Pod, err error) + List(opts v1.ListOptions) (*api.PodList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.Pod, err error) PodExpansion } // pods implements PodInterface type pods struct { - client restclient.Interface + client rest.Interface ns string } @@ -99,7 +100,7 @@ func (c *pods) UpdateStatus(pod *api.Pod) (result *api.Pod, err error) { } // Delete takes name of the pod and deletes it. Returns an error if one occurs. -func (c *pods) Delete(name string, options *api.DeleteOptions) error { +func (c *pods) Delete(name string, options *v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("pods"). @@ -110,7 +111,7 @@ func (c *pods) Delete(name string, options *api.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *pods) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *pods) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("pods"). @@ -134,7 +135,7 @@ func (c *pods) Get(name string, options v1.GetOptions) (result *api.Pod, err err } // List takes label and field selectors, and returns the list of Pods that match those selectors. -func (c *pods) List(opts api.ListOptions) (result *api.PodList, err error) { +func (c *pods) List(opts v1.ListOptions) (result *api.PodList, err error) { result = &api.PodList{} err = c.client.Get(). Namespace(c.ns). @@ -146,7 +147,7 @@ func (c *pods) List(opts api.ListOptions) (result *api.PodList, err error) { } // Watch returns a watch.Interface that watches the requested pods. -func (c *pods) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *pods) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -156,7 +157,7 @@ func (c *pods) Watch(opts api.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched pod. -func (c *pods) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.Pod, err error) { +func (c *pods) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.Pod, err error) { result = &api.Pod{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/pod_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/pod_expansion.go index be7dd3a7..d6ea139a 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/pod_expansion.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/pod_expansion.go @@ -17,8 +17,8 @@ limitations under the License. package internalversion import ( + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/client/restclient" ) // The PodExpansion interface allows manually adding extra methods to the PodInterface. diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/podtemplate.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/podtemplate.go index 24ceddd3..43b5b430 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/podtemplate.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/podtemplate.go @@ -18,9 +18,10 @@ package internalversion import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // PodTemplatesGetter has a method to return a PodTemplateInterface. @@ -33,18 +34,18 @@ type PodTemplatesGetter interface { type PodTemplateInterface interface { Create(*api.PodTemplate) (*api.PodTemplate, error) Update(*api.PodTemplate) (*api.PodTemplate, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error Get(name string, options v1.GetOptions) (*api.PodTemplate, error) - List(opts api.ListOptions) (*api.PodTemplateList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.PodTemplate, err error) + List(opts v1.ListOptions) (*api.PodTemplateList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.PodTemplate, err error) PodTemplateExpansion } // podTemplates implements PodTemplateInterface type podTemplates struct { - client restclient.Interface + client rest.Interface ns string } @@ -82,7 +83,7 @@ func (c *podTemplates) Update(podTemplate *api.PodTemplate) (result *api.PodTemp } // Delete takes name of the podTemplate and deletes it. Returns an error if one occurs. -func (c *podTemplates) Delete(name string, options *api.DeleteOptions) error { +func (c *podTemplates) Delete(name string, options *v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("podtemplates"). @@ -93,7 +94,7 @@ func (c *podTemplates) Delete(name string, options *api.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *podTemplates) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *podTemplates) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("podtemplates"). @@ -117,7 +118,7 @@ func (c *podTemplates) Get(name string, options v1.GetOptions) (result *api.PodT } // List takes label and field selectors, and returns the list of PodTemplates that match those selectors. -func (c *podTemplates) List(opts api.ListOptions) (result *api.PodTemplateList, err error) { +func (c *podTemplates) List(opts v1.ListOptions) (result *api.PodTemplateList, err error) { result = &api.PodTemplateList{} err = c.client.Get(). Namespace(c.ns). @@ -129,7 +130,7 @@ func (c *podTemplates) List(opts api.ListOptions) (result *api.PodTemplateList, } // Watch returns a watch.Interface that watches the requested podTemplates. -func (c *podTemplates) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *podTemplates) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -139,7 +140,7 @@ func (c *podTemplates) Watch(opts api.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched podTemplate. -func (c *podTemplates) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.PodTemplate, err error) { +func (c *podTemplates) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.PodTemplate, err error) { result = &api.PodTemplate{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/replicationcontroller.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/replicationcontroller.go index 0e3fa1e9..3b133aa1 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/replicationcontroller.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/replicationcontroller.go @@ -18,9 +18,10 @@ package internalversion import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // ReplicationControllersGetter has a method to return a ReplicationControllerInterface. @@ -34,18 +35,18 @@ type ReplicationControllerInterface interface { Create(*api.ReplicationController) (*api.ReplicationController, error) Update(*api.ReplicationController) (*api.ReplicationController, error) UpdateStatus(*api.ReplicationController) (*api.ReplicationController, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error Get(name string, options v1.GetOptions) (*api.ReplicationController, error) - List(opts api.ListOptions) (*api.ReplicationControllerList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.ReplicationController, err error) + List(opts v1.ListOptions) (*api.ReplicationControllerList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.ReplicationController, err error) ReplicationControllerExpansion } // replicationControllers implements ReplicationControllerInterface type replicationControllers struct { - client restclient.Interface + client rest.Interface ns string } @@ -99,7 +100,7 @@ func (c *replicationControllers) UpdateStatus(replicationController *api.Replica } // Delete takes name of the replicationController and deletes it. Returns an error if one occurs. -func (c *replicationControllers) Delete(name string, options *api.DeleteOptions) error { +func (c *replicationControllers) Delete(name string, options *v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("replicationcontrollers"). @@ -110,7 +111,7 @@ func (c *replicationControllers) Delete(name string, options *api.DeleteOptions) } // DeleteCollection deletes a collection of objects. -func (c *replicationControllers) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *replicationControllers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("replicationcontrollers"). @@ -134,7 +135,7 @@ func (c *replicationControllers) Get(name string, options v1.GetOptions) (result } // List takes label and field selectors, and returns the list of ReplicationControllers that match those selectors. -func (c *replicationControllers) List(opts api.ListOptions) (result *api.ReplicationControllerList, err error) { +func (c *replicationControllers) List(opts v1.ListOptions) (result *api.ReplicationControllerList, err error) { result = &api.ReplicationControllerList{} err = c.client.Get(). Namespace(c.ns). @@ -146,7 +147,7 @@ func (c *replicationControllers) List(opts api.ListOptions) (result *api.Replica } // Watch returns a watch.Interface that watches the requested replicationControllers. -func (c *replicationControllers) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *replicationControllers) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -156,7 +157,7 @@ func (c *replicationControllers) Watch(opts api.ListOptions) (watch.Interface, e } // Patch applies the patch and returns the patched replicationController. -func (c *replicationControllers) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.ReplicationController, err error) { +func (c *replicationControllers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.ReplicationController, err error) { result = &api.ReplicationController{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/resourcequota.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/resourcequota.go index 58eacc81..850d7013 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/resourcequota.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/resourcequota.go @@ -18,9 +18,10 @@ package internalversion import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // ResourceQuotasGetter has a method to return a ResourceQuotaInterface. @@ -34,18 +35,18 @@ type ResourceQuotaInterface interface { Create(*api.ResourceQuota) (*api.ResourceQuota, error) Update(*api.ResourceQuota) (*api.ResourceQuota, error) UpdateStatus(*api.ResourceQuota) (*api.ResourceQuota, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error Get(name string, options v1.GetOptions) (*api.ResourceQuota, error) - List(opts api.ListOptions) (*api.ResourceQuotaList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.ResourceQuota, err error) + List(opts v1.ListOptions) (*api.ResourceQuotaList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.ResourceQuota, err error) ResourceQuotaExpansion } // resourceQuotas implements ResourceQuotaInterface type resourceQuotas struct { - client restclient.Interface + client rest.Interface ns string } @@ -99,7 +100,7 @@ func (c *resourceQuotas) UpdateStatus(resourceQuota *api.ResourceQuota) (result } // Delete takes name of the resourceQuota and deletes it. Returns an error if one occurs. -func (c *resourceQuotas) Delete(name string, options *api.DeleteOptions) error { +func (c *resourceQuotas) Delete(name string, options *v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("resourcequotas"). @@ -110,7 +111,7 @@ func (c *resourceQuotas) Delete(name string, options *api.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *resourceQuotas) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *resourceQuotas) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("resourcequotas"). @@ -134,7 +135,7 @@ func (c *resourceQuotas) Get(name string, options v1.GetOptions) (result *api.Re } // List takes label and field selectors, and returns the list of ResourceQuotas that match those selectors. -func (c *resourceQuotas) List(opts api.ListOptions) (result *api.ResourceQuotaList, err error) { +func (c *resourceQuotas) List(opts v1.ListOptions) (result *api.ResourceQuotaList, err error) { result = &api.ResourceQuotaList{} err = c.client.Get(). Namespace(c.ns). @@ -146,7 +147,7 @@ func (c *resourceQuotas) List(opts api.ListOptions) (result *api.ResourceQuotaLi } // Watch returns a watch.Interface that watches the requested resourceQuotas. -func (c *resourceQuotas) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *resourceQuotas) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -156,7 +157,7 @@ func (c *resourceQuotas) Watch(opts api.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched resourceQuota. -func (c *resourceQuotas) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.ResourceQuota, err error) { +func (c *resourceQuotas) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.ResourceQuota, err error) { result = &api.ResourceQuota{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/secret.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/secret.go index 632636f1..d91f0d9d 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/secret.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/secret.go @@ -18,9 +18,10 @@ package internalversion import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // SecretsGetter has a method to return a SecretInterface. @@ -33,18 +34,18 @@ type SecretsGetter interface { type SecretInterface interface { Create(*api.Secret) (*api.Secret, error) Update(*api.Secret) (*api.Secret, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error Get(name string, options v1.GetOptions) (*api.Secret, error) - List(opts api.ListOptions) (*api.SecretList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.Secret, err error) + List(opts v1.ListOptions) (*api.SecretList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.Secret, err error) SecretExpansion } // secrets implements SecretInterface type secrets struct { - client restclient.Interface + client rest.Interface ns string } @@ -82,7 +83,7 @@ func (c *secrets) Update(secret *api.Secret) (result *api.Secret, err error) { } // Delete takes name of the secret and deletes it. Returns an error if one occurs. -func (c *secrets) Delete(name string, options *api.DeleteOptions) error { +func (c *secrets) Delete(name string, options *v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("secrets"). @@ -93,7 +94,7 @@ func (c *secrets) Delete(name string, options *api.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *secrets) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *secrets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("secrets"). @@ -117,7 +118,7 @@ func (c *secrets) Get(name string, options v1.GetOptions) (result *api.Secret, e } // List takes label and field selectors, and returns the list of Secrets that match those selectors. -func (c *secrets) List(opts api.ListOptions) (result *api.SecretList, err error) { +func (c *secrets) List(opts v1.ListOptions) (result *api.SecretList, err error) { result = &api.SecretList{} err = c.client.Get(). Namespace(c.ns). @@ -129,7 +130,7 @@ func (c *secrets) List(opts api.ListOptions) (result *api.SecretList, err error) } // Watch returns a watch.Interface that watches the requested secrets. -func (c *secrets) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *secrets) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -139,7 +140,7 @@ func (c *secrets) Watch(opts api.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched secret. -func (c *secrets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.Secret, err error) { +func (c *secrets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.Secret, err error) { result = &api.Secret{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/service.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/service.go index 4aff717f..abb74194 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/service.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/service.go @@ -18,9 +18,10 @@ package internalversion import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // ServicesGetter has a method to return a ServiceInterface. @@ -34,18 +35,18 @@ type ServiceInterface interface { Create(*api.Service) (*api.Service, error) Update(*api.Service) (*api.Service, error) UpdateStatus(*api.Service) (*api.Service, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error Get(name string, options v1.GetOptions) (*api.Service, error) - List(opts api.ListOptions) (*api.ServiceList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.Service, err error) + List(opts v1.ListOptions) (*api.ServiceList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.Service, err error) ServiceExpansion } // services implements ServiceInterface type services struct { - client restclient.Interface + client rest.Interface ns string } @@ -99,7 +100,7 @@ func (c *services) UpdateStatus(service *api.Service) (result *api.Service, err } // Delete takes name of the service and deletes it. Returns an error if one occurs. -func (c *services) Delete(name string, options *api.DeleteOptions) error { +func (c *services) Delete(name string, options *v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("services"). @@ -110,7 +111,7 @@ func (c *services) Delete(name string, options *api.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *services) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *services) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("services"). @@ -134,7 +135,7 @@ func (c *services) Get(name string, options v1.GetOptions) (result *api.Service, } // List takes label and field selectors, and returns the list of Services that match those selectors. -func (c *services) List(opts api.ListOptions) (result *api.ServiceList, err error) { +func (c *services) List(opts v1.ListOptions) (result *api.ServiceList, err error) { result = &api.ServiceList{} err = c.client.Get(). Namespace(c.ns). @@ -146,7 +147,7 @@ func (c *services) List(opts api.ListOptions) (result *api.ServiceList, err erro } // Watch returns a watch.Interface that watches the requested services. -func (c *services) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *services) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -156,7 +157,7 @@ func (c *services) Watch(opts api.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched service. -func (c *services) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.Service, err error) { +func (c *services) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.Service, err error) { result = &api.Service{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/service_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/service_expansion.go index 45d928bd..85d2c720 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/service_expansion.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/service_expansion.go @@ -18,7 +18,7 @@ package internalversion import ( "k8s.io/apimachinery/pkg/util/net" - "k8s.io/kubernetes/pkg/client/restclient" + restclient "k8s.io/client-go/rest" ) // The ServiceExpansion interface allows manually adding extra methods to the ServiceInterface. diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/serviceaccount.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/serviceaccount.go index e7e92780..32aaff76 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/serviceaccount.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/serviceaccount.go @@ -18,9 +18,10 @@ package internalversion import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // ServiceAccountsGetter has a method to return a ServiceAccountInterface. @@ -33,18 +34,18 @@ type ServiceAccountsGetter interface { type ServiceAccountInterface interface { Create(*api.ServiceAccount) (*api.ServiceAccount, error) Update(*api.ServiceAccount) (*api.ServiceAccount, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error Get(name string, options v1.GetOptions) (*api.ServiceAccount, error) - List(opts api.ListOptions) (*api.ServiceAccountList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.ServiceAccount, err error) + List(opts v1.ListOptions) (*api.ServiceAccountList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.ServiceAccount, err error) ServiceAccountExpansion } // serviceAccounts implements ServiceAccountInterface type serviceAccounts struct { - client restclient.Interface + client rest.Interface ns string } @@ -82,7 +83,7 @@ func (c *serviceAccounts) Update(serviceAccount *api.ServiceAccount) (result *ap } // Delete takes name of the serviceAccount and deletes it. Returns an error if one occurs. -func (c *serviceAccounts) Delete(name string, options *api.DeleteOptions) error { +func (c *serviceAccounts) Delete(name string, options *v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("serviceaccounts"). @@ -93,7 +94,7 @@ func (c *serviceAccounts) Delete(name string, options *api.DeleteOptions) error } // DeleteCollection deletes a collection of objects. -func (c *serviceAccounts) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *serviceAccounts) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("serviceaccounts"). @@ -117,7 +118,7 @@ func (c *serviceAccounts) Get(name string, options v1.GetOptions) (result *api.S } // List takes label and field selectors, and returns the list of ServiceAccounts that match those selectors. -func (c *serviceAccounts) List(opts api.ListOptions) (result *api.ServiceAccountList, err error) { +func (c *serviceAccounts) List(opts v1.ListOptions) (result *api.ServiceAccountList, err error) { result = &api.ServiceAccountList{} err = c.client.Get(). Namespace(c.ns). @@ -129,7 +130,7 @@ func (c *serviceAccounts) List(opts api.ListOptions) (result *api.ServiceAccount } // Watch returns a watch.Interface that watches the requested serviceAccounts. -func (c *serviceAccounts) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *serviceAccounts) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -139,7 +140,7 @@ func (c *serviceAccounts) Watch(opts api.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched serviceAccount. -func (c *serviceAccounts) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.ServiceAccount, err error) { +func (c *serviceAccounts) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.ServiceAccount, err error) { result = &api.ServiceAccount{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/BUILD b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/BUILD index b40c089c..a9795f2e 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/BUILD @@ -28,11 +28,12 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/apis/extensions:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/meta", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/daemonset.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/daemonset.go index 9e9dcee2..e172f810 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/daemonset.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/daemonset.go @@ -18,10 +18,11 @@ package internalversion import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" extensions "k8s.io/kubernetes/pkg/apis/extensions" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // DaemonSetsGetter has a method to return a DaemonSetInterface. @@ -35,18 +36,18 @@ type DaemonSetInterface interface { Create(*extensions.DaemonSet) (*extensions.DaemonSet, error) Update(*extensions.DaemonSet) (*extensions.DaemonSet, error) UpdateStatus(*extensions.DaemonSet) (*extensions.DaemonSet, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error Get(name string, options v1.GetOptions) (*extensions.DaemonSet, error) - List(opts api.ListOptions) (*extensions.DaemonSetList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *extensions.DaemonSet, err error) + List(opts v1.ListOptions) (*extensions.DaemonSetList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *extensions.DaemonSet, err error) DaemonSetExpansion } // daemonSets implements DaemonSetInterface type daemonSets struct { - client restclient.Interface + client rest.Interface ns string } @@ -100,7 +101,7 @@ func (c *daemonSets) UpdateStatus(daemonSet *extensions.DaemonSet) (result *exte } // Delete takes name of the daemonSet and deletes it. Returns an error if one occurs. -func (c *daemonSets) Delete(name string, options *api.DeleteOptions) error { +func (c *daemonSets) Delete(name string, options *v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("daemonsets"). @@ -111,7 +112,7 @@ func (c *daemonSets) Delete(name string, options *api.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *daemonSets) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *daemonSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("daemonsets"). @@ -135,7 +136,7 @@ func (c *daemonSets) Get(name string, options v1.GetOptions) (result *extensions } // List takes label and field selectors, and returns the list of DaemonSets that match those selectors. -func (c *daemonSets) List(opts api.ListOptions) (result *extensions.DaemonSetList, err error) { +func (c *daemonSets) List(opts v1.ListOptions) (result *extensions.DaemonSetList, err error) { result = &extensions.DaemonSetList{} err = c.client.Get(). Namespace(c.ns). @@ -147,7 +148,7 @@ func (c *daemonSets) List(opts api.ListOptions) (result *extensions.DaemonSetLis } // Watch returns a watch.Interface that watches the requested daemonSets. -func (c *daemonSets) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *daemonSets) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -157,7 +158,7 @@ func (c *daemonSets) Watch(opts api.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched daemonSet. -func (c *daemonSets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *extensions.DaemonSet, err error) { +func (c *daemonSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *extensions.DaemonSet, err error) { result = &extensions.DaemonSet{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/deployment.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/deployment.go index 949f30e2..cb525a95 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/deployment.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/deployment.go @@ -18,10 +18,11 @@ package internalversion import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" extensions "k8s.io/kubernetes/pkg/apis/extensions" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // DeploymentsGetter has a method to return a DeploymentInterface. @@ -35,18 +36,18 @@ type DeploymentInterface interface { Create(*extensions.Deployment) (*extensions.Deployment, error) Update(*extensions.Deployment) (*extensions.Deployment, error) UpdateStatus(*extensions.Deployment) (*extensions.Deployment, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error Get(name string, options v1.GetOptions) (*extensions.Deployment, error) - List(opts api.ListOptions) (*extensions.DeploymentList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *extensions.Deployment, err error) + List(opts v1.ListOptions) (*extensions.DeploymentList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *extensions.Deployment, err error) DeploymentExpansion } // deployments implements DeploymentInterface type deployments struct { - client restclient.Interface + client rest.Interface ns string } @@ -100,7 +101,7 @@ func (c *deployments) UpdateStatus(deployment *extensions.Deployment) (result *e } // Delete takes name of the deployment and deletes it. Returns an error if one occurs. -func (c *deployments) Delete(name string, options *api.DeleteOptions) error { +func (c *deployments) Delete(name string, options *v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("deployments"). @@ -111,7 +112,7 @@ func (c *deployments) Delete(name string, options *api.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *deployments) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *deployments) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("deployments"). @@ -135,7 +136,7 @@ func (c *deployments) Get(name string, options v1.GetOptions) (result *extension } // List takes label and field selectors, and returns the list of Deployments that match those selectors. -func (c *deployments) List(opts api.ListOptions) (result *extensions.DeploymentList, err error) { +func (c *deployments) List(opts v1.ListOptions) (result *extensions.DeploymentList, err error) { result = &extensions.DeploymentList{} err = c.client.Get(). Namespace(c.ns). @@ -147,7 +148,7 @@ func (c *deployments) List(opts api.ListOptions) (result *extensions.DeploymentL } // Watch returns a watch.Interface that watches the requested deployments. -func (c *deployments) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *deployments) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -157,7 +158,7 @@ func (c *deployments) Watch(opts api.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched deployment. -func (c *deployments) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *extensions.Deployment, err error) { +func (c *deployments) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *extensions.Deployment, err error) { result = &extensions.Deployment{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/extensions_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/extensions_client.go index b3448f7d..31a0fdde 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/extensions_client.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/extensions_client.go @@ -17,12 +17,12 @@ limitations under the License. package internalversion import ( + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type ExtensionsInterface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface DaemonSetsGetter DeploymentsGetter IngressesGetter @@ -35,7 +35,7 @@ type ExtensionsInterface interface { // ExtensionsClient is used to interact with features provided by the extensions group. type ExtensionsClient struct { - restClient restclient.Interface + restClient rest.Interface } func (c *ExtensionsClient) DaemonSets(namespace string) DaemonSetInterface { @@ -71,12 +71,12 @@ func (c *ExtensionsClient) ThirdPartyResources() ThirdPartyResourceInterface { } // NewForConfig creates a new ExtensionsClient for the given config. -func NewForConfig(c *restclient.Config) (*ExtensionsClient, error) { +func NewForConfig(c *rest.Config) (*ExtensionsClient, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -85,7 +85,7 @@ func NewForConfig(c *restclient.Config) (*ExtensionsClient, error) { // NewForConfigOrDie creates a new ExtensionsClient for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *ExtensionsClient { +func NewForConfigOrDie(c *rest.Config) *ExtensionsClient { client, err := NewForConfig(c) if err != nil { panic(err) @@ -94,11 +94,11 @@ func NewForConfigOrDie(c *restclient.Config) *ExtensionsClient { } // New creates a new ExtensionsClient for the given RESTClient. -func New(c restclient.Interface) *ExtensionsClient { +func New(c rest.Interface) *ExtensionsClient { return &ExtensionsClient{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { // if extensions group is not registered, return an error g, err := api.Registry.Group("extensions") if err != nil { @@ -106,7 +106,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/apis" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } if config.GroupVersion == nil || config.GroupVersion.Group != g.GroupVersion.Group { copyGroupVersion := g.GroupVersion @@ -125,7 +125,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *ExtensionsClient) RESTClient() restclient.Interface { +func (c *ExtensionsClient) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/BUILD b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/BUILD index 9ce2a342..d5c37a39 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/BUILD @@ -25,15 +25,15 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//pkg/apis/extensions:go_default_library", "//pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/fake_daemonset.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/fake_daemonset.go index 86c9ce4b..92351898 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/fake_daemonset.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/fake_daemonset.go @@ -20,8 +20,8 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" extensions "k8s.io/kubernetes/pkg/apis/extensions" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -64,14 +64,14 @@ func (c *FakeDaemonSets) UpdateStatus(daemonSet *extensions.DaemonSet) (*extensi return obj.(*extensions.DaemonSet), err } -func (c *FakeDaemonSets) Delete(name string, options *api.DeleteOptions) error { +func (c *FakeDaemonSets) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewDeleteAction(daemonsetsResource, c.ns, name), &extensions.DaemonSet{}) return err } -func (c *FakeDaemonSets) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *FakeDaemonSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := core.NewDeleteCollectionAction(daemonsetsResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &extensions.DaemonSetList{}) @@ -88,7 +88,7 @@ func (c *FakeDaemonSets) Get(name string, options v1.GetOptions) (result *extens return obj.(*extensions.DaemonSet), err } -func (c *FakeDaemonSets) List(opts api.ListOptions) (result *extensions.DaemonSetList, err error) { +func (c *FakeDaemonSets) List(opts v1.ListOptions) (result *extensions.DaemonSetList, err error) { obj, err := c.Fake. Invokes(core.NewListAction(daemonsetsResource, c.ns, opts), &extensions.DaemonSetList{}) @@ -110,14 +110,14 @@ func (c *FakeDaemonSets) List(opts api.ListOptions) (result *extensions.DaemonSe } // Watch returns a watch.Interface that watches the requested daemonSets. -func (c *FakeDaemonSets) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *FakeDaemonSets) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewWatchAction(daemonsetsResource, c.ns, opts)) } // Patch applies the patch and returns the patched daemonSet. -func (c *FakeDaemonSets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *extensions.DaemonSet, err error) { +func (c *FakeDaemonSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *extensions.DaemonSet, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(daemonsetsResource, c.ns, name, data, subresources...), &extensions.DaemonSet{}) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/fake_deployment.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/fake_deployment.go index a9a9f629..0155cff3 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/fake_deployment.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/fake_deployment.go @@ -20,8 +20,8 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" extensions "k8s.io/kubernetes/pkg/apis/extensions" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -64,14 +64,14 @@ func (c *FakeDeployments) UpdateStatus(deployment *extensions.Deployment) (*exte return obj.(*extensions.Deployment), err } -func (c *FakeDeployments) Delete(name string, options *api.DeleteOptions) error { +func (c *FakeDeployments) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewDeleteAction(deploymentsResource, c.ns, name), &extensions.Deployment{}) return err } -func (c *FakeDeployments) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *FakeDeployments) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := core.NewDeleteCollectionAction(deploymentsResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &extensions.DeploymentList{}) @@ -88,7 +88,7 @@ func (c *FakeDeployments) Get(name string, options v1.GetOptions) (result *exten return obj.(*extensions.Deployment), err } -func (c *FakeDeployments) List(opts api.ListOptions) (result *extensions.DeploymentList, err error) { +func (c *FakeDeployments) List(opts v1.ListOptions) (result *extensions.DeploymentList, err error) { obj, err := c.Fake. Invokes(core.NewListAction(deploymentsResource, c.ns, opts), &extensions.DeploymentList{}) @@ -110,14 +110,14 @@ func (c *FakeDeployments) List(opts api.ListOptions) (result *extensions.Deploym } // Watch returns a watch.Interface that watches the requested deployments. -func (c *FakeDeployments) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *FakeDeployments) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewWatchAction(deploymentsResource, c.ns, opts)) } // Patch applies the patch and returns the patched deployment. -func (c *FakeDeployments) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *extensions.Deployment, err error) { +func (c *FakeDeployments) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *extensions.Deployment, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(deploymentsResource, c.ns, name, data, subresources...), &extensions.Deployment{}) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/fake_extensions_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/fake_extensions_client.go index d2805ef0..b8577c43 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/fake_extensions_client.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/fake_extensions_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" internalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -60,7 +60,7 @@ func (c *FakeExtensions) ThirdPartyResources() internalversion.ThirdPartyResourc // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeExtensions) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeExtensions) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/fake_ingress.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/fake_ingress.go index 50a748e0..7521342e 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/fake_ingress.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/fake_ingress.go @@ -20,8 +20,8 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" extensions "k8s.io/kubernetes/pkg/apis/extensions" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -64,14 +64,14 @@ func (c *FakeIngresses) UpdateStatus(ingress *extensions.Ingress) (*extensions.I return obj.(*extensions.Ingress), err } -func (c *FakeIngresses) Delete(name string, options *api.DeleteOptions) error { +func (c *FakeIngresses) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewDeleteAction(ingressesResource, c.ns, name), &extensions.Ingress{}) return err } -func (c *FakeIngresses) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *FakeIngresses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := core.NewDeleteCollectionAction(ingressesResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &extensions.IngressList{}) @@ -88,7 +88,7 @@ func (c *FakeIngresses) Get(name string, options v1.GetOptions) (result *extensi return obj.(*extensions.Ingress), err } -func (c *FakeIngresses) List(opts api.ListOptions) (result *extensions.IngressList, err error) { +func (c *FakeIngresses) List(opts v1.ListOptions) (result *extensions.IngressList, err error) { obj, err := c.Fake. Invokes(core.NewListAction(ingressesResource, c.ns, opts), &extensions.IngressList{}) @@ -110,14 +110,14 @@ func (c *FakeIngresses) List(opts api.ListOptions) (result *extensions.IngressLi } // Watch returns a watch.Interface that watches the requested ingresses. -func (c *FakeIngresses) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *FakeIngresses) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewWatchAction(ingressesResource, c.ns, opts)) } // Patch applies the patch and returns the patched ingress. -func (c *FakeIngresses) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *extensions.Ingress, err error) { +func (c *FakeIngresses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *extensions.Ingress, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(ingressesResource, c.ns, name, data, subresources...), &extensions.Ingress{}) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/fake_networkpolicy.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/fake_networkpolicy.go index 3e80b284..cbf45bad 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/fake_networkpolicy.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/fake_networkpolicy.go @@ -20,8 +20,8 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" extensions "k8s.io/kubernetes/pkg/apis/extensions" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -54,14 +54,14 @@ func (c *FakeNetworkPolicies) Update(networkPolicy *extensions.NetworkPolicy) (r return obj.(*extensions.NetworkPolicy), err } -func (c *FakeNetworkPolicies) Delete(name string, options *api.DeleteOptions) error { +func (c *FakeNetworkPolicies) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewDeleteAction(networkpoliciesResource, c.ns, name), &extensions.NetworkPolicy{}) return err } -func (c *FakeNetworkPolicies) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *FakeNetworkPolicies) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := core.NewDeleteCollectionAction(networkpoliciesResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &extensions.NetworkPolicyList{}) @@ -78,7 +78,7 @@ func (c *FakeNetworkPolicies) Get(name string, options v1.GetOptions) (result *e return obj.(*extensions.NetworkPolicy), err } -func (c *FakeNetworkPolicies) List(opts api.ListOptions) (result *extensions.NetworkPolicyList, err error) { +func (c *FakeNetworkPolicies) List(opts v1.ListOptions) (result *extensions.NetworkPolicyList, err error) { obj, err := c.Fake. Invokes(core.NewListAction(networkpoliciesResource, c.ns, opts), &extensions.NetworkPolicyList{}) @@ -100,14 +100,14 @@ func (c *FakeNetworkPolicies) List(opts api.ListOptions) (result *extensions.Net } // Watch returns a watch.Interface that watches the requested networkPolicies. -func (c *FakeNetworkPolicies) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *FakeNetworkPolicies) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewWatchAction(networkpoliciesResource, c.ns, opts)) } // Patch applies the patch and returns the patched networkPolicy. -func (c *FakeNetworkPolicies) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *extensions.NetworkPolicy, err error) { +func (c *FakeNetworkPolicies) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *extensions.NetworkPolicy, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(networkpoliciesResource, c.ns, name, data, subresources...), &extensions.NetworkPolicy{}) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/fake_podsecuritypolicy.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/fake_podsecuritypolicy.go index f00f71f8..59850bf9 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/fake_podsecuritypolicy.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/fake_podsecuritypolicy.go @@ -20,8 +20,8 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" extensions "k8s.io/kubernetes/pkg/apis/extensions" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -51,13 +51,13 @@ func (c *FakePodSecurityPolicies) Update(podSecurityPolicy *extensions.PodSecuri return obj.(*extensions.PodSecurityPolicy), err } -func (c *FakePodSecurityPolicies) Delete(name string, options *api.DeleteOptions) error { +func (c *FakePodSecurityPolicies) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewRootDeleteAction(podsecuritypoliciesResource, name), &extensions.PodSecurityPolicy{}) return err } -func (c *FakePodSecurityPolicies) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *FakePodSecurityPolicies) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := core.NewRootDeleteCollectionAction(podsecuritypoliciesResource, listOptions) _, err := c.Fake.Invokes(action, &extensions.PodSecurityPolicyList{}) @@ -73,7 +73,7 @@ func (c *FakePodSecurityPolicies) Get(name string, options v1.GetOptions) (resul return obj.(*extensions.PodSecurityPolicy), err } -func (c *FakePodSecurityPolicies) List(opts api.ListOptions) (result *extensions.PodSecurityPolicyList, err error) { +func (c *FakePodSecurityPolicies) List(opts v1.ListOptions) (result *extensions.PodSecurityPolicyList, err error) { obj, err := c.Fake. Invokes(core.NewRootListAction(podsecuritypoliciesResource, opts), &extensions.PodSecurityPolicyList{}) if obj == nil { @@ -94,13 +94,13 @@ func (c *FakePodSecurityPolicies) List(opts api.ListOptions) (result *extensions } // Watch returns a watch.Interface that watches the requested podSecurityPolicies. -func (c *FakePodSecurityPolicies) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *FakePodSecurityPolicies) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewRootWatchAction(podsecuritypoliciesResource, opts)) } // Patch applies the patch and returns the patched podSecurityPolicy. -func (c *FakePodSecurityPolicies) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *extensions.PodSecurityPolicy, err error) { +func (c *FakePodSecurityPolicies) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *extensions.PodSecurityPolicy, err error) { obj, err := c.Fake. Invokes(core.NewRootPatchSubresourceAction(podsecuritypoliciesResource, name, data, subresources...), &extensions.PodSecurityPolicy{}) if obj == nil { diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/fake_replicaset.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/fake_replicaset.go index 2dad6fec..3fe846e6 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/fake_replicaset.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/fake_replicaset.go @@ -20,8 +20,8 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" extensions "k8s.io/kubernetes/pkg/apis/extensions" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -64,14 +64,14 @@ func (c *FakeReplicaSets) UpdateStatus(replicaSet *extensions.ReplicaSet) (*exte return obj.(*extensions.ReplicaSet), err } -func (c *FakeReplicaSets) Delete(name string, options *api.DeleteOptions) error { +func (c *FakeReplicaSets) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewDeleteAction(replicasetsResource, c.ns, name), &extensions.ReplicaSet{}) return err } -func (c *FakeReplicaSets) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *FakeReplicaSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := core.NewDeleteCollectionAction(replicasetsResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &extensions.ReplicaSetList{}) @@ -88,7 +88,7 @@ func (c *FakeReplicaSets) Get(name string, options v1.GetOptions) (result *exten return obj.(*extensions.ReplicaSet), err } -func (c *FakeReplicaSets) List(opts api.ListOptions) (result *extensions.ReplicaSetList, err error) { +func (c *FakeReplicaSets) List(opts v1.ListOptions) (result *extensions.ReplicaSetList, err error) { obj, err := c.Fake. Invokes(core.NewListAction(replicasetsResource, c.ns, opts), &extensions.ReplicaSetList{}) @@ -110,14 +110,14 @@ func (c *FakeReplicaSets) List(opts api.ListOptions) (result *extensions.Replica } // Watch returns a watch.Interface that watches the requested replicaSets. -func (c *FakeReplicaSets) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *FakeReplicaSets) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewWatchAction(replicasetsResource, c.ns, opts)) } // Patch applies the patch and returns the patched replicaSet. -func (c *FakeReplicaSets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *extensions.ReplicaSet, err error) { +func (c *FakeReplicaSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *extensions.ReplicaSet, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(replicasetsResource, c.ns, name, data, subresources...), &extensions.ReplicaSet{}) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/fake_thirdpartyresource.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/fake_thirdpartyresource.go index 48965945..56452a82 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/fake_thirdpartyresource.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/fake_thirdpartyresource.go @@ -20,8 +20,8 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" extensions "k8s.io/kubernetes/pkg/apis/extensions" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -51,13 +51,13 @@ func (c *FakeThirdPartyResources) Update(thirdPartyResource *extensions.ThirdPar return obj.(*extensions.ThirdPartyResource), err } -func (c *FakeThirdPartyResources) Delete(name string, options *api.DeleteOptions) error { +func (c *FakeThirdPartyResources) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewRootDeleteAction(thirdpartyresourcesResource, name), &extensions.ThirdPartyResource{}) return err } -func (c *FakeThirdPartyResources) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *FakeThirdPartyResources) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := core.NewRootDeleteCollectionAction(thirdpartyresourcesResource, listOptions) _, err := c.Fake.Invokes(action, &extensions.ThirdPartyResourceList{}) @@ -73,7 +73,7 @@ func (c *FakeThirdPartyResources) Get(name string, options v1.GetOptions) (resul return obj.(*extensions.ThirdPartyResource), err } -func (c *FakeThirdPartyResources) List(opts api.ListOptions) (result *extensions.ThirdPartyResourceList, err error) { +func (c *FakeThirdPartyResources) List(opts v1.ListOptions) (result *extensions.ThirdPartyResourceList, err error) { obj, err := c.Fake. Invokes(core.NewRootListAction(thirdpartyresourcesResource, opts), &extensions.ThirdPartyResourceList{}) if obj == nil { @@ -94,13 +94,13 @@ func (c *FakeThirdPartyResources) List(opts api.ListOptions) (result *extensions } // Watch returns a watch.Interface that watches the requested thirdPartyResources. -func (c *FakeThirdPartyResources) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *FakeThirdPartyResources) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewRootWatchAction(thirdpartyresourcesResource, opts)) } // Patch applies the patch and returns the patched thirdPartyResource. -func (c *FakeThirdPartyResources) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *extensions.ThirdPartyResource, err error) { +func (c *FakeThirdPartyResources) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *extensions.ThirdPartyResource, err error) { obj, err := c.Fake. Invokes(core.NewRootPatchSubresourceAction(thirdpartyresourcesResource, name, data, subresources...), &extensions.ThirdPartyResource{}) if obj == nil { diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/ingress.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/ingress.go index a72a901d..e1db937b 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/ingress.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/ingress.go @@ -18,10 +18,11 @@ package internalversion import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" extensions "k8s.io/kubernetes/pkg/apis/extensions" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // IngressesGetter has a method to return a IngressInterface. @@ -35,18 +36,18 @@ type IngressInterface interface { Create(*extensions.Ingress) (*extensions.Ingress, error) Update(*extensions.Ingress) (*extensions.Ingress, error) UpdateStatus(*extensions.Ingress) (*extensions.Ingress, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error Get(name string, options v1.GetOptions) (*extensions.Ingress, error) - List(opts api.ListOptions) (*extensions.IngressList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *extensions.Ingress, err error) + List(opts v1.ListOptions) (*extensions.IngressList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *extensions.Ingress, err error) IngressExpansion } // ingresses implements IngressInterface type ingresses struct { - client restclient.Interface + client rest.Interface ns string } @@ -100,7 +101,7 @@ func (c *ingresses) UpdateStatus(ingress *extensions.Ingress) (result *extension } // Delete takes name of the ingress and deletes it. Returns an error if one occurs. -func (c *ingresses) Delete(name string, options *api.DeleteOptions) error { +func (c *ingresses) Delete(name string, options *v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("ingresses"). @@ -111,7 +112,7 @@ func (c *ingresses) Delete(name string, options *api.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *ingresses) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *ingresses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("ingresses"). @@ -135,7 +136,7 @@ func (c *ingresses) Get(name string, options v1.GetOptions) (result *extensions. } // List takes label and field selectors, and returns the list of Ingresses that match those selectors. -func (c *ingresses) List(opts api.ListOptions) (result *extensions.IngressList, err error) { +func (c *ingresses) List(opts v1.ListOptions) (result *extensions.IngressList, err error) { result = &extensions.IngressList{} err = c.client.Get(). Namespace(c.ns). @@ -147,7 +148,7 @@ func (c *ingresses) List(opts api.ListOptions) (result *extensions.IngressList, } // Watch returns a watch.Interface that watches the requested ingresses. -func (c *ingresses) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *ingresses) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -157,7 +158,7 @@ func (c *ingresses) Watch(opts api.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched ingress. -func (c *ingresses) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *extensions.Ingress, err error) { +func (c *ingresses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *extensions.Ingress, err error) { result = &extensions.Ingress{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/networkpolicy.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/networkpolicy.go index fde5ffd1..4dcebc51 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/networkpolicy.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/networkpolicy.go @@ -18,10 +18,11 @@ package internalversion import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" extensions "k8s.io/kubernetes/pkg/apis/extensions" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // NetworkPoliciesGetter has a method to return a NetworkPolicyInterface. @@ -34,18 +35,18 @@ type NetworkPoliciesGetter interface { type NetworkPolicyInterface interface { Create(*extensions.NetworkPolicy) (*extensions.NetworkPolicy, error) Update(*extensions.NetworkPolicy) (*extensions.NetworkPolicy, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error Get(name string, options v1.GetOptions) (*extensions.NetworkPolicy, error) - List(opts api.ListOptions) (*extensions.NetworkPolicyList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *extensions.NetworkPolicy, err error) + List(opts v1.ListOptions) (*extensions.NetworkPolicyList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *extensions.NetworkPolicy, err error) NetworkPolicyExpansion } // networkPolicies implements NetworkPolicyInterface type networkPolicies struct { - client restclient.Interface + client rest.Interface ns string } @@ -83,7 +84,7 @@ func (c *networkPolicies) Update(networkPolicy *extensions.NetworkPolicy) (resul } // Delete takes name of the networkPolicy and deletes it. Returns an error if one occurs. -func (c *networkPolicies) Delete(name string, options *api.DeleteOptions) error { +func (c *networkPolicies) Delete(name string, options *v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("networkpolicies"). @@ -94,7 +95,7 @@ func (c *networkPolicies) Delete(name string, options *api.DeleteOptions) error } // DeleteCollection deletes a collection of objects. -func (c *networkPolicies) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *networkPolicies) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("networkpolicies"). @@ -118,7 +119,7 @@ func (c *networkPolicies) Get(name string, options v1.GetOptions) (result *exten } // List takes label and field selectors, and returns the list of NetworkPolicies that match those selectors. -func (c *networkPolicies) List(opts api.ListOptions) (result *extensions.NetworkPolicyList, err error) { +func (c *networkPolicies) List(opts v1.ListOptions) (result *extensions.NetworkPolicyList, err error) { result = &extensions.NetworkPolicyList{} err = c.client.Get(). Namespace(c.ns). @@ -130,7 +131,7 @@ func (c *networkPolicies) List(opts api.ListOptions) (result *extensions.Network } // Watch returns a watch.Interface that watches the requested networkPolicies. -func (c *networkPolicies) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *networkPolicies) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -140,7 +141,7 @@ func (c *networkPolicies) Watch(opts api.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched networkPolicy. -func (c *networkPolicies) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *extensions.NetworkPolicy, err error) { +func (c *networkPolicies) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *extensions.NetworkPolicy, err error) { result = &extensions.NetworkPolicy{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/podsecuritypolicy.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/podsecuritypolicy.go index cfc6a6e1..27ed9afc 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/podsecuritypolicy.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/podsecuritypolicy.go @@ -18,10 +18,11 @@ package internalversion import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" extensions "k8s.io/kubernetes/pkg/apis/extensions" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // PodSecurityPoliciesGetter has a method to return a PodSecurityPolicyInterface. @@ -34,18 +35,18 @@ type PodSecurityPoliciesGetter interface { type PodSecurityPolicyInterface interface { Create(*extensions.PodSecurityPolicy) (*extensions.PodSecurityPolicy, error) Update(*extensions.PodSecurityPolicy) (*extensions.PodSecurityPolicy, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error Get(name string, options v1.GetOptions) (*extensions.PodSecurityPolicy, error) - List(opts api.ListOptions) (*extensions.PodSecurityPolicyList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *extensions.PodSecurityPolicy, err error) + List(opts v1.ListOptions) (*extensions.PodSecurityPolicyList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *extensions.PodSecurityPolicy, err error) PodSecurityPolicyExpansion } // podSecurityPolicies implements PodSecurityPolicyInterface type podSecurityPolicies struct { - client restclient.Interface + client rest.Interface } // newPodSecurityPolicies returns a PodSecurityPolicies @@ -79,7 +80,7 @@ func (c *podSecurityPolicies) Update(podSecurityPolicy *extensions.PodSecurityPo } // Delete takes name of the podSecurityPolicy and deletes it. Returns an error if one occurs. -func (c *podSecurityPolicies) Delete(name string, options *api.DeleteOptions) error { +func (c *podSecurityPolicies) Delete(name string, options *v1.DeleteOptions) error { return c.client.Delete(). Resource("podsecuritypolicies"). Name(name). @@ -89,7 +90,7 @@ func (c *podSecurityPolicies) Delete(name string, options *api.DeleteOptions) er } // DeleteCollection deletes a collection of objects. -func (c *podSecurityPolicies) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *podSecurityPolicies) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { return c.client.Delete(). Resource("podsecuritypolicies"). VersionedParams(&listOptions, api.ParameterCodec). @@ -111,7 +112,7 @@ func (c *podSecurityPolicies) Get(name string, options v1.GetOptions) (result *e } // List takes label and field selectors, and returns the list of PodSecurityPolicies that match those selectors. -func (c *podSecurityPolicies) List(opts api.ListOptions) (result *extensions.PodSecurityPolicyList, err error) { +func (c *podSecurityPolicies) List(opts v1.ListOptions) (result *extensions.PodSecurityPolicyList, err error) { result = &extensions.PodSecurityPolicyList{} err = c.client.Get(). Resource("podsecuritypolicies"). @@ -122,7 +123,7 @@ func (c *podSecurityPolicies) List(opts api.ListOptions) (result *extensions.Pod } // Watch returns a watch.Interface that watches the requested podSecurityPolicies. -func (c *podSecurityPolicies) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *podSecurityPolicies) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Resource("podsecuritypolicies"). @@ -131,7 +132,7 @@ func (c *podSecurityPolicies) Watch(opts api.ListOptions) (watch.Interface, erro } // Patch applies the patch and returns the patched podSecurityPolicy. -func (c *podSecurityPolicies) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *extensions.PodSecurityPolicy, err error) { +func (c *podSecurityPolicies) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *extensions.PodSecurityPolicy, err error) { result = &extensions.PodSecurityPolicy{} err = c.client.Patch(pt). Resource("podsecuritypolicies"). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/replicaset.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/replicaset.go index 249c9c60..35ad547e 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/replicaset.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/replicaset.go @@ -18,10 +18,11 @@ package internalversion import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" extensions "k8s.io/kubernetes/pkg/apis/extensions" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // ReplicaSetsGetter has a method to return a ReplicaSetInterface. @@ -35,18 +36,18 @@ type ReplicaSetInterface interface { Create(*extensions.ReplicaSet) (*extensions.ReplicaSet, error) Update(*extensions.ReplicaSet) (*extensions.ReplicaSet, error) UpdateStatus(*extensions.ReplicaSet) (*extensions.ReplicaSet, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error Get(name string, options v1.GetOptions) (*extensions.ReplicaSet, error) - List(opts api.ListOptions) (*extensions.ReplicaSetList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *extensions.ReplicaSet, err error) + List(opts v1.ListOptions) (*extensions.ReplicaSetList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *extensions.ReplicaSet, err error) ReplicaSetExpansion } // replicaSets implements ReplicaSetInterface type replicaSets struct { - client restclient.Interface + client rest.Interface ns string } @@ -100,7 +101,7 @@ func (c *replicaSets) UpdateStatus(replicaSet *extensions.ReplicaSet) (result *e } // Delete takes name of the replicaSet and deletes it. Returns an error if one occurs. -func (c *replicaSets) Delete(name string, options *api.DeleteOptions) error { +func (c *replicaSets) Delete(name string, options *v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("replicasets"). @@ -111,7 +112,7 @@ func (c *replicaSets) Delete(name string, options *api.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *replicaSets) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *replicaSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("replicasets"). @@ -135,7 +136,7 @@ func (c *replicaSets) Get(name string, options v1.GetOptions) (result *extension } // List takes label and field selectors, and returns the list of ReplicaSets that match those selectors. -func (c *replicaSets) List(opts api.ListOptions) (result *extensions.ReplicaSetList, err error) { +func (c *replicaSets) List(opts v1.ListOptions) (result *extensions.ReplicaSetList, err error) { result = &extensions.ReplicaSetList{} err = c.client.Get(). Namespace(c.ns). @@ -147,7 +148,7 @@ func (c *replicaSets) List(opts api.ListOptions) (result *extensions.ReplicaSetL } // Watch returns a watch.Interface that watches the requested replicaSets. -func (c *replicaSets) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *replicaSets) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -157,7 +158,7 @@ func (c *replicaSets) Watch(opts api.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched replicaSet. -func (c *replicaSets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *extensions.ReplicaSet, err error) { +func (c *replicaSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *extensions.ReplicaSet, err error) { result = &extensions.ReplicaSet{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/scale.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/scale.go index 892a07e3..ad1d91b0 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/scale.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/scale.go @@ -17,7 +17,7 @@ limitations under the License. package internalversion import ( - restclient "k8s.io/kubernetes/pkg/client/restclient" + rest "k8s.io/client-go/rest" ) // ScalesGetter has a method to return a ScaleInterface. @@ -33,7 +33,7 @@ type ScaleInterface interface { // scales implements ScaleInterface type scales struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/thirdpartyresource.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/thirdpartyresource.go index d326ec64..19259209 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/thirdpartyresource.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/thirdpartyresource.go @@ -18,10 +18,11 @@ package internalversion import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" extensions "k8s.io/kubernetes/pkg/apis/extensions" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // ThirdPartyResourcesGetter has a method to return a ThirdPartyResourceInterface. @@ -34,18 +35,18 @@ type ThirdPartyResourcesGetter interface { type ThirdPartyResourceInterface interface { Create(*extensions.ThirdPartyResource) (*extensions.ThirdPartyResource, error) Update(*extensions.ThirdPartyResource) (*extensions.ThirdPartyResource, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error Get(name string, options v1.GetOptions) (*extensions.ThirdPartyResource, error) - List(opts api.ListOptions) (*extensions.ThirdPartyResourceList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *extensions.ThirdPartyResource, err error) + List(opts v1.ListOptions) (*extensions.ThirdPartyResourceList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *extensions.ThirdPartyResource, err error) ThirdPartyResourceExpansion } // thirdPartyResources implements ThirdPartyResourceInterface type thirdPartyResources struct { - client restclient.Interface + client rest.Interface } // newThirdPartyResources returns a ThirdPartyResources @@ -79,7 +80,7 @@ func (c *thirdPartyResources) Update(thirdPartyResource *extensions.ThirdPartyRe } // Delete takes name of the thirdPartyResource and deletes it. Returns an error if one occurs. -func (c *thirdPartyResources) Delete(name string, options *api.DeleteOptions) error { +func (c *thirdPartyResources) Delete(name string, options *v1.DeleteOptions) error { return c.client.Delete(). Resource("thirdpartyresources"). Name(name). @@ -89,7 +90,7 @@ func (c *thirdPartyResources) Delete(name string, options *api.DeleteOptions) er } // DeleteCollection deletes a collection of objects. -func (c *thirdPartyResources) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *thirdPartyResources) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { return c.client.Delete(). Resource("thirdpartyresources"). VersionedParams(&listOptions, api.ParameterCodec). @@ -111,7 +112,7 @@ func (c *thirdPartyResources) Get(name string, options v1.GetOptions) (result *e } // List takes label and field selectors, and returns the list of ThirdPartyResources that match those selectors. -func (c *thirdPartyResources) List(opts api.ListOptions) (result *extensions.ThirdPartyResourceList, err error) { +func (c *thirdPartyResources) List(opts v1.ListOptions) (result *extensions.ThirdPartyResourceList, err error) { result = &extensions.ThirdPartyResourceList{} err = c.client.Get(). Resource("thirdpartyresources"). @@ -122,7 +123,7 @@ func (c *thirdPartyResources) List(opts api.ListOptions) (result *extensions.Thi } // Watch returns a watch.Interface that watches the requested thirdPartyResources. -func (c *thirdPartyResources) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *thirdPartyResources) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Resource("thirdpartyresources"). @@ -131,7 +132,7 @@ func (c *thirdPartyResources) Watch(opts api.ListOptions) (watch.Interface, erro } // Patch applies the patch and returns the patched thirdPartyResource. -func (c *thirdPartyResources) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *extensions.ThirdPartyResource, err error) { +func (c *thirdPartyResources) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *extensions.ThirdPartyResource, err error) { result = &extensions.ThirdPartyResource{} err = c.client.Patch(pt). Resource("thirdpartyresources"). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/BUILD b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/BUILD index b70e270b..d7b69bf2 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/BUILD @@ -21,9 +21,10 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/apis/policy:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/eviction.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/eviction.go index 012a67e1..a43dabbb 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/eviction.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/eviction.go @@ -17,7 +17,7 @@ limitations under the License. package internalversion import ( - restclient "k8s.io/kubernetes/pkg/client/restclient" + rest "k8s.io/client-go/rest" ) // EvictionsGetter has a method to return a EvictionInterface. @@ -33,7 +33,7 @@ type EvictionInterface interface { // evictions implements EvictionInterface type evictions struct { - client restclient.Interface + client rest.Interface ns string } diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/fake/BUILD b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/fake/BUILD index f2783ed0..f8dc49c6 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/fake/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/fake/BUILD @@ -18,15 +18,15 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//pkg/apis/policy:go_default_library", "//pkg/client/clientset_generated/internalclientset/typed/policy/internalversion:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/fake/fake_poddisruptionbudget.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/fake/fake_poddisruptionbudget.go index e7dc2b13..1f197c83 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/fake/fake_poddisruptionbudget.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/fake/fake_poddisruptionbudget.go @@ -20,8 +20,8 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" policy "k8s.io/kubernetes/pkg/apis/policy" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -64,14 +64,14 @@ func (c *FakePodDisruptionBudgets) UpdateStatus(podDisruptionBudget *policy.PodD return obj.(*policy.PodDisruptionBudget), err } -func (c *FakePodDisruptionBudgets) Delete(name string, options *api.DeleteOptions) error { +func (c *FakePodDisruptionBudgets) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewDeleteAction(poddisruptionbudgetsResource, c.ns, name), &policy.PodDisruptionBudget{}) return err } -func (c *FakePodDisruptionBudgets) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *FakePodDisruptionBudgets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := core.NewDeleteCollectionAction(poddisruptionbudgetsResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &policy.PodDisruptionBudgetList{}) @@ -88,7 +88,7 @@ func (c *FakePodDisruptionBudgets) Get(name string, options v1.GetOptions) (resu return obj.(*policy.PodDisruptionBudget), err } -func (c *FakePodDisruptionBudgets) List(opts api.ListOptions) (result *policy.PodDisruptionBudgetList, err error) { +func (c *FakePodDisruptionBudgets) List(opts v1.ListOptions) (result *policy.PodDisruptionBudgetList, err error) { obj, err := c.Fake. Invokes(core.NewListAction(poddisruptionbudgetsResource, c.ns, opts), &policy.PodDisruptionBudgetList{}) @@ -110,14 +110,14 @@ func (c *FakePodDisruptionBudgets) List(opts api.ListOptions) (result *policy.Po } // Watch returns a watch.Interface that watches the requested podDisruptionBudgets. -func (c *FakePodDisruptionBudgets) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *FakePodDisruptionBudgets) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewWatchAction(poddisruptionbudgetsResource, c.ns, opts)) } // Patch applies the patch and returns the patched podDisruptionBudget. -func (c *FakePodDisruptionBudgets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *policy.PodDisruptionBudget, err error) { +func (c *FakePodDisruptionBudgets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *policy.PodDisruptionBudget, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(poddisruptionbudgetsResource, c.ns, name, data, subresources...), &policy.PodDisruptionBudget{}) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/fake/fake_policy_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/fake/fake_policy_client.go index d8dd4c72..7f8a472b 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/fake/fake_policy_client.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/fake/fake_policy_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" internalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -36,7 +36,7 @@ func (c *FakePolicy) PodDisruptionBudgets(namespace string) internalversion.PodD // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakePolicy) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakePolicy) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/poddisruptionbudget.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/poddisruptionbudget.go index bae5c367..8497076d 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/poddisruptionbudget.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/poddisruptionbudget.go @@ -18,10 +18,11 @@ package internalversion import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" policy "k8s.io/kubernetes/pkg/apis/policy" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // PodDisruptionBudgetsGetter has a method to return a PodDisruptionBudgetInterface. @@ -35,18 +36,18 @@ type PodDisruptionBudgetInterface interface { Create(*policy.PodDisruptionBudget) (*policy.PodDisruptionBudget, error) Update(*policy.PodDisruptionBudget) (*policy.PodDisruptionBudget, error) UpdateStatus(*policy.PodDisruptionBudget) (*policy.PodDisruptionBudget, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error Get(name string, options v1.GetOptions) (*policy.PodDisruptionBudget, error) - List(opts api.ListOptions) (*policy.PodDisruptionBudgetList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *policy.PodDisruptionBudget, err error) + List(opts v1.ListOptions) (*policy.PodDisruptionBudgetList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *policy.PodDisruptionBudget, err error) PodDisruptionBudgetExpansion } // podDisruptionBudgets implements PodDisruptionBudgetInterface type podDisruptionBudgets struct { - client restclient.Interface + client rest.Interface ns string } @@ -100,7 +101,7 @@ func (c *podDisruptionBudgets) UpdateStatus(podDisruptionBudget *policy.PodDisru } // Delete takes name of the podDisruptionBudget and deletes it. Returns an error if one occurs. -func (c *podDisruptionBudgets) Delete(name string, options *api.DeleteOptions) error { +func (c *podDisruptionBudgets) Delete(name string, options *v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("poddisruptionbudgets"). @@ -111,7 +112,7 @@ func (c *podDisruptionBudgets) Delete(name string, options *api.DeleteOptions) e } // DeleteCollection deletes a collection of objects. -func (c *podDisruptionBudgets) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *podDisruptionBudgets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("poddisruptionbudgets"). @@ -135,7 +136,7 @@ func (c *podDisruptionBudgets) Get(name string, options v1.GetOptions) (result * } // List takes label and field selectors, and returns the list of PodDisruptionBudgets that match those selectors. -func (c *podDisruptionBudgets) List(opts api.ListOptions) (result *policy.PodDisruptionBudgetList, err error) { +func (c *podDisruptionBudgets) List(opts v1.ListOptions) (result *policy.PodDisruptionBudgetList, err error) { result = &policy.PodDisruptionBudgetList{} err = c.client.Get(). Namespace(c.ns). @@ -147,7 +148,7 @@ func (c *podDisruptionBudgets) List(opts api.ListOptions) (result *policy.PodDis } // Watch returns a watch.Interface that watches the requested podDisruptionBudgets. -func (c *podDisruptionBudgets) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *podDisruptionBudgets) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -157,7 +158,7 @@ func (c *podDisruptionBudgets) Watch(opts api.ListOptions) (watch.Interface, err } // Patch applies the patch and returns the patched podDisruptionBudget. -func (c *podDisruptionBudgets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *policy.PodDisruptionBudget, err error) { +func (c *podDisruptionBudgets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *policy.PodDisruptionBudget, err error) { result = &policy.PodDisruptionBudget{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/policy_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/policy_client.go index dab1b40e..7a0e0073 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/policy_client.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion/policy_client.go @@ -17,19 +17,19 @@ limitations under the License. package internalversion import ( + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type PolicyInterface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface EvictionsGetter PodDisruptionBudgetsGetter } // PolicyClient is used to interact with features provided by the policy group. type PolicyClient struct { - restClient restclient.Interface + restClient rest.Interface } func (c *PolicyClient) Evictions(namespace string) EvictionInterface { @@ -41,12 +41,12 @@ func (c *PolicyClient) PodDisruptionBudgets(namespace string) PodDisruptionBudge } // NewForConfig creates a new PolicyClient for the given config. -func NewForConfig(c *restclient.Config) (*PolicyClient, error) { +func NewForConfig(c *rest.Config) (*PolicyClient, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -55,7 +55,7 @@ func NewForConfig(c *restclient.Config) (*PolicyClient, error) { // NewForConfigOrDie creates a new PolicyClient for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *PolicyClient { +func NewForConfigOrDie(c *rest.Config) *PolicyClient { client, err := NewForConfig(c) if err != nil { panic(err) @@ -64,11 +64,11 @@ func NewForConfigOrDie(c *restclient.Config) *PolicyClient { } // New creates a new PolicyClient for the given RESTClient. -func New(c restclient.Interface) *PolicyClient { +func New(c rest.Interface) *PolicyClient { return &PolicyClient{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { // if policy group is not registered, return an error g, err := api.Registry.Group("policy") if err != nil { @@ -76,7 +76,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/apis" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } if config.GroupVersion == nil || config.GroupVersion.Group != g.GroupVersion.Group { copyGroupVersion := g.GroupVersion @@ -95,7 +95,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *PolicyClient) RESTClient() restclient.Interface { +func (c *PolicyClient) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/BUILD b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/BUILD index c5859b12..34142c08 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/BUILD @@ -22,9 +22,10 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/apis/rbac:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/clusterrole.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/clusterrole.go index ebeb6eab..1352fe22 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/clusterrole.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/clusterrole.go @@ -18,10 +18,11 @@ package internalversion import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" rbac "k8s.io/kubernetes/pkg/apis/rbac" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // ClusterRolesGetter has a method to return a ClusterRoleInterface. @@ -34,18 +35,18 @@ type ClusterRolesGetter interface { type ClusterRoleInterface interface { Create(*rbac.ClusterRole) (*rbac.ClusterRole, error) Update(*rbac.ClusterRole) (*rbac.ClusterRole, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error Get(name string, options v1.GetOptions) (*rbac.ClusterRole, error) - List(opts api.ListOptions) (*rbac.ClusterRoleList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *rbac.ClusterRole, err error) + List(opts v1.ListOptions) (*rbac.ClusterRoleList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *rbac.ClusterRole, err error) ClusterRoleExpansion } // clusterRoles implements ClusterRoleInterface type clusterRoles struct { - client restclient.Interface + client rest.Interface } // newClusterRoles returns a ClusterRoles @@ -79,7 +80,7 @@ func (c *clusterRoles) Update(clusterRole *rbac.ClusterRole) (result *rbac.Clust } // Delete takes name of the clusterRole and deletes it. Returns an error if one occurs. -func (c *clusterRoles) Delete(name string, options *api.DeleteOptions) error { +func (c *clusterRoles) Delete(name string, options *v1.DeleteOptions) error { return c.client.Delete(). Resource("clusterroles"). Name(name). @@ -89,7 +90,7 @@ func (c *clusterRoles) Delete(name string, options *api.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *clusterRoles) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *clusterRoles) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { return c.client.Delete(). Resource("clusterroles"). VersionedParams(&listOptions, api.ParameterCodec). @@ -111,7 +112,7 @@ func (c *clusterRoles) Get(name string, options v1.GetOptions) (result *rbac.Clu } // List takes label and field selectors, and returns the list of ClusterRoles that match those selectors. -func (c *clusterRoles) List(opts api.ListOptions) (result *rbac.ClusterRoleList, err error) { +func (c *clusterRoles) List(opts v1.ListOptions) (result *rbac.ClusterRoleList, err error) { result = &rbac.ClusterRoleList{} err = c.client.Get(). Resource("clusterroles"). @@ -122,7 +123,7 @@ func (c *clusterRoles) List(opts api.ListOptions) (result *rbac.ClusterRoleList, } // Watch returns a watch.Interface that watches the requested clusterRoles. -func (c *clusterRoles) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *clusterRoles) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Resource("clusterroles"). @@ -131,7 +132,7 @@ func (c *clusterRoles) Watch(opts api.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched clusterRole. -func (c *clusterRoles) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *rbac.ClusterRole, err error) { +func (c *clusterRoles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *rbac.ClusterRole, err error) { result = &rbac.ClusterRole{} err = c.client.Patch(pt). Resource("clusterroles"). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/clusterrolebinding.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/clusterrolebinding.go index 57e4146b..21d9be2f 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/clusterrolebinding.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/clusterrolebinding.go @@ -18,10 +18,11 @@ package internalversion import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" rbac "k8s.io/kubernetes/pkg/apis/rbac" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // ClusterRoleBindingsGetter has a method to return a ClusterRoleBindingInterface. @@ -34,18 +35,18 @@ type ClusterRoleBindingsGetter interface { type ClusterRoleBindingInterface interface { Create(*rbac.ClusterRoleBinding) (*rbac.ClusterRoleBinding, error) Update(*rbac.ClusterRoleBinding) (*rbac.ClusterRoleBinding, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error Get(name string, options v1.GetOptions) (*rbac.ClusterRoleBinding, error) - List(opts api.ListOptions) (*rbac.ClusterRoleBindingList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *rbac.ClusterRoleBinding, err error) + List(opts v1.ListOptions) (*rbac.ClusterRoleBindingList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *rbac.ClusterRoleBinding, err error) ClusterRoleBindingExpansion } // clusterRoleBindings implements ClusterRoleBindingInterface type clusterRoleBindings struct { - client restclient.Interface + client rest.Interface } // newClusterRoleBindings returns a ClusterRoleBindings @@ -79,7 +80,7 @@ func (c *clusterRoleBindings) Update(clusterRoleBinding *rbac.ClusterRoleBinding } // Delete takes name of the clusterRoleBinding and deletes it. Returns an error if one occurs. -func (c *clusterRoleBindings) Delete(name string, options *api.DeleteOptions) error { +func (c *clusterRoleBindings) Delete(name string, options *v1.DeleteOptions) error { return c.client.Delete(). Resource("clusterrolebindings"). Name(name). @@ -89,7 +90,7 @@ func (c *clusterRoleBindings) Delete(name string, options *api.DeleteOptions) er } // DeleteCollection deletes a collection of objects. -func (c *clusterRoleBindings) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *clusterRoleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { return c.client.Delete(). Resource("clusterrolebindings"). VersionedParams(&listOptions, api.ParameterCodec). @@ -111,7 +112,7 @@ func (c *clusterRoleBindings) Get(name string, options v1.GetOptions) (result *r } // List takes label and field selectors, and returns the list of ClusterRoleBindings that match those selectors. -func (c *clusterRoleBindings) List(opts api.ListOptions) (result *rbac.ClusterRoleBindingList, err error) { +func (c *clusterRoleBindings) List(opts v1.ListOptions) (result *rbac.ClusterRoleBindingList, err error) { result = &rbac.ClusterRoleBindingList{} err = c.client.Get(). Resource("clusterrolebindings"). @@ -122,7 +123,7 @@ func (c *clusterRoleBindings) List(opts api.ListOptions) (result *rbac.ClusterRo } // Watch returns a watch.Interface that watches the requested clusterRoleBindings. -func (c *clusterRoleBindings) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *clusterRoleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Resource("clusterrolebindings"). @@ -131,7 +132,7 @@ func (c *clusterRoleBindings) Watch(opts api.ListOptions) (watch.Interface, erro } // Patch applies the patch and returns the patched clusterRoleBinding. -func (c *clusterRoleBindings) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *rbac.ClusterRoleBinding, err error) { +func (c *clusterRoleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *rbac.ClusterRoleBinding, err error) { result = &rbac.ClusterRoleBinding{} err = c.client.Patch(pt). Resource("clusterrolebindings"). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/fake/BUILD b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/fake/BUILD index 9df3b9d9..eabec14c 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/fake/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/fake/BUILD @@ -19,15 +19,15 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//pkg/apis/rbac:go_default_library", "//pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/fake/fake_clusterrole.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/fake/fake_clusterrole.go index c3eb10d6..40a2591d 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/fake/fake_clusterrole.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/fake/fake_clusterrole.go @@ -20,8 +20,8 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" rbac "k8s.io/kubernetes/pkg/apis/rbac" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -51,13 +51,13 @@ func (c *FakeClusterRoles) Update(clusterRole *rbac.ClusterRole) (result *rbac.C return obj.(*rbac.ClusterRole), err } -func (c *FakeClusterRoles) Delete(name string, options *api.DeleteOptions) error { +func (c *FakeClusterRoles) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewRootDeleteAction(clusterrolesResource, name), &rbac.ClusterRole{}) return err } -func (c *FakeClusterRoles) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *FakeClusterRoles) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := core.NewRootDeleteCollectionAction(clusterrolesResource, listOptions) _, err := c.Fake.Invokes(action, &rbac.ClusterRoleList{}) @@ -73,7 +73,7 @@ func (c *FakeClusterRoles) Get(name string, options v1.GetOptions) (result *rbac return obj.(*rbac.ClusterRole), err } -func (c *FakeClusterRoles) List(opts api.ListOptions) (result *rbac.ClusterRoleList, err error) { +func (c *FakeClusterRoles) List(opts v1.ListOptions) (result *rbac.ClusterRoleList, err error) { obj, err := c.Fake. Invokes(core.NewRootListAction(clusterrolesResource, opts), &rbac.ClusterRoleList{}) if obj == nil { @@ -94,13 +94,13 @@ func (c *FakeClusterRoles) List(opts api.ListOptions) (result *rbac.ClusterRoleL } // Watch returns a watch.Interface that watches the requested clusterRoles. -func (c *FakeClusterRoles) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *FakeClusterRoles) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewRootWatchAction(clusterrolesResource, opts)) } // Patch applies the patch and returns the patched clusterRole. -func (c *FakeClusterRoles) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *rbac.ClusterRole, err error) { +func (c *FakeClusterRoles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *rbac.ClusterRole, err error) { obj, err := c.Fake. Invokes(core.NewRootPatchSubresourceAction(clusterrolesResource, name, data, subresources...), &rbac.ClusterRole{}) if obj == nil { diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/fake/fake_clusterrolebinding.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/fake/fake_clusterrolebinding.go index 256488b9..8be09c5b 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/fake/fake_clusterrolebinding.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/fake/fake_clusterrolebinding.go @@ -20,8 +20,8 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" rbac "k8s.io/kubernetes/pkg/apis/rbac" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -51,13 +51,13 @@ func (c *FakeClusterRoleBindings) Update(clusterRoleBinding *rbac.ClusterRoleBin return obj.(*rbac.ClusterRoleBinding), err } -func (c *FakeClusterRoleBindings) Delete(name string, options *api.DeleteOptions) error { +func (c *FakeClusterRoleBindings) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewRootDeleteAction(clusterrolebindingsResource, name), &rbac.ClusterRoleBinding{}) return err } -func (c *FakeClusterRoleBindings) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *FakeClusterRoleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := core.NewRootDeleteCollectionAction(clusterrolebindingsResource, listOptions) _, err := c.Fake.Invokes(action, &rbac.ClusterRoleBindingList{}) @@ -73,7 +73,7 @@ func (c *FakeClusterRoleBindings) Get(name string, options v1.GetOptions) (resul return obj.(*rbac.ClusterRoleBinding), err } -func (c *FakeClusterRoleBindings) List(opts api.ListOptions) (result *rbac.ClusterRoleBindingList, err error) { +func (c *FakeClusterRoleBindings) List(opts v1.ListOptions) (result *rbac.ClusterRoleBindingList, err error) { obj, err := c.Fake. Invokes(core.NewRootListAction(clusterrolebindingsResource, opts), &rbac.ClusterRoleBindingList{}) if obj == nil { @@ -94,13 +94,13 @@ func (c *FakeClusterRoleBindings) List(opts api.ListOptions) (result *rbac.Clust } // Watch returns a watch.Interface that watches the requested clusterRoleBindings. -func (c *FakeClusterRoleBindings) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *FakeClusterRoleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewRootWatchAction(clusterrolebindingsResource, opts)) } // Patch applies the patch and returns the patched clusterRoleBinding. -func (c *FakeClusterRoleBindings) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *rbac.ClusterRoleBinding, err error) { +func (c *FakeClusterRoleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *rbac.ClusterRoleBinding, err error) { obj, err := c.Fake. Invokes(core.NewRootPatchSubresourceAction(clusterrolebindingsResource, name, data, subresources...), &rbac.ClusterRoleBinding{}) if obj == nil { diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/fake/fake_rbac_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/fake/fake_rbac_client.go index a17bbf1f..0e94ed91 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/fake/fake_rbac_client.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/fake/fake_rbac_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" internalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -44,7 +44,7 @@ func (c *FakeRbac) RoleBindings(namespace string) internalversion.RoleBindingInt // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeRbac) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeRbac) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/fake/fake_role.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/fake/fake_role.go index c295fc9e..eb6eae7a 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/fake/fake_role.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/fake/fake_role.go @@ -20,8 +20,8 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" rbac "k8s.io/kubernetes/pkg/apis/rbac" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -54,14 +54,14 @@ func (c *FakeRoles) Update(role *rbac.Role) (result *rbac.Role, err error) { return obj.(*rbac.Role), err } -func (c *FakeRoles) Delete(name string, options *api.DeleteOptions) error { +func (c *FakeRoles) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewDeleteAction(rolesResource, c.ns, name), &rbac.Role{}) return err } -func (c *FakeRoles) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *FakeRoles) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := core.NewDeleteCollectionAction(rolesResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &rbac.RoleList{}) @@ -78,7 +78,7 @@ func (c *FakeRoles) Get(name string, options v1.GetOptions) (result *rbac.Role, return obj.(*rbac.Role), err } -func (c *FakeRoles) List(opts api.ListOptions) (result *rbac.RoleList, err error) { +func (c *FakeRoles) List(opts v1.ListOptions) (result *rbac.RoleList, err error) { obj, err := c.Fake. Invokes(core.NewListAction(rolesResource, c.ns, opts), &rbac.RoleList{}) @@ -100,14 +100,14 @@ func (c *FakeRoles) List(opts api.ListOptions) (result *rbac.RoleList, err error } // Watch returns a watch.Interface that watches the requested roles. -func (c *FakeRoles) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *FakeRoles) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewWatchAction(rolesResource, c.ns, opts)) } // Patch applies the patch and returns the patched role. -func (c *FakeRoles) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *rbac.Role, err error) { +func (c *FakeRoles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *rbac.Role, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(rolesResource, c.ns, name, data, subresources...), &rbac.Role{}) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/fake/fake_rolebinding.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/fake/fake_rolebinding.go index dce55844..a163f7fe 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/fake/fake_rolebinding.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/fake/fake_rolebinding.go @@ -20,8 +20,8 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" rbac "k8s.io/kubernetes/pkg/apis/rbac" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -54,14 +54,14 @@ func (c *FakeRoleBindings) Update(roleBinding *rbac.RoleBinding) (result *rbac.R return obj.(*rbac.RoleBinding), err } -func (c *FakeRoleBindings) Delete(name string, options *api.DeleteOptions) error { +func (c *FakeRoleBindings) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewDeleteAction(rolebindingsResource, c.ns, name), &rbac.RoleBinding{}) return err } -func (c *FakeRoleBindings) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *FakeRoleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := core.NewDeleteCollectionAction(rolebindingsResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &rbac.RoleBindingList{}) @@ -78,7 +78,7 @@ func (c *FakeRoleBindings) Get(name string, options v1.GetOptions) (result *rbac return obj.(*rbac.RoleBinding), err } -func (c *FakeRoleBindings) List(opts api.ListOptions) (result *rbac.RoleBindingList, err error) { +func (c *FakeRoleBindings) List(opts v1.ListOptions) (result *rbac.RoleBindingList, err error) { obj, err := c.Fake. Invokes(core.NewListAction(rolebindingsResource, c.ns, opts), &rbac.RoleBindingList{}) @@ -100,14 +100,14 @@ func (c *FakeRoleBindings) List(opts api.ListOptions) (result *rbac.RoleBindingL } // Watch returns a watch.Interface that watches the requested roleBindings. -func (c *FakeRoleBindings) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *FakeRoleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewWatchAction(rolebindingsResource, c.ns, opts)) } // Patch applies the patch and returns the patched roleBinding. -func (c *FakeRoleBindings) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *rbac.RoleBinding, err error) { +func (c *FakeRoleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *rbac.RoleBinding, err error) { obj, err := c.Fake. Invokes(core.NewPatchSubresourceAction(rolebindingsResource, c.ns, name, data, subresources...), &rbac.RoleBinding{}) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/rbac_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/rbac_client.go index 25a6f01e..c5f6244b 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/rbac_client.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/rbac_client.go @@ -17,12 +17,12 @@ limitations under the License. package internalversion import ( + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type RbacInterface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface ClusterRolesGetter ClusterRoleBindingsGetter RolesGetter @@ -31,7 +31,7 @@ type RbacInterface interface { // RbacClient is used to interact with features provided by the rbac.authorization.k8s.io group. type RbacClient struct { - restClient restclient.Interface + restClient rest.Interface } func (c *RbacClient) ClusterRoles() ClusterRoleInterface { @@ -51,12 +51,12 @@ func (c *RbacClient) RoleBindings(namespace string) RoleBindingInterface { } // NewForConfig creates a new RbacClient for the given config. -func NewForConfig(c *restclient.Config) (*RbacClient, error) { +func NewForConfig(c *rest.Config) (*RbacClient, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -65,7 +65,7 @@ func NewForConfig(c *restclient.Config) (*RbacClient, error) { // NewForConfigOrDie creates a new RbacClient for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *RbacClient { +func NewForConfigOrDie(c *rest.Config) *RbacClient { client, err := NewForConfig(c) if err != nil { panic(err) @@ -74,11 +74,11 @@ func NewForConfigOrDie(c *restclient.Config) *RbacClient { } // New creates a new RbacClient for the given RESTClient. -func New(c restclient.Interface) *RbacClient { +func New(c rest.Interface) *RbacClient { return &RbacClient{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { // if rbac group is not registered, return an error g, err := api.Registry.Group("rbac.authorization.k8s.io") if err != nil { @@ -86,7 +86,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/apis" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } if config.GroupVersion == nil || config.GroupVersion.Group != g.GroupVersion.Group { copyGroupVersion := g.GroupVersion @@ -105,7 +105,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *RbacClient) RESTClient() restclient.Interface { +func (c *RbacClient) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/role.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/role.go index d0f284b6..fb711e57 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/role.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/role.go @@ -18,10 +18,11 @@ package internalversion import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" rbac "k8s.io/kubernetes/pkg/apis/rbac" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // RolesGetter has a method to return a RoleInterface. @@ -34,18 +35,18 @@ type RolesGetter interface { type RoleInterface interface { Create(*rbac.Role) (*rbac.Role, error) Update(*rbac.Role) (*rbac.Role, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error Get(name string, options v1.GetOptions) (*rbac.Role, error) - List(opts api.ListOptions) (*rbac.RoleList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *rbac.Role, err error) + List(opts v1.ListOptions) (*rbac.RoleList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *rbac.Role, err error) RoleExpansion } // roles implements RoleInterface type roles struct { - client restclient.Interface + client rest.Interface ns string } @@ -83,7 +84,7 @@ func (c *roles) Update(role *rbac.Role) (result *rbac.Role, err error) { } // Delete takes name of the role and deletes it. Returns an error if one occurs. -func (c *roles) Delete(name string, options *api.DeleteOptions) error { +func (c *roles) Delete(name string, options *v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("roles"). @@ -94,7 +95,7 @@ func (c *roles) Delete(name string, options *api.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *roles) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *roles) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("roles"). @@ -118,7 +119,7 @@ func (c *roles) Get(name string, options v1.GetOptions) (result *rbac.Role, err } // List takes label and field selectors, and returns the list of Roles that match those selectors. -func (c *roles) List(opts api.ListOptions) (result *rbac.RoleList, err error) { +func (c *roles) List(opts v1.ListOptions) (result *rbac.RoleList, err error) { result = &rbac.RoleList{} err = c.client.Get(). Namespace(c.ns). @@ -130,7 +131,7 @@ func (c *roles) List(opts api.ListOptions) (result *rbac.RoleList, err error) { } // Watch returns a watch.Interface that watches the requested roles. -func (c *roles) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *roles) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -140,7 +141,7 @@ func (c *roles) Watch(opts api.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched role. -func (c *roles) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *rbac.Role, err error) { +func (c *roles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *rbac.Role, err error) { result = &rbac.Role{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/rolebinding.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/rolebinding.go index 195c8811..24c3fcb0 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/rolebinding.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion/rolebinding.go @@ -18,10 +18,11 @@ package internalversion import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" rbac "k8s.io/kubernetes/pkg/apis/rbac" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // RoleBindingsGetter has a method to return a RoleBindingInterface. @@ -34,18 +35,18 @@ type RoleBindingsGetter interface { type RoleBindingInterface interface { Create(*rbac.RoleBinding) (*rbac.RoleBinding, error) Update(*rbac.RoleBinding) (*rbac.RoleBinding, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error Get(name string, options v1.GetOptions) (*rbac.RoleBinding, error) - List(opts api.ListOptions) (*rbac.RoleBindingList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *rbac.RoleBinding, err error) + List(opts v1.ListOptions) (*rbac.RoleBindingList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *rbac.RoleBinding, err error) RoleBindingExpansion } // roleBindings implements RoleBindingInterface type roleBindings struct { - client restclient.Interface + client rest.Interface ns string } @@ -83,7 +84,7 @@ func (c *roleBindings) Update(roleBinding *rbac.RoleBinding) (result *rbac.RoleB } // Delete takes name of the roleBinding and deletes it. Returns an error if one occurs. -func (c *roleBindings) Delete(name string, options *api.DeleteOptions) error { +func (c *roleBindings) Delete(name string, options *v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("rolebindings"). @@ -94,7 +95,7 @@ func (c *roleBindings) Delete(name string, options *api.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *roleBindings) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *roleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("rolebindings"). @@ -118,7 +119,7 @@ func (c *roleBindings) Get(name string, options v1.GetOptions) (result *rbac.Rol } // List takes label and field selectors, and returns the list of RoleBindings that match those selectors. -func (c *roleBindings) List(opts api.ListOptions) (result *rbac.RoleBindingList, err error) { +func (c *roleBindings) List(opts v1.ListOptions) (result *rbac.RoleBindingList, err error) { result = &rbac.RoleBindingList{} err = c.client.Get(). Namespace(c.ns). @@ -130,7 +131,7 @@ func (c *roleBindings) List(opts api.ListOptions) (result *rbac.RoleBindingList, } // Watch returns a watch.Interface that watches the requested roleBindings. -func (c *roleBindings) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *roleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -140,7 +141,7 @@ func (c *roleBindings) Watch(opts api.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched roleBinding. -func (c *roleBindings) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *rbac.RoleBinding, err error) { +func (c *roleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *rbac.RoleBinding, err error) { result = &rbac.RoleBinding{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/BUILD b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/BUILD index 9c3e2378..34ccef18 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/BUILD @@ -19,9 +19,10 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/apis/storage:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/fake/BUILD b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/fake/BUILD index 50eac8d1..8429f817 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/fake/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/fake/BUILD @@ -16,15 +16,15 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//pkg/apis/storage:go_default_library", "//pkg/client/clientset_generated/internalclientset/typed/storage/internalversion:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/fake/fake_storage_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/fake/fake_storage_client.go index e954f152..7abe6f4f 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/fake/fake_storage_client.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/fake/fake_storage_client.go @@ -17,8 +17,8 @@ limitations under the License. package fake import ( + rest "k8s.io/client-go/rest" internalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion" - restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -32,7 +32,7 @@ func (c *FakeStorage) StorageClasses() internalversion.StorageClassInterface { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeStorage) RESTClient() restclient.Interface { - var ret *restclient.RESTClient +func (c *FakeStorage) RESTClient() rest.Interface { + var ret *rest.RESTClient return ret } diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/fake/fake_storageclass.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/fake/fake_storageclass.go index 83ba5b58..e1ba9c57 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/fake/fake_storageclass.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/fake/fake_storageclass.go @@ -20,8 +20,8 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" storage "k8s.io/kubernetes/pkg/apis/storage" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -51,13 +51,13 @@ func (c *FakeStorageClasses) Update(storageClass *storage.StorageClass) (result return obj.(*storage.StorageClass), err } -func (c *FakeStorageClasses) Delete(name string, options *api.DeleteOptions) error { +func (c *FakeStorageClasses) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. Invokes(core.NewRootDeleteAction(storageclassesResource, name), &storage.StorageClass{}) return err } -func (c *FakeStorageClasses) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *FakeStorageClasses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := core.NewRootDeleteCollectionAction(storageclassesResource, listOptions) _, err := c.Fake.Invokes(action, &storage.StorageClassList{}) @@ -73,7 +73,7 @@ func (c *FakeStorageClasses) Get(name string, options v1.GetOptions) (result *st return obj.(*storage.StorageClass), err } -func (c *FakeStorageClasses) List(opts api.ListOptions) (result *storage.StorageClassList, err error) { +func (c *FakeStorageClasses) List(opts v1.ListOptions) (result *storage.StorageClassList, err error) { obj, err := c.Fake. Invokes(core.NewRootListAction(storageclassesResource, opts), &storage.StorageClassList{}) if obj == nil { @@ -94,13 +94,13 @@ func (c *FakeStorageClasses) List(opts api.ListOptions) (result *storage.Storage } // Watch returns a watch.Interface that watches the requested storageClasses. -func (c *FakeStorageClasses) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *FakeStorageClasses) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewRootWatchAction(storageclassesResource, opts)) } // Patch applies the patch and returns the patched storageClass. -func (c *FakeStorageClasses) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *storage.StorageClass, err error) { +func (c *FakeStorageClasses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *storage.StorageClass, err error) { obj, err := c.Fake. Invokes(core.NewRootPatchSubresourceAction(storageclassesResource, name, data, subresources...), &storage.StorageClass{}) if obj == nil { diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/storage_client.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/storage_client.go index c96e84e2..2b4a06a4 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/storage_client.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/storage_client.go @@ -17,18 +17,18 @@ limitations under the License. package internalversion import ( + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) type StorageInterface interface { - RESTClient() restclient.Interface + RESTClient() rest.Interface StorageClassesGetter } // StorageClient is used to interact with features provided by the storage.k8s.io group. type StorageClient struct { - restClient restclient.Interface + restClient rest.Interface } func (c *StorageClient) StorageClasses() StorageClassInterface { @@ -36,12 +36,12 @@ func (c *StorageClient) StorageClasses() StorageClassInterface { } // NewForConfig creates a new StorageClient for the given config. -func NewForConfig(c *restclient.Config) (*StorageClient, error) { +func NewForConfig(c *rest.Config) (*StorageClient, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := restclient.RESTClientFor(&config) + client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } @@ -50,7 +50,7 @@ func NewForConfig(c *restclient.Config) (*StorageClient, error) { // NewForConfigOrDie creates a new StorageClient for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *restclient.Config) *StorageClient { +func NewForConfigOrDie(c *rest.Config) *StorageClient { client, err := NewForConfig(c) if err != nil { panic(err) @@ -59,11 +59,11 @@ func NewForConfigOrDie(c *restclient.Config) *StorageClient { } // New creates a new StorageClient for the given RESTClient. -func New(c restclient.Interface) *StorageClient { +func New(c rest.Interface) *StorageClient { return &StorageClient{c} } -func setConfigDefaults(config *restclient.Config) error { +func setConfigDefaults(config *rest.Config) error { // if storage group is not registered, return an error g, err := api.Registry.Group("storage.k8s.io") if err != nil { @@ -71,7 +71,7 @@ func setConfigDefaults(config *restclient.Config) error { } config.APIPath = "/apis" if config.UserAgent == "" { - config.UserAgent = restclient.DefaultKubernetesUserAgent() + config.UserAgent = rest.DefaultKubernetesUserAgent() } if config.GroupVersion == nil || config.GroupVersion.Group != g.GroupVersion.Group { copyGroupVersion := g.GroupVersion @@ -90,7 +90,7 @@ func setConfigDefaults(config *restclient.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *StorageClient) RESTClient() restclient.Interface { +func (c *StorageClient) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/storageclass.go b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/storageclass.go index 132ef73b..b525106c 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/storageclass.go +++ b/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/storage/internalversion/storageclass.go @@ -18,10 +18,11 @@ package internalversion import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" api "k8s.io/kubernetes/pkg/api" storage "k8s.io/kubernetes/pkg/apis/storage" - restclient "k8s.io/kubernetes/pkg/client/restclient" ) // StorageClassesGetter has a method to return a StorageClassInterface. @@ -34,18 +35,18 @@ type StorageClassesGetter interface { type StorageClassInterface interface { Create(*storage.StorageClass) (*storage.StorageClass, error) Update(*storage.StorageClass) (*storage.StorageClass, error) - Delete(name string, options *api.DeleteOptions) error - DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error Get(name string, options v1.GetOptions) (*storage.StorageClass, error) - List(opts api.ListOptions) (*storage.StorageClassList, error) - Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *storage.StorageClass, err error) + List(opts v1.ListOptions) (*storage.StorageClassList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *storage.StorageClass, err error) StorageClassExpansion } // storageClasses implements StorageClassInterface type storageClasses struct { - client restclient.Interface + client rest.Interface } // newStorageClasses returns a StorageClasses @@ -79,7 +80,7 @@ func (c *storageClasses) Update(storageClass *storage.StorageClass) (result *sto } // Delete takes name of the storageClass and deletes it. Returns an error if one occurs. -func (c *storageClasses) Delete(name string, options *api.DeleteOptions) error { +func (c *storageClasses) Delete(name string, options *v1.DeleteOptions) error { return c.client.Delete(). Resource("storageclasses"). Name(name). @@ -89,7 +90,7 @@ func (c *storageClasses) Delete(name string, options *api.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *storageClasses) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { +func (c *storageClasses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { return c.client.Delete(). Resource("storageclasses"). VersionedParams(&listOptions, api.ParameterCodec). @@ -111,7 +112,7 @@ func (c *storageClasses) Get(name string, options v1.GetOptions) (result *storag } // List takes label and field selectors, and returns the list of StorageClasses that match those selectors. -func (c *storageClasses) List(opts api.ListOptions) (result *storage.StorageClassList, err error) { +func (c *storageClasses) List(opts v1.ListOptions) (result *storage.StorageClassList, err error) { result = &storage.StorageClassList{} err = c.client.Get(). Resource("storageclasses"). @@ -122,7 +123,7 @@ func (c *storageClasses) List(opts api.ListOptions) (result *storage.StorageClas } // Watch returns a watch.Interface that watches the requested storageClasses. -func (c *storageClasses) Watch(opts api.ListOptions) (watch.Interface, error) { +func (c *storageClasses) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Resource("storageclasses"). @@ -131,7 +132,7 @@ func (c *storageClasses) Watch(opts api.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched storageClass. -func (c *storageClasses) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *storage.StorageClass, err error) { +func (c *storageClasses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *storage.StorageClass, err error) { result = &storage.StorageClass{} err = c.client.Patch(pt). Resource("storageclasses"). diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/BUILD b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/BUILD index cb3662a6..ec85a1b1 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/BUILD @@ -25,13 +25,14 @@ go_library( "//pkg/apis/batch/v1:go_default_library", "//pkg/apis/batch/v2alpha1:go_default_library", "//pkg/apis/certificates:go_default_library", - "//pkg/apis/certificates/v1alpha1:go_default_library", + "//pkg/apis/certificates/v1beta1:go_default_library", "//pkg/apis/extensions:go_default_library", "//pkg/apis/extensions/v1beta1:go_default_library", "//pkg/apis/policy:go_default_library", "//pkg/apis/policy/v1beta1:go_default_library", "//pkg/apis/rbac:go_default_library", "//pkg/apis/rbac/v1alpha1:go_default_library", + "//pkg/apis/rbac/v1beta1:go_default_library", "//pkg/apis/storage:go_default_library", "//pkg/apis/storage/v1beta1:go_default_library", "//pkg/client/cache:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/apps/interface.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/apps/interface.go index ef7a2b2e..106d5bd7 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/apps/interface.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/apps/interface.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package apps diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/apps/internalversion/BUILD b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/apps/internalversion/BUILD index 7620cc3e..a950d4c5 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/apps/internalversion/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/apps/internalversion/BUILD @@ -15,13 +15,12 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", - "//pkg/api/v1:go_default_library", "//pkg/apis/apps:go_default_library", "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/internalclientset:go_default_library", "//pkg/client/informers/informers_generated/internalinterfaces:go_default_library", "//pkg/client/listers/apps/internalversion:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/watch", ], diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/apps/internalversion/interface.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/apps/internalversion/interface.go index 7922ba3b..a6adc8a5 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/apps/internalversion/interface.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/apps/internalversion/interface.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package internalversion diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/apps/internalversion/statefulset.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/apps/internalversion/statefulset.go index 3e1e0da1..3487f148 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/apps/internalversion/statefulset.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/apps/internalversion/statefulset.go @@ -14,15 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package internalversion import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" apps "k8s.io/kubernetes/pkg/apis/apps" cache "k8s.io/kubernetes/pkg/client/cache" internalclientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" @@ -46,18 +45,10 @@ func newStatefulSetInformer(client internalclientset.Interface, resyncPeriod tim sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Apps().StatefulSets(api.NamespaceAll).List(internalOptions) + return client.Apps().StatefulSets(v1.NamespaceAll).List(options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Apps().StatefulSets(api.NamespaceAll).Watch(internalOptions) + return client.Apps().StatefulSets(v1.NamespaceAll).Watch(options) }, }, &apps.StatefulSet{}, diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/apps/v1beta1/BUILD b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/apps/v1beta1/BUILD index 15d979a6..569168a3 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/apps/v1beta1/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/apps/v1beta1/BUILD @@ -15,12 +15,12 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api/v1:go_default_library", "//pkg/apis/apps/v1beta1:go_default_library", "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", "//pkg/client/informers/informers_generated/internalinterfaces:go_default_library", "//pkg/client/listers/apps/v1beta1:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/watch", ], diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/apps/v1beta1/interface.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/apps/v1beta1/interface.go index aa21a110..e8eec4ca 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/apps/v1beta1/interface.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/apps/v1beta1/interface.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package v1beta1 diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/apps/v1beta1/statefulset.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/apps/v1beta1/statefulset.go index cbf99fd5..d410363f 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/apps/v1beta1/statefulset.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/apps/v1beta1/statefulset.go @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package v1beta1 import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" - v1 "k8s.io/kubernetes/pkg/api/v1" apps_v1beta1 "k8s.io/kubernetes/pkg/apis/apps/v1beta1" cache "k8s.io/kubernetes/pkg/client/cache" clientset "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/autoscaling/interface.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/autoscaling/interface.go index 749d1e56..efe4c097 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/autoscaling/interface.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/autoscaling/interface.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package autoscaling diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/autoscaling/internalversion/BUILD b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/autoscaling/internalversion/BUILD index 5ca2df24..4acb02c5 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/autoscaling/internalversion/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/autoscaling/internalversion/BUILD @@ -15,13 +15,12 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", - "//pkg/api/v1:go_default_library", "//pkg/apis/autoscaling:go_default_library", "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/internalclientset:go_default_library", "//pkg/client/informers/informers_generated/internalinterfaces:go_default_library", "//pkg/client/listers/autoscaling/internalversion:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/watch", ], diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/autoscaling/internalversion/horizontalpodautoscaler.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/autoscaling/internalversion/horizontalpodautoscaler.go index 42c49572..94e0371f 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/autoscaling/internalversion/horizontalpodautoscaler.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/autoscaling/internalversion/horizontalpodautoscaler.go @@ -14,15 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package internalversion import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" autoscaling "k8s.io/kubernetes/pkg/apis/autoscaling" cache "k8s.io/kubernetes/pkg/client/cache" internalclientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" @@ -46,18 +45,10 @@ func newHorizontalPodAutoscalerInformer(client internalclientset.Interface, resy sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Autoscaling().HorizontalPodAutoscalers(api.NamespaceAll).List(internalOptions) + return client.Autoscaling().HorizontalPodAutoscalers(v1.NamespaceAll).List(options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Autoscaling().HorizontalPodAutoscalers(api.NamespaceAll).Watch(internalOptions) + return client.Autoscaling().HorizontalPodAutoscalers(v1.NamespaceAll).Watch(options) }, }, &autoscaling.HorizontalPodAutoscaler{}, diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/autoscaling/internalversion/interface.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/autoscaling/internalversion/interface.go index d213cd60..8d48e749 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/autoscaling/internalversion/interface.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/autoscaling/internalversion/interface.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package internalversion diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/autoscaling/v1/BUILD b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/autoscaling/v1/BUILD index cbadcc9f..eaf6ba04 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/autoscaling/v1/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/autoscaling/v1/BUILD @@ -15,12 +15,12 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api/v1:go_default_library", "//pkg/apis/autoscaling/v1:go_default_library", "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", "//pkg/client/informers/informers_generated/internalinterfaces:go_default_library", "//pkg/client/listers/autoscaling/v1:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/watch", ], diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/autoscaling/v1/horizontalpodautoscaler.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/autoscaling/v1/horizontalpodautoscaler.go index a0a9b042..98766c0f 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/autoscaling/v1/horizontalpodautoscaler.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/autoscaling/v1/horizontalpodautoscaler.go @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package v1 import ( + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" - api_v1 "k8s.io/kubernetes/pkg/api/v1" autoscaling_v1 "k8s.io/kubernetes/pkg/apis/autoscaling/v1" cache "k8s.io/kubernetes/pkg/client/cache" clientset "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" @@ -44,11 +44,11 @@ type horizontalPodAutoscalerInformer struct { func newHorizontalPodAutoscalerInformer(client clientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options api_v1.ListOptions) (runtime.Object, error) { - return client.AutoscalingV1().HorizontalPodAutoscalers(api_v1.NamespaceAll).List(options) + ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + return client.AutoscalingV1().HorizontalPodAutoscalers(meta_v1.NamespaceAll).List(options) }, - WatchFunc: func(options api_v1.ListOptions) (watch.Interface, error) { - return client.AutoscalingV1().HorizontalPodAutoscalers(api_v1.NamespaceAll).Watch(options) + WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + return client.AutoscalingV1().HorizontalPodAutoscalers(meta_v1.NamespaceAll).Watch(options) }, }, &autoscaling_v1.HorizontalPodAutoscaler{}, diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/autoscaling/v1/interface.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/autoscaling/v1/interface.go index e0af6a43..2467aaa2 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/autoscaling/v1/interface.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/autoscaling/v1/interface.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package v1 diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/batch/interface.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/batch/interface.go index 9c0ee195..891f715d 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/batch/interface.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/batch/interface.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package batch diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/batch/internalversion/BUILD b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/batch/internalversion/BUILD index 20caf883..bea13d51 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/batch/internalversion/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/batch/internalversion/BUILD @@ -16,13 +16,12 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", - "//pkg/api/v1:go_default_library", "//pkg/apis/batch:go_default_library", "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/internalclientset:go_default_library", "//pkg/client/informers/informers_generated/internalinterfaces:go_default_library", "//pkg/client/listers/batch/internalversion:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/watch", ], diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/batch/internalversion/cronjob.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/batch/internalversion/cronjob.go index 7c79d008..d753e0d1 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/batch/internalversion/cronjob.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/batch/internalversion/cronjob.go @@ -14,15 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package internalversion import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" batch "k8s.io/kubernetes/pkg/apis/batch" cache "k8s.io/kubernetes/pkg/client/cache" internalclientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" @@ -46,18 +45,10 @@ func newCronJobInformer(client internalclientset.Interface, resyncPeriod time.Du sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Batch().CronJobs(api.NamespaceAll).List(internalOptions) + return client.Batch().CronJobs(v1.NamespaceAll).List(options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Batch().CronJobs(api.NamespaceAll).Watch(internalOptions) + return client.Batch().CronJobs(v1.NamespaceAll).Watch(options) }, }, &batch.CronJob{}, diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/batch/internalversion/interface.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/batch/internalversion/interface.go index c597e66d..d480e70a 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/batch/internalversion/interface.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/batch/internalversion/interface.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package internalversion diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/batch/internalversion/job.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/batch/internalversion/job.go index 45fb2d84..09175014 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/batch/internalversion/job.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/batch/internalversion/job.go @@ -14,15 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package internalversion import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" batch "k8s.io/kubernetes/pkg/apis/batch" cache "k8s.io/kubernetes/pkg/client/cache" internalclientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" @@ -46,18 +45,10 @@ func newJobInformer(client internalclientset.Interface, resyncPeriod time.Durati sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Batch().Jobs(api.NamespaceAll).List(internalOptions) + return client.Batch().Jobs(v1.NamespaceAll).List(options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Batch().Jobs(api.NamespaceAll).Watch(internalOptions) + return client.Batch().Jobs(v1.NamespaceAll).Watch(options) }, }, &batch.Job{}, diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/batch/v1/BUILD b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/batch/v1/BUILD index 4595368b..11a99151 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/batch/v1/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/batch/v1/BUILD @@ -15,12 +15,12 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api/v1:go_default_library", "//pkg/apis/batch/v1:go_default_library", "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", "//pkg/client/informers/informers_generated/internalinterfaces:go_default_library", "//pkg/client/listers/batch/v1:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/watch", ], diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/batch/v1/interface.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/batch/v1/interface.go index 821a532b..2781945b 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/batch/v1/interface.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/batch/v1/interface.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package v1 diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/batch/v1/job.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/batch/v1/job.go index 9d224995..4aa25bfd 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/batch/v1/job.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/batch/v1/job.go @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package v1 import ( + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" - api_v1 "k8s.io/kubernetes/pkg/api/v1" batch_v1 "k8s.io/kubernetes/pkg/apis/batch/v1" cache "k8s.io/kubernetes/pkg/client/cache" clientset "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" @@ -44,11 +44,11 @@ type jobInformer struct { func newJobInformer(client clientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options api_v1.ListOptions) (runtime.Object, error) { - return client.BatchV1().Jobs(api_v1.NamespaceAll).List(options) + ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + return client.BatchV1().Jobs(meta_v1.NamespaceAll).List(options) }, - WatchFunc: func(options api_v1.ListOptions) (watch.Interface, error) { - return client.BatchV1().Jobs(api_v1.NamespaceAll).Watch(options) + WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + return client.BatchV1().Jobs(meta_v1.NamespaceAll).Watch(options) }, }, &batch_v1.Job{}, diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/batch/v2alpha1/BUILD b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/batch/v2alpha1/BUILD index 66a476bf..8bc18a47 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/batch/v2alpha1/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/batch/v2alpha1/BUILD @@ -16,12 +16,12 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api/v1:go_default_library", "//pkg/apis/batch/v2alpha1:go_default_library", "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", "//pkg/client/informers/informers_generated/internalinterfaces:go_default_library", "//pkg/client/listers/batch/v2alpha1:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/watch", ], diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/batch/v2alpha1/cronjob.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/batch/v2alpha1/cronjob.go index dae62b3e..06b02a68 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/batch/v2alpha1/cronjob.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/batch/v2alpha1/cronjob.go @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package v2alpha1 import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" - v1 "k8s.io/kubernetes/pkg/api/v1" batch_v2alpha1 "k8s.io/kubernetes/pkg/apis/batch/v2alpha1" cache "k8s.io/kubernetes/pkg/client/cache" clientset "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/batch/v2alpha1/interface.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/batch/v2alpha1/interface.go index 88d3335b..0dbe577a 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/batch/v2alpha1/interface.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/batch/v2alpha1/interface.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package v2alpha1 diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/batch/v2alpha1/job.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/batch/v2alpha1/job.go index 25558a4f..3ba7ce9d 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/batch/v2alpha1/job.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/batch/v2alpha1/job.go @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package v2alpha1 import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" - v1 "k8s.io/kubernetes/pkg/api/v1" batch_v2alpha1 "k8s.io/kubernetes/pkg/apis/batch/v2alpha1" cache "k8s.io/kubernetes/pkg/client/cache" clientset "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/certificates/BUILD b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/certificates/BUILD index 4c864302..719ce8e1 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/certificates/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/certificates/BUILD @@ -13,7 +13,7 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/client/informers/informers_generated/certificates/internalversion:go_default_library", - "//pkg/client/informers/informers_generated/certificates/v1alpha1:go_default_library", + "//pkg/client/informers/informers_generated/certificates/v1beta1:go_default_library", "//pkg/client/informers/informers_generated/internalinterfaces:go_default_library", ], ) @@ -30,7 +30,7 @@ filegroup( srcs = [ ":package-srcs", "//pkg/client/informers/informers_generated/certificates/internalversion:all-srcs", - "//pkg/client/informers/informers_generated/certificates/v1alpha1:all-srcs", + "//pkg/client/informers/informers_generated/certificates/v1beta1:all-srcs", ], tags = ["automanaged"], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/certificates/interface.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/certificates/interface.go index cf2a1a3a..425fe5e2 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/certificates/interface.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/certificates/interface.go @@ -14,13 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package certificates import ( internalversion "k8s.io/kubernetes/pkg/client/informers/informers_generated/certificates/internalversion" - v1alpha1 "k8s.io/kubernetes/pkg/client/informers/informers_generated/certificates/v1alpha1" + v1beta1 "k8s.io/kubernetes/pkg/client/informers/informers_generated/certificates/v1beta1" internalinterfaces "k8s.io/kubernetes/pkg/client/informers/informers_generated/internalinterfaces" ) @@ -28,8 +28,8 @@ import ( type Interface interface { // InternalVersion provides access to shared informers for resources in InternalVersion. InternalVersion() internalversion.Interface - // V1alpha1 provides access to shared informers for resources in V1alpha1. - V1alpha1() v1alpha1.Interface + // V1beta1 provides access to shared informers for resources in V1beta1. + V1beta1() v1beta1.Interface } type group struct { @@ -46,7 +46,7 @@ func (g *group) InternalVersion() internalversion.Interface { return internalversion.New(g.SharedInformerFactory) } -// V1alpha1 returns a new v1alpha1.Interface. -func (g *group) V1alpha1() v1alpha1.Interface { - return v1alpha1.New(g.SharedInformerFactory) +// V1beta1 returns a new v1beta1.Interface. +func (g *group) V1beta1() v1beta1.Interface { + return v1beta1.New(g.SharedInformerFactory) } diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/certificates/internalversion/BUILD b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/certificates/internalversion/BUILD index 23569295..7427f692 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/certificates/internalversion/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/certificates/internalversion/BUILD @@ -15,13 +15,12 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", - "//pkg/api/v1:go_default_library", "//pkg/apis/certificates:go_default_library", "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/internalclientset:go_default_library", "//pkg/client/informers/informers_generated/internalinterfaces:go_default_library", "//pkg/client/listers/certificates/internalversion:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/watch", ], diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/certificates/internalversion/certificatesigningrequest.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/certificates/internalversion/certificatesigningrequest.go index 60ab8ead..8de7bcb3 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/certificates/internalversion/certificatesigningrequest.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/certificates/internalversion/certificatesigningrequest.go @@ -14,15 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package internalversion import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" certificates "k8s.io/kubernetes/pkg/apis/certificates" cache "k8s.io/kubernetes/pkg/client/cache" internalclientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" @@ -46,18 +45,10 @@ func newCertificateSigningRequestInformer(client internalclientset.Interface, re sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Certificates().CertificateSigningRequests().List(internalOptions) + return client.Certificates().CertificateSigningRequests().List(options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Certificates().CertificateSigningRequests().Watch(internalOptions) + return client.Certificates().CertificateSigningRequests().Watch(options) }, }, &certificates.CertificateSigningRequest{}, diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/certificates/internalversion/interface.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/certificates/internalversion/interface.go index 8adc8c33..d7bf232d 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/certificates/internalversion/interface.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/certificates/internalversion/interface.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package internalversion diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/certificates/v1alpha1/BUILD b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/certificates/v1beta1/BUILD similarity index 81% rename from vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/certificates/v1alpha1/BUILD rename to vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/certificates/v1beta1/BUILD index f9b42c47..98a27680 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/certificates/v1alpha1/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/certificates/v1beta1/BUILD @@ -15,12 +15,12 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api/v1:go_default_library", - "//pkg/apis/certificates/v1alpha1:go_default_library", + "//pkg/apis/certificates/v1beta1:go_default_library", "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", "//pkg/client/informers/informers_generated/internalinterfaces:go_default_library", - "//pkg/client/listers/certificates/v1alpha1:go_default_library", + "//pkg/client/listers/certificates/v1beta1:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/watch", ], diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/certificates/v1alpha1/certificatesigningrequest.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/certificates/v1beta1/certificatesigningrequest.go similarity index 61% rename from vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/certificates/v1alpha1/certificatesigningrequest.go rename to vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/certificates/v1beta1/certificatesigningrequest.go index 2669ff6b..1e0ca83f 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/certificates/v1alpha1/certificatesigningrequest.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/certificates/v1beta1/certificatesigningrequest.go @@ -14,19 +14,19 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset -package v1alpha1 +package v1beta1 import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" - v1 "k8s.io/kubernetes/pkg/api/v1" - certificates_v1alpha1 "k8s.io/kubernetes/pkg/apis/certificates/v1alpha1" + certificates_v1beta1 "k8s.io/kubernetes/pkg/apis/certificates/v1beta1" cache "k8s.io/kubernetes/pkg/client/cache" clientset "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" internalinterfaces "k8s.io/kubernetes/pkg/client/informers/informers_generated/internalinterfaces" - v1alpha1 "k8s.io/kubernetes/pkg/client/listers/certificates/v1alpha1" + v1beta1 "k8s.io/kubernetes/pkg/client/listers/certificates/v1beta1" time "time" ) @@ -34,7 +34,7 @@ import ( // CertificateSigningRequests. type CertificateSigningRequestInformer interface { Informer() cache.SharedIndexInformer - Lister() v1alpha1.CertificateSigningRequestLister + Lister() v1beta1.CertificateSigningRequestLister } type certificateSigningRequestInformer struct { @@ -45,13 +45,13 @@ func newCertificateSigningRequestInformer(client clientset.Interface, resyncPeri sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - return client.CertificatesV1alpha1().CertificateSigningRequests().List(options) + return client.CertificatesV1beta1().CertificateSigningRequests().List(options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - return client.CertificatesV1alpha1().CertificateSigningRequests().Watch(options) + return client.CertificatesV1beta1().CertificateSigningRequests().Watch(options) }, }, - &certificates_v1alpha1.CertificateSigningRequest{}, + &certificates_v1beta1.CertificateSigningRequest{}, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, ) @@ -60,9 +60,9 @@ func newCertificateSigningRequestInformer(client clientset.Interface, resyncPeri } func (f *certificateSigningRequestInformer) Informer() cache.SharedIndexInformer { - return f.factory.VersionedInformerFor(&certificates_v1alpha1.CertificateSigningRequest{}, newCertificateSigningRequestInformer) + return f.factory.VersionedInformerFor(&certificates_v1beta1.CertificateSigningRequest{}, newCertificateSigningRequestInformer) } -func (f *certificateSigningRequestInformer) Lister() v1alpha1.CertificateSigningRequestLister { - return v1alpha1.NewCertificateSigningRequestLister(f.Informer().GetIndexer()) +func (f *certificateSigningRequestInformer) Lister() v1beta1.CertificateSigningRequestLister { + return v1beta1.NewCertificateSigningRequestLister(f.Informer().GetIndexer()) } diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/certificates/v1alpha1/interface.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/certificates/v1beta1/interface.go similarity index 72% rename from vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/certificates/v1alpha1/interface.go rename to vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/certificates/v1beta1/interface.go index 84efe3eb..68291388 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/certificates/v1alpha1/interface.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/certificates/v1beta1/interface.go @@ -14,9 +14,9 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset -package v1alpha1 +package v1beta1 import ( internalinterfaces "k8s.io/kubernetes/pkg/client/informers/informers_generated/internalinterfaces" diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/interface.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/interface.go index 70952e94..8a3d181b 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/interface.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/interface.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package core diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/BUILD b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/BUILD index 9ba70a62..f46fd0b2 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/BUILD @@ -31,11 +31,11 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/api:go_default_library", - "//pkg/api/v1:go_default_library", "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/internalclientset:go_default_library", "//pkg/client/informers/informers_generated/internalinterfaces:go_default_library", "//pkg/client/listers/core/internalversion:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/watch", ], diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/componentstatus.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/componentstatus.go index bbd31434..1d6c045b 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/componentstatus.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/componentstatus.go @@ -14,15 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package internalversion import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" cache "k8s.io/kubernetes/pkg/client/cache" internalclientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" internalinterfaces "k8s.io/kubernetes/pkg/client/informers/informers_generated/internalinterfaces" @@ -45,18 +45,10 @@ func newComponentStatusInformer(client internalclientset.Interface, resyncPeriod sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Core().ComponentStatuses().List(internalOptions) + return client.Core().ComponentStatuses().List(options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Core().ComponentStatuses().Watch(internalOptions) + return client.Core().ComponentStatuses().Watch(options) }, }, &api.ComponentStatus{}, diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/configmap.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/configmap.go index b7452503..a23f6121 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/configmap.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/configmap.go @@ -14,15 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package internalversion import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" cache "k8s.io/kubernetes/pkg/client/cache" internalclientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" internalinterfaces "k8s.io/kubernetes/pkg/client/informers/informers_generated/internalinterfaces" @@ -45,18 +45,10 @@ func newConfigMapInformer(client internalclientset.Interface, resyncPeriod time. sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Core().ConfigMaps(api.NamespaceAll).List(internalOptions) + return client.Core().ConfigMaps(v1.NamespaceAll).List(options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Core().ConfigMaps(api.NamespaceAll).Watch(internalOptions) + return client.Core().ConfigMaps(v1.NamespaceAll).Watch(options) }, }, &api.ConfigMap{}, diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/endpoints.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/endpoints.go index 9fbcd8a8..ce95bea0 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/endpoints.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/endpoints.go @@ -14,15 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package internalversion import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" cache "k8s.io/kubernetes/pkg/client/cache" internalclientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" internalinterfaces "k8s.io/kubernetes/pkg/client/informers/informers_generated/internalinterfaces" @@ -45,18 +45,10 @@ func newEndpointsInformer(client internalclientset.Interface, resyncPeriod time. sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Core().Endpoints(api.NamespaceAll).List(internalOptions) + return client.Core().Endpoints(v1.NamespaceAll).List(options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Core().Endpoints(api.NamespaceAll).Watch(internalOptions) + return client.Core().Endpoints(v1.NamespaceAll).Watch(options) }, }, &api.Endpoints{}, diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/event.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/event.go index dcd46711..3d520562 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/event.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/event.go @@ -14,15 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package internalversion import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" cache "k8s.io/kubernetes/pkg/client/cache" internalclientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" internalinterfaces "k8s.io/kubernetes/pkg/client/informers/informers_generated/internalinterfaces" @@ -45,18 +45,10 @@ func newEventInformer(client internalclientset.Interface, resyncPeriod time.Dura sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Core().Events(api.NamespaceAll).List(internalOptions) + return client.Core().Events(v1.NamespaceAll).List(options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Core().Events(api.NamespaceAll).Watch(internalOptions) + return client.Core().Events(v1.NamespaceAll).Watch(options) }, }, &api.Event{}, diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/interface.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/interface.go index 04d5f27e..830cdb31 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/interface.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/interface.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package internalversion diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/limitrange.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/limitrange.go index 6f70668a..c7840d2b 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/limitrange.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/limitrange.go @@ -14,15 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package internalversion import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" cache "k8s.io/kubernetes/pkg/client/cache" internalclientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" internalinterfaces "k8s.io/kubernetes/pkg/client/informers/informers_generated/internalinterfaces" @@ -45,18 +45,10 @@ func newLimitRangeInformer(client internalclientset.Interface, resyncPeriod time sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Core().LimitRanges(api.NamespaceAll).List(internalOptions) + return client.Core().LimitRanges(v1.NamespaceAll).List(options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Core().LimitRanges(api.NamespaceAll).Watch(internalOptions) + return client.Core().LimitRanges(v1.NamespaceAll).Watch(options) }, }, &api.LimitRange{}, diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/namespace.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/namespace.go index 16de10a1..4c0e9690 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/namespace.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/namespace.go @@ -14,15 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package internalversion import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" cache "k8s.io/kubernetes/pkg/client/cache" internalclientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" internalinterfaces "k8s.io/kubernetes/pkg/client/informers/informers_generated/internalinterfaces" @@ -45,18 +45,10 @@ func newNamespaceInformer(client internalclientset.Interface, resyncPeriod time. sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Core().Namespaces().List(internalOptions) + return client.Core().Namespaces().List(options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Core().Namespaces().Watch(internalOptions) + return client.Core().Namespaces().Watch(options) }, }, &api.Namespace{}, diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/node.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/node.go index 0c90e6bb..53c346dd 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/node.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/node.go @@ -14,15 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package internalversion import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" cache "k8s.io/kubernetes/pkg/client/cache" internalclientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" internalinterfaces "k8s.io/kubernetes/pkg/client/informers/informers_generated/internalinterfaces" @@ -45,18 +45,10 @@ func newNodeInformer(client internalclientset.Interface, resyncPeriod time.Durat sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Core().Nodes().List(internalOptions) + return client.Core().Nodes().List(options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Core().Nodes().Watch(internalOptions) + return client.Core().Nodes().Watch(options) }, }, &api.Node{}, diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/persistentvolume.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/persistentvolume.go index 7bab0d38..2d0379e0 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/persistentvolume.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/persistentvolume.go @@ -14,15 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package internalversion import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" cache "k8s.io/kubernetes/pkg/client/cache" internalclientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" internalinterfaces "k8s.io/kubernetes/pkg/client/informers/informers_generated/internalinterfaces" @@ -45,18 +45,10 @@ func newPersistentVolumeInformer(client internalclientset.Interface, resyncPerio sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Core().PersistentVolumes().List(internalOptions) + return client.Core().PersistentVolumes().List(options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Core().PersistentVolumes().Watch(internalOptions) + return client.Core().PersistentVolumes().Watch(options) }, }, &api.PersistentVolume{}, diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/persistentvolumeclaim.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/persistentvolumeclaim.go index 038ca931..d0110e4a 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/persistentvolumeclaim.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/persistentvolumeclaim.go @@ -14,15 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package internalversion import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" cache "k8s.io/kubernetes/pkg/client/cache" internalclientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" internalinterfaces "k8s.io/kubernetes/pkg/client/informers/informers_generated/internalinterfaces" @@ -45,18 +45,10 @@ func newPersistentVolumeClaimInformer(client internalclientset.Interface, resync sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Core().PersistentVolumeClaims(api.NamespaceAll).List(internalOptions) + return client.Core().PersistentVolumeClaims(v1.NamespaceAll).List(options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Core().PersistentVolumeClaims(api.NamespaceAll).Watch(internalOptions) + return client.Core().PersistentVolumeClaims(v1.NamespaceAll).Watch(options) }, }, &api.PersistentVolumeClaim{}, diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/pod.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/pod.go index b016b305..347cae76 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/pod.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/pod.go @@ -14,15 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package internalversion import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" cache "k8s.io/kubernetes/pkg/client/cache" internalclientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" internalinterfaces "k8s.io/kubernetes/pkg/client/informers/informers_generated/internalinterfaces" @@ -45,18 +45,10 @@ func newPodInformer(client internalclientset.Interface, resyncPeriod time.Durati sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Core().Pods(api.NamespaceAll).List(internalOptions) + return client.Core().Pods(v1.NamespaceAll).List(options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Core().Pods(api.NamespaceAll).Watch(internalOptions) + return client.Core().Pods(v1.NamespaceAll).Watch(options) }, }, &api.Pod{}, diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/podtemplate.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/podtemplate.go index 0d98d97f..46078c54 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/podtemplate.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/podtemplate.go @@ -14,15 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package internalversion import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" cache "k8s.io/kubernetes/pkg/client/cache" internalclientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" internalinterfaces "k8s.io/kubernetes/pkg/client/informers/informers_generated/internalinterfaces" @@ -45,18 +45,10 @@ func newPodTemplateInformer(client internalclientset.Interface, resyncPeriod tim sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Core().PodTemplates(api.NamespaceAll).List(internalOptions) + return client.Core().PodTemplates(v1.NamespaceAll).List(options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Core().PodTemplates(api.NamespaceAll).Watch(internalOptions) + return client.Core().PodTemplates(v1.NamespaceAll).Watch(options) }, }, &api.PodTemplate{}, diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/replicationcontroller.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/replicationcontroller.go index 8230f6a3..2a6df29d 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/replicationcontroller.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/replicationcontroller.go @@ -14,15 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package internalversion import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" cache "k8s.io/kubernetes/pkg/client/cache" internalclientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" internalinterfaces "k8s.io/kubernetes/pkg/client/informers/informers_generated/internalinterfaces" @@ -45,18 +45,10 @@ func newReplicationControllerInformer(client internalclientset.Interface, resync sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Core().ReplicationControllers(api.NamespaceAll).List(internalOptions) + return client.Core().ReplicationControllers(v1.NamespaceAll).List(options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Core().ReplicationControllers(api.NamespaceAll).Watch(internalOptions) + return client.Core().ReplicationControllers(v1.NamespaceAll).Watch(options) }, }, &api.ReplicationController{}, diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/resourcequota.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/resourcequota.go index eae25766..55d186de 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/resourcequota.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/resourcequota.go @@ -14,15 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package internalversion import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" cache "k8s.io/kubernetes/pkg/client/cache" internalclientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" internalinterfaces "k8s.io/kubernetes/pkg/client/informers/informers_generated/internalinterfaces" @@ -45,18 +45,10 @@ func newResourceQuotaInformer(client internalclientset.Interface, resyncPeriod t sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Core().ResourceQuotas(api.NamespaceAll).List(internalOptions) + return client.Core().ResourceQuotas(v1.NamespaceAll).List(options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Core().ResourceQuotas(api.NamespaceAll).Watch(internalOptions) + return client.Core().ResourceQuotas(v1.NamespaceAll).Watch(options) }, }, &api.ResourceQuota{}, diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/secret.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/secret.go index 240179c1..db7a6f93 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/secret.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/secret.go @@ -14,15 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package internalversion import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" cache "k8s.io/kubernetes/pkg/client/cache" internalclientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" internalinterfaces "k8s.io/kubernetes/pkg/client/informers/informers_generated/internalinterfaces" @@ -45,18 +45,10 @@ func newSecretInformer(client internalclientset.Interface, resyncPeriod time.Dur sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Core().Secrets(api.NamespaceAll).List(internalOptions) + return client.Core().Secrets(v1.NamespaceAll).List(options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Core().Secrets(api.NamespaceAll).Watch(internalOptions) + return client.Core().Secrets(v1.NamespaceAll).Watch(options) }, }, &api.Secret{}, diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/service.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/service.go index be04870f..9c42cbd0 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/service.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/service.go @@ -14,15 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package internalversion import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" cache "k8s.io/kubernetes/pkg/client/cache" internalclientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" internalinterfaces "k8s.io/kubernetes/pkg/client/informers/informers_generated/internalinterfaces" @@ -45,18 +45,10 @@ func newServiceInformer(client internalclientset.Interface, resyncPeriod time.Du sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Core().Services(api.NamespaceAll).List(internalOptions) + return client.Core().Services(v1.NamespaceAll).List(options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Core().Services(api.NamespaceAll).Watch(internalOptions) + return client.Core().Services(v1.NamespaceAll).Watch(options) }, }, &api.Service{}, diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/serviceaccount.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/serviceaccount.go index 70baef1b..66667a72 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/serviceaccount.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/internalversion/serviceaccount.go @@ -14,15 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package internalversion import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" cache "k8s.io/kubernetes/pkg/client/cache" internalclientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" internalinterfaces "k8s.io/kubernetes/pkg/client/informers/informers_generated/internalinterfaces" @@ -45,18 +45,10 @@ func newServiceAccountInformer(client internalclientset.Interface, resyncPeriod sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Core().ServiceAccounts(api.NamespaceAll).List(internalOptions) + return client.Core().ServiceAccounts(v1.NamespaceAll).List(options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Core().ServiceAccounts(api.NamespaceAll).Watch(internalOptions) + return client.Core().ServiceAccounts(v1.NamespaceAll).Watch(options) }, }, &api.ServiceAccount{}, diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/BUILD b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/BUILD index f2a87d3c..38a79587 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/BUILD @@ -35,6 +35,7 @@ go_library( "//pkg/client/clientset_generated/clientset:go_default_library", "//pkg/client/informers/informers_generated/internalinterfaces:go_default_library", "//pkg/client/listers/core/v1:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/watch", ], diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/componentstatus.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/componentstatus.go index 6b377c63..f8910089 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/componentstatus.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/componentstatus.go @@ -14,11 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package v1 import ( + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" api_v1 "k8s.io/kubernetes/pkg/api/v1" @@ -43,10 +44,10 @@ type componentStatusInformer struct { func newComponentStatusInformer(client clientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options api_v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { return client.CoreV1().ComponentStatuses().List(options) }, - WatchFunc: func(options api_v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { return client.CoreV1().ComponentStatuses().Watch(options) }, }, diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/configmap.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/configmap.go index 44aa2bde..52bc2d0e 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/configmap.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/configmap.go @@ -14,11 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package v1 import ( + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" api_v1 "k8s.io/kubernetes/pkg/api/v1" @@ -43,11 +44,11 @@ type configMapInformer struct { func newConfigMapInformer(client clientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options api_v1.ListOptions) (runtime.Object, error) { - return client.CoreV1().ConfigMaps(api_v1.NamespaceAll).List(options) + ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + return client.CoreV1().ConfigMaps(meta_v1.NamespaceAll).List(options) }, - WatchFunc: func(options api_v1.ListOptions) (watch.Interface, error) { - return client.CoreV1().ConfigMaps(api_v1.NamespaceAll).Watch(options) + WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + return client.CoreV1().ConfigMaps(meta_v1.NamespaceAll).Watch(options) }, }, &api_v1.ConfigMap{}, diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/endpoints.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/endpoints.go index d2b4d3d7..9d9ee27a 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/endpoints.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/endpoints.go @@ -14,11 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package v1 import ( + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" api_v1 "k8s.io/kubernetes/pkg/api/v1" @@ -43,11 +44,11 @@ type endpointsInformer struct { func newEndpointsInformer(client clientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options api_v1.ListOptions) (runtime.Object, error) { - return client.CoreV1().Endpoints(api_v1.NamespaceAll).List(options) + ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + return client.CoreV1().Endpoints(meta_v1.NamespaceAll).List(options) }, - WatchFunc: func(options api_v1.ListOptions) (watch.Interface, error) { - return client.CoreV1().Endpoints(api_v1.NamespaceAll).Watch(options) + WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + return client.CoreV1().Endpoints(meta_v1.NamespaceAll).Watch(options) }, }, &api_v1.Endpoints{}, diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/event.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/event.go index b6e6c63d..818fe196 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/event.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/event.go @@ -14,11 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package v1 import ( + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" api_v1 "k8s.io/kubernetes/pkg/api/v1" @@ -43,11 +44,11 @@ type eventInformer struct { func newEventInformer(client clientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options api_v1.ListOptions) (runtime.Object, error) { - return client.CoreV1().Events(api_v1.NamespaceAll).List(options) + ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + return client.CoreV1().Events(meta_v1.NamespaceAll).List(options) }, - WatchFunc: func(options api_v1.ListOptions) (watch.Interface, error) { - return client.CoreV1().Events(api_v1.NamespaceAll).Watch(options) + WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + return client.CoreV1().Events(meta_v1.NamespaceAll).Watch(options) }, }, &api_v1.Event{}, diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/interface.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/interface.go index a1d91917..6c70493d 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/interface.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/interface.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package v1 diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/limitrange.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/limitrange.go index 3559c5dc..2ac63b30 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/limitrange.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/limitrange.go @@ -14,11 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package v1 import ( + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" api_v1 "k8s.io/kubernetes/pkg/api/v1" @@ -43,11 +44,11 @@ type limitRangeInformer struct { func newLimitRangeInformer(client clientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options api_v1.ListOptions) (runtime.Object, error) { - return client.CoreV1().LimitRanges(api_v1.NamespaceAll).List(options) + ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + return client.CoreV1().LimitRanges(meta_v1.NamespaceAll).List(options) }, - WatchFunc: func(options api_v1.ListOptions) (watch.Interface, error) { - return client.CoreV1().LimitRanges(api_v1.NamespaceAll).Watch(options) + WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + return client.CoreV1().LimitRanges(meta_v1.NamespaceAll).Watch(options) }, }, &api_v1.LimitRange{}, diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/namespace.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/namespace.go index f2047e7d..328c3556 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/namespace.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/namespace.go @@ -14,11 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package v1 import ( + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" api_v1 "k8s.io/kubernetes/pkg/api/v1" @@ -43,10 +44,10 @@ type namespaceInformer struct { func newNamespaceInformer(client clientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options api_v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { return client.CoreV1().Namespaces().List(options) }, - WatchFunc: func(options api_v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { return client.CoreV1().Namespaces().Watch(options) }, }, diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/node.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/node.go index 476e426a..b42fda3b 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/node.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/node.go @@ -14,11 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package v1 import ( + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" api_v1 "k8s.io/kubernetes/pkg/api/v1" @@ -43,10 +44,10 @@ type nodeInformer struct { func newNodeInformer(client clientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options api_v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { return client.CoreV1().Nodes().List(options) }, - WatchFunc: func(options api_v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { return client.CoreV1().Nodes().Watch(options) }, }, diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/persistentvolume.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/persistentvolume.go index 930cbf09..c5daaa77 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/persistentvolume.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/persistentvolume.go @@ -14,11 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package v1 import ( + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" api_v1 "k8s.io/kubernetes/pkg/api/v1" @@ -43,10 +44,10 @@ type persistentVolumeInformer struct { func newPersistentVolumeInformer(client clientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options api_v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { return client.CoreV1().PersistentVolumes().List(options) }, - WatchFunc: func(options api_v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { return client.CoreV1().PersistentVolumes().Watch(options) }, }, diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/persistentvolumeclaim.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/persistentvolumeclaim.go index 7306b354..e973b350 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/persistentvolumeclaim.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/persistentvolumeclaim.go @@ -14,11 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package v1 import ( + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" api_v1 "k8s.io/kubernetes/pkg/api/v1" @@ -43,11 +44,11 @@ type persistentVolumeClaimInformer struct { func newPersistentVolumeClaimInformer(client clientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options api_v1.ListOptions) (runtime.Object, error) { - return client.CoreV1().PersistentVolumeClaims(api_v1.NamespaceAll).List(options) + ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + return client.CoreV1().PersistentVolumeClaims(meta_v1.NamespaceAll).List(options) }, - WatchFunc: func(options api_v1.ListOptions) (watch.Interface, error) { - return client.CoreV1().PersistentVolumeClaims(api_v1.NamespaceAll).Watch(options) + WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + return client.CoreV1().PersistentVolumeClaims(meta_v1.NamespaceAll).Watch(options) }, }, &api_v1.PersistentVolumeClaim{}, diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/pod.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/pod.go index 59f882a9..5526ef14 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/pod.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/pod.go @@ -14,11 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package v1 import ( + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" api_v1 "k8s.io/kubernetes/pkg/api/v1" @@ -43,11 +44,11 @@ type podInformer struct { func newPodInformer(client clientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options api_v1.ListOptions) (runtime.Object, error) { - return client.CoreV1().Pods(api_v1.NamespaceAll).List(options) + ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + return client.CoreV1().Pods(meta_v1.NamespaceAll).List(options) }, - WatchFunc: func(options api_v1.ListOptions) (watch.Interface, error) { - return client.CoreV1().Pods(api_v1.NamespaceAll).Watch(options) + WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + return client.CoreV1().Pods(meta_v1.NamespaceAll).Watch(options) }, }, &api_v1.Pod{}, diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/podtemplate.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/podtemplate.go index e0de8c5d..cb3b28cd 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/podtemplate.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/podtemplate.go @@ -14,11 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package v1 import ( + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" api_v1 "k8s.io/kubernetes/pkg/api/v1" @@ -43,11 +44,11 @@ type podTemplateInformer struct { func newPodTemplateInformer(client clientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options api_v1.ListOptions) (runtime.Object, error) { - return client.CoreV1().PodTemplates(api_v1.NamespaceAll).List(options) + ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + return client.CoreV1().PodTemplates(meta_v1.NamespaceAll).List(options) }, - WatchFunc: func(options api_v1.ListOptions) (watch.Interface, error) { - return client.CoreV1().PodTemplates(api_v1.NamespaceAll).Watch(options) + WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + return client.CoreV1().PodTemplates(meta_v1.NamespaceAll).Watch(options) }, }, &api_v1.PodTemplate{}, diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/replicationcontroller.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/replicationcontroller.go index 4409b0b1..8b604ae0 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/replicationcontroller.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/replicationcontroller.go @@ -14,11 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package v1 import ( + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" api_v1 "k8s.io/kubernetes/pkg/api/v1" @@ -43,11 +44,11 @@ type replicationControllerInformer struct { func newReplicationControllerInformer(client clientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options api_v1.ListOptions) (runtime.Object, error) { - return client.CoreV1().ReplicationControllers(api_v1.NamespaceAll).List(options) + ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + return client.CoreV1().ReplicationControllers(meta_v1.NamespaceAll).List(options) }, - WatchFunc: func(options api_v1.ListOptions) (watch.Interface, error) { - return client.CoreV1().ReplicationControllers(api_v1.NamespaceAll).Watch(options) + WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + return client.CoreV1().ReplicationControllers(meta_v1.NamespaceAll).Watch(options) }, }, &api_v1.ReplicationController{}, diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/resourcequota.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/resourcequota.go index ccd58c0e..75b61de4 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/resourcequota.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/resourcequota.go @@ -14,11 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package v1 import ( + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" api_v1 "k8s.io/kubernetes/pkg/api/v1" @@ -43,11 +44,11 @@ type resourceQuotaInformer struct { func newResourceQuotaInformer(client clientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options api_v1.ListOptions) (runtime.Object, error) { - return client.CoreV1().ResourceQuotas(api_v1.NamespaceAll).List(options) + ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + return client.CoreV1().ResourceQuotas(meta_v1.NamespaceAll).List(options) }, - WatchFunc: func(options api_v1.ListOptions) (watch.Interface, error) { - return client.CoreV1().ResourceQuotas(api_v1.NamespaceAll).Watch(options) + WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + return client.CoreV1().ResourceQuotas(meta_v1.NamespaceAll).Watch(options) }, }, &api_v1.ResourceQuota{}, diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/secret.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/secret.go index 01d4e958..eb089809 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/secret.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/secret.go @@ -14,11 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package v1 import ( + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" api_v1 "k8s.io/kubernetes/pkg/api/v1" @@ -43,11 +44,11 @@ type secretInformer struct { func newSecretInformer(client clientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options api_v1.ListOptions) (runtime.Object, error) { - return client.CoreV1().Secrets(api_v1.NamespaceAll).List(options) + ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + return client.CoreV1().Secrets(meta_v1.NamespaceAll).List(options) }, - WatchFunc: func(options api_v1.ListOptions) (watch.Interface, error) { - return client.CoreV1().Secrets(api_v1.NamespaceAll).Watch(options) + WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + return client.CoreV1().Secrets(meta_v1.NamespaceAll).Watch(options) }, }, &api_v1.Secret{}, diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/service.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/service.go index 9e30ef9f..f0c0315e 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/service.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/service.go @@ -14,11 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package v1 import ( + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" api_v1 "k8s.io/kubernetes/pkg/api/v1" @@ -43,11 +44,11 @@ type serviceInformer struct { func newServiceInformer(client clientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options api_v1.ListOptions) (runtime.Object, error) { - return client.CoreV1().Services(api_v1.NamespaceAll).List(options) + ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + return client.CoreV1().Services(meta_v1.NamespaceAll).List(options) }, - WatchFunc: func(options api_v1.ListOptions) (watch.Interface, error) { - return client.CoreV1().Services(api_v1.NamespaceAll).Watch(options) + WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + return client.CoreV1().Services(meta_v1.NamespaceAll).Watch(options) }, }, &api_v1.Service{}, diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/serviceaccount.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/serviceaccount.go index ddd5ad65..fe787b56 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/serviceaccount.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/core/v1/serviceaccount.go @@ -14,11 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package v1 import ( + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" api_v1 "k8s.io/kubernetes/pkg/api/v1" @@ -43,11 +44,11 @@ type serviceAccountInformer struct { func newServiceAccountInformer(client clientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options api_v1.ListOptions) (runtime.Object, error) { - return client.CoreV1().ServiceAccounts(api_v1.NamespaceAll).List(options) + ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + return client.CoreV1().ServiceAccounts(meta_v1.NamespaceAll).List(options) }, - WatchFunc: func(options api_v1.ListOptions) (watch.Interface, error) { - return client.CoreV1().ServiceAccounts(api_v1.NamespaceAll).Watch(options) + WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + return client.CoreV1().ServiceAccounts(meta_v1.NamespaceAll).Watch(options) }, }, &api_v1.ServiceAccount{}, diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/interface.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/interface.go index fb9d48f8..44374479 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/interface.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/interface.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package extensions diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/internalversion/BUILD b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/internalversion/BUILD index f82b8e36..26ebb4d5 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/internalversion/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/internalversion/BUILD @@ -21,13 +21,12 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", - "//pkg/api/v1:go_default_library", "//pkg/apis/extensions:go_default_library", "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/internalclientset:go_default_library", "//pkg/client/informers/informers_generated/internalinterfaces:go_default_library", "//pkg/client/listers/extensions/internalversion:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/watch", ], diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/internalversion/daemonset.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/internalversion/daemonset.go index 88f9d320..8bbc5a31 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/internalversion/daemonset.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/internalversion/daemonset.go @@ -14,15 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package internalversion import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" extensions "k8s.io/kubernetes/pkg/apis/extensions" cache "k8s.io/kubernetes/pkg/client/cache" internalclientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" @@ -46,18 +45,10 @@ func newDaemonSetInformer(client internalclientset.Interface, resyncPeriod time. sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Extensions().DaemonSets(api.NamespaceAll).List(internalOptions) + return client.Extensions().DaemonSets(v1.NamespaceAll).List(options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Extensions().DaemonSets(api.NamespaceAll).Watch(internalOptions) + return client.Extensions().DaemonSets(v1.NamespaceAll).Watch(options) }, }, &extensions.DaemonSet{}, diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/internalversion/deployment.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/internalversion/deployment.go index 42356c67..341d9e02 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/internalversion/deployment.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/internalversion/deployment.go @@ -14,15 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package internalversion import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" extensions "k8s.io/kubernetes/pkg/apis/extensions" cache "k8s.io/kubernetes/pkg/client/cache" internalclientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" @@ -46,18 +45,10 @@ func newDeploymentInformer(client internalclientset.Interface, resyncPeriod time sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Extensions().Deployments(api.NamespaceAll).List(internalOptions) + return client.Extensions().Deployments(v1.NamespaceAll).List(options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Extensions().Deployments(api.NamespaceAll).Watch(internalOptions) + return client.Extensions().Deployments(v1.NamespaceAll).Watch(options) }, }, &extensions.Deployment{}, diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/internalversion/ingress.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/internalversion/ingress.go index 65030867..393abc8c 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/internalversion/ingress.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/internalversion/ingress.go @@ -14,15 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package internalversion import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" extensions "k8s.io/kubernetes/pkg/apis/extensions" cache "k8s.io/kubernetes/pkg/client/cache" internalclientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" @@ -46,18 +45,10 @@ func newIngressInformer(client internalclientset.Interface, resyncPeriod time.Du sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Extensions().Ingresses(api.NamespaceAll).List(internalOptions) + return client.Extensions().Ingresses(v1.NamespaceAll).List(options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Extensions().Ingresses(api.NamespaceAll).Watch(internalOptions) + return client.Extensions().Ingresses(v1.NamespaceAll).Watch(options) }, }, &extensions.Ingress{}, diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/internalversion/interface.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/internalversion/interface.go index d2471fa0..9f5aa864 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/internalversion/interface.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/internalversion/interface.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package internalversion diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/internalversion/networkpolicy.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/internalversion/networkpolicy.go index 85bc2dcb..3f98d839 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/internalversion/networkpolicy.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/internalversion/networkpolicy.go @@ -14,15 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package internalversion import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" extensions "k8s.io/kubernetes/pkg/apis/extensions" cache "k8s.io/kubernetes/pkg/client/cache" internalclientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" @@ -46,18 +45,10 @@ func newNetworkPolicyInformer(client internalclientset.Interface, resyncPeriod t sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Extensions().NetworkPolicies(api.NamespaceAll).List(internalOptions) + return client.Extensions().NetworkPolicies(v1.NamespaceAll).List(options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Extensions().NetworkPolicies(api.NamespaceAll).Watch(internalOptions) + return client.Extensions().NetworkPolicies(v1.NamespaceAll).Watch(options) }, }, &extensions.NetworkPolicy{}, diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/internalversion/podsecuritypolicy.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/internalversion/podsecuritypolicy.go index 4b25e2a2..7f02fa7b 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/internalversion/podsecuritypolicy.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/internalversion/podsecuritypolicy.go @@ -14,15 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package internalversion import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" extensions "k8s.io/kubernetes/pkg/apis/extensions" cache "k8s.io/kubernetes/pkg/client/cache" internalclientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" @@ -46,18 +45,10 @@ func newPodSecurityPolicyInformer(client internalclientset.Interface, resyncPeri sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Extensions().PodSecurityPolicies().List(internalOptions) + return client.Extensions().PodSecurityPolicies().List(options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Extensions().PodSecurityPolicies().Watch(internalOptions) + return client.Extensions().PodSecurityPolicies().Watch(options) }, }, &extensions.PodSecurityPolicy{}, diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/internalversion/replicaset.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/internalversion/replicaset.go index 07b730da..2a2a4aae 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/internalversion/replicaset.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/internalversion/replicaset.go @@ -14,15 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package internalversion import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" extensions "k8s.io/kubernetes/pkg/apis/extensions" cache "k8s.io/kubernetes/pkg/client/cache" internalclientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" @@ -46,18 +45,10 @@ func newReplicaSetInformer(client internalclientset.Interface, resyncPeriod time sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Extensions().ReplicaSets(api.NamespaceAll).List(internalOptions) + return client.Extensions().ReplicaSets(v1.NamespaceAll).List(options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Extensions().ReplicaSets(api.NamespaceAll).Watch(internalOptions) + return client.Extensions().ReplicaSets(v1.NamespaceAll).Watch(options) }, }, &extensions.ReplicaSet{}, diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/internalversion/thirdpartyresource.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/internalversion/thirdpartyresource.go index edcbd5ba..b5f9ed66 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/internalversion/thirdpartyresource.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/internalversion/thirdpartyresource.go @@ -14,15 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package internalversion import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" extensions "k8s.io/kubernetes/pkg/apis/extensions" cache "k8s.io/kubernetes/pkg/client/cache" internalclientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" @@ -46,18 +45,10 @@ func newThirdPartyResourceInformer(client internalclientset.Interface, resyncPer sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Extensions().ThirdPartyResources().List(internalOptions) + return client.Extensions().ThirdPartyResources().List(options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Extensions().ThirdPartyResources().Watch(internalOptions) + return client.Extensions().ThirdPartyResources().Watch(options) }, }, &extensions.ThirdPartyResource{}, diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/v1beta1/BUILD b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/v1beta1/BUILD index cfb9ef22..f318f6e4 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/v1beta1/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/v1beta1/BUILD @@ -20,12 +20,12 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api/v1:go_default_library", "//pkg/apis/extensions/v1beta1:go_default_library", "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", "//pkg/client/informers/informers_generated/internalinterfaces:go_default_library", "//pkg/client/listers/extensions/v1beta1:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/watch", ], diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/v1beta1/daemonset.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/v1beta1/daemonset.go index f89525d0..ace8706a 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/v1beta1/daemonset.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/v1beta1/daemonset.go @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package v1beta1 import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" - v1 "k8s.io/kubernetes/pkg/api/v1" extensions_v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" cache "k8s.io/kubernetes/pkg/client/cache" clientset "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/v1beta1/deployment.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/v1beta1/deployment.go index a5a4dc85..7258772c 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/v1beta1/deployment.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/v1beta1/deployment.go @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package v1beta1 import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" - v1 "k8s.io/kubernetes/pkg/api/v1" extensions_v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" cache "k8s.io/kubernetes/pkg/client/cache" clientset "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/v1beta1/ingress.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/v1beta1/ingress.go index 7bf94f3b..d6f4541f 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/v1beta1/ingress.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/v1beta1/ingress.go @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package v1beta1 import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" - v1 "k8s.io/kubernetes/pkg/api/v1" extensions_v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" cache "k8s.io/kubernetes/pkg/client/cache" clientset "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/v1beta1/interface.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/v1beta1/interface.go index bd7b5bba..9da3a14d 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/v1beta1/interface.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/v1beta1/interface.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package v1beta1 diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/v1beta1/podsecuritypolicy.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/v1beta1/podsecuritypolicy.go index a6901808..47567bed 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/v1beta1/podsecuritypolicy.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/v1beta1/podsecuritypolicy.go @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package v1beta1 import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" - v1 "k8s.io/kubernetes/pkg/api/v1" extensions_v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" cache "k8s.io/kubernetes/pkg/client/cache" clientset "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/v1beta1/replicaset.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/v1beta1/replicaset.go index 0e02be55..6c4ce972 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/v1beta1/replicaset.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/v1beta1/replicaset.go @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package v1beta1 import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" - v1 "k8s.io/kubernetes/pkg/api/v1" extensions_v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" cache "k8s.io/kubernetes/pkg/client/cache" clientset "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/v1beta1/thirdpartyresource.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/v1beta1/thirdpartyresource.go index 0aef7a15..4313a5db 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/v1beta1/thirdpartyresource.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/extensions/v1beta1/thirdpartyresource.go @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package v1beta1 import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" - v1 "k8s.io/kubernetes/pkg/api/v1" extensions_v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" cache "k8s.io/kubernetes/pkg/client/cache" clientset "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/factory.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/factory.go index c2e240a1..ff5e651e 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/factory.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/factory.go @@ -14,12 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package informers_generated import ( runtime "k8s.io/apimachinery/pkg/runtime" + schema "k8s.io/apimachinery/pkg/runtime/schema" cache "k8s.io/kubernetes/pkg/client/cache" clientset "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" internalclientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" @@ -112,6 +113,7 @@ func (f *sharedInformerFactory) VersionedInformerFor(obj runtime.Object, newFunc // API group versions. type SharedInformerFactory interface { internalinterfaces.SharedInformerFactory + ForResource(resource schema.GroupVersionResource) (GenericInformer, error) Apps() apps.Interface Autoscaling() autoscaling.Interface diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/generic.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/generic.go index a7a463f3..e74b985f 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/generic.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/generic.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package informers_generated @@ -31,13 +31,14 @@ import ( batch_v1 "k8s.io/kubernetes/pkg/apis/batch/v1" v2alpha1 "k8s.io/kubernetes/pkg/apis/batch/v2alpha1" certificates "k8s.io/kubernetes/pkg/apis/certificates" - v1alpha1 "k8s.io/kubernetes/pkg/apis/certificates/v1alpha1" + certificates_v1beta1 "k8s.io/kubernetes/pkg/apis/certificates/v1beta1" extensions "k8s.io/kubernetes/pkg/apis/extensions" extensions_v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" policy "k8s.io/kubernetes/pkg/apis/policy" policy_v1beta1 "k8s.io/kubernetes/pkg/apis/policy/v1beta1" rbac "k8s.io/kubernetes/pkg/apis/rbac" - rbac_v1alpha1 "k8s.io/kubernetes/pkg/apis/rbac/v1alpha1" + v1alpha1 "k8s.io/kubernetes/pkg/apis/rbac/v1alpha1" + rbac_v1beta1 "k8s.io/kubernetes/pkg/apis/rbac/v1beta1" storage "k8s.io/kubernetes/pkg/apis/storage" storage_v1beta1 "k8s.io/kubernetes/pkg/apis/storage/v1beta1" cache "k8s.io/kubernetes/pkg/client/cache" @@ -105,9 +106,9 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource case certificates.SchemeGroupVersion.WithResource("certificatesigningrequests"): return &genericInformer{resource: resource.GroupResource(), informer: f.Certificates().InternalVersion().CertificateSigningRequests().Informer()}, nil - // Group=Certificates, Version=V1alpha1 - case v1alpha1.SchemeGroupVersion.WithResource("certificatesigningrequests"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Certificates().V1alpha1().CertificateSigningRequests().Informer()}, nil + // Group=Certificates, Version=V1beta1 + case certificates_v1beta1.SchemeGroupVersion.WithResource("certificatesigningrequests"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Certificates().V1beta1().CertificateSigningRequests().Informer()}, nil // Group=Core, Version=InternalVersion case api.SchemeGroupVersion.WithResource("componentstatuses"): @@ -226,15 +227,25 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().InternalVersion().RoleBindings().Informer()}, nil // Group=Rbac, Version=V1alpha1 - case rbac_v1alpha1.SchemeGroupVersion.WithResource("clusterroles"): + case v1alpha1.SchemeGroupVersion.WithResource("clusterroles"): return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1alpha1().ClusterRoles().Informer()}, nil - case rbac_v1alpha1.SchemeGroupVersion.WithResource("clusterrolebindings"): + case v1alpha1.SchemeGroupVersion.WithResource("clusterrolebindings"): return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1alpha1().ClusterRoleBindings().Informer()}, nil - case rbac_v1alpha1.SchemeGroupVersion.WithResource("roles"): + case v1alpha1.SchemeGroupVersion.WithResource("roles"): return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1alpha1().Roles().Informer()}, nil - case rbac_v1alpha1.SchemeGroupVersion.WithResource("rolebindings"): + case v1alpha1.SchemeGroupVersion.WithResource("rolebindings"): return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1alpha1().RoleBindings().Informer()}, nil + // Group=Rbac, Version=V1beta1 + case rbac_v1beta1.SchemeGroupVersion.WithResource("clusterroles"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1beta1().ClusterRoles().Informer()}, nil + case rbac_v1beta1.SchemeGroupVersion.WithResource("clusterrolebindings"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1beta1().ClusterRoleBindings().Informer()}, nil + case rbac_v1beta1.SchemeGroupVersion.WithResource("roles"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1beta1().Roles().Informer()}, nil + case rbac_v1beta1.SchemeGroupVersion.WithResource("rolebindings"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1beta1().RoleBindings().Informer()}, nil + // Group=Storage, Version=InternalVersion case storage.SchemeGroupVersion.WithResource("storageclasses"): return &genericInformer{resource: resource.GroupResource(), informer: f.Storage().InternalVersion().StorageClasses().Informer()}, nil diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/internalinterfaces/internal_interfaces.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/internalinterfaces/internal_interfaces.go index 0450fcb9..84f3a472 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/internalinterfaces/internal_interfaces.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/internalinterfaces/internal_interfaces.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package internalinterfaces diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/policy/interface.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/policy/interface.go index c961f495..dc3861c7 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/policy/interface.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/policy/interface.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package policy diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/policy/internalversion/BUILD b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/policy/internalversion/BUILD index 389a1773..de6fdce5 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/policy/internalversion/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/policy/internalversion/BUILD @@ -15,13 +15,12 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", - "//pkg/api/v1:go_default_library", "//pkg/apis/policy:go_default_library", "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/internalclientset:go_default_library", "//pkg/client/informers/informers_generated/internalinterfaces:go_default_library", "//pkg/client/listers/policy/internalversion:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/watch", ], diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/policy/internalversion/interface.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/policy/internalversion/interface.go index 35dff3f3..6f7ea448 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/policy/internalversion/interface.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/policy/internalversion/interface.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package internalversion diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/policy/internalversion/poddisruptionbudget.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/policy/internalversion/poddisruptionbudget.go index d36400de..22770bdf 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/policy/internalversion/poddisruptionbudget.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/policy/internalversion/poddisruptionbudget.go @@ -14,15 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package internalversion import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" policy "k8s.io/kubernetes/pkg/apis/policy" cache "k8s.io/kubernetes/pkg/client/cache" internalclientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" @@ -46,18 +45,10 @@ func newPodDisruptionBudgetInformer(client internalclientset.Interface, resyncPe sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Policy().PodDisruptionBudgets(api.NamespaceAll).List(internalOptions) + return client.Policy().PodDisruptionBudgets(v1.NamespaceAll).List(options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Policy().PodDisruptionBudgets(api.NamespaceAll).Watch(internalOptions) + return client.Policy().PodDisruptionBudgets(v1.NamespaceAll).Watch(options) }, }, &policy.PodDisruptionBudget{}, diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/policy/v1beta1/BUILD b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/policy/v1beta1/BUILD index a09bac4a..f20b9d9f 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/policy/v1beta1/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/policy/v1beta1/BUILD @@ -15,12 +15,12 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api/v1:go_default_library", "//pkg/apis/policy/v1beta1:go_default_library", "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", "//pkg/client/informers/informers_generated/internalinterfaces:go_default_library", "//pkg/client/listers/policy/v1beta1:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/watch", ], diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/policy/v1beta1/interface.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/policy/v1beta1/interface.go index 1ab1cd30..6488d2ba 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/policy/v1beta1/interface.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/policy/v1beta1/interface.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package v1beta1 diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/policy/v1beta1/poddisruptionbudget.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/policy/v1beta1/poddisruptionbudget.go index 1e9e02bf..a97b9137 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/policy/v1beta1/poddisruptionbudget.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/policy/v1beta1/poddisruptionbudget.go @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package v1beta1 import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" - v1 "k8s.io/kubernetes/pkg/api/v1" policy_v1beta1 "k8s.io/kubernetes/pkg/apis/policy/v1beta1" cache "k8s.io/kubernetes/pkg/client/cache" clientset "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/BUILD b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/BUILD index d0bc7e7e..d0605096 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/BUILD @@ -15,6 +15,7 @@ go_library( "//pkg/client/informers/informers_generated/internalinterfaces:go_default_library", "//pkg/client/informers/informers_generated/rbac/internalversion:go_default_library", "//pkg/client/informers/informers_generated/rbac/v1alpha1:go_default_library", + "//pkg/client/informers/informers_generated/rbac/v1beta1:go_default_library", ], ) @@ -31,6 +32,7 @@ filegroup( ":package-srcs", "//pkg/client/informers/informers_generated/rbac/internalversion:all-srcs", "//pkg/client/informers/informers_generated/rbac/v1alpha1:all-srcs", + "//pkg/client/informers/informers_generated/rbac/v1beta1:all-srcs", ], tags = ["automanaged"], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/interface.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/interface.go index a21bfc26..76a12bcd 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/interface.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/interface.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package rbac @@ -22,6 +22,7 @@ import ( internalinterfaces "k8s.io/kubernetes/pkg/client/informers/informers_generated/internalinterfaces" internalversion "k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/internalversion" v1alpha1 "k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/v1alpha1" + v1beta1 "k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/v1beta1" ) // Interface provides access to each of this group's versions. @@ -30,6 +31,8 @@ type Interface interface { InternalVersion() internalversion.Interface // V1alpha1 provides access to shared informers for resources in V1alpha1. V1alpha1() v1alpha1.Interface + // V1beta1 provides access to shared informers for resources in V1beta1. + V1beta1() v1beta1.Interface } type group struct { @@ -50,3 +53,8 @@ func (g *group) InternalVersion() internalversion.Interface { func (g *group) V1alpha1() v1alpha1.Interface { return v1alpha1.New(g.SharedInformerFactory) } + +// V1beta1 returns a new v1beta1.Interface. +func (g *group) V1beta1() v1beta1.Interface { + return v1beta1.New(g.SharedInformerFactory) +} diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/internalversion/BUILD b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/internalversion/BUILD index 1cd72e76..9c7613dc 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/internalversion/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/internalversion/BUILD @@ -18,13 +18,12 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", - "//pkg/api/v1:go_default_library", "//pkg/apis/rbac:go_default_library", "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/internalclientset:go_default_library", "//pkg/client/informers/informers_generated/internalinterfaces:go_default_library", "//pkg/client/listers/rbac/internalversion:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/watch", ], diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/internalversion/clusterrole.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/internalversion/clusterrole.go index 21de6951..7df4cae9 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/internalversion/clusterrole.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/internalversion/clusterrole.go @@ -14,15 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package internalversion import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" rbac "k8s.io/kubernetes/pkg/apis/rbac" cache "k8s.io/kubernetes/pkg/client/cache" internalclientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" @@ -46,18 +45,10 @@ func newClusterRoleInformer(client internalclientset.Interface, resyncPeriod tim sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Rbac().ClusterRoles().List(internalOptions) + return client.Rbac().ClusterRoles().List(options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Rbac().ClusterRoles().Watch(internalOptions) + return client.Rbac().ClusterRoles().Watch(options) }, }, &rbac.ClusterRole{}, diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/internalversion/clusterrolebinding.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/internalversion/clusterrolebinding.go index f4faff7f..dd8804b3 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/internalversion/clusterrolebinding.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/internalversion/clusterrolebinding.go @@ -14,15 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package internalversion import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" rbac "k8s.io/kubernetes/pkg/apis/rbac" cache "k8s.io/kubernetes/pkg/client/cache" internalclientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" @@ -46,18 +45,10 @@ func newClusterRoleBindingInformer(client internalclientset.Interface, resyncPer sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Rbac().ClusterRoleBindings().List(internalOptions) + return client.Rbac().ClusterRoleBindings().List(options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Rbac().ClusterRoleBindings().Watch(internalOptions) + return client.Rbac().ClusterRoleBindings().Watch(options) }, }, &rbac.ClusterRoleBinding{}, diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/internalversion/interface.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/internalversion/interface.go index 617ebbc7..8dde25e8 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/internalversion/interface.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/internalversion/interface.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package internalversion diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/internalversion/role.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/internalversion/role.go index 0f32ee6c..e324ffab 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/internalversion/role.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/internalversion/role.go @@ -14,15 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package internalversion import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" rbac "k8s.io/kubernetes/pkg/apis/rbac" cache "k8s.io/kubernetes/pkg/client/cache" internalclientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" @@ -46,18 +45,10 @@ func newRoleInformer(client internalclientset.Interface, resyncPeriod time.Durat sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Rbac().Roles(api.NamespaceAll).List(internalOptions) + return client.Rbac().Roles(v1.NamespaceAll).List(options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Rbac().Roles(api.NamespaceAll).Watch(internalOptions) + return client.Rbac().Roles(v1.NamespaceAll).Watch(options) }, }, &rbac.Role{}, diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/internalversion/rolebinding.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/internalversion/rolebinding.go index 2f9655b6..1db49ae6 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/internalversion/rolebinding.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/internalversion/rolebinding.go @@ -14,15 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package internalversion import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" rbac "k8s.io/kubernetes/pkg/apis/rbac" cache "k8s.io/kubernetes/pkg/client/cache" internalclientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" @@ -46,18 +45,10 @@ func newRoleBindingInformer(client internalclientset.Interface, resyncPeriod tim sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Rbac().RoleBindings(api.NamespaceAll).List(internalOptions) + return client.Rbac().RoleBindings(v1.NamespaceAll).List(options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Rbac().RoleBindings(api.NamespaceAll).Watch(internalOptions) + return client.Rbac().RoleBindings(v1.NamespaceAll).Watch(options) }, }, &rbac.RoleBinding{}, diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/v1alpha1/BUILD b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/v1alpha1/BUILD index dfbee43c..ff5c67d4 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/v1alpha1/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/v1alpha1/BUILD @@ -18,12 +18,12 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api/v1:go_default_library", "//pkg/apis/rbac/v1alpha1:go_default_library", "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", "//pkg/client/informers/informers_generated/internalinterfaces:go_default_library", "//pkg/client/listers/rbac/v1alpha1:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/watch", ], diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/v1alpha1/clusterrole.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/v1alpha1/clusterrole.go index 857f5959..86cb9087 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/v1alpha1/clusterrole.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/v1alpha1/clusterrole.go @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package v1alpha1 import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" - v1 "k8s.io/kubernetes/pkg/api/v1" rbac_v1alpha1 "k8s.io/kubernetes/pkg/apis/rbac/v1alpha1" cache "k8s.io/kubernetes/pkg/client/cache" clientset "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/v1alpha1/clusterrolebinding.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/v1alpha1/clusterrolebinding.go index e4f8174a..70872dbb 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/v1alpha1/clusterrolebinding.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/v1alpha1/clusterrolebinding.go @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package v1alpha1 import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" - v1 "k8s.io/kubernetes/pkg/api/v1" rbac_v1alpha1 "k8s.io/kubernetes/pkg/apis/rbac/v1alpha1" cache "k8s.io/kubernetes/pkg/client/cache" clientset "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/v1alpha1/interface.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/v1alpha1/interface.go index 9ec88898..a6f9b468 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/v1alpha1/interface.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/v1alpha1/interface.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package v1alpha1 diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/v1alpha1/role.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/v1alpha1/role.go index 223b6bde..360ccdc2 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/v1alpha1/role.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/v1alpha1/role.go @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package v1alpha1 import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" - v1 "k8s.io/kubernetes/pkg/api/v1" rbac_v1alpha1 "k8s.io/kubernetes/pkg/apis/rbac/v1alpha1" cache "k8s.io/kubernetes/pkg/client/cache" clientset "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/v1alpha1/rolebinding.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/v1alpha1/rolebinding.go index f741a542..84de6611 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/v1alpha1/rolebinding.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/v1alpha1/rolebinding.go @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package v1alpha1 import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" - v1 "k8s.io/kubernetes/pkg/api/v1" rbac_v1alpha1 "k8s.io/kubernetes/pkg/apis/rbac/v1alpha1" cache "k8s.io/kubernetes/pkg/client/cache" clientset "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/v1beta1/BUILD b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/v1beta1/BUILD new file mode 100644 index 00000000..0a055d90 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/v1beta1/BUILD @@ -0,0 +1,43 @@ +package(default_visibility = ["//visibility:public"]) + +licenses(["notice"]) + +load( + "@io_bazel_rules_go//go:def.bzl", + "go_library", +) + +go_library( + name = "go_default_library", + srcs = [ + "clusterrole.go", + "clusterrolebinding.go", + "interface.go", + "role.go", + "rolebinding.go", + ], + tags = ["automanaged"], + deps = [ + "//pkg/apis/rbac/v1beta1:go_default_library", + "//pkg/client/cache:go_default_library", + "//pkg/client/clientset_generated/clientset:go_default_library", + "//pkg/client/informers/informers_generated/internalinterfaces:go_default_library", + "//pkg/client/listers/rbac/v1beta1:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/runtime", + "//vendor:k8s.io/apimachinery/pkg/watch", + ], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], +) diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/v1beta1/clusterrole.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/v1beta1/clusterrole.go new file mode 100644 index 00000000..d5b240c6 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/v1beta1/clusterrole.go @@ -0,0 +1,68 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset + +package v1beta1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + rbac_v1beta1 "k8s.io/kubernetes/pkg/apis/rbac/v1beta1" + cache "k8s.io/kubernetes/pkg/client/cache" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" + internalinterfaces "k8s.io/kubernetes/pkg/client/informers/informers_generated/internalinterfaces" + v1beta1 "k8s.io/kubernetes/pkg/client/listers/rbac/v1beta1" + time "time" +) + +// ClusterRoleInformer provides access to a shared informer and lister for +// ClusterRoles. +type ClusterRoleInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1beta1.ClusterRoleLister +} + +type clusterRoleInformer struct { + factory internalinterfaces.SharedInformerFactory +} + +func newClusterRoleInformer(client clientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + sharedIndexInformer := cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + return client.RbacV1beta1().ClusterRoles().List(options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + return client.RbacV1beta1().ClusterRoles().Watch(options) + }, + }, + &rbac_v1beta1.ClusterRole{}, + resyncPeriod, + cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, + ) + + return sharedIndexInformer +} + +func (f *clusterRoleInformer) Informer() cache.SharedIndexInformer { + return f.factory.VersionedInformerFor(&rbac_v1beta1.ClusterRole{}, newClusterRoleInformer) +} + +func (f *clusterRoleInformer) Lister() v1beta1.ClusterRoleLister { + return v1beta1.NewClusterRoleLister(f.Informer().GetIndexer()) +} diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/v1beta1/clusterrolebinding.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/v1beta1/clusterrolebinding.go new file mode 100644 index 00000000..16d3eb94 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/v1beta1/clusterrolebinding.go @@ -0,0 +1,68 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset + +package v1beta1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + rbac_v1beta1 "k8s.io/kubernetes/pkg/apis/rbac/v1beta1" + cache "k8s.io/kubernetes/pkg/client/cache" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" + internalinterfaces "k8s.io/kubernetes/pkg/client/informers/informers_generated/internalinterfaces" + v1beta1 "k8s.io/kubernetes/pkg/client/listers/rbac/v1beta1" + time "time" +) + +// ClusterRoleBindingInformer provides access to a shared informer and lister for +// ClusterRoleBindings. +type ClusterRoleBindingInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1beta1.ClusterRoleBindingLister +} + +type clusterRoleBindingInformer struct { + factory internalinterfaces.SharedInformerFactory +} + +func newClusterRoleBindingInformer(client clientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + sharedIndexInformer := cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + return client.RbacV1beta1().ClusterRoleBindings().List(options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + return client.RbacV1beta1().ClusterRoleBindings().Watch(options) + }, + }, + &rbac_v1beta1.ClusterRoleBinding{}, + resyncPeriod, + cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, + ) + + return sharedIndexInformer +} + +func (f *clusterRoleBindingInformer) Informer() cache.SharedIndexInformer { + return f.factory.VersionedInformerFor(&rbac_v1beta1.ClusterRoleBinding{}, newClusterRoleBindingInformer) +} + +func (f *clusterRoleBindingInformer) Lister() v1beta1.ClusterRoleBindingLister { + return v1beta1.NewClusterRoleBindingLister(f.Informer().GetIndexer()) +} diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/v1beta1/interface.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/v1beta1/interface.go new file mode 100644 index 00000000..297c27b7 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/v1beta1/interface.go @@ -0,0 +1,64 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset + +package v1beta1 + +import ( + internalinterfaces "k8s.io/kubernetes/pkg/client/informers/informers_generated/internalinterfaces" +) + +// Interface provides access to all the informers in this group version. +type Interface interface { + // ClusterRoles returns a ClusterRoleInformer. + ClusterRoles() ClusterRoleInformer + // ClusterRoleBindings returns a ClusterRoleBindingInformer. + ClusterRoleBindings() ClusterRoleBindingInformer + // Roles returns a RoleInformer. + Roles() RoleInformer + // RoleBindings returns a RoleBindingInformer. + RoleBindings() RoleBindingInformer +} + +type version struct { + internalinterfaces.SharedInformerFactory +} + +// New returns a new Interface. +func New(f internalinterfaces.SharedInformerFactory) Interface { + return &version{f} +} + +// ClusterRoles returns a ClusterRoleInformer. +func (v *version) ClusterRoles() ClusterRoleInformer { + return &clusterRoleInformer{factory: v.SharedInformerFactory} +} + +// ClusterRoleBindings returns a ClusterRoleBindingInformer. +func (v *version) ClusterRoleBindings() ClusterRoleBindingInformer { + return &clusterRoleBindingInformer{factory: v.SharedInformerFactory} +} + +// Roles returns a RoleInformer. +func (v *version) Roles() RoleInformer { + return &roleInformer{factory: v.SharedInformerFactory} +} + +// RoleBindings returns a RoleBindingInformer. +func (v *version) RoleBindings() RoleBindingInformer { + return &roleBindingInformer{factory: v.SharedInformerFactory} +} diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/v1beta1/role.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/v1beta1/role.go new file mode 100644 index 00000000..7f777812 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/v1beta1/role.go @@ -0,0 +1,68 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset + +package v1beta1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + rbac_v1beta1 "k8s.io/kubernetes/pkg/apis/rbac/v1beta1" + cache "k8s.io/kubernetes/pkg/client/cache" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" + internalinterfaces "k8s.io/kubernetes/pkg/client/informers/informers_generated/internalinterfaces" + v1beta1 "k8s.io/kubernetes/pkg/client/listers/rbac/v1beta1" + time "time" +) + +// RoleInformer provides access to a shared informer and lister for +// Roles. +type RoleInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1beta1.RoleLister +} + +type roleInformer struct { + factory internalinterfaces.SharedInformerFactory +} + +func newRoleInformer(client clientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + sharedIndexInformer := cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + return client.RbacV1beta1().Roles(v1.NamespaceAll).List(options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + return client.RbacV1beta1().Roles(v1.NamespaceAll).Watch(options) + }, + }, + &rbac_v1beta1.Role{}, + resyncPeriod, + cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, + ) + + return sharedIndexInformer +} + +func (f *roleInformer) Informer() cache.SharedIndexInformer { + return f.factory.VersionedInformerFor(&rbac_v1beta1.Role{}, newRoleInformer) +} + +func (f *roleInformer) Lister() v1beta1.RoleLister { + return v1beta1.NewRoleLister(f.Informer().GetIndexer()) +} diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/v1beta1/rolebinding.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/v1beta1/rolebinding.go new file mode 100644 index 00000000..cbca10a6 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/rbac/v1beta1/rolebinding.go @@ -0,0 +1,68 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset + +package v1beta1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + rbac_v1beta1 "k8s.io/kubernetes/pkg/apis/rbac/v1beta1" + cache "k8s.io/kubernetes/pkg/client/cache" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" + internalinterfaces "k8s.io/kubernetes/pkg/client/informers/informers_generated/internalinterfaces" + v1beta1 "k8s.io/kubernetes/pkg/client/listers/rbac/v1beta1" + time "time" +) + +// RoleBindingInformer provides access to a shared informer and lister for +// RoleBindings. +type RoleBindingInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1beta1.RoleBindingLister +} + +type roleBindingInformer struct { + factory internalinterfaces.SharedInformerFactory +} + +func newRoleBindingInformer(client clientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + sharedIndexInformer := cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + return client.RbacV1beta1().RoleBindings(v1.NamespaceAll).List(options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + return client.RbacV1beta1().RoleBindings(v1.NamespaceAll).Watch(options) + }, + }, + &rbac_v1beta1.RoleBinding{}, + resyncPeriod, + cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, + ) + + return sharedIndexInformer +} + +func (f *roleBindingInformer) Informer() cache.SharedIndexInformer { + return f.factory.VersionedInformerFor(&rbac_v1beta1.RoleBinding{}, newRoleBindingInformer) +} + +func (f *roleBindingInformer) Lister() v1beta1.RoleBindingLister { + return v1beta1.NewRoleBindingLister(f.Informer().GetIndexer()) +} diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/storage/interface.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/storage/interface.go index 3d666d0d..064443fd 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/storage/interface.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/storage/interface.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package storage diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/storage/internalversion/BUILD b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/storage/internalversion/BUILD index 43f3fe2d..3c1f3ba7 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/storage/internalversion/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/storage/internalversion/BUILD @@ -15,13 +15,12 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", - "//pkg/api/v1:go_default_library", "//pkg/apis/storage:go_default_library", "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/internalclientset:go_default_library", "//pkg/client/informers/informers_generated/internalinterfaces:go_default_library", "//pkg/client/listers/storage/internalversion:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/watch", ], diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/storage/internalversion/interface.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/storage/internalversion/interface.go index c779cecb..032a5c31 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/storage/internalversion/interface.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/storage/internalversion/interface.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package internalversion diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/storage/internalversion/storageclass.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/storage/internalversion/storageclass.go index 0e612163..cfb63387 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/storage/internalversion/storageclass.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/storage/internalversion/storageclass.go @@ -14,15 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package internalversion import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" storage "k8s.io/kubernetes/pkg/apis/storage" cache "k8s.io/kubernetes/pkg/client/cache" internalclientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" @@ -46,18 +45,10 @@ func newStorageClassInformer(client internalclientset.Interface, resyncPeriod ti sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Storage().StorageClasses().List(internalOptions) + return client.Storage().StorageClasses().List(options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - var internalOptions api.ListOptions - if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil { - return nil, err - } - return client.Storage().StorageClasses().Watch(internalOptions) + return client.Storage().StorageClasses().Watch(options) }, }, &storage.StorageClass{}, diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/storage/v1beta1/BUILD b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/storage/v1beta1/BUILD index be5ee57d..1142cd5e 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/storage/v1beta1/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/storage/v1beta1/BUILD @@ -15,12 +15,12 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api/v1:go_default_library", "//pkg/apis/storage/v1beta1:go_default_library", "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", "//pkg/client/informers/informers_generated/internalinterfaces:go_default_library", "//pkg/client/listers/storage/v1beta1:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/watch", ], diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/storage/v1beta1/interface.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/storage/v1beta1/interface.go index 9bae0aaf..4ef50069 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/storage/v1beta1/interface.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/storage/v1beta1/interface.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package v1beta1 diff --git a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/storage/v1beta1/storageclass.go b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/storage/v1beta1/storageclass.go index 0c2c0a07..d7e6ca12 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/storage/v1beta1/storageclass.go +++ b/vendor/k8s.io/kubernetes/pkg/client/informers/informers_generated/storage/v1beta1/storageclass.go @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset +// This file was automatically generated by informer-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] --internal-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset --listers-package=k8s.io/kubernetes/pkg/client/listers --versioned-clientset-package=k8s.io/kubernetes/pkg/client/clientset_generated/clientset package v1beta1 import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" - v1 "k8s.io/kubernetes/pkg/api/v1" storage_v1beta1 "k8s.io/kubernetes/pkg/apis/storage/v1beta1" cache "k8s.io/kubernetes/pkg/client/cache" clientset "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" diff --git a/vendor/k8s.io/kubernetes/pkg/client/leaderelection/leaderelection_test.go b/vendor/k8s.io/kubernetes/pkg/client/leaderelection/leaderelection_test.go index 9433379b..4dfe81a0 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/leaderelection/leaderelection_test.go +++ b/vendor/k8s.io/kubernetes/pkg/client/leaderelection/leaderelection_test.go @@ -84,7 +84,7 @@ func TestTryAcquireOrRenew(t *testing.T) { verb: "get", reaction: func(action core.Action) (handled bool, ret runtime.Object, err error) { return true, &v1.Endpoints{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: action.GetNamespace(), Name: action.(core.GetAction).GetName(), }, @@ -113,7 +113,7 @@ func TestTryAcquireOrRenew(t *testing.T) { verb: "get", reaction: func(action core.Action) (handled bool, ret runtime.Object, err error) { return true, &v1.Endpoints{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: action.GetNamespace(), Name: action.(core.GetAction).GetName(), Annotations: map[string]string{ @@ -147,7 +147,7 @@ func TestTryAcquireOrRenew(t *testing.T) { verb: "get", reaction: func(action core.Action) (handled bool, ret runtime.Object, err error) { return true, &v1.Endpoints{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: action.GetNamespace(), Name: action.(core.GetAction).GetName(), Annotations: map[string]string{ @@ -173,7 +173,7 @@ func TestTryAcquireOrRenew(t *testing.T) { verb: "get", reaction: func(action core.Action) (handled bool, ret runtime.Object, err error) { return true, &v1.Endpoints{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: action.GetNamespace(), Name: action.(core.GetAction).GetName(), Annotations: map[string]string{ @@ -205,7 +205,7 @@ func TestTryAcquireOrRenew(t *testing.T) { var reportedLeader string lock := rl.EndpointsLock{ - EndpointsMeta: v1.ObjectMeta{Namespace: "foo", Name: "bar"}, + EndpointsMeta: metav1.ObjectMeta{Namespace: "foo", Name: "bar"}, LockConfig: rl.ResourceLockConfig{ Identity: "baz", EventRecorder: &record.FakeRecorder{}, diff --git a/vendor/k8s.io/kubernetes/pkg/client/leaderelection/resourcelock/endpointslock.go b/vendor/k8s.io/kubernetes/pkg/client/leaderelection/resourcelock/endpointslock.go index 7f7dc782..5001438f 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/leaderelection/resourcelock/endpointslock.go +++ b/vendor/k8s.io/kubernetes/pkg/client/leaderelection/resourcelock/endpointslock.go @@ -29,7 +29,7 @@ import ( type EndpointsLock struct { // EndpointsMeta should contain a Name and a Namespace of an // Endpoints object that the LeaderElector will attempt to lead. - EndpointsMeta v1.ObjectMeta + EndpointsMeta metav1.ObjectMeta Client clientset.Interface LockConfig ResourceLockConfig e *v1.Endpoints @@ -60,7 +60,7 @@ func (el *EndpointsLock) Create(ler LeaderElectionRecord) error { return err } el.e, err = el.Client.Core().Endpoints(el.EndpointsMeta.Namespace).Create(&v1.Endpoints{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: el.EndpointsMeta.Name, Namespace: el.EndpointsMeta.Namespace, Annotations: map[string]string{ diff --git a/vendor/k8s.io/kubernetes/pkg/client/legacylisters/BUILD b/vendor/k8s.io/kubernetes/pkg/client/legacylisters/BUILD new file mode 100644 index 00000000..a51ec3c3 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/client/legacylisters/BUILD @@ -0,0 +1,66 @@ +package(default_visibility = ["//visibility:public"]) + +licenses(["notice"]) + +load( + "@io_bazel_rules_go//go:def.bzl", + "go_library", + "go_test", +) + +go_test( + name = "go_default_test", + srcs = ["listers_test.go"], + library = ":go_default_library", + tags = ["automanaged"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/apis/extensions/v1beta1:go_default_library", + "//pkg/client/cache:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/labels", + "//vendor:k8s.io/apimachinery/pkg/util/sets", + ], +) + +go_library( + name = "go_default_library", + srcs = [ + "listers.go", + "listers_core.go", + "listers_extensions.go", + "listers_rbac.go", + ], + tags = ["automanaged"], + deps = [ + "//pkg/api:go_default_library", + "//pkg/api/v1:go_default_library", + "//pkg/apis/apps/v1beta1:go_default_library", + "//pkg/apis/certificates/v1beta1:go_default_library", + "//pkg/apis/extensions:go_default_library", + "//pkg/apis/extensions/v1beta1:go_default_library", + "//pkg/apis/policy/v1beta1:go_default_library", + "//pkg/apis/rbac:go_default_library", + "//pkg/apis/storage:go_default_library", + "//pkg/apis/storage/v1beta1:go_default_library", + "//pkg/client/cache:go_default_library", + "//vendor:github.com/golang/glog", + "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/labels", + ], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], +) diff --git a/vendor/k8s.io/kubernetes/pkg/client/legacylisters/listers.go b/vendor/k8s.io/kubernetes/pkg/client/legacylisters/listers.go new file mode 100644 index 00000000..00554894 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/client/legacylisters/listers.go @@ -0,0 +1,346 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package listers + +import ( + "fmt" + + "github.com/golang/glog" + "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/kubernetes/pkg/api/v1" + apps "k8s.io/kubernetes/pkg/apis/apps/v1beta1" + certificates "k8s.io/kubernetes/pkg/apis/certificates/v1beta1" + extensions "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" + policy "k8s.io/kubernetes/pkg/apis/policy/v1beta1" + storageinternal "k8s.io/kubernetes/pkg/apis/storage" + storage "k8s.io/kubernetes/pkg/apis/storage/v1beta1" + "k8s.io/kubernetes/pkg/client/cache" +) + +// TODO: generate these classes and methods for all resources of interest using +// a script. Can use "go generate" once 1.4 is supported by all users. + +// NodeConditionPredicate is a function that indicates whether the given node's conditions meet +// some set of criteria defined by the function. +type NodeConditionPredicate func(node *v1.Node) bool + +// StoreToNodeLister makes a Store have the List method of the client.NodeInterface +// The Store must contain (only) Nodes. +type StoreToNodeLister struct { + cache.Store +} + +func (s *StoreToNodeLister) List() (machines v1.NodeList, err error) { + for _, m := range s.Store.List() { + machines.Items = append(machines.Items, *(m.(*v1.Node))) + } + return machines, nil +} + +// NodeCondition returns a storeToNodeConditionLister +func (s *StoreToNodeLister) NodeCondition(predicate NodeConditionPredicate) storeToNodeConditionLister { + // TODO: Move this filtering server side. Currently our selectors don't facilitate searching through a list so we + // have the reflector filter out the Unschedulable field and sift through node conditions in the lister. + return storeToNodeConditionLister{s.Store, predicate} +} + +// storeToNodeConditionLister filters and returns nodes matching the given type and status from the store. +type storeToNodeConditionLister struct { + store cache.Store + predicate NodeConditionPredicate +} + +// List returns a list of nodes that match the conditions defined by the predicate functions in the storeToNodeConditionLister. +func (s storeToNodeConditionLister) List() (nodes []*v1.Node, err error) { + for _, m := range s.store.List() { + node := m.(*v1.Node) + if s.predicate(node) { + nodes = append(nodes, node) + } else { + glog.V(5).Infof("Node %s matches none of the conditions", node.Name) + } + } + return +} + +// StoreToDaemonSetLister gives a store List and Exists methods. The store must contain only DaemonSets. +type StoreToDaemonSetLister struct { + cache.Store +} + +// Exists checks if the given daemon set exists in the store. +func (s *StoreToDaemonSetLister) Exists(ds *extensions.DaemonSet) (bool, error) { + _, exists, err := s.Store.Get(ds) + if err != nil { + return false, err + } + return exists, nil +} + +// List lists all daemon sets in the store. +// TODO: converge on the interface in pkg/client +func (s *StoreToDaemonSetLister) List() (dss extensions.DaemonSetList, err error) { + for _, c := range s.Store.List() { + dss.Items = append(dss.Items, *(c.(*extensions.DaemonSet))) + } + return dss, nil +} + +// GetPodDaemonSets returns a list of daemon sets managing a pod. +// Returns an error if and only if no matching daemon sets are found. +func (s *StoreToDaemonSetLister) GetPodDaemonSets(pod *v1.Pod) (daemonSets []extensions.DaemonSet, err error) { + var selector labels.Selector + var daemonSet extensions.DaemonSet + + if len(pod.Labels) == 0 { + err = fmt.Errorf("no daemon sets found for pod %v because it has no labels", pod.Name) + return + } + + for _, m := range s.Store.List() { + daemonSet = *m.(*extensions.DaemonSet) + if daemonSet.Namespace != pod.Namespace { + continue + } + selector, err = metav1.LabelSelectorAsSelector(daemonSet.Spec.Selector) + if err != nil { + // this should not happen if the DaemonSet passed validation + return nil, err + } + + // If a daemonSet with a nil or empty selector creeps in, it should match nothing, not everything. + if selector.Empty() || !selector.Matches(labels.Set(pod.Labels)) { + continue + } + daemonSets = append(daemonSets, daemonSet) + } + if len(daemonSets) == 0 { + err = fmt.Errorf("could not find daemon set for pod %s in namespace %s with labels: %v", pod.Name, pod.Namespace, pod.Labels) + } + return +} + +// StoreToEndpointsLister makes a Store that lists endpoints. +type StoreToEndpointsLister struct { + cache.Store +} + +// List lists all endpoints in the store. +func (s *StoreToEndpointsLister) List() (services v1.EndpointsList, err error) { + for _, m := range s.Store.List() { + services.Items = append(services.Items, *(m.(*v1.Endpoints))) + } + return services, nil +} + +// GetServiceEndpoints returns the endpoints of a service, matched on service name. +func (s *StoreToEndpointsLister) GetServiceEndpoints(svc *v1.Service) (ep v1.Endpoints, err error) { + for _, m := range s.Store.List() { + ep = *m.(*v1.Endpoints) + if svc.Name == ep.Name && svc.Namespace == ep.Namespace { + return ep, nil + } + } + err = fmt.Errorf("could not find endpoints for service: %v", svc.Name) + return +} + +// Typed wrapper around a store of PersistentVolumes +type StoreToPVFetcher struct { + cache.Store +} + +// GetPersistentVolumeInfo returns cached data for the PersistentVolume 'id'. +func (s *StoreToPVFetcher) GetPersistentVolumeInfo(id string) (*v1.PersistentVolume, error) { + o, exists, err := s.Get(&v1.PersistentVolume{ObjectMeta: metav1.ObjectMeta{Name: id}}) + + if err != nil { + return nil, fmt.Errorf("error retrieving PersistentVolume '%v' from cache: %v", id, err) + } + + if !exists { + return nil, fmt.Errorf("PersistentVolume '%v' not found", id) + } + + return o.(*v1.PersistentVolume), nil +} + +// StoreToStatefulSetLister gives a store List and Exists methods. The store must contain only StatefulSets. +type StoreToStatefulSetLister struct { + cache.Store +} + +// Exists checks if the given StatefulSet exists in the store. +func (s *StoreToStatefulSetLister) Exists(ps *apps.StatefulSet) (bool, error) { + _, exists, err := s.Store.Get(ps) + if err != nil { + return false, err + } + return exists, nil +} + +// List lists all StatefulSets in the store. +func (s *StoreToStatefulSetLister) List() (psList []apps.StatefulSet, err error) { + for _, ps := range s.Store.List() { + psList = append(psList, *(ps.(*apps.StatefulSet))) + } + return psList, nil +} + +type storeStatefulSetsNamespacer struct { + store cache.Store + namespace string +} + +func (s *StoreToStatefulSetLister) StatefulSets(namespace string) storeStatefulSetsNamespacer { + return storeStatefulSetsNamespacer{s.Store, namespace} +} + +// GetPodStatefulSets returns a list of StatefulSets managing a pod. Returns an error only if no matching StatefulSets are found. +func (s *StoreToStatefulSetLister) GetPodStatefulSets(pod *v1.Pod) (psList []apps.StatefulSet, err error) { + var selector labels.Selector + var ps apps.StatefulSet + + if len(pod.Labels) == 0 { + err = fmt.Errorf("no StatefulSets found for pod %v because it has no labels", pod.Name) + return + } + + for _, m := range s.Store.List() { + ps = *m.(*apps.StatefulSet) + if ps.Namespace != pod.Namespace { + continue + } + selector, err = metav1.LabelSelectorAsSelector(ps.Spec.Selector) + if err != nil { + err = fmt.Errorf("invalid selector: %v", err) + return + } + + // If a StatefulSet with a nil or empty selector creeps in, it should match nothing, not everything. + if selector.Empty() || !selector.Matches(labels.Set(pod.Labels)) { + continue + } + psList = append(psList, ps) + } + if len(psList) == 0 { + err = fmt.Errorf("could not find StatefulSet for pod %s in namespace %s with labels: %v", pod.Name, pod.Namespace, pod.Labels) + } + return +} + +// StoreToCertificateRequestLister gives a store List and Exists methods. The store must contain only CertificateRequests. +type StoreToCertificateRequestLister struct { + cache.Store +} + +// Exists checks if the given csr exists in the store. +func (s *StoreToCertificateRequestLister) Exists(csr *certificates.CertificateSigningRequest) (bool, error) { + _, exists, err := s.Store.Get(csr) + if err != nil { + return false, err + } + return exists, nil +} + +// StoreToCertificateRequestLister lists all csrs in the store. +func (s *StoreToCertificateRequestLister) List() (csrs certificates.CertificateSigningRequestList, err error) { + for _, c := range s.Store.List() { + csrs.Items = append(csrs.Items, *(c.(*certificates.CertificateSigningRequest))) + } + return csrs, nil +} + +type StoreToPodDisruptionBudgetLister struct { + cache.Store +} + +// GetPodPodDisruptionBudgets returns a list of PodDisruptionBudgets matching a pod. Returns an error only if no matching PodDisruptionBudgets are found. +func (s *StoreToPodDisruptionBudgetLister) GetPodPodDisruptionBudgets(pod *v1.Pod) (pdbList []policy.PodDisruptionBudget, err error) { + var selector labels.Selector + + if len(pod.Labels) == 0 { + err = fmt.Errorf("no PodDisruptionBudgets found for pod %v because it has no labels", pod.Name) + return + } + + for _, m := range s.Store.List() { + pdb, ok := m.(*policy.PodDisruptionBudget) + if !ok { + glog.Errorf("Unexpected: %v is not a PodDisruptionBudget", m) + continue + } + if pdb.Namespace != pod.Namespace { + continue + } + selector, err = metav1.LabelSelectorAsSelector(pdb.Spec.Selector) + if err != nil { + glog.Warningf("invalid selector: %v", err) + // TODO(mml): add an event to the PDB + continue + } + + // If a PDB with a nil or empty selector creeps in, it should match nothing, not everything. + if selector.Empty() || !selector.Matches(labels.Set(pod.Labels)) { + continue + } + pdbList = append(pdbList, *pdb) + } + if len(pdbList) == 0 { + err = fmt.Errorf("could not find PodDisruptionBudget for pod %s in namespace %s with labels: %v", pod.Name, pod.Namespace, pod.Labels) + } + return +} + +// StorageClassLister knows how to list storage classes +type StorageClassLister interface { + List(selector labels.Selector) (ret []*storage.StorageClass, err error) + Get(name string) (*storage.StorageClass, error) +} + +// storageClassLister implements StorageClassLister +type storageClassLister struct { + indexer cache.Indexer +} + +// NewStorageClassLister returns a new lister. +func NewStorageClassLister(indexer cache.Indexer) StorageClassLister { + return &storageClassLister{indexer: indexer} +} + +// List returns a list of storage classes +func (s *storageClassLister) List(selector labels.Selector) (ret []*storage.StorageClass, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*storage.StorageClass)) + }) + return ret, err +} + +// Get returns storage class with name 'name'. +func (s *storageClassLister) Get(name string) (*storage.StorageClass, error) { + key := &storage.StorageClass{ObjectMeta: metav1.ObjectMeta{Name: name}} + obj, exists, err := s.indexer.Get(key) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(storageinternal.Resource("storageclass"), name) + } + return obj.(*storage.StorageClass), nil +} diff --git a/vendor/k8s.io/kubernetes/pkg/client/cache/listers_core.go b/vendor/k8s.io/kubernetes/pkg/client/legacylisters/listers_core.go similarity index 86% rename from vendor/k8s.io/kubernetes/pkg/client/cache/listers_core.go rename to vendor/k8s.io/kubernetes/pkg/client/legacylisters/listers_core.go index 4029287e..64b85bac 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/cache/listers_core.go +++ b/vendor/k8s.io/kubernetes/pkg/client/legacylisters/listers_core.go @@ -14,15 +14,17 @@ See the License for the specific language governing permissions and limitations under the License. */ -package cache +package listers import ( "fmt" "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" + "k8s.io/kubernetes/pkg/client/cache" ) // TODO: generate these classes and methods for all resources of interest using @@ -38,11 +40,11 @@ import ( // StoreToPodLister helps list pods type StoreToPodLister struct { - Indexer Indexer + Indexer cache.Indexer } func (s *StoreToPodLister) List(selector labels.Selector) (ret []*v1.Pod, err error) { - err = ListAll(s.Indexer, selector, func(m interface{}) { + err = cache.ListAll(s.Indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.Pod)) }) return ret, err @@ -53,12 +55,12 @@ func (s *StoreToPodLister) Pods(namespace string) storePodsNamespacer { } type storePodsNamespacer struct { - Indexer Indexer + Indexer cache.Indexer namespace string } func (s storePodsNamespacer) List(selector labels.Selector) (ret []*v1.Pod, err error) { - err = ListAllByNamespace(s.Indexer, s.namespace, selector, func(m interface{}) { + err = cache.ListAllByNamespace(s.Indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1.Pod)) }) return ret, err @@ -77,11 +79,11 @@ func (s storePodsNamespacer) Get(name string) (*v1.Pod, error) { // StoreToServiceLister helps list services type StoreToServiceLister struct { - Indexer Indexer + Indexer cache.Indexer } func (s *StoreToServiceLister) List(selector labels.Selector) (ret []*v1.Service, err error) { - err = ListAll(s.Indexer, selector, func(m interface{}) { + err = cache.ListAll(s.Indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.Service)) }) return ret, err @@ -92,12 +94,12 @@ func (s *StoreToServiceLister) Services(namespace string) storeServicesNamespace } type storeServicesNamespacer struct { - indexer Indexer + indexer cache.Indexer namespace string } func (s storeServicesNamespacer) List(selector labels.Selector) (ret []*v1.Service, err error) { - err = ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1.Service)) }) return ret, err @@ -139,11 +141,11 @@ func (s *StoreToServiceLister) GetPodServices(pod *v1.Pod) (services []*v1.Servi // StoreToReplicationControllerLister helps list rcs type StoreToReplicationControllerLister struct { - Indexer Indexer + Indexer cache.Indexer } func (s *StoreToReplicationControllerLister) List(selector labels.Selector) (ret []*v1.ReplicationController, err error) { - err = ListAll(s.Indexer, selector, func(m interface{}) { + err = cache.ListAll(s.Indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.ReplicationController)) }) return ret, err @@ -154,12 +156,12 @@ func (s *StoreToReplicationControllerLister) ReplicationControllers(namespace st } type storeReplicationControllersNamespacer struct { - indexer Indexer + indexer cache.Indexer namespace string } func (s storeReplicationControllersNamespacer) List(selector labels.Selector) (ret []*v1.ReplicationController, err error) { - err = ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1.ReplicationController)) }) return ret, err @@ -183,8 +185,8 @@ func (s *StoreToReplicationControllerLister) GetPodControllers(pod *v1.Pod) (con return } - key := &v1.ReplicationController{ObjectMeta: v1.ObjectMeta{Namespace: pod.Namespace}} - items, err := s.Indexer.Index(NamespaceIndex, key) + key := &v1.ReplicationController{ObjectMeta: metav1.ObjectMeta{Namespace: pod.Namespace}} + items, err := s.Indexer.Index(cache.NamespaceIndex, key) if err != nil { return } @@ -207,11 +209,11 @@ func (s *StoreToReplicationControllerLister) GetPodControllers(pod *v1.Pod) (con // StoreToServiceAccountLister helps list service accounts type StoreToServiceAccountLister struct { - Indexer Indexer + Indexer cache.Indexer } func (s *StoreToServiceAccountLister) List(selector labels.Selector) (ret []*v1.ServiceAccount, err error) { - err = ListAll(s.Indexer, selector, func(m interface{}) { + err = cache.ListAll(s.Indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.ServiceAccount)) }) return ret, err @@ -222,12 +224,12 @@ func (s *StoreToServiceAccountLister) ServiceAccounts(namespace string) storeSer } type storeServiceAccountsNamespacer struct { - indexer Indexer + indexer cache.Indexer namespace string } func (s storeServiceAccountsNamespacer) List(selector labels.Selector) (ret []*v1.ServiceAccount, err error) { - err = ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1.ServiceAccount)) }) return ret, err @@ -246,11 +248,11 @@ func (s storeServiceAccountsNamespacer) Get(name string) (*v1.ServiceAccount, er // StoreToLimitRangeLister helps list limit ranges type StoreToLimitRangeLister struct { - Indexer Indexer + Indexer cache.Indexer } func (s *StoreToLimitRangeLister) List(selector labels.Selector) (ret []*v1.LimitRange, err error) { - err = ListAll(s.Indexer, selector, func(m interface{}) { + err = cache.ListAll(s.Indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.LimitRange)) }) return ret, err @@ -258,12 +260,12 @@ func (s *StoreToLimitRangeLister) List(selector labels.Selector) (ret []*v1.Limi // StoreToPersistentVolumeClaimLister helps list pvcs type StoreToPersistentVolumeClaimLister struct { - Indexer Indexer + Indexer cache.Indexer } // List returns all persistentvolumeclaims that match the specified selector func (s *StoreToPersistentVolumeClaimLister) List(selector labels.Selector) (ret []*v1.PersistentVolumeClaim, err error) { - err = ListAll(s.Indexer, selector, func(m interface{}) { + err = cache.ListAll(s.Indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.PersistentVolumeClaim)) }) return ret, err @@ -274,12 +276,12 @@ func (s *StoreToLimitRangeLister) LimitRanges(namespace string) storeLimitRanges } type storeLimitRangesNamespacer struct { - indexer Indexer + indexer cache.Indexer namespace string } func (s storeLimitRangesNamespacer) List(selector labels.Selector) (ret []*v1.LimitRange, err error) { - err = ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1.LimitRange)) }) return ret, err @@ -302,12 +304,12 @@ func (s *StoreToPersistentVolumeClaimLister) PersistentVolumeClaims(namespace st } type storePersistentVolumeClaimsNamespacer struct { - Indexer Indexer + Indexer cache.Indexer namespace string } func (s storePersistentVolumeClaimsNamespacer) List(selector labels.Selector) (ret []*v1.PersistentVolumeClaim, err error) { - err = ListAllByNamespace(s.Indexer, s.namespace, selector, func(m interface{}) { + err = cache.ListAllByNamespace(s.Indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*v1.PersistentVolumeClaim)) }) return ret, err @@ -326,12 +328,12 @@ func (s storePersistentVolumeClaimsNamespacer) Get(name string) (*v1.PersistentV // IndexerToNamespaceLister gives an Indexer List method type IndexerToNamespaceLister struct { - Indexer + cache.Indexer } // List returns a list of namespaces func (i *IndexerToNamespaceLister) List(selector labels.Selector) (ret []*v1.Namespace, err error) { - err = ListAll(i.Indexer, selector, func(m interface{}) { + err = cache.ListAll(i.Indexer, selector, func(m interface{}) { ret = append(ret, m.(*v1.Namespace)) }) return ret, err diff --git a/vendor/k8s.io/kubernetes/pkg/client/cache/listers_extensions.go b/vendor/k8s.io/kubernetes/pkg/client/legacylisters/listers_extensions.go similarity index 93% rename from vendor/k8s.io/kubernetes/pkg/client/cache/listers_extensions.go rename to vendor/k8s.io/kubernetes/pkg/client/legacylisters/listers_extensions.go index 7396530d..302f7a0b 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/cache/listers_extensions.go +++ b/vendor/k8s.io/kubernetes/pkg/client/legacylisters/listers_extensions.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package cache +package listers import ( "fmt" @@ -25,6 +25,7 @@ import ( "k8s.io/kubernetes/pkg/api/v1" extensionsinternal "k8s.io/kubernetes/pkg/apis/extensions" extensions "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" + "k8s.io/kubernetes/pkg/client/cache" ) // TODO: generate these classes and methods for all resources of interest using @@ -40,11 +41,11 @@ import ( // StoreToDeploymentLister helps list deployments type StoreToDeploymentLister struct { - Indexer Indexer + Indexer cache.Indexer } func (s *StoreToDeploymentLister) List(selector labels.Selector) (ret []*extensions.Deployment, err error) { - err = ListAll(s.Indexer, selector, func(m interface{}) { + err = cache.ListAll(s.Indexer, selector, func(m interface{}) { ret = append(ret, m.(*extensions.Deployment)) }) return ret, err @@ -55,12 +56,12 @@ func (s *StoreToDeploymentLister) Deployments(namespace string) storeDeployments } type storeDeploymentsNamespacer struct { - Indexer Indexer + Indexer cache.Indexer namespace string } func (s storeDeploymentsNamespacer) List(selector labels.Selector) (ret []*extensions.Deployment, err error) { - err = ListAllByNamespace(s.Indexer, s.namespace, selector, func(m interface{}) { + err = cache.ListAllByNamespace(s.Indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*extensions.Deployment)) }) return ret, err @@ -141,11 +142,11 @@ func (s *StoreToDeploymentLister) GetDeploymentsForPod(pod *v1.Pod) (deployments // StoreToReplicaSetLister helps list replicasets type StoreToReplicaSetLister struct { - Indexer Indexer + Indexer cache.Indexer } func (s *StoreToReplicaSetLister) List(selector labels.Selector) (ret []*extensions.ReplicaSet, err error) { - err = ListAll(s.Indexer, selector, func(m interface{}) { + err = cache.ListAll(s.Indexer, selector, func(m interface{}) { ret = append(ret, m.(*extensions.ReplicaSet)) }) return ret, err @@ -156,12 +157,12 @@ func (s *StoreToReplicaSetLister) ReplicaSets(namespace string) storeReplicaSets } type storeReplicaSetsNamespacer struct { - Indexer Indexer + Indexer cache.Indexer namespace string } func (s storeReplicaSetsNamespacer) List(selector labels.Selector) (ret []*extensions.ReplicaSet, err error) { - err = ListAllByNamespace(s.Indexer, s.namespace, selector, func(m interface{}) { + err = cache.ListAllByNamespace(s.Indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*extensions.ReplicaSet)) }) return ret, err diff --git a/vendor/k8s.io/kubernetes/pkg/client/cache/listers_rbac.go b/vendor/k8s.io/kubernetes/pkg/client/legacylisters/listers_rbac.go similarity index 87% rename from vendor/k8s.io/kubernetes/pkg/client/cache/listers_rbac.go rename to vendor/k8s.io/kubernetes/pkg/client/legacylisters/listers_rbac.go index 8d8e8cbc..f710bfec 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/cache/listers_rbac.go +++ b/vendor/k8s.io/kubernetes/pkg/client/legacylisters/listers_rbac.go @@ -14,12 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */ -package cache +package listers import ( "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" rbac "k8s.io/kubernetes/pkg/apis/rbac" + "k8s.io/kubernetes/pkg/client/cache" ) // TODO: generate these classes and methods for all resources of interest using @@ -33,16 +34,16 @@ import ( // l := clusterRoleLister{s} // l.List() -func NewClusterRoleLister(indexer Indexer) ClusterRoleLister { +func NewClusterRoleLister(indexer cache.Indexer) ClusterRoleLister { return &clusterRoleLister{indexer: indexer} } -func NewClusterRoleBindingLister(indexer Indexer) ClusterRoleBindingLister { +func NewClusterRoleBindingLister(indexer cache.Indexer) ClusterRoleBindingLister { return &clusterRoleBindingLister{indexer: indexer} } -func NewRoleLister(indexer Indexer) RoleLister { +func NewRoleLister(indexer cache.Indexer) RoleLister { return &roleLister{indexer: indexer} } -func NewRoleBindingLister(indexer Indexer) RoleBindingLister { +func NewRoleBindingLister(indexer cache.Indexer) RoleBindingLister { return &roleBindingLister{indexer: indexer} } @@ -70,11 +71,11 @@ type ClusterRoleLister interface { } type clusterRoleLister struct { - indexer Indexer + indexer cache.Indexer } func (s *clusterRoleLister) List(selector labels.Selector) (ret []*rbac.ClusterRole, err error) { - err = ListAll(s.indexer, selector, func(m interface{}) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*rbac.ClusterRole)) }) return ret, err @@ -102,11 +103,11 @@ type ClusterRoleBindingLister interface { } type clusterRoleBindingLister struct { - indexer Indexer + indexer cache.Indexer } func (s *clusterRoleBindingLister) List(selector labels.Selector) (ret []*rbac.ClusterRoleBinding, err error) { - err = ListAll(s.indexer, selector, func(m interface{}) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*rbac.ClusterRoleBinding)) }) return ret, err @@ -139,11 +140,11 @@ type RoleNamespaceLister interface { } type roleLister struct { - indexer Indexer + indexer cache.Indexer } func (s *roleLister) List(selector labels.Selector) (ret []*rbac.Role, err error) { - err = ListAll(s.indexer, selector, func(m interface{}) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*rbac.Role)) }) return ret, err @@ -158,12 +159,12 @@ func (s roleLister) GetRole(namespace, name string) (*rbac.Role, error) { } type roleNamespaceLister struct { - indexer Indexer + indexer cache.Indexer namespace string } func (s roleNamespaceLister) List(selector labels.Selector) (ret []*rbac.Role, err error) { - err = ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*rbac.Role)) }) return ret, err @@ -192,11 +193,11 @@ type RoleBindingNamespaceLister interface { } type roleBindingLister struct { - indexer Indexer + indexer cache.Indexer } func (s *roleBindingLister) List(selector labels.Selector) (ret []*rbac.RoleBinding, err error) { - err = ListAll(s.indexer, selector, func(m interface{}) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { ret = append(ret, m.(*rbac.RoleBinding)) }) return ret, err @@ -211,12 +212,12 @@ func (s roleBindingLister) ListRoleBindings(namespace string) ([]*rbac.RoleBindi } type roleBindingNamespaceLister struct { - indexer Indexer + indexer cache.Indexer namespace string } func (s roleBindingNamespaceLister) List(selector labels.Selector) (ret []*rbac.RoleBinding, err error) { - err = ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { ret = append(ret, m.(*rbac.RoleBinding)) }) return ret, err diff --git a/vendor/k8s.io/kubernetes/pkg/client/cache/listers_test.go b/vendor/k8s.io/kubernetes/pkg/client/legacylisters/listers_test.go similarity index 80% rename from vendor/k8s.io/kubernetes/pkg/client/cache/listers_test.go rename to vendor/k8s.io/kubernetes/pkg/client/legacylisters/listers_test.go index a133a0eb..e795ae4f 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/cache/listers_test.go +++ b/vendor/k8s.io/kubernetes/pkg/client/legacylisters/listers_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package cache +package listers import ( "testing" @@ -25,13 +25,14 @@ import ( "k8s.io/apimachinery/pkg/util/sets" "k8s.io/kubernetes/pkg/api/v1" extensions "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" + "k8s.io/kubernetes/pkg/client/cache" ) func TestStoreToNodeLister(t *testing.T) { - store := NewStore(MetaNamespaceKeyFunc) + store := cache.NewStore(cache.MetaNamespaceKeyFunc) ids := sets.NewString("foo", "bar", "baz") for id := range ids { - store.Add(&v1.Node{ObjectMeta: v1.ObjectMeta{Name: id}}) + store.Add(&v1.Node{ObjectMeta: metav1.ObjectMeta{Name: id}}) } sml := StoreToNodeLister{store} @@ -49,10 +50,10 @@ func TestStoreToNodeLister(t *testing.T) { } func TestStoreToNodeConditionLister(t *testing.T) { - store := NewStore(MetaNamespaceKeyFunc) + store := cache.NewStore(cache.MetaNamespaceKeyFunc) nodes := []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Status: v1.NodeStatus{ Conditions: []v1.NodeCondition{ { @@ -67,7 +68,7 @@ func TestStoreToNodeConditionLister(t *testing.T) { }, }, { - ObjectMeta: v1.ObjectMeta{Name: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar"}, Status: v1.NodeStatus{ Conditions: []v1.NodeCondition{ { @@ -78,7 +79,7 @@ func TestStoreToNodeConditionLister(t *testing.T) { }, }, { - ObjectMeta: v1.ObjectMeta{Name: "baz"}, + ObjectMeta: metav1.ObjectMeta{Name: "baz"}, Status: v1.NodeStatus{ Conditions: []v1.NodeCondition{ { @@ -136,14 +137,14 @@ func TestStoreToReplicationControllerLister(t *testing.T) { description: "Verify we can search all namespaces", inRCs: []*v1.ReplicationController{ { - ObjectMeta: v1.ObjectMeta{Name: "foo", Namespace: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "bar"}, }, { - ObjectMeta: v1.ObjectMeta{Name: "hmm", Namespace: "hmm"}, + ObjectMeta: metav1.ObjectMeta{Name: "hmm", Namespace: "hmm"}, }, }, list: func(lister StoreToReplicationControllerLister) ([]*v1.ReplicationController, error) { - return lister.ReplicationControllers(v1.NamespaceAll).List(labels.Set{}.AsSelectorPreValidated()) + return lister.ReplicationControllers(metav1.NamespaceAll).List(labels.Set{}.AsSelectorPreValidated()) }, outRCNames: sets.NewString("hmm", "foo"), }, @@ -151,10 +152,10 @@ func TestStoreToReplicationControllerLister(t *testing.T) { description: "Verify we can search a specific namespace", inRCs: []*v1.ReplicationController{ { - ObjectMeta: v1.ObjectMeta{Name: "foo", Namespace: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "bar"}, }, { - ObjectMeta: v1.ObjectMeta{Name: "hmm", Namespace: "hmm"}, + ObjectMeta: metav1.ObjectMeta{Name: "hmm", Namespace: "hmm"}, }, }, list: func(lister StoreToReplicationControllerLister) ([]*v1.ReplicationController, error) { @@ -165,7 +166,7 @@ func TestStoreToReplicationControllerLister(t *testing.T) { { description: "Basic listing with all labels and no selectors", inRCs: []*v1.ReplicationController{ - {ObjectMeta: v1.ObjectMeta{Name: "basic"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "basic"}}, }, list: func(lister StoreToReplicationControllerLister) ([]*v1.ReplicationController, error) { return lister.List(labels.Everything()) @@ -176,7 +177,7 @@ func TestStoreToReplicationControllerLister(t *testing.T) { description: "No pod labels", inRCs: []*v1.ReplicationController{ { - ObjectMeta: v1.ObjectMeta{Name: "basic", Namespace: "ns"}, + ObjectMeta: metav1.ObjectMeta{Name: "basic", Namespace: "ns"}, Spec: v1.ReplicationControllerSpec{ Selector: map[string]string{"foo": "baz"}, }, @@ -184,7 +185,7 @@ func TestStoreToReplicationControllerLister(t *testing.T) { }, list: func(lister StoreToReplicationControllerLister) ([]*v1.ReplicationController, error) { pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{Name: "pod1", Namespace: "ns"}, + ObjectMeta: metav1.ObjectMeta{Name: "pod1", Namespace: "ns"}, } return lister.GetPodControllers(pod) }, @@ -195,12 +196,12 @@ func TestStoreToReplicationControllerLister(t *testing.T) { description: "No RC selectors", inRCs: []*v1.ReplicationController{ { - ObjectMeta: v1.ObjectMeta{Name: "basic", Namespace: "ns"}, + ObjectMeta: metav1.ObjectMeta{Name: "basic", Namespace: "ns"}, }, }, list: func(lister StoreToReplicationControllerLister) ([]*v1.ReplicationController, error) { pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod1", Namespace: "ns", Labels: map[string]string{"foo": "bar"}, @@ -215,13 +216,13 @@ func TestStoreToReplicationControllerLister(t *testing.T) { description: "Matching labels to selectors and namespace", inRCs: []*v1.ReplicationController{ { - ObjectMeta: v1.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: v1.ReplicationControllerSpec{ Selector: map[string]string{"foo": "bar"}, }, }, { - ObjectMeta: v1.ObjectMeta{Name: "bar", Namespace: "ns"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar", Namespace: "ns"}, Spec: v1.ReplicationControllerSpec{ Selector: map[string]string{"foo": "bar"}, }, @@ -229,7 +230,7 @@ func TestStoreToReplicationControllerLister(t *testing.T) { }, list: func(lister StoreToReplicationControllerLister) ([]*v1.ReplicationController, error) { pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod1", Labels: map[string]string{"foo": "bar"}, Namespace: "ns", @@ -246,11 +247,11 @@ func TestStoreToReplicationControllerLister(t *testing.T) { if c.onlyIfIndexedByNamespace && !withIndex { continue } - var store Indexer + var store cache.Indexer if withIndex { - store = NewIndexer(MetaNamespaceKeyFunc, Indexers{NamespaceIndex: MetaNamespaceIndexFunc}) + store = cache.NewIndexer(cache.MetaNamespaceKeyFunc, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}) } else { - store = NewIndexer(MetaNamespaceKeyFunc, Indexers{}) + store = cache.NewIndexer(cache.MetaNamespaceKeyFunc, cache.Indexers{}) } for _, r := range c.inRCs { @@ -279,7 +280,7 @@ func TestStoreToReplicationControllerLister(t *testing.T) { } func TestStoreToReplicaSetLister(t *testing.T) { - store := NewIndexer(MetaNamespaceKeyFunc, Indexers{NamespaceIndex: MetaNamespaceIndexFunc}) + store := cache.NewIndexer(cache.MetaNamespaceKeyFunc, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}) lister := StoreToReplicaSetLister{store} testCases := []struct { inRSs []*extensions.ReplicaSet @@ -290,7 +291,7 @@ func TestStoreToReplicaSetLister(t *testing.T) { // Basic listing with all labels and no selectors { inRSs: []*extensions.ReplicaSet{ - {ObjectMeta: v1.ObjectMeta{Name: "basic"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "basic"}}, }, list: func() ([]*extensions.ReplicaSet, error) { return lister.List(labels.Everything()) @@ -301,7 +302,7 @@ func TestStoreToReplicaSetLister(t *testing.T) { { inRSs: []*extensions.ReplicaSet{ { - ObjectMeta: v1.ObjectMeta{Name: "basic", Namespace: "ns"}, + ObjectMeta: metav1.ObjectMeta{Name: "basic", Namespace: "ns"}, Spec: extensions.ReplicaSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"foo": "baz"}}, }, @@ -309,7 +310,7 @@ func TestStoreToReplicaSetLister(t *testing.T) { }, list: func() ([]*extensions.ReplicaSet, error) { pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{Name: "pod1", Namespace: "ns"}, + ObjectMeta: metav1.ObjectMeta{Name: "pod1", Namespace: "ns"}, } return lister.GetPodReplicaSets(pod) }, @@ -320,12 +321,12 @@ func TestStoreToReplicaSetLister(t *testing.T) { { inRSs: []*extensions.ReplicaSet{ { - ObjectMeta: v1.ObjectMeta{Name: "basic", Namespace: "ns"}, + ObjectMeta: metav1.ObjectMeta{Name: "basic", Namespace: "ns"}, }, }, list: func() ([]*extensions.ReplicaSet, error) { pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod1", Namespace: "ns", Labels: map[string]string{"foo": "bar"}, @@ -340,13 +341,13 @@ func TestStoreToReplicaSetLister(t *testing.T) { { inRSs: []*extensions.ReplicaSet{ { - ObjectMeta: v1.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: extensions.ReplicaSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"foo": "bar"}}, }, }, { - ObjectMeta: v1.ObjectMeta{Name: "bar", Namespace: "ns"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar", Namespace: "ns"}, Spec: extensions.ReplicaSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"foo": "bar"}}, }, @@ -354,7 +355,7 @@ func TestStoreToReplicaSetLister(t *testing.T) { }, list: func() ([]*extensions.ReplicaSet, error) { pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod1", Labels: map[string]string{"foo": "bar"}, Namespace: "ns", @@ -391,7 +392,7 @@ func TestStoreToReplicaSetLister(t *testing.T) { } func TestStoreToDaemonSetLister(t *testing.T) { - store := NewStore(MetaNamespaceKeyFunc) + store := cache.NewStore(cache.MetaNamespaceKeyFunc) lister := StoreToDaemonSetLister{store} testCases := []struct { inDSs []*extensions.DaemonSet @@ -402,7 +403,7 @@ func TestStoreToDaemonSetLister(t *testing.T) { // Basic listing { inDSs: []*extensions.DaemonSet{ - {ObjectMeta: v1.ObjectMeta{Name: "basic"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "basic"}}, }, list: func() ([]extensions.DaemonSet, error) { list, err := lister.List() @@ -413,9 +414,9 @@ func TestStoreToDaemonSetLister(t *testing.T) { // Listing multiple daemon sets { inDSs: []*extensions.DaemonSet{ - {ObjectMeta: v1.ObjectMeta{Name: "basic"}}, - {ObjectMeta: v1.ObjectMeta{Name: "complex"}}, - {ObjectMeta: v1.ObjectMeta{Name: "complex2"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "basic"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "complex"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "complex2"}}, }, list: func() ([]extensions.DaemonSet, error) { list, err := lister.List() @@ -427,7 +428,7 @@ func TestStoreToDaemonSetLister(t *testing.T) { { inDSs: []*extensions.DaemonSet{ { - ObjectMeta: v1.ObjectMeta{Name: "basic", Namespace: "ns"}, + ObjectMeta: metav1.ObjectMeta{Name: "basic", Namespace: "ns"}, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"foo": "baz"}}, }, @@ -435,7 +436,7 @@ func TestStoreToDaemonSetLister(t *testing.T) { }, list: func() ([]extensions.DaemonSet, error) { pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{Name: "pod1", Namespace: "ns"}, + ObjectMeta: metav1.ObjectMeta{Name: "pod1", Namespace: "ns"}, } return lister.GetPodDaemonSets(pod) }, @@ -446,12 +447,12 @@ func TestStoreToDaemonSetLister(t *testing.T) { { inDSs: []*extensions.DaemonSet{ { - ObjectMeta: v1.ObjectMeta{Name: "basic", Namespace: "ns"}, + ObjectMeta: metav1.ObjectMeta{Name: "basic", Namespace: "ns"}, }, }, list: func() ([]extensions.DaemonSet, error) { pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod1", Namespace: "ns", Labels: map[string]string{"foo": "bar"}, @@ -466,13 +467,13 @@ func TestStoreToDaemonSetLister(t *testing.T) { { inDSs: []*extensions.DaemonSet{ { - ObjectMeta: v1.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"foo": "bar"}}, }, }, { - ObjectMeta: v1.ObjectMeta{Name: "bar", Namespace: "ns"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar", Namespace: "ns"}, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"foo": "bar"}}, }, @@ -480,7 +481,7 @@ func TestStoreToDaemonSetLister(t *testing.T) { }, list: func() ([]extensions.DaemonSet, error) { pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod1", Labels: map[string]string{"foo": "bar"}, Namespace: "ns", @@ -520,15 +521,15 @@ func TestStoreToPodLister(t *testing.T) { // We test with and without a namespace index, because StoreToPodLister has // special logic to work on namespaces even when no namespace index is // present. - stores := []Indexer{ - NewIndexer(MetaNamespaceKeyFunc, Indexers{NamespaceIndex: MetaNamespaceIndexFunc}), - NewIndexer(MetaNamespaceKeyFunc, Indexers{}), + stores := []cache.Indexer{ + cache.NewIndexer(cache.MetaNamespaceKeyFunc, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}), + cache.NewIndexer(cache.MetaNamespaceKeyFunc, cache.Indexers{}), } for _, store := range stores { ids := []string{"foo", "bar", "baz"} for _, id := range ids { store.Add(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "other", Name: id, Labels: map[string]string{"name": id}, @@ -536,16 +537,16 @@ func TestStoreToPodLister(t *testing.T) { }) } store.Add(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "quux", - Namespace: v1.NamespaceDefault, + Namespace: metav1.NamespaceDefault, Labels: map[string]string{"name": "quux"}, }, }) spl := StoreToPodLister{store} // Verify that we can always look up by Namespace. - defaultPods, err := spl.Pods(v1.NamespaceDefault).List(labels.Set{}.AsSelectorPreValidated()) + defaultPods, err := spl.Pods(metav1.NamespaceDefault).List(labels.Set{}.AsSelectorPreValidated()) if err != nil { t.Errorf("Unexpected error: %v", err) } else if e, a := 1, len(defaultPods); e != a { @@ -582,18 +583,18 @@ func TestStoreToPodLister(t *testing.T) { } func TestStoreToServiceLister(t *testing.T) { - store := NewIndexer(MetaNamespaceKeyFunc, Indexers{NamespaceIndex: MetaNamespaceIndexFunc}) + store := cache.NewIndexer(cache.MetaNamespaceKeyFunc, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}) store.Add(&v1.Service{ - ObjectMeta: v1.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: v1.ServiceSpec{ Selector: map[string]string{}, }, }) - store.Add(&v1.Service{ObjectMeta: v1.ObjectMeta{Name: "bar"}}) + store.Add(&v1.Service{ObjectMeta: metav1.ObjectMeta{Name: "bar"}}) ssl := StoreToServiceLister{store} pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foopod", Labels: map[string]string{"role": "foo"}, }, diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/apps/internalversion/BUILD b/vendor/k8s.io/kubernetes/pkg/client/listers/apps/internalversion/BUILD index e898fe0e..055e0814 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/apps/internalversion/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/apps/internalversion/BUILD @@ -12,12 +12,15 @@ go_library( srcs = [ "expansion_generated.go", "statefulset.go", + "statefulset_expansion.go", ], tags = ["automanaged"], deps = [ + "//pkg/api:go_default_library", "//pkg/apis/apps:go_default_library", "//pkg/client/cache:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/apps/internalversion/expansion_generated.go b/vendor/k8s.io/kubernetes/pkg/client/listers/apps/internalversion/expansion_generated.go index 6ccf90e5..f0badbce 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/apps/internalversion/expansion_generated.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/apps/internalversion/expansion_generated.go @@ -14,14 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package internalversion - -// StatefulSetListerExpansion allows custom methods to be added to -// StatefulSetLister. -type StatefulSetListerExpansion interface{} - -// StatefulSetNamespaceListerExpansion allows custom methods to be added to -// StatefulSetNamespaeLister. -type StatefulSetNamespaceListerExpansion interface{} diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/apps/internalversion/statefulset.go b/vendor/k8s.io/kubernetes/pkg/client/listers/apps/internalversion/statefulset.go index 575c8457..6deb7efb 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/apps/internalversion/statefulset.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/apps/internalversion/statefulset.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package internalversion diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/apps/internalversion/statefulset_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/listers/apps/internalversion/statefulset_expansion.go new file mode 100644 index 00000000..0b58cf6a --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/apps/internalversion/statefulset_expansion.go @@ -0,0 +1,75 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package internalversion + +import ( + "fmt" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/apis/apps" +) + +// StatefulSetListerExpansion allows custom methods to be added to +// StatefulSetLister. +type StatefulSetListerExpansion interface { + GetPodStatefulSets(pod *api.Pod) ([]*apps.StatefulSet, error) +} + +// StatefulSetNamespaceListerExpansion allows custom methods to be added to +// StatefulSetNamespaeLister. +type StatefulSetNamespaceListerExpansion interface{} + +// GetPodStatefulSets returns a list of StatefulSets managing a pod. Returns an error only if no matching StatefulSets are found. +func (s *statefulSetLister) GetPodStatefulSets(pod *api.Pod) ([]*apps.StatefulSet, error) { + var selector labels.Selector + var ps *apps.StatefulSet + + if len(pod.Labels) == 0 { + return nil, fmt.Errorf("no StatefulSets found for pod %v because it has no labels", pod.Name) + } + + list, err := s.StatefulSets(pod.Namespace).List(labels.Everything()) + if err != nil { + return nil, err + } + + var psList []*apps.StatefulSet + for i := range list { + ps = list[i] + if ps.Namespace != pod.Namespace { + continue + } + selector, err = metav1.LabelSelectorAsSelector(ps.Spec.Selector) + if err != nil { + return nil, fmt.Errorf("invalid selector: %v", err) + } + + // If a StatefulSet with a nil or empty selector creeps in, it should match nothing, not everything. + if selector.Empty() || !selector.Matches(labels.Set(pod.Labels)) { + continue + } + psList = append(psList, ps) + } + + if len(psList) == 0 { + return nil, fmt.Errorf("could not find StatefulSet for pod %s in namespace %s with labels: %v", pod.Name, pod.Namespace, pod.Labels) + } + + return psList, nil +} diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/apps/v1beta1/BUILD b/vendor/k8s.io/kubernetes/pkg/client/listers/apps/v1beta1/BUILD index f891b7d7..47ce22e4 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/apps/v1beta1/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/apps/v1beta1/BUILD @@ -12,13 +12,16 @@ go_library( srcs = [ "expansion_generated.go", "statefulset.go", + "statefulset_expansion.go", ], tags = ["automanaged"], deps = [ + "//pkg/api/v1:go_default_library", "//pkg/apis/apps:go_default_library", "//pkg/apis/apps/v1beta1:go_default_library", "//pkg/client/cache:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/apps/v1beta1/expansion_generated.go b/vendor/k8s.io/kubernetes/pkg/client/listers/apps/v1beta1/expansion_generated.go index d3bd2af5..292e200e 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/apps/v1beta1/expansion_generated.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/apps/v1beta1/expansion_generated.go @@ -14,14 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package v1beta1 - -// StatefulSetListerExpansion allows custom methods to be added to -// StatefulSetLister. -type StatefulSetListerExpansion interface{} - -// StatefulSetNamespaceListerExpansion allows custom methods to be added to -// StatefulSetNamespaeLister. -type StatefulSetNamespaceListerExpansion interface{} diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/apps/v1beta1/statefulset.go b/vendor/k8s.io/kubernetes/pkg/client/listers/apps/v1beta1/statefulset.go index bfc5ac13..2ca8e6d3 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/apps/v1beta1/statefulset.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/apps/v1beta1/statefulset.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package v1beta1 diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/apps/v1beta1/statefulset_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/listers/apps/v1beta1/statefulset_expansion.go new file mode 100644 index 00000000..e032ae22 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/apps/v1beta1/statefulset_expansion.go @@ -0,0 +1,75 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + "fmt" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/kubernetes/pkg/api/v1" + apps "k8s.io/kubernetes/pkg/apis/apps/v1beta1" +) + +// StatefulSetListerExpansion allows custom methods to be added to +// StatefulSetLister. +type StatefulSetListerExpansion interface { + GetPodStatefulSets(pod *v1.Pod) ([]*apps.StatefulSet, error) +} + +// StatefulSetNamespaceListerExpansion allows custom methods to be added to +// StatefulSetNamespaeLister. +type StatefulSetNamespaceListerExpansion interface{} + +// GetPodStatefulSets returns a list of StatefulSets managing a pod. Returns an error only if no matching StatefulSets are found. +func (s *statefulSetLister) GetPodStatefulSets(pod *v1.Pod) ([]*apps.StatefulSet, error) { + var selector labels.Selector + var ps *apps.StatefulSet + + if len(pod.Labels) == 0 { + return nil, fmt.Errorf("no StatefulSets found for pod %v because it has no labels", pod.Name) + } + + list, err := s.StatefulSets(pod.Namespace).List(labels.Everything()) + if err != nil { + return nil, err + } + + var psList []*apps.StatefulSet + for i := range list { + ps = list[i] + if ps.Namespace != pod.Namespace { + continue + } + selector, err = metav1.LabelSelectorAsSelector(ps.Spec.Selector) + if err != nil { + return nil, fmt.Errorf("invalid selector: %v", err) + } + + // If a StatefulSet with a nil or empty selector creeps in, it should match nothing, not everything. + if selector.Empty() || !selector.Matches(labels.Set(pod.Labels)) { + continue + } + psList = append(psList, ps) + } + + if len(psList) == 0 { + return nil, fmt.Errorf("could not find StatefulSet for pod %s in namespace %s with labels: %v", pod.Name, pod.Namespace, pod.Labels) + } + + return psList, nil +} diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/authentication/internalversion/BUILD b/vendor/k8s.io/kubernetes/pkg/client/listers/authentication/internalversion/BUILD index 19a5809a..0b9d8f64 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/authentication/internalversion/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/authentication/internalversion/BUILD @@ -15,10 +15,10 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//pkg/apis/authentication:go_default_library", "//pkg/client/cache:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/authentication/internalversion/expansion_generated.go b/vendor/k8s.io/kubernetes/pkg/client/listers/authentication/internalversion/expansion_generated.go index 1acbd2c6..b77d77c5 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/authentication/internalversion/expansion_generated.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/authentication/internalversion/expansion_generated.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package internalversion diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/authentication/internalversion/tokenreview.go b/vendor/k8s.io/kubernetes/pkg/client/listers/authentication/internalversion/tokenreview.go index 4f519895..34d1abf3 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/authentication/internalversion/tokenreview.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/authentication/internalversion/tokenreview.go @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package internalversion import ( "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" - api "k8s.io/kubernetes/pkg/api" authentication "k8s.io/kubernetes/pkg/apis/authentication" "k8s.io/kubernetes/pkg/client/cache" ) @@ -55,7 +55,7 @@ func (s *tokenReviewLister) List(selector labels.Selector) (ret []*authenticatio // Get retrieves the TokenReview from the index for a given name. func (s *tokenReviewLister) Get(name string) (*authentication.TokenReview, error) { - key := &authentication.TokenReview{ObjectMeta: api.ObjectMeta{Name: name}} + key := &authentication.TokenReview{ObjectMeta: v1.ObjectMeta{Name: name}} obj, exists, err := s.indexer.Get(key) if err != nil { return nil, err diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/authentication/v1beta1/BUILD b/vendor/k8s.io/kubernetes/pkg/client/listers/authentication/v1beta1/BUILD index fa1c28fb..1f354802 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/authentication/v1beta1/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/authentication/v1beta1/BUILD @@ -15,11 +15,11 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api/v1:go_default_library", "//pkg/apis/authentication:go_default_library", "//pkg/apis/authentication/v1beta1:go_default_library", "//pkg/client/cache:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/authentication/v1beta1/expansion_generated.go b/vendor/k8s.io/kubernetes/pkg/client/listers/authentication/v1beta1/expansion_generated.go index 12789d6f..71d30865 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/authentication/v1beta1/expansion_generated.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/authentication/v1beta1/expansion_generated.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package v1beta1 diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/authentication/v1beta1/tokenreview.go b/vendor/k8s.io/kubernetes/pkg/client/listers/authentication/v1beta1/tokenreview.go index ae71a670..65d86b50 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/authentication/v1beta1/tokenreview.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/authentication/v1beta1/tokenreview.go @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package v1beta1 import ( "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" - v1 "k8s.io/kubernetes/pkg/api/v1" authentication "k8s.io/kubernetes/pkg/apis/authentication" v1beta1 "k8s.io/kubernetes/pkg/apis/authentication/v1beta1" "k8s.io/kubernetes/pkg/client/cache" diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/authorization/internalversion/BUILD b/vendor/k8s.io/kubernetes/pkg/client/listers/authorization/internalversion/BUILD index 7d8019c2..938b6078 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/authorization/internalversion/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/authorization/internalversion/BUILD @@ -17,10 +17,10 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//pkg/apis/authorization:go_default_library", "//pkg/client/cache:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/authorization/internalversion/expansion_generated.go b/vendor/k8s.io/kubernetes/pkg/client/listers/authorization/internalversion/expansion_generated.go index 8a9e1ad7..7fe2ebc7 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/authorization/internalversion/expansion_generated.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/authorization/internalversion/expansion_generated.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package internalversion diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/authorization/internalversion/localsubjectaccessreview.go b/vendor/k8s.io/kubernetes/pkg/client/listers/authorization/internalversion/localsubjectaccessreview.go index 6359aa85..8ef9158d 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/authorization/internalversion/localsubjectaccessreview.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/authorization/internalversion/localsubjectaccessreview.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package internalversion diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/authorization/internalversion/selfsubjectaccessreview.go b/vendor/k8s.io/kubernetes/pkg/client/listers/authorization/internalversion/selfsubjectaccessreview.go index 6164abde..1a7ebbe3 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/authorization/internalversion/selfsubjectaccessreview.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/authorization/internalversion/selfsubjectaccessreview.go @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package internalversion import ( "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" - api "k8s.io/kubernetes/pkg/api" authorization "k8s.io/kubernetes/pkg/apis/authorization" "k8s.io/kubernetes/pkg/client/cache" ) @@ -55,7 +55,7 @@ func (s *selfSubjectAccessReviewLister) List(selector labels.Selector) (ret []*a // Get retrieves the SelfSubjectAccessReview from the index for a given name. func (s *selfSubjectAccessReviewLister) Get(name string) (*authorization.SelfSubjectAccessReview, error) { - key := &authorization.SelfSubjectAccessReview{ObjectMeta: api.ObjectMeta{Name: name}} + key := &authorization.SelfSubjectAccessReview{ObjectMeta: v1.ObjectMeta{Name: name}} obj, exists, err := s.indexer.Get(key) if err != nil { return nil, err diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/authorization/internalversion/subjectaccessreview.go b/vendor/k8s.io/kubernetes/pkg/client/listers/authorization/internalversion/subjectaccessreview.go index d775a95c..5aee5794 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/authorization/internalversion/subjectaccessreview.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/authorization/internalversion/subjectaccessreview.go @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package internalversion import ( "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" - api "k8s.io/kubernetes/pkg/api" authorization "k8s.io/kubernetes/pkg/apis/authorization" "k8s.io/kubernetes/pkg/client/cache" ) @@ -55,7 +55,7 @@ func (s *subjectAccessReviewLister) List(selector labels.Selector) (ret []*autho // Get retrieves the SubjectAccessReview from the index for a given name. func (s *subjectAccessReviewLister) Get(name string) (*authorization.SubjectAccessReview, error) { - key := &authorization.SubjectAccessReview{ObjectMeta: api.ObjectMeta{Name: name}} + key := &authorization.SubjectAccessReview{ObjectMeta: v1.ObjectMeta{Name: name}} obj, exists, err := s.indexer.Get(key) if err != nil { return nil, err diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/authorization/v1beta1/BUILD b/vendor/k8s.io/kubernetes/pkg/client/listers/authorization/v1beta1/BUILD index 7d8c2c53..8bfaee5f 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/authorization/v1beta1/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/authorization/v1beta1/BUILD @@ -17,11 +17,11 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api/v1:go_default_library", "//pkg/apis/authorization:go_default_library", "//pkg/apis/authorization/v1beta1:go_default_library", "//pkg/client/cache:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/authorization/v1beta1/expansion_generated.go b/vendor/k8s.io/kubernetes/pkg/client/listers/authorization/v1beta1/expansion_generated.go index fdafc48a..50c0d71a 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/authorization/v1beta1/expansion_generated.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/authorization/v1beta1/expansion_generated.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package v1beta1 diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/authorization/v1beta1/localsubjectaccessreview.go b/vendor/k8s.io/kubernetes/pkg/client/listers/authorization/v1beta1/localsubjectaccessreview.go index 0571b404..a39ad285 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/authorization/v1beta1/localsubjectaccessreview.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/authorization/v1beta1/localsubjectaccessreview.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package v1beta1 diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/authorization/v1beta1/selfsubjectaccessreview.go b/vendor/k8s.io/kubernetes/pkg/client/listers/authorization/v1beta1/selfsubjectaccessreview.go index 6467f9c6..1c8d9df1 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/authorization/v1beta1/selfsubjectaccessreview.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/authorization/v1beta1/selfsubjectaccessreview.go @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package v1beta1 import ( "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" - v1 "k8s.io/kubernetes/pkg/api/v1" authorization "k8s.io/kubernetes/pkg/apis/authorization" v1beta1 "k8s.io/kubernetes/pkg/apis/authorization/v1beta1" "k8s.io/kubernetes/pkg/client/cache" diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/authorization/v1beta1/subjectaccessreview.go b/vendor/k8s.io/kubernetes/pkg/client/listers/authorization/v1beta1/subjectaccessreview.go index da532b85..4595b4e2 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/authorization/v1beta1/subjectaccessreview.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/authorization/v1beta1/subjectaccessreview.go @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package v1beta1 import ( "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" - v1 "k8s.io/kubernetes/pkg/api/v1" authorization "k8s.io/kubernetes/pkg/apis/authorization" v1beta1 "k8s.io/kubernetes/pkg/apis/authorization/v1beta1" "k8s.io/kubernetes/pkg/client/cache" diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/autoscaling/internalversion/expansion_generated.go b/vendor/k8s.io/kubernetes/pkg/client/listers/autoscaling/internalversion/expansion_generated.go index f265aa99..e1d5c0fd 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/autoscaling/internalversion/expansion_generated.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/autoscaling/internalversion/expansion_generated.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package internalversion diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/autoscaling/internalversion/horizontalpodautoscaler.go b/vendor/k8s.io/kubernetes/pkg/client/listers/autoscaling/internalversion/horizontalpodautoscaler.go index b6bc0850..8d39d0ad 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/autoscaling/internalversion/horizontalpodautoscaler.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/autoscaling/internalversion/horizontalpodautoscaler.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package internalversion diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/autoscaling/v1/expansion_generated.go b/vendor/k8s.io/kubernetes/pkg/client/listers/autoscaling/v1/expansion_generated.go index 6eebb648..a16a96be 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/autoscaling/v1/expansion_generated.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/autoscaling/v1/expansion_generated.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package v1 diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/autoscaling/v1/horizontalpodautoscaler.go b/vendor/k8s.io/kubernetes/pkg/client/listers/autoscaling/v1/horizontalpodautoscaler.go index 3461685c..146d314d 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/autoscaling/v1/horizontalpodautoscaler.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/autoscaling/v1/horizontalpodautoscaler.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package v1 diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/batch/internalversion/cronjob.go b/vendor/k8s.io/kubernetes/pkg/client/listers/batch/internalversion/cronjob.go index 65b1aad6..10c989a8 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/batch/internalversion/cronjob.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/batch/internalversion/cronjob.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package internalversion diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/batch/internalversion/expansion_generated.go b/vendor/k8s.io/kubernetes/pkg/client/listers/batch/internalversion/expansion_generated.go index 8add37e1..538db6e5 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/batch/internalversion/expansion_generated.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/batch/internalversion/expansion_generated.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package internalversion diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/batch/internalversion/job.go b/vendor/k8s.io/kubernetes/pkg/client/listers/batch/internalversion/job.go index f072b7e8..0ce474da 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/batch/internalversion/job.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/batch/internalversion/job.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package internalversion diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/batch/internalversion/job_test.go b/vendor/k8s.io/kubernetes/pkg/client/listers/batch/internalversion/job_test.go index 722fd200..8fef7438 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/batch/internalversion/job_test.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/batch/internalversion/job_test.go @@ -40,7 +40,7 @@ func TestJobLister(t *testing.T) { // Basic listing { inJobs: []*batch.Job{ - {ObjectMeta: api.ObjectMeta{Name: "basic"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "basic"}}, }, list: func() ([]*batch.Job, error) { list, err := lister.List(labels.Everything()) @@ -52,9 +52,9 @@ func TestJobLister(t *testing.T) { // Listing multiple jobs { inJobs: []*batch.Job{ - {ObjectMeta: api.ObjectMeta{Name: "basic"}}, - {ObjectMeta: api.ObjectMeta{Name: "complex"}}, - {ObjectMeta: api.ObjectMeta{Name: "complex2"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "basic"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "complex"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "complex2"}}, }, list: func() ([]*batch.Job, error) { list, err := lister.List(labels.Everything()) @@ -67,7 +67,7 @@ func TestJobLister(t *testing.T) { { inJobs: []*batch.Job{ { - ObjectMeta: api.ObjectMeta{Name: "basic", Namespace: "ns"}, + ObjectMeta: metav1.ObjectMeta{Name: "basic", Namespace: "ns"}, Spec: batch.JobSpec{ Selector: &metav1.LabelSelector{ MatchLabels: map[string]string{"foo": "baz"}, @@ -77,7 +77,7 @@ func TestJobLister(t *testing.T) { }, list: func() ([]*batch.Job, error) { pod := &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "pod", Namespace: "ns"}, + ObjectMeta: metav1.ObjectMeta{Name: "pod", Namespace: "ns"}, } podJobs, err := lister.GetPodJobs(pod) jobs := make([]*batch.Job, 0, len(podJobs)) @@ -94,12 +94,12 @@ func TestJobLister(t *testing.T) { { inJobs: []*batch.Job{ { - ObjectMeta: api.ObjectMeta{Name: "basic", Namespace: "ns"}, + ObjectMeta: metav1.ObjectMeta{Name: "basic", Namespace: "ns"}, }, }, list: func() ([]*batch.Job, error) { pod := &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod", Namespace: "ns", Labels: map[string]string{"foo": "bar"}, @@ -120,7 +120,7 @@ func TestJobLister(t *testing.T) { { inJobs: []*batch.Job{ { - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: batch.JobSpec{ Selector: &metav1.LabelSelector{ MatchLabels: map[string]string{"foo": "bar"}, @@ -128,7 +128,7 @@ func TestJobLister(t *testing.T) { }, }, { - ObjectMeta: api.ObjectMeta{Name: "bar", Namespace: "ns"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar", Namespace: "ns"}, Spec: batch.JobSpec{ Selector: &metav1.LabelSelector{ MatchLabels: map[string]string{"foo": "bar"}, @@ -138,7 +138,7 @@ func TestJobLister(t *testing.T) { }, list: func() ([]*batch.Job, error) { pod := &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod", Labels: map[string]string{"foo": "bar"}, Namespace: "ns", @@ -158,7 +158,7 @@ func TestJobLister(t *testing.T) { { inJobs: []*batch.Job{ { - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "foo"}, Spec: batch.JobSpec{ Selector: &metav1.LabelSelector{ MatchLabels: map[string]string{"foo": "bar"}, @@ -166,7 +166,7 @@ func TestJobLister(t *testing.T) { }, }, { - ObjectMeta: api.ObjectMeta{Name: "bar", Namespace: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar", Namespace: "bar"}, Spec: batch.JobSpec{ Selector: &metav1.LabelSelector{ MatchLabels: map[string]string{"foo": "bar"}, @@ -176,7 +176,7 @@ func TestJobLister(t *testing.T) { }, list: func() ([]*batch.Job, error) { pod := &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod", Labels: map[string]string{"foo": "bar"}, Namespace: "baz", diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/batch/v1/expansion_generated.go b/vendor/k8s.io/kubernetes/pkg/client/listers/batch/v1/expansion_generated.go index f2ff26ee..055dbb88 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/batch/v1/expansion_generated.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/batch/v1/expansion_generated.go @@ -14,6 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package v1 diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/batch/v1/job.go b/vendor/k8s.io/kubernetes/pkg/client/listers/batch/v1/job.go index 6efcafae..48fe059f 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/batch/v1/job.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/batch/v1/job.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package v1 diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/batch/v2alpha1/cronjob.go b/vendor/k8s.io/kubernetes/pkg/client/listers/batch/v2alpha1/cronjob.go index 9ee0c737..24efa21b 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/batch/v2alpha1/cronjob.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/batch/v2alpha1/cronjob.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package v2alpha1 diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/batch/v2alpha1/expansion_generated.go b/vendor/k8s.io/kubernetes/pkg/client/listers/batch/v2alpha1/expansion_generated.go index 3918c98d..3aef07e9 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/batch/v2alpha1/expansion_generated.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/batch/v2alpha1/expansion_generated.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package v2alpha1 diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/batch/v2alpha1/job.go b/vendor/k8s.io/kubernetes/pkg/client/listers/batch/v2alpha1/job.go index c64adaca..a90a6fd9 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/batch/v2alpha1/job.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/batch/v2alpha1/job.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package v2alpha1 diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/certificates/internalversion/BUILD b/vendor/k8s.io/kubernetes/pkg/client/listers/certificates/internalversion/BUILD index ee04747b..d407af8c 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/certificates/internalversion/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/certificates/internalversion/BUILD @@ -15,10 +15,10 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//pkg/apis/certificates:go_default_library", "//pkg/client/cache:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/certificates/internalversion/certificatesigningrequest.go b/vendor/k8s.io/kubernetes/pkg/client/listers/certificates/internalversion/certificatesigningrequest.go index ff15ea4d..4ea01760 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/certificates/internalversion/certificatesigningrequest.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/certificates/internalversion/certificatesigningrequest.go @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package internalversion import ( "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" - api "k8s.io/kubernetes/pkg/api" certificates "k8s.io/kubernetes/pkg/apis/certificates" "k8s.io/kubernetes/pkg/client/cache" ) @@ -55,7 +55,7 @@ func (s *certificateSigningRequestLister) List(selector labels.Selector) (ret [] // Get retrieves the CertificateSigningRequest from the index for a given name. func (s *certificateSigningRequestLister) Get(name string) (*certificates.CertificateSigningRequest, error) { - key := &certificates.CertificateSigningRequest{ObjectMeta: api.ObjectMeta{Name: name}} + key := &certificates.CertificateSigningRequest{ObjectMeta: v1.ObjectMeta{Name: name}} obj, exists, err := s.indexer.Get(key) if err != nil { return nil, err diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/certificates/internalversion/expansion_generated.go b/vendor/k8s.io/kubernetes/pkg/client/listers/certificates/internalversion/expansion_generated.go index 902f1159..582ba7e6 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/certificates/internalversion/expansion_generated.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/certificates/internalversion/expansion_generated.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package internalversion diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/certificates/v1alpha1/BUILD b/vendor/k8s.io/kubernetes/pkg/client/listers/certificates/v1beta1/BUILD similarity index 86% rename from vendor/k8s.io/kubernetes/pkg/client/listers/certificates/v1alpha1/BUILD rename to vendor/k8s.io/kubernetes/pkg/client/listers/certificates/v1beta1/BUILD index 8a914cd1..dcde1487 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/certificates/v1alpha1/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/certificates/v1beta1/BUILD @@ -15,11 +15,11 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api/v1:go_default_library", "//pkg/apis/certificates:go_default_library", - "//pkg/apis/certificates/v1alpha1:go_default_library", + "//pkg/apis/certificates/v1beta1:go_default_library", "//pkg/client/cache:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/certificates/v1alpha1/certificatesigningrequest.go b/vendor/k8s.io/kubernetes/pkg/client/listers/certificates/v1beta1/certificatesigningrequest.go similarity index 69% rename from vendor/k8s.io/kubernetes/pkg/client/listers/certificates/v1alpha1/certificatesigningrequest.go rename to vendor/k8s.io/kubernetes/pkg/client/listers/certificates/v1beta1/certificatesigningrequest.go index 5b4f511b..67fb70e2 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/certificates/v1alpha1/certificatesigningrequest.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/certificates/v1beta1/certificatesigningrequest.go @@ -14,25 +14,25 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] -package v1alpha1 +package v1beta1 import ( "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" - v1 "k8s.io/kubernetes/pkg/api/v1" certificates "k8s.io/kubernetes/pkg/apis/certificates" - v1alpha1 "k8s.io/kubernetes/pkg/apis/certificates/v1alpha1" + v1beta1 "k8s.io/kubernetes/pkg/apis/certificates/v1beta1" "k8s.io/kubernetes/pkg/client/cache" ) // CertificateSigningRequestLister helps list CertificateSigningRequests. type CertificateSigningRequestLister interface { // List lists all CertificateSigningRequests in the indexer. - List(selector labels.Selector) (ret []*v1alpha1.CertificateSigningRequest, err error) + List(selector labels.Selector) (ret []*v1beta1.CertificateSigningRequest, err error) // Get retrieves the CertificateSigningRequest from the index for a given name. - Get(name string) (*v1alpha1.CertificateSigningRequest, error) + Get(name string) (*v1beta1.CertificateSigningRequest, error) CertificateSigningRequestListerExpansion } @@ -47,16 +47,16 @@ func NewCertificateSigningRequestLister(indexer cache.Indexer) CertificateSignin } // List lists all CertificateSigningRequests in the indexer. -func (s *certificateSigningRequestLister) List(selector labels.Selector) (ret []*v1alpha1.CertificateSigningRequest, err error) { +func (s *certificateSigningRequestLister) List(selector labels.Selector) (ret []*v1beta1.CertificateSigningRequest, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.CertificateSigningRequest)) + ret = append(ret, m.(*v1beta1.CertificateSigningRequest)) }) return ret, err } // Get retrieves the CertificateSigningRequest from the index for a given name. -func (s *certificateSigningRequestLister) Get(name string) (*v1alpha1.CertificateSigningRequest, error) { - key := &v1alpha1.CertificateSigningRequest{ObjectMeta: v1.ObjectMeta{Name: name}} +func (s *certificateSigningRequestLister) Get(name string) (*v1beta1.CertificateSigningRequest, error) { + key := &v1beta1.CertificateSigningRequest{ObjectMeta: v1.ObjectMeta{Name: name}} obj, exists, err := s.indexer.Get(key) if err != nil { return nil, err @@ -64,5 +64,5 @@ func (s *certificateSigningRequestLister) Get(name string) (*v1alpha1.Certificat if !exists { return nil, errors.NewNotFound(certificates.Resource("certificatesigningrequest"), name) } - return obj.(*v1alpha1.CertificateSigningRequest), nil + return obj.(*v1beta1.CertificateSigningRequest), nil } diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/certificates/v1alpha1/expansion_generated.go b/vendor/k8s.io/kubernetes/pkg/client/listers/certificates/v1beta1/expansion_generated.go similarity index 71% rename from vendor/k8s.io/kubernetes/pkg/client/listers/certificates/v1alpha1/expansion_generated.go rename to vendor/k8s.io/kubernetes/pkg/client/listers/certificates/v1beta1/expansion_generated.go index 552c7840..5cfb6031 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/certificates/v1alpha1/expansion_generated.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/certificates/v1beta1/expansion_generated.go @@ -14,9 +14,9 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] -package v1alpha1 +package v1beta1 // CertificateSigningRequestListerExpansion allows custom methods to be added to // CertificateSigningRequestLister. diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/BUILD b/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/BUILD index c4266fe6..a48ad466 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/BUILD @@ -18,14 +18,17 @@ go_library( "limitrange.go", "namespace.go", "node.go", + "node_expansion.go", "persistentvolume.go", "persistentvolumeclaim.go", "pod.go", "podtemplate.go", "replicationcontroller.go", + "replicationcontroller_expansion.go", "resourcequota.go", "secret.go", "service.go", + "service_expansion.go", "serviceaccount.go", ], tags = ["automanaged"], @@ -33,6 +36,7 @@ go_library( "//pkg/api:go_default_library", "//pkg/client/cache:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/componentstatus.go b/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/componentstatus.go index 43432d53..73e3c088 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/componentstatus.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/componentstatus.go @@ -14,12 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package internalversion import ( "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" api "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/cache" @@ -54,7 +55,7 @@ func (s *componentStatusLister) List(selector labels.Selector) (ret []*api.Compo // Get retrieves the ComponentStatus from the index for a given name. func (s *componentStatusLister) Get(name string) (*api.ComponentStatus, error) { - key := &api.ComponentStatus{ObjectMeta: api.ObjectMeta{Name: name}} + key := &api.ComponentStatus{ObjectMeta: v1.ObjectMeta{Name: name}} obj, exists, err := s.indexer.Get(key) if err != nil { return nil, err diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/configmap.go b/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/configmap.go index e4e29a96..6437871b 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/configmap.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/configmap.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package internalversion diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/endpoints.go b/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/endpoints.go index cc74b838..3e86cbf2 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/endpoints.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/endpoints.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package internalversion diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/event.go b/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/event.go index b5e0a6fc..182a5938 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/event.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/event.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package internalversion diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/expansion_generated.go b/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/expansion_generated.go index c8758b28..188f3dc8 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/expansion_generated.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/expansion_generated.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package internalversion @@ -58,10 +58,6 @@ type LimitRangeNamespaceListerExpansion interface{} // NamespaceLister. type NamespaceListerExpansion interface{} -// NodeListerExpansion allows custom methods to be added to -// NodeLister. -type NodeListerExpansion interface{} - // PersistentVolumeListerExpansion allows custom methods to be added to // PersistentVolumeLister. type PersistentVolumeListerExpansion interface{} @@ -90,14 +86,6 @@ type PodTemplateListerExpansion interface{} // PodTemplateNamespaeLister. type PodTemplateNamespaceListerExpansion interface{} -// ReplicationControllerListerExpansion allows custom methods to be added to -// ReplicationControllerLister. -type ReplicationControllerListerExpansion interface{} - -// ReplicationControllerNamespaceListerExpansion allows custom methods to be added to -// ReplicationControllerNamespaeLister. -type ReplicationControllerNamespaceListerExpansion interface{} - // ResourceQuotaListerExpansion allows custom methods to be added to // ResourceQuotaLister. type ResourceQuotaListerExpansion interface{} @@ -114,14 +102,6 @@ type SecretListerExpansion interface{} // SecretNamespaeLister. type SecretNamespaceListerExpansion interface{} -// ServiceListerExpansion allows custom methods to be added to -// ServiceLister. -type ServiceListerExpansion interface{} - -// ServiceNamespaceListerExpansion allows custom methods to be added to -// ServiceNamespaeLister. -type ServiceNamespaceListerExpansion interface{} - // ServiceAccountListerExpansion allows custom methods to be added to // ServiceAccountLister. type ServiceAccountListerExpansion interface{} diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/limitrange.go b/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/limitrange.go index 8e15dfd9..acf0a860 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/limitrange.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/limitrange.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package internalversion diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/namespace.go b/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/namespace.go index 8048f86e..ba195582 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/namespace.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/namespace.go @@ -14,12 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package internalversion import ( "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" api "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/cache" @@ -54,7 +55,7 @@ func (s *namespaceLister) List(selector labels.Selector) (ret []*api.Namespace, // Get retrieves the Namespace from the index for a given name. func (s *namespaceLister) Get(name string) (*api.Namespace, error) { - key := &api.Namespace{ObjectMeta: api.ObjectMeta{Name: name}} + key := &api.Namespace{ObjectMeta: v1.ObjectMeta{Name: name}} obj, exists, err := s.indexer.Get(key) if err != nil { return nil, err diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/node.go b/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/node.go index 5b90f8cf..274bcf4f 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/node.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/node.go @@ -14,12 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package internalversion import ( "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" api "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/cache" @@ -54,7 +55,7 @@ func (s *nodeLister) List(selector labels.Selector) (ret []*api.Node, err error) // Get retrieves the Node from the index for a given name. func (s *nodeLister) Get(name string) (*api.Node, error) { - key := &api.Node{ObjectMeta: api.ObjectMeta{Name: name}} + key := &api.Node{ObjectMeta: v1.ObjectMeta{Name: name}} obj, exists, err := s.indexer.Get(key) if err != nil { return nil, err diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/node_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/node_expansion.go new file mode 100644 index 00000000..465c59e3 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/node_expansion.go @@ -0,0 +1,48 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package internalversion + +import ( + "k8s.io/apimachinery/pkg/labels" + "k8s.io/kubernetes/pkg/api" +) + +// NodeConditionPredicate is a function that indicates whether the given node's conditions meet +// some set of criteria defined by the function. +type NodeConditionPredicate func(node *api.Node) bool + +// NodeListerExpansion allows custom methods to be added to +// NodeLister. +type NodeListerExpansion interface { + ListWithPredicate(predicate NodeConditionPredicate) ([]*api.Node, error) +} + +func (l *nodeLister) ListWithPredicate(predicate NodeConditionPredicate) ([]*api.Node, error) { + nodes, err := l.List(labels.Everything()) + if err != nil { + return nil, err + } + + var filtered []*api.Node + for i := range nodes { + if predicate(nodes[i]) { + filtered = append(filtered, nodes[i]) + } + } + + return filtered, nil +} diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/persistentvolume.go b/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/persistentvolume.go index 6bf96ae7..99b6e3d4 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/persistentvolume.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/persistentvolume.go @@ -14,12 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package internalversion import ( "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" api "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/cache" @@ -54,7 +55,7 @@ func (s *persistentVolumeLister) List(selector labels.Selector) (ret []*api.Pers // Get retrieves the PersistentVolume from the index for a given name. func (s *persistentVolumeLister) Get(name string) (*api.PersistentVolume, error) { - key := &api.PersistentVolume{ObjectMeta: api.ObjectMeta{Name: name}} + key := &api.PersistentVolume{ObjectMeta: v1.ObjectMeta{Name: name}} obj, exists, err := s.indexer.Get(key) if err != nil { return nil, err diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/persistentvolumeclaim.go b/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/persistentvolumeclaim.go index b73bc593..8832b16f 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/persistentvolumeclaim.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/persistentvolumeclaim.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package internalversion diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/pod.go b/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/pod.go index 9f484c53..47529938 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/pod.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/pod.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package internalversion diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/podtemplate.go b/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/podtemplate.go index b098ba59..d9b1a177 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/podtemplate.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/podtemplate.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package internalversion diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/replicationcontroller.go b/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/replicationcontroller.go index 5e930e9c..30a66371 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/replicationcontroller.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/replicationcontroller.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package internalversion diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/replicationcontroller_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/replicationcontroller_expansion.go new file mode 100644 index 00000000..e9070bd5 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/replicationcontroller_expansion.go @@ -0,0 +1,64 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package internalversion + +import ( + "fmt" + + "k8s.io/apimachinery/pkg/labels" + "k8s.io/kubernetes/pkg/api" +) + +// ReplicationControllerListerExpansion allows custom methods to be added to +// ReplicationControllerLister. +type ReplicationControllerListerExpansion interface { + GetPodControllers(pod *api.Pod) ([]*api.ReplicationController, error) +} + +// ReplicationControllerNamespaceListerExpansion allows custom methods to be added to +// ReplicationControllerNamespaeLister. +type ReplicationControllerNamespaceListerExpansion interface{} + +// GetPodControllers returns a list of replication controllers managing a pod. Returns an error only if no matching controllers are found. +func (s *replicationControllerLister) GetPodControllers(pod *api.Pod) ([]*api.ReplicationController, error) { + if len(pod.Labels) == 0 { + return nil, fmt.Errorf("no controllers found for pod %v because it has no labels", pod.Name) + } + + items, err := s.ReplicationControllers(pod.Namespace).List(labels.Everything()) + if err != nil { + return nil, err + } + + var controllers []*api.ReplicationController + for i := range items { + rc := items[i] + selector := labels.Set(rc.Spec.Selector).AsSelectorPreValidated() + + // If an rc with a nil or empty selector creeps in, it should match nothing, not everything. + if selector.Empty() || !selector.Matches(labels.Set(pod.Labels)) { + continue + } + controllers = append(controllers, rc) + } + + if len(controllers) == 0 { + return nil, fmt.Errorf("could not find controller for pod %s in namespace %s with labels: %v", pod.Name, pod.Namespace, pod.Labels) + } + + return controllers, nil +} diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/resourcequota.go b/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/resourcequota.go index 23e46100..baf5e3e5 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/resourcequota.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/resourcequota.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package internalversion diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/secret.go b/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/secret.go index 9739436e..bc4240b4 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/secret.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/secret.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package internalversion diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/service.go b/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/service.go index c5f129da..391c4149 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/service.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/service.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package internalversion diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/service_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/service_expansion.go new file mode 100644 index 00000000..a1282471 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/service_expansion.go @@ -0,0 +1,56 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package internalversion + +import ( + "k8s.io/apimachinery/pkg/labels" + "k8s.io/kubernetes/pkg/api" +) + +// ServiceListerExpansion allows custom methods to be added to +// ServiceLister. +type ServiceListerExpansion interface { + GetPodServices(pod *api.Pod) ([]*api.Service, error) +} + +// ServiceNamespaceListerExpansion allows custom methods to be added to +// ServiceNamespaeLister. +type ServiceNamespaceListerExpansion interface{} + +// TODO: Move this back to scheduler as a helper function that takes a Store, +// rather than a method of ServiceLister. +func (s *serviceLister) GetPodServices(pod *api.Pod) ([]*api.Service, error) { + allServices, err := s.Services(pod.Namespace).List(labels.Everything()) + if err != nil { + return nil, err + } + + var services []*api.Service + for i := range allServices { + service := allServices[i] + if service.Spec.Selector == nil { + // services with nil selectors match nothing, not everything. + continue + } + selector := labels.Set(service.Spec.Selector).AsSelectorPreValidated() + if selector.Matches(labels.Set(pod.Labels)) { + services = append(services, service) + } + } + + return services, nil +} diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/serviceaccount.go b/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/serviceaccount.go index 15e49342..2e17785d 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/serviceaccount.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/core/internalversion/serviceaccount.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package internalversion diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/BUILD b/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/BUILD index 6b966e8b..ca069605 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/BUILD @@ -18,14 +18,17 @@ go_library( "limitrange.go", "namespace.go", "node.go", + "node_expansion.go", "persistentvolume.go", "persistentvolumeclaim.go", "pod.go", "podtemplate.go", "replicationcontroller.go", + "replicationcontroller_expansion.go", "resourcequota.go", "secret.go", "service.go", + "service_expansion.go", "serviceaccount.go", ], tags = ["automanaged"], @@ -34,6 +37,7 @@ go_library( "//pkg/api/v1:go_default_library", "//pkg/client/cache:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/componentstatus.go b/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/componentstatus.go index 87373fd6..84ba9c22 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/componentstatus.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/componentstatus.go @@ -14,12 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package v1 import ( "k8s.io/apimachinery/pkg/api/errors" + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" @@ -55,7 +56,7 @@ func (s *componentStatusLister) List(selector labels.Selector) (ret []*v1.Compon // Get retrieves the ComponentStatus from the index for a given name. func (s *componentStatusLister) Get(name string) (*v1.ComponentStatus, error) { - key := &v1.ComponentStatus{ObjectMeta: v1.ObjectMeta{Name: name}} + key := &v1.ComponentStatus{ObjectMeta: meta_v1.ObjectMeta{Name: name}} obj, exists, err := s.indexer.Get(key) if err != nil { return nil, err diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/configmap.go b/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/configmap.go index 01fad8ed..1adf9391 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/configmap.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/configmap.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package v1 diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/endpoints.go b/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/endpoints.go index e589ecf2..4f72ccb0 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/endpoints.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/endpoints.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package v1 diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/event.go b/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/event.go index 9e696d57..bb242375 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/event.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/event.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package v1 diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/expansion_generated.go b/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/expansion_generated.go index 092d3fa0..f2eba834 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/expansion_generated.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/expansion_generated.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package v1 @@ -58,10 +58,6 @@ type LimitRangeNamespaceListerExpansion interface{} // NamespaceLister. type NamespaceListerExpansion interface{} -// NodeListerExpansion allows custom methods to be added to -// NodeLister. -type NodeListerExpansion interface{} - // PersistentVolumeListerExpansion allows custom methods to be added to // PersistentVolumeLister. type PersistentVolumeListerExpansion interface{} @@ -90,14 +86,6 @@ type PodTemplateListerExpansion interface{} // PodTemplateNamespaeLister. type PodTemplateNamespaceListerExpansion interface{} -// ReplicationControllerListerExpansion allows custom methods to be added to -// ReplicationControllerLister. -type ReplicationControllerListerExpansion interface{} - -// ReplicationControllerNamespaceListerExpansion allows custom methods to be added to -// ReplicationControllerNamespaeLister. -type ReplicationControllerNamespaceListerExpansion interface{} - // ResourceQuotaListerExpansion allows custom methods to be added to // ResourceQuotaLister. type ResourceQuotaListerExpansion interface{} @@ -114,14 +102,6 @@ type SecretListerExpansion interface{} // SecretNamespaeLister. type SecretNamespaceListerExpansion interface{} -// ServiceListerExpansion allows custom methods to be added to -// ServiceLister. -type ServiceListerExpansion interface{} - -// ServiceNamespaceListerExpansion allows custom methods to be added to -// ServiceNamespaeLister. -type ServiceNamespaceListerExpansion interface{} - // ServiceAccountListerExpansion allows custom methods to be added to // ServiceAccountLister. type ServiceAccountListerExpansion interface{} diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/limitrange.go b/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/limitrange.go index 00c18218..7815fd8f 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/limitrange.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/limitrange.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package v1 diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/namespace.go b/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/namespace.go index ad41097c..9aa43882 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/namespace.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/namespace.go @@ -14,12 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package v1 import ( "k8s.io/apimachinery/pkg/api/errors" + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" @@ -55,7 +56,7 @@ func (s *namespaceLister) List(selector labels.Selector) (ret []*v1.Namespace, e // Get retrieves the Namespace from the index for a given name. func (s *namespaceLister) Get(name string) (*v1.Namespace, error) { - key := &v1.Namespace{ObjectMeta: v1.ObjectMeta{Name: name}} + key := &v1.Namespace{ObjectMeta: meta_v1.ObjectMeta{Name: name}} obj, exists, err := s.indexer.Get(key) if err != nil { return nil, err diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/node.go b/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/node.go index da237c07..bfda357a 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/node.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/node.go @@ -14,12 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package v1 import ( "k8s.io/apimachinery/pkg/api/errors" + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" @@ -55,7 +56,7 @@ func (s *nodeLister) List(selector labels.Selector) (ret []*v1.Node, err error) // Get retrieves the Node from the index for a given name. func (s *nodeLister) Get(name string) (*v1.Node, error) { - key := &v1.Node{ObjectMeta: v1.ObjectMeta{Name: name}} + key := &v1.Node{ObjectMeta: meta_v1.ObjectMeta{Name: name}} obj, exists, err := s.indexer.Get(key) if err != nil { return nil, err diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/node_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/node_expansion.go new file mode 100644 index 00000000..be1ac843 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/node_expansion.go @@ -0,0 +1,48 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + "k8s.io/apimachinery/pkg/labels" + "k8s.io/kubernetes/pkg/api/v1" +) + +// NodeConditionPredicate is a function that indicates whether the given node's conditions meet +// some set of criteria defined by the function. +type NodeConditionPredicate func(node *v1.Node) bool + +// NodeListerExpansion allows custom methods to be added to +// NodeLister. +type NodeListerExpansion interface { + ListWithPredicate(predicate NodeConditionPredicate) ([]*v1.Node, error) +} + +func (l *nodeLister) ListWithPredicate(predicate NodeConditionPredicate) ([]*v1.Node, error) { + nodes, err := l.List(labels.Everything()) + if err != nil { + return nil, err + } + + var filtered []*v1.Node + for i := range nodes { + if predicate(nodes[i]) { + filtered = append(filtered, nodes[i]) + } + } + + return filtered, nil +} diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/persistentvolume.go b/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/persistentvolume.go index 4cabb73d..086b2828 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/persistentvolume.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/persistentvolume.go @@ -14,12 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package v1 import ( "k8s.io/apimachinery/pkg/api/errors" + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" api "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" @@ -55,7 +56,7 @@ func (s *persistentVolumeLister) List(selector labels.Selector) (ret []*v1.Persi // Get retrieves the PersistentVolume from the index for a given name. func (s *persistentVolumeLister) Get(name string) (*v1.PersistentVolume, error) { - key := &v1.PersistentVolume{ObjectMeta: v1.ObjectMeta{Name: name}} + key := &v1.PersistentVolume{ObjectMeta: meta_v1.ObjectMeta{Name: name}} obj, exists, err := s.indexer.Get(key) if err != nil { return nil, err diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/persistentvolumeclaim.go b/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/persistentvolumeclaim.go index c332619a..8fa586b3 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/persistentvolumeclaim.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/persistentvolumeclaim.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package v1 diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/pod.go b/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/pod.go index 054227da..2c7f25b0 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/pod.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/pod.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package v1 diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/podtemplate.go b/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/podtemplate.go index b4c433b7..3d9ab7a6 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/podtemplate.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/podtemplate.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package v1 diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/replicationcontroller.go b/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/replicationcontroller.go index c97411b7..8bc8899a 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/replicationcontroller.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/replicationcontroller.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package v1 diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/replicationcontroller_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/replicationcontroller_expansion.go new file mode 100644 index 00000000..aa5202d5 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/replicationcontroller_expansion.go @@ -0,0 +1,64 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + "fmt" + + "k8s.io/apimachinery/pkg/labels" + "k8s.io/kubernetes/pkg/api/v1" +) + +// ReplicationControllerListerExpansion allows custom methods to be added to +// ReplicationControllerLister. +type ReplicationControllerListerExpansion interface { + GetPodControllers(pod *v1.Pod) ([]*v1.ReplicationController, error) +} + +// ReplicationControllerNamespaceListerExpansion allows custom methods to be added to +// ReplicationControllerNamespaeLister. +type ReplicationControllerNamespaceListerExpansion interface{} + +// GetPodControllers returns a list of replication controllers managing a pod. Returns an error only if no matching controllers are found. +func (s *replicationControllerLister) GetPodControllers(pod *v1.Pod) ([]*v1.ReplicationController, error) { + if len(pod.Labels) == 0 { + return nil, fmt.Errorf("no controllers found for pod %v because it has no labels", pod.Name) + } + + items, err := s.ReplicationControllers(pod.Namespace).List(labels.Everything()) + if err != nil { + return nil, err + } + + var controllers []*v1.ReplicationController + for i := range items { + rc := items[i] + selector := labels.Set(rc.Spec.Selector).AsSelectorPreValidated() + + // If an rc with a nil or empty selector creeps in, it should match nothing, not everything. + if selector.Empty() || !selector.Matches(labels.Set(pod.Labels)) { + continue + } + controllers = append(controllers, rc) + } + + if len(controllers) == 0 { + return nil, fmt.Errorf("could not find controller for pod %s in namespace %s with labels: %v", pod.Name, pod.Namespace, pod.Labels) + } + + return controllers, nil +} diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/resourcequota.go b/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/resourcequota.go index c8452fb9..e29e080a 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/resourcequota.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/resourcequota.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package v1 diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/secret.go b/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/secret.go index bfe3dac9..a7761bb0 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/secret.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/secret.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package v1 diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/service.go b/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/service.go index 9fbe8bc6..f4ca703c 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/service.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/service.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package v1 diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/service_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/service_expansion.go new file mode 100644 index 00000000..2f04b488 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/service_expansion.go @@ -0,0 +1,56 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + "k8s.io/apimachinery/pkg/labels" + "k8s.io/kubernetes/pkg/api/v1" +) + +// ServiceListerExpansion allows custom methods to be added to +// ServiceLister. +type ServiceListerExpansion interface { + GetPodServices(pod *v1.Pod) ([]*v1.Service, error) +} + +// ServiceNamespaceListerExpansion allows custom methods to be added to +// ServiceNamespaeLister. +type ServiceNamespaceListerExpansion interface{} + +// TODO: Move this back to scheduler as a helper function that takes a Store, +// rather than a method of ServiceLister. +func (s *serviceLister) GetPodServices(pod *v1.Pod) ([]*v1.Service, error) { + allServices, err := s.Services(pod.Namespace).List(labels.Everything()) + if err != nil { + return nil, err + } + + var services []*v1.Service + for i := range allServices { + service := allServices[i] + if service.Spec.Selector == nil { + // services with nil selectors match nothing, not everything. + continue + } + selector := labels.Set(service.Spec.Selector).AsSelectorPreValidated() + if selector.Matches(labels.Set(pod.Labels)) { + services = append(services, service) + } + } + + return services, nil +} diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/serviceaccount.go b/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/serviceaccount.go index dacb7272..8dfea813 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/serviceaccount.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/core/v1/serviceaccount.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package v1 diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/internalversion/BUILD b/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/internalversion/BUILD index 36ffd27f..aa47da00 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/internalversion/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/internalversion/BUILD @@ -5,18 +5,22 @@ licenses(["notice"]) load( "@io_bazel_rules_go//go:def.bzl", "go_library", + "go_test", ) go_library( name = "go_default_library", srcs = [ "daemonset.go", + "daemonset_expansion.go", "deployment.go", + "deployment_expansion.go", "expansion_generated.go", "ingress.go", "networkpolicy.go", "podsecuritypolicy.go", "replicaset.go", + "replicaset_expansion.go", "scale.go", "thirdpartyresource.go", ], @@ -26,6 +30,7 @@ go_library( "//pkg/apis/extensions:go_default_library", "//pkg/client/cache:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", ], ) @@ -42,3 +47,18 @@ filegroup( srcs = [":package-srcs"], tags = ["automanaged"], ) + +go_test( + name = "go_default_test", + srcs = ["daemonset_expansion_test.go"], + library = ":go_default_library", + tags = ["automanaged"], + deps = [ + "//pkg/api:go_default_library", + "//pkg/apis/extensions:go_default_library", + "//pkg/client/cache:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/labels", + "//vendor:k8s.io/apimachinery/pkg/util/sets", + ], +) diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/internalversion/daemonset.go b/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/internalversion/daemonset.go index 51d0bfe7..ca29b87c 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/internalversion/daemonset.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/internalversion/daemonset.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package internalversion diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/internalversion/daemonset_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/internalversion/daemonset_expansion.go new file mode 100644 index 00000000..c5073f3b --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/internalversion/daemonset_expansion.go @@ -0,0 +1,77 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package internalversion + +import ( + "fmt" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/apis/extensions" +) + +// DaemonSetListerExpansion allows custom methods to be added to +// DaemonSetLister. +type DaemonSetListerExpansion interface { + GetPodDaemonSets(pod *api.Pod) ([]*extensions.DaemonSet, error) +} + +// DaemonSetNamespaceListerExpansion allows custom methods to be added to +// DaemonSetNamespaeLister. +type DaemonSetNamespaceListerExpansion interface{} + +// GetPodDaemonSets returns a list of daemon sets managing a pod. +// Returns an error if and only if no matching daemon sets are found. +func (s *daemonSetLister) GetPodDaemonSets(pod *api.Pod) ([]*extensions.DaemonSet, error) { + var selector labels.Selector + var daemonSet *extensions.DaemonSet + + if len(pod.Labels) == 0 { + return nil, fmt.Errorf("no daemon sets found for pod %v because it has no labels", pod.Name) + } + + list, err := s.DaemonSets(pod.Namespace).List(labels.Everything()) + if err != nil { + return nil, err + } + + var daemonSets []*extensions.DaemonSet + for i := range list { + daemonSet = list[i] + if daemonSet.Namespace != pod.Namespace { + continue + } + selector, err = metav1.LabelSelectorAsSelector(daemonSet.Spec.Selector) + if err != nil { + // this should not happen if the DaemonSet passed validation + return nil, err + } + + // If a daemonSet with a nil or empty selector creeps in, it should match nothing, not everything. + if selector.Empty() || !selector.Matches(labels.Set(pod.Labels)) { + continue + } + daemonSets = append(daemonSets, daemonSet) + } + + if len(daemonSets) == 0 { + return nil, fmt.Errorf("could not find daemon set for pod %s in namespace %s with labels: %v", pod.Name, pod.Namespace, pod.Labels) + } + + return daemonSets, nil +} diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/internalversion/daemonset_expansion_test.go b/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/internalversion/daemonset_expansion_test.go new file mode 100644 index 00000000..dabe19be --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/internalversion/daemonset_expansion_test.go @@ -0,0 +1,152 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package internalversion + +import ( + "testing" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/apis/extensions" + "k8s.io/kubernetes/pkg/client/cache" +) + +func TestDaemonSetLister(t *testing.T) { + store := cache.NewIndexer(cache.MetaNamespaceKeyFunc, cache.Indexers{"namespace": cache.MetaNamespaceIndexFunc}) + lister := NewDaemonSetLister(store) + testCases := []struct { + inDSs []*extensions.DaemonSet + list func() ([]*extensions.DaemonSet, error) + outDaemonSetNames sets.String + expectErr bool + }{ + // Basic listing + { + inDSs: []*extensions.DaemonSet{ + {ObjectMeta: metav1.ObjectMeta{Name: "basic"}}, + }, + list: func() ([]*extensions.DaemonSet, error) { + return lister.List(labels.Everything()) + }, + outDaemonSetNames: sets.NewString("basic"), + }, + // Listing multiple daemon sets + { + inDSs: []*extensions.DaemonSet{ + {ObjectMeta: metav1.ObjectMeta{Name: "basic"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "complex"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "complex2"}}, + }, + list: func() ([]*extensions.DaemonSet, error) { + return lister.List(labels.Everything()) + }, + outDaemonSetNames: sets.NewString("basic", "complex", "complex2"), + }, + // No pod labels + { + inDSs: []*extensions.DaemonSet{ + { + ObjectMeta: metav1.ObjectMeta{Name: "basic", Namespace: "ns"}, + Spec: extensions.DaemonSetSpec{ + Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"foo": "baz"}}, + }, + }, + }, + list: func() ([]*extensions.DaemonSet, error) { + pod := &api.Pod{ + ObjectMeta: metav1.ObjectMeta{Name: "pod1", Namespace: "ns"}, + } + return lister.GetPodDaemonSets(pod) + }, + outDaemonSetNames: sets.NewString(), + expectErr: true, + }, + // No DS selectors + { + inDSs: []*extensions.DaemonSet{ + { + ObjectMeta: metav1.ObjectMeta{Name: "basic", Namespace: "ns"}, + }, + }, + list: func() ([]*extensions.DaemonSet, error) { + pod := &api.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "pod1", + Namespace: "ns", + Labels: map[string]string{"foo": "bar"}, + }, + } + return lister.GetPodDaemonSets(pod) + }, + outDaemonSetNames: sets.NewString(), + expectErr: true, + }, + // Matching labels to selectors and namespace + { + inDSs: []*extensions.DaemonSet{ + { + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, + Spec: extensions.DaemonSetSpec{ + Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"foo": "bar"}}, + }, + }, + { + ObjectMeta: metav1.ObjectMeta{Name: "bar", Namespace: "ns"}, + Spec: extensions.DaemonSetSpec{ + Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"foo": "bar"}}, + }, + }, + }, + list: func() ([]*extensions.DaemonSet, error) { + pod := &api.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "pod1", + Labels: map[string]string{"foo": "bar"}, + Namespace: "ns", + }, + } + return lister.GetPodDaemonSets(pod) + }, + outDaemonSetNames: sets.NewString("bar"), + }, + } + for _, c := range testCases { + for _, r := range c.inDSs { + store.Add(r) + } + + daemonSets, err := c.list() + if err != nil && c.expectErr { + continue + } else if c.expectErr { + t.Error("Expected error, got none") + continue + } else if err != nil { + t.Errorf("Unexpected error %#v", err) + continue + } + daemonSetNames := make([]string, len(daemonSets)) + for ix := range daemonSets { + daemonSetNames[ix] = daemonSets[ix].Name + } + if !c.outDaemonSetNames.HasAll(daemonSetNames...) || len(daemonSetNames) != len(c.outDaemonSetNames) { + t.Errorf("Unexpected got controllers %+v expected %+v", daemonSetNames, c.outDaemonSetNames) + } + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/internalversion/deployment.go b/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/internalversion/deployment.go index 6ef912d5..4358ee10 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/internalversion/deployment.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/internalversion/deployment.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package internalversion diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/internalversion/deployment_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/internalversion/deployment_expansion.go new file mode 100644 index 00000000..c42010fd --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/internalversion/deployment_expansion.go @@ -0,0 +1,67 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package internalversion + +import ( + "fmt" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/kubernetes/pkg/apis/extensions" +) + +// DeploymentListerExpansion allows custom methods to be added to +// DeploymentLister. +type DeploymentListerExpansion interface { + GetDeploymentsForReplicaSet(rs *extensions.ReplicaSet) ([]*extensions.Deployment, error) +} + +// DeploymentNamespaceListerExpansion allows custom methods to be added to +// DeploymentNamespaeLister. +type DeploymentNamespaceListerExpansion interface{} + +// GetDeploymentsForReplicaSet returns a list of deployments managing a replica set. Returns an error only if no matching deployments are found. +func (s *deploymentLister) GetDeploymentsForReplicaSet(rs *extensions.ReplicaSet) ([]*extensions.Deployment, error) { + if len(rs.Labels) == 0 { + return nil, fmt.Errorf("no deployments found for ReplicaSet %v because it has no labels", rs.Name) + } + + // TODO: MODIFY THIS METHOD so that it checks for the podTemplateSpecHash label + dList, err := s.Deployments(rs.Namespace).List(labels.Everything()) + if err != nil { + return nil, err + } + + var deployments []*extensions.Deployment + for _, d := range dList { + selector, err := metav1.LabelSelectorAsSelector(d.Spec.Selector) + if err != nil { + return nil, fmt.Errorf("invalid label selector: %v", err) + } + // If a deployment with a nil or empty selector creeps in, it should match nothing, not everything. + if selector.Empty() || !selector.Matches(labels.Set(rs.Labels)) { + continue + } + deployments = append(deployments, d) + } + + if len(deployments) == 0 { + return nil, fmt.Errorf("could not find deployments set for ReplicaSet %s in namespace %s with labels: %v", rs.Name, rs.Namespace, rs.Labels) + } + + return deployments, nil +} diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/internalversion/expansion_generated.go b/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/internalversion/expansion_generated.go index be5d40cf..69feaca0 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/internalversion/expansion_generated.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/internalversion/expansion_generated.go @@ -14,26 +14,10 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package internalversion -// DaemonSetListerExpansion allows custom methods to be added to -// DaemonSetLister. -type DaemonSetListerExpansion interface{} - -// DaemonSetNamespaceListerExpansion allows custom methods to be added to -// DaemonSetNamespaeLister. -type DaemonSetNamespaceListerExpansion interface{} - -// DeploymentListerExpansion allows custom methods to be added to -// DeploymentLister. -type DeploymentListerExpansion interface{} - -// DeploymentNamespaceListerExpansion allows custom methods to be added to -// DeploymentNamespaeLister. -type DeploymentNamespaceListerExpansion interface{} - // IngressListerExpansion allows custom methods to be added to // IngressLister. type IngressListerExpansion interface{} @@ -54,14 +38,6 @@ type NetworkPolicyNamespaceListerExpansion interface{} // PodSecurityPolicyLister. type PodSecurityPolicyListerExpansion interface{} -// ReplicaSetListerExpansion allows custom methods to be added to -// ReplicaSetLister. -type ReplicaSetListerExpansion interface{} - -// ReplicaSetNamespaceListerExpansion allows custom methods to be added to -// ReplicaSetNamespaeLister. -type ReplicaSetNamespaceListerExpansion interface{} - // ScaleListerExpansion allows custom methods to be added to // ScaleLister. type ScaleListerExpansion interface{} diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/internalversion/ingress.go b/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/internalversion/ingress.go index 37b76140..49873039 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/internalversion/ingress.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/internalversion/ingress.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package internalversion diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/internalversion/networkpolicy.go b/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/internalversion/networkpolicy.go index fd5c1043..f295d3cd 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/internalversion/networkpolicy.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/internalversion/networkpolicy.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package internalversion diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/internalversion/podsecuritypolicy.go b/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/internalversion/podsecuritypolicy.go index 761cd276..1f566d23 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/internalversion/podsecuritypolicy.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/internalversion/podsecuritypolicy.go @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package internalversion import ( "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" - api "k8s.io/kubernetes/pkg/api" extensions "k8s.io/kubernetes/pkg/apis/extensions" "k8s.io/kubernetes/pkg/client/cache" ) @@ -55,7 +55,7 @@ func (s *podSecurityPolicyLister) List(selector labels.Selector) (ret []*extensi // Get retrieves the PodSecurityPolicy from the index for a given name. func (s *podSecurityPolicyLister) Get(name string) (*extensions.PodSecurityPolicy, error) { - key := &extensions.PodSecurityPolicy{ObjectMeta: api.ObjectMeta{Name: name}} + key := &extensions.PodSecurityPolicy{ObjectMeta: v1.ObjectMeta{Name: name}} obj, exists, err := s.indexer.Get(key) if err != nil { return nil, err diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/internalversion/replicaset.go b/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/internalversion/replicaset.go index cf82ded2..75406b91 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/internalversion/replicaset.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/internalversion/replicaset.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package internalversion diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/internalversion/replicaset_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/internalversion/replicaset_expansion.go new file mode 100644 index 00000000..d2ab13ec --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/internalversion/replicaset_expansion.go @@ -0,0 +1,71 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package internalversion + +import ( + "fmt" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/apis/extensions" +) + +// ReplicaSetListerExpansion allows custom methods to be added to +// ReplicaSetLister. +type ReplicaSetListerExpansion interface { + GetPodReplicaSets(pod *api.Pod) ([]*extensions.ReplicaSet, error) +} + +// ReplicaSetNamespaceListerExpansion allows custom methods to be added to +// ReplicaSetNamespaeLister. +type ReplicaSetNamespaceListerExpansion interface{} + +// GetPodReplicaSets returns a list of ReplicaSets managing a pod. Returns an error only if no matching ReplicaSets are found. +func (s *replicaSetLister) GetPodReplicaSets(pod *api.Pod) ([]*extensions.ReplicaSet, error) { + if len(pod.Labels) == 0 { + return nil, fmt.Errorf("no ReplicaSets found for pod %v because it has no labels", pod.Name) + } + + list, err := s.ReplicaSets(pod.Namespace).List(labels.Everything()) + if err != nil { + return nil, err + } + + var rss []*extensions.ReplicaSet + for _, rs := range list { + if rs.Namespace != pod.Namespace { + continue + } + selector, err := metav1.LabelSelectorAsSelector(rs.Spec.Selector) + if err != nil { + return nil, fmt.Errorf("invalid selector: %v", err) + } + + // If a ReplicaSet with a nil or empty selector creeps in, it should match nothing, not everything. + if selector.Empty() || !selector.Matches(labels.Set(pod.Labels)) { + continue + } + rss = append(rss, rs) + } + + if len(rss) == 0 { + return nil, fmt.Errorf("could not find ReplicaSet for pod %s in namespace %s with labels: %v", pod.Name, pod.Namespace, pod.Labels) + } + + return rss, nil +} diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/internalversion/scale.go b/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/internalversion/scale.go index 1e02bc0d..dcb396a1 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/internalversion/scale.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/internalversion/scale.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package internalversion diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/internalversion/thirdpartyresource.go b/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/internalversion/thirdpartyresource.go index 6a030d57..78ba1bea 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/internalversion/thirdpartyresource.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/internalversion/thirdpartyresource.go @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package internalversion import ( "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" - api "k8s.io/kubernetes/pkg/api" extensions "k8s.io/kubernetes/pkg/apis/extensions" "k8s.io/kubernetes/pkg/client/cache" ) @@ -55,7 +55,7 @@ func (s *thirdPartyResourceLister) List(selector labels.Selector) (ret []*extens // Get retrieves the ThirdPartyResource from the index for a given name. func (s *thirdPartyResourceLister) Get(name string) (*extensions.ThirdPartyResource, error) { - key := &extensions.ThirdPartyResource{ObjectMeta: api.ObjectMeta{Name: name}} + key := &extensions.ThirdPartyResource{ObjectMeta: v1.ObjectMeta{Name: name}} obj, exists, err := s.indexer.Get(key) if err != nil { return nil, err diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/v1beta1/BUILD b/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/v1beta1/BUILD index 17fd75de..7cb5734e 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/v1beta1/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/v1beta1/BUILD @@ -5,17 +5,21 @@ licenses(["notice"]) load( "@io_bazel_rules_go//go:def.bzl", "go_library", + "go_test", ) go_library( name = "go_default_library", srcs = [ "daemonset.go", + "daemonset_expansion.go", "deployment.go", + "deployment_expansion.go", "expansion_generated.go", "ingress.go", "podsecuritypolicy.go", "replicaset.go", + "replicaset_expansion.go", "scale.go", "thirdpartyresource.go", ], @@ -26,6 +30,7 @@ go_library( "//pkg/apis/extensions/v1beta1:go_default_library", "//pkg/client/cache:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", ], ) @@ -42,3 +47,18 @@ filegroup( srcs = [":package-srcs"], tags = ["automanaged"], ) + +go_test( + name = "go_default_test", + srcs = ["daemonset_expansion_test.go"], + library = ":go_default_library", + tags = ["automanaged"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/apis/extensions/v1beta1:go_default_library", + "//pkg/client/cache:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/labels", + "//vendor:k8s.io/apimachinery/pkg/util/sets", + ], +) diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/v1beta1/daemonset.go b/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/v1beta1/daemonset.go index a1584344..01500ad3 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/v1beta1/daemonset.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/v1beta1/daemonset.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package v1beta1 diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/v1beta1/daemonset_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/v1beta1/daemonset_expansion.go new file mode 100644 index 00000000..d3497414 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/v1beta1/daemonset_expansion.go @@ -0,0 +1,77 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + "fmt" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/kubernetes/pkg/api/v1" + "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" +) + +// DaemonSetListerExpansion allows custom methods to be added to +// DaemonSetLister. +type DaemonSetListerExpansion interface { + GetPodDaemonSets(pod *v1.Pod) ([]*v1beta1.DaemonSet, error) +} + +// DaemonSetNamespaceListerExpansion allows custom methods to be added to +// DaemonSetNamespaeLister. +type DaemonSetNamespaceListerExpansion interface{} + +// GetPodDaemonSets returns a list of daemon sets managing a pod. +// Returns an error if and only if no matching daemon sets are found. +func (s *daemonSetLister) GetPodDaemonSets(pod *v1.Pod) ([]*v1beta1.DaemonSet, error) { + var selector labels.Selector + var daemonSet *v1beta1.DaemonSet + + if len(pod.Labels) == 0 { + return nil, fmt.Errorf("no daemon sets found for pod %v because it has no labels", pod.Name) + } + + list, err := s.DaemonSets(pod.Namespace).List(labels.Everything()) + if err != nil { + return nil, err + } + + var daemonSets []*v1beta1.DaemonSet + for i := range list { + daemonSet = list[i] + if daemonSet.Namespace != pod.Namespace { + continue + } + selector, err = metav1.LabelSelectorAsSelector(daemonSet.Spec.Selector) + if err != nil { + // this should not happen if the DaemonSet passed validation + return nil, err + } + + // If a daemonSet with a nil or empty selector creeps in, it should match nothing, not everything. + if selector.Empty() || !selector.Matches(labels.Set(pod.Labels)) { + continue + } + daemonSets = append(daemonSets, daemonSet) + } + + if len(daemonSets) == 0 { + return nil, fmt.Errorf("could not find daemon set for pod %s in namespace %s with labels: %v", pod.Name, pod.Namespace, pod.Labels) + } + + return daemonSets, nil +} diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/v1beta1/daemonset_expansion_test.go b/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/v1beta1/daemonset_expansion_test.go new file mode 100644 index 00000000..c9c5f9ba --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/v1beta1/daemonset_expansion_test.go @@ -0,0 +1,152 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + "testing" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/kubernetes/pkg/api/v1" + extensions "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" + "k8s.io/kubernetes/pkg/client/cache" +) + +func TestDaemonSetLister(t *testing.T) { + store := cache.NewIndexer(cache.MetaNamespaceKeyFunc, cache.Indexers{"namespace": cache.MetaNamespaceIndexFunc}) + lister := NewDaemonSetLister(store) + testCases := []struct { + inDSs []*extensions.DaemonSet + list func() ([]*extensions.DaemonSet, error) + outDaemonSetNames sets.String + expectErr bool + }{ + // Basic listing + { + inDSs: []*extensions.DaemonSet{ + {ObjectMeta: metav1.ObjectMeta{Name: "basic"}}, + }, + list: func() ([]*extensions.DaemonSet, error) { + return lister.List(labels.Everything()) + }, + outDaemonSetNames: sets.NewString("basic"), + }, + // Listing multiple daemon sets + { + inDSs: []*extensions.DaemonSet{ + {ObjectMeta: metav1.ObjectMeta{Name: "basic"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "complex"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "complex2"}}, + }, + list: func() ([]*extensions.DaemonSet, error) { + return lister.List(labels.Everything()) + }, + outDaemonSetNames: sets.NewString("basic", "complex", "complex2"), + }, + // No pod labels + { + inDSs: []*extensions.DaemonSet{ + { + ObjectMeta: metav1.ObjectMeta{Name: "basic", Namespace: "ns"}, + Spec: extensions.DaemonSetSpec{ + Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"foo": "baz"}}, + }, + }, + }, + list: func() ([]*extensions.DaemonSet, error) { + pod := &v1.Pod{ + ObjectMeta: metav1.ObjectMeta{Name: "pod1", Namespace: "ns"}, + } + return lister.GetPodDaemonSets(pod) + }, + outDaemonSetNames: sets.NewString(), + expectErr: true, + }, + // No DS selectors + { + inDSs: []*extensions.DaemonSet{ + { + ObjectMeta: metav1.ObjectMeta{Name: "basic", Namespace: "ns"}, + }, + }, + list: func() ([]*extensions.DaemonSet, error) { + pod := &v1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "pod1", + Namespace: "ns", + Labels: map[string]string{"foo": "bar"}, + }, + } + return lister.GetPodDaemonSets(pod) + }, + outDaemonSetNames: sets.NewString(), + expectErr: true, + }, + // Matching labels to selectors and namespace + { + inDSs: []*extensions.DaemonSet{ + { + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, + Spec: extensions.DaemonSetSpec{ + Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"foo": "bar"}}, + }, + }, + { + ObjectMeta: metav1.ObjectMeta{Name: "bar", Namespace: "ns"}, + Spec: extensions.DaemonSetSpec{ + Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"foo": "bar"}}, + }, + }, + }, + list: func() ([]*extensions.DaemonSet, error) { + pod := &v1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "pod1", + Labels: map[string]string{"foo": "bar"}, + Namespace: "ns", + }, + } + return lister.GetPodDaemonSets(pod) + }, + outDaemonSetNames: sets.NewString("bar"), + }, + } + for _, c := range testCases { + for _, r := range c.inDSs { + store.Add(r) + } + + daemonSets, err := c.list() + if err != nil && c.expectErr { + continue + } else if c.expectErr { + t.Error("Expected error, got none") + continue + } else if err != nil { + t.Errorf("Unexpected error %#v", err) + continue + } + daemonSetNames := make([]string, len(daemonSets)) + for ix := range daemonSets { + daemonSetNames[ix] = daemonSets[ix].Name + } + if !c.outDaemonSetNames.HasAll(daemonSetNames...) || len(daemonSetNames) != len(c.outDaemonSetNames) { + t.Errorf("Unexpected got controllers %+v expected %+v", daemonSetNames, c.outDaemonSetNames) + } + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/v1beta1/deployment.go b/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/v1beta1/deployment.go index 6ced3ae9..8fc73ff6 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/v1beta1/deployment.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/v1beta1/deployment.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package v1beta1 diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/v1beta1/deployment_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/v1beta1/deployment_expansion.go new file mode 100644 index 00000000..e08799eb --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/v1beta1/deployment_expansion.go @@ -0,0 +1,67 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + "fmt" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + extensions "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" +) + +// DeploymentListerExpansion allows custom methods to be added to +// DeploymentLister. +type DeploymentListerExpansion interface { + GetDeploymentsForReplicaSet(rs *extensions.ReplicaSet) ([]*extensions.Deployment, error) +} + +// DeploymentNamespaceListerExpansion allows custom methods to be added to +// DeploymentNamespaeLister. +type DeploymentNamespaceListerExpansion interface{} + +// GetDeploymentsForReplicaSet returns a list of deployments managing a replica set. Returns an error only if no matching deployments are found. +func (s *deploymentLister) GetDeploymentsForReplicaSet(rs *extensions.ReplicaSet) ([]*extensions.Deployment, error) { + if len(rs.Labels) == 0 { + return nil, fmt.Errorf("no deployments found for ReplicaSet %v because it has no labels", rs.Name) + } + + // TODO: MODIFY THIS METHOD so that it checks for the podTemplateSpecHash label + dList, err := s.Deployments(rs.Namespace).List(labels.Everything()) + if err != nil { + return nil, err + } + + var deployments []*extensions.Deployment + for _, d := range dList { + selector, err := metav1.LabelSelectorAsSelector(d.Spec.Selector) + if err != nil { + return nil, fmt.Errorf("invalid label selector: %v", err) + } + // If a deployment with a nil or empty selector creeps in, it should match nothing, not everything. + if selector.Empty() || !selector.Matches(labels.Set(rs.Labels)) { + continue + } + deployments = append(deployments, d) + } + + if len(deployments) == 0 { + return nil, fmt.Errorf("could not find deployments set for ReplicaSet %s in namespace %s with labels: %v", rs.Name, rs.Namespace, rs.Labels) + } + + return deployments, nil +} diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/v1beta1/expansion_generated.go b/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/v1beta1/expansion_generated.go index f21ee170..12682e4c 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/v1beta1/expansion_generated.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/v1beta1/expansion_generated.go @@ -14,26 +14,10 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package v1beta1 -// DaemonSetListerExpansion allows custom methods to be added to -// DaemonSetLister. -type DaemonSetListerExpansion interface{} - -// DaemonSetNamespaceListerExpansion allows custom methods to be added to -// DaemonSetNamespaeLister. -type DaemonSetNamespaceListerExpansion interface{} - -// DeploymentListerExpansion allows custom methods to be added to -// DeploymentLister. -type DeploymentListerExpansion interface{} - -// DeploymentNamespaceListerExpansion allows custom methods to be added to -// DeploymentNamespaeLister. -type DeploymentNamespaceListerExpansion interface{} - // IngressListerExpansion allows custom methods to be added to // IngressLister. type IngressListerExpansion interface{} @@ -46,14 +30,6 @@ type IngressNamespaceListerExpansion interface{} // PodSecurityPolicyLister. type PodSecurityPolicyListerExpansion interface{} -// ReplicaSetListerExpansion allows custom methods to be added to -// ReplicaSetLister. -type ReplicaSetListerExpansion interface{} - -// ReplicaSetNamespaceListerExpansion allows custom methods to be added to -// ReplicaSetNamespaeLister. -type ReplicaSetNamespaceListerExpansion interface{} - // ScaleListerExpansion allows custom methods to be added to // ScaleLister. type ScaleListerExpansion interface{} diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/v1beta1/ingress.go b/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/v1beta1/ingress.go index 53b58bca..4ad8fe42 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/v1beta1/ingress.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/v1beta1/ingress.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package v1beta1 diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/v1beta1/podsecuritypolicy.go b/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/v1beta1/podsecuritypolicy.go index b6073338..3423ccfb 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/v1beta1/podsecuritypolicy.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/v1beta1/podsecuritypolicy.go @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package v1beta1 import ( "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" - v1 "k8s.io/kubernetes/pkg/api/v1" extensions "k8s.io/kubernetes/pkg/apis/extensions" v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" "k8s.io/kubernetes/pkg/client/cache" diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/v1beta1/replicaset.go b/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/v1beta1/replicaset.go index fe57e2f0..af42f042 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/v1beta1/replicaset.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/v1beta1/replicaset.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package v1beta1 diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/v1beta1/replicaset_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/v1beta1/replicaset_expansion.go new file mode 100644 index 00000000..cfef9588 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/v1beta1/replicaset_expansion.go @@ -0,0 +1,71 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + "fmt" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/kubernetes/pkg/api/v1" + extensions "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" +) + +// ReplicaSetListerExpansion allows custom methods to be added to +// ReplicaSetLister. +type ReplicaSetListerExpansion interface { + GetPodReplicaSets(pod *v1.Pod) ([]*extensions.ReplicaSet, error) +} + +// ReplicaSetNamespaceListerExpansion allows custom methods to be added to +// ReplicaSetNamespaeLister. +type ReplicaSetNamespaceListerExpansion interface{} + +// GetPodReplicaSets returns a list of ReplicaSets managing a pod. Returns an error only if no matching ReplicaSets are found. +func (s *replicaSetLister) GetPodReplicaSets(pod *v1.Pod) ([]*extensions.ReplicaSet, error) { + if len(pod.Labels) == 0 { + return nil, fmt.Errorf("no ReplicaSets found for pod %v because it has no labels", pod.Name) + } + + list, err := s.ReplicaSets(pod.Namespace).List(labels.Everything()) + if err != nil { + return nil, err + } + + var rss []*extensions.ReplicaSet + for _, rs := range list { + if rs.Namespace != pod.Namespace { + continue + } + selector, err := metav1.LabelSelectorAsSelector(rs.Spec.Selector) + if err != nil { + return nil, fmt.Errorf("invalid selector: %v", err) + } + + // If a ReplicaSet with a nil or empty selector creeps in, it should match nothing, not everything. + if selector.Empty() || !selector.Matches(labels.Set(pod.Labels)) { + continue + } + rss = append(rss, rs) + } + + if len(rss) == 0 { + return nil, fmt.Errorf("could not find ReplicaSet for pod %s in namespace %s with labels: %v", pod.Name, pod.Namespace, pod.Labels) + } + + return rss, nil +} diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/v1beta1/scale.go b/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/v1beta1/scale.go index 81973568..29ccfaac 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/v1beta1/scale.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/v1beta1/scale.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package v1beta1 diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/v1beta1/thirdpartyresource.go b/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/v1beta1/thirdpartyresource.go index b933da88..b6331082 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/v1beta1/thirdpartyresource.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/extensions/v1beta1/thirdpartyresource.go @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package v1beta1 import ( "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" - v1 "k8s.io/kubernetes/pkg/api/v1" extensions "k8s.io/kubernetes/pkg/apis/extensions" v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" "k8s.io/kubernetes/pkg/client/cache" diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/imagepolicy/internalversion/BUILD b/vendor/k8s.io/kubernetes/pkg/client/listers/imagepolicy/internalversion/BUILD index 50541cf5..5d84b35a 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/imagepolicy/internalversion/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/imagepolicy/internalversion/BUILD @@ -15,10 +15,10 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//pkg/apis/imagepolicy:go_default_library", "//pkg/client/cache:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/imagepolicy/internalversion/expansion_generated.go b/vendor/k8s.io/kubernetes/pkg/client/listers/imagepolicy/internalversion/expansion_generated.go index 2270586a..34a469c6 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/imagepolicy/internalversion/expansion_generated.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/imagepolicy/internalversion/expansion_generated.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package internalversion diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/imagepolicy/internalversion/imagereview.go b/vendor/k8s.io/kubernetes/pkg/client/listers/imagepolicy/internalversion/imagereview.go index 8106d45c..d03d1c08 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/imagepolicy/internalversion/imagereview.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/imagepolicy/internalversion/imagereview.go @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package internalversion import ( "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" - api "k8s.io/kubernetes/pkg/api" imagepolicy "k8s.io/kubernetes/pkg/apis/imagepolicy" "k8s.io/kubernetes/pkg/client/cache" ) @@ -55,7 +55,7 @@ func (s *imageReviewLister) List(selector labels.Selector) (ret []*imagepolicy.I // Get retrieves the ImageReview from the index for a given name. func (s *imageReviewLister) Get(name string) (*imagepolicy.ImageReview, error) { - key := &imagepolicy.ImageReview{ObjectMeta: api.ObjectMeta{Name: name}} + key := &imagepolicy.ImageReview{ObjectMeta: v1.ObjectMeta{Name: name}} obj, exists, err := s.indexer.Get(key) if err != nil { return nil, err diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/imagepolicy/v1alpha1/BUILD b/vendor/k8s.io/kubernetes/pkg/client/listers/imagepolicy/v1alpha1/BUILD index 4b66242e..4853abad 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/imagepolicy/v1alpha1/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/imagepolicy/v1alpha1/BUILD @@ -15,11 +15,11 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api/v1:go_default_library", "//pkg/apis/imagepolicy:go_default_library", "//pkg/apis/imagepolicy/v1alpha1:go_default_library", "//pkg/client/cache:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/imagepolicy/v1alpha1/expansion_generated.go b/vendor/k8s.io/kubernetes/pkg/client/listers/imagepolicy/v1alpha1/expansion_generated.go index 324f446e..cc4de30e 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/imagepolicy/v1alpha1/expansion_generated.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/imagepolicy/v1alpha1/expansion_generated.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package v1alpha1 diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/imagepolicy/v1alpha1/imagereview.go b/vendor/k8s.io/kubernetes/pkg/client/listers/imagepolicy/v1alpha1/imagereview.go index d4317cd1..d0af5472 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/imagepolicy/v1alpha1/imagereview.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/imagepolicy/v1alpha1/imagereview.go @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package v1alpha1 import ( "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" - v1 "k8s.io/kubernetes/pkg/api/v1" imagepolicy "k8s.io/kubernetes/pkg/apis/imagepolicy" v1alpha1 "k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1" "k8s.io/kubernetes/pkg/client/cache" diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/policy/internalversion/BUILD b/vendor/k8s.io/kubernetes/pkg/client/listers/policy/internalversion/BUILD index 13167d81..5c73fe94 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/policy/internalversion/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/policy/internalversion/BUILD @@ -13,12 +13,16 @@ go_library( "eviction.go", "expansion_generated.go", "poddisruptionbudget.go", + "poddisruptionbudget_expansion.go", ], tags = ["automanaged"], deps = [ + "//pkg/api:go_default_library", "//pkg/apis/policy:go_default_library", "//pkg/client/cache:go_default_library", + "//vendor:github.com/golang/glog", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/policy/internalversion/eviction.go b/vendor/k8s.io/kubernetes/pkg/client/listers/policy/internalversion/eviction.go index ff17e111..b5a2370a 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/policy/internalversion/eviction.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/policy/internalversion/eviction.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package internalversion diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/policy/internalversion/expansion_generated.go b/vendor/k8s.io/kubernetes/pkg/client/listers/policy/internalversion/expansion_generated.go index 34fdb666..1a0389ac 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/policy/internalversion/expansion_generated.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/policy/internalversion/expansion_generated.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package internalversion @@ -25,11 +25,3 @@ type EvictionListerExpansion interface{} // EvictionNamespaceListerExpansion allows custom methods to be added to // EvictionNamespaeLister. type EvictionNamespaceListerExpansion interface{} - -// PodDisruptionBudgetListerExpansion allows custom methods to be added to -// PodDisruptionBudgetLister. -type PodDisruptionBudgetListerExpansion interface{} - -// PodDisruptionBudgetNamespaceListerExpansion allows custom methods to be added to -// PodDisruptionBudgetNamespaeLister. -type PodDisruptionBudgetNamespaceListerExpansion interface{} diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/policy/internalversion/poddisruptionbudget.go b/vendor/k8s.io/kubernetes/pkg/client/listers/policy/internalversion/poddisruptionbudget.go index 8d55f646..39d28e3f 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/policy/internalversion/poddisruptionbudget.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/policy/internalversion/poddisruptionbudget.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package internalversion diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/policy/internalversion/poddisruptionbudget_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/listers/policy/internalversion/poddisruptionbudget_expansion.go new file mode 100644 index 00000000..a666e2b5 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/policy/internalversion/poddisruptionbudget_expansion.go @@ -0,0 +1,74 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package internalversion + +import ( + "fmt" + + "github.com/golang/glog" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/apis/policy" +) + +// PodDisruptionBudgetListerExpansion allows custom methods to be added to +// PodDisruptionBudgetLister. +type PodDisruptionBudgetListerExpansion interface { + GetPodPodDisruptionBudgets(pod *api.Pod) ([]*policy.PodDisruptionBudget, error) +} + +// PodDisruptionBudgetNamespaceListerExpansion allows custom methods to be added to +// PodDisruptionBudgetNamespaeLister. +type PodDisruptionBudgetNamespaceListerExpansion interface{} + +// GetPodPodDisruptionBudgets returns a list of PodDisruptionBudgets matching a pod. Returns an error only if no matching PodDisruptionBudgets are found. +func (s *podDisruptionBudgetLister) GetPodPodDisruptionBudgets(pod *api.Pod) ([]*policy.PodDisruptionBudget, error) { + var selector labels.Selector + + if len(pod.Labels) == 0 { + return nil, fmt.Errorf("no PodDisruptionBudgets found for pod %v because it has no labels", pod.Name) + } + + list, err := s.PodDisruptionBudgets(pod.Namespace).List(labels.Everything()) + if err != nil { + return nil, err + } + + var pdbList []*policy.PodDisruptionBudget + for i := range list { + pdb := list[i] + selector, err = metav1.LabelSelectorAsSelector(pdb.Spec.Selector) + if err != nil { + glog.Warningf("invalid selector: %v", err) + // TODO(mml): add an event to the PDB + continue + } + + // If a PDB with a nil or empty selector creeps in, it should match nothing, not everything. + if selector.Empty() || !selector.Matches(labels.Set(pod.Labels)) { + continue + } + pdbList = append(pdbList, pdb) + } + + if len(pdbList) == 0 { + return nil, fmt.Errorf("could not find PodDisruptionBudget for pod %s in namespace %s with labels: %v", pod.Name, pod.Namespace, pod.Labels) + } + + return pdbList, nil +} diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/policy/v1alpha1/expansion_generated.go b/vendor/k8s.io/kubernetes/pkg/client/listers/policy/v1alpha1/expansion_generated.go index c98b446f..18918cf6 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/policy/v1alpha1/expansion_generated.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/policy/v1alpha1/expansion_generated.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package v1alpha1 diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/policy/v1alpha1/poddisruptionbudget.go b/vendor/k8s.io/kubernetes/pkg/client/listers/policy/v1alpha1/poddisruptionbudget.go index 2e21ba8e..5d5b2cbc 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/policy/v1alpha1/poddisruptionbudget.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/policy/v1alpha1/poddisruptionbudget.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package v1alpha1 diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/policy/v1beta1/BUILD b/vendor/k8s.io/kubernetes/pkg/client/listers/policy/v1beta1/BUILD index b9423cb7..d89e2e55 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/policy/v1beta1/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/policy/v1beta1/BUILD @@ -13,13 +13,17 @@ go_library( "eviction.go", "expansion_generated.go", "poddisruptionbudget.go", + "poddisruptionbudget_expansion.go", ], tags = ["automanaged"], deps = [ + "//pkg/api/v1:go_default_library", "//pkg/apis/policy:go_default_library", "//pkg/apis/policy/v1beta1:go_default_library", "//pkg/client/cache:go_default_library", + "//vendor:github.com/golang/glog", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/policy/v1beta1/eviction.go b/vendor/k8s.io/kubernetes/pkg/client/listers/policy/v1beta1/eviction.go index 037f9881..24555083 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/policy/v1beta1/eviction.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/policy/v1beta1/eviction.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package v1beta1 diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/policy/v1beta1/expansion_generated.go b/vendor/k8s.io/kubernetes/pkg/client/listers/policy/v1beta1/expansion_generated.go index 4dd0bf6b..3deec523 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/policy/v1beta1/expansion_generated.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/policy/v1beta1/expansion_generated.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package v1beta1 @@ -25,11 +25,3 @@ type EvictionListerExpansion interface{} // EvictionNamespaceListerExpansion allows custom methods to be added to // EvictionNamespaeLister. type EvictionNamespaceListerExpansion interface{} - -// PodDisruptionBudgetListerExpansion allows custom methods to be added to -// PodDisruptionBudgetLister. -type PodDisruptionBudgetListerExpansion interface{} - -// PodDisruptionBudgetNamespaceListerExpansion allows custom methods to be added to -// PodDisruptionBudgetNamespaeLister. -type PodDisruptionBudgetNamespaceListerExpansion interface{} diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/policy/v1beta1/poddisruptionbudget.go b/vendor/k8s.io/kubernetes/pkg/client/listers/policy/v1beta1/poddisruptionbudget.go index 7a57997d..b93f4de8 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/policy/v1beta1/poddisruptionbudget.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/policy/v1beta1/poddisruptionbudget.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package v1beta1 diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/policy/v1beta1/poddisruptionbudget_expansion.go b/vendor/k8s.io/kubernetes/pkg/client/listers/policy/v1beta1/poddisruptionbudget_expansion.go new file mode 100644 index 00000000..ce294580 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/policy/v1beta1/poddisruptionbudget_expansion.go @@ -0,0 +1,74 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + "fmt" + + "github.com/golang/glog" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/kubernetes/pkg/api/v1" + policy "k8s.io/kubernetes/pkg/apis/policy/v1beta1" +) + +// PodDisruptionBudgetListerExpansion allows custom methods to be added to +// PodDisruptionBudgetLister. +type PodDisruptionBudgetListerExpansion interface { + GetPodPodDisruptionBudgets(pod *v1.Pod) ([]*policy.PodDisruptionBudget, error) +} + +// PodDisruptionBudgetNamespaceListerExpansion allows custom methods to be added to +// PodDisruptionBudgetNamespaeLister. +type PodDisruptionBudgetNamespaceListerExpansion interface{} + +// GetPodPodDisruptionBudgets returns a list of PodDisruptionBudgets matching a pod. Returns an error only if no matching PodDisruptionBudgets are found. +func (s *podDisruptionBudgetLister) GetPodPodDisruptionBudgets(pod *v1.Pod) ([]*policy.PodDisruptionBudget, error) { + var selector labels.Selector + + if len(pod.Labels) == 0 { + return nil, fmt.Errorf("no PodDisruptionBudgets found for pod %v because it has no labels", pod.Name) + } + + list, err := s.PodDisruptionBudgets(pod.Namespace).List(labels.Everything()) + if err != nil { + return nil, err + } + + var pdbList []*policy.PodDisruptionBudget + for i := range list { + pdb := list[i] + selector, err = metav1.LabelSelectorAsSelector(pdb.Spec.Selector) + if err != nil { + glog.Warningf("invalid selector: %v", err) + // TODO(mml): add an event to the PDB + continue + } + + // If a PDB with a nil or empty selector creeps in, it should match nothing, not everything. + if selector.Empty() || !selector.Matches(labels.Set(pod.Labels)) { + continue + } + pdbList = append(pdbList, pdb) + } + + if len(pdbList) == 0 { + return nil, fmt.Errorf("could not find PodDisruptionBudget for pod %s in namespace %s with labels: %v", pod.Name, pod.Namespace, pod.Labels) + } + + return pdbList, nil +} diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/internalversion/BUILD b/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/internalversion/BUILD index 8e315a01..920805bd 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/internalversion/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/internalversion/BUILD @@ -18,10 +18,10 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//pkg/apis/rbac:go_default_library", "//pkg/client/cache:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/internalversion/clusterrole.go b/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/internalversion/clusterrole.go index f3de9fb8..bb2c4107 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/internalversion/clusterrole.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/internalversion/clusterrole.go @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package internalversion import ( "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" - api "k8s.io/kubernetes/pkg/api" rbac "k8s.io/kubernetes/pkg/apis/rbac" "k8s.io/kubernetes/pkg/client/cache" ) @@ -55,7 +55,7 @@ func (s *clusterRoleLister) List(selector labels.Selector) (ret []*rbac.ClusterR // Get retrieves the ClusterRole from the index for a given name. func (s *clusterRoleLister) Get(name string) (*rbac.ClusterRole, error) { - key := &rbac.ClusterRole{ObjectMeta: api.ObjectMeta{Name: name}} + key := &rbac.ClusterRole{ObjectMeta: v1.ObjectMeta{Name: name}} obj, exists, err := s.indexer.Get(key) if err != nil { return nil, err diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/internalversion/clusterrolebinding.go b/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/internalversion/clusterrolebinding.go index 61c94976..2be0ccd0 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/internalversion/clusterrolebinding.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/internalversion/clusterrolebinding.go @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package internalversion import ( "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" - api "k8s.io/kubernetes/pkg/api" rbac "k8s.io/kubernetes/pkg/apis/rbac" "k8s.io/kubernetes/pkg/client/cache" ) @@ -55,7 +55,7 @@ func (s *clusterRoleBindingLister) List(selector labels.Selector) (ret []*rbac.C // Get retrieves the ClusterRoleBinding from the index for a given name. func (s *clusterRoleBindingLister) Get(name string) (*rbac.ClusterRoleBinding, error) { - key := &rbac.ClusterRoleBinding{ObjectMeta: api.ObjectMeta{Name: name}} + key := &rbac.ClusterRoleBinding{ObjectMeta: v1.ObjectMeta{Name: name}} obj, exists, err := s.indexer.Get(key) if err != nil { return nil, err diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/internalversion/expansion_generated.go b/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/internalversion/expansion_generated.go index c56dad8d..d0942928 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/internalversion/expansion_generated.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/internalversion/expansion_generated.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package internalversion diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/internalversion/role.go b/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/internalversion/role.go index 11d5af6b..197a20df 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/internalversion/role.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/internalversion/role.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package internalversion diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/internalversion/rolebinding.go b/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/internalversion/rolebinding.go index 973a1539..ab9629fd 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/internalversion/rolebinding.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/internalversion/rolebinding.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package internalversion diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/v1alpha1/BUILD b/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/v1alpha1/BUILD index 8a61d820..6bad9e0c 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/v1alpha1/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/v1alpha1/BUILD @@ -18,11 +18,11 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api/v1:go_default_library", "//pkg/apis/rbac:go_default_library", "//pkg/apis/rbac/v1alpha1:go_default_library", "//pkg/client/cache:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/v1alpha1/clusterrole.go b/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/v1alpha1/clusterrole.go index cbb67c2b..8c403536 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/v1alpha1/clusterrole.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/v1alpha1/clusterrole.go @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package v1alpha1 import ( "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" - v1 "k8s.io/kubernetes/pkg/api/v1" rbac "k8s.io/kubernetes/pkg/apis/rbac" v1alpha1 "k8s.io/kubernetes/pkg/apis/rbac/v1alpha1" "k8s.io/kubernetes/pkg/client/cache" diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/v1alpha1/clusterrolebinding.go b/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/v1alpha1/clusterrolebinding.go index 472529d8..af2e6b60 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/v1alpha1/clusterrolebinding.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/v1alpha1/clusterrolebinding.go @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package v1alpha1 import ( "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" - v1 "k8s.io/kubernetes/pkg/api/v1" rbac "k8s.io/kubernetes/pkg/apis/rbac" v1alpha1 "k8s.io/kubernetes/pkg/apis/rbac/v1alpha1" "k8s.io/kubernetes/pkg/client/cache" diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/v1alpha1/expansion_generated.go b/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/v1alpha1/expansion_generated.go index 7fcd98f7..15a50e5c 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/v1alpha1/expansion_generated.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/v1alpha1/expansion_generated.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package v1alpha1 diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/v1alpha1/role.go b/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/v1alpha1/role.go index 04496024..08edd1e6 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/v1alpha1/role.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/v1alpha1/role.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package v1alpha1 diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/v1alpha1/rolebinding.go b/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/v1alpha1/rolebinding.go index 205db759..85ca36a8 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/v1alpha1/rolebinding.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/v1alpha1/rolebinding.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package v1alpha1 diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/v1beta1/BUILD b/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/v1beta1/BUILD new file mode 100644 index 00000000..864fc960 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/v1beta1/BUILD @@ -0,0 +1,41 @@ +package(default_visibility = ["//visibility:public"]) + +licenses(["notice"]) + +load( + "@io_bazel_rules_go//go:def.bzl", + "go_library", +) + +go_library( + name = "go_default_library", + srcs = [ + "clusterrole.go", + "clusterrolebinding.go", + "expansion_generated.go", + "role.go", + "rolebinding.go", + ], + tags = ["automanaged"], + deps = [ + "//pkg/apis/rbac:go_default_library", + "//pkg/apis/rbac/v1beta1:go_default_library", + "//pkg/client/cache:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/labels", + ], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], +) diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/v1beta1/clusterrole.go b/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/v1beta1/clusterrole.go new file mode 100644 index 00000000..931f9a73 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/v1beta1/clusterrole.go @@ -0,0 +1,68 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] + +package v1beta1 + +import ( + "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + rbac "k8s.io/kubernetes/pkg/apis/rbac" + v1beta1 "k8s.io/kubernetes/pkg/apis/rbac/v1beta1" + "k8s.io/kubernetes/pkg/client/cache" +) + +// ClusterRoleLister helps list ClusterRoles. +type ClusterRoleLister interface { + // List lists all ClusterRoles in the indexer. + List(selector labels.Selector) (ret []*v1beta1.ClusterRole, err error) + // Get retrieves the ClusterRole from the index for a given name. + Get(name string) (*v1beta1.ClusterRole, error) + ClusterRoleListerExpansion +} + +// clusterRoleLister implements the ClusterRoleLister interface. +type clusterRoleLister struct { + indexer cache.Indexer +} + +// NewClusterRoleLister returns a new ClusterRoleLister. +func NewClusterRoleLister(indexer cache.Indexer) ClusterRoleLister { + return &clusterRoleLister{indexer: indexer} +} + +// List lists all ClusterRoles in the indexer. +func (s *clusterRoleLister) List(selector labels.Selector) (ret []*v1beta1.ClusterRole, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.ClusterRole)) + }) + return ret, err +} + +// Get retrieves the ClusterRole from the index for a given name. +func (s *clusterRoleLister) Get(name string) (*v1beta1.ClusterRole, error) { + key := &v1beta1.ClusterRole{ObjectMeta: v1.ObjectMeta{Name: name}} + obj, exists, err := s.indexer.Get(key) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(rbac.Resource("clusterrole"), name) + } + return obj.(*v1beta1.ClusterRole), nil +} diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/v1beta1/clusterrolebinding.go b/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/v1beta1/clusterrolebinding.go new file mode 100644 index 00000000..e6a64d68 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/v1beta1/clusterrolebinding.go @@ -0,0 +1,68 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] + +package v1beta1 + +import ( + "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + rbac "k8s.io/kubernetes/pkg/apis/rbac" + v1beta1 "k8s.io/kubernetes/pkg/apis/rbac/v1beta1" + "k8s.io/kubernetes/pkg/client/cache" +) + +// ClusterRoleBindingLister helps list ClusterRoleBindings. +type ClusterRoleBindingLister interface { + // List lists all ClusterRoleBindings in the indexer. + List(selector labels.Selector) (ret []*v1beta1.ClusterRoleBinding, err error) + // Get retrieves the ClusterRoleBinding from the index for a given name. + Get(name string) (*v1beta1.ClusterRoleBinding, error) + ClusterRoleBindingListerExpansion +} + +// clusterRoleBindingLister implements the ClusterRoleBindingLister interface. +type clusterRoleBindingLister struct { + indexer cache.Indexer +} + +// NewClusterRoleBindingLister returns a new ClusterRoleBindingLister. +func NewClusterRoleBindingLister(indexer cache.Indexer) ClusterRoleBindingLister { + return &clusterRoleBindingLister{indexer: indexer} +} + +// List lists all ClusterRoleBindings in the indexer. +func (s *clusterRoleBindingLister) List(selector labels.Selector) (ret []*v1beta1.ClusterRoleBinding, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.ClusterRoleBinding)) + }) + return ret, err +} + +// Get retrieves the ClusterRoleBinding from the index for a given name. +func (s *clusterRoleBindingLister) Get(name string) (*v1beta1.ClusterRoleBinding, error) { + key := &v1beta1.ClusterRoleBinding{ObjectMeta: v1.ObjectMeta{Name: name}} + obj, exists, err := s.indexer.Get(key) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(rbac.Resource("clusterrolebinding"), name) + } + return obj.(*v1beta1.ClusterRoleBinding), nil +} diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/v1beta1/expansion_generated.go b/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/v1beta1/expansion_generated.go new file mode 100644 index 00000000..a84317bd --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/v1beta1/expansion_generated.go @@ -0,0 +1,43 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] + +package v1beta1 + +// ClusterRoleListerExpansion allows custom methods to be added to +// ClusterRoleLister. +type ClusterRoleListerExpansion interface{} + +// ClusterRoleBindingListerExpansion allows custom methods to be added to +// ClusterRoleBindingLister. +type ClusterRoleBindingListerExpansion interface{} + +// RoleListerExpansion allows custom methods to be added to +// RoleLister. +type RoleListerExpansion interface{} + +// RoleNamespaceListerExpansion allows custom methods to be added to +// RoleNamespaeLister. +type RoleNamespaceListerExpansion interface{} + +// RoleBindingListerExpansion allows custom methods to be added to +// RoleBindingLister. +type RoleBindingListerExpansion interface{} + +// RoleBindingNamespaceListerExpansion allows custom methods to be added to +// RoleBindingNamespaeLister. +type RoleBindingNamespaceListerExpansion interface{} diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/v1beta1/role.go b/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/v1beta1/role.go new file mode 100644 index 00000000..d2f61edf --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/v1beta1/role.go @@ -0,0 +1,95 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] + +package v1beta1 + +import ( + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + rbac "k8s.io/kubernetes/pkg/apis/rbac" + v1beta1 "k8s.io/kubernetes/pkg/apis/rbac/v1beta1" + "k8s.io/kubernetes/pkg/client/cache" +) + +// RoleLister helps list Roles. +type RoleLister interface { + // List lists all Roles in the indexer. + List(selector labels.Selector) (ret []*v1beta1.Role, err error) + // Roles returns an object that can list and get Roles. + Roles(namespace string) RoleNamespaceLister + RoleListerExpansion +} + +// roleLister implements the RoleLister interface. +type roleLister struct { + indexer cache.Indexer +} + +// NewRoleLister returns a new RoleLister. +func NewRoleLister(indexer cache.Indexer) RoleLister { + return &roleLister{indexer: indexer} +} + +// List lists all Roles in the indexer. +func (s *roleLister) List(selector labels.Selector) (ret []*v1beta1.Role, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.Role)) + }) + return ret, err +} + +// Roles returns an object that can list and get Roles. +func (s *roleLister) Roles(namespace string) RoleNamespaceLister { + return roleNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// RoleNamespaceLister helps list and get Roles. +type RoleNamespaceLister interface { + // List lists all Roles in the indexer for a given namespace. + List(selector labels.Selector) (ret []*v1beta1.Role, err error) + // Get retrieves the Role from the indexer for a given namespace and name. + Get(name string) (*v1beta1.Role, error) + RoleNamespaceListerExpansion +} + +// roleNamespaceLister implements the RoleNamespaceLister +// interface. +type roleNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all Roles in the indexer for a given namespace. +func (s roleNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.Role, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.Role)) + }) + return ret, err +} + +// Get retrieves the Role from the indexer for a given namespace and name. +func (s roleNamespaceLister) Get(name string) (*v1beta1.Role, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(rbac.Resource("role"), name) + } + return obj.(*v1beta1.Role), nil +} diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/v1beta1/rolebinding.go b/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/v1beta1/rolebinding.go new file mode 100644 index 00000000..46a48f90 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/rbac/v1beta1/rolebinding.go @@ -0,0 +1,95 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] + +package v1beta1 + +import ( + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + rbac "k8s.io/kubernetes/pkg/apis/rbac" + v1beta1 "k8s.io/kubernetes/pkg/apis/rbac/v1beta1" + "k8s.io/kubernetes/pkg/client/cache" +) + +// RoleBindingLister helps list RoleBindings. +type RoleBindingLister interface { + // List lists all RoleBindings in the indexer. + List(selector labels.Selector) (ret []*v1beta1.RoleBinding, err error) + // RoleBindings returns an object that can list and get RoleBindings. + RoleBindings(namespace string) RoleBindingNamespaceLister + RoleBindingListerExpansion +} + +// roleBindingLister implements the RoleBindingLister interface. +type roleBindingLister struct { + indexer cache.Indexer +} + +// NewRoleBindingLister returns a new RoleBindingLister. +func NewRoleBindingLister(indexer cache.Indexer) RoleBindingLister { + return &roleBindingLister{indexer: indexer} +} + +// List lists all RoleBindings in the indexer. +func (s *roleBindingLister) List(selector labels.Selector) (ret []*v1beta1.RoleBinding, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.RoleBinding)) + }) + return ret, err +} + +// RoleBindings returns an object that can list and get RoleBindings. +func (s *roleBindingLister) RoleBindings(namespace string) RoleBindingNamespaceLister { + return roleBindingNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// RoleBindingNamespaceLister helps list and get RoleBindings. +type RoleBindingNamespaceLister interface { + // List lists all RoleBindings in the indexer for a given namespace. + List(selector labels.Selector) (ret []*v1beta1.RoleBinding, err error) + // Get retrieves the RoleBinding from the indexer for a given namespace and name. + Get(name string) (*v1beta1.RoleBinding, error) + RoleBindingNamespaceListerExpansion +} + +// roleBindingNamespaceLister implements the RoleBindingNamespaceLister +// interface. +type roleBindingNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all RoleBindings in the indexer for a given namespace. +func (s roleBindingNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.RoleBinding, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.RoleBinding)) + }) + return ret, err +} + +// Get retrieves the RoleBinding from the indexer for a given namespace and name. +func (s roleBindingNamespaceLister) Get(name string) (*v1beta1.RoleBinding, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(rbac.Resource("rolebinding"), name) + } + return obj.(*v1beta1.RoleBinding), nil +} diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/storage/internalversion/BUILD b/vendor/k8s.io/kubernetes/pkg/client/listers/storage/internalversion/BUILD index f368232f..719e1045 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/storage/internalversion/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/storage/internalversion/BUILD @@ -15,10 +15,10 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//pkg/apis/storage:go_default_library", "//pkg/client/cache:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/storage/internalversion/expansion_generated.go b/vendor/k8s.io/kubernetes/pkg/client/listers/storage/internalversion/expansion_generated.go index 23252662..11d21d7a 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/storage/internalversion/expansion_generated.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/storage/internalversion/expansion_generated.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package internalversion diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/storage/internalversion/storageclass.go b/vendor/k8s.io/kubernetes/pkg/client/listers/storage/internalversion/storageclass.go index dee42d60..a4a0307f 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/storage/internalversion/storageclass.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/storage/internalversion/storageclass.go @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package internalversion import ( "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" - api "k8s.io/kubernetes/pkg/api" storage "k8s.io/kubernetes/pkg/apis/storage" "k8s.io/kubernetes/pkg/client/cache" ) @@ -55,7 +55,7 @@ func (s *storageClassLister) List(selector labels.Selector) (ret []*storage.Stor // Get retrieves the StorageClass from the index for a given name. func (s *storageClassLister) Get(name string) (*storage.StorageClass, error) { - key := &storage.StorageClass{ObjectMeta: api.ObjectMeta{Name: name}} + key := &storage.StorageClass{ObjectMeta: v1.ObjectMeta{Name: name}} obj, exists, err := s.indexer.Get(key) if err != nil { return nil, err diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/storage/v1beta1/BUILD b/vendor/k8s.io/kubernetes/pkg/client/listers/storage/v1beta1/BUILD index bdb2e378..b376dfd5 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/storage/v1beta1/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/storage/v1beta1/BUILD @@ -15,11 +15,11 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api/v1:go_default_library", "//pkg/apis/storage:go_default_library", "//pkg/apis/storage/v1beta1:go_default_library", "//pkg/client/cache:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/storage/v1beta1/expansion_generated.go b/vendor/k8s.io/kubernetes/pkg/client/listers/storage/v1beta1/expansion_generated.go index 4ef431dc..41ee1ee0 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/storage/v1beta1/expansion_generated.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/storage/v1beta1/expansion_generated.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package v1beta1 diff --git a/vendor/k8s.io/kubernetes/pkg/client/listers/storage/v1beta1/storageclass.go b/vendor/k8s.io/kubernetes/pkg/client/listers/storage/v1beta1/storageclass.go index 63b64a0a..5d0904ac 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/listers/storage/v1beta1/storageclass.go +++ b/vendor/k8s.io/kubernetes/pkg/client/listers/storage/v1beta1/storageclass.go @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1alpha1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/meta/v1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] +// This file was automatically generated by lister-gen with arguments: --input-dirs=[k8s.io/kubernetes/pkg/api,k8s.io/kubernetes/pkg/api/v1,k8s.io/kubernetes/pkg/apis/abac,k8s.io/kubernetes/pkg/apis/abac/v0,k8s.io/kubernetes/pkg/apis/abac/v1beta1,k8s.io/kubernetes/pkg/apis/apps,k8s.io/kubernetes/pkg/apis/apps/v1beta1,k8s.io/kubernetes/pkg/apis/authentication,k8s.io/kubernetes/pkg/apis/authentication/v1beta1,k8s.io/kubernetes/pkg/apis/authorization,k8s.io/kubernetes/pkg/apis/authorization/v1beta1,k8s.io/kubernetes/pkg/apis/autoscaling,k8s.io/kubernetes/pkg/apis/autoscaling/v1,k8s.io/kubernetes/pkg/apis/batch,k8s.io/kubernetes/pkg/apis/batch/v1,k8s.io/kubernetes/pkg/apis/batch/v2alpha1,k8s.io/kubernetes/pkg/apis/certificates,k8s.io/kubernetes/pkg/apis/certificates/v1beta1,k8s.io/kubernetes/pkg/apis/componentconfig,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,k8s.io/kubernetes/pkg/apis/extensions,k8s.io/kubernetes/pkg/apis/extensions/v1beta1,k8s.io/kubernetes/pkg/apis/imagepolicy,k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy,k8s.io/kubernetes/pkg/apis/policy/v1alpha1,k8s.io/kubernetes/pkg/apis/policy/v1beta1,k8s.io/kubernetes/pkg/apis/rbac,k8s.io/kubernetes/pkg/apis/rbac/v1alpha1,k8s.io/kubernetes/pkg/apis/rbac/v1beta1,k8s.io/kubernetes/pkg/apis/storage,k8s.io/kubernetes/pkg/apis/storage/v1beta1] package v1beta1 import ( "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" - v1 "k8s.io/kubernetes/pkg/api/v1" storage "k8s.io/kubernetes/pkg/apis/storage" v1beta1 "k8s.io/kubernetes/pkg/apis/storage/v1beta1" "k8s.io/kubernetes/pkg/client/cache" diff --git a/vendor/k8s.io/kubernetes/pkg/client/record/BUILD b/vendor/k8s.io/kubernetes/pkg/client/record/BUILD index 1f58063a..0eeae3ea 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/record/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/record/BUILD @@ -19,8 +19,6 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/api/v1:go_default_library", - "//pkg/client/restclient:go_default_library", - "//pkg/util/clock:go_default_library", "//pkg/util/strategicpatch:go_default_library", "//vendor:github.com/golang/glog", "//vendor:github.com/golang/groupcache/lru", @@ -30,6 +28,8 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/util/runtime", "//vendor:k8s.io/apimachinery/pkg/util/sets", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", + "//vendor:k8s.io/client-go/util/clock", ], ) @@ -44,13 +44,13 @@ go_test( deps = [ "//pkg/api/install:go_default_library", "//pkg/api/v1:go_default_library", - "//pkg/client/restclient:go_default_library", - "//pkg/util/clock:go_default_library", "//pkg/util/strategicpatch:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/diff", + "//vendor:k8s.io/client-go/rest", + "//vendor:k8s.io/client-go/util/clock", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/record/event.go b/vendor/k8s.io/kubernetes/pkg/client/record/event.go index 2b0bf5db..d3ece3f3 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/record/event.go +++ b/vendor/k8s.io/kubernetes/pkg/client/record/event.go @@ -26,9 +26,9 @@ import ( "k8s.io/apimachinery/pkg/runtime" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/watch" + restclient "k8s.io/client-go/rest" + "k8s.io/client-go/util/clock" "k8s.io/kubernetes/pkg/api/v1" - "k8s.io/kubernetes/pkg/client/restclient" - "k8s.io/kubernetes/pkg/util/clock" "net/http" @@ -298,10 +298,10 @@ func (recorder *recorderImpl) makeEvent(ref *v1.ObjectReference, eventtype, reas t := metav1.Time{Time: recorder.clock.Now()} namespace := ref.Namespace if namespace == "" { - namespace = v1.NamespaceDefault + namespace = metav1.NamespaceDefault } return &v1.Event{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: fmt.Sprintf("%v.%x", ref.Name, t.UnixNano()), Namespace: namespace, }, diff --git a/vendor/k8s.io/kubernetes/pkg/client/record/event_test.go b/vendor/k8s.io/kubernetes/pkg/client/record/event_test.go index bc13c7f2..256b6b4e 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/record/event_test.go +++ b/vendor/k8s.io/kubernetes/pkg/client/record/event_test.go @@ -28,10 +28,10 @@ import ( "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" k8sruntime "k8s.io/apimachinery/pkg/runtime" + restclient "k8s.io/client-go/rest" + "k8s.io/client-go/util/clock" _ "k8s.io/kubernetes/pkg/api/install" // To register api.Pod used in tests below "k8s.io/kubernetes/pkg/api/v1" - "k8s.io/kubernetes/pkg/client/restclient" - "k8s.io/kubernetes/pkg/util/clock" "k8s.io/kubernetes/pkg/util/strategicpatch" ) @@ -103,7 +103,7 @@ func OnPatchFactory(testCache map[string]*v1.Event, patchEvent chan<- *v1.Event) func TestEventf(t *testing.T) { testPod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ SelfLink: "/api/version/pods/foo", Name: "foo", Namespace: "baz", @@ -111,7 +111,7 @@ func TestEventf(t *testing.T) { }, } testPod2 := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ SelfLink: "/api/version/pods/foo", Name: "foo", Namespace: "baz", @@ -140,7 +140,7 @@ func TestEventf(t *testing.T) { messageFmt: "some verbose message: %v", elements: []interface{}{1}, expect: &v1.Event{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "baz", }, @@ -168,7 +168,7 @@ func TestEventf(t *testing.T) { messageFmt: "some other verbose message: %v", elements: []interface{}{1}, expect: &v1.Event{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "baz", }, @@ -195,7 +195,7 @@ func TestEventf(t *testing.T) { messageFmt: "some verbose message: %v", elements: []interface{}{1}, expect: &v1.Event{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "baz", }, @@ -223,7 +223,7 @@ func TestEventf(t *testing.T) { messageFmt: "some verbose message: %v", elements: []interface{}{1}, expect: &v1.Event{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "baz", }, @@ -251,7 +251,7 @@ func TestEventf(t *testing.T) { messageFmt: "some verbose message: %v", elements: []interface{}{1}, expect: &v1.Event{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "baz", }, @@ -279,7 +279,7 @@ func TestEventf(t *testing.T) { messageFmt: "some verbose message: %v", elements: []interface{}{1}, expect: &v1.Event{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "baz", }, @@ -307,7 +307,7 @@ func TestEventf(t *testing.T) { messageFmt: "some verbose message: %v", elements: []interface{}{1}, expect: &v1.Event{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "baz", }, @@ -524,7 +524,7 @@ func TestLotsOfEvents(t *testing.T) { func TestEventfNoNamespace(t *testing.T) { testPod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ SelfLink: "/api/version/pods/foo", Name: "foo", UID: "bar", @@ -551,7 +551,7 @@ func TestEventfNoNamespace(t *testing.T) { messageFmt: "some verbose message: %v", elements: []interface{}{1}, expect: &v1.Event{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "default", }, @@ -621,7 +621,7 @@ func TestEventfNoNamespace(t *testing.T) { func TestMultiSinkCache(t *testing.T) { testPod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ SelfLink: "/api/version/pods/foo", Name: "foo", Namespace: "baz", @@ -629,7 +629,7 @@ func TestMultiSinkCache(t *testing.T) { }, } testPod2 := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ SelfLink: "/api/version/pods/foo", Name: "foo", Namespace: "baz", @@ -658,7 +658,7 @@ func TestMultiSinkCache(t *testing.T) { messageFmt: "some verbose message: %v", elements: []interface{}{1}, expect: &v1.Event{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "baz", }, @@ -686,7 +686,7 @@ func TestMultiSinkCache(t *testing.T) { messageFmt: "some other verbose message: %v", elements: []interface{}{1}, expect: &v1.Event{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "baz", }, @@ -713,7 +713,7 @@ func TestMultiSinkCache(t *testing.T) { messageFmt: "some verbose message: %v", elements: []interface{}{1}, expect: &v1.Event{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "baz", }, @@ -741,7 +741,7 @@ func TestMultiSinkCache(t *testing.T) { messageFmt: "some verbose message: %v", elements: []interface{}{1}, expect: &v1.Event{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "baz", }, @@ -769,7 +769,7 @@ func TestMultiSinkCache(t *testing.T) { messageFmt: "some verbose message: %v", elements: []interface{}{1}, expect: &v1.Event{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "baz", }, @@ -797,7 +797,7 @@ func TestMultiSinkCache(t *testing.T) { messageFmt: "some verbose message: %v", elements: []interface{}{1}, expect: &v1.Event{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "baz", }, @@ -825,7 +825,7 @@ func TestMultiSinkCache(t *testing.T) { messageFmt: "some verbose message: %v", elements: []interface{}{1}, expect: &v1.Event{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "baz", }, diff --git a/vendor/k8s.io/kubernetes/pkg/client/record/events_cache.go b/vendor/k8s.io/kubernetes/pkg/client/record/events_cache.go index 182c10af..b180fcdb 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/record/events_cache.go +++ b/vendor/k8s.io/kubernetes/pkg/client/record/events_cache.go @@ -27,8 +27,8 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/client-go/util/clock" "k8s.io/kubernetes/pkg/api/v1" - "k8s.io/kubernetes/pkg/util/clock" "k8s.io/kubernetes/pkg/util/strategicpatch" ) @@ -172,7 +172,7 @@ func (e *EventAggregator) EventAggregate(newEvent *v1.Event) (*v1.Event, error) // create a new aggregate event eventCopy := &v1.Event{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: fmt.Sprintf("%v.%x", newEvent.InvolvedObject.Name, now.UnixNano()), Namespace: newEvent.Namespace, }, @@ -244,7 +244,7 @@ func (e *eventLogger) eventObserve(newEvent *v1.Event) (*v1.Event, []byte, error newData, _ := json.Marshal(event) oldData, _ := json.Marshal(eventCopy2) - patch, err = strategicpatch.CreateStrategicMergePatch(oldData, newData, event) + patch, err = strategicpatch.CreateTwoWayMergePatch(oldData, newData, event) } // record our new observation diff --git a/vendor/k8s.io/kubernetes/pkg/client/record/events_cache_test.go b/vendor/k8s.io/kubernetes/pkg/client/record/events_cache_test.go index 966ba09d..0ccc1874 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/record/events_cache_test.go +++ b/vendor/k8s.io/kubernetes/pkg/client/record/events_cache_test.go @@ -24,8 +24,8 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/diff" + "k8s.io/client-go/util/clock" "k8s.io/kubernetes/pkg/api/v1" - "k8s.io/kubernetes/pkg/util/clock" ) func makeObjectReference(kind, name, namespace string) v1.ObjectReference { diff --git a/vendor/k8s.io/kubernetes/pkg/client/restclient/BUILD b/vendor/k8s.io/kubernetes/pkg/client/restclient/BUILD deleted file mode 100644 index 8d655235..00000000 --- a/vendor/k8s.io/kubernetes/pkg/client/restclient/BUILD +++ /dev/null @@ -1,99 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = [ - "client.go", - "config.go", - "plugin.go", - "request.go", - "transport.go", - "url_utils.go", - "urlbackoff.go", - "versions.go", - ], - tags = ["automanaged"], - deps = [ - "//pkg/api:go_default_library", - "//pkg/api/v1:go_default_library", - "//pkg/api/validation/path:go_default_library", - "//pkg/client/metrics:go_default_library", - "//pkg/client/restclient/watch:go_default_library", - "//pkg/client/transport:go_default_library", - "//pkg/client/unversioned/clientcmd/api:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/util/cert:go_default_library", - "//pkg/util/flowcontrol:go_default_library", - "//pkg/version:go_default_library", - "//vendor:github.com/golang/glog", - "//vendor:k8s.io/apimachinery/pkg/api/errors", - "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", - "//vendor:k8s.io/apimachinery/pkg/labels", - "//vendor:k8s.io/apimachinery/pkg/runtime", - "//vendor:k8s.io/apimachinery/pkg/runtime/schema", - "//vendor:k8s.io/apimachinery/pkg/runtime/serializer/streaming", - "//vendor:k8s.io/apimachinery/pkg/util/net", - "//vendor:k8s.io/apimachinery/pkg/util/sets", - "//vendor:k8s.io/apimachinery/pkg/watch", - ], -) - -go_test( - name = "go_default_test", - srcs = [ - "client_test.go", - "config_test.go", - "plugin_test.go", - "request_test.go", - "url_utils_test.go", - "urlbackoff_test.go", - ], - library = ":go_default_library", - tags = ["automanaged"], - deps = [ - "//pkg/api:go_default_library", - "//pkg/api/testapi:go_default_library", - "//pkg/api/v1:go_default_library", - "//pkg/client/restclient/watch:go_default_library", - "//pkg/client/unversioned/clientcmd/api:go_default_library", - "//pkg/util/clock:go_default_library", - "//pkg/util/flowcontrol:go_default_library", - "//pkg/util/httpstream:go_default_library", - "//pkg/util/intstr:go_default_library", - "//pkg/util/testing:go_default_library", - "//vendor:github.com/google/gofuzz", - "//vendor:k8s.io/apimachinery/pkg/api/errors", - "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", - "//vendor:k8s.io/apimachinery/pkg/labels", - "//vendor:k8s.io/apimachinery/pkg/runtime", - "//vendor:k8s.io/apimachinery/pkg/runtime/schema", - "//vendor:k8s.io/apimachinery/pkg/runtime/serializer/streaming", - "//vendor:k8s.io/apimachinery/pkg/util/diff", - "//vendor:k8s.io/apimachinery/pkg/watch", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//pkg/client/restclient/fake:all-srcs", - "//pkg/client/restclient/watch:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/vendor/k8s.io/kubernetes/pkg/client/restclient/OWNERS b/vendor/k8s.io/kubernetes/pkg/client/restclient/OWNERS deleted file mode 100755 index 8d97da00..00000000 --- a/vendor/k8s.io/kubernetes/pkg/client/restclient/OWNERS +++ /dev/null @@ -1,24 +0,0 @@ -reviewers: -- thockin -- smarterclayton -- caesarxuchao -- wojtek-t -- deads2k -- brendandburns -- liggitt -- nikhiljindal -- gmarek -- erictune -- sttts -- luxas -- dims -- errordeveloper -- hongchaodeng -- krousey -- resouer -- cjcullen -- rmmh -- lixiaobing10051267 -- asalkeld -- juanvallejo -- lojies diff --git a/vendor/k8s.io/kubernetes/pkg/client/restclient/client.go b/vendor/k8s.io/kubernetes/pkg/client/restclient/client.go deleted file mode 100644 index 2147ef4e..00000000 --- a/vendor/k8s.io/kubernetes/pkg/client/restclient/client.go +++ /dev/null @@ -1,258 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package restclient - -import ( - "fmt" - "mime" - "net/http" - "net/url" - "os" - "strconv" - "strings" - "time" - - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/util/flowcontrol" -) - -const ( - // Environment variables: Note that the duration should be long enough that the backoff - // persists for some reasonable time (i.e. 120 seconds). The typical base might be "1". - envBackoffBase = "KUBE_CLIENT_BACKOFF_BASE" - envBackoffDuration = "KUBE_CLIENT_BACKOFF_DURATION" -) - -// Interface captures the set of operations for generically interacting with Kubernetes REST apis. -type Interface interface { - GetRateLimiter() flowcontrol.RateLimiter - Verb(verb string) *Request - Post() *Request - Put() *Request - Patch(pt api.PatchType) *Request - Get() *Request - Delete() *Request - APIVersion() schema.GroupVersion -} - -// RESTClient imposes common Kubernetes API conventions on a set of resource paths. -// The baseURL is expected to point to an HTTP or HTTPS path that is the parent -// of one or more resources. The server should return a decodable API resource -// object, or an api.Status object which contains information about the reason for -// any failure. -// -// Most consumers should use client.New() to get a Kubernetes API client. -type RESTClient struct { - // base is the root URL for all invocations of the client - base *url.URL - // versionedAPIPath is a path segment connecting the base URL to the resource root - versionedAPIPath string - - // contentConfig is the information used to communicate with the server. - contentConfig ContentConfig - - // serializers contain all serializers for underlying content type. - serializers Serializers - - // creates BackoffManager that is passed to requests. - createBackoffMgr func() BackoffManager - - // TODO extract this into a wrapper interface via the RESTClient interface in kubectl. - Throttle flowcontrol.RateLimiter - - // Set specific behavior of the client. If not set http.DefaultClient will be used. - Client *http.Client -} - -type Serializers struct { - Encoder runtime.Encoder - Decoder runtime.Decoder - StreamingSerializer runtime.Serializer - Framer runtime.Framer - RenegotiatedDecoder func(contentType string, params map[string]string) (runtime.Decoder, error) -} - -// NewRESTClient creates a new RESTClient. This client performs generic REST functions -// such as Get, Put, Post, and Delete on specified paths. Codec controls encoding and -// decoding of responses from the server. -func NewRESTClient(baseURL *url.URL, versionedAPIPath string, config ContentConfig, maxQPS float32, maxBurst int, rateLimiter flowcontrol.RateLimiter, client *http.Client) (*RESTClient, error) { - base := *baseURL - if !strings.HasSuffix(base.Path, "/") { - base.Path += "/" - } - base.RawQuery = "" - base.Fragment = "" - - if config.GroupVersion == nil { - config.GroupVersion = &schema.GroupVersion{} - } - if len(config.ContentType) == 0 { - config.ContentType = "application/json" - } - serializers, err := createSerializers(config) - if err != nil { - return nil, err - } - - var throttle flowcontrol.RateLimiter - if maxQPS > 0 && rateLimiter == nil { - throttle = flowcontrol.NewTokenBucketRateLimiter(maxQPS, maxBurst) - } else if rateLimiter != nil { - throttle = rateLimiter - } - return &RESTClient{ - base: &base, - versionedAPIPath: versionedAPIPath, - contentConfig: config, - serializers: *serializers, - createBackoffMgr: readExpBackoffConfig, - Throttle: throttle, - Client: client, - }, nil -} - -// GetRateLimiter returns rate limier for a given client, or nil if it's called on a nil client -func (c *RESTClient) GetRateLimiter() flowcontrol.RateLimiter { - if c == nil { - return nil - } - return c.Throttle -} - -// readExpBackoffConfig handles the internal logic of determining what the -// backoff policy is. By default if no information is available, NoBackoff. -// TODO Generalize this see #17727 . -func readExpBackoffConfig() BackoffManager { - backoffBase := os.Getenv(envBackoffBase) - backoffDuration := os.Getenv(envBackoffDuration) - - backoffBaseInt, errBase := strconv.ParseInt(backoffBase, 10, 64) - backoffDurationInt, errDuration := strconv.ParseInt(backoffDuration, 10, 64) - if errBase != nil || errDuration != nil { - return &NoBackoff{} - } - return &URLBackoff{ - Backoff: flowcontrol.NewBackOff( - time.Duration(backoffBaseInt)*time.Second, - time.Duration(backoffDurationInt)*time.Second)} -} - -// createSerializers creates all necessary serializers for given contentType. -// TODO: the negotiated serializer passed to this method should probably return -// serializers that control decoding and versioning without this package -// being aware of the types. Depends on whether RESTClient must deal with -// generic infrastructure. -func createSerializers(config ContentConfig) (*Serializers, error) { - mediaTypes := config.NegotiatedSerializer.SupportedMediaTypes() - contentType := config.ContentType - mediaType, _, err := mime.ParseMediaType(contentType) - if err != nil { - return nil, fmt.Errorf("the content type specified in the client configuration is not recognized: %v", err) - } - info, ok := runtime.SerializerInfoForMediaType(mediaTypes, mediaType) - if !ok { - if len(contentType) != 0 || len(mediaTypes) == 0 { - return nil, fmt.Errorf("no serializers registered for %s", contentType) - } - info = mediaTypes[0] - } - - internalGV := schema.GroupVersions{ - { - Group: config.GroupVersion.Group, - Version: runtime.APIVersionInternal, - }, - // always include the legacy group as a decoding target to handle non-error `Status` return types - { - Group: "", - Version: runtime.APIVersionInternal, - }, - } - - s := &Serializers{ - Encoder: config.NegotiatedSerializer.EncoderForVersion(info.Serializer, *config.GroupVersion), - Decoder: config.NegotiatedSerializer.DecoderToVersion(info.Serializer, internalGV), - - RenegotiatedDecoder: func(contentType string, params map[string]string) (runtime.Decoder, error) { - info, ok := runtime.SerializerInfoForMediaType(mediaTypes, contentType) - if !ok { - return nil, fmt.Errorf("serializer for %s not registered", contentType) - } - return config.NegotiatedSerializer.DecoderToVersion(info.Serializer, internalGV), nil - }, - } - if info.StreamSerializer != nil { - s.StreamingSerializer = info.StreamSerializer.Serializer - s.Framer = info.StreamSerializer.Framer - } - - return s, nil -} - -// Verb begins a request with a verb (GET, POST, PUT, DELETE). -// -// Example usage of RESTClient's request building interface: -// c, err := NewRESTClient(...) -// if err != nil { ... } -// resp, err := c.Verb("GET"). -// Path("pods"). -// SelectorParam("labels", "area=staging"). -// Timeout(10*time.Second). -// Do() -// if err != nil { ... } -// list, ok := resp.(*api.PodList) -// -func (c *RESTClient) Verb(verb string) *Request { - backoff := c.createBackoffMgr() - - if c.Client == nil { - return NewRequest(nil, verb, c.base, c.versionedAPIPath, c.contentConfig, c.serializers, backoff, c.Throttle) - } - return NewRequest(c.Client, verb, c.base, c.versionedAPIPath, c.contentConfig, c.serializers, backoff, c.Throttle) -} - -// Post begins a POST request. Short for c.Verb("POST"). -func (c *RESTClient) Post() *Request { - return c.Verb("POST") -} - -// Put begins a PUT request. Short for c.Verb("PUT"). -func (c *RESTClient) Put() *Request { - return c.Verb("PUT") -} - -// Patch begins a PATCH request. Short for c.Verb("Patch"). -func (c *RESTClient) Patch(pt api.PatchType) *Request { - return c.Verb("PATCH").SetHeader("Content-Type", string(pt)) -} - -// Get begins a GET request. Short for c.Verb("GET"). -func (c *RESTClient) Get() *Request { - return c.Verb("GET") -} - -// Delete begins a DELETE request. Short for c.Verb("DELETE"). -func (c *RESTClient) Delete() *Request { - return c.Verb("DELETE") -} - -// APIVersion returns the APIVersion this RESTClient is expected to use. -func (c *RESTClient) APIVersion() schema.GroupVersion { - return *c.contentConfig.GroupVersion -} diff --git a/vendor/k8s.io/kubernetes/pkg/client/restclient/client_test.go b/vendor/k8s.io/kubernetes/pkg/client/restclient/client_test.go deleted file mode 100644 index bcd7ef51..00000000 --- a/vendor/k8s.io/kubernetes/pkg/client/restclient/client_test.go +++ /dev/null @@ -1,339 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package restclient - -import ( - "net/http" - "net/http/httptest" - "net/url" - "os" - "reflect" - "testing" - "time" - - "fmt" - - "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/util/diff" - "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/api/testapi" - utiltesting "k8s.io/kubernetes/pkg/util/testing" -) - -type TestParam struct { - actualError error - expectingError bool - actualCreated bool - expCreated bool - expStatus *metav1.Status - testBody bool - testBodyErrorIsNotNil bool -} - -// TestSerializer makes sure that you're always able to decode an unversioned API object -func TestSerializer(t *testing.T) { - contentConfig := ContentConfig{ - ContentType: "application/json", - GroupVersion: &schema.GroupVersion{Group: "other", Version: runtime.APIVersionInternal}, - NegotiatedSerializer: api.Codecs, - } - - serializer, err := createSerializers(contentConfig) - if err != nil { - t.Fatal(err) - } - // bytes based on actual return from API server when encoding an "unversioned" object - obj, err := runtime.Decode(serializer.Decoder, []byte(`{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Success"}`)) - t.Log(obj) - if err != nil { - t.Fatal(err) - } -} - -func TestDoRequestSuccess(t *testing.T) { - testServer, fakeHandler, status := testServerEnv(t, 200) - defer testServer.Close() - - c, err := restClient(testServer) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - body, err := c.Get().Prefix("test").Do().Raw() - - testParam := TestParam{actualError: err, expectingError: false, expCreated: true, - expStatus: status, testBody: true, testBodyErrorIsNotNil: false} - validate(testParam, t, body, fakeHandler) -} - -func TestDoRequestFailed(t *testing.T) { - status := &metav1.Status{ - Code: http.StatusNotFound, - Status: metav1.StatusFailure, - Reason: metav1.StatusReasonNotFound, - Message: " \"\" not found", - Details: &metav1.StatusDetails{}, - } - expectedBody, _ := runtime.Encode(testapi.Default.Codec(), status) - fakeHandler := utiltesting.FakeHandler{ - StatusCode: 404, - ResponseBody: string(expectedBody), - T: t, - } - testServer := httptest.NewServer(&fakeHandler) - defer testServer.Close() - - c, err := restClient(testServer) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - err = c.Get().Do().Error() - if err == nil { - t.Errorf("unexpected non-error") - } - ss, ok := err.(errors.APIStatus) - if !ok { - t.Errorf("unexpected error type %v", err) - } - actual := ss.Status() - if !reflect.DeepEqual(status, &actual) { - t.Errorf("Unexpected mis-match: %s", diff.ObjectReflectDiff(status, &actual)) - } -} - -func TestDoRawRequestFailed(t *testing.T) { - status := &metav1.Status{ - Code: http.StatusNotFound, - Status: metav1.StatusFailure, - Reason: metav1.StatusReasonNotFound, - Message: "the server could not find the requested resource", - Details: &metav1.StatusDetails{ - Causes: []metav1.StatusCause{ - {Type: metav1.CauseTypeUnexpectedServerResponse, Message: "unknown"}, - }, - }, - } - expectedBody, _ := runtime.Encode(testapi.Default.Codec(), status) - fakeHandler := utiltesting.FakeHandler{ - StatusCode: 404, - ResponseBody: string(expectedBody), - T: t, - } - testServer := httptest.NewServer(&fakeHandler) - defer testServer.Close() - - c, err := restClient(testServer) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - body, err := c.Get().Do().Raw() - - if err == nil || body == nil { - t.Errorf("unexpected non-error: %#v", body) - } - ss, ok := err.(errors.APIStatus) - if !ok { - t.Errorf("unexpected error type %v", err) - } - actual := ss.Status() - if !reflect.DeepEqual(status, &actual) { - t.Errorf("Unexpected mis-match: %s", diff.ObjectReflectDiff(status, &actual)) - } -} - -func TestDoRequestCreated(t *testing.T) { - testServer, fakeHandler, status := testServerEnv(t, 201) - defer testServer.Close() - - c, err := restClient(testServer) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - created := false - body, err := c.Get().Prefix("test").Do().WasCreated(&created).Raw() - - testParam := TestParam{actualError: err, expectingError: false, expCreated: true, - expStatus: status, testBody: false} - validate(testParam, t, body, fakeHandler) -} - -func TestDoRequestNotCreated(t *testing.T) { - testServer, fakeHandler, expectedStatus := testServerEnv(t, 202) - defer testServer.Close() - c, err := restClient(testServer) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - created := false - body, err := c.Get().Prefix("test").Do().WasCreated(&created).Raw() - testParam := TestParam{actualError: err, expectingError: false, expCreated: false, - expStatus: expectedStatus, testBody: false} - validate(testParam, t, body, fakeHandler) -} - -func TestDoRequestAcceptedNoContentReturned(t *testing.T) { - testServer, fakeHandler, _ := testServerEnv(t, 204) - defer testServer.Close() - - c, err := restClient(testServer) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - created := false - body, err := c.Get().Prefix("test").Do().WasCreated(&created).Raw() - testParam := TestParam{actualError: err, expectingError: false, expCreated: false, - testBody: false} - validate(testParam, t, body, fakeHandler) -} - -func TestBadRequest(t *testing.T) { - testServer, fakeHandler, _ := testServerEnv(t, 400) - defer testServer.Close() - c, err := restClient(testServer) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - created := false - body, err := c.Get().Prefix("test").Do().WasCreated(&created).Raw() - testParam := TestParam{actualError: err, expectingError: true, expCreated: false, - testBody: true} - validate(testParam, t, body, fakeHandler) -} - -func validate(testParam TestParam, t *testing.T, body []byte, fakeHandler *utiltesting.FakeHandler) { - switch { - case testParam.expectingError && testParam.actualError == nil: - t.Errorf("Expected error") - case !testParam.expectingError && testParam.actualError != nil: - t.Error(testParam.actualError) - } - if !testParam.expCreated { - if testParam.actualCreated { - t.Errorf("Expected object not to be created") - } - } - statusOut, err := runtime.Decode(testapi.Default.Codec(), body) - if testParam.testBody { - if testParam.testBodyErrorIsNotNil { - if err == nil { - t.Errorf("Expected Error") - } - } - } - - if testParam.expStatus != nil { - if !reflect.DeepEqual(testParam.expStatus, statusOut) { - t.Errorf("Unexpected mis-match. Expected %#v. Saw %#v", testParam.expStatus, statusOut) - } - } - fakeHandler.ValidateRequest(t, "/"+api.Registry.GroupOrDie(api.GroupName).GroupVersion.String()+"/test", "GET", nil) - -} - -func TestHttpMethods(t *testing.T) { - testServer, _, _ := testServerEnv(t, 200) - defer testServer.Close() - c, _ := restClient(testServer) - - request := c.Post() - if request == nil { - t.Errorf("Post : Object returned should not be nil") - } - - request = c.Get() - if request == nil { - t.Errorf("Get: Object returned should not be nil") - } - - request = c.Put() - if request == nil { - t.Errorf("Put : Object returned should not be nil") - } - - request = c.Delete() - if request == nil { - t.Errorf("Delete : Object returned should not be nil") - } - - request = c.Patch(api.JSONPatchType) - if request == nil { - t.Errorf("Patch : Object returned should not be nil") - } -} - -func TestCreateBackoffManager(t *testing.T) { - - theUrl, _ := url.Parse("http://localhost") - - // 1 second base backoff + duration of 2 seconds -> exponential backoff for requests. - os.Setenv(envBackoffBase, "1") - os.Setenv(envBackoffDuration, "2") - backoff := readExpBackoffConfig() - backoff.UpdateBackoff(theUrl, nil, 500) - backoff.UpdateBackoff(theUrl, nil, 500) - if backoff.CalculateBackoff(theUrl)/time.Second != 2 { - t.Errorf("Backoff env not working.") - } - - // 0 duration -> no backoff. - os.Setenv(envBackoffBase, "1") - os.Setenv(envBackoffDuration, "0") - backoff.UpdateBackoff(theUrl, nil, 500) - backoff.UpdateBackoff(theUrl, nil, 500) - backoff = readExpBackoffConfig() - if backoff.CalculateBackoff(theUrl)/time.Second != 0 { - t.Errorf("Zero backoff duration, but backoff still occuring.") - } - - // No env -> No backoff. - os.Setenv(envBackoffBase, "") - os.Setenv(envBackoffDuration, "") - backoff = readExpBackoffConfig() - backoff.UpdateBackoff(theUrl, nil, 500) - backoff.UpdateBackoff(theUrl, nil, 500) - if backoff.CalculateBackoff(theUrl)/time.Second != 0 { - t.Errorf("Backoff should have been 0.") - } - -} - -func testServerEnv(t *testing.T, statusCode int) (*httptest.Server, *utiltesting.FakeHandler, *metav1.Status) { - status := &metav1.Status{Status: fmt.Sprintf("%s", metav1.StatusSuccess)} - expectedBody, _ := runtime.Encode(testapi.Default.Codec(), status) - fakeHandler := utiltesting.FakeHandler{ - StatusCode: statusCode, - ResponseBody: string(expectedBody), - T: t, - } - testServer := httptest.NewServer(&fakeHandler) - return testServer, &fakeHandler, status -} - -func restClient(testServer *httptest.Server) (*RESTClient, error) { - c, err := RESTClientFor(&Config{ - Host: testServer.URL, - ContentConfig: ContentConfig{ - GroupVersion: &api.Registry.GroupOrDie(api.GroupName).GroupVersion, - NegotiatedSerializer: testapi.Default.NegotiatedSerializer(), - }, - Username: "user", - Password: "pass", - }) - return c, err -} diff --git a/vendor/k8s.io/kubernetes/pkg/client/restclient/config.go b/vendor/k8s.io/kubernetes/pkg/client/restclient/config.go deleted file mode 100644 index 2de79501..00000000 --- a/vendor/k8s.io/kubernetes/pkg/client/restclient/config.go +++ /dev/null @@ -1,380 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package restclient - -import ( - "fmt" - "io/ioutil" - "net" - "net/http" - "os" - "path" - gruntime "runtime" - "strings" - "time" - - "github.com/golang/glog" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/api" - clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api" - certutil "k8s.io/kubernetes/pkg/util/cert" - "k8s.io/kubernetes/pkg/util/flowcontrol" - "k8s.io/kubernetes/pkg/version" -) - -const ( - DefaultQPS float32 = 5.0 - DefaultBurst int = 10 -) - -// Config holds the common attributes that can be passed to a Kubernetes client on -// initialization. -type Config struct { - // Host must be a host string, a host:port pair, or a URL to the base of the apiserver. - // If a URL is given then the (optional) Path of that URL represents a prefix that must - // be appended to all request URIs used to access the apiserver. This allows a frontend - // proxy to easily relocate all of the apiserver endpoints. - Host string - // APIPath is a sub-path that points to an API root. - APIPath string - // Prefix is the sub path of the server. If not specified, the client will set - // a default value. Use "/" to indicate the server root should be used - Prefix string - - // ContentConfig contains settings that affect how objects are transformed when - // sent to the server. - ContentConfig - - // Server requires Basic authentication - Username string - Password string - - // Server requires Bearer authentication. This client will not attempt to use - // refresh tokens for an OAuth2 flow. - // TODO: demonstrate an OAuth2 compatible client. - BearerToken string - - // Impersonate is the configuration that RESTClient will use for impersonation. - Impersonate ImpersonationConfig - - // Server requires plugin-specified authentication. - AuthProvider *clientcmdapi.AuthProviderConfig - - // Callback to persist config for AuthProvider. - AuthConfigPersister AuthProviderConfigPersister - - // TLSClientConfig contains settings to enable transport layer security - TLSClientConfig - - // Server should be accessed without verifying the TLS - // certificate. For testing only. - Insecure bool - - // UserAgent is an optional field that specifies the caller of this request. - UserAgent string - - // Transport may be used for custom HTTP behavior. This attribute may not - // be specified with the TLS client certificate options. Use WrapTransport - // for most client level operations. - Transport http.RoundTripper - // WrapTransport will be invoked for custom HTTP behavior after the underlying - // transport is initialized (either the transport created from TLSClientConfig, - // Transport, or http.DefaultTransport). The config may layer other RoundTrippers - // on top of the returned RoundTripper. - WrapTransport func(rt http.RoundTripper) http.RoundTripper - - // QPS indicates the maximum QPS to the master from this client. - // If it's zero, the created RESTClient will use DefaultQPS: 5 - QPS float32 - - // Maximum burst for throttle. - // If it's zero, the created RESTClient will use DefaultBurst: 10. - Burst int - - // Rate limiter for limiting connections to the master from this client. If present overwrites QPS/Burst - RateLimiter flowcontrol.RateLimiter - - // The maximum length of time to wait before giving up on a server request. A value of zero means no timeout. - Timeout time.Duration - - // Version forces a specific version to be used (if registered) - // Do we need this? - // Version string -} - -// ImpersonationConfig has all the available impersonation options -type ImpersonationConfig struct { - // UserName is the username to impersonate on each request. - UserName string - // Groups are the groups to impersonate on each request. - Groups []string - // Extra is a free-form field which can be used to link some authentication information - // to authorization information. This field allows you to impersonate it. - Extra map[string][]string -} - -// TLSClientConfig contains settings to enable transport layer security -type TLSClientConfig struct { - // Server requires TLS client certificate authentication - CertFile string - // Server requires TLS client certificate authentication - KeyFile string - // Trusted root certificates for server - CAFile string - - // CertData holds PEM-encoded bytes (typically read from a client certificate file). - // CertData takes precedence over CertFile - CertData []byte - // KeyData holds PEM-encoded bytes (typically read from a client certificate key file). - // KeyData takes precedence over KeyFile - KeyData []byte - // CAData holds PEM-encoded bytes (typically read from a root certificates bundle). - // CAData takes precedence over CAFile - CAData []byte -} - -type ContentConfig struct { - // AcceptContentTypes specifies the types the client will accept and is optional. - // If not set, ContentType will be used to define the Accept header - AcceptContentTypes string - // ContentType specifies the wire format used to communicate with the server. - // This value will be set as the Accept header on requests made to the server, and - // as the default content type on any object sent to the server. If not set, - // "application/json" is used. - ContentType string - // GroupVersion is the API version to talk to. Must be provided when initializing - // a RESTClient directly. When initializing a Client, will be set with the default - // code version. - GroupVersion *schema.GroupVersion - // NegotiatedSerializer is used for obtaining encoders and decoders for multiple - // supported media types. - NegotiatedSerializer runtime.NegotiatedSerializer -} - -// RESTClientFor returns a RESTClient that satisfies the requested attributes on a client Config -// object. Note that a RESTClient may require fields that are optional when initializing a Client. -// A RESTClient created by this method is generic - it expects to operate on an API that follows -// the Kubernetes conventions, but may not be the Kubernetes API. -func RESTClientFor(config *Config) (*RESTClient, error) { - if config.GroupVersion == nil { - return nil, fmt.Errorf("GroupVersion is required when initializing a RESTClient") - } - if config.NegotiatedSerializer == nil { - return nil, fmt.Errorf("NegotiatedSerializer is required when initializing a RESTClient") - } - qps := config.QPS - if config.QPS == 0.0 { - qps = DefaultQPS - } - burst := config.Burst - if config.Burst == 0 { - burst = DefaultBurst - } - - baseURL, versionedAPIPath, err := defaultServerUrlFor(config) - if err != nil { - return nil, err - } - - transport, err := TransportFor(config) - if err != nil { - return nil, err - } - - var httpClient *http.Client - if transport != http.DefaultTransport { - httpClient = &http.Client{Transport: transport} - if config.Timeout > 0 { - httpClient.Timeout = config.Timeout - } - } - - return NewRESTClient(baseURL, versionedAPIPath, config.ContentConfig, qps, burst, config.RateLimiter, httpClient) -} - -// UnversionedRESTClientFor is the same as RESTClientFor, except that it allows -// the config.Version to be empty. -func UnversionedRESTClientFor(config *Config) (*RESTClient, error) { - if config.NegotiatedSerializer == nil { - return nil, fmt.Errorf("NeogitatedSerializer is required when initializing a RESTClient") - } - - baseURL, versionedAPIPath, err := defaultServerUrlFor(config) - if err != nil { - return nil, err - } - - transport, err := TransportFor(config) - if err != nil { - return nil, err - } - - var httpClient *http.Client - if transport != http.DefaultTransport { - httpClient = &http.Client{Transport: transport} - if config.Timeout > 0 { - httpClient.Timeout = config.Timeout - } - } - - versionConfig := config.ContentConfig - if versionConfig.GroupVersion == nil { - v := metav1.SchemeGroupVersion - versionConfig.GroupVersion = &v - } - - return NewRESTClient(baseURL, versionedAPIPath, versionConfig, config.QPS, config.Burst, config.RateLimiter, httpClient) -} - -// SetKubernetesDefaults sets default values on the provided client config for accessing the -// Kubernetes API or returns an error if any of the defaults are impossible or invalid. -func SetKubernetesDefaults(config *Config) error { - if len(config.UserAgent) == 0 { - config.UserAgent = DefaultKubernetesUserAgent() - } - return nil -} - -// DefaultKubernetesUserAgent returns the default user agent that clients can use. -func DefaultKubernetesUserAgent() string { - commit := version.Get().GitCommit - if len(commit) > 7 { - commit = commit[:7] - } - if len(commit) == 0 { - commit = "unknown" - } - version := version.Get().GitVersion - seg := strings.SplitN(version, "-", 2) - version = seg[0] - return fmt.Sprintf("%s/%s (%s/%s) kubernetes/%s", path.Base(os.Args[0]), version, gruntime.GOOS, gruntime.GOARCH, commit) -} - -// InClusterConfig returns a config object which uses the service account -// kubernetes gives to pods. It's intended for clients that expect to be -// running inside a pod running on kubernetes. It will return an error if -// called from a process not running in a kubernetes environment. -func InClusterConfig() (*Config, error) { - host, port := os.Getenv("KUBERNETES_SERVICE_HOST"), os.Getenv("KUBERNETES_SERVICE_PORT") - if len(host) == 0 || len(port) == 0 { - return nil, fmt.Errorf("unable to load in-cluster configuration, KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT must be defined") - } - - token, err := ioutil.ReadFile("/var/run/secrets/kubernetes.io/serviceaccount/" + api.ServiceAccountTokenKey) - if err != nil { - return nil, err - } - tlsClientConfig := TLSClientConfig{} - rootCAFile := "/var/run/secrets/kubernetes.io/serviceaccount/" + api.ServiceAccountRootCAKey - if _, err := certutil.NewPool(rootCAFile); err != nil { - glog.Errorf("Expected to load root CA config from %s, but got err: %v", rootCAFile, err) - } else { - tlsClientConfig.CAFile = rootCAFile - } - - return &Config{ - // TODO: switch to using cluster DNS. - Host: "https://" + net.JoinHostPort(host, port), - BearerToken: string(token), - TLSClientConfig: tlsClientConfig, - }, nil -} - -// IsConfigTransportTLS returns true if and only if the provided -// config will result in a protected connection to the server when it -// is passed to restclient.RESTClientFor(). Use to determine when to -// send credentials over the wire. -// -// Note: the Insecure flag is ignored when testing for this value, so MITM attacks are -// still possible. -func IsConfigTransportTLS(config Config) bool { - baseURL, _, err := defaultServerUrlFor(&config) - if err != nil { - return false - } - return baseURL.Scheme == "https" -} - -// LoadTLSFiles copies the data from the CertFile, KeyFile, and CAFile fields into the CertData, -// KeyData, and CAFile fields, or returns an error. If no error is returned, all three fields are -// either populated or were empty to start. -func LoadTLSFiles(c *Config) error { - var err error - c.CAData, err = dataFromSliceOrFile(c.CAData, c.CAFile) - if err != nil { - return err - } - - c.CertData, err = dataFromSliceOrFile(c.CertData, c.CertFile) - if err != nil { - return err - } - - c.KeyData, err = dataFromSliceOrFile(c.KeyData, c.KeyFile) - if err != nil { - return err - } - return nil -} - -// dataFromSliceOrFile returns data from the slice (if non-empty), or from the file, -// or an error if an error occurred reading the file -func dataFromSliceOrFile(data []byte, file string) ([]byte, error) { - if len(data) > 0 { - return data, nil - } - if len(file) > 0 { - fileData, err := ioutil.ReadFile(file) - if err != nil { - return []byte{}, err - } - return fileData, nil - } - return nil, nil -} - -func AddUserAgent(config *Config, userAgent string) *Config { - fullUserAgent := DefaultKubernetesUserAgent() + "/" + userAgent - config.UserAgent = fullUserAgent - return config -} - -// AnonymousClientConfig returns a copy of the given config with all user credentials (cert/key, bearer token, and username/password) removed -func AnonymousClientConfig(config *Config) *Config { - // copy only known safe fields - return &Config{ - Host: config.Host, - APIPath: config.APIPath, - Prefix: config.Prefix, - ContentConfig: config.ContentConfig, - TLSClientConfig: TLSClientConfig{ - CAFile: config.TLSClientConfig.CAFile, - CAData: config.TLSClientConfig.CAData, - }, - RateLimiter: config.RateLimiter, - Insecure: config.Insecure, - UserAgent: config.UserAgent, - Transport: config.Transport, - WrapTransport: config.WrapTransport, - QPS: config.QPS, - Burst: config.Burst, - Timeout: config.Timeout, - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/client/restclient/config_test.go b/vendor/k8s.io/kubernetes/pkg/client/restclient/config_test.go deleted file mode 100644 index 474a4bea..00000000 --- a/vendor/k8s.io/kubernetes/pkg/client/restclient/config_test.go +++ /dev/null @@ -1,231 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package restclient - -import ( - "io" - "net/http" - "reflect" - "strings" - "testing" - - fuzz "github.com/google/gofuzz" - - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/util/diff" - "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/api/testapi" - clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api" - "k8s.io/kubernetes/pkg/util/flowcontrol" -) - -func TestIsConfigTransportTLS(t *testing.T) { - testCases := []struct { - Config *Config - TransportTLS bool - }{ - { - Config: &Config{}, - TransportTLS: false, - }, - { - Config: &Config{ - Host: "https://localhost", - }, - TransportTLS: true, - }, - { - Config: &Config{ - Host: "localhost", - TLSClientConfig: TLSClientConfig{ - CertFile: "foo", - }, - }, - TransportTLS: true, - }, - { - Config: &Config{ - Host: "///:://localhost", - TLSClientConfig: TLSClientConfig{ - CertFile: "foo", - }, - }, - TransportTLS: false, - }, - { - Config: &Config{ - Host: "1.2.3.4:567", - Insecure: true, - }, - TransportTLS: true, - }, - } - for _, testCase := range testCases { - if err := SetKubernetesDefaults(testCase.Config); err != nil { - t.Errorf("setting defaults failed for %#v: %v", testCase.Config, err) - continue - } - useTLS := IsConfigTransportTLS(*testCase.Config) - if testCase.TransportTLS != useTLS { - t.Errorf("expected %v for %#v", testCase.TransportTLS, testCase.Config) - } - } -} - -func TestSetKubernetesDefaultsUserAgent(t *testing.T) { - config := &Config{} - if err := SetKubernetesDefaults(config); err != nil { - t.Errorf("unexpected error: %v", err) - } - if !strings.Contains(config.UserAgent, "kubernetes/") { - t.Errorf("no user agent set: %#v", config) - } -} - -func TestRESTClientRequires(t *testing.T) { - if _, err := RESTClientFor(&Config{Host: "127.0.0.1", ContentConfig: ContentConfig{NegotiatedSerializer: testapi.Default.NegotiatedSerializer()}}); err == nil { - t.Errorf("unexpected non-error") - } - if _, err := RESTClientFor(&Config{Host: "127.0.0.1", ContentConfig: ContentConfig{GroupVersion: &api.Registry.GroupOrDie(api.GroupName).GroupVersion}}); err == nil { - t.Errorf("unexpected non-error") - } - if _, err := RESTClientFor(&Config{Host: "127.0.0.1", ContentConfig: ContentConfig{GroupVersion: &api.Registry.GroupOrDie(api.GroupName).GroupVersion, NegotiatedSerializer: testapi.Default.NegotiatedSerializer()}}); err != nil { - t.Errorf("unexpected error: %v", err) - } -} - -type fakeLimiter struct { - FakeSaturation float64 - FakeQPS float32 -} - -func (t *fakeLimiter) TryAccept() bool { - return true -} - -func (t *fakeLimiter) Saturation() float64 { - return t.FakeSaturation -} - -func (t *fakeLimiter) QPS() float32 { - return t.FakeQPS -} - -func (t *fakeLimiter) Stop() {} - -func (t *fakeLimiter) Accept() {} - -type fakeCodec struct{} - -func (c *fakeCodec) Decode([]byte, *schema.GroupVersionKind, runtime.Object) (runtime.Object, *schema.GroupVersionKind, error) { - return nil, nil, nil -} - -func (c *fakeCodec) Encode(obj runtime.Object, stream io.Writer) error { - return nil -} - -type fakeRoundTripper struct{} - -func (r *fakeRoundTripper) RoundTrip(*http.Request) (*http.Response, error) { - return nil, nil -} - -var fakeWrapperFunc = func(http.RoundTripper) http.RoundTripper { - return &fakeRoundTripper{} -} - -type fakeNegotiatedSerializer struct{} - -func (n *fakeNegotiatedSerializer) SupportedMediaTypes() []runtime.SerializerInfo { - return nil -} - -func (n *fakeNegotiatedSerializer) EncoderForVersion(serializer runtime.Encoder, gv runtime.GroupVersioner) runtime.Encoder { - return &fakeCodec{} -} - -func (n *fakeNegotiatedSerializer) DecoderToVersion(serializer runtime.Decoder, gv runtime.GroupVersioner) runtime.Decoder { - return &fakeCodec{} -} - -func TestAnonymousConfig(t *testing.T) { - f := fuzz.New().NilChance(0.0).NumElements(1, 1) - f.Funcs( - func(r *runtime.Codec, f fuzz.Continue) { - codec := &fakeCodec{} - f.Fuzz(codec) - *r = codec - }, - func(r *http.RoundTripper, f fuzz.Continue) { - roundTripper := &fakeRoundTripper{} - f.Fuzz(roundTripper) - *r = roundTripper - }, - func(fn *func(http.RoundTripper) http.RoundTripper, f fuzz.Continue) { - *fn = fakeWrapperFunc - }, - func(r *runtime.NegotiatedSerializer, f fuzz.Continue) { - serializer := &fakeNegotiatedSerializer{} - f.Fuzz(serializer) - *r = serializer - }, - func(r *flowcontrol.RateLimiter, f fuzz.Continue) { - limiter := &fakeLimiter{} - f.Fuzz(limiter) - *r = limiter - }, - // Authentication does not require fuzzer - func(r *AuthProviderConfigPersister, f fuzz.Continue) {}, - func(r *clientcmdapi.AuthProviderConfig, f fuzz.Continue) { - r.Config = map[string]string{} - }, - ) - for i := 0; i < 20; i++ { - original := &Config{} - f.Fuzz(original) - actual := AnonymousClientConfig(original) - expected := *original - - // this is the list of known security related fields, add to this list if a new field - // is added to Config, update AnonymousClientConfig to preserve the field otherwise. - expected.Impersonate = ImpersonationConfig{} - expected.BearerToken = "" - expected.Username = "" - expected.Password = "" - expected.AuthProvider = nil - expected.AuthConfigPersister = nil - expected.TLSClientConfig.CertData = nil - expected.TLSClientConfig.CertFile = "" - expected.TLSClientConfig.KeyData = nil - expected.TLSClientConfig.KeyFile = "" - - // The DeepEqual cannot handle the func comparison, so we just verify if the - // function return the expected object. - if actual.WrapTransport == nil || !reflect.DeepEqual(expected.WrapTransport(nil), &fakeRoundTripper{}) { - t.Fatalf("AnonymousClientConfig dropped the WrapTransport field") - } else { - actual.WrapTransport = nil - expected.WrapTransport = nil - } - - if !reflect.DeepEqual(*actual, expected) { - t.Fatalf("AnonymousClientConfig dropped unexpected fields, identify whether they are security related or not: %s", diff.ObjectGoPrintDiff(expected, actual)) - } - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/client/restclient/fake/BUILD b/vendor/k8s.io/kubernetes/pkg/client/restclient/fake/BUILD index 04bfb6b1..6964e8b7 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/restclient/fake/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/restclient/fake/BUILD @@ -14,10 +14,11 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/api/testapi:go_default_library", - "//pkg/client/restclient:go_default_library", - "//pkg/util/flowcontrol:go_default_library", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", + "//vendor:k8s.io/apimachinery/pkg/types", + "//vendor:k8s.io/client-go/rest", + "//vendor:k8s.io/client-go/util/flowcontrol", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/restclient/fake/fake.go b/vendor/k8s.io/kubernetes/pkg/client/restclient/fake/fake.go index b9ea95f8..adc17212 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/restclient/fake/fake.go +++ b/vendor/k8s.io/kubernetes/pkg/client/restclient/fake/fake.go @@ -24,10 +24,11 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/types" + restclient "k8s.io/client-go/rest" + "k8s.io/client-go/util/flowcontrol" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" - "k8s.io/kubernetes/pkg/client/restclient" - "k8s.io/kubernetes/pkg/util/flowcontrol" ) func CreateHTTPClient(roundTripper func(*http.Request) (*http.Response, error)) *http.Client { @@ -61,7 +62,7 @@ func (c *RESTClient) Put() *restclient.Request { return c.request("PUT") } -func (c *RESTClient) Patch(_ api.PatchType) *restclient.Request { +func (c *RESTClient) Patch(_ types.PatchType) *restclient.Request { return c.request("PATCH") } diff --git a/vendor/k8s.io/kubernetes/pkg/client/restclient/plugin.go b/vendor/k8s.io/kubernetes/pkg/client/restclient/plugin.go deleted file mode 100644 index 06ac3cce..00000000 --- a/vendor/k8s.io/kubernetes/pkg/client/restclient/plugin.go +++ /dev/null @@ -1,73 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package restclient - -import ( - "fmt" - "net/http" - "sync" - - "github.com/golang/glog" - - clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api" -) - -type AuthProvider interface { - // WrapTransport allows the plugin to create a modified RoundTripper that - // attaches authorization headers (or other info) to requests. - WrapTransport(http.RoundTripper) http.RoundTripper - // Login allows the plugin to initialize its configuration. It must not - // require direct user interaction. - Login() error -} - -// Factory generates an AuthProvider plugin. -// clusterAddress is the address of the current cluster. -// config is the initial configuration for this plugin. -// persister allows the plugin to save updated configuration. -type Factory func(clusterAddress string, config map[string]string, persister AuthProviderConfigPersister) (AuthProvider, error) - -// AuthProviderConfigPersister allows a plugin to persist configuration info -// for just itself. -type AuthProviderConfigPersister interface { - Persist(map[string]string) error -} - -// All registered auth provider plugins. -var pluginsLock sync.Mutex -var plugins = make(map[string]Factory) - -func RegisterAuthProviderPlugin(name string, plugin Factory) error { - pluginsLock.Lock() - defer pluginsLock.Unlock() - if _, found := plugins[name]; found { - return fmt.Errorf("Auth Provider Plugin %q was registered twice", name) - } - glog.V(4).Infof("Registered Auth Provider Plugin %q", name) - plugins[name] = plugin - return nil -} - -func GetAuthProvider(clusterAddress string, apc *clientcmdapi.AuthProviderConfig, persister AuthProviderConfigPersister) (AuthProvider, error) { - pluginsLock.Lock() - defer pluginsLock.Unlock() - p, ok := plugins[apc.Name] - if !ok { - return nil, fmt.Errorf("No Auth Provider found for name %q", apc.Name) - } - return p(clusterAddress, apc.Config, persister) -} diff --git a/vendor/k8s.io/kubernetes/pkg/client/restclient/plugin_test.go b/vendor/k8s.io/kubernetes/pkg/client/restclient/plugin_test.go deleted file mode 100644 index 42226fba..00000000 --- a/vendor/k8s.io/kubernetes/pkg/client/restclient/plugin_test.go +++ /dev/null @@ -1,311 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package restclient - -import ( - "fmt" - "net/http" - "reflect" - "strconv" - "testing" - - clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api" -) - -func TestAuthPluginWrapTransport(t *testing.T) { - if err := RegisterAuthProviderPlugin("pluginA", pluginAProvider); err != nil { - t.Errorf("Unexpected error: failed to register pluginA: %v", err) - } - if err := RegisterAuthProviderPlugin("pluginB", pluginBProvider); err != nil { - t.Errorf("Unexpected error: failed to register pluginB: %v", err) - } - if err := RegisterAuthProviderPlugin("pluginFail", pluginFailProvider); err != nil { - t.Errorf("Unexpected error: failed to register pluginFail: %v", err) - } - testCases := []struct { - useWrapTransport bool - plugin string - expectErr bool - expectPluginA bool - expectPluginB bool - }{ - {false, "", false, false, false}, - {false, "pluginA", false, true, false}, - {false, "pluginB", false, false, true}, - {false, "pluginFail", true, false, false}, - {false, "pluginUnknown", true, false, false}, - } - for i, tc := range testCases { - c := Config{} - if tc.useWrapTransport { - // Specify an existing WrapTransport in the config to make sure that - // plugins play nicely. - c.WrapTransport = func(rt http.RoundTripper) http.RoundTripper { - return &wrapTransport{rt} - } - } - if len(tc.plugin) != 0 { - c.AuthProvider = &clientcmdapi.AuthProviderConfig{Name: tc.plugin} - } - tConfig, err := c.TransportConfig() - if err != nil { - // Unknown/bad plugins are expected to fail here. - if !tc.expectErr { - t.Errorf("%d. Did not expect errors loading Auth Plugin: %q. Got: %v", i, tc.plugin, err) - } - continue - } - var fullyWrappedTransport http.RoundTripper - fullyWrappedTransport = &emptyTransport{} - if tConfig.WrapTransport != nil { - fullyWrappedTransport = tConfig.WrapTransport(&emptyTransport{}) - } - res, err := fullyWrappedTransport.RoundTrip(&http.Request{}) - if err != nil { - t.Errorf("%d. Unexpected error in RoundTrip: %v", i, err) - continue - } - hasWrapTransport := res.Header.Get("wrapTransport") == "Y" - hasPluginA := res.Header.Get("pluginA") == "Y" - hasPluginB := res.Header.Get("pluginB") == "Y" - if hasWrapTransport != tc.useWrapTransport { - t.Errorf("%d. Expected Existing config.WrapTransport: %t; Got: %t", i, tc.useWrapTransport, hasWrapTransport) - } - if hasPluginA != tc.expectPluginA { - t.Errorf("%d. Expected Plugin A: %t; Got: %t", i, tc.expectPluginA, hasPluginA) - } - if hasPluginB != tc.expectPluginB { - t.Errorf("%d. Expected Plugin B: %t; Got: %t", i, tc.expectPluginB, hasPluginB) - } - } -} - -func TestAuthPluginPersist(t *testing.T) { - // register pluginA by a different name so we don't collide across tests. - if err := RegisterAuthProviderPlugin("pluginA2", pluginAProvider); err != nil { - t.Errorf("Unexpected error: failed to register pluginA: %v", err) - } - if err := RegisterAuthProviderPlugin("pluginPersist", pluginPersistProvider); err != nil { - t.Errorf("Unexpected error: failed to register pluginPersist: %v", err) - } - fooBarConfig := map[string]string{"foo": "bar"} - testCases := []struct { - plugin string - startingConfig map[string]string - expectedConfigAfterLogin map[string]string - expectedConfigAfterRoundTrip map[string]string - }{ - // non-persisting plugins should work fine without modifying config. - {"pluginA2", map[string]string{}, map[string]string{}, map[string]string{}}, - {"pluginA2", fooBarConfig, fooBarConfig, fooBarConfig}, - // plugins that persist config should be able to persist when they want. - { - "pluginPersist", - map[string]string{}, - map[string]string{ - "login": "Y", - }, - map[string]string{ - "login": "Y", - "roundTrips": "1", - }, - }, - { - "pluginPersist", - map[string]string{ - "login": "Y", - "roundTrips": "123", - }, - map[string]string{ - "login": "Y", - "roundTrips": "123", - }, - map[string]string{ - "login": "Y", - "roundTrips": "124", - }, - }, - } - for i, tc := range testCases { - cfg := &clientcmdapi.AuthProviderConfig{ - Name: tc.plugin, - Config: tc.startingConfig, - } - persister := &inMemoryPersister{make(map[string]string)} - persister.Persist(tc.startingConfig) - plugin, err := GetAuthProvider("127.0.0.1", cfg, persister) - if err != nil { - t.Errorf("%d. Unexpected error: failed to get plugin %q: %v", i, tc.plugin, err) - } - if err := plugin.Login(); err != nil { - t.Errorf("%d. Unexpected error calling Login() w/ plugin %q: %v", i, tc.plugin, err) - } - // Make sure the plugin persisted what we expect after Login(). - if !reflect.DeepEqual(persister.savedConfig, tc.expectedConfigAfterLogin) { - t.Errorf("%d. Unexpected persisted config after calling %s.Login(): \nGot:\n%v\nExpected:\n%v", - i, tc.plugin, persister.savedConfig, tc.expectedConfigAfterLogin) - } - if _, err := plugin.WrapTransport(&emptyTransport{}).RoundTrip(&http.Request{}); err != nil { - t.Errorf("%d. Unexpected error round-tripping w/ plugin %q: %v", i, tc.plugin, err) - } - // Make sure the plugin persisted what we expect after RoundTrip(). - if !reflect.DeepEqual(persister.savedConfig, tc.expectedConfigAfterRoundTrip) { - t.Errorf("%d. Unexpected persisted config after calling %s.WrapTransport.RoundTrip(): \nGot:\n%v\nExpected:\n%v", - i, tc.plugin, persister.savedConfig, tc.expectedConfigAfterLogin) - } - } - -} - -// emptyTransport provides an empty http.Response with an initialized header -// to allow wrapping RoundTrippers to set header values. -type emptyTransport struct{} - -func (*emptyTransport) RoundTrip(req *http.Request) (*http.Response, error) { - res := &http.Response{ - Header: make(map[string][]string), - } - return res, nil -} - -// wrapTransport sets "wrapTransport" = "Y" on the response. -type wrapTransport struct { - rt http.RoundTripper -} - -func (w *wrapTransport) RoundTrip(req *http.Request) (*http.Response, error) { - res, err := w.rt.RoundTrip(req) - if err != nil { - return nil, err - } - res.Header.Add("wrapTransport", "Y") - return res, nil -} - -// wrapTransportA sets "pluginA" = "Y" on the response. -type wrapTransportA struct { - rt http.RoundTripper -} - -func (w *wrapTransportA) RoundTrip(req *http.Request) (*http.Response, error) { - res, err := w.rt.RoundTrip(req) - if err != nil { - return nil, err - } - res.Header.Add("pluginA", "Y") - return res, nil -} - -type pluginA struct{} - -func (*pluginA) WrapTransport(rt http.RoundTripper) http.RoundTripper { - return &wrapTransportA{rt} -} - -func (*pluginA) Login() error { return nil } - -func pluginAProvider(string, map[string]string, AuthProviderConfigPersister) (AuthProvider, error) { - return &pluginA{}, nil -} - -// wrapTransportB sets "pluginB" = "Y" on the response. -type wrapTransportB struct { - rt http.RoundTripper -} - -func (w *wrapTransportB) RoundTrip(req *http.Request) (*http.Response, error) { - res, err := w.rt.RoundTrip(req) - if err != nil { - return nil, err - } - res.Header.Add("pluginB", "Y") - return res, nil -} - -type pluginB struct{} - -func (*pluginB) WrapTransport(rt http.RoundTripper) http.RoundTripper { - return &wrapTransportB{rt} -} - -func (*pluginB) Login() error { return nil } - -func pluginBProvider(string, map[string]string, AuthProviderConfigPersister) (AuthProvider, error) { - return &pluginB{}, nil -} - -// pluginFailProvider simulates a registered AuthPlugin that fails to load. -func pluginFailProvider(string, map[string]string, AuthProviderConfigPersister) (AuthProvider, error) { - return nil, fmt.Errorf("Failed to load AuthProvider") -} - -type inMemoryPersister struct { - savedConfig map[string]string -} - -func (i *inMemoryPersister) Persist(config map[string]string) error { - i.savedConfig = make(map[string]string) - for k, v := range config { - i.savedConfig[k] = v - } - return nil -} - -// wrapTransportPersist increments the "roundTrips" entry from the config when -// roundTrip is called. -type wrapTransportPersist struct { - rt http.RoundTripper - config map[string]string - persister AuthProviderConfigPersister -} - -func (w *wrapTransportPersist) RoundTrip(req *http.Request) (*http.Response, error) { - roundTrips := 0 - if rtVal, ok := w.config["roundTrips"]; ok { - var err error - roundTrips, err = strconv.Atoi(rtVal) - if err != nil { - return nil, err - } - } - roundTrips++ - w.config["roundTrips"] = fmt.Sprintf("%d", roundTrips) - if err := w.persister.Persist(w.config); err != nil { - return nil, err - } - return w.rt.RoundTrip(req) -} - -type pluginPersist struct { - config map[string]string - persister AuthProviderConfigPersister -} - -func (p *pluginPersist) WrapTransport(rt http.RoundTripper) http.RoundTripper { - return &wrapTransportPersist{rt, p.config, p.persister} -} - -// Login sets the config entry "login" to "Y". -func (p *pluginPersist) Login() error { - p.config["login"] = "Y" - p.persister.Persist(p.config) - return nil -} - -func pluginPersistProvider(_ string, config map[string]string, persister AuthProviderConfigPersister) (AuthProvider, error) { - return &pluginPersist{config, persister}, nil -} diff --git a/vendor/k8s.io/kubernetes/pkg/client/restclient/request.go b/vendor/k8s.io/kubernetes/pkg/client/restclient/request.go deleted file mode 100644 index e3a652f3..00000000 --- a/vendor/k8s.io/kubernetes/pkg/client/restclient/request.go +++ /dev/null @@ -1,1199 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package restclient - -import ( - "bytes" - "context" - "encoding/hex" - "fmt" - "io" - "io/ioutil" - "mime" - "net/http" - "net/url" - "path" - "reflect" - "strconv" - "strings" - "time" - - "github.com/golang/glog" - "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/runtime/serializer/streaming" - "k8s.io/apimachinery/pkg/util/net" - "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/apimachinery/pkg/watch" - "k8s.io/kubernetes/pkg/api/v1" - pathvalidation "k8s.io/kubernetes/pkg/api/validation/path" - "k8s.io/kubernetes/pkg/client/metrics" - restclientwatch "k8s.io/kubernetes/pkg/client/restclient/watch" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/util/flowcontrol" -) - -var ( - // specialParams lists parameters that are handled specially and which users of Request - // are therefore not allowed to set manually. - specialParams = sets.NewString("timeout") - - // longThrottleLatency defines threshold for logging requests. All requests being - // throttle for more than longThrottleLatency will be logged. - longThrottleLatency = 50 * time.Millisecond -) - -// HTTPClient is an interface for testing a request object. -type HTTPClient interface { - Do(req *http.Request) (*http.Response, error) -} - -// ResponseWrapper is an interface for getting a response. -// The response may be either accessed as a raw data (the whole output is put into memory) or as a stream. -type ResponseWrapper interface { - DoRaw() ([]byte, error) - Stream() (io.ReadCloser, error) -} - -// RequestConstructionError is returned when there's an error assembling a request. -type RequestConstructionError struct { - Err error -} - -// Error returns a textual description of 'r'. -func (r *RequestConstructionError) Error() string { - return fmt.Sprintf("request construction error: '%v'", r.Err) -} - -// Request allows for building up a request to a server in a chained fashion. -// Any errors are stored until the end of your call, so you only have to -// check once. -type Request struct { - // required - client HTTPClient - verb string - - baseURL *url.URL - content ContentConfig - serializers Serializers - - // generic components accessible via method setters - pathPrefix string - subpath string - params url.Values - headers http.Header - - // structural elements of the request that are part of the Kubernetes API conventions - namespace string - namespaceSet bool - resource string - resourceName string - subresource string - timeout time.Duration - - // output - err error - body io.Reader - - // This is only used for per-request timeouts, deadlines, and cancellations. - ctx context.Context - - backoffMgr BackoffManager - throttle flowcontrol.RateLimiter -} - -// NewRequest creates a new request helper object for accessing runtime.Objects on a server. -func NewRequest(client HTTPClient, verb string, baseURL *url.URL, versionedAPIPath string, content ContentConfig, serializers Serializers, backoff BackoffManager, throttle flowcontrol.RateLimiter) *Request { - if backoff == nil { - glog.V(2).Infof("Not implementing request backoff strategy.") - backoff = &NoBackoff{} - } - - pathPrefix := "/" - if baseURL != nil { - pathPrefix = path.Join(pathPrefix, baseURL.Path) - } - r := &Request{ - client: client, - verb: verb, - baseURL: baseURL, - pathPrefix: path.Join(pathPrefix, versionedAPIPath), - content: content, - serializers: serializers, - backoffMgr: backoff, - throttle: throttle, - } - switch { - case len(content.AcceptContentTypes) > 0: - r.SetHeader("Accept", content.AcceptContentTypes) - case len(content.ContentType) > 0: - r.SetHeader("Accept", content.ContentType+", */*") - } - return r -} - -// Prefix adds segments to the relative beginning to the request path. These -// items will be placed before the optional Namespace, Resource, or Name sections. -// Setting AbsPath will clear any previously set Prefix segments -func (r *Request) Prefix(segments ...string) *Request { - if r.err != nil { - return r - } - r.pathPrefix = path.Join(r.pathPrefix, path.Join(segments...)) - return r -} - -// Suffix appends segments to the end of the path. These items will be placed after the prefix and optional -// Namespace, Resource, or Name sections. -func (r *Request) Suffix(segments ...string) *Request { - if r.err != nil { - return r - } - r.subpath = path.Join(r.subpath, path.Join(segments...)) - return r -} - -// Resource sets the resource to access (/[ns//]) -func (r *Request) Resource(resource string) *Request { - if r.err != nil { - return r - } - if len(r.resource) != 0 { - r.err = fmt.Errorf("resource already set to %q, cannot change to %q", r.resource, resource) - return r - } - if msgs := pathvalidation.IsValidPathSegmentName(resource); len(msgs) != 0 { - r.err = fmt.Errorf("invalid resource %q: %v", resource, msgs) - return r - } - r.resource = resource - return r -} - -// SubResource sets a sub-resource path which can be multiple segments segment after the resource -// name but before the suffix. -func (r *Request) SubResource(subresources ...string) *Request { - if r.err != nil { - return r - } - subresource := path.Join(subresources...) - if len(r.subresource) != 0 { - r.err = fmt.Errorf("subresource already set to %q, cannot change to %q", r.resource, subresource) - return r - } - for _, s := range subresources { - if msgs := pathvalidation.IsValidPathSegmentName(s); len(msgs) != 0 { - r.err = fmt.Errorf("invalid subresource %q: %v", s, msgs) - return r - } - } - r.subresource = subresource - return r -} - -// Name sets the name of a resource to access (/[ns//]) -func (r *Request) Name(resourceName string) *Request { - if r.err != nil { - return r - } - if len(resourceName) == 0 { - r.err = fmt.Errorf("resource name may not be empty") - return r - } - if len(r.resourceName) != 0 { - r.err = fmt.Errorf("resource name already set to %q, cannot change to %q", r.resourceName, resourceName) - return r - } - if msgs := pathvalidation.IsValidPathSegmentName(resourceName); len(msgs) != 0 { - r.err = fmt.Errorf("invalid resource name %q: %v", resourceName, msgs) - return r - } - r.resourceName = resourceName - return r -} - -// Namespace applies the namespace scope to a request (/[ns//]) -func (r *Request) Namespace(namespace string) *Request { - if r.err != nil { - return r - } - if r.namespaceSet { - r.err = fmt.Errorf("namespace already set to %q, cannot change to %q", r.namespace, namespace) - return r - } - if msgs := pathvalidation.IsValidPathSegmentName(namespace); len(msgs) != 0 { - r.err = fmt.Errorf("invalid namespace %q: %v", namespace, msgs) - return r - } - r.namespaceSet = true - r.namespace = namespace - return r -} - -// NamespaceIfScoped is a convenience function to set a namespace if scoped is true -func (r *Request) NamespaceIfScoped(namespace string, scoped bool) *Request { - if scoped { - return r.Namespace(namespace) - } - return r -} - -// AbsPath overwrites an existing path with the segments provided. Trailing slashes are preserved -// when a single segment is passed. -func (r *Request) AbsPath(segments ...string) *Request { - if r.err != nil { - return r - } - r.pathPrefix = path.Join(r.baseURL.Path, path.Join(segments...)) - if len(segments) == 1 && (len(r.baseURL.Path) > 1 || len(segments[0]) > 1) && strings.HasSuffix(segments[0], "/") { - // preserve any trailing slashes for legacy behavior - r.pathPrefix += "/" - } - return r -} - -// RequestURI overwrites existing path and parameters with the value of the provided server relative -// URI. Some parameters (those in specialParameters) cannot be overwritten. -func (r *Request) RequestURI(uri string) *Request { - if r.err != nil { - return r - } - locator, err := url.Parse(uri) - if err != nil { - r.err = err - return r - } - r.pathPrefix = locator.Path - if len(locator.Query()) > 0 { - if r.params == nil { - r.params = make(url.Values) - } - for k, v := range locator.Query() { - r.params[k] = v - } - } - return r -} - -const ( - // A constant that clients can use to refer in a field selector to the object name field. - // Will be automatically emitted as the correct name for the API version. - nodeUnschedulable = "spec.unschedulable" - objectNameField = "metadata.name" - podHost = "spec.nodeName" - podStatus = "status.phase" - secretType = "type" - - eventReason = "reason" - eventSource = "source" - eventType = "type" - eventInvolvedKind = "involvedObject.kind" - eventInvolvedNamespace = "involvedObject.namespace" - eventInvolvedName = "involvedObject.name" - eventInvolvedUID = "involvedObject.uid" - eventInvolvedAPIVersion = "involvedObject.apiVersion" - eventInvolvedResourceVersion = "involvedObject.resourceVersion" - eventInvolvedFieldPath = "involvedObject.fieldPath" -) - -type clientFieldNameToAPIVersionFieldName map[string]string - -func (c clientFieldNameToAPIVersionFieldName) filterField(field, value string) (newField, newValue string, err error) { - newFieldName, ok := c[field] - if !ok { - return "", "", fmt.Errorf("%v - %v - no field mapping defined", field, value) - } - return newFieldName, value, nil -} - -type resourceTypeToFieldMapping map[string]clientFieldNameToAPIVersionFieldName - -func (r resourceTypeToFieldMapping) filterField(resourceType, field, value string) (newField, newValue string, err error) { - fMapping, ok := r[resourceType] - if !ok { - return "", "", fmt.Errorf("%v - %v - %v - no field mapping defined", resourceType, field, value) - } - return fMapping.filterField(field, value) -} - -type versionToResourceToFieldMapping map[schema.GroupVersion]resourceTypeToFieldMapping - -// filterField transforms the given field/value selector for the given groupVersion and resource -func (v versionToResourceToFieldMapping) filterField(groupVersion *schema.GroupVersion, resourceType, field, value string) (newField, newValue string, err error) { - rMapping, ok := v[*groupVersion] - if !ok { - // no groupVersion overrides registered, default to identity mapping - return field, value, nil - } - newField, newValue, err = rMapping.filterField(resourceType, field, value) - if err != nil { - // no groupVersionResource overrides registered, default to identity mapping - return field, value, nil - } - return newField, newValue, nil -} - -var fieldMappings = versionToResourceToFieldMapping{ - v1.SchemeGroupVersion: resourceTypeToFieldMapping{ - "nodes": clientFieldNameToAPIVersionFieldName{ - objectNameField: objectNameField, - nodeUnschedulable: nodeUnschedulable, - }, - "pods": clientFieldNameToAPIVersionFieldName{ - objectNameField: objectNameField, - podHost: podHost, - podStatus: podStatus, - }, - "secrets": clientFieldNameToAPIVersionFieldName{ - secretType: secretType, - }, - "serviceAccounts": clientFieldNameToAPIVersionFieldName{ - objectNameField: objectNameField, - }, - "endpoints": clientFieldNameToAPIVersionFieldName{ - objectNameField: objectNameField, - }, - "events": clientFieldNameToAPIVersionFieldName{ - objectNameField: objectNameField, - eventReason: eventReason, - eventSource: eventSource, - eventType: eventType, - eventInvolvedKind: eventInvolvedKind, - eventInvolvedNamespace: eventInvolvedNamespace, - eventInvolvedName: eventInvolvedName, - eventInvolvedUID: eventInvolvedUID, - eventInvolvedAPIVersion: eventInvolvedAPIVersion, - eventInvolvedResourceVersion: eventInvolvedResourceVersion, - eventInvolvedFieldPath: eventInvolvedFieldPath, - }, - }, -} - -// FieldsSelectorParam adds the given selector as a query parameter with the name paramName. -func (r *Request) FieldsSelectorParam(s fields.Selector) *Request { - if r.err != nil { - return r - } - if s == nil { - return r - } - if s.Empty() { - return r - } - s2, err := s.Transform(func(field, value string) (newField, newValue string, err error) { - return fieldMappings.filterField(r.content.GroupVersion, r.resource, field, value) - }) - if err != nil { - r.err = err - return r - } - return r.setParam(metav1.FieldSelectorQueryParam(r.content.GroupVersion.String()), s2.String()) -} - -// LabelsSelectorParam adds the given selector as a query parameter -func (r *Request) LabelsSelectorParam(s labels.Selector) *Request { - if r.err != nil { - return r - } - if s == nil { - return r - } - if s.Empty() { - return r - } - return r.setParam(metav1.LabelSelectorQueryParam(r.content.GroupVersion.String()), s.String()) -} - -// UintParam creates a query parameter with the given value. -func (r *Request) UintParam(paramName string, u uint64) *Request { - if r.err != nil { - return r - } - return r.setParam(paramName, strconv.FormatUint(u, 10)) -} - -// Param creates a query parameter with the given string value. -func (r *Request) Param(paramName, s string) *Request { - if r.err != nil { - return r - } - return r.setParam(paramName, s) -} - -// VersionedParams will take the provided object, serialize it to a map[string][]string using the -// implicit RESTClient API version and the default parameter codec, and then add those as parameters -// to the request. Use this to provide versioned query parameters from client libraries. -func (r *Request) VersionedParams(obj runtime.Object, codec runtime.ParameterCodec) *Request { - if r.err != nil { - return r - } - params, err := codec.EncodeParameters(obj, *r.content.GroupVersion) - if err != nil { - r.err = err - return r - } - for k, v := range params { - for _, value := range v { - // TODO: Move it to setParam method, once we get rid of - // FieldSelectorParam & LabelSelectorParam methods. - if k == metav1.LabelSelectorQueryParam(r.content.GroupVersion.String()) && value == "" { - // Don't set an empty selector for backward compatibility. - // Since there is no way to get the difference between empty - // and unspecified string, we don't set it to avoid having - // labelSelector= param in every request. - continue - } - if k == metav1.FieldSelectorQueryParam(r.content.GroupVersion.String()) { - if len(value) == 0 { - // Don't set an empty selector for backward compatibility. - // Since there is no way to get the difference between empty - // and unspecified string, we don't set it to avoid having - // fieldSelector= param in every request. - continue - } - // TODO: Filtering should be handled somewhere else. - selector, err := fields.ParseSelector(value) - if err != nil { - r.err = fmt.Errorf("unparsable field selector: %v", err) - return r - } - filteredSelector, err := selector.Transform( - func(field, value string) (newField, newValue string, err error) { - return fieldMappings.filterField(r.content.GroupVersion, r.resource, field, value) - }) - if err != nil { - r.err = fmt.Errorf("untransformable field selector: %v", err) - return r - } - value = filteredSelector.String() - } - - r.setParam(k, value) - } - } - return r -} - -func (r *Request) setParam(paramName, value string) *Request { - if specialParams.Has(paramName) { - r.err = fmt.Errorf("must set %v through the corresponding function, not directly.", paramName) - return r - } - if r.params == nil { - r.params = make(url.Values) - } - r.params[paramName] = append(r.params[paramName], value) - return r -} - -func (r *Request) SetHeader(key, value string) *Request { - if r.headers == nil { - r.headers = http.Header{} - } - r.headers.Set(key, value) - return r -} - -// Timeout makes the request use the given duration as a timeout. Sets the "timeout" -// parameter. -func (r *Request) Timeout(d time.Duration) *Request { - if r.err != nil { - return r - } - r.timeout = d - return r -} - -// Body makes the request use obj as the body. Optional. -// If obj is a string, try to read a file of that name. -// If obj is a []byte, send it directly. -// If obj is an io.Reader, use it directly. -// If obj is a runtime.Object, marshal it correctly, and set Content-Type header. -// If obj is a runtime.Object and nil, do nothing. -// Otherwise, set an error. -func (r *Request) Body(obj interface{}) *Request { - if r.err != nil { - return r - } - switch t := obj.(type) { - case string: - data, err := ioutil.ReadFile(t) - if err != nil { - r.err = err - return r - } - glogBody("Request Body", data) - r.body = bytes.NewReader(data) - case []byte: - glogBody("Request Body", t) - r.body = bytes.NewReader(t) - case io.Reader: - r.body = t - case runtime.Object: - // callers may pass typed interface pointers, therefore we must check nil with reflection - if reflect.ValueOf(t).IsNil() { - return r - } - data, err := runtime.Encode(r.serializers.Encoder, t) - if err != nil { - r.err = err - return r - } - glogBody("Request Body", data) - r.body = bytes.NewReader(data) - r.SetHeader("Content-Type", r.content.ContentType) - default: - r.err = fmt.Errorf("unknown type used for body: %+v", obj) - } - return r -} - -// Context adds a context to the request. Contexts are only used for -// timeouts, deadlines, and cancellations. -func (r *Request) Context(ctx context.Context) *Request { - r.ctx = ctx - return r -} - -// URL returns the current working URL. -func (r *Request) URL() *url.URL { - p := r.pathPrefix - if r.namespaceSet && len(r.namespace) > 0 { - p = path.Join(p, "namespaces", r.namespace) - } - if len(r.resource) != 0 { - p = path.Join(p, strings.ToLower(r.resource)) - } - // Join trims trailing slashes, so preserve r.pathPrefix's trailing slash for backwards compatibility if nothing was changed - if len(r.resourceName) != 0 || len(r.subpath) != 0 || len(r.subresource) != 0 { - p = path.Join(p, r.resourceName, r.subresource, r.subpath) - } - - finalURL := &url.URL{} - if r.baseURL != nil { - *finalURL = *r.baseURL - } - finalURL.Path = p - - query := url.Values{} - for key, values := range r.params { - for _, value := range values { - query.Add(key, value) - } - } - - // timeout is handled specially here. - if r.timeout != 0 { - query.Set("timeout", r.timeout.String()) - } - finalURL.RawQuery = query.Encode() - return finalURL -} - -// finalURLTemplate is similar to URL(), but will make all specific parameter values equal -// - instead of name or namespace, "{name}" and "{namespace}" will be used, and all query -// parameters will be reset. This creates a copy of the request so as not to change the -// underyling object. This means some useful request info (like the types of field -// selectors in use) will be lost. -// TODO: preserve field selector keys -func (r Request) finalURLTemplate() url.URL { - if len(r.resourceName) != 0 { - r.resourceName = "{name}" - } - if r.namespaceSet && len(r.namespace) != 0 { - r.namespace = "{namespace}" - } - newParams := url.Values{} - v := []string{"{value}"} - for k := range r.params { - newParams[k] = v - } - r.params = newParams - url := r.URL() - return *url -} - -func (r *Request) tryThrottle() { - now := time.Now() - if r.throttle != nil { - r.throttle.Accept() - } - if latency := time.Since(now); latency > longThrottleLatency { - glog.V(4).Infof("Throttling request took %v, request: %s:%s", latency, r.verb, r.URL().String()) - } -} - -// Watch attempts to begin watching the requested location. -// Returns a watch.Interface, or an error. -func (r *Request) Watch() (watch.Interface, error) { - // We specifically don't want to rate limit watches, so we - // don't use r.throttle here. - if r.err != nil { - return nil, r.err - } - if r.serializers.Framer == nil { - return nil, fmt.Errorf("watching resources is not possible with this client (content-type: %s)", r.content.ContentType) - } - - url := r.URL().String() - req, err := http.NewRequest(r.verb, url, r.body) - if err != nil { - return nil, err - } - if r.ctx != nil { - req = req.WithContext(r.ctx) - } - req.Header = r.headers - client := r.client - if client == nil { - client = http.DefaultClient - } - r.backoffMgr.Sleep(r.backoffMgr.CalculateBackoff(r.URL())) - resp, err := client.Do(req) - updateURLMetrics(r, resp, err) - if r.baseURL != nil { - if err != nil { - r.backoffMgr.UpdateBackoff(r.baseURL, err, 0) - } else { - r.backoffMgr.UpdateBackoff(r.baseURL, err, resp.StatusCode) - } - } - if err != nil { - // The watch stream mechanism handles many common partial data errors, so closed - // connections can be retried in many cases. - if net.IsProbableEOF(err) { - return watch.NewEmptyWatch(), nil - } - return nil, err - } - if resp.StatusCode != http.StatusOK { - defer resp.Body.Close() - if result := r.transformResponse(resp, req); result.err != nil { - return nil, result.err - } - return nil, fmt.Errorf("for request '%+v', got status: %v", url, resp.StatusCode) - } - framer := r.serializers.Framer.NewFrameReader(resp.Body) - decoder := streaming.NewDecoder(framer, r.serializers.StreamingSerializer) - return watch.NewStreamWatcher(restclientwatch.NewDecoder(decoder, r.serializers.Decoder)), nil -} - -// updateURLMetrics is a convenience function for pushing metrics. -// It also handles corner cases for incomplete/invalid request data. -func updateURLMetrics(req *Request, resp *http.Response, err error) { - url := "none" - if req.baseURL != nil { - url = req.baseURL.Host - } - - // Errors can be arbitrary strings. Unbound label cardinality is not suitable for a metric - // system so we just report them as ``. - if err != nil { - metrics.RequestResult.Increment("", req.verb, url) - } else { - //Metrics for failure codes - metrics.RequestResult.Increment(strconv.Itoa(resp.StatusCode), req.verb, url) - } -} - -// Stream formats and executes the request, and offers streaming of the response. -// Returns io.ReadCloser which could be used for streaming of the response, or an error -// Any non-2xx http status code causes an error. If we get a non-2xx code, we try to convert the body into an APIStatus object. -// If we can, we return that as an error. Otherwise, we create an error that lists the http status and the content of the response. -func (r *Request) Stream() (io.ReadCloser, error) { - if r.err != nil { - return nil, r.err - } - - r.tryThrottle() - - url := r.URL().String() - req, err := http.NewRequest(r.verb, url, nil) - if err != nil { - return nil, err - } - if r.ctx != nil { - req = req.WithContext(r.ctx) - } - req.Header = r.headers - client := r.client - if client == nil { - client = http.DefaultClient - } - r.backoffMgr.Sleep(r.backoffMgr.CalculateBackoff(r.URL())) - resp, err := client.Do(req) - updateURLMetrics(r, resp, err) - if r.baseURL != nil { - if err != nil { - r.backoffMgr.UpdateBackoff(r.URL(), err, 0) - } else { - r.backoffMgr.UpdateBackoff(r.URL(), err, resp.StatusCode) - } - } - if err != nil { - return nil, err - } - - switch { - case (resp.StatusCode >= 200) && (resp.StatusCode < 300): - return resp.Body, nil - - default: - // ensure we close the body before returning the error - defer resp.Body.Close() - - result := r.transformResponse(resp, req) - if result.err != nil { - return nil, result.err - } - return nil, fmt.Errorf("%d while accessing %v: %s", result.statusCode, url, string(result.body)) - } -} - -// request connects to the server and invokes the provided function when a server response is -// received. It handles retry behavior and up front validation of requests. It will invoke -// fn at most once. It will return an error if a problem occurred prior to connecting to the -// server - the provided function is responsible for handling server errors. -func (r *Request) request(fn func(*http.Request, *http.Response)) error { - //Metrics for total request latency - start := time.Now() - defer func() { - metrics.RequestLatency.Observe(r.verb, r.finalURLTemplate(), time.Since(start)) - }() - - if r.err != nil { - glog.V(4).Infof("Error in request: %v", r.err) - return r.err - } - - // TODO: added to catch programmer errors (invoking operations with an object with an empty namespace) - if (r.verb == "GET" || r.verb == "PUT" || r.verb == "DELETE") && r.namespaceSet && len(r.resourceName) > 0 && len(r.namespace) == 0 { - return fmt.Errorf("an empty namespace may not be set when a resource name is provided") - } - if (r.verb == "POST") && r.namespaceSet && len(r.namespace) == 0 { - return fmt.Errorf("an empty namespace may not be set during creation") - } - - client := r.client - if client == nil { - client = http.DefaultClient - } - - // Right now we make about ten retry attempts if we get a Retry-After response. - // TODO: Change to a timeout based approach. - maxRetries := 10 - retries := 0 - for { - url := r.URL().String() - req, err := http.NewRequest(r.verb, url, r.body) - if err != nil { - return err - } - if r.ctx != nil { - req = req.WithContext(r.ctx) - } - req.Header = r.headers - - r.backoffMgr.Sleep(r.backoffMgr.CalculateBackoff(r.URL())) - if retries > 0 { - // We are retrying the request that we already send to apiserver - // at least once before. - // This request should also be throttled with the client-internal throttler. - r.tryThrottle() - } - resp, err := client.Do(req) - updateURLMetrics(r, resp, err) - if err != nil { - r.backoffMgr.UpdateBackoff(r.URL(), err, 0) - } else { - r.backoffMgr.UpdateBackoff(r.URL(), err, resp.StatusCode) - } - if err != nil { - // "Connection reset by peer" is usually a transient error. - // Thus in case of "GET" operations, we simply retry it. - // We are not automatically retrying "write" operations, as - // they are not idempotent. - if !net.IsConnectionReset(err) || r.verb != "GET" { - return err - } - // For the purpose of retry, we set the artificial "retry-after" response. - // TODO: Should we clean the original response if it exists? - resp = &http.Response{ - StatusCode: http.StatusInternalServerError, - Header: http.Header{"Retry-After": []string{"1"}}, - Body: ioutil.NopCloser(bytes.NewReader([]byte{})), - } - } - - done := func() bool { - // Ensure the response body is fully read and closed - // before we reconnect, so that we reuse the same TCP - // connection. - defer func() { - const maxBodySlurpSize = 2 << 10 - if resp.ContentLength <= maxBodySlurpSize { - io.Copy(ioutil.Discard, &io.LimitedReader{R: resp.Body, N: maxBodySlurpSize}) - } - resp.Body.Close() - }() - - retries++ - if seconds, wait := checkWait(resp); wait && retries < maxRetries { - if seeker, ok := r.body.(io.Seeker); ok && r.body != nil { - _, err := seeker.Seek(0, 0) - if err != nil { - glog.V(4).Infof("Could not retry request, can't Seek() back to beginning of body for %T", r.body) - fn(req, resp) - return true - } - } - - glog.V(4).Infof("Got a Retry-After %s response for attempt %d to %v", seconds, retries, url) - r.backoffMgr.Sleep(time.Duration(seconds) * time.Second) - return false - } - fn(req, resp) - return true - }() - if done { - return nil - } - } -} - -// Do formats and executes the request. Returns a Result object for easy response -// processing. -// -// Error type: -// * If the request can't be constructed, or an error happened earlier while building its -// arguments: *RequestConstructionError -// * If the server responds with a status: *errors.StatusError or *errors.UnexpectedObjectError -// * http.Client.Do errors are returned directly. -func (r *Request) Do() Result { - r.tryThrottle() - - var result Result - err := r.request(func(req *http.Request, resp *http.Response) { - result = r.transformResponse(resp, req) - }) - if err != nil { - return Result{err: err} - } - return result -} - -// DoRaw executes the request but does not process the response body. -func (r *Request) DoRaw() ([]byte, error) { - r.tryThrottle() - - var result Result - err := r.request(func(req *http.Request, resp *http.Response) { - result.body, result.err = ioutil.ReadAll(resp.Body) - glogBody("Response Body", result.body) - if resp.StatusCode < http.StatusOK || resp.StatusCode > http.StatusPartialContent { - result.err = r.transformUnstructuredResponseError(resp, req, result.body) - } - }) - if err != nil { - return nil, err - } - return result.body, result.err -} - -// transformResponse converts an API response into a structured API object -func (r *Request) transformResponse(resp *http.Response, req *http.Request) Result { - var body []byte - if resp.Body != nil { - if data, err := ioutil.ReadAll(resp.Body); err == nil { - body = data - } - } - - glogBody("Response Body", body) - - // verify the content type is accurate - contentType := resp.Header.Get("Content-Type") - decoder := r.serializers.Decoder - if len(contentType) > 0 && (decoder == nil || (len(r.content.ContentType) > 0 && contentType != r.content.ContentType)) { - mediaType, params, err := mime.ParseMediaType(contentType) - if err != nil { - return Result{err: errors.NewInternalError(err)} - } - decoder, err = r.serializers.RenegotiatedDecoder(mediaType, params) - if err != nil { - // if we fail to negotiate a decoder, treat this as an unstructured error - switch { - case resp.StatusCode == http.StatusSwitchingProtocols: - // no-op, we've been upgraded - case resp.StatusCode < http.StatusOK || resp.StatusCode > http.StatusPartialContent: - return Result{err: r.transformUnstructuredResponseError(resp, req, body)} - } - return Result{ - body: body, - contentType: contentType, - statusCode: resp.StatusCode, - } - } - } - - switch { - case resp.StatusCode == http.StatusSwitchingProtocols: - // no-op, we've been upgraded - case resp.StatusCode < http.StatusOK || resp.StatusCode > http.StatusPartialContent: - // calculate an unstructured error from the response which the Result object may use if the caller - // did not return a structured error. - retryAfter, _ := retryAfterSeconds(resp) - err := r.newUnstructuredResponseError(body, isTextResponse(resp), resp.StatusCode, req.Method, retryAfter) - return Result{ - body: body, - contentType: contentType, - statusCode: resp.StatusCode, - decoder: decoder, - err: err, - } - } - - return Result{ - body: body, - contentType: contentType, - statusCode: resp.StatusCode, - decoder: decoder, - } -} - -// glogBody logs a body output that could be either JSON or protobuf. It explicitly guards against -// allocating a new string for the body output unless necessary. Uses a simple heuristic to determine -// whether the body is printable. -func glogBody(prefix string, body []byte) { - if glog.V(8) { - if bytes.IndexFunc(body, func(r rune) bool { - return r < 0x0a - }) != -1 { - glog.Infof("%s:\n%s", prefix, hex.Dump(body)) - } else { - glog.Infof("%s: %s", prefix, string(body)) - } - } -} - -// maxUnstructuredResponseTextBytes is an upper bound on how much output to include in the unstructured error. -const maxUnstructuredResponseTextBytes = 2048 - -// transformUnstructuredResponseError handles an error from the server that is not in a structured form. -// It is expected to transform any response that is not recognizable as a clear server sent error from the -// K8S API using the information provided with the request. In practice, HTTP proxies and client libraries -// introduce a level of uncertainty to the responses returned by servers that in common use result in -// unexpected responses. The rough structure is: -// -// 1. Assume the server sends you something sane - JSON + well defined error objects + proper codes -// - this is the happy path -// - when you get this output, trust what the server sends -// 2. Guard against empty fields / bodies in received JSON and attempt to cull sufficient info from them to -// generate a reasonable facsimile of the original failure. -// - Be sure to use a distinct error type or flag that allows a client to distinguish between this and error 1 above -// 3. Handle true disconnect failures / completely malformed data by moving up to a more generic client error -// 4. Distinguish between various connection failures like SSL certificates, timeouts, proxy errors, unexpected -// initial contact, the presence of mismatched body contents from posted content types -// - Give these a separate distinct error type and capture as much as possible of the original message -// -// TODO: introduce transformation of generic http.Client.Do() errors that separates 4. -func (r *Request) transformUnstructuredResponseError(resp *http.Response, req *http.Request, body []byte) error { - if body == nil && resp.Body != nil { - if data, err := ioutil.ReadAll(&io.LimitedReader{R: resp.Body, N: maxUnstructuredResponseTextBytes}); err == nil { - body = data - } - } - retryAfter, _ := retryAfterSeconds(resp) - return r.newUnstructuredResponseError(body, isTextResponse(resp), resp.StatusCode, req.Method, retryAfter) -} - -// newUnstructuredResponseError instantiates the appropriate generic error for the provided input. It also logs the body. -func (r *Request) newUnstructuredResponseError(body []byte, isTextResponse bool, statusCode int, method string, retryAfter int) error { - // cap the amount of output we create - if len(body) > maxUnstructuredResponseTextBytes { - body = body[:maxUnstructuredResponseTextBytes] - } - - message := "unknown" - if isTextResponse { - message = strings.TrimSpace(string(body)) - } - return errors.NewGenericServerResponse( - statusCode, - method, - schema.GroupResource{ - Group: r.content.GroupVersion.Group, - Resource: r.resource, - }, - r.resourceName, - message, - retryAfter, - true, - ) -} - -// isTextResponse returns true if the response appears to be a textual media type. -func isTextResponse(resp *http.Response) bool { - contentType := resp.Header.Get("Content-Type") - if len(contentType) == 0 { - return true - } - media, _, err := mime.ParseMediaType(contentType) - if err != nil { - return false - } - return strings.HasPrefix(media, "text/") -} - -// checkWait returns true along with a number of seconds if the server instructed us to wait -// before retrying. -func checkWait(resp *http.Response) (int, bool) { - switch r := resp.StatusCode; { - // any 500 error code and 429 can trigger a wait - case r == errors.StatusTooManyRequests, r >= 500: - default: - return 0, false - } - i, ok := retryAfterSeconds(resp) - return i, ok -} - -// retryAfterSeconds returns the value of the Retry-After header and true, or 0 and false if -// the header was missing or not a valid number. -func retryAfterSeconds(resp *http.Response) (int, bool) { - if h := resp.Header.Get("Retry-After"); len(h) > 0 { - if i, err := strconv.Atoi(h); err == nil { - return i, true - } - } - return 0, false -} - -// Result contains the result of calling Request.Do(). -type Result struct { - body []byte - contentType string - err error - statusCode int - - decoder runtime.Decoder -} - -// Raw returns the raw result. -func (r Result) Raw() ([]byte, error) { - return r.body, r.err -} - -// Get returns the result as an object, which means it passes through the decoder. -// If the returned object is of type Status and has .Status != StatusSuccess, the -// additional information in Status will be used to enrich the error. -func (r Result) Get() (runtime.Object, error) { - if r.err != nil { - // Check whether the result has a Status object in the body and prefer that. - return nil, r.Error() - } - if r.decoder == nil { - return nil, fmt.Errorf("serializer for %s doesn't exist", r.contentType) - } - - // decode, but if the result is Status return that as an error instead. - out, _, err := r.decoder.Decode(r.body, nil, nil) - if err != nil { - return nil, err - } - switch t := out.(type) { - case *metav1.Status: - // any status besides StatusSuccess is considered an error. - if t.Status != metav1.StatusSuccess { - return nil, errors.FromObject(t) - } - } - return out, nil -} - -// StatusCode returns the HTTP status code of the request. (Only valid if no -// error was returned.) -func (r Result) StatusCode(statusCode *int) Result { - *statusCode = r.statusCode - return r -} - -// Into stores the result into obj, if possible. If obj is nil it is ignored. -// If the returned object is of type Status and has .Status != StatusSuccess, the -// additional information in Status will be used to enrich the error. -func (r Result) Into(obj runtime.Object) error { - if r.err != nil { - // Check whether the result has a Status object in the body and prefer that. - return r.Error() - } - if r.decoder == nil { - return fmt.Errorf("serializer for %s doesn't exist", r.contentType) - } - - out, _, err := r.decoder.Decode(r.body, nil, obj) - if err != nil || out == obj { - return err - } - // if a different object is returned, see if it is Status and avoid double decoding - // the object. - switch t := out.(type) { - case *metav1.Status: - // any status besides StatusSuccess is considered an error. - if t.Status != metav1.StatusSuccess { - return errors.FromObject(t) - } - } - return nil -} - -// WasCreated updates the provided bool pointer to whether the server returned -// 201 created or a different response. -func (r Result) WasCreated(wasCreated *bool) Result { - *wasCreated = r.statusCode == http.StatusCreated - return r -} - -// Error returns the error executing the request, nil if no error occurred. -// If the returned object is of type Status and has Status != StatusSuccess, the -// additional information in Status will be used to enrich the error. -// See the Request.Do() comment for what errors you might get. -func (r Result) Error() error { - // if we have received an unexpected server error, and we have a body and decoder, we can try to extract - // a Status object. - if r.err == nil || !errors.IsUnexpectedServerError(r.err) || len(r.body) == 0 || r.decoder == nil { - return r.err - } - - // attempt to convert the body into a Status object - // to be backwards compatible with old servers that do not return a version, default to "v1" - out, _, err := r.decoder.Decode(r.body, &schema.GroupVersionKind{Version: "v1"}, nil) - if err != nil { - glog.V(5).Infof("body was not decodable (unable to check for Status): %v", err) - return r.err - } - switch t := out.(type) { - case *metav1.Status: - // because we default the kind, we *must* check for StatusFailure - if t.Status == metav1.StatusFailure { - return errors.FromObject(t) - } - } - return r.err -} diff --git a/vendor/k8s.io/kubernetes/pkg/client/restclient/request_test.go b/vendor/k8s.io/kubernetes/pkg/client/restclient/request_test.go deleted file mode 100755 index 72a58ccc..00000000 --- a/vendor/k8s.io/kubernetes/pkg/client/restclient/request_test.go +++ /dev/null @@ -1,1683 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package restclient - -import ( - "bytes" - "context" - "errors" - "fmt" - "io" - "io/ioutil" - "net" - "net/http" - "net/http/httptest" - "net/url" - "os" - "reflect" - "strings" - "syscall" - "testing" - "time" - - apierrors "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/runtime/serializer/streaming" - "k8s.io/apimachinery/pkg/util/diff" - "k8s.io/apimachinery/pkg/watch" - "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/api/testapi" - "k8s.io/kubernetes/pkg/api/v1" - restclientwatch "k8s.io/kubernetes/pkg/client/restclient/watch" - "k8s.io/kubernetes/pkg/util/clock" - "k8s.io/kubernetes/pkg/util/flowcontrol" - "k8s.io/kubernetes/pkg/util/httpstream" - "k8s.io/kubernetes/pkg/util/intstr" - utiltesting "k8s.io/kubernetes/pkg/util/testing" -) - -func TestNewRequestSetsAccept(t *testing.T) { - r := NewRequest(nil, "get", &url.URL{Path: "/path/"}, "", ContentConfig{}, Serializers{}, nil, nil) - if r.headers.Get("Accept") != "" { - t.Errorf("unexpected headers: %#v", r.headers) - } - r = NewRequest(nil, "get", &url.URL{Path: "/path/"}, "", ContentConfig{ContentType: "application/other"}, Serializers{}, nil, nil) - if r.headers.Get("Accept") != "application/other, */*" { - t.Errorf("unexpected headers: %#v", r.headers) - } -} - -type clientFunc func(req *http.Request) (*http.Response, error) - -func (f clientFunc) Do(req *http.Request) (*http.Response, error) { - return f(req) -} - -func TestRequestSetsHeaders(t *testing.T) { - server := clientFunc(func(req *http.Request) (*http.Response, error) { - if req.Header.Get("Accept") != "application/other, */*" { - t.Errorf("unexpected headers: %#v", req.Header) - } - return &http.Response{ - StatusCode: http.StatusForbidden, - Body: ioutil.NopCloser(bytes.NewReader([]byte{})), - }, nil - }) - config := defaultContentConfig() - config.ContentType = "application/other" - serializers := defaultSerializers() - r := NewRequest(server, "get", &url.URL{Path: "/path"}, "", config, serializers, nil, nil) - - // Check if all "issue" methods are setting headers. - _ = r.Do() - _, _ = r.Watch() - _, _ = r.Stream() -} - -func TestRequestWithErrorWontChange(t *testing.T) { - original := Request{ - err: errors.New("test"), - content: ContentConfig{GroupVersion: &api.Registry.GroupOrDie(api.GroupName).GroupVersion}, - } - r := original - changed := r.Param("foo", "bar"). - LabelsSelectorParam(labels.Set{"a": "b"}.AsSelector()). - UintParam("uint", 1). - AbsPath("/abs"). - Prefix("test"). - Suffix("testing"). - Namespace("new"). - Resource("foos"). - Name("bars"). - Body("foo"). - Timeout(time.Millisecond) - if changed != &r { - t.Errorf("returned request should point to the same object") - } - if !reflect.DeepEqual(changed, &original) { - t.Errorf("expected %#v, got %#v", &original, changed) - } -} - -func TestRequestPreservesBaseTrailingSlash(t *testing.T) { - r := &Request{baseURL: &url.URL{}, pathPrefix: "/path/"} - if s := r.URL().String(); s != "/path/" { - t.Errorf("trailing slash should be preserved: %s", s) - } -} - -func TestRequestAbsPathPreservesTrailingSlash(t *testing.T) { - r := (&Request{baseURL: &url.URL{}}).AbsPath("/foo/") - if s := r.URL().String(); s != "/foo/" { - t.Errorf("trailing slash should be preserved: %s", s) - } - - r = (&Request{baseURL: &url.URL{}}).AbsPath("/foo/") - if s := r.URL().String(); s != "/foo/" { - t.Errorf("trailing slash should be preserved: %s", s) - } -} - -func TestRequestAbsPathJoins(t *testing.T) { - r := (&Request{baseURL: &url.URL{}}).AbsPath("foo/bar", "baz") - if s := r.URL().String(); s != "foo/bar/baz" { - t.Errorf("trailing slash should be preserved: %s", s) - } -} - -func TestRequestSetsNamespace(t *testing.T) { - r := (&Request{ - baseURL: &url.URL{ - Path: "/", - }, - }).Namespace("foo") - if r.namespace == "" { - t.Errorf("namespace should be set: %#v", r) - } - - if s := r.URL().String(); s != "namespaces/foo" { - t.Errorf("namespace should be in path: %s", s) - } -} - -func TestRequestOrdersNamespaceInPath(t *testing.T) { - r := (&Request{ - baseURL: &url.URL{}, - pathPrefix: "/test/", - }).Name("bar").Resource("baz").Namespace("foo") - if s := r.URL().String(); s != "/test/namespaces/foo/baz/bar" { - t.Errorf("namespace should be in order in path: %s", s) - } -} - -func TestRequestOrdersSubResource(t *testing.T) { - r := (&Request{ - baseURL: &url.URL{}, - pathPrefix: "/test/", - }).Name("bar").Resource("baz").Namespace("foo").Suffix("test").SubResource("a", "b") - if s := r.URL().String(); s != "/test/namespaces/foo/baz/bar/a/b/test" { - t.Errorf("namespace should be in order in path: %s", s) - } -} - -func TestRequestSetTwiceError(t *testing.T) { - if (&Request{}).Name("bar").Name("baz").err == nil { - t.Errorf("setting name twice should result in error") - } - if (&Request{}).Namespace("bar").Namespace("baz").err == nil { - t.Errorf("setting namespace twice should result in error") - } - if (&Request{}).Resource("bar").Resource("baz").err == nil { - t.Errorf("setting resource twice should result in error") - } - if (&Request{}).SubResource("bar").SubResource("baz").err == nil { - t.Errorf("setting subresource twice should result in error") - } -} - -func TestInvalidSegments(t *testing.T) { - invalidSegments := []string{".", "..", "test/segment", "test%2bsegment"} - setters := map[string]func(string, *Request){ - "namespace": func(s string, r *Request) { r.Namespace(s) }, - "resource": func(s string, r *Request) { r.Resource(s) }, - "name": func(s string, r *Request) { r.Name(s) }, - "subresource": func(s string, r *Request) { r.SubResource(s) }, - } - for _, invalidSegment := range invalidSegments { - for setterName, setter := range setters { - r := &Request{} - setter(invalidSegment, r) - if r.err == nil { - t.Errorf("%s: %s: expected error, got none", setterName, invalidSegment) - } - } - } -} - -func TestRequestParam(t *testing.T) { - r := (&Request{}).Param("foo", "a") - if !reflect.DeepEqual(r.params, url.Values{"foo": []string{"a"}}) { - t.Errorf("should have set a param: %#v", r) - } - - r.Param("bar", "1") - r.Param("bar", "2") - if !reflect.DeepEqual(r.params, url.Values{"foo": []string{"a"}, "bar": []string{"1", "2"}}) { - t.Errorf("should have set a param: %#v", r) - } -} - -func TestRequestVersionedParams(t *testing.T) { - r := (&Request{content: ContentConfig{GroupVersion: &v1.SchemeGroupVersion}}).Param("foo", "a") - if !reflect.DeepEqual(r.params, url.Values{"foo": []string{"a"}}) { - t.Errorf("should have set a param: %#v", r) - } - r.VersionedParams(&api.PodLogOptions{Follow: true, Container: "bar"}, api.ParameterCodec) - - if !reflect.DeepEqual(r.params, url.Values{ - "foo": []string{"a"}, - "container": []string{"bar"}, - "follow": []string{"true"}, - }) { - t.Errorf("should have set a param: %#v", r) - } -} - -func TestRequestVersionedParamsFromListOptions(t *testing.T) { - r := &Request{content: ContentConfig{GroupVersion: &v1.SchemeGroupVersion}} - r.VersionedParams(&api.ListOptions{ResourceVersion: "1"}, api.ParameterCodec) - if !reflect.DeepEqual(r.params, url.Values{ - "resourceVersion": []string{"1"}, - }) { - t.Errorf("should have set a param: %#v", r) - } - - var timeout int64 = 10 - r.VersionedParams(&api.ListOptions{ResourceVersion: "2", TimeoutSeconds: &timeout}, api.ParameterCodec) - if !reflect.DeepEqual(r.params, url.Values{ - "resourceVersion": []string{"1", "2"}, - "timeoutSeconds": []string{"10"}, - }) { - t.Errorf("should have set a param: %#v", r) - } -} - -func TestRequestURI(t *testing.T) { - r := (&Request{}).Param("foo", "a") - r.Prefix("other") - r.RequestURI("/test?foo=b&a=b&c=1&c=2") - if r.pathPrefix != "/test" { - t.Errorf("path is wrong: %#v", r) - } - if !reflect.DeepEqual(r.params, url.Values{"a": []string{"b"}, "foo": []string{"b"}, "c": []string{"1", "2"}}) { - t.Errorf("should have set a param: %#v", r) - } -} - -type NotAnAPIObject struct{} - -func (obj NotAnAPIObject) GroupVersionKind() *schema.GroupVersionKind { return nil } -func (obj NotAnAPIObject) SetGroupVersionKind(gvk *schema.GroupVersionKind) {} - -func defaultContentConfig() ContentConfig { - return ContentConfig{ - GroupVersion: &api.Registry.GroupOrDie(api.GroupName).GroupVersion, - NegotiatedSerializer: testapi.Default.NegotiatedSerializer(), - } -} - -func defaultSerializers() Serializers { - return Serializers{ - Encoder: testapi.Default.Codec(), - Decoder: testapi.Default.Codec(), - StreamingSerializer: testapi.Default.Codec(), - Framer: runtime.DefaultFramer, - RenegotiatedDecoder: func(contentType string, params map[string]string) (runtime.Decoder, error) { - return testapi.Default.Codec(), nil - }, - } -} - -func TestRequestBody(t *testing.T) { - // test unknown type - r := (&Request{}).Body([]string{"test"}) - if r.err == nil || r.body != nil { - t.Errorf("should have set err and left body nil: %#v", r) - } - - // test error set when failing to read file - f, err := ioutil.TempFile("", "test") - if err != nil { - t.Fatalf("unable to create temp file") - } - defer f.Close() - os.Remove(f.Name()) - r = (&Request{}).Body(f.Name()) - if r.err == nil || r.body != nil { - t.Errorf("should have set err and left body nil: %#v", r) - } - - // test unencodable api object - r = (&Request{content: defaultContentConfig()}).Body(&NotAnAPIObject{}) - if r.err == nil || r.body != nil { - t.Errorf("should have set err and left body nil: %#v", r) - } -} - -func TestResultIntoWithErrReturnsErr(t *testing.T) { - res := Result{err: errors.New("test")} - if err := res.Into(&api.Pod{}); err != res.err { - t.Errorf("should have returned exact error from result") - } -} - -func TestURLTemplate(t *testing.T) { - uri, _ := url.Parse("http://localhost") - r := NewRequest(nil, "POST", uri, "", ContentConfig{GroupVersion: &schema.GroupVersion{Group: "test"}}, Serializers{}, nil, nil) - r.Prefix("pre1").Resource("r1").Namespace("ns").Name("nm").Param("p0", "v0") - full := r.URL() - if full.String() != "http://localhost/pre1/namespaces/ns/r1/nm?p0=v0" { - t.Errorf("unexpected initial URL: %s", full) - } - actualURL := r.finalURLTemplate() - actual := actualURL.String() - expected := "http://localhost/pre1/namespaces/%7Bnamespace%7D/r1/%7Bname%7D?p0=%7Bvalue%7D" - if actual != expected { - t.Errorf("unexpected URL template: %s %s", actual, expected) - } - if r.URL().String() != full.String() { - t.Errorf("creating URL template changed request: %s -> %s", full.String(), r.URL().String()) - } -} - -func TestTransformResponse(t *testing.T) { - invalid := []byte("aaaaa") - uri, _ := url.Parse("http://localhost") - testCases := []struct { - Response *http.Response - Data []byte - Created bool - Error bool - ErrFn func(err error) bool - }{ - {Response: &http.Response{StatusCode: 200}, Data: []byte{}}, - {Response: &http.Response{StatusCode: 201}, Data: []byte{}, Created: true}, - {Response: &http.Response{StatusCode: 199}, Error: true}, - {Response: &http.Response{StatusCode: 500}, Error: true}, - {Response: &http.Response{StatusCode: 422}, Error: true}, - {Response: &http.Response{StatusCode: 409}, Error: true}, - {Response: &http.Response{StatusCode: 404}, Error: true}, - {Response: &http.Response{StatusCode: 401}, Error: true}, - { - Response: &http.Response{ - StatusCode: 401, - Header: http.Header{"Content-Type": []string{"application/json"}}, - Body: ioutil.NopCloser(bytes.NewReader(invalid)), - }, - Error: true, - ErrFn: func(err error) bool { - return err.Error() != "aaaaa" && apierrors.IsUnauthorized(err) - }, - }, - { - Response: &http.Response{ - StatusCode: 401, - Header: http.Header{"Content-Type": []string{"text/any"}}, - Body: ioutil.NopCloser(bytes.NewReader(invalid)), - }, - Error: true, - ErrFn: func(err error) bool { - return strings.Contains(err.Error(), "server has asked for the client to provide") && apierrors.IsUnauthorized(err) - }, - }, - {Response: &http.Response{StatusCode: 403}, Error: true}, - {Response: &http.Response{StatusCode: 200, Body: ioutil.NopCloser(bytes.NewReader(invalid))}, Data: invalid}, - {Response: &http.Response{StatusCode: 200, Body: ioutil.NopCloser(bytes.NewReader(invalid))}, Data: invalid}, - } - for i, test := range testCases { - r := NewRequest(nil, "", uri, "", defaultContentConfig(), defaultSerializers(), nil, nil) - if test.Response.Body == nil { - test.Response.Body = ioutil.NopCloser(bytes.NewReader([]byte{})) - } - result := r.transformResponse(test.Response, &http.Request{}) - response, created, err := result.body, result.statusCode == http.StatusCreated, result.err - hasErr := err != nil - if hasErr != test.Error { - t.Errorf("%d: unexpected error: %t %v", i, test.Error, err) - } else if hasErr && test.Response.StatusCode > 399 { - status, ok := err.(apierrors.APIStatus) - if !ok { - t.Errorf("%d: response should have been transformable into APIStatus: %v", i, err) - continue - } - if int(status.Status().Code) != test.Response.StatusCode { - t.Errorf("%d: status code did not match response: %#v", i, status.Status()) - } - } - if test.ErrFn != nil && !test.ErrFn(err) { - t.Errorf("%d: error function did not match: %v", i, err) - } - if !(test.Data == nil && response == nil) && !api.Semantic.DeepDerivative(test.Data, response) { - t.Errorf("%d: unexpected response: %#v %#v", i, test.Data, response) - } - if test.Created != created { - t.Errorf("%d: expected created %t, got %t", i, test.Created, created) - } - } -} - -type renegotiator struct { - called bool - contentType string - params map[string]string - decoder runtime.Decoder - err error -} - -func (r *renegotiator) invoke(contentType string, params map[string]string) (runtime.Decoder, error) { - r.called = true - r.contentType = contentType - r.params = params - return r.decoder, r.err -} - -func TestTransformResponseNegotiate(t *testing.T) { - invalid := []byte("aaaaa") - uri, _ := url.Parse("http://localhost") - testCases := []struct { - Response *http.Response - Data []byte - Created bool - Error bool - ErrFn func(err error) bool - - ContentType string - Called bool - ExpectContentType string - Decoder runtime.Decoder - NegotiateErr error - }{ - { - ContentType: "application/json", - Response: &http.Response{ - StatusCode: 401, - Header: http.Header{"Content-Type": []string{"application/json"}}, - Body: ioutil.NopCloser(bytes.NewReader(invalid)), - }, - Error: true, - ErrFn: func(err error) bool { - return err.Error() != "aaaaa" && apierrors.IsUnauthorized(err) - }, - }, - { - ContentType: "application/json", - Response: &http.Response{ - StatusCode: 401, - Header: http.Header{"Content-Type": []string{"application/protobuf"}}, - Body: ioutil.NopCloser(bytes.NewReader(invalid)), - }, - Decoder: testapi.Default.Codec(), - - Called: true, - ExpectContentType: "application/protobuf", - - Error: true, - ErrFn: func(err error) bool { - return err.Error() != "aaaaa" && apierrors.IsUnauthorized(err) - }, - }, - { - ContentType: "application/json", - Response: &http.Response{ - StatusCode: 500, - Header: http.Header{"Content-Type": []string{"application/,others"}}, - }, - Decoder: testapi.Default.Codec(), - - Error: true, - ErrFn: func(err error) bool { - return err.Error() == "Internal error occurred: mime: expected token after slash" && err.(apierrors.APIStatus).Status().Code == 500 - }, - }, - { - // no negotiation when no content type specified - Response: &http.Response{ - StatusCode: 200, - Header: http.Header{"Content-Type": []string{"text/any"}}, - Body: ioutil.NopCloser(bytes.NewReader(invalid)), - }, - Decoder: testapi.Default.Codec(), - }, - { - // no negotiation when no response content type specified - ContentType: "text/any", - Response: &http.Response{ - StatusCode: 200, - Body: ioutil.NopCloser(bytes.NewReader(invalid)), - }, - Decoder: testapi.Default.Codec(), - }, - { - // unrecognized content type is not handled - ContentType: "application/json", - Response: &http.Response{ - StatusCode: 404, - Header: http.Header{"Content-Type": []string{"application/unrecognized"}}, - Body: ioutil.NopCloser(bytes.NewReader(invalid)), - }, - Decoder: testapi.Default.Codec(), - - NegotiateErr: fmt.Errorf("aaaa"), - Called: true, - ExpectContentType: "application/unrecognized", - - Error: true, - ErrFn: func(err error) bool { - return err.Error() != "aaaaa" && apierrors.IsNotFound(err) - }, - }, - } - for i, test := range testCases { - serializers := defaultSerializers() - negotiator := &renegotiator{ - decoder: test.Decoder, - err: test.NegotiateErr, - } - serializers.RenegotiatedDecoder = negotiator.invoke - contentConfig := defaultContentConfig() - contentConfig.ContentType = test.ContentType - r := NewRequest(nil, "", uri, "", contentConfig, serializers, nil, nil) - if test.Response.Body == nil { - test.Response.Body = ioutil.NopCloser(bytes.NewReader([]byte{})) - } - result := r.transformResponse(test.Response, &http.Request{}) - _, err := result.body, result.err - hasErr := err != nil - if hasErr != test.Error { - t.Errorf("%d: unexpected error: %t %v", i, test.Error, err) - continue - } else if hasErr && test.Response.StatusCode > 399 { - status, ok := err.(apierrors.APIStatus) - if !ok { - t.Errorf("%d: response should have been transformable into APIStatus: %v", i, err) - continue - } - if int(status.Status().Code) != test.Response.StatusCode { - t.Errorf("%d: status code did not match response: %#v", i, status.Status()) - } - } - if test.ErrFn != nil && !test.ErrFn(err) { - t.Errorf("%d: error function did not match: %v", i, err) - } - if negotiator.called != test.Called { - t.Errorf("%d: negotiator called %t != %t", i, negotiator.called, test.Called) - } - if !test.Called { - continue - } - if negotiator.contentType != test.ExpectContentType { - t.Errorf("%d: unexpected content type: %s", i, negotiator.contentType) - } - } -} - -func TestTransformUnstructuredError(t *testing.T) { - testCases := []struct { - Req *http.Request - Res *http.Response - - Resource string - Name string - - ErrFn func(error) bool - Transformed error - }{ - { - Resource: "foo", - Name: "bar", - Req: &http.Request{ - Method: "POST", - }, - Res: &http.Response{ - StatusCode: http.StatusConflict, - Body: ioutil.NopCloser(bytes.NewReader(nil)), - }, - ErrFn: apierrors.IsAlreadyExists, - }, - { - Resource: "foo", - Name: "bar", - Req: &http.Request{ - Method: "PUT", - }, - Res: &http.Response{ - StatusCode: http.StatusConflict, - Body: ioutil.NopCloser(bytes.NewReader(nil)), - }, - ErrFn: apierrors.IsConflict, - }, - { - Resource: "foo", - Name: "bar", - Req: &http.Request{}, - Res: &http.Response{ - StatusCode: http.StatusNotFound, - Body: ioutil.NopCloser(bytes.NewReader(nil)), - }, - ErrFn: apierrors.IsNotFound, - }, - { - Req: &http.Request{}, - Res: &http.Response{ - StatusCode: http.StatusBadRequest, - Body: ioutil.NopCloser(bytes.NewReader(nil)), - }, - ErrFn: apierrors.IsBadRequest, - }, - { - // status in response overrides transformed result - Req: &http.Request{}, - Res: &http.Response{StatusCode: http.StatusBadRequest, Body: ioutil.NopCloser(bytes.NewReader([]byte(`{"kind":"Status","apiVersion":"v1","status":"Failure","code":404}`)))}, - ErrFn: apierrors.IsBadRequest, - Transformed: &apierrors.StatusError{ - ErrStatus: metav1.Status{Status: metav1.StatusFailure, Code: http.StatusNotFound}, - }, - }, - { - // successful status is ignored - Req: &http.Request{}, - Res: &http.Response{StatusCode: http.StatusBadRequest, Body: ioutil.NopCloser(bytes.NewReader([]byte(`{"kind":"Status","apiVersion":"v1","status":"Success","code":404}`)))}, - ErrFn: apierrors.IsBadRequest, - }, - { - // empty object does not change result - Req: &http.Request{}, - Res: &http.Response{StatusCode: http.StatusBadRequest, Body: ioutil.NopCloser(bytes.NewReader([]byte(`{}`)))}, - ErrFn: apierrors.IsBadRequest, - }, - { - // we default apiVersion for backwards compatibility with old clients - // TODO: potentially remove in 1.7 - Req: &http.Request{}, - Res: &http.Response{StatusCode: http.StatusBadRequest, Body: ioutil.NopCloser(bytes.NewReader([]byte(`{"kind":"Status","status":"Failure","code":404}`)))}, - ErrFn: apierrors.IsBadRequest, - Transformed: &apierrors.StatusError{ - ErrStatus: metav1.Status{Status: metav1.StatusFailure, Code: http.StatusNotFound}, - }, - }, - { - // we do not default kind - Req: &http.Request{}, - Res: &http.Response{StatusCode: http.StatusBadRequest, Body: ioutil.NopCloser(bytes.NewReader([]byte(`{"status":"Failure","code":404}`)))}, - ErrFn: apierrors.IsBadRequest, - }, - } - - for i, testCase := range testCases { - r := &Request{ - content: defaultContentConfig(), - serializers: defaultSerializers(), - resourceName: testCase.Name, - resource: testCase.Resource, - } - result := r.transformResponse(testCase.Res, testCase.Req) - err := result.err - if !testCase.ErrFn(err) { - t.Errorf("unexpected error: %v", err) - continue - } - if !apierrors.IsUnexpectedServerError(err) { - t.Errorf("%d: unexpected error type: %v", i, err) - } - if len(testCase.Name) != 0 && !strings.Contains(err.Error(), testCase.Name) { - t.Errorf("unexpected error string: %s", err) - } - if len(testCase.Resource) != 0 && !strings.Contains(err.Error(), testCase.Resource) { - t.Errorf("unexpected error string: %s", err) - } - - // verify Error() properly transforms the error - transformed := result.Error() - expect := testCase.Transformed - if expect == nil { - expect = err - } - if !reflect.DeepEqual(expect, transformed) { - t.Errorf("%d: unexpected Error(): %s", i, diff.ObjectReflectDiff(expect, transformed)) - } - - // verify result.Get properly transforms the error - if _, err := result.Get(); !reflect.DeepEqual(expect, err) { - t.Errorf("%d: unexpected error on Get(): %s", i, diff.ObjectReflectDiff(expect, err)) - } - - // verify result.Into properly handles the error - if err := result.Into(&api.Pod{}); !reflect.DeepEqual(expect, err) { - t.Errorf("%d: unexpected error on Into(): %s", i, diff.ObjectReflectDiff(expect, err)) - } - - // verify result.Raw leaves the error in the untransformed state - if _, err := result.Raw(); !reflect.DeepEqual(result.err, err) { - t.Errorf("%d: unexpected error on Raw(): %s", i, diff.ObjectReflectDiff(expect, err)) - } - } -} - -func TestRequestWatch(t *testing.T) { - testCases := []struct { - Request *Request - Err bool - ErrFn func(error) bool - Empty bool - }{ - { - Request: &Request{err: errors.New("bail")}, - Err: true, - }, - { - Request: &Request{baseURL: &url.URL{}, pathPrefix: "%"}, - Err: true, - }, - { - Request: &Request{ - client: clientFunc(func(req *http.Request) (*http.Response, error) { - return nil, errors.New("err") - }), - baseURL: &url.URL{}, - }, - Err: true, - }, - { - Request: &Request{ - content: defaultContentConfig(), - serializers: defaultSerializers(), - client: clientFunc(func(req *http.Request) (*http.Response, error) { - return &http.Response{ - StatusCode: http.StatusForbidden, - Body: ioutil.NopCloser(bytes.NewReader([]byte{})), - }, nil - }), - baseURL: &url.URL{}, - }, - Err: true, - ErrFn: func(err error) bool { - return apierrors.IsForbidden(err) - }, - }, - { - Request: &Request{ - content: defaultContentConfig(), - serializers: defaultSerializers(), - client: clientFunc(func(req *http.Request) (*http.Response, error) { - return &http.Response{ - StatusCode: http.StatusUnauthorized, - Body: ioutil.NopCloser(bytes.NewReader([]byte{})), - }, nil - }), - baseURL: &url.URL{}, - }, - Err: true, - ErrFn: func(err error) bool { - return apierrors.IsUnauthorized(err) - }, - }, - { - Request: &Request{ - content: defaultContentConfig(), - serializers: defaultSerializers(), - client: clientFunc(func(req *http.Request) (*http.Response, error) { - return &http.Response{ - StatusCode: http.StatusUnauthorized, - Body: ioutil.NopCloser(bytes.NewReader([]byte(runtime.EncodeOrDie(testapi.Default.Codec(), &metav1.Status{ - Status: metav1.StatusFailure, - Reason: metav1.StatusReasonUnauthorized, - })))), - }, nil - }), - baseURL: &url.URL{}, - }, - Err: true, - ErrFn: func(err error) bool { - return apierrors.IsUnauthorized(err) - }, - }, - { - Request: &Request{ - serializers: defaultSerializers(), - client: clientFunc(func(req *http.Request) (*http.Response, error) { - return nil, io.EOF - }), - baseURL: &url.URL{}, - }, - Empty: true, - }, - { - Request: &Request{ - serializers: defaultSerializers(), - client: clientFunc(func(req *http.Request) (*http.Response, error) { - return nil, &url.Error{Err: io.EOF} - }), - baseURL: &url.URL{}, - }, - Empty: true, - }, - { - Request: &Request{ - serializers: defaultSerializers(), - client: clientFunc(func(req *http.Request) (*http.Response, error) { - return nil, errors.New("http: can't write HTTP request on broken connection") - }), - baseURL: &url.URL{}, - }, - Empty: true, - }, - { - Request: &Request{ - serializers: defaultSerializers(), - client: clientFunc(func(req *http.Request) (*http.Response, error) { - return nil, errors.New("foo: connection reset by peer") - }), - baseURL: &url.URL{}, - }, - Empty: true, - }, - } - for i, testCase := range testCases { - t.Logf("testcase %v", testCase.Request) - testCase.Request.backoffMgr = &NoBackoff{} - watch, err := testCase.Request.Watch() - hasErr := err != nil - if hasErr != testCase.Err { - t.Errorf("%d: expected %t, got %t: %v", i, testCase.Err, hasErr, err) - continue - } - if testCase.ErrFn != nil && !testCase.ErrFn(err) { - t.Errorf("%d: error not valid: %v", i, err) - } - if hasErr && watch != nil { - t.Errorf("%d: watch should be nil when error is returned", i) - continue - } - if testCase.Empty { - _, ok := <-watch.ResultChan() - if ok { - t.Errorf("%d: expected the watch to be empty: %#v", i, watch) - } - } - } -} - -func TestRequestStream(t *testing.T) { - testCases := []struct { - Request *Request - Err bool - }{ - { - Request: &Request{err: errors.New("bail")}, - Err: true, - }, - { - Request: &Request{baseURL: &url.URL{}, pathPrefix: "%"}, - Err: true, - }, - { - Request: &Request{ - client: clientFunc(func(req *http.Request) (*http.Response, error) { - return nil, errors.New("err") - }), - baseURL: &url.URL{}, - }, - Err: true, - }, - { - Request: &Request{ - client: clientFunc(func(req *http.Request) (*http.Response, error) { - return &http.Response{ - StatusCode: http.StatusUnauthorized, - Body: ioutil.NopCloser(bytes.NewReader([]byte(runtime.EncodeOrDie(testapi.Default.Codec(), &metav1.Status{ - Status: metav1.StatusFailure, - Reason: metav1.StatusReasonUnauthorized, - })))), - }, nil - }), - content: defaultContentConfig(), - serializers: defaultSerializers(), - baseURL: &url.URL{}, - }, - Err: true, - }, - } - for i, testCase := range testCases { - testCase.Request.backoffMgr = &NoBackoff{} - body, err := testCase.Request.Stream() - hasErr := err != nil - if hasErr != testCase.Err { - t.Errorf("%d: expected %t, got %t: %v", i, testCase.Err, hasErr, err) - } - if hasErr && body != nil { - t.Errorf("%d: body should be nil when error is returned", i) - } - } -} - -type fakeUpgradeConnection struct{} - -func (c *fakeUpgradeConnection) CreateStream(headers http.Header) (httpstream.Stream, error) { - return nil, nil -} -func (c *fakeUpgradeConnection) Close() error { - return nil -} -func (c *fakeUpgradeConnection) CloseChan() <-chan bool { - return make(chan bool) -} -func (c *fakeUpgradeConnection) SetIdleTimeout(timeout time.Duration) { -} - -type fakeUpgradeRoundTripper struct { - req *http.Request - conn httpstream.Connection -} - -func (f *fakeUpgradeRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) { - f.req = req - b := []byte{} - body := ioutil.NopCloser(bytes.NewReader(b)) - resp := &http.Response{ - StatusCode: 101, - Body: body, - } - return resp, nil -} - -func (f *fakeUpgradeRoundTripper) NewConnection(resp *http.Response) (httpstream.Connection, error) { - return f.conn, nil -} - -func TestRequestDo(t *testing.T) { - testCases := []struct { - Request *Request - Err bool - }{ - { - Request: &Request{err: errors.New("bail")}, - Err: true, - }, - { - Request: &Request{baseURL: &url.URL{}, pathPrefix: "%"}, - Err: true, - }, - { - Request: &Request{ - client: clientFunc(func(req *http.Request) (*http.Response, error) { - return nil, errors.New("err") - }), - baseURL: &url.URL{}, - }, - Err: true, - }, - } - for i, testCase := range testCases { - testCase.Request.backoffMgr = &NoBackoff{} - body, err := testCase.Request.Do().Raw() - hasErr := err != nil - if hasErr != testCase.Err { - t.Errorf("%d: expected %t, got %t: %v", i, testCase.Err, hasErr, err) - } - if hasErr && body != nil { - t.Errorf("%d: body should be nil when error is returned", i) - } - } -} - -func TestDoRequestNewWay(t *testing.T) { - reqBody := "request body" - expectedObj := &api.Service{Spec: api.ServiceSpec{Ports: []api.ServicePort{{ - Protocol: "TCP", - Port: 12345, - TargetPort: intstr.FromInt(12345), - }}}} - expectedBody, _ := runtime.Encode(testapi.Default.Codec(), expectedObj) - fakeHandler := utiltesting.FakeHandler{ - StatusCode: 200, - ResponseBody: string(expectedBody), - T: t, - } - testServer := httptest.NewServer(&fakeHandler) - defer testServer.Close() - c := testRESTClient(t, testServer) - obj, err := c.Verb("POST"). - Prefix("foo", "bar"). - Suffix("baz"). - Timeout(time.Second). - Body([]byte(reqBody)). - Do().Get() - if err != nil { - t.Errorf("Unexpected error: %v %#v", err, err) - return - } - if obj == nil { - t.Error("nil obj") - } else if !api.Semantic.DeepDerivative(expectedObj, obj) { - t.Errorf("Expected: %#v, got %#v", expectedObj, obj) - } - requestURL := testapi.Default.ResourcePathWithPrefix("foo/bar", "", "", "baz") - requestURL += "?timeout=1s" - fakeHandler.ValidateRequest(t, requestURL, "POST", &reqBody) -} - -// This test assumes that the client implementation backs off exponentially, for an individual request. -func TestBackoffLifecycle(t *testing.T) { - count := 0 - testServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { - count++ - t.Logf("Attempt %d", count) - if count == 5 || count == 9 { - w.WriteHeader(http.StatusOK) - return - } else { - w.WriteHeader(http.StatusGatewayTimeout) - return - } - })) - defer testServer.Close() - c := testRESTClient(t, testServer) - - // Test backoff recovery and increase. This correlates to the constants - // which are used in the server implementation returning StatusOK above. - seconds := []int{0, 1, 2, 4, 8, 0, 1, 2, 4, 0} - request := c.Verb("POST").Prefix("backofftest").Suffix("abc") - clock := clock.FakeClock{} - request.backoffMgr = &URLBackoff{ - // Use a fake backoff here to avoid flakes and speed the test up. - Backoff: flowcontrol.NewFakeBackOff( - time.Duration(1)*time.Second, - time.Duration(200)*time.Second, - &clock, - )} - - for _, sec := range seconds { - thisBackoff := request.backoffMgr.CalculateBackoff(request.URL()) - t.Logf("Current backoff %v", thisBackoff) - if thisBackoff != time.Duration(sec)*time.Second { - t.Errorf("Backoff is %v instead of %v", thisBackoff, sec) - } - now := clock.Now() - request.DoRaw() - elapsed := clock.Since(now) - if clock.Since(now) != thisBackoff { - t.Errorf("CalculatedBackoff not honored by clock: Expected time of %v, but got %v ", thisBackoff, elapsed) - } - } -} - -type testBackoffManager struct { - sleeps []time.Duration -} - -func (b *testBackoffManager) UpdateBackoff(actualUrl *url.URL, err error, responseCode int) { -} - -func (b *testBackoffManager) CalculateBackoff(actualUrl *url.URL) time.Duration { - return time.Duration(0) -} - -func (b *testBackoffManager) Sleep(d time.Duration) { - b.sleeps = append(b.sleeps, d) -} - -func TestCheckRetryClosesBody(t *testing.T) { - count := 0 - ch := make(chan struct{}) - testServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { - count++ - t.Logf("attempt %d", count) - if count >= 5 { - w.WriteHeader(http.StatusOK) - close(ch) - return - } - w.Header().Set("Retry-After", "1") - http.Error(w, "Too many requests, please try again later.", apierrors.StatusTooManyRequests) - })) - defer testServer.Close() - - backoffMgr := &testBackoffManager{} - expectedSleeps := []time.Duration{0, time.Second, 0, time.Second, 0, time.Second, 0, time.Second, 0} - - c := testRESTClient(t, testServer) - c.createBackoffMgr = func() BackoffManager { return backoffMgr } - _, err := c.Verb("POST"). - Prefix("foo", "bar"). - Suffix("baz"). - Timeout(time.Second). - Body([]byte(strings.Repeat("abcd", 1000))). - DoRaw() - if err != nil { - t.Fatalf("Unexpected error: %v %#v", err, err) - } - <-ch - if count != 5 { - t.Errorf("unexpected retries: %d", count) - } - if !reflect.DeepEqual(backoffMgr.sleeps, expectedSleeps) { - t.Errorf("unexpected sleeps, expected: %v, got: %v", expectedSleeps, backoffMgr.sleeps) - } -} - -func TestConnectionResetByPeerIsRetried(t *testing.T) { - count := 0 - backoff := &testBackoffManager{} - req := &Request{ - verb: "GET", - client: clientFunc(func(req *http.Request) (*http.Response, error) { - count++ - if count >= 3 { - return &http.Response{ - StatusCode: 200, - Body: ioutil.NopCloser(bytes.NewReader([]byte{})), - }, nil - } - return nil, &net.OpError{Err: syscall.ECONNRESET} - }), - backoffMgr: backoff, - } - // We expect two retries of "connection reset by peer" and the success. - _, err := req.Do().Raw() - if err != nil { - t.Errorf("Unexpected error: %v", err) - } - // We have a sleep before each retry (including the initial one) and for - // every "retry-after" call - thus 5 together. - if len(backoff.sleeps) != 5 { - t.Errorf("Expected 5 retries, got: %d", len(backoff.sleeps)) - } -} - -func TestCheckRetryHandles429And5xx(t *testing.T) { - count := 0 - ch := make(chan struct{}) - testServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { - data, err := ioutil.ReadAll(req.Body) - if err != nil { - t.Fatalf("unable to read request body: %v", err) - } - if !bytes.Equal(data, []byte(strings.Repeat("abcd", 1000))) { - t.Fatalf("retry did not send a complete body: %s", data) - } - t.Logf("attempt %d", count) - if count >= 4 { - w.WriteHeader(http.StatusOK) - close(ch) - return - } - w.Header().Set("Retry-After", "0") - w.WriteHeader([]int{apierrors.StatusTooManyRequests, 500, 501, 504}[count]) - count++ - })) - defer testServer.Close() - - c := testRESTClient(t, testServer) - _, err := c.Verb("POST"). - Prefix("foo", "bar"). - Suffix("baz"). - Timeout(time.Second). - Body([]byte(strings.Repeat("abcd", 1000))). - DoRaw() - if err != nil { - t.Fatalf("Unexpected error: %v %#v", err, err) - } - <-ch - if count != 4 { - t.Errorf("unexpected retries: %d", count) - } -} - -func BenchmarkCheckRetryClosesBody(b *testing.B) { - count := 0 - testServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { - count++ - if count%3 == 0 { - w.WriteHeader(http.StatusOK) - return - } - w.Header().Set("Retry-After", "0") - w.WriteHeader(apierrors.StatusTooManyRequests) - })) - defer testServer.Close() - - c := testRESTClient(b, testServer) - r := c.Verb("POST"). - Prefix("foo", "bar"). - Suffix("baz"). - Timeout(time.Second). - Body([]byte(strings.Repeat("abcd", 1000))) - - for i := 0; i < b.N; i++ { - if _, err := r.DoRaw(); err != nil { - b.Fatalf("Unexpected error: %v %#v", err, err) - } - } -} - -func TestDoRequestNewWayReader(t *testing.T) { - reqObj := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}} - reqBodyExpected, _ := runtime.Encode(testapi.Default.Codec(), reqObj) - expectedObj := &api.Service{Spec: api.ServiceSpec{Ports: []api.ServicePort{{ - Protocol: "TCP", - Port: 12345, - TargetPort: intstr.FromInt(12345), - }}}} - expectedBody, _ := runtime.Encode(testapi.Default.Codec(), expectedObj) - fakeHandler := utiltesting.FakeHandler{ - StatusCode: 200, - ResponseBody: string(expectedBody), - T: t, - } - testServer := httptest.NewServer(&fakeHandler) - defer testServer.Close() - c := testRESTClient(t, testServer) - obj, err := c.Verb("POST"). - Resource("bar"). - Name("baz"). - Prefix("foo"). - LabelsSelectorParam(labels.Set{"name": "foo"}.AsSelector()). - Timeout(time.Second). - Body(bytes.NewBuffer(reqBodyExpected)). - Do().Get() - if err != nil { - t.Errorf("Unexpected error: %v %#v", err, err) - return - } - if obj == nil { - t.Error("nil obj") - } else if !api.Semantic.DeepDerivative(expectedObj, obj) { - t.Errorf("Expected: %#v, got %#v", expectedObj, obj) - } - tmpStr := string(reqBodyExpected) - requestURL := testapi.Default.ResourcePathWithPrefix("foo", "bar", "", "baz") - requestURL += "?" + metav1.LabelSelectorQueryParam(api.Registry.GroupOrDie(api.GroupName).GroupVersion.String()) + "=name%3Dfoo&timeout=1s" - fakeHandler.ValidateRequest(t, requestURL, "POST", &tmpStr) -} - -func TestDoRequestNewWayObj(t *testing.T) { - reqObj := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}} - reqBodyExpected, _ := runtime.Encode(testapi.Default.Codec(), reqObj) - expectedObj := &api.Service{Spec: api.ServiceSpec{Ports: []api.ServicePort{{ - Protocol: "TCP", - Port: 12345, - TargetPort: intstr.FromInt(12345), - }}}} - expectedBody, _ := runtime.Encode(testapi.Default.Codec(), expectedObj) - fakeHandler := utiltesting.FakeHandler{ - StatusCode: 200, - ResponseBody: string(expectedBody), - T: t, - } - testServer := httptest.NewServer(&fakeHandler) - defer testServer.Close() - c := testRESTClient(t, testServer) - obj, err := c.Verb("POST"). - Suffix("baz"). - Name("bar"). - Resource("foo"). - LabelsSelectorParam(labels.Set{"name": "foo"}.AsSelector()). - Timeout(time.Second). - Body(reqObj). - Do().Get() - if err != nil { - t.Errorf("Unexpected error: %v %#v", err, err) - return - } - if obj == nil { - t.Error("nil obj") - } else if !api.Semantic.DeepDerivative(expectedObj, obj) { - t.Errorf("Expected: %#v, got %#v", expectedObj, obj) - } - tmpStr := string(reqBodyExpected) - requestURL := testapi.Default.ResourcePath("foo", "", "bar/baz") - requestURL += "?" + metav1.LabelSelectorQueryParam(api.Registry.GroupOrDie(api.GroupName).GroupVersion.String()) + "=name%3Dfoo&timeout=1s" - fakeHandler.ValidateRequest(t, requestURL, "POST", &tmpStr) -} - -func TestDoRequestNewWayFile(t *testing.T) { - reqObj := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}} - reqBodyExpected, err := runtime.Encode(testapi.Default.Codec(), reqObj) - if err != nil { - t.Errorf("unexpected error: %v", err) - } - - file, err := ioutil.TempFile("", "foo") - if err != nil { - t.Errorf("unexpected error: %v", err) - } - defer file.Close() - defer os.Remove(file.Name()) - - _, err = file.Write(reqBodyExpected) - if err != nil { - t.Errorf("unexpected error: %v", err) - } - - expectedObj := &api.Service{Spec: api.ServiceSpec{Ports: []api.ServicePort{{ - Protocol: "TCP", - Port: 12345, - TargetPort: intstr.FromInt(12345), - }}}} - expectedBody, _ := runtime.Encode(testapi.Default.Codec(), expectedObj) - fakeHandler := utiltesting.FakeHandler{ - StatusCode: 200, - ResponseBody: string(expectedBody), - T: t, - } - testServer := httptest.NewServer(&fakeHandler) - defer testServer.Close() - c := testRESTClient(t, testServer) - wasCreated := true - obj, err := c.Verb("POST"). - Prefix("foo/bar", "baz"). - Timeout(time.Second). - Body(file.Name()). - Do().WasCreated(&wasCreated).Get() - if err != nil { - t.Errorf("Unexpected error: %v %#v", err, err) - return - } - if obj == nil { - t.Error("nil obj") - } else if !api.Semantic.DeepDerivative(expectedObj, obj) { - t.Errorf("Expected: %#v, got %#v", expectedObj, obj) - } - if wasCreated { - t.Errorf("expected object was created") - } - tmpStr := string(reqBodyExpected) - requestURL := testapi.Default.ResourcePathWithPrefix("foo/bar/baz", "", "", "") - requestURL += "?timeout=1s" - fakeHandler.ValidateRequest(t, requestURL, "POST", &tmpStr) -} - -func TestWasCreated(t *testing.T) { - reqObj := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}} - reqBodyExpected, err := runtime.Encode(testapi.Default.Codec(), reqObj) - if err != nil { - t.Errorf("unexpected error: %v", err) - } - - expectedObj := &api.Service{Spec: api.ServiceSpec{Ports: []api.ServicePort{{ - Protocol: "TCP", - Port: 12345, - TargetPort: intstr.FromInt(12345), - }}}} - expectedBody, _ := runtime.Encode(testapi.Default.Codec(), expectedObj) - fakeHandler := utiltesting.FakeHandler{ - StatusCode: 201, - ResponseBody: string(expectedBody), - T: t, - } - testServer := httptest.NewServer(&fakeHandler) - defer testServer.Close() - c := testRESTClient(t, testServer) - wasCreated := false - obj, err := c.Verb("PUT"). - Prefix("foo/bar", "baz"). - Timeout(time.Second). - Body(reqBodyExpected). - Do().WasCreated(&wasCreated).Get() - if err != nil { - t.Errorf("Unexpected error: %v %#v", err, err) - return - } - if obj == nil { - t.Error("nil obj") - } else if !api.Semantic.DeepDerivative(expectedObj, obj) { - t.Errorf("Expected: %#v, got %#v", expectedObj, obj) - } - if !wasCreated { - t.Errorf("Expected object was created") - } - - tmpStr := string(reqBodyExpected) - requestURL := testapi.Default.ResourcePathWithPrefix("foo/bar/baz", "", "", "") - requestURL += "?timeout=1s" - fakeHandler.ValidateRequest(t, requestURL, "PUT", &tmpStr) -} - -func TestVerbs(t *testing.T) { - c := testRESTClient(t, nil) - if r := c.Post(); r.verb != "POST" { - t.Errorf("Post verb is wrong") - } - if r := c.Put(); r.verb != "PUT" { - t.Errorf("Put verb is wrong") - } - if r := c.Get(); r.verb != "GET" { - t.Errorf("Get verb is wrong") - } - if r := c.Delete(); r.verb != "DELETE" { - t.Errorf("Delete verb is wrong") - } -} - -func TestAbsPath(t *testing.T) { - for i, tc := range []struct { - configPrefix string - resourcePrefix string - absPath string - wantsAbsPath string - }{ - {"/", "", "", "/"}, - {"", "", "/", "/"}, - {"", "", "/api", "/api"}, - {"", "", "/api/", "/api/"}, - {"", "", "/apis", "/apis"}, - {"", "/foo", "/bar/foo", "/bar/foo"}, - {"", "/api/foo/123", "/bar/foo", "/bar/foo"}, - {"/p1", "", "", "/p1"}, - {"/p1", "", "/", "/p1/"}, - {"/p1", "", "/api", "/p1/api"}, - {"/p1", "", "/apis", "/p1/apis"}, - {"/p1", "/r1", "/apis", "/p1/apis"}, - {"/p1", "/api/r1", "/apis", "/p1/apis"}, - {"/p1/api/p2", "", "", "/p1/api/p2"}, - {"/p1/api/p2", "", "/", "/p1/api/p2/"}, - {"/p1/api/p2", "", "/api", "/p1/api/p2/api"}, - {"/p1/api/p2", "", "/api/", "/p1/api/p2/api/"}, - {"/p1/api/p2", "/r1", "/api/", "/p1/api/p2/api/"}, - {"/p1/api/p2", "/api/r1", "/api/", "/p1/api/p2/api/"}, - } { - u, _ := url.Parse("http://localhost:123" + tc.configPrefix) - r := NewRequest(nil, "POST", u, "", ContentConfig{GroupVersion: &schema.GroupVersion{Group: "test"}}, Serializers{}, nil, nil).Prefix(tc.resourcePrefix).AbsPath(tc.absPath) - if r.pathPrefix != tc.wantsAbsPath { - t.Errorf("test case %d failed, unexpected path: %q, expected %q", i, r.pathPrefix, tc.wantsAbsPath) - } - } -} - -func TestUintParam(t *testing.T) { - table := []struct { - name string - testVal uint64 - expectStr string - }{ - {"foo", 31415, "http://localhost?foo=31415"}, - {"bar", 42, "http://localhost?bar=42"}, - {"baz", 0, "http://localhost?baz=0"}, - } - - for _, item := range table { - u, _ := url.Parse("http://localhost") - r := NewRequest(nil, "GET", u, "", ContentConfig{GroupVersion: &schema.GroupVersion{Group: "test"}}, Serializers{}, nil, nil).AbsPath("").UintParam(item.name, item.testVal) - if e, a := item.expectStr, r.URL().String(); e != a { - t.Errorf("expected %v, got %v", e, a) - } - } -} - -func TestUnacceptableParamNames(t *testing.T) { - table := []struct { - name string - testVal string - expectSuccess bool - }{ - {"timeout", "42", false}, - } - - for _, item := range table { - c := testRESTClient(t, nil) - r := c.Get().setParam(item.name, item.testVal) - if e, a := item.expectSuccess, r.err == nil; e != a { - t.Errorf("expected %v, got %v (%v)", e, a, r.err) - } - } -} - -func TestBody(t *testing.T) { - const data = "test payload" - - obj := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}} - bodyExpected, _ := runtime.Encode(testapi.Default.Codec(), obj) - - f, err := ioutil.TempFile("", "test_body") - if err != nil { - t.Fatalf("TempFile error: %v", err) - } - if _, err := f.WriteString(data); err != nil { - t.Fatalf("TempFile.WriteString error: %v", err) - } - f.Close() - defer os.Remove(f.Name()) - - var nilObject *api.DeleteOptions - typedObject := interface{}(nilObject) - c := testRESTClient(t, nil) - tests := []struct { - input interface{} - expected string - headers map[string]string - }{ - {[]byte(data), data, nil}, - {f.Name(), data, nil}, - {strings.NewReader(data), data, nil}, - {obj, string(bodyExpected), map[string]string{"Content-Type": "application/json"}}, - {typedObject, "", nil}, - } - for i, tt := range tests { - r := c.Post().Body(tt.input) - if r.err != nil { - t.Errorf("%d: r.Body(%#v) error: %v", i, tt, r.err) - continue - } - if tt.headers != nil { - for k, v := range tt.headers { - if r.headers.Get(k) != v { - t.Errorf("%d: r.headers[%q] = %q; want %q", i, k, v, v) - } - } - } - - if r.body == nil { - if len(tt.expected) != 0 { - t.Errorf("%d: r.body = %q; want %q", i, r.body, tt.expected) - } - continue - } - buf := make([]byte, len(tt.expected)) - if _, err := r.body.Read(buf); err != nil { - t.Errorf("%d: r.body.Read error: %v", i, err) - continue - } - body := string(buf) - if body != tt.expected { - t.Errorf("%d: r.body = %q; want %q", i, body, tt.expected) - } - } -} - -func TestWatch(t *testing.T) { - var table = []struct { - t watch.EventType - obj runtime.Object - }{ - {watch.Added, &api.Pod{ObjectMeta: api.ObjectMeta{Name: "first"}}}, - {watch.Modified, &api.Pod{ObjectMeta: api.ObjectMeta{Name: "second"}}}, - {watch.Deleted, &api.Pod{ObjectMeta: api.ObjectMeta{Name: "last"}}}, - } - - testServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - flusher, ok := w.(http.Flusher) - if !ok { - panic("need flusher!") - } - - w.Header().Set("Transfer-Encoding", "chunked") - w.WriteHeader(http.StatusOK) - flusher.Flush() - - encoder := restclientwatch.NewEncoder(streaming.NewEncoder(w, testapi.Default.Codec()), testapi.Default.Codec()) - for _, item := range table { - if err := encoder.Encode(&watch.Event{Type: item.t, Object: item.obj}); err != nil { - panic(err) - } - flusher.Flush() - } - })) - defer testServer.Close() - - s := testRESTClient(t, testServer) - watching, err := s.Get().Prefix("path/to/watch/thing").Watch() - if err != nil { - t.Fatalf("Unexpected error") - } - - for _, item := range table { - got, ok := <-watching.ResultChan() - if !ok { - t.Fatalf("Unexpected early close") - } - if e, a := item.t, got.Type; e != a { - t.Errorf("Expected %v, got %v", e, a) - } - if e, a := item.obj, got.Object; !api.Semantic.DeepDerivative(e, a) { - t.Errorf("Expected %v, got %v", e, a) - } - } - - _, ok := <-watching.ResultChan() - if ok { - t.Fatal("Unexpected non-close") - } -} - -func TestStream(t *testing.T) { - expectedBody := "expected body" - - testServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - flusher, ok := w.(http.Flusher) - if !ok { - panic("need flusher!") - } - w.Header().Set("Transfer-Encoding", "chunked") - w.WriteHeader(http.StatusOK) - w.Write([]byte(expectedBody)) - flusher.Flush() - })) - defer testServer.Close() - - s := testRESTClient(t, testServer) - readCloser, err := s.Get().Prefix("path/to/stream/thing").Stream() - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - defer readCloser.Close() - buf := new(bytes.Buffer) - buf.ReadFrom(readCloser) - resultBody := buf.String() - - if expectedBody != resultBody { - t.Errorf("Expected %s, got %s", expectedBody, resultBody) - } -} - -func testRESTClient(t testing.TB, srv *httptest.Server) *RESTClient { - baseURL, _ := url.Parse("http://localhost") - if srv != nil { - var err error - baseURL, err = url.Parse(srv.URL) - if err != nil { - t.Fatalf("failed to parse test URL: %v", err) - } - } - versionedAPIPath := testapi.Default.ResourcePath("", "", "") - client, err := NewRESTClient(baseURL, versionedAPIPath, defaultContentConfig(), 0, 0, nil, nil) - if err != nil { - t.Fatalf("failed to create a client: %v", err) - } - return client -} - -func TestDoContext(t *testing.T) { - receivedCh := make(chan struct{}) - block := make(chan struct{}) - testServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { - close(receivedCh) - <-block - w.WriteHeader(http.StatusOK) - })) - defer testServer.Close() - defer close(block) - - ctx, cancel := context.WithCancel(context.Background()) - defer cancel() - - go func() { - <-receivedCh - cancel() - }() - - c := testRESTClient(t, testServer) - _, err := c.Verb("GET"). - Context(ctx). - Prefix("foo"). - DoRaw() - if err == nil { - t.Fatal("Expected context cancellation error") - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/client/restclient/transport.go b/vendor/k8s.io/kubernetes/pkg/client/restclient/transport.go deleted file mode 100644 index 48e8042e..00000000 --- a/vendor/k8s.io/kubernetes/pkg/client/restclient/transport.go +++ /dev/null @@ -1,98 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package restclient - -import ( - "crypto/tls" - "net/http" - - "k8s.io/kubernetes/pkg/client/transport" -) - -// TLSConfigFor returns a tls.Config that will provide the transport level security defined -// by the provided Config. Will return nil if no transport level security is requested. -func TLSConfigFor(config *Config) (*tls.Config, error) { - cfg, err := config.TransportConfig() - if err != nil { - return nil, err - } - return transport.TLSConfigFor(cfg) -} - -// TransportFor returns an http.RoundTripper that will provide the authentication -// or transport level security defined by the provided Config. Will return the -// default http.DefaultTransport if no special case behavior is needed. -func TransportFor(config *Config) (http.RoundTripper, error) { - cfg, err := config.TransportConfig() - if err != nil { - return nil, err - } - return transport.New(cfg) -} - -// HTTPWrappersForConfig wraps a round tripper with any relevant layered behavior from the -// config. Exposed to allow more clients that need HTTP-like behavior but then must hijack -// the underlying connection (like WebSocket or HTTP2 clients). Pure HTTP clients should use -// the higher level TransportFor or RESTClientFor methods. -func HTTPWrappersForConfig(config *Config, rt http.RoundTripper) (http.RoundTripper, error) { - cfg, err := config.TransportConfig() - if err != nil { - return nil, err - } - return transport.HTTPWrappersForConfig(cfg, rt) -} - -// TransportConfig converts a client config to an appropriate transport config. -func (c *Config) TransportConfig() (*transport.Config, error) { - wt := c.WrapTransport - if c.AuthProvider != nil { - provider, err := GetAuthProvider(c.Host, c.AuthProvider, c.AuthConfigPersister) - if err != nil { - return nil, err - } - if wt != nil { - previousWT := wt - wt = func(rt http.RoundTripper) http.RoundTripper { - return provider.WrapTransport(previousWT(rt)) - } - } else { - wt = provider.WrapTransport - } - } - return &transport.Config{ - UserAgent: c.UserAgent, - Transport: c.Transport, - WrapTransport: wt, - TLS: transport.TLSConfig{ - CAFile: c.CAFile, - CAData: c.CAData, - CertFile: c.CertFile, - CertData: c.CertData, - KeyFile: c.KeyFile, - KeyData: c.KeyData, - Insecure: c.Insecure, - }, - Username: c.Username, - Password: c.Password, - BearerToken: c.BearerToken, - Impersonate: transport.ImpersonationConfig{ - UserName: c.Impersonate.UserName, - Groups: c.Impersonate.Groups, - Extra: c.Impersonate.Extra, - }, - }, nil -} diff --git a/vendor/k8s.io/kubernetes/pkg/client/restclient/url_utils.go b/vendor/k8s.io/kubernetes/pkg/client/restclient/url_utils.go deleted file mode 100644 index dba06136..00000000 --- a/vendor/k8s.io/kubernetes/pkg/client/restclient/url_utils.go +++ /dev/null @@ -1,90 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package restclient - -import ( - "fmt" - "net/url" - "path" - - "k8s.io/apimachinery/pkg/runtime/schema" -) - -// DefaultServerURL converts a host, host:port, or URL string to the default base server API path -// to use with a Client at a given API version following the standard conventions for a -// Kubernetes API. -func DefaultServerURL(host, apiPath string, groupVersion schema.GroupVersion, defaultTLS bool) (*url.URL, string, error) { - if host == "" { - return nil, "", fmt.Errorf("host must be a URL or a host:port pair") - } - base := host - hostURL, err := url.Parse(base) - if err != nil || hostURL.Scheme == "" || hostURL.Host == "" { - scheme := "http://" - if defaultTLS { - scheme = "https://" - } - hostURL, err = url.Parse(scheme + base) - if err != nil { - return nil, "", err - } - if hostURL.Path != "" && hostURL.Path != "/" { - return nil, "", fmt.Errorf("host must be a URL or a host:port pair: %q", base) - } - } - - // hostURL.Path is optional; a non-empty Path is treated as a prefix that is to be applied to - // all URIs used to access the host. this is useful when there's a proxy in front of the - // apiserver that has relocated the apiserver endpoints, forwarding all requests from, for - // example, /a/b/c to the apiserver. in this case the Path should be /a/b/c. - // - // if running without a frontend proxy (that changes the location of the apiserver), then - // hostURL.Path should be blank. - // - // versionedAPIPath, a path relative to baseURL.Path, points to a versioned API base - versionedAPIPath := path.Join("/", apiPath) - - // Add the version to the end of the path - if len(groupVersion.Group) > 0 { - versionedAPIPath = path.Join(versionedAPIPath, groupVersion.Group, groupVersion.Version) - - } else { - versionedAPIPath = path.Join(versionedAPIPath, groupVersion.Version) - - } - - return hostURL, versionedAPIPath, nil -} - -// defaultServerUrlFor is shared between IsConfigTransportTLS and RESTClientFor. It -// requires Host and Version to be set prior to being called. -func defaultServerUrlFor(config *Config) (*url.URL, string, error) { - // TODO: move the default to secure when the apiserver supports TLS by default - // config.Insecure is taken to mean "I want HTTPS but don't bother checking the certs against a CA." - hasCA := len(config.CAFile) != 0 || len(config.CAData) != 0 - hasCert := len(config.CertFile) != 0 || len(config.CertData) != 0 - defaultTLS := hasCA || hasCert || config.Insecure - host := config.Host - if host == "" { - host = "localhost" - } - - if config.GroupVersion != nil { - return DefaultServerURL(host, config.APIPath, *config.GroupVersion, defaultTLS) - } - return DefaultServerURL(host, config.APIPath, schema.GroupVersion{}, defaultTLS) -} diff --git a/vendor/k8s.io/kubernetes/pkg/client/restclient/url_utils_test.go b/vendor/k8s.io/kubernetes/pkg/client/restclient/url_utils_test.go deleted file mode 100644 index fa99f72e..00000000 --- a/vendor/k8s.io/kubernetes/pkg/client/restclient/url_utils_test.go +++ /dev/null @@ -1,61 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package restclient - -import ( - "path" - "testing" - - "k8s.io/kubernetes/pkg/api" -) - -func TestValidatesHostParameter(t *testing.T) { - testCases := []struct { - Host string - APIPath string - - URL string - Err bool - }{ - {"127.0.0.1", "", "http://127.0.0.1/" + api.Registry.GroupOrDie(api.GroupName).GroupVersion.Version, false}, - {"127.0.0.1:8080", "", "http://127.0.0.1:8080/" + api.Registry.GroupOrDie(api.GroupName).GroupVersion.Version, false}, - {"foo.bar.com", "", "http://foo.bar.com/" + api.Registry.GroupOrDie(api.GroupName).GroupVersion.Version, false}, - {"http://host/prefix", "", "http://host/prefix/" + api.Registry.GroupOrDie(api.GroupName).GroupVersion.Version, false}, - {"http://host", "", "http://host/" + api.Registry.GroupOrDie(api.GroupName).GroupVersion.Version, false}, - {"http://host", "/", "http://host/" + api.Registry.GroupOrDie(api.GroupName).GroupVersion.Version, false}, - {"http://host", "/other", "http://host/other/" + api.Registry.GroupOrDie(api.GroupName).GroupVersion.Version, false}, - {"host/server", "", "", true}, - } - for i, testCase := range testCases { - u, versionedAPIPath, err := DefaultServerURL(testCase.Host, testCase.APIPath, api.Registry.GroupOrDie(api.GroupName).GroupVersion, false) - switch { - case err == nil && testCase.Err: - t.Errorf("expected error but was nil") - continue - case err != nil && !testCase.Err: - t.Errorf("unexpected error %v", err) - continue - case err != nil: - continue - } - u.Path = path.Join(u.Path, versionedAPIPath) - if e, a := testCase.URL, u.String(); e != a { - t.Errorf("%d: expected host %s, got %s", i, e, a) - continue - } - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/client/restclient/urlbackoff.go b/vendor/k8s.io/kubernetes/pkg/client/restclient/urlbackoff.go deleted file mode 100644 index 595f22c4..00000000 --- a/vendor/k8s.io/kubernetes/pkg/client/restclient/urlbackoff.go +++ /dev/null @@ -1,107 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package restclient - -import ( - "net/url" - "time" - - "github.com/golang/glog" - "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/kubernetes/pkg/util/flowcontrol" -) - -// Set of resp. Codes that we backoff for. -// In general these should be errors that indicate a server is overloaded. -// These shouldn't be configured by any user, we set them based on conventions -// described in -var serverIsOverloadedSet = sets.NewInt(429) -var maxResponseCode = 499 - -type BackoffManager interface { - UpdateBackoff(actualUrl *url.URL, err error, responseCode int) - CalculateBackoff(actualUrl *url.URL) time.Duration - Sleep(d time.Duration) -} - -// URLBackoff struct implements the semantics on top of Backoff which -// we need for URL specific exponential backoff. -type URLBackoff struct { - // Uses backoff as underlying implementation. - Backoff *flowcontrol.Backoff -} - -// NoBackoff is a stub implementation, can be used for mocking or else as a default. -type NoBackoff struct { -} - -func (n *NoBackoff) UpdateBackoff(actualUrl *url.URL, err error, responseCode int) { - // do nothing. -} - -func (n *NoBackoff) CalculateBackoff(actualUrl *url.URL) time.Duration { - return 0 * time.Second -} - -func (n *NoBackoff) Sleep(d time.Duration) { - time.Sleep(d) -} - -// Disable makes the backoff trivial, i.e., sets it to zero. This might be used -// by tests which want to run 1000s of mock requests without slowing down. -func (b *URLBackoff) Disable() { - glog.V(4).Infof("Disabling backoff strategy") - b.Backoff = flowcontrol.NewBackOff(0*time.Second, 0*time.Second) -} - -// baseUrlKey returns the key which urls will be mapped to. -// For example, 127.0.0.1:8080/api/v2/abcde -> 127.0.0.1:8080. -func (b *URLBackoff) baseUrlKey(rawurl *url.URL) string { - // Simple implementation for now, just the host. - // We may backoff specific paths (i.e. "pods") differentially - // in the future. - host, err := url.Parse(rawurl.String()) - if err != nil { - glog.V(4).Infof("Error extracting url: %v", rawurl) - panic("bad url!") - } - return host.Host -} - -// UpdateBackoff updates backoff metadata -func (b *URLBackoff) UpdateBackoff(actualUrl *url.URL, err error, responseCode int) { - // range for retry counts that we store is [0,13] - if responseCode > maxResponseCode || serverIsOverloadedSet.Has(responseCode) { - b.Backoff.Next(b.baseUrlKey(actualUrl), b.Backoff.Clock.Now()) - return - } else if responseCode >= 300 || err != nil { - glog.V(4).Infof("Client is returning errors: code %v, error %v", responseCode, err) - } - - //If we got this far, there is no backoff required for this URL anymore. - b.Backoff.Reset(b.baseUrlKey(actualUrl)) -} - -// CalculateBackoff takes a url and back's off exponentially, -// based on its knowledge of existing failures. -func (b *URLBackoff) CalculateBackoff(actualUrl *url.URL) time.Duration { - return b.Backoff.Get(b.baseUrlKey(actualUrl)) -} - -func (b *URLBackoff) Sleep(d time.Duration) { - b.Backoff.Clock.Sleep(d) -} diff --git a/vendor/k8s.io/kubernetes/pkg/client/restclient/urlbackoff_test.go b/vendor/k8s.io/kubernetes/pkg/client/restclient/urlbackoff_test.go deleted file mode 100644 index 269f3536..00000000 --- a/vendor/k8s.io/kubernetes/pkg/client/restclient/urlbackoff_test.go +++ /dev/null @@ -1,79 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package restclient - -import ( - "net/url" - "testing" - "time" - - "k8s.io/kubernetes/pkg/util/flowcontrol" -) - -func parse(raw string) *url.URL { - theUrl, _ := url.Parse(raw) - return theUrl -} - -func TestURLBackoffFunctionalityCollisions(t *testing.T) { - myBackoff := &URLBackoff{ - Backoff: flowcontrol.NewBackOff(1*time.Second, 60*time.Second), - } - - // Add some noise and make sure backoff for a clean URL is zero. - myBackoff.UpdateBackoff(parse("http://100.200.300.400:8080"), nil, 500) - - myBackoff.UpdateBackoff(parse("http://1.2.3.4:8080"), nil, 500) - - if myBackoff.CalculateBackoff(parse("http://1.2.3.4:100")) > 0 { - t.Errorf("URLs are colliding in the backoff map!") - } -} - -// TestURLBackoffFunctionality generally tests the URLBackoff wrapper. We avoid duplicating tests from backoff and request. -func TestURLBackoffFunctionality(t *testing.T) { - myBackoff := &URLBackoff{ - Backoff: flowcontrol.NewBackOff(1*time.Second, 60*time.Second), - } - - // Now test that backoff increases, then recovers. - // 200 and 300 should both result in clearing the backoff. - // all others like 429 should result in increased backoff. - seconds := []int{0, - 1, 2, 4, 8, 0, - 1, 2} - returnCodes := []int{ - 429, 500, 501, 502, 300, - 500, 501, 502, - } - - if len(seconds) != len(returnCodes) { - t.Fatalf("responseCode to backoff arrays should be the same length... sanity check failed.") - } - - for i, sec := range seconds { - backoffSec := myBackoff.CalculateBackoff(parse("http://1.2.3.4:100")) - if backoffSec < time.Duration(sec)*time.Second || backoffSec > time.Duration(sec+5)*time.Second { - t.Errorf("Backoff out of range %v: %v %v", i, sec, backoffSec) - } - myBackoff.UpdateBackoff(parse("http://1.2.3.4:100/responseCodeForFuncTest"), nil, returnCodes[i]) - } - - if myBackoff.CalculateBackoff(parse("http://1.2.3.4:100")) == 0 { - t.Errorf("The final return code %v should have resulted in a backoff ! ", returnCodes[7]) - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/client/restclient/versions.go b/vendor/k8s.io/kubernetes/pkg/client/restclient/versions.go deleted file mode 100644 index 55b2ca08..00000000 --- a/vendor/k8s.io/kubernetes/pkg/client/restclient/versions.go +++ /dev/null @@ -1,88 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package restclient - -import ( - "encoding/json" - "fmt" - "net/http" - "path" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -const ( - legacyAPIPath = "/api" - defaultAPIPath = "/apis" -) - -// TODO: Is this obsoleted by the discovery client? - -// ServerAPIVersions returns the GroupVersions supported by the API server. -// It creates a RESTClient based on the passed in config, but it doesn't rely -// on the Version and Codec of the config, because it uses AbsPath and -// takes the raw response. -func ServerAPIVersions(c *Config) (groupVersions []string, err error) { - transport, err := TransportFor(c) - if err != nil { - return nil, err - } - client := http.Client{Transport: transport} - - configCopy := *c - configCopy.GroupVersion = nil - configCopy.APIPath = "" - baseURL, _, err := defaultServerUrlFor(&configCopy) - if err != nil { - return nil, err - } - // Get the groupVersions exposed at /api - originalPath := baseURL.Path - baseURL.Path = path.Join(originalPath, legacyAPIPath) - resp, err := client.Get(baseURL.String()) - if err != nil { - return nil, err - } - var v metav1.APIVersions - defer resp.Body.Close() - err = json.NewDecoder(resp.Body).Decode(&v) - if err != nil { - return nil, fmt.Errorf("unexpected error: %v", err) - } - - groupVersions = append(groupVersions, v.Versions...) - // Get the groupVersions exposed at /apis - baseURL.Path = path.Join(originalPath, defaultAPIPath) - resp2, err := client.Get(baseURL.String()) - if err != nil { - return nil, err - } - var apiGroupList metav1.APIGroupList - defer resp2.Body.Close() - err = json.NewDecoder(resp2.Body).Decode(&apiGroupList) - if err != nil { - return nil, fmt.Errorf("unexpected error: %v", err) - } - - for _, g := range apiGroupList.Groups { - for _, gv := range g.Versions { - groupVersions = append(groupVersions, gv.GroupVersion) - } - } - - return groupVersions, nil -} diff --git a/vendor/k8s.io/kubernetes/pkg/client/restclient/watch/BUILD b/vendor/k8s.io/kubernetes/pkg/client/restclient/watch/BUILD deleted file mode 100644 index d28d6181..00000000 --- a/vendor/k8s.io/kubernetes/pkg/client/restclient/watch/BUILD +++ /dev/null @@ -1,56 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = [ - "decoder.go", - "encoder.go", - ], - tags = ["automanaged"], - deps = [ - "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", - "//vendor:k8s.io/apimachinery/pkg/runtime", - "//vendor:k8s.io/apimachinery/pkg/runtime/serializer/streaming", - "//vendor:k8s.io/apimachinery/pkg/watch", - ], -) - -go_test( - name = "go_default_xtest", - srcs = [ - "decoder_test.go", - "encoder_test.go", - ], - tags = ["automanaged"], - deps = [ - "//pkg/api:go_default_library", - "//pkg/api/testapi:go_default_library", - "//pkg/client/restclient/watch:go_default_library", - "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", - "//vendor:k8s.io/apimachinery/pkg/runtime", - "//vendor:k8s.io/apimachinery/pkg/runtime/serializer/streaming", - "//vendor:k8s.io/apimachinery/pkg/util/wait", - "//vendor:k8s.io/apimachinery/pkg/watch", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/vendor/k8s.io/kubernetes/pkg/client/restclient/watch/decoder.go b/vendor/k8s.io/kubernetes/pkg/client/restclient/watch/decoder.go deleted file mode 100644 index 73bb63ad..00000000 --- a/vendor/k8s.io/kubernetes/pkg/client/restclient/watch/decoder.go +++ /dev/null @@ -1,72 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package versioned - -import ( - "fmt" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/serializer/streaming" - "k8s.io/apimachinery/pkg/watch" -) - -// Decoder implements the watch.Decoder interface for io.ReadClosers that -// have contents which consist of a series of watchEvent objects encoded -// with the given streaming decoder. The internal objects will be then -// decoded by the embedded decoder. -type Decoder struct { - decoder streaming.Decoder - embeddedDecoder runtime.Decoder -} - -// NewDecoder creates an Decoder for the given writer and codec. -func NewDecoder(decoder streaming.Decoder, embeddedDecoder runtime.Decoder) *Decoder { - return &Decoder{ - decoder: decoder, - embeddedDecoder: embeddedDecoder, - } -} - -// Decode blocks until it can return the next object in the reader. Returns an error -// if the reader is closed or an object can't be decoded. -func (d *Decoder) Decode() (watch.EventType, runtime.Object, error) { - var got metav1.WatchEvent - res, _, err := d.decoder.Decode(nil, &got) - if err != nil { - return "", nil, err - } - if res != &got { - return "", nil, fmt.Errorf("unable to decode to metav1.Event") - } - switch got.Type { - case string(watch.Added), string(watch.Modified), string(watch.Deleted), string(watch.Error): - default: - return "", nil, fmt.Errorf("got invalid watch event type: %v", got.Type) - } - - obj, err := runtime.Decode(d.embeddedDecoder, got.Object.Raw) - if err != nil { - return "", nil, fmt.Errorf("unable to decode watch event: %v", err) - } - return watch.EventType(got.Type), obj, nil -} - -// Close closes the underlying r. -func (d *Decoder) Close() { - d.decoder.Close() -} diff --git a/vendor/k8s.io/kubernetes/pkg/client/restclient/watch/decoder_test.go b/vendor/k8s.io/kubernetes/pkg/client/restclient/watch/decoder_test.go deleted file mode 100644 index f3af5bcd..00000000 --- a/vendor/k8s.io/kubernetes/pkg/client/restclient/watch/decoder_test.go +++ /dev/null @@ -1,114 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package versioned_test - -import ( - "encoding/json" - "io" - "testing" - "time" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/serializer/streaming" - "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/apimachinery/pkg/watch" - "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/api/testapi" - restclientwatch "k8s.io/kubernetes/pkg/client/restclient/watch" -) - -func TestDecoder(t *testing.T) { - table := []watch.EventType{watch.Added, watch.Deleted, watch.Modified, watch.Error} - - for _, eventType := range table { - out, in := io.Pipe() - codec := testapi.Default.Codec() - decoder := restclientwatch.NewDecoder(streaming.NewDecoder(out, codec), codec) - - expect := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}} - encoder := json.NewEncoder(in) - go func() { - data, err := runtime.Encode(testapi.Default.Codec(), expect) - if err != nil { - t.Fatalf("Unexpected error %v", err) - } - event := metav1.WatchEvent{ - Type: string(eventType), - Object: runtime.RawExtension{Raw: json.RawMessage(data)}, - } - if err := encoder.Encode(&event); err != nil { - t.Errorf("Unexpected error %v", err) - } - in.Close() - }() - - done := make(chan struct{}) - go func() { - action, got, err := decoder.Decode() - if err != nil { - t.Fatalf("Unexpected error %v", err) - } - if e, a := eventType, action; e != a { - t.Errorf("Expected %v, got %v", e, a) - } - if e, a := expect, got; !api.Semantic.DeepDerivative(e, a) { - t.Errorf("Expected %v, got %v", e, a) - } - t.Logf("Exited read") - close(done) - }() - <-done - - done = make(chan struct{}) - go func() { - _, _, err := decoder.Decode() - if err == nil { - t.Errorf("Unexpected nil error") - } - close(done) - }() - <-done - - decoder.Close() - } -} - -func TestDecoder_SourceClose(t *testing.T) { - out, in := io.Pipe() - codec := testapi.Default.Codec() - decoder := restclientwatch.NewDecoder(streaming.NewDecoder(out, codec), codec) - - done := make(chan struct{}) - - go func() { - _, _, err := decoder.Decode() - if err == nil { - t.Errorf("Unexpected nil error") - } - close(done) - }() - - in.Close() - - select { - case <-done: - break - case <-time.After(wait.ForeverTestTimeout): - t.Error("Timeout") - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/client/restclient/watch/encoder.go b/vendor/k8s.io/kubernetes/pkg/client/restclient/watch/encoder.go deleted file mode 100644 index e55aa12d..00000000 --- a/vendor/k8s.io/kubernetes/pkg/client/restclient/watch/encoder.go +++ /dev/null @@ -1,56 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package versioned - -import ( - "encoding/json" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/serializer/streaming" - "k8s.io/apimachinery/pkg/watch" -) - -// Encoder serializes watch.Events into io.Writer. The internal objects -// are encoded using embedded encoder, and the outer Event is serialized -// using encoder. -// TODO: this type is only used by tests -type Encoder struct { - encoder streaming.Encoder - embeddedEncoder runtime.Encoder -} - -func NewEncoder(encoder streaming.Encoder, embeddedEncoder runtime.Encoder) *Encoder { - return &Encoder{ - encoder: encoder, - embeddedEncoder: embeddedEncoder, - } -} - -// Encode writes an event to the writer. Returns an error -// if the writer is closed or an object can't be encoded. -func (e *Encoder) Encode(event *watch.Event) error { - data, err := runtime.Encode(e.embeddedEncoder, event.Object) - if err != nil { - return err - } - // FIXME: get rid of json.RawMessage. - return e.encoder.Encode(&metav1.WatchEvent{ - Type: string(event.Type), - Object: runtime.RawExtension{Raw: json.RawMessage(data)}, - }) -} diff --git a/vendor/k8s.io/kubernetes/pkg/client/restclient/watch/encoder_test.go b/vendor/k8s.io/kubernetes/pkg/client/restclient/watch/encoder_test.go deleted file mode 100644 index 5e204d70..00000000 --- a/vendor/k8s.io/kubernetes/pkg/client/restclient/watch/encoder_test.go +++ /dev/null @@ -1,78 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package versioned_test - -import ( - "bytes" - "io/ioutil" - "testing" - - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/serializer/streaming" - "k8s.io/apimachinery/pkg/watch" - "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/api/testapi" - restclientwatch "k8s.io/kubernetes/pkg/client/restclient/watch" -) - -func TestEncodeDecodeRoundTrip(t *testing.T) { - testCases := []struct { - Type watch.EventType - Object runtime.Object - Codec runtime.Codec - }{ - { - watch.Added, - &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}}, - testapi.Default.Codec(), - }, - { - watch.Modified, - &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}}, - testapi.Default.Codec(), - }, - { - watch.Deleted, - &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}}, - testapi.Default.Codec(), - }, - } - for i, testCase := range testCases { - buf := &bytes.Buffer{} - - codec := testCase.Codec - encoder := restclientwatch.NewEncoder(streaming.NewEncoder(buf, codec), codec) - if err := encoder.Encode(&watch.Event{Type: testCase.Type, Object: testCase.Object}); err != nil { - t.Errorf("%d: unexpected error: %v", i, err) - continue - } - - rc := ioutil.NopCloser(buf) - decoder := restclientwatch.NewDecoder(streaming.NewDecoder(rc, codec), codec) - event, obj, err := decoder.Decode() - if err != nil { - t.Errorf("%d: unexpected error: %v", i, err) - continue - } - if !api.Semantic.DeepDerivative(testCase.Object, obj) { - t.Errorf("%d: expected %#v, got %#v", i, testCase.Object, obj) - } - if event != testCase.Type { - t.Errorf("%d: unexpected type: %#v", i, event) - } - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/client/testing/cache/BUILD b/vendor/k8s.io/kubernetes/pkg/client/testing/cache/BUILD index 1d94e261..934b93f5 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/testing/cache/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/testing/cache/BUILD @@ -16,6 +16,7 @@ go_library( "//pkg/api:go_default_library", "//pkg/api/v1:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/meta", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", @@ -30,6 +31,7 @@ go_test( deps = [ "//pkg/api:go_default_library", "//pkg/api/v1:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/watch", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/testing/cache/fake_controller_source.go b/vendor/k8s.io/kubernetes/pkg/client/testing/cache/fake_controller_source.go index f2a7a6e4..e75071e3 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/testing/cache/fake_controller_source.go +++ b/vendor/k8s.io/kubernetes/pkg/client/testing/cache/fake_controller_source.go @@ -23,6 +23,7 @@ import ( "sync" "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/watch" @@ -114,7 +115,7 @@ func (f *FakeControllerSource) DeleteDropWatch(lastValue runtime.Object) { f.Change(watch.Event{Type: watch.Deleted, Object: lastValue}, 0) } -func (f *FakeControllerSource) key(accessor meta.Object) nnu { +func (f *FakeControllerSource) key(accessor metav1.Object) nnu { return nnu{accessor.GetNamespace(), accessor.GetName(), accessor.GetUID()} } @@ -162,7 +163,7 @@ func (f *FakeControllerSource) getListItemsLocked() ([]runtime.Object, error) { } // List returns a list object, with its resource version set. -func (f *FakeControllerSource) List(options v1.ListOptions) (runtime.Object, error) { +func (f *FakeControllerSource) List(options metav1.ListOptions) (runtime.Object, error) { f.lock.RLock() defer f.lock.RUnlock() list, err := f.getListItemsLocked() @@ -173,7 +174,7 @@ func (f *FakeControllerSource) List(options v1.ListOptions) (runtime.Object, err if err := meta.SetList(listObj, list); err != nil { return nil, err } - objMeta, err := api.ListMetaFor(listObj) + objMeta, err := metav1.ListMetaFor(listObj) if err != nil { return nil, err } @@ -183,7 +184,7 @@ func (f *FakeControllerSource) List(options v1.ListOptions) (runtime.Object, err } // List returns a list object, with its resource version set. -func (f *FakePVControllerSource) List(options v1.ListOptions) (runtime.Object, error) { +func (f *FakePVControllerSource) List(options metav1.ListOptions) (runtime.Object, error) { f.lock.RLock() defer f.lock.RUnlock() list, err := f.FakeControllerSource.getListItemsLocked() @@ -194,7 +195,7 @@ func (f *FakePVControllerSource) List(options v1.ListOptions) (runtime.Object, e if err := meta.SetList(listObj, list); err != nil { return nil, err } - objMeta, err := api.ListMetaFor(listObj) + objMeta, err := metav1.ListMetaFor(listObj) if err != nil { return nil, err } @@ -204,7 +205,7 @@ func (f *FakePVControllerSource) List(options v1.ListOptions) (runtime.Object, e } // List returns a list object, with its resource version set. -func (f *FakePVCControllerSource) List(options v1.ListOptions) (runtime.Object, error) { +func (f *FakePVCControllerSource) List(options metav1.ListOptions) (runtime.Object, error) { f.lock.RLock() defer f.lock.RUnlock() list, err := f.FakeControllerSource.getListItemsLocked() @@ -215,7 +216,7 @@ func (f *FakePVCControllerSource) List(options v1.ListOptions) (runtime.Object, if err := meta.SetList(listObj, list); err != nil { return nil, err } - objMeta, err := api.ListMetaFor(listObj) + objMeta, err := metav1.ListMetaFor(listObj) if err != nil { return nil, err } @@ -226,7 +227,7 @@ func (f *FakePVCControllerSource) List(options v1.ListOptions) (runtime.Object, // Watch returns a watch, which will be pre-populated with all changes // after resourceVersion. -func (f *FakeControllerSource) Watch(options v1.ListOptions) (watch.Interface, error) { +func (f *FakeControllerSource) Watch(options metav1.ListOptions) (watch.Interface, error) { f.lock.RLock() defer f.lock.RUnlock() rc, err := strconv.Atoi(options.ResourceVersion) diff --git a/vendor/k8s.io/kubernetes/pkg/client/testing/cache/fake_controller_source_test.go b/vendor/k8s.io/kubernetes/pkg/client/testing/cache/fake_controller_source_test.go index 4fe40a21..cbd07b89 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/testing/cache/fake_controller_source_test.go +++ b/vendor/k8s.io/kubernetes/pkg/client/testing/cache/fake_controller_source_test.go @@ -20,6 +20,7 @@ import ( "sync" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/watch" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" @@ -51,7 +52,7 @@ func consume(t *testing.T, w watch.Interface, rvs []string, done *sync.WaitGroup func TestRCNumber(t *testing.T) { pod := func(name string) *v1.Pod { return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, } @@ -65,13 +66,13 @@ func TestRCNumber(t *testing.T) { source.Modify(pod("foo")) source.Modify(pod("foo")) - w, err := source.Watch(v1.ListOptions{ResourceVersion: "1"}) + w, err := source.Watch(metav1.ListOptions{ResourceVersion: "1"}) if err != nil { t.Fatalf("Unexpected error: %v", err) } go consume(t, w, []string{"2", "3"}, wg) - list, err := source.List(v1.ListOptions{}) + list, err := source.List(metav1.ListOptions{}) if err != nil { t.Fatalf("Unexpected error: %v", err) } @@ -79,13 +80,13 @@ func TestRCNumber(t *testing.T) { t.Errorf("wanted %v, got %v", e, a) } - w2, err := source.Watch(v1.ListOptions{ResourceVersion: "2"}) + w2, err := source.Watch(metav1.ListOptions{ResourceVersion: "2"}) if err != nil { t.Fatalf("Unexpected error: %v", err) } go consume(t, w2, []string{"3"}, wg) - w3, err := source.Watch(v1.ListOptions{ResourceVersion: "3"}) + w3, err := source.Watch(metav1.ListOptions{ResourceVersion: "3"}) if err != nil { t.Fatalf("Unexpected error: %v", err) } diff --git a/vendor/k8s.io/kubernetes/pkg/client/testing/core/BUILD b/vendor/k8s.io/kubernetes/pkg/client/testing/core/BUILD index f8d378db..eec5a62d 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/testing/core/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/testing/core/BUILD @@ -18,17 +18,17 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/api:go_default_library", - "//pkg/api/v1:go_default_library", - "//pkg/client/restclient:go_default_library", - "//pkg/fields:go_default_library", "//pkg/version:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/api/meta", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", + "//vendor:k8s.io/apimachinery/pkg/version", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/testing/core/actions.go b/vendor/k8s.io/kubernetes/pkg/client/testing/core/actions.go index 813023fe..a16c75ec 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/testing/core/actions.go +++ b/vendor/k8s.io/kubernetes/pkg/client/testing/core/actions.go @@ -21,12 +21,11 @@ import ( "path" "strings" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/api/v1" - "k8s.io/kubernetes/pkg/fields" ) func NewRootGetAction(resource schema.GroupVersionResource, name string) GetActionImpl { @@ -224,22 +223,18 @@ func NewRootWatchAction(resource schema.GroupVersionResource, opts interface{}) func ExtractFromListOptions(opts interface{}) (labelSelector labels.Selector, fieldSelector fields.Selector, resourceVersion string) { var err error switch t := opts.(type) { - case api.ListOptions: - labelSelector = t.LabelSelector - fieldSelector = t.FieldSelector - resourceVersion = t.ResourceVersion - case v1.ListOptions: + case metav1.ListOptions: labelSelector, err = labels.Parse(t.LabelSelector) if err != nil { - panic(err) + panic(fmt.Errorf("invalid selector %q: %v", t.LabelSelector, err)) } fieldSelector, err = fields.ParseSelector(t.FieldSelector) if err != nil { - panic(err) + panic(fmt.Errorf("invalid selector %q: %v", t.FieldSelector, err)) } resourceVersion = t.ResourceVersion default: - panic(fmt.Errorf("expect a ListOptions")) + panic(fmt.Errorf("expect a ListOptions %T", opts)) } if labelSelector == nil { labelSelector = labels.Everything() diff --git a/vendor/k8s.io/kubernetes/pkg/client/testing/core/fake.go b/vendor/k8s.io/kubernetes/pkg/client/testing/core/fake.go index 37d1efd3..75adc857 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/testing/core/fake.go +++ b/vendor/k8s.io/kubernetes/pkg/client/testing/core/fake.go @@ -23,9 +23,10 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/version" "k8s.io/apimachinery/pkg/watch" - "k8s.io/kubernetes/pkg/client/restclient" - "k8s.io/kubernetes/pkg/version" + restclient "k8s.io/client-go/rest" + kubeversion "k8s.io/kubernetes/pkg/version" ) // Fake implements client.Interface. Meant to be embedded into a struct to get @@ -253,6 +254,6 @@ func (c *FakeDiscovery) ServerVersion() (*version.Info, error) { action.Resource = schema.GroupVersionResource{Resource: "version"} c.Invokes(action, nil) - versionInfo := version.Get() + versionInfo := kubeversion.Get() return &versionInfo, nil } diff --git a/vendor/k8s.io/kubernetes/pkg/client/testing/core/fake_test.go b/vendor/k8s.io/kubernetes/pkg/client/testing/core/fake_test.go index 2d24a298..07e5cb54 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/testing/core/fake_test.go +++ b/vendor/k8s.io/kubernetes/pkg/client/testing/core/fake_test.go @@ -35,7 +35,7 @@ func TestFakeClientSetFiltering(t *testing.T) { testSA("nsB", "sa-3"), ) - saList1, err := tc.Core().ServiceAccounts("nsA").List(api.ListOptions{}) + saList1, err := tc.Core().ServiceAccounts("nsA").List(metav1.ListOptions{}) if err != nil { t.Fatalf("ServiceAccounts.List: %s", err) } @@ -48,7 +48,7 @@ func TestFakeClientSetFiltering(t *testing.T) { } } - saList2, err := tc.Core().ServiceAccounts("nsB").List(api.ListOptions{}) + saList2, err := tc.Core().ServiceAccounts("nsB").List(metav1.ListOptions{}) if err != nil { t.Fatalf("ServiceAccounts.List: %s", err) } @@ -77,7 +77,7 @@ func TestFakeClientSetFiltering(t *testing.T) { t.Fatalf("Pods.Get: expected nsB/pod-1 not to match, but it matched %s/%s", wrongPod.Namespace, wrongPod.Name) } - allPods, err := tc.Core().Pods(api.NamespaceAll).List(api.ListOptions{}) + allPods, err := tc.Core().Pods(metav1.NamespaceAll).List(metav1.ListOptions{}) if err != nil { t.Fatalf("Pods.List: %s", err) } @@ -85,7 +85,7 @@ func TestFakeClientSetFiltering(t *testing.T) { t.Fatalf("Expected %d pods to match, got %d", expected, actual) } - allSAs, err := tc.Core().ServiceAccounts(api.NamespaceAll).List(api.ListOptions{}) + allSAs, err := tc.Core().ServiceAccounts(metav1.NamespaceAll).List(metav1.ListOptions{}) if err != nil { t.Fatalf("ServiceAccounts.List: %s", err) } @@ -105,7 +105,7 @@ func TestFakeClientsetInheritsNamespace(t *testing.T) { t.Fatalf("Namespaces.Create: %s", err) } - allNS, err := tc.Core().Namespaces().List(api.ListOptions{}) + allNS, err := tc.Core().Namespaces().List(metav1.ListOptions{}) if err != nil { t.Fatalf("Namespaces.List: %s", err) } @@ -155,7 +155,7 @@ func TestFakeClientsetInheritsNamespace(t *testing.T) { func testSA(ns, name string) *api.ServiceAccount { return &api.ServiceAccount{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: ns, Name: name, }, @@ -164,7 +164,7 @@ func testSA(ns, name string) *api.ServiceAccount { func testPod(ns, name string) *api.Pod { return &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: ns, Name: name, }, @@ -173,7 +173,7 @@ func testPod(ns, name string) *api.Pod { func testNamespace(ns string) *api.Namespace { return &api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: ns, }, } diff --git a/vendor/k8s.io/kubernetes/pkg/client/testing/core/fixture.go b/vendor/k8s.io/kubernetes/pkg/client/testing/core/fixture.go index a7585e8f..3058bdcc 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/testing/core/fixture.go +++ b/vendor/k8s.io/kubernetes/pkg/client/testing/core/fixture.go @@ -26,8 +26,8 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/watch" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/client/restclient" ) // ObjectTracker keeps track of objects. It is intended to be used to diff --git a/vendor/k8s.io/kubernetes/pkg/client/transport/BUILD b/vendor/k8s.io/kubernetes/pkg/client/transport/BUILD deleted file mode 100644 index d2f4eaa2..00000000 --- a/vendor/k8s.io/kubernetes/pkg/client/transport/BUILD +++ /dev/null @@ -1,48 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = [ - "cache.go", - "config.go", - "round_trippers.go", - "transport.go", - ], - tags = ["automanaged"], - deps = [ - "//vendor:github.com/golang/glog", - "//vendor:k8s.io/apimachinery/pkg/util/net", - ], -) - -go_test( - name = "go_default_test", - srcs = [ - "cache_test.go", - "round_trippers_test.go", - "transport_test.go", - ], - library = ":go_default_library", - tags = ["automanaged"], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/vendor/k8s.io/kubernetes/pkg/client/transport/OWNERS b/vendor/k8s.io/kubernetes/pkg/client/transport/OWNERS deleted file mode 100755 index bf0ba5b9..00000000 --- a/vendor/k8s.io/kubernetes/pkg/client/transport/OWNERS +++ /dev/null @@ -1,7 +0,0 @@ -reviewers: -- smarterclayton -- wojtek-t -- deads2k -- liggitt -- krousey -- caesarxuchao diff --git a/vendor/k8s.io/kubernetes/pkg/client/transport/cache.go b/vendor/k8s.io/kubernetes/pkg/client/transport/cache.go deleted file mode 100644 index 8d76def3..00000000 --- a/vendor/k8s.io/kubernetes/pkg/client/transport/cache.go +++ /dev/null @@ -1,88 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package transport - -import ( - "fmt" - "net" - "net/http" - "sync" - "time" - - utilnet "k8s.io/apimachinery/pkg/util/net" -) - -// TlsTransportCache caches TLS http.RoundTrippers different configurations. The -// same RoundTripper will be returned for configs with identical TLS options If -// the config has no custom TLS options, http.DefaultTransport is returned. -type tlsTransportCache struct { - mu sync.Mutex - transports map[string]*http.Transport -} - -const idleConnsPerHost = 25 - -var tlsCache = &tlsTransportCache{transports: make(map[string]*http.Transport)} - -func (c *tlsTransportCache) get(config *Config) (http.RoundTripper, error) { - key, err := tlsConfigKey(config) - if err != nil { - return nil, err - } - - // Ensure we only create a single transport for the given TLS options - c.mu.Lock() - defer c.mu.Unlock() - - // See if we already have a custom transport for this config - if t, ok := c.transports[key]; ok { - return t, nil - } - - // Get the TLS options for this client config - tlsConfig, err := TLSConfigFor(config) - if err != nil { - return nil, err - } - // The options didn't require a custom TLS config - if tlsConfig == nil { - return http.DefaultTransport, nil - } - - // Cache a single transport for these options - c.transports[key] = utilnet.SetTransportDefaults(&http.Transport{ - Proxy: http.ProxyFromEnvironment, - TLSHandshakeTimeout: 10 * time.Second, - TLSClientConfig: tlsConfig, - MaxIdleConnsPerHost: idleConnsPerHost, - Dial: (&net.Dialer{ - Timeout: 30 * time.Second, - KeepAlive: 30 * time.Second, - }).Dial, - }) - return c.transports[key], nil -} - -// tlsConfigKey returns a unique key for tls.Config objects returned from TLSConfigFor -func tlsConfigKey(c *Config) (string, error) { - // Make sure ca/key/cert content is loaded - if err := loadTLSFiles(c); err != nil { - return "", err - } - // Only include the things that actually affect the tls.Config - return fmt.Sprintf("%v/%x/%x/%x", c.TLS.Insecure, c.TLS.CAData, c.TLS.CertData, c.TLS.KeyData), nil -} diff --git a/vendor/k8s.io/kubernetes/pkg/client/transport/cache_test.go b/vendor/k8s.io/kubernetes/pkg/client/transport/cache_test.go deleted file mode 100644 index eb9624d7..00000000 --- a/vendor/k8s.io/kubernetes/pkg/client/transport/cache_test.go +++ /dev/null @@ -1,114 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package transport - -import ( - "net/http" - "testing" -) - -func TestTLSConfigKey(t *testing.T) { - // Make sure config fields that don't affect the tls config don't affect the cache key - identicalConfigurations := map[string]*Config{ - "empty": {}, - "basic": {Username: "bob", Password: "password"}, - "bearer": {BearerToken: "token"}, - "user agent": {UserAgent: "useragent"}, - "transport": {Transport: http.DefaultTransport}, - "wrap transport": {WrapTransport: func(http.RoundTripper) http.RoundTripper { return nil }}, - } - for nameA, valueA := range identicalConfigurations { - for nameB, valueB := range identicalConfigurations { - keyA, err := tlsConfigKey(valueA) - if err != nil { - t.Errorf("Unexpected error for %q: %v", nameA, err) - continue - } - keyB, err := tlsConfigKey(valueB) - if err != nil { - t.Errorf("Unexpected error for %q: %v", nameB, err) - continue - } - if keyA != keyB { - t.Errorf("Expected identical cache keys for %q and %q, got:\n\t%s\n\t%s", nameA, nameB, keyA, keyB) - continue - } - } - } - - // Make sure config fields that affect the tls config affect the cache key - uniqueConfigurations := map[string]*Config{ - "no tls": {}, - "insecure": {TLS: TLSConfig{Insecure: true}}, - "cadata 1": {TLS: TLSConfig{CAData: []byte{1}}}, - "cadata 2": {TLS: TLSConfig{CAData: []byte{2}}}, - "cert 1, key 1": { - TLS: TLSConfig{ - CertData: []byte{1}, - KeyData: []byte{1}, - }, - }, - "cert 1, key 2": { - TLS: TLSConfig{ - CertData: []byte{1}, - KeyData: []byte{2}, - }, - }, - "cert 2, key 1": { - TLS: TLSConfig{ - CertData: []byte{2}, - KeyData: []byte{1}, - }, - }, - "cert 2, key 2": { - TLS: TLSConfig{ - CertData: []byte{2}, - KeyData: []byte{2}, - }, - }, - "cadata 1, cert 1, key 1": { - TLS: TLSConfig{ - CAData: []byte{1}, - CertData: []byte{1}, - KeyData: []byte{1}, - }, - }, - } - for nameA, valueA := range uniqueConfigurations { - for nameB, valueB := range uniqueConfigurations { - // Don't compare to ourselves - if nameA == nameB { - continue - } - - keyA, err := tlsConfigKey(valueA) - if err != nil { - t.Errorf("Unexpected error for %q: %v", nameA, err) - continue - } - keyB, err := tlsConfigKey(valueB) - if err != nil { - t.Errorf("Unexpected error for %q: %v", nameB, err) - continue - } - if keyA == keyB { - t.Errorf("Expected unique cache keys for %q and %q, got:\n\t%s\n\t%s", nameA, nameB, keyA, keyB) - continue - } - } - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/client/transport/config.go b/vendor/k8s.io/kubernetes/pkg/client/transport/config.go deleted file mode 100644 index eaad99fb..00000000 --- a/vendor/k8s.io/kubernetes/pkg/client/transport/config.go +++ /dev/null @@ -1,94 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package transport - -import "net/http" - -// Config holds various options for establishing a transport. -type Config struct { - // UserAgent is an optional field that specifies the caller of this - // request. - UserAgent string - - // The base TLS configuration for this transport. - TLS TLSConfig - - // Username and password for basic authentication - Username string - Password string - - // Bearer token for authentication - BearerToken string - - // Impersonate is the config that this Config will impersonate using - Impersonate ImpersonationConfig - - // Transport may be used for custom HTTP behavior. This attribute may - // not be specified with the TLS client certificate options. Use - // WrapTransport for most client level operations. - Transport http.RoundTripper - - // WrapTransport will be invoked for custom HTTP behavior after the - // underlying transport is initialized (either the transport created - // from TLSClientConfig, Transport, or http.DefaultTransport). The - // config may layer other RoundTrippers on top of the returned - // RoundTripper. - WrapTransport func(rt http.RoundTripper) http.RoundTripper -} - -// ImpersonationConfig has all the available impersonation options -type ImpersonationConfig struct { - // UserName matches user.Info.GetName() - UserName string - // Groups matches user.Info.GetGroups() - Groups []string - // Extra matches user.Info.GetExtra() - Extra map[string][]string -} - -// HasCA returns whether the configuration has a certificate authority or not. -func (c *Config) HasCA() bool { - return len(c.TLS.CAData) > 0 || len(c.TLS.CAFile) > 0 -} - -// HasBasicAuth returns whether the configuration has basic authentication or not. -func (c *Config) HasBasicAuth() bool { - return len(c.Username) != 0 -} - -// HasTokenAuth returns whether the configuration has token authentication or not. -func (c *Config) HasTokenAuth() bool { - return len(c.BearerToken) != 0 -} - -// HasCertAuth returns whether the configuration has certificate authentication or not. -func (c *Config) HasCertAuth() bool { - return len(c.TLS.CertData) != 0 || len(c.TLS.CertFile) != 0 -} - -// TLSConfig holds the information needed to set up a TLS transport. -type TLSConfig struct { - CAFile string // Path of the PEM-encoded server trusted root certificates. - CertFile string // Path of the PEM-encoded client certificate. - KeyFile string // Path of the PEM-encoded client key. - - Insecure bool // Server should be accessed without verifying the certificate. For testing only. - - CAData []byte // Bytes of the PEM-encoded server trusted root certificates. Supercedes CAFile. - CertData []byte // Bytes of the PEM-encoded client certificate. Supercedes CertFile. - KeyData []byte // Bytes of the PEM-encoded client key. Supercedes KeyFile. -} diff --git a/vendor/k8s.io/kubernetes/pkg/client/transport/round_trippers.go b/vendor/k8s.io/kubernetes/pkg/client/transport/round_trippers.go deleted file mode 100644 index a6f396fb..00000000 --- a/vendor/k8s.io/kubernetes/pkg/client/transport/round_trippers.go +++ /dev/null @@ -1,436 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package transport - -import ( - "fmt" - "net/http" - "strings" - "time" - - "github.com/golang/glog" -) - -// HTTPWrappersForConfig wraps a round tripper with any relevant layered -// behavior from the config. Exposed to allow more clients that need HTTP-like -// behavior but then must hijack the underlying connection (like WebSocket or -// HTTP2 clients). Pure HTTP clients should use the RoundTripper returned from -// New. -func HTTPWrappersForConfig(config *Config, rt http.RoundTripper) (http.RoundTripper, error) { - if config.WrapTransport != nil { - rt = config.WrapTransport(rt) - } - - rt = DebugWrappers(rt) - - // Set authentication wrappers - switch { - case config.HasBasicAuth() && config.HasTokenAuth(): - return nil, fmt.Errorf("username/password or bearer token may be set, but not both") - case config.HasTokenAuth(): - rt = NewBearerAuthRoundTripper(config.BearerToken, rt) - case config.HasBasicAuth(): - rt = NewBasicAuthRoundTripper(config.Username, config.Password, rt) - } - if len(config.UserAgent) > 0 { - rt = NewUserAgentRoundTripper(config.UserAgent, rt) - } - if len(config.Impersonate.UserName) > 0 || - len(config.Impersonate.Groups) > 0 || - len(config.Impersonate.Extra) > 0 { - rt = NewImpersonatingRoundTripper(config.Impersonate, rt) - } - return rt, nil -} - -// DebugWrappers wraps a round tripper and logs based on the current log level. -func DebugWrappers(rt http.RoundTripper) http.RoundTripper { - switch { - case bool(glog.V(9)): - rt = newDebuggingRoundTripper(rt, debugCurlCommand, debugURLTiming, debugResponseHeaders) - case bool(glog.V(8)): - rt = newDebuggingRoundTripper(rt, debugJustURL, debugRequestHeaders, debugResponseStatus, debugResponseHeaders) - case bool(glog.V(7)): - rt = newDebuggingRoundTripper(rt, debugJustURL, debugRequestHeaders, debugResponseStatus) - case bool(glog.V(6)): - rt = newDebuggingRoundTripper(rt, debugURLTiming) - } - - return rt -} - -type requestCanceler interface { - CancelRequest(*http.Request) -} - -type authProxyRoundTripper struct { - username string - groups []string - extra map[string][]string - - rt http.RoundTripper -} - -// NewAuthProxyRoundTripper provides a roundtripper which will add auth proxy fields to requests for -// authentication terminating proxy cases -// assuming you pull the user from the context: -// username is the user.Info.GetName() of the user -// groups is the user.Info.GetGroups() of the user -// extra is the user.Info.GetExtra() of the user -// extra can contain any additional information that the authenticator -// thought was interesting, for example authorization scopes. -// In order to faithfully round-trip through an impersonation flow, these keys -// MUST be lowercase. -func NewAuthProxyRoundTripper(username string, groups []string, extra map[string][]string, rt http.RoundTripper) http.RoundTripper { - return &authProxyRoundTripper{ - username: username, - groups: groups, - extra: extra, - rt: rt, - } -} - -func (rt *authProxyRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) { - req = cloneRequest(req) - SetAuthProxyHeaders(req, rt.username, rt.groups, rt.extra) - - return rt.rt.RoundTrip(req) -} - -// SetAuthProxyHeaders stomps the auth proxy header fields. It mutates its argument. -func SetAuthProxyHeaders(req *http.Request, username string, groups []string, extra map[string][]string) { - req.Header.Del("X-Remote-User") - req.Header.Del("X-Remote-Group") - for key := range req.Header { - if strings.HasPrefix(strings.ToLower(key), strings.ToLower("X-Remote-Extra-")) { - req.Header.Del(key) - } - } - - req.Header.Set("X-Remote-User", username) - for _, group := range groups { - req.Header.Add("X-Remote-Group", group) - } - for key, values := range extra { - for _, value := range values { - req.Header.Add("X-Remote-Extra-"+key, value) - } - } -} - -func (rt *authProxyRoundTripper) CancelRequest(req *http.Request) { - if canceler, ok := rt.rt.(requestCanceler); ok { - canceler.CancelRequest(req) - } else { - glog.Errorf("CancelRequest not implemented") - } -} - -func (rt *authProxyRoundTripper) WrappedRoundTripper() http.RoundTripper { return rt.rt } - -type userAgentRoundTripper struct { - agent string - rt http.RoundTripper -} - -func NewUserAgentRoundTripper(agent string, rt http.RoundTripper) http.RoundTripper { - return &userAgentRoundTripper{agent, rt} -} - -func (rt *userAgentRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) { - if len(req.Header.Get("User-Agent")) != 0 { - return rt.rt.RoundTrip(req) - } - req = cloneRequest(req) - req.Header.Set("User-Agent", rt.agent) - return rt.rt.RoundTrip(req) -} - -func (rt *userAgentRoundTripper) CancelRequest(req *http.Request) { - if canceler, ok := rt.rt.(requestCanceler); ok { - canceler.CancelRequest(req) - } else { - glog.Errorf("CancelRequest not implemented") - } -} - -func (rt *userAgentRoundTripper) WrappedRoundTripper() http.RoundTripper { return rt.rt } - -type basicAuthRoundTripper struct { - username string - password string - rt http.RoundTripper -} - -// NewBasicAuthRoundTripper will apply a BASIC auth authorization header to a -// request unless it has already been set. -func NewBasicAuthRoundTripper(username, password string, rt http.RoundTripper) http.RoundTripper { - return &basicAuthRoundTripper{username, password, rt} -} - -func (rt *basicAuthRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) { - if len(req.Header.Get("Authorization")) != 0 { - return rt.rt.RoundTrip(req) - } - req = cloneRequest(req) - req.SetBasicAuth(rt.username, rt.password) - return rt.rt.RoundTrip(req) -} - -func (rt *basicAuthRoundTripper) CancelRequest(req *http.Request) { - if canceler, ok := rt.rt.(requestCanceler); ok { - canceler.CancelRequest(req) - } else { - glog.Errorf("CancelRequest not implemented") - } -} - -func (rt *basicAuthRoundTripper) WrappedRoundTripper() http.RoundTripper { return rt.rt } - -// These correspond to the headers used in pkg/apis/authentication. We don't want the package dependency, -// but you must not change the values. -const ( - // ImpersonateUserHeader is used to impersonate a particular user during an API server request - ImpersonateUserHeader = "Impersonate-User" - - // ImpersonateGroupHeader is used to impersonate a particular group during an API server request. - // It can be repeated multiplied times for multiple groups. - ImpersonateGroupHeader = "Impersonate-Group" - - // ImpersonateUserExtraHeaderPrefix is a prefix for a header used to impersonate an entry in the - // extra map[string][]string for user.Info. The key for the `extra` map is suffix. - // The same key can be repeated multiple times to have multiple elements in the slice under a single key. - // For instance: - // Impersonate-Extra-Foo: one - // Impersonate-Extra-Foo: two - // results in extra["Foo"] = []string{"one", "two"} - ImpersonateUserExtraHeaderPrefix = "Impersonate-Extra-" -) - -type impersonatingRoundTripper struct { - impersonate ImpersonationConfig - delegate http.RoundTripper -} - -// NewImpersonatingRoundTripper will add an Act-As header to a request unless it has already been set. -func NewImpersonatingRoundTripper(impersonate ImpersonationConfig, delegate http.RoundTripper) http.RoundTripper { - return &impersonatingRoundTripper{impersonate, delegate} -} - -func (rt *impersonatingRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) { - // use the user header as marker for the rest. - if len(req.Header.Get(ImpersonateUserHeader)) != 0 { - return rt.delegate.RoundTrip(req) - } - req = cloneRequest(req) - req.Header.Set(ImpersonateUserHeader, rt.impersonate.UserName) - - for _, group := range rt.impersonate.Groups { - req.Header.Add(ImpersonateGroupHeader, group) - } - for k, vv := range rt.impersonate.Extra { - for _, v := range vv { - req.Header.Add(ImpersonateUserExtraHeaderPrefix+k, v) - } - } - - return rt.delegate.RoundTrip(req) -} - -func (rt *impersonatingRoundTripper) CancelRequest(req *http.Request) { - if canceler, ok := rt.delegate.(requestCanceler); ok { - canceler.CancelRequest(req) - } else { - glog.Errorf("CancelRequest not implemented") - } -} - -func (rt *impersonatingRoundTripper) WrappedRoundTripper() http.RoundTripper { return rt.delegate } - -type bearerAuthRoundTripper struct { - bearer string - rt http.RoundTripper -} - -// NewBearerAuthRoundTripper adds the provided bearer token to a request -// unless the authorization header has already been set. -func NewBearerAuthRoundTripper(bearer string, rt http.RoundTripper) http.RoundTripper { - return &bearerAuthRoundTripper{bearer, rt} -} - -func (rt *bearerAuthRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) { - if len(req.Header.Get("Authorization")) != 0 { - return rt.rt.RoundTrip(req) - } - - req = cloneRequest(req) - req.Header.Set("Authorization", fmt.Sprintf("Bearer %s", rt.bearer)) - return rt.rt.RoundTrip(req) -} - -func (rt *bearerAuthRoundTripper) CancelRequest(req *http.Request) { - if canceler, ok := rt.rt.(requestCanceler); ok { - canceler.CancelRequest(req) - } else { - glog.Errorf("CancelRequest not implemented") - } -} - -func (rt *bearerAuthRoundTripper) WrappedRoundTripper() http.RoundTripper { return rt.rt } - -// cloneRequest returns a clone of the provided *http.Request. -// The clone is a shallow copy of the struct and its Header map. -func cloneRequest(r *http.Request) *http.Request { - // shallow copy of the struct - r2 := new(http.Request) - *r2 = *r - // deep copy of the Header - r2.Header = make(http.Header) - for k, s := range r.Header { - r2.Header[k] = s - } - return r2 -} - -// requestInfo keeps track of information about a request/response combination -type requestInfo struct { - RequestHeaders http.Header - RequestVerb string - RequestURL string - - ResponseStatus string - ResponseHeaders http.Header - ResponseErr error - - Duration time.Duration -} - -// newRequestInfo creates a new RequestInfo based on an http request -func newRequestInfo(req *http.Request) *requestInfo { - return &requestInfo{ - RequestURL: req.URL.String(), - RequestVerb: req.Method, - RequestHeaders: req.Header, - } -} - -// complete adds information about the response to the requestInfo -func (r *requestInfo) complete(response *http.Response, err error) { - if err != nil { - r.ResponseErr = err - return - } - r.ResponseStatus = response.Status - r.ResponseHeaders = response.Header -} - -// toCurl returns a string that can be run as a command in a terminal (minus the body) -func (r *requestInfo) toCurl() string { - headers := "" - for key, values := range r.RequestHeaders { - for _, value := range values { - headers += fmt.Sprintf(` -H %q`, fmt.Sprintf("%s: %s", key, value)) - } - } - - return fmt.Sprintf("curl -k -v -X%s %s %s", r.RequestVerb, headers, r.RequestURL) -} - -// debuggingRoundTripper will display information about the requests passing -// through it based on what is configured -type debuggingRoundTripper struct { - delegatedRoundTripper http.RoundTripper - - levels map[debugLevel]bool -} - -type debugLevel int - -const ( - debugJustURL debugLevel = iota - debugURLTiming - debugCurlCommand - debugRequestHeaders - debugResponseStatus - debugResponseHeaders -) - -func newDebuggingRoundTripper(rt http.RoundTripper, levels ...debugLevel) *debuggingRoundTripper { - drt := &debuggingRoundTripper{ - delegatedRoundTripper: rt, - levels: make(map[debugLevel]bool, len(levels)), - } - for _, v := range levels { - drt.levels[v] = true - } - return drt -} - -func (rt *debuggingRoundTripper) CancelRequest(req *http.Request) { - if canceler, ok := rt.delegatedRoundTripper.(requestCanceler); ok { - canceler.CancelRequest(req) - } else { - glog.Errorf("CancelRequest not implemented") - } -} - -func (rt *debuggingRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) { - reqInfo := newRequestInfo(req) - - if rt.levels[debugJustURL] { - glog.Infof("%s %s", reqInfo.RequestVerb, reqInfo.RequestURL) - } - if rt.levels[debugCurlCommand] { - glog.Infof("%s", reqInfo.toCurl()) - - } - if rt.levels[debugRequestHeaders] { - glog.Infof("Request Headers:") - for key, values := range reqInfo.RequestHeaders { - for _, value := range values { - glog.Infof(" %s: %s", key, value) - } - } - } - - startTime := time.Now() - response, err := rt.delegatedRoundTripper.RoundTrip(req) - reqInfo.Duration = time.Since(startTime) - - reqInfo.complete(response, err) - - if rt.levels[debugURLTiming] { - glog.Infof("%s %s %s in %d milliseconds", reqInfo.RequestVerb, reqInfo.RequestURL, reqInfo.ResponseStatus, reqInfo.Duration.Nanoseconds()/int64(time.Millisecond)) - } - if rt.levels[debugResponseStatus] { - glog.Infof("Response Status: %s in %d milliseconds", reqInfo.ResponseStatus, reqInfo.Duration.Nanoseconds()/int64(time.Millisecond)) - } - if rt.levels[debugResponseHeaders] { - glog.Infof("Response Headers:") - for key, values := range reqInfo.ResponseHeaders { - for _, value := range values { - glog.Infof(" %s: %s", key, value) - } - } - } - - return response, err -} - -func (rt *debuggingRoundTripper) WrappedRoundTripper() http.RoundTripper { - return rt.delegatedRoundTripper -} diff --git a/vendor/k8s.io/kubernetes/pkg/client/transport/round_trippers_test.go b/vendor/k8s.io/kubernetes/pkg/client/transport/round_trippers_test.go deleted file mode 100644 index d5ffc6bd..00000000 --- a/vendor/k8s.io/kubernetes/pkg/client/transport/round_trippers_test.go +++ /dev/null @@ -1,218 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package transport - -import ( - "net/http" - "reflect" - "strings" - "testing" -) - -type testRoundTripper struct { - Request *http.Request - Response *http.Response - Err error -} - -func (rt *testRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) { - rt.Request = req - return rt.Response, rt.Err -} - -func TestBearerAuthRoundTripper(t *testing.T) { - rt := &testRoundTripper{} - req := &http.Request{} - NewBearerAuthRoundTripper("test", rt).RoundTrip(req) - if rt.Request == nil { - t.Fatalf("unexpected nil request: %v", rt) - } - if rt.Request == req { - t.Fatalf("round tripper should have copied request object: %#v", rt.Request) - } - if rt.Request.Header.Get("Authorization") != "Bearer test" { - t.Errorf("unexpected authorization header: %#v", rt.Request) - } -} - -func TestBasicAuthRoundTripper(t *testing.T) { - for n, tc := range map[string]struct { - user string - pass string - }{ - "basic": {user: "user", pass: "pass"}, - "no pass": {user: "user"}, - } { - rt := &testRoundTripper{} - req := &http.Request{} - NewBasicAuthRoundTripper(tc.user, tc.pass, rt).RoundTrip(req) - if rt.Request == nil { - t.Fatalf("%s: unexpected nil request: %v", n, rt) - } - if rt.Request == req { - t.Fatalf("%s: round tripper should have copied request object: %#v", n, rt.Request) - } - if user, pass, found := rt.Request.BasicAuth(); !found || user != tc.user || pass != tc.pass { - t.Errorf("%s: unexpected authorization header: %#v", n, rt.Request) - } - } -} - -func TestUserAgentRoundTripper(t *testing.T) { - rt := &testRoundTripper{} - req := &http.Request{ - Header: make(http.Header), - } - req.Header.Set("User-Agent", "other") - NewUserAgentRoundTripper("test", rt).RoundTrip(req) - if rt.Request == nil { - t.Fatalf("unexpected nil request: %v", rt) - } - if rt.Request != req { - t.Fatalf("round tripper should not have copied request object: %#v", rt.Request) - } - if rt.Request.Header.Get("User-Agent") != "other" { - t.Errorf("unexpected user agent header: %#v", rt.Request) - } - - req = &http.Request{} - NewUserAgentRoundTripper("test", rt).RoundTrip(req) - if rt.Request == nil { - t.Fatalf("unexpected nil request: %v", rt) - } - if rt.Request == req { - t.Fatalf("round tripper should have copied request object: %#v", rt.Request) - } - if rt.Request.Header.Get("User-Agent") != "test" { - t.Errorf("unexpected user agent header: %#v", rt.Request) - } -} - -func TestImpersonationRoundTripper(t *testing.T) { - tcs := []struct { - name string - impersonationConfig ImpersonationConfig - expected map[string][]string - }{ - { - name: "all", - impersonationConfig: ImpersonationConfig{ - UserName: "user", - Groups: []string{"one", "two"}, - Extra: map[string][]string{ - "first": {"A", "a"}, - "second": {"B", "b"}, - }, - }, - expected: map[string][]string{ - ImpersonateUserHeader: {"user"}, - ImpersonateGroupHeader: {"one", "two"}, - ImpersonateUserExtraHeaderPrefix + "First": {"A", "a"}, - ImpersonateUserExtraHeaderPrefix + "Second": {"B", "b"}, - }, - }, - } - - for _, tc := range tcs { - rt := &testRoundTripper{} - req := &http.Request{ - Header: make(http.Header), - } - NewImpersonatingRoundTripper(tc.impersonationConfig, rt).RoundTrip(req) - - for k, v := range rt.Request.Header { - expected, ok := tc.expected[k] - if !ok { - t.Errorf("%v missing %v=%v", tc.name, k, v) - continue - } - if !reflect.DeepEqual(expected, v) { - t.Errorf("%v expected %v: %v, got %v", tc.name, k, expected, v) - } - } - for k, v := range tc.expected { - expected, ok := rt.Request.Header[k] - if !ok { - t.Errorf("%v missing %v=%v", tc.name, k, v) - continue - } - if !reflect.DeepEqual(expected, v) { - t.Errorf("%v expected %v: %v, got %v", tc.name, k, expected, v) - } - } - } -} - -func TestAuthProxyRoundTripper(t *testing.T) { - for n, tc := range map[string]struct { - username string - groups []string - extra map[string][]string - }{ - "allfields": { - username: "user", - groups: []string{"groupA", "groupB"}, - extra: map[string][]string{ - "one": {"alpha", "bravo"}, - "two": {"charlie", "delta"}, - }, - }, - } { - rt := &testRoundTripper{} - req := &http.Request{} - NewAuthProxyRoundTripper(tc.username, tc.groups, tc.extra, rt).RoundTrip(req) - if rt.Request == nil { - t.Errorf("%s: unexpected nil request: %v", n, rt) - continue - } - if rt.Request == req { - t.Errorf("%s: round tripper should have copied request object: %#v", n, rt.Request) - continue - } - - actualUsernames, ok := rt.Request.Header["X-Remote-User"] - if !ok { - t.Errorf("%s missing value", n) - continue - } - if e, a := []string{tc.username}, actualUsernames; !reflect.DeepEqual(e, a) { - t.Errorf("%s expected %v, got %v", n, e, a) - continue - } - actualGroups, ok := rt.Request.Header["X-Remote-Group"] - if !ok { - t.Errorf("%s missing value", n) - continue - } - if e, a := tc.groups, actualGroups; !reflect.DeepEqual(e, a) { - t.Errorf("%s expected %v, got %v", n, e, a) - continue - } - - actualExtra := map[string][]string{} - for key, values := range rt.Request.Header { - if strings.HasPrefix(strings.ToLower(key), strings.ToLower("X-Remote-Extra-")) { - extraKey := strings.ToLower(key[len("X-Remote-Extra-"):]) - actualExtra[extraKey] = append(actualExtra[key], values...) - } - } - if e, a := tc.extra, actualExtra; !reflect.DeepEqual(e, a) { - t.Errorf("%s expected %v, got %v", n, e, a) - continue - } - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/client/transport/transport.go b/vendor/k8s.io/kubernetes/pkg/client/transport/transport.go deleted file mode 100644 index 9c5b9ef3..00000000 --- a/vendor/k8s.io/kubernetes/pkg/client/transport/transport.go +++ /dev/null @@ -1,140 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package transport - -import ( - "crypto/tls" - "crypto/x509" - "fmt" - "io/ioutil" - "net/http" -) - -// New returns an http.RoundTripper that will provide the authentication -// or transport level security defined by the provided Config. -func New(config *Config) (http.RoundTripper, error) { - // Set transport level security - if config.Transport != nil && (config.HasCA() || config.HasCertAuth() || config.TLS.Insecure) { - return nil, fmt.Errorf("using a custom transport with TLS certificate options or the insecure flag is not allowed") - } - - var ( - rt http.RoundTripper - err error - ) - - if config.Transport != nil { - rt = config.Transport - } else { - rt, err = tlsCache.get(config) - if err != nil { - return nil, err - } - } - - return HTTPWrappersForConfig(config, rt) -} - -// TLSConfigFor returns a tls.Config that will provide the transport level security defined -// by the provided Config. Will return nil if no transport level security is requested. -func TLSConfigFor(c *Config) (*tls.Config, error) { - if !(c.HasCA() || c.HasCertAuth() || c.TLS.Insecure) { - return nil, nil - } - if c.HasCA() && c.TLS.Insecure { - return nil, fmt.Errorf("specifying a root certificates file with the insecure flag is not allowed") - } - if err := loadTLSFiles(c); err != nil { - return nil, err - } - - tlsConfig := &tls.Config{ - // Can't use SSLv3 because of POODLE and BEAST - // Can't use TLSv1.0 because of POODLE and BEAST using CBC cipher - // Can't use TLSv1.1 because of RC4 cipher usage - MinVersion: tls.VersionTLS12, - InsecureSkipVerify: c.TLS.Insecure, - } - - if c.HasCA() { - tlsConfig.RootCAs = rootCertPool(c.TLS.CAData) - } - - if c.HasCertAuth() { - cert, err := tls.X509KeyPair(c.TLS.CertData, c.TLS.KeyData) - if err != nil { - return nil, err - } - tlsConfig.Certificates = []tls.Certificate{cert} - } - - return tlsConfig, nil -} - -// loadTLSFiles copies the data from the CertFile, KeyFile, and CAFile fields into the CertData, -// KeyData, and CAFile fields, or returns an error. If no error is returned, all three fields are -// either populated or were empty to start. -func loadTLSFiles(c *Config) error { - var err error - c.TLS.CAData, err = dataFromSliceOrFile(c.TLS.CAData, c.TLS.CAFile) - if err != nil { - return err - } - - c.TLS.CertData, err = dataFromSliceOrFile(c.TLS.CertData, c.TLS.CertFile) - if err != nil { - return err - } - - c.TLS.KeyData, err = dataFromSliceOrFile(c.TLS.KeyData, c.TLS.KeyFile) - if err != nil { - return err - } - return nil -} - -// dataFromSliceOrFile returns data from the slice (if non-empty), or from the file, -// or an error if an error occurred reading the file -func dataFromSliceOrFile(data []byte, file string) ([]byte, error) { - if len(data) > 0 { - return data, nil - } - if len(file) > 0 { - fileData, err := ioutil.ReadFile(file) - if err != nil { - return []byte{}, err - } - return fileData, nil - } - return nil, nil -} - -// rootCertPool returns nil if caData is empty. When passed along, this will mean "use system CAs". -// When caData is not empty, it will be the ONLY information used in the CertPool. -func rootCertPool(caData []byte) *x509.CertPool { - // What we really want is a copy of x509.systemRootsPool, but that isn't exposed. It's difficult to build (see the go - // code for a look at the platform specific insanity), so we'll use the fact that RootCAs == nil gives us the system values - // It doesn't allow trusting either/or, but hopefully that won't be an issue - if len(caData) == 0 { - return nil - } - - // if we have caData, use it - certPool := x509.NewCertPool() - certPool.AppendCertsFromPEM(caData) - return certPool -} diff --git a/vendor/k8s.io/kubernetes/pkg/client/transport/transport_test.go b/vendor/k8s.io/kubernetes/pkg/client/transport/transport_test.go deleted file mode 100644 index 4d2d78f8..00000000 --- a/vendor/k8s.io/kubernetes/pkg/client/transport/transport_test.go +++ /dev/null @@ -1,204 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package transport - -import ( - "net/http" - "testing" -) - -const ( - rootCACert = `-----BEGIN CERTIFICATE----- -MIIC4DCCAcqgAwIBAgIBATALBgkqhkiG9w0BAQswIzEhMB8GA1UEAwwYMTAuMTMu -MTI5LjEwNkAxNDIxMzU5MDU4MB4XDTE1MDExNTIxNTczN1oXDTE2MDExNTIxNTcz -OFowIzEhMB8GA1UEAwwYMTAuMTMuMTI5LjEwNkAxNDIxMzU5MDU4MIIBIjANBgkq -hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAunDRXGwsiYWGFDlWH6kjGun+PshDGeZX -xtx9lUnL8pIRWH3wX6f13PO9sktaOWW0T0mlo6k2bMlSLlSZgG9H6og0W6gLS3vq -s4VavZ6DbXIwemZG2vbRwsvR+t4G6Nbwelm6F8RFnA1Fwt428pavmNQ/wgYzo+T1 -1eS+HiN4ACnSoDSx3QRWcgBkB1g6VReofVjx63i0J+w8Q/41L9GUuLqquFxu6ZnH -60vTB55lHgFiDLjA1FkEz2dGvGh/wtnFlRvjaPC54JH2K1mPYAUXTreoeJtLJKX0 -ycoiyB24+zGCniUmgIsmQWRPaOPircexCp1BOeze82BT1LCZNTVaxQIDAQABoyMw -ITAOBgNVHQ8BAf8EBAMCAKQwDwYDVR0TAQH/BAUwAwEB/zALBgkqhkiG9w0BAQsD -ggEBADMxsUuAFlsYDpF4fRCzXXwrhbtj4oQwcHpbu+rnOPHCZupiafzZpDu+rw4x -YGPnCb594bRTQn4pAu3Ac18NbLD5pV3uioAkv8oPkgr8aUhXqiv7KdDiaWm6sbAL -EHiXVBBAFvQws10HMqMoKtO8f1XDNAUkWduakR/U6yMgvOPwS7xl0eUTqyRB6zGb -K55q2dejiFWaFqB/y78txzvz6UlOZKE44g2JAVoJVM6kGaxh33q8/FmrL4kuN3ut -W+MmJCVDvd4eEqPwbp7146ZWTqpIJ8lvA6wuChtqV8lhAPka2hD/LMqY8iXNmfXD -uml0obOEy+ON91k+SWTJ3ggmF/U= ------END CERTIFICATE-----` - - certData = `-----BEGIN CERTIFICATE----- -MIIC6jCCAdSgAwIBAgIBCzALBgkqhkiG9w0BAQswIzEhMB8GA1UEAwwYMTAuMTMu -MTI5LjEwNkAxNDIxMzU5MDU4MB4XDTE1MDExNTIyMDEzMVoXDTE2MDExNTIyMDEz -MlowGzEZMBcGA1UEAxMQb3BlbnNoaWZ0LWNsaWVudDCCASIwDQYJKoZIhvcNAQEB -BQADggEPADCCAQoCggEBAKtdhz0+uCLXw5cSYns9rU/XifFSpb/x24WDdrm72S/v -b9BPYsAStiP148buylr1SOuNi8sTAZmlVDDIpIVwMLff+o2rKYDicn9fjbrTxTOj -lI4pHJBH+JU3AJ0tbajupioh70jwFS0oYpwtneg2zcnE2Z4l6mhrj2okrc5Q1/X2 -I2HChtIU4JYTisObtin10QKJX01CLfYXJLa8upWzKZ4/GOcHG+eAV3jXWoXidtjb -1Usw70amoTZ6mIVCkiu1QwCoa8+ycojGfZhvqMsAp1536ZcCul+Na+AbCv4zKS7F -kQQaImVrXdUiFansIoofGlw/JNuoKK6ssVpS5Ic3pgcCAwEAAaM1MDMwDgYDVR0P -AQH/BAQDAgCgMBMGA1UdJQQMMAoGCCsGAQUFBwMCMAwGA1UdEwEB/wQCMAAwCwYJ -KoZIhvcNAQELA4IBAQCKLREH7bXtXtZ+8vI6cjD7W3QikiArGqbl36bAhhWsJLp/ -p/ndKz39iFNaiZ3GlwIURWOOKx3y3GA0x9m8FR+Llthf0EQ8sUjnwaknWs0Y6DQ3 -jjPFZOpV3KPCFrdMJ3++E3MgwFC/Ih/N2ebFX9EcV9Vcc6oVWMdwT0fsrhu683rq -6GSR/3iVX1G/pmOiuaR0fNUaCyCfYrnI4zHBDgSfnlm3vIvN2lrsR/DQBakNL8DJ -HBgKxMGeUPoneBv+c8DMXIL0EhaFXRlBv9QW45/GiAIOuyFJ0i6hCtGZpJjq4OpQ -BRjCI+izPzFTjsxD4aORE+WOkyWFCGPWKfNejfw0 ------END CERTIFICATE-----` - - keyData = `-----BEGIN RSA PRIVATE KEY----- -MIIEowIBAAKCAQEAq12HPT64ItfDlxJiez2tT9eJ8VKlv/HbhYN2ubvZL+9v0E9i -wBK2I/Xjxu7KWvVI642LyxMBmaVUMMikhXAwt9/6jaspgOJyf1+NutPFM6OUjikc -kEf4lTcAnS1tqO6mKiHvSPAVLShinC2d6DbNycTZniXqaGuPaiStzlDX9fYjYcKG -0hTglhOKw5u2KfXRAolfTUIt9hcktry6lbMpnj8Y5wcb54BXeNdaheJ22NvVSzDv -RqahNnqYhUKSK7VDAKhrz7JyiMZ9mG+oywCnXnfplwK6X41r4BsK/jMpLsWRBBoi -ZWtd1SIVqewiih8aXD8k26gorqyxWlLkhzemBwIDAQABAoIBAD2XYRs3JrGHQUpU -FkdbVKZkvrSY0vAZOqBTLuH0zUv4UATb8487anGkWBjRDLQCgxH+jucPTrztekQK -aW94clo0S3aNtV4YhbSYIHWs1a0It0UdK6ID7CmdWkAj6s0T8W8lQT7C46mWYVLm -5mFnCTHi6aB42jZrqmEpC7sivWwuU0xqj3Ml8kkxQCGmyc9JjmCB4OrFFC8NNt6M -ObvQkUI6Z3nO4phTbpxkE1/9dT0MmPIF7GhHVzJMS+EyyRYUDllZ0wvVSOM3qZT0 -JMUaBerkNwm9foKJ1+dv2nMKZZbJajv7suUDCfU44mVeaEO+4kmTKSGCGjjTBGkr -7L1ySDECgYEA5ElIMhpdBzIivCuBIH8LlUeuzd93pqssO1G2Xg0jHtfM4tz7fyeI -cr90dc8gpli24dkSxzLeg3Tn3wIj/Bu64m2TpZPZEIlukYvgdgArmRIPQVxerYey -OkrfTNkxU1HXsYjLCdGcGXs5lmb+K/kuTcFxaMOs7jZi7La+jEONwf8CgYEAwCs/ -rUOOA0klDsWWisbivOiNPII79c9McZCNBqncCBfMUoiGe8uWDEO4TFHN60vFuVk9 -8PkwpCfvaBUX+ajvbafIfHxsnfk1M04WLGCeqQ/ym5Q4sQoQOcC1b1y9qc/xEWfg -nIUuia0ukYRpl7qQa3tNg+BNFyjypW8zukUAC/kCgYB1/Kojuxx5q5/oQVPrx73k -2bevD+B3c+DYh9MJqSCNwFtUpYIWpggPxoQan4LwdsmO0PKzocb/ilyNFj4i/vII -NToqSc/WjDFpaDIKyuu9oWfhECye45NqLWhb/6VOuu4QA/Nsj7luMhIBehnEAHW+ -GkzTKM8oD1PxpEG3nPKXYQKBgQC6AuMPRt3XBl1NkCrpSBy/uObFlFaP2Enpf39S -3OZ0Gv0XQrnSaL1kP8TMcz68rMrGX8DaWYsgytstR4W+jyy7WvZwsUu+GjTJ5aMG -77uEcEBpIi9CBzivfn7hPccE8ZgqPf+n4i6q66yxBJflW5xhvafJqDtW2LcPNbW/ -bvzdmQKBgExALRUXpq+5dbmkdXBHtvXdRDZ6rVmrnjy4nI5bPw+1GqQqk6uAR6B/ -F6NmLCQOO4PDG/cuatNHIr2FrwTmGdEL6ObLUGWn9Oer9gJhHVqqsY5I4sEPo4XX -stR0Yiw0buV6DL/moUO0HIM9Bjh96HJp+LxiIS6UCdIhMPp5HoQa ------END RSA PRIVATE KEY-----` -) - -func TestNew(t *testing.T) { - testCases := map[string]struct { - Config *Config - Err bool - TLS bool - Default bool - }{ - "default transport": { - Default: true, - Config: &Config{}, - }, - - "ca transport": { - TLS: true, - Config: &Config{ - TLS: TLSConfig{ - CAData: []byte(rootCACert), - }, - }, - }, - "bad ca file transport": { - Err: true, - Config: &Config{ - TLS: TLSConfig{ - CAFile: "invalid file", - }, - }, - }, - "ca data overriding bad ca file transport": { - TLS: true, - Config: &Config{ - TLS: TLSConfig{ - CAData: []byte(rootCACert), - CAFile: "invalid file", - }, - }, - }, - - "cert transport": { - TLS: true, - Config: &Config{ - TLS: TLSConfig{ - CAData: []byte(rootCACert), - CertData: []byte(certData), - KeyData: []byte(keyData), - }, - }, - }, - "bad cert data transport": { - Err: true, - Config: &Config{ - TLS: TLSConfig{ - CAData: []byte(rootCACert), - CertData: []byte(certData), - KeyData: []byte("bad key data"), - }, - }, - }, - "bad file cert transport": { - Err: true, - Config: &Config{ - TLS: TLSConfig{ - CAData: []byte(rootCACert), - CertData: []byte(certData), - KeyFile: "invalid file", - }, - }, - }, - "key data overriding bad file cert transport": { - TLS: true, - Config: &Config{ - TLS: TLSConfig{ - CAData: []byte(rootCACert), - CertData: []byte(certData), - KeyData: []byte(keyData), - KeyFile: "invalid file", - }, - }, - }, - } - for k, testCase := range testCases { - transport, err := New(testCase.Config) - switch { - case testCase.Err && err == nil: - t.Errorf("%s: unexpected non-error", k) - continue - case !testCase.Err && err != nil: - t.Errorf("%s: unexpected error: %v", k, err) - continue - } - - switch { - case testCase.Default && transport != http.DefaultTransport: - t.Errorf("%s: expected the default transport, got %#v", k, transport) - continue - case !testCase.Default && transport == http.DefaultTransport: - t.Errorf("%s: expected non-default transport, got %#v", k, transport) - continue - } - - // We only know how to check TLSConfig on http.Transports - if transport, ok := transport.(*http.Transport); ok { - switch { - case testCase.TLS && transport.TLSClientConfig == nil: - t.Errorf("%s: expected TLSClientConfig, got %#v", k, transport) - continue - case !testCase.TLS && transport.TLSClientConfig != nil: - t.Errorf("%s: expected no TLSClientConfig, got %#v", k, transport) - continue - } - } - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/client/typed/discovery/BUILD b/vendor/k8s.io/kubernetes/pkg/client/typed/discovery/BUILD index 4824499a..b0e57fec 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/typed/discovery/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/typed/discovery/BUILD @@ -20,9 +20,7 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/api/v1:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/version:go_default_library", - "//plugin/pkg/client/auth:go_default_library", "//vendor:github.com/emicklei/go-restful/swagger", "//vendor:github.com/golang/glog", "//vendor:k8s.io/apimachinery/pkg/api/errors", @@ -32,46 +30,35 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/runtime/serializer", "//vendor:k8s.io/apimachinery/pkg/util/sets", - ], -) - -go_test( - name = "go_default_test", - srcs = [ - "discovery_client_test.go", - "restmapper_test.go", - ], - library = ":go_default_library", - tags = ["automanaged"], - deps = [ - "//pkg/api:go_default_library", - "//pkg/api/v1:go_default_library", - "//pkg/client/restclient:go_default_library", - "//pkg/client/restclient/fake:go_default_library", - "//pkg/version:go_default_library", - "//vendor:github.com/emicklei/go-restful/swagger", - "//vendor:github.com/stretchr/testify/assert", - "//vendor:k8s.io/apimachinery/pkg/api/errors", - "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", - "//vendor:k8s.io/apimachinery/pkg/runtime/schema", - "//vendor:k8s.io/apimachinery/pkg/util/sets", + "//vendor:k8s.io/apimachinery/pkg/version", + "//vendor:k8s.io/client-go/plugin/pkg/client/auth", + "//vendor:k8s.io/client-go/rest", ], ) go_test( name = "go_default_xtest", - srcs = ["helper_blackbox_test.go"], + srcs = [ + "discovery_client_test.go", + "helper_blackbox_test.go", + "restmapper_test.go", + ], tags = ["automanaged"], deps = [ "//pkg/api:go_default_library", "//pkg/api/testapi:go_default_library", - "//pkg/client/restclient:go_default_library", + "//pkg/api/v1:go_default_library", "//pkg/client/restclient/fake:go_default_library", "//pkg/client/typed/discovery:go_default_library", + "//vendor:github.com/emicklei/go-restful/swagger", + "//vendor:github.com/stretchr/testify/assert", + "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/util/sets", + "//vendor:k8s.io/apimachinery/pkg/version", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/typed/discovery/discovery_client.go b/vendor/k8s.io/kubernetes/pkg/client/typed/discovery/discovery_client.go index 22fe6294..110efed0 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/typed/discovery/discovery_client.go +++ b/vendor/k8s.io/kubernetes/pkg/client/typed/discovery/discovery_client.go @@ -30,10 +30,10 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/runtime/serializer" + "k8s.io/apimachinery/pkg/version" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" - "k8s.io/kubernetes/pkg/client/restclient" - "k8s.io/kubernetes/pkg/version" ) // defaultRetries is the number of times a resource discovery is repeated if an api group disappears on the fly (e.g. ThirdPartyResources). diff --git a/vendor/k8s.io/kubernetes/pkg/client/typed/discovery/discovery_client_test.go b/vendor/k8s.io/kubernetes/pkg/client/typed/discovery/discovery_client_test.go index 1f1886fb..125c9eb4 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/typed/discovery/discovery_client_test.go +++ b/vendor/k8s.io/kubernetes/pkg/client/typed/discovery/discovery_client_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package discovery +package discovery_test import ( "encoding/json" @@ -28,9 +28,10 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/apimachinery/pkg/version" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api/v1" - "k8s.io/kubernetes/pkg/client/restclient" - "k8s.io/kubernetes/pkg/version" + . "k8s.io/kubernetes/pkg/client/typed/discovery" ) func TestGetServerVersion(t *testing.T) { diff --git a/vendor/k8s.io/kubernetes/pkg/client/typed/discovery/fake/BUILD b/vendor/k8s.io/kubernetes/pkg/client/typed/discovery/fake/BUILD index 9bf05c78..db920534 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/typed/discovery/fake/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/typed/discovery/fake/BUILD @@ -13,12 +13,13 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/api/v1:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//pkg/version:go_default_library", "//vendor:github.com/emicklei/go-restful/swagger", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", + "//vendor:k8s.io/apimachinery/pkg/version", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/typed/discovery/fake/discovery.go b/vendor/k8s.io/kubernetes/pkg/client/typed/discovery/fake/discovery.go index c38f9edf..fdbbc16f 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/typed/discovery/fake/discovery.go +++ b/vendor/k8s.io/kubernetes/pkg/client/typed/discovery/fake/discovery.go @@ -23,10 +23,11 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/version" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api/v1" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/testing/core" - "k8s.io/kubernetes/pkg/version" + kubeversion "k8s.io/kubernetes/pkg/version" ) type FakeDiscovery struct { @@ -74,7 +75,7 @@ func (c *FakeDiscovery) ServerVersion() (*version.Info, error) { action.Resource = schema.GroupVersionResource{Resource: "version"} c.Invokes(action, nil) - versionInfo := version.Get() + versionInfo := kubeversion.Get() return &versionInfo, nil } diff --git a/vendor/k8s.io/kubernetes/pkg/client/typed/discovery/helper.go b/vendor/k8s.io/kubernetes/pkg/client/typed/discovery/helper.go index 6e776ca3..1c511a60 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/typed/discovery/helper.go +++ b/vendor/k8s.io/kubernetes/pkg/client/typed/discovery/helper.go @@ -24,7 +24,7 @@ import ( "k8s.io/apimachinery/pkg/util/sets" "k8s.io/kubernetes/pkg/version" // Import solely to initialize client auth plugins. - _ "k8s.io/kubernetes/plugin/pkg/client/auth" + _ "k8s.io/client-go/plugin/pkg/client/auth" ) // MatchesServerVersion queries the server to compares the build version diff --git a/vendor/k8s.io/kubernetes/pkg/client/typed/discovery/helper_blackbox_test.go b/vendor/k8s.io/kubernetes/pkg/client/typed/discovery/helper_blackbox_test.go index bbd03be7..8be9a83f 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/typed/discovery/helper_blackbox_test.go +++ b/vendor/k8s.io/kubernetes/pkg/client/typed/discovery/helper_blackbox_test.go @@ -31,9 +31,9 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/sets" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/restclient/fake" "k8s.io/kubernetes/pkg/client/typed/discovery" ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/typed/discovery/restmapper_test.go b/vendor/k8s.io/kubernetes/pkg/client/typed/discovery/restmapper_test.go index 40c32e25..bf2633ae 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/typed/discovery/restmapper_test.go +++ b/vendor/k8s.io/kubernetes/pkg/client/typed/discovery/restmapper_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package discovery +package discovery_test import ( "reflect" @@ -23,10 +23,11 @@ import ( "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/version" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/restclient/fake" - "k8s.io/kubernetes/pkg/version" + . "k8s.io/kubernetes/pkg/client/typed/discovery" "github.com/emicklei/go-restful/swagger" "github.com/stretchr/testify/assert" diff --git a/vendor/k8s.io/kubernetes/pkg/client/typed/dynamic/BUILD b/vendor/k8s.io/kubernetes/pkg/client/typed/dynamic/BUILD index 4c7bccfc..962b6e71 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/typed/dynamic/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/typed/dynamic/BUILD @@ -19,8 +19,6 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/api/v1:go_default_library", - "//pkg/client/restclient:go_default_library", - "//pkg/util/flowcontrol:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/meta", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1/unstructured", @@ -28,7 +26,10 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/runtime/serializer", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", + "//vendor:k8s.io/client-go/util/flowcontrol", ], ) @@ -41,16 +42,15 @@ go_test( library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", - "//pkg/api/v1:go_default_library", - "//pkg/client/restclient:go_default_library", - "//pkg/client/restclient/watch:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1/unstructured", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/runtime/serializer/streaming", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", + "//vendor:k8s.io/client-go/rest/watch", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/typed/dynamic/client.go b/vendor/k8s.io/kubernetes/pkg/client/typed/dynamic/client.go index 9e064bbb..efed92b2 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/typed/dynamic/client.go +++ b/vendor/k8s.io/kubernetes/pkg/client/typed/dynamic/client.go @@ -32,11 +32,12 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/runtime/serializer" + "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/watch" + restclient "k8s.io/client-go/rest" + "k8s.io/client-go/util/flowcontrol" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" - "k8s.io/kubernetes/pkg/client/restclient" - "k8s.io/kubernetes/pkg/util/flowcontrol" ) // Client is a Kubernetes client that allows you to access metadata @@ -137,7 +138,7 @@ func (rc *ResourceClient) Get(name string) (*unstructured.Unstructured, error) { } // Delete deletes the resource with the specified name. -func (rc *ResourceClient) Delete(name string, opts *v1.DeleteOptions) error { +func (rc *ResourceClient) Delete(name string, opts *metav1.DeleteOptions) error { return rc.cl.Delete(). NamespaceIfScoped(rc.ns, rc.resource.Namespaced). Resource(rc.resource.Name). @@ -148,7 +149,7 @@ func (rc *ResourceClient) Delete(name string, opts *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (rc *ResourceClient) DeleteCollection(deleteOptions *v1.DeleteOptions, listOptions runtime.Object) error { +func (rc *ResourceClient) DeleteCollection(deleteOptions *metav1.DeleteOptions, listOptions runtime.Object) error { parameterEncoder := rc.parameterCodec if parameterEncoder == nil { parameterEncoder = defaultParameterEncoder @@ -204,7 +205,7 @@ func (rc *ResourceClient) Watch(opts runtime.Object) (watch.Interface, error) { Watch() } -func (rc *ResourceClient) Patch(name string, pt api.PatchType, data []byte) (*unstructured.Unstructured, error) { +func (rc *ResourceClient) Patch(name string, pt types.PatchType, data []byte) (*unstructured.Unstructured, error) { result := new(unstructured.Unstructured) err := rc.cl.Patch(pt). NamespaceIfScoped(rc.ns, rc.resource.Namespaced). diff --git a/vendor/k8s.io/kubernetes/pkg/client/typed/dynamic/client_pool.go b/vendor/k8s.io/kubernetes/pkg/client/typed/dynamic/client_pool.go index 8b06a1a1..205d8a0d 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/typed/dynamic/client_pool.go +++ b/vendor/k8s.io/kubernetes/pkg/client/typed/dynamic/client_pool.go @@ -21,7 +21,7 @@ import ( "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/client/restclient" + restclient "k8s.io/client-go/rest" ) // ClientPool manages a pool of dynamic clients. diff --git a/vendor/k8s.io/kubernetes/pkg/client/typed/dynamic/client_test.go b/vendor/k8s.io/kubernetes/pkg/client/typed/dynamic/client_test.go index d313cf59..0426d7b1 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/typed/dynamic/client_test.go +++ b/vendor/k8s.io/kubernetes/pkg/client/typed/dynamic/client_test.go @@ -30,11 +30,10 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/runtime/serializer/streaming" + "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/watch" - "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/api/v1" - "k8s.io/kubernetes/pkg/client/restclient" - restclientwatch "k8s.io/kubernetes/pkg/client/restclient/watch" + restclient "k8s.io/client-go/rest" + restclientwatch "k8s.io/client-go/rest/watch" ) func getJSON(version, kind, name string) []byte { @@ -137,7 +136,7 @@ func TestList(t *testing.T) { } defer srv.Close() - got, err := cl.Resource(resource, tc.namespace).List(&v1.ListOptions{}) + got, err := cl.Resource(resource, tc.namespace).List(&metav1.ListOptions{}) if err != nil { t.Errorf("unexpected error when listing %q: %v", tc.name, err) continue @@ -294,7 +293,7 @@ func TestDeleteCollection(t *testing.T) { } defer srv.Close() - err = cl.Resource(resource, tc.namespace).DeleteCollection(nil, &v1.ListOptions{}) + err = cl.Resource(resource, tc.namespace).DeleteCollection(nil, &metav1.ListOptions{}) if err != nil { t.Errorf("unexpected error when deleting collection %q: %v", tc.name, err) continue @@ -470,7 +469,7 @@ func TestWatch(t *testing.T) { } defer srv.Close() - watcher, err := cl.Resource(resource, tc.namespace).Watch(&v1.ListOptions{}) + watcher, err := cl.Resource(resource, tc.namespace).Watch(&metav1.ListOptions{}) if err != nil { t.Errorf("unexpected error when watching %q: %v", tc.name, err) continue @@ -520,8 +519,8 @@ func TestPatch(t *testing.T) { } content := r.Header.Get("Content-Type") - if content != string(api.StrategicMergePatchType) { - t.Errorf("Patch(%q) got Content-Type %s. wanted %s", tc.name, content, api.StrategicMergePatchType) + if content != string(types.StrategicMergePatchType) { + t.Errorf("Patch(%q) got Content-Type %s. wanted %s", tc.name, content, types.StrategicMergePatchType) } data, err := ioutil.ReadAll(r.Body) @@ -540,7 +539,7 @@ func TestPatch(t *testing.T) { } defer srv.Close() - got, err := cl.Resource(resource, tc.namespace).Patch(tc.name, api.StrategicMergePatchType, tc.patch) + got, err := cl.Resource(resource, tc.namespace).Patch(tc.name, types.StrategicMergePatchType, tc.patch) if err != nil { t.Errorf("unexpected error when patching %q: %v", tc.name, err) continue diff --git a/vendor/k8s.io/kubernetes/pkg/client/unversioned/BUILD b/vendor/k8s.io/kubernetes/pkg/client/unversioned/BUILD index 574745ea..de8a9ebc 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/unversioned/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/unversioned/BUILD @@ -24,13 +24,13 @@ go_library( "//pkg/client/clientset_generated/internalclientset/typed/batch/internalversion:go_default_library", "//pkg/client/clientset_generated/internalclientset/typed/core/internalversion:go_default_library", "//pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion:go_default_library", - "//pkg/client/restclient:go_default_library", - "//plugin/pkg/client/auth:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/util/wait", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/plugin/pkg/client/auth", + "//vendor:k8s.io/client-go/rest", ], ) @@ -42,10 +42,10 @@ go_test( deps = [ "//pkg/api:go_default_library", "//pkg/api/testapi:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", + "//vendor:k8s.io/client-go/rest", ], ) @@ -60,8 +60,6 @@ filegroup( name = "all-srcs", srcs = [ ":package-srcs", - "//pkg/client/unversioned/auth:all-srcs", - "//pkg/client/unversioned/clientcmd:all-srcs", "//pkg/client/unversioned/portforward:all-srcs", "//pkg/client/unversioned/remotecommand:all-srcs", "//pkg/client/unversioned/testclient/simple:all-srcs", diff --git a/vendor/k8s.io/kubernetes/pkg/client/unversioned/auth/BUILD b/vendor/k8s.io/kubernetes/pkg/client/unversioned/auth/BUILD deleted file mode 100644 index fca21776..00000000 --- a/vendor/k8s.io/kubernetes/pkg/client/unversioned/auth/BUILD +++ /dev/null @@ -1,36 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = ["clientauth.go"], - tags = ["automanaged"], - deps = ["//pkg/client/restclient:go_default_library"], -) - -go_test( - name = "go_default_xtest", - srcs = ["clientauth_test.go"], - tags = ["automanaged"], - deps = ["//pkg/client/unversioned/auth:go_default_library"], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/vendor/k8s.io/kubernetes/pkg/client/unversioned/auth/clientauth.go b/vendor/k8s.io/kubernetes/pkg/client/unversioned/auth/clientauth.go deleted file mode 100644 index 128597f9..00000000 --- a/vendor/k8s.io/kubernetes/pkg/client/unversioned/auth/clientauth.go +++ /dev/null @@ -1,125 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -/* -Package auth defines a file format for holding authentication -information needed by clients of Kubernetes. Typically, -a Kubernetes cluster will put auth info for the admin in a known -location when it is created, and will (soon) put it in a known -location within a Container's file tree for Containers that -need access to the Kubernetes API. - -Having a defined format allows: - - clients to be implmented in multiple languages - - applications which link clients to be portable across - clusters with different authentication styles (e.g. - some may use SSL Client certs, others may not, etc) - - when the format changes, applications only - need to update this code. - -The file format is json, marshalled from a struct authcfg.Info. - -Clinet libraries in other languages should use the same format. - -It is not intended to store general preferences, such as default -namespace, output options, etc. CLIs (such as kubectl) and UIs should -develop their own format and may wish to inline the authcfg.Info type. - -The authcfg.Info is just a file format. It is distinct from -client.Config which holds options for creating a client.Client. -Helper functions are provided in this package to fill in a -client.Client from an authcfg.Info. - -Example: - - import ( - "pkg/client" - "pkg/client/auth" - ) - - info, err := auth.LoadFromFile(filename) - if err != nil { - // handle error - } - clientConfig = client.Config{} - clientConfig.Host = "example.com:4901" - clientConfig = info.MergeWithConfig() - client := client.New(clientConfig) - client.Pods(ns).List() -*/ -package auth - -// TODO: need a way to rotate Tokens. Therefore, need a way for client object to be reset when the authcfg is updated. -import ( - "encoding/json" - "io/ioutil" - "os" - - "k8s.io/kubernetes/pkg/client/restclient" -) - -// Info holds Kubernetes API authorization config. It is intended -// to be read/written from a file as a JSON object. -type Info struct { - User string - Password string - CAFile string - CertFile string - KeyFile string - BearerToken string - Insecure *bool -} - -// LoadFromFile parses an Info object from a file path. -// If the file does not exist, then os.IsNotExist(err) == true -func LoadFromFile(path string) (*Info, error) { - var info Info - if _, err := os.Stat(path); os.IsNotExist(err) { - return nil, err - } - data, err := ioutil.ReadFile(path) - if err != nil { - return nil, err - } - err = json.Unmarshal(data, &info) - if err != nil { - return nil, err - } - return &info, err -} - -// MergeWithConfig returns a copy of a client.Config with values from the Info. -// The fields of client.Config with a corresponding field in the Info are set -// with the value from the Info. -func (info Info) MergeWithConfig(c restclient.Config) (restclient.Config, error) { - var config restclient.Config = c - config.Username = info.User - config.Password = info.Password - config.CAFile = info.CAFile - config.CertFile = info.CertFile - config.KeyFile = info.KeyFile - config.BearerToken = info.BearerToken - if info.Insecure != nil { - config.Insecure = *info.Insecure - } - return config, nil -} - -func (info Info) Complete() bool { - return len(info.User) > 0 || - len(info.CertFile) > 0 || - len(info.BearerToken) > 0 -} diff --git a/vendor/k8s.io/kubernetes/pkg/client/unversioned/auth/clientauth_test.go b/vendor/k8s.io/kubernetes/pkg/client/unversioned/auth/clientauth_test.go deleted file mode 100644 index 03bf6a52..00000000 --- a/vendor/k8s.io/kubernetes/pkg/client/unversioned/auth/clientauth_test.go +++ /dev/null @@ -1,69 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package auth_test - -import ( - "io/ioutil" - "os" - "reflect" - "testing" - - clientauth "k8s.io/kubernetes/pkg/client/unversioned/auth" -) - -func TestLoadFromFile(t *testing.T) { - loadAuthInfoTests := []struct { - authData string - authInfo *clientauth.Info - expectErr bool - }{ - { - `{"user": "user", "password": "pass"}`, - &clientauth.Info{User: "user", Password: "pass"}, - false, - }, - { - "", nil, true, - }, - } - for _, loadAuthInfoTest := range loadAuthInfoTests { - tt := loadAuthInfoTest - aifile, err := ioutil.TempFile("", "testAuthInfo") - if err != nil { - t.Errorf("Unexpected error: %v", err) - } - if tt.authData != "missing" { - defer os.Remove(aifile.Name()) - defer aifile.Close() - _, err = aifile.WriteString(tt.authData) - if err != nil { - t.Errorf("Unexpected error: %v", err) - } - } else { - aifile.Close() - os.Remove(aifile.Name()) - } - authInfo, err := clientauth.LoadFromFile(aifile.Name()) - gotErr := err != nil - if gotErr != tt.expectErr { - t.Errorf("expected errorness: %v, actual errorness: %v", tt.expectErr, gotErr) - } - if !reflect.DeepEqual(authInfo, tt.authInfo) { - t.Errorf("Expected %v, got %v", tt.authInfo, authInfo) - } - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/BUILD b/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/BUILD deleted file mode 100644 index 1db92efe..00000000 --- a/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/BUILD +++ /dev/null @@ -1,78 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = [ - "auth_loaders.go", - "client_config.go", - "config.go", - "doc.go", - "helpers.go", - "loader.go", - "merged_client_builder.go", - "overrides.go", - "validation.go", - ], - tags = ["automanaged"], - deps = [ - "//pkg/api:go_default_library", - "//pkg/client/restclient:go_default_library", - "//pkg/client/unversioned/auth:go_default_library", - "//pkg/client/unversioned/clientcmd/api:go_default_library", - "//pkg/client/unversioned/clientcmd/api/latest:go_default_library", - "//pkg/util/homedir:go_default_library", - "//vendor:github.com/golang/glog", - "//vendor:github.com/howeyc/gopass", - "//vendor:github.com/imdario/mergo", - "//vendor:github.com/spf13/pflag", - "//vendor:k8s.io/apimachinery/pkg/runtime", - "//vendor:k8s.io/apimachinery/pkg/runtime/schema", - "//vendor:k8s.io/apimachinery/pkg/util/errors", - "//vendor:k8s.io/apimachinery/pkg/util/validation", - ], -) - -go_test( - name = "go_default_test", - srcs = [ - "client_config_test.go", - "loader_test.go", - "merged_client_builder_test.go", - "validation_test.go", - ], - library = ":go_default_library", - tags = ["automanaged"], - deps = [ - "//pkg/client/restclient:go_default_library", - "//pkg/client/unversioned/clientcmd/api:go_default_library", - "//pkg/client/unversioned/clientcmd/api/latest:go_default_library", - "//vendor:github.com/ghodss/yaml", - "//vendor:github.com/imdario/mergo", - "//vendor:k8s.io/apimachinery/pkg/runtime", - "//vendor:k8s.io/apimachinery/pkg/util/errors", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//pkg/client/unversioned/clientcmd/api:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/BUILD b/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/BUILD deleted file mode 100644 index 742c2344..00000000 --- a/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/BUILD +++ /dev/null @@ -1,51 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = [ - "helpers.go", - "register.go", - "types.go", - ], - tags = ["automanaged"], - deps = [ - "//vendor:k8s.io/apimachinery/pkg/runtime", - "//vendor:k8s.io/apimachinery/pkg/runtime/schema", - ], -) - -go_test( - name = "go_default_test", - srcs = [ - "helpers_test.go", - "types_test.go", - ], - library = ":go_default_library", - tags = ["automanaged"], - deps = ["//vendor:github.com/ghodss/yaml"], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//pkg/client/unversioned/clientcmd/api/latest:all-srcs", - "//pkg/client/unversioned/clientcmd/api/v1:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/helpers.go b/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/helpers.go deleted file mode 100644 index 43e26487..00000000 --- a/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/helpers.go +++ /dev/null @@ -1,183 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package api - -import ( - "encoding/base64" - "errors" - "fmt" - "io/ioutil" - "os" - "path" - "path/filepath" -) - -func init() { - sDec, _ := base64.StdEncoding.DecodeString("REDACTED+") - redactedBytes = []byte(string(sDec)) -} - -// IsConfigEmpty returns true if the config is empty. -func IsConfigEmpty(config *Config) bool { - return len(config.AuthInfos) == 0 && len(config.Clusters) == 0 && len(config.Contexts) == 0 && - len(config.CurrentContext) == 0 && - len(config.Preferences.Extensions) == 0 && !config.Preferences.Colors && - len(config.Extensions) == 0 -} - -// MinifyConfig read the current context and uses that to keep only the relevant pieces of config -// This is useful for making secrets based on kubeconfig files -func MinifyConfig(config *Config) error { - if len(config.CurrentContext) == 0 { - return errors.New("current-context must exist in order to minify") - } - - currContext, exists := config.Contexts[config.CurrentContext] - if !exists { - return fmt.Errorf("cannot locate context %v", config.CurrentContext) - } - - newContexts := map[string]*Context{} - newContexts[config.CurrentContext] = currContext - - newClusters := map[string]*Cluster{} - if len(currContext.Cluster) > 0 { - if _, exists := config.Clusters[currContext.Cluster]; !exists { - return fmt.Errorf("cannot locate cluster %v", currContext.Cluster) - } - - newClusters[currContext.Cluster] = config.Clusters[currContext.Cluster] - } - - newAuthInfos := map[string]*AuthInfo{} - if len(currContext.AuthInfo) > 0 { - if _, exists := config.AuthInfos[currContext.AuthInfo]; !exists { - return fmt.Errorf("cannot locate user %v", currContext.AuthInfo) - } - - newAuthInfos[currContext.AuthInfo] = config.AuthInfos[currContext.AuthInfo] - } - - config.AuthInfos = newAuthInfos - config.Clusters = newClusters - config.Contexts = newContexts - - return nil -} - -var redactedBytes []byte - -// Flatten redacts raw data entries from the config object for a human-readable view. -func ShortenConfig(config *Config) { - // trick json encoder into printing a human readable string in the raw data - // by base64 decoding what we want to print. Relies on implementation of - // http://golang.org/pkg/encoding/json/#Marshal using base64 to encode []byte - for key, authInfo := range config.AuthInfos { - if len(authInfo.ClientKeyData) > 0 { - authInfo.ClientKeyData = redactedBytes - } - if len(authInfo.ClientCertificateData) > 0 { - authInfo.ClientCertificateData = redactedBytes - } - config.AuthInfos[key] = authInfo - } - for key, cluster := range config.Clusters { - if len(cluster.CertificateAuthorityData) > 0 { - cluster.CertificateAuthorityData = redactedBytes - } - config.Clusters[key] = cluster - } -} - -// Flatten changes the config object into a self contained config (useful for making secrets) -func FlattenConfig(config *Config) error { - for key, authInfo := range config.AuthInfos { - baseDir, err := MakeAbs(path.Dir(authInfo.LocationOfOrigin), "") - if err != nil { - return err - } - - if err := FlattenContent(&authInfo.ClientCertificate, &authInfo.ClientCertificateData, baseDir); err != nil { - return err - } - if err := FlattenContent(&authInfo.ClientKey, &authInfo.ClientKeyData, baseDir); err != nil { - return err - } - - config.AuthInfos[key] = authInfo - } - for key, cluster := range config.Clusters { - baseDir, err := MakeAbs(path.Dir(cluster.LocationOfOrigin), "") - if err != nil { - return err - } - - if err := FlattenContent(&cluster.CertificateAuthority, &cluster.CertificateAuthorityData, baseDir); err != nil { - return err - } - - config.Clusters[key] = cluster - } - - return nil -} - -func FlattenContent(path *string, contents *[]byte, baseDir string) error { - if len(*path) != 0 { - if len(*contents) > 0 { - return errors.New("cannot have values for both path and contents") - } - - var err error - absPath := ResolvePath(*path, baseDir) - *contents, err = ioutil.ReadFile(absPath) - if err != nil { - return err - } - - *path = "" - } - - return nil -} - -// ResolvePath returns the path as an absolute paths, relative to the given base directory -func ResolvePath(path string, base string) string { - // Don't resolve empty paths - if len(path) > 0 { - // Don't resolve absolute paths - if !filepath.IsAbs(path) { - return filepath.Join(base, path) - } - } - - return path -} - -func MakeAbs(path, base string) (string, error) { - if filepath.IsAbs(path) { - return path, nil - } - if len(base) == 0 { - cwd, err := os.Getwd() - if err != nil { - return "", err - } - base = cwd - } - return filepath.Join(base, path), nil -} diff --git a/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/helpers_test.go b/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/helpers_test.go deleted file mode 100644 index 43020845..00000000 --- a/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/helpers_test.go +++ /dev/null @@ -1,301 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package api - -import ( - "fmt" - "io/ioutil" - "os" - "reflect" - "testing" - - "github.com/ghodss/yaml" -) - -func newMergedConfig(certFile, certContent, keyFile, keyContent, caFile, caContent string, t *testing.T) Config { - if err := ioutil.WriteFile(certFile, []byte(certContent), 0644); err != nil { - t.Errorf("unexpected error: %v", err) - } - if err := ioutil.WriteFile(keyFile, []byte(keyContent), 0600); err != nil { - t.Errorf("unexpected error: %v", err) - } - if err := ioutil.WriteFile(caFile, []byte(caContent), 0644); err != nil { - t.Errorf("unexpected error: %v", err) - } - - return Config{ - AuthInfos: map[string]*AuthInfo{ - "red-user": {Token: "red-token", ClientCertificateData: []byte(certContent), ClientKeyData: []byte(keyContent)}, - "blue-user": {Token: "blue-token", ClientCertificate: certFile, ClientKey: keyFile}}, - Clusters: map[string]*Cluster{ - "cow-cluster": {Server: "http://cow.org:8080", CertificateAuthorityData: []byte(caContent)}, - "chicken-cluster": {Server: "http://chicken.org:8080", CertificateAuthority: caFile}}, - Contexts: map[string]*Context{ - "federal-context": {AuthInfo: "red-user", Cluster: "cow-cluster"}, - "shaker-context": {AuthInfo: "blue-user", Cluster: "chicken-cluster"}}, - CurrentContext: "federal-context", - } -} - -func TestMinifySuccess(t *testing.T) { - certFile, _ := ioutil.TempFile("", "") - defer os.Remove(certFile.Name()) - keyFile, _ := ioutil.TempFile("", "") - defer os.Remove(keyFile.Name()) - caFile, _ := ioutil.TempFile("", "") - defer os.Remove(caFile.Name()) - - mutatingConfig := newMergedConfig(certFile.Name(), "cert", keyFile.Name(), "key", caFile.Name(), "ca", t) - - if err := MinifyConfig(&mutatingConfig); err != nil { - t.Errorf("unexpected error: %v", err) - } - - if len(mutatingConfig.Contexts) > 1 { - t.Errorf("unexpected contexts: %v", mutatingConfig.Contexts) - } - if _, exists := mutatingConfig.Contexts["federal-context"]; !exists { - t.Errorf("missing context") - } - - if len(mutatingConfig.Clusters) > 1 { - t.Errorf("unexpected clusters: %v", mutatingConfig.Clusters) - } - if _, exists := mutatingConfig.Clusters["cow-cluster"]; !exists { - t.Errorf("missing cluster") - } - - if len(mutatingConfig.AuthInfos) > 1 { - t.Errorf("unexpected users: %v", mutatingConfig.AuthInfos) - } - if _, exists := mutatingConfig.AuthInfos["red-user"]; !exists { - t.Errorf("missing user") - } -} - -func TestMinifyMissingContext(t *testing.T) { - certFile, _ := ioutil.TempFile("", "") - defer os.Remove(certFile.Name()) - keyFile, _ := ioutil.TempFile("", "") - defer os.Remove(keyFile.Name()) - caFile, _ := ioutil.TempFile("", "") - defer os.Remove(caFile.Name()) - - mutatingConfig := newMergedConfig(certFile.Name(), "cert", keyFile.Name(), "key", caFile.Name(), "ca", t) - mutatingConfig.CurrentContext = "missing" - - errMsg := "cannot locate context missing" - - if err := MinifyConfig(&mutatingConfig); err == nil || err.Error() != errMsg { - t.Errorf("expected %v, got %v", errMsg, err) - } -} - -func TestMinifyMissingCluster(t *testing.T) { - certFile, _ := ioutil.TempFile("", "") - defer os.Remove(certFile.Name()) - keyFile, _ := ioutil.TempFile("", "") - defer os.Remove(keyFile.Name()) - caFile, _ := ioutil.TempFile("", "") - defer os.Remove(caFile.Name()) - - mutatingConfig := newMergedConfig(certFile.Name(), "cert", keyFile.Name(), "key", caFile.Name(), "ca", t) - delete(mutatingConfig.Clusters, mutatingConfig.Contexts[mutatingConfig.CurrentContext].Cluster) - - errMsg := "cannot locate cluster cow-cluster" - - if err := MinifyConfig(&mutatingConfig); err == nil || err.Error() != errMsg { - t.Errorf("expected %v, got %v", errMsg, err) - } -} - -func TestMinifyMissingAuthInfo(t *testing.T) { - certFile, _ := ioutil.TempFile("", "") - defer os.Remove(certFile.Name()) - keyFile, _ := ioutil.TempFile("", "") - defer os.Remove(keyFile.Name()) - caFile, _ := ioutil.TempFile("", "") - defer os.Remove(caFile.Name()) - - mutatingConfig := newMergedConfig(certFile.Name(), "cert", keyFile.Name(), "key", caFile.Name(), "ca", t) - delete(mutatingConfig.AuthInfos, mutatingConfig.Contexts[mutatingConfig.CurrentContext].AuthInfo) - - errMsg := "cannot locate user red-user" - - if err := MinifyConfig(&mutatingConfig); err == nil || err.Error() != errMsg { - t.Errorf("expected %v, got %v", errMsg, err) - } -} - -func TestFlattenSuccess(t *testing.T) { - certFile, _ := ioutil.TempFile("", "") - defer os.Remove(certFile.Name()) - keyFile, _ := ioutil.TempFile("", "") - defer os.Remove(keyFile.Name()) - caFile, _ := ioutil.TempFile("", "") - defer os.Remove(caFile.Name()) - - certData := "cert" - keyData := "key" - caData := "ca" - - unchangingCluster := "cow-cluster" - unchangingAuthInfo := "red-user" - changingCluster := "chicken-cluster" - changingAuthInfo := "blue-user" - - startingConfig := newMergedConfig(certFile.Name(), certData, keyFile.Name(), keyData, caFile.Name(), caData, t) - mutatingConfig := startingConfig - - if err := FlattenConfig(&mutatingConfig); err != nil { - t.Errorf("unexpected error: %v", err) - } - - if len(mutatingConfig.Contexts) != 2 { - t.Errorf("unexpected contexts: %v", mutatingConfig.Contexts) - } - if !reflect.DeepEqual(startingConfig.Contexts, mutatingConfig.Contexts) { - t.Errorf("expected %v, got %v", startingConfig.Contexts, mutatingConfig.Contexts) - } - - if len(mutatingConfig.Clusters) != 2 { - t.Errorf("unexpected clusters: %v", mutatingConfig.Clusters) - } - if !reflect.DeepEqual(startingConfig.Clusters[unchangingCluster], mutatingConfig.Clusters[unchangingCluster]) { - t.Errorf("expected %v, got %v", startingConfig.Clusters[unchangingCluster], mutatingConfig.Clusters[unchangingCluster]) - } - if len(mutatingConfig.Clusters[changingCluster].CertificateAuthority) != 0 { - t.Errorf("unexpected caFile") - } - if string(mutatingConfig.Clusters[changingCluster].CertificateAuthorityData) != caData { - t.Errorf("expected %v, got %v", caData, string(mutatingConfig.Clusters[changingCluster].CertificateAuthorityData)) - } - - if len(mutatingConfig.AuthInfos) != 2 { - t.Errorf("unexpected users: %v", mutatingConfig.AuthInfos) - } - if !reflect.DeepEqual(startingConfig.AuthInfos[unchangingAuthInfo], mutatingConfig.AuthInfos[unchangingAuthInfo]) { - t.Errorf("expected %v, got %v", startingConfig.AuthInfos[unchangingAuthInfo], mutatingConfig.AuthInfos[unchangingAuthInfo]) - } - if len(mutatingConfig.AuthInfos[changingAuthInfo].ClientCertificate) != 0 { - t.Errorf("unexpected caFile") - } - if string(mutatingConfig.AuthInfos[changingAuthInfo].ClientCertificateData) != certData { - t.Errorf("expected %v, got %v", certData, string(mutatingConfig.AuthInfos[changingAuthInfo].ClientCertificateData)) - } - if len(mutatingConfig.AuthInfos[changingAuthInfo].ClientKey) != 0 { - t.Errorf("unexpected caFile") - } - if string(mutatingConfig.AuthInfos[changingAuthInfo].ClientKeyData) != keyData { - t.Errorf("expected %v, got %v", keyData, string(mutatingConfig.AuthInfos[changingAuthInfo].ClientKeyData)) - } - -} - -func Example_minifyAndShorten() { - certFile, _ := ioutil.TempFile("", "") - defer os.Remove(certFile.Name()) - keyFile, _ := ioutil.TempFile("", "") - defer os.Remove(keyFile.Name()) - caFile, _ := ioutil.TempFile("", "") - defer os.Remove(caFile.Name()) - - certData := "cert" - keyData := "key" - caData := "ca" - - config := newMergedConfig(certFile.Name(), certData, keyFile.Name(), keyData, caFile.Name(), caData, nil) - - MinifyConfig(&config) - ShortenConfig(&config) - - output, _ := yaml.Marshal(config) - fmt.Printf("%s", string(output)) - // Output: - // clusters: - // cow-cluster: - // LocationOfOrigin: "" - // certificate-authority-data: REDACTED - // server: http://cow.org:8080 - // contexts: - // federal-context: - // LocationOfOrigin: "" - // cluster: cow-cluster - // user: red-user - // current-context: federal-context - // preferences: {} - // users: - // red-user: - // LocationOfOrigin: "" - // client-certificate-data: REDACTED - // client-key-data: REDACTED - // token: red-token -} - -func TestShortenSuccess(t *testing.T) { - certFile, _ := ioutil.TempFile("", "") - defer os.Remove(certFile.Name()) - keyFile, _ := ioutil.TempFile("", "") - defer os.Remove(keyFile.Name()) - caFile, _ := ioutil.TempFile("", "") - defer os.Remove(caFile.Name()) - - certData := "cert" - keyData := "key" - caData := "ca" - - unchangingCluster := "chicken-cluster" - unchangingAuthInfo := "blue-user" - changingCluster := "cow-cluster" - changingAuthInfo := "red-user" - - startingConfig := newMergedConfig(certFile.Name(), certData, keyFile.Name(), keyData, caFile.Name(), caData, t) - mutatingConfig := startingConfig - - ShortenConfig(&mutatingConfig) - - if len(mutatingConfig.Contexts) != 2 { - t.Errorf("unexpected contexts: %v", mutatingConfig.Contexts) - } - if !reflect.DeepEqual(startingConfig.Contexts, mutatingConfig.Contexts) { - t.Errorf("expected %v, got %v", startingConfig.Contexts, mutatingConfig.Contexts) - } - - redacted := string(redactedBytes) - if len(mutatingConfig.Clusters) != 2 { - t.Errorf("unexpected clusters: %v", mutatingConfig.Clusters) - } - if !reflect.DeepEqual(startingConfig.Clusters[unchangingCluster], mutatingConfig.Clusters[unchangingCluster]) { - t.Errorf("expected %v, got %v", startingConfig.Clusters[unchangingCluster], mutatingConfig.Clusters[unchangingCluster]) - } - if string(mutatingConfig.Clusters[changingCluster].CertificateAuthorityData) != redacted { - t.Errorf("expected %v, got %v", redacted, string(mutatingConfig.Clusters[changingCluster].CertificateAuthorityData)) - } - - if len(mutatingConfig.AuthInfos) != 2 { - t.Errorf("unexpected users: %v", mutatingConfig.AuthInfos) - } - if !reflect.DeepEqual(startingConfig.AuthInfos[unchangingAuthInfo], mutatingConfig.AuthInfos[unchangingAuthInfo]) { - t.Errorf("expected %v, got %v", startingConfig.AuthInfos[unchangingAuthInfo], mutatingConfig.AuthInfos[unchangingAuthInfo]) - } - if string(mutatingConfig.AuthInfos[changingAuthInfo].ClientCertificateData) != redacted { - t.Errorf("expected %v, got %v", redacted, string(mutatingConfig.AuthInfos[changingAuthInfo].ClientCertificateData)) - } - if string(mutatingConfig.AuthInfos[changingAuthInfo].ClientKeyData) != redacted { - t.Errorf("expected %v, got %v", redacted, string(mutatingConfig.AuthInfos[changingAuthInfo].ClientKeyData)) - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/latest/BUILD b/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/latest/BUILD deleted file mode 100644 index 582d4bf3..00000000 --- a/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/latest/BUILD +++ /dev/null @@ -1,35 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["latest.go"], - tags = ["automanaged"], - deps = [ - "//pkg/client/unversioned/clientcmd/api:go_default_library", - "//pkg/client/unversioned/clientcmd/api/v1:go_default_library", - "//vendor:k8s.io/apimachinery/pkg/runtime", - "//vendor:k8s.io/apimachinery/pkg/runtime/schema", - "//vendor:k8s.io/apimachinery/pkg/runtime/serializer/json", - "//vendor:k8s.io/apimachinery/pkg/runtime/serializer/versioning", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/latest/latest.go b/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/latest/latest.go deleted file mode 100644 index 0f899d51..00000000 --- a/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/latest/latest.go +++ /dev/null @@ -1,66 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package latest - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/runtime/serializer/json" - "k8s.io/apimachinery/pkg/runtime/serializer/versioning" - "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api" - "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/v1" -) - -// Version is the string that represents the current external default version. -const Version = "v1" - -var ExternalVersion = schema.GroupVersion{Group: "", Version: "v1"} - -// OldestVersion is the string that represents the oldest server version supported, -// for client code that wants to hardcode the lowest common denominator. -const OldestVersion = "v1" - -// Versions is the list of versions that are recognized in code. The order provided -// may be assumed to be least feature rich to most feature rich, and clients may -// choose to prefer the latter items in the list over the former items when presented -// with a set of versions to choose. -var Versions = []string{"v1"} - -var ( - Codec runtime.Codec - Scheme *runtime.Scheme -) - -func init() { - Scheme = runtime.NewScheme() - if err := api.AddToScheme(Scheme); err != nil { - // Programmer error, detect immediately - panic(err) - } - if err := v1.AddToScheme(Scheme); err != nil { - // Programmer error, detect immediately - panic(err) - } - yamlSerializer := json.NewYAMLSerializer(json.DefaultMetaFactory, Scheme, Scheme) - Codec = versioning.NewDefaultingCodecForScheme( - Scheme, - yamlSerializer, - yamlSerializer, - schema.GroupVersion{Version: Version}, - runtime.InternalGroupVersioner, - ) -} diff --git a/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/types.go b/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/types.go deleted file mode 100644 index fa9d40a9..00000000 --- a/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/types.go +++ /dev/null @@ -1,178 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package api - -import ( - "k8s.io/apimachinery/pkg/runtime" -) - -// Where possible, json tags match the cli argument names. -// Top level config objects and all values required for proper functioning are not "omitempty". Any truly optional piece of config is allowed to be omitted. - -// Config holds the information needed to build connect to remote kubernetes clusters as a given user -// IMPORTANT if you add fields to this struct, please update IsConfigEmpty() -type Config struct { - // Legacy field from pkg/api/types.go TypeMeta. - // TODO(jlowdermilk): remove this after eliminating downstream dependencies. - // +optional - Kind string `json:"kind,omitempty"` - // DEPRECATED: APIVersion is the preferred api version for communicating with the kubernetes cluster (v1, v2, etc). - // Because a cluster can run multiple API groups and potentially multiple versions of each, it no longer makes sense to specify - // a single value for the cluster version. - // This field isn't really needed anyway, so we are deprecating it without replacement. - // It will be ignored if it is present. - // +optional - APIVersion string `json:"apiVersion,omitempty"` - // Preferences holds general information to be use for cli interactions - Preferences Preferences `json:"preferences"` - // Clusters is a map of referencable names to cluster configs - Clusters map[string]*Cluster `json:"clusters"` - // AuthInfos is a map of referencable names to user configs - AuthInfos map[string]*AuthInfo `json:"users"` - // Contexts is a map of referencable names to context configs - Contexts map[string]*Context `json:"contexts"` - // CurrentContext is the name of the context that you would like to use by default - CurrentContext string `json:"current-context"` - // Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields - // +optional - Extensions map[string]runtime.Object `json:"extensions,omitempty"` -} - -// IMPORTANT if you add fields to this struct, please update IsConfigEmpty() -type Preferences struct { - // +optional - Colors bool `json:"colors,omitempty"` - // Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields - // +optional - Extensions map[string]runtime.Object `json:"extensions,omitempty"` -} - -// Cluster contains information about how to communicate with a kubernetes cluster -type Cluster struct { - // LocationOfOrigin indicates where this object came from. It is used for round tripping config post-merge, but never serialized. - LocationOfOrigin string - // Server is the address of the kubernetes cluster (https://hostname:port). - Server string `json:"server"` - // APIVersion is the preferred api version for communicating with the kubernetes cluster (v1, v2, etc). - // +optional - APIVersion string `json:"api-version,omitempty"` - // InsecureSkipTLSVerify skips the validity check for the server's certificate. This will make your HTTPS connections insecure. - // +optional - InsecureSkipTLSVerify bool `json:"insecure-skip-tls-verify,omitempty"` - // CertificateAuthority is the path to a cert file for the certificate authority. - // +optional - CertificateAuthority string `json:"certificate-authority,omitempty"` - // CertificateAuthorityData contains PEM-encoded certificate authority certificates. Overrides CertificateAuthority - // +optional - CertificateAuthorityData []byte `json:"certificate-authority-data,omitempty"` - // Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields - // +optional - Extensions map[string]runtime.Object `json:"extensions,omitempty"` -} - -// AuthInfo contains information that describes identity information. This is use to tell the kubernetes cluster who you are. -type AuthInfo struct { - // LocationOfOrigin indicates where this object came from. It is used for round tripping config post-merge, but never serialized. - LocationOfOrigin string - // ClientCertificate is the path to a client cert file for TLS. - // +optional - ClientCertificate string `json:"client-certificate,omitempty"` - // ClientCertificateData contains PEM-encoded data from a client cert file for TLS. Overrides ClientCertificate - // +optional - ClientCertificateData []byte `json:"client-certificate-data,omitempty"` - // ClientKey is the path to a client key file for TLS. - // +optional - ClientKey string `json:"client-key,omitempty"` - // ClientKeyData contains PEM-encoded data from a client key file for TLS. Overrides ClientKey - // +optional - ClientKeyData []byte `json:"client-key-data,omitempty"` - // Token is the bearer token for authentication to the kubernetes cluster. - // +optional - Token string `json:"token,omitempty"` - // TokenFile is a pointer to a file that contains a bearer token (as described above). If both Token and TokenFile are present, Token takes precedence. - // +optional - TokenFile string `json:"tokenFile,omitempty"` - // Impersonate is the username to act-as. - // +optional - Impersonate string `json:"act-as,omitempty"` - // Username is the username for basic authentication to the kubernetes cluster. - // +optional - Username string `json:"username,omitempty"` - // Password is the password for basic authentication to the kubernetes cluster. - // +optional - Password string `json:"password,omitempty"` - // AuthProvider specifies a custom authentication plugin for the kubernetes cluster. - // +optional - AuthProvider *AuthProviderConfig `json:"auth-provider,omitempty"` - // Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields - // +optional - Extensions map[string]runtime.Object `json:"extensions,omitempty"` -} - -// Context is a tuple of references to a cluster (how do I communicate with a kubernetes cluster), a user (how do I identify myself), and a namespace (what subset of resources do I want to work with) -type Context struct { - // LocationOfOrigin indicates where this object came from. It is used for round tripping config post-merge, but never serialized. - LocationOfOrigin string - // Cluster is the name of the cluster for this context - Cluster string `json:"cluster"` - // AuthInfo is the name of the authInfo for this context - AuthInfo string `json:"user"` - // Namespace is the default namespace to use on unspecified requests - // +optional - Namespace string `json:"namespace,omitempty"` - // Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields - // +optional - Extensions map[string]runtime.Object `json:"extensions,omitempty"` -} - -// AuthProviderConfig holds the configuration for a specified auth provider. -type AuthProviderConfig struct { - Name string `json:"name"` - // +optional - Config map[string]string `json:"config,omitempty"` -} - -// NewConfig is a convenience function that returns a new Config object with non-nil maps -func NewConfig() *Config { - return &Config{ - Preferences: *NewPreferences(), - Clusters: make(map[string]*Cluster), - AuthInfos: make(map[string]*AuthInfo), - Contexts: make(map[string]*Context), - Extensions: make(map[string]runtime.Object), - } -} - -// NewConfig is a convenience function that returns a new Config object with non-nil maps -func NewContext() *Context { - return &Context{Extensions: make(map[string]runtime.Object)} -} - -// NewConfig is a convenience function that returns a new Config object with non-nil maps -func NewCluster() *Cluster { - return &Cluster{Extensions: make(map[string]runtime.Object)} -} - -// NewConfig is a convenience function that returns a new Config object with non-nil maps -func NewAuthInfo() *AuthInfo { - return &AuthInfo{Extensions: make(map[string]runtime.Object)} -} - -// NewConfig is a convenience function that returns a new Config object with non-nil maps -func NewPreferences() *Preferences { - return &Preferences{Extensions: make(map[string]runtime.Object)} -} diff --git a/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/types_test.go b/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/types_test.go deleted file mode 100644 index bd348345..00000000 --- a/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/types_test.go +++ /dev/null @@ -1,135 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package api - -import ( - "fmt" - - "github.com/ghodss/yaml" -) - -func Example_emptyConfig() { - defaultConfig := NewConfig() - - output, err := yaml.Marshal(defaultConfig) - if err != nil { - fmt.Printf("Unexpected error: %v", err) - } - - fmt.Printf("%v", string(output)) - // Output: - // clusters: {} - // contexts: {} - // current-context: "" - // preferences: {} - // users: {} -} - -func Example_ofOptionsConfig() { - defaultConfig := NewConfig() - defaultConfig.Preferences.Colors = true - defaultConfig.Clusters["alfa"] = &Cluster{ - Server: "https://alfa.org:8080", - InsecureSkipTLSVerify: true, - CertificateAuthority: "path/to/my/cert-ca-filename", - } - defaultConfig.Clusters["bravo"] = &Cluster{ - Server: "https://bravo.org:8080", - InsecureSkipTLSVerify: false, - } - defaultConfig.AuthInfos["white-mage-via-cert"] = &AuthInfo{ - ClientCertificate: "path/to/my/client-cert-filename", - ClientKey: "path/to/my/client-key-filename", - } - defaultConfig.AuthInfos["red-mage-via-token"] = &AuthInfo{ - Token: "my-secret-token", - } - defaultConfig.AuthInfos["black-mage-via-auth-provider"] = &AuthInfo{ - AuthProvider: &AuthProviderConfig{ - Name: "gcp", - Config: map[string]string{ - "foo": "bar", - "token": "s3cr3t-t0k3n", - }, - }, - } - defaultConfig.Contexts["bravo-as-black-mage"] = &Context{ - Cluster: "bravo", - AuthInfo: "black-mage-via-auth-provider", - Namespace: "yankee", - } - defaultConfig.Contexts["alfa-as-black-mage"] = &Context{ - Cluster: "alfa", - AuthInfo: "black-mage-via-auth-provider", - Namespace: "zulu", - } - defaultConfig.Contexts["alfa-as-white-mage"] = &Context{ - Cluster: "alfa", - AuthInfo: "white-mage-via-cert", - } - defaultConfig.CurrentContext = "alfa-as-white-mage" - - output, err := yaml.Marshal(defaultConfig) - if err != nil { - fmt.Printf("Unexpected error: %v", err) - } - - fmt.Printf("%v", string(output)) - // Output: - // clusters: - // alfa: - // LocationOfOrigin: "" - // certificate-authority: path/to/my/cert-ca-filename - // insecure-skip-tls-verify: true - // server: https://alfa.org:8080 - // bravo: - // LocationOfOrigin: "" - // server: https://bravo.org:8080 - // contexts: - // alfa-as-black-mage: - // LocationOfOrigin: "" - // cluster: alfa - // namespace: zulu - // user: black-mage-via-auth-provider - // alfa-as-white-mage: - // LocationOfOrigin: "" - // cluster: alfa - // user: white-mage-via-cert - // bravo-as-black-mage: - // LocationOfOrigin: "" - // cluster: bravo - // namespace: yankee - // user: black-mage-via-auth-provider - // current-context: alfa-as-white-mage - // preferences: - // colors: true - // users: - // black-mage-via-auth-provider: - // LocationOfOrigin: "" - // auth-provider: - // config: - // foo: bar - // token: s3cr3t-t0k3n - // name: gcp - // red-mage-via-token: - // LocationOfOrigin: "" - // token: my-secret-token - // white-mage-via-cert: - // LocationOfOrigin: "" - // client-certificate: path/to/my/client-cert-filename - // client-key: path/to/my/client-key-filename -} diff --git a/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/v1/conversion.go b/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/v1/conversion.go deleted file mode 100644 index 602c0798..00000000 --- a/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/v1/conversion.go +++ /dev/null @@ -1,227 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1 - -import ( - "sort" - - "k8s.io/apimachinery/pkg/conversion" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api" -) - -func addConversionFuncs(scheme *runtime.Scheme) error { - return scheme.AddConversionFuncs( - func(in *Cluster, out *api.Cluster, s conversion.Scope) error { - return s.DefaultConvert(in, out, conversion.IgnoreMissingFields) - }, - func(in *api.Cluster, out *Cluster, s conversion.Scope) error { - return s.DefaultConvert(in, out, conversion.IgnoreMissingFields) - }, - func(in *Preferences, out *api.Preferences, s conversion.Scope) error { - return s.DefaultConvert(in, out, conversion.IgnoreMissingFields) - }, - func(in *api.Preferences, out *Preferences, s conversion.Scope) error { - return s.DefaultConvert(in, out, conversion.IgnoreMissingFields) - }, - func(in *AuthInfo, out *api.AuthInfo, s conversion.Scope) error { - return s.DefaultConvert(in, out, conversion.IgnoreMissingFields) - }, - func(in *api.AuthInfo, out *AuthInfo, s conversion.Scope) error { - return s.DefaultConvert(in, out, conversion.IgnoreMissingFields) - }, - func(in *Context, out *api.Context, s conversion.Scope) error { - return s.DefaultConvert(in, out, conversion.IgnoreMissingFields) - }, - func(in *api.Context, out *Context, s conversion.Scope) error { - return s.DefaultConvert(in, out, conversion.IgnoreMissingFields) - }, - - func(in *Config, out *api.Config, s conversion.Scope) error { - out.CurrentContext = in.CurrentContext - if err := s.Convert(&in.Preferences, &out.Preferences, 0); err != nil { - return err - } - - out.Clusters = make(map[string]*api.Cluster) - if err := s.Convert(&in.Clusters, &out.Clusters, 0); err != nil { - return err - } - out.AuthInfos = make(map[string]*api.AuthInfo) - if err := s.Convert(&in.AuthInfos, &out.AuthInfos, 0); err != nil { - return err - } - out.Contexts = make(map[string]*api.Context) - if err := s.Convert(&in.Contexts, &out.Contexts, 0); err != nil { - return err - } - out.Extensions = make(map[string]runtime.Object) - if err := s.Convert(&in.Extensions, &out.Extensions, 0); err != nil { - return err - } - return nil - }, - func(in *api.Config, out *Config, s conversion.Scope) error { - out.CurrentContext = in.CurrentContext - if err := s.Convert(&in.Preferences, &out.Preferences, 0); err != nil { - return err - } - - out.Clusters = make([]NamedCluster, 0, 0) - if err := s.Convert(&in.Clusters, &out.Clusters, 0); err != nil { - return err - } - out.AuthInfos = make([]NamedAuthInfo, 0, 0) - if err := s.Convert(&in.AuthInfos, &out.AuthInfos, 0); err != nil { - return err - } - out.Contexts = make([]NamedContext, 0, 0) - if err := s.Convert(&in.Contexts, &out.Contexts, 0); err != nil { - return err - } - out.Extensions = make([]NamedExtension, 0, 0) - if err := s.Convert(&in.Extensions, &out.Extensions, 0); err != nil { - return err - } - return nil - }, - func(in *[]NamedCluster, out *map[string]*api.Cluster, s conversion.Scope) error { - for _, curr := range *in { - newCluster := api.NewCluster() - if err := s.Convert(&curr.Cluster, newCluster, 0); err != nil { - return err - } - (*out)[curr.Name] = newCluster - } - - return nil - }, - func(in *map[string]*api.Cluster, out *[]NamedCluster, s conversion.Scope) error { - allKeys := make([]string, 0, len(*in)) - for key := range *in { - allKeys = append(allKeys, key) - } - sort.Strings(allKeys) - - for _, key := range allKeys { - newCluster := (*in)[key] - oldCluster := &Cluster{} - if err := s.Convert(newCluster, oldCluster, 0); err != nil { - return err - } - - namedCluster := NamedCluster{key, *oldCluster} - *out = append(*out, namedCluster) - } - - return nil - }, - func(in *[]NamedAuthInfo, out *map[string]*api.AuthInfo, s conversion.Scope) error { - for _, curr := range *in { - newAuthInfo := api.NewAuthInfo() - if err := s.Convert(&curr.AuthInfo, newAuthInfo, 0); err != nil { - return err - } - (*out)[curr.Name] = newAuthInfo - } - - return nil - }, - func(in *map[string]*api.AuthInfo, out *[]NamedAuthInfo, s conversion.Scope) error { - allKeys := make([]string, 0, len(*in)) - for key := range *in { - allKeys = append(allKeys, key) - } - sort.Strings(allKeys) - - for _, key := range allKeys { - newAuthInfo := (*in)[key] - oldAuthInfo := &AuthInfo{} - if err := s.Convert(newAuthInfo, oldAuthInfo, 0); err != nil { - return err - } - - namedAuthInfo := NamedAuthInfo{key, *oldAuthInfo} - *out = append(*out, namedAuthInfo) - } - - return nil - }, - func(in *[]NamedContext, out *map[string]*api.Context, s conversion.Scope) error { - for _, curr := range *in { - newContext := api.NewContext() - if err := s.Convert(&curr.Context, newContext, 0); err != nil { - return err - } - (*out)[curr.Name] = newContext - } - - return nil - }, - func(in *map[string]*api.Context, out *[]NamedContext, s conversion.Scope) error { - allKeys := make([]string, 0, len(*in)) - for key := range *in { - allKeys = append(allKeys, key) - } - sort.Strings(allKeys) - - for _, key := range allKeys { - newContext := (*in)[key] - oldContext := &Context{} - if err := s.Convert(newContext, oldContext, 0); err != nil { - return err - } - - namedContext := NamedContext{key, *oldContext} - *out = append(*out, namedContext) - } - - return nil - }, - func(in *[]NamedExtension, out *map[string]runtime.Object, s conversion.Scope) error { - for _, curr := range *in { - var newExtension runtime.Object - if err := s.Convert(&curr.Extension, &newExtension, 0); err != nil { - return err - } - (*out)[curr.Name] = newExtension - } - - return nil - }, - func(in *map[string]runtime.Object, out *[]NamedExtension, s conversion.Scope) error { - allKeys := make([]string, 0, len(*in)) - for key := range *in { - allKeys = append(allKeys, key) - } - sort.Strings(allKeys) - - for _, key := range allKeys { - newExtension := (*in)[key] - oldExtension := &runtime.RawExtension{} - if err := s.Convert(newExtension, oldExtension, 0); err != nil { - return err - } - - namedExtension := NamedExtension{key, *oldExtension} - *out = append(*out, namedExtension) - } - - return nil - }, - ) -} diff --git a/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/v1/register.go b/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/v1/register.go deleted file mode 100644 index bc87706d..00000000 --- a/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/v1/register.go +++ /dev/null @@ -1,46 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1 - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -// SchemeGroupVersion is group version used to register these objects -// TODO this should be in the "kubeconfig" group -var SchemeGroupVersion = schema.GroupVersion{Group: "", Version: "v1"} - -var ( - SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, addConversionFuncs) - AddToScheme = SchemeBuilder.AddToScheme -) - -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &Config{}, - ) - return nil -} - -func (obj *Config) GetObjectKind() schema.ObjectKind { return obj } -func (obj *Config) SetGroupVersionKind(gvk schema.GroupVersionKind) { - obj.APIVersion, obj.Kind = gvk.ToAPIVersionAndKind() -} -func (obj *Config) GroupVersionKind() schema.GroupVersionKind { - return schema.FromAPIVersionAndKind(obj.APIVersion, obj.Kind) -} diff --git a/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/v1/types.go b/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/v1/types.go deleted file mode 100644 index a0777ba5..00000000 --- a/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/v1/types.go +++ /dev/null @@ -1,170 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1 - -import ( - "k8s.io/apimachinery/pkg/runtime" -) - -// Where possible, json tags match the cli argument names. -// Top level config objects and all values required for proper functioning are not "omitempty". Any truly optional piece of config is allowed to be omitted. - -// Config holds the information needed to build connect to remote kubernetes clusters as a given user -type Config struct { - // Legacy field from pkg/api/types.go TypeMeta. - // TODO(jlowdermilk): remove this after eliminating downstream dependencies. - // +optional - Kind string `json:"kind,omitempty"` - // DEPRECATED: APIVersion is the preferred api version for communicating with the kubernetes cluster (v1, v2, etc). - // Because a cluster can run multiple API groups and potentially multiple versions of each, it no longer makes sense to specify - // a single value for the cluster version. - // This field isn't really needed anyway, so we are deprecating it without replacement. - // It will be ignored if it is present. - // +optional - APIVersion string `json:"apiVersion,omitempty"` - // Preferences holds general information to be use for cli interactions - Preferences Preferences `json:"preferences"` - // Clusters is a map of referencable names to cluster configs - Clusters []NamedCluster `json:"clusters"` - // AuthInfos is a map of referencable names to user configs - AuthInfos []NamedAuthInfo `json:"users"` - // Contexts is a map of referencable names to context configs - Contexts []NamedContext `json:"contexts"` - // CurrentContext is the name of the context that you would like to use by default - CurrentContext string `json:"current-context"` - // Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields - // +optional - Extensions []NamedExtension `json:"extensions,omitempty"` -} - -type Preferences struct { - // +optional - Colors bool `json:"colors,omitempty"` - // Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields - // +optional - Extensions []NamedExtension `json:"extensions,omitempty"` -} - -// Cluster contains information about how to communicate with a kubernetes cluster -type Cluster struct { - // Server is the address of the kubernetes cluster (https://hostname:port). - Server string `json:"server"` - // APIVersion is the preferred api version for communicating with the kubernetes cluster (v1, v2, etc). - // +optional - APIVersion string `json:"api-version,omitempty"` - // InsecureSkipTLSVerify skips the validity check for the server's certificate. This will make your HTTPS connections insecure. - // +optional - InsecureSkipTLSVerify bool `json:"insecure-skip-tls-verify,omitempty"` - // CertificateAuthority is the path to a cert file for the certificate authority. - // +optional - CertificateAuthority string `json:"certificate-authority,omitempty"` - // CertificateAuthorityData contains PEM-encoded certificate authority certificates. Overrides CertificateAuthority - // +optional - CertificateAuthorityData []byte `json:"certificate-authority-data,omitempty"` - // Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields - // +optional - Extensions []NamedExtension `json:"extensions,omitempty"` -} - -// AuthInfo contains information that describes identity information. This is use to tell the kubernetes cluster who you are. -type AuthInfo struct { - // ClientCertificate is the path to a client cert file for TLS. - // +optional - ClientCertificate string `json:"client-certificate,omitempty"` - // ClientCertificateData contains PEM-encoded data from a client cert file for TLS. Overrides ClientCertificate - // +optional - ClientCertificateData []byte `json:"client-certificate-data,omitempty"` - // ClientKey is the path to a client key file for TLS. - // +optional - ClientKey string `json:"client-key,omitempty"` - // ClientKeyData contains PEM-encoded data from a client key file for TLS. Overrides ClientKey - // +optional - ClientKeyData []byte `json:"client-key-data,omitempty"` - // Token is the bearer token for authentication to the kubernetes cluster. - // +optional - Token string `json:"token,omitempty"` - // TokenFile is a pointer to a file that contains a bearer token (as described above). If both Token and TokenFile are present, Token takes precedence. - // +optional - TokenFile string `json:"tokenFile,omitempty"` - // Impersonate is the username to imperonate. The name matches the flag. - // +optional - Impersonate string `json:"as,omitempty"` - // Username is the username for basic authentication to the kubernetes cluster. - // +optional - Username string `json:"username,omitempty"` - // Password is the password for basic authentication to the kubernetes cluster. - // +optional - Password string `json:"password,omitempty"` - // AuthProvider specifies a custom authentication plugin for the kubernetes cluster. - // +optional - AuthProvider *AuthProviderConfig `json:"auth-provider,omitempty"` - // Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields - // +optional - Extensions []NamedExtension `json:"extensions,omitempty"` -} - -// Context is a tuple of references to a cluster (how do I communicate with a kubernetes cluster), a user (how do I identify myself), and a namespace (what subset of resources do I want to work with) -type Context struct { - // Cluster is the name of the cluster for this context - Cluster string `json:"cluster"` - // AuthInfo is the name of the authInfo for this context - AuthInfo string `json:"user"` - // Namespace is the default namespace to use on unspecified requests - // +optional - Namespace string `json:"namespace,omitempty"` - // Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields - // +optional - Extensions []NamedExtension `json:"extensions,omitempty"` -} - -// NamedCluster relates nicknames to cluster information -type NamedCluster struct { - // Name is the nickname for this Cluster - Name string `json:"name"` - // Cluster holds the cluster information - Cluster Cluster `json:"cluster"` -} - -// NamedContext relates nicknames to context information -type NamedContext struct { - // Name is the nickname for this Context - Name string `json:"name"` - // Context holds the context information - Context Context `json:"context"` -} - -// NamedAuthInfo relates nicknames to auth information -type NamedAuthInfo struct { - // Name is the nickname for this AuthInfo - Name string `json:"name"` - // AuthInfo holds the auth information - AuthInfo AuthInfo `json:"user"` -} - -// NamedExtension relates nicknames to extension information -type NamedExtension struct { - // Name is the nickname for this Extension - Name string `json:"name"` - // Extension holds the extension information - Extension runtime.RawExtension `json:"extension"` -} - -// AuthProviderConfig holds the configuration for a specified auth provider. -type AuthProviderConfig struct { - Name string `json:"name"` - Config map[string]string `json:"config"` -} diff --git a/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/auth_loaders.go b/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/auth_loaders.go deleted file mode 100644 index 1e7c1159..00000000 --- a/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/auth_loaders.go +++ /dev/null @@ -1,106 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package clientcmd - -import ( - "encoding/json" - "fmt" - "io" - "io/ioutil" - "os" - - "github.com/howeyc/gopass" - clientauth "k8s.io/kubernetes/pkg/client/unversioned/auth" -) - -// AuthLoaders are used to build clientauth.Info objects. -type AuthLoader interface { - // LoadAuth takes a path to a config file and can then do anything it needs in order to return a valid clientauth.Info - LoadAuth(path string) (*clientauth.Info, error) -} - -// default implementation of an AuthLoader -type defaultAuthLoader struct{} - -// LoadAuth for defaultAuthLoader simply delegates to clientauth.LoadFromFile -func (*defaultAuthLoader) LoadAuth(path string) (*clientauth.Info, error) { - return clientauth.LoadFromFile(path) -} - -type PromptingAuthLoader struct { - reader io.Reader -} - -// LoadAuth parses an AuthInfo object from a file path. It prompts user and creates file if it doesn't exist. -func (a *PromptingAuthLoader) LoadAuth(path string) (*clientauth.Info, error) { - // Prompt for user/pass and write a file if none exists. - if _, err := os.Stat(path); os.IsNotExist(err) { - authPtr, err := a.Prompt() - auth := *authPtr - if err != nil { - return nil, err - } - data, err := json.Marshal(auth) - if err != nil { - return &auth, err - } - err = ioutil.WriteFile(path, data, 0600) - return &auth, err - } - authPtr, err := clientauth.LoadFromFile(path) - if err != nil { - return nil, err - } - return authPtr, nil -} - -// Prompt pulls the user and password from a reader -func (a *PromptingAuthLoader) Prompt() (*clientauth.Info, error) { - var err error - auth := &clientauth.Info{} - auth.User, err = promptForString("Username", a.reader, true) - if err != nil { - return nil, err - } - auth.Password, err = promptForString("Password", nil, false) - if err != nil { - return nil, err - } - return auth, nil -} - -func promptForString(field string, r io.Reader, show bool) (result string, err error) { - fmt.Printf("Please enter %s: ", field) - if show { - _, err = fmt.Fscan(r, &result) - } else { - var data []byte - data, err = gopass.GetPasswdMasked() - result = string(data) - } - return result, err -} - -// NewPromptingAuthLoader is an AuthLoader that parses an AuthInfo object from a file path. It prompts user and creates file if it doesn't exist. -func NewPromptingAuthLoader(reader io.Reader) *PromptingAuthLoader { - return &PromptingAuthLoader{reader} -} - -// NewDefaultAuthLoader returns a default implementation of an AuthLoader that only reads from a config file -func NewDefaultAuthLoader() AuthLoader { - return &defaultAuthLoader{} -} diff --git a/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/client_config.go b/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/client_config.go deleted file mode 100644 index 8fd01923..00000000 --- a/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/client_config.go +++ /dev/null @@ -1,537 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package clientcmd - -import ( - "fmt" - "io" - "io/ioutil" - "net/url" - "os" - "strings" - - "github.com/golang/glog" - "github.com/imdario/mergo" - - "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/client/restclient" - clientauth "k8s.io/kubernetes/pkg/client/unversioned/auth" - clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api" -) - -var ( - // ClusterDefaults has the same behavior as the old EnvVar and DefaultCluster fields - // DEPRECATED will be replaced - ClusterDefaults = clientcmdapi.Cluster{Server: getDefaultServer()} - // DefaultClientConfig represents the legacy behavior of this package for defaulting - // DEPRECATED will be replace - DefaultClientConfig = DirectClientConfig{*clientcmdapi.NewConfig(), "", &ConfigOverrides{ - ClusterDefaults: ClusterDefaults, - }, nil, NewDefaultClientConfigLoadingRules(), promptedCredentials{}} -) - -// getDefaultServer returns a default setting for DefaultClientConfig -// DEPRECATED -func getDefaultServer() string { - if server := os.Getenv("KUBERNETES_MASTER"); len(server) > 0 { - return server - } - return "http://localhost:8080" -} - -// ClientConfig is used to make it easy to get an api server client -type ClientConfig interface { - // RawConfig returns the merged result of all overrides - RawConfig() (clientcmdapi.Config, error) - // ClientConfig returns a complete client config - ClientConfig() (*restclient.Config, error) - // Namespace returns the namespace resulting from the merged - // result of all overrides and a boolean indicating if it was - // overridden - Namespace() (string, bool, error) - // ConfigAccess returns the rules for loading/persisting the config. - ConfigAccess() ConfigAccess -} - -type PersistAuthProviderConfigForUser func(user string) restclient.AuthProviderConfigPersister - -type promptedCredentials struct { - username string - password string -} - -// DirectClientConfig is a ClientConfig interface that is backed by a clientcmdapi.Config, options overrides, and an optional fallbackReader for auth information -type DirectClientConfig struct { - config clientcmdapi.Config - contextName string - overrides *ConfigOverrides - fallbackReader io.Reader - configAccess ConfigAccess - // promptedCredentials store the credentials input by the user - promptedCredentials promptedCredentials -} - -// NewDefaultClientConfig creates a DirectClientConfig using the config.CurrentContext as the context name -func NewDefaultClientConfig(config clientcmdapi.Config, overrides *ConfigOverrides) ClientConfig { - return &DirectClientConfig{config, config.CurrentContext, overrides, nil, NewDefaultClientConfigLoadingRules(), promptedCredentials{}} -} - -// NewNonInteractiveClientConfig creates a DirectClientConfig using the passed context name and does not have a fallback reader for auth information -func NewNonInteractiveClientConfig(config clientcmdapi.Config, contextName string, overrides *ConfigOverrides, configAccess ConfigAccess) ClientConfig { - return &DirectClientConfig{config, contextName, overrides, nil, configAccess, promptedCredentials{}} -} - -// NewInteractiveClientConfig creates a DirectClientConfig using the passed context name and a reader in case auth information is not provided via files or flags -func NewInteractiveClientConfig(config clientcmdapi.Config, contextName string, overrides *ConfigOverrides, fallbackReader io.Reader, configAccess ConfigAccess) ClientConfig { - return &DirectClientConfig{config, contextName, overrides, fallbackReader, configAccess, promptedCredentials{}} -} - -func (config *DirectClientConfig) RawConfig() (clientcmdapi.Config, error) { - return config.config, nil -} - -// ClientConfig implements ClientConfig -func (config *DirectClientConfig) ClientConfig() (*restclient.Config, error) { - // check that getAuthInfo, getContext, and getCluster do not return an error. - // Do this before checking if the curent config is usable in the event that an - // AuthInfo, Context, or Cluster config with user-defined names are not found. - // This provides a user with the immediate cause for error if one is found - configAuthInfo, err := config.getAuthInfo() - if err != nil { - return nil, err - } - - _, err = config.getContext() - if err != nil { - return nil, err - } - - configClusterInfo, err := config.getCluster() - if err != nil { - return nil, err - } - - if err := config.ConfirmUsable(); err != nil { - return nil, err - } - - clientConfig := &restclient.Config{} - clientConfig.Host = configClusterInfo.Server - - if len(config.overrides.Timeout) > 0 { - timeout, err := ParseTimeout(config.overrides.Timeout) - if err != nil { - return nil, err - } - clientConfig.Timeout = timeout - } - - if u, err := url.ParseRequestURI(clientConfig.Host); err == nil && u.Opaque == "" && len(u.Path) > 1 { - u.RawQuery = "" - u.Fragment = "" - clientConfig.Host = u.String() - } - if len(configAuthInfo.Impersonate) > 0 { - clientConfig.Impersonate = restclient.ImpersonationConfig{UserName: configAuthInfo.Impersonate} - } - - // only try to read the auth information if we are secure - if restclient.IsConfigTransportTLS(*clientConfig) { - var err error - - // mergo is a first write wins for map value and a last writing wins for interface values - // NOTE: This behavior changed with https://github.com/imdario/mergo/commit/d304790b2ed594794496464fadd89d2bb266600a. - // Our mergo.Merge version is older than this change. - var persister restclient.AuthProviderConfigPersister - if config.configAccess != nil { - authInfoName, _ := config.getAuthInfoName() - persister = PersisterForUser(config.configAccess, authInfoName) - } - userAuthPartialConfig, err := config.getUserIdentificationPartialConfig(configAuthInfo, config.fallbackReader, persister) - if err != nil { - return nil, err - } - mergo.Merge(clientConfig, userAuthPartialConfig) - - serverAuthPartialConfig, err := getServerIdentificationPartialConfig(configAuthInfo, configClusterInfo) - if err != nil { - return nil, err - } - mergo.Merge(clientConfig, serverAuthPartialConfig) - } - - return clientConfig, nil -} - -// clientauth.Info object contain both user identification and server identification. We want different precedence orders for -// both, so we have to split the objects and merge them separately -// we want this order of precedence for the server identification -// 1. configClusterInfo (the final result of command line flags and merged .kubeconfig files) -// 2. configAuthInfo.auth-path (this file can contain information that conflicts with #1, and we want #1 to win the priority) -// 3. load the ~/.kubernetes_auth file as a default -func getServerIdentificationPartialConfig(configAuthInfo clientcmdapi.AuthInfo, configClusterInfo clientcmdapi.Cluster) (*restclient.Config, error) { - mergedConfig := &restclient.Config{} - - // configClusterInfo holds the information identify the server provided by .kubeconfig - configClientConfig := &restclient.Config{} - configClientConfig.CAFile = configClusterInfo.CertificateAuthority - configClientConfig.CAData = configClusterInfo.CertificateAuthorityData - configClientConfig.Insecure = configClusterInfo.InsecureSkipTLSVerify - mergo.Merge(mergedConfig, configClientConfig) - - return mergedConfig, nil -} - -// clientauth.Info object contain both user identification and server identification. We want different precedence orders for -// both, so we have to split the objects and merge them separately -// we want this order of precedence for user identifcation -// 1. configAuthInfo minus auth-path (the final result of command line flags and merged .kubeconfig files) -// 2. configAuthInfo.auth-path (this file can contain information that conflicts with #1, and we want #1 to win the priority) -// 3. if there is not enough information to idenfity the user, load try the ~/.kubernetes_auth file -// 4. if there is not enough information to identify the user, prompt if possible -func (config *DirectClientConfig) getUserIdentificationPartialConfig(configAuthInfo clientcmdapi.AuthInfo, fallbackReader io.Reader, persistAuthConfig restclient.AuthProviderConfigPersister) (*restclient.Config, error) { - mergedConfig := &restclient.Config{} - - // blindly overwrite existing values based on precedence - if len(configAuthInfo.Token) > 0 { - mergedConfig.BearerToken = configAuthInfo.Token - } else if len(configAuthInfo.TokenFile) > 0 { - tokenBytes, err := ioutil.ReadFile(configAuthInfo.TokenFile) - if err != nil { - return nil, err - } - mergedConfig.BearerToken = string(tokenBytes) - } - if len(configAuthInfo.Impersonate) > 0 { - mergedConfig.Impersonate = restclient.ImpersonationConfig{UserName: configAuthInfo.Impersonate} - } - if len(configAuthInfo.ClientCertificate) > 0 || len(configAuthInfo.ClientCertificateData) > 0 { - mergedConfig.CertFile = configAuthInfo.ClientCertificate - mergedConfig.CertData = configAuthInfo.ClientCertificateData - mergedConfig.KeyFile = configAuthInfo.ClientKey - mergedConfig.KeyData = configAuthInfo.ClientKeyData - } - if len(configAuthInfo.Username) > 0 || len(configAuthInfo.Password) > 0 { - mergedConfig.Username = configAuthInfo.Username - mergedConfig.Password = configAuthInfo.Password - } - if configAuthInfo.AuthProvider != nil { - mergedConfig.AuthProvider = configAuthInfo.AuthProvider - mergedConfig.AuthConfigPersister = persistAuthConfig - } - - // if there still isn't enough information to authenticate the user, try prompting - if !canIdentifyUser(*mergedConfig) && (fallbackReader != nil) { - if len(config.promptedCredentials.username) > 0 && len(config.promptedCredentials.password) > 0 { - mergedConfig.Username = config.promptedCredentials.username - mergedConfig.Password = config.promptedCredentials.password - return mergedConfig, nil - } - prompter := NewPromptingAuthLoader(fallbackReader) - promptedAuthInfo, err := prompter.Prompt() - if err != nil { - return nil, err - } - promptedConfig := makeUserIdentificationConfig(*promptedAuthInfo) - previouslyMergedConfig := mergedConfig - mergedConfig = &restclient.Config{} - mergo.Merge(mergedConfig, promptedConfig) - mergo.Merge(mergedConfig, previouslyMergedConfig) - config.promptedCredentials.username = mergedConfig.Username - config.promptedCredentials.password = mergedConfig.Password - } - - return mergedConfig, nil -} - -// makeUserIdentificationFieldsConfig returns a client.Config capable of being merged using mergo for only user identification information -func makeUserIdentificationConfig(info clientauth.Info) *restclient.Config { - config := &restclient.Config{} - config.Username = info.User - config.Password = info.Password - config.CertFile = info.CertFile - config.KeyFile = info.KeyFile - config.BearerToken = info.BearerToken - return config -} - -// makeUserIdentificationFieldsConfig returns a client.Config capable of being merged using mergo for only server identification information -func makeServerIdentificationConfig(info clientauth.Info) restclient.Config { - config := restclient.Config{} - config.CAFile = info.CAFile - if info.Insecure != nil { - config.Insecure = *info.Insecure - } - return config -} - -func canIdentifyUser(config restclient.Config) bool { - return len(config.Username) > 0 || - (len(config.CertFile) > 0 || len(config.CertData) > 0) || - len(config.BearerToken) > 0 || - config.AuthProvider != nil -} - -// Namespace implements ClientConfig -func (config *DirectClientConfig) Namespace() (string, bool, error) { - if err := config.ConfirmUsable(); err != nil { - return "", false, err - } - - configContext, err := config.getContext() - if err != nil { - return "", false, err - } - - if len(configContext.Namespace) == 0 { - return api.NamespaceDefault, false, nil - } - - overridden := false - if config.overrides != nil && config.overrides.Context.Namespace != "" { - overridden = true - } - return configContext.Namespace, overridden, nil -} - -// ConfigAccess implements ClientConfig -func (config *DirectClientConfig) ConfigAccess() ConfigAccess { - return config.configAccess -} - -// ConfirmUsable looks a particular context and determines if that particular part of the config is useable. There might still be errors in the config, -// but no errors in the sections requested or referenced. It does not return early so that it can find as many errors as possible. -func (config *DirectClientConfig) ConfirmUsable() error { - validationErrors := make([]error, 0) - - var contextName string - if len(config.contextName) != 0 { - contextName = config.contextName - } else { - contextName = config.config.CurrentContext - } - - if len(contextName) > 0 { - _, exists := config.config.Contexts[contextName] - if !exists { - validationErrors = append(validationErrors, &errContextNotFound{contextName}) - } - } - - authInfoName, _ := config.getAuthInfoName() - authInfo, _ := config.getAuthInfo() - validationErrors = append(validationErrors, validateAuthInfo(authInfoName, authInfo)...) - clusterName, _ := config.getClusterName() - cluster, _ := config.getCluster() - validationErrors = append(validationErrors, validateClusterInfo(clusterName, cluster)...) - // when direct client config is specified, and our only error is that no server is defined, we should - // return a standard "no config" error - if len(validationErrors) == 1 && validationErrors[0] == ErrEmptyCluster { - return newErrConfigurationInvalid([]error{ErrEmptyConfig}) - } - return newErrConfigurationInvalid(validationErrors) -} - -// getContextName returns the default, or user-set context name, and a boolean that indicates -// whether the default context name has been overwritten by a user-set flag, or left as its default value -func (config *DirectClientConfig) getContextName() (string, bool) { - if len(config.overrides.CurrentContext) != 0 { - return config.overrides.CurrentContext, true - } - if len(config.contextName) != 0 { - return config.contextName, false - } - - return config.config.CurrentContext, false -} - -// getAuthInfoName returns a string containing the current authinfo name for the current context, -// and a boolean indicating whether the default authInfo name is overwritten by a user-set flag, or -// left as its default value -func (config *DirectClientConfig) getAuthInfoName() (string, bool) { - if len(config.overrides.Context.AuthInfo) != 0 { - return config.overrides.Context.AuthInfo, true - } - context, _ := config.getContext() - return context.AuthInfo, false -} - -// getClusterName returns a string containing the default, or user-set cluster name, and a boolean -// indicating whether the default clusterName has been overwritten by a user-set flag, or left as -// its default value -func (config *DirectClientConfig) getClusterName() (string, bool) { - if len(config.overrides.Context.Cluster) != 0 { - return config.overrides.Context.Cluster, true - } - context, _ := config.getContext() - return context.Cluster, false -} - -// getContext returns the clientcmdapi.Context, or an error if a required context is not found. -func (config *DirectClientConfig) getContext() (clientcmdapi.Context, error) { - contexts := config.config.Contexts - contextName, required := config.getContextName() - - var mergedContext clientcmdapi.Context - if configContext, exists := contexts[contextName]; exists { - mergo.Merge(&mergedContext, configContext) - } else if required { - return clientcmdapi.Context{}, fmt.Errorf("context %q does not exist", contextName) - } - mergo.Merge(&mergedContext, config.overrides.Context) - - return mergedContext, nil -} - -// getAuthInfo returns the clientcmdapi.AuthInfo, or an error if a required auth info is not found. -func (config *DirectClientConfig) getAuthInfo() (clientcmdapi.AuthInfo, error) { - authInfos := config.config.AuthInfos - authInfoName, required := config.getAuthInfoName() - - var mergedAuthInfo clientcmdapi.AuthInfo - if configAuthInfo, exists := authInfos[authInfoName]; exists { - mergo.Merge(&mergedAuthInfo, configAuthInfo) - } else if required { - return clientcmdapi.AuthInfo{}, fmt.Errorf("auth info %q does not exist", authInfoName) - } - mergo.Merge(&mergedAuthInfo, config.overrides.AuthInfo) - - return mergedAuthInfo, nil -} - -// getCluster returns the clientcmdapi.Cluster, or an error if a required cluster is not found. -func (config *DirectClientConfig) getCluster() (clientcmdapi.Cluster, error) { - clusterInfos := config.config.Clusters - clusterInfoName, required := config.getClusterName() - - var mergedClusterInfo clientcmdapi.Cluster - mergo.Merge(&mergedClusterInfo, config.overrides.ClusterDefaults) - if configClusterInfo, exists := clusterInfos[clusterInfoName]; exists { - mergo.Merge(&mergedClusterInfo, configClusterInfo) - } else if required { - return clientcmdapi.Cluster{}, fmt.Errorf("cluster %q does not exist", clusterInfoName) - } - mergo.Merge(&mergedClusterInfo, config.overrides.ClusterInfo) - // An override of --insecure-skip-tls-verify=true and no accompanying CA/CA data should clear already-set CA/CA data - // otherwise, a kubeconfig containing a CA reference would return an error that "CA and insecure-skip-tls-verify couldn't both be set" - caLen := len(config.overrides.ClusterInfo.CertificateAuthority) - caDataLen := len(config.overrides.ClusterInfo.CertificateAuthorityData) - if config.overrides.ClusterInfo.InsecureSkipTLSVerify && caLen == 0 && caDataLen == 0 { - mergedClusterInfo.CertificateAuthority = "" - mergedClusterInfo.CertificateAuthorityData = nil - } - - return mergedClusterInfo, nil -} - -// inClusterClientConfig makes a config that will work from within a kubernetes cluster container environment. -// Can take options overrides for flags explicitly provided to the command inside the cluster container. -type inClusterClientConfig struct { - overrides *ConfigOverrides - inClusterConfigProvider func() (*restclient.Config, error) -} - -var _ ClientConfig = &inClusterClientConfig{} - -func (config *inClusterClientConfig) RawConfig() (clientcmdapi.Config, error) { - return clientcmdapi.Config{}, fmt.Errorf("inCluster environment config doesn't support multiple clusters") -} - -func (config *inClusterClientConfig) ClientConfig() (*restclient.Config, error) { - if config.inClusterConfigProvider == nil { - config.inClusterConfigProvider = restclient.InClusterConfig - } - - icc, err := config.inClusterConfigProvider() - if err != nil { - return nil, err - } - - // in-cluster configs only takes a host, token, or CA file - // if any of them were individually provided, ovewrite anything else - if config.overrides != nil { - if server := config.overrides.ClusterInfo.Server; len(server) > 0 { - icc.Host = server - } - if token := config.overrides.AuthInfo.Token; len(token) > 0 { - icc.BearerToken = token - } - if certificateAuthorityFile := config.overrides.ClusterInfo.CertificateAuthority; len(certificateAuthorityFile) > 0 { - icc.TLSClientConfig.CAFile = certificateAuthorityFile - } - } - - return icc, err -} - -func (config *inClusterClientConfig) Namespace() (string, bool, error) { - // This way assumes you've set the POD_NAMESPACE environment variable using the downward API. - // This check has to be done first for backwards compatibility with the way InClusterConfig was originally set up - if ns := os.Getenv("POD_NAMESPACE"); ns != "" { - return ns, true, nil - } - - // Fall back to the namespace associated with the service account token, if available - if data, err := ioutil.ReadFile("/var/run/secrets/kubernetes.io/serviceaccount/namespace"); err == nil { - if ns := strings.TrimSpace(string(data)); len(ns) > 0 { - return ns, true, nil - } - } - - return "default", false, nil -} - -func (config *inClusterClientConfig) ConfigAccess() ConfigAccess { - return NewDefaultClientConfigLoadingRules() -} - -// Possible returns true if loading an inside-kubernetes-cluster is possible. -func (config *inClusterClientConfig) Possible() bool { - fi, err := os.Stat("/var/run/secrets/kubernetes.io/serviceaccount/token") - return os.Getenv("KUBERNETES_SERVICE_HOST") != "" && - os.Getenv("KUBERNETES_SERVICE_PORT") != "" && - err == nil && !fi.IsDir() -} - -// BuildConfigFromFlags is a helper function that builds configs from a master -// url or a kubeconfig filepath. These are passed in as command line flags for cluster -// components. Warnings should reflect this usage. If neither masterUrl or kubeconfigPath -// are passed in we fallback to inClusterConfig. If inClusterConfig fails, we fallback -// to the default config. -func BuildConfigFromFlags(masterUrl, kubeconfigPath string) (*restclient.Config, error) { - if kubeconfigPath == "" && masterUrl == "" { - glog.Warningf("Neither --kubeconfig nor --master was specified. Using the inClusterConfig. This might not work.") - kubeconfig, err := restclient.InClusterConfig() - if err == nil { - return kubeconfig, nil - } - glog.Warning("error creating inClusterConfig, falling back to default config: ", err) - } - return NewNonInteractiveDeferredLoadingClientConfig( - &ClientConfigLoadingRules{ExplicitPath: kubeconfigPath}, - &ConfigOverrides{ClusterInfo: clientcmdapi.Cluster{Server: masterUrl}}).ClientConfig() -} - -// BuildConfigFromKubeconfigGetter is a helper function that builds configs from a master -// url and a kubeconfigGetter. -func BuildConfigFromKubeconfigGetter(masterUrl string, kubeconfigGetter KubeconfigGetter) (*restclient.Config, error) { - // TODO: We do not need a DeferredLoader here. Refactor code and see if we can use DirectClientConfig here. - cc := NewNonInteractiveDeferredLoadingClientConfig( - &ClientConfigGetter{kubeconfigGetter: kubeconfigGetter}, - &ConfigOverrides{ClusterInfo: clientcmdapi.Cluster{Server: masterUrl}}) - return cc.ClientConfig() -} diff --git a/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/client_config_test.go b/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/client_config_test.go deleted file mode 100644 index e42a9437..00000000 --- a/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/client_config_test.go +++ /dev/null @@ -1,506 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package clientcmd - -import ( - "io/ioutil" - "os" - "reflect" - "strings" - "testing" - - "github.com/imdario/mergo" - "k8s.io/kubernetes/pkg/client/restclient" - clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api" -) - -func TestOldMergoLib(t *testing.T) { - type T struct { - X string - } - dst := T{X: "one"} - src := T{X: "two"} - mergo.Merge(&dst, &src) - if dst.X != "two" { - // mergo.Merge changed in an incompatible way with - // - // https://github.com/imdario/mergo/commit/d304790b2ed594794496464fadd89d2bb266600a - // - // We have to stay with the old version which still does eager - // copying from src to dst in structs. - t.Errorf("mergo.Merge library found with incompatible, new behavior") - } -} - -func createValidTestConfig() *clientcmdapi.Config { - const ( - server = "https://anything.com:8080" - token = "the-token" - ) - - config := clientcmdapi.NewConfig() - config.Clusters["clean"] = &clientcmdapi.Cluster{ - Server: server, - } - config.AuthInfos["clean"] = &clientcmdapi.AuthInfo{ - Token: token, - } - config.Contexts["clean"] = &clientcmdapi.Context{ - Cluster: "clean", - AuthInfo: "clean", - } - config.CurrentContext = "clean" - - return config -} - -func createCAValidTestConfig() *clientcmdapi.Config { - - config := createValidTestConfig() - config.Clusters["clean"].CertificateAuthorityData = []byte{0, 0} - return config -} - -func TestInsecureOverridesCA(t *testing.T) { - config := createCAValidTestConfig() - clientBuilder := NewNonInteractiveClientConfig(*config, "clean", &ConfigOverrides{ - ClusterInfo: clientcmdapi.Cluster{ - InsecureSkipTLSVerify: true, - }, - }, nil) - - actualCfg, err := clientBuilder.ClientConfig() - if err != nil { - t.Errorf("Unexpected error: %v", err) - } - - matchBoolArg(true, actualCfg.Insecure, t) - matchStringArg("", actualCfg.TLSClientConfig.CAFile, t) - matchByteArg(nil, actualCfg.TLSClientConfig.CAData, t) -} - -func TestMergeContext(t *testing.T) { - const namespace = "overriden-namespace" - - config := createValidTestConfig() - clientBuilder := NewNonInteractiveClientConfig(*config, "clean", &ConfigOverrides{}, nil) - - _, overridden, err := clientBuilder.Namespace() - if err != nil { - t.Errorf("Unexpected error: %v", err) - } - - if overridden { - t.Error("Expected namespace to not be overridden") - } - - clientBuilder = NewNonInteractiveClientConfig(*config, "clean", &ConfigOverrides{ - Context: clientcmdapi.Context{ - Namespace: namespace, - }, - }, nil) - - actual, overridden, err := clientBuilder.Namespace() - if err != nil { - t.Errorf("Unexpected error: %v", err) - } - - if !overridden { - t.Error("Expected namespace to be overridden") - } - - matchStringArg(namespace, actual, t) -} - -func TestCertificateData(t *testing.T) { - caData := []byte("ca-data") - certData := []byte("cert-data") - keyData := []byte("key-data") - - config := clientcmdapi.NewConfig() - config.Clusters["clean"] = &clientcmdapi.Cluster{ - Server: "https://localhost:8443", - CertificateAuthorityData: caData, - } - config.AuthInfos["clean"] = &clientcmdapi.AuthInfo{ - ClientCertificateData: certData, - ClientKeyData: keyData, - } - config.Contexts["clean"] = &clientcmdapi.Context{ - Cluster: "clean", - AuthInfo: "clean", - } - config.CurrentContext = "clean" - - clientBuilder := NewNonInteractiveClientConfig(*config, "clean", &ConfigOverrides{}, nil) - - clientConfig, err := clientBuilder.ClientConfig() - if err != nil { - t.Fatalf("Unexpected error: %v", err) - } - - // Make sure cert data gets into config (will override file paths) - matchByteArg(caData, clientConfig.TLSClientConfig.CAData, t) - matchByteArg(certData, clientConfig.TLSClientConfig.CertData, t) - matchByteArg(keyData, clientConfig.TLSClientConfig.KeyData, t) -} - -func TestBasicAuthData(t *testing.T) { - username := "myuser" - password := "mypass" - - config := clientcmdapi.NewConfig() - config.Clusters["clean"] = &clientcmdapi.Cluster{ - Server: "https://localhost:8443", - } - config.AuthInfos["clean"] = &clientcmdapi.AuthInfo{ - Username: username, - Password: password, - } - config.Contexts["clean"] = &clientcmdapi.Context{ - Cluster: "clean", - AuthInfo: "clean", - } - config.CurrentContext = "clean" - - clientBuilder := NewNonInteractiveClientConfig(*config, "clean", &ConfigOverrides{}, nil) - - clientConfig, err := clientBuilder.ClientConfig() - if err != nil { - t.Fatalf("Unexpected error: %v", err) - } - - // Make sure basic auth data gets into config - matchStringArg(username, clientConfig.Username, t) - matchStringArg(password, clientConfig.Password, t) -} - -func TestBasicTokenFile(t *testing.T) { - token := "exampletoken" - f, err := ioutil.TempFile("", "tokenfile") - if err != nil { - t.Errorf("Unexpected error: %v", err) - return - } - defer os.Remove(f.Name()) - if err := ioutil.WriteFile(f.Name(), []byte(token), 0644); err != nil { - t.Errorf("Unexpected error: %v", err) - return - } - - config := clientcmdapi.NewConfig() - config.Clusters["clean"] = &clientcmdapi.Cluster{ - Server: "https://localhost:8443", - } - config.AuthInfos["clean"] = &clientcmdapi.AuthInfo{ - TokenFile: f.Name(), - } - config.Contexts["clean"] = &clientcmdapi.Context{ - Cluster: "clean", - AuthInfo: "clean", - } - config.CurrentContext = "clean" - - clientBuilder := NewNonInteractiveClientConfig(*config, "clean", &ConfigOverrides{}, nil) - - clientConfig, err := clientBuilder.ClientConfig() - if err != nil { - t.Fatalf("Unexpected error: %v", err) - } - - matchStringArg(token, clientConfig.BearerToken, t) -} - -func TestPrecedenceTokenFile(t *testing.T) { - token := "exampletoken" - f, err := ioutil.TempFile("", "tokenfile") - if err != nil { - t.Errorf("Unexpected error: %v", err) - return - } - defer os.Remove(f.Name()) - if err := ioutil.WriteFile(f.Name(), []byte(token), 0644); err != nil { - t.Errorf("Unexpected error: %v", err) - return - } - - config := clientcmdapi.NewConfig() - config.Clusters["clean"] = &clientcmdapi.Cluster{ - Server: "https://localhost:8443", - } - expectedToken := "expected" - config.AuthInfos["clean"] = &clientcmdapi.AuthInfo{ - Token: expectedToken, - TokenFile: f.Name(), - } - config.Contexts["clean"] = &clientcmdapi.Context{ - Cluster: "clean", - AuthInfo: "clean", - } - config.CurrentContext = "clean" - - clientBuilder := NewNonInteractiveClientConfig(*config, "clean", &ConfigOverrides{}, nil) - - clientConfig, err := clientBuilder.ClientConfig() - if err != nil { - t.Fatalf("Unexpected error: %v", err) - } - - matchStringArg(expectedToken, clientConfig.BearerToken, t) -} - -func TestCreateClean(t *testing.T) { - config := createValidTestConfig() - clientBuilder := NewNonInteractiveClientConfig(*config, "clean", &ConfigOverrides{}, nil) - - clientConfig, err := clientBuilder.ClientConfig() - if err != nil { - t.Errorf("Unexpected error: %v", err) - } - - matchStringArg(config.Clusters["clean"].Server, clientConfig.Host, t) - matchStringArg("", clientConfig.APIPath, t) - matchBoolArg(config.Clusters["clean"].InsecureSkipTLSVerify, clientConfig.Insecure, t) - matchStringArg(config.AuthInfos["clean"].Token, clientConfig.BearerToken, t) -} - -func TestCreateCleanWithPrefix(t *testing.T) { - tt := []struct { - server string - host string - }{ - {"https://anything.com:8080/foo/bar", "https://anything.com:8080/foo/bar"}, - {"http://anything.com:8080/foo/bar", "http://anything.com:8080/foo/bar"}, - {"http://anything.com:8080/foo/bar/", "http://anything.com:8080/foo/bar/"}, - {"http://anything.com:8080/", "http://anything.com:8080/"}, - {"http://anything.com:8080//", "http://anything.com:8080//"}, - {"anything.com:8080/foo/bar", "anything.com:8080/foo/bar"}, - {"anything.com:8080", "anything.com:8080"}, - {"anything.com", "anything.com"}, - {"anything", "anything"}, - } - - tt = append(tt, struct{ server, host string }{"", "http://localhost:8080"}) - - for _, tc := range tt { - config := createValidTestConfig() - - cleanConfig := config.Clusters["clean"] - cleanConfig.Server = tc.server - config.Clusters["clean"] = cleanConfig - - clientBuilder := NewNonInteractiveClientConfig(*config, "clean", &ConfigOverrides{ - ClusterDefaults: clientcmdapi.Cluster{Server: "http://localhost:8080"}, - }, nil) - - clientConfig, err := clientBuilder.ClientConfig() - if err != nil { - t.Fatalf("Unexpected error: %v", err) - } - - matchStringArg(tc.host, clientConfig.Host, t) - } -} - -func TestCreateCleanDefault(t *testing.T) { - config := createValidTestConfig() - clientBuilder := NewDefaultClientConfig(*config, &ConfigOverrides{}) - - clientConfig, err := clientBuilder.ClientConfig() - if err != nil { - t.Fatalf("Unexpected error: %v", err) - } - - matchStringArg(config.Clusters["clean"].Server, clientConfig.Host, t) - matchBoolArg(config.Clusters["clean"].InsecureSkipTLSVerify, clientConfig.Insecure, t) - matchStringArg(config.AuthInfos["clean"].Token, clientConfig.BearerToken, t) -} - -func TestCreateCleanDefaultCluster(t *testing.T) { - config := createValidTestConfig() - clientBuilder := NewDefaultClientConfig(*config, &ConfigOverrides{ - ClusterDefaults: clientcmdapi.Cluster{Server: "http://localhost:8080"}, - }) - - clientConfig, err := clientBuilder.ClientConfig() - if err != nil { - t.Fatalf("Unexpected error: %v", err) - } - - matchStringArg(config.Clusters["clean"].Server, clientConfig.Host, t) - matchBoolArg(config.Clusters["clean"].InsecureSkipTLSVerify, clientConfig.Insecure, t) - matchStringArg(config.AuthInfos["clean"].Token, clientConfig.BearerToken, t) -} - -func TestCreateMissingContextNoDefault(t *testing.T) { - const expectedErrorContains = "Context was not found for specified context" - config := createValidTestConfig() - clientBuilder := NewNonInteractiveClientConfig(*config, "not-present", &ConfigOverrides{}, nil) - - _, err := clientBuilder.ClientConfig() - if err == nil { - t.Fatalf("Unexpected error: %v", err) - } -} - -func TestCreateMissingContext(t *testing.T) { - const expectedErrorContains = "context was not found for specified context: not-present" - config := createValidTestConfig() - clientBuilder := NewNonInteractiveClientConfig(*config, "not-present", &ConfigOverrides{ - ClusterDefaults: clientcmdapi.Cluster{Server: "http://localhost:8080"}, - }, nil) - - _, err := clientBuilder.ClientConfig() - if err == nil { - t.Fatalf("Expected error: %v", expectedErrorContains) - } - if !strings.Contains(err.Error(), expectedErrorContains) { - t.Fatalf("Expected error: %v, but got %v", expectedErrorContains, err) - } -} - -func TestInClusterClientConfigPrecedence(t *testing.T) { - tt := []struct { - overrides *ConfigOverrides - }{ - { - overrides: &ConfigOverrides{ - ClusterInfo: clientcmdapi.Cluster{ - Server: "https://host-from-overrides.com", - }, - }, - }, - { - overrides: &ConfigOverrides{ - AuthInfo: clientcmdapi.AuthInfo{ - Token: "https://host-from-overrides.com", - }, - }, - }, - { - overrides: &ConfigOverrides{ - ClusterInfo: clientcmdapi.Cluster{ - CertificateAuthority: "/path/to/ca-from-overrides.crt", - }, - }, - }, - { - overrides: &ConfigOverrides{ - ClusterInfo: clientcmdapi.Cluster{ - Server: "https://host-from-overrides.com", - }, - AuthInfo: clientcmdapi.AuthInfo{ - Token: "https://host-from-overrides.com", - }, - }, - }, - { - overrides: &ConfigOverrides{ - ClusterInfo: clientcmdapi.Cluster{ - Server: "https://host-from-overrides.com", - CertificateAuthority: "/path/to/ca-from-overrides.crt", - }, - }, - }, - { - overrides: &ConfigOverrides{ - ClusterInfo: clientcmdapi.Cluster{ - CertificateAuthority: "/path/to/ca-from-overrides.crt", - }, - AuthInfo: clientcmdapi.AuthInfo{ - Token: "https://host-from-overrides.com", - }, - }, - }, - { - overrides: &ConfigOverrides{ - ClusterInfo: clientcmdapi.Cluster{ - Server: "https://host-from-overrides.com", - CertificateAuthority: "/path/to/ca-from-overrides.crt", - }, - AuthInfo: clientcmdapi.AuthInfo{ - Token: "https://host-from-overrides.com", - }, - }, - }, - { - overrides: &ConfigOverrides{}, - }, - } - - for _, tc := range tt { - expectedServer := "https://host-from-cluster.com" - expectedToken := "token-from-cluster" - expectedCAFile := "/path/to/ca-from-cluster.crt" - - icc := &inClusterClientConfig{ - inClusterConfigProvider: func() (*restclient.Config, error) { - return &restclient.Config{ - Host: expectedServer, - BearerToken: expectedToken, - TLSClientConfig: restclient.TLSClientConfig{ - CAFile: expectedCAFile, - }, - }, nil - }, - overrides: tc.overrides, - } - - clientConfig, err := icc.ClientConfig() - if err != nil { - t.Fatalf("Unxpected error: %v", err) - } - - if overridenServer := tc.overrides.ClusterInfo.Server; len(overridenServer) > 0 { - expectedServer = overridenServer - } - if overridenToken := tc.overrides.AuthInfo.Token; len(overridenToken) > 0 { - expectedToken = overridenToken - } - if overridenCAFile := tc.overrides.ClusterInfo.CertificateAuthority; len(overridenCAFile) > 0 { - expectedCAFile = overridenCAFile - } - - if clientConfig.Host != expectedServer { - t.Errorf("Expected server %v, got %v", expectedServer, clientConfig.Host) - } - if clientConfig.BearerToken != expectedToken { - t.Errorf("Expected token %v, got %v", expectedToken, clientConfig.BearerToken) - } - if clientConfig.TLSClientConfig.CAFile != expectedCAFile { - t.Errorf("Expected Certificate Authority %v, got %v", expectedCAFile, clientConfig.TLSClientConfig.CAFile) - } - } -} - -func matchBoolArg(expected, got bool, t *testing.T) { - if expected != got { - t.Errorf("Expected %v, got %v", expected, got) - } -} - -func matchStringArg(expected, got string, t *testing.T) { - if expected != got { - t.Errorf("Expected %q, got %q", expected, got) - } -} - -func matchByteArg(expected, got []byte, t *testing.T) { - if !reflect.DeepEqual(expected, got) { - t.Errorf("Expected %v, got %v", expected, got) - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/config.go b/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/config.go deleted file mode 100644 index 9df69a74..00000000 --- a/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/config.go +++ /dev/null @@ -1,472 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package clientcmd - -import ( - "errors" - "os" - "path" - "path/filepath" - "reflect" - "sort" - - "github.com/golang/glog" - - "k8s.io/kubernetes/pkg/client/restclient" - clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api" -) - -// ConfigAccess is used by subcommands and methods in this package to load and modify the appropriate config files -type ConfigAccess interface { - // GetLoadingPrecedence returns the slice of files that should be used for loading and inspecting the config - GetLoadingPrecedence() []string - // GetStartingConfig returns the config that subcommands should being operating against. It may or may not be merged depending on loading rules - GetStartingConfig() (*clientcmdapi.Config, error) - // GetDefaultFilename returns the name of the file you should write into (create if necessary), if you're trying to create a new stanza as opposed to updating an existing one. - GetDefaultFilename() string - // IsExplicitFile indicates whether or not this command is interested in exactly one file. This implementation only ever does that via a flag, but implementations that handle local, global, and flags may have more - IsExplicitFile() bool - // GetExplicitFile returns the particular file this command is operating against. This implementation only ever has one, but implementations that handle local, global, and flags may have more - GetExplicitFile() string -} - -type PathOptions struct { - // GlobalFile is the full path to the file to load as the global (final) option - GlobalFile string - // EnvVar is the env var name that points to the list of kubeconfig files to load - EnvVar string - // ExplicitFileFlag is the name of the flag to use for prompting for the kubeconfig file - ExplicitFileFlag string - - // GlobalFileSubpath is an optional value used for displaying help - GlobalFileSubpath string - - LoadingRules *ClientConfigLoadingRules -} - -func (o *PathOptions) GetEnvVarFiles() []string { - if len(o.EnvVar) == 0 { - return []string{} - } - - envVarValue := os.Getenv(o.EnvVar) - if len(envVarValue) == 0 { - return []string{} - } - - return filepath.SplitList(envVarValue) -} - -func (o *PathOptions) GetLoadingPrecedence() []string { - if envVarFiles := o.GetEnvVarFiles(); len(envVarFiles) > 0 { - return envVarFiles - } - - return []string{o.GlobalFile} -} - -func (o *PathOptions) GetStartingConfig() (*clientcmdapi.Config, error) { - // don't mutate the original - loadingRules := *o.LoadingRules - loadingRules.Precedence = o.GetLoadingPrecedence() - - clientConfig := NewNonInteractiveDeferredLoadingClientConfig(&loadingRules, &ConfigOverrides{}) - rawConfig, err := clientConfig.RawConfig() - if os.IsNotExist(err) { - return clientcmdapi.NewConfig(), nil - } - if err != nil { - return nil, err - } - - return &rawConfig, nil -} - -func (o *PathOptions) GetDefaultFilename() string { - if o.IsExplicitFile() { - return o.GetExplicitFile() - } - - if envVarFiles := o.GetEnvVarFiles(); len(envVarFiles) > 0 { - if len(envVarFiles) == 1 { - return envVarFiles[0] - } - - // if any of the envvar files already exists, return it - for _, envVarFile := range envVarFiles { - if _, err := os.Stat(envVarFile); err == nil { - return envVarFile - } - } - - // otherwise, return the last one in the list - return envVarFiles[len(envVarFiles)-1] - } - - return o.GlobalFile -} - -func (o *PathOptions) IsExplicitFile() bool { - if len(o.LoadingRules.ExplicitPath) > 0 { - return true - } - - return false -} - -func (o *PathOptions) GetExplicitFile() string { - return o.LoadingRules.ExplicitPath -} - -func NewDefaultPathOptions() *PathOptions { - ret := &PathOptions{ - GlobalFile: RecommendedHomeFile, - EnvVar: RecommendedConfigPathEnvVar, - ExplicitFileFlag: RecommendedConfigPathFlag, - - GlobalFileSubpath: path.Join(RecommendedHomeDir, RecommendedFileName), - - LoadingRules: NewDefaultClientConfigLoadingRules(), - } - ret.LoadingRules.DoNotResolvePaths = true - - return ret -} - -// ModifyConfig takes a Config object, iterates through Clusters, AuthInfos, and Contexts, uses the LocationOfOrigin if specified or -// uses the default destination file to write the results into. This results in multiple file reads, but it's very easy to follow. -// Preferences and CurrentContext should always be set in the default destination file. Since we can't distinguish between empty and missing values -// (no nil strings), we're forced have separate handling for them. In the kubeconfig cases, newConfig should have at most one difference, -// that means that this code will only write into a single file. If you want to relativizePaths, you must provide a fully qualified path in any -// modified element. -func ModifyConfig(configAccess ConfigAccess, newConfig clientcmdapi.Config, relativizePaths bool) error { - possibleSources := configAccess.GetLoadingPrecedence() - // sort the possible kubeconfig files so we always "lock" in the same order - // to avoid deadlock (note: this can fail w/ symlinks, but... come on). - sort.Strings(possibleSources) - for _, filename := range possibleSources { - if err := lockFile(filename); err != nil { - return err - } - defer unlockFile(filename) - } - - startingConfig, err := configAccess.GetStartingConfig() - if err != nil { - return err - } - - // We need to find all differences, locate their original files, read a partial config to modify only that stanza and write out the file. - // Special case the test for current context and preferences since those always write to the default file. - if reflect.DeepEqual(*startingConfig, newConfig) { - // nothing to do - return nil - } - - if startingConfig.CurrentContext != newConfig.CurrentContext { - if err := writeCurrentContext(configAccess, newConfig.CurrentContext); err != nil { - return err - } - } - - if !reflect.DeepEqual(startingConfig.Preferences, newConfig.Preferences) { - if err := writePreferences(configAccess, newConfig.Preferences); err != nil { - return err - } - } - - // Search every cluster, authInfo, and context. First from new to old for differences, then from old to new for deletions - for key, cluster := range newConfig.Clusters { - startingCluster, exists := startingConfig.Clusters[key] - if !reflect.DeepEqual(cluster, startingCluster) || !exists { - destinationFile := cluster.LocationOfOrigin - if len(destinationFile) == 0 { - destinationFile = configAccess.GetDefaultFilename() - } - - configToWrite, err := getConfigFromFile(destinationFile) - if err != nil { - return err - } - t := *cluster - - configToWrite.Clusters[key] = &t - configToWrite.Clusters[key].LocationOfOrigin = destinationFile - if relativizePaths { - if err := RelativizeClusterLocalPaths(configToWrite.Clusters[key]); err != nil { - return err - } - } - - if err := WriteToFile(*configToWrite, destinationFile); err != nil { - return err - } - } - } - - for key, context := range newConfig.Contexts { - startingContext, exists := startingConfig.Contexts[key] - if !reflect.DeepEqual(context, startingContext) || !exists { - destinationFile := context.LocationOfOrigin - if len(destinationFile) == 0 { - destinationFile = configAccess.GetDefaultFilename() - } - - configToWrite, err := getConfigFromFile(destinationFile) - if err != nil { - return err - } - configToWrite.Contexts[key] = context - - if err := WriteToFile(*configToWrite, destinationFile); err != nil { - return err - } - } - } - - for key, authInfo := range newConfig.AuthInfos { - startingAuthInfo, exists := startingConfig.AuthInfos[key] - if !reflect.DeepEqual(authInfo, startingAuthInfo) || !exists { - destinationFile := authInfo.LocationOfOrigin - if len(destinationFile) == 0 { - destinationFile = configAccess.GetDefaultFilename() - } - - configToWrite, err := getConfigFromFile(destinationFile) - if err != nil { - return err - } - t := *authInfo - configToWrite.AuthInfos[key] = &t - configToWrite.AuthInfos[key].LocationOfOrigin = destinationFile - if relativizePaths { - if err := RelativizeAuthInfoLocalPaths(configToWrite.AuthInfos[key]); err != nil { - return err - } - } - - if err := WriteToFile(*configToWrite, destinationFile); err != nil { - return err - } - } - } - - for key, cluster := range startingConfig.Clusters { - if _, exists := newConfig.Clusters[key]; !exists { - destinationFile := cluster.LocationOfOrigin - if len(destinationFile) == 0 { - destinationFile = configAccess.GetDefaultFilename() - } - - configToWrite, err := getConfigFromFile(destinationFile) - if err != nil { - return err - } - delete(configToWrite.Clusters, key) - - if err := WriteToFile(*configToWrite, destinationFile); err != nil { - return err - } - } - } - - for key, context := range startingConfig.Contexts { - if _, exists := newConfig.Contexts[key]; !exists { - destinationFile := context.LocationOfOrigin - if len(destinationFile) == 0 { - destinationFile = configAccess.GetDefaultFilename() - } - - configToWrite, err := getConfigFromFile(destinationFile) - if err != nil { - return err - } - delete(configToWrite.Contexts, key) - - if err := WriteToFile(*configToWrite, destinationFile); err != nil { - return err - } - } - } - - for key, authInfo := range startingConfig.AuthInfos { - if _, exists := newConfig.AuthInfos[key]; !exists { - destinationFile := authInfo.LocationOfOrigin - if len(destinationFile) == 0 { - destinationFile = configAccess.GetDefaultFilename() - } - - configToWrite, err := getConfigFromFile(destinationFile) - if err != nil { - return err - } - delete(configToWrite.AuthInfos, key) - - if err := WriteToFile(*configToWrite, destinationFile); err != nil { - return err - } - } - } - - return nil -} - -func PersisterForUser(configAccess ConfigAccess, user string) restclient.AuthProviderConfigPersister { - return &persister{configAccess, user} -} - -type persister struct { - configAccess ConfigAccess - user string -} - -func (p *persister) Persist(config map[string]string) error { - newConfig, err := p.configAccess.GetStartingConfig() - if err != nil { - return err - } - authInfo, ok := newConfig.AuthInfos[p.user] - if ok && authInfo.AuthProvider != nil { - authInfo.AuthProvider.Config = config - ModifyConfig(p.configAccess, *newConfig, false) - } - return nil -} - -// writeCurrentContext takes three possible paths. -// If newCurrentContext is the same as the startingConfig's current context, then we exit. -// If newCurrentContext has a value, then that value is written into the default destination file. -// If newCurrentContext is empty, then we find the config file that is setting the CurrentContext and clear the value from that file -func writeCurrentContext(configAccess ConfigAccess, newCurrentContext string) error { - if startingConfig, err := configAccess.GetStartingConfig(); err != nil { - return err - } else if startingConfig.CurrentContext == newCurrentContext { - return nil - } - - if configAccess.IsExplicitFile() { - file := configAccess.GetExplicitFile() - currConfig, err := getConfigFromFile(file) - if err != nil { - return err - } - currConfig.CurrentContext = newCurrentContext - if err := WriteToFile(*currConfig, file); err != nil { - return err - } - - return nil - } - - if len(newCurrentContext) > 0 { - destinationFile := configAccess.GetDefaultFilename() - config, err := getConfigFromFile(destinationFile) - if err != nil { - return err - } - config.CurrentContext = newCurrentContext - - if err := WriteToFile(*config, destinationFile); err != nil { - return err - } - - return nil - } - - // we're supposed to be clearing the current context. We need to find the first spot in the chain that is setting it and clear it - for _, file := range configAccess.GetLoadingPrecedence() { - if _, err := os.Stat(file); err == nil { - currConfig, err := getConfigFromFile(file) - if err != nil { - return err - } - - if len(currConfig.CurrentContext) > 0 { - currConfig.CurrentContext = newCurrentContext - if err := WriteToFile(*currConfig, file); err != nil { - return err - } - - return nil - } - } - } - - return errors.New("no config found to write context") -} - -func writePreferences(configAccess ConfigAccess, newPrefs clientcmdapi.Preferences) error { - if startingConfig, err := configAccess.GetStartingConfig(); err != nil { - return err - } else if reflect.DeepEqual(startingConfig.Preferences, newPrefs) { - return nil - } - - if configAccess.IsExplicitFile() { - file := configAccess.GetExplicitFile() - currConfig, err := getConfigFromFile(file) - if err != nil { - return err - } - currConfig.Preferences = newPrefs - if err := WriteToFile(*currConfig, file); err != nil { - return err - } - - return nil - } - - for _, file := range configAccess.GetLoadingPrecedence() { - currConfig, err := getConfigFromFile(file) - if err != nil { - return err - } - - if !reflect.DeepEqual(currConfig.Preferences, newPrefs) { - currConfig.Preferences = newPrefs - if err := WriteToFile(*currConfig, file); err != nil { - return err - } - - return nil - } - } - - return errors.New("no config found to write preferences") -} - -// getConfigFromFile tries to read a kubeconfig file and if it can't, returns an error. One exception, missing files result in empty configs, not an error. -func getConfigFromFile(filename string) (*clientcmdapi.Config, error) { - config, err := LoadFromFile(filename) - if err != nil && !os.IsNotExist(err) { - return nil, err - } - if config == nil { - config = clientcmdapi.NewConfig() - } - return config, nil -} - -// GetConfigFromFileOrDie tries to read a kubeconfig file and if it can't, it calls exit. One exception, missing files result in empty configs, not an exit -func GetConfigFromFileOrDie(filename string) *clientcmdapi.Config { - config, err := getConfigFromFile(filename) - if err != nil { - glog.FatalDepth(1, err) - } - - return config -} diff --git a/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/doc.go b/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/doc.go deleted file mode 100644 index 0c5979f1..00000000 --- a/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/doc.go +++ /dev/null @@ -1,37 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -/* -Package clientcmd provides one stop shopping for building a working client from a fixed config, -from a .kubeconfig file, from command line flags, or from any merged combination. - -Sample usage from merged .kubeconfig files (local directory, home directory) - - loadingRules := clientcmd.NewDefaultClientConfigLoadingRules() - // if you want to change the loading rules (which files in which order), you can do so here - - configOverrides := &clientcmd.ConfigOverrides{} - // if you want to change override values or bind them to flags, there are methods to help you - - kubeConfig := clientcmd.NewNonInteractiveDeferredLoadingClientConfig(loadingRules, configOverrides) - config, err := kubeConfig.ClientConfig() - if err != nil { - // Do something - } - client, err := metav1.New(config) - // ... -*/ -package clientcmd // import "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" diff --git a/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/helpers.go b/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/helpers.go deleted file mode 100644 index b609d1a7..00000000 --- a/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/helpers.go +++ /dev/null @@ -1,35 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package clientcmd - -import ( - "fmt" - "strconv" - "time" -) - -// ParseTimeout returns a parsed duration from a string -// A duration string value must be a positive integer, optionally followed by a corresponding time unit (s|m|h). -func ParseTimeout(duration string) (time.Duration, error) { - if i, err := strconv.ParseInt(duration, 10, 64); err == nil && i >= 0 { - return (time.Duration(i) * time.Second), nil - } - if requestTimeout, err := time.ParseDuration(duration); err == nil { - return requestTimeout, nil - } - return 0, fmt.Errorf("Invalid timeout value. Timeout must be a single integer in seconds, or an integer followed by a corresponding time unit (e.g. 1s | 2m | 3h)") -} diff --git a/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/loader.go b/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/loader.go deleted file mode 100644 index 822e0aff..00000000 --- a/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/loader.go +++ /dev/null @@ -1,609 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package clientcmd - -import ( - "fmt" - "io" - "io/ioutil" - "os" - "path" - "path/filepath" - "reflect" - goruntime "runtime" - "strings" - - "github.com/golang/glog" - "github.com/imdario/mergo" - - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - utilerrors "k8s.io/apimachinery/pkg/util/errors" - "k8s.io/kubernetes/pkg/client/restclient" - clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api" - clientcmdlatest "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/latest" - "k8s.io/kubernetes/pkg/util/homedir" -) - -const ( - RecommendedConfigPathFlag = "kubeconfig" - RecommendedConfigPathEnvVar = "KUBECONFIG" - RecommendedHomeDir = ".kube" - RecommendedFileName = "config" - RecommendedSchemaName = "schema" -) - -var RecommendedHomeFile = path.Join(homedir.HomeDir(), RecommendedHomeDir, RecommendedFileName) -var RecommendedSchemaFile = path.Join(homedir.HomeDir(), RecommendedHomeDir, RecommendedSchemaName) - -// currentMigrationRules returns a map that holds the history of recommended home directories used in previous versions. -// Any future changes to RecommendedHomeFile and related are expected to add a migration rule here, in order to make -// sure existing config files are migrated to their new locations properly. -func currentMigrationRules() map[string]string { - oldRecommendedHomeFile := path.Join(os.Getenv("HOME"), "/.kube/.kubeconfig") - oldRecommendedWindowsHomeFile := path.Join(os.Getenv("HOME"), RecommendedHomeDir, RecommendedFileName) - - migrationRules := map[string]string{} - migrationRules[RecommendedHomeFile] = oldRecommendedHomeFile - if goruntime.GOOS == "windows" { - migrationRules[RecommendedHomeFile] = oldRecommendedWindowsHomeFile - } - return migrationRules -} - -type ClientConfigLoader interface { - ConfigAccess - // IsDefaultConfig returns true if the returned config matches the defaults. - IsDefaultConfig(*restclient.Config) bool - // Load returns the latest config - Load() (*clientcmdapi.Config, error) -} - -type KubeconfigGetter func() (*clientcmdapi.Config, error) - -type ClientConfigGetter struct { - kubeconfigGetter KubeconfigGetter -} - -// ClientConfigGetter implements the ClientConfigLoader interface. -var _ ClientConfigLoader = &ClientConfigGetter{} - -func (g *ClientConfigGetter) Load() (*clientcmdapi.Config, error) { - return g.kubeconfigGetter() -} - -func (g *ClientConfigGetter) GetLoadingPrecedence() []string { - return nil -} -func (g *ClientConfigGetter) GetStartingConfig() (*clientcmdapi.Config, error) { - return g.kubeconfigGetter() -} -func (g *ClientConfigGetter) GetDefaultFilename() string { - return "" -} -func (g *ClientConfigGetter) IsExplicitFile() bool { - return false -} -func (g *ClientConfigGetter) GetExplicitFile() string { - return "" -} -func (g *ClientConfigGetter) IsDefaultConfig(config *restclient.Config) bool { - return false -} - -// ClientConfigLoadingRules is an ExplicitPath and string slice of specific locations that are used for merging together a Config -// Callers can put the chain together however they want, but we'd recommend: -// EnvVarPathFiles if set (a list of files if set) OR the HomeDirectoryPath -// ExplicitPath is special, because if a user specifically requests a certain file be used and error is reported if thie file is not present -type ClientConfigLoadingRules struct { - ExplicitPath string - Precedence []string - - // MigrationRules is a map of destination files to source files. If a destination file is not present, then the source file is checked. - // If the source file is present, then it is copied to the destination file BEFORE any further loading happens. - MigrationRules map[string]string - - // DoNotResolvePaths indicates whether or not to resolve paths with respect to the originating files. This is phrased as a negative so - // that a default object that doesn't set this will usually get the behavior it wants. - DoNotResolvePaths bool - - // DefaultClientConfig is an optional field indicating what rules to use to calculate a default configuration. - // This should match the overrides passed in to ClientConfig loader. - DefaultClientConfig ClientConfig -} - -// ClientConfigLoadingRules implements the ClientConfigLoader interface. -var _ ClientConfigLoader = &ClientConfigLoadingRules{} - -// NewDefaultClientConfigLoadingRules returns a ClientConfigLoadingRules object with default fields filled in. You are not required to -// use this constructor -func NewDefaultClientConfigLoadingRules() *ClientConfigLoadingRules { - chain := []string{} - - envVarFiles := os.Getenv(RecommendedConfigPathEnvVar) - if len(envVarFiles) != 0 { - chain = append(chain, filepath.SplitList(envVarFiles)...) - - } else { - chain = append(chain, RecommendedHomeFile) - } - - return &ClientConfigLoadingRules{ - Precedence: chain, - MigrationRules: currentMigrationRules(), - } -} - -// Load starts by running the MigrationRules and then -// takes the loading rules and returns a Config object based on following rules. -// if the ExplicitPath, return the unmerged explicit file -// Otherwise, return a merged config based on the Precedence slice -// A missing ExplicitPath file produces an error. Empty filenames or other missing files are ignored. -// Read errors or files with non-deserializable content produce errors. -// The first file to set a particular map key wins and map key's value is never changed. -// BUT, if you set a struct value that is NOT contained inside of map, the value WILL be changed. -// This results in some odd looking logic to merge in one direction, merge in the other, and then merge the two. -// It also means that if two files specify a "red-user", only values from the first file's red-user are used. Even -// non-conflicting entries from the second file's "red-user" are discarded. -// Relative paths inside of the .kubeconfig files are resolved against the .kubeconfig file's parent folder -// and only absolute file paths are returned. -func (rules *ClientConfigLoadingRules) Load() (*clientcmdapi.Config, error) { - if err := rules.Migrate(); err != nil { - return nil, err - } - - errlist := []error{} - - kubeConfigFiles := []string{} - - // Make sure a file we were explicitly told to use exists - if len(rules.ExplicitPath) > 0 { - if _, err := os.Stat(rules.ExplicitPath); os.IsNotExist(err) { - return nil, err - } - kubeConfigFiles = append(kubeConfigFiles, rules.ExplicitPath) - - } else { - kubeConfigFiles = append(kubeConfigFiles, rules.Precedence...) - } - - kubeconfigs := []*clientcmdapi.Config{} - // read and cache the config files so that we only look at them once - for _, filename := range kubeConfigFiles { - if len(filename) == 0 { - // no work to do - continue - } - - config, err := LoadFromFile(filename) - if os.IsNotExist(err) { - // skip missing files - continue - } - if err != nil { - errlist = append(errlist, fmt.Errorf("Error loading config file \"%s\": %v", filename, err)) - continue - } - - kubeconfigs = append(kubeconfigs, config) - } - - // first merge all of our maps - mapConfig := clientcmdapi.NewConfig() - - for _, kubeconfig := range kubeconfigs { - mergo.Merge(mapConfig, kubeconfig) - } - - // merge all of the struct values in the reverse order so that priority is given correctly - // errors are not added to the list the second time - nonMapConfig := clientcmdapi.NewConfig() - for i := len(kubeconfigs) - 1; i >= 0; i-- { - kubeconfig := kubeconfigs[i] - mergo.Merge(nonMapConfig, kubeconfig) - } - - // since values are overwritten, but maps values are not, we can merge the non-map config on top of the map config and - // get the values we expect. - config := clientcmdapi.NewConfig() - mergo.Merge(config, mapConfig) - mergo.Merge(config, nonMapConfig) - - if rules.ResolvePaths() { - if err := ResolveLocalPaths(config); err != nil { - errlist = append(errlist, err) - } - } - return config, utilerrors.NewAggregate(errlist) -} - -// Migrate uses the MigrationRules map. If a destination file is not present, then the source file is checked. -// If the source file is present, then it is copied to the destination file BEFORE any further loading happens. -func (rules *ClientConfigLoadingRules) Migrate() error { - if rules.MigrationRules == nil { - return nil - } - - for destination, source := range rules.MigrationRules { - if _, err := os.Stat(destination); err == nil { - // if the destination already exists, do nothing - continue - } else if os.IsPermission(err) { - // if we can't access the file, skip it - continue - } else if !os.IsNotExist(err) { - // if we had an error other than non-existence, fail - return err - } - - if sourceInfo, err := os.Stat(source); err != nil { - if os.IsNotExist(err) || os.IsPermission(err) { - // if the source file doesn't exist or we can't access it, there's no work to do. - continue - } - - // if we had an error other than non-existence, fail - return err - } else if sourceInfo.IsDir() { - return fmt.Errorf("cannot migrate %v to %v because it is a directory", source, destination) - } - - in, err := os.Open(source) - if err != nil { - return err - } - defer in.Close() - out, err := os.Create(destination) - if err != nil { - return err - } - defer out.Close() - - if _, err = io.Copy(out, in); err != nil { - return err - } - } - - return nil -} - -// GetLoadingPrecedence implements ConfigAccess -func (rules *ClientConfigLoadingRules) GetLoadingPrecedence() []string { - return rules.Precedence -} - -// GetStartingConfig implements ConfigAccess -func (rules *ClientConfigLoadingRules) GetStartingConfig() (*clientcmdapi.Config, error) { - clientConfig := NewNonInteractiveDeferredLoadingClientConfig(rules, &ConfigOverrides{}) - rawConfig, err := clientConfig.RawConfig() - if os.IsNotExist(err) { - return clientcmdapi.NewConfig(), nil - } - if err != nil { - return nil, err - } - - return &rawConfig, nil -} - -// GetDefaultFilename implements ConfigAccess -func (rules *ClientConfigLoadingRules) GetDefaultFilename() string { - // Explicit file if we have one. - if rules.IsExplicitFile() { - return rules.GetExplicitFile() - } - // Otherwise, first existing file from precedence. - for _, filename := range rules.GetLoadingPrecedence() { - if _, err := os.Stat(filename); err == nil { - return filename - } - } - // If none exists, use the first from precedence. - if len(rules.Precedence) > 0 { - return rules.Precedence[0] - } - return "" -} - -// IsExplicitFile implements ConfigAccess -func (rules *ClientConfigLoadingRules) IsExplicitFile() bool { - return len(rules.ExplicitPath) > 0 -} - -// GetExplicitFile implements ConfigAccess -func (rules *ClientConfigLoadingRules) GetExplicitFile() string { - return rules.ExplicitPath -} - -// IsDefaultConfig returns true if the provided configuration matches the default -func (rules *ClientConfigLoadingRules) IsDefaultConfig(config *restclient.Config) bool { - if rules.DefaultClientConfig == nil { - return false - } - defaultConfig, err := rules.DefaultClientConfig.ClientConfig() - if err != nil { - return false - } - return reflect.DeepEqual(config, defaultConfig) -} - -// LoadFromFile takes a filename and deserializes the contents into Config object -func LoadFromFile(filename string) (*clientcmdapi.Config, error) { - kubeconfigBytes, err := ioutil.ReadFile(filename) - if err != nil { - return nil, err - } - config, err := Load(kubeconfigBytes) - if err != nil { - return nil, err - } - glog.V(6).Infoln("Config loaded from file", filename) - - // set LocationOfOrigin on every Cluster, User, and Context - for key, obj := range config.AuthInfos { - obj.LocationOfOrigin = filename - config.AuthInfos[key] = obj - } - for key, obj := range config.Clusters { - obj.LocationOfOrigin = filename - config.Clusters[key] = obj - } - for key, obj := range config.Contexts { - obj.LocationOfOrigin = filename - config.Contexts[key] = obj - } - - if config.AuthInfos == nil { - config.AuthInfos = map[string]*clientcmdapi.AuthInfo{} - } - if config.Clusters == nil { - config.Clusters = map[string]*clientcmdapi.Cluster{} - } - if config.Contexts == nil { - config.Contexts = map[string]*clientcmdapi.Context{} - } - - return config, nil -} - -// Load takes a byte slice and deserializes the contents into Config object. -// Encapsulates deserialization without assuming the source is a file. -func Load(data []byte) (*clientcmdapi.Config, error) { - config := clientcmdapi.NewConfig() - // if there's no data in a file, return the default object instead of failing (DecodeInto reject empty input) - if len(data) == 0 { - return config, nil - } - decoded, _, err := clientcmdlatest.Codec.Decode(data, &schema.GroupVersionKind{Version: clientcmdlatest.Version, Kind: "Config"}, config) - if err != nil { - return nil, err - } - return decoded.(*clientcmdapi.Config), nil -} - -// WriteToFile serializes the config to yaml and writes it out to a file. If not present, it creates the file with the mode 0600. If it is present -// it stomps the contents -func WriteToFile(config clientcmdapi.Config, filename string) error { - content, err := Write(config) - if err != nil { - return err - } - dir := filepath.Dir(filename) - if _, err := os.Stat(dir); os.IsNotExist(err) { - if err = os.MkdirAll(dir, 0755); err != nil { - return err - } - } - - if err := ioutil.WriteFile(filename, content, 0600); err != nil { - return err - } - return nil -} - -func lockFile(filename string) error { - // TODO: find a way to do this with actual file locks. Will - // probably need seperate solution for windows and linux. - - // Make sure the dir exists before we try to create a lock file. - dir := filepath.Dir(filename) - if _, err := os.Stat(dir); os.IsNotExist(err) { - if err = os.MkdirAll(dir, 0755); err != nil { - return err - } - } - f, err := os.OpenFile(lockName(filename), os.O_CREATE|os.O_EXCL, 0) - if err != nil { - return err - } - f.Close() - return nil -} - -func unlockFile(filename string) error { - return os.Remove(lockName(filename)) -} - -func lockName(filename string) string { - return filename + ".lock" -} - -// Write serializes the config to yaml. -// Encapsulates serialization without assuming the destination is a file. -func Write(config clientcmdapi.Config) ([]byte, error) { - return runtime.Encode(clientcmdlatest.Codec, &config) -} - -func (rules ClientConfigLoadingRules) ResolvePaths() bool { - return !rules.DoNotResolvePaths -} - -// ResolveLocalPaths resolves all relative paths in the config object with respect to the stanza's LocationOfOrigin -// this cannot be done directly inside of LoadFromFile because doing so there would make it impossible to load a file without -// modification of its contents. -func ResolveLocalPaths(config *clientcmdapi.Config) error { - for _, cluster := range config.Clusters { - if len(cluster.LocationOfOrigin) == 0 { - continue - } - base, err := filepath.Abs(filepath.Dir(cluster.LocationOfOrigin)) - if err != nil { - return fmt.Errorf("Could not determine the absolute path of config file %s: %v", cluster.LocationOfOrigin, err) - } - - if err := ResolvePaths(GetClusterFileReferences(cluster), base); err != nil { - return err - } - } - for _, authInfo := range config.AuthInfos { - if len(authInfo.LocationOfOrigin) == 0 { - continue - } - base, err := filepath.Abs(filepath.Dir(authInfo.LocationOfOrigin)) - if err != nil { - return fmt.Errorf("Could not determine the absolute path of config file %s: %v", authInfo.LocationOfOrigin, err) - } - - if err := ResolvePaths(GetAuthInfoFileReferences(authInfo), base); err != nil { - return err - } - } - - return nil -} - -// RelativizeClusterLocalPaths first absolutizes the paths by calling ResolveLocalPaths. This assumes that any NEW path is already -// absolute, but any existing path will be resolved relative to LocationOfOrigin -func RelativizeClusterLocalPaths(cluster *clientcmdapi.Cluster) error { - if len(cluster.LocationOfOrigin) == 0 { - return fmt.Errorf("no location of origin for %s", cluster.Server) - } - base, err := filepath.Abs(filepath.Dir(cluster.LocationOfOrigin)) - if err != nil { - return fmt.Errorf("could not determine the absolute path of config file %s: %v", cluster.LocationOfOrigin, err) - } - - if err := ResolvePaths(GetClusterFileReferences(cluster), base); err != nil { - return err - } - if err := RelativizePathWithNoBacksteps(GetClusterFileReferences(cluster), base); err != nil { - return err - } - - return nil -} - -// RelativizeAuthInfoLocalPaths first absolutizes the paths by calling ResolveLocalPaths. This assumes that any NEW path is already -// absolute, but any existing path will be resolved relative to LocationOfOrigin -func RelativizeAuthInfoLocalPaths(authInfo *clientcmdapi.AuthInfo) error { - if len(authInfo.LocationOfOrigin) == 0 { - return fmt.Errorf("no location of origin for %v", authInfo) - } - base, err := filepath.Abs(filepath.Dir(authInfo.LocationOfOrigin)) - if err != nil { - return fmt.Errorf("could not determine the absolute path of config file %s: %v", authInfo.LocationOfOrigin, err) - } - - if err := ResolvePaths(GetAuthInfoFileReferences(authInfo), base); err != nil { - return err - } - if err := RelativizePathWithNoBacksteps(GetAuthInfoFileReferences(authInfo), base); err != nil { - return err - } - - return nil -} - -func RelativizeConfigPaths(config *clientcmdapi.Config, base string) error { - return RelativizePathWithNoBacksteps(GetConfigFileReferences(config), base) -} - -func ResolveConfigPaths(config *clientcmdapi.Config, base string) error { - return ResolvePaths(GetConfigFileReferences(config), base) -} - -func GetConfigFileReferences(config *clientcmdapi.Config) []*string { - refs := []*string{} - - for _, cluster := range config.Clusters { - refs = append(refs, GetClusterFileReferences(cluster)...) - } - for _, authInfo := range config.AuthInfos { - refs = append(refs, GetAuthInfoFileReferences(authInfo)...) - } - - return refs -} - -func GetClusterFileReferences(cluster *clientcmdapi.Cluster) []*string { - return []*string{&cluster.CertificateAuthority} -} - -func GetAuthInfoFileReferences(authInfo *clientcmdapi.AuthInfo) []*string { - return []*string{&authInfo.ClientCertificate, &authInfo.ClientKey, &authInfo.TokenFile} -} - -// ResolvePaths updates the given refs to be absolute paths, relative to the given base directory -func ResolvePaths(refs []*string, base string) error { - for _, ref := range refs { - // Don't resolve empty paths - if len(*ref) > 0 { - // Don't resolve absolute paths - if !filepath.IsAbs(*ref) { - *ref = filepath.Join(base, *ref) - } - } - } - return nil -} - -// RelativizePathWithNoBacksteps updates the given refs to be relative paths, relative to the given base directory as long as they do not require backsteps. -// Any path requiring a backstep is left as-is as long it is absolute. Any non-absolute path that can't be relativized produces an error -func RelativizePathWithNoBacksteps(refs []*string, base string) error { - for _, ref := range refs { - // Don't relativize empty paths - if len(*ref) > 0 { - rel, err := MakeRelative(*ref, base) - if err != nil { - return err - } - - // if we have a backstep, don't mess with the path - if strings.HasPrefix(rel, "../") { - if filepath.IsAbs(*ref) { - continue - } - - return fmt.Errorf("%v requires backsteps and is not absolute", *ref) - } - - *ref = rel - } - } - return nil -} - -func MakeRelative(path, base string) (string, error) { - if len(path) > 0 { - rel, err := filepath.Rel(base, path) - if err != nil { - return path, err - } - return rel, nil - } - return path, nil -} diff --git a/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/loader_test.go b/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/loader_test.go deleted file mode 100644 index 078aeddc..00000000 --- a/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/loader_test.go +++ /dev/null @@ -1,578 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package clientcmd - -import ( - "fmt" - "io/ioutil" - "os" - "path" - "path/filepath" - "reflect" - "strings" - "testing" - - "github.com/ghodss/yaml" - - "k8s.io/apimachinery/pkg/runtime" - clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api" - clientcmdlatest "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/latest" -) - -var ( - testConfigAlfa = clientcmdapi.Config{ - AuthInfos: map[string]*clientcmdapi.AuthInfo{ - "red-user": {Token: "red-token"}}, - Clusters: map[string]*clientcmdapi.Cluster{ - "cow-cluster": {Server: "http://cow.org:8080"}}, - Contexts: map[string]*clientcmdapi.Context{ - "federal-context": {AuthInfo: "red-user", Cluster: "cow-cluster", Namespace: "hammer-ns"}}, - } - testConfigBravo = clientcmdapi.Config{ - AuthInfos: map[string]*clientcmdapi.AuthInfo{ - "black-user": {Token: "black-token"}}, - Clusters: map[string]*clientcmdapi.Cluster{ - "pig-cluster": {Server: "http://pig.org:8080"}}, - Contexts: map[string]*clientcmdapi.Context{ - "queen-anne-context": {AuthInfo: "black-user", Cluster: "pig-cluster", Namespace: "saw-ns"}}, - } - testConfigCharlie = clientcmdapi.Config{ - AuthInfos: map[string]*clientcmdapi.AuthInfo{ - "green-user": {Token: "green-token"}}, - Clusters: map[string]*clientcmdapi.Cluster{ - "horse-cluster": {Server: "http://horse.org:8080"}}, - Contexts: map[string]*clientcmdapi.Context{ - "shaker-context": {AuthInfo: "green-user", Cluster: "horse-cluster", Namespace: "chisel-ns"}}, - } - testConfigDelta = clientcmdapi.Config{ - AuthInfos: map[string]*clientcmdapi.AuthInfo{ - "blue-user": {Token: "blue-token"}}, - Clusters: map[string]*clientcmdapi.Cluster{ - "chicken-cluster": {Server: "http://chicken.org:8080"}}, - Contexts: map[string]*clientcmdapi.Context{ - "gothic-context": {AuthInfo: "blue-user", Cluster: "chicken-cluster", Namespace: "plane-ns"}}, - } - - testConfigConflictAlfa = clientcmdapi.Config{ - AuthInfos: map[string]*clientcmdapi.AuthInfo{ - "red-user": {Token: "a-different-red-token"}, - "yellow-user": {Token: "yellow-token"}}, - Clusters: map[string]*clientcmdapi.Cluster{ - "cow-cluster": {Server: "http://a-different-cow.org:8080", InsecureSkipTLSVerify: true}, - "donkey-cluster": {Server: "http://donkey.org:8080", InsecureSkipTLSVerify: true}}, - CurrentContext: "federal-context", - } -) - -func TestNonExistentCommandLineFile(t *testing.T) { - loadingRules := ClientConfigLoadingRules{ - ExplicitPath: "bogus_file", - } - - _, err := loadingRules.Load() - if err == nil { - t.Fatalf("Expected error for missing command-line file, got none") - } - if !strings.Contains(err.Error(), "bogus_file") { - t.Fatalf("Expected error about 'bogus_file', got %s", err.Error()) - } -} - -func TestToleratingMissingFiles(t *testing.T) { - loadingRules := ClientConfigLoadingRules{ - Precedence: []string{"bogus1", "bogus2", "bogus3"}, - } - - _, err := loadingRules.Load() - if err != nil { - t.Fatalf("Unexpected error: %v", err) - } -} - -func TestErrorReadingFile(t *testing.T) { - commandLineFile, _ := ioutil.TempFile("", "") - defer os.Remove(commandLineFile.Name()) - - if err := ioutil.WriteFile(commandLineFile.Name(), []byte("bogus value"), 0644); err != nil { - t.Fatalf("Error creating tempfile: %v", err) - } - - loadingRules := ClientConfigLoadingRules{ - ExplicitPath: commandLineFile.Name(), - } - - _, err := loadingRules.Load() - if err == nil { - t.Fatalf("Expected error for unloadable file, got none") - } - if !strings.Contains(err.Error(), commandLineFile.Name()) { - t.Fatalf("Expected error about '%s', got %s", commandLineFile.Name(), err.Error()) - } -} - -func TestErrorReadingNonFile(t *testing.T) { - tmpdir, err := ioutil.TempDir("", "") - if err != nil { - t.Fatalf("Couldn't create tmpdir") - } - defer os.Remove(tmpdir) - - loadingRules := ClientConfigLoadingRules{ - ExplicitPath: tmpdir, - } - - _, err = loadingRules.Load() - if err == nil { - t.Fatalf("Expected error for non-file, got none") - } - if !strings.Contains(err.Error(), tmpdir) { - t.Fatalf("Expected error about '%s', got %s", tmpdir, err.Error()) - } -} - -func TestConflictingCurrentContext(t *testing.T) { - commandLineFile, _ := ioutil.TempFile("", "") - defer os.Remove(commandLineFile.Name()) - envVarFile, _ := ioutil.TempFile("", "") - defer os.Remove(envVarFile.Name()) - - mockCommandLineConfig := clientcmdapi.Config{ - CurrentContext: "any-context-value", - } - mockEnvVarConfig := clientcmdapi.Config{ - CurrentContext: "a-different-context", - } - - WriteToFile(mockCommandLineConfig, commandLineFile.Name()) - WriteToFile(mockEnvVarConfig, envVarFile.Name()) - - loadingRules := ClientConfigLoadingRules{ - ExplicitPath: commandLineFile.Name(), - Precedence: []string{envVarFile.Name()}, - } - - mergedConfig, err := loadingRules.Load() - if err != nil { - t.Errorf("Unexpected error: %v", err) - } - - if mergedConfig.CurrentContext != mockCommandLineConfig.CurrentContext { - t.Errorf("expected %v, got %v", mockCommandLineConfig.CurrentContext, mergedConfig.CurrentContext) - } -} - -func TestLoadingEmptyMaps(t *testing.T) { - configFile, _ := ioutil.TempFile("", "") - defer os.Remove(configFile.Name()) - - mockConfig := clientcmdapi.Config{ - CurrentContext: "any-context-value", - } - - WriteToFile(mockConfig, configFile.Name()) - - config, err := LoadFromFile(configFile.Name()) - if err != nil { - t.Errorf("Unexpected error: %v", err) - } - - if config.Clusters == nil { - t.Error("expected config.Clusters to be non-nil") - } - if config.AuthInfos == nil { - t.Error("expected config.AuthInfos to be non-nil") - } - if config.Contexts == nil { - t.Error("expected config.Contexts to be non-nil") - } -} - -func TestResolveRelativePaths(t *testing.T) { - pathResolutionConfig1 := clientcmdapi.Config{ - AuthInfos: map[string]*clientcmdapi.AuthInfo{ - "relative-user-1": {ClientCertificate: "relative/client/cert", ClientKey: "../relative/client/key"}, - "absolute-user-1": {ClientCertificate: "/absolute/client/cert", ClientKey: "/absolute/client/key"}, - }, - Clusters: map[string]*clientcmdapi.Cluster{ - "relative-server-1": {CertificateAuthority: "../relative/ca"}, - "absolute-server-1": {CertificateAuthority: "/absolute/ca"}, - }, - } - pathResolutionConfig2 := clientcmdapi.Config{ - AuthInfos: map[string]*clientcmdapi.AuthInfo{ - "relative-user-2": {ClientCertificate: "relative/client/cert2", ClientKey: "../relative/client/key2"}, - "absolute-user-2": {ClientCertificate: "/absolute/client/cert2", ClientKey: "/absolute/client/key2"}, - }, - Clusters: map[string]*clientcmdapi.Cluster{ - "relative-server-2": {CertificateAuthority: "../relative/ca2"}, - "absolute-server-2": {CertificateAuthority: "/absolute/ca2"}, - }, - } - - configDir1, _ := ioutil.TempDir("", "") - configFile1 := path.Join(configDir1, ".kubeconfig") - configDir1, _ = filepath.Abs(configDir1) - defer os.Remove(configFile1) - configDir2, _ := ioutil.TempDir("", "") - configDir2, _ = ioutil.TempDir(configDir2, "") - configFile2 := path.Join(configDir2, ".kubeconfig") - configDir2, _ = filepath.Abs(configDir2) - defer os.Remove(configFile2) - - WriteToFile(pathResolutionConfig1, configFile1) - WriteToFile(pathResolutionConfig2, configFile2) - - loadingRules := ClientConfigLoadingRules{ - Precedence: []string{configFile1, configFile2}, - } - - mergedConfig, err := loadingRules.Load() - if err != nil { - t.Errorf("Unexpected error: %v", err) - } - - foundClusterCount := 0 - for key, cluster := range mergedConfig.Clusters { - if key == "relative-server-1" { - foundClusterCount++ - matchStringArg(path.Join(configDir1, pathResolutionConfig1.Clusters["relative-server-1"].CertificateAuthority), cluster.CertificateAuthority, t) - } - if key == "relative-server-2" { - foundClusterCount++ - matchStringArg(path.Join(configDir2, pathResolutionConfig2.Clusters["relative-server-2"].CertificateAuthority), cluster.CertificateAuthority, t) - } - if key == "absolute-server-1" { - foundClusterCount++ - matchStringArg(pathResolutionConfig1.Clusters["absolute-server-1"].CertificateAuthority, cluster.CertificateAuthority, t) - } - if key == "absolute-server-2" { - foundClusterCount++ - matchStringArg(pathResolutionConfig2.Clusters["absolute-server-2"].CertificateAuthority, cluster.CertificateAuthority, t) - } - } - if foundClusterCount != 4 { - t.Errorf("Expected 4 clusters, found %v: %v", foundClusterCount, mergedConfig.Clusters) - } - - foundAuthInfoCount := 0 - for key, authInfo := range mergedConfig.AuthInfos { - if key == "relative-user-1" { - foundAuthInfoCount++ - matchStringArg(path.Join(configDir1, pathResolutionConfig1.AuthInfos["relative-user-1"].ClientCertificate), authInfo.ClientCertificate, t) - matchStringArg(path.Join(configDir1, pathResolutionConfig1.AuthInfos["relative-user-1"].ClientKey), authInfo.ClientKey, t) - } - if key == "relative-user-2" { - foundAuthInfoCount++ - matchStringArg(path.Join(configDir2, pathResolutionConfig2.AuthInfos["relative-user-2"].ClientCertificate), authInfo.ClientCertificate, t) - matchStringArg(path.Join(configDir2, pathResolutionConfig2.AuthInfos["relative-user-2"].ClientKey), authInfo.ClientKey, t) - } - if key == "absolute-user-1" { - foundAuthInfoCount++ - matchStringArg(pathResolutionConfig1.AuthInfos["absolute-user-1"].ClientCertificate, authInfo.ClientCertificate, t) - matchStringArg(pathResolutionConfig1.AuthInfos["absolute-user-1"].ClientKey, authInfo.ClientKey, t) - } - if key == "absolute-user-2" { - foundAuthInfoCount++ - matchStringArg(pathResolutionConfig2.AuthInfos["absolute-user-2"].ClientCertificate, authInfo.ClientCertificate, t) - matchStringArg(pathResolutionConfig2.AuthInfos["absolute-user-2"].ClientKey, authInfo.ClientKey, t) - } - } - if foundAuthInfoCount != 4 { - t.Errorf("Expected 4 users, found %v: %v", foundAuthInfoCount, mergedConfig.AuthInfos) - } - -} - -func TestMigratingFile(t *testing.T) { - sourceFile, _ := ioutil.TempFile("", "") - defer os.Remove(sourceFile.Name()) - destinationFile, _ := ioutil.TempFile("", "") - // delete the file so that we'll write to it - os.Remove(destinationFile.Name()) - - WriteToFile(testConfigAlfa, sourceFile.Name()) - - loadingRules := ClientConfigLoadingRules{ - MigrationRules: map[string]string{destinationFile.Name(): sourceFile.Name()}, - } - - if _, err := loadingRules.Load(); err != nil { - t.Errorf("unexpected error %v", err) - } - - // the load should have recreated this file - defer os.Remove(destinationFile.Name()) - - sourceContent, err := ioutil.ReadFile(sourceFile.Name()) - if err != nil { - t.Errorf("unexpected error %v", err) - } - destinationContent, err := ioutil.ReadFile(destinationFile.Name()) - if err != nil { - t.Errorf("unexpected error %v", err) - } - - if !reflect.DeepEqual(sourceContent, destinationContent) { - t.Errorf("source and destination do not match") - } -} - -func TestMigratingFileLeaveExistingFileAlone(t *testing.T) { - sourceFile, _ := ioutil.TempFile("", "") - defer os.Remove(sourceFile.Name()) - destinationFile, _ := ioutil.TempFile("", "") - defer os.Remove(destinationFile.Name()) - - WriteToFile(testConfigAlfa, sourceFile.Name()) - - loadingRules := ClientConfigLoadingRules{ - MigrationRules: map[string]string{destinationFile.Name(): sourceFile.Name()}, - } - - if _, err := loadingRules.Load(); err != nil { - t.Errorf("unexpected error %v", err) - } - - destinationContent, err := ioutil.ReadFile(destinationFile.Name()) - if err != nil { - t.Errorf("unexpected error %v", err) - } - - if len(destinationContent) > 0 { - t.Errorf("destination should not have been touched") - } -} - -func TestMigratingFileSourceMissingSkip(t *testing.T) { - sourceFilename := "some-missing-file" - destinationFile, _ := ioutil.TempFile("", "") - // delete the file so that we'll write to it - os.Remove(destinationFile.Name()) - - loadingRules := ClientConfigLoadingRules{ - MigrationRules: map[string]string{destinationFile.Name(): sourceFilename}, - } - - if _, err := loadingRules.Load(); err != nil { - t.Errorf("unexpected error %v", err) - } - - if _, err := os.Stat(destinationFile.Name()); !os.IsNotExist(err) { - t.Errorf("destination should not exist") - } -} - -func TestFileLocking(t *testing.T) { - f, _ := ioutil.TempFile("", "") - defer os.Remove(f.Name()) - - err := lockFile(f.Name()) - if err != nil { - t.Errorf("unexpected error while locking file: %v", err) - } - defer unlockFile(f.Name()) - - err = lockFile(f.Name()) - if err == nil { - t.Error("expected error while locking file.") - } -} - -func Example_noMergingOnExplicitPaths() { - commandLineFile, _ := ioutil.TempFile("", "") - defer os.Remove(commandLineFile.Name()) - envVarFile, _ := ioutil.TempFile("", "") - defer os.Remove(envVarFile.Name()) - - WriteToFile(testConfigAlfa, commandLineFile.Name()) - WriteToFile(testConfigConflictAlfa, envVarFile.Name()) - - loadingRules := ClientConfigLoadingRules{ - ExplicitPath: commandLineFile.Name(), - Precedence: []string{envVarFile.Name()}, - } - - mergedConfig, err := loadingRules.Load() - - json, err := runtime.Encode(clientcmdlatest.Codec, mergedConfig) - if err != nil { - fmt.Printf("Unexpected error: %v", err) - } - output, err := yaml.JSONToYAML(json) - if err != nil { - fmt.Printf("Unexpected error: %v", err) - } - - fmt.Printf("%v", string(output)) - // Output: - // apiVersion: v1 - // clusters: - // - cluster: - // server: http://cow.org:8080 - // name: cow-cluster - // contexts: - // - context: - // cluster: cow-cluster - // namespace: hammer-ns - // user: red-user - // name: federal-context - // current-context: "" - // kind: Config - // preferences: {} - // users: - // - name: red-user - // user: - // token: red-token -} - -func Example_mergingSomeWithConflict() { - commandLineFile, _ := ioutil.TempFile("", "") - defer os.Remove(commandLineFile.Name()) - envVarFile, _ := ioutil.TempFile("", "") - defer os.Remove(envVarFile.Name()) - - WriteToFile(testConfigAlfa, commandLineFile.Name()) - WriteToFile(testConfigConflictAlfa, envVarFile.Name()) - - loadingRules := ClientConfigLoadingRules{ - Precedence: []string{commandLineFile.Name(), envVarFile.Name()}, - } - - mergedConfig, err := loadingRules.Load() - - json, err := runtime.Encode(clientcmdlatest.Codec, mergedConfig) - if err != nil { - fmt.Printf("Unexpected error: %v", err) - } - output, err := yaml.JSONToYAML(json) - if err != nil { - fmt.Printf("Unexpected error: %v", err) - } - - fmt.Printf("%v", string(output)) - // Output: - // apiVersion: v1 - // clusters: - // - cluster: - // server: http://cow.org:8080 - // name: cow-cluster - // - cluster: - // insecure-skip-tls-verify: true - // server: http://donkey.org:8080 - // name: donkey-cluster - // contexts: - // - context: - // cluster: cow-cluster - // namespace: hammer-ns - // user: red-user - // name: federal-context - // current-context: federal-context - // kind: Config - // preferences: {} - // users: - // - name: red-user - // user: - // token: red-token - // - name: yellow-user - // user: - // token: yellow-token -} - -func Example_mergingEverythingNoConflicts() { - commandLineFile, _ := ioutil.TempFile("", "") - defer os.Remove(commandLineFile.Name()) - envVarFile, _ := ioutil.TempFile("", "") - defer os.Remove(envVarFile.Name()) - currentDirFile, _ := ioutil.TempFile("", "") - defer os.Remove(currentDirFile.Name()) - homeDirFile, _ := ioutil.TempFile("", "") - defer os.Remove(homeDirFile.Name()) - - WriteToFile(testConfigAlfa, commandLineFile.Name()) - WriteToFile(testConfigBravo, envVarFile.Name()) - WriteToFile(testConfigCharlie, currentDirFile.Name()) - WriteToFile(testConfigDelta, homeDirFile.Name()) - - loadingRules := ClientConfigLoadingRules{ - Precedence: []string{commandLineFile.Name(), envVarFile.Name(), currentDirFile.Name(), homeDirFile.Name()}, - } - - mergedConfig, err := loadingRules.Load() - - json, err := runtime.Encode(clientcmdlatest.Codec, mergedConfig) - if err != nil { - fmt.Printf("Unexpected error: %v", err) - } - output, err := yaml.JSONToYAML(json) - if err != nil { - fmt.Printf("Unexpected error: %v", err) - } - - fmt.Printf("%v", string(output)) - // Output: - // apiVersion: v1 - // clusters: - // - cluster: - // server: http://chicken.org:8080 - // name: chicken-cluster - // - cluster: - // server: http://cow.org:8080 - // name: cow-cluster - // - cluster: - // server: http://horse.org:8080 - // name: horse-cluster - // - cluster: - // server: http://pig.org:8080 - // name: pig-cluster - // contexts: - // - context: - // cluster: cow-cluster - // namespace: hammer-ns - // user: red-user - // name: federal-context - // - context: - // cluster: chicken-cluster - // namespace: plane-ns - // user: blue-user - // name: gothic-context - // - context: - // cluster: pig-cluster - // namespace: saw-ns - // user: black-user - // name: queen-anne-context - // - context: - // cluster: horse-cluster - // namespace: chisel-ns - // user: green-user - // name: shaker-context - // current-context: "" - // kind: Config - // preferences: {} - // users: - // - name: black-user - // user: - // token: black-token - // - name: blue-user - // user: - // token: blue-token - // - name: green-user - // user: - // token: green-token - // - name: red-user - // user: - // token: red-token -} diff --git a/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/merged_client_builder.go b/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/merged_client_builder.go deleted file mode 100644 index 75cdd270..00000000 --- a/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/merged_client_builder.go +++ /dev/null @@ -1,154 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package clientcmd - -import ( - "io" - "sync" - - "github.com/golang/glog" - - "k8s.io/kubernetes/pkg/client/restclient" - clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api" -) - -// DeferredLoadingClientConfig is a ClientConfig interface that is backed by a client config loader. -// It is used in cases where the loading rules may change after you've instantiated them and you want to be sure that -// the most recent rules are used. This is useful in cases where you bind flags to loading rule parameters before -// the parse happens and you want your calling code to be ignorant of how the values are being mutated to avoid -// passing extraneous information down a call stack -type DeferredLoadingClientConfig struct { - loader ClientConfigLoader - overrides *ConfigOverrides - fallbackReader io.Reader - - clientConfig ClientConfig - loadingLock sync.Mutex - - // provided for testing - icc InClusterConfig -} - -// InClusterConfig abstracts details of whether the client is running in a cluster for testing. -type InClusterConfig interface { - ClientConfig - Possible() bool -} - -// NewNonInteractiveDeferredLoadingClientConfig creates a ConfigClientClientConfig using the passed context name -func NewNonInteractiveDeferredLoadingClientConfig(loader ClientConfigLoader, overrides *ConfigOverrides) ClientConfig { - return &DeferredLoadingClientConfig{loader: loader, overrides: overrides, icc: &inClusterClientConfig{overrides: overrides}} -} - -// NewInteractiveDeferredLoadingClientConfig creates a ConfigClientClientConfig using the passed context name and the fallback auth reader -func NewInteractiveDeferredLoadingClientConfig(loader ClientConfigLoader, overrides *ConfigOverrides, fallbackReader io.Reader) ClientConfig { - return &DeferredLoadingClientConfig{loader: loader, overrides: overrides, icc: &inClusterClientConfig{overrides: overrides}, fallbackReader: fallbackReader} -} - -func (config *DeferredLoadingClientConfig) createClientConfig() (ClientConfig, error) { - if config.clientConfig == nil { - config.loadingLock.Lock() - defer config.loadingLock.Unlock() - - if config.clientConfig == nil { - mergedConfig, err := config.loader.Load() - if err != nil { - return nil, err - } - - var mergedClientConfig ClientConfig - if config.fallbackReader != nil { - mergedClientConfig = NewInteractiveClientConfig(*mergedConfig, config.overrides.CurrentContext, config.overrides, config.fallbackReader, config.loader) - } else { - mergedClientConfig = NewNonInteractiveClientConfig(*mergedConfig, config.overrides.CurrentContext, config.overrides, config.loader) - } - - config.clientConfig = mergedClientConfig - } - } - - return config.clientConfig, nil -} - -func (config *DeferredLoadingClientConfig) RawConfig() (clientcmdapi.Config, error) { - mergedConfig, err := config.createClientConfig() - if err != nil { - return clientcmdapi.Config{}, err - } - - return mergedConfig.RawConfig() -} - -// ClientConfig implements ClientConfig -func (config *DeferredLoadingClientConfig) ClientConfig() (*restclient.Config, error) { - mergedClientConfig, err := config.createClientConfig() - if err != nil { - return nil, err - } - - // load the configuration and return on non-empty errors and if the - // content differs from the default config - mergedConfig, err := mergedClientConfig.ClientConfig() - switch { - case err != nil: - if !IsEmptyConfig(err) { - // return on any error except empty config - return nil, err - } - case mergedConfig != nil: - // the configuration is valid, but if this is equal to the defaults we should try - // in-cluster configuration - if !config.loader.IsDefaultConfig(mergedConfig) { - return mergedConfig, nil - } - } - - // check for in-cluster configuration and use it - if config.icc.Possible() { - glog.V(4).Infof("Using in-cluster configuration") - return config.icc.ClientConfig() - } - - // return the result of the merged client config - return mergedConfig, err -} - -// Namespace implements KubeConfig -func (config *DeferredLoadingClientConfig) Namespace() (string, bool, error) { - mergedKubeConfig, err := config.createClientConfig() - if err != nil { - return "", false, err - } - - ns, ok, err := mergedKubeConfig.Namespace() - // if we get an error and it is not empty config, or if the merged config defined an explicit namespace, or - // if in-cluster config is not possible, return immediately - if (err != nil && !IsEmptyConfig(err)) || ok || !config.icc.Possible() { - // return on any error except empty config - return ns, ok, err - } - - glog.V(4).Infof("Using in-cluster namespace") - - // allow the namespace from the service account token directory to be used. - return config.icc.Namespace() -} - -// ConfigAccess implements ClientConfig -func (config *DeferredLoadingClientConfig) ConfigAccess() ConfigAccess { - return config.loader -} diff --git a/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/merged_client_builder_test.go b/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/merged_client_builder_test.go deleted file mode 100644 index ec4b4072..00000000 --- a/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/merged_client_builder_test.go +++ /dev/null @@ -1,328 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package clientcmd - -import ( - "fmt" - "testing" - - "k8s.io/kubernetes/pkg/client/restclient" - clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api" -) - -type testLoader struct { - ClientConfigLoader - - called bool - config *clientcmdapi.Config - err error -} - -func (l *testLoader) Load() (*clientcmdapi.Config, error) { - l.called = true - return l.config, l.err -} - -type testClientConfig struct { - config *restclient.Config - namespace string - namespaceSpecified bool - err error -} - -func (c *testClientConfig) RawConfig() (clientcmdapi.Config, error) { - return clientcmdapi.Config{}, fmt.Errorf("unexpected call") -} -func (c *testClientConfig) ClientConfig() (*restclient.Config, error) { - return c.config, c.err -} -func (c *testClientConfig) Namespace() (string, bool, error) { - return c.namespace, c.namespaceSpecified, c.err -} -func (c *testClientConfig) ConfigAccess() ConfigAccess { - return nil -} - -type testICC struct { - testClientConfig - - possible bool - called bool -} - -func (icc *testICC) Possible() bool { - icc.called = true - return icc.possible -} - -func TestInClusterConfig(t *testing.T) { - default1 := &DirectClientConfig{ - config: *createValidTestConfig(), - contextName: "clean", - overrides: &ConfigOverrides{}, - } - invalidDefaultConfig := clientcmdapi.NewConfig() - invalidDefaultConfig.Clusters["clean"] = &clientcmdapi.Cluster{ - Server: "http://localhost:8080", - } - invalidDefaultConfig.Contexts["other"] = &clientcmdapi.Context{ - Cluster: "clean", - } - invalidDefaultConfig.CurrentContext = "clean" - - defaultInvalid := &DirectClientConfig{ - config: *invalidDefaultConfig, - overrides: &ConfigOverrides{}, - } - if _, err := defaultInvalid.ClientConfig(); err == nil || !IsConfigurationInvalid(err) { - t.Fatal(err) - } - config1, err := default1.ClientConfig() - if err != nil { - t.Fatal(err) - } - config2 := &restclient.Config{Host: "config2"} - err1 := fmt.Errorf("unique error") - - testCases := map[string]struct { - clientConfig *testClientConfig - icc *testICC - defaultConfig *DirectClientConfig - - checkedICC bool - result *restclient.Config - err error - }{ - "in-cluster checked on other error": { - clientConfig: &testClientConfig{err: ErrEmptyConfig}, - icc: &testICC{}, - - checkedICC: true, - result: nil, - err: ErrEmptyConfig, - }, - - "in-cluster not checked on non-empty error": { - clientConfig: &testClientConfig{err: ErrEmptyCluster}, - icc: &testICC{}, - - checkedICC: false, - result: nil, - err: ErrEmptyCluster, - }, - - "in-cluster checked when config is default": { - defaultConfig: default1, - clientConfig: &testClientConfig{config: config1}, - icc: &testICC{}, - - checkedICC: true, - result: config1, - err: nil, - }, - - "in-cluster not checked when default config is invalid": { - defaultConfig: defaultInvalid, - clientConfig: &testClientConfig{config: config1}, - icc: &testICC{}, - - checkedICC: false, - result: config1, - err: nil, - }, - - "in-cluster not checked when config is not equal to default": { - defaultConfig: default1, - clientConfig: &testClientConfig{config: config2}, - icc: &testICC{}, - - checkedICC: false, - result: config2, - err: nil, - }, - - "in-cluster checked when config is not equal to default and error is empty": { - clientConfig: &testClientConfig{config: config2, err: ErrEmptyConfig}, - icc: &testICC{}, - - checkedICC: true, - result: config2, - err: ErrEmptyConfig, - }, - - "in-cluster error returned when config is empty": { - clientConfig: &testClientConfig{err: ErrEmptyConfig}, - icc: &testICC{ - possible: true, - testClientConfig: testClientConfig{ - err: err1, - }, - }, - - checkedICC: true, - result: nil, - err: err1, - }, - - "in-cluster config returned when config is empty": { - clientConfig: &testClientConfig{err: ErrEmptyConfig}, - icc: &testICC{ - possible: true, - testClientConfig: testClientConfig{ - config: config2, - }, - }, - - checkedICC: true, - result: config2, - err: nil, - }, - - "in-cluster not checked when standard default is invalid": { - defaultConfig: &DefaultClientConfig, - clientConfig: &testClientConfig{config: config2}, - icc: &testICC{}, - - checkedICC: false, - result: config2, - err: nil, - }, - } - - for name, test := range testCases { - c := &DeferredLoadingClientConfig{icc: test.icc} - c.loader = &ClientConfigLoadingRules{DefaultClientConfig: test.defaultConfig} - c.clientConfig = test.clientConfig - - cfg, err := c.ClientConfig() - if test.icc.called != test.checkedICC { - t.Errorf("%s: unexpected in-cluster-config call %t", name, test.icc.called) - } - if err != test.err || cfg != test.result { - t.Errorf("%s: unexpected result: %v %#v", name, err, cfg) - } - } -} - -func TestInClusterConfigNamespace(t *testing.T) { - err1 := fmt.Errorf("unique error") - - testCases := map[string]struct { - clientConfig *testClientConfig - icc *testICC - - checkedICC bool - result string - ok bool - err error - }{ - "in-cluster checked on empty error": { - clientConfig: &testClientConfig{err: ErrEmptyConfig}, - icc: &testICC{}, - - checkedICC: true, - err: ErrEmptyConfig, - }, - - "in-cluster not checked on non-empty error": { - clientConfig: &testClientConfig{err: ErrEmptyCluster}, - icc: &testICC{}, - - err: ErrEmptyCluster, - }, - - "in-cluster checked when config is default": { - clientConfig: &testClientConfig{}, - icc: &testICC{}, - - checkedICC: true, - }, - - "in-cluster not checked when config is not equal to default": { - clientConfig: &testClientConfig{namespace: "test", namespaceSpecified: true}, - icc: &testICC{}, - - result: "test", - ok: true, - }, - - "in-cluster checked when namespace is not specified, but is defaulted": { - clientConfig: &testClientConfig{namespace: "test", namespaceSpecified: false}, - icc: &testICC{}, - - checkedICC: true, - result: "test", - ok: false, - }, - - "in-cluster error returned when config is empty": { - clientConfig: &testClientConfig{err: ErrEmptyConfig}, - icc: &testICC{ - possible: true, - testClientConfig: testClientConfig{ - err: err1, - }, - }, - - checkedICC: true, - err: err1, - }, - - "in-cluster config returned when config is empty": { - clientConfig: &testClientConfig{err: ErrEmptyConfig}, - icc: &testICC{ - possible: true, - testClientConfig: testClientConfig{ - namespace: "test", - namespaceSpecified: true, - }, - }, - - checkedICC: true, - result: "test", - ok: true, - }, - - "in-cluster config returned when config is empty and namespace is defaulted but not explicitly set": { - clientConfig: &testClientConfig{err: ErrEmptyConfig}, - icc: &testICC{ - possible: true, - testClientConfig: testClientConfig{ - namespace: "test", - namespaceSpecified: false, - }, - }, - - checkedICC: true, - result: "test", - ok: false, - }, - } - - for name, test := range testCases { - c := &DeferredLoadingClientConfig{icc: test.icc} - c.clientConfig = test.clientConfig - - ns, ok, err := c.Namespace() - if test.icc.called != test.checkedICC { - t.Errorf("%s: unexpected in-cluster-config call %t", name, test.icc.called) - } - if err != test.err || ns != test.result || ok != test.ok { - t.Errorf("%s: unexpected result: %v %s %t", name, err, ns, ok) - } - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/overrides.go b/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/overrides.go deleted file mode 100644 index 38de6a6c..00000000 --- a/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/overrides.go +++ /dev/null @@ -1,206 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package clientcmd - -import ( - "strconv" - - "github.com/spf13/pflag" - - clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api" -) - -// ConfigOverrides holds values that should override whatever information is pulled from the actual Config object. You can't -// simply use an actual Config object, because Configs hold maps, but overrides are restricted to "at most one" -type ConfigOverrides struct { - AuthInfo clientcmdapi.AuthInfo - // ClusterDefaults are applied before the configured cluster info is loaded. - ClusterDefaults clientcmdapi.Cluster - ClusterInfo clientcmdapi.Cluster - Context clientcmdapi.Context - CurrentContext string - Timeout string -} - -// ConfigOverrideFlags holds the flag names to be used for binding command line flags. Notice that this structure tightly -// corresponds to ConfigOverrides -type ConfigOverrideFlags struct { - AuthOverrideFlags AuthOverrideFlags - ClusterOverrideFlags ClusterOverrideFlags - ContextOverrideFlags ContextOverrideFlags - CurrentContext FlagInfo - Timeout FlagInfo -} - -// AuthOverrideFlags holds the flag names to be used for binding command line flags for AuthInfo objects -type AuthOverrideFlags struct { - ClientCertificate FlagInfo - ClientKey FlagInfo - Token FlagInfo - Impersonate FlagInfo - Username FlagInfo - Password FlagInfo -} - -// ContextOverrideFlags holds the flag names to be used for binding command line flags for Cluster objects -type ContextOverrideFlags struct { - ClusterName FlagInfo - AuthInfoName FlagInfo - Namespace FlagInfo -} - -// ClusterOverride holds the flag names to be used for binding command line flags for Cluster objects -type ClusterOverrideFlags struct { - APIServer FlagInfo - APIVersion FlagInfo - CertificateAuthority FlagInfo - InsecureSkipTLSVerify FlagInfo -} - -// FlagInfo contains information about how to register a flag. This struct is useful if you want to provide a way for an extender to -// get back a set of recommended flag names, descriptions, and defaults, but allow for customization by an extender. This makes for -// coherent extension, without full prescription -type FlagInfo struct { - // LongName is the long string for a flag. If this is empty, then the flag will not be bound - LongName string - // ShortName is the single character for a flag. If this is empty, then there will be no short flag - ShortName string - // Default is the default value for the flag - Default string - // Description is the description for the flag - Description string -} - -// BindStringFlag binds the flag based on the provided info. If LongName == "", nothing is registered -func (f FlagInfo) BindStringFlag(flags *pflag.FlagSet, target *string) { - // you can't register a flag without a long name - if len(f.LongName) > 0 { - flags.StringVarP(target, f.LongName, f.ShortName, f.Default, f.Description) - } -} - -// BindBoolFlag binds the flag based on the provided info. If LongName == "", nothing is registered -func (f FlagInfo) BindBoolFlag(flags *pflag.FlagSet, target *bool) { - // you can't register a flag without a long name - if len(f.LongName) > 0 { - // try to parse Default as a bool. If it fails, assume false - boolVal, err := strconv.ParseBool(f.Default) - if err != nil { - boolVal = false - } - - flags.BoolVarP(target, f.LongName, f.ShortName, boolVal, f.Description) - } -} - -const ( - FlagClusterName = "cluster" - FlagAuthInfoName = "user" - FlagContext = "context" - FlagNamespace = "namespace" - FlagAPIServer = "server" - FlagAPIVersion = "api-version" - FlagInsecure = "insecure-skip-tls-verify" - FlagCertFile = "client-certificate" - FlagKeyFile = "client-key" - FlagCAFile = "certificate-authority" - FlagEmbedCerts = "embed-certs" - FlagBearerToken = "token" - FlagImpersonate = "as" - FlagUsername = "username" - FlagPassword = "password" - FlagTimeout = "request-timeout" -) - -// RecommendedConfigOverrideFlags is a convenience method to return recommended flag names prefixed with a string of your choosing -func RecommendedConfigOverrideFlags(prefix string) ConfigOverrideFlags { - return ConfigOverrideFlags{ - AuthOverrideFlags: RecommendedAuthOverrideFlags(prefix), - ClusterOverrideFlags: RecommendedClusterOverrideFlags(prefix), - ContextOverrideFlags: RecommendedContextOverrideFlags(prefix), - - CurrentContext: FlagInfo{prefix + FlagContext, "", "", "The name of the kubeconfig context to use"}, - Timeout: FlagInfo{prefix + FlagTimeout, "", "0", "The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests."}, - } -} - -// RecommendedAuthOverrideFlags is a convenience method to return recommended flag names prefixed with a string of your choosing -func RecommendedAuthOverrideFlags(prefix string) AuthOverrideFlags { - return AuthOverrideFlags{ - ClientCertificate: FlagInfo{prefix + FlagCertFile, "", "", "Path to a client certificate file for TLS"}, - ClientKey: FlagInfo{prefix + FlagKeyFile, "", "", "Path to a client key file for TLS"}, - Token: FlagInfo{prefix + FlagBearerToken, "", "", "Bearer token for authentication to the API server"}, - Impersonate: FlagInfo{prefix + FlagImpersonate, "", "", "Username to impersonate for the operation"}, - Username: FlagInfo{prefix + FlagUsername, "", "", "Username for basic authentication to the API server"}, - Password: FlagInfo{prefix + FlagPassword, "", "", "Password for basic authentication to the API server"}, - } -} - -// RecommendedClusterOverrideFlags is a convenience method to return recommended flag names prefixed with a string of your choosing -func RecommendedClusterOverrideFlags(prefix string) ClusterOverrideFlags { - return ClusterOverrideFlags{ - APIServer: FlagInfo{prefix + FlagAPIServer, "", "", "The address and port of the Kubernetes API server"}, - APIVersion: FlagInfo{prefix + FlagAPIVersion, "", "", "DEPRECATED: The API version to use when talking to the server"}, - CertificateAuthority: FlagInfo{prefix + FlagCAFile, "", "", "Path to a cert. file for the certificate authority"}, - InsecureSkipTLSVerify: FlagInfo{prefix + FlagInsecure, "", "false", "If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure"}, - } -} - -// RecommendedContextOverrideFlags is a convenience method to return recommended flag names prefixed with a string of your choosing -func RecommendedContextOverrideFlags(prefix string) ContextOverrideFlags { - return ContextOverrideFlags{ - ClusterName: FlagInfo{prefix + FlagClusterName, "", "", "The name of the kubeconfig cluster to use"}, - AuthInfoName: FlagInfo{prefix + FlagAuthInfoName, "", "", "The name of the kubeconfig user to use"}, - Namespace: FlagInfo{prefix + FlagNamespace, "n", "", "If present, the namespace scope for this CLI request"}, - } -} - -// BindOverrideFlags is a convenience method to bind the specified flags to their associated variables -func BindOverrideFlags(overrides *ConfigOverrides, flags *pflag.FlagSet, flagNames ConfigOverrideFlags) { - BindAuthInfoFlags(&overrides.AuthInfo, flags, flagNames.AuthOverrideFlags) - BindClusterFlags(&overrides.ClusterInfo, flags, flagNames.ClusterOverrideFlags) - BindContextFlags(&overrides.Context, flags, flagNames.ContextOverrideFlags) - flagNames.CurrentContext.BindStringFlag(flags, &overrides.CurrentContext) - flagNames.Timeout.BindStringFlag(flags, &overrides.Timeout) -} - -// BindAuthInfoFlags is a convenience method to bind the specified flags to their associated variables -func BindAuthInfoFlags(authInfo *clientcmdapi.AuthInfo, flags *pflag.FlagSet, flagNames AuthOverrideFlags) { - flagNames.ClientCertificate.BindStringFlag(flags, &authInfo.ClientCertificate) - flagNames.ClientKey.BindStringFlag(flags, &authInfo.ClientKey) - flagNames.Token.BindStringFlag(flags, &authInfo.Token) - flagNames.Impersonate.BindStringFlag(flags, &authInfo.Impersonate) - flagNames.Username.BindStringFlag(flags, &authInfo.Username) - flagNames.Password.BindStringFlag(flags, &authInfo.Password) -} - -// BindClusterFlags is a convenience method to bind the specified flags to their associated variables -func BindClusterFlags(clusterInfo *clientcmdapi.Cluster, flags *pflag.FlagSet, flagNames ClusterOverrideFlags) { - flagNames.APIServer.BindStringFlag(flags, &clusterInfo.Server) - // TODO: remove --api-version flag in 1.3. - flagNames.APIVersion.BindStringFlag(flags, &clusterInfo.APIVersion) - flags.MarkDeprecated(FlagAPIVersion, "flag is no longer respected and will be deleted in the next release") - flagNames.CertificateAuthority.BindStringFlag(flags, &clusterInfo.CertificateAuthority) - flagNames.InsecureSkipTLSVerify.BindBoolFlag(flags, &clusterInfo.InsecureSkipTLSVerify) -} - -// BindFlags is a convenience method to bind the specified flags to their associated variables -func BindContextFlags(contextInfo *clientcmdapi.Context, flags *pflag.FlagSet, flagNames ContextOverrideFlags) { - flagNames.ClusterName.BindStringFlag(flags, &contextInfo.Cluster) - flagNames.AuthInfoName.BindStringFlag(flags, &contextInfo.AuthInfo) - flagNames.Namespace.BindStringFlag(flags, &contextInfo.Namespace) -} diff --git a/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/validation.go b/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/validation.go deleted file mode 100644 index db19b990..00000000 --- a/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/validation.go +++ /dev/null @@ -1,270 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package clientcmd - -import ( - "errors" - "fmt" - "os" - "reflect" - "strings" - - utilerrors "k8s.io/apimachinery/pkg/util/errors" - "k8s.io/apimachinery/pkg/util/validation" - clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api" -) - -var ( - ErrNoContext = errors.New("no context chosen") - ErrEmptyConfig = errors.New("no configuration has been provided") - // message is for consistency with old behavior - ErrEmptyCluster = errors.New("cluster has no server defined") -) - -type errContextNotFound struct { - ContextName string -} - -func (e *errContextNotFound) Error() string { - return fmt.Sprintf("context was not found for specified context: %v", e.ContextName) -} - -// IsContextNotFound returns a boolean indicating whether the error is known to -// report that a context was not found -func IsContextNotFound(err error) bool { - if err == nil { - return false - } - if _, ok := err.(*errContextNotFound); ok || err == ErrNoContext { - return true - } - return strings.Contains(err.Error(), "context was not found for specified context") -} - -// IsEmptyConfig returns true if the provided error indicates the provided configuration -// is empty. -func IsEmptyConfig(err error) bool { - switch t := err.(type) { - case errConfigurationInvalid: - return len(t) == 1 && t[0] == ErrEmptyConfig - } - return err == ErrEmptyConfig -} - -// errConfigurationInvalid is a set of errors indicating the configuration is invalid. -type errConfigurationInvalid []error - -// errConfigurationInvalid implements error and Aggregate -var _ error = errConfigurationInvalid{} -var _ utilerrors.Aggregate = errConfigurationInvalid{} - -func newErrConfigurationInvalid(errs []error) error { - switch len(errs) { - case 0: - return nil - default: - return errConfigurationInvalid(errs) - } -} - -// Error implements the error interface -func (e errConfigurationInvalid) Error() string { - return fmt.Sprintf("invalid configuration: %v", utilerrors.NewAggregate(e).Error()) -} - -// Errors implements the AggregateError interface -func (e errConfigurationInvalid) Errors() []error { - return e -} - -// IsConfigurationInvalid returns true if the provided error indicates the configuration is invalid. -func IsConfigurationInvalid(err error) bool { - switch err.(type) { - case *errContextNotFound, errConfigurationInvalid: - return true - } - return IsContextNotFound(err) -} - -// Validate checks for errors in the Config. It does not return early so that it can find as many errors as possible. -func Validate(config clientcmdapi.Config) error { - validationErrors := make([]error, 0) - - if clientcmdapi.IsConfigEmpty(&config) { - return newErrConfigurationInvalid([]error{ErrEmptyConfig}) - } - - if len(config.CurrentContext) != 0 { - if _, exists := config.Contexts[config.CurrentContext]; !exists { - validationErrors = append(validationErrors, &errContextNotFound{config.CurrentContext}) - } - } - - for contextName, context := range config.Contexts { - validationErrors = append(validationErrors, validateContext(contextName, *context, config)...) - } - - for authInfoName, authInfo := range config.AuthInfos { - validationErrors = append(validationErrors, validateAuthInfo(authInfoName, *authInfo)...) - } - - for clusterName, clusterInfo := range config.Clusters { - validationErrors = append(validationErrors, validateClusterInfo(clusterName, *clusterInfo)...) - } - - return newErrConfigurationInvalid(validationErrors) -} - -// ConfirmUsable looks a particular context and determines if that particular part of the config is useable. There might still be errors in the config, -// but no errors in the sections requested or referenced. It does not return early so that it can find as many errors as possible. -func ConfirmUsable(config clientcmdapi.Config, passedContextName string) error { - validationErrors := make([]error, 0) - - if clientcmdapi.IsConfigEmpty(&config) { - return newErrConfigurationInvalid([]error{ErrEmptyConfig}) - } - - var contextName string - if len(passedContextName) != 0 { - contextName = passedContextName - } else { - contextName = config.CurrentContext - } - - if len(contextName) == 0 { - return ErrNoContext - } - - context, exists := config.Contexts[contextName] - if !exists { - validationErrors = append(validationErrors, &errContextNotFound{contextName}) - } - - if exists { - validationErrors = append(validationErrors, validateContext(contextName, *context, config)...) - validationErrors = append(validationErrors, validateAuthInfo(context.AuthInfo, *config.AuthInfos[context.AuthInfo])...) - validationErrors = append(validationErrors, validateClusterInfo(context.Cluster, *config.Clusters[context.Cluster])...) - } - - return newErrConfigurationInvalid(validationErrors) -} - -// validateClusterInfo looks for conflicts and errors in the cluster info -func validateClusterInfo(clusterName string, clusterInfo clientcmdapi.Cluster) []error { - validationErrors := make([]error, 0) - - if reflect.DeepEqual(clientcmdapi.Cluster{}, clusterInfo) { - return []error{ErrEmptyCluster} - } - - if len(clusterInfo.Server) == 0 { - if len(clusterName) == 0 { - validationErrors = append(validationErrors, fmt.Errorf("default cluster has no server defined")) - } else { - validationErrors = append(validationErrors, fmt.Errorf("no server found for cluster %q", clusterName)) - } - } - // Make sure CA data and CA file aren't both specified - if len(clusterInfo.CertificateAuthority) != 0 && len(clusterInfo.CertificateAuthorityData) != 0 { - validationErrors = append(validationErrors, fmt.Errorf("certificate-authority-data and certificate-authority are both specified for %v. certificate-authority-data will override.", clusterName)) - } - if len(clusterInfo.CertificateAuthority) != 0 { - clientCertCA, err := os.Open(clusterInfo.CertificateAuthority) - defer clientCertCA.Close() - if err != nil { - validationErrors = append(validationErrors, fmt.Errorf("unable to read certificate-authority %v for %v due to %v", clusterInfo.CertificateAuthority, clusterName, err)) - } - } - - return validationErrors -} - -// validateAuthInfo looks for conflicts and errors in the auth info -func validateAuthInfo(authInfoName string, authInfo clientcmdapi.AuthInfo) []error { - validationErrors := make([]error, 0) - - usingAuthPath := false - methods := make([]string, 0, 3) - if len(authInfo.Token) != 0 { - methods = append(methods, "token") - } - if len(authInfo.Username) != 0 || len(authInfo.Password) != 0 { - methods = append(methods, "basicAuth") - } - - if len(authInfo.ClientCertificate) != 0 || len(authInfo.ClientCertificateData) != 0 { - // Make sure cert data and file aren't both specified - if len(authInfo.ClientCertificate) != 0 && len(authInfo.ClientCertificateData) != 0 { - validationErrors = append(validationErrors, fmt.Errorf("client-cert-data and client-cert are both specified for %v. client-cert-data will override.", authInfoName)) - } - // Make sure key data and file aren't both specified - if len(authInfo.ClientKey) != 0 && len(authInfo.ClientKeyData) != 0 { - validationErrors = append(validationErrors, fmt.Errorf("client-key-data and client-key are both specified for %v; client-key-data will override", authInfoName)) - } - // Make sure a key is specified - if len(authInfo.ClientKey) == 0 && len(authInfo.ClientKeyData) == 0 { - validationErrors = append(validationErrors, fmt.Errorf("client-key-data or client-key must be specified for %v to use the clientCert authentication method.", authInfoName)) - } - - if len(authInfo.ClientCertificate) != 0 { - clientCertFile, err := os.Open(authInfo.ClientCertificate) - defer clientCertFile.Close() - if err != nil { - validationErrors = append(validationErrors, fmt.Errorf("unable to read client-cert %v for %v due to %v", authInfo.ClientCertificate, authInfoName, err)) - } - } - if len(authInfo.ClientKey) != 0 { - clientKeyFile, err := os.Open(authInfo.ClientKey) - defer clientKeyFile.Close() - if err != nil { - validationErrors = append(validationErrors, fmt.Errorf("unable to read client-key %v for %v due to %v", authInfo.ClientKey, authInfoName, err)) - } - } - } - - // authPath also provides information for the client to identify the server, so allow multiple auth methods in that case - if (len(methods) > 1) && (!usingAuthPath) { - validationErrors = append(validationErrors, fmt.Errorf("more than one authentication method found for %v; found %v, only one is allowed", authInfoName, methods)) - } - - return validationErrors -} - -// validateContext looks for errors in the context. It is not transitive, so errors in the reference authInfo or cluster configs are not included in this return -func validateContext(contextName string, context clientcmdapi.Context, config clientcmdapi.Config) []error { - validationErrors := make([]error, 0) - - if len(context.AuthInfo) == 0 { - validationErrors = append(validationErrors, fmt.Errorf("user was not specified for context %q", contextName)) - } else if _, exists := config.AuthInfos[context.AuthInfo]; !exists { - validationErrors = append(validationErrors, fmt.Errorf("user %q was not found for context %q", context.AuthInfo, contextName)) - } - - if len(context.Cluster) == 0 { - validationErrors = append(validationErrors, fmt.Errorf("cluster was not specified for context %q", contextName)) - } else if _, exists := config.Clusters[context.Cluster]; !exists { - validationErrors = append(validationErrors, fmt.Errorf("cluster %q was not found for context %q", context.Cluster, contextName)) - } - - if len(context.Namespace) != 0 { - if len(validation.IsDNS1123Label(context.Namespace)) != 0 { - validationErrors = append(validationErrors, fmt.Errorf("namespace %q for context %q does not conform to the kubernetes DNS_LABEL rules", context.Namespace, contextName)) - } - } - - return validationErrors -} diff --git a/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/validation_test.go b/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/validation_test.go deleted file mode 100644 index 391b049f..00000000 --- a/vendor/k8s.io/kubernetes/pkg/client/unversioned/clientcmd/validation_test.go +++ /dev/null @@ -1,432 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package clientcmd - -import ( - "io/ioutil" - "os" - "strings" - "testing" - - utilerrors "k8s.io/apimachinery/pkg/util/errors" - clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api" -) - -func TestConfirmUsableBadInfoButOkConfig(t *testing.T) { - config := clientcmdapi.NewConfig() - config.Clusters["missing ca"] = &clientcmdapi.Cluster{ - Server: "anything", - CertificateAuthority: "missing", - } - config.AuthInfos["error"] = &clientcmdapi.AuthInfo{ - Username: "anything", - Token: "here", - } - config.Contexts["dirty"] = &clientcmdapi.Context{ - Cluster: "missing ca", - AuthInfo: "error", - } - config.Clusters["clean"] = &clientcmdapi.Cluster{ - Server: "anything", - } - config.AuthInfos["clean"] = &clientcmdapi.AuthInfo{ - Token: "here", - } - config.Contexts["clean"] = &clientcmdapi.Context{ - Cluster: "clean", - AuthInfo: "clean", - } - - badValidation := configValidationTest{ - config: config, - expectedErrorSubstring: []string{"unable to read certificate-authority"}, - } - okTest := configValidationTest{ - config: config, - } - - okTest.testConfirmUsable("clean", t) - badValidation.testConfig(t) -} -func TestConfirmUsableBadInfoConfig(t *testing.T) { - config := clientcmdapi.NewConfig() - config.Clusters["missing ca"] = &clientcmdapi.Cluster{ - Server: "anything", - CertificateAuthority: "missing", - } - config.AuthInfos["error"] = &clientcmdapi.AuthInfo{ - Username: "anything", - Token: "here", - } - config.Contexts["first"] = &clientcmdapi.Context{ - Cluster: "missing ca", - AuthInfo: "error", - } - test := configValidationTest{ - config: config, - expectedErrorSubstring: []string{"unable to read certificate-authority"}, - } - - test.testConfirmUsable("first", t) -} -func TestConfirmUsableEmptyConfig(t *testing.T) { - config := clientcmdapi.NewConfig() - test := configValidationTest{ - config: config, - expectedErrorSubstring: []string{"invalid configuration: no configuration has been provided"}, - } - - test.testConfirmUsable("", t) -} -func TestConfirmUsableMissingConfig(t *testing.T) { - config := clientcmdapi.NewConfig() - test := configValidationTest{ - config: config, - expectedErrorSubstring: []string{"invalid configuration: no configuration has been provided"}, - } - - test.testConfirmUsable("not-here", t) -} -func TestValidateEmptyConfig(t *testing.T) { - config := clientcmdapi.NewConfig() - test := configValidationTest{ - config: config, - expectedErrorSubstring: []string{"invalid configuration: no configuration has been provided"}, - } - - test.testConfig(t) -} -func TestValidateMissingCurrentContextConfig(t *testing.T) { - config := clientcmdapi.NewConfig() - config.CurrentContext = "anything" - test := configValidationTest{ - config: config, - expectedErrorSubstring: []string{"context was not found for specified "}, - } - - test.testConfig(t) -} -func TestIsContextNotFound(t *testing.T) { - config := clientcmdapi.NewConfig() - config.CurrentContext = "anything" - - err := Validate(*config) - if !IsContextNotFound(err) { - t.Errorf("Expected context not found, but got %v", err) - } - if !IsConfigurationInvalid(err) { - t.Errorf("Expected configuration invalid, but got %v", err) - } -} - -func TestIsEmptyConfig(t *testing.T) { - config := clientcmdapi.NewConfig() - - err := Validate(*config) - if !IsEmptyConfig(err) { - t.Errorf("Expected context not found, but got %v", err) - } - if !IsConfigurationInvalid(err) { - t.Errorf("Expected configuration invalid, but got %v", err) - } -} - -func TestIsConfigurationInvalid(t *testing.T) { - if newErrConfigurationInvalid([]error{}) != nil { - t.Errorf("unexpected error") - } - if newErrConfigurationInvalid([]error{ErrNoContext}) == ErrNoContext { - t.Errorf("unexpected error") - } - if newErrConfigurationInvalid([]error{ErrNoContext, ErrNoContext}) == nil { - t.Errorf("unexpected error") - } - if !IsConfigurationInvalid(newErrConfigurationInvalid([]error{ErrNoContext, ErrNoContext})) { - t.Errorf("unexpected error") - } -} - -func TestValidateMissingReferencesConfig(t *testing.T) { - config := clientcmdapi.NewConfig() - config.CurrentContext = "anything" - config.Contexts["anything"] = &clientcmdapi.Context{Cluster: "missing", AuthInfo: "missing"} - test := configValidationTest{ - config: config, - expectedErrorSubstring: []string{"user \"missing\" was not found for context \"anything\"", "cluster \"missing\" was not found for context \"anything\""}, - } - - test.testContext("anything", t) - test.testConfig(t) -} -func TestValidateEmptyContext(t *testing.T) { - config := clientcmdapi.NewConfig() - config.CurrentContext = "anything" - config.Contexts["anything"] = &clientcmdapi.Context{} - test := configValidationTest{ - config: config, - expectedErrorSubstring: []string{"user was not specified for context \"anything\"", "cluster was not specified for context \"anything\""}, - } - - test.testContext("anything", t) - test.testConfig(t) -} - -func TestValidateEmptyClusterInfo(t *testing.T) { - config := clientcmdapi.NewConfig() - config.Clusters["empty"] = &clientcmdapi.Cluster{} - test := configValidationTest{ - config: config, - expectedErrorSubstring: []string{"cluster has no server defined"}, - } - - test.testCluster("empty", t) - test.testConfig(t) -} -func TestValidateMissingCAFileClusterInfo(t *testing.T) { - config := clientcmdapi.NewConfig() - config.Clusters["missing ca"] = &clientcmdapi.Cluster{ - Server: "anything", - CertificateAuthority: "missing", - } - test := configValidationTest{ - config: config, - expectedErrorSubstring: []string{"unable to read certificate-authority"}, - } - - test.testCluster("missing ca", t) - test.testConfig(t) -} -func TestValidateCleanClusterInfo(t *testing.T) { - config := clientcmdapi.NewConfig() - config.Clusters["clean"] = &clientcmdapi.Cluster{ - Server: "anything", - } - test := configValidationTest{ - config: config, - } - - test.testCluster("clean", t) - test.testConfig(t) -} -func TestValidateCleanWithCAClusterInfo(t *testing.T) { - tempFile, _ := ioutil.TempFile("", "") - defer os.Remove(tempFile.Name()) - - config := clientcmdapi.NewConfig() - config.Clusters["clean"] = &clientcmdapi.Cluster{ - Server: "anything", - CertificateAuthority: tempFile.Name(), - } - test := configValidationTest{ - config: config, - } - - test.testCluster("clean", t) - test.testConfig(t) -} - -func TestValidateEmptyAuthInfo(t *testing.T) { - config := clientcmdapi.NewConfig() - config.AuthInfos["error"] = &clientcmdapi.AuthInfo{} - test := configValidationTest{ - config: config, - } - - test.testAuthInfo("error", t) - test.testConfig(t) -} -func TestValidateCertFilesNotFoundAuthInfo(t *testing.T) { - config := clientcmdapi.NewConfig() - config.AuthInfos["error"] = &clientcmdapi.AuthInfo{ - ClientCertificate: "missing", - ClientKey: "missing", - } - test := configValidationTest{ - config: config, - expectedErrorSubstring: []string{"unable to read client-cert", "unable to read client-key"}, - } - - test.testAuthInfo("error", t) - test.testConfig(t) -} -func TestValidateCertDataOverridesFiles(t *testing.T) { - tempFile, _ := ioutil.TempFile("", "") - defer os.Remove(tempFile.Name()) - - config := clientcmdapi.NewConfig() - config.AuthInfos["clean"] = &clientcmdapi.AuthInfo{ - ClientCertificate: tempFile.Name(), - ClientCertificateData: []byte("certdata"), - ClientKey: tempFile.Name(), - ClientKeyData: []byte("keydata"), - } - test := configValidationTest{ - config: config, - expectedErrorSubstring: []string{"client-cert-data and client-cert are both specified", "client-key-data and client-key are both specified"}, - } - - test.testAuthInfo("clean", t) - test.testConfig(t) -} -func TestValidateCleanCertFilesAuthInfo(t *testing.T) { - tempFile, _ := ioutil.TempFile("", "") - defer os.Remove(tempFile.Name()) - - config := clientcmdapi.NewConfig() - config.AuthInfos["clean"] = &clientcmdapi.AuthInfo{ - ClientCertificate: tempFile.Name(), - ClientKey: tempFile.Name(), - } - test := configValidationTest{ - config: config, - } - - test.testAuthInfo("clean", t) - test.testConfig(t) -} -func TestValidateCleanTokenAuthInfo(t *testing.T) { - config := clientcmdapi.NewConfig() - config.AuthInfos["clean"] = &clientcmdapi.AuthInfo{ - Token: "any-value", - } - test := configValidationTest{ - config: config, - } - - test.testAuthInfo("clean", t) - test.testConfig(t) -} - -func TestValidateMultipleMethodsAuthInfo(t *testing.T) { - config := clientcmdapi.NewConfig() - config.AuthInfos["error"] = &clientcmdapi.AuthInfo{ - Token: "token", - Username: "username", - } - test := configValidationTest{ - config: config, - expectedErrorSubstring: []string{"more than one authentication method", "token", "basicAuth"}, - } - - test.testAuthInfo("error", t) - test.testConfig(t) -} - -type configValidationTest struct { - config *clientcmdapi.Config - expectedErrorSubstring []string -} - -func (c configValidationTest) testContext(contextName string, t *testing.T) { - errs := validateContext(contextName, *c.config.Contexts[contextName], *c.config) - - if len(c.expectedErrorSubstring) != 0 { - if len(errs) == 0 { - t.Errorf("Expected error containing: %v", c.expectedErrorSubstring) - } - for _, curr := range c.expectedErrorSubstring { - if len(errs) != 0 && !strings.Contains(utilerrors.NewAggregate(errs).Error(), curr) { - t.Errorf("Expected error containing: %v, but got %v", c.expectedErrorSubstring, utilerrors.NewAggregate(errs)) - } - } - - } else { - if len(errs) != 0 { - t.Errorf("Unexpected error: %v", utilerrors.NewAggregate(errs)) - } - } -} -func (c configValidationTest) testConfirmUsable(contextName string, t *testing.T) { - err := ConfirmUsable(*c.config, contextName) - - if len(c.expectedErrorSubstring) != 0 { - if err == nil { - t.Errorf("Expected error containing: %v", c.expectedErrorSubstring) - } else { - for _, curr := range c.expectedErrorSubstring { - if err != nil && !strings.Contains(err.Error(), curr) { - t.Errorf("Expected error containing: %v, but got %v", c.expectedErrorSubstring, err) - } - } - } - } else { - if err != nil { - t.Errorf("Unexpected error: %v", err) - } - } -} -func (c configValidationTest) testConfig(t *testing.T) { - err := Validate(*c.config) - - if len(c.expectedErrorSubstring) != 0 { - if err == nil { - t.Errorf("Expected error containing: %v", c.expectedErrorSubstring) - } else { - for _, curr := range c.expectedErrorSubstring { - if err != nil && !strings.Contains(err.Error(), curr) { - t.Errorf("Expected error containing: %v, but got %v", c.expectedErrorSubstring, err) - } - } - if !IsConfigurationInvalid(err) { - t.Errorf("all errors should be configuration invalid: %v", err) - } - } - } else { - if err != nil { - t.Errorf("Unexpected error: %v", err) - } - } -} -func (c configValidationTest) testCluster(clusterName string, t *testing.T) { - errs := validateClusterInfo(clusterName, *c.config.Clusters[clusterName]) - - if len(c.expectedErrorSubstring) != 0 { - if len(errs) == 0 { - t.Errorf("Expected error containing: %v", c.expectedErrorSubstring) - } - for _, curr := range c.expectedErrorSubstring { - if len(errs) != 0 && !strings.Contains(utilerrors.NewAggregate(errs).Error(), curr) { - t.Errorf("Expected error containing: %v, but got %v", c.expectedErrorSubstring, utilerrors.NewAggregate(errs)) - } - } - - } else { - if len(errs) != 0 { - t.Errorf("Unexpected error: %v", utilerrors.NewAggregate(errs)) - } - } -} - -func (c configValidationTest) testAuthInfo(authInfoName string, t *testing.T) { - errs := validateAuthInfo(authInfoName, *c.config.AuthInfos[authInfoName]) - - if len(c.expectedErrorSubstring) != 0 { - if len(errs) == 0 { - t.Errorf("Expected error containing: %v", c.expectedErrorSubstring) - } - for _, curr := range c.expectedErrorSubstring { - if len(errs) != 0 && !strings.Contains(utilerrors.NewAggregate(errs).Error(), curr) { - t.Errorf("Expected error containing: %v, but got %v", c.expectedErrorSubstring, utilerrors.NewAggregate(errs)) - } - } - - } else { - if len(errs) != 0 { - t.Errorf("Unexpected error: %v", utilerrors.NewAggregate(errs)) - } - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/client/unversioned/helper.go b/vendor/k8s.io/kubernetes/pkg/client/unversioned/helper.go index 7ab52346..c8d09ef4 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/unversioned/helper.go +++ b/vendor/k8s.io/kubernetes/pkg/client/unversioned/helper.go @@ -17,10 +17,10 @@ limitations under the License. package unversioned import ( + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/client/restclient" // Import solely to initialize client auth plugins. - _ "k8s.io/kubernetes/plugin/pkg/client/auth" + _ "k8s.io/client-go/plugin/pkg/client/auth" ) const ( diff --git a/vendor/k8s.io/kubernetes/pkg/client/unversioned/helper_test.go b/vendor/k8s.io/kubernetes/pkg/client/unversioned/helper_test.go index 4428b337..3e884acc 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/unversioned/helper_test.go +++ b/vendor/k8s.io/kubernetes/pkg/client/unversioned/helper_test.go @@ -26,9 +26,9 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" - "k8s.io/kubernetes/pkg/client/restclient" ) func TestSetKubernetesDefaults(t *testing.T) { diff --git a/vendor/k8s.io/kubernetes/pkg/client/unversioned/portforward/BUILD b/vendor/k8s.io/kubernetes/pkg/client/unversioned/portforward/BUILD index 29cafd31..a549554e 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/unversioned/portforward/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/unversioned/portforward/BUILD @@ -29,11 +29,11 @@ go_test( library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/client/restclient:go_default_library", "//pkg/client/unversioned/remotecommand:go_default_library", "//pkg/kubelet/server/portforward:go_default_library", "//pkg/util/httpstream:go_default_library", "//vendor:k8s.io/apimachinery/pkg/types", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/unversioned/portforward/portforward_test.go b/vendor/k8s.io/kubernetes/pkg/client/unversioned/portforward/portforward_test.go index 52ab89a5..9fec3427 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/unversioned/portforward/portforward_test.go +++ b/vendor/k8s.io/kubernetes/pkg/client/unversioned/portforward/portforward_test.go @@ -32,7 +32,7 @@ import ( "time" "k8s.io/apimachinery/pkg/types" - "k8s.io/kubernetes/pkg/client/restclient" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/client/unversioned/remotecommand" "k8s.io/kubernetes/pkg/kubelet/server/portforward" "k8s.io/kubernetes/pkg/util/httpstream" diff --git a/vendor/k8s.io/kubernetes/pkg/client/unversioned/remotecommand/BUILD b/vendor/k8s.io/kubernetes/pkg/client/unversioned/remotecommand/BUILD index 1f886caa..b39f0684 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/unversioned/remotecommand/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/unversioned/remotecommand/BUILD @@ -22,8 +22,6 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/api:go_default_library", - "//pkg/client/restclient:go_default_library", - "//pkg/client/transport:go_default_library", "//pkg/kubelet/server/remotecommand:go_default_library", "//pkg/util/exec:go_default_library", "//pkg/util/httpstream:go_default_library", @@ -32,6 +30,8 @@ go_library( "//vendor:github.com/golang/glog", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/util/runtime", + "//vendor:k8s.io/client-go/rest", + "//vendor:k8s.io/client-go/transport", ], ) @@ -47,7 +47,6 @@ go_test( deps = [ "//pkg/api:go_default_library", "//pkg/api/testapi:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/kubelet/server/remotecommand:go_default_library", "//pkg/util/httpstream:go_default_library", "//pkg/util/term:go_default_library", @@ -55,6 +54,7 @@ go_test( "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/wait", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/unversioned/remotecommand/remotecommand.go b/vendor/k8s.io/kubernetes/pkg/client/unversioned/remotecommand/remotecommand.go index 0cee2285..1086f369 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/unversioned/remotecommand/remotecommand.go +++ b/vendor/k8s.io/kubernetes/pkg/client/unversioned/remotecommand/remotecommand.go @@ -24,8 +24,8 @@ import ( "github.com/golang/glog" - "k8s.io/kubernetes/pkg/client/restclient" - "k8s.io/kubernetes/pkg/client/transport" + restclient "k8s.io/client-go/rest" + "k8s.io/client-go/transport" "k8s.io/kubernetes/pkg/kubelet/server/remotecommand" "k8s.io/kubernetes/pkg/util/httpstream" "k8s.io/kubernetes/pkg/util/httpstream/spdy" diff --git a/vendor/k8s.io/kubernetes/pkg/client/unversioned/remotecommand/remotecommand_test.go b/vendor/k8s.io/kubernetes/pkg/client/unversioned/remotecommand/remotecommand_test.go index be6cf93a..1d4886e7 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/unversioned/remotecommand/remotecommand_test.go +++ b/vendor/k8s.io/kubernetes/pkg/client/unversioned/remotecommand/remotecommand_test.go @@ -33,9 +33,9 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/kubelet/server/remotecommand" "k8s.io/kubernetes/pkg/util/httpstream" "k8s.io/kubernetes/pkg/util/term" diff --git a/vendor/k8s.io/kubernetes/pkg/client/unversioned/testclient/simple/BUILD b/vendor/k8s.io/kubernetes/pkg/client/unversioned/testclient/simple/BUILD index 3a96ec1e..8a24295d 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/unversioned/testclient/simple/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/client/unversioned/testclient/simple/BUILD @@ -15,12 +15,12 @@ go_library( "//pkg/api:go_default_library", "//pkg/api/testapi:go_default_library", "//pkg/client/clientset_generated/internalclientset:go_default_library", - "//pkg/client/restclient:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/util/testing:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", + "//vendor:k8s.io/client-go/rest", + "//vendor:k8s.io/client-go/util/testing", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/unversioned/testclient/simple/simple_testclient.go b/vendor/k8s.io/kubernetes/pkg/client/unversioned/testclient/simple/simple_testclient.go index 73ba6066..a9f948dd 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/unversioned/testclient/simple/simple_testclient.go +++ b/vendor/k8s.io/kubernetes/pkg/client/unversioned/testclient/simple/simple_testclient.go @@ -25,14 +25,14 @@ import ( "testing" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" + restclient "k8s.io/client-go/rest" + utiltesting "k8s.io/client-go/util/testing" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" - "k8s.io/kubernetes/pkg/client/restclient" - "k8s.io/kubernetes/pkg/fields" - utiltesting "k8s.io/kubernetes/pkg/util/testing" ) const NameRequiredError = "resource name may not be empty" diff --git a/vendor/k8s.io/kubernetes/pkg/cloudprovider/OWNERS b/vendor/k8s.io/kubernetes/pkg/cloudprovider/OWNERS index eeb7982b..657fe579 100644 --- a/vendor/k8s.io/kubernetes/pkg/cloudprovider/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/cloudprovider/OWNERS @@ -1,4 +1,42 @@ -assignees: - - mikedanese -owners: - - mikedanese +approvers: +- mikedanese +reviewers: +- thockin +- lavalamp +- smarterclayton +- wojtek-t +- deads2k +- brendandburns +- derekwaynecarr +- caesarxuchao +- vishh +- mikedanese +- liggitt +- bprashanth +- gmarek +- erictune +- davidopp +- pmorie +- sttts +- quinton-hoole +- dchen1107 +- saad-ali +- zmerlynn +- luxas +- justinsb +- roberthbailey +- eparis +- jlowdermilk +- piosz +- jsafrane +- dims +- krousey +- rootfs +- jszczepkowski +- markturansky +- vmarmol +- girishkalele +- satnam6502 +- jdef +- freehan +- jingxu97 diff --git a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/aws/BUILD b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/aws/BUILD index e1f241d6..67e41d25 100644 --- a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/aws/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/aws/BUILD @@ -18,6 +18,7 @@ go_library( "aws_utils.go", "device_allocator.go", "log_handler.go", + "regions.go", "retry_handler.go", "sets_ippermissions.go", "volumes.go", @@ -53,6 +54,7 @@ go_test( srcs = [ "aws_test.go", "device_allocator_test.go", + "regions_test.go", "retry_handler_test.go", ], library = ":go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/aws/OWNERS b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/aws/OWNERS index 3c625f94..0258cfc9 100644 --- a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/aws/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/aws/OWNERS @@ -1,2 +1,2 @@ -assignees: - - justinsb +approvers: +- justinsb diff --git a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/aws/aws.go b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/aws/aws.go index 93b61525..758d27f7 100644 --- a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/aws/aws.go +++ b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/aws/aws.go @@ -48,7 +48,6 @@ import ( "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/api/v1/service" "k8s.io/kubernetes/pkg/cloudprovider" - awscredentials "k8s.io/kubernetes/pkg/credentialprovider/aws" "k8s.io/kubernetes/pkg/volume" ) @@ -182,7 +181,7 @@ const DefaultVolumeType = "gp2" // See http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/volume_limits.html#linux-specific-volume-limits const DefaultMaxEBSVolumes = 39 -// Used to call awscredentials.Init() just once +// Used to call RecognizeWellKnownRegions just once var once sync.Once // Services is an abstraction over AWS, to allow mocking/other implementations @@ -691,6 +690,7 @@ func init() { }, &credentials.SharedCredentialsProvider{}, }) + aws := newAWSSDKProvider(creds) return newAWSCloud(config, aws) }) @@ -732,15 +732,6 @@ func getAvailabilityZone(metadata EC2Metadata) (string, error) { return metadata.GetMetadata("placement/availability-zone") } -func isRegionValid(region string) bool { - for _, r := range awscredentials.AWSRegions { - if r == region { - return true - } - } - return false -} - // Derives the region from a valid az name. // Returns an error if the az is known invalid (empty) func azToRegion(az string) (string, error) { @@ -777,9 +768,14 @@ func newAWSCloud(config io.Reader, awsServices Services) (*Cloud, error) { return nil, err } + // Trust that if we get a region from configuration or AWS metadata that it is valid, + // and register ECR providers + RecognizeRegion(regionName) + if !cfg.Global.DisableStrictZoneCheck { valid := isRegionValid(regionName) if !valid { + // This _should_ now be unreachable, given we call RecognizeRegion return nil, fmt.Errorf("not a valid AWS zone (unknown region): %s", zone) } } else { @@ -848,9 +844,9 @@ func newAWSCloud(config io.Reader, awsServices Services) (*Cloud, error) { glog.Infof("AWS cloud - no tag filtering") } - // Register handler for ECR credentials + // Register regions, in particular for ECR credentials once.Do(func() { - awscredentials.Init() + RecognizeWellKnownRegions() }) return awsCloud, nil @@ -1175,16 +1171,16 @@ func (i *awsInstance) describeInstance() (*ec2.Instance, error) { // Gets the mountDevice already assigned to the volume, or assigns an unused mountDevice. // If the volume is already assigned, this will return the existing mountDevice with alreadyAttached=true. // Otherwise the mountDevice is assigned by finding the first available mountDevice, and it is returned with alreadyAttached=false. -func (c *Cloud) getMountDevice(i *awsInstance, volumeID awsVolumeID, assign bool) (assigned mountDevice, alreadyAttached bool, err error) { +func (c *Cloud) getMountDevice( + i *awsInstance, + info *ec2.Instance, + volumeID awsVolumeID, + assign bool) (assigned mountDevice, alreadyAttached bool, err error) { instanceType := i.getInstanceType() if instanceType == nil { return "", false, fmt.Errorf("could not get instance type for instance: %s", i.awsID) } - info, err := i.describeInstance() - if err != nil { - return "", false, err - } deviceMappings := map[mountDevice]awsVolumeID{} for _, blockDevice := range info.BlockDeviceMappings { name := aws.StringValue(blockDevice.DeviceName) @@ -1441,7 +1437,7 @@ func (c *Cloud) AttachDisk(diskName KubernetesVolumeID, nodeName types.NodeName, return "", err } - awsInstance, err := c.getAwsInstance(nodeName) + awsInstance, info, err := c.getFullInstance(nodeName) if err != nil { return "", fmt.Errorf("error finding instance %s: %v", nodeName, err) } @@ -1468,7 +1464,7 @@ func (c *Cloud) AttachDisk(diskName KubernetesVolumeID, nodeName types.NodeName, } }() - mountDevice, alreadyAttached, err = c.getMountDevice(awsInstance, disk.awsID, true) + mountDevice, alreadyAttached, err = c.getMountDevice(awsInstance, info, disk.awsID, true) if err != nil { return "", err } @@ -1528,7 +1524,7 @@ func (c *Cloud) DetachDisk(diskName KubernetesVolumeID, nodeName types.NodeName) return "", err } - awsInstance, err := c.getAwsInstance(nodeName) + awsInstance, info, err := c.getFullInstance(nodeName) if err != nil { if err == cloudprovider.InstanceNotFound { // If instance no longer exists, safe to assume volume is not attached. @@ -1542,7 +1538,7 @@ func (c *Cloud) DetachDisk(diskName KubernetesVolumeID, nodeName types.NodeName) return "", err } - mountDevice, alreadyAttached, err := c.getMountDevice(awsInstance, disk.awsID, false) + mountDevice, alreadyAttached, err := c.getMountDevice(awsInstance, info, disk.awsID, false) if err != nil { return "", err } @@ -1726,7 +1722,7 @@ func (c *Cloud) GetDiskPath(volumeName KubernetesVolumeID) (string, error) { // DiskIsAttached implements Volumes.DiskIsAttached func (c *Cloud) DiskIsAttached(diskName KubernetesVolumeID, nodeName types.NodeName) (bool, error) { - awsInstance, err := c.getAwsInstance(nodeName) + _, instance, err := c.getFullInstance(nodeName) if err != nil { if err == cloudprovider.InstanceNotFound { // If instance no longer exists, safe to assume volume is not attached. @@ -1745,11 +1741,7 @@ func (c *Cloud) DiskIsAttached(diskName KubernetesVolumeID, nodeName types.NodeN return false, fmt.Errorf("error mapping volume spec %q to aws id: %v", diskName, err) } - info, err := awsInstance.describeInstance() - if err != nil { - return false, err - } - for _, blockDevice := range info.BlockDeviceMappings { + for _, blockDevice := range instance.BlockDeviceMappings { id := awsVolumeID(aws.StringValue(blockDevice.Ebs.VolumeId)) if id == diskID { return true, nil @@ -1769,7 +1761,7 @@ func (c *Cloud) DisksAreAttached(diskNames []KubernetesVolumeID, nodeName types. idToDiskName[volumeID] = diskName attached[diskName] = false } - awsInstance, err := c.getAwsInstance(nodeName) + _, instance, err := c.getFullInstance(nodeName) if err != nil { if err == cloudprovider.InstanceNotFound { // If instance no longer exists, safe to assume volume is not attached. @@ -1782,11 +1774,7 @@ func (c *Cloud) DisksAreAttached(diskNames []KubernetesVolumeID, nodeName types. return attached, err } - info, err := awsInstance.describeInstance() - if err != nil { - return attached, err - } - for _, blockDevice := range info.BlockDeviceMappings { + for _, blockDevice := range instance.BlockDeviceMappings { volumeID := awsVolumeID(aws.StringValue(blockDevice.Ebs.VolumeId)) diskName, found := idToDiskName[volumeID] if found { @@ -3136,7 +3124,7 @@ func (c *Cloud) getInstanceByID(instanceID string) (*ec2.Instance, error) { } if len(instances) == 0 { - return nil, fmt.Errorf("no instances found for instance: %s", instanceID) + return nil, cloudprovider.InstanceNotFound } if len(instances) > 1 { return nil, fmt.Errorf("multiple instances found for instance: %s", instanceID) @@ -3267,6 +3255,19 @@ func (c *Cloud) getInstanceByNodeName(nodeName types.NodeName) (*ec2.Instance, e return instance, err } +func (c *Cloud) getFullInstance(nodeName types.NodeName) (*awsInstance, *ec2.Instance, error) { + if nodeName == "" { + instance, err := c.getInstanceByID(c.selfAWSInstance.awsID) + return c.selfAWSInstance, instance, err + } + instance, err := c.getInstanceByNodeName(nodeName) + if err != nil { + return nil, nil, err + } + awsInstance := newAWSInstance(c.ec2, instance) + return awsInstance, instance, err +} + // Add additional filters, to match on our tags // This lets us run multiple k8s clusters in a single EC2 AZ func (c *Cloud) addFilters(filters []*ec2.Filter) []*ec2.Filter { diff --git a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/aws/aws_test.go b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/aws/aws_test.go index 24231702..4096a7b4 100644 --- a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/aws/aws_test.go +++ b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/aws/aws_test.go @@ -210,11 +210,6 @@ func TestNewAWSCloud(t *testing.T) { nil, NewFakeAWSServices().withAz(""), true, "", }, - { - "Config specified invalid zone", - strings.NewReader("[global]\nzone = blahonga"), NewFakeAWSServices(), - true, "", - }, { "Config specifies valid zone", strings.NewReader("[global]\nzone = eu-west-1a"), NewFakeAWSServices(), @@ -1106,7 +1101,7 @@ func TestDescribeLoadBalancerOnDelete(t *testing.T) { c, _ := newAWSCloud(strings.NewReader("[global]"), awsServices) awsServices.elb.expectDescribeLoadBalancers("aid") - c.EnsureLoadBalancerDeleted(TestClusterName, &v1.Service{ObjectMeta: v1.ObjectMeta{Name: "myservice", UID: "id"}}) + c.EnsureLoadBalancerDeleted(TestClusterName, &v1.Service{ObjectMeta: metav1.ObjectMeta{Name: "myservice", UID: "id"}}) } func TestDescribeLoadBalancerOnUpdate(t *testing.T) { @@ -1114,7 +1109,7 @@ func TestDescribeLoadBalancerOnUpdate(t *testing.T) { c, _ := newAWSCloud(strings.NewReader("[global]"), awsServices) awsServices.elb.expectDescribeLoadBalancers("aid") - c.UpdateLoadBalancer(TestClusterName, &v1.Service{ObjectMeta: v1.ObjectMeta{Name: "myservice", UID: "id"}}, []*v1.Node{}) + c.UpdateLoadBalancer(TestClusterName, &v1.Service{ObjectMeta: metav1.ObjectMeta{Name: "myservice", UID: "id"}}, []*v1.Node{}) } func TestDescribeLoadBalancerOnGet(t *testing.T) { @@ -1122,7 +1117,7 @@ func TestDescribeLoadBalancerOnGet(t *testing.T) { c, _ := newAWSCloud(strings.NewReader("[global]"), awsServices) awsServices.elb.expectDescribeLoadBalancers("aid") - c.GetLoadBalancer(TestClusterName, &v1.Service{ObjectMeta: v1.ObjectMeta{Name: "myservice", UID: "id"}}) + c.GetLoadBalancer(TestClusterName, &v1.Service{ObjectMeta: metav1.ObjectMeta{Name: "myservice", UID: "id"}}) } func TestDescribeLoadBalancerOnEnsure(t *testing.T) { @@ -1130,7 +1125,7 @@ func TestDescribeLoadBalancerOnEnsure(t *testing.T) { c, _ := newAWSCloud(strings.NewReader("[global]"), awsServices) awsServices.elb.expectDescribeLoadBalancers("aid") - c.EnsureLoadBalancer(TestClusterName, &v1.Service{ObjectMeta: v1.ObjectMeta{Name: "myservice", UID: "id"}}, []*v1.Node{}) + c.EnsureLoadBalancer(TestClusterName, &v1.Service{ObjectMeta: metav1.ObjectMeta{Name: "myservice", UID: "id"}}, []*v1.Node{}) } func TestBuildListener(t *testing.T) { diff --git a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/aws/regions.go b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/aws/regions.go new file mode 100644 index 00000000..dc574477 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/aws/regions.go @@ -0,0 +1,94 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package aws + +import ( + "github.com/golang/glog" + "k8s.io/apimachinery/pkg/util/sets" + awscredentialprovider "k8s.io/kubernetes/pkg/credentialprovider/aws" + "sync" +) + +// WellKnownRegions is the complete list of regions known to the AWS cloudprovider +// and credentialprovider. +var WellKnownRegions = [...]string{ + // from `aws ec2 describe-regions --region us-east-1 --query Regions[].RegionName | sort` + "ap-northeast-1", + "ap-northeast-2", + "ap-south-1", + "ap-southeast-1", + "ap-southeast-2", + "ca-central-1", + "eu-central-1", + "eu-west-1", + "eu-west-2", + "sa-east-1", + "us-east-1", + "us-east-2", + "us-west-1", + "us-west-2", + + // these are not registered in many / most accounts + "cn-north-1", + "us-gov-west-1", +} + +// awsRegionsMutex protects awsRegions +var awsRegionsMutex sync.Mutex + +// awsRegions is a set of recognized regions +var awsRegions sets.String + +// RecognizeRegion is called for each AWS region we know about. +// It currently registers a credential provider for that region. +// There are two paths to discovering a region: +// * we hard-code some well-known regions +// * if a region is discovered from instance metadata, we add that +func RecognizeRegion(region string) { + awsRegionsMutex.Lock() + defer awsRegionsMutex.Unlock() + + if awsRegions == nil { + awsRegions = sets.NewString() + } + + if awsRegions.Has(region) { + glog.V(6).Infof("found AWS region %q again - ignoring", region) + return + } + + glog.V(4).Infof("found AWS region %q", region) + + awscredentialprovider.RegisterCredentialsProvider(region) + + awsRegions.Insert(region) +} + +// RecognizeWellKnownRegions calls RecognizeRegion on each WellKnownRegion +func RecognizeWellKnownRegions() { + for _, region := range WellKnownRegions { + RecognizeRegion(region) + } +} + +// isRegionValid checks if the region is in the set of known regions +func isRegionValid(region string) bool { + awsRegionsMutex.Lock() + defer awsRegionsMutex.Unlock() + + return awsRegions.Has(region) +} diff --git a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/aws/regions_test.go b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/aws/regions_test.go new file mode 100644 index 00000000..74f9a7bd --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/aws/regions_test.go @@ -0,0 +1,85 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package aws + +import ( + "testing" +) + +// TestRegions does basic checking of region verification / addition +func TestRegions(t *testing.T) { + RecognizeWellKnownRegions() + + tests := []struct { + Add string + Lookup string + ExpectIsRegion bool + }{ + { + Lookup: "us-east-1", + ExpectIsRegion: true, + }, + { + Lookup: "us-east-1a", + ExpectIsRegion: false, + }, + { + Add: "us-test-1", + Lookup: "us-east-1", + ExpectIsRegion: true, + }, + { + Lookup: "us-test-1", + ExpectIsRegion: true, + }, + { + Add: "us-test-1", + Lookup: "us-test-1", + ExpectIsRegion: true, + }, + } + + for _, test := range tests { + if test.Add != "" { + RecognizeRegion(test.Add) + } + + if test.Lookup != "" { + if isRegionValid(test.Lookup) != test.ExpectIsRegion { + t.Fatalf("region valid mismatch: %q", test.Lookup) + } + } + } +} + +// TestRecognizesNewRegion verifies that we see a region from metadata, we recognize it as valid +func TestRecognizesNewRegion(t *testing.T) { + region := "us-testrecognizesnewregion-1" + if isRegionValid(region) { + t.Fatalf("region already valid: %q", region) + } + + awsServices := NewFakeAWSServices().withAz(region + "a") + _, err := newAWSCloud(nil, awsServices) + if err != nil { + t.Errorf("error building AWS cloud: %v", err) + } + + if !isRegionValid(region) { + t.Fatalf("newly discovered region not valid: %q", region) + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/azure/OWNERS b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/azure/OWNERS index 120b921b..20dd43b3 100644 --- a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/azure/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/azure/OWNERS @@ -1,3 +1,3 @@ -assignees: - - colemickens - - brendandburns +approvers: +- brendandburns +- colemickens diff --git a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/azure/azure.go b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/azure/azure.go index c47c2127..aa4eedb7 100644 --- a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/azure/azure.go +++ b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/azure/azure.go @@ -27,6 +27,7 @@ import ( "github.com/Azure/azure-sdk-for-go/arm/storage" "github.com/Azure/go-autorest/autorest/azure" "github.com/ghodss/yaml" + "time" ) // CloudProviderName is the value used for the --cloud-provider flag @@ -128,6 +129,7 @@ func NewCloud(configReader io.Reader) (cloudprovider.Interface, error) { az.VirtualMachinesClient = compute.NewVirtualMachinesClient(az.SubscriptionID) az.VirtualMachinesClient.BaseURI = az.Environment.ResourceManagerEndpoint az.VirtualMachinesClient.Authorizer = servicePrincipalToken + az.VirtualMachinesClient.PollingDelay = 5 * time.Second az.PublicIPAddressesClient = network.NewPublicIPAddressesClient(az.SubscriptionID) az.PublicIPAddressesClient.BaseURI = az.Environment.ResourceManagerEndpoint diff --git a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/cloudstack/BUILD b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/cloudstack/BUILD index 8452aeaf..b67ee36a 100644 --- a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/cloudstack/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/cloudstack/BUILD @@ -29,7 +29,10 @@ go_test( srcs = ["cloudstack_test.go"], library = ":go_default_library", tags = ["automanaged"], - deps = ["//pkg/api/v1:go_default_library"], + deps = [ + "//pkg/api/v1:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + ], ) filegroup( diff --git a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/cloudstack/OWNERS b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/cloudstack/OWNERS index 4ccd0d16..59ab3b0d 100644 --- a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/cloudstack/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/cloudstack/OWNERS @@ -1,4 +1,4 @@ -assignees: -- runseb +approvers: - ngtuna +- runseb - svanharmelen diff --git a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/cloudstack/cloudstack_test.go b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/cloudstack/cloudstack_test.go index 25f6795b..3c2ca55a 100644 --- a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/cloudstack/cloudstack_test.go +++ b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/cloudstack/cloudstack_test.go @@ -22,6 +22,7 @@ import ( "strings" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" ) @@ -111,7 +112,7 @@ func TestLoadBalancer(t *testing.T) { t.Fatalf("LoadBalancer() returned false") } - _, exists, err := lb.GetLoadBalancer(testClusterName, &v1.Service{ObjectMeta: v1.ObjectMeta{Name: "noexist"}}) + _, exists, err := lb.GetLoadBalancer(testClusterName, &v1.Service{ObjectMeta: metav1.ObjectMeta{Name: "noexist"}}) if err != nil { t.Fatalf("GetLoadBalancer(\"noexist\") returned error: %s", err) } diff --git a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/BUILD b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/BUILD index 677e771b..bd5785d0 100644 --- a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/BUILD @@ -20,7 +20,6 @@ go_library( "//pkg/api/v1:go_default_library", "//pkg/api/v1/service:go_default_library", "//pkg/cloudprovider:go_default_library", - "//pkg/util/flowcontrol:go_default_library", "//pkg/util/net/sets:go_default_library", "//pkg/volume:go_default_library", "//vendor:cloud.google.com/go/compute/metadata", @@ -37,6 +36,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/util/errors", "//vendor:k8s.io/apimachinery/pkg/util/sets", "//vendor:k8s.io/apimachinery/pkg/util/wait", + "//vendor:k8s.io/client-go/util/flowcontrol", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce.go b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce.go index 14d53f9e..b165dc5f 100644 --- a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce.go +++ b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/gce.go @@ -35,10 +35,10 @@ import ( utilerrors "k8s.io/apimachinery/pkg/util/errors" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/client-go/util/flowcontrol" "k8s.io/kubernetes/pkg/api/v1" apiservice "k8s.io/kubernetes/pkg/api/v1/service" "k8s.io/kubernetes/pkg/cloudprovider" - "k8s.io/kubernetes/pkg/util/flowcontrol" netsets "k8s.io/kubernetes/pkg/util/net/sets" "k8s.io/kubernetes/pkg/volume" diff --git a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/token_source.go b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/token_source.go index a30cae57..2f4bb091 100644 --- a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/token_source.go +++ b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/gce/token_source.go @@ -22,7 +22,7 @@ import ( "strings" "time" - "k8s.io/kubernetes/pkg/util/flowcontrol" + "k8s.io/client-go/util/flowcontrol" "github.com/prometheus/client_golang/prometheus" "golang.org/x/oauth2" diff --git a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/openstack/BUILD b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/openstack/BUILD index 0ca9db5c..54f0abb9 100644 --- a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/openstack/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/openstack/BUILD @@ -71,6 +71,7 @@ go_test( "//pkg/cloudprovider:go_default_library", "//vendor:github.com/rackspace/gophercloud", "//vendor:github.com/rackspace/gophercloud/openstack/compute/v2/servers", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/rand", ], diff --git a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/openstack/OWNERS b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/openstack/OWNERS index 91cc8e2a..da5f5db8 100644 --- a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/openstack/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/openstack/OWNERS @@ -1,3 +1,2 @@ -assignees: +approvers: - anguslees -- dagnello diff --git a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/openstack/openstack_test.go b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/openstack/openstack_test.go index 66580076..c3a6fc04 100644 --- a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/openstack/openstack_test.go +++ b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/openstack/openstack_test.go @@ -27,6 +27,7 @@ import ( "github.com/rackspace/gophercloud" "github.com/rackspace/gophercloud/openstack/compute/v2/servers" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/rand" "k8s.io/kubernetes/pkg/api/v1" ) @@ -294,7 +295,7 @@ func TestLoadBalancer(t *testing.T) { t.Fatalf("LoadBalancer() returned false - perhaps your stack doesn't support Neutron?") } - _, exists, err := lb.GetLoadBalancer(testClusterName, &v1.Service{ObjectMeta: v1.ObjectMeta{Name: "noexist"}}) + _, exists, err := lb.GetLoadBalancer(testClusterName, &v1.Service{ObjectMeta: metav1.ObjectMeta{Name: "noexist"}}) if err != nil { t.Fatalf("GetLoadBalancer(\"noexist\") returned error: %s", err) } diff --git a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/vsphere/OWNERS b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/vsphere/OWNERS index fc748a4e..4557d992 100644 --- a/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/vsphere/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/cloudprovider/providers/vsphere/OWNERS @@ -1,7 +1,5 @@ -maintainers: -- dagnello -- abithap -- imkin +approvers: - abrarshivani +- imkin - kerneltime - luomiao diff --git a/vendor/k8s.io/kubernetes/pkg/controller/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/BUILD index 4fed427d..e4a86ea2 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/BUILD @@ -27,22 +27,24 @@ go_library( "//pkg/client/clientset_generated/clientset:go_default_library", "//pkg/client/clientset_generated/clientset/typed/core/v1:go_default_library", "//pkg/client/record:go_default_library", - "//pkg/client/restclient:go_default_library", - "//pkg/fields:go_default_library", "//pkg/serviceaccount:go_default_library", - "//pkg/util/clock:go_default_library", "//pkg/util/hash:go_default_library", - "//pkg/util/integer:go_default_library", "//vendor:github.com/golang/glog", "//vendor:github.com/golang/groupcache/lru", "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/api/meta", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/sets", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/apiserver/pkg/authentication/serviceaccount", + "//vendor:k8s.io/client-go/rest", + "//vendor:k8s.io/client-go/util/clock", + "//vendor:k8s.io/client-go/util/integer", ], ) @@ -58,14 +60,14 @@ go_test( "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", "//pkg/client/record:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/securitycontext:go_default_library", - "//pkg/util/clock:go_default_library", - "//pkg/util/testing:go_default_library", "//pkg/util/uuid:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/sets", + "//vendor:k8s.io/client-go/rest", + "//vendor:k8s.io/client-go/util/clock", + "//vendor:k8s.io/client-go/util/testing", ], ) @@ -92,7 +94,6 @@ filegroup( "//pkg/controller/job:all-srcs", "//pkg/controller/namespace:all-srcs", "//pkg/controller/node:all-srcs", - "//pkg/controller/petset:all-srcs", "//pkg/controller/podautoscaler:all-srcs", "//pkg/controller/podgc:all-srcs", "//pkg/controller/replicaset:all-srcs", @@ -101,6 +102,7 @@ filegroup( "//pkg/controller/route:all-srcs", "//pkg/controller/service:all-srcs", "//pkg/controller/serviceaccount:all-srcs", + "//pkg/controller/statefulset:all-srcs", "//pkg/controller/volume/attachdetach:all-srcs", "//pkg/controller/volume/persistentvolume:all-srcs", ], diff --git a/vendor/k8s.io/kubernetes/pkg/controller/certificates/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/certificates/BUILD index 0a52759a..4dbf87c4 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/certificates/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/certificates/BUILD @@ -19,12 +19,12 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api/v1:go_default_library", - "//pkg/apis/certificates/v1alpha1:go_default_library", + "//pkg/apis/certificates/v1beta1:go_default_library", "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", - "//pkg/client/clientset_generated/clientset/typed/certificates/v1alpha1:go_default_library", + "//pkg/client/clientset_generated/clientset/typed/certificates/v1beta1:go_default_library", "//pkg/client/clientset_generated/clientset/typed/core/v1:go_default_library", + "//pkg/client/legacylisters:go_default_library", "//pkg/client/record:go_default_library", "//pkg/controller:go_default_library", "//pkg/util/workqueue:go_default_library", @@ -33,6 +33,7 @@ go_library( "//vendor:github.com/cloudflare/cfssl/signer", "//vendor:github.com/cloudflare/cfssl/signer/local", "//vendor:github.com/golang/glog", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/runtime", "//vendor:k8s.io/apimachinery/pkg/util/wait", @@ -67,7 +68,7 @@ go_test( library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/apis/certificates/v1alpha1:go_default_library", - "//pkg/util/cert:go_default_library", + "//pkg/apis/certificates/v1beta1:go_default_library", + "//vendor:k8s.io/client-go/util/cert", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/certificates/certificate_controller.go b/vendor/k8s.io/kubernetes/pkg/controller/certificates/certificate_controller.go index 8d7d4141..55b2fe38 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/certificates/certificate_controller.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/certificates/certificate_controller.go @@ -20,15 +20,16 @@ import ( "fmt" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apimachinery/pkg/watch" - "k8s.io/kubernetes/pkg/api/v1" - certificates "k8s.io/kubernetes/pkg/apis/certificates/v1alpha1" + certificates "k8s.io/kubernetes/pkg/apis/certificates/v1beta1" "k8s.io/kubernetes/pkg/client/cache" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" v1core "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1" + "k8s.io/kubernetes/pkg/client/legacylisters" "k8s.io/kubernetes/pkg/client/record" "k8s.io/kubernetes/pkg/controller" "k8s.io/kubernetes/pkg/util/workqueue" @@ -49,7 +50,7 @@ type CertificateController struct { // CSR framework and store csrController cache.Controller - csrStore cache.StoreToCertificateRequestLister + csrStore listers.StoreToCertificateRequestLister syncHandler func(csrKey string) error @@ -80,10 +81,10 @@ func NewCertificateController(kubeClient clientset.Interface, syncPeriod time.Du // Manage the addition/update of certificate requests cc.csrStore.Store, cc.csrController = cache.NewInformer( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { return cc.kubeClient.Certificates().CertificateSigningRequests().List(options) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { return cc.kubeClient.Certificates().CertificateSigningRequests().Watch(options) }, }, diff --git a/vendor/k8s.io/kubernetes/pkg/controller/certificates/certificate_controller_utils.go b/vendor/k8s.io/kubernetes/pkg/controller/certificates/certificate_controller_utils.go index 623b1a95..d8d8df60 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/certificates/certificate_controller_utils.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/certificates/certificate_controller_utils.go @@ -16,7 +16,7 @@ limitations under the License. package certificates -import certificates "k8s.io/kubernetes/pkg/apis/certificates/v1alpha1" +import certificates "k8s.io/kubernetes/pkg/apis/certificates/v1beta1" // IsCertificateRequestApproved returns true if a certificate request has the // "Approved" condition and no "Denied" conditions; false otherwise. diff --git a/vendor/k8s.io/kubernetes/pkg/controller/certificates/cfssl_signer.go b/vendor/k8s.io/kubernetes/pkg/controller/certificates/cfssl_signer.go index a6f50e2f..1670a4cb 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/certificates/cfssl_signer.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/certificates/cfssl_signer.go @@ -23,7 +23,7 @@ import ( "io/ioutil" "os" - certificates "k8s.io/kubernetes/pkg/apis/certificates/v1alpha1" + certificates "k8s.io/kubernetes/pkg/apis/certificates/v1beta1" "github.com/cloudflare/cfssl/config" "github.com/cloudflare/cfssl/helpers" diff --git a/vendor/k8s.io/kubernetes/pkg/controller/certificates/cfssl_signer_test.go b/vendor/k8s.io/kubernetes/pkg/controller/certificates/cfssl_signer_test.go index 3abd425c..81d95b9e 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/certificates/cfssl_signer_test.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/certificates/cfssl_signer_test.go @@ -22,8 +22,8 @@ import ( "reflect" "testing" - capi "k8s.io/kubernetes/pkg/apis/certificates/v1alpha1" - "k8s.io/kubernetes/pkg/util/cert" + "k8s.io/client-go/util/cert" + capi "k8s.io/kubernetes/pkg/apis/certificates/v1beta1" ) func TestSigner(t *testing.T) { diff --git a/vendor/k8s.io/kubernetes/pkg/controller/certificates/groupapprove.go b/vendor/k8s.io/kubernetes/pkg/controller/certificates/groupapprove.go index fb97d18b..b2a04585 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/certificates/groupapprove.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/certificates/groupapprove.go @@ -22,8 +22,8 @@ import ( "strings" utilruntime "k8s.io/apimachinery/pkg/util/runtime" - certificates "k8s.io/kubernetes/pkg/apis/certificates/v1alpha1" - clientcertificates "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1alpha1" + certificates "k8s.io/kubernetes/pkg/apis/certificates/v1beta1" + clientcertificates "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1" ) // groupApprover implements AutoApprover for signing Kubelet certificates. diff --git a/vendor/k8s.io/kubernetes/pkg/controller/certificates/groupapprove_test.go b/vendor/k8s.io/kubernetes/pkg/controller/certificates/groupapprove_test.go index 881349fc..921284b1 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/certificates/groupapprove_test.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/certificates/groupapprove_test.go @@ -19,7 +19,7 @@ package certificates import ( "testing" - certificates "k8s.io/kubernetes/pkg/apis/certificates/v1alpha1" + certificates "k8s.io/kubernetes/pkg/apis/certificates/v1beta1" ) func TestHasKubeletUsages(t *testing.T) { diff --git a/vendor/k8s.io/kubernetes/pkg/controller/client_builder.go b/vendor/k8s.io/kubernetes/pkg/controller/client_builder.go index 2e56277d..8299db98 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/client_builder.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/client_builder.go @@ -22,15 +22,16 @@ import ( apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" + apiserverserviceaccount "k8s.io/apiserver/pkg/authentication/serviceaccount" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/cache" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" v1core "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1" - "k8s.io/kubernetes/pkg/client/restclient" - "k8s.io/kubernetes/pkg/fields" "k8s.io/kubernetes/pkg/serviceaccount" "github.com/golang/glog" @@ -107,25 +108,25 @@ func (b SAControllerClientBuilder) Config(name string) (*restclient.Config, erro // check to see if the namespace exists. If it isn't a NotFound, just try to create the SA. // It'll probably fail, but perhaps that will have a better message. if _, err := b.CoreClient.Namespaces().Get(b.Namespace, metav1.GetOptions{}); apierrors.IsNotFound(err) { - _, err = b.CoreClient.Namespaces().Create(&v1.Namespace{ObjectMeta: v1.ObjectMeta{Name: b.Namespace}}) + _, err = b.CoreClient.Namespaces().Create(&v1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: b.Namespace}}) if err != nil && !apierrors.IsAlreadyExists(err) { return nil, err } } sa, err = b.CoreClient.ServiceAccounts(b.Namespace).Create( - &v1.ServiceAccount{ObjectMeta: v1.ObjectMeta{Namespace: b.Namespace, Name: name}}) + &v1.ServiceAccount{ObjectMeta: metav1.ObjectMeta{Namespace: b.Namespace, Name: name}}) if err != nil { return nil, err } } lw := &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { options.FieldSelector = fields.SelectorFromSet(map[string]string{api.SecretTypeField: string(v1.SecretTypeServiceAccountToken)}).String() return b.CoreClient.Secrets(b.Namespace).List(options) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { options.FieldSelector = fields.SelectorFromSet(map[string]string{api.SecretTypeField: string(v1.SecretTypeServiceAccountToken)}).String() return b.CoreClient.Secrets(b.Namespace).Watch(options) }, @@ -146,7 +147,7 @@ func (b SAControllerClientBuilder) Config(name string) (*restclient.Config, erro } // TODO maybe verify the token is valid clientConfig.BearerToken = string(secret.Data[v1.ServiceAccountTokenKey]) - restclient.AddUserAgent(clientConfig, serviceaccount.MakeUsername(b.Namespace, name)) + restclient.AddUserAgent(clientConfig, apiserverserviceaccount.MakeUsername(b.Namespace, name)) return true, nil default: diff --git a/vendor/k8s.io/kubernetes/pkg/controller/cloud/nodecontroller.go b/vendor/k8s.io/kubernetes/pkg/controller/cloud/nodecontroller.go index c7abe357..f7988017 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/cloud/nodecontroller.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/cloud/nodecontroller.go @@ -89,7 +89,7 @@ func (cnc *CloudNodeController) Run() { defer utilruntime.HandleCrash() go wait.Until(func() { - nodes, err := cnc.kubeClient.Core().Nodes().List(v1.ListOptions{ResourceVersion: "0"}) + nodes, err := cnc.kubeClient.Core().Nodes().List(metav1.ListOptions{ResourceVersion: "0"}) if err != nil { glog.Errorf("Error monitoring node status: %v", err) } diff --git a/vendor/k8s.io/kubernetes/pkg/controller/cloud/nodecontroller_test.go b/vendor/k8s.io/kubernetes/pkg/controller/cloud/nodecontroller_test.go index 93e9f62c..fd4fe84d 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/cloud/nodecontroller_test.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/cloud/nodecontroller_test.go @@ -39,7 +39,7 @@ import ( // and cloud provider says node is gone func TestNodeDeleted(t *testing.T) { pod0 := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "default", Name: "pod0", }, @@ -57,7 +57,7 @@ func TestNodeDeleted(t *testing.T) { } pod1 := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "default", Name: "pod1", }, @@ -77,7 +77,7 @@ func TestNodeDeleted(t *testing.T) { fnh := &testutil.FakeNodeHandler{ Existing: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), }, diff --git a/vendor/k8s.io/kubernetes/pkg/controller/controller_ref_manager.go b/vendor/k8s.io/kubernetes/pkg/controller/controller_ref_manager.go index 5d147e37..175f2ccf 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/controller_ref_manager.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/controller_ref_manager.go @@ -31,7 +31,7 @@ import ( type PodControllerRefManager struct { podControl PodControlInterface - controllerObject v1.ObjectMeta + controllerObject metav1.ObjectMeta controllerSelector labels.Selector controllerKind schema.GroupVersionKind } @@ -40,7 +40,7 @@ type PodControllerRefManager struct { // methods to manage the controllerRef of pods. func NewPodControllerRefManager( podControl PodControlInterface, - controllerObject v1.ObjectMeta, + controllerObject metav1.ObjectMeta, controllerSelector labels.Selector, controllerKind schema.GroupVersionKind, ) *PodControllerRefManager { @@ -93,7 +93,7 @@ func (m *PodControllerRefManager) Classify(pods []*v1.Pod) ( // GetControllerOf returns the controllerRef if controllee has a controller, // otherwise returns nil. -func GetControllerOf(controllee *v1.ObjectMeta) *metav1.OwnerReference { +func GetControllerOf(controllee *metav1.ObjectMeta) *metav1.OwnerReference { for i := range controllee.OwnerReferences { owner := &controllee.OwnerReferences[i] // controlled by other controller @@ -153,7 +153,7 @@ func (m *PodControllerRefManager) ReleasePod(pod *v1.Pod) error { // for more details. type ReplicaSetControllerRefManager struct { rsControl RSControlInterface - controllerObject v1.ObjectMeta + controllerObject metav1.ObjectMeta controllerSelector labels.Selector controllerKind schema.GroupVersionKind } @@ -162,7 +162,7 @@ type ReplicaSetControllerRefManager struct { // methods to manage the controllerRef of ReplicaSets. func NewReplicaSetControllerRefManager( rsControl RSControlInterface, - controllerObject v1.ObjectMeta, + controllerObject metav1.ObjectMeta, controllerSelector labels.Selector, controllerKind schema.GroupVersionKind, ) *ReplicaSetControllerRefManager { diff --git a/vendor/k8s.io/kubernetes/pkg/controller/controller_utils.go b/vendor/k8s.io/kubernetes/pkg/controller/controller_utils.go index 52364612..ca4aaac6 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/controller_utils.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/controller_utils.go @@ -28,7 +28,10 @@ import ( "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/client-go/util/clock" + "k8s.io/client-go/util/integer" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/api/validation" @@ -36,8 +39,6 @@ import ( "k8s.io/kubernetes/pkg/client/cache" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/pkg/client/record" - "k8s.io/kubernetes/pkg/util/clock" - "k8s.io/kubernetes/pkg/util/integer" ) const ( @@ -377,7 +378,7 @@ type RealRSControl struct { var _ RSControlInterface = &RealRSControl{} func (r RealRSControl) PatchReplicaSet(namespace, name string, data []byte) error { - _, err := r.KubeClient.Extensions().ReplicaSets(namespace).Patch(name, api.StrategicMergePatchType, data) + _, err := r.KubeClient.Extensions().ReplicaSets(namespace).Patch(name, types.StrategicMergePatchType, data) return err } @@ -477,7 +478,7 @@ func (r RealPodControl) CreatePodsOnNode(nodeName, namespace string, template *v } func (r RealPodControl) PatchPod(namespace, name string, data []byte) error { - _, err := r.KubeClient.Core().Pods(namespace).Patch(name, api.StrategicMergePatchType, data) + _, err := r.KubeClient.Core().Pods(namespace).Patch(name, types.StrategicMergePatchType, data) return err } @@ -495,7 +496,7 @@ func GetPodFromTemplate(template *v1.PodTemplateSpec, parentObject runtime.Objec prefix := getPodsPrefix(accessor.GetName()) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: desiredLabels, Annotations: desiredAnnotations, GenerateName: prefix, diff --git a/vendor/k8s.io/kubernetes/pkg/controller/controller_utils_test.go b/vendor/k8s.io/kubernetes/pkg/controller/controller_utils_test.go index 66a4d7d3..60dcaa35 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/controller_utils_test.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/controller_utils_test.go @@ -30,16 +30,16 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/sets" + restclient "k8s.io/client-go/rest" + "k8s.io/client-go/util/clock" + utiltesting "k8s.io/client-go/util/testing" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/cache" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/pkg/client/record" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/securitycontext" - "k8s.io/kubernetes/pkg/util/clock" - utiltesting "k8s.io/kubernetes/pkg/util/testing" "k8s.io/kubernetes/pkg/util/uuid" ) @@ -56,17 +56,17 @@ func NewFakeControllerExpectationsLookup(ttl time.Duration) (*ControllerExpectat func newReplicationController(replicas int) *v1.ReplicationController { rc := &v1.ReplicationController{ TypeMeta: metav1.TypeMeta{APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String()}, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: uuid.NewUUID(), Name: "foobar", - Namespace: v1.NamespaceDefault, + Namespace: metav1.NamespaceDefault, ResourceVersion: "18", }, Spec: v1.ReplicationControllerSpec{ Replicas: func() *int32 { i := int32(replicas); return &i }(), Selector: map[string]string{"foo": "bar"}, Template: &v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "name": "foo", "type": "production", @@ -98,7 +98,7 @@ func newPodList(store cache.Store, count int, status v1.PodPhase, rc *v1.Replica pods := []v1.Pod{} for i := 0; i < count; i++ { newPod := v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: fmt.Sprintf("pod%d", i), Labels: rc.Spec.Selector, Namespace: rc.Namespace, @@ -238,8 +238,8 @@ func TestUIDExpectations(t *testing.T) { } func TestCreatePods(t *testing.T) { - ns := v1.NamespaceDefault - body := runtime.EncodeOrDie(testapi.Default.Codec(), &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "empty_pod"}}) + ns := metav1.NamespaceDefault + body := runtime.EncodeOrDie(testapi.Default.Codec(), &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "empty_pod"}}) fakeHandler := utiltesting.FakeHandler{ StatusCode: 200, ResponseBody: string(body), @@ -261,13 +261,13 @@ func TestCreatePods(t *testing.T) { } expectedPod := v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: controllerSpec.Spec.Template.Labels, GenerateName: fmt.Sprintf("%s-", controllerSpec.Name), }, Spec: controllerSpec.Spec.Template.Spec, } - fakeHandler.ValidateRequest(t, testapi.Default.ResourcePath("pods", v1.NamespaceDefault, ""), "POST", nil) + fakeHandler.ValidateRequest(t, testapi.Default.ResourcePath("pods", metav1.NamespaceDefault, ""), "POST", nil) var actualPod = &v1.Pod{} err := json.Unmarshal([]byte(fakeHandler.RequestBody), actualPod) if err != nil { diff --git a/vendor/k8s.io/kubernetes/pkg/controller/cronjob/cronjob_controller.go b/vendor/k8s.io/kubernetes/pkg/controller/cronjob/cronjob_controller.go index 14b279b5..01bc1c4d 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/cronjob/cronjob_controller.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/cronjob/cronjob_controller.go @@ -97,7 +97,7 @@ func (jm *CronJobController) Run(stopCh <-chan struct{}) { // SyncAll lists all the CronJobs and Jobs and reconciles them. func (jm *CronJobController) SyncAll() { - sjl, err := jm.kubeClient.BatchV2alpha1().CronJobs(v1.NamespaceAll).List(v1.ListOptions{}) + sjl, err := jm.kubeClient.BatchV2alpha1().CronJobs(metav1.NamespaceAll).List(metav1.ListOptions{}) if err != nil { glog.Errorf("Error listing cronjobs: %v", err) return @@ -105,7 +105,7 @@ func (jm *CronJobController) SyncAll() { sjs := sjl.Items glog.V(4).Infof("Found %d cronjobs", len(sjs)) - jl, err := jm.kubeClient.BatchV2alpha1().Jobs(v1.NamespaceAll).List(v1.ListOptions{}) + jl, err := jm.kubeClient.BatchV2alpha1().Jobs(metav1.NamespaceAll).List(metav1.ListOptions{}) if err != nil { glog.Errorf("Error listing jobs") return @@ -174,6 +174,7 @@ func SyncOne(sj batch.CronJob, js []batch.Job, now time.Time, jc jobControlInter } times, err := getRecentUnmetScheduleTimes(sj, now) if err != nil { + recorder.Eventf(&sj, v1.EventTypeWarning, "FailedNeedsStart", "Cannot determine if job needs to be started: %v", err) glog.Errorf("Cannot determine if %s needs to be started: %v", nameForLog, err) } // TODO: handle multiple unmet start times, from oldest to newest, updating status as needed. @@ -237,7 +238,7 @@ func SyncOne(sj batch.CronJob, js []batch.Job, now time.Time, jc jobControlInter } // remove all pods... selector, _ := metav1.LabelSelectorAsSelector(job.Spec.Selector) - options := v1.ListOptions{LabelSelector: selector.String()} + options := metav1.ListOptions{LabelSelector: selector.String()} podList, err := pc.ListPods(job.Namespace, options) if err != nil { recorder.Eventf(&sj, v1.EventTypeWarning, "FailedList", "List job-pods: %v", err) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/cronjob/cronjob_controller_test.go b/vendor/k8s.io/kubernetes/pkg/controller/cronjob/cronjob_controller_test.go index 6c037df3..c51491b8 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/cronjob/cronjob_controller_test.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/cronjob/cronjob_controller_test.go @@ -17,6 +17,7 @@ limitations under the License. package cronjob import ( + "strings" "testing" "time" @@ -83,7 +84,7 @@ func justAfterThePriorHour() time.Time { // returns a cronJob with some fields filled in. func cronJob() batch.CronJob { return batch.CronJob{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "mycronjob", Namespace: "snazzycats", UID: types.UID("1a2b3c"), @@ -94,7 +95,7 @@ func cronJob() batch.CronJob { Schedule: "* * * * ?", ConcurrencyPolicy: batch.AllowConcurrent, JobTemplate: batch.JobTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"a": "b"}, Annotations: map[string]string{"x": "y"}, }, @@ -110,7 +111,7 @@ func jobSpec() batch.JobSpec { Parallelism: &one, Completions: &one, Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "foo": "bar", }, @@ -126,10 +127,10 @@ func jobSpec() batch.JobSpec { func newJob(UID string) batch.Job { return batch.Job{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: types.UID(UID), Name: "foobar", - Namespace: v1.NamespaceDefault, + Namespace: metav1.NamespaceDefault, SelfLink: "/apis/batch/v1/namespaces/snazzycats/jobs/myjob", }, Spec: jobSpec(), @@ -177,57 +178,58 @@ func TestSyncOne_RunOrNot(t *testing.T) { now time.Time // expectations - expectCreate bool - expectDelete bool - expectActive int + expectCreate bool + expectDelete bool + expectActive int + expectedWarnings int }{ - "never ran, not time, A": {A, F, onTheHour, noDead, F, F, justBeforeTheHour(), F, F, 0}, - "never ran, not time, F": {f, F, onTheHour, noDead, F, F, justBeforeTheHour(), F, F, 0}, - "never ran, not time, R": {R, F, onTheHour, noDead, F, F, justBeforeTheHour(), F, F, 0}, - "never ran, is time, A": {A, F, onTheHour, noDead, F, F, justAfterTheHour(), T, F, 1}, - "never ran, is time, F": {f, F, onTheHour, noDead, F, F, justAfterTheHour(), T, F, 1}, - "never ran, is time, R": {R, F, onTheHour, noDead, F, F, justAfterTheHour(), T, F, 1}, - "never ran, is time, suspended": {A, T, onTheHour, noDead, F, F, justAfterTheHour(), F, F, 0}, - "never ran, is time, past deadline": {A, F, onTheHour, shortDead, F, F, justAfterTheHour(), F, F, 0}, - "never ran, is time, not past deadline": {A, F, onTheHour, longDead, F, F, justAfterTheHour(), T, F, 1}, + "never ran, not time, A": {A, F, onTheHour, noDead, F, F, justBeforeTheHour(), F, F, 0, 0}, + "never ran, not time, F": {f, F, onTheHour, noDead, F, F, justBeforeTheHour(), F, F, 0, 0}, + "never ran, not time, R": {R, F, onTheHour, noDead, F, F, justBeforeTheHour(), F, F, 0, 0}, + "never ran, is time, A": {A, F, onTheHour, noDead, F, F, justAfterTheHour(), T, F, 1, 0}, + "never ran, is time, F": {f, F, onTheHour, noDead, F, F, justAfterTheHour(), T, F, 1, 0}, + "never ran, is time, R": {R, F, onTheHour, noDead, F, F, justAfterTheHour(), T, F, 1, 0}, + "never ran, is time, suspended": {A, T, onTheHour, noDead, F, F, justAfterTheHour(), F, F, 0, 0}, + "never ran, is time, past deadline": {A, F, onTheHour, shortDead, F, F, justAfterTheHour(), F, F, 0, 0}, + "never ran, is time, not past deadline": {A, F, onTheHour, longDead, F, F, justAfterTheHour(), T, F, 1, 0}, - "prev ran but done, not time, A": {A, F, onTheHour, noDead, T, F, justBeforeTheHour(), F, F, 0}, - "prev ran but done, not time, F": {f, F, onTheHour, noDead, T, F, justBeforeTheHour(), F, F, 0}, - "prev ran but done, not time, R": {R, F, onTheHour, noDead, T, F, justBeforeTheHour(), F, F, 0}, - "prev ran but done, is time, A": {A, F, onTheHour, noDead, T, F, justAfterTheHour(), T, F, 1}, - "prev ran but done, is time, F": {f, F, onTheHour, noDead, T, F, justAfterTheHour(), T, F, 1}, - "prev ran but done, is time, R": {R, F, onTheHour, noDead, T, F, justAfterTheHour(), T, F, 1}, - "prev ran but done, is time, suspended": {A, T, onTheHour, noDead, T, F, justAfterTheHour(), F, F, 0}, - "prev ran but done, is time, past deadline": {A, F, onTheHour, shortDead, T, F, justAfterTheHour(), F, F, 0}, - "prev ran but done, is time, not past deadline": {A, F, onTheHour, longDead, T, F, justAfterTheHour(), T, F, 1}, + "prev ran but done, not time, A": {A, F, onTheHour, noDead, T, F, justBeforeTheHour(), F, F, 0, 0}, + "prev ran but done, not time, F": {f, F, onTheHour, noDead, T, F, justBeforeTheHour(), F, F, 0, 0}, + "prev ran but done, not time, R": {R, F, onTheHour, noDead, T, F, justBeforeTheHour(), F, F, 0, 0}, + "prev ran but done, is time, A": {A, F, onTheHour, noDead, T, F, justAfterTheHour(), T, F, 1, 0}, + "prev ran but done, is time, F": {f, F, onTheHour, noDead, T, F, justAfterTheHour(), T, F, 1, 0}, + "prev ran but done, is time, R": {R, F, onTheHour, noDead, T, F, justAfterTheHour(), T, F, 1, 0}, + "prev ran but done, is time, suspended": {A, T, onTheHour, noDead, T, F, justAfterTheHour(), F, F, 0, 0}, + "prev ran but done, is time, past deadline": {A, F, onTheHour, shortDead, T, F, justAfterTheHour(), F, F, 0, 0}, + "prev ran but done, is time, not past deadline": {A, F, onTheHour, longDead, T, F, justAfterTheHour(), T, F, 1, 0}, - "still active, not time, A": {A, F, onTheHour, noDead, T, T, justBeforeTheHour(), F, F, 1}, - "still active, not time, F": {f, F, onTheHour, noDead, T, T, justBeforeTheHour(), F, F, 1}, - "still active, not time, R": {R, F, onTheHour, noDead, T, T, justBeforeTheHour(), F, F, 1}, - "still active, is time, A": {A, F, onTheHour, noDead, T, T, justAfterTheHour(), T, F, 2}, - "still active, is time, F": {f, F, onTheHour, noDead, T, T, justAfterTheHour(), F, F, 1}, - "still active, is time, R": {R, F, onTheHour, noDead, T, T, justAfterTheHour(), T, T, 1}, - "still active, is time, suspended": {A, T, onTheHour, noDead, T, T, justAfterTheHour(), F, F, 1}, - "still active, is time, past deadline": {A, F, onTheHour, shortDead, T, T, justAfterTheHour(), F, F, 1}, - "still active, is time, not past deadline": {A, F, onTheHour, longDead, T, T, justAfterTheHour(), T, F, 2}, + "still active, not time, A": {A, F, onTheHour, noDead, T, T, justBeforeTheHour(), F, F, 1, 0}, + "still active, not time, F": {f, F, onTheHour, noDead, T, T, justBeforeTheHour(), F, F, 1, 0}, + "still active, not time, R": {R, F, onTheHour, noDead, T, T, justBeforeTheHour(), F, F, 1, 0}, + "still active, is time, A": {A, F, onTheHour, noDead, T, T, justAfterTheHour(), T, F, 2, 0}, + "still active, is time, F": {f, F, onTheHour, noDead, T, T, justAfterTheHour(), F, F, 1, 0}, + "still active, is time, R": {R, F, onTheHour, noDead, T, T, justAfterTheHour(), T, T, 1, 0}, + "still active, is time, suspended": {A, T, onTheHour, noDead, T, T, justAfterTheHour(), F, F, 1, 0}, + "still active, is time, past deadline": {A, F, onTheHour, shortDead, T, T, justAfterTheHour(), F, F, 1, 0}, + "still active, is time, not past deadline": {A, F, onTheHour, longDead, T, T, justAfterTheHour(), T, F, 2, 0}, // Controller should fail to schedule these, as there are too many missed starting times // and either no deadline or a too long deadline. - "prev ran but done, long overdue, not past deadline, A": {A, F, onTheHour, longDead, T, F, weekAfterTheHour(), F, F, 0}, - "prev ran but done, long overdue, not past deadline, R": {R, F, onTheHour, longDead, T, F, weekAfterTheHour(), F, F, 0}, - "prev ran but done, long overdue, not past deadline, F": {f, F, onTheHour, longDead, T, F, weekAfterTheHour(), F, F, 0}, - "prev ran but done, long overdue, no deadline, A": {A, F, onTheHour, noDead, T, F, weekAfterTheHour(), F, F, 0}, - "prev ran but done, long overdue, no deadline, R": {R, F, onTheHour, noDead, T, F, weekAfterTheHour(), F, F, 0}, - "prev ran but done, long overdue, no deadline, F": {f, F, onTheHour, noDead, T, F, weekAfterTheHour(), F, F, 0}, + "prev ran but done, long overdue, not past deadline, A": {A, F, onTheHour, longDead, T, F, weekAfterTheHour(), F, F, 0, 1}, + "prev ran but done, long overdue, not past deadline, R": {R, F, onTheHour, longDead, T, F, weekAfterTheHour(), F, F, 0, 1}, + "prev ran but done, long overdue, not past deadline, F": {f, F, onTheHour, longDead, T, F, weekAfterTheHour(), F, F, 0, 1}, + "prev ran but done, long overdue, no deadline, A": {A, F, onTheHour, noDead, T, F, weekAfterTheHour(), F, F, 0, 1}, + "prev ran but done, long overdue, no deadline, R": {R, F, onTheHour, noDead, T, F, weekAfterTheHour(), F, F, 0, 1}, + "prev ran but done, long overdue, no deadline, F": {f, F, onTheHour, noDead, T, F, weekAfterTheHour(), F, F, 0, 1}, - "prev ran but done, long overdue, past medium deadline, A": {A, F, onTheHour, mediumDead, T, F, weekAfterTheHour(), T, F, 1}, - "prev ran but done, long overdue, past short deadline, A": {A, F, onTheHour, shortDead, T, F, weekAfterTheHour(), T, F, 1}, + "prev ran but done, long overdue, past medium deadline, A": {A, F, onTheHour, mediumDead, T, F, weekAfterTheHour(), T, F, 1, 0}, + "prev ran but done, long overdue, past short deadline, A": {A, F, onTheHour, shortDead, T, F, weekAfterTheHour(), T, F, 1, 0}, - "prev ran but done, long overdue, past medium deadline, R": {R, F, onTheHour, mediumDead, T, F, weekAfterTheHour(), T, F, 1}, - "prev ran but done, long overdue, past short deadline, R": {R, F, onTheHour, shortDead, T, F, weekAfterTheHour(), T, F, 1}, + "prev ran but done, long overdue, past medium deadline, R": {R, F, onTheHour, mediumDead, T, F, weekAfterTheHour(), T, F, 1, 0}, + "prev ran but done, long overdue, past short deadline, R": {R, F, onTheHour, shortDead, T, F, weekAfterTheHour(), T, F, 1, 0}, - "prev ran but done, long overdue, past medium deadline, F": {f, F, onTheHour, mediumDead, T, F, weekAfterTheHour(), T, F, 1}, - "prev ran but done, long overdue, past short deadline, F": {f, F, onTheHour, shortDead, T, F, weekAfterTheHour(), T, F, 1}, + "prev ran but done, long overdue, past medium deadline, F": {f, F, onTheHour, mediumDead, T, F, weekAfterTheHour(), T, F, 1, 0}, + "prev ran but done, long overdue, past short deadline, F": {f, F, onTheHour, shortDead, T, F, weekAfterTheHour(), T, F, 1, 0}, } for name, tc := range testCases { sj := cronJob() @@ -295,10 +297,23 @@ func TestSyncOne_RunOrNot(t *testing.T) { if tc.expectDelete { expectedEvents++ } + expectedEvents += tc.expectedWarnings + if len(recorder.Events) != expectedEvents { t.Errorf("%s: expected %d event, actually %v", name, expectedEvents, len(recorder.Events)) } + numWarnings := 0 + for i := 1; i <= len(recorder.Events); i++ { + e := <-recorder.Events + if strings.HasPrefix(e, v1.EventTypeWarning) { + numWarnings += 1 + } + } + if numWarnings != tc.expectedWarnings { + t.Errorf("%s: expected %d warnings, actually %v", name, tc.expectedWarnings, numWarnings) + } + if tc.expectActive != len(sjc.Updates[expectUpdates-1].Status.Active) { t.Errorf("%s: expected Active size %d, got %d", name, tc.expectActive, len(sjc.Updates[expectUpdates-1].Status.Active)) } diff --git a/vendor/k8s.io/kubernetes/pkg/controller/cronjob/injection.go b/vendor/k8s.io/kubernetes/pkg/controller/cronjob/injection.go index 5863cb73..a717d45e 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/cronjob/injection.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/cronjob/injection.go @@ -177,7 +177,7 @@ func (f *fakeJobControl) Clear() { // created as an interface to allow testing. type podControlInterface interface { // ListPods list pods - ListPods(namespace string, opts v1.ListOptions) (*v1.PodList, error) + ListPods(namespace string, opts metav1.ListOptions) (*v1.PodList, error) // DeleteJob deletes the pod identified by name. // TODO: delete by UID? DeletePod(namespace string, name string) error @@ -191,7 +191,7 @@ type realPodControl struct { var _ podControlInterface = &realPodControl{} -func (r realPodControl) ListPods(namespace string, opts v1.ListOptions) (*v1.PodList, error) { +func (r realPodControl) ListPods(namespace string, opts metav1.ListOptions) (*v1.PodList, error) { return r.KubeClient.Core().Pods(namespace).List(opts) } @@ -208,7 +208,7 @@ type fakePodControl struct { var _ podControlInterface = &fakePodControl{} -func (f *fakePodControl) ListPods(namespace string, opts v1.ListOptions) (*v1.PodList, error) { +func (f *fakePodControl) ListPods(namespace string, opts metav1.ListOptions) (*v1.PodList, error) { f.Lock() defer f.Unlock() return &v1.PodList{Items: f.Pods}, nil diff --git a/vendor/k8s.io/kubernetes/pkg/controller/cronjob/utils.go b/vendor/k8s.io/kubernetes/pkg/controller/cronjob/utils.go index 4fb4df39..c5992395 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/cronjob/utils.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/cronjob/utils.go @@ -24,6 +24,7 @@ import ( "github.com/golang/glog" "github.com/robfig/cron" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" @@ -195,7 +196,7 @@ func getJobFromTemplate(sj *batch.CronJob, scheduledTime time.Time) (*batch.Job, name := fmt.Sprintf("%s-%d", sj.Name, getTimeHash(scheduledTime)) job := &batch.Job{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: labels, Annotations: annotations, Name: name, diff --git a/vendor/k8s.io/kubernetes/pkg/controller/cronjob/utils_test.go b/vendor/k8s.io/kubernetes/pkg/controller/cronjob/utils_test.go index 085be108..4b84b198 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/cronjob/utils_test.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/cronjob/utils_test.go @@ -35,7 +35,7 @@ func TestGetJobFromTemplate(t *testing.T) { var no bool = false sj := batch.CronJob{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "mycronjob", Namespace: "snazzycats", UID: types.UID("1a2b3c"), @@ -45,7 +45,7 @@ func TestGetJobFromTemplate(t *testing.T) { Schedule: "* * * * ?", ConcurrencyPolicy: batch.AllowConcurrent, JobTemplate: batch.JobTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"a": "b"}, Annotations: map[string]string{"x": "y"}, }, @@ -53,7 +53,7 @@ func TestGetJobFromTemplate(t *testing.T) { ActiveDeadlineSeconds: &one, ManualSelector: &no, Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "foo": "bar", }, @@ -99,16 +99,16 @@ func TestGetJobFromTemplate(t *testing.T) { func TestGetParentUIDFromJob(t *testing.T) { j := &batch.Job{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foobar", - Namespace: v1.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, Spec: batch.JobSpec{ Selector: &metav1.LabelSelector{ MatchLabels: map[string]string{"foo": "bar"}, }, Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "foo": "bar", }, @@ -173,7 +173,7 @@ func TestGroupJobsByParent(t *testing.T) { { // Case 2: there is one controller with no job. sjs := []batch.CronJob{ - {ObjectMeta: v1.ObjectMeta{Name: "e", Namespace: "x", UID: uid1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "e", Namespace: "x", UID: uid1}}, } js := []batch.Job{} jobsBySj := groupJobsByParent(sjs, js) @@ -185,10 +185,10 @@ func TestGroupJobsByParent(t *testing.T) { { // Case 3: there is one controller with one job it created. sjs := []batch.CronJob{ - {ObjectMeta: v1.ObjectMeta{Name: "e", Namespace: "x", UID: uid1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "e", Namespace: "x", UID: uid1}}, } js := []batch.Job{ - {ObjectMeta: v1.ObjectMeta{Name: "a", Namespace: "x", Annotations: createdBy1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "a", Namespace: "x", Annotations: createdBy1}}, } jobsBySj := groupJobsByParent(sjs, js) @@ -208,18 +208,18 @@ func TestGroupJobsByParent(t *testing.T) { // Case 4: Two namespaces, one has two jobs from one controller, other has 3 jobs from two controllers. // There are also two jobs with no created-by annotation. js := []batch.Job{ - {ObjectMeta: v1.ObjectMeta{Name: "a", Namespace: "x", Annotations: createdBy1}}, - {ObjectMeta: v1.ObjectMeta{Name: "b", Namespace: "x", Annotations: createdBy2}}, - {ObjectMeta: v1.ObjectMeta{Name: "c", Namespace: "x", Annotations: createdBy1}}, - {ObjectMeta: v1.ObjectMeta{Name: "d", Namespace: "x", Annotations: noCreatedBy}}, - {ObjectMeta: v1.ObjectMeta{Name: "a", Namespace: "y", Annotations: createdBy3}}, - {ObjectMeta: v1.ObjectMeta{Name: "b", Namespace: "y", Annotations: createdBy3}}, - {ObjectMeta: v1.ObjectMeta{Name: "d", Namespace: "y", Annotations: noCreatedBy}}, + {ObjectMeta: metav1.ObjectMeta{Name: "a", Namespace: "x", Annotations: createdBy1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "b", Namespace: "x", Annotations: createdBy2}}, + {ObjectMeta: metav1.ObjectMeta{Name: "c", Namespace: "x", Annotations: createdBy1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "d", Namespace: "x", Annotations: noCreatedBy}}, + {ObjectMeta: metav1.ObjectMeta{Name: "a", Namespace: "y", Annotations: createdBy3}}, + {ObjectMeta: metav1.ObjectMeta{Name: "b", Namespace: "y", Annotations: createdBy3}}, + {ObjectMeta: metav1.ObjectMeta{Name: "d", Namespace: "y", Annotations: noCreatedBy}}, } sjs := []batch.CronJob{ - {ObjectMeta: v1.ObjectMeta{Name: "e", Namespace: "x", UID: uid1}}, - {ObjectMeta: v1.ObjectMeta{Name: "f", Namespace: "x", UID: uid2}}, - {ObjectMeta: v1.ObjectMeta{Name: "g", Namespace: "y", UID: uid3}}, + {ObjectMeta: metav1.ObjectMeta{Name: "e", Namespace: "x", UID: uid1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "f", Namespace: "x", UID: uid2}}, + {ObjectMeta: metav1.ObjectMeta{Name: "g", Namespace: "y", UID: uid3}}, } jobsBySj := groupJobsByParent(sjs, js) @@ -267,9 +267,9 @@ func TestGetRecentUnmetScheduleTimes(t *testing.T) { } sj := batch.CronJob{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "mycronjob", - Namespace: v1.NamespaceDefault, + Namespace: metav1.NamespaceDefault, UID: types.UID("1a2b3c"), }, Spec: batch.CronJobSpec{ diff --git a/vendor/k8s.io/kubernetes/pkg/controller/daemon/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/daemon/BUILD index 0b028bb3..a0bd5416 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/daemon/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/daemon/BUILD @@ -23,6 +23,7 @@ go_library( "//pkg/client/clientset_generated/clientset:go_default_library", "//pkg/client/clientset_generated/clientset/typed/core/v1:go_default_library", "//pkg/client/clientset_generated/clientset/typed/extensions/v1beta1:go_default_library", + "//pkg/client/legacylisters:go_default_library", "//pkg/client/record:go_default_library", "//pkg/controller:go_default_library", "//pkg/controller/informers:go_default_library", @@ -58,6 +59,7 @@ go_test( "//pkg/securitycontext:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", + "//vendor:k8s.io/apiserver/pkg/storage/names", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/daemon/daemoncontroller.go b/vendor/k8s.io/kubernetes/pkg/controller/daemon/daemoncontroller.go index c32c373e..b183ac55 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/daemon/daemoncontroller.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/daemon/daemoncontroller.go @@ -35,6 +35,7 @@ import ( "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" v1core "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1" unversionedextensions "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1" + "k8s.io/kubernetes/pkg/client/legacylisters" "k8s.io/kubernetes/pkg/client/record" "k8s.io/kubernetes/pkg/controller" "k8s.io/kubernetes/pkg/controller/informers" @@ -74,11 +75,11 @@ type DaemonSetsController struct { // A TTLCache of pod creates/deletes each ds expects to see expectations controller.ControllerExpectationsInterface // A store of daemon sets - dsStore *cache.StoreToDaemonSetLister + dsStore *listers.StoreToDaemonSetLister // A store of pods - podStore *cache.StoreToPodLister + podStore *listers.StoreToPodLister // A store of nodes - nodeStore *cache.StoreToNodeLister + nodeStore *listers.StoreToNodeLister // dsStoreSynced returns true if the daemonset store has been synced at least once. // Added as a member to the struct to allow injection for testing. dsStoreSynced cache.InformerSynced diff --git a/vendor/k8s.io/kubernetes/pkg/controller/daemon/daemoncontroller_test.go b/vendor/k8s.io/kubernetes/pkg/controller/daemon/daemoncontroller_test.go index 8810a146..68e283ca 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/daemon/daemoncontroller_test.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/daemon/daemoncontroller_test.go @@ -22,6 +22,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apiserver/pkg/storage/names" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/testapi" @@ -55,14 +56,14 @@ func getKey(ds *extensions.DaemonSet, t *testing.T) string { func newDaemonSet(name string) *extensions.DaemonSet { return &extensions.DaemonSet{ TypeMeta: metav1.TypeMeta{APIVersion: testapi.Extensions.GroupVersion().String()}, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, - Namespace: v1.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: simpleDaemonSetLabel}, Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: simpleDaemonSetLabel, }, Spec: v1.PodSpec{ @@ -84,10 +85,10 @@ func newDaemonSet(name string) *extensions.DaemonSet { func newNode(name string, label map[string]string) *v1.Node { return &v1.Node{ TypeMeta: metav1.TypeMeta{APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String()}, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Labels: label, - Namespace: v1.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, Status: v1.NodeStatus{ Conditions: []v1.NodeCondition{ @@ -109,10 +110,10 @@ func addNodes(nodeStore cache.Store, startIndex, numNodes int, label map[string] func newPod(podName string, nodeName string, label map[string]string) *v1.Pod { pod := &v1.Pod{ TypeMeta: metav1.TypeMeta{APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String()}, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ GenerateName: podName, Labels: label, - Namespace: v1.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, Spec: v1.PodSpec{ NodeName: nodeName, @@ -127,7 +128,7 @@ func newPod(podName string, nodeName string, label map[string]string) *v1.Pod { DNSPolicy: v1.DNSDefault, }, } - v1.GenerateName(v1.SimpleNameGenerator, &pod.ObjectMeta) + pod.Name = names.SimpleNameGenerator.GenerateName(podName) return pod } @@ -374,9 +375,9 @@ func TestPortConflictWithSameDaemonPodDoesNotDeletePod(t *testing.T) { node := newNode("port-conflict", nil) manager.nodeStore.Add(node) manager.podStore.Indexer.Add(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: simpleDaemonSetLabel, - Namespace: v1.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, Spec: podSpec, }) @@ -424,9 +425,9 @@ func TestPodIsNotDeletedByDaemonsetWithEmptyLabelSelector(t *testing.T) { manager.nodeStore.Store.Add(newNode("node1", nil)) // Create pod not controlled by a daemonset. manager.podStore.Indexer.Add(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"bang": "boom"}, - Namespace: v1.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, Spec: v1.PodSpec{ NodeName: "node1", @@ -664,7 +665,7 @@ func TestNodeShouldRunDaemonPod(t *testing.T) { Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: simpleDaemonSetLabel}, Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: simpleDaemonSetLabel, }, Spec: resourcePodSpec("", "50M", "0.5"), @@ -680,7 +681,7 @@ func TestNodeShouldRunDaemonPod(t *testing.T) { Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: simpleDaemonSetLabel}, Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: simpleDaemonSetLabel, }, Spec: resourcePodSpec("", "200M", "0.5"), @@ -696,7 +697,7 @@ func TestNodeShouldRunDaemonPod(t *testing.T) { Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: simpleDaemonSetLabel}, Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: simpleDaemonSetLabel, }, Spec: resourcePodSpec("other-node", "50M", "0.5"), @@ -723,7 +724,7 @@ func TestNodeShouldRunDaemonPod(t *testing.T) { Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: simpleDaemonSetLabel}, Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: simpleDaemonSetLabel, }, Spec: v1.PodSpec{ diff --git a/vendor/k8s.io/kubernetes/pkg/controller/deployment/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/deployment/BUILD index 3ce7d4e2..d0c36f4e 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/deployment/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/deployment/BUILD @@ -26,11 +26,11 @@ go_library( "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", "//pkg/client/clientset_generated/clientset/typed/core/v1:go_default_library", + "//pkg/client/legacylisters:go_default_library", "//pkg/client/record:go_default_library", "//pkg/controller:go_default_library", "//pkg/controller/deployment/util:go_default_library", "//pkg/controller/informers:go_default_library", - "//pkg/util/integer:go_default_library", "//pkg/util/labels:go_default_library", "//pkg/util/metrics:go_default_library", "//pkg/util/workqueue:go_default_library", @@ -42,6 +42,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/util/errors", "//vendor:k8s.io/apimachinery/pkg/util/runtime", "//vendor:k8s.io/apimachinery/pkg/util/wait", + "//vendor:k8s.io/client-go/util/integer", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/deployment/deployment_controller.go b/vendor/k8s.io/kubernetes/pkg/controller/deployment/deployment_controller.go index 6c6ee47a..8fdb6615 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/deployment/deployment_controller.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/deployment/deployment_controller.go @@ -40,6 +40,7 @@ import ( "k8s.io/kubernetes/pkg/client/cache" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" v1core "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1" + "k8s.io/kubernetes/pkg/client/legacylisters" "k8s.io/kubernetes/pkg/client/record" "k8s.io/kubernetes/pkg/controller" "k8s.io/kubernetes/pkg/controller/deployment/util" @@ -77,11 +78,11 @@ type DeploymentController struct { enqueueDeployment func(deployment *extensions.Deployment) // A store of deployments, populated by the dController - dLister *cache.StoreToDeploymentLister + dLister *listers.StoreToDeploymentLister // A store of ReplicaSets, populated by the rsController - rsLister *cache.StoreToReplicaSetLister + rsLister *listers.StoreToReplicaSetLister // A store of pods, populated by the podController - podLister *cache.StoreToPodLister + podLister *listers.StoreToPodLister // dListerSynced returns true if the Deployment store has been synced at least once. // Added as a member to the struct to allow injection for testing. @@ -543,7 +544,26 @@ func (dc *DeploymentController) syncDeployment(key string) error { return dc.syncStatusOnly(d) } - err = dc.classifyReplicaSets(deployment) + // Why run the cleanup policy only when there is no rollback request? + // The thing with the cleanup policy currently is that it is far from smart because it takes into account + // the latest replica sets while it should instead retain the latest *working* replica sets. This means that + // you can have a cleanup policy of 1 but your last known working replica set may be 2 or 3 versions back + // in the history. + // Eventually we will want to find a way to recognize replica sets that have worked at some point in time + // (and chances are higher that they will work again as opposed to others that didn't) for candidates to + // automatically roll back to (#23211) and the cleanup policy should help. + if d.Spec.RollbackTo == nil { + _, oldRSs, err := dc.getAllReplicaSetsAndSyncRevision(d, false) + if err != nil { + return err + } + // So far the cleanup policy was executed once a deployment was paused, scaled up/down, or it + // succesfully completed deploying a replica set. Decouple it from the strategies and have it + // run almost unconditionally - cleanupDeployment is safe by default. + dc.cleanupDeployment(oldRSs, d) + } + + err = dc.classifyReplicaSets(d) if err != nil { return err } diff --git a/vendor/k8s.io/kubernetes/pkg/controller/deployment/deployment_controller_test.go b/vendor/k8s.io/kubernetes/pkg/controller/deployment/deployment_controller_test.go index 6b2d6fa6..1dfcb3e5 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/deployment/deployment_controller_test.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/deployment/deployment_controller_test.go @@ -44,10 +44,10 @@ var ( func rs(name string, replicas int, selector map[string]string, timestamp metav1.Time) *extensions.ReplicaSet { return &extensions.ReplicaSet{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, CreationTimestamp: timestamp, - Namespace: v1.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, Spec: extensions.ReplicaSetSpec{ Replicas: func() *int32 { i := int32(replicas); return &i }(), @@ -68,10 +68,10 @@ func newRSWithStatus(name string, specReplicas, statusReplicas int, selector map func newDeployment(name string, replicas int, revisionHistoryLimit *int32, maxSurge, maxUnavailable *intstr.IntOrString, selector map[string]string) *extensions.Deployment { d := extensions.Deployment{ TypeMeta: metav1.TypeMeta{APIVersion: api.Registry.GroupOrDie(extensions.GroupName).GroupVersion.String()}, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: uuid.NewUUID(), Name: name, - Namespace: v1.NamespaceDefault, + Namespace: metav1.NamespaceDefault, Annotations: make(map[string]string), }, Spec: extensions.DeploymentSpec{ @@ -85,7 +85,7 @@ func newDeployment(name string, replicas int, revisionHistoryLimit *int32, maxSu Replicas: func() *int32 { i := int32(replicas); return &i }(), Selector: &metav1.LabelSelector{MatchLabels: selector}, Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: selector, }, Spec: v1.PodSpec{ @@ -110,9 +110,9 @@ func newDeployment(name string, replicas int, revisionHistoryLimit *int32, maxSu func newReplicaSet(d *extensions.Deployment, name string, replicas int) *extensions.ReplicaSet { return &extensions.ReplicaSet{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, - Namespace: v1.NamespaceDefault, + Namespace: metav1.NamespaceDefault, Labels: d.Spec.Selector.MatchLabels, }, Spec: extensions.ReplicaSetSpec{ @@ -554,7 +554,7 @@ func TestPodDeletionDoesntEnqueueRecreateDeployment(t *testing.T) { func generatePodFromRS(rs *extensions.ReplicaSet) *v1.Pod { trueVar := true return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: rs.Name + "-pod", Namespace: rs.Namespace, Labels: rs.Spec.Selector.MatchLabels, diff --git a/vendor/k8s.io/kubernetes/pkg/controller/deployment/recreate.go b/vendor/k8s.io/kubernetes/pkg/controller/deployment/recreate.go index 54e4290a..3c3be854 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/deployment/recreate.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/deployment/recreate.go @@ -73,8 +73,6 @@ func (dc *DeploymentController) rolloutRecreate(deployment *extensions.Deploymen return dc.syncRolloutStatus(allRSs, newRS, deployment) } - dc.cleanupDeployment(oldRSs, deployment) - // Sync deployment status return dc.syncRolloutStatus(allRSs, newRS, deployment) } diff --git a/vendor/k8s.io/kubernetes/pkg/controller/deployment/rolling.go b/vendor/k8s.io/kubernetes/pkg/controller/deployment/rolling.go index 1c415083..c783cb04 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/deployment/rolling.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/deployment/rolling.go @@ -21,10 +21,10 @@ import ( "sort" "github.com/golang/glog" + "k8s.io/client-go/util/integer" extensions "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" "k8s.io/kubernetes/pkg/controller" deploymentutil "k8s.io/kubernetes/pkg/controller/deployment/util" - "k8s.io/kubernetes/pkg/util/integer" ) // rolloutRolling implements the logic for rolling a new replica set. @@ -55,8 +55,6 @@ func (dc *DeploymentController) rolloutRolling(deployment *extensions.Deployment return dc.syncRolloutStatus(allRSs, newRS, deployment) } - dc.cleanupDeployment(oldRSs, deployment) - // Sync deployment status return dc.syncRolloutStatus(allRSs, newRS, deployment) } diff --git a/vendor/k8s.io/kubernetes/pkg/controller/deployment/sync.go b/vendor/k8s.io/kubernetes/pkg/controller/deployment/sync.go index 9c75aace..d2aa4d2b 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/deployment/sync.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/deployment/sync.go @@ -58,7 +58,6 @@ func (dc *DeploymentController) sync(deployment *extensions.Deployment) error { // so we can abort this resync return err } - dc.cleanupDeployment(oldRSs, deployment) allRSs := append(oldRSs, newRS) return dc.syncDeploymentStatus(allRSs, newRS, deployment) @@ -128,7 +127,7 @@ func (dc *DeploymentController) getAllReplicaSetsAndSyncRevision(deployment *ext // rsAndPodsWithHashKeySynced returns the RSes and pods the given deployment targets, with pod-template-hash information synced. func (dc *DeploymentController) rsAndPodsWithHashKeySynced(deployment *extensions.Deployment) ([]*extensions.ReplicaSet, *v1.PodList, error) { rsList, err := deploymentutil.ListReplicaSets(deployment, - func(namespace string, options v1.ListOptions) ([]*extensions.ReplicaSet, error) { + func(namespace string, options metav1.ListOptions) ([]*extensions.ReplicaSet, error) { parsed, err := labels.Parse(options.LabelSelector) if err != nil { return nil, err @@ -192,7 +191,7 @@ func (dc *DeploymentController) addHashKeyToRSAndPods(rs *extensions.ReplicaSet) if err != nil { return nil, fmt.Errorf("error in converting selector to label selector for replica set %s: %s", updatedRS.Name, err) } - options := v1.ListOptions{LabelSelector: selector.String()} + options := metav1.ListOptions{LabelSelector: selector.String()} parsed, err := labels.Parse(options.LabelSelector) if err != nil { return nil, err @@ -241,7 +240,7 @@ func (dc *DeploymentController) addHashKeyToRSAndPods(rs *extensions.ReplicaSet) func (dc *DeploymentController) listPods(deployment *extensions.Deployment) (*v1.PodList, error) { return deploymentutil.ListPods(deployment, - func(namespace string, options v1.ListOptions) (*v1.PodList, error) { + func(namespace string, options metav1.ListOptions) (*v1.PodList, error) { parsed, err := labels.Parse(options.LabelSelector) if err != nil { return nil, err @@ -324,7 +323,7 @@ func (dc *DeploymentController) getNewReplicaSet(deployment *extensions.Deployme // Create new ReplicaSet newRS := extensions.ReplicaSet{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ // Make the name deterministic, to ensure idempotence Name: deployment.Name + "-" + podTemplateSpecHash, Namespace: namespace, diff --git a/vendor/k8s.io/kubernetes/pkg/controller/deployment/util/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/deployment/util/BUILD index 3a8961b6..a0e8a2d7 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/deployment/util/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/deployment/util/BUILD @@ -22,14 +22,13 @@ go_library( "//pkg/api/v1:go_default_library", "//pkg/apis/extensions:go_default_library", "//pkg/apis/extensions/v1beta1:go_default_library", - "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", "//pkg/client/clientset_generated/clientset/typed/core/v1:go_default_library", "//pkg/client/clientset_generated/clientset/typed/extensions/v1beta1:go_default_library", + "//pkg/client/legacylisters:go_default_library", "//pkg/client/retry:go_default_library", "//pkg/controller:go_default_library", "//pkg/util/hash:go_default_library", - "//pkg/util/integer:go_default_library", "//pkg/util/intstr:go_default_library", "//pkg/util/labels:go_default_library", "//vendor:github.com/golang/glog", @@ -39,6 +38,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/errors", "//vendor:k8s.io/apimachinery/pkg/util/wait", + "//vendor:k8s.io/client-go/util/integer", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/deployment/util/deployment_util.go b/vendor/k8s.io/kubernetes/pkg/controller/deployment/util/deployment_util.go index 9fe963a9..1cd1c53c 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/deployment/util/deployment_util.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/deployment/util/deployment_util.go @@ -31,15 +31,15 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/errors" "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/client-go/util/integer" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/annotations" "k8s.io/kubernetes/pkg/api/v1" internalextensions "k8s.io/kubernetes/pkg/apis/extensions" extensions "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" - "k8s.io/kubernetes/pkg/client/cache" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" + "k8s.io/kubernetes/pkg/client/legacylisters" "k8s.io/kubernetes/pkg/controller" - "k8s.io/kubernetes/pkg/util/integer" intstrutil "k8s.io/kubernetes/pkg/util/intstr" labelsutil "k8s.io/kubernetes/pkg/util/labels" ) @@ -537,7 +537,7 @@ func GetNewReplicaSet(deployment *extensions.Deployment, c clientset.Interface) // listReplicaSets lists all RSes the given deployment targets with the given client interface. func listReplicaSets(deployment *extensions.Deployment, c clientset.Interface) ([]*extensions.ReplicaSet, error) { return ListReplicaSets(deployment, - func(namespace string, options v1.ListOptions) ([]*extensions.ReplicaSet, error) { + func(namespace string, options metav1.ListOptions) ([]*extensions.ReplicaSet, error) { rsList, err := c.Extensions().ReplicaSets(namespace).List(options) if err != nil { return nil, err @@ -553,14 +553,14 @@ func listReplicaSets(deployment *extensions.Deployment, c clientset.Interface) ( // listReplicaSets lists all Pods the given deployment targets with the given client interface. func listPods(deployment *extensions.Deployment, c clientset.Interface) (*v1.PodList, error) { return ListPods(deployment, - func(namespace string, options v1.ListOptions) (*v1.PodList, error) { + func(namespace string, options metav1.ListOptions) (*v1.PodList, error) { return c.Core().Pods(namespace).List(options) }) } // TODO: switch this to full namespacers -type rsListFunc func(string, v1.ListOptions) ([]*extensions.ReplicaSet, error) -type podListFunc func(string, v1.ListOptions) (*v1.PodList, error) +type rsListFunc func(string, metav1.ListOptions) ([]*extensions.ReplicaSet, error) +type podListFunc func(string, metav1.ListOptions) (*v1.PodList, error) // ListReplicaSets returns a slice of RSes the given deployment targets. func ListReplicaSets(deployment *extensions.Deployment, getRSList rsListFunc) ([]*extensions.ReplicaSet, error) { @@ -572,7 +572,7 @@ func ListReplicaSets(deployment *extensions.Deployment, getRSList rsListFunc) ([ if err != nil { return nil, err } - options := v1.ListOptions{LabelSelector: selector.String()} + options := metav1.ListOptions{LabelSelector: selector.String()} return getRSList(namespace, options) } @@ -583,7 +583,7 @@ func ListPods(deployment *extensions.Deployment, getPodList podListFunc) (*v1.Po if err != nil { return nil, err } - options := v1.ListOptions{LabelSelector: selector.String()} + options := metav1.ListOptions{LabelSelector: selector.String()} return getPodList(namespace, options) } @@ -684,7 +684,7 @@ func WaitForPodsHashPopulated(c clientset.Interface, desiredGeneration int64, na // LabelPodsWithHash labels all pods in the given podList with the new hash label. // The returned bool value can be used to tell if all pods are actually labeled. -func LabelPodsWithHash(podList *v1.PodList, c clientset.Interface, podLister *cache.StoreToPodLister, namespace, name, hash string) error { +func LabelPodsWithHash(podList *v1.PodList, c clientset.Interface, podLister *listers.StoreToPodLister, namespace, name, hash string) error { for _, pod := range podList.Items { // Only label the pod that doesn't already have the new hash if pod.Labels[extensions.DefaultDeploymentUniqueLabelKey] != hash { diff --git a/vendor/k8s.io/kubernetes/pkg/controller/deployment/util/deployment_util_test.go b/vendor/k8s.io/kubernetes/pkg/controller/deployment/util/deployment_util_test.go index 666c9b2c..515ec51b 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/deployment/util/deployment_util_test.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/deployment/util/deployment_util_test.go @@ -102,7 +102,7 @@ func newPod(now time.Time, ready bool, beforeSec int) v1.Pod { // generatePodFromRS creates a pod, with the input ReplicaSet's selector and its template func generatePodFromRS(rs extensions.ReplicaSet) v1.Pod { return v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: rs.Labels, }, Spec: rs.Spec.Template.Spec, @@ -111,7 +111,7 @@ func generatePodFromRS(rs extensions.ReplicaSet) v1.Pod { func generatePod(labels map[string]string, image string) v1.Pod { return v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: labels, }, Spec: v1.PodSpec{ @@ -129,7 +129,7 @@ func generatePod(labels map[string]string, image string) v1.Pod { func generateRSWithLabel(labels map[string]string, image string) extensions.ReplicaSet { return extensions.ReplicaSet{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: v1.SimpleNameGenerator.GenerateName("replicaset"), Labels: labels, }, @@ -137,7 +137,7 @@ func generateRSWithLabel(labels map[string]string, image string) extensions.Repl Replicas: func(i int32) *int32 { return &i }(1), Selector: &metav1.LabelSelector{MatchLabels: labels}, Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: labels, }, Spec: v1.PodSpec{ @@ -159,7 +159,7 @@ func generateRSWithLabel(labels map[string]string, image string) extensions.Repl func generateRS(deployment extensions.Deployment) extensions.ReplicaSet { template := GetNewReplicaSetTemplate(&deployment) return extensions.ReplicaSet{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: v1.SimpleNameGenerator.GenerateName("replicaset"), Labels: template.Labels, }, @@ -176,7 +176,7 @@ func generateDeployment(image string) extensions.Deployment { podLabels := map[string]string{"name": image} terminationSec := int64(30) return extensions.Deployment{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: image, Annotations: make(map[string]string), }, @@ -184,7 +184,7 @@ func generateDeployment(image string) extensions.Deployment { Replicas: func(i int32) *int32 { return &i }(1), Selector: &metav1.LabelSelector{MatchLabels: podLabels}, Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: podLabels, }, Spec: v1.PodSpec{ @@ -364,7 +364,7 @@ func TestGetOldRCs(t *testing.T) { func generatePodTemplateSpec(name, nodeName string, annotations, labels map[string]string) v1.PodTemplateSpec { return v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Annotations: annotations, Labels: labels, diff --git a/vendor/k8s.io/kubernetes/pkg/controller/deployment/util/pod_util.go b/vendor/k8s.io/kubernetes/pkg/controller/deployment/util/pod_util.go index dde13a91..970ec46c 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/deployment/util/pod_util.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/deployment/util/pod_util.go @@ -25,8 +25,8 @@ import ( errorsutil "k8s.io/apimachinery/pkg/util/errors" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" - "k8s.io/kubernetes/pkg/client/cache" v1core "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1" + "k8s.io/kubernetes/pkg/client/legacylisters" "k8s.io/kubernetes/pkg/client/retry" hashutil "k8s.io/kubernetes/pkg/util/hash" ) @@ -56,7 +56,7 @@ type updatePodFunc func(pod *v1.Pod) error // UpdatePodWithRetries updates a pod with given applyUpdate function. Note that pod not found error is ignored. // The returned bool value can be used to tell if the pod is actually updated. -func UpdatePodWithRetries(podClient v1core.PodInterface, podLister *cache.StoreToPodLister, namespace, name string, applyUpdate updatePodFunc) (*v1.Pod, error) { +func UpdatePodWithRetries(podClient v1core.PodInterface, podLister *listers.StoreToPodLister, namespace, name string, applyUpdate updatePodFunc) (*v1.Pod, error) { var pod *v1.Pod retryErr := retry.RetryOnConflict(retry.DefaultBackoff, func() error { diff --git a/vendor/k8s.io/kubernetes/pkg/controller/deployment/util/replicaset_util.go b/vendor/k8s.io/kubernetes/pkg/controller/deployment/util/replicaset_util.go index 48938c65..83535a4b 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/deployment/util/replicaset_util.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/deployment/util/replicaset_util.go @@ -25,8 +25,8 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" extensions "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" - "k8s.io/kubernetes/pkg/client/cache" unversionedextensions "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1" + "k8s.io/kubernetes/pkg/client/legacylisters" "k8s.io/kubernetes/pkg/client/retry" labelsutil "k8s.io/kubernetes/pkg/util/labels" ) @@ -37,7 +37,7 @@ type updateRSFunc func(rs *extensions.ReplicaSet) error // UpdateRSWithRetries updates a RS with given applyUpdate function. Note that RS not found error is ignored. // The returned bool value can be used to tell if the RS is actually updated. -func UpdateRSWithRetries(rsClient unversionedextensions.ReplicaSetInterface, rsLister *cache.StoreToReplicaSetLister, namespace, name string, applyUpdate updateRSFunc) (*extensions.ReplicaSet, error) { +func UpdateRSWithRetries(rsClient unversionedextensions.ReplicaSetInterface, rsLister *listers.StoreToReplicaSetLister, namespace, name string, applyUpdate updateRSFunc) (*extensions.ReplicaSet, error) { var rs *extensions.ReplicaSet retryErr := retry.RetryOnConflict(retry.DefaultBackoff, func() error { diff --git a/vendor/k8s.io/kubernetes/pkg/controller/disruption/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/disruption/BUILD index 3cb64eaa..7ffc184c 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/disruption/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/disruption/BUILD @@ -22,6 +22,7 @@ go_library( "//pkg/client/clientset_generated/clientset:go_default_library", "//pkg/client/clientset_generated/clientset/typed/core/v1:go_default_library", "//pkg/client/clientset_generated/clientset/typed/policy/v1beta1:go_default_library", + "//pkg/client/legacylisters:go_default_library", "//pkg/client/record:go_default_library", "//pkg/controller:go_default_library", "//pkg/util/intstr:go_default_library", @@ -48,6 +49,7 @@ go_test( "//pkg/apis/extensions/v1beta1:go_default_library", "//pkg/apis/policy/v1beta1:go_default_library", "//pkg/client/cache:go_default_library", + "//pkg/client/legacylisters:go_default_library", "//pkg/client/record:go_default_library", "//pkg/controller:go_default_library", "//pkg/util/intstr:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/controller/disruption/disruption.go b/vendor/k8s.io/kubernetes/pkg/controller/disruption/disruption.go index 21d34969..c9c23983 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/disruption/disruption.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/disruption/disruption.go @@ -36,6 +36,7 @@ import ( "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" v1core "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1" policyclientset "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1" + "k8s.io/kubernetes/pkg/client/legacylisters" "k8s.io/kubernetes/pkg/client/record" "k8s.io/kubernetes/pkg/controller" "k8s.io/kubernetes/pkg/util/intstr" @@ -64,26 +65,26 @@ type DisruptionController struct { pdbStore cache.Store pdbController cache.Controller - pdbLister cache.StoreToPodDisruptionBudgetLister + pdbLister listers.StoreToPodDisruptionBudgetLister podController cache.Controller - podLister cache.StoreToPodLister + podLister listers.StoreToPodLister rcIndexer cache.Indexer rcController cache.Controller - rcLister cache.StoreToReplicationControllerLister + rcLister listers.StoreToReplicationControllerLister rsStore cache.Store rsController cache.Controller - rsLister cache.StoreToReplicaSetLister + rsLister listers.StoreToReplicaSetLister dIndexer cache.Indexer dController cache.Controller - dLister cache.StoreToDeploymentLister + dLister listers.StoreToDeploymentLister ssStore cache.Store ssController cache.Controller - ssLister cache.StoreToStatefulSetLister + ssLister listers.StoreToStatefulSetLister // PodDisruptionBudget keys that need to be synced. queue workqueue.RateLimitingInterface @@ -128,11 +129,11 @@ func NewDisruptionController(podInformer cache.SharedIndexInformer, kubeClient c dc.pdbStore, dc.pdbController = cache.NewInformer( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - return dc.kubeClient.Policy().PodDisruptionBudgets(v1.NamespaceAll).List(options) + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + return dc.kubeClient.Policy().PodDisruptionBudgets(metav1.NamespaceAll).List(options) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - return dc.kubeClient.Policy().PodDisruptionBudgets(v1.NamespaceAll).Watch(options) + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + return dc.kubeClient.Policy().PodDisruptionBudgets(metav1.NamespaceAll).Watch(options) }, }, &policy.PodDisruptionBudget{}, @@ -147,11 +148,11 @@ func NewDisruptionController(podInformer cache.SharedIndexInformer, kubeClient c dc.rcIndexer, dc.rcController = cache.NewIndexerInformer( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - return dc.kubeClient.Core().ReplicationControllers(v1.NamespaceAll).List(options) + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + return dc.kubeClient.Core().ReplicationControllers(metav1.NamespaceAll).List(options) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - return dc.kubeClient.Core().ReplicationControllers(v1.NamespaceAll).Watch(options) + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + return dc.kubeClient.Core().ReplicationControllers(metav1.NamespaceAll).Watch(options) }, }, &v1.ReplicationController{}, @@ -164,11 +165,11 @@ func NewDisruptionController(podInformer cache.SharedIndexInformer, kubeClient c dc.rsLister.Indexer, dc.rsController = cache.NewIndexerInformer( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - return dc.kubeClient.Extensions().ReplicaSets(v1.NamespaceAll).List(options) + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + return dc.kubeClient.Extensions().ReplicaSets(metav1.NamespaceAll).List(options) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - return dc.kubeClient.Extensions().ReplicaSets(v1.NamespaceAll).Watch(options) + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + return dc.kubeClient.Extensions().ReplicaSets(metav1.NamespaceAll).Watch(options) }, }, &extensions.ReplicaSet{}, @@ -180,11 +181,11 @@ func NewDisruptionController(podInformer cache.SharedIndexInformer, kubeClient c dc.dIndexer, dc.dController = cache.NewIndexerInformer( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - return dc.kubeClient.Extensions().Deployments(v1.NamespaceAll).List(options) + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + return dc.kubeClient.Extensions().Deployments(metav1.NamespaceAll).List(options) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - return dc.kubeClient.Extensions().Deployments(v1.NamespaceAll).Watch(options) + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + return dc.kubeClient.Extensions().Deployments(metav1.NamespaceAll).Watch(options) }, }, &extensions.Deployment{}, @@ -196,11 +197,11 @@ func NewDisruptionController(podInformer cache.SharedIndexInformer, kubeClient c dc.ssStore, dc.ssController = cache.NewInformer( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - return dc.kubeClient.Apps().StatefulSets(v1.NamespaceAll).List(options) + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + return dc.kubeClient.Apps().StatefulSets(metav1.NamespaceAll).List(options) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - return dc.kubeClient.Apps().StatefulSets(v1.NamespaceAll).Watch(options) + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + return dc.kubeClient.Apps().StatefulSets(metav1.NamespaceAll).Watch(options) }, }, &apps.StatefulSet{}, diff --git a/vendor/k8s.io/kubernetes/pkg/controller/disruption/disruption_test.go b/vendor/k8s.io/kubernetes/pkg/controller/disruption/disruption_test.go index 207ff2d8..f88df2e0 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/disruption/disruption_test.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/disruption/disruption_test.go @@ -30,6 +30,7 @@ import ( extensions "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" policy "k8s.io/kubernetes/pkg/apis/policy/v1beta1" "k8s.io/kubernetes/pkg/client/cache" + "k8s.io/kubernetes/pkg/client/legacylisters" "k8s.io/kubernetes/pkg/client/record" "k8s.io/kubernetes/pkg/controller" "k8s.io/kubernetes/pkg/util/intstr" @@ -87,12 +88,12 @@ func newFakeDisruptionController() (*DisruptionController, *pdbStates) { ps := &pdbStates{} dc := &DisruptionController{ - pdbLister: cache.StoreToPodDisruptionBudgetLister{Store: cache.NewStore(controller.KeyFunc)}, - podLister: cache.StoreToPodLister{Indexer: cache.NewIndexer(controller.KeyFunc, cache.Indexers{})}, - rcLister: cache.StoreToReplicationControllerLister{Indexer: cache.NewIndexer(controller.KeyFunc, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc})}, - rsLister: cache.StoreToReplicaSetLister{Indexer: cache.NewIndexer(controller.KeyFunc, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc})}, - dLister: cache.StoreToDeploymentLister{Indexer: cache.NewIndexer(controller.KeyFunc, cache.Indexers{})}, - ssLister: cache.StoreToStatefulSetLister{Store: cache.NewStore(controller.KeyFunc)}, + pdbLister: listers.StoreToPodDisruptionBudgetLister{Store: cache.NewStore(controller.KeyFunc)}, + podLister: listers.StoreToPodLister{Indexer: cache.NewIndexer(controller.KeyFunc, cache.Indexers{})}, + rcLister: listers.StoreToReplicationControllerLister{Indexer: cache.NewIndexer(controller.KeyFunc, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc})}, + rsLister: listers.StoreToReplicaSetLister{Indexer: cache.NewIndexer(controller.KeyFunc, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc})}, + dLister: listers.StoreToDeploymentLister{Indexer: cache.NewIndexer(controller.KeyFunc, cache.Indexers{})}, + ssLister: listers.StoreToStatefulSetLister{Store: cache.NewStore(controller.KeyFunc)}, getUpdater: func() updater { return ps.Set }, broadcaster: record.NewBroadcaster(), } @@ -118,10 +119,10 @@ func newPodDisruptionBudget(t *testing.T, minAvailable intstr.IntOrString) (*pol pdb := &policy.PodDisruptionBudget{ TypeMeta: metav1.TypeMeta{APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String()}, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: uuid.NewUUID(), Name: "foobar", - Namespace: v1.NamespaceDefault, + Namespace: metav1.NamespaceDefault, ResourceVersion: "18", }, Spec: policy.PodDisruptionBudgetSpec{ @@ -141,11 +142,11 @@ func newPodDisruptionBudget(t *testing.T, minAvailable intstr.IntOrString) (*pol func newPod(t *testing.T, name string) (*v1.Pod, string) { pod := &v1.Pod{ TypeMeta: metav1.TypeMeta{APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String()}, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: uuid.NewUUID(), Annotations: make(map[string]string), Name: name, - Namespace: v1.NamespaceDefault, + Namespace: metav1.NamespaceDefault, ResourceVersion: "18", Labels: fooBar(), }, @@ -168,10 +169,10 @@ func newPod(t *testing.T, name string) (*v1.Pod, string) { func newReplicationController(t *testing.T, size int32) (*v1.ReplicationController, string) { rc := &v1.ReplicationController{ TypeMeta: metav1.TypeMeta{APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String()}, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: uuid.NewUUID(), Name: "foobar", - Namespace: v1.NamespaceDefault, + Namespace: metav1.NamespaceDefault, ResourceVersion: "18", Labels: fooBar(), }, @@ -192,10 +193,10 @@ func newReplicationController(t *testing.T, size int32) (*v1.ReplicationControll func newDeployment(t *testing.T, size int32) (*extensions.Deployment, string) { d := &extensions.Deployment{ TypeMeta: metav1.TypeMeta{APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String()}, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: uuid.NewUUID(), Name: "foobar", - Namespace: v1.NamespaceDefault, + Namespace: metav1.NamespaceDefault, ResourceVersion: "18", Labels: fooBar(), }, @@ -216,10 +217,10 @@ func newDeployment(t *testing.T, size int32) (*extensions.Deployment, string) { func newReplicaSet(t *testing.T, size int32) (*extensions.ReplicaSet, string) { rs := &extensions.ReplicaSet{ TypeMeta: metav1.TypeMeta{APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String()}, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: uuid.NewUUID(), Name: "foobar", - Namespace: v1.NamespaceDefault, + Namespace: metav1.NamespaceDefault, ResourceVersion: "18", Labels: fooBar(), }, @@ -240,10 +241,10 @@ func newReplicaSet(t *testing.T, size int32) (*extensions.ReplicaSet, string) { func newStatefulSet(t *testing.T, size int32) (*apps.StatefulSet, string) { ss := &apps.StatefulSet{ TypeMeta: metav1.TypeMeta{APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String()}, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: uuid.NewUUID(), Name: "foobar", - Namespace: v1.NamespaceDefault, + Namespace: metav1.NamespaceDefault, ResourceVersion: "18", Labels: fooBar(), }, diff --git a/vendor/k8s.io/kubernetes/pkg/controller/endpoint/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/endpoint/BUILD index 80680357..5b72229d 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/endpoint/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/endpoint/BUILD @@ -21,6 +21,7 @@ go_library( "//pkg/api/v1/pod:go_default_library", "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", + "//pkg/client/legacylisters:go_default_library", "//pkg/controller:go_default_library", "//pkg/controller/informers:go_default_library", "//pkg/util/metrics:go_default_library", @@ -49,12 +50,12 @@ go_test( "//pkg/api/v1/endpoints:go_default_library", "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/controller:go_default_library", "//pkg/util/intstr:go_default_library", - "//pkg/util/testing:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", + "//vendor:k8s.io/client-go/rest", + "//vendor:k8s.io/client-go/util/testing", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/endpoint/endpoints_controller.go b/vendor/k8s.io/kubernetes/pkg/controller/endpoint/endpoints_controller.go index 7e8d0752..4cf49d66 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/endpoint/endpoints_controller.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/endpoint/endpoints_controller.go @@ -36,6 +36,7 @@ import ( utilpod "k8s.io/kubernetes/pkg/api/v1/pod" "k8s.io/kubernetes/pkg/client/cache" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" + "k8s.io/kubernetes/pkg/client/legacylisters" "k8s.io/kubernetes/pkg/controller" "k8s.io/kubernetes/pkg/controller/informers" "k8s.io/kubernetes/pkg/util/metrics" @@ -83,11 +84,11 @@ func NewEndpointController(podInformer cache.SharedIndexInformer, client clients e.serviceStore.Indexer, e.serviceController = cache.NewIndexerInformer( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - return e.client.Core().Services(v1.NamespaceAll).List(options) + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + return e.client.Core().Services(metav1.NamespaceAll).List(options) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - return e.client.Core().Services(v1.NamespaceAll).Watch(options) + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + return e.client.Core().Services(metav1.NamespaceAll).Watch(options) }, }, &v1.Service{}, @@ -128,8 +129,8 @@ func NewEndpointControllerFromClient(client *clientset.Clientset, resyncPeriod c type EndpointController struct { client clientset.Interface - serviceStore cache.StoreToServiceLister - podStore cache.StoreToPodLister + serviceStore listers.StoreToServiceLister + podStore listers.StoreToPodLister // internalPodInformer is used to hold a personal informer. If we're using // a normal shared informer, then the informer will be started for us. If @@ -451,7 +452,7 @@ func (e *EndpointController) syncService(key string) error { if err != nil { if errors.IsNotFound(err) { currentEndpoints = &v1.Endpoints{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: service.Name, Labels: service.Labels, }, @@ -502,7 +503,7 @@ func (e *EndpointController) syncService(key string) error { // some stragglers could have been left behind if the endpoint controller // reboots). func (e *EndpointController) checkLeftoverEndpoints() { - list, err := e.client.Core().Endpoints(v1.NamespaceAll).List(v1.ListOptions{}) + list, err := e.client.Core().Endpoints(metav1.NamespaceAll).List(metav1.ListOptions{}) if err != nil { utilruntime.HandleError(fmt.Errorf("Unable to list endpoints (%v); orphaned endpoints will not be cleaned up. (They're pretty harmless, but you can restart this component if you want another attempt made.)", err)) return diff --git a/vendor/k8s.io/kubernetes/pkg/controller/endpoint/endpoints_controller_test.go b/vendor/k8s.io/kubernetes/pkg/controller/endpoint/endpoints_controller_test.go index 2318daaa..103ed319 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/endpoint/endpoints_controller_test.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/endpoint/endpoints_controller_test.go @@ -24,16 +24,16 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" + restclient "k8s.io/client-go/rest" + utiltesting "k8s.io/client-go/util/testing" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" "k8s.io/kubernetes/pkg/api/v1" endptspkg "k8s.io/kubernetes/pkg/api/v1/endpoints" "k8s.io/kubernetes/pkg/client/cache" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/controller" "k8s.io/kubernetes/pkg/util/intstr" - utiltesting "k8s.io/kubernetes/pkg/util/testing" ) var alwaysReady = func() bool { return true } @@ -43,7 +43,7 @@ func addPods(store cache.Store, namespace string, nPods int, nPorts int, nNotRea for i := 0; i < nPods+nNotReady; i++ { p := &v1.Pod{ TypeMeta: metav1.TypeMeta{APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String()}, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: namespace, Name: fmt.Sprintf("pod%d", i), Labels: map[string]string{"foo": "bar"}, @@ -93,10 +93,10 @@ func makeTestServer(t *testing.T, namespace string, endpointsResponse serverResp } func TestSyncEndpointsItemsPreserveNoSelector(t *testing.T) { - ns := v1.NamespaceDefault + ns := metav1.NamespaceDefault testServer, endpointsHandler := makeTestServer(t, ns, serverResponse{http.StatusOK, &v1.Endpoints{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: ns, ResourceVersion: "1", @@ -111,7 +111,7 @@ func TestSyncEndpointsItemsPreserveNoSelector(t *testing.T) { endpoints := NewEndpointControllerFromClient(client, controller.NoResyncPeriodFunc) endpoints.podStoreSynced = alwaysReady endpoints.serviceStore.Indexer.Add(&v1.Service{ - ObjectMeta: v1.ObjectMeta{Name: "foo", Namespace: ns}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: ns}, Spec: v1.ServiceSpec{Ports: []v1.ServicePort{{Port: 80}}}, }) endpoints.syncService(ns + "/foo") @@ -119,16 +119,16 @@ func TestSyncEndpointsItemsPreserveNoSelector(t *testing.T) { } func TestCheckLeftoverEndpoints(t *testing.T) { - ns := v1.NamespaceDefault - // Note that this requests *all* endpoints, therefore the NamespaceAll + ns := metav1.NamespaceDefault + // Note that this requests *all* endpoints, therefore metav1.NamespaceAll // below. - testServer, _ := makeTestServer(t, v1.NamespaceAll, + testServer, _ := makeTestServer(t, metav1.NamespaceAll, serverResponse{http.StatusOK, &v1.EndpointsList{ ListMeta: metav1.ListMeta{ ResourceVersion: "1", }, Items: []v1.Endpoints{{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: ns, ResourceVersion: "1", @@ -158,7 +158,7 @@ func TestSyncEndpointsProtocolTCP(t *testing.T) { ns := "other" testServer, endpointsHandler := makeTestServer(t, ns, serverResponse{http.StatusOK, &v1.Endpoints{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: ns, ResourceVersion: "1", @@ -175,7 +175,7 @@ func TestSyncEndpointsProtocolTCP(t *testing.T) { addPods(endpoints.podStore.Indexer, ns, 1, 1, 0) endpoints.serviceStore.Indexer.Add(&v1.Service{ - ObjectMeta: v1.ObjectMeta{Name: "foo", Namespace: ns}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: ns}, Spec: v1.ServiceSpec{ Selector: map[string]string{}, Ports: []v1.ServicePort{{Port: 80, TargetPort: intstr.FromInt(8080), Protocol: "TCP"}}, @@ -184,7 +184,7 @@ func TestSyncEndpointsProtocolTCP(t *testing.T) { endpoints.syncService(ns + "/foo") endpointsHandler.ValidateRequestCount(t, 2) data := runtime.EncodeOrDie(testapi.Default.Codec(), &v1.Endpoints{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: ns, ResourceVersion: "1", @@ -201,7 +201,7 @@ func TestSyncEndpointsProtocolUDP(t *testing.T) { ns := "other" testServer, endpointsHandler := makeTestServer(t, ns, serverResponse{http.StatusOK, &v1.Endpoints{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: ns, ResourceVersion: "1", @@ -217,7 +217,7 @@ func TestSyncEndpointsProtocolUDP(t *testing.T) { endpoints.podStoreSynced = alwaysReady addPods(endpoints.podStore.Indexer, ns, 1, 1, 0) endpoints.serviceStore.Indexer.Add(&v1.Service{ - ObjectMeta: v1.ObjectMeta{Name: "foo", Namespace: ns}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: ns}, Spec: v1.ServiceSpec{ Selector: map[string]string{}, Ports: []v1.ServicePort{{Port: 80, TargetPort: intstr.FromInt(8080), Protocol: "UDP"}}, @@ -226,7 +226,7 @@ func TestSyncEndpointsProtocolUDP(t *testing.T) { endpoints.syncService(ns + "/foo") endpointsHandler.ValidateRequestCount(t, 2) data := runtime.EncodeOrDie(testapi.Default.Codec(), &v1.Endpoints{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: ns, ResourceVersion: "1", @@ -243,7 +243,7 @@ func TestSyncEndpointsItemsEmptySelectorSelectsAll(t *testing.T) { ns := "other" testServer, endpointsHandler := makeTestServer(t, ns, serverResponse{http.StatusOK, &v1.Endpoints{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: ns, ResourceVersion: "1", @@ -256,7 +256,7 @@ func TestSyncEndpointsItemsEmptySelectorSelectsAll(t *testing.T) { endpoints.podStoreSynced = alwaysReady addPods(endpoints.podStore.Indexer, ns, 1, 1, 0) endpoints.serviceStore.Indexer.Add(&v1.Service{ - ObjectMeta: v1.ObjectMeta{Name: "foo", Namespace: ns}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: ns}, Spec: v1.ServiceSpec{ Selector: map[string]string{}, Ports: []v1.ServicePort{{Port: 80, Protocol: "TCP", TargetPort: intstr.FromInt(8080)}}, @@ -264,7 +264,7 @@ func TestSyncEndpointsItemsEmptySelectorSelectsAll(t *testing.T) { }) endpoints.syncService(ns + "/foo") data := runtime.EncodeOrDie(testapi.Default.Codec(), &v1.Endpoints{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: ns, ResourceVersion: "1", @@ -281,7 +281,7 @@ func TestSyncEndpointsItemsEmptySelectorSelectsAllNotReady(t *testing.T) { ns := "other" testServer, endpointsHandler := makeTestServer(t, ns, serverResponse{http.StatusOK, &v1.Endpoints{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: ns, ResourceVersion: "1", @@ -294,7 +294,7 @@ func TestSyncEndpointsItemsEmptySelectorSelectsAllNotReady(t *testing.T) { endpoints.podStoreSynced = alwaysReady addPods(endpoints.podStore.Indexer, ns, 0, 1, 1) endpoints.serviceStore.Indexer.Add(&v1.Service{ - ObjectMeta: v1.ObjectMeta{Name: "foo", Namespace: ns}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: ns}, Spec: v1.ServiceSpec{ Selector: map[string]string{}, Ports: []v1.ServicePort{{Port: 80, Protocol: "TCP", TargetPort: intstr.FromInt(8080)}}, @@ -302,7 +302,7 @@ func TestSyncEndpointsItemsEmptySelectorSelectsAllNotReady(t *testing.T) { }) endpoints.syncService(ns + "/foo") data := runtime.EncodeOrDie(testapi.Default.Codec(), &v1.Endpoints{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: ns, ResourceVersion: "1", @@ -319,7 +319,7 @@ func TestSyncEndpointsItemsEmptySelectorSelectsAllMixed(t *testing.T) { ns := "other" testServer, endpointsHandler := makeTestServer(t, ns, serverResponse{http.StatusOK, &v1.Endpoints{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: ns, ResourceVersion: "1", @@ -332,7 +332,7 @@ func TestSyncEndpointsItemsEmptySelectorSelectsAllMixed(t *testing.T) { endpoints.podStoreSynced = alwaysReady addPods(endpoints.podStore.Indexer, ns, 1, 1, 1) endpoints.serviceStore.Indexer.Add(&v1.Service{ - ObjectMeta: v1.ObjectMeta{Name: "foo", Namespace: ns}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: ns}, Spec: v1.ServiceSpec{ Selector: map[string]string{}, Ports: []v1.ServicePort{{Port: 80, Protocol: "TCP", TargetPort: intstr.FromInt(8080)}}, @@ -340,7 +340,7 @@ func TestSyncEndpointsItemsEmptySelectorSelectsAllMixed(t *testing.T) { }) endpoints.syncService(ns + "/foo") data := runtime.EncodeOrDie(testapi.Default.Codec(), &v1.Endpoints{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: ns, ResourceVersion: "1", @@ -358,7 +358,7 @@ func TestSyncEndpointsItemsPreexisting(t *testing.T) { ns := "bar" testServer, endpointsHandler := makeTestServer(t, ns, serverResponse{http.StatusOK, &v1.Endpoints{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: ns, ResourceVersion: "1", @@ -374,7 +374,7 @@ func TestSyncEndpointsItemsPreexisting(t *testing.T) { endpoints.podStoreSynced = alwaysReady addPods(endpoints.podStore.Indexer, ns, 1, 1, 0) endpoints.serviceStore.Indexer.Add(&v1.Service{ - ObjectMeta: v1.ObjectMeta{Name: "foo", Namespace: ns}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: ns}, Spec: v1.ServiceSpec{ Selector: map[string]string{"foo": "bar"}, Ports: []v1.ServicePort{{Port: 80, Protocol: "TCP", TargetPort: intstr.FromInt(8080)}}, @@ -382,7 +382,7 @@ func TestSyncEndpointsItemsPreexisting(t *testing.T) { }) endpoints.syncService(ns + "/foo") data := runtime.EncodeOrDie(testapi.Default.Codec(), &v1.Endpoints{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: ns, ResourceVersion: "1", @@ -396,10 +396,10 @@ func TestSyncEndpointsItemsPreexisting(t *testing.T) { } func TestSyncEndpointsItemsPreexistingIdentical(t *testing.T) { - ns := v1.NamespaceDefault - testServer, endpointsHandler := makeTestServer(t, v1.NamespaceDefault, + ns := metav1.NamespaceDefault + testServer, endpointsHandler := makeTestServer(t, metav1.NamespaceDefault, serverResponse{http.StatusOK, &v1.Endpoints{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ ResourceVersion: "1", Name: "foo", Namespace: ns, @@ -413,16 +413,16 @@ func TestSyncEndpointsItemsPreexistingIdentical(t *testing.T) { client := clientset.NewForConfigOrDie(&restclient.Config{Host: testServer.URL, ContentConfig: restclient.ContentConfig{GroupVersion: &api.Registry.GroupOrDie(v1.GroupName).GroupVersion}}) endpoints := NewEndpointControllerFromClient(client, controller.NoResyncPeriodFunc) endpoints.podStoreSynced = alwaysReady - addPods(endpoints.podStore.Indexer, v1.NamespaceDefault, 1, 1, 0) + addPods(endpoints.podStore.Indexer, metav1.NamespaceDefault, 1, 1, 0) endpoints.serviceStore.Indexer.Add(&v1.Service{ - ObjectMeta: v1.ObjectMeta{Name: "foo", Namespace: v1.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: metav1.NamespaceDefault}, Spec: v1.ServiceSpec{ Selector: map[string]string{"foo": "bar"}, Ports: []v1.ServicePort{{Port: 80, Protocol: "TCP", TargetPort: intstr.FromInt(8080)}}, }, }) endpoints.syncService(ns + "/foo") - endpointsHandler.ValidateRequest(t, testapi.Default.ResourcePath("endpoints", v1.NamespaceDefault, "foo"), "GET", nil) + endpointsHandler.ValidateRequest(t, testapi.Default.ResourcePath("endpoints", metav1.NamespaceDefault, "foo"), "GET", nil) } func TestSyncEndpointsItems(t *testing.T) { @@ -436,7 +436,7 @@ func TestSyncEndpointsItems(t *testing.T) { addPods(endpoints.podStore.Indexer, ns, 3, 2, 0) addPods(endpoints.podStore.Indexer, "blah", 5, 2, 0) // make sure these aren't found! endpoints.serviceStore.Indexer.Add(&v1.Service{ - ObjectMeta: v1.ObjectMeta{Name: "foo", Namespace: ns}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: ns}, Spec: v1.ServiceSpec{ Selector: map[string]string{"foo": "bar"}, Ports: []v1.ServicePort{ @@ -458,7 +458,7 @@ func TestSyncEndpointsItems(t *testing.T) { }, }} data := runtime.EncodeOrDie(testapi.Default.Codec(), &v1.Endpoints{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ ResourceVersion: "", }, Subsets: endptspkg.SortSubsets(expectedSubsets), @@ -479,7 +479,7 @@ func TestSyncEndpointsItemsWithLabels(t *testing.T) { addPods(endpoints.podStore.Indexer, ns, 3, 2, 0) serviceLabels := map[string]string{"foo": "bar"} endpoints.serviceStore.Indexer.Add(&v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: ns, Labels: serviceLabels, @@ -505,7 +505,7 @@ func TestSyncEndpointsItemsWithLabels(t *testing.T) { }, }} data := runtime.EncodeOrDie(testapi.Default.Codec(), &v1.Endpoints{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ ResourceVersion: "", Labels: serviceLabels, }, @@ -520,7 +520,7 @@ func TestSyncEndpointsItemsPreexistingLabelsChange(t *testing.T) { ns := "bar" testServer, endpointsHandler := makeTestServer(t, ns, serverResponse{http.StatusOK, &v1.Endpoints{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: ns, ResourceVersion: "1", @@ -540,7 +540,7 @@ func TestSyncEndpointsItemsPreexistingLabelsChange(t *testing.T) { addPods(endpoints.podStore.Indexer, ns, 1, 1, 0) serviceLabels := map[string]string{"baz": "blah"} endpoints.serviceStore.Indexer.Add(&v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: ns, Labels: serviceLabels, @@ -552,7 +552,7 @@ func TestSyncEndpointsItemsPreexistingLabelsChange(t *testing.T) { }) endpoints.syncService(ns + "/foo") data := runtime.EncodeOrDie(testapi.Default.Codec(), &v1.Endpoints{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: ns, ResourceVersion: "1", diff --git a/vendor/k8s.io/kubernetes/pkg/controller/garbagecollector/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/garbagecollector/BUILD index 90b55a68..39df3587 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/garbagecollector/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/garbagecollector/BUILD @@ -18,12 +18,10 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//pkg/api/v1:go_default_library", "//pkg/client/cache:go_default_library", "//pkg/client/typed/dynamic:go_default_library", "//pkg/controller/garbagecollector/metaonly:go_default_library", - "//pkg/util/clock:go_default_library", "//pkg/util/metrics:go_default_library", "//pkg/util/workqueue:go_default_library", "//vendor:github.com/golang/glog", @@ -41,6 +39,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/util/sets", "//vendor:k8s.io/apimachinery/pkg/util/wait", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/util/clock", ], ) @@ -53,10 +52,8 @@ go_test( "//pkg/api:go_default_library", "//pkg/api/install:go_default_library", "//pkg/api/v1:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/typed/dynamic:go_default_library", "//pkg/controller/garbagecollector/metaonly:go_default_library", - "//pkg/util/clock:go_default_library", "//pkg/util/workqueue:go_default_library", "//vendor:github.com/stretchr/testify/assert", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", @@ -65,6 +62,8 @@ go_test( "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/json", "//vendor:k8s.io/apimachinery/pkg/util/sets", + "//vendor:k8s.io/client-go/rest", + "//vendor:k8s.io/client-go/util/clock", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/garbagecollector/garbagecollector.go b/vendor/k8s.io/kubernetes/pkg/controller/garbagecollector/garbagecollector.go index 9017de6a..f222f202 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/garbagecollector/garbagecollector.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/garbagecollector/garbagecollector.go @@ -35,12 +35,11 @@ import ( "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apimachinery/pkg/watch" - "k8s.io/kubernetes/pkg/api" + "k8s.io/client-go/util/clock" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/cache" "k8s.io/kubernetes/pkg/client/typed/dynamic" "k8s.io/kubernetes/pkg/controller/garbagecollector/metaonly" - "k8s.io/kubernetes/pkg/util/clock" "k8s.io/kubernetes/pkg/util/workqueue" ) @@ -213,7 +212,7 @@ func referencesDiffs(old []metav1.OwnerReference, new []metav1.OwnerReference) ( return added, removed } -func shouldOrphanDependents(e *event, accessor meta.Object) bool { +func shouldOrphanDependents(e *event, accessor metav1.Object) bool { // The delta_fifo may combine the creation and update of the object into one // event, so we need to check AddEvent as well. if e.oldObj == nil { @@ -451,24 +450,24 @@ type GarbageCollector struct { func gcListWatcher(client *dynamic.Client, resource schema.GroupVersionResource) *cache.ListWatch { return &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { // APIResource.Kind is not used by the dynamic client, so // leave it empty. We want to list this resource in all // namespaces if it's namespace scoped, so leave // APIResource.Namespaced as false is all right. apiResource := metav1.APIResource{Name: resource.Resource} return client.ParameterCodec(dynamic.VersionedParameterEncoderWithV1Fallback). - Resource(&apiResource, v1.NamespaceAll). + Resource(&apiResource, metav1.NamespaceAll). List(&options) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { // APIResource.Kind is not used by the dynamic client, so // leave it empty. We want to list this resource in all // namespaces if it's namespace scoped, so leave // APIResource.Namespaced as false is all right. apiResource := metav1.APIResource{Name: resource.Resource} return client.ParameterCodec(dynamic.VersionedParameterEncoderWithV1Fallback). - Resource(&apiResource, v1.NamespaceAll). + Resource(&apiResource, metav1.NamespaceAll). Watch(&options) }, } @@ -625,8 +624,8 @@ func (gc *GarbageCollector) deleteObject(item objectReference) error { return err } uid := item.UID - preconditions := v1.Preconditions{UID: &uid} - deleteOptions := v1.DeleteOptions{Preconditions: &preconditions} + preconditions := metav1.Preconditions{UID: &uid} + deleteOptions := metav1.DeleteOptions{Preconditions: &preconditions} return client.Resource(resource, item.Namespace).Delete(item.Name, &deleteOptions) } @@ -660,7 +659,7 @@ func (gc *GarbageCollector) patchObject(item objectReference, patch []byte) (*un if err != nil { return nil, err } - return client.Resource(resource, item.Namespace).Patch(item.Name, api.StrategicMergePatchType, patch) + return client.Resource(resource, item.Namespace).Patch(item.Name, types.StrategicMergePatchType, patch) } func objectReferenceToUnstructured(ref objectReference) *unstructured.Unstructured { @@ -679,7 +678,7 @@ func objectReferenceToMetadataOnlyObject(ref objectReference) *metaonly.Metadata APIVersion: ref.APIVersion, Kind: ref.Kind, }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: ref.Namespace, UID: ref.UID, Name: ref.Name, diff --git a/vendor/k8s.io/kubernetes/pkg/controller/garbagecollector/garbagecollector_test.go b/vendor/k8s.io/kubernetes/pkg/controller/garbagecollector/garbagecollector_test.go index 20f197de..0f2f762c 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/garbagecollector/garbagecollector_test.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/garbagecollector/garbagecollector_test.go @@ -33,12 +33,12 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/json" "k8s.io/apimachinery/pkg/util/sets" + restclient "k8s.io/client-go/rest" + "k8s.io/client-go/util/clock" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/typed/dynamic" "k8s.io/kubernetes/pkg/controller/garbagecollector/metaonly" - "k8s.io/kubernetes/pkg/util/clock" "k8s.io/kubernetes/pkg/util/workqueue" ) @@ -126,7 +126,7 @@ func getPod(podName string, ownerReferences []metav1.OwnerReference) *v1.Pod { Kind: "Pod", APIVersion: "v1", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, Namespace: "ns1", OwnerReferences: ownerReferences, @@ -237,7 +237,7 @@ func createEvent(eventType eventType, selfUID string, owners []string) event { return event{ eventType: eventType, obj: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: types.UID(selfUID), OwnerReferences: ownerReferences, }, @@ -349,8 +349,8 @@ func TestGCListWatcher(t *testing.T) { t.Fatal(err) } lw := gcListWatcher(client, podResource) - lw.Watch(v1.ListOptions{ResourceVersion: "1"}) - lw.List(v1.ListOptions{ResourceVersion: "1"}) + lw.Watch(metav1.ListOptions{ResourceVersion: "1"}) + lw.List(metav1.ListOptions{ResourceVersion: "1"}) if e, a := 2, len(testHandler.actions); e != a { t.Errorf("expect %d requests, got %d", e, a) } diff --git a/vendor/k8s.io/kubernetes/pkg/controller/garbagecollector/metaonly/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/garbagecollector/metaonly/BUILD index 1d4a87f5..ee01ace1 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/garbagecollector/metaonly/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/garbagecollector/metaonly/BUILD @@ -18,7 +18,6 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/api:go_default_library", - "//pkg/api/v1:go_default_library", "//vendor:github.com/ugorji/go/codec", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", diff --git a/vendor/k8s.io/kubernetes/pkg/controller/garbagecollector/metaonly/metaonly.go b/vendor/k8s.io/kubernetes/pkg/controller/garbagecollector/metaonly/metaonly.go index bdde245b..cfe55b25 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/garbagecollector/metaonly/metaonly.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/garbagecollector/metaonly/metaonly.go @@ -34,7 +34,7 @@ type metaOnlyJSONScheme struct{} // This function can be extended to mapping different gvk to different MetadataOnlyObject, // which embedded with different version of ObjectMeta. Currently the system -// only supports v1.ObjectMeta. +// only supports metav1.ObjectMeta. func gvkToMetadataOnlyObject(gvk schema.GroupVersionKind) runtime.Object { if strings.HasSuffix(gvk.Kind, "List") { return &MetadataOnlyObjectList{} diff --git a/vendor/k8s.io/kubernetes/pkg/controller/garbagecollector/metaonly/metaonly_test.go b/vendor/k8s.io/kubernetes/pkg/controller/garbagecollector/metaonly/metaonly_test.go index e8135a43..7e69dfe5 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/garbagecollector/metaonly/metaonly_test.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/garbagecollector/metaonly/metaonly_test.go @@ -36,7 +36,7 @@ func getPod() *v1.Pod { Kind: "Pod", APIVersion: "v1", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod", OwnerReferences: []metav1.OwnerReference{ {UID: "1234"}, diff --git a/vendor/k8s.io/kubernetes/pkg/controller/garbagecollector/metaonly/types.generated.go b/vendor/k8s.io/kubernetes/pkg/controller/garbagecollector/metaonly/types.generated.go index c34e2346..8118255f 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/garbagecollector/metaonly/types.generated.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/garbagecollector/metaonly/types.generated.go @@ -26,8 +26,7 @@ import ( "fmt" codec1978 "github.com/ugorji/go/codec" pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - pkg3_types "k8s.io/apimachinery/pkg/types" - pkg2_v1 "k8s.io/kubernetes/pkg/api/v1" + pkg2_types "k8s.io/apimachinery/pkg/types" "reflect" "runtime" time "time" @@ -64,10 +63,9 @@ func init() { } if false { // reference the types, but skip this branch at build/run time var v0 pkg1_v1.TypeMeta - var v1 pkg3_types.UID - var v2 pkg2_v1.ObjectMeta - var v3 time.Time - _, _, _, _ = v0, v1, v2, v3 + var v1 pkg2_types.UID + var v2 time.Time + _, _, _ = v0, v1, v2 } } @@ -158,7 +156,13 @@ func (x *MetadataOnlyObject) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -168,7 +172,13 @@ func (x *MetadataOnlyObject) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -258,10 +268,16 @@ func (x *MetadataOnlyObject) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } default: z.DecStructFieldNotFound(-1, yys3) @@ -274,16 +290,16 @@ func (x *MetadataOnlyObject) codecDecodeSelfFromArray(l int, d *codec1978.Decode var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj9 int - var yyb9 bool - var yyhl9 bool = l >= 0 - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l + var yyj10 int + var yyb10 bool + var yyhl10 bool = l >= 0 + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb9 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb9 { + if yyb10 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -291,21 +307,21 @@ func (x *MetadataOnlyObject) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv10 := &x.Kind - yym11 := z.DecBinary() - _ = yym11 + yyv11 := &x.Kind + yym12 := z.DecBinary() + _ = yym12 if false { } else { - *((*string)(yyv10)) = r.DecodeString() + *((*string)(yyv11)) = r.DecodeString() } } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb9 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb9 { + if yyb10 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -313,43 +329,49 @@ func (x *MetadataOnlyObject) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv12 := &x.APIVersion - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.APIVersion + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb9 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb9 { + if yyb10 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv14 := &x.ObjectMeta - yyv14.CodecDecodeSelf(d) + yyv15 := &x.ObjectMeta + yym16 := z.DecBinary() + _ = yym16 + if false { + } else if z.HasExtensions() && z.DecExt(yyv15) { + } else { + z.DecFallback(yyv15, false) + } } for { - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l } else { - yyb9 = r.CheckBreak() + yyb10 = r.CheckBreak() } - if yyb9 { + if yyb10 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj9-1, "") + z.DecStructFieldNotFound(yyj10-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } diff --git a/vendor/k8s.io/kubernetes/pkg/controller/garbagecollector/metaonly/types.go b/vendor/k8s.io/kubernetes/pkg/controller/garbagecollector/metaonly/types.go index bcbd5e82..a738ffa9 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/garbagecollector/metaonly/types.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/garbagecollector/metaonly/types.go @@ -18,7 +18,6 @@ package metaonly import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/kubernetes/pkg/api/v1" ) // MetadataOnlyObject allows decoding only the apiVersion, kind, and metadata fields of @@ -27,7 +26,7 @@ import ( type MetadataOnlyObject struct { metav1.TypeMeta `json:",inline"` // +optional - v1.ObjectMeta `json:"metadata,omitempty"` + metav1.ObjectMeta `json:"metadata,omitempty"` } // MetadataOnlyObjectList allows decoding from JSON data only the typemeta and metadata of diff --git a/vendor/k8s.io/kubernetes/pkg/controller/garbagecollector/metrics.go b/vendor/k8s.io/kubernetes/pkg/controller/garbagecollector/metrics.go index af385e0d..dd6f03b0 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/garbagecollector/metrics.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/garbagecollector/metrics.go @@ -20,7 +20,7 @@ import ( "sync" "time" - "k8s.io/kubernetes/pkg/util/clock" + "k8s.io/client-go/util/clock" "github.com/prometheus/client_golang/prometheus" ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/informers/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/informers/BUILD index 73225373..46763d3e 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/informers/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/informers/BUILD @@ -31,9 +31,11 @@ go_library( "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", "//pkg/client/clientset_generated/internalclientset:go_default_library", + "//pkg/client/legacylisters:go_default_library", "//pkg/client/listers/batch/v1:go_default_library", "//pkg/client/listers/core/internalversion:go_default_library", "//vendor:github.com/golang/glog", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/watch", diff --git a/vendor/k8s.io/kubernetes/pkg/controller/informers/batch.go b/vendor/k8s.io/kubernetes/pkg/controller/informers/batch.go index 09c4dc17..35482471 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/informers/batch.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/informers/batch.go @@ -20,9 +20,9 @@ import ( "reflect" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" - "k8s.io/kubernetes/pkg/api/v1" batch "k8s.io/kubernetes/pkg/apis/batch/v1" "k8s.io/kubernetes/pkg/client/cache" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" @@ -61,11 +61,11 @@ func (f *jobInformer) Informer() cache.SharedIndexInformer { func NewJobInformer(client clientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - return client.Batch().Jobs(v1.NamespaceAll).List(options) + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + return client.Batch().Jobs(metav1.NamespaceAll).List(options) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - return client.Batch().Jobs(v1.NamespaceAll).Watch(options) + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + return client.Batch().Jobs(metav1.NamespaceAll).Watch(options) }, }, &batch.Job{}, diff --git a/vendor/k8s.io/kubernetes/pkg/controller/informers/core.go b/vendor/k8s.io/kubernetes/pkg/controller/informers/core.go index 7d084e9a..8f3717cf 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/informers/core.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/informers/core.go @@ -20,6 +20,7 @@ import ( "reflect" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" "k8s.io/kubernetes/pkg/api" @@ -27,6 +28,7 @@ import ( "k8s.io/kubernetes/pkg/client/cache" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" + "k8s.io/kubernetes/pkg/client/legacylisters" coreinternallisters "k8s.io/kubernetes/pkg/client/listers/core/internalversion" ) @@ -34,7 +36,7 @@ import ( // Interface provides constructor for informer and lister for pods type PodInformer interface { Informer() cache.SharedIndexInformer - Lister() *cache.StoreToPodLister + Lister() *listers.StoreToPodLister } type podInformer struct { @@ -59,9 +61,9 @@ func (f *podInformer) Informer() cache.SharedIndexInformer { } // Lister returns lister for podInformer -func (f *podInformer) Lister() *cache.StoreToPodLister { +func (f *podInformer) Lister() *listers.StoreToPodLister { informer := f.Informer() - return &cache.StoreToPodLister{Indexer: informer.GetIndexer()} + return &listers.StoreToPodLister{Indexer: informer.GetIndexer()} } //***************************************************************************** @@ -70,7 +72,7 @@ func (f *podInformer) Lister() *cache.StoreToPodLister { // Interface provides constructor for informer and lister for namsespaces type NamespaceInformer interface { Informer() cache.SharedIndexInformer - Lister() *cache.IndexerToNamespaceLister + Lister() *listers.IndexerToNamespaceLister } type namespaceInformer struct { @@ -95,9 +97,9 @@ func (f *namespaceInformer) Informer() cache.SharedIndexInformer { } // Lister returns lister for namespaceInformer -func (f *namespaceInformer) Lister() *cache.IndexerToNamespaceLister { +func (f *namespaceInformer) Lister() *listers.IndexerToNamespaceLister { informer := f.Informer() - return &cache.IndexerToNamespaceLister{Indexer: informer.GetIndexer()} + return &listers.IndexerToNamespaceLister{Indexer: informer.GetIndexer()} } //***************************************************************************** @@ -142,7 +144,7 @@ func (f *internalNamespaceInformer) Lister() coreinternallisters.NamespaceLister // Interface provides constructor for informer and lister for nodes type NodeInformer interface { Informer() cache.SharedIndexInformer - Lister() *cache.StoreToNodeLister + Lister() *listers.StoreToNodeLister } type nodeInformer struct { @@ -167,9 +169,9 @@ func (f *nodeInformer) Informer() cache.SharedIndexInformer { } // Lister returns lister for nodeInformer -func (f *nodeInformer) Lister() *cache.StoreToNodeLister { +func (f *nodeInformer) Lister() *listers.StoreToNodeLister { informer := f.Informer() - return &cache.StoreToNodeLister{Store: informer.GetStore()} + return &listers.StoreToNodeLister{Store: informer.GetStore()} } //***************************************************************************** @@ -178,7 +180,7 @@ func (f *nodeInformer) Lister() *cache.StoreToNodeLister { // Interface provides constructor for informer and lister for persistent volume claims type PVCInformer interface { Informer() cache.SharedIndexInformer - Lister() *cache.StoreToPersistentVolumeClaimLister + Lister() *listers.StoreToPersistentVolumeClaimLister } type pvcInformer struct { @@ -203,9 +205,9 @@ func (f *pvcInformer) Informer() cache.SharedIndexInformer { } // Lister returns lister for pvcInformer -func (f *pvcInformer) Lister() *cache.StoreToPersistentVolumeClaimLister { +func (f *pvcInformer) Lister() *listers.StoreToPersistentVolumeClaimLister { informer := f.Informer() - return &cache.StoreToPersistentVolumeClaimLister{Indexer: informer.GetIndexer()} + return &listers.StoreToPersistentVolumeClaimLister{Indexer: informer.GetIndexer()} } //***************************************************************************** @@ -214,7 +216,7 @@ func (f *pvcInformer) Lister() *cache.StoreToPersistentVolumeClaimLister { // Interface provides constructor for informer and lister for persistent volumes type PVInformer interface { Informer() cache.SharedIndexInformer - Lister() *cache.StoreToPVFetcher + Lister() *listers.StoreToPVFetcher } type pvInformer struct { @@ -239,9 +241,9 @@ func (f *pvInformer) Informer() cache.SharedIndexInformer { } // Lister returns lister for pvInformer -func (f *pvInformer) Lister() *cache.StoreToPVFetcher { +func (f *pvInformer) Lister() *listers.StoreToPVFetcher { informer := f.Informer() - return &cache.StoreToPVFetcher{Store: informer.GetStore()} + return &listers.StoreToPVFetcher{Store: informer.GetStore()} } //***************************************************************************** @@ -250,7 +252,7 @@ func (f *pvInformer) Lister() *cache.StoreToPVFetcher { // Interface provides constructor for informer and lister for limit ranges. type LimitRangeInformer interface { Informer() cache.SharedIndexInformer - Lister() *cache.StoreToLimitRangeLister + Lister() *listers.StoreToLimitRangeLister } type limitRangeInformer struct { @@ -275,9 +277,9 @@ func (f *limitRangeInformer) Informer() cache.SharedIndexInformer { } // Lister returns lister for limitRangeInformer -func (f *limitRangeInformer) Lister() *cache.StoreToLimitRangeLister { +func (f *limitRangeInformer) Lister() *listers.StoreToLimitRangeLister { informer := f.Informer() - return &cache.StoreToLimitRangeLister{Indexer: informer.GetIndexer()} + return &listers.StoreToLimitRangeLister{Indexer: informer.GetIndexer()} } //***************************************************************************** @@ -322,7 +324,7 @@ func (f *internalLimitRangeInformer) Lister() coreinternallisters.LimitRangeList // Interface provides constructor for informer and lister for replication controllers. type ReplicationControllerInformer interface { Informer() cache.SharedIndexInformer - Lister() *cache.StoreToReplicationControllerLister + Lister() *listers.StoreToReplicationControllerLister } type replicationControllerInformer struct { @@ -347,9 +349,9 @@ func (f *replicationControllerInformer) Informer() cache.SharedIndexInformer { } // Lister returns lister for replicationControllerInformer -func (f *replicationControllerInformer) Lister() *cache.StoreToReplicationControllerLister { +func (f *replicationControllerInformer) Lister() *listers.StoreToReplicationControllerLister { informer := f.Informer() - return &cache.StoreToReplicationControllerLister{Indexer: informer.GetIndexer()} + return &listers.StoreToReplicationControllerLister{Indexer: informer.GetIndexer()} } //***************************************************************************** @@ -358,11 +360,11 @@ func (f *replicationControllerInformer) Lister() *cache.StoreToReplicationContro func NewPodInformer(client clientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - return client.Core().Pods(v1.NamespaceAll).List(options) + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + return client.Core().Pods(metav1.NamespaceAll).List(options) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - return client.Core().Pods(v1.NamespaceAll).Watch(options) + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + return client.Core().Pods(metav1.NamespaceAll).Watch(options) }, }, &v1.Pod{}, @@ -377,10 +379,10 @@ func NewPodInformer(client clientset.Interface, resyncPeriod time.Duration) cach func NewNodeInformer(client clientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { return client.Core().Nodes().List(options) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { return client.Core().Nodes().Watch(options) }, }, @@ -395,11 +397,11 @@ func NewNodeInformer(client clientset.Interface, resyncPeriod time.Duration) cac func NewPVCInformer(client clientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - return client.Core().PersistentVolumeClaims(v1.NamespaceAll).List(options) + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + return client.Core().PersistentVolumeClaims(metav1.NamespaceAll).List(options) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - return client.Core().PersistentVolumeClaims(v1.NamespaceAll).Watch(options) + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + return client.Core().PersistentVolumeClaims(metav1.NamespaceAll).Watch(options) }, }, &v1.PersistentVolumeClaim{}, @@ -414,10 +416,10 @@ func NewPVCInformer(client clientset.Interface, resyncPeriod time.Duration) cach func NewPVInformer(client clientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { return client.Core().PersistentVolumes().List(options) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { return client.Core().PersistentVolumes().Watch(options) }, }, @@ -432,10 +434,10 @@ func NewPVInformer(client clientset.Interface, resyncPeriod time.Duration) cache func NewNamespaceInformer(client clientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { return client.Core().Namespaces().List(options) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { return client.Core().Namespaces().Watch(options) }, }, @@ -450,15 +452,11 @@ func NewNamespaceInformer(client clientset.Interface, resyncPeriod time.Duration func NewInternalNamespaceInformer(client internalclientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - internalOptions := api.ListOptions{} - v1.Convert_v1_ListOptions_To_api_ListOptions(&options, &internalOptions, nil) - return client.Core().Namespaces().List(internalOptions) + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + return client.Core().Namespaces().List(options) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - internalOptions := api.ListOptions{} - v1.Convert_v1_ListOptions_To_api_ListOptions(&options, &internalOptions, nil) - return client.Core().Namespaces().Watch(internalOptions) + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + return client.Core().Namespaces().Watch(options) }, }, &api.Namespace{}, @@ -472,11 +470,11 @@ func NewInternalNamespaceInformer(client internalclientset.Interface, resyncPeri func NewLimitRangeInformer(client clientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - return client.Core().LimitRanges(v1.NamespaceAll).List(options) + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + return client.Core().LimitRanges(metav1.NamespaceAll).List(options) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - return client.Core().LimitRanges(v1.NamespaceAll).Watch(options) + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + return client.Core().LimitRanges(metav1.NamespaceAll).Watch(options) }, }, &v1.LimitRange{}, @@ -490,15 +488,11 @@ func NewLimitRangeInformer(client clientset.Interface, resyncPeriod time.Duratio func NewInternalLimitRangeInformer(internalclient internalclientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - internalOptions := api.ListOptions{} - v1.Convert_v1_ListOptions_To_api_ListOptions(&options, &internalOptions, nil) - return internalclient.Core().LimitRanges(v1.NamespaceAll).List(internalOptions) + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + return internalclient.Core().LimitRanges(metav1.NamespaceAll).List(options) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - internalOptions := api.ListOptions{} - v1.Convert_v1_ListOptions_To_api_ListOptions(&options, &internalOptions, nil) - return internalclient.Core().LimitRanges(v1.NamespaceAll).Watch(internalOptions) + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + return internalclient.Core().LimitRanges(metav1.NamespaceAll).Watch(options) }, }, &api.LimitRange{}, @@ -512,11 +506,11 @@ func NewInternalLimitRangeInformer(internalclient internalclientset.Interface, r func NewReplicationControllerInformer(client clientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - return client.Core().ReplicationControllers(v1.NamespaceAll).List(options) + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + return client.Core().ReplicationControllers(metav1.NamespaceAll).List(options) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - return client.Core().ReplicationControllers(v1.NamespaceAll).Watch(options) + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + return client.Core().ReplicationControllers(metav1.NamespaceAll).Watch(options) }, }, &v1.ReplicationController{}, @@ -533,7 +527,7 @@ func NewReplicationControllerInformer(client clientset.Interface, resyncPeriod t // Interface provides constructor for informer and lister for ServiceAccounts type ServiceAccountInformer interface { Informer() cache.SharedIndexInformer - Lister() *cache.StoreToServiceAccountLister + Lister() *listers.StoreToServiceAccountLister } type serviceAccountInformer struct { @@ -558,20 +552,20 @@ func (f *serviceAccountInformer) Informer() cache.SharedIndexInformer { } // Lister returns lister for ServiceAccountInformer -func (f *serviceAccountInformer) Lister() *cache.StoreToServiceAccountLister { +func (f *serviceAccountInformer) Lister() *listers.StoreToServiceAccountLister { informer := f.Informer() - return &cache.StoreToServiceAccountLister{Indexer: informer.GetIndexer()} + return &listers.StoreToServiceAccountLister{Indexer: informer.GetIndexer()} } // NewServiceAccountInformer returns a SharedIndexInformer that lists and watches all ServiceAccounts func NewServiceAccountInformer(client clientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { sharedIndexInformer := cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - return client.Core().ServiceAccounts(v1.NamespaceAll).List(options) + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + return client.Core().ServiceAccounts(metav1.NamespaceAll).List(options) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - return client.Core().ServiceAccounts(v1.NamespaceAll).Watch(options) + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + return client.Core().ServiceAccounts(metav1.NamespaceAll).Watch(options) }, }, &v1.ServiceAccount{}, diff --git a/vendor/k8s.io/kubernetes/pkg/controller/informers/extensions.go b/vendor/k8s.io/kubernetes/pkg/controller/informers/extensions.go index 911916f8..60556ee4 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/informers/extensions.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/informers/extensions.go @@ -19,18 +19,19 @@ package informers import ( "reflect" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" - "k8s.io/kubernetes/pkg/api/v1" extensions "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" "k8s.io/kubernetes/pkg/client/cache" + "k8s.io/kubernetes/pkg/client/legacylisters" ) // DaemonSetInformer is type of SharedIndexInformer which watches and lists all pods. // Interface provides constructor for informer and lister for pods type DaemonSetInformer interface { Informer() cache.SharedIndexInformer - Lister() *cache.StoreToDaemonSetLister + Lister() *listers.StoreToDaemonSetLister } type daemonSetInformer struct { @@ -48,11 +49,11 @@ func (f *daemonSetInformer) Informer() cache.SharedIndexInformer { } informer = cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - return f.client.Extensions().DaemonSets(v1.NamespaceAll).List(options) + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + return f.client.Extensions().DaemonSets(metav1.NamespaceAll).List(options) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - return f.client.Extensions().DaemonSets(v1.NamespaceAll).Watch(options) + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + return f.client.Extensions().DaemonSets(metav1.NamespaceAll).Watch(options) }, }, &extensions.DaemonSet{}, @@ -64,15 +65,15 @@ func (f *daemonSetInformer) Informer() cache.SharedIndexInformer { return informer } -func (f *daemonSetInformer) Lister() *cache.StoreToDaemonSetLister { +func (f *daemonSetInformer) Lister() *listers.StoreToDaemonSetLister { informer := f.Informer() - return &cache.StoreToDaemonSetLister{Store: informer.GetIndexer()} + return &listers.StoreToDaemonSetLister{Store: informer.GetIndexer()} } // DeploymentInformer is a type of SharedIndexInformer which watches and lists all deployments. type DeploymentInformer interface { Informer() cache.SharedIndexInformer - Lister() *cache.StoreToDeploymentLister + Lister() *listers.StoreToDeploymentLister } type deploymentInformer struct { @@ -90,11 +91,11 @@ func (f *deploymentInformer) Informer() cache.SharedIndexInformer { } informer = cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - return f.client.Extensions().Deployments(v1.NamespaceAll).List(options) + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + return f.client.Extensions().Deployments(metav1.NamespaceAll).List(options) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - return f.client.Extensions().Deployments(v1.NamespaceAll).Watch(options) + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + return f.client.Extensions().Deployments(metav1.NamespaceAll).Watch(options) }, }, &extensions.Deployment{}, @@ -106,15 +107,15 @@ func (f *deploymentInformer) Informer() cache.SharedIndexInformer { return informer } -func (f *deploymentInformer) Lister() *cache.StoreToDeploymentLister { +func (f *deploymentInformer) Lister() *listers.StoreToDeploymentLister { informer := f.Informer() - return &cache.StoreToDeploymentLister{Indexer: informer.GetIndexer()} + return &listers.StoreToDeploymentLister{Indexer: informer.GetIndexer()} } // ReplicaSetInformer is a type of SharedIndexInformer which watches and lists all replicasets. type ReplicaSetInformer interface { Informer() cache.SharedIndexInformer - Lister() *cache.StoreToReplicaSetLister + Lister() *listers.StoreToReplicaSetLister } type replicaSetInformer struct { @@ -132,11 +133,11 @@ func (f *replicaSetInformer) Informer() cache.SharedIndexInformer { } informer = cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - return f.client.Extensions().ReplicaSets(v1.NamespaceAll).List(options) + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + return f.client.Extensions().ReplicaSets(metav1.NamespaceAll).List(options) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - return f.client.Extensions().ReplicaSets(v1.NamespaceAll).Watch(options) + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + return f.client.Extensions().ReplicaSets(metav1.NamespaceAll).Watch(options) }, }, &extensions.ReplicaSet{}, @@ -148,7 +149,7 @@ func (f *replicaSetInformer) Informer() cache.SharedIndexInformer { return informer } -func (f *replicaSetInformer) Lister() *cache.StoreToReplicaSetLister { +func (f *replicaSetInformer) Lister() *listers.StoreToReplicaSetLister { informer := f.Informer() - return &cache.StoreToReplicaSetLister{Indexer: informer.GetIndexer()} + return &listers.StoreToReplicaSetLister{Indexer: informer.GetIndexer()} } diff --git a/vendor/k8s.io/kubernetes/pkg/controller/informers/rbac.go b/vendor/k8s.io/kubernetes/pkg/controller/informers/rbac.go index 99c73d37..7031e621 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/informers/rbac.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/informers/rbac.go @@ -19,17 +19,18 @@ package informers import ( "reflect" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/apis/rbac" "k8s.io/kubernetes/pkg/client/cache" + "k8s.io/kubernetes/pkg/client/legacylisters" ) type ClusterRoleInformer interface { Informer() cache.SharedIndexInformer - Lister() cache.ClusterRoleLister + Lister() listers.ClusterRoleLister } type clusterRoleInformer struct { @@ -47,10 +48,10 @@ func (f *clusterRoleInformer) Informer() cache.SharedIndexInformer { } informer = cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { return f.internalclient.Rbac().ClusterRoles().List(convertListOptionsOrDie(options)) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { return f.internalclient.Rbac().ClusterRoles().Watch(convertListOptionsOrDie(options)) }, }, @@ -63,13 +64,13 @@ func (f *clusterRoleInformer) Informer() cache.SharedIndexInformer { return informer } -func (f *clusterRoleInformer) Lister() cache.ClusterRoleLister { - return cache.NewClusterRoleLister(f.Informer().GetIndexer()) +func (f *clusterRoleInformer) Lister() listers.ClusterRoleLister { + return listers.NewClusterRoleLister(f.Informer().GetIndexer()) } type ClusterRoleBindingInformer interface { Informer() cache.SharedIndexInformer - Lister() cache.ClusterRoleBindingLister + Lister() listers.ClusterRoleBindingLister } type clusterRoleBindingInformer struct { @@ -87,10 +88,10 @@ func (f *clusterRoleBindingInformer) Informer() cache.SharedIndexInformer { } informer = cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { return f.internalclient.Rbac().ClusterRoleBindings().List(convertListOptionsOrDie(options)) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { return f.internalclient.Rbac().ClusterRoleBindings().Watch(convertListOptionsOrDie(options)) }, }, @@ -103,13 +104,13 @@ func (f *clusterRoleBindingInformer) Informer() cache.SharedIndexInformer { return informer } -func (f *clusterRoleBindingInformer) Lister() cache.ClusterRoleBindingLister { - return cache.NewClusterRoleBindingLister(f.Informer().GetIndexer()) +func (f *clusterRoleBindingInformer) Lister() listers.ClusterRoleBindingLister { + return listers.NewClusterRoleBindingLister(f.Informer().GetIndexer()) } type RoleInformer interface { Informer() cache.SharedIndexInformer - Lister() cache.RoleLister + Lister() listers.RoleLister } type roleInformer struct { @@ -127,11 +128,11 @@ func (f *roleInformer) Informer() cache.SharedIndexInformer { } informer = cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - return f.internalclient.Rbac().Roles(v1.NamespaceAll).List(convertListOptionsOrDie(options)) + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + return f.internalclient.Rbac().Roles(metav1.NamespaceAll).List(convertListOptionsOrDie(options)) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - return f.internalclient.Rbac().Roles(v1.NamespaceAll).Watch(convertListOptionsOrDie(options)) + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + return f.internalclient.Rbac().Roles(metav1.NamespaceAll).Watch(convertListOptionsOrDie(options)) }, }, &rbac.Role{}, @@ -143,13 +144,13 @@ func (f *roleInformer) Informer() cache.SharedIndexInformer { return informer } -func (f *roleInformer) Lister() cache.RoleLister { - return cache.NewRoleLister(f.Informer().GetIndexer()) +func (f *roleInformer) Lister() listers.RoleLister { + return listers.NewRoleLister(f.Informer().GetIndexer()) } type RoleBindingInformer interface { Informer() cache.SharedIndexInformer - Lister() cache.RoleBindingLister + Lister() listers.RoleBindingLister } type roleBindingInformer struct { @@ -167,11 +168,11 @@ func (f *roleBindingInformer) Informer() cache.SharedIndexInformer { } informer = cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - return f.internalclient.Rbac().RoleBindings(v1.NamespaceAll).List(convertListOptionsOrDie(options)) + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + return f.internalclient.Rbac().RoleBindings(metav1.NamespaceAll).List(convertListOptionsOrDie(options)) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - return f.internalclient.Rbac().RoleBindings(v1.NamespaceAll).Watch(convertListOptionsOrDie(options)) + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + return f.internalclient.Rbac().RoleBindings(metav1.NamespaceAll).Watch(convertListOptionsOrDie(options)) }, }, &rbac.RoleBinding{}, @@ -183,12 +184,12 @@ func (f *roleBindingInformer) Informer() cache.SharedIndexInformer { return informer } -func (f *roleBindingInformer) Lister() cache.RoleBindingLister { - return cache.NewRoleBindingLister(f.Informer().GetIndexer()) +func (f *roleBindingInformer) Lister() listers.RoleBindingLister { + return listers.NewRoleBindingLister(f.Informer().GetIndexer()) } -func convertListOptionsOrDie(in v1.ListOptions) api.ListOptions { - out := api.ListOptions{} +func convertListOptionsOrDie(in metav1.ListOptions) metav1.ListOptions { + out := metav1.ListOptions{} if err := api.Scheme.Convert(&in, &out, nil); err != nil { panic(err) } diff --git a/vendor/k8s.io/kubernetes/pkg/controller/informers/storage.go b/vendor/k8s.io/kubernetes/pkg/controller/informers/storage.go index 33b21fe4..10cf185a 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/informers/storage.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/informers/storage.go @@ -19,18 +19,19 @@ package informers import ( "reflect" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" - "k8s.io/kubernetes/pkg/api/v1" storage "k8s.io/kubernetes/pkg/apis/storage/v1beta1" "k8s.io/kubernetes/pkg/client/cache" + "k8s.io/kubernetes/pkg/client/legacylisters" ) // StorageClassInformer is type of SharedIndexInformer which watches and lists all storage classes. // Interface provides constructor for informer and lister for storage classes type StorageClassInformer interface { Informer() cache.SharedIndexInformer - Lister() cache.StorageClassLister + Lister() listers.StorageClassLister } type storageClassInformer struct { @@ -48,10 +49,10 @@ func (f *storageClassInformer) Informer() cache.SharedIndexInformer { } informer = cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { return f.client.Storage().StorageClasses().List(options) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { return f.client.Storage().StorageClasses().Watch(options) }, }, @@ -64,7 +65,7 @@ func (f *storageClassInformer) Informer() cache.SharedIndexInformer { return informer } -func (f *storageClassInformer) Lister() cache.StorageClassLister { +func (f *storageClassInformer) Lister() listers.StorageClassLister { informer := f.Informer() - return cache.NewStorageClassLister(informer.GetIndexer()) + return listers.NewStorageClassLister(informer.GetIndexer()) } diff --git a/vendor/k8s.io/kubernetes/pkg/controller/job/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/job/BUILD index b613f51d..dd5153dd 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/job/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/job/BUILD @@ -22,6 +22,7 @@ go_library( "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", "//pkg/client/clientset_generated/clientset/typed/core/v1:go_default_library", + "//pkg/client/legacylisters:go_default_library", "//pkg/client/listers/batch/v1:go_default_library", "//pkg/client/record:go_default_library", "//pkg/controller:go_default_library", @@ -51,7 +52,6 @@ go_test( "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", "//pkg/client/clientset_generated/clientset/fake:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//pkg/controller:go_default_library", "//pkg/controller/informers:go_default_library", @@ -59,6 +59,7 @@ go_test( "//vendor:k8s.io/apimachinery/pkg/util/rand", "//vendor:k8s.io/apimachinery/pkg/util/wait", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/job/jobcontroller.go b/vendor/k8s.io/kubernetes/pkg/controller/job/jobcontroller.go index 03656778..c85429dc 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/job/jobcontroller.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/job/jobcontroller.go @@ -32,6 +32,7 @@ import ( "k8s.io/kubernetes/pkg/client/cache" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" v1core "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1" + "k8s.io/kubernetes/pkg/client/legacylisters" batchv1listers "k8s.io/kubernetes/pkg/client/listers/batch/v1" "k8s.io/kubernetes/pkg/client/record" "k8s.io/kubernetes/pkg/controller" @@ -63,7 +64,7 @@ type JobController struct { jobLister batchv1listers.JobLister // A store of pods, populated by the podController - podStore cache.StoreToPodLister + podStore listers.StoreToPodLister // Jobs that need to be updated queue workqueue.RateLimitingInterface diff --git a/vendor/k8s.io/kubernetes/pkg/controller/job/jobcontroller_test.go b/vendor/k8s.io/kubernetes/pkg/controller/job/jobcontroller_test.go index 5a75046b..c206bead 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/job/jobcontroller_test.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/job/jobcontroller_test.go @@ -25,13 +25,13 @@ import ( "k8s.io/apimachinery/pkg/util/rand" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apimachinery/pkg/watch" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" batch "k8s.io/kubernetes/pkg/apis/batch/v1" "k8s.io/kubernetes/pkg/client/cache" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/testing/core" "k8s.io/kubernetes/pkg/controller" "k8s.io/kubernetes/pkg/controller/informers" @@ -41,16 +41,16 @@ var alwaysReady = func() bool { return true } func newJob(parallelism, completions int32) *batch.Job { j := &batch.Job{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foobar", - Namespace: v1.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, Spec: batch.JobSpec{ Selector: &metav1.LabelSelector{ MatchLabels: map[string]string{"foo": "bar"}, }, Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "foo": "bar", }, @@ -99,7 +99,7 @@ func newPodList(count int32, status v1.PodPhase, job *batch.Job) []v1.Pod { pods := []v1.Pod{} for i := int32(0); i < count; i++ { newPod := v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: fmt.Sprintf("pod-%v", rand.String(10)), Labels: job.Spec.Selector.MatchLabels, Namespace: job.Namespace, @@ -523,17 +523,17 @@ func TestJobPodLookup(t *testing.T) { // pods without labels don't match any job { job: &batch.Job{ - ObjectMeta: v1.ObjectMeta{Name: "basic"}, + ObjectMeta: metav1.ObjectMeta{Name: "basic"}, }, pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{Name: "foo1", Namespace: v1.NamespaceAll}, + ObjectMeta: metav1.ObjectMeta{Name: "foo1", Namespace: metav1.NamespaceAll}, }, expectedName: "", }, // matching labels, different namespace { job: &batch.Job{ - ObjectMeta: v1.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: batch.JobSpec{ Selector: &metav1.LabelSelector{ MatchLabels: map[string]string{"foo": "bar"}, @@ -541,7 +541,7 @@ func TestJobPodLookup(t *testing.T) { }, }, pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo2", Namespace: "ns", Labels: map[string]string{"foo": "bar"}, @@ -552,7 +552,7 @@ func TestJobPodLookup(t *testing.T) { // matching ns and labels returns { job: &batch.Job{ - ObjectMeta: v1.ObjectMeta{Name: "bar", Namespace: "ns"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar", Namespace: "ns"}, Spec: batch.JobSpec{ Selector: &metav1.LabelSelector{ MatchExpressions: []metav1.LabelSelectorRequirement{ @@ -566,7 +566,7 @@ func TestJobPodLookup(t *testing.T) { }, }, pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo3", Namespace: "ns", Labels: map[string]string{"foo": "bar"}, diff --git a/vendor/k8s.io/kubernetes/pkg/controller/lookup_cache.go b/vendor/k8s.io/kubernetes/pkg/controller/lookup_cache.go index 1691eadb..2f7ea899 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/lookup_cache.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/lookup_cache.go @@ -21,12 +21,12 @@ import ( "sync" "github.com/golang/groupcache/lru" - "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" hashutil "k8s.io/kubernetes/pkg/util/hash" ) type objectWithMeta interface { - meta.Object + metav1.Object } // keyFunc returns the key of an object, which is used to look up in the cache for it's matching object. diff --git a/vendor/k8s.io/kubernetes/pkg/controller/namespace/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/namespace/BUILD index b9e6e969..b0eea8c7 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/namespace/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/namespace/BUILD @@ -48,7 +48,6 @@ go_test( "//pkg/api/v1:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", "//pkg/client/clientset_generated/clientset/fake:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//pkg/client/typed/discovery:go_default_library", "//pkg/client/typed/dynamic:go_default_library", @@ -57,6 +56,7 @@ go_test( "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/util/sets", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/namespace/namespace_controller.go b/vendor/k8s.io/kubernetes/pkg/controller/namespace/namespace_controller.go index e5878122..e4687724 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/namespace/namespace_controller.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/namespace/namespace_controller.go @@ -129,10 +129,10 @@ func NewNamespaceController( // configure the backing store/controller store, controller := cache.NewInformer( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { return kubeClient.Core().Namespaces().List(options) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { return kubeClient.Core().Namespaces().Watch(options) }, }, diff --git a/vendor/k8s.io/kubernetes/pkg/controller/namespace/namespace_controller_test.go b/vendor/k8s.io/kubernetes/pkg/controller/namespace/namespace_controller_test.go index 78dcc10c..760e1d9e 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/namespace/namespace_controller_test.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/namespace/namespace_controller_test.go @@ -30,11 +30,11 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/sets" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/testing/core" "k8s.io/kubernetes/pkg/client/typed/discovery" "k8s.io/kubernetes/pkg/client/typed/dynamic" @@ -58,7 +58,7 @@ func TestFinalized(t *testing.T) { func TestFinalizeNamespaceFunc(t *testing.T) { mockClient := &fake.Clientset{} testNamespace := &v1.Namespace{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test", ResourceVersion: "1", }, @@ -87,7 +87,7 @@ func testSyncNamespaceThatIsTerminating(t *testing.T, versions *metav1.APIVersio now := metav1.Now() namespaceName := "test" testNamespacePendingFinalize := &v1.Namespace{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: namespaceName, ResourceVersion: "1", DeletionTimestamp: &now, @@ -100,7 +100,7 @@ func testSyncNamespaceThatIsTerminating(t *testing.T, versions *metav1.APIVersio }, } testNamespaceFinalizeComplete := &v1.Namespace{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: namespaceName, ResourceVersion: "1", DeletionTimestamp: &now, @@ -233,7 +233,7 @@ func TestSyncNamespaceThatIsTerminatingV1Beta1(t *testing.T) { func TestSyncNamespaceThatIsActive(t *testing.T) { mockClient := &fake.Clientset{} testNamespace := &v1.Namespace{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test", ResourceVersion: "1", }, diff --git a/vendor/k8s.io/kubernetes/pkg/controller/namespace/namespace_controller_utils.go b/vendor/k8s.io/kubernetes/pkg/controller/namespace/namespace_controller_utils.go index 6bccde40..ebd72f71 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/namespace/namespace_controller_utils.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/namespace/namespace_controller_utils.go @@ -178,7 +178,7 @@ func deleteCollection( // resource deletions generically. it will ensure all resources in the namespace are purged prior to releasing // namespace itself. orphanDependents := false - err := dynamicClient.Resource(&apiResource, namespace).DeleteCollection(&v1.DeleteOptions{OrphanDependents: &orphanDependents}, &v1.ListOptions{}) + err := dynamicClient.Resource(&apiResource, namespace).DeleteCollection(&metav1.DeleteOptions{OrphanDependents: &orphanDependents}, &metav1.ListOptions{}) if err == nil { return true, nil @@ -220,7 +220,7 @@ func listCollection( } apiResource := metav1.APIResource{Name: gvr.Resource, Namespaced: true} - obj, err := dynamicClient.Resource(&apiResource, namespace).List(&v1.ListOptions{}) + obj, err := dynamicClient.Resource(&apiResource, namespace).List(&metav1.ListOptions{}) if err == nil { unstructuredList, ok := obj.(*unstructured.UnstructuredList) if !ok { @@ -406,10 +406,10 @@ func syncNamespace( // if the namespace is already finalized, delete it if finalized(namespace) { - var opts *v1.DeleteOptions + var opts *metav1.DeleteOptions uid := namespace.UID if len(uid) > 0 { - opts = &v1.DeleteOptions{Preconditions: &v1.Preconditions{UID: &uid}} + opts = &metav1.DeleteOptions{Preconditions: &metav1.Preconditions{UID: &uid}} } err = kubeClient.Core().Namespaces().Delete(namespace.Name, opts) if err != nil && !errors.IsNotFound(err) { @@ -486,7 +486,7 @@ func estimateGracefulTermination(kubeClient clientset.Interface, groupVersionRes func estimateGracefulTerminationForPods(kubeClient clientset.Interface, ns string) (int64, error) { glog.V(5).Infof("namespace controller - estimateGracefulTerminationForPods - namespace %s", ns) estimate := int64(0) - items, err := kubeClient.Core().Pods(ns).List(v1.ListOptions{}) + items, err := kubeClient.Core().Pods(ns).List(metav1.ListOptions{}) if err != nil { return estimate, err } diff --git a/vendor/k8s.io/kubernetes/pkg/controller/node/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/node/BUILD index c68fe262..185ed22c 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/node/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/node/BUILD @@ -26,12 +26,11 @@ go_library( "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", "//pkg/client/clientset_generated/clientset/typed/core/v1:go_default_library", + "//pkg/client/legacylisters:go_default_library", "//pkg/client/record:go_default_library", "//pkg/cloudprovider:go_default_library", "//pkg/controller/informers:go_default_library", - "//pkg/fields:go_default_library", "//pkg/kubelet/util/format:go_default_library", - "//pkg/util/flowcontrol:go_default_library", "//pkg/util/metrics:go_default_library", "//pkg/util/node:go_default_library", "//pkg/util/system:go_default_library", @@ -40,12 +39,14 @@ go_library( "//vendor:github.com/prometheus/client_golang/prometheus", "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/errors", "//vendor:k8s.io/apimachinery/pkg/util/runtime", "//vendor:k8s.io/apimachinery/pkg/util/sets", "//vendor:k8s.io/apimachinery/pkg/util/wait", + "//vendor:k8s.io/client-go/util/flowcontrol", ], ) @@ -73,7 +74,6 @@ go_test( "//pkg/controller:go_default_library", "//pkg/controller/informers:go_default_library", "//pkg/controller/node/testutil:go_default_library", - "//pkg/util/flowcontrol:go_default_library", "//pkg/util/node:go_default_library", "//vendor:github.com/golang/glog", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", @@ -81,6 +81,7 @@ go_test( "//vendor:k8s.io/apimachinery/pkg/util/diff", "//vendor:k8s.io/apimachinery/pkg/util/sets", "//vendor:k8s.io/apimachinery/pkg/util/wait", + "//vendor:k8s.io/client-go/util/flowcontrol", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/node/cidr_allocator_test.go b/vendor/k8s.io/kubernetes/pkg/controller/node/cidr_allocator_test.go index 61861c57..77fcf584 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/node/cidr_allocator_test.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/node/cidr_allocator_test.go @@ -21,6 +21,7 @@ import ( "testing" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" @@ -55,7 +56,7 @@ func TestAllocateOrOccupyCIDRSuccess(t *testing.T) { fakeNodeHandler: &testutil.FakeNodeHandler{ Existing: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", }, }, @@ -75,7 +76,7 @@ func TestAllocateOrOccupyCIDRSuccess(t *testing.T) { fakeNodeHandler: &testutil.FakeNodeHandler{ Existing: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", }, }, @@ -99,7 +100,7 @@ func TestAllocateOrOccupyCIDRSuccess(t *testing.T) { fakeNodeHandler: &testutil.FakeNodeHandler{ Existing: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", }, }, @@ -185,7 +186,7 @@ func TestAllocateOrOccupyCIDRFailure(t *testing.T) { fakeNodeHandler: &testutil.FakeNodeHandler{ Existing: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", }, }, @@ -268,7 +269,7 @@ func TestReleaseCIDRSuccess(t *testing.T) { fakeNodeHandler: &testutil.FakeNodeHandler{ Existing: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", }, }, @@ -291,7 +292,7 @@ func TestReleaseCIDRSuccess(t *testing.T) { fakeNodeHandler: &testutil.FakeNodeHandler{ Existing: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", }, }, @@ -359,7 +360,7 @@ func TestReleaseCIDRSuccess(t *testing.T) { for _, cidrToRelease := range tc.cidrsToRelease { nodeToRelease := v1.Node{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", }, } diff --git a/vendor/k8s.io/kubernetes/pkg/controller/node/controller_utils.go b/vendor/k8s.io/kubernetes/pkg/controller/node/controller_utils.go index 8033f3f5..9632f092 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/node/controller_utils.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/node/controller_utils.go @@ -21,6 +21,8 @@ import ( "strings" "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/types" utilerrors "k8s.io/apimachinery/pkg/util/errors" utilruntime "k8s.io/apimachinery/pkg/util/runtime" @@ -28,9 +30,9 @@ import ( "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/cache" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" + "k8s.io/kubernetes/pkg/client/legacylisters" "k8s.io/kubernetes/pkg/client/record" "k8s.io/kubernetes/pkg/cloudprovider" - "k8s.io/kubernetes/pkg/fields" "k8s.io/kubernetes/pkg/kubelet/util/format" "k8s.io/kubernetes/pkg/util/node" utilversion "k8s.io/kubernetes/pkg/util/version" @@ -45,11 +47,11 @@ const ( // deletePods will delete all pods from master running on given node, and return true // if any pods were deleted, or were found pending deletion. -func deletePods(kubeClient clientset.Interface, recorder record.EventRecorder, nodeName, nodeUID string, daemonStore cache.StoreToDaemonSetLister) (bool, error) { +func deletePods(kubeClient clientset.Interface, recorder record.EventRecorder, nodeName, nodeUID string, daemonStore listers.StoreToDaemonSetLister) (bool, error) { remaining := false selector := fields.OneTermEqualSelector(api.PodHostField, nodeName).String() - options := v1.ListOptions{FieldSelector: selector} - pods, err := kubeClient.Core().Pods(v1.NamespaceAll).List(options) + options := metav1.ListOptions{FieldSelector: selector} + pods, err := kubeClient.Core().Pods(metav1.NamespaceAll).List(options) var updateErrList []error if err != nil { @@ -120,7 +122,7 @@ func setPodTerminationReason(kubeClient clientset.Interface, pod *v1.Pod, nodeNa func forcefullyDeletePod(c clientset.Interface, pod *v1.Pod) error { var zero int64 glog.Infof("NodeController is force deleting Pod: %v:%v", pod.Namespace, pod.Name) - err := c.Core().Pods(pod.Namespace).Delete(pod.Name, &v1.DeleteOptions{GracePeriodSeconds: &zero}) + err := c.Core().Pods(pod.Namespace).Delete(pod.Name, &metav1.DeleteOptions{GracePeriodSeconds: &zero}) if err == nil { glog.V(4).Infof("forceful deletion of %s succeeded", pod.Name) } @@ -202,8 +204,8 @@ func markAllPodsNotReady(kubeClient clientset.Interface, node *v1.Node) error { } nodeName := node.Name glog.V(2).Infof("Update ready status of pods on node [%v]", nodeName) - opts := v1.ListOptions{FieldSelector: fields.OneTermEqualSelector(api.PodHostField, nodeName).String()} - pods, err := kubeClient.Core().Pods(v1.NamespaceAll).List(opts) + opts := metav1.ListOptions{FieldSelector: fields.OneTermEqualSelector(api.PodHostField, nodeName).String()} + pods, err := kubeClient.Core().Pods(metav1.NamespaceAll).List(opts) if err != nil { return err } diff --git a/vendor/k8s.io/kubernetes/pkg/controller/node/nodecontroller.go b/vendor/k8s.io/kubernetes/pkg/controller/node/nodecontroller.go index 2a2454f7..f62773d1 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/node/nodecontroller.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/node/nodecontroller.go @@ -25,20 +25,21 @@ import ( "github.com/golang/glog" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/types" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/client-go/util/flowcontrol" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/cache" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" v1core "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1" + "k8s.io/kubernetes/pkg/client/legacylisters" "k8s.io/kubernetes/pkg/client/record" "k8s.io/kubernetes/pkg/cloudprovider" "k8s.io/kubernetes/pkg/controller/informers" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/util/flowcontrol" "k8s.io/kubernetes/pkg/util/metrics" utilnode "k8s.io/kubernetes/pkg/util/node" "k8s.io/kubernetes/pkg/util/system" @@ -135,9 +136,9 @@ type NodeController struct { nodeInformer informers.NodeInformer daemonSetInformer informers.DaemonSetInformer - podStore cache.StoreToPodLister - nodeStore cache.StoreToNodeLister - daemonSetStore cache.StoreToDaemonSetLister + podStore listers.StoreToPodLister + nodeStore listers.StoreToNodeLister + daemonSetStore listers.StoreToDaemonSetLister // allocate/recycle CIDRs for node if allocateNodeCIDRs == true cidrAllocator CIDRAllocator @@ -252,7 +253,7 @@ func NewNodeController( // We must poll because apiserver might not be up. This error causes // controller manager to restart. if pollErr := wait.Poll(10*time.Second, apiserverStartupGracePeriod, func() (bool, error) { - nodeList, err = kubeClient.Core().Nodes().List(v1.ListOptions{ + nodeList, err = kubeClient.Core().Nodes().List(metav1.ListOptions{ FieldSelector: fields.Everything().String(), LabelSelector: labels.Everything().String(), }) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/node/nodecontroller_test.go b/vendor/k8s.io/kubernetes/pkg/controller/node/nodecontroller_test.go index 85d81bb0..09e64dba 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/node/nodecontroller_test.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/node/nodecontroller_test.go @@ -80,7 +80,7 @@ func NewNodeControllerFromClient( } func syncNodeStore(nc *NodeController, fakeNodeHandler *testutil.FakeNodeHandler) error { - nodes, err := fakeNodeHandler.List(v1.ListOptions{}) + nodes, err := fakeNodeHandler.List(metav1.ListOptions{}) if err != nil { return err } @@ -124,7 +124,7 @@ func TestMonitorNodeStatusEvictPods(t *testing.T) { fakeNodeHandler: &testutil.FakeNodeHandler{ Existing: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", CreationTimestamp: fakeNow, Labels: map[string]string{ @@ -134,7 +134,7 @@ func TestMonitorNodeStatusEvictPods(t *testing.T) { }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node1", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), Labels: map[string]string{ @@ -168,7 +168,7 @@ func TestMonitorNodeStatusEvictPods(t *testing.T) { fakeNodeHandler: &testutil.FakeNodeHandler{ Existing: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), Labels: map[string]string{ @@ -188,7 +188,7 @@ func TestMonitorNodeStatusEvictPods(t *testing.T) { }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node1", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), Labels: map[string]string{ @@ -232,7 +232,7 @@ func TestMonitorNodeStatusEvictPods(t *testing.T) { fakeNodeHandler: &testutil.FakeNodeHandler{ Existing: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), Labels: map[string]string{ @@ -252,7 +252,7 @@ func TestMonitorNodeStatusEvictPods(t *testing.T) { }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node1", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), Labels: map[string]string{ @@ -276,7 +276,7 @@ func TestMonitorNodeStatusEvictPods(t *testing.T) { &v1.PodList{ Items: []v1.Pod{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod0", Namespace: "default", Labels: map[string]string{"daemon": "yes"}, @@ -291,7 +291,7 @@ func TestMonitorNodeStatusEvictPods(t *testing.T) { }, daemonSets: []extensions.DaemonSet{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "ds0", Namespace: "default", }, @@ -323,7 +323,7 @@ func TestMonitorNodeStatusEvictPods(t *testing.T) { fakeNodeHandler: &testutil.FakeNodeHandler{ Existing: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), Labels: map[string]string{ @@ -343,7 +343,7 @@ func TestMonitorNodeStatusEvictPods(t *testing.T) { }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node1", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), Labels: map[string]string{ @@ -387,7 +387,7 @@ func TestMonitorNodeStatusEvictPods(t *testing.T) { fakeNodeHandler: &testutil.FakeNodeHandler{ Existing: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), Labels: map[string]string{ @@ -407,7 +407,7 @@ func TestMonitorNodeStatusEvictPods(t *testing.T) { }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node1", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), Labels: map[string]string{ @@ -451,7 +451,7 @@ func TestMonitorNodeStatusEvictPods(t *testing.T) { fakeNodeHandler: &testutil.FakeNodeHandler{ Existing: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), Labels: map[string]string{ @@ -471,7 +471,7 @@ func TestMonitorNodeStatusEvictPods(t *testing.T) { }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node1", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), Labels: map[string]string{ @@ -594,7 +594,7 @@ func TestPodStatusChange(t *testing.T) { fakeNodeHandler: &testutil.FakeNodeHandler{ Existing: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), Labels: map[string]string{ @@ -614,7 +614,7 @@ func TestPodStatusChange(t *testing.T) { }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node1", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), Labels: map[string]string{ @@ -749,7 +749,7 @@ func TestMonitorNodeStatusEvictPodsWithDisruption(t *testing.T) { { nodeList: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), Labels: map[string]string{ @@ -769,7 +769,7 @@ func TestMonitorNodeStatusEvictPodsWithDisruption(t *testing.T) { }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node1", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), Labels: map[string]string{ @@ -804,7 +804,7 @@ func TestMonitorNodeStatusEvictPodsWithDisruption(t *testing.T) { { nodeList: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), Labels: map[string]string{ @@ -824,7 +824,7 @@ func TestMonitorNodeStatusEvictPodsWithDisruption(t *testing.T) { }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node1", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), Labels: map[string]string{ @@ -866,7 +866,7 @@ func TestMonitorNodeStatusEvictPodsWithDisruption(t *testing.T) { { nodeList: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), Labels: map[string]string{ @@ -886,7 +886,7 @@ func TestMonitorNodeStatusEvictPodsWithDisruption(t *testing.T) { }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node1", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), Labels: map[string]string{ @@ -927,7 +927,7 @@ func TestMonitorNodeStatusEvictPodsWithDisruption(t *testing.T) { { nodeList: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), Labels: map[string]string{ @@ -947,7 +947,7 @@ func TestMonitorNodeStatusEvictPodsWithDisruption(t *testing.T) { }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node-master", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), Labels: map[string]string{ @@ -986,7 +986,7 @@ func TestMonitorNodeStatusEvictPodsWithDisruption(t *testing.T) { { nodeList: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), Labels: map[string]string{ @@ -1006,7 +1006,7 @@ func TestMonitorNodeStatusEvictPodsWithDisruption(t *testing.T) { }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node1", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), Labels: map[string]string{ @@ -1048,7 +1048,7 @@ func TestMonitorNodeStatusEvictPodsWithDisruption(t *testing.T) { { nodeList: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), Labels: map[string]string{ @@ -1068,7 +1068,7 @@ func TestMonitorNodeStatusEvictPodsWithDisruption(t *testing.T) { }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node1", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), Labels: map[string]string{ @@ -1088,7 +1088,7 @@ func TestMonitorNodeStatusEvictPodsWithDisruption(t *testing.T) { }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node2", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), Labels: map[string]string{ @@ -1108,7 +1108,7 @@ func TestMonitorNodeStatusEvictPodsWithDisruption(t *testing.T) { }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node3", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), Labels: map[string]string{ @@ -1128,7 +1128,7 @@ func TestMonitorNodeStatusEvictPodsWithDisruption(t *testing.T) { }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node4", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), Labels: map[string]string{ @@ -1245,7 +1245,7 @@ func TestCloudProviderNoRateLimit(t *testing.T) { fnh := &testutil.FakeNodeHandler{ Existing: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), }, @@ -1309,7 +1309,7 @@ func TestMonitorNodeStatusUpdateStatus(t *testing.T) { fakeNodeHandler: &testutil.FakeNodeHandler{ Existing: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), }, @@ -1320,7 +1320,7 @@ func TestMonitorNodeStatusUpdateStatus(t *testing.T) { expectedRequestCount: 2, // List+Update expectedNodes: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), }, @@ -1353,7 +1353,7 @@ func TestMonitorNodeStatusUpdateStatus(t *testing.T) { fakeNodeHandler: &testutil.FakeNodeHandler{ Existing: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", CreationTimestamp: fakeNow, }, @@ -1370,7 +1370,7 @@ func TestMonitorNodeStatusUpdateStatus(t *testing.T) { fakeNodeHandler: &testutil.FakeNodeHandler{ Existing: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), }, @@ -1429,7 +1429,7 @@ func TestMonitorNodeStatusUpdateStatus(t *testing.T) { }, expectedNodes: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), }, @@ -1469,7 +1469,7 @@ func TestMonitorNodeStatusUpdateStatus(t *testing.T) { fakeNodeHandler: &testutil.FakeNodeHandler{ Existing: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), }, @@ -1547,7 +1547,7 @@ func TestMonitorNodeStatusMarkPodsNotReady(t *testing.T) { fakeNodeHandler: &testutil.FakeNodeHandler{ Existing: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", CreationTimestamp: fakeNow, }, @@ -1563,7 +1563,7 @@ func TestMonitorNodeStatusMarkPodsNotReady(t *testing.T) { fakeNodeHandler: &testutil.FakeNodeHandler{ Existing: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), }, @@ -1597,7 +1597,7 @@ func TestMonitorNodeStatusMarkPodsNotReady(t *testing.T) { fakeNodeHandler: &testutil.FakeNodeHandler{ Existing: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), }, @@ -1667,7 +1667,7 @@ func TestMonitorNodeStatusMarkPodsNotReady(t *testing.T) { fakeNodeHandler: &testutil.FakeNodeHandler{ Existing: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", CreationTimestamp: metav1.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC), }, @@ -1772,7 +1772,7 @@ func TestNodeEventGeneration(t *testing.T) { fakeNodeHandler := &testutil.FakeNodeHandler{ Existing: []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node0", UID: "1234567890", CreationTimestamp: metav1.Date(2015, 8, 10, 0, 0, 0, 0, time.UTC), @@ -1839,70 +1839,70 @@ func TestCheckPod(t *testing.T) { { pod: v1.Pod{ - ObjectMeta: v1.ObjectMeta{DeletionTimestamp: nil}, + ObjectMeta: metav1.ObjectMeta{DeletionTimestamp: nil}, Spec: v1.PodSpec{NodeName: "new"}, }, prune: false, }, { pod: v1.Pod{ - ObjectMeta: v1.ObjectMeta{DeletionTimestamp: nil}, + ObjectMeta: metav1.ObjectMeta{DeletionTimestamp: nil}, Spec: v1.PodSpec{NodeName: "old"}, }, prune: false, }, { pod: v1.Pod{ - ObjectMeta: v1.ObjectMeta{DeletionTimestamp: nil}, + ObjectMeta: metav1.ObjectMeta{DeletionTimestamp: nil}, Spec: v1.PodSpec{NodeName: ""}, }, prune: false, }, { pod: v1.Pod{ - ObjectMeta: v1.ObjectMeta{DeletionTimestamp: nil}, + ObjectMeta: metav1.ObjectMeta{DeletionTimestamp: nil}, Spec: v1.PodSpec{NodeName: "nonexistant"}, }, prune: false, }, { pod: v1.Pod{ - ObjectMeta: v1.ObjectMeta{DeletionTimestamp: &metav1.Time{}}, + ObjectMeta: metav1.ObjectMeta{DeletionTimestamp: &metav1.Time{}}, Spec: v1.PodSpec{NodeName: "new"}, }, prune: false, }, { pod: v1.Pod{ - ObjectMeta: v1.ObjectMeta{DeletionTimestamp: &metav1.Time{}}, + ObjectMeta: metav1.ObjectMeta{DeletionTimestamp: &metav1.Time{}}, Spec: v1.PodSpec{NodeName: "old"}, }, prune: true, }, { pod: v1.Pod{ - ObjectMeta: v1.ObjectMeta{DeletionTimestamp: &metav1.Time{}}, + ObjectMeta: metav1.ObjectMeta{DeletionTimestamp: &metav1.Time{}}, Spec: v1.PodSpec{NodeName: "older"}, }, prune: true, }, { pod: v1.Pod{ - ObjectMeta: v1.ObjectMeta{DeletionTimestamp: &metav1.Time{}}, + ObjectMeta: metav1.ObjectMeta{DeletionTimestamp: &metav1.Time{}}, Spec: v1.PodSpec{NodeName: "oldest"}, }, prune: true, }, { pod: v1.Pod{ - ObjectMeta: v1.ObjectMeta{DeletionTimestamp: &metav1.Time{}}, + ObjectMeta: metav1.ObjectMeta{DeletionTimestamp: &metav1.Time{}}, Spec: v1.PodSpec{NodeName: ""}, }, prune: false, }, { pod: v1.Pod{ - ObjectMeta: v1.ObjectMeta{DeletionTimestamp: &metav1.Time{}}, + ObjectMeta: metav1.ObjectMeta{DeletionTimestamp: &metav1.Time{}}, Spec: v1.PodSpec{NodeName: "nonexistant"}, }, prune: false, @@ -1912,7 +1912,7 @@ func TestCheckPod(t *testing.T) { nc, _ := NewNodeControllerFromClient(nil, fake.NewSimpleClientset(), 0, 0, 0, 0, 0, 0, 0, 0, nil, nil, 0, false) nc.nodeStore.Store = cache.NewStore(cache.MetaNamespaceKeyFunc) nc.nodeStore.Store.Add(&v1.Node{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "new", }, Status: v1.NodeStatus{ @@ -1922,7 +1922,7 @@ func TestCheckPod(t *testing.T) { }, }) nc.nodeStore.Store.Add(&v1.Node{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "old", }, Status: v1.NodeStatus{ @@ -1932,7 +1932,7 @@ func TestCheckPod(t *testing.T) { }, }) nc.nodeStore.Store.Add(&v1.Node{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "older", }, Status: v1.NodeStatus{ @@ -1942,7 +1942,7 @@ func TestCheckPod(t *testing.T) { }, }) nc.nodeStore.Store.Add(&v1.Node{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "oldest", }, Status: v1.NodeStatus{ diff --git a/vendor/k8s.io/kubernetes/pkg/controller/node/rate_limited_queue.go b/vendor/k8s.io/kubernetes/pkg/controller/node/rate_limited_queue.go index a335f6f3..05a1273f 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/node/rate_limited_queue.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/node/rate_limited_queue.go @@ -22,7 +22,7 @@ import ( "time" "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/kubernetes/pkg/util/flowcontrol" + "k8s.io/client-go/util/flowcontrol" "github.com/golang/glog" ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/node/rate_limited_queue_test.go b/vendor/k8s.io/kubernetes/pkg/controller/node/rate_limited_queue_test.go index 5218f31c..21b79293 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/node/rate_limited_queue_test.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/node/rate_limited_queue_test.go @@ -22,7 +22,7 @@ import ( "time" "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/kubernetes/pkg/util/flowcontrol" + "k8s.io/client-go/util/flowcontrol" ) func CheckQueueEq(lhs []string, rhs TimedQueue) bool { diff --git a/vendor/k8s.io/kubernetes/pkg/controller/node/testutil/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/node/testutil/BUILD index 22d743ce..d0c6c712 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/node/testutil/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/node/testutil/BUILD @@ -17,13 +17,14 @@ go_library( "//pkg/api/v1:go_default_library", "//pkg/client/clientset_generated/clientset/fake:go_default_library", "//pkg/client/clientset_generated/clientset/typed/core/v1:go_default_library", - "//pkg/util/clock:go_default_library", "//pkg/util/node:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/sets", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/util/clock", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/node/testutil/test_utils.go b/vendor/k8s.io/kubernetes/pkg/controller/node/testutil/test_utils.go index 4c58bc4b..c6c2490a 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/node/testutil/test_utils.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/node/testutil/test_utils.go @@ -25,14 +25,15 @@ import ( apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/util/clock" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" v1core "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1" - "k8s.io/kubernetes/pkg/util/clock" utilnode "k8s.io/kubernetes/pkg/util/node" ) @@ -129,7 +130,7 @@ func (m *FakeNodeHandler) Get(name string, opts metav1.GetOptions) (*v1.Node, er } // List returns a list of Nodes from the fake store. -func (m *FakeNodeHandler) List(opts v1.ListOptions) (*v1.NodeList, error) { +func (m *FakeNodeHandler) List(opts metav1.ListOptions) (*v1.NodeList, error) { m.lock.Lock() defer func() { m.RequestCount++ @@ -159,7 +160,7 @@ func (m *FakeNodeHandler) List(opts v1.ListOptions) (*v1.NodeList, error) { } // Delete delets a Node from the fake store. -func (m *FakeNodeHandler) Delete(id string, opt *v1.DeleteOptions) error { +func (m *FakeNodeHandler) Delete(id string, opt *metav1.DeleteOptions) error { m.lock.Lock() defer func() { m.RequestCount++ @@ -173,7 +174,7 @@ func (m *FakeNodeHandler) Delete(id string, opt *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of Nodes from the fake store. -func (m *FakeNodeHandler) DeleteCollection(opt *v1.DeleteOptions, listOpts v1.ListOptions) error { +func (m *FakeNodeHandler) DeleteCollection(opt *metav1.DeleteOptions, listOpts metav1.ListOptions) error { return nil } @@ -214,12 +215,12 @@ func (m *FakeNodeHandler) PatchStatus(nodeName string, data []byte) (*v1.Node, e } // Watch watches Nodes in a fake store. -func (m *FakeNodeHandler) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (m *FakeNodeHandler) Watch(opts metav1.ListOptions) (watch.Interface, error) { return watch.NewFake(), nil } // Patch patches a Node in the fake store. -func (m *FakeNodeHandler) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (*v1.Node, error) { +func (m *FakeNodeHandler) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (*v1.Node, error) { return nil, nil } @@ -262,10 +263,10 @@ func (f *FakeRecorder) makeEvent(ref *v1.ObjectReference, eventtype, reason, mes t := metav1.Time{Time: f.clock.Now()} namespace := ref.Namespace if namespace == "" { - namespace = v1.NamespaceDefault + namespace = metav1.NamespaceDefault } return &v1.Event{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: fmt.Sprintf("%v.%x", ref.Name, t.UnixNano()), Namespace: namespace, }, @@ -291,7 +292,7 @@ func NewFakeRecorder() *FakeRecorder { // NewNode is a helper function for creating Nodes for testing. func NewNode(name string) *v1.Node { return &v1.Node{ - ObjectMeta: v1.ObjectMeta{Name: name}, + ObjectMeta: metav1.ObjectMeta{Name: name}, Spec: v1.NodeSpec{ ExternalID: name, }, @@ -307,7 +308,7 @@ func NewNode(name string) *v1.Node { // NewPod is a helper function for creating Pods for testing. func NewPod(name, host string) *v1.Pod { pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "default", Name: name, }, @@ -338,7 +339,7 @@ func contains(node *v1.Node, nodes []*v1.Node) bool { // GetZones returns list of zones for all Nodes stored in FakeNodeHandler func GetZones(nodeHandler *FakeNodeHandler) []string { - nodes, _ := nodeHandler.List(v1.ListOptions{}) + nodes, _ := nodeHandler.List(metav1.ListOptions{}) zones := sets.NewString() for _, node := range nodes.Items { zones.Insert(utilnode.GetZoneKey(&node)) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/podautoscaler/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/podautoscaler/BUILD index b6034cb1..ebbd546e 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/podautoscaler/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/podautoscaler/BUILD @@ -54,7 +54,6 @@ go_test( "//pkg/client/clientset_generated/clientset/fake:go_default_library", "//pkg/client/clientset_generated/clientset/typed/core/v1:go_default_library", "//pkg/client/record:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//pkg/controller/podautoscaler/metrics:go_default_library", "//vendor:github.com/stretchr/testify/assert", @@ -62,6 +61,7 @@ go_test( "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", "//vendor:k8s.io/heapster/metrics/api/v1/types", "//vendor:k8s.io/heapster/metrics/apis/metrics/v1alpha1", ], diff --git a/vendor/k8s.io/kubernetes/pkg/controller/podautoscaler/horizontal.go b/vendor/k8s.io/kubernetes/pkg/controller/podautoscaler/horizontal.go index 3a1a93fc..4fda6ed0 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/podautoscaler/horizontal.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/podautoscaler/horizontal.go @@ -75,11 +75,11 @@ var upscaleForbiddenWindow = 3 * time.Minute func newInformer(controller *HorizontalController, resyncPeriod time.Duration) (cache.Store, cache.Controller) { return cache.NewInformer( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - return controller.hpaNamespacer.HorizontalPodAutoscalers(v1.NamespaceAll).List(options) + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + return controller.hpaNamespacer.HorizontalPodAutoscalers(metav1.NamespaceAll).List(options) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - return controller.hpaNamespacer.HorizontalPodAutoscalers(v1.NamespaceAll).Watch(options) + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + return controller.hpaNamespacer.HorizontalPodAutoscalers(metav1.NamespaceAll).Watch(options) }, }, &autoscaling.HorizontalPodAutoscaler{}, diff --git a/vendor/k8s.io/kubernetes/pkg/controller/podautoscaler/horizontal_test.go b/vendor/k8s.io/kubernetes/pkg/controller/podautoscaler/horizontal_test.go index b8b6fdc7..60d53ddb 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/podautoscaler/horizontal_test.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/podautoscaler/horizontal_test.go @@ -30,6 +30,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/api/v1" @@ -38,7 +39,6 @@ import ( "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" v1core "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1" "k8s.io/kubernetes/pkg/client/record" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/testing/core" "k8s.io/kubernetes/pkg/controller/podautoscaler/metrics" @@ -153,7 +153,7 @@ func (tc *testCase) prepareTestClient(t *testing.T) *fake.Clientset { obj := &autoscaling.HorizontalPodAutoscalerList{ Items: []autoscaling.HorizontalPodAutoscaler{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: hpaName, Namespace: namespace, SelfLink: "experimental/v1/namespaces/" + namespace + "/horizontalpodautoscalers/" + hpaName, @@ -194,7 +194,7 @@ func (tc *testCase) prepareTestClient(t *testing.T) *fake.Clientset { defer tc.Unlock() obj := &extensions.Scale{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: tc.resource.name, Namespace: namespace, }, @@ -214,7 +214,7 @@ func (tc *testCase) prepareTestClient(t *testing.T) *fake.Clientset { defer tc.Unlock() obj := &extensions.Scale{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: tc.resource.name, Namespace: namespace, }, @@ -234,7 +234,7 @@ func (tc *testCase) prepareTestClient(t *testing.T) *fake.Clientset { defer tc.Unlock() obj := &extensions.Scale{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: tc.resource.name, Namespace: namespace, }, @@ -270,7 +270,7 @@ func (tc *testCase) prepareTestClient(t *testing.T) *fake.Clientset { }, }, }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, Namespace: namespace, Labels: map[string]string{ diff --git a/vendor/k8s.io/kubernetes/pkg/controller/podautoscaler/metrics/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/podautoscaler/metrics/BUILD index 44c93eee..7f741b3e 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/podautoscaler/metrics/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/podautoscaler/metrics/BUILD @@ -20,6 +20,7 @@ go_library( "//pkg/client/clientset_generated/clientset:go_default_library", "//pkg/client/clientset_generated/clientset/typed/core/v1:go_default_library", "//vendor:github.com/golang/glog", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/heapster/metrics/api/v1/types", "//vendor:k8s.io/heapster/metrics/apis/metrics/v1alpha1", @@ -36,11 +37,12 @@ go_test( "//pkg/api/unversioned:go_default_library", "//pkg/api/v1:go_default_library", "//pkg/client/clientset_generated/clientset/fake:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//vendor:github.com/stretchr/testify/assert", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", + "//vendor:k8s.io/client-go/rest", "//vendor:k8s.io/heapster/metrics/api/v1/types", "//vendor:k8s.io/heapster/metrics/apis/metrics/v1alpha1", ], diff --git a/vendor/k8s.io/kubernetes/pkg/controller/podautoscaler/metrics/metrics_client.go b/vendor/k8s.io/kubernetes/pkg/controller/podautoscaler/metrics/metrics_client.go index 7b55d1ca..8ba73323 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/podautoscaler/metrics/metrics_client.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/podautoscaler/metrics/metrics_client.go @@ -23,13 +23,14 @@ import ( "time" "github.com/golang/glog" + heapster "k8s.io/heapster/metrics/api/v1/types" + metricsapi "k8s.io/heapster/metrics/apis/metrics/v1alpha1" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" v1core "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1" - - heapster "k8s.io/heapster/metrics/api/v1/types" - metricsapi "k8s.io/heapster/metrics/apis/metrics/v1alpha1" ) // PodResourceInfo contains pod resourcemetric values as a map from pod names to @@ -128,7 +129,7 @@ func (h *HeapsterMetricsClient) GetResourceMetric(resource v1.ResourceName, name } func (h *HeapsterMetricsClient) GetRawMetric(metricName string, namespace string, selector labels.Selector) (PodMetricsInfo, time.Time, error) { - podList, err := h.podsGetter.Pods(namespace).List(v1.ListOptions{LabelSelector: selector.String()}) + podList, err := h.podsGetter.Pods(namespace).List(metav1.ListOptions{LabelSelector: selector.String()}) if err != nil { return nil, time.Time{}, fmt.Errorf("failed to get pod list while fetching metrics: %v", err) } diff --git a/vendor/k8s.io/kubernetes/pkg/controller/podautoscaler/metrics/metrics_client_test.go b/vendor/k8s.io/kubernetes/pkg/controller/podautoscaler/metrics/metrics_client_test.go index ab15981e..71d28f65 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/podautoscaler/metrics/metrics_client_test.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/podautoscaler/metrics/metrics_client_test.go @@ -23,13 +23,14 @@ import ( "testing" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/testing/core" heapster "k8s.io/heapster/metrics/api/v1/types" @@ -161,7 +162,7 @@ func (tc *testCase) prepareTestClient(t *testing.T) *fake.Clientset { func buildPod(namespace, podName string, podLabels map[string]string, phase v1.PodPhase, request string) v1.Pod { return v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, Namespace: namespace, Labels: podLabels, diff --git a/vendor/k8s.io/kubernetes/pkg/controller/podautoscaler/replica_calculator.go b/vendor/k8s.io/kubernetes/pkg/controller/podautoscaler/replica_calculator.go index f63f18ba..d9c9f5ac 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/podautoscaler/replica_calculator.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/podautoscaler/replica_calculator.go @@ -21,6 +21,7 @@ import ( "math" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/kubernetes/pkg/api/v1" @@ -48,7 +49,7 @@ func (c *ReplicaCalculator) GetResourceReplicas(currentReplicas int32, targetUti return 0, 0, time.Time{}, fmt.Errorf("unable to get metrics for resource %s: %v", resource, err) } - podList, err := c.podsGetter.Pods(namespace).List(v1.ListOptions{LabelSelector: selector.String()}) + podList, err := c.podsGetter.Pods(namespace).List(metav1.ListOptions{LabelSelector: selector.String()}) if err != nil { return 0, 0, time.Time{}, fmt.Errorf("unable to get pods while calculating replica count: %v", err) } @@ -156,7 +157,7 @@ func (c *ReplicaCalculator) GetMetricReplicas(currentReplicas int32, targetUtili return 0, 0, time.Time{}, fmt.Errorf("unable to get metric %s: %v", metricName, err) } - podList, err := c.podsGetter.Pods(namespace).List(v1.ListOptions{LabelSelector: selector.String()}) + podList, err := c.podsGetter.Pods(namespace).List(metav1.ListOptions{LabelSelector: selector.String()}) if err != nil { return 0, 0, time.Time{}, fmt.Errorf("unable to get pods while calculating replica count: %v", err) } diff --git a/vendor/k8s.io/kubernetes/pkg/controller/podautoscaler/replica_calculator_test.go b/vendor/k8s.io/kubernetes/pkg/controller/podautoscaler/replica_calculator_test.go index 48aa2441..e70decc1 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/podautoscaler/replica_calculator_test.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/podautoscaler/replica_calculator_test.go @@ -27,11 +27,11 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/testing/core" "k8s.io/kubernetes/pkg/controller/podautoscaler/metrics" @@ -100,7 +100,7 @@ func (tc *replicaCalcTestCase) prepareTestClient(t *testing.T) *fake.Clientset { }, }, }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, Namespace: testNamespace, Labels: map[string]string{ diff --git a/vendor/k8s.io/kubernetes/pkg/controller/podgc/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/podgc/BUILD index 2d3e39e6..d0da481a 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/podgc/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/podgc/BUILD @@ -19,10 +19,12 @@ go_library( "//pkg/api/v1:go_default_library", "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", + "//pkg/client/legacylisters:go_default_library", "//pkg/controller:go_default_library", "//pkg/controller/informers:go_default_library", "//pkg/util/metrics:go_default_library", "//vendor:github.com/golang/glog", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/util/runtime", "//vendor:k8s.io/apimachinery/pkg/util/sets", diff --git a/vendor/k8s.io/kubernetes/pkg/controller/podgc/gc_controller.go b/vendor/k8s.io/kubernetes/pkg/controller/podgc/gc_controller.go index b93b9c12..7702a508 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/podgc/gc_controller.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/podgc/gc_controller.go @@ -21,6 +21,7 @@ import ( "sync" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/sets" @@ -28,6 +29,7 @@ import ( "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/cache" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" + "k8s.io/kubernetes/pkg/client/legacylisters" "k8s.io/kubernetes/pkg/controller" "k8s.io/kubernetes/pkg/controller/informers" "k8s.io/kubernetes/pkg/util/metrics" @@ -49,7 +51,7 @@ type PodGCController struct { // will be null internalPodInformer cache.SharedIndexInformer - podStore cache.StoreToPodLister + podStore listers.StoreToPodLister podController cache.Controller deletePod func(namespace, name string) error @@ -65,7 +67,7 @@ func NewPodGC(kubeClient clientset.Interface, podInformer cache.SharedIndexInfor terminatedPodThreshold: terminatedPodThreshold, deletePod: func(namespace, name string) error { glog.Infof("PodGC is force deleting Pod: %v:%v", namespace, name) - return kubeClient.Core().Pods(namespace).Delete(name, v1.NewDeleteOptions(0)) + return kubeClient.Core().Pods(namespace).Delete(name, metav1.NewDeleteOptions(0)) }, } @@ -155,7 +157,7 @@ func (gcc *PodGCController) gcTerminated(pods []*v1.Pod) { func (gcc *PodGCController) gcOrphaned(pods []*v1.Pod) { glog.V(4).Infof("GC'ing orphaned") // We want to get list of Nodes from the etcd, to make sure that it's as fresh as possible. - nodes, err := gcc.kubeClient.Core().Nodes().List(v1.ListOptions{}) + nodes, err := gcc.kubeClient.Core().Nodes().List(metav1.ListOptions{}) if err != nil { return } diff --git a/vendor/k8s.io/kubernetes/pkg/controller/podgc/gc_controller_test.go b/vendor/k8s.io/kubernetes/pkg/controller/podgc/gc_controller_test.go index f0a075b7..d3a1ad72 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/podgc/gc_controller_test.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/podgc/gc_controller_test.go @@ -113,7 +113,7 @@ func TestGCTerminated(t *testing.T) { for _, pod := range test.pods { creationTime = creationTime.Add(1 * time.Hour) gcc.podStore.Indexer.Add(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{Name: pod.name, CreationTimestamp: metav1.Time{Time: creationTime}}, + ObjectMeta: metav1.ObjectMeta{Name: pod.name, CreationTimestamp: metav1.Time{Time: creationTime}}, Status: v1.PodStatus{Phase: pod.phase}, Spec: v1.PodSpec{NodeName: "node"}, }) @@ -182,7 +182,7 @@ func TestGCOrphaned(t *testing.T) { for _, pod := range test.pods { creationTime = creationTime.Add(1 * time.Hour) gcc.podStore.Indexer.Add(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{Name: pod.name, CreationTimestamp: metav1.Time{Time: creationTime}}, + ObjectMeta: metav1.ObjectMeta{Name: pod.name, CreationTimestamp: metav1.Time{Time: creationTime}}, Status: v1.PodStatus{Phase: pod.phase}, Spec: v1.PodSpec{NodeName: "node"}, }) @@ -261,7 +261,7 @@ func TestGCUnscheduledTerminating(t *testing.T) { for _, pod := range test.pods { creationTime = creationTime.Add(1 * time.Hour) gcc.podStore.Indexer.Add(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{Name: pod.name, CreationTimestamp: metav1.Time{Time: creationTime}, + ObjectMeta: metav1.ObjectMeta{Name: pod.name, CreationTimestamp: metav1.Time{Time: creationTime}, DeletionTimestamp: pod.deletionTimeStamp}, Status: v1.PodStatus{Phase: pod.phase}, Spec: v1.PodSpec{NodeName: pod.nodeName}, diff --git a/vendor/k8s.io/kubernetes/pkg/controller/replicaset/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/replicaset/BUILD index 0510d6b8..7db9f066 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/replicaset/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/replicaset/BUILD @@ -24,6 +24,7 @@ go_library( "//pkg/client/clientset_generated/clientset:go_default_library", "//pkg/client/clientset_generated/clientset/typed/core/v1:go_default_library", "//pkg/client/clientset_generated/clientset/typed/extensions/v1beta1:go_default_library", + "//pkg/client/legacylisters:go_default_library", "//pkg/client/record:go_default_library", "//pkg/controller:go_default_library", "//pkg/controller/informers:go_default_library", @@ -53,18 +54,19 @@ go_test( "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", "//pkg/client/clientset_generated/clientset/fake:go_default_library", - "//pkg/client/restclient:go_default_library", + "//pkg/client/legacylisters:go_default_library", "//pkg/client/testing/core:go_default_library", "//pkg/controller:go_default_library", "//pkg/controller/informers:go_default_library", "//pkg/securitycontext:go_default_library", - "//pkg/util/testing:go_default_library", "//pkg/util/uuid:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/sets", "//vendor:k8s.io/apimachinery/pkg/util/wait", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", + "//vendor:k8s.io/client-go/util/testing", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/replicaset/replica_set.go b/vendor/k8s.io/kubernetes/pkg/controller/replicaset/replica_set.go index f7d8fb70..7aa9c244 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/replicaset/replica_set.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/replicaset/replica_set.go @@ -39,6 +39,7 @@ import ( "k8s.io/kubernetes/pkg/client/cache" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" v1core "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1" + "k8s.io/kubernetes/pkg/client/legacylisters" "k8s.io/kubernetes/pkg/client/record" "k8s.io/kubernetes/pkg/controller" "k8s.io/kubernetes/pkg/controller/informers" @@ -75,9 +76,9 @@ type ReplicaSetController struct { expectations *controller.UIDTrackingControllerExpectations // A store of ReplicaSets, populated by the rsController - rsLister *cache.StoreToReplicaSetLister + rsLister *listers.StoreToReplicaSetLister // A store of pods, populated by the podController - podLister *cache.StoreToPodLister + podLister *listers.StoreToPodLister // podListerSynced returns true if the pod store has been synced at least once. // Added as a member to the struct to allow injection for testing. podListerSynced cache.InformerSynced diff --git a/vendor/k8s.io/kubernetes/pkg/controller/replicaset/replica_set_test.go b/vendor/k8s.io/kubernetes/pkg/controller/replicaset/replica_set_test.go index 2f880849..c1616b8c 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/replicaset/replica_set_test.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/replicaset/replica_set_test.go @@ -33,6 +33,8 @@ import ( "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apimachinery/pkg/watch" + restclient "k8s.io/client-go/rest" + utiltesting "k8s.io/client-go/util/testing" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" "k8s.io/kubernetes/pkg/api/v1" @@ -41,20 +43,19 @@ import ( "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" fakeclientset "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" - "k8s.io/kubernetes/pkg/client/restclient" + "k8s.io/kubernetes/pkg/client/legacylisters" "k8s.io/kubernetes/pkg/client/testing/core" "k8s.io/kubernetes/pkg/controller" "k8s.io/kubernetes/pkg/controller/informers" "k8s.io/kubernetes/pkg/securitycontext" - utiltesting "k8s.io/kubernetes/pkg/util/testing" "k8s.io/kubernetes/pkg/util/uuid" ) func testNewReplicaSetControllerFromClient(client clientset.Interface, stopCh chan struct{}, burstReplicas int, lookupCacheSize int) *ReplicaSetController { informers := informers.NewSharedInformerFactory(client, nil, controller.NoResyncPeriodFunc()) ret := NewReplicaSetController(informers.ReplicaSets(), informers.Pods(), client, burstReplicas, lookupCacheSize, false) - ret.podLister = &cache.StoreToPodLister{Indexer: cache.NewIndexer(cache.DeletionHandlingMetaNamespaceKeyFunc, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc})} - ret.rsLister = &cache.StoreToReplicaSetLister{Indexer: cache.NewIndexer(cache.DeletionHandlingMetaNamespaceKeyFunc, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc})} + ret.podLister = &listers.StoreToPodLister{Indexer: cache.NewIndexer(cache.DeletionHandlingMetaNamespaceKeyFunc, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc})} + ret.rsLister = &listers.StoreToReplicaSetLister{Indexer: cache.NewIndexer(cache.DeletionHandlingMetaNamespaceKeyFunc, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc})} informers.Start(stopCh) return ret } @@ -99,17 +100,17 @@ func getKey(rs *extensions.ReplicaSet, t *testing.T) string { func newReplicaSet(replicas int, selectorMap map[string]string) *extensions.ReplicaSet { rs := &extensions.ReplicaSet{ TypeMeta: metav1.TypeMeta{APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String()}, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: uuid.NewUUID(), Name: "foobar", - Namespace: v1.NamespaceDefault, + Namespace: metav1.NamespaceDefault, ResourceVersion: "18", }, Spec: extensions.ReplicaSetSpec{ Replicas: func() *int32 { i := int32(replicas); return &i }(), Selector: &metav1.LabelSelector{MatchLabels: selectorMap}, Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "name": "foo", "type": "production", @@ -147,7 +148,7 @@ func newPod(name string, rs *extensions.ReplicaSet, status v1.PodPhase, lastTran conditions = append(conditions, condition) } return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: rs.Namespace, Labels: rs.Spec.Selector.MatchLabels, @@ -463,22 +464,22 @@ func TestPodControllerLookup(t *testing.T) { // pods without labels don't match any ReplicaSets { inRSs: []*extensions.ReplicaSet{ - {ObjectMeta: v1.ObjectMeta{Name: "basic"}}}, - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "foo1", Namespace: v1.NamespaceAll}}, + {ObjectMeta: metav1.ObjectMeta{Name: "basic"}}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo1", Namespace: metav1.NamespaceAll}}, outRSName: "", }, // Matching labels, not namespace { inRSs: []*extensions.ReplicaSet{ { - ObjectMeta: v1.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: extensions.ReplicaSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"foo": "bar"}}, }, }, }, pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo2", Namespace: "ns", Labels: map[string]string{"foo": "bar"}}}, outRSName: "", }, @@ -486,14 +487,14 @@ func TestPodControllerLookup(t *testing.T) { { inRSs: []*extensions.ReplicaSet{ { - ObjectMeta: v1.ObjectMeta{Name: "bar", Namespace: "ns"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar", Namespace: "ns"}, Spec: extensions.ReplicaSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"foo": "bar"}}, }, }, }, pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo3", Namespace: "ns", Labels: map[string]string{"foo": "bar"}}}, outRSName: "bar", }, @@ -827,7 +828,7 @@ func doTestControllerBurstReplicas(t *testing.T, burstReplicas, numReplicas int) for _, key := range expectedDels.List() { nsName := strings.Split(key, "/") podsToDelete = append(podsToDelete, &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: nsName[1], Namespace: nsName[0], Labels: rsSpec.Spec.Selector.MatchLabels, @@ -868,7 +869,7 @@ func doTestControllerBurstReplicas(t *testing.T, burstReplicas, numReplicas int) } nsName := strings.Split(expectedDel.List()[0], "/") lastPod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: nsName[1], Namespace: nsName[0], Labels: rsSpec.Spec.Selector.MatchLabels, @@ -1082,7 +1083,7 @@ func TestDeletionTimestamp(t *testing.T) { // An update to the pod (including an update to the deletion timestamp) // should not be counted as a second delete. secondPod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: pod.Namespace, Name: "secondPod", Labels: pod.Labels, diff --git a/vendor/k8s.io/kubernetes/pkg/controller/replication/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/replication/BUILD index 0aa420b8..32f69232 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/replication/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/replication/BUILD @@ -21,6 +21,7 @@ go_library( "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", "//pkg/client/clientset_generated/clientset/typed/core/v1:go_default_library", + "//pkg/client/legacylisters:go_default_library", "//pkg/client/record:go_default_library", "//pkg/controller:go_default_library", "//pkg/controller/informers:go_default_library", @@ -50,18 +51,18 @@ go_test( "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", "//pkg/client/clientset_generated/clientset/fake:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//pkg/controller:go_default_library", "//pkg/controller/informers:go_default_library", "//pkg/securitycontext:go_default_library", - "//pkg/util/testing:go_default_library", "//pkg/util/uuid:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/sets", "//vendor:k8s.io/apimachinery/pkg/util/wait", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", + "//vendor:k8s.io/client-go/util/testing", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/replication/replication_controller.go b/vendor/k8s.io/kubernetes/pkg/controller/replication/replication_controller.go index 08629980..35e032df 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/replication/replication_controller.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/replication/replication_controller.go @@ -36,6 +36,7 @@ import ( "k8s.io/kubernetes/pkg/client/cache" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" v1core "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1" + "k8s.io/kubernetes/pkg/client/legacylisters" "k8s.io/kubernetes/pkg/client/record" "k8s.io/kubernetes/pkg/controller" "k8s.io/kubernetes/pkg/controller/informers" @@ -82,9 +83,9 @@ type ReplicationManager struct { expectations *controller.UIDTrackingControllerExpectations // A store of replication controllers, populated by the rcController - rcLister cache.StoreToReplicationControllerLister + rcLister listers.StoreToReplicationControllerLister // A store of pods, populated by the podController - podLister cache.StoreToPodLister + podLister listers.StoreToPodLister // Watches changes to all pods podController cache.Controller // podListerSynced returns true if the pod store has been synced at least once. diff --git a/vendor/k8s.io/kubernetes/pkg/controller/replication/replication_controller_test.go b/vendor/k8s.io/kubernetes/pkg/controller/replication/replication_controller_test.go index 1cde941c..b626b83d 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/replication/replication_controller_test.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/replication/replication_controller_test.go @@ -32,6 +32,8 @@ import ( "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apimachinery/pkg/watch" + restclient "k8s.io/client-go/rest" + utiltesting "k8s.io/client-go/util/testing" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" "k8s.io/kubernetes/pkg/api/v1" @@ -39,12 +41,10 @@ import ( "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" fakeclientset "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/testing/core" "k8s.io/kubernetes/pkg/controller" "k8s.io/kubernetes/pkg/controller/informers" "k8s.io/kubernetes/pkg/securitycontext" - utiltesting "k8s.io/kubernetes/pkg/util/testing" "k8s.io/kubernetes/pkg/util/uuid" ) @@ -62,17 +62,17 @@ func getKey(rc *v1.ReplicationController, t *testing.T) string { func newReplicationController(replicas int) *v1.ReplicationController { rc := &v1.ReplicationController{ TypeMeta: metav1.TypeMeta{APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String()}, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: uuid.NewUUID(), Name: "foobar", - Namespace: v1.NamespaceDefault, + Namespace: metav1.NamespaceDefault, ResourceVersion: "18", }, Spec: v1.ReplicationControllerSpec{ Replicas: func() *int32 { i := int32(replicas); return &i }(), Selector: map[string]string{"foo": "bar"}, Template: &v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "name": "foo", "type": "production", @@ -110,7 +110,7 @@ func newPod(name string, rc *v1.ReplicationController, status v1.PodPhase, lastT conditions = append(conditions, condition) } return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Labels: rc.Spec.Selector, Namespace: rc.Namespace, @@ -397,22 +397,22 @@ func TestPodControllerLookup(t *testing.T) { // pods without labels don't match any rcs { inRCs: []*v1.ReplicationController{ - {ObjectMeta: v1.ObjectMeta{Name: "basic"}}}, - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "foo1", Namespace: v1.NamespaceAll}}, + {ObjectMeta: metav1.ObjectMeta{Name: "basic"}}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo1", Namespace: metav1.NamespaceAll}}, outRCName: "", }, // Matching labels, not namespace { inRCs: []*v1.ReplicationController{ { - ObjectMeta: v1.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: v1.ReplicationControllerSpec{ Selector: map[string]string{"foo": "bar"}, }, }, }, pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo2", Namespace: "ns", Labels: map[string]string{"foo": "bar"}}}, outRCName: "", }, @@ -420,14 +420,14 @@ func TestPodControllerLookup(t *testing.T) { { inRCs: []*v1.ReplicationController{ { - ObjectMeta: v1.ObjectMeta{Name: "bar", Namespace: "ns"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar", Namespace: "ns"}, Spec: v1.ReplicationControllerSpec{ Selector: map[string]string{"foo": "bar"}, }, }, }, pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo3", Namespace: "ns", Labels: map[string]string{"foo": "bar"}}}, outRCName: "bar", }, @@ -752,7 +752,7 @@ func doTestControllerBurstReplicas(t *testing.T, burstReplicas, numReplicas int) for _, key := range expectedDels.List() { nsName := strings.Split(key, "/") podsToDelete = append(podsToDelete, &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: nsName[1], Namespace: nsName[0], Labels: controllerSpec.Spec.Selector, @@ -793,7 +793,7 @@ func doTestControllerBurstReplicas(t *testing.T, burstReplicas, numReplicas int) } nsName := strings.Split(expectedDel.List()[0], "/") lastPod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: nsName[1], Namespace: nsName[0], Labels: controllerSpec.Spec.Selector, @@ -994,7 +994,7 @@ func TestDeletionTimestamp(t *testing.T) { // An update to the pod (including an update to the deletion timestamp) // should not be counted as a second delete. secondPod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: pod.Namespace, Name: "secondPod", Labels: pod.Labels, @@ -1047,7 +1047,7 @@ func BenchmarkGetPodControllerMultiNS(b *testing.B) { for k := 0; k < 10; k++ { podName := fmt.Sprintf("pod-%d-%d", j, k) pods = append(pods, v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, Namespace: ns, Labels: map[string]string{"rcName": rcName}, @@ -1062,7 +1062,7 @@ func BenchmarkGetPodControllerMultiNS(b *testing.B) { for j := 0; j < 10; j++ { rcName := fmt.Sprintf("rc-%d", j) manager.rcLister.Indexer.Add(&v1.ReplicationController{ - ObjectMeta: v1.ObjectMeta{Name: rcName, Namespace: ns}, + ObjectMeta: metav1.ObjectMeta{Name: rcName, Namespace: ns}, Spec: v1.ReplicationControllerSpec{ Selector: map[string]string{"rcName": rcName}, }, @@ -1092,7 +1092,7 @@ func BenchmarkGetPodControllerSingleNS(b *testing.B) { for j := 0; j < replicaNum; j++ { podName := fmt.Sprintf("pod-%d-%d", i, j) pods = append(pods, v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, Namespace: "foo", Labels: map[string]string{"rcName": rcName}, @@ -1104,7 +1104,7 @@ func BenchmarkGetPodControllerSingleNS(b *testing.B) { for i := 0; i < rcNum; i++ { rcName := fmt.Sprintf("rc-%d", i) manager.rcLister.Indexer.Add(&v1.ReplicationController{ - ObjectMeta: v1.ObjectMeta{Name: rcName, Namespace: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: rcName, Namespace: "foo"}, Spec: v1.ReplicationControllerSpec{ Selector: map[string]string{"rcName": rcName}, }, diff --git a/vendor/k8s.io/kubernetes/pkg/controller/resourcequota/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/resourcequota/BUILD index d1a81efd..150d22a4 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/resourcequota/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/resourcequota/BUILD @@ -29,6 +29,7 @@ go_library( "//pkg/util/workqueue:go_default_library", "//vendor:github.com/golang/glog", "//vendor:k8s.io/apimachinery/pkg/api/meta", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/util/runtime", @@ -55,6 +56,7 @@ go_test( "//pkg/quota/generic:go_default_library", "//pkg/quota/install:go_default_library", "//pkg/util/intstr:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/util/sets", diff --git a/vendor/k8s.io/kubernetes/pkg/controller/resourcequota/replenishment_controller.go b/vendor/k8s.io/kubernetes/pkg/controller/resourcequota/replenishment_controller.go index fc34a73b..fe818cce 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/resourcequota/replenishment_controller.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/resourcequota/replenishment_controller.go @@ -22,6 +22,7 @@ import ( "github.com/golang/glog" "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" utilruntime "k8s.io/apimachinery/pkg/util/runtime" @@ -148,11 +149,11 @@ func (r *replenishmentControllerFactory) NewController(options *ReplenishmentCon // TODO move to informer when defined _, result = cache.NewInformer( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - return r.kubeClient.Core().Services(v1.NamespaceAll).List(options) + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + return r.kubeClient.Core().Services(metav1.NamespaceAll).List(options) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - return r.kubeClient.Core().Services(v1.NamespaceAll).Watch(options) + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + return r.kubeClient.Core().Services(metav1.NamespaceAll).Watch(options) }, }, &v1.Service{}, @@ -166,11 +167,11 @@ func (r *replenishmentControllerFactory) NewController(options *ReplenishmentCon // TODO move to informer when defined _, result = cache.NewInformer( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - return r.kubeClient.Core().ReplicationControllers(v1.NamespaceAll).List(options) + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + return r.kubeClient.Core().ReplicationControllers(metav1.NamespaceAll).List(options) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - return r.kubeClient.Core().ReplicationControllers(v1.NamespaceAll).Watch(options) + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + return r.kubeClient.Core().ReplicationControllers(metav1.NamespaceAll).Watch(options) }, }, &v1.ReplicationController{}, @@ -189,11 +190,11 @@ func (r *replenishmentControllerFactory) NewController(options *ReplenishmentCon // TODO (derekwaynecarr) remove me when we can require a sharedInformerFactory in all code paths... _, result = cache.NewInformer( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - return r.kubeClient.Core().PersistentVolumeClaims(v1.NamespaceAll).List(options) + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + return r.kubeClient.Core().PersistentVolumeClaims(metav1.NamespaceAll).List(options) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - return r.kubeClient.Core().PersistentVolumeClaims(v1.NamespaceAll).Watch(options) + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + return r.kubeClient.Core().PersistentVolumeClaims(metav1.NamespaceAll).Watch(options) }, }, &v1.PersistentVolumeClaim{}, @@ -206,11 +207,11 @@ func (r *replenishmentControllerFactory) NewController(options *ReplenishmentCon // TODO move to informer when defined _, result = cache.NewInformer( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - return r.kubeClient.Core().Secrets(v1.NamespaceAll).List(options) + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + return r.kubeClient.Core().Secrets(metav1.NamespaceAll).List(options) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - return r.kubeClient.Core().Secrets(v1.NamespaceAll).Watch(options) + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + return r.kubeClient.Core().Secrets(metav1.NamespaceAll).Watch(options) }, }, &v1.Secret{}, @@ -223,11 +224,11 @@ func (r *replenishmentControllerFactory) NewController(options *ReplenishmentCon // TODO move to informer when defined _, result = cache.NewInformer( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - return r.kubeClient.Core().ConfigMaps(v1.NamespaceAll).List(options) + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + return r.kubeClient.Core().ConfigMaps(metav1.NamespaceAll).List(options) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - return r.kubeClient.Core().ConfigMaps(v1.NamespaceAll).Watch(options) + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + return r.kubeClient.Core().ConfigMaps(metav1.NamespaceAll).Watch(options) }, }, &v1.ConfigMap{}, diff --git a/vendor/k8s.io/kubernetes/pkg/controller/resourcequota/replenishment_controller_test.go b/vendor/k8s.io/kubernetes/pkg/controller/resourcequota/replenishment_controller_test.go index 667150ac..d6be0af3 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/resourcequota/replenishment_controller_test.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/resourcequota/replenishment_controller_test.go @@ -19,6 +19,7 @@ package resourcequota import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/kubernetes/pkg/api" @@ -47,11 +48,11 @@ func TestPodReplenishmentUpdateFunc(t *testing.T) { ResyncPeriod: controller.NoResyncPeriodFunc, } oldPod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{Namespace: "test", Name: "pod"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "test", Name: "pod"}, Status: v1.PodStatus{Phase: v1.PodRunning}, } newPod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{Namespace: "test", Name: "pod"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "test", Name: "pod"}, Status: v1.PodStatus{Phase: v1.PodFailed}, } updateFunc := PodReplenishmentUpdateFunc(&options) @@ -72,7 +73,7 @@ func TestObjectReplenishmentDeleteFunc(t *testing.T) { ResyncPeriod: controller.NoResyncPeriodFunc, } oldPod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{Namespace: "test", Name: "pod"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "test", Name: "pod"}, Status: v1.PodStatus{Phase: v1.PodRunning}, } deleteFunc := ObjectReplenishmentDeleteFunc(&options) @@ -93,7 +94,7 @@ func TestServiceReplenishmentUpdateFunc(t *testing.T) { ResyncPeriod: controller.NoResyncPeriodFunc, } oldService := &v1.Service{ - ObjectMeta: v1.ObjectMeta{Namespace: "test", Name: "mysvc"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "test", Name: "mysvc"}, Spec: v1.ServiceSpec{ Type: v1.ServiceTypeNodePort, Ports: []v1.ServicePort{{ @@ -103,7 +104,7 @@ func TestServiceReplenishmentUpdateFunc(t *testing.T) { }, } newService := &v1.Service{ - ObjectMeta: v1.ObjectMeta{Namespace: "test", Name: "mysvc"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "test", Name: "mysvc"}, Spec: v1.ServiceSpec{ Type: v1.ServiceTypeClusterIP, Ports: []v1.ServicePort{{ @@ -127,7 +128,7 @@ func TestServiceReplenishmentUpdateFunc(t *testing.T) { ResyncPeriod: controller.NoResyncPeriodFunc, } oldService = &v1.Service{ - ObjectMeta: v1.ObjectMeta{Namespace: "test", Name: "mysvc"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "test", Name: "mysvc"}, Spec: v1.ServiceSpec{ Type: v1.ServiceTypeNodePort, Ports: []v1.ServicePort{{ @@ -137,7 +138,7 @@ func TestServiceReplenishmentUpdateFunc(t *testing.T) { }, } newService = &v1.Service{ - ObjectMeta: v1.ObjectMeta{Namespace: "test", Name: "mysvc"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "test", Name: "mysvc"}, Spec: v1.ServiceSpec{ Type: v1.ServiceTypeNodePort, Ports: []v1.ServicePort{{ diff --git a/vendor/k8s.io/kubernetes/pkg/controller/resourcequota/resource_quota_controller.go b/vendor/k8s.io/kubernetes/pkg/controller/resourcequota/resource_quota_controller.go index 55fd211d..8c2ab9d6 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/resourcequota/resource_quota_controller.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/resourcequota/resource_quota_controller.go @@ -21,6 +21,7 @@ import ( "github.com/golang/glog" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" utilruntime "k8s.io/apimachinery/pkg/util/runtime" @@ -94,11 +95,11 @@ func NewResourceQuotaController(options *ResourceQuotaControllerOptions) *Resour // build the controller that observes quota rq.rqIndexer, rq.rqController = cache.NewIndexerInformer( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - return rq.kubeClient.Core().ResourceQuotas(v1.NamespaceAll).List(options) + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + return rq.kubeClient.Core().ResourceQuotas(metav1.NamespaceAll).List(options) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - return rq.kubeClient.Core().ResourceQuotas(v1.NamespaceAll).Watch(options) + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + return rq.kubeClient.Core().ResourceQuotas(metav1.NamespaceAll).Watch(options) }, }, &v1.ResourceQuota{}, @@ -300,7 +301,7 @@ func (rq *ResourceQuotaController) syncResourceQuota(v1ResourceQuota v1.Resource // Create a usage object that is based on the quota resource version that will handle updates // by default, we preserve the past usage observation, and set hard to the current spec usage := api.ResourceQuota{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: resourceQuota.Name, Namespace: resourceQuota.Namespace, ResourceVersion: resourceQuota.ResourceVersion, diff --git a/vendor/k8s.io/kubernetes/pkg/controller/resourcequota/resource_quota_controller_test.go b/vendor/k8s.io/kubernetes/pkg/controller/resourcequota/resource_quota_controller_test.go index d60c4a61..d633e12a 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/resourcequota/resource_quota_controller_test.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/resourcequota/resource_quota_controller_test.go @@ -20,6 +20,7 @@ import ( "strings" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/kubernetes/pkg/api" @@ -54,7 +55,7 @@ func TestSyncResourceQuota(t *testing.T) { podList := v1.PodList{ Items: []v1.Pod{ { - ObjectMeta: v1.ObjectMeta{Name: "pod-running", Namespace: "testing"}, + ObjectMeta: metav1.ObjectMeta{Name: "pod-running", Namespace: "testing"}, Status: v1.PodStatus{Phase: v1.PodRunning}, Spec: v1.PodSpec{ Volumes: []v1.Volume{{Name: "vol"}}, @@ -62,7 +63,7 @@ func TestSyncResourceQuota(t *testing.T) { }, }, { - ObjectMeta: v1.ObjectMeta{Name: "pod-running-2", Namespace: "testing"}, + ObjectMeta: metav1.ObjectMeta{Name: "pod-running-2", Namespace: "testing"}, Status: v1.PodStatus{Phase: v1.PodRunning}, Spec: v1.PodSpec{ Volumes: []v1.Volume{{Name: "vol"}}, @@ -70,7 +71,7 @@ func TestSyncResourceQuota(t *testing.T) { }, }, { - ObjectMeta: v1.ObjectMeta{Name: "pod-failed", Namespace: "testing"}, + ObjectMeta: metav1.ObjectMeta{Name: "pod-failed", Namespace: "testing"}, Status: v1.PodStatus{Phase: v1.PodFailed}, Spec: v1.PodSpec{ Volumes: []v1.Volume{{Name: "vol"}}, @@ -80,7 +81,7 @@ func TestSyncResourceQuota(t *testing.T) { }, } resourceQuota := v1.ResourceQuota{ - ObjectMeta: v1.ObjectMeta{Name: "quota", Namespace: "testing"}, + ObjectMeta: metav1.ObjectMeta{Name: "quota", Namespace: "testing"}, Spec: v1.ResourceQuotaSpec{ Hard: v1.ResourceList{ v1.ResourceCPU: resource.MustParse("3"), @@ -159,7 +160,7 @@ func TestSyncResourceQuota(t *testing.T) { func TestSyncResourceQuotaSpecChange(t *testing.T) { resourceQuota := v1.ResourceQuota{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "default", Name: "rq", }, @@ -245,7 +246,7 @@ func TestSyncResourceQuotaSpecChange(t *testing.T) { } func TestSyncResourceQuotaSpecHardChange(t *testing.T) { resourceQuota := v1.ResourceQuota{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "default", Name: "rq", }, @@ -346,7 +347,7 @@ func TestSyncResourceQuotaSpecHardChange(t *testing.T) { func TestSyncResourceQuotaNoChange(t *testing.T) { resourceQuota := v1.ResourceQuota{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "default", Name: "rq", }, @@ -424,7 +425,7 @@ func TestAddQuota(t *testing.T) { name: "no status", expectedPriority: true, quota: &v1.ResourceQuota{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "default", Name: "rq", }, @@ -439,7 +440,7 @@ func TestAddQuota(t *testing.T) { name: "status, no usage", expectedPriority: true, quota: &v1.ResourceQuota{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "default", Name: "rq", }, @@ -459,7 +460,7 @@ func TestAddQuota(t *testing.T) { name: "status, mismatch", expectedPriority: true, quota: &v1.ResourceQuota{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "default", Name: "rq", }, @@ -482,7 +483,7 @@ func TestAddQuota(t *testing.T) { name: "status, missing usage, but don't care", expectedPriority: false, quota: &v1.ResourceQuota{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "default", Name: "rq", }, @@ -502,7 +503,7 @@ func TestAddQuota(t *testing.T) { name: "ready", expectedPriority: false, quota: &v1.ResourceQuota{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "default", Name: "rq", }, diff --git a/vendor/k8s.io/kubernetes/pkg/controller/route/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/route/BUILD index 1afcea61..047c830d 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/route/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/route/BUILD @@ -19,6 +19,7 @@ go_library( "//pkg/api/v1:go_default_library", "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", + "//pkg/client/legacylisters:go_default_library", "//pkg/cloudprovider:go_default_library", "//pkg/controller:go_default_library", "//pkg/util/metrics:go_default_library", @@ -44,6 +45,7 @@ go_test( "//pkg/client/testing/core:go_default_library", "//pkg/cloudprovider:go_default_library", "//pkg/cloudprovider/providers/fake:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/route/routecontroller.go b/vendor/k8s.io/kubernetes/pkg/controller/route/routecontroller.go index ab0b5593..bf8e38d8 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/route/routecontroller.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/route/routecontroller.go @@ -32,6 +32,7 @@ import ( "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/cache" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" + "k8s.io/kubernetes/pkg/client/legacylisters" "k8s.io/kubernetes/pkg/cloudprovider" "k8s.io/kubernetes/pkg/controller" "k8s.io/kubernetes/pkg/util/metrics" @@ -55,7 +56,7 @@ type RouteController struct { clusterCIDR *net.IPNet // Node framework and store nodeController cache.Controller - nodeStore cache.StoreToNodeLister + nodeStore listers.StoreToNodeLister } func New(routes cloudprovider.Routes, kubeClient clientset.Interface, clusterName string, clusterCIDR *net.IPNet) *RouteController { @@ -71,10 +72,10 @@ func New(routes cloudprovider.Routes, kubeClient clientset.Interface, clusterNam rc.nodeStore.Store, rc.nodeController = cache.NewInformer( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { return rc.kubeClient.Core().Nodes().List(options) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { return rc.kubeClient.Core().Nodes().Watch(options) }, }, diff --git a/vendor/k8s.io/kubernetes/pkg/controller/route/routecontroller_test.go b/vendor/k8s.io/kubernetes/pkg/controller/route/routecontroller_test.go index 78ecdaf6..8adb23e1 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/route/routecontroller_test.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/route/routecontroller_test.go @@ -21,6 +21,7 @@ import ( "testing" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" @@ -70,9 +71,9 @@ func TestIsResponsibleForRoute(t *testing.T) { func TestReconcile(t *testing.T) { cluster := "my-k8s" - node1 := v1.Node{ObjectMeta: v1.ObjectMeta{Name: "node-1", UID: "01"}, Spec: v1.NodeSpec{PodCIDR: "10.120.0.0/24"}} - node2 := v1.Node{ObjectMeta: v1.ObjectMeta{Name: "node-2", UID: "02"}, Spec: v1.NodeSpec{PodCIDR: "10.120.1.0/24"}} - nodeNoCidr := v1.Node{ObjectMeta: v1.ObjectMeta{Name: "node-2", UID: "02"}, Spec: v1.NodeSpec{PodCIDR: ""}} + node1 := v1.Node{ObjectMeta: metav1.ObjectMeta{Name: "node-1", UID: "01"}, Spec: v1.NodeSpec{PodCIDR: "10.120.0.0/24"}} + node2 := v1.Node{ObjectMeta: metav1.ObjectMeta{Name: "node-2", UID: "02"}, Spec: v1.NodeSpec{PodCIDR: "10.120.1.0/24"}} + nodeNoCidr := v1.Node{ObjectMeta: metav1.ObjectMeta{Name: "node-2", UID: "02"}, Spec: v1.NodeSpec{PodCIDR: ""}} testCases := []struct { nodes []v1.Node diff --git a/vendor/k8s.io/kubernetes/pkg/controller/service/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/service/BUILD index d0a925ca..05406c3f 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/service/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/service/BUILD @@ -20,14 +20,16 @@ go_library( "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", "//pkg/client/clientset_generated/clientset/typed/core/v1:go_default_library", + "//pkg/client/legacylisters:go_default_library", "//pkg/client/record:go_default_library", "//pkg/cloudprovider:go_default_library", "//pkg/controller:go_default_library", - "//pkg/fields:go_default_library", "//pkg/util/metrics:go_default_library", "//pkg/util/workqueue:go_default_library", "//vendor:github.com/golang/glog", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/runtime", "//vendor:k8s.io/apimachinery/pkg/util/wait", @@ -45,6 +47,7 @@ go_test( "//pkg/api/v1:go_default_library", "//pkg/client/clientset_generated/clientset/fake:go_default_library", "//pkg/cloudprovider/providers/fake:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/service/servicecontroller.go b/vendor/k8s.io/kubernetes/pkg/controller/service/servicecontroller.go index 305928d0..2f3ccc56 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/service/servicecontroller.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/service/servicecontroller.go @@ -26,6 +26,8 @@ import ( "github.com/golang/glog" "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" pkgruntime "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/wait" @@ -34,10 +36,10 @@ import ( "k8s.io/kubernetes/pkg/client/cache" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" unversionedcore "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1" + "k8s.io/kubernetes/pkg/client/legacylisters" "k8s.io/kubernetes/pkg/client/record" "k8s.io/kubernetes/pkg/cloudprovider" "k8s.io/kubernetes/pkg/controller" - "k8s.io/kubernetes/pkg/fields" "k8s.io/kubernetes/pkg/util/metrics" "k8s.io/kubernetes/pkg/util/workqueue" ) @@ -85,12 +87,12 @@ type ServiceController struct { zone cloudprovider.Zone cache *serviceCache // A store of services, populated by the serviceController - serviceStore cache.StoreToServiceLister + serviceStore listers.StoreToServiceLister // Watches changes to all services serviceController cache.Controller eventBroadcaster record.EventBroadcaster eventRecorder record.EventRecorder - nodeLister cache.StoreToNodeLister + nodeLister listers.StoreToNodeLister // services that need to be synced workingQueue workqueue.DelayingInterface } @@ -114,18 +116,18 @@ func New(cloud cloudprovider.Interface, kubeClient clientset.Interface, clusterN cache: &serviceCache{serviceMap: make(map[string]*cachedService)}, eventBroadcaster: broadcaster, eventRecorder: recorder, - nodeLister: cache.StoreToNodeLister{ + nodeLister: listers.StoreToNodeLister{ Store: cache.NewStore(cache.MetaNamespaceKeyFunc), }, workingQueue: workqueue.NewDelayingQueue(), } s.serviceStore.Indexer, s.serviceController = cache.NewIndexerInformer( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (pkgruntime.Object, error) { - return s.kubeClient.Core().Services(v1.NamespaceAll).List(options) + ListFunc: func(options metav1.ListOptions) (pkgruntime.Object, error) { + return s.kubeClient.Core().Services(metav1.NamespaceAll).List(options) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - return s.kubeClient.Core().Services(v1.NamespaceAll).Watch(options) + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + return s.kubeClient.Core().Services(metav1.NamespaceAll).Watch(options) }, }, &v1.Service{}, @@ -175,7 +177,7 @@ func (s *ServiceController) Run(workers int) { for i := 0; i < workers; i++ { go wait.Until(s.worker, time.Second, wait.NeverStop) } - nodeLW := cache.NewListWatchFromClient(s.kubeClient.Core().RESTClient(), "nodes", v1.NamespaceAll, fields.Everything()) + nodeLW := cache.NewListWatchFromClient(s.kubeClient.Core().RESTClient(), "nodes", metav1.NamespaceAll, fields.Everything()) cache.NewReflector(nodeLW, &v1.Node{}, s.nodeLister.Store, 0).Run() go wait.Until(s.nodeSyncLoop, nodeSyncPeriod, wait.NeverStop) } @@ -600,7 +602,7 @@ func includeNodeFromNodeList(node *v1.Node) bool { return !node.Spec.Unschedulable } -func getNodeConditionPredicate() cache.NodeConditionPredicate { +func getNodeConditionPredicate() listers.NodeConditionPredicate { return func(node *v1.Node) bool { // We add the master to the node list, but its unschedulable. So we use this to filter // the master. diff --git a/vendor/k8s.io/kubernetes/pkg/controller/service/servicecontroller_test.go b/vendor/k8s.io/kubernetes/pkg/controller/service/servicecontroller_test.go index 70e78c35..90549a8f 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/service/servicecontroller_test.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/service/servicecontroller_test.go @@ -20,6 +20,7 @@ import ( "reflect" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api/testapi" "k8s.io/kubernetes/pkg/api/v1" @@ -30,7 +31,7 @@ import ( const region = "us-central" func newService(name string, uid types.UID, serviceType v1.ServiceType) *v1.Service { - return &v1.Service{ObjectMeta: v1.ObjectMeta{Name: name, Namespace: "namespace", UID: uid, SelfLink: testapi.Default.SelfLink("services", name)}, Spec: v1.ServiceSpec{Type: serviceType}} + return &v1.Service{ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: "namespace", UID: uid, SelfLink: testapi.Default.SelfLink("services", name)}, Spec: v1.ServiceSpec{Type: serviceType}} } func TestCreateExternalLoadBalancer(t *testing.T) { @@ -41,7 +42,7 @@ func TestCreateExternalLoadBalancer(t *testing.T) { }{ { service: &v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "no-external-balancer", Namespace: "default", }, @@ -54,7 +55,7 @@ func TestCreateExternalLoadBalancer(t *testing.T) { }, { service: &v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "udp-service", Namespace: "default", SelfLink: testapi.Default.SelfLink("services", "udp-service"), @@ -72,7 +73,7 @@ func TestCreateExternalLoadBalancer(t *testing.T) { }, { service: &v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "basic-service1", Namespace: "default", SelfLink: testapi.Default.SelfLink("services", "basic-service1"), @@ -146,9 +147,9 @@ func TestCreateExternalLoadBalancer(t *testing.T) { // TODO: Finish converting and update comments func TestUpdateNodesInExternalLoadBalancer(t *testing.T) { nodes := []*v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "node0"}}, - {ObjectMeta: v1.ObjectMeta{Name: "node1"}}, - {ObjectMeta: v1.ObjectMeta{Name: "node73"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "node0"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "node1"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "node73"}}, } table := []struct { services []*v1.Service diff --git a/vendor/k8s.io/kubernetes/pkg/controller/serviceaccount/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/serviceaccount/BUILD index 03e0a287..c6e26199 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/serviceaccount/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/serviceaccount/BUILD @@ -22,14 +22,14 @@ go_library( "//pkg/api/v1:go_default_library", "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", + "//pkg/client/legacylisters:go_default_library", "//pkg/client/retry:go_default_library", "//pkg/controller/informers:go_default_library", - "//pkg/fields:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", "//pkg/registry/core/secret:go_default_library", "//pkg/registry/core/secret/storage:go_default_library", "//pkg/registry/core/serviceaccount:go_default_library", "//pkg/registry/core/serviceaccount/storage:go_default_library", - "//pkg/registry/generic:go_default_library", "//pkg/serviceaccount:go_default_library", "//pkg/storage/storagebackend:go_default_library", "//pkg/util/metrics:go_default_library", @@ -38,6 +38,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/api/meta", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/errors", @@ -45,7 +46,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/util/sets", "//vendor:k8s.io/apimachinery/pkg/util/wait", "//vendor:k8s.io/apimachinery/pkg/watch", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) @@ -62,12 +63,14 @@ go_test( "//pkg/api/v1:go_default_library", "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/clientset/fake:go_default_library", + "//pkg/client/legacylisters:go_default_library", "//pkg/client/testing/core:go_default_library", "//pkg/controller:go_default_library", "//pkg/controller/informers:go_default_library", "//vendor:github.com/davecgh/go-spew/spew", "//vendor:github.com/golang/glog", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/util/rand", diff --git a/vendor/k8s.io/kubernetes/pkg/controller/serviceaccount/serviceaccounts_controller.go b/vendor/k8s.io/kubernetes/pkg/controller/serviceaccount/serviceaccounts_controller.go index 0ff7c27d..58e7d375 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/serviceaccount/serviceaccounts_controller.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/serviceaccount/serviceaccounts_controller.go @@ -23,12 +23,14 @@ import ( "github.com/golang/glog" apierrs "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" utilerrors "k8s.io/apimachinery/pkg/util/errors" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/cache" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" + "k8s.io/kubernetes/pkg/client/legacylisters" "k8s.io/kubernetes/pkg/controller/informers" "k8s.io/kubernetes/pkg/util/metrics" "k8s.io/kubernetes/pkg/util/workqueue" @@ -62,7 +64,7 @@ type ServiceAccountsControllerOptions struct { func DefaultServiceAccountsControllerOptions() ServiceAccountsControllerOptions { return ServiceAccountsControllerOptions{ ServiceAccounts: []v1.ServiceAccount{ - {ObjectMeta: v1.ObjectMeta{Name: "default"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "default"}}, }, } } @@ -104,8 +106,8 @@ type ServiceAccountsController struct { // To allow injection for testing. syncHandler func(key string) error - saLister *cache.StoreToServiceAccountLister - nsLister *cache.IndexerToNamespaceLister + saLister *listers.StoreToServiceAccountLister + nsLister *listers.IndexerToNamespaceLister saSynced cache.InformerSynced nsSynced cache.InformerSynced diff --git a/vendor/k8s.io/kubernetes/pkg/controller/serviceaccount/serviceaccounts_controller_test.go b/vendor/k8s.io/kubernetes/pkg/controller/serviceaccount/serviceaccounts_controller_test.go index ab22b107..557ca7a0 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/serviceaccount/serviceaccounts_controller_test.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/serviceaccount/serviceaccounts_controller_test.go @@ -20,10 +20,12 @@ import ( "testing" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/cache" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" + "k8s.io/kubernetes/pkg/client/legacylisters" "k8s.io/kubernetes/pkg/client/testing/core" "k8s.io/kubernetes/pkg/controller" "k8s.io/kubernetes/pkg/controller/informers" @@ -35,39 +37,39 @@ type serverResponse struct { } func TestServiceAccountCreation(t *testing.T) { - ns := v1.NamespaceDefault + ns := metav1.NamespaceDefault defaultName := "default" managedName := "managed" activeNS := &v1.Namespace{ - ObjectMeta: v1.ObjectMeta{Name: ns}, + ObjectMeta: metav1.ObjectMeta{Name: ns}, Status: v1.NamespaceStatus{ Phase: v1.NamespaceActive, }, } terminatingNS := &v1.Namespace{ - ObjectMeta: v1.ObjectMeta{Name: ns}, + ObjectMeta: metav1.ObjectMeta{Name: ns}, Status: v1.NamespaceStatus{ Phase: v1.NamespaceTerminating, }, } defaultServiceAccount := &v1.ServiceAccount{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: defaultName, Namespace: ns, ResourceVersion: "1", }, } managedServiceAccount := &v1.ServiceAccount{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: managedName, Namespace: ns, ResourceVersion: "1", }, } unmanagedServiceAccount := &v1.ServiceAccount{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "other-unmanaged", Namespace: ns, ResourceVersion: "1", @@ -160,12 +162,12 @@ func TestServiceAccountCreation(t *testing.T) { informers := informers.NewSharedInformerFactory(fake.NewSimpleClientset(), nil, controller.NoResyncPeriodFunc()) options := DefaultServiceAccountsControllerOptions() options.ServiceAccounts = []v1.ServiceAccount{ - {ObjectMeta: v1.ObjectMeta{Name: defaultName}}, - {ObjectMeta: v1.ObjectMeta{Name: managedName}}, + {ObjectMeta: metav1.ObjectMeta{Name: defaultName}}, + {ObjectMeta: metav1.ObjectMeta{Name: managedName}}, } controller := NewServiceAccountsController(informers.ServiceAccounts(), informers.Namespaces(), client, options) - controller.saLister = &cache.StoreToServiceAccountLister{Indexer: cache.NewIndexer(cache.DeletionHandlingMetaNamespaceKeyFunc, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc})} - controller.nsLister = &cache.IndexerToNamespaceLister{Indexer: cache.NewIndexer(cache.DeletionHandlingMetaNamespaceKeyFunc, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc})} + controller.saLister = &listers.StoreToServiceAccountLister{Indexer: cache.NewIndexer(cache.DeletionHandlingMetaNamespaceKeyFunc, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc})} + controller.nsLister = &listers.IndexerToNamespaceLister{Indexer: cache.NewIndexer(cache.DeletionHandlingMetaNamespaceKeyFunc, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc})} controller.saSynced = alwaysReady controller.nsSynced = alwaysReady diff --git a/vendor/k8s.io/kubernetes/pkg/controller/serviceaccount/tokengetter.go b/vendor/k8s.io/kubernetes/pkg/controller/serviceaccount/tokengetter.go index d7dc513d..4b694e71 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/serviceaccount/tokengetter.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/serviceaccount/tokengetter.go @@ -18,14 +18,14 @@ package serviceaccount import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" "k8s.io/kubernetes/pkg/registry/core/secret" secretstore "k8s.io/kubernetes/pkg/registry/core/secret/storage" serviceaccountregistry "k8s.io/kubernetes/pkg/registry/core/serviceaccount" serviceaccountstore "k8s.io/kubernetes/pkg/registry/core/serviceaccount/storage" - "k8s.io/kubernetes/pkg/registry/generic" "k8s.io/kubernetes/pkg/serviceaccount" "k8s.io/kubernetes/pkg/storage/storagebackend" ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/serviceaccount/tokens_controller.go b/vendor/k8s.io/kubernetes/pkg/controller/serviceaccount/tokens_controller.go index 57bc54fb..c42eeb86 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/serviceaccount/tokens_controller.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/serviceaccount/tokens_controller.go @@ -24,6 +24,7 @@ import ( "github.com/golang/glog" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" utilerrors "k8s.io/apimachinery/pkg/util/errors" @@ -36,7 +37,6 @@ import ( "k8s.io/kubernetes/pkg/client/cache" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" clientretry "k8s.io/kubernetes/pkg/client/retry" - "k8s.io/kubernetes/pkg/fields" "k8s.io/kubernetes/pkg/registry/core/secret" "k8s.io/kubernetes/pkg/serviceaccount" "k8s.io/kubernetes/pkg/util/metrics" @@ -93,11 +93,11 @@ func NewTokensController(cl clientset.Interface, options TokensControllerOptions e.serviceAccounts, e.serviceAccountController = cache.NewInformer( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - return e.client.Core().ServiceAccounts(v1.NamespaceAll).List(options) + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + return e.client.Core().ServiceAccounts(metav1.NamespaceAll).List(options) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - return e.client.Core().ServiceAccounts(v1.NamespaceAll).Watch(options) + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + return e.client.Core().ServiceAccounts(metav1.NamespaceAll).Watch(options) }, }, &v1.ServiceAccount{}, @@ -112,13 +112,13 @@ func NewTokensController(cl clientset.Interface, options TokensControllerOptions tokenSelector := fields.SelectorFromSet(map[string]string{api.SecretTypeField: string(v1.SecretTypeServiceAccountToken)}) e.secrets, e.secretController = cache.NewIndexerInformer( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { options.FieldSelector = tokenSelector.String() - return e.client.Core().Secrets(v1.NamespaceAll).List(options) + return e.client.Core().Secrets(metav1.NamespaceAll).List(options) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { options.FieldSelector = tokenSelector.String() - return e.client.Core().Secrets(v1.NamespaceAll).Watch(options) + return e.client.Core().Secrets(metav1.NamespaceAll).Watch(options) }, }, &v1.Secret{}, @@ -258,7 +258,7 @@ func (e *TokensController) syncServiceAccount() { case sa == nil: // service account no longer exists, so delete related tokens glog.V(4).Infof("syncServiceAccount(%s/%s), service account deleted, removing tokens", saInfo.namespace, saInfo.name) - sa = &v1.ServiceAccount{ObjectMeta: v1.ObjectMeta{Namespace: saInfo.namespace, Name: saInfo.name, UID: saInfo.uid}} + sa = &v1.ServiceAccount{ObjectMeta: metav1.ObjectMeta{Namespace: saInfo.namespace, Name: saInfo.name, UID: saInfo.uid}} if retriable, err := e.deleteTokens(sa); err != nil { glog.Errorf("error deleting serviceaccount tokens for %s/%s: %v", saInfo.namespace, saInfo.name, err) retry = retriable @@ -351,9 +351,9 @@ func (e *TokensController) deleteTokens(serviceAccount *v1.ServiceAccount) ( /*r } func (e *TokensController) deleteToken(ns, name string, uid types.UID) ( /*retry*/ bool, error) { - var opts *v1.DeleteOptions + var opts *metav1.DeleteOptions if len(uid) > 0 { - opts = &v1.DeleteOptions{Preconditions: &v1.Preconditions{UID: &uid}} + opts = &metav1.DeleteOptions{Preconditions: &metav1.Preconditions{UID: &uid}} } err := e.client.Core().Secrets(ns).Delete(name, opts) // NotFound doesn't need a retry (it's already been deleted) @@ -399,7 +399,7 @@ func (e *TokensController) ensureReferencedToken(serviceAccount *v1.ServiceAccou // Build the secret secret := &v1.Secret{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: secret.Strategy.GenerateName(fmt.Sprintf("%s-token-", serviceAccount.Name)), Namespace: serviceAccount.Namespace, Annotations: map[string]string{ @@ -438,7 +438,7 @@ func (e *TokensController) ensureReferencedToken(serviceAccount *v1.ServiceAccou if _, err = serviceAccounts.Update(liveServiceAccount); err != nil { // we weren't able to use the token, try to clean it up. glog.V(2).Infof("deleting secret %s/%s because reference couldn't be added (%v)", secret.Namespace, secret.Name, err) - deleteOpts := &v1.DeleteOptions{Preconditions: &v1.Preconditions{UID: &createdToken.UID}} + deleteOpts := &metav1.DeleteOptions{Preconditions: &metav1.Preconditions{UID: &createdToken.UID}} if deleteErr := e.client.Core().Secrets(createdToken.Namespace).Delete(createdToken.Name, deleteOpts); deleteErr != nil { glog.Error(deleteErr) // if we fail, just log it } diff --git a/vendor/k8s.io/kubernetes/pkg/controller/serviceaccount/tokens_controller_test.go b/vendor/k8s.io/kubernetes/pkg/controller/serviceaccount/tokens_controller_test.go index 2e065673..e6c00974 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/serviceaccount/tokens_controller_test.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/serviceaccount/tokens_controller_test.go @@ -26,6 +26,7 @@ import ( "github.com/golang/glog" apierrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" utilrand "k8s.io/apimachinery/pkg/util/rand" @@ -81,7 +82,7 @@ func addNamedTokenSecretReference(refs []v1.ObjectReference, name string) []v1.O // serviceAccount returns a service account with the given secret refs func serviceAccount(secretRefs []v1.ObjectReference) *v1.ServiceAccount { return &v1.ServiceAccount{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "default", UID: "12345", Namespace: "default", @@ -101,7 +102,7 @@ func updatedServiceAccount(secretRefs []v1.ObjectReference) *v1.ServiceAccount { // opaqueSecret returns a persisted non-ServiceAccountToken secret named "regular-secret-1" func opaqueSecret() *v1.Secret { return &v1.Secret{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "regular-secret-1", Namespace: "default", UID: "23456", @@ -123,7 +124,7 @@ func createdTokenSecret(overrideName ...string) *v1.Secret { // namedTokenSecret returns the ServiceAccountToken secret posted when creating a new token secret with the given name. func namedCreatedTokenSecret(name string) *v1.Secret { return &v1.Secret{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: "default", Annotations: map[string]string{ @@ -143,7 +144,7 @@ func namedCreatedTokenSecret(name string) *v1.Secret { // serviceAccountTokenSecret returns an existing ServiceAccountToken secret named "token-secret-1" func serviceAccountTokenSecret() *v1.Secret { return &v1.Secret{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "token-secret-1", Namespace: "default", UID: "23456", @@ -229,9 +230,9 @@ func TestTokenCreation(t *testing.T) { AddedServiceAccount: serviceAccount(emptySecretReferences()), ExpectedActions: []core.Action{ - core.NewGetAction(schema.GroupVersionResource{Version: "v1", Resource: "serviceaccounts"}, v1.NamespaceDefault, "default"), - core.NewCreateAction(schema.GroupVersionResource{Version: "v1", Resource: "secrets"}, v1.NamespaceDefault, createdTokenSecret()), - core.NewUpdateAction(schema.GroupVersionResource{Version: "v1", Resource: "serviceaccounts"}, v1.NamespaceDefault, serviceAccount(addTokenSecretReference(emptySecretReferences()))), + core.NewGetAction(schema.GroupVersionResource{Version: "v1", Resource: "serviceaccounts"}, metav1.NamespaceDefault, "default"), + core.NewCreateAction(schema.GroupVersionResource{Version: "v1", Resource: "secrets"}, metav1.NamespaceDefault, createdTokenSecret()), + core.NewUpdateAction(schema.GroupVersionResource{Version: "v1", Resource: "serviceaccounts"}, metav1.NamespaceDefault, serviceAccount(addTokenSecretReference(emptySecretReferences()))), }, }, "new serviceaccount with no secrets encountering create error": { @@ -255,17 +256,17 @@ func TestTokenCreation(t *testing.T) { AddedServiceAccount: serviceAccount(emptySecretReferences()), ExpectedActions: []core.Action{ // Attempt 1 - core.NewGetAction(schema.GroupVersionResource{Version: "v1", Resource: "serviceaccounts"}, v1.NamespaceDefault, "default"), - core.NewCreateAction(schema.GroupVersionResource{Version: "v1", Resource: "secrets"}, v1.NamespaceDefault, createdTokenSecret()), + core.NewGetAction(schema.GroupVersionResource{Version: "v1", Resource: "serviceaccounts"}, metav1.NamespaceDefault, "default"), + core.NewCreateAction(schema.GroupVersionResource{Version: "v1", Resource: "secrets"}, metav1.NamespaceDefault, createdTokenSecret()), // Attempt 2 - core.NewGetAction(schema.GroupVersionResource{Version: "v1", Resource: "serviceaccounts"}, v1.NamespaceDefault, "default"), - core.NewCreateAction(schema.GroupVersionResource{Version: "v1", Resource: "secrets"}, v1.NamespaceDefault, namedCreatedTokenSecret("default-token-x50vb")), + core.NewGetAction(schema.GroupVersionResource{Version: "v1", Resource: "serviceaccounts"}, metav1.NamespaceDefault, "default"), + core.NewCreateAction(schema.GroupVersionResource{Version: "v1", Resource: "secrets"}, metav1.NamespaceDefault, namedCreatedTokenSecret("default-token-x50vb")), // Attempt 3 - core.NewGetAction(schema.GroupVersionResource{Version: "v1", Resource: "serviceaccounts"}, v1.NamespaceDefault, "default"), - core.NewCreateAction(schema.GroupVersionResource{Version: "v1", Resource: "secrets"}, v1.NamespaceDefault, namedCreatedTokenSecret("default-token-scq98")), - core.NewUpdateAction(schema.GroupVersionResource{Version: "v1", Resource: "serviceaccounts"}, v1.NamespaceDefault, serviceAccount(addNamedTokenSecretReference(emptySecretReferences(), "default-token-scq98"))), + core.NewGetAction(schema.GroupVersionResource{Version: "v1", Resource: "serviceaccounts"}, metav1.NamespaceDefault, "default"), + core.NewCreateAction(schema.GroupVersionResource{Version: "v1", Resource: "secrets"}, metav1.NamespaceDefault, namedCreatedTokenSecret("default-token-scq98")), + core.NewUpdateAction(schema.GroupVersionResource{Version: "v1", Resource: "serviceaccounts"}, metav1.NamespaceDefault, serviceAccount(addNamedTokenSecretReference(emptySecretReferences(), "default-token-scq98"))), }, }, "new serviceaccount with no secrets encountering unending create error": { @@ -285,14 +286,14 @@ func TestTokenCreation(t *testing.T) { AddedServiceAccount: serviceAccount(emptySecretReferences()), ExpectedActions: []core.Action{ // Attempt - core.NewGetAction(schema.GroupVersionResource{Version: "v1", Resource: "serviceaccounts"}, v1.NamespaceDefault, "default"), - core.NewCreateAction(schema.GroupVersionResource{Version: "v1", Resource: "secrets"}, v1.NamespaceDefault, createdTokenSecret()), + core.NewGetAction(schema.GroupVersionResource{Version: "v1", Resource: "serviceaccounts"}, metav1.NamespaceDefault, "default"), + core.NewCreateAction(schema.GroupVersionResource{Version: "v1", Resource: "secrets"}, metav1.NamespaceDefault, createdTokenSecret()), // Retry 1 - core.NewGetAction(schema.GroupVersionResource{Version: "v1", Resource: "serviceaccounts"}, v1.NamespaceDefault, "default"), - core.NewCreateAction(schema.GroupVersionResource{Version: "v1", Resource: "secrets"}, v1.NamespaceDefault, namedCreatedTokenSecret("default-token-x50vb")), + core.NewGetAction(schema.GroupVersionResource{Version: "v1", Resource: "serviceaccounts"}, metav1.NamespaceDefault, "default"), + core.NewCreateAction(schema.GroupVersionResource{Version: "v1", Resource: "secrets"}, metav1.NamespaceDefault, namedCreatedTokenSecret("default-token-x50vb")), // Retry 2 - core.NewGetAction(schema.GroupVersionResource{Version: "v1", Resource: "serviceaccounts"}, v1.NamespaceDefault, "default"), - core.NewCreateAction(schema.GroupVersionResource{Version: "v1", Resource: "secrets"}, v1.NamespaceDefault, namedCreatedTokenSecret("default-token-scq98")), + core.NewGetAction(schema.GroupVersionResource{Version: "v1", Resource: "serviceaccounts"}, metav1.NamespaceDefault, "default"), + core.NewCreateAction(schema.GroupVersionResource{Version: "v1", Resource: "secrets"}, metav1.NamespaceDefault, namedCreatedTokenSecret("default-token-scq98")), }, }, "new serviceaccount with missing secrets": { @@ -300,9 +301,9 @@ func TestTokenCreation(t *testing.T) { AddedServiceAccount: serviceAccount(missingSecretReferences()), ExpectedActions: []core.Action{ - core.NewGetAction(schema.GroupVersionResource{Version: "v1", Resource: "serviceaccounts"}, v1.NamespaceDefault, "default"), - core.NewCreateAction(schema.GroupVersionResource{Version: "v1", Resource: "secrets"}, v1.NamespaceDefault, createdTokenSecret()), - core.NewUpdateAction(schema.GroupVersionResource{Version: "v1", Resource: "serviceaccounts"}, v1.NamespaceDefault, serviceAccount(addTokenSecretReference(missingSecretReferences()))), + core.NewGetAction(schema.GroupVersionResource{Version: "v1", Resource: "serviceaccounts"}, metav1.NamespaceDefault, "default"), + core.NewCreateAction(schema.GroupVersionResource{Version: "v1", Resource: "secrets"}, metav1.NamespaceDefault, createdTokenSecret()), + core.NewUpdateAction(schema.GroupVersionResource{Version: "v1", Resource: "serviceaccounts"}, metav1.NamespaceDefault, serviceAccount(addTokenSecretReference(missingSecretReferences()))), }, }, "new serviceaccount with non-token secrets": { @@ -310,9 +311,9 @@ func TestTokenCreation(t *testing.T) { AddedServiceAccount: serviceAccount(regularSecretReferences()), ExpectedActions: []core.Action{ - core.NewGetAction(schema.GroupVersionResource{Version: "v1", Resource: "serviceaccounts"}, v1.NamespaceDefault, "default"), - core.NewCreateAction(schema.GroupVersionResource{Version: "v1", Resource: "secrets"}, v1.NamespaceDefault, createdTokenSecret()), - core.NewUpdateAction(schema.GroupVersionResource{Version: "v1", Resource: "serviceaccounts"}, v1.NamespaceDefault, serviceAccount(addTokenSecretReference(regularSecretReferences()))), + core.NewGetAction(schema.GroupVersionResource{Version: "v1", Resource: "serviceaccounts"}, metav1.NamespaceDefault, "default"), + core.NewCreateAction(schema.GroupVersionResource{Version: "v1", Resource: "secrets"}, metav1.NamespaceDefault, createdTokenSecret()), + core.NewUpdateAction(schema.GroupVersionResource{Version: "v1", Resource: "serviceaccounts"}, metav1.NamespaceDefault, serviceAccount(addTokenSecretReference(regularSecretReferences()))), }, }, "new serviceaccount with token secrets": { @@ -327,7 +328,7 @@ func TestTokenCreation(t *testing.T) { AddedServiceAccount: serviceAccount(emptySecretReferences()), ExpectedActions: []core.Action{ - core.NewGetAction(schema.GroupVersionResource{Version: "v1", Resource: "serviceaccounts"}, v1.NamespaceDefault, "default"), + core.NewGetAction(schema.GroupVersionResource{Version: "v1", Resource: "serviceaccounts"}, metav1.NamespaceDefault, "default"), }, }, "updated serviceaccount with no secrets": { @@ -335,9 +336,9 @@ func TestTokenCreation(t *testing.T) { UpdatedServiceAccount: serviceAccount(emptySecretReferences()), ExpectedActions: []core.Action{ - core.NewGetAction(schema.GroupVersionResource{Version: "v1", Resource: "serviceaccounts"}, v1.NamespaceDefault, "default"), - core.NewCreateAction(schema.GroupVersionResource{Version: "v1", Resource: "secrets"}, v1.NamespaceDefault, createdTokenSecret()), - core.NewUpdateAction(schema.GroupVersionResource{Version: "v1", Resource: "serviceaccounts"}, v1.NamespaceDefault, serviceAccount(addTokenSecretReference(emptySecretReferences()))), + core.NewGetAction(schema.GroupVersionResource{Version: "v1", Resource: "serviceaccounts"}, metav1.NamespaceDefault, "default"), + core.NewCreateAction(schema.GroupVersionResource{Version: "v1", Resource: "secrets"}, metav1.NamespaceDefault, createdTokenSecret()), + core.NewUpdateAction(schema.GroupVersionResource{Version: "v1", Resource: "serviceaccounts"}, metav1.NamespaceDefault, serviceAccount(addTokenSecretReference(emptySecretReferences()))), }, }, "updated serviceaccount with missing secrets": { @@ -345,9 +346,9 @@ func TestTokenCreation(t *testing.T) { UpdatedServiceAccount: serviceAccount(missingSecretReferences()), ExpectedActions: []core.Action{ - core.NewGetAction(schema.GroupVersionResource{Version: "v1", Resource: "serviceaccounts"}, v1.NamespaceDefault, "default"), - core.NewCreateAction(schema.GroupVersionResource{Version: "v1", Resource: "secrets"}, v1.NamespaceDefault, createdTokenSecret()), - core.NewUpdateAction(schema.GroupVersionResource{Version: "v1", Resource: "serviceaccounts"}, v1.NamespaceDefault, serviceAccount(addTokenSecretReference(missingSecretReferences()))), + core.NewGetAction(schema.GroupVersionResource{Version: "v1", Resource: "serviceaccounts"}, metav1.NamespaceDefault, "default"), + core.NewCreateAction(schema.GroupVersionResource{Version: "v1", Resource: "secrets"}, metav1.NamespaceDefault, createdTokenSecret()), + core.NewUpdateAction(schema.GroupVersionResource{Version: "v1", Resource: "serviceaccounts"}, metav1.NamespaceDefault, serviceAccount(addTokenSecretReference(missingSecretReferences()))), }, }, "updated serviceaccount with non-token secrets": { @@ -355,9 +356,9 @@ func TestTokenCreation(t *testing.T) { UpdatedServiceAccount: serviceAccount(regularSecretReferences()), ExpectedActions: []core.Action{ - core.NewGetAction(schema.GroupVersionResource{Version: "v1", Resource: "serviceaccounts"}, v1.NamespaceDefault, "default"), - core.NewCreateAction(schema.GroupVersionResource{Version: "v1", Resource: "secrets"}, v1.NamespaceDefault, createdTokenSecret()), - core.NewUpdateAction(schema.GroupVersionResource{Version: "v1", Resource: "serviceaccounts"}, v1.NamespaceDefault, serviceAccount(addTokenSecretReference(regularSecretReferences()))), + core.NewGetAction(schema.GroupVersionResource{Version: "v1", Resource: "serviceaccounts"}, metav1.NamespaceDefault, "default"), + core.NewCreateAction(schema.GroupVersionResource{Version: "v1", Resource: "secrets"}, metav1.NamespaceDefault, createdTokenSecret()), + core.NewUpdateAction(schema.GroupVersionResource{Version: "v1", Resource: "serviceaccounts"}, metav1.NamespaceDefault, serviceAccount(addTokenSecretReference(regularSecretReferences()))), }, }, "updated serviceaccount with token secrets": { @@ -371,7 +372,7 @@ func TestTokenCreation(t *testing.T) { UpdatedServiceAccount: serviceAccount(emptySecretReferences()), ExpectedActions: []core.Action{ - core.NewGetAction(schema.GroupVersionResource{Version: "v1", Resource: "serviceaccounts"}, v1.NamespaceDefault, "default"), + core.NewGetAction(schema.GroupVersionResource{Version: "v1", Resource: "serviceaccounts"}, metav1.NamespaceDefault, "default"), }, }, @@ -395,7 +396,7 @@ func TestTokenCreation(t *testing.T) { DeletedServiceAccount: serviceAccount(tokenSecretReferences()), ExpectedActions: []core.Action{ - core.NewDeleteAction(schema.GroupVersionResource{Version: "v1", Resource: "secrets"}, v1.NamespaceDefault, "token-secret-1"), + core.NewDeleteAction(schema.GroupVersionResource{Version: "v1", Resource: "secrets"}, metav1.NamespaceDefault, "token-secret-1"), }, }, @@ -404,8 +405,8 @@ func TestTokenCreation(t *testing.T) { AddedSecret: serviceAccountTokenSecret(), ExpectedActions: []core.Action{ - core.NewGetAction(schema.GroupVersionResource{Version: "v1", Resource: "serviceaccounts"}, v1.NamespaceDefault, "default"), - core.NewDeleteAction(schema.GroupVersionResource{Version: "v1", Resource: "secrets"}, v1.NamespaceDefault, "token-secret-1"), + core.NewGetAction(schema.GroupVersionResource{Version: "v1", Resource: "serviceaccounts"}, metav1.NamespaceDefault, "default"), + core.NewDeleteAction(schema.GroupVersionResource{Version: "v1", Resource: "secrets"}, metav1.NamespaceDefault, "token-secret-1"), }, }, "added secret with serviceaccount": { @@ -420,8 +421,8 @@ func TestTokenCreation(t *testing.T) { AddedSecret: serviceAccountTokenSecretWithoutTokenData(), ExpectedActions: []core.Action{ - core.NewGetAction(schema.GroupVersionResource{Version: "v1", Resource: "secrets"}, v1.NamespaceDefault, "token-secret-1"), - core.NewUpdateAction(schema.GroupVersionResource{Version: "v1", Resource: "secrets"}, v1.NamespaceDefault, serviceAccountTokenSecret()), + core.NewGetAction(schema.GroupVersionResource{Version: "v1", Resource: "secrets"}, metav1.NamespaceDefault, "token-secret-1"), + core.NewUpdateAction(schema.GroupVersionResource{Version: "v1", Resource: "secrets"}, metav1.NamespaceDefault, serviceAccountTokenSecret()), }, }, "added token secret without ca data": { @@ -430,8 +431,8 @@ func TestTokenCreation(t *testing.T) { AddedSecret: serviceAccountTokenSecretWithoutCAData(), ExpectedActions: []core.Action{ - core.NewGetAction(schema.GroupVersionResource{Version: "v1", Resource: "secrets"}, v1.NamespaceDefault, "token-secret-1"), - core.NewUpdateAction(schema.GroupVersionResource{Version: "v1", Resource: "secrets"}, v1.NamespaceDefault, serviceAccountTokenSecret()), + core.NewGetAction(schema.GroupVersionResource{Version: "v1", Resource: "secrets"}, metav1.NamespaceDefault, "token-secret-1"), + core.NewUpdateAction(schema.GroupVersionResource{Version: "v1", Resource: "secrets"}, metav1.NamespaceDefault, serviceAccountTokenSecret()), }, }, "added token secret with mismatched ca data": { @@ -440,8 +441,8 @@ func TestTokenCreation(t *testing.T) { AddedSecret: serviceAccountTokenSecretWithCAData([]byte("mismatched")), ExpectedActions: []core.Action{ - core.NewGetAction(schema.GroupVersionResource{Version: "v1", Resource: "secrets"}, v1.NamespaceDefault, "token-secret-1"), - core.NewUpdateAction(schema.GroupVersionResource{Version: "v1", Resource: "secrets"}, v1.NamespaceDefault, serviceAccountTokenSecret()), + core.NewGetAction(schema.GroupVersionResource{Version: "v1", Resource: "secrets"}, metav1.NamespaceDefault, "token-secret-1"), + core.NewUpdateAction(schema.GroupVersionResource{Version: "v1", Resource: "secrets"}, metav1.NamespaceDefault, serviceAccountTokenSecret()), }, }, "added token secret without namespace data": { @@ -450,8 +451,8 @@ func TestTokenCreation(t *testing.T) { AddedSecret: serviceAccountTokenSecretWithoutNamespaceData(), ExpectedActions: []core.Action{ - core.NewGetAction(schema.GroupVersionResource{Version: "v1", Resource: "secrets"}, v1.NamespaceDefault, "token-secret-1"), - core.NewUpdateAction(schema.GroupVersionResource{Version: "v1", Resource: "secrets"}, v1.NamespaceDefault, serviceAccountTokenSecret()), + core.NewGetAction(schema.GroupVersionResource{Version: "v1", Resource: "secrets"}, metav1.NamespaceDefault, "token-secret-1"), + core.NewUpdateAction(schema.GroupVersionResource{Version: "v1", Resource: "secrets"}, metav1.NamespaceDefault, serviceAccountTokenSecret()), }, }, "added token secret with custom namespace data": { @@ -469,8 +470,8 @@ func TestTokenCreation(t *testing.T) { UpdatedSecret: serviceAccountTokenSecret(), ExpectedActions: []core.Action{ - core.NewGetAction(schema.GroupVersionResource{Version: "v1", Resource: "serviceaccounts"}, v1.NamespaceDefault, "default"), - core.NewDeleteAction(schema.GroupVersionResource{Version: "v1", Resource: "secrets"}, v1.NamespaceDefault, "token-secret-1"), + core.NewGetAction(schema.GroupVersionResource{Version: "v1", Resource: "serviceaccounts"}, metav1.NamespaceDefault, "default"), + core.NewDeleteAction(schema.GroupVersionResource{Version: "v1", Resource: "secrets"}, metav1.NamespaceDefault, "token-secret-1"), }, }, "updated secret with serviceaccount": { @@ -485,8 +486,8 @@ func TestTokenCreation(t *testing.T) { UpdatedSecret: serviceAccountTokenSecretWithoutTokenData(), ExpectedActions: []core.Action{ - core.NewGetAction(schema.GroupVersionResource{Version: "v1", Resource: "secrets"}, v1.NamespaceDefault, "token-secret-1"), - core.NewUpdateAction(schema.GroupVersionResource{Version: "v1", Resource: "secrets"}, v1.NamespaceDefault, serviceAccountTokenSecret()), + core.NewGetAction(schema.GroupVersionResource{Version: "v1", Resource: "secrets"}, metav1.NamespaceDefault, "token-secret-1"), + core.NewUpdateAction(schema.GroupVersionResource{Version: "v1", Resource: "secrets"}, metav1.NamespaceDefault, serviceAccountTokenSecret()), }, }, "updated token secret without ca data": { @@ -495,8 +496,8 @@ func TestTokenCreation(t *testing.T) { UpdatedSecret: serviceAccountTokenSecretWithoutCAData(), ExpectedActions: []core.Action{ - core.NewGetAction(schema.GroupVersionResource{Version: "v1", Resource: "secrets"}, v1.NamespaceDefault, "token-secret-1"), - core.NewUpdateAction(schema.GroupVersionResource{Version: "v1", Resource: "secrets"}, v1.NamespaceDefault, serviceAccountTokenSecret()), + core.NewGetAction(schema.GroupVersionResource{Version: "v1", Resource: "secrets"}, metav1.NamespaceDefault, "token-secret-1"), + core.NewUpdateAction(schema.GroupVersionResource{Version: "v1", Resource: "secrets"}, metav1.NamespaceDefault, serviceAccountTokenSecret()), }, }, "updated token secret with mismatched ca data": { @@ -505,8 +506,8 @@ func TestTokenCreation(t *testing.T) { UpdatedSecret: serviceAccountTokenSecretWithCAData([]byte("mismatched")), ExpectedActions: []core.Action{ - core.NewGetAction(schema.GroupVersionResource{Version: "v1", Resource: "secrets"}, v1.NamespaceDefault, "token-secret-1"), - core.NewUpdateAction(schema.GroupVersionResource{Version: "v1", Resource: "secrets"}, v1.NamespaceDefault, serviceAccountTokenSecret()), + core.NewGetAction(schema.GroupVersionResource{Version: "v1", Resource: "secrets"}, metav1.NamespaceDefault, "token-secret-1"), + core.NewUpdateAction(schema.GroupVersionResource{Version: "v1", Resource: "secrets"}, metav1.NamespaceDefault, serviceAccountTokenSecret()), }, }, "updated token secret without namespace data": { @@ -515,8 +516,8 @@ func TestTokenCreation(t *testing.T) { UpdatedSecret: serviceAccountTokenSecretWithoutNamespaceData(), ExpectedActions: []core.Action{ - core.NewGetAction(schema.GroupVersionResource{Version: "v1", Resource: "secrets"}, v1.NamespaceDefault, "token-secret-1"), - core.NewUpdateAction(schema.GroupVersionResource{Version: "v1", Resource: "secrets"}, v1.NamespaceDefault, serviceAccountTokenSecret()), + core.NewGetAction(schema.GroupVersionResource{Version: "v1", Resource: "secrets"}, metav1.NamespaceDefault, "token-secret-1"), + core.NewUpdateAction(schema.GroupVersionResource{Version: "v1", Resource: "secrets"}, metav1.NamespaceDefault, serviceAccountTokenSecret()), }, }, "updated token secret with custom namespace data": { @@ -539,8 +540,8 @@ func TestTokenCreation(t *testing.T) { DeletedSecret: serviceAccountTokenSecret(), ExpectedActions: []core.Action{ - core.NewGetAction(schema.GroupVersionResource{Version: "v1", Resource: "serviceaccounts"}, v1.NamespaceDefault, "default"), - core.NewUpdateAction(schema.GroupVersionResource{Version: "v1", Resource: "serviceaccounts"}, v1.NamespaceDefault, serviceAccount(emptySecretReferences())), + core.NewGetAction(schema.GroupVersionResource{Version: "v1", Resource: "serviceaccounts"}, metav1.NamespaceDefault, "default"), + core.NewUpdateAction(schema.GroupVersionResource{Version: "v1", Resource: "serviceaccounts"}, metav1.NamespaceDefault, serviceAccount(emptySecretReferences())), }, }, "deleted secret with serviceaccount without reference": { @@ -548,7 +549,7 @@ func TestTokenCreation(t *testing.T) { DeletedSecret: serviceAccountTokenSecret(), ExpectedActions: []core.Action{ - core.NewGetAction(schema.GroupVersionResource{Version: "v1", Resource: "serviceaccounts"}, v1.NamespaceDefault, "default"), + core.NewGetAction(schema.GroupVersionResource{Version: "v1", Resource: "serviceaccounts"}, metav1.NamespaceDefault, "default"), }, }, } diff --git a/vendor/k8s.io/kubernetes/pkg/controller/petset/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/statefulset/BUILD similarity index 87% rename from vendor/k8s.io/kubernetes/pkg/controller/petset/BUILD rename to vendor/k8s.io/kubernetes/pkg/controller/statefulset/BUILD index 52ba89e5..616dae91 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/petset/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/statefulset/BUILD @@ -14,9 +14,9 @@ go_library( "fakes.go", "identity_mappers.go", "iterator.go", - "pet.go", - "pet_set.go", - "pet_set_utils.go", + "stateful_set.go", + "stateful_set_utils.go", + "statefulpod.go", ], tags = ["automanaged"], deps = [ @@ -28,6 +28,7 @@ go_library( "//pkg/client/clientset_generated/clientset:go_default_library", "//pkg/client/clientset_generated/clientset/typed/apps/v1beta1:go_default_library", "//pkg/client/clientset_generated/clientset/typed/core/v1:go_default_library", + "//pkg/client/legacylisters:go_default_library", "//pkg/client/record:go_default_library", "//pkg/controller:go_default_library", "//pkg/util/workqueue:go_default_library", @@ -50,8 +51,8 @@ go_test( srcs = [ "identity_mappers_test.go", "iterator_test.go", - "pet_set_test.go", - "pet_test.go", + "stateful_set_test.go", + "statefulpod_test.go", ], library = ":go_default_library", tags = ["automanaged"], @@ -66,13 +67,15 @@ go_test( "//pkg/client/clientset_generated/clientset/fake:go_default_library", "//pkg/client/clientset_generated/clientset/typed/apps/v1beta1:go_default_library", "//pkg/client/clientset_generated/clientset/typed/apps/v1beta1/fake:go_default_library", - "//pkg/client/restclient:go_default_library", + "//pkg/client/legacylisters:go_default_library", "//pkg/client/testing/core:go_default_library", "//pkg/controller:go_default_library", - "//pkg/util/testing:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/errors", "//vendor:k8s.io/apimachinery/pkg/util/sets", + "//vendor:k8s.io/client-go/rest", + "//vendor:k8s.io/client-go/util/testing", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/petset/OWNERS b/vendor/k8s.io/kubernetes/pkg/controller/statefulset/OWNERS similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/controller/petset/OWNERS rename to vendor/k8s.io/kubernetes/pkg/controller/statefulset/OWNERS diff --git a/vendor/k8s.io/kubernetes/pkg/controller/petset/fakes.go b/vendor/k8s.io/kubernetes/pkg/controller/statefulset/fakes.go similarity index 98% rename from vendor/k8s.io/kubernetes/pkg/controller/petset/fakes.go rename to vendor/k8s.io/kubernetes/pkg/controller/statefulset/fakes.go index 838de43b..6f138654 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/petset/fakes.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/statefulset/fakes.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package petset +package statefulset import ( "fmt" @@ -38,7 +38,7 @@ func dec(i int64, exponent int) *inf.Dec { func newPVC(name string) v1.PersistentVolumeClaim { return v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Spec: v1.PersistentVolumeClaimSpec{ @@ -75,9 +75,9 @@ func newStatefulSetWithVolumes(replicas int, name string, petMounts []v1.VolumeM Kind: "StatefulSet", APIVersion: "apps/v1beta1", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, - Namespace: v1.NamespaceDefault, + Namespace: metav1.NamespaceDefault, UID: types.UID("test"), }, Spec: apps.StatefulSetSpec{ diff --git a/vendor/k8s.io/kubernetes/pkg/controller/petset/identity_mappers.go b/vendor/k8s.io/kubernetes/pkg/controller/statefulset/identity_mappers.go similarity index 99% rename from vendor/k8s.io/kubernetes/pkg/controller/petset/identity_mappers.go rename to vendor/k8s.io/kubernetes/pkg/controller/statefulset/identity_mappers.go index 39147770..0c8decb1 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/petset/identity_mappers.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/statefulset/identity_mappers.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package petset +package statefulset import ( "crypto/md5" diff --git a/vendor/k8s.io/kubernetes/pkg/controller/petset/identity_mappers_test.go b/vendor/k8s.io/kubernetes/pkg/controller/statefulset/identity_mappers_test.go similarity index 99% rename from vendor/k8s.io/kubernetes/pkg/controller/petset/identity_mappers_test.go rename to vendor/k8s.io/kubernetes/pkg/controller/statefulset/identity_mappers_test.go index db0f9605..3eb49c87 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/petset/identity_mappers_test.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/statefulset/identity_mappers_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package petset +package statefulset import ( "fmt" diff --git a/vendor/k8s.io/kubernetes/pkg/controller/petset/iterator.go b/vendor/k8s.io/kubernetes/pkg/controller/statefulset/iterator.go similarity index 99% rename from vendor/k8s.io/kubernetes/pkg/controller/petset/iterator.go rename to vendor/k8s.io/kubernetes/pkg/controller/statefulset/iterator.go index 1acecf0b..fc29e920 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/petset/iterator.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/statefulset/iterator.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package petset +package statefulset import ( "fmt" diff --git a/vendor/k8s.io/kubernetes/pkg/controller/petset/iterator_test.go b/vendor/k8s.io/kubernetes/pkg/controller/statefulset/iterator_test.go similarity index 99% rename from vendor/k8s.io/kubernetes/pkg/controller/petset/iterator_test.go rename to vendor/k8s.io/kubernetes/pkg/controller/statefulset/iterator_test.go index e59d5e6a..92e44cb5 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/petset/iterator_test.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/statefulset/iterator_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package petset +package statefulset import ( "fmt" diff --git a/vendor/k8s.io/kubernetes/pkg/controller/petset/pet_set.go b/vendor/k8s.io/kubernetes/pkg/controller/statefulset/stateful_set.go similarity index 96% rename from vendor/k8s.io/kubernetes/pkg/controller/petset/pet_set.go rename to vendor/k8s.io/kubernetes/pkg/controller/statefulset/stateful_set.go index 36b98dc9..8081a74f 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/petset/pet_set.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/statefulset/stateful_set.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package petset +package statefulset import ( "fmt" @@ -28,6 +28,7 @@ import ( "k8s.io/kubernetes/pkg/client/cache" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" v1core "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1" + "k8s.io/kubernetes/pkg/client/legacylisters" "k8s.io/kubernetes/pkg/client/record" "k8s.io/apimachinery/pkg/runtime" @@ -59,7 +60,7 @@ type StatefulSetController struct { newSyncer func(*pcb) *petSyncer // podStore is a cache of watched pods. - podStore cache.StoreToPodLister + podStore listers.StoreToPodLister // podStoreSynced returns true if the pod store has synced at least once. podStoreSynced func() bool @@ -67,7 +68,7 @@ type StatefulSetController struct { podController cache.Controller // A store of StatefulSets, populated by the psController. - psStore cache.StoreToStatefulSetLister + psStore listers.StoreToStatefulSetLister // Watches changes to all StatefulSets. psController cache.Controller @@ -112,11 +113,11 @@ func NewStatefulSetController(podInformer cache.SharedIndexInformer, kubeClient psc.psStore.Store, psc.psController = cache.NewInformer( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - return psc.kubeClient.Apps().StatefulSets(v1.NamespaceAll).List(options) + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + return psc.kubeClient.Apps().StatefulSets(metav1.NamespaceAll).List(options) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - return psc.kubeClient.Apps().StatefulSets(v1.NamespaceAll).Watch(options) + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + return psc.kubeClient.Apps().StatefulSets(metav1.NamespaceAll).Watch(options) }, }, &apps.StatefulSet{}, diff --git a/vendor/k8s.io/kubernetes/pkg/controller/petset/pet_set_test.go b/vendor/k8s.io/kubernetes/pkg/controller/statefulset/stateful_set_test.go similarity index 97% rename from vendor/k8s.io/kubernetes/pkg/controller/petset/pet_set_test.go rename to vendor/k8s.io/kubernetes/pkg/controller/statefulset/stateful_set_test.go index 1bca5811..c159ef2b 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/petset/pet_set_test.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/statefulset/stateful_set_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package petset +package statefulset import ( "fmt" @@ -29,6 +29,7 @@ import ( fakeinternal "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1/fake" + "k8s.io/kubernetes/pkg/client/legacylisters" "k8s.io/kubernetes/pkg/controller" ) @@ -38,8 +39,8 @@ func newFakeStatefulSetController() (*StatefulSetController, *fakePetClient) { kubeClient: nil, blockingPetStore: newUnHealthyPetTracker(fpc), podStoreSynced: func() bool { return true }, - psStore: cache.StoreToStatefulSetLister{Store: cache.NewStore(controller.KeyFunc)}, - podStore: cache.StoreToPodLister{Indexer: cache.NewIndexer(controller.KeyFunc, cache.Indexers{})}, + psStore: listers.StoreToStatefulSetLister{Store: cache.NewStore(controller.KeyFunc)}, + podStore: listers.StoreToPodLister{Indexer: cache.NewIndexer(controller.KeyFunc, cache.Indexers{})}, newSyncer: func(blockingPet *pcb) *petSyncer { return &petSyncer{fpc, blockingPet} }, diff --git a/vendor/k8s.io/kubernetes/pkg/controller/petset/pet_set_utils.go b/vendor/k8s.io/kubernetes/pkg/controller/statefulset/stateful_set_utils.go similarity index 99% rename from vendor/k8s.io/kubernetes/pkg/controller/petset/pet_set_utils.go rename to vendor/k8s.io/kubernetes/pkg/controller/statefulset/stateful_set_utils.go index 489010b5..1f3c5714 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/petset/pet_set_utils.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/statefulset/stateful_set_utils.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package petset +package statefulset import ( "fmt" diff --git a/vendor/k8s.io/kubernetes/pkg/controller/petset/pet.go b/vendor/k8s.io/kubernetes/pkg/controller/statefulset/statefulpod.go similarity index 95% rename from vendor/k8s.io/kubernetes/pkg/controller/petset/pet.go rename to vendor/k8s.io/kubernetes/pkg/controller/statefulset/statefulpod.go index 64c7ee3d..bb2ea101 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/petset/pet.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/statefulset/statefulpod.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package petset +package statefulset import ( "fmt" @@ -114,12 +114,12 @@ func (p *petSyncer) Sync(pet *pcb) error { } } else if exists { if !p.isHealthy(realPet.pod) { - glog.V(4).Infof("StatefulSet %v waiting on unhealthy pet %v", pet.parent.Name, realPet.pod.Name) + glog.V(4).Infof("StatefulSet %v waiting on unhealthy pod %v", pet.parent.Name, realPet.pod.Name) } return p.Update(realPet, pet) } if p.blockingPet != nil { - message := errUnhealthyPet(fmt.Sprintf("Create of %v in StatefulSet %v blocked by unhealthy pet %v", pet.pod.Name, pet.parent.Name, p.blockingPet.pod.Name)) + message := errUnhealthyPet(fmt.Sprintf("Create of %v in StatefulSet %v blocked by unhealthy pod %v", pet.pod.Name, pet.parent.Name, p.blockingPet.pod.Name)) glog.V(4).Infof(message.Error()) return message } @@ -150,17 +150,17 @@ func (p *petSyncer) Delete(pet *pcb) error { return nil } if p.blockingPet != nil { - glog.V(4).Infof("Delete of %v in StatefulSet %v blocked by unhealthy pet %v", realPet.pod.Name, pet.parent.Name, p.blockingPet.pod.Name) + glog.V(4).Infof("Delete of %v in StatefulSet %v blocked by unhealthy pod %v", realPet.pod.Name, pet.parent.Name, p.blockingPet.pod.Name) return nil } // This is counted as a delete, even if it fails. // The returned error will force a requeue. p.blockingPet = realPet if !p.isDying(realPet.pod) { - glog.V(2).Infof("StatefulSet %v deleting pet %v/%v", pet.parent.Name, pet.pod.Namespace, pet.pod.Name) + glog.V(2).Infof("StatefulSet %v deleting pod %v/%v", pet.parent.Name, pet.pod.Namespace, pet.pod.Name) return p.petClient.Delete(pet) } - glog.V(4).Infof("StatefulSet %v waiting on pet %v to die in %v", pet.parent.Name, realPet.pod.Name, realPet.pod.DeletionTimestamp) + glog.V(4).Infof("StatefulSet %v waiting on pod %v to die in %v", pet.parent.Name, realPet.pod.Name, realPet.pod.DeletionTimestamp) return nil } @@ -202,14 +202,14 @@ func (p *apiServerPetClient) Delete(pet *pcb) error { if errors.IsNotFound(err) { err = nil } - p.event(pet.parent, "Delete", fmt.Sprintf("pet: %v", pet.pod.Name), err) + p.event(pet.parent, "Delete", fmt.Sprintf("pod: %v", pet.pod.Name), err) return err } // Create creates the pet in the pcb. func (p *apiServerPetClient) Create(pet *pcb) error { _, err := p.c.Core().Pods(pet.parent.Namespace).Create(pet.pod) - p.event(pet.parent, "Create", fmt.Sprintf("pet: %v", pet.pod.Name), err) + p.event(pet.parent, "Create", fmt.Sprintf("pod: %v", pet.pod.Name), err) return err } @@ -224,7 +224,7 @@ func (p *apiServerPetClient) Update(pet *pcb, expectedPet *pcb) (updateErr error if err != nil || !needsUpdate { return err } - glog.V(4).Infof("Resetting pet %v/%v to match StatefulSet %v spec", pet.pod.Namespace, pet.pod.Name, pet.parent.Name) + glog.V(4).Infof("Resetting pod %v/%v to match StatefulSet %v spec", pet.pod.Namespace, pet.pod.Name, pet.parent.Name) _, updateErr = pc.Update(&updatePod) if updateErr == nil || i >= updateRetries { return updateErr diff --git a/vendor/k8s.io/kubernetes/pkg/controller/petset/pet_test.go b/vendor/k8s.io/kubernetes/pkg/controller/statefulset/statefulpod_test.go similarity index 95% rename from vendor/k8s.io/kubernetes/pkg/controller/petset/pet_test.go rename to vendor/k8s.io/kubernetes/pkg/controller/statefulset/statefulpod_test.go index f9e6c405..093e99b9 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/petset/pet_test.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/statefulset/statefulpod_test.go @@ -14,22 +14,23 @@ See the License for the specific language governing permissions and limitations under the License. */ -package petset +package statefulset import ( "fmt" "net/http/httptest" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" + restclient "k8s.io/client-go/rest" + utiltesting "k8s.io/client-go/util/testing" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/testing/core" - utiltesting "k8s.io/kubernetes/pkg/util/testing" ) func newPetClient(client *clientset.Clientset) *apiServerPetClient { @@ -88,7 +89,7 @@ func TestUpdatePetWithoutRetry(t *testing.T) { } for k, tc := range testCases { - body := runtime.EncodeOrDie(testapi.Default.Codec(), &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "empty_pod"}}) + body := runtime.EncodeOrDie(testapi.Default.Codec(), &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "empty_pod"}}) fakeHandler := utiltesting.FakeHandler{ StatusCode: 200, ResponseBody: string(body), diff --git a/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/attach_detach_controller.go b/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/attach_detach_controller.go index a679f34d..af7d65a9 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/attach_detach_controller.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/attach_detach_controller.go @@ -620,3 +620,9 @@ func (adc *attachDetachController) GetHostIP() (net.IP, error) { func (adc *attachDetachController) GetNodeAllocatable() (v1.ResourceList, error) { return v1.ResourceList{}, nil } + +func (adc *attachDetachController) GetSecretFunc() func(namespace, name string) (*v1.Secret, error) { + return func(_, _ string) (*v1.Secret, error) { + return nil, fmt.Errorf("GetSecret unsupported in attachDetachController") + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/statusupdater/node_status_updater.go b/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/statusupdater/node_status_updater.go index dec35a30..48de957b 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/statusupdater/node_status_updater.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/statusupdater/node_status_updater.go @@ -111,10 +111,10 @@ func (nsu *nodeStatusUpdater) UpdateNodeStatuses() error { } patchBytes, err := - strategicpatch.CreateStrategicMergePatch(oldData, newData, node) + strategicpatch.CreateTwoWayMergePatch(oldData, newData, node) if err != nil { return fmt.Errorf( - "failed to CreateStrategicMergePatch for node %q. %v", + "failed to CreateTwoWayMergePatch for node %q. %v", nodeName, err) } diff --git a/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/testing/BUILD b/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/testing/BUILD index d2203616..b4a299c0 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/testing/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/testing/BUILD @@ -16,6 +16,7 @@ go_library( "//pkg/client/clientset_generated/clientset/fake:go_default_library", "//pkg/client/testing/core:go_default_library", "//pkg/volume:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", diff --git a/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/testing/testvolumespec.go b/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/testing/testvolumespec.go index aa6b2254..fe446d1c 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/testing/testvolumespec.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/volume/attachdetach/testing/testvolumespec.go @@ -19,6 +19,7 @@ package testing import ( "fmt" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/watch" @@ -57,7 +58,7 @@ func CreateTestClient() *fake.Clientset { Status: v1.PodStatus{ Phase: v1.PodRunning, }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, Namespace: namespace, Labels: map[string]string{ @@ -106,7 +107,7 @@ func CreateTestClient() *fake.Clientset { // NewPod returns a test pod object func NewPod(uid, name string) *v1.Pod { return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: types.UID(uid), Name: name, Namespace: name, diff --git a/vendor/k8s.io/kubernetes/pkg/controller/volume/persistentvolume/framework_test.go b/vendor/k8s.io/kubernetes/pkg/controller/volume/persistentvolume/framework_test.go index 98de0f28..8a81b662 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/volume/persistentvolume/framework_test.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/volume/persistentvolume/framework_test.go @@ -616,7 +616,7 @@ func newTestController(kubeClient clientset.Interface, volumeSource, claimSource // newVolume returns a new volume with given attributes func newVolume(name, capacity, boundToClaimUID, boundToClaimName string, phase v1.PersistentVolumePhase, reclaimPolicy v1.PersistentVolumeReclaimPolicy, annotations ...string) *v1.PersistentVolume { volume := v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, ResourceVersion: "1", }, @@ -722,7 +722,7 @@ func newVolumeArray(name, capacity, boundToClaimUID, boundToClaimName string, ph // newClaim returns a new claim with given attributes func newClaim(name, claimUID, capacity, boundToVolume string, phase v1.PersistentVolumeClaimPhase, annotations ...string) *v1.PersistentVolumeClaim { claim := v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: testNamespace, UID: types.UID(claimUID), @@ -1167,7 +1167,7 @@ func (plugin *mockVolumePlugin) Provision() (*v1.PersistentVolume, error) { capacity := plugin.provisionOptions.PVC.Spec.Resources.Requests[v1.ResourceName(v1.ResourceStorage)] accessModes := plugin.provisionOptions.PVC.Spec.AccessModes pv = &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: plugin.provisionOptions.PVName, }, Spec: v1.PersistentVolumeSpec{ diff --git a/vendor/k8s.io/kubernetes/pkg/controller/volume/persistentvolume/index.go b/vendor/k8s.io/kubernetes/pkg/controller/volume/persistentvolume/index.go index 61e631b8..8a45dd29 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/volume/persistentvolume/index.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/volume/persistentvolume/index.go @@ -134,7 +134,7 @@ func (pvIndex *persistentVolumeOrderedIndex) findByClaim(claim *v1.PersistentVol // with existing PVs, findByClaim must find only PVs that are // pre-bound to the claim (by dynamic provisioning). TODO: remove in // 1.5 - if v1.HasAnnotation(claim.ObjectMeta, storageutil.AlphaStorageClassAnnotation) { + if metav1.HasAnnotation(claim.ObjectMeta, storageutil.AlphaStorageClassAnnotation) { continue } diff --git a/vendor/k8s.io/kubernetes/pkg/controller/volume/persistentvolume/index_test.go b/vendor/k8s.io/kubernetes/pkg/controller/volume/persistentvolume/index_test.go index c496d8d0..08916876 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/volume/persistentvolume/index_test.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/volume/persistentvolume/index_test.go @@ -40,7 +40,7 @@ func TestMatchVolume(t *testing.T) { "successful-match-gce-10": { expectedMatch: "gce-pd-10", claim: &v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "claim01", Namespace: "myns", }, @@ -57,7 +57,7 @@ func TestMatchVolume(t *testing.T) { "successful-match-nfs-5": { expectedMatch: "nfs-5", claim: &v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "claim01", Namespace: "myns", }, @@ -74,7 +74,7 @@ func TestMatchVolume(t *testing.T) { "successful-skip-1g-bound-volume": { expectedMatch: "gce-pd-5", claim: &v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "claim01", Namespace: "myns", }, @@ -91,7 +91,7 @@ func TestMatchVolume(t *testing.T) { "successful-no-match": { expectedMatch: "", claim: &v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "claim01", Namespace: "myns", }, @@ -108,7 +108,7 @@ func TestMatchVolume(t *testing.T) { "successful-no-match-due-to-label": { expectedMatch: "", claim: &v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "claim01", Namespace: "myns", }, @@ -130,7 +130,7 @@ func TestMatchVolume(t *testing.T) { "successful-no-match-due-to-size-constraint-with-label-selector": { expectedMatch: "", claim: &v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "claim01", Namespace: "myns", }, @@ -152,7 +152,7 @@ func TestMatchVolume(t *testing.T) { "successful-match-due-with-constraint-and-label-selector": { expectedMatch: "gce-pd-2", claim: &v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "claim01", Namespace: "myns", }, @@ -174,7 +174,7 @@ func TestMatchVolume(t *testing.T) { "successful-match-with-class": { expectedMatch: "gce-pd-silver1", claim: &v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "claim01", Namespace: "myns", Annotations: map[string]string{ @@ -199,7 +199,7 @@ func TestMatchVolume(t *testing.T) { "successful-match-with-class-and-labels": { expectedMatch: "gce-pd-silver2", claim: &v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "claim01", Namespace: "myns", Annotations: map[string]string{ @@ -239,7 +239,7 @@ func TestMatchingWithBoundVolumes(t *testing.T) { volumeIndex := newPersistentVolumeOrderedIndex() // two similar volumes, one is bound pv1 := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "gce-pd-1", Name: "gce001", }, @@ -257,7 +257,7 @@ func TestMatchingWithBoundVolumes(t *testing.T) { } pv2 := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "gce-pd-2", Name: "gce002", }, @@ -276,7 +276,7 @@ func TestMatchingWithBoundVolumes(t *testing.T) { volumeIndex.store.Add(pv2) claim := &v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "claim01", Namespace: "myns", }, @@ -362,7 +362,7 @@ func TestAllPossibleAccessModes(t *testing.T) { func TestFindingVolumeWithDifferentAccessModes(t *testing.T) { gce := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{UID: "001", Name: "gce"}, + ObjectMeta: metav1.ObjectMeta{UID: "001", Name: "gce"}, Spec: v1.PersistentVolumeSpec{ Capacity: v1.ResourceList{v1.ResourceName(v1.ResourceStorage): resource.MustParse("10G")}, PersistentVolumeSource: v1.PersistentVolumeSource{GCEPersistentDisk: &v1.GCEPersistentDiskVolumeSource{}}, @@ -374,7 +374,7 @@ func TestFindingVolumeWithDifferentAccessModes(t *testing.T) { } ebs := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{UID: "002", Name: "ebs"}, + ObjectMeta: metav1.ObjectMeta{UID: "002", Name: "ebs"}, Spec: v1.PersistentVolumeSpec{ Capacity: v1.ResourceList{v1.ResourceName(v1.ResourceStorage): resource.MustParse("10G")}, PersistentVolumeSource: v1.PersistentVolumeSource{AWSElasticBlockStore: &v1.AWSElasticBlockStoreVolumeSource{}}, @@ -385,7 +385,7 @@ func TestFindingVolumeWithDifferentAccessModes(t *testing.T) { } nfs := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{UID: "003", Name: "nfs"}, + ObjectMeta: metav1.ObjectMeta{UID: "003", Name: "nfs"}, Spec: v1.PersistentVolumeSpec{ Capacity: v1.ResourceList{v1.ResourceName(v1.ResourceStorage): resource.MustParse("10G")}, PersistentVolumeSource: v1.PersistentVolumeSource{NFS: &v1.NFSVolumeSource{}}, @@ -398,7 +398,7 @@ func TestFindingVolumeWithDifferentAccessModes(t *testing.T) { } claim := &v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "claim01", Namespace: "myns", }, @@ -467,7 +467,7 @@ func createTestVolumes() []*v1.PersistentVolume { // these volumes are deliberately out-of-order to test indexing and sorting return []*v1.PersistentVolume{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "gce-pd-10", Name: "gce003", }, @@ -485,7 +485,7 @@ func createTestVolumes() []*v1.PersistentVolume { }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "gce-pd-20", Name: "gce004", }, @@ -505,7 +505,7 @@ func createTestVolumes() []*v1.PersistentVolume { }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "nfs-5", Name: "nfs002", }, @@ -524,7 +524,7 @@ func createTestVolumes() []*v1.PersistentVolume { }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "gce-pd-1", Name: "gce001", }, @@ -544,7 +544,7 @@ func createTestVolumes() []*v1.PersistentVolume { }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "nfs-10", Name: "nfs003", }, @@ -563,7 +563,7 @@ func createTestVolumes() []*v1.PersistentVolume { }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "gce-pd-5", Name: "gce002", }, @@ -581,7 +581,7 @@ func createTestVolumes() []*v1.PersistentVolume { }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "nfs-1", Name: "nfs001", }, @@ -600,7 +600,7 @@ func createTestVolumes() []*v1.PersistentVolume { }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "gce-pd-2", Name: "gce0022", Labels: map[string]string{ @@ -620,7 +620,7 @@ func createTestVolumes() []*v1.PersistentVolume { }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "gce-pd-silver1", Name: "gce0023", Labels: map[string]string{ @@ -643,7 +643,7 @@ func createTestVolumes() []*v1.PersistentVolume { }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "gce-pd-silver2", Name: "gce0024", Annotations: map[string]string{ @@ -663,7 +663,7 @@ func createTestVolumes() []*v1.PersistentVolume { }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "gce-pd-gold", Name: "gce0025", Annotations: map[string]string{ @@ -687,7 +687,7 @@ func createTestVolumes() []*v1.PersistentVolume { func testVolume(name, size string) *v1.PersistentVolume { return &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Annotations: map[string]string{}, }, @@ -701,7 +701,7 @@ func testVolume(name, size string) *v1.PersistentVolume { func TestFindingPreboundVolumes(t *testing.T) { claim := &v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "claim01", Namespace: "myns", SelfLink: testapi.Default.SelfLink("pvc", ""), diff --git a/vendor/k8s.io/kubernetes/pkg/controller/volume/persistentvolume/provision_test.go b/vendor/k8s.io/kubernetes/pkg/controller/volume/persistentvolume/provision_test.go index ec974639..cc391bba 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/volume/persistentvolume/provision_test.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/volume/persistentvolume/provision_test.go @@ -38,7 +38,7 @@ var storageClasses = []*storage.StorageClass{ Kind: "StorageClass", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "gold", }, @@ -49,7 +49,7 @@ var storageClasses = []*storage.StorageClass{ TypeMeta: metav1.TypeMeta{ Kind: "StorageClass", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "silver", }, Provisioner: mockPluginName, @@ -59,7 +59,7 @@ var storageClasses = []*storage.StorageClass{ TypeMeta: metav1.TypeMeta{ Kind: "StorageClass", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "external", }, Provisioner: "vendor.com/my-volume", @@ -69,7 +69,7 @@ var storageClasses = []*storage.StorageClass{ TypeMeta: metav1.TypeMeta{ Kind: "StorageClass", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "unknown-internal", }, Provisioner: "kubernetes.io/unknown", diff --git a/vendor/k8s.io/kubernetes/pkg/controller/volume/persistentvolume/pv_controller.go b/vendor/k8s.io/kubernetes/pkg/controller/volume/persistentvolume/pv_controller.go index 908f5d9a..c5b529fd 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/volume/persistentvolume/pv_controller.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/volume/persistentvolume/pv_controller.go @@ -218,7 +218,7 @@ type PersistentVolumeController struct { func (ctrl *PersistentVolumeController) syncClaim(claim *v1.PersistentVolumeClaim) error { glog.V(4).Infof("synchronizing PersistentVolumeClaim[%s]: %s", claimToClaimKey(claim), getClaimStatusForLogging(claim)) - if !v1.HasAnnotation(claim.ObjectMeta, annBindCompleted) { + if !metav1.HasAnnotation(claim.ObjectMeta, annBindCompleted) { return ctrl.syncUnboundClaim(claim) } else { return ctrl.syncBoundClaim(claim) @@ -243,7 +243,7 @@ func (ctrl *PersistentVolumeController) syncUnboundClaim(claim *v1.PersistentVol glog.V(4).Infof("synchronizing unbound PersistentVolumeClaim[%s]: no volume found", claimToClaimKey(claim)) // No PV could be found // OBSERVATION: pvc is "Pending", will retry - if storageutil.GetClaimStorageClass(claim) != "" || v1.HasAnnotation(claim.ObjectMeta, storageutil.AlphaStorageClassAnnotation) { + if storageutil.GetClaimStorageClass(claim) != "" || metav1.HasAnnotation(claim.ObjectMeta, storageutil.AlphaStorageClassAnnotation) { if err = ctrl.provisionClaim(claim); err != nil { return err } @@ -315,7 +315,7 @@ func (ctrl *PersistentVolumeController) syncUnboundClaim(claim *v1.PersistentVol } else { // User asked for a PV that is claimed by someone else // OBSERVATION: pvc is "Pending", pv is "Bound" - if !v1.HasAnnotation(claim.ObjectMeta, annBoundByController) { + if !metav1.HasAnnotation(claim.ObjectMeta, annBoundByController) { glog.V(4).Infof("synchronizing unbound PersistentVolumeClaim[%s]: volume already bound to different claim by user, will retry later", claimToClaimKey(claim)) // User asked for a specific PV, retry later if _, err = ctrl.updateClaimStatus(claim, v1.ClaimPending, nil); err != nil { @@ -480,7 +480,7 @@ func (ctrl *PersistentVolumeController) syncVolume(volume *v1.PersistentVolume) } return nil } else if claim.Spec.VolumeName == "" { - if v1.HasAnnotation(volume.ObjectMeta, annBoundByController) { + if metav1.HasAnnotation(volume.ObjectMeta, annBoundByController) { // The binding is not completed; let PVC sync handle it glog.V(4).Infof("synchronizing PersistentVolume[%s]: volume not bound yet, waiting for syncClaim to fix it", volume.Name) } else { @@ -507,7 +507,7 @@ func (ctrl *PersistentVolumeController) syncVolume(volume *v1.PersistentVolume) return nil } else { // Volume is bound to a claim, but the claim is bound elsewhere - if v1.HasAnnotation(volume.ObjectMeta, annDynamicallyProvisioned) && volume.Spec.PersistentVolumeReclaimPolicy == v1.PersistentVolumeReclaimDelete { + if metav1.HasAnnotation(volume.ObjectMeta, annDynamicallyProvisioned) && volume.Spec.PersistentVolumeReclaimPolicy == v1.PersistentVolumeReclaimDelete { // This volume was dynamically provisioned for this claim. The // claim got bound elsewhere, and thus this volume is not // needed. Delete it. @@ -531,7 +531,7 @@ func (ctrl *PersistentVolumeController) syncVolume(volume *v1.PersistentVolume) } else { // Volume is bound to a claim, but the claim is bound elsewhere // and it's not dynamically provisioned. - if v1.HasAnnotation(volume.ObjectMeta, annBoundByController) { + if metav1.HasAnnotation(volume.ObjectMeta, annBoundByController) { // This is part of the normal operation of the controller; the // controller tried to use this volume for a claim but the claim // was fulfilled by another volume. We did this; fix it. @@ -755,8 +755,8 @@ func (ctrl *PersistentVolumeController) bindVolumeToClaim(volume *v1.PersistentV } // Set annBoundByController if it is not set yet - if shouldSetBoundByController && !v1.HasAnnotation(volumeClone.ObjectMeta, annBoundByController) { - v1.SetMetaDataAnnotation(&volumeClone.ObjectMeta, annBoundByController, "yes") + if shouldSetBoundByController && !metav1.HasAnnotation(volumeClone.ObjectMeta, annBoundByController) { + metav1.SetMetaDataAnnotation(&volumeClone.ObjectMeta, annBoundByController, "yes") dirty = true } @@ -812,14 +812,14 @@ func (ctrl *PersistentVolumeController) bindClaimToVolume(claim *v1.PersistentVo } // Set annBoundByController if it is not set yet - if shouldSetBoundByController && !v1.HasAnnotation(claimClone.ObjectMeta, annBoundByController) { - v1.SetMetaDataAnnotation(&claimClone.ObjectMeta, annBoundByController, "yes") + if shouldSetBoundByController && !metav1.HasAnnotation(claimClone.ObjectMeta, annBoundByController) { + metav1.SetMetaDataAnnotation(&claimClone.ObjectMeta, annBoundByController, "yes") dirty = true } // Set annBindCompleted if it is not set yet - if !v1.HasAnnotation(claimClone.ObjectMeta, annBindCompleted) { - v1.SetMetaDataAnnotation(&claimClone.ObjectMeta, annBindCompleted, "yes") + if !metav1.HasAnnotation(claimClone.ObjectMeta, annBindCompleted) { + metav1.SetMetaDataAnnotation(&claimClone.ObjectMeta, annBindCompleted, "yes") dirty = true } @@ -905,7 +905,7 @@ func (ctrl *PersistentVolumeController) unbindVolume(volume *v1.PersistentVolume return fmt.Errorf("Unexpected volume cast error : %v", volumeClone) } - if v1.HasAnnotation(volume.ObjectMeta, annBoundByController) { + if metav1.HasAnnotation(volume.ObjectMeta, annBoundByController) { // The volume was bound by the controller. volumeClone.Spec.ClaimRef = nil delete(volumeClone.Annotations, annBoundByController) @@ -1335,13 +1335,13 @@ func (ctrl *PersistentVolumeController) provisionClaimOperation(claimObj interfa volume.Status.Phase = v1.VolumeBound // Add annBoundByController (used in deleting the volume) - v1.SetMetaDataAnnotation(&volume.ObjectMeta, annBoundByController, "yes") - v1.SetMetaDataAnnotation(&volume.ObjectMeta, annDynamicallyProvisioned, plugin.GetPluginName()) + metav1.SetMetaDataAnnotation(&volume.ObjectMeta, annBoundByController, "yes") + metav1.SetMetaDataAnnotation(&volume.ObjectMeta, annDynamicallyProvisioned, plugin.GetPluginName()) // For Alpha provisioning behavior, do not add storage.BetaStorageClassAnnotations for volumes created // by storage.AlphaStorageClassAnnotation // TODO: remove this check in 1.5, storage.StorageClassAnnotation will be always non-empty there. if claimClass != "" { - v1.SetMetaDataAnnotation(&volume.ObjectMeta, storageutil.StorageClassAnnotation, claimClass) + metav1.SetMetaDataAnnotation(&volume.ObjectMeta, storageutil.StorageClassAnnotation, claimClass) } // Try to create the PV object several times @@ -1445,8 +1445,8 @@ func (ctrl *PersistentVolumeController) newRecyclerEventRecorder(volume *v1.Pers // provisioner is requested. func (ctrl *PersistentVolumeController) findProvisionablePlugin(claim *v1.PersistentVolumeClaim) (vol.ProvisionableVolumePlugin, *storage.StorageClass, error) { // TODO: remove this alpha behavior in 1.5 - alpha := v1.HasAnnotation(claim.ObjectMeta, storageutil.AlphaStorageClassAnnotation) - beta := v1.HasAnnotation(claim.ObjectMeta, storageutil.BetaStorageClassAnnotation) + alpha := metav1.HasAnnotation(claim.ObjectMeta, storageutil.AlphaStorageClassAnnotation) + beta := metav1.HasAnnotation(claim.ObjectMeta, storageutil.BetaStorageClassAnnotation) if alpha && beta { // Both Alpha and Beta annotations are set. Do beta. alpha = false @@ -1498,7 +1498,7 @@ func (ctrl *PersistentVolumeController) findAlphaProvisionablePlugin() (vol.Prov TypeMeta: metav1.TypeMeta{ Kind: "StorageClass", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "", }, Provisioner: ctrl.alphaProvisioner.GetPluginName(), @@ -1512,7 +1512,7 @@ func (ctrl *PersistentVolumeController) findAlphaProvisionablePlugin() (vol.Prov func (ctrl *PersistentVolumeController) findDeletablePlugin(volume *v1.PersistentVolume) (vol.DeletableVolumePlugin, error) { // Find a plugin. Try to find the same plugin that provisioned the volume var plugin vol.DeletableVolumePlugin - if v1.HasAnnotation(volume.ObjectMeta, annDynamicallyProvisioned) { + if metav1.HasAnnotation(volume.ObjectMeta, annDynamicallyProvisioned) { provisionPluginName := volume.Annotations[annDynamicallyProvisioned] if provisionPluginName != "" { plugin, err := ctrl.volumePluginMgr.FindDeletablePluginByName(provisionPluginName) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/volume/persistentvolume/pv_controller_base.go b/vendor/k8s.io/kubernetes/pkg/controller/volume/persistentvolume/pv_controller_base.go index 418ddcf1..cb8f7fcd 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/volume/persistentvolume/pv_controller_base.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/volume/persistentvolume/pv_controller_base.go @@ -23,6 +23,7 @@ import ( "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apimachinery/pkg/watch" @@ -95,10 +96,10 @@ func NewController(p ControllerParameters) *PersistentVolumeController { volumeSource := p.VolumeSource if volumeSource == nil { volumeSource = &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { return p.KubeClient.Core().PersistentVolumes().List(options) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { return p.KubeClient.Core().PersistentVolumes().Watch(options) }, } @@ -108,11 +109,11 @@ func NewController(p ControllerParameters) *PersistentVolumeController { claimSource := p.ClaimSource if claimSource == nil { claimSource = &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - return p.KubeClient.Core().PersistentVolumeClaims(v1.NamespaceAll).List(options) + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + return p.KubeClient.Core().PersistentVolumeClaims(metav1.NamespaceAll).List(options) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - return p.KubeClient.Core().PersistentVolumeClaims(v1.NamespaceAll).Watch(options) + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + return p.KubeClient.Core().PersistentVolumeClaims(metav1.NamespaceAll).Watch(options) }, } } @@ -121,10 +122,10 @@ func NewController(p ControllerParameters) *PersistentVolumeController { classSource := p.ClassSource if classSource == nil { classSource = &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { return p.KubeClient.Storage().StorageClasses().List(options) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { return p.KubeClient.Storage().StorageClasses().Watch(options) }, } @@ -169,7 +170,7 @@ func NewController(p ControllerParameters) *PersistentVolumeController { // order to have the caches already filled when first addClaim/addVolume to // perform initial synchronization of the controller. func (ctrl *PersistentVolumeController) initializeCaches(volumeSource, claimSource cache.ListerWatcher) { - volumeListObj, err := volumeSource.List(v1.ListOptions{}) + volumeListObj, err := volumeSource.List(metav1.ListOptions{}) if err != nil { glog.Errorf("PersistentVolumeController can't initialize caches: %v", err) return @@ -193,7 +194,7 @@ func (ctrl *PersistentVolumeController) initializeCaches(volumeSource, claimSour } } - claimListObj, err := claimSource.List(v1.ListOptions{}) + claimListObj, err := claimSource.List(metav1.ListOptions{}) if err != nil { glog.Errorf("PersistentVolumeController can't initialize caches: %v", err) return @@ -510,7 +511,7 @@ func (ctrl *PersistentVolumeController) setClaimProvisioner(claim *v1.Persistent if !ok { return nil, fmt.Errorf("Unexpected claim cast error : %v", claimClone) } - v1.SetMetaDataAnnotation(&claimClone.ObjectMeta, annStorageProvisioner, class.Provisioner) + metav1.SetMetaDataAnnotation(&claimClone.ObjectMeta, annStorageProvisioner, class.Provisioner) newClaim, err := ctrl.kubeClient.Core().PersistentVolumeClaims(claim.Namespace).Update(claimClone) if err != nil { return newClaim, err @@ -525,14 +526,14 @@ func (ctrl *PersistentVolumeController) setClaimProvisioner(claim *v1.Persistent // Stateless functions func getClaimStatusForLogging(claim *v1.PersistentVolumeClaim) string { - bound := v1.HasAnnotation(claim.ObjectMeta, annBindCompleted) - boundByController := v1.HasAnnotation(claim.ObjectMeta, annBoundByController) + bound := metav1.HasAnnotation(claim.ObjectMeta, annBindCompleted) + boundByController := metav1.HasAnnotation(claim.ObjectMeta, annBoundByController) return fmt.Sprintf("phase: %s, bound to: %q, bindCompleted: %v, boundByController: %v", claim.Status.Phase, claim.Spec.VolumeName, bound, boundByController) } func getVolumeStatusForLogging(volume *v1.PersistentVolume) string { - boundByController := v1.HasAnnotation(volume.ObjectMeta, annBoundByController) + boundByController := metav1.HasAnnotation(volume.ObjectMeta, annBoundByController) claimName := "" if volume.Spec.ClaimRef != nil { claimName = fmt.Sprintf("%s/%s (uid: %s)", volume.Spec.ClaimRef.Namespace, volume.Spec.ClaimRef.Name, volume.Spec.ClaimRef.UID) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/volume/persistentvolume/volume_host.go b/vendor/k8s.io/kubernetes/pkg/controller/volume/persistentvolume/volume_host.go index f00dd23c..c495c002 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/volume/persistentvolume/volume_host.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/volume/persistentvolume/volume_host.go @@ -80,3 +80,9 @@ func (ctrl *PersistentVolumeController) GetHostIP() (net.IP, error) { func (ctrl *PersistentVolumeController) GetNodeAllocatable() (v1.ResourceList, error) { return v1.ResourceList{}, nil } + +func (adc *PersistentVolumeController) GetSecretFunc() func(namespace, name string) (*v1.Secret, error) { + return func(_, _ string) (*v1.Secret, error) { + return nil, fmt.Errorf("GetSecret unsupported in PersistentVolumeController") + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/conversion/.readonly b/vendor/k8s.io/kubernetes/pkg/conversion/.readonly deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/k8s.io/kubernetes/pkg/conversion/BUILD b/vendor/k8s.io/kubernetes/pkg/conversion/BUILD index 55e60f53..9f371d60 100644 --- a/vendor/k8s.io/kubernetes/pkg/conversion/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/conversion/BUILD @@ -5,36 +5,12 @@ licenses(["notice"]) load( "@io_bazel_rules_go//go:def.bzl", "go_library", - "go_test", ) go_library( name = "go_default_library", - srcs = [ - "cloner.go", - "converter.go", - "deep_equal.go", - "doc.go", - "helper.go", - ], + srcs = ["doc.go"], tags = ["automanaged"], - deps = ["//third_party/forked/golang/reflect:go_default_library"], -) - -go_test( - name = "go_default_test", - srcs = [ - "converter_test.go", - "deep_copy_test.go", - "helper_test.go", - ], - library = ":go_default_library", - tags = ["automanaged"], - deps = [ - "//pkg/util/diff:go_default_library", - "//vendor:github.com/google/gofuzz", - "//vendor:github.com/spf13/pflag", - ], ) filegroup( diff --git a/vendor/k8s.io/kubernetes/pkg/conversion/OWNERS b/vendor/k8s.io/kubernetes/pkg/conversion/OWNERS deleted file mode 100644 index ef1a487f..00000000 --- a/vendor/k8s.io/kubernetes/pkg/conversion/OWNERS +++ /dev/null @@ -1,26 +0,0 @@ -approvers: -- derekwaynecarr -- lavalamp -- smarterclayton -- wojtek-t -reviewers: -- thockin -- lavalamp -- smarterclayton -- wojtek-t -- deads2k -- yujuhong -- caesarxuchao -- mikedanese -- liggitt -- pmorie -- sttts -- kargakis -- ncdc -- jbeda -- dims -- krousey -- resouer -- feihujiang -- ghodss -- rhcarvalho diff --git a/vendor/k8s.io/kubernetes/pkg/conversion/cloner.go b/vendor/k8s.io/kubernetes/pkg/conversion/cloner.go deleted file mode 100644 index c5dec1f3..00000000 --- a/vendor/k8s.io/kubernetes/pkg/conversion/cloner.go +++ /dev/null @@ -1,249 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package conversion - -import ( - "fmt" - "reflect" -) - -// Cloner knows how to copy one type to another. -type Cloner struct { - // Map from the type to a function which can do the deep copy. - deepCopyFuncs map[reflect.Type]reflect.Value - generatedDeepCopyFuncs map[reflect.Type]func(in interface{}, out interface{}, c *Cloner) error -} - -// NewCloner creates a new Cloner object. -func NewCloner() *Cloner { - c := &Cloner{ - deepCopyFuncs: map[reflect.Type]reflect.Value{}, - generatedDeepCopyFuncs: map[reflect.Type]func(in interface{}, out interface{}, c *Cloner) error{}, - } - if err := c.RegisterDeepCopyFunc(byteSliceDeepCopy); err != nil { - // If one of the deep-copy functions is malformed, detect it immediately. - panic(err) - } - return c -} - -// Prevent recursing into every byte... -func byteSliceDeepCopy(in *[]byte, out *[]byte, c *Cloner) error { - if *in != nil { - *out = make([]byte, len(*in)) - copy(*out, *in) - } else { - *out = nil - } - return nil -} - -// Verifies whether a deep-copy function has a correct signature. -func verifyDeepCopyFunctionSignature(ft reflect.Type) error { - if ft.Kind() != reflect.Func { - return fmt.Errorf("expected func, got: %v", ft) - } - if ft.NumIn() != 3 { - return fmt.Errorf("expected three 'in' params, got %v", ft) - } - if ft.NumOut() != 1 { - return fmt.Errorf("expected one 'out' param, got %v", ft) - } - if ft.In(0).Kind() != reflect.Ptr { - return fmt.Errorf("expected pointer arg for 'in' param 0, got: %v", ft) - } - if ft.In(1) != ft.In(0) { - return fmt.Errorf("expected 'in' param 0 the same as param 1, got: %v", ft) - } - var forClonerType Cloner - if expected := reflect.TypeOf(&forClonerType); ft.In(2) != expected { - return fmt.Errorf("expected '%v' arg for 'in' param 2, got: '%v'", expected, ft.In(2)) - } - var forErrorType error - // This convolution is necessary, otherwise TypeOf picks up on the fact - // that forErrorType is nil - errorType := reflect.TypeOf(&forErrorType).Elem() - if ft.Out(0) != errorType { - return fmt.Errorf("expected error return, got: %v", ft) - } - return nil -} - -// RegisterGeneratedDeepCopyFunc registers a copying func with the Cloner. -// deepCopyFunc must take three parameters: a type input, a pointer to a -// type output, and a pointer to Cloner. It should return an error. -// -// Example: -// c.RegisterGeneratedDeepCopyFunc( -// func(in Pod, out *Pod, c *Cloner) error { -// // deep copy logic... -// return nil -// }) -func (c *Cloner) RegisterDeepCopyFunc(deepCopyFunc interface{}) error { - fv := reflect.ValueOf(deepCopyFunc) - ft := fv.Type() - if err := verifyDeepCopyFunctionSignature(ft); err != nil { - return err - } - c.deepCopyFuncs[ft.In(0)] = fv - return nil -} - -// GeneratedDeepCopyFunc bundles an untyped generated deep-copy function of a type -// with a reflection type object used as a key to lookup the deep-copy function. -type GeneratedDeepCopyFunc struct { - Fn func(in interface{}, out interface{}, c *Cloner) error - InType reflect.Type -} - -// Similar to RegisterDeepCopyFunc, but registers deep copy function that were -// automatically generated. -func (c *Cloner) RegisterGeneratedDeepCopyFunc(fn GeneratedDeepCopyFunc) error { - c.generatedDeepCopyFuncs[fn.InType] = fn.Fn - return nil -} - -// DeepCopy will perform a deep copy of a given object. -func (c *Cloner) DeepCopy(in interface{}) (interface{}, error) { - // Can be invalid if we run DeepCopy(X) where X is a nil interface type. - // For example, we get an invalid value when someone tries to deep-copy - // a nil labels.Selector. - // This does not occur if X is nil and is a pointer to a concrete type. - if in == nil { - return nil, nil - } - inValue := reflect.ValueOf(in) - outValue, err := c.deepCopy(inValue) - if err != nil { - return nil, err - } - return outValue.Interface(), nil -} - -func (c *Cloner) deepCopy(src reflect.Value) (reflect.Value, error) { - inType := src.Type() - - switch src.Kind() { - case reflect.Interface, reflect.Ptr, reflect.Map, reflect.Slice: - if src.IsNil() { - return src, nil - } - } - - if fv, ok := c.deepCopyFuncs[inType]; ok { - return c.customDeepCopy(src, fv) - } - if fv, ok := c.generatedDeepCopyFuncs[inType]; ok { - var outValue reflect.Value - outValue = reflect.New(inType.Elem()) - err := fv(src.Interface(), outValue.Interface(), c) - return outValue, err - } - return c.defaultDeepCopy(src) -} - -func (c *Cloner) customDeepCopy(src, fv reflect.Value) (reflect.Value, error) { - outValue := reflect.New(src.Type().Elem()) - args := []reflect.Value{src, outValue, reflect.ValueOf(c)} - result := fv.Call(args)[0].Interface() - // This convolution is necessary because nil interfaces won't convert - // to error. - if result == nil { - return outValue, nil - } - return outValue, result.(error) -} - -func (c *Cloner) defaultDeepCopy(src reflect.Value) (reflect.Value, error) { - switch src.Kind() { - case reflect.Chan, reflect.Func, reflect.UnsafePointer, reflect.Uintptr: - return src, fmt.Errorf("cannot deep copy kind: %s", src.Kind()) - case reflect.Array: - dst := reflect.New(src.Type()) - for i := 0; i < src.Len(); i++ { - copyVal, err := c.deepCopy(src.Index(i)) - if err != nil { - return src, err - } - dst.Elem().Index(i).Set(copyVal) - } - return dst.Elem(), nil - case reflect.Interface: - if src.IsNil() { - return src, nil - } - return c.deepCopy(src.Elem()) - case reflect.Map: - if src.IsNil() { - return src, nil - } - dst := reflect.MakeMap(src.Type()) - for _, k := range src.MapKeys() { - copyVal, err := c.deepCopy(src.MapIndex(k)) - if err != nil { - return src, err - } - dst.SetMapIndex(k, copyVal) - } - return dst, nil - case reflect.Ptr: - if src.IsNil() { - return src, nil - } - dst := reflect.New(src.Type().Elem()) - copyVal, err := c.deepCopy(src.Elem()) - if err != nil { - return src, err - } - dst.Elem().Set(copyVal) - return dst, nil - case reflect.Slice: - if src.IsNil() { - return src, nil - } - dst := reflect.MakeSlice(src.Type(), 0, src.Len()) - for i := 0; i < src.Len(); i++ { - copyVal, err := c.deepCopy(src.Index(i)) - if err != nil { - return src, err - } - dst = reflect.Append(dst, copyVal) - } - return dst, nil - case reflect.Struct: - dst := reflect.New(src.Type()) - for i := 0; i < src.NumField(); i++ { - if !dst.Elem().Field(i).CanSet() { - // Can't set private fields. At this point, the - // best we can do is a shallow copy. For - // example, time.Time is a value type with - // private members that can be shallow copied. - return src, nil - } - copyVal, err := c.deepCopy(src.Field(i)) - if err != nil { - return src, err - } - dst.Elem().Field(i).Set(copyVal) - } - return dst.Elem(), nil - - default: - // Value types like numbers, booleans, and strings. - return src, nil - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/conversion/converter.go b/vendor/k8s.io/kubernetes/pkg/conversion/converter.go deleted file mode 100644 index 9ab468eb..00000000 --- a/vendor/k8s.io/kubernetes/pkg/conversion/converter.go +++ /dev/null @@ -1,953 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package conversion - -import ( - "fmt" - "reflect" -) - -type typePair struct { - source reflect.Type - dest reflect.Type -} - -type typeNamePair struct { - fieldType reflect.Type - fieldName string -} - -// DebugLogger allows you to get debugging messages if necessary. -type DebugLogger interface { - Logf(format string, args ...interface{}) -} - -type NameFunc func(t reflect.Type) string - -var DefaultNameFunc = func(t reflect.Type) string { return t.Name() } - -type GenericConversionFunc func(a, b interface{}, scope Scope) (bool, error) - -// Converter knows how to convert one type to another. -type Converter struct { - // Map from the conversion pair to a function which can - // do the conversion. - conversionFuncs ConversionFuncs - generatedConversionFuncs ConversionFuncs - - // genericConversions are called during normal conversion to offer a "fast-path" - // that avoids all reflection. These methods are not called outside of the .Convert() - // method. - genericConversions []GenericConversionFunc - - // Set of conversions that should be treated as a no-op - ignoredConversions map[typePair]struct{} - - // This is a map from a source field type and name, to a list of destination - // field type and name. - structFieldDests map[typeNamePair][]typeNamePair - - // Allows for the opposite lookup of structFieldDests. So that SourceFromDest - // copy flag also works. So this is a map of destination field name, to potential - // source field name and type to look for. - structFieldSources map[typeNamePair][]typeNamePair - - // Map from a type to a function which applies defaults. - defaultingFuncs map[reflect.Type]reflect.Value - - // Similar to above, but function is stored as interface{}. - defaultingInterfaces map[reflect.Type]interface{} - - // Map from an input type to a function which can apply a key name mapping - inputFieldMappingFuncs map[reflect.Type]FieldMappingFunc - - // Map from an input type to a set of default conversion flags. - inputDefaultFlags map[reflect.Type]FieldMatchingFlags - - // If non-nil, will be called to print helpful debugging info. Quite verbose. - Debug DebugLogger - - // nameFunc is called to retrieve the name of a type; this name is used for the - // purpose of deciding whether two types match or not (i.e., will we attempt to - // do a conversion). The default returns the go type name. - nameFunc func(t reflect.Type) string -} - -// NewConverter creates a new Converter object. -func NewConverter(nameFn NameFunc) *Converter { - c := &Converter{ - conversionFuncs: NewConversionFuncs(), - generatedConversionFuncs: NewConversionFuncs(), - ignoredConversions: make(map[typePair]struct{}), - defaultingFuncs: make(map[reflect.Type]reflect.Value), - defaultingInterfaces: make(map[reflect.Type]interface{}), - nameFunc: nameFn, - structFieldDests: make(map[typeNamePair][]typeNamePair), - structFieldSources: make(map[typeNamePair][]typeNamePair), - - inputFieldMappingFuncs: make(map[reflect.Type]FieldMappingFunc), - inputDefaultFlags: make(map[reflect.Type]FieldMatchingFlags), - } - c.RegisterConversionFunc(Convert_Slice_byte_To_Slice_byte) - return c -} - -// AddGenericConversionFunc adds a function that accepts the ConversionFunc call pattern -// (for two conversion types) to the converter. These functions are checked first during -// a normal conversion, but are otherwise not called. Use AddConversionFuncs when registering -// typed conversions. -func (c *Converter) AddGenericConversionFunc(fn GenericConversionFunc) { - c.genericConversions = append(c.genericConversions, fn) -} - -// WithConversions returns a Converter that is a copy of c but with the additional -// fns merged on top. -func (c *Converter) WithConversions(fns ConversionFuncs) *Converter { - copied := *c - copied.conversionFuncs = c.conversionFuncs.Merge(fns) - return &copied -} - -// DefaultMeta returns the conversion FieldMappingFunc and meta for a given type. -func (c *Converter) DefaultMeta(t reflect.Type) (FieldMatchingFlags, *Meta) { - return c.inputDefaultFlags[t], &Meta{ - KeyNameMapping: c.inputFieldMappingFuncs[t], - } -} - -// Convert_Slice_byte_To_Slice_byte prevents recursing into every byte -func Convert_Slice_byte_To_Slice_byte(in *[]byte, out *[]byte, s Scope) error { - if *in == nil { - *out = nil - return nil - } - *out = make([]byte, len(*in)) - copy(*out, *in) - return nil -} - -// Scope is passed to conversion funcs to allow them to continue an ongoing conversion. -// If multiple converters exist in the system, Scope will allow you to use the correct one -// from a conversion function--that is, the one your conversion function was called by. -type Scope interface { - // Call Convert to convert sub-objects. Note that if you call it with your own exact - // parameters, you'll run out of stack space before anything useful happens. - Convert(src, dest interface{}, flags FieldMatchingFlags) error - - // DefaultConvert performs the default conversion, without calling a conversion func - // on the current stack frame. This makes it safe to call from a conversion func. - DefaultConvert(src, dest interface{}, flags FieldMatchingFlags) error - - // If registered, returns a function applying defaults for objects of a given type. - // Used for automatically generating conversion functions. - DefaultingInterface(inType reflect.Type) (interface{}, bool) - - // SrcTags and DestTags contain the struct tags that src and dest had, respectively. - // If the enclosing object was not a struct, then these will contain no tags, of course. - SrcTag() reflect.StructTag - DestTag() reflect.StructTag - - // Flags returns the flags with which the conversion was started. - Flags() FieldMatchingFlags - - // Meta returns any information originally passed to Convert. - Meta() *Meta -} - -// FieldMappingFunc can convert an input field value into different values, depending on -// the value of the source or destination struct tags. -type FieldMappingFunc func(key string, sourceTag, destTag reflect.StructTag) (source string, dest string) - -func NewConversionFuncs() ConversionFuncs { - return ConversionFuncs{fns: make(map[typePair]reflect.Value)} -} - -type ConversionFuncs struct { - fns map[typePair]reflect.Value -} - -// Add adds the provided conversion functions to the lookup table - they must have the signature -// `func(type1, type2, Scope) error`. Functions are added in the order passed and will override -// previously registered pairs. -func (c ConversionFuncs) Add(fns ...interface{}) error { - for _, fn := range fns { - fv := reflect.ValueOf(fn) - ft := fv.Type() - if err := verifyConversionFunctionSignature(ft); err != nil { - return err - } - c.fns[typePair{ft.In(0).Elem(), ft.In(1).Elem()}] = fv - } - return nil -} - -// Merge returns a new ConversionFuncs that contains all conversions from -// both other and c, with other conversions taking precedence. -func (c ConversionFuncs) Merge(other ConversionFuncs) ConversionFuncs { - merged := NewConversionFuncs() - for k, v := range c.fns { - merged.fns[k] = v - } - for k, v := range other.fns { - merged.fns[k] = v - } - return merged -} - -// Meta is supplied by Scheme, when it calls Convert. -type Meta struct { - // KeyNameMapping is an optional function which may map the listed key (field name) - // into a source and destination value. - KeyNameMapping FieldMappingFunc - // Context is an optional field that callers may use to pass info to conversion functions. - Context interface{} -} - -// scope contains information about an ongoing conversion. -type scope struct { - converter *Converter - meta *Meta - flags FieldMatchingFlags - - // srcStack & destStack are separate because they may not have a 1:1 - // relationship. - srcStack scopeStack - destStack scopeStack -} - -type scopeStackElem struct { - tag reflect.StructTag - value reflect.Value - key string -} - -type scopeStack []scopeStackElem - -func (s *scopeStack) pop() { - n := len(*s) - *s = (*s)[:n-1] -} - -func (s *scopeStack) push(e scopeStackElem) { - *s = append(*s, e) -} - -func (s *scopeStack) top() *scopeStackElem { - return &(*s)[len(*s)-1] -} - -func (s scopeStack) describe() string { - desc := "" - if len(s) > 1 { - desc = "(" + s[1].value.Type().String() + ")" - } - for i, v := range s { - if i < 2 { - // First layer on stack is not real; second is handled specially above. - continue - } - if v.key == "" { - desc += fmt.Sprintf(".%v", v.value.Type()) - } else { - desc += fmt.Sprintf(".%v", v.key) - } - } - return desc -} - -func (s *scope) DefaultingInterface(inType reflect.Type) (interface{}, bool) { - value, found := s.converter.defaultingInterfaces[inType] - return value, found -} - -// Formats src & dest as indices for printing. -func (s *scope) setIndices(src, dest int) { - s.srcStack.top().key = fmt.Sprintf("[%v]", src) - s.destStack.top().key = fmt.Sprintf("[%v]", dest) -} - -// Formats src & dest as map keys for printing. -func (s *scope) setKeys(src, dest interface{}) { - s.srcStack.top().key = fmt.Sprintf(`["%v"]`, src) - s.destStack.top().key = fmt.Sprintf(`["%v"]`, dest) -} - -// Convert continues a conversion. -func (s *scope) Convert(src, dest interface{}, flags FieldMatchingFlags) error { - return s.converter.Convert(src, dest, flags, s.meta) -} - -// DefaultConvert continues a conversion, performing a default conversion (no conversion func) -// for the current stack frame. -func (s *scope) DefaultConvert(src, dest interface{}, flags FieldMatchingFlags) error { - return s.converter.DefaultConvert(src, dest, flags, s.meta) -} - -// SrcTag returns the tag of the struct containing the current source item, if any. -func (s *scope) SrcTag() reflect.StructTag { - return s.srcStack.top().tag -} - -// DestTag returns the tag of the struct containing the current dest item, if any. -func (s *scope) DestTag() reflect.StructTag { - return s.destStack.top().tag -} - -// Flags returns the flags with which the current conversion was started. -func (s *scope) Flags() FieldMatchingFlags { - return s.flags -} - -// Meta returns the meta object that was originally passed to Convert. -func (s *scope) Meta() *Meta { - return s.meta -} - -// describe prints the path to get to the current (source, dest) values. -func (s *scope) describe() (src, dest string) { - return s.srcStack.describe(), s.destStack.describe() -} - -// error makes an error that includes information about where we were in the objects -// we were asked to convert. -func (s *scope) errorf(message string, args ...interface{}) error { - srcPath, destPath := s.describe() - where := fmt.Sprintf("converting %v to %v: ", srcPath, destPath) - return fmt.Errorf(where+message, args...) -} - -// Verifies whether a conversion function has a correct signature. -func verifyConversionFunctionSignature(ft reflect.Type) error { - if ft.Kind() != reflect.Func { - return fmt.Errorf("expected func, got: %v", ft) - } - if ft.NumIn() != 3 { - return fmt.Errorf("expected three 'in' params, got: %v", ft) - } - if ft.NumOut() != 1 { - return fmt.Errorf("expected one 'out' param, got: %v", ft) - } - if ft.In(0).Kind() != reflect.Ptr { - return fmt.Errorf("expected pointer arg for 'in' param 0, got: %v", ft) - } - if ft.In(1).Kind() != reflect.Ptr { - return fmt.Errorf("expected pointer arg for 'in' param 1, got: %v", ft) - } - scopeType := Scope(nil) - if e, a := reflect.TypeOf(&scopeType).Elem(), ft.In(2); e != a { - return fmt.Errorf("expected '%v' arg for 'in' param 2, got '%v' (%v)", e, a, ft) - } - var forErrorType error - // This convolution is necessary, otherwise TypeOf picks up on the fact - // that forErrorType is nil. - errorType := reflect.TypeOf(&forErrorType).Elem() - if ft.Out(0) != errorType { - return fmt.Errorf("expected error return, got: %v", ft) - } - return nil -} - -// RegisterConversionFunc registers a conversion func with the -// Converter. conversionFunc must take three parameters: a pointer to the input -// type, a pointer to the output type, and a conversion.Scope (which should be -// used if recursive conversion calls are desired). It must return an error. -// -// Example: -// c.RegisterConversionFunc( -// func(in *Pod, out *v1.Pod, s Scope) error { -// // conversion logic... -// return nil -// }) -func (c *Converter) RegisterConversionFunc(conversionFunc interface{}) error { - return c.conversionFuncs.Add(conversionFunc) -} - -// Similar to RegisterConversionFunc, but registers conversion function that were -// automatically generated. -func (c *Converter) RegisterGeneratedConversionFunc(conversionFunc interface{}) error { - return c.generatedConversionFuncs.Add(conversionFunc) -} - -// RegisterIgnoredConversion registers a "no-op" for conversion, where any requested -// conversion between from and to is ignored. -func (c *Converter) RegisterIgnoredConversion(from, to interface{}) error { - typeFrom := reflect.TypeOf(from) - typeTo := reflect.TypeOf(to) - if reflect.TypeOf(from).Kind() != reflect.Ptr { - return fmt.Errorf("expected pointer arg for 'from' param 0, got: %v", typeFrom) - } - if typeTo.Kind() != reflect.Ptr { - return fmt.Errorf("expected pointer arg for 'to' param 1, got: %v", typeTo) - } - c.ignoredConversions[typePair{typeFrom.Elem(), typeTo.Elem()}] = struct{}{} - return nil -} - -// IsConversionIgnored returns true if the specified objects should be dropped during -// conversion. -func (c *Converter) IsConversionIgnored(inType, outType reflect.Type) bool { - _, found := c.ignoredConversions[typePair{inType, outType}] - return found -} - -func (c *Converter) HasConversionFunc(inType, outType reflect.Type) bool { - _, found := c.conversionFuncs.fns[typePair{inType, outType}] - return found -} - -func (c *Converter) ConversionFuncValue(inType, outType reflect.Type) (reflect.Value, bool) { - value, found := c.conversionFuncs.fns[typePair{inType, outType}] - return value, found -} - -// SetStructFieldCopy registers a correspondence. Whenever a struct field is encountered -// which has a type and name matching srcFieldType and srcFieldName, it wil be copied -// into the field in the destination struct matching destFieldType & Name, if such a -// field exists. -// May be called multiple times, even for the same source field & type--all applicable -// copies will be performed. -func (c *Converter) SetStructFieldCopy(srcFieldType interface{}, srcFieldName string, destFieldType interface{}, destFieldName string) error { - st := reflect.TypeOf(srcFieldType) - dt := reflect.TypeOf(destFieldType) - srcKey := typeNamePair{st, srcFieldName} - destKey := typeNamePair{dt, destFieldName} - c.structFieldDests[srcKey] = append(c.structFieldDests[srcKey], destKey) - c.structFieldSources[destKey] = append(c.structFieldSources[destKey], srcKey) - return nil -} - -// RegisterDefaultingFunc registers a value-defaulting func with the Converter. -// defaultingFunc must take one parameter: a pointer to the input type. -// -// Example: -// c.RegisterDefaultingFunc( -// func(in *v1.Pod) { -// // defaulting logic... -// }) -func (c *Converter) RegisterDefaultingFunc(defaultingFunc interface{}) error { - fv := reflect.ValueOf(defaultingFunc) - ft := fv.Type() - if ft.Kind() != reflect.Func { - return fmt.Errorf("expected func, got: %v", ft) - } - if ft.NumIn() != 1 { - return fmt.Errorf("expected one 'in' param, got: %v", ft) - } - if ft.NumOut() != 0 { - return fmt.Errorf("expected zero 'out' params, got: %v", ft) - } - if ft.In(0).Kind() != reflect.Ptr { - return fmt.Errorf("expected pointer arg for 'in' param 0, got: %v", ft) - } - inType := ft.In(0).Elem() - c.defaultingFuncs[inType] = fv - c.defaultingInterfaces[inType] = defaultingFunc - return nil -} - -// RegisterInputDefaults registers a field name mapping function, used when converting -// from maps to structs. Inputs to the conversion methods are checked for this type and a mapping -// applied automatically if the input matches in. A set of default flags for the input conversion -// may also be provided, which will be used when no explicit flags are requested. -func (c *Converter) RegisterInputDefaults(in interface{}, fn FieldMappingFunc, defaultFlags FieldMatchingFlags) error { - fv := reflect.ValueOf(in) - ft := fv.Type() - if ft.Kind() != reflect.Ptr { - return fmt.Errorf("expected pointer 'in' argument, got: %v", ft) - } - c.inputFieldMappingFuncs[ft] = fn - c.inputDefaultFlags[ft] = defaultFlags - return nil -} - -// FieldMatchingFlags contains a list of ways in which struct fields could be -// copied. These constants may be | combined. -type FieldMatchingFlags int - -const ( - // Loop through destination fields, search for matching source - // field to copy it from. Source fields with no corresponding - // destination field will be ignored. If SourceToDest is - // specified, this flag is ignored. If neither is specified, - // or no flags are passed, this flag is the default. - DestFromSource FieldMatchingFlags = 0 - // Loop through source fields, search for matching dest field - // to copy it into. Destination fields with no corresponding - // source field will be ignored. - SourceToDest FieldMatchingFlags = 1 << iota - // Don't treat it as an error if the corresponding source or - // dest field can't be found. - IgnoreMissingFields - // Don't require type names to match. - AllowDifferentFieldTypeNames -) - -// IsSet returns true if the given flag or combination of flags is set. -func (f FieldMatchingFlags) IsSet(flag FieldMatchingFlags) bool { - if flag == DestFromSource { - // The bit logic doesn't work on the default value. - return f&SourceToDest != SourceToDest - } - return f&flag == flag -} - -// Convert will translate src to dest if it knows how. Both must be pointers. -// If no conversion func is registered and the default copying mechanism -// doesn't work on this type pair, an error will be returned. -// Read the comments on the various FieldMatchingFlags constants to understand -// what the 'flags' parameter does. -// 'meta' is given to allow you to pass information to conversion functions, -// it is not used by Convert() other than storing it in the scope. -// Not safe for objects with cyclic references! -func (c *Converter) Convert(src, dest interface{}, flags FieldMatchingFlags, meta *Meta) error { - if len(c.genericConversions) > 0 { - // TODO: avoid scope allocation - s := &scope{converter: c, flags: flags, meta: meta} - for _, fn := range c.genericConversions { - if ok, err := fn(src, dest, s); ok { - return err - } - } - } - return c.doConversion(src, dest, flags, meta, c.convert) -} - -// DefaultConvert will translate src to dest if it knows how. Both must be pointers. -// No conversion func is used. If the default copying mechanism -// doesn't work on this type pair, an error will be returned. -// Read the comments on the various FieldMatchingFlags constants to understand -// what the 'flags' parameter does. -// 'meta' is given to allow you to pass information to conversion functions, -// it is not used by DefaultConvert() other than storing it in the scope. -// Not safe for objects with cyclic references! -func (c *Converter) DefaultConvert(src, dest interface{}, flags FieldMatchingFlags, meta *Meta) error { - return c.doConversion(src, dest, flags, meta, c.defaultConvert) -} - -type conversionFunc func(sv, dv reflect.Value, scope *scope) error - -func (c *Converter) doConversion(src, dest interface{}, flags FieldMatchingFlags, meta *Meta, f conversionFunc) error { - dv, err := EnforcePtr(dest) - if err != nil { - return err - } - if !dv.CanAddr() && !dv.CanSet() { - return fmt.Errorf("can't write to dest") - } - sv, err := EnforcePtr(src) - if err != nil { - return err - } - s := &scope{ - converter: c, - flags: flags, - meta: meta, - } - // Leave something on the stack, so that calls to struct tag getters never fail. - s.srcStack.push(scopeStackElem{}) - s.destStack.push(scopeStackElem{}) - return f(sv, dv, s) -} - -// callCustom calls 'custom' with sv & dv. custom must be a conversion function. -func (c *Converter) callCustom(sv, dv, custom reflect.Value, scope *scope) error { - if !sv.CanAddr() { - sv2 := reflect.New(sv.Type()) - sv2.Elem().Set(sv) - sv = sv2 - } else { - sv = sv.Addr() - } - if !dv.CanAddr() { - if !dv.CanSet() { - return scope.errorf("can't addr or set dest.") - } - dvOrig := dv - dv := reflect.New(dvOrig.Type()) - defer func() { dvOrig.Set(dv) }() - } else { - dv = dv.Addr() - } - args := []reflect.Value{sv, dv, reflect.ValueOf(scope)} - ret := custom.Call(args)[0].Interface() - // This convolution is necessary because nil interfaces won't convert - // to errors. - if ret == nil { - return nil - } - return ret.(error) -} - -// convert recursively copies sv into dv, calling an appropriate conversion function if -// one is registered. -func (c *Converter) convert(sv, dv reflect.Value, scope *scope) error { - dt, st := dv.Type(), sv.Type() - // Apply default values. - if fv, ok := c.defaultingFuncs[st]; ok { - if c.Debug != nil { - c.Debug.Logf("Applying defaults for '%v'", st) - } - args := []reflect.Value{sv.Addr()} - fv.Call(args) - } - - pair := typePair{st, dt} - - // ignore conversions of this type - if _, ok := c.ignoredConversions[pair]; ok { - if c.Debug != nil { - c.Debug.Logf("Ignoring conversion of '%v' to '%v'", st, dt) - } - return nil - } - - // Convert sv to dv. - if fv, ok := c.conversionFuncs.fns[pair]; ok { - if c.Debug != nil { - c.Debug.Logf("Calling custom conversion of '%v' to '%v'", st, dt) - } - return c.callCustom(sv, dv, fv, scope) - } - if fv, ok := c.generatedConversionFuncs.fns[pair]; ok { - if c.Debug != nil { - c.Debug.Logf("Calling generated conversion of '%v' to '%v'", st, dt) - } - return c.callCustom(sv, dv, fv, scope) - } - - return c.defaultConvert(sv, dv, scope) -} - -// defaultConvert recursively copies sv into dv. no conversion function is called -// for the current stack frame (but conversion functions may be called for nested objects) -func (c *Converter) defaultConvert(sv, dv reflect.Value, scope *scope) error { - dt, st := dv.Type(), sv.Type() - - if !dv.CanSet() { - return scope.errorf("Cannot set dest. (Tried to deep copy something with unexported fields?)") - } - - if !scope.flags.IsSet(AllowDifferentFieldTypeNames) && c.nameFunc(dt) != c.nameFunc(st) { - return scope.errorf( - "type names don't match (%v, %v), and no conversion 'func (%v, %v) error' registered.", - c.nameFunc(st), c.nameFunc(dt), st, dt) - } - - switch st.Kind() { - case reflect.Map, reflect.Ptr, reflect.Slice, reflect.Interface, reflect.Struct: - // Don't copy these via assignment/conversion! - default: - // This should handle all simple types. - if st.AssignableTo(dt) { - dv.Set(sv) - return nil - } - if st.ConvertibleTo(dt) { - dv.Set(sv.Convert(dt)) - return nil - } - } - - if c.Debug != nil { - c.Debug.Logf("Trying to convert '%v' to '%v'", st, dt) - } - - scope.srcStack.push(scopeStackElem{value: sv}) - scope.destStack.push(scopeStackElem{value: dv}) - defer scope.srcStack.pop() - defer scope.destStack.pop() - - switch dv.Kind() { - case reflect.Struct: - return c.convertKV(toKVValue(sv), toKVValue(dv), scope) - case reflect.Slice: - if sv.IsNil() { - // Don't make a zero-length slice. - dv.Set(reflect.Zero(dt)) - return nil - } - dv.Set(reflect.MakeSlice(dt, sv.Len(), sv.Cap())) - for i := 0; i < sv.Len(); i++ { - scope.setIndices(i, i) - if err := c.convert(sv.Index(i), dv.Index(i), scope); err != nil { - return err - } - } - case reflect.Ptr: - if sv.IsNil() { - // Don't copy a nil ptr! - dv.Set(reflect.Zero(dt)) - return nil - } - dv.Set(reflect.New(dt.Elem())) - switch st.Kind() { - case reflect.Ptr, reflect.Interface: - return c.convert(sv.Elem(), dv.Elem(), scope) - default: - return c.convert(sv, dv.Elem(), scope) - } - case reflect.Map: - if sv.IsNil() { - // Don't copy a nil ptr! - dv.Set(reflect.Zero(dt)) - return nil - } - dv.Set(reflect.MakeMap(dt)) - for _, sk := range sv.MapKeys() { - dk := reflect.New(dt.Key()).Elem() - if err := c.convert(sk, dk, scope); err != nil { - return err - } - dkv := reflect.New(dt.Elem()).Elem() - scope.setKeys(sk.Interface(), dk.Interface()) - // TODO: sv.MapIndex(sk) may return a value with CanAddr() == false, - // because a map[string]struct{} does not allow a pointer reference. - // Calling a custom conversion function defined for the map value - // will panic. Example is PodInfo map[string]ContainerStatus. - if err := c.convert(sv.MapIndex(sk), dkv, scope); err != nil { - return err - } - dv.SetMapIndex(dk, dkv) - } - case reflect.Interface: - if sv.IsNil() { - // Don't copy a nil interface! - dv.Set(reflect.Zero(dt)) - return nil - } - tmpdv := reflect.New(sv.Elem().Type()).Elem() - if err := c.convert(sv.Elem(), tmpdv, scope); err != nil { - return err - } - dv.Set(reflect.ValueOf(tmpdv.Interface())) - return nil - default: - return scope.errorf("couldn't copy '%v' into '%v'; didn't understand types", st, dt) - } - return nil -} - -var stringType = reflect.TypeOf("") - -func toKVValue(v reflect.Value) kvValue { - switch v.Kind() { - case reflect.Struct: - return structAdaptor(v) - case reflect.Map: - if v.Type().Key().AssignableTo(stringType) { - return stringMapAdaptor(v) - } - } - - return nil -} - -// kvValue lets us write the same conversion logic to work with both maps -// and structs. Only maps with string keys make sense for this. -type kvValue interface { - // returns all keys, as a []string. - keys() []string - // Will just return "" for maps. - tagOf(key string) reflect.StructTag - // Will return the zero Value if the key doesn't exist. - value(key string) reflect.Value - // Maps require explicit setting-- will do nothing for structs. - // Returns false on failure. - confirmSet(key string, v reflect.Value) bool -} - -type stringMapAdaptor reflect.Value - -func (a stringMapAdaptor) len() int { - return reflect.Value(a).Len() -} - -func (a stringMapAdaptor) keys() []string { - v := reflect.Value(a) - keys := make([]string, v.Len()) - for i, v := range v.MapKeys() { - if v.IsNil() { - continue - } - switch t := v.Interface().(type) { - case string: - keys[i] = t - } - } - return keys -} - -func (a stringMapAdaptor) tagOf(key string) reflect.StructTag { - return "" -} - -func (a stringMapAdaptor) value(key string) reflect.Value { - return reflect.Value(a).MapIndex(reflect.ValueOf(key)) -} - -func (a stringMapAdaptor) confirmSet(key string, v reflect.Value) bool { - return true -} - -type structAdaptor reflect.Value - -func (a structAdaptor) len() int { - v := reflect.Value(a) - return v.Type().NumField() -} - -func (a structAdaptor) keys() []string { - v := reflect.Value(a) - t := v.Type() - keys := make([]string, t.NumField()) - for i := range keys { - keys[i] = t.Field(i).Name - } - return keys -} - -func (a structAdaptor) tagOf(key string) reflect.StructTag { - v := reflect.Value(a) - field, ok := v.Type().FieldByName(key) - if ok { - return field.Tag - } - return "" -} - -func (a structAdaptor) value(key string) reflect.Value { - v := reflect.Value(a) - return v.FieldByName(key) -} - -func (a structAdaptor) confirmSet(key string, v reflect.Value) bool { - return true -} - -// convertKV can convert things that consist of key/value pairs, like structs -// and some maps. -func (c *Converter) convertKV(skv, dkv kvValue, scope *scope) error { - if skv == nil || dkv == nil { - // TODO: add keys to stack to support really understandable error messages. - return fmt.Errorf("Unable to convert %#v to %#v", skv, dkv) - } - - lister := dkv - if scope.flags.IsSet(SourceToDest) { - lister = skv - } - - var mapping FieldMappingFunc - if scope.meta != nil && scope.meta.KeyNameMapping != nil { - mapping = scope.meta.KeyNameMapping - } - - for _, key := range lister.keys() { - if found, err := c.checkField(key, skv, dkv, scope); found { - if err != nil { - return err - } - continue - } - stag := skv.tagOf(key) - dtag := dkv.tagOf(key) - skey := key - dkey := key - if mapping != nil { - skey, dkey = scope.meta.KeyNameMapping(key, stag, dtag) - } - - df := dkv.value(dkey) - sf := skv.value(skey) - if !df.IsValid() || !sf.IsValid() { - switch { - case scope.flags.IsSet(IgnoreMissingFields): - // No error. - case scope.flags.IsSet(SourceToDest): - return scope.errorf("%v not present in dest", dkey) - default: - return scope.errorf("%v not present in src", skey) - } - continue - } - scope.srcStack.top().key = skey - scope.srcStack.top().tag = stag - scope.destStack.top().key = dkey - scope.destStack.top().tag = dtag - if err := c.convert(sf, df, scope); err != nil { - return err - } - } - return nil -} - -// checkField returns true if the field name matches any of the struct -// field copying rules. The error should be ignored if it returns false. -func (c *Converter) checkField(fieldName string, skv, dkv kvValue, scope *scope) (bool, error) { - replacementMade := false - if scope.flags.IsSet(DestFromSource) { - df := dkv.value(fieldName) - if !df.IsValid() { - return false, nil - } - destKey := typeNamePair{df.Type(), fieldName} - // Check each of the potential source (type, name) pairs to see if they're - // present in sv. - for _, potentialSourceKey := range c.structFieldSources[destKey] { - sf := skv.value(potentialSourceKey.fieldName) - if !sf.IsValid() { - continue - } - if sf.Type() == potentialSourceKey.fieldType { - // Both the source's name and type matched, so copy. - scope.srcStack.top().key = potentialSourceKey.fieldName - scope.destStack.top().key = fieldName - if err := c.convert(sf, df, scope); err != nil { - return true, err - } - dkv.confirmSet(fieldName, df) - replacementMade = true - } - } - return replacementMade, nil - } - - sf := skv.value(fieldName) - if !sf.IsValid() { - return false, nil - } - srcKey := typeNamePair{sf.Type(), fieldName} - // Check each of the potential dest (type, name) pairs to see if they're - // present in dv. - for _, potentialDestKey := range c.structFieldDests[srcKey] { - df := dkv.value(potentialDestKey.fieldName) - if !df.IsValid() { - continue - } - if df.Type() == potentialDestKey.fieldType { - // Both the dest's name and type matched, so copy. - scope.srcStack.top().key = fieldName - scope.destStack.top().key = potentialDestKey.fieldName - if err := c.convert(sf, df, scope); err != nil { - return true, err - } - dkv.confirmSet(potentialDestKey.fieldName, df) - replacementMade = true - } - } - return replacementMade, nil -} diff --git a/vendor/k8s.io/kubernetes/pkg/conversion/converter_test.go b/vendor/k8s.io/kubernetes/pkg/conversion/converter_test.go deleted file mode 100644 index 328c2a46..00000000 --- a/vendor/k8s.io/kubernetes/pkg/conversion/converter_test.go +++ /dev/null @@ -1,826 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package conversion - -import ( - "fmt" - "reflect" - "strconv" - "strings" - "testing" - - "github.com/google/gofuzz" - flag "github.com/spf13/pflag" - - "k8s.io/kubernetes/pkg/util/diff" -) - -var fuzzIters = flag.Int("fuzz-iters", 50, "How many fuzzing iterations to do.") - -// Test a weird version/kind embedding format. -type MyWeirdCustomEmbeddedVersionKindField struct { - ID string `json:"ID,omitempty"` - APIVersion string `json:"myVersionKey,omitempty"` - ObjectKind string `json:"myKindKey,omitempty"` - Z string `json:"Z,omitempty"` - Y uint64 `json:"Y,omitempty"` -} - -type TestType1 struct { - MyWeirdCustomEmbeddedVersionKindField `json:",inline"` - A string `json:"A,omitempty"` - B int `json:"B,omitempty"` - C int8 `json:"C,omitempty"` - D int16 `json:"D,omitempty"` - E int32 `json:"E,omitempty"` - F int64 `json:"F,omitempty"` - G uint `json:"G,omitempty"` - H uint8 `json:"H,omitempty"` - I uint16 `json:"I,omitempty"` - J uint32 `json:"J,omitempty"` - K uint64 `json:"K,omitempty"` - L bool `json:"L,omitempty"` - M map[string]int `json:"M,omitempty"` - N map[string]TestType2 `json:"N,omitempty"` - O *TestType2 `json:"O,omitempty"` - P []TestType2 `json:"Q,omitempty"` -} - -type TestType2 struct { - A string `json:"A,omitempty"` - B int `json:"B,omitempty"` -} - -type ExternalTestType2 struct { - A string `json:"A,omitempty"` - B int `json:"B,omitempty"` -} -type ExternalTestType1 struct { - MyWeirdCustomEmbeddedVersionKindField `json:",inline"` - A string `json:"A,omitempty"` - B int `json:"B,omitempty"` - C int8 `json:"C,omitempty"` - D int16 `json:"D,omitempty"` - E int32 `json:"E,omitempty"` - F int64 `json:"F,omitempty"` - G uint `json:"G,omitempty"` - H uint8 `json:"H,omitempty"` - I uint16 `json:"I,omitempty"` - J uint32 `json:"J,omitempty"` - K uint64 `json:"K,omitempty"` - L bool `json:"L,omitempty"` - M map[string]int `json:"M,omitempty"` - N map[string]ExternalTestType2 `json:"N,omitempty"` - O *ExternalTestType2 `json:"O,omitempty"` - P []ExternalTestType2 `json:"Q,omitempty"` -} - -func testLogger(t *testing.T) DebugLogger { - // We don't set logger to eliminate rubbish logs in tests. - // If you want to switch it, simply switch it to: "return t" - return nil -} - -func TestConverter_byteSlice(t *testing.T) { - c := NewConverter(DefaultNameFunc) - src := []byte{1, 2, 3} - dest := []byte{} - err := c.Convert(&src, &dest, 0, nil) - if err != nil { - t.Fatalf("expected no error") - } - if e, a := src, dest; !reflect.DeepEqual(e, a) { - t.Errorf("expected %#v, got %#v", e, a) - } -} - -func TestConverter_MismatchedTypes(t *testing.T) { - c := NewConverter(DefaultNameFunc) - - err := c.RegisterConversionFunc( - func(in *[]string, out *int, s Scope) error { - if str, err := strconv.Atoi((*in)[0]); err != nil { - return err - } else { - *out = str - return nil - } - }, - ) - if err != nil { - t.Fatalf("Unexpected error: %v", err) - } - - src := []string{"5"} - var dest *int - err = c.Convert(&src, &dest, 0, nil) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - if e, a := 5, *dest; e != a { - t.Errorf("expected %#v, got %#v", e, a) - } -} - -func TestConverter_DefaultConvert(t *testing.T) { - type A struct { - Foo string - Baz int - } - type B struct { - Bar string - Baz int - } - c := NewConverter(DefaultNameFunc) - c.Debug = testLogger(t) - c.nameFunc = func(t reflect.Type) string { return "MyType" } - - // Ensure conversion funcs can call DefaultConvert to get default behavior, - // then fixup remaining fields manually - err := c.RegisterConversionFunc(func(in *A, out *B, s Scope) error { - if err := s.DefaultConvert(in, out, IgnoreMissingFields); err != nil { - return err - } - out.Bar = in.Foo - return nil - }) - if err != nil { - t.Fatalf("unexpected error %v", err) - } - - x := A{"hello, intrepid test reader!", 3} - y := B{} - - err = c.Convert(&x, &y, 0, nil) - if err != nil { - t.Fatalf("unexpected error %v", err) - } - if e, a := x.Foo, y.Bar; e != a { - t.Errorf("expected %v, got %v", e, a) - } - if e, a := x.Baz, y.Baz; e != a { - t.Errorf("expected %v, got %v", e, a) - } -} - -func TestConverter_DeepCopy(t *testing.T) { - type A struct { - Foo *string - Bar []string - Baz interface{} - Qux map[string]string - } - c := NewConverter(DefaultNameFunc) - c.Debug = testLogger(t) - - foo, baz := "foo", "baz" - x := A{ - Foo: &foo, - Bar: []string{"bar"}, - Baz: &baz, - Qux: map[string]string{"qux": "qux"}, - } - y := A{} - - if err := c.Convert(&x, &y, 0, nil); err != nil { - t.Fatalf("unexpected error %v", err) - } - *x.Foo = "foo2" - x.Bar[0] = "bar2" - *x.Baz.(*string) = "baz2" - x.Qux["qux"] = "qux2" - if e, a := *x.Foo, *y.Foo; e == a { - t.Errorf("expected difference between %v and %v", e, a) - } - if e, a := x.Bar, y.Bar; reflect.DeepEqual(e, a) { - t.Errorf("expected difference between %v and %v", e, a) - } - if e, a := *x.Baz.(*string), *y.Baz.(*string); e == a { - t.Errorf("expected difference between %v and %v", e, a) - } - if e, a := x.Qux, y.Qux; reflect.DeepEqual(e, a) { - t.Errorf("expected difference between %v and %v", e, a) - } -} - -func TestConverter_CallsRegisteredFunctions(t *testing.T) { - type A struct { - Foo string - Baz int - } - type B struct { - Bar string - Baz int - } - type C struct{} - c := NewConverter(DefaultNameFunc) - c.Debug = testLogger(t) - err := c.RegisterConversionFunc(func(in *A, out *B, s Scope) error { - out.Bar = in.Foo - return s.Convert(&in.Baz, &out.Baz, 0) - }) - if err != nil { - t.Fatalf("unexpected error %v", err) - } - err = c.RegisterConversionFunc(func(in *B, out *A, s Scope) error { - out.Foo = in.Bar - return s.Convert(&in.Baz, &out.Baz, 0) - }) - if err != nil { - t.Fatalf("unexpected error %v", err) - } - - x := A{"hello, intrepid test reader!", 3} - y := B{} - - err = c.Convert(&x, &y, 0, nil) - if err != nil { - t.Fatalf("unexpected error %v", err) - } - if e, a := x.Foo, y.Bar; e != a { - t.Errorf("expected %v, got %v", e, a) - } - if e, a := x.Baz, y.Baz; e != a { - t.Errorf("expected %v, got %v", e, a) - } - - z := B{"all your test are belong to us", 42} - w := A{} - - err = c.Convert(&z, &w, 0, nil) - if err != nil { - t.Fatalf("unexpected error %v", err) - } - if e, a := z.Bar, w.Foo; e != a { - t.Errorf("expected %v, got %v", e, a) - } - if e, a := z.Baz, w.Baz; e != a { - t.Errorf("expected %v, got %v", e, a) - } - - err = c.RegisterConversionFunc(func(in *A, out *C, s Scope) error { - return fmt.Errorf("C can't store an A, silly") - }) - if err != nil { - t.Fatalf("unexpected error %v", err) - } - err = c.Convert(&A{}, &C{}, 0, nil) - if err == nil { - t.Errorf("unexpected non-error") - } -} - -func TestConverter_IgnoredConversion(t *testing.T) { - type A struct{} - type B struct{} - - count := 0 - c := NewConverter(DefaultNameFunc) - if err := c.RegisterConversionFunc(func(in *A, out *B, s Scope) error { - count++ - return nil - }); err != nil { - t.Fatalf("unexpected error %v", err) - } - if err := c.RegisterIgnoredConversion(&A{}, &B{}); err != nil { - t.Fatal(err) - } - a := A{} - b := B{} - if err := c.Convert(&a, &b, 0, nil); err != nil { - t.Errorf("%v", err) - } - if count != 0 { - t.Errorf("unexpected number of conversion invocations") - } -} - -func TestConverter_IgnoredConversionNested(t *testing.T) { - type C string - type A struct { - C C - } - type B struct { - C C - } - - c := NewConverter(DefaultNameFunc) - typed := C("") - if err := c.RegisterIgnoredConversion(&typed, &typed); err != nil { - t.Fatal(err) - } - a := A{C: C("test")} - b := B{C: C("other")} - if err := c.Convert(&a, &b, AllowDifferentFieldTypeNames, nil); err != nil { - t.Errorf("%v", err) - } - if b.C != C("other") { - t.Errorf("expected no conversion of field C: %#v", b) - } -} - -func TestConverter_GeneratedConversionOverriden(t *testing.T) { - type A struct{} - type B struct{} - c := NewConverter(DefaultNameFunc) - if err := c.RegisterConversionFunc(func(in *A, out *B, s Scope) error { - return nil - }); err != nil { - t.Fatalf("unexpected error %v", err) - } - if err := c.RegisterGeneratedConversionFunc(func(in *A, out *B, s Scope) error { - return fmt.Errorf("generated function should be overriden") - }); err != nil { - t.Fatalf("unexpected error %v", err) - } - - a := A{} - b := B{} - if err := c.Convert(&a, &b, 0, nil); err != nil { - t.Errorf("%v", err) - } -} - -func TestConverter_WithConversionOverriden(t *testing.T) { - type A struct{} - type B struct{} - c := NewConverter(DefaultNameFunc) - if err := c.RegisterConversionFunc(func(in *A, out *B, s Scope) error { - return fmt.Errorf("conversion function should be overriden") - }); err != nil { - t.Fatalf("unexpected error %v", err) - } - if err := c.RegisterGeneratedConversionFunc(func(in *A, out *B, s Scope) error { - return fmt.Errorf("generated function should be overriden") - }); err != nil { - t.Fatalf("unexpected error %v", err) - } - - ext := NewConversionFuncs() - ext.Add(func(in *A, out *B, s Scope) error { - return nil - }) - newc := c.WithConversions(ext) - - a := A{} - b := B{} - if err := c.Convert(&a, &b, 0, nil); err == nil || err.Error() != "conversion function should be overriden" { - t.Errorf("unexpected error: %v", err) - } - if err := newc.Convert(&a, &b, 0, nil); err != nil { - t.Errorf("%v", err) - } -} - -func TestConverter_MapsStringArrays(t *testing.T) { - type A struct { - Foo string - Baz int - Other string - } - c := NewConverter(DefaultNameFunc) - c.Debug = testLogger(t) - if err := c.RegisterConversionFunc(func(input *[]string, out *string, s Scope) error { - if len(*input) == 0 { - *out = "" - } - *out = (*input)[0] - return nil - }); err != nil { - t.Fatalf("unexpected error %v", err) - } - - x := map[string][]string{ - "Foo": {"bar"}, - "Baz": {"1"}, - "Other": {"", "test"}, - "other": {"wrong"}, - } - y := A{"test", 2, "something"} - - if err := c.Convert(&x, &y, AllowDifferentFieldTypeNames, nil); err == nil { - t.Error("unexpected non-error") - } - - if err := c.RegisterConversionFunc(func(input *[]string, out *int, s Scope) error { - if len(*input) == 0 { - *out = 0 - } - str := (*input)[0] - i, err := strconv.Atoi(str) - if err != nil { - return err - } - *out = i - return nil - }); err != nil { - t.Fatalf("unexpected error %v", err) - } - - if err := c.Convert(&x, &y, AllowDifferentFieldTypeNames, nil); err != nil { - t.Fatalf("unexpected error %v", err) - } - if !reflect.DeepEqual(y, A{"bar", 1, ""}) { - t.Errorf("unexpected result: %#v", y) - } -} - -func TestConverter_MapsStringArraysWithMappingKey(t *testing.T) { - type A struct { - Foo string `json:"test"` - Baz int - Other string - } - c := NewConverter(DefaultNameFunc) - c.Debug = testLogger(t) - if err := c.RegisterConversionFunc(func(input *[]string, out *string, s Scope) error { - if len(*input) == 0 { - *out = "" - } - *out = (*input)[0] - return nil - }); err != nil { - t.Fatalf("unexpected error %v", err) - } - - x := map[string][]string{ - "Foo": {"bar"}, - "test": {"baz"}, - } - y := A{"", 0, ""} - - if err := c.Convert(&x, &y, AllowDifferentFieldTypeNames|IgnoreMissingFields, &Meta{}); err != nil { - t.Fatalf("unexpected error %v", err) - } - if !reflect.DeepEqual(y, A{"bar", 0, ""}) { - t.Errorf("unexpected result: %#v", y) - } - - mapping := func(key string, sourceTag, destTag reflect.StructTag) (source string, dest string) { - if s := destTag.Get("json"); len(s) > 0 { - return strings.SplitN(s, ",", 2)[0], key - } - return key, key - } - - if err := c.Convert(&x, &y, AllowDifferentFieldTypeNames|IgnoreMissingFields, &Meta{KeyNameMapping: mapping}); err != nil { - t.Fatalf("unexpected error %v", err) - } - if !reflect.DeepEqual(y, A{"baz", 0, ""}) { - t.Errorf("unexpected result: %#v", y) - } -} - -func TestConverter_fuzz(t *testing.T) { - // Use the same types from the scheme test. - table := []struct { - from, to, check interface{} - }{ - {&TestType1{}, &ExternalTestType1{}, &TestType1{}}, - {&ExternalTestType1{}, &TestType1{}, &ExternalTestType1{}}, - } - - f := fuzz.New().NilChance(.5).NumElements(0, 100) - c := NewConverter(DefaultNameFunc) - c.nameFunc = func(t reflect.Type) string { - // Hide the fact that we don't have separate packages for these things. - return map[reflect.Type]string{ - reflect.TypeOf(TestType1{}): "TestType1", - reflect.TypeOf(ExternalTestType1{}): "TestType1", - reflect.TypeOf(TestType2{}): "TestType2", - reflect.TypeOf(ExternalTestType2{}): "TestType2", - }[t] - } - c.Debug = testLogger(t) - - for i, item := range table { - for j := 0; j < *fuzzIters; j++ { - f.Fuzz(item.from) - err := c.Convert(item.from, item.to, 0, nil) - if err != nil { - t.Errorf("(%v, %v): unexpected error: %v", i, j, err) - continue - } - err = c.Convert(item.to, item.check, 0, nil) - if err != nil { - t.Errorf("(%v, %v): unexpected error: %v", i, j, err) - continue - } - if e, a := item.from, item.check; !reflect.DeepEqual(e, a) { - t.Errorf("(%v, %v): unexpected diff: %v", i, j, diff.ObjectDiff(e, a)) - } - } - } -} - -func TestConverter_MapElemAddr(t *testing.T) { - type Foo struct { - A map[int]int - } - type Bar struct { - A map[string]string - } - c := NewConverter(DefaultNameFunc) - c.Debug = testLogger(t) - err := c.RegisterConversionFunc( - func(in *int, out *string, s Scope) error { - *out = fmt.Sprintf("%v", *in) - return nil - }, - ) - if err != nil { - t.Fatalf("Unexpected error: %v", err) - } - err = c.RegisterConversionFunc( - func(in *string, out *int, s Scope) error { - if str, err := strconv.Atoi(*in); err != nil { - return err - } else { - *out = str - return nil - } - }, - ) - if err != nil { - t.Fatalf("Unexpected error: %v", err) - } - f := fuzz.New().NilChance(0).NumElements(3, 3) - first := Foo{} - second := Bar{} - f.Fuzz(&first) - err = c.Convert(&first, &second, AllowDifferentFieldTypeNames, nil) - if err != nil { - t.Fatalf("Unexpected error: %v", err) - } - third := Foo{} - err = c.Convert(&second, &third, AllowDifferentFieldTypeNames, nil) - if e, a := first, third; !reflect.DeepEqual(e, a) { - t.Errorf("Unexpected diff: %v", diff.ObjectDiff(e, a)) - } -} - -func TestConverter_tags(t *testing.T) { - type Foo struct { - A string `test:"foo"` - } - type Bar struct { - A string `test:"bar"` - } - c := NewConverter(DefaultNameFunc) - c.Debug = testLogger(t) - err := c.RegisterConversionFunc( - func(in *string, out *string, s Scope) error { - if e, a := "foo", s.SrcTag().Get("test"); e != a { - t.Errorf("expected %v, got %v", e, a) - } - if e, a := "bar", s.DestTag().Get("test"); e != a { - t.Errorf("expected %v, got %v", e, a) - } - return nil - }, - ) - if err != nil { - t.Fatalf("Unexpected error: %v", err) - } - err = c.Convert(&Foo{}, &Bar{}, AllowDifferentFieldTypeNames, nil) - if err != nil { - t.Fatalf("Unexpected error: %v", err) - } -} - -func TestConverter_meta(t *testing.T) { - type Foo struct{ A string } - type Bar struct{ A string } - c := NewConverter(DefaultNameFunc) - c.Debug = testLogger(t) - checks := 0 - err := c.RegisterConversionFunc( - func(in *Foo, out *Bar, s Scope) error { - if s.Meta() == nil { - t.Errorf("Meta did not get passed!") - } - checks++ - s.Convert(&in.A, &out.A, 0) - return nil - }, - ) - if err != nil { - t.Fatalf("Unexpected error: %v", err) - } - err = c.RegisterConversionFunc( - func(in *string, out *string, s Scope) error { - if s.Meta() == nil { - t.Errorf("Meta did not get passed a second time!") - } - checks++ - return nil - }, - ) - if err != nil { - t.Fatalf("Unexpected error: %v", err) - } - err = c.Convert(&Foo{}, &Bar{}, 0, &Meta{}) - if err != nil { - t.Fatalf("Unexpected error: %v", err) - } - if checks != 2 { - t.Errorf("Registered functions did not get called.") - } -} - -func TestConverter_flags(t *testing.T) { - type Foo struct{ A string } - type Bar struct{ A string } - table := []struct { - from, to interface{} - flags FieldMatchingFlags - shouldSucceed bool - }{ - // Check that DestFromSource allows extra fields only in source. - { - from: &struct{ A string }{}, - to: &struct{ A, B string }{}, - flags: DestFromSource, - shouldSucceed: false, - }, { - from: &struct{ A, B string }{}, - to: &struct{ A string }{}, - flags: DestFromSource, - shouldSucceed: true, - }, - - // Check that SourceToDest allows for extra fields only in dest. - { - from: &struct{ A string }{}, - to: &struct{ A, B string }{}, - flags: SourceToDest, - shouldSucceed: true, - }, { - from: &struct{ A, B string }{}, - to: &struct{ A string }{}, - flags: SourceToDest, - shouldSucceed: false, - }, - - // Check that IgnoreMissingFields makes the above failure cases pass. - { - from: &struct{ A string }{}, - to: &struct{ A, B string }{}, - flags: DestFromSource | IgnoreMissingFields, - shouldSucceed: true, - }, { - from: &struct{ A, B string }{}, - to: &struct{ A string }{}, - flags: SourceToDest | IgnoreMissingFields, - shouldSucceed: true, - }, - - // Check that the field type name must match unless - // AllowDifferentFieldTypeNames is specified. - { - from: &struct{ A, B Foo }{}, - to: &struct{ A Bar }{}, - flags: DestFromSource, - shouldSucceed: false, - }, { - from: &struct{ A Foo }{}, - to: &struct{ A, B Bar }{}, - flags: SourceToDest, - shouldSucceed: false, - }, { - from: &struct{ A, B Foo }{}, - to: &struct{ A Bar }{}, - flags: DestFromSource | AllowDifferentFieldTypeNames, - shouldSucceed: true, - }, { - from: &struct{ A Foo }{}, - to: &struct{ A, B Bar }{}, - flags: SourceToDest | AllowDifferentFieldTypeNames, - shouldSucceed: true, - }, - } - f := fuzz.New().NilChance(.5).NumElements(0, 100) - c := NewConverter(DefaultNameFunc) - c.Debug = testLogger(t) - - for i, item := range table { - for j := 0; j < *fuzzIters; j++ { - f.Fuzz(item.from) - err := c.Convert(item.from, item.to, item.flags, nil) - if item.shouldSucceed && err != nil { - t.Errorf("(%v, %v): unexpected error: %v", i, j, err) - continue - } - if !item.shouldSucceed && err == nil { - t.Errorf("(%v, %v): unexpected non-error", i, j) - continue - } - } - } -} - -func TestConverter_FieldRename(t *testing.T) { - type WeirdMeta struct { - Name string - Type string - } - type NameMeta struct { - Name string - } - type TypeMeta struct { - Type string - } - type A struct { - WeirdMeta - } - type B struct { - TypeMeta - NameMeta - } - - c := NewConverter(DefaultNameFunc) - err := c.SetStructFieldCopy(WeirdMeta{}, "WeirdMeta", TypeMeta{}, "TypeMeta") - if err != nil { - t.Fatalf("unexpected error %v", err) - } - err = c.SetStructFieldCopy(WeirdMeta{}, "WeirdMeta", NameMeta{}, "NameMeta") - if err != nil { - t.Fatalf("unexpected error %v", err) - } - err = c.SetStructFieldCopy(TypeMeta{}, "TypeMeta", WeirdMeta{}, "WeirdMeta") - if err != nil { - t.Fatalf("unexpected error %v", err) - } - err = c.SetStructFieldCopy(NameMeta{}, "NameMeta", WeirdMeta{}, "WeirdMeta") - if err != nil { - t.Fatalf("unexpected error %v", err) - } - c.Debug = testLogger(t) - - aVal := &A{ - WeirdMeta: WeirdMeta{ - Name: "Foo", - Type: "Bar", - }, - } - - bVal := &B{ - TypeMeta: TypeMeta{"Bar"}, - NameMeta: NameMeta{"Foo"}, - } - - table := map[string]struct { - from, to, expect interface{} - flags FieldMatchingFlags - }{ - "to": { - aVal, - &B{}, - bVal, - AllowDifferentFieldTypeNames | SourceToDest | IgnoreMissingFields, - }, - "from": { - bVal, - &A{}, - aVal, - AllowDifferentFieldTypeNames | SourceToDest, - }, - "toDestFirst": { - aVal, - &B{}, - bVal, - AllowDifferentFieldTypeNames, - }, - "fromDestFirst": { - bVal, - &A{}, - aVal, - AllowDifferentFieldTypeNames | IgnoreMissingFields, - }, - } - - for name, item := range table { - err := c.Convert(item.from, item.to, item.flags, nil) - if err != nil { - t.Errorf("%v: unexpected error: %v", name, err) - continue - } - if e, a := item.expect, item.to; !reflect.DeepEqual(e, a) { - t.Errorf("%v: unexpected diff: %v", name, diff.ObjectDiff(e, a)) - } - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/conversion/deep_copy_test.go b/vendor/k8s.io/kubernetes/pkg/conversion/deep_copy_test.go deleted file mode 100644 index fdef856f..00000000 --- a/vendor/k8s.io/kubernetes/pkg/conversion/deep_copy_test.go +++ /dev/null @@ -1,161 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package conversion - -import ( - "math/rand" - "reflect" - "testing" - - "github.com/google/gofuzz" -) - -func TestDeepCopy(t *testing.T) { - semantic := EqualitiesOrDie() - f := fuzz.New().NilChance(.5).NumElements(0, 100) - table := []interface{}{ - map[string]string{}, - int(5), - "hello world", - struct { - A, B, C struct { - D map[string]int - } - X []int - Y []byte - }{}, - } - for _, obj := range table { - obj2, err := NewCloner().DeepCopy(obj) - if err != nil { - t.Errorf("Error: couldn't copy %#v", obj) - continue - } - if e, a := obj, obj2; !semantic.DeepEqual(e, a) { - t.Errorf("expected %#v\ngot %#v", e, a) - } - - obj3 := reflect.New(reflect.TypeOf(obj)).Interface() - f.Fuzz(obj3) - obj4, err := NewCloner().DeepCopy(obj3) - if err != nil { - t.Errorf("Error: couldn't copy %#v", obj) - continue - } - if e, a := obj3, obj4; !semantic.DeepEqual(e, a) { - t.Errorf("expected %#v\ngot %#v", e, a) - } - f.Fuzz(obj3) - } -} - -func copyOrDie(t *testing.T, in interface{}) interface{} { - out, err := NewCloner().DeepCopy(in) - if err != nil { - t.Fatalf("DeepCopy failed: %#q: %v", in, err) - } - return out -} - -func TestDeepCopySliceSeparate(t *testing.T) { - x := []int{5} - y := copyOrDie(t, x).([]int) - x[0] = 3 - if y[0] == 3 { - t.Errorf("deep copy wasn't deep: %#q %#q", x, y) - } -} - -func TestDeepCopyArraySeparate(t *testing.T) { - x := [1]int{5} - y := copyOrDie(t, x).([1]int) - x[0] = 3 - if y[0] == 3 { - t.Errorf("deep copy wasn't deep: %#q %#q", x, y) - } -} - -func TestDeepCopyMapSeparate(t *testing.T) { - x := map[string]int{"foo": 5} - y := copyOrDie(t, x).(map[string]int) - x["foo"] = 3 - if y["foo"] == 3 { - t.Errorf("deep copy wasn't deep: %#q %#q", x, y) - } -} - -func TestDeepCopyPointerSeparate(t *testing.T) { - z := 5 - x := &z - y := copyOrDie(t, x).(*int) - *x = 3 - if *y == 3 { - t.Errorf("deep copy wasn't deep: %#q %#q", x, y) - } -} - -func TestDeepCopyStruct(t *testing.T) { - type Foo struct { - A int - } - type Bar struct { - Foo - F *Foo - } - a := &Bar{Foo{1}, &Foo{2}} - b := copyOrDie(t, a).(*Bar) - a.A = 3 - a.F.A = 4 - - if b.A != 1 || b.F.A != 2 { - t.Errorf("deep copy wasn't deep: %#v, %#v", a, b) - } -} - -var result interface{} - -func BenchmarkDeepCopy(b *testing.B) { - table := []interface{}{ - map[string]string{}, - int(5), - "hello world", - struct { - A, B, C struct { - D map[string]int - } - X []int - Y []byte - }{}, - } - - f := fuzz.New().RandSource(rand.NewSource(1)).NilChance(.5).NumElements(0, 100) - for i := range table { - out := table[i] - obj := reflect.New(reflect.TypeOf(out)).Interface() - f.Fuzz(obj) - table[i] = obj - } - - b.ResetTimer() - var r interface{} - for i := 0; i < b.N; i++ { - for j := range table { - r, _ = NewCloner().DeepCopy(table[j]) - } - } - result = r -} diff --git a/vendor/k8s.io/kubernetes/pkg/conversion/deep_equal.go b/vendor/k8s.io/kubernetes/pkg/conversion/deep_equal.go deleted file mode 100644 index 6bfc870a..00000000 --- a/vendor/k8s.io/kubernetes/pkg/conversion/deep_equal.go +++ /dev/null @@ -1,36 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package conversion - -import ( - "k8s.io/kubernetes/third_party/forked/golang/reflect" -) - -// The code for this type must be located in third_party, since it forks from -// go std lib. But for convenience, we expose the type here, too. -type Equalities struct { - reflect.Equalities -} - -// For convenience, panics on errors -func EqualitiesOrDie(funcs ...interface{}) Equalities { - e := Equalities{reflect.Equalities{}} - if err := e.AddFuncs(funcs...); err != nil { - panic(err) - } - return e -} diff --git a/vendor/k8s.io/kubernetes/pkg/conversion/doc.go b/vendor/k8s.io/kubernetes/pkg/conversion/doc.go index 16eda007..68f6e8dc 100644 --- a/vendor/k8s.io/kubernetes/pkg/conversion/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/conversion/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,11 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Package conversion provides go object versioning. -// -// Specifically, conversion provides a way for you to define multiple versions -// of the same object. You may write functions which implement conversion logic, -// but for the fields which did not change, copying is automated. This makes it -// easy to modify the structures you use in memory without affecting the format -// you store on disk or respond to in your external API calls. -package conversion // import "k8s.io/kubernetes/pkg/conversion" +// Package conversion only exists until heapster rebases +// TODO genericapiserver remove this empty package. Godep fails without this because heapster relies +// on this package. This will allow us to start splitting packages, but will force +// heapster to update on their next kube rebase. +package conversion diff --git a/vendor/k8s.io/kubernetes/pkg/conversion/helper.go b/vendor/k8s.io/kubernetes/pkg/conversion/helper.go deleted file mode 100644 index 4ebc1ebc..00000000 --- a/vendor/k8s.io/kubernetes/pkg/conversion/helper.go +++ /dev/null @@ -1,39 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package conversion - -import ( - "fmt" - "reflect" -) - -// EnforcePtr ensures that obj is a pointer of some sort. Returns a reflect.Value -// of the dereferenced pointer, ensuring that it is settable/addressable. -// Returns an error if this is not possible. -func EnforcePtr(obj interface{}) (reflect.Value, error) { - v := reflect.ValueOf(obj) - if v.Kind() != reflect.Ptr { - if v.Kind() == reflect.Invalid { - return reflect.Value{}, fmt.Errorf("expected pointer, but got invalid kind") - } - return reflect.Value{}, fmt.Errorf("expected pointer, but got %v type", v.Type()) - } - if v.IsNil() { - return reflect.Value{}, fmt.Errorf("expected pointer, but got nil") - } - return v.Elem(), nil -} diff --git a/vendor/k8s.io/kubernetes/pkg/conversion/helper_test.go b/vendor/k8s.io/kubernetes/pkg/conversion/helper_test.go deleted file mode 100644 index 8c61a30a..00000000 --- a/vendor/k8s.io/kubernetes/pkg/conversion/helper_test.go +++ /dev/null @@ -1,38 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package conversion - -import "testing" - -func TestInvalidPtrValueKind(t *testing.T) { - var simple interface{} - switch obj := simple.(type) { - default: - _, err := EnforcePtr(obj) - if err == nil { - t.Errorf("Expected error on invalid kind") - } - } -} - -func TestEnforceNilPtr(t *testing.T) { - var nilPtr *struct{} - _, err := EnforcePtr(nilPtr) - if err == nil { - t.Errorf("Expected error on nil pointer") - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/conversion/queryparams/.readonly b/vendor/k8s.io/kubernetes/pkg/conversion/queryparams/.readonly deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/k8s.io/kubernetes/pkg/conversion/queryparams/BUILD b/vendor/k8s.io/kubernetes/pkg/conversion/queryparams/BUILD index 48920436..deefdcef 100644 --- a/vendor/k8s.io/kubernetes/pkg/conversion/queryparams/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/conversion/queryparams/BUILD @@ -5,29 +5,14 @@ licenses(["notice"]) load( "@io_bazel_rules_go//go:def.bzl", "go_library", - "go_test", ) go_library( name = "go_default_library", - srcs = [ - "convert.go", - "doc.go", - ], + srcs = ["doc.go"], tags = ["automanaged"], ) -go_test( - name = "go_default_xtest", - srcs = ["convert_test.go"], - tags = ["automanaged"], - deps = [ - "//pkg/apis/meta/v1:go_default_library", - "//pkg/conversion/queryparams:go_default_library", - "//pkg/runtime/schema:go_default_library", - ], -) - filegroup( name = "package-srcs", srcs = glob(["**"]), diff --git a/vendor/k8s.io/kubernetes/pkg/conversion/queryparams/convert.go b/vendor/k8s.io/kubernetes/pkg/conversion/queryparams/convert.go deleted file mode 100644 index 30f717b2..00000000 --- a/vendor/k8s.io/kubernetes/pkg/conversion/queryparams/convert.go +++ /dev/null @@ -1,188 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package queryparams - -import ( - "fmt" - "net/url" - "reflect" - "strings" -) - -// Marshaler converts an object to a query parameter string representation -type Marshaler interface { - MarshalQueryParameter() (string, error) -} - -// Unmarshaler converts a string representation to an object -type Unmarshaler interface { - UnmarshalQueryParameter(string) error -} - -func jsonTag(field reflect.StructField) (string, bool) { - structTag := field.Tag.Get("json") - if len(structTag) == 0 { - return "", false - } - parts := strings.Split(structTag, ",") - tag := parts[0] - if tag == "-" { - tag = "" - } - omitempty := false - parts = parts[1:] - for _, part := range parts { - if part == "omitempty" { - omitempty = true - break - } - } - return tag, omitempty -} - -func formatValue(value interface{}) string { - return fmt.Sprintf("%v", value) -} - -func isPointerKind(kind reflect.Kind) bool { - return kind == reflect.Ptr -} - -func isStructKind(kind reflect.Kind) bool { - return kind == reflect.Struct -} - -func isValueKind(kind reflect.Kind) bool { - switch kind { - case reflect.String, reflect.Bool, reflect.Int, reflect.Int8, reflect.Int16, - reflect.Int32, reflect.Int64, reflect.Uint, reflect.Uint8, - reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Float32, - reflect.Float64, reflect.Complex64, reflect.Complex128: - return true - default: - return false - } -} - -func zeroValue(value reflect.Value) bool { - return reflect.DeepEqual(reflect.Zero(value.Type()).Interface(), value.Interface()) -} - -func customMarshalValue(value reflect.Value) (reflect.Value, bool) { - // Return unless we implement a custom query marshaler - if !value.CanInterface() { - return reflect.Value{}, false - } - - marshaler, ok := value.Interface().(Marshaler) - if !ok { - return reflect.Value{}, false - } - - // Don't invoke functions on nil pointers - // If the type implements MarshalQueryParameter, AND the tag is not omitempty, AND the value is a nil pointer, "" seems like a reasonable response - if isPointerKind(value.Kind()) && zeroValue(value) { - return reflect.ValueOf(""), true - } - - // Get the custom marshalled value - v, err := marshaler.MarshalQueryParameter() - if err != nil { - return reflect.Value{}, false - } - return reflect.ValueOf(v), true -} - -func addParam(values url.Values, tag string, omitempty bool, value reflect.Value) { - if omitempty && zeroValue(value) { - return - } - val := "" - iValue := fmt.Sprintf("%v", value.Interface()) - - if iValue != "" { - val = iValue - } - values.Add(tag, val) -} - -func addListOfParams(values url.Values, tag string, omitempty bool, list reflect.Value) { - for i := 0; i < list.Len(); i++ { - addParam(values, tag, omitempty, list.Index(i)) - } -} - -// Convert takes an object and converts it to a url.Values object using JSON tags as -// parameter names. Only top-level simple values, arrays, and slices are serialized. -// Embedded structs, maps, etc. will not be serialized. -func Convert(obj interface{}) (url.Values, error) { - result := url.Values{} - if obj == nil { - return result, nil - } - var sv reflect.Value - switch reflect.TypeOf(obj).Kind() { - case reflect.Ptr, reflect.Interface: - sv = reflect.ValueOf(obj).Elem() - default: - return nil, fmt.Errorf("expecting a pointer or interface") - } - st := sv.Type() - if !isStructKind(st.Kind()) { - return nil, fmt.Errorf("expecting a pointer to a struct") - } - - // Check all object fields - convertStruct(result, st, sv) - - return result, nil -} - -func convertStruct(result url.Values, st reflect.Type, sv reflect.Value) { - for i := 0; i < st.NumField(); i++ { - field := sv.Field(i) - tag, omitempty := jsonTag(st.Field(i)) - if len(tag) == 0 { - continue - } - ft := field.Type() - - kind := ft.Kind() - if isPointerKind(kind) { - ft = ft.Elem() - kind = ft.Kind() - if !field.IsNil() { - field = reflect.Indirect(field) - } - } - - switch { - case isValueKind(kind): - addParam(result, tag, omitempty, field) - case kind == reflect.Array || kind == reflect.Slice: - if isValueKind(ft.Elem().Kind()) { - addListOfParams(result, tag, omitempty, field) - } - case isStructKind(kind) && !(zeroValue(field) && omitempty): - if marshalValue, ok := customMarshalValue(field); ok { - addParam(result, tag, omitempty, marshalValue) - } else { - convertStruct(result, ft, field) - } - } - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/conversion/queryparams/convert_test.go b/vendor/k8s.io/kubernetes/pkg/conversion/queryparams/convert_test.go deleted file mode 100644 index 506bbbef..00000000 --- a/vendor/k8s.io/kubernetes/pkg/conversion/queryparams/convert_test.go +++ /dev/null @@ -1,212 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package queryparams_test - -import ( - "net/url" - "reflect" - "testing" - "time" - - metav1 "k8s.io/kubernetes/pkg/apis/meta/v1" - "k8s.io/kubernetes/pkg/conversion/queryparams" - "k8s.io/kubernetes/pkg/runtime/schema" -) - -type namedString string -type namedBool bool - -type bar struct { - Float1 float32 `json:"float1"` - Float2 float64 `json:"float2"` - Int1 int64 `json:"int1,omitempty"` - Int2 int32 `json:"int2,omitempty"` - Int3 int16 `json:"int3,omitempty"` - Str1 string `json:"str1,omitempty"` - Ignored int - Ignored2 string -} - -func (obj *bar) GetObjectKind() schema.ObjectKind { return schema.EmptyObjectKind } - -type foo struct { - Str string `json:"str"` - Integer int `json:"integer,omitempty"` - Slice []string `json:"slice,omitempty"` - Boolean bool `json:"boolean,omitempty"` - NamedStr namedString `json:"namedStr,omitempty"` - NamedBool namedBool `json:"namedBool,omitempty"` - Foobar bar `json:"foobar,omitempty"` - Testmap map[string]string `json:"testmap,omitempty"` -} - -func (obj *foo) GetObjectKind() schema.ObjectKind { return schema.EmptyObjectKind } - -type baz struct { - Ptr *int `json:"ptr"` - Bptr *bool `json:"bptr,omitempty"` -} - -func (obj *baz) GetObjectKind() schema.ObjectKind { return schema.EmptyObjectKind } - -// childStructs tests some of the types we serialize to query params for log API calls -// notably, the nested time struct -type childStructs struct { - Container string `json:"container,omitempty"` - Follow bool `json:"follow,omitempty"` - Previous bool `json:"previous,omitempty"` - SinceSeconds *int64 `json:"sinceSeconds,omitempty"` - SinceTime *metav1.Time `json:"sinceTime,omitempty"` - EmptyTime *metav1.Time `json:"emptyTime"` -} - -func (obj *childStructs) GetObjectKind() schema.ObjectKind { return schema.EmptyObjectKind } - -func validateResult(t *testing.T, input interface{}, actual, expected url.Values) { - local := url.Values{} - for k, v := range expected { - local[k] = v - } - for k, v := range actual { - if ev, ok := local[k]; !ok || !reflect.DeepEqual(ev, v) { - if !ok { - t.Errorf("%#v: actual value key %s not found in expected map", input, k) - } else { - t.Errorf("%#v: values don't match: actual: %#v, expected: %#v", input, v, ev) - } - } - delete(local, k) - } - if len(local) > 0 { - t.Errorf("%#v: expected map has keys that were not found in actual map: %#v", input, local) - } -} - -func TestConvert(t *testing.T) { - sinceSeconds := int64(123) - sinceTime := metav1.Date(2000, 1, 1, 12, 34, 56, 0, time.UTC) - - tests := []struct { - input interface{} - expected url.Values - }{ - { - input: &foo{ - Str: "hello", - }, - expected: url.Values{"str": {"hello"}}, - }, - { - input: &foo{ - Str: "test string", - Slice: []string{"one", "two", "three"}, - Integer: 234, - Boolean: true, - }, - expected: url.Values{"str": {"test string"}, "slice": {"one", "two", "three"}, "integer": {"234"}, "boolean": {"true"}}, - }, - { - input: &foo{ - Str: "named types", - NamedStr: "value1", - NamedBool: true, - }, - expected: url.Values{"str": {"named types"}, "namedStr": {"value1"}, "namedBool": {"true"}}, - }, - { - input: &foo{ - Str: "don't ignore embedded struct", - Foobar: bar{ - Float1: 5.0, - }, - }, - expected: url.Values{"str": {"don't ignore embedded struct"}, "float1": {"5"}, "float2": {"0"}}, - }, - { - // Ignore untagged fields - input: &bar{ - Float1: 23.5, - Float2: 100.7, - Int1: 1, - Int2: 2, - Int3: 3, - Ignored: 1, - Ignored2: "ignored", - }, - expected: url.Values{"float1": {"23.5"}, "float2": {"100.7"}, "int1": {"1"}, "int2": {"2"}, "int3": {"3"}}, - }, - { - // include fields that are not tagged omitempty - input: &foo{ - NamedStr: "named str", - }, - expected: url.Values{"str": {""}, "namedStr": {"named str"}}, - }, - { - input: &baz{ - Ptr: intp(5), - Bptr: boolp(true), - }, - expected: url.Values{"ptr": {"5"}, "bptr": {"true"}}, - }, - { - input: &baz{ - Bptr: boolp(true), - }, - expected: url.Values{"ptr": {""}, "bptr": {"true"}}, - }, - { - input: &baz{ - Ptr: intp(5), - }, - expected: url.Values{"ptr": {"5"}}, - }, - { - input: &childStructs{ - Container: "mycontainer", - Follow: true, - Previous: true, - SinceSeconds: &sinceSeconds, - SinceTime: &sinceTime, // test a custom marshaller - EmptyTime: nil, // test a nil custom marshaller without omitempty - }, - expected: url.Values{"container": {"mycontainer"}, "follow": {"true"}, "previous": {"true"}, "sinceSeconds": {"123"}, "sinceTime": {"2000-01-01T12:34:56Z"}, "emptyTime": {""}}, - }, - { - input: &childStructs{ - Container: "mycontainer", - Follow: true, - Previous: true, - SinceSeconds: &sinceSeconds, - SinceTime: nil, // test a nil custom marshaller with omitempty - }, - expected: url.Values{"container": {"mycontainer"}, "follow": {"true"}, "previous": {"true"}, "sinceSeconds": {"123"}, "emptyTime": {""}}, - }, - } - - for _, test := range tests { - result, err := queryparams.Convert(test.input) - if err != nil { - t.Errorf("Unexpected error while converting %#v: %v", test.input, err) - } - validateResult(t, test.input, result, test.expected) - } -} - -func intp(n int) *int { return &n } - -func boolp(b bool) *bool { return &b } diff --git a/vendor/k8s.io/kubernetes/pkg/conversion/queryparams/doc.go b/vendor/k8s.io/kubernetes/pkg/conversion/queryparams/doc.go index 519e1e4b..fa1d5e1b 100644 --- a/vendor/k8s.io/kubernetes/pkg/conversion/queryparams/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/conversion/queryparams/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Package queryparams provides conversion from versioned -// runtime objects to URL query values -package queryparams // import "k8s.io/kubernetes/pkg/conversion/queryparams" +// Package queryparams only exists until heapster rebases +// TODO genericapiserver remove this empty package. Godep fails without this because heapster relies +// on this package. This will allow us to start splitting packages, but will force +// heapster to update on their next kube rebase. +package queryparams diff --git a/vendor/k8s.io/kubernetes/pkg/credentialprovider/aws/aws_credentials.go b/vendor/k8s.io/kubernetes/pkg/credentialprovider/aws/aws_credentials.go index 9d73d2a1..7e8955e9 100644 --- a/vendor/k8s.io/kubernetes/pkg/credentialprovider/aws/aws_credentials.go +++ b/vendor/k8s.io/kubernetes/pkg/credentialprovider/aws/aws_credentials.go @@ -30,27 +30,6 @@ import ( "k8s.io/kubernetes/pkg/credentialprovider" ) -// AWSRegions is the complete list of regions known to the AWS cloudprovider -// and credentialprovider. -var AWSRegions = [...]string{ - "us-east-1", - "us-east-2", - "us-west-1", - "us-west-2", - "eu-west-1", - "eu-west-2", - "eu-central-1", - "ap-south-1", - "ap-southeast-1", - "ap-southeast-2", - "ap-northeast-1", - "ap-northeast-2", - "ca-central-1", - "cn-north-1", - "us-gov-west-1", - "sa-east-1", -} - const registryURLTemplate = "*.dkr.ecr.%s.amazonaws.com" // awsHandlerLogger is a handler that logs all AWS SDK requests @@ -101,21 +80,20 @@ type ecrProvider struct { var _ credentialprovider.DockerConfigProvider = &ecrProvider{} -// Init creates a lazy provider for each AWS region, in order to support +// RegisterCredentialsProvider registers a credential provider for the specified region. +// It creates a lazy provider for each AWS region, in order to support // cross-region ECR access. They have to be lazy because it's unlikely, but not // impossible, that we'll use more than one. -// Not using the package init() function: this module should be initialized only -// if using the AWS cloud provider. This way, we avoid timeouts waiting for a -// non-existent provider. -func Init() { - for _, region := range AWSRegions { - credentialprovider.RegisterCredentialProvider("aws-ecr-"+region, - &lazyEcrProvider{ - region: region, - regionURL: fmt.Sprintf(registryURLTemplate, region), - }) - } +// This should be called only if using the AWS cloud provider. +// This way, we avoid timeouts waiting for a non-existent provider. +func RegisterCredentialsProvider(region string) { + glog.V(4).Infof("registering credentials provider for AWS region %q", region) + credentialprovider.RegisterCredentialProvider("aws-ecr-"+region, + &lazyEcrProvider{ + region: region, + regionURL: fmt.Sprintf(registryURLTemplate, region), + }) } // Enabled implements DockerConfigProvider.Enabled for the lazy provider. diff --git a/vendor/k8s.io/kubernetes/pkg/fieldpath/BUILD b/vendor/k8s.io/kubernetes/pkg/fieldpath/BUILD index cede08b2..d6d29f73 100644 --- a/vendor/k8s.io/kubernetes/pkg/fieldpath/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/fieldpath/BUILD @@ -32,6 +32,7 @@ go_test( "//pkg/api/resource:go_default_library", "//pkg/api/v1:go_default_library", "//vendor:github.com/stretchr/testify/assert", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/fieldpath/fieldpath_test.go b/vendor/k8s.io/kubernetes/pkg/fieldpath/fieldpath_test.go index 6fa865ed..c2794967 100644 --- a/vendor/k8s.io/kubernetes/pkg/fieldpath/fieldpath_test.go +++ b/vendor/k8s.io/kubernetes/pkg/fieldpath/fieldpath_test.go @@ -22,6 +22,7 @@ import ( "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" ) @@ -44,7 +45,7 @@ func TestExtractFieldPathAsString(t *testing.T) { name: "ok - namespace", fieldPath: "metadata.namespace", obj: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "object-namespace", }, }, @@ -54,7 +55,7 @@ func TestExtractFieldPathAsString(t *testing.T) { name: "ok - name", fieldPath: "metadata.name", obj: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "object-name", }, }, @@ -64,7 +65,7 @@ func TestExtractFieldPathAsString(t *testing.T) { name: "ok - labels", fieldPath: "metadata.labels", obj: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"key": "value"}, }, }, @@ -74,7 +75,7 @@ func TestExtractFieldPathAsString(t *testing.T) { name: "ok - labels bslash n", fieldPath: "metadata.labels", obj: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"key": "value\n"}, }, }, @@ -84,7 +85,7 @@ func TestExtractFieldPathAsString(t *testing.T) { name: "ok - annotations", fieldPath: "metadata.annotations", obj: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{"builder": "john-doe"}, }, }, @@ -95,7 +96,7 @@ func TestExtractFieldPathAsString(t *testing.T) { name: "invalid expression", fieldPath: "metadata.whoops", obj: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "object-namespace", }, }, diff --git a/vendor/k8s.io/kubernetes/pkg/fields/BUILD b/vendor/k8s.io/kubernetes/pkg/fields/BUILD index 5d856b1c..deefdcef 100644 --- a/vendor/k8s.io/kubernetes/pkg/fields/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/fields/BUILD @@ -5,28 +5,11 @@ licenses(["notice"]) load( "@io_bazel_rules_go//go:def.bzl", "go_library", - "go_test", ) go_library( name = "go_default_library", - srcs = [ - "doc.go", - "fields.go", - "requirements.go", - "selector.go", - ], - tags = ["automanaged"], - deps = ["//vendor:k8s.io/apimachinery/pkg/selection"], -) - -go_test( - name = "go_default_test", - srcs = [ - "fields_test.go", - "selector_test.go", - ], - library = ":go_default_library", + srcs = ["doc.go"], tags = ["automanaged"], ) diff --git a/vendor/k8s.io/kubernetes/pkg/fields/doc.go b/vendor/k8s.io/kubernetes/pkg/fields/doc.go index 3129b02a..9c662bf9 100644 --- a/vendor/k8s.io/kubernetes/pkg/fields/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/fields/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Package fields implements a simple field system, parsing and matching -// selectors with sets of fields. -package fields // import "k8s.io/kubernetes/pkg/fields" +// Package fields only exists until heapster rebases +// TODO genericapiserver remove this empty package. Godep fails without this because heapster relies +// on this package. This will allow us to start splitting packages, but will force +// heapster to update on their next kube rebase. +package fields diff --git a/vendor/k8s.io/kubernetes/pkg/generated/openapi/zz_generated.openapi.go b/vendor/k8s.io/kubernetes/pkg/generated/openapi/zz_generated.openapi.go index 551c0cc4..9f6f90ec 100644 --- a/vendor/k8s.io/kubernetes/pkg/generated/openapi/zz_generated.openapi.go +++ b/vendor/k8s.io/kubernetes/pkg/generated/openapi/zz_generated.openapi.go @@ -933,6 +933,13 @@ var OpenAPIDefinitions *openapi.OpenAPIDefinitions = &openapi.OpenAPIDefinitions Format: "", }, }, + "optional": { + SchemaProps: spec.SchemaProps{ + Description: "Specify whether the ConfigMap must be defined", + Type: []string{"boolean"}, + Format: "", + }, + }, }, }, }, @@ -957,6 +964,13 @@ var OpenAPIDefinitions *openapi.OpenAPIDefinitions = &openapi.OpenAPIDefinitions Format: "", }, }, + "optional": { + SchemaProps: spec.SchemaProps{ + Description: "Specify whether the ConfigMap or it's key must be defined", + Type: []string{"boolean"}, + Format: "", + }, + }, }, Required: []string{"key"}, }, @@ -1022,7 +1036,7 @@ var OpenAPIDefinitions *openapi.OpenAPIDefinitions = &openapi.OpenAPIDefinitions }, "items": { SchemaProps: spec.SchemaProps{ - Description: "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error. Paths must be relative and may not contain the '..' path or start with '..'.", + Description: "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ @@ -1040,6 +1054,13 @@ var OpenAPIDefinitions *openapi.OpenAPIDefinitions = &openapi.OpenAPIDefinitions Format: "int32", }, }, + "optional": { + SchemaProps: spec.SchemaProps{ + Description: "Specify whether the ConfigMap or it's keys must be defined", + Type: []string{"boolean"}, + Format: "", + }, + }, }, }, }, @@ -1178,7 +1199,14 @@ var OpenAPIDefinitions *openapi.OpenAPIDefinitions = &openapi.OpenAPIDefinitions }, "terminationMessagePath": { SchemaProps: spec.SchemaProps{ - Description: "Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated.", + Description: "Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated.", + Type: []string{"string"}, + Format: "", + }, + }, + "terminationMessagePolicy": { + SchemaProps: spec.SchemaProps{ + Description: "Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.", Type: []string{"string"}, Format: "", }, @@ -1550,7 +1578,7 @@ var OpenAPIDefinitions *openapi.OpenAPIDefinitions = &openapi.OpenAPIDefinitions "v1.DeleteOptions": { Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "DeleteOptions may be provided when deleting an API object", + Description: "DeleteOptions may be provided when deleting an API object.", Properties: map[string]spec.Schema{ "kind": { SchemaProps: spec.SchemaProps{ @@ -1924,11 +1952,17 @@ var OpenAPIDefinitions *openapi.OpenAPIDefinitions = &openapi.OpenAPIDefinitions Ref: spec.MustCreateRef("#/definitions/v1.ConfigMapEnvSource"), }, }, + "secretRef": { + SchemaProps: spec.SchemaProps{ + Description: "The Secret to select from", + Ref: spec.MustCreateRef("#/definitions/v1.SecretEnvSource"), + }, + }, }, }, }, Dependencies: []string{ - "v1.ConfigMapEnvSource"}, + "v1.ConfigMapEnvSource", "v1.SecretEnvSource"}, }, "v1.EnvVar": { Schema: spec.Schema{ @@ -5877,6 +5911,44 @@ var OpenAPIDefinitions *openapi.OpenAPIDefinitions = &openapi.OpenAPIDefinitions Dependencies: []string{ "v1.Time"}, }, + "v1.PodPortForwardOptions": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodPortForwardOptions is the query options to a Pod's port forward call when using WebSockets. The `port` query parameter must specify the port or ports (comma separated) to forward over. Port forwarding over SPDY does not use these options. It requires the port to be passed in the `port` header as part of request.", + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "ports": { + SchemaProps: spec.SchemaProps{ + Description: "List of ports to forward Required when using WebSockets", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{}, + }, "v1.PodProxyOptions": { Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -6131,6 +6203,13 @@ var OpenAPIDefinitions *openapi.OpenAPIDefinitions = &openapi.OpenAPIDefinitions Ref: spec.MustCreateRef("#/definitions/v1.Affinity"), }, }, + "schedulername": { + SchemaProps: spec.SchemaProps{ + Description: "If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler.", + Type: []string{"string"}, + Format: "", + }, + }, }, Required: []string{"containers"}, }, @@ -7360,6 +7439,30 @@ var OpenAPIDefinitions *openapi.OpenAPIDefinitions = &openapi.OpenAPIDefinitions Dependencies: []string{ "v1.ObjectMeta"}, }, + "v1.SecretEnvSource": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SecretEnvSource selects a Secret to populate the environment variables with.\n\nThe contents of the target Secret's Data field will represent the key-value pairs as environment variables.", + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names", + Type: []string{"string"}, + Format: "", + }, + }, + "optional": { + SchemaProps: spec.SchemaProps{ + Description: "Specify whether the Secret must be defined", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{}, + }, "v1.SecretKeySelector": { Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -7379,6 +7482,13 @@ var OpenAPIDefinitions *openapi.OpenAPIDefinitions = &openapi.OpenAPIDefinitions Format: "", }, }, + "optional": { + SchemaProps: spec.SchemaProps{ + Description: "Specify whether the Secret or it's key must be defined", + Type: []string{"boolean"}, + Format: "", + }, + }, }, Required: []string{"key"}, }, @@ -7444,7 +7554,7 @@ var OpenAPIDefinitions *openapi.OpenAPIDefinitions = &openapi.OpenAPIDefinitions }, "items": { SchemaProps: spec.SchemaProps{ - Description: "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error. Paths must be relative and may not contain the '..' path or start with '..'.", + Description: "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ @@ -7462,6 +7572,13 @@ var OpenAPIDefinitions *openapi.OpenAPIDefinitions = &openapi.OpenAPIDefinitions Format: "int32", }, }, + "optional": { + SchemaProps: spec.SchemaProps{ + Description: "Specify whether the Secret or it's keys must be defined", + Type: []string{"boolean"}, + Format: "", + }, + }, }, }, }, @@ -8866,216 +8983,6 @@ var OpenAPIDefinitions *openapi.OpenAPIDefinitions = &openapi.OpenAPIDefinitions Dependencies: []string{ "runtime.RawExtension"}, }, - "v1alpha1.CertificateSigningRequest": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Describes a certificate signing request", - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Ref: spec.MustCreateRef("#/definitions/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "The certificate request itself and any additional information.", - Ref: spec.MustCreateRef("#/definitions/v1alpha1.CertificateSigningRequestSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Derived information about the request.", - Ref: spec.MustCreateRef("#/definitions/v1alpha1.CertificateSigningRequestStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "v1.ObjectMeta", "v1alpha1.CertificateSigningRequestSpec", "v1alpha1.CertificateSigningRequestStatus"}, - }, - "v1alpha1.CertificateSigningRequestCondition": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "request approval state, currently Approved or Denied.", - Type: []string{"string"}, - Format: "", - }, - }, - "reason": { - SchemaProps: spec.SchemaProps{ - Description: "brief reason for the request state", - Type: []string{"string"}, - Format: "", - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "human readable message with details about the request state", - Type: []string{"string"}, - Format: "", - }, - }, - "lastUpdateTime": { - SchemaProps: spec.SchemaProps{ - Description: "timestamp for the last update to this condition", - Ref: spec.MustCreateRef("#/definitions/v1.Time"), - }, - }, - }, - Required: []string{"type"}, - }, - }, - Dependencies: []string{ - "v1.Time"}, - }, - "v1alpha1.CertificateSigningRequestList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Ref: spec.MustCreateRef("#/definitions/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: spec.MustCreateRef("#/definitions/v1alpha1.CertificateSigningRequest"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "v1.ListMeta", "v1alpha1.CertificateSigningRequest"}, - }, - "v1alpha1.CertificateSigningRequestSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "This information is immutable after the request is created. Only the Request and ExtraInfo fields can be set on creation, other fields are derived by Kubernetes and cannot be modified by users.", - Properties: map[string]spec.Schema{ - "request": { - SchemaProps: spec.SchemaProps{ - Description: "Base64-encoded PKCS#10 CSR data", - Type: []string{"string"}, - Format: "byte", - }, - }, - "usages": { - SchemaProps: spec.SchemaProps{ - Description: "allowedUsages specifies a set of usage contexts the key will be valid for. See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3\n https://tools.ietf.org/html/rfc5280#section-4.2.1.12", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "username": { - SchemaProps: spec.SchemaProps{ - Description: "Information about the requesting user (if relevant) See user.Info interface for details", - Type: []string{"string"}, - Format: "", - }, - }, - "uid": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "groups": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - Required: []string{"request"}, - }, - }, - Dependencies: []string{}, - }, - "v1alpha1.CertificateSigningRequestStatus": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Properties: map[string]spec.Schema{ - "conditions": { - SchemaProps: spec.SchemaProps{ - Description: "Conditions applied to the request, such as approval or denial.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: spec.MustCreateRef("#/definitions/v1alpha1.CertificateSigningRequestCondition"), - }, - }, - }, - }, - }, - "certificate": { - SchemaProps: spec.SchemaProps{ - Description: "If request was approved, the controller will place the issued certificate here.", - Type: []string{"string"}, - Format: "byte", - }, - }, - }, - }, - }, - Dependencies: []string{ - "v1alpha1.CertificateSigningRequestCondition"}, - }, "v1alpha1.ClusterRole": { Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -9659,7 +9566,7 @@ var OpenAPIDefinitions *openapi.OpenAPIDefinitions = &openapi.OpenAPIDefinitions }, "schedulerName": { SchemaProps: spec.SchemaProps{ - Description: "schedulerName is name of the scheduler, used to select which pods will be processed by this scheduler, based on pod's annotation with key 'scheduler.alpha.kubernetes.io/name'.", + Description: "schedulerName is name of the scheduler, used to select which pods will be processed by this scheduler, based on pod's \"spec.SchedulerName\".", Type: []string{"string"}, Format: "", }, @@ -10611,6 +10518,13 @@ var OpenAPIDefinitions *openapi.OpenAPIDefinitions = &openapi.OpenAPIDefinitions Format: "", }, }, + "keepTerminatedPodVolumes": { + SchemaProps: spec.SchemaProps{ + Description: "This flag, if set, instructs the kubelet to keep volumes from terminated pods mounted to the node. This can be useful for debugging volume related issues.", + Type: []string{"boolean"}, + Format: "", + }, + }, }, Required: []string{"podManifestPath", "syncFrequency", "fileCheckFrequency", "httpCheckFrequency", "manifestURL", "manifestURLHeader", "enableServer", "address", "port", "readOnlyPort", "tlsCertFile", "tlsPrivateKeyFile", "certDirectory", "authentication", "authorization", "hostnameOverride", "podInfraContainerImage", "dockerEndpoint", "rootDirectory", "seccompProfileRoot", "allowPrivileged", "hostNetworkSources", "hostPIDSources", "hostIPCSources", "registryPullQPS", "registryBurst", "eventRecordQPS", "eventBurst", "enableDebuggingHandlers", "minimumGCAge", "maxPerPodContainerCount", "maxContainerCount", "cAdvisorPort", "healthzPort", "healthzBindAddress", "oomScoreAdj", "registerNode", "clusterDomain", "masterServiceNamespace", "clusterDNS", "streamingConnectionIdleTimeout", "nodeStatusUpdateFrequency", "imageMinimumGCAge", "imageGCHighThresholdPercent", "imageGCLowThresholdPercent", "lowDiskSpaceThresholdMB", "volumeStatsAggPeriod", "networkPluginName", "networkPluginDir", "cniConfDir", "cniBinDir", "networkPluginMTU", "volumePluginDir", "cloudProvider", "cloudConfigFile", "kubeletCgroups", "runtimeCgroups", "systemCgroups", "cgroupRoot", "containerRuntime", "remoteRuntimeEndpoint", "remoteImageEndpoint", "runtimeRequestTimeout", "rktPath", "rktAPIEndpoint", "rktStage1Image", "lockFilePath", "exitOnLockContention", "hairpinMode", "babysitDaemons", "maxPods", "nvidiaGPUs", "dockerExecHandlerName", "podCIDR", "resolvConf", "cpuCFSQuota", "containerized", "maxOpenFiles", "registerSchedulable", "registerWithTaints", "contentType", "kubeAPIQPS", "kubeAPIBurst", "serializeImagePulls", "outOfDiskTransitionFrequency", "nodeIP", "nodeLabels", "nonMasqueradeCIDR", "enableCustomMetrics", "evictionHard", "evictionSoft", "evictionSoftGracePeriod", "evictionPressureTransitionPeriod", "evictionMaxPodGracePeriod", "evictionMinimumReclaim", "experimentalKernelMemcgNotification", "podsPerCore", "enableControllerAttachDetach", "systemReserved", "kubeReserved", "protectKernelDefaults", "makeIPTablesUtilChains", "iptablesMasqueradeBit", "iptablesDropBit"}, }, @@ -10738,12 +10652,6 @@ var OpenAPIDefinitions *openapi.OpenAPIDefinitions = &openapi.OpenAPIDefinitions }, }, }, - "attributeRestrictions": { - SchemaProps: spec.SchemaProps{ - Description: "AttributeRestrictions will vary depending on what the Authorizer/AuthorizationAttributeBuilder pair supports. If the Authorizer does not recognize how to handle the AttributeRestrictions, the Authorizer should report an error.", - Ref: spec.MustCreateRef("#/definitions/runtime.RawExtension"), - }, - }, "apiGroups": { SchemaProps: spec.SchemaProps{ Description: "APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed.", @@ -10804,8 +10712,7 @@ var OpenAPIDefinitions *openapi.OpenAPIDefinitions = &openapi.OpenAPIDefinitions Required: []string{"verbs"}, }, }, - Dependencies: []string{ - "runtime.RawExtension"}, + Dependencies: []string{}, }, "v1alpha1.PolicyRuleBuilder": { Schema: spec.Schema{ @@ -11115,6 +11022,216 @@ var OpenAPIDefinitions *openapi.OpenAPIDefinitions = &openapi.OpenAPIDefinitions }, Dependencies: []string{}, }, + "v1beta1.CertificateSigningRequest": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Describes a certificate signing request", + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Ref: spec.MustCreateRef("#/definitions/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "The certificate request itself and any additional information.", + Ref: spec.MustCreateRef("#/definitions/v1beta1.CertificateSigningRequestSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Derived information about the request.", + Ref: spec.MustCreateRef("#/definitions/v1beta1.CertificateSigningRequestStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "v1.ObjectMeta", "v1beta1.CertificateSigningRequestSpec", "v1beta1.CertificateSigningRequestStatus"}, + }, + "v1beta1.CertificateSigningRequestCondition": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "request approval state, currently Approved or Denied.", + Type: []string{"string"}, + Format: "", + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "brief reason for the request state", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "human readable message with details about the request state", + Type: []string{"string"}, + Format: "", + }, + }, + "lastUpdateTime": { + SchemaProps: spec.SchemaProps{ + Description: "timestamp for the last update to this condition", + Ref: spec.MustCreateRef("#/definitions/v1.Time"), + }, + }, + }, + Required: []string{"type"}, + }, + }, + Dependencies: []string{ + "v1.Time"}, + }, + "v1beta1.CertificateSigningRequestList": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Ref: spec.MustCreateRef("#/definitions/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: spec.MustCreateRef("#/definitions/v1beta1.CertificateSigningRequest"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "v1.ListMeta", "v1beta1.CertificateSigningRequest"}, + }, + "v1beta1.CertificateSigningRequestSpec": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "This information is immutable after the request is created. Only the Request and ExtraInfo fields can be set on creation, other fields are derived by Kubernetes and cannot be modified by users.", + Properties: map[string]spec.Schema{ + "request": { + SchemaProps: spec.SchemaProps{ + Description: "Base64-encoded PKCS#10 CSR data", + Type: []string{"string"}, + Format: "byte", + }, + }, + "usages": { + SchemaProps: spec.SchemaProps{ + Description: "allowedUsages specifies a set of usage contexts the key will be valid for. See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3\n https://tools.ietf.org/html/rfc5280#section-4.2.1.12", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "username": { + SchemaProps: spec.SchemaProps{ + Description: "Information about the requesting user (if relevant) See user.Info interface for details", + Type: []string{"string"}, + Format: "", + }, + }, + "uid": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "groups": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"request"}, + }, + }, + Dependencies: []string{}, + }, + "v1beta1.CertificateSigningRequestStatus": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Properties: map[string]spec.Schema{ + "conditions": { + SchemaProps: spec.SchemaProps{ + Description: "Conditions applied to the request, such as approval or denial.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: spec.MustCreateRef("#/definitions/v1beta1.CertificateSigningRequestCondition"), + }, + }, + }, + }, + }, + "certificate": { + SchemaProps: spec.SchemaProps{ + Description: "If request was approved, the controller will place the issued certificate here.", + Type: []string{"string"}, + Format: "byte", + }, + }, + }, + }, + }, + Dependencies: []string{ + "v1beta1.CertificateSigningRequestCondition"}, + }, "v1beta1.Cluster": { Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -11255,6 +11372,209 @@ var OpenAPIDefinitions *openapi.OpenAPIDefinitions = &openapi.OpenAPIDefinitions Dependencies: []string{ "v1.ListMeta", "v1beta1.Cluster"}, }, + "v1beta1.ClusterRole": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.", + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard object's metadata.", + Ref: spec.MustCreateRef("#/definitions/v1.ObjectMeta"), + }, + }, + "rules": { + SchemaProps: spec.SchemaProps{ + Description: "Rules holds all the PolicyRules for this ClusterRole", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: spec.MustCreateRef("#/definitions/v1beta1.PolicyRule"), + }, + }, + }, + }, + }, + }, + Required: []string{"rules"}, + }, + }, + Dependencies: []string{ + "v1.ObjectMeta", "v1beta1.PolicyRule"}, + }, + "v1beta1.ClusterRoleBinding": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject.", + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard object's metadata.", + Ref: spec.MustCreateRef("#/definitions/v1.ObjectMeta"), + }, + }, + "subjects": { + SchemaProps: spec.SchemaProps{ + Description: "Subjects holds references to the objects the role applies to.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: spec.MustCreateRef("#/definitions/v1beta1.Subject"), + }, + }, + }, + }, + }, + "roleRef": { + SchemaProps: spec.SchemaProps{ + Description: "RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", + Ref: spec.MustCreateRef("#/definitions/v1beta1.RoleRef"), + }, + }, + }, + Required: []string{"subjects", "roleRef"}, + }, + }, + Dependencies: []string{ + "v1.ObjectMeta", "v1beta1.RoleRef", "v1beta1.Subject"}, + }, + "v1beta1.ClusterRoleBindingBuilder": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ClusterRoleBindingBuilder let's us attach methods. A no-no for API types. We use it to construct bindings in code. It's more compact than trying to write them out in a literal.", + Properties: map[string]spec.Schema{ + "ClusterRoleBinding": { + SchemaProps: spec.SchemaProps{ + Ref: spec.MustCreateRef("#/definitions/v1beta1.ClusterRoleBinding"), + }, + }, + }, + Required: []string{"ClusterRoleBinding"}, + }, + }, + Dependencies: []string{ + "v1beta1.ClusterRoleBinding"}, + }, + "v1beta1.ClusterRoleBindingList": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ClusterRoleBindingList is a collection of ClusterRoleBindings", + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard object's metadata.", + Ref: spec.MustCreateRef("#/definitions/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items is a list of ClusterRoleBindings", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: spec.MustCreateRef("#/definitions/v1beta1.ClusterRoleBinding"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "v1.ListMeta", "v1beta1.ClusterRoleBinding"}, + }, + "v1beta1.ClusterRoleList": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ClusterRoleList is a collection of ClusterRoles", + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard object's metadata.", + Ref: spec.MustCreateRef("#/definitions/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items is a list of ClusterRoles", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: spec.MustCreateRef("#/definitions/v1beta1.ClusterRole"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "v1.ListMeta", "v1beta1.ClusterRole"}, + }, "v1beta1.ClusterSpec": { Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -13203,6 +13523,104 @@ var OpenAPIDefinitions *openapi.OpenAPIDefinitions = &openapi.OpenAPIDefinitions Dependencies: []string{ "v1beta1.PolicySpec"}, }, + "v1beta1.PolicyRule": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.", + Properties: map[string]spec.Schema{ + "verbs": { + SchemaProps: spec.SchemaProps{ + Description: "Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "apiGroups": { + SchemaProps: spec.SchemaProps{ + Description: "APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "resources": { + SchemaProps: spec.SchemaProps{ + Description: "Resources is a list of resources this rule applies to. ResourceAll represents all resources.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "resourceNames": { + SchemaProps: spec.SchemaProps{ + Description: "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "nonResourceURLs": { + SchemaProps: spec.SchemaProps{ + Description: "NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as \"pods\" or \"secrets\") or non-resource URL paths (such as \"/api\"), but not both.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"verbs"}, + }, + }, + Dependencies: []string{}, + }, + "v1beta1.PolicyRuleBuilder": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PolicyRuleBuilder let's us attach methods. A no-no for API types. We use it to construct rules in code. It's more compact than trying to write them out in a literal and allows us to perform some basic checking during construction", + Properties: map[string]spec.Schema{ + "PolicyRule": { + SchemaProps: spec.SchemaProps{ + Ref: spec.MustCreateRef("#/definitions/v1beta1.PolicyRule"), + }, + }, + }, + Required: []string{"PolicyRule"}, + }, + }, + Dependencies: []string{ + "v1beta1.PolicyRule"}, + }, "v1beta1.PolicySpec": { Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -13576,6 +13994,224 @@ var OpenAPIDefinitions *openapi.OpenAPIDefinitions = &openapi.OpenAPIDefinitions }, Dependencies: []string{}, }, + "v1beta1.Role": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.", + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard object's metadata.", + Ref: spec.MustCreateRef("#/definitions/v1.ObjectMeta"), + }, + }, + "rules": { + SchemaProps: spec.SchemaProps{ + Description: "Rules holds all the PolicyRules for this Role", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: spec.MustCreateRef("#/definitions/v1beta1.PolicyRule"), + }, + }, + }, + }, + }, + }, + Required: []string{"rules"}, + }, + }, + Dependencies: []string{ + "v1.ObjectMeta", "v1beta1.PolicyRule"}, + }, + "v1beta1.RoleBinding": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace.", + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard object's metadata.", + Ref: spec.MustCreateRef("#/definitions/v1.ObjectMeta"), + }, + }, + "subjects": { + SchemaProps: spec.SchemaProps{ + Description: "Subjects holds references to the objects the role applies to.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: spec.MustCreateRef("#/definitions/v1beta1.Subject"), + }, + }, + }, + }, + }, + "roleRef": { + SchemaProps: spec.SchemaProps{ + Description: "RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", + Ref: spec.MustCreateRef("#/definitions/v1beta1.RoleRef"), + }, + }, + }, + Required: []string{"subjects", "roleRef"}, + }, + }, + Dependencies: []string{ + "v1.ObjectMeta", "v1beta1.RoleRef", "v1beta1.Subject"}, + }, + "v1beta1.RoleBindingList": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RoleBindingList is a collection of RoleBindings", + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard object's metadata.", + Ref: spec.MustCreateRef("#/definitions/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items is a list of RoleBindings", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: spec.MustCreateRef("#/definitions/v1beta1.RoleBinding"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "v1.ListMeta", "v1beta1.RoleBinding"}, + }, + "v1beta1.RoleList": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RoleList is a collection of Roles", + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "Standard object's metadata.", + Ref: spec.MustCreateRef("#/definitions/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Description: "Items is a list of Roles", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: spec.MustCreateRef("#/definitions/v1beta1.Role"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "v1.ListMeta", "v1beta1.Role"}, + }, + "v1beta1.RoleRef": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RoleRef contains information that points to the role being used", + Properties: map[string]spec.Schema{ + "apiGroup": { + SchemaProps: spec.SchemaProps{ + Description: "APIGroup is the group for the resource being referenced", + Type: []string{"string"}, + Format: "", + }, + }, + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is the type of resource being referenced", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name is the name of resource being referenced", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"apiGroup", "kind", "name"}, + }, + }, + Dependencies: []string{}, + }, "v1beta1.RollbackConfig": { Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -14121,6 +14757,45 @@ var OpenAPIDefinitions *openapi.OpenAPIDefinitions = &openapi.OpenAPIDefinitions Dependencies: []string{ "v1.ListMeta", "v1beta1.StorageClass"}, }, + "v1beta1.Subject": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names.", + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\". If the Authorizer does not recognized the kind value, the Authorizer should report an error.", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion holds the API group and version of the referenced object.", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the object being referenced.", + Type: []string{"string"}, + Format: "", + }, + }, + "namespace": { + SchemaProps: spec.SchemaProps{ + Description: "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty the Authorizer should report an error.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"kind", "name"}, + }, + }, + Dependencies: []string{}, + }, "v1beta1.SubjectAccessReview": { Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/BUILD b/vendor/k8s.io/kubernetes/pkg/genericapiserver/BUILD index 1bc76baa..842a0828 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/BUILD @@ -5,110 +5,12 @@ licenses(["notice"]) load( "@io_bazel_rules_go//go:def.bzl", "go_library", - "go_test", ) go_library( name = "go_default_library", - srcs = [ - "config.go", - "config_selfclient.go", - "discovery.go", - "doc.go", - "genericapiserver.go", - "healthz.go", - "hooks.go", - "resource_config.go", - "resource_encoding_config.go", - "serve.go", - "storage_factory.go", - ], + srcs = ["doc.go"], tags = ["automanaged"], - deps = [ - "//pkg/admission:go_default_library", - "//pkg/api:go_default_library", - "//pkg/auth/handlers:go_default_library", - "//pkg/client/restclient:go_default_library", - "//pkg/genericapiserver/api:go_default_library", - "//pkg/genericapiserver/api/filters:go_default_library", - "//pkg/genericapiserver/api/openapi:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", - "//pkg/genericapiserver/authenticator:go_default_library", - "//pkg/genericapiserver/authorizer:go_default_library", - "//pkg/genericapiserver/filters:go_default_library", - "//pkg/genericapiserver/mux:go_default_library", - "//pkg/genericapiserver/options:go_default_library", - "//pkg/genericapiserver/routes:go_default_library", - "//pkg/storage/storagebackend:go_default_library", - "//pkg/util/cert:go_default_library", - "//pkg/version:go_default_library", - "//vendor:github.com/coreos/go-systemd/daemon", - "//vendor:github.com/emicklei/go-restful", - "//vendor:github.com/emicklei/go-restful/swagger", - "//vendor:github.com/go-openapi/spec", - "//vendor:github.com/golang/glog", - "//vendor:github.com/pborman/uuid", - "//vendor:github.com/pkg/errors", - "//vendor:gopkg.in/natefinch/lumberjack.v2", - "//vendor:k8s.io/apimachinery/pkg/apimachinery", - "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", - "//vendor:k8s.io/apimachinery/pkg/openapi", - "//vendor:k8s.io/apimachinery/pkg/runtime", - "//vendor:k8s.io/apimachinery/pkg/runtime/schema", - "//vendor:k8s.io/apimachinery/pkg/runtime/serializer/recognizer", - "//vendor:k8s.io/apimachinery/pkg/util/net", - "//vendor:k8s.io/apimachinery/pkg/util/runtime", - "//vendor:k8s.io/apimachinery/pkg/util/sets", - "//vendor:k8s.io/apimachinery/pkg/util/validation", - "//vendor:k8s.io/apiserver/pkg/authentication/authenticator", - "//vendor:k8s.io/apiserver/pkg/authentication/request/union", - "//vendor:k8s.io/apiserver/pkg/authentication/user", - "//vendor:k8s.io/apiserver/pkg/authorization/authorizer", - "//vendor:k8s.io/apiserver/pkg/authorization/union", - "//vendor:k8s.io/apiserver/pkg/healthz", - "//vendor:k8s.io/apiserver/pkg/request", - ], -) - -go_test( - name = "go_default_test", - srcs = [ - "genericapiserver_test.go", - "resource_config_test.go", - "serve_test.go", - "server_run_options_test.go", - "storage_factory_test.go", - ], - library = ":go_default_library", - tags = ["automanaged"], - deps = [ - "//pkg/api:go_default_library", - "//pkg/api/testapi:go_default_library", - "//pkg/api/v1:go_default_library", - "//pkg/apis/autoscaling:go_default_library", - "//pkg/apis/extensions:go_default_library", - "//pkg/client/clientset_generated/clientset:go_default_library", - "//pkg/generated/openapi:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", - "//pkg/genericapiserver/options:go_default_library", - "//pkg/storage/etcd/testing:go_default_library", - "//pkg/storage/storagebackend:go_default_library", - "//pkg/util/cert:go_default_library", - "//pkg/util/config:go_default_library", - "//pkg/version:go_default_library", - "//vendor:github.com/go-openapi/spec", - "//vendor:github.com/stretchr/testify/assert", - "//vendor:k8s.io/apimachinery/pkg/api/meta", - "//vendor:k8s.io/apimachinery/pkg/apimachinery", - "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", - "//vendor:k8s.io/apimachinery/pkg/runtime", - "//vendor:k8s.io/apimachinery/pkg/runtime/schema", - "//vendor:k8s.io/apimachinery/pkg/util/net", - "//vendor:k8s.io/apimachinery/pkg/util/sets", - "//vendor:k8s.io/apiserver/pkg/authentication/user", - "//vendor:k8s.io/apiserver/pkg/authorization/authorizer", - "//vendor:k8s.io/apiserver/pkg/request", - ], ) filegroup( @@ -122,14 +24,11 @@ filegroup( name = "all-srcs", srcs = [ ":package-srcs", - "//pkg/genericapiserver/api:all-srcs", "//pkg/genericapiserver/authenticator:all-srcs", "//pkg/genericapiserver/authorizer:all-srcs", - "//pkg/genericapiserver/filters:all-srcs", - "//pkg/genericapiserver/mux:all-srcs", - "//pkg/genericapiserver/openapi:all-srcs", - "//pkg/genericapiserver/options:all-srcs", - "//pkg/genericapiserver/routes:all-srcs", + "//pkg/genericapiserver/endpoints:all-srcs", + "//pkg/genericapiserver/registry:all-srcs", + "//pkg/genericapiserver/server:all-srcs", ], tags = ["automanaged"], ) diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/rest/types.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/rest/types.go deleted file mode 100644 index 935fbd47..00000000 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/rest/types.go +++ /dev/null @@ -1,42 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package rest - -import ( - "k8s.io/apimachinery/pkg/runtime" -) - -// ObjectFunc is a function to act on a given object. An error may be returned -// if the hook cannot be completed. An ObjectFunc may transform the provided -// object. -type ObjectFunc func(obj runtime.Object) error - -// AllFuncs returns an ObjectFunc that attempts to run all of the provided functions -// in order, returning early if there are any errors. -func AllFuncs(fns ...ObjectFunc) ObjectFunc { - return func(obj runtime.Object) error { - for _, fn := range fns { - if fn == nil { - continue - } - if err := fn(obj); err != nil { - return err - } - } - return nil - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/authenticator/BUILD b/vendor/k8s.io/kubernetes/pkg/genericapiserver/authenticator/BUILD index 7af1365f..606bd1da 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/authenticator/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/authenticator/BUILD @@ -16,7 +16,6 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/util/cert:go_default_library", "//plugin/pkg/auth/authenticator/token/webhook:go_default_library", "//vendor:github.com/go-openapi/spec", "//vendor:k8s.io/apiserver/pkg/authentication/authenticator", @@ -29,6 +28,7 @@ go_library( "//vendor:k8s.io/apiserver/pkg/authentication/token/tokenfile", "//vendor:k8s.io/apiserver/pkg/authentication/user", "//vendor:k8s.io/client-go/kubernetes/typed/authentication/v1beta1", + "//vendor:k8s.io/client-go/util/cert", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/authenticator/delegating.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/authenticator/delegating.go index 97ed9fac..275c91a0 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/authenticator/delegating.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/authenticator/delegating.go @@ -33,7 +33,7 @@ import ( "k8s.io/apiserver/pkg/authentication/user" authenticationclient "k8s.io/client-go/kubernetes/typed/authentication/v1beta1" - "k8s.io/kubernetes/pkg/util/cert" + "k8s.io/client-go/util/cert" webhooktoken "k8s.io/kubernetes/plugin/pkg/auth/authenticator/token/webhook" ) diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/doc.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/doc.go index 9aee5ea3..c8b72f4e 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/doc.go @@ -15,7 +15,7 @@ limitations under the License. */ // Package genericapiserver contains code to setup a generic kubernetes-like API server. -// This does not contain any kubernetes API specific code. +// This does not contain any Kubernetes specific API types. // Note that this is a work in progress. We are pulling out generic code (specifically from // pkg/master) here. // We plan to move this package into a separate repo on github once it is done. diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/BUILD b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/BUILD similarity index 63% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/api/BUILD rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/BUILD index 0a8ed336..be06efbf 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/BUILD @@ -8,37 +8,6 @@ load( "go_test", ) -go_library( - name = "go_default_library", - srcs = [ - "apiserver.go", - "discovery.go", - "doc.go", - "groupversion.go", - "installer.go", - ], - tags = ["automanaged"], - deps = [ - "//pkg/admission:go_default_library", - "//pkg/api:go_default_library", - "//pkg/apis/extensions:go_default_library", - "//pkg/genericapiserver/api/handlers:go_default_library", - "//pkg/genericapiserver/api/handlers/responsewriters:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", - "//vendor:github.com/emicklei/go-restful", - "//vendor:k8s.io/apimachinery/pkg/api/errors", - "//vendor:k8s.io/apimachinery/pkg/api/meta", - "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", - "//vendor:k8s.io/apimachinery/pkg/conversion", - "//vendor:k8s.io/apimachinery/pkg/runtime", - "//vendor:k8s.io/apimachinery/pkg/runtime/schema", - "//vendor:k8s.io/apimachinery/pkg/util/errors", - "//vendor:k8s.io/apiserver/pkg/handlers/negotiation", - "//vendor:k8s.io/apiserver/pkg/metrics", - "//vendor:k8s.io/apiserver/pkg/request", - ], -) - go_test( name = "go_default_test", srcs = [ @@ -50,23 +19,23 @@ go_test( library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/admission:go_default_library", "//pkg/api:go_default_library", "//pkg/api/testing:go_default_library", "//pkg/api/v1:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/genericapiserver/api/filters:go_default_library", - "//pkg/genericapiserver/api/handlers:go_default_library", - "//pkg/genericapiserver/api/handlers/responsewriters:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", - "//pkg/genericapiserver/api/testing:go_default_library", + "//pkg/genericapiserver/endpoints/filters:go_default_library", + "//pkg/genericapiserver/endpoints/handlers:go_default_library", + "//pkg/genericapiserver/endpoints/handlers/responsewriters:go_default_library", + "//pkg/genericapiserver/endpoints/testing:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//plugin/pkg/admission/admit:go_default_library", "//plugin/pkg/admission/deny:go_default_library", "//vendor:github.com/emicklei/go-restful", "//vendor:golang.org/x/net/websocket", "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/api/meta", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/internalversion", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", @@ -76,7 +45,39 @@ go_test( "//vendor:k8s.io/apimachinery/pkg/util/sets", "//vendor:k8s.io/apimachinery/pkg/util/wait", "//vendor:k8s.io/apimachinery/pkg/watch", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/admission", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", + ], +) + +go_library( + name = "go_default_library", + srcs = [ + "apiserver.go", + "discovery.go", + "doc.go", + "groupversion.go", + "installer.go", + ], + tags = ["automanaged"], + deps = [ + "//pkg/apis/extensions:go_default_library", + "//pkg/genericapiserver/endpoints/handlers:go_default_library", + "//pkg/genericapiserver/endpoints/handlers/responsewriters:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", + "//vendor:github.com/emicklei/go-restful", + "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/api/meta", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/conversion", + "//vendor:k8s.io/apimachinery/pkg/runtime", + "//vendor:k8s.io/apimachinery/pkg/runtime/schema", + "//vendor:k8s.io/apimachinery/pkg/types", + "//vendor:k8s.io/apimachinery/pkg/util/errors", + "//vendor:k8s.io/apiserver/pkg/admission", + "//vendor:k8s.io/apiserver/pkg/endpoints/handlers/negotiation", + "//vendor:k8s.io/apiserver/pkg/endpoints/metrics", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) @@ -91,11 +92,10 @@ filegroup( name = "all-srcs", srcs = [ ":package-srcs", - "//pkg/genericapiserver/api/filters:all-srcs", - "//pkg/genericapiserver/api/handlers:all-srcs", - "//pkg/genericapiserver/api/openapi:all-srcs", - "//pkg/genericapiserver/api/rest:all-srcs", - "//pkg/genericapiserver/api/testing:all-srcs", + "//pkg/genericapiserver/endpoints/filters:all-srcs", + "//pkg/genericapiserver/endpoints/handlers:all-srcs", + "//pkg/genericapiserver/endpoints/openapi:all-srcs", + "//pkg/genericapiserver/endpoints/testing:all-srcs", ], tags = ["automanaged"], ) diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/OWNERS b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/OWNERS similarity index 97% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/api/OWNERS rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/OWNERS index dec7cfcd..bbf15ef1 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/OWNERS @@ -8,7 +8,6 @@ reviewers: - lavalamp - smarterclayton - wojtek-t -- bgrant0607 - deads2k - derekwaynecarr - caesarxuchao diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/apiserver.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/apiserver.go similarity index 91% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/api/apiserver.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/apiserver.go index ff6d8316..933363bf 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/apiserver.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/apiserver.go @@ -14,10 +14,10 @@ See the License for the specific language governing permissions and limitations under the License. */ -package api +package endpoints import ( - "k8s.io/apiserver/pkg/metrics" + "k8s.io/apiserver/pkg/endpoints/metrics" ) func init() { diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/apiserver_test.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/apiserver_test.go similarity index 97% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/api/apiserver_test.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/apiserver_test.go index 05821a38..bab943fd 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/apiserver_test.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/apiserver_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package api +package endpoints import ( "bytes" @@ -36,24 +36,24 @@ import ( apierrs "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" + metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/diff" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/watch" - "k8s.io/apiserver/pkg/request" - "k8s.io/kubernetes/pkg/admission" + "k8s.io/apiserver/pkg/admission" + "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" apitesting "k8s.io/kubernetes/pkg/api/testing" "k8s.io/kubernetes/pkg/api/v1" - apiv1 "k8s.io/kubernetes/pkg/api/v1" - "k8s.io/kubernetes/pkg/fields" - genericapifilters "k8s.io/kubernetes/pkg/genericapiserver/api/filters" - "k8s.io/kubernetes/pkg/genericapiserver/api/handlers/responsewriters" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" - genericapitesting "k8s.io/kubernetes/pkg/genericapiserver/api/testing" + genericapifilters "k8s.io/kubernetes/pkg/genericapiserver/endpoints/filters" + "k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers/responsewriters" + genericapitesting "k8s.io/kubernetes/pkg/genericapiserver/endpoints/testing" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" "k8s.io/kubernetes/plugin/pkg/admission/admit" "k8s.io/kubernetes/plugin/pkg/admission/deny" @@ -118,20 +118,11 @@ func newMapper() *meta.DefaultRESTMapper { } func addGrouplessTypes() { - type ListOptions struct { - Object runtime.Object - metav1.TypeMeta `json:",inline"` - LabelSelector string `json:"labelSelector,omitempty"` - FieldSelector string `json:"fieldSelector,omitempty"` - Watch bool `json:"watch,omitempty"` - ResourceVersion string `json:"resourceVersion,omitempty"` - TimeoutSeconds *int64 `json:"timeoutSeconds,omitempty"` - } api.Scheme.AddKnownTypes(grouplessGroupVersion, - &genericapitesting.Simple{}, &genericapitesting.SimpleList{}, &ListOptions{}, &metav1.ExportOptions{}, - &v1.DeleteOptions{}, &genericapitesting.SimpleGetOptions{}, &genericapitesting.SimpleRoot{}) + &genericapitesting.Simple{}, &genericapitesting.SimpleList{}, &metav1.ListOptions{}, &metav1.ExportOptions{}, + &metav1.DeleteOptions{}, &genericapitesting.SimpleGetOptions{}, &genericapitesting.SimpleRoot{}) api.Scheme.AddKnownTypes(grouplessInternalGroupVersion, - &genericapitesting.Simple{}, &genericapitesting.SimpleList{}, &api.ListOptions{}, &metav1.ExportOptions{}, + &genericapitesting.Simple{}, &genericapitesting.SimpleList{}, &metav1.ExportOptions{}, &genericapitesting.SimpleGetOptions{}, &genericapitesting.SimpleRoot{}) } @@ -146,12 +137,12 @@ func addTestTypes() { TimeoutSeconds *int64 `json:"timeoutSeconds,omitempty"` } api.Scheme.AddKnownTypes(testGroupVersion, - &genericapitesting.Simple{}, &genericapitesting.SimpleList{}, &ListOptions{}, &metav1.ExportOptions{}, - &v1.DeleteOptions{}, &genericapitesting.SimpleGetOptions{}, &genericapitesting.SimpleRoot{}, + &genericapitesting.Simple{}, &genericapitesting.SimpleList{}, &metav1.ExportOptions{}, + &metav1.DeleteOptions{}, &genericapitesting.SimpleGetOptions{}, &genericapitesting.SimpleRoot{}, &SimpleXGSubresource{}) api.Scheme.AddKnownTypes(testGroupVersion, &v1.Pod{}) api.Scheme.AddKnownTypes(testInternalGroupVersion, - &genericapitesting.Simple{}, &genericapitesting.SimpleList{}, &api.ListOptions{}, &metav1.ExportOptions{}, + &genericapitesting.Simple{}, &genericapitesting.SimpleList{}, &metav1.ExportOptions{}, &genericapitesting.SimpleGetOptions{}, &genericapitesting.SimpleRoot{}, &SimpleXGSubresource{}) api.Scheme.AddKnownTypes(testInternalGroupVersion, &api.Pod{}) @@ -164,18 +155,9 @@ func addTestTypes() { } func addNewTestTypes() { - type ListOptions struct { - Object runtime.Object - metav1.TypeMeta `json:",inline"` - LabelSelector string `json:"labelSelector,omitempty"` - FieldSelector string `json:"fieldSelector,omitempty"` - Watch bool `json:"watch,omitempty"` - ResourceVersion string `json:"resourceVersion,omitempty"` - TimeoutSeconds *int64 `json:"timeoutSeconds,omitempty"` - } api.Scheme.AddKnownTypes(newGroupVersion, - &genericapitesting.Simple{}, &genericapitesting.SimpleList{}, &ListOptions{}, &metav1.ExportOptions{}, - &api.DeleteOptions{}, &genericapitesting.SimpleGetOptions{}, &genericapitesting.SimpleRoot{}, + &genericapitesting.Simple{}, &genericapitesting.SimpleList{}, &metav1.ExportOptions{}, + &metav1.DeleteOptions{}, &genericapitesting.SimpleGetOptions{}, &genericapitesting.SimpleRoot{}, &v1.Pod{}, ) metav1.AddToGroupVersion(api.Scheme, newGroupVersion) @@ -314,7 +296,7 @@ func handleInternal(storage map[string]rest.Storage, admissionControl admission. } func TestSimpleSetupRight(t *testing.T) { - s := &genericapitesting.Simple{ObjectMeta: apiv1.ObjectMeta{Name: "aName"}} + s := &genericapitesting.Simple{ObjectMeta: metav1.ObjectMeta{Name: "aName"}} wire, err := runtime.Encode(codec, s) if err != nil { t.Fatal(err) @@ -356,7 +338,7 @@ type SimpleRESTStorage struct { stream *SimpleStream deleted string - deleteOptions *api.DeleteOptions + deleteOptions *metav1.DeleteOptions actualNamespace string namespacePresent bool @@ -394,7 +376,7 @@ func (storage *SimpleRESTStorage) Export(ctx request.Context, name string, opts return obj, storage.errors["export"] } -func (storage *SimpleRESTStorage) List(ctx request.Context, options *api.ListOptions) (runtime.Object, error) { +func (storage *SimpleRESTStorage) List(ctx request.Context, options *metainternalversion.ListOptions) (runtime.Object, error) { storage.checkContext(ctx) result := &genericapitesting.SimpleList{ Items: storage.list, @@ -457,7 +439,7 @@ func (storage *SimpleRESTStorage) checkContext(ctx request.Context) { storage.actualNamespace, storage.namespacePresent = request.NamespaceFrom(ctx) } -func (storage *SimpleRESTStorage) Delete(ctx request.Context, id string, options *api.DeleteOptions) (runtime.Object, error) { +func (storage *SimpleRESTStorage) Delete(ctx request.Context, id string, options *metav1.DeleteOptions) (runtime.Object, error) { storage.checkContext(ctx) storage.deleted = id storage.deleteOptions = options @@ -467,7 +449,7 @@ func (storage *SimpleRESTStorage) Delete(ctx request.Context, id string, options var obj runtime.Object = &metav1.Status{Status: metav1.StatusSuccess} var err error if storage.injectedFunction != nil { - obj, err = storage.injectedFunction(&genericapitesting.Simple{ObjectMeta: apiv1.ObjectMeta{Name: id}}) + obj, err = storage.injectedFunction(&genericapitesting.Simple{ObjectMeta: metav1.ObjectMeta{Name: id}}) } return obj, err } @@ -510,7 +492,7 @@ func (storage *SimpleRESTStorage) Update(ctx request.Context, name string, objIn } // Implement ResourceWatcher. -func (storage *SimpleRESTStorage) Watch(ctx request.Context, options *api.ListOptions) (watch.Interface, error) { +func (storage *SimpleRESTStorage) Watch(ctx request.Context, options *metainternalversion.ListOptions) (watch.Interface, error) { storage.lock.Lock() defer storage.lock.Unlock() storage.checkContext(ctx) @@ -1116,7 +1098,7 @@ func TestNonEmptyList(t *testing.T) { simpleStorage := SimpleRESTStorage{ list: []genericapitesting.Simple{ { - ObjectMeta: apiv1.ObjectMeta{Name: "something", Namespace: "other"}, + ObjectMeta: metav1.ObjectMeta{Name: "something", Namespace: "other"}, Other: "foo", }, }, @@ -1167,7 +1149,7 @@ func TestSelfLinkSkipsEmptyName(t *testing.T) { simpleStorage := SimpleRESTStorage{ list: []genericapitesting.Simple{ { - ObjectMeta: apiv1.ObjectMeta{Namespace: "other"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "other"}, Other: "foo", }, }, @@ -1241,7 +1223,7 @@ func TestExport(t *testing.T) { storage := map[string]rest.Storage{} simpleStorage := SimpleRESTStorage{ item: genericapitesting.Simple{ - ObjectMeta: apiv1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ ResourceVersion: "1234", CreationTimestamp: metav1.NewTime(time.Unix(10, 10)), }, @@ -1960,7 +1942,7 @@ func TestDeleteWithOptions(t *testing.T) { defer server.Close() grace := int64(300) - item := &api.DeleteOptions{ + item := &metav1.DeleteOptions{ GracePeriodSeconds: &grace, } body, err := runtime.Encode(codec, item) @@ -2001,7 +1983,7 @@ func TestDeleteWithOptionsQuery(t *testing.T) { defer server.Close() grace := int64(300) - item := &api.DeleteOptions{ + item := &metav1.DeleteOptions{ GracePeriodSeconds: &grace, } @@ -2038,7 +2020,7 @@ func TestDeleteWithOptionsQueryAndBody(t *testing.T) { defer server.Close() grace := int64(300) - item := &api.DeleteOptions{ + item := &metav1.DeleteOptions{ GracePeriodSeconds: &grace, } body, err := runtime.Encode(codec, item) @@ -2104,7 +2086,7 @@ func TestLegacyDeleteIgnoresOptions(t *testing.T) { server := httptest.NewServer(handler) defer server.Close() - item := api.NewDeleteOptions(300) + item := metav1.NewDeleteOptions(300) body, err := runtime.Encode(codec, item) if err != nil { t.Fatalf("unexpected error: %v", err) @@ -2174,7 +2156,7 @@ func TestPatch(t *testing.T) { storage := map[string]rest.Storage{} ID := "id" item := &genericapitesting.Simple{ - ObjectMeta: apiv1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: ID, Namespace: "", // update should allow the client to send an empty namespace UID: "uid", @@ -2187,7 +2169,7 @@ func TestPatch(t *testing.T) { t: t, expectedSet: "/" + prefix + "/" + testGroupVersion.Group + "/" + testGroupVersion.Version + "/namespaces/default/simple/" + ID, name: ID, - namespace: api.NamespaceDefault, + namespace: metav1.NamespaceDefault, } handler := handleLinker(storage, selfLinker) server := httptest.NewServer(handler) @@ -2213,7 +2195,7 @@ func TestPatchRequiresMatchingName(t *testing.T) { storage := map[string]rest.Storage{} ID := "id" item := &genericapitesting.Simple{ - ObjectMeta: apiv1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: ID, Namespace: "", // update should allow the client to send an empty namespace UID: "uid", @@ -2247,14 +2229,14 @@ func TestUpdate(t *testing.T) { t: t, expectedSet: "/" + prefix + "/" + testGroupVersion.Group + "/" + testGroupVersion.Version + "/namespaces/default/simple/" + ID, name: ID, - namespace: api.NamespaceDefault, + namespace: metav1.NamespaceDefault, } handler := handleLinker(storage, selfLinker) server := httptest.NewServer(handler) defer server.Close() item := &genericapitesting.Simple{ - ObjectMeta: apiv1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: ID, Namespace: "", // update should allow the client to send an empty namespace }, @@ -2291,9 +2273,9 @@ func TestUpdateInvokesAdmissionControl(t *testing.T) { defer server.Close() item := &genericapitesting.Simple{ - ObjectMeta: apiv1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: ID, - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, Other: "bar", } @@ -2353,7 +2335,7 @@ func TestUpdateAllowsMissingNamespace(t *testing.T) { defer server.Close() item := &genericapitesting.Simple{ - ObjectMeta: apiv1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: ID, }, Other: "bar", @@ -2390,7 +2372,7 @@ func TestUpdateAllowsMismatchedNamespaceOnError(t *testing.T) { defer server.Close() item := &genericapitesting.Simple{ - ObjectMeta: apiv1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: ID, Namespace: "other", // does not match request }, @@ -2427,7 +2409,7 @@ func TestUpdatePreventsMismatchedNamespace(t *testing.T) { defer server.Close() item := &genericapitesting.Simple{ - ObjectMeta: apiv1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: ID, Namespace: "other", }, @@ -2462,9 +2444,9 @@ func TestUpdateMissing(t *testing.T) { defer server.Close() item := &genericapitesting.Simple{ - ObjectMeta: apiv1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: ID, - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, Other: "bar", } @@ -3083,7 +3065,7 @@ func TestWriteJSONDecodeError(t *testing.T) { if status.Reason != metav1.StatusReasonUnknown { t.Errorf("unexpected reason %#v", status) } - if !strings.Contains(status.Message, "no kind is registered for the type api.UnregisteredAPIObject") { + if !strings.Contains(status.Message, "no kind is registered for the type endpoints.UnregisteredAPIObject") { t.Errorf("unexpected message %#v", status) } } @@ -3211,7 +3193,7 @@ func TestUpdateChecksAPIVersion(t *testing.T) { defer server.Close() client := http.Client{} - simple := &genericapitesting.Simple{ObjectMeta: apiv1.ObjectMeta{Name: "bar"}} + simple := &genericapitesting.Simple{ObjectMeta: metav1.ObjectMeta{Name: "bar"}} data, err := runtime.Encode(newCodec, simple) if err != nil { t.Fatalf("unexpected error: %v", err) @@ -3238,10 +3220,10 @@ func TestUpdateChecksAPIVersion(t *testing.T) { // SimpleXGSubresource is a cross group subresource, i.e. the subresource does not belong to the // same group as its parent resource. type SimpleXGSubresource struct { - metav1.TypeMeta `json:",inline"` - api.ObjectMeta `json:"metadata"` - SubresourceInfo string `json:"subresourceInfo,omitempty"` - Labels map[string]string `json:"labels,omitempty"` + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata"` + SubresourceInfo string `json:"subresourceInfo,omitempty"` + Labels map[string]string `json:"labels,omitempty"` } func (obj *SimpleXGSubresource) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta } diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/discovery.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/discovery.go similarity index 96% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/api/discovery.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/discovery.go index fed59636..65c16b86 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/discovery.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/discovery.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package api +package endpoints import ( "bytes" @@ -27,9 +27,9 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apiserver/pkg/handlers/negotiation" - "k8s.io/kubernetes/pkg/genericapiserver/api/handlers" - "k8s.io/kubernetes/pkg/genericapiserver/api/handlers/responsewriters" + "k8s.io/apiserver/pkg/endpoints/handlers/negotiation" + "k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers" + "k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers/responsewriters" ) // AddApiWebService adds a service to return the supported api versions at the legacy /api. diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/doc.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/doc.go new file mode 100644 index 00000000..d7010712 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/doc.go @@ -0,0 +1,18 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package endpoints contains the generic code that provides a RESTful Kubernetes-style API service. +package endpoints // import "k8s.io/kubernetes/pkg/genericapiserver/endpoints" diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/filters/BUILD b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/filters/BUILD similarity index 69% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/api/filters/BUILD rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/filters/BUILD index 30c65acc..acb0546f 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/filters/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/filters/BUILD @@ -8,35 +8,11 @@ load( "go_test", ) -go_library( - name = "go_default_library", - srcs = [ - "audit.go", - "authorization.go", - "doc.go", - "impersonation.go", - "requestinfo.go", - ], - tags = ["automanaged"], - deps = [ - "//pkg/api:go_default_library", - "//pkg/apis/authentication:go_default_library", - "//pkg/genericapiserver/api/handlers/responsewriters:go_default_library", - "//pkg/serviceaccount:go_default_library", - "//vendor:github.com/golang/glog", - "//vendor:github.com/pborman/uuid", - "//vendor:k8s.io/apimachinery/pkg/util/net", - "//vendor:k8s.io/apiserver/pkg/authentication/user", - "//vendor:k8s.io/apiserver/pkg/authorization/authorizer", - "//vendor:k8s.io/apiserver/pkg/httplog", - "//vendor:k8s.io/apiserver/pkg/request", - ], -) - go_test( name = "go_default_test", srcs = [ "audit_test.go", + "authentication_test.go", "authorization_test.go", "impersonation_test.go", "requestinfo_test.go", @@ -46,11 +22,40 @@ go_test( deps = [ "//pkg/apis/authentication:go_default_library", "//pkg/apis/batch:go_default_library", - "//pkg/genericapiserver/api/handlers/responsewriters:go_default_library", + "//pkg/genericapiserver/endpoints/handlers/responsewriters:go_default_library", "//vendor:k8s.io/apimachinery/pkg/util/sets", + "//vendor:k8s.io/apiserver/pkg/authentication/authenticator", "//vendor:k8s.io/apiserver/pkg/authentication/user", "//vendor:k8s.io/apiserver/pkg/authorization/authorizer", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", + ], +) + +go_library( + name = "go_default_library", + srcs = [ + "audit.go", + "authentication.go", + "authorization.go", + "doc.go", + "impersonation.go", + "requestinfo.go", + ], + tags = ["automanaged"], + deps = [ + "//pkg/api:go_default_library", + "//pkg/apis/authentication:go_default_library", + "//pkg/genericapiserver/endpoints/handlers/responsewriters:go_default_library", + "//vendor:github.com/golang/glog", + "//vendor:github.com/pborman/uuid", + "//vendor:github.com/prometheus/client_golang/prometheus", + "//vendor:k8s.io/apimachinery/pkg/util/net", + "//vendor:k8s.io/apiserver/pkg/authentication/authenticator", + "//vendor:k8s.io/apiserver/pkg/authentication/serviceaccount", + "//vendor:k8s.io/apiserver/pkg/authentication/user", + "//vendor:k8s.io/apiserver/pkg/authorization/authorizer", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", + "//vendor:k8s.io/apiserver/pkg/server/httplog", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/filters/OWNERS b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/filters/OWNERS similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/api/filters/OWNERS rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/filters/OWNERS diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/filters/audit.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/filters/audit.go similarity index 97% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/api/filters/audit.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/filters/audit.go index b6ae5b50..251bbea4 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/filters/audit.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/filters/audit.go @@ -30,9 +30,9 @@ import ( "github.com/pborman/uuid" utilnet "k8s.io/apimachinery/pkg/util/net" - "k8s.io/apiserver/pkg/request" + "k8s.io/apiserver/pkg/endpoints/request" authenticationapi "k8s.io/kubernetes/pkg/apis/authentication" - "k8s.io/kubernetes/pkg/genericapiserver/api/handlers/responsewriters" + "k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers/responsewriters" ) var _ http.ResponseWriter = &auditResponseWriter{} diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/filters/audit_test.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/filters/audit_test.go similarity index 99% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/api/filters/audit_test.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/filters/audit_test.go index f77fdcd9..211fd577 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/filters/audit_test.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/filters/audit_test.go @@ -29,7 +29,7 @@ import ( "testing" "k8s.io/apiserver/pkg/authentication/user" - "k8s.io/apiserver/pkg/request" + "k8s.io/apiserver/pkg/endpoints/request" ) type simpleResponseWriter struct { diff --git a/vendor/k8s.io/kubernetes/pkg/auth/handlers/handlers.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/filters/authentication.go similarity index 97% rename from vendor/k8s.io/kubernetes/pkg/auth/handlers/handlers.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/filters/authentication.go index 74e3a65b..17bc44f7 100644 --- a/vendor/k8s.io/kubernetes/pkg/auth/handlers/handlers.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/filters/authentication.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package handlers +package filters import ( "net/http" @@ -24,7 +24,7 @@ import ( "github.com/prometheus/client_golang/prometheus" "k8s.io/apiserver/pkg/authentication/authenticator" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" ) var ( diff --git a/vendor/k8s.io/kubernetes/pkg/auth/handlers/handlers_test.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/filters/authentication_test.go similarity index 98% rename from vendor/k8s.io/kubernetes/pkg/auth/handlers/handlers_test.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/filters/authentication_test.go index 40ff0259..eae3f86c 100644 --- a/vendor/k8s.io/kubernetes/pkg/auth/handlers/handlers_test.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/filters/authentication_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package handlers +package filters import ( "errors" @@ -24,7 +24,7 @@ import ( "k8s.io/apiserver/pkg/authentication/authenticator" "k8s.io/apiserver/pkg/authentication/user" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" ) func TestAuthenticateRequest(t *testing.T) { diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/filters/authorization.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/filters/authorization.go similarity index 95% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/api/filters/authorization.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/filters/authorization.go index 2d15212c..59e28655 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/filters/authorization.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/filters/authorization.go @@ -23,8 +23,8 @@ import ( "github.com/golang/glog" "k8s.io/apiserver/pkg/authorization/authorizer" - "k8s.io/apiserver/pkg/request" - "k8s.io/kubernetes/pkg/genericapiserver/api/handlers/responsewriters" + "k8s.io/apiserver/pkg/endpoints/request" + "k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers/responsewriters" ) // WithAuthorizationCheck passes all authorized requests on to handler, and returns a forbidden error otherwise. diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/filters/authorization_test.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/filters/authorization_test.go similarity index 96% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/api/filters/authorization_test.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/filters/authorization_test.go index 644bde91..8449fc1c 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/filters/authorization_test.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/filters/authorization_test.go @@ -24,9 +24,9 @@ import ( "testing" "k8s.io/apiserver/pkg/authorization/authorizer" - "k8s.io/apiserver/pkg/request" + "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/apis/batch" - "k8s.io/kubernetes/pkg/genericapiserver/api/handlers/responsewriters" + "k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers/responsewriters" ) func TestGetAuthorizerAttributes(t *testing.T) { diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/filters/doc.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/filters/doc.go similarity index 78% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/api/filters/doc.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/filters/doc.go index 534db30c..5563d5e4 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/filters/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/filters/doc.go @@ -15,5 +15,7 @@ limitations under the License. */ // Package filters contains all the http handler chain filters which -// _are_ api related. -package filters // import "k8s.io/kubernetes/pkg/genericapiserver/api/filters" +// _are_ api related, i.e. which are prerequisite for the API services +// to work (in contrast to the filters in the server package which are +// not part of the API contract). +package filters // import "k8s.io/kubernetes/pkg/genericapiserver/endpoints/filters" diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/filters/impersonation.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/filters/impersonation.go similarity index 97% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/api/filters/impersonation.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/filters/impersonation.go index 50cf3ae2..d682909f 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/filters/impersonation.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/filters/impersonation.go @@ -24,14 +24,14 @@ import ( "github.com/golang/glog" + "k8s.io/apiserver/pkg/authentication/serviceaccount" "k8s.io/apiserver/pkg/authentication/user" "k8s.io/apiserver/pkg/authorization/authorizer" - "k8s.io/apiserver/pkg/httplog" - "k8s.io/apiserver/pkg/request" + "k8s.io/apiserver/pkg/endpoints/request" + "k8s.io/apiserver/pkg/server/httplog" "k8s.io/kubernetes/pkg/api" authenticationapi "k8s.io/kubernetes/pkg/apis/authentication" - "k8s.io/kubernetes/pkg/genericapiserver/api/handlers/responsewriters" - "k8s.io/kubernetes/pkg/serviceaccount" + "k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers/responsewriters" ) // WithImpersonation is a filter that will inspect and check requests that attempt to change the user.Info for their requests diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/filters/impersonation_test.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/filters/impersonation_test.go similarity index 99% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/api/filters/impersonation_test.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/filters/impersonation_test.go index 6481d8cd..3d0eb23c 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/filters/impersonation_test.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/filters/impersonation_test.go @@ -26,7 +26,7 @@ import ( "k8s.io/apiserver/pkg/authentication/user" "k8s.io/apiserver/pkg/authorization/authorizer" - "k8s.io/apiserver/pkg/request" + "k8s.io/apiserver/pkg/endpoints/request" authenticationapi "k8s.io/kubernetes/pkg/apis/authentication" ) diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/filters/requestinfo.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/filters/requestinfo.go similarity index 91% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/api/filters/requestinfo.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/filters/requestinfo.go index 64e8fb8a..75344abf 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/filters/requestinfo.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/filters/requestinfo.go @@ -21,8 +21,8 @@ import ( "fmt" "net/http" - "k8s.io/apiserver/pkg/request" - "k8s.io/kubernetes/pkg/genericapiserver/api/handlers/responsewriters" + "k8s.io/apiserver/pkg/endpoints/request" + "k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers/responsewriters" ) // WithRequestInfo attaches a RequestInfo to the context. diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/filters/requestinfo_test.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/filters/requestinfo_test.go similarity index 95% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/api/filters/requestinfo_test.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/filters/requestinfo_test.go index f7730733..74202872 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/filters/requestinfo_test.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/filters/requestinfo_test.go @@ -18,7 +18,7 @@ package filters import ( "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/apiserver/pkg/request" + "k8s.io/apiserver/pkg/endpoints/request" ) func newTestRequestInfoResolver() *request.RequestInfoFactory { diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/groupversion.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/groupversion.go similarity index 89% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/api/groupversion.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/groupversion.go index ee02f9dd..81d24cd5 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/groupversion.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/groupversion.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package api +package endpoints import ( "fmt" @@ -29,10 +29,10 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" utilerrors "k8s.io/apimachinery/pkg/util/errors" - "k8s.io/apiserver/pkg/request" - "k8s.io/kubernetes/pkg/admission" - "k8s.io/kubernetes/pkg/genericapiserver/api/handlers" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/apiserver/pkg/admission" + "k8s.io/apiserver/pkg/endpoints/request" + "k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" ) // APIGroupVersion is a helper for exposing rest.Storage objects as http.Handlers via go-restful @@ -49,10 +49,14 @@ type APIGroupVersion struct { GroupVersion schema.GroupVersion // OptionsExternalVersion controls the Kubernetes APIVersion used for common objects in the apiserver - // schema like api.Status, api.DeleteOptions, and api.ListOptions. Other implementors may + // schema like api.Status, api.DeleteOptions, and metav1.ListOptions. Other implementors may // define a version "v1beta1" but want to use the Kubernetes "v1" internal objects. If // empty, defaults to GroupVersion. OptionsExternalVersion *schema.GroupVersion + // MetaGroupVersion defaults to "meta.k8s.io/v1" and is the scheme group version used to decode + // common API implementations like ListOptions. Future changes will allow this to vary by group + // version (for when the inevitable meta/v2 group emerges). + MetaGroupVersion *schema.GroupVersion Mapper meta.RESTMapper diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/handlers/BUILD b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers/BUILD similarity index 73% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/api/handlers/BUILD rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers/BUILD index eb25a9f2..64c17fce 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/handlers/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers/BUILD @@ -17,7 +17,7 @@ go_test( "//pkg/api:go_default_library", "//pkg/api/testapi:go_default_library", "//pkg/api/v1:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/util/strategicpatch:go_default_library", "//vendor:github.com/emicklei/go-restful", "//vendor:github.com/evanphx/json-patch", @@ -27,7 +27,7 @@ go_test( "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/diff", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) @@ -36,17 +36,16 @@ go_library( srcs = [ "discovery.go", "doc.go", + "patch.go", "proxy.go", "rest.go", "watch.go", ], tags = ["automanaged"], deps = [ - "//pkg/admission:go_default_library", "//pkg/api:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/genericapiserver/api/handlers/responsewriters:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", + "//pkg/genericapiserver/endpoints/handlers/responsewriters:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/util:go_default_library", "//pkg/util/httpstream:go_default_library", "//pkg/util/proxy:go_default_library", @@ -57,17 +56,21 @@ go_library( "//vendor:golang.org/x/net/websocket", "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/api/meta", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/internalversion", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/runtime/serializer/streaming", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/net", "//vendor:k8s.io/apimachinery/pkg/util/runtime", "//vendor:k8s.io/apimachinery/pkg/watch", - "//vendor:k8s.io/apiserver/pkg/handlers/negotiation", - "//vendor:k8s.io/apiserver/pkg/httplog", - "//vendor:k8s.io/apiserver/pkg/metrics", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/admission", + "//vendor:k8s.io/apiserver/pkg/endpoints/handlers/negotiation", + "//vendor:k8s.io/apiserver/pkg/endpoints/metrics", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", + "//vendor:k8s.io/apiserver/pkg/server/httplog", "//vendor:k8s.io/apiserver/pkg/util/wsstream", ], ) @@ -83,7 +86,7 @@ filegroup( name = "all-srcs", srcs = [ ":package-srcs", - "//pkg/genericapiserver/api/handlers/responsewriters:all-srcs", + "//pkg/genericapiserver/endpoints/handlers/responsewriters:all-srcs", ], tags = ["automanaged"], ) diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/handlers/discovery.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers/discovery.go similarity index 96% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/api/handlers/discovery.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers/discovery.go index 0a8eef13..d1ae7fd1 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/handlers/discovery.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers/discovery.go @@ -22,7 +22,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/genericapiserver/api/handlers/responsewriters" + "k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers/responsewriters" "github.com/emicklei/go-restful" ) diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/handlers/doc.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers/doc.go similarity index 96% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/api/handlers/doc.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers/doc.go index 68e8ccbf..a3658757 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/handlers/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers/doc.go @@ -15,4 +15,4 @@ limitations under the License. */ // Package handlers contains HTTP handlers to implement the apiserver APIs. -package handlers // import "k8s.io/kubernetes/pkg/genericapiserver/api/handlers" +package handlers // import "k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers" diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers/patch.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers/patch.go new file mode 100644 index 00000000..d117f14c --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers/patch.go @@ -0,0 +1,131 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package handlers + +import ( + "encoding/json" + "fmt" + + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" + "k8s.io/kubernetes/pkg/util/strategicpatch" + + "github.com/evanphx/json-patch" +) + +// patchObjectJSON patches the with and stores +// the result in . +// Currently it also returns the original and patched objects serialized to +// JSONs (this may not be needed once we can apply patches at the +// map[string]interface{} level). +func patchObjectJSON( + patchType types.PatchType, + codec runtime.Codec, + originalObject runtime.Object, + patchJS []byte, + objToUpdate runtime.Object, + versionedObj runtime.Object, +) (originalObjJS []byte, patchedObjJS []byte, retErr error) { + js, err := runtime.Encode(codec, originalObject) + if err != nil { + return nil, nil, err + } + originalObjJS = js + + switch patchType { + case types.JSONPatchType: + patchObj, err := jsonpatch.DecodePatch(patchJS) + if err != nil { + return nil, nil, err + } + if patchedObjJS, err = patchObj.Apply(originalObjJS); err != nil { + return nil, nil, err + } + case types.MergePatchType: + if patchedObjJS, err = jsonpatch.MergePatch(originalObjJS, patchJS); err != nil { + return nil, nil, err + } + case types.StrategicMergePatchType: + if patchedObjJS, err = strategicpatch.StrategicMergePatch(originalObjJS, patchJS, versionedObj); err != nil { + return nil, nil, err + } + default: + // only here as a safety net - go-restful filters content-type + return nil, nil, fmt.Errorf("unknown Content-Type header for patch: %v", patchType) + } + if err := runtime.DecodeInto(codec, patchedObjJS, objToUpdate); err != nil { + return nil, nil, err + } + return +} + +// strategicPatchObject applies a strategic merge patch of to +// and stores the result in . +// It additionally returns the map[string]interface{} representation of the +// and . +func strategicPatchObject( + codec runtime.Codec, + originalObject runtime.Object, + patchJS []byte, + objToUpdate runtime.Object, + versionedObj runtime.Object, +) (originalObjMap map[string]interface{}, patchMap map[string]interface{}, retErr error) { + // TODO: This should be one-step conversion that doesn't require + // json marshaling and unmarshaling once #39017 is fixed. + data, err := runtime.Encode(codec, originalObject) + if err != nil { + return nil, nil, err + } + originalObjMap = make(map[string]interface{}) + if err := json.Unmarshal(data, &originalObjMap); err != nil { + return nil, nil, err + } + + patchMap = make(map[string]interface{}) + if err := json.Unmarshal(patchJS, &patchMap); err != nil { + return nil, nil, err + } + + if err := applyPatchToObject(codec, originalObjMap, patchMap, objToUpdate, versionedObj); err != nil { + return nil, nil, err + } + return +} + +// applyPatchToObject applies a strategic merge patch of to +// and stores the result in , though it operates +// on versioned map[string]interface{} representations. +func applyPatchToObject( + codec runtime.Codec, + originalMap map[string]interface{}, + patchMap map[string]interface{}, + objToUpdate runtime.Object, + versionedObj runtime.Object, +) error { + patchedObjMap, err := strategicpatch.StrategicMergeMapPatch(originalMap, patchMap, versionedObj) + if err != nil { + return err + } + + // TODO: This should be one-step conversion that doesn't require + // json marshaling and unmarshaling once #39017 is fixed. + data, err := json.Marshal(patchedObjMap) + if err != nil { + return err + } + return runtime.DecodeInto(codec, data, objToUpdate) +} diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/handlers/proxy.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers/proxy.go similarity index 97% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/api/handlers/proxy.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers/proxy.go index 731d9114..50a6a249 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/handlers/proxy.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers/proxy.go @@ -31,12 +31,12 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/net" - "k8s.io/apiserver/pkg/httplog" - "k8s.io/apiserver/pkg/metrics" - "k8s.io/apiserver/pkg/request" + "k8s.io/apiserver/pkg/endpoints/metrics" + "k8s.io/apiserver/pkg/endpoints/request" + "k8s.io/apiserver/pkg/server/httplog" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/genericapiserver/api/handlers/responsewriters" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers/responsewriters" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" "k8s.io/kubernetes/pkg/util/httpstream" proxyutil "k8s.io/kubernetes/pkg/util/proxy" diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/handlers/responsewriters/BUILD b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers/responsewriters/BUILD similarity index 90% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/api/handlers/responsewriters/BUILD rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers/responsewriters/BUILD index 2c3fcec1..52445d47 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/handlers/responsewriters/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers/responsewriters/BUILD @@ -31,14 +31,14 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/genericapiserver/api/rest:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/storage:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/util/runtime", "//vendor:k8s.io/apiserver/pkg/authorization/authorizer", - "//vendor:k8s.io/apiserver/pkg/handlers/negotiation", + "//vendor:k8s.io/apiserver/pkg/endpoints/handlers/negotiation", "//vendor:k8s.io/apiserver/pkg/util/flushwriter", "//vendor:k8s.io/apiserver/pkg/util/wsstream", ], diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/handlers/responsewriters/doc.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers/responsewriters/doc.go similarity index 93% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/api/handlers/responsewriters/doc.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers/responsewriters/doc.go index 7c75ef9e..59bbafc2 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/handlers/responsewriters/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers/responsewriters/doc.go @@ -15,4 +15,4 @@ limitations under the License. */ // Package responsewriters containers helpers to write responses in HTTP handlers. -package responsewriters // import "k8s.io/kubernetes/pkg/genericapiserver/api/handlers/responsewriters" +package responsewriters // import "k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers/responsewriters" diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/handlers/responsewriters/errors.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers/responsewriters/errors.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/api/handlers/responsewriters/errors.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers/responsewriters/errors.go diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/handlers/responsewriters/status.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers/responsewriters/status.go similarity index 98% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/api/handlers/responsewriters/status.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers/responsewriters/status.go index 8bf7919b..93a29341 100755 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/handlers/responsewriters/status.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers/responsewriters/status.go @@ -52,7 +52,7 @@ func apiStatus(err error) *metav1.Status { status := http.StatusInternalServerError switch { //TODO: replace me with NewConflictErr - case storage.IsTestFailed(err): + case storage.IsConflict(err): status = http.StatusConflict } // Log errors that were not converted to an error status diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/handlers/responsewriters/status_test.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers/responsewriters/status_test.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/api/handlers/responsewriters/status_test.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers/responsewriters/status_test.go diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/handlers/responsewriters/writers.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers/responsewriters/writers.go similarity index 97% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/api/handlers/responsewriters/writers.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers/responsewriters/writers.go index bfdadfa7..e475c0ee 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/handlers/responsewriters/writers.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers/responsewriters/writers.go @@ -26,10 +26,10 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" utilruntime "k8s.io/apimachinery/pkg/util/runtime" - "k8s.io/apiserver/pkg/handlers/negotiation" + "k8s.io/apiserver/pkg/endpoints/handlers/negotiation" "k8s.io/apiserver/pkg/util/flushwriter" "k8s.io/apiserver/pkg/util/wsstream" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" ) // WriteObject renders a returned runtime.Object to the response as a stream or an encoded object. If the object diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/handlers/rest.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers/rest.go similarity index 90% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/api/handlers/rest.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers/rest.go index cd94669e..197329b3 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/handlers/rest.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers/rest.go @@ -29,22 +29,22 @@ import ( "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" + metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/types" utilruntime "k8s.io/apimachinery/pkg/util/runtime" - "k8s.io/apiserver/pkg/handlers/negotiation" - "k8s.io/apiserver/pkg/request" - "k8s.io/kubernetes/pkg/admission" - "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/genericapiserver/api/handlers/responsewriters" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/apiserver/pkg/admission" + "k8s.io/apiserver/pkg/endpoints/handlers/negotiation" + "k8s.io/apiserver/pkg/endpoints/request" + "k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers/responsewriters" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" "k8s.io/kubernetes/pkg/util" "k8s.io/kubernetes/pkg/util/strategicpatch" "github.com/emicklei/go-restful" - "github.com/evanphx/json-patch" "github.com/golang/glog" ) @@ -87,6 +87,8 @@ type RequestScope struct { Resource schema.GroupVersionResource Kind schema.GroupVersionKind Subresource string + + MetaGroupVersion schema.GroupVersion } func (scope *RequestScope) err(err error, w http.ResponseWriter, req *http.Request) { @@ -264,8 +266,8 @@ func ListResource(r rest.Lister, rw rest.Watcher, scope RequestScope, forceWatch ctx := scope.ContextFunc(req) ctx = request.WithNamespace(ctx, namespace) - opts := api.ListOptions{} - if err := scope.ParameterCodec.DecodeParameters(req.Request.URL.Query(), scope.Kind.GroupVersion(), &opts); err != nil { + opts := metainternalversion.ListOptions{} + if err := metainternalversion.ParameterCodec.DecodeParameters(req.Request.URL.Query(), scope.MetaGroupVersion, &opts); err != nil { scope.err(err, res.ResponseWriter, req.Request) return } @@ -302,6 +304,7 @@ func ListResource(r rest.Lister, rw rest.Watcher, scope RequestScope, forceWatch } if (opts.Watch || forceWatch) && rw != nil { + glog.Infof("Started to log from %v for %v", ctx, req.Request.URL.RequestURI()) watcher, err := rw.Watch(ctx, &opts) if err != nil { scope.err(err, res.ResponseWriter, req.Request) @@ -488,7 +491,7 @@ func PatchResource(r rest.Patcher, scope RequestScope, admit admission.Interface if idx := strings.Index(contentType, ";"); idx > 0 { contentType = contentType[:idx] } - patchType := api.PatchType(contentType) + patchType := types.PatchType(contentType) patchJS, err := readBody(req.Request) if err != nil { @@ -542,7 +545,7 @@ func patchResource( versionedObj runtime.Object, patcher rest.Patcher, name string, - patchType api.PatchType, + patchType types.PatchType, patchJS []byte, namer ScopeNamer, copier runtime.ObjectCopier, @@ -555,6 +558,8 @@ func patchResource( var ( originalObjJS []byte originalPatchedObjJS []byte + originalObjMap map[string]interface{} + originalPatchMap map[string]interface{} lastConflictErr error ) @@ -569,25 +574,30 @@ func patchResource( } switch { - case len(originalObjJS) == 0 || len(originalPatchedObjJS) == 0: + case originalObjJS == nil && originalObjMap == nil: // first time through, // 1. apply the patch - // 2. save the originalJS and patchedJS to detect whether there were conflicting changes on retries - if js, err := runtime.Encode(codec, currentObject); err != nil { - return nil, err - } else { - originalObjJS = js - } - - if js, err := getPatchedJS(patchType, originalObjJS, patchJS, versionedObj); err != nil { - return nil, err - } else { - originalPatchedObjJS = js - } + // 2. save the original and patched to detect whether there were conflicting changes on retries objToUpdate := patcher.New() - if err := runtime.DecodeInto(codec, originalPatchedObjJS, objToUpdate); err != nil { - return nil, err + + // For performance reasons, in case of strategicpatch, we avoid json + // marshaling and unmarshaling and operate just on map[string]interface{}. + // In case of other patch types, we still have to operate on JSON + // representations. + switch patchType { + case types.JSONPatchType, types.MergePatchType: + originalJS, patchedJS, err := patchObjectJSON(patchType, codec, currentObject, patchJS, objToUpdate, versionedObj) + if err != nil { + return nil, err + } + originalObjJS, originalPatchedObjJS = originalJS, patchedJS + case types.StrategicMergePatchType: + originalMap, patchMap, err := strategicPatchObject(codec, currentObject, patchJS, objToUpdate, versionedObj) + if err != nil { + return nil, err + } + originalObjMap, originalPatchMap = originalMap, patchMap } if err := checkName(objToUpdate, name, namespace, namer); err != nil { return nil, err @@ -602,33 +612,62 @@ func patchResource( // 2. build a strategic merge patch from originalJS and the currentJS // 3. ensure no conflicts between the two patches // 4. apply the #1 patch to the currentJS object - currentObjectJS, err := runtime.Encode(codec, currentObject) + + // TODO: This should be one-step conversion that doesn't require + // json marshaling and unmarshaling once #39017 is fixed. + data, err := runtime.Encode(codec, currentObject) if err != nil { return nil, err } - currentPatch, err := strategicpatch.CreateStrategicMergePatch(originalObjJS, currentObjectJS, versionedObj) - if err != nil { - return nil, err - } - originalPatch, err := strategicpatch.CreateStrategicMergePatch(originalObjJS, originalPatchedObjJS, versionedObj) - if err != nil { + currentObjMap := make(map[string]interface{}) + if err := json.Unmarshal(data, ¤tObjMap); err != nil { return nil, err } - diff1 := make(map[string]interface{}) - if err := json.Unmarshal(originalPatch, &diff1); err != nil { - return nil, err + var currentPatchMap map[string]interface{} + if originalObjMap != nil { + var err error + currentPatchMap, err = strategicpatch.CreateTwoWayMergeMapPatch(originalObjMap, currentObjMap, versionedObj) + if err != nil { + return nil, err + } + } else { + if originalPatchMap == nil { + // Compute original patch, if we already didn't do this in previous retries. + originalPatch, err := strategicpatch.CreateTwoWayMergePatch(originalObjJS, originalPatchedObjJS, versionedObj) + if err != nil { + return nil, err + } + originalPatchMap = make(map[string]interface{}) + if err := json.Unmarshal(originalPatch, &originalPatchMap); err != nil { + return nil, err + } + } + // Compute current patch. + currentObjJS, err := runtime.Encode(codec, currentObject) + if err != nil { + return nil, err + } + currentPatch, err := strategicpatch.CreateTwoWayMergePatch(originalObjJS, currentObjJS, versionedObj) + if err != nil { + return nil, err + } + currentPatchMap = make(map[string]interface{}) + if err := json.Unmarshal(currentPatch, ¤tPatchMap); err != nil { + return nil, err + } } - diff2 := make(map[string]interface{}) - if err := json.Unmarshal(currentPatch, &diff2); err != nil { - return nil, err - } - hasConflicts, err := strategicpatch.HasConflicts(diff1, diff2) + + hasConflicts, err := strategicpatch.HasConflicts(originalPatchMap, currentPatchMap) if err != nil { return nil, err } if hasConflicts { - glog.V(4).Infof("patchResource failed for resource %s, because there is a meaningful conflict.\n diff1=%v\n, diff2=%v\n", name, diff1, diff2) + if glog.V(4) { + diff1, _ := json.Marshal(currentPatchMap) + diff2, _ := json.Marshal(originalPatchMap) + glog.Infof("patchResource failed for resource %s, because there is a meaningful conflict.\n diff1=%v\n, diff2=%v\n", name, diff1, diff2) + } // Return the last conflict error we got if we have one if lastConflictErr != nil { return nil, lastConflictErr @@ -637,14 +676,11 @@ func patchResource( return nil, errors.NewConflict(resource.GroupResource(), name, nil) } - newlyPatchedObjJS, err := getPatchedJS(api.StrategicMergePatchType, currentObjectJS, originalPatch, versionedObj) - if err != nil { - return nil, err - } objToUpdate := patcher.New() - if err := runtime.DecodeInto(codec, newlyPatchedObjJS, objToUpdate); err != nil { + if err := applyPatchToObject(codec, currentObjMap, originalPatchMap, objToUpdate, versionedObj); err != nil { return nil, err } + return objToUpdate, nil } } @@ -774,7 +810,7 @@ func DeleteResource(r rest.GracefulDeleter, allowsOptions bool, scope RequestSco ctx := scope.ContextFunc(req) ctx = request.WithNamespace(ctx, namespace) - options := &api.DeleteOptions{} + options := &metav1.DeleteOptions{} if allowsOptions { body, err := readBody(req.Request) if err != nil { @@ -878,8 +914,8 @@ func DeleteCollection(r rest.CollectionDeleter, checkBody bool, scope RequestSco } } - listOptions := api.ListOptions{} - if err := scope.ParameterCodec.DecodeParameters(req.Request.URL.Query(), scope.Kind.GroupVersion(), &listOptions); err != nil { + listOptions := metainternalversion.ListOptions{} + if err := metainternalversion.ParameterCodec.DecodeParameters(req.Request.URL.Query(), scope.MetaGroupVersion, &listOptions); err != nil { scope.err(err, res.ResponseWriter, req.Request) return } @@ -898,7 +934,7 @@ func DeleteCollection(r rest.CollectionDeleter, checkBody bool, scope RequestSco } } - options := &api.DeleteOptions{} + options := &metav1.DeleteOptions{} if checkBody { body, err := readBody(req.Request) if err != nil { @@ -1078,24 +1114,6 @@ func setListSelfLink(obj runtime.Object, req *restful.Request, namer ScopeNamer) return count, err } -func getPatchedJS(patchType api.PatchType, originalJS, patchJS []byte, obj runtime.Object) ([]byte, error) { - switch patchType { - case api.JSONPatchType: - patchObj, err := jsonpatch.DecodePatch(patchJS) - if err != nil { - return nil, err - } - return patchObj.Apply(originalJS) - case api.MergePatchType: - return jsonpatch.MergePatch(originalJS, patchJS) - case api.StrategicMergePatchType: - return strategicpatch.StrategicMergePatchData(originalJS, patchJS, obj) - default: - // only here as a safety net - go-restful filters content-type - return nil, fmt.Errorf("unknown Content-Type header for patch: %v", patchType) - } -} - func summarizeData(data []byte, maxLength int) string { switch { case len(data) == 0: diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/handlers/rest_test.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers/rest_test.go similarity index 91% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/api/handlers/rest_test.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers/rest_test.go index 3ba69646..c23083f2 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/handlers/rest_test.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers/rest_test.go @@ -32,11 +32,11 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/diff" - "k8s.io/apiserver/pkg/request" + "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" "k8s.io/kubernetes/pkg/api/v1" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" "k8s.io/kubernetes/pkg/util/strategicpatch" ) @@ -55,16 +55,27 @@ type TestPatchSubType struct { func (obj *testPatchType) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta } func TestPatchAnonymousField(t *testing.T) { - originalJS := `{"kind":"testPatchType","theField":"my-value"}` - patch := `{"theField": "changed!"}` - expectedJS := `{"kind":"testPatchType","theField":"changed!"}` + testGV := schema.GroupVersion{Group: "", Version: "v"} + api.Scheme.AddKnownTypes(testGV, &testPatchType{}) + codec := api.Codecs.LegacyCodec(testGV) - actualBytes, err := getPatchedJS(api.StrategicMergePatchType, []byte(originalJS), []byte(patch), &testPatchType{}) + original := &testPatchType{ + TypeMeta: metav1.TypeMeta{Kind: "testPatchType", APIVersion: "v"}, + TestPatchSubType: TestPatchSubType{StringField: "my-value"}, + } + patch := `{"theField": "changed!"}` + expected := &testPatchType{ + TypeMeta: metav1.TypeMeta{Kind: "testPatchType", APIVersion: "v"}, + TestPatchSubType: TestPatchSubType{StringField: "changed!"}, + } + + actual := &testPatchType{} + _, _, err := strategicPatchObject(codec, original, []byte(patch), actual, &testPatchType{}) if err != nil { t.Fatalf("unexpected error: %v", err) } - if string(actualBytes) != expectedJS { - t.Errorf("expected %v, got %v", expectedJS, string(actualBytes)) + if !api.Semantic.DeepEqual(actual, expected) { + t.Errorf("expected %#v, got %#v", expected, actual) } } @@ -191,9 +202,9 @@ func (tc *patchTestCase) Run(t *testing.T) { resource := schema.GroupVersionResource{Group: "", Version: "v1", Resource: "pods"} versionedObj := &v1.Pod{} - for _, patchType := range []api.PatchType{api.JSONPatchType, api.MergePatchType, api.StrategicMergePatchType} { + for _, patchType := range []types.PatchType{types.JSONPatchType, types.MergePatchType, types.StrategicMergePatchType} { // TODO SUPPORT THIS! - if patchType == api.JSONPatchType { + if patchType == types.JSONPatchType { continue } t.Logf("Working with patchType %v", patchType) @@ -211,17 +222,17 @@ func (tc *patchTestCase) Run(t *testing.T) { patch := []byte{} switch patchType { - case api.JSONPatchType: + case types.JSONPatchType: continue - case api.StrategicMergePatchType: - patch, err = strategicpatch.CreateStrategicMergePatch(originalObjJS, changedJS, versionedObj) + case types.StrategicMergePatchType: + patch, err = strategicpatch.CreateTwoWayMergePatch(originalObjJS, changedJS, versionedObj) if err != nil { t.Errorf("%s: unexpected error: %v", tc.name, err) return } - case api.MergePatchType: + case types.MergePatchType: patch, err = jsonpatch.CreateMergePatch(originalObjJS, changedJS) if err != nil { t.Errorf("%s: unexpected error: %v", tc.name, err) @@ -460,7 +471,7 @@ func TestHasUID(t *testing.T) { {obj: &api.Pod{}, hasUID: false}, {obj: nil, hasUID: false}, {obj: runtime.Object(nil), hasUID: false}, - {obj: &api.Pod{ObjectMeta: api.ObjectMeta{UID: types.UID("A")}}, hasUID: true}, + {obj: &api.Pod{ObjectMeta: metav1.ObjectMeta{UID: types.UID("A")}}, hasUID: true}, } for i, tc := range testcases { actual, err := hasUID(tc.obj) diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/handlers/watch.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers/watch.go similarity index 98% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/api/handlers/watch.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers/watch.go index 381c0c5e..07ac4d57 100755 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/handlers/watch.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers/watch.go @@ -29,8 +29,8 @@ import ( "k8s.io/apimachinery/pkg/runtime/serializer/streaming" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/watch" - "k8s.io/apiserver/pkg/handlers/negotiation" - "k8s.io/apiserver/pkg/httplog" + "k8s.io/apiserver/pkg/endpoints/handlers/negotiation" + "k8s.io/apiserver/pkg/server/httplog" "k8s.io/apiserver/pkg/util/wsstream" "github.com/emicklei/go-restful" diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/installer.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/installer.go similarity index 98% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/api/installer.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/installer.go index 7731f29c..43416ae6 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/installer.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/installer.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package api +package endpoints import ( "bytes" @@ -34,13 +34,13 @@ import ( "k8s.io/apimachinery/pkg/conversion" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apiserver/pkg/handlers/negotiation" - "k8s.io/apiserver/pkg/metrics" - "k8s.io/apiserver/pkg/request" - "k8s.io/kubernetes/pkg/api" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apiserver/pkg/endpoints/handlers/negotiation" + "k8s.io/apiserver/pkg/endpoints/metrics" + "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/apis/extensions" - "k8s.io/kubernetes/pkg/genericapiserver/api/handlers" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" "github.com/emicklei/go-restful" ) @@ -521,6 +521,11 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag Resource: a.group.GroupVersion.WithResource(resource), Subresource: subresource, Kind: fqKindToRegister, + + MetaGroupVersion: metav1.SchemeGroupVersion, + } + if a.group.MetaGroupVersion != nil { + reqScope.MetaGroupVersion = *a.group.MetaGroupVersion } for _, action := range actions { versionedObject := storageMeta.ProducesObject(action.Verb) @@ -638,7 +643,7 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag route := ws.PATCH(action.Path).To(handler). Doc(doc). Param(ws.QueryParameter("pretty", "If 'true', then the output is pretty printed.")). - Consumes(string(api.JSONPatchType), string(api.MergePatchType), string(api.StrategicMergePatchType)). + Consumes(string(types.JSONPatchType), string(types.MergePatchType), string(types.StrategicMergePatchType)). Operation("patch"+namespaced+kind+strings.Title(subresource)+operationSuffix). Produces(append(storageMeta.ProducesMIMETypes(action.Verb), mediaTypes...)...). Returns(http.StatusOK, "OK", versionedObject). diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/installer_test.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/installer_test.go similarity index 97% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/api/installer_test.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/installer_test.go index 6368ceaf..9f8fdd47 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/installer_test.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/installer_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package api +package endpoints import ( "bytes" @@ -43,7 +43,7 @@ func TestScopeNamingGenerateLink(t *testing.T) { true, } service := &api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "other", }, @@ -82,8 +82,6 @@ func TestIsVowel(t *testing.T) { } func TestGetArticleForNoun(t *testing.T) { - type args struct { - } tests := []struct { noun string padding string diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/openapi/BUILD b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/openapi/BUILD similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/api/openapi/BUILD rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/openapi/BUILD diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/openapi/OWNERS b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/openapi/OWNERS similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/api/openapi/OWNERS rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/openapi/OWNERS diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/openapi/openapi.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/openapi/openapi.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/api/openapi/openapi.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/openapi/openapi.go diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/proxy_test.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/proxy_test.go similarity index 99% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/api/proxy_test.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/proxy_test.go index dd9b8732..829d3115 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/proxy_test.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/proxy_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package api +package endpoints import ( "bytes" @@ -36,7 +36,7 @@ import ( "golang.org/x/net/websocket" utilnet "k8s.io/apimachinery/pkg/util/net" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" ) func TestProxyRequestContentLengthAndTransferEncoding(t *testing.T) { diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/testing/BUILD b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/testing/BUILD similarity index 94% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/api/testing/BUILD rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/testing/BUILD index 70f7ce32..d2dfc5dd 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/testing/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/testing/BUILD @@ -15,7 +15,6 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api/v1:go_default_library", "//vendor:github.com/ugorji/go/codec", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/testing/OWNERS b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/testing/OWNERS similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/api/testing/OWNERS rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/testing/OWNERS diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/testing/types.generated.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/testing/types.generated.go similarity index 90% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/api/testing/types.generated.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/testing/types.generated.go index ba3fa09e..c7ba608b 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/testing/types.generated.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/testing/types.generated.go @@ -26,8 +26,7 @@ import ( "fmt" codec1978 "github.com/ugorji/go/codec" pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - pkg3_types "k8s.io/apimachinery/pkg/types" - pkg2_v1 "k8s.io/kubernetes/pkg/api/v1" + pkg2_types "k8s.io/apimachinery/pkg/types" "reflect" "runtime" time "time" @@ -64,10 +63,9 @@ func init() { } if false { // reference the types, but skip this branch at build/run time var v0 pkg1_v1.TypeMeta - var v1 pkg3_types.UID - var v2 pkg2_v1.ObjectMeta - var v3 time.Time - _, _, _, _ = v0, v1, v2, v3 + var v1 pkg2_types.UID + var v2 time.Time + _, _, _ = v0, v1, v2 } } @@ -158,13 +156,25 @@ func (x *Simple) CodecEncodeSelf(e *codec1978.Encoder) { if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) @@ -311,33 +321,39 @@ func (x *Simple) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "other": if r.TryDecodeAsNil() { x.Other = "" } else { - yyv9 := &x.Other - yym10 := z.DecBinary() - _ = yym10 + yyv10 := &x.Other + yym11 := z.DecBinary() + _ = yym11 if false { } else { - *((*string)(yyv9)) = r.DecodeString() + *((*string)(yyv10)) = r.DecodeString() } } case "labels": if r.TryDecodeAsNil() { x.Labels = nil } else { - yyv11 := &x.Labels - yym12 := z.DecBinary() - _ = yym12 + yyv12 := &x.Labels + yym13 := z.DecBinary() + _ = yym13 if false { } else { - z.F.DecMapStringStringX(yyv11, false, d) + z.F.DecMapStringStringX(yyv12, false, d) } } default: @@ -351,16 +367,16 @@ func (x *Simple) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj13 int - var yyb13 bool - var yyhl13 bool = l >= 0 - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + var yyj14 int + var yyb14 bool + var yyhl14 bool = l >= 0 + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -368,21 +384,21 @@ func (x *Simple) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv14 := &x.Kind - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.Kind + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -390,38 +406,44 @@ func (x *Simple) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv16 := &x.APIVersion - yym17 := z.DecBinary() - _ = yym17 + yyv17 := &x.APIVersion + yym18 := z.DecBinary() + _ = yym18 if false { } else { - *((*string)(yyv16)) = r.DecodeString() + *((*string)(yyv17)) = r.DecodeString() } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv18 := &x.ObjectMeta - yyv18.CodecDecodeSelf(d) + yyv19 := &x.ObjectMeta + yym20 := z.DecBinary() + _ = yym20 + if false { + } else if z.HasExtensions() && z.DecExt(yyv19) { + } else { + z.DecFallback(yyv19, false) + } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -429,21 +451,21 @@ func (x *Simple) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Other = "" } else { - yyv19 := &x.Other - yym20 := z.DecBinary() - _ = yym20 + yyv21 := &x.Other + yym22 := z.DecBinary() + _ = yym22 if false { } else { - *((*string)(yyv19)) = r.DecodeString() + *((*string)(yyv21)) = r.DecodeString() } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -451,26 +473,26 @@ func (x *Simple) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Labels = nil } else { - yyv21 := &x.Labels - yym22 := z.DecBinary() - _ = yym22 + yyv23 := &x.Labels + yym24 := z.DecBinary() + _ = yym24 if false { } else { - z.F.DecMapStringStringX(yyv21, false, d) + z.F.DecMapStringStringX(yyv23, false, d) } } for { - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj13-1, "") + z.DecStructFieldNotFound(yyj14-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -562,13 +584,25 @@ func (x *SimpleRoot) CodecEncodeSelf(e *codec1978.Encoder) { if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) @@ -715,33 +749,39 @@ func (x *SimpleRoot) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "other": if r.TryDecodeAsNil() { x.Other = "" } else { - yyv9 := &x.Other - yym10 := z.DecBinary() - _ = yym10 + yyv10 := &x.Other + yym11 := z.DecBinary() + _ = yym11 if false { } else { - *((*string)(yyv9)) = r.DecodeString() + *((*string)(yyv10)) = r.DecodeString() } } case "labels": if r.TryDecodeAsNil() { x.Labels = nil } else { - yyv11 := &x.Labels - yym12 := z.DecBinary() - _ = yym12 + yyv12 := &x.Labels + yym13 := z.DecBinary() + _ = yym13 if false { } else { - z.F.DecMapStringStringX(yyv11, false, d) + z.F.DecMapStringStringX(yyv12, false, d) } } default: @@ -755,16 +795,16 @@ func (x *SimpleRoot) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj13 int - var yyb13 bool - var yyhl13 bool = l >= 0 - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + var yyj14 int + var yyb14 bool + var yyhl14 bool = l >= 0 + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -772,21 +812,21 @@ func (x *SimpleRoot) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv14 := &x.Kind - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.Kind + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -794,38 +834,44 @@ func (x *SimpleRoot) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv16 := &x.APIVersion - yym17 := z.DecBinary() - _ = yym17 + yyv17 := &x.APIVersion + yym18 := z.DecBinary() + _ = yym18 if false { } else { - *((*string)(yyv16)) = r.DecodeString() + *((*string)(yyv17)) = r.DecodeString() } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv18 := &x.ObjectMeta - yyv18.CodecDecodeSelf(d) + yyv19 := &x.ObjectMeta + yym20 := z.DecBinary() + _ = yym20 + if false { + } else if z.HasExtensions() && z.DecExt(yyv19) { + } else { + z.DecFallback(yyv19, false) + } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -833,21 +879,21 @@ func (x *SimpleRoot) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Other = "" } else { - yyv19 := &x.Other - yym20 := z.DecBinary() - _ = yym20 + yyv21 := &x.Other + yym22 := z.DecBinary() + _ = yym22 if false { } else { - *((*string)(yyv19)) = r.DecodeString() + *((*string)(yyv21)) = r.DecodeString() } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -855,26 +901,26 @@ func (x *SimpleRoot) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Labels = nil } else { - yyv21 := &x.Labels - yym22 := z.DecBinary() - _ = yym22 + yyv23 := &x.Labels + yym24 := z.DecBinary() + _ = yym24 if false { } else { - z.F.DecMapStringStringX(yyv21, false, d) + z.F.DecMapStringStringX(yyv23, false, d) } } for { - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj13-1, "") + z.DecStructFieldNotFound(yyj14-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/testing/types.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/testing/types.go similarity index 91% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/api/testing/types.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/testing/types.go index 8db2be1f..c5d367ca 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/testing/types.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/testing/types.go @@ -19,12 +19,11 @@ package testing import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" - apiv1 "k8s.io/kubernetes/pkg/api/v1" ) type Simple struct { - metav1.TypeMeta `json:",inline"` - apiv1.ObjectMeta `json:"metadata"` + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata"` // +optional Other string `json:"other,omitempty"` // +optional @@ -34,8 +33,8 @@ type Simple struct { func (obj *Simple) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta } type SimpleRoot struct { - metav1.TypeMeta `json:",inline"` - apiv1.ObjectMeta `json:"metadata"` + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata"` // +optional Other string `json:"other,omitempty"` // +optional diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/watch_test.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/watch_test.go similarity index 95% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/api/watch_test.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/watch_test.go index 4b634094..2e3046ab 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/watch_test.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/endpoints/watch_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package api +package endpoints import ( "encoding/json" @@ -31,6 +31,7 @@ import ( "golang.org/x/net/websocket" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/serializer/streaming" @@ -38,11 +39,9 @@ import ( "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apimachinery/pkg/watch" "k8s.io/kubernetes/pkg/api" - apiv1 "k8s.io/kubernetes/pkg/api/v1" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/genericapiserver/api/handlers" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" - apitesting "k8s.io/kubernetes/pkg/genericapiserver/api/testing" + "k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers" + apitesting "k8s.io/kubernetes/pkg/genericapiserver/endpoints/testing" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" ) // watchJSON defines the expected JSON wire equivalent of watch.Event @@ -68,18 +67,18 @@ var watchTestTable = []struct { t watch.EventType obj runtime.Object }{ - {watch.Added, &apitesting.Simple{ObjectMeta: apiv1.ObjectMeta{Name: "foo"}}}, - {watch.Modified, &apitesting.Simple{ObjectMeta: apiv1.ObjectMeta{Name: "bar"}}}, - {watch.Deleted, &apitesting.Simple{ObjectMeta: apiv1.ObjectMeta{Name: "bar"}}}, + {watch.Added, &apitesting.Simple{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}}, + {watch.Modified, &apitesting.Simple{ObjectMeta: metav1.ObjectMeta{Name: "bar"}}}, + {watch.Deleted, &apitesting.Simple{ObjectMeta: metav1.ObjectMeta{Name: "bar"}}}, } var podWatchTestTable = []struct { t watch.EventType obj runtime.Object }{ - {watch.Added, roundTripOrDie(codec, &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}})}, - {watch.Modified, roundTripOrDie(codec, &api.Pod{ObjectMeta: api.ObjectMeta{Name: "bar"}})}, - {watch.Deleted, roundTripOrDie(codec, &api.Pod{ObjectMeta: api.ObjectMeta{Name: "bar"}})}, + {watch.Added, roundTripOrDie(codec, &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}})}, + {watch.Modified, roundTripOrDie(codec, &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "bar"}})}, + {watch.Deleted, roundTripOrDie(codec, &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "bar"}})}, } func TestWatchWebsocket(t *testing.T) { @@ -422,28 +421,28 @@ func TestWatchParamParsing(t *testing.T) { resourceVersion: "1234", labelSelector: "", fieldSelector: "", - namespace: api.NamespaceAll, + namespace: metav1.NamespaceAll, }, { path: rootPath, rawQuery: "resourceVersion=314159&fieldSelector=Host%3D&labelSelector=name%3Dfoo", resourceVersion: "314159", labelSelector: "name=foo", fieldSelector: "Host=", - namespace: api.NamespaceAll, + namespace: metav1.NamespaceAll, }, { path: rootPath, rawQuery: "fieldSelector=id%3dfoo&resourceVersion=1492", resourceVersion: "1492", labelSelector: "", fieldSelector: "id=foo", - namespace: api.NamespaceAll, + namespace: metav1.NamespaceAll, }, { path: rootPath, rawQuery: "", resourceVersion: "", labelSelector: "", fieldSelector: "", - namespace: api.NamespaceAll, + namespace: metav1.NamespaceAll, }, { path: namespacedPath, diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/openapi/common/.readonly b/vendor/k8s.io/kubernetes/pkg/genericapiserver/openapi/common/.readonly deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/openapi/common/BUILD b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/BUILD similarity index 70% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/openapi/common/BUILD rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/BUILD index 3b0dffdd..b67b7c1e 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/openapi/common/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/BUILD @@ -9,15 +9,8 @@ load( go_library( name = "go_default_library", - srcs = [ - "common.go", - "doc.go", - ], + srcs = ["doc.go"], tags = ["automanaged"], - deps = [ - "//vendor:github.com/emicklei/go-restful", - "//vendor:github.com/go-openapi/spec", - ], ) filegroup( @@ -29,6 +22,10 @@ filegroup( filegroup( name = "all-srcs", - srcs = [":package-srcs"], + srcs = [ + ":package-srcs", + "//pkg/genericapiserver/registry/generic:all-srcs", + "//pkg/genericapiserver/registry/rest:all-srcs", + ], tags = ["automanaged"], ) diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/doc.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/doc.go new file mode 100644 index 00000000..1714984b --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/doc.go @@ -0,0 +1,18 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package registry contains the generic implementation of the storage and system logic. +package registry // import "k8s.io/kubernetes/pkg/genericapiserver/registry" diff --git a/vendor/k8s.io/kubernetes/pkg/registry/generic/BUILD b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/generic/BUILD similarity index 79% rename from vendor/k8s.io/kubernetes/pkg/registry/generic/BUILD rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/generic/BUILD index ab405837..e452fa62 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/generic/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/generic/BUILD @@ -17,12 +17,12 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", - "//pkg/fields:go_default_library", "//pkg/storage:go_default_library", "//pkg/storage/storagebackend:go_default_library", "//pkg/storage/storagebackend/factory:go_default_library", "//vendor:github.com/golang/glog", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", ], @@ -39,8 +39,8 @@ filegroup( name = "all-srcs", srcs = [ ":package-srcs", - "//pkg/registry/generic/registry:all-srcs", - "//pkg/registry/generic/rest:all-srcs", + "//pkg/genericapiserver/registry/generic/registry:all-srcs", + "//pkg/genericapiserver/registry/generic/rest:all-srcs", ], tags = ["automanaged"], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/generic/OWNERS b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/generic/OWNERS similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/registry/generic/OWNERS rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/generic/OWNERS diff --git a/vendor/k8s.io/kubernetes/pkg/registry/generic/doc.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/generic/doc.go similarity index 88% rename from vendor/k8s.io/kubernetes/pkg/registry/generic/doc.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/generic/doc.go index 002e0fd4..f743ae13 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/generic/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/generic/doc.go @@ -16,4 +16,4 @@ limitations under the License. // Package generic provides a generic object store interface and a // generic label/field matching type. -package generic // import "k8s.io/kubernetes/pkg/registry/generic" +package generic // import "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" diff --git a/vendor/k8s.io/kubernetes/pkg/registry/generic/matcher.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/generic/matcher.go similarity index 81% rename from vendor/k8s.io/kubernetes/pkg/registry/generic/matcher.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/generic/matcher.go index 96541560..4364374e 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/generic/matcher.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/generic/matcher.go @@ -17,12 +17,12 @@ limitations under the License. package generic import ( - "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/fields" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" ) // ObjectMetaFieldsSet returns a fields that represent the ObjectMeta. -func ObjectMetaFieldsSet(objectMeta *api.ObjectMeta, hasNamespaceField bool) fields.Set { +func ObjectMetaFieldsSet(objectMeta *metav1.ObjectMeta, hasNamespaceField bool) fields.Set { if !hasNamespaceField { return fields.Set{ "metadata.name": objectMeta.Name, @@ -35,7 +35,7 @@ func ObjectMetaFieldsSet(objectMeta *api.ObjectMeta, hasNamespaceField bool) fie } // AdObjectMetaField add fields that represent the ObjectMeta to source. -func AddObjectMetaFieldsSet(source fields.Set, objectMeta *api.ObjectMeta, hasNamespaceField bool) fields.Set { +func AddObjectMetaFieldsSet(source fields.Set, objectMeta *metav1.ObjectMeta, hasNamespaceField bool) fields.Set { source["metadata.name"] = objectMeta.Name if hasNamespaceField { source["metadata.namespace"] = objectMeta.Namespace diff --git a/vendor/k8s.io/kubernetes/pkg/registry/generic/options.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/generic/options.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/registry/generic/options.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/generic/options.go diff --git a/vendor/k8s.io/kubernetes/pkg/registry/generic/registry/BUILD b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry/BUILD similarity index 81% rename from vendor/k8s.io/kubernetes/pkg/registry/generic/registry/BUILD rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry/BUILD index 857c1928..7ed3d8a6 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/generic/registry/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry/BUILD @@ -21,10 +21,9 @@ go_library( "//pkg/api:go_default_library", "//pkg/api/errors/storage:go_default_library", "//pkg/api/validation/path:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/registry/cachesize:go_default_library", - "//pkg/registry/generic:go_default_library", "//pkg/storage:go_default_library", "//pkg/storage/etcd:go_default_library", "//pkg/storage/storagebackend:go_default_library", @@ -33,14 +32,16 @@ go_library( "//vendor:golang.org/x/net/context", "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/api/meta", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/internalversion", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/util/runtime", "//vendor:k8s.io/apimachinery/pkg/util/validation/field", "//vendor:k8s.io/apimachinery/pkg/watch", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) @@ -55,10 +56,9 @@ go_test( deps = [ "//pkg/api:go_default_library", "//pkg/api/testapi:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/registry/core/pod:go_default_library", - "//pkg/registry/generic:go_default_library", "//pkg/storage:go_default_library", "//pkg/storage/etcd:go_default_library", "//pkg/storage/etcd/testing:go_default_library", @@ -66,14 +66,16 @@ go_test( "//pkg/storage/testing:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/api/meta", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/internalversion", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/selection", "//vendor:k8s.io/apimachinery/pkg/util/validation/field", "//vendor:k8s.io/apimachinery/pkg/util/wait", "//vendor:k8s.io/apimachinery/pkg/watch", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", "//vendor:k8s.io/apiserver/pkg/storage/names", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/generic/registry/decorated_watcher.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry/decorated_watcher.go similarity index 92% rename from vendor/k8s.io/kubernetes/pkg/registry/generic/registry/decorated_watcher.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry/decorated_watcher.go index ba4a6484..d131ba80 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/generic/registry/decorated_watcher.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry/decorated_watcher.go @@ -23,17 +23,16 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/watch" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" ) type decoratedWatcher struct { w watch.Interface - decorator rest.ObjectFunc + decorator ObjectFunc cancel context.CancelFunc resultCh chan watch.Event } -func newDecoratedWatcher(w watch.Interface, decorator rest.ObjectFunc) *decoratedWatcher { +func newDecoratedWatcher(w watch.Interface, decorator ObjectFunc) *decoratedWatcher { ctx, cancel := context.WithCancel(context.Background()) d := &decoratedWatcher{ w: w, diff --git a/vendor/k8s.io/kubernetes/pkg/registry/generic/registry/decorated_watcher_test.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry/decorated_watcher_test.go similarity index 91% rename from vendor/k8s.io/kubernetes/pkg/registry/generic/registry/decorated_watcher_test.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry/decorated_watcher_test.go index 2412b11a..ae62e0a1 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/generic/registry/decorated_watcher_test.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry/decorated_watcher_test.go @@ -21,6 +21,7 @@ import ( "testing" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apimachinery/pkg/watch" @@ -37,7 +38,7 @@ func TestDecoratedWatcher(t *testing.T) { dw := newDecoratedWatcher(w, decorator) defer dw.Stop() - go w.Add(&api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}}) + go w.Add(&api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}) select { case e := <-dw.ResultChan(): pod, ok := e.Object.(*api.Pod) @@ -62,7 +63,7 @@ func TestDecoratedWatcherError(t *testing.T) { dw := newDecoratedWatcher(w, decorator) defer dw.Stop() - go w.Add(&api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}}) + go w.Add(&api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}) select { case e := <-dw.ResultChan(): if e.Type != watch.Error { diff --git a/vendor/k8s.io/kubernetes/pkg/registry/generic/registry/doc.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry/doc.go similarity index 87% rename from vendor/k8s.io/kubernetes/pkg/registry/generic/registry/doc.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry/doc.go index ea3c0c94..95cdb9cc 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/generic/registry/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry/doc.go @@ -16,4 +16,4 @@ limitations under the License. // Package etcd has a generic implementation of a registry that // stores things in etcd. -package registry // import "k8s.io/kubernetes/pkg/registry/generic/registry" +package registry // import "k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry" diff --git a/vendor/k8s.io/kubernetes/pkg/registry/generic/registry/storage_factory.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry/storage_factory.go similarity index 94% rename from vendor/k8s.io/kubernetes/pkg/registry/generic/registry/storage_factory.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry/storage_factory.go index 896196bd..5d7a62bf 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/generic/registry/storage_factory.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry/storage_factory.go @@ -18,13 +18,15 @@ package registry import ( "k8s.io/apimachinery/pkg/runtime" - "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" "k8s.io/kubernetes/pkg/storage" etcdstorage "k8s.io/kubernetes/pkg/storage/etcd" "k8s.io/kubernetes/pkg/storage/storagebackend" "k8s.io/kubernetes/pkg/storage/storagebackend/factory" ) +var _ generic.StorageDecorator = StorageWithCacher + // Creates a cacher based given storageConfig. func StorageWithCacher( storageConfig *storagebackend.Config, diff --git a/vendor/k8s.io/kubernetes/pkg/registry/generic/registry/store.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry/store.go similarity index 74% rename from vendor/k8s.io/kubernetes/pkg/registry/generic/registry/store.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry/store.go index 2f028e1c..0e96c3f8 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/generic/registry/store.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry/store.go @@ -25,114 +25,150 @@ import ( kubeerr "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" + metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/validation/field" "k8s.io/apimachinery/pkg/watch" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" storeerr "k8s.io/kubernetes/pkg/api/errors/storage" "k8s.io/kubernetes/pkg/api/validation/path" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" "k8s.io/kubernetes/pkg/registry/cachesize" - "k8s.io/kubernetes/pkg/registry/generic" "k8s.io/kubernetes/pkg/storage" "github.com/golang/glog" ) -// Store implements pkg/api/rest.StandardStorage. -// It's intended to be embeddable, so that you can implement any -// non-generic functions if needed. -// You must supply a value for every field below before use; these are -// left public as it's meant to be overridable if need be. -// This object is intended to be copyable so that it can be used in -// different ways but share the same underlying behavior. +// ObjectFunc is a function to act on a given object. An error may be returned +// if the hook cannot be completed. An ObjectFunc may transform the provided +// object. +type ObjectFunc func(obj runtime.Object) error + +// Store implements pkg/api/rest.StandardStorage. It's intended to be +// embeddable and allows the consumer to implement any non-generic functions +// that are required. This object is intended to be copyable so that it can be +// used in different ways but share the same underlying behavior. +// +// All fields are required unless specified. // // The intended use of this type is embedding within a Kind specific -// RESTStorage implementation. This type provides CRUD semantics on -// a Kubelike resource, handling details like conflict detection with -// ResourceVersion and semantics. The RESTCreateStrategy and -// RESTUpdateStrategy are generic across all backends, and encapsulate -// logic specific to the API. +// RESTStorage implementation. This type provides CRUD semantics on a Kubelike +// resource, handling details like conflict detection with ResourceVersion and +// semantics. The RESTCreateStrategy, RESTUpdateStrategy, and +// RESTDeleteStrategy are generic across all backends, and encapsulate logic +// specific to the API. // // TODO: make the default exposed methods exactly match a generic RESTStorage type Store struct { - // Called to make a new object, should return e.g., &api.Pod{} + // NewFunc returns a new instance of the type this registry returns for a + // GET of a single object, e.g.: + // + // curl GET /apis/group/version/namespaces/my-ns/myresource/name-of-object NewFunc func() runtime.Object - // Called to make a new listing object, should return e.g., &api.PodList{} + // NewListFunc returns a new list of the type this registry; it is the + // type returned when the resource is listed, e.g.: + // + // curl GET /apis/group/version/namespaces/my-ns/myresource NewListFunc func() runtime.Object - // Used for error reporting + // QualifiedResource is the pluralized name of the resource. QualifiedResource schema.GroupResource - // Used for listing/watching; should not include trailing "/" + // KeyRootFunc returns the root etcd key for this resource; should not + // include trailing "/". This is used for operations that work on the + // entire collection (listing and watching). + // + // KeyRootFunc and KeyFunc must be supplied together or not at all. KeyRootFunc func(ctx genericapirequest.Context) string - // Called for Create/Update/Get/Delete. Note that 'namespace' can be - // gotten from ctx. + // KeyFunc returns the key for a specific object in the collection. + // KeyFund is dalled for Create/Update/Get/Delete. Note that 'namespace' + // can be gotten from ctx. + // + // KeyFunc and KeyRootFunc must be supplied together or not at all. KeyFunc func(ctx genericapirequest.Context, name string) (string, error) - // Called to get the name of an object + // ObjectNameFunc returns the name of an object or an error. ObjectNameFunc func(obj runtime.Object) (string, error) - // Return the TTL objects should be persisted with. Update is true if this - // is an operation against an existing object. Existing is the current TTL - // or the default for this operation. + // TTLFunc returns the TTL (time to live) that objects should be persisted + // with. The existing parameter is the current TTL or the default for this + // operation. The update parameter indicates whether this is an operation + // against an existing object. + // + // Objects that are persisted with a TTL are evicted once the TTL expires. TTLFunc func(obj runtime.Object, existing uint64, update bool) (uint64, error) - // Returns a matcher corresponding to the provided labels and fields. + // PredicateFunc returns a matcher corresponding to the provided labels + // and fields. The SelectionPredicate returned should return true if the + // object matches the given field and label selectors. PredicateFunc func(label labels.Selector, field fields.Selector) storage.SelectionPredicate - // Called to cleanup storage clients. - DestroyFunc func() - - // EnableGarbageCollection affects the handling of Update and Delete requests. It - // must be synced with the corresponding flag in kube-controller-manager. + // EnableGarbageCollection affects the handling of Update and Delete + // requests. Enabling garbage collection allows finalizers to do work to + // finalize this object before the store deletes it. + // + // If any store has garbage collection enabled, it must also be enabled in + // the kube-controller-manager. EnableGarbageCollection bool // DeleteCollectionWorkers is the maximum number of workers in a single - // DeleteCollection call. + // DeleteCollection call. Delete requests for the items in a collection + // are issued in parallel. DeleteCollectionWorkers int - // Decorator is called as exit hook on object returned from the underlying storage. - // The returned object could be individual object (e.g. Pod) or the list type (e.g. PodList). - // Decorator is intended for integrations that are above storage and - // should only be used for specific cases where storage of the value is - // not appropriate, since they cannot be watched. - Decorator rest.ObjectFunc - // Allows extended behavior during creation, required + // Decorator is an optional exit hook on an object returned from the + // underlying storage. The returned object could be an individual object + // (e.g. Pod) or a list type (e.g. PodList). Decorator is intended for + // integrations that are above storage and should only be used for + // specific cases where storage of the value is not appropriate, since + // they cannot be watched. + Decorator ObjectFunc + // CreateStrategy implements resource-specific behavior during creation. CreateStrategy rest.RESTCreateStrategy - // On create of an object, attempt to run a further operation. - AfterCreate rest.ObjectFunc - // Allows extended behavior during updates, required + // AfterCreate implements a further operation to run after a resource is + // created and before it is decorated, optional. + AfterCreate ObjectFunc + // UpdateStrategy implements resource-specific behavior during updates. UpdateStrategy rest.RESTUpdateStrategy - // On update of an object, attempt to run a further operation. - AfterUpdate rest.ObjectFunc - // Allows extended behavior during updates, optional + // AfterUpdate implements a further operation to run after a resource is + // updated and before it is decorated, optional. + AfterUpdate ObjectFunc + // DeleteStrategy implements resource-specific behavior during deletion, + // optional. DeleteStrategy rest.RESTDeleteStrategy - // On deletion of an object, attempt to run a further operation. - AfterDelete rest.ObjectFunc - // If true, return the object that was deleted. Otherwise, return a generic - // success status response. + // AfterDelete implements a further operation to run after a resource is + // deleted and before it is decorated, optional. + AfterDelete ObjectFunc + // ReturnDeletedObject determines whether the Store returns the object + // that was deleted. Otherwise, return a generic success status response. ReturnDeletedObject bool - // Allows extended behavior during export, optional + // ExportStrategy implements resource-specific behavior during export, + // optional. Exported objects are not decorated. ExportStrategy rest.RESTExportStrategy - // Used for all storage access functions + // Storage is the interface for the underlying storage for the resource. Storage storage.Interface + // Called to cleanup clients used by the underlying Storage; optional. + DestroyFunc func() } +// Note: the rest.StandardStorage interface aggregates the common REST verbs var _ rest.StandardStorage = &Store{} +var _ rest.Exporter = &Store{} const OptimisticLockErrorMsg = "the object has been modified; please apply your changes to the latest version and try again" -// NamespaceKeyRootFunc is the default function for constructing storage paths to resource directories enforcing namespace rules. +// NamespaceKeyRootFunc is the default function for constructing storage paths +// to resource directories enforcing namespace rules. func NamespaceKeyRootFunc(ctx genericapirequest.Context, prefix string) string { key := prefix ns, ok := genericapirequest.NamespaceFrom(ctx) @@ -142,8 +178,9 @@ func NamespaceKeyRootFunc(ctx genericapirequest.Context, prefix string) string { return key } -// NamespaceKeyFunc is the default function for constructing storage paths to a resource relative to prefix enforcing namespace rules. -// If no namespace is on context, it errors. +// NamespaceKeyFunc is the default function for constructing storage paths to +// a resource relative to the given prefix enforcing namespace rules. If the +// context does not contain a namespace, it errors. func NamespaceKeyFunc(ctx genericapirequest.Context, prefix string, name string) (string, error) { key := NamespaceKeyRootFunc(ctx, prefix) ns, ok := genericapirequest.NamespaceFrom(ctx) @@ -160,7 +197,8 @@ func NamespaceKeyFunc(ctx genericapirequest.Context, prefix string, name string) return key, nil } -// NoNamespaceKeyFunc is the default function for constructing storage paths to a resource relative to prefix without a namespace +// NoNamespaceKeyFunc is the default function for constructing storage paths +// to a resource relative to the given prefix without a namespace. func NoNamespaceKeyFunc(ctx genericapirequest.Context, prefix string, name string) (string, error) { if len(name) == 0 { return "", kubeerr.NewBadRequest("Name parameter required.") @@ -172,18 +210,19 @@ func NoNamespaceKeyFunc(ctx genericapirequest.Context, prefix string, name strin return key, nil } -// New implements RESTStorage +// New implements RESTStorage.New. func (e *Store) New() runtime.Object { return e.NewFunc() } -// NewList implements RESTLister +// NewList implements rest.Lister. func (e *Store) NewList() runtime.Object { return e.NewListFunc() } -// List returns a list of items matching labels and field -func (e *Store) List(ctx genericapirequest.Context, options *api.ListOptions) (runtime.Object, error) { +// List returns a list of items matching labels and field according to the +// store's PredicateFunc. +func (e *Store) List(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (runtime.Object, error) { label := labels.Everything() if options != nil && options.LabelSelector != nil { label = options.LabelSelector @@ -204,11 +243,12 @@ func (e *Store) List(ctx genericapirequest.Context, options *api.ListOptions) (r return out, nil } -// ListPredicate returns a list of all the items matching m. -func (e *Store) ListPredicate(ctx genericapirequest.Context, p storage.SelectionPredicate, options *api.ListOptions) (runtime.Object, error) { +// ListPredicate returns a list of all the items matching the given +// SelectionPredicate. +func (e *Store) ListPredicate(ctx genericapirequest.Context, p storage.SelectionPredicate, options *metainternalversion.ListOptions) (runtime.Object, error) { if options == nil { // By default we should serve the request from etcd. - options = &api.ListOptions{ResourceVersion: ""} + options = &metainternalversion.ListOptions{ResourceVersion: ""} } list := e.NewListFunc() if name, ok := p.MatchesSingle(); ok { @@ -273,19 +313,22 @@ func (e *Store) Create(ctx genericapirequest.Context, obj runtime.Object) (runti return out, nil } -// shouldDelete checks if a Update is removing all the object's finalizers. If so, -// it further checks if the object's DeletionGracePeriodSeconds is 0. If so, it -// returns true. -func (e *Store) shouldDelete(ctx genericapirequest.Context, key string, obj, existing runtime.Object) bool { +// shouldDeleteDuringUpdate checks if a Update is removing all the object's +// finalizers. If so, it further checks if the object's +// DeletionGracePeriodSeconds is 0. If so, it returns true. +// +// If the store does not have garbage collection enabled, +// shouldDeleteDuringUpdate will always return false. +func (e *Store) shouldDeleteDuringUpdate(ctx genericapirequest.Context, key string, obj, existing runtime.Object) bool { if !e.EnableGarbageCollection { return false } - newMeta, err := api.ObjectMetaFor(obj) + newMeta, err := metav1.ObjectMetaFor(obj) if err != nil { utilruntime.HandleError(err) return false } - oldMeta, err := api.ObjectMetaFor(existing) + oldMeta, err := metav1.ObjectMetaFor(existing) if err != nil { utilruntime.HandleError(err) return false @@ -293,6 +336,8 @@ func (e *Store) shouldDelete(ctx genericapirequest.Context, key string, obj, exi return len(newMeta.Finalizers) == 0 && oldMeta.DeletionGracePeriodSeconds != nil && *oldMeta.DeletionGracePeriodSeconds == 0 } +// deleteForEmptyFinalizers handles deleting an object once its finalizer list +// becomes empty due to an update. func (e *Store) deleteForEmptyFinalizers(ctx genericapirequest.Context, name, key string, obj runtime.Object, preconditions *storage.Preconditions) (runtime.Object, bool, error) { out := e.NewFunc() glog.V(6).Infof("going to delete %s from registry, triggered by update", name) @@ -345,9 +390,10 @@ func (e *Store) Update(ctx genericapirequest.Context, name string, objInfo rest. return nil, nil, err } - // If AllowUnconditionalUpdate() is true and the object specified by the user does not have a resource version, - // then we populate it with the latest version. - // Else, we check that the version specified by the user matches the version of latest storage object. + // If AllowUnconditionalUpdate() is true and the object specified by + // the user does not have a resource version, then we populate it with + // the latest version. Else, we check that the version specified by + // the user matches the version of latest storage object. resourceVersion, err := e.Storage.Versioner().ObjectResourceVersion(obj) if err != nil { return nil, nil, err @@ -377,19 +423,21 @@ func (e *Store) Update(ctx genericapirequest.Context, name string, objInfo rest. creating = false creatingObj = nil if doUnconditionalUpdate { - // Update the object's resource version to match the latest storage object's resource version. + // Update the object's resource version to match the latest + // storage object's resource version. err = e.Storage.Versioner().UpdateObject(obj, res.ResourceVersion) if err != nil { return nil, nil, err } } else { - // Check if the object's resource version matches the latest resource version. + // Check if the object's resource version matches the latest + // resource version. newVersion, err := e.Storage.Versioner().ObjectResourceVersion(obj) if err != nil { return nil, nil, err } if newVersion == 0 { - // TODO: The Invalid error should has a field for Resource. + // TODO: The Invalid error should have a field for Resource. // After that field is added, we should fill the Resource and // leave the Kind field empty. See the discussion in #18526. qualifiedKind := schema.GroupKind{Group: e.QualifiedResource.Group, Kind: e.QualifiedResource.Resource} @@ -403,8 +451,7 @@ func (e *Store) Update(ctx genericapirequest.Context, name string, objInfo rest. if err := rest.BeforeUpdate(e.UpdateStrategy, ctx, obj, existing); err != nil { return nil, nil, err } - delete := e.shouldDelete(ctx, key, obj, existing) - if delete { + if e.shouldDeleteDuringUpdate(ctx, key, obj, existing) { deleteObj = obj return nil, nil, errEmptiedFinalizers } @@ -477,11 +524,14 @@ var ( ) // shouldUpdateFinalizers returns if we need to update the finalizers of the -// object, and the desired list of finalizers. -// When deciding whether to add the OrphanDependent finalizer, factors in the -// order of highest to lowest priority are: options.OrphanDependents, existing -// finalizers of the object, e.DeleteStrategy.DefaultGarbageCollectionPolicy. -func shouldUpdateFinalizers(e *Store, accessor meta.Object, options *api.DeleteOptions) (shouldUpdate bool, newFinalizers []string) { +// object, and the desired list of finalizers. When deciding whether to add +// the OrphanDependent finalizer, factors in the order of highest to lowest +// priority are: +// +// - options.OrphanDependents, +// - existing finalizers of the object +// - e.DeleteStrategy.DefaultGarbageCollectionPolicy +func shouldUpdateFinalizers(e *Store, accessor metav1.Object, options *metav1.DeleteOptions) (shouldUpdate bool, newFinalizers []string) { shouldOrphan := false // Get default orphan policy from this REST object type if gcStrategy, ok := e.DeleteStrategy.(rest.GarbageCollectionDeleteStrategy); ok { @@ -525,12 +575,14 @@ func shouldUpdateFinalizers(e *Store, accessor meta.Object, options *api.DeleteO // DeletionTimestamp to "now". Finalizers are watching for such updates and will // finalize the object if their IDs are present in the object's Finalizers list. func markAsDeleting(obj runtime.Object) (err error) { - objectMeta, kerr := api.ObjectMetaFor(obj) + objectMeta, kerr := metav1.ObjectMetaFor(obj) if kerr != nil { return kerr } now := metav1.NewTime(time.Now()) - // This handles Generation bump for resources that don't support graceful deletion. For resources that support graceful deletion is handle in pkg/api/rest/delete.go + // This handles Generation bump for resources that don't support graceful + // deletion. For resources that support graceful deletion is handle in + // pkg/api/rest/delete.go if objectMeta.DeletionTimestamp == nil && objectMeta.Generation > 0 { objectMeta.Generation++ } @@ -540,12 +592,31 @@ func markAsDeleting(obj runtime.Object) (err error) { return nil } -// this functions need to be kept synced with updateForGracefulDeletionAndFinalizers. -func (e *Store) updateForGracefulDeletion(ctx genericapirequest.Context, name, key string, options *api.DeleteOptions, preconditions storage.Preconditions, in runtime.Object) (err error, ignoreNotFound, deleteImmediately bool, out, lastExisting runtime.Object) { +// updateForGracefulDeletion and updateForGracefulDeletionAndFinalizers both +// implement deletion flows for graceful deletion. Graceful deletion is +// implemented as setting the deletion timestamp in an update. If the +// implementation of graceful deletion is changed, both of these methods +// should be changed together. + +// updateForGracefulDeletion updates the given object for graceful deletion by +// setting the deletion timestamp and grace period seconds and returns: +// +// 1. an error +// 2. a boolean indicating that the object was not found, but it should be +// ignored +// 3. a boolean indicating that the object's grace period is exhausted and it +// should be deleted immediately +// 4. a new output object with the state that was updated +// 5. a copy of the last existing state of the object +func (e *Store) updateForGracefulDeletion(ctx genericapirequest.Context, name, key string, options *metav1.DeleteOptions, preconditions storage.Preconditions, in runtime.Object) (err error, ignoreNotFound, deleteImmediately bool, out, lastExisting runtime.Object) { lastGraceful := int64(0) out = e.NewFunc() err = e.Storage.GuaranteedUpdate( - ctx, key, out, false, &preconditions, + ctx, + key, + out, + false, /* ignoreNotFound */ + &preconditions, storage.SimpleUpdate(func(existing runtime.Object) (runtime.Object, error) { graceful, pendingGraceful, err := rest.BeforeDelete(e.DeleteStrategy, ctx, existing, options) if err != nil { @@ -587,13 +658,28 @@ func (e *Store) updateForGracefulDeletion(ctx genericapirequest.Context, name, k } } -// this functions need to be kept synced with updateForGracefulDeletion. -func (e *Store) updateForGracefulDeletionAndFinalizers(ctx genericapirequest.Context, name, key string, options *api.DeleteOptions, preconditions storage.Preconditions, in runtime.Object) (err error, ignoreNotFound, deleteImmediately bool, out, lastExisting runtime.Object) { +// updateForGracefulDeletionAndFinalizers updates the given object for +// graceful deletion and finalization by setting the deletion timestamp and +// grace period seconds (graceful deletion) and updating the list of +// finalizers (finalization); it returns: +// +// 1. an error +// 2. a boolean indicating that the object was not found, but it should be +// ignored +// 3. a boolean indicating that the object's grace period is exhausted and it +// should be deleted immediately +// 4. a new output object with the state that was updated +// 5. a copy of the last existing state of the object +func (e *Store) updateForGracefulDeletionAndFinalizers(ctx genericapirequest.Context, name, key string, options *metav1.DeleteOptions, preconditions storage.Preconditions, in runtime.Object) (err error, ignoreNotFound, deleteImmediately bool, out, lastExisting runtime.Object) { lastGraceful := int64(0) var pendingFinalizers bool out = e.NewFunc() err = e.Storage.GuaranteedUpdate( - ctx, key, out, false, &preconditions, + ctx, + key, + out, + false, /* ignoreNotFound */ + &preconditions, storage.SimpleUpdate(func(existing runtime.Object) (runtime.Object, error) { graceful, pendingGraceful, err := rest.BeforeDelete(e.DeleteStrategy, ctx, existing, options) if err != nil { @@ -664,7 +750,7 @@ func (e *Store) updateForGracefulDeletionAndFinalizers(ctx genericapirequest.Con } // Delete removes the item from storage. -func (e *Store) Delete(ctx genericapirequest.Context, name string, options *api.DeleteOptions) (runtime.Object, error) { +func (e *Store) Delete(ctx genericapirequest.Context, name string, options *metav1.DeleteOptions) (runtime.Object, error) { key, err := e.KeyFunc(ctx, name) if err != nil { return nil, err @@ -676,7 +762,7 @@ func (e *Store) Delete(ctx genericapirequest.Context, name string, options *api. } // support older consumers of delete by treating "nil" as delete immediately if options == nil { - options = api.NewDeleteOptions(0) + options = metav1.NewDeleteOptions(0) } var preconditions storage.Preconditions if options.Preconditions != nil { @@ -699,17 +785,20 @@ func (e *Store) Delete(ctx genericapirequest.Context, name string, options *api. var ignoreNotFound bool var deleteImmediately bool = true var lastExisting, out runtime.Object - if !e.EnableGarbageCollection { - // TODO: remove the check on graceful, because we support no-op updates now. - if graceful { - err, ignoreNotFound, deleteImmediately, out, lastExisting = e.updateForGracefulDeletion(ctx, name, key, options, preconditions, obj) - } - } else { + + // Handle combinations of graceful deletion and finalization by issuing + // the correct updates. + if e.EnableGarbageCollection { shouldUpdateFinalizers, _ := shouldUpdateFinalizers(e, accessor, options) // TODO: remove the check, because we support no-op updates now. if graceful || pendingFinalizers || shouldUpdateFinalizers { err, ignoreNotFound, deleteImmediately, out, lastExisting = e.updateForGracefulDeletionAndFinalizers(ctx, name, key, options, preconditions, obj) } + } else { + // TODO: remove the check on graceful, because we support no-op updates now. + if graceful { + err, ignoreNotFound, deleteImmediately, out, lastExisting = e.updateForGracefulDeletion(ctx, name, key, options, preconditions, obj) + } } // !deleteImmediately covers all cases where err != nil. We keep both to be future-proof. if !deleteImmediately || err != nil { @@ -732,7 +821,7 @@ func (e *Store) Delete(ctx genericapirequest.Context, name string, options *api. return e.finalizeDelete(out, true) } -// DeleteCollection remove all items returned by List with a given ListOptions from storage. +// DeleteCollection removes all items returned by List with a given ListOptions from storage. // // DeleteCollection is currently NOT atomic. It can happen that only subset of objects // will be deleted from storage, and then an error will be returned. @@ -742,7 +831,7 @@ func (e *Store) Delete(ctx genericapirequest.Context, name string, options *api. // are removing all objects of a given type) with the current API (it's technically // possibly with storage API, but watch is not delivered correctly then). // It will be possible to fix it with v3 etcd API. -func (e *Store) DeleteCollection(ctx genericapirequest.Context, options *api.DeleteOptions, listOptions *api.ListOptions) (runtime.Object, error) { +func (e *Store) DeleteCollection(ctx genericapirequest.Context, options *metav1.DeleteOptions, listOptions *metainternalversion.ListOptions) (runtime.Object, error) { listObj, err := e.List(ctx, listOptions) if err != nil { return nil, err @@ -810,6 +899,8 @@ func (e *Store) DeleteCollection(ctx genericapirequest.Context, options *api.Del } } +// finalizeDelete runs the Store's AfterDelete hook if runHooks is set and +// returns the decorated deleted object if appropriate. func (e *Store) finalizeDelete(obj runtime.Object, runHooks bool) (runtime.Object, error) { if runHooks && e.AfterDelete != nil { if err := e.AfterDelete(obj); err != nil { @@ -828,10 +919,10 @@ func (e *Store) finalizeDelete(obj runtime.Object, runHooks bool) (runtime.Objec } // Watch makes a matcher for the given label and field, and calls -// WatchPredicate. If possible, you should customize PredicateFunc to produre a -// matcher that matches by key. SelectionPredicate does this for you +// WatchPredicate. If possible, you should customize PredicateFunc to produce +// a matcher that matches by key. SelectionPredicate does this for you // automatically. -func (e *Store) Watch(ctx genericapirequest.Context, options *api.ListOptions) (watch.Interface, error) { +func (e *Store) Watch(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (watch.Interface, error) { label := labels.Everything() if options != nil && options.LabelSelector != nil { label = options.LabelSelector @@ -860,7 +951,8 @@ func (e *Store) WatchPredicate(ctx genericapirequest.Context, p storage.Selectio } return w, nil } - // if we cannot extract a key based on the current context, the optimization is skipped + // if we cannot extract a key based on the current context, the + // optimization is skipped } w, err := e.Storage.WatchList(ctx, e.KeyRootFunc(ctx), resourceVersion, p) @@ -873,13 +965,15 @@ func (e *Store) WatchPredicate(ctx genericapirequest.Context, p storage.Selectio return w, nil } -// calculateTTL is a helper for retrieving the updated TTL for an object or returning an error -// if the TTL cannot be calculated. The defaultTTL is changed to 1 if less than zero. Zero means -// no TTL, not expire immediately. +// calculateTTL is a helper for retrieving the updated TTL for an object or +// returning an error if the TTL cannot be calculated. The defaultTTL is +// changed to 1 if less than zero. Zero means no TTL, not expire immediately. func (e *Store) calculateTTL(obj runtime.Object, defaultTTL int64, update bool) (ttl uint64, err error) { // TODO: validate this is assertion is still valid. - // etcd may return a negative TTL for a node if the expiration has not occurred due - // to server lag - we will ensure that the value is at least set. + + // etcd may return a negative TTL for a node if the expiration has not + // occurred due to server lag - we will ensure that the value is at least + // set. if defaultTTL < 0 { defaultTTL = 1 } @@ -890,7 +984,9 @@ func (e *Store) calculateTTL(obj runtime.Object, defaultTTL int64, update bool) return ttl, err } -func exportObjectMeta(accessor meta.Object, exact bool) { +// exportObjectMeta unsets the fields on the given object that should not be +// present when the object is exported. +func exportObjectMeta(accessor metav1.Object, exact bool) { accessor.SetUID("") if !exact { accessor.SetNamespace("") @@ -904,7 +1000,7 @@ func exportObjectMeta(accessor meta.Object, exact bool) { } } -// Implements the rest.Exporter interface +// Export implements the rest.Exporter interface func (e *Store) Export(ctx genericapirequest.Context, name string, opts metav1.ExportOptions) (runtime.Object, error) { obj, err := e.Get(ctx, name, &metav1.GetOptions{}) if err != nil { @@ -926,7 +1022,8 @@ func (e *Store) Export(ctx genericapirequest.Context, name string, opts metav1.E return obj, nil } -// CompleteWithOptions updates the store with the provided options and defaults common fields +// CompleteWithOptions updates the store with the provided options and +// defaults common fields. func (e *Store) CompleteWithOptions(options *generic.StoreOptions) error { if e.QualifiedResource.Empty() { return fmt.Errorf("store %#v must have a non-empty qualified resource", e) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/generic/registry/store_test.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry/store_test.go similarity index 91% rename from vendor/k8s.io/kubernetes/pkg/registry/generic/registry/store_test.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry/store_test.go index 3f06297b..aba040c4 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/generic/registry/store_test.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry/store_test.go @@ -28,20 +28,21 @@ import ( "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" + metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/selection" "k8s.io/apimachinery/pkg/util/validation/field" "k8s.io/apimachinery/pkg/util/wait" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/storage/names" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" "k8s.io/kubernetes/pkg/registry/core/pod" - "k8s.io/kubernetes/pkg/registry/generic" "k8s.io/kubernetes/pkg/storage" etcdstorage "k8s.io/kubernetes/pkg/storage/etcd" etcdtesting "k8s.io/kubernetes/pkg/storage/etcd/testing" @@ -53,7 +54,7 @@ type testGracefulStrategy struct { testRESTStrategy } -func (t testGracefulStrategy) CheckGracefulDelete(ctx genericapirequest.Context, obj runtime.Object, options *api.DeleteOptions) bool { +func (t testGracefulStrategy) CheckGracefulDelete(ctx genericapirequest.Context, obj runtime.Object, options *metav1.DeleteOptions) bool { return true } @@ -138,11 +139,11 @@ func matchEverything() storage.SelectionPredicate { func TestStoreList(t *testing.T) { podA := &api.Pod{ - ObjectMeta: api.ObjectMeta{Namespace: "test", Name: "bar"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "test", Name: "bar"}, Spec: api.PodSpec{NodeName: "machine"}, } podB := &api.Pod{ - ObjectMeta: api.ObjectMeta{Namespace: "test", Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "test", Name: "foo"}, Spec: api.PodSpec{NodeName: "machine"}, } @@ -214,11 +215,11 @@ func TestStoreList(t *testing.T) { // the results are as fresh as given version. func TestStoreListResourceVersion(t *testing.T) { fooPod := &api.Pod{ - ObjectMeta: api.ObjectMeta{Namespace: "test", Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "test", Name: "foo"}, Spec: api.PodSpec{NodeName: "machine"}, } barPod := &api.Pod{ - ObjectMeta: api.ObjectMeta{Namespace: "test", Name: "bar"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "test", Name: "bar"}, Spec: api.PodSpec{NodeName: "machine"}, } ctx := genericapirequest.WithNamespace(genericapirequest.NewContext(), "test") @@ -239,7 +240,7 @@ func TestStoreListResourceVersion(t *testing.T) { waitListCh := make(chan runtime.Object, 1) go func(listRev uint64) { - option := &api.ListOptions{ResourceVersion: strconv.FormatUint(listRev, 10)} + option := &metainternalversion.ListOptions{ResourceVersion: strconv.FormatUint(listRev, 10)} // It will wait until we create the second pod. l, err := registry.List(ctx, option) if err != nil { @@ -277,11 +278,11 @@ func TestStoreListResourceVersion(t *testing.T) { func TestStoreCreate(t *testing.T) { gracefulPeriod := int64(50) podA := &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "test"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "test"}, Spec: api.PodSpec{NodeName: "machine"}, } podB := &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "test"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "test"}, Spec: api.PodSpec{NodeName: "machine2"}, } @@ -321,7 +322,7 @@ func TestStoreCreate(t *testing.T) { } // now delete pod with graceful period set - delOpts := &api.DeleteOptions{GracePeriodSeconds: &gracefulPeriod} + delOpts := &metav1.DeleteOptions{GracePeriodSeconds: &gracefulPeriod} _, err = registry.Delete(testContext, podA.Name, delOpts) if err != nil { t.Fatalf("Failed to delete pod gracefully. Unexpected error: %v", err) @@ -360,15 +361,15 @@ func updateAndVerify(t *testing.T, ctx genericapirequest.Context, registry *Stor func TestStoreUpdate(t *testing.T) { podA := &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "test"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "test"}, Spec: api.PodSpec{NodeName: "machine"}, } podB := &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "test"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "test"}, Spec: api.PodSpec{NodeName: "machine2"}, } podAWithResourceVersion := &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "test", ResourceVersion: "7"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "test", ResourceVersion: "7"}, Spec: api.PodSpec{NodeName: "machine"}, } @@ -416,8 +417,8 @@ func TestNoOpUpdates(t *testing.T) { newPod := func() *api.Pod { return &api.Pod{ - ObjectMeta: api.ObjectMeta{ - Namespace: api.NamespaceDefault, + ObjectMeta: metav1.ObjectMeta{ + Namespace: metav1.NamespaceDefault, Name: "foo", Labels: map[string]string{"prepare_create": "true"}, }, @@ -485,7 +486,7 @@ func (t testPodExport) Export(ctx genericapirequest.Context, obj runtime.Object, func TestStoreCustomExport(t *testing.T) { podA := api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "test", Name: "foo", Labels: map[string]string{}, @@ -530,7 +531,7 @@ func TestStoreCustomExport(t *testing.T) { func TestStoreBasicExport(t *testing.T) { podA := api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "test", Name: "foo", Labels: map[string]string{}, @@ -566,7 +567,7 @@ func TestStoreBasicExport(t *testing.T) { func TestStoreGet(t *testing.T) { podA := &api.Pod{ - ObjectMeta: api.ObjectMeta{Namespace: "test", Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "test", Name: "foo"}, Spec: api.PodSpec{NodeName: "machine"}, } @@ -587,7 +588,7 @@ func TestStoreGet(t *testing.T) { func TestStoreDelete(t *testing.T) { podA := &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.PodSpec{NodeName: "machine"}, } @@ -629,7 +630,7 @@ func TestGracefulStoreCanDeleteIfExistingGracePeriodZero(t *testing.T) { deletionGracePeriodSeconds := int64(0) initialGeneration := int64(1) pod := &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Generation: initialGeneration, DeletionGracePeriodSeconds: &deletionGracePeriodSeconds, @@ -645,7 +646,7 @@ func TestGracefulStoreCanDeleteIfExistingGracePeriodZero(t *testing.T) { registry.DeleteStrategy = testGracefulStrategy{defaultDeleteStrategy} defer destroyFunc() - graceful, gracefulPending, err := rest.BeforeDelete(registry.DeleteStrategy, testContext, pod, api.NewDeleteOptions(0)) + graceful, gracefulPending, err := rest.BeforeDelete(registry.DeleteStrategy, testContext, pod, metav1.NewDeleteOptions(0)) if err != nil { t.Fatalf("Unexpected error: %v", err) } @@ -660,7 +661,7 @@ func TestGracefulStoreCanDeleteIfExistingGracePeriodZero(t *testing.T) { func TestGracefulStoreHandleFinalizers(t *testing.T) { initialGeneration := int64(1) podWithFinalizer := &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo", Finalizers: []string{"foo.com/x"}, Generation: initialGeneration}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Finalizers: []string{"foo.com/x"}, Generation: initialGeneration}, Spec: api.PodSpec{NodeName: "machine"}, } @@ -677,7 +678,7 @@ func TestGracefulStoreHandleFinalizers(t *testing.T) { } // delete the pod with grace period=0, the pod should still exist because it has a finalizer - _, err = registry.Delete(testContext, podWithFinalizer.Name, api.NewDeleteOptions(0)) + _, err = registry.Delete(testContext, podWithFinalizer.Name, metav1.NewDeleteOptions(0)) if err != nil { t.Fatalf("Unexpected error: %v", err) } @@ -687,7 +688,7 @@ func TestGracefulStoreHandleFinalizers(t *testing.T) { } updatedPodWithFinalizer := &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo", Finalizers: []string{"foo.com/x"}, ResourceVersion: podWithFinalizer.ObjectMeta.ResourceVersion}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Finalizers: []string{"foo.com/x"}, ResourceVersion: podWithFinalizer.ObjectMeta.ResourceVersion}, Spec: api.PodSpec{NodeName: "machine"}, } _, _, err = registry.Update(testContext, updatedPodWithFinalizer.ObjectMeta.Name, rest.DefaultUpdatedObjectInfo(updatedPodWithFinalizer, api.Scheme)) @@ -702,7 +703,7 @@ func TestGracefulStoreHandleFinalizers(t *testing.T) { } podWithNoFinalizer := &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo", ResourceVersion: podWithFinalizer.ObjectMeta.ResourceVersion}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", ResourceVersion: podWithFinalizer.ObjectMeta.ResourceVersion}, Spec: api.PodSpec{NodeName: "anothermachine"}, } _, _, err = registry.Update(testContext, podWithFinalizer.ObjectMeta.Name, rest.DefaultUpdatedObjectInfo(podWithNoFinalizer, api.Scheme)) @@ -719,7 +720,7 @@ func TestGracefulStoreHandleFinalizers(t *testing.T) { func TestNonGracefulStoreHandleFinalizers(t *testing.T) { initialGeneration := int64(1) podWithFinalizer := &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo", Finalizers: []string{"foo.com/x"}, Generation: initialGeneration}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Finalizers: []string{"foo.com/x"}, Generation: initialGeneration}, Spec: api.PodSpec{NodeName: "machine"}, } @@ -759,7 +760,7 @@ func TestNonGracefulStoreHandleFinalizers(t *testing.T) { } updatedPodWithFinalizer := &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo", Finalizers: []string{"foo.com/x"}, ResourceVersion: podWithFinalizer.ObjectMeta.ResourceVersion}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Finalizers: []string{"foo.com/x"}, ResourceVersion: podWithFinalizer.ObjectMeta.ResourceVersion}, Spec: api.PodSpec{NodeName: "machine"}, } _, _, err = registry.Update(testContext, updatedPodWithFinalizer.ObjectMeta.Name, rest.DefaultUpdatedObjectInfo(updatedPodWithFinalizer, api.Scheme)) @@ -778,7 +779,7 @@ func TestNonGracefulStoreHandleFinalizers(t *testing.T) { } podWithNoFinalizer := &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo", ResourceVersion: podWithFinalizer.ObjectMeta.ResourceVersion}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", ResourceVersion: podWithFinalizer.ObjectMeta.ResourceVersion}, Spec: api.PodSpec{NodeName: "anothermachine"}, } _, _, err = registry.Update(testContext, podWithFinalizer.ObjectMeta.Name, rest.DefaultUpdatedObjectInfo(podWithNoFinalizer, api.Scheme)) @@ -796,32 +797,32 @@ func TestStoreDeleteWithOrphanDependents(t *testing.T) { initialGeneration := int64(1) podWithOrphanFinalizer := func(name string) *api.Pod { return &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: name, Finalizers: []string{"foo.com/x", api.FinalizerOrphan, "bar.com/y"}, Generation: initialGeneration}, + ObjectMeta: metav1.ObjectMeta{Name: name, Finalizers: []string{"foo.com/x", api.FinalizerOrphan, "bar.com/y"}, Generation: initialGeneration}, Spec: api.PodSpec{NodeName: "machine"}, } } podWithOtherFinalizers := func(name string) *api.Pod { return &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: name, Finalizers: []string{"foo.com/x", "bar.com/y"}, Generation: initialGeneration}, + ObjectMeta: metav1.ObjectMeta{Name: name, Finalizers: []string{"foo.com/x", "bar.com/y"}, Generation: initialGeneration}, Spec: api.PodSpec{NodeName: "machine"}, } } podWithNoFinalizer := func(name string) *api.Pod { return &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: name, Generation: initialGeneration}, + ObjectMeta: metav1.ObjectMeta{Name: name, Generation: initialGeneration}, Spec: api.PodSpec{NodeName: "machine"}, } } podWithOnlyOrphanFinalizer := func(name string) *api.Pod { return &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: name, Finalizers: []string{api.FinalizerOrphan}, Generation: initialGeneration}, + ObjectMeta: metav1.ObjectMeta{Name: name, Finalizers: []string{api.FinalizerOrphan}, Generation: initialGeneration}, Spec: api.PodSpec{NodeName: "machine"}, } } trueVar, falseVar := true, false - orphanOptions := &api.DeleteOptions{OrphanDependents: &trueVar} - nonOrphanOptions := &api.DeleteOptions{OrphanDependents: &falseVar} - nilOrphanOptions := &api.DeleteOptions{} + orphanOptions := &metav1.DeleteOptions{OrphanDependents: &trueVar} + nonOrphanOptions := &metav1.DeleteOptions{OrphanDependents: &falseVar} + nilOrphanOptions := &metav1.DeleteOptions{} // defaultDeleteStrategy doesn't implement rest.GarbageCollectionDeleteStrategy. defaultDeleteStrategy := &testRESTStrategy{api.Scheme, names.SimpleNameGenerator, true, false, true} @@ -831,7 +832,7 @@ func TestStoreDeleteWithOrphanDependents(t *testing.T) { testcases := []struct { pod *api.Pod - options *api.DeleteOptions + options *metav1.DeleteOptions strategy rest.RESTDeleteStrategy expectNotFound bool updatedFinalizers []string @@ -1063,8 +1064,8 @@ func TestStoreDeleteWithOrphanDependents(t *testing.T) { } func TestStoreDeleteCollection(t *testing.T) { - podA := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}} - podB := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "bar"}} + podA := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} + podB := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "bar"}} testContext := genericapirequest.WithNamespace(genericapirequest.NewContext(), "test") destroyFunc, registry := NewTestGenericStoreRegistry(t) @@ -1078,7 +1079,7 @@ func TestStoreDeleteCollection(t *testing.T) { } // Delete all pods. - deleted, err := registry.DeleteCollection(testContext, nil, &api.ListOptions{}) + deleted, err := registry.DeleteCollection(testContext, nil, &metainternalversion.ListOptions{}) if err != nil { t.Fatalf("Unexpected error: %v", err) } @@ -1101,8 +1102,8 @@ func TestStoreDeleteCollectionNotFound(t *testing.T) { testContext := genericapirequest.WithNamespace(genericapirequest.NewContext(), "test") - podA := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}} - podB := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "bar"}} + podA := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} + podB := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "bar"}} for i := 0; i < 10; i++ { // Setup @@ -1119,7 +1120,7 @@ func TestStoreDeleteCollectionNotFound(t *testing.T) { wg.Add(1) go func() { defer wg.Done() - _, err := registry.DeleteCollection(testContext, nil, &api.ListOptions{}) + _, err := registry.DeleteCollection(testContext, nil, &metainternalversion.ListOptions{}) if err != nil { t.Fatalf("Unexpected error: %v", err) } @@ -1139,7 +1140,7 @@ func TestStoreDeleteCollectionNotFound(t *testing.T) { // Test whether objects deleted with DeleteCollection are correctly delivered // to watchers. func TestStoreDeleteCollectionWithWatch(t *testing.T) { - podA := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}} + podA := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} testContext := genericapirequest.WithNamespace(genericapirequest.NewContext(), "test") destroyFunc, registry := NewTestGenericStoreRegistry(t) @@ -1157,7 +1158,7 @@ func TestStoreDeleteCollectionWithWatch(t *testing.T) { } defer watcher.Stop() - if _, err := registry.DeleteCollection(testContext, nil, &api.ListOptions{}); err != nil { + if _, err := registry.DeleteCollection(testContext, nil, &metainternalversion.ListOptions{}); err != nil { t.Fatalf("Unexpected error: %v", err) } @@ -1202,7 +1203,7 @@ func TestStoreWatch(t *testing.T) { ctx = m.context } podA := &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "test", }, diff --git a/vendor/k8s.io/kubernetes/pkg/registry/generic/rest/BUILD b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/generic/rest/BUILD similarity index 96% rename from vendor/k8s.io/kubernetes/pkg/registry/generic/rest/BUILD rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/generic/rest/BUILD index 55a87356..ad216ed8 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/generic/rest/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/generic/rest/BUILD @@ -18,7 +18,7 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/genericapiserver/api/rest:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/util/config:go_default_library", "//pkg/util/httpstream:go_default_library", "//pkg/util/proxy:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/registry/generic/rest/doc.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/generic/rest/doc.go similarity index 88% rename from vendor/k8s.io/kubernetes/pkg/registry/generic/rest/doc.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/generic/rest/doc.go index d08a7f68..abe523eb 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/generic/rest/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/generic/rest/doc.go @@ -16,4 +16,4 @@ limitations under the License. // Package rest has generic implementations of resources used for // REST responses -package rest // import "k8s.io/kubernetes/pkg/registry/generic/rest" +package rest // import "k8s.io/kubernetes/pkg/genericapiserver/registry/generic/rest" diff --git a/vendor/k8s.io/kubernetes/pkg/registry/generic/rest/proxy.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/generic/rest/proxy.go similarity index 99% rename from vendor/k8s.io/kubernetes/pkg/registry/generic/rest/proxy.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/generic/rest/proxy.go index e6e986b3..3262092d 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/generic/rest/proxy.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/generic/rest/proxy.go @@ -99,7 +99,7 @@ func (h *UpgradeAwareProxyHandler) ServeHTTP(w http.ResponseWriter, req *http.Re loc.Path += "/" } - // From pkg/genericapiserver/api/handlers/proxy.go#ServeHTTP: + // From pkg/genericapiserver/endpoints/handlers/proxy.go#ServeHTTP: // Redirect requests with an empty path to a location that ends with a '/' // This is essentially a hack for http://issue.k8s.io/4958. // Note: Keep this code after tryUpgrade to not break that flow. diff --git a/vendor/k8s.io/kubernetes/pkg/registry/generic/rest/proxy_test.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/generic/rest/proxy_test.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/registry/generic/rest/proxy_test.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/generic/rest/proxy_test.go diff --git a/vendor/k8s.io/kubernetes/pkg/registry/generic/rest/response_checker.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/generic/rest/response_checker.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/registry/generic/rest/response_checker.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/generic/rest/response_checker.go diff --git a/vendor/k8s.io/kubernetes/pkg/registry/generic/rest/response_checker_test.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/generic/rest/response_checker_test.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/registry/generic/rest/response_checker_test.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/generic/rest/response_checker_test.go diff --git a/vendor/k8s.io/kubernetes/pkg/registry/generic/rest/streamer.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/generic/rest/streamer.go similarity index 97% rename from vendor/k8s.io/kubernetes/pkg/registry/generic/rest/streamer.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/generic/rest/streamer.go index 247b7c52..24fe7f98 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/generic/rest/streamer.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/generic/rest/streamer.go @@ -23,7 +23,7 @@ import ( "strings" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" ) // LocationStreamer is a resource that streams the contents of a particular diff --git a/vendor/k8s.io/kubernetes/pkg/registry/generic/rest/streamer_test.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/generic/rest/streamer_test.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/registry/generic/rest/streamer_test.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/generic/rest/streamer_test.go diff --git a/vendor/k8s.io/kubernetes/pkg/registry/generic/storage_decorator.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/generic/storage_decorator.go similarity index 89% rename from vendor/k8s.io/kubernetes/pkg/registry/generic/storage_decorator.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/generic/storage_decorator.go index 61a21a03..bf3530c5 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/generic/storage_decorator.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/generic/storage_decorator.go @@ -24,8 +24,8 @@ import ( "k8s.io/kubernetes/pkg/storage/storagebackend/factory" ) -// StorageDecorator is a function signature for producing -// a storage.Interface from given parameters. +// StorageDecorator is a function signature for producing a storage.Interface +// and an associated DestroyFunc from given parameters. type StorageDecorator func( config *storagebackend.Config, capacity int, @@ -36,7 +36,8 @@ type StorageDecorator func( getAttrsFunc storage.AttrFunc, trigger storage.TriggerPublisherFunc) (storage.Interface, factory.DestroyFunc) -// Returns given 'storageInterface' without any decoration. +// UndecoratedStorage returns the given a new storage from the given config +// without any decoration. func UndecoratedStorage( config *storagebackend.Config, capacity int, diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/rest/BUILD b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/rest/BUILD similarity index 83% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/api/rest/BUILD rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/rest/BUILD index f38faa64..77dc82fd 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/rest/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/rest/BUILD @@ -17,7 +17,6 @@ go_library( "export.go", "meta.go", "rest.go", - "types.go", "update.go", ], tags = ["automanaged"], @@ -28,12 +27,13 @@ go_library( "//pkg/util/uuid:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/api/meta", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/internalversion", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/util/validation/field", "//vendor:k8s.io/apimachinery/pkg/watch", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", "//vendor:k8s.io/apiserver/pkg/storage/names", ], ) @@ -49,7 +49,7 @@ filegroup( name = "all-srcs", srcs = [ ":package-srcs", - "//pkg/genericapiserver/api/rest/resttest:all-srcs", + "//pkg/genericapiserver/registry/rest/resttest:all-srcs", ], tags = ["automanaged"], ) @@ -62,6 +62,7 @@ go_test( deps = [ "//pkg/api:go_default_library", "//pkg/util/uuid:go_default_library", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/rest/OWNERS b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/rest/OWNERS similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/api/rest/OWNERS rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/rest/OWNERS diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/rest/create.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/rest/create.go similarity index 83% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/api/rest/create.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/rest/create.go index d38941b6..f73621bd 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/rest/create.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/rest/create.go @@ -18,12 +18,12 @@ package rest import ( "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/validation/field" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/storage/names" - "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/validation/genericvalidation" "k8s.io/kubernetes/pkg/api/validation/path" ) @@ -33,7 +33,7 @@ import ( // API conventions. type RESTCreateStrategy interface { runtime.ObjectTyper - // The name generate is used when the standard GenerateName field is set. + // The name generator is used when the standard GenerateName field is set. // The NameGenerator will be invoked prior to validation. names.NameGenerator @@ -44,11 +44,16 @@ type RESTCreateStrategy interface { // sort order-insensitive list fields, etc. This should not remove fields // whose presence would be considered a validation error. PrepareForCreate(ctx genericapirequest.Context, obj runtime.Object) - // Validate is invoked after default fields in the object have been filled in before - // the object is persisted. This method should not mutate the object. + // Validate returns an ErrorList with validation errors or nil. Validate + // is invoked after default fields in the object have been filled in + // before the object is persisted. This method should not mutate the + // object. Validate(ctx genericapirequest.Context, obj runtime.Object) field.ErrorList - // Canonicalize is invoked after validation has succeeded but before the - // object has been persisted. This method may mutate the object. + // Canonicalize allows an object to be mutated into a canonical form. This + // ensures that code that operates on these objects can rely on the common + // form for things like comparison. Canonicalize is invoked after + // validation has succeeded but before the object has been persisted. + // This method may mutate the object. Canonicalize(obj runtime.Object) } @@ -66,7 +71,7 @@ func BeforeCreate(strategy RESTCreateStrategy, ctx genericapirequest.Context, ob return errors.NewBadRequest("the namespace of the provided object does not match the namespace sent on the request") } } else { - objectMeta.Namespace = api.NamespaceNone + objectMeta.Namespace = metav1.NamespaceNone } objectMeta.DeletionTimestamp = nil objectMeta.DeletionGracePeriodSeconds = nil @@ -115,8 +120,8 @@ func CheckGeneratedNameError(strategy RESTCreateStrategy, err error, obj runtime } // objectMetaAndKind retrieves kind and ObjectMeta from a runtime object, or returns an error. -func objectMetaAndKind(typer runtime.ObjectTyper, obj runtime.Object) (*api.ObjectMeta, schema.GroupVersionKind, error) { - objectMeta, err := api.ObjectMetaFor(obj) +func objectMetaAndKind(typer runtime.ObjectTyper, obj runtime.Object) (*metav1.ObjectMeta, schema.GroupVersionKind, error) { + objectMeta, err := metav1.ObjectMetaFor(obj) if err != nil { return nil, schema.GroupVersionKind{}, errors.NewInternalError(err) } diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/rest/delete.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/rest/delete.go similarity index 96% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/api/rest/delete.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/rest/delete.go index 56acd73f..572114f9 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/rest/delete.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/rest/delete.go @@ -24,8 +24,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - genericapirequest "k8s.io/apiserver/pkg/request" - "k8s.io/kubernetes/pkg/api" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" ) // RESTDeleteStrategy defines deletion behavior on an object that follows Kubernetes @@ -53,7 +52,7 @@ type GarbageCollectionDeleteStrategy interface { type RESTGracefulDeleteStrategy interface { // CheckGracefulDelete should return true if the object can be gracefully deleted and set // any default values on the DeleteOptions. - CheckGracefulDelete(ctx genericapirequest.Context, obj runtime.Object, options *api.DeleteOptions) bool + CheckGracefulDelete(ctx genericapirequest.Context, obj runtime.Object, options *metav1.DeleteOptions) bool } // BeforeDelete tests whether the object can be gracefully deleted. If graceful is set the object @@ -62,7 +61,7 @@ type RESTGracefulDeleteStrategy interface { // condition cannot be checked or the gracePeriodSeconds is invalid. The options argument may be updated with // default values if graceful is true. Second place where we set deletionTimestamp is pkg/registry/generic/registry/store.go // this function is responsible for setting deletionTimestamp during gracefulDeletion, other one for cascading deletions. -func BeforeDelete(strategy RESTDeleteStrategy, ctx genericapirequest.Context, obj runtime.Object, options *api.DeleteOptions) (graceful, gracefulPending bool, err error) { +func BeforeDelete(strategy RESTDeleteStrategy, ctx genericapirequest.Context, obj runtime.Object, options *metav1.DeleteOptions) (graceful, gracefulPending bool, err error) { objectMeta, gvk, kerr := objectMetaAndKind(strategy, obj) if kerr != nil { return false, false, kerr diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/rest/doc.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/rest/doc.go similarity index 86% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/api/rest/doc.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/rest/doc.go index ac4e1b73..6f985507 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/rest/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/rest/doc.go @@ -14,5 +14,5 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Package rest defines common logic around changes to Kubernetes resources. -package rest // import "k8s.io/kubernetes/pkg/genericapiserver/api/rest" +// Package rest defines common logic around changes to Kubernetes-style resources. +package rest // import "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/rest/export.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/rest/export.go similarity index 73% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/api/rest/export.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/rest/export.go index a29c9b79..b0fc292e 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/rest/export.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/rest/export.go @@ -18,10 +18,14 @@ package rest import ( "k8s.io/apimachinery/pkg/runtime" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" ) -// RESTExportStrategy is the interface that defines how to export a Kubernetes object +// RESTExportStrategy is the interface that defines how to export a Kubernetes +// object. An exported object is stripped of non-user-settable fields and +// optionally, the identifying information related to the object's identity in +// the cluster so that it can be loaded into a different namespace or entirely +// different cluster without conflict. type RESTExportStrategy interface { // Export strips fields that can not be set by the user. If 'exact' is false // fields specific to the cluster are also stripped diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/rest/meta.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/rest/meta.go similarity index 79% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/api/rest/meta.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/rest/meta.go index 96c84a7b..5b1e70f4 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/rest/meta.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/rest/meta.go @@ -18,13 +18,12 @@ package rest import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - genericapirequest "k8s.io/apiserver/pkg/request" - "k8s.io/kubernetes/pkg/api" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/util/uuid" ) // FillObjectMetaSystemFields populates fields that are managed by the system on ObjectMeta. -func FillObjectMetaSystemFields(ctx genericapirequest.Context, meta *api.ObjectMeta) { +func FillObjectMetaSystemFields(ctx genericapirequest.Context, meta *metav1.ObjectMeta) { meta.CreationTimestamp = metav1.Now() // allows admission controllers to assign a UID earlier in the request processing // to support tracking resources pending creation. @@ -36,9 +35,12 @@ func FillObjectMetaSystemFields(ctx genericapirequest.Context, meta *api.ObjectM meta.SelfLink = "" } -// ValidNamespace returns false if the namespace on the context differs from the resource. If the resource has no namespace, it is set to the value in the context. -// TODO(sttts): move into pkg/genericapiserver/api -func ValidNamespace(ctx genericapirequest.Context, resource *api.ObjectMeta) bool { +// ValidNamespace returns false if the namespace on the context differs from +// the resource. If the resource has no namespace, it is set to the value in +// the context. +// +// TODO(sttts): move into pkg/genericapiserver/endpoints +func ValidNamespace(ctx genericapirequest.Context, resource *metav1.ObjectMeta) bool { ns, ok := genericapirequest.NamespaceFrom(ctx) if len(resource.Namespace) == 0 { resource.Namespace = ns diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/rest/meta_test.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/rest/meta_test.go similarity index 90% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/api/rest/meta_test.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/rest/meta_test.go index 978e7524..8967979e 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/rest/meta_test.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/rest/meta_test.go @@ -19,7 +19,8 @@ package rest import ( "testing" - genericapirequest "k8s.io/apiserver/pkg/request" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/util/uuid" ) @@ -27,7 +28,7 @@ import ( // TestFillObjectMetaSystemFields validates that system populated fields are set on an object func TestFillObjectMetaSystemFields(t *testing.T) { ctx := genericapirequest.NewDefaultContext() - resource := api.ObjectMeta{} + resource := metav1.ObjectMeta{} FillObjectMetaSystemFields(ctx, &resource) if resource.CreationTimestamp.Time.IsZero() { t.Errorf("resource.CreationTimestamp is zero") @@ -37,7 +38,7 @@ func TestFillObjectMetaSystemFields(t *testing.T) { // verify we can inject a UID uid := uuid.NewUUID() ctx = genericapirequest.WithUID(ctx, uid) - resource = api.ObjectMeta{} + resource = metav1.ObjectMeta{} FillObjectMetaSystemFields(ctx, &resource) if resource.UID != uid { t.Errorf("resource.UID expected: %v, actual: %v", uid, resource.UID) @@ -47,7 +48,7 @@ func TestFillObjectMetaSystemFields(t *testing.T) { // TestHasObjectMetaSystemFieldValues validates that true is returned if and only if all fields are populated func TestHasObjectMetaSystemFieldValues(t *testing.T) { ctx := genericapirequest.NewDefaultContext() - resource := api.ObjectMeta{} + resource := metav1.ObjectMeta{} if api.HasObjectMetaSystemFieldValues(&resource) { t.Errorf("the resource does not have all fields yet populated, but incorrectly reports it does") } @@ -68,7 +69,7 @@ func TestValidNamespace(t *testing.T) { if namespace != resource.Namespace { t.Fatalf("expected resource to have the default namespace assigned during validation") } - resource = api.ReplicationController{ObjectMeta: api.ObjectMeta{Namespace: "other"}} + resource = api.ReplicationController{ObjectMeta: metav1.ObjectMeta{Namespace: "other"}} if ValidNamespace(ctx, &resource.ObjectMeta) { t.Fatalf("Expected error that resource and context errors do not match because resource has different namespace") } diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/rest/rest.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/rest/rest.go similarity index 95% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/api/rest/rest.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/rest/rest.go index 8b7cfb3f..198cb09d 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/rest/rest.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/rest/rest.go @@ -21,11 +21,12 @@ import ( "net/http" "net/url" + metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/watch" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" ) @@ -71,7 +72,7 @@ type Lister interface { // This object must be a pointer type for use with Codec.DecodeInto([]byte, runtime.Object) NewList() runtime.Object // List selects resources in the storage which match to the selector. 'options' can be nil. - List(ctx genericapirequest.Context, options *api.ListOptions) (runtime.Object, error) + List(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (runtime.Object, error) } // Exporter is an object that knows how to strip a RESTful resource for export @@ -131,7 +132,7 @@ type GracefulDeleter interface { // returned error value err when the specified resource is not found. // Delete *may* return the object that was deleted, or a status object indicating additional // information about deletion. - Delete(ctx genericapirequest.Context, name string, options *api.DeleteOptions) (runtime.Object, error) + Delete(ctx genericapirequest.Context, name string, options *metav1.DeleteOptions) (runtime.Object, error) } // GracefulDeleteAdapter adapts the Deleter interface to GracefulDeleter @@ -140,7 +141,7 @@ type GracefulDeleteAdapter struct { } // Delete implements RESTGracefulDeleter in terms of Deleter -func (w GracefulDeleteAdapter) Delete(ctx genericapirequest.Context, name string, options *api.DeleteOptions) (runtime.Object, error) { +func (w GracefulDeleteAdapter) Delete(ctx genericapirequest.Context, name string, options *metav1.DeleteOptions) (runtime.Object, error) { return w.Deleter.Delete(ctx, name) } @@ -152,7 +153,7 @@ type CollectionDeleter interface { // them or return an invalid request error. // DeleteCollection may not be atomic - i.e. it may delete some objects and still // return an error after it. On success, returns a list of deleted objects. - DeleteCollection(ctx genericapirequest.Context, options *api.DeleteOptions, listOptions *api.ListOptions) (runtime.Object, error) + DeleteCollection(ctx genericapirequest.Context, options *metav1.DeleteOptions, listOptions *metainternalversion.ListOptions) (runtime.Object, error) } // Creater is an object that can create an instance of a RESTful object. @@ -225,7 +226,7 @@ type Watcher interface { // are supported; an error should be returned if 'field' tries to select on a field that // isn't supported. 'resourceVersion' allows for continuing/starting a watch at a // particular version. - Watch(ctx genericapirequest.Context, options *api.ListOptions) (watch.Interface, error) + Watch(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (watch.Interface, error) } // StandardStorage is an interface covering the common verbs. Provided for testing whether a diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/rest/resttest/BUILD b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/rest/resttest/BUILD similarity index 79% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/api/rest/resttest/BUILD rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/rest/resttest/BUILD index c64767ec..bb32202c 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/rest/resttest/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/rest/resttest/BUILD @@ -14,16 +14,17 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/api/validation/path:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/internalversion", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/conversion", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/wait", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/rest/resttest/resttest.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/rest/resttest/resttest.go similarity index 95% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/api/rest/resttest/resttest.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/rest/resttest/resttest.go index 1565cf3c..e99956e8 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/rest/resttest/resttest.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/rest/resttest/resttest.go @@ -24,17 +24,18 @@ import ( "time" "k8s.io/apimachinery/pkg/api/errors" + metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/conversion" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/wait" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/validation/path" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" ) type Tester struct { @@ -90,7 +91,7 @@ func (t *Tester) ReturnDeletedObject() *Tester { // Returns NamespaceNone for cluster-scoped objects. func (t *Tester) TestNamespace() string { if t.clusterScope { - return api.NamespaceNone + return metav1.NamespaceNone } return "test" } @@ -104,8 +105,8 @@ func (t *Tester) TestContext() genericapirequest.Context { return genericapirequest.WithNamespace(genericapirequest.NewContext(), t.TestNamespace()) } -func (t *Tester) getObjectMetaOrFail(obj runtime.Object) *api.ObjectMeta { - meta, err := api.ObjectMetaFor(obj) +func (t *Tester) getObjectMetaOrFail(obj runtime.Object) *metav1.ObjectMeta { + meta, err := metav1.ObjectMetaFor(obj) if err != nil { t.Fatalf("object does not have ObjectMeta: %v\n%#v", err, obj) } @@ -116,7 +117,7 @@ func (t *Tester) setObjectMeta(obj runtime.Object, name string) { meta := t.getObjectMetaOrFail(obj) meta.Name = name if t.clusterScope { - meta.Namespace = api.NamespaceNone + meta.Namespace = metav1.NamespaceNone } else { meta.Namespace = genericapirequest.NamespaceValue(t.TestContext()) } @@ -169,7 +170,7 @@ func (t *Tester) TestUpdate(valid runtime.Object, createFn CreateFunc, getFn Get t.testUpdateFailsOnVersionTooOld(copyOrDie(valid), createFn, getFn) t.testUpdateOnNotFound(copyOrDie(valid)) if !t.clusterScope { - t.testUpdateRejectsMismatchedNamespace(copyOrDie(valid), createFn) + t.testUpdateRejectsMismatchedNamespace(copyOrDie(valid), createFn, getFn) } t.testUpdateInvokesValidation(copyOrDie(valid), createFn, invalidUpdateFn...) t.testUpdateWithWrongUID(copyOrDie(valid), createFn, getFn) @@ -225,7 +226,7 @@ func (t *Tester) TestWatch( // Creation tests. func (t *Tester) delete(ctx genericapirequest.Context, obj runtime.Object) error { - objectMeta, err := api.ObjectMetaFor(obj) + objectMeta, err := metav1.ObjectMetaFor(obj) if err != nil { return err } @@ -293,7 +294,7 @@ func (t *Tester) testCreateDiscardsObjectNamespace(valid runtime.Object) { } defer t.delete(t.TestContext(), created) createdObjectMeta := t.getObjectMetaOrFail(created) - if createdObjectMeta.Namespace != api.NamespaceNone { + if createdObjectMeta.Namespace != metav1.NamespaceNone { t.Errorf("Expected empty namespace on created object, got '%v'", createdObjectMeta.Namespace) } } @@ -342,7 +343,7 @@ func (t *Tester) testCreateIgnoresContextNamespace(valid runtime.Object) { } defer t.delete(ctx, created) createdObjectMeta := t.getObjectMetaOrFail(created) - if createdObjectMeta.Namespace != api.NamespaceNone { + if createdObjectMeta.Namespace != metav1.NamespaceNone { t.Errorf("Expected empty namespace on created object, got '%v'", createdObjectMeta.Namespace) } } @@ -361,7 +362,7 @@ func (t *Tester) testCreateIgnoresMismatchedNamespace(valid runtime.Object) { } defer t.delete(ctx, created) createdObjectMeta := t.getObjectMetaOrFail(created) - if createdObjectMeta.Namespace != api.NamespaceNone { + if createdObjectMeta.Namespace != metav1.NamespaceNone { t.Errorf("Expected empty namespace on created object, got '%v'", createdObjectMeta.Namespace) } } @@ -686,7 +687,7 @@ func (t *Tester) testUpdateOnNotFound(obj runtime.Object) { } } -func (t *Tester) testUpdateRejectsMismatchedNamespace(obj runtime.Object, createFn CreateFunc) { +func (t *Tester) testUpdateRejectsMismatchedNamespace(obj runtime.Object, createFn CreateFunc, getFn GetFunc) { ctx := t.TestContext() foo := copyOrDie(obj) @@ -695,11 +696,16 @@ func (t *Tester) testUpdateRejectsMismatchedNamespace(obj runtime.Object, create t.Errorf("unexpected error: %v", err) } - objectMeta := t.getObjectMetaOrFail(obj) + storedFoo, err := getFn(ctx, foo) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + + objectMeta := t.getObjectMetaOrFail(storedFoo) objectMeta.Name = t.namer(1) objectMeta.Namespace = "not-default" - obj, updated, err := t.storage.(rest.Updater).Update(t.TestContext(), "foo1", rest.DefaultUpdatedObjectInfo(obj, api.Scheme)) + obj, updated, err := t.storage.(rest.Updater).Update(t.TestContext(), "foo1", rest.DefaultUpdatedObjectInfo(storedFoo, api.Scheme)) if obj != nil || updated { t.Errorf("expected nil object and not updated") } @@ -757,7 +763,7 @@ func (t *Tester) testDeleteNoGraceful(obj runtime.Object, createFn CreateFunc, g t.Errorf("unexpected error: %v", err) } objectMeta := t.getObjectMetaOrFail(foo) - obj, err := t.storage.(rest.GracefulDeleter).Delete(ctx, objectMeta.Name, api.NewDeleteOptions(10)) + obj, err := t.storage.(rest.GracefulDeleter).Delete(ctx, objectMeta.Name, metav1.NewDeleteOptions(10)) if err != nil { t.Errorf("unexpected error: %v", err) } @@ -797,12 +803,12 @@ func (t *Tester) testDeleteWithUID(obj runtime.Object, createFn CreateFunc, getF if err := createFn(ctx, foo); err != nil { t.Errorf("unexpected error: %v", err) } - obj, err := t.storage.(rest.GracefulDeleter).Delete(ctx, objectMeta.Name, api.NewPreconditionDeleteOptions("UID1111")) + obj, err := t.storage.(rest.GracefulDeleter).Delete(ctx, objectMeta.Name, metav1.NewPreconditionDeleteOptions("UID1111")) if err == nil || !errors.IsConflict(err) { t.Errorf("unexpected error: %v", err) } - obj, err = t.storage.(rest.GracefulDeleter).Delete(ctx, objectMeta.Name, api.NewPreconditionDeleteOptions("UID0000")) + obj, err = t.storage.(rest.GracefulDeleter).Delete(ctx, objectMeta.Name, metav1.NewPreconditionDeleteOptions("UID0000")) if err != nil { t.Errorf("unexpected error: %v", err) } @@ -834,7 +840,7 @@ func (t *Tester) testDeleteGracefulHasDefault(obj runtime.Object, createFn Creat } objectMeta := t.getObjectMetaOrFail(foo) generation := objectMeta.Generation - _, err := t.storage.(rest.GracefulDeleter).Delete(ctx, objectMeta.Name, &api.DeleteOptions{}) + _, err := t.storage.(rest.GracefulDeleter).Delete(ctx, objectMeta.Name, &metav1.DeleteOptions{}) if err != nil { t.Errorf("unexpected error: %v", err) } @@ -865,7 +871,7 @@ func (t *Tester) testDeleteGracefulWithValue(obj runtime.Object, createFn Create } objectMeta := t.getObjectMetaOrFail(foo) generation := objectMeta.Generation - _, err := t.storage.(rest.GracefulDeleter).Delete(ctx, objectMeta.Name, api.NewDeleteOptions(expectedGrace+2)) + _, err := t.storage.(rest.GracefulDeleter).Delete(ctx, objectMeta.Name, metav1.NewDeleteOptions(expectedGrace+2)) if err != nil { t.Errorf("unexpected error: %v", err) } @@ -896,7 +902,7 @@ func (t *Tester) testDeleteGracefulExtend(obj runtime.Object, createFn CreateFun } objectMeta := t.getObjectMetaOrFail(foo) generation := objectMeta.Generation - _, err := t.storage.(rest.GracefulDeleter).Delete(ctx, objectMeta.Name, api.NewDeleteOptions(expectedGrace)) + _, err := t.storage.(rest.GracefulDeleter).Delete(ctx, objectMeta.Name, metav1.NewDeleteOptions(expectedGrace)) if err != nil { t.Errorf("unexpected error: %v", err) } @@ -905,7 +911,7 @@ func (t *Tester) testDeleteGracefulExtend(obj runtime.Object, createFn CreateFun } // second delete duration is ignored - _, err = t.storage.(rest.GracefulDeleter).Delete(ctx, objectMeta.Name, api.NewDeleteOptions(expectedGrace+2)) + _, err = t.storage.(rest.GracefulDeleter).Delete(ctx, objectMeta.Name, metav1.NewDeleteOptions(expectedGrace+2)) if err != nil { t.Errorf("unexpected error: %v", err) } @@ -932,7 +938,7 @@ func (t *Tester) testDeleteGracefulImmediate(obj runtime.Object, createFn Create } objectMeta := t.getObjectMetaOrFail(foo) generation := objectMeta.Generation - _, err := t.storage.(rest.GracefulDeleter).Delete(ctx, objectMeta.Name, api.NewDeleteOptions(expectedGrace)) + _, err := t.storage.(rest.GracefulDeleter).Delete(ctx, objectMeta.Name, metav1.NewDeleteOptions(expectedGrace)) if err != nil { t.Errorf("unexpected error: %v", err) } @@ -941,7 +947,7 @@ func (t *Tester) testDeleteGracefulImmediate(obj runtime.Object, createFn Create } // second delete is immediate, resource is deleted - out, err := t.storage.(rest.GracefulDeleter).Delete(ctx, objectMeta.Name, api.NewDeleteOptions(0)) + out, err := t.storage.(rest.GracefulDeleter).Delete(ctx, objectMeta.Name, metav1.NewDeleteOptions(0)) if err != nil { t.Errorf("unexpected error: %v", err) } @@ -991,7 +997,7 @@ func (t *Tester) testDeleteGracefulShorten(obj runtime.Object, createFn CreateFu bigGrace = 2 * expectedGrace } objectMeta := t.getObjectMetaOrFail(foo) - _, err := t.storage.(rest.GracefulDeleter).Delete(ctx, objectMeta.Name, api.NewDeleteOptions(bigGrace)) + _, err := t.storage.(rest.GracefulDeleter).Delete(ctx, objectMeta.Name, metav1.NewDeleteOptions(bigGrace)) if err != nil { t.Errorf("unexpected error: %v", err) } @@ -1003,7 +1009,7 @@ func (t *Tester) testDeleteGracefulShorten(obj runtime.Object, createFn CreateFu deletionTimestamp := *objectMeta.DeletionTimestamp // second delete duration is ignored - _, err = t.storage.(rest.GracefulDeleter).Delete(ctx, objectMeta.Name, api.NewDeleteOptions(expectedGrace)) + _, err = t.storage.(rest.GracefulDeleter).Delete(ctx, objectMeta.Name, metav1.NewDeleteOptions(expectedGrace)) if err != nil { t.Errorf("unexpected error: %v", err) } @@ -1191,7 +1197,7 @@ func (t *Tester) testListMatchLabels(obj runtime.Object, assignFn AssignFunc) { filtered := []runtime.Object{objs[1]} selector := labels.SelectorFromSet(labels.Set(testLabels)) - options := &api.ListOptions{LabelSelector: selector} + options := &metainternalversion.ListOptions{LabelSelector: selector} listObj, err := t.storage.(rest.Lister).List(ctx, options) if err != nil { t.Errorf("unexpected error: %v", err) @@ -1233,7 +1239,7 @@ func (t *Tester) testWatchFields(obj runtime.Object, emitFn EmitFunc, fieldsPass for _, field := range fieldsPass { for _, action := range actions { - options := &api.ListOptions{FieldSelector: field.AsSelector(), ResourceVersion: "1"} + options := &metainternalversion.ListOptions{FieldSelector: field.AsSelector(), ResourceVersion: "1"} watcher, err := t.storage.(rest.Watcher).Watch(ctx, options) if err != nil { t.Errorf("unexpected error: %v, %v", err, action) @@ -1257,7 +1263,7 @@ func (t *Tester) testWatchFields(obj runtime.Object, emitFn EmitFunc, fieldsPass for _, field := range fieldsFail { for _, action := range actions { - options := &api.ListOptions{FieldSelector: field.AsSelector(), ResourceVersion: "1"} + options := &metainternalversion.ListOptions{FieldSelector: field.AsSelector(), ResourceVersion: "1"} watcher, err := t.storage.(rest.Watcher).Watch(ctx, options) if err != nil { t.Errorf("unexpected error: %v", err) @@ -1282,7 +1288,7 @@ func (t *Tester) testWatchLabels(obj runtime.Object, emitFn EmitFunc, labelsPass for _, label := range labelsPass { for _, action := range actions { - options := &api.ListOptions{LabelSelector: label.AsSelector(), ResourceVersion: "1"} + options := &metainternalversion.ListOptions{LabelSelector: label.AsSelector(), ResourceVersion: "1"} watcher, err := t.storage.(rest.Watcher).Watch(ctx, options) if err != nil { t.Errorf("unexpected error: %v", err) @@ -1305,7 +1311,7 @@ func (t *Tester) testWatchLabels(obj runtime.Object, emitFn EmitFunc, labelsPass for _, label := range labelsFail { for _, action := range actions { - options := &api.ListOptions{LabelSelector: label.AsSelector(), ResourceVersion: "1"} + options := &metainternalversion.ListOptions{LabelSelector: label.AsSelector(), ResourceVersion: "1"} watcher, err := t.storage.(rest.Watcher).Watch(ctx, options) if err != nil { t.Errorf("unexpected error: %v", err) diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/rest/update.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/rest/update.go similarity index 92% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/api/rest/update.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/rest/update.go index 7b89317e..3f3d8f9c 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/rest/update.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/registry/rest/update.go @@ -21,9 +21,10 @@ import ( "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/validation/field" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/validation/genericvalidation" ) @@ -47,8 +48,11 @@ type RESTUpdateStrategy interface { // filled in before the object is persisted. This method should not mutate // the object. ValidateUpdate(ctx genericapirequest.Context, obj, old runtime.Object) field.ErrorList - // Canonicalize is invoked after validation has succeeded but before the - // object has been persisted. This method may mutate the object. + // Canonicalize allows an object to be mutated into a canonical form. This + // ensures that code that operates on these objects can rely on the common + // form for things like comparison. Canonicalize is invoked after + // validation has succeeded but before the object has been persisted. + // This method may mutate the object. Canonicalize(obj runtime.Object) // AllowUnconditionalUpdate returns true if the object can be updated // unconditionally (irrespective of the latest resource version), when @@ -59,11 +63,11 @@ type RESTUpdateStrategy interface { // TODO: add other common fields that require global validation. func validateCommonFields(obj, old runtime.Object) (field.ErrorList, error) { allErrs := field.ErrorList{} - objectMeta, err := api.ObjectMetaFor(obj) + objectMeta, err := metav1.ObjectMetaFor(obj) if err != nil { return nil, fmt.Errorf("failed to get new object metadata: %v", err) } - oldObjectMeta, err := api.ObjectMetaFor(old) + oldObjectMeta, err := metav1.ObjectMetaFor(old) if err != nil { return nil, fmt.Errorf("failed to get old object metadata: %v", err) } @@ -85,10 +89,10 @@ func BeforeUpdate(strategy RESTUpdateStrategy, ctx genericapirequest.Context, ob return errors.NewBadRequest("the namespace of the provided object does not match the namespace sent on the request") } } else { - objectMeta.Namespace = api.NamespaceNone + objectMeta.Namespace = metav1.NamespaceNone } // Ensure requests cannot update generation - oldMeta, err := api.ObjectMetaFor(old) + oldMeta, err := metav1.ObjectMetaFor(old) if err != nil { return err } diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/BUILD b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/BUILD new file mode 100644 index 00000000..cfaea1f5 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/BUILD @@ -0,0 +1,131 @@ +package(default_visibility = ["//visibility:public"]) + +licenses(["notice"]) + +load( + "@io_bazel_rules_go//go:def.bzl", + "go_library", + "go_test", +) + +go_test( + name = "go_default_test", + srcs = [ + "genericapiserver_test.go", + "resource_config_test.go", + "serve_test.go", + "server_run_options_test.go", + "storage_factory_test.go", + ], + library = ":go_default_library", + tags = ["automanaged"], + deps = [ + "//pkg/api:go_default_library", + "//pkg/api/testapi:go_default_library", + "//pkg/api/v1:go_default_library", + "//pkg/apis/autoscaling:go_default_library", + "//pkg/apis/extensions:go_default_library", + "//pkg/client/clientset_generated/clientset:go_default_library", + "//pkg/generated/openapi:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", + "//pkg/genericapiserver/server/options:go_default_library", + "//pkg/storage/etcd/testing:go_default_library", + "//pkg/storage/storagebackend:go_default_library", + "//pkg/util/config:go_default_library", + "//vendor:github.com/go-openapi/spec", + "//vendor:github.com/stretchr/testify/assert", + "//vendor:k8s.io/apimachinery/pkg/api/meta", + "//vendor:k8s.io/apimachinery/pkg/apimachinery", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/runtime", + "//vendor:k8s.io/apimachinery/pkg/runtime/schema", + "//vendor:k8s.io/apimachinery/pkg/util/net", + "//vendor:k8s.io/apimachinery/pkg/util/sets", + "//vendor:k8s.io/apimachinery/pkg/version", + "//vendor:k8s.io/apiserver/pkg/authentication/user", + "//vendor:k8s.io/apiserver/pkg/authorization/authorizer", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", + "//vendor:k8s.io/client-go/util/cert", + ], +) + +go_library( + name = "go_default_library", + srcs = [ + "config.go", + "config_selfclient.go", + "discovery.go", + "doc.go", + "genericapiserver.go", + "healthz.go", + "hooks.go", + "resource_config.go", + "resource_encoding_config.go", + "serve.go", + "storage_factory.go", + ], + tags = ["automanaged"], + deps = [ + "//pkg/api:go_default_library", + "//pkg/genericapiserver/authenticator:go_default_library", + "//pkg/genericapiserver/authorizer:go_default_library", + "//pkg/genericapiserver/endpoints:go_default_library", + "//pkg/genericapiserver/endpoints/filters:go_default_library", + "//pkg/genericapiserver/endpoints/openapi:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", + "//pkg/genericapiserver/server/filters:go_default_library", + "//pkg/genericapiserver/server/mux:go_default_library", + "//pkg/genericapiserver/server/options:go_default_library", + "//pkg/genericapiserver/server/routes:go_default_library", + "//pkg/storage/storagebackend:go_default_library", + "//vendor:github.com/coreos/go-systemd/daemon", + "//vendor:github.com/emicklei/go-restful", + "//vendor:github.com/emicklei/go-restful/swagger", + "//vendor:github.com/go-openapi/spec", + "//vendor:github.com/golang/glog", + "//vendor:github.com/pborman/uuid", + "//vendor:github.com/pkg/errors", + "//vendor:gopkg.in/natefinch/lumberjack.v2", + "//vendor:k8s.io/apimachinery/pkg/apimachinery", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/openapi", + "//vendor:k8s.io/apimachinery/pkg/runtime", + "//vendor:k8s.io/apimachinery/pkg/runtime/schema", + "//vendor:k8s.io/apimachinery/pkg/runtime/serializer/recognizer", + "//vendor:k8s.io/apimachinery/pkg/util/net", + "//vendor:k8s.io/apimachinery/pkg/util/runtime", + "//vendor:k8s.io/apimachinery/pkg/util/sets", + "//vendor:k8s.io/apimachinery/pkg/util/validation", + "//vendor:k8s.io/apimachinery/pkg/version", + "//vendor:k8s.io/apiserver/pkg/admission", + "//vendor:k8s.io/apiserver/pkg/authentication/authenticator", + "//vendor:k8s.io/apiserver/pkg/authentication/request/union", + "//vendor:k8s.io/apiserver/pkg/authentication/user", + "//vendor:k8s.io/apiserver/pkg/authorization/authorizer", + "//vendor:k8s.io/apiserver/pkg/authorization/union", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", + "//vendor:k8s.io/apiserver/pkg/server/healthz", + "//vendor:k8s.io/client-go/rest", + "//vendor:k8s.io/client-go/util/cert", + ], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [ + ":package-srcs", + "//pkg/genericapiserver/server/filters:all-srcs", + "//pkg/genericapiserver/server/mux:all-srcs", + "//pkg/genericapiserver/server/openapi:all-srcs", + "//pkg/genericapiserver/server/options:all-srcs", + "//pkg/genericapiserver/server/routes:all-srcs", + ], + tags = ["automanaged"], +) diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/OWNERS b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/OWNERS similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/OWNERS rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/server/OWNERS diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/config.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/config.go similarity index 96% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/config.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/server/config.go index 18d554da..64692e83 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/config.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/config.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package genericapiserver +package server import ( "crypto/tls" @@ -40,27 +40,26 @@ import ( openapicommon "k8s.io/apimachinery/pkg/openapi" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/apimachinery/pkg/version" + "k8s.io/apiserver/pkg/admission" "k8s.io/apiserver/pkg/authentication/authenticator" authenticatorunion "k8s.io/apiserver/pkg/authentication/request/union" "k8s.io/apiserver/pkg/authentication/user" "k8s.io/apiserver/pkg/authorization/authorizer" authorizerunion "k8s.io/apiserver/pkg/authorization/union" - "k8s.io/apiserver/pkg/healthz" - apirequest "k8s.io/apiserver/pkg/request" - "k8s.io/kubernetes/pkg/admission" + apirequest "k8s.io/apiserver/pkg/endpoints/request" + "k8s.io/apiserver/pkg/server/healthz" + restclient "k8s.io/client-go/rest" + certutil "k8s.io/client-go/util/cert" "k8s.io/kubernetes/pkg/api" - authhandlers "k8s.io/kubernetes/pkg/auth/handlers" - "k8s.io/kubernetes/pkg/client/restclient" - genericapifilters "k8s.io/kubernetes/pkg/genericapiserver/api/filters" - apiopenapi "k8s.io/kubernetes/pkg/genericapiserver/api/openapi" genericauthenticator "k8s.io/kubernetes/pkg/genericapiserver/authenticator" genericauthorizer "k8s.io/kubernetes/pkg/genericapiserver/authorizer" - genericfilters "k8s.io/kubernetes/pkg/genericapiserver/filters" - "k8s.io/kubernetes/pkg/genericapiserver/mux" - "k8s.io/kubernetes/pkg/genericapiserver/options" - "k8s.io/kubernetes/pkg/genericapiserver/routes" - certutil "k8s.io/kubernetes/pkg/util/cert" - "k8s.io/kubernetes/pkg/version" + genericapifilters "k8s.io/kubernetes/pkg/genericapiserver/endpoints/filters" + apiopenapi "k8s.io/kubernetes/pkg/genericapiserver/endpoints/openapi" + genericfilters "k8s.io/kubernetes/pkg/genericapiserver/server/filters" + "k8s.io/kubernetes/pkg/genericapiserver/server/mux" + "k8s.io/kubernetes/pkg/genericapiserver/server/options" + "k8s.io/kubernetes/pkg/genericapiserver/server/routes" ) const ( @@ -573,7 +572,7 @@ func DefaultBuildHandlerChain(apiHandler http.Handler, c *Config) (secure, insec handler = genericapifilters.WithAuthorization(handler, c.RequestContextMapper, c.Authorizer) handler = genericapifilters.WithImpersonation(handler, c.RequestContextMapper, c.Authorizer) handler = audit(handler) // before impersonation to read original user - handler = authhandlers.WithAuthentication(handler, c.RequestContextMapper, c.Authenticator, authhandlers.Unauthorized(c.SupportsBasicAuth)) + handler = genericapifilters.WithAuthentication(handler, c.RequestContextMapper, c.Authenticator, genericapifilters.Unauthorized(c.SupportsBasicAuth)) return handler } diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/config_selfclient.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/config_selfclient.go similarity index 98% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/config_selfclient.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/server/config_selfclient.go index 056612e3..f916dd53 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/config_selfclient.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/config_selfclient.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package genericapiserver +package server import ( "bytes" @@ -24,7 +24,7 @@ import ( "fmt" "net" - "k8s.io/kubernetes/pkg/client/restclient" + restclient "k8s.io/client-go/rest" "github.com/golang/glog" ) diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/discovery.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/discovery.go similarity index 98% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/discovery.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/server/discovery.go index 7e631ef0..fc523e35 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/discovery.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/discovery.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package genericapiserver +package server import ( "net" diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/doc.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/doc.go new file mode 100644 index 00000000..b61ec1f5 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/doc.go @@ -0,0 +1,18 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package server contains the plumbing to create kubernetes-like API server command. +package server // import "k8s.io/kubernetes/pkg/genericapiserver/server" diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/filters/BUILD b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/filters/BUILD similarity index 77% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/filters/BUILD rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/server/filters/BUILD index ac031b56..1b6063b4 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/filters/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/filters/BUILD @@ -20,14 +20,14 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//pkg/util:go_default_library", "//vendor:github.com/golang/glog", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/util/runtime", "//vendor:k8s.io/apimachinery/pkg/util/sets", - "//vendor:k8s.io/apiserver/pkg/httplog", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", + "//vendor:k8s.io/apiserver/pkg/server/httplog", ], ) @@ -41,10 +41,11 @@ go_test( library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/genericapiserver/api/filters:go_default_library", + "//pkg/genericapiserver/endpoints/filters:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/util/sets", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/filters/OWNERS b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/filters/OWNERS similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/filters/OWNERS rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/server/filters/OWNERS diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/filters/cors.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/filters/cors.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/filters/cors.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/server/filters/cors.go diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/filters/cors_test.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/filters/cors_test.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/filters/cors_test.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/server/filters/cors_test.go diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/filters/doc.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/filters/doc.go similarity index 97% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/filters/doc.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/server/filters/doc.go index 3fbe2978..8ccdbb59 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/filters/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/filters/doc.go @@ -16,4 +16,4 @@ limitations under the License. // Package filters contains all the http handler chain filters which // are not api related. -package filters // import "k8s.io/kubernetes/pkg/genericapiserver/filters" +package filters // import "k8s.io/kubernetes/pkg/genericapiserver/server/filters" diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/filters/longrunning.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/filters/longrunning.go similarity index 96% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/filters/longrunning.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/server/filters/longrunning.go index 39831ef3..4ea58625 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/filters/longrunning.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/filters/longrunning.go @@ -20,7 +20,7 @@ import ( "net/http" "k8s.io/apimachinery/pkg/util/sets" - apirequest "k8s.io/apiserver/pkg/request" + apirequest "k8s.io/apiserver/pkg/endpoints/request" ) // LongRunningRequestCheck is a predicate which is true for long-running http requests. diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/filters/maxinflight.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/filters/maxinflight.go similarity index 95% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/filters/maxinflight.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/server/filters/maxinflight.go index 41b7aa05..c480d7b6 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/filters/maxinflight.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/filters/maxinflight.go @@ -22,9 +22,9 @@ import ( "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/apiserver/pkg/httplog" - apirequest "k8s.io/apiserver/pkg/request" - genericapirequest "k8s.io/apiserver/pkg/request" + apirequest "k8s.io/apiserver/pkg/endpoints/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" + "k8s.io/apiserver/pkg/server/httplog" "github.com/golang/glog" ) diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/filters/maxinflight_test.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/filters/maxinflight_test.go similarity index 98% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/filters/maxinflight_test.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/server/filters/maxinflight_test.go index 687fc524..872fe074 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/filters/maxinflight_test.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/filters/maxinflight_test.go @@ -26,8 +26,8 @@ import ( "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/util/sets" - apirequest "k8s.io/apiserver/pkg/request" - apifilters "k8s.io/kubernetes/pkg/genericapiserver/api/filters" + apirequest "k8s.io/apiserver/pkg/endpoints/request" + apifilters "k8s.io/kubernetes/pkg/genericapiserver/endpoints/filters" ) func createMaxInflightServer(callsWg, blockWg *sync.WaitGroup, disableCallsWg *bool, disableCallsWgMutex *sync.Mutex, nonMutating, mutating int) *httptest.Server { diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/filters/panics.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/filters/panics.go similarity index 96% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/filters/panics.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/server/filters/panics.go index aba7ae93..4f651360 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/filters/panics.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/filters/panics.go @@ -24,8 +24,8 @@ import ( apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/util/runtime" - "k8s.io/apiserver/pkg/httplog" - apirequest "k8s.io/apiserver/pkg/request" + apirequest "k8s.io/apiserver/pkg/endpoints/request" + "k8s.io/apiserver/pkg/server/httplog" ) // WithPanicRecovery wraps an http Handler to recover and log panics. diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/filters/timeout.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/filters/timeout.go similarity index 83% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/filters/timeout.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/server/filters/timeout.go index 3a81b046..9232fcb5 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/filters/timeout.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/filters/timeout.go @@ -25,9 +25,9 @@ import ( "sync" "time" - "k8s.io/apimachinery/pkg/api/errors" - apirequest "k8s.io/apiserver/pkg/request" - "k8s.io/kubernetes/pkg/api" + apierrors "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/runtime/schema" + apirequest "k8s.io/apiserver/pkg/endpoints/request" ) const globalTimeout = time.Minute @@ -39,22 +39,24 @@ func WithTimeoutForNonLongRunningRequests(handler http.Handler, requestContextMa if longRunning == nil { return handler } - timeoutFunc := func(req *http.Request) (<-chan time.Time, string) { + timeoutFunc := func(req *http.Request) (<-chan time.Time, *apierrors.StatusError) { // TODO unify this with apiserver.MaxInFlightLimit ctx, ok := requestContextMapper.Get(req) if !ok { - return time.After(globalTimeout), "" + // if this happens, the handler chain isn't setup correctly because there is no context mapper + return time.After(globalTimeout), apierrors.NewInternalError(fmt.Errorf("no context found for request during timeout")) } requestInfo, ok := apirequest.RequestInfoFrom(ctx) if !ok { - return time.After(globalTimeout), "" + // if this happens, the handler chain isn't setup correctly because there is no request info + return time.After(globalTimeout), apierrors.NewInternalError(fmt.Errorf("no request info found for request during timeout")) } if longRunning(req, requestInfo) { - return nil, "" + return nil, nil } - return time.After(globalTimeout), "" + return time.After(globalTimeout), apierrors.NewServerTimeout(schema.GroupResource{Group: requestInfo.APIGroup, Resource: requestInfo.Resource}, requestInfo.Verb, 0) } return WithTimeout(handler, timeoutFunc) } @@ -67,17 +69,17 @@ func WithTimeoutForNonLongRunningRequests(handler http.Handler, requestContextMa // the handler times out, writes by h to its http.ResponseWriter will return // http.ErrHandlerTimeout. If timeoutFunc returns a nil timeout channel, no // timeout will be enforced. -func WithTimeout(h http.Handler, timeoutFunc func(*http.Request) (timeout <-chan time.Time, msg string)) http.Handler { +func WithTimeout(h http.Handler, timeoutFunc func(*http.Request) (timeout <-chan time.Time, err *apierrors.StatusError)) http.Handler { return &timeoutHandler{h, timeoutFunc} } type timeoutHandler struct { handler http.Handler - timeout func(*http.Request) (<-chan time.Time, string) + timeout func(*http.Request) (<-chan time.Time, *apierrors.StatusError) } func (t *timeoutHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { - after, msg := t.timeout(r) + after, err := t.timeout(r) if after == nil { t.handler.ServeHTTP(w, r) return @@ -93,13 +95,13 @@ func (t *timeoutHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { case <-done: return case <-after: - tw.timeout(msg) + tw.timeout(err) } } type timeoutWriter interface { http.ResponseWriter - timeout(string) + timeout(*apierrors.StatusError) } func newTimeoutWriter(w http.ResponseWriter) timeoutWriter { @@ -183,7 +185,7 @@ func (tw *baseTimeoutWriter) WriteHeader(code int) { tw.w.WriteHeader(code) } -func (tw *baseTimeoutWriter) timeout(msg string) { +func (tw *baseTimeoutWriter) timeout(err *apierrors.StatusError) { tw.mu.Lock() defer tw.mu.Unlock() @@ -194,12 +196,8 @@ func (tw *baseTimeoutWriter) timeout(msg string) { // handler if !tw.wroteHeader && !tw.hijacked { tw.w.WriteHeader(http.StatusGatewayTimeout) - if msg != "" { - tw.w.Write([]byte(msg)) - } else { - enc := json.NewEncoder(tw.w) - enc.Encode(errors.NewServerTimeout(api.Resource(""), "", 0)) - } + enc := json.NewEncoder(tw.w) + enc.Encode(err) } else { // The timeout writer has been used by the inner handler. There is // no way to timeout the HTTP request at the point. We have to shutdown diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/filters/timeout_test.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/filters/timeout_test.go similarity index 81% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/filters/timeout_test.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/server/filters/timeout_test.go index 989ce331..44981224 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/filters/timeout_test.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/filters/timeout_test.go @@ -22,6 +22,10 @@ import ( "net/http/httptest" "testing" "time" + + apierrors "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/runtime/schema" + "strings" ) func TestTimeout(t *testing.T) { @@ -29,7 +33,7 @@ func TestTimeout(t *testing.T) { writeErrors := make(chan error, 1) timeout := make(chan time.Time, 1) resp := "test response" - timeoutResp := "test timeout" + timeoutErr := apierrors.NewServerTimeout(schema.GroupResource{Group: "foo", Resource: "bar"}, "get", 0) ts := httptest.NewServer(WithTimeout(http.HandlerFunc( func(w http.ResponseWriter, r *http.Request) { @@ -37,8 +41,8 @@ func TestTimeout(t *testing.T) { _, err := w.Write([]byte(resp)) writeErrors <- err }), - func(*http.Request) (<-chan time.Time, string) { - return timeout, timeoutResp + func(*http.Request) (<-chan time.Time, *apierrors.StatusError) { + return timeout, timeoutErr })) defer ts.Close() @@ -69,8 +73,8 @@ func TestTimeout(t *testing.T) { t.Errorf("got res.StatusCode %d; expected %d", res.StatusCode, http.StatusServiceUnavailable) } body, _ = ioutil.ReadAll(res.Body) - if string(body) != timeoutResp { - t.Errorf("got body %q; expected %q", string(body), timeoutResp) + if !strings.Contains(string(body), timeoutErr.Error()) { + t.Errorf("got body %q; expected it to contain %q", string(body), timeoutErr.Error()) } // Now try to send a response diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/genericapiserver.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/genericapiserver.go similarity index 94% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/genericapiserver.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/server/genericapiserver.go index b0ed5ec6..a2edf94d 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/genericapiserver.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/genericapiserver.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package genericapiserver +package server import ( "fmt" @@ -37,15 +37,15 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" utilnet "k8s.io/apimachinery/pkg/util/net" "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/apiserver/pkg/healthz" - apirequest "k8s.io/apiserver/pkg/request" - "k8s.io/kubernetes/pkg/admission" + "k8s.io/apiserver/pkg/admission" + apirequest "k8s.io/apiserver/pkg/endpoints/request" + "k8s.io/apiserver/pkg/server/healthz" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/client/restclient" - genericapi "k8s.io/kubernetes/pkg/genericapiserver/api" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" - genericmux "k8s.io/kubernetes/pkg/genericapiserver/mux" - "k8s.io/kubernetes/pkg/genericapiserver/routes" + genericapi "k8s.io/kubernetes/pkg/genericapiserver/endpoints" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" + genericmux "k8s.io/kubernetes/pkg/genericapiserver/server/mux" + "k8s.io/kubernetes/pkg/genericapiserver/server/routes" ) // Info about an API group. @@ -54,11 +54,15 @@ type APIGroupInfo struct { // Info about the resources in this group. Its a map from version to resource to the storage. VersionedResourcesStorageMap map[string]map[string]rest.Storage // OptionsExternalVersion controls the APIVersion used for common objects in the - // schema like api.Status, api.DeleteOptions, and api.ListOptions. Other implementors may + // schema like api.Status, api.DeleteOptions, and metav1.ListOptions. Other implementors may // define a version "v1beta1" but want to use the Kubernetes "v1" internal objects. // If nil, defaults to groupMeta.GroupVersion. // TODO: Remove this when https://github.com/kubernetes/kubernetes/issues/19018 is fixed. OptionsExternalVersion *schema.GroupVersion + // MetaGroupVersion defaults to "meta.k8s.io/v1" and is the scheme group version used to decode + // common API implementations like ListOptions. Future changes will allow this to vary by group + // version (for when the inevitable meta/v2 group emerges). + MetaGroupVersion *schema.GroupVersion // Scheme includes all of the types used by this group and how to convert between them (or // to convert objects from outside of this group that are accepted in this API). @@ -322,7 +326,8 @@ func (s *GenericAPIServer) getAPIGroupVersion(apiGroupInfo *APIGroupInfo, groupV func (s *GenericAPIServer) newAPIGroupVersion(apiGroupInfo *APIGroupInfo, groupVersion schema.GroupVersion) *genericapi.APIGroupVersion { return &genericapi.APIGroupVersion{ - GroupVersion: groupVersion, + GroupVersion: groupVersion, + MetaGroupVersion: apiGroupInfo.MetaGroupVersion, ParameterCodec: apiGroupInfo.ParameterCodec, Serializer: apiGroupInfo.NegotiatedSerializer, diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/genericapiserver_test.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/genericapiserver_test.go similarity index 95% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/genericapiserver_test.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/server/genericapiserver_test.go index 1046653b..26e9bf2a 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/genericapiserver_test.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/genericapiserver_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package genericapiserver +package server import ( "encoding/json" @@ -25,7 +25,12 @@ import ( "net/http" "net/http/httptest" "reflect" + goruntime "runtime" "testing" + "time" + + "github.com/go-openapi/spec" + "github.com/stretchr/testify/assert" "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/apimachinery" @@ -34,20 +39,17 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" utilnet "k8s.io/apimachinery/pkg/util/net" "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/apimachinery/pkg/version" "k8s.io/apiserver/pkg/authentication/user" "k8s.io/apiserver/pkg/authorization/authorizer" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/apis/extensions" openapigen "k8s.io/kubernetes/pkg/generated/openapi" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" etcdtesting "k8s.io/kubernetes/pkg/storage/etcd/testing" - "k8s.io/kubernetes/pkg/version" - - "github.com/go-openapi/spec" - "github.com/stretchr/testify/assert" ) // setUp is a convience function for setting up for (most) tests. @@ -117,12 +119,8 @@ func TestInstallAPIGroups(t *testing.T) { scheme := runtime.NewScheme() scheme.AddKnownTypeWithName(gv.WithKind("Getter"), getter.New()) scheme.AddKnownTypeWithName(gv.WithKind("NoVerb"), noVerbs.New()) - scheme.AddKnownTypes(v1.SchemeGroupVersion, - &v1.ListOptions{}, - &v1.DeleteOptions{}, - &metav1.ExportOptions{}, - &metav1.Status{}, - ) + scheme.AddKnownTypes(v1.SchemeGroupVersion, &metav1.Status{}) + metav1.AddToGroupVersion(scheme, v1.SchemeGroupVersion) interfacesFor := func(version schema.GroupVersion) (*meta.VersionInterfaces, error) { return &meta.VersionInterfaces{ @@ -131,7 +129,7 @@ func TestInstallAPIGroups(t *testing.T) { }, nil } - mapper := api.NewDefaultRESTMapperFromScheme([]schema.GroupVersion{gv}, interfacesFor, "", sets.NewString(), sets.NewString(), scheme) + mapper := meta.NewDefaultRESTMapperFromScheme([]schema.GroupVersion{gv}, interfacesFor, "", sets.NewString(), sets.NewString(), scheme) groupMeta := apimachinery.GroupMeta{ GroupVersion: gv, GroupVersions: []schema.GroupVersion{gv}, @@ -372,7 +370,7 @@ func TestNotRestRoutesHaveAuth(t *testing.T) { config.EnableProfiling = true config.SwaggerConfig = DefaultSwaggerConfig() - kubeVersion := version.Get() + kubeVersion := fakeVersion() config.Version = &kubeVersion s, err := config.SkipComplete().New() @@ -618,3 +616,17 @@ func (p *testNoVerbsStorage) New() runtime.Object { }, } } + +func fakeVersion() version.Info { + return version.Info{ + Major: "42", + Minor: "42", + GitVersion: "42", + GitCommit: "34973274ccef6ab4dfaaf86599792fa9c3fe4689", + GitTreeState: "Dirty", + BuildDate: time.Now().String(), + GoVersion: goruntime.Version(), + Compiler: goruntime.Compiler, + Platform: fmt.Sprintf("%s/%s", goruntime.GOOS, goruntime.GOARCH), + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/healthz.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/healthz.go similarity index 95% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/healthz.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/server/healthz.go index 1d642f9d..db8a132c 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/healthz.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/healthz.go @@ -14,12 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ -package genericapiserver +package server import ( "fmt" - "k8s.io/apiserver/pkg/healthz" + "k8s.io/apiserver/pkg/server/healthz" ) // AddHealthzCheck allows you to add a HealthzCheck. diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/hooks.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/hooks.go similarity index 97% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/hooks.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/server/hooks.go index c2cca57d..16e1cb5c 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/hooks.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/hooks.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package genericapiserver +package server import ( "errors" @@ -24,8 +24,8 @@ import ( "github.com/golang/glog" utilruntime "k8s.io/apimachinery/pkg/util/runtime" - "k8s.io/apiserver/pkg/healthz" - "k8s.io/kubernetes/pkg/client/restclient" + "k8s.io/apiserver/pkg/server/healthz" + restclient "k8s.io/client-go/rest" ) // PostStartHookFunc is a function that is called after the server has started. diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/mux/BUILD b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/mux/BUILD similarity index 92% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/mux/BUILD rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/server/mux/BUILD index 28af4a6e..21aab7f2 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/mux/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/mux/BUILD @@ -18,7 +18,7 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/api:go_default_library", - "//pkg/genericapiserver/api/handlers/responsewriters:go_default_library", + "//pkg/genericapiserver/endpoints/handlers/responsewriters:go_default_library", "//vendor:github.com/emicklei/go-restful", "//vendor:github.com/golang/glog", "//vendor:k8s.io/apimachinery/pkg/api/errors", diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/mux/OWNERS b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/mux/OWNERS similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/mux/OWNERS rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/server/mux/OWNERS diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/mux/container.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/mux/container.go similarity index 97% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/mux/container.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/server/mux/container.go index aedec2ec..6d9c72da 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/mux/container.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/mux/container.go @@ -29,7 +29,7 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/genericapiserver/api/handlers/responsewriters" + "k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers/responsewriters" ) // APIContainer is a restful container which in addition support registering diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/mux/container_test.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/mux/container_test.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/mux/container_test.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/server/mux/container_test.go diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/mux/doc.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/mux/doc.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/mux/doc.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/server/mux/doc.go diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/mux/pathrecorder.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/mux/pathrecorder.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/mux/pathrecorder.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/server/mux/pathrecorder.go diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/openapi/BUILD b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/openapi/BUILD similarity index 87% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/openapi/BUILD rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/server/openapi/BUILD index 0e72d9f1..37d8761b 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/openapi/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/openapi/BUILD @@ -17,7 +17,7 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/genericapiserver/mux:go_default_library", + "//pkg/genericapiserver/server/mux:go_default_library", "//pkg/util:go_default_library", "//vendor:github.com/emicklei/go-restful", "//vendor:github.com/go-openapi/spec", @@ -48,9 +48,6 @@ filegroup( filegroup( name = "all-srcs", - srcs = [ - ":package-srcs", - "//pkg/genericapiserver/openapi/common:all-srcs", - ], + srcs = [":package-srcs"], tags = ["automanaged"], ) diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/openapi/OWNERS b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/openapi/OWNERS similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/openapi/OWNERS rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/server/openapi/OWNERS diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/openapi/doc.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/openapi/doc.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/openapi/doc.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/server/openapi/doc.go diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/openapi/openapi.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/openapi/openapi.go similarity index 99% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/openapi/openapi.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/server/openapi/openapi.go index 6155b7ca..ca5b51cf 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/openapi/openapi.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/openapi/openapi.go @@ -27,7 +27,7 @@ import ( "k8s.io/apimachinery/pkg/openapi" "k8s.io/apimachinery/pkg/util/json" - genericmux "k8s.io/kubernetes/pkg/genericapiserver/mux" + genericmux "k8s.io/kubernetes/pkg/genericapiserver/server/mux" "k8s.io/kubernetes/pkg/util" ) diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/openapi/openapi_test.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/openapi/openapi_test.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/openapi/openapi_test.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/server/openapi/openapi_test.go diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/openapi/util.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/openapi/util.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/openapi/util.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/server/openapi/util.go diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/options/BUILD b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/options/BUILD similarity index 89% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/options/BUILD rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/server/options/BUILD index bf77fff4..9b19fac4 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/options/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/options/BUILD @@ -19,21 +19,22 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/admission:go_default_library", "//pkg/api:go_default_library", "//pkg/genericapiserver/authenticator:go_default_library", "//pkg/genericapiserver/authorizer:go_default_library", "//pkg/storage/storagebackend:go_default_library", - "//pkg/util/cert:go_default_library", "//pkg/util/config:go_default_library", "//vendor:github.com/golang/glog", "//vendor:github.com/spf13/pflag", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/util/net", + "//vendor:k8s.io/apiserver/pkg/admission", "//vendor:k8s.io/client-go/kubernetes/typed/authentication/v1beta1", "//vendor:k8s.io/client-go/kubernetes/typed/authorization/v1beta1", "//vendor:k8s.io/client-go/rest", "//vendor:k8s.io/client-go/tools/clientcmd", + "//vendor:k8s.io/client-go/util/cert", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/options/OWNERS b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/options/OWNERS similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/options/OWNERS rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/server/options/OWNERS diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/options/authentication.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/options/authentication.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/options/authentication.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/server/options/authentication.go diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/options/authorization.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/options/authorization.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/options/authorization.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/server/options/authorization.go diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/options/doc.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/options/doc.go similarity index 98% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/options/doc.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/server/options/doc.go index 3247f4c5..dfe986fe 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/options/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/options/doc.go @@ -18,4 +18,4 @@ limitations under the License. // server. It takes a minimal set of dependencies and does not reference // implementations, in order to ensure it may be reused by multiple components // (such as CLI commands that wish to generate or validate config). -package options // import "k8s.io/kubernetes/pkg/genericapiserver/options" +package options // import "k8s.io/kubernetes/pkg/genericapiserver/server/options" diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/options/etcd.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/options/etcd.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/options/etcd.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/server/options/etcd.go diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/options/server_run_options.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/options/server_run_options.go similarity index 98% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/options/server_run_options.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/server/options/server_run_options.go index 4fb7cfa5..b51f4ff2 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/options/server_run_options.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/options/server_run_options.go @@ -21,8 +21,9 @@ import ( "net" "strings" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/admission" + "k8s.io/apiserver/pkg/admission" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/util/config" @@ -219,7 +220,7 @@ func (s *ServerRunOptions) AddUniversalFlags(fs *pflag.FlagSet) { "be excluded from maximum inflight request handling.") fs.MarkDeprecated("long-running-request-regexp", "regular expression matching of long-running requests is no longer supported") - deprecatedMasterServiceNamespace := api.NamespaceDefault + deprecatedMasterServiceNamespace := metav1.NamespaceDefault fs.StringVar(&deprecatedMasterServiceNamespace, "master-service-namespace", deprecatedMasterServiceNamespace, ""+ "DEPRECATED: the namespace from which the kubernetes master services should be injected into pods.") diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/options/serving.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/options/serving.go similarity index 99% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/options/serving.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/server/options/serving.go index 6c1d1b2a..0e13d17b 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/options/serving.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/options/serving.go @@ -25,7 +25,7 @@ import ( "github.com/spf13/pflag" utilnet "k8s.io/apimachinery/pkg/util/net" - certutil "k8s.io/kubernetes/pkg/util/cert" + certutil "k8s.io/client-go/util/cert" "k8s.io/kubernetes/pkg/util/config" ) diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/resource_config.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/resource_config.go similarity index 99% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/resource_config.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/server/resource_config.go index 7c3d6348..06be1a55 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/resource_config.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/resource_config.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package genericapiserver +package server import ( "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/resource_config_test.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/resource_config_test.go similarity index 99% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/resource_config_test.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/server/resource_config_test.go index cb3ddd6c..576b24a8 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/resource_config_test.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/resource_config_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package genericapiserver +package server import ( "testing" diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/resource_encoding_config.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/resource_encoding_config.go similarity index 99% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/resource_encoding_config.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/server/resource_encoding_config.go index 26c9d846..9fd18895 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/resource_encoding_config.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/resource_encoding_config.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package genericapiserver +package server import ( "k8s.io/apimachinery/pkg/runtime" diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/routes/BUILD b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/routes/BUILD similarity index 70% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/routes/BUILD rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/server/routes/BUILD index 6ddbbe23..21e8f806 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/routes/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/routes/BUILD @@ -21,11 +21,10 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/genericapiserver/api/handlers/responsewriters:go_default_library", - "//pkg/genericapiserver/mux:go_default_library", - "//pkg/genericapiserver/openapi:go_default_library", - "//pkg/genericapiserver/routes/data/swagger:go_default_library", - "//pkg/version:go_default_library", + "//pkg/genericapiserver/endpoints/handlers/responsewriters:go_default_library", + "//pkg/genericapiserver/server/mux:go_default_library", + "//pkg/genericapiserver/server/openapi:go_default_library", + "//pkg/genericapiserver/server/routes/data/swagger:go_default_library", "//vendor:github.com/elazarl/go-bindata-assetfs", "//vendor:github.com/emicklei/go-restful", "//vendor:github.com/emicklei/go-restful/swagger", @@ -33,7 +32,8 @@ go_library( "//vendor:github.com/prometheus/client_golang/prometheus", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/openapi", - "//vendor:k8s.io/apiserver/pkg/metrics", + "//vendor:k8s.io/apimachinery/pkg/version", + "//vendor:k8s.io/apiserver/pkg/endpoints/metrics", "//vendor:k8s.io/apiserver/pkg/storage/etcd/metrics", ], ) @@ -49,7 +49,7 @@ filegroup( name = "all-srcs", srcs = [ ":package-srcs", - "//pkg/genericapiserver/routes/data/swagger:all-srcs", + "//pkg/genericapiserver/server/routes/data/swagger:all-srcs", ], tags = ["automanaged"], ) diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/routes/OWNERS b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/routes/OWNERS similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/routes/OWNERS rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/server/routes/OWNERS diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/routes/data/README.md b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/routes/data/README.md similarity index 82% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/routes/data/README.md rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/server/routes/data/README.md index a267e3a9..974aec20 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/routes/data/README.md +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/routes/data/README.md @@ -9,4 +9,4 @@ Do not edit by hand. [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/pkg/genericapiserver/addons/data/README.md?pixel)]() -[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/pkg/genericapiserver/routes/data/README.md?pixel)]() +[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/pkg/genericapiserver/server/routes/data/README.md?pixel)]() diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/routes/data/swagger/BUILD b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/routes/data/swagger/BUILD similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/routes/data/swagger/BUILD rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/server/routes/data/swagger/BUILD diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/routes/data/swagger/datafile.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/routes/data/swagger/datafile.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/routes/data/swagger/datafile.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/server/routes/data/swagger/datafile.go diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/routes/doc.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/routes/doc.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/routes/doc.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/server/routes/doc.go diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/routes/index.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/routes/index.go similarity index 92% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/routes/index.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/server/routes/index.go index 7ddef659..cb4f813e 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/routes/index.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/routes/index.go @@ -21,8 +21,8 @@ import ( "sort" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/kubernetes/pkg/genericapiserver/api/handlers/responsewriters" - "k8s.io/kubernetes/pkg/genericapiserver/mux" + "k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers/responsewriters" + "k8s.io/kubernetes/pkg/genericapiserver/server/mux" ) // Index provides a webservice for the http root / listing all known paths. diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/routes/metrics.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/routes/metrics.go similarity index 93% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/routes/metrics.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/server/routes/metrics.go index 8ea28de7..13bba925 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/routes/metrics.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/routes/metrics.go @@ -20,9 +20,9 @@ import ( "io" "net/http" - apimetrics "k8s.io/apiserver/pkg/metrics" + apimetrics "k8s.io/apiserver/pkg/endpoints/metrics" etcdmetrics "k8s.io/apiserver/pkg/storage/etcd/metrics" - "k8s.io/kubernetes/pkg/genericapiserver/mux" + "k8s.io/kubernetes/pkg/genericapiserver/server/mux" "github.com/prometheus/client_golang/prometheus" ) diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/routes/openapi.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/routes/openapi.go similarity index 89% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/routes/openapi.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/server/routes/openapi.go index 8dd61daa..2561b309 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/routes/openapi.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/routes/openapi.go @@ -18,8 +18,8 @@ package routes import ( "k8s.io/apimachinery/pkg/openapi" - "k8s.io/kubernetes/pkg/genericapiserver/mux" - apiserveropenapi "k8s.io/kubernetes/pkg/genericapiserver/openapi" + "k8s.io/kubernetes/pkg/genericapiserver/server/mux" + apiserveropenapi "k8s.io/kubernetes/pkg/genericapiserver/server/openapi" "github.com/golang/glog" ) diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/routes/profiling.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/routes/profiling.go similarity index 94% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/routes/profiling.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/server/routes/profiling.go index eee109fb..4d8384a0 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/routes/profiling.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/routes/profiling.go @@ -19,7 +19,7 @@ package routes import ( "net/http/pprof" - "k8s.io/kubernetes/pkg/genericapiserver/mux" + "k8s.io/kubernetes/pkg/genericapiserver/server/mux" ) // Profiling adds handlers for pprof under /debug/pprof. diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/routes/swagger.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/routes/swagger.go similarity index 95% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/routes/swagger.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/server/routes/swagger.go index d60a90f7..352c4f5e 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/routes/swagger.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/routes/swagger.go @@ -17,7 +17,7 @@ limitations under the License. package routes import ( - "k8s.io/kubernetes/pkg/genericapiserver/mux" + "k8s.io/kubernetes/pkg/genericapiserver/server/mux" "github.com/emicklei/go-restful/swagger" ) diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/routes/swaggerui.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/routes/swaggerui.go similarity index 90% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/routes/swaggerui.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/server/routes/swaggerui.go index 55514669..0b7f252c 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/routes/swaggerui.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/routes/swaggerui.go @@ -21,8 +21,8 @@ import ( assetfs "github.com/elazarl/go-bindata-assetfs" - "k8s.io/kubernetes/pkg/genericapiserver/mux" - "k8s.io/kubernetes/pkg/genericapiserver/routes/data/swagger" + "k8s.io/kubernetes/pkg/genericapiserver/server/mux" + "k8s.io/kubernetes/pkg/genericapiserver/server/routes/data/swagger" ) // SwaggerUI exposes files in third_party/swagger-ui/ under /swagger-ui. diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/routes/version.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/routes/version.go similarity index 90% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/routes/version.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/server/routes/version.go index 76d55042..fdb1a734 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/routes/version.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/routes/version.go @@ -21,9 +21,9 @@ import ( "github.com/emicklei/go-restful" - "k8s.io/kubernetes/pkg/genericapiserver/api/handlers/responsewriters" - "k8s.io/kubernetes/pkg/genericapiserver/mux" - "k8s.io/kubernetes/pkg/version" + "k8s.io/apimachinery/pkg/version" + "k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers/responsewriters" + "k8s.io/kubernetes/pkg/genericapiserver/server/mux" ) // Version provides a webservice with version information. diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/serve.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/serve.go similarity index 99% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/serve.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/server/serve.go index fc548ae3..ea2f2870 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/serve.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/serve.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package genericapiserver +package server import ( "crypto/tls" diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/serve_test.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/serve_test.go similarity index 98% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/serve_test.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/server/serve_test.go index e3fb6bb7..d7499e9b 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/serve_test.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/serve_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package genericapiserver +package server import ( "crypto/tls" @@ -31,11 +31,10 @@ import ( "github.com/stretchr/testify/assert" + utilcert "k8s.io/client-go/util/cert" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/genericapiserver/options" - utilcert "k8s.io/kubernetes/pkg/util/cert" + "k8s.io/kubernetes/pkg/genericapiserver/server/options" "k8s.io/kubernetes/pkg/util/config" - "k8s.io/kubernetes/pkg/version" ) type TestCertSpec struct { @@ -465,7 +464,7 @@ NextTest: etcdserver, config, _ := setUp(t) defer etcdserver.Terminate(t) - v := version.Get() + v := fakeVersion() config.Version = &v config.EnableIndex = true diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/server_run_options_test.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/server_run_options_test.go similarity index 96% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/server_run_options_test.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/server/server_run_options_test.go index 6fcfc03d..967f1928 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/server_run_options_test.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/server_run_options_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package genericapiserver +package server import ( "reflect" @@ -24,7 +24,7 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/autoscaling" "k8s.io/kubernetes/pkg/apis/extensions" - "k8s.io/kubernetes/pkg/genericapiserver/options" + "k8s.io/kubernetes/pkg/genericapiserver/server/options" ) func TestGenerateStorageVersionMap(t *testing.T) { diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/storage_factory.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/storage_factory.go similarity index 99% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/storage_factory.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/server/storage_factory.go index 14b66573..5b8332c8 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/storage_factory.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/storage_factory.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package genericapiserver +package server import ( "fmt" diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/storage_factory_test.go b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/storage_factory_test.go similarity index 96% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/storage_factory_test.go rename to vendor/k8s.io/kubernetes/pkg/genericapiserver/server/storage_factory_test.go index 119c4360..61442588 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/storage_factory_test.go +++ b/vendor/k8s.io/kubernetes/pkg/genericapiserver/server/storage_factory_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package genericapiserver +package server import ( "reflect" @@ -23,7 +23,7 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/extensions" - "k8s.io/kubernetes/pkg/genericapiserver/options" + "k8s.io/kubernetes/pkg/genericapiserver/server/options" "k8s.io/kubernetes/pkg/storage/storagebackend" ) diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/validation/OWNERS b/vendor/k8s.io/kubernetes/pkg/genericapiserver/validation/OWNERS deleted file mode 100755 index 380f0188..00000000 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/validation/OWNERS +++ /dev/null @@ -1,3 +0,0 @@ -reviewers: -- dims -- ping035627 diff --git a/vendor/k8s.io/kubernetes/pkg/kubeapiserver/BUILD b/vendor/k8s.io/kubernetes/pkg/kubeapiserver/BUILD index ea13b84a..21406f6a 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubeapiserver/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubeapiserver/BUILD @@ -17,7 +17,7 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/api:go_default_library", - "//pkg/genericapiserver:go_default_library", + "//pkg/genericapiserver/server:go_default_library", "//pkg/storage/storagebackend:go_default_library", "//pkg/util/config:go_default_library", "//vendor:k8s.io/apimachinery/pkg/runtime", @@ -55,7 +55,7 @@ go_test( "//pkg/api/v1:go_default_library", "//pkg/apis/extensions/install:go_default_library", "//pkg/apis/extensions/v1beta1:go_default_library", - "//pkg/genericapiserver:go_default_library", + "//pkg/genericapiserver/server:go_default_library", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubeapiserver/admission/BUILD b/vendor/k8s.io/kubernetes/pkg/kubeapiserver/admission/BUILD index 7f42213e..5402c646 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubeapiserver/admission/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubeapiserver/admission/BUILD @@ -10,23 +10,38 @@ load( go_test( name = "go_default_test", - srcs = ["init_test.go"], + srcs = [ + "config_test.go", + "init_test.go", + ], library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/admission:go_default_library", + "//pkg/apis/componentconfig:go_default_library", + "//pkg/apis/componentconfig/install:go_default_library", + "//vendor:k8s.io/apiserver/pkg/admission", "//vendor:k8s.io/apiserver/pkg/authorization/authorizer", ], ) go_library( name = "go_default_library", - srcs = ["initializer.go"], + srcs = [ + "config.go", + "initializer.go", + ], tags = ["automanaged"], deps = [ - "//pkg/admission:go_default_library", + "//pkg/api:go_default_library", + "//pkg/apis/componentconfig:go_default_library", + "//pkg/apis/componentconfig/v1alpha1:go_default_library", "//pkg/client/clientset_generated/internalclientset:go_default_library", "//pkg/controller/informers:go_default_library", + "//vendor:github.com/ghodss/yaml", + "//vendor:github.com/golang/glog", + "//vendor:k8s.io/apimachinery/pkg/runtime", + "//vendor:k8s.io/apimachinery/pkg/util/sets", + "//vendor:k8s.io/apiserver/pkg/admission", "//vendor:k8s.io/apiserver/pkg/authorization/authorizer", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/admission/config.go b/vendor/k8s.io/kubernetes/pkg/kubeapiserver/admission/config.go similarity index 91% rename from vendor/k8s.io/kubernetes/pkg/admission/config.go rename to vendor/k8s.io/kubernetes/pkg/kubeapiserver/admission/config.go index daf43e3e..5fa253d6 100644 --- a/vendor/k8s.io/kubernetes/pkg/admission/config.go +++ b/vendor/k8s.io/kubernetes/pkg/kubeapiserver/admission/config.go @@ -29,10 +29,11 @@ import ( "bytes" + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/apiserver/pkg/admission" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/componentconfig" componentconfigv1alpha1 "k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1" - "k8s.io/kubernetes/pkg/util/sets" runtime "k8s.io/apimachinery/pkg/runtime" ) @@ -57,9 +58,9 @@ func makeAbs(path, base string) (string, error) { // set of pluginNames whose config location references the specified configFilePath. // It does this to preserve backward compatibility when admission control files were opaque. // It returns an error if the file did not exist. -func ReadAdmissionConfiguration(pluginNames []string, configFilePath string) (*componentconfig.AdmissionConfiguration, error) { +func ReadAdmissionConfiguration(pluginNames []string, configFilePath string) (admission.ConfigProvider, error) { if configFilePath == "" { - return &componentconfig.AdmissionConfiguration{}, nil + return configProvider{config: &componentconfig.AdmissionConfiguration{}}, nil } // a file was provided, so we just read it. data, err := ioutil.ReadFile(configFilePath) @@ -86,7 +87,7 @@ func ReadAdmissionConfiguration(pluginNames []string, configFilePath string) (*c } decodedConfig.Plugins[i].Path = absPath } - return decodedConfig, nil + return configProvider{config: decodedConfig}, nil } // we got an error where the decode wasn't related to a missing type if !(runtime.IsMissingVersion(err) || runtime.IsMissingKind(err) || runtime.IsNotRegisteredError(err)) { @@ -109,9 +110,13 @@ func ReadAdmissionConfiguration(pluginNames []string, configFilePath string) (*c api.Scheme.Default(externalConfig) internalConfig := &componentconfig.AdmissionConfiguration{} if err := api.Scheme.Convert(externalConfig, internalConfig, nil); err != nil { - return internalConfig, err + return nil, err } - return internalConfig, nil + return configProvider{config: internalConfig}, nil +} + +type configProvider struct { + config *componentconfig.AdmissionConfiguration } // GetAdmissionPluginConfigurationFor returns a reader that holds the admission plugin configuration. @@ -141,13 +146,13 @@ func GetAdmissionPluginConfigurationFor(pluginCfg componentconfig.AdmissionPlugi // GetAdmissionPluginConfiguration takes the admission configuration and returns a reader // for the specified plugin. If no specific configuration is present, we return a nil reader. -func GetAdmissionPluginConfiguration(cfg *componentconfig.AdmissionConfiguration, pluginName string) (io.Reader, error) { +func (p configProvider) ConfigFor(pluginName string) (io.Reader, error) { // there is no config, so there is no potential config - if cfg == nil { + if p.config == nil { return nil, nil } // look for matching plugin and get configuration - for _, pluginCfg := range cfg.Plugins { + for _, pluginCfg := range p.config.Plugins { if pluginName != pluginCfg.Name { continue } diff --git a/vendor/k8s.io/kubernetes/pkg/admission/config_test.go b/vendor/k8s.io/kubernetes/pkg/kubeapiserver/admission/config_test.go similarity index 96% rename from vendor/k8s.io/kubernetes/pkg/admission/config_test.go rename to vendor/k8s.io/kubernetes/pkg/kubeapiserver/admission/config_test.go index edccd362..41b4f358 100644 --- a/vendor/k8s.io/kubernetes/pkg/admission/config_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubeapiserver/admission/config_test.go @@ -141,8 +141,8 @@ func TestReadAdmissionConfiguration(t *testing.T) { if err != nil { t.Fatalf("unexpected err: %v", err) } - if !reflect.DeepEqual(config, testCase.ExpectedAdmissionConfig) { - t.Errorf("%s: Expected:\n\t%#v\nGot:\n\t%#v", testName, testCase.ExpectedAdmissionConfig, config) + if !reflect.DeepEqual(config.(configProvider).config, testCase.ExpectedAdmissionConfig) { + t.Errorf("%s: Expected:\n\t%#v\nGot:\n\t%#v", testName, testCase.ExpectedAdmissionConfig, config.(configProvider).config) } } } diff --git a/vendor/k8s.io/kubernetes/pkg/kubeapiserver/admission/init_test.go b/vendor/k8s.io/kubernetes/pkg/kubeapiserver/admission/init_test.go index f1ff1f3e..6df687d8 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubeapiserver/admission/init_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubeapiserver/admission/init_test.go @@ -19,8 +19,8 @@ package admission import ( "testing" + "k8s.io/apiserver/pkg/admission" "k8s.io/apiserver/pkg/authorization/authorizer" - "k8s.io/kubernetes/pkg/admission" ) // TestAuthorizer is a testing struct for testing that fulfills the authorizer interface. diff --git a/vendor/k8s.io/kubernetes/pkg/kubeapiserver/admission/initializer.go b/vendor/k8s.io/kubernetes/pkg/kubeapiserver/admission/initializer.go index e878dd5c..131ba98a 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubeapiserver/admission/initializer.go +++ b/vendor/k8s.io/kubernetes/pkg/kubeapiserver/admission/initializer.go @@ -17,8 +17,8 @@ limitations under the License. package admission import ( + "k8s.io/apiserver/pkg/admission" "k8s.io/apiserver/pkg/authorization/authorizer" - "k8s.io/kubernetes/pkg/admission" "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" "k8s.io/kubernetes/pkg/controller/informers" ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubeapiserver/authenticator/BUILD b/vendor/k8s.io/kubernetes/pkg/kubeapiserver/authenticator/BUILD index a528db75..26f08c4c 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubeapiserver/authenticator/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubeapiserver/authenticator/BUILD @@ -14,7 +14,6 @@ go_library( deps = [ "//pkg/genericapiserver/authenticator:go_default_library", "//pkg/serviceaccount:go_default_library", - "//pkg/util/cert:go_default_library", "//plugin/pkg/auth/authenticator/password/keystone:go_default_library", "//plugin/pkg/auth/authenticator/password/passwordfile:go_default_library", "//plugin/pkg/auth/authenticator/request/basicauth:go_default_library", @@ -33,6 +32,7 @@ go_library( "//vendor:k8s.io/apiserver/pkg/authentication/user", "//vendor:k8s.io/client-go/plugin/pkg/client/auth/gcp", "//vendor:k8s.io/client-go/plugin/pkg/client/auth/oidc", + "//vendor:k8s.io/client-go/util/cert", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubeapiserver/authenticator/config.go b/vendor/k8s.io/kubernetes/pkg/kubeapiserver/authenticator/config.go index c4427589..2a892232 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubeapiserver/authenticator/config.go +++ b/vendor/k8s.io/kubernetes/pkg/kubeapiserver/authenticator/config.go @@ -30,9 +30,9 @@ import ( "k8s.io/apiserver/pkg/authentication/request/x509" "k8s.io/apiserver/pkg/authentication/token/tokenfile" "k8s.io/apiserver/pkg/authentication/user" + certutil "k8s.io/client-go/util/cert" genericauthenticator "k8s.io/kubernetes/pkg/genericapiserver/authenticator" "k8s.io/kubernetes/pkg/serviceaccount" - certutil "k8s.io/kubernetes/pkg/util/cert" "k8s.io/kubernetes/plugin/pkg/auth/authenticator/password/keystone" "k8s.io/kubernetes/plugin/pkg/auth/authenticator/password/passwordfile" "k8s.io/kubernetes/plugin/pkg/auth/authenticator/request/basicauth" diff --git a/vendor/k8s.io/kubernetes/pkg/kubeapiserver/default_storage_factory_builder.go b/vendor/k8s.io/kubernetes/pkg/kubeapiserver/default_storage_factory_builder.go index 98eb4d1a..40df70b1 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubeapiserver/default_storage_factory_builder.go +++ b/vendor/k8s.io/kubernetes/pkg/kubeapiserver/default_storage_factory_builder.go @@ -24,7 +24,7 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/genericapiserver" + genericapiserver "k8s.io/kubernetes/pkg/genericapiserver/server" "k8s.io/kubernetes/pkg/storage/storagebackend" "k8s.io/kubernetes/pkg/util/config" ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubeapiserver/default_storage_factory_builder_test.go b/vendor/k8s.io/kubernetes/pkg/kubeapiserver/default_storage_factory_builder_test.go index 9124cc3a..cf956bb8 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubeapiserver/default_storage_factory_builder_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubeapiserver/default_storage_factory_builder_test.go @@ -26,7 +26,7 @@ import ( apiv1 "k8s.io/kubernetes/pkg/api/v1" _ "k8s.io/kubernetes/pkg/apis/extensions/install" extensionsapiv1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" - "k8s.io/kubernetes/pkg/genericapiserver" + genericapiserver "k8s.io/kubernetes/pkg/genericapiserver/server" ) func TestParseRuntimeConfig(t *testing.T) { diff --git a/vendor/k8s.io/kubernetes/pkg/kubeapiserver/options/BUILD b/vendor/k8s.io/kubernetes/pkg/kubeapiserver/options/BUILD index 6aada813..9e286c93 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubeapiserver/options/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubeapiserver/options/BUILD @@ -19,10 +19,11 @@ go_library( "//pkg/api/v1:go_default_library", "//pkg/cloudprovider:go_default_library", "//pkg/controller/informers:go_default_library", - "//pkg/genericapiserver:go_default_library", - "//pkg/genericapiserver/options:go_default_library", + "//pkg/genericapiserver/server:go_default_library", + "//pkg/genericapiserver/server/options:go_default_library", "//pkg/kubeapiserver/authenticator:go_default_library", "//pkg/kubeapiserver/authorizer:go_default_library", + "//vendor:github.com/golang/glog", "//vendor:github.com/spf13/pflag", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubeapiserver/options/authentication.go b/vendor/k8s.io/kubernetes/pkg/kubeapiserver/options/authentication.go index d52b6773..c5bdf0e8 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubeapiserver/options/authentication.go +++ b/vendor/k8s.io/kubernetes/pkg/kubeapiserver/options/authentication.go @@ -18,13 +18,16 @@ package options import ( "fmt" + "strings" "time" + "github.com/golang/glog" "github.com/spf13/pflag" - "k8s.io/kubernetes/pkg/genericapiserver" - genericoptions "k8s.io/kubernetes/pkg/genericapiserver/options" + genericapiserver "k8s.io/kubernetes/pkg/genericapiserver/server" + genericoptions "k8s.io/kubernetes/pkg/genericapiserver/server/options" "k8s.io/kubernetes/pkg/kubeapiserver/authenticator" + "k8s.io/kubernetes/pkg/kubeapiserver/authorizer" ) type BuiltInAuthenticationOptions struct { @@ -295,7 +298,7 @@ func (s *BuiltInAuthenticationOptions) ToAuthenticationConfig() authenticator.Au } func (o *BuiltInAuthenticationOptions) Apply(c *genericapiserver.Config) error { - if o == nil || o.PasswordFile == nil { + if o == nil { return nil } @@ -313,6 +316,30 @@ func (o *BuiltInAuthenticationOptions) Apply(c *genericapiserver.Config) error { } } - c.SupportsBasicAuth = len(o.PasswordFile.BasicAuthFile) > 0 + c.SupportsBasicAuth = o.PasswordFile != nil && len(o.PasswordFile.BasicAuthFile) > 0 + return nil } + +// ApplyAuthorization will conditionally modify the authentication options based on the authorization options +func (o *BuiltInAuthenticationOptions) ApplyAuthorization(authorization *BuiltInAuthorizationOptions) { + if o == nil || authorization == nil || o.Anonymous == nil { + return + } + + // authorization ModeAlwaysAllow cannot be combined with AnonymousAuth. + // in such a case the AnonymousAuth is stomped to false and you get a message + if o.Anonymous.Allow { + found := false + for _, mode := range strings.Split(authorization.Mode, ",") { + if mode == authorizer.ModeAlwaysAllow { + found = true + break + } + } + if found { + glog.Warningf("AnonymousAuth is not allowed with the AllowAll authorizer. Resetting AnonymousAuth to false. You should use a different authorizer") + o.Anonymous.Allow = false + } + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubeapiserver/options/cloudprovider.go b/vendor/k8s.io/kubernetes/pkg/kubeapiserver/options/cloudprovider.go index 9ed89b91..8f877b65 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubeapiserver/options/cloudprovider.go +++ b/vendor/k8s.io/kubernetes/pkg/kubeapiserver/options/cloudprovider.go @@ -24,7 +24,7 @@ import ( "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/cloudprovider" - genericoptions "k8s.io/kubernetes/pkg/genericapiserver/options" + genericoptions "k8s.io/kubernetes/pkg/genericapiserver/server/options" ) type CloudProviderOptions struct { diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/BUILD b/vendor/k8s.io/kubernetes/pkg/kubectl/BUILD index 9b53cec8..da572887 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/BUILD @@ -78,19 +78,15 @@ go_library( "//pkg/client/clientset_generated/internalclientset/typed/batch/internalversion:go_default_library", "//pkg/client/clientset_generated/internalclientset/typed/core/internalversion:go_default_library", "//pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/retry:go_default_library", "//pkg/client/unversioned:go_default_library", "//pkg/controller/deployment/util:go_default_library", "//pkg/credentialprovider:go_default_library", "//pkg/fieldpath:go_default_library", - "//pkg/fields:go_default_library", "//pkg/kubectl/resource:go_default_library", "//pkg/kubelet/qos:go_default_library", "//pkg/util:go_default_library", - "//pkg/util/integer:go_default_library", "//pkg/util/intstr:go_default_library", - "//pkg/util/jsonpath:go_default_library", "//pkg/util/node:go_default_library", "//pkg/util/slice:go_default_library", "//pkg/util/uuid:go_default_library", @@ -103,6 +99,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/api/meta", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1/unstructured", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", @@ -112,6 +109,9 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/util/validation", "//vendor:k8s.io/apimachinery/pkg/util/wait", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", + "//vendor:k8s.io/client-go/util/integer", + "//vendor:k8s.io/client-go/util/jsonpath", ], ) @@ -165,14 +165,12 @@ go_test( "//pkg/client/clientset_generated/internalclientset/typed/batch/internalversion:go_default_library", "//pkg/client/clientset_generated/internalclientset/typed/core/internalversion:go_default_library", "//pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/restclient/fake:go_default_library", "//pkg/client/testing/core:go_default_library", "//pkg/controller/deployment/util:go_default_library", "//pkg/kubectl/testing:go_default_library", "//pkg/util:go_default_library", "//pkg/util/intstr:go_default_library", - "//pkg/util/testing:go_default_library", "//vendor:github.com/ghodss/yaml", "//vendor:github.com/spf13/cobra", "//vendor:k8s.io/apimachinery/pkg/api/errors", @@ -183,6 +181,8 @@ go_test( "//vendor:k8s.io/apimachinery/pkg/util/diff", "//vendor:k8s.io/apimachinery/pkg/util/sets", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", + "//vendor:k8s.io/client-go/util/testing", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/autoscale.go b/vendor/k8s.io/kubernetes/pkg/kubectl/autoscale.go index 3fd1e345..e452d642 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/autoscale.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/autoscale.go @@ -20,8 +20,8 @@ import ( "fmt" "strconv" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/autoscaling" ) @@ -111,7 +111,7 @@ func generateHPA(genericParams map[string]interface{}) (runtime.Object, error) { } scaler := autoscaling.HorizontalPodAutoscaler{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Spec: autoscaling.HorizontalPodAutoscalerSpec{ diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cluster.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cluster.go index b6f60b50..3bb9f0fe 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cluster.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cluster.go @@ -19,6 +19,7 @@ package kubectl import ( "fmt" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" federationapi "k8s.io/kubernetes/federation/apis/federation/v1beta1" "k8s.io/kubernetes/pkg/api/v1" @@ -94,7 +95,7 @@ func (s ClusterGeneratorV1Beta1) StructuredGenerate() (runtime.Object, error) { s.SecretName = s.Name } cluster := &federationapi.Cluster{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: s.Name, }, Spec: federationapi.ClusterSpec{ diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cluster_test.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cluster_test.go index bea3c449..65a2e160 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cluster_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cluster_test.go @@ -20,6 +20,7 @@ import ( "reflect" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" federationapi "k8s.io/kubernetes/federation/apis/federation/v1beta1" "k8s.io/kubernetes/pkg/api/v1" ) @@ -38,7 +39,7 @@ func TestClusterGenerate(t *testing.T) { "secret": "foo-credentials", }, expected: &federationapi.Cluster{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Spec: federationapi.ClusterSpec{ @@ -63,7 +64,7 @@ func TestClusterGenerate(t *testing.T) { "secret": "foo-credentials", }, expected: &federationapi.Cluster{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Spec: federationapi.ClusterSpec{ @@ -88,7 +89,7 @@ func TestClusterGenerate(t *testing.T) { "secret": "credentials", }, expected: &federationapi.Cluster{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "bar-cluster", }, Spec: federationapi.ClusterSpec{ diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/BUILD b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/BUILD index 4d55647c..4e5a190a 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/BUILD @@ -38,6 +38,7 @@ go_library( "describe.go", "drain.go", "edit.go", + "edit_configmap.go", "exec.go", "explain.go", "expose.go", @@ -72,13 +73,10 @@ go_library( "//pkg/apis/policy:go_default_library", "//pkg/client/clientset_generated/internalclientset:go_default_library", "//pkg/client/clientset_generated/internalclientset/typed/core/internalversion:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/typed/discovery:go_default_library", "//pkg/client/unversioned:go_default_library", - "//pkg/client/unversioned/clientcmd:go_default_library", "//pkg/client/unversioned/portforward:go_default_library", "//pkg/client/unversioned/remotecommand:go_default_library", - "//pkg/fields:go_default_library", "//pkg/kubectl:go_default_library", "//pkg/kubectl/cmd/config:go_default_library", "//pkg/kubectl/cmd/rollout:go_default_library", @@ -113,9 +111,11 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/api/meta", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1/unstructured", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/errors", "//vendor:k8s.io/apimachinery/pkg/util/sets", "//vendor:k8s.io/apimachinery/pkg/util/validation", @@ -123,6 +123,8 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/util/wait", "//vendor:k8s.io/apimachinery/pkg/util/yaml", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", + "//vendor:k8s.io/client-go/tools/clientcmd", ], ) @@ -180,9 +182,7 @@ go_test( "//pkg/apis/batch:go_default_library", "//pkg/apis/extensions:go_default_library", "//pkg/apis/policy:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/restclient/fake:go_default_library", - "//pkg/client/restclient/watch:go_default_library", "//pkg/client/typed/dynamic:go_default_library", "//pkg/kubectl:go_default_library", "//pkg/kubectl/cmd/testing:go_default_library", @@ -204,6 +204,8 @@ go_test( "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/wait", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", + "//vendor:k8s.io/client-go/rest/watch", "//vendor:k8s.io/heapster/metrics/apis/metrics/v1alpha1", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/annotate.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/annotate.go index 78d2e0fc..576e3e4a 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/annotate.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/annotate.go @@ -25,8 +25,9 @@ import ( "github.com/golang/glog" "github.com/spf13/cobra" "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - "k8s.io/kubernetes/pkg/api" + "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/kubectl" "k8s.io/kubernetes/pkg/kubectl/cmd/templates" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" @@ -254,7 +255,7 @@ func (o AnnotateOptions) RunAnnotate(f cmdutil.Factory, cmd *cobra.Command) erro helper := resource.NewHelper(client, mapping) if createdPatch { - outputObj, err = helper.Patch(namespace, name, api.StrategicMergePatchType, patchBytes) + outputObj, err = helper.Patch(namespace, name, types.StrategicMergePatchType, patchBytes) } else { outputObj, err = helper.Replace(namespace, name, false, obj) } @@ -294,7 +295,7 @@ func validateAnnotations(removeAnnotations []string, newAnnotations map[string]s } // validateNoAnnotationOverwrites validates that when overwrite is false, to-be-updated annotations don't exist in the object annotation map (yet) -func validateNoAnnotationOverwrites(accessor meta.Object, annotations map[string]string) error { +func validateNoAnnotationOverwrites(accessor metav1.Object, annotations map[string]string) error { var buf bytes.Buffer for key := range annotations { // change-cause annotation can always be overwritten diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/annotate_test.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/annotate_test.go index f94b1bb1..ceef2c37 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/annotate_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/annotate_test.go @@ -23,22 +23,23 @@ import ( "strings" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/restclient/fake" cmdtesting "k8s.io/kubernetes/pkg/kubectl/cmd/testing" ) func TestValidateAnnotationOverwrites(t *testing.T) { tests := []struct { - meta *api.ObjectMeta + meta *metav1.ObjectMeta annotations map[string]string expectErr bool scenario string }{ { - meta: &api.ObjectMeta{ + meta: &metav1.ObjectMeta{ Annotations: map[string]string{ "a": "A", "b": "B", @@ -52,7 +53,7 @@ func TestValidateAnnotationOverwrites(t *testing.T) { expectErr: true, }, { - meta: &api.ObjectMeta{ + meta: &metav1.ObjectMeta{ Annotations: map[string]string{ "a": "A", "c": "C", @@ -66,7 +67,7 @@ func TestValidateAnnotationOverwrites(t *testing.T) { expectErr: true, }, { - meta: &api.ObjectMeta{ + meta: &metav1.ObjectMeta{ Annotations: map[string]string{ "a": "A", "c": "C", @@ -79,7 +80,7 @@ func TestValidateAnnotationOverwrites(t *testing.T) { scenario: "no overlap", }, { - meta: &api.ObjectMeta{}, + meta: &metav1.ObjectMeta{}, annotations: map[string]string{ "a": "A", "b": "B", @@ -214,7 +215,7 @@ func TestUpdateAnnotations(t *testing.T) { }{ { obj: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{"a": "b"}, }, }, @@ -223,41 +224,41 @@ func TestUpdateAnnotations(t *testing.T) { }, { obj: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{"a": "b"}, }, }, annotations: map[string]string{"a": "c"}, overwrite: true, expected: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{"a": "c"}, }, }, }, { obj: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{"a": "b"}, }, }, annotations: map[string]string{"c": "d"}, expected: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{"a": "b", "c": "d"}, }, }, }, { obj: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{"a": "b"}, }, }, annotations: map[string]string{"c": "d"}, version: "2", expected: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{"a": "b", "c": "d"}, ResourceVersion: "2", }, @@ -265,28 +266,28 @@ func TestUpdateAnnotations(t *testing.T) { }, { obj: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{"a": "b"}, }, }, annotations: map[string]string{}, remove: []string{"a"}, expected: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{}, }, }, }, { obj: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{"a": "b", "c": "d"}, }, }, annotations: map[string]string{"e": "f"}, remove: []string{"a"}, expected: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ "c": "d", "e": "f", @@ -296,14 +297,14 @@ func TestUpdateAnnotations(t *testing.T) { }, { obj: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{"a": "b", "c": "d"}, }, }, annotations: map[string]string{"e": "f"}, remove: []string{"g"}, expected: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ "a": "b", "c": "d", @@ -314,13 +315,13 @@ func TestUpdateAnnotations(t *testing.T) { }, { obj: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{"a": "b", "c": "d"}, }, }, remove: []string{"e"}, expected: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ "a": "b", "c": "d", @@ -330,11 +331,11 @@ func TestUpdateAnnotations(t *testing.T) { }, { obj: &api.Pod{ - ObjectMeta: api.ObjectMeta{}, + ObjectMeta: metav1.ObjectMeta{}, }, annotations: map[string]string{"a": "b"}, expected: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{"a": "b"}, }, }, diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/apply.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/apply.go index b79b9322..33ce1265 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/apply.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/apply.go @@ -27,9 +27,11 @@ import ( "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/kubernetes/pkg/api" @@ -293,7 +295,7 @@ func RunApply(f cmdutil.Factory, cmd *cobra.Command, out, errOut io.Writer, opti if err != nil { return err } - _, err = helper.Patch(info.Namespace, info.Name, api.StrategicMergePatchType, patch) + _, err = helper.Patch(info.Namespace, info.Name, types.StrategicMergePatchType, patch) if err != nil { return cmdutil.AddSourceToErr(fmt.Sprintf("applying patch:\n%s\nto:\n%v\nfor:", patch, info), info.Source, err) } @@ -356,7 +358,7 @@ func RunApply(f cmdutil.Factory, cmd *cobra.Command, out, errOut io.Writer, opti } } for _, m := range nonNamespacedRESTMappings { - if err := p.prune(api.NamespaceNone, m, shortOutput); err != nil { + if err := p.prune(metav1.NamespaceNone, m, shortOutput); err != nil { return fmt.Errorf("error pruning nonNamespaced object %v: %v", m.GroupVersionKind, err) } } @@ -497,9 +499,9 @@ func runDelete(namespace, name string, mapping *meta.RESTMapping, c resource.RES } return resource.NewHelper(c, mapping).Delete(namespace, name) } - var options *api.DeleteOptions + var options *metav1.DeleteOptions if gracePeriod >= 0 { - options = api.NewDeleteOptions(int64(gracePeriod)) + options = metav1.NewDeleteOptions(int64(gracePeriod)) } if err := r.Stop(namespace, name, 2*time.Minute, options); err != nil { return err @@ -555,7 +557,7 @@ func (p *patcher) patchSimple(obj runtime.Object, modified []byte, source, names return nil, cmdutil.AddSourceToErr(fmt.Sprintf(format, original, modified, current), source, err) } - _, err = p.helper.Patch(namespace, name, api.StrategicMergePatchType, patch) + _, err = p.helper.Patch(namespace, name, types.StrategicMergePatchType, patch) return patch, err } diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/attach.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/attach.go index 6297d4dd..36260647 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/attach.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/attach.go @@ -26,9 +26,9 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" utilerrors "k8s.io/apimachinery/pkg/util/errors" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" coreclient "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/unversioned/remotecommand" "k8s.io/kubernetes/pkg/kubectl/cmd/templates" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/attach_test.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/attach_test.go index f3491934..bdd2ac30 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/attach_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/attach_test.go @@ -27,9 +27,10 @@ import ( "github.com/spf13/cobra" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/restclient/fake" cmdtesting "k8s.io/kubernetes/pkg/kubectl/cmd/testing" "k8s.io/kubernetes/pkg/util/term" @@ -294,7 +295,7 @@ func TestAttachWarnings(t *testing.T) { func attachPod() *api.Pod { return &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "test", ResourceVersion: "10"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "test", ResourceVersion: "10"}, Spec: api.PodSpec{ RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/clusterinfo.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/clusterinfo.go index cb9e78a6..48555996 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/clusterinfo.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/clusterinfo.go @@ -22,6 +22,7 @@ import ( "os" "strconv" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/kubectl/cmd/templates" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" @@ -73,7 +74,7 @@ func RunClusterInfo(f cmdutil.Factory, out io.Writer, cmd *cobra.Command) error mapper, typer := f.Object() cmdNamespace := cmdutil.GetFlagString(cmd, "namespace") if cmdNamespace == "" { - cmdNamespace = api.NamespaceSystem + cmdNamespace = metav1.NamespaceSystem } // TODO use generalized labels once they are implemented (#341) diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/clusterinfo_dump.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/clusterinfo_dump.go index 9af6ab0b..d37ed11b 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/clusterinfo_dump.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/clusterinfo_dump.go @@ -24,6 +24,7 @@ import ( "github.com/spf13/cobra" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/kubectl" "k8s.io/kubernetes/pkg/kubectl/cmd/templates" @@ -96,7 +97,7 @@ func dumpClusterInfo(f cmdutil.Factory, cmd *cobra.Command, args []string, out i return err } - nodes, err := clientset.Core().Nodes().List(api.ListOptions{}) + nodes, err := clientset.Core().Nodes().List(metav1.ListOptions{}) if err != nil { return err } @@ -107,7 +108,7 @@ func dumpClusterInfo(f cmdutil.Factory, cmd *cobra.Command, args []string, out i var namespaces []string if cmdutil.GetFlagBool(cmd, "all-namespaces") { - namespaceList, err := clientset.Core().Namespaces().List(api.ListOptions{}) + namespaceList, err := clientset.Core().Namespaces().List(metav1.ListOptions{}) if err != nil { return err } @@ -122,7 +123,7 @@ func dumpClusterInfo(f cmdutil.Factory, cmd *cobra.Command, args []string, out i return err } namespaces = []string{ - api.NamespaceSystem, + metav1.NamespaceSystem, cmdNamespace, } } @@ -130,7 +131,7 @@ func dumpClusterInfo(f cmdutil.Factory, cmd *cobra.Command, args []string, out i for _, namespace := range namespaces { // TODO: this is repetitive in the extreme. Use reflection or // something to make this a for loop. - events, err := clientset.Core().Events(namespace).List(api.ListOptions{}) + events, err := clientset.Core().Events(namespace).List(metav1.ListOptions{}) if err != nil { return err } @@ -138,7 +139,7 @@ func dumpClusterInfo(f cmdutil.Factory, cmd *cobra.Command, args []string, out i return err } - rcs, err := clientset.Core().ReplicationControllers(namespace).List(api.ListOptions{}) + rcs, err := clientset.Core().ReplicationControllers(namespace).List(metav1.ListOptions{}) if err != nil { return err } @@ -146,7 +147,7 @@ func dumpClusterInfo(f cmdutil.Factory, cmd *cobra.Command, args []string, out i return err } - svcs, err := clientset.Core().Services(namespace).List(api.ListOptions{}) + svcs, err := clientset.Core().Services(namespace).List(metav1.ListOptions{}) if err != nil { return err } @@ -154,7 +155,7 @@ func dumpClusterInfo(f cmdutil.Factory, cmd *cobra.Command, args []string, out i return err } - sets, err := clientset.Extensions().DaemonSets(namespace).List(api.ListOptions{}) + sets, err := clientset.Extensions().DaemonSets(namespace).List(metav1.ListOptions{}) if err != nil { return err } @@ -162,7 +163,7 @@ func dumpClusterInfo(f cmdutil.Factory, cmd *cobra.Command, args []string, out i return err } - deps, err := clientset.Extensions().Deployments(namespace).List(api.ListOptions{}) + deps, err := clientset.Extensions().Deployments(namespace).List(metav1.ListOptions{}) if err != nil { return err } @@ -170,7 +171,7 @@ func dumpClusterInfo(f cmdutil.Factory, cmd *cobra.Command, args []string, out i return err } - rps, err := clientset.Extensions().ReplicaSets(namespace).List(api.ListOptions{}) + rps, err := clientset.Extensions().ReplicaSets(namespace).List(metav1.ListOptions{}) if err != nil { return err } @@ -178,7 +179,7 @@ func dumpClusterInfo(f cmdutil.Factory, cmd *cobra.Command, args []string, out i return err } - pods, err := clientset.Core().Pods(namespace).List(api.ListOptions{}) + pods, err := clientset.Core().Pods(namespace).List(metav1.ListOptions{}) if err != nil { return err } diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/cmd.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/cmd.go index 659d9863..50368393 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/cmd.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/cmd.go @@ -20,7 +20,7 @@ import ( "fmt" "io" - "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" + "k8s.io/client-go/tools/clientcmd" cmdconfig "k8s.io/kubernetes/pkg/kubectl/cmd/config" "k8s.io/kubernetes/pkg/kubectl/cmd/rollout" "k8s.io/kubernetes/pkg/kubectl/cmd/set" @@ -172,6 +172,7 @@ __custom_func() { valid_resources = `Valid resource types include: * all + * certificatesigningrequests (aka 'csr') * clusters (valid only for federation apiservers) * clusterrolebindings * clusterroles @@ -301,7 +302,7 @@ func NewKubectlCommand(f cmdutil.Factory, in io.Reader, out, err io.Writer) *cob Commands: []*cobra.Command{ NewCmdLabel(f, out), NewCmdAnnotate(f, out), - NewCmdCompletion(f, out), + NewCmdCompletion(f, out, ""), }, }, } diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/cmd_test.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/cmd_test.go index 1342aac2..4f2c9ed8 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/cmd_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/cmd_test.go @@ -31,9 +31,9 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/restclient/fake" "k8s.io/kubernetes/pkg/kubectl" cmdtesting "k8s.io/kubernetes/pkg/kubectl/cmd/testing" @@ -156,7 +156,7 @@ func Example_printReplicationControllerWithNamespace() { } cmd := NewCmdRun(f, os.Stdin, os.Stdout, os.Stderr) ctrl := &api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "beep", Labels: map[string]string{"foo": "bar"}, @@ -166,7 +166,7 @@ func Example_printReplicationControllerWithNamespace() { Replicas: 1, Selector: map[string]string{"foo": "bar"}, Template: &api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"foo": "bar"}, }, Spec: api.PodSpec{ @@ -206,7 +206,7 @@ func Example_printMultiContainersReplicationControllerWithWide() { } cmd := NewCmdRun(f, os.Stdin, os.Stdout, os.Stderr) ctrl := &api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{"foo": "bar"}, CreationTimestamp: metav1.Time{Time: time.Now().AddDate(-10, 0, 0)}, @@ -215,7 +215,7 @@ func Example_printMultiContainersReplicationControllerWithWide() { Replicas: 1, Selector: map[string]string{"foo": "bar"}, Template: &api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"foo": "bar"}, }, Spec: api.PodSpec{ @@ -257,7 +257,7 @@ func Example_printReplicationController() { } cmd := NewCmdRun(f, os.Stdin, os.Stdout, os.Stderr) ctrl := &api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{"foo": "bar"}, CreationTimestamp: metav1.Time{Time: time.Now().AddDate(-10, 0, 0)}, @@ -266,7 +266,7 @@ func Example_printReplicationController() { Replicas: 1, Selector: map[string]string{"foo": "bar"}, Template: &api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"foo": "bar"}, }, Spec: api.PodSpec{ @@ -310,7 +310,7 @@ func Example_printPodWithWideFormat() { nodeName := "kubernetes-node-abcd" cmd := NewCmdRun(f, os.Stdin, os.Stdout, os.Stderr) pod := &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test1", CreationTimestamp: metav1.Time{Time: time.Now().AddDate(-10, 0, 0)}, }, @@ -350,7 +350,7 @@ func Example_printPodWithShowLabels() { nodeName := "kubernetes-node-abcd" cmd := NewCmdRun(f, os.Stdin, os.Stdout, os.Stderr) pod := &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test1", CreationTimestamp: metav1.Time{Time: time.Now().AddDate(-10, 0, 0)}, Labels: map[string]string{ @@ -385,7 +385,7 @@ func newAllPhasePodList() *api.PodList { return &api.PodList{ Items: []api.Pod{ { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test1", CreationTimestamp: metav1.Time{Time: time.Now().AddDate(-10, 0, 0)}, }, @@ -402,7 +402,7 @@ func newAllPhasePodList() *api.PodList { }, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test2", CreationTimestamp: metav1.Time{Time: time.Now().AddDate(-10, 0, 0)}, }, @@ -419,7 +419,7 @@ func newAllPhasePodList() *api.PodList { }, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test3", CreationTimestamp: metav1.Time{Time: time.Now().AddDate(-10, 0, 0)}, }, @@ -436,7 +436,7 @@ func newAllPhasePodList() *api.PodList { }, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test4", CreationTimestamp: metav1.Time{Time: time.Now().AddDate(-10, 0, 0)}, }, @@ -453,7 +453,7 @@ func newAllPhasePodList() *api.PodList { }, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test5", CreationTimestamp: metav1.Time{Time: time.Now().AddDate(-10, 0, 0)}, }, @@ -544,7 +544,7 @@ func Example_printServiceWithNamespacesAndLabels() { svc := &api.ServiceList{ Items: []api.Service{ { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "svc1", Namespace: "ns1", CreationTimestamp: metav1.Time{Time: time.Now().AddDate(-10, 0, 0)}, @@ -565,7 +565,7 @@ func Example_printServiceWithNamespacesAndLabels() { Status: api.ServiceStatus{}, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "svc2", Namespace: "ns2", CreationTimestamp: metav1.Time{Time: time.Now().AddDate(-10, 0, 0)}, diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/completion.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/completion.go index dfbfe6c0..d1afd0f4 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/completion.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/completion.go @@ -26,7 +26,7 @@ import ( cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" ) -const boilerPlate = ` +const defaultBoilerPlate = ` # Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -86,7 +86,7 @@ var ( } ) -func NewCmdCompletion(f cmdutil.Factory, out io.Writer) *cobra.Command { +func NewCmdCompletion(f cmdutil.Factory, out io.Writer, boilerPlate string) *cobra.Command { shells := []string{} for s := range completion_shells { shells = append(shells, s) @@ -98,7 +98,7 @@ func NewCmdCompletion(f cmdutil.Factory, out io.Writer) *cobra.Command { Long: completion_long, Example: completion_example, Run: func(cmd *cobra.Command, args []string) { - err := RunCompletion(out, cmd, args) + err := RunCompletion(out, boilerPlate, cmd, args) cmdutil.CheckErr(err) }, ValidArgs: shells, @@ -107,7 +107,7 @@ func NewCmdCompletion(f cmdutil.Factory, out io.Writer) *cobra.Command { return cmd } -func RunCompletion(out io.Writer, cmd *cobra.Command, args []string) error { +func RunCompletion(out io.Writer, boilerPlate string, cmd *cobra.Command, args []string) error { if len(args) == 0 { return cmdutil.UsageError(cmd, "Shell not specified.") } @@ -119,22 +119,20 @@ func RunCompletion(out io.Writer, cmd *cobra.Command, args []string) error { return cmdutil.UsageError(cmd, "Unsupported shell type %q.", args[0]) } + if len(boilerPlate) == 0 { + boilerPlate = defaultBoilerPlate + } + if _, err := out.Write([]byte(boilerPlate)); err != nil { + return err + } return run(out, cmd.Parent()) } func runCompletionBash(out io.Writer, kubectl *cobra.Command) error { - _, err := out.Write([]byte(boilerPlate)) - if err != nil { - return err - } return kubectl.GenBashCompletion(out) } func runCompletionZsh(out io.Writer, kubectl *cobra.Command) error { - _, err := out.Write([]byte(boilerPlate)) - if err != nil { - return err - } zsh_initialization := ` __kubectl_bash_source() { alias shopt=':' diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/BUILD b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/BUILD index 21d96959..396c4d50 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/BUILD @@ -28,9 +28,6 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/client/unversioned/clientcmd:go_default_library", - "//pkg/client/unversioned/clientcmd/api:go_default_library", - "//pkg/client/unversioned/clientcmd/api/latest:go_default_library", "//pkg/kubectl:go_default_library", "//pkg/kubectl/cmd/templates:go_default_library", "//pkg/kubectl/cmd/util:go_default_library", @@ -38,6 +35,9 @@ go_library( "//vendor:github.com/spf13/cobra", "//vendor:k8s.io/apimachinery/pkg/util/errors", "//vendor:k8s.io/apimachinery/pkg/util/sets", + "//vendor:k8s.io/client-go/tools/clientcmd", + "//vendor:k8s.io/client-go/tools/clientcmd/api", + "//vendor:k8s.io/client-go/tools/clientcmd/api/latest", ], ) @@ -57,11 +57,11 @@ go_test( tags = ["automanaged"], deps = [ "//pkg/api:go_default_library", - "//pkg/client/unversioned/clientcmd:go_default_library", - "//pkg/client/unversioned/clientcmd/api:go_default_library", "//pkg/kubectl/cmd/util:go_default_library", "//pkg/util/flag:go_default_library", "//vendor:k8s.io/apimachinery/pkg/util/diff", + "//vendor:k8s.io/client-go/tools/clientcmd", + "//vendor:k8s.io/client-go/tools/clientcmd/api", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/config.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/config.go index 2b445f16..e910e0fa 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/config.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/config.go @@ -23,7 +23,7 @@ import ( "github.com/spf13/cobra" - "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" + "k8s.io/client-go/tools/clientcmd" "k8s.io/kubernetes/pkg/kubectl/cmd/templates" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/config_test.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/config_test.go index 74c665a2..0bd896da 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/config_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/config_test.go @@ -27,9 +27,9 @@ import ( "testing" "k8s.io/apimachinery/pkg/util/diff" + "k8s.io/client-go/tools/clientcmd" + clientcmdapi "k8s.io/client-go/tools/clientcmd/api" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" - clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/create_authinfo.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/create_authinfo.go index 8629353b..ba71a47c 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/create_authinfo.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/create_authinfo.go @@ -26,8 +26,8 @@ import ( "github.com/spf13/cobra" - "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" - clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api" + "k8s.io/client-go/tools/clientcmd" + clientcmdapi "k8s.io/client-go/tools/clientcmd/api" "k8s.io/kubernetes/pkg/kubectl/cmd/templates" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" "k8s.io/kubernetes/pkg/util/flag" diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/create_cluster.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/create_cluster.go index 9c697bc2..f08b28a4 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/create_cluster.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/create_cluster.go @@ -25,8 +25,8 @@ import ( "github.com/spf13/cobra" - "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" - clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api" + "k8s.io/client-go/tools/clientcmd" + clientcmdapi "k8s.io/client-go/tools/clientcmd/api" "k8s.io/kubernetes/pkg/kubectl/cmd/templates" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" "k8s.io/kubernetes/pkg/util/flag" diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/create_context.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/create_context.go index e4184b9e..d7509cf9 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/create_context.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/create_context.go @@ -23,8 +23,8 @@ import ( "github.com/spf13/cobra" - "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" - clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api" + "k8s.io/client-go/tools/clientcmd" + clientcmdapi "k8s.io/client-go/tools/clientcmd/api" "k8s.io/kubernetes/pkg/kubectl/cmd/templates" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" "k8s.io/kubernetes/pkg/util/flag" diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/current_context.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/current_context.go index 7a576590..17e9e921 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/current_context.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/current_context.go @@ -22,7 +22,7 @@ import ( "github.com/spf13/cobra" - "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" + "k8s.io/client-go/tools/clientcmd" "k8s.io/kubernetes/pkg/kubectl/cmd/templates" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/current_context_test.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/current_context_test.go index abd11ffb..627c79bc 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/current_context_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/current_context_test.go @@ -23,8 +23,8 @@ import ( "strings" "testing" - "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" - clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api" + "k8s.io/client-go/tools/clientcmd" + clientcmdapi "k8s.io/client-go/tools/clientcmd/api" ) type currentContextTest struct { diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/delete_cluster.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/delete_cluster.go index f1700e3f..9b89c92a 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/delete_cluster.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/delete_cluster.go @@ -21,7 +21,7 @@ import ( "io" "github.com/spf13/cobra" - "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" + "k8s.io/client-go/tools/clientcmd" "k8s.io/kubernetes/pkg/kubectl/cmd/templates" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/delete_cluster_test.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/delete_cluster_test.go index 1e4c620b..684e47bf 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/delete_cluster_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/delete_cluster_test.go @@ -24,8 +24,8 @@ import ( "reflect" "testing" - "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" - clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api" + "k8s.io/client-go/tools/clientcmd" + clientcmdapi "k8s.io/client-go/tools/clientcmd/api" ) type deleteClusterTest struct { diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/delete_context.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/delete_context.go index 78fa3340..61cb6d46 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/delete_context.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/delete_context.go @@ -21,7 +21,7 @@ import ( "io" "github.com/spf13/cobra" - "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" + "k8s.io/client-go/tools/clientcmd" "k8s.io/kubernetes/pkg/kubectl/cmd/templates" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/delete_context_test.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/delete_context_test.go index a417bebe..a53ef9c9 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/delete_context_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/delete_context_test.go @@ -24,8 +24,8 @@ import ( "reflect" "testing" - "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" - clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api" + "k8s.io/client-go/tools/clientcmd" + clientcmdapi "k8s.io/client-go/tools/clientcmd/api" ) type deleteContextTest struct { diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/get_clusters.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/get_clusters.go index 9b31d28b..e9ca71dc 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/get_clusters.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/get_clusters.go @@ -21,7 +21,7 @@ import ( "io" "github.com/spf13/cobra" - "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" + "k8s.io/client-go/tools/clientcmd" "k8s.io/kubernetes/pkg/kubectl/cmd/templates" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/get_clusters_test.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/get_clusters_test.go index 8493de3f..4c9d3da8 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/get_clusters_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/get_clusters_test.go @@ -22,8 +22,8 @@ import ( "os" "testing" - "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" - clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api" + "k8s.io/client-go/tools/clientcmd" + clientcmdapi "k8s.io/client-go/tools/clientcmd/api" ) type getClustersTest struct { diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/get_contexts.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/get_contexts.go index 92ede9bb..ef761006 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/get_contexts.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/get_contexts.go @@ -25,8 +25,8 @@ import ( "github.com/spf13/cobra" utilerrors "k8s.io/apimachinery/pkg/util/errors" "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" - clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api" + "k8s.io/client-go/tools/clientcmd" + clientcmdapi "k8s.io/client-go/tools/clientcmd/api" "k8s.io/kubernetes/pkg/kubectl" "k8s.io/kubernetes/pkg/kubectl/cmd/templates" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/get_contexts_test.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/get_contexts_test.go index 6bb38896..5a7da24e 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/get_contexts_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/get_contexts_test.go @@ -22,8 +22,8 @@ import ( "os" "testing" - "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" - clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api" + "k8s.io/client-go/tools/clientcmd" + clientcmdapi "k8s.io/client-go/tools/clientcmd/api" ) type getContextsTest struct { diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/navigation_step_parser.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/navigation_step_parser.go index 7709e665..0345c79d 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/navigation_step_parser.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/navigation_step_parser.go @@ -22,7 +22,7 @@ import ( "strings" "k8s.io/apimachinery/pkg/util/sets" - clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api" + clientcmdapi "k8s.io/client-go/tools/clientcmd/api" ) type navigationSteps struct { diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/navigation_step_parser_test.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/navigation_step_parser_test.go index 0d2eefc9..a468c5c9 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/navigation_step_parser_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/navigation_step_parser_test.go @@ -22,7 +22,7 @@ import ( "testing" "k8s.io/apimachinery/pkg/util/diff" - clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api" + clientcmdapi "k8s.io/client-go/tools/clientcmd/api" ) type stepParserTest struct { diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/set.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/set.go index faf02308..6b72cf2e 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/set.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/set.go @@ -26,7 +26,7 @@ import ( "github.com/spf13/cobra" - "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" + "k8s.io/client-go/tools/clientcmd" "k8s.io/kubernetes/pkg/kubectl/cmd/templates" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" "k8s.io/kubernetes/pkg/util/flag" diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/unset.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/unset.go index 48a56f8b..38560a22 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/unset.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/unset.go @@ -25,7 +25,7 @@ import ( "github.com/spf13/cobra" "k8s.io/kubernetes/pkg/kubectl/cmd/templates" - "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" + "k8s.io/client-go/tools/clientcmd" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/use_context.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/use_context.go index 6138d9a7..584a5927 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/use_context.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/use_context.go @@ -23,8 +23,8 @@ import ( "github.com/spf13/cobra" - "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" - clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api" + "k8s.io/client-go/tools/clientcmd" + clientcmdapi "k8s.io/client-go/tools/clientcmd/api" "k8s.io/kubernetes/pkg/kubectl/cmd/templates" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/view.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/view.go index 5193c80c..0baaf43e 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/view.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/config/view.go @@ -23,9 +23,9 @@ import ( "github.com/spf13/cobra" - "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" - clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api" - "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/latest" + "k8s.io/client-go/tools/clientcmd" + clientcmdapi "k8s.io/client-go/tools/clientcmd/api" + "k8s.io/client-go/tools/clientcmd/api/latest" "k8s.io/kubernetes/pkg/kubectl" "k8s.io/kubernetes/pkg/kubectl/cmd/templates" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/create.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/create.go index 6256e11e..81d1117e 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/create.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/create.go @@ -31,6 +31,12 @@ import ( "k8s.io/kubernetes/pkg/kubectl/resource" ) +type CreateOptions struct { + FilenameOptions resource.FilenameOptions + Selector string + EditBeforeCreate bool +} + var ( create_long = templates.LongDesc(` Create a resource by filename or stdin. @@ -49,7 +55,7 @@ var ( ) func NewCmdCreate(f cmdutil.Factory, out, errOut io.Writer) *cobra.Command { - options := &resource.FilenameOptions{} + var options CreateOptions cmd := &cobra.Command{ Use: "create -f FILENAME", @@ -57,27 +63,28 @@ func NewCmdCreate(f cmdutil.Factory, out, errOut io.Writer) *cobra.Command { Long: create_long, Example: create_example, Run: func(cmd *cobra.Command, args []string) { - if cmdutil.IsFilenameEmpty(options.Filenames) { + if cmdutil.IsFilenameEmpty(options.FilenameOptions.Filenames) { defaultRunFunc := cmdutil.DefaultSubCommandRun(errOut) defaultRunFunc(cmd, args) return } cmdutil.CheckErr(ValidateArgs(cmd, args)) - cmdutil.CheckErr(RunCreate(f, cmd, out, errOut, options)) + cmdutil.CheckErr(RunCreate(f, cmd, out, errOut, &options)) }, } usage := "to use to create the resource" - cmdutil.AddFilenameOptionFlags(cmd, options, usage) + cmdutil.AddFilenameOptionFlags(cmd, &options.FilenameOptions, usage) cmd.MarkFlagRequired("filename") cmdutil.AddValidateFlags(cmd) cmdutil.AddPrinterFlags(cmd) - cmd.Flags().Bool("edit", false, "Edit the API resource before creating") + cmd.Flags().BoolVar(&options.EditBeforeCreate, "edit", false, "Edit the API resource before creating") cmd.Flags().Bool("windows-line-endings", gruntime.GOOS == "windows", "Only relevant if --edit=true. Use Windows line-endings (default Unix line-endings)") cmdutil.AddApplyAnnotationFlags(cmd) cmdutil.AddRecordFlag(cmd) cmdutil.AddDryRunFlag(cmd) cmdutil.AddInclude3rdPartyFlags(cmd) + cmd.Flags().StringVarP(&options.Selector, "selector", "l", "", "Selector (label query) to filter on, supports '=', '==', and '!='.") // create subcommands cmd.AddCommand(NewCmdCreateNamespace(f, out)) @@ -100,9 +107,9 @@ func ValidateArgs(cmd *cobra.Command, args []string) error { return nil } -func RunCreate(f cmdutil.Factory, cmd *cobra.Command, out, errOut io.Writer, options *resource.FilenameOptions) error { - if cmdutil.GetFlagBool(cmd, "edit") { - return RunEditOnCreate(f, out, errOut, cmd, options) +func RunCreate(f cmdutil.Factory, cmd *cobra.Command, out, errOut io.Writer, options *CreateOptions) error { + if options.EditBeforeCreate { + return RunEditOnCreate(f, out, errOut, cmd, &options.FilenameOptions) } schema, err := f.Validator(cmdutil.GetFlagBool(cmd, "validate"), cmdutil.GetFlagString(cmd, "schema-cache-dir")) if err != nil { @@ -122,7 +129,8 @@ func RunCreate(f cmdutil.Factory, cmd *cobra.Command, out, errOut io.Writer, opt Schema(schema). ContinueOnError(). NamespaceParam(cmdNamespace).DefaultNamespace(). - FilenameParam(enforceNamespace, options). + FilenameParam(enforceNamespace, &options.FilenameOptions). + SelectorParam(options.Selector). Flatten(). Do() err = r.Err() diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/delete.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/delete.go index b3269218..fb2ab18e 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/delete.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/delete.go @@ -25,9 +25,9 @@ import ( "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/kubectl" "k8s.io/kubernetes/pkg/kubectl/cmd/templates" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" @@ -82,9 +82,6 @@ var ( # Force delete a pod on a dead node kubectl delete pod foo --grace-period=0 --force - # Delete a pod with UID 1234-56-7890-234234-456456. - kubectl delete pod 1234-56-7890-234234-456456 - # Delete all pods kubectl delete pods --all`) ) @@ -258,9 +255,9 @@ func ReapResult(r *resource.Result, f cmdutil.Factory, out io.Writer, isDefaultD } return cmdutil.AddSourceToErr("reaping", info.Source, err) } - var options *api.DeleteOptions + var options *metav1.DeleteOptions if gracePeriod >= 0 { - options = api.NewDeleteOptions(int64(gracePeriod)) + options = metav1.NewDeleteOptions(int64(gracePeriod)) } if err := reaper.Stop(info.Namespace, info.Name, timeout, options); err != nil { return cmdutil.AddSourceToErr("stopping", info.Source, err) diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/delete_test.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/delete_test.go index aee4b4a3..ce0077b2 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/delete_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/delete_test.go @@ -26,8 +26,8 @@ import ( "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/restclient/fake" "k8s.io/kubernetes/pkg/client/typed/dynamic" "k8s.io/kubernetes/pkg/kubectl" @@ -137,11 +137,11 @@ func TestDeleteObject(t *testing.T) { type fakeReaper struct { namespace, name string timeout time.Duration - deleteOptions *api.DeleteOptions + deleteOptions *metav1.DeleteOptions err error } -func (r *fakeReaper) Stop(namespace, name string, timeout time.Duration, gracePeriod *api.DeleteOptions) error { +func (r *fakeReaper) Stop(namespace, name string, timeout time.Duration, gracePeriod *metav1.DeleteOptions) error { r.namespace, r.name = namespace, name r.timeout = timeout r.deleteOptions = gracePeriod @@ -278,7 +278,7 @@ func TestDeleteObjectIgnoreNotFound(t *testing.T) { func TestDeleteAllNotFound(t *testing.T) { _, svc, _ := testData() // Add an item to the list which will result in a 404 on delete - svc.Items = append(svc.Items, api.Service{ObjectMeta: api.ObjectMeta{Name: "foo"}}) + svc.Items = append(svc.Items, api.Service{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}) notFoundError := &errors.NewNotFound(api.Resource("services"), "foo").ErrStatus f, tf, codec, _ := cmdtesting.NewAPIFactory() @@ -328,7 +328,7 @@ func TestDeleteAllIgnoreNotFound(t *testing.T) { f, tf, codec, _ := cmdtesting.NewAPIFactory() // Add an item to the list which will result in a 404 on delete - svc.Items = append(svc.Items, api.Service{ObjectMeta: api.ObjectMeta{Name: "foo"}}) + svc.Items = append(svc.Items, api.Service{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}) notFoundError := &errors.NewNotFound(api.Resource("services"), "foo").ErrStatus tf.Printer = &testPrinter{} diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/drain.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/drain.go index a70107b7..319e9a8d 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/drain.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/drain.go @@ -31,13 +31,13 @@ import ( apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/wait" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/policy" "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" - "k8s.io/kubernetes/pkg/client/restclient" - "k8s.io/kubernetes/pkg/fields" "k8s.io/kubernetes/pkg/kubectl" "k8s.io/kubernetes/pkg/kubectl/cmd/templates" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" @@ -381,8 +381,8 @@ func (ps podStatuses) Message() string { // getPodsForDeletion returns all the pods we're going to delete. If there are // any pods preventing us from deleting, we return that list in an error. func (o *DrainOptions) getPodsForDeletion() (pods []api.Pod, err error) { - podList, err := o.client.Core().Pods(api.NamespaceAll).List(api.ListOptions{ - FieldSelector: fields.SelectorFromSet(fields.Set{"spec.nodeName": o.nodeInfo.Name})}) + podList, err := o.client.Core().Pods(metav1.NamespaceAll).List(metav1.ListOptions{ + FieldSelector: fields.SelectorFromSet(fields.Set{"spec.nodeName": o.nodeInfo.Name}).String()}) if err != nil { return pods, err } @@ -418,7 +418,7 @@ func (o *DrainOptions) getPodsForDeletion() (pods []api.Pod, err error) { } func (o *DrainOptions) deletePod(pod api.Pod) error { - deleteOptions := &api.DeleteOptions{} + deleteOptions := &metav1.DeleteOptions{} if o.GracePeriodSeconds >= 0 { gracePeriodSeconds := int64(o.GracePeriodSeconds) deleteOptions.GracePeriodSeconds = &gracePeriodSeconds @@ -427,7 +427,7 @@ func (o *DrainOptions) deletePod(pod api.Pod) error { } func (o *DrainOptions) evictPod(pod api.Pod, policyGroupVersion string) error { - deleteOptions := &api.DeleteOptions{} + deleteOptions := &metav1.DeleteOptions{} if o.GracePeriodSeconds >= 0 { gracePeriodSeconds := int64(o.GracePeriodSeconds) deleteOptions.GracePeriodSeconds = &gracePeriodSeconds @@ -437,7 +437,7 @@ func (o *DrainOptions) evictPod(pod api.Pod, policyGroupVersion string) error { APIVersion: policyGroupVersion, Kind: EvictionKind, }, - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: pod.Name, Namespace: pod.Namespace, }, diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/drain_test.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/drain_test.go index f050caa2..e97ec4c8 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/drain_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/drain_test.go @@ -60,7 +60,7 @@ var cordoned_node *api.Node func TestMain(m *testing.M) { // Create a node. node = &api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node", CreationTimestamp: metav1.Time{Time: time.Now()}, }, @@ -221,7 +221,7 @@ func TestDrain(t *testing.T) { labels["my_key"] = "my_value" rc := api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "rc", Namespace: "default", CreationTimestamp: metav1.Time{Time: time.Now()}, @@ -237,7 +237,7 @@ func TestDrain(t *testing.T) { rc_anno[api.CreatedByAnnotation] = refJson(t, &rc) rc_pod := api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "bar", Namespace: "default", CreationTimestamp: metav1.Time{Time: time.Now()}, @@ -250,7 +250,7 @@ func TestDrain(t *testing.T) { } ds := extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "ds", Namespace: "default", CreationTimestamp: metav1.Time{Time: time.Now()}, @@ -265,7 +265,7 @@ func TestDrain(t *testing.T) { ds_anno[api.CreatedByAnnotation] = refJson(t, &ds) ds_pod := api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "bar", Namespace: "default", CreationTimestamp: metav1.Time{Time: time.Now()}, @@ -278,7 +278,7 @@ func TestDrain(t *testing.T) { } job := batch.Job{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "job", Namespace: "default", CreationTimestamp: metav1.Time{Time: time.Now()}, @@ -290,7 +290,7 @@ func TestDrain(t *testing.T) { } job_pod := api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "bar", Namespace: "default", CreationTimestamp: metav1.Time{Time: time.Now()}, @@ -300,7 +300,7 @@ func TestDrain(t *testing.T) { } rs := extensions.ReplicaSet{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "rs", Namespace: "default", CreationTimestamp: metav1.Time{Time: time.Now()}, @@ -316,7 +316,7 @@ func TestDrain(t *testing.T) { rs_anno[api.CreatedByAnnotation] = refJson(t, &rs) rs_pod := api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "bar", Namespace: "default", CreationTimestamp: metav1.Time{Time: time.Now()}, @@ -329,7 +329,7 @@ func TestDrain(t *testing.T) { } naked_pod := api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "bar", Namespace: "default", CreationTimestamp: metav1.Time{Time: time.Now()}, @@ -341,7 +341,7 @@ func TestDrain(t *testing.T) { } emptydir_pod := api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "bar", Namespace: "default", CreationTimestamp: metav1.Time{Time: time.Now()}, @@ -716,7 +716,7 @@ func createPods(ifCreateNewPods bool) (map[string]api.Pod, []api.Pod) { uid = types.UID(strconv.Itoa(i) + strconv.Itoa(i)) } pod := api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod" + strconv.Itoa(i), Namespace: "default", UID: uid, diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/edit.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/edit.go index baa5d928..decf15c2 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/edit.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/edit.go @@ -32,6 +32,7 @@ import ( "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/validation/field" "k8s.io/apimachinery/pkg/util/yaml" "k8s.io/kubernetes/pkg/api" @@ -100,12 +101,20 @@ func NewCmdEdit(f cmdutil.Factory, out, errOut io.Writer) *cobra.Command { Long: editLong, Example: fmt.Sprintf(editExample), Run: func(cmd *cobra.Command, args []string) { + args = append([]string{"configmap"}, args...) err := RunEdit(f, out, errOut, cmd, args, options) cmdutil.CheckErr(err) }, ValidArgs: validArgs, ArgAliases: argAliases, } + addEditFlags(cmd, options) + + cmd.AddCommand(NewCmdEditConfigMap(f, out, errOut)) + return cmd +} + +func addEditFlags(cmd *cobra.Command, options *resource.FilenameOptions) { usage := "to use to edit the resource" cmdutil.AddFilenameOptionFlags(cmd, options, usage) cmdutil.AddValidateFlags(cmd) @@ -115,7 +124,6 @@ func NewCmdEdit(f cmdutil.Factory, out, errOut io.Writer) *cobra.Command { cmdutil.AddApplyAnnotationFlags(cmd) cmdutil.AddRecordFlag(cmd) cmdutil.AddInclude3rdPartyFlags(cmd) - return cmd } func RunEdit(f cmdutil.Factory, out, errOut io.Writer, cmd *cobra.Command, args []string, options *resource.FilenameOptions) error { @@ -500,7 +508,7 @@ func visitToPatch( } results.version = defaultVersion - patched, err := resource.NewHelper(info.Client, info.Mapping).Patch(info.Namespace, info.Name, api.StrategicMergePatchType, patch) + patched, err := resource.NewHelper(info.Client, info.Mapping).Patch(info.Namespace, info.Name, types.StrategicMergePatchType, patch) if err != nil { fmt.Fprintln(out, results.addError(err, info)) return nil diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/edit_configmap.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/edit_configmap.go new file mode 100644 index 00000000..60cc804d --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/edit_configmap.go @@ -0,0 +1,96 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package cmd + +import ( + "bytes" + "fmt" + "io" + "os" + + "github.com/spf13/cobra" + "k8s.io/apimachinery/pkg/apis/meta/v1" + cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" + "k8s.io/kubernetes/pkg/kubectl/cmd/util/editor" + "k8s.io/kubernetes/pkg/kubectl/resource" +) + +// NewCmdEditConfigMap is a macro command to edit config maps +func NewCmdEditConfigMap(f cmdutil.Factory, cmdOut, errOut io.Writer) *cobra.Command { + options := &resource.FilenameOptions{} + + cmd := &cobra.Command{ + Use: "configmap", + Aliases: []string{"cm"}, + Short: "Edit a config map object.", + Long: "Edit and update a config map object", + Run: func(cmd *cobra.Command, args []string) { + RunEditConfigMap(cmd, f, args, cmdOut, errOut, options) + }, + } + + addEditFlags(cmd, options) + cmd.Flags().String("config-map-data", "", "If non-empty, specify the name of a data slot in a config map to edit.") + return cmd +} + +// RunEditConfigMap runs the edit command for config maps. It either edits the complete map +// or it edits individual files inside the config map. +func RunEditConfigMap(cmd *cobra.Command, f cmdutil.Factory, args []string, cmdOut, errOut io.Writer, options *resource.FilenameOptions) error { + dataFile := cmdutil.GetFlagString(cmd, "config-map-data") + if len(dataFile) == 0 { + // We need to add the resource type back on to the front + args = append([]string{"configmap"}, args...) + return RunEdit(f, cmdOut, errOut, cmd, args, options) + } + cmdNamespace, _, err := f.DefaultNamespace() + if err != nil { + return err + } + + cs, err := f.ClientSet() + if err != nil { + return err + } + configMap, err := cs.Core().ConfigMaps(cmdNamespace).Get(args[0], v1.GetOptions{}) + if err != nil { + return err + } + + value, found := configMap.Data[dataFile] + if !found { + keys := []string{} + for key := range configMap.Data { + keys = append(keys, key) + } + return fmt.Errorf("No such data file (%s), filenames are: %v\n", dataFile, keys) + } + edit := editor.NewDefaultEditor(os.Environ()) + data, file, err := edit.LaunchTempFile(fmt.Sprintf("%s-edit-", dataFile), "", bytes.NewBuffer([]byte(value))) + defer func() { + os.Remove(file) + }() + if err != nil { + return err + } + configMap.Data[dataFile] = string(data) + + if _, err := cs.Core().ConfigMaps(cmdNamespace).Update(configMap); err != nil { + return err + } + return nil +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/exec.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/exec.go index 9bd0281b..19b79ae5 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/exec.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/exec.go @@ -25,9 +25,9 @@ import ( "github.com/spf13/cobra" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" coreclient "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/unversioned/remotecommand" "k8s.io/kubernetes/pkg/kubectl/cmd/templates" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/exec_test.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/exec_test.go index a889b559..e671052c 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/exec_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/exec_test.go @@ -29,8 +29,9 @@ import ( "github.com/spf13/cobra" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/restclient/fake" cmdtesting "k8s.io/kubernetes/pkg/kubectl/cmd/testing" "k8s.io/kubernetes/pkg/util/term" @@ -243,7 +244,7 @@ func TestExec(t *testing.T) { func execPod() *api.Pod { return &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "test", ResourceVersion: "10"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "test", ResourceVersion: "10"}, Spec: api.PodSpec{ RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/expose_test.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/expose_test.go index f796683e..987d21f6 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/expose_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/expose_test.go @@ -23,6 +23,7 @@ import ( "strings" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/restclient/fake" @@ -52,14 +53,14 @@ func TestRunExposeService(t *testing.T) { "POST": "/namespaces/test/services", }, input: &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "baz", Namespace: "test", ResourceVersion: "12"}, + ObjectMeta: metav1.ObjectMeta{Name: "baz", Namespace: "test", ResourceVersion: "12"}, Spec: api.ServiceSpec{ Selector: map[string]string{"app": "go"}, }, }, flags: map[string]string{"protocol": "UDP", "port": "14", "name": "foo", "labels": "svc=test"}, output: &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "", Labels: map[string]string{"svc": "test"}}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "", Labels: map[string]string{"svc": "test"}}, Spec: api.ServiceSpec{ Ports: []api.ServicePort{ { @@ -83,14 +84,14 @@ func TestRunExposeService(t *testing.T) { "POST": "/namespaces/test/services", }, input: &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "baz", Namespace: "test", ResourceVersion: "12"}, + ObjectMeta: metav1.ObjectMeta{Name: "baz", Namespace: "test", ResourceVersion: "12"}, Spec: api.ServiceSpec{ Selector: map[string]string{"app": "go"}, }, }, flags: map[string]string{"selector": "func=stream", "protocol": "UDP", "port": "14", "name": "foo", "labels": "svc=test"}, output: &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "", Labels: map[string]string{"svc": "test"}}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "", Labels: map[string]string{"svc": "test"}}, Spec: api.ServiceSpec{ Ports: []api.ServicePort{ { @@ -114,7 +115,7 @@ func TestRunExposeService(t *testing.T) { "POST": "/namespaces/default/services", }, input: &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "mayor", Namespace: "default", ResourceVersion: "12"}, + ObjectMeta: metav1.ObjectMeta{Name: "mayor", Namespace: "default", ResourceVersion: "12"}, Spec: api.ServiceSpec{ Selector: map[string]string{"run": "this"}, }, @@ -122,7 +123,7 @@ func TestRunExposeService(t *testing.T) { // No --name flag specified below. Service will use the rc's name passed via the 'default-name' parameter flags: map[string]string{"selector": "run=this", "port": "80", "labels": "runas=amayor"}, output: &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "mayor", Namespace: "", Labels: map[string]string{"runas": "amayor"}}, + ObjectMeta: metav1.ObjectMeta{Name: "mayor", Namespace: "", Labels: map[string]string{"runas": "amayor"}}, Spec: api.ServiceSpec{ Ports: []api.ServicePort{ { @@ -146,14 +147,14 @@ func TestRunExposeService(t *testing.T) { "POST": "/namespaces/test/services", }, input: &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "baz", Namespace: "test", ResourceVersion: "12"}, + ObjectMeta: metav1.ObjectMeta{Name: "baz", Namespace: "test", ResourceVersion: "12"}, Spec: api.ServiceSpec{ Selector: map[string]string{"app": "go"}, }, }, flags: map[string]string{"selector": "func=stream", "protocol": "UDP", "port": "14", "name": "foo", "labels": "svc=test", "type": "LoadBalancer", "dry-run": "true"}, output: &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "", Labels: map[string]string{"svc": "test"}}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "", Labels: map[string]string{"svc": "test"}}, Spec: api.ServiceSpec{ Ports: []api.ServicePort{ { @@ -177,14 +178,14 @@ func TestRunExposeService(t *testing.T) { "POST": "/namespaces/test/services", }, input: &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "baz", Namespace: "test", ResourceVersion: "12"}, + ObjectMeta: metav1.ObjectMeta{Name: "baz", Namespace: "test", ResourceVersion: "12"}, Spec: api.ServiceSpec{ Selector: map[string]string{"app": "go"}, }, }, flags: map[string]string{"selector": "func=stream", "protocol": "UDP", "port": "14", "name": "foo", "labels": "svc=test", "type": "LoadBalancer", "session-affinity": "ClientIP", "dry-run": "true"}, output: &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "", Labels: map[string]string{"svc": "test"}}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "", Labels: map[string]string{"svc": "test"}}, Spec: api.ServiceSpec{ Ports: []api.ServicePort{ { @@ -209,14 +210,14 @@ func TestRunExposeService(t *testing.T) { "POST": "/namespaces/test/services", }, input: &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "baz", Namespace: "test", ResourceVersion: "12"}, + ObjectMeta: metav1.ObjectMeta{Name: "baz", Namespace: "test", ResourceVersion: "12"}, Spec: api.ServiceSpec{ Selector: map[string]string{"app": "go"}, }, }, flags: map[string]string{"selector": "func=stream", "protocol": "UDP", "port": "14", "name": "foo", "labels": "svc=test", "cluster-ip": "10.10.10.10", "dry-run": "true"}, output: &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "", Labels: map[string]string{"svc": "test"}}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "", Labels: map[string]string{"svc": "test"}}, Spec: api.ServiceSpec{ Ports: []api.ServicePort{ { @@ -241,14 +242,14 @@ func TestRunExposeService(t *testing.T) { "POST": "/namespaces/test/services", }, input: &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "baz", Namespace: "test", ResourceVersion: "12"}, + ObjectMeta: metav1.ObjectMeta{Name: "baz", Namespace: "test", ResourceVersion: "12"}, Spec: api.ServiceSpec{ Selector: map[string]string{"app": "go"}, }, }, flags: map[string]string{"selector": "func=stream", "protocol": "UDP", "port": "14", "name": "foo", "labels": "svc=test", "cluster-ip": "None", "dry-run": "true"}, output: &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "", Labels: map[string]string{"svc": "test"}}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "", Labels: map[string]string{"svc": "test"}}, Spec: api.ServiceSpec{ Ports: []api.ServicePort{ { @@ -273,14 +274,14 @@ func TestRunExposeService(t *testing.T) { "POST": "/namespaces/test/services", }, input: &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "baz", Namespace: "test", ResourceVersion: "12"}, + ObjectMeta: metav1.ObjectMeta{Name: "baz", Namespace: "test", ResourceVersion: "12"}, Spec: api.ServiceSpec{ Selector: map[string]string{"app": "go"}, }, }, flags: map[string]string{"selector": "func=stream", "name": "foo", "labels": "svc=test", "cluster-ip": "None", "dry-run": "true"}, output: &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "", Labels: map[string]string{"svc": "test"}}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "", Labels: map[string]string{"svc": "test"}}, Spec: api.ServiceSpec{ Ports: []api.ServicePort{}, Selector: map[string]string{"func": "stream"}, @@ -299,14 +300,14 @@ func TestRunExposeService(t *testing.T) { "POST": "/namespaces/test/services", }, input: &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "redis-master", Namespace: "test", ResourceVersion: "12"}, + ObjectMeta: metav1.ObjectMeta{Name: "redis-master", Namespace: "test", ResourceVersion: "12"}, Spec: api.ServiceSpec{ Selector: map[string]string{"app": "go"}, }, }, flags: map[string]string{"filename": "../../../examples/guestbook/redis-master-service.yaml", "selector": "func=stream", "protocol": "UDP", "port": "14", "name": "foo", "labels": "svc=test", "dry-run": "true"}, output: &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "foo", Labels: map[string]string{"svc": "test"}}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Labels: map[string]string{"svc": "test"}}, Spec: api.ServiceSpec{ Ports: []api.ServicePort{ { @@ -329,11 +330,11 @@ func TestRunExposeService(t *testing.T) { "POST": "/namespaces/test/services", }, input: &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "baz", Namespace: "test", ResourceVersion: "12"}, + ObjectMeta: metav1.ObjectMeta{Name: "baz", Namespace: "test", ResourceVersion: "12"}, }, flags: map[string]string{"selector": "svc=frompod", "port": "90", "labels": "svc=frompod", "generator": "service/v2"}, output: &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "a-name-that-is-toooo-big-for-a-service-because-it-can-only-handle-63-characters", Namespace: "", Labels: map[string]string{"svc": "frompod"}}, + ObjectMeta: metav1.ObjectMeta{Name: "a-name-that-is-toooo-big-for-a-service-because-it-can-only-handle-63-characters", Namespace: "", Labels: map[string]string{"svc": "frompod"}}, Spec: api.ServiceSpec{ Ports: []api.ServicePort{ { @@ -357,7 +358,7 @@ func TestRunExposeService(t *testing.T) { "POST": "/namespaces/test/services", }, input: &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "", Labels: map[string]string{"svc": "multiport"}}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "", Labels: map[string]string{"svc": "multiport"}}, Spec: api.ServiceSpec{ Ports: []api.ServicePort{ { @@ -375,7 +376,7 @@ func TestRunExposeService(t *testing.T) { }, flags: map[string]string{"selector": "svc=fromfoo", "generator": "service/v2", "name": "fromfoo", "dry-run": "true"}, output: &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "fromfoo", Namespace: "", Labels: map[string]string{"svc": "multiport"}}, + ObjectMeta: metav1.ObjectMeta{Name: "fromfoo", Namespace: "", Labels: map[string]string{"svc": "multiport"}}, Spec: api.ServiceSpec{ Ports: []api.ServicePort{ { @@ -405,7 +406,7 @@ func TestRunExposeService(t *testing.T) { "POST": "/namespaces/test/services", }, input: &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "", Labels: map[string]string{"svc": "multiport"}}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "", Labels: map[string]string{"svc": "multiport"}}, Spec: api.ServiceSpec{ Ports: []api.ServicePort{ { @@ -428,7 +429,7 @@ func TestRunExposeService(t *testing.T) { }, flags: map[string]string{"selector": "svc=fromfoo", "generator": "service/v2", "name": "fromfoo", "dry-run": "true"}, output: &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "fromfoo", Namespace: "", Labels: map[string]string{"svc": "multiport"}}, + ObjectMeta: metav1.ObjectMeta{Name: "fromfoo", Namespace: "", Labels: map[string]string{"svc": "multiport"}}, Spec: api.ServiceSpec{ Ports: []api.ServicePort{ { diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/get.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/get.go index a9755642..f6257ea9 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/get.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/get.go @@ -183,13 +183,17 @@ func RunGet(f cmdutil.Factory, out, errOut io.Writer, cmd *cobra.Command, args [ return cmdutil.UsageError(cmd, usageString) } - // always show resources when getting by name or filename argsHasNames, err := resource.HasNames(args) if err != nil { return err } - if len(options.Filenames) > 0 || argsHasNames { - cmd.Flag("show-all").Value.Set("true") + + // always show resources when getting by name or filename, or if the output + // is machine-consumable, or if multiple resource kinds were requested. + if len(options.Filenames) > 0 || argsHasNames || cmdutil.OutputsRawFormat(cmd) { + if !cmd.Flag("show-all").Changed { + cmd.Flag("show-all").Value.Set("true") + } } export := cmdutil.GetFlagBool(cmd, "export") diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/get_test.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/get_test.go index e7d73035..a9f4eded 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/get_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/get_test.go @@ -33,12 +33,12 @@ import ( "k8s.io/apimachinery/pkg/runtime/serializer/json" "k8s.io/apimachinery/pkg/runtime/serializer/streaming" "k8s.io/apimachinery/pkg/watch" + restclient "k8s.io/client-go/rest" + restclientwatch "k8s.io/client-go/rest/watch" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" apitesting "k8s.io/kubernetes/pkg/api/testing" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/restclient/fake" - restclientwatch "k8s.io/kubernetes/pkg/client/restclient/watch" cmdtesting "k8s.io/kubernetes/pkg/kubectl/cmd/testing" ) @@ -49,11 +49,11 @@ func testData() (*api.PodList, *api.ServiceList, *api.ReplicationControllerList) }, Items: []api.Pod{ { - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "test", ResourceVersion: "10"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "test", ResourceVersion: "10"}, Spec: apitesting.DeepEqualSafePodSpec(), }, { - ObjectMeta: api.ObjectMeta{Name: "bar", Namespace: "test", ResourceVersion: "11"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar", Namespace: "test", ResourceVersion: "11"}, Spec: apitesting.DeepEqualSafePodSpec(), }, }, @@ -64,7 +64,7 @@ func testData() (*api.PodList, *api.ServiceList, *api.ReplicationControllerList) }, Items: []api.Service{ { - ObjectMeta: api.ObjectMeta{Name: "baz", Namespace: "test", ResourceVersion: "12"}, + ObjectMeta: metav1.ObjectMeta{Name: "baz", Namespace: "test", ResourceVersion: "12"}, Spec: api.ServiceSpec{ SessionAffinity: "None", Type: api.ServiceTypeClusterIP, @@ -78,7 +78,7 @@ func testData() (*api.PodList, *api.ServiceList, *api.ReplicationControllerList) }, Items: []api.ReplicationController{ { - ObjectMeta: api.ObjectMeta{Name: "rc1", Namespace: "test", ResourceVersion: "18"}, + ObjectMeta: metav1.ObjectMeta{Name: "rc1", Namespace: "test", ResourceVersion: "18"}, Spec: api.ReplicationControllerSpec{ Replicas: 1, }, @@ -93,21 +93,21 @@ func testComponentStatusData() *api.ComponentStatusList { Conditions: []api.ComponentCondition{ {Type: api.ComponentHealthy, Status: api.ConditionTrue, Message: "ok"}, }, - ObjectMeta: api.ObjectMeta{Name: "servergood"}, + ObjectMeta: metav1.ObjectMeta{Name: "servergood"}, } bad := api.ComponentStatus{ Conditions: []api.ComponentCondition{ {Type: api.ComponentHealthy, Status: api.ConditionFalse, Message: "", Error: "bad status: 500"}, }, - ObjectMeta: api.ObjectMeta{Name: "serverbad"}, + ObjectMeta: metav1.ObjectMeta{Name: "serverbad"}, } unknown := api.ComponentStatus{ Conditions: []api.ComponentCondition{ {Type: api.ComponentHealthy, Status: api.ConditionUnknown, Message: "", Error: "fizzbuzz error"}, }, - ObjectMeta: api.ObjectMeta{Name: "serverunknown"}, + ObjectMeta: metav1.ObjectMeta{Name: "serverunknown"}, } return &api.ComponentStatusList{ @@ -166,7 +166,7 @@ func TestGetSchemaObject(t *testing.T) { tf.Printer = &testPrinter{} tf.Client = &fake.RESTClient{ NegotiatedSerializer: unstructuredSerializer, - Resp: &http.Response{StatusCode: 200, Header: defaultHeader(), Body: objBody(codec, &api.ReplicationController{ObjectMeta: api.ObjectMeta{Name: "foo"}})}, + Resp: &http.Response{StatusCode: 200, Header: defaultHeader(), Body: objBody(codec, &api.ReplicationController{ObjectMeta: metav1.ObjectMeta{Name: "foo"}})}, } tf.Namespace = "test" tf.ClientConfig = &restclient.Config{ContentConfig: restclient.ContentConfig{GroupVersion: &schema.GroupVersion{Version: "v1"}}} @@ -213,15 +213,15 @@ func TestGetSortedObjects(t *testing.T) { }, Items: []api.Pod{ { - ObjectMeta: api.ObjectMeta{Name: "c", Namespace: "test", ResourceVersion: "10"}, + ObjectMeta: metav1.ObjectMeta{Name: "c", Namespace: "test", ResourceVersion: "10"}, Spec: apitesting.DeepEqualSafePodSpec(), }, { - ObjectMeta: api.ObjectMeta{Name: "b", Namespace: "test", ResourceVersion: "11"}, + ObjectMeta: metav1.ObjectMeta{Name: "b", Namespace: "test", ResourceVersion: "11"}, Spec: apitesting.DeepEqualSafePodSpec(), }, { - ObjectMeta: api.ObjectMeta{Name: "a", Namespace: "test", ResourceVersion: "9"}, + ObjectMeta: metav1.ObjectMeta{Name: "a", Namespace: "test", ResourceVersion: "9"}, Spec: apitesting.DeepEqualSafePodSpec(), }, }, @@ -552,7 +552,7 @@ func TestGetMultipleTypeObjectsWithSelector(t *testing.T) { func TestGetMultipleTypeObjectsWithDirectReference(t *testing.T) { _, svc, _ := testData() node := &api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Spec: api.NodeSpec{ @@ -619,7 +619,7 @@ func TestGetByNameForcesFlag(t *testing.T) { func watchTestData() ([]api.Pod, []watch.Event) { pods := []api.Pod{ { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "bar", Namespace: "test", ResourceVersion: "9", @@ -627,7 +627,7 @@ func watchTestData() ([]api.Pod, []watch.Event) { Spec: apitesting.DeepEqualSafePodSpec(), }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "test", ResourceVersion: "10", @@ -640,7 +640,7 @@ func watchTestData() ([]api.Pod, []watch.Event) { { Type: watch.Added, Object: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "bar", Namespace: "test", ResourceVersion: "9", @@ -651,7 +651,7 @@ func watchTestData() ([]api.Pod, []watch.Event) { { Type: watch.Added, Object: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "test", ResourceVersion: "10", @@ -663,7 +663,7 @@ func watchTestData() ([]api.Pod, []watch.Event) { { Type: watch.Modified, Object: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "test", ResourceVersion: "11", @@ -674,7 +674,7 @@ func watchTestData() ([]api.Pod, []watch.Event) { { Type: watch.Deleted, Object: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "test", ResourceVersion: "12", diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/label.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/label.go index 58da6e35..bb0173d9 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/label.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/label.go @@ -26,10 +26,11 @@ import ( "github.com/golang/glog" "github.com/spf13/cobra" "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" utilerrors "k8s.io/apimachinery/pkg/util/errors" "k8s.io/apimachinery/pkg/util/validation" - "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/kubectl" "k8s.io/kubernetes/pkg/kubectl/cmd/templates" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" @@ -260,7 +261,7 @@ func (o *LabelOptions) RunLabel(f cmdutil.Factory, cmd *cobra.Command) error { helper := resource.NewHelper(client, mapping) if createdPatch { - outputObj, err = helper.Patch(namespace, name, api.StrategicMergePatchType, patchBytes) + outputObj, err = helper.Patch(namespace, name, types.StrategicMergePatchType, patchBytes) } else { outputObj, err = helper.Replace(namespace, name, false, obj) } @@ -276,7 +277,7 @@ func (o *LabelOptions) RunLabel(f cmdutil.Factory, cmd *cobra.Command) error { }) } -func validateNoOverwrites(accessor meta.Object, labels map[string]string) error { +func validateNoOverwrites(accessor metav1.Object, labels map[string]string) error { allErrs := []error{} for key := range labels { if value, found := accessor.GetLabels()[key]; found { diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/label_test.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/label_test.go index 9da1b3b8..56d96198 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/label_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/label_test.go @@ -23,9 +23,10 @@ import ( "strings" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/restclient/fake" cmdtesting "k8s.io/kubernetes/pkg/kubectl/cmd/testing" "k8s.io/kubernetes/pkg/kubectl/resource" @@ -33,13 +34,13 @@ import ( func TestValidateLabels(t *testing.T) { tests := []struct { - meta *api.ObjectMeta + meta *metav1.ObjectMeta labels map[string]string expectErr bool test string }{ { - meta: &api.ObjectMeta{ + meta: &metav1.ObjectMeta{ Labels: map[string]string{ "a": "b", "c": "d", @@ -53,7 +54,7 @@ func TestValidateLabels(t *testing.T) { expectErr: true, }, { - meta: &api.ObjectMeta{ + meta: &metav1.ObjectMeta{ Labels: map[string]string{ "a": "b", "c": "d", @@ -67,7 +68,7 @@ func TestValidateLabels(t *testing.T) { expectErr: true, }, { - meta: &api.ObjectMeta{ + meta: &metav1.ObjectMeta{ Labels: map[string]string{ "a": "b", "c": "d", @@ -80,7 +81,7 @@ func TestValidateLabels(t *testing.T) { test: "no overlap", }, { - meta: &api.ObjectMeta{}, + meta: &metav1.ObjectMeta{}, labels: map[string]string{ "b": "a", "d": "c", @@ -165,7 +166,7 @@ func TestLabelFunc(t *testing.T) { }{ { obj: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"a": "b"}, }, }, @@ -174,41 +175,41 @@ func TestLabelFunc(t *testing.T) { }, { obj: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"a": "b"}, }, }, labels: map[string]string{"a": "c"}, overwrite: true, expected: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"a": "c"}, }, }, }, { obj: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"a": "b"}, }, }, labels: map[string]string{"c": "d"}, expected: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"a": "b", "c": "d"}, }, }, }, { obj: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"a": "b"}, }, }, labels: map[string]string{"c": "d"}, version: "2", expected: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"a": "b", "c": "d"}, ResourceVersion: "2", }, @@ -216,28 +217,28 @@ func TestLabelFunc(t *testing.T) { }, { obj: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"a": "b"}, }, }, labels: map[string]string{}, remove: []string{"a"}, expected: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{}, }, }, }, { obj: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"a": "b", "c": "d"}, }, }, labels: map[string]string{"e": "f"}, remove: []string{"a"}, expected: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "c": "d", "e": "f", @@ -247,11 +248,11 @@ func TestLabelFunc(t *testing.T) { }, { obj: &api.Pod{ - ObjectMeta: api.ObjectMeta{}, + ObjectMeta: metav1.ObjectMeta{}, }, labels: map[string]string{"a": "b"}, expected: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"a": "b"}, }, }, diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/logs.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/logs.go index 8fb9b71c..2c418c33 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/logs.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/logs.go @@ -27,9 +27,9 @@ import ( "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/validation" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/kubectl/cmd/templates" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" "k8s.io/kubernetes/pkg/kubectl/resource" diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/logs_test.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/logs_test.go index 39970e65..776e0dee 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/logs_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/logs_test.go @@ -26,9 +26,10 @@ import ( "github.com/spf13/cobra" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/restclient/fake" cmdtesting "k8s.io/kubernetes/pkg/kubectl/cmd/testing" ) @@ -82,7 +83,7 @@ func TestLog(t *testing.T) { func testPod() *api.Pod { return &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "test", ResourceVersion: "10"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "test", ResourceVersion: "10"}, Spec: api.PodSpec{ RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/patch.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/patch.go index 2741ec88..2e8b06dc 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/patch.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/patch.go @@ -27,6 +27,7 @@ import ( "github.com/spf13/cobra" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/yaml" "k8s.io/kubernetes/pkg/api" @@ -37,7 +38,7 @@ import ( "k8s.io/kubernetes/pkg/util/strategicpatch" ) -var patchTypes = map[string]api.PatchType{"json": api.JSONPatchType, "merge": api.MergePatchType, "strategic": api.StrategicMergePatchType} +var patchTypes = map[string]types.PatchType{"json": types.JSONPatchType, "merge": types.MergePatchType, "strategic": types.StrategicMergePatchType} // PatchOptions is the start of the data required to perform the operation. As new fields are added, add them here instead of // referencing the cmd.Flags() @@ -124,7 +125,7 @@ func RunPatch(f cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []strin return err } - patchType := api.StrategicMergePatchType + patchType := types.StrategicMergePatchType patchTypeString := strings.ToLower(cmdutil.GetFlagString(cmd, "type")) if len(patchTypeString) != 0 { ok := false @@ -182,7 +183,7 @@ func RunPatch(f cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []strin // record hint is likely to be invalid anyway, so avoid the bad hint patch, err := cmdutil.ChangeResourcePatch(info, f.Command()) if err == nil { - helper.Patch(info.Namespace, info.Name, api.StrategicMergePatchType, patch) + helper.Patch(info.Namespace, info.Name, types.StrategicMergePatchType, patch) } } count++ @@ -247,20 +248,20 @@ func RunPatch(f cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []strin return nil } -func getPatchedJSON(patchType api.PatchType, originalJS, patchJS []byte, obj runtime.Object) ([]byte, error) { +func getPatchedJSON(patchType types.PatchType, originalJS, patchJS []byte, obj runtime.Object) ([]byte, error) { switch patchType { - case api.JSONPatchType: + case types.JSONPatchType: patchObj, err := jsonpatch.DecodePatch(patchJS) if err != nil { return nil, err } return patchObj.Apply(originalJS) - case api.MergePatchType: + case types.MergePatchType: return jsonpatch.MergePatch(originalJS, patchJS) - case api.StrategicMergePatchType: - return strategicpatch.StrategicMergePatchData(originalJS, patchJS, obj) + case types.StrategicMergePatchType: + return strategicpatch.StrategicMergePatch(originalJS, patchJS, obj) default: // only here as a safety net - go-restful filters content-type diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/portforward.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/portforward.go index 59177717..d78f51f9 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/portforward.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/portforward.go @@ -26,9 +26,9 @@ import ( "github.com/spf13/cobra" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" coreclient "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/unversioned/portforward" "k8s.io/kubernetes/pkg/client/unversioned/remotecommand" "k8s.io/kubernetes/pkg/kubectl/cmd/templates" diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/rollout/BUILD b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/rollout/BUILD index c175e524..50fb03f7 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/rollout/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/rollout/BUILD @@ -19,7 +19,6 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//pkg/kubectl:go_default_library", "//pkg/kubectl/cmd/set:go_default_library", "//pkg/kubectl/cmd/templates:go_default_library", @@ -30,6 +29,7 @@ go_library( "//vendor:github.com/spf13/cobra", "//vendor:k8s.io/apimachinery/pkg/api/meta", "//vendor:k8s.io/apimachinery/pkg/runtime", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/errors", "//vendor:k8s.io/apimachinery/pkg/watch", ], diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/rollout/rollout_pause.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/rollout/rollout_pause.go index 6e820a02..66f6d6a6 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/rollout/rollout_pause.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/rollout/rollout_pause.go @@ -24,8 +24,8 @@ import ( "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" utilerrors "k8s.io/apimachinery/pkg/util/errors" - "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/kubectl" "k8s.io/kubernetes/pkg/kubectl/cmd/set" "k8s.io/kubernetes/pkg/kubectl/cmd/templates" @@ -144,7 +144,7 @@ func (o PauseConfig) RunPause() error { continue } - obj, err := resource.NewHelper(info.Client, info.Mapping).Patch(info.Namespace, info.Name, api.StrategicMergePatchType, patch.Patch) + obj, err := resource.NewHelper(info.Client, info.Mapping).Patch(info.Namespace, info.Name, types.StrategicMergePatchType, patch.Patch) if err != nil { allErrs = append(allErrs, fmt.Errorf("failed to patch: %v", err)) continue diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/rollout/rollout_resume.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/rollout/rollout_resume.go index ff83ea56..87577c00 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/rollout/rollout_resume.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/rollout/rollout_resume.go @@ -24,8 +24,8 @@ import ( "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" utilerrors "k8s.io/apimachinery/pkg/util/errors" - "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/kubectl" "k8s.io/kubernetes/pkg/kubectl/cmd/set" "k8s.io/kubernetes/pkg/kubectl/cmd/templates" @@ -149,7 +149,7 @@ func (o ResumeConfig) RunResume() error { continue } - obj, err := resource.NewHelper(info.Client, info.Mapping).Patch(info.Namespace, info.Name, api.StrategicMergePatchType, patch.Patch) + obj, err := resource.NewHelper(info.Client, info.Mapping).Patch(info.Namespace, info.Name, types.StrategicMergePatchType, patch.Patch) if err != nil { allErrs = append(allErrs, fmt.Errorf("failed to patch: %v", err)) continue diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/run.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/run.go index d12a37a8..db4fd7d8 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/run.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/run.go @@ -377,7 +377,7 @@ func contains(resourcesList []*metav1.APIResourceList, resource schema.GroupVers // waitForPod watches the given pod until the exitCondition is true func waitForPod(podClient coreclient.PodsGetter, ns, name string, exitCondition watch.ConditionFunc) (*api.Pod, error) { - w, err := podClient.Pods(ns).Watch(api.SingleObject(api.ObjectMeta{Name: name})) + w, err := podClient.Pods(ns).Watch(metav1.SingleObject(metav1.ObjectMeta{Name: name})) if err != nil { return nil, err } diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/run_test.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/run_test.go index 1495797f..146690fc 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/run_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/run_test.go @@ -28,10 +28,11 @@ import ( "github.com/spf13/cobra" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/restclient/fake" cmdtesting "k8s.io/kubernetes/pkg/kubectl/cmd/testing" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" @@ -196,7 +197,7 @@ func TestGenerateService(t *testing.T) { expectErr: false, name: "basic", service: api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Spec: api.ServiceSpec{ @@ -227,7 +228,7 @@ func TestGenerateService(t *testing.T) { expectErr: false, name: "custom labels", service: api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{"app": "bar"}, }, diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/scale.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/scale.go index c7f266b7..ff34ec50 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/scale.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/scale.go @@ -23,7 +23,7 @@ import ( "github.com/spf13/cobra" - "k8s.io/kubernetes/pkg/api" + "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/kubectl" "k8s.io/kubernetes/pkg/kubectl/cmd/templates" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" @@ -174,7 +174,7 @@ func RunScale(f cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []strin return err } helper := resource.NewHelper(client, mapping) - _, err = helper.Patch(info.Namespace, info.Name, api.StrategicMergePatchType, patchBytes) + _, err = helper.Patch(info.Namespace, info.Name, types.StrategicMergePatchType, patchBytes) if err != nil { return err } diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/set/BUILD b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/set/BUILD index 879969f1..a34bce1e 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/set/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/set/BUILD @@ -30,6 +30,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/api/meta", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/errors", "//vendor:k8s.io/apimachinery/pkg/util/validation", ], @@ -51,7 +52,6 @@ go_test( "//pkg/api:go_default_library", "//pkg/apis/batch:go_default_library", "//pkg/apis/extensions:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/restclient/fake:go_default_library", "//pkg/kubectl/cmd/testing:go_default_library", "//pkg/kubectl/cmd/util:go_default_library", @@ -60,6 +60,7 @@ go_test( "//vendor:github.com/stretchr/testify/assert", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/set/set_image.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/set/set_image.go index 6e4a78d7..b079418e 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/set/set_image.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/set/set_image.go @@ -23,6 +23,7 @@ import ( "github.com/spf13/cobra" "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" utilerrors "k8s.io/apimachinery/pkg/util/errors" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/kubectl/cmd/templates" @@ -228,7 +229,7 @@ func (o *ImageOptions) Run() error { } // patch the change - obj, err := resource.NewHelper(info.Client, info.Mapping).Patch(info.Namespace, info.Name, api.StrategicMergePatchType, patch.Patch) + obj, err := resource.NewHelper(info.Client, info.Mapping).Patch(info.Namespace, info.Name, types.StrategicMergePatchType, patch.Patch) if err != nil { allErrs = append(allErrs, fmt.Errorf("failed to patch image update to pod template: %v\n", err)) continue @@ -238,7 +239,7 @@ func (o *ImageOptions) Run() error { // record this change (for rollout history) if o.Record || cmdutil.ContainsChangeCause(info) { if patch, err := cmdutil.ChangeResourcePatch(info, o.ChangeCause); err == nil { - if obj, err = resource.NewHelper(info.Client, info.Mapping).Patch(info.Namespace, info.Name, api.StrategicMergePatchType, patch); err != nil { + if obj, err = resource.NewHelper(info.Client, info.Mapping).Patch(info.Namespace, info.Name, types.StrategicMergePatchType, patch); err != nil { fmt.Fprintf(o.Err, "WARNING: changes to %s/%s can't be recorded: %v\n", info.Mapping.Resource, info.Name, err) } } diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/set/set_image_test.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/set/set_image_test.go index 8a720c9a..6b6e949a 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/set/set_image_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/set/set_image_test.go @@ -22,8 +22,8 @@ import ( "strings" "testing" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/restclient/fake" cmdtesting "k8s.io/kubernetes/pkg/kubectl/cmd/testing" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/set/set_resources.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/set/set_resources.go index 4233306b..85e59500 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/set/set_resources.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/set/set_resources.go @@ -26,6 +26,7 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" utilerrors "k8s.io/apimachinery/pkg/util/errors" "k8s.io/kubernetes/pkg/kubectl" "k8s.io/kubernetes/pkg/kubectl/cmd/templates" @@ -97,7 +98,7 @@ func NewCmdResources(f cmdutil.Factory, out io.Writer, errOut io.Writer) *cobra. cmd := &cobra.Command{ Use: "resources (-f FILENAME | TYPE NAME) ([--limits=LIMITS & --requests=REQUESTS]", - Short: "update resource requests/limits on objects with pod templates", + Short: "Update resource requests/limits on objects with pod templates", Long: fmt.Sprintf(resources_long, strings.Join(resourceTypesWithPodTemplate, ", ")), Example: resources_example, Run: func(cmd *cobra.Command, args []string) { @@ -223,7 +224,7 @@ func (o *ResourcesOptions) Run() error { return o.PrintObject(o.Cmd, o.Mapper, info.Object, o.Out) } - obj, err := resource.NewHelper(info.Client, info.Mapping).Patch(info.Namespace, info.Name, api.StrategicMergePatchType, patch.Patch) + obj, err := resource.NewHelper(info.Client, info.Mapping).Patch(info.Namespace, info.Name, types.StrategicMergePatchType, patch.Patch) if err != nil { allErrs = append(allErrs, fmt.Errorf("failed to patch limit update to pod template %v\n", err)) continue diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/set/set_selector.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/set/set_selector.go index 5ab92f77..2d2f339a 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/set/set_selector.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/set/set_selector.go @@ -25,6 +25,7 @@ import ( "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/validation" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/kubectl/cmd/templates" @@ -175,7 +176,7 @@ func (o *SelectorOptions) RunSelector() error { return nil } - patched, err := resource.NewHelper(info.Client, info.Mapping).Patch(info.Namespace, info.Name, api.StrategicMergePatchType, patch.Patch) + patched, err := resource.NewHelper(info.Client, info.Mapping).Patch(info.Namespace, info.Name, types.StrategicMergePatchType, patch.Patch) if err != nil { return err } diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/taint.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/taint.go index ba743de9..a174bd23 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/taint.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/taint.go @@ -26,11 +26,13 @@ import ( "github.com/golang/glog" "github.com/spf13/cobra" "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" utilerrors "k8s.io/apimachinery/pkg/util/errors" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/validation" - "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/kubectl" "k8s.io/kubernetes/pkg/kubectl/cmd/templates" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" @@ -42,8 +44,8 @@ import ( // TaintOptions have the data required to perform the taint operation type TaintOptions struct { resources []string - taintsToAdd []api.Taint - taintsToRemove []api.Taint + taintsToAdd []v1.Taint + taintsToRemove []v1.Taint builder *resource.Builder selector string overwrite bool @@ -110,8 +112,8 @@ func NewCmdTaint(f cmdutil.Factory, out io.Writer) *cobra.Command { return cmd } -func deleteTaint(taints []api.Taint, taintToDelete api.Taint) ([]api.Taint, error) { - newTaints := []api.Taint{} +func deleteTaint(taints []v1.Taint, taintToDelete v1.Taint) ([]v1.Taint, error) { + newTaints := []v1.Taint{} found := false for _, taint := range taints { if taint.Key == taintToDelete.Key && @@ -130,14 +132,14 @@ func deleteTaint(taints []api.Taint, taintToDelete api.Taint) ([]api.Taint, erro // reorganizeTaints returns the updated set of taints, taking into account old taints that were not updated, // old taints that were updated, old taints that were deleted, and new taints. -func reorganizeTaints(accessor meta.Object, overwrite bool, taintsToAdd []api.Taint, taintsToRemove []api.Taint) ([]api.Taint, error) { - newTaints := append([]api.Taint{}, taintsToAdd...) +func reorganizeTaints(accessor metav1.Object, overwrite bool, taintsToAdd []v1.Taint, taintsToRemove []v1.Taint) ([]v1.Taint, error) { + newTaints := append([]v1.Taint{}, taintsToAdd...) - var oldTaints []api.Taint + var oldTaints []v1.Taint var err error annotations := accessor.GetAnnotations() if annotations != nil { - if oldTaints, err = api.GetTaintsFromNodeAnnotations(annotations); err != nil { + if oldTaints, err = v1.GetTaintsFromNodeAnnotations(annotations); err != nil { return nil, err } } @@ -166,9 +168,9 @@ func reorganizeTaints(accessor meta.Object, overwrite bool, taintsToAdd []api.Ta return newTaints, utilerrors.NewAggregate(allErrs) } -func parseTaints(spec []string) ([]api.Taint, []api.Taint, error) { - var taints, taintsToRemove []api.Taint - uniqueTaints := map[api.TaintEffect]sets.String{} +func parseTaints(spec []string) ([]v1.Taint, []v1.Taint, error) { + var taints, taintsToRemove []v1.Taint + uniqueTaints := map[v1.TaintEffect]sets.String{} for _, taintSpec := range spec { if strings.Index(taintSpec, "=") != -1 && strings.Index(taintSpec, ":") != -1 { @@ -189,13 +191,13 @@ func parseTaints(spec []string) ([]api.Taint, []api.Taint, error) { taints = append(taints, newTaint) } else if strings.HasSuffix(taintSpec, "-") { taintKey := taintSpec[:len(taintSpec)-1] - var effect api.TaintEffect + var effect v1.TaintEffect if strings.Index(taintKey, ":") != -1 { parts := strings.Split(taintKey, ":") taintKey = parts[0] - effect = api.TaintEffect(parts[1]) + effect = v1.TaintEffect(parts[1]) } - taintsToRemove = append(taintsToRemove, api.Taint{Key: taintKey, Effect: effect}) + taintsToRemove = append(taintsToRemove, v1.Taint{Key: taintKey, Effect: effect}) } else { return nil, nil, fmt.Errorf("unknown taint spec: %v", taintSpec) } @@ -341,7 +343,7 @@ func (o TaintOptions) RunTaint() error { var outputObj runtime.Object if createdPatch { - outputObj, err = helper.Patch(namespace, name, api.StrategicMergePatchType, patchBytes) + outputObj, err = helper.Patch(namespace, name, types.StrategicMergePatchType, patchBytes) } else { outputObj, err = helper.Replace(namespace, name, false, obj) } @@ -361,14 +363,14 @@ func (o TaintOptions) RunTaint() error { } // validateNoTaintOverwrites validates that when overwrite is false, to-be-updated taints don't exist in the node taint list (yet) -func validateNoTaintOverwrites(accessor meta.Object, taints []api.Taint) error { +func validateNoTaintOverwrites(accessor metav1.Object, taints []v1.Taint) error { annotations := accessor.GetAnnotations() if annotations == nil { return nil } allErrs := []error{} - oldTaints, err := api.GetTaintsFromNodeAnnotations(annotations) + oldTaints, err := v1.GetTaintsFromNodeAnnotations(annotations) if err != nil { allErrs = append(allErrs, err) return utilerrors.NewAggregate(allErrs) @@ -410,7 +412,7 @@ func (o TaintOptions) updateTaints(obj runtime.Object) error { if err != nil { return err } - annotations[api.TaintsAnnotationKey] = string(taintsData) + annotations[v1.TaintsAnnotationKey] = string(taintsData) accessor.SetAnnotations(annotations) return nil diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/taint_test.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/taint_test.go index 327a93a8..3271b575 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/taint_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/taint_test.go @@ -35,17 +35,17 @@ import ( "k8s.io/kubernetes/pkg/util/strategicpatch" ) -func generateNodeAndTaintedNode(oldTaints []api.Taint, newTaints []api.Taint) (*api.Node, *api.Node) { +func generateNodeAndTaintedNode(oldTaints []v1.Taint, newTaints []v1.Taint) (*api.Node, *api.Node) { var taintedNode *api.Node oldTaintsData, _ := json.Marshal(oldTaints) // Create a node. node := &api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node-name", CreationTimestamp: metav1.Time{Time: time.Now()}, Annotations: map[string]string{ - api.TaintsAnnotationKey: string(oldTaintsData), + v1.TaintsAnnotationKey: string(oldTaintsData), }, }, Spec: api.NodeSpec{ @@ -59,18 +59,18 @@ func generateNodeAndTaintedNode(oldTaints []api.Taint, newTaints []api.Taint) (* // A copy of the same node, but tainted. taintedNode = clone.(*api.Node) taintedNode.Annotations = map[string]string{ - api.TaintsAnnotationKey: string(newTaintsData), + v1.TaintsAnnotationKey: string(newTaintsData), } return node, taintedNode } func AnnotationsHaveEqualTaints(annotationA map[string]string, annotationB map[string]string) bool { - taintsA, err := api.GetTaintsFromNodeAnnotations(annotationA) + taintsA, err := v1.GetTaintsFromNodeAnnotations(annotationA) if err != nil { return false } - taintsB, err := api.GetTaintsFromNodeAnnotations(annotationB) + taintsB, err := v1.GetTaintsFromNodeAnnotations(annotationB) if err != nil { return false } @@ -97,8 +97,8 @@ func AnnotationsHaveEqualTaints(annotationA map[string]string, annotationB map[s func TestTaint(t *testing.T) { tests := []struct { description string - oldTaints []api.Taint - newTaints []api.Taint + oldTaints []v1.Taint + newTaints []v1.Taint args []string expectFatal bool expectTaint bool @@ -106,7 +106,7 @@ func TestTaint(t *testing.T) { // success cases { description: "taints a node with effect NoSchedule", - newTaints: []api.Taint{{ + newTaints: []v1.Taint{{ Key: "foo", Value: "bar", Effect: "NoSchedule", @@ -117,7 +117,7 @@ func TestTaint(t *testing.T) { }, { description: "taints a node with effect PreferNoSchedule", - newTaints: []api.Taint{{ + newTaints: []v1.Taint{{ Key: "foo", Value: "bar", Effect: "PreferNoSchedule", @@ -128,12 +128,12 @@ func TestTaint(t *testing.T) { }, { description: "update an existing taint on the node, change the value from bar to barz", - oldTaints: []api.Taint{{ + oldTaints: []v1.Taint{{ Key: "foo", Value: "bar", Effect: "NoSchedule", }}, - newTaints: []api.Taint{{ + newTaints: []v1.Taint{{ Key: "foo", Value: "barz", Effect: "NoSchedule", @@ -144,7 +144,7 @@ func TestTaint(t *testing.T) { }, { description: "taints a node with two taints", - newTaints: []api.Taint{{ + newTaints: []v1.Taint{{ Key: "dedicated", Value: "namespaceA", Effect: "NoSchedule", @@ -159,7 +159,7 @@ func TestTaint(t *testing.T) { }, { description: "node has two taints with the same key but different effect, remove one of them by indicating exact key and effect", - oldTaints: []api.Taint{{ + oldTaints: []v1.Taint{{ Key: "dedicated", Value: "namespaceA", Effect: "NoSchedule", @@ -168,7 +168,7 @@ func TestTaint(t *testing.T) { Value: "namespaceA", Effect: "PreferNoSchedule", }}, - newTaints: []api.Taint{{ + newTaints: []v1.Taint{{ Key: "dedicated", Value: "namespaceA", Effect: "PreferNoSchedule", @@ -179,7 +179,7 @@ func TestTaint(t *testing.T) { }, { description: "node has two taints with the same key but different effect, remove all of them with wildcard", - oldTaints: []api.Taint{{ + oldTaints: []v1.Taint{{ Key: "dedicated", Value: "namespaceA", Effect: "NoSchedule", @@ -188,14 +188,14 @@ func TestTaint(t *testing.T) { Value: "namespaceA", Effect: "PreferNoSchedule", }}, - newTaints: []api.Taint{}, + newTaints: []v1.Taint{}, args: []string{"node", "node-name", "dedicated-"}, expectFatal: false, expectTaint: true, }, { description: "node has two taints, update one of them and remove the other", - oldTaints: []api.Taint{{ + oldTaints: []v1.Taint{{ Key: "dedicated", Value: "namespaceA", Effect: "NoSchedule", @@ -204,7 +204,7 @@ func TestTaint(t *testing.T) { Value: "bar", Effect: "PreferNoSchedule", }}, - newTaints: []api.Taint{{ + newTaints: []v1.Taint{{ Key: "foo", Value: "barz", Effect: "PreferNoSchedule", @@ -235,12 +235,12 @@ func TestTaint(t *testing.T) { }, { description: "can't update existing taint on the node, since 'overwrite' flag is not set", - oldTaints: []api.Taint{{ + oldTaints: []v1.Taint{{ Key: "foo", Value: "bar", Effect: "NoSchedule", }}, - newTaints: []api.Taint{{ + newTaints: []v1.Taint{{ Key: "foo", Value: "bar", Effect: "NoSchedule", diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/testing/BUILD b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/testing/BUILD index 86d1bca4..73431a58 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/testing/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/testing/BUILD @@ -17,7 +17,6 @@ go_library( "//pkg/api/testapi:go_default_library", "//pkg/api/validation:go_default_library", "//pkg/client/clientset_generated/internalclientset:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/restclient/fake:go_default_library", "//pkg/client/typed/discovery:go_default_library", "//pkg/kubectl:go_default_library", @@ -31,6 +30,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/runtime/serializer", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/testing/fake.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/testing/fake.go index 16aab416..895c2fef 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/testing/fake.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/testing/fake.go @@ -30,12 +30,12 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/runtime/serializer" + restclient "k8s.io/client-go/rest" fedclientset "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" "k8s.io/kubernetes/pkg/api/validation" "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/restclient/fake" "k8s.io/kubernetes/pkg/client/typed/discovery" "k8s.io/kubernetes/pkg/kubectl" diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/top_node.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/top_node.go index 6e47a672..ae0ed5a1 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/top_node.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/top_node.go @@ -151,8 +151,8 @@ func (o TopNodeOptions) RunTopNode() error { } nodes = append(nodes, *node) } else { - nodeList, err := o.NodeClient.Nodes().List(api.ListOptions{ - LabelSelector: selector, + nodeList, err := o.NodeClient.Nodes().List(metav1.ListOptions{ + LabelSelector: selector.String(), }) if err != nil { return err diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/top_pod.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/top_pod.go index fa905d23..84954796 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/top_pod.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/top_pod.go @@ -164,8 +164,8 @@ func verifyEmptyMetrics(o TopPodOptions, selector labels.Selector) error { return err } } else { - pods, err := o.PodClient.Pods(o.Namespace).List(api.ListOptions{ - LabelSelector: selector, + pods, err := o.PodClient.Pods(o.Namespace).List(metav1.ListOptions{ + LabelSelector: selector.String(), }) if err != nil { return err diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/top_test.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/top_test.go index 6b3a01a5..3ba7d88e 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/top_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/top_test.go @@ -92,7 +92,7 @@ func testNodeMetricsData() (*metricsapi.NodeMetricsList, *api.NodeList) { }, Items: []api.Node{ { - ObjectMeta: api.ObjectMeta{Name: "node1", ResourceVersion: "10"}, + ObjectMeta: metav1.ObjectMeta{Name: "node1", ResourceVersion: "10"}, Status: api.NodeStatus{ Allocatable: api.ResourceList{ api.ResourceCPU: *resource.NewMilliQuantity(10, resource.DecimalSI), @@ -102,7 +102,7 @@ func testNodeMetricsData() (*metricsapi.NodeMetricsList, *api.NodeList) { }, }, { - ObjectMeta: api.ObjectMeta{Name: "node2", ResourceVersion: "11"}, + ObjectMeta: metav1.ObjectMeta{Name: "node2", ResourceVersion: "11"}, Status: api.NodeStatus{ Allocatable: api.ResourceList{ api.ResourceCPU: *resource.NewMilliQuantity(50, resource.DecimalSI), diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/util/BUILD b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/util/BUILD index 3c86b204..6d7e7a8b 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/util/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/util/BUILD @@ -34,20 +34,16 @@ go_library( "//pkg/apis/extensions:go_default_library", "//pkg/client/clientset_generated/internalclientset:go_default_library", "//pkg/client/clientset_generated/internalclientset/typed/core/internalversion:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/typed/discovery:go_default_library", "//pkg/client/typed/dynamic:go_default_library", "//pkg/client/unversioned:go_default_library", - "//pkg/client/unversioned/clientcmd:go_default_library", "//pkg/controller:go_default_library", "//pkg/kubectl:go_default_library", "//pkg/kubectl/resource:go_default_library", "//pkg/registry/extensions/thirdpartyresourcedata:go_default_library", "//pkg/util/exec:go_default_library", "//pkg/util/flag:go_default_library", - "//pkg/util/homedir:go_default_library", "//pkg/util/strategicpatch:go_default_library", - "//pkg/version:go_default_library", "//vendor:github.com/emicklei/go-restful/swagger", "//vendor:github.com/evanphx/json-patch", "//vendor:github.com/golang/glog", @@ -63,7 +59,11 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/runtime/serializer/json", "//vendor:k8s.io/apimachinery/pkg/util/errors", "//vendor:k8s.io/apimachinery/pkg/util/sets", + "//vendor:k8s.io/apimachinery/pkg/version", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", + "//vendor:k8s.io/client-go/tools/clientcmd", + "//vendor:k8s.io/client-go/util/homedir", ], ) @@ -88,18 +88,14 @@ go_test( "//pkg/api/validation:go_default_library", "//pkg/apis/extensions:go_default_library", "//pkg/client/clientset_generated/internalclientset/fake:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/restclient/fake:go_default_library", "//pkg/client/testing/core:go_default_library", "//pkg/client/typed/discovery:go_default_library", - "//pkg/client/unversioned/clientcmd:go_default_library", - "//pkg/client/unversioned/clientcmd/api:go_default_library", "//pkg/controller:go_default_library", "//pkg/kubectl:go_default_library", "//pkg/kubectl/resource:go_default_library", "//pkg/util/exec:go_default_library", "//pkg/util/flag:go_default_library", - "//pkg/version:go_default_library", "//vendor:github.com/emicklei/go-restful/swagger", "//vendor:github.com/stretchr/testify/assert", "//vendor:k8s.io/apimachinery/pkg/api/errors", @@ -109,7 +105,11 @@ go_test( "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/util/validation/field", + "//vendor:k8s.io/apimachinery/pkg/version", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", + "//vendor:k8s.io/client-go/tools/clientcmd", + "//vendor:k8s.io/client-go/tools/clientcmd/api", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/util/cached_discovery.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/util/cached_discovery.go index 1a781caa..62c5dfaf 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/util/cached_discovery.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/util/cached_discovery.go @@ -30,10 +30,10 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/version" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/typed/discovery" - "k8s.io/kubernetes/pkg/version" ) // CachedDiscoveryClient implements the functions that discovery server-supported API groups, diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/util/cached_discovery_test.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/util/cached_discovery_test.go index ff1caa21..089a8137 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/util/cached_discovery_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/util/cached_discovery_test.go @@ -28,10 +28,10 @@ import ( "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/client/restclient" + "k8s.io/apimachinery/pkg/version" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/client/restclient/fake" "k8s.io/kubernetes/pkg/client/typed/discovery" - "k8s.io/kubernetes/pkg/version" ) func TestCachedDiscoveryClient_Fresh(t *testing.T) { diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/util/clientcache.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/util/clientcache.go index 70d47fd6..5604bbf1 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/util/clientcache.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/util/clientcache.go @@ -20,13 +20,13 @@ import ( "sync" "k8s.io/apimachinery/pkg/runtime/schema" + restclient "k8s.io/client-go/rest" + "k8s.io/client-go/tools/clientcmd" fedclientset "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/typed/discovery" oldclient "k8s.io/kubernetes/pkg/client/unversioned" - "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" ) func NewClientCache(loader clientcmd.ClientConfig, discoveryClientFactory DiscoveryClientFactory) *ClientCache { diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/util/factory.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/util/factory.go index d9f6b80f..42225c56 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/util/factory.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/util/factory.go @@ -34,20 +34,21 @@ import ( "github.com/spf13/pflag" "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/runtime/serializer/json" "k8s.io/apimachinery/pkg/watch" + restclient "k8s.io/client-go/rest" + "k8s.io/client-go/tools/clientcmd" fedclientset "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/api/validation" "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" coreclient "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/typed/discovery" - "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" "k8s.io/kubernetes/pkg/kubectl" "k8s.io/kubernetes/pkg/kubectl/resource" "k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresourcedata" @@ -279,7 +280,7 @@ func NewFactory(optionalClientConfig clientcmd.ClientConfig) Factory { // GetFirstPod returns a pod matching the namespace and label selector // and the number of all pods that match the label selector. func GetFirstPod(client coreclient.PodsGetter, namespace string, selector labels.Selector, timeout time.Duration, sortBy func([]*v1.Pod) sort.Interface) (*api.Pod, int, error) { - options := api.ListOptions{LabelSelector: selector} + options := metav1.ListOptions{LabelSelector: selector.String()} podList, err := client.Pods(namespace).List(options) if err != nil { diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/util/factory_client_access.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/util/factory_client_access.go index a1b57e64..a8358902 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/util/factory_client_access.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/util/factory_client_access.go @@ -35,6 +35,9 @@ import ( "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" + restclient "k8s.io/client-go/rest" + "k8s.io/client-go/tools/clientcmd" + "k8s.io/client-go/util/homedir" fedclientset "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/service" @@ -42,14 +45,11 @@ import ( "k8s.io/kubernetes/pkg/apis/batch" "k8s.io/kubernetes/pkg/apis/extensions" "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/typed/discovery" - "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" "k8s.io/kubernetes/pkg/kubectl" "k8s.io/kubernetes/pkg/kubectl/resource" "k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresourcedata" utilflag "k8s.io/kubernetes/pkg/util/flag" - "k8s.io/kubernetes/pkg/util/homedir" ) type ring0Factory struct { diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/util/factory_object_mapping.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/util/factory_object_mapping.go index a8de9abf..f4c515dd 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/util/factory_object_mapping.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/util/factory_object_mapping.go @@ -34,13 +34,13 @@ import ( "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/federation/apis/federation" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/api/validation" "k8s.io/kubernetes/pkg/apis/batch" "k8s.io/kubernetes/pkg/apis/extensions" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/typed/discovery" "k8s.io/kubernetes/pkg/client/typed/dynamic" client "k8s.io/kubernetes/pkg/client/unversioned" diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/util/factory_test.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/util/factory_test.go index b4e6245c..7929e83a 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/util/factory_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/util/factory_test.go @@ -37,6 +37,8 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/tools/clientcmd" + clientcmdapi "k8s.io/client-go/tools/clientcmd/api" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" "k8s.io/kubernetes/pkg/api/v1" @@ -45,8 +47,6 @@ import ( "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/fake" manualfake "k8s.io/kubernetes/pkg/client/restclient/fake" testcore "k8s.io/kubernetes/pkg/client/testing/core" - "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" - clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api" "k8s.io/kubernetes/pkg/controller" "k8s.io/kubernetes/pkg/kubectl" "k8s.io/kubernetes/pkg/kubectl/resource" @@ -74,7 +74,7 @@ func TestPortsForObject(t *testing.T) { f := NewFactory(nil) pod := &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "baz", Namespace: "test", ResourceVersion: "12"}, + ObjectMeta: metav1.ObjectMeta{Name: "baz", Namespace: "test", ResourceVersion: "12"}, Spec: api.PodSpec{ Containers: []api.Container{ { @@ -111,7 +111,7 @@ func TestProtocolsForObject(t *testing.T) { f := NewFactory(nil) pod := &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "baz", Namespace: "test", ResourceVersion: "12"}, + ObjectMeta: metav1.ObjectMeta{Name: "baz", Namespace: "test", ResourceVersion: "12"}, Spec: api.PodSpec{ Containers: []api.Container{ { @@ -161,7 +161,7 @@ func TestLabelsForObject(t *testing.T) { { name: "successful re-use of labels", object: &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "baz", Namespace: "test", Labels: map[string]string{"svc": "test"}}, + ObjectMeta: metav1.ObjectMeta{Name: "baz", Namespace: "test", Labels: map[string]string{"svc": "test"}}, TypeMeta: metav1.TypeMeta{Kind: "Service", APIVersion: "v1"}, }, expected: "svc=test", @@ -170,7 +170,7 @@ func TestLabelsForObject(t *testing.T) { { name: "empty labels", object: &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "test", Labels: map[string]string{}}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "test", Labels: map[string]string{}}, TypeMeta: metav1.TypeMeta{Kind: "Service", APIVersion: "v1"}, }, expected: "", @@ -179,7 +179,7 @@ func TestLabelsForObject(t *testing.T) { { name: "nil labels", object: &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "zen", Namespace: "test", Labels: nil}, + ObjectMeta: metav1.ObjectMeta{Name: "zen", Namespace: "test", Labels: nil}, TypeMeta: metav1.TypeMeta{Kind: "Service", APIVersion: "v1"}, }, expected: "", @@ -437,9 +437,9 @@ func newPodList(count, isUnready, isUnhealthy int, labels map[string]string) *ap pods := []api.Pod{} for i := 0; i < count; i++ { newPod := api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: fmt.Sprintf("pod-%d", i+1), - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, CreationTimestamp: metav1.Date(2016, time.April, 1, 1, 0, i, 0, time.UTC), Labels: labels, }, @@ -483,9 +483,9 @@ func TestGetFirstPod(t *testing.T) { podList: newPodList(2, -1, -1, labelSet), sortBy: func(pods []*v1.Pod) sort.Interface { return controller.ByLogging(pods) }, expected: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod-1", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, CreationTimestamp: metav1.Date(2016, time.April, 1, 1, 0, 0, 0, time.UTC), Labels: map[string]string{"test": "selector"}, }, @@ -505,9 +505,9 @@ func TestGetFirstPod(t *testing.T) { podList: newPodList(2, -1, 1, labelSet), sortBy: func(pods []*v1.Pod) sort.Interface { return controller.ByLogging(pods) }, expected: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod-2", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, CreationTimestamp: metav1.Date(2016, time.April, 1, 1, 0, 1, 0, time.UTC), Labels: map[string]string{"test": "selector"}, }, @@ -528,9 +528,9 @@ func TestGetFirstPod(t *testing.T) { podList: newPodList(2, -1, -1, labelSet), sortBy: func(pods []*v1.Pod) sort.Interface { return sort.Reverse(controller.ActivePods(pods)) }, expected: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod-1", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, CreationTimestamp: metav1.Date(2016, time.April, 1, 1, 0, 0, 0, time.UTC), Labels: map[string]string{"test": "selector"}, }, @@ -552,9 +552,9 @@ func TestGetFirstPod(t *testing.T) { { Type: watch.Modified, Object: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod-1", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, CreationTimestamp: metav1.Date(2016, time.April, 1, 1, 0, 0, 0, time.UTC), Labels: map[string]string{"test": "selector"}, }, @@ -571,9 +571,9 @@ func TestGetFirstPod(t *testing.T) { }, sortBy: func(pods []*v1.Pod) sort.Interface { return sort.Reverse(controller.ActivePods(pods)) }, expected: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod-1", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, CreationTimestamp: metav1.Date(2016, time.April, 1, 1, 0, 0, 0, time.UTC), Labels: map[string]string{"test": "selector"}, }, @@ -607,7 +607,7 @@ func TestGetFirstPod(t *testing.T) { } selector := labels.Set(labelSet).AsSelector() - pod, numPods, err := GetFirstPod(fake.Core(), api.NamespaceDefault, selector, 1*time.Minute, test.sortBy) + pod, numPods, err := GetFirstPod(fake.Core(), metav1.NamespaceDefault, selector, 1*time.Minute, test.sortBy) pod.Spec.SecurityContext = nil if !test.expectedErr && err != nil { t.Errorf("%s: unexpected error: %v", test.name, err) diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/util/helpers.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/util/helpers.go index 737b6405..193512c9 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/util/helpers.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/util/helpers.go @@ -40,9 +40,9 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" utilerrors "k8s.io/apimachinery/pkg/util/errors" "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/client-go/tools/clientcmd" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/extensions" - "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" "k8s.io/kubernetes/pkg/kubectl" "k8s.io/kubernetes/pkg/kubectl/resource" utilexec "k8s.io/kubernetes/pkg/util/exec" @@ -733,3 +733,19 @@ func RequireNoArguments(c *cobra.Command, args []string) { CheckErr(UsageError(c, fmt.Sprintf(`unknown command %q`, strings.Join(args, " ")))) } } + +// OutputsRawFormat determines if a command's output format is machine parsable +// or returns false if it is human readable (name, wide, etc.) +func OutputsRawFormat(cmd *cobra.Command) bool { + output := GetFlagString(cmd, "output") + if output == "json" || + output == "yaml" || + output == "go-template" || + output == "go-template-file" || + output == "jsonpath" || + output == "jsonpath-file" { + return true + } + + return false +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/util/helpers_test.go b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/util/helpers_test.go index 3c4e748b..d8dae77f 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/util/helpers_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/util/helpers_test.go @@ -52,13 +52,13 @@ func TestMerge(t *testing.T) { { kind: "Pod", obj: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, }, fragment: fmt.Sprintf(`{ "apiVersion": "%s" }`, api.Registry.GroupOrDie(api.GroupName).GroupVersion.String()), expected: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Spec: apitesting.DeepEqualSafePodSpec(), @@ -69,7 +69,7 @@ func TestMerge(t *testing.T) { { kind: "Pod", obj: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Spec: api.PodSpec{ @@ -87,7 +87,7 @@ func TestMerge(t *testing.T) { }, fragment: fmt.Sprintf(`{ "apiVersion": "%s", "spec": { "containers": [ { "name": "c1", "image": "green-image" } ] } }`, api.Registry.GroupOrDie(api.GroupName).GroupVersion.String()), expected: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Spec: api.PodSpec{ @@ -107,13 +107,13 @@ func TestMerge(t *testing.T) { { kind: "Pod", obj: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, }, fragment: fmt.Sprintf(`{ "apiVersion": "%s", "spec": { "volumes": [ {"name": "v1"}, {"name": "v2"} ] } }`, api.Registry.GroupOrDie(api.GroupName).GroupVersion.String()), expected: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Spec: api.PodSpec{ @@ -131,6 +131,7 @@ func TestMerge(t *testing.T) { DNSPolicy: api.DNSClusterFirst, TerminationGracePeriodSeconds: &grace, SecurityContext: &api.PodSecurityContext{}, + SchedulerName: api.DefaultSchedulerName, }, }, }, @@ -337,7 +338,7 @@ func TestMaybeConvert(t *testing.T) { }{ { input: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, }, @@ -347,20 +348,20 @@ func TestMaybeConvert(t *testing.T) { APIVersion: "v1", Kind: "Pod", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, }, }, { input: &extensions.ThirdPartyResourceData{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Data: []byte("this is some data"), }, expected: &extensions.ThirdPartyResourceData{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Data: []byte("this is some data"), diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/configmap_test.go b/vendor/k8s.io/kubernetes/pkg/kubectl/configmap_test.go index 70c154b8..e7ae10a0 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/configmap_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/configmap_test.go @@ -20,6 +20,7 @@ import ( "reflect" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api" ) @@ -34,7 +35,7 @@ func TestConfigMapGenerate(t *testing.T) { "name": "foo", }, expected: &api.ConfigMap{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Data: map[string]string{}, @@ -47,7 +48,7 @@ func TestConfigMapGenerate(t *testing.T) { "type": "my-type", }, expected: &api.ConfigMap{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Data: map[string]string{}, @@ -60,7 +61,7 @@ func TestConfigMapGenerate(t *testing.T) { "from-literal": []string{"key1=value1", "key2=value2"}, }, expected: &api.ConfigMap{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Data: map[string]string{ @@ -97,7 +98,7 @@ func TestConfigMapGenerate(t *testing.T) { "from-literal": []string{"key1==value1"}, }, expected: &api.ConfigMap{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Data: map[string]string{ diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/custom_column_printer.go b/vendor/k8s.io/kubernetes/pkg/kubectl/custom_column_printer.go index 6cefff9f..114a375f 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/custom_column_printer.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/custom_column_printer.go @@ -28,7 +28,7 @@ import ( "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/runtime" - "k8s.io/kubernetes/pkg/util/jsonpath" + "k8s.io/client-go/util/jsonpath" ) const ( diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/custom_column_printer_test.go b/vendor/k8s.io/kubernetes/pkg/kubectl/custom_column_printer_test.go index 4d581f73..991a5c42 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/custom_column_printer_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/custom_column_printer_test.go @@ -237,7 +237,7 @@ func TestColumnPrint(t *testing.T) { FieldSpec: "{.metadata.name}", }, }, - obj: &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "foo"}}, + obj: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}, expectedOutput: `NAME foo `, @@ -251,8 +251,8 @@ foo }, obj: &v1.PodList{ Items: []v1.Pod{ - {ObjectMeta: v1.ObjectMeta{Name: "foo"}}, - {ObjectMeta: v1.ObjectMeta{Name: "bar"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "foo"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "bar"}}, }, }, expectedOutput: `NAME @@ -271,7 +271,7 @@ bar FieldSpec: "{.apiVersion}", }, }, - obj: &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "foo"}, TypeMeta: metav1.TypeMeta{APIVersion: "baz"}}, + obj: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}, TypeMeta: metav1.TypeMeta{APIVersion: "baz"}}, expectedOutput: `NAME API_VERSION foo baz `, diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/deployment.go b/vendor/k8s.io/kubernetes/pkg/kubectl/deployment.go index f2c4b237..8b54ce63 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/deployment.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/deployment.go @@ -84,7 +84,7 @@ func (s *DeploymentBasicGeneratorV1) StructuredGenerate() (runtime.Object, error labels["app"] = s.Name selector := metav1.LabelSelector{MatchLabels: labels} deployment := extensions.Deployment{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: s.Name, Labels: labels, }, @@ -92,7 +92,7 @@ func (s *DeploymentBasicGeneratorV1) StructuredGenerate() (runtime.Object, error Replicas: 1, Selector: &selector, Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: labels, }, Spec: podSpec, diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/deployment_test.go b/vendor/k8s.io/kubernetes/pkg/kubectl/deployment_test.go index f477f07c..db010ca2 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/deployment_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/deployment_test.go @@ -37,7 +37,7 @@ func TestDeploymentGenerate(t *testing.T) { "image": []string{"abc/app:v4"}, }, expected: &extensions.Deployment{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{"app": "foo"}, }, @@ -45,7 +45,7 @@ func TestDeploymentGenerate(t *testing.T) { Replicas: 1, Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"app": "foo"}}, Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"app": "foo"}, }, Spec: api.PodSpec{ @@ -62,7 +62,7 @@ func TestDeploymentGenerate(t *testing.T) { "image": []string{"abc/app:v4", "zyx/ape"}, }, expected: &extensions.Deployment{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{"app": "foo"}, }, @@ -70,7 +70,7 @@ func TestDeploymentGenerate(t *testing.T) { Replicas: 1, Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"app": "foo"}}, Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"app": "foo"}, }, Spec: api.PodSpec{ diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/describe.go b/vendor/k8s.io/kubernetes/pkg/kubectl/describe.go index 3c2fc5cf..0b9cd3be 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/describe.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/describe.go @@ -30,6 +30,7 @@ import ( "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" @@ -39,6 +40,7 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/events" "k8s.io/kubernetes/pkg/api/resource" + "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/apis/apps" "k8s.io/kubernetes/pkg/apis/autoscaling" "k8s.io/kubernetes/pkg/apis/batch" @@ -54,7 +56,6 @@ import ( extensionsclient "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion" deploymentutil "k8s.io/kubernetes/pkg/controller/deployment/util" "k8s.io/kubernetes/pkg/fieldpath" - "k8s.io/kubernetes/pkg/fields" "k8s.io/kubernetes/pkg/util/intstr" "github.com/golang/glog" @@ -201,7 +202,7 @@ func (d *NamespaceDescriber) Describe(namespace, name string, describerSettings if err != nil { return "", err } - resourceQuotaList, err := d.Core().ResourceQuotas(name).List(api.ListOptions{}) + resourceQuotaList, err := d.Core().ResourceQuotas(name).List(metav1.ListOptions{}) if err != nil { if errors.IsNotFound(err) { // Server does not support resource quotas. @@ -211,7 +212,7 @@ func (d *NamespaceDescriber) Describe(namespace, name string, describerSettings return "", err } } - limitRangeList, err := d.Core().LimitRanges(name).List(api.ListOptions{}) + limitRangeList, err := d.Core().LimitRanges(name).List(metav1.ListOptions{}) if err != nil { if errors.IsNotFound(err) { // Server does not support limit ranges. @@ -471,7 +472,7 @@ func (d *PodDescriber) Describe(namespace, name string, describerSettings Descri if describerSettings.ShowEvents { eventsInterface := d.Core().Events(namespace) selector := eventsInterface.GetFieldSelector(&name, &namespace, nil, nil) - options := api.ListOptions{FieldSelector: selector} + options := metav1.ListOptions{FieldSelector: selector.String()} events, err2 := eventsInterface.List(options) if describerSettings.ShowEvents && err2 == nil && len(events.Items) > 0 { return tabbedString(func(out io.Writer) error { @@ -649,13 +650,19 @@ func printGitRepoVolumeSource(git *api.GitRepoVolumeSource, w *PrefixWriter) { } func printSecretVolumeSource(secret *api.SecretVolumeSource, w *PrefixWriter) { + optional := secret.Optional != nil && *secret.Optional w.Write(LEVEL_2, "Type:\tSecret (a volume populated by a Secret)\n"+ - " SecretName:\t%v\n", secret.SecretName) + " SecretName:\t%v\n", + " Optional:\t%v\n", + secret.SecretName, optional) } func printConfigMapVolumeSource(configMap *api.ConfigMapVolumeSource, w *PrefixWriter) { + optional := configMap.Optional != nil && *configMap.Optional w.Write(LEVEL_2, "Type:\tConfigMap (a volume populated by a ConfigMap)\n"+ - " Name:\t%v\n", configMap.Name) + " Name:\t%v\n"+ + " Optional:\t%v\n", + configMap.Name, optional) } func printNFSVolumeSource(nfs *api.NFSVolumeSource, w *PrefixWriter) { @@ -1036,9 +1043,11 @@ func describeContainerEnvVars(container api.Container, resolverFn EnvVarResolver } w.Write(LEVEL_3, "%s:\t%s (%s)\n", e.Name, valueFrom, resource) case e.ValueFrom.SecretKeyRef != nil: - w.Write(LEVEL_3, "%s:\t\n", e.Name, e.ValueFrom.SecretKeyRef.Key, e.ValueFrom.SecretKeyRef.Name) + optional := e.ValueFrom.SecretKeyRef.Optional != nil && *e.ValueFrom.SecretKeyRef.Optional + w.Write(LEVEL_3, "%s:\t\tOptional: %t\n", e.Name, e.ValueFrom.SecretKeyRef.Key, e.ValueFrom.SecretKeyRef.Name, optional) case e.ValueFrom.ConfigMapKeyRef != nil: - w.Write(LEVEL_3, "%s:\t\n", e.Name, e.ValueFrom.ConfigMapKeyRef.Key, e.ValueFrom.ConfigMapKeyRef.Name) + optional := e.ValueFrom.ConfigMapKeyRef.Optional != nil && *e.ValueFrom.ConfigMapKeyRef.Optional + w.Write(LEVEL_3, "%s:\t\tOptional: %t\n", e.Name, e.ValueFrom.ConfigMapKeyRef.Key, e.ValueFrom.ConfigMapKeyRef.Name, optional) } } } @@ -1051,10 +1060,22 @@ func describeContainerEnvFrom(container api.Container, resolverFn EnvVarResolver w.Write(LEVEL_2, "Environment Variables from:%s\n", none) for _, e := range container.EnvFrom { + from := "" + name := "" + optional := false + if e.ConfigMapRef != nil { + from = "ConfigMap" + name = e.ConfigMapRef.Name + optional = e.ConfigMapRef.Optional != nil && *e.ConfigMapRef.Optional + } else if e.SecretRef != nil { + from = "Secret" + name = e.SecretRef.Name + optional = e.SecretRef.Optional != nil && *e.SecretRef.Optional + } if len(e.Prefix) == 0 { - w.Write(LEVEL_3, "%s\tConfigMap\n", e.ConfigMapRef.Name) + w.Write(LEVEL_3, "%s\t%s\tOptional: %t\n", name, from, optional) } else { - w.Write(LEVEL_3, "%s\tConfigMap with prefix '%s'\n", e.ConfigMapRef.Name, e.Prefix) + w.Write(LEVEL_3, "%s\t%s with prefix '%s'\tOptional: %t\n", name, from, e.Prefix, optional) } } } @@ -1549,7 +1570,7 @@ func (i *IngressDescriber) describeIngress(ing *extensions.Ingress, describerSet ServiceName: "default-http-backend", ServicePort: intstr.IntOrString{Type: intstr.Int, IntVal: 80}, } - ns = api.NamespaceSystem + ns = metav1.NamespaceSystem } w.Write(LEVEL_0, "Default backend:\t%s (%s)\n", backendStringer(def), i.describeBackend(ns, def)) if len(ing.Spec.TLS) != 0 { @@ -1782,23 +1803,45 @@ func (d *ServiceAccountDescriber) Describe(namespace, name string, describerSett tokens := []api.Secret{} - tokenSelector := fields.SelectorFromSet(map[string]string{api.SecretTypeField: string(api.SecretTypeServiceAccountToken)}) - options := api.ListOptions{FieldSelector: tokenSelector} - secrets, err := d.Core().Secrets(namespace).List(options) + // missingSecrets is the set of all secrets present in the + // serviceAccount but not present in the set of existing secrets. + missingSecrets := sets.NewString() + secrets, err := d.Core().Secrets(namespace).List(metav1.ListOptions{}) + + // errors are tolerated here in order to describe the serviceAccount with all + // of the secrets that it references, even if those secrets cannot be fetched. if err == nil { + // existingSecrets is the set of all secrets remaining on a + // service account that are not present in the "tokens" slice. + existingSecrets := sets.NewString() + for _, s := range secrets.Items { - name, _ := s.Annotations[api.ServiceAccountNameKey] - uid, _ := s.Annotations[api.ServiceAccountUIDKey] - if name == serviceAccount.Name && uid == string(serviceAccount.UID) { - tokens = append(tokens, s) + if s.Type == api.SecretTypeServiceAccountToken { + name, _ := s.Annotations[api.ServiceAccountNameKey] + uid, _ := s.Annotations[api.ServiceAccountUIDKey] + if name == serviceAccount.Name && uid == string(serviceAccount.UID) { + tokens = append(tokens, s) + } + } + existingSecrets.Insert(s.Name) + } + + for _, s := range serviceAccount.Secrets { + if !existingSecrets.Has(s.Name) { + missingSecrets.Insert(s.Name) + } + } + for _, s := range serviceAccount.ImagePullSecrets { + if !existingSecrets.Has(s.Name) { + missingSecrets.Insert(s.Name) } } } - return describeServiceAccount(serviceAccount, tokens) + return describeServiceAccount(serviceAccount, tokens, missingSecrets) } -func describeServiceAccount(serviceAccount *api.ServiceAccount, tokens []api.Secret) (string, error) { +func describeServiceAccount(serviceAccount *api.ServiceAccount, tokens []api.Secret, missingSecrets sets.String) (string, error) { return tabbedString(func(out io.Writer) error { w := &PrefixWriter{out} w.Write(LEVEL_0, "Name:\t%s\n", serviceAccount.Name) @@ -1838,7 +1881,11 @@ func describeServiceAccount(serviceAccount *api.ServiceAccount, tokens []api.Sec } else { prefix := header for _, name := range names { - w.Write(LEVEL_0, "%s\t%s\n", prefix, name) + if missingSecrets.Has(name) { + w.Write(LEVEL_0, "%s\t%s (not found)\n", prefix, name) + } else { + w.Write(LEVEL_0, "%s\t%s\n", prefix, name) + } prefix = emptyHeader } } @@ -1868,7 +1915,7 @@ func (d *NodeDescriber) Describe(namespace, name string, describerSettings Descr // in a policy aware setting, users may have access to a node, but not all pods // in that case, we note that the user does not have access to the pods canViewPods := true - nodeNonTerminatedPodsList, err := d.Core().Pods(namespace).List(api.ListOptions{FieldSelector: fieldSelector}) + nodeNonTerminatedPodsList, err := d.Core().Pods(namespace).List(metav1.ListOptions{FieldSelector: fieldSelector.String()}) if err != nil { if !errors.IsForbidden(err) { return "", err @@ -2310,7 +2357,7 @@ func (dd *DeploymentDescriber) Describe(namespace, name string, describerSetting func getDaemonSetsForLabels(c extensionsclient.DaemonSetInterface, labelsToMatch labels.Labels) ([]extensions.DaemonSet, error) { // Get all daemon sets // TODO: this needs a namespace scope as argument - dss, err := c.List(api.ListOptions{}) + dss, err := c.List(metav1.ListOptions{}) if err != nil { return nil, fmt.Errorf("error getting daemon set: %v", err) } @@ -2359,7 +2406,7 @@ func printReplicaSetsByLabels(matchingRSs []*versionedextension.ReplicaSet) stri } func getPodStatusForController(c coreclient.PodInterface, selector labels.Selector) (running, waiting, succeeded, failed int, err error) { - options := api.ListOptions{LabelSelector: selector} + options := metav1.ListOptions{LabelSelector: selector.String()} rcPods, err := c.List(options) if err != nil { return @@ -2722,9 +2769,15 @@ func printLabelsMultilineWithIndent(w *PrefixWriter, initialIndent, title, inner // printTaintsMultiline prints multiple taints with a proper alignment. func printTaintsInAnnotationMultiline(w *PrefixWriter, title string, annotations map[string]string) { - taints, err := api.GetTaintsFromNodeAnnotations(annotations) + v1Taints, err := v1.GetTaintsFromNodeAnnotations(annotations) if err != nil { - taints = []api.Taint{} + v1Taints = []v1.Taint{} + } + taints := make([]api.Taint, len(v1Taints)) + for i := range v1Taints { + if err := v1.Convert_v1_Taint_To_api_Taint(&v1Taints[i], &taints[i], nil); err != nil { + panic(err) + } } printTaintsMultilineWithIndent(w, "", title, "\t", taints) } @@ -2761,9 +2814,15 @@ func printTaintsMultilineWithIndent(w *PrefixWriter, initialIndent, title, inner // printTolerationsMultiline prints multiple tolerations with a proper alignment. func printTolerationsInAnnotationMultiline(w *PrefixWriter, title string, annotations map[string]string) { - tolerations, err := api.GetTolerationsFromPodAnnotations(annotations) + v1Tolerations, err := v1.GetTolerationsFromPodAnnotations(annotations) if err != nil { - tolerations = []api.Toleration{} + v1Tolerations = []v1.Toleration{} + } + tolerations := make([]api.Toleration, len(v1Tolerations)) + for i := range v1Tolerations { + if err := v1.Convert_v1_Toleration_To_api_Toleration(&v1Tolerations[i], &tolerations[i], nil); err != nil { + panic(err) + } } printTolerationsMultilineWithIndent(w, "", title, "\t", tolerations) } diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/describe_test.go b/vendor/k8s.io/kubernetes/pkg/kubectl/describe_test.go index 00a317b2..d1573551 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/describe_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/describe_test.go @@ -51,7 +51,7 @@ type describeClient struct { func TestDescribePod(t *testing.T) { fake := fake.NewSimpleClientset(&api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "bar", Namespace: "foo", }, @@ -69,15 +69,15 @@ func TestDescribePod(t *testing.T) { func TestDescribePodTolerations(t *testing.T) { - podTolerations := []api.Toleration{{Key: "key1", Value: "value1"}, + podTolerations := []v1.Toleration{{Key: "key1", Value: "value1"}, {Key: "key2", Value: "value2"}} pt, _ := json.Marshal(podTolerations) fake := fake.NewSimpleClientset(&api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "bar", Namespace: "foo", Annotations: map[string]string{ - api.TolerationsAnnotationKey: string(pt), + v1.TolerationsAnnotationKey: string(pt), }, }, }) @@ -94,7 +94,7 @@ func TestDescribePodTolerations(t *testing.T) { func TestDescribeNamespace(t *testing.T) { fake := fake.NewSimpleClientset(&api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "myns", }, }) @@ -111,7 +111,7 @@ func TestDescribeNamespace(t *testing.T) { func TestDescribeService(t *testing.T) { fake := fake.NewSimpleClientset(&api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "bar", Namespace: "foo", }, @@ -133,7 +133,7 @@ func TestPodDescribeResultsSorted(t *testing.T) { &api.EventList{ Items: []api.Event{ { - ObjectMeta: api.ObjectMeta{Name: "one"}, + ObjectMeta: metav1.ObjectMeta{Name: "one"}, Source: api.EventSource{Component: "kubelet"}, Message: "Item 1", FirstTimestamp: metav1.NewTime(time.Date(2014, time.January, 15, 0, 0, 0, 0, time.UTC)), @@ -142,7 +142,7 @@ func TestPodDescribeResultsSorted(t *testing.T) { Type: api.EventTypeNormal, }, { - ObjectMeta: api.ObjectMeta{Name: "two"}, + ObjectMeta: metav1.ObjectMeta{Name: "two"}, Source: api.EventSource{Component: "scheduler"}, Message: "Item 2", FirstTimestamp: metav1.NewTime(time.Date(1987, time.June, 17, 0, 0, 0, 0, time.UTC)), @@ -151,7 +151,7 @@ func TestPodDescribeResultsSorted(t *testing.T) { Type: api.EventTypeNormal, }, { - ObjectMeta: api.ObjectMeta{Name: "three"}, + ObjectMeta: metav1.ObjectMeta{Name: "three"}, Source: api.EventSource{Component: "kubelet"}, Message: "Item 3", FirstTimestamp: metav1.NewTime(time.Date(2002, time.December, 25, 0, 0, 0, 0, time.UTC)), @@ -161,7 +161,7 @@ func TestPodDescribeResultsSorted(t *testing.T) { }, }, }, - &api.Pod{ObjectMeta: api.ObjectMeta{Namespace: "foo", Name: "bar"}}, + &api.Pod{ObjectMeta: metav1.ObjectMeta{Namespace: "foo", Name: "bar"}}, ) c := &describeClient{T: t, Namespace: "foo", Interface: fake} d := PodDescriber{c} @@ -201,6 +201,7 @@ func VerifyDatesInOrder( } func TestDescribeContainers(t *testing.T) { + trueVal := true testCases := []struct { container api.Container status api.ContainerStatus @@ -295,7 +296,7 @@ func TestDescribeContainers(t *testing.T) { Ready: true, RestartCount: 7, }, - expectedElements: []string{"test", "State", "Waiting", "Ready", "True", "Restart Count", "7", "Image", "image", "envname", "xyz", "a123\tConfigMap"}, + expectedElements: []string{"test", "State", "Waiting", "Ready", "True", "Restart Count", "7", "Image", "image", "envname", "xyz", "a123\tConfigMap\tOptional: false"}, }, { container: api.Container{Name: "test", Image: "image", Env: []api.EnvVar{{Name: "envname", Value: "xyz"}}, EnvFrom: []api.EnvFromSource{{Prefix: "p_", ConfigMapRef: &api.ConfigMapEnvSource{LocalObjectReference: api.LocalObjectReference{Name: "a123"}}}}}, @@ -304,7 +305,34 @@ func TestDescribeContainers(t *testing.T) { Ready: true, RestartCount: 7, }, - expectedElements: []string{"test", "State", "Waiting", "Ready", "True", "Restart Count", "7", "Image", "image", "envname", "xyz", "a123\tConfigMap with prefix 'p_'"}, + expectedElements: []string{"test", "State", "Waiting", "Ready", "True", "Restart Count", "7", "Image", "image", "envname", "xyz", "a123\tConfigMap with prefix 'p_'\tOptional: false"}, + }, + { + container: api.Container{Name: "test", Image: "image", Env: []api.EnvVar{{Name: "envname", Value: "xyz"}}, EnvFrom: []api.EnvFromSource{{ConfigMapRef: &api.ConfigMapEnvSource{Optional: &trueVal, LocalObjectReference: api.LocalObjectReference{Name: "a123"}}}}}, + status: api.ContainerStatus{ + Name: "test", + Ready: true, + RestartCount: 7, + }, + expectedElements: []string{"test", "State", "Waiting", "Ready", "True", "Restart Count", "7", "Image", "image", "envname", "xyz", "a123\tConfigMap\tOptional: true"}, + }, + { + container: api.Container{Name: "test", Image: "image", Env: []api.EnvVar{{Name: "envname", Value: "xyz"}}, EnvFrom: []api.EnvFromSource{{SecretRef: &api.SecretEnvSource{LocalObjectReference: api.LocalObjectReference{Name: "a123"}, Optional: &trueVal}}}}, + status: api.ContainerStatus{ + Name: "test", + Ready: true, + RestartCount: 7, + }, + expectedElements: []string{"test", "State", "Waiting", "Ready", "True", "Restart Count", "7", "Image", "image", "envname", "xyz", "a123\tSecret\tOptional: true"}, + }, + { + container: api.Container{Name: "test", Image: "image", Env: []api.EnvVar{{Name: "envname", Value: "xyz"}}, EnvFrom: []api.EnvFromSource{{Prefix: "p_", SecretRef: &api.SecretEnvSource{LocalObjectReference: api.LocalObjectReference{Name: "a123"}}}}}, + status: api.ContainerStatus{ + Name: "test", + Ready: true, + RestartCount: 7, + }, + expectedElements: []string{"test", "State", "Waiting", "Ready", "True", "Restart Count", "7", "Image", "image", "envname", "xyz", "a123\tSecret with prefix 'p_'\tOptional: false"}, }, // Command { @@ -431,7 +459,7 @@ func TestDescribers(t *testing.T) { } func TestDefaultDescribers(t *testing.T) { - out, err := DefaultObjectDescriber.DescribeObject(&api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}}) + out, err := DefaultObjectDescriber.DescribeObject(&api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}) if err != nil { t.Fatalf("unexpected error: %v", err) } @@ -439,7 +467,7 @@ func TestDefaultDescribers(t *testing.T) { t.Errorf("unexpected output: %s", out) } - out, err = DefaultObjectDescriber.DescribeObject(&api.Service{ObjectMeta: api.ObjectMeta{Name: "foo"}}) + out, err = DefaultObjectDescriber.DescribeObject(&api.Service{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}) if err != nil { t.Fatalf("unexpected error: %v", err) } @@ -447,7 +475,7 @@ func TestDefaultDescribers(t *testing.T) { t.Errorf("unexpected output: %s", out) } - out, err = DefaultObjectDescriber.DescribeObject(&api.ReplicationController{ObjectMeta: api.ObjectMeta{Name: "foo"}}) + out, err = DefaultObjectDescriber.DescribeObject(&api.ReplicationController{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}) if err != nil { t.Fatalf("unexpected error: %v", err) } @@ -455,7 +483,7 @@ func TestDefaultDescribers(t *testing.T) { t.Errorf("unexpected output: %s", out) } - out, err = DefaultObjectDescriber.DescribeObject(&api.Node{ObjectMeta: api.ObjectMeta{Name: "foo"}}) + out, err = DefaultObjectDescriber.DescribeObject(&api.Node{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}) if err != nil { t.Fatalf("unexpected error: %v", err) } @@ -545,7 +573,7 @@ func TestPersistentVolumeDescriber(t *testing.T) { tests := map[string]*api.PersistentVolume{ "hostpath": { - ObjectMeta: api.ObjectMeta{Name: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar"}, Spec: api.PersistentVolumeSpec{ PersistentVolumeSource: api.PersistentVolumeSource{ HostPath: &api.HostPathVolumeSource{}, @@ -553,7 +581,7 @@ func TestPersistentVolumeDescriber(t *testing.T) { }, }, "gce": { - ObjectMeta: api.ObjectMeta{Name: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar"}, Spec: api.PersistentVolumeSpec{ PersistentVolumeSource: api.PersistentVolumeSource{ GCEPersistentDisk: &api.GCEPersistentDiskVolumeSource{}, @@ -561,7 +589,7 @@ func TestPersistentVolumeDescriber(t *testing.T) { }, }, "ebs": { - ObjectMeta: api.ObjectMeta{Name: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar"}, Spec: api.PersistentVolumeSpec{ PersistentVolumeSource: api.PersistentVolumeSource{ AWSElasticBlockStore: &api.AWSElasticBlockStoreVolumeSource{}, @@ -569,7 +597,7 @@ func TestPersistentVolumeDescriber(t *testing.T) { }, }, "nfs": { - ObjectMeta: api.ObjectMeta{Name: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar"}, Spec: api.PersistentVolumeSpec{ PersistentVolumeSource: api.PersistentVolumeSource{ NFS: &api.NFSVolumeSource{}, @@ -577,7 +605,7 @@ func TestPersistentVolumeDescriber(t *testing.T) { }, }, "iscsi": { - ObjectMeta: api.ObjectMeta{Name: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar"}, Spec: api.PersistentVolumeSpec{ PersistentVolumeSource: api.PersistentVolumeSource{ ISCSI: &api.ISCSIVolumeSource{}, @@ -585,7 +613,7 @@ func TestPersistentVolumeDescriber(t *testing.T) { }, }, "gluster": { - ObjectMeta: api.ObjectMeta{Name: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar"}, Spec: api.PersistentVolumeSpec{ PersistentVolumeSource: api.PersistentVolumeSource{ Glusterfs: &api.GlusterfsVolumeSource{}, @@ -593,7 +621,7 @@ func TestPersistentVolumeDescriber(t *testing.T) { }, }, "rbd": { - ObjectMeta: api.ObjectMeta{Name: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar"}, Spec: api.PersistentVolumeSpec{ PersistentVolumeSource: api.PersistentVolumeSource{ RBD: &api.RBDVolumeSource{}, @@ -601,7 +629,7 @@ func TestPersistentVolumeDescriber(t *testing.T) { }, }, "quobyte": { - ObjectMeta: api.ObjectMeta{Name: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar"}, Spec: api.PersistentVolumeSpec{ PersistentVolumeSource: api.PersistentVolumeSource{ Quobyte: &api.QuobyteVolumeSource{}, @@ -609,7 +637,7 @@ func TestPersistentVolumeDescriber(t *testing.T) { }, }, "cinder": { - ObjectMeta: api.ObjectMeta{Name: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar"}, Spec: api.PersistentVolumeSpec{ PersistentVolumeSource: api.PersistentVolumeSource{ Cinder: &api.CinderVolumeSource{}, @@ -634,7 +662,7 @@ func TestPersistentVolumeDescriber(t *testing.T) { func TestDescribeDeployment(t *testing.T) { fake := fake.NewSimpleClientset() versionedFake := versionedfake.NewSimpleClientset(&v1beta1.Deployment{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "bar", Namespace: "foo", }, @@ -656,7 +684,7 @@ func TestDescribeDeployment(t *testing.T) { func TestDescribeCluster(t *testing.T) { cluster := federation.Cluster{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", ResourceVersion: "4", Labels: map[string]string{ @@ -690,7 +718,7 @@ func TestDescribeCluster(t *testing.T) { func TestDescribeStorageClass(t *testing.T) { f := fake.NewSimpleClientset(&storage.StorageClass{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", ResourceVersion: "4", Annotations: map[string]string{ @@ -715,7 +743,7 @@ func TestDescribeStorageClass(t *testing.T) { func TestDescribePodDisruptionBudget(t *testing.T) { f := fake.NewSimpleClientset(&policy.PodDisruptionBudget{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "ns1", Name: "pdb1", CreationTimestamp: metav1.Time{Time: time.Now().Add(1.9e9)}, @@ -742,7 +770,7 @@ func TestDescribeEvents(t *testing.T) { events := &api.EventList{ Items: []api.Event{ { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "foo", }, Source: api.EventSource{Component: "kubelet"}, @@ -758,7 +786,7 @@ func TestDescribeEvents(t *testing.T) { m := map[string]Describer{ "DaemonSetDescriber": &DaemonSetDescriber{ fake.NewSimpleClientset(&extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "bar", Namespace: "foo", }, @@ -767,7 +795,7 @@ func TestDescribeEvents(t *testing.T) { "DeploymentDescriber": &DeploymentDescriber{ fake.NewSimpleClientset(events), versionedfake.NewSimpleClientset(&v1beta1.Deployment{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "bar", Namespace: "foo", }, @@ -779,7 +807,7 @@ func TestDescribeEvents(t *testing.T) { }, "EndpointsDescriber": &EndpointsDescriber{ fake.NewSimpleClientset(&api.Endpoints{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "bar", Namespace: "foo", }, @@ -791,7 +819,7 @@ func TestDescribeEvents(t *testing.T) { // - JobDescriber "NodeDescriber": &NodeDescriber{ fake.NewSimpleClientset(&api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "bar", SelfLink: "url/url/url", }, @@ -799,7 +827,7 @@ func TestDescribeEvents(t *testing.T) { }, "PersistentVolumeDescriber": &PersistentVolumeDescriber{ fake.NewSimpleClientset(&api.PersistentVolume{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "bar", SelfLink: "url/url/url", }, @@ -807,7 +835,7 @@ func TestDescribeEvents(t *testing.T) { }, "PodDescriber": &PodDescriber{ fake.NewSimpleClientset(&api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "bar", Namespace: "foo", SelfLink: "url/url/url", @@ -816,7 +844,7 @@ func TestDescribeEvents(t *testing.T) { }, "ReplicaSetDescriber": &ReplicaSetDescriber{ fake.NewSimpleClientset(&extensions.ReplicaSet{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "bar", Namespace: "foo", }, @@ -824,7 +852,7 @@ func TestDescribeEvents(t *testing.T) { }, "ReplicationControllerDescriber": &ReplicationControllerDescriber{ fake.NewSimpleClientset(&api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "bar", Namespace: "foo", }, @@ -832,7 +860,7 @@ func TestDescribeEvents(t *testing.T) { }, "Service": &ServiceDescriber{ fake.NewSimpleClientset(&api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "bar", Namespace: "foo", }, @@ -840,7 +868,7 @@ func TestDescribeEvents(t *testing.T) { }, "StorageClass": &StorageClassDescriber{ fake.NewSimpleClientset(&storage.StorageClass{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "bar", }, }, events), diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/interfaces.go b/vendor/k8s.io/kubernetes/pkg/kubectl/interfaces.go index f8acb1ea..de20a5d7 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/interfaces.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/interfaces.go @@ -17,8 +17,8 @@ limitations under the License. package kubectl import ( - "k8s.io/kubernetes/pkg/api" - client "k8s.io/kubernetes/pkg/client/restclient" + "k8s.io/apimachinery/pkg/types" + client "k8s.io/client-go/rest" ) // RESTClient is a client helper for dealing with RESTful resources @@ -26,7 +26,7 @@ import ( type RESTClient interface { Get() *client.Request Post() *client.Request - Patch(api.PatchType) *client.Request + Patch(types.PatchType) *client.Request Delete() *client.Request Put() *client.Request } diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/metricsutil/BUILD b/vendor/k8s.io/kubernetes/pkg/kubectl/metricsutil/BUILD index 2849462b..2aeb00a0 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/metricsutil/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/metricsutil/BUILD @@ -20,6 +20,7 @@ go_library( "//pkg/api/validation:go_default_library", "//pkg/client/clientset_generated/internalclientset/typed/core/internalversion:go_default_library", "//pkg/kubectl:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/heapster/metrics/apis/metrics/v1alpha1", diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/metricsutil/metrics_client.go b/vendor/k8s.io/kubernetes/pkg/kubectl/metricsutil/metrics_client.go index ed577453..e72f97dd 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/metricsutil/metrics_client.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/metricsutil/metrics_client.go @@ -21,10 +21,10 @@ import ( "errors" "fmt" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime/schema" metricsapi "k8s.io/heapster/metrics/apis/metrics/v1alpha1" - "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/validation" coreclient "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion" ) @@ -68,7 +68,7 @@ func DefaultHeapsterMetricsClient(svcClient coreclient.ServicesGetter) *Heapster } func podMetricsUrl(namespace string, name string) (string, error) { - if namespace == api.NamespaceAll { + if namespace == metav1.NamespaceAll { return fmt.Sprintf("%s/pods", metricsRoot), nil } errs := validation.ValidateNamespaceName(namespace, false) @@ -128,7 +128,7 @@ func (cli *HeapsterMetricsClient) GetNodeMetrics(nodeName string, selector label func (cli *HeapsterMetricsClient) GetPodMetrics(namespace string, podName string, allNamespaces bool, selector labels.Selector) ([]metricsapi.PodMetrics, error) { if allNamespaces { - namespace = api.NamespaceAll + namespace = metav1.NamespaceAll } path, err := podMetricsUrl(namespace, podName) if err != nil { diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/namespace_test.go b/vendor/k8s.io/kubernetes/pkg/kubectl/namespace_test.go index 85fd6b6b..20d134fd 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/namespace_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/namespace_test.go @@ -20,6 +20,7 @@ import ( "reflect" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api" ) @@ -35,7 +36,7 @@ func TestNamespaceGenerate(t *testing.T) { "name": "foo", }, expected: &api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, }, diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/pdb.go b/vendor/k8s.io/kubernetes/pkg/kubectl/pdb.go index d558f6e7..56d3de0d 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/pdb.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/pdb.go @@ -21,7 +21,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/policy" "k8s.io/kubernetes/pkg/util/intstr" ) @@ -77,7 +76,7 @@ func (s *PodDisruptionBudgetV1Generator) StructuredGenerate() (runtime.Object, e } return &policy.PodDisruptionBudget{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: s.Name, }, Spec: policy.PodDisruptionBudgetSpec{ diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/proxy_server.go b/vendor/k8s.io/kubernetes/pkg/kubectl/proxy_server.go index d7a8edac..39b870c5 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/proxy_server.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/proxy_server.go @@ -28,7 +28,7 @@ import ( "time" "github.com/golang/glog" - "k8s.io/kubernetes/pkg/client/restclient" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/util" ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/proxy_server_test.go b/vendor/k8s.io/kubernetes/pkg/kubectl/proxy_server_test.go index 3aad8c31..13213a9f 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/proxy_server_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/proxy_server_test.go @@ -22,11 +22,12 @@ import ( "net/http" "net/http/httptest" "net/url" + "os" "path/filepath" "strings" "testing" - "k8s.io/kubernetes/pkg/client/restclient" + restclient "k8s.io/client-go/rest" ) func TestAccept(t *testing.T) { @@ -234,6 +235,7 @@ func TestFileServing(t *testing.T) { if err != nil { t.Fatalf("error creating tmp dir: %v", err) } + defer os.RemoveAll(dir) if err := ioutil.WriteFile(filepath.Join(dir, fname), []byte(data), 0755); err != nil { t.Fatalf("error writing tmp file: %v", err) } diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/quota_test.go b/vendor/k8s.io/kubernetes/pkg/kubectl/quota_test.go index 930ded03..8529dd67 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/quota_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/quota_test.go @@ -20,6 +20,7 @@ import ( "reflect" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api" ) @@ -41,7 +42,7 @@ func TestQuotaGenerate(t *testing.T) { "hard": hard, }, expected: &api.ResourceQuota{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Spec: api.ResourceQuotaSpec{Hard: resourceQuotaSpecList}, @@ -61,7 +62,7 @@ func TestQuotaGenerate(t *testing.T) { "scopes": "BestEffort,NotTerminating", }, expected: &api.ResourceQuota{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Spec: api.ResourceQuotaSpec{ @@ -81,7 +82,7 @@ func TestQuotaGenerate(t *testing.T) { "scopes": "", }, expected: &api.ResourceQuota{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Spec: api.ResourceQuotaSpec{Hard: resourceQuotaSpecList}, diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/resource/BUILD b/vendor/k8s.io/kubernetes/pkg/kubectl/resource/BUILD index c4cd4672..d1f94936 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/resource/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/resource/BUILD @@ -25,7 +25,7 @@ go_library( "//pkg/api:go_default_library", "//pkg/api/validation:go_default_library", "//pkg/apis/extensions:go_default_library", - "//pkg/client/restclient:go_default_library", + "//vendor:github.com/golang/glog", "//vendor:golang.org/x/text/encoding/unicode", "//vendor:golang.org/x/text/transform", "//vendor:k8s.io/apimachinery/pkg/api/errors", @@ -34,10 +34,12 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/errors", "//vendor:k8s.io/apimachinery/pkg/util/sets", "//vendor:k8s.io/apimachinery/pkg/util/yaml", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest", ], ) @@ -63,8 +65,6 @@ go_test( "//pkg/api/testing:go_default_library", "//pkg/api/v1:go_default_library", "//pkg/client/restclient/fake:go_default_library", - "//pkg/client/restclient/watch:go_default_library", - "//pkg/util/testing:go_default_library", "//vendor:github.com/ghodss/yaml", "//vendor:github.com/stretchr/testify/assert", "//vendor:k8s.io/apimachinery/pkg/api/meta", @@ -74,6 +74,8 @@ go_test( "//vendor:k8s.io/apimachinery/pkg/runtime/serializer/streaming", "//vendor:k8s.io/apimachinery/pkg/util/errors", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/rest/watch", + "//vendor:k8s.io/client-go/util/testing", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/resource/builder.go b/vendor/k8s.io/kubernetes/pkg/kubectl/resource/builder.go index 0b56a8db..6a12058d 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/resource/builder.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/resource/builder.go @@ -24,12 +24,12 @@ import ( "strings" "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" utilerrors "k8s.io/apimachinery/pkg/util/errors" "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/validation" ) @@ -291,11 +291,11 @@ func (b *Builder) DefaultNamespace() *Builder { return b } -// AllNamespaces instructs the builder to use NamespaceAll as a namespace to request resources +// AllNamespaces instructs the builder to metav1.NamespaceAll as a namespace to request resources // across all of the namespace. This overrides the namespace set by NamespaceParam(). func (b *Builder) AllNamespaces(allNamespace bool) *Builder { if allNamespace { - b.namespace = api.NamespaceAll + b.namespace = metav1.NamespaceAll } b.allNamespace = allNamespace return b diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/resource/builder_test.go b/vendor/k8s.io/kubernetes/pkg/kubectl/resource/builder_test.go index 786637a3..aa46b4ae 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/resource/builder_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/resource/builder_test.go @@ -37,14 +37,14 @@ import ( "k8s.io/apimachinery/pkg/runtime/serializer/streaming" utilerrors "k8s.io/apimachinery/pkg/util/errors" "k8s.io/apimachinery/pkg/watch" + restclientwatch "k8s.io/client-go/rest/watch" + utiltesting "k8s.io/client-go/util/testing" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/testapi" apitesting "k8s.io/kubernetes/pkg/api/testing" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/restclient/fake" - restclientwatch "k8s.io/kubernetes/pkg/client/restclient/watch" - utiltesting "k8s.io/kubernetes/pkg/util/testing" ) func stringBody(body string) io.ReadCloser { @@ -100,11 +100,11 @@ func testData() (*api.PodList, *api.ServiceList) { }, Items: []api.Pod{ { - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "test", ResourceVersion: "10"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "test", ResourceVersion: "10"}, Spec: apitesting.DeepEqualSafePodSpec(), }, { - ObjectMeta: api.ObjectMeta{Name: "bar", Namespace: "test", ResourceVersion: "11"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar", Namespace: "test", ResourceVersion: "11"}, Spec: apitesting.DeepEqualSafePodSpec(), }, }, @@ -115,7 +115,7 @@ func testData() (*api.PodList, *api.ServiceList) { }, Items: []api.Service{ { - ObjectMeta: api.ObjectMeta{Name: "baz", Namespace: "test", ResourceVersion: "12"}, + ObjectMeta: metav1.ObjectMeta{Name: "baz", Namespace: "test", ResourceVersion: "12"}, Spec: api.ServiceSpec{ Type: "ClusterIP", SessionAffinity: "None", @@ -277,7 +277,7 @@ func TestPathBuilderAndVersionedObjectNotDefaulted(t *testing.T) { func TestNodeBuilder(t *testing.T) { node := &api.Node{ - ObjectMeta: api.ObjectMeta{Name: "node1", Namespace: "should-not-have", ResourceVersion: "10"}, + ObjectMeta: metav1.ObjectMeta{Name: "node1", Namespace: "should-not-have", ResourceVersion: "10"}, Spec: api.NodeSpec{}, Status: api.NodeStatus{ Capacity: api.ResourceList{ @@ -457,7 +457,7 @@ func TestDirectoryBuilder(t *testing.T) { func TestNamespaceOverride(t *testing.T) { s := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { w.WriteHeader(http.StatusOK) - w.Write([]byte(runtime.EncodeOrDie(testapi.Default.Codec(), &api.Pod{ObjectMeta: api.ObjectMeta{Namespace: "foo", Name: "test"}}))) + w.Write([]byte(runtime.EncodeOrDie(testapi.Default.Codec(), &api.Pod{ObjectMeta: metav1.ObjectMeta{Namespace: "foo", Name: "test"}}))) })) defer s.Close() @@ -487,8 +487,8 @@ func TestNamespaceOverride(t *testing.T) { func TestURLBuilder(t *testing.T) { s := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { w.WriteHeader(http.StatusOK) - w.Write([]byte(runtime.EncodeOrDie(testapi.Default.Codec(), &api.Pod{ObjectMeta: api.ObjectMeta{Namespace: "foo", Name: "test"}}))) - w.Write([]byte(runtime.EncodeOrDie(testapi.Default.Codec(), &api.Pod{ObjectMeta: api.ObjectMeta{Namespace: "foo", Name: "test1"}}))) + w.Write([]byte(runtime.EncodeOrDie(testapi.Default.Codec(), &api.Pod{ObjectMeta: metav1.ObjectMeta{Namespace: "foo", Name: "test"}}))) + w.Write([]byte(runtime.EncodeOrDie(testapi.Default.Codec(), &api.Pod{ObjectMeta: metav1.ObjectMeta{Namespace: "foo", Name: "test1"}}))) })) defer s.Close() @@ -517,7 +517,7 @@ func TestURLBuilder(t *testing.T) { func TestURLBuilderRequireNamespace(t *testing.T) { s := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { w.WriteHeader(http.StatusOK) - w.Write([]byte(runtime.EncodeOrDie(testapi.Default.Codec(), &api.Pod{ObjectMeta: api.ObjectMeta{Namespace: "foo", Name: "test"}}))) + w.Write([]byte(runtime.EncodeOrDie(testapi.Default.Codec(), &api.Pod{ObjectMeta: metav1.ObjectMeta{Namespace: "foo", Name: "test"}}))) })) defer s.Close() @@ -820,7 +820,7 @@ func TestResourceTuple(t *testing.T) { expectedRequests = map[string]string{ "/namespaces/test/pods/foo": runtime.EncodeOrDie(testapi.Default.Codec(), &pods.Items[0]), "/namespaces/test/pods/bar": runtime.EncodeOrDie(testapi.Default.Codec(), &pods.Items[0]), - "/nodes/foo": runtime.EncodeOrDie(testapi.Default.Codec(), &api.Node{ObjectMeta: api.ObjectMeta{Name: "foo"}}), + "/nodes/foo": runtime.EncodeOrDie(testapi.Default.Codec(), &api.Node{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}), } } @@ -980,7 +980,7 @@ func TestSingleItemImpliedObjectNoExtension(t *testing.T) { } func TestSingleItemImpliedRootScopedObject(t *testing.T) { - node := &api.Node{ObjectMeta: api.ObjectMeta{Name: "test"}, Spec: api.NodeSpec{ExternalID: "test"}} + node := &api.Node{ObjectMeta: metav1.ObjectMeta{Name: "test"}, Spec: api.NodeSpec{ExternalID: "test"}} r := streamTestObject(node) infos, err := NewBuilder(testapi.Default.RESTMapper(), api.Scheme, fakeClient(), testapi.Default.Codec()). NamespaceParam("test").DefaultNamespace(). @@ -1112,13 +1112,13 @@ func TestWatchMultipleError(t *testing.T) { func TestLatest(t *testing.T) { r, _, _ := streamTestData() newPod := &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "test", ResourceVersion: "13"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "test", ResourceVersion: "13"}, } newPod2 := &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "bar", Namespace: "test", ResourceVersion: "14"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar", Namespace: "test", ResourceVersion: "14"}, } newSvc := &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "baz", Namespace: "test", ResourceVersion: "15"}, + ObjectMeta: metav1.ObjectMeta{Name: "baz", Namespace: "test", ResourceVersion: "15"}, } b := NewBuilder(testapi.Default.RESTMapper(), api.Scheme, fakeClientWith("", t, map[string]string{ diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/resource/helper.go b/vendor/k8s.io/kubernetes/pkg/kubectl/resource/helper.go index 6da2fd61..a7aa39eb 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/resource/helper.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/resource/helper.go @@ -22,8 +22,8 @@ import ( "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/watch" - "k8s.io/kubernetes/pkg/api" ) // Helper provides methods for retrieving or mutating a RESTful @@ -123,7 +123,7 @@ func (m *Helper) Create(namespace string, modify bool, obj runtime.Object) (runt func (m *Helper) createResource(c RESTClient, resource, namespace string, obj runtime.Object) (runtime.Object, error) { return c.Post().NamespaceIfScoped(namespace, m.NamespaceScoped).Resource(resource).Body(obj).Do().Get() } -func (m *Helper) Patch(namespace, name string, pt api.PatchType, data []byte) (runtime.Object, error) { +func (m *Helper) Patch(namespace, name string, pt types.PatchType, data []byte) (runtime.Object, error) { return m.RESTClient.Patch(pt). NamespaceIfScoped(namespace, m.NamespaceScoped). Resource(m.Resource). diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/resource/helper_test.go b/vendor/k8s.io/kubernetes/pkg/kubectl/resource/helper_test.go index 5141f3cf..d6b954c0 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/resource/helper_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/resource/helper_test.go @@ -166,25 +166,25 @@ func TestHelperCreate(t *testing.T) { Header: header(), Body: objBody(&metav1.Status{Status: metav1.StatusSuccess}), }, - Object: &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}}, - ExpectObject: &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}}, + Object: &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}, + ExpectObject: &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}, Req: expectPost, }, { Modify: false, - Object: &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo", ResourceVersion: "10"}}, - ExpectObject: &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo", ResourceVersion: "10"}}, + Object: &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo", ResourceVersion: "10"}}, + ExpectObject: &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo", ResourceVersion: "10"}}, Resp: &http.Response{StatusCode: http.StatusOK, Header: header(), Body: objBody(&metav1.Status{Status: metav1.StatusSuccess})}, Req: expectPost, }, { Modify: true, Object: &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo", ResourceVersion: "10"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", ResourceVersion: "10"}, Spec: apitesting.DeepEqualSafePodSpec(), }, ExpectObject: &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: apitesting.DeepEqualSafePodSpec(), }, Resp: &http.Response{StatusCode: http.StatusOK, Header: header(), Body: objBody(&metav1.Status{Status: metav1.StatusSuccess})}, @@ -251,7 +251,7 @@ func TestHelperGet(t *testing.T) { Resp: &http.Response{ StatusCode: http.StatusOK, Header: header(), - Body: objBody(&api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}}), + Body: objBody(&api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}), }, Req: func(req *http.Request) bool { if req.Method != "GET" { @@ -322,7 +322,7 @@ func TestHelperList(t *testing.T) { Header: header(), Body: objBody(&api.PodList{ Items: []api.Pod{{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, }, }, }), @@ -406,7 +406,7 @@ func TestHelperReplace(t *testing.T) { { Namespace: "bar", NamespaceScoped: true, - Object: &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}}, + Object: &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}, Resp: &http.Response{ StatusCode: http.StatusNotFound, Header: header(), @@ -417,9 +417,9 @@ func TestHelperReplace(t *testing.T) { { Namespace: "bar", NamespaceScoped: true, - Object: &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}}, + Object: &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}, ExpectPath: "/namespaces/bar/foo", - ExpectObject: &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}}, + ExpectObject: &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}, Resp: &http.Response{ StatusCode: http.StatusOK, Header: header(), @@ -432,12 +432,12 @@ func TestHelperReplace(t *testing.T) { Namespace: "bar", NamespaceScoped: true, Object: &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: apitesting.DeepEqualSafePodSpec(), }, ExpectPath: "/namespaces/bar/foo", ExpectObject: &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo", ResourceVersion: "10"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", ResourceVersion: "10"}, Spec: apitesting.DeepEqualSafePodSpec(), }, Overwrite: true, @@ -445,17 +445,17 @@ func TestHelperReplace(t *testing.T) { if req.Method == "PUT" { return &http.Response{StatusCode: http.StatusOK, Header: header(), Body: objBody(&metav1.Status{Status: metav1.StatusSuccess})}, nil } - return &http.Response{StatusCode: http.StatusOK, Header: header(), Body: objBody(&api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo", ResourceVersion: "10"}})}, nil + return &http.Response{StatusCode: http.StatusOK, Header: header(), Body: objBody(&api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo", ResourceVersion: "10"}})}, nil }), Req: expectPut, }, // cluster scoped resource { Object: &api.Node{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, }, ExpectObject: &api.Node{ - ObjectMeta: api.ObjectMeta{Name: "foo", ResourceVersion: "10"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", ResourceVersion: "10"}, }, Overwrite: true, ExpectPath: "/foo", @@ -463,16 +463,16 @@ func TestHelperReplace(t *testing.T) { if req.Method == "PUT" { return &http.Response{StatusCode: http.StatusOK, Header: header(), Body: objBody(&metav1.Status{Status: metav1.StatusSuccess})}, nil } - return &http.Response{StatusCode: http.StatusOK, Header: header(), Body: objBody(&api.Node{ObjectMeta: api.ObjectMeta{Name: "foo", ResourceVersion: "10"}})}, nil + return &http.Response{StatusCode: http.StatusOK, Header: header(), Body: objBody(&api.Node{ObjectMeta: metav1.ObjectMeta{Name: "foo", ResourceVersion: "10"}})}, nil }), Req: expectPut, }, { Namespace: "bar", NamespaceScoped: true, - Object: &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo", ResourceVersion: "10"}}, + Object: &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo", ResourceVersion: "10"}}, ExpectPath: "/namespaces/bar/foo", - ExpectObject: &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo", ResourceVersion: "10"}}, + ExpectObject: &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo", ResourceVersion: "10"}}, Resp: &http.Response{StatusCode: http.StatusOK, Header: header(), Body: objBody(&metav1.Status{Status: metav1.StatusSuccess})}, Req: expectPut, }, diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/resource/interfaces.go b/vendor/k8s.io/kubernetes/pkg/kubectl/resource/interfaces.go index 78879ba8..bb7a956c 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/resource/interfaces.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/resource/interfaces.go @@ -18,8 +18,8 @@ package resource import ( "k8s.io/apimachinery/pkg/api/meta" - "k8s.io/kubernetes/pkg/api" - client "k8s.io/kubernetes/pkg/client/restclient" + "k8s.io/apimachinery/pkg/types" + client "k8s.io/client-go/rest" ) // RESTClient is a client helper for dealing with RESTful resources @@ -27,7 +27,7 @@ import ( type RESTClient interface { Get() *client.Request Post() *client.Request - Patch(api.PatchType) *client.Request + Patch(types.PatchType) *client.Request Delete() *client.Request Put() *client.Request } diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/resource/result.go b/vendor/k8s.io/kubernetes/pkg/kubectl/resource/result.go index 19d71d9f..efef5c00 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/resource/result.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/resource/result.go @@ -20,6 +20,8 @@ import ( "fmt" "reflect" + "github.com/golang/glog" + "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" @@ -228,6 +230,15 @@ func AsVersionedObject(infos []*Info, forceList bool, version schema.GroupVersio } object = converted } + + actualVersion := object.GetObjectKind().GroupVersionKind() + if actualVersion.Version != version.Version { + defaultVersionInfo := "" + if len(actualVersion.Version) > 0 { + defaultVersionInfo = fmt.Sprintf("Defaulting to %q", actualVersion.Version) + } + glog.V(1).Infof("info: the output version specified is invalid. %s\n", defaultVersionInfo) + } return object, nil } diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/resource/visitor.go b/vendor/k8s.io/kubernetes/pkg/kubectl/resource/visitor.go index 8aed50e1..32102d4e 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/resource/visitor.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/resource/visitor.go @@ -31,13 +31,13 @@ import ( "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" utilerrors "k8s.io/apimachinery/pkg/util/errors" "k8s.io/apimachinery/pkg/util/yaml" "k8s.io/apimachinery/pkg/watch" - "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/validation" ) @@ -116,7 +116,7 @@ func (i *Info) Visit(fn VisitorFunc) error { func (i *Info) Get() (err error) { obj, err := NewHelper(i.Client, i.Mapping).Get(i.Namespace, i.Name, i.Export) if err != nil { - if errors.IsNotFound(err) && len(i.Namespace) > 0 && i.Namespace != api.NamespaceDefault && i.Namespace != api.NamespaceAll { + if errors.IsNotFound(err) && len(i.Namespace) > 0 && i.Namespace != metav1.NamespaceDefault && i.Namespace != metav1.NamespaceAll { err2 := i.Client.Get().AbsPath("api", "v1", "namespaces", i.Namespace).Do().Error() if err2 != nil && errors.IsNotFound(err2) { return err2 diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/resource_printer.go b/vendor/k8s.io/kubernetes/pkg/kubectl/resource_printer.go index a5c8f0c5..41cde693 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/resource_printer.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/resource_printer.go @@ -38,6 +38,7 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" utilerrors "k8s.io/apimachinery/pkg/util/errors" "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/client-go/util/jsonpath" "k8s.io/kubernetes/federation/apis/federation" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/events" @@ -50,7 +51,6 @@ import ( "k8s.io/kubernetes/pkg/apis/rbac" "k8s.io/kubernetes/pkg/apis/storage" storageutil "k8s.io/kubernetes/pkg/apis/storage/util" - "k8s.io/kubernetes/pkg/util/jsonpath" "k8s.io/kubernetes/pkg/util/node" "github.com/ghodss/yaml" @@ -1766,7 +1766,7 @@ func printLimitRangeList(list *api.LimitRangeList, w io.Writer, options PrintOpt } // printObjectMeta prints the object metadata of a given resource. -func printObjectMeta(meta api.ObjectMeta, w io.Writer, options PrintOptions, namespaced bool) error { +func printObjectMeta(meta metav1.ObjectMeta, w io.Writer, options PrintOptions, namespaced bool) error { name := formatResourceName(options.Kind, meta.Name, options.WithKind) if namespaced && options.WithNamespace { diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/resource_printer_test.go b/vendor/k8s.io/kubernetes/pkg/kubectl/resource_printer_test.go index 42f9d62f..6ebc9488 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/resource_printer_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/resource_printer_test.go @@ -99,11 +99,11 @@ func (obj *TestUnknownType) GetObjectKind() schema.ObjectKind { return schema.Em func TestPrinter(t *testing.T) { //test inputs simpleTest := &TestPrintType{"foo"} - podTest := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}} + podTest := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} podListTest := &api.PodList{ Items: []api.Pod{ - {ObjectMeta: api.ObjectMeta{Name: "foo"}}, - {ObjectMeta: api.ObjectMeta{Name: "bar"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "foo"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "bar"}}, }, } emptyListTest := &api.PodList{} @@ -193,7 +193,7 @@ func testPrinter(t *testing.T, printer ResourcePrinter, unmarshalFunc func(data } obj := &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, } buf.Reset() printer.PrintObj(obj, buf) @@ -334,7 +334,7 @@ func TestNamePrinter(t *testing.T) { TypeMeta: metav1.TypeMeta{ Kind: "Pod", }, - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, }, @@ -490,7 +490,7 @@ func TestTemplateStrings(t *testing.T) { } func TestPrinters(t *testing.T) { - om := func(name string) api.ObjectMeta { return api.ObjectMeta{Name: name} } + om := func(name string) metav1.ObjectMeta { return metav1.ObjectMeta{Name: name} } var ( err error @@ -615,14 +615,14 @@ func TestPrintNodeStatus(t *testing.T) { }{ { node: api.Node{ - ObjectMeta: api.ObjectMeta{Name: "foo1"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo1"}, Status: api.NodeStatus{Conditions: []api.NodeCondition{{Type: api.NodeReady, Status: api.ConditionTrue}}}, }, status: "Ready", }, { node: api.Node{ - ObjectMeta: api.ObjectMeta{Name: "foo2"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo2"}, Spec: api.NodeSpec{Unschedulable: true}, Status: api.NodeStatus{Conditions: []api.NodeCondition{{Type: api.NodeReady, Status: api.ConditionTrue}}}, }, @@ -630,7 +630,7 @@ func TestPrintNodeStatus(t *testing.T) { }, { node: api.Node{ - ObjectMeta: api.ObjectMeta{Name: "foo3"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo3"}, Status: api.NodeStatus{Conditions: []api.NodeCondition{ {Type: api.NodeReady, Status: api.ConditionTrue}, {Type: api.NodeReady, Status: api.ConditionTrue}}}, @@ -639,14 +639,14 @@ func TestPrintNodeStatus(t *testing.T) { }, { node: api.Node{ - ObjectMeta: api.ObjectMeta{Name: "foo4"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo4"}, Status: api.NodeStatus{Conditions: []api.NodeCondition{{Type: api.NodeReady, Status: api.ConditionFalse}}}, }, status: "NotReady", }, { node: api.Node{ - ObjectMeta: api.ObjectMeta{Name: "foo5"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo5"}, Spec: api.NodeSpec{Unschedulable: true}, Status: api.NodeStatus{Conditions: []api.NodeCondition{{Type: api.NodeReady, Status: api.ConditionFalse}}}, }, @@ -654,21 +654,21 @@ func TestPrintNodeStatus(t *testing.T) { }, { node: api.Node{ - ObjectMeta: api.ObjectMeta{Name: "foo6"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo6"}, Status: api.NodeStatus{Conditions: []api.NodeCondition{{Type: "InvalidValue", Status: api.ConditionTrue}}}, }, status: "Unknown", }, { node: api.Node{ - ObjectMeta: api.ObjectMeta{Name: "foo7"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo7"}, Status: api.NodeStatus{Conditions: []api.NodeCondition{{}}}, }, status: "Unknown", }, { node: api.Node{ - ObjectMeta: api.ObjectMeta{Name: "foo8"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo8"}, Spec: api.NodeSpec{Unschedulable: true}, Status: api.NodeStatus{Conditions: []api.NodeCondition{{Type: "InvalidValue", Status: api.ConditionTrue}}}, }, @@ -676,7 +676,7 @@ func TestPrintNodeStatus(t *testing.T) { }, { node: api.Node{ - ObjectMeta: api.ObjectMeta{Name: "foo9"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo9"}, Spec: api.NodeSpec{Unschedulable: true}, Status: api.NodeStatus{Conditions: []api.NodeCondition{{}}}, }, @@ -684,7 +684,7 @@ func TestPrintNodeStatus(t *testing.T) { }, { node: api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo10", Labels: map[string]string{"kubernetes.io/role": "master"}, }, @@ -694,7 +694,7 @@ func TestPrintNodeStatus(t *testing.T) { }, { node: api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo11", Labels: map[string]string{"kubernetes.io/role": "node"}, }, @@ -704,7 +704,7 @@ func TestPrintNodeStatus(t *testing.T) { }, { node: api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo12", Labels: map[string]string{"kubeadm.alpha.kubernetes.io/role": "node"}, }, @@ -738,7 +738,7 @@ func TestPrintNodeOSImage(t *testing.T) { }{ { node: api.Node{ - ObjectMeta: api.ObjectMeta{Name: "foo1"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo1"}, Status: api.NodeStatus{ NodeInfo: api.NodeSystemInfo{OSImage: "fake-os-image"}, Addresses: []api.NodeAddress{{Type: api.NodeExternalIP, Address: "1.1.1.1"}}, @@ -748,7 +748,7 @@ func TestPrintNodeOSImage(t *testing.T) { }, { node: api.Node{ - ObjectMeta: api.ObjectMeta{Name: "foo2"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo2"}, Status: api.NodeStatus{ NodeInfo: api.NodeSystemInfo{KernelVersion: "fake-kernel-version"}, Addresses: []api.NodeAddress{{Type: api.NodeExternalIP, Address: "1.1.1.1"}}, @@ -782,7 +782,7 @@ func TestPrintNodeKernelVersion(t *testing.T) { }{ { node: api.Node{ - ObjectMeta: api.ObjectMeta{Name: "foo1"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo1"}, Status: api.NodeStatus{ NodeInfo: api.NodeSystemInfo{KernelVersion: "fake-kernel-version"}, Addresses: []api.NodeAddress{{Type: api.NodeExternalIP, Address: "1.1.1.1"}}, @@ -792,7 +792,7 @@ func TestPrintNodeKernelVersion(t *testing.T) { }, { node: api.Node{ - ObjectMeta: api.ObjectMeta{Name: "foo2"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo2"}, Status: api.NodeStatus{ NodeInfo: api.NodeSystemInfo{OSImage: "fake-os-image"}, Addresses: []api.NodeAddress{{Type: api.NodeExternalIP, Address: "1.1.1.1"}}, @@ -824,21 +824,21 @@ func TestPrintNodeExternalIP(t *testing.T) { }{ { node: api.Node{ - ObjectMeta: api.ObjectMeta{Name: "foo1"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo1"}, Status: api.NodeStatus{Addresses: []api.NodeAddress{{Type: api.NodeExternalIP, Address: "1.1.1.1"}}}, }, externalIP: "1.1.1.1", }, { node: api.Node{ - ObjectMeta: api.ObjectMeta{Name: "foo2"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo2"}, Status: api.NodeStatus{Addresses: []api.NodeAddress{{Type: api.NodeInternalIP, Address: "1.1.1.1"}}}, }, externalIP: "", }, { node: api.Node{ - ObjectMeta: api.ObjectMeta{Name: "foo3"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo3"}, Status: api.NodeStatus{Addresses: []api.NodeAddress{ {Type: api.NodeLegacyHostIP, Address: "1.1.1.1"}, {Type: api.NodeExternalIP, Address: "2.2.2.2"}, @@ -873,7 +873,7 @@ func contains(fields []string, field string) bool { func TestPrintHunmanReadableIngressWithColumnLabels(t *testing.T) { ingress := extensions.Ingress{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test1", CreationTimestamp: metav1.Time{Time: time.Now().AddDate(-10, 0, 0)}, Labels: map[string]string{ @@ -1061,17 +1061,17 @@ func TestPrintHumanReadableWithNamespace(t *testing.T) { }{ { obj: &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: name, Namespace: namespaceName}, + ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespaceName}, }, isNamespaced: true, }, { obj: &api.ReplicationController{ - ObjectMeta: api.ObjectMeta{Name: name, Namespace: namespaceName}, + ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespaceName}, Spec: api.ReplicationControllerSpec{ Replicas: 2, Template: &api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "name": "foo", "type": "production", @@ -1098,7 +1098,7 @@ func TestPrintHumanReadableWithNamespace(t *testing.T) { }, { obj: &api.Service{ - ObjectMeta: api.ObjectMeta{Name: name, Namespace: namespaceName}, + ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespaceName}, Spec: api.ServiceSpec{ ClusterIP: "1.2.3.4", Ports: []api.ServicePort{ @@ -1122,7 +1122,7 @@ func TestPrintHumanReadableWithNamespace(t *testing.T) { }, { obj: &api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: name, Namespace: namespaceName}, + ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespaceName}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}, {IP: "localhost"}}, Ports: []api.EndpointPort{{Port: 8080}}, @@ -1132,47 +1132,47 @@ func TestPrintHumanReadableWithNamespace(t *testing.T) { }, { obj: &api.Namespace{ - ObjectMeta: api.ObjectMeta{Name: name}, + ObjectMeta: metav1.ObjectMeta{Name: name}, }, isNamespaced: false, }, { obj: &api.Secret{ - ObjectMeta: api.ObjectMeta{Name: name, Namespace: namespaceName}, + ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespaceName}, }, isNamespaced: true, }, { obj: &api.ServiceAccount{ - ObjectMeta: api.ObjectMeta{Name: name, Namespace: namespaceName}, + ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespaceName}, Secrets: []api.ObjectReference{}, }, isNamespaced: true, }, { obj: &api.Node{ - ObjectMeta: api.ObjectMeta{Name: name}, + ObjectMeta: metav1.ObjectMeta{Name: name}, Status: api.NodeStatus{}, }, isNamespaced: false, }, { obj: &api.PersistentVolume{ - ObjectMeta: api.ObjectMeta{Name: name, Namespace: namespaceName}, + ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespaceName}, Spec: api.PersistentVolumeSpec{}, }, isNamespaced: false, }, { obj: &api.PersistentVolumeClaim{ - ObjectMeta: api.ObjectMeta{Name: name, Namespace: namespaceName}, + ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespaceName}, Spec: api.PersistentVolumeClaimSpec{}, }, isNamespaced: true, }, { obj: &api.Event{ - ObjectMeta: api.ObjectMeta{Name: name, Namespace: namespaceName}, + ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespaceName}, Source: api.EventSource{Component: "kubelet"}, Message: "Item 1", FirstTimestamp: metav1.NewTime(time.Date(2014, time.January, 15, 0, 0, 0, 0, time.UTC)), @@ -1184,13 +1184,13 @@ func TestPrintHumanReadableWithNamespace(t *testing.T) { }, { obj: &api.LimitRange{ - ObjectMeta: api.ObjectMeta{Name: name, Namespace: namespaceName}, + ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespaceName}, }, isNamespaced: true, }, { obj: &api.ResourceQuota{ - ObjectMeta: api.ObjectMeta{Name: name, Namespace: namespaceName}, + ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespaceName}, }, isNamespaced: true, }, @@ -1241,7 +1241,7 @@ func TestPrintPod(t *testing.T) { { // Test name, num of containers, restarts, container ready status api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "test1"}, + ObjectMeta: metav1.ObjectMeta{Name: "test1"}, Spec: api.PodSpec{Containers: make([]api.Container, 2)}, Status: api.PodStatus{ Phase: "podPhase", @@ -1256,7 +1256,7 @@ func TestPrintPod(t *testing.T) { { // Test container error overwrites pod phase api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "test2"}, + ObjectMeta: metav1.ObjectMeta{Name: "test2"}, Spec: api.PodSpec{Containers: make([]api.Container, 2)}, Status: api.PodStatus{ Phase: "podPhase", @@ -1271,7 +1271,7 @@ func TestPrintPod(t *testing.T) { { // Test the same as the above but with Terminated state and the first container overwrites the rest api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "test3"}, + ObjectMeta: metav1.ObjectMeta{Name: "test3"}, Spec: api.PodSpec{Containers: make([]api.Container, 2)}, Status: api.PodStatus{ Phase: "podPhase", @@ -1286,7 +1286,7 @@ func TestPrintPod(t *testing.T) { { // Test ready is not enough for reporting running api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "test4"}, + ObjectMeta: metav1.ObjectMeta{Name: "test4"}, Spec: api.PodSpec{Containers: make([]api.Container, 2)}, Status: api.PodStatus{ Phase: "podPhase", @@ -1301,7 +1301,7 @@ func TestPrintPod(t *testing.T) { { // Test ready is not enough for reporting running api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "test5"}, + ObjectMeta: metav1.ObjectMeta{Name: "test5"}, Spec: api.PodSpec{Containers: make([]api.Container, 2)}, Status: api.PodStatus{ Reason: "OutOfDisk", @@ -1336,7 +1336,7 @@ func TestPrintNonTerminatedPod(t *testing.T) { { // Test pod phase Running should be printed api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "test1"}, + ObjectMeta: metav1.ObjectMeta{Name: "test1"}, Spec: api.PodSpec{Containers: make([]api.Container, 2)}, Status: api.PodStatus{ Phase: api.PodRunning, @@ -1351,7 +1351,7 @@ func TestPrintNonTerminatedPod(t *testing.T) { { // Test pod phase Pending should be printed api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "test2"}, + ObjectMeta: metav1.ObjectMeta{Name: "test2"}, Spec: api.PodSpec{Containers: make([]api.Container, 2)}, Status: api.PodStatus{ Phase: api.PodPending, @@ -1366,7 +1366,7 @@ func TestPrintNonTerminatedPod(t *testing.T) { { // Test pod phase Unknown should be printed api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "test3"}, + ObjectMeta: metav1.ObjectMeta{Name: "test3"}, Spec: api.PodSpec{Containers: make([]api.Container, 2)}, Status: api.PodStatus{ Phase: api.PodUnknown, @@ -1381,7 +1381,7 @@ func TestPrintNonTerminatedPod(t *testing.T) { { // Test pod phase Succeeded shouldn't be printed api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "test4"}, + ObjectMeta: metav1.ObjectMeta{Name: "test4"}, Spec: api.PodSpec{Containers: make([]api.Container, 2)}, Status: api.PodStatus{ Phase: api.PodSucceeded, @@ -1396,7 +1396,7 @@ func TestPrintNonTerminatedPod(t *testing.T) { { // Test pod phase Failed shouldn't be printed api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "test5"}, + ObjectMeta: metav1.ObjectMeta{Name: "test5"}, Spec: api.PodSpec{Containers: make([]api.Container, 2)}, Status: api.PodStatus{ Phase: api.PodFailed, @@ -1432,7 +1432,7 @@ func TestPrintPodWithLabels(t *testing.T) { { // Test name, num of containers, restarts, container ready status api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test1", Labels: map[string]string{"col1": "asd", "COL2": "zxc"}, }, @@ -1452,7 +1452,7 @@ func TestPrintPodWithLabels(t *testing.T) { { // Test name, num of containers, restarts, container ready status api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test1", Labels: map[string]string{"col1": "asd", "COL2": "zxc"}, }, @@ -1516,7 +1516,7 @@ func TestPrintDeployment(t *testing.T) { }{ { extensions.Deployment{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test1", CreationTimestamp: metav1.Time{Time: time.Now().Add(1.9e9)}, }, @@ -1573,7 +1573,7 @@ func TestPrintDaemonSet(t *testing.T) { }{ { extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test1", CreationTimestamp: metav1.Time{Time: time.Now().Add(1.9e9)}, }, @@ -1610,7 +1610,7 @@ func TestPrintJob(t *testing.T) { }{ { batch.Job{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "job1", CreationTimestamp: metav1.Time{Time: time.Now().Add(1.9e9)}, }, @@ -1625,7 +1625,7 @@ func TestPrintJob(t *testing.T) { }, { batch.Job{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "job2", CreationTimestamp: metav1.Time{Time: time.Now().AddDate(-10, 0, 0)}, }, @@ -1660,7 +1660,7 @@ func TestPrintPodShowLabels(t *testing.T) { { // Test name, num of containers, restarts, container ready status api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test1", Labels: map[string]string{"col1": "asd", "COL2": "zxc"}, }, @@ -1680,7 +1680,7 @@ func TestPrintPodShowLabels(t *testing.T) { { // Test name, num of containers, restarts, container ready status api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test1", Labels: map[string]string{"col3": "asd", "COL4": "zxc"}, }, @@ -1720,7 +1720,7 @@ func TestPrintService(t *testing.T) { { // Test name, cluster ip, port with protocol api.Service{ - ObjectMeta: api.ObjectMeta{Name: "test1"}, + ObjectMeta: metav1.ObjectMeta{Name: "test1"}, Spec: api.ServiceSpec{ Type: api.ServiceTypeClusterIP, Ports: []api.ServicePort{ @@ -1735,7 +1735,7 @@ func TestPrintService(t *testing.T) { { // Test name, cluster ip, port:nodePort with protocol api.Service{ - ObjectMeta: api.ObjectMeta{Name: "test2"}, + ObjectMeta: metav1.ObjectMeta{Name: "test2"}, Spec: api.ServiceSpec{ Type: api.ServiceTypeClusterIP, Ports: []api.ServicePort{ @@ -1769,7 +1769,7 @@ func TestPrintPodDisruptionBudget(t *testing.T) { }{ { policy.PodDisruptionBudget{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "ns1", Name: "pdb1", CreationTimestamp: metav1.Time{Time: time.Now().Add(1.9e9)}, diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/rollback.go b/vendor/k8s.io/kubernetes/pkg/kubectl/rollback.go index 6b6841ce..16c174f0 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/rollback.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/rollback.go @@ -23,6 +23,7 @@ import ( "os/signal" "syscall" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/watch" @@ -73,7 +74,7 @@ func (r *DeploymentRollbacker) Rollback(obj runtime.Object, updatedAnnotations m result := "" // Get current events - events, err := r.c.Core().Events(d.Namespace).List(api.ListOptions{}) + events, err := r.c.Core().Events(d.Namespace).List(metav1.ListOptions{}) if err != nil { return result, err } @@ -82,7 +83,7 @@ func (r *DeploymentRollbacker) Rollback(obj runtime.Object, updatedAnnotations m return result, err } // Watch for the changes of events - watch, err := r.c.Core().Events(d.Namespace).Watch(api.ListOptions{Watch: true, ResourceVersion: events.ResourceVersion}) + watch, err := r.c.Core().Events(d.Namespace).Watch(metav1.ListOptions{Watch: true, ResourceVersion: events.ResourceVersion}) if err != nil { return result, err } @@ -155,8 +156,8 @@ func simpleDryRun(deployment *extensions.Deployment, c clientset.Interface, toRe revisionToSpec[v] = &rs.Spec.Template } - if len(revisionToSpec) == 0 { - return "No rollout history found.", nil + if len(revisionToSpec) < 2 { + return "", fmt.Errorf("no rollout history found for deployment %q", deployment.Name) } if toRevision > 0 { @@ -180,7 +181,7 @@ func simpleDryRun(deployment *extensions.Deployment, c clientset.Interface, toRe } sliceutil.SortInts64(revisions) - template, _ := revisionToSpec[revisions[len(revisions)-1]] + template, _ := revisionToSpec[revisions[len(revisions)-2]] buf := bytes.NewBuffer([]byte{}) buf.WriteString("\n") internalTemplate := &api.PodTemplateSpec{} diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/rolling_updater.go b/vendor/k8s.io/kubernetes/pkg/kubectl/rolling_updater.go index 0f703e5c..a144fb96 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/rolling_updater.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/rolling_updater.go @@ -29,13 +29,13 @@ import ( "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/client-go/util/integer" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" coreclient "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion" "k8s.io/kubernetes/pkg/client/retry" client "k8s.io/kubernetes/pkg/client/unversioned" deploymentutil "k8s.io/kubernetes/pkg/controller/deployment/util" - "k8s.io/kubernetes/pkg/util/integer" "k8s.io/kubernetes/pkg/util/intstr" ) @@ -415,7 +415,7 @@ func (r *RollingUpdater) readyPods(oldRc, newRc *api.ReplicationController, minR for i := range controllers { controller := controllers[i] selector := labels.Set(controller.Spec.Selector).AsSelector() - options := api.ListOptions{LabelSelector: selector} + options := metav1.ListOptions{LabelSelector: selector.String()} pods, err := r.podClient.Pods(controller.Namespace).List(options) if err != nil { return 0, 0, err @@ -544,7 +544,7 @@ func Rename(c coreclient.ReplicationControllersGetter, rc *api.ReplicationContro rc.ResourceVersion = "" // First delete the oldName RC and orphan its pods. trueVar := true - err := c.ReplicationControllers(rc.Namespace).Delete(oldName, &api.DeleteOptions{OrphanDependents: &trueVar}) + err := c.ReplicationControllers(rc.Namespace).Delete(oldName, &metav1.DeleteOptions{OrphanDependents: &trueVar}) if err != nil && !errors.IsNotFound(err) { return err } @@ -708,7 +708,7 @@ func AddDeploymentKeyToReplicationController(oldRc *api.ReplicationController, r // Update all pods managed by the rc to have the new hash label, so they are correctly adopted // TODO: extract the code from the label command and re-use it here. selector := labels.SelectorFromSet(oldRc.Spec.Selector) - options := api.ListOptions{LabelSelector: selector} + options := metav1.ListOptions{LabelSelector: selector.String()} podList, err := podClient.Pods(namespace).List(options) if err != nil { return nil, err @@ -749,7 +749,7 @@ func AddDeploymentKeyToReplicationController(oldRc *api.ReplicationController, r // doesn't see the update to its pod template and creates a new pod with the old labels after // we've finished re-adopting existing pods to the rc. selector = labels.SelectorFromSet(selectorCopy) - options = api.ListOptions{LabelSelector: selector} + options = metav1.ListOptions{LabelSelector: selector.String()} podList, err = podClient.Pods(namespace).List(options) for ix := range podList.Items { pod := &podList.Items[ix] @@ -830,7 +830,7 @@ func updatePodWithRetries(podClient coreclient.PodsGetter, namespace string, pod } func FindSourceController(r coreclient.ReplicationControllersGetter, namespace, name string) (*api.ReplicationController, error) { - list, err := r.ReplicationControllers(namespace).List(api.ListOptions{}) + list, err := r.ReplicationControllers(namespace).List(metav1.ListOptions{}) if err != nil { return nil, err } diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/rolling_updater_test.go b/vendor/k8s.io/kubernetes/pkg/kubectl/rolling_updater_test.go index 12be46b0..b6934a75 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/rolling_updater_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/rolling_updater_test.go @@ -31,12 +31,12 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/sets" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" apitesting "k8s.io/kubernetes/pkg/api/testing" "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/fake" - "k8s.io/kubernetes/pkg/client/restclient" manualfake "k8s.io/kubernetes/pkg/client/restclient/fake" testcore "k8s.io/kubernetes/pkg/client/testing/core" "k8s.io/kubernetes/pkg/util/intstr" @@ -44,8 +44,8 @@ import ( func oldRc(replicas int, original int) *api.ReplicationController { return &api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ - Namespace: api.NamespaceDefault, + ObjectMeta: metav1.ObjectMeta{ + Namespace: metav1.NamespaceDefault, Name: "foo-v1", UID: "7764ae47-9092-11e4-8393-42010af018ff", Annotations: map[string]string{ @@ -56,7 +56,7 @@ func oldRc(replicas int, original int) *api.ReplicationController { Replicas: int32(replicas), Selector: map[string]string{"version": "v1"}, Template: &api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo-v1", Labels: map[string]string{"version": "v1"}, }, @@ -71,14 +71,14 @@ func oldRc(replicas int, original int) *api.ReplicationController { func newRc(replicas int, desired int) *api.ReplicationController { rc := oldRc(replicas, replicas) rc.Spec.Template = &api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo-v2", Labels: map[string]string{"version": "v2"}, }, } rc.Spec.Selector = map[string]string{"version": "v2"} - rc.ObjectMeta = api.ObjectMeta{ - Namespace: api.NamespaceDefault, + rc.ObjectMeta = metav1.ObjectMeta{ + Namespace: metav1.NamespaceDefault, Name: "foo-v2", Annotations: map[string]string{ desiredReplicasAnnotation: fmt.Sprintf("%d", desired), @@ -948,8 +948,8 @@ func TestRollingUpdater_multipleContainersInPod(t *testing.T) { }{ { oldRc: &api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ - Namespace: api.NamespaceDefault, + ObjectMeta: metav1.ObjectMeta{ + Namespace: metav1.NamespaceDefault, Name: "foo", }, Spec: api.ReplicationControllerSpec{ @@ -957,7 +957,7 @@ func TestRollingUpdater_multipleContainersInPod(t *testing.T) { "dk": "old", }, Template: &api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "dk": "old", }, @@ -978,8 +978,8 @@ func TestRollingUpdater_multipleContainersInPod(t *testing.T) { }, }, newRc: &api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ - Namespace: api.NamespaceDefault, + ObjectMeta: metav1.ObjectMeta{ + Namespace: metav1.NamespaceDefault, Name: "foo", }, Spec: api.ReplicationControllerSpec{ @@ -987,7 +987,7 @@ func TestRollingUpdater_multipleContainersInPod(t *testing.T) { "dk": "old", }, Template: &api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "dk": "old", }, @@ -1013,8 +1013,8 @@ func TestRollingUpdater_multipleContainersInPod(t *testing.T) { }, { oldRc: &api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ - Namespace: api.NamespaceDefault, + ObjectMeta: metav1.ObjectMeta{ + Namespace: metav1.NamespaceDefault, Name: "bar", }, Spec: api.ReplicationControllerSpec{ @@ -1022,7 +1022,7 @@ func TestRollingUpdater_multipleContainersInPod(t *testing.T) { "dk": "old", }, Template: &api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "dk": "old", }, @@ -1039,8 +1039,8 @@ func TestRollingUpdater_multipleContainersInPod(t *testing.T) { }, }, newRc: &api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ - Namespace: api.NamespaceDefault, + ObjectMeta: metav1.ObjectMeta{ + Namespace: metav1.NamespaceDefault, Name: "bar", }, Spec: api.ReplicationControllerSpec{ @@ -1048,7 +1048,7 @@ func TestRollingUpdater_multipleContainersInPod(t *testing.T) { "dk": "old", }, Template: &api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "dk": "old", }, @@ -1085,7 +1085,7 @@ func TestRollingUpdater_multipleContainersInPod(t *testing.T) { test.newRc.Name = fmt.Sprintf("%s-%s", test.newRc.Name, deploymentHash) config := &NewControllerConfig{ - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, OldName: test.oldRc.ObjectMeta.Name, NewName: test.newRc.ObjectMeta.Name, Image: test.image, @@ -1228,8 +1228,8 @@ func TestRollingUpdater_cleanupWithClients_Rename(t *testing.T) { func TestFindSourceController(t *testing.T) { ctrl1 := api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ - Namespace: api.NamespaceDefault, + ObjectMeta: metav1.ObjectMeta{ + Namespace: metav1.NamespaceDefault, Name: "foo", Annotations: map[string]string{ sourceIdAnnotation: "bar:1234", @@ -1237,8 +1237,8 @@ func TestFindSourceController(t *testing.T) { }, } ctrl2 := api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ - Namespace: api.NamespaceDefault, + ObjectMeta: metav1.ObjectMeta{ + Namespace: metav1.NamespaceDefault, Name: "bar", Annotations: map[string]string{ sourceIdAnnotation: "foo:12345", @@ -1246,8 +1246,8 @@ func TestFindSourceController(t *testing.T) { }, } ctrl3 := api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ - Namespace: api.NamespaceDefault, + ObjectMeta: metav1.ObjectMeta{ + Namespace: metav1.NamespaceDefault, Name: "baz", Annotations: map[string]string{ sourceIdAnnotation: "baz:45667", @@ -1328,8 +1328,8 @@ func TestUpdateExistingReplicationController(t *testing.T) { }{ { rc: &api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ - Namespace: api.NamespaceDefault, + ObjectMeta: metav1.ObjectMeta{ + Namespace: metav1.NamespaceDefault, Name: "foo", }, Spec: api.ReplicationControllerSpec{ @@ -1341,8 +1341,8 @@ func TestUpdateExistingReplicationController(t *testing.T) { deploymentValue: "some-hash", expectedRc: &api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ - Namespace: api.NamespaceDefault, + ObjectMeta: metav1.ObjectMeta{ + Namespace: metav1.NamespaceDefault, Name: "foo", Annotations: map[string]string{ "kubectl.kubernetes.io/next-controller-id": "foo", @@ -1353,7 +1353,7 @@ func TestUpdateExistingReplicationController(t *testing.T) { "dk": "some-hash", }, Template: &api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "dk": "some-hash", }, @@ -1364,13 +1364,13 @@ func TestUpdateExistingReplicationController(t *testing.T) { }, { rc: &api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ - Namespace: api.NamespaceDefault, + ObjectMeta: metav1.ObjectMeta{ + Namespace: metav1.NamespaceDefault, Name: "foo", }, Spec: api.ReplicationControllerSpec{ Template: &api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "dk": "some-other-hash", }, @@ -1386,8 +1386,8 @@ func TestUpdateExistingReplicationController(t *testing.T) { deploymentValue: "some-hash", expectedRc: &api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ - Namespace: api.NamespaceDefault, + ObjectMeta: metav1.ObjectMeta{ + Namespace: metav1.NamespaceDefault, Name: "foo", Annotations: map[string]string{ "kubectl.kubernetes.io/next-controller-id": "foo", @@ -1398,7 +1398,7 @@ func TestUpdateExistingReplicationController(t *testing.T) { "dk": "some-other-hash", }, Template: &api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "dk": "some-other-hash", }, @@ -1427,7 +1427,7 @@ func TestUpdateExistingReplicationController(t *testing.T) { func TestUpdateRcWithRetries(t *testing.T) { codec := testapi.Default.Codec() rc := &api.ReplicationController{ - ObjectMeta: api.ObjectMeta{Name: "rc", + ObjectMeta: metav1.ObjectMeta{Name: "rc", Labels: map[string]string{ "foo": "bar", }, @@ -1437,7 +1437,7 @@ func TestUpdateRcWithRetries(t *testing.T) { "foo": "bar", }, Template: &api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "foo": "bar", }, @@ -1532,13 +1532,13 @@ func TestAddDeploymentHash(t *testing.T) { buf := &bytes.Buffer{} codec := testapi.Default.Codec() rc := &api.ReplicationController{ - ObjectMeta: api.ObjectMeta{Name: "rc"}, + ObjectMeta: metav1.ObjectMeta{Name: "rc"}, Spec: api.ReplicationControllerSpec{ Selector: map[string]string{ "foo": "bar", }, Template: &api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "foo": "bar", }, @@ -1549,9 +1549,9 @@ func TestAddDeploymentHash(t *testing.T) { podList := &api.PodList{ Items: []api.Pod{ - {ObjectMeta: api.ObjectMeta{Name: "foo"}}, - {ObjectMeta: api.ObjectMeta{Name: "bar"}}, - {ObjectMeta: api.ObjectMeta{Name: "baz"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "foo"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "bar"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "baz"}}, }, } @@ -1597,7 +1597,7 @@ func TestAddDeploymentHash(t *testing.T) { restClient.Client = fakeClient.Client clientset := internalclientset.New(restClient) - if _, err := AddDeploymentKeyToReplicationController(rc, clientset.Core(), clientset.Core(), "dk", "hash", api.NamespaceDefault, buf); err != nil { + if _, err := AddDeploymentKeyToReplicationController(rc, clientset.Core(), clientset.Core(), "dk", "hash", metav1.NamespaceDefault, buf); err != nil { t.Errorf("unexpected error: %v", err) } for _, pod := range podList.Items { @@ -1624,8 +1624,8 @@ func TestRollingUpdater_readyPods(t *testing.T) { status = api.ConditionFalse } return &api.Pod{ - ObjectMeta: api.ObjectMeta{ - Namespace: api.NamespaceDefault, + ObjectMeta: metav1.ObjectMeta{ + Namespace: metav1.NamespaceDefault, Name: fmt.Sprintf("pod-%d", count), Labels: labels, }, diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/rollout_status_test.go b/vendor/k8s.io/kubernetes/pkg/kubectl/rollout_status_test.go index 1261f0c2..5d104e85 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/rollout_status_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/rollout_status_test.go @@ -19,7 +19,7 @@ package kubectl import ( "testing" - "k8s.io/kubernetes/pkg/api" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/apis/extensions" "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/fake" ) @@ -106,7 +106,7 @@ func TestDeploymentStatusViewerStatus(t *testing.T) { for _, test := range tests { d := &extensions.Deployment{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "bar", Name: "foo", UID: "8764ae47-9092-11e4-8393-42010af018ff", diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/run.go b/vendor/k8s.io/kubernetes/pkg/kubectl/run.go index e2775570..2e4dd41e 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/run.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/run.go @@ -100,7 +100,7 @@ func (DeploymentV1Beta1) Generate(genericParams map[string]interface{}) (runtime // TODO: use versioned types for generators so that we don't need to // set default values manually (see issue #17384) deployment := extensions.Deployment{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Labels: labels, }, @@ -108,7 +108,7 @@ func (DeploymentV1Beta1) Generate(genericParams map[string]interface{}) (runtime Replicas: int32(count), Selector: &metav1.LabelSelector{MatchLabels: labels}, Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: labels, }, Spec: *podSpec, @@ -266,13 +266,13 @@ func (JobV1) Generate(genericParams map[string]interface{}) (runtime.Object, err podSpec.RestartPolicy = restartPolicy job := batch.Job{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Labels: labels, }, Spec: batch.JobSpec{ Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: labels, }, Spec: *podSpec, @@ -360,7 +360,7 @@ func (CronJobV2Alpha1) Generate(genericParams map[string]interface{}) (runtime.O podSpec.RestartPolicy = restartPolicy cronJob := batch.CronJob{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Labels: labels, }, @@ -370,7 +370,7 @@ func (CronJobV2Alpha1) Generate(genericParams map[string]interface{}) (runtime.O JobTemplate: batch.JobTemplateSpec{ Spec: batch.JobSpec{ Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: labels, }, Spec: *podSpec, @@ -521,7 +521,7 @@ func (BasicReplicationController) Generate(genericParams map[string]interface{}) } controller := api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Labels: labels, }, @@ -529,7 +529,7 @@ func (BasicReplicationController) Generate(genericParams map[string]interface{}) Replicas: int32(count), Selector: labels, Template: &api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: labels, }, Spec: *podSpec, @@ -672,7 +672,7 @@ func (BasicPod) Generate(genericParams map[string]interface{}) (runtime.Object, // TODO: Figure out why we set ImagePullPolicy here, whether we can make it // consistent with the other places imagePullPolicy is set using flag. pod := api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Labels: labels, }, diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/run_test.go b/vendor/k8s.io/kubernetes/pkg/kubectl/run_test.go index 08b10aea..2633086c 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/run_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/run_test.go @@ -42,7 +42,7 @@ func TestGenerate(t *testing.T) { "port": "", }, expected: &api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{"run": "foo"}, }, @@ -50,7 +50,7 @@ func TestGenerate(t *testing.T) { Replicas: 1, Selector: map[string]string{"run": "foo"}, Template: &api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"run": "foo"}, }, Spec: api.PodSpec{ @@ -76,7 +76,7 @@ func TestGenerate(t *testing.T) { "env": []string{"a=b", "c=d"}, }, expected: &api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{"run": "foo"}, }, @@ -84,7 +84,7 @@ func TestGenerate(t *testing.T) { Replicas: 1, Selector: map[string]string{"run": "foo"}, Template: &api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"run": "foo"}, }, Spec: api.PodSpec{ @@ -120,7 +120,7 @@ func TestGenerate(t *testing.T) { "args": []string{"bar", "baz", "blah"}, }, expected: &api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{"run": "foo"}, }, @@ -128,7 +128,7 @@ func TestGenerate(t *testing.T) { Replicas: 1, Selector: map[string]string{"run": "foo"}, Template: &api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"run": "foo"}, }, Spec: api.PodSpec{ @@ -155,7 +155,7 @@ func TestGenerate(t *testing.T) { "command": "true", }, expected: &api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{"run": "foo"}, }, @@ -163,7 +163,7 @@ func TestGenerate(t *testing.T) { Replicas: 1, Selector: map[string]string{"run": "foo"}, Template: &api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"run": "foo"}, }, Spec: api.PodSpec{ @@ -187,7 +187,7 @@ func TestGenerate(t *testing.T) { "port": "80", }, expected: &api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{"run": "foo"}, }, @@ -195,7 +195,7 @@ func TestGenerate(t *testing.T) { Replicas: 1, Selector: map[string]string{"run": "foo"}, Template: &api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"run": "foo"}, }, Spec: api.PodSpec{ @@ -225,7 +225,7 @@ func TestGenerate(t *testing.T) { "hostport": "80", }, expected: &api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{"run": "foo"}, }, @@ -233,7 +233,7 @@ func TestGenerate(t *testing.T) { Replicas: 1, Selector: map[string]string{"run": "foo"}, Template: &api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"run": "foo"}, }, Spec: api.PodSpec{ @@ -273,7 +273,7 @@ func TestGenerate(t *testing.T) { "labels": "foo=bar,baz=blah", }, expected: &api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{"foo": "bar", "baz": "blah"}, }, @@ -281,7 +281,7 @@ func TestGenerate(t *testing.T) { Replicas: 1, Selector: map[string]string{"foo": "bar", "baz": "blah"}, Template: &api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"foo": "bar", "baz": "blah"}, }, Spec: api.PodSpec{ @@ -349,7 +349,7 @@ func TestGenerate(t *testing.T) { "limits": "cpu=400m,memory=200Mi", }, expected: &api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{"foo": "bar", "baz": "blah"}, }, @@ -357,7 +357,7 @@ func TestGenerate(t *testing.T) { Replicas: 1, Selector: map[string]string{"foo": "bar", "baz": "blah"}, Template: &api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"foo": "bar", "baz": "blah"}, }, Spec: api.PodSpec{ @@ -413,7 +413,7 @@ func TestGeneratePod(t *testing.T) { "port": "", }, expected: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Spec: api.PodSpec{ @@ -447,7 +447,7 @@ func TestGeneratePod(t *testing.T) { "env": []string{"a=b", "c=d"}, }, expected: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Spec: api.PodSpec{ @@ -480,7 +480,7 @@ func TestGeneratePod(t *testing.T) { "port": "80", }, expected: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Spec: api.PodSpec{ @@ -509,7 +509,7 @@ func TestGeneratePod(t *testing.T) { "hostport": "80", }, expected: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Spec: api.PodSpec{ @@ -548,7 +548,7 @@ func TestGeneratePod(t *testing.T) { "labels": "foo=bar,baz=blah", }, expected: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{"foo": "bar", "baz": "blah"}, }, @@ -574,7 +574,7 @@ func TestGeneratePod(t *testing.T) { "stdin": "true", }, expected: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{"foo": "bar", "baz": "blah"}, }, @@ -603,7 +603,7 @@ func TestGeneratePod(t *testing.T) { "leave-stdin-open": "true", }, expected: &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{"foo": "bar", "baz": "blah"}, }, @@ -661,7 +661,7 @@ func TestGenerateDeployment(t *testing.T) { "limits": "cpu=400m,memory=200Mi", }, expected: &extensions.Deployment{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{"foo": "bar", "baz": "blah"}, }, @@ -669,7 +669,7 @@ func TestGenerateDeployment(t *testing.T) { Replicas: 3, Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"foo": "bar", "baz": "blah"}}, Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"foo": "bar", "baz": "blah"}, }, Spec: api.PodSpec{ @@ -753,13 +753,13 @@ func TestGenerateJob(t *testing.T) { "restart": "OnFailure", }, expected: &batch.Job{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{"foo": "bar", "baz": "blah"}, }, Spec: batch.JobSpec{ Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"foo": "bar", "baz": "blah"}, }, Spec: api.PodSpec{ @@ -845,7 +845,7 @@ func TestGenerateCronJob(t *testing.T) { "schedule": "0/5 * * * ?", }, expected: &batch.CronJob{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{"foo": "bar", "baz": "blah"}, }, @@ -855,7 +855,7 @@ func TestGenerateCronJob(t *testing.T) { JobTemplate: batch.JobTemplateSpec{ Spec: batch.JobSpec{ Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"foo": "bar", "baz": "blah"}, }, Spec: api.PodSpec{ diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/scale.go b/vendor/k8s.io/kubernetes/pkg/kubectl/scale.go index dbf2b320..ebacf34c 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/scale.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/scale.go @@ -23,6 +23,7 @@ import ( "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apimachinery/pkg/watch" @@ -36,7 +37,6 @@ import ( coreclient "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion" extensionsclient "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion" client "k8s.io/kubernetes/pkg/client/unversioned" - "k8s.io/kubernetes/pkg/fields" ) // Scaler provides an interface for resources that can be scaled. @@ -224,8 +224,8 @@ func (scaler *ReplicationControllerScaler) Scale(namespace, name string, newSize return err } if !checkRC(currentRC) { - watchOptions := api.ListOptions{ - FieldSelector: fields.OneTermEqualSelector("metadata.name", name), + watchOptions := metav1.ListOptions{ + FieldSelector: fields.OneTermEqualSelector("metadata.name", name).String(), ResourceVersion: updatedResourceVersion, } watcher, err := scaler.c.ReplicationControllers(namespace).Watch(watchOptions) diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/scale_test.go b/vendor/k8s.io/kubernetes/pkg/kubectl/scale_test.go index 4aeeec85..6ea2b554 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/scale_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/scale_test.go @@ -68,7 +68,7 @@ func TestReplicationControllerScaleRetry(t *testing.T) { preconditions := ScalePrecondition{-1, ""} count := uint(3) name := "foo-v1" - namespace := api.NamespaceDefault + namespace := metav1.NamespaceDefault scaleFunc := ScaleCondition(&scaler, &preconditions, namespace, name, count, nil) pass, err := scaleFunc() @@ -127,7 +127,7 @@ func TestReplicationControllerScale(t *testing.T) { func TestReplicationControllerScaleFailsPreconditions(t *testing.T) { fake := fake.NewSimpleClientset(&api.ReplicationController{ - ObjectMeta: api.ObjectMeta{Namespace: api.NamespaceDefault, Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Namespace: metav1.NamespaceDefault, Name: "foo"}, Spec: api.ReplicationControllerSpec{ Replicas: 10, }, @@ -162,7 +162,7 @@ func TestValidateReplicationController(t *testing.T) { { preconditions: ScalePrecondition{-1, ""}, controller: api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ ResourceVersion: "foo", }, Spec: api.ReplicationControllerSpec{ @@ -175,7 +175,7 @@ func TestValidateReplicationController(t *testing.T) { { preconditions: ScalePrecondition{0, ""}, controller: api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ ResourceVersion: "foo", }, Spec: api.ReplicationControllerSpec{ @@ -188,7 +188,7 @@ func TestValidateReplicationController(t *testing.T) { { preconditions: ScalePrecondition{-1, "foo"}, controller: api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ ResourceVersion: "foo", }, Spec: api.ReplicationControllerSpec{ @@ -201,7 +201,7 @@ func TestValidateReplicationController(t *testing.T) { { preconditions: ScalePrecondition{10, "foo"}, controller: api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ ResourceVersion: "foo", }, Spec: api.ReplicationControllerSpec{ @@ -214,7 +214,7 @@ func TestValidateReplicationController(t *testing.T) { { preconditions: ScalePrecondition{10, "foo"}, controller: api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ ResourceVersion: "foo", }, Spec: api.ReplicationControllerSpec{ @@ -227,7 +227,7 @@ func TestValidateReplicationController(t *testing.T) { { preconditions: ScalePrecondition{10, "foo"}, controller: api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ ResourceVersion: "bar", }, Spec: api.ReplicationControllerSpec{ @@ -240,7 +240,7 @@ func TestValidateReplicationController(t *testing.T) { { preconditions: ScalePrecondition{10, "foo"}, controller: api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ ResourceVersion: "bar", }, Spec: api.ReplicationControllerSpec{ @@ -327,8 +327,8 @@ func TestJobScaleRetry(t *testing.T) { func job() *batch.Job { return &batch.Job{ - ObjectMeta: api.ObjectMeta{ - Namespace: api.NamespaceDefault, + ObjectMeta: metav1.ObjectMeta{ + Namespace: metav1.NamespaceDefault, Name: "foo", }, } @@ -376,8 +376,8 @@ func TestJobScaleInvalid(t *testing.T) { func TestJobScaleFailsPreconditions(t *testing.T) { ten := int32(10) fake := fake.NewSimpleClientset(&batch.Job{ - ObjectMeta: api.ObjectMeta{ - Namespace: api.NamespaceDefault, + ObjectMeta: metav1.ObjectMeta{ + Namespace: metav1.NamespaceDefault, Name: "foo", }, Spec: batch.JobSpec{ @@ -415,7 +415,7 @@ func TestValidateJob(t *testing.T) { { preconditions: ScalePrecondition{-1, ""}, job: batch.Job{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ ResourceVersion: "foo", }, Spec: batch.JobSpec{ @@ -428,7 +428,7 @@ func TestValidateJob(t *testing.T) { { preconditions: ScalePrecondition{0, ""}, job: batch.Job{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ ResourceVersion: "foo", }, Spec: batch.JobSpec{ @@ -441,7 +441,7 @@ func TestValidateJob(t *testing.T) { { preconditions: ScalePrecondition{-1, "foo"}, job: batch.Job{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ ResourceVersion: "foo", }, Spec: batch.JobSpec{ @@ -454,7 +454,7 @@ func TestValidateJob(t *testing.T) { { preconditions: ScalePrecondition{10, "foo"}, job: batch.Job{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ ResourceVersion: "foo", }, Spec: batch.JobSpec{ @@ -467,7 +467,7 @@ func TestValidateJob(t *testing.T) { { preconditions: ScalePrecondition{10, "foo"}, job: batch.Job{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ ResourceVersion: "foo", }, Spec: batch.JobSpec{ @@ -480,7 +480,7 @@ func TestValidateJob(t *testing.T) { { preconditions: ScalePrecondition{10, "foo"}, job: batch.Job{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ ResourceVersion: "foo", }, }, @@ -490,7 +490,7 @@ func TestValidateJob(t *testing.T) { { preconditions: ScalePrecondition{10, "foo"}, job: batch.Job{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ ResourceVersion: "bar", }, Spec: batch.JobSpec{ @@ -503,7 +503,7 @@ func TestValidateJob(t *testing.T) { { preconditions: ScalePrecondition{10, "foo"}, job: batch.Job{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ ResourceVersion: "bar", }, Spec: batch.JobSpec{ @@ -589,8 +589,8 @@ func TestDeploymentScaleRetry(t *testing.T) { func deployment() *extensions.Deployment { return &extensions.Deployment{ - ObjectMeta: api.ObjectMeta{ - Namespace: api.NamespaceDefault, + ObjectMeta: metav1.ObjectMeta{ + Namespace: metav1.NamespaceDefault, Name: "foo", }, } @@ -637,8 +637,8 @@ func TestDeploymentScaleInvalid(t *testing.T) { func TestDeploymentScaleFailsPreconditions(t *testing.T) { fake := fake.NewSimpleClientset(&extensions.Deployment{ - ObjectMeta: api.ObjectMeta{ - Namespace: api.NamespaceDefault, + ObjectMeta: metav1.ObjectMeta{ + Namespace: metav1.NamespaceDefault, Name: "foo", }, Spec: extensions.DeploymentSpec{ @@ -676,7 +676,7 @@ func TestValidateDeployment(t *testing.T) { { preconditions: ScalePrecondition{-1, ""}, deployment: extensions.Deployment{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ ResourceVersion: "foo", }, Spec: extensions.DeploymentSpec{ @@ -689,7 +689,7 @@ func TestValidateDeployment(t *testing.T) { { preconditions: ScalePrecondition{0, ""}, deployment: extensions.Deployment{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ ResourceVersion: "foo", }, Spec: extensions.DeploymentSpec{ @@ -702,7 +702,7 @@ func TestValidateDeployment(t *testing.T) { { preconditions: ScalePrecondition{-1, "foo"}, deployment: extensions.Deployment{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ ResourceVersion: "foo", }, Spec: extensions.DeploymentSpec{ @@ -715,7 +715,7 @@ func TestValidateDeployment(t *testing.T) { { preconditions: ScalePrecondition{10, "foo"}, deployment: extensions.Deployment{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ ResourceVersion: "foo", }, Spec: extensions.DeploymentSpec{ @@ -728,7 +728,7 @@ func TestValidateDeployment(t *testing.T) { { preconditions: ScalePrecondition{10, "foo"}, deployment: extensions.Deployment{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ ResourceVersion: "foo", }, Spec: extensions.DeploymentSpec{ @@ -741,7 +741,7 @@ func TestValidateDeployment(t *testing.T) { { preconditions: ScalePrecondition{10, "foo"}, deployment: extensions.Deployment{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ ResourceVersion: "foo", }, }, @@ -751,7 +751,7 @@ func TestValidateDeployment(t *testing.T) { { preconditions: ScalePrecondition{10, "foo"}, deployment: extensions.Deployment{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ ResourceVersion: "bar", }, Spec: extensions.DeploymentSpec{ @@ -764,7 +764,7 @@ func TestValidateDeployment(t *testing.T) { { preconditions: ScalePrecondition{10, "foo"}, deployment: extensions.Deployment{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ ResourceVersion: "bar", }, Spec: extensions.DeploymentSpec{ diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/secret_for_docker_registry_test.go b/vendor/k8s.io/kubernetes/pkg/kubectl/secret_for_docker_registry_test.go index 9a0595d8..563633de 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/secret_for_docker_registry_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/secret_for_docker_registry_test.go @@ -20,6 +20,7 @@ import ( "reflect" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api" ) @@ -44,7 +45,7 @@ func TestSecretForDockerRegistryGenerate(t *testing.T) { "docker-email": email, }, expected: &api.Secret{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Data: map[string][]byte{ diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/secret_for_tls_test.go b/vendor/k8s.io/kubernetes/pkg/kubectl/secret_for_tls_test.go index 212d9f57..be7a82d2 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/secret_for_tls_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/secret_for_tls_test.go @@ -23,8 +23,9 @@ import ( "reflect" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + utiltesting "k8s.io/client-go/util/testing" "k8s.io/kubernetes/pkg/api" - utiltesting "k8s.io/kubernetes/pkg/util/testing" ) var rsaCertPEM = `-----BEGIN CERTIFICATE----- @@ -133,7 +134,7 @@ func TestSecretForTLSGenerate(t *testing.T) { "cert": validCertPath, }, expected: &api.Secret{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Data: map[string][]byte{ @@ -151,7 +152,7 @@ func TestSecretForTLSGenerate(t *testing.T) { "cert": invalidCertPath, }, expected: &api.Secret{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Data: map[string][]byte{ @@ -169,7 +170,7 @@ func TestSecretForTLSGenerate(t *testing.T) { "cert": mismatchCertPath, }, expected: &api.Secret{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Data: map[string][]byte{ diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/secret_test.go b/vendor/k8s.io/kubernetes/pkg/kubectl/secret_test.go index 1114813b..cb9856d7 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/secret_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/secret_test.go @@ -20,6 +20,7 @@ import ( "reflect" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api" ) @@ -34,7 +35,7 @@ func TestSecretGenerate(t *testing.T) { "name": "foo", }, expected: &api.Secret{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Data: map[string][]byte{}, @@ -47,7 +48,7 @@ func TestSecretGenerate(t *testing.T) { "type": "my-type", }, expected: &api.Secret{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Data: map[string][]byte{}, @@ -61,7 +62,7 @@ func TestSecretGenerate(t *testing.T) { "from-literal": []string{"key1=value1", "key2=value2"}, }, expected: &api.Secret{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Data: map[string][]byte{ @@ -98,7 +99,7 @@ func TestSecretGenerate(t *testing.T) { "from-literal": []string{"key1==value1"}, }, expected: &api.Secret{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Data: map[string][]byte{ diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/service.go b/vendor/k8s.io/kubernetes/pkg/kubectl/service.go index 8ed2275f..84cf260c 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/service.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/service.go @@ -21,6 +21,7 @@ import ( "strconv" "strings" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/util/intstr" @@ -177,7 +178,7 @@ func generate(genericParams map[string]interface{}) (runtime.Object, error) { } service := api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Labels: labels, }, diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/service_basic.go b/vendor/k8s.io/kubernetes/pkg/kubectl/service_basic.go index b3e100b3..a2945794 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/service_basic.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/service_basic.go @@ -21,6 +21,7 @@ import ( "strconv" "strings" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/validation" "k8s.io/kubernetes/pkg/api" @@ -231,7 +232,7 @@ func (s ServiceCommonGeneratorV1) StructuredGenerate() (runtime.Object, error) { selector["app"] = s.Name service := api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: s.Name, Labels: labels, }, diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/service_basic_test.go b/vendor/k8s.io/kubernetes/pkg/kubectl/service_basic_test.go index 8aab29c8..93b4b713 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/service_basic_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/service_basic_test.go @@ -20,6 +20,7 @@ import ( "reflect" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/util/intstr" ) @@ -39,7 +40,7 @@ func TestServiceBasicGenerate(t *testing.T) { clusterip: "", serviceType: api.ServiceTypeClusterIP, expected: &api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "clusterip-ok", Labels: map[string]string{"app": "clusterip-ok"}, }, @@ -76,7 +77,7 @@ func TestServiceBasicGenerate(t *testing.T) { clusterip: "None", serviceType: api.ServiceTypeClusterIP, expected: &api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "clusterip-none-ok", Labels: map[string]string{"app": "clusterip-none-ok"}, }, @@ -93,7 +94,7 @@ func TestServiceBasicGenerate(t *testing.T) { clusterip: "", serviceType: api.ServiceTypeLoadBalancer, expected: &api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "loadbalancer-ok", Labels: map[string]string{"app": "loadbalancer-ok"}, }, diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/service_test.go b/vendor/k8s.io/kubernetes/pkg/kubectl/service_test.go index d887cf8b..64f835d2 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/service_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/service_test.go @@ -20,6 +20,7 @@ import ( "reflect" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/util/intstr" ) @@ -40,7 +41,7 @@ func TestGenerateService(t *testing.T) { "container-port": "1234", }, expected: api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test", }, Spec: api.ServiceSpec{ @@ -69,7 +70,7 @@ func TestGenerateService(t *testing.T) { "container-port": "foobar", }, expected: api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test", }, Spec: api.ServiceSpec{ @@ -98,7 +99,7 @@ func TestGenerateService(t *testing.T) { "container-port": "1234", }, expected: api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test", Labels: map[string]string{ "key1": "value1", @@ -131,7 +132,7 @@ func TestGenerateService(t *testing.T) { "external-ip": "1.2.3.4", }, expected: api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test", }, Spec: api.ServiceSpec{ @@ -162,7 +163,7 @@ func TestGenerateService(t *testing.T) { "create-external-load-balancer": "true", }, expected: api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test", }, Spec: api.ServiceSpec{ @@ -193,7 +194,7 @@ func TestGenerateService(t *testing.T) { "type": string(api.ServiceTypeNodePort), }, expected: api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test", }, Spec: api.ServiceSpec{ @@ -224,7 +225,7 @@ func TestGenerateService(t *testing.T) { "type": string(api.ServiceTypeNodePort), }, expected: api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test", }, Spec: api.ServiceSpec{ @@ -253,7 +254,7 @@ func TestGenerateService(t *testing.T) { "container-port": "1234", }, expected: api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test", }, Spec: api.ServiceSpec{ @@ -283,7 +284,7 @@ func TestGenerateService(t *testing.T) { "session-affinity": "ClientIP", }, expected: api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test", }, Spec: api.ServiceSpec{ @@ -314,7 +315,7 @@ func TestGenerateService(t *testing.T) { "cluster-ip": "10.10.10.10", }, expected: api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test", }, Spec: api.ServiceSpec{ @@ -344,7 +345,7 @@ func TestGenerateService(t *testing.T) { "cluster-ip": "None", }, expected: api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test", }, Spec: api.ServiceSpec{ @@ -373,7 +374,7 @@ func TestGenerateService(t *testing.T) { "container-port": "foobar", }, expected: api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test", }, Spec: api.ServiceSpec{ @@ -407,7 +408,7 @@ func TestGenerateService(t *testing.T) { "target-port": "1234", }, expected: api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test", }, Spec: api.ServiceSpec{ @@ -440,7 +441,7 @@ func TestGenerateService(t *testing.T) { "protocol": "TCP", }, expected: api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test", }, Spec: api.ServiceSpec{ @@ -473,7 +474,7 @@ func TestGenerateService(t *testing.T) { "protocols": "8080/UDP", }, expected: api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test", }, Spec: api.ServiceSpec{ @@ -506,7 +507,7 @@ func TestGenerateService(t *testing.T) { "protocols": "8080/UDP,8081/TCP", }, expected: api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test", }, Spec: api.ServiceSpec{ @@ -546,7 +547,7 @@ func TestGenerateService(t *testing.T) { "cluster-ip": "None", }, expected: api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test", }, Spec: api.ServiceSpec{ diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/serviceaccount_test.go b/vendor/k8s.io/kubernetes/pkg/kubectl/serviceaccount_test.go index 1eedeec3..e8223914 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/serviceaccount_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/serviceaccount_test.go @@ -20,6 +20,7 @@ import ( "reflect" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api" ) @@ -32,7 +33,7 @@ func TestServiceAccountGenerate(t *testing.T) { { name: "foo", expected: &api.ServiceAccount{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, }, diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/sorting_printer.go b/vendor/k8s.io/kubernetes/pkg/kubectl/sorting_printer.go index 2219b221..2aa12bb6 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/sorting_printer.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/sorting_printer.go @@ -28,9 +28,9 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/client-go/util/integer" + "k8s.io/client-go/util/jsonpath" "k8s.io/kubernetes/pkg/api/v1" - "k8s.io/kubernetes/pkg/util/integer" - "k8s.io/kubernetes/pkg/util/jsonpath" ) // Sorting printer sorts list types before delegating to another printer. diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/sorting_printer_test.go b/vendor/k8s.io/kubernetes/pkg/kubectl/sorting_printer_test.go index c2318891..62608d2b 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/sorting_printer_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/sorting_printer_test.go @@ -38,19 +38,19 @@ func TestSortingPrinter(t *testing.T) { intPtr := func(val int32) *int32 { return &val } a := &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "a", }, } b := &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "b", }, } c := &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "c", }, } @@ -66,17 +66,17 @@ func TestSortingPrinter(t *testing.T) { obj: &api.PodList{ Items: []api.Pod{ { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "a", }, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "b", }, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "c", }, }, @@ -85,17 +85,17 @@ func TestSortingPrinter(t *testing.T) { sort: &api.PodList{ Items: []api.Pod{ { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "a", }, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "b", }, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "c", }, }, @@ -108,17 +108,17 @@ func TestSortingPrinter(t *testing.T) { obj: &api.PodList{ Items: []api.Pod{ { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "b", }, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "c", }, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "a", }, }, @@ -127,17 +127,17 @@ func TestSortingPrinter(t *testing.T) { sort: &api.PodList{ Items: []api.Pod{ { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "a", }, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "b", }, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "c", }, }, @@ -150,17 +150,17 @@ func TestSortingPrinter(t *testing.T) { obj: &api.PodList{ Items: []api.Pod{ { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ CreationTimestamp: metav1.Unix(300, 0), }, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ CreationTimestamp: metav1.Unix(100, 0), }, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ CreationTimestamp: metav1.Unix(200, 0), }, }, @@ -169,17 +169,17 @@ func TestSortingPrinter(t *testing.T) { sort: &api.PodList{ Items: []api.Pod{ { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ CreationTimestamp: metav1.Unix(100, 0), }, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ CreationTimestamp: metav1.Unix(200, 0), }, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ CreationTimestamp: metav1.Unix(300, 0), }, }, diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/stop.go b/vendor/k8s.io/kubernetes/pkg/kubectl/stop.go index 6e6b1ee4..61f69ead 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/stop.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/stop.go @@ -22,7 +22,6 @@ import ( "time" "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime/schema" @@ -52,7 +51,7 @@ const ( // gracePeriod is time given to an API object for it to delete itself cleanly, // e.g., pod shutdown. It may or may not be supported by the API object. type Reaper interface { - Stop(namespace, name string, timeout time.Duration, gracePeriod *api.DeleteOptions) error + Stop(namespace, name string, timeout time.Duration, gracePeriod *metav1.DeleteOptions) error } type NoSuchReaperError struct { @@ -138,12 +137,12 @@ type StatefulSetReaper struct { type objInterface interface { Delete(name string) error - Get(name string) (meta.Object, error) + Get(name string) (metav1.Object, error) } // getOverlappingControllers finds rcs that this controller overlaps, as well as rcs overlapping this controller. func getOverlappingControllers(rcClient coreclient.ReplicationControllerInterface, rc *api.ReplicationController) ([]api.ReplicationController, error) { - rcs, err := rcClient.List(api.ListOptions{}) + rcs, err := rcClient.List(metav1.ListOptions{}) if err != nil { return nil, fmt.Errorf("error getting replication controllers: %v", err) } @@ -158,7 +157,7 @@ func getOverlappingControllers(rcClient coreclient.ReplicationControllerInterfac return matchingRCs, nil } -func (reaper *ReplicationControllerReaper) Stop(namespace, name string, timeout time.Duration, gracePeriod *api.DeleteOptions) error { +func (reaper *ReplicationControllerReaper) Stop(namespace, name string, timeout time.Duration, gracePeriod *metav1.DeleteOptions) error { rc := reaper.client.ReplicationControllers(namespace) scaler := &ReplicationControllerScaler{reaper.client} ctrl, err := rc.Get(name, metav1.GetOptions{}) @@ -216,7 +215,7 @@ func (reaper *ReplicationControllerReaper) Stop(namespace, name string, timeout } } falseVar := false - deleteOptions := &api.DeleteOptions{OrphanDependents: &falseVar} + deleteOptions := &metav1.DeleteOptions{OrphanDependents: &falseVar} return rc.Delete(name, deleteOptions) } @@ -227,7 +226,7 @@ func getOverlappingReplicaSets(c extensionsclient.ReplicaSetInterface, rs *exten return overlappingRSs, exactMatchRSs, nil } -func (reaper *ReplicaSetReaper) Stop(namespace, name string, timeout time.Duration, gracePeriod *api.DeleteOptions) error { +func (reaper *ReplicaSetReaper) Stop(namespace, name string, timeout time.Duration, gracePeriod *metav1.DeleteOptions) error { rsc := reaper.client.ReplicaSets(namespace) scaler := &ReplicaSetScaler{reaper.client} rs, err := rsc.Get(name, metav1.GetOptions{}) @@ -287,11 +286,11 @@ func (reaper *ReplicaSetReaper) Stop(namespace, name string, timeout time.Durati } falseVar := false - deleteOptions := &api.DeleteOptions{OrphanDependents: &falseVar} + deleteOptions := &metav1.DeleteOptions{OrphanDependents: &falseVar} return rsc.Delete(name, deleteOptions) } -func (reaper *DaemonSetReaper) Stop(namespace, name string, timeout time.Duration, gracePeriod *api.DeleteOptions) error { +func (reaper *DaemonSetReaper) Stop(namespace, name string, timeout time.Duration, gracePeriod *metav1.DeleteOptions) error { ds, err := reaper.client.DaemonSets(namespace).Get(name, metav1.GetOptions{}) if err != nil { return err @@ -326,7 +325,7 @@ func (reaper *DaemonSetReaper) Stop(namespace, name string, timeout time.Duratio return reaper.client.DaemonSets(namespace).Delete(name, nil) } -func (reaper *StatefulSetReaper) Stop(namespace, name string, timeout time.Duration, gracePeriod *api.DeleteOptions) error { +func (reaper *StatefulSetReaper) Stop(namespace, name string, timeout time.Duration, gracePeriod *metav1.DeleteOptions) error { statefulsets := reaper.client.StatefulSets(namespace) scaler := &StatefulSetScaler{reaper.client} ps, err := statefulsets.Get(name, metav1.GetOptions{}) @@ -347,7 +346,7 @@ func (reaper *StatefulSetReaper) Stop(namespace, name string, timeout time.Durat // StatefulSet should track generation number. pods := reaper.podClient.Pods(namespace) selector, _ := metav1.LabelSelectorAsSelector(ps.Spec.Selector) - options := api.ListOptions{LabelSelector: selector} + options := metav1.ListOptions{LabelSelector: selector.String()} podList, err := pods.List(options) if err != nil { return err @@ -370,7 +369,7 @@ func (reaper *StatefulSetReaper) Stop(namespace, name string, timeout time.Durat return statefulsets.Delete(name, nil) } -func (reaper *JobReaper) Stop(namespace, name string, timeout time.Duration, gracePeriod *api.DeleteOptions) error { +func (reaper *JobReaper) Stop(namespace, name string, timeout time.Duration, gracePeriod *metav1.DeleteOptions) error { jobs := reaper.client.Jobs(namespace) pods := reaper.podClient.Pods(namespace) scaler := &JobScaler{reaper.client} @@ -392,7 +391,7 @@ func (reaper *JobReaper) Stop(namespace, name string, timeout time.Duration, gra } // at this point only dead pods are left, that should be removed selector, _ := metav1.LabelSelectorAsSelector(job.Spec.Selector) - options := api.ListOptions{LabelSelector: selector} + options := metav1.ListOptions{LabelSelector: selector.String()} podList, err := pods.List(options) if err != nil { return err @@ -413,7 +412,7 @@ func (reaper *JobReaper) Stop(namespace, name string, timeout time.Duration, gra return jobs.Delete(name, nil) } -func (reaper *DeploymentReaper) Stop(namespace, name string, timeout time.Duration, gracePeriod *api.DeleteOptions) error { +func (reaper *DeploymentReaper) Stop(namespace, name string, timeout time.Duration, gracePeriod *metav1.DeleteOptions) error { deployments := reaper.dClient.Deployments(namespace) replicaSets := reaper.rsClient.ReplicaSets(namespace) rsReaper := &ReplicaSetReaper{reaper.rsClient, reaper.pollInterval, reaper.timeout} @@ -447,7 +446,7 @@ func (reaper *DeploymentReaper) Stop(namespace, name string, timeout time.Durati return err } - options := api.ListOptions{LabelSelector: selector} + options := metav1.ListOptions{LabelSelector: selector.String()} rsList, err := replicaSets.List(options) if err != nil { return err @@ -469,7 +468,7 @@ func (reaper *DeploymentReaper) Stop(namespace, name string, timeout time.Durati // Delete deployment at the end. // Note: We delete deployment at the end so that if removing RSs fails, we at least have the deployment to retry. var falseVar = false - nonOrphanOption := api.DeleteOptions{OrphanDependents: &falseVar} + nonOrphanOption := metav1.DeleteOptions{OrphanDependents: &falseVar} return deployments.Delete(name, &nonOrphanOption) } @@ -495,7 +494,7 @@ func (reaper *DeploymentReaper) updateDeploymentWithRetries(namespace, name stri return deployment, err } -func (reaper *PodReaper) Stop(namespace, name string, timeout time.Duration, gracePeriod *api.DeleteOptions) error { +func (reaper *PodReaper) Stop(namespace, name string, timeout time.Duration, gracePeriod *metav1.DeleteOptions) error { pods := reaper.client.Pods(namespace) _, err := pods.Get(name, metav1.GetOptions{}) if err != nil { @@ -504,7 +503,7 @@ func (reaper *PodReaper) Stop(namespace, name string, timeout time.Duration, gra return pods.Delete(name, gracePeriod) } -func (reaper *ServiceReaper) Stop(namespace, name string, timeout time.Duration, gracePeriod *api.DeleteOptions) error { +func (reaper *ServiceReaper) Stop(namespace, name string, timeout time.Duration, gracePeriod *metav1.DeleteOptions) error { services := reaper.client.Services(namespace) _, err := services.Get(name, metav1.GetOptions{}) if err != nil { diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/stop_test.go b/vendor/k8s.io/kubernetes/pkg/kubectl/stop_test.go index 18363ede..6ab90d6f 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/stop_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/stop_test.go @@ -52,7 +52,7 @@ func TestReplicationControllerStop(t *testing.T) { &api.ReplicationControllerList{ // LIST Items: []api.ReplicationController{ { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: ns, }, @@ -72,7 +72,7 @@ func TestReplicationControllerStop(t *testing.T) { &api.ReplicationControllerList{ // LIST Items: []api.ReplicationController{ { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "baz", Namespace: ns, }, @@ -81,7 +81,7 @@ func TestReplicationControllerStop(t *testing.T) { Selector: map[string]string{"k3": "v3"}}, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: ns, }, @@ -102,7 +102,7 @@ func TestReplicationControllerStop(t *testing.T) { &api.ReplicationControllerList{ // LIST Items: []api.ReplicationController{ { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "baz", Namespace: ns, }, @@ -111,7 +111,7 @@ func TestReplicationControllerStop(t *testing.T) { Selector: map[string]string{"k1": "v1", "k2": "v2"}}, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: ns, }, @@ -133,7 +133,7 @@ func TestReplicationControllerStop(t *testing.T) { &api.ReplicationControllerList{ // LIST Items: []api.ReplicationController{ { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "baz", Namespace: ns, }, @@ -142,7 +142,7 @@ func TestReplicationControllerStop(t *testing.T) { Selector: map[string]string{"k1": "v1", "k2": "v2", "k3": "v3"}}, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "zaz", Namespace: ns, }, @@ -151,7 +151,7 @@ func TestReplicationControllerStop(t *testing.T) { Selector: map[string]string{"k1": "v1"}}, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: ns, }, @@ -174,7 +174,7 @@ func TestReplicationControllerStop(t *testing.T) { &api.ReplicationControllerList{ // LIST Items: []api.ReplicationController{ { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "zaz", Namespace: ns, }, @@ -183,7 +183,7 @@ func TestReplicationControllerStop(t *testing.T) { Selector: map[string]string{"k1": "v1"}}, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: ns, }, @@ -251,7 +251,7 @@ func TestReplicaSetStop(t *testing.T) { &extensions.ReplicaSetList{ // LIST Items: []extensions.ReplicaSet{ { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: ns, }, @@ -272,7 +272,7 @@ func TestReplicaSetStop(t *testing.T) { &extensions.ReplicaSetList{ // LIST Items: []extensions.ReplicaSet{ { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "baz", Namespace: ns, }, @@ -282,7 +282,7 @@ func TestReplicaSetStop(t *testing.T) { }, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: ns, }, @@ -342,7 +342,7 @@ func TestJobStop(t *testing.T) { &batch.JobList{ // LIST Items: []batch.Job{ { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: ns, }, @@ -366,7 +366,7 @@ func TestJobStop(t *testing.T) { &batch.JobList{ // LIST Items: []batch.Job{ { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: ns, }, @@ -382,7 +382,7 @@ func TestJobStop(t *testing.T) { &api.PodList{ // LIST Items: []api.Pod{ { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod1", Namespace: ns, Labels: map[string]string{"k1": "v1"}, @@ -427,7 +427,7 @@ func TestDeploymentStop(t *testing.T) { name := "foo" ns := "default" deployment := extensions.Deployment{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: ns, }, @@ -450,7 +450,7 @@ func TestDeploymentStop(t *testing.T) { Name: "SimpleDeployment", Objs: []runtime.Object{ &extensions.Deployment{ // GET - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: ns, }, @@ -474,7 +474,7 @@ func TestDeploymentStop(t *testing.T) { &extensions.ReplicaSetList{ // LIST Items: []extensions.ReplicaSet{ { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: ns, Labels: map[string]string{"k1": "v1"}, @@ -535,7 +535,7 @@ type noDeleteService struct { coreclient.ServiceInterface } -func (c *noDeleteService) Delete(service string, o *api.DeleteOptions) error { +func (c *noDeleteService) Delete(service string, o *metav1.DeleteOptions) error { return fmt.Errorf("I'm afraid I can't do that, Dave") } @@ -570,11 +570,11 @@ func (c *reaperCoreFake) Services(namespace string) coreclient.ServiceInterface } func pod() *api.Pod { - return &api.Pod{ObjectMeta: api.ObjectMeta{Namespace: api.NamespaceDefault, Name: "foo"}} + return &api.Pod{ObjectMeta: metav1.ObjectMeta{Namespace: metav1.NamespaceDefault, Name: "foo"}} } func service() *api.Service { - return &api.Service{ObjectMeta: api.ObjectMeta{Namespace: api.NamespaceDefault, Name: "foo"}} + return &api.Service{ObjectMeta: metav1.ObjectMeta{Namespace: metav1.NamespaceDefault, Name: "foo"}} } func TestSimpleStop(t *testing.T) { @@ -591,8 +591,8 @@ func TestSimpleStop(t *testing.T) { }, kind: api.Kind("Pod"), actions: []testcore.Action{ - testcore.NewGetAction(api.Resource("pods").WithVersion(""), api.NamespaceDefault, "foo"), - testcore.NewDeleteAction(api.Resource("pods").WithVersion(""), api.NamespaceDefault, "foo"), + testcore.NewGetAction(api.Resource("pods").WithVersion(""), metav1.NamespaceDefault, "foo"), + testcore.NewDeleteAction(api.Resource("pods").WithVersion(""), metav1.NamespaceDefault, "foo"), }, expectError: false, test: "stop pod succeeds", @@ -603,8 +603,8 @@ func TestSimpleStop(t *testing.T) { }, kind: api.Kind("Service"), actions: []testcore.Action{ - testcore.NewGetAction(api.Resource("services").WithVersion(""), api.NamespaceDefault, "foo"), - testcore.NewDeleteAction(api.Resource("services").WithVersion(""), api.NamespaceDefault, "foo"), + testcore.NewGetAction(api.Resource("services").WithVersion(""), metav1.NamespaceDefault, "foo"), + testcore.NewDeleteAction(api.Resource("services").WithVersion(""), metav1.NamespaceDefault, "foo"), }, expectError: false, test: "stop service succeeds", @@ -626,7 +626,7 @@ func TestSimpleStop(t *testing.T) { }, kind: api.Kind("Service"), actions: []testcore.Action{ - testcore.NewGetAction(api.Resource("services").WithVersion(""), api.NamespaceDefault, "foo"), + testcore.NewGetAction(api.Resource("services").WithVersion(""), metav1.NamespaceDefault, "foo"), }, expectError: true, test: "stop service fails, can't delete", @@ -664,7 +664,7 @@ func TestDeploymentNotFoundError(t *testing.T) { name := "foo" ns := "default" deployment := &extensions.Deployment{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: ns, }, @@ -682,7 +682,7 @@ func TestDeploymentNotFoundError(t *testing.T) { deployment, &extensions.ReplicaSetList{Items: []extensions.ReplicaSet{ { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: ns, }, diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/testing/BUILD b/vendor/k8s.io/kubernetes/pkg/kubectl/testing/BUILD index 70f7ce32..d2dfc5dd 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/testing/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/testing/BUILD @@ -15,7 +15,6 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api/v1:go_default_library", "//vendor:github.com/ugorji/go/codec", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/testing/types.generated.go b/vendor/k8s.io/kubernetes/pkg/kubectl/testing/types.generated.go index 62158ac1..f6c8e78f 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/testing/types.generated.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/testing/types.generated.go @@ -26,8 +26,7 @@ import ( "fmt" codec1978 "github.com/ugorji/go/codec" pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - pkg3_types "k8s.io/apimachinery/pkg/types" - pkg2_v1 "k8s.io/kubernetes/pkg/api/v1" + pkg2_types "k8s.io/apimachinery/pkg/types" "reflect" "runtime" time "time" @@ -64,10 +63,9 @@ func init() { } if false { // reference the types, but skip this branch at build/run time var v0 pkg1_v1.TypeMeta - var v1 pkg3_types.UID - var v2 pkg2_v1.ObjectMeta - var v3 time.Time - _, _, _, _ = v0, v1, v2, v3 + var v1 pkg2_types.UID + var v2 time.Time + _, _, _ = v0, v1, v2 } } @@ -158,7 +156,13 @@ func (x *TestStruct) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -168,7 +172,13 @@ func (x *TestStruct) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -358,57 +368,63 @@ func (x *TestStruct) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "Key": if r.TryDecodeAsNil() { x.Key = "" } else { - yyv9 := &x.Key - yym10 := z.DecBinary() - _ = yym10 + yyv10 := &x.Key + yym11 := z.DecBinary() + _ = yym11 if false { } else { - *((*string)(yyv9)) = r.DecodeString() + *((*string)(yyv10)) = r.DecodeString() } } case "Map": if r.TryDecodeAsNil() { x.Map = nil } else { - yyv11 := &x.Map - yym12 := z.DecBinary() - _ = yym12 + yyv12 := &x.Map + yym13 := z.DecBinary() + _ = yym13 if false { } else { - z.F.DecMapStringIntX(yyv11, false, d) + z.F.DecMapStringIntX(yyv12, false, d) } } case "StringList": if r.TryDecodeAsNil() { x.StringList = nil } else { - yyv13 := &x.StringList - yym14 := z.DecBinary() - _ = yym14 + yyv14 := &x.StringList + yym15 := z.DecBinary() + _ = yym15 if false { } else { - z.F.DecSliceStringX(yyv13, false, d) + z.F.DecSliceStringX(yyv14, false, d) } } case "IntList": if r.TryDecodeAsNil() { x.IntList = nil } else { - yyv15 := &x.IntList - yym16 := z.DecBinary() - _ = yym16 + yyv16 := &x.IntList + yym17 := z.DecBinary() + _ = yym17 if false { } else { - z.F.DecSliceIntX(yyv15, false, d) + z.F.DecSliceIntX(yyv16, false, d) } } default: @@ -422,16 +438,16 @@ func (x *TestStruct) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj17 int - var yyb17 bool - var yyhl17 bool = l >= 0 - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l + var yyj18 int + var yyb18 bool + var yyhl18 bool = l >= 0 + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb17 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb17 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -439,21 +455,21 @@ func (x *TestStruct) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv18 := &x.Kind - yym19 := z.DecBinary() - _ = yym19 + yyv19 := &x.Kind + yym20 := z.DecBinary() + _ = yym20 if false { } else { - *((*string)(yyv18)) = r.DecodeString() + *((*string)(yyv19)) = r.DecodeString() } } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb17 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb17 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -461,38 +477,44 @@ func (x *TestStruct) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv20 := &x.APIVersion - yym21 := z.DecBinary() - _ = yym21 + yyv21 := &x.APIVersion + yym22 := z.DecBinary() + _ = yym22 if false { } else { - *((*string)(yyv20)) = r.DecodeString() + *((*string)(yyv21)) = r.DecodeString() } } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb17 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb17 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv22 := &x.ObjectMeta - yyv22.CodecDecodeSelf(d) + yyv23 := &x.ObjectMeta + yym24 := z.DecBinary() + _ = yym24 + if false { + } else if z.HasExtensions() && z.DecExt(yyv23) { + } else { + z.DecFallback(yyv23, false) + } } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb17 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb17 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -500,21 +522,21 @@ func (x *TestStruct) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Key = "" } else { - yyv23 := &x.Key - yym24 := z.DecBinary() - _ = yym24 + yyv25 := &x.Key + yym26 := z.DecBinary() + _ = yym26 if false { } else { - *((*string)(yyv23)) = r.DecodeString() + *((*string)(yyv25)) = r.DecodeString() } } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb17 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb17 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -522,21 +544,21 @@ func (x *TestStruct) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Map = nil } else { - yyv25 := &x.Map - yym26 := z.DecBinary() - _ = yym26 + yyv27 := &x.Map + yym28 := z.DecBinary() + _ = yym28 if false { } else { - z.F.DecMapStringIntX(yyv25, false, d) + z.F.DecMapStringIntX(yyv27, false, d) } } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb17 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb17 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -544,21 +566,21 @@ func (x *TestStruct) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.StringList = nil } else { - yyv27 := &x.StringList - yym28 := z.DecBinary() - _ = yym28 + yyv29 := &x.StringList + yym30 := z.DecBinary() + _ = yym30 if false { } else { - z.F.DecSliceStringX(yyv27, false, d) + z.F.DecSliceStringX(yyv29, false, d) } } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb17 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb17 { + if yyb18 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -566,26 +588,26 @@ func (x *TestStruct) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.IntList = nil } else { - yyv29 := &x.IntList - yym30 := z.DecBinary() - _ = yym30 + yyv31 := &x.IntList + yym32 := z.DecBinary() + _ = yym32 if false { } else { - z.F.DecSliceIntX(yyv29, false, d) + z.F.DecSliceIntX(yyv31, false, d) } } for { - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l + yyj18++ + if yyhl18 { + yyb18 = yyj18 > l } else { - yyb17 = r.CheckBreak() + yyb18 = r.CheckBreak() } - if yyb17 { + if yyb18 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj17-1, "") + z.DecStructFieldNotFound(yyj18-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/testing/types.go b/vendor/k8s.io/kubernetes/pkg/kubectl/testing/types.go index 9f765377..ab9a54f4 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/testing/types.go +++ b/vendor/k8s.io/kubernetes/pkg/kubectl/testing/types.go @@ -19,17 +19,16 @@ package testing import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" - apiv1 "k8s.io/kubernetes/pkg/api/v1" ) type TestStruct struct { metav1.TypeMeta `json:",inline"` // +optional - apiv1.ObjectMeta `json:"metadata,omitempty"` - Key string `json:"Key"` - Map map[string]int `json:"Map"` - StringList []string `json:"StringList"` - IntList []int `json:"IntList"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Key string `json:"Key"` + Map map[string]int `json:"Map"` + StringList []string `json:"StringList"` + IntList []int `json:"IntList"` } func (obj *TestStruct) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/BUILD index ca827785..b4d1ffa2 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/BUILD @@ -45,10 +45,10 @@ go_library( "//pkg/capabilities:go_default_library", "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", + "//pkg/client/legacylisters:go_default_library", "//pkg/client/record:go_default_library", "//pkg/cloudprovider:go_default_library", "//pkg/fieldpath:go_default_library", - "//pkg/fields:go_default_library", "//pkg/kubelet/api:go_default_library", "//pkg/kubelet/cadvisor:go_default_library", "//pkg/kubelet/cm:go_default_library", @@ -72,6 +72,7 @@ go_library( "//pkg/kubelet/qos:go_default_library", "//pkg/kubelet/remote:go_default_library", "//pkg/kubelet/rkt:go_default_library", + "//pkg/kubelet/secret:go_default_library", "//pkg/kubelet/server:go_default_library", "//pkg/kubelet/server/remotecommand:go_default_library", "//pkg/kubelet/server/stats:go_default_library", @@ -87,12 +88,9 @@ go_library( "//pkg/securitycontext:go_default_library", "//pkg/util:go_default_library", "//pkg/util/bandwidth:go_default_library", - "//pkg/util/clock:go_default_library", "//pkg/util/config:go_default_library", "//pkg/util/dbus:go_default_library", "//pkg/util/exec:go_default_library", - "//pkg/util/flowcontrol:go_default_library", - "//pkg/util/integer:go_default_library", "//pkg/util/io:go_default_library", "//pkg/util/iptables:go_default_library", "//pkg/util/mount:go_default_library", @@ -115,6 +113,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/conversion", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/errors", @@ -125,6 +124,9 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/util/validation/field", "//vendor:k8s.io/apimachinery/pkg/util/wait", "//vendor:k8s.io/client-go/kubernetes", + "//vendor:k8s.io/client-go/util/clock", + "//vendor:k8s.io/client-go/util/flowcontrol", + "//vendor:k8s.io/client-go/util/integer", ], ) @@ -173,6 +175,7 @@ go_test( "//pkg/kubelet/pod/testing:go_default_library", "//pkg/kubelet/prober/results:go_default_library", "//pkg/kubelet/prober/testing:go_default_library", + "//pkg/kubelet/secret:go_default_library", "//pkg/kubelet/server/remotecommand:go_default_library", "//pkg/kubelet/server/stats:go_default_library", "//pkg/kubelet/status:go_default_library", @@ -181,11 +184,8 @@ go_test( "//pkg/kubelet/util/sliceutils:go_default_library", "//pkg/kubelet/volumemanager:go_default_library", "//pkg/util/bandwidth:go_default_library", - "//pkg/util/clock:go_default_library", - "//pkg/util/flowcontrol:go_default_library", "//pkg/util/mount:go_default_library", "//pkg/util/strategicpatch:go_default_library", - "//pkg/util/testing:go_default_library", "//pkg/util/uuid:go_default_library", "//pkg/version:go_default_library", "//pkg/volume:go_default_library", @@ -206,6 +206,9 @@ go_test( "//vendor:k8s.io/apimachinery/pkg/util/runtime", "//vendor:k8s.io/apimachinery/pkg/util/sets", "//vendor:k8s.io/apimachinery/pkg/util/wait", + "//vendor:k8s.io/client-go/util/clock", + "//vendor:k8s.io/client-go/util/flowcontrol", + "//vendor:k8s.io/client-go/util/testing", ], ) @@ -245,6 +248,7 @@ filegroup( "//pkg/kubelet/remote:all-srcs", "//pkg/kubelet/rkt:all-srcs", "//pkg/kubelet/rktshim:all-srcs", + "//pkg/kubelet/secret:all-srcs", "//pkg/kubelet/server:all-srcs", "//pkg/kubelet/status:all-srcs", "//pkg/kubelet/sysctl:all-srcs", diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/OWNERS b/vendor/k8s.io/kubernetes/pkg/kubelet/OWNERS index c0b8d3ac..f8dc405b 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/OWNERS @@ -1,4 +1,9 @@ -assignees: - - dchen1107 - - vishh - - yujuhong +approvers: +- Random-Liu +- dchen1107 +- derekwaynecarr +- timstclair +- vishh +- yujuhong +reviewers: +- sig-node-reviewers diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/active_deadline.go b/vendor/k8s.io/kubernetes/pkg/kubelet/active_deadline.go index 9356f0e3..4269016b 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/active_deadline.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/active_deadline.go @@ -20,11 +20,11 @@ import ( "fmt" "time" + "k8s.io/client-go/util/clock" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/record" "k8s.io/kubernetes/pkg/kubelet/lifecycle" "k8s.io/kubernetes/pkg/kubelet/status" - "k8s.io/kubernetes/pkg/util/clock" ) const ( diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/active_deadline_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/active_deadline_test.go index 77caabe3..5a98270f 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/active_deadline_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/active_deadline_test.go @@ -22,9 +22,9 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" + "k8s.io/client-go/util/clock" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/record" - "k8s.io/kubernetes/pkg/util/clock" ) // mockPodStatusProvider returns the status on the specified pod diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/api/testing/fake_image_service.go b/vendor/k8s.io/kubernetes/pkg/kubelet/api/testing/fake_image_service.go index 6bd243af..e27fd335 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/api/testing/fake_image_service.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/api/testing/fake_image_service.go @@ -57,8 +57,8 @@ func NewFakeImageService() *FakeImageService { func (r *FakeImageService) makeFakeImage(image string) *runtimeapi.Image { return &runtimeapi.Image{ - Id: &image, - Size_: &r.FakeImageSize, + Id: image, + Size_: r.FakeImageSize, RepoTags: []string{image}, } } @@ -72,7 +72,7 @@ func (r *FakeImageService) ListImages(filter *runtimeapi.ImageFilter) ([]*runtim images := make([]*runtimeapi.Image, 0) for _, img := range r.Images { if filter != nil && filter.Image != nil { - if !sliceutils.StringInSlice(filter.Image.GetImage(), img.RepoTags) { + if !sliceutils.StringInSlice(filter.Image.Image, img.RepoTags) { continue } } @@ -88,7 +88,7 @@ func (r *FakeImageService) ImageStatus(image *runtimeapi.ImageSpec) (*runtimeapi r.Called = append(r.Called, "ImageStatus") - return r.Images[image.GetImage()], nil + return r.Images[image.Image], nil } func (r *FakeImageService) PullImage(image *runtimeapi.ImageSpec, auth *runtimeapi.AuthConfig) (string, error) { @@ -99,9 +99,9 @@ func (r *FakeImageService) PullImage(image *runtimeapi.ImageSpec, auth *runtimea // ImageID should be randomized for real container runtime, but here just use // image's name for easily making fake images. - imageID := image.GetImage() + imageID := image.Image if _, ok := r.Images[imageID]; !ok { - r.Images[imageID] = r.makeFakeImage(image.GetImage()) + r.Images[imageID] = r.makeFakeImage(image.Image) } return imageID, nil @@ -114,7 +114,7 @@ func (r *FakeImageService) RemoveImage(image *runtimeapi.ImageSpec) error { r.Called = append(r.Called, "RemoveImage") // Remove the image - delete(r.Images, image.GetImage()) + delete(r.Images, image.Image) return nil } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/api/testing/fake_runtime_service.go b/vendor/k8s.io/kubernetes/pkg/kubelet/api/testing/fake_runtime_service.go index 1a2fe402..7eb02383 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/api/testing/fake_runtime_service.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/api/testing/fake_runtime_service.go @@ -61,7 +61,7 @@ func (r *FakeRuntimeService) SetFakeSandboxes(sandboxes []*FakePodSandbox) { r.Sandboxes = make(map[string]*FakePodSandbox) for _, sandbox := range sandboxes { - sandboxID := sandbox.GetId() + sandboxID := sandbox.Id r.Sandboxes[sandboxID] = sandbox } } @@ -72,7 +72,7 @@ func (r *FakeRuntimeService) SetFakeContainers(containers []*FakeContainer) { r.Containers = make(map[string]*FakeContainer) for _, c := range containers { - containerID := c.GetId() + containerID := c.Id r.Containers[containerID] = c } @@ -103,10 +103,10 @@ func (r *FakeRuntimeService) Version(apiVersion string) (*runtimeapi.VersionResp r.Called = append(r.Called, "Version") return &runtimeapi.VersionResponse{ - Version: &version, - RuntimeName: &FakeRuntimeName, - RuntimeVersion: &version, - RuntimeApiVersion: &version, + Version: version, + RuntimeName: FakeRuntimeName, + RuntimeVersion: version, + RuntimeApiVersion: version, }, nil } @@ -128,16 +128,15 @@ func (r *FakeRuntimeService) RunPodSandbox(config *runtimeapi.PodSandboxConfig) // PodSandboxID should be randomized for real container runtime, but here just use // fixed name from BuildSandboxName() for easily making fake sandboxes. podSandboxID := BuildSandboxName(config.Metadata) - createdAt := time.Now().Unix() - readyState := runtimeapi.PodSandboxState_SANDBOX_READY + createdAt := time.Now().UnixNano() r.Sandboxes[podSandboxID] = &FakePodSandbox{ PodSandboxStatus: runtimeapi.PodSandboxStatus{ - Id: &podSandboxID, + Id: podSandboxID, Metadata: config.Metadata, - State: &readyState, - CreatedAt: &createdAt, + State: runtimeapi.PodSandboxState_SANDBOX_READY, + CreatedAt: createdAt, Network: &runtimeapi.PodSandboxNetworkStatus{ - Ip: &FakePodSandboxIP, + Ip: FakePodSandboxIP, }, Labels: config.Labels, Annotations: config.Annotations, @@ -153,9 +152,8 @@ func (r *FakeRuntimeService) StopPodSandbox(podSandboxID string) error { r.Called = append(r.Called, "StopPodSandbox") - notReadyState := runtimeapi.PodSandboxState_SANDBOX_NOTREADY if s, ok := r.Sandboxes[podSandboxID]; ok { - s.State = ¬ReadyState + s.State = runtimeapi.PodSandboxState_SANDBOX_NOTREADY } else { return fmt.Errorf("pod sandbox %s not found", podSandboxID) } @@ -199,10 +197,10 @@ func (r *FakeRuntimeService) ListPodSandbox(filter *runtimeapi.PodSandboxFilter) result := make([]*runtimeapi.PodSandbox, 0) for id, s := range r.Sandboxes { if filter != nil { - if filter.Id != nil && filter.GetId() != id { + if filter.Id != "" && filter.Id != id { continue } - if filter.State != nil && filter.GetState() != s.GetState() { + if filter.State != nil && filter.GetState().State != s.State { continue } if filter.LabelSelector != nil && !filterInLabels(filter.LabelSelector, s.GetLabels()) { @@ -240,17 +238,17 @@ func (r *FakeRuntimeService) CreateContainer(podSandboxID string, config *runtim // ContainerID should be randomized for real container runtime, but here just use // fixed BuildContainerName() for easily making fake containers. containerID := BuildContainerName(config.Metadata, podSandboxID) - createdAt := time.Now().Unix() + createdAt := time.Now().UnixNano() createdState := runtimeapi.ContainerState_CONTAINER_CREATED - imageRef := config.Image.GetImage() + imageRef := config.Image.Image r.Containers[containerID] = &FakeContainer{ ContainerStatus: runtimeapi.ContainerStatus{ - Id: &containerID, + Id: containerID, Metadata: config.Metadata, Image: config.Image, - ImageRef: &imageRef, - CreatedAt: &createdAt, - State: &createdState, + ImageRef: imageRef, + CreatedAt: createdAt, + State: createdState, Labels: config.Labels, Annotations: config.Annotations, }, @@ -272,10 +270,8 @@ func (r *FakeRuntimeService) StartContainer(containerID string) error { } // Set container to running. - startedAt := time.Now().Unix() - runningState := runtimeapi.ContainerState_CONTAINER_RUNNING - c.State = &runningState - c.StartedAt = &startedAt + c.State = runtimeapi.ContainerState_CONTAINER_RUNNING + c.StartedAt = time.Now().UnixNano() return nil } @@ -292,10 +288,10 @@ func (r *FakeRuntimeService) StopContainer(containerID string, timeout int64) er } // Set container to exited state. - finishedAt := time.Now().Unix() + finishedAt := time.Now().UnixNano() exitedState := runtimeapi.ContainerState_CONTAINER_EXITED - c.State = &exitedState - c.FinishedAt = &finishedAt + c.State = exitedState + c.FinishedAt = finishedAt return nil } @@ -321,13 +317,13 @@ func (r *FakeRuntimeService) ListContainers(filter *runtimeapi.ContainerFilter) result := make([]*runtimeapi.Container, 0) for _, s := range r.Containers { if filter != nil { - if filter.Id != nil && filter.GetId() != s.GetId() { + if filter.Id != "" && filter.Id != s.Id { continue } - if filter.PodSandboxId != nil && filter.GetPodSandboxId() != s.SandboxID { + if filter.PodSandboxId != "" && filter.PodSandboxId != s.SandboxID { continue } - if filter.State != nil && filter.GetState() != s.GetState() { + if filter.State != nil && filter.GetState().State != s.State { continue } if filter.LabelSelector != nil && !filterInLabels(filter.LabelSelector, s.GetLabels()) { @@ -338,7 +334,7 @@ func (r *FakeRuntimeService) ListContainers(filter *runtimeapi.ContainerFilter) result = append(result, &runtimeapi.Container{ Id: s.Id, CreatedAt: s.CreatedAt, - PodSandboxId: &s.SandboxID, + PodSandboxId: s.SandboxID, Metadata: s.Metadata, State: s.State, Image: s.Image, diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/api/testing/utils.go b/vendor/k8s.io/kubernetes/pkg/kubelet/api/testing/utils.go index 89fa2fe8..3b688188 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/api/testing/utils.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/api/testing/utils.go @@ -24,11 +24,11 @@ import ( func BuildContainerName(metadata *runtimeapi.ContainerMetadata, sandboxID string) string { // include the sandbox ID to make the container ID unique. - return fmt.Sprintf("%s_%s_%d", sandboxID, metadata.GetName(), metadata.GetAttempt()) + return fmt.Sprintf("%s_%s_%d", sandboxID, metadata.Name, metadata.Attempt) } func BuildSandboxName(metadata *runtimeapi.PodSandboxMetadata) string { - return fmt.Sprintf("%s_%s_%s_%d", metadata.GetName(), metadata.GetNamespace(), metadata.GetUid(), metadata.GetAttempt()) + return fmt.Sprintf("%s_%s_%s_%d", metadata.Name, metadata.Namespace, metadata.Uid, metadata.Attempt) } func filterInLabels(filter, labels map[string]string) bool { diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/api/v1alpha1/runtime/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/api/v1alpha1/runtime/BUILD index 95055131..3823b49e 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/api/v1alpha1/runtime/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/api/v1alpha1/runtime/BUILD @@ -15,7 +15,9 @@ go_library( ], tags = ["automanaged"], deps = [ + "//vendor:github.com/gogo/protobuf/gogoproto", "//vendor:github.com/gogo/protobuf/proto", + "//vendor:github.com/gogo/protobuf/sortkeys", "//vendor:golang.org/x/net/context", "//vendor:google.golang.org/grpc", ], diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/api/v1alpha1/runtime/api.pb.go b/vendor/k8s.io/kubernetes/pkg/kubelet/api/v1alpha1/runtime/api.pb.go index 6f824ed8..fcfeb16a 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/api/v1alpha1/runtime/api.pb.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/api/v1alpha1/runtime/api.pb.go @@ -19,102 +19,112 @@ limitations under the License. // DO NOT EDIT! /* -Package runtime is a generated protocol buffer package. + Package runtime is a generated protocol buffer package. -It is generated from these files: - api.proto + It is generated from these files: + api.proto -It has these top-level messages: - VersionRequest - VersionResponse - DNSConfig - PortMapping - Mount - NamespaceOption - LinuxSandboxSecurityContext - LinuxPodSandboxConfig - PodSandboxMetadata - PodSandboxConfig - RunPodSandboxRequest - RunPodSandboxResponse - StopPodSandboxRequest - StopPodSandboxResponse - RemovePodSandboxRequest - RemovePodSandboxResponse - PodSandboxStatusRequest - PodSandboxNetworkStatus - Namespace - LinuxPodSandboxStatus - PodSandboxStatus - PodSandboxStatusResponse - PodSandboxFilter - ListPodSandboxRequest - PodSandbox - ListPodSandboxResponse - ImageSpec - KeyValue - LinuxContainerResources - SELinuxOption - Capability - LinuxContainerSecurityContext - LinuxContainerConfig - ContainerMetadata - Device - ContainerConfig - CreateContainerRequest - CreateContainerResponse - StartContainerRequest - StartContainerResponse - StopContainerRequest - StopContainerResponse - RemoveContainerRequest - RemoveContainerResponse - ContainerFilter - ListContainersRequest - Container - ListContainersResponse - ContainerStatusRequest - ContainerStatus - ContainerStatusResponse - ExecSyncRequest - ExecSyncResponse - ExecRequest - ExecResponse - AttachRequest - AttachResponse - PortForwardRequest - PortForwardResponse - ImageFilter - ListImagesRequest - Image - ListImagesResponse - ImageStatusRequest - ImageStatusResponse - AuthConfig - PullImageRequest - PullImageResponse - RemoveImageRequest - RemoveImageResponse - NetworkConfig - RuntimeConfig - UpdateRuntimeConfigRequest - UpdateRuntimeConfigResponse - RuntimeCondition - RuntimeStatus - StatusRequest - StatusResponse + It has these top-level messages: + VersionRequest + VersionResponse + DNSConfig + PortMapping + Mount + NamespaceOption + Int64Value + LinuxSandboxSecurityContext + LinuxPodSandboxConfig + PodSandboxMetadata + PodSandboxConfig + RunPodSandboxRequest + RunPodSandboxResponse + StopPodSandboxRequest + StopPodSandboxResponse + RemovePodSandboxRequest + RemovePodSandboxResponse + PodSandboxStatusRequest + PodSandboxNetworkStatus + Namespace + LinuxPodSandboxStatus + PodSandboxStatus + PodSandboxStatusResponse + PodSandboxStateValue + PodSandboxFilter + ListPodSandboxRequest + PodSandbox + ListPodSandboxResponse + ImageSpec + KeyValue + LinuxContainerResources + SELinuxOption + Capability + LinuxContainerSecurityContext + LinuxContainerConfig + ContainerMetadata + Device + ContainerConfig + CreateContainerRequest + CreateContainerResponse + StartContainerRequest + StartContainerResponse + StopContainerRequest + StopContainerResponse + RemoveContainerRequest + RemoveContainerResponse + ContainerStateValue + ContainerFilter + ListContainersRequest + Container + ListContainersResponse + ContainerStatusRequest + ContainerStatus + ContainerStatusResponse + ExecSyncRequest + ExecSyncResponse + ExecRequest + ExecResponse + AttachRequest + AttachResponse + PortForwardRequest + PortForwardResponse + ImageFilter + ListImagesRequest + Image + ListImagesResponse + ImageStatusRequest + ImageStatusResponse + AuthConfig + PullImageRequest + PullImageResponse + RemoveImageRequest + RemoveImageResponse + NetworkConfig + RuntimeConfig + UpdateRuntimeConfigRequest + UpdateRuntimeConfigResponse + RuntimeCondition + RuntimeStatus + StatusRequest + StatusResponse */ package runtime import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" +import _ "github.com/gogo/protobuf/gogoproto" import ( context "golang.org/x/net/context" grpc "google.golang.org/grpc" ) +import strings "strings" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import io "io" + // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf @@ -140,22 +150,9 @@ var Protocol_value = map[string]int32{ "UDP": 1, } -func (x Protocol) Enum() *Protocol { - p := new(Protocol) - *p = x - return p -} func (x Protocol) String() string { return proto.EnumName(Protocol_name, int32(x)) } -func (x *Protocol) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(Protocol_value, data, "Protocol") - if err != nil { - return err - } - *x = Protocol(value) - return nil -} func (Protocol) EnumDescriptor() ([]byte, []int) { return fileDescriptorApi, []int{0} } type PodSandboxState int32 @@ -174,22 +171,9 @@ var PodSandboxState_value = map[string]int32{ "SANDBOX_NOTREADY": 1, } -func (x PodSandboxState) Enum() *PodSandboxState { - p := new(PodSandboxState) - *p = x - return p -} func (x PodSandboxState) String() string { return proto.EnumName(PodSandboxState_name, int32(x)) } -func (x *PodSandboxState) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(PodSandboxState_value, data, "PodSandboxState") - if err != nil { - return err - } - *x = PodSandboxState(value) - return nil -} func (PodSandboxState) EnumDescriptor() ([]byte, []int) { return fileDescriptorApi, []int{1} } type ContainerState int32 @@ -214,89 +198,37 @@ var ContainerState_value = map[string]int32{ "CONTAINER_UNKNOWN": 3, } -func (x ContainerState) Enum() *ContainerState { - p := new(ContainerState) - *p = x - return p -} func (x ContainerState) String() string { return proto.EnumName(ContainerState_name, int32(x)) } -func (x *ContainerState) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(ContainerState_value, data, "ContainerState") - if err != nil { - return err - } - *x = ContainerState(value) - return nil -} func (ContainerState) EnumDescriptor() ([]byte, []int) { return fileDescriptorApi, []int{2} } type VersionRequest struct { // Version of the kubelet runtime API. - Version *string `protobuf:"bytes,1,opt,name=version" json:"version,omitempty"` - XXX_unrecognized []byte `json:"-"` + Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` } func (m *VersionRequest) Reset() { *m = VersionRequest{} } -func (m *VersionRequest) String() string { return proto.CompactTextString(m) } func (*VersionRequest) ProtoMessage() {} func (*VersionRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{0} } -func (m *VersionRequest) GetVersion() string { - if m != nil && m.Version != nil { - return *m.Version - } - return "" -} - type VersionResponse struct { // Version of the kubelet runtime API. - Version *string `protobuf:"bytes,1,opt,name=version" json:"version,omitempty"` + Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` // Name of the container runtime. - RuntimeName *string `protobuf:"bytes,2,opt,name=runtime_name,json=runtimeName" json:"runtime_name,omitempty"` + RuntimeName string `protobuf:"bytes,2,opt,name=runtime_name,json=runtimeName,proto3" json:"runtime_name,omitempty"` // Version of the container runtime. The string must be // semver-compatible. - RuntimeVersion *string `protobuf:"bytes,3,opt,name=runtime_version,json=runtimeVersion" json:"runtime_version,omitempty"` + RuntimeVersion string `protobuf:"bytes,3,opt,name=runtime_version,json=runtimeVersion,proto3" json:"runtime_version,omitempty"` // API version of the container runtime. The string must be // semver-compatible. - RuntimeApiVersion *string `protobuf:"bytes,4,opt,name=runtime_api_version,json=runtimeApiVersion" json:"runtime_api_version,omitempty"` - XXX_unrecognized []byte `json:"-"` + RuntimeApiVersion string `protobuf:"bytes,4,opt,name=runtime_api_version,json=runtimeApiVersion,proto3" json:"runtime_api_version,omitempty"` } func (m *VersionResponse) Reset() { *m = VersionResponse{} } -func (m *VersionResponse) String() string { return proto.CompactTextString(m) } func (*VersionResponse) ProtoMessage() {} func (*VersionResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{1} } -func (m *VersionResponse) GetVersion() string { - if m != nil && m.Version != nil { - return *m.Version - } - return "" -} - -func (m *VersionResponse) GetRuntimeName() string { - if m != nil && m.RuntimeName != nil { - return *m.RuntimeName - } - return "" -} - -func (m *VersionResponse) GetRuntimeVersion() string { - if m != nil && m.RuntimeVersion != nil { - return *m.RuntimeVersion - } - return "" -} - -func (m *VersionResponse) GetRuntimeApiVersion() string { - if m != nil && m.RuntimeApiVersion != nil { - return *m.RuntimeApiVersion - } - return "" -} - // DNSConfig specifies the DNS servers and search domains of a sandbox. type DNSConfig struct { // List of DNS servers of the cluster. @@ -305,164 +237,68 @@ type DNSConfig struct { Searches []string `protobuf:"bytes,2,rep,name=searches" json:"searches,omitempty"` // List of DNS options. See https://linux.die.net/man/5/resolv.conf // for all available options. - Options []string `protobuf:"bytes,3,rep,name=options" json:"options,omitempty"` - XXX_unrecognized []byte `json:"-"` + Options []string `protobuf:"bytes,3,rep,name=options" json:"options,omitempty"` } func (m *DNSConfig) Reset() { *m = DNSConfig{} } -func (m *DNSConfig) String() string { return proto.CompactTextString(m) } func (*DNSConfig) ProtoMessage() {} func (*DNSConfig) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{2} } -func (m *DNSConfig) GetServers() []string { - if m != nil { - return m.Servers - } - return nil -} - -func (m *DNSConfig) GetSearches() []string { - if m != nil { - return m.Searches - } - return nil -} - -func (m *DNSConfig) GetOptions() []string { - if m != nil { - return m.Options - } - return nil -} - // PortMapping specifies the port mapping configurations of a sandbox. type PortMapping struct { // Protocol of the port mapping. - Protocol *Protocol `protobuf:"varint,1,opt,name=protocol,enum=runtime.Protocol" json:"protocol,omitempty"` - // Port number within the container. - ContainerPort *int32 `protobuf:"varint,2,opt,name=container_port,json=containerPort" json:"container_port,omitempty"` - // Port number on the host. - HostPort *int32 `protobuf:"varint,3,opt,name=host_port,json=hostPort" json:"host_port,omitempty"` + Protocol Protocol `protobuf:"varint,1,opt,name=protocol,proto3,enum=runtime.Protocol" json:"protocol,omitempty"` + // Port number within the container. Default: 0 (not specified). + ContainerPort int32 `protobuf:"varint,2,opt,name=container_port,json=containerPort,proto3" json:"container_port,omitempty"` + // Port number on the host. Default: 0 (not specified). + HostPort int32 `protobuf:"varint,3,opt,name=host_port,json=hostPort,proto3" json:"host_port,omitempty"` // Host IP. - HostIp *string `protobuf:"bytes,4,opt,name=host_ip,json=hostIp" json:"host_ip,omitempty"` - XXX_unrecognized []byte `json:"-"` + HostIp string `protobuf:"bytes,4,opt,name=host_ip,json=hostIp,proto3" json:"host_ip,omitempty"` } func (m *PortMapping) Reset() { *m = PortMapping{} } -func (m *PortMapping) String() string { return proto.CompactTextString(m) } func (*PortMapping) ProtoMessage() {} func (*PortMapping) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{3} } -func (m *PortMapping) GetProtocol() Protocol { - if m != nil && m.Protocol != nil { - return *m.Protocol - } - return Protocol_TCP -} - -func (m *PortMapping) GetContainerPort() int32 { - if m != nil && m.ContainerPort != nil { - return *m.ContainerPort - } - return 0 -} - -func (m *PortMapping) GetHostPort() int32 { - if m != nil && m.HostPort != nil { - return *m.HostPort - } - return 0 -} - -func (m *PortMapping) GetHostIp() string { - if m != nil && m.HostIp != nil { - return *m.HostIp - } - return "" -} - // Mount specifies a host volume to mount into a container. type Mount struct { // Path of the mount within the container. - ContainerPath *string `protobuf:"bytes,1,opt,name=container_path,json=containerPath" json:"container_path,omitempty"` + ContainerPath string `protobuf:"bytes,1,opt,name=container_path,json=containerPath,proto3" json:"container_path,omitempty"` // Path of the mount on the host. - HostPath *string `protobuf:"bytes,2,opt,name=host_path,json=hostPath" json:"host_path,omitempty"` + HostPath string `protobuf:"bytes,2,opt,name=host_path,json=hostPath,proto3" json:"host_path,omitempty"` // If set, the mount is read-only. - Readonly *bool `protobuf:"varint,3,opt,name=readonly" json:"readonly,omitempty"` + Readonly bool `protobuf:"varint,3,opt,name=readonly,proto3" json:"readonly,omitempty"` // If set, the mount needs SELinux relabeling. - SelinuxRelabel *bool `protobuf:"varint,4,opt,name=selinux_relabel,json=selinuxRelabel" json:"selinux_relabel,omitempty"` - XXX_unrecognized []byte `json:"-"` + SelinuxRelabel bool `protobuf:"varint,4,opt,name=selinux_relabel,json=selinuxRelabel,proto3" json:"selinux_relabel,omitempty"` } func (m *Mount) Reset() { *m = Mount{} } -func (m *Mount) String() string { return proto.CompactTextString(m) } func (*Mount) ProtoMessage() {} func (*Mount) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{4} } -func (m *Mount) GetContainerPath() string { - if m != nil && m.ContainerPath != nil { - return *m.ContainerPath - } - return "" -} - -func (m *Mount) GetHostPath() string { - if m != nil && m.HostPath != nil { - return *m.HostPath - } - return "" -} - -func (m *Mount) GetReadonly() bool { - if m != nil && m.Readonly != nil { - return *m.Readonly - } - return false -} - -func (m *Mount) GetSelinuxRelabel() bool { - if m != nil && m.SelinuxRelabel != nil { - return *m.SelinuxRelabel - } - return false -} - // NamespaceOption provides options for Linux namespaces. type NamespaceOption struct { // If set, use the host's network namespace. - HostNetwork *bool `protobuf:"varint,1,opt,name=host_network,json=hostNetwork" json:"host_network,omitempty"` + HostNetwork bool `protobuf:"varint,1,opt,name=host_network,json=hostNetwork,proto3" json:"host_network,omitempty"` // If set, use the host's PID namespace. - HostPid *bool `protobuf:"varint,2,opt,name=host_pid,json=hostPid" json:"host_pid,omitempty"` + HostPid bool `protobuf:"varint,2,opt,name=host_pid,json=hostPid,proto3" json:"host_pid,omitempty"` // If set, use the host's IPC namespace. - HostIpc *bool `protobuf:"varint,3,opt,name=host_ipc,json=hostIpc" json:"host_ipc,omitempty"` - XXX_unrecognized []byte `json:"-"` + HostIpc bool `protobuf:"varint,3,opt,name=host_ipc,json=hostIpc,proto3" json:"host_ipc,omitempty"` } func (m *NamespaceOption) Reset() { *m = NamespaceOption{} } -func (m *NamespaceOption) String() string { return proto.CompactTextString(m) } func (*NamespaceOption) ProtoMessage() {} func (*NamespaceOption) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{5} } -func (m *NamespaceOption) GetHostNetwork() bool { - if m != nil && m.HostNetwork != nil { - return *m.HostNetwork - } - return false +// Int64Value is the wrapper of int64. +type Int64Value struct { + // The value. + Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` } -func (m *NamespaceOption) GetHostPid() bool { - if m != nil && m.HostPid != nil { - return *m.HostPid - } - return false -} - -func (m *NamespaceOption) GetHostIpc() bool { - if m != nil && m.HostIpc != nil { - return *m.HostIpc - } - return false -} +func (m *Int64Value) Reset() { *m = Int64Value{} } +func (*Int64Value) ProtoMessage() {} +func (*Int64Value) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{6} } // LinuxSandboxSecurityContext holds linux security configuration that will be // applied to a sandbox. Note that: @@ -476,9 +312,9 @@ type LinuxSandboxSecurityContext struct { // Optional SELinux context to be applied. SelinuxOptions *SELinuxOption `protobuf:"bytes,2,opt,name=selinux_options,json=selinuxOptions" json:"selinux_options,omitempty"` // UID to run sandbox processes as, when applicable. - RunAsUser *int64 `protobuf:"varint,3,opt,name=run_as_user,json=runAsUser" json:"run_as_user,omitempty"` + RunAsUser *Int64Value `protobuf:"bytes,3,opt,name=run_as_user,json=runAsUser" json:"run_as_user,omitempty"` // If set, the root filesystem of the sandbox is read-only. - ReadonlyRootfs *bool `protobuf:"varint,4,opt,name=readonly_rootfs,json=readonlyRootfs" json:"readonly_rootfs,omitempty"` + ReadonlyRootfs bool `protobuf:"varint,4,opt,name=readonly_rootfs,json=readonlyRootfs,proto3" json:"readonly_rootfs,omitempty"` // List of groups applied to the first process run in the sandbox, in // addition to the sandbox's primary GID. SupplementalGroups []int64 `protobuf:"varint,5,rep,name=supplemental_groups,json=supplementalGroups" json:"supplemental_groups,omitempty"` @@ -487,14 +323,12 @@ type LinuxSandboxSecurityContext struct { // MUST be true. // This allows a sandbox to take additional security precautions if no // privileged containers are expected to be run. - Privileged *bool `protobuf:"varint,6,opt,name=privileged" json:"privileged,omitempty"` - XXX_unrecognized []byte `json:"-"` + Privileged bool `protobuf:"varint,6,opt,name=privileged,proto3" json:"privileged,omitempty"` } func (m *LinuxSandboxSecurityContext) Reset() { *m = LinuxSandboxSecurityContext{} } -func (m *LinuxSandboxSecurityContext) String() string { return proto.CompactTextString(m) } func (*LinuxSandboxSecurityContext) ProtoMessage() {} -func (*LinuxSandboxSecurityContext) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{6} } +func (*LinuxSandboxSecurityContext) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{7} } func (m *LinuxSandboxSecurityContext) GetNamespaceOptions() *NamespaceOption { if m != nil { @@ -510,57 +344,27 @@ func (m *LinuxSandboxSecurityContext) GetSelinuxOptions() *SELinuxOption { return nil } -func (m *LinuxSandboxSecurityContext) GetRunAsUser() int64 { - if m != nil && m.RunAsUser != nil { - return *m.RunAsUser - } - return 0 -} - -func (m *LinuxSandboxSecurityContext) GetReadonlyRootfs() bool { - if m != nil && m.ReadonlyRootfs != nil { - return *m.ReadonlyRootfs - } - return false -} - -func (m *LinuxSandboxSecurityContext) GetSupplementalGroups() []int64 { +func (m *LinuxSandboxSecurityContext) GetRunAsUser() *Int64Value { if m != nil { - return m.SupplementalGroups + return m.RunAsUser } return nil } -func (m *LinuxSandboxSecurityContext) GetPrivileged() bool { - if m != nil && m.Privileged != nil { - return *m.Privileged - } - return false -} - // LinuxPodSandboxConfig holds platform-specific configurations for Linux // host platforms and Linux-based containers. type LinuxPodSandboxConfig struct { // Parent cgroup of the PodSandbox. // The cgroupfs style syntax will be used, but the container runtime can // convert it to systemd semantics if needed. - CgroupParent *string `protobuf:"bytes,1,opt,name=cgroup_parent,json=cgroupParent" json:"cgroup_parent,omitempty"` + CgroupParent string `protobuf:"bytes,1,opt,name=cgroup_parent,json=cgroupParent,proto3" json:"cgroup_parent,omitempty"` // LinuxSandboxSecurityContext holds sandbox security attributes. - SecurityContext *LinuxSandboxSecurityContext `protobuf:"bytes,2,opt,name=security_context,json=securityContext" json:"security_context,omitempty"` - XXX_unrecognized []byte `json:"-"` + SecurityContext *LinuxSandboxSecurityContext `protobuf:"bytes,2,opt,name=security_context,json=securityContext" json:"security_context,omitempty"` } func (m *LinuxPodSandboxConfig) Reset() { *m = LinuxPodSandboxConfig{} } -func (m *LinuxPodSandboxConfig) String() string { return proto.CompactTextString(m) } func (*LinuxPodSandboxConfig) ProtoMessage() {} -func (*LinuxPodSandboxConfig) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{7} } - -func (m *LinuxPodSandboxConfig) GetCgroupParent() string { - if m != nil && m.CgroupParent != nil { - return *m.CgroupParent - } - return "" -} +func (*LinuxPodSandboxConfig) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{8} } func (m *LinuxPodSandboxConfig) GetSecurityContext() *LinuxSandboxSecurityContext { if m != nil { @@ -575,48 +379,18 @@ func (m *LinuxPodSandboxConfig) GetSecurityContext() *LinuxSandboxSecurityContex // the runtime can construct a unique PodSandboxName based on the metadata. type PodSandboxMetadata struct { // Pod name of the sandbox. Same as the pod name in the PodSpec. - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Pod UID of the sandbox. Same as the pod UID in the PodSpec. - Uid *string `protobuf:"bytes,2,opt,name=uid" json:"uid,omitempty"` + Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` // Pod namespace of the sandbox. Same as the pod namespace in the PodSpec. - Namespace *string `protobuf:"bytes,3,opt,name=namespace" json:"namespace,omitempty"` - // Attempt number of creating the sandbox. - Attempt *uint32 `protobuf:"varint,4,opt,name=attempt" json:"attempt,omitempty"` - XXX_unrecognized []byte `json:"-"` + Namespace string `protobuf:"bytes,3,opt,name=namespace,proto3" json:"namespace,omitempty"` + // Attempt number of creating the sandbox. Default: 0. + Attempt uint32 `protobuf:"varint,4,opt,name=attempt,proto3" json:"attempt,omitempty"` } func (m *PodSandboxMetadata) Reset() { *m = PodSandboxMetadata{} } -func (m *PodSandboxMetadata) String() string { return proto.CompactTextString(m) } func (*PodSandboxMetadata) ProtoMessage() {} -func (*PodSandboxMetadata) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{8} } - -func (m *PodSandboxMetadata) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func (m *PodSandboxMetadata) GetUid() string { - if m != nil && m.Uid != nil { - return *m.Uid - } - return "" -} - -func (m *PodSandboxMetadata) GetNamespace() string { - if m != nil && m.Namespace != nil { - return *m.Namespace - } - return "" -} - -func (m *PodSandboxMetadata) GetAttempt() uint32 { - if m != nil && m.Attempt != nil { - return *m.Attempt - } - return 0 -} +func (*PodSandboxMetadata) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{9} } // PodSandboxConfig holds all the required and optional fields for creating a // sandbox. @@ -627,7 +401,7 @@ type PodSandboxConfig struct { // as by constructing a readable name. Metadata *PodSandboxMetadata `protobuf:"bytes,1,opt,name=metadata" json:"metadata,omitempty"` // Hostname of the sandbox. - Hostname *string `protobuf:"bytes,2,opt,name=hostname" json:"hostname,omitempty"` + Hostname string `protobuf:"bytes,2,opt,name=hostname,proto3" json:"hostname,omitempty"` // Path to the directory on the host in which container log files are // stored. // By default the log of a container going into the LogDirectory will be @@ -643,13 +417,13 @@ type PodSandboxConfig struct { // container logs are under active discussion in // https://issues.k8s.io/24677. There *may* be future change of direction // for logging as the discussion carries on. - LogDirectory *string `protobuf:"bytes,3,opt,name=log_directory,json=logDirectory" json:"log_directory,omitempty"` + LogDirectory string `protobuf:"bytes,3,opt,name=log_directory,json=logDirectory,proto3" json:"log_directory,omitempty"` // DNS config for the sandbox. DnsConfig *DNSConfig `protobuf:"bytes,4,opt,name=dns_config,json=dnsConfig" json:"dns_config,omitempty"` // Port mappings for the sandbox. PortMappings []*PortMapping `protobuf:"bytes,5,rep,name=port_mappings,json=portMappings" json:"port_mappings,omitempty"` // Key-value pairs that may be used to scope and select individual resources. - Labels map[string]string `protobuf:"bytes,6,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Labels map[string]string `protobuf:"bytes,6,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // Unstructured key-value map that may be set by the kubelet to store and // retrieve arbitrary metadata. This will include any annotations set on a // pod through the Kubernetes API. @@ -706,16 +480,14 @@ type PodSandboxConfig struct { // description: list of unsafe sysctls which are set for the sandbox. // value: comma separated list of sysctl_name=value key-value pairs. // - Annotations map[string]string `protobuf:"bytes,7,rep,name=annotations" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Annotations map[string]string `protobuf:"bytes,7,rep,name=annotations" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // Optional configurations specific to Linux hosts. - Linux *LinuxPodSandboxConfig `protobuf:"bytes,8,opt,name=linux" json:"linux,omitempty"` - XXX_unrecognized []byte `json:"-"` + Linux *LinuxPodSandboxConfig `protobuf:"bytes,8,opt,name=linux" json:"linux,omitempty"` } func (m *PodSandboxConfig) Reset() { *m = PodSandboxConfig{} } -func (m *PodSandboxConfig) String() string { return proto.CompactTextString(m) } func (*PodSandboxConfig) ProtoMessage() {} -func (*PodSandboxConfig) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{9} } +func (*PodSandboxConfig) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{10} } func (m *PodSandboxConfig) GetMetadata() *PodSandboxMetadata { if m != nil { @@ -724,20 +496,6 @@ func (m *PodSandboxConfig) GetMetadata() *PodSandboxMetadata { return nil } -func (m *PodSandboxConfig) GetHostname() string { - if m != nil && m.Hostname != nil { - return *m.Hostname - } - return "" -} - -func (m *PodSandboxConfig) GetLogDirectory() string { - if m != nil && m.LogDirectory != nil { - return *m.LogDirectory - } - return "" -} - func (m *PodSandboxConfig) GetDnsConfig() *DNSConfig { if m != nil { return m.DnsConfig @@ -775,14 +533,12 @@ func (m *PodSandboxConfig) GetLinux() *LinuxPodSandboxConfig { type RunPodSandboxRequest struct { // Configuration for creating a PodSandbox. - Config *PodSandboxConfig `protobuf:"bytes,1,opt,name=config" json:"config,omitempty"` - XXX_unrecognized []byte `json:"-"` + Config *PodSandboxConfig `protobuf:"bytes,1,opt,name=config" json:"config,omitempty"` } func (m *RunPodSandboxRequest) Reset() { *m = RunPodSandboxRequest{} } -func (m *RunPodSandboxRequest) String() string { return proto.CompactTextString(m) } func (*RunPodSandboxRequest) ProtoMessage() {} -func (*RunPodSandboxRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{10} } +func (*RunPodSandboxRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{11} } func (m *RunPodSandboxRequest) GetConfig() *PodSandboxConfig { if m != nil { @@ -793,133 +549,75 @@ func (m *RunPodSandboxRequest) GetConfig() *PodSandboxConfig { type RunPodSandboxResponse struct { // ID of the PodSandbox to run. - PodSandboxId *string `protobuf:"bytes,1,opt,name=pod_sandbox_id,json=podSandboxId" json:"pod_sandbox_id,omitempty"` - XXX_unrecognized []byte `json:"-"` + PodSandboxId string `protobuf:"bytes,1,opt,name=pod_sandbox_id,json=podSandboxId,proto3" json:"pod_sandbox_id,omitempty"` } func (m *RunPodSandboxResponse) Reset() { *m = RunPodSandboxResponse{} } -func (m *RunPodSandboxResponse) String() string { return proto.CompactTextString(m) } func (*RunPodSandboxResponse) ProtoMessage() {} -func (*RunPodSandboxResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{11} } - -func (m *RunPodSandboxResponse) GetPodSandboxId() string { - if m != nil && m.PodSandboxId != nil { - return *m.PodSandboxId - } - return "" -} +func (*RunPodSandboxResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{12} } type StopPodSandboxRequest struct { // ID of the PodSandbox to stop. - PodSandboxId *string `protobuf:"bytes,1,opt,name=pod_sandbox_id,json=podSandboxId" json:"pod_sandbox_id,omitempty"` - XXX_unrecognized []byte `json:"-"` + PodSandboxId string `protobuf:"bytes,1,opt,name=pod_sandbox_id,json=podSandboxId,proto3" json:"pod_sandbox_id,omitempty"` } func (m *StopPodSandboxRequest) Reset() { *m = StopPodSandboxRequest{} } -func (m *StopPodSandboxRequest) String() string { return proto.CompactTextString(m) } func (*StopPodSandboxRequest) ProtoMessage() {} -func (*StopPodSandboxRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{12} } - -func (m *StopPodSandboxRequest) GetPodSandboxId() string { - if m != nil && m.PodSandboxId != nil { - return *m.PodSandboxId - } - return "" -} +func (*StopPodSandboxRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{13} } type StopPodSandboxResponse struct { - XXX_unrecognized []byte `json:"-"` } func (m *StopPodSandboxResponse) Reset() { *m = StopPodSandboxResponse{} } -func (m *StopPodSandboxResponse) String() string { return proto.CompactTextString(m) } func (*StopPodSandboxResponse) ProtoMessage() {} -func (*StopPodSandboxResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{13} } +func (*StopPodSandboxResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{14} } type RemovePodSandboxRequest struct { // ID of the PodSandbox to remove. - PodSandboxId *string `protobuf:"bytes,1,opt,name=pod_sandbox_id,json=podSandboxId" json:"pod_sandbox_id,omitempty"` - XXX_unrecognized []byte `json:"-"` + PodSandboxId string `protobuf:"bytes,1,opt,name=pod_sandbox_id,json=podSandboxId,proto3" json:"pod_sandbox_id,omitempty"` } func (m *RemovePodSandboxRequest) Reset() { *m = RemovePodSandboxRequest{} } -func (m *RemovePodSandboxRequest) String() string { return proto.CompactTextString(m) } func (*RemovePodSandboxRequest) ProtoMessage() {} -func (*RemovePodSandboxRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{14} } - -func (m *RemovePodSandboxRequest) GetPodSandboxId() string { - if m != nil && m.PodSandboxId != nil { - return *m.PodSandboxId - } - return "" -} +func (*RemovePodSandboxRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{15} } type RemovePodSandboxResponse struct { - XXX_unrecognized []byte `json:"-"` } func (m *RemovePodSandboxResponse) Reset() { *m = RemovePodSandboxResponse{} } -func (m *RemovePodSandboxResponse) String() string { return proto.CompactTextString(m) } func (*RemovePodSandboxResponse) ProtoMessage() {} -func (*RemovePodSandboxResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{15} } +func (*RemovePodSandboxResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{16} } type PodSandboxStatusRequest struct { // ID of the PodSandbox for which to retrieve status. - PodSandboxId *string `protobuf:"bytes,1,opt,name=pod_sandbox_id,json=podSandboxId" json:"pod_sandbox_id,omitempty"` - XXX_unrecognized []byte `json:"-"` + PodSandboxId string `protobuf:"bytes,1,opt,name=pod_sandbox_id,json=podSandboxId,proto3" json:"pod_sandbox_id,omitempty"` } func (m *PodSandboxStatusRequest) Reset() { *m = PodSandboxStatusRequest{} } -func (m *PodSandboxStatusRequest) String() string { return proto.CompactTextString(m) } func (*PodSandboxStatusRequest) ProtoMessage() {} -func (*PodSandboxStatusRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{16} } - -func (m *PodSandboxStatusRequest) GetPodSandboxId() string { - if m != nil && m.PodSandboxId != nil { - return *m.PodSandboxId - } - return "" -} +func (*PodSandboxStatusRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{17} } // PodSandboxNetworkStatus is the status of the network for a PodSandbox. type PodSandboxNetworkStatus struct { // IP address of the PodSandbox. - Ip *string `protobuf:"bytes,1,opt,name=ip" json:"ip,omitempty"` - XXX_unrecognized []byte `json:"-"` + Ip string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"` } func (m *PodSandboxNetworkStatus) Reset() { *m = PodSandboxNetworkStatus{} } -func (m *PodSandboxNetworkStatus) String() string { return proto.CompactTextString(m) } func (*PodSandboxNetworkStatus) ProtoMessage() {} -func (*PodSandboxNetworkStatus) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{17} } - -func (m *PodSandboxNetworkStatus) GetIp() string { - if m != nil && m.Ip != nil { - return *m.Ip - } - return "" -} +func (*PodSandboxNetworkStatus) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{18} } // Namespace contains paths to the namespaces. type Namespace struct { // Path to the network namespace. - Network *string `protobuf:"bytes,1,opt,name=network" json:"network,omitempty"` + Network string `protobuf:"bytes,1,opt,name=network,proto3" json:"network,omitempty"` // Namespace options for Linux namespaces. - Options *NamespaceOption `protobuf:"bytes,2,opt,name=options" json:"options,omitempty"` - XXX_unrecognized []byte `json:"-"` + Options *NamespaceOption `protobuf:"bytes,2,opt,name=options" json:"options,omitempty"` } func (m *Namespace) Reset() { *m = Namespace{} } -func (m *Namespace) String() string { return proto.CompactTextString(m) } func (*Namespace) ProtoMessage() {} -func (*Namespace) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{18} } - -func (m *Namespace) GetNetwork() string { - if m != nil && m.Network != nil { - return *m.Network - } - return "" -} +func (*Namespace) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{19} } func (m *Namespace) GetOptions() *NamespaceOption { if m != nil { @@ -931,14 +629,12 @@ func (m *Namespace) GetOptions() *NamespaceOption { // LinuxSandboxStatus contains status specific to Linux sandboxes. type LinuxPodSandboxStatus struct { // Paths to the sandbox's namespaces. - Namespaces *Namespace `protobuf:"bytes,1,opt,name=namespaces" json:"namespaces,omitempty"` - XXX_unrecognized []byte `json:"-"` + Namespaces *Namespace `protobuf:"bytes,1,opt,name=namespaces" json:"namespaces,omitempty"` } func (m *LinuxPodSandboxStatus) Reset() { *m = LinuxPodSandboxStatus{} } -func (m *LinuxPodSandboxStatus) String() string { return proto.CompactTextString(m) } func (*LinuxPodSandboxStatus) ProtoMessage() {} -func (*LinuxPodSandboxStatus) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{19} } +func (*LinuxPodSandboxStatus) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{20} } func (m *LinuxPodSandboxStatus) GetNamespaces() *Namespace { if m != nil { @@ -950,38 +646,29 @@ func (m *LinuxPodSandboxStatus) GetNamespaces() *Namespace { // PodSandboxStatus contains the status of the PodSandbox. type PodSandboxStatus struct { // ID of the sandbox. - Id *string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Metadata of the sandbox. Metadata *PodSandboxMetadata `protobuf:"bytes,2,opt,name=metadata" json:"metadata,omitempty"` // State of the sandbox. - State *PodSandboxState `protobuf:"varint,3,opt,name=state,enum=runtime.PodSandboxState" json:"state,omitempty"` - // Creation timestamp of the sandbox in nanoseconds. - CreatedAt *int64 `protobuf:"varint,4,opt,name=created_at,json=createdAt" json:"created_at,omitempty"` + State PodSandboxState `protobuf:"varint,3,opt,name=state,proto3,enum=runtime.PodSandboxState" json:"state,omitempty"` + // Creation timestamp of the sandbox in nanoseconds. Must be > 0. + CreatedAt int64 `protobuf:"varint,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // Network contains network status if network is handled by the runtime. Network *PodSandboxNetworkStatus `protobuf:"bytes,5,opt,name=network" json:"network,omitempty"` // Linux-specific status to a pod sandbox. Linux *LinuxPodSandboxStatus `protobuf:"bytes,6,opt,name=linux" json:"linux,omitempty"` // Labels are key-value pairs that may be used to scope and select individual resources. - Labels map[string]string `protobuf:"bytes,7,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Labels map[string]string `protobuf:"bytes,7,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // Unstructured key-value map holding arbitrary metadata. // Annotations MUST NOT be altered by the runtime; the value of this field // MUST be identical to that of the corresponding PodSandboxConfig used to // instantiate the pod sandbox this status represents. - Annotations map[string]string `protobuf:"bytes,8,rep,name=annotations" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - XXX_unrecognized []byte `json:"-"` + Annotations map[string]string `protobuf:"bytes,8,rep,name=annotations" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (m *PodSandboxStatus) Reset() { *m = PodSandboxStatus{} } -func (m *PodSandboxStatus) String() string { return proto.CompactTextString(m) } func (*PodSandboxStatus) ProtoMessage() {} -func (*PodSandboxStatus) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{20} } - -func (m *PodSandboxStatus) GetId() string { - if m != nil && m.Id != nil { - return *m.Id - } - return "" -} +func (*PodSandboxStatus) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{21} } func (m *PodSandboxStatus) GetMetadata() *PodSandboxMetadata { if m != nil { @@ -990,20 +677,6 @@ func (m *PodSandboxStatus) GetMetadata() *PodSandboxMetadata { return nil } -func (m *PodSandboxStatus) GetState() PodSandboxState { - if m != nil && m.State != nil { - return *m.State - } - return PodSandboxState_SANDBOX_READY -} - -func (m *PodSandboxStatus) GetCreatedAt() int64 { - if m != nil && m.CreatedAt != nil { - return *m.CreatedAt - } - return 0 -} - func (m *PodSandboxStatus) GetNetwork() *PodSandboxNetworkStatus { if m != nil { return m.Network @@ -1034,14 +707,12 @@ func (m *PodSandboxStatus) GetAnnotations() map[string]string { type PodSandboxStatusResponse struct { // Status of the PodSandbox. - Status *PodSandboxStatus `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"` - XXX_unrecognized []byte `json:"-"` + Status *PodSandboxStatus `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"` } func (m *PodSandboxStatusResponse) Reset() { *m = PodSandboxStatusResponse{} } -func (m *PodSandboxStatusResponse) String() string { return proto.CompactTextString(m) } func (*PodSandboxStatusResponse) ProtoMessage() {} -func (*PodSandboxStatusResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{21} } +func (*PodSandboxStatusResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{22} } func (m *PodSandboxStatusResponse) GetStatus() *PodSandboxStatus { if m != nil { @@ -1050,37 +721,38 @@ func (m *PodSandboxStatusResponse) GetStatus() *PodSandboxStatus { return nil } +// PodSandboxStateValue is the wrapper of PodSandboxState. +type PodSandboxStateValue struct { + // State of the sandbox. + State PodSandboxState `protobuf:"varint,1,opt,name=state,proto3,enum=runtime.PodSandboxState" json:"state,omitempty"` +} + +func (m *PodSandboxStateValue) Reset() { *m = PodSandboxStateValue{} } +func (*PodSandboxStateValue) ProtoMessage() {} +func (*PodSandboxStateValue) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{23} } + // PodSandboxFilter is used to filter a list of PodSandboxes. // All those fields are combined with 'AND' type PodSandboxFilter struct { // ID of the sandbox. - Id *string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // State of the sandbox. - State *PodSandboxState `protobuf:"varint,2,opt,name=state,enum=runtime.PodSandboxState" json:"state,omitempty"` + State *PodSandboxStateValue `protobuf:"bytes,2,opt,name=state" json:"state,omitempty"` // LabelSelector to select matches. // Only api.MatchLabels is supported for now and the requirements // are ANDed. MatchExpressions is not supported yet. - LabelSelector map[string]string `protobuf:"bytes,3,rep,name=label_selector,json=labelSelector" json:"label_selector,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - XXX_unrecognized []byte `json:"-"` + LabelSelector map[string]string `protobuf:"bytes,3,rep,name=label_selector,json=labelSelector" json:"label_selector,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (m *PodSandboxFilter) Reset() { *m = PodSandboxFilter{} } -func (m *PodSandboxFilter) String() string { return proto.CompactTextString(m) } func (*PodSandboxFilter) ProtoMessage() {} -func (*PodSandboxFilter) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{22} } +func (*PodSandboxFilter) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{24} } -func (m *PodSandboxFilter) GetId() string { - if m != nil && m.Id != nil { - return *m.Id +func (m *PodSandboxFilter) GetState() *PodSandboxStateValue { + if m != nil { + return m.State } - return "" -} - -func (m *PodSandboxFilter) GetState() PodSandboxState { - if m != nil && m.State != nil { - return *m.State - } - return PodSandboxState_SANDBOX_READY + return nil } func (m *PodSandboxFilter) GetLabelSelector() map[string]string { @@ -1092,14 +764,12 @@ func (m *PodSandboxFilter) GetLabelSelector() map[string]string { type ListPodSandboxRequest struct { // PodSandboxFilter to filter a list of PodSandboxes. - Filter *PodSandboxFilter `protobuf:"bytes,1,opt,name=filter" json:"filter,omitempty"` - XXX_unrecognized []byte `json:"-"` + Filter *PodSandboxFilter `protobuf:"bytes,1,opt,name=filter" json:"filter,omitempty"` } func (m *ListPodSandboxRequest) Reset() { *m = ListPodSandboxRequest{} } -func (m *ListPodSandboxRequest) String() string { return proto.CompactTextString(m) } func (*ListPodSandboxRequest) ProtoMessage() {} -func (*ListPodSandboxRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{23} } +func (*ListPodSandboxRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{25} } func (m *ListPodSandboxRequest) GetFilter() *PodSandboxFilter { if m != nil { @@ -1111,34 +781,25 @@ func (m *ListPodSandboxRequest) GetFilter() *PodSandboxFilter { // PodSandbox contains minimal information about a sandbox. type PodSandbox struct { // ID of the PodSandbox. - Id *string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Metadata of the PodSandbox. Metadata *PodSandboxMetadata `protobuf:"bytes,2,opt,name=metadata" json:"metadata,omitempty"` // State of the PodSandbox. - State *PodSandboxState `protobuf:"varint,3,opt,name=state,enum=runtime.PodSandboxState" json:"state,omitempty"` - // Creation timestamps of the PodSandbox in nanoseconds. - CreatedAt *int64 `protobuf:"varint,4,opt,name=created_at,json=createdAt" json:"created_at,omitempty"` + State PodSandboxState `protobuf:"varint,3,opt,name=state,proto3,enum=runtime.PodSandboxState" json:"state,omitempty"` + // Creation timestamps of the PodSandbox in nanoseconds. Must be > 0. + CreatedAt int64 `protobuf:"varint,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // Labels of the PodSandbox. - Labels map[string]string `protobuf:"bytes,5,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Labels map[string]string `protobuf:"bytes,5,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // Unstructured key-value map holding arbitrary metadata. // Annotations MUST NOT be altered by the runtime; the value of this field // MUST be identical to that of the corresponding PodSandboxConfig used to // instantiate this PodSandbox. - Annotations map[string]string `protobuf:"bytes,6,rep,name=annotations" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - XXX_unrecognized []byte `json:"-"` + Annotations map[string]string `protobuf:"bytes,6,rep,name=annotations" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (m *PodSandbox) Reset() { *m = PodSandbox{} } -func (m *PodSandbox) String() string { return proto.CompactTextString(m) } func (*PodSandbox) ProtoMessage() {} -func (*PodSandbox) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{24} } - -func (m *PodSandbox) GetId() string { - if m != nil && m.Id != nil { - return *m.Id - } - return "" -} +func (*PodSandbox) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{26} } func (m *PodSandbox) GetMetadata() *PodSandboxMetadata { if m != nil { @@ -1147,20 +808,6 @@ func (m *PodSandbox) GetMetadata() *PodSandboxMetadata { return nil } -func (m *PodSandbox) GetState() PodSandboxState { - if m != nil && m.State != nil { - return *m.State - } - return PodSandboxState_SANDBOX_READY -} - -func (m *PodSandbox) GetCreatedAt() int64 { - if m != nil && m.CreatedAt != nil { - return *m.CreatedAt - } - return 0 -} - func (m *PodSandbox) GetLabels() map[string]string { if m != nil { return m.Labels @@ -1177,14 +824,12 @@ func (m *PodSandbox) GetAnnotations() map[string]string { type ListPodSandboxResponse struct { // List of PodSandboxes. - Items []*PodSandbox `protobuf:"bytes,1,rep,name=items" json:"items,omitempty"` - XXX_unrecognized []byte `json:"-"` + Items []*PodSandbox `protobuf:"bytes,1,rep,name=items" json:"items,omitempty"` } func (m *ListPodSandboxResponse) Reset() { *m = ListPodSandboxResponse{} } -func (m *ListPodSandboxResponse) String() string { return proto.CompactTextString(m) } func (*ListPodSandboxResponse) ProtoMessage() {} -func (*ListPodSandboxResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{25} } +func (*ListPodSandboxResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{27} } func (m *ListPodSandboxResponse) GetItems() []*PodSandbox { if m != nil { @@ -1197,146 +842,54 @@ func (m *ListPodSandboxResponse) GetItems() []*PodSandbox { // value of a Container's Image field (e.g. imageID or imageDigest), but in the // future it will include more detailed information about the different image types. type ImageSpec struct { - Image *string `protobuf:"bytes,1,opt,name=image" json:"image,omitempty"` - XXX_unrecognized []byte `json:"-"` + Image string `protobuf:"bytes,1,opt,name=image,proto3" json:"image,omitempty"` } func (m *ImageSpec) Reset() { *m = ImageSpec{} } -func (m *ImageSpec) String() string { return proto.CompactTextString(m) } func (*ImageSpec) ProtoMessage() {} -func (*ImageSpec) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{26} } - -func (m *ImageSpec) GetImage() string { - if m != nil && m.Image != nil { - return *m.Image - } - return "" -} +func (*ImageSpec) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{28} } type KeyValue struct { - Key *string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` - Value *string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` - XXX_unrecognized []byte `json:"-"` + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` } func (m *KeyValue) Reset() { *m = KeyValue{} } -func (m *KeyValue) String() string { return proto.CompactTextString(m) } func (*KeyValue) ProtoMessage() {} -func (*KeyValue) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{27} } - -func (m *KeyValue) GetKey() string { - if m != nil && m.Key != nil { - return *m.Key - } - return "" -} - -func (m *KeyValue) GetValue() string { - if m != nil && m.Value != nil { - return *m.Value - } - return "" -} +func (*KeyValue) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{29} } // LinuxContainerResources specifies Linux specific configuration for // resources. // TODO: Consider using Resources from opencontainers/runtime-spec/specs-go // directly. type LinuxContainerResources struct { - // CPU CFS (Completely Fair Scheduler) period. - CpuPeriod *int64 `protobuf:"varint,1,opt,name=cpu_period,json=cpuPeriod" json:"cpu_period,omitempty"` - // CPU CFS (Completely Fair Scheduler) quota. - CpuQuota *int64 `protobuf:"varint,2,opt,name=cpu_quota,json=cpuQuota" json:"cpu_quota,omitempty"` - // CPU shares (relative weight vs. other containers). - CpuShares *int64 `protobuf:"varint,3,opt,name=cpu_shares,json=cpuShares" json:"cpu_shares,omitempty"` - // Memory limit in bytes. - MemoryLimitInBytes *int64 `protobuf:"varint,4,opt,name=memory_limit_in_bytes,json=memoryLimitInBytes" json:"memory_limit_in_bytes,omitempty"` - // OOMScoreAdj adjusts the oom-killer score. - OomScoreAdj *int64 `protobuf:"varint,5,opt,name=oom_score_adj,json=oomScoreAdj" json:"oom_score_adj,omitempty"` - XXX_unrecognized []byte `json:"-"` + // CPU CFS (Completely Fair Scheduler) period. Default: 0 (not specified). + CpuPeriod int64 `protobuf:"varint,1,opt,name=cpu_period,json=cpuPeriod,proto3" json:"cpu_period,omitempty"` + // CPU CFS (Completely Fair Scheduler) quota. Default: 0 (not specified). + CpuQuota int64 `protobuf:"varint,2,opt,name=cpu_quota,json=cpuQuota,proto3" json:"cpu_quota,omitempty"` + // CPU shares (relative weight vs. other containers). Default: 0 (not specified). + CpuShares int64 `protobuf:"varint,3,opt,name=cpu_shares,json=cpuShares,proto3" json:"cpu_shares,omitempty"` + // Memory limit in bytes. Default: 0 (not specified). + MemoryLimitInBytes int64 `protobuf:"varint,4,opt,name=memory_limit_in_bytes,json=memoryLimitInBytes,proto3" json:"memory_limit_in_bytes,omitempty"` + // OOMScoreAdj adjusts the oom-killer score. Default: 0 (not specified). + OomScoreAdj int64 `protobuf:"varint,5,opt,name=oom_score_adj,json=oomScoreAdj,proto3" json:"oom_score_adj,omitempty"` } func (m *LinuxContainerResources) Reset() { *m = LinuxContainerResources{} } -func (m *LinuxContainerResources) String() string { return proto.CompactTextString(m) } func (*LinuxContainerResources) ProtoMessage() {} -func (*LinuxContainerResources) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{28} } - -func (m *LinuxContainerResources) GetCpuPeriod() int64 { - if m != nil && m.CpuPeriod != nil { - return *m.CpuPeriod - } - return 0 -} - -func (m *LinuxContainerResources) GetCpuQuota() int64 { - if m != nil && m.CpuQuota != nil { - return *m.CpuQuota - } - return 0 -} - -func (m *LinuxContainerResources) GetCpuShares() int64 { - if m != nil && m.CpuShares != nil { - return *m.CpuShares - } - return 0 -} - -func (m *LinuxContainerResources) GetMemoryLimitInBytes() int64 { - if m != nil && m.MemoryLimitInBytes != nil { - return *m.MemoryLimitInBytes - } - return 0 -} - -func (m *LinuxContainerResources) GetOomScoreAdj() int64 { - if m != nil && m.OomScoreAdj != nil { - return *m.OomScoreAdj - } - return 0 -} +func (*LinuxContainerResources) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{30} } // SELinuxOption are the labels to be applied to the container. type SELinuxOption struct { - User *string `protobuf:"bytes,1,opt,name=user" json:"user,omitempty"` - Role *string `protobuf:"bytes,2,opt,name=role" json:"role,omitempty"` - Type *string `protobuf:"bytes,3,opt,name=type" json:"type,omitempty"` - Level *string `protobuf:"bytes,4,opt,name=level" json:"level,omitempty"` - XXX_unrecognized []byte `json:"-"` + User string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` + Role string `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"` + Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` + Level string `protobuf:"bytes,4,opt,name=level,proto3" json:"level,omitempty"` } func (m *SELinuxOption) Reset() { *m = SELinuxOption{} } -func (m *SELinuxOption) String() string { return proto.CompactTextString(m) } func (*SELinuxOption) ProtoMessage() {} -func (*SELinuxOption) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{29} } - -func (m *SELinuxOption) GetUser() string { - if m != nil && m.User != nil { - return *m.User - } - return "" -} - -func (m *SELinuxOption) GetRole() string { - if m != nil && m.Role != nil { - return *m.Role - } - return "" -} - -func (m *SELinuxOption) GetType() string { - if m != nil && m.Type != nil { - return *m.Type - } - return "" -} - -func (m *SELinuxOption) GetLevel() string { - if m != nil && m.Level != nil { - return *m.Level - } - return "" -} +func (*SELinuxOption) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{31} } // Capability contains the container capabilities to add or drop type Capability struct { @@ -1344,27 +897,11 @@ type Capability struct { AddCapabilities []string `protobuf:"bytes,1,rep,name=add_capabilities,json=addCapabilities" json:"add_capabilities,omitempty"` // List of capabilities to drop. DropCapabilities []string `protobuf:"bytes,2,rep,name=drop_capabilities,json=dropCapabilities" json:"drop_capabilities,omitempty"` - XXX_unrecognized []byte `json:"-"` } func (m *Capability) Reset() { *m = Capability{} } -func (m *Capability) String() string { return proto.CompactTextString(m) } func (*Capability) ProtoMessage() {} -func (*Capability) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{30} } - -func (m *Capability) GetAddCapabilities() []string { - if m != nil { - return m.AddCapabilities - } - return nil -} - -func (m *Capability) GetDropCapabilities() []string { - if m != nil { - return m.DropCapabilities - } - return nil -} +func (*Capability) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{32} } // LinuxContainerSecurityContext holds linux security configuration that will be applied to a container. type LinuxContainerSecurityContext struct { @@ -1387,7 +924,7 @@ type LinuxContainerSecurityContext struct { // 6. The device cgroup does not restrict access to any devices. // 7. All devices from the host's /dev are available within the container. // 8. SELinux restrictions are not applied (e.g. label=disabled). - Privileged *bool `protobuf:"varint,2,opt,name=privileged" json:"privileged,omitempty"` + Privileged bool `protobuf:"varint,2,opt,name=privileged,proto3" json:"privileged,omitempty"` // Configurations for the container's namespaces. // Only used if the container uses namespace for isolation. NamespaceOptions *NamespaceOption `protobuf:"bytes,3,opt,name=namespace_options,json=namespaceOptions" json:"namespace_options,omitempty"` @@ -1395,24 +932,22 @@ type LinuxContainerSecurityContext struct { SelinuxOptions *SELinuxOption `protobuf:"bytes,4,opt,name=selinux_options,json=selinuxOptions" json:"selinux_options,omitempty"` // UID to run the container process as. Only one of run_as_user and // run_as_username can be specified at a time. - RunAsUser *int64 `protobuf:"varint,5,opt,name=run_as_user,json=runAsUser" json:"run_as_user,omitempty"` + RunAsUser *Int64Value `protobuf:"bytes,5,opt,name=run_as_user,json=runAsUser" json:"run_as_user,omitempty"` // User name to run the container process as. If specified, the user MUST // exist in the container image (i.e. in the /etc/passwd inside the image), // and be resolved there by the runtime; otherwise, the runtime MUST error. - RunAsUsername *string `protobuf:"bytes,6,opt,name=run_as_username,json=runAsUsername" json:"run_as_username,omitempty"` + RunAsUsername string `protobuf:"bytes,6,opt,name=run_as_username,json=runAsUsername,proto3" json:"run_as_username,omitempty"` // If set, the root filesystem of the container is read-only. - ReadonlyRootfs *bool `protobuf:"varint,7,opt,name=readonly_rootfs,json=readonlyRootfs" json:"readonly_rootfs,omitempty"` + ReadonlyRootfs bool `protobuf:"varint,7,opt,name=readonly_rootfs,json=readonlyRootfs,proto3" json:"readonly_rootfs,omitempty"` // List of groups applied to the first process run in the container, in // addition to the container's primary GID. SupplementalGroups []int64 `protobuf:"varint,8,rep,name=supplemental_groups,json=supplementalGroups" json:"supplemental_groups,omitempty"` - XXX_unrecognized []byte `json:"-"` } -func (m *LinuxContainerSecurityContext) Reset() { *m = LinuxContainerSecurityContext{} } -func (m *LinuxContainerSecurityContext) String() string { return proto.CompactTextString(m) } -func (*LinuxContainerSecurityContext) ProtoMessage() {} +func (m *LinuxContainerSecurityContext) Reset() { *m = LinuxContainerSecurityContext{} } +func (*LinuxContainerSecurityContext) ProtoMessage() {} func (*LinuxContainerSecurityContext) Descriptor() ([]byte, []int) { - return fileDescriptorApi, []int{31} + return fileDescriptorApi, []int{33} } func (m *LinuxContainerSecurityContext) GetCapabilities() *Capability { @@ -1422,13 +957,6 @@ func (m *LinuxContainerSecurityContext) GetCapabilities() *Capability { return nil } -func (m *LinuxContainerSecurityContext) GetPrivileged() bool { - if m != nil && m.Privileged != nil { - return *m.Privileged - } - return false -} - func (m *LinuxContainerSecurityContext) GetNamespaceOptions() *NamespaceOption { if m != nil { return m.NamespaceOptions @@ -1443,30 +971,9 @@ func (m *LinuxContainerSecurityContext) GetSelinuxOptions() *SELinuxOption { return nil } -func (m *LinuxContainerSecurityContext) GetRunAsUser() int64 { - if m != nil && m.RunAsUser != nil { - return *m.RunAsUser - } - return 0 -} - -func (m *LinuxContainerSecurityContext) GetRunAsUsername() string { - if m != nil && m.RunAsUsername != nil { - return *m.RunAsUsername - } - return "" -} - -func (m *LinuxContainerSecurityContext) GetReadonlyRootfs() bool { - if m != nil && m.ReadonlyRootfs != nil { - return *m.ReadonlyRootfs - } - return false -} - -func (m *LinuxContainerSecurityContext) GetSupplementalGroups() []int64 { +func (m *LinuxContainerSecurityContext) GetRunAsUser() *Int64Value { if m != nil { - return m.SupplementalGroups + return m.RunAsUser } return nil } @@ -1477,14 +984,12 @@ type LinuxContainerConfig struct { // Resources specification for the container. Resources *LinuxContainerResources `protobuf:"bytes,1,opt,name=resources" json:"resources,omitempty"` // LinuxContainerSecurityContext configuration for the container. - SecurityContext *LinuxContainerSecurityContext `protobuf:"bytes,2,opt,name=security_context,json=securityContext" json:"security_context,omitempty"` - XXX_unrecognized []byte `json:"-"` + SecurityContext *LinuxContainerSecurityContext `protobuf:"bytes,2,opt,name=security_context,json=securityContext" json:"security_context,omitempty"` } func (m *LinuxContainerConfig) Reset() { *m = LinuxContainerConfig{} } -func (m *LinuxContainerConfig) String() string { return proto.CompactTextString(m) } func (*LinuxContainerConfig) ProtoMessage() {} -func (*LinuxContainerConfig) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{32} } +func (*LinuxContainerConfig) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{34} } func (m *LinuxContainerConfig) GetResources() *LinuxContainerResources { if m != nil { @@ -1507,70 +1012,31 @@ func (m *LinuxContainerConfig) GetSecurityContext() *LinuxContainerSecurityConte // within a sandbox for the entire lifetime of the sandbox. type ContainerMetadata struct { // Name of the container. Same as the container name in the PodSpec. - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - // Attempt number of creating the container. - Attempt *uint32 `protobuf:"varint,2,opt,name=attempt" json:"attempt,omitempty"` - XXX_unrecognized []byte `json:"-"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Attempt number of creating the container. Default: 0. + Attempt uint32 `protobuf:"varint,2,opt,name=attempt,proto3" json:"attempt,omitempty"` } func (m *ContainerMetadata) Reset() { *m = ContainerMetadata{} } -func (m *ContainerMetadata) String() string { return proto.CompactTextString(m) } func (*ContainerMetadata) ProtoMessage() {} -func (*ContainerMetadata) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{33} } - -func (m *ContainerMetadata) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func (m *ContainerMetadata) GetAttempt() uint32 { - if m != nil && m.Attempt != nil { - return *m.Attempt - } - return 0 -} +func (*ContainerMetadata) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{35} } // Device specifies a host device to mount into a container. type Device struct { // Path of the device within the container. - ContainerPath *string `protobuf:"bytes,1,opt,name=container_path,json=containerPath" json:"container_path,omitempty"` + ContainerPath string `protobuf:"bytes,1,opt,name=container_path,json=containerPath,proto3" json:"container_path,omitempty"` // Path of the device on the host. - HostPath *string `protobuf:"bytes,2,opt,name=host_path,json=hostPath" json:"host_path,omitempty"` + HostPath string `protobuf:"bytes,2,opt,name=host_path,json=hostPath,proto3" json:"host_path,omitempty"` // Cgroups permissions of the device, candidates are one or more of // * r - allows container to read from the specified device. // * w - allows container to write to the specified device. // * m - allows container to create device files that do not yet exist. - Permissions *string `protobuf:"bytes,3,opt,name=permissions" json:"permissions,omitempty"` - XXX_unrecognized []byte `json:"-"` + Permissions string `protobuf:"bytes,3,opt,name=permissions,proto3" json:"permissions,omitempty"` } func (m *Device) Reset() { *m = Device{} } -func (m *Device) String() string { return proto.CompactTextString(m) } func (*Device) ProtoMessage() {} -func (*Device) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{34} } - -func (m *Device) GetContainerPath() string { - if m != nil && m.ContainerPath != nil { - return *m.ContainerPath - } - return "" -} - -func (m *Device) GetHostPath() string { - if m != nil && m.HostPath != nil { - return *m.HostPath - } - return "" -} - -func (m *Device) GetPermissions() string { - if m != nil && m.Permissions != nil { - return *m.Permissions - } - return "" -} +func (*Device) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{36} } // ContainerConfig holds all the required and optional fields for creating a // container. @@ -1587,7 +1053,7 @@ type ContainerConfig struct { // Args for the Command (i.e., command for docker) Args []string `protobuf:"bytes,4,rep,name=args" json:"args,omitempty"` // Current working directory of the command. - WorkingDir *string `protobuf:"bytes,5,opt,name=working_dir,json=workingDir" json:"working_dir,omitempty"` + WorkingDir string `protobuf:"bytes,5,opt,name=working_dir,json=workingDir,proto3" json:"working_dir,omitempty"` // List of environment variable to set in the container. Envs []*KeyValue `protobuf:"bytes,6,rep,name=envs" json:"envs,omitempty"` // Mounts for the container. @@ -1600,7 +1066,7 @@ type ContainerConfig struct { // prefixed-name ::= prefix '/' name // prefix ::= DNS_SUBDOMAIN // name ::= DNS_LABEL - Labels map[string]string `protobuf:"bytes,9,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Labels map[string]string `protobuf:"bytes,9,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // Unstructured key-value map that may be used by the kubelet to store and // retrieve arbitrary metadata. // @@ -1611,7 +1077,7 @@ type ContainerConfig struct { // In general, in order to preserve a well-defined interface between the // kubelet and the container runtime, annotations SHOULD NOT influence // runtime behaviour. - Annotations map[string]string `protobuf:"bytes,10,rep,name=annotations" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Annotations map[string]string `protobuf:"bytes,10,rep,name=annotations" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // Path relative to PodSandboxConfig.LogDirectory for container to store // the log (STDOUT and STDERR) on the host. // E.g., @@ -1622,23 +1088,21 @@ type ContainerConfig struct { // container logs are under active discussion in // https://issues.k8s.io/24677. There *may* be future change of direction // for logging as the discussion carries on. - LogPath *string `protobuf:"bytes,11,opt,name=log_path,json=logPath" json:"log_path,omitempty"` + LogPath string `protobuf:"bytes,11,opt,name=log_path,json=logPath,proto3" json:"log_path,omitempty"` // Variables for interactive containers, these have very specialized // use-cases (e.g. debugging). // TODO: Determine if we need to continue supporting these fields that are // part of Kubernetes's Container Spec. - Stdin *bool `protobuf:"varint,12,opt,name=stdin" json:"stdin,omitempty"` - StdinOnce *bool `protobuf:"varint,13,opt,name=stdin_once,json=stdinOnce" json:"stdin_once,omitempty"` - Tty *bool `protobuf:"varint,14,opt,name=tty" json:"tty,omitempty"` + Stdin bool `protobuf:"varint,12,opt,name=stdin,proto3" json:"stdin,omitempty"` + StdinOnce bool `protobuf:"varint,13,opt,name=stdin_once,json=stdinOnce,proto3" json:"stdin_once,omitempty"` + Tty bool `protobuf:"varint,14,opt,name=tty,proto3" json:"tty,omitempty"` // Configuration specific to Linux containers. - Linux *LinuxContainerConfig `protobuf:"bytes,15,opt,name=linux" json:"linux,omitempty"` - XXX_unrecognized []byte `json:"-"` + Linux *LinuxContainerConfig `protobuf:"bytes,15,opt,name=linux" json:"linux,omitempty"` } func (m *ContainerConfig) Reset() { *m = ContainerConfig{} } -func (m *ContainerConfig) String() string { return proto.CompactTextString(m) } func (*ContainerConfig) ProtoMessage() {} -func (*ContainerConfig) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{35} } +func (*ContainerConfig) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{37} } func (m *ContainerConfig) GetMetadata() *ContainerMetadata { if m != nil { @@ -1654,27 +1118,6 @@ func (m *ContainerConfig) GetImage() *ImageSpec { return nil } -func (m *ContainerConfig) GetCommand() []string { - if m != nil { - return m.Command - } - return nil -} - -func (m *ContainerConfig) GetArgs() []string { - if m != nil { - return m.Args - } - return nil -} - -func (m *ContainerConfig) GetWorkingDir() string { - if m != nil && m.WorkingDir != nil { - return *m.WorkingDir - } - return "" -} - func (m *ContainerConfig) GetEnvs() []*KeyValue { if m != nil { return m.Envs @@ -1710,34 +1153,6 @@ func (m *ContainerConfig) GetAnnotations() map[string]string { return nil } -func (m *ContainerConfig) GetLogPath() string { - if m != nil && m.LogPath != nil { - return *m.LogPath - } - return "" -} - -func (m *ContainerConfig) GetStdin() bool { - if m != nil && m.Stdin != nil { - return *m.Stdin - } - return false -} - -func (m *ContainerConfig) GetStdinOnce() bool { - if m != nil && m.StdinOnce != nil { - return *m.StdinOnce - } - return false -} - -func (m *ContainerConfig) GetTty() bool { - if m != nil && m.Tty != nil { - return *m.Tty - } - return false -} - func (m *ContainerConfig) GetLinux() *LinuxContainerConfig { if m != nil { return m.Linux @@ -1747,28 +1162,19 @@ func (m *ContainerConfig) GetLinux() *LinuxContainerConfig { type CreateContainerRequest struct { // ID of the PodSandbox in which the container should be created. - PodSandboxId *string `protobuf:"bytes,1,opt,name=pod_sandbox_id,json=podSandboxId" json:"pod_sandbox_id,omitempty"` + PodSandboxId string `protobuf:"bytes,1,opt,name=pod_sandbox_id,json=podSandboxId,proto3" json:"pod_sandbox_id,omitempty"` // Config of the container. Config *ContainerConfig `protobuf:"bytes,2,opt,name=config" json:"config,omitempty"` // Config of the PodSandbox. This is the same config that was passed // to RunPodSandboxRequest to create the PodSandbox. It is passed again // here just for easy reference. The PodSandboxConfig is immutable and // remains the same throughout the lifetime of the pod. - SandboxConfig *PodSandboxConfig `protobuf:"bytes,3,opt,name=sandbox_config,json=sandboxConfig" json:"sandbox_config,omitempty"` - XXX_unrecognized []byte `json:"-"` + SandboxConfig *PodSandboxConfig `protobuf:"bytes,3,opt,name=sandbox_config,json=sandboxConfig" json:"sandbox_config,omitempty"` } func (m *CreateContainerRequest) Reset() { *m = CreateContainerRequest{} } -func (m *CreateContainerRequest) String() string { return proto.CompactTextString(m) } func (*CreateContainerRequest) ProtoMessage() {} -func (*CreateContainerRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{36} } - -func (m *CreateContainerRequest) GetPodSandboxId() string { - if m != nil && m.PodSandboxId != nil { - return *m.PodSandboxId - } - return "" -} +func (*CreateContainerRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{38} } func (m *CreateContainerRequest) GetConfig() *ContainerConfig { if m != nil { @@ -1786,152 +1192,98 @@ func (m *CreateContainerRequest) GetSandboxConfig() *PodSandboxConfig { type CreateContainerResponse struct { // ID of the created container. - ContainerId *string `protobuf:"bytes,1,opt,name=container_id,json=containerId" json:"container_id,omitempty"` - XXX_unrecognized []byte `json:"-"` + ContainerId string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` } func (m *CreateContainerResponse) Reset() { *m = CreateContainerResponse{} } -func (m *CreateContainerResponse) String() string { return proto.CompactTextString(m) } func (*CreateContainerResponse) ProtoMessage() {} -func (*CreateContainerResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{37} } - -func (m *CreateContainerResponse) GetContainerId() string { - if m != nil && m.ContainerId != nil { - return *m.ContainerId - } - return "" -} +func (*CreateContainerResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{39} } type StartContainerRequest struct { // ID of the container to start. - ContainerId *string `protobuf:"bytes,1,opt,name=container_id,json=containerId" json:"container_id,omitempty"` - XXX_unrecognized []byte `json:"-"` + ContainerId string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` } func (m *StartContainerRequest) Reset() { *m = StartContainerRequest{} } -func (m *StartContainerRequest) String() string { return proto.CompactTextString(m) } func (*StartContainerRequest) ProtoMessage() {} -func (*StartContainerRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{38} } - -func (m *StartContainerRequest) GetContainerId() string { - if m != nil && m.ContainerId != nil { - return *m.ContainerId - } - return "" -} +func (*StartContainerRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{40} } type StartContainerResponse struct { - XXX_unrecognized []byte `json:"-"` } func (m *StartContainerResponse) Reset() { *m = StartContainerResponse{} } -func (m *StartContainerResponse) String() string { return proto.CompactTextString(m) } func (*StartContainerResponse) ProtoMessage() {} -func (*StartContainerResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{39} } +func (*StartContainerResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{41} } type StopContainerRequest struct { // ID of the container to stop. - ContainerId *string `protobuf:"bytes,1,opt,name=container_id,json=containerId" json:"container_id,omitempty"` - // Timeout, in seconds, to stop the container. - Timeout *int64 `protobuf:"varint,2,opt,name=timeout" json:"timeout,omitempty"` - XXX_unrecognized []byte `json:"-"` + ContainerId string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` + // Timeout in seconds to wait for the container to stop before forcibly + // terminating it. Default: 0 (forcibly terminate the container immediately) + Timeout int64 `protobuf:"varint,2,opt,name=timeout,proto3" json:"timeout,omitempty"` } func (m *StopContainerRequest) Reset() { *m = StopContainerRequest{} } -func (m *StopContainerRequest) String() string { return proto.CompactTextString(m) } func (*StopContainerRequest) ProtoMessage() {} -func (*StopContainerRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{40} } - -func (m *StopContainerRequest) GetContainerId() string { - if m != nil && m.ContainerId != nil { - return *m.ContainerId - } - return "" -} - -func (m *StopContainerRequest) GetTimeout() int64 { - if m != nil && m.Timeout != nil { - return *m.Timeout - } - return 0 -} +func (*StopContainerRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{42} } type StopContainerResponse struct { - XXX_unrecognized []byte `json:"-"` } func (m *StopContainerResponse) Reset() { *m = StopContainerResponse{} } -func (m *StopContainerResponse) String() string { return proto.CompactTextString(m) } func (*StopContainerResponse) ProtoMessage() {} -func (*StopContainerResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{41} } +func (*StopContainerResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{43} } type RemoveContainerRequest struct { // ID of the container to remove. - ContainerId *string `protobuf:"bytes,1,opt,name=container_id,json=containerId" json:"container_id,omitempty"` - XXX_unrecognized []byte `json:"-"` + ContainerId string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` } func (m *RemoveContainerRequest) Reset() { *m = RemoveContainerRequest{} } -func (m *RemoveContainerRequest) String() string { return proto.CompactTextString(m) } func (*RemoveContainerRequest) ProtoMessage() {} -func (*RemoveContainerRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{42} } - -func (m *RemoveContainerRequest) GetContainerId() string { - if m != nil && m.ContainerId != nil { - return *m.ContainerId - } - return "" -} +func (*RemoveContainerRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{44} } type RemoveContainerResponse struct { - XXX_unrecognized []byte `json:"-"` } func (m *RemoveContainerResponse) Reset() { *m = RemoveContainerResponse{} } -func (m *RemoveContainerResponse) String() string { return proto.CompactTextString(m) } func (*RemoveContainerResponse) ProtoMessage() {} -func (*RemoveContainerResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{43} } +func (*RemoveContainerResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{45} } + +// ContainerStateValue is the wrapper of ContainerState. +type ContainerStateValue struct { + // State of the container. + State ContainerState `protobuf:"varint,1,opt,name=state,proto3,enum=runtime.ContainerState" json:"state,omitempty"` +} + +func (m *ContainerStateValue) Reset() { *m = ContainerStateValue{} } +func (*ContainerStateValue) ProtoMessage() {} +func (*ContainerStateValue) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{46} } // ContainerFilter is used to filter containers. // All those fields are combined with 'AND' type ContainerFilter struct { // ID of the container. - Id *string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // State of the container. - State *ContainerState `protobuf:"varint,2,opt,name=state,enum=runtime.ContainerState" json:"state,omitempty"` + State *ContainerStateValue `protobuf:"bytes,2,opt,name=state" json:"state,omitempty"` // ID of the PodSandbox. - PodSandboxId *string `protobuf:"bytes,3,opt,name=pod_sandbox_id,json=podSandboxId" json:"pod_sandbox_id,omitempty"` + PodSandboxId string `protobuf:"bytes,3,opt,name=pod_sandbox_id,json=podSandboxId,proto3" json:"pod_sandbox_id,omitempty"` // LabelSelector to select matches. // Only api.MatchLabels is supported for now and the requirements // are ANDed. MatchExpressions is not supported yet. - LabelSelector map[string]string `protobuf:"bytes,4,rep,name=label_selector,json=labelSelector" json:"label_selector,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - XXX_unrecognized []byte `json:"-"` + LabelSelector map[string]string `protobuf:"bytes,4,rep,name=label_selector,json=labelSelector" json:"label_selector,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (m *ContainerFilter) Reset() { *m = ContainerFilter{} } -func (m *ContainerFilter) String() string { return proto.CompactTextString(m) } func (*ContainerFilter) ProtoMessage() {} -func (*ContainerFilter) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{44} } +func (*ContainerFilter) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{47} } -func (m *ContainerFilter) GetId() string { - if m != nil && m.Id != nil { - return *m.Id +func (m *ContainerFilter) GetState() *ContainerStateValue { + if m != nil { + return m.State } - return "" -} - -func (m *ContainerFilter) GetState() ContainerState { - if m != nil && m.State != nil { - return *m.State - } - return ContainerState_CONTAINER_CREATED -} - -func (m *ContainerFilter) GetPodSandboxId() string { - if m != nil && m.PodSandboxId != nil { - return *m.PodSandboxId - } - return "" + return nil } func (m *ContainerFilter) GetLabelSelector() map[string]string { @@ -1942,14 +1294,12 @@ func (m *ContainerFilter) GetLabelSelector() map[string]string { } type ListContainersRequest struct { - Filter *ContainerFilter `protobuf:"bytes,1,opt,name=filter" json:"filter,omitempty"` - XXX_unrecognized []byte `json:"-"` + Filter *ContainerFilter `protobuf:"bytes,1,opt,name=filter" json:"filter,omitempty"` } func (m *ListContainersRequest) Reset() { *m = ListContainersRequest{} } -func (m *ListContainersRequest) String() string { return proto.CompactTextString(m) } func (*ListContainersRequest) ProtoMessage() {} -func (*ListContainersRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{45} } +func (*ListContainersRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{48} } func (m *ListContainersRequest) GetFilter() *ContainerFilter { if m != nil { @@ -1963,48 +1313,32 @@ func (m *ListContainersRequest) GetFilter() *ContainerFilter { type Container struct { // ID of the container, used by the container runtime to identify // a container. - Id *string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // ID of the sandbox to which this container belongs. - PodSandboxId *string `protobuf:"bytes,2,opt,name=pod_sandbox_id,json=podSandboxId" json:"pod_sandbox_id,omitempty"` + PodSandboxId string `protobuf:"bytes,2,opt,name=pod_sandbox_id,json=podSandboxId,proto3" json:"pod_sandbox_id,omitempty"` // Metadata of the container. Metadata *ContainerMetadata `protobuf:"bytes,3,opt,name=metadata" json:"metadata,omitempty"` // Spec of the image. Image *ImageSpec `protobuf:"bytes,4,opt,name=image" json:"image,omitempty"` // Reference to the image in use. For most runtimes, this should be an // image ID. - ImageRef *string `protobuf:"bytes,5,opt,name=image_ref,json=imageRef" json:"image_ref,omitempty"` + ImageRef string `protobuf:"bytes,5,opt,name=image_ref,json=imageRef,proto3" json:"image_ref,omitempty"` // State of the container. - State *ContainerState `protobuf:"varint,6,opt,name=state,enum=runtime.ContainerState" json:"state,omitempty"` + State ContainerState `protobuf:"varint,6,opt,name=state,proto3,enum=runtime.ContainerState" json:"state,omitempty"` // Creation time of the container in nanoseconds. - CreatedAt *int64 `protobuf:"varint,7,opt,name=created_at,json=createdAt" json:"created_at,omitempty"` + CreatedAt int64 `protobuf:"varint,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // Key-value pairs that may be used to scope and select individual resources. - Labels map[string]string `protobuf:"bytes,8,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Labels map[string]string `protobuf:"bytes,8,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // Unstructured key-value map holding arbitrary metadata. // Annotations MUST NOT be altered by the runtime; the value of this field // MUST be identical to that of the corresponding ContainerConfig used to // instantiate this Container. - Annotations map[string]string `protobuf:"bytes,9,rep,name=annotations" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - XXX_unrecognized []byte `json:"-"` + Annotations map[string]string `protobuf:"bytes,9,rep,name=annotations" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (m *Container) Reset() { *m = Container{} } -func (m *Container) String() string { return proto.CompactTextString(m) } func (*Container) ProtoMessage() {} -func (*Container) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{46} } - -func (m *Container) GetId() string { - if m != nil && m.Id != nil { - return *m.Id - } - return "" -} - -func (m *Container) GetPodSandboxId() string { - if m != nil && m.PodSandboxId != nil { - return *m.PodSandboxId - } - return "" -} +func (*Container) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{49} } func (m *Container) GetMetadata() *ContainerMetadata { if m != nil { @@ -2020,27 +1354,6 @@ func (m *Container) GetImage() *ImageSpec { return nil } -func (m *Container) GetImageRef() string { - if m != nil && m.ImageRef != nil { - return *m.ImageRef - } - return "" -} - -func (m *Container) GetState() ContainerState { - if m != nil && m.State != nil { - return *m.State - } - return ContainerState_CONTAINER_CREATED -} - -func (m *Container) GetCreatedAt() int64 { - if m != nil && m.CreatedAt != nil { - return *m.CreatedAt - } - return 0 -} - func (m *Container) GetLabels() map[string]string { if m != nil { return m.Labels @@ -2057,14 +1370,12 @@ func (m *Container) GetAnnotations() map[string]string { type ListContainersResponse struct { // List of containers. - Containers []*Container `protobuf:"bytes,1,rep,name=containers" json:"containers,omitempty"` - XXX_unrecognized []byte `json:"-"` + Containers []*Container `protobuf:"bytes,1,rep,name=containers" json:"containers,omitempty"` } func (m *ListContainersResponse) Reset() { *m = ListContainersResponse{} } -func (m *ListContainersResponse) String() string { return proto.CompactTextString(m) } func (*ListContainersResponse) ProtoMessage() {} -func (*ListContainersResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{47} } +func (*ListContainersResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{50} } func (m *ListContainersResponse) GetContainers() []*Container { if m != nil { @@ -2075,71 +1386,53 @@ func (m *ListContainersResponse) GetContainers() []*Container { type ContainerStatusRequest struct { // ID of the container for which to retrieve status. - ContainerId *string `protobuf:"bytes,1,opt,name=container_id,json=containerId" json:"container_id,omitempty"` - XXX_unrecognized []byte `json:"-"` + ContainerId string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` } func (m *ContainerStatusRequest) Reset() { *m = ContainerStatusRequest{} } -func (m *ContainerStatusRequest) String() string { return proto.CompactTextString(m) } func (*ContainerStatusRequest) ProtoMessage() {} -func (*ContainerStatusRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{48} } - -func (m *ContainerStatusRequest) GetContainerId() string { - if m != nil && m.ContainerId != nil { - return *m.ContainerId - } - return "" -} +func (*ContainerStatusRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{51} } // ContainerStatus represents the status of a container. type ContainerStatus struct { // ID of the container. - Id *string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Metadata of the container. Metadata *ContainerMetadata `protobuf:"bytes,2,opt,name=metadata" json:"metadata,omitempty"` // Status of the container. - State *ContainerState `protobuf:"varint,3,opt,name=state,enum=runtime.ContainerState" json:"state,omitempty"` + State ContainerState `protobuf:"varint,3,opt,name=state,proto3,enum=runtime.ContainerState" json:"state,omitempty"` // Creation time of the container in nanoseconds. - CreatedAt *int64 `protobuf:"varint,4,opt,name=created_at,json=createdAt" json:"created_at,omitempty"` - // Start time of the container in nanoseconds. - StartedAt *int64 `protobuf:"varint,5,opt,name=started_at,json=startedAt" json:"started_at,omitempty"` - // Finish time of the container in nanoseconds. - FinishedAt *int64 `protobuf:"varint,6,opt,name=finished_at,json=finishedAt" json:"finished_at,omitempty"` - // Exit code of the container. - ExitCode *int32 `protobuf:"varint,7,opt,name=exit_code,json=exitCode" json:"exit_code,omitempty"` + CreatedAt int64 `protobuf:"varint,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + // Start time of the container in nanoseconds. Default: 0 (not specified). + StartedAt int64 `protobuf:"varint,5,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"` + // Finish time of the container in nanoseconds. Default: 0 (not specified). + FinishedAt int64 `protobuf:"varint,6,opt,name=finished_at,json=finishedAt,proto3" json:"finished_at,omitempty"` + // Exit code of the container. Only required when finished_at != 0. Default: 0. + ExitCode int32 `protobuf:"varint,7,opt,name=exit_code,json=exitCode,proto3" json:"exit_code,omitempty"` // Spec of the image. Image *ImageSpec `protobuf:"bytes,8,opt,name=image" json:"image,omitempty"` // Reference to the image in use. For most runtimes, this should be an // image ID - ImageRef *string `protobuf:"bytes,9,opt,name=image_ref,json=imageRef" json:"image_ref,omitempty"` + ImageRef string `protobuf:"bytes,9,opt,name=image_ref,json=imageRef,proto3" json:"image_ref,omitempty"` // Brief CamelCase string explaining why container is in its current state. - Reason *string `protobuf:"bytes,10,opt,name=reason" json:"reason,omitempty"` + Reason string `protobuf:"bytes,10,opt,name=reason,proto3" json:"reason,omitempty"` // Human-readable message indicating details about why container is in its // current state. - Message *string `protobuf:"bytes,11,opt,name=message" json:"message,omitempty"` + Message string `protobuf:"bytes,11,opt,name=message,proto3" json:"message,omitempty"` // Key-value pairs that may be used to scope and select individual resources. - Labels map[string]string `protobuf:"bytes,12,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Labels map[string]string `protobuf:"bytes,12,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // Unstructured key-value map holding arbitrary metadata. // Annotations MUST NOT be altered by the runtime; the value of this field // MUST be identical to that of the corresponding ContainerConfig used to // instantiate the Container this status represents. - Annotations map[string]string `protobuf:"bytes,13,rep,name=annotations" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Annotations map[string]string `protobuf:"bytes,13,rep,name=annotations" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // Mounts for the container. - Mounts []*Mount `protobuf:"bytes,14,rep,name=mounts" json:"mounts,omitempty"` - XXX_unrecognized []byte `json:"-"` + Mounts []*Mount `protobuf:"bytes,14,rep,name=mounts" json:"mounts,omitempty"` } func (m *ContainerStatus) Reset() { *m = ContainerStatus{} } -func (m *ContainerStatus) String() string { return proto.CompactTextString(m) } func (*ContainerStatus) ProtoMessage() {} -func (*ContainerStatus) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{49} } - -func (m *ContainerStatus) GetId() string { - if m != nil && m.Id != nil { - return *m.Id - } - return "" -} +func (*ContainerStatus) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{52} } func (m *ContainerStatus) GetMetadata() *ContainerMetadata { if m != nil { @@ -2148,41 +1441,6 @@ func (m *ContainerStatus) GetMetadata() *ContainerMetadata { return nil } -func (m *ContainerStatus) GetState() ContainerState { - if m != nil && m.State != nil { - return *m.State - } - return ContainerState_CONTAINER_CREATED -} - -func (m *ContainerStatus) GetCreatedAt() int64 { - if m != nil && m.CreatedAt != nil { - return *m.CreatedAt - } - return 0 -} - -func (m *ContainerStatus) GetStartedAt() int64 { - if m != nil && m.StartedAt != nil { - return *m.StartedAt - } - return 0 -} - -func (m *ContainerStatus) GetFinishedAt() int64 { - if m != nil && m.FinishedAt != nil { - return *m.FinishedAt - } - return 0 -} - -func (m *ContainerStatus) GetExitCode() int32 { - if m != nil && m.ExitCode != nil { - return *m.ExitCode - } - return 0 -} - func (m *ContainerStatus) GetImage() *ImageSpec { if m != nil { return m.Image @@ -2190,27 +1448,6 @@ func (m *ContainerStatus) GetImage() *ImageSpec { return nil } -func (m *ContainerStatus) GetImageRef() string { - if m != nil && m.ImageRef != nil { - return *m.ImageRef - } - return "" -} - -func (m *ContainerStatus) GetReason() string { - if m != nil && m.Reason != nil { - return *m.Reason - } - return "" -} - -func (m *ContainerStatus) GetMessage() string { - if m != nil && m.Message != nil { - return *m.Message - } - return "" -} - func (m *ContainerStatus) GetLabels() map[string]string { if m != nil { return m.Labels @@ -2234,14 +1471,12 @@ func (m *ContainerStatus) GetMounts() []*Mount { type ContainerStatusResponse struct { // Status of the container. - Status *ContainerStatus `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"` - XXX_unrecognized []byte `json:"-"` + Status *ContainerStatus `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"` } func (m *ContainerStatusResponse) Reset() { *m = ContainerStatusResponse{} } -func (m *ContainerStatusResponse) String() string { return proto.CompactTextString(m) } func (*ContainerStatusResponse) ProtoMessage() {} -func (*ContainerStatusResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{50} } +func (*ContainerStatusResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{53} } func (m *ContainerStatusResponse) GetStatus() *ContainerStatus { if m != nil { @@ -2252,249 +1487,105 @@ func (m *ContainerStatusResponse) GetStatus() *ContainerStatus { type ExecSyncRequest struct { // ID of the container. - ContainerId *string `protobuf:"bytes,1,opt,name=container_id,json=containerId" json:"container_id,omitempty"` + ContainerId string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` // Command to execute. Cmd []string `protobuf:"bytes,2,rep,name=cmd" json:"cmd,omitempty"` - // Timeout in seconds to stop the command. Default: run forever. - Timeout *int64 `protobuf:"varint,3,opt,name=timeout" json:"timeout,omitempty"` - XXX_unrecognized []byte `json:"-"` + // Timeout in seconds to stop the command. Default: 0 (run forever). + Timeout int64 `protobuf:"varint,3,opt,name=timeout,proto3" json:"timeout,omitempty"` } func (m *ExecSyncRequest) Reset() { *m = ExecSyncRequest{} } -func (m *ExecSyncRequest) String() string { return proto.CompactTextString(m) } func (*ExecSyncRequest) ProtoMessage() {} -func (*ExecSyncRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{51} } - -func (m *ExecSyncRequest) GetContainerId() string { - if m != nil && m.ContainerId != nil { - return *m.ContainerId - } - return "" -} - -func (m *ExecSyncRequest) GetCmd() []string { - if m != nil { - return m.Cmd - } - return nil -} - -func (m *ExecSyncRequest) GetTimeout() int64 { - if m != nil && m.Timeout != nil { - return *m.Timeout - } - return 0 -} +func (*ExecSyncRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{54} } type ExecSyncResponse struct { // Captured command stdout output. - Stdout []byte `protobuf:"bytes,1,opt,name=stdout" json:"stdout,omitempty"` + Stdout []byte `protobuf:"bytes,1,opt,name=stdout,proto3" json:"stdout,omitempty"` // Captured command stderr output. - Stderr []byte `protobuf:"bytes,2,opt,name=stderr" json:"stderr,omitempty"` - // Exit code the command finished with. - ExitCode *int32 `protobuf:"varint,3,opt,name=exit_code,json=exitCode" json:"exit_code,omitempty"` - XXX_unrecognized []byte `json:"-"` + Stderr []byte `protobuf:"bytes,2,opt,name=stderr,proto3" json:"stderr,omitempty"` + // Exit code the command finished with. Default: 0 (success). + ExitCode int32 `protobuf:"varint,3,opt,name=exit_code,json=exitCode,proto3" json:"exit_code,omitempty"` } func (m *ExecSyncResponse) Reset() { *m = ExecSyncResponse{} } -func (m *ExecSyncResponse) String() string { return proto.CompactTextString(m) } func (*ExecSyncResponse) ProtoMessage() {} -func (*ExecSyncResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{52} } - -func (m *ExecSyncResponse) GetStdout() []byte { - if m != nil { - return m.Stdout - } - return nil -} - -func (m *ExecSyncResponse) GetStderr() []byte { - if m != nil { - return m.Stderr - } - return nil -} - -func (m *ExecSyncResponse) GetExitCode() int32 { - if m != nil && m.ExitCode != nil { - return *m.ExitCode - } - return 0 -} +func (*ExecSyncResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{55} } type ExecRequest struct { // ID of the container in which to execute the command. - ContainerId *string `protobuf:"bytes,1,opt,name=container_id,json=containerId" json:"container_id,omitempty"` + ContainerId string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` // Command to execute. Cmd []string `protobuf:"bytes,2,rep,name=cmd" json:"cmd,omitempty"` // Whether to exec the command in a TTY. - Tty *bool `protobuf:"varint,3,opt,name=tty" json:"tty,omitempty"` + Tty bool `protobuf:"varint,3,opt,name=tty,proto3" json:"tty,omitempty"` // Whether to stream stdin. - Stdin *bool `protobuf:"varint,4,opt,name=stdin" json:"stdin,omitempty"` - XXX_unrecognized []byte `json:"-"` + Stdin bool `protobuf:"varint,4,opt,name=stdin,proto3" json:"stdin,omitempty"` } func (m *ExecRequest) Reset() { *m = ExecRequest{} } -func (m *ExecRequest) String() string { return proto.CompactTextString(m) } func (*ExecRequest) ProtoMessage() {} -func (*ExecRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{53} } - -func (m *ExecRequest) GetContainerId() string { - if m != nil && m.ContainerId != nil { - return *m.ContainerId - } - return "" -} - -func (m *ExecRequest) GetCmd() []string { - if m != nil { - return m.Cmd - } - return nil -} - -func (m *ExecRequest) GetTty() bool { - if m != nil && m.Tty != nil { - return *m.Tty - } - return false -} - -func (m *ExecRequest) GetStdin() bool { - if m != nil && m.Stdin != nil { - return *m.Stdin - } - return false -} +func (*ExecRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{56} } type ExecResponse struct { // Fully qualified URL of the exec streaming server. - Url *string `protobuf:"bytes,1,opt,name=url" json:"url,omitempty"` - XXX_unrecognized []byte `json:"-"` + Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` } func (m *ExecResponse) Reset() { *m = ExecResponse{} } -func (m *ExecResponse) String() string { return proto.CompactTextString(m) } func (*ExecResponse) ProtoMessage() {} -func (*ExecResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{54} } - -func (m *ExecResponse) GetUrl() string { - if m != nil && m.Url != nil { - return *m.Url - } - return "" -} +func (*ExecResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{57} } type AttachRequest struct { // ID of the container to which to attach. - ContainerId *string `protobuf:"bytes,1,opt,name=container_id,json=containerId" json:"container_id,omitempty"` + ContainerId string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` // Whether to stream stdin. - Stdin *bool `protobuf:"varint,2,opt,name=stdin" json:"stdin,omitempty"` + Stdin bool `protobuf:"varint,2,opt,name=stdin,proto3" json:"stdin,omitempty"` // Whether the process being attached is running in a TTY. // This must match the TTY setting in the ContainerConfig. - Tty *bool `protobuf:"varint,3,opt,name=tty" json:"tty,omitempty"` - XXX_unrecognized []byte `json:"-"` + Tty bool `protobuf:"varint,3,opt,name=tty,proto3" json:"tty,omitempty"` } func (m *AttachRequest) Reset() { *m = AttachRequest{} } -func (m *AttachRequest) String() string { return proto.CompactTextString(m) } func (*AttachRequest) ProtoMessage() {} -func (*AttachRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{55} } - -func (m *AttachRequest) GetContainerId() string { - if m != nil && m.ContainerId != nil { - return *m.ContainerId - } - return "" -} - -func (m *AttachRequest) GetStdin() bool { - if m != nil && m.Stdin != nil { - return *m.Stdin - } - return false -} - -func (m *AttachRequest) GetTty() bool { - if m != nil && m.Tty != nil { - return *m.Tty - } - return false -} +func (*AttachRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{58} } type AttachResponse struct { // Fully qualified URL of the attach streaming server. - Url *string `protobuf:"bytes,1,opt,name=url" json:"url,omitempty"` - XXX_unrecognized []byte `json:"-"` + Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` } func (m *AttachResponse) Reset() { *m = AttachResponse{} } -func (m *AttachResponse) String() string { return proto.CompactTextString(m) } func (*AttachResponse) ProtoMessage() {} -func (*AttachResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{56} } - -func (m *AttachResponse) GetUrl() string { - if m != nil && m.Url != nil { - return *m.Url - } - return "" -} +func (*AttachResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{59} } type PortForwardRequest struct { // ID of the container to which to forward the port. - PodSandboxId *string `protobuf:"bytes,1,opt,name=pod_sandbox_id,json=podSandboxId" json:"pod_sandbox_id,omitempty"` + PodSandboxId string `protobuf:"bytes,1,opt,name=pod_sandbox_id,json=podSandboxId,proto3" json:"pod_sandbox_id,omitempty"` // Port to forward. - Port []int32 `protobuf:"varint,2,rep,name=port" json:"port,omitempty"` - XXX_unrecognized []byte `json:"-"` + Port []int32 `protobuf:"varint,2,rep,name=port" json:"port,omitempty"` } func (m *PortForwardRequest) Reset() { *m = PortForwardRequest{} } -func (m *PortForwardRequest) String() string { return proto.CompactTextString(m) } func (*PortForwardRequest) ProtoMessage() {} -func (*PortForwardRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{57} } - -func (m *PortForwardRequest) GetPodSandboxId() string { - if m != nil && m.PodSandboxId != nil { - return *m.PodSandboxId - } - return "" -} - -func (m *PortForwardRequest) GetPort() []int32 { - if m != nil { - return m.Port - } - return nil -} +func (*PortForwardRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{60} } type PortForwardResponse struct { // Fully qualified URL of the port-forward streaming server. - Url *string `protobuf:"bytes,1,opt,name=url" json:"url,omitempty"` - XXX_unrecognized []byte `json:"-"` + Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` } func (m *PortForwardResponse) Reset() { *m = PortForwardResponse{} } -func (m *PortForwardResponse) String() string { return proto.CompactTextString(m) } func (*PortForwardResponse) ProtoMessage() {} -func (*PortForwardResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{58} } - -func (m *PortForwardResponse) GetUrl() string { - if m != nil && m.Url != nil { - return *m.Url - } - return "" -} +func (*PortForwardResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{61} } type ImageFilter struct { // Spec of the image. - Image *ImageSpec `protobuf:"bytes,1,opt,name=image" json:"image,omitempty"` - XXX_unrecognized []byte `json:"-"` + Image *ImageSpec `protobuf:"bytes,1,opt,name=image" json:"image,omitempty"` } func (m *ImageFilter) Reset() { *m = ImageFilter{} } -func (m *ImageFilter) String() string { return proto.CompactTextString(m) } func (*ImageFilter) ProtoMessage() {} -func (*ImageFilter) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{59} } +func (*ImageFilter) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{62} } func (m *ImageFilter) GetImage() *ImageSpec { if m != nil { @@ -2505,14 +1596,12 @@ func (m *ImageFilter) GetImage() *ImageSpec { type ListImagesRequest struct { // Filter to list images. - Filter *ImageFilter `protobuf:"bytes,1,opt,name=filter" json:"filter,omitempty"` - XXX_unrecognized []byte `json:"-"` + Filter *ImageFilter `protobuf:"bytes,1,opt,name=filter" json:"filter,omitempty"` } func (m *ListImagesRequest) Reset() { *m = ListImagesRequest{} } -func (m *ListImagesRequest) String() string { return proto.CompactTextString(m) } func (*ListImagesRequest) ProtoMessage() {} -func (*ListImagesRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{60} } +func (*ListImagesRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{63} } func (m *ListImagesRequest) GetFilter() *ImageFilter { if m != nil { @@ -2524,80 +1613,41 @@ func (m *ListImagesRequest) GetFilter() *ImageFilter { // Basic information about a container image. type Image struct { // ID of the image. - Id *string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Other names by which this image is known. RepoTags []string `protobuf:"bytes,2,rep,name=repo_tags,json=repoTags" json:"repo_tags,omitempty"` // Digests by which this image is known. RepoDigests []string `protobuf:"bytes,3,rep,name=repo_digests,json=repoDigests" json:"repo_digests,omitempty"` - // Size of the image in bytes. - Size_ *uint64 `protobuf:"varint,4,opt,name=size" json:"size,omitempty"` + // Size of the image in bytes. Must be > 0. + Size_ uint64 `protobuf:"varint,4,opt,name=size,proto3" json:"size,omitempty"` // UID that will run the command(s). This is used as a default if no user is // specified when creating the container. UID and the following user name // are mutually exclusive. - Uid *int64 `protobuf:"varint,5,opt,name=uid" json:"uid,omitempty"` + Uid *Int64Value `protobuf:"bytes,5,opt,name=uid" json:"uid,omitempty"` // User name that will run the command(s). This is used if UID is not set // and no user is specified when creating container. - Username *string `protobuf:"bytes,6,opt,name=username" json:"username,omitempty"` - XXX_unrecognized []byte `json:"-"` + Username string `protobuf:"bytes,6,opt,name=username,proto3" json:"username,omitempty"` } func (m *Image) Reset() { *m = Image{} } -func (m *Image) String() string { return proto.CompactTextString(m) } func (*Image) ProtoMessage() {} -func (*Image) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{61} } +func (*Image) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{64} } -func (m *Image) GetId() string { - if m != nil && m.Id != nil { - return *m.Id - } - return "" -} - -func (m *Image) GetRepoTags() []string { +func (m *Image) GetUid() *Int64Value { if m != nil { - return m.RepoTags + return m.Uid } return nil } -func (m *Image) GetRepoDigests() []string { - if m != nil { - return m.RepoDigests - } - return nil -} - -func (m *Image) GetSize_() uint64 { - if m != nil && m.Size_ != nil { - return *m.Size_ - } - return 0 -} - -func (m *Image) GetUid() int64 { - if m != nil && m.Uid != nil { - return *m.Uid - } - return 0 -} - -func (m *Image) GetUsername() string { - if m != nil && m.Username != nil { - return *m.Username - } - return "" -} - type ListImagesResponse struct { // List of images. - Images []*Image `protobuf:"bytes,1,rep,name=images" json:"images,omitempty"` - XXX_unrecognized []byte `json:"-"` + Images []*Image `protobuf:"bytes,1,rep,name=images" json:"images,omitempty"` } func (m *ListImagesResponse) Reset() { *m = ListImagesResponse{} } -func (m *ListImagesResponse) String() string { return proto.CompactTextString(m) } func (*ListImagesResponse) ProtoMessage() {} -func (*ListImagesResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{62} } +func (*ListImagesResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{65} } func (m *ListImagesResponse) GetImages() []*Image { if m != nil { @@ -2608,14 +1658,12 @@ func (m *ListImagesResponse) GetImages() []*Image { type ImageStatusRequest struct { // Spec of the image. - Image *ImageSpec `protobuf:"bytes,1,opt,name=image" json:"image,omitempty"` - XXX_unrecognized []byte `json:"-"` + Image *ImageSpec `protobuf:"bytes,1,opt,name=image" json:"image,omitempty"` } func (m *ImageStatusRequest) Reset() { *m = ImageStatusRequest{} } -func (m *ImageStatusRequest) String() string { return proto.CompactTextString(m) } func (*ImageStatusRequest) ProtoMessage() {} -func (*ImageStatusRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{63} } +func (*ImageStatusRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{66} } func (m *ImageStatusRequest) GetImage() *ImageSpec { if m != nil { @@ -2626,14 +1674,12 @@ func (m *ImageStatusRequest) GetImage() *ImageSpec { type ImageStatusResponse struct { // Status of the image. - Image *Image `protobuf:"bytes,1,opt,name=image" json:"image,omitempty"` - XXX_unrecognized []byte `json:"-"` + Image *Image `protobuf:"bytes,1,opt,name=image" json:"image,omitempty"` } func (m *ImageStatusResponse) Reset() { *m = ImageStatusResponse{} } -func (m *ImageStatusResponse) String() string { return proto.CompactTextString(m) } func (*ImageStatusResponse) ProtoMessage() {} -func (*ImageStatusResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{64} } +func (*ImageStatusResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{67} } func (m *ImageStatusResponse) GetImage() *Image { if m != nil { @@ -2644,64 +1690,20 @@ func (m *ImageStatusResponse) GetImage() *Image { // AuthConfig contains authorization information for connecting to a registry. type AuthConfig struct { - Username *string `protobuf:"bytes,1,opt,name=username" json:"username,omitempty"` - Password *string `protobuf:"bytes,2,opt,name=password" json:"password,omitempty"` - Auth *string `protobuf:"bytes,3,opt,name=auth" json:"auth,omitempty"` - ServerAddress *string `protobuf:"bytes,4,opt,name=server_address,json=serverAddress" json:"server_address,omitempty"` + Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` + Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` + Auth string `protobuf:"bytes,3,opt,name=auth,proto3" json:"auth,omitempty"` + ServerAddress string `protobuf:"bytes,4,opt,name=server_address,json=serverAddress,proto3" json:"server_address,omitempty"` // IdentityToken is used to authenticate the user and get // an access token for the registry. - IdentityToken *string `protobuf:"bytes,5,opt,name=identity_token,json=identityToken" json:"identity_token,omitempty"` + IdentityToken string `protobuf:"bytes,5,opt,name=identity_token,json=identityToken,proto3" json:"identity_token,omitempty"` // RegistryToken is a bearer token to be sent to a registry - RegistryToken *string `protobuf:"bytes,6,opt,name=registry_token,json=registryToken" json:"registry_token,omitempty"` - XXX_unrecognized []byte `json:"-"` + RegistryToken string `protobuf:"bytes,6,opt,name=registry_token,json=registryToken,proto3" json:"registry_token,omitempty"` } func (m *AuthConfig) Reset() { *m = AuthConfig{} } -func (m *AuthConfig) String() string { return proto.CompactTextString(m) } func (*AuthConfig) ProtoMessage() {} -func (*AuthConfig) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{65} } - -func (m *AuthConfig) GetUsername() string { - if m != nil && m.Username != nil { - return *m.Username - } - return "" -} - -func (m *AuthConfig) GetPassword() string { - if m != nil && m.Password != nil { - return *m.Password - } - return "" -} - -func (m *AuthConfig) GetAuth() string { - if m != nil && m.Auth != nil { - return *m.Auth - } - return "" -} - -func (m *AuthConfig) GetServerAddress() string { - if m != nil && m.ServerAddress != nil { - return *m.ServerAddress - } - return "" -} - -func (m *AuthConfig) GetIdentityToken() string { - if m != nil && m.IdentityToken != nil { - return *m.IdentityToken - } - return "" -} - -func (m *AuthConfig) GetRegistryToken() string { - if m != nil && m.RegistryToken != nil { - return *m.RegistryToken - } - return "" -} +func (*AuthConfig) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{68} } type PullImageRequest struct { // Spec of the image. @@ -2709,14 +1711,12 @@ type PullImageRequest struct { // Authentication configuration for pulling the image. Auth *AuthConfig `protobuf:"bytes,2,opt,name=auth" json:"auth,omitempty"` // Config of the PodSandbox, which is used to pull image in PodSandbox context. - SandboxConfig *PodSandboxConfig `protobuf:"bytes,3,opt,name=sandbox_config,json=sandboxConfig" json:"sandbox_config,omitempty"` - XXX_unrecognized []byte `json:"-"` + SandboxConfig *PodSandboxConfig `protobuf:"bytes,3,opt,name=sandbox_config,json=sandboxConfig" json:"sandbox_config,omitempty"` } func (m *PullImageRequest) Reset() { *m = PullImageRequest{} } -func (m *PullImageRequest) String() string { return proto.CompactTextString(m) } func (*PullImageRequest) ProtoMessage() {} -func (*PullImageRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{66} } +func (*PullImageRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{69} } func (m *PullImageRequest) GetImage() *ImageSpec { if m != nil { @@ -2742,32 +1742,21 @@ func (m *PullImageRequest) GetSandboxConfig() *PodSandboxConfig { type PullImageResponse struct { // Reference to the image in use. For most runtimes, this should be an // image ID or digest. - ImageRef *string `protobuf:"bytes,1,opt,name=image_ref,json=imageRef" json:"image_ref,omitempty"` - XXX_unrecognized []byte `json:"-"` + ImageRef string `protobuf:"bytes,1,opt,name=image_ref,json=imageRef,proto3" json:"image_ref,omitempty"` } func (m *PullImageResponse) Reset() { *m = PullImageResponse{} } -func (m *PullImageResponse) String() string { return proto.CompactTextString(m) } func (*PullImageResponse) ProtoMessage() {} -func (*PullImageResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{67} } - -func (m *PullImageResponse) GetImageRef() string { - if m != nil && m.ImageRef != nil { - return *m.ImageRef - } - return "" -} +func (*PullImageResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{70} } type RemoveImageRequest struct { // Spec of the image to remove. - Image *ImageSpec `protobuf:"bytes,1,opt,name=image" json:"image,omitempty"` - XXX_unrecognized []byte `json:"-"` + Image *ImageSpec `protobuf:"bytes,1,opt,name=image" json:"image,omitempty"` } func (m *RemoveImageRequest) Reset() { *m = RemoveImageRequest{} } -func (m *RemoveImageRequest) String() string { return proto.CompactTextString(m) } func (*RemoveImageRequest) ProtoMessage() {} -func (*RemoveImageRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{68} } +func (*RemoveImageRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{71} } func (m *RemoveImageRequest) GetImage() *ImageSpec { if m != nil { @@ -2777,41 +1766,28 @@ func (m *RemoveImageRequest) GetImage() *ImageSpec { } type RemoveImageResponse struct { - XXX_unrecognized []byte `json:"-"` } func (m *RemoveImageResponse) Reset() { *m = RemoveImageResponse{} } -func (m *RemoveImageResponse) String() string { return proto.CompactTextString(m) } func (*RemoveImageResponse) ProtoMessage() {} -func (*RemoveImageResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{69} } +func (*RemoveImageResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{72} } type NetworkConfig struct { // CIDR to use for pod IP addresses. - PodCidr *string `protobuf:"bytes,1,opt,name=pod_cidr,json=podCidr" json:"pod_cidr,omitempty"` - XXX_unrecognized []byte `json:"-"` + PodCidr string `protobuf:"bytes,1,opt,name=pod_cidr,json=podCidr,proto3" json:"pod_cidr,omitempty"` } func (m *NetworkConfig) Reset() { *m = NetworkConfig{} } -func (m *NetworkConfig) String() string { return proto.CompactTextString(m) } func (*NetworkConfig) ProtoMessage() {} -func (*NetworkConfig) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{70} } - -func (m *NetworkConfig) GetPodCidr() string { - if m != nil && m.PodCidr != nil { - return *m.PodCidr - } - return "" -} +func (*NetworkConfig) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{73} } type RuntimeConfig struct { - NetworkConfig *NetworkConfig `protobuf:"bytes,1,opt,name=network_config,json=networkConfig" json:"network_config,omitempty"` - XXX_unrecognized []byte `json:"-"` + NetworkConfig *NetworkConfig `protobuf:"bytes,1,opt,name=network_config,json=networkConfig" json:"network_config,omitempty"` } func (m *RuntimeConfig) Reset() { *m = RuntimeConfig{} } -func (m *RuntimeConfig) String() string { return proto.CompactTextString(m) } func (*RuntimeConfig) ProtoMessage() {} -func (*RuntimeConfig) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{71} } +func (*RuntimeConfig) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{74} } func (m *RuntimeConfig) GetNetworkConfig() *NetworkConfig { if m != nil { @@ -2821,14 +1797,12 @@ func (m *RuntimeConfig) GetNetworkConfig() *NetworkConfig { } type UpdateRuntimeConfigRequest struct { - RuntimeConfig *RuntimeConfig `protobuf:"bytes,1,opt,name=runtime_config,json=runtimeConfig" json:"runtime_config,omitempty"` - XXX_unrecognized []byte `json:"-"` + RuntimeConfig *RuntimeConfig `protobuf:"bytes,1,opt,name=runtime_config,json=runtimeConfig" json:"runtime_config,omitempty"` } func (m *UpdateRuntimeConfigRequest) Reset() { *m = UpdateRuntimeConfigRequest{} } -func (m *UpdateRuntimeConfigRequest) String() string { return proto.CompactTextString(m) } func (*UpdateRuntimeConfigRequest) ProtoMessage() {} -func (*UpdateRuntimeConfigRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{72} } +func (*UpdateRuntimeConfigRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{75} } func (m *UpdateRuntimeConfigRequest) GetRuntimeConfig() *RuntimeConfig { if m != nil { @@ -2838,17 +1812,15 @@ func (m *UpdateRuntimeConfigRequest) GetRuntimeConfig() *RuntimeConfig { } type UpdateRuntimeConfigResponse struct { - XXX_unrecognized []byte `json:"-"` } func (m *UpdateRuntimeConfigResponse) Reset() { *m = UpdateRuntimeConfigResponse{} } -func (m *UpdateRuntimeConfigResponse) String() string { return proto.CompactTextString(m) } func (*UpdateRuntimeConfigResponse) ProtoMessage() {} -func (*UpdateRuntimeConfigResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{73} } +func (*UpdateRuntimeConfigResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{76} } // RuntimeCondition contains condition information for the runtime. // There are 2 kinds of runtime conditions: -// 1. Required condtitions: Conditions are required for kubelet to work +// 1. Required conditions: Conditions are required for kubelet to work // properly. If any required condition is unmet, the node will be not ready. // The required conditions include: // * RuntimeReady: RuntimeReady means the runtime is up and ready to accept @@ -2861,60 +1833,28 @@ func (*UpdateRuntimeConfigResponse) Descriptor() ([]byte, []int) { return fileDe // them understand the status of the system. type RuntimeCondition struct { // Type of runtime condition. - Type *string `protobuf:"bytes,1,opt,name=type" json:"type,omitempty"` - // Status of the condition, one of true/false. - Status *bool `protobuf:"varint,2,opt,name=status" json:"status,omitempty"` + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + // Status of the condition, one of true/false. Default: false. + Status bool `protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"` // Brief CamelCase string containing reason for the condition's last transition. - Reason *string `protobuf:"bytes,3,opt,name=reason" json:"reason,omitempty"` + Reason string `protobuf:"bytes,3,opt,name=reason,proto3" json:"reason,omitempty"` // Human-readable message indicating details about last transition. - Message *string `protobuf:"bytes,4,opt,name=message" json:"message,omitempty"` - XXX_unrecognized []byte `json:"-"` + Message string `protobuf:"bytes,4,opt,name=message,proto3" json:"message,omitempty"` } func (m *RuntimeCondition) Reset() { *m = RuntimeCondition{} } -func (m *RuntimeCondition) String() string { return proto.CompactTextString(m) } func (*RuntimeCondition) ProtoMessage() {} -func (*RuntimeCondition) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{74} } - -func (m *RuntimeCondition) GetType() string { - if m != nil && m.Type != nil { - return *m.Type - } - return "" -} - -func (m *RuntimeCondition) GetStatus() bool { - if m != nil && m.Status != nil { - return *m.Status - } - return false -} - -func (m *RuntimeCondition) GetReason() string { - if m != nil && m.Reason != nil { - return *m.Reason - } - return "" -} - -func (m *RuntimeCondition) GetMessage() string { - if m != nil && m.Message != nil { - return *m.Message - } - return "" -} +func (*RuntimeCondition) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{77} } // RuntimeStatus is information about the current status of the runtime. type RuntimeStatus struct { // List of current observed runtime conditions. - Conditions []*RuntimeCondition `protobuf:"bytes,1,rep,name=conditions" json:"conditions,omitempty"` - XXX_unrecognized []byte `json:"-"` + Conditions []*RuntimeCondition `protobuf:"bytes,1,rep,name=conditions" json:"conditions,omitempty"` } func (m *RuntimeStatus) Reset() { *m = RuntimeStatus{} } -func (m *RuntimeStatus) String() string { return proto.CompactTextString(m) } func (*RuntimeStatus) ProtoMessage() {} -func (*RuntimeStatus) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{75} } +func (*RuntimeStatus) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{78} } func (m *RuntimeStatus) GetConditions() []*RuntimeCondition { if m != nil { @@ -2924,24 +1864,20 @@ func (m *RuntimeStatus) GetConditions() []*RuntimeCondition { } type StatusRequest struct { - XXX_unrecognized []byte `json:"-"` } func (m *StatusRequest) Reset() { *m = StatusRequest{} } -func (m *StatusRequest) String() string { return proto.CompactTextString(m) } func (*StatusRequest) ProtoMessage() {} -func (*StatusRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{76} } +func (*StatusRequest) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{79} } type StatusResponse struct { // Status of the Runtime. - Status *RuntimeStatus `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"` - XXX_unrecognized []byte `json:"-"` + Status *RuntimeStatus `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"` } func (m *StatusResponse) Reset() { *m = StatusResponse{} } -func (m *StatusResponse) String() string { return proto.CompactTextString(m) } func (*StatusResponse) ProtoMessage() {} -func (*StatusResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{77} } +func (*StatusResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{80} } func (m *StatusResponse) GetStatus() *RuntimeStatus { if m != nil { @@ -2957,6 +1893,7 @@ func init() { proto.RegisterType((*PortMapping)(nil), "runtime.PortMapping") proto.RegisterType((*Mount)(nil), "runtime.Mount") proto.RegisterType((*NamespaceOption)(nil), "runtime.NamespaceOption") + proto.RegisterType((*Int64Value)(nil), "runtime.Int64Value") proto.RegisterType((*LinuxSandboxSecurityContext)(nil), "runtime.LinuxSandboxSecurityContext") proto.RegisterType((*LinuxPodSandboxConfig)(nil), "runtime.LinuxPodSandboxConfig") proto.RegisterType((*PodSandboxMetadata)(nil), "runtime.PodSandboxMetadata") @@ -2973,6 +1910,7 @@ func init() { proto.RegisterType((*LinuxPodSandboxStatus)(nil), "runtime.LinuxPodSandboxStatus") proto.RegisterType((*PodSandboxStatus)(nil), "runtime.PodSandboxStatus") proto.RegisterType((*PodSandboxStatusResponse)(nil), "runtime.PodSandboxStatusResponse") + proto.RegisterType((*PodSandboxStateValue)(nil), "runtime.PodSandboxStateValue") proto.RegisterType((*PodSandboxFilter)(nil), "runtime.PodSandboxFilter") proto.RegisterType((*ListPodSandboxRequest)(nil), "runtime.ListPodSandboxRequest") proto.RegisterType((*PodSandbox)(nil), "runtime.PodSandbox") @@ -2995,6 +1933,7 @@ func init() { proto.RegisterType((*StopContainerResponse)(nil), "runtime.StopContainerResponse") proto.RegisterType((*RemoveContainerRequest)(nil), "runtime.RemoveContainerRequest") proto.RegisterType((*RemoveContainerResponse)(nil), "runtime.RemoveContainerResponse") + proto.RegisterType((*ContainerStateValue)(nil), "runtime.ContainerStateValue") proto.RegisterType((*ContainerFilter)(nil), "runtime.ContainerFilter") proto.RegisterType((*ListContainersRequest)(nil), "runtime.ListContainersRequest") proto.RegisterType((*Container)(nil), "runtime.Container") @@ -3918,218 +2857,16853 @@ var _ImageService_serviceDesc = grpc.ServiceDesc{ Metadata: fileDescriptorApi, } -var fileDescriptorApi = []byte{ - // 3385 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x3a, 0x5f, 0x73, 0xdb, 0xc6, - 0xf1, 0x22, 0x29, 0x51, 0xe4, 0x52, 0xa4, 0xa8, 0xb3, 0x2c, 0xd1, 0x54, 0x6c, 0xcb, 0x88, 0xed, - 0xd8, 0x4e, 0xe2, 0x9f, 0xad, 0x5f, 0x1b, 0x37, 0x4e, 0xec, 0x84, 0x91, 0x94, 0x8c, 0x62, 0x9b, - 0x56, 0x40, 0x3b, 0x4d, 0x9a, 0x07, 0x14, 0x26, 0x4e, 0x14, 0x6c, 0x12, 0x40, 0x80, 0xa3, 0x62, - 0xf5, 0x13, 0xf4, 0xa1, 0x9d, 0xe9, 0x6b, 0xde, 0x3a, 0x9d, 0xce, 0x64, 0xda, 0xbe, 0x75, 0xa6, - 0x33, 0x7d, 0xeb, 0x07, 0xe8, 0xf4, 0x03, 0xf4, 0x23, 0xf4, 0x5b, 0x74, 0xee, 0x1f, 0x70, 0x87, - 0x3f, 0xb2, 0xe4, 0x64, 0x1a, 0xbf, 0xe1, 0x76, 0xf7, 0xf6, 0xf6, 0x76, 0xf7, 0xf6, 0x76, 0x17, - 0x07, 0x75, 0x3b, 0x70, 0xaf, 0x07, 0xa1, 0x4f, 0x7c, 0x34, 0x1f, 0x4e, 0x3d, 0xe2, 0x4e, 0xb0, - 0x71, 0x0d, 0x5a, 0x9f, 0xe3, 0x30, 0x72, 0x7d, 0xcf, 0xc4, 0x5f, 0x4f, 0x71, 0x44, 0x50, 0x07, - 0xe6, 0x0f, 0x38, 0xa4, 0x53, 0x5a, 0x2f, 0x5d, 0xa9, 0x9b, 0x72, 0x68, 0x7c, 0x57, 0x82, 0xc5, - 0x98, 0x38, 0x0a, 0x7c, 0x2f, 0xc2, 0xc5, 0xd4, 0xe8, 0x02, 0x2c, 0x88, 0x45, 0x2c, 0xcf, 0x9e, - 0xe0, 0x4e, 0x99, 0xa1, 0x1b, 0x02, 0xd6, 0xb7, 0x27, 0x18, 0xbd, 0x01, 0x8b, 0x92, 0x44, 0x32, - 0xa9, 0x30, 0xaa, 0x96, 0x00, 0x8b, 0xd5, 0xd0, 0x75, 0x38, 0x25, 0x09, 0xed, 0xc0, 0x8d, 0x89, - 0x67, 0x19, 0xf1, 0x92, 0x40, 0xf5, 0x02, 0x57, 0xd0, 0x1b, 0x5f, 0x41, 0x7d, 0xab, 0x3f, 0xd8, - 0xf4, 0xbd, 0x3d, 0x77, 0x44, 0x45, 0x8c, 0x70, 0x48, 0xe7, 0x74, 0x4a, 0xeb, 0x15, 0x2a, 0xa2, - 0x18, 0xa2, 0x2e, 0xd4, 0x22, 0x6c, 0x87, 0xc3, 0x7d, 0x1c, 0x75, 0xca, 0x0c, 0x15, 0x8f, 0xe9, - 0x2c, 0x3f, 0x20, 0xae, 0xef, 0x45, 0x9d, 0x0a, 0x9f, 0x25, 0x86, 0xc6, 0xb7, 0x25, 0x68, 0xec, - 0xfa, 0x21, 0x79, 0x60, 0x07, 0x81, 0xeb, 0x8d, 0xd0, 0xdb, 0x50, 0x63, 0x4a, 0x1d, 0xfa, 0x63, - 0xa6, 0x83, 0xd6, 0xc6, 0xd2, 0x75, 0x21, 0xd2, 0xf5, 0x5d, 0x81, 0x30, 0x63, 0x12, 0x74, 0x09, - 0x5a, 0x43, 0xdf, 0x23, 0xb6, 0xeb, 0xe1, 0xd0, 0x0a, 0xfc, 0x90, 0x30, 0xcd, 0xcc, 0x99, 0xcd, - 0x18, 0x4a, 0x99, 0xa3, 0x35, 0xa8, 0xef, 0xfb, 0x11, 0xe1, 0x14, 0x15, 0x46, 0x51, 0xa3, 0x00, - 0x86, 0x5c, 0x85, 0x79, 0x86, 0x74, 0x03, 0xa1, 0x83, 0x2a, 0x1d, 0xee, 0x04, 0xc6, 0xef, 0x4a, - 0x30, 0xf7, 0xc0, 0x9f, 0x7a, 0x24, 0xb5, 0x8c, 0x4d, 0xf6, 0x85, 0x7d, 0x94, 0x65, 0x6c, 0xb2, - 0x9f, 0x2c, 0x43, 0x29, 0xb8, 0x89, 0xf8, 0x32, 0x14, 0xd9, 0x85, 0x5a, 0x88, 0x6d, 0xc7, 0xf7, - 0xc6, 0x87, 0x4c, 0x84, 0x9a, 0x19, 0x8f, 0xa9, 0xed, 0x22, 0x3c, 0x76, 0xbd, 0xe9, 0x73, 0x2b, - 0xc4, 0x63, 0xfb, 0x09, 0x1e, 0x33, 0x51, 0x6a, 0x66, 0x4b, 0x80, 0x4d, 0x0e, 0x35, 0x9e, 0xc2, - 0x22, 0x35, 0x76, 0x14, 0xd8, 0x43, 0xfc, 0x90, 0xa9, 0x90, 0xba, 0x06, 0x5b, 0xd4, 0xc3, 0xe4, - 0x1b, 0x3f, 0x7c, 0xc6, 0x24, 0xab, 0x99, 0x0d, 0x0a, 0xeb, 0x73, 0x10, 0x3a, 0x03, 0x35, 0x2e, - 0x97, 0xeb, 0x30, 0xb1, 0x6a, 0x26, 0xdb, 0xf1, 0xae, 0xeb, 0xc4, 0x28, 0x37, 0x18, 0x0a, 0xa9, - 0xe6, 0xf9, 0xee, 0x87, 0xc6, 0x3f, 0xca, 0xb0, 0x76, 0x9f, 0x2e, 0x3e, 0xb0, 0x3d, 0xe7, 0x89, - 0xff, 0x7c, 0x80, 0x87, 0xd3, 0xd0, 0x25, 0x87, 0x9b, 0xbe, 0x47, 0xf0, 0x73, 0x82, 0xb6, 0x61, - 0xc9, 0x93, 0xb2, 0x58, 0xd2, 0xbc, 0x74, 0xf5, 0xc6, 0x46, 0x27, 0xb6, 0x59, 0x4a, 0x5a, 0xb3, - 0xed, 0xe9, 0x80, 0x08, 0x7d, 0x90, 0xec, 0x5d, 0x32, 0x29, 0x33, 0x26, 0x2b, 0x31, 0x93, 0xc1, - 0x36, 0x93, 0x43, 0xb0, 0x90, 0x3a, 0x91, 0x0c, 0xce, 0x01, 0x3d, 0x07, 0x96, 0x1d, 0x59, 0xd3, - 0x08, 0x87, 0x6c, 0x17, 0x15, 0xb3, 0x1e, 0x4e, 0xbd, 0x5e, 0xf4, 0x38, 0xc2, 0x21, 0x3b, 0x18, - 0x42, 0xd1, 0x56, 0xe8, 0xfb, 0x64, 0x2f, 0x92, 0xca, 0x95, 0x60, 0x93, 0x41, 0xd1, 0xff, 0xc1, - 0xa9, 0x68, 0x1a, 0x04, 0x63, 0x3c, 0xc1, 0x1e, 0xb1, 0xc7, 0xd6, 0x28, 0xf4, 0xa7, 0x41, 0xd4, - 0x99, 0x5b, 0xaf, 0x5c, 0xa9, 0x98, 0x48, 0x45, 0x7d, 0xc2, 0x30, 0xe8, 0x1c, 0x40, 0x10, 0xba, - 0x07, 0xee, 0x18, 0x8f, 0xb0, 0xd3, 0xa9, 0x32, 0xa6, 0x0a, 0xc4, 0xf8, 0x6d, 0x09, 0x4e, 0x33, - 0xc9, 0x77, 0x7d, 0x47, 0x28, 0x51, 0x1c, 0xa3, 0xd7, 0xa1, 0x39, 0x64, 0xec, 0xad, 0xc0, 0x0e, - 0xb1, 0x47, 0x84, 0x3f, 0x2d, 0x70, 0xe0, 0x2e, 0x83, 0xa1, 0x87, 0xd0, 0x8e, 0x84, 0xce, 0xad, - 0x21, 0x57, 0xba, 0x50, 0xcd, 0xc5, 0x58, 0x35, 0x47, 0x18, 0xc8, 0x5c, 0x8c, 0x74, 0x80, 0x11, - 0x02, 0x4a, 0x24, 0x79, 0x80, 0x89, 0xed, 0xd8, 0xc4, 0x46, 0x08, 0x66, 0x59, 0x4c, 0xe1, 0x22, - 0xb0, 0x6f, 0xd4, 0x86, 0xca, 0x54, 0x38, 0x4b, 0xdd, 0xa4, 0x9f, 0xe8, 0x35, 0xa8, 0xc7, 0xa6, - 0x13, 0x81, 0x25, 0x01, 0xd0, 0x03, 0x6e, 0x13, 0x82, 0x27, 0x01, 0x61, 0xba, 0x6d, 0x9a, 0x72, - 0x68, 0xfc, 0x7d, 0x16, 0xda, 0x99, 0xed, 0xdf, 0x82, 0xda, 0x44, 0x2c, 0x2f, 0x3c, 0x66, 0x2d, - 0x39, 0xe5, 0x19, 0x09, 0xcd, 0x98, 0x98, 0x1e, 0x22, 0xea, 0x9e, 0x4a, 0x0c, 0x8c, 0xc7, 0x54, - 0xa7, 0x63, 0x7f, 0x64, 0x39, 0x6e, 0x88, 0x87, 0xc4, 0x0f, 0x0f, 0x85, 0x94, 0x0b, 0x63, 0x7f, - 0xb4, 0x25, 0x61, 0xe8, 0x26, 0x80, 0xe3, 0x45, 0x54, 0x9d, 0x7b, 0xee, 0x88, 0xc9, 0xda, 0xd8, - 0x40, 0xf1, 0xda, 0x71, 0x9c, 0x33, 0xeb, 0x8e, 0x17, 0x09, 0x61, 0xdf, 0x85, 0x26, 0x8d, 0x1b, - 0xd6, 0x84, 0x87, 0x28, 0xee, 0x10, 0x8d, 0x8d, 0x65, 0x45, 0xe2, 0x38, 0x7e, 0x99, 0x0b, 0x41, - 0x32, 0x88, 0xd0, 0x1d, 0xa8, 0xb2, 0x73, 0x1b, 0x75, 0xaa, 0x6c, 0xce, 0xa5, 0x9c, 0x5d, 0xf2, - 0x55, 0xae, 0xdf, 0x67, 0x74, 0xdb, 0x1e, 0x09, 0x0f, 0x4d, 0x31, 0x09, 0xdd, 0x87, 0x86, 0xed, - 0x79, 0x3e, 0xb1, 0xf9, 0xb1, 0x98, 0x67, 0x3c, 0xae, 0x15, 0xf3, 0xe8, 0x25, 0xc4, 0x9c, 0x91, - 0x3a, 0x1d, 0xfd, 0x04, 0xe6, 0xd8, 0xb9, 0xe9, 0xd4, 0xd8, 0xae, 0xcf, 0xe9, 0x3e, 0x94, 0x66, - 0x66, 0x72, 0xe2, 0xee, 0xbb, 0xd0, 0x50, 0x44, 0xa3, 0x8e, 0xf1, 0x0c, 0x1f, 0x0a, 0x5f, 0xa1, - 0x9f, 0x68, 0x19, 0xe6, 0x0e, 0xec, 0xf1, 0x54, 0xda, 0x83, 0x0f, 0x6e, 0x97, 0x7f, 0x56, 0xea, - 0xde, 0x85, 0x76, 0x5a, 0xa2, 0x93, 0xcc, 0x37, 0x76, 0x60, 0xd9, 0x9c, 0x7a, 0x89, 0x60, 0xf2, - 0x52, 0xbd, 0x09, 0x55, 0x61, 0x3f, 0xee, 0x3b, 0x67, 0x0a, 0x35, 0x62, 0x0a, 0x42, 0xe3, 0x0e, - 0x9c, 0x4e, 0xb1, 0x12, 0x57, 0xee, 0x45, 0x68, 0x05, 0xbe, 0x63, 0x45, 0x1c, 0x6c, 0xb9, 0x8e, - 0x3c, 0x89, 0x41, 0x4c, 0xbb, 0xe3, 0xd0, 0xe9, 0x03, 0xe2, 0x07, 0x59, 0x51, 0x8e, 0x37, 0xbd, - 0x03, 0x2b, 0xe9, 0xe9, 0x7c, 0x79, 0xe3, 0x03, 0x58, 0x35, 0xf1, 0xc4, 0x3f, 0xc0, 0x2f, 0xcb, - 0xba, 0x0b, 0x9d, 0x2c, 0x83, 0x84, 0x79, 0x02, 0x1d, 0x10, 0x9b, 0x4c, 0xa3, 0x93, 0x31, 0xbf, - 0xaa, 0x32, 0x10, 0x97, 0x09, 0xe7, 0x83, 0x5a, 0x50, 0x76, 0x03, 0x31, 0xa9, 0xec, 0x06, 0xc6, - 0x97, 0x50, 0xef, 0xab, 0xd1, 0x40, 0xbd, 0x8d, 0xea, 0xa6, 0x1c, 0xa2, 0x8d, 0x24, 0x11, 0x28, - 0xbf, 0xe0, 0xa6, 0x88, 0x53, 0x84, 0x7b, 0x99, 0x20, 0x2a, 0x64, 0xd8, 0x00, 0x88, 0x23, 0x90, - 0xbc, 0x79, 0x50, 0x96, 0x9f, 0xa9, 0x50, 0x19, 0x7f, 0xd4, 0xc2, 0x91, 0xb2, 0x19, 0x27, 0xde, - 0x8c, 0xa3, 0x85, 0xa7, 0xf2, 0x49, 0xc2, 0xd3, 0x75, 0x98, 0x8b, 0x88, 0x4d, 0x78, 0x80, 0x6c, - 0x29, 0x9b, 0xd3, 0x97, 0xc4, 0x26, 0x27, 0x43, 0x67, 0x01, 0x86, 0x21, 0xb6, 0x09, 0x76, 0x2c, - 0x9b, 0x47, 0xce, 0x8a, 0x59, 0x17, 0x90, 0x1e, 0x41, 0xb7, 0x13, 0x3d, 0xce, 0x31, 0x31, 0xd6, - 0x73, 0x18, 0x6a, 0x76, 0x49, 0x34, 0x1d, 0x9f, 0xf6, 0xea, 0xd1, 0xa7, 0x5d, 0xcc, 0xe3, 0xc4, - 0x4a, 0xc0, 0x9a, 0x2f, 0x0c, 0x58, 0x7c, 0xc6, 0x71, 0x02, 0x56, 0xad, 0x30, 0x60, 0x09, 0x1e, - 0x47, 0x06, 0xac, 0x1f, 0x33, 0xf4, 0x3c, 0x80, 0x4e, 0xf6, 0xe8, 0x88, 0x90, 0x71, 0x13, 0xaa, - 0x11, 0x83, 0x1c, 0x11, 0x7e, 0xc4, 0x14, 0x41, 0x68, 0xfc, 0xa7, 0xa4, 0x7a, 0xdd, 0xc7, 0xee, - 0x98, 0xe0, 0x30, 0xe3, 0x75, 0xb1, 0xf3, 0x94, 0x8f, 0xe7, 0x3c, 0x03, 0x68, 0x31, 0xb5, 0x5b, - 0x11, 0x1e, 0xb3, 0xdb, 0x8d, 0xe5, 0xd6, 0x8d, 0x8d, 0xb7, 0x72, 0x26, 0xf2, 0x25, 0xb9, 0xcd, - 0x06, 0x82, 0x9c, 0x6b, 0xbc, 0x39, 0x56, 0x61, 0xdd, 0x0f, 0x01, 0x65, 0x89, 0x4e, 0xa4, 0xba, - 0x4f, 0xe9, 0x71, 0xa5, 0xa9, 0x75, 0x4e, 0xd8, 0xde, 0x63, 0x62, 0x1c, 0xa1, 0x37, 0x2e, 0xa7, - 0x29, 0x08, 0x8d, 0xdf, 0x57, 0x00, 0x12, 0xe4, 0x2b, 0x7b, 0x4e, 0x6f, 0xc5, 0xa7, 0x86, 0xa7, - 0x06, 0xe7, 0x73, 0xf8, 0xe5, 0x9e, 0x97, 0x8f, 0xf5, 0xf3, 0xc2, 0x93, 0x84, 0x8b, 0x79, 0xb3, - 0x5f, 0xd9, 0x93, 0xb2, 0x09, 0x2b, 0x69, 0x73, 0x8b, 0x73, 0x72, 0x15, 0xe6, 0x5c, 0x82, 0x27, - 0xbc, 0x50, 0x6c, 0x6c, 0x9c, 0xca, 0xd9, 0x96, 0xc9, 0x29, 0x8c, 0x0b, 0x50, 0xdf, 0x99, 0xd8, - 0x23, 0x3c, 0x08, 0xf0, 0x90, 0xae, 0xe5, 0xd2, 0x81, 0x58, 0x9f, 0x0f, 0x8c, 0x0d, 0xa8, 0xdd, - 0xc3, 0x87, 0x9f, 0xd3, 0x75, 0x8f, 0x2b, 0x9f, 0xf1, 0xcf, 0x12, 0xac, 0xb2, 0x70, 0xb7, 0x29, - 0xcb, 0x34, 0x13, 0x47, 0xfe, 0x34, 0x1c, 0xe2, 0x88, 0x99, 0x34, 0x98, 0x5a, 0x01, 0x0e, 0x5d, - 0x9f, 0xfb, 0x14, 0x35, 0x69, 0x30, 0xdd, 0x65, 0x00, 0x5a, 0xca, 0x51, 0xf4, 0xd7, 0x53, 0x5f, - 0xf8, 0x56, 0xc5, 0xac, 0x0d, 0x83, 0xe9, 0x67, 0x74, 0x2c, 0xe7, 0x46, 0xfb, 0x76, 0x88, 0x23, - 0x59, 0x70, 0x0c, 0x83, 0xe9, 0x80, 0x01, 0xd0, 0x4d, 0x38, 0x3d, 0xc1, 0x13, 0x3f, 0x3c, 0xb4, - 0xc6, 0xee, 0xc4, 0x25, 0x96, 0xeb, 0x59, 0x4f, 0x0e, 0x09, 0x8e, 0x84, 0xe3, 0x20, 0x8e, 0xbc, - 0x4f, 0x71, 0x3b, 0xde, 0x47, 0x14, 0x83, 0x0c, 0x68, 0xfa, 0xfe, 0xc4, 0x8a, 0x86, 0x7e, 0x88, - 0x2d, 0xdb, 0x79, 0xca, 0xe2, 0x7d, 0xc5, 0x6c, 0xf8, 0xfe, 0x64, 0x40, 0x61, 0x3d, 0xe7, 0xa9, - 0x61, 0x43, 0x53, 0x2b, 0x84, 0x68, 0xe2, 0xce, 0x2a, 0x1e, 0x91, 0xb8, 0xd3, 0x6f, 0x0a, 0x0b, - 0xfd, 0xb1, 0xd4, 0x03, 0xfb, 0xa6, 0x30, 0x72, 0x18, 0xc8, 0xac, 0x9d, 0x7d, 0x53, 0x85, 0x8d, - 0xf1, 0x81, 0xa8, 0x33, 0xeb, 0x26, 0x1f, 0x18, 0x0e, 0xc0, 0xa6, 0x1d, 0xd8, 0x4f, 0xdc, 0xb1, - 0x4b, 0x0e, 0xd1, 0x55, 0x68, 0xdb, 0x8e, 0x63, 0x0d, 0x25, 0xc4, 0xc5, 0xb2, 0xe8, 0x5f, 0xb4, - 0x1d, 0x67, 0x53, 0x01, 0xa3, 0x37, 0x61, 0xc9, 0x09, 0xfd, 0x40, 0xa7, 0xe5, 0x5d, 0x80, 0x36, - 0x45, 0xa8, 0xc4, 0xc6, 0x1f, 0x2a, 0x70, 0x56, 0x37, 0x4b, 0xba, 0xb4, 0xbc, 0x05, 0x0b, 0xa9, - 0x55, 0x4b, 0x9a, 0x07, 0x25, 0x42, 0x9a, 0x1a, 0x61, 0xaa, 0x22, 0x2b, 0xa7, 0x2b, 0xb2, 0xfc, - 0x9a, 0xb5, 0xf2, 0x43, 0xd4, 0xac, 0xb3, 0xdf, 0xa7, 0x66, 0x9d, 0x4b, 0xd7, 0xac, 0x97, 0x59, - 0x33, 0x47, 0xe2, 0x59, 0xb9, 0x53, 0xe5, 0x1d, 0x87, 0x98, 0xc6, 0x93, 0x4d, 0x9f, 0x54, 0x6d, - 0x3b, 0x7f, 0x92, 0xda, 0xb6, 0x56, 0x54, 0xdb, 0x1a, 0x7f, 0x2a, 0xc1, 0xb2, 0x6e, 0x24, 0x51, - 0x0e, 0xdd, 0x85, 0x7a, 0x28, 0x4f, 0x91, 0x30, 0xcc, 0xba, 0x9e, 0x5c, 0x64, 0x4f, 0x9b, 0x99, - 0x4c, 0x41, 0x9f, 0x15, 0x56, 0xb5, 0x97, 0x0b, 0xd8, 0xbc, 0xb0, 0xae, 0xed, 0xc1, 0x52, 0x4c, - 0x7c, 0x64, 0x59, 0xab, 0x94, 0xa9, 0x65, 0xbd, 0x4c, 0xf5, 0xa0, 0xba, 0x85, 0x0f, 0xdc, 0x21, - 0xfe, 0x41, 0x7a, 0x3d, 0xeb, 0xd0, 0x08, 0x70, 0x38, 0x71, 0xa3, 0x28, 0x76, 0xb0, 0xba, 0xa9, - 0x82, 0x8c, 0x7f, 0xcf, 0xc1, 0x62, 0x5a, 0xb3, 0xef, 0x64, 0xaa, 0xe2, 0x6e, 0xe2, 0xf1, 0xe9, - 0xfd, 0x29, 0xb7, 0xd9, 0x15, 0x19, 0x30, 0xcb, 0xa9, 0x14, 0x38, 0x8e, 0xa9, 0x22, 0x88, 0xd2, - 0xfd, 0x0f, 0xfd, 0xc9, 0xc4, 0xf6, 0x1c, 0xd9, 0x87, 0x13, 0x43, 0xaa, 0x2d, 0x3b, 0x1c, 0x51, - 0x37, 0xa6, 0x60, 0xf6, 0x8d, 0xce, 0x43, 0x83, 0xa6, 0x92, 0xae, 0xc7, 0x8a, 0x6a, 0xe6, 0xa4, - 0x75, 0x13, 0x04, 0x68, 0xcb, 0x0d, 0xd1, 0x25, 0x98, 0xc5, 0xde, 0x81, 0xbc, 0xb7, 0x92, 0x46, - 0x9d, 0x0c, 0xd4, 0x26, 0x43, 0xa3, 0xcb, 0x50, 0x9d, 0xf8, 0x53, 0x8f, 0xc8, 0xa4, 0xb2, 0x15, - 0x13, 0xb2, 0xee, 0x9a, 0x29, 0xb0, 0xe8, 0x2a, 0xcc, 0x3b, 0xcc, 0x06, 0x32, 0x73, 0x5c, 0x4c, - 0x0a, 0x73, 0x06, 0x37, 0x25, 0x1e, 0xbd, 0x1f, 0xdf, 0xb8, 0xf5, 0xd4, 0x9d, 0x99, 0x52, 0x6a, - 0xee, 0xb5, 0x7b, 0x4f, 0xbf, 0x76, 0x81, 0xb1, 0xb8, 0x5a, 0xc8, 0xe2, 0xe8, 0xb2, 0xfa, 0x0c, - 0xd4, 0xc6, 0xfe, 0x88, 0xfb, 0x41, 0x83, 0x57, 0x3b, 0x63, 0x7f, 0xc4, 0xdc, 0x60, 0x99, 0xa6, - 0x19, 0x8e, 0xeb, 0x75, 0x16, 0xd8, 0x99, 0xe4, 0x03, 0x7a, 0x7b, 0xb0, 0x0f, 0xcb, 0xf7, 0x86, - 0xb8, 0xd3, 0x64, 0xa8, 0x3a, 0x83, 0x3c, 0xf4, 0x86, 0xec, 0x72, 0x23, 0xe4, 0xb0, 0xd3, 0x62, - 0x70, 0xfa, 0x89, 0xfe, 0x5f, 0xa6, 0xf2, 0x8b, 0xcc, 0xbe, 0x67, 0x0b, 0x8e, 0xc9, 0x2b, 0x53, - 0xb7, 0xff, 0xb5, 0x04, 0x2b, 0x9b, 0x2c, 0x39, 0x52, 0x22, 0xc1, 0x09, 0xea, 0x4e, 0x74, 0x23, - 0x2e, 0xf0, 0xd3, 0x45, 0x62, 0x7a, 0xb3, 0x82, 0x0e, 0x7d, 0x08, 0x2d, 0xc9, 0x53, 0xcc, 0xac, - 0xbc, 0xa8, 0x35, 0xd0, 0x8c, 0xd4, 0xa1, 0xf1, 0x3e, 0xac, 0x66, 0x64, 0x16, 0x89, 0xcc, 0x05, - 0x58, 0x48, 0x22, 0x42, 0x2c, 0x72, 0x23, 0x86, 0xed, 0x38, 0xc6, 0x6d, 0x38, 0x3d, 0x20, 0x76, - 0x48, 0x32, 0x1b, 0x3e, 0xc6, 0x5c, 0xd6, 0x1d, 0xd0, 0xe7, 0x8a, 0x02, 0x7e, 0x00, 0xcb, 0x03, - 0xe2, 0x07, 0x2f, 0xc1, 0x94, 0x9e, 0x74, 0xba, 0x6d, 0x7f, 0x4a, 0x44, 0xf6, 0x22, 0x87, 0xc6, - 0x2a, 0xef, 0x65, 0x64, 0x57, 0x7b, 0x0f, 0x56, 0x78, 0x2b, 0xe1, 0x65, 0x36, 0x71, 0x46, 0x36, - 0x32, 0xb2, 0x7c, 0x7f, 0x53, 0x56, 0x42, 0x5d, 0x41, 0xed, 0xf3, 0xb6, 0x5e, 0xfb, 0xac, 0x66, - 0x0d, 0xae, 0xe5, 0xe3, 0x59, 0x37, 0xaa, 0xe4, 0xb8, 0x91, 0x99, 0x29, 0x90, 0x66, 0xd9, 0x49, - 0x7f, 0x33, 0xcb, 0xfd, 0x7f, 0x58, 0x1f, 0xed, 0xf0, 0xfa, 0x28, 0x5e, 0x3a, 0xee, 0xc9, 0xdc, - 0x48, 0xd5, 0x47, 0x9d, 0x22, 0x31, 0xe3, 0xf2, 0xe8, 0xd7, 0xb3, 0x50, 0x8f, 0x71, 0x19, 0x9d, - 0x66, 0x95, 0x54, 0xce, 0x51, 0x92, 0x7a, 0xe9, 0x54, 0x5e, 0xe6, 0xd2, 0x99, 0x7d, 0xd1, 0xa5, - 0xb3, 0x06, 0x75, 0xf6, 0x61, 0x85, 0x78, 0x4f, 0x5c, 0x22, 0x35, 0x06, 0x30, 0xf1, 0x5e, 0x62, - 0xf8, 0xea, 0xb1, 0x0c, 0xaf, 0x17, 0x62, 0xf3, 0xe9, 0x42, 0xec, 0x9d, 0xf8, 0x5a, 0xe0, 0x17, - 0xc8, 0xb9, 0x2c, 0xbb, 0xdc, 0x0b, 0x61, 0x5b, 0xbf, 0x10, 0xf8, 0x9d, 0xf2, 0x7a, 0xce, 0xe4, - 0x57, 0xb6, 0x0c, 0xbb, 0xcf, 0xcb, 0x30, 0xd5, 0xab, 0x44, 0xf4, 0xda, 0x00, 0x88, 0x0f, 0xaa, - 0xac, 0xc5, 0x50, 0x76, 0x6b, 0xa6, 0x42, 0x45, 0x43, 0x81, 0xa6, 0xff, 0xa4, 0x71, 0x78, 0x8c, - 0x50, 0xf0, 0x17, 0x35, 0xb5, 0x29, 0xe8, 0xb0, 0xbd, 0x93, 0xa9, 0xdc, 0x8f, 0xe7, 0x75, 0x6f, - 0xeb, 0x85, 0xfb, 0xc9, 0xdc, 0x25, 0x53, 0xb7, 0xb3, 0x9b, 0xd8, 0x0e, 0x05, 0x5a, 0x24, 0xe1, - 0x02, 0xd2, 0x23, 0x34, 0xff, 0xd9, 0x73, 0x3d, 0x37, 0xda, 0xe7, 0xf8, 0x2a, 0xc3, 0x83, 0x04, - 0xf5, 0xd8, 0x6f, 0x45, 0xfc, 0xdc, 0x25, 0xd6, 0xd0, 0x77, 0x30, 0x73, 0xc6, 0x39, 0xb3, 0x46, - 0x01, 0x9b, 0xbe, 0x83, 0x93, 0x03, 0x52, 0x3b, 0xd1, 0x01, 0xa9, 0xa7, 0x0e, 0xc8, 0x0a, 0x54, - 0x43, 0x6c, 0x47, 0xbe, 0xd7, 0x01, 0xfe, 0x73, 0x92, 0x8f, 0x68, 0x80, 0x9f, 0xe0, 0x28, 0xa2, - 0x0b, 0x88, 0xac, 0x43, 0x0c, 0x95, 0xdc, 0x68, 0xa1, 0x28, 0x37, 0x3a, 0xa2, 0x85, 0x97, 0xca, - 0x8d, 0x9a, 0x45, 0xb9, 0xd1, 0x71, 0x3a, 0x78, 0x4a, 0xe6, 0xd7, 0x3a, 0x2a, 0xf3, 0xfb, 0x31, - 0x0f, 0xce, 0x3d, 0x58, 0xcd, 0xb8, 0xba, 0x38, 0x39, 0x37, 0x52, 0x8d, 0xbe, 0x4e, 0x91, 0x16, - 0xe2, 0x3e, 0xdf, 0x2f, 0x61, 0x71, 0xfb, 0x39, 0x1e, 0x0e, 0x0e, 0xbd, 0xe1, 0x09, 0xee, 0xea, - 0x36, 0x54, 0x86, 0x13, 0x47, 0x94, 0xcb, 0xf4, 0x53, 0xbd, 0xbd, 0x2b, 0xfa, 0xed, 0x6d, 0x41, - 0x3b, 0x59, 0x41, 0xc8, 0xb9, 0x42, 0xe5, 0x74, 0x28, 0x31, 0x65, 0xbe, 0x60, 0x8a, 0x91, 0x80, - 0xe3, 0x30, 0x64, 0xbb, 0xe6, 0x70, 0x1c, 0x86, 0xba, 0xdb, 0x56, 0x74, 0xb7, 0x35, 0x9e, 0x42, - 0x83, 0x2e, 0xf0, 0xbd, 0xc4, 0x17, 0x29, 0x6c, 0x25, 0x49, 0x61, 0xe3, 0x4c, 0x78, 0x56, 0xc9, - 0x84, 0x8d, 0x75, 0x58, 0xe0, 0x6b, 0x89, 0x8d, 0xb4, 0xa1, 0x32, 0x0d, 0xc7, 0xd2, 0x6e, 0xd3, - 0x70, 0x6c, 0xfc, 0x02, 0x9a, 0x3d, 0x42, 0xec, 0xe1, 0xfe, 0x09, 0xe4, 0x89, 0xd7, 0x2a, 0xab, - 0x59, 0x77, 0x46, 0x26, 0xc3, 0x80, 0x96, 0xe4, 0x5d, 0xb8, 0x7e, 0x1f, 0xd0, 0xae, 0x1f, 0x92, - 0x8f, 0xfd, 0xf0, 0x1b, 0x3b, 0x74, 0x4e, 0x96, 0xc5, 0x22, 0x98, 0x15, 0x2f, 0x12, 0x2a, 0x57, - 0xe6, 0x4c, 0xf6, 0x6d, 0xbc, 0x01, 0xa7, 0x34, 0x7e, 0x85, 0x0b, 0xdf, 0x82, 0x06, 0x8b, 0x13, - 0x22, 0x5f, 0xba, 0xa2, 0xf6, 0xc4, 0x8e, 0x0a, 0x26, 0xb4, 0x16, 0xa6, 0x17, 0x01, 0x83, 0xc7, - 0x51, 0xfb, 0xad, 0x54, 0x6a, 0xb1, 0xac, 0xcf, 0x4f, 0xa5, 0x15, 0xdf, 0x96, 0x60, 0x8e, 0xc1, - 0x33, 0x61, 0x7b, 0x8d, 0xd6, 0xfe, 0x81, 0x6f, 0x11, 0x7b, 0x14, 0x3f, 0xf2, 0xa0, 0x80, 0x47, - 0xf6, 0x28, 0x62, 0x6f, 0x54, 0x28, 0xd2, 0x71, 0x47, 0x38, 0x22, 0xf2, 0xa5, 0x47, 0x83, 0xc2, - 0xb6, 0x38, 0x88, 0xaa, 0x24, 0x72, 0x7f, 0xc5, 0x73, 0x86, 0x59, 0x93, 0x7d, 0xcb, 0x5f, 0xcd, - 0x3c, 0xfa, 0xb2, 0x5f, 0xcd, 0x5d, 0xa8, 0xa5, 0xba, 0x1e, 0xf1, 0xd8, 0x78, 0x1f, 0x90, 0xba, - 0x3d, 0xa1, 0xbf, 0xcb, 0x50, 0x65, 0xbb, 0x97, 0xf7, 0x5b, 0x4b, 0xdf, 0x9f, 0x29, 0xb0, 0xc6, - 0x5d, 0x40, 0x5c, 0x61, 0xda, 0x9d, 0x76, 0x7c, 0xe5, 0xbe, 0x07, 0xa7, 0xb4, 0xf9, 0xf1, 0x4f, - 0x44, 0x8d, 0x41, 0x7a, 0x75, 0x31, 0xf9, 0x5f, 0x25, 0x80, 0xde, 0x94, 0xec, 0x8b, 0x6a, 0x5f, - 0xdd, 0x65, 0x49, 0xdf, 0x25, 0xc5, 0x05, 0x76, 0x14, 0x7d, 0xe3, 0x87, 0x32, 0x69, 0x8b, 0xc7, - 0xac, 0x52, 0x9f, 0x92, 0x7d, 0xd9, 0xcd, 0xa3, 0xdf, 0xe8, 0x12, 0xb4, 0xf8, 0x33, 0x1c, 0xcb, - 0x76, 0x9c, 0x10, 0x47, 0x91, 0x68, 0xeb, 0x35, 0x39, 0xb4, 0xc7, 0x81, 0x94, 0xcc, 0x75, 0xb0, - 0x47, 0x5c, 0x72, 0x68, 0x11, 0xff, 0x19, 0xf6, 0x44, 0x3a, 0xd6, 0x94, 0xd0, 0x47, 0x14, 0x48, - 0xc9, 0x42, 0x3c, 0x72, 0x23, 0x12, 0x4a, 0x32, 0xd9, 0x7b, 0x12, 0x50, 0x46, 0x66, 0x7c, 0x57, - 0x82, 0xf6, 0xee, 0x74, 0x3c, 0xe6, 0x9b, 0x3c, 0xa9, 0x2e, 0xd1, 0x1b, 0x62, 0x1f, 0xe5, 0x54, - 0x6f, 0x2f, 0x51, 0x91, 0xd8, 0xdc, 0xf7, 0xaf, 0xed, 0x6e, 0xc0, 0x92, 0x22, 0xa8, 0x30, 0x9a, - 0x76, 0xeb, 0x96, 0xf4, 0x5b, 0x97, 0x3a, 0x0a, 0x2f, 0x67, 0x5e, 0x6e, 0x73, 0xc6, 0x69, 0x38, - 0xa5, 0xcd, 0x17, 0xa5, 0xd0, 0x35, 0x68, 0x8a, 0xdf, 0x75, 0xc2, 0x09, 0xce, 0x40, 0x8d, 0x46, - 0x92, 0xa1, 0xeb, 0xc8, 0x36, 0xee, 0x7c, 0xe0, 0x3b, 0x9b, 0xae, 0x13, 0x1a, 0x7d, 0x68, 0x9a, - 0x9c, 0xbd, 0xa0, 0xbd, 0x03, 0x2d, 0xf1, 0x73, 0xcf, 0xd2, 0x7e, 0x7f, 0x27, 0x3d, 0x47, 0x8d, - 0xb7, 0xd9, 0xf4, 0xd4, 0xa1, 0xf1, 0x15, 0x74, 0x1f, 0x07, 0x0e, 0x4d, 0x8e, 0x54, 0xae, 0x72, - 0x6b, 0x77, 0x40, 0x3e, 0x13, 0x2b, 0x62, 0xae, 0x4f, 0x6b, 0x86, 0xea, 0xd0, 0x38, 0x0b, 0x6b, - 0xb9, 0xcc, 0xc5, 0xbe, 0x03, 0x68, 0x27, 0x08, 0xc7, 0x95, 0xdd, 0x6b, 0xd6, 0x95, 0x2e, 0x29, - 0x5d, 0xe9, 0x95, 0xf8, 0xc6, 0xe5, 0xb1, 0x5b, 0x8c, 0x94, 0x24, 0xa8, 0x52, 0x94, 0x04, 0xcd, - 0x6a, 0x49, 0x90, 0xf1, 0x69, 0xac, 0x3d, 0x91, 0x81, 0xbe, 0xcb, 0xd2, 0x60, 0xbe, 0xb6, 0x0c, - 0x13, 0x67, 0x72, 0x36, 0xc7, 0x29, 0x4c, 0x85, 0xd8, 0x58, 0x84, 0xa6, 0x16, 0x30, 0x8c, 0x0f, - 0xa1, 0x95, 0x8a, 0x00, 0xd7, 0x53, 0xa9, 0x42, 0x46, 0x6d, 0x7a, 0xa2, 0x70, 0xed, 0x35, 0xa8, - 0xc9, 0xd7, 0x6c, 0x68, 0x1e, 0x2a, 0x8f, 0x36, 0x77, 0xdb, 0x33, 0xf4, 0xe3, 0xf1, 0xd6, 0x6e, - 0xbb, 0x74, 0xed, 0x36, 0x2c, 0xa6, 0x7e, 0x44, 0xa1, 0x25, 0x68, 0x0e, 0x7a, 0xfd, 0xad, 0x8f, - 0x1e, 0x7e, 0x61, 0x99, 0xdb, 0xbd, 0xad, 0x2f, 0xdb, 0x33, 0x68, 0x19, 0xda, 0x12, 0xd4, 0x7f, - 0xf8, 0x88, 0x43, 0x4b, 0xd7, 0x9e, 0x41, 0x4b, 0xcf, 0x85, 0xd1, 0x69, 0x58, 0xda, 0x7c, 0xd8, - 0x7f, 0xd4, 0xdb, 0xe9, 0x6f, 0x9b, 0xd6, 0xa6, 0xb9, 0xdd, 0x7b, 0xb4, 0xbd, 0xd5, 0x9e, 0xd1, - 0xc1, 0xe6, 0xe3, 0x7e, 0x7f, 0xa7, 0xff, 0x49, 0xbb, 0x44, 0xb9, 0x26, 0xe0, 0xed, 0x2f, 0x76, - 0x28, 0x71, 0x59, 0x27, 0x7e, 0xdc, 0xbf, 0xd7, 0x7f, 0xf8, 0xf3, 0x7e, 0xbb, 0xb2, 0xf1, 0xe7, - 0x06, 0xb4, 0xe4, 0x06, 0x71, 0xc8, 0xda, 0xa7, 0x77, 0x61, 0x5e, 0x3e, 0x34, 0x4c, 0xb2, 0x73, - 0xfd, 0x55, 0x64, 0xb7, 0x93, 0x45, 0x08, 0x47, 0x99, 0x41, 0xbb, 0xcc, 0x70, 0xca, 0x4f, 0xbf, - 0xb3, 0xaa, 0x2a, 0x33, 0x7f, 0x15, 0xbb, 0xe7, 0x8a, 0xd0, 0x31, 0xc7, 0x01, 0xb5, 0x96, 0xfa, - 0xfa, 0x02, 0x25, 0x73, 0x72, 0x5f, 0x75, 0x74, 0xcf, 0x17, 0xe2, 0x63, 0xa6, 0x5f, 0x42, 0x3b, - 0xfd, 0xee, 0x02, 0x25, 0x6d, 0xf0, 0x82, 0x37, 0x1d, 0xdd, 0x0b, 0x47, 0x50, 0xa8, 0xac, 0x33, - 0x2f, 0x14, 0xd6, 0x8b, 0xff, 0x31, 0x67, 0x58, 0x17, 0xfd, 0xb8, 0xe6, 0xaa, 0xd0, 0x7f, 0xd6, - 0x21, 0xf5, 0x5d, 0x40, 0xce, 0x4f, 0x5b, 0x45, 0x15, 0xf9, 0x7f, 0xf9, 0x8c, 0x19, 0xf4, 0x39, - 0x2c, 0xa6, 0x3a, 0x67, 0x28, 0x99, 0x95, 0xdf, 0x07, 0xec, 0xae, 0x17, 0x13, 0xe8, 0x76, 0x53, - 0xfb, 0x62, 0x9a, 0xdd, 0x72, 0x9a, 0x6d, 0x9a, 0xdd, 0x72, 0x1b, 0x6a, 0xcc, 0xbd, 0xb4, 0xee, - 0x97, 0xe2, 0x5e, 0x79, 0xad, 0xb6, 0xee, 0xb9, 0x22, 0xb4, 0xba, 0xfd, 0x54, 0xe7, 0x4b, 0xd9, - 0x7e, 0x7e, 0x43, 0xad, 0xbb, 0x5e, 0x4c, 0x90, 0xb6, 0x55, 0x52, 0xd1, 0xa7, 0x6c, 0x95, 0x69, - 0x20, 0xa5, 0x6c, 0x95, 0x6d, 0x05, 0x08, 0x5b, 0xa5, 0x4a, 0xf3, 0xf3, 0x85, 0x55, 0x4d, 0xd6, - 0x56, 0xf9, 0x85, 0x92, 0x31, 0x83, 0x7a, 0x50, 0x93, 0x65, 0x09, 0x4a, 0x4e, 0x77, 0xaa, 0x16, - 0xea, 0x9e, 0xc9, 0xc1, 0xc4, 0x2c, 0x7e, 0x0a, 0xb3, 0x14, 0x8a, 0x96, 0x35, 0x22, 0x39, 0xf5, - 0x74, 0x0a, 0x1a, 0x4f, 0x7b, 0x0f, 0xaa, 0x3c, 0x8b, 0x47, 0x49, 0xcc, 0xd5, 0x4a, 0x86, 0xee, - 0x6a, 0x06, 0x1e, 0x4f, 0xfe, 0x94, 0x3f, 0x3e, 0x16, 0xe9, 0x38, 0x5a, 0xd3, 0x9e, 0xf4, 0xe9, - 0x49, 0x7f, 0xf7, 0xb5, 0x7c, 0x64, 0xcc, 0xeb, 0x09, 0x9c, 0xca, 0xb9, 0x02, 0x51, 0xd2, 0x45, - 0x2a, 0xbe, 0x7d, 0xbb, 0x17, 0x8f, 0x26, 0x52, 0x37, 0x2b, 0xac, 0xb6, 0xa2, 0xba, 0xba, 0x62, - 0xac, 0xd5, 0x0c, 0x5c, 0x4e, 0xde, 0xf8, 0x5b, 0x19, 0x16, 0x78, 0xa2, 0x22, 0x42, 0xf5, 0x27, - 0x00, 0x49, 0x2e, 0x8d, 0xba, 0x9a, 0xf7, 0x68, 0xf5, 0x43, 0x77, 0x2d, 0x17, 0xa7, 0xaa, 0x51, - 0x49, 0x8b, 0x15, 0x35, 0x66, 0x93, 0x6d, 0x45, 0x8d, 0x39, 0x99, 0xb4, 0x31, 0x83, 0xb6, 0xa0, - 0x1e, 0xe7, 0x6a, 0x48, 0x49, 0xf1, 0x52, 0x89, 0x66, 0xb7, 0x9b, 0x87, 0x52, 0x25, 0x52, 0xf2, - 0x2f, 0x45, 0xa2, 0x6c, 0x56, 0xa7, 0x48, 0x94, 0x97, 0xb2, 0xcd, 0xfc, 0x37, 0x00, 0x00, 0xff, - 0xff, 0xf6, 0x41, 0x28, 0x8c, 0xea, 0x2f, 0x00, 0x00, +func (m *VersionRequest) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *VersionRequest) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Version) > 0 { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(len(m.Version))) + i += copy(data[i:], m.Version) + } + return i, nil +} + +func (m *VersionResponse) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *VersionResponse) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Version) > 0 { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(len(m.Version))) + i += copy(data[i:], m.Version) + } + if len(m.RuntimeName) > 0 { + data[i] = 0x12 + i++ + i = encodeVarintApi(data, i, uint64(len(m.RuntimeName))) + i += copy(data[i:], m.RuntimeName) + } + if len(m.RuntimeVersion) > 0 { + data[i] = 0x1a + i++ + i = encodeVarintApi(data, i, uint64(len(m.RuntimeVersion))) + i += copy(data[i:], m.RuntimeVersion) + } + if len(m.RuntimeApiVersion) > 0 { + data[i] = 0x22 + i++ + i = encodeVarintApi(data, i, uint64(len(m.RuntimeApiVersion))) + i += copy(data[i:], m.RuntimeApiVersion) + } + return i, nil +} + +func (m *DNSConfig) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *DNSConfig) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Servers) > 0 { + for _, s := range m.Servers { + data[i] = 0xa + i++ + l = len(s) + for l >= 1<<7 { + data[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + data[i] = uint8(l) + i++ + i += copy(data[i:], s) + } + } + if len(m.Searches) > 0 { + for _, s := range m.Searches { + data[i] = 0x12 + i++ + l = len(s) + for l >= 1<<7 { + data[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + data[i] = uint8(l) + i++ + i += copy(data[i:], s) + } + } + if len(m.Options) > 0 { + for _, s := range m.Options { + data[i] = 0x1a + i++ + l = len(s) + for l >= 1<<7 { + data[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + data[i] = uint8(l) + i++ + i += copy(data[i:], s) + } + } + return i, nil +} + +func (m *PortMapping) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *PortMapping) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Protocol != 0 { + data[i] = 0x8 + i++ + i = encodeVarintApi(data, i, uint64(m.Protocol)) + } + if m.ContainerPort != 0 { + data[i] = 0x10 + i++ + i = encodeVarintApi(data, i, uint64(m.ContainerPort)) + } + if m.HostPort != 0 { + data[i] = 0x18 + i++ + i = encodeVarintApi(data, i, uint64(m.HostPort)) + } + if len(m.HostIp) > 0 { + data[i] = 0x22 + i++ + i = encodeVarintApi(data, i, uint64(len(m.HostIp))) + i += copy(data[i:], m.HostIp) + } + return i, nil +} + +func (m *Mount) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Mount) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.ContainerPath) > 0 { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(len(m.ContainerPath))) + i += copy(data[i:], m.ContainerPath) + } + if len(m.HostPath) > 0 { + data[i] = 0x12 + i++ + i = encodeVarintApi(data, i, uint64(len(m.HostPath))) + i += copy(data[i:], m.HostPath) + } + if m.Readonly { + data[i] = 0x18 + i++ + if m.Readonly { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if m.SelinuxRelabel { + data[i] = 0x20 + i++ + if m.SelinuxRelabel { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + return i, nil +} + +func (m *NamespaceOption) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NamespaceOption) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.HostNetwork { + data[i] = 0x8 + i++ + if m.HostNetwork { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if m.HostPid { + data[i] = 0x10 + i++ + if m.HostPid { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if m.HostIpc { + data[i] = 0x18 + i++ + if m.HostIpc { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + return i, nil +} + +func (m *Int64Value) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Int64Value) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Value != 0 { + data[i] = 0x8 + i++ + i = encodeVarintApi(data, i, uint64(m.Value)) + } + return i, nil +} + +func (m *LinuxSandboxSecurityContext) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *LinuxSandboxSecurityContext) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.NamespaceOptions != nil { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(m.NamespaceOptions.Size())) + n1, err := m.NamespaceOptions.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n1 + } + if m.SelinuxOptions != nil { + data[i] = 0x12 + i++ + i = encodeVarintApi(data, i, uint64(m.SelinuxOptions.Size())) + n2, err := m.SelinuxOptions.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n2 + } + if m.RunAsUser != nil { + data[i] = 0x1a + i++ + i = encodeVarintApi(data, i, uint64(m.RunAsUser.Size())) + n3, err := m.RunAsUser.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n3 + } + if m.ReadonlyRootfs { + data[i] = 0x20 + i++ + if m.ReadonlyRootfs { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if len(m.SupplementalGroups) > 0 { + for _, num := range m.SupplementalGroups { + data[i] = 0x28 + i++ + i = encodeVarintApi(data, i, uint64(num)) + } + } + if m.Privileged { + data[i] = 0x30 + i++ + if m.Privileged { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + return i, nil +} + +func (m *LinuxPodSandboxConfig) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *LinuxPodSandboxConfig) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.CgroupParent) > 0 { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(len(m.CgroupParent))) + i += copy(data[i:], m.CgroupParent) + } + if m.SecurityContext != nil { + data[i] = 0x12 + i++ + i = encodeVarintApi(data, i, uint64(m.SecurityContext.Size())) + n4, err := m.SecurityContext.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n4 + } + return i, nil +} + +func (m *PodSandboxMetadata) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *PodSandboxMetadata) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Name) > 0 { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(len(m.Name))) + i += copy(data[i:], m.Name) + } + if len(m.Uid) > 0 { + data[i] = 0x12 + i++ + i = encodeVarintApi(data, i, uint64(len(m.Uid))) + i += copy(data[i:], m.Uid) + } + if len(m.Namespace) > 0 { + data[i] = 0x1a + i++ + i = encodeVarintApi(data, i, uint64(len(m.Namespace))) + i += copy(data[i:], m.Namespace) + } + if m.Attempt != 0 { + data[i] = 0x20 + i++ + i = encodeVarintApi(data, i, uint64(m.Attempt)) + } + return i, nil +} + +func (m *PodSandboxConfig) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *PodSandboxConfig) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Metadata != nil { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(m.Metadata.Size())) + n5, err := m.Metadata.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n5 + } + if len(m.Hostname) > 0 { + data[i] = 0x12 + i++ + i = encodeVarintApi(data, i, uint64(len(m.Hostname))) + i += copy(data[i:], m.Hostname) + } + if len(m.LogDirectory) > 0 { + data[i] = 0x1a + i++ + i = encodeVarintApi(data, i, uint64(len(m.LogDirectory))) + i += copy(data[i:], m.LogDirectory) + } + if m.DnsConfig != nil { + data[i] = 0x22 + i++ + i = encodeVarintApi(data, i, uint64(m.DnsConfig.Size())) + n6, err := m.DnsConfig.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n6 + } + if len(m.PortMappings) > 0 { + for _, msg := range m.PortMappings { + data[i] = 0x2a + i++ + i = encodeVarintApi(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Labels) > 0 { + for k := range m.Labels { + data[i] = 0x32 + i++ + v := m.Labels[k] + mapSize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + i = encodeVarintApi(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintApi(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + if len(m.Annotations) > 0 { + for k := range m.Annotations { + data[i] = 0x3a + i++ + v := m.Annotations[k] + mapSize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + i = encodeVarintApi(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintApi(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + if m.Linux != nil { + data[i] = 0x42 + i++ + i = encodeVarintApi(data, i, uint64(m.Linux.Size())) + n7, err := m.Linux.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n7 + } + return i, nil +} + +func (m *RunPodSandboxRequest) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *RunPodSandboxRequest) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Config != nil { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(m.Config.Size())) + n8, err := m.Config.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n8 + } + return i, nil +} + +func (m *RunPodSandboxResponse) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *RunPodSandboxResponse) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.PodSandboxId) > 0 { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(len(m.PodSandboxId))) + i += copy(data[i:], m.PodSandboxId) + } + return i, nil +} + +func (m *StopPodSandboxRequest) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *StopPodSandboxRequest) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.PodSandboxId) > 0 { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(len(m.PodSandboxId))) + i += copy(data[i:], m.PodSandboxId) + } + return i, nil +} + +func (m *StopPodSandboxResponse) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *StopPodSandboxResponse) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + return i, nil +} + +func (m *RemovePodSandboxRequest) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *RemovePodSandboxRequest) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.PodSandboxId) > 0 { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(len(m.PodSandboxId))) + i += copy(data[i:], m.PodSandboxId) + } + return i, nil +} + +func (m *RemovePodSandboxResponse) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *RemovePodSandboxResponse) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + return i, nil +} + +func (m *PodSandboxStatusRequest) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *PodSandboxStatusRequest) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.PodSandboxId) > 0 { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(len(m.PodSandboxId))) + i += copy(data[i:], m.PodSandboxId) + } + return i, nil +} + +func (m *PodSandboxNetworkStatus) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *PodSandboxNetworkStatus) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Ip) > 0 { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(len(m.Ip))) + i += copy(data[i:], m.Ip) + } + return i, nil +} + +func (m *Namespace) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Namespace) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Network) > 0 { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(len(m.Network))) + i += copy(data[i:], m.Network) + } + if m.Options != nil { + data[i] = 0x12 + i++ + i = encodeVarintApi(data, i, uint64(m.Options.Size())) + n9, err := m.Options.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n9 + } + return i, nil +} + +func (m *LinuxPodSandboxStatus) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *LinuxPodSandboxStatus) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Namespaces != nil { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(m.Namespaces.Size())) + n10, err := m.Namespaces.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n10 + } + return i, nil +} + +func (m *PodSandboxStatus) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *PodSandboxStatus) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Id) > 0 { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(len(m.Id))) + i += copy(data[i:], m.Id) + } + if m.Metadata != nil { + data[i] = 0x12 + i++ + i = encodeVarintApi(data, i, uint64(m.Metadata.Size())) + n11, err := m.Metadata.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n11 + } + if m.State != 0 { + data[i] = 0x18 + i++ + i = encodeVarintApi(data, i, uint64(m.State)) + } + if m.CreatedAt != 0 { + data[i] = 0x20 + i++ + i = encodeVarintApi(data, i, uint64(m.CreatedAt)) + } + if m.Network != nil { + data[i] = 0x2a + i++ + i = encodeVarintApi(data, i, uint64(m.Network.Size())) + n12, err := m.Network.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n12 + } + if m.Linux != nil { + data[i] = 0x32 + i++ + i = encodeVarintApi(data, i, uint64(m.Linux.Size())) + n13, err := m.Linux.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n13 + } + if len(m.Labels) > 0 { + for k := range m.Labels { + data[i] = 0x3a + i++ + v := m.Labels[k] + mapSize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + i = encodeVarintApi(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintApi(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + if len(m.Annotations) > 0 { + for k := range m.Annotations { + data[i] = 0x42 + i++ + v := m.Annotations[k] + mapSize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + i = encodeVarintApi(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintApi(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + return i, nil +} + +func (m *PodSandboxStatusResponse) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *PodSandboxStatusResponse) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Status != nil { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(m.Status.Size())) + n14, err := m.Status.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n14 + } + return i, nil +} + +func (m *PodSandboxStateValue) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *PodSandboxStateValue) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.State != 0 { + data[i] = 0x8 + i++ + i = encodeVarintApi(data, i, uint64(m.State)) + } + return i, nil +} + +func (m *PodSandboxFilter) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *PodSandboxFilter) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Id) > 0 { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(len(m.Id))) + i += copy(data[i:], m.Id) + } + if m.State != nil { + data[i] = 0x12 + i++ + i = encodeVarintApi(data, i, uint64(m.State.Size())) + n15, err := m.State.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n15 + } + if len(m.LabelSelector) > 0 { + for k := range m.LabelSelector { + data[i] = 0x1a + i++ + v := m.LabelSelector[k] + mapSize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + i = encodeVarintApi(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintApi(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + return i, nil +} + +func (m *ListPodSandboxRequest) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ListPodSandboxRequest) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Filter != nil { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(m.Filter.Size())) + n16, err := m.Filter.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n16 + } + return i, nil +} + +func (m *PodSandbox) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *PodSandbox) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Id) > 0 { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(len(m.Id))) + i += copy(data[i:], m.Id) + } + if m.Metadata != nil { + data[i] = 0x12 + i++ + i = encodeVarintApi(data, i, uint64(m.Metadata.Size())) + n17, err := m.Metadata.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n17 + } + if m.State != 0 { + data[i] = 0x18 + i++ + i = encodeVarintApi(data, i, uint64(m.State)) + } + if m.CreatedAt != 0 { + data[i] = 0x20 + i++ + i = encodeVarintApi(data, i, uint64(m.CreatedAt)) + } + if len(m.Labels) > 0 { + for k := range m.Labels { + data[i] = 0x2a + i++ + v := m.Labels[k] + mapSize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + i = encodeVarintApi(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintApi(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + if len(m.Annotations) > 0 { + for k := range m.Annotations { + data[i] = 0x32 + i++ + v := m.Annotations[k] + mapSize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + i = encodeVarintApi(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintApi(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + return i, nil +} + +func (m *ListPodSandboxResponse) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ListPodSandboxResponse) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Items) > 0 { + for _, msg := range m.Items { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *ImageSpec) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ImageSpec) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Image) > 0 { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(len(m.Image))) + i += copy(data[i:], m.Image) + } + return i, nil +} + +func (m *KeyValue) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *KeyValue) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Key) > 0 { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(len(m.Key))) + i += copy(data[i:], m.Key) + } + if len(m.Value) > 0 { + data[i] = 0x12 + i++ + i = encodeVarintApi(data, i, uint64(len(m.Value))) + i += copy(data[i:], m.Value) + } + return i, nil +} + +func (m *LinuxContainerResources) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *LinuxContainerResources) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.CpuPeriod != 0 { + data[i] = 0x8 + i++ + i = encodeVarintApi(data, i, uint64(m.CpuPeriod)) + } + if m.CpuQuota != 0 { + data[i] = 0x10 + i++ + i = encodeVarintApi(data, i, uint64(m.CpuQuota)) + } + if m.CpuShares != 0 { + data[i] = 0x18 + i++ + i = encodeVarintApi(data, i, uint64(m.CpuShares)) + } + if m.MemoryLimitInBytes != 0 { + data[i] = 0x20 + i++ + i = encodeVarintApi(data, i, uint64(m.MemoryLimitInBytes)) + } + if m.OomScoreAdj != 0 { + data[i] = 0x28 + i++ + i = encodeVarintApi(data, i, uint64(m.OomScoreAdj)) + } + return i, nil +} + +func (m *SELinuxOption) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *SELinuxOption) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.User) > 0 { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(len(m.User))) + i += copy(data[i:], m.User) + } + if len(m.Role) > 0 { + data[i] = 0x12 + i++ + i = encodeVarintApi(data, i, uint64(len(m.Role))) + i += copy(data[i:], m.Role) + } + if len(m.Type) > 0 { + data[i] = 0x1a + i++ + i = encodeVarintApi(data, i, uint64(len(m.Type))) + i += copy(data[i:], m.Type) + } + if len(m.Level) > 0 { + data[i] = 0x22 + i++ + i = encodeVarintApi(data, i, uint64(len(m.Level))) + i += copy(data[i:], m.Level) + } + return i, nil +} + +func (m *Capability) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Capability) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.AddCapabilities) > 0 { + for _, s := range m.AddCapabilities { + data[i] = 0xa + i++ + l = len(s) + for l >= 1<<7 { + data[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + data[i] = uint8(l) + i++ + i += copy(data[i:], s) + } + } + if len(m.DropCapabilities) > 0 { + for _, s := range m.DropCapabilities { + data[i] = 0x12 + i++ + l = len(s) + for l >= 1<<7 { + data[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + data[i] = uint8(l) + i++ + i += copy(data[i:], s) + } + } + return i, nil +} + +func (m *LinuxContainerSecurityContext) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *LinuxContainerSecurityContext) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Capabilities != nil { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(m.Capabilities.Size())) + n18, err := m.Capabilities.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n18 + } + if m.Privileged { + data[i] = 0x10 + i++ + if m.Privileged { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if m.NamespaceOptions != nil { + data[i] = 0x1a + i++ + i = encodeVarintApi(data, i, uint64(m.NamespaceOptions.Size())) + n19, err := m.NamespaceOptions.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n19 + } + if m.SelinuxOptions != nil { + data[i] = 0x22 + i++ + i = encodeVarintApi(data, i, uint64(m.SelinuxOptions.Size())) + n20, err := m.SelinuxOptions.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n20 + } + if m.RunAsUser != nil { + data[i] = 0x2a + i++ + i = encodeVarintApi(data, i, uint64(m.RunAsUser.Size())) + n21, err := m.RunAsUser.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n21 + } + if len(m.RunAsUsername) > 0 { + data[i] = 0x32 + i++ + i = encodeVarintApi(data, i, uint64(len(m.RunAsUsername))) + i += copy(data[i:], m.RunAsUsername) + } + if m.ReadonlyRootfs { + data[i] = 0x38 + i++ + if m.ReadonlyRootfs { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if len(m.SupplementalGroups) > 0 { + for _, num := range m.SupplementalGroups { + data[i] = 0x40 + i++ + i = encodeVarintApi(data, i, uint64(num)) + } + } + return i, nil +} + +func (m *LinuxContainerConfig) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *LinuxContainerConfig) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Resources != nil { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(m.Resources.Size())) + n22, err := m.Resources.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n22 + } + if m.SecurityContext != nil { + data[i] = 0x12 + i++ + i = encodeVarintApi(data, i, uint64(m.SecurityContext.Size())) + n23, err := m.SecurityContext.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n23 + } + return i, nil +} + +func (m *ContainerMetadata) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ContainerMetadata) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Name) > 0 { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(len(m.Name))) + i += copy(data[i:], m.Name) + } + if m.Attempt != 0 { + data[i] = 0x10 + i++ + i = encodeVarintApi(data, i, uint64(m.Attempt)) + } + return i, nil +} + +func (m *Device) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Device) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.ContainerPath) > 0 { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(len(m.ContainerPath))) + i += copy(data[i:], m.ContainerPath) + } + if len(m.HostPath) > 0 { + data[i] = 0x12 + i++ + i = encodeVarintApi(data, i, uint64(len(m.HostPath))) + i += copy(data[i:], m.HostPath) + } + if len(m.Permissions) > 0 { + data[i] = 0x1a + i++ + i = encodeVarintApi(data, i, uint64(len(m.Permissions))) + i += copy(data[i:], m.Permissions) + } + return i, nil +} + +func (m *ContainerConfig) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ContainerConfig) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Metadata != nil { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(m.Metadata.Size())) + n24, err := m.Metadata.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n24 + } + if m.Image != nil { + data[i] = 0x12 + i++ + i = encodeVarintApi(data, i, uint64(m.Image.Size())) + n25, err := m.Image.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n25 + } + if len(m.Command) > 0 { + for _, s := range m.Command { + data[i] = 0x1a + i++ + l = len(s) + for l >= 1<<7 { + data[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + data[i] = uint8(l) + i++ + i += copy(data[i:], s) + } + } + if len(m.Args) > 0 { + for _, s := range m.Args { + data[i] = 0x22 + i++ + l = len(s) + for l >= 1<<7 { + data[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + data[i] = uint8(l) + i++ + i += copy(data[i:], s) + } + } + if len(m.WorkingDir) > 0 { + data[i] = 0x2a + i++ + i = encodeVarintApi(data, i, uint64(len(m.WorkingDir))) + i += copy(data[i:], m.WorkingDir) + } + if len(m.Envs) > 0 { + for _, msg := range m.Envs { + data[i] = 0x32 + i++ + i = encodeVarintApi(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Mounts) > 0 { + for _, msg := range m.Mounts { + data[i] = 0x3a + i++ + i = encodeVarintApi(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Devices) > 0 { + for _, msg := range m.Devices { + data[i] = 0x42 + i++ + i = encodeVarintApi(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Labels) > 0 { + for k := range m.Labels { + data[i] = 0x4a + i++ + v := m.Labels[k] + mapSize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + i = encodeVarintApi(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintApi(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + if len(m.Annotations) > 0 { + for k := range m.Annotations { + data[i] = 0x52 + i++ + v := m.Annotations[k] + mapSize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + i = encodeVarintApi(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintApi(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + if len(m.LogPath) > 0 { + data[i] = 0x5a + i++ + i = encodeVarintApi(data, i, uint64(len(m.LogPath))) + i += copy(data[i:], m.LogPath) + } + if m.Stdin { + data[i] = 0x60 + i++ + if m.Stdin { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if m.StdinOnce { + data[i] = 0x68 + i++ + if m.StdinOnce { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if m.Tty { + data[i] = 0x70 + i++ + if m.Tty { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if m.Linux != nil { + data[i] = 0x7a + i++ + i = encodeVarintApi(data, i, uint64(m.Linux.Size())) + n26, err := m.Linux.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n26 + } + return i, nil +} + +func (m *CreateContainerRequest) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *CreateContainerRequest) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.PodSandboxId) > 0 { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(len(m.PodSandboxId))) + i += copy(data[i:], m.PodSandboxId) + } + if m.Config != nil { + data[i] = 0x12 + i++ + i = encodeVarintApi(data, i, uint64(m.Config.Size())) + n27, err := m.Config.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n27 + } + if m.SandboxConfig != nil { + data[i] = 0x1a + i++ + i = encodeVarintApi(data, i, uint64(m.SandboxConfig.Size())) + n28, err := m.SandboxConfig.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n28 + } + return i, nil +} + +func (m *CreateContainerResponse) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *CreateContainerResponse) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.ContainerId) > 0 { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(len(m.ContainerId))) + i += copy(data[i:], m.ContainerId) + } + return i, nil +} + +func (m *StartContainerRequest) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *StartContainerRequest) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.ContainerId) > 0 { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(len(m.ContainerId))) + i += copy(data[i:], m.ContainerId) + } + return i, nil +} + +func (m *StartContainerResponse) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *StartContainerResponse) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + return i, nil +} + +func (m *StopContainerRequest) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *StopContainerRequest) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.ContainerId) > 0 { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(len(m.ContainerId))) + i += copy(data[i:], m.ContainerId) + } + if m.Timeout != 0 { + data[i] = 0x10 + i++ + i = encodeVarintApi(data, i, uint64(m.Timeout)) + } + return i, nil +} + +func (m *StopContainerResponse) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *StopContainerResponse) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + return i, nil +} + +func (m *RemoveContainerRequest) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *RemoveContainerRequest) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.ContainerId) > 0 { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(len(m.ContainerId))) + i += copy(data[i:], m.ContainerId) + } + return i, nil +} + +func (m *RemoveContainerResponse) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *RemoveContainerResponse) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + return i, nil +} + +func (m *ContainerStateValue) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ContainerStateValue) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.State != 0 { + data[i] = 0x8 + i++ + i = encodeVarintApi(data, i, uint64(m.State)) + } + return i, nil +} + +func (m *ContainerFilter) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ContainerFilter) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Id) > 0 { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(len(m.Id))) + i += copy(data[i:], m.Id) + } + if m.State != nil { + data[i] = 0x12 + i++ + i = encodeVarintApi(data, i, uint64(m.State.Size())) + n29, err := m.State.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n29 + } + if len(m.PodSandboxId) > 0 { + data[i] = 0x1a + i++ + i = encodeVarintApi(data, i, uint64(len(m.PodSandboxId))) + i += copy(data[i:], m.PodSandboxId) + } + if len(m.LabelSelector) > 0 { + for k := range m.LabelSelector { + data[i] = 0x22 + i++ + v := m.LabelSelector[k] + mapSize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + i = encodeVarintApi(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintApi(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + return i, nil +} + +func (m *ListContainersRequest) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ListContainersRequest) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Filter != nil { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(m.Filter.Size())) + n30, err := m.Filter.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n30 + } + return i, nil +} + +func (m *Container) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Container) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Id) > 0 { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(len(m.Id))) + i += copy(data[i:], m.Id) + } + if len(m.PodSandboxId) > 0 { + data[i] = 0x12 + i++ + i = encodeVarintApi(data, i, uint64(len(m.PodSandboxId))) + i += copy(data[i:], m.PodSandboxId) + } + if m.Metadata != nil { + data[i] = 0x1a + i++ + i = encodeVarintApi(data, i, uint64(m.Metadata.Size())) + n31, err := m.Metadata.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n31 + } + if m.Image != nil { + data[i] = 0x22 + i++ + i = encodeVarintApi(data, i, uint64(m.Image.Size())) + n32, err := m.Image.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n32 + } + if len(m.ImageRef) > 0 { + data[i] = 0x2a + i++ + i = encodeVarintApi(data, i, uint64(len(m.ImageRef))) + i += copy(data[i:], m.ImageRef) + } + if m.State != 0 { + data[i] = 0x30 + i++ + i = encodeVarintApi(data, i, uint64(m.State)) + } + if m.CreatedAt != 0 { + data[i] = 0x38 + i++ + i = encodeVarintApi(data, i, uint64(m.CreatedAt)) + } + if len(m.Labels) > 0 { + for k := range m.Labels { + data[i] = 0x42 + i++ + v := m.Labels[k] + mapSize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + i = encodeVarintApi(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintApi(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + if len(m.Annotations) > 0 { + for k := range m.Annotations { + data[i] = 0x4a + i++ + v := m.Annotations[k] + mapSize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + i = encodeVarintApi(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintApi(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + return i, nil +} + +func (m *ListContainersResponse) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ListContainersResponse) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Containers) > 0 { + for _, msg := range m.Containers { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *ContainerStatusRequest) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ContainerStatusRequest) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.ContainerId) > 0 { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(len(m.ContainerId))) + i += copy(data[i:], m.ContainerId) + } + return i, nil +} + +func (m *ContainerStatus) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ContainerStatus) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Id) > 0 { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(len(m.Id))) + i += copy(data[i:], m.Id) + } + if m.Metadata != nil { + data[i] = 0x12 + i++ + i = encodeVarintApi(data, i, uint64(m.Metadata.Size())) + n33, err := m.Metadata.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n33 + } + if m.State != 0 { + data[i] = 0x18 + i++ + i = encodeVarintApi(data, i, uint64(m.State)) + } + if m.CreatedAt != 0 { + data[i] = 0x20 + i++ + i = encodeVarintApi(data, i, uint64(m.CreatedAt)) + } + if m.StartedAt != 0 { + data[i] = 0x28 + i++ + i = encodeVarintApi(data, i, uint64(m.StartedAt)) + } + if m.FinishedAt != 0 { + data[i] = 0x30 + i++ + i = encodeVarintApi(data, i, uint64(m.FinishedAt)) + } + if m.ExitCode != 0 { + data[i] = 0x38 + i++ + i = encodeVarintApi(data, i, uint64(m.ExitCode)) + } + if m.Image != nil { + data[i] = 0x42 + i++ + i = encodeVarintApi(data, i, uint64(m.Image.Size())) + n34, err := m.Image.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n34 + } + if len(m.ImageRef) > 0 { + data[i] = 0x4a + i++ + i = encodeVarintApi(data, i, uint64(len(m.ImageRef))) + i += copy(data[i:], m.ImageRef) + } + if len(m.Reason) > 0 { + data[i] = 0x52 + i++ + i = encodeVarintApi(data, i, uint64(len(m.Reason))) + i += copy(data[i:], m.Reason) + } + if len(m.Message) > 0 { + data[i] = 0x5a + i++ + i = encodeVarintApi(data, i, uint64(len(m.Message))) + i += copy(data[i:], m.Message) + } + if len(m.Labels) > 0 { + for k := range m.Labels { + data[i] = 0x62 + i++ + v := m.Labels[k] + mapSize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + i = encodeVarintApi(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintApi(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + if len(m.Annotations) > 0 { + for k := range m.Annotations { + data[i] = 0x6a + i++ + v := m.Annotations[k] + mapSize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + i = encodeVarintApi(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintApi(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + if len(m.Mounts) > 0 { + for _, msg := range m.Mounts { + data[i] = 0x72 + i++ + i = encodeVarintApi(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *ContainerStatusResponse) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ContainerStatusResponse) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Status != nil { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(m.Status.Size())) + n35, err := m.Status.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n35 + } + return i, nil +} + +func (m *ExecSyncRequest) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ExecSyncRequest) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.ContainerId) > 0 { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(len(m.ContainerId))) + i += copy(data[i:], m.ContainerId) + } + if len(m.Cmd) > 0 { + for _, s := range m.Cmd { + data[i] = 0x12 + i++ + l = len(s) + for l >= 1<<7 { + data[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + data[i] = uint8(l) + i++ + i += copy(data[i:], s) + } + } + if m.Timeout != 0 { + data[i] = 0x18 + i++ + i = encodeVarintApi(data, i, uint64(m.Timeout)) + } + return i, nil +} + +func (m *ExecSyncResponse) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ExecSyncResponse) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Stdout) > 0 { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(len(m.Stdout))) + i += copy(data[i:], m.Stdout) + } + if len(m.Stderr) > 0 { + data[i] = 0x12 + i++ + i = encodeVarintApi(data, i, uint64(len(m.Stderr))) + i += copy(data[i:], m.Stderr) + } + if m.ExitCode != 0 { + data[i] = 0x18 + i++ + i = encodeVarintApi(data, i, uint64(m.ExitCode)) + } + return i, nil +} + +func (m *ExecRequest) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ExecRequest) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.ContainerId) > 0 { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(len(m.ContainerId))) + i += copy(data[i:], m.ContainerId) + } + if len(m.Cmd) > 0 { + for _, s := range m.Cmd { + data[i] = 0x12 + i++ + l = len(s) + for l >= 1<<7 { + data[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + data[i] = uint8(l) + i++ + i += copy(data[i:], s) + } + } + if m.Tty { + data[i] = 0x18 + i++ + if m.Tty { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if m.Stdin { + data[i] = 0x20 + i++ + if m.Stdin { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + return i, nil +} + +func (m *ExecResponse) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ExecResponse) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Url) > 0 { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(len(m.Url))) + i += copy(data[i:], m.Url) + } + return i, nil +} + +func (m *AttachRequest) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *AttachRequest) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.ContainerId) > 0 { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(len(m.ContainerId))) + i += copy(data[i:], m.ContainerId) + } + if m.Stdin { + data[i] = 0x10 + i++ + if m.Stdin { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if m.Tty { + data[i] = 0x18 + i++ + if m.Tty { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + return i, nil +} + +func (m *AttachResponse) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *AttachResponse) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Url) > 0 { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(len(m.Url))) + i += copy(data[i:], m.Url) + } + return i, nil +} + +func (m *PortForwardRequest) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *PortForwardRequest) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.PodSandboxId) > 0 { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(len(m.PodSandboxId))) + i += copy(data[i:], m.PodSandboxId) + } + if len(m.Port) > 0 { + for _, num := range m.Port { + data[i] = 0x10 + i++ + i = encodeVarintApi(data, i, uint64(num)) + } + } + return i, nil +} + +func (m *PortForwardResponse) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *PortForwardResponse) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Url) > 0 { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(len(m.Url))) + i += copy(data[i:], m.Url) + } + return i, nil +} + +func (m *ImageFilter) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ImageFilter) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Image != nil { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(m.Image.Size())) + n36, err := m.Image.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n36 + } + return i, nil +} + +func (m *ListImagesRequest) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ListImagesRequest) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Filter != nil { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(m.Filter.Size())) + n37, err := m.Filter.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n37 + } + return i, nil +} + +func (m *Image) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Image) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Id) > 0 { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(len(m.Id))) + i += copy(data[i:], m.Id) + } + if len(m.RepoTags) > 0 { + for _, s := range m.RepoTags { + data[i] = 0x12 + i++ + l = len(s) + for l >= 1<<7 { + data[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + data[i] = uint8(l) + i++ + i += copy(data[i:], s) + } + } + if len(m.RepoDigests) > 0 { + for _, s := range m.RepoDigests { + data[i] = 0x1a + i++ + l = len(s) + for l >= 1<<7 { + data[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + data[i] = uint8(l) + i++ + i += copy(data[i:], s) + } + } + if m.Size_ != 0 { + data[i] = 0x20 + i++ + i = encodeVarintApi(data, i, uint64(m.Size_)) + } + if m.Uid != nil { + data[i] = 0x2a + i++ + i = encodeVarintApi(data, i, uint64(m.Uid.Size())) + n38, err := m.Uid.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n38 + } + if len(m.Username) > 0 { + data[i] = 0x32 + i++ + i = encodeVarintApi(data, i, uint64(len(m.Username))) + i += copy(data[i:], m.Username) + } + return i, nil +} + +func (m *ListImagesResponse) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ListImagesResponse) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Images) > 0 { + for _, msg := range m.Images { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *ImageStatusRequest) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ImageStatusRequest) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Image != nil { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(m.Image.Size())) + n39, err := m.Image.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n39 + } + return i, nil +} + +func (m *ImageStatusResponse) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ImageStatusResponse) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Image != nil { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(m.Image.Size())) + n40, err := m.Image.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n40 + } + return i, nil +} + +func (m *AuthConfig) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *AuthConfig) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Username) > 0 { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(len(m.Username))) + i += copy(data[i:], m.Username) + } + if len(m.Password) > 0 { + data[i] = 0x12 + i++ + i = encodeVarintApi(data, i, uint64(len(m.Password))) + i += copy(data[i:], m.Password) + } + if len(m.Auth) > 0 { + data[i] = 0x1a + i++ + i = encodeVarintApi(data, i, uint64(len(m.Auth))) + i += copy(data[i:], m.Auth) + } + if len(m.ServerAddress) > 0 { + data[i] = 0x22 + i++ + i = encodeVarintApi(data, i, uint64(len(m.ServerAddress))) + i += copy(data[i:], m.ServerAddress) + } + if len(m.IdentityToken) > 0 { + data[i] = 0x2a + i++ + i = encodeVarintApi(data, i, uint64(len(m.IdentityToken))) + i += copy(data[i:], m.IdentityToken) + } + if len(m.RegistryToken) > 0 { + data[i] = 0x32 + i++ + i = encodeVarintApi(data, i, uint64(len(m.RegistryToken))) + i += copy(data[i:], m.RegistryToken) + } + return i, nil +} + +func (m *PullImageRequest) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *PullImageRequest) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Image != nil { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(m.Image.Size())) + n41, err := m.Image.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n41 + } + if m.Auth != nil { + data[i] = 0x12 + i++ + i = encodeVarintApi(data, i, uint64(m.Auth.Size())) + n42, err := m.Auth.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n42 + } + if m.SandboxConfig != nil { + data[i] = 0x1a + i++ + i = encodeVarintApi(data, i, uint64(m.SandboxConfig.Size())) + n43, err := m.SandboxConfig.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n43 + } + return i, nil +} + +func (m *PullImageResponse) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *PullImageResponse) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.ImageRef) > 0 { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(len(m.ImageRef))) + i += copy(data[i:], m.ImageRef) + } + return i, nil +} + +func (m *RemoveImageRequest) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *RemoveImageRequest) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Image != nil { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(m.Image.Size())) + n44, err := m.Image.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n44 + } + return i, nil +} + +func (m *RemoveImageResponse) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *RemoveImageResponse) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + return i, nil +} + +func (m *NetworkConfig) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *NetworkConfig) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.PodCidr) > 0 { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(len(m.PodCidr))) + i += copy(data[i:], m.PodCidr) + } + return i, nil +} + +func (m *RuntimeConfig) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *RuntimeConfig) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.NetworkConfig != nil { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(m.NetworkConfig.Size())) + n45, err := m.NetworkConfig.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n45 + } + return i, nil +} + +func (m *UpdateRuntimeConfigRequest) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *UpdateRuntimeConfigRequest) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.RuntimeConfig != nil { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(m.RuntimeConfig.Size())) + n46, err := m.RuntimeConfig.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n46 + } + return i, nil +} + +func (m *UpdateRuntimeConfigResponse) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *UpdateRuntimeConfigResponse) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + return i, nil +} + +func (m *RuntimeCondition) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *RuntimeCondition) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Type) > 0 { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(len(m.Type))) + i += copy(data[i:], m.Type) + } + if m.Status { + data[i] = 0x10 + i++ + if m.Status { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + if len(m.Reason) > 0 { + data[i] = 0x1a + i++ + i = encodeVarintApi(data, i, uint64(len(m.Reason))) + i += copy(data[i:], m.Reason) + } + if len(m.Message) > 0 { + data[i] = 0x22 + i++ + i = encodeVarintApi(data, i, uint64(len(m.Message))) + i += copy(data[i:], m.Message) + } + return i, nil +} + +func (m *RuntimeStatus) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *RuntimeStatus) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Conditions) > 0 { + for _, msg := range m.Conditions { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *StatusRequest) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *StatusRequest) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + return i, nil +} + +func (m *StatusResponse) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *StatusResponse) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Status != nil { + data[i] = 0xa + i++ + i = encodeVarintApi(data, i, uint64(m.Status.Size())) + n47, err := m.Status.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n47 + } + return i, nil +} + +func encodeFixed64Api(data []byte, offset int, v uint64) int { + data[offset] = uint8(v) + data[offset+1] = uint8(v >> 8) + data[offset+2] = uint8(v >> 16) + data[offset+3] = uint8(v >> 24) + data[offset+4] = uint8(v >> 32) + data[offset+5] = uint8(v >> 40) + data[offset+6] = uint8(v >> 48) + data[offset+7] = uint8(v >> 56) + return offset + 8 +} +func encodeFixed32Api(data []byte, offset int, v uint32) int { + data[offset] = uint8(v) + data[offset+1] = uint8(v >> 8) + data[offset+2] = uint8(v >> 16) + data[offset+3] = uint8(v >> 24) + return offset + 4 +} +func encodeVarintApi(data []byte, offset int, v uint64) int { + for v >= 1<<7 { + data[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + data[offset] = uint8(v) + return offset + 1 +} +func (m *VersionRequest) Size() (n int) { + var l int + _ = l + l = len(m.Version) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *VersionResponse) Size() (n int) { + var l int + _ = l + l = len(m.Version) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.RuntimeName) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.RuntimeVersion) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.RuntimeApiVersion) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *DNSConfig) Size() (n int) { + var l int + _ = l + if len(m.Servers) > 0 { + for _, s := range m.Servers { + l = len(s) + n += 1 + l + sovApi(uint64(l)) + } + } + if len(m.Searches) > 0 { + for _, s := range m.Searches { + l = len(s) + n += 1 + l + sovApi(uint64(l)) + } + } + if len(m.Options) > 0 { + for _, s := range m.Options { + l = len(s) + n += 1 + l + sovApi(uint64(l)) + } + } + return n +} + +func (m *PortMapping) Size() (n int) { + var l int + _ = l + if m.Protocol != 0 { + n += 1 + sovApi(uint64(m.Protocol)) + } + if m.ContainerPort != 0 { + n += 1 + sovApi(uint64(m.ContainerPort)) + } + if m.HostPort != 0 { + n += 1 + sovApi(uint64(m.HostPort)) + } + l = len(m.HostIp) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *Mount) Size() (n int) { + var l int + _ = l + l = len(m.ContainerPath) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.HostPath) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if m.Readonly { + n += 2 + } + if m.SelinuxRelabel { + n += 2 + } + return n +} + +func (m *NamespaceOption) Size() (n int) { + var l int + _ = l + if m.HostNetwork { + n += 2 + } + if m.HostPid { + n += 2 + } + if m.HostIpc { + n += 2 + } + return n +} + +func (m *Int64Value) Size() (n int) { + var l int + _ = l + if m.Value != 0 { + n += 1 + sovApi(uint64(m.Value)) + } + return n +} + +func (m *LinuxSandboxSecurityContext) Size() (n int) { + var l int + _ = l + if m.NamespaceOptions != nil { + l = m.NamespaceOptions.Size() + n += 1 + l + sovApi(uint64(l)) + } + if m.SelinuxOptions != nil { + l = m.SelinuxOptions.Size() + n += 1 + l + sovApi(uint64(l)) + } + if m.RunAsUser != nil { + l = m.RunAsUser.Size() + n += 1 + l + sovApi(uint64(l)) + } + if m.ReadonlyRootfs { + n += 2 + } + if len(m.SupplementalGroups) > 0 { + for _, e := range m.SupplementalGroups { + n += 1 + sovApi(uint64(e)) + } + } + if m.Privileged { + n += 2 + } + return n +} + +func (m *LinuxPodSandboxConfig) Size() (n int) { + var l int + _ = l + l = len(m.CgroupParent) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if m.SecurityContext != nil { + l = m.SecurityContext.Size() + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *PodSandboxMetadata) Size() (n int) { + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.Uid) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.Namespace) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if m.Attempt != 0 { + n += 1 + sovApi(uint64(m.Attempt)) + } + return n +} + +func (m *PodSandboxConfig) Size() (n int) { + var l int + _ = l + if m.Metadata != nil { + l = m.Metadata.Size() + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.Hostname) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.LogDirectory) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if m.DnsConfig != nil { + l = m.DnsConfig.Size() + n += 1 + l + sovApi(uint64(l)) + } + if len(m.PortMappings) > 0 { + for _, e := range m.PortMappings { + l = e.Size() + n += 1 + l + sovApi(uint64(l)) + } + } + if len(m.Labels) > 0 { + for k, v := range m.Labels { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + } + } + if len(m.Annotations) > 0 { + for k, v := range m.Annotations { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + } + } + if m.Linux != nil { + l = m.Linux.Size() + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *RunPodSandboxRequest) Size() (n int) { + var l int + _ = l + if m.Config != nil { + l = m.Config.Size() + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *RunPodSandboxResponse) Size() (n int) { + var l int + _ = l + l = len(m.PodSandboxId) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *StopPodSandboxRequest) Size() (n int) { + var l int + _ = l + l = len(m.PodSandboxId) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *StopPodSandboxResponse) Size() (n int) { + var l int + _ = l + return n +} + +func (m *RemovePodSandboxRequest) Size() (n int) { + var l int + _ = l + l = len(m.PodSandboxId) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *RemovePodSandboxResponse) Size() (n int) { + var l int + _ = l + return n +} + +func (m *PodSandboxStatusRequest) Size() (n int) { + var l int + _ = l + l = len(m.PodSandboxId) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *PodSandboxNetworkStatus) Size() (n int) { + var l int + _ = l + l = len(m.Ip) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *Namespace) Size() (n int) { + var l int + _ = l + l = len(m.Network) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if m.Options != nil { + l = m.Options.Size() + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *LinuxPodSandboxStatus) Size() (n int) { + var l int + _ = l + if m.Namespaces != nil { + l = m.Namespaces.Size() + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *PodSandboxStatus) Size() (n int) { + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if m.Metadata != nil { + l = m.Metadata.Size() + n += 1 + l + sovApi(uint64(l)) + } + if m.State != 0 { + n += 1 + sovApi(uint64(m.State)) + } + if m.CreatedAt != 0 { + n += 1 + sovApi(uint64(m.CreatedAt)) + } + if m.Network != nil { + l = m.Network.Size() + n += 1 + l + sovApi(uint64(l)) + } + if m.Linux != nil { + l = m.Linux.Size() + n += 1 + l + sovApi(uint64(l)) + } + if len(m.Labels) > 0 { + for k, v := range m.Labels { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + } + } + if len(m.Annotations) > 0 { + for k, v := range m.Annotations { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + } + } + return n +} + +func (m *PodSandboxStatusResponse) Size() (n int) { + var l int + _ = l + if m.Status != nil { + l = m.Status.Size() + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *PodSandboxStateValue) Size() (n int) { + var l int + _ = l + if m.State != 0 { + n += 1 + sovApi(uint64(m.State)) + } + return n +} + +func (m *PodSandboxFilter) Size() (n int) { + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if m.State != nil { + l = m.State.Size() + n += 1 + l + sovApi(uint64(l)) + } + if len(m.LabelSelector) > 0 { + for k, v := range m.LabelSelector { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + } + } + return n +} + +func (m *ListPodSandboxRequest) Size() (n int) { + var l int + _ = l + if m.Filter != nil { + l = m.Filter.Size() + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *PodSandbox) Size() (n int) { + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if m.Metadata != nil { + l = m.Metadata.Size() + n += 1 + l + sovApi(uint64(l)) + } + if m.State != 0 { + n += 1 + sovApi(uint64(m.State)) + } + if m.CreatedAt != 0 { + n += 1 + sovApi(uint64(m.CreatedAt)) + } + if len(m.Labels) > 0 { + for k, v := range m.Labels { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + } + } + if len(m.Annotations) > 0 { + for k, v := range m.Annotations { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + } + } + return n +} + +func (m *ListPodSandboxResponse) Size() (n int) { + var l int + _ = l + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovApi(uint64(l)) + } + } + return n +} + +func (m *ImageSpec) Size() (n int) { + var l int + _ = l + l = len(m.Image) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *KeyValue) Size() (n int) { + var l int + _ = l + l = len(m.Key) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.Value) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *LinuxContainerResources) Size() (n int) { + var l int + _ = l + if m.CpuPeriod != 0 { + n += 1 + sovApi(uint64(m.CpuPeriod)) + } + if m.CpuQuota != 0 { + n += 1 + sovApi(uint64(m.CpuQuota)) + } + if m.CpuShares != 0 { + n += 1 + sovApi(uint64(m.CpuShares)) + } + if m.MemoryLimitInBytes != 0 { + n += 1 + sovApi(uint64(m.MemoryLimitInBytes)) + } + if m.OomScoreAdj != 0 { + n += 1 + sovApi(uint64(m.OomScoreAdj)) + } + return n +} + +func (m *SELinuxOption) Size() (n int) { + var l int + _ = l + l = len(m.User) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.Role) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.Type) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.Level) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *Capability) Size() (n int) { + var l int + _ = l + if len(m.AddCapabilities) > 0 { + for _, s := range m.AddCapabilities { + l = len(s) + n += 1 + l + sovApi(uint64(l)) + } + } + if len(m.DropCapabilities) > 0 { + for _, s := range m.DropCapabilities { + l = len(s) + n += 1 + l + sovApi(uint64(l)) + } + } + return n +} + +func (m *LinuxContainerSecurityContext) Size() (n int) { + var l int + _ = l + if m.Capabilities != nil { + l = m.Capabilities.Size() + n += 1 + l + sovApi(uint64(l)) + } + if m.Privileged { + n += 2 + } + if m.NamespaceOptions != nil { + l = m.NamespaceOptions.Size() + n += 1 + l + sovApi(uint64(l)) + } + if m.SelinuxOptions != nil { + l = m.SelinuxOptions.Size() + n += 1 + l + sovApi(uint64(l)) + } + if m.RunAsUser != nil { + l = m.RunAsUser.Size() + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.RunAsUsername) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if m.ReadonlyRootfs { + n += 2 + } + if len(m.SupplementalGroups) > 0 { + for _, e := range m.SupplementalGroups { + n += 1 + sovApi(uint64(e)) + } + } + return n +} + +func (m *LinuxContainerConfig) Size() (n int) { + var l int + _ = l + if m.Resources != nil { + l = m.Resources.Size() + n += 1 + l + sovApi(uint64(l)) + } + if m.SecurityContext != nil { + l = m.SecurityContext.Size() + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *ContainerMetadata) Size() (n int) { + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if m.Attempt != 0 { + n += 1 + sovApi(uint64(m.Attempt)) + } + return n +} + +func (m *Device) Size() (n int) { + var l int + _ = l + l = len(m.ContainerPath) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.HostPath) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.Permissions) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *ContainerConfig) Size() (n int) { + var l int + _ = l + if m.Metadata != nil { + l = m.Metadata.Size() + n += 1 + l + sovApi(uint64(l)) + } + if m.Image != nil { + l = m.Image.Size() + n += 1 + l + sovApi(uint64(l)) + } + if len(m.Command) > 0 { + for _, s := range m.Command { + l = len(s) + n += 1 + l + sovApi(uint64(l)) + } + } + if len(m.Args) > 0 { + for _, s := range m.Args { + l = len(s) + n += 1 + l + sovApi(uint64(l)) + } + } + l = len(m.WorkingDir) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if len(m.Envs) > 0 { + for _, e := range m.Envs { + l = e.Size() + n += 1 + l + sovApi(uint64(l)) + } + } + if len(m.Mounts) > 0 { + for _, e := range m.Mounts { + l = e.Size() + n += 1 + l + sovApi(uint64(l)) + } + } + if len(m.Devices) > 0 { + for _, e := range m.Devices { + l = e.Size() + n += 1 + l + sovApi(uint64(l)) + } + } + if len(m.Labels) > 0 { + for k, v := range m.Labels { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + } + } + if len(m.Annotations) > 0 { + for k, v := range m.Annotations { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + } + } + l = len(m.LogPath) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if m.Stdin { + n += 2 + } + if m.StdinOnce { + n += 2 + } + if m.Tty { + n += 2 + } + if m.Linux != nil { + l = m.Linux.Size() + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *CreateContainerRequest) Size() (n int) { + var l int + _ = l + l = len(m.PodSandboxId) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if m.Config != nil { + l = m.Config.Size() + n += 1 + l + sovApi(uint64(l)) + } + if m.SandboxConfig != nil { + l = m.SandboxConfig.Size() + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *CreateContainerResponse) Size() (n int) { + var l int + _ = l + l = len(m.ContainerId) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *StartContainerRequest) Size() (n int) { + var l int + _ = l + l = len(m.ContainerId) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *StartContainerResponse) Size() (n int) { + var l int + _ = l + return n +} + +func (m *StopContainerRequest) Size() (n int) { + var l int + _ = l + l = len(m.ContainerId) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if m.Timeout != 0 { + n += 1 + sovApi(uint64(m.Timeout)) + } + return n +} + +func (m *StopContainerResponse) Size() (n int) { + var l int + _ = l + return n +} + +func (m *RemoveContainerRequest) Size() (n int) { + var l int + _ = l + l = len(m.ContainerId) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *RemoveContainerResponse) Size() (n int) { + var l int + _ = l + return n +} + +func (m *ContainerStateValue) Size() (n int) { + var l int + _ = l + if m.State != 0 { + n += 1 + sovApi(uint64(m.State)) + } + return n +} + +func (m *ContainerFilter) Size() (n int) { + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if m.State != nil { + l = m.State.Size() + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.PodSandboxId) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if len(m.LabelSelector) > 0 { + for k, v := range m.LabelSelector { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + } + } + return n +} + +func (m *ListContainersRequest) Size() (n int) { + var l int + _ = l + if m.Filter != nil { + l = m.Filter.Size() + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *Container) Size() (n int) { + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.PodSandboxId) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if m.Metadata != nil { + l = m.Metadata.Size() + n += 1 + l + sovApi(uint64(l)) + } + if m.Image != nil { + l = m.Image.Size() + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.ImageRef) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if m.State != 0 { + n += 1 + sovApi(uint64(m.State)) + } + if m.CreatedAt != 0 { + n += 1 + sovApi(uint64(m.CreatedAt)) + } + if len(m.Labels) > 0 { + for k, v := range m.Labels { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + } + } + if len(m.Annotations) > 0 { + for k, v := range m.Annotations { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + } + } + return n +} + +func (m *ListContainersResponse) Size() (n int) { + var l int + _ = l + if len(m.Containers) > 0 { + for _, e := range m.Containers { + l = e.Size() + n += 1 + l + sovApi(uint64(l)) + } + } + return n +} + +func (m *ContainerStatusRequest) Size() (n int) { + var l int + _ = l + l = len(m.ContainerId) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *ContainerStatus) Size() (n int) { + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if m.Metadata != nil { + l = m.Metadata.Size() + n += 1 + l + sovApi(uint64(l)) + } + if m.State != 0 { + n += 1 + sovApi(uint64(m.State)) + } + if m.CreatedAt != 0 { + n += 1 + sovApi(uint64(m.CreatedAt)) + } + if m.StartedAt != 0 { + n += 1 + sovApi(uint64(m.StartedAt)) + } + if m.FinishedAt != 0 { + n += 1 + sovApi(uint64(m.FinishedAt)) + } + if m.ExitCode != 0 { + n += 1 + sovApi(uint64(m.ExitCode)) + } + if m.Image != nil { + l = m.Image.Size() + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.ImageRef) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.Reason) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.Message) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if len(m.Labels) > 0 { + for k, v := range m.Labels { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + } + } + if len(m.Annotations) > 0 { + for k, v := range m.Annotations { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v))) + n += mapEntrySize + 1 + sovApi(uint64(mapEntrySize)) + } + } + if len(m.Mounts) > 0 { + for _, e := range m.Mounts { + l = e.Size() + n += 1 + l + sovApi(uint64(l)) + } + } + return n +} + +func (m *ContainerStatusResponse) Size() (n int) { + var l int + _ = l + if m.Status != nil { + l = m.Status.Size() + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *ExecSyncRequest) Size() (n int) { + var l int + _ = l + l = len(m.ContainerId) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if len(m.Cmd) > 0 { + for _, s := range m.Cmd { + l = len(s) + n += 1 + l + sovApi(uint64(l)) + } + } + if m.Timeout != 0 { + n += 1 + sovApi(uint64(m.Timeout)) + } + return n +} + +func (m *ExecSyncResponse) Size() (n int) { + var l int + _ = l + l = len(m.Stdout) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.Stderr) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if m.ExitCode != 0 { + n += 1 + sovApi(uint64(m.ExitCode)) + } + return n +} + +func (m *ExecRequest) Size() (n int) { + var l int + _ = l + l = len(m.ContainerId) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if len(m.Cmd) > 0 { + for _, s := range m.Cmd { + l = len(s) + n += 1 + l + sovApi(uint64(l)) + } + } + if m.Tty { + n += 2 + } + if m.Stdin { + n += 2 + } + return n +} + +func (m *ExecResponse) Size() (n int) { + var l int + _ = l + l = len(m.Url) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *AttachRequest) Size() (n int) { + var l int + _ = l + l = len(m.ContainerId) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if m.Stdin { + n += 2 + } + if m.Tty { + n += 2 + } + return n +} + +func (m *AttachResponse) Size() (n int) { + var l int + _ = l + l = len(m.Url) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *PortForwardRequest) Size() (n int) { + var l int + _ = l + l = len(m.PodSandboxId) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if len(m.Port) > 0 { + for _, e := range m.Port { + n += 1 + sovApi(uint64(e)) + } + } + return n +} + +func (m *PortForwardResponse) Size() (n int) { + var l int + _ = l + l = len(m.Url) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *ImageFilter) Size() (n int) { + var l int + _ = l + if m.Image != nil { + l = m.Image.Size() + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *ListImagesRequest) Size() (n int) { + var l int + _ = l + if m.Filter != nil { + l = m.Filter.Size() + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *Image) Size() (n int) { + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if len(m.RepoTags) > 0 { + for _, s := range m.RepoTags { + l = len(s) + n += 1 + l + sovApi(uint64(l)) + } + } + if len(m.RepoDigests) > 0 { + for _, s := range m.RepoDigests { + l = len(s) + n += 1 + l + sovApi(uint64(l)) + } + } + if m.Size_ != 0 { + n += 1 + sovApi(uint64(m.Size_)) + } + if m.Uid != nil { + l = m.Uid.Size() + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.Username) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *ListImagesResponse) Size() (n int) { + var l int + _ = l + if len(m.Images) > 0 { + for _, e := range m.Images { + l = e.Size() + n += 1 + l + sovApi(uint64(l)) + } + } + return n +} + +func (m *ImageStatusRequest) Size() (n int) { + var l int + _ = l + if m.Image != nil { + l = m.Image.Size() + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *ImageStatusResponse) Size() (n int) { + var l int + _ = l + if m.Image != nil { + l = m.Image.Size() + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *AuthConfig) Size() (n int) { + var l int + _ = l + l = len(m.Username) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.Password) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.Auth) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.ServerAddress) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.IdentityToken) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.RegistryToken) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *PullImageRequest) Size() (n int) { + var l int + _ = l + if m.Image != nil { + l = m.Image.Size() + n += 1 + l + sovApi(uint64(l)) + } + if m.Auth != nil { + l = m.Auth.Size() + n += 1 + l + sovApi(uint64(l)) + } + if m.SandboxConfig != nil { + l = m.SandboxConfig.Size() + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *PullImageResponse) Size() (n int) { + var l int + _ = l + l = len(m.ImageRef) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *RemoveImageRequest) Size() (n int) { + var l int + _ = l + if m.Image != nil { + l = m.Image.Size() + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *RemoveImageResponse) Size() (n int) { + var l int + _ = l + return n +} + +func (m *NetworkConfig) Size() (n int) { + var l int + _ = l + l = len(m.PodCidr) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *RuntimeConfig) Size() (n int) { + var l int + _ = l + if m.NetworkConfig != nil { + l = m.NetworkConfig.Size() + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *UpdateRuntimeConfigRequest) Size() (n int) { + var l int + _ = l + if m.RuntimeConfig != nil { + l = m.RuntimeConfig.Size() + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *UpdateRuntimeConfigResponse) Size() (n int) { + var l int + _ = l + return n +} + +func (m *RuntimeCondition) Size() (n int) { + var l int + _ = l + l = len(m.Type) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if m.Status { + n += 2 + } + l = len(m.Reason) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.Message) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func (m *RuntimeStatus) Size() (n int) { + var l int + _ = l + if len(m.Conditions) > 0 { + for _, e := range m.Conditions { + l = e.Size() + n += 1 + l + sovApi(uint64(l)) + } + } + return n +} + +func (m *StatusRequest) Size() (n int) { + var l int + _ = l + return n +} + +func (m *StatusResponse) Size() (n int) { + var l int + _ = l + if m.Status != nil { + l = m.Status.Size() + n += 1 + l + sovApi(uint64(l)) + } + return n +} + +func sovApi(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozApi(x uint64) (n int) { + return sovApi(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *VersionRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&VersionRequest{`, + `Version:` + fmt.Sprintf("%v", this.Version) + `,`, + `}`, + }, "") + return s +} +func (this *VersionResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&VersionResponse{`, + `Version:` + fmt.Sprintf("%v", this.Version) + `,`, + `RuntimeName:` + fmt.Sprintf("%v", this.RuntimeName) + `,`, + `RuntimeVersion:` + fmt.Sprintf("%v", this.RuntimeVersion) + `,`, + `RuntimeApiVersion:` + fmt.Sprintf("%v", this.RuntimeApiVersion) + `,`, + `}`, + }, "") + return s +} +func (this *DNSConfig) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DNSConfig{`, + `Servers:` + fmt.Sprintf("%v", this.Servers) + `,`, + `Searches:` + fmt.Sprintf("%v", this.Searches) + `,`, + `Options:` + fmt.Sprintf("%v", this.Options) + `,`, + `}`, + }, "") + return s +} +func (this *PortMapping) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PortMapping{`, + `Protocol:` + fmt.Sprintf("%v", this.Protocol) + `,`, + `ContainerPort:` + fmt.Sprintf("%v", this.ContainerPort) + `,`, + `HostPort:` + fmt.Sprintf("%v", this.HostPort) + `,`, + `HostIp:` + fmt.Sprintf("%v", this.HostIp) + `,`, + `}`, + }, "") + return s +} +func (this *Mount) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Mount{`, + `ContainerPath:` + fmt.Sprintf("%v", this.ContainerPath) + `,`, + `HostPath:` + fmt.Sprintf("%v", this.HostPath) + `,`, + `Readonly:` + fmt.Sprintf("%v", this.Readonly) + `,`, + `SelinuxRelabel:` + fmt.Sprintf("%v", this.SelinuxRelabel) + `,`, + `}`, + }, "") + return s +} +func (this *NamespaceOption) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NamespaceOption{`, + `HostNetwork:` + fmt.Sprintf("%v", this.HostNetwork) + `,`, + `HostPid:` + fmt.Sprintf("%v", this.HostPid) + `,`, + `HostIpc:` + fmt.Sprintf("%v", this.HostIpc) + `,`, + `}`, + }, "") + return s +} +func (this *Int64Value) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Int64Value{`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `}`, + }, "") + return s +} +func (this *LinuxSandboxSecurityContext) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&LinuxSandboxSecurityContext{`, + `NamespaceOptions:` + strings.Replace(fmt.Sprintf("%v", this.NamespaceOptions), "NamespaceOption", "NamespaceOption", 1) + `,`, + `SelinuxOptions:` + strings.Replace(fmt.Sprintf("%v", this.SelinuxOptions), "SELinuxOption", "SELinuxOption", 1) + `,`, + `RunAsUser:` + strings.Replace(fmt.Sprintf("%v", this.RunAsUser), "Int64Value", "Int64Value", 1) + `,`, + `ReadonlyRootfs:` + fmt.Sprintf("%v", this.ReadonlyRootfs) + `,`, + `SupplementalGroups:` + fmt.Sprintf("%v", this.SupplementalGroups) + `,`, + `Privileged:` + fmt.Sprintf("%v", this.Privileged) + `,`, + `}`, + }, "") + return s +} +func (this *LinuxPodSandboxConfig) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&LinuxPodSandboxConfig{`, + `CgroupParent:` + fmt.Sprintf("%v", this.CgroupParent) + `,`, + `SecurityContext:` + strings.Replace(fmt.Sprintf("%v", this.SecurityContext), "LinuxSandboxSecurityContext", "LinuxSandboxSecurityContext", 1) + `,`, + `}`, + }, "") + return s +} +func (this *PodSandboxMetadata) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PodSandboxMetadata{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Uid:` + fmt.Sprintf("%v", this.Uid) + `,`, + `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, + `Attempt:` + fmt.Sprintf("%v", this.Attempt) + `,`, + `}`, + }, "") + return s +} +func (this *PodSandboxConfig) String() string { + if this == nil { + return "nil" + } + keysForLabels := make([]string, 0, len(this.Labels)) + for k := range this.Labels { + keysForLabels = append(keysForLabels, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) + mapStringForLabels := "map[string]string{" + for _, k := range keysForLabels { + mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) + } + mapStringForLabels += "}" + keysForAnnotations := make([]string, 0, len(this.Annotations)) + for k := range this.Annotations { + keysForAnnotations = append(keysForAnnotations, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations) + mapStringForAnnotations := "map[string]string{" + for _, k := range keysForAnnotations { + mapStringForAnnotations += fmt.Sprintf("%v: %v,", k, this.Annotations[k]) + } + mapStringForAnnotations += "}" + s := strings.Join([]string{`&PodSandboxConfig{`, + `Metadata:` + strings.Replace(fmt.Sprintf("%v", this.Metadata), "PodSandboxMetadata", "PodSandboxMetadata", 1) + `,`, + `Hostname:` + fmt.Sprintf("%v", this.Hostname) + `,`, + `LogDirectory:` + fmt.Sprintf("%v", this.LogDirectory) + `,`, + `DnsConfig:` + strings.Replace(fmt.Sprintf("%v", this.DnsConfig), "DNSConfig", "DNSConfig", 1) + `,`, + `PortMappings:` + strings.Replace(fmt.Sprintf("%v", this.PortMappings), "PortMapping", "PortMapping", 1) + `,`, + `Labels:` + mapStringForLabels + `,`, + `Annotations:` + mapStringForAnnotations + `,`, + `Linux:` + strings.Replace(fmt.Sprintf("%v", this.Linux), "LinuxPodSandboxConfig", "LinuxPodSandboxConfig", 1) + `,`, + `}`, + }, "") + return s +} +func (this *RunPodSandboxRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RunPodSandboxRequest{`, + `Config:` + strings.Replace(fmt.Sprintf("%v", this.Config), "PodSandboxConfig", "PodSandboxConfig", 1) + `,`, + `}`, + }, "") + return s +} +func (this *RunPodSandboxResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RunPodSandboxResponse{`, + `PodSandboxId:` + fmt.Sprintf("%v", this.PodSandboxId) + `,`, + `}`, + }, "") + return s +} +func (this *StopPodSandboxRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&StopPodSandboxRequest{`, + `PodSandboxId:` + fmt.Sprintf("%v", this.PodSandboxId) + `,`, + `}`, + }, "") + return s +} +func (this *StopPodSandboxResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&StopPodSandboxResponse{`, + `}`, + }, "") + return s +} +func (this *RemovePodSandboxRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RemovePodSandboxRequest{`, + `PodSandboxId:` + fmt.Sprintf("%v", this.PodSandboxId) + `,`, + `}`, + }, "") + return s +} +func (this *RemovePodSandboxResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RemovePodSandboxResponse{`, + `}`, + }, "") + return s +} +func (this *PodSandboxStatusRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PodSandboxStatusRequest{`, + `PodSandboxId:` + fmt.Sprintf("%v", this.PodSandboxId) + `,`, + `}`, + }, "") + return s +} +func (this *PodSandboxNetworkStatus) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PodSandboxNetworkStatus{`, + `Ip:` + fmt.Sprintf("%v", this.Ip) + `,`, + `}`, + }, "") + return s +} +func (this *Namespace) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Namespace{`, + `Network:` + fmt.Sprintf("%v", this.Network) + `,`, + `Options:` + strings.Replace(fmt.Sprintf("%v", this.Options), "NamespaceOption", "NamespaceOption", 1) + `,`, + `}`, + }, "") + return s +} +func (this *LinuxPodSandboxStatus) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&LinuxPodSandboxStatus{`, + `Namespaces:` + strings.Replace(fmt.Sprintf("%v", this.Namespaces), "Namespace", "Namespace", 1) + `,`, + `}`, + }, "") + return s +} +func (this *PodSandboxStatus) String() string { + if this == nil { + return "nil" + } + keysForLabels := make([]string, 0, len(this.Labels)) + for k := range this.Labels { + keysForLabels = append(keysForLabels, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) + mapStringForLabels := "map[string]string{" + for _, k := range keysForLabels { + mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) + } + mapStringForLabels += "}" + keysForAnnotations := make([]string, 0, len(this.Annotations)) + for k := range this.Annotations { + keysForAnnotations = append(keysForAnnotations, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations) + mapStringForAnnotations := "map[string]string{" + for _, k := range keysForAnnotations { + mapStringForAnnotations += fmt.Sprintf("%v: %v,", k, this.Annotations[k]) + } + mapStringForAnnotations += "}" + s := strings.Join([]string{`&PodSandboxStatus{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `Metadata:` + strings.Replace(fmt.Sprintf("%v", this.Metadata), "PodSandboxMetadata", "PodSandboxMetadata", 1) + `,`, + `State:` + fmt.Sprintf("%v", this.State) + `,`, + `CreatedAt:` + fmt.Sprintf("%v", this.CreatedAt) + `,`, + `Network:` + strings.Replace(fmt.Sprintf("%v", this.Network), "PodSandboxNetworkStatus", "PodSandboxNetworkStatus", 1) + `,`, + `Linux:` + strings.Replace(fmt.Sprintf("%v", this.Linux), "LinuxPodSandboxStatus", "LinuxPodSandboxStatus", 1) + `,`, + `Labels:` + mapStringForLabels + `,`, + `Annotations:` + mapStringForAnnotations + `,`, + `}`, + }, "") + return s +} +func (this *PodSandboxStatusResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PodSandboxStatusResponse{`, + `Status:` + strings.Replace(fmt.Sprintf("%v", this.Status), "PodSandboxStatus", "PodSandboxStatus", 1) + `,`, + `}`, + }, "") + return s +} +func (this *PodSandboxStateValue) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PodSandboxStateValue{`, + `State:` + fmt.Sprintf("%v", this.State) + `,`, + `}`, + }, "") + return s +} +func (this *PodSandboxFilter) String() string { + if this == nil { + return "nil" + } + keysForLabelSelector := make([]string, 0, len(this.LabelSelector)) + for k := range this.LabelSelector { + keysForLabelSelector = append(keysForLabelSelector, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForLabelSelector) + mapStringForLabelSelector := "map[string]string{" + for _, k := range keysForLabelSelector { + mapStringForLabelSelector += fmt.Sprintf("%v: %v,", k, this.LabelSelector[k]) + } + mapStringForLabelSelector += "}" + s := strings.Join([]string{`&PodSandboxFilter{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `State:` + strings.Replace(fmt.Sprintf("%v", this.State), "PodSandboxStateValue", "PodSandboxStateValue", 1) + `,`, + `LabelSelector:` + mapStringForLabelSelector + `,`, + `}`, + }, "") + return s +} +func (this *ListPodSandboxRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ListPodSandboxRequest{`, + `Filter:` + strings.Replace(fmt.Sprintf("%v", this.Filter), "PodSandboxFilter", "PodSandboxFilter", 1) + `,`, + `}`, + }, "") + return s +} +func (this *PodSandbox) String() string { + if this == nil { + return "nil" + } + keysForLabels := make([]string, 0, len(this.Labels)) + for k := range this.Labels { + keysForLabels = append(keysForLabels, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) + mapStringForLabels := "map[string]string{" + for _, k := range keysForLabels { + mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) + } + mapStringForLabels += "}" + keysForAnnotations := make([]string, 0, len(this.Annotations)) + for k := range this.Annotations { + keysForAnnotations = append(keysForAnnotations, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations) + mapStringForAnnotations := "map[string]string{" + for _, k := range keysForAnnotations { + mapStringForAnnotations += fmt.Sprintf("%v: %v,", k, this.Annotations[k]) + } + mapStringForAnnotations += "}" + s := strings.Join([]string{`&PodSandbox{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `Metadata:` + strings.Replace(fmt.Sprintf("%v", this.Metadata), "PodSandboxMetadata", "PodSandboxMetadata", 1) + `,`, + `State:` + fmt.Sprintf("%v", this.State) + `,`, + `CreatedAt:` + fmt.Sprintf("%v", this.CreatedAt) + `,`, + `Labels:` + mapStringForLabels + `,`, + `Annotations:` + mapStringForAnnotations + `,`, + `}`, + }, "") + return s +} +func (this *ListPodSandboxResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ListPodSandboxResponse{`, + `Items:` + strings.Replace(fmt.Sprintf("%v", this.Items), "PodSandbox", "PodSandbox", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ImageSpec) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ImageSpec{`, + `Image:` + fmt.Sprintf("%v", this.Image) + `,`, + `}`, + }, "") + return s +} +func (this *KeyValue) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&KeyValue{`, + `Key:` + fmt.Sprintf("%v", this.Key) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `}`, + }, "") + return s +} +func (this *LinuxContainerResources) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&LinuxContainerResources{`, + `CpuPeriod:` + fmt.Sprintf("%v", this.CpuPeriod) + `,`, + `CpuQuota:` + fmt.Sprintf("%v", this.CpuQuota) + `,`, + `CpuShares:` + fmt.Sprintf("%v", this.CpuShares) + `,`, + `MemoryLimitInBytes:` + fmt.Sprintf("%v", this.MemoryLimitInBytes) + `,`, + `OomScoreAdj:` + fmt.Sprintf("%v", this.OomScoreAdj) + `,`, + `}`, + }, "") + return s +} +func (this *SELinuxOption) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SELinuxOption{`, + `User:` + fmt.Sprintf("%v", this.User) + `,`, + `Role:` + fmt.Sprintf("%v", this.Role) + `,`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `Level:` + fmt.Sprintf("%v", this.Level) + `,`, + `}`, + }, "") + return s +} +func (this *Capability) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Capability{`, + `AddCapabilities:` + fmt.Sprintf("%v", this.AddCapabilities) + `,`, + `DropCapabilities:` + fmt.Sprintf("%v", this.DropCapabilities) + `,`, + `}`, + }, "") + return s +} +func (this *LinuxContainerSecurityContext) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&LinuxContainerSecurityContext{`, + `Capabilities:` + strings.Replace(fmt.Sprintf("%v", this.Capabilities), "Capability", "Capability", 1) + `,`, + `Privileged:` + fmt.Sprintf("%v", this.Privileged) + `,`, + `NamespaceOptions:` + strings.Replace(fmt.Sprintf("%v", this.NamespaceOptions), "NamespaceOption", "NamespaceOption", 1) + `,`, + `SelinuxOptions:` + strings.Replace(fmt.Sprintf("%v", this.SelinuxOptions), "SELinuxOption", "SELinuxOption", 1) + `,`, + `RunAsUser:` + strings.Replace(fmt.Sprintf("%v", this.RunAsUser), "Int64Value", "Int64Value", 1) + `,`, + `RunAsUsername:` + fmt.Sprintf("%v", this.RunAsUsername) + `,`, + `ReadonlyRootfs:` + fmt.Sprintf("%v", this.ReadonlyRootfs) + `,`, + `SupplementalGroups:` + fmt.Sprintf("%v", this.SupplementalGroups) + `,`, + `}`, + }, "") + return s +} +func (this *LinuxContainerConfig) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&LinuxContainerConfig{`, + `Resources:` + strings.Replace(fmt.Sprintf("%v", this.Resources), "LinuxContainerResources", "LinuxContainerResources", 1) + `,`, + `SecurityContext:` + strings.Replace(fmt.Sprintf("%v", this.SecurityContext), "LinuxContainerSecurityContext", "LinuxContainerSecurityContext", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ContainerMetadata) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ContainerMetadata{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Attempt:` + fmt.Sprintf("%v", this.Attempt) + `,`, + `}`, + }, "") + return s +} +func (this *Device) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Device{`, + `ContainerPath:` + fmt.Sprintf("%v", this.ContainerPath) + `,`, + `HostPath:` + fmt.Sprintf("%v", this.HostPath) + `,`, + `Permissions:` + fmt.Sprintf("%v", this.Permissions) + `,`, + `}`, + }, "") + return s +} +func (this *ContainerConfig) String() string { + if this == nil { + return "nil" + } + keysForLabels := make([]string, 0, len(this.Labels)) + for k := range this.Labels { + keysForLabels = append(keysForLabels, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) + mapStringForLabels := "map[string]string{" + for _, k := range keysForLabels { + mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) + } + mapStringForLabels += "}" + keysForAnnotations := make([]string, 0, len(this.Annotations)) + for k := range this.Annotations { + keysForAnnotations = append(keysForAnnotations, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations) + mapStringForAnnotations := "map[string]string{" + for _, k := range keysForAnnotations { + mapStringForAnnotations += fmt.Sprintf("%v: %v,", k, this.Annotations[k]) + } + mapStringForAnnotations += "}" + s := strings.Join([]string{`&ContainerConfig{`, + `Metadata:` + strings.Replace(fmt.Sprintf("%v", this.Metadata), "ContainerMetadata", "ContainerMetadata", 1) + `,`, + `Image:` + strings.Replace(fmt.Sprintf("%v", this.Image), "ImageSpec", "ImageSpec", 1) + `,`, + `Command:` + fmt.Sprintf("%v", this.Command) + `,`, + `Args:` + fmt.Sprintf("%v", this.Args) + `,`, + `WorkingDir:` + fmt.Sprintf("%v", this.WorkingDir) + `,`, + `Envs:` + strings.Replace(fmt.Sprintf("%v", this.Envs), "KeyValue", "KeyValue", 1) + `,`, + `Mounts:` + strings.Replace(fmt.Sprintf("%v", this.Mounts), "Mount", "Mount", 1) + `,`, + `Devices:` + strings.Replace(fmt.Sprintf("%v", this.Devices), "Device", "Device", 1) + `,`, + `Labels:` + mapStringForLabels + `,`, + `Annotations:` + mapStringForAnnotations + `,`, + `LogPath:` + fmt.Sprintf("%v", this.LogPath) + `,`, + `Stdin:` + fmt.Sprintf("%v", this.Stdin) + `,`, + `StdinOnce:` + fmt.Sprintf("%v", this.StdinOnce) + `,`, + `Tty:` + fmt.Sprintf("%v", this.Tty) + `,`, + `Linux:` + strings.Replace(fmt.Sprintf("%v", this.Linux), "LinuxContainerConfig", "LinuxContainerConfig", 1) + `,`, + `}`, + }, "") + return s +} +func (this *CreateContainerRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CreateContainerRequest{`, + `PodSandboxId:` + fmt.Sprintf("%v", this.PodSandboxId) + `,`, + `Config:` + strings.Replace(fmt.Sprintf("%v", this.Config), "ContainerConfig", "ContainerConfig", 1) + `,`, + `SandboxConfig:` + strings.Replace(fmt.Sprintf("%v", this.SandboxConfig), "PodSandboxConfig", "PodSandboxConfig", 1) + `,`, + `}`, + }, "") + return s +} +func (this *CreateContainerResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CreateContainerResponse{`, + `ContainerId:` + fmt.Sprintf("%v", this.ContainerId) + `,`, + `}`, + }, "") + return s +} +func (this *StartContainerRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&StartContainerRequest{`, + `ContainerId:` + fmt.Sprintf("%v", this.ContainerId) + `,`, + `}`, + }, "") + return s +} +func (this *StartContainerResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&StartContainerResponse{`, + `}`, + }, "") + return s +} +func (this *StopContainerRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&StopContainerRequest{`, + `ContainerId:` + fmt.Sprintf("%v", this.ContainerId) + `,`, + `Timeout:` + fmt.Sprintf("%v", this.Timeout) + `,`, + `}`, + }, "") + return s +} +func (this *StopContainerResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&StopContainerResponse{`, + `}`, + }, "") + return s +} +func (this *RemoveContainerRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RemoveContainerRequest{`, + `ContainerId:` + fmt.Sprintf("%v", this.ContainerId) + `,`, + `}`, + }, "") + return s +} +func (this *RemoveContainerResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RemoveContainerResponse{`, + `}`, + }, "") + return s +} +func (this *ContainerStateValue) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ContainerStateValue{`, + `State:` + fmt.Sprintf("%v", this.State) + `,`, + `}`, + }, "") + return s +} +func (this *ContainerFilter) String() string { + if this == nil { + return "nil" + } + keysForLabelSelector := make([]string, 0, len(this.LabelSelector)) + for k := range this.LabelSelector { + keysForLabelSelector = append(keysForLabelSelector, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForLabelSelector) + mapStringForLabelSelector := "map[string]string{" + for _, k := range keysForLabelSelector { + mapStringForLabelSelector += fmt.Sprintf("%v: %v,", k, this.LabelSelector[k]) + } + mapStringForLabelSelector += "}" + s := strings.Join([]string{`&ContainerFilter{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `State:` + strings.Replace(fmt.Sprintf("%v", this.State), "ContainerStateValue", "ContainerStateValue", 1) + `,`, + `PodSandboxId:` + fmt.Sprintf("%v", this.PodSandboxId) + `,`, + `LabelSelector:` + mapStringForLabelSelector + `,`, + `}`, + }, "") + return s +} +func (this *ListContainersRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ListContainersRequest{`, + `Filter:` + strings.Replace(fmt.Sprintf("%v", this.Filter), "ContainerFilter", "ContainerFilter", 1) + `,`, + `}`, + }, "") + return s +} +func (this *Container) String() string { + if this == nil { + return "nil" + } + keysForLabels := make([]string, 0, len(this.Labels)) + for k := range this.Labels { + keysForLabels = append(keysForLabels, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) + mapStringForLabels := "map[string]string{" + for _, k := range keysForLabels { + mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) + } + mapStringForLabels += "}" + keysForAnnotations := make([]string, 0, len(this.Annotations)) + for k := range this.Annotations { + keysForAnnotations = append(keysForAnnotations, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations) + mapStringForAnnotations := "map[string]string{" + for _, k := range keysForAnnotations { + mapStringForAnnotations += fmt.Sprintf("%v: %v,", k, this.Annotations[k]) + } + mapStringForAnnotations += "}" + s := strings.Join([]string{`&Container{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `PodSandboxId:` + fmt.Sprintf("%v", this.PodSandboxId) + `,`, + `Metadata:` + strings.Replace(fmt.Sprintf("%v", this.Metadata), "ContainerMetadata", "ContainerMetadata", 1) + `,`, + `Image:` + strings.Replace(fmt.Sprintf("%v", this.Image), "ImageSpec", "ImageSpec", 1) + `,`, + `ImageRef:` + fmt.Sprintf("%v", this.ImageRef) + `,`, + `State:` + fmt.Sprintf("%v", this.State) + `,`, + `CreatedAt:` + fmt.Sprintf("%v", this.CreatedAt) + `,`, + `Labels:` + mapStringForLabels + `,`, + `Annotations:` + mapStringForAnnotations + `,`, + `}`, + }, "") + return s +} +func (this *ListContainersResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ListContainersResponse{`, + `Containers:` + strings.Replace(fmt.Sprintf("%v", this.Containers), "Container", "Container", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ContainerStatusRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ContainerStatusRequest{`, + `ContainerId:` + fmt.Sprintf("%v", this.ContainerId) + `,`, + `}`, + }, "") + return s +} +func (this *ContainerStatus) String() string { + if this == nil { + return "nil" + } + keysForLabels := make([]string, 0, len(this.Labels)) + for k := range this.Labels { + keysForLabels = append(keysForLabels, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) + mapStringForLabels := "map[string]string{" + for _, k := range keysForLabels { + mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) + } + mapStringForLabels += "}" + keysForAnnotations := make([]string, 0, len(this.Annotations)) + for k := range this.Annotations { + keysForAnnotations = append(keysForAnnotations, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations) + mapStringForAnnotations := "map[string]string{" + for _, k := range keysForAnnotations { + mapStringForAnnotations += fmt.Sprintf("%v: %v,", k, this.Annotations[k]) + } + mapStringForAnnotations += "}" + s := strings.Join([]string{`&ContainerStatus{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `Metadata:` + strings.Replace(fmt.Sprintf("%v", this.Metadata), "ContainerMetadata", "ContainerMetadata", 1) + `,`, + `State:` + fmt.Sprintf("%v", this.State) + `,`, + `CreatedAt:` + fmt.Sprintf("%v", this.CreatedAt) + `,`, + `StartedAt:` + fmt.Sprintf("%v", this.StartedAt) + `,`, + `FinishedAt:` + fmt.Sprintf("%v", this.FinishedAt) + `,`, + `ExitCode:` + fmt.Sprintf("%v", this.ExitCode) + `,`, + `Image:` + strings.Replace(fmt.Sprintf("%v", this.Image), "ImageSpec", "ImageSpec", 1) + `,`, + `ImageRef:` + fmt.Sprintf("%v", this.ImageRef) + `,`, + `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, + `Message:` + fmt.Sprintf("%v", this.Message) + `,`, + `Labels:` + mapStringForLabels + `,`, + `Annotations:` + mapStringForAnnotations + `,`, + `Mounts:` + strings.Replace(fmt.Sprintf("%v", this.Mounts), "Mount", "Mount", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ContainerStatusResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ContainerStatusResponse{`, + `Status:` + strings.Replace(fmt.Sprintf("%v", this.Status), "ContainerStatus", "ContainerStatus", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ExecSyncRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ExecSyncRequest{`, + `ContainerId:` + fmt.Sprintf("%v", this.ContainerId) + `,`, + `Cmd:` + fmt.Sprintf("%v", this.Cmd) + `,`, + `Timeout:` + fmt.Sprintf("%v", this.Timeout) + `,`, + `}`, + }, "") + return s +} +func (this *ExecSyncResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ExecSyncResponse{`, + `Stdout:` + fmt.Sprintf("%v", this.Stdout) + `,`, + `Stderr:` + fmt.Sprintf("%v", this.Stderr) + `,`, + `ExitCode:` + fmt.Sprintf("%v", this.ExitCode) + `,`, + `}`, + }, "") + return s +} +func (this *ExecRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ExecRequest{`, + `ContainerId:` + fmt.Sprintf("%v", this.ContainerId) + `,`, + `Cmd:` + fmt.Sprintf("%v", this.Cmd) + `,`, + `Tty:` + fmt.Sprintf("%v", this.Tty) + `,`, + `Stdin:` + fmt.Sprintf("%v", this.Stdin) + `,`, + `}`, + }, "") + return s +} +func (this *ExecResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ExecResponse{`, + `Url:` + fmt.Sprintf("%v", this.Url) + `,`, + `}`, + }, "") + return s +} +func (this *AttachRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AttachRequest{`, + `ContainerId:` + fmt.Sprintf("%v", this.ContainerId) + `,`, + `Stdin:` + fmt.Sprintf("%v", this.Stdin) + `,`, + `Tty:` + fmt.Sprintf("%v", this.Tty) + `,`, + `}`, + }, "") + return s +} +func (this *AttachResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AttachResponse{`, + `Url:` + fmt.Sprintf("%v", this.Url) + `,`, + `}`, + }, "") + return s +} +func (this *PortForwardRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PortForwardRequest{`, + `PodSandboxId:` + fmt.Sprintf("%v", this.PodSandboxId) + `,`, + `Port:` + fmt.Sprintf("%v", this.Port) + `,`, + `}`, + }, "") + return s +} +func (this *PortForwardResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PortForwardResponse{`, + `Url:` + fmt.Sprintf("%v", this.Url) + `,`, + `}`, + }, "") + return s +} +func (this *ImageFilter) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ImageFilter{`, + `Image:` + strings.Replace(fmt.Sprintf("%v", this.Image), "ImageSpec", "ImageSpec", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ListImagesRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ListImagesRequest{`, + `Filter:` + strings.Replace(fmt.Sprintf("%v", this.Filter), "ImageFilter", "ImageFilter", 1) + `,`, + `}`, + }, "") + return s +} +func (this *Image) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Image{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `RepoTags:` + fmt.Sprintf("%v", this.RepoTags) + `,`, + `RepoDigests:` + fmt.Sprintf("%v", this.RepoDigests) + `,`, + `Size_:` + fmt.Sprintf("%v", this.Size_) + `,`, + `Uid:` + strings.Replace(fmt.Sprintf("%v", this.Uid), "Int64Value", "Int64Value", 1) + `,`, + `Username:` + fmt.Sprintf("%v", this.Username) + `,`, + `}`, + }, "") + return s +} +func (this *ListImagesResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ListImagesResponse{`, + `Images:` + strings.Replace(fmt.Sprintf("%v", this.Images), "Image", "Image", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ImageStatusRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ImageStatusRequest{`, + `Image:` + strings.Replace(fmt.Sprintf("%v", this.Image), "ImageSpec", "ImageSpec", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ImageStatusResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ImageStatusResponse{`, + `Image:` + strings.Replace(fmt.Sprintf("%v", this.Image), "Image", "Image", 1) + `,`, + `}`, + }, "") + return s +} +func (this *AuthConfig) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AuthConfig{`, + `Username:` + fmt.Sprintf("%v", this.Username) + `,`, + `Password:` + fmt.Sprintf("%v", this.Password) + `,`, + `Auth:` + fmt.Sprintf("%v", this.Auth) + `,`, + `ServerAddress:` + fmt.Sprintf("%v", this.ServerAddress) + `,`, + `IdentityToken:` + fmt.Sprintf("%v", this.IdentityToken) + `,`, + `RegistryToken:` + fmt.Sprintf("%v", this.RegistryToken) + `,`, + `}`, + }, "") + return s +} +func (this *PullImageRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PullImageRequest{`, + `Image:` + strings.Replace(fmt.Sprintf("%v", this.Image), "ImageSpec", "ImageSpec", 1) + `,`, + `Auth:` + strings.Replace(fmt.Sprintf("%v", this.Auth), "AuthConfig", "AuthConfig", 1) + `,`, + `SandboxConfig:` + strings.Replace(fmt.Sprintf("%v", this.SandboxConfig), "PodSandboxConfig", "PodSandboxConfig", 1) + `,`, + `}`, + }, "") + return s +} +func (this *PullImageResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PullImageResponse{`, + `ImageRef:` + fmt.Sprintf("%v", this.ImageRef) + `,`, + `}`, + }, "") + return s +} +func (this *RemoveImageRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RemoveImageRequest{`, + `Image:` + strings.Replace(fmt.Sprintf("%v", this.Image), "ImageSpec", "ImageSpec", 1) + `,`, + `}`, + }, "") + return s +} +func (this *RemoveImageResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RemoveImageResponse{`, + `}`, + }, "") + return s +} +func (this *NetworkConfig) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NetworkConfig{`, + `PodCidr:` + fmt.Sprintf("%v", this.PodCidr) + `,`, + `}`, + }, "") + return s +} +func (this *RuntimeConfig) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RuntimeConfig{`, + `NetworkConfig:` + strings.Replace(fmt.Sprintf("%v", this.NetworkConfig), "NetworkConfig", "NetworkConfig", 1) + `,`, + `}`, + }, "") + return s +} +func (this *UpdateRuntimeConfigRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UpdateRuntimeConfigRequest{`, + `RuntimeConfig:` + strings.Replace(fmt.Sprintf("%v", this.RuntimeConfig), "RuntimeConfig", "RuntimeConfig", 1) + `,`, + `}`, + }, "") + return s +} +func (this *UpdateRuntimeConfigResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UpdateRuntimeConfigResponse{`, + `}`, + }, "") + return s +} +func (this *RuntimeCondition) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RuntimeCondition{`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `Status:` + fmt.Sprintf("%v", this.Status) + `,`, + `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, + `Message:` + fmt.Sprintf("%v", this.Message) + `,`, + `}`, + }, "") + return s +} +func (this *RuntimeStatus) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RuntimeStatus{`, + `Conditions:` + strings.Replace(fmt.Sprintf("%v", this.Conditions), "RuntimeCondition", "RuntimeCondition", 1) + `,`, + `}`, + }, "") + return s +} +func (this *StatusRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&StatusRequest{`, + `}`, + }, "") + return s +} +func (this *StatusResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&StatusResponse{`, + `Status:` + strings.Replace(fmt.Sprintf("%v", this.Status), "RuntimeStatus", "RuntimeStatus", 1) + `,`, + `}`, + }, "") + return s +} +func valueToStringApi(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *VersionRequest) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: VersionRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: VersionRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *VersionResponse) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: VersionResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: VersionResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RuntimeName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RuntimeName = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RuntimeVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RuntimeVersion = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RuntimeApiVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RuntimeApiVersion = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DNSConfig) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DNSConfig: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DNSConfig: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Servers", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Servers = append(m.Servers, string(data[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Searches", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Searches = append(m.Searches, string(data[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Options = append(m.Options, string(data[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PortMapping) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PortMapping: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PortMapping: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType) + } + m.Protocol = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Protocol |= (Protocol(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerPort", wireType) + } + m.ContainerPort = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.ContainerPort |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HostPort", wireType) + } + m.HostPort = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.HostPort |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HostIp", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.HostIp = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Mount) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Mount: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Mount: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerPath", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContainerPath = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HostPath", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.HostPath = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Readonly", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Readonly = bool(v != 0) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SelinuxRelabel", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.SelinuxRelabel = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NamespaceOption) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NamespaceOption: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NamespaceOption: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HostNetwork", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.HostNetwork = bool(v != 0) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HostPid", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.HostPid = bool(v != 0) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HostIpc", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.HostIpc = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Int64Value) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Int64Value: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Int64Value: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + m.Value = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Value |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LinuxSandboxSecurityContext) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LinuxSandboxSecurityContext: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LinuxSandboxSecurityContext: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NamespaceOptions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NamespaceOptions == nil { + m.NamespaceOptions = &NamespaceOption{} + } + if err := m.NamespaceOptions.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SelinuxOptions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SelinuxOptions == nil { + m.SelinuxOptions = &SELinuxOption{} + } + if err := m.SelinuxOptions.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RunAsUser", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.RunAsUser == nil { + m.RunAsUser = &Int64Value{} + } + if err := m.RunAsUser.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ReadonlyRootfs", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.ReadonlyRootfs = bool(v != 0) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SupplementalGroups", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.SupplementalGroups = append(m.SupplementalGroups, v) + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Privileged", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Privileged = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LinuxPodSandboxConfig) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LinuxPodSandboxConfig: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LinuxPodSandboxConfig: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CgroupParent", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CgroupParent = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SecurityContext", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SecurityContext == nil { + m.SecurityContext = &LinuxSandboxSecurityContext{} + } + if err := m.SecurityContext.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PodSandboxMetadata) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PodSandboxMetadata: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PodSandboxMetadata: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uid", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Uid = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Namespace = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Attempt", wireType) + } + m.Attempt = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Attempt |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PodSandboxConfig) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PodSandboxConfig: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PodSandboxConfig: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Metadata == nil { + m.Metadata = &PodSandboxMetadata{} + } + if err := m.Metadata.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hostname", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hostname = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LogDirectory", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LogDirectory = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DnsConfig", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.DnsConfig == nil { + m.DnsConfig = &DNSConfig{} + } + if err := m.DnsConfig.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PortMappings", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PortMappings = append(m.PortMappings, &PortMapping{}) + if err := m.PortMappings[len(m.PortMappings)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(data[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + if m.Labels == nil { + m.Labels = make(map[string]string) + } + m.Labels[mapkey] = mapvalue + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(data[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + if m.Annotations == nil { + m.Annotations = make(map[string]string) + } + m.Annotations[mapkey] = mapvalue + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Linux", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Linux == nil { + m.Linux = &LinuxPodSandboxConfig{} + } + if err := m.Linux.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RunPodSandboxRequest) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RunPodSandboxRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RunPodSandboxRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Config", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Config == nil { + m.Config = &PodSandboxConfig{} + } + if err := m.Config.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RunPodSandboxResponse) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RunPodSandboxResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RunPodSandboxResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PodSandboxId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PodSandboxId = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StopPodSandboxRequest) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StopPodSandboxRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StopPodSandboxRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PodSandboxId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PodSandboxId = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StopPodSandboxResponse) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StopPodSandboxResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StopPodSandboxResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RemovePodSandboxRequest) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RemovePodSandboxRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RemovePodSandboxRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PodSandboxId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PodSandboxId = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RemovePodSandboxResponse) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RemovePodSandboxResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RemovePodSandboxResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PodSandboxStatusRequest) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PodSandboxStatusRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PodSandboxStatusRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PodSandboxId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PodSandboxId = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PodSandboxNetworkStatus) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PodSandboxNetworkStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PodSandboxNetworkStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ip", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Ip = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Namespace) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Namespace: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Namespace: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Network", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Network = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Options == nil { + m.Options = &NamespaceOption{} + } + if err := m.Options.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LinuxPodSandboxStatus) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LinuxPodSandboxStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LinuxPodSandboxStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Namespaces", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Namespaces == nil { + m.Namespaces = &Namespace{} + } + if err := m.Namespaces.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PodSandboxStatus) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PodSandboxStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PodSandboxStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Metadata == nil { + m.Metadata = &PodSandboxMetadata{} + } + if err := m.Metadata.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + m.State = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.State |= (PodSandboxState(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) + } + m.CreatedAt = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.CreatedAt |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Network", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Network == nil { + m.Network = &PodSandboxNetworkStatus{} + } + if err := m.Network.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Linux", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Linux == nil { + m.Linux = &LinuxPodSandboxStatus{} + } + if err := m.Linux.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(data[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + if m.Labels == nil { + m.Labels = make(map[string]string) + } + m.Labels[mapkey] = mapvalue + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(data[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + if m.Annotations == nil { + m.Annotations = make(map[string]string) + } + m.Annotations[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PodSandboxStatusResponse) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PodSandboxStatusResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PodSandboxStatusResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Status == nil { + m.Status = &PodSandboxStatus{} + } + if err := m.Status.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PodSandboxStateValue) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PodSandboxStateValue: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PodSandboxStateValue: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + m.State = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.State |= (PodSandboxState(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PodSandboxFilter) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PodSandboxFilter: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PodSandboxFilter: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.State == nil { + m.State = &PodSandboxStateValue{} + } + if err := m.State.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LabelSelector", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(data[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + if m.LabelSelector == nil { + m.LabelSelector = make(map[string]string) + } + m.LabelSelector[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ListPodSandboxRequest) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ListPodSandboxRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListPodSandboxRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Filter", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Filter == nil { + m.Filter = &PodSandboxFilter{} + } + if err := m.Filter.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PodSandbox) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PodSandbox: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PodSandbox: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Metadata == nil { + m.Metadata = &PodSandboxMetadata{} + } + if err := m.Metadata.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + m.State = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.State |= (PodSandboxState(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) + } + m.CreatedAt = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.CreatedAt |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(data[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + if m.Labels == nil { + m.Labels = make(map[string]string) + } + m.Labels[mapkey] = mapvalue + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(data[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + if m.Annotations == nil { + m.Annotations = make(map[string]string) + } + m.Annotations[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ListPodSandboxResponse) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ListPodSandboxResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListPodSandboxResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, &PodSandbox{}) + if err := m.Items[len(m.Items)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ImageSpec) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ImageSpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ImageSpec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Image = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *KeyValue) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: KeyValue: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: KeyValue: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LinuxContainerResources) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LinuxContainerResources: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LinuxContainerResources: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CpuPeriod", wireType) + } + m.CpuPeriod = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.CpuPeriod |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CpuQuota", wireType) + } + m.CpuQuota = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.CpuQuota |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CpuShares", wireType) + } + m.CpuShares = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.CpuShares |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MemoryLimitInBytes", wireType) + } + m.MemoryLimitInBytes = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.MemoryLimitInBytes |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OomScoreAdj", wireType) + } + m.OomScoreAdj = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.OomScoreAdj |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SELinuxOption) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SELinuxOption: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SELinuxOption: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field User", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.User = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Role = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Type = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Level", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Level = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Capability) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Capability: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Capability: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AddCapabilities", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AddCapabilities = append(m.AddCapabilities, string(data[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DropCapabilities", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DropCapabilities = append(m.DropCapabilities, string(data[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LinuxContainerSecurityContext) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LinuxContainerSecurityContext: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LinuxContainerSecurityContext: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Capabilities", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Capabilities == nil { + m.Capabilities = &Capability{} + } + if err := m.Capabilities.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Privileged", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Privileged = bool(v != 0) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NamespaceOptions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NamespaceOptions == nil { + m.NamespaceOptions = &NamespaceOption{} + } + if err := m.NamespaceOptions.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SelinuxOptions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SelinuxOptions == nil { + m.SelinuxOptions = &SELinuxOption{} + } + if err := m.SelinuxOptions.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RunAsUser", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.RunAsUser == nil { + m.RunAsUser = &Int64Value{} + } + if err := m.RunAsUser.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RunAsUsername", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RunAsUsername = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ReadonlyRootfs", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.ReadonlyRootfs = bool(v != 0) + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SupplementalGroups", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.SupplementalGroups = append(m.SupplementalGroups, v) + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LinuxContainerConfig) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LinuxContainerConfig: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LinuxContainerConfig: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Resources == nil { + m.Resources = &LinuxContainerResources{} + } + if err := m.Resources.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SecurityContext", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SecurityContext == nil { + m.SecurityContext = &LinuxContainerSecurityContext{} + } + if err := m.SecurityContext.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ContainerMetadata) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ContainerMetadata: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ContainerMetadata: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Attempt", wireType) + } + m.Attempt = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Attempt |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Device) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Device: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Device: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerPath", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContainerPath = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HostPath", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.HostPath = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Permissions", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Permissions = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ContainerConfig) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ContainerConfig: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ContainerConfig: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Metadata == nil { + m.Metadata = &ContainerMetadata{} + } + if err := m.Metadata.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Image == nil { + m.Image = &ImageSpec{} + } + if err := m.Image.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Command", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Command = append(m.Command, string(data[iNdEx:postIndex])) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Args", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Args = append(m.Args, string(data[iNdEx:postIndex])) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field WorkingDir", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.WorkingDir = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Envs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Envs = append(m.Envs, &KeyValue{}) + if err := m.Envs[len(m.Envs)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Mounts", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Mounts = append(m.Mounts, &Mount{}) + if err := m.Mounts[len(m.Mounts)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Devices", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Devices = append(m.Devices, &Device{}) + if err := m.Devices[len(m.Devices)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(data[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + if m.Labels == nil { + m.Labels = make(map[string]string) + } + m.Labels[mapkey] = mapvalue + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(data[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + if m.Annotations == nil { + m.Annotations = make(map[string]string) + } + m.Annotations[mapkey] = mapvalue + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LogPath", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LogPath = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 12: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Stdin", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Stdin = bool(v != 0) + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StdinOnce", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.StdinOnce = bool(v != 0) + case 14: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Tty", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Tty = bool(v != 0) + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Linux", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Linux == nil { + m.Linux = &LinuxContainerConfig{} + } + if err := m.Linux.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CreateContainerRequest) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CreateContainerRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CreateContainerRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PodSandboxId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PodSandboxId = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Config", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Config == nil { + m.Config = &ContainerConfig{} + } + if err := m.Config.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SandboxConfig", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SandboxConfig == nil { + m.SandboxConfig = &PodSandboxConfig{} + } + if err := m.SandboxConfig.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CreateContainerResponse) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CreateContainerResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CreateContainerResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContainerId = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StartContainerRequest) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StartContainerRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StartContainerRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContainerId = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StartContainerResponse) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StartContainerResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StartContainerResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StopContainerRequest) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StopContainerRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StopContainerRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContainerId = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Timeout", wireType) + } + m.Timeout = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Timeout |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StopContainerResponse) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StopContainerResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StopContainerResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RemoveContainerRequest) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RemoveContainerRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RemoveContainerRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContainerId = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RemoveContainerResponse) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RemoveContainerResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RemoveContainerResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ContainerStateValue) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ContainerStateValue: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ContainerStateValue: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + m.State = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.State |= (ContainerState(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ContainerFilter) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ContainerFilter: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ContainerFilter: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.State == nil { + m.State = &ContainerStateValue{} + } + if err := m.State.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PodSandboxId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PodSandboxId = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LabelSelector", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(data[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + if m.LabelSelector == nil { + m.LabelSelector = make(map[string]string) + } + m.LabelSelector[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ListContainersRequest) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ListContainersRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListContainersRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Filter", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Filter == nil { + m.Filter = &ContainerFilter{} + } + if err := m.Filter.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Container) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Container: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Container: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PodSandboxId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PodSandboxId = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Metadata == nil { + m.Metadata = &ContainerMetadata{} + } + if err := m.Metadata.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Image == nil { + m.Image = &ImageSpec{} + } + if err := m.Image.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ImageRef", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ImageRef = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + m.State = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.State |= (ContainerState(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) + } + m.CreatedAt = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.CreatedAt |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(data[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + if m.Labels == nil { + m.Labels = make(map[string]string) + } + m.Labels[mapkey] = mapvalue + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(data[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + if m.Annotations == nil { + m.Annotations = make(map[string]string) + } + m.Annotations[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ListContainersResponse) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ListContainersResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListContainersResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Containers", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Containers = append(m.Containers, &Container{}) + if err := m.Containers[len(m.Containers)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ContainerStatusRequest) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ContainerStatusRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ContainerStatusRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContainerId = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ContainerStatus) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ContainerStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ContainerStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Metadata == nil { + m.Metadata = &ContainerMetadata{} + } + if err := m.Metadata.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + m.State = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.State |= (ContainerState(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) + } + m.CreatedAt = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.CreatedAt |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StartedAt", wireType) + } + m.StartedAt = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.StartedAt |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FinishedAt", wireType) + } + m.FinishedAt = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.FinishedAt |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ExitCode", wireType) + } + m.ExitCode = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.ExitCode |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Image == nil { + m.Image = &ImageSpec{} + } + if err := m.Image.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ImageRef", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ImageRef = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Reason = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Message = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(data[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + if m.Labels == nil { + m.Labels = make(map[string]string) + } + m.Labels[mapkey] = mapvalue + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthApi + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(data[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + if m.Annotations == nil { + m.Annotations = make(map[string]string) + } + m.Annotations[mapkey] = mapvalue + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Mounts", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Mounts = append(m.Mounts, &Mount{}) + if err := m.Mounts[len(m.Mounts)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ContainerStatusResponse) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ContainerStatusResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ContainerStatusResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Status == nil { + m.Status = &ContainerStatus{} + } + if err := m.Status.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ExecSyncRequest) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExecSyncRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExecSyncRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContainerId = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Cmd", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Cmd = append(m.Cmd, string(data[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Timeout", wireType) + } + m.Timeout = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Timeout |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ExecSyncResponse) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExecSyncResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExecSyncResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Stdout", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Stdout = append(m.Stdout[:0], data[iNdEx:postIndex]...) + if m.Stdout == nil { + m.Stdout = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Stderr", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Stderr = append(m.Stderr[:0], data[iNdEx:postIndex]...) + if m.Stderr == nil { + m.Stderr = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ExitCode", wireType) + } + m.ExitCode = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.ExitCode |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ExecRequest) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExecRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExecRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContainerId = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Cmd", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Cmd = append(m.Cmd, string(data[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Tty", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Tty = bool(v != 0) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Stdin", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Stdin = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ExecResponse) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExecResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExecResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Url", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Url = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AttachRequest) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AttachRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AttachRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContainerId = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Stdin", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Stdin = bool(v != 0) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Tty", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Tty = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AttachResponse) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AttachResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AttachResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Url", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Url = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PortForwardRequest) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PortForwardRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PortForwardRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PodSandboxId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PodSandboxId = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Port = append(m.Port, v) + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PortForwardResponse) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PortForwardResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PortForwardResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Url", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Url = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ImageFilter) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ImageFilter: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ImageFilter: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Image == nil { + m.Image = &ImageSpec{} + } + if err := m.Image.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ListImagesRequest) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ListImagesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListImagesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Filter", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Filter == nil { + m.Filter = &ImageFilter{} + } + if err := m.Filter.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Image) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Image: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Image: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RepoTags", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RepoTags = append(m.RepoTags, string(data[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RepoDigests", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RepoDigests = append(m.RepoDigests, string(data[iNdEx:postIndex])) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Size_", wireType) + } + m.Size_ = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Size_ |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uid", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Uid == nil { + m.Uid = &Int64Value{} + } + if err := m.Uid.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Username = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ListImagesResponse) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ListImagesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListImagesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Images", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Images = append(m.Images, &Image{}) + if err := m.Images[len(m.Images)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ImageStatusRequest) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ImageStatusRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ImageStatusRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Image == nil { + m.Image = &ImageSpec{} + } + if err := m.Image.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ImageStatusResponse) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ImageStatusResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ImageStatusResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Image == nil { + m.Image = &Image{} + } + if err := m.Image.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AuthConfig) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AuthConfig: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AuthConfig: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Username = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Password", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Password = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Auth", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Auth = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ServerAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ServerAddress = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IdentityToken", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.IdentityToken = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RegistryToken", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RegistryToken = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PullImageRequest) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PullImageRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PullImageRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Image == nil { + m.Image = &ImageSpec{} + } + if err := m.Image.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Auth", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Auth == nil { + m.Auth = &AuthConfig{} + } + if err := m.Auth.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SandboxConfig", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SandboxConfig == nil { + m.SandboxConfig = &PodSandboxConfig{} + } + if err := m.SandboxConfig.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PullImageResponse) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PullImageResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PullImageResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ImageRef", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ImageRef = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RemoveImageRequest) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RemoveImageRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RemoveImageRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Image == nil { + m.Image = &ImageSpec{} + } + if err := m.Image.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RemoveImageResponse) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RemoveImageResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RemoveImageResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NetworkConfig) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NetworkConfig: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NetworkConfig: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PodCidr", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PodCidr = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RuntimeConfig) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RuntimeConfig: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RuntimeConfig: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NetworkConfig", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NetworkConfig == nil { + m.NetworkConfig = &NetworkConfig{} + } + if err := m.NetworkConfig.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UpdateRuntimeConfigRequest) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: UpdateRuntimeConfigRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UpdateRuntimeConfigRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RuntimeConfig", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.RuntimeConfig == nil { + m.RuntimeConfig = &RuntimeConfig{} + } + if err := m.RuntimeConfig.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UpdateRuntimeConfigResponse) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: UpdateRuntimeConfigResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UpdateRuntimeConfigResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RuntimeCondition) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RuntimeCondition: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RuntimeCondition: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Type = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Status = bool(v != 0) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Reason = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Message = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RuntimeStatus) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RuntimeStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RuntimeStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Conditions = append(m.Conditions, &RuntimeCondition{}) + if err := m.Conditions[len(m.Conditions)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StatusRequest) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StatusRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StatusRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StatusResponse) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StatusResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StatusResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Status == nil { + m.Status = &RuntimeStatus{} + } + if err := m.Status.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipApi(data []byte) (n int, err error) { + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowApi + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowApi + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if data[iNdEx-1] < 0x80 { + break + } + } + return iNdEx, nil + case 1: + iNdEx += 8 + return iNdEx, nil + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowApi + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + iNdEx += length + if length < 0 { + return 0, ErrInvalidLengthApi + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowApi + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skipApi(data[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + } + return iNdEx, nil + case 4: + return iNdEx, nil + case 5: + iNdEx += 4 + return iNdEx, nil + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + } + panic("unreachable") +} + +var ( + ErrInvalidLengthApi = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowApi = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorApi = []byte{ + // 3528 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x3a, 0x4d, 0x73, 0x1b, 0xc7, + 0x95, 0x04, 0x40, 0x82, 0xc0, 0x03, 0x01, 0x82, 0x4d, 0x8a, 0x84, 0x40, 0x89, 0xa2, 0xc6, 0x92, + 0x2c, 0xc9, 0x16, 0x2d, 0xd1, 0x5e, 0x69, 0x2d, 0x5b, 0xb2, 0x61, 0x92, 0x72, 0xd1, 0x92, 0x20, + 0x7a, 0x20, 0x79, 0xed, 0xf5, 0x61, 0x76, 0x88, 0x69, 0x82, 0x23, 0x01, 0x33, 0xe3, 0x99, 0x86, + 0x2c, 0xee, 0x69, 0x8f, 0x7b, 0xd9, 0x2a, 0xef, 0x71, 0x6f, 0x7b, 0x48, 0x95, 0x2b, 0x49, 0x55, + 0x0e, 0xa9, 0x4a, 0x25, 0x3f, 0xc1, 0x55, 0xa9, 0x54, 0xe5, 0x90, 0x43, 0x72, 0x8b, 0x95, 0x7b, + 0x7e, 0x43, 0xaa, 0xbf, 0x66, 0x7a, 0xbe, 0x28, 0x52, 0x76, 0xc5, 0xba, 0x4d, 0xbf, 0x7e, 0xfd, + 0xfa, 0xf5, 0x7b, 0xaf, 0xdf, 0xd7, 0x34, 0x54, 0x4d, 0xcf, 0x5e, 0xf3, 0x7c, 0x97, 0xb8, 0x68, + 0xda, 0x1f, 0x3b, 0xc4, 0x1e, 0xe1, 0xf6, 0x95, 0x81, 0x4d, 0xf6, 0xc7, 0xbb, 0x6b, 0x7d, 0x77, + 0xf4, 0xd6, 0xc0, 0x1d, 0xb8, 0x6f, 0xb1, 0xf9, 0xdd, 0xf1, 0x1e, 0x1b, 0xb1, 0x01, 0xfb, 0xe2, + 0xeb, 0xb4, 0xcb, 0xd0, 0xf8, 0x0c, 0xfb, 0x81, 0xed, 0x3a, 0x3a, 0xfe, 0x6a, 0x8c, 0x03, 0x82, + 0x5a, 0x30, 0xfd, 0x94, 0x43, 0x5a, 0x85, 0xd5, 0xc2, 0xc5, 0xaa, 0x2e, 0x87, 0xda, 0xb7, 0x05, + 0x98, 0x0d, 0x91, 0x03, 0xcf, 0x75, 0x02, 0x9c, 0x8f, 0x8d, 0xce, 0xc2, 0x8c, 0xe0, 0xc9, 0x70, + 0xcc, 0x11, 0x6e, 0x15, 0xd9, 0x74, 0x4d, 0xc0, 0xba, 0xe6, 0x08, 0xa3, 0xd7, 0x61, 0x56, 0xa2, + 0x48, 0x22, 0x25, 0x86, 0xd5, 0x10, 0x60, 0xb1, 0x1b, 0x5a, 0x83, 0x79, 0x89, 0x68, 0x7a, 0x76, + 0x88, 0x3c, 0xc9, 0x90, 0xe7, 0xc4, 0x54, 0xc7, 0xb3, 0x05, 0xbe, 0xf6, 0x25, 0x54, 0x37, 0xbb, + 0xbd, 0x0d, 0xd7, 0xd9, 0xb3, 0x07, 0x94, 0xc5, 0x00, 0xfb, 0x74, 0x4d, 0xab, 0xb0, 0x5a, 0xa2, + 0x2c, 0x8a, 0x21, 0x6a, 0x43, 0x25, 0xc0, 0xa6, 0xdf, 0xdf, 0xc7, 0x41, 0xab, 0xc8, 0xa6, 0xc2, + 0x31, 0x5d, 0xe5, 0x7a, 0xc4, 0x76, 0x9d, 0xa0, 0x55, 0xe2, 0xab, 0xc4, 0x50, 0xfb, 0xbf, 0x02, + 0xd4, 0x76, 0x5c, 0x9f, 0xdc, 0x37, 0x3d, 0xcf, 0x76, 0x06, 0xe8, 0x0a, 0x54, 0x98, 0x2c, 0xfb, + 0xee, 0x90, 0xc9, 0xa0, 0xb1, 0x3e, 0xb7, 0x26, 0x58, 0x5a, 0xdb, 0x11, 0x13, 0x7a, 0x88, 0x82, + 0xce, 0x43, 0xa3, 0xef, 0x3a, 0xc4, 0xb4, 0x1d, 0xec, 0x1b, 0x9e, 0xeb, 0x13, 0x26, 0x99, 0x29, + 0xbd, 0x1e, 0x42, 0x29, 0x71, 0xb4, 0x0c, 0xd5, 0x7d, 0x37, 0x20, 0x1c, 0xa3, 0xc4, 0x30, 0x2a, + 0x14, 0xc0, 0x26, 0x97, 0x60, 0x9a, 0x4d, 0xda, 0x9e, 0x90, 0x41, 0x99, 0x0e, 0xb7, 0x3d, 0xed, + 0x9b, 0x02, 0x4c, 0xdd, 0x77, 0xc7, 0x0e, 0x49, 0x6c, 0x63, 0x92, 0x7d, 0xa1, 0x1f, 0x65, 0x1b, + 0x93, 0xec, 0x47, 0xdb, 0x50, 0x0c, 0xae, 0x22, 0xbe, 0x0d, 0x9d, 0x6c, 0x43, 0xc5, 0xc7, 0xa6, + 0xe5, 0x3a, 0xc3, 0x03, 0xc6, 0x42, 0x45, 0x0f, 0xc7, 0x54, 0x77, 0x01, 0x1e, 0xda, 0xce, 0xf8, + 0x99, 0xe1, 0xe3, 0xa1, 0xb9, 0x8b, 0x87, 0x8c, 0x95, 0x8a, 0xde, 0x10, 0x60, 0x9d, 0x43, 0xb5, + 0xc7, 0x30, 0x4b, 0x95, 0x1d, 0x78, 0x66, 0x1f, 0x3f, 0x60, 0x22, 0xa4, 0xa6, 0xc1, 0x36, 0x75, + 0x30, 0xf9, 0xda, 0xf5, 0x9f, 0x30, 0xce, 0x2a, 0x7a, 0x8d, 0xc2, 0xba, 0x1c, 0x84, 0x4e, 0x42, + 0x85, 0xf3, 0x65, 0x5b, 0x8c, 0xad, 0x8a, 0xce, 0x4e, 0xbc, 0x63, 0x5b, 0xe1, 0x94, 0xed, 0xf5, + 0x05, 0x57, 0xd3, 0xfc, 0xf4, 0x7d, 0x4d, 0x03, 0xd8, 0x76, 0xc8, 0xf5, 0x77, 0x3e, 0x33, 0x87, + 0x63, 0x8c, 0x16, 0x60, 0xea, 0x29, 0xfd, 0x60, 0xf4, 0x4b, 0x3a, 0x1f, 0x68, 0x7f, 0x2a, 0xc2, + 0xf2, 0x3d, 0xca, 0x60, 0xcf, 0x74, 0xac, 0x5d, 0xf7, 0x59, 0x0f, 0xf7, 0xc7, 0xbe, 0x4d, 0x0e, + 0x36, 0x5c, 0x87, 0xe0, 0x67, 0x04, 0x6d, 0xc1, 0x9c, 0x23, 0xf9, 0x35, 0xa4, 0x09, 0x50, 0x0a, + 0xb5, 0xf5, 0x56, 0xa8, 0xd7, 0xc4, 0x89, 0xf4, 0xa6, 0x13, 0x07, 0x04, 0xe8, 0x83, 0x48, 0x3e, + 0x92, 0x48, 0x91, 0x11, 0x59, 0x0c, 0x89, 0xf4, 0xb6, 0x18, 0x1f, 0x82, 0x84, 0x94, 0x9b, 0x24, + 0xf0, 0x36, 0xd0, 0xbb, 0x62, 0x98, 0x81, 0x31, 0x0e, 0xb0, 0xcf, 0x4e, 0x5a, 0x5b, 0x9f, 0x0f, + 0x17, 0x47, 0xe7, 0xd4, 0xab, 0xfe, 0xd8, 0xe9, 0x04, 0x8f, 0x02, 0xec, 0xb3, 0x1b, 0x25, 0x34, + 0x64, 0xf8, 0xae, 0x4b, 0xf6, 0x02, 0xa9, 0x15, 0x09, 0xd6, 0x19, 0x14, 0xbd, 0x05, 0xf3, 0xc1, + 0xd8, 0xf3, 0x86, 0x78, 0x84, 0x1d, 0x62, 0x0e, 0x8d, 0x81, 0xef, 0x8e, 0xbd, 0xa0, 0x35, 0xb5, + 0x5a, 0xba, 0x58, 0xd2, 0x91, 0x3a, 0xf5, 0x31, 0x9b, 0x41, 0x2b, 0x00, 0x9e, 0x6f, 0x3f, 0xb5, + 0x87, 0x78, 0x80, 0xad, 0x56, 0x99, 0x11, 0x55, 0x20, 0xda, 0xff, 0x14, 0xe0, 0x04, 0x3b, 0xce, + 0x8e, 0x6b, 0x09, 0xc9, 0x8a, 0xfb, 0xf7, 0x1a, 0xd4, 0xfb, 0x8c, 0xbc, 0xe1, 0x99, 0x3e, 0x76, + 0x88, 0x30, 0xc4, 0x19, 0x0e, 0xdc, 0x61, 0x30, 0xf4, 0x00, 0x9a, 0x81, 0x50, 0x84, 0xd1, 0xe7, + 0x9a, 0x10, 0xf2, 0x3a, 0x17, 0x1e, 0xf9, 0x10, 0xad, 0xe9, 0xb3, 0x41, 0x1c, 0xa0, 0xf9, 0x80, + 0x22, 0x4e, 0xee, 0x63, 0x62, 0x5a, 0x26, 0x31, 0x11, 0x82, 0x49, 0xe6, 0x8c, 0x38, 0x0b, 0xec, + 0x1b, 0x35, 0xa1, 0x34, 0x16, 0x56, 0x56, 0xd5, 0xe9, 0x27, 0x3a, 0x05, 0xd5, 0x50, 0x9f, 0xc2, + 0x23, 0x45, 0x00, 0xea, 0x19, 0x4c, 0x42, 0xf0, 0xc8, 0x23, 0x4c, 0xb6, 0x75, 0x5d, 0x0e, 0xb5, + 0xdf, 0x4d, 0x42, 0x33, 0x75, 0xfc, 0x1b, 0x50, 0x19, 0x89, 0xed, 0x85, 0x19, 0x2d, 0x47, 0xee, + 0x21, 0xc5, 0xa1, 0x1e, 0x22, 0xd3, 0xdb, 0x47, 0xed, 0x5a, 0x71, 0x9e, 0xe1, 0x98, 0xca, 0x74, + 0xe8, 0x0e, 0x0c, 0xcb, 0xf6, 0x71, 0x9f, 0xb8, 0xfe, 0x81, 0xe0, 0x72, 0x66, 0xe8, 0x0e, 0x36, + 0x25, 0x0c, 0x5d, 0x03, 0xb0, 0x9c, 0x80, 0x8a, 0x73, 0xcf, 0x1e, 0x30, 0x5e, 0x6b, 0xeb, 0x28, + 0xdc, 0x3b, 0x74, 0x90, 0x7a, 0xd5, 0x72, 0x02, 0xc1, 0xec, 0xbb, 0x50, 0xa7, 0x0e, 0xc7, 0x18, + 0x71, 0xdf, 0xc6, 0x0d, 0xa2, 0xb6, 0xbe, 0xa0, 0x70, 0x1c, 0x3a, 0x3e, 0x7d, 0xc6, 0x8b, 0x06, + 0x01, 0xba, 0x05, 0x65, 0x76, 0xe1, 0x83, 0x56, 0x99, 0xad, 0x39, 0x9f, 0x71, 0x4a, 0xbe, 0xcb, + 0xda, 0x3d, 0x86, 0xb7, 0xe5, 0x10, 0xff, 0x40, 0x17, 0x8b, 0xd0, 0x3d, 0xa8, 0x99, 0x8e, 0xe3, + 0x12, 0x93, 0xdf, 0x95, 0x69, 0x46, 0xe3, 0x72, 0x3e, 0x8d, 0x4e, 0x84, 0xcc, 0x09, 0xa9, 0xcb, + 0xd1, 0x3b, 0x30, 0xc5, 0x2e, 0x53, 0xab, 0xc2, 0x4e, 0xbd, 0x12, 0xb7, 0xa1, 0x24, 0x31, 0x9d, + 0x23, 0xb7, 0xdf, 0x85, 0x9a, 0xc2, 0x1a, 0x35, 0x8c, 0x27, 0xf8, 0x40, 0xd8, 0x0a, 0xfd, 0x8c, + 0x3c, 0x0a, 0xd7, 0x07, 0x1f, 0xdc, 0x2c, 0xfe, 0x6b, 0xa1, 0x7d, 0x1b, 0x9a, 0x49, 0x8e, 0x8e, + 0xb3, 0x5e, 0xdb, 0x86, 0x05, 0x7d, 0xec, 0x44, 0x8c, 0xc9, 0x68, 0x7c, 0x0d, 0xca, 0x42, 0x7f, + 0xdc, 0x76, 0x4e, 0xe6, 0x4a, 0x44, 0x17, 0x88, 0xda, 0x2d, 0x38, 0x91, 0x20, 0x25, 0x62, 0xf5, + 0x39, 0x68, 0x78, 0xae, 0x65, 0x04, 0x1c, 0x6c, 0xd8, 0x96, 0xbc, 0x89, 0x5e, 0x88, 0xbb, 0x6d, + 0xd1, 0xe5, 0x3d, 0xe2, 0x7a, 0x69, 0x56, 0x8e, 0xb6, 0xbc, 0x05, 0x8b, 0xc9, 0xe5, 0x7c, 0x7b, + 0xed, 0x03, 0x58, 0xd2, 0xf1, 0xc8, 0x7d, 0x8a, 0x5f, 0x96, 0x74, 0x1b, 0x5a, 0x69, 0x02, 0x11, + 0xf1, 0x08, 0xda, 0x23, 0x26, 0x19, 0x07, 0xc7, 0x23, 0x7e, 0x49, 0x25, 0x20, 0xa2, 0x10, 0xa7, + 0x83, 0x1a, 0x50, 0xb4, 0x3d, 0xb1, 0xa8, 0x68, 0x7b, 0xda, 0x17, 0x50, 0xed, 0xaa, 0xde, 0x40, + 0x0d, 0x63, 0x55, 0x5d, 0x0e, 0xd1, 0x7a, 0x94, 0x41, 0x14, 0x5f, 0x10, 0x3e, 0xc2, 0xdc, 0xe2, + 0x6e, 0xca, 0x89, 0x0a, 0x1e, 0xd6, 0x01, 0x42, 0x0f, 0x24, 0xc3, 0x11, 0x4a, 0xd3, 0xd3, 0x15, + 0x2c, 0xed, 0x67, 0x31, 0x77, 0xa4, 0x1c, 0xc6, 0x0a, 0x0f, 0x63, 0xc5, 0xdc, 0x53, 0xf1, 0x38, + 0xee, 0x69, 0x0d, 0xa6, 0x02, 0x62, 0x12, 0xee, 0x20, 0x1b, 0xca, 0xe1, 0xe2, 0x5b, 0x62, 0x9d, + 0xa3, 0xa1, 0xd3, 0x00, 0x7d, 0x1f, 0x9b, 0x04, 0x5b, 0x86, 0xc9, 0x3d, 0x67, 0x49, 0xaf, 0x0a, + 0x48, 0x87, 0xa0, 0x9b, 0x91, 0x1c, 0xa7, 0x18, 0x1b, 0xab, 0x19, 0x04, 0x63, 0x7a, 0x89, 0x24, + 0x1d, 0xde, 0xf6, 0xf2, 0xe1, 0xb7, 0x5d, 0xac, 0xe3, 0xc8, 0x8a, 0xc3, 0x9a, 0xce, 0x75, 0x58, + 0x7c, 0xc5, 0x51, 0x1c, 0x56, 0x25, 0xd7, 0x61, 0x09, 0x1a, 0x87, 0x3a, 0xac, 0x9f, 0xd2, 0xf5, + 0xdc, 0x87, 0x56, 0xfa, 0xea, 0x08, 0x97, 0x71, 0x0d, 0xca, 0x01, 0x83, 0x1c, 0xe2, 0x7e, 0xc4, + 0x12, 0x81, 0xa8, 0xdd, 0x81, 0x85, 0x84, 0x05, 0xf0, 0x6c, 0x2c, 0xb4, 0x97, 0xc2, 0x91, 0xec, + 0x45, 0xfb, 0x7b, 0x41, 0xb5, 0xde, 0x3b, 0xf6, 0x90, 0x60, 0x3f, 0x65, 0xbd, 0x6f, 0x4b, 0xa2, + 0xdc, 0x74, 0x4f, 0xe7, 0x11, 0xe5, 0x89, 0x92, 0xb0, 0xc4, 0x1e, 0x34, 0x98, 0x0e, 0x8d, 0x00, + 0x0f, 0x59, 0xa8, 0x64, 0x19, 0x7e, 0x6d, 0xfd, 0xcd, 0x8c, 0xd5, 0x7c, 0x5f, 0x6e, 0x00, 0x3d, + 0x81, 0xce, 0xd5, 0x57, 0x1f, 0xaa, 0xb0, 0xf6, 0x87, 0x80, 0xd2, 0x48, 0xc7, 0xd2, 0xc3, 0x27, + 0xf4, 0xee, 0xd3, 0x04, 0x3f, 0x23, 0x06, 0xec, 0x31, 0x36, 0x0e, 0x51, 0x02, 0xe7, 0x53, 0x17, + 0x88, 0xda, 0xff, 0x97, 0x00, 0xa2, 0xc9, 0x57, 0xf6, 0xd2, 0xdf, 0x08, 0xaf, 0x20, 0xcf, 0x33, + 0xce, 0x64, 0xd0, 0xcb, 0xbc, 0x7c, 0x77, 0xe2, 0x97, 0x8f, 0x67, 0x1c, 0xe7, 0xb2, 0x56, 0xbf, + 0xb2, 0xd7, 0x6e, 0x03, 0x16, 0x93, 0xea, 0x16, 0x97, 0xee, 0x12, 0x4c, 0xd9, 0x04, 0x8f, 0x78, + 0xb9, 0xaa, 0xe6, 0xfc, 0x0a, 0x2e, 0xc7, 0xd0, 0xce, 0x42, 0x75, 0x7b, 0x64, 0x0e, 0x70, 0xcf, + 0xc3, 0x7d, 0xba, 0x97, 0x4d, 0x07, 0x62, 0x7f, 0x3e, 0xd0, 0xd6, 0xa1, 0x72, 0x17, 0x1f, 0xf0, + 0x3b, 0x78, 0x44, 0xfe, 0xb4, 0xdf, 0x17, 0x60, 0x89, 0xf9, 0xce, 0x0d, 0x59, 0x2c, 0xea, 0x38, + 0x70, 0xc7, 0x7e, 0x1f, 0x07, 0x4c, 0xa5, 0xde, 0xd8, 0xf0, 0xb0, 0x6f, 0xbb, 0x96, 0x28, 0xad, + 0xaa, 0x7d, 0x6f, 0xbc, 0xc3, 0x00, 0xb4, 0xa0, 0xa4, 0xd3, 0x5f, 0x8d, 0x5d, 0x61, 0x5b, 0x25, + 0xbd, 0xd2, 0xf7, 0xc6, 0x9f, 0xd2, 0xb1, 0x5c, 0x1b, 0xec, 0x9b, 0x3e, 0x0e, 0x98, 0x0d, 0xf1, + 0xb5, 0x3d, 0x06, 0x40, 0xd7, 0xe0, 0xc4, 0x08, 0x8f, 0x5c, 0xff, 0xc0, 0x18, 0xda, 0x23, 0x9b, + 0x18, 0xb6, 0x63, 0xec, 0x1e, 0x10, 0x1c, 0x08, 0xc3, 0x41, 0x7c, 0xf2, 0x1e, 0x9d, 0xdb, 0x76, + 0x3e, 0xa2, 0x33, 0x48, 0x83, 0xba, 0xeb, 0x8e, 0x8c, 0xa0, 0xef, 0xfa, 0xd8, 0x30, 0xad, 0xc7, + 0x2c, 0x78, 0x94, 0xf4, 0x9a, 0xeb, 0x8e, 0x7a, 0x14, 0xd6, 0xb1, 0x1e, 0x6b, 0x26, 0xd4, 0x63, + 0xa5, 0x16, 0xad, 0x02, 0x58, 0x4d, 0x25, 0xaa, 0x00, 0xfa, 0x4d, 0x61, 0xbe, 0x3b, 0x94, 0x72, + 0x60, 0xdf, 0x14, 0x46, 0x0e, 0x3c, 0x59, 0x02, 0xb0, 0x6f, 0x2a, 0xb0, 0x21, 0x7e, 0x2a, 0xaa, + 0xdd, 0xaa, 0xce, 0x07, 0x9a, 0x05, 0xb0, 0x61, 0x7a, 0xe6, 0xae, 0x3d, 0xb4, 0xc9, 0x01, 0xba, + 0x04, 0x4d, 0xd3, 0xb2, 0x8c, 0xbe, 0x84, 0xd8, 0x58, 0xb6, 0x1e, 0x66, 0x4d, 0xcb, 0xda, 0x50, + 0xc0, 0xe8, 0x0d, 0x98, 0xb3, 0x7c, 0xd7, 0x8b, 0xe3, 0xf2, 0x5e, 0x44, 0x93, 0x4e, 0xa8, 0xc8, + 0xda, 0x6f, 0x4b, 0x70, 0x3a, 0xae, 0x96, 0x64, 0xf1, 0x7a, 0x03, 0x66, 0x12, 0xbb, 0xc6, 0xab, + 0xc6, 0x88, 0x49, 0x3d, 0x86, 0x98, 0x28, 0xef, 0x8a, 0xc9, 0xf2, 0x2e, 0xbb, 0x2a, 0x2e, 0xfd, + 0x18, 0x55, 0xf1, 0xe4, 0x0f, 0xa9, 0x8a, 0xa7, 0x8e, 0x54, 0x15, 0x5f, 0x60, 0x7d, 0x26, 0xb9, + 0x88, 0x15, 0x54, 0x65, 0xde, 0x0c, 0x09, 0x71, 0x1c, 0xd9, 0x8f, 0x4a, 0x54, 0xcf, 0xd3, 0xc7, + 0xa9, 0x9e, 0x2b, 0x79, 0xd5, 0xb3, 0xf6, 0xf3, 0x02, 0x2c, 0xc4, 0x35, 0x27, 0x0a, 0xae, 0xdb, + 0x50, 0xf5, 0xe5, 0xd5, 0x12, 0xda, 0x5a, 0x8d, 0xa7, 0x2f, 0xe9, 0x2b, 0xa8, 0x47, 0x4b, 0xd0, + 0xa7, 0xb9, 0x75, 0xf3, 0x85, 0x1c, 0x32, 0x2f, 0xac, 0x9c, 0x3b, 0x30, 0x17, 0x22, 0x1f, 0x5a, + 0x38, 0x2b, 0x85, 0x70, 0x31, 0x5e, 0x08, 0x3b, 0x50, 0xde, 0xc4, 0x4f, 0xed, 0x3e, 0xfe, 0x51, + 0xda, 0x50, 0xab, 0x50, 0xf3, 0xb0, 0x3f, 0xb2, 0x83, 0x20, 0xb4, 0xba, 0xaa, 0xae, 0x82, 0xb4, + 0xbf, 0x4c, 0xc1, 0x6c, 0x52, 0xb2, 0xd7, 0x53, 0x75, 0x77, 0x3b, 0xba, 0x06, 0xc9, 0xf3, 0x29, + 0x21, 0xee, 0xa2, 0xf4, 0xa2, 0xc5, 0x44, 0x92, 0x1d, 0x3a, 0x5a, 0xe1, 0x59, 0xe9, 0xf9, 0xfb, + 0xee, 0x68, 0x64, 0x3a, 0x96, 0x6c, 0x11, 0x8a, 0x21, 0x95, 0x96, 0xe9, 0x0f, 0xa8, 0x6d, 0x53, + 0x30, 0xfb, 0x46, 0x67, 0xa0, 0x46, 0x93, 0x55, 0xdb, 0x61, 0x65, 0x3b, 0xb3, 0xdc, 0xaa, 0x0e, + 0x02, 0xb4, 0x69, 0xfb, 0xe8, 0x3c, 0x4c, 0x62, 0xe7, 0xa9, 0x0c, 0x66, 0x51, 0x0f, 0x51, 0x7a, + 0x6f, 0x9d, 0x4d, 0xa3, 0x0b, 0x50, 0x1e, 0xb9, 0x63, 0x87, 0xc8, 0xb4, 0xb5, 0x11, 0x22, 0xb2, + 0xc6, 0x9f, 0x2e, 0x66, 0xd1, 0x25, 0x98, 0xb6, 0x98, 0x0e, 0x64, 0x6e, 0x3a, 0x1b, 0x95, 0xfe, + 0x0c, 0xae, 0xcb, 0x79, 0xf4, 0x7e, 0x18, 0x86, 0xab, 0x89, 0x40, 0x9a, 0x10, 0x6a, 0x66, 0x2c, + 0xbe, 0x1b, 0x8f, 0xc5, 0xc0, 0x48, 0x5c, 0xca, 0x25, 0x71, 0x78, 0xe1, 0x7e, 0x12, 0x2a, 0x43, + 0x77, 0xc0, 0xed, 0xa0, 0xc6, 0xeb, 0xa9, 0xa1, 0x3b, 0x60, 0x66, 0xb0, 0x40, 0x73, 0x0f, 0xcb, + 0x76, 0x5a, 0x33, 0xec, 0x4e, 0xf2, 0x01, 0x0d, 0x29, 0xec, 0xc3, 0x70, 0x9d, 0x3e, 0x6e, 0xd5, + 0xd9, 0x54, 0x95, 0x41, 0x1e, 0x38, 0x7d, 0x16, 0xf1, 0x08, 0x39, 0x68, 0x35, 0x18, 0x9c, 0x7e, + 0xd2, 0x94, 0x91, 0x17, 0x0b, 0xb3, 0x89, 0x94, 0x31, 0xeb, 0x7e, 0xbe, 0x02, 0x9d, 0x81, 0x5f, + 0x17, 0x60, 0x71, 0x83, 0x65, 0x4c, 0x8a, 0x27, 0x38, 0x46, 0x65, 0x8b, 0xae, 0x86, 0x2d, 0x84, + 0x64, 0x19, 0x9a, 0x3c, 0xac, 0xc0, 0x43, 0x1f, 0x42, 0x43, 0xd2, 0x14, 0x2b, 0x4b, 0x2f, 0x6a, + 0x3e, 0xd4, 0x03, 0x75, 0xa8, 0xbd, 0x0f, 0x4b, 0x29, 0x9e, 0x45, 0x76, 0x73, 0x16, 0x66, 0x22, + 0x8f, 0x10, 0xb2, 0x5c, 0x0b, 0x61, 0xdb, 0x96, 0x76, 0x13, 0x4e, 0xf4, 0x88, 0xe9, 0x93, 0xd4, + 0x81, 0x8f, 0xb0, 0x96, 0xf5, 0x1f, 0xe2, 0x6b, 0x45, 0x8b, 0xa0, 0x07, 0x0b, 0x3d, 0xe2, 0x7a, + 0x2f, 0x41, 0x94, 0xde, 0x74, 0x7a, 0x6c, 0x77, 0x4c, 0x44, 0x4a, 0x23, 0x87, 0xda, 0x12, 0xef, + 0x96, 0xa4, 0x77, 0x7b, 0x0f, 0x16, 0x79, 0xb3, 0xe2, 0x65, 0x0e, 0x71, 0x52, 0xb6, 0x4a, 0xd2, + 0x74, 0x37, 0x61, 0x3e, 0x72, 0xe5, 0x51, 0x75, 0x75, 0x25, 0x5e, 0x5d, 0x2d, 0xa5, 0x75, 0x1c, + 0x2b, 0xae, 0xfe, 0xb7, 0xa8, 0x38, 0xcc, 0x9c, 0xda, 0x6a, 0x3d, 0x5e, 0x5b, 0x9d, 0xca, 0x21, + 0x19, 0x2b, 0xad, 0xd2, 0x16, 0x59, 0xca, 0xb0, 0x48, 0x3d, 0x55, 0x80, 0x4d, 0x32, 0xa7, 0xf1, + 0x46, 0x7a, 0x8b, 0x7f, 0x62, 0xfd, 0xb5, 0xcd, 0xeb, 0xaf, 0x70, 0xeb, 0xb0, 0x81, 0x74, 0x35, + 0x51, 0x7f, 0xb5, 0xf2, 0xd8, 0x0c, 0xcb, 0xaf, 0xff, 0x9e, 0x84, 0x6a, 0x38, 0x97, 0x12, 0x6c, + 0x5a, 0x48, 0xc5, 0x0c, 0x21, 0xa9, 0xf1, 0xab, 0xf4, 0x32, 0xf1, 0x6b, 0xf2, 0x45, 0xf1, 0x6b, + 0x19, 0xaa, 0xec, 0xc3, 0xf0, 0xf1, 0x9e, 0x88, 0x47, 0x15, 0x06, 0xd0, 0xf1, 0x5e, 0x64, 0x50, + 0xe5, 0xa3, 0x18, 0x54, 0xa2, 0xd0, 0x9b, 0x4e, 0x16, 0x7a, 0xd7, 0xc3, 0x08, 0xc3, 0x63, 0xd1, + 0x4a, 0x9a, 0x5c, 0x66, 0x6c, 0xd9, 0x8a, 0xc7, 0x16, 0x1e, 0x9e, 0x5e, 0xcb, 0x58, 0xfc, 0xca, + 0x96, 0x79, 0xf7, 0x78, 0x99, 0xa7, 0x5a, 0x95, 0x70, 0x84, 0xeb, 0x00, 0xe1, 0x9d, 0x97, 0xb5, + 0x1e, 0x4a, 0x1f, 0x4d, 0x57, 0xb0, 0xa8, 0x57, 0x89, 0xc9, 0x3f, 0xea, 0x72, 0x1e, 0xc1, 0xab, + 0xfc, 0x52, 0xcd, 0x92, 0x72, 0xda, 0x81, 0xd7, 0x53, 0x9d, 0x81, 0xa3, 0x59, 0xdd, 0x95, 0x78, + 0x63, 0xe0, 0x78, 0xe6, 0x92, 0xea, 0x0b, 0xb0, 0xa0, 0x6e, 0xfa, 0x62, 0x9a, 0x97, 0x74, 0x55, + 0x01, 0xe9, 0x10, 0x9a, 0x4a, 0xed, 0xd9, 0x8e, 0x1d, 0xec, 0xf3, 0xf9, 0x32, 0x9b, 0x07, 0x09, + 0xea, 0xb0, 0x9f, 0xa7, 0xf8, 0x99, 0x4d, 0x8c, 0xbe, 0x6b, 0x61, 0x66, 0x8c, 0x53, 0x7a, 0x85, + 0x02, 0x36, 0x5c, 0x0b, 0x47, 0x17, 0xa4, 0x72, 0xac, 0x0b, 0x52, 0x4d, 0x5c, 0x90, 0x45, 0x28, + 0xfb, 0xd8, 0x0c, 0x5c, 0xa7, 0x05, 0xfc, 0x17, 0x2c, 0x1f, 0xd1, 0x58, 0x31, 0xc2, 0x41, 0x40, + 0x37, 0x10, 0x09, 0x8c, 0x18, 0x2a, 0x69, 0xd6, 0x4c, 0x5e, 0x9a, 0x75, 0x48, 0xbf, 0x31, 0x91, + 0x66, 0xd5, 0xf3, 0xd2, 0xac, 0xa3, 0xb4, 0x1b, 0x95, 0x24, 0xb2, 0x71, 0x58, 0x12, 0xf9, 0x53, + 0x5e, 0x9c, 0xbb, 0xb0, 0x94, 0x32, 0x75, 0x71, 0x73, 0xae, 0x26, 0xba, 0x92, 0xad, 0x3c, 0x29, + 0x84, 0x4d, 0xc9, 0xff, 0x80, 0xd9, 0xad, 0x67, 0xb8, 0xdf, 0x3b, 0x70, 0xfa, 0xc7, 0x08, 0xfb, + 0x4d, 0x28, 0xf5, 0x47, 0x96, 0x28, 0xc7, 0xe9, 0xa7, 0x9a, 0x08, 0x94, 0xe2, 0x89, 0x80, 0x01, + 0xcd, 0x68, 0x07, 0xc1, 0xe7, 0x22, 0xe5, 0xd3, 0xa2, 0xc8, 0x94, 0xf8, 0x8c, 0x2e, 0x46, 0x02, + 0x8e, 0x7d, 0x9f, 0x9d, 0x9a, 0xc3, 0xb1, 0xef, 0xc7, 0xcd, 0xb6, 0x14, 0x37, 0x5b, 0xed, 0x31, + 0xd4, 0xe8, 0x06, 0x3f, 0x88, 0x7d, 0x91, 0x0d, 0x97, 0xa2, 0x6c, 0x38, 0x4c, 0xaa, 0x27, 0x95, + 0xa4, 0x5a, 0x5b, 0x85, 0x19, 0xbe, 0x97, 0x38, 0x48, 0x13, 0x4a, 0x63, 0x7f, 0x28, 0xf5, 0x36, + 0xf6, 0x87, 0xda, 0xbf, 0x43, 0xbd, 0x43, 0x88, 0xd9, 0xdf, 0x3f, 0x06, 0x3f, 0xe1, 0x5e, 0x45, + 0x35, 0x81, 0x4f, 0xf1, 0xa4, 0x69, 0xd0, 0x90, 0xb4, 0x73, 0xf7, 0xef, 0x02, 0xda, 0x71, 0x7d, + 0x72, 0xc7, 0xf5, 0xbf, 0x36, 0x7d, 0xeb, 0x78, 0x09, 0x31, 0x82, 0x49, 0xf1, 0xee, 0xa2, 0x74, + 0x71, 0x4a, 0x67, 0xdf, 0xda, 0xeb, 0x30, 0x1f, 0xa3, 0x97, 0xbb, 0xf1, 0x0d, 0xa8, 0x31, 0x3f, + 0x21, 0x92, 0xa6, 0x8b, 0x6a, 0xcf, 0xed, 0x30, 0x67, 0x42, 0xcb, 0x6a, 0x1a, 0x08, 0x18, 0x3c, + 0xf4, 0xda, 0x6f, 0x26, 0x52, 0x8b, 0x85, 0xf8, 0xfa, 0x44, 0x5a, 0xf1, 0xab, 0x02, 0x4c, 0x31, + 0x78, 0xca, 0x6d, 0x2f, 0x43, 0xd5, 0xc7, 0x9e, 0x6b, 0x10, 0x73, 0x10, 0x3e, 0x65, 0xa1, 0x80, + 0x87, 0xe6, 0x20, 0x60, 0x2f, 0x71, 0xe8, 0xa4, 0x65, 0x0f, 0x70, 0x40, 0xe4, 0x7b, 0x96, 0x1a, + 0x85, 0x6d, 0x72, 0x10, 0x15, 0x49, 0x60, 0xff, 0x27, 0xcf, 0x19, 0x26, 0x75, 0xf6, 0x8d, 0xce, + 0xf3, 0xff, 0xe2, 0x87, 0xb4, 0x58, 0xd8, 0xcf, 0xf2, 0x36, 0x54, 0x12, 0x5d, 0x95, 0x70, 0xac, + 0xbd, 0x0f, 0x48, 0x3d, 0xb3, 0x10, 0xea, 0x05, 0x28, 0x33, 0x91, 0xc8, 0xa0, 0xd7, 0x88, 0x1f, + 0x5a, 0x17, 0xb3, 0xda, 0x6d, 0x40, 0x5c, 0x8a, 0xb1, 0x40, 0x77, 0x74, 0x89, 0xbf, 0x07, 0xf3, + 0xb1, 0xf5, 0xe1, 0x6f, 0xd0, 0x18, 0x81, 0xe4, 0xee, 0x62, 0xf1, 0x1f, 0x0a, 0x00, 0x9d, 0x31, + 0xd9, 0x17, 0xdd, 0x04, 0xf5, 0x94, 0x85, 0xf8, 0x29, 0xe9, 0x9c, 0x67, 0x06, 0xc1, 0xd7, 0xae, + 0x2f, 0x33, 0xb9, 0x70, 0xcc, 0x3a, 0x01, 0x63, 0xb2, 0x2f, 0x5b, 0x88, 0xf4, 0x1b, 0x9d, 0x87, + 0x06, 0x7f, 0x81, 0x64, 0x98, 0x96, 0xe5, 0xe3, 0x20, 0x10, 0xbd, 0xc4, 0x3a, 0x87, 0x76, 0x38, + 0x90, 0xa2, 0xd9, 0x16, 0x76, 0x88, 0x4d, 0x0e, 0x0c, 0xe2, 0x3e, 0xc1, 0x8e, 0xc8, 0xd1, 0xea, + 0x12, 0xfa, 0x90, 0x02, 0x29, 0x9a, 0x8f, 0x07, 0x76, 0x40, 0x7c, 0x89, 0x26, 0x7b, 0x5b, 0x02, + 0xca, 0xd0, 0xb4, 0x6f, 0x0b, 0xd0, 0xdc, 0x19, 0x0f, 0x87, 0xfc, 0x90, 0xc7, 0x95, 0x25, 0x7a, + 0x5d, 0x9c, 0xa3, 0x98, 0xb0, 0x86, 0x48, 0x44, 0xe2, 0x70, 0x3f, 0xbc, 0x76, 0xbc, 0x0a, 0x73, + 0x0a, 0xa3, 0x42, 0x69, 0xb1, 0x50, 0x5c, 0x88, 0x87, 0x62, 0x6a, 0x28, 0xbc, 0x5c, 0x7a, 0xb9, + 0xc3, 0x69, 0x27, 0x60, 0x3e, 0xb6, 0x5e, 0x94, 0x5a, 0x97, 0xa1, 0x2e, 0x7e, 0x38, 0x0a, 0x23, + 0x38, 0x09, 0x15, 0xea, 0x5e, 0xfa, 0xb6, 0x25, 0x7b, 0xc7, 0xd3, 0x9e, 0x6b, 0x6d, 0xd8, 0x96, + 0xaf, 0x75, 0xa1, 0xae, 0x73, 0xf2, 0x02, 0xf7, 0x16, 0x34, 0xc4, 0xef, 0x49, 0x23, 0xf6, 0x03, + 0x3f, 0x6a, 0x74, 0xc6, 0x68, 0xeb, 0x75, 0x47, 0x1d, 0x6a, 0x5f, 0x42, 0xfb, 0x91, 0x67, 0xd1, + 0x8c, 0x49, 0xa5, 0x2a, 0x8f, 0x76, 0x0b, 0xe4, 0x0b, 0xb9, 0x3c, 0xe2, 0xf1, 0x65, 0x75, 0x5f, + 0x1d, 0x6a, 0xa7, 0x61, 0x39, 0x93, 0xb8, 0x38, 0xb7, 0x07, 0xcd, 0x68, 0xc2, 0xb2, 0x65, 0xcb, + 0x9c, 0xb5, 0xc2, 0x0b, 0x4a, 0x2b, 0x7c, 0x31, 0x0c, 0xc3, 0xdc, 0xa1, 0x8b, 0x91, 0x92, 0x19, + 0x95, 0xf2, 0x32, 0xa3, 0xc9, 0x58, 0x66, 0xa4, 0x7d, 0x12, 0x4a, 0x4f, 0xa4, 0xa5, 0xef, 0xb2, + 0xdc, 0x98, 0xef, 0x2d, 0xdd, 0xc4, 0xc9, 0x8c, 0xc3, 0x71, 0x0c, 0x5d, 0x41, 0xd6, 0x66, 0xa1, + 0x1e, 0x73, 0x18, 0xda, 0x87, 0xd0, 0x48, 0x78, 0x80, 0xb5, 0x44, 0xfe, 0x90, 0x12, 0x5b, 0x3c, + 0x7b, 0xb8, 0x7c, 0x0a, 0x2a, 0xf2, 0x21, 0x1f, 0x9a, 0x86, 0xd2, 0xc3, 0x8d, 0x9d, 0xe6, 0x04, + 0xfd, 0x78, 0xb4, 0xb9, 0xd3, 0x2c, 0x5c, 0xbe, 0x09, 0xb3, 0x89, 0xbf, 0x5f, 0x68, 0x0e, 0xea, + 0xbd, 0x4e, 0x77, 0xf3, 0xa3, 0x07, 0x9f, 0x1b, 0xfa, 0x56, 0x67, 0xf3, 0x8b, 0xe6, 0x04, 0x5a, + 0x80, 0xa6, 0x04, 0x75, 0x1f, 0x3c, 0xe4, 0xd0, 0xc2, 0xe5, 0x27, 0xd0, 0x88, 0x27, 0xc8, 0xe8, + 0x04, 0xcc, 0x6d, 0x3c, 0xe8, 0x3e, 0xec, 0x6c, 0x77, 0xb7, 0x74, 0x63, 0x43, 0xdf, 0xea, 0x3c, + 0xdc, 0xda, 0x6c, 0x4e, 0xc4, 0xc1, 0xfa, 0xa3, 0x6e, 0x77, 0xbb, 0xfb, 0x71, 0xb3, 0x40, 0xa9, + 0x46, 0xe0, 0xad, 0xcf, 0xb7, 0x29, 0x72, 0x31, 0x8e, 0xfc, 0xa8, 0x7b, 0xb7, 0xfb, 0xe0, 0xdf, + 0xba, 0xcd, 0xd2, 0xfa, 0x2f, 0x6a, 0xd0, 0x90, 0x07, 0xc4, 0x3e, 0x6b, 0xcf, 0xde, 0x86, 0x69, + 0xf9, 0xc6, 0x32, 0x4a, 0xd9, 0xe3, 0x0f, 0x42, 0xdb, 0xad, 0xf4, 0x84, 0x30, 0x94, 0x09, 0xb4, + 0xc3, 0x14, 0xa7, 0xfc, 0x69, 0x3c, 0xad, 0x8a, 0x32, 0xf5, 0x2b, 0xb3, 0xbd, 0x92, 0x37, 0x1d, + 0x52, 0xec, 0x51, 0x6d, 0xa9, 0xef, 0x47, 0x50, 0xb4, 0x26, 0xf3, 0x5d, 0x4a, 0xfb, 0x4c, 0xee, + 0x7c, 0x48, 0xf4, 0x0b, 0x68, 0x26, 0x5f, 0x8e, 0xa0, 0xa8, 0xcd, 0x9e, 0xf3, 0x2a, 0xa5, 0x7d, + 0xf6, 0x10, 0x0c, 0x95, 0x74, 0xea, 0x8d, 0xc5, 0x6a, 0xfe, 0x5f, 0xf2, 0x14, 0xe9, 0xbc, 0x5f, + 0xef, 0x5c, 0x14, 0xf1, 0x3f, 0x84, 0x48, 0x7d, 0xd9, 0x90, 0xf1, 0xa7, 0x58, 0x11, 0x45, 0xf6, + 0xaf, 0x45, 0x6d, 0x02, 0x7d, 0x06, 0xb3, 0x89, 0xce, 0x1c, 0x8a, 0x56, 0x65, 0xf7, 0x19, 0xdb, + 0xab, 0xf9, 0x08, 0x71, 0xbd, 0xa9, 0x7d, 0xb7, 0x98, 0xde, 0x32, 0x9a, 0x79, 0x31, 0xbd, 0x65, + 0x36, 0xec, 0x98, 0x79, 0xc5, 0xba, 0x6b, 0x8a, 0x79, 0x65, 0xb5, 0xf2, 0xda, 0x2b, 0x79, 0xd3, + 0xea, 0xf1, 0x13, 0x9d, 0x35, 0xe5, 0xf8, 0xd9, 0x0d, 0xbb, 0xf6, 0x6a, 0x3e, 0x42, 0x52, 0x57, + 0x51, 0x99, 0x9f, 0xd0, 0x55, 0xaa, 0xab, 0x94, 0xd0, 0x55, 0xba, 0x3f, 0x20, 0x74, 0x95, 0xa8, + 0xd7, 0xcf, 0xe4, 0x96, 0x3a, 0x69, 0x5d, 0x65, 0x57, 0x4f, 0xda, 0x04, 0xea, 0x40, 0x45, 0xd6, + 0x2a, 0x28, 0xba, 0xdd, 0x89, 0x02, 0xa9, 0x7d, 0x32, 0x63, 0x26, 0x24, 0xf1, 0x2f, 0x30, 0x49, + 0xa1, 0x68, 0x21, 0x86, 0x24, 0x97, 0x9e, 0x48, 0x40, 0xc3, 0x65, 0xef, 0x41, 0x99, 0xa7, 0xf6, + 0x28, 0xf2, 0xb9, 0xb1, 0x3a, 0xa2, 0xbd, 0x94, 0x82, 0x87, 0x8b, 0x3f, 0xe1, 0xef, 0xae, 0x45, + 0x8e, 0x8e, 0x96, 0x63, 0x8f, 0x12, 0xe3, 0x95, 0x40, 0xfb, 0x54, 0xf6, 0x64, 0x48, 0x6b, 0x17, + 0xe6, 0x33, 0x42, 0x20, 0x8a, 0x5a, 0x4b, 0xf9, 0xd1, 0xb7, 0x7d, 0xee, 0x70, 0x24, 0xf5, 0xb0, + 0x42, 0x6b, 0x8b, 0xaa, 0xa9, 0x2b, 0xca, 0x5a, 0x4a, 0xc1, 0xe5, 0xe2, 0xf5, 0xdf, 0x14, 0x61, + 0x86, 0x27, 0x2a, 0xc2, 0x55, 0x7f, 0x0c, 0x10, 0xe5, 0xd2, 0xa8, 0x1d, 0xb3, 0x9e, 0x58, 0x51, + 0xd1, 0x5e, 0xce, 0x9c, 0x53, 0xc5, 0xa8, 0xa4, 0xc5, 0x8a, 0x18, 0xd3, 0xc9, 0xb6, 0x22, 0xc6, + 0x8c, 0x4c, 0x5a, 0x9b, 0x40, 0x9b, 0x50, 0x0d, 0x73, 0x35, 0xa4, 0xa4, 0x78, 0x89, 0x44, 0xb3, + 0xdd, 0xce, 0x9a, 0x52, 0x39, 0x52, 0xf2, 0x2f, 0x85, 0xa3, 0x74, 0x56, 0xa7, 0x70, 0x94, 0x95, + 0xb2, 0x4d, 0x7c, 0x74, 0xea, 0xbb, 0xef, 0x57, 0x0a, 0x7f, 0xfe, 0x7e, 0x65, 0xe2, 0xbf, 0x9e, + 0xaf, 0x14, 0xbe, 0x7b, 0xbe, 0x52, 0xf8, 0xe3, 0xf3, 0x95, 0xc2, 0x5f, 0x9f, 0xaf, 0x14, 0xbe, + 0xf9, 0xdb, 0xca, 0xc4, 0x6e, 0x99, 0x3d, 0xc3, 0x7f, 0xfb, 0x1f, 0x01, 0x00, 0x00, 0xff, 0xff, + 0x60, 0x93, 0xd6, 0x21, 0x3a, 0x31, 0x00, 0x00, } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/api/v1alpha1/runtime/api.proto b/vendor/k8s.io/kubernetes/pkg/kubelet/api/v1alpha1/runtime/api.proto index ecd56311..8d8b510b 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/api/v1alpha1/runtime/api.proto +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/api/v1alpha1/runtime/api.proto @@ -1,8 +1,18 @@ // To regenerate api.pb.go run hack/update-generated-runtime.sh -syntax = 'proto2'; +syntax = 'proto3'; package runtime; +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.stringer_all) = true; +option (gogoproto.goproto_getters_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.goproto_unrecognized_all) = false; + // Runtime service defines the public APIs for remote container runtimes service RuntimeService { // Version returns the runtime name, runtime version, and runtime API version. @@ -84,20 +94,20 @@ service ImageService { message VersionRequest { // Version of the kubelet runtime API. - optional string version = 1; + string version = 1; } message VersionResponse { // Version of the kubelet runtime API. - optional string version = 1; + string version = 1; // Name of the container runtime. - optional string runtime_name = 2; + string runtime_name = 2; // Version of the container runtime. The string must be // semver-compatible. - optional string runtime_version = 3; + string runtime_version = 3; // API version of the container runtime. The string must be // semver-compatible. - optional string runtime_api_version = 4; + string runtime_api_version = 4; } // DNSConfig specifies the DNS servers and search domains of a sandbox. @@ -119,35 +129,41 @@ enum Protocol { // PortMapping specifies the port mapping configurations of a sandbox. message PortMapping { // Protocol of the port mapping. - optional Protocol protocol = 1; - // Port number within the container. - optional int32 container_port = 2; - // Port number on the host. - optional int32 host_port = 3; + Protocol protocol = 1; + // Port number within the container. Default: 0 (not specified). + int32 container_port = 2; + // Port number on the host. Default: 0 (not specified). + int32 host_port = 3; // Host IP. - optional string host_ip = 4; + string host_ip = 4; } // Mount specifies a host volume to mount into a container. message Mount { // Path of the mount within the container. - optional string container_path = 1; + string container_path = 1; // Path of the mount on the host. - optional string host_path = 2; + string host_path = 2; // If set, the mount is read-only. - optional bool readonly = 3; + bool readonly = 3; // If set, the mount needs SELinux relabeling. - optional bool selinux_relabel = 4; + bool selinux_relabel = 4; } // NamespaceOption provides options for Linux namespaces. message NamespaceOption { // If set, use the host's network namespace. - optional bool host_network = 1; + bool host_network = 1; // If set, use the host's PID namespace. - optional bool host_pid = 2; + bool host_pid = 2; // If set, use the host's IPC namespace. - optional bool host_ipc = 3; + bool host_ipc = 3; +} + +// Int64Value is the wrapper of int64. +message Int64Value { + // The value. + int64 value = 1; } // LinuxSandboxSecurityContext holds linux security configuration that will be @@ -158,13 +174,13 @@ message NamespaceOption { message LinuxSandboxSecurityContext { // Configurations for the sandbox's namespaces. // This will be used only if the PodSandbox uses namespace for isolation. - optional NamespaceOption namespace_options = 1; + NamespaceOption namespace_options = 1; // Optional SELinux context to be applied. - optional SELinuxOption selinux_options = 2; + SELinuxOption selinux_options = 2; // UID to run sandbox processes as, when applicable. - optional int64 run_as_user = 3; + Int64Value run_as_user = 3; // If set, the root filesystem of the sandbox is read-only. - optional bool readonly_rootfs = 4; + bool readonly_rootfs = 4; // List of groups applied to the first process run in the sandbox, in // addition to the sandbox's primary GID. repeated int64 supplemental_groups = 5; @@ -173,7 +189,7 @@ message LinuxSandboxSecurityContext { // MUST be true. // This allows a sandbox to take additional security precautions if no // privileged containers are expected to be run. - optional bool privileged = 6; + bool privileged = 6; } // LinuxPodSandboxConfig holds platform-specific configurations for Linux @@ -182,9 +198,9 @@ message LinuxPodSandboxConfig { // Parent cgroup of the PodSandbox. // The cgroupfs style syntax will be used, but the container runtime can // convert it to systemd semantics if needed. - optional string cgroup_parent = 1; + string cgroup_parent = 1; // LinuxSandboxSecurityContext holds sandbox security attributes. - optional LinuxSandboxSecurityContext security_context = 2; + LinuxSandboxSecurityContext security_context = 2; } // PodSandboxMetadata holds all necessary information for building the sandbox name. @@ -193,13 +209,13 @@ message LinuxPodSandboxConfig { // the runtime can construct a unique PodSandboxName based on the metadata. message PodSandboxMetadata { // Pod name of the sandbox. Same as the pod name in the PodSpec. - optional string name = 1; + string name = 1; // Pod UID of the sandbox. Same as the pod UID in the PodSpec. - optional string uid = 2; + string uid = 2; // Pod namespace of the sandbox. Same as the pod namespace in the PodSpec. - optional string namespace = 3; - // Attempt number of creating the sandbox. - optional uint32 attempt = 4; + string namespace = 3; + // Attempt number of creating the sandbox. Default: 0. + uint32 attempt = 4; } // PodSandboxConfig holds all the required and optional fields for creating a @@ -209,9 +225,9 @@ message PodSandboxConfig { // sandbox, and the runtime should leverage this to ensure correct // operation. The runtime may also use this information to improve UX, such // as by constructing a readable name. - optional PodSandboxMetadata metadata = 1; + PodSandboxMetadata metadata = 1; // Hostname of the sandbox. - optional string hostname = 2; + string hostname = 2; // Path to the directory on the host in which container log files are // stored. // By default the log of a container going into the LogDirectory will be @@ -227,9 +243,9 @@ message PodSandboxConfig { // container logs are under active discussion in // https://issues.k8s.io/24677. There *may* be future change of direction // for logging as the discussion carries on. - optional string log_directory = 3; + string log_directory = 3; // DNS config for the sandbox. - optional DNSConfig dns_config = 4; + DNSConfig dns_config = 4; // Port mappings for the sandbox. repeated PortMapping port_mappings = 5; // Key-value pairs that may be used to scope and select individual resources. @@ -292,77 +308,77 @@ message PodSandboxConfig { // map annotations = 7; // Optional configurations specific to Linux hosts. - optional LinuxPodSandboxConfig linux = 8; + LinuxPodSandboxConfig linux = 8; } message RunPodSandboxRequest { // Configuration for creating a PodSandbox. - optional PodSandboxConfig config = 1; + PodSandboxConfig config = 1; } message RunPodSandboxResponse { // ID of the PodSandbox to run. - optional string pod_sandbox_id = 1; + string pod_sandbox_id = 1; } message StopPodSandboxRequest { // ID of the PodSandbox to stop. - optional string pod_sandbox_id = 1; + string pod_sandbox_id = 1; } message StopPodSandboxResponse {} message RemovePodSandboxRequest { // ID of the PodSandbox to remove. - optional string pod_sandbox_id = 1; + string pod_sandbox_id = 1; } message RemovePodSandboxResponse {} message PodSandboxStatusRequest { // ID of the PodSandbox for which to retrieve status. - optional string pod_sandbox_id = 1; + string pod_sandbox_id = 1; } // PodSandboxNetworkStatus is the status of the network for a PodSandbox. message PodSandboxNetworkStatus { // IP address of the PodSandbox. - optional string ip = 1; + string ip = 1; } // Namespace contains paths to the namespaces. message Namespace { // Path to the network namespace. - optional string network = 1; + string network = 1; // Namespace options for Linux namespaces. - optional NamespaceOption options = 2; + NamespaceOption options = 2; } // LinuxSandboxStatus contains status specific to Linux sandboxes. message LinuxPodSandboxStatus { // Paths to the sandbox's namespaces. - optional Namespace namespaces = 1; + Namespace namespaces = 1; } enum PodSandboxState { - SANDBOX_READY = 0; + SANDBOX_READY = 0; SANDBOX_NOTREADY = 1; } // PodSandboxStatus contains the status of the PodSandbox. message PodSandboxStatus { // ID of the sandbox. - optional string id = 1; + string id = 1; // Metadata of the sandbox. - optional PodSandboxMetadata metadata = 2; + PodSandboxMetadata metadata = 2; // State of the sandbox. - optional PodSandboxState state = 3; - // Creation timestamp of the sandbox in nanoseconds. - optional int64 created_at = 4; + PodSandboxState state = 3; + // Creation timestamp of the sandbox in nanoseconds. Must be > 0. + int64 created_at = 4; // Network contains network status if network is handled by the runtime. - optional PodSandboxNetworkStatus network = 5; + PodSandboxNetworkStatus network = 5; // Linux-specific status to a pod sandbox. - optional LinuxPodSandboxStatus linux = 6; + LinuxPodSandboxStatus linux = 6; // Labels are key-value pairs that may be used to scope and select individual resources. map labels = 7; // Unstructured key-value map holding arbitrary metadata. @@ -374,16 +390,22 @@ message PodSandboxStatus { message PodSandboxStatusResponse { // Status of the PodSandbox. - optional PodSandboxStatus status = 1; + PodSandboxStatus status = 1; +} + +// PodSandboxStateValue is the wrapper of PodSandboxState. +message PodSandboxStateValue { + // State of the sandbox. + PodSandboxState state = 1; } // PodSandboxFilter is used to filter a list of PodSandboxes. // All those fields are combined with 'AND' message PodSandboxFilter { // ID of the sandbox. - optional string id = 1; + string id = 1; // State of the sandbox. - optional PodSandboxState state = 2; + PodSandboxStateValue state = 2; // LabelSelector to select matches. // Only api.MatchLabels is supported for now and the requirements // are ANDed. MatchExpressions is not supported yet. @@ -392,20 +414,20 @@ message PodSandboxFilter { message ListPodSandboxRequest { // PodSandboxFilter to filter a list of PodSandboxes. - optional PodSandboxFilter filter = 1; + PodSandboxFilter filter = 1; } // PodSandbox contains minimal information about a sandbox. message PodSandbox { // ID of the PodSandbox. - optional string id = 1; + string id = 1; // Metadata of the PodSandbox. - optional PodSandboxMetadata metadata = 2; + PodSandboxMetadata metadata = 2; // State of the PodSandbox. - optional PodSandboxState state = 3; - // Creation timestamps of the PodSandbox in nanoseconds. - optional int64 created_at = 4; + PodSandboxState state = 3; + // Creation timestamps of the PodSandbox in nanoseconds. Must be > 0. + int64 created_at = 4; // Labels of the PodSandbox. map labels = 5; // Unstructured key-value map holding arbitrary metadata. @@ -424,12 +446,12 @@ message ListPodSandboxResponse { // value of a Container's Image field (e.g. imageID or imageDigest), but in the // future it will include more detailed information about the different image types. message ImageSpec { - optional string image = 1; + string image = 1; } message KeyValue { - optional string key = 1; - optional string value = 2; + string key = 1; + string value = 2; } // LinuxContainerResources specifies Linux specific configuration for @@ -437,24 +459,24 @@ message KeyValue { // TODO: Consider using Resources from opencontainers/runtime-spec/specs-go // directly. message LinuxContainerResources { - // CPU CFS (Completely Fair Scheduler) period. - optional int64 cpu_period = 1; - // CPU CFS (Completely Fair Scheduler) quota. - optional int64 cpu_quota = 2; - // CPU shares (relative weight vs. other containers). - optional int64 cpu_shares = 3; - // Memory limit in bytes. - optional int64 memory_limit_in_bytes = 4; - // OOMScoreAdj adjusts the oom-killer score. - optional int64 oom_score_adj = 5; + // CPU CFS (Completely Fair Scheduler) period. Default: 0 (not specified). + int64 cpu_period = 1; + // CPU CFS (Completely Fair Scheduler) quota. Default: 0 (not specified). + int64 cpu_quota = 2; + // CPU shares (relative weight vs. other containers). Default: 0 (not specified). + int64 cpu_shares = 3; + // Memory limit in bytes. Default: 0 (not specified). + int64 memory_limit_in_bytes = 4; + // OOMScoreAdj adjusts the oom-killer score. Default: 0 (not specified). + int64 oom_score_adj = 5; } // SELinuxOption are the labels to be applied to the container. message SELinuxOption { - optional string user = 1; - optional string role = 2; - optional string type = 3; - optional string level = 4; + string user = 1; + string role = 2; + string type = 3; + string level = 4; } // Capability contains the container capabilities to add or drop @@ -468,7 +490,7 @@ message Capability { // LinuxContainerSecurityContext holds linux security configuration that will be applied to a container. message LinuxContainerSecurityContext { // Capabilities to add or drop. - optional Capability capabilities = 1; + Capability capabilities = 1; // If set, run container in privileged mode. // Privileged mode is incompatible with the following options. If // privileged is set, the following features MAY have no effect: @@ -486,21 +508,21 @@ message LinuxContainerSecurityContext { // 6. The device cgroup does not restrict access to any devices. // 7. All devices from the host's /dev are available within the container. // 8. SELinux restrictions are not applied (e.g. label=disabled). - optional bool privileged = 2; + bool privileged = 2; // Configurations for the container's namespaces. // Only used if the container uses namespace for isolation. - optional NamespaceOption namespace_options = 3; + NamespaceOption namespace_options = 3; // SELinux context to be optionally applied. - optional SELinuxOption selinux_options = 4; + SELinuxOption selinux_options = 4; // UID to run the container process as. Only one of run_as_user and // run_as_username can be specified at a time. - optional int64 run_as_user = 5; + Int64Value run_as_user = 5; // User name to run the container process as. If specified, the user MUST // exist in the container image (i.e. in the /etc/passwd inside the image), // and be resolved there by the runtime; otherwise, the runtime MUST error. - optional string run_as_username = 6; + string run_as_username = 6; // If set, the root filesystem of the container is read-only. - optional bool readonly_rootfs = 7; + bool readonly_rootfs = 7; // List of groups applied to the first process run in the container, in // addition to the container's primary GID. repeated int64 supplemental_groups = 8; @@ -510,9 +532,9 @@ message LinuxContainerSecurityContext { // Linux-based containers. message LinuxContainerConfig { // Resources specification for the container. - optional LinuxContainerResources resources = 1; + LinuxContainerResources resources = 1; // LinuxContainerSecurityContext configuration for the container. - optional LinuxContainerSecurityContext security_context = 2; + LinuxContainerSecurityContext security_context = 2; } // ContainerMetadata holds all necessary information for building the container @@ -522,22 +544,22 @@ message LinuxContainerConfig { // within a sandbox for the entire lifetime of the sandbox. message ContainerMetadata { // Name of the container. Same as the container name in the PodSpec. - optional string name = 1; - // Attempt number of creating the container. - optional uint32 attempt = 2; + string name = 1; + // Attempt number of creating the container. Default: 0. + uint32 attempt = 2; } // Device specifies a host device to mount into a container. message Device { // Path of the device within the container. - optional string container_path = 1; + string container_path = 1; // Path of the device on the host. - optional string host_path = 2; + string host_path = 2; // Cgroups permissions of the device, candidates are one or more of // * r - allows container to read from the specified device. // * w - allows container to write to the specified device. // * m - allows container to create device files that do not yet exist. - optional string permissions = 3; + string permissions = 3; } // ContainerConfig holds all the required and optional fields for creating a @@ -547,15 +569,15 @@ message ContainerConfig { // container, and the runtime should leverage this to ensure correct // operation. The runtime may also use this information to improve UX, such // as by constructing a readable name. - optional ContainerMetadata metadata = 1 ; + ContainerMetadata metadata = 1 ; // Image to use. - optional ImageSpec image = 2; + ImageSpec image = 2; // Command to execute (i.e., entrypoint for docker) repeated string command = 3; // Args for the Command (i.e., command for docker) repeated string args = 4; // Current working directory of the command. - optional string working_dir = 5; + string working_dir = 5; // List of environment variable to set in the container. repeated KeyValue envs = 6; // Mounts for the container. @@ -590,56 +612,57 @@ message ContainerConfig { // container logs are under active discussion in // https://issues.k8s.io/24677. There *may* be future change of direction // for logging as the discussion carries on. - optional string log_path = 11; + string log_path = 11; // Variables for interactive containers, these have very specialized // use-cases (e.g. debugging). // TODO: Determine if we need to continue supporting these fields that are // part of Kubernetes's Container Spec. - optional bool stdin = 12; - optional bool stdin_once = 13; - optional bool tty = 14; + bool stdin = 12; + bool stdin_once = 13; + bool tty = 14; // Configuration specific to Linux containers. - optional LinuxContainerConfig linux = 15; + LinuxContainerConfig linux = 15; } message CreateContainerRequest { // ID of the PodSandbox in which the container should be created. - optional string pod_sandbox_id = 1; + string pod_sandbox_id = 1; // Config of the container. - optional ContainerConfig config = 2; + ContainerConfig config = 2; // Config of the PodSandbox. This is the same config that was passed // to RunPodSandboxRequest to create the PodSandbox. It is passed again // here just for easy reference. The PodSandboxConfig is immutable and // remains the same throughout the lifetime of the pod. - optional PodSandboxConfig sandbox_config = 3; + PodSandboxConfig sandbox_config = 3; } message CreateContainerResponse { // ID of the created container. - optional string container_id = 1; + string container_id = 1; } message StartContainerRequest { // ID of the container to start. - optional string container_id = 1; + string container_id = 1; } message StartContainerResponse {} message StopContainerRequest { // ID of the container to stop. - optional string container_id = 1; - // Timeout, in seconds, to stop the container. - optional int64 timeout = 2; + string container_id = 1; + // Timeout in seconds to wait for the container to stop before forcibly + // terminating it. Default: 0 (forcibly terminate the container immediately) + int64 timeout = 2; } message StopContainerResponse {} message RemoveContainerRequest { // ID of the container to remove. - optional string container_id = 1; + string container_id = 1; } message RemoveContainerResponse {} @@ -651,15 +674,21 @@ enum ContainerState { CONTAINER_UNKNOWN = 3; } +// ContainerStateValue is the wrapper of ContainerState. +message ContainerStateValue { + // State of the container. + ContainerState state = 1; +} + // ContainerFilter is used to filter containers. // All those fields are combined with 'AND' message ContainerFilter { // ID of the container. - optional string id = 1; + string id = 1; // State of the container. - optional ContainerState state = 2; + ContainerStateValue state = 2; // ID of the PodSandbox. - optional string pod_sandbox_id = 3; + string pod_sandbox_id = 3; // LabelSelector to select matches. // Only api.MatchLabels is supported for now and the requirements // are ANDed. MatchExpressions is not supported yet. @@ -667,7 +696,7 @@ message ContainerFilter { } message ListContainersRequest { - optional ContainerFilter filter = 1; + ContainerFilter filter = 1; } // Container provides the runtime information for a container, such as ID, hash, @@ -675,20 +704,20 @@ message ListContainersRequest { message Container { // ID of the container, used by the container runtime to identify // a container. - optional string id = 1; + string id = 1; // ID of the sandbox to which this container belongs. - optional string pod_sandbox_id = 2; + string pod_sandbox_id = 2; // Metadata of the container. - optional ContainerMetadata metadata = 3; + ContainerMetadata metadata = 3; // Spec of the image. - optional ImageSpec image = 4; + ImageSpec image = 4; // Reference to the image in use. For most runtimes, this should be an // image ID. - optional string image_ref = 5; + string image_ref = 5; // State of the container. - optional ContainerState state = 6; + ContainerState state = 6; // Creation time of the container in nanoseconds. - optional int64 created_at = 7; + int64 created_at = 7; // Key-value pairs that may be used to scope and select individual resources. map labels = 8; // Unstructured key-value map holding arbitrary metadata. @@ -705,35 +734,35 @@ message ListContainersResponse { message ContainerStatusRequest { // ID of the container for which to retrieve status. - optional string container_id = 1; + string container_id = 1; } // ContainerStatus represents the status of a container. message ContainerStatus { // ID of the container. - optional string id = 1; + string id = 1; // Metadata of the container. - optional ContainerMetadata metadata = 2; + ContainerMetadata metadata = 2; // Status of the container. - optional ContainerState state = 3; + ContainerState state = 3; // Creation time of the container in nanoseconds. - optional int64 created_at = 4; - // Start time of the container in nanoseconds. - optional int64 started_at = 5; - // Finish time of the container in nanoseconds. - optional int64 finished_at = 6; - // Exit code of the container. - optional int32 exit_code = 7; + int64 created_at = 4; + // Start time of the container in nanoseconds. Default: 0 (not specified). + int64 started_at = 5; + // Finish time of the container in nanoseconds. Default: 0 (not specified). + int64 finished_at = 6; + // Exit code of the container. Only required when finished_at != 0. Default: 0. + int32 exit_code = 7; // Spec of the image. - optional ImageSpec image = 8; + ImageSpec image = 8; // Reference to the image in use. For most runtimes, this should be an // image ID - optional string image_ref = 9; + string image_ref = 9; // Brief CamelCase string explaining why container is in its current state. - optional string reason = 10; + string reason = 10; // Human-readable message indicating details about why container is in its // current state. - optional string message = 11; + string message = 11; // Key-value pairs that may be used to scope and select individual resources. map labels = 12; // Unstructured key-value map holding arbitrary metadata. @@ -747,97 +776,97 @@ message ContainerStatus { message ContainerStatusResponse { // Status of the container. - optional ContainerStatus status = 1; + ContainerStatus status = 1; } message ExecSyncRequest { // ID of the container. - optional string container_id = 1; + string container_id = 1; // Command to execute. repeated string cmd = 2; - // Timeout in seconds to stop the command. Default: run forever. - optional int64 timeout = 3; + // Timeout in seconds to stop the command. Default: 0 (run forever). + int64 timeout = 3; } message ExecSyncResponse { // Captured command stdout output. - optional bytes stdout = 1; + bytes stdout = 1; // Captured command stderr output. - optional bytes stderr = 2; - // Exit code the command finished with. - optional int32 exit_code = 3; + bytes stderr = 2; + // Exit code the command finished with. Default: 0 (success). + int32 exit_code = 3; } message ExecRequest { // ID of the container in which to execute the command. - optional string container_id = 1; + string container_id = 1; // Command to execute. repeated string cmd = 2; // Whether to exec the command in a TTY. - optional bool tty = 3; + bool tty = 3; // Whether to stream stdin. - optional bool stdin = 4; + bool stdin = 4; } message ExecResponse { // Fully qualified URL of the exec streaming server. - optional string url = 1; + string url = 1; } message AttachRequest { // ID of the container to which to attach. - optional string container_id = 1; + string container_id = 1; // Whether to stream stdin. - optional bool stdin = 2; + bool stdin = 2; // Whether the process being attached is running in a TTY. // This must match the TTY setting in the ContainerConfig. - optional bool tty = 3; + bool tty = 3; } message AttachResponse { // Fully qualified URL of the attach streaming server. - optional string url = 1; + string url = 1; } message PortForwardRequest { // ID of the container to which to forward the port. - optional string pod_sandbox_id = 1; + string pod_sandbox_id = 1; // Port to forward. repeated int32 port = 2; } message PortForwardResponse { // Fully qualified URL of the port-forward streaming server. - optional string url = 1; + string url = 1; } message ImageFilter { // Spec of the image. - optional ImageSpec image = 1; + ImageSpec image = 1; } message ListImagesRequest { // Filter to list images. - optional ImageFilter filter = 1; + ImageFilter filter = 1; } // Basic information about a container image. message Image { // ID of the image. - optional string id = 1; + string id = 1; // Other names by which this image is known. repeated string repo_tags = 2; // Digests by which this image is known. repeated string repo_digests = 3; - // Size of the image in bytes. - optional uint64 size = 4; + // Size of the image in bytes. Must be > 0. + uint64 size = 4; // UID that will run the command(s). This is used as a default if no user is // specified when creating the container. UID and the following user name // are mutually exclusive. - optional int64 uid = 5; + Int64Value uid = 5; // User name that will run the command(s). This is used if UID is not set // and no user is specified when creating container. - optional string username = 6; + string username = 6; } message ListImagesResponse { @@ -847,67 +876,67 @@ message ListImagesResponse { message ImageStatusRequest { // Spec of the image. - optional ImageSpec image = 1; + ImageSpec image = 1; } message ImageStatusResponse { // Status of the image. - optional Image image = 1; + Image image = 1; } // AuthConfig contains authorization information for connecting to a registry. message AuthConfig { - optional string username = 1; - optional string password = 2; - optional string auth = 3; - optional string server_address = 4; + string username = 1; + string password = 2; + string auth = 3; + string server_address = 4; // IdentityToken is used to authenticate the user and get // an access token for the registry. - optional string identity_token = 5; + string identity_token = 5; // RegistryToken is a bearer token to be sent to a registry - optional string registry_token = 6; + string registry_token = 6; } message PullImageRequest { // Spec of the image. - optional ImageSpec image = 1; + ImageSpec image = 1; // Authentication configuration for pulling the image. - optional AuthConfig auth = 2; + AuthConfig auth = 2; // Config of the PodSandbox, which is used to pull image in PodSandbox context. - optional PodSandboxConfig sandbox_config = 3; + PodSandboxConfig sandbox_config = 3; } message PullImageResponse { // Reference to the image in use. For most runtimes, this should be an // image ID or digest. - optional string image_ref = 1; + string image_ref = 1; } message RemoveImageRequest { // Spec of the image to remove. - optional ImageSpec image = 1; + ImageSpec image = 1; } message RemoveImageResponse {} message NetworkConfig { // CIDR to use for pod IP addresses. - optional string pod_cidr = 1; + string pod_cidr = 1; } message RuntimeConfig { - optional NetworkConfig network_config = 1; + NetworkConfig network_config = 1; } message UpdateRuntimeConfigRequest { - optional RuntimeConfig runtime_config = 1; + RuntimeConfig runtime_config = 1; } message UpdateRuntimeConfigResponse {} // RuntimeCondition contains condition information for the runtime. // There are 2 kinds of runtime conditions: -// 1. Required condtitions: Conditions are required for kubelet to work +// 1. Required conditions: Conditions are required for kubelet to work // properly. If any required condition is unmet, the node will be not ready. // The required conditions include: // * RuntimeReady: RuntimeReady means the runtime is up and ready to accept @@ -920,13 +949,13 @@ message UpdateRuntimeConfigResponse {} // them understand the status of the system. message RuntimeCondition { // Type of runtime condition. - optional string type = 1; - // Status of the condition, one of true/false. - optional bool status = 2; + string type = 1; + // Status of the condition, one of true/false. Default: false. + bool status = 2; // Brief CamelCase string containing reason for the condition's last transition. - optional string reason = 3; + string reason = 3; // Human-readable message indicating details about last transition. - optional string message = 4; + string message = 4; } // RuntimeStatus is information about the current status of the runtime. @@ -939,5 +968,5 @@ message StatusRequest {} message StatusResponse { // Status of the Runtime. - optional RuntimeStatus status = 1; + RuntimeStatus status = 1; } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/client/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/client/BUILD index 7da01585..57124297 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/client/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/client/BUILD @@ -14,12 +14,12 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/api/v1:go_default_library", - "//pkg/client/restclient:go_default_library", - "//pkg/client/transport:go_default_library", "//pkg/util/node:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/net", + "//vendor:k8s.io/client-go/rest", + "//vendor:k8s.io/client-go/transport", ], ) @@ -33,7 +33,7 @@ go_test( ], deps = [ "//pkg/client/clientset_generated/clientset/typed/core/v1:go_default_library", - "//pkg/client/restclient:go_default_library", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/client/kubelet_client.go b/vendor/k8s.io/kubernetes/pkg/kubelet/client/kubelet_client.go index d004e28e..dc886488 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/client/kubelet_client.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/client/kubelet_client.go @@ -24,9 +24,9 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" utilnet "k8s.io/apimachinery/pkg/util/net" + restclient "k8s.io/client-go/rest" + "k8s.io/client-go/transport" "k8s.io/kubernetes/pkg/api/v1" - "k8s.io/kubernetes/pkg/client/restclient" - "k8s.io/kubernetes/pkg/client/transport" nodeutil "k8s.io/kubernetes/pkg/util/node" ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/client/kubelet_client_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/client/kubelet_client_test.go index c2b008d1..9e8abe24 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/client/kubelet_client_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/client/kubelet_client_test.go @@ -19,8 +19,8 @@ package client import ( "testing" + restclient "k8s.io/client-go/rest" v1core "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1" - "k8s.io/kubernetes/pkg/client/restclient" ) // Ensure a node client can be used as a NodeGetter. diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/container_manager_linux_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/container_manager_linux_test.go index 37a4d645..31e8c535 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/cm/container_manager_linux_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/cm/container_manager_linux_test.go @@ -152,6 +152,7 @@ func TestSoftRequirementsValidationSuccess(t *testing.T) { req := require.New(t) tempDir, err := ioutil.TempDir("", "") req.NoError(err) + defer os.RemoveAll(tempDir) req.NoError(ioutil.WriteFile(path.Join(tempDir, "cpu.cfs_period_us"), []byte("0"), os.ModePerm)) req.NoError(ioutil.WriteFile(path.Join(tempDir, "cpu.cfs_quota_us"), []byte("0"), os.ModePerm)) mountInt := &fakeMountInterface{ diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/config/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/config/BUILD index 5a88825f..e9a43b30 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/config/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/config/BUILD @@ -29,7 +29,6 @@ go_library( "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", "//pkg/client/record:go_default_library", - "//pkg/fields:go_default_library", "//pkg/kubelet/container:go_default_library", "//pkg/kubelet/events:go_default_library", "//pkg/kubelet/types:go_default_library", @@ -38,6 +37,8 @@ go_library( "//pkg/util/hash:go_default_library", "//vendor:github.com/golang/glog", "//vendor:golang.org/x/exp/inotify", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/sets", @@ -67,12 +68,12 @@ go_test( "//pkg/client/record:go_default_library", "//pkg/kubelet/types:go_default_library", "//pkg/securitycontext:go_default_library", - "//pkg/util/testing:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/wait", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/util/testing", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/config/apiserver.go b/vendor/k8s.io/kubernetes/pkg/kubelet/config/apiserver.go index 9265277c..e35e595b 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/config/apiserver.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/config/apiserver.go @@ -18,18 +18,19 @@ limitations under the License. package config import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/cache" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/fields" kubetypes "k8s.io/kubernetes/pkg/kubelet/types" ) // NewSourceApiserver creates a config source that watches and pulls from the apiserver. func NewSourceApiserver(c *clientset.Clientset, nodeName types.NodeName, updates chan<- interface{}) { - lw := cache.NewListWatchFromClient(c.Core().RESTClient(), "pods", v1.NamespaceAll, fields.OneTermEqualSelector(api.PodHostField, string(nodeName))) + lw := cache.NewListWatchFromClient(c.Core().RESTClient(), "pods", metav1.NamespaceAll, fields.OneTermEqualSelector(api.PodHostField, string(nodeName))) newSourceApiserverFromLW(lw, updates) } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/config/apiserver_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/config/apiserver_test.go index 8b3656a2..55d8137b 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/config/apiserver_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/config/apiserver_test.go @@ -19,6 +19,7 @@ package config import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" "k8s.io/kubernetes/pkg/api" @@ -32,11 +33,11 @@ type fakePodLW struct { watchResp watch.Interface } -func (lw fakePodLW) List(options v1.ListOptions) (runtime.Object, error) { +func (lw fakePodLW) List(options metav1.ListOptions) (runtime.Object, error) { return lw.listResp, nil } -func (lw fakePodLW) Watch(options v1.ListOptions) (watch.Interface, error) { +func (lw fakePodLW) Watch(options metav1.ListOptions) (watch.Interface, error) { return lw.watchResp, nil } @@ -44,13 +45,13 @@ var _ cache.ListerWatcher = fakePodLW{} func TestNewSourceApiserver_UpdatesAndMultiplePods(t *testing.T) { pod1v1 := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{Name: "p"}, + ObjectMeta: metav1.ObjectMeta{Name: "p"}, Spec: v1.PodSpec{Containers: []v1.Container{{Image: "image/one"}}}} pod1v2 := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{Name: "p"}, + ObjectMeta: metav1.ObjectMeta{Name: "p"}, Spec: v1.PodSpec{Containers: []v1.Container{{Image: "image/two"}}}} pod2 := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{Name: "q"}, + ObjectMeta: metav1.ObjectMeta{Name: "q"}, Spec: v1.PodSpec{Containers: []v1.Container{{Image: "image/blah"}}}} // Setup fake api client. @@ -130,10 +131,10 @@ func TestNewSourceApiserver_UpdatesAndMultiplePods(t *testing.T) { func TestNewSourceApiserver_TwoNamespacesSameName(t *testing.T) { pod1 := v1.Pod{ - ObjectMeta: v1.ObjectMeta{Name: "p", Namespace: "one"}, + ObjectMeta: metav1.ObjectMeta{Name: "p", Namespace: "one"}, Spec: v1.PodSpec{Containers: []v1.Container{{Image: "image/one"}}}} pod2 := v1.Pod{ - ObjectMeta: v1.ObjectMeta{Name: "p", Namespace: "two"}, + ObjectMeta: metav1.ObjectMeta{Name: "p", Namespace: "two"}, Spec: v1.PodSpec{Containers: []v1.Container{{Image: "image/blah"}}}} // Setup fake api client. diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/config/common.go b/vendor/k8s.io/kubernetes/pkg/kubelet/config/common.go index 82c499a7..d53751bf 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/config/common.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/config/common.go @@ -22,6 +22,7 @@ import ( "encoding/hex" "fmt" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" utilyaml "k8s.io/apimachinery/pkg/util/yaml" @@ -57,7 +58,7 @@ func applyDefaults(pod *api.Pod, source string, isFile bool, nodeName types.Node glog.V(5).Infof("Generated Name %q for UID %q from URL %s", pod.Name, pod.UID, source) if pod.Namespace == "" { - pod.Namespace = kubetypes.NamespaceDefault + pod.Namespace = metav1.NamespaceDefault } glog.V(5).Infof("Using namespace %q for pod %q from %s", pod.Namespace, pod.Name, source) @@ -80,7 +81,7 @@ func applyDefaults(pod *api.Pod, source string, isFile bool, nodeName types.Node func getSelfLink(name, namespace string) string { var selfLink string if len(namespace) == 0 { - namespace = api.NamespaceDefault + namespace = metav1.NamespaceDefault } selfLink = fmt.Sprintf("/api/"+api.Registry.GroupOrDie(api.GroupName).GroupVersion.Version+"/pods/namespaces/%s/%s", name, namespace) return selfLink diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/config/common_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/config/common_test.go index b1a5c00d..47774f91 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/config/common_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/config/common_test.go @@ -36,7 +36,7 @@ func TestDecodeSinglePod(t *testing.T) { TypeMeta: metav1.TypeMeta{ APIVersion: "", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test", UID: "12345", Namespace: "mynamespace", @@ -46,13 +46,15 @@ func TestDecodeSinglePod(t *testing.T) { DNSPolicy: v1.DNSClusterFirst, TerminationGracePeriodSeconds: &grace, Containers: []v1.Container{{ - Name: "image", - Image: "test/image", - ImagePullPolicy: "IfNotPresent", - TerminationMessagePath: "/dev/termination-log", - SecurityContext: securitycontext.ValidSecurityContextWithContainerDefaults(), + Name: "image", + Image: "test/image", + ImagePullPolicy: "IfNotPresent", + TerminationMessagePath: "/dev/termination-log", + TerminationMessagePolicy: v1.TerminationMessageReadFile, + SecurityContext: securitycontext.ValidSecurityContextWithContainerDefaults(), }}, SecurityContext: &v1.PodSecurityContext{}, + SchedulerName: api.DefaultSchedulerName, }, } json, err := runtime.Encode(testapi.Default.Codec(), pod) @@ -96,7 +98,7 @@ func TestDecodePodList(t *testing.T) { TypeMeta: metav1.TypeMeta{ APIVersion: "", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test", UID: "12345", Namespace: "mynamespace", @@ -106,13 +108,16 @@ func TestDecodePodList(t *testing.T) { DNSPolicy: v1.DNSClusterFirst, TerminationGracePeriodSeconds: &grace, Containers: []v1.Container{{ - Name: "image", - Image: "test/image", - ImagePullPolicy: "IfNotPresent", - TerminationMessagePath: "/dev/termination-log", - SecurityContext: securitycontext.ValidSecurityContextWithContainerDefaults(), + Name: "image", + Image: "test/image", + ImagePullPolicy: "IfNotPresent", + TerminationMessagePath: "/dev/termination-log", + TerminationMessagePolicy: v1.TerminationMessageReadFile, + + SecurityContext: securitycontext.ValidSecurityContextWithContainerDefaults(), }}, SecurityContext: &v1.PodSecurityContext{}, + SchedulerName: api.DefaultSchedulerName, }, } podList := &v1.PodList{ diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/config/config_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/config/config_test.go index 222ab674..92de495c 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/config/config_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/config/config_test.go @@ -59,7 +59,7 @@ func (s sortedPods) Less(i, j int) bool { func CreateValidPod(name, namespace string) *v1.Pod { return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: types.UID(name), // for the purpose of testing, this is unique enough Name: name, Namespace: namespace, @@ -69,10 +69,11 @@ func CreateValidPod(name, namespace string) *v1.Pod { DNSPolicy: v1.DNSClusterFirst, Containers: []v1.Container{ { - Name: "ctr", - Image: "image", - ImagePullPolicy: "IfNotPresent", - SecurityContext: securitycontext.ValidSecurityContextWithContainerDefaults(), + Name: "ctr", + Image: "image", + ImagePullPolicy: "IfNotPresent", + SecurityContext: securitycontext.ValidSecurityContextWithContainerDefaults(), + TerminationMessagePolicy: v1.TerminationMessageReadFile, }, }, }, @@ -186,7 +187,7 @@ func TestInvalidPodFiltered(t *testing.T) { expectPodUpdate(t, ch, CreatePodUpdate(kubetypes.ADD, TestSource, CreateValidPod("foo", "new"))) // add an invalid update - podUpdate = CreatePodUpdate(kubetypes.UPDATE, TestSource, &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "foo"}}) + podUpdate = CreatePodUpdate(kubetypes.UPDATE, TestSource, &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}) channel <- podUpdate expectNoPodUpdate(t, ch) } @@ -204,7 +205,7 @@ func TestNewPodAddedSnapshotAndUpdates(t *testing.T) { // container updates are separated as UPDATE pod := *podUpdate.Pods[0] - pod.Spec.Containers = []v1.Container{{Name: "bar", Image: "test", ImagePullPolicy: v1.PullIfNotPresent}} + pod.Spec.Containers = []v1.Container{{Name: "bar", Image: "test", ImagePullPolicy: v1.PullIfNotPresent, TerminationMessagePolicy: v1.TerminationMessageReadFile}} channel <- CreatePodUpdate(kubetypes.ADD, TestSource, &pod) expectPodUpdate(t, ch, CreatePodUpdate(kubetypes.UPDATE, TestSource, &pod)) } @@ -222,7 +223,7 @@ func TestNewPodAddedSnapshot(t *testing.T) { // container updates are separated as UPDATE pod := *podUpdate.Pods[0] - pod.Spec.Containers = []v1.Container{{Name: "bar", Image: "test", ImagePullPolicy: v1.PullIfNotPresent}} + pod.Spec.Containers = []v1.Container{{Name: "bar", Image: "test", ImagePullPolicy: v1.PullIfNotPresent, TerminationMessagePolicy: v1.TerminationMessageReadFile}} channel <- CreatePodUpdate(kubetypes.ADD, TestSource, &pod) expectPodUpdate(t, ch, CreatePodUpdate(kubetypes.SET, TestSource, &pod)) } @@ -240,12 +241,12 @@ func TestNewPodAddedUpdatedRemoved(t *testing.T) { // an kubetypes.ADD should be converted to kubetypes.UPDATE pod := CreateValidPod("foo", "new") - pod.Spec.Containers = []v1.Container{{Name: "bar", Image: "test", ImagePullPolicy: v1.PullIfNotPresent}} + pod.Spec.Containers = []v1.Container{{Name: "bar", Image: "test", ImagePullPolicy: v1.PullIfNotPresent, TerminationMessagePolicy: v1.TerminationMessageReadFile}} podUpdate = CreatePodUpdate(kubetypes.ADD, TestSource, pod) channel <- podUpdate expectPodUpdate(t, ch, CreatePodUpdate(kubetypes.UPDATE, TestSource, pod)) - podUpdate = CreatePodUpdate(kubetypes.REMOVE, TestSource, &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "foo", Namespace: "new"}}) + podUpdate = CreatePodUpdate(kubetypes.REMOVE, TestSource, &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "new"}}) channel <- podUpdate expectPodUpdate(t, ch, CreatePodUpdate(kubetypes.REMOVE, TestSource, pod)) } @@ -282,7 +283,7 @@ func TestNewPodAddedUpdatedSet(t *testing.T) { // should be converted to an kubetypes.ADD, kubetypes.REMOVE, and kubetypes.UPDATE pod := CreateValidPod("foo2", "new") - pod.Spec.Containers = []v1.Container{{Name: "bar", Image: "test", ImagePullPolicy: v1.PullIfNotPresent}} + pod.Spec.Containers = []v1.Container{{Name: "bar", Image: "test", ImagePullPolicy: v1.PullIfNotPresent, TerminationMessagePolicy: v1.TerminationMessageReadFile}} podUpdate = CreatePodUpdate(kubetypes.SET, TestSource, pod, CreateValidPod("foo3", "new"), CreateValidPod("foo4", "new")) channel <- podUpdate expectPodUpdate(t, ch, diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/config/file_linux_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/config/file_linux_test.go index 95bda1c7..c2091a72 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/config/file_linux_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/config/file_linux_test.go @@ -33,13 +33,13 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/wait" + utiltesting "k8s.io/client-go/util/testing" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/api/validation" kubetypes "k8s.io/kubernetes/pkg/kubelet/types" "k8s.io/kubernetes/pkg/securitycontext" - utiltesting "k8s.io/kubernetes/pkg/util/testing" ) func TestExtractFromNonExistentFile(t *testing.T) { @@ -180,7 +180,7 @@ func getTestCases(hostname types.NodeName) []*testCase { Kind: "Pod", APIVersion: "", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test", UID: "12345", Namespace: "mynamespace", @@ -188,13 +188,14 @@ func getTestCases(hostname types.NodeName) []*testCase { Spec: v1.PodSpec{ Containers: []v1.Container{{Name: "image", Image: "test/image", SecurityContext: securitycontext.ValidSecurityContextWithContainerDefaults()}}, SecurityContext: &v1.PodSecurityContext{}, + SchedulerName: api.DefaultSchedulerName, }, Status: v1.PodStatus{ Phase: v1.PodPending, }, }, expected: CreatePodUpdate(kubetypes.SET, kubetypes.FileSource, &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test-" + string(hostname), UID: "12345", Namespace: "mynamespace", @@ -209,10 +210,13 @@ func getTestCases(hostname types.NodeName) []*testCase { Containers: []v1.Container{{ Name: "image", Image: "test/image", - TerminationMessagePath: "/dev/termination-log", - ImagePullPolicy: "Always", - SecurityContext: securitycontext.ValidSecurityContextWithContainerDefaults()}}, + TerminationMessagePath: "/dev/termination-log", + ImagePullPolicy: "Always", + SecurityContext: securitycontext.ValidSecurityContextWithContainerDefaults(), + TerminationMessagePolicy: v1.TerminationMessageReadFile, + }}, SecurityContext: &v1.PodSecurityContext{}, + SchedulerName: api.DefaultSchedulerName, }, Status: v1.PodStatus{ Phase: v1.PodPending, diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/config/http_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/config/http_test.go index a87eb827..794dbabf 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/config/http_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/config/http_test.go @@ -26,12 +26,12 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" + utiltesting "k8s.io/client-go/util/testing" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/api/validation" kubetypes "k8s.io/kubernetes/pkg/kubelet/types" - utiltesting "k8s.io/kubernetes/pkg/util/testing" ) func TestURLErrorNotExistNoUpdate(t *testing.T) { @@ -138,15 +138,16 @@ func TestExtractPodsFromHTTP(t *testing.T) { Kind: "Pod", APIVersion: "", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", UID: "111", Namespace: "mynamespace", }, Spec: v1.PodSpec{ NodeName: string(nodeName), - Containers: []v1.Container{{Name: "1", Image: "foo", ImagePullPolicy: v1.PullAlways}}, + Containers: []v1.Container{{Name: "1", Image: "foo", ImagePullPolicy: v1.PullAlways, TerminationMessagePolicy: v1.TerminationMessageReadFile}}, SecurityContext: &v1.PodSecurityContext{}, + SchedulerName: api.DefaultSchedulerName, }, Status: v1.PodStatus{ Phase: v1.PodPending, @@ -155,7 +156,7 @@ func TestExtractPodsFromHTTP(t *testing.T) { expected: CreatePodUpdate(kubetypes.SET, kubetypes.HTTPSource, &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "111", Name: "foo" + "-" + nodeName, Namespace: "mynamespace", @@ -168,12 +169,14 @@ func TestExtractPodsFromHTTP(t *testing.T) { DNSPolicy: v1.DNSClusterFirst, SecurityContext: &v1.PodSecurityContext{}, TerminationGracePeriodSeconds: &grace, + SchedulerName: api.DefaultSchedulerName, Containers: []v1.Container{{ Name: "1", Image: "foo", - TerminationMessagePath: "/dev/termination-log", - ImagePullPolicy: "Always", + TerminationMessagePath: "/dev/termination-log", + ImagePullPolicy: "Always", + TerminationMessagePolicy: v1.TerminationMessageReadFile, }}, }, Status: v1.PodStatus{ @@ -190,28 +193,30 @@ func TestExtractPodsFromHTTP(t *testing.T) { }, Items: []v1.Pod{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", UID: "111", }, Spec: v1.PodSpec{ NodeName: nodeName, - Containers: []v1.Container{{Name: "1", Image: "foo", ImagePullPolicy: v1.PullAlways}}, + Containers: []v1.Container{{Name: "1", Image: "foo", ImagePullPolicy: v1.PullAlways, TerminationMessagePolicy: v1.TerminationMessageReadFile}}, SecurityContext: &v1.PodSecurityContext{}, + SchedulerName: api.DefaultSchedulerName, }, Status: v1.PodStatus{ Phase: v1.PodPending, }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "bar", UID: "222", }, Spec: v1.PodSpec{ NodeName: nodeName, - Containers: []v1.Container{{Name: "2", Image: "bar:bartag", ImagePullPolicy: ""}}, + Containers: []v1.Container{{Name: "2", Image: "bar:bartag", ImagePullPolicy: "", TerminationMessagePolicy: v1.TerminationMessageReadFile}}, SecurityContext: &v1.PodSecurityContext{}, + SchedulerName: api.DefaultSchedulerName, }, Status: v1.PodStatus{ Phase: v1.PodPending, @@ -222,12 +227,12 @@ func TestExtractPodsFromHTTP(t *testing.T) { expected: CreatePodUpdate(kubetypes.SET, kubetypes.HTTPSource, &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "111", Name: "foo" + "-" + nodeName, Namespace: "default", Annotations: map[string]string{kubetypes.ConfigHashAnnotationKey: "111"}, - SelfLink: getSelfLink("foo-"+nodeName, kubetypes.NamespaceDefault), + SelfLink: getSelfLink("foo-"+nodeName, metav1.NamespaceDefault), }, Spec: v1.PodSpec{ NodeName: nodeName, @@ -235,12 +240,14 @@ func TestExtractPodsFromHTTP(t *testing.T) { DNSPolicy: v1.DNSClusterFirst, TerminationGracePeriodSeconds: &grace, SecurityContext: &v1.PodSecurityContext{}, + SchedulerName: api.DefaultSchedulerName, Containers: []v1.Container{{ Name: "1", Image: "foo", - TerminationMessagePath: "/dev/termination-log", - ImagePullPolicy: "Always", + TerminationMessagePath: "/dev/termination-log", + ImagePullPolicy: "Always", + TerminationMessagePolicy: v1.TerminationMessageReadFile, }}, }, Status: v1.PodStatus{ @@ -248,12 +255,12 @@ func TestExtractPodsFromHTTP(t *testing.T) { }, }, &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "222", Name: "bar" + "-" + nodeName, Namespace: "default", Annotations: map[string]string{kubetypes.ConfigHashAnnotationKey: "222"}, - SelfLink: getSelfLink("bar-"+nodeName, kubetypes.NamespaceDefault), + SelfLink: getSelfLink("bar-"+nodeName, metav1.NamespaceDefault), }, Spec: v1.PodSpec{ NodeName: nodeName, @@ -261,12 +268,14 @@ func TestExtractPodsFromHTTP(t *testing.T) { DNSPolicy: v1.DNSClusterFirst, TerminationGracePeriodSeconds: &grace, SecurityContext: &v1.PodSecurityContext{}, + SchedulerName: api.DefaultSchedulerName, Containers: []v1.Container{{ Name: "2", Image: "bar:bartag", - TerminationMessagePath: "/dev/termination-log", - ImagePullPolicy: "IfNotPresent", + TerminationMessagePath: "/dev/termination-log", + ImagePullPolicy: "IfNotPresent", + TerminationMessagePolicy: v1.TerminationMessageReadFile, }}, }, Status: v1.PodStatus{ @@ -322,7 +331,7 @@ func TestURLWithHeader(t *testing.T) { APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String(), Kind: "Pod", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", UID: "111", Namespace: "mynamespace", diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/container/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/container/BUILD index 5abab43a..f4d5cce4 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/container/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/container/BUILD @@ -31,7 +31,6 @@ go_library( "//pkg/kubelet/api/v1alpha1/runtime:go_default_library", "//pkg/kubelet/util/format:go_default_library", "//pkg/kubelet/util/ioutils:go_default_library", - "//pkg/util/flowcontrol:go_default_library", "//pkg/util/hash:go_default_library", "//pkg/util/term:go_default_library", "//pkg/volume:go_default_library", @@ -43,6 +42,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/errors", "//vendor:k8s.io/apimachinery/pkg/util/runtime", + "//vendor:k8s.io/client-go/util/flowcontrol", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/container/helpers.go b/vendor/k8s.io/kubernetes/pkg/kubelet/container/helpers.go index 6b7acd6a..109bc6de 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/container/helpers.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/container/helpers.go @@ -197,14 +197,14 @@ func ConvertPodStatusToRunningPod(runtimeName string, podStatus *PodStatus) Pod // Populate sandboxes in kubecontainer.Pod for _, sandbox := range podStatus.SandboxStatuses { runningPod.Sandboxes = append(runningPod.Sandboxes, &Container{ - ID: ContainerID{Type: runtimeName, ID: *sandbox.Id}, - State: SandboxToContainerState(*sandbox.State), + ID: ContainerID{Type: runtimeName, ID: sandbox.Id}, + State: SandboxToContainerState(sandbox.State), }) } return runningPod } -// sandboxToContainerState converts runtimeApi.PodSandboxState to +// SandboxToContainerState converts runtimeapi.PodSandboxState to // kubecontainer.ContainerState. // This is only needed because we need to return sandboxes as if they were // kubecontainer.Containers to avoid substantial changes to PLEG. diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/container/helpers_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/container/helpers_test.go index 0f685561..13d65469 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/container/helpers_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/container/helpers_test.go @@ -20,6 +20,7 @@ import ( "reflect" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" ) @@ -137,7 +138,7 @@ func TestExpandCommandAndArgs(t *testing.T) { func TestShouldContainerBeRestarted(t *testing.T) { pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "12345678", Name: "foo", Namespace: "new", diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/container/os.go b/vendor/k8s.io/kubernetes/pkg/kubelet/container/os.go index 18e5221e..6126063b 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/container/os.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/container/os.go @@ -32,6 +32,7 @@ type OSInterface interface { Remove(path string) error RemoveAll(path string) error Create(path string) (*os.File, error) + Chmod(path string, perm os.FileMode) error Hostname() (name string, err error) Chtimes(path string, atime time.Time, mtime time.Time) error Pipe() (r *os.File, w *os.File, err error) @@ -73,6 +74,12 @@ func (RealOS) Create(path string) (*os.File, error) { return os.Create(path) } +// Chmod will change the permissions on the specified path or return +// an error. +func (RealOS) Chmod(path string, perm os.FileMode) error { + return os.Chmod(path, perm) +} + // Hostname will call os.Hostname to return the hostname. func (RealOS) Hostname() (name string, err error) { return os.Hostname() diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/container/ref_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/container/ref_test.go index 86b5e67b..3be777d9 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/container/ref_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/container/ref_test.go @@ -69,7 +69,7 @@ func TestGenerateContainerRef(t *testing.T) { Kind: "Pod", APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String(), }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "ok", Namespace: "test-ns", UID: "bar", diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/container/runtime.go b/vendor/k8s.io/kubernetes/pkg/kubelet/container/runtime.go index 5f68e65c..3997d02f 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/container/runtime.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/container/runtime.go @@ -26,9 +26,9 @@ import ( "github.com/golang/glog" "k8s.io/apimachinery/pkg/types" + "k8s.io/client-go/util/flowcontrol" "k8s.io/kubernetes/pkg/api/v1" runtimeapi "k8s.io/kubernetes/pkg/kubelet/api/v1alpha1/runtime" - "k8s.io/kubernetes/pkg/util/flowcontrol" "k8s.io/kubernetes/pkg/util/term" "k8s.io/kubernetes/pkg/volume" ) @@ -626,3 +626,19 @@ func (s SortContainerStatusesByCreationTime) Swap(i, j int) { s[i], s[j] = s[j], func (s SortContainerStatusesByCreationTime) Less(i, j int) bool { return s[i].CreatedAt.Before(s[j].CreatedAt) } + +const ( + // MaxPodTerminationMessageLogLength is the maximum bytes any one pod may have written + // as termination message output across all containers. Containers will be evenly truncated + // until output is below this limit. + MaxPodTerminationMessageLogLength = 1024 * 12 + // MaxContainerTerminationMessageLength is the upper bound any one container may write to + // its termination message path. Contents above this length will be truncated. + MaxContainerTerminationMessageLength = 1024 * 4 + // MaxContainerTerminationMessageLogLength is the maximum bytes any one container will + // have written to its termination message when the message is read from the logs. + MaxContainerTerminationMessageLogLength = 1024 * 2 + // MaxContainerTerminationMessageLogLines is the maximum number of previous lines of + // log output that the termination message can contain. + MaxContainerTerminationMessageLogLines = 80 +) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/container/testing/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/container/testing/BUILD index 9f6f6a75..69db1832 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/container/testing/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/container/testing/BUILD @@ -20,12 +20,12 @@ go_library( deps = [ "//pkg/api/v1:go_default_library", "//pkg/kubelet/container:go_default_library", - "//pkg/util/flowcontrol:go_default_library", "//pkg/util/term:go_default_library", "//pkg/volume:go_default_library", "//vendor:github.com/golang/mock/gomock", "//vendor:github.com/stretchr/testify/mock", "//vendor:k8s.io/apimachinery/pkg/types", + "//vendor:k8s.io/client-go/util/flowcontrol", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/container/testing/fake_runtime.go b/vendor/k8s.io/kubernetes/pkg/kubelet/container/testing/fake_runtime.go index f207b54e..5ae3f2fd 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/container/testing/fake_runtime.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/container/testing/fake_runtime.go @@ -25,9 +25,9 @@ import ( "time" "k8s.io/apimachinery/pkg/types" + "k8s.io/client-go/util/flowcontrol" "k8s.io/kubernetes/pkg/api/v1" . "k8s.io/kubernetes/pkg/kubelet/container" - "k8s.io/kubernetes/pkg/util/flowcontrol" "k8s.io/kubernetes/pkg/util/term" "k8s.io/kubernetes/pkg/volume" ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/container/testing/os.go b/vendor/k8s.io/kubernetes/pkg/kubelet/container/testing/os.go index e70c2809..ee8d255b 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/container/testing/os.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/container/testing/os.go @@ -83,6 +83,11 @@ func (FakeOS) Create(path string) (*os.File, error) { return nil, nil } +// Chmod is a fake call that returns nil. +func (FakeOS) Chmod(path string, perm os.FileMode) error { + return nil +} + // Hostname is a fake call that returns nil. func (f *FakeOS) Hostname() (name string, err error) { return f.HostName, nil diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/container/testing/runtime_mock.go b/vendor/k8s.io/kubernetes/pkg/kubelet/container/testing/runtime_mock.go index c7dd1973..a3a0115c 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/container/testing/runtime_mock.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/container/testing/runtime_mock.go @@ -22,9 +22,9 @@ import ( "github.com/stretchr/testify/mock" "k8s.io/apimachinery/pkg/types" + "k8s.io/client-go/util/flowcontrol" "k8s.io/kubernetes/pkg/api/v1" . "k8s.io/kubernetes/pkg/kubelet/container" - "k8s.io/kubernetes/pkg/util/flowcontrol" "k8s.io/kubernetes/pkg/util/term" "k8s.io/kubernetes/pkg/volume" ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/BUILD index f661e0f9..03e8ce19 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/BUILD @@ -49,7 +49,6 @@ go_library( "//vendor:github.com/docker/engine-api/types/versions", "//vendor:github.com/docker/go-connections/nat", "//vendor:github.com/golang/glog", - "//vendor:github.com/golang/protobuf/proto", ], ) @@ -78,12 +77,12 @@ go_test( "//pkg/kubelet/types:go_default_library", "//pkg/security/apparmor:go_default_library", "//pkg/securitycontext:go_default_library", - "//pkg/util/clock:go_default_library", "//vendor:github.com/docker/engine-api/types", "//vendor:github.com/docker/engine-api/types/container", "//vendor:github.com/golang/mock/gomock", "//vendor:github.com/stretchr/testify/assert", "//vendor:github.com/stretchr/testify/require", + "//vendor:k8s.io/client-go/util/clock", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/convert.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/convert.go index 7d067536..c8de3df4 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/convert.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/convert.go @@ -43,10 +43,10 @@ func imageToRuntimeAPIImage(image *dockertypes.Image) (*runtimeapi.Image, error) size := uint64(image.VirtualSize) return &runtimeapi.Image{ - Id: &image.ID, + Id: image.ID, RepoTags: image.RepoTags, RepoDigests: image.RepoDigests, - Size_: &size, + Size_: size, }, nil } @@ -57,13 +57,17 @@ func imageInspectToRuntimeAPIImage(image *dockertypes.ImageInspect) (*runtimeapi size := uint64(image.VirtualSize) runtimeImage := &runtimeapi.Image{ - Id: &image.ID, + Id: image.ID, RepoTags: image.RepoTags, RepoDigests: image.RepoDigests, - Size_: &size, + Size_: size, } - runtimeImage.Uid, runtimeImage.Username = getUserFromImageUser(image.Config.User) + uid, username := getUserFromImageUser(image.Config.User) + if uid != nil { + runtimeImage.Uid = &runtimeapi.Int64Value{Value: *uid} + } + runtimeImage.Username = username return runtimeImage, nil } @@ -91,13 +95,13 @@ func toRuntimeAPIContainer(c *dockertypes.Container) (*runtimeapi.Container, err // The timestamp in dockertypes.Container is in seconds. createdAt := c.Created * int64(time.Second) return &runtimeapi.Container{ - Id: &c.ID, - PodSandboxId: &sandboxID, + Id: c.ID, + PodSandboxId: sandboxID, Metadata: metadata, - Image: &runtimeapi.ImageSpec{Image: &c.Image}, - ImageRef: &c.ImageID, - State: &state, - CreatedAt: &createdAt, + Image: &runtimeapi.ImageSpec{Image: c.Image}, + ImageRef: c.ImageID, + State: state, + CreatedAt: createdAt, Labels: labels, Annotations: annotations, }, nil @@ -157,10 +161,10 @@ func toRuntimeAPISandbox(c *dockertypes.Container) (*runtimeapi.PodSandbox, erro // The timestamp in dockertypes.Container is in seconds. createdAt := c.Created * int64(time.Second) return &runtimeapi.PodSandbox{ - Id: &c.ID, + Id: c.ID, Metadata: metadata, - State: &state, - CreatedAt: &createdAt, + State: state, + CreatedAt: createdAt, Labels: labels, Annotations: annotations, }, nil diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_container.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_container.go index a990a300..5fb38c4d 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_container.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_container.go @@ -42,14 +42,14 @@ func (ds *dockerService) ListContainers(filter *runtimeapi.ContainerFilter) ([]* f.AddLabel(containerTypeLabelKey, containerTypeLabelContainer) if filter != nil { - if filter.Id != nil { - f.Add("id", filter.GetId()) + if filter.Id != "" { + f.Add("id", filter.Id) } if filter.State != nil { - f.Add("status", toDockerContainerStatus(filter.GetState())) + f.Add("status", toDockerContainerStatus(filter.GetState().State)) } - if filter.PodSandboxId != nil { - f.AddLabel(sandboxIDLabelKey, *filter.PodSandboxId) + if filter.PodSandboxId != "" { + f.AddLabel(sandboxIDLabelKey, filter.PodSandboxId) } if filter.LabelSelector != nil { @@ -87,35 +87,35 @@ func (ds *dockerService) CreateContainer(podSandboxID string, config *runtimeapi return "", fmt.Errorf("container config is nil") } if sandboxConfig == nil { - return "", fmt.Errorf("sandbox config is nil for container %q", config.Metadata.GetName()) + return "", fmt.Errorf("sandbox config is nil for container %q", config.Metadata.Name) } labels := makeLabels(config.GetLabels(), config.GetAnnotations()) // Apply a the container type label. labels[containerTypeLabelKey] = containerTypeLabelContainer // Write the container log path in the labels. - labels[containerLogPathLabelKey] = filepath.Join(sandboxConfig.GetLogDirectory(), config.GetLogPath()) + labels[containerLogPathLabelKey] = filepath.Join(sandboxConfig.LogDirectory, config.LogPath) // Write the sandbox ID in the labels. labels[sandboxIDLabelKey] = podSandboxID image := "" if iSpec := config.GetImage(); iSpec != nil { - image = iSpec.GetImage() + image = iSpec.Image } createConfig := dockertypes.ContainerCreateConfig{ Name: makeContainerName(sandboxConfig, config), Config: &dockercontainer.Config{ // TODO: set User. - Entrypoint: dockerstrslice.StrSlice(config.GetCommand()), - Cmd: dockerstrslice.StrSlice(config.GetArgs()), + Entrypoint: dockerstrslice.StrSlice(config.Command), + Cmd: dockerstrslice.StrSlice(config.Args), Env: generateEnvList(config.GetEnvs()), Image: image, - WorkingDir: config.GetWorkingDir(), + WorkingDir: config.WorkingDir, Labels: labels, // Interactive containers: - OpenStdin: config.GetStdin(), - StdinOnce: config.GetStdinOnce(), - Tty: config.GetTty(), + OpenStdin: config.Stdin, + StdinOnce: config.StdinOnce, + Tty: config.Tty, }, } @@ -132,13 +132,13 @@ func (ds *dockerService) CreateContainer(podSandboxID string, config *runtimeapi rOpts := lc.GetResources() if rOpts != nil { hc.Resources = dockercontainer.Resources{ - Memory: rOpts.GetMemoryLimitInBytes(), + Memory: rOpts.MemoryLimitInBytes, MemorySwap: dockertools.DefaultMemorySwap(), - CPUShares: rOpts.GetCpuShares(), - CPUQuota: rOpts.GetCpuQuota(), - CPUPeriod: rOpts.GetCpuPeriod(), + CPUShares: rOpts.CpuShares, + CPUQuota: rOpts.CpuQuota, + CPUPeriod: rOpts.CpuPeriod, } - hc.OomScoreAdj = int(rOpts.GetOomScoreAdj()) + hc.OomScoreAdj = int(rOpts.OomScoreAdj) } // Note: ShmSize is handled in kube_docker_client.go @@ -149,9 +149,9 @@ func (ds *dockerService) CreateContainer(podSandboxID string, config *runtimeapi // Apply cgroupsParent derived from the sandbox config. if lc := sandboxConfig.GetLinux(); lc != nil { // Apply Cgroup options. - cgroupParent, err := ds.GenerateExpectedCgroupParent(lc.GetCgroupParent()) + cgroupParent, err := ds.GenerateExpectedCgroupParent(lc.CgroupParent) if err != nil { - return "", fmt.Errorf("failed to generate cgroup parent in expected syntax for container %q: %v", config.Metadata.GetName(), err) + return "", fmt.Errorf("failed to generate cgroup parent in expected syntax for container %q: %v", config.Metadata.Name, err) } hc.CgroupParent = cgroupParent } @@ -160,17 +160,17 @@ func (ds *dockerService) CreateContainer(podSandboxID string, config *runtimeapi devices := make([]dockercontainer.DeviceMapping, len(config.Devices)) for i, device := range config.Devices { devices[i] = dockercontainer.DeviceMapping{ - PathOnHost: device.GetHostPath(), - PathInContainer: device.GetContainerPath(), - CgroupPermissions: device.GetPermissions(), + PathOnHost: device.HostPath, + PathInContainer: device.ContainerPath, + CgroupPermissions: device.Permissions, } } hc.Resources.Devices = devices // Apply appArmor and seccomp options. - securityOpts, err := getContainerSecurityOpts(config.Metadata.GetName(), sandboxConfig, ds.seccompProfileRoot) + securityOpts, err := getContainerSecurityOpts(config.Metadata.Name, sandboxConfig, ds.seccompProfileRoot) if err != nil { - return "", fmt.Errorf("failed to generate container security options for container %q: %v", config.Metadata.GetName(), err) + return "", fmt.Errorf("failed to generate container security options for container %q: %v", config.Metadata.Name, err) } hc.SecurityOpt = append(hc.SecurityOpt, securityOpts...) @@ -310,9 +310,9 @@ func (ds *dockerService) ContainerStatus(containerID string) (*runtimeapi.Contai m := r.Mounts[i] readonly := !m.RW mounts = append(mounts, &runtimeapi.Mount{ - HostPath: &m.Source, - ContainerPath: &m.Destination, - Readonly: &readonly, + HostPath: m.Source, + ContainerPath: m.Destination, + Readonly: readonly, // Note: Can't set SeLinuxRelabel }) } @@ -369,18 +369,18 @@ func (ds *dockerService) ContainerStatus(containerID string) (*runtimeapi.Contai imageName = ir.RepoTags[0] } return &runtimeapi.ContainerStatus{ - Id: &r.ID, + Id: r.ID, Metadata: metadata, - Image: &runtimeapi.ImageSpec{Image: &imageName}, - ImageRef: &imageID, + Image: &runtimeapi.ImageSpec{Image: imageName}, + ImageRef: imageID, Mounts: mounts, - ExitCode: &exitCode, - State: &state, - CreatedAt: &ct, - StartedAt: &st, - FinishedAt: &ft, - Reason: &reason, - Message: &message, + ExitCode: exitCode, + State: state, + CreatedAt: ct, + StartedAt: st, + FinishedAt: ft, + Reason: reason, + Message: message, Labels: labels, Annotations: annotations, }, nil diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_container_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_container_test.go index 609a11a3..ebabc71e 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_container_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_container_test.go @@ -32,10 +32,10 @@ import ( func makeContainerConfig(sConfig *runtimeapi.PodSandboxConfig, name, image string, attempt uint32, labels, annotations map[string]string) *runtimeapi.ContainerConfig { return &runtimeapi.ContainerConfig{ Metadata: &runtimeapi.ContainerMetadata{ - Name: &name, - Attempt: &attempt, + Name: name, + Attempt: attempt, }, - Image: &runtimeapi.ImageSpec{Image: &image}, + Image: &runtimeapi.ImageSpec{Image: image}, Labels: labels, Annotations: annotations, } @@ -77,12 +77,12 @@ func TestListContainers(t *testing.T) { // the most recent containers first. expected = append([]*runtimeapi.Container{{ Metadata: configs[i].Metadata, - Id: &id, - PodSandboxId: &sandboxID, - State: &state, - CreatedAt: &createdAt, + Id: id, + PodSandboxId: sandboxID, + State: state, + CreatedAt: createdAt, Image: configs[i].Image, - ImageRef: &imageRef, + ImageRef: imageRef, Labels: configs[i].Labels, Annotations: configs[i].Annotations, }}, expected...) @@ -112,16 +112,16 @@ func TestContainerStatus(t *testing.T) { var reason, message string expected := &runtimeapi.ContainerStatus{ - State: &state, - CreatedAt: &ct, - StartedAt: &st, - FinishedAt: &ft, + State: state, + CreatedAt: ct, + StartedAt: st, + FinishedAt: ft, Metadata: config.Metadata, Image: config.Image, - ImageRef: &imageRef, - ExitCode: &exitCode, - Reason: &reason, - Message: &message, + ImageRef: imageRef, + ExitCode: exitCode, + Reason: reason, + Message: message, Mounts: []*runtimeapi.Mount{}, Labels: config.Labels, Annotations: config.Annotations, @@ -129,7 +129,7 @@ func TestContainerStatus(t *testing.T) { // Create the container. fClock.SetTime(time.Now().Add(-1 * time.Hour)) - *expected.CreatedAt = fClock.Now().UnixNano() + expected.CreatedAt = fClock.Now().UnixNano() const sandboxId = "sandboxid" id, err := ds.CreateContainer(sandboxId, config, sConfig) @@ -140,7 +140,7 @@ func TestContainerStatus(t *testing.T) { assert.Equal(t, c.Config.Labels[sandboxIDLabelKey], sandboxId) // Set the id manually since we don't know the id until it's created. - expected.Id = &id + expected.Id = id assert.NoError(t, err) status, err := ds.ContainerStatus(id) assert.NoError(t, err) @@ -148,8 +148,8 @@ func TestContainerStatus(t *testing.T) { // Advance the clock and start the container. fClock.SetTime(time.Now()) - *expected.StartedAt = fClock.Now().UnixNano() - *expected.State = runtimeapi.ContainerState_CONTAINER_RUNNING + expected.StartedAt = fClock.Now().UnixNano() + expected.State = runtimeapi.ContainerState_CONTAINER_RUNNING err = ds.StartContainer(id) assert.NoError(t, err) @@ -158,9 +158,9 @@ func TestContainerStatus(t *testing.T) { // Advance the clock and stop the container. fClock.SetTime(time.Now().Add(1 * time.Hour)) - *expected.FinishedAt = fClock.Now().UnixNano() - *expected.State = runtimeapi.ContainerState_CONTAINER_EXITED - *expected.Reason = "Completed" + expected.FinishedAt = fClock.Now().UnixNano() + expected.State = runtimeapi.ContainerState_CONTAINER_EXITED + expected.Reason = "Completed" err = ds.StopContainer(id, 0) assert.NoError(t, err) @@ -181,9 +181,9 @@ func TestContainerLogPath(t *testing.T) { containerLogPath := "0" kubeletContainerLogPath := filepath.Join(podLogPath, containerLogPath) sConfig := makeSandboxConfig("foo", "bar", "1", 0) - sConfig.LogDirectory = &podLogPath + sConfig.LogDirectory = podLogPath config := makeContainerConfig(sConfig, "pause", "iamimage", 0, nil, nil) - config.LogPath = &containerLogPath + config.LogPath = containerLogPath const sandboxId = "sandboxid" id, err := ds.CreateContainer(sandboxId, config, sConfig) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_image.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_image.go index 15aa7d95..d568c516 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_image.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_image.go @@ -29,7 +29,7 @@ func (ds *dockerService) ListImages(filter *runtimeapi.ImageFilter) ([]*runtimea opts := dockertypes.ImageListOptions{} if filter != nil { if imgSpec := filter.GetImage(); imgSpec != nil { - opts.MatchName = imgSpec.GetImage() + opts.MatchName = imgSpec.Image } } @@ -52,7 +52,7 @@ func (ds *dockerService) ListImages(filter *runtimeapi.ImageFilter) ([]*runtimea // ImageStatus returns the status of the image, returns nil if the image doesn't present. func (ds *dockerService) ImageStatus(image *runtimeapi.ImageSpec) (*runtimeapi.Image, error) { - imageInspect, err := ds.client.InspectImageByRef(image.GetImage()) + imageInspect, err := ds.client.InspectImageByRef(image.Image) if err != nil { if dockertools.IsImageNotFoundError(err) { return nil, nil @@ -64,21 +64,23 @@ func (ds *dockerService) ImageStatus(image *runtimeapi.ImageSpec) (*runtimeapi.I // PullImage pulls an image with authentication config. func (ds *dockerService) PullImage(image *runtimeapi.ImageSpec, auth *runtimeapi.AuthConfig) (string, error) { - err := ds.client.PullImage(image.GetImage(), - dockertypes.AuthConfig{ - Username: auth.GetUsername(), - Password: auth.GetPassword(), - ServerAddress: auth.GetServerAddress(), - IdentityToken: auth.GetIdentityToken(), - RegistryToken: auth.GetRegistryToken(), - }, + authConfig := dockertypes.AuthConfig{} + if auth != nil { + authConfig.Username = auth.Username + authConfig.Password = auth.Password + authConfig.ServerAddress = auth.ServerAddress + authConfig.IdentityToken = auth.IdentityToken + authConfig.RegistryToken = auth.RegistryToken + } + err := ds.client.PullImage(image.Image, + authConfig, dockertypes.ImagePullOptions{}, ) if err != nil { return "", err } - return dockertools.GetImageRef(ds.client, image.GetImage()) + return dockertools.GetImageRef(ds.client, image.Image) } // RemoveImage removes the image. @@ -86,7 +88,7 @@ func (ds *dockerService) RemoveImage(image *runtimeapi.ImageSpec) error { // If the image has multiple tags, we need to remove all the tags // TODO: We assume image.Image is image ID here, which is true in the current implementation // of kubelet, but we should still clarify this in CRI. - imageInspect, err := ds.client.InspectImageByID(image.GetImage()) + imageInspect, err := ds.client.InspectImageByID(image.Image) if err == nil && imageInspect != nil && len(imageInspect.RepoTags) > 1 { for _, tag := range imageInspect.RepoTags { if _, err := ds.client.RemoveImage(tag, dockertypes.ImageRemoveOptions{PruneChildren: true}); err != nil { @@ -96,6 +98,6 @@ func (ds *dockerService) RemoveImage(image *runtimeapi.ImageSpec) error { return nil } - _, err = ds.client.RemoveImage(image.GetImage(), dockertypes.ImageRemoveOptions{PruneChildren: true}) + _, err = ds.client.RemoveImage(image.Image, dockertypes.ImageRemoveOptions{PruneChildren: true}) return err } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_image_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_image_test.go index b20b7247..7ad366d0 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_image_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_image_test.go @@ -29,7 +29,7 @@ func TestRemoveImage(t *testing.T) { ds, fakeDocker, _ := newTestDockerService() id := "1111" fakeDocker.Image = &dockertypes.ImageInspect{ID: id, RepoTags: []string{"foo"}} - ds.RemoveImage(&runtimeapi.ImageSpec{Image: &id}) + ds.RemoveImage(&runtimeapi.ImageSpec{Image: id}) fakeDocker.AssertCallDetails(dockertools.NewCalledDetail("inspect_image", nil), dockertools.NewCalledDetail("remove_image", []interface{}{id, dockertypes.ImageRemoveOptions{PruneChildren: true}})) } @@ -38,7 +38,7 @@ func TestRemoveImageWithMultipleTags(t *testing.T) { ds, fakeDocker, _ := newTestDockerService() id := "1111" fakeDocker.Image = &dockertypes.ImageInspect{ID: id, RepoTags: []string{"foo", "bar"}} - ds.RemoveImage(&runtimeapi.ImageSpec{Image: &id}) + ds.RemoveImage(&runtimeapi.ImageSpec{Image: id}) fakeDocker.AssertCallDetails(dockertools.NewCalledDetail("inspect_image", nil), dockertools.NewCalledDetail("remove_image", []interface{}{"foo", dockertypes.ImageRemoveOptions{PruneChildren: true}}), dockertools.NewCalledDetail("remove_image", []interface{}{"bar", dockertypes.ImageRemoveOptions{PruneChildren: true}})) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_sandbox.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_sandbox.go index 8074539c..03da3845 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_sandbox.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_sandbox.go @@ -66,13 +66,13 @@ func (ds *dockerService) RunPodSandbox(config *runtimeapi.PodSandboxConfig) (str // Step 2: Create the sandbox container. createConfig, err := ds.makeSandboxDockerConfig(config, image) if err != nil { - return "", fmt.Errorf("failed to make sandbox docker config for pod %q: %v", config.Metadata.GetName(), err) + return "", fmt.Errorf("failed to make sandbox docker config for pod %q: %v", config.Metadata.Name, err) } createResp, err := ds.client.CreateContainer(*createConfig) recoverFromConflictIfNeeded(ds.client, err) if err != nil || createResp == nil { - return "", fmt.Errorf("failed to create a sandbox for pod %q: %v", config.Metadata.GetName(), err) + return "", fmt.Errorf("failed to create a sandbox for pod %q: %v", config.Metadata.Name, err) } // Step 3: Start the sandbox container. @@ -80,9 +80,9 @@ func (ds *dockerService) RunPodSandbox(config *runtimeapi.PodSandboxConfig) (str // startContainer failed. err = ds.client.StartContainer(createResp.ID) if err != nil { - return createResp.ID, fmt.Errorf("failed to start sandbox container for pod %q: %v", config.Metadata.GetName(), err) + return createResp.ID, fmt.Errorf("failed to start sandbox container for pod %q: %v", config.Metadata.Name, err) } - if config.GetLinux().GetSecurityContext().GetNamespaceOptions().GetHostNetwork() { + if nsOptions := config.GetLinux().GetSecurityContext().GetNamespaceOptions(); nsOptions != nil && nsOptions.HostNetwork { return createResp.ID, nil } @@ -94,7 +94,7 @@ func (ds *dockerService) RunPodSandbox(config *runtimeapi.PodSandboxConfig) (str // on the host as well, to satisfy parts of the pod spec that aren't // recognized by the CNI standard yet. cID := kubecontainer.BuildContainerID(runtimeName, createResp.ID) - err = ds.networkPlugin.SetUpPod(config.GetMetadata().GetNamespace(), config.GetMetadata().GetName(), cID) + err = ds.networkPlugin.SetUpPod(config.GetMetadata().Namespace, config.GetMetadata().Name, cID) // TODO: Do we need to teardown on failure or can we rely on a StopPodSandbox call with the given ID? return createResp.ID, err } @@ -109,16 +109,16 @@ func (ds *dockerService) StopPodSandbox(podSandboxID string) error { if err != nil { return fmt.Errorf("Failed to get sandbox status: %v", err) } - if !status.GetLinux().GetNamespaces().GetOptions().GetHostNetwork() { + if nsOpts := status.GetLinux().GetNamespaces().GetOptions(); nsOpts != nil && !nsOpts.HostNetwork { m := status.GetMetadata() cID := kubecontainer.BuildContainerID(runtimeName, podSandboxID) - if err := ds.networkPlugin.TearDownPod(m.GetNamespace(), m.GetName(), cID); err != nil { + if err := ds.networkPlugin.TearDownPod(m.Namespace, m.Name, cID); err != nil { // TODO: Figure out a way to retry this error. We can't // right now because the plugin throws errors when it doesn't find // eth0, which might not exist for various reasons (setup failed, // conf changed etc). In theory, it should teardown everything else // so there's no need to retry. - glog.Errorf("Failed to teardown sandbox %v for pod %v/%v: %v", m.GetNamespace(), m.GetName(), podSandboxID, err) + glog.Errorf("Failed to teardown sandbox %v for pod %v/%v: %v", m.Namespace, m.Name, podSandboxID, err) } } return ds.client.StopContainer(podSandboxID, defaultSandboxGracePeriod) @@ -138,12 +138,12 @@ func (ds *dockerService) getIPFromPlugin(sandbox *dockertypes.ContainerJSON) (st if err != nil { return "", err } - msg := fmt.Sprintf("Couldn't find network status for %s/%s through plugin", *metadata.Namespace, *metadata.Name) + msg := fmt.Sprintf("Couldn't find network status for %s/%s through plugin", metadata.Namespace, metadata.Name) if sharesHostNetwork(sandbox) { return "", fmt.Errorf("%v: not responsible for host-network sandboxes", msg) } cID := kubecontainer.BuildContainerID(runtimeName, sandbox.ID) - networkStatus, err := ds.networkPlugin.GetPodNetworkStatus(*metadata.Namespace, *metadata.Name, cID) + networkStatus, err := ds.networkPlugin.GetPodNetworkStatus(metadata.Namespace, metadata.Name, cID) if err != nil { // This might be a sandbox that somehow ended up without a default // interface (eth0). We can't distinguish this from a more serious @@ -203,7 +203,7 @@ func (ds *dockerService) PodSandboxStatus(podSandboxID string) (*runtimeapi.PodS if err != nil { return nil, err } - network := &runtimeapi.PodSandboxNetworkStatus{Ip: &IP} + network := &runtimeapi.PodSandboxNetworkStatus{Ip: IP} netNS := getNetworkNamespace(r) metadata, err := parseSandboxName(r.Name) @@ -213,18 +213,18 @@ func (ds *dockerService) PodSandboxStatus(podSandboxID string) (*runtimeapi.PodS hostNetwork := sharesHostNetwork(r) labels, annotations := extractLabels(r.Config.Labels) return &runtimeapi.PodSandboxStatus{ - Id: &r.ID, - State: &state, - CreatedAt: &ct, + Id: r.ID, + State: state, + CreatedAt: ct, Metadata: metadata, Labels: labels, Annotations: annotations, Network: network, Linux: &runtimeapi.LinuxPodSandboxStatus{ Namespaces: &runtimeapi.Namespace{ - Network: &netNS, + Network: netNS, Options: &runtimeapi.NamespaceOption{ - HostNetwork: &hostNetwork, + HostNetwork: hostNetwork, }, }, }, @@ -243,11 +243,11 @@ func (ds *dockerService) ListPodSandbox(filter *runtimeapi.PodSandboxFilter) ([] f.AddLabel(containerTypeLabelKey, containerTypeLabelSandbox) if filter != nil { - if filter.Id != nil { - f.Add("id", filter.GetId()) + if filter.Id != "" { + f.Add("id", filter.Id) } if filter.State != nil { - if filter.GetState() == runtimeapi.PodSandboxState_SANDBOX_READY { + if filter.GetState().State == runtimeapi.PodSandboxState_SANDBOX_READY { // Only list running containers. opts.All = false } else { @@ -280,7 +280,7 @@ func (ds *dockerService) ListPodSandbox(filter *runtimeapi.PodSandboxFilter) ([] glog.V(4).Infof("Unable to convert docker to runtime API sandbox: %v", err) continue } - if filterOutReadySandboxes && converted.GetState() == runtimeapi.PodSandboxState_SANDBOX_READY { + if filterOutReadySandboxes && converted.State == runtimeapi.PodSandboxState_SANDBOX_READY { continue } @@ -292,7 +292,7 @@ func (ds *dockerService) ListPodSandbox(filter *runtimeapi.PodSandboxFilter) ([] // applySandboxLinuxOptions applies LinuxPodSandboxConfig to dockercontainer.HostConfig and dockercontainer.ContainerCreateConfig. func (ds *dockerService) applySandboxLinuxOptions(hc *dockercontainer.HostConfig, lc *runtimeapi.LinuxPodSandboxConfig, createConfig *dockertypes.ContainerCreateConfig, image string) error { // Apply Cgroup options. - cgroupParent, err := ds.GenerateExpectedCgroupParent(lc.GetCgroupParent()) + cgroupParent, err := ds.GenerateExpectedCgroupParent(lc.CgroupParent) if err != nil { return err } @@ -317,7 +317,7 @@ func (ds *dockerService) makeSandboxDockerConfig(c *runtimeapi.PodSandboxConfig, createConfig := &dockertypes.ContainerCreateConfig{ Name: makeSandboxName(c), Config: &dockercontainer.Config{ - Hostname: c.GetHostname(), + Hostname: c.Hostname, // TODO: Handle environment variables. Image: image, Labels: labels, @@ -328,7 +328,7 @@ func (ds *dockerService) makeSandboxDockerConfig(c *runtimeapi.PodSandboxConfig, // Set sysctls if requested sysctls, err := getSysctlsFromAnnotations(c.Annotations) if err != nil { - return nil, fmt.Errorf("failed to get sysctls from annotations %v for sandbox %q: %v", c.Annotations, c.Metadata.GetName(), err) + return nil, fmt.Errorf("failed to get sysctls from annotations %v for sandbox %q: %v", c.Annotations, c.Metadata.Name, err) } hc.Sysctls = sysctls @@ -346,9 +346,9 @@ func (ds *dockerService) makeSandboxDockerConfig(c *runtimeapi.PodSandboxConfig, // Set DNS options. if dnsConfig := c.GetDnsConfig(); dnsConfig != nil { - hc.DNS = dnsConfig.GetServers() - hc.DNSSearch = dnsConfig.GetSearches() - hc.DNSOptions = dnsConfig.GetOptions() + hc.DNS = dnsConfig.Servers + hc.DNSSearch = dnsConfig.Searches + hc.DNSOptions = dnsConfig.Options } // Apply resource options. @@ -357,7 +357,7 @@ func (ds *dockerService) makeSandboxDockerConfig(c *runtimeapi.PodSandboxConfig, // Set security options. securityOpts, err := getSandboxSecurityOpts(c, ds.seccompProfileRoot) if err != nil { - return nil, fmt.Errorf("failed to generate sandbox security options for sandbox %q: %v", c.Metadata.GetName(), err) + return nil, fmt.Errorf("failed to generate sandbox security options for sandbox %q: %v", c.Metadata.Name, err) } hc.SecurityOpt = append(hc.SecurityOpt, securityOpts...) return createConfig, nil diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_sandbox_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_sandbox_test.go index e3e84056..085a7b7e 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_sandbox_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_sandbox_test.go @@ -37,10 +37,10 @@ func makeSandboxConfig(name, namespace, uid string, attempt uint32) *runtimeapi. func makeSandboxConfigWithLabelsAndAnnotations(name, namespace, uid string, attempt uint32, labels, annotations map[string]string) *runtimeapi.PodSandboxConfig { return &runtimeapi.PodSandboxConfig{ Metadata: &runtimeapi.PodSandboxMetadata{ - Name: &name, - Namespace: &namespace, - Uid: &uid, - Attempt: &attempt, + Name: name, + Namespace: namespace, + Uid: uid, + Attempt: attempt, }, Labels: labels, Annotations: annotations, @@ -72,9 +72,9 @@ func TestListSandboxes(t *testing.T) { // the most recent sandbox first. expected = append([]*runtimeapi.PodSandbox{{ Metadata: configs[i].Metadata, - Id: &id, - State: &state, - CreatedAt: &createdAt, + Id: id, + State: state, + CreatedAt: createdAt, Labels: configs[i].Labels, Annotations: configs[i].Annotations, }}, expected...) @@ -102,18 +102,18 @@ func TestSandboxStatus(t *testing.T) { ct := int64(0) hostNetwork := false expected := &runtimeapi.PodSandboxStatus{ - State: &state, - CreatedAt: &ct, + State: state, + CreatedAt: ct, Metadata: config.Metadata, - Network: &runtimeapi.PodSandboxNetworkStatus{Ip: &fakeIP}, - Linux: &runtimeapi.LinuxPodSandboxStatus{Namespaces: &runtimeapi.Namespace{Network: &fakeNS, Options: &runtimeapi.NamespaceOption{HostNetwork: &hostNetwork}}}, + Network: &runtimeapi.PodSandboxNetworkStatus{Ip: fakeIP}, + Linux: &runtimeapi.LinuxPodSandboxStatus{Namespaces: &runtimeapi.Namespace{Network: fakeNS, Options: &runtimeapi.NamespaceOption{HostNetwork: hostNetwork}}}, Labels: labels, Annotations: annotations, } // Create the sandbox. fClock.SetTime(time.Now()) - *expected.CreatedAt = fClock.Now().UnixNano() + expected.CreatedAt = fClock.Now().UnixNano() id, err := ds.RunPodSandbox(config) // Check internal labels @@ -122,13 +122,13 @@ func TestSandboxStatus(t *testing.T) { assert.Equal(t, c.Config.Labels[containerTypeLabelKey], containerTypeLabelSandbox) assert.Equal(t, c.Config.Labels[types.KubernetesContainerNameLabel], sandboxContainerName) - expected.Id = &id // ID is only known after the creation. + expected.Id = id // ID is only known after the creation. status, err := ds.PodSandboxStatus(id) assert.NoError(t, err) assert.Equal(t, expected, status) // Stop the sandbox. - *expected.State = runtimeapi.PodSandboxState_SANDBOX_NOTREADY + expected.State = runtimeapi.PodSandboxState_SANDBOX_NOTREADY err = ds.StopPodSandbox(id) assert.NoError(t, err) status, err = ds.PodSandboxStatus(id) @@ -189,7 +189,7 @@ func TestHostNetworkPluginInvocation(t *testing.T) { c.Linux = &runtimeapi.LinuxPodSandboxConfig{ SecurityContext: &runtimeapi.LinuxSandboxSecurityContext{ NamespaceOptions: &runtimeapi.NamespaceOption{ - HostNetwork: &hostNetwork, + HostNetwork: hostNetwork, }, }, } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_service.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_service.go index 9635eaa7..a75b883a 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_service.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_service.go @@ -21,7 +21,6 @@ import ( "net/http" "github.com/golang/glog" - "github.com/golang/protobuf/proto" "k8s.io/kubernetes/pkg/apis/componentconfig" internalapi "k8s.io/kubernetes/pkg/kubelet/api" @@ -102,7 +101,7 @@ var internalLabelKeys []string = []string{containerTypeLabelKey, containerLogPat // NOTE: Anything passed to DockerService should be eventually handled in another way when we switch to running the shim as a different process. func NewDockerService(client dockertools.DockerInterface, seccompProfileRoot string, podSandboxImage string, streamingConfig *streaming.Config, - pluginSettings *NetworkPluginSettings, cgroupsName string, kubeCgroupDriver string) (DockerService, error) { + pluginSettings *NetworkPluginSettings, cgroupsName string, kubeCgroupDriver string, execHandler dockertools.ExecHandler) (DockerService, error) { c := dockertools.NewInstrumentedDockerInterface(client) ds := &dockerService{ seccompProfileRoot: seccompProfileRoot, @@ -110,10 +109,8 @@ func NewDockerService(client dockertools.DockerInterface, seccompProfileRoot str os: kubecontainer.RealOS{}, podSandboxImage: podSandboxImage, streamingRuntime: &streamingRuntime{ - client: client, - // Only the native exec handling is supported for now. - // TODO(#35747) - Either deprecate nsenter exec handling, or add support for it here. - execHandler: &dockertools.NativeExecHandler{}, + client: client, + execHandler: execHandler, }, containerManager: cm.NewContainerManager(cgroupsName, client), } @@ -191,10 +188,10 @@ func (ds *dockerService) Version(_ string) (*runtimeapi.VersionResponse, error) // suffix to remedy this. apiVersion := fmt.Sprintf("%s.0", v.APIVersion) return &runtimeapi.VersionResponse{ - Version: &runtimeAPIVersion, - RuntimeName: &name, - RuntimeVersion: &v.Version, - RuntimeApiVersion: &apiVersion, + Version: runtimeAPIVersion, + RuntimeName: name, + RuntimeVersion: v.Version, + RuntimeApiVersion: apiVersion, }, nil } @@ -204,9 +201,9 @@ func (ds *dockerService) UpdateRuntimeConfig(runtimeConfig *runtimeapi.RuntimeCo return } glog.Infof("docker cri received runtime config %+v", runtimeConfig) - if ds.networkPlugin != nil && runtimeConfig.NetworkConfig.PodCidr != nil { + if ds.networkPlugin != nil && runtimeConfig.NetworkConfig.PodCidr != "" { event := make(map[string]interface{}) - event[network.NET_PLUGIN_EVENT_POD_CIDR_CHANGE_DETAIL_CIDR] = *runtimeConfig.NetworkConfig.PodCidr + event[network.NET_PLUGIN_EVENT_POD_CIDR_CHANGE_DETAIL_CIDR] = runtimeConfig.NetworkConfig.PodCidr ds.networkPlugin.Event(network.NET_PLUGIN_EVENT_POD_CIDR_CHANGE, event) } return @@ -246,23 +243,23 @@ func (ds *dockerService) Start() error { // TODO(random-liu): Set network condition accordingly here. func (ds *dockerService) Status() (*runtimeapi.RuntimeStatus, error) { runtimeReady := &runtimeapi.RuntimeCondition{ - Type: proto.String(runtimeapi.RuntimeReady), - Status: proto.Bool(true), + Type: runtimeapi.RuntimeReady, + Status: true, } networkReady := &runtimeapi.RuntimeCondition{ - Type: proto.String(runtimeapi.NetworkReady), - Status: proto.Bool(true), + Type: runtimeapi.NetworkReady, + Status: true, } conditions := []*runtimeapi.RuntimeCondition{runtimeReady, networkReady} if _, err := ds.client.Version(); err != nil { - runtimeReady.Status = proto.Bool(false) - runtimeReady.Reason = proto.String("DockerDaemonNotReady") - runtimeReady.Message = proto.String(fmt.Sprintf("docker: failed to get docker version: %v", err)) + runtimeReady.Status = false + runtimeReady.Reason = "DockerDaemonNotReady" + runtimeReady.Message = fmt.Sprintf("docker: failed to get docker version: %v", err) } if err := ds.networkPlugin.Status(); err != nil { - networkReady.Status = proto.Bool(false) - networkReady.Reason = proto.String("NetworkPluginNotReady") - networkReady.Message = proto.String(fmt.Sprintf("docker: network plugin is not ready: %v", err)) + networkReady.Status = false + networkReady.Reason = "NetworkPluginNotReady" + networkReady.Message = fmt.Sprintf("docker: network plugin is not ready: %v", err) } return &runtimeapi.RuntimeStatus{Conditions: conditions}, nil } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_service_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_service_test.go index 9cd3d47b..fa6401b5 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_service_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_service_test.go @@ -24,12 +24,12 @@ import ( "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" + "k8s.io/client-go/util/clock" runtimeapi "k8s.io/kubernetes/pkg/kubelet/api/v1alpha1/runtime" containertest "k8s.io/kubernetes/pkg/kubelet/container/testing" "k8s.io/kubernetes/pkg/kubelet/dockertools" "k8s.io/kubernetes/pkg/kubelet/network" "k8s.io/kubernetes/pkg/kubelet/network/mock_network" - "k8s.io/kubernetes/pkg/util/clock" ) // newTestNetworkPlugin returns a mock plugin that implements network.NetworkPlugin @@ -40,7 +40,7 @@ func newTestNetworkPlugin(t *testing.T) *mock_network.MockNetworkPlugin { func newTestDockerService() (*dockerService, *dockertools.FakeDockerClient, *clock.FakeClock) { fakeClock := clock.NewFakeClock(time.Time{}) - c := dockertools.NewFakeDockerClientWithClock(fakeClock) + c := dockertools.NewFakeDockerClient().WithClock(fakeClock) return &dockerService{client: c, os: &containertest.FakeOS{}, networkPlugin: &network.NoopNetworkPlugin{}}, c, fakeClock } @@ -53,8 +53,8 @@ func TestStatus(t *testing.T) { assert.Equal(t, len(expected), len(conditions)) for k, v := range expected { for _, c := range conditions { - if k == c.GetType() { - assert.Equal(t, v, c.GetStatus()) + if k == c.Type { + assert.Equal(t, v, c.Status) } } } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_streaming.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_streaming.go index 18a3d467..e7bfb3e2 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_streaming.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_streaming.go @@ -86,7 +86,7 @@ func (ds *dockerService) Exec(req *runtimeapi.ExecRequest) (*runtimeapi.ExecResp if ds.streamingServer == nil { return nil, streaming.ErrorStreamingDisabled("exec") } - _, err := checkContainerStatus(ds.client, req.GetContainerId()) + _, err := checkContainerStatus(ds.client, req.ContainerId) if err != nil { return nil, err } @@ -98,7 +98,7 @@ func (ds *dockerService) Attach(req *runtimeapi.AttachRequest) (*runtimeapi.Atta if ds.streamingServer == nil { return nil, streaming.ErrorStreamingDisabled("attach") } - _, err := checkContainerStatus(ds.client, req.GetContainerId()) + _, err := checkContainerStatus(ds.client, req.ContainerId) if err != nil { return nil, err } @@ -110,7 +110,7 @@ func (ds *dockerService) PortForward(req *runtimeapi.PortForwardRequest) (*runti if ds.streamingServer == nil { return nil, streaming.ErrorStreamingDisabled("port forward") } - _, err := checkContainerStatus(ds.client, req.GetPodSandboxId()) + _, err := checkContainerStatus(ds.client, req.PodSandboxId) if err != nil { return nil, err } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/helpers.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/helpers.go index 8ca3bea1..5698b5cf 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/helpers.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/helpers.go @@ -64,7 +64,7 @@ func (v apiVersion) Compare(other string) (int, error) { // '=', which can be understood by docker. func generateEnvList(envs []*runtimeapi.KeyValue) (result []string) { for _, env := range envs { - result = append(result, fmt.Sprintf("%s=%s", env.GetKey(), env.GetValue())) + result = append(result, fmt.Sprintf("%s=%s", env.Key, env.Value)) } return } @@ -129,8 +129,8 @@ func extractLabels(input map[string]string) (map[string]string, map[string]strin // relabeling and the pod provides an SELinux label func generateMountBindings(mounts []*runtimeapi.Mount) (result []string) { for _, m := range mounts { - bind := fmt.Sprintf("%s:%s", m.GetHostPath(), m.GetContainerPath()) - readOnly := m.GetReadonly() + bind := fmt.Sprintf("%s:%s", m.HostPath, m.ContainerPath) + readOnly := m.Readonly if readOnly { bind += ":ro" } @@ -138,7 +138,7 @@ func generateMountBindings(mounts []*runtimeapi.Mount) (result []string) { // does not provide an SELinux context relabeling will label the volume with // the container's randomly allocated MCS label. This would restrict access // to the volume to the container which mounts it first. - if m.GetSelinuxRelabel() { + if m.SelinuxRelabel { if readOnly { bind += ",Z" } else { @@ -154,16 +154,16 @@ func makePortsAndBindings(pm []*runtimeapi.PortMapping) (map[dockernat.Port]stru exposedPorts := map[dockernat.Port]struct{}{} portBindings := map[dockernat.Port][]dockernat.PortBinding{} for _, port := range pm { - exteriorPort := port.GetHostPort() + exteriorPort := port.HostPort if exteriorPort == 0 { // No need to do port binding when HostPort is not specified continue } - interiorPort := port.GetContainerPort() + interiorPort := port.ContainerPort // Some of this port stuff is under-documented voodoo. // See http://stackoverflow.com/questions/20428302/binding-a-port-to-a-host-interface-using-the-rest-api var protocol string - switch strings.ToUpper(string(port.GetProtocol())) { + switch strings.ToUpper(string(port.Protocol)) { case "UDP": protocol = "/udp" case "TCP": @@ -178,7 +178,7 @@ func makePortsAndBindings(pm []*runtimeapi.PortMapping) (map[dockernat.Port]stru hostBinding := dockernat.PortBinding{ HostPort: strconv.Itoa(int(exteriorPort)), - HostIP: port.GetHostIp(), + HostIP: port.HostIp, } // Allow multiple host ports bind to same docker port @@ -272,20 +272,20 @@ func (f *dockerFilter) AddLabel(key, value string) { // getUserFromImageUser gets uid or user name of the image user. // If user is numeric, it will be treated as uid; or else, it is treated as user name. -func getUserFromImageUser(imageUser string) (*int64, *string) { +func getUserFromImageUser(imageUser string) (*int64, string) { user := dockertools.GetUserFromImageUser(imageUser) // return both nil if user is not specified in the image. if user == "" { - return nil, nil + return nil, "" } // user could be either uid or user name. Try to interpret as numeric uid. uid, err := strconv.ParseInt(user, 10, 64) if err != nil { // If user is non numeric, assume it's user name. - return nil, &user + return nil, user } // If user is a numeric uid. - return &uid, nil + return &uid, "" } // See #33189. If the previous attempt to create a sandbox container name FOO diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/helpers_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/helpers_test.go index 9bdfdbdd..d5900cf1 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/helpers_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/helpers_test.go @@ -192,11 +192,10 @@ func TestGetSystclsFromAnnotations(t *testing.T) { // TestGetUserFromImageUser tests the logic of getting image uid or user name of image user. func TestGetUserFromImageUser(t *testing.T) { newI64 := func(i int64) *int64 { return &i } - newStr := func(s string) *string { return &s } for c, test := range map[string]struct { user string uid *int64 - name *string + name string }{ "no gid": { user: "0", @@ -215,11 +214,11 @@ func TestGetUserFromImageUser(t *testing.T) { }, "root username": { user: "root:root", - name: newStr("root"), + name: "root", }, "username": { user: "test:test", - name: newStr("test"), + name: "test", }, } { t.Logf("TestCase - %q", c) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/naming.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/naming.go index cb62a9eb..062b012d 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/naming.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/naming.go @@ -57,23 +57,23 @@ const ( func makeSandboxName(s *runtimeapi.PodSandboxConfig) string { return strings.Join([]string{ - kubePrefix, // 0 - sandboxContainerName, // 1 - s.Metadata.GetName(), // 2 - s.Metadata.GetNamespace(), // 3 - s.Metadata.GetUid(), // 4 - fmt.Sprintf("%d", s.Metadata.GetAttempt()), // 5 + kubePrefix, // 0 + sandboxContainerName, // 1 + s.Metadata.Name, // 2 + s.Metadata.Namespace, // 3 + s.Metadata.Uid, // 4 + fmt.Sprintf("%d", s.Metadata.Attempt), // 5 }, nameDelimiter) } func makeContainerName(s *runtimeapi.PodSandboxConfig, c *runtimeapi.ContainerConfig) string { return strings.Join([]string{ - kubePrefix, // 0 - c.Metadata.GetName(), // 1: - s.Metadata.GetName(), // 2: sandbox name - s.Metadata.GetNamespace(), // 3: sandbox namesapce - s.Metadata.GetUid(), // 4 sandbox uid - fmt.Sprintf("%d", c.Metadata.GetAttempt()), // 5 + kubePrefix, // 0 + c.Metadata.Name, // 1: + s.Metadata.Name, // 2: sandbox name + s.Metadata.Namespace, // 3: sandbox namesapce + s.Metadata.Uid, // 4 sandbox uid + fmt.Sprintf("%d", c.Metadata.Attempt), // 5 }, nameDelimiter) } @@ -105,10 +105,10 @@ func parseSandboxName(name string) (*runtimeapi.PodSandboxMetadata, error) { } return &runtimeapi.PodSandboxMetadata{ - Name: &parts[2], - Namespace: &parts[3], - Uid: &parts[4], - Attempt: &attempt, + Name: parts[2], + Namespace: parts[3], + Uid: parts[4], + Attempt: attempt, }, nil } @@ -131,7 +131,7 @@ func parseContainerName(name string) (*runtimeapi.ContainerMetadata, error) { } return &runtimeapi.ContainerMetadata{ - Name: &parts[1], - Attempt: &attempt, + Name: parts[1], + Attempt: attempt, }, nil } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/naming_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/naming_test.go index 49212310..9b70cbb7 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/naming_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/naming_test.go @@ -55,8 +55,8 @@ func TestContainerNameRoundTrip(t *testing.T) { name, attempt := "pause", uint32(5) config := &runtimeapi.ContainerConfig{ Metadata: &runtimeapi.ContainerMetadata{ - Name: &name, - Attempt: &attempt, + Name: name, + Attempt: attempt, }, } actualName := makeContainerName(sConfig, config) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/remote/docker_service.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/remote/docker_service.go index 8274d833..70c8f899 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/remote/docker_service.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/remote/docker_service.go @@ -47,7 +47,7 @@ func NewDockerService(s dockershim.DockerService) DockerService { } func (d *dockerService) Version(ctx context.Context, r *runtimeapi.VersionRequest) (*runtimeapi.VersionResponse, error) { - return d.runtimeService.Version(r.GetVersion()) + return d.runtimeService.Version(r.Version) } func (d *dockerService) Status(ctx context.Context, r *runtimeapi.StatusRequest) (*runtimeapi.StatusResponse, error) { @@ -63,11 +63,11 @@ func (d *dockerService) RunPodSandbox(ctx context.Context, r *runtimeapi.RunPodS if err != nil { return nil, err } - return &runtimeapi.RunPodSandboxResponse{PodSandboxId: &podSandboxId}, nil + return &runtimeapi.RunPodSandboxResponse{PodSandboxId: podSandboxId}, nil } func (d *dockerService) StopPodSandbox(ctx context.Context, r *runtimeapi.StopPodSandboxRequest) (*runtimeapi.StopPodSandboxResponse, error) { - err := d.runtimeService.StopPodSandbox(r.GetPodSandboxId()) + err := d.runtimeService.StopPodSandbox(r.PodSandboxId) if err != nil { return nil, err } @@ -75,7 +75,7 @@ func (d *dockerService) StopPodSandbox(ctx context.Context, r *runtimeapi.StopPo } func (d *dockerService) RemovePodSandbox(ctx context.Context, r *runtimeapi.RemovePodSandboxRequest) (*runtimeapi.RemovePodSandboxResponse, error) { - err := d.runtimeService.RemovePodSandbox(r.GetPodSandboxId()) + err := d.runtimeService.RemovePodSandbox(r.PodSandboxId) if err != nil { return nil, err } @@ -83,7 +83,7 @@ func (d *dockerService) RemovePodSandbox(ctx context.Context, r *runtimeapi.Remo } func (d *dockerService) PodSandboxStatus(ctx context.Context, r *runtimeapi.PodSandboxStatusRequest) (*runtimeapi.PodSandboxStatusResponse, error) { - podSandboxStatus, err := d.runtimeService.PodSandboxStatus(r.GetPodSandboxId()) + podSandboxStatus, err := d.runtimeService.PodSandboxStatus(r.PodSandboxId) if err != nil { return nil, err } @@ -99,15 +99,15 @@ func (d *dockerService) ListPodSandbox(ctx context.Context, r *runtimeapi.ListPo } func (d *dockerService) CreateContainer(ctx context.Context, r *runtimeapi.CreateContainerRequest) (*runtimeapi.CreateContainerResponse, error) { - containerId, err := d.runtimeService.CreateContainer(r.GetPodSandboxId(), r.GetConfig(), r.GetSandboxConfig()) + containerId, err := d.runtimeService.CreateContainer(r.PodSandboxId, r.GetConfig(), r.GetSandboxConfig()) if err != nil { return nil, err } - return &runtimeapi.CreateContainerResponse{ContainerId: &containerId}, nil + return &runtimeapi.CreateContainerResponse{ContainerId: containerId}, nil } func (d *dockerService) StartContainer(ctx context.Context, r *runtimeapi.StartContainerRequest) (*runtimeapi.StartContainerResponse, error) { - err := d.runtimeService.StartContainer(r.GetContainerId()) + err := d.runtimeService.StartContainer(r.ContainerId) if err != nil { return nil, err } @@ -115,7 +115,7 @@ func (d *dockerService) StartContainer(ctx context.Context, r *runtimeapi.StartC } func (d *dockerService) StopContainer(ctx context.Context, r *runtimeapi.StopContainerRequest) (*runtimeapi.StopContainerResponse, error) { - err := d.runtimeService.StopContainer(r.GetContainerId(), r.GetTimeout()) + err := d.runtimeService.StopContainer(r.ContainerId, r.Timeout) if err != nil { return nil, err } @@ -123,7 +123,7 @@ func (d *dockerService) StopContainer(ctx context.Context, r *runtimeapi.StopCon } func (d *dockerService) RemoveContainer(ctx context.Context, r *runtimeapi.RemoveContainerRequest) (*runtimeapi.RemoveContainerResponse, error) { - err := d.runtimeService.RemoveContainer(r.GetContainerId()) + err := d.runtimeService.RemoveContainer(r.ContainerId) if err != nil { return nil, err } @@ -139,7 +139,7 @@ func (d *dockerService) ListContainers(ctx context.Context, r *runtimeapi.ListCo } func (d *dockerService) ContainerStatus(ctx context.Context, r *runtimeapi.ContainerStatusRequest) (*runtimeapi.ContainerStatusResponse, error) { - status, err := d.runtimeService.ContainerStatus(r.GetContainerId()) + status, err := d.runtimeService.ContainerStatus(r.ContainerId) if err != nil { return nil, err } @@ -147,7 +147,7 @@ func (d *dockerService) ContainerStatus(ctx context.Context, r *runtimeapi.Conta } func (d *dockerService) ExecSync(ctx context.Context, r *runtimeapi.ExecSyncRequest) (*runtimeapi.ExecSyncResponse, error) { - stdout, stderr, err := d.runtimeService.ExecSync(r.GetContainerId(), r.GetCmd(), time.Duration(r.GetTimeout())*time.Second) + stdout, stderr, err := d.runtimeService.ExecSync(r.ContainerId, r.Cmd, time.Duration(r.Timeout)*time.Second) var exitCode int32 if err != nil { exitError, ok := err.(utilexec.ExitError) @@ -159,7 +159,7 @@ func (d *dockerService) ExecSync(ctx context.Context, r *runtimeapi.ExecSyncRequ return &runtimeapi.ExecSyncResponse{ Stdout: stdout, Stderr: stderr, - ExitCode: &exitCode, + ExitCode: exitCode, }, nil } @@ -204,7 +204,7 @@ func (d *dockerService) PullImage(ctx context.Context, r *runtimeapi.PullImageRe if err != nil { return nil, err } - return &runtimeapi.PullImageResponse{ImageRef: &image}, nil + return &runtimeapi.PullImageResponse{ImageRef: image}, nil } func (d *dockerService) RemoveImage(ctx context.Context, r *runtimeapi.RemoveImageRequest) (*runtimeapi.RemoveImageResponse, error) { diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/security_context.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/security_context.go index 29dcef52..b2203d66 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/security_context.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/security_context.go @@ -69,10 +69,10 @@ func modifyContainerConfig(sc *runtimeapi.LinuxContainerSecurityContext, config return } if sc.RunAsUser != nil { - config.User = strconv.FormatInt(sc.GetRunAsUser(), 10) + config.User = strconv.FormatInt(sc.GetRunAsUser().Value, 10) } - if sc.RunAsUsername != nil { - config.User = sc.GetRunAsUsername() + if sc.RunAsUsername != "" { + config.User = sc.RunAsUsername } } @@ -88,24 +88,20 @@ func modifyHostConfig(sc *runtimeapi.LinuxContainerSecurityContext, hostConfig * } // Apply security context for the container. - if sc.Privileged != nil { - hostConfig.Privileged = sc.GetPrivileged() - } - if sc.ReadonlyRootfs != nil { - hostConfig.ReadonlyRootfs = sc.GetReadonlyRootfs() - } + hostConfig.Privileged = sc.Privileged + hostConfig.ReadonlyRootfs = sc.ReadonlyRootfs if sc.Capabilities != nil { - hostConfig.CapAdd = sc.GetCapabilities().GetAddCapabilities() - hostConfig.CapDrop = sc.GetCapabilities().GetDropCapabilities() + hostConfig.CapAdd = sc.GetCapabilities().AddCapabilities + hostConfig.CapDrop = sc.GetCapabilities().DropCapabilities } if sc.SelinuxOptions != nil { hostConfig.SecurityOpt = securitycontext.ModifySecurityOptions( hostConfig.SecurityOpt, &v1.SELinuxOptions{ - User: sc.SelinuxOptions.GetUser(), - Role: sc.SelinuxOptions.GetRole(), - Type: sc.SelinuxOptions.GetType(), - Level: sc.SelinuxOptions.GetLevel(), + User: sc.SelinuxOptions.User, + Role: sc.SelinuxOptions.Role, + Type: sc.SelinuxOptions.Type, + Level: sc.SelinuxOptions.Level, }, ) } @@ -114,22 +110,26 @@ func modifyHostConfig(sc *runtimeapi.LinuxContainerSecurityContext, hostConfig * // modifySandboxNamespaceOptions apply namespace options for sandbox func modifySandboxNamespaceOptions(nsOpts *runtimeapi.NamespaceOption, hostConfig *dockercontainer.HostConfig, networkPlugin network.NetworkPlugin) { modifyCommonNamespaceOptions(nsOpts, hostConfig) - modifyHostNetworkOptionForSandbox(nsOpts.GetHostNetwork(), networkPlugin, hostConfig) + modifyHostNetworkOptionForSandbox(nsOpts.HostNetwork, networkPlugin, hostConfig) } // modifyContainerNamespaceOptions apply namespace options for container func modifyContainerNamespaceOptions(nsOpts *runtimeapi.NamespaceOption, sandboxID string, hostConfig *dockercontainer.HostConfig) { + hostNetwork := false + if nsOpts != nil { + hostNetwork = nsOpts.HostNetwork + } modifyCommonNamespaceOptions(nsOpts, hostConfig) - modifyHostNetworkOptionForContainer(nsOpts.GetHostNetwork(), sandboxID, hostConfig) + modifyHostNetworkOptionForContainer(hostNetwork, sandboxID, hostConfig) } // modifyCommonNamespaceOptions apply common namespace options for sandbox and container func modifyCommonNamespaceOptions(nsOpts *runtimeapi.NamespaceOption, hostConfig *dockercontainer.HostConfig) { if nsOpts != nil { - if nsOpts.GetHostPid() { + if nsOpts.HostPid { hostConfig.PidMode = namespaceModeHost } - if nsOpts.GetHostIpc() { + if nsOpts.HostIpc { hostConfig.IpcMode = namespaceModeHost } } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/security_context_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/security_context_test.go index f0e0f52e..0397283a 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/security_context_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/security_context_test.go @@ -30,7 +30,7 @@ import ( func TestModifyContainerConfig(t *testing.T) { var uid int64 = 123 - var username string = "testuser" + var username = "testuser" cases := []struct { name string @@ -40,7 +40,7 @@ func TestModifyContainerConfig(t *testing.T) { { name: "container.SecurityContext.RunAsUser set", sc: &runtimeapi.LinuxContainerSecurityContext{ - RunAsUser: &uid, + RunAsUser: &runtimeapi.Int64Value{Value: uid}, }, expected: &dockercontainer.Config{ User: strconv.FormatInt(uid, 10), @@ -49,7 +49,7 @@ func TestModifyContainerConfig(t *testing.T) { { name: "container.SecurityContext.RunAsUsername set", sc: &runtimeapi.LinuxContainerSecurityContext{ - RunAsUsername: &username, + RunAsUsername: username, }, expected: &dockercontainer.Config{ User: username, @@ -70,10 +70,9 @@ func TestModifyContainerConfig(t *testing.T) { } func TestModifyHostConfig(t *testing.T) { - priv := true setNetworkHC := &dockercontainer.HostConfig{} setPrivSC := &runtimeapi.LinuxContainerSecurityContext{} - setPrivSC.Privileged = &priv + setPrivSC.Privileged = true setPrivHC := &dockercontainer.HostConfig{ Privileged: true, } @@ -168,7 +167,7 @@ func TestModifyHostConfigAndNamespaceOptionsForContainer(t *testing.T) { sandboxID := "sandbox" sandboxNSMode := fmt.Sprintf("container:%v", sandboxID) setPrivSC := &runtimeapi.LinuxContainerSecurityContext{} - setPrivSC.Privileged = &priv + setPrivSC.Privileged = priv setPrivHC := &dockercontainer.HostConfig{ Privileged: true, IpcMode: dockercontainer.IpcMode(sandboxNSMode), @@ -235,7 +234,7 @@ func TestModifySandboxNamespaceOptions(t *testing.T) { { name: "NamespaceOption.HostNetwork", nsOpt: &runtimeapi.NamespaceOption{ - HostNetwork: &set, + HostNetwork: set, }, expected: &dockercontainer.HostConfig{ NetworkMode: namespaceModeHost, @@ -244,7 +243,7 @@ func TestModifySandboxNamespaceOptions(t *testing.T) { { name: "NamespaceOption.HostIpc", nsOpt: &runtimeapi.NamespaceOption{ - HostIpc: &set, + HostIpc: set, }, expected: &dockercontainer.HostConfig{ IpcMode: namespaceModeHost, @@ -254,7 +253,7 @@ func TestModifySandboxNamespaceOptions(t *testing.T) { { name: "NamespaceOption.HostPid", nsOpt: &runtimeapi.NamespaceOption{ - HostPid: &set, + HostPid: set, }, expected: &dockercontainer.HostConfig{ PidMode: namespaceModeHost, @@ -281,7 +280,7 @@ func TestModifyContainerNamespaceOptions(t *testing.T) { { name: "NamespaceOption.HostNetwork", nsOpt: &runtimeapi.NamespaceOption{ - HostNetwork: &set, + HostNetwork: set, }, expected: &dockercontainer.HostConfig{ NetworkMode: dockercontainer.NetworkMode(sandboxNSMode), @@ -292,7 +291,7 @@ func TestModifyContainerNamespaceOptions(t *testing.T) { { name: "NamespaceOption.HostIpc", nsOpt: &runtimeapi.NamespaceOption{ - HostIpc: &set, + HostIpc: set, }, expected: &dockercontainer.HostConfig{ NetworkMode: dockercontainer.NetworkMode(sandboxNSMode), @@ -302,7 +301,7 @@ func TestModifyContainerNamespaceOptions(t *testing.T) { { name: "NamespaceOption.HostPid", nsOpt: &runtimeapi.NamespaceOption{ - HostPid: &set, + HostPid: set, }, expected: &dockercontainer.HostConfig{ NetworkMode: dockercontainer.NetworkMode(sandboxNSMode), @@ -318,9 +317,8 @@ func TestModifyContainerNamespaceOptions(t *testing.T) { } func fullValidSecurityContext() *runtimeapi.LinuxContainerSecurityContext { - priv := true return &runtimeapi.LinuxContainerSecurityContext{ - Privileged: &priv, + Privileged: true, Capabilities: inputCapabilities(), SelinuxOptions: inputSELinuxOptions(), } @@ -340,10 +338,10 @@ func inputSELinuxOptions() *runtimeapi.SELinuxOption { level := "level" return &runtimeapi.SELinuxOption{ - User: &user, - Role: &role, - Type: &stype, - Level: &level, + User: user, + Role: role, + Type: stype, + Level: level, } } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockertools/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/dockertools/BUILD index 23de8001..2eca4d90 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockertools/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockertools/BUILD @@ -47,15 +47,15 @@ go_library( "//pkg/kubelet/util/format:go_default_library", "//pkg/security/apparmor:go_default_library", "//pkg/securitycontext:go_default_library", - "//pkg/util/clock:go_default_library", "//pkg/util/exec:go_default_library", - "//pkg/util/flowcontrol:go_default_library", "//pkg/util/oom:go_default_library", "//pkg/util/procfs:go_default_library", "//pkg/util/selinux:go_default_library", "//pkg/util/strings:go_default_library", + "//pkg/util/tail:go_default_library", "//pkg/util/term:go_default_library", "//pkg/util/version:go_default_library", + "//vendor:github.com/armon/circbuf", "//vendor:github.com/docker/distribution/digest", "//vendor:github.com/docker/distribution/reference", "//vendor:github.com/docker/docker/pkg/jsonmessage", @@ -76,6 +76,8 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/util/errors", "//vendor:k8s.io/apimachinery/pkg/util/runtime", "//vendor:k8s.io/apimachinery/pkg/util/sets", + "//vendor:k8s.io/client-go/util/clock", + "//vendor:k8s.io/client-go/util/flowcontrol", ], ) @@ -116,9 +118,7 @@ go_test( "//pkg/kubelet/types:go_default_library", "//pkg/kubelet/util/format:go_default_library", "//pkg/security/apparmor:go_default_library", - "//pkg/util/clock:go_default_library", "//pkg/util/exec:go_default_library", - "//pkg/util/flowcontrol:go_default_library", "//pkg/util/hash:go_default_library", "//pkg/util/intstr:go_default_library", "//pkg/util/strings:go_default_library", @@ -130,9 +130,12 @@ go_test( "//vendor:github.com/golang/mock/gomock", "//vendor:github.com/google/cadvisor/info/v1", "//vendor:github.com/stretchr/testify/assert", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/sets", + "//vendor:k8s.io/client-go/util/clock", + "//vendor:k8s.io/client-go/util/flowcontrol", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockertools/container_gc_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockertools/container_gc_test.go index 5f6ce489..9393d794 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockertools/container_gc_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockertools/container_gc_test.go @@ -24,13 +24,14 @@ import ( "time" "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api/v1" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" ) func newTestContainerGC(t *testing.T) (*containerGC, *FakeDockerClient) { - fakeDocker := new(FakeDockerClient) + fakeDocker := NewFakeDockerClient() fakePodGetter := newFakePodGetter() gc := NewContainerGC(fakeDocker, fakePodGetter, "") return gc, fakeDocker @@ -66,7 +67,7 @@ func addPods(podGetter podGetter, podUIDs ...types.UID) { fakePodGetter := podGetter.(*fakePodGetter) for _, uid := range podUIDs { fakePodGetter.pods[uid] = &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod" + string(uid), Namespace: "test", UID: uid, diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockertools/docker_manager.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockertools/docker_manager.go index da5cec98..b78b7fd0 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockertools/docker_manager.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockertools/docker_manager.go @@ -33,6 +33,7 @@ import ( "sync" "time" + "github.com/armon/circbuf" dockertypes "github.com/docker/engine-api/types" dockercontainer "github.com/docker/engine-api/types/container" dockerstrslice "github.com/docker/engine-api/types/strslice" @@ -47,6 +48,7 @@ import ( kubetypes "k8s.io/apimachinery/pkg/types" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/client-go/util/flowcontrol" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/record" @@ -65,11 +67,11 @@ import ( "k8s.io/kubernetes/pkg/kubelet/util/format" "k8s.io/kubernetes/pkg/security/apparmor" "k8s.io/kubernetes/pkg/securitycontext" - "k8s.io/kubernetes/pkg/util/flowcontrol" "k8s.io/kubernetes/pkg/util/oom" "k8s.io/kubernetes/pkg/util/procfs" "k8s.io/kubernetes/pkg/util/selinux" utilstrings "k8s.io/kubernetes/pkg/util/strings" + "k8s.io/kubernetes/pkg/util/tail" "k8s.io/kubernetes/pkg/util/term" utilversion "k8s.io/kubernetes/pkg/util/version" ) @@ -139,9 +141,6 @@ type DockerManager struct { // wrapped image puller. imagePuller images.ImageManager - // Root of the Docker runtime. - dockerRoot string - // cgroup driver used by Docker runtime. cgroupDriver string @@ -238,10 +237,6 @@ func NewDockerManager( // Wrap the docker client with instrumentedDockerInterface client = NewInstrumentedDockerInterface(client) - // Work out the location of the Docker runtime, defaulting to /var/lib/docker - // if there are any problems. - dockerRoot := "/var/lib/docker" - // cgroup driver is only detectable in docker 1.11+ // when the execution driver is not detectable, we provide the cgroupfs form. // if your docker engine is configured to use the systemd cgroup driver, and you @@ -252,11 +247,7 @@ func NewDockerManager( dockerInfo, err := client.Info() if err != nil { glog.Errorf("Failed to execute Info() call to the Docker client: %v", err) - glog.Warningf("Using fallback default of /var/lib/docker for location of Docker runtime") } else { - dockerRoot = dockerInfo.DockerRootDir - glog.Infof("Setting dockerRoot to %s", dockerRoot) - cgroupDriver = dockerInfo.CgroupDriver glog.Infof("Setting cgroupDriver to %s", cgroupDriver) } @@ -269,7 +260,6 @@ func NewDockerManager( machineInfo: machineInfo, podInfraContainerImage: podInfraContainerImage, dockerPuller: newDockerPuller(client), - dockerRoot: dockerRoot, cgroupDriver: cgroupDriver, containerLogsDir: containerLogsDir, networkPlugin: networkPlugin, @@ -482,19 +472,12 @@ func (dm *DockerManager) inspectContainer(id string, podName, podNamespace strin startedAt = createdAt } - terminationMessagePath := containerInfo.TerminationMessagePath - if terminationMessagePath != "" { - for _, mount := range iResult.Mounts { - if mount.Destination == terminationMessagePath { - path := mount.Source - if data, err := ioutil.ReadFile(path); err != nil { - message = fmt.Sprintf("Error on reading termination-log %s: %v", path, err) - } else { - message = string(data) - } - } - } + // retrieve the termination message from logs, file, or file with fallback to logs in case of failure + fallbackToLogs := containerInfo.TerminationMessagePolicy == v1.TerminationMessageFallbackToLogsOnError && (iResult.State.ExitCode != 0 || iResult.State.OOMKilled) + if msg := getTerminationMessage(dm.c, iResult, containerInfo.TerminationMessagePath, fallbackToLogs); len(msg) > 0 { + message = msg } + status.State = kubecontainer.ContainerStateExited status.Message = message status.Reason = reason @@ -508,6 +491,49 @@ func (dm *DockerManager) inspectContainer(id string, podName, podNamespace strin return &status, "", nil } +func getTerminationMessage(c DockerInterface, iResult *dockertypes.ContainerJSON, terminationMessagePath string, fallbackToLogs bool) string { + if len(terminationMessagePath) != 0 { + for _, mount := range iResult.Mounts { + if mount.Destination != terminationMessagePath { + continue + } + path := mount.Source + data, _, err := tail.ReadAtMost(path, kubecontainer.MaxContainerTerminationMessageLength) + if err != nil { + return fmt.Sprintf("Error on reading termination log %s: %v", path, err) + } + if !fallbackToLogs || len(data) != 0 { + return string(data) + } + } + } + if !fallbackToLogs { + return "" + } + + return readLastStringFromContainerLogs(c, iResult.Name) +} + +// readLastStringFromContainerLogs attempts to a certain amount from the end of the logs for containerName. +// It will attempt to avoid reading excessive logs from the server, which may result in underestimating the amount +// of logs to fetch (such that the length of the response message is < max). +func readLastStringFromContainerLogs(c DockerInterface, containerName string) string { + logOptions := dockertypes.ContainerLogsOptions{ + ShowStdout: true, + ShowStderr: true, + } + buf, _ := circbuf.NewBuffer(kubecontainer.MaxContainerTerminationMessageLogLength) + streamOptions := StreamOptions{ + ErrorStream: buf, + OutputStream: buf, + } + logOptions.Tail = strconv.FormatInt(kubecontainer.MaxContainerTerminationMessageLogLines, 10) + if err := c.Logs(containerName, logOptions, streamOptions); err != nil { + return fmt.Sprintf("Error on reading termination message from logs: %v", err) + } + return buf.String() +} + // makeEnvList converts EnvVar list to a list of strings, in the form of // '=', which can be understood by docker. func makeEnvList(envs []kubecontainer.EnvVar) (result []string) { @@ -672,17 +698,24 @@ func (dm *DockerManager) runContainer( fs, err := os.Create(containerLogPath) if err != nil { // TODO: Clean up the previously created dir? return the error? - glog.Errorf("Error on creating termination-log file %q: %v", containerLogPath, err) + utilruntime.HandleError(fmt.Errorf("error creating termination-log file %q: %v", containerLogPath, err)) } else { fs.Close() // Close immediately; we're just doing a `touch` here - b := fmt.Sprintf("%s:%s", containerLogPath, container.TerminationMessagePath) + + // Chmod is needed because ioutil.WriteFile() ends up calling + // open(2) to create the file, so the final mode used is "mode & + // ~umask". But we want to make sure the specified mode is used + // in the file no matter what the umask is. + if err := os.Chmod(containerLogPath, 0666); err != nil { + utilruntime.HandleError(fmt.Errorf("unable to set termination-log file permissions %q: %v", containerLogPath, err)) + } // Have docker relabel the termination log path if SELinux is // enabled. + b := fmt.Sprintf("%s:%s", containerLogPath, container.TerminationMessagePath) if selinux.SELinuxEnabled() { b += ":Z" } - binds = append(binds, b) } } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockertools/docker_manager_linux_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockertools/docker_manager_linux_test.go index 72dc111d..7c1d3bbb 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockertools/docker_manager_linux_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockertools/docker_manager_linux_test.go @@ -27,6 +27,7 @@ import ( "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/record" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" @@ -282,7 +283,7 @@ func TestCreateAppArmorContanier(t *testing.T) { dm.recorder = recorder pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "12345678", Name: "foo", Namespace: "new", @@ -417,7 +418,7 @@ func TestGetPodStatusFromNetworkPlugin(t *testing.T) { }{ { pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "12345678", Name: "foo", Namespace: "new", @@ -435,7 +436,7 @@ func TestGetPodStatusFromNetworkPlugin(t *testing.T) { }, { pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "12345678", Name: "foo", Namespace: "new", diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockertools/docker_manager_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockertools/docker_manager_test.go index 645e0cd6..c9a9e62b 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockertools/docker_manager_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockertools/docker_manager_test.go @@ -17,6 +17,7 @@ limitations under the License. package dockertools import ( + "flag" "fmt" "io/ioutil" "net" @@ -36,9 +37,12 @@ import ( "github.com/golang/mock/gomock" cadvisorapi "github.com/google/cadvisor/info/v1" "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" kubetypes "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/client-go/util/clock" + "k8s.io/client-go/util/flowcontrol" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" "k8s.io/kubernetes/pkg/api/v1" @@ -52,12 +56,25 @@ import ( nettest "k8s.io/kubernetes/pkg/kubelet/network/testing" proberesults "k8s.io/kubernetes/pkg/kubelet/prober/results" "k8s.io/kubernetes/pkg/kubelet/types" - "k8s.io/kubernetes/pkg/util/clock" uexec "k8s.io/kubernetes/pkg/util/exec" - "k8s.io/kubernetes/pkg/util/flowcontrol" "k8s.io/kubernetes/pkg/util/intstr" ) +var testTempDir string + +func TestMain(m *testing.M) { + dir, err := ioutil.TempDir("", "dockertools") + if err != nil { + panic(err) + } + testTempDir = dir + + flag.Parse() + status := m.Run() + os.RemoveAll(testTempDir) + os.Exit(status) +} + type fakeHTTP struct { url string err error @@ -80,7 +97,7 @@ func (f *fakeRuntimeHelper) GenerateRunContainerOptions(pod *v1.Pod, container * var opts kubecontainer.RunContainerOptions var err error if len(container.TerminationMessagePath) != 0 { - testPodContainerDir, err = ioutil.TempDir("", "fooPodContainerDir") + testPodContainerDir, err = ioutil.TempDir(testTempDir, "fooPodContainerDir") if err != nil { return nil, err } @@ -164,7 +181,7 @@ func newTestDockerManagerWithHTTPClient(fakeHTTPClient *fakeHTTP) (*DockerManage } func newTestDockerManagerWithVersion(version, apiVersion string) (*DockerManager, *FakeDockerClient) { - fakeDocker := NewFakeDockerClientWithVersion(version, apiVersion) + fakeDocker := NewFakeDockerClient().WithVersion(version, apiVersion) return createTestDockerManagerWithFakeImageManager(nil, fakeDocker) } @@ -1918,7 +1935,7 @@ func makePod(name string, spec *v1.PodSpec) *v1.Pod { spec = &v1.PodSpec{Containers: []v1.Container{{Name: "foo"}, {Name: "bar"}}} } pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "12345678", Name: name, Namespace: "new", diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockertools/exec.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockertools/exec.go index f234698c..83fad9c6 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockertools/exec.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockertools/exec.go @@ -53,6 +53,7 @@ func (*NsenterExecHandler) ExecInContainer(client DockerInterface, container *do args = append(args, container.Config.Env...) args = append(args, cmd...) command := exec.Command(nsenter, args...) + var cmdErr error if tty { p, err := kubecontainer.StartPty(command) if err != nil { @@ -75,7 +76,7 @@ func (*NsenterExecHandler) ExecInContainer(client DockerInterface, container *do go io.Copy(stdout, p) } - err = command.Wait() + cmdErr = command.Wait() } else { if stdin != nil { // Use an os.Pipe here as it returns true *os.File objects. @@ -97,13 +98,13 @@ func (*NsenterExecHandler) ExecInContainer(client DockerInterface, container *do command.Stderr = stderr } - err = command.Run() + cmdErr = command.Run() } - if exitErr, ok := err.(*exec.ExitError); ok { + if exitErr, ok := cmdErr.(*exec.ExitError); ok { return &utilexec.ExitErrorWrapper{ExitError: exitErr} } - return err + return cmdErr } // NativeExecHandler executes commands in Docker containers using Docker's exec API. diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockertools/fake_docker_client.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockertools/fake_docker_client.go index d5e612a1..b94d9acf 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockertools/fake_docker_client.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockertools/fake_docker_client.go @@ -28,7 +28,7 @@ import ( dockertypes "github.com/docker/engine-api/types" dockercontainer "github.com/docker/engine-api/types/container" - "k8s.io/kubernetes/pkg/util/clock" + "k8s.io/client-go/util/clock" "k8s.io/kubernetes/pkg/api/v1" ) @@ -55,8 +55,9 @@ type FakeDockerClient struct { Errors map[string]error called []calledDetail pulled []string + EnableTrace bool - // Created, Stopped and Removed all container docker ID + // Created, Started, Stopped and Removed all contain container docker ID Created []string Started []string Stopped []string @@ -74,25 +75,64 @@ type FakeDockerClient struct { const fakeDockerVersion = "1.8.1" func NewFakeDockerClient() *FakeDockerClient { - return NewFakeDockerClientWithVersion(fakeDockerVersion, minimumDockerAPIVersion) -} - -func NewFakeDockerClientWithClock(c clock.Clock) *FakeDockerClient { - return newClientWithVersionAndClock(fakeDockerVersion, minimumDockerAPIVersion, c) -} - -func NewFakeDockerClientWithVersion(version, apiVersion string) *FakeDockerClient { - return newClientWithVersionAndClock(version, apiVersion, clock.RealClock{}) -} - -func newClientWithVersionAndClock(version, apiVersion string, c clock.Clock) *FakeDockerClient { return &FakeDockerClient{ - VersionInfo: dockertypes.Version{Version: version, APIVersion: apiVersion}, + VersionInfo: dockertypes.Version{Version: fakeDockerVersion, APIVersion: minimumDockerAPIVersion}, Errors: make(map[string]error), ContainerMap: make(map[string]*dockertypes.ContainerJSON), - Clock: c, + Clock: clock.RealClock{}, // default this to an empty result, so that we never have a nil non-error response from InspectImage Image: &dockertypes.ImageInspect{}, + // default this to true, so that we trace calls, image pulls and container lifecycle + EnableTrace: true, + } +} + +func (f *FakeDockerClient) WithClock(c clock.Clock) *FakeDockerClient { + f.Lock() + defer f.Unlock() + f.Clock = c + return f +} + +func (f *FakeDockerClient) WithVersion(version, apiVersion string) *FakeDockerClient { + f.Lock() + defer f.Unlock() + f.VersionInfo = dockertypes.Version{Version: version, APIVersion: apiVersion} + return f +} + +func (f *FakeDockerClient) WithTraceDisabled() *FakeDockerClient { + f.Lock() + defer f.Unlock() + f.EnableTrace = false + return f +} + +func (f *FakeDockerClient) appendCalled(callDetail calledDetail) { + if f.EnableTrace { + f.called = append(f.called, callDetail) + } +} + +func (f *FakeDockerClient) appendPulled(pull string) { + if f.EnableTrace { + f.pulled = append(f.pulled, pull) + } +} + +func (f *FakeDockerClient) appendContainerTrace(traceCategory string, containerName string) { + if !f.EnableTrace { + return + } + switch traceCategory { + case "Created": + f.Created = append(f.Created, containerName) + case "Started": + f.Started = append(f.Started, containerName) + case "Stopped": + f.Stopped = append(f.Stopped, containerName) + case "Removed": + f.Removed = append(f.Removed, containerName) } } @@ -120,9 +160,10 @@ func (f *FakeDockerClient) ClearCalls() { f.Lock() defer f.Unlock() f.called = []calledDetail{} - f.Stopped = []string{} f.pulled = []string{} f.Created = []string{} + f.Started = []string{} + f.Stopped = []string{} f.Removed = []string{} } @@ -270,6 +311,17 @@ func (f *FakeDockerClient) AssertStopped(stopped []string) error { return nil } +func (f *FakeDockerClient) AssertRemoved(removed []string) error { + f.Lock() + defer f.Unlock() + sort.StringSlice(removed).Sort() + sort.StringSlice(f.Removed).Sort() + if !reflect.DeepEqual(removed, f.Removed) { + return fmt.Errorf("expected %#v, got %#v", removed, f.Removed) + } + return nil +} + func (f *FakeDockerClient) popError(op string) error { if f.Errors == nil { return nil @@ -288,7 +340,7 @@ func (f *FakeDockerClient) popError(op string) error { func (f *FakeDockerClient) ListContainers(options dockertypes.ContainerListOptions) ([]dockertypes.Container, error) { f.Lock() defer f.Unlock() - f.called = append(f.called, calledDetail{name: "list"}) + f.appendCalled(calledDetail{name: "list"}) err := f.popError("list") containerList := append([]dockertypes.Container{}, f.RunningContainerList...) if options.All { @@ -305,7 +357,7 @@ func (f *FakeDockerClient) ListContainers(options dockertypes.ContainerListOptio func (f *FakeDockerClient) InspectContainer(id string) (*dockertypes.ContainerJSON, error) { f.Lock() defer f.Unlock() - f.called = append(f.called, calledDetail{name: "inspect_container"}) + f.appendCalled(calledDetail{name: "inspect_container"}) err := f.popError("inspect_container") if container, ok := f.ContainerMap[id]; ok { return container, err @@ -322,7 +374,7 @@ func (f *FakeDockerClient) InspectContainer(id string) (*dockertypes.ContainerJS func (f *FakeDockerClient) InspectImageByRef(name string) (*dockertypes.ImageInspect, error) { f.Lock() defer f.Unlock() - f.called = append(f.called, calledDetail{name: "inspect_image"}) + f.appendCalled(calledDetail{name: "inspect_image"}) err := f.popError("inspect_image") return f.Image, err } @@ -332,7 +384,7 @@ func (f *FakeDockerClient) InspectImageByRef(name string) (*dockertypes.ImageIns func (f *FakeDockerClient) InspectImageByID(name string) (*dockertypes.ImageInspect, error) { f.Lock() defer f.Unlock() - f.called = append(f.called, calledDetail{name: "inspect_image"}) + f.appendCalled(calledDetail{name: "inspect_image"}) err := f.popError("inspect_image") return f.Image, err } @@ -356,7 +408,7 @@ func (f *FakeDockerClient) normalSleep(mean, stdDev, cutOffMillis int) { func (f *FakeDockerClient) CreateContainer(c dockertypes.ContainerCreateConfig) (*dockertypes.ContainerCreateResponse, error) { f.Lock() defer f.Unlock() - f.called = append(f.called, calledDetail{name: "create"}) + f.appendCalled(calledDetail{name: "create"}) if err := f.popError("create"); err != nil { return nil, err } @@ -364,7 +416,7 @@ func (f *FakeDockerClient) CreateContainer(c dockertypes.ContainerCreateConfig) // Docker likes to add a '/', so copy that behavior. name := "/" + c.Name id := name - f.Created = append(f.Created, name) + f.appendContainerTrace("Created", name) // The newest container should be in front, because we assume so in GetPodStatus() f.RunningContainerList = append([]dockertypes.Container{ {ID: name, Names: []string{name}, Image: c.Config.Image, Labels: c.Config.Labels}, @@ -380,11 +432,11 @@ func (f *FakeDockerClient) CreateContainer(c dockertypes.ContainerCreateConfig) func (f *FakeDockerClient) StartContainer(id string) error { f.Lock() defer f.Unlock() - f.called = append(f.called, calledDetail{name: "start"}) + f.appendCalled(calledDetail{name: "start"}) if err := f.popError("start"); err != nil { return err } - f.Started = append(f.Started, id) + f.appendContainerTrace("Started", id) container, ok := f.ContainerMap[id] if !ok { container = convertFakeContainer(&FakeContainer{ID: id, Name: id}) @@ -404,11 +456,11 @@ func (f *FakeDockerClient) StartContainer(id string) error { func (f *FakeDockerClient) StopContainer(id string, timeout int) error { f.Lock() defer f.Unlock() - f.called = append(f.called, calledDetail{name: "stop"}) + f.appendCalled(calledDetail{name: "stop"}) if err := f.popError("stop"); err != nil { return err } - f.Stopped = append(f.Stopped, id) + f.appendContainerTrace("Stopped", id) // Container status should be Updated before container moved to ExitedContainerList f.updateContainerStatus(id, statusExitedPrefix) var newList []dockertypes.Container @@ -442,7 +494,7 @@ func (f *FakeDockerClient) StopContainer(id string, timeout int) error { func (f *FakeDockerClient) RemoveContainer(id string, opts dockertypes.ContainerRemoveOptions) error { f.Lock() defer f.Unlock() - f.called = append(f.called, calledDetail{name: "remove"}) + f.appendCalled(calledDetail{name: "remove"}) err := f.popError("remove") if err != nil { return err @@ -451,7 +503,7 @@ func (f *FakeDockerClient) RemoveContainer(id string, opts dockertypes.Container if f.ExitedContainerList[i].ID == id { delete(f.ContainerMap, id) f.ExitedContainerList = append(f.ExitedContainerList[:i], f.ExitedContainerList[i+1:]...) - f.Removed = append(f.Removed, id) + f.appendContainerTrace("Removed", id) return nil } @@ -465,7 +517,7 @@ func (f *FakeDockerClient) RemoveContainer(id string, opts dockertypes.Container func (f *FakeDockerClient) Logs(id string, opts dockertypes.ContainerLogsOptions, sopts StreamOptions) error { f.Lock() defer f.Unlock() - f.called = append(f.called, calledDetail{name: "logs"}) + f.appendCalled(calledDetail{name: "logs"}) return f.popError("logs") } @@ -474,7 +526,7 @@ func (f *FakeDockerClient) Logs(id string, opts dockertypes.ContainerLogsOptions func (f *FakeDockerClient) PullImage(image string, auth dockertypes.AuthConfig, opts dockertypes.ImagePullOptions) error { f.Lock() defer f.Unlock() - f.called = append(f.called, calledDetail{name: "pull"}) + f.appendCalled(calledDetail{name: "pull"}) err := f.popError("pull") if err == nil { authJson, _ := json.Marshal(auth) @@ -482,7 +534,7 @@ func (f *FakeDockerClient) PullImage(image string, auth dockertypes.AuthConfig, ID: image, RepoTags: []string{image}, } - f.pulled = append(f.pulled, fmt.Sprintf("%s using %s", image, string(authJson))) + f.appendPulled(fmt.Sprintf("%s using %s", image, string(authJson))) } return err } @@ -501,21 +553,21 @@ func (f *FakeDockerClient) CreateExec(id string, opts dockertypes.ExecConfig) (* f.Lock() defer f.Unlock() f.execCmd = opts.Cmd - f.called = append(f.called, calledDetail{name: "create_exec"}) + f.appendCalled(calledDetail{name: "create_exec"}) return &dockertypes.ContainerExecCreateResponse{ID: "12345678"}, nil } func (f *FakeDockerClient) StartExec(startExec string, opts dockertypes.ExecStartCheck, sopts StreamOptions) error { f.Lock() defer f.Unlock() - f.called = append(f.called, calledDetail{name: "start_exec"}) + f.appendCalled(calledDetail{name: "start_exec"}) return nil } func (f *FakeDockerClient) AttachToContainer(id string, opts dockertypes.ContainerAttachOptions, sopts StreamOptions) error { f.Lock() defer f.Unlock() - f.called = append(f.called, calledDetail{name: "attach"}) + f.appendCalled(calledDetail{name: "attach"}) return nil } @@ -524,13 +576,13 @@ func (f *FakeDockerClient) InspectExec(id string) (*dockertypes.ContainerExecIns } func (f *FakeDockerClient) ListImages(opts dockertypes.ImageListOptions) ([]dockertypes.Image, error) { - f.called = append(f.called, calledDetail{name: "list_images"}) + f.appendCalled(calledDetail{name: "list_images"}) err := f.popError("list_images") return f.Images, err } func (f *FakeDockerClient) RemoveImage(image string, opts dockertypes.ImageRemoveOptions) ([]dockertypes.ImageDelete, error) { - f.called = append(f.called, calledDetail{name: "remove_image", arguments: []interface{}{image, opts}}) + f.appendCalled(calledDetail{name: "remove_image", arguments: []interface{}{image, opts}}) err := f.popError("remove_image") if err == nil { for i := range f.Images { @@ -560,14 +612,14 @@ func (f *FakeDockerClient) updateContainerStatus(id, status string) { func (f *FakeDockerClient) ResizeExecTTY(id string, height, width int) error { f.Lock() defer f.Unlock() - f.called = append(f.called, calledDetail{name: "resize_exec"}) + f.appendCalled(calledDetail{name: "resize_exec"}) return nil } func (f *FakeDockerClient) ResizeContainerTTY(id string, height, width int) error { f.Lock() defer f.Unlock() - f.called = append(f.called, calledDetail{name: "resize_container"}) + f.appendCalled(calledDetail{name: "resize_container"}) return nil } @@ -612,7 +664,7 @@ func (f *FakeDockerPuller) GetImageRef(name string) (string, error) { func (f *FakeDockerClient) ImageHistory(id string) ([]dockertypes.ImageHistory, error) { f.Lock() defer f.Unlock() - f.called = append(f.called, calledDetail{name: "image_history"}) + f.appendCalled(calledDetail{name: "image_history"}) history := f.ImageHistoryMap[id] return history, nil } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockertools/fake_manager.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockertools/fake_manager.go index bff9dcaa..d7629506 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockertools/fake_manager.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockertools/fake_manager.go @@ -19,6 +19,7 @@ package dockertools import ( cadvisorapi "github.com/google/cadvisor/info/v1" "k8s.io/apimachinery/pkg/types" + "k8s.io/client-go/util/flowcontrol" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/record" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" @@ -26,7 +27,6 @@ import ( proberesults "k8s.io/kubernetes/pkg/kubelet/prober/results" kubetypes "k8s.io/kubernetes/pkg/kubelet/types" "k8s.io/kubernetes/pkg/kubelet/util/cache" - "k8s.io/kubernetes/pkg/util/flowcontrol" "k8s.io/kubernetes/pkg/util/oom" "k8s.io/kubernetes/pkg/util/procfs" ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockertools/images_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockertools/images_test.go index 21fe5ee9..08afd635 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockertools/images_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockertools/images_test.go @@ -24,7 +24,7 @@ import ( ) func TestImageStatsNoImages(t *testing.T) { - fakeDockerClient := NewFakeDockerClientWithVersion("1.2.3", "1.2") + fakeDockerClient := NewFakeDockerClient().WithVersion("1.2.3", "1.2") isp := newImageStatsProvider(fakeDockerClient) st, err := isp.ImageStats() as := assert.New(t) @@ -34,7 +34,7 @@ func TestImageStatsNoImages(t *testing.T) { } func TestImageStatsWithImages(t *testing.T) { - fakeDockerClient := NewFakeDockerClientWithVersion("1.2.3", "1.2") + fakeDockerClient := NewFakeDockerClient().WithVersion("1.2.3", "1.2") fakeHistoryData := map[string][]dockertypes.ImageHistory{ "busybox": { { @@ -317,7 +317,7 @@ func TestImageStatsWithCachedImages(t *testing.T) { expectedTotalStorageSize: 600, }, } { - fakeDockerClient := NewFakeDockerClientWithVersion("1.2.3", "1.2") + fakeDockerClient := NewFakeDockerClient().WithVersion("1.2.3", "1.2") fakeDockerClient.InjectImages(test.images) fakeDockerClient.InjectImageHistory(test.history) isp := newImageStatsProvider(fakeDockerClient) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockertools/labels.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockertools/labels.go index 3e453cbf..37edd50f 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockertools/labels.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockertools/labels.go @@ -39,11 +39,12 @@ const ( kubernetesPodDeletionGracePeriodLabel = "io.kubernetes.pod.deletionGracePeriod" kubernetesPodTerminationGracePeriodLabel = "io.kubernetes.pod.terminationGracePeriod" - kubernetesContainerHashLabel = "io.kubernetes.container.hash" - kubernetesContainerRestartCountLabel = "io.kubernetes.container.restartCount" - kubernetesContainerTerminationMessagePathLabel = "io.kubernetes.container.terminationMessagePath" - kubernetesContainerPreStopHandlerLabel = "io.kubernetes.container.preStopHandler" - kubernetesContainerPortsLabel = "io.kubernetes.container.ports" // Added in 1.4 + kubernetesContainerHashLabel = "io.kubernetes.container.hash" + kubernetesContainerRestartCountLabel = "io.kubernetes.container.restartCount" + kubernetesContainerTerminationMessagePathLabel = "io.kubernetes.container.terminationMessagePath" + kubernetesContainerTerminationMessagePolicyLabel = "io.kubernetes.container.terminationMessagePolicy" + kubernetesContainerPreStopHandlerLabel = "io.kubernetes.container.preStopHandler" + kubernetesContainerPortsLabel = "io.kubernetes.container.ports" // Added in 1.4 // TODO(random-liu): Keep this for old containers, remove this when we drop support for v1.1. kubernetesPodLabel = "io.kubernetes.pod.data" @@ -63,6 +64,7 @@ type labelledContainerInfo struct { Hash string RestartCount int TerminationMessagePath string + TerminationMessagePolicy v1.TerminationMessagePolicy PreStopHandler *v1.Handler Ports []v1.ContainerPort } @@ -83,6 +85,7 @@ func newLabels(container *v1.Container, pod *v1.Pod, restartCount int, enableCus labels[kubernetesContainerHashLabel] = strconv.FormatUint(kubecontainer.HashContainer(container), 16) labels[kubernetesContainerRestartCountLabel] = strconv.Itoa(restartCount) labels[kubernetesContainerTerminationMessagePathLabel] = container.TerminationMessagePath + labels[kubernetesContainerTerminationMessagePolicyLabel] = string(container.TerminationMessagePolicy) if container.Lifecycle != nil && container.Lifecycle.PreStop != nil { // Using json enconding so that the PreStop handler object is readable after writing as a label rawPreStop, err := json.Marshal(container.Lifecycle.PreStop) @@ -118,7 +121,8 @@ func getContainerInfoFromLabel(labels map[string]string) *labelledContainerInfo PodUID: kubetypes.UID(getStringValueFromLabel(labels, types.KubernetesPodUIDLabel)), Name: getStringValueFromLabel(labels, types.KubernetesContainerNameLabel), Hash: getStringValueFromLabel(labels, kubernetesContainerHashLabel), - TerminationMessagePath: getStringValueFromLabel(labels, kubernetesContainerTerminationMessagePathLabel), + TerminationMessagePath: getStringValueFromLabel(labels, kubernetesContainerTerminationMessagePathLabel), + TerminationMessagePolicy: v1.TerminationMessagePolicy(getStringValueFromLabel(labels, kubernetesContainerTerminationMessagePolicyLabel)), } if containerInfo.RestartCount, err = getIntValueFromLabel(labels, kubernetesContainerRestartCountLabel); err != nil { logError(containerInfo, kubernetesContainerRestartCountLabel, err) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/dockertools/labels_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/dockertools/labels_test.go index a0b30bd0..b04e9f34 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/dockertools/labels_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/dockertools/labels_test.go @@ -21,6 +21,7 @@ import ( "strconv" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/api/testapi" "k8s.io/kubernetes/pkg/api/v1" @@ -71,7 +72,7 @@ func TestLabels(t *testing.T) { Lifecycle: lifecycle, } pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test_pod", Namespace: "test_pod_namespace", UID: "test_pod_uid", diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/envvars/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/envvars/BUILD index 493d6b00..99ef7e21 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/envvars/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/envvars/BUILD @@ -25,6 +25,7 @@ go_test( deps = [ "//pkg/api/v1:go_default_library", "//pkg/kubelet/envvars:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/envvars/envvars_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/envvars/envvars_test.go index 1a580136..8b192526 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/envvars/envvars_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/envvars/envvars_test.go @@ -20,6 +20,7 @@ import ( "reflect" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/kubelet/envvars" ) @@ -27,7 +28,7 @@ import ( func TestFromServices(t *testing.T) { sl := []*v1.Service{ { - ObjectMeta: v1.ObjectMeta{Name: "foo-bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo-bar"}, Spec: v1.ServiceSpec{ Selector: map[string]string{"bar": "baz"}, ClusterIP: "1.2.3.4", @@ -37,7 +38,7 @@ func TestFromServices(t *testing.T) { }, }, { - ObjectMeta: v1.ObjectMeta{Name: "abc-123"}, + ObjectMeta: metav1.ObjectMeta{Name: "abc-123"}, Spec: v1.ServiceSpec{ Selector: map[string]string{"bar": "baz"}, ClusterIP: "5.6.7.8", @@ -48,7 +49,7 @@ func TestFromServices(t *testing.T) { }, }, { - ObjectMeta: v1.ObjectMeta{Name: "q-u-u-x"}, + ObjectMeta: metav1.ObjectMeta{Name: "q-u-u-x"}, Spec: v1.ServiceSpec{ Selector: map[string]string{"bar": "baz"}, ClusterIP: "9.8.7.6", @@ -59,7 +60,7 @@ func TestFromServices(t *testing.T) { }, }, { - ObjectMeta: v1.ObjectMeta{Name: "svrc-clusterip-none"}, + ObjectMeta: metav1.ObjectMeta{Name: "svrc-clusterip-none"}, Spec: v1.ServiceSpec{ Selector: map[string]string{"bar": "baz"}, ClusterIP: "None", @@ -69,7 +70,7 @@ func TestFromServices(t *testing.T) { }, }, { - ObjectMeta: v1.ObjectMeta{Name: "svrc-clusterip-empty"}, + ObjectMeta: metav1.ObjectMeta{Name: "svrc-clusterip-empty"}, Spec: v1.ServiceSpec{ Selector: map[string]string{"bar": "baz"}, ClusterIP: "", diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/eviction/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/eviction/BUILD index d84d36ec..950cc678 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/eviction/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/eviction/BUILD @@ -33,11 +33,11 @@ go_library( "//pkg/kubelet/types:go_default_library", "//pkg/kubelet/util/format:go_default_library", "//pkg/quota/evaluator/core:go_default_library", - "//pkg/util/clock:go_default_library", "//vendor:github.com/golang/glog", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/util/sets", "//vendor:k8s.io/apimachinery/pkg/util/wait", + "//vendor:k8s.io/client-go/util/clock", ], ) @@ -58,9 +58,9 @@ go_test( "//pkg/kubelet/lifecycle:go_default_library", "//pkg/kubelet/types:go_default_library", "//pkg/quota:go_default_library", - "//pkg/util/clock:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", + "//vendor:k8s.io/client-go/util/clock", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/eviction/OWNERS b/vendor/k8s.io/kubernetes/pkg/kubelet/eviction/OWNERS index 86df6b7c..a63babac 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/eviction/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/eviction/OWNERS @@ -1,4 +1,4 @@ -assignees: - - derekwaynecarr - - vishh - - dchen1107 +approvers: +- derekwaynecarr +- vishh +- dchen1107 diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/eviction/eviction_manager.go b/vendor/k8s.io/kubernetes/pkg/kubelet/eviction/eviction_manager.go index 1370ca62..5ee7be7c 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/eviction/eviction_manager.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/eviction/eviction_manager.go @@ -24,6 +24,7 @@ import ( "github.com/golang/glog" "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/client-go/util/clock" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/record" @@ -34,7 +35,6 @@ import ( "k8s.io/kubernetes/pkg/kubelet/server/stats" kubetypes "k8s.io/kubernetes/pkg/kubelet/types" "k8s.io/kubernetes/pkg/kubelet/util/format" - "k8s.io/kubernetes/pkg/util/clock" ) // managerImpl implements Manager diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/eviction/eviction_manager_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/eviction/eviction_manager_test.go index fe3322c2..4f4954cf 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/eviction/eviction_manager_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/eviction/eviction_manager_test.go @@ -21,13 +21,13 @@ import ( "time" "k8s.io/apimachinery/pkg/types" + "k8s.io/client-go/util/clock" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/record" statsapi "k8s.io/kubernetes/pkg/kubelet/api/v1alpha1/stats" "k8s.io/kubernetes/pkg/kubelet/lifecycle" kubetypes "k8s.io/kubernetes/pkg/kubelet/types" - "k8s.io/kubernetes/pkg/util/clock" ) // mockPodKiller is used to testing which pod is killed diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/eviction/helpers_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/eviction/helpers_test.go index 5b634464..bb0e1bd6 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/eviction/helpers_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/eviction/helpers_test.go @@ -1573,7 +1573,7 @@ func newVolume(name string, volumeSource v1.VolumeSource) v1.Volume { // newPod uses the name as the uid. Make names unique for testing. func newPod(name string, containers []v1.Container, volumes []v1.Volume) *v1.Pod { return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, UID: types.UID(name), }, diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/images/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/images/BUILD index f0891b3a..85145e5c 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/images/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/images/BUILD @@ -25,13 +25,13 @@ go_library( "//pkg/kubelet/cadvisor:go_default_library", "//pkg/kubelet/container:go_default_library", "//pkg/kubelet/events:go_default_library", - "//pkg/util/flowcontrol:go_default_library", "//pkg/util/parsers:go_default_library", "//vendor:github.com/docker/distribution/reference", "//vendor:github.com/golang/glog", "//vendor:k8s.io/apimachinery/pkg/util/errors", "//vendor:k8s.io/apimachinery/pkg/util/sets", "//vendor:k8s.io/apimachinery/pkg/util/wait", + "//vendor:k8s.io/client-go/util/flowcontrol", ], ) @@ -49,11 +49,12 @@ go_test( "//pkg/kubelet/cadvisor/testing:go_default_library", "//pkg/kubelet/container:go_default_library", "//pkg/kubelet/container/testing:go_default_library", - "//pkg/util/clock:go_default_library", - "//pkg/util/flowcontrol:go_default_library", "//vendor:github.com/google/cadvisor/info/v2", "//vendor:github.com/stretchr/testify/assert", "//vendor:github.com/stretchr/testify/require", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/client-go/util/clock", + "//vendor:k8s.io/client-go/util/flowcontrol", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/images/helpers.go b/vendor/k8s.io/kubernetes/pkg/kubelet/images/helpers.go index f7329fba..da3cc214 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/images/helpers.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/images/helpers.go @@ -19,9 +19,9 @@ package images import ( "fmt" + "k8s.io/client-go/util/flowcontrol" "k8s.io/kubernetes/pkg/api/v1" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" - "k8s.io/kubernetes/pkg/util/flowcontrol" ) // throttleImagePulling wraps kubecontainer.ImageService to throttle image diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/images/image_gc_manager_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/images/image_gc_manager_test.go index c8c9ad87..4ef7ff4e 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/images/image_gc_manager_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/images/image_gc_manager_test.go @@ -24,11 +24,11 @@ import ( cadvisorapiv2 "github.com/google/cadvisor/info/v2" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "k8s.io/client-go/util/clock" "k8s.io/kubernetes/pkg/client/record" cadvisortest "k8s.io/kubernetes/pkg/kubelet/cadvisor/testing" "k8s.io/kubernetes/pkg/kubelet/container" containertest "k8s.io/kubernetes/pkg/kubelet/container/testing" - "k8s.io/kubernetes/pkg/util/clock" ) var zero time.Time diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/images/image_manager.go b/vendor/k8s.io/kubernetes/pkg/kubelet/images/image_manager.go index 4c62b0d8..a6180913 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/images/image_manager.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/images/image_manager.go @@ -21,11 +21,11 @@ import ( dockerref "github.com/docker/distribution/reference" "github.com/golang/glog" + "k8s.io/client-go/util/flowcontrol" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/record" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" "k8s.io/kubernetes/pkg/kubelet/events" - "k8s.io/kubernetes/pkg/util/flowcontrol" "k8s.io/kubernetes/pkg/util/parsers" ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/images/image_manager_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/images/image_manager_test.go index 86ea4577..a4cb9a3e 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/images/image_manager_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/images/image_manager_test.go @@ -22,12 +22,13 @@ import ( "time" "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/util/clock" + "k8s.io/client-go/util/flowcontrol" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/record" . "k8s.io/kubernetes/pkg/kubelet/container" ctest "k8s.io/kubernetes/pkg/kubelet/container/testing" - "k8s.io/kubernetes/pkg/util/clock" - "k8s.io/kubernetes/pkg/util/flowcontrol" ) type pullerTestCase struct { @@ -111,7 +112,7 @@ func pullerTestEnv(c pullerTestCase, serialized bool) (puller ImageManager, fake func TestParallelPuller(t *testing.T) { pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test_pod", Namespace: "test-ns", UID: "bar", @@ -135,7 +136,7 @@ func TestParallelPuller(t *testing.T) { func TestSerializedPuller(t *testing.T) { pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test_pod", Namespace: "test-ns", UID: "bar", diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet.go index 71d97628..43bc4960 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet.go @@ -34,11 +34,16 @@ import ( clientgoclientset "k8s.io/client-go/kubernetes" cadvisorapi "github.com/google/cadvisor/info/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/types" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/client-go/util/clock" + "k8s.io/client-go/util/flowcontrol" + "k8s.io/client-go/util/integer" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" @@ -46,9 +51,9 @@ import ( componentconfigv1alpha1 "k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1" "k8s.io/kubernetes/pkg/client/cache" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" + "k8s.io/kubernetes/pkg/client/legacylisters" "k8s.io/kubernetes/pkg/client/record" "k8s.io/kubernetes/pkg/cloudprovider" - "k8s.io/kubernetes/pkg/fields" internalapi "k8s.io/kubernetes/pkg/kubelet/api" "k8s.io/kubernetes/pkg/kubelet/cadvisor" "k8s.io/kubernetes/pkg/kubelet/cm" @@ -70,6 +75,7 @@ import ( proberesults "k8s.io/kubernetes/pkg/kubelet/prober/results" "k8s.io/kubernetes/pkg/kubelet/remote" "k8s.io/kubernetes/pkg/kubelet/rkt" + "k8s.io/kubernetes/pkg/kubelet/secret" "k8s.io/kubernetes/pkg/kubelet/server" "k8s.io/kubernetes/pkg/kubelet/server/stats" "k8s.io/kubernetes/pkg/kubelet/server/streaming" @@ -82,12 +88,9 @@ import ( "k8s.io/kubernetes/pkg/kubelet/volumemanager" "k8s.io/kubernetes/pkg/security/apparmor" "k8s.io/kubernetes/pkg/util/bandwidth" - "k8s.io/kubernetes/pkg/util/clock" utilconfig "k8s.io/kubernetes/pkg/util/config" utildbus "k8s.io/kubernetes/pkg/util/dbus" utilexec "k8s.io/kubernetes/pkg/util/exec" - "k8s.io/kubernetes/pkg/util/flowcontrol" - "k8s.io/kubernetes/pkg/util/integer" kubeio "k8s.io/kubernetes/pkg/util/io" utilipt "k8s.io/kubernetes/pkg/util/iptables" "k8s.io/kubernetes/pkg/util/mount" @@ -379,18 +382,18 @@ func NewMainKubelet(kubeCfg *componentconfig.KubeletConfiguration, kubeDeps *Kub serviceStore := cache.NewIndexer(cache.MetaNamespaceKeyFunc, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}) if kubeClient != nil { - serviceLW := cache.NewListWatchFromClient(kubeClient.Core().RESTClient(), "services", v1.NamespaceAll, fields.Everything()) + serviceLW := cache.NewListWatchFromClient(kubeClient.Core().RESTClient(), "services", metav1.NamespaceAll, fields.Everything()) cache.NewReflector(serviceLW, &v1.Service{}, serviceStore, 0).Run() } - serviceLister := &cache.StoreToServiceLister{Indexer: serviceStore} + serviceLister := &listers.StoreToServiceLister{Indexer: serviceStore} nodeStore := cache.NewStore(cache.MetaNamespaceKeyFunc) if kubeClient != nil { fieldSelector := fields.Set{api.ObjectNameField: string(nodeName)}.AsSelector() - nodeLW := cache.NewListWatchFromClient(kubeClient.Core().RESTClient(), "nodes", v1.NamespaceAll, fieldSelector) + nodeLW := cache.NewListWatchFromClient(kubeClient.Core().RESTClient(), "nodes", metav1.NamespaceAll, fieldSelector) cache.NewReflector(nodeLW, &v1.Node{}, nodeStore, 0).Run() } - nodeLister := &cache.StoreToNodeLister{Store: nodeStore} + nodeLister := &listers.StoreToNodeLister{Store: nodeStore} nodeInfo := &predicates.CachedNodeInfo{StoreToNodeLister: nodeLister} // TODO: get the real node object of ourself, @@ -409,6 +412,11 @@ func NewMainKubelet(kubeCfg *componentconfig.KubeletConfiguration, kubeDeps *Kub } containerRefManager := kubecontainer.NewRefManager() + secretManager, err := secret.NewSimpleSecretManager(kubeClient) + if err != nil { + return nil, fmt.Errorf("failed to initialize secret manager: %v", err) + } + oomWatcher := NewOOMWatcher(kubeDeps.CAdvisorInterface, kubeDeps.Recorder) klet := &Kubelet{ @@ -434,6 +442,7 @@ func NewMainKubelet(kubeCfg *componentconfig.KubeletConfiguration, kubeDeps *Kub recorder: kubeDeps.Recorder, cadvisor: kubeDeps.CAdvisorInterface, diskSpaceManager: diskSpaceManager, + secretManager: secretManager, cloud: kubeDeps.Cloud, autoDetectCloudProvider: (componentconfigv1alpha1.AutoDetectCloudProvider == kubeCfg.CloudProvider), nodeRef: nodeRef, @@ -498,7 +507,8 @@ func NewMainKubelet(kubeCfg *componentconfig.KubeletConfiguration, kubeDeps *Kub klet.livenessManager = proberesults.NewManager() klet.podCache = kubecontainer.NewCache() - klet.podManager = kubepod.NewBasicPodManager(kubepod.NewBasicMirrorClient(klet.kubeClient)) + // podManager is also responsible for keeping secretManager contents up-to-date. + klet.podManager = kubepod.NewBasicPodManager(kubepod.NewBasicMirrorClient(klet.kubeClient), secretManager) if kubeCfg.RemoteRuntimeEndpoint != "" { // kubeCfg.RemoteImageEndpoint is same as kubeCfg.RemoteRuntimeEndpoint if not explicitly specified @@ -543,7 +553,7 @@ func NewMainKubelet(kubeCfg *componentconfig.KubeletConfiguration, kubeDeps *Kub streamingConfig := getStreamingConfig(kubeCfg, kubeDeps) // Use the new CRI shim for docker. ds, err := dockershim.NewDockerService(klet.dockerClient, kubeCfg.SeccompProfileRoot, kubeCfg.PodInfraContainerImage, - streamingConfig, &pluginSettings, kubeCfg.RuntimeCgroups, kubeCfg.CgroupDriver) + streamingConfig, &pluginSettings, kubeCfg.RuntimeCgroups, kubeCfg.CgroupDriver, dockerExecHandler) if err != nil { return nil, err } @@ -718,7 +728,7 @@ func NewMainKubelet(kubeCfg *componentconfig.KubeletConfiguration, kubeDeps *Kub kubeDeps.Recorder) klet.volumePluginMgr, err = - NewInitializedVolumePluginMgr(klet, kubeDeps.VolumePlugins) + NewInitializedVolumePluginMgr(klet, secretManager, kubeDeps.VolumePlugins) if err != nil { return nil, err } @@ -739,7 +749,8 @@ func NewMainKubelet(kubeCfg *componentconfig.KubeletConfiguration, kubeDeps *Kub kubeDeps.Mounter, klet.getPodsDir(), kubeDeps.Recorder, - kubeCfg.ExperimentalCheckNodeCapabilitiesBeforeMount) + kubeCfg.ExperimentalCheckNodeCapabilitiesBeforeMount, + kubeCfg.KeepTerminatedPodVolumes) runtimeCache, err := kubecontainer.NewRuntimeCache(klet.containerRuntime) if err != nil { @@ -913,6 +924,9 @@ type Kubelet struct { // Diskspace manager. diskSpaceManager diskSpaceManager + // Secret manager. + secretManager secret.Manager + // Cached MachineInfo returned by cadvisor. machineInfo *cadvisorapi.MachineInfo @@ -1243,6 +1257,11 @@ func (kl *Kubelet) Run(updates <-chan kubetypes.PodUpdate) { // handled by pod workers). go wait.Until(kl.podKiller, 1*time.Second, wait.NeverStop) + // Start gorouting responsible for checking limits in resolv.conf + if kl.resolverConfig != "" { + go wait.Until(func() { kl.checkLimitsForResolvConf() }, 30*time.Second, wait.NeverStop) + } + // Start component sync loops. kl.statusManager.Start() kl.probeManager.Start() @@ -1299,6 +1318,8 @@ func (kl *Kubelet) GetClusterDNS(pod *v1.Pod) ([]string, []string, error) { if kl.resolverConfig == "" { hostDNS = []string{"127.0.0.1"} hostSearch = []string{"."} + } else { + hostSearch = kl.formDNSSearchForDNSDefault(hostSearch, pod) } return hostDNS, hostSearch, nil } @@ -1307,15 +1328,7 @@ func (kl *Kubelet) GetClusterDNS(pod *v1.Pod) ([]string, []string, error) { // the pod. The cluster DNS server itself will forward queries to other nameservers that is configured to use, // in case the cluster DNS server cannot resolve the DNS query itself dns := []string{kl.clusterDNS.String()} - - var dnsSearch []string - if kl.clusterDomain != "" { - nsSvcDomain := fmt.Sprintf("%s.svc.%s", pod.Namespace, kl.clusterDomain) - svcDomain := fmt.Sprintf("svc.%s", kl.clusterDomain) - dnsSearch = append([]string{nsSvcDomain, svcDomain, kl.clusterDomain}, hostSearch...) - } else { - dnsSearch = hostSearch - } + dnsSearch := kl.formDNSSearch(hostSearch, pod) return dns, dnsSearch, nil } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_cadvisor_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_cadvisor_test.go index 6c21547d..3e544189 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_cadvisor_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_cadvisor_test.go @@ -36,6 +36,7 @@ func TestGetContainerInfo(t *testing.T) { } testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() fakeRuntime := testKubelet.fakeRuntime kubelet := testKubelet.kubelet cadvisorReq := &cadvisorapi.ContainerInfoRequest{} @@ -72,6 +73,7 @@ func TestGetRawContainerInfoRoot(t *testing.T) { }, } testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() kubelet := testKubelet.kubelet mockCadvisor := testKubelet.fakeCadvisor cadvisorReq := &cadvisorapi.ContainerInfoRequest{} @@ -99,6 +101,7 @@ func TestGetRawContainerInfoSubcontainers(t *testing.T) { }, } testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() kubelet := testKubelet.kubelet mockCadvisor := testKubelet.fakeCadvisor cadvisorReq := &cadvisorapi.ContainerInfoRequest{} @@ -117,6 +120,7 @@ func TestGetRawContainerInfoSubcontainers(t *testing.T) { func TestGetContainerInfoWhenCadvisorFailed(t *testing.T) { containerID := "ab2cdf" testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() kubelet := testKubelet.kubelet mockCadvisor := testKubelet.fakeCadvisor fakeRuntime := testKubelet.fakeRuntime @@ -152,6 +156,7 @@ func TestGetContainerInfoWhenCadvisorFailed(t *testing.T) { func TestGetContainerInfoOnNonExistContainer(t *testing.T) { testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() kubelet := testKubelet.kubelet mockCadvisor := testKubelet.fakeCadvisor fakeRuntime := testKubelet.fakeRuntime @@ -166,6 +171,7 @@ func TestGetContainerInfoOnNonExistContainer(t *testing.T) { func TestGetContainerInfoWhenContainerRuntimeFailed(t *testing.T) { testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() kubelet := testKubelet.kubelet mockCadvisor := testKubelet.fakeCadvisor fakeRuntime := testKubelet.fakeRuntime @@ -187,6 +193,7 @@ func TestGetContainerInfoWhenContainerRuntimeFailed(t *testing.T) { func TestGetContainerInfoWithNoContainers(t *testing.T) { testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() kubelet := testKubelet.kubelet mockCadvisor := testKubelet.fakeCadvisor @@ -205,6 +212,7 @@ func TestGetContainerInfoWithNoContainers(t *testing.T) { func TestGetContainerInfoWithNoMatchingContainers(t *testing.T) { testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() fakeRuntime := testKubelet.fakeRuntime kubelet := testKubelet.kubelet mockCadvisor := testKubelet.fakeCadvisor @@ -253,6 +261,7 @@ func TestHasDedicatedImageFs(t *testing.T) { } for testName, testCase := range testCases { testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() kubelet := testKubelet.kubelet mockCadvisor := testKubelet.fakeCadvisor mockCadvisor.On("Start").Return(nil) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_getters_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_getters_test.go index 0c05c394..c72145d9 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_getters_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_getters_test.go @@ -25,6 +25,7 @@ import ( func TestKubeletDirs(t *testing.T) { testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() kubelet := testKubelet.kubelet root := kubelet.rootDirectory @@ -87,6 +88,7 @@ func TestKubeletDirs(t *testing.T) { func TestKubeletDirsCompat(t *testing.T) { testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() kubelet := testKubelet.kubelet root := kubelet.rootDirectory if err := os.MkdirAll(root, 0750); err != nil { diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_network.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_network.go index 4f615f1d..57b5e584 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_network.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_network.go @@ -20,6 +20,7 @@ import ( "fmt" "io" "io/ioutil" + "os" "strings" "github.com/golang/glog" @@ -89,6 +90,120 @@ func (kl *Kubelet) providerRequiresNetworkingConfiguration() bool { return supported } +func omitDuplicates(kl *Kubelet, pod *v1.Pod, combinedSearch []string) []string { + uniqueDomains := map[string]bool{} + + for _, dnsDomain := range combinedSearch { + if _, exists := uniqueDomains[dnsDomain]; !exists { + combinedSearch[len(uniqueDomains)] = dnsDomain + uniqueDomains[dnsDomain] = true + } else { + log := fmt.Sprintf("Found and omitted duplicated dns domain in host search line: '%s' during merging with cluster dns domains", dnsDomain) + kl.recorder.Event(pod, v1.EventTypeWarning, "DNSSearchForming", log) + glog.Error(log) + } + } + return combinedSearch[:len(uniqueDomains)] +} + +func formDNSSearchFitsLimits(kl *Kubelet, pod *v1.Pod, composedSearch []string) []string { + // resolver file Search line current limitations + resolvSearchLineDNSDomainsLimit := 6 + resolvSearchLineLenLimit := 255 + limitsExceeded := false + + if len(composedSearch) > resolvSearchLineDNSDomainsLimit { + composedSearch = composedSearch[:resolvSearchLineDNSDomainsLimit] + limitsExceeded = true + } + + if resolvSearchhLineStrLen := len(strings.Join(composedSearch, " ")); resolvSearchhLineStrLen > resolvSearchLineLenLimit { + cutDomainsNum := 0 + cutDoaminsLen := 0 + for i := len(composedSearch) - 1; i >= 0; i-- { + cutDoaminsLen += len(composedSearch[i]) + 1 + cutDomainsNum++ + + if (resolvSearchhLineStrLen - cutDoaminsLen) <= resolvSearchLineLenLimit { + break + } + } + + composedSearch = composedSearch[:(len(composedSearch) - cutDomainsNum)] + limitsExceeded = true + } + + if limitsExceeded { + log := fmt.Sprintf("Search Line limits were exceeded, some dns names have been omitted, the applied search line is: %s", strings.Join(composedSearch, " ")) + kl.recorder.Event(pod, v1.EventTypeWarning, "DNSSearchForming", log) + glog.Error(log) + } + return composedSearch +} + +func (kl *Kubelet) formDNSSearchForDNSDefault(hostSearch []string, pod *v1.Pod) []string { + return formDNSSearchFitsLimits(kl, pod, hostSearch) +} + +func (kl *Kubelet) formDNSSearch(hostSearch []string, pod *v1.Pod) []string { + if kl.clusterDomain == "" { + formDNSSearchFitsLimits(kl, pod, hostSearch) + return hostSearch + } + + nsSvcDomain := fmt.Sprintf("%s.svc.%s", pod.Namespace, kl.clusterDomain) + svcDomain := fmt.Sprintf("svc.%s", kl.clusterDomain) + dnsSearch := []string{nsSvcDomain, svcDomain, kl.clusterDomain} + + combinedSearch := append(dnsSearch, hostSearch...) + + combinedSearch = omitDuplicates(kl, pod, combinedSearch) + return formDNSSearchFitsLimits(kl, pod, combinedSearch) +} + +func (kl *Kubelet) checkLimitsForResolvConf() { + // resolver file Search line current limitations + resolvSearchLineDNSDomainsLimit := 6 + resolvSearchLineLenLimit := 255 + + f, err := os.Open(kl.resolverConfig) + if err != nil { + kl.recorder.Event(kl.nodeRef, v1.EventTypeWarning, "checkLimitsForResolvConf", err.Error()) + glog.Error("checkLimitsForResolvConf: " + err.Error()) + return + } + defer f.Close() + + _, hostSearch, err := kl.parseResolvConf(f) + if err != nil { + kl.recorder.Event(kl.nodeRef, v1.EventTypeWarning, "checkLimitsForResolvConf", err.Error()) + glog.Error("checkLimitsForResolvConf: " + err.Error()) + return + } + + domainCntLimit := resolvSearchLineDNSDomainsLimit + + if kl.clusterDomain != "" { + domainCntLimit -= 3 + } + + if len(hostSearch) > domainCntLimit { + log := fmt.Sprintf("Resolv.conf file '%s' contains search line consisting of more than %d domains!", kl.resolverConfig, domainCntLimit) + kl.recorder.Event(kl.nodeRef, v1.EventTypeWarning, "checkLimitsForResolvConf", log) + glog.Error("checkLimitsForResolvConf: " + log) + return + } + + if len(strings.Join(hostSearch, " ")) > resolvSearchLineLenLimit { + log := fmt.Sprintf("Resolv.conf file '%s' contains search line which length is more than allowed %d chars!", kl.resolverConfig, resolvSearchLineLenLimit) + kl.recorder.Event(kl.nodeRef, v1.EventTypeWarning, "checkLimitsForResolvConf", log) + glog.Error("checkLimitsForResolvConf: " + log) + return + } + + return +} + // parseResolveConf reads a resolv.conf file from the given reader, and parses // it into nameservers and searches, possibly returning an error. // TODO: move to utility package diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_network_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_network_test.go index 65d185fb..10be66ab 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_network_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_network_test.go @@ -17,17 +17,20 @@ limitations under the License. package kubelet import ( + "fmt" "net" "reflect" "strings" "testing" "k8s.io/kubernetes/pkg/api/v1" + "k8s.io/kubernetes/pkg/client/record" "k8s.io/kubernetes/pkg/util/bandwidth" ) func TestNodeIPParam(t *testing.T) { testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() kubelet := testKubelet.kubelet tests := []struct { nodeIP string @@ -96,6 +99,7 @@ func TestParseResolvConf(t *testing.T) { {"#comment\nnameserver 1.2.3.4\n#comment\nsearch foo\ncomment", []string{"1.2.3.4"}, []string{"foo"}}, } testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() kubelet := testKubelet.kubelet for i, tc := range testCases { ns, srch, err := kubelet.parseResolvConf(strings.NewReader(tc.data)) @@ -112,6 +116,84 @@ func TestParseResolvConf(t *testing.T) { } } +func TestComposeDNSSearch(t *testing.T) { + testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + kubelet := testKubelet.kubelet + + recorder := record.NewFakeRecorder(20) + kubelet.recorder = recorder + + pod := podWithUidNameNs("", "test_pod", "testNS") + kubelet.clusterDomain = "TEST" + + testCases := []struct { + dnsNames []string + hostNames []string + resultSearch []string + events []string + }{ + { + []string{"testNS.svc.TEST", "svc.TEST", "TEST"}, + []string{}, + []string{"testNS.svc.TEST", "svc.TEST", "TEST"}, + []string{}, + }, + + { + []string{"testNS.svc.TEST", "svc.TEST", "TEST"}, + []string{"AAA", "svc.TEST", "BBB", "TEST"}, + []string{"testNS.svc.TEST", "svc.TEST", "TEST", "AAA", "BBB"}, + []string{ + "Found and omitted duplicated dns domain in host search line: 'svc.TEST' during merging with cluster dns domains", + "Found and omitted duplicated dns domain in host search line: 'TEST' during merging with cluster dns domains", + }, + }, + + { + []string{"testNS.svc.TEST", "svc.TEST", "TEST"}, + []string{"AAA", strings.Repeat("B", 256), "BBB"}, + []string{"testNS.svc.TEST", "svc.TEST", "TEST", "AAA"}, + []string{"Search Line limits were exceeded, some dns names have been omitted, the applied search line is: testNS.svc.TEST svc.TEST TEST AAA"}, + }, + + { + []string{"testNS.svc.TEST", "svc.TEST", "TEST"}, + []string{"AAA", "TEST", "BBB", "TEST", "CCC", "DDD"}, + []string{"testNS.svc.TEST", "svc.TEST", "TEST", "AAA", "BBB", "CCC"}, + []string{ + "Found and omitted duplicated dns domain in host search line: 'TEST' during merging with cluster dns domains", + "Found and omitted duplicated dns domain in host search line: 'TEST' during merging with cluster dns domains", + "Search Line limits were exceeded, some dns names have been omitted, the applied search line is: testNS.svc.TEST svc.TEST TEST AAA BBB CCC", + }, + }, + } + + fetchEvent := func(recorder *record.FakeRecorder) string { + select { + case event := <-recorder.Events: + return event + default: + return "No more events!" + } + } + + for i, tc := range testCases { + dnsSearch := kubelet.formDNSSearch(tc.hostNames, pod) + + if !reflect.DeepEqual(dnsSearch, tc.resultSearch) { + t.Errorf("[%d] expected search line %#v, got %#v", i, tc.resultSearch, dnsSearch) + } + + for _, expectedEvent := range tc.events { + expected := fmt.Sprintf("%s %s %s", v1.EventTypeWarning, "DNSSearchForming", expectedEvent) + event := fetchEvent(recorder) + if event != expected { + t.Errorf("[%d] expected event '%s', got '%s", i, expected, event) + } + } + } +} + func TestCleanupBandwidthLimits(t *testing.T) { testPod := func(name, ingress string) *v1.Pod { pod := podWithUidNameNs("", name, "") @@ -178,6 +260,7 @@ func TestCleanupBandwidthLimits(t *testing.T) { } testKube := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKube.Cleanup() testKube.kubelet.shaper = shaper for _, pod := range test.pods { diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_node_status.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_node_status.go index dc959a19..062355b2 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_node_status.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_node_status.go @@ -149,7 +149,7 @@ func (kl *Kubelet) tryRegisterWithApiServer(node *v1.Node) bool { if err := kl.kubeClient.Core().Nodes().Delete(node.Name, nil); err != nil { glog.Errorf("Unable to register node %q with API server: error deleting old node: %v", kl.nodeName, err) } else { - glog.Info("Deleted old node object %q", kl.nodeName) + glog.Infof("Deleted old node object %q", kl.nodeName) } return false @@ -189,7 +189,7 @@ func (kl *Kubelet) reconcileCMADAnnotationWithExistingNode(node, existingNode *v // labels, information from the cloud provider, and Kubelet configuration. func (kl *Kubelet) initialNode() (*v1.Node, error) { node := &v1.Node{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: string(kl.nodeName), Labels: map[string]string{ metav1.LabelHostname: kl.hostname, @@ -204,7 +204,13 @@ func (kl *Kubelet) initialNode() (*v1.Node, error) { } if len(kl.kubeletConfiguration.RegisterWithTaints) > 0 { annotations := make(map[string]string) - b, err := json.Marshal(kl.kubeletConfiguration.RegisterWithTaints) + taints := make([]v1.Taint, len(kl.kubeletConfiguration.RegisterWithTaints)) + for i := range kl.kubeletConfiguration.RegisterWithTaints { + if err := v1.Convert_api_Taint_To_v1_Taint(&kl.kubeletConfiguration.RegisterWithTaints[i], &taints[i], nil); err != nil { + return nil, err + } + } + b, err := json.Marshal(taints) if err != nil { return nil, err } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_node_status_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_node_status_test.go index 2dd38405..46262f78 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_node_status_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_node_status_test.go @@ -114,9 +114,10 @@ func TestUpdateNewNodeStatus(t *testing.T) { inputImageList, expectedImageList := generateTestingImageList(maxImagesInNodeStatus + 1) testKubelet := newTestKubeletWithImageList( t, inputImageList, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() kubelet := testKubelet.kubelet kubeClient := testKubelet.fakeKubeClient - existingNode := v1.Node{ObjectMeta: v1.ObjectMeta{Name: testKubeletHostname}} + existingNode := v1.Node{ObjectMeta: metav1.ObjectMeta{Name: testKubeletHostname}} kubeClient.ReactionChain = fake.NewSimpleClientset(&v1.NodeList{Items: []v1.Node{existingNode}}).ReactionChain machineInfo := &cadvisorapi.MachineInfo{ MachineID: "123", @@ -140,7 +141,7 @@ func TestUpdateNewNodeStatus(t *testing.T) { } expectedNode := &v1.Node{ - ObjectMeta: v1.ObjectMeta{Name: testKubeletHostname}, + ObjectMeta: metav1.ObjectMeta{Name: testKubeletHostname}, Spec: v1.NodeSpec{}, Status: v1.NodeStatus{ Conditions: []v1.NodeCondition{ @@ -253,9 +254,10 @@ func TestUpdateNewNodeStatus(t *testing.T) { func TestUpdateNewNodeOutOfDiskStatusWithTransitionFrequency(t *testing.T) { testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() kubelet := testKubelet.kubelet kubeClient := testKubelet.fakeKubeClient - existingNode := v1.Node{ObjectMeta: v1.ObjectMeta{Name: testKubeletHostname}} + existingNode := v1.Node{ObjectMeta: metav1.ObjectMeta{Name: testKubeletHostname}} kubeClient.ReactionChain = fake.NewSimpleClientset(&v1.NodeList{Items: []v1.Node{existingNode}}).ReactionChain machineInfo := &cadvisorapi.MachineInfo{ MachineID: "123", @@ -328,10 +330,11 @@ func TestUpdateNewNodeOutOfDiskStatusWithTransitionFrequency(t *testing.T) { func TestUpdateExistingNodeStatus(t *testing.T) { testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() kubelet := testKubelet.kubelet kubeClient := testKubelet.fakeKubeClient existingNode := v1.Node{ - ObjectMeta: v1.ObjectMeta{Name: testKubeletHostname}, + ObjectMeta: metav1.ObjectMeta{Name: testKubeletHostname}, Spec: v1.NodeSpec{}, Status: v1.NodeStatus{ Conditions: []v1.NodeCondition{ @@ -403,7 +406,7 @@ func TestUpdateExistingNodeStatus(t *testing.T) { } expectedNode := &v1.Node{ - ObjectMeta: v1.ObjectMeta{Name: testKubeletHostname}, + ObjectMeta: metav1.ObjectMeta{Name: testKubeletHostname}, Spec: v1.NodeSpec{}, Status: v1.NodeStatus{ Conditions: []v1.NodeCondition{ @@ -523,6 +526,7 @@ func TestUpdateExistingNodeStatus(t *testing.T) { func TestUpdateExistingNodeOutOfDiskStatusWithTransitionFrequency(t *testing.T) { testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() kubelet := testKubelet.kubelet clock := testKubelet.fakeClock // Do not set nano second, because apiserver function doesn't support nano second. (Only support @@ -530,7 +534,7 @@ func TestUpdateExistingNodeOutOfDiskStatusWithTransitionFrequency(t *testing.T) clock.SetTime(time.Unix(123456, 0)) kubeClient := testKubelet.fakeKubeClient existingNode := v1.Node{ - ObjectMeta: v1.ObjectMeta{Name: testKubeletHostname}, + ObjectMeta: metav1.ObjectMeta{Name: testKubeletHostname}, Spec: v1.NodeSpec{}, Status: v1.NodeStatus{ Conditions: []v1.NodeCondition{ @@ -681,10 +685,11 @@ func TestUpdateExistingNodeOutOfDiskStatusWithTransitionFrequency(t *testing.T) func TestUpdateNodeStatusWithRuntimeStateError(t *testing.T) { testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() kubelet := testKubelet.kubelet clock := testKubelet.fakeClock kubeClient := testKubelet.fakeKubeClient - existingNode := v1.Node{ObjectMeta: v1.ObjectMeta{Name: testKubeletHostname}} + existingNode := v1.Node{ObjectMeta: metav1.ObjectMeta{Name: testKubeletHostname}} kubeClient.ReactionChain = fake.NewSimpleClientset(&v1.NodeList{Items: []v1.Node{existingNode}}).ReactionChain mockCadvisor := testKubelet.fakeCadvisor mockCadvisor.On("Start").Return(nil) @@ -708,7 +713,7 @@ func TestUpdateNodeStatusWithRuntimeStateError(t *testing.T) { } expectedNode := &v1.Node{ - ObjectMeta: v1.ObjectMeta{Name: testKubeletHostname}, + ObjectMeta: metav1.ObjectMeta{Name: testKubeletHostname}, Spec: v1.NodeSpec{}, Status: v1.NodeStatus{ Conditions: []v1.NodeCondition{ @@ -900,6 +905,7 @@ func TestUpdateNodeStatusWithRuntimeStateError(t *testing.T) { func TestUpdateNodeStatusError(t *testing.T) { testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() kubelet := testKubelet.kubelet // No matching node for the kubelet testKubelet.fakeKubeClient.ReactionChain = fake.NewSimpleClientset(&v1.NodeList{Items: []v1.Node{}}).ReactionChain @@ -914,6 +920,7 @@ func TestUpdateNodeStatusError(t *testing.T) { func TestRegisterWithApiServer(t *testing.T) { testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() kubelet := testKubelet.kubelet kubeClient := testKubelet.fakeKubeClient kubeClient.AddReactor("create", "nodes", func(action core.Action) (bool, runtime.Object, error) { @@ -925,7 +932,7 @@ func TestRegisterWithApiServer(t *testing.T) { kubeClient.AddReactor("get", "nodes", func(action core.Action) (bool, runtime.Object, error) { // Return an existing (matching) node on get. return true, &v1.Node{ - ObjectMeta: v1.ObjectMeta{Name: testKubeletHostname}, + ObjectMeta: metav1.ObjectMeta{Name: testKubeletHostname}, Spec: v1.NodeSpec{ExternalID: testKubeletHostname}, }, nil }) @@ -981,7 +988,7 @@ func TestTryRegisterWithApiServer(t *testing.T) { newNode := func(cmad bool, externalID string) *v1.Node { node := &v1.Node{ - ObjectMeta: v1.ObjectMeta{}, + ObjectMeta: metav1.ObjectMeta{}, Spec: v1.NodeSpec{ ExternalID: externalID, }, @@ -1094,6 +1101,7 @@ func TestTryRegisterWithApiServer(t *testing.T) { for _, tc := range cases { testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled is a don't-care for this test */) + defer testKubelet.Cleanup() kubelet := testKubelet.kubelet kubeClient := testKubelet.fakeKubeClient diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_pods.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_pods.go index da53ca6a..6303e5db 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_pods.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_pods.go @@ -33,6 +33,7 @@ import ( "time" "github.com/golang/glog" + "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/types" @@ -418,26 +419,34 @@ func (kl *Kubelet) makeEnvironmentVariables(pod *v1.Pod, container *v1.Container var ( configMaps = make(map[string]*v1.ConfigMap) + secrets = make(map[string]*v1.Secret) tmpEnv = make(map[string]string) ) // Env will override EnvFrom variables. // Process EnvFrom first then allow Env to replace existing values. for _, envFrom := range container.EnvFrom { - if envFrom.ConfigMapRef != nil { - name := envFrom.ConfigMapRef.Name + switch { + case envFrom.ConfigMapRef != nil: + cm := envFrom.ConfigMapRef + name := cm.Name configMap, ok := configMaps[name] if !ok { if kl.kubeClient == nil { return result, fmt.Errorf("Couldn't get configMap %v/%v, no kubeClient defined", pod.Namespace, name) } + optional := cm.Optional != nil && *cm.Optional configMap, err = kl.kubeClient.Core().ConfigMaps(pod.Namespace).Get(name, metav1.GetOptions{}) - if err != nil { + if errors.IsNotFound(err) && optional { + // ignore error when marked optional + continue + } return result, err } configMaps[name] = configMap } + for k, v := range configMap.Data { if len(envFrom.Prefix) > 0 { k = envFrom.Prefix + k @@ -445,14 +454,37 @@ func (kl *Kubelet) makeEnvironmentVariables(pod *v1.Pod, container *v1.Container if errMsgs := utilvalidation.IsCIdentifier(k); len(errMsgs) != 0 { return result, fmt.Errorf("Invalid environment variable name, %v, from configmap %v/%v: %s", k, pod.Namespace, name, errMsgs[0]) } - // Accesses apiserver+Pods. - // So, the master may set service env vars, or kubelet may. In case both are doing - // it, we delete the key from the kubelet-generated ones so we don't have duplicate - // env vars. - // TODO: remove this next line once all platforms use apiserver+Pods. - delete(serviceEnv, k) tmpEnv[k] = v } + case envFrom.SecretRef != nil: + s := envFrom.SecretRef + name := s.Name + secret, ok := secrets[name] + if !ok { + if kl.kubeClient == nil { + return result, fmt.Errorf("Couldn't get secret %v/%v, no kubeClient defined", pod.Namespace, name) + } + optional := s.Optional != nil && *s.Optional + secret, err = kl.kubeClient.Core().Secrets(pod.Namespace).Get(name, metav1.GetOptions{}) + if err != nil { + if errors.IsNotFound(err) && optional { + // ignore error when marked optional + continue + } + return result, err + } + secrets[name] = secret + } + + for k, v := range secret.Data { + if len(envFrom.Prefix) > 0 { + k = envFrom.Prefix + k + } + if errMsgs := utilvalidation.IsCIdentifier(k); len(errMsgs) != 0 { + return result, fmt.Errorf("Invalid environment variable name, %v, from secret %v/%v: %s", k, pod.Namespace, name, errMsgs[0]) + } + tmpEnv[k] = string(v) + } } } @@ -466,17 +498,9 @@ func (kl *Kubelet) makeEnvironmentVariables(pod *v1.Pod, container *v1.Container // 2. Create the container's environment in the order variables are declared // 3. Add remaining service environment vars var ( - secrets = make(map[string]*v1.Secret) mappingFunc = expansion.MappingFuncFor(tmpEnv, serviceEnv) ) for _, envVar := range container.Env { - // Accesses apiserver+Pods. - // So, the master may set service env vars, or kubelet may. In case both are doing - // it, we delete the key from the kubelet-generated ones so we don't have duplicate - // env vars. - // TODO: remove this next line once all platforms use apiserver+Pods. - delete(serviceEnv, envVar.Name) - runtimeVal := envVar.Value if runtimeVal != "" { // Step 1a: expand variable references @@ -499,8 +523,10 @@ func (kl *Kubelet) makeEnvironmentVariables(pod *v1.Pod, container *v1.Container return result, err } case envVar.ValueFrom.ConfigMapKeyRef != nil: - name := envVar.ValueFrom.ConfigMapKeyRef.Name - key := envVar.ValueFrom.ConfigMapKeyRef.Key + cm := envVar.ValueFrom.ConfigMapKeyRef + name := cm.Name + key := cm.Key + optional := cm.Optional != nil && *cm.Optional configMap, ok := configMaps[name] if !ok { if kl.kubeClient == nil { @@ -508,35 +534,57 @@ func (kl *Kubelet) makeEnvironmentVariables(pod *v1.Pod, container *v1.Container } configMap, err = kl.kubeClient.Core().ConfigMaps(pod.Namespace).Get(name, metav1.GetOptions{}) if err != nil { + if errors.IsNotFound(err) && optional { + // ignore error when marked optional + continue + } return result, err } configMaps[name] = configMap } runtimeVal, ok = configMap.Data[key] if !ok { + if optional { + continue + } return result, fmt.Errorf("Couldn't find key %v in ConfigMap %v/%v", key, pod.Namespace, name) } case envVar.ValueFrom.SecretKeyRef != nil: - name := envVar.ValueFrom.SecretKeyRef.Name - key := envVar.ValueFrom.SecretKeyRef.Key + s := envVar.ValueFrom.SecretKeyRef + name := s.Name + key := s.Key + optional := s.Optional != nil && *s.Optional secret, ok := secrets[name] if !ok { if kl.kubeClient == nil { return result, fmt.Errorf("Couldn't get secret %v/%v, no kubeClient defined", pod.Namespace, name) } - secret, err = kl.kubeClient.Core().Secrets(pod.Namespace).Get(name, metav1.GetOptions{}) + secret, err = kl.secretManager.GetSecret(pod.Namespace, name) if err != nil { + if errors.IsNotFound(err) && optional { + // ignore error when marked optional + continue + } return result, err } secrets[name] = secret } runtimeValBytes, ok := secret.Data[key] if !ok { + if optional { + continue + } return result, fmt.Errorf("Couldn't find key %v in Secret %v/%v", key, pod.Namespace, name) } runtimeVal = string(runtimeValBytes) } } + // Accesses apiserver+Pods. + // So, the master may set service env vars, or kubelet may. In case both are doing + // it, we delete the key from the kubelet-generated ones so we don't have duplicate + // env vars. + // TODO: remove this next line once all platforms use apiserver+Pods. + delete(serviceEnv, envVar.Name) tmpEnv[envVar.Name] = runtimeVal } @@ -548,7 +596,14 @@ func (kl *Kubelet) makeEnvironmentVariables(pod *v1.Pod, container *v1.Container // Append remaining service env vars. for k, v := range serviceEnv { - result = append(result, kubecontainer.EnvVar{Name: k, Value: v}) + // Accesses apiserver+Pods. + // So, the master may set service env vars, or kubelet may. In case both are doing + // it, we skip the key from the kubelet-generated ones so we don't have duplicate + // env vars. + // TODO: remove this next line once all platforms use apiserver+Pods. + if _, present := tmpEnv[k]; !present { + result = append(result, kubecontainer.EnvVar{Name: k, Value: v}) + } } return result, nil } @@ -638,14 +693,11 @@ func (kl *Kubelet) makePodDataDirs(pod *v1.Pod) error { // getPullSecretsForPod inspects the Pod and retrieves the referenced pull // secrets. -// TODO: duplicate secrets are being retrieved multiple times and there -// is no cache. Creating and using a secret manager interface will make this -// easier to address. func (kl *Kubelet) getPullSecretsForPod(pod *v1.Pod) ([]v1.Secret, error) { pullSecrets := []v1.Secret{} for _, secretRef := range pod.Spec.ImagePullSecrets { - secret, err := kl.kubeClient.Core().Secrets(pod.Namespace).Get(secretRef.Name, metav1.GetOptions{}) + secret, err := kl.secretManager.GetSecret(pod.Namespace, secretRef.Name) if err != nil { glog.Warningf("Unable to retrieve pull secret %s/%s for %s/%s due to %v. The image pull may not succeed.", pod.Namespace, secretRef.Name, pod.Namespace, pod.Name, err) continue diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_pods_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_pods_test.go index 0d08d133..b6edac39 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_pods_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_pods_test.go @@ -26,6 +26,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + apierrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" @@ -113,6 +115,7 @@ func TestMakeMounts(t *testing.T) { func TestRunInContainerNoSuchPod(t *testing.T) { testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() kubelet := testKubelet.kubelet fakeRuntime := testKubelet.fakeRuntime fakeRuntime.PodList = []*containertest.FakePod{} @@ -121,7 +124,7 @@ func TestRunInContainerNoSuchPod(t *testing.T) { podNamespace := "nsFoo" containerName := "containerFoo" output, err := kubelet.RunInContainer( - kubecontainer.GetPodFullName(&v1.Pod{ObjectMeta: v1.ObjectMeta{Name: podName, Namespace: podNamespace}}), + kubecontainer.GetPodFullName(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: podName, Namespace: podNamespace}}), "", containerName, []string{"ls"}) @@ -132,6 +135,7 @@ func TestRunInContainerNoSuchPod(t *testing.T) { func TestRunInContainer(t *testing.T) { for _, testError := range []error{nil, errors.New("bar")} { testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() kubelet := testKubelet.kubelet fakeRuntime := testKubelet.fakeRuntime fakeCommandRunner := containertest.FakeContainerCommandRunner{ @@ -165,6 +169,7 @@ func TestRunInContainer(t *testing.T) { func TestGenerateRunContainerOptions_DNSConfigurationParams(t *testing.T) { testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() kubelet := testKubelet.kubelet clusterNS := "203.0.113.1" @@ -210,7 +215,11 @@ func TestGenerateRunContainerOptions_DNSConfigurationParams(t *testing.T) { } else if options[0].DNS[0] != clusterNS { t.Errorf("expected nameserver %s, got %v", clusterNS, options[0].DNS[0]) } - if len(options[0].DNSSearch) != len(options[1].DNSSearch)+3 { + expLength := len(options[1].DNSSearch) + 3 + if expLength > 6 { + expLength = 6 + } + if len(options[0].DNSSearch) != expLength { t.Errorf("expected prepend of cluster domain, got %+v", options[0].DNSSearch) } else if options[0].DNSSearch[0] != ".svc."+kubelet.clusterDomain { t.Errorf("expected domain %s, got %s", ".svc."+kubelet.clusterDomain, options[0].DNSSearch) @@ -237,7 +246,7 @@ func (e envs) Less(i, j int) bool { return e[i].Name < e[j].Name } func buildService(name, namespace, clusterIP, protocol string, port int) *v1.Service { return &v1.Service{ - ObjectMeta: v1.ObjectMeta{Name: name, Namespace: namespace}, + ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespace}, Spec: v1.ServiceSpec{ Ports: []v1.ServicePort{{ Protocol: v1.Protocol(protocol), @@ -249,8 +258,9 @@ func buildService(name, namespace, clusterIP, protocol string, port int) *v1.Ser } func TestMakeEnvironmentVariables(t *testing.T) { + trueVal := true services := []*v1.Service{ - buildService("kubernetes", v1.NamespaceDefault, "1.2.3.1", "TCP", 8081), + buildService("kubernetes", metav1.NamespaceDefault, "1.2.3.1", "TCP", 8081), buildService("test", "test1", "1.2.3.3", "TCP", 8083), buildService("kubernetes", "test2", "1.2.3.4", "TCP", 8084), buildService("test", "test2", "1.2.3.5", "TCP", 8085), @@ -269,6 +279,7 @@ func TestMakeEnvironmentVariables(t *testing.T) { masterServiceNs string // the namespace to read master service info from nilLister bool // whether the lister should be nil configMap *v1.ConfigMap // an optional ConfigMap to pull from + secret *v1.Secret // an optional Secret to pull from expectedEnvs []kubecontainer.EnvVar // a set of expected environment vars expectedError bool // does the test fail }{ @@ -287,7 +298,7 @@ func TestMakeEnvironmentVariables(t *testing.T) { {Name: "TEST_PORT_8083_TCP_ADDR", Value: "1.2.3.3"}, }, }, - masterServiceNs: v1.NamespaceDefault, + masterServiceNs: metav1.NamespaceDefault, nilLister: false, expectedEnvs: []kubecontainer.EnvVar{ {Name: "FOO", Value: "BAR"}, @@ -322,7 +333,7 @@ func TestMakeEnvironmentVariables(t *testing.T) { {Name: "TEST_PORT_8083_TCP_ADDR", Value: "1.2.3.3"}, }, }, - masterServiceNs: v1.NamespaceDefault, + masterServiceNs: metav1.NamespaceDefault, nilLister: true, expectedEnvs: []kubecontainer.EnvVar{ {Name: "FOO", Value: "BAR"}, @@ -343,7 +354,7 @@ func TestMakeEnvironmentVariables(t *testing.T) { {Name: "FOO", Value: "BAZ"}, }, }, - masterServiceNs: v1.NamespaceDefault, + masterServiceNs: metav1.NamespaceDefault, nilLister: false, expectedEnvs: []kubecontainer.EnvVar{ {Name: "FOO", Value: "BAZ"}, @@ -607,6 +618,106 @@ func TestMakeEnvironmentVariables(t *testing.T) { }, }, }, + { + name: "configmapkeyref_missing_optional", + ns: "test", + container: &v1.Container{ + Env: []v1.EnvVar{ + { + Name: "POD_NAME", + ValueFrom: &v1.EnvVarSource{ + ConfigMapKeyRef: &v1.ConfigMapKeySelector{ + LocalObjectReference: v1.LocalObjectReference{Name: "missing-config-map"}, + Key: "key", + Optional: &trueVal, + }, + }, + }, + }, + }, + masterServiceNs: "nothing", + expectedEnvs: nil, + }, + { + name: "configmapkeyref_missing_key_optional", + ns: "test", + container: &v1.Container{ + Env: []v1.EnvVar{ + { + Name: "POD_NAME", + ValueFrom: &v1.EnvVarSource{ + ConfigMapKeyRef: &v1.ConfigMapKeySelector{ + LocalObjectReference: v1.LocalObjectReference{Name: "test-config-map"}, + Key: "key", + Optional: &trueVal, + }, + }, + }, + }, + }, + masterServiceNs: "nothing", + nilLister: true, + configMap: &v1.ConfigMap{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: "test1", + Name: "test-configmap", + }, + Data: map[string]string{ + "a": "b", + }, + }, + expectedEnvs: nil, + }, + { + name: "secretkeyref_missing_optional", + ns: "test", + container: &v1.Container{ + Env: []v1.EnvVar{ + { + Name: "POD_NAME", + ValueFrom: &v1.EnvVarSource{ + SecretKeyRef: &v1.SecretKeySelector{ + LocalObjectReference: v1.LocalObjectReference{Name: "missing-secret"}, + Key: "key", + Optional: &trueVal, + }, + }, + }, + }, + }, + masterServiceNs: "nothing", + expectedEnvs: nil, + }, + { + name: "secretkeyref_missing_key_optional", + ns: "test", + container: &v1.Container{ + Env: []v1.EnvVar{ + { + Name: "POD_NAME", + ValueFrom: &v1.EnvVarSource{ + SecretKeyRef: &v1.SecretKeySelector{ + LocalObjectReference: v1.LocalObjectReference{Name: "test-secret"}, + Key: "key", + Optional: &trueVal, + }, + }, + }, + }, + }, + masterServiceNs: "nothing", + nilLister: true, + secret: &v1.Secret{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: "test1", + Name: "test-secret", + }, + Data: map[string][]byte{ + "a": []byte("b"), + }, + }, + expectedEnvs: nil, + }, { name: "configmap", ns: "test1", @@ -638,7 +749,7 @@ func TestMakeEnvironmentVariables(t *testing.T) { masterServiceNs: "nothing", nilLister: false, configMap: &v1.ConfigMap{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "test1", Name: "test-configmap", }, @@ -713,6 +824,19 @@ func TestMakeEnvironmentVariables(t *testing.T) { masterServiceNs: "nothing", expectedError: true, }, + { + name: "configmap_missing_optional", + ns: "test", + container: &v1.Container{ + EnvFrom: []v1.EnvFromSource{ + {ConfigMapRef: &v1.ConfigMapEnvSource{ + Optional: &trueVal, + LocalObjectReference: v1.LocalObjectReference{Name: "missing-config-map"}}}, + }, + }, + masterServiceNs: "nothing", + expectedEnvs: nil, + }, { name: "configmap_invalid_keys", ns: "test1", @@ -723,7 +847,7 @@ func TestMakeEnvironmentVariables(t *testing.T) { }, masterServiceNs: "nothing", configMap: &v1.ConfigMap{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "test1", Name: "test-configmap", }, @@ -746,7 +870,7 @@ func TestMakeEnvironmentVariables(t *testing.T) { }, masterServiceNs: "", configMap: &v1.ConfigMap{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "test1", Name: "test-configmap", }, @@ -761,10 +885,178 @@ func TestMakeEnvironmentVariables(t *testing.T) { }, }, }, + { + name: "secret", + ns: "test1", + container: &v1.Container{ + EnvFrom: []v1.EnvFromSource{ + { + SecretRef: &v1.SecretEnvSource{LocalObjectReference: v1.LocalObjectReference{Name: "test-secret"}}, + }, + { + Prefix: "p_", + SecretRef: &v1.SecretEnvSource{LocalObjectReference: v1.LocalObjectReference{Name: "test-secret"}}, + }, + }, + Env: []v1.EnvVar{ + { + Name: "TEST_LITERAL", + Value: "test-test-test", + }, + { + Name: "EXPANSION_TEST", + Value: "$(REPLACE_ME)", + }, + { + Name: "DUPE_TEST", + Value: "ENV_VAR", + }, + }, + }, + masterServiceNs: "nothing", + nilLister: false, + secret: &v1.Secret{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: "test1", + Name: "test-secret", + }, + Data: map[string][]byte{ + "REPLACE_ME": []byte("FROM_SECRET"), + "DUPE_TEST": []byte("SECRET"), + }, + }, + expectedEnvs: []kubecontainer.EnvVar{ + { + Name: "TEST_LITERAL", + Value: "test-test-test", + }, + { + Name: "TEST_SERVICE_HOST", + Value: "1.2.3.3", + }, + { + Name: "TEST_SERVICE_PORT", + Value: "8083", + }, + { + Name: "TEST_PORT", + Value: "tcp://1.2.3.3:8083", + }, + { + Name: "TEST_PORT_8083_TCP", + Value: "tcp://1.2.3.3:8083", + }, + { + Name: "TEST_PORT_8083_TCP_PROTO", + Value: "tcp", + }, + { + Name: "TEST_PORT_8083_TCP_PORT", + Value: "8083", + }, + { + Name: "TEST_PORT_8083_TCP_ADDR", + Value: "1.2.3.3", + }, + { + Name: "REPLACE_ME", + Value: "FROM_SECRET", + }, + { + Name: "EXPANSION_TEST", + Value: "FROM_SECRET", + }, + { + Name: "DUPE_TEST", + Value: "ENV_VAR", + }, + { + Name: "p_REPLACE_ME", + Value: "FROM_SECRET", + }, + { + Name: "p_DUPE_TEST", + Value: "SECRET", + }, + }, + }, + { + name: "secret_missing", + ns: "test1", + container: &v1.Container{ + EnvFrom: []v1.EnvFromSource{ + {SecretRef: &v1.SecretEnvSource{LocalObjectReference: v1.LocalObjectReference{Name: "test-secret"}}}, + }, + }, + masterServiceNs: "nothing", + expectedError: true, + }, + { + name: "secret_missing_optional", + ns: "test", + container: &v1.Container{ + EnvFrom: []v1.EnvFromSource{ + {SecretRef: &v1.SecretEnvSource{ + LocalObjectReference: v1.LocalObjectReference{Name: "missing-secret"}, + Optional: &trueVal}}, + }, + }, + masterServiceNs: "nothing", + expectedEnvs: nil, + }, + { + name: "secret_invalid_keys", + ns: "test1", + container: &v1.Container{ + EnvFrom: []v1.EnvFromSource{ + {SecretRef: &v1.SecretEnvSource{LocalObjectReference: v1.LocalObjectReference{Name: "test-secret"}}}, + }, + }, + masterServiceNs: "nothing", + secret: &v1.Secret{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: "test1", + Name: "test-secret", + }, + Data: map[string][]byte{ + "1234": []byte("abc"), + }, + }, + expectedError: true, + }, + { + name: "secret_invalid_keys_valid", + ns: "test", + container: &v1.Container{ + EnvFrom: []v1.EnvFromSource{ + { + Prefix: "p_", + SecretRef: &v1.SecretEnvSource{LocalObjectReference: v1.LocalObjectReference{Name: "test-secret"}}, + }, + }, + }, + masterServiceNs: "", + secret: &v1.Secret{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: "test1", + Name: "test-secret", + }, + Data: map[string][]byte{ + "1234": []byte("abc"), + }, + }, + expectedEnvs: []kubecontainer.EnvVar{ + { + Name: "p_1234", + Value: "abc", + }, + }, + }, } for _, tc := range testCases { testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() kl := testKubelet.kubelet kl.masterServiceNamespace = tc.masterServiceNs if tc.nilLister { @@ -776,13 +1068,28 @@ func TestMakeEnvironmentVariables(t *testing.T) { testKubelet.fakeKubeClient.AddReactor("get", "configmaps", func(action core.Action) (bool, runtime.Object, error) { var err error if tc.configMap == nil { - err = errors.New("no configmap defined") + err = apierrors.NewNotFound(action.GetResource().GroupResource(), "configmap-name") } return true, tc.configMap, err }) + testKubelet.fakeKubeClient.AddReactor("get", "secrets", func(action core.Action) (bool, runtime.Object, error) { + var err error + if tc.secret == nil { + err = apierrors.NewNotFound(action.GetResource().GroupResource(), "secret-name") + } + return true, tc.secret, err + }) + + testKubelet.fakeKubeClient.AddReactor("get", "secrets", func(action core.Action) (bool, runtime.Object, error) { + var err error + if tc.secret == nil { + err = errors.New("no secret defined") + } + return true, tc.secret, err + }) testPod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: tc.ns, Name: "dapi-test-pod-name", }, @@ -1230,6 +1537,7 @@ func TestExec(t *testing.T) { for _, tc := range testcases { testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() kubelet := testKubelet.kubelet testKubelet.fakeRuntime.PodList = []*containertest.FakePod{ {Pod: &kubecontainer.Pod{ @@ -1320,6 +1628,7 @@ func TestPortForward(t *testing.T) { for _, tc := range testcases { testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() kubelet := testKubelet.kubelet testKubelet.fakeRuntime.PodList = []*containertest.FakePod{ {Pod: &kubecontainer.Pod{ @@ -1467,6 +1776,7 @@ func TestHasHostMountPVC(t *testing.T) { for k, v := range tests { testKubelet := newTestKubelet(t, false) + defer testKubelet.Cleanup() pod := &v1.Pod{ Spec: v1.PodSpec{}, } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_resources_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_resources_test.go index b0a09da9..69f37bd5 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_resources_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_resources_test.go @@ -33,6 +33,7 @@ func TestPodResourceLimitsDefaulting(t *testing.T) { cpuCores := resource.MustParse("10") memoryCapacity := resource.MustParse("10Gi") tk := newTestKubelet(t, true) + defer tk.Cleanup() tk.fakeCadvisor.On("VersionInfo").Return(&cadvisorapi.VersionInfo{}, nil) tk.fakeCadvisor.On("MachineInfo").Return(&cadvisorapi.MachineInfo{ NumCores: int(cpuCores.Value()), diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_test.go index b2035cd3..fcbb6588 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_test.go @@ -33,6 +33,8 @@ import ( utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/client-go/util/clock" + "k8s.io/client-go/util/flowcontrol" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/apis/componentconfig" @@ -54,13 +56,12 @@ import ( podtest "k8s.io/kubernetes/pkg/kubelet/pod/testing" proberesults "k8s.io/kubernetes/pkg/kubelet/prober/results" probetest "k8s.io/kubernetes/pkg/kubelet/prober/testing" + "k8s.io/kubernetes/pkg/kubelet/secret" "k8s.io/kubernetes/pkg/kubelet/server/stats" "k8s.io/kubernetes/pkg/kubelet/status" kubetypes "k8s.io/kubernetes/pkg/kubelet/types" "k8s.io/kubernetes/pkg/kubelet/util/queue" kubeletvolume "k8s.io/kubernetes/pkg/kubelet/volumemanager" - "k8s.io/kubernetes/pkg/util/clock" - "k8s.io/kubernetes/pkg/util/flowcontrol" "k8s.io/kubernetes/pkg/util/mount" "k8s.io/kubernetes/pkg/volume" _ "k8s.io/kubernetes/pkg/volume/host_path" @@ -106,6 +107,12 @@ type TestKubelet struct { volumePlugin *volumetest.FakeVolumePlugin } +func (tk *TestKubelet) Cleanup() { + if tk.kubelet != nil { + os.RemoveAll(tk.kubelet.rootDirectory) + } +} + // newTestKubelet returns test kubelet with two images. func newTestKubelet(t *testing.T, controllerAttachDetachEnabled bool) *TestKubelet { imageList := []kubecontainer.Image{ @@ -152,7 +159,7 @@ func newTestKubeletWithImageList( t.Fatalf("can't mkdir(%q): %v", kubelet.rootDirectory, err) } kubelet.sourcesReady = config.NewSourcesReady(func(_ sets.String) bool { return true }) - kubelet.masterServiceNamespace = v1.NamespaceDefault + kubelet.masterServiceNamespace = metav1.NamespaceDefault kubelet.serviceLister = testServiceLister{} kubelet.nodeLister = testNodeLister{} kubelet.nodeInfo = testNodeInfo{} @@ -166,7 +173,12 @@ func newTestKubeletWithImageList( kubelet.cadvisor = mockCadvisor fakeMirrorClient := podtest.NewFakeMirrorClient() - kubelet.podManager = kubepod.NewBasicPodManager(fakeMirrorClient) + secretManager, err := secret.NewSimpleSecretManager(kubelet.kubeClient) + if err != nil { + t.Fatalf("can't create a secret manager: %v", err) + } + kubelet.secretManager = secretManager + kubelet.podManager = kubepod.NewBasicPodManager(fakeMirrorClient, kubelet.secretManager) kubelet.statusManager = status.NewManager(fakeKubeClient, kubelet.podManager) kubelet.containerRefManager = kubecontainer.NewRefManager() diskSpaceManager, err := newDiskSpaceManager(mockCadvisor, DiskSpacePolicy{}) @@ -241,7 +253,7 @@ func newTestKubeletWithImageList( plug := &volumetest.FakeVolumePlugin{PluginName: "fake", Host: nil} kubelet.volumePluginMgr, err = - NewInitializedVolumePluginMgr(kubelet, []volume.VolumePlugin{plug}) + NewInitializedVolumePluginMgr(kubelet, kubelet.secretManager, []volume.VolumePlugin{plug}) require.NoError(t, err, "Failed to initialize VolumePluginMgr") kubelet.mounter = &mount.FakeMounter{} @@ -255,7 +267,8 @@ func newTestKubeletWithImageList( kubelet.mounter, kubelet.getPodsDir(), kubelet.recorder, - false /* experimentalCheckNodeCapabilitiesBeforeMount*/) + false, /* experimentalCheckNodeCapabilitiesBeforeMount*/ + false /* keepTerminatedPodVolumes */) require.NoError(t, err, "Failed to initialize volume manager") // enable active deadline handler @@ -275,7 +288,7 @@ func newTestPods(count int) []*v1.Pod { Spec: v1.PodSpec{ HostNetwork: true, }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: types.UID(10000 + i), Name: fmt.Sprintf("pod%d", i), }, @@ -288,6 +301,7 @@ var emptyPodUIDs map[types.UID]kubetypes.SyncPodType func TestSyncLoopTimeUpdate(t *testing.T) { testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() testKubelet.fakeCadvisor.On("MachineInfo").Return(&cadvisorapi.MachineInfo{}, nil) kubelet := testKubelet.kubelet @@ -313,6 +327,7 @@ func TestSyncLoopTimeUpdate(t *testing.T) { func TestSyncLoopAbort(t *testing.T) { testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() testKubelet.fakeCadvisor.On("MachineInfo").Return(&cadvisorapi.MachineInfo{}, nil) kubelet := testKubelet.kubelet kubelet.runtimeState.setRuntimeSync(time.Now()) @@ -333,6 +348,7 @@ func TestSyncLoopAbort(t *testing.T) { func TestSyncPodsStartPod(t *testing.T) { testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() testKubelet.fakeCadvisor.On("VersionInfo").Return(&cadvisorapi.VersionInfo{}, nil) testKubelet.fakeCadvisor.On("MachineInfo").Return(&cadvisorapi.MachineInfo{}, nil) testKubelet.fakeCadvisor.On("ImagesFsInfo").Return(cadvisorapiv2.FsInfo{}, nil) @@ -355,6 +371,7 @@ func TestSyncPodsDeletesWhenSourcesAreReady(t *testing.T) { ready := false testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() fakeRuntime := testKubelet.fakeRuntime testKubelet.fakeCadvisor.On("MachineInfo").Return(&cadvisorapi.MachineInfo{}, nil) testKubelet.fakeCadvisor.On("ImagesFsInfo").Return(cadvisorapiv2.FsInfo{}, nil) @@ -409,6 +426,7 @@ func (ls testNodeLister) List() (v1.NodeList, error) { // Tests that we handle port conflicts correctly by setting the failed status in status map. func TestHandlePortConflicts(t *testing.T) { testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() kl := testKubelet.kubelet testKubelet.fakeCadvisor.On("MachineInfo").Return(&cadvisorapi.MachineInfo{}, nil) testKubelet.fakeCadvisor.On("ImagesFsInfo").Return(cadvisorapiv2.FsInfo{}, nil) @@ -416,7 +434,7 @@ func TestHandlePortConflicts(t *testing.T) { kl.nodeLister = testNodeLister{nodes: []v1.Node{ { - ObjectMeta: v1.ObjectMeta{Name: string(kl.nodeName)}, + ObjectMeta: metav1.ObjectMeta{Name: string(kl.nodeName)}, Status: v1.NodeStatus{ Allocatable: v1.ResourceList{ v1.ResourcePods: *resource.NewQuantity(110, resource.DecimalSI), @@ -426,7 +444,7 @@ func TestHandlePortConflicts(t *testing.T) { }} kl.nodeInfo = testNodeInfo{nodes: []v1.Node{ { - ObjectMeta: v1.ObjectMeta{Name: string(kl.nodeName)}, + ObjectMeta: metav1.ObjectMeta{Name: string(kl.nodeName)}, Status: v1.NodeStatus{ Allocatable: v1.ResourceList{ v1.ResourcePods: *resource.NewQuantity(110, resource.DecimalSI), @@ -465,7 +483,7 @@ func TestCriticalPrioritySorting(t *testing.T) { testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) kl := testKubelet.kubelet nodes := []v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: testKubeletHostname}, + {ObjectMeta: metav1.ObjectMeta{Name: testKubeletHostname}, Status: v1.NodeStatus{Capacity: v1.ResourceList{}, Allocatable: v1.ResourceList{ v1.ResourceCPU: *resource.NewMilliQuantity(10, resource.DecimalSI), v1.ResourceMemory: *resource.NewQuantity(100, resource.BinarySI), @@ -526,6 +544,7 @@ func TestCriticalPrioritySorting(t *testing.T) { // Tests that we handle host name conflicts correctly by setting the failed status in status map. func TestHandleHostNameConflicts(t *testing.T) { testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() kl := testKubelet.kubelet testKubelet.fakeCadvisor.On("MachineInfo").Return(&cadvisorapi.MachineInfo{}, nil) testKubelet.fakeCadvisor.On("ImagesFsInfo").Return(cadvisorapiv2.FsInfo{}, nil) @@ -533,7 +552,7 @@ func TestHandleHostNameConflicts(t *testing.T) { kl.nodeLister = testNodeLister{nodes: []v1.Node{ { - ObjectMeta: v1.ObjectMeta{Name: "127.0.0.1"}, + ObjectMeta: metav1.ObjectMeta{Name: "127.0.0.1"}, Status: v1.NodeStatus{ Allocatable: v1.ResourceList{ v1.ResourcePods: *resource.NewQuantity(110, resource.DecimalSI), @@ -543,7 +562,7 @@ func TestHandleHostNameConflicts(t *testing.T) { }} kl.nodeInfo = testNodeInfo{nodes: []v1.Node{ { - ObjectMeta: v1.ObjectMeta{Name: "127.0.0.1"}, + ObjectMeta: metav1.ObjectMeta{Name: "127.0.0.1"}, Status: v1.NodeStatus{ Allocatable: v1.ResourceList{ v1.ResourcePods: *resource.NewQuantity(110, resource.DecimalSI), @@ -577,10 +596,11 @@ func TestHandleHostNameConflicts(t *testing.T) { // Tests that we handle not matching labels selector correctly by setting the failed status in status map. func TestHandleNodeSelector(t *testing.T) { testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() kl := testKubelet.kubelet nodes := []v1.Node{ { - ObjectMeta: v1.ObjectMeta{Name: testKubeletHostname, Labels: map[string]string{"key": "B"}}, + ObjectMeta: metav1.ObjectMeta{Name: testKubeletHostname, Labels: map[string]string{"key": "B"}}, Status: v1.NodeStatus{ Allocatable: v1.ResourceList{ v1.ResourcePods: *resource.NewQuantity(110, resource.DecimalSI), @@ -617,9 +637,10 @@ func TestHandleNodeSelector(t *testing.T) { // Tests that we handle exceeded resources correctly by setting the failed status in status map. func TestHandleMemExceeded(t *testing.T) { testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() kl := testKubelet.kubelet nodes := []v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: testKubeletHostname}, + {ObjectMeta: metav1.ObjectMeta{Name: testKubeletHostname}, Status: v1.NodeStatus{Capacity: v1.ResourceList{}, Allocatable: v1.ResourceList{ v1.ResourceCPU: *resource.NewMilliQuantity(10, resource.DecimalSI), v1.ResourceMemory: *resource.NewQuantity(100, resource.BinarySI), @@ -666,6 +687,7 @@ func TestHandleMemExceeded(t *testing.T) { // TODO(filipg): This test should be removed once StatusSyncer can do garbage collection without external signal. func TestPurgingObsoleteStatusMapEntries(t *testing.T) { testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() testKubelet.fakeCadvisor.On("MachineInfo").Return(&cadvisorapi.MachineInfo{}, nil) testKubelet.fakeCadvisor.On("ImagesFsInfo").Return(cadvisorapiv2.FsInfo{}, nil) testKubelet.fakeCadvisor.On("RootFsInfo").Return(cadvisorapiv2.FsInfo{}, nil) @@ -678,8 +700,8 @@ func TestPurgingObsoleteStatusMapEntries(t *testing.T) { kl := testKubelet.kubelet pods := []*v1.Pod{ - {ObjectMeta: v1.ObjectMeta{Name: "pod1", UID: "1234"}, Spec: v1.PodSpec{Containers: []v1.Container{{Ports: []v1.ContainerPort{{HostPort: 80}}}}}}, - {ObjectMeta: v1.ObjectMeta{Name: "pod2", UID: "4567"}, Spec: v1.PodSpec{Containers: []v1.Container{{Ports: []v1.ContainerPort{{HostPort: 80}}}}}}, + {ObjectMeta: metav1.ObjectMeta{Name: "pod1", UID: "1234"}, Spec: v1.PodSpec{Containers: []v1.Container{{Ports: []v1.ContainerPort{{HostPort: 80}}}}}}, + {ObjectMeta: metav1.ObjectMeta{Name: "pod2", UID: "4567"}, Spec: v1.PodSpec{Containers: []v1.Container{{Ports: []v1.ContainerPort{{HostPort: 80}}}}}}, } podToTest := pods[1] // Run once to populate the status map. @@ -697,6 +719,7 @@ func TestPurgingObsoleteStatusMapEntries(t *testing.T) { func TestValidateContainerLogStatus(t *testing.T) { testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() kubelet := testKubelet.kubelet containerName := "x" testCases := []struct { @@ -823,6 +846,7 @@ func updateDiskSpacePolicy(kubelet *Kubelet, mockCadvisor *cadvisortest.Mock, ro func TestCreateMirrorPod(t *testing.T) { for _, updateType := range []kubetypes.SyncPodType{kubetypes.SyncPodCreate, kubetypes.SyncPodUpdate} { testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() testKubelet.fakeCadvisor.On("Start").Return(nil) testKubelet.fakeCadvisor.On("VersionInfo").Return(&cadvisorapi.VersionInfo{}, nil) testKubelet.fakeCadvisor.On("MachineInfo").Return(&cadvisorapi.MachineInfo{}, nil) @@ -849,6 +873,7 @@ func TestCreateMirrorPod(t *testing.T) { func TestDeleteOutdatedMirrorPod(t *testing.T) { testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() testKubelet.fakeCadvisor.On("Start").Return(nil) testKubelet.fakeCadvisor.On("VersionInfo").Return(&cadvisorapi.VersionInfo{}, nil) testKubelet.fakeCadvisor.On("MachineInfo").Return(&cadvisorapi.MachineInfo{}, nil) @@ -891,6 +916,7 @@ func TestDeleteOutdatedMirrorPod(t *testing.T) { func TestDeleteOrphanedMirrorPods(t *testing.T) { testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() testKubelet.fakeCadvisor.On("Start").Return(nil) testKubelet.fakeCadvisor.On("MachineInfo").Return(&cadvisorapi.MachineInfo{}, nil) testKubelet.fakeCadvisor.On("ImagesFsInfo").Return(cadvisorapiv2.FsInfo{}, nil) @@ -900,7 +926,7 @@ func TestDeleteOrphanedMirrorPods(t *testing.T) { manager := testKubelet.fakeMirrorClient orphanPods := []*v1.Pod{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "12345678", Name: "pod1", Namespace: "ns", @@ -911,7 +937,7 @@ func TestDeleteOrphanedMirrorPods(t *testing.T) { }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "12345679", Name: "pod2", Namespace: "ns", @@ -941,7 +967,7 @@ func TestGetContainerInfoForMirrorPods(t *testing.T) { // different UIDs. pods := []*v1.Pod{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "1234", Name: "qux", Namespace: "ns", @@ -956,7 +982,7 @@ func TestGetContainerInfoForMirrorPods(t *testing.T) { }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "5678", Name: "qux", Namespace: "ns", @@ -982,6 +1008,7 @@ func TestGetContainerInfoForMirrorPods(t *testing.T) { } testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() fakeRuntime := testKubelet.fakeRuntime mockCadvisor := testKubelet.fakeCadvisor cadvisorReq := &cadvisorapi.ContainerInfoRequest{} @@ -1012,6 +1039,7 @@ func TestGetContainerInfoForMirrorPods(t *testing.T) { func TestHostNetworkAllowed(t *testing.T) { testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() testKubelet.fakeCadvisor.On("Start").Return(nil) testKubelet.fakeCadvisor.On("VersionInfo").Return(&cadvisorapi.VersionInfo{}, nil) testKubelet.fakeCadvisor.On("MachineInfo").Return(&cadvisorapi.MachineInfo{}, nil) @@ -1044,6 +1072,7 @@ func TestHostNetworkAllowed(t *testing.T) { func TestHostNetworkDisallowed(t *testing.T) { testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() testKubelet.fakeCadvisor.On("Start").Return(nil) testKubelet.fakeCadvisor.On("VersionInfo").Return(&cadvisorapi.VersionInfo{}, nil) testKubelet.fakeCadvisor.On("MachineInfo").Return(&cadvisorapi.MachineInfo{}, nil) @@ -1075,6 +1104,7 @@ func TestHostNetworkDisallowed(t *testing.T) { func TestPrivilegeContainerAllowed(t *testing.T) { testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() testKubelet.fakeCadvisor.On("Start").Return(nil) testKubelet.fakeCadvisor.On("VersionInfo").Return(&cadvisorapi.VersionInfo{}, nil) testKubelet.fakeCadvisor.On("MachineInfo").Return(&cadvisorapi.MachineInfo{}, nil) @@ -1104,6 +1134,7 @@ func TestPrivilegeContainerAllowed(t *testing.T) { func TestPrivilegedContainerDisallowed(t *testing.T) { testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() testKubelet.fakeCadvisor.On("VersionInfo").Return(&cadvisorapi.VersionInfo{}, nil) testKubelet.fakeCadvisor.On("MachineInfo").Return(&cadvisorapi.MachineInfo{}, nil) testKubelet.fakeCadvisor.On("ImagesFsInfo").Return(cadvisorapiv2.FsInfo{}, nil) @@ -1130,6 +1161,7 @@ func TestPrivilegedContainerDisallowed(t *testing.T) { func TestNetworkErrorsWithoutHostNetwork(t *testing.T) { testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() testKubelet.fakeCadvisor.On("VersionInfo").Return(&cadvisorapi.VersionInfo{}, nil) testKubelet.fakeCadvisor.On("MachineInfo").Return(&cadvisorapi.MachineInfo{}, nil) testKubelet.fakeCadvisor.On("ImagesFsInfo").Return(cadvisorapiv2.FsInfo{}, nil) @@ -1171,6 +1203,7 @@ func TestNetworkErrorsWithoutHostNetwork(t *testing.T) { func TestFilterOutTerminatedPods(t *testing.T) { testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() kubelet := testKubelet.kubelet pods := newTestPods(5) pods[0].Status.Phase = v1.PodFailed @@ -1237,6 +1270,7 @@ func TestMakePortMappings(t *testing.T) { func TestSyncPodsSetStatusToFailedForPodsThatRunTooLong(t *testing.T) { testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() fakeRuntime := testKubelet.fakeRuntime testKubelet.fakeCadvisor.On("MachineInfo").Return(&cadvisorapi.MachineInfo{}, nil) kubelet := testKubelet.kubelet @@ -1247,7 +1281,7 @@ func TestSyncPodsSetStatusToFailedForPodsThatRunTooLong(t *testing.T) { pods := []*v1.Pod{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "12345678", Name: "bar", Namespace: "new", @@ -1284,6 +1318,7 @@ func TestSyncPodsSetStatusToFailedForPodsThatRunTooLong(t *testing.T) { func TestSyncPodsDoesNotSetPodsThatDidNotRunTooLongToFailed(t *testing.T) { testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() fakeRuntime := testKubelet.fakeRuntime testKubelet.fakeCadvisor.On("Start").Return(nil) testKubelet.fakeCadvisor.On("VersionInfo").Return(&cadvisorapi.VersionInfo{}, nil) @@ -1299,7 +1334,7 @@ func TestSyncPodsDoesNotSetPodsThatDidNotRunTooLongToFailed(t *testing.T) { pods := []*v1.Pod{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "12345678", Name: "bar", Namespace: "new", @@ -1336,7 +1371,7 @@ func TestSyncPodsDoesNotSetPodsThatDidNotRunTooLongToFailed(t *testing.T) { func podWithUidNameNs(uid types.UID, name, namespace string) *v1.Pod { return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: uid, Name: name, Namespace: namespace, @@ -1353,6 +1388,7 @@ func podWithUidNameNsSpec(uid types.UID, name, namespace string, spec v1.PodSpec func TestDeletePodDirsForDeletedPods(t *testing.T) { testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() testKubelet.fakeCadvisor.On("Start").Return(nil) testKubelet.fakeCadvisor.On("VersionInfo").Return(&cadvisorapi.VersionInfo{}, nil) testKubelet.fakeCadvisor.On("MachineInfo").Return(&cadvisorapi.MachineInfo{}, nil) @@ -1392,6 +1428,7 @@ func syncAndVerifyPodDir(t *testing.T, testKubelet *TestKubelet, pods []*v1.Pod, func TestDoesNotDeletePodDirsForTerminatedPods(t *testing.T) { testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() testKubelet.fakeCadvisor.On("Start").Return(nil) testKubelet.fakeCadvisor.On("VersionInfo").Return(&cadvisorapi.VersionInfo{}, nil) testKubelet.fakeCadvisor.On("MachineInfo").Return(&cadvisorapi.MachineInfo{}, nil) @@ -1414,6 +1451,7 @@ func TestDoesNotDeletePodDirsForTerminatedPods(t *testing.T) { func TestDoesNotDeletePodDirsIfContainerIsRunning(t *testing.T) { testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() testKubelet.fakeCadvisor.On("Start").Return(nil) testKubelet.fakeCadvisor.On("VersionInfo").Return(&cadvisorapi.VersionInfo{}, nil) testKubelet.fakeCadvisor.On("MachineInfo").Return(&cadvisorapi.MachineInfo{}, nil) @@ -1446,6 +1484,7 @@ func TestDoesNotDeletePodDirsIfContainerIsRunning(t *testing.T) { func TestGetPodsToSync(t *testing.T) { testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() kubelet := testKubelet.kubelet clock := testKubelet.fakeClock pods := newTestPods(5) @@ -1476,6 +1515,7 @@ func TestGetPodsToSync(t *testing.T) { func TestGenerateAPIPodStatusWithSortedContainers(t *testing.T) { testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() testKubelet.fakeCadvisor.On("VersionInfo").Return(&cadvisorapi.VersionInfo{}, nil) testKubelet.fakeCadvisor.On("MachineInfo").Return(&cadvisorapi.MachineInfo{}, nil) testKubelet.fakeCadvisor.On("ImagesFsInfo").Return(cadvisorapiv2.FsInfo{}, nil) @@ -1538,6 +1578,7 @@ func TestGenerateAPIPodStatusWithReasonCache(t *testing.T) { testErrorReason := fmt.Errorf("test-error") emptyContainerID := (&kubecontainer.ContainerID{}).String() testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() testKubelet.fakeCadvisor.On("VersionInfo").Return(&cadvisorapi.VersionInfo{}, nil) testKubelet.fakeCadvisor.On("MachineInfo").Return(&cadvisorapi.MachineInfo{}, nil) testKubelet.fakeCadvisor.On("ImagesFsInfo").Return(cadvisorapiv2.FsInfo{}, nil) @@ -1727,6 +1768,7 @@ func TestGenerateAPIPodStatusWithDifferentRestartPolicies(t *testing.T) { testErrorReason := fmt.Errorf("test-error") emptyContainerID := (&kubecontainer.ContainerID{}).String() testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() testKubelet.fakeCadvisor.On("VersionInfo").Return(&cadvisorapi.VersionInfo{}, nil) testKubelet.fakeCadvisor.On("MachineInfo").Return(&cadvisorapi.MachineInfo{}, nil) testKubelet.fakeCadvisor.On("ImagesFsInfo").Return(cadvisorapiv2.FsInfo{}, nil) @@ -1893,10 +1935,11 @@ func (a *testPodAdmitHandler) Admit(attrs *lifecycle.PodAdmitAttributes) lifecyc // Test verifies that the kubelet invokes an admission handler during HandlePodAdditions. func TestHandlePodAdditionsInvokesPodAdmitHandlers(t *testing.T) { testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() kl := testKubelet.kubelet kl.nodeLister = testNodeLister{nodes: []v1.Node{ { - ObjectMeta: v1.ObjectMeta{Name: string(kl.nodeName)}, + ObjectMeta: metav1.ObjectMeta{Name: string(kl.nodeName)}, Status: v1.NodeStatus{ Allocatable: v1.ResourceList{ v1.ResourcePods: *resource.NewQuantity(110, resource.DecimalSI), @@ -1906,7 +1949,7 @@ func TestHandlePodAdditionsInvokesPodAdmitHandlers(t *testing.T) { }} kl.nodeInfo = testNodeInfo{nodes: []v1.Node{ { - ObjectMeta: v1.ObjectMeta{Name: string(kl.nodeName)}, + ObjectMeta: metav1.ObjectMeta{Name: string(kl.nodeName)}, Status: v1.NodeStatus{ Allocatable: v1.ResourceList{ v1.ResourcePods: *resource.NewQuantity(110, resource.DecimalSI), @@ -1920,14 +1963,14 @@ func TestHandlePodAdditionsInvokesPodAdmitHandlers(t *testing.T) { pods := []*v1.Pod{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "123456789", Name: "podA", Namespace: "foo", }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "987654321", Name: "podB", Namespace: "foo", @@ -1972,6 +2015,7 @@ func (a *testPodSyncLoopHandler) ShouldSync(pod *v1.Pod) bool { // TestGetPodsToSyncInvokesPodSyncLoopHandlers ensures that the get pods to sync routine invokes the handler. func TestGetPodsToSyncInvokesPodSyncLoopHandlers(t *testing.T) { testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() kubelet := testKubelet.kubelet pods := newTestPods(5) expected := []*v1.Pod{pods[0]} @@ -2007,6 +2051,7 @@ func (a *testPodSyncHandler) ShouldEvict(pod *v1.Pod) lifecycle.ShouldEvictRespo // TestGenerateAPIPodStatusInvokesPodSyncHandlers invokes the handlers and reports the proper status func TestGenerateAPIPodStatusInvokesPodSyncHandlers(t *testing.T) { testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() kubelet := testKubelet.kubelet pod := newTestPods(1)[0] podsToEvict := []*v1.Pod{pod} @@ -2024,9 +2069,10 @@ func TestGenerateAPIPodStatusInvokesPodSyncHandlers(t *testing.T) { func TestSyncPodKillPod(t *testing.T) { testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() kl := testKubelet.kubelet pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "12345678", Name: "bar", Namespace: "foo", diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_volumes_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_volumes_test.go index ebb89836..1097c244 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_volumes_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_volumes_test.go @@ -21,6 +21,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api/v1" @@ -85,11 +86,12 @@ func TestListVolumesForPod(t *testing.T) { func TestPodVolumesExist(t *testing.T) { testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() kubelet := testKubelet.kubelet pods := []*v1.Pod{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod1", UID: "pod1uid", }, @@ -107,7 +109,7 @@ func TestPodVolumesExist(t *testing.T) { }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod2", UID: "pod2uid", }, @@ -125,7 +127,7 @@ func TestPodVolumesExist(t *testing.T) { }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod3", UID: "pod3uid", }, @@ -169,6 +171,7 @@ func TestPodVolumesExist(t *testing.T) { func TestVolumeAttachAndMountControllerDisabled(t *testing.T) { testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() kubelet := testKubelet.kubelet pod := podWithUidNameNsSpec("12345678", "foo", "test", v1.PodSpec{ @@ -214,6 +217,7 @@ func TestVolumeAttachAndMountControllerDisabled(t *testing.T) { func TestVolumeUnmountAndDetachControllerDisabled(t *testing.T) { testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() kubelet := testKubelet.kubelet pod := podWithUidNameNsSpec("12345678", "foo", "test", v1.PodSpec{ @@ -284,12 +288,13 @@ func TestVolumeUnmountAndDetachControllerDisabled(t *testing.T) { func TestVolumeAttachAndMountControllerEnabled(t *testing.T) { testKubelet := newTestKubelet(t, true /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() kubelet := testKubelet.kubelet kubeClient := testKubelet.fakeKubeClient kubeClient.AddReactor("get", "nodes", func(action core.Action) (bool, runtime.Object, error) { return true, &v1.Node{ - ObjectMeta: v1.ObjectMeta{Name: testKubeletHostname}, + ObjectMeta: metav1.ObjectMeta{Name: testKubeletHostname}, Status: v1.NodeStatus{ VolumesAttached: []v1.AttachedVolume{ { @@ -352,12 +357,13 @@ func TestVolumeAttachAndMountControllerEnabled(t *testing.T) { func TestVolumeUnmountAndDetachControllerEnabled(t *testing.T) { testKubelet := newTestKubelet(t, true /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() kubelet := testKubelet.kubelet kubeClient := testKubelet.fakeKubeClient kubeClient.AddReactor("get", "nodes", func(action core.Action) (bool, runtime.Object, error) { return true, &v1.Node{ - ObjectMeta: v1.ObjectMeta{Name: testKubeletHostname}, + ObjectMeta: metav1.ObjectMeta{Name: testKubeletHostname}, Status: v1.NodeStatus{ VolumesAttached: []v1.AttachedVolume{ { diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/BUILD index eedb2a79..ca40508f 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/BUILD @@ -45,10 +45,11 @@ go_library( "//pkg/kubelet/util/cache:go_default_library", "//pkg/kubelet/util/format:go_default_library", "//pkg/securitycontext:go_default_library", - "//pkg/util/flowcontrol:go_default_library", "//pkg/util/parsers:go_default_library", "//pkg/util/selinux:go_default_library", + "//pkg/util/tail:go_default_library", "//pkg/util/version:go_default_library", + "//vendor:github.com/armon/circbuf", "//vendor:github.com/docker/docker/pkg/jsonlog", "//vendor:github.com/fsnotify/fsnotify", "//vendor:github.com/golang/glog", @@ -58,6 +59,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/util/errors", "//vendor:k8s.io/apimachinery/pkg/util/runtime", "//vendor:k8s.io/apimachinery/pkg/util/sets", + "//vendor:k8s.io/client-go/util/flowcontrol", ], ) @@ -84,7 +86,6 @@ go_test( "//pkg/kubelet/container/testing:go_default_library", "//pkg/kubelet/network:go_default_library", "//pkg/kubelet/network/testing:go_default_library", - "//pkg/util/flowcontrol:go_default_library", "//pkg/util/intstr:go_default_library", "//vendor:github.com/golang/mock/gomock", "//vendor:github.com/google/cadvisor/info/v1", @@ -92,6 +93,7 @@ go_test( "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/sets", + "//vendor:k8s.io/client-go/util/flowcontrol", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/fake_kuberuntime_manager.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/fake_kuberuntime_manager.go index 98292702..78d51463 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/fake_kuberuntime_manager.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/fake_kuberuntime_manager.go @@ -24,6 +24,7 @@ import ( cadvisorapi "github.com/google/cadvisor/info/v1" "k8s.io/apimachinery/pkg/types" kubetypes "k8s.io/apimachinery/pkg/types" + "k8s.io/client-go/util/flowcontrol" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/record" "k8s.io/kubernetes/pkg/credentialprovider" @@ -33,7 +34,6 @@ import ( "k8s.io/kubernetes/pkg/kubelet/lifecycle" "k8s.io/kubernetes/pkg/kubelet/network" proberesults "k8s.io/kubernetes/pkg/kubelet/prober/results" - "k8s.io/kubernetes/pkg/util/flowcontrol" ) type fakeHTTP struct { @@ -113,7 +113,7 @@ func NewFakeKubeRuntimeManager(runtimeService internalapi.RuntimeService, imageS } kubeRuntimeManager.containerGC = NewContainerGC(runtimeService, newFakePodGetter(), kubeRuntimeManager) - kubeRuntimeManager.runtimeName = typedVersion.GetRuntimeName() + kubeRuntimeManager.runtimeName = typedVersion.RuntimeName kubeRuntimeManager.imagePuller = images.NewImageManager( kubecontainer.FilterEventRecorder(recorder), kubeRuntimeManager, diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/helpers.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/helpers.go index c2d71d36..d8383e06 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/helpers.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/helpers.go @@ -61,7 +61,7 @@ type podSandboxByCreated []*runtimeapi.PodSandbox func (p podSandboxByCreated) Len() int { return len(p) } func (p podSandboxByCreated) Swap(i, j int) { p[i], p[j] = p[j], p[i] } -func (p podSandboxByCreated) Less(i, j int) bool { return p[i].GetCreatedAt() > p[j].GetCreatedAt() } +func (p podSandboxByCreated) Less(i, j int) bool { return p[i].CreatedAt > p[j].CreatedAt } type containerStatusByCreated []*kubecontainer.ContainerStatus @@ -100,18 +100,18 @@ func toRuntimeProtocol(protocol v1.Protocol) runtimeapi.Protocol { // toKubeContainer converts runtimeapi.Container to kubecontainer.Container. func (m *kubeGenericRuntimeManager) toKubeContainer(c *runtimeapi.Container) (*kubecontainer.Container, error) { - if c == nil || c.Id == nil || c.Image == nil || c.State == nil { + if c == nil || c.Id == "" || c.Image == nil { return nil, fmt.Errorf("unable to convert a nil pointer to a runtime container") } labeledInfo := getContainerInfoFromLabels(c.Labels) annotatedInfo := getContainerInfoFromAnnotations(c.Annotations) return &kubecontainer.Container{ - ID: kubecontainer.ContainerID{Type: m.runtimeName, ID: c.GetId()}, + ID: kubecontainer.ContainerID{Type: m.runtimeName, ID: c.Id}, Name: labeledInfo.ContainerName, - Image: c.Image.GetImage(), + Image: c.Image.Image, Hash: annotatedInfo.Hash, - State: toKubeContainerState(c.GetState()), + State: toKubeContainerState(c.State), }, nil } @@ -120,34 +120,36 @@ func (m *kubeGenericRuntimeManager) toKubeContainer(c *runtimeapi.Container) (*k // kubecontainer.Containers to avoid substantial changes to PLEG. // TODO: Remove this once it becomes obsolete. func (m *kubeGenericRuntimeManager) sandboxToKubeContainer(s *runtimeapi.PodSandbox) (*kubecontainer.Container, error) { - if s == nil || s.Id == nil || s.State == nil { + if s == nil || s.Id == "" { return nil, fmt.Errorf("unable to convert a nil pointer to a runtime container") } return &kubecontainer.Container{ - ID: kubecontainer.ContainerID{Type: m.runtimeName, ID: s.GetId()}, - State: kubecontainer.SandboxToContainerState(s.GetState()), + ID: kubecontainer.ContainerID{Type: m.runtimeName, ID: s.Id}, + State: kubecontainer.SandboxToContainerState(s.State), }, nil } // getImageUser gets uid or user name that will run the command(s) from image. The function // guarantees that only one of them is set. -func (m *kubeGenericRuntimeManager) getImageUser(image string) (*int64, *string, error) { - imageStatus, err := m.imageService.ImageStatus(&runtimeapi.ImageSpec{Image: &image}) +func (m *kubeGenericRuntimeManager) getImageUser(image string) (*int64, string, error) { + imageStatus, err := m.imageService.ImageStatus(&runtimeapi.ImageSpec{Image: image}) if err != nil { - return nil, nil, err + return nil, "", err } - if imageStatus != nil && imageStatus.Uid != nil { - // If uid is set, return uid. - return imageStatus.Uid, nil, nil - } - if imageStatus != nil && imageStatus.Username != nil { - // If uid is not set, but user name is set, return user name. - return nil, imageStatus.Username, nil + if imageStatus != nil { + if imageStatus.Uid != nil { + return &imageStatus.GetUid().Value, "", nil + } + + if imageStatus.Username != "" { + return nil, imageStatus.Username, nil + } } + // If non of them is set, treat it as root. - return new(int64), nil, nil + return new(int64), "", nil } // isContainerFailed returns true if container has exited and exitcode is not zero. @@ -226,10 +228,10 @@ func toKubeRuntimeStatus(status *runtimeapi.RuntimeStatus) *kubecontainer.Runtim conditions := []kubecontainer.RuntimeCondition{} for _, c := range status.GetConditions() { conditions = append(conditions, kubecontainer.RuntimeCondition{ - Type: kubecontainer.RuntimeConditionType(c.GetType()), - Status: c.GetStatus(), - Reason: c.GetReason(), - Message: c.GetMessage(), + Type: kubecontainer.RuntimeConditionType(c.Type), + Status: c.Status, + Reason: c.Reason, + Message: c.Message, }) } return &kubecontainer.RuntimeStatus{Conditions: conditions} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/helpers_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/helpers_test.go index 7338694f..5297ef5e 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/helpers_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/helpers_test.go @@ -20,6 +20,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" ) @@ -29,7 +30,7 @@ func TestStableKey(t *testing.T) { Image: "foo/image:v1", } pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test_pod", Namespace: "test_pod_namespace", UID: "test_pod_uid", diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_container.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_container.go index 7380716d..128d5229 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_container.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_container.go @@ -19,7 +19,6 @@ package kuberuntime import ( "fmt" "io" - "io/ioutil" "math/rand" "net/url" "os" @@ -28,7 +27,9 @@ import ( "sync" "time" + "github.com/armon/circbuf" "github.com/golang/glog" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" kubetypes "k8s.io/apimachinery/pkg/types" utilruntime "k8s.io/apimachinery/pkg/util/runtime" @@ -41,6 +42,7 @@ import ( "k8s.io/kubernetes/pkg/kubelet/types" "k8s.io/kubernetes/pkg/kubelet/util/format" "k8s.io/kubernetes/pkg/util/selinux" + "k8s.io/kubernetes/pkg/util/tail" ) // startContainer starts a container and returns a message indicates why it is failed on error. @@ -102,9 +104,9 @@ func (m *kubeGenericRuntimeManager) startContainer(podSandboxID string, podSandb // TODO(random-liu): Remove this after cluster logging supports CRI container log path. containerMeta := containerConfig.GetMetadata() sandboxMeta := podSandboxConfig.GetMetadata() - legacySymlink := legacyLogSymlink(containerID, containerMeta.GetName(), sandboxMeta.GetName(), - sandboxMeta.GetNamespace()) - containerLog := filepath.Join(podSandboxConfig.GetLogDirectory(), containerConfig.GetLogPath()) + legacySymlink := legacyLogSymlink(containerID, containerMeta.Name, sandboxMeta.Name, + sandboxMeta.Namespace) + containerLog := filepath.Join(podSandboxConfig.LogDirectory, containerConfig.LogPath) if err := m.osInterface.Symlink(containerLog, legacySymlink); err != nil { glog.Errorf("Failed to create legacy symbolic link %q to container %q log %q: %v", legacySymlink, containerID, containerLog, err) @@ -144,8 +146,8 @@ func (m *kubeGenericRuntimeManager) generateContainerConfig(container *v1.Contai if err := verifyRunAsNonRoot(pod, container, *uid); err != nil { return nil, err } - } else { - glog.Warningf("Non-root verification doesn't support non-numeric user (%s)", *username) + } else if username != "" { + glog.Warningf("Non-root verification doesn't support non-numeric user (%s)", username) } command, args := kubecontainer.ExpandContainerCommandAndArgs(container, opts.Envs) @@ -153,21 +155,21 @@ func (m *kubeGenericRuntimeManager) generateContainerConfig(container *v1.Contai restartCountUint32 := uint32(restartCount) config := &runtimeapi.ContainerConfig{ Metadata: &runtimeapi.ContainerMetadata{ - Name: &container.Name, - Attempt: &restartCountUint32, + Name: container.Name, + Attempt: restartCountUint32, }, - Image: &runtimeapi.ImageSpec{Image: &imageRef}, + Image: &runtimeapi.ImageSpec{Image: imageRef}, Command: command, Args: args, - WorkingDir: &container.WorkingDir, + WorkingDir: container.WorkingDir, Labels: newContainerLabels(container, pod), Annotations: newContainerAnnotations(container, pod, restartCount), Devices: makeDevices(opts), Mounts: m.makeMounts(opts, container), - LogPath: &containerLogsPath, - Stdin: &container.Stdin, - StdinOnce: &container.StdinOnce, - Tty: &container.TTY, + LogPath: containerLogsPath, + Stdin: container.Stdin, + StdinOnce: container.StdinOnce, + Tty: container.TTY, Linux: m.generateLinuxContainerConfig(container, pod, uid, username), } @@ -176,8 +178,8 @@ func (m *kubeGenericRuntimeManager) generateContainerConfig(container *v1.Contai for idx := range opts.Envs { e := opts.Envs[idx] envs[idx] = &runtimeapi.KeyValue{ - Key: &e.Name, - Value: &e.Value, + Key: e.Name, + Value: e.Value, } } config.Envs = envs @@ -186,7 +188,7 @@ func (m *kubeGenericRuntimeManager) generateContainerConfig(container *v1.Contai } // generateLinuxContainerConfig generates linux container config for kubelet runtime v1. -func (m *kubeGenericRuntimeManager) generateLinuxContainerConfig(container *v1.Container, pod *v1.Pod, uid *int64, username *string) *runtimeapi.LinuxContainerConfig { +func (m *kubeGenericRuntimeManager) generateLinuxContainerConfig(container *v1.Container, pod *v1.Pod, uid *int64, username string) *runtimeapi.LinuxContainerConfig { lc := &runtimeapi.LinuxContainerConfig{ Resources: &runtimeapi.LinuxContainerResources{}, SecurityContext: m.determineEffectiveSecurityContext(pod, container, uid, username), @@ -209,20 +211,20 @@ func (m *kubeGenericRuntimeManager) generateLinuxContainerConfig(container *v1.C // of CPU shares. cpuShares = milliCPUToShares(cpuRequest.MilliValue()) } - lc.Resources.CpuShares = &cpuShares + lc.Resources.CpuShares = cpuShares if memoryLimit != 0 { - lc.Resources.MemoryLimitInBytes = &memoryLimit + lc.Resources.MemoryLimitInBytes = memoryLimit } // Set OOM score of the container based on qos policy. Processes in lower-priority pods should // be killed first if the system runs out of memory. - lc.Resources.OomScoreAdj = &oomScoreAdj + lc.Resources.OomScoreAdj = oomScoreAdj if m.cpuCFSQuota { // if cpuLimit.Amount is nil, then the appropriate default value is returned // to allow full usage of cpu resource. cpuQuota, cpuPeriod := milliCPUToQuota(cpuLimit.MilliValue()) - lc.Resources.CpuQuota = &cpuQuota - lc.Resources.CpuPeriod = &cpuPeriod + lc.Resources.CpuQuota = cpuQuota + lc.Resources.CpuPeriod = cpuPeriod } return lc @@ -235,9 +237,9 @@ func makeDevices(opts *kubecontainer.RunContainerOptions) []*runtimeapi.Device { for idx := range opts.Devices { device := opts.Devices[idx] devices[idx] = &runtimeapi.Device{ - HostPath: &device.PathOnHost, - ContainerPath: &device.PathInContainer, - Permissions: &device.Permissions, + HostPath: device.PathOnHost, + ContainerPath: device.PathInContainer, + Permissions: device.Permissions, } } @@ -252,10 +254,10 @@ func (m *kubeGenericRuntimeManager) makeMounts(opts *kubecontainer.RunContainerO v := opts.Mounts[idx] selinuxRelabel := v.SELinuxRelabel && selinux.SELinuxEnabled() mount := &runtimeapi.Mount{ - HostPath: &v.HostPath, - ContainerPath: &v.ContainerPath, - Readonly: &v.ReadOnly, - SelinuxRelabel: &selinuxRelabel, + HostPath: v.HostPath, + ContainerPath: v.ContainerPath, + Readonly: v.ReadOnly, + SelinuxRelabel: selinuxRelabel, } volumeMounts = append(volumeMounts, mount) @@ -272,14 +274,23 @@ func (m *kubeGenericRuntimeManager) makeMounts(opts *kubecontainer.RunContainerO containerLogPath := filepath.Join(opts.PodContainerDir, cid) fs, err := m.osInterface.Create(containerLogPath) if err != nil { - glog.Errorf("Error on creating termination-log file %q: %v", containerLogPath, err) + utilruntime.HandleError(fmt.Errorf("error on creating termination-log file %q: %v", containerLogPath, err)) } else { fs.Close() + + // Chmod is needed because ioutil.WriteFile() ends up calling + // open(2) to create the file, so the final mode used is "mode & + // ~umask". But we want to make sure the specified mode is used + // in the file no matter what the umask is. + if err := m.osInterface.Chmod(containerLogPath, 0666); err != nil { + utilruntime.HandleError(fmt.Errorf("unable to set termination-log file permissions %q: %v", containerLogPath, err)) + } + selinuxRelabel := selinux.SELinuxEnabled() volumeMounts = append(volumeMounts, &runtimeapi.Mount{ - HostPath: &containerLogPath, - ContainerPath: &container.TerminationMessagePath, - SelinuxRelabel: &selinuxRelabel, + HostPath: containerLogPath, + ContainerPath: container.TerminationMessagePath, + SelinuxRelabel: selinuxRelabel, }) } } @@ -296,7 +307,9 @@ func (m *kubeGenericRuntimeManager) getKubeletContainers(allContainers bool) ([] } if !allContainers { runningState := runtimeapi.ContainerState_CONTAINER_RUNNING - filter.State = &runningState + filter.State = &runtimeapi.ContainerStateValue{ + State: runningState, + } } containers, err := m.getContainersHelper(filter) @@ -323,29 +336,36 @@ func makeUID() string { return fmt.Sprintf("%08x", rand.Uint32()) } -// getTerminationMessage gets termination message of the container. -func getTerminationMessage(status *runtimeapi.ContainerStatus, kubeStatus *kubecontainer.ContainerStatus, terminationMessagePath string) string { - message := "" - - if !kubeStatus.FinishedAt.IsZero() || kubeStatus.ExitCode != 0 { - if terminationMessagePath == "" { - return "" - } - +// getTerminationMessage looks on the filesystem for the provided termination message path, returning a limited +// amount of those bytes, or returns true if the logs should be checked. +func getTerminationMessage(status *runtimeapi.ContainerStatus, terminationMessagePath string, fallbackToLogs bool) (string, bool) { + if len(terminationMessagePath) != 0 { for _, mount := range status.Mounts { - if mount.GetContainerPath() == terminationMessagePath { - path := mount.GetHostPath() - if data, err := ioutil.ReadFile(path); err != nil { - message = fmt.Sprintf("Error on reading termination-log %s: %v", path, err) - } else { - message = string(data) - } - break + if mount.ContainerPath != terminationMessagePath { + continue + } + path := mount.HostPath + data, _, err := tail.ReadAtMost(path, kubecontainer.MaxContainerTerminationMessageLength) + if err != nil { + return fmt.Sprintf("Error on reading termination log %s: %v", path, err), false + } + if !fallbackToLogs || len(data) != 0 { + return string(data), false } } } + return "", fallbackToLogs +} - return message +// readLastStringFromContainerLogs attempts to read up to the max log length from the end of the CRI log represented +// by path. It reads up to max log lines. +func readLastStringFromContainerLogs(path string) string { + value := int64(kubecontainer.MaxContainerTerminationMessageLogLines) + buf, _ := circbuf.NewBuffer(kubecontainer.MaxContainerTerminationMessageLogLength) + if err := ReadLogs(path, &v1.PodLogOptions{TailLines: &value}, buf, buf); err != nil { + return fmt.Sprintf("Error on reading termination message from logs: %v", err) + } + return buf.String() } // getPodContainerStatuses gets all containers' statuses for the pod. @@ -362,9 +382,9 @@ func (m *kubeGenericRuntimeManager) getPodContainerStatuses(uid kubetypes.UID, n statuses := make([]*kubecontainer.ContainerStatus, len(containers)) // TODO: optimization: set maximum number of containers per container name to examine. for i, c := range containers { - status, err := m.runtimeService.ContainerStatus(c.GetId()) + status, err := m.runtimeService.ContainerStatus(c.Id) if err != nil { - glog.Errorf("ContainerStatus for %s error: %v", c.GetId(), err) + glog.Errorf("ContainerStatus for %s error: %v", c.Id, err) return nil, err } @@ -373,31 +393,37 @@ func (m *kubeGenericRuntimeManager) getPodContainerStatuses(uid kubetypes.UID, n cStatus := &kubecontainer.ContainerStatus{ ID: kubecontainer.ContainerID{ Type: m.runtimeName, - ID: c.GetId(), + ID: c.Id, }, Name: labeledInfo.ContainerName, - Image: status.Image.GetImage(), - ImageID: status.GetImageRef(), + Image: status.Image.Image, + ImageID: status.ImageRef, Hash: annotatedInfo.Hash, RestartCount: annotatedInfo.RestartCount, - State: toKubeContainerState(c.GetState()), - CreatedAt: time.Unix(0, status.GetCreatedAt()), + State: toKubeContainerState(c.State), + CreatedAt: time.Unix(0, status.CreatedAt), } - if c.GetState() == runtimeapi.ContainerState_CONTAINER_RUNNING { - cStatus.StartedAt = time.Unix(0, status.GetStartedAt()) + if c.State == runtimeapi.ContainerState_CONTAINER_RUNNING { + cStatus.StartedAt = time.Unix(0, status.StartedAt) } else { - cStatus.Reason = status.GetReason() - cStatus.Message = status.GetMessage() - cStatus.ExitCode = int(status.GetExitCode()) - cStatus.FinishedAt = time.Unix(0, status.GetFinishedAt()) + cStatus.Reason = status.Reason + cStatus.Message = status.Message + cStatus.ExitCode = int(status.ExitCode) + cStatus.FinishedAt = time.Unix(0, status.FinishedAt) + + fallbackToLogs := annotatedInfo.TerminationMessagePolicy == v1.TerminationMessageFallbackToLogsOnError && (cStatus.ExitCode != 0 || cStatus.Reason == "OOMKilled") + tMessage, checkLogs := getTerminationMessage(status, annotatedInfo.TerminationMessagePath, fallbackToLogs) + if checkLogs { + path := buildFullContainerLogsPath(uid, labeledInfo.ContainerName, annotatedInfo.RestartCount) + tMessage = readLastStringFromContainerLogs(path) + } + // Use the termination message written by the application is not empty + if len(tMessage) != 0 { + cStatus.Message = tMessage + } } - tMessage := getTerminationMessage(status, cStatus, annotatedInfo.TerminationMessagePath) - // Use the termination message written by the application is not empty - if len(tMessage) != 0 { - cStatus.Message = tMessage - } statuses[i] = cStatus } @@ -461,7 +487,7 @@ func (m *kubeGenericRuntimeManager) restoreSpecsFromContainerLabels(containerID // Notice that the followings are not full spec. The container killing code should not use // un-restored fields. pod = &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: l.PodUID, Name: l.PodName, Namespace: l.PodNamespace, @@ -670,31 +696,31 @@ func (m *kubeGenericRuntimeManager) GetContainerLogs(pod *v1.Pod, containerID ku // GetExec gets the endpoint the runtime will serve the exec request from. func (m *kubeGenericRuntimeManager) GetExec(id kubecontainer.ContainerID, cmd []string, stdin, stdout, stderr, tty bool) (*url.URL, error) { req := &runtimeapi.ExecRequest{ - ContainerId: &id.ID, + ContainerId: id.ID, Cmd: cmd, - Tty: &tty, - Stdin: &stdin, + Tty: tty, + Stdin: stdin, } resp, err := m.runtimeService.Exec(req) if err != nil { return nil, err } - return url.Parse(resp.GetUrl()) + return url.Parse(resp.Url) } // GetAttach gets the endpoint the runtime will serve the attach request from. func (m *kubeGenericRuntimeManager) GetAttach(id kubecontainer.ContainerID, stdin, stdout, stderr, tty bool) (*url.URL, error) { req := &runtimeapi.AttachRequest{ - ContainerId: &id.ID, - Stdin: &stdin, - Tty: &tty, + ContainerId: id.ID, + Stdin: stdin, + Tty: tty, } resp, err := m.runtimeService.Attach(req) if err != nil { return nil, err } - return url.Parse(resp.GetUrl()) + return url.Parse(resp.Url) } // RunInContainer synchronously executes the command in the container, and returns the output. diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_container_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_container_test.go index 001c2c2d..916b69e6 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_container_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_container_test.go @@ -21,6 +21,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" runtimeapi "k8s.io/kubernetes/pkg/kubelet/api/v1alpha1/runtime" containertest "k8s.io/kubernetes/pkg/kubelet/container/testing" @@ -30,7 +31,7 @@ import ( func TestRemoveContainer(t *testing.T) { fakeRuntime, _, m, err := createTestRuntimeManager() pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "12345678", Name: "bar", Namespace: "new", @@ -50,7 +51,7 @@ func TestRemoveContainer(t *testing.T) { _, fakeContainers := makeAndSetFakePod(t, m, fakeRuntime, pod) assert.Equal(t, len(fakeContainers), 1) - containerId := fakeContainers[0].GetId() + containerId := fakeContainers[0].Id fakeOS := m.osInterface.(*containertest.FakeOS) err = m.removeContainer(containerId) assert.NoError(t, err) @@ -60,7 +61,7 @@ func TestRemoveContainer(t *testing.T) { assert.Equal(t, fakeOS.Removes, []string{expectedContainerLogPath, expectedContainerLogSymlink}) // Verify container is removed fakeRuntime.AssertCalls([]string{"RemoveContainer"}) - containers, err := fakeRuntime.ListContainers(&runtimeapi.ContainerFilter{Id: &containerId}) + containers, err := fakeRuntime.ListContainers(&runtimeapi.ContainerFilter{Id: containerId}) assert.NoError(t, err) assert.Empty(t, containers) } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_gc.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_gc.go index 1f5ce7a6..a156836b 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_gc.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_gc.go @@ -161,21 +161,21 @@ func (cgc *containerGC) evictableContainers(minAge time.Duration) (containersByE newestGCTime := time.Now().Add(-minAge) for _, container := range containers { // Prune out running containers. - if container.GetState() == runtimeapi.ContainerState_CONTAINER_RUNNING { + if container.State == runtimeapi.ContainerState_CONTAINER_RUNNING { continue } - createdAt := time.Unix(0, container.GetCreatedAt()) + createdAt := time.Unix(0, container.CreatedAt) if newestGCTime.Before(createdAt) { continue } labeledInfo := getContainerInfoFromLabels(container.Labels) containerInfo := containerGCInfo{ - id: container.GetId(), - name: container.Metadata.GetName(), + id: container.Id, + name: container.Metadata.Name, createTime: createdAt, - sandboxID: container.GetPodSandboxId(), + sandboxID: container.PodSandboxId, } key := evictUnit{ uid: labeledInfo.PodUID, @@ -256,15 +256,15 @@ func (cgc *containerGC) evictSandboxes(minAge time.Duration) error { newestGCTime := time.Now().Add(-minAge) for _, sandbox := range sandboxes { // Prune out ready sandboxes. - if sandbox.GetState() == runtimeapi.PodSandboxState_SANDBOX_READY { + if sandbox.State == runtimeapi.PodSandboxState_SANDBOX_READY { continue } // Prune out sandboxes that still have containers. found := false - sandboxID := sandbox.GetId() + sandboxID := sandbox.Id for _, container := range containers { - if container.GetPodSandboxId() == sandboxID { + if container.PodSandboxId == sandboxID { found = true break } @@ -274,7 +274,7 @@ func (cgc *containerGC) evictSandboxes(minAge time.Duration) error { } // Only garbage collect sandboxes older than sandboxMinGCAge. - createdAt := time.Unix(0, sandbox.GetCreatedAt()) + createdAt := time.Unix(0, sandbox.CreatedAt) if createdAt.After(newestGCTime) { continue } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_gc_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_gc_test.go index 2e45c8d4..8b3d0eba 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_gc_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_gc_test.go @@ -115,7 +115,7 @@ func TestSandboxGC(t *testing.T) { assert.NoError(t, err) assert.Len(t, realRemain, len(test.remain)) for _, remain := range test.remain { - status, err := fakeRuntime.PodSandboxStatus(fakeSandboxes[remain].GetId()) + status, err := fakeRuntime.PodSandboxStatus(fakeSandboxes[remain].Id) assert.NoError(t, err) assert.Equal(t, &fakeSandboxes[remain].PodSandboxStatus, status) } @@ -288,7 +288,7 @@ func TestContainerGC(t *testing.T) { assert.NoError(t, err) assert.Len(t, realRemain, len(test.remain)) for _, remain := range test.remain { - status, err := fakeRuntime.ContainerStatus(fakeContainers[remain].GetId()) + status, err := fakeRuntime.ContainerStatus(fakeContainers[remain].Id) assert.NoError(t, err) assert.Equal(t, &fakeContainers[remain].ContainerStatus, status) } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_image.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_image.go index f6545e9b..69db4cbc 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_image.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_image.go @@ -40,7 +40,7 @@ func (m *kubeGenericRuntimeManager) PullImage(image kubecontainer.ImageSpec, pul return "", err } - imgSpec := &runtimeapi.ImageSpec{Image: &img} + imgSpec := &runtimeapi.ImageSpec{Image: img} creds, withCredentials := keyring.Lookup(repoToPull) if !withCredentials { glog.V(3).Infof("Pulling image %q without credentials", img) @@ -58,12 +58,12 @@ func (m *kubeGenericRuntimeManager) PullImage(image kubecontainer.ImageSpec, pul for _, currentCreds := range creds { authConfig := credentialprovider.LazyProvide(currentCreds) auth := &runtimeapi.AuthConfig{ - Username: &authConfig.Username, - Password: &authConfig.Password, - Auth: &authConfig.Auth, - ServerAddress: &authConfig.ServerAddress, - IdentityToken: &authConfig.IdentityToken, - RegistryToken: &authConfig.RegistryToken, + Username: authConfig.Username, + Password: authConfig.Password, + Auth: authConfig.Auth, + ServerAddress: authConfig.ServerAddress, + IdentityToken: authConfig.IdentityToken, + RegistryToken: authConfig.RegistryToken, } imageRef, err := m.imageService.PullImage(imgSpec, auth) @@ -81,7 +81,7 @@ func (m *kubeGenericRuntimeManager) PullImage(image kubecontainer.ImageSpec, pul // GetImageRef gets the reference (digest or ID) of the image which has already been in // the local storage. It returns ("", nil) if the image isn't in the local storage. func (m *kubeGenericRuntimeManager) GetImageRef(image kubecontainer.ImageSpec) (string, error) { - status, err := m.imageService.ImageStatus(&runtimeapi.ImageSpec{Image: &image.Image}) + status, err := m.imageService.ImageStatus(&runtimeapi.ImageSpec{Image: image.Image}) if err != nil { glog.Errorf("ImageStatus for image %q failed: %v", image, err) return "", err @@ -90,7 +90,7 @@ func (m *kubeGenericRuntimeManager) GetImageRef(image kubecontainer.ImageSpec) ( return "", nil } - imageRef := status.GetId() + imageRef := status.Id if len(status.RepoDigests) > 0 { imageRef = status.RepoDigests[0] } @@ -109,8 +109,8 @@ func (m *kubeGenericRuntimeManager) ListImages() ([]kubecontainer.Image, error) for _, img := range allImages { images = append(images, kubecontainer.Image{ - ID: img.GetId(), - Size: int64(img.GetSize_()), + ID: img.Id, + Size: int64(img.Size_), RepoTags: img.RepoTags, RepoDigests: img.RepoDigests, }) @@ -121,7 +121,7 @@ func (m *kubeGenericRuntimeManager) ListImages() ([]kubecontainer.Image, error) // RemoveImage removes the specified image. func (m *kubeGenericRuntimeManager) RemoveImage(image kubecontainer.ImageSpec) error { - err := m.imageService.RemoveImage(&runtimeapi.ImageSpec{Image: &image.Image}) + err := m.imageService.RemoveImage(&runtimeapi.ImageSpec{Image: image.Image}) if err != nil { glog.Errorf("Remove image %q failed: %v", image.Image, err) return err @@ -142,7 +142,7 @@ func (m *kubeGenericRuntimeManager) ImageStats() (*kubecontainer.ImageStats, err } stats := &kubecontainer.ImageStats{} for _, img := range allImages { - stats.TotalStorageBytes += img.GetSize_() + stats.TotalStorageBytes += img.Size_ } return stats, nil } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_logs.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_logs.go index 3cc0eb17..21d81bc6 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_logs.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_logs.go @@ -32,6 +32,7 @@ import ( "github.com/golang/glog" "k8s.io/kubernetes/pkg/api/v1" + "k8s.io/kubernetes/pkg/util/tail" ) // Notice that the current kuberuntime logs implementation doesn't handle @@ -120,7 +121,7 @@ func ReadLogs(path string, apiOpts *v1.PodLogOptions, stdout, stderr io.Writer) opts := newLogOptions(apiOpts, time.Now()) // Search start point based on tail line. - start, err := tail(f, opts.tail) + start, err := tail.FindTailLineStartIndex(f, opts.tail) if err != nil { return fmt.Errorf("failed to tail %d lines of log file %q: %v", opts.tail, path, err) } @@ -347,40 +348,3 @@ func (w *logWriter) write(msg *logMessage) error { } return nil } - -// tail returns the start of last nth line. -// * If n < 0, return the beginning of the file. -// * If n >= 0, return the beginning of last nth line. -// Notice that if the last line is incomplete (no end-of-line), it will not be counted -// as one line. -func tail(f io.ReadSeeker, n int64) (int64, error) { - if n < 0 { - return 0, nil - } - size, err := f.Seek(0, os.SEEK_END) - if err != nil { - return 0, err - } - var left, cnt int64 - buf := make([]byte, blockSize) - for right := size; right > 0 && cnt <= n; right -= blockSize { - left = right - blockSize - if left < 0 { - left = 0 - buf = make([]byte, right) - } - if _, err := f.Seek(left, os.SEEK_SET); err != nil { - return 0, err - } - if _, err := f.Read(buf); err != nil { - return 0, err - } - cnt += int64(bytes.Count(buf, eol)) - } - for ; cnt > n; cnt-- { - idx := bytes.Index(buf, eol) + 1 - buf = buf[idx:] - left += int64(idx) - } - return left, nil -} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_logs_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_logs_test.go index 9fb07d6a..1602827a 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_logs_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_logs_test.go @@ -18,7 +18,6 @@ package kuberuntime import ( "bytes" - "strings" "testing" "time" @@ -242,28 +241,3 @@ func TestWriteLogsWithBytesLimit(t *testing.T) { assert.Equal(t, test.expectStderr, stderrBuf.String()) } } - -func TestTail(t *testing.T) { - line := strings.Repeat("a", blockSize) - testBytes := []byte(line + "\n" + - line + "\n" + - line + "\n" + - line + "\n" + - line[blockSize/2:]) // incomplete line - - for c, test := range []struct { - n int64 - start int64 - }{ - {n: -1, start: 0}, - {n: 0, start: int64(len(line)+1) * 4}, - {n: 1, start: int64(len(line)+1) * 3}, - {n: 9999, start: 0}, - } { - t.Logf("TestCase #%d: %+v", c, test) - r := bytes.NewReader(testBytes) - s, err := tail(r, test.n) - assert.NoError(t, err) - assert.Equal(t, s, test.start) - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_manager.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_manager.go index b7c5882d..9100e907 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_manager.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_manager.go @@ -25,8 +25,10 @@ import ( "github.com/golang/glog" cadvisorapi "github.com/google/cadvisor/info/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" kubetypes "k8s.io/apimachinery/pkg/types" utilruntime "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/client-go/util/flowcontrol" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/record" "k8s.io/kubernetes/pkg/credentialprovider" @@ -41,7 +43,6 @@ import ( "k8s.io/kubernetes/pkg/kubelet/types" "k8s.io/kubernetes/pkg/kubelet/util/cache" "k8s.io/kubernetes/pkg/kubelet/util/format" - "k8s.io/kubernetes/pkg/util/flowcontrol" utilversion "k8s.io/kubernetes/pkg/util/version" ) @@ -155,18 +156,18 @@ func NewKubeGenericRuntimeManager( // Only matching kubeRuntimeAPIVersion is supported now // TODO: Runtime API machinery is under discussion at https://github.com/kubernetes/kubernetes/issues/28642 - if typedVersion.GetVersion() != kubeRuntimeAPIVersion { + if typedVersion.Version != kubeRuntimeAPIVersion { glog.Errorf("Runtime api version %s is not supported, only %s is supported now", - typedVersion.GetVersion(), + typedVersion.Version, kubeRuntimeAPIVersion) return nil, ErrVersionNotSupported } - kubeRuntimeManager.runtimeName = typedVersion.GetRuntimeName() + kubeRuntimeManager.runtimeName = typedVersion.RuntimeName glog.Infof("Container runtime %s initialized, version: %s, apiVersion: %s", - typedVersion.GetRuntimeName(), - typedVersion.GetRuntimeVersion(), - typedVersion.GetRuntimeApiVersion()) + typedVersion.RuntimeName, + typedVersion.RuntimeVersion, + typedVersion.RuntimeApiVersion) // If the container logs directory does not exist, create it. // TODO: create podLogsRootDirectory at kubelet.go when kubelet is refactored to @@ -223,7 +224,7 @@ func (m *kubeGenericRuntimeManager) Version() (kubecontainer.Version, error) { return nil, err } - return newRuntimeVersion(typedVersion.GetVersion()) + return newRuntimeVersion(typedVersion.Version) } // APIVersion returns the cached API version information of the container @@ -236,7 +237,7 @@ func (m *kubeGenericRuntimeManager) APIVersion() (kubecontainer.Version, error) } typedVersion := versionObject.(*runtimeapi.VersionResponse) - return newRuntimeVersion(typedVersion.GetRuntimeApiVersion()) + return newRuntimeVersion(typedVersion.RuntimeApiVersion) } // Status returns the status of the runtime. An error is returned if the Status @@ -264,12 +265,12 @@ func (m *kubeGenericRuntimeManager) GetPods(all bool) ([]*kubecontainer.Pod, err glog.V(4).Infof("Sandbox does not have metadata: %+v", s) continue } - podUID := kubetypes.UID(s.Metadata.GetUid()) + podUID := kubetypes.UID(s.Metadata.Uid) if _, ok := pods[podUID]; !ok { pods[podUID] = &kubecontainer.Pod{ ID: podUID, - Name: s.Metadata.GetName(), - Namespace: s.Metadata.GetNamespace(), + Name: s.Metadata.Name, + Namespace: s.Metadata.Namespace, } } p := pods[podUID] @@ -371,26 +372,26 @@ func (m *kubeGenericRuntimeManager) podSandboxChanged(pod *v1.Pod, podStatus *ku readySandboxCount := 0 for _, s := range podStatus.SandboxStatuses { - if s.GetState() == runtimeapi.PodSandboxState_SANDBOX_READY { + if s.State == runtimeapi.PodSandboxState_SANDBOX_READY { readySandboxCount++ } } // Needs to create a new sandbox when readySandboxCount > 1 or the ready sandbox is not the latest one. sandboxStatus := podStatus.SandboxStatuses[0] - if readySandboxCount > 1 || sandboxStatus.GetState() != runtimeapi.PodSandboxState_SANDBOX_READY { + if readySandboxCount > 1 || sandboxStatus.State != runtimeapi.PodSandboxState_SANDBOX_READY { glog.V(2).Infof("No ready sandbox for pod %q can be found. Need to start a new one", format.Pod(pod)) - return true, sandboxStatus.Metadata.GetAttempt() + 1, sandboxStatus.GetId() + return true, sandboxStatus.Metadata.Attempt + 1, sandboxStatus.Id } // Needs to create a new sandbox when network namespace changed. if sandboxStatus.Linux != nil && sandboxStatus.Linux.Namespaces.Options != nil && - sandboxStatus.Linux.Namespaces.Options.GetHostNetwork() != kubecontainer.IsHostNetworkPod(pod) { + sandboxStatus.Linux.Namespaces.Options.HostNetwork != kubecontainer.IsHostNetworkPod(pod) { glog.V(2).Infof("Sandbox for pod %q has changed. Need to start a new one", format.Pod(pod)) - return true, sandboxStatus.Metadata.GetAttempt() + 1, "" + return true, sandboxStatus.Metadata.Attempt + 1, "" } - return false, sandboxStatus.Metadata.GetAttempt(), sandboxStatus.GetId() + return false, sandboxStatus.Metadata.Attempt, sandboxStatus.Id } // checkAndKeepInitContainers keeps all successfully completed init containers. If there @@ -793,10 +794,8 @@ func (m *kubeGenericRuntimeManager) isHostNetwork(podSandBoxID string, pod *v1.P return false, err } - if podStatus.Linux != nil && podStatus.Linux.Namespaces != nil && podStatus.Linux.Namespaces.Options != nil { - if podStatus.Linux.Namespaces.Options.HostNetwork != nil { - return podStatus.Linux.Namespaces.Options.GetHostNetwork(), nil - } + if nsOpts := podStatus.GetLinux().GetNamespaces().GetOptions(); nsOpts != nil { + return nsOpts.HostNetwork, nil } return false, nil @@ -824,7 +823,7 @@ func (m *kubeGenericRuntimeManager) GetPodStatus(uid kubetypes.UID, name, namesp } podFullName := format.Pod(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: namespace, UID: uid, @@ -843,7 +842,7 @@ func (m *kubeGenericRuntimeManager) GetPodStatus(uid kubetypes.UID, name, namesp sandboxStatuses[idx] = podSandboxStatus // Only get pod IP from latest sandbox - if idx == 0 && podSandboxStatus.GetState() == runtimeapi.PodSandboxState_SANDBOX_READY { + if idx == 0 && podSandboxStatus.State == runtimeapi.PodSandboxState_SANDBOX_READY { podIP = m.determinePodSandboxIP(namespace, name, podSandboxStatus) } } @@ -899,7 +898,7 @@ func (m *kubeGenericRuntimeManager) UpdatePodCIDR(podCIDR string) error { return m.runtimeService.UpdateRuntimeConfig( &runtimeapi.RuntimeConfig{ NetworkConfig: &runtimeapi.NetworkConfig{ - PodCidr: &podCIDR, + PodCidr: podCIDR, }, }) } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_manager_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_manager_test.go index 583b46e9..a08b5d55 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_manager_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_manager_test.go @@ -24,8 +24,10 @@ import ( cadvisorapi "github.com/google/cadvisor/info/v1" "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" kubetypes "k8s.io/apimachinery/pkg/types" + "k8s.io/client-go/util/flowcontrol" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/apis/componentconfig" apitest "k8s.io/kubernetes/pkg/kubelet/api/testing" @@ -34,7 +36,6 @@ import ( containertest "k8s.io/kubernetes/pkg/kubelet/container/testing" "k8s.io/kubernetes/pkg/kubelet/network" nettest "k8s.io/kubernetes/pkg/kubelet/network/testing" - "k8s.io/kubernetes/pkg/util/flowcontrol" ) var ( @@ -118,12 +119,12 @@ func makeFakePodSandbox(t *testing.T, m *kubeGenericRuntimeManager, template san podSandboxID := apitest.BuildSandboxName(config.Metadata) return &apitest.FakePodSandbox{ PodSandboxStatus: runtimeapi.PodSandboxStatus{ - Id: &podSandboxID, + Id: podSandboxID, Metadata: config.Metadata, - State: &template.state, - CreatedAt: &template.createdAt, + State: template.state, + CreatedAt: template.createdAt, Network: &runtimeapi.PodSandboxNetworkStatus{ - Ip: &apitest.FakePodSandboxIP, + Ip: apitest.FakePodSandboxIP, }, Labels: config.Labels, }, @@ -150,15 +151,15 @@ func makeFakeContainer(t *testing.T, m *kubeGenericRuntimeManager, template cont podSandboxID := apitest.BuildSandboxName(sandboxConfig.Metadata) containerID := apitest.BuildContainerName(containerConfig.Metadata, podSandboxID) - imageRef := containerConfig.Image.GetImage() + imageRef := containerConfig.Image.Image return &apitest.FakeContainer{ ContainerStatus: runtimeapi.ContainerStatus{ - Id: &containerID, + Id: containerID, Metadata: containerConfig.Metadata, Image: containerConfig.Image, - ImageRef: &imageRef, - CreatedAt: &template.createdAt, - State: &template.state, + ImageRef: imageRef, + CreatedAt: template.createdAt, + State: template.state, Labels: containerConfig.Labels, Annotations: containerConfig.Annotations, }, @@ -187,7 +188,7 @@ func makeTestContainer(name, image string) v1.Container { // makeTestPod creates a test api pod. func makeTestPod(podName, podNamespace, podUID string, containers []v1.Container) *v1.Pod { return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: types.UID(podUID), Name: podName, Namespace: podNamespace, @@ -222,7 +223,7 @@ func verifyPods(a, b []*kubecontainer.Pod) bool { func verifyFakeContainerList(fakeRuntime *apitest.FakeRuntimeService, expected []string) ([]string, bool) { actual := []string{} for _, c := range fakeRuntime.Containers { - actual = append(actual, c.GetId()) + actual = append(actual, c.Id) } sort.Sort(sort.StringSlice(actual)) sort.Sort(sort.StringSlice(expected)) @@ -269,7 +270,7 @@ func TestGetPodStatus(t *testing.T) { }, } pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "12345678", Name: "foo", Namespace: "new", @@ -295,7 +296,7 @@ func TestGetPods(t *testing.T) { assert.NoError(t, err) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "12345678", Name: "foo", Namespace: "new", @@ -371,7 +372,7 @@ func TestGetPodContainerID(t *testing.T) { assert.NoError(t, err) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "12345678", Name: "foo", Namespace: "new", @@ -410,7 +411,7 @@ func TestGetPodContainerID(t *testing.T) { Sandboxes: []*kubecontainer.Container{sandbox}, } actual, err := m.GetPodContainerID(expectedPod) - assert.Equal(t, fakeSandbox.GetId(), actual.ID) + assert.Equal(t, fakeSandbox.Id, actual.ID) } func TestGetNetNS(t *testing.T) { @@ -418,7 +419,7 @@ func TestGetNetNS(t *testing.T) { assert.NoError(t, err) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "12345678", Name: "foo", Namespace: "new", @@ -440,7 +441,7 @@ func TestGetNetNS(t *testing.T) { // Set fake sandbox and fake containers to fakeRuntime. sandbox, _ := makeAndSetFakePod(t, m, fakeRuntime, pod) - actual, err := m.GetNetNS(kubecontainer.ContainerID{ID: sandbox.GetId()}) + actual, err := m.GetNetNS(kubecontainer.ContainerID{ID: sandbox.Id}) assert.Equal(t, "", actual) assert.Equal(t, "not supported", err.Error()) } @@ -450,7 +451,7 @@ func TestKillPod(t *testing.T) { assert.NoError(t, err) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "12345678", Name: "foo", Namespace: "new", @@ -497,7 +498,7 @@ func TestKillPod(t *testing.T) { Sandboxes: []*kubecontainer.Container{ { ID: kubecontainer.ContainerID{ - ID: fakeSandbox.GetId(), + ID: fakeSandbox.Id, Type: apitest.FakeRuntimeName, }, }, @@ -509,10 +510,10 @@ func TestKillPod(t *testing.T) { assert.Equal(t, 2, len(fakeRuntime.Containers)) assert.Equal(t, 1, len(fakeRuntime.Sandboxes)) for _, sandbox := range fakeRuntime.Sandboxes { - assert.Equal(t, runtimeapi.PodSandboxState_SANDBOX_NOTREADY, sandbox.GetState()) + assert.Equal(t, runtimeapi.PodSandboxState_SANDBOX_NOTREADY, sandbox.State) } for _, c := range fakeRuntime.Containers { - assert.Equal(t, runtimeapi.ContainerState_CONTAINER_EXITED, c.GetState()) + assert.Equal(t, runtimeapi.ContainerState_CONTAINER_EXITED, c.State) } } @@ -533,7 +534,7 @@ func TestSyncPod(t *testing.T) { }, } pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "12345678", Name: "foo", Namespace: "new", @@ -550,10 +551,10 @@ func TestSyncPod(t *testing.T) { assert.Equal(t, 2, len(fakeImage.Images)) assert.Equal(t, 1, len(fakeRuntime.Sandboxes)) for _, sandbox := range fakeRuntime.Sandboxes { - assert.Equal(t, runtimeapi.PodSandboxState_SANDBOX_READY, sandbox.GetState()) + assert.Equal(t, runtimeapi.PodSandboxState_SANDBOX_READY, sandbox.State) } for _, c := range fakeRuntime.Containers { - assert.Equal(t, runtimeapi.ContainerState_CONTAINER_RUNNING, c.GetState()) + assert.Equal(t, runtimeapi.ContainerState_CONTAINER_RUNNING, c.State) } } @@ -564,7 +565,7 @@ func TestPruneInitContainers(t *testing.T) { init1 := makeTestContainer("init1", "busybox") init2 := makeTestContainer("init2", "busybox") pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "12345678", Name: "foo", Namespace: "new", @@ -588,7 +589,7 @@ func TestPruneInitContainers(t *testing.T) { keep := map[kubecontainer.ContainerID]int{} m.pruneInitContainersBeforeStart(pod, podStatus, keep) - expectedContainers := []string{fakes[0].GetId(), fakes[2].GetId()} + expectedContainers := []string{fakes[0].Id, fakes[2].Id} if actual, ok := verifyFakeContainerList(fakeRuntime, expectedContainers); !ok { t.Errorf("expected %q, got %q", expectedContainers, actual) } @@ -618,7 +619,7 @@ func TestSyncPodWithInitContainers(t *testing.T) { }, } pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "12345678", Name: "foo", Namespace: "new", @@ -634,11 +635,11 @@ func TestSyncPodWithInitContainers(t *testing.T) { buildContainerID := func(pod *v1.Pod, container v1.Container) string { uid := string(pod.UID) sandboxID := apitest.BuildSandboxName(&runtimeapi.PodSandboxMetadata{ - Name: &pod.Name, - Uid: &uid, - Namespace: &pod.Namespace, + Name: pod.Name, + Uid: uid, + Namespace: pod.Namespace, }) - return apitest.BuildContainerName(&runtimeapi.ContainerMetadata{Name: &container.Name}, sandboxID) + return apitest.BuildContainerName(&runtimeapi.ContainerMetadata{Name: container.Name}, sandboxID) } backOff := flowcontrol.NewBackOff(time.Second, time.Minute) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_sandbox.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_sandbox.go index 2d55ea2f..da25ea4a 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_sandbox.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_sandbox.go @@ -41,7 +41,7 @@ func (m *kubeGenericRuntimeManager) createPodSandbox(pod *v1.Pod, attempt uint32 } // Create pod logs directory - err = m.osInterface.MkdirAll(podSandboxConfig.GetLogDirectory(), 0755) + err = m.osInterface.MkdirAll(podSandboxConfig.LogDirectory, 0755) if err != nil { message := fmt.Sprintf("Create pod log directory for pod %q failed: %v", format.Pod(pod), err) glog.Errorf(message) @@ -65,10 +65,10 @@ func (m *kubeGenericRuntimeManager) generatePodSandboxConfig(pod *v1.Pod, attemp podUID := string(pod.UID) podSandboxConfig := &runtimeapi.PodSandboxConfig{ Metadata: &runtimeapi.PodSandboxMetadata{ - Name: &pod.Name, - Namespace: &pod.Namespace, - Uid: &podUID, - Attempt: &attempt, + Name: pod.Name, + Namespace: pod.Namespace, + Uid: podUID, + Attempt: attempt, }, Labels: newPodLabels(pod), Annotations: newPodAnnotations(pod), @@ -89,11 +89,11 @@ func (m *kubeGenericRuntimeManager) generatePodSandboxConfig(pod *v1.Pod, attemp if err != nil { return nil, err } - podSandboxConfig.Hostname = &hostname + podSandboxConfig.Hostname = hostname } logDir := buildPodLogsDirectory(pod.UID) - podSandboxConfig.LogDirectory = &logDir + podSandboxConfig.LogDirectory = logDir cgroupParent := "" portMappings := []*runtimeapi.PortMapping{} @@ -110,10 +110,10 @@ func (m *kubeGenericRuntimeManager) generatePodSandboxConfig(pod *v1.Pod, attemp containerPort := int32(port.ContainerPort) protocol := toRuntimeProtocol(port.Protocol) portMappings = append(portMappings, &runtimeapi.PortMapping{ - HostIp: &port.HostIP, - HostPort: &hostPort, - ContainerPort: &containerPort, - Protocol: &protocol, + HostIp: port.HostIP, + HostPort: hostPort, + ContainerPort: containerPort, + Protocol: protocol, }) } @@ -131,20 +131,21 @@ func (m *kubeGenericRuntimeManager) generatePodSandboxConfig(pod *v1.Pod, attemp // generatePodSandboxLinuxConfig generates LinuxPodSandboxConfig from v1.Pod. func (m *kubeGenericRuntimeManager) generatePodSandboxLinuxConfig(pod *v1.Pod, cgroupParent string) *runtimeapi.LinuxPodSandboxConfig { lc := &runtimeapi.LinuxPodSandboxConfig{ - SecurityContext: &runtimeapi.LinuxSandboxSecurityContext{}, - } - - if cgroupParent != "" { - lc.CgroupParent = &cgroupParent + CgroupParent: cgroupParent, + SecurityContext: &runtimeapi.LinuxSandboxSecurityContext{ + Privileged: kubecontainer.HasPrivilegedContainer(pod), + }, } if pod.Spec.SecurityContext != nil { sc := pod.Spec.SecurityContext - lc.SecurityContext.RunAsUser = sc.RunAsUser + if sc.RunAsUser != nil { + lc.SecurityContext.RunAsUser = &runtimeapi.Int64Value{Value: *sc.RunAsUser} + } lc.SecurityContext.NamespaceOptions = &runtimeapi.NamespaceOption{ - HostNetwork: &pod.Spec.HostNetwork, - HostIpc: &pod.Spec.HostIPC, - HostPid: &pod.Spec.HostPID, + HostNetwork: pod.Spec.HostNetwork, + HostIpc: pod.Spec.HostIPC, + HostPid: pod.Spec.HostPID, } if sc.FSGroup != nil { @@ -158,19 +159,14 @@ func (m *kubeGenericRuntimeManager) generatePodSandboxLinuxConfig(pod *v1.Pod, c } if sc.SELinuxOptions != nil { lc.SecurityContext.SelinuxOptions = &runtimeapi.SELinuxOption{ - User: &sc.SELinuxOptions.User, - Role: &sc.SELinuxOptions.Role, - Type: &sc.SELinuxOptions.Type, - Level: &sc.SELinuxOptions.Level, + User: sc.SELinuxOptions.User, + Role: sc.SELinuxOptions.Role, + Type: sc.SELinuxOptions.Type, + Level: sc.SELinuxOptions.Level, } } } - if kubecontainer.HasPrivilegedContainer(pod) { - privileged := true - lc.SecurityContext.Privileged = &privileged - } - return lc } @@ -180,7 +176,9 @@ func (m *kubeGenericRuntimeManager) getKubeletSandboxes(all bool) ([]*runtimeapi if !all { readyState := runtimeapi.PodSandboxState_SANDBOX_READY filter = &runtimeapi.PodSandboxFilter{ - State: &readyState, + State: &runtimeapi.PodSandboxStateValue{ + State: readyState, + }, } } @@ -194,7 +192,7 @@ func (m *kubeGenericRuntimeManager) getKubeletSandboxes(all bool) ([]*runtimeapi for _, s := range resp { if !isManagedByKubelet(s.Labels) { glog.V(5).Infof("Sandbox %s is not managed by kubelet", kubecontainer.BuildPodFullName( - s.Metadata.GetName(), s.Metadata.GetNamespace())) + s.Metadata.Name, s.Metadata.Namespace)) continue } @@ -210,7 +208,7 @@ func (m *kubeGenericRuntimeManager) determinePodSandboxIP(podNamespace, podName glog.Warningf("Pod Sandbox status doesn't have network information, cannot report IP") return "" } - ip := podSandbox.Network.GetIp() + ip := podSandbox.Network.Ip if net.ParseIP(ip) == nil { glog.Warningf("Pod Sandbox reported an unparseable IP %v", ip) return "" @@ -222,9 +220,13 @@ func (m *kubeGenericRuntimeManager) determinePodSandboxIP(podNamespace, podName // Param state could be nil in order to get all sandboxes belonging to same pod. func (m *kubeGenericRuntimeManager) getSandboxIDByPodUID(podUID kubetypes.UID, state *runtimeapi.PodSandboxState) ([]string, error) { filter := &runtimeapi.PodSandboxFilter{ - State: state, LabelSelector: map[string]string{types.KubernetesPodUIDLabel: string(podUID)}, } + if state != nil { + filter.State = &runtimeapi.PodSandboxStateValue{ + State: *state, + } + } sandboxes, err := m.runtimeService.ListPodSandbox(filter) if err != nil { glog.Errorf("ListPodSandbox with pod UID %q failed: %v", podUID, err) @@ -239,7 +241,7 @@ func (m *kubeGenericRuntimeManager) getSandboxIDByPodUID(podUID kubetypes.UID, s sandboxIDs := make([]string, len(sandboxes)) sort.Sort(podSandboxByCreated(sandboxes)) for i, s := range sandboxes { - sandboxIDs[i] = s.GetId() + sandboxIDs[i] = s.Id } return sandboxIDs, nil @@ -256,11 +258,11 @@ func (m *kubeGenericRuntimeManager) GetPortForward(podName, podNamespace string, } // TODO: Port is unused for now, but we may need it in the future. req := &runtimeapi.PortForwardRequest{ - PodSandboxId: &sandboxIDs[0], + PodSandboxId: sandboxIDs[0], } resp, err := m.runtimeService.PortForward(req) if err != nil { return nil, err } - return url.Parse(resp.GetUrl()) + return url.Parse(resp.Url) } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_sandbox_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_sandbox_test.go index 4e19dc11..773421ee 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_sandbox_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_sandbox_test.go @@ -22,6 +22,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" runtimeapi "k8s.io/kubernetes/pkg/kubelet/api/v1alpha1/runtime" containertest "k8s.io/kubernetes/pkg/kubelet/container/testing" @@ -31,7 +32,7 @@ import ( func TestCreatePodSandbox(t *testing.T) { fakeRuntime, _, m, err := createTestRuntimeManager() pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "12345678", Name: "bar", Namespace: "new", @@ -57,7 +58,7 @@ func TestCreatePodSandbox(t *testing.T) { id, _, err := m.createPodSandbox(pod, 1) assert.NoError(t, err) fakeRuntime.AssertCalls([]string{"RunPodSandbox"}) - sandboxes, err := fakeRuntime.ListPodSandbox(&runtimeapi.PodSandboxFilter{Id: &id}) + sandboxes, err := fakeRuntime.ListPodSandbox(&runtimeapi.PodSandboxFilter{Id: id}) assert.NoError(t, err) assert.Equal(t, len(sandboxes), 1) // TODO Check pod sandbox configuration diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/labels.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/labels.go index 5092fe7c..ccd0dc99 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/labels.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/labels.go @@ -29,16 +29,16 @@ import ( ) const ( - // TODO: move those label definitions to kubelet/types/labels.go // TODO: change those label names to follow kubernetes's format podDeletionGracePeriodLabel = "io.kubernetes.pod.deletionGracePeriod" podTerminationGracePeriodLabel = "io.kubernetes.pod.terminationGracePeriod" - containerHashLabel = "io.kubernetes.container.hash" - containerRestartCountLabel = "io.kubernetes.container.restartCount" - containerTerminationMessagePathLabel = "io.kubernetes.container.terminationMessagePath" - containerPreStopHandlerLabel = "io.kubernetes.container.preStopHandler" - containerPortsLabel = "io.kubernetes.container.ports" + containerHashLabel = "io.kubernetes.container.hash" + containerRestartCountLabel = "io.kubernetes.container.restartCount" + containerTerminationMessagePathLabel = "io.kubernetes.container.terminationMessagePath" + containerTerminationMessagePolicyLabel = "io.kubernetes.container.terminationMessagePolicy" + containerPreStopHandlerLabel = "io.kubernetes.container.preStopHandler" + containerPortsLabel = "io.kubernetes.container.ports" // kubernetesManagedLabel is used to distinguish whether a container/sandbox is managed by kubelet or not kubernetesManagedLabel = "io.kubernetes.managed" @@ -70,6 +70,7 @@ type annotatedContainerInfo struct { PodDeletionGracePeriod *int64 PodTerminationGracePeriod *int64 TerminationMessagePath string + TerminationMessagePolicy v1.TerminationMessagePolicy PreStopHandler *v1.Handler ContainerPorts []v1.ContainerPort } @@ -114,6 +115,7 @@ func newContainerAnnotations(container *v1.Container, pod *v1.Pod, restartCount annotations[containerHashLabel] = strconv.FormatUint(kubecontainer.HashContainer(container), 16) annotations[containerRestartCountLabel] = strconv.Itoa(restartCount) annotations[containerTerminationMessagePathLabel] = container.TerminationMessagePath + annotations[containerTerminationMessagePolicyLabel] = string(container.TerminationMessagePolicy) if pod.DeletionGracePeriodSeconds != nil { annotations[podDeletionGracePeriodLabel] = strconv.FormatInt(*pod.DeletionGracePeriodSeconds, 10) @@ -193,7 +195,8 @@ func isManagedByKubelet(labels map[string]string) bool { func getContainerInfoFromAnnotations(annotations map[string]string) *annotatedContainerInfo { var err error containerInfo := &annotatedContainerInfo{ - TerminationMessagePath: getStringValueFromLabel(annotations, containerTerminationMessagePathLabel), + TerminationMessagePath: getStringValueFromLabel(annotations, containerTerminationMessagePathLabel), + TerminationMessagePolicy: v1.TerminationMessagePolicy(getStringValueFromLabel(annotations, containerTerminationMessagePolicyLabel)), } if containerInfo.Hash, err = getUint64ValueFromLabel(annotations, containerHashLabel); err != nil { diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/labels_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/labels_test.go index 5c52ec49..d4c03db6 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/labels_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/labels_test.go @@ -20,6 +20,7 @@ import ( "reflect" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" "k8s.io/kubernetes/pkg/util/intstr" @@ -51,7 +52,7 @@ func TestContainerLabels(t *testing.T) { Lifecycle: lifecycle, } pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test_pod", Namespace: "test_pod_namespace", UID: "test_pod_uid", @@ -119,7 +120,7 @@ func TestContainerAnnotations(t *testing.T) { Lifecycle: lifecycle, } pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test_pod", Namespace: "test_pod_namespace", UID: "test_pod_uid", @@ -166,7 +167,7 @@ func TestContainerAnnotations(t *testing.T) { func TestPodLabels(t *testing.T) { pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test_pod", Namespace: "test_pod_namespace", UID: "test_pod_uid", @@ -193,7 +194,7 @@ func TestPodLabels(t *testing.T) { func TestPodAnnotations(t *testing.T) { pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test_pod", Namespace: "test_pod_namespace", UID: "test_pod_uid", diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/security_context.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/security_context.go index a6cba72f..4ccbe1a4 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/security_context.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/security_context.go @@ -25,7 +25,7 @@ import ( ) // determineEffectiveSecurityContext gets container's security context from v1.Pod and v1.Container. -func (m *kubeGenericRuntimeManager) determineEffectiveSecurityContext(pod *v1.Pod, container *v1.Container, uid *int64, username *string) *runtimeapi.LinuxContainerSecurityContext { +func (m *kubeGenericRuntimeManager) determineEffectiveSecurityContext(pod *v1.Pod, container *v1.Container, uid *int64, username string) *runtimeapi.LinuxContainerSecurityContext { effectiveSc := securitycontext.DetermineEffectiveSecurityContext(pod, container) synthesized := convertToRuntimeSecurityContext(effectiveSc) if synthesized == nil { @@ -34,7 +34,9 @@ func (m *kubeGenericRuntimeManager) determineEffectiveSecurityContext(pod *v1.Po // set RunAsUser. if synthesized.RunAsUser == nil { - synthesized.RunAsUser = uid + if uid != nil { + synthesized.RunAsUser = &runtimeapi.Int64Value{Value: *uid} + } synthesized.RunAsUsername = username } @@ -44,9 +46,9 @@ func (m *kubeGenericRuntimeManager) determineEffectiveSecurityContext(pod *v1.Po return synthesized } synthesized.NamespaceOptions = &runtimeapi.NamespaceOption{ - HostNetwork: &pod.Spec.HostNetwork, - HostIpc: &pod.Spec.HostIPC, - HostPid: &pod.Spec.HostPID, + HostNetwork: pod.Spec.HostNetwork, + HostIpc: pod.Spec.HostIPC, + HostPid: pod.Spec.HostPID, } if podSc.FSGroup != nil { synthesized.SupplementalGroups = append(synthesized.SupplementalGroups, *podSc.FSGroup) @@ -88,13 +90,21 @@ func convertToRuntimeSecurityContext(securityContext *v1.SecurityContext) *runti return nil } - return &runtimeapi.LinuxContainerSecurityContext{ - RunAsUser: securityContext.RunAsUser, - Privileged: securityContext.Privileged, - ReadonlyRootfs: securityContext.ReadOnlyRootFilesystem, + sc := &runtimeapi.LinuxContainerSecurityContext{ Capabilities: convertToRuntimeCapabilities(securityContext.Capabilities), SelinuxOptions: convertToRuntimeSELinuxOption(securityContext.SELinuxOptions), } + if securityContext.RunAsUser != nil { + sc.RunAsUser = &runtimeapi.Int64Value{Value: *securityContext.RunAsUser} + } + if securityContext.Privileged != nil { + sc.Privileged = *securityContext.Privileged + } + if securityContext.ReadOnlyRootFilesystem != nil { + sc.ReadonlyRootfs = *securityContext.ReadOnlyRootFilesystem + } + + return sc } // convertToRuntimeSELinuxOption converts v1.SELinuxOptions to runtimeapi.SELinuxOption. @@ -104,10 +114,10 @@ func convertToRuntimeSELinuxOption(opts *v1.SELinuxOptions) *runtimeapi.SELinuxO } return &runtimeapi.SELinuxOption{ - User: &opts.User, - Role: &opts.Role, - Type: &opts.Type, - Level: &opts.Level, + User: opts.User, + Role: opts.Role, + Type: opts.Type, + Level: opts.Level, } } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/network/cni/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/network/cni/BUILD index 2b3c0c66..c3dbf3b9 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/network/cni/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/network/cni/BUILD @@ -38,9 +38,9 @@ go_test( "//pkg/kubelet/network:go_default_library", "//pkg/kubelet/network/cni/testing:go_default_library", "//pkg/util/exec:go_default_library", - "//pkg/util/testing:go_default_library", "//vendor:github.com/containernetworking/cni/pkg/types", "//vendor:github.com/stretchr/testify/mock", + "//vendor:k8s.io/client-go/util/testing", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/network/cni/cni_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/network/cni/cni_test.go index d0c48580..c2c8a1e7 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/network/cni/cni_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/network/cni/cni_test.go @@ -31,6 +31,7 @@ import ( cnitypes "github.com/containernetworking/cni/pkg/types" "github.com/stretchr/testify/mock" + utiltesting "k8s.io/client-go/util/testing" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/apis/componentconfig" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" @@ -39,7 +40,6 @@ import ( "k8s.io/kubernetes/pkg/kubelet/network" "k8s.io/kubernetes/pkg/kubelet/network/cni/testing" utilexec "k8s.io/kubernetes/pkg/util/exec" - utiltesting "k8s.io/kubernetes/pkg/util/testing" ) func installPluginUnderTest(t *testing.T, testVendorCNIDirPrefix, testNetworkConfigPath, vendorName string, plugName string) { diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/network/hostport/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/network/hostport/BUILD index 46b5919c..400588bb 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/network/hostport/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/network/hostport/BUILD @@ -35,6 +35,7 @@ go_test( "//pkg/api/v1:go_default_library", "//pkg/kubelet/container:go_default_library", "//pkg/util/iptables:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/network/hostport/hostport_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/network/hostport/hostport_test.go index 3680ec60..84932305 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/network/hostport/hostport_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/network/hostport/hostport_test.go @@ -23,6 +23,7 @@ import ( "strings" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" utiliptables "k8s.io/kubernetes/pkg/util/iptables" @@ -69,9 +70,9 @@ func TestOpenPodHostports(t *testing.T) { // New pod that we are going to add { &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test-pod", - Namespace: v1.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, Spec: v1.PodSpec{ Containers: []v1.Container{{ @@ -124,9 +125,9 @@ func TestOpenPodHostports(t *testing.T) { // Already running pod { &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "another-test-pod", - Namespace: v1.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, Spec: v1.PodSpec{ Containers: []v1.Container{{ diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/pleg/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/pleg/BUILD index d3be41ed..041a0664 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/pleg/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/pleg/BUILD @@ -19,11 +19,11 @@ go_library( deps = [ "//pkg/kubelet/container:go_default_library", "//pkg/kubelet/metrics:go_default_library", - "//pkg/util/clock:go_default_library", "//vendor:github.com/golang/glog", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/sets", "//vendor:k8s.io/apimachinery/pkg/util/wait", + "//vendor:k8s.io/client-go/util/clock", ], ) @@ -35,10 +35,10 @@ go_test( deps = [ "//pkg/kubelet/container:go_default_library", "//pkg/kubelet/container/testing:go_default_library", - "//pkg/util/clock:go_default_library", "//vendor:github.com/stretchr/testify/assert", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/diff", + "//vendor:k8s.io/client-go/util/clock", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/pleg/generic.go b/vendor/k8s.io/kubernetes/pkg/kubelet/pleg/generic.go index 3215b14e..4f6e66b0 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/pleg/generic.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/pleg/generic.go @@ -25,9 +25,9 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/client-go/util/clock" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" "k8s.io/kubernetes/pkg/kubelet/metrics" - "k8s.io/kubernetes/pkg/util/clock" ) // GenericPLEG is an extremely simple generic PLEG that relies solely on diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/pleg/generic_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/pleg/generic_test.go index 9fa15d99..36df3460 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/pleg/generic_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/pleg/generic_test.go @@ -27,9 +27,9 @@ import ( "github.com/stretchr/testify/assert" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/diff" + "k8s.io/client-go/util/clock" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" containertest "k8s.io/kubernetes/pkg/kubelet/container/testing" - "k8s.io/kubernetes/pkg/util/clock" ) const ( diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/pod/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/pod/BUILD index d0591326..7bb5c058 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/pod/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/pod/BUILD @@ -19,9 +19,11 @@ go_library( "//pkg/api/v1:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", "//pkg/kubelet/container:go_default_library", + "//pkg/kubelet/secret:go_default_library", "//pkg/kubelet/types:go_default_library", "//vendor:github.com/golang/glog", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", ], ) @@ -38,7 +40,9 @@ go_test( "//pkg/api/v1:go_default_library", "//pkg/kubelet/container:go_default_library", "//pkg/kubelet/pod/testing:go_default_library", + "//pkg/kubelet/secret:go_default_library", "//pkg/kubelet/types:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/pod/mirror_client.go b/vendor/k8s.io/kubernetes/pkg/kubelet/pod/mirror_client.go index 59d4e9e6..1c2107a3 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/pod/mirror_client.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/pod/mirror_client.go @@ -19,6 +19,7 @@ package pod import ( "github.com/golang/glog" "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" @@ -83,7 +84,7 @@ func (mc *basicMirrorClient) DeleteMirrorPod(podFullName string) error { } glog.V(2).Infof("Deleting a mirror pod %q", podFullName) // TODO(random-liu): Delete the mirror pod with uid precondition in mirror pod manager - if err := mc.apiserverClient.Core().Pods(namespace).Delete(name, v1.NewDeleteOptions(0)); err != nil && !errors.IsNotFound(err) { + if err := mc.apiserverClient.Core().Pods(namespace).Delete(name, metav1.NewDeleteOptions(0)); err != nil && !errors.IsNotFound(err) { glog.Errorf("Failed deleting a mirror pod %q: %v", podFullName, err) } return nil diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/pod/pod_manager.go b/vendor/k8s.io/kubernetes/pkg/kubelet/pod/pod_manager.go index e02d09dc..dd069b0f 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/pod/pod_manager.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/pod/pod_manager.go @@ -22,6 +22,7 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api/v1" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" + "k8s.io/kubernetes/pkg/kubelet/secret" ) // Manager stores and manages access to pods, maintaining the mappings @@ -112,13 +113,17 @@ type basicManager struct { // Mirror pod UID to pod UID map. translationByUID map[types.UID]types.UID + // basicManager is keeping secretManager up-to-date. + secretManager secret.Manager + // A mirror pod client to create/delete mirror pods. MirrorClient } // NewBasicPodManager returns a functional Manager. -func NewBasicPodManager(client MirrorClient) Manager { +func NewBasicPodManager(client MirrorClient, secretManager secret.Manager) Manager { pm := &basicManager{} + pm.secretManager = secretManager pm.MirrorClient = client pm.SetPods(nil) return pm @@ -153,6 +158,11 @@ func (pm *basicManager) UpdatePod(pod *v1.Pod) { // lock. func (pm *basicManager) updatePodsInternal(pods ...*v1.Pod) { for _, pod := range pods { + if pm.secretManager != nil { + // TODO: Consider detecting only status update and in such case do + // not register pod, as it doesn't really matter. + pm.secretManager.RegisterPod(pod) + } podFullName := kubecontainer.GetPodFullName(pod) if IsMirrorPod(pod) { pm.mirrorPodByUID[pod.UID] = pod @@ -173,6 +183,9 @@ func (pm *basicManager) updatePodsInternal(pods ...*v1.Pod) { func (pm *basicManager) DeletePod(pod *v1.Pod) { pm.lock.Lock() defer pm.lock.Unlock() + if pm.secretManager != nil { + pm.secretManager.UnregisterPod(pod) + } podFullName := kubecontainer.GetPodFullName(pod) if IsMirrorPod(pod) { delete(pm.mirrorPodByUID, pod.UID) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/pod/pod_manager_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/pod/pod_manager_test.go index c50e2e4a..06dab024 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/pod/pod_manager_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/pod/pod_manager_test.go @@ -20,16 +20,19 @@ import ( "reflect" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api/v1" podtest "k8s.io/kubernetes/pkg/kubelet/pod/testing" + "k8s.io/kubernetes/pkg/kubelet/secret" kubetypes "k8s.io/kubernetes/pkg/kubelet/types" ) // Stub out mirror client for testing purpose. func newTestManager() (*basicManager, *podtest.FakeMirrorClient) { fakeMirrorClient := podtest.NewFakeMirrorClient() - manager := NewBasicPodManager(fakeMirrorClient).(*basicManager) + secretManager := secret.NewFakeManager() + manager := NewBasicPodManager(fakeMirrorClient, secretManager).(*basicManager) return manager, fakeMirrorClient } @@ -37,7 +40,7 @@ func newTestManager() (*basicManager, *podtest.FakeMirrorClient) { // methods work correctly. func TestGetSetPods(t *testing.T) { mirrorPod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "987654321", Name: "bar", Namespace: "default", @@ -48,7 +51,7 @@ func TestGetSetPods(t *testing.T) { }, } staticPod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "123456789", Name: "bar", Namespace: "default", @@ -58,7 +61,7 @@ func TestGetSetPods(t *testing.T) { expectedPods := []*v1.Pod{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "999999999", Name: "taco", Namespace: "default", @@ -112,10 +115,10 @@ func TestGetSetPods(t *testing.T) { func TestDeletePods(t *testing.T) { mirrorPod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: types.UID("mirror-pod-uid"), Name: "mirror-static-pod-name", - Namespace: v1.NamespaceDefault, + Namespace: metav1.NamespaceDefault, Annotations: map[string]string{ kubetypes.ConfigSourceAnnotationKey: "api", kubetypes.ConfigMirrorAnnotationKey: "mirror", @@ -123,20 +126,20 @@ func TestDeletePods(t *testing.T) { }, } staticPod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: types.UID("static-pod-uid"), Name: "mirror-static-pod-name", - Namespace: v1.NamespaceDefault, + Namespace: metav1.NamespaceDefault, Annotations: map[string]string{kubetypes.ConfigSourceAnnotationKey: "file"}, }, } expectedPods := []*v1.Pod{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: types.UID("extra-pod-uid"), Name: "extra-pod-name", - Namespace: v1.NamespaceDefault, + Namespace: metav1.NamespaceDefault, Annotations: map[string]string{kubetypes.ConfigSourceAnnotationKey: "api"}, }, }, diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/pod_workers_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/pod_workers_test.go index 9829514e..f337dd24 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/pod_workers_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/pod_workers_test.go @@ -22,14 +22,15 @@ import ( "testing" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" + "k8s.io/client-go/util/clock" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/record" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" containertest "k8s.io/kubernetes/pkg/kubelet/container/testing" kubetypes "k8s.io/kubernetes/pkg/kubelet/types" "k8s.io/kubernetes/pkg/kubelet/util/queue" - "k8s.io/kubernetes/pkg/util/clock" ) // fakePodWorkers runs sync pod function in serial, so we can have @@ -66,7 +67,7 @@ type TestingInterface interface { func newPod(uid, name string) *v1.Pod { return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: types.UID(uid), Name: name, }, diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/prober/common_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/prober/common_test.go index f5e69428..2dcc972c 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/prober/common_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/prober/common_test.go @@ -98,7 +98,7 @@ func setTestProbe(pod *v1.Pod, probeType probeType, probeSpec v1.Probe) { func newTestManager() *manager { refManager := kubecontainer.NewRefManager() refManager.SetRef(testContainerID, &v1.ObjectReference{}) // Suppress prober warnings. - podManager := kubepod.NewBasicPodManager(nil) + podManager := kubepod.NewBasicPodManager(nil, nil) // Add test pod to pod manager, so that status manager can get the pod from pod manager if needed. podManager.AddPod(getTestPod()) m := NewManager( diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/prober/prober_manager_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/prober/prober_manager_test.go index a0077ac8..6634f4a2 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/prober/prober_manager_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/prober/prober_manager_test.go @@ -23,6 +23,7 @@ import ( "time" "github.com/golang/glog" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/wait" @@ -48,7 +49,7 @@ var defaultProbe *v1.Probe = &v1.Probe{ func TestAddRemovePods(t *testing.T) { noProbePod := v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "no_probe_pod", }, Spec: v1.PodSpec{ @@ -61,7 +62,7 @@ func TestAddRemovePods(t *testing.T) { } probePod := v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "probe_pod", }, Spec: v1.PodSpec{ @@ -127,7 +128,7 @@ func TestCleanupPods(t *testing.T) { m := newTestManager() defer cleanup(t, m) podToCleanup := v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "pod_cleanup", }, Spec: v1.PodSpec{ @@ -141,7 +142,7 @@ func TestCleanupPods(t *testing.T) { }, } podToKeep := v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "pod_keep", }, Spec: v1.PodSpec{ diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/prober/results/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/prober/results/BUILD index 19fd6211..91dd8df7 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/prober/results/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/prober/results/BUILD @@ -28,6 +28,7 @@ go_test( "//pkg/api/v1:go_default_library", "//pkg/kubelet/container:go_default_library", "//vendor:github.com/stretchr/testify/assert", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/util/wait", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/prober/results/results_manager_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/prober/results/results_manager_test.go index 444fb4d0..b892fec1 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/prober/results/results_manager_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/prober/results/results_manager_test.go @@ -21,6 +21,7 @@ import ( "time" "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/kubernetes/pkg/api/v1" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" @@ -48,7 +49,7 @@ func TestCacheOperations(t *testing.T) { func TestUpdates(t *testing.T) { m := NewManager() - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "test-pod"}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "test-pod"}} fooID := kubecontainer.ContainerID{Type: "test", ID: "foo"} barID := kubecontainer.ContainerID{Type: "test", ID: "bar"} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/prober/worker_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/prober/worker_test.go index 41fe42e8..590756a3 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/prober/worker_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/prober/worker_test.go @@ -117,7 +117,7 @@ func TestDoProbe(t *testing.T) { } // Clean up. - m.statusManager = status.NewManager(&fake.Clientset{}, kubepod.NewBasicPodManager(nil)) + m.statusManager = status.NewManager(&fake.Clientset{}, kubepod.NewBasicPodManager(nil, nil)) resultsManager(m, probeType).Remove(testContainerID) } } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/qos/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/qos/BUILD index 0a79e886..24dfd9f0 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/qos/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/qos/BUILD @@ -37,6 +37,7 @@ go_test( "//pkg/api/resource:go_default_library", "//pkg/api/v1:go_default_library", "//pkg/kubelet/types:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/qos/policy_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/qos/policy_test.go index e878d778..707727e0 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/qos/policy_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/qos/policy_test.go @@ -20,6 +20,7 @@ import ( "strconv" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" kubetypes "k8s.io/kubernetes/pkg/kubelet/types" @@ -137,7 +138,7 @@ var ( }, } criticalPodWithNoLimit = v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ kubetypes.CriticalPodAnnotationKey: "", }, diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/qos/qos_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/qos/qos_test.go index 939ff855..61f50c5b 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/qos/qos_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/qos/qos_test.go @@ -19,6 +19,7 @@ package qos import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" ) @@ -55,7 +56,7 @@ func newContainer(name string, requests v1.ResourceList, limits v1.ResourceList) func newPod(name string, containers []v1.Container) *v1.Pod { return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Spec: v1.PodSpec{ diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/remote/OWNERS b/vendor/k8s.io/kubernetes/pkg/kubelet/remote/OWNERS index 208c3e0a..30afd244 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/remote/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/remote/OWNERS @@ -1,2 +1,2 @@ -assignees: - - feiskyer +approvers: +- feiskyer diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/remote/remote_image.go b/vendor/k8s.io/kubernetes/pkg/kubelet/remote/remote_image.go index 31faac8e..ed5d5a39 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/remote/remote_image.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/remote/remote_image.go @@ -71,7 +71,7 @@ func (r *RemoteImageService) ImageStatus(image *runtimeapi.ImageSpec) (*runtimea Image: image, }) if err != nil { - glog.Errorf("ImageStatus %q from image service failed: %v", image.GetImage(), err) + glog.Errorf("ImageStatus %q from image service failed: %v", image.Image, err) return nil, err } @@ -88,11 +88,11 @@ func (r *RemoteImageService) PullImage(image *runtimeapi.ImageSpec, auth *runtim Auth: auth, }) if err != nil { - glog.Errorf("PullImage %q from image service failed: %v", image.GetImage(), err) + glog.Errorf("PullImage %q from image service failed: %v", image.Image, err) return "", err } - return resp.GetImageRef(), nil + return resp.ImageRef, nil } // RemoveImage removes the image. @@ -104,7 +104,7 @@ func (r *RemoteImageService) RemoveImage(image *runtimeapi.ImageSpec) error { Image: image, }) if err != nil { - glog.Errorf("RemoveImage %q from image service failed: %v", image.GetImage(), err) + glog.Errorf("RemoveImage %q from image service failed: %v", image.Image, err) return err } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/remote/remote_runtime.go b/vendor/k8s.io/kubernetes/pkg/kubelet/remote/remote_runtime.go index 68b9951e..006d87b2 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/remote/remote_runtime.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/remote/remote_runtime.go @@ -55,7 +55,7 @@ func (r *RemoteRuntimeService) Version(apiVersion string) (*runtimeapi.VersionRe defer cancel() typedVersion, err := r.runtimeClient.Version(ctx, &runtimeapi.VersionRequest{ - Version: &apiVersion, + Version: apiVersion, }) if err != nil { glog.Errorf("Version from runtime service failed: %v", err) @@ -79,7 +79,7 @@ func (r *RemoteRuntimeService) RunPodSandbox(config *runtimeapi.PodSandboxConfig return "", err } - return resp.GetPodSandboxId(), nil + return resp.PodSandboxId, nil } // StopPodSandbox stops the sandbox. If there are any running containers in the @@ -89,7 +89,7 @@ func (r *RemoteRuntimeService) StopPodSandbox(podSandBoxID string) error { defer cancel() _, err := r.runtimeClient.StopPodSandbox(ctx, &runtimeapi.StopPodSandboxRequest{ - PodSandboxId: &podSandBoxID, + PodSandboxId: podSandBoxID, }) if err != nil { glog.Errorf("StopPodSandbox %q from runtime service failed: %v", podSandBoxID, err) @@ -106,7 +106,7 @@ func (r *RemoteRuntimeService) RemovePodSandbox(podSandBoxID string) error { defer cancel() _, err := r.runtimeClient.RemovePodSandbox(ctx, &runtimeapi.RemovePodSandboxRequest{ - PodSandboxId: &podSandBoxID, + PodSandboxId: podSandBoxID, }) if err != nil { glog.Errorf("RemovePodSandbox %q from runtime service failed: %v", podSandBoxID, err) @@ -122,7 +122,7 @@ func (r *RemoteRuntimeService) PodSandboxStatus(podSandBoxID string) (*runtimeap defer cancel() resp, err := r.runtimeClient.PodSandboxStatus(ctx, &runtimeapi.PodSandboxStatusRequest{ - PodSandboxId: &podSandBoxID, + PodSandboxId: podSandBoxID, }) if err != nil { glog.Errorf("PodSandboxStatus %q from runtime service failed: %v", podSandBoxID, err) @@ -154,7 +154,7 @@ func (r *RemoteRuntimeService) CreateContainer(podSandBoxID string, config *runt defer cancel() resp, err := r.runtimeClient.CreateContainer(ctx, &runtimeapi.CreateContainerRequest{ - PodSandboxId: &podSandBoxID, + PodSandboxId: podSandBoxID, Config: config, SandboxConfig: sandboxConfig, }) @@ -163,7 +163,7 @@ func (r *RemoteRuntimeService) CreateContainer(podSandBoxID string, config *runt return "", err } - return resp.GetContainerId(), nil + return resp.ContainerId, nil } // StartContainer starts the container. @@ -172,7 +172,7 @@ func (r *RemoteRuntimeService) StartContainer(containerID string) error { defer cancel() _, err := r.runtimeClient.StartContainer(ctx, &runtimeapi.StartContainerRequest{ - ContainerId: &containerID, + ContainerId: containerID, }) if err != nil { glog.Errorf("StartContainer %q from runtime service failed: %v", containerID, err) @@ -188,8 +188,8 @@ func (r *RemoteRuntimeService) StopContainer(containerID string, timeout int64) defer cancel() _, err := r.runtimeClient.StopContainer(ctx, &runtimeapi.StopContainerRequest{ - ContainerId: &containerID, - Timeout: &timeout, + ContainerId: containerID, + Timeout: timeout, }) if err != nil { glog.Errorf("StopContainer %q from runtime service failed: %v", containerID, err) @@ -206,7 +206,7 @@ func (r *RemoteRuntimeService) RemoveContainer(containerID string) error { defer cancel() _, err := r.runtimeClient.RemoveContainer(ctx, &runtimeapi.RemoveContainerRequest{ - ContainerId: &containerID, + ContainerId: containerID, }) if err != nil { glog.Errorf("RemoveContainer %q from runtime service failed: %v", containerID, err) @@ -238,7 +238,7 @@ func (r *RemoteRuntimeService) ContainerStatus(containerID string) (*runtimeapi. defer cancel() resp, err := r.runtimeClient.ContainerStatus(ctx, &runtimeapi.ContainerStatusRequest{ - ContainerId: &containerID, + ContainerId: containerID, }) if err != nil { glog.Errorf("ContainerStatus %q from runtime service failed: %v", containerID, err) @@ -256,9 +256,9 @@ func (r *RemoteRuntimeService) ExecSync(containerID string, cmd []string, timeou timeoutSeconds := int64(timeout.Seconds()) req := &runtimeapi.ExecSyncRequest{ - ContainerId: &containerID, + ContainerId: containerID, Cmd: cmd, - Timeout: &timeoutSeconds, + Timeout: timeoutSeconds, } resp, err := r.runtimeClient.ExecSync(ctx, req) if err != nil { @@ -267,14 +267,14 @@ func (r *RemoteRuntimeService) ExecSync(containerID string, cmd []string, timeou } err = nil - if resp.GetExitCode() != 0 { + if resp.ExitCode != 0 { err = utilexec.CodeExitError{ - Err: fmt.Errorf("command '%s' exited with %d: %s", strings.Join(cmd, " "), resp.GetExitCode(), resp.GetStderr()), - Code: int(resp.GetExitCode()), + Err: fmt.Errorf("command '%s' exited with %d: %s", strings.Join(cmd, " "), resp.ExitCode, resp.Stderr), + Code: int(resp.ExitCode), } } - return resp.GetStdout(), resp.GetStderr(), err + return resp.Stdout, resp.Stderr, err } // Exec prepares a streaming endpoint to execute a command in the container, and returns the address. @@ -284,7 +284,7 @@ func (r *RemoteRuntimeService) Exec(req *runtimeapi.ExecRequest) (*runtimeapi.Ex resp, err := r.runtimeClient.Exec(ctx, req) if err != nil { - glog.Errorf("Exec %s '%s' from runtime service failed: %v", req.GetContainerId(), strings.Join(req.GetCmd(), " "), err) + glog.Errorf("Exec %s '%s' from runtime service failed: %v", req.ContainerId, strings.Join(req.Cmd, " "), err) return nil, err } @@ -298,7 +298,7 @@ func (r *RemoteRuntimeService) Attach(req *runtimeapi.AttachRequest) (*runtimeap resp, err := r.runtimeClient.Attach(ctx, req) if err != nil { - glog.Errorf("Attach %s from runtime service failed: %v", req.GetContainerId(), err) + glog.Errorf("Attach %s from runtime service failed: %v", req.ContainerId, err) return nil, err } @@ -312,7 +312,7 @@ func (r *RemoteRuntimeService) PortForward(req *runtimeapi.PortForwardRequest) ( resp, err := r.runtimeClient.PortForward(ctx, req) if err != nil { - glog.Errorf("PortForward %s from runtime service failed: %v", req.GetPodSandboxId(), err) + glog.Errorf("PortForward %s from runtime service failed: %v", req.PodSandboxId, err) return nil, err } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/rkt/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/rkt/BUILD index f48f94cd..b192bdfb 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/rkt/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/rkt/BUILD @@ -38,7 +38,6 @@ go_library( "//pkg/kubelet/util/format:go_default_library", "//pkg/securitycontext:go_default_library", "//pkg/util/exec:go_default_library", - "//pkg/util/flowcontrol:go_default_library", "//pkg/util/parsers:go_default_library", "//pkg/util/selinux:go_default_library", "//pkg/util/strings:go_default_library", @@ -58,6 +57,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/errors", "//vendor:k8s.io/apimachinery/pkg/util/wait", + "//vendor:k8s.io/client-go/util/flowcontrol", ], ) @@ -80,7 +80,6 @@ go_test( "//pkg/kubelet/network/mock_network:go_default_library", "//pkg/kubelet/types:go_default_library", "//pkg/util/exec:go_default_library", - "//pkg/util/testing:go_default_library", "//vendor:github.com/appc/spec/schema", "//vendor:github.com/appc/spec/schema/types", "//vendor:github.com/coreos/go-systemd/dbus", @@ -89,8 +88,10 @@ go_test( "//vendor:github.com/stretchr/testify/assert", "//vendor:golang.org/x/net/context", "//vendor:google.golang.org/grpc", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/errors", + "//vendor:k8s.io/client-go/util/testing", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/rkt/OWNERS b/vendor/k8s.io/kubernetes/pkg/kubelet/rkt/OWNERS index 20699a36..9b15beaf 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/rkt/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/rkt/OWNERS @@ -1,3 +1,3 @@ -assignees: - - euank - - yifan-gu +approvers: +- euank +- yifan-gu diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/rkt/rkt.go b/vendor/k8s.io/kubernetes/pkg/kubelet/rkt/rkt.go index 8742055d..974bc25e 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/rkt/rkt.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/rkt/rkt.go @@ -41,9 +41,11 @@ import ( "github.com/golang/glog" "golang.org/x/net/context" "google.golang.org/grpc" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" kubetypes "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/errors" utilwait "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/client-go/util/flowcontrol" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/record" "k8s.io/kubernetes/pkg/credentialprovider" @@ -59,7 +61,6 @@ import ( "k8s.io/kubernetes/pkg/kubelet/util/format" "k8s.io/kubernetes/pkg/securitycontext" utilexec "k8s.io/kubernetes/pkg/util/exec" - "k8s.io/kubernetes/pkg/util/flowcontrol" "k8s.io/kubernetes/pkg/util/selinux" utilstrings "k8s.io/kubernetes/pkg/util/strings" "k8s.io/kubernetes/pkg/util/term" @@ -1967,7 +1968,7 @@ func (r *Runtime) cleanupPodNetworkFromServiceFile(serviceFilePath string) error return err } return r.cleanupPodNetwork(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: kubetypes.UID(id), Name: name, Namespace: namespace, diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/rkt/rkt_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/rkt/rkt_test.go index e3e82312..29ef054e 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/rkt/rkt_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/rkt/rkt_test.go @@ -31,8 +31,10 @@ import ( rktapi "github.com/coreos/rkt/api/v1alpha" "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" kubetypes "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/errors" + utiltesting "k8s.io/client-go/util/testing" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" @@ -44,7 +46,6 @@ import ( "k8s.io/kubernetes/pkg/kubelet/network/mock_network" "k8s.io/kubernetes/pkg/kubelet/types" utilexec "k8s.io/kubernetes/pkg/util/exec" - utiltesting "k8s.io/kubernetes/pkg/util/testing" ) func mustMarshalPodManifest(man *appcschema.PodManifest) []byte { @@ -1203,7 +1204,7 @@ func TestGenerateRunCommand(t *testing.T) { { kubenet.NewPlugin("/tmp"), &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod-name-foo", }, Spec: v1.PodSpec{ @@ -1222,7 +1223,7 @@ func TestGenerateRunCommand(t *testing.T) { { kubenet.NewPlugin("/tmp"), &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod-name-foo", }, Spec: v1.PodSpec{ @@ -1241,7 +1242,7 @@ func TestGenerateRunCommand(t *testing.T) { { kubenet.NewPlugin("/tmp"), &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod-name-foo", }, Spec: v1.PodSpec{ @@ -1262,7 +1263,7 @@ func TestGenerateRunCommand(t *testing.T) { { kubenet.NewPlugin("/tmp"), &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod-name-foo", }, Spec: v1.PodSpec{ @@ -1283,7 +1284,7 @@ func TestGenerateRunCommand(t *testing.T) { { kubenet.NewPlugin("/tmp"), &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod-name-foo", }, Spec: v1.PodSpec{ @@ -1304,7 +1305,7 @@ func TestGenerateRunCommand(t *testing.T) { { &network.NoopNetworkPlugin{}, &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod-name-foo", }, Spec: v1.PodSpec{ @@ -1323,7 +1324,7 @@ func TestGenerateRunCommand(t *testing.T) { { kubenet.NewPlugin("/tmp"), &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod-name-foo", }, Spec: v1.PodSpec{ @@ -1345,7 +1346,7 @@ func TestGenerateRunCommand(t *testing.T) { { kubenet.NewPlugin("/tmp"), &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod-name-foo", }, Spec: v1.PodSpec{ @@ -1415,7 +1416,7 @@ func TestLifeCycleHooks(t *testing.T) { { // Case 0, container without any hooks. &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod-1", Namespace: "ns-1", UID: "uid-1", @@ -1438,7 +1439,7 @@ func TestLifeCycleHooks(t *testing.T) { { // Case 1, containers with post-start and pre-stop hooks. &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod-1", Namespace: "ns-1", UID: "uid-1", @@ -1513,7 +1514,7 @@ func TestLifeCycleHooks(t *testing.T) { { // Case 2, one container with invalid hooks. &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod-1", Namespace: "ns-1", UID: "uid-1", @@ -1632,10 +1633,10 @@ func TestGarbageCollect(t *testing.T) { MaxContainers: 0, }, []*v1.Pod{ - {ObjectMeta: v1.ObjectMeta{UID: "pod-uid-1"}}, - {ObjectMeta: v1.ObjectMeta{UID: "pod-uid-2"}}, - {ObjectMeta: v1.ObjectMeta{UID: "pod-uid-3"}}, - {ObjectMeta: v1.ObjectMeta{UID: "pod-uid-4"}}, + {ObjectMeta: metav1.ObjectMeta{UID: "pod-uid-1"}}, + {ObjectMeta: metav1.ObjectMeta{UID: "pod-uid-2"}}, + {ObjectMeta: metav1.ObjectMeta{UID: "pod-uid-3"}}, + {ObjectMeta: metav1.ObjectMeta{UID: "pod-uid-4"}}, }, []*rktapi.Pod{ { @@ -1716,9 +1717,9 @@ func TestGarbageCollect(t *testing.T) { MaxContainers: 1, }, []*v1.Pod{ - {ObjectMeta: v1.ObjectMeta{UID: "pod-uid-0"}}, - {ObjectMeta: v1.ObjectMeta{UID: "pod-uid-1"}}, - {ObjectMeta: v1.ObjectMeta{UID: "pod-uid-2"}}, + {ObjectMeta: metav1.ObjectMeta{UID: "pod-uid-0"}}, + {ObjectMeta: metav1.ObjectMeta{UID: "pod-uid-1"}}, + {ObjectMeta: metav1.ObjectMeta{UID: "pod-uid-2"}}, }, []*rktapi.Pod{ { @@ -1839,7 +1840,7 @@ func TestMakePodManifestAnnotations(t *testing.T) { }{ { in: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "uid-1", Name: "name-1", Namespace: "namespace-1", diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/rktshim/OWNERS b/vendor/k8s.io/kubernetes/pkg/kubelet/rktshim/OWNERS index 20699a36..9b15beaf 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/rktshim/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/rktshim/OWNERS @@ -1,3 +1,3 @@ -assignees: - - euank - - yifan-gu +approvers: +- euank +- yifan-gu diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/rktshim/fake-app-interface.go b/vendor/k8s.io/kubernetes/pkg/kubelet/rktshim/fake-app-interface.go index 231317dd..6fa86f38 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/rktshim/fake-app-interface.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/rktshim/fake-app-interface.go @@ -90,16 +90,14 @@ type fakeContainer struct { func (c *fakeContainer) Start() { c.State = runtimeapi.ContainerState_CONTAINER_RUNNING - c.Status.State = &c.State + c.Status.State = c.State } func (c *fakeContainer) Stop() { c.State = runtimeapi.ContainerState_CONTAINER_EXITED - c.Status.State = &c.State - - exitSuccess := int32(0) - c.Status.ExitCode = &exitSuccess + c.Status.State = c.State + c.Status.ExitCode = 0 // c.Status.Reason } @@ -191,7 +189,7 @@ func (r *FakeRuntime) ListContainers(*runtimeapi.ContainerFilter) ([]*runtimeapi Metadata: c.Config.Metadata, Labels: c.Config.Labels, ImageRef: c.Status.ImageRef, - State: &c.State, + State: c.State, }) } @@ -226,15 +224,15 @@ func (r *FakeRuntime) ExecSync(containerID string, cmd []string, timeout time.Du } func (r *FakeRuntime) Exec(req *runtimeapi.ExecRequest) (*runtimeapi.ExecResponse, error) { - url := "http://" + FakeStreamingHost + ":" + FakeStreamingPort + "/exec/" + req.GetContainerId() + url := "http://" + FakeStreamingHost + ":" + FakeStreamingPort + "/exec/" + req.ContainerId return &runtimeapi.ExecResponse{ - Url: &url, + Url: url, }, nil } func (r *FakeRuntime) Attach(req *runtimeapi.AttachRequest) (*runtimeapi.AttachResponse, error) { - url := "http://" + FakeStreamingHost + ":" + FakeStreamingPort + "/attach/" + req.GetContainerId() + url := "http://" + FakeStreamingHost + ":" + FakeStreamingPort + "/attach/" + req.ContainerId return &runtimeapi.AttachResponse{ - Url: &url, + Url: url, }, nil } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/rktshim/imagestore_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/rktshim/imagestore_test.go index 22c9c5a5..4783965b 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/rktshim/imagestore_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/rktshim/imagestore_test.go @@ -63,19 +63,19 @@ var ( var testImgSpecs = map[string]imageTestCase{ "non-existent-image": { &runtimeapi.ImageSpec{ - Image: &gibberishStr, + Image: gibberishStr, }, nil, }, "busybox": { &runtimeapi.ImageSpec{ - Image: &busyboxStr, + Image: busyboxStr, }, &runtimeapi.Image{ - Id: nil, + Id: "", RepoTags: []string{}, RepoDigests: []string{}, - Size_: nil, + Size_: 0, }, }, } @@ -201,7 +201,7 @@ func TestListsImages(t *testing.T) { } for _, img := range imgs { - expectedImg := *testImgSpecs[*img.Id].ExpectedStatus + expectedImg := *testImgSpecs[img.Id].ExpectedStatus if err := compareContainerImages(img, expectedImg); err != nil { t.Errorf("rktshim.ImageStore.List() for %q, %v", img.Id, err) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/runonce_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/runonce_test.go index 8aee9890..1a1e39e9 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/runonce_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/runonce_test.go @@ -23,7 +23,10 @@ import ( cadvisorapi "github.com/google/cadvisor/info/v1" cadvisorapiv2 "github.com/google/cadvisor/info/v2" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" + "k8s.io/client-go/util/clock" + utiltesting "k8s.io/client-go/util/testing" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/apis/componentconfig" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" @@ -37,11 +40,10 @@ import ( nettest "k8s.io/kubernetes/pkg/kubelet/network/testing" kubepod "k8s.io/kubernetes/pkg/kubelet/pod" podtest "k8s.io/kubernetes/pkg/kubelet/pod/testing" + "k8s.io/kubernetes/pkg/kubelet/secret" "k8s.io/kubernetes/pkg/kubelet/server/stats" "k8s.io/kubernetes/pkg/kubelet/status" "k8s.io/kubernetes/pkg/kubelet/volumemanager" - "k8s.io/kubernetes/pkg/util/clock" - utiltesting "k8s.io/kubernetes/pkg/util/testing" "k8s.io/kubernetes/pkg/volume" volumetest "k8s.io/kubernetes/pkg/volume/testing" ) @@ -58,7 +60,9 @@ func TestRunOnce(t *testing.T) { Usage: 9 * mb, Capacity: 10 * mb, }, nil) - podManager := kubepod.NewBasicPodManager(podtest.NewFakeMirrorClient()) + fakeSecretManager := secret.NewFakeManager() + podManager := kubepod.NewBasicPodManager( + podtest.NewFakeMirrorClient(), fakeSecretManager) diskSpaceManager, _ := newDiskSpaceManager(cadvisor, DiskSpacePolicy{}) fakeRuntime := &containertest.FakeRuntime{} basePath, err := utiltesting.MkTmpdir("kubelet") @@ -89,7 +93,7 @@ func TestRunOnce(t *testing.T) { plug := &volumetest.FakeVolumePlugin{PluginName: "fake", Host: nil} kb.volumePluginMgr, err = - NewInitializedVolumePluginMgr(kb, []volume.VolumePlugin{plug}) + NewInitializedVolumePluginMgr(kb, fakeSecretManager, []volume.VolumePlugin{plug}) if err != nil { t.Fatalf("failed to initialize VolumePluginMgr: %v", err) } @@ -103,7 +107,8 @@ func TestRunOnce(t *testing.T) { kb.mounter, kb.getPodsDir(), kb.recorder, - false /* experimentalCheckNodeCapabilitiesBeforeMount */) + false, /* experimentalCheckNodeCapabilitiesBeforeMount */ + false /* keepTerminatedPodVolumes */) kb.networkPlugin, _ = network.InitNetworkPlugin([]network.NetworkPlugin{}, "", nettest.NewFakeHost(nil), componentconfig.HairpinNone, kb.nonMasqueradeCIDR, network.UseDefaultMTU) // TODO: Factor out "StatsProvider" from Kubelet so we don't have a cyclic dependency @@ -128,7 +133,7 @@ func TestRunOnce(t *testing.T) { pods := []*v1.Pod{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "12345678", Name: "foo", Namespace: "new", diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/secret/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/secret/BUILD new file mode 100644 index 00000000..0f5ee433 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/secret/BUILD @@ -0,0 +1,54 @@ +package(default_visibility = ["//visibility:public"]) + +licenses(["notice"]) + +load( + "@io_bazel_rules_go//go:def.bzl", + "go_library", + "go_test", +) + +go_test( + name = "go_default_test", + srcs = ["secret_manager_test.go"], + library = ":go_default_library", + tags = ["automanaged"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/client/clientset_generated/clientset/fake:go_default_library", + "//vendor:github.com/stretchr/testify/assert", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/client-go/util/clock", + ], +) + +go_library( + name = "go_default_library", + srcs = [ + "fake_manager.go", + "secret_manager.go", + ], + tags = ["automanaged"], + deps = [ + "//pkg/api/v1:go_default_library", + "//pkg/client/clientset_generated/clientset:go_default_library", + "//pkg/storage/etcd:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/util/sets", + "//vendor:k8s.io/client-go/util/clock", + ], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], +) diff --git a/vendor/k8s.io/kubernetes/pkg/api/meta/unstructured.go b/vendor/k8s.io/kubernetes/pkg/kubelet/secret/fake_manager.go similarity index 57% rename from vendor/k8s.io/kubernetes/pkg/api/meta/unstructured.go rename to vendor/k8s.io/kubernetes/pkg/kubelet/secret/fake_manager.go index 30b6dc88..25f948f5 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/meta/unstructured.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/secret/fake_manager.go @@ -14,18 +14,27 @@ See the License for the specific language governing permissions and limitations under the License. */ -package meta +package secret import ( - "k8s.io/kubernetes/pkg/apis/meta/v1/unstructured" - "k8s.io/kubernetes/pkg/runtime/schema" + "k8s.io/kubernetes/pkg/api/v1" ) -// InterfacesForUnstructured returns VersionInterfaces suitable for -// dealing with unstructured.Unstructured objects. -func InterfacesForUnstructured(schema.GroupVersion) (*VersionInterfaces, error) { - return &VersionInterfaces{ - ObjectConvertor: &unstructured.UnstructuredObjectConverter{}, - MetadataAccessor: NewAccessor(), - }, nil +// fakeManager implements Manager interface for testing purposes. +// simple operations to apiserver. +type fakeManager struct { +} + +func NewFakeManager() Manager { + return &fakeManager{} +} + +func (s *fakeManager) GetSecret(namespace, name string) (*v1.Secret, error) { + return nil, nil +} + +func (s *fakeManager) RegisterPod(pod *v1.Pod) { +} + +func (s *fakeManager) UnregisterPod(pod *v1.Pod) { } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/secret/secret_manager.go b/vendor/k8s.io/kubernetes/pkg/kubelet/secret/secret_manager.go new file mode 100644 index 00000000..be84d6f4 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/secret/secret_manager.go @@ -0,0 +1,265 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package secret + +import ( + "fmt" + "sync" + "time" + + "k8s.io/kubernetes/pkg/api/v1" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" + storageetcd "k8s.io/kubernetes/pkg/storage/etcd" + + apierrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/client-go/util/clock" +) + +type Manager interface { + // Get secret by secret namespace and name. + GetSecret(namespace, name string) (*v1.Secret, error) + + // WARNING: Register/UnregisterPod functions should be efficient, + // i.e. should not block on network operations. + + // RegisterPod registers all secrets from a given pod. + RegisterPod(pod *v1.Pod) + + // UnregisterPod unregisters secrets from a given pod that are not + // used by any other registered pod. + UnregisterPod(pod *v1.Pod) +} + +// simpleSecretManager implements SecretManager interfaces with +// simple operations to apiserver. +type simpleSecretManager struct { + kubeClient clientset.Interface +} + +func NewSimpleSecretManager(kubeClient clientset.Interface) (Manager, error) { + return &simpleSecretManager{kubeClient: kubeClient}, nil +} + +func (s *simpleSecretManager) GetSecret(namespace, name string) (*v1.Secret, error) { + return s.kubeClient.Core().Secrets(namespace).Get(name, metav1.GetOptions{}) +} + +func (s *simpleSecretManager) RegisterPod(pod *v1.Pod) { +} + +func (s *simpleSecretManager) UnregisterPod(pod *v1.Pod) { +} + +type objectKey struct { + namespace string + name string +} + +// secretStoreItems is a single item stored in secretStore. +type secretStoreItem struct { + refCount int + secret *secretData +} + +type secretData struct { + sync.Mutex + + secret *v1.Secret + err error + lastUpdateTime time.Time +} + +// secretStore is a local cache of secrets. +type secretStore struct { + kubeClient clientset.Interface + clock clock.Clock + + lock sync.Mutex + items map[objectKey]*secretStoreItem + ttl time.Duration +} + +func newSecretStore(kubeClient clientset.Interface, clock clock.Clock, ttl time.Duration) *secretStore { + return &secretStore{ + kubeClient: kubeClient, + clock: clock, + items: make(map[objectKey]*secretStoreItem), + ttl: ttl, + } +} + +func isSecretOlder(newSecret, oldSecret *v1.Secret) bool { + newVersion, _ := storageetcd.Versioner.ObjectResourceVersion(newSecret) + oldVersion, _ := storageetcd.Versioner.ObjectResourceVersion(oldSecret) + return newVersion < oldVersion +} + +func (s *secretStore) Add(namespace, name string) { + key := objectKey{namespace: namespace, name: name} + + // Add is called from RegisterPod, thus it needs to be efficient. + // Thus Add() is only increasing refCount and generation of a given secret. + // Then Get() is responsible for fetching if needed. + s.lock.Lock() + defer s.lock.Unlock() + item, exists := s.items[key] + if !exists { + item = &secretStoreItem{ + refCount: 0, + secret: &secretData{}, + } + s.items[key] = item + } + + item.refCount++ + // This will trigger fetch on the next Get() operation. + item.secret = nil +} + +func (s *secretStore) Delete(namespace, name string) { + key := objectKey{namespace: namespace, name: name} + + s.lock.Lock() + defer s.lock.Unlock() + if item, ok := s.items[key]; ok { + item.refCount-- + if item.refCount == 0 { + delete(s.items, key) + } + } +} + +func (s *secretStore) Get(namespace, name string) (*v1.Secret, error) { + key := objectKey{namespace: namespace, name: name} + + data := func() *secretData { + s.lock.Lock() + defer s.lock.Unlock() + item, exists := s.items[key] + if !exists { + return nil + } + if item.secret == nil { + item.secret = &secretData{} + } + return item.secret + }() + if data == nil { + return nil, fmt.Errorf("secret %q/%q not registered", namespace, name) + } + + // After updating data in secretStore, lock the data, fetch secret if + // needed and return data. + data.Lock() + defer data.Unlock() + if data.err != nil || !s.clock.Now().Before(data.lastUpdateTime.Add(s.ttl)) { + secret, err := s.kubeClient.Core().Secrets(namespace).Get(name, metav1.GetOptions{}) + // Update state, unless we got error different than "not-found". + if err == nil || apierrors.IsNotFound(err) { + // Ignore the update to the older version of a secret. + if data.secret == nil || secret == nil || !isSecretOlder(secret, data.secret) { + data.secret = secret + data.err = err + data.lastUpdateTime = s.clock.Now() + } + } else if data.secret == nil && data.err == nil { + // We have unitialized secretData - return current result. + return secret, err + } + } + return data.secret, data.err +} + +// cachingSecretManager keeps a cache of all secrets necessary for registered pods. +// It implements the following logic: +// - whenever a pod is created or updated, the cached versions of all its secrets +// are invalidated +// - every GetSecret() call tries to fetch the value from local cache; if it is +// not there, invalidated or too old, we fetch it from apiserver and refresh the +// value in cache; otherwise it is just fetched from cache +type cachingSecretManager struct { + secretStore *secretStore + + lock sync.Mutex + registeredPods map[objectKey]*v1.Pod +} + +func NewCachingSecretManager(kubeClient clientset.Interface) (Manager, error) { + csm := &cachingSecretManager{ + secretStore: newSecretStore(kubeClient, clock.RealClock{}, time.Minute), + registeredPods: make(map[objectKey]*v1.Pod), + } + return csm, nil +} + +func (c *cachingSecretManager) GetSecret(namespace, name string) (*v1.Secret, error) { + return c.secretStore.Get(namespace, name) +} + +func getSecretNames(pod *v1.Pod) sets.String { + result := sets.NewString() + for _, reference := range pod.Spec.ImagePullSecrets { + result.Insert(reference.Name) + } + for i := range pod.Spec.Containers { + for _, envVar := range pod.Spec.Containers[i].Env { + if envVar.ValueFrom != nil && envVar.ValueFrom.SecretKeyRef != nil { + result.Insert(envVar.ValueFrom.SecretKeyRef.Name) + } + } + } + for i := range pod.Spec.Volumes { + if source := pod.Spec.Volumes[i].Secret; source != nil { + result.Insert(source.SecretName) + } + } + return result +} + +func (c *cachingSecretManager) RegisterPod(pod *v1.Pod) { + names := getSecretNames(pod) + c.lock.Lock() + defer c.lock.Unlock() + for name := range names { + c.secretStore.Add(pod.Namespace, name) + } + var prev *v1.Pod + key := objectKey{namespace: pod.Namespace, name: pod.Name} + prev = c.registeredPods[key] + c.registeredPods[key] = pod + if prev != nil { + for name := range getSecretNames(prev) { + c.secretStore.Delete(prev.Namespace, name) + } + } +} + +func (c *cachingSecretManager) UnregisterPod(pod *v1.Pod) { + var prev *v1.Pod + key := objectKey{namespace: pod.Namespace, name: pod.Name} + c.lock.Lock() + defer c.lock.Unlock() + prev = c.registeredPods[key] + delete(c.registeredPods, key) + if prev != nil { + for name := range getSecretNames(prev) { + c.secretStore.Delete(prev.Namespace, name) + } + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/secret/secret_manager_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/secret/secret_manager_test.go new file mode 100644 index 00000000..5fc5f06f --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/secret/secret_manager_test.go @@ -0,0 +1,311 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package secret + +import ( + "fmt" + "strings" + "sync" + "testing" + "time" + + "k8s.io/kubernetes/pkg/api/v1" + "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/util/clock" + + "github.com/stretchr/testify/assert" +) + +func checkSecret(t *testing.T, store *secretStore, ns, name string, shouldExist bool) { + _, err := store.Get(ns, name) + if shouldExist && err != nil { + t.Errorf("unexpected actions: %#v", err) + } + if !shouldExist && (err == nil || !strings.Contains(err.Error(), fmt.Sprintf("secret %q/%q not registered", ns, name))) { + t.Errorf("unexpected actions: %#v", err) + } +} + +func TestSecretStore(t *testing.T) { + fakeClient := &fake.Clientset{} + store := newSecretStore(fakeClient, clock.RealClock{}, 0) + store.Add("ns1", "name1") + store.Add("ns2", "name2") + store.Add("ns1", "name1") + store.Add("ns1", "name1") + store.Delete("ns1", "name1") + store.Delete("ns2", "name2") + store.Add("ns3", "name3") + + // Adds don't issue Get requests. + actions := fakeClient.Actions() + assert.Equal(t, 0, len(actions), "unexpected actions: %#v", actions) + // Should issue Get request + store.Get("ns1", "name1") + // Shouldn't issue Get request, as secret is not registered + store.Get("ns2", "name2") + // Should issue Get request + store.Get("ns3", "name3") + + actions = fakeClient.Actions() + assert.Equal(t, 2, len(actions), "unexpected actions: %#v", actions) + + for _, a := range actions { + assert.True(t, a.Matches("get", "secrets"), "unexpected actions: %#v", a) + } + + checkSecret(t, store, "ns1", "name1", true) + checkSecret(t, store, "ns2", "name2", false) + checkSecret(t, store, "ns3", "name3", true) + checkSecret(t, store, "ns4", "name4", false) +} + +func TestSecretStoreGetAlwaysRefresh(t *testing.T) { + fakeClient := &fake.Clientset{} + fakeClock := clock.NewFakeClock(time.Now()) + store := newSecretStore(fakeClient, fakeClock, 0) + + for i := 0; i < 10; i++ { + store.Add(fmt.Sprintf("ns-%d", i), fmt.Sprintf("name-%d", i)) + } + fakeClient.ClearActions() + + wg := sync.WaitGroup{} + wg.Add(100) + for i := 0; i < 100; i++ { + go func(i int) { + store.Get(fmt.Sprintf("ns-%d", i%10), fmt.Sprintf("name-%d", i%10)) + wg.Done() + }(i) + } + wg.Wait() + actions := fakeClient.Actions() + assert.Equal(t, 100, len(actions), "unexpected actions: %#v", actions) + + for _, a := range actions { + assert.True(t, a.Matches("get", "secrets"), "unexpected actions: %#v", a) + } +} + +func TestSecretStoreGetNeverRefresh(t *testing.T) { + fakeClient := &fake.Clientset{} + fakeClock := clock.NewFakeClock(time.Now()) + store := newSecretStore(fakeClient, fakeClock, time.Minute) + + for i := 0; i < 10; i++ { + store.Add(fmt.Sprintf("ns-%d", i), fmt.Sprintf("name-%d", i)) + } + fakeClient.ClearActions() + + wg := sync.WaitGroup{} + wg.Add(100) + for i := 0; i < 100; i++ { + go func(i int) { + store.Get(fmt.Sprintf("ns-%d", i%10), fmt.Sprintf("name-%d", i%10)) + wg.Done() + }(i) + } + wg.Wait() + actions := fakeClient.Actions() + // Only first Get, should forward the Get request. + assert.Equal(t, 10, len(actions), "unexpected actions: %#v", actions) +} + +type secretsToAttach struct { + imagePullSecretNames []string + containerEnvSecretNames [][]string +} + +func podWithSecrets(ns, name string, toAttach secretsToAttach) *v1.Pod { + pod := &v1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: ns, + Name: name, + }, + Spec: v1.PodSpec{}, + } + for _, name := range toAttach.imagePullSecretNames { + pod.Spec.ImagePullSecrets = append( + pod.Spec.ImagePullSecrets, v1.LocalObjectReference{Name: name}) + } + for i, names := range toAttach.containerEnvSecretNames { + container := v1.Container{ + Name: fmt.Sprintf("container-%d", i), + } + for _, name := range names { + envSource := &v1.EnvVarSource{ + SecretKeyRef: &v1.SecretKeySelector{ + LocalObjectReference: v1.LocalObjectReference{ + Name: name, + }, + }, + } + container.Env = append(container.Env, v1.EnvVar{ValueFrom: envSource}) + } + pod.Spec.Containers = append(pod.Spec.Containers, container) + } + return pod +} + +func TestCacheInvalidation(t *testing.T) { + fakeClient := &fake.Clientset{} + fakeClock := clock.NewFakeClock(time.Now()) + store := newSecretStore(fakeClient, fakeClock, time.Minute) + manager := &cachingSecretManager{ + secretStore: store, + registeredPods: make(map[objectKey]*v1.Pod), + } + + // Create a pod with some secrets. + s1 := secretsToAttach{ + imagePullSecretNames: []string{"s1"}, + containerEnvSecretNames: [][]string{{"s1"}, {"s2"}}, + } + manager.RegisterPod(podWithSecrets("ns1", "name1", s1)) + // Fetch both secrets - this should triggger get operations. + store.Get("ns1", "s1") + store.Get("ns1", "s2") + actions := fakeClient.Actions() + assert.Equal(t, 2, len(actions), "unexpected actions: %#v", actions) + fakeClient.ClearActions() + + // Update a pod with a new secret. + s2 := secretsToAttach{ + imagePullSecretNames: []string{"s1"}, + containerEnvSecretNames: [][]string{{"s1"}, {"s2"}, {"s3"}}, + } + manager.RegisterPod(podWithSecrets("ns1", "name1", s2)) + // All secrets should be invalidated - this should trigger get operations. + store.Get("ns1", "s1") + store.Get("ns1", "s2") + store.Get("ns1", "s3") + actions = fakeClient.Actions() + assert.Equal(t, 3, len(actions), "unexpected actions: %#v", actions) + fakeClient.ClearActions() + + // Create a new pod that is refencing the first two secrets - those should + // be invalidated. + manager.RegisterPod(podWithSecrets("ns1", "name2", s1)) + store.Get("ns1", "s1") + store.Get("ns1", "s2") + store.Get("ns1", "s3") + actions = fakeClient.Actions() + assert.Equal(t, 2, len(actions), "unexpected actions: %#v", actions) + fakeClient.ClearActions() +} + +func TestCacheRefcounts(t *testing.T) { + fakeClient := &fake.Clientset{} + fakeClock := clock.NewFakeClock(time.Now()) + store := newSecretStore(fakeClient, fakeClock, time.Minute) + manager := &cachingSecretManager{ + secretStore: store, + registeredPods: make(map[objectKey]*v1.Pod), + } + + s1 := secretsToAttach{ + imagePullSecretNames: []string{"s1"}, + containerEnvSecretNames: [][]string{{"s1"}, {"s2"}, {"s3"}}, + } + manager.RegisterPod(podWithSecrets("ns1", "name1", s1)) + manager.RegisterPod(podWithSecrets("ns1", "name2", s1)) + s2 := secretsToAttach{ + imagePullSecretNames: []string{"s2"}, + containerEnvSecretNames: [][]string{{"s4"}, {"s5"}}, + } + manager.RegisterPod(podWithSecrets("ns1", "name2", s2)) + manager.RegisterPod(podWithSecrets("ns1", "name3", s2)) + manager.RegisterPod(podWithSecrets("ns1", "name4", s2)) + manager.UnregisterPod(podWithSecrets("ns1", "name3", s2)) + s3 := secretsToAttach{ + imagePullSecretNames: []string{"s1"}, + containerEnvSecretNames: [][]string{{"s3"}, {"s5"}}, + } + manager.RegisterPod(podWithSecrets("ns1", "name5", s3)) + manager.RegisterPod(podWithSecrets("ns1", "name6", s3)) + s4 := secretsToAttach{ + imagePullSecretNames: []string{"s3"}, + containerEnvSecretNames: [][]string{{"s6"}}, + } + manager.RegisterPod(podWithSecrets("ns1", "name7", s4)) + manager.UnregisterPod(podWithSecrets("ns1", "name7", s4)) + + // Also check the Add + Update + Remove scenario. + manager.RegisterPod(podWithSecrets("ns1", "other-name", s1)) + manager.RegisterPod(podWithSecrets("ns1", "other-name", s2)) + manager.UnregisterPod(podWithSecrets("ns1", "other-name", s2)) + + // Now we have: 1 pod with s1, 2 pods with s2 and 2 pods with s3, 0 pods with s4. + verify := func(ns, name string, count int) bool { + store.lock.Lock() + defer store.lock.Unlock() + item, ok := store.items[objectKey{ns, name}] + if !ok { + return count == 0 + } + return item.refCount == count + } + assert.True(t, verify("ns1", "s1", 3)) + assert.True(t, verify("ns1", "s2", 3)) + assert.True(t, verify("ns1", "s3", 3)) + assert.True(t, verify("ns1", "s4", 2)) + assert.True(t, verify("ns1", "s5", 4)) + assert.True(t, verify("ns1", "s6", 0)) + assert.True(t, verify("ns1", "s7", 0)) +} + +func TestCachingSecretManager(t *testing.T) { + fakeClient := &fake.Clientset{} + secretStore := newSecretStore(fakeClient, clock.RealClock{}, 0) + manager := &cachingSecretManager{ + secretStore: secretStore, + registeredPods: make(map[objectKey]*v1.Pod), + } + + // Create a pod with some secrets. + s1 := secretsToAttach{ + imagePullSecretNames: []string{"s1"}, + containerEnvSecretNames: [][]string{{"s1"}, {"s2"}}, + } + manager.RegisterPod(podWithSecrets("ns1", "name1", s1)) + // Update the pod with a different secrets. + s2 := secretsToAttach{ + imagePullSecretNames: []string{"s1"}, + containerEnvSecretNames: [][]string{{"s3"}, {"s4"}}, + } + manager.RegisterPod(podWithSecrets("ns1", "name1", s2)) + // Create another pod, but with same secrets in different namespace. + manager.RegisterPod(podWithSecrets("ns2", "name2", s2)) + // Create and delete a pod with some other secrets. + s3 := secretsToAttach{ + imagePullSecretNames: []string{"s5"}, + containerEnvSecretNames: [][]string{{"s6"}}, + } + manager.RegisterPod(podWithSecrets("ns3", "name", s3)) + manager.UnregisterPod(podWithSecrets("ns3", "name", s3)) + + // We should have only: s1, s3 and s4 secrets in namespaces: ns1 and ns2. + for _, ns := range []string{"ns1", "ns2", "ns3"} { + for _, secret := range []string{"s1", "s2", "s3", "s4", "s5", "s6"} { + shouldExist := + (secret == "s1" || secret == "s3" || secret == "s4") && (ns == "ns1" || ns == "ns2") + checkSecret(t, secretStore, ns, secret, shouldExist) + } + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/server/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/server/BUILD index 63a24edb..cb9dcc33 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/server/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/server/BUILD @@ -44,8 +44,8 @@ go_library( "//vendor:k8s.io/apiserver/pkg/authentication/authenticator", "//vendor:k8s.io/apiserver/pkg/authentication/user", "//vendor:k8s.io/apiserver/pkg/authorization/authorizer", - "//vendor:k8s.io/apiserver/pkg/healthz", - "//vendor:k8s.io/apiserver/pkg/httplog", + "//vendor:k8s.io/apiserver/pkg/server/healthz", + "//vendor:k8s.io/apiserver/pkg/server/httplog", "//vendor:k8s.io/apiserver/pkg/util/flushwriter", ], ) @@ -66,21 +66,21 @@ go_test( "//pkg/kubelet/container/testing:go_default_library", "//pkg/kubelet/server/remotecommand:go_default_library", "//pkg/kubelet/server/stats:go_default_library", - "//pkg/kubelet/types:go_default_library", "//pkg/util/httpstream:go_default_library", "//pkg/util/httpstream/spdy:go_default_library", "//pkg/util/term:go_default_library", - "//pkg/util/testing:go_default_library", "//pkg/volume:go_default_library", "//vendor:github.com/google/cadvisor/info/v1", "//vendor:github.com/google/cadvisor/info/v2", "//vendor:github.com/stretchr/testify/assert", "//vendor:github.com/stretchr/testify/require", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/sets", "//vendor:k8s.io/apiserver/pkg/authentication/user", "//vendor:k8s.io/apiserver/pkg/authorization/authorizer", + "//vendor:k8s.io/client-go/util/testing", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/server/remotecommand/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/server/remotecommand/BUILD index d4e16652..062b1f49 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/server/remotecommand/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/server/remotecommand/BUILD @@ -29,7 +29,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/runtime", - "//vendor:k8s.io/apiserver/pkg/httplog", + "//vendor:k8s.io/apiserver/pkg/server/httplog", "//vendor:k8s.io/apiserver/pkg/util/wsstream", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/server/remotecommand/websocket.go b/vendor/k8s.io/kubernetes/pkg/kubelet/server/remotecommand/websocket.go index d8b9644e..c60012b2 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/server/remotecommand/websocket.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/server/remotecommand/websocket.go @@ -22,7 +22,7 @@ import ( "time" "k8s.io/apimachinery/pkg/util/runtime" - "k8s.io/apiserver/pkg/httplog" + "k8s.io/apiserver/pkg/server/httplog" "k8s.io/apiserver/pkg/util/wsstream" ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/server/server.go b/vendor/k8s.io/kubernetes/pkg/kubelet/server/server.go index 0bad9ff5..76eb3ef1 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/server/server.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/server/server.go @@ -43,8 +43,8 @@ import ( utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apiserver/pkg/authentication/authenticator" "k8s.io/apiserver/pkg/authorization/authorizer" - "k8s.io/apiserver/pkg/healthz" - "k8s.io/apiserver/pkg/httplog" + "k8s.io/apiserver/pkg/server/healthz" + "k8s.io/apiserver/pkg/server/httplog" "k8s.io/apiserver/pkg/util/flushwriter" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/server/server_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/server/server_test.go index f9a07443..a4d27186 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/server/server_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/server/server_test.go @@ -39,10 +39,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" apierrs "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apiserver/pkg/authentication/user" "k8s.io/apiserver/pkg/authorization/authorizer" + utiltesting "k8s.io/client-go/util/testing" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/kubelet/cm" @@ -50,11 +52,9 @@ import ( kubecontainertesting "k8s.io/kubernetes/pkg/kubelet/container/testing" "k8s.io/kubernetes/pkg/kubelet/server/remotecommand" "k8s.io/kubernetes/pkg/kubelet/server/stats" - kubetypes "k8s.io/kubernetes/pkg/kubelet/types" "k8s.io/kubernetes/pkg/util/httpstream" "k8s.io/kubernetes/pkg/util/httpstream/spdy" "k8s.io/kubernetes/pkg/util/term" - utiltesting "k8s.io/kubernetes/pkg/util/testing" "k8s.io/kubernetes/pkg/volume" ) @@ -211,7 +211,7 @@ func newServerTest() *serverTestFramework { }, podByNameFunc: func(namespace, name string) (*v1.Pod, bool) { return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: namespace, Name: name, UID: testUID, @@ -264,7 +264,7 @@ func readResp(resp *http.Response) (string, error) { // A helper function to return the correct pod name. func getPodName(name, namespace string) string { if namespace == "" { - namespace = kubetypes.NamespaceDefault + namespace = metav1.NamespaceDefault } return name + "_" + namespace } @@ -891,7 +891,7 @@ func assertHealthIsOk(t *testing.T, httpURL string) { func setPodByNameFunc(fw *serverTestFramework, namespace, pod, container string) { fw.fakeKubelet.podByNameFunc = func(namespace, name string) (*v1.Pod, bool) { return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: namespace, Name: pod, }, diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/server/stats/handler.go b/vendor/k8s.io/kubernetes/pkg/kubelet/server/stats/handler.go index 43ddf2b2..117f739b 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/server/stats/handler.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/server/stats/handler.go @@ -29,6 +29,7 @@ import ( cadvisorapiv2 "github.com/google/cadvisor/info/v2" "github.com/emicklei/go-restful" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/kubelet/cm" @@ -197,7 +198,7 @@ func (h *handler) handlePodContainer(request *restful.Request, response *restful // Default parameters. params := map[string]string{ - "namespace": v1.NamespaceDefault, + "namespace": metav1.NamespaceDefault, "uid": "", } for k, v := range request.PathParameters() { diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/server/streaming/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/server/streaming/BUILD index 6444113c..405af5c0 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/server/streaming/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/server/streaming/BUILD @@ -20,12 +20,12 @@ go_library( "//pkg/kubelet/api/v1alpha1/runtime:go_default_library", "//pkg/kubelet/server/portforward:go_default_library", "//pkg/kubelet/server/remotecommand:go_default_library", - "//pkg/util/clock:go_default_library", "//pkg/util/term:go_default_library", "//vendor:github.com/emicklei/go-restful", "//vendor:google.golang.org/grpc", "//vendor:google.golang.org/grpc/codes", "//vendor:k8s.io/apimachinery/pkg/types", + "//vendor:k8s.io/client-go/util/clock", ], ) @@ -38,7 +38,6 @@ go_test( library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/client/restclient:go_default_library", "//pkg/client/unversioned/remotecommand:go_default_library", "//pkg/kubelet/api/v1alpha1/runtime:go_default_library", "//pkg/kubelet/server/portforward:go_default_library", @@ -47,7 +46,8 @@ go_test( "//vendor:github.com/stretchr/testify/assert", "//vendor:github.com/stretchr/testify/require", "//vendor:k8s.io/client-go/pkg/api", - "//vendor:k8s.io/client-go/pkg/util/clock", + "//vendor:k8s.io/client-go/rest", + "//vendor:k8s.io/client-go/util/clock", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/server/streaming/request_cache.go b/vendor/k8s.io/kubernetes/pkg/kubelet/server/streaming/request_cache.go index c8b68a46..e663542d 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/server/streaming/request_cache.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/server/streaming/request_cache.go @@ -25,7 +25,7 @@ import ( "sync" "time" - "k8s.io/kubernetes/pkg/util/clock" + "k8s.io/client-go/util/clock" ) var ( diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/server/streaming/request_cache_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/server/streaming/request_cache_test.go index a714a714..c35f5d0b 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/server/streaming/request_cache_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/server/streaming/request_cache_test.go @@ -26,7 +26,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "k8s.io/client-go/pkg/util/clock" + "k8s.io/client-go/util/clock" ) func TestInsert(t *testing.T) { diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/server/streaming/server.go b/vendor/k8s.io/kubernetes/pkg/kubelet/server/streaming/server.go index 95e01c49..b17ee1f0 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/server/streaming/server.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/server/streaming/server.go @@ -146,7 +146,7 @@ type server struct { } func (s *server) GetExec(req *runtimeapi.ExecRequest) (*runtimeapi.ExecResponse, error) { - if req.GetContainerId() == "" { + if req.ContainerId == "" { return nil, grpc.Errorf(codes.InvalidArgument, "missing required container_id") } token, err := s.cache.Insert(req) @@ -159,7 +159,7 @@ func (s *server) GetExec(req *runtimeapi.ExecRequest) (*runtimeapi.ExecResponse, } func (s *server) GetAttach(req *runtimeapi.AttachRequest) (*runtimeapi.AttachResponse, error) { - if req.GetContainerId() == "" { + if req.ContainerId == "" { return nil, grpc.Errorf(codes.InvalidArgument, "missing required container_id") } token, err := s.cache.Insert(req) @@ -172,7 +172,7 @@ func (s *server) GetAttach(req *runtimeapi.AttachRequest) (*runtimeapi.AttachRes } func (s *server) GetPortForward(req *runtimeapi.PortForwardRequest) (*runtimeapi.PortForwardResponse, error) { - if req.GetPodSandboxId() == "" { + if req.PodSandboxId == "" { return nil, grpc.Errorf(codes.InvalidArgument, "missing required pod_sandbox_id") } token, err := s.cache.Insert(req) @@ -211,11 +211,10 @@ func (s *server) ServeHTTP(w http.ResponseWriter, r *http.Request) { s.handler.ServeHTTP(w, r) } -func (s *server) buildURL(method, token string) *string { - loc := s.config.BaseURL.ResolveReference(&url.URL{ +func (s *server) buildURL(method, token string) string { + return s.config.BaseURL.ResolveReference(&url.URL{ Path: path.Join(method, token), }).String() - return &loc } func (s *server) serveExec(req *restful.Request, resp *restful.Response) { @@ -232,10 +231,10 @@ func (s *server) serveExec(req *restful.Request, resp *restful.Response) { } streamOpts := &remotecommand.Options{ - Stdin: exec.GetStdin(), + Stdin: exec.Stdin, Stdout: true, - Stderr: !exec.GetTty(), - TTY: exec.GetTty(), + Stderr: !exec.Tty, + TTY: exec.Tty, } remotecommand.ServeExec( @@ -244,8 +243,8 @@ func (s *server) serveExec(req *restful.Request, resp *restful.Response) { s.runtime, "", // unused: podName "", // unusued: podUID - exec.GetContainerId(), - exec.GetCmd(), + exec.ContainerId, + exec.Cmd, streamOpts, s.config.StreamIdleTimeout, s.config.StreamCreationTimeout, @@ -266,10 +265,10 @@ func (s *server) serveAttach(req *restful.Request, resp *restful.Response) { } streamOpts := &remotecommand.Options{ - Stdin: attach.GetStdin(), + Stdin: attach.Stdin, Stdout: true, - Stderr: !attach.GetTty(), - TTY: attach.GetTty(), + Stderr: !attach.Tty, + TTY: attach.Tty, } remotecommand.ServeAttach( resp.ResponseWriter, @@ -277,7 +276,7 @@ func (s *server) serveAttach(req *restful.Request, resp *restful.Response) { s.runtime, "", // unused: podName "", // unusued: podUID - attach.GetContainerId(), + attach.ContainerId, streamOpts, s.config.StreamIdleTimeout, s.config.StreamCreationTimeout, @@ -301,7 +300,7 @@ func (s *server) servePortForward(req *restful.Request, resp *restful.Response) resp.ResponseWriter, req.Request, s.runtime, - pf.GetPodSandboxId(), + pf.PodSandboxId, "", // unused: podUID s.config.StreamIdleTimeout, s.config.StreamCreationTimeout) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/server/streaming/server_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/server/streaming/server_test.go index e6170a92..c9581fff 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/server/streaming/server_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/server/streaming/server_test.go @@ -31,7 +31,7 @@ import ( "github.com/stretchr/testify/require" "k8s.io/client-go/pkg/api" - "k8s.io/kubernetes/pkg/client/restclient" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/client/unversioned/remotecommand" runtimeapi "k8s.io/kubernetes/pkg/kubelet/api/v1alpha1/runtime" kubeletportforward "k8s.io/kubernetes/pkg/kubelet/server/portforward" @@ -82,25 +82,25 @@ func TestGetExec(t *testing.T) { assertRequestToken := func(test testcase, cache *requestCache, token string) { req, ok := cache.Consume(token) require.True(t, ok, "token %s not found! testcase=%+v", token, test) - assert.Equal(t, testContainerID, req.(*runtimeapi.ExecRequest).GetContainerId(), "testcase=%+v", test) - assert.Equal(t, test.cmd, req.(*runtimeapi.ExecRequest).GetCmd(), "testcase=%+v", test) - assert.Equal(t, test.tty, req.(*runtimeapi.ExecRequest).GetTty(), "testcase=%+v", test) - assert.Equal(t, test.stdin, req.(*runtimeapi.ExecRequest).GetStdin(), "testcase=%+v", test) + assert.Equal(t, testContainerID, req.(*runtimeapi.ExecRequest).ContainerId, "testcase=%+v", test) + assert.Equal(t, test.cmd, req.(*runtimeapi.ExecRequest).Cmd, "testcase=%+v", test) + assert.Equal(t, test.tty, req.(*runtimeapi.ExecRequest).Tty, "testcase=%+v", test) + assert.Equal(t, test.stdin, req.(*runtimeapi.ExecRequest).Stdin, "testcase=%+v", test) } containerID := testContainerID for _, test := range testcases { request := &runtimeapi.ExecRequest{ - ContainerId: &containerID, + ContainerId: containerID, Cmd: test.cmd, - Tty: &test.tty, - Stdin: &test.stdin, + Tty: test.tty, + Stdin: test.stdin, } { // Non-TLS resp, err := serv.GetExec(request) assert.NoError(t, err, "testcase=%+v", test) expectedURL := "http://" + testAddr + "/exec/" - assert.Contains(t, resp.GetUrl(), expectedURL, "testcase=%+v", test) - token := strings.TrimPrefix(resp.GetUrl(), expectedURL) + assert.Contains(t, resp.Url, expectedURL, "testcase=%+v", test) + token := strings.TrimPrefix(resp.Url, expectedURL) assertRequestToken(test, serv.(*server).cache, token) } @@ -108,8 +108,8 @@ func TestGetExec(t *testing.T) { resp, err := tlsServer.GetExec(request) assert.NoError(t, err, "testcase=%+v", test) expectedURL := "https://" + testAddr + "/exec/" - assert.Contains(t, resp.GetUrl(), expectedURL, "testcase=%+v", test) - token := strings.TrimPrefix(resp.GetUrl(), expectedURL) + assert.Contains(t, resp.Url, expectedURL, "testcase=%+v", test) + token := strings.TrimPrefix(resp.Url, expectedURL) assertRequestToken(test, tlsServer.(*server).cache, token) } @@ -117,8 +117,8 @@ func TestGetExec(t *testing.T) { resp, err := prefixServer.GetExec(request) assert.NoError(t, err, "testcase=%+v", test) expectedURL := "http://" + testAddr + "/" + pathPrefix + "/exec/" - assert.Contains(t, resp.GetUrl(), expectedURL, "testcase=%+v", test) - token := strings.TrimPrefix(resp.GetUrl(), expectedURL) + assert.Contains(t, resp.Url, expectedURL, "testcase=%+v", test) + token := strings.TrimPrefix(resp.Url, expectedURL) assertRequestToken(test, prefixServer.(*server).cache, token) } } @@ -149,23 +149,23 @@ func TestGetAttach(t *testing.T) { assertRequestToken := func(test testcase, cache *requestCache, token string) { req, ok := cache.Consume(token) require.True(t, ok, "token %s not found! testcase=%+v", token, test) - assert.Equal(t, testContainerID, req.(*runtimeapi.AttachRequest).GetContainerId(), "testcase=%+v", test) - assert.Equal(t, test.tty, req.(*runtimeapi.AttachRequest).GetTty(), "testcase=%+v", test) - assert.Equal(t, test.stdin, req.(*runtimeapi.AttachRequest).GetStdin(), "testcase=%+v", test) + assert.Equal(t, testContainerID, req.(*runtimeapi.AttachRequest).ContainerId, "testcase=%+v", test) + assert.Equal(t, test.tty, req.(*runtimeapi.AttachRequest).Tty, "testcase=%+v", test) + assert.Equal(t, test.stdin, req.(*runtimeapi.AttachRequest).Stdin, "testcase=%+v", test) } containerID := testContainerID for _, test := range testcases { request := &runtimeapi.AttachRequest{ - ContainerId: &containerID, - Stdin: &test.stdin, - Tty: &test.tty, + ContainerId: containerID, + Stdin: test.stdin, + Tty: test.tty, } { // Non-TLS resp, err := serv.GetAttach(request) assert.NoError(t, err, "testcase=%+v", test) expectedURL := "http://" + testAddr + "/attach/" - assert.Contains(t, resp.GetUrl(), expectedURL, "testcase=%+v", test) - token := strings.TrimPrefix(resp.GetUrl(), expectedURL) + assert.Contains(t, resp.Url, expectedURL, "testcase=%+v", test) + token := strings.TrimPrefix(resp.Url, expectedURL) assertRequestToken(test, serv.(*server).cache, token) } @@ -173,8 +173,8 @@ func TestGetAttach(t *testing.T) { resp, err := tlsServer.GetAttach(request) assert.NoError(t, err, "testcase=%+v", test) expectedURL := "https://" + testAddr + "/attach/" - assert.Contains(t, resp.GetUrl(), expectedURL, "testcase=%+v", test) - token := strings.TrimPrefix(resp.GetUrl(), expectedURL) + assert.Contains(t, resp.Url, expectedURL, "testcase=%+v", test) + token := strings.TrimPrefix(resp.Url, expectedURL) assertRequestToken(test, tlsServer.(*server).cache, token) } } @@ -183,7 +183,7 @@ func TestGetAttach(t *testing.T) { func TestGetPortForward(t *testing.T) { podSandboxID := testPodSandboxID request := &runtimeapi.PortForwardRequest{ - PodSandboxId: &podSandboxID, + PodSandboxId: podSandboxID, Port: []int32{1, 2, 3, 4}, } @@ -195,11 +195,11 @@ func TestGetPortForward(t *testing.T) { resp, err := serv.GetPortForward(request) assert.NoError(t, err) expectedURL := "http://" + testAddr + "/portforward/" - assert.True(t, strings.HasPrefix(resp.GetUrl(), expectedURL)) - token := strings.TrimPrefix(resp.GetUrl(), expectedURL) + assert.True(t, strings.HasPrefix(resp.Url, expectedURL)) + token := strings.TrimPrefix(resp.Url, expectedURL) req, ok := serv.(*server).cache.Consume(token) require.True(t, ok, "token %s not found!", token) - assert.Equal(t, testPodSandboxID, req.(*runtimeapi.PortForwardRequest).GetPodSandboxId()) + assert.Equal(t, testPodSandboxID, req.(*runtimeapi.PortForwardRequest).PodSandboxId) } { // TLS @@ -211,11 +211,11 @@ func TestGetPortForward(t *testing.T) { resp, err := tlsServer.GetPortForward(request) assert.NoError(t, err) expectedURL := "https://" + testAddr + "/portforward/" - assert.True(t, strings.HasPrefix(resp.GetUrl(), expectedURL)) - token := strings.TrimPrefix(resp.GetUrl(), expectedURL) + assert.True(t, strings.HasPrefix(resp.Url, expectedURL)) + token := strings.TrimPrefix(resp.Url, expectedURL) req, ok := tlsServer.(*server).cache.Consume(token) require.True(t, ok, "token %s not found!", token) - assert.Equal(t, testPodSandboxID, req.(*runtimeapi.PortForwardRequest).GetPodSandboxId()) + assert.Equal(t, testPodSandboxID, req.(*runtimeapi.PortForwardRequest).PodSandboxId) } } @@ -231,12 +231,11 @@ func TestServePortForward(t *testing.T) { s, testServer := startTestServer(t) defer testServer.Close() - podSandboxID := testPodSandboxID resp, err := s.GetPortForward(&runtimeapi.PortForwardRequest{ - PodSandboxId: &podSandboxID, + PodSandboxId: testPodSandboxID, }) require.NoError(t, err) - reqURL, err := url.Parse(resp.GetUrl()) + reqURL, err := url.Parse(resp.Url) require.NoError(t, err) exec, err := remotecommand.NewExecutor(&restclient.Config{}, "POST", reqURL) @@ -273,20 +272,20 @@ func runRemoteCommandTest(t *testing.T, commandType string) { switch commandType { case "exec": resp, err := s.GetExec(&runtimeapi.ExecRequest{ - ContainerId: &containerID, + ContainerId: containerID, Cmd: []string{"echo"}, - Stdin: &stdin, + Stdin: stdin, }) require.NoError(t, err) - reqURL, err = url.Parse(resp.GetUrl()) + reqURL, err = url.Parse(resp.Url) require.NoError(t, err) case "attach": resp, err := s.GetAttach(&runtimeapi.AttachRequest{ - ContainerId: &containerID, - Stdin: &stdin, + ContainerId: containerID, + Stdin: stdin, }) require.NoError(t, err) - reqURL, err = url.Parse(resp.GetUrl()) + reqURL, err = url.Parse(resp.Url) require.NoError(t, err) } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/status/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/status/BUILD index ef2f86fe..b9df40b4 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/status/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/status/BUILD @@ -50,6 +50,7 @@ go_test( "//pkg/kubelet/container:go_default_library", "//pkg/kubelet/pod:go_default_library", "//pkg/kubelet/pod/testing:go_default_library", + "//pkg/kubelet/secret:go_default_library", "//pkg/kubelet/types:go_default_library", "//vendor:github.com/stretchr/testify/assert", "//vendor:k8s.io/apimachinery/pkg/api/errors", diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/status/status_manager.go b/vendor/k8s.io/kubernetes/pkg/kubelet/status/status_manager.go index bcb81613..f4a9aaab 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/status/status_manager.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/status/status_manager.go @@ -440,9 +440,9 @@ func (m *manager) syncPod(uid types.UID, status versionedPodStatus) { glog.V(3).Infof("Pod %q is terminated, but some containers are still running", format.Pod(pod)) return } - deleteOptions := v1.NewDeleteOptions(0) + deleteOptions := metav1.NewDeleteOptions(0) // Use the pod UID as the precondition for deletion to prevent deleting a newly created pod with the same name and namespace. - deleteOptions.Preconditions = v1.NewUIDPreconditions(string(pod.UID)) + deleteOptions.Preconditions = metav1.NewUIDPreconditions(string(pod.UID)) if err = m.kubeClient.Core().Pods(pod.Namespace).Delete(pod.Name, deleteOptions); err == nil { glog.V(3).Infof("Pod %q fully terminated and removed from etcd", format.Pod(pod)) m.deletePodStatus(uid) @@ -513,6 +513,10 @@ func (m *manager) needsReconcile(uid types.UID, status v1.PodStatus) bool { // kubelet temporarily. // TODO(random-liu): Remove timestamp related logic after apiserver supports nanosecond or makes it consistent. func normalizeStatus(pod *v1.Pod, status *v1.PodStatus) *v1.PodStatus { + bytesPerStatus := kubecontainer.MaxPodTerminationMessageLogLength + if containers := len(pod.Spec.Containers) + len(pod.Spec.InitContainers); containers > 0 { + bytesPerStatus = bytesPerStatus / containers + } normalizeTimeStamp := func(t *metav1.Time) { *t = t.Rfc3339Copy() } @@ -523,6 +527,9 @@ func normalizeStatus(pod *v1.Pod, status *v1.PodStatus) *v1.PodStatus { if c.Terminated != nil { normalizeTimeStamp(&c.Terminated.StartedAt) normalizeTimeStamp(&c.Terminated.FinishedAt) + if len(c.Terminated.Message) > bytesPerStatus { + c.Terminated.Message = c.Terminated.Message[:bytesPerStatus] + } } } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/status/status_manager_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/status/status_manager_test.go index a2929ddc..9540a3a9 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/status/status_manager_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/status/status_manager_test.go @@ -20,31 +20,32 @@ import ( "fmt" "math/rand" "strconv" + "strings" "testing" "time" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" - "k8s.io/kubernetes/pkg/client/testing/core" - "github.com/stretchr/testify/assert" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" + "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" + "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" + "k8s.io/kubernetes/pkg/client/testing/core" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" kubepod "k8s.io/kubernetes/pkg/kubelet/pod" podtest "k8s.io/kubernetes/pkg/kubelet/pod/testing" + kubesecret "k8s.io/kubernetes/pkg/kubelet/secret" kubetypes "k8s.io/kubernetes/pkg/kubelet/types" ) // Generate new instance of test pod with the same initial value. func getTestPod() *v1.Pod { return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "12345678", Name: "foo", Namespace: "new", @@ -71,7 +72,7 @@ func (m *manager) testSyncBatch() { } func newTestManager(kubeClient clientset.Interface) *manager { - podManager := kubepod.NewBasicPodManager(podtest.NewFakeMirrorClient()) + podManager := kubepod.NewBasicPodManager(podtest.NewFakeMirrorClient(), kubesecret.NewFakeManager()) podManager.AddPod(getTestPod()) return NewManager(kubeClient, podManager).(*manager) } @@ -138,7 +139,7 @@ func TestNewStatus(t *testing.T) { func TestNewStatusPreservesPodStartTime(t *testing.T) { syncer := newTestManager(&fake.Clientset{}) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "12345678", Name: "foo", Namespace: "new", @@ -171,7 +172,7 @@ func TestNewStatusSetsReadyTransitionTime(t *testing.T) { syncer := newTestManager(&fake.Clientset{}) podStatus := getReadyPodStatus() pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "12345678", Name: "foo", Namespace: "new", @@ -218,7 +219,7 @@ func TestChangedStatusUpdatesLastTransitionTime(t *testing.T) { syncer := newTestManager(&fake.Clientset{}) podStatus := getReadyPodStatus() pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "12345678", Name: "foo", Namespace: "new", @@ -257,7 +258,7 @@ func TestUnchangedStatusPreservesLastTransitionTime(t *testing.T) { syncer := newTestManager(&fake.Clientset{}) podStatus := getReadyPodStatus() pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: "12345678", Name: "foo", Namespace: "new", @@ -479,6 +480,40 @@ func TestStatusEquality(t *testing.T) { } } +func TestStatusNormalizationEnforcesMaxBytes(t *testing.T) { + pod := v1.Pod{ + Spec: v1.PodSpec{}, + } + containerStatus := []v1.ContainerStatus{} + for i := 0; i < 48; i++ { + s := v1.ContainerStatus{ + Name: fmt.Sprintf("container%d", i), + LastTerminationState: v1.ContainerState{ + Terminated: &v1.ContainerStateTerminated{ + Message: strings.Repeat("abcdefgh", int(24+i%3)), + }, + }, + } + containerStatus = append(containerStatus, s) + } + podStatus := v1.PodStatus{ + InitContainerStatuses: containerStatus[:24], + ContainerStatuses: containerStatus[24:], + } + result := normalizeStatus(&pod, &podStatus) + count := 0 + for _, s := range result.InitContainerStatuses { + l := len(s.LastTerminationState.Terminated.Message) + if l < 192 || l > 256 { + t.Errorf("container message had length %d", l) + } + count += l + } + if count > kubecontainer.MaxPodTerminationMessageLogLength { + t.Errorf("message length not truncated") + } +} + func TestStaticPod(t *testing.T) { staticPod := getTestPod() staticPod.Annotations = map[string]string{kubetypes.ConfigSourceAnnotationKey: "file"} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/types/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/types/BUILD index 3cb18814..e93b7c34 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/types/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/types/BUILD @@ -18,7 +18,10 @@ go_library( "types.go", ], tags = ["automanaged"], - deps = ["//pkg/api/v1:go_default_library"], + deps = [ + "//pkg/api/v1:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + ], ) go_test( diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/types/pod_update.go b/vendor/k8s.io/kubernetes/pkg/kubelet/types/pod_update.go index 2d8f20a5..c91077c1 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/types/pod_update.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/types/pod_update.go @@ -19,6 +19,7 @@ package types import ( "fmt" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" ) @@ -64,7 +65,7 @@ const ( // Updates from all sources AllSource = "*" - NamespaceDefault = v1.NamespaceDefault + NamespaceDefault = metav1.NamespaceDefault ) // PodUpdate defines an operation sent on the channel. You can add or remove single services by diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/util/cache/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/util/cache/BUILD index a9ca7a8a..03c2107f 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/util/cache/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/util/cache/BUILD @@ -22,7 +22,7 @@ go_test( tags = ["automanaged"], deps = [ "//pkg/client/cache:go_default_library", - "//pkg/util/clock:go_default_library", + "//vendor:k8s.io/client-go/util/clock", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/util/cache/object_cache_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/util/cache/object_cache_test.go index 86b1851e..ded4c163 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/util/cache/object_cache_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/util/cache/object_cache_test.go @@ -21,8 +21,8 @@ import ( "testing" "time" + "k8s.io/client-go/util/clock" expirationcache "k8s.io/kubernetes/pkg/client/cache" - "k8s.io/kubernetes/pkg/util/clock" ) type testObject struct { diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/util/csr/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/util/csr/BUILD index 079ef0ae..c8f5c938 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/util/csr/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/util/csr/BUILD @@ -12,14 +12,13 @@ go_library( srcs = ["csr.go"], tags = ["automanaged"], deps = [ - "//pkg/api/v1:go_default_library", - "//pkg/apis/certificates/v1alpha1:go_default_library", - "//pkg/client/clientset_generated/clientset/typed/certificates/v1alpha1:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/util/cert:go_default_library", + "//pkg/apis/certificates/v1beta1:go_default_library", + "//pkg/client/clientset_generated/clientset/typed/certificates/v1beta1:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/util/cert", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/util/csr/csr.go b/vendor/k8s.io/kubernetes/pkg/kubelet/util/csr/csr.go index dc74470e..a1848788 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/util/csr/csr.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/util/csr/csr.go @@ -21,20 +21,19 @@ import ( "fmt" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/watch" - "k8s.io/kubernetes/pkg/api/v1" - certificates "k8s.io/kubernetes/pkg/apis/certificates/v1alpha1" - unversionedcertificates "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1alpha1" - "k8s.io/kubernetes/pkg/fields" - certutil "k8s.io/kubernetes/pkg/util/cert" + certutil "k8s.io/client-go/util/cert" + certificates "k8s.io/kubernetes/pkg/apis/certificates/v1beta1" + certificatesclient "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1" ) // RequestNodeCertificate will create a certificate signing request and send it to API server, // then it will watch the object's status, once approved by API server, it will return the API // server's issued certificate (pem-encoded). If there is any errors, or the watch timeouts, // it will return an error. This is intended for use on nodes (kubelet and kubeadm). -func RequestNodeCertificate(client unversionedcertificates.CertificateSigningRequestInterface, privateKeyData []byte, nodeName types.NodeName) (certData []byte, err error) { +func RequestNodeCertificate(client certificatesclient.CertificateSigningRequestInterface, privateKeyData []byte, nodeName types.NodeName) (certData []byte, err error) { subject := &pkix.Name{ Organization: []string{"system:nodes"}, CommonName: fmt.Sprintf("system:node:%s", nodeName), @@ -52,7 +51,7 @@ func RequestNodeCertificate(client unversionedcertificates.CertificateSigningReq req, err := client.Create(&certificates.CertificateSigningRequest{ // Username, UID, Groups will be injected by API server. TypeMeta: metav1.TypeMeta{Kind: "CertificateSigningRequest"}, - ObjectMeta: v1.ObjectMeta{GenerateName: "csr-"}, + ObjectMeta: metav1.ObjectMeta{GenerateName: "csr-"}, Spec: certificates.CertificateSigningRequestSpec{ Request: csr, @@ -70,7 +69,7 @@ func RequestNodeCertificate(client unversionedcertificates.CertificateSigningReq // Make a default timeout = 3600s. var defaultTimeoutSeconds int64 = 3600 - resultCh, err := client.Watch(v1.ListOptions{ + resultCh, err := client.Watch(metav1.ListOptions{ Watch: true, TimeoutSeconds: &defaultTimeoutSeconds, FieldSelector: fields.OneTermEqualSelector("metadata.name", req.Name).String(), diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/util/queue/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/util/queue/BUILD index ccd99be1..f5cff71f 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/util/queue/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/util/queue/BUILD @@ -13,8 +13,8 @@ go_library( srcs = ["work_queue.go"], tags = ["automanaged"], deps = [ - "//pkg/util/clock:go_default_library", "//vendor:k8s.io/apimachinery/pkg/types", + "//vendor:k8s.io/client-go/util/clock", ], ) @@ -24,9 +24,9 @@ go_test( library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/util/clock:go_default_library", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/sets", + "//vendor:k8s.io/client-go/util/clock", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/util/queue/work_queue.go b/vendor/k8s.io/kubernetes/pkg/kubelet/util/queue/work_queue.go index 29fa7c84..63bbef1e 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/util/queue/work_queue.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/util/queue/work_queue.go @@ -21,7 +21,7 @@ import ( "time" "k8s.io/apimachinery/pkg/types" - "k8s.io/kubernetes/pkg/util/clock" + "k8s.io/client-go/util/clock" ) // WorkQueue allows queuing items with a timestamp. An item is diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/util/queue/work_queue_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/util/queue/work_queue_test.go index 6ce50f36..56302aef 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/util/queue/work_queue_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/util/queue/work_queue_test.go @@ -22,7 +22,7 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/kubernetes/pkg/util/clock" + "k8s.io/client-go/util/clock" ) func newTestBasicWorkQueue() (*basicWorkQueue, *clock.FakeClock) { diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/volume_host.go b/vendor/k8s.io/kubernetes/pkg/kubelet/volume_host.go index 626a339d..547bf9b0 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/volume_host.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/volume_host.go @@ -24,6 +24,7 @@ import ( "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/pkg/cloudprovider" + "k8s.io/kubernetes/pkg/kubelet/secret" "k8s.io/kubernetes/pkg/util/io" "k8s.io/kubernetes/pkg/util/mount" "k8s.io/kubernetes/pkg/volume" @@ -37,10 +38,12 @@ import ( // plugins - used to initialize volumePluginMgr func NewInitializedVolumePluginMgr( kubelet *Kubelet, + secretManager secret.Manager, plugins []volume.VolumePlugin) (*volume.VolumePluginMgr, error) { kvh := &kubeletVolumeHost{ kubelet: kubelet, volumePluginMgr: volume.VolumePluginMgr{}, + secretManager: secretManager, } if err := kvh.volumePluginMgr.InitPlugins(plugins, kvh); err != nil { @@ -62,6 +65,7 @@ func (kvh *kubeletVolumeHost) GetPluginDir(pluginName string) string { type kubeletVolumeHost struct { kubelet *Kubelet volumePluginMgr volume.VolumePluginMgr + secretManager secret.Manager } func (kvh *kubeletVolumeHost) GetPodVolumeDir(podUID types.UID, pluginName string, volumeName string) string { @@ -132,3 +136,7 @@ func (kvh *kubeletVolumeHost) GetNodeAllocatable() (v1.ResourceList, error) { } return node.Status.Allocatable, nil } + +func (kvh *kubeletVolumeHost) GetSecretFunc() func(namespace, name string) (*v1.Secret, error) { + return kvh.secretManager.GetSecret +} diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/BUILD index 91cd8ab5..90d1bffa 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/BUILD @@ -50,13 +50,15 @@ go_test( "//pkg/kubelet/container/testing:go_default_library", "//pkg/kubelet/pod:go_default_library", "//pkg/kubelet/pod/testing:go_default_library", + "//pkg/kubelet/secret:go_default_library", "//pkg/util/mount:go_default_library", - "//pkg/util/testing:go_default_library", "//pkg/volume:go_default_library", "//pkg/volume/testing:go_default_library", "//pkg/volume/util/types:go_default_library", "//pkg/volume/util/volumehelper:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/util/sets", + "//vendor:k8s.io/client-go/util/testing", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/OWNERS b/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/OWNERS index 73ab6a21..4739819c 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/OWNERS @@ -1,2 +1,2 @@ -assignees: - - saad-ali +approvers: +- saad-ali diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/cache/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/cache/BUILD index af37477d..d6078cf2 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/cache/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/cache/BUILD @@ -40,6 +40,7 @@ go_test( "//pkg/volume/testing:go_default_library", "//pkg/volume/util/types:go_default_library", "//pkg/volume/util/volumehelper:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/cache/actual_state_of_world_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/cache/actual_state_of_world_test.go index bec23f6c..7a20b6c8 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/cache/actual_state_of_world_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/cache/actual_state_of_world_test.go @@ -19,6 +19,7 @@ package cache import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/volume" volumetesting "k8s.io/kubernetes/pkg/volume/testing" @@ -36,7 +37,7 @@ func Test_MarkVolumeAsAttached_Positive_NewVolume(t *testing.T) { volumePluginMgr, plugin := volumetesting.GetTestVolumePluginMgr(t) asw := NewActualStateOfWorld("mynode" /* nodeName */, volumePluginMgr) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod1", UID: "pod1uid", }, @@ -80,7 +81,7 @@ func Test_MarkVolumeAsAttached_SuppliedVolumeName_Positive_NewVolume(t *testing. volumePluginMgr, _ := volumetesting.GetTestVolumePluginMgr(t) asw := NewActualStateOfWorld("mynode" /* nodeName */, volumePluginMgr) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod1", UID: "pod1uid", }, @@ -124,7 +125,7 @@ func Test_MarkVolumeAsAttached_Positive_ExistingVolume(t *testing.T) { devicePath := "fake/device/path" asw := NewActualStateOfWorld("mynode" /* nodeName */, volumePluginMgr) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod1", UID: "pod1uid", }, @@ -172,7 +173,7 @@ func Test_AddPodToVolume_Positive_ExistingVolumeNewNode(t *testing.T) { devicePath := "fake/device/path" pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod1", UID: "pod1uid", }, @@ -229,7 +230,7 @@ func Test_AddPodToVolume_Positive_ExistingVolumeExistingNode(t *testing.T) { devicePath := "fake/device/path" pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod1", UID: "pod1uid", }, @@ -291,7 +292,7 @@ func Test_AddPodToVolume_Negative_VolumeDoesntExist(t *testing.T) { asw := NewActualStateOfWorld("mynode" /* nodeName */, volumePluginMgr) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod1", UID: "pod1uid", }, @@ -356,7 +357,7 @@ func Test_MarkDeviceAsMounted_Positive_NewVolume(t *testing.T) { volumePluginMgr, plugin := volumetesting.GetTestVolumePluginMgr(t) asw := NewActualStateOfWorld("mynode" /* nodeName */, volumePluginMgr) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod1", UID: "pod1uid", }, diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/cache/desired_state_of_world_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/cache/desired_state_of_world_test.go index 3bb7467c..e739b989 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/cache/desired_state_of_world_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/cache/desired_state_of_world_test.go @@ -19,6 +19,7 @@ package cache import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/volume" volumetesting "k8s.io/kubernetes/pkg/volume/testing" @@ -34,7 +35,7 @@ func Test_AddPodToVolume_Positive_NewPodNewVolume(t *testing.T) { volumePluginMgr, _ := volumetesting.GetTestVolumePluginMgr(t) dsw := NewDesiredStateOfWorld(volumePluginMgr) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod3", UID: "pod3uid", }, @@ -78,7 +79,7 @@ func Test_AddPodToVolume_Positive_ExistingPodExistingVolume(t *testing.T) { volumePluginMgr, _ := volumetesting.GetTestVolumePluginMgr(t) dsw := NewDesiredStateOfWorld(volumePluginMgr) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod3", UID: "pod3uid", }, @@ -122,7 +123,7 @@ func Test_DeletePodFromVolume_Positive_PodExistsVolumeExists(t *testing.T) { volumePluginMgr, _ := volumetesting.GetTestVolumePluginMgr(t) dsw := NewDesiredStateOfWorld(volumePluginMgr) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod3", UID: "pod3uid", }, @@ -174,7 +175,7 @@ func Test_MarkVolumesReportedInUse_Positive_NewPodNewVolume(t *testing.T) { dsw := NewDesiredStateOfWorld(volumePluginMgr) pod1 := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod1", UID: "pod1uid", }, @@ -196,7 +197,7 @@ func Test_MarkVolumesReportedInUse_Positive_NewPodNewVolume(t *testing.T) { pod1Name := volumehelper.GetUniquePodName(pod1) pod2 := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod2", UID: "pod2uid", }, @@ -218,7 +219,7 @@ func Test_MarkVolumesReportedInUse_Positive_NewPodNewVolume(t *testing.T) { pod2Name := volumehelper.GetUniquePodName(pod2) pod3 := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod3", UID: "pod3uid", }, diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/populator/desired_state_of_world_populator.go b/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/populator/desired_state_of_world_populator.go index 1ff35f09..5e8d8d41 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/populator/desired_state_of_world_populator.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/populator/desired_state_of_world_populator.go @@ -71,7 +71,8 @@ func NewDesiredStateOfWorldPopulator( getPodStatusRetryDuration time.Duration, podManager pod.Manager, desiredStateOfWorld cache.DesiredStateOfWorld, - kubeContainerRuntime kubecontainer.Runtime) DesiredStateOfWorldPopulator { + kubeContainerRuntime kubecontainer.Runtime, + keepTerminatedPodVolumes bool) DesiredStateOfWorldPopulator { return &desiredStateOfWorldPopulator{ kubeClient: kubeClient, loopSleepDuration: loopSleepDuration, @@ -80,7 +81,8 @@ func NewDesiredStateOfWorldPopulator( desiredStateOfWorld: desiredStateOfWorld, pods: processedPods{ processedPods: make(map[volumetypes.UniquePodName]bool)}, - kubeContainerRuntime: kubeContainerRuntime, + kubeContainerRuntime: kubeContainerRuntime, + keepTerminatedPodVolumes: keepTerminatedPodVolumes, } } @@ -93,6 +95,7 @@ type desiredStateOfWorldPopulator struct { pods processedPods kubeContainerRuntime kubecontainer.Runtime timeOfLastGetPodStatus time.Time + keepTerminatedPodVolumes bool } type processedPods struct { @@ -160,13 +163,7 @@ func (dswp *desiredStateOfWorldPopulator) findAndRemoveDeletedPods() { if !isPodTerminated(pod) { continue } - // Skip non-memory backed volumes belonging to terminated pods - volume := volumeToMount.VolumeSpec.Volume - if volume == nil { - continue - } - if (volume.EmptyDir == nil || volume.EmptyDir.Medium != v1.StorageMediumMemory) && - volume.ConfigMap == nil && volume.Secret == nil { + if dswp.keepTerminatedPodVolumes { continue } } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/reconciler/BUILD b/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/reconciler/BUILD index a55bc05c..c01d0faf 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/reconciler/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/reconciler/BUILD @@ -52,6 +52,7 @@ go_test( "//pkg/volume/util/operationexecutor:go_default_library", "//pkg/volume/util/volumehelper:go_default_library", "//vendor:github.com/stretchr/testify/assert", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/sets", diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/reconciler/reconciler.go b/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/reconciler/reconciler.go index bea511a5..4aadcb8d 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/reconciler/reconciler.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/reconciler/reconciler.go @@ -495,7 +495,7 @@ func (rc *reconciler) reconstructVolume(volume podVolume) (*reconstructedVolume, return nil, err } pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ UID: types.UID(volume.podName), }, } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/reconciler/reconciler_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/reconciler/reconciler_test.go index 10bad019..29833f19 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/reconciler/reconciler_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/reconciler/reconciler_test.go @@ -22,6 +22,7 @@ import ( "time" "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" k8stypes "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/sets" @@ -112,7 +113,7 @@ func Test_Run_Positive_VolumeAttachAndMount(t *testing.T) { volumePluginMgr, kubeletPodsDir) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod1", UID: "pod1uid", }, @@ -183,7 +184,7 @@ func Test_Run_Positive_VolumeMountControllerAttachEnabled(t *testing.T) { volumePluginMgr, kubeletPodsDir) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod1", UID: "pod1uid", }, @@ -255,7 +256,7 @@ func Test_Run_Positive_VolumeAttachMountUnmountDetach(t *testing.T) { volumePluginMgr, kubeletPodsDir) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod1", UID: "pod1uid", }, @@ -338,7 +339,7 @@ func Test_Run_Positive_VolumeUnmountControllerAttachEnabled(t *testing.T) { volumePluginMgr, kubeletPodsDir) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod1", UID: "pod1uid", }, @@ -453,7 +454,7 @@ func createTestClient() *fake.Clientset { fakeClient.AddReactor("get", "nodes", func(action core.Action) (bool, runtime.Object, error) { return true, &v1.Node{ - ObjectMeta: v1.ObjectMeta{Name: string(nodeName)}, + ObjectMeta: metav1.ObjectMeta{Name: string(nodeName)}, Status: v1.NodeStatus{ VolumesAttached: []v1.AttachedVolume{ { diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/volume_manager.go b/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/volume_manager.go index 8bfc1d3b..59888ad0 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/volume_manager.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/volume_manager.go @@ -157,7 +157,8 @@ func NewVolumeManager( mounter mount.Interface, kubeletPodsDir string, recorder record.EventRecorder, - checkNodeCapabilitiesBeforeMount bool) (VolumeManager, error) { + checkNodeCapabilitiesBeforeMount bool, + keepTerminatedPodVolumes bool) (VolumeManager, error) { vm := &volumeManager{ kubeClient: kubeClient, @@ -191,7 +192,8 @@ func NewVolumeManager( desiredStateOfWorldPopulatorGetPodStatusRetryDuration, podManager, vm.desiredStateOfWorld, - kubeContainerRuntime) + kubeContainerRuntime, + keepTerminatedPodVolumes) return vm, nil } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/volume_manager_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/volume_manager_test.go index 2b935cb0..36a63c5f 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/volume_manager_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/volume_manager_test.go @@ -23,7 +23,9 @@ import ( "testing" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/sets" + utiltesting "k8s.io/client-go/util/testing" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" @@ -33,8 +35,8 @@ import ( "k8s.io/kubernetes/pkg/kubelet/pod" kubepod "k8s.io/kubernetes/pkg/kubelet/pod" podtest "k8s.io/kubernetes/pkg/kubelet/pod/testing" + "k8s.io/kubernetes/pkg/kubelet/secret" "k8s.io/kubernetes/pkg/util/mount" - utiltesting "k8s.io/kubernetes/pkg/util/testing" "k8s.io/kubernetes/pkg/volume" volumetest "k8s.io/kubernetes/pkg/volume/testing" "k8s.io/kubernetes/pkg/volume/util/types" @@ -51,7 +53,7 @@ func TestGetMountedVolumesForPodAndGetVolumesInUse(t *testing.T) { t.Fatalf("can't make a temp dir: %v", err) } defer os.RemoveAll(tmpDir) - podManager := kubepod.NewBasicPodManager(podtest.NewFakeMirrorClient()) + podManager := kubepod.NewBasicPodManager(podtest.NewFakeMirrorClient(), secret.NewFakeManager()) node, pod, pv, claim := createObjects() kubeClient := fake.NewSimpleClientset(node, pod, pv, claim) @@ -96,7 +98,7 @@ func TestGetExtraSupplementalGroupsForPod(t *testing.T) { t.Fatalf("can't make a temp dir: %v", err) } defer os.RemoveAll(tmpDir) - podManager := kubepod.NewBasicPodManager(podtest.NewFakeMirrorClient()) + podManager := kubepod.NewBasicPodManager(podtest.NewFakeMirrorClient(), secret.NewFakeManager()) node, pod, _, claim := createObjects() @@ -126,7 +128,7 @@ func TestGetExtraSupplementalGroupsForPod(t *testing.T) { for _, tc := range cases { pv := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pvA", Annotations: map[string]string{ volumehelper.VolumeGidAnnotationKey: tc.gidAnnotation, @@ -196,7 +198,8 @@ func newTestVolumeManager( &mount.FakeMounter{}, "", fakeRecorder, - false /* experimentalCheckNodeCapabilitiesBeforeMount */) + false, /* experimentalCheckNodeCapabilitiesBeforeMount */ + false /* keepTerminatedPodVolumes */) return vm, err } @@ -205,7 +208,7 @@ func newTestVolumeManager( // already attached to the node and bound to the claim used by the pod. func createObjects() (*v1.Node, *v1.Pod, *v1.PersistentVolume, *v1.PersistentVolumeClaim) { node := &v1.Node{ - ObjectMeta: v1.ObjectMeta{Name: testHostname}, + ObjectMeta: metav1.ObjectMeta{Name: testHostname}, Status: v1.NodeStatus{ VolumesAttached: []v1.AttachedVolume{ { @@ -216,7 +219,7 @@ func createObjects() (*v1.Node, *v1.Pod, *v1.PersistentVolume, *v1.PersistentVol Spec: v1.NodeSpec{ExternalID: testHostname}, } pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc", Namespace: "nsA", UID: "1234", @@ -238,7 +241,7 @@ func createObjects() (*v1.Node, *v1.Pod, *v1.PersistentVolume, *v1.PersistentVol }, } pv := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pvA", }, Spec: v1.PersistentVolumeSpec{ @@ -253,7 +256,7 @@ func createObjects() (*v1.Node, *v1.Pod, *v1.PersistentVolume, *v1.PersistentVol }, } claim := &v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "claimA", Namespace: "nsA", }, diff --git a/vendor/k8s.io/kubernetes/pkg/kubemark/BUILD b/vendor/k8s.io/kubernetes/pkg/kubemark/BUILD index 23ce209e..72dde32f 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubemark/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/kubemark/BUILD @@ -41,6 +41,7 @@ go_library( "//pkg/volume/secret:go_default_library", "//test/utils:go_default_library", "//vendor:github.com/golang/glog", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/kubemark/hollow_kubelet.go b/vendor/k8s.io/kubernetes/pkg/kubemark/hollow_kubelet.go index 94989596..c80386c5 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubemark/hollow_kubelet.go +++ b/vendor/k8s.io/kubernetes/pkg/kubemark/hollow_kubelet.go @@ -19,6 +19,7 @@ package kubemark import ( "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" kubeletapp "k8s.io/kubernetes/cmd/kubelet/app" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/componentconfig" @@ -116,7 +117,7 @@ func GetHollowKubeletConfig( c.Address = "0.0.0.0" /* bind address */ c.Port = int32(kubeletPort) c.ReadOnlyPort = int32(kubeletReadOnlyPort) - c.MasterServiceNamespace = api.NamespaceDefault + c.MasterServiceNamespace = metav1.NamespaceDefault c.PodManifestPath = manifestFilePath c.FileCheckFrequency.Duration = 20 * time.Second c.HTTPCheckFrequency.Duration = 20 * time.Second diff --git a/vendor/k8s.io/kubernetes/pkg/labels/.readonly b/vendor/k8s.io/kubernetes/pkg/labels/.readonly deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/k8s.io/kubernetes/pkg/labels/BUILD b/vendor/k8s.io/kubernetes/pkg/labels/BUILD index 93a6ceea..deefdcef 100644 --- a/vendor/k8s.io/kubernetes/pkg/labels/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/labels/BUILD @@ -5,37 +5,12 @@ licenses(["notice"]) load( "@io_bazel_rules_go//go:def.bzl", "go_library", - "go_test", ) go_library( name = "go_default_library", - srcs = [ - "doc.go", - "labels.go", - "selector.go", - ], + srcs = ["doc.go"], tags = ["automanaged"], - deps = [ - "//pkg/selection:go_default_library", - "//pkg/util/sets:go_default_library", - "//pkg/util/validation:go_default_library", - "//vendor:github.com/golang/glog", - ], -) - -go_test( - name = "go_default_test", - srcs = [ - "labels_test.go", - "selector_test.go", - ], - library = ":go_default_library", - tags = ["automanaged"], - deps = [ - "//pkg/selection:go_default_library", - "//pkg/util/sets:go_default_library", - ], ) filegroup( diff --git a/vendor/k8s.io/kubernetes/pkg/labels/doc.go b/vendor/k8s.io/kubernetes/pkg/labels/doc.go index 64a41555..d1581fd0 100644 --- a/vendor/k8s.io/kubernetes/pkg/labels/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/labels/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Package labels implements a simple label system, parsing and matching -// selectors with sets of labels. -package labels // import "k8s.io/kubernetes/pkg/labels" +// Package labels only exists until heapster rebases +// TODO genericapiserver remove this empty package. Godep fails without this because heapster relies +// on this package. This will allow us to start splitting packages, but will force +// heapster to update on their next kube rebase. +package labels diff --git a/vendor/k8s.io/kubernetes/pkg/labels/labels.go b/vendor/k8s.io/kubernetes/pkg/labels/labels.go deleted file mode 100644 index 0d0caa77..00000000 --- a/vendor/k8s.io/kubernetes/pkg/labels/labels.go +++ /dev/null @@ -1,181 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package labels - -import ( - "fmt" - "sort" - "strings" -) - -// Labels allows you to present labels independently from their storage. -type Labels interface { - // Has returns whether the provided label exists. - Has(label string) (exists bool) - - // Get returns the value for the provided label. - Get(label string) (value string) -} - -// Set is a map of label:value. It implements Labels. -type Set map[string]string - -// String returns all labels listed as a human readable string. -// Conveniently, exactly the format that ParseSelector takes. -func (ls Set) String() string { - selector := make([]string, 0, len(ls)) - for key, value := range ls { - selector = append(selector, key+"="+value) - } - // Sort for determinism. - sort.StringSlice(selector).Sort() - return strings.Join(selector, ",") -} - -// Has returns whether the provided label exists in the map. -func (ls Set) Has(label string) bool { - _, exists := ls[label] - return exists -} - -// Get returns the value in the map for the provided label. -func (ls Set) Get(label string) string { - return ls[label] -} - -// AsSelector converts labels into a selectors. -func (ls Set) AsSelector() Selector { - return SelectorFromSet(ls) -} - -// AsSelectorPreValidated converts labels into a selector, but -// assumes that labels are already validated and thus don't -// preform any validation. -// According to our measurements this is significantly faster -// in codepaths that matter at high sccale. -func (ls Set) AsSelectorPreValidated() Selector { - return SelectorFromValidatedSet(ls) -} - -// FormatLables convert label map into plain string -func FormatLabels(labelMap map[string]string) string { - l := Set(labelMap).String() - if l == "" { - l = "" - } - return l -} - -// Conflicts takes 2 maps and returns true if there a key match between -// the maps but the value doesn't match, and returns false in other cases -func Conflicts(labels1, labels2 Set) bool { - small := labels1 - big := labels2 - if len(labels2) < len(labels1) { - small = labels2 - big = labels1 - } - - for k, v := range small { - if val, match := big[k]; match { - if val != v { - return true - } - } - } - - return false -} - -// Merge combines given maps, and does not check for any conflicts -// between the maps. In case of conflicts, second map (labels2) wins -func Merge(labels1, labels2 Set) Set { - mergedMap := Set{} - - for k, v := range labels1 { - mergedMap[k] = v - } - for k, v := range labels2 { - mergedMap[k] = v - } - return mergedMap -} - -// Equals returns true if the given maps are equal -func Equals(labels1, labels2 Set) bool { - if len(labels1) != len(labels2) { - return false - } - - for k, v := range labels1 { - value, ok := labels2[k] - if !ok { - return false - } - if value != v { - return false - } - } - return true -} - -// AreLabelsInWhiteList verifies if the provided label list -// is in the provided whitelist and returns true, otherwise false. -func AreLabelsInWhiteList(labels, whitelist Set) bool { - if len(whitelist) == 0 { - return true - } - - for k, v := range labels { - value, ok := whitelist[k] - if !ok { - return false - } - if value != v { - return false - } - } - return true -} - -// ConvertSelectorToLabelsMap converts selector string to labels map -// and validates keys and values -func ConvertSelectorToLabelsMap(selector string) (Set, error) { - labelsMap := Set{} - - if len(selector) == 0 { - return labelsMap, nil - } - - labels := strings.Split(selector, ",") - for _, label := range labels { - l := strings.Split(label, "=") - if len(l) != 2 { - return labelsMap, fmt.Errorf("invalid selector: %s", l) - } - key := strings.TrimSpace(l[0]) - if err := validateLabelKey(key); err != nil { - return labelsMap, err - } - value := strings.TrimSpace(l[1]) - if err := validateLabelValue(value); err != nil { - return labelsMap, err - } - labelsMap[key] = value - } - return labelsMap, nil -} diff --git a/vendor/k8s.io/kubernetes/pkg/labels/labels_test.go b/vendor/k8s.io/kubernetes/pkg/labels/labels_test.go deleted file mode 100644 index 2d4d761b..00000000 --- a/vendor/k8s.io/kubernetes/pkg/labels/labels_test.go +++ /dev/null @@ -1,231 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package labels - -import ( - "testing" -) - -func matches(t *testing.T, ls Set, want string) { - if ls.String() != want { - t.Errorf("Expected '%s', but got '%s'", want, ls.String()) - } -} - -func TestSetString(t *testing.T) { - matches(t, Set{"x": "y"}, "x=y") - matches(t, Set{"foo": "bar"}, "foo=bar") - matches(t, Set{"foo": "bar", "baz": "qup"}, "baz=qup,foo=bar") - - // TODO: Make our label representation robust enough to handle labels - // with ",=!" characters in their names. -} - -func TestLabelHas(t *testing.T) { - labelHasTests := []struct { - Ls Labels - Key string - Has bool - }{ - {Set{"x": "y"}, "x", true}, - {Set{"x": ""}, "x", true}, - {Set{"x": "y"}, "foo", false}, - } - for _, lh := range labelHasTests { - if has := lh.Ls.Has(lh.Key); has != lh.Has { - t.Errorf("%#v.Has(%#v) => %v, expected %v", lh.Ls, lh.Key, has, lh.Has) - } - } -} - -func TestLabelGet(t *testing.T) { - ls := Set{"x": "y"} - if ls.Get("x") != "y" { - t.Errorf("Set.Get is broken") - } -} - -func TestLabelConflict(t *testing.T) { - tests := []struct { - labels1 map[string]string - labels2 map[string]string - conflict bool - }{ - { - labels1: map[string]string{}, - labels2: map[string]string{}, - conflict: false, - }, - { - labels1: map[string]string{"env": "test"}, - labels2: map[string]string{"infra": "true"}, - conflict: false, - }, - { - labels1: map[string]string{"env": "test"}, - labels2: map[string]string{"infra": "true", "env": "test"}, - conflict: false, - }, - { - labels1: map[string]string{"env": "test"}, - labels2: map[string]string{"env": "dev"}, - conflict: true, - }, - { - labels1: map[string]string{"env": "test", "infra": "false"}, - labels2: map[string]string{"infra": "true", "color": "blue"}, - conflict: true, - }, - } - for _, test := range tests { - conflict := Conflicts(Set(test.labels1), Set(test.labels2)) - if conflict != test.conflict { - t.Errorf("expected: %v but got: %v", test.conflict, conflict) - } - } -} - -func TestLabelMerge(t *testing.T) { - tests := []struct { - labels1 map[string]string - labels2 map[string]string - mergedLabels map[string]string - }{ - { - labels1: map[string]string{}, - labels2: map[string]string{}, - mergedLabels: map[string]string{}, - }, - { - labels1: map[string]string{"infra": "true"}, - labels2: map[string]string{}, - mergedLabels: map[string]string{"infra": "true"}, - }, - { - labels1: map[string]string{"infra": "true"}, - labels2: map[string]string{"env": "test", "color": "blue"}, - mergedLabels: map[string]string{"infra": "true", "env": "test", "color": "blue"}, - }, - } - for _, test := range tests { - mergedLabels := Merge(Set(test.labels1), Set(test.labels2)) - if !Equals(mergedLabels, test.mergedLabels) { - t.Errorf("expected: %v but got: %v", test.mergedLabels, mergedLabels) - } - } -} - -func TestLabelSelectorParse(t *testing.T) { - tests := []struct { - selector string - labels map[string]string - valid bool - }{ - { - selector: "", - labels: map[string]string{}, - valid: true, - }, - { - selector: "x=a", - labels: map[string]string{"x": "a"}, - valid: true, - }, - { - selector: "x=a,y=b,z=c", - labels: map[string]string{"x": "a", "y": "b", "z": "c"}, - valid: true, - }, - { - selector: " x = a , y = b , z = c ", - labels: map[string]string{"x": "a", "y": "b", "z": "c"}, - valid: true, - }, - { - selector: "color=green,env=test,service=front", - labels: map[string]string{"color": "green", "env": "test", "service": "front"}, - valid: true, - }, - { - selector: "color=green, env=test, service=front", - labels: map[string]string{"color": "green", "env": "test", "service": "front"}, - valid: true, - }, - { - selector: ",", - labels: map[string]string{}, - valid: false, - }, - { - selector: "x", - labels: map[string]string{}, - valid: false, - }, - { - selector: "x,y", - labels: map[string]string{}, - valid: false, - }, - { - selector: "x=$y", - labels: map[string]string{}, - valid: false, - }, - { - selector: "x!=y", - labels: map[string]string{}, - valid: false, - }, - { - selector: "x==y", - labels: map[string]string{}, - valid: false, - }, - { - selector: "x=a||y=b", - labels: map[string]string{}, - valid: false, - }, - { - selector: "x in (y)", - labels: map[string]string{}, - valid: false, - }, - { - selector: "x notin (y)", - labels: map[string]string{}, - valid: false, - }, - { - selector: "x y", - labels: map[string]string{}, - valid: false, - }, - } - for _, test := range tests { - labels, err := ConvertSelectorToLabelsMap(test.selector) - if test.valid && err != nil { - t.Errorf("selector: %s, expected no error but got: %s", test.selector, err) - } else if !test.valid && err == nil { - t.Errorf("selector: %s, expected an error", test.selector) - } - - if !Equals(Set(labels), test.labels) { - t.Errorf("expected: %s but got: %s", test.labels, labels) - } - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/labels/selector.go b/vendor/k8s.io/kubernetes/pkg/labels/selector.go deleted file mode 100644 index 04310150..00000000 --- a/vendor/k8s.io/kubernetes/pkg/labels/selector.go +++ /dev/null @@ -1,836 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package labels - -import ( - "bytes" - "fmt" - "sort" - "strconv" - "strings" - - "github.com/golang/glog" - "k8s.io/kubernetes/pkg/selection" - "k8s.io/kubernetes/pkg/util/sets" - "k8s.io/kubernetes/pkg/util/validation" -) - -// Requirements is AND of all requirements. -type Requirements []Requirement - -// Selector represents a label selector. -type Selector interface { - // Matches returns true if this selector matches the given set of labels. - Matches(Labels) bool - - // Empty returns true if this selector does not restrict the selection space. - Empty() bool - - // String returns a human readable string that represents this selector. - String() string - - // Add adds requirements to the Selector - Add(r ...Requirement) Selector - - // Requirements converts this interface into Requirements to expose - // more detailed selection information. - // If there are querying parameters, it will return converted requirements and selectable=true. - // If this selector doesn't want to select anything, it will return selectable=false. - Requirements() (requirements Requirements, selectable bool) -} - -// Everything returns a selector that matches all labels. -func Everything() Selector { - return internalSelector{} -} - -type nothingSelector struct{} - -func (n nothingSelector) Matches(_ Labels) bool { return false } -func (n nothingSelector) Empty() bool { return false } -func (n nothingSelector) String() string { return "" } -func (n nothingSelector) Add(_ ...Requirement) Selector { return n } -func (n nothingSelector) Requirements() (Requirements, bool) { return nil, false } - -// Nothing returns a selector that matches no labels -func Nothing() Selector { - return nothingSelector{} -} - -func NewSelector() Selector { - return internalSelector(nil) -} - -type internalSelector []Requirement - -// Sort by key to obtain determisitic parser -type ByKey []Requirement - -func (a ByKey) Len() int { return len(a) } - -func (a ByKey) Swap(i, j int) { a[i], a[j] = a[j], a[i] } - -func (a ByKey) Less(i, j int) bool { return a[i].key < a[j].key } - -// Requirement contains values, a key, and an operator that relates the key and values. -// The zero value of Requirement is invalid. -// Requirement implements both set based match and exact match -// Requirement should be initialized via NewRequirement constructor for creating a valid Requirement. -type Requirement struct { - key string - operator selection.Operator - // In huge majority of cases we have at most one value here. - // It is generally faster to operate on a single-element slice - // than on a single-element map, so we have a slice here. - strValues []string -} - -// NewRequirement is the constructor for a Requirement. -// If any of these rules is violated, an error is returned: -// (1) The operator can only be In, NotIn, Equals, DoubleEquals, NotEquals, Exists, or DoesNotExist. -// (2) If the operator is In or NotIn, the values set must be non-empty. -// (3) If the operator is Equals, DoubleEquals, or NotEquals, the values set must contain one value. -// (4) If the operator is Exists or DoesNotExist, the value set must be empty. -// (5) If the operator is Gt or Lt, the values set must contain only one value, which will be interpreted as an integer. -// (6) The key is invalid due to its length, or sequence -// of characters. See validateLabelKey for more details. -// -// The empty string is a valid value in the input values set. -func NewRequirement(key string, op selection.Operator, vals []string) (*Requirement, error) { - if err := validateLabelKey(key); err != nil { - return nil, err - } - switch op { - case selection.In, selection.NotIn: - if len(vals) == 0 { - return nil, fmt.Errorf("for 'in', 'notin' operators, values set can't be empty") - } - case selection.Equals, selection.DoubleEquals, selection.NotEquals: - if len(vals) != 1 { - return nil, fmt.Errorf("exact-match compatibility requires one single value") - } - case selection.Exists, selection.DoesNotExist: - if len(vals) != 0 { - return nil, fmt.Errorf("values set must be empty for exists and does not exist") - } - case selection.GreaterThan, selection.LessThan: - if len(vals) != 1 { - return nil, fmt.Errorf("for 'Gt', 'Lt' operators, exactly one value is required") - } - for i := range vals { - if _, err := strconv.ParseInt(vals[i], 10, 64); err != nil { - return nil, fmt.Errorf("for 'Gt', 'Lt' operators, the value must be an integer") - } - } - default: - return nil, fmt.Errorf("operator '%v' is not recognized", op) - } - - for i := range vals { - if err := validateLabelValue(vals[i]); err != nil { - return nil, err - } - } - sort.Strings(vals) - return &Requirement{key: key, operator: op, strValues: vals}, nil -} - -func (r *Requirement) hasValue(value string) bool { - for i := range r.strValues { - if r.strValues[i] == value { - return true - } - } - return false -} - -// Matches returns true if the Requirement matches the input Labels. -// There is a match in the following cases: -// (1) The operator is Exists and Labels has the Requirement's key. -// (2) The operator is In, Labels has the Requirement's key and Labels' -// value for that key is in Requirement's value set. -// (3) The operator is NotIn, Labels has the Requirement's key and -// Labels' value for that key is not in Requirement's value set. -// (4) The operator is DoesNotExist or NotIn and Labels does not have the -// Requirement's key. -// (5) The operator is GreaterThanOperator or LessThanOperator, and Labels has -// the Requirement's key and the corresponding value satisfies mathematical inequality. -func (r *Requirement) Matches(ls Labels) bool { - switch r.operator { - case selection.In, selection.Equals, selection.DoubleEquals: - if !ls.Has(r.key) { - return false - } - return r.hasValue(ls.Get(r.key)) - case selection.NotIn, selection.NotEquals: - if !ls.Has(r.key) { - return true - } - return !r.hasValue(ls.Get(r.key)) - case selection.Exists: - return ls.Has(r.key) - case selection.DoesNotExist: - return !ls.Has(r.key) - case selection.GreaterThan, selection.LessThan: - if !ls.Has(r.key) { - return false - } - lsValue, err := strconv.ParseInt(ls.Get(r.key), 10, 64) - if err != nil { - glog.V(10).Infof("ParseInt failed for value %+v in label %+v, %+v", ls.Get(r.key), ls, err) - return false - } - - // There should be only one strValue in r.strValues, and can be converted to a integer. - if len(r.strValues) != 1 { - glog.V(10).Infof("Invalid values count %+v of requirement %#v, for 'Gt', 'Lt' operators, exactly one value is required", len(r.strValues), r) - return false - } - - var rValue int64 - for i := range r.strValues { - rValue, err = strconv.ParseInt(r.strValues[i], 10, 64) - if err != nil { - glog.V(10).Infof("ParseInt failed for value %+v in requirement %#v, for 'Gt', 'Lt' operators, the value must be an integer", r.strValues[i], r) - return false - } - } - return (r.operator == selection.GreaterThan && lsValue > rValue) || (r.operator == selection.LessThan && lsValue < rValue) - default: - return false - } -} - -func (r *Requirement) Key() string { - return r.key -} -func (r *Requirement) Operator() selection.Operator { - return r.operator -} -func (r *Requirement) Values() sets.String { - ret := sets.String{} - for i := range r.strValues { - ret.Insert(r.strValues[i]) - } - return ret -} - -// Return true if the internalSelector doesn't restrict selection space -func (lsel internalSelector) Empty() bool { - if lsel == nil { - return true - } - return len(lsel) == 0 -} - -// String returns a human-readable string that represents this -// Requirement. If called on an invalid Requirement, an error is -// returned. See NewRequirement for creating a valid Requirement. -func (r *Requirement) String() string { - var buffer bytes.Buffer - if r.operator == selection.DoesNotExist { - buffer.WriteString("!") - } - buffer.WriteString(r.key) - - switch r.operator { - case selection.Equals: - buffer.WriteString("=") - case selection.DoubleEquals: - buffer.WriteString("==") - case selection.NotEquals: - buffer.WriteString("!=") - case selection.In: - buffer.WriteString(" in ") - case selection.NotIn: - buffer.WriteString(" notin ") - case selection.GreaterThan: - buffer.WriteString(">") - case selection.LessThan: - buffer.WriteString("<") - case selection.Exists, selection.DoesNotExist: - return buffer.String() - } - - switch r.operator { - case selection.In, selection.NotIn: - buffer.WriteString("(") - } - if len(r.strValues) == 1 { - buffer.WriteString(r.strValues[0]) - } else { // only > 1 since == 0 prohibited by NewRequirement - buffer.WriteString(strings.Join(r.strValues, ",")) - } - - switch r.operator { - case selection.In, selection.NotIn: - buffer.WriteString(")") - } - return buffer.String() -} - -// Add adds requirements to the selector. It copies the current selector returning a new one -func (lsel internalSelector) Add(reqs ...Requirement) Selector { - var sel internalSelector - for ix := range lsel { - sel = append(sel, lsel[ix]) - } - for _, r := range reqs { - sel = append(sel, r) - } - sort.Sort(ByKey(sel)) - return sel -} - -// Matches for a internalSelector returns true if all -// its Requirements match the input Labels. If any -// Requirement does not match, false is returned. -func (lsel internalSelector) Matches(l Labels) bool { - for ix := range lsel { - if matches := lsel[ix].Matches(l); !matches { - return false - } - } - return true -} - -func (lsel internalSelector) Requirements() (Requirements, bool) { return Requirements(lsel), true } - -// String returns a comma-separated string of all -// the internalSelector Requirements' human-readable strings. -func (lsel internalSelector) String() string { - var reqs []string - for ix := range lsel { - reqs = append(reqs, lsel[ix].String()) - } - return strings.Join(reqs, ",") -} - -// constants definition for lexer token -type Token int - -const ( - ErrorToken Token = iota - EndOfStringToken - ClosedParToken - CommaToken - DoesNotExistToken - DoubleEqualsToken - EqualsToken - GreaterThanToken - IdentifierToken // to represent keys and values - InToken - LessThanToken - NotEqualsToken - NotInToken - OpenParToken -) - -// string2token contains the mapping between lexer Token and token literal -// (except IdentifierToken, EndOfStringToken and ErrorToken since it makes no sense) -var string2token = map[string]Token{ - ")": ClosedParToken, - ",": CommaToken, - "!": DoesNotExistToken, - "==": DoubleEqualsToken, - "=": EqualsToken, - ">": GreaterThanToken, - "in": InToken, - "<": LessThanToken, - "!=": NotEqualsToken, - "notin": NotInToken, - "(": OpenParToken, -} - -// The item produced by the lexer. It contains the Token and the literal. -type ScannedItem struct { - tok Token - literal string -} - -// isWhitespace returns true if the rune is a space, tab, or newline. -func isWhitespace(ch byte) bool { - return ch == ' ' || ch == '\t' || ch == '\r' || ch == '\n' -} - -// isSpecialSymbol detect if the character ch can be an operator -func isSpecialSymbol(ch byte) bool { - switch ch { - case '=', '!', '(', ')', ',', '>', '<': - return true - } - return false -} - -// Lexer represents the Lexer struct for label selector. -// It contains necessary informationt to tokenize the input string -type Lexer struct { - // s stores the string to be tokenized - s string - // pos is the position currently tokenized - pos int -} - -// read return the character currently lexed -// increment the position and check the buffer overflow -func (l *Lexer) read() (b byte) { - b = 0 - if l.pos < len(l.s) { - b = l.s[l.pos] - l.pos++ - } - return b -} - -// unread 'undoes' the last read character -func (l *Lexer) unread() { - l.pos-- -} - -// scanIdOrKeyword scans string to recognize literal token (for example 'in') or an identifier. -func (l *Lexer) scanIdOrKeyword() (tok Token, lit string) { - var buffer []byte -IdentifierLoop: - for { - switch ch := l.read(); { - case ch == 0: - break IdentifierLoop - case isSpecialSymbol(ch) || isWhitespace(ch): - l.unread() - break IdentifierLoop - default: - buffer = append(buffer, ch) - } - } - s := string(buffer) - if val, ok := string2token[s]; ok { // is a literal token? - return val, s - } - return IdentifierToken, s // otherwise is an identifier -} - -// scanSpecialSymbol scans string starting with special symbol. -// special symbol identify non literal operators. "!=", "==", "=" -func (l *Lexer) scanSpecialSymbol() (Token, string) { - lastScannedItem := ScannedItem{} - var buffer []byte -SpecialSymbolLoop: - for { - switch ch := l.read(); { - case ch == 0: - break SpecialSymbolLoop - case isSpecialSymbol(ch): - buffer = append(buffer, ch) - if token, ok := string2token[string(buffer)]; ok { - lastScannedItem = ScannedItem{tok: token, literal: string(buffer)} - } else if lastScannedItem.tok != 0 { - l.unread() - break SpecialSymbolLoop - } - default: - l.unread() - break SpecialSymbolLoop - } - } - if lastScannedItem.tok == 0 { - return ErrorToken, fmt.Sprintf("error expected: keyword found '%s'", buffer) - } - return lastScannedItem.tok, lastScannedItem.literal -} - -// skipWhiteSpaces consumes all blank characters -// returning the first non blank character -func (l *Lexer) skipWhiteSpaces(ch byte) byte { - for { - if !isWhitespace(ch) { - return ch - } - ch = l.read() - } -} - -// Lex returns a pair of Token and the literal -// literal is meaningfull only for IdentifierToken token -func (l *Lexer) Lex() (tok Token, lit string) { - switch ch := l.skipWhiteSpaces(l.read()); { - case ch == 0: - return EndOfStringToken, "" - case isSpecialSymbol(ch): - l.unread() - return l.scanSpecialSymbol() - default: - l.unread() - return l.scanIdOrKeyword() - } -} - -// Parser data structure contains the label selector parser data structure -type Parser struct { - l *Lexer - scannedItems []ScannedItem - position int -} - -// Parser context represents context during parsing: -// some literal for example 'in' and 'notin' can be -// recognized as operator for example 'x in (a)' but -// it can be recognized as value for example 'value in (in)' -type ParserContext int - -const ( - KeyAndOperator ParserContext = iota - Values -) - -// lookahead func returns the current token and string. No increment of current position -func (p *Parser) lookahead(context ParserContext) (Token, string) { - tok, lit := p.scannedItems[p.position].tok, p.scannedItems[p.position].literal - if context == Values { - switch tok { - case InToken, NotInToken: - tok = IdentifierToken - } - } - return tok, lit -} - -// consume returns current token and string. Increments the the position -func (p *Parser) consume(context ParserContext) (Token, string) { - p.position++ - tok, lit := p.scannedItems[p.position-1].tok, p.scannedItems[p.position-1].literal - if context == Values { - switch tok { - case InToken, NotInToken: - tok = IdentifierToken - } - } - return tok, lit -} - -// scan runs through the input string and stores the ScannedItem in an array -// Parser can now lookahead and consume the tokens -func (p *Parser) scan() { - for { - token, literal := p.l.Lex() - p.scannedItems = append(p.scannedItems, ScannedItem{token, literal}) - if token == EndOfStringToken { - break - } - } -} - -// parse runs the left recursive descending algorithm -// on input string. It returns a list of Requirement objects. -func (p *Parser) parse() (internalSelector, error) { - p.scan() // init scannedItems - - var requirements internalSelector - for { - tok, lit := p.lookahead(Values) - switch tok { - case IdentifierToken, DoesNotExistToken: - r, err := p.parseRequirement() - if err != nil { - return nil, fmt.Errorf("unable to parse requirement: %v", err) - } - requirements = append(requirements, *r) - t, l := p.consume(Values) - switch t { - case EndOfStringToken: - return requirements, nil - case CommaToken: - t2, l2 := p.lookahead(Values) - if t2 != IdentifierToken && t2 != DoesNotExistToken { - return nil, fmt.Errorf("found '%s', expected: identifier after ','", l2) - } - default: - return nil, fmt.Errorf("found '%s', expected: ',' or 'end of string'", l) - } - case EndOfStringToken: - return requirements, nil - default: - return nil, fmt.Errorf("found '%s', expected: !, identifier, or 'end of string'", lit) - } - } -} - -func (p *Parser) parseRequirement() (*Requirement, error) { - key, operator, err := p.parseKeyAndInferOperator() - if err != nil { - return nil, err - } - if operator == selection.Exists || operator == selection.DoesNotExist { // operator found lookahead set checked - return NewRequirement(key, operator, []string{}) - } - operator, err = p.parseOperator() - if err != nil { - return nil, err - } - var values sets.String - switch operator { - case selection.In, selection.NotIn: - values, err = p.parseValues() - case selection.Equals, selection.DoubleEquals, selection.NotEquals, selection.GreaterThan, selection.LessThan: - values, err = p.parseExactValue() - } - if err != nil { - return nil, err - } - return NewRequirement(key, operator, values.List()) - -} - -// parseKeyAndInferOperator parse literals. -// in case of no operator '!, in, notin, ==, =, !=' are found -// the 'exists' operator is inferred -func (p *Parser) parseKeyAndInferOperator() (string, selection.Operator, error) { - var operator selection.Operator - tok, literal := p.consume(Values) - if tok == DoesNotExistToken { - operator = selection.DoesNotExist - tok, literal = p.consume(Values) - } - if tok != IdentifierToken { - err := fmt.Errorf("found '%s', expected: identifier", literal) - return "", "", err - } - if err := validateLabelKey(literal); err != nil { - return "", "", err - } - if t, _ := p.lookahead(Values); t == EndOfStringToken || t == CommaToken { - if operator != selection.DoesNotExist { - operator = selection.Exists - } - } - return literal, operator, nil -} - -// parseOperator return operator and eventually matchType -// matchType can be exact -func (p *Parser) parseOperator() (op selection.Operator, err error) { - tok, lit := p.consume(KeyAndOperator) - switch tok { - // DoesNotExistToken shouldn't be here because it's a unary operator, not a binary operator - case InToken: - op = selection.In - case EqualsToken: - op = selection.Equals - case DoubleEqualsToken: - op = selection.DoubleEquals - case GreaterThanToken: - op = selection.GreaterThan - case LessThanToken: - op = selection.LessThan - case NotInToken: - op = selection.NotIn - case NotEqualsToken: - op = selection.NotEquals - default: - return "", fmt.Errorf("found '%s', expected: '=', '!=', '==', 'in', notin'", lit) - } - return op, nil -} - -// parseValues parses the values for set based matching (x,y,z) -func (p *Parser) parseValues() (sets.String, error) { - tok, lit := p.consume(Values) - if tok != OpenParToken { - return nil, fmt.Errorf("found '%s' expected: '('", lit) - } - tok, lit = p.lookahead(Values) - switch tok { - case IdentifierToken, CommaToken: - s, err := p.parseIdentifiersList() // handles general cases - if err != nil { - return s, err - } - if tok, _ = p.consume(Values); tok != ClosedParToken { - return nil, fmt.Errorf("found '%s', expected: ')'", lit) - } - return s, nil - case ClosedParToken: // handles "()" - p.consume(Values) - return sets.NewString(""), nil - default: - return nil, fmt.Errorf("found '%s', expected: ',', ')' or identifier", lit) - } -} - -// parseIdentifiersList parses a (possibly empty) list of -// of comma separated (possibly empty) identifiers -func (p *Parser) parseIdentifiersList() (sets.String, error) { - s := sets.NewString() - for { - tok, lit := p.consume(Values) - switch tok { - case IdentifierToken: - s.Insert(lit) - tok2, lit2 := p.lookahead(Values) - switch tok2 { - case CommaToken: - continue - case ClosedParToken: - return s, nil - default: - return nil, fmt.Errorf("found '%s', expected: ',' or ')'", lit2) - } - case CommaToken: // handled here since we can have "(," - if s.Len() == 0 { - s.Insert("") // to handle (, - } - tok2, _ := p.lookahead(Values) - if tok2 == ClosedParToken { - s.Insert("") // to handle ,) Double "" removed by StringSet - return s, nil - } - if tok2 == CommaToken { - p.consume(Values) - s.Insert("") // to handle ,, Double "" removed by StringSet - } - default: // it can be operator - return s, fmt.Errorf("found '%s', expected: ',', or identifier", lit) - } - } -} - -// parseExactValue parses the only value for exact match style -func (p *Parser) parseExactValue() (sets.String, error) { - s := sets.NewString() - tok, lit := p.lookahead(Values) - if tok == EndOfStringToken || tok == CommaToken { - s.Insert("") - return s, nil - } - tok, lit = p.consume(Values) - if tok == IdentifierToken { - s.Insert(lit) - return s, nil - } - return nil, fmt.Errorf("found '%s', expected: identifier", lit) -} - -// Parse takes a string representing a selector and returns a selector -// object, or an error. This parsing function differs from ParseSelector -// as they parse different selectors with different syntaxes. -// The input will cause an error if it does not follow this form: -// -// ::= | "," -// ::= [!] KEY [ | ] -// ::= "" | -// ::= | -// ::= "notin" -// ::= "in" -// ::= "(" ")" -// ::= VALUE | VALUE "," -// ::= ["="|"=="|"!="] VALUE -// -// KEY is a sequence of one or more characters following [ DNS_SUBDOMAIN "/" ] DNS_LABEL. Max length is 63 characters. -// VALUE is a sequence of zero or more characters "([A-Za-z0-9_-\.])". Max length is 63 characters. -// Delimiter is white space: (' ', '\t') -// Example of valid syntax: -// "x in (foo,,baz),y,z notin ()" -// -// Note: -// (1) Inclusion - " in " - denotes that the KEY exists and is equal to any of the -// VALUEs in its requirement -// (2) Exclusion - " notin " - denotes that the KEY is not equal to any -// of the VALUEs in its requirement or does not exist -// (3) The empty string is a valid VALUE -// (4) A requirement with just a KEY - as in "y" above - denotes that -// the KEY exists and can be any VALUE. -// (5) A requirement with just !KEY requires that the KEY not exist. -// -func Parse(selector string) (Selector, error) { - parsedSelector, err := parse(selector) - if err == nil { - return parsedSelector, nil - } - return nil, err -} - -// parse parses the string representation of the selector and returns the internalSelector struct. -// The callers of this method can then decide how to return the internalSelector struct to their -// callers. This function has two callers now, one returns a Selector interface and the other -// returns a list of requirements. -func parse(selector string) (internalSelector, error) { - p := &Parser{l: &Lexer{s: selector, pos: 0}} - items, err := p.parse() - if err != nil { - return nil, err - } - sort.Sort(ByKey(items)) // sort to grant determistic parsing - return internalSelector(items), err -} - -func validateLabelKey(k string) error { - if errs := validation.IsQualifiedName(k); len(errs) != 0 { - return fmt.Errorf("invalid label key %q: %s", k, strings.Join(errs, "; ")) - } - return nil -} - -func validateLabelValue(v string) error { - if errs := validation.IsValidLabelValue(v); len(errs) != 0 { - return fmt.Errorf("invalid label value: %q: %s", v, strings.Join(errs, "; ")) - } - return nil -} - -// SelectorFromSet returns a Selector which will match exactly the given Set. A -// nil and empty Sets are considered equivalent to Everything(). -func SelectorFromSet(ls Set) Selector { - if ls == nil { - return internalSelector{} - } - var requirements internalSelector - for label, value := range ls { - if r, err := NewRequirement(label, selection.Equals, []string{value}); err != nil { - //TODO: double check errors when input comes from serialization? - return internalSelector{} - } else { - requirements = append(requirements, *r) - } - } - // sort to have deterministic string representation - sort.Sort(ByKey(requirements)) - return internalSelector(requirements) -} - -// SelectorFromValidatedSet returns a Selector which will match exactly the given Set. -// A nil and empty Sets are considered equivalent to Everything(). -// It assumes that Set is already validated and doesn't do any validation. -func SelectorFromValidatedSet(ls Set) Selector { - if ls == nil { - return internalSelector{} - } - var requirements internalSelector - for label, value := range ls { - requirements = append(requirements, Requirement{key: label, operator: selection.Equals, strValues: []string{value}}) - } - // sort to have deterministic string representation - sort.Sort(ByKey(requirements)) - return internalSelector(requirements) -} - -// ParseToRequirements takes a string representing a selector and returns a list of -// requirements. This function is suitable for those callers that perform additional -// processing on selector requirements. -// See the documentation for Parse() function for more details. -// TODO: Consider exporting the internalSelector type instead. -func ParseToRequirements(selector string) ([]Requirement, error) { - return parse(selector) -} diff --git a/vendor/k8s.io/kubernetes/pkg/labels/selector_test.go b/vendor/k8s.io/kubernetes/pkg/labels/selector_test.go deleted file mode 100644 index 2d0147b3..00000000 --- a/vendor/k8s.io/kubernetes/pkg/labels/selector_test.go +++ /dev/null @@ -1,575 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package labels - -import ( - "reflect" - "strings" - "testing" - - "k8s.io/kubernetes/pkg/selection" - "k8s.io/kubernetes/pkg/util/sets" -) - -func TestSelectorParse(t *testing.T) { - testGoodStrings := []string{ - "x=a,y=b,z=c", - "", - "x!=a,y=b", - "x=", - "x= ", - "x=,z= ", - "x= ,z= ", - "!x", - "x>1", - "x>1,z<5", - } - testBadStrings := []string{ - "x=a||y=b", - "x==a==b", - "!x=a", - "x1", Set{"x": "2"}) - expectMatch(t, "x<1", Set{"x": "0"}) - expectNoMatch(t, "x=z", Set{}) - expectNoMatch(t, "x=y", Set{"x": "z"}) - expectNoMatch(t, "x=y,z=w", Set{"x": "w", "z": "w"}) - expectNoMatch(t, "x!=y,z!=w", Set{"x": "z", "z": "w"}) - expectNoMatch(t, "x", Set{"y": "z"}) - expectNoMatch(t, "!x", Set{"x": "z"}) - expectNoMatch(t, "x>1", Set{"x": "0"}) - expectNoMatch(t, "x<1", Set{"x": "2"}) - - labelset := Set{ - "foo": "bar", - "baz": "blah", - } - expectMatch(t, "foo=bar", labelset) - expectMatch(t, "baz=blah", labelset) - expectMatch(t, "foo=bar,baz=blah", labelset) - expectNoMatch(t, "foo=blah", labelset) - expectNoMatch(t, "baz=bar", labelset) - expectNoMatch(t, "foo=bar,foobar=bar,baz=blah", labelset) -} - -func expectMatchDirect(t *testing.T, selector, ls Set) { - if !SelectorFromSet(selector).Matches(ls) { - t.Errorf("Wanted %s to match '%s', but it did not.\n", selector, ls) - } -} - -func expectNoMatchDirect(t *testing.T, selector, ls Set) { - if SelectorFromSet(selector).Matches(ls) { - t.Errorf("Wanted '%s' to not match '%s', but it did.", selector, ls) - } -} - -func TestSetMatches(t *testing.T) { - labelset := Set{ - "foo": "bar", - "baz": "blah", - } - expectMatchDirect(t, Set{}, labelset) - expectMatchDirect(t, Set{"foo": "bar"}, labelset) - expectMatchDirect(t, Set{"baz": "blah"}, labelset) - expectMatchDirect(t, Set{"foo": "bar", "baz": "blah"}, labelset) - - //TODO: bad values not handled for the moment in SelectorFromSet - //expectNoMatchDirect(t, Set{"foo": "=blah"}, labelset) - //expectNoMatchDirect(t, Set{"baz": "=bar"}, labelset) - //expectNoMatchDirect(t, Set{"foo": "=bar", "foobar": "bar", "baz": "blah"}, labelset) -} - -func TestNilMapIsValid(t *testing.T) { - selector := Set(nil).AsSelector() - if selector == nil { - t.Errorf("Selector for nil set should be Everything") - } - if !selector.Empty() { - t.Errorf("Selector for nil set should be Empty") - } -} - -func TestSetIsEmpty(t *testing.T) { - if !(Set{}).AsSelector().Empty() { - t.Errorf("Empty set should be empty") - } - if !(NewSelector()).Empty() { - t.Errorf("Nil Selector should be empty") - } -} - -func TestLexer(t *testing.T) { - testcases := []struct { - s string - t Token - }{ - {"", EndOfStringToken}, - {",", CommaToken}, - {"notin", NotInToken}, - {"in", InToken}, - {"=", EqualsToken}, - {"==", DoubleEqualsToken}, - {">", GreaterThanToken}, - {"<", LessThanToken}, - //Note that Lex returns the longest valid token found - {"!", DoesNotExistToken}, - {"!=", NotEqualsToken}, - {"(", OpenParToken}, - {")", ClosedParToken}, - //Non-"special" characters are considered part of an identifier - {"~", IdentifierToken}, - {"||", IdentifierToken}, - } - for _, v := range testcases { - l := &Lexer{s: v.s, pos: 0} - token, lit := l.Lex() - if token != v.t { - t.Errorf("Got %d it should be %d for '%s'", token, v.t, v.s) - } - if v.t != ErrorToken && lit != v.s { - t.Errorf("Got '%s' it should be '%s'", lit, v.s) - } - } -} - -func min(l, r int) (m int) { - m = r - if l < r { - m = l - } - return m -} - -func TestLexerSequence(t *testing.T) { - testcases := []struct { - s string - t []Token - }{ - {"key in ( value )", []Token{IdentifierToken, InToken, OpenParToken, IdentifierToken, ClosedParToken}}, - {"key notin ( value )", []Token{IdentifierToken, NotInToken, OpenParToken, IdentifierToken, ClosedParToken}}, - {"key in ( value1, value2 )", []Token{IdentifierToken, InToken, OpenParToken, IdentifierToken, CommaToken, IdentifierToken, ClosedParToken}}, - {"key", []Token{IdentifierToken}}, - {"!key", []Token{DoesNotExistToken, IdentifierToken}}, - {"()", []Token{OpenParToken, ClosedParToken}}, - {"x in (),y", []Token{IdentifierToken, InToken, OpenParToken, ClosedParToken, CommaToken, IdentifierToken}}, - {"== != (), = notin", []Token{DoubleEqualsToken, NotEqualsToken, OpenParToken, ClosedParToken, CommaToken, EqualsToken, NotInToken}}, - {"key>2", []Token{IdentifierToken, GreaterThanToken, IdentifierToken}}, - {"key<1", []Token{IdentifierToken, LessThanToken, IdentifierToken}}, - } - for _, v := range testcases { - var literals []string - var tokens []Token - l := &Lexer{s: v.s, pos: 0} - for { - token, lit := l.Lex() - if token == EndOfStringToken { - break - } - tokens = append(tokens, token) - literals = append(literals, lit) - } - if len(tokens) != len(v.t) { - t.Errorf("Bad number of tokens for '%s %d, %d", v.s, len(tokens), len(v.t)) - } - for i := 0; i < min(len(tokens), len(v.t)); i++ { - if tokens[i] != v.t[i] { - t.Errorf("Test '%s': Mismatching in token type found '%v' it should be '%v'", v.s, tokens[i], v.t[i]) - } - } - } -} -func TestParserLookahead(t *testing.T) { - testcases := []struct { - s string - t []Token - }{ - {"key in ( value )", []Token{IdentifierToken, InToken, OpenParToken, IdentifierToken, ClosedParToken, EndOfStringToken}}, - {"key notin ( value )", []Token{IdentifierToken, NotInToken, OpenParToken, IdentifierToken, ClosedParToken, EndOfStringToken}}, - {"key in ( value1, value2 )", []Token{IdentifierToken, InToken, OpenParToken, IdentifierToken, CommaToken, IdentifierToken, ClosedParToken, EndOfStringToken}}, - {"key", []Token{IdentifierToken, EndOfStringToken}}, - {"!key", []Token{DoesNotExistToken, IdentifierToken, EndOfStringToken}}, - {"()", []Token{OpenParToken, ClosedParToken, EndOfStringToken}}, - {"", []Token{EndOfStringToken}}, - {"x in (),y", []Token{IdentifierToken, InToken, OpenParToken, ClosedParToken, CommaToken, IdentifierToken, EndOfStringToken}}, - {"== != (), = notin", []Token{DoubleEqualsToken, NotEqualsToken, OpenParToken, ClosedParToken, CommaToken, EqualsToken, NotInToken, EndOfStringToken}}, - {"key>2", []Token{IdentifierToken, GreaterThanToken, IdentifierToken, EndOfStringToken}}, - {"key<1", []Token{IdentifierToken, LessThanToken, IdentifierToken, EndOfStringToken}}, - } - for _, v := range testcases { - p := &Parser{l: &Lexer{s: v.s, pos: 0}, position: 0} - p.scan() - if len(p.scannedItems) != len(v.t) { - t.Errorf("Expected %d items found %d", len(v.t), len(p.scannedItems)) - } - for { - token, lit := p.lookahead(KeyAndOperator) - - token2, lit2 := p.consume(KeyAndOperator) - if token == EndOfStringToken { - break - } - if token != token2 || lit != lit2 { - t.Errorf("Bad values") - } - } - } -} - -func TestRequirementConstructor(t *testing.T) { - requirementConstructorTests := []struct { - Key string - Op selection.Operator - Vals sets.String - Success bool - }{ - {"x", selection.In, nil, false}, - {"x", selection.NotIn, sets.NewString(), false}, - {"x", selection.In, sets.NewString("foo"), true}, - {"x", selection.NotIn, sets.NewString("foo"), true}, - {"x", selection.Exists, nil, true}, - {"x", selection.DoesNotExist, nil, true}, - {"1foo", selection.In, sets.NewString("bar"), true}, - {"1234", selection.In, sets.NewString("bar"), true}, - {"y", selection.GreaterThan, sets.NewString("1"), true}, - {"z", selection.LessThan, sets.NewString("6"), true}, - {"foo", selection.GreaterThan, sets.NewString("bar"), false}, - {"barz", selection.LessThan, sets.NewString("blah"), false}, - {strings.Repeat("a", 254), selection.Exists, nil, false}, //breaks DNS rule that len(key) <= 253 - } - for _, rc := range requirementConstructorTests { - if _, err := NewRequirement(rc.Key, rc.Op, rc.Vals.List()); err == nil && !rc.Success { - t.Errorf("expected error with key:%#v op:%v vals:%v, got no error", rc.Key, rc.Op, rc.Vals) - } else if err != nil && rc.Success { - t.Errorf("expected no error with key:%#v op:%v vals:%v, got:%v", rc.Key, rc.Op, rc.Vals, err) - } - } -} - -func TestToString(t *testing.T) { - var req Requirement - toStringTests := []struct { - In *internalSelector - Out string - Valid bool - }{ - - {&internalSelector{ - getRequirement("x", selection.In, sets.NewString("abc", "def"), t), - getRequirement("y", selection.NotIn, sets.NewString("jkl"), t), - getRequirement("z", selection.Exists, nil, t)}, - "x in (abc,def),y notin (jkl),z", true}, - {&internalSelector{ - getRequirement("x", selection.NotIn, sets.NewString("abc", "def"), t), - getRequirement("y", selection.NotEquals, sets.NewString("jkl"), t), - getRequirement("z", selection.DoesNotExist, nil, t)}, - "x notin (abc,def),y!=jkl,!z", true}, - {&internalSelector{ - getRequirement("x", selection.In, sets.NewString("abc", "def"), t), - req}, // adding empty req for the trailing ',' - "x in (abc,def),", false}, - {&internalSelector{ - getRequirement("x", selection.NotIn, sets.NewString("abc"), t), - getRequirement("y", selection.In, sets.NewString("jkl", "mno"), t), - getRequirement("z", selection.NotIn, sets.NewString(""), t)}, - "x notin (abc),y in (jkl,mno),z notin ()", true}, - {&internalSelector{ - getRequirement("x", selection.Equals, sets.NewString("abc"), t), - getRequirement("y", selection.DoubleEquals, sets.NewString("jkl"), t), - getRequirement("z", selection.NotEquals, sets.NewString("a"), t), - getRequirement("z", selection.Exists, nil, t)}, - "x=abc,y==jkl,z!=a,z", true}, - {&internalSelector{ - getRequirement("x", selection.GreaterThan, sets.NewString("2"), t), - getRequirement("y", selection.LessThan, sets.NewString("8"), t), - getRequirement("z", selection.Exists, nil, t)}, - "x>2,y<8,z", true}, - } - for _, ts := range toStringTests { - if out := ts.In.String(); out == "" && ts.Valid { - t.Errorf("%#v.String() => '%v' expected no error", ts.In, out) - } else if out != ts.Out { - t.Errorf("%#v.String() => '%v' want '%v'", ts.In, out, ts.Out) - } - } -} - -func TestRequirementSelectorMatching(t *testing.T) { - var req Requirement - labelSelectorMatchingTests := []struct { - Set Set - Sel Selector - Match bool - }{ - {Set{"x": "foo", "y": "baz"}, &internalSelector{ - req, - }, false}, - {Set{"x": "foo", "y": "baz"}, &internalSelector{ - getRequirement("x", selection.In, sets.NewString("foo"), t), - getRequirement("y", selection.NotIn, sets.NewString("alpha"), t), - }, true}, - {Set{"x": "foo", "y": "baz"}, &internalSelector{ - getRequirement("x", selection.In, sets.NewString("foo"), t), - getRequirement("y", selection.In, sets.NewString("alpha"), t), - }, false}, - {Set{"y": ""}, &internalSelector{ - getRequirement("x", selection.NotIn, sets.NewString(""), t), - getRequirement("y", selection.Exists, nil, t), - }, true}, - {Set{"y": ""}, &internalSelector{ - getRequirement("x", selection.DoesNotExist, nil, t), - getRequirement("y", selection.Exists, nil, t), - }, true}, - {Set{"y": ""}, &internalSelector{ - getRequirement("x", selection.NotIn, sets.NewString(""), t), - getRequirement("y", selection.DoesNotExist, nil, t), - }, false}, - {Set{"y": "baz"}, &internalSelector{ - getRequirement("x", selection.In, sets.NewString(""), t), - }, false}, - {Set{"z": "2"}, &internalSelector{ - getRequirement("z", selection.GreaterThan, sets.NewString("1"), t), - }, true}, - {Set{"z": "v2"}, &internalSelector{ - getRequirement("z", selection.GreaterThan, sets.NewString("1"), t), - }, false}, - } - for _, lsm := range labelSelectorMatchingTests { - if match := lsm.Sel.Matches(lsm.Set); match != lsm.Match { - t.Errorf("%+v.Matches(%#v) => %v, want %v", lsm.Sel, lsm.Set, match, lsm.Match) - } - } -} - -func TestSetSelectorParser(t *testing.T) { - setSelectorParserTests := []struct { - In string - Out Selector - Match bool - Valid bool - }{ - {"", NewSelector(), true, true}, - {"\rx", internalSelector{ - getRequirement("x", selection.Exists, nil, t), - }, true, true}, - {"this-is-a-dns.domain.com/key-with-dash", internalSelector{ - getRequirement("this-is-a-dns.domain.com/key-with-dash", selection.Exists, nil, t), - }, true, true}, - {"this-is-another-dns.domain.com/key-with-dash in (so,what)", internalSelector{ - getRequirement("this-is-another-dns.domain.com/key-with-dash", selection.In, sets.NewString("so", "what"), t), - }, true, true}, - {"0.1.2.domain/99 notin (10.10.100.1, tick.tack.clock)", internalSelector{ - getRequirement("0.1.2.domain/99", selection.NotIn, sets.NewString("10.10.100.1", "tick.tack.clock"), t), - }, true, true}, - {"foo in (abc)", internalSelector{ - getRequirement("foo", selection.In, sets.NewString("abc"), t), - }, true, true}, - {"x notin\n (abc)", internalSelector{ - getRequirement("x", selection.NotIn, sets.NewString("abc"), t), - }, true, true}, - {"x notin \t (abc,def)", internalSelector{ - getRequirement("x", selection.NotIn, sets.NewString("abc", "def"), t), - }, true, true}, - {"x in (abc,def)", internalSelector{ - getRequirement("x", selection.In, sets.NewString("abc", "def"), t), - }, true, true}, - {"x in (abc,)", internalSelector{ - getRequirement("x", selection.In, sets.NewString("abc", ""), t), - }, true, true}, - {"x in ()", internalSelector{ - getRequirement("x", selection.In, sets.NewString(""), t), - }, true, true}, - {"x notin (abc,,def),bar,z in (),w", internalSelector{ - getRequirement("bar", selection.Exists, nil, t), - getRequirement("w", selection.Exists, nil, t), - getRequirement("x", selection.NotIn, sets.NewString("abc", "", "def"), t), - getRequirement("z", selection.In, sets.NewString(""), t), - }, true, true}, - {"x,y in (a)", internalSelector{ - getRequirement("y", selection.In, sets.NewString("a"), t), - getRequirement("x", selection.Exists, nil, t), - }, false, true}, - {"x=a", internalSelector{ - getRequirement("x", selection.Equals, sets.NewString("a"), t), - }, true, true}, - {"x>1", internalSelector{ - getRequirement("x", selection.GreaterThan, sets.NewString("1"), t), - }, true, true}, - {"x<7", internalSelector{ - getRequirement("x", selection.LessThan, sets.NewString("7"), t), - }, true, true}, - {"x=a,y!=b", internalSelector{ - getRequirement("x", selection.Equals, sets.NewString("a"), t), - getRequirement("y", selection.NotEquals, sets.NewString("b"), t), - }, true, true}, - {"x=a,y!=b,z in (h,i,j)", internalSelector{ - getRequirement("x", selection.Equals, sets.NewString("a"), t), - getRequirement("y", selection.NotEquals, sets.NewString("b"), t), - getRequirement("z", selection.In, sets.NewString("h", "i", "j"), t), - }, true, true}, - {"x=a||y=b", internalSelector{}, false, false}, - {"x,,y", nil, true, false}, - {",x,y", nil, true, false}, - {"x nott in (y)", nil, true, false}, - {"x notin ( )", internalSelector{ - getRequirement("x", selection.NotIn, sets.NewString(""), t), - }, true, true}, - {"x notin (, a)", internalSelector{ - getRequirement("x", selection.NotIn, sets.NewString("", "a"), t), - }, true, true}, - {"a in (xyz),", nil, true, false}, - {"a in (xyz)b notin ()", nil, true, false}, - {"a ", internalSelector{ - getRequirement("a", selection.Exists, nil, t), - }, true, true}, - {"a in (x,y,notin, z,in)", internalSelector{ - getRequirement("a", selection.In, sets.NewString("in", "notin", "x", "y", "z"), t), - }, true, true}, // operator 'in' inside list of identifiers - {"a in (xyz abc)", nil, false, false}, // no comma - {"a notin(", nil, true, false}, // bad formed - {"a (", nil, false, false}, // cpar - {"(", nil, false, false}, // opar - } - - for _, ssp := range setSelectorParserTests { - if sel, err := Parse(ssp.In); err != nil && ssp.Valid { - t.Errorf("Parse(%s) => %v expected no error", ssp.In, err) - } else if err == nil && !ssp.Valid { - t.Errorf("Parse(%s) => %+v expected error", ssp.In, sel) - } else if ssp.Match && !reflect.DeepEqual(sel, ssp.Out) { - t.Errorf("Parse(%s) => parse output '%#v' doesn't match '%#v' expected match", ssp.In, sel, ssp.Out) - } - } -} - -func getRequirement(key string, op selection.Operator, vals sets.String, t *testing.T) Requirement { - req, err := NewRequirement(key, op, vals.List()) - if err != nil { - t.Errorf("NewRequirement(%v, %v, %v) resulted in error:%v", key, op, vals, err) - return Requirement{} - } - return *req -} - -func TestAdd(t *testing.T) { - testCases := []struct { - name string - sel Selector - key string - operator selection.Operator - values []string - refSelector Selector - }{ - { - "keyInOperator", - internalSelector{}, - "key", - selection.In, - []string{"value"}, - internalSelector{Requirement{"key", selection.In, []string{"value"}}}, - }, - { - "keyEqualsOperator", - internalSelector{Requirement{"key", selection.In, []string{"value"}}}, - "key2", - selection.Equals, - []string{"value2"}, - internalSelector{ - Requirement{"key", selection.In, []string{"value"}}, - Requirement{"key2", selection.Equals, []string{"value2"}}, - }, - }, - } - for _, ts := range testCases { - req, err := NewRequirement(ts.key, ts.operator, ts.values) - if err != nil { - t.Errorf("%s - Unable to create labels.Requirement", ts.name) - } - ts.sel = ts.sel.Add(*req) - if !reflect.DeepEqual(ts.sel, ts.refSelector) { - t.Errorf("%s - Expected %v found %v", ts.name, ts.refSelector, ts.sel) - } - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/master/BUILD b/vendor/k8s.io/kubernetes/pkg/master/BUILD index fcbc8c43..23bf6b9b 100644 --- a/vendor/k8s.io/kubernetes/pkg/master/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/master/BUILD @@ -35,7 +35,7 @@ go_library( "//pkg/apis/batch/install:go_default_library", "//pkg/apis/batch/v1:go_default_library", "//pkg/apis/certificates/install:go_default_library", - "//pkg/apis/certificates/v1alpha1:go_default_library", + "//pkg/apis/certificates/v1beta1:go_default_library", "//pkg/apis/componentconfig/install:go_default_library", "//pkg/apis/extensions/install:go_default_library", "//pkg/apis/extensions/v1beta1:go_default_library", @@ -44,11 +44,14 @@ go_library( "//pkg/apis/policy/v1beta1:go_default_library", "//pkg/apis/rbac/install:go_default_library", "//pkg/apis/rbac/v1alpha1:go_default_library", + "//pkg/apis/rbac/v1beta1:go_default_library", "//pkg/apis/storage/install:go_default_library", "//pkg/apis/storage/v1beta1:go_default_library", "//pkg/client/clientset_generated/clientset/typed/core/v1:go_default_library", "//pkg/client/clientset_generated/internalclientset/typed/core/internalversion:go_default_library", - "//pkg/genericapiserver:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic/registry:go_default_library", + "//pkg/genericapiserver/server:go_default_library", "//pkg/kubelet/client:go_default_library", "//pkg/master/thirdparty:go_default_library", "//pkg/master/tunneler:go_default_library", @@ -64,8 +67,6 @@ go_library( "//pkg/registry/core/service/ipallocator/controller:go_default_library", "//pkg/registry/core/service/portallocator/controller:go_default_library", "//pkg/registry/extensions/rest:go_default_library", - "//pkg/registry/generic:go_default_library", - "//pkg/registry/generic/registry:go_default_library", "//pkg/registry/policy/rest:go_default_library", "//pkg/registry/rbac/rest:go_default_library", "//pkg/registry/storage/rest:go_default_library", @@ -81,7 +82,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/util/net", "//vendor:k8s.io/apimachinery/pkg/util/runtime", "//vendor:k8s.io/apimachinery/pkg/util/wait", - "//vendor:k8s.io/apiserver/pkg/healthz", + "//vendor:k8s.io/apiserver/pkg/server/healthz", ], ) @@ -112,10 +113,9 @@ go_test( "//pkg/apis/rbac:go_default_library", "//pkg/client/clientset_generated/clientset/fake:go_default_library", "//pkg/client/clientset_generated/internalclientset/fake:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/testing/core:go_default_library", "//pkg/generated/openapi:go_default_library", - "//pkg/genericapiserver:go_default_library", + "//pkg/genericapiserver/server:go_default_library", "//pkg/kubelet/client:go_default_library", "//pkg/storage/etcd/testing:go_default_library", "//pkg/util/intstr:go_default_library", @@ -130,7 +130,9 @@ go_test( "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/util/net", "//vendor:k8s.io/apimachinery/pkg/util/sets", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apimachinery/pkg/version", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/master/controller.go b/vendor/k8s.io/kubernetes/pkg/master/controller.go index 82c186d0..51cdb02c 100644 --- a/vendor/k8s.io/kubernetes/pkg/master/controller.go +++ b/vendor/k8s.io/kubernetes/pkg/master/controller.go @@ -30,7 +30,7 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/endpoints" coreclient "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion" - "k8s.io/kubernetes/pkg/genericapiserver" + genericapiserver "k8s.io/kubernetes/pkg/genericapiserver/server" "k8s.io/kubernetes/pkg/registry/core/rangeallocation" corerest "k8s.io/kubernetes/pkg/registry/core/rest" servicecontroller "k8s.io/kubernetes/pkg/registry/core/service/ipallocator/controller" @@ -84,7 +84,7 @@ func (c *Config) NewBootstrapController(legacyRESTStorage corerest.LegacyRESTSto EndpointReconciler: c.EndpointReconcilerConfig.Reconciler, EndpointInterval: c.EndpointReconcilerConfig.Interval, - SystemNamespaces: []string{api.NamespaceSystem}, + SystemNamespaces: []string{metav1.NamespaceSystem}, SystemNamespacesInterval: 1 * time.Minute, ServiceClusterIPRegistry: legacyRESTStorage.ServiceClusterIPAllocator, @@ -169,7 +169,7 @@ func (c *Controller) UpdateKubernetesService(reconcile bool) error { // TODO: when it becomes possible to change this stuff, // stop polling and start watching. // TODO: add endpoints of all replicas, not just the elected master. - if err := c.CreateNamespaceIfNeeded(api.NamespaceDefault); err != nil { + if err := c.CreateNamespaceIfNeeded(metav1.NamespaceDefault); err != nil { return err } @@ -191,7 +191,7 @@ func (c *Controller) CreateNamespaceIfNeeded(ns string) error { return nil } newNs := &api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: ns, Namespace: "", }, @@ -238,21 +238,21 @@ func createEndpointPortSpec(endpointPort int, endpointPortName string, extraEndp // CreateMasterServiceIfNeeded will create the specified service if it // doesn't already exist. func (c *Controller) CreateOrUpdateMasterServiceIfNeeded(serviceName string, serviceIP net.IP, servicePorts []api.ServicePort, serviceType api.ServiceType, reconcile bool) error { - if s, err := c.ServiceClient.Services(api.NamespaceDefault).Get(serviceName, metav1.GetOptions{}); err == nil { + if s, err := c.ServiceClient.Services(metav1.NamespaceDefault).Get(serviceName, metav1.GetOptions{}); err == nil { // The service already exists. if reconcile { if svc, updated := getMasterServiceUpdateIfNeeded(s, servicePorts, serviceType); updated { glog.Warningf("Resetting master service %q to %#v", serviceName, svc) - _, err := c.ServiceClient.Services(api.NamespaceDefault).Update(svc) + _, err := c.ServiceClient.Services(metav1.NamespaceDefault).Update(svc) return err } } return nil } svc := &api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: serviceName, - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, Labels: map[string]string{"provider": "kubernetes", "component": "apiserver"}, }, Spec: api.ServiceSpec{ @@ -265,7 +265,7 @@ func (c *Controller) CreateOrUpdateMasterServiceIfNeeded(serviceName string, ser }, } - _, err := c.ServiceClient.Services(api.NamespaceDefault).Create(svc) + _, err := c.ServiceClient.Services(metav1.NamespaceDefault).Create(svc) if errors.IsAlreadyExists(err) { return c.CreateOrUpdateMasterServiceIfNeeded(serviceName, serviceIP, servicePorts, serviceType, reconcile) } @@ -318,12 +318,12 @@ func NewMasterCountEndpointReconciler(masterCount int, endpointClient coreclient // to be running (c.masterCount). // * ReconcileEndpoints is called periodically from all apiservers. func (r *masterCountEndpointReconciler) ReconcileEndpoints(serviceName string, ip net.IP, endpointPorts []api.EndpointPort, reconcilePorts bool) error { - e, err := r.endpointClient.Endpoints(api.NamespaceDefault).Get(serviceName, metav1.GetOptions{}) + e, err := r.endpointClient.Endpoints(metav1.NamespaceDefault).Get(serviceName, metav1.GetOptions{}) if err != nil { e = &api.Endpoints{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: serviceName, - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, } } @@ -333,7 +333,7 @@ func (r *masterCountEndpointReconciler) ReconcileEndpoints(serviceName string, i Addresses: []api.EndpointAddress{{IP: ip.String()}}, Ports: endpointPorts, }} - _, err = r.endpointClient.Endpoints(api.NamespaceDefault).Create(e) + _, err = r.endpointClient.Endpoints(metav1.NamespaceDefault).Create(e) return err } @@ -347,7 +347,7 @@ func (r *masterCountEndpointReconciler) ReconcileEndpoints(serviceName string, i Ports: endpointPorts, }} glog.Warningf("Resetting endpoints for master service %q to %#v", serviceName, e) - _, err = r.endpointClient.Endpoints(api.NamespaceDefault).Update(e) + _, err = r.endpointClient.Endpoints(metav1.NamespaceDefault).Update(e) return err } if ipCorrect && portsCorrect { @@ -383,7 +383,7 @@ func (r *masterCountEndpointReconciler) ReconcileEndpoints(serviceName string, i e.Subsets[0].Ports = endpointPorts } glog.Warningf("Resetting endpoints for master service %q to %v", serviceName, e) - _, err = r.endpointClient.Endpoints(api.NamespaceDefault).Update(e) + _, err = r.endpointClient.Endpoints(metav1.NamespaceDefault).Update(e) return err } diff --git a/vendor/k8s.io/kubernetes/pkg/master/controller_test.go b/vendor/k8s.io/kubernetes/pkg/master/controller_test.go index 4a61a107..1266b9c2 100644 --- a/vendor/k8s.io/kubernetes/pkg/master/controller_test.go +++ b/vendor/k8s.io/kubernetes/pkg/master/controller_test.go @@ -21,6 +21,7 @@ import ( "reflect" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/fake" "k8s.io/kubernetes/pkg/client/testing/core" @@ -28,9 +29,9 @@ import ( ) func TestReconcileEndpoints(t *testing.T) { - ns := api.NamespaceDefault - om := func(name string) api.ObjectMeta { - return api.ObjectMeta{Namespace: ns, Name: name} + ns := metav1.NamespaceDefault + om := func(name string) metav1.ObjectMeta { + return metav1.ObjectMeta{Namespace: ns, Name: name} } reconcile_tests := []struct { testName string @@ -541,9 +542,9 @@ func TestReconcileEndpoints(t *testing.T) { } func TestCreateOrUpdateMasterService(t *testing.T) { - ns := api.NamespaceDefault - om := func(name string) api.ObjectMeta { - return api.ObjectMeta{Namespace: ns, Name: name} + ns := metav1.NamespaceDefault + om := func(name string) metav1.ObjectMeta { + return metav1.ObjectMeta{Namespace: ns, Name: name} } create_tests := []struct { diff --git a/vendor/k8s.io/kubernetes/pkg/master/import_known_versions_test.go b/vendor/k8s.io/kubernetes/pkg/master/import_known_versions_test.go index 1332c9cb..68d64a27 100644 --- a/vendor/k8s.io/kubernetes/pkg/master/import_known_versions_test.go +++ b/vendor/k8s.io/kubernetes/pkg/master/import_known_versions_test.go @@ -76,10 +76,13 @@ var typesAllowedTags = map[reflect.Type]bool{ reflect.TypeOf(metav1.Duration{}): true, reflect.TypeOf(metav1.TypeMeta{}): true, reflect.TypeOf(metav1.ListMeta{}): true, + reflect.TypeOf(metav1.ObjectMeta{}): true, reflect.TypeOf(metav1.OwnerReference{}): true, reflect.TypeOf(metav1.LabelSelector{}): true, reflect.TypeOf(metav1.GetOptions{}): true, reflect.TypeOf(metav1.ExportOptions{}): true, + reflect.TypeOf(metav1.ListOptions{}): true, + reflect.TypeOf(metav1.DeleteOptions{}): true, } func ensureNoTags(t *testing.T, gvk schema.GroupVersionKind, tp reflect.Type, parents []reflect.Type) { diff --git a/vendor/k8s.io/kubernetes/pkg/master/master.go b/vendor/k8s.io/kubernetes/pkg/master/master.go index fb93d2ce..d0ded1e6 100644 --- a/vendor/k8s.io/kubernetes/pkg/master/master.go +++ b/vendor/k8s.io/kubernetes/pkg/master/master.go @@ -24,9 +24,10 @@ import ( "strconv" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" utilnet "k8s.io/apimachinery/pkg/util/net" - "k8s.io/apiserver/pkg/healthz" + "k8s.io/apiserver/pkg/server/healthz" "k8s.io/kubernetes/cmd/kube-apiserver/app/options" "k8s.io/kubernetes/pkg/api" apiv1 "k8s.io/kubernetes/pkg/api/v1" @@ -35,19 +36,20 @@ import ( authorizationapiv1beta1 "k8s.io/kubernetes/pkg/apis/authorization/v1beta1" autoscalingapiv1 "k8s.io/kubernetes/pkg/apis/autoscaling/v1" batchapiv1 "k8s.io/kubernetes/pkg/apis/batch/v1" - certificatesapiv1alpha1 "k8s.io/kubernetes/pkg/apis/certificates/v1alpha1" + certificatesapiv1beta1 "k8s.io/kubernetes/pkg/apis/certificates/v1beta1" extensionsapiv1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" policyapiv1beta1 "k8s.io/kubernetes/pkg/apis/policy/v1beta1" rbacapi "k8s.io/kubernetes/pkg/apis/rbac/v1alpha1" + rbacv1beta1 "k8s.io/kubernetes/pkg/apis/rbac/v1beta1" storageapiv1beta1 "k8s.io/kubernetes/pkg/apis/storage/v1beta1" corev1client "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1" coreclient "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion" - "k8s.io/kubernetes/pkg/genericapiserver" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + genericregistry "k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry" + genericapiserver "k8s.io/kubernetes/pkg/genericapiserver/server" kubeletclient "k8s.io/kubernetes/pkg/kubelet/client" "k8s.io/kubernetes/pkg/master/thirdparty" "k8s.io/kubernetes/pkg/master/tunneler" - "k8s.io/kubernetes/pkg/registry/generic" - genericregistry "k8s.io/kubernetes/pkg/registry/generic/registry" "k8s.io/kubernetes/pkg/routes" nodeutil "k8s.io/kubernetes/pkg/util/node" @@ -367,7 +369,7 @@ func (n nodeAddressProvider) externalAddresses() ([]string, error) { apiv1.NodeExternalIP, apiv1.NodeLegacyHostIP, } - nodes, err := n.nodeClient.List(apiv1.ListOptions{}) + nodes, err := n.nodeClient.List(metav1.ListOptions{}) if err != nil { return nil, err } @@ -393,9 +395,10 @@ func DefaultAPIResourceConfigSource() *genericapiserver.ResourceConfig { autoscalingapiv1.SchemeGroupVersion, appsapi.SchemeGroupVersion, policyapiv1beta1.SchemeGroupVersion, + rbacv1beta1.SchemeGroupVersion, rbacapi.SchemeGroupVersion, storageapiv1beta1.SchemeGroupVersion, - certificatesapiv1alpha1.SchemeGroupVersion, + certificatesapiv1beta1.SchemeGroupVersion, authorizationapiv1beta1.SchemeGroupVersion, ) diff --git a/vendor/k8s.io/kubernetes/pkg/master/master_openapi_test.go b/vendor/k8s.io/kubernetes/pkg/master/master_openapi_test.go index b0c44771..d4a557e7 100644 --- a/vendor/k8s.io/kubernetes/pkg/master/master_openapi_test.go +++ b/vendor/k8s.io/kubernetes/pkg/master/master_openapi_test.go @@ -28,7 +28,7 @@ import ( "testing" openapigen "k8s.io/kubernetes/pkg/generated/openapi" - "k8s.io/kubernetes/pkg/genericapiserver" + genericapiserver "k8s.io/kubernetes/pkg/genericapiserver/server" "github.com/go-openapi/loads" "github.com/go-openapi/spec" diff --git a/vendor/k8s.io/kubernetes/pkg/master/master_test.go b/vendor/k8s.io/kubernetes/pkg/master/master_test.go index 8941bda8..12f443ad 100644 --- a/vendor/k8s.io/kubernetes/pkg/master/master_test.go +++ b/vendor/k8s.io/kubernetes/pkg/master/master_test.go @@ -31,7 +31,9 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" utilnet "k8s.io/apimachinery/pkg/util/net" "k8s.io/apimachinery/pkg/util/sets" - genericapirequest "k8s.io/apiserver/pkg/request" + "k8s.io/apimachinery/pkg/version" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" apiv1 "k8s.io/kubernetes/pkg/api/v1" @@ -47,11 +49,10 @@ import ( extensionsapiv1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" "k8s.io/kubernetes/pkg/apis/rbac" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" - "k8s.io/kubernetes/pkg/client/restclient" - "k8s.io/kubernetes/pkg/genericapiserver" + genericapiserver "k8s.io/kubernetes/pkg/genericapiserver/server" kubeletclient "k8s.io/kubernetes/pkg/kubelet/client" etcdtesting "k8s.io/kubernetes/pkg/storage/etcd/testing" - "k8s.io/kubernetes/pkg/version" + kubeversion "k8s.io/kubernetes/pkg/version" "github.com/stretchr/testify/assert" ) @@ -77,7 +78,7 @@ func setUp(t *testing.T) (*Master, *etcdtesting.EtcdTestServer, Config, *assert. resourceEncoding.SetVersionEncoding(certificates.GroupName, *testapi.Certificates.GroupVersion(), schema.GroupVersion{Group: certificates.GroupName, Version: runtime.APIVersionInternal}) storageFactory := genericapiserver.NewDefaultStorageFactory(*storageConfig, testapi.StorageMediaType(), api.Codecs, resourceEncoding, DefaultAPIResourceConfigSource()) - kubeVersion := version.Get() + kubeVersion := kubeversion.Get() config.GenericConfig.Version = &kubeVersion config.StorageFactory = storageFactory config.GenericConfig.LoopbackClientConfig = &restclient.Config{APIPath: "/api", ContentConfig: restclient.ContentConfig{NegotiatedSerializer: api.Codecs}} @@ -156,8 +157,8 @@ func TestVersion(t *testing.T) { t.Errorf("unexpected error: %v", err) } - if !reflect.DeepEqual(version.Get(), info) { - t.Errorf("Expected %#v, Got %#v", version.Get(), info) + if !reflect.DeepEqual(kubeversion.Get(), info) { + t.Errorf("Expected %#v, Got %#v", kubeversion.Get(), info) } } @@ -187,14 +188,14 @@ func TestGetNodeAddresses(t *testing.T) { addressProvider := nodeAddressProvider{fakeNodeClient} // Fail case (no addresses associated with nodes) - nodes, _ := fakeNodeClient.List(apiv1.ListOptions{}) + nodes, _ := fakeNodeClient.List(metav1.ListOptions{}) addrs, err := addressProvider.externalAddresses() assert.Error(err, "addresses should have caused an error as there are no addresses.") assert.Equal([]string(nil), addrs) // Pass case with External type IP - nodes, _ = fakeNodeClient.List(apiv1.ListOptions{}) + nodes, _ = fakeNodeClient.List(metav1.ListOptions{}) for index := range nodes.Items { nodes.Items[index].Status.Addresses = []apiv1.NodeAddress{{Type: apiv1.NodeExternalIP, Address: "127.0.0.1"}} fakeNodeClient.Update(&nodes.Items[index]) @@ -204,7 +205,7 @@ func TestGetNodeAddresses(t *testing.T) { assert.Equal([]string{"127.0.0.1", "127.0.0.1"}, addrs) // Pass case with LegacyHost type IP - nodes, _ = fakeNodeClient.List(apiv1.ListOptions{}) + nodes, _ = fakeNodeClient.List(metav1.ListOptions{}) for index := range nodes.Items { nodes.Items[index].Status.Addresses = []apiv1.NodeAddress{{Type: apiv1.NodeLegacyHostIP, Address: "127.0.0.2"}} fakeNodeClient.Update(&nodes.Items[index]) diff --git a/vendor/k8s.io/kubernetes/pkg/master/thirdparty/BUILD b/vendor/k8s.io/kubernetes/pkg/master/thirdparty/BUILD index 61c7c95c..6cea7696 100644 --- a/vendor/k8s.io/kubernetes/pkg/master/thirdparty/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/master/thirdparty/BUILD @@ -14,21 +14,21 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/apis/extensions:go_default_library", - "//pkg/genericapiserver:go_default_library", - "//pkg/genericapiserver/api:go_default_library", - "//pkg/genericapiserver/api/handlers:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", + "//pkg/genericapiserver/endpoints:go_default_library", + "//pkg/genericapiserver/endpoints/handlers:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", + "//pkg/genericapiserver/server:go_default_library", "//pkg/registry/extensions/rest:go_default_library", "//pkg/registry/extensions/thirdpartyresourcedata:go_default_library", "//pkg/registry/extensions/thirdpartyresourcedata/storage:go_default_library", - "//pkg/registry/generic:go_default_library", "//pkg/storage/storagebackend:go_default_library", "//vendor:github.com/golang/glog", "//vendor:k8s.io/apimachinery/pkg/api/meta", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/master/thirdparty/thirdparty.go b/vendor/k8s.io/kubernetes/pkg/master/thirdparty/thirdparty.go index 746c14f5..6f8e06e9 100644 --- a/vendor/k8s.io/kubernetes/pkg/master/thirdparty/thirdparty.go +++ b/vendor/k8s.io/kubernetes/pkg/master/thirdparty/thirdparty.go @@ -27,17 +27,17 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/extensions" - "k8s.io/kubernetes/pkg/genericapiserver" - genericapi "k8s.io/kubernetes/pkg/genericapiserver/api" - genericapihandlers "k8s.io/kubernetes/pkg/genericapiserver/api/handlers" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + genericapi "k8s.io/kubernetes/pkg/genericapiserver/endpoints" + genericapihandlers "k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" + genericapiserver "k8s.io/kubernetes/pkg/genericapiserver/server" extensionsrest "k8s.io/kubernetes/pkg/registry/extensions/rest" "k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresourcedata" thirdpartyresourcedatastore "k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresourcedata/storage" - "k8s.io/kubernetes/pkg/registry/generic" "k8s.io/kubernetes/pkg/storage/storagebackend" ) diff --git a/vendor/k8s.io/kubernetes/pkg/master/tunneler/BUILD b/vendor/k8s.io/kubernetes/pkg/master/tunneler/BUILD index c0b65ffb..0f73449f 100644 --- a/vendor/k8s.io/kubernetes/pkg/master/tunneler/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/master/tunneler/BUILD @@ -14,8 +14,8 @@ go_test( library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/util/clock:go_default_library", "//vendor:github.com/stretchr/testify/assert", + "//vendor:k8s.io/client-go/util/clock", ], ) @@ -26,10 +26,10 @@ go_library( deps = [ "//pkg/ssh:go_default_library", "//pkg/util:go_default_library", - "//pkg/util/clock:go_default_library", "//vendor:github.com/golang/glog", "//vendor:github.com/prometheus/client_golang/prometheus", "//vendor:k8s.io/apimachinery/pkg/util/wait", + "//vendor:k8s.io/client-go/util/clock", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/master/tunneler/ssh.go b/vendor/k8s.io/kubernetes/pkg/master/tunneler/ssh.go index 73d0059b..d05d377f 100644 --- a/vendor/k8s.io/kubernetes/pkg/master/tunneler/ssh.go +++ b/vendor/k8s.io/kubernetes/pkg/master/tunneler/ssh.go @@ -27,9 +27,9 @@ import ( "time" "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/client-go/util/clock" "k8s.io/kubernetes/pkg/ssh" "k8s.io/kubernetes/pkg/util" - "k8s.io/kubernetes/pkg/util/clock" "github.com/golang/glog" "github.com/prometheus/client_golang/prometheus" diff --git a/vendor/k8s.io/kubernetes/pkg/master/tunneler/ssh_test.go b/vendor/k8s.io/kubernetes/pkg/master/tunneler/ssh_test.go index a169028d..8026645b 100644 --- a/vendor/k8s.io/kubernetes/pkg/master/tunneler/ssh_test.go +++ b/vendor/k8s.io/kubernetes/pkg/master/tunneler/ssh_test.go @@ -24,7 +24,7 @@ import ( "testing" "time" - "k8s.io/kubernetes/pkg/util/clock" + "k8s.io/client-go/util/clock" "github.com/stretchr/testify/assert" ) diff --git a/vendor/k8s.io/kubernetes/pkg/metrics/BUILD b/vendor/k8s.io/kubernetes/pkg/metrics/BUILD index 2bff8ebe..78c3c4a6 100644 --- a/vendor/k8s.io/kubernetes/pkg/metrics/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/metrics/BUILD @@ -20,14 +20,14 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/api:go_default_library", - "//pkg/api/v1:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", - "//pkg/fields:go_default_library", "//pkg/master/ports:go_default_library", "//pkg/util/system:go_default_library", "//vendor:github.com/golang/glog", "//vendor:github.com/prometheus/common/expfmt", "//vendor:github.com/prometheus/common/model", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/metrics/metrics_grabber.go b/vendor/k8s.io/kubernetes/pkg/metrics/metrics_grabber.go index d85c3d35..0686d092 100644 --- a/vendor/k8s.io/kubernetes/pkg/metrics/metrics_grabber.go +++ b/vendor/k8s.io/kubernetes/pkg/metrics/metrics_grabber.go @@ -20,10 +20,10 @@ import ( "fmt" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/fields" "k8s.io/kubernetes/pkg/master/ports" "k8s.io/kubernetes/pkg/util/system" @@ -54,7 +54,7 @@ type MetricsGrabber struct { func NewMetricsGrabber(c clientset.Interface, kubelets bool, scheduler bool, controllers bool, apiServer bool) (*MetricsGrabber, error) { registeredMaster := false masterName := "" - nodeList, err := c.Core().Nodes().List(v1.ListOptions{}) + nodeList, err := c.Core().Nodes().List(metav1.ListOptions{}) if err != nil { return nil, err } @@ -86,7 +86,7 @@ func NewMetricsGrabber(c clientset.Interface, kubelets bool, scheduler bool, con } func (g *MetricsGrabber) GrabFromKubelet(nodeName string) (KubeletMetrics, error) { - nodes, err := g.client.Core().Nodes().List(v1.ListOptions{FieldSelector: fields.Set{api.ObjectNameField: nodeName}.AsSelector().String()}) + nodes, err := g.client.Core().Nodes().List(metav1.ListOptions{FieldSelector: fields.Set{api.ObjectNameField: nodeName}.AsSelector().String()}) if err != nil { return KubeletMetrics{}, err } @@ -112,7 +112,7 @@ func (g *MetricsGrabber) GrabFromScheduler() (SchedulerMetrics, error) { if !g.registeredMaster { return SchedulerMetrics{}, fmt.Errorf("Master's Kubelet is not registered. Skipping Scheduler's metrics gathering.") } - output, err := g.getMetricsFromPod(fmt.Sprintf("%v-%v", "kube-scheduler", g.masterName), api.NamespaceSystem, ports.SchedulerPort) + output, err := g.getMetricsFromPod(fmt.Sprintf("%v-%v", "kube-scheduler", g.masterName), metav1.NamespaceSystem, ports.SchedulerPort) if err != nil { return SchedulerMetrics{}, err } @@ -123,7 +123,7 @@ func (g *MetricsGrabber) GrabFromControllerManager() (ControllerManagerMetrics, if !g.registeredMaster { return ControllerManagerMetrics{}, fmt.Errorf("Master's Kubelet is not registered. Skipping ControllerManager's metrics gathering.") } - output, err := g.getMetricsFromPod(fmt.Sprintf("%v-%v", "kube-controller-manager", g.masterName), api.NamespaceSystem, ports.ControllerManagerPort) + output, err := g.getMetricsFromPod(fmt.Sprintf("%v-%v", "kube-controller-manager", g.masterName), metav1.NamespaceSystem, ports.ControllerManagerPort) if err != nil { return ControllerManagerMetrics{}, err } @@ -167,7 +167,7 @@ func (g *MetricsGrabber) Grab() (MetricsCollection, error) { } if g.grabFromKubelets { result.KubeletMetrics = make(map[string]KubeletMetrics) - nodes, err := g.client.Core().Nodes().List(v1.ListOptions{}) + nodes, err := g.client.Core().Nodes().List(metav1.ListOptions{}) if err != nil { errs = append(errs, err) } else { diff --git a/vendor/k8s.io/kubernetes/pkg/proxy/config/BUILD b/vendor/k8s.io/kubernetes/pkg/proxy/config/BUILD index 1760c8bf..a243336b 100644 --- a/vendor/k8s.io/kubernetes/pkg/proxy/config/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/proxy/config/BUILD @@ -19,10 +19,11 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/client/cache:go_default_library", - "//pkg/fields:go_default_library", "//pkg/util/config:go_default_library", "//vendor:github.com/davecgh/go-spew/spew", "//vendor:github.com/golang/glog", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/types", ], ) @@ -34,8 +35,8 @@ go_test( tags = ["automanaged"], deps = [ "//pkg/api:go_default_library", - "//pkg/api/v1:go_default_library", "//pkg/client/cache:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/watch", ], @@ -48,6 +49,7 @@ go_test( deps = [ "//pkg/api:go_default_library", "//pkg/proxy/config:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/util/wait", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/proxy/config/api.go b/vendor/k8s.io/kubernetes/pkg/proxy/config/api.go index 4159022e..9c55e193 100644 --- a/vendor/k8s.io/kubernetes/pkg/proxy/config/api.go +++ b/vendor/k8s.io/kubernetes/pkg/proxy/config/api.go @@ -19,17 +19,18 @@ package config import ( "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/cache" - "k8s.io/kubernetes/pkg/fields" ) // NewSourceAPI creates config source that watches for changes to the services and endpoints. func NewSourceAPI(c cache.Getter, period time.Duration, servicesChan chan<- ServiceUpdate, endpointsChan chan<- EndpointsUpdate) { - servicesLW := cache.NewListWatchFromClient(c, "services", api.NamespaceAll, fields.Everything()) + servicesLW := cache.NewListWatchFromClient(c, "services", metav1.NamespaceAll, fields.Everything()) cache.NewReflector(servicesLW, &api.Service{}, NewServiceStore(nil, servicesChan), period).Run() - endpointsLW := cache.NewListWatchFromClient(c, "endpoints", api.NamespaceAll, fields.Everything()) + endpointsLW := cache.NewListWatchFromClient(c, "endpoints", metav1.NamespaceAll, fields.Everything()) cache.NewReflector(endpointsLW, &api.Endpoints{}, NewEndpointsStore(nil, endpointsChan), period).Run() } diff --git a/vendor/k8s.io/kubernetes/pkg/proxy/config/api_test.go b/vendor/k8s.io/kubernetes/pkg/proxy/config/api_test.go index 34f81a36..b55917bc 100644 --- a/vendor/k8s.io/kubernetes/pkg/proxy/config/api_test.go +++ b/vendor/k8s.io/kubernetes/pkg/proxy/config/api_test.go @@ -20,10 +20,10 @@ import ( "testing" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/cache" ) @@ -32,11 +32,11 @@ type fakeLW struct { watchResp watch.Interface } -func (lw fakeLW) List(options v1.ListOptions) (runtime.Object, error) { +func (lw fakeLW) List(options metav1.ListOptions) (runtime.Object, error) { return lw.listResp, nil } -func (lw fakeLW) Watch(options v1.ListOptions) (watch.Interface, error) { +func (lw fakeLW) Watch(options metav1.ListOptions) (watch.Interface, error) { return lw.watchResp, nil } @@ -44,13 +44,13 @@ var _ cache.ListerWatcher = fakeLW{} func TestNewServicesSourceApi_UpdatesAndMultipleServices(t *testing.T) { service1v1 := &api.Service{ - ObjectMeta: api.ObjectMeta{Namespace: "testnamespace", Name: "s1"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "testnamespace", Name: "s1"}, Spec: api.ServiceSpec{Ports: []api.ServicePort{{Protocol: "TCP", Port: 10}}}} service1v2 := &api.Service{ - ObjectMeta: api.ObjectMeta{Namespace: "testnamespace", Name: "s1"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "testnamespace", Name: "s1"}, Spec: api.ServiceSpec{Ports: []api.ServicePort{{Protocol: "TCP", Port: 20}}}} service2 := &api.Service{ - ObjectMeta: api.ObjectMeta{Namespace: "testnamespace", Name: "s2"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "testnamespace", Name: "s2"}, Spec: api.ServiceSpec{Ports: []api.ServicePort{{Protocol: "TCP", Port: 30}}}} // Setup fake api client. @@ -136,7 +136,7 @@ func TestNewServicesSourceApi_UpdatesAndMultipleServices(t *testing.T) { func TestNewEndpointsSourceApi_UpdatesAndMultipleEndpoints(t *testing.T) { endpoints1v1 := &api.Endpoints{ - ObjectMeta: api.ObjectMeta{Namespace: "testnamespace", Name: "e1"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "testnamespace", Name: "e1"}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{ {IP: "1.2.3.4"}, @@ -145,7 +145,7 @@ func TestNewEndpointsSourceApi_UpdatesAndMultipleEndpoints(t *testing.T) { }}, } endpoints1v2 := &api.Endpoints{ - ObjectMeta: api.ObjectMeta{Namespace: "testnamespace", Name: "e1"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "testnamespace", Name: "e1"}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{ {IP: "1.2.3.4"}, @@ -155,7 +155,7 @@ func TestNewEndpointsSourceApi_UpdatesAndMultipleEndpoints(t *testing.T) { }}, } endpoints2 := &api.Endpoints{ - ObjectMeta: api.ObjectMeta{Namespace: "testnamespace", Name: "e2"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "testnamespace", Name: "e2"}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{ {IP: "5.6.7.8"}, diff --git a/vendor/k8s.io/kubernetes/pkg/proxy/config/config_test.go b/vendor/k8s.io/kubernetes/pkg/proxy/config/config_test.go index e2e544a2..5be9f21d 100644 --- a/vendor/k8s.io/kubernetes/pkg/proxy/config/config_test.go +++ b/vendor/k8s.io/kubernetes/pkg/proxy/config/config_test.go @@ -22,6 +22,7 @@ import ( "testing" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/kubernetes/pkg/api" . "k8s.io/kubernetes/pkg/proxy/config" @@ -153,7 +154,7 @@ func TestNewServiceAddedAndNotified(t *testing.T) { handler := NewServiceHandlerMock() config.RegisterHandler(handler) serviceUpdate := CreateServiceUpdate(ADD, api.Service{ - ObjectMeta: api.ObjectMeta{Namespace: "testnamespace", Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "testnamespace", Name: "foo"}, Spec: api.ServiceSpec{Ports: []api.ServicePort{{Protocol: "TCP", Port: 10}}}, }) channel <- serviceUpdate @@ -167,14 +168,14 @@ func TestServiceAddedRemovedSetAndNotified(t *testing.T) { handler := NewServiceHandlerMock() config.RegisterHandler(handler) serviceUpdate := CreateServiceUpdate(ADD, api.Service{ - ObjectMeta: api.ObjectMeta{Namespace: "testnamespace", Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "testnamespace", Name: "foo"}, Spec: api.ServiceSpec{Ports: []api.ServicePort{{Protocol: "TCP", Port: 10}}}, }) channel <- serviceUpdate handler.ValidateServices(t, serviceUpdate.Services) serviceUpdate2 := CreateServiceUpdate(ADD, api.Service{ - ObjectMeta: api.ObjectMeta{Namespace: "testnamespace", Name: "bar"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "testnamespace", Name: "bar"}, Spec: api.ServiceSpec{Ports: []api.ServicePort{{Protocol: "TCP", Port: 20}}}, }) channel <- serviceUpdate2 @@ -182,14 +183,14 @@ func TestServiceAddedRemovedSetAndNotified(t *testing.T) { handler.ValidateServices(t, services) serviceUpdate3 := CreateServiceUpdate(REMOVE, api.Service{ - ObjectMeta: api.ObjectMeta{Namespace: "testnamespace", Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "testnamespace", Name: "foo"}, }) channel <- serviceUpdate3 services = []api.Service{serviceUpdate2.Services[0]} handler.ValidateServices(t, services) serviceUpdate4 := CreateServiceUpdate(SET, api.Service{ - ObjectMeta: api.ObjectMeta{Namespace: "testnamespace", Name: "foobar"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "testnamespace", Name: "foobar"}, Spec: api.ServiceSpec{Ports: []api.ServicePort{{Protocol: "TCP", Port: 99}}}, }) channel <- serviceUpdate4 @@ -207,11 +208,11 @@ func TestNewMultipleSourcesServicesAddedAndNotified(t *testing.T) { handler := NewServiceHandlerMock() config.RegisterHandler(handler) serviceUpdate1 := CreateServiceUpdate(ADD, api.Service{ - ObjectMeta: api.ObjectMeta{Namespace: "testnamespace", Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "testnamespace", Name: "foo"}, Spec: api.ServiceSpec{Ports: []api.ServicePort{{Protocol: "TCP", Port: 10}}}, }) serviceUpdate2 := CreateServiceUpdate(ADD, api.Service{ - ObjectMeta: api.ObjectMeta{Namespace: "testnamespace", Name: "bar"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "testnamespace", Name: "bar"}, Spec: api.ServiceSpec{Ports: []api.ServicePort{{Protocol: "TCP", Port: 20}}}, }) channelOne <- serviceUpdate1 @@ -229,11 +230,11 @@ func TestNewMultipleSourcesServicesMultipleHandlersAddedAndNotified(t *testing.T config.RegisterHandler(handler) config.RegisterHandler(handler2) serviceUpdate1 := CreateServiceUpdate(ADD, api.Service{ - ObjectMeta: api.ObjectMeta{Namespace: "testnamespace", Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "testnamespace", Name: "foo"}, Spec: api.ServiceSpec{Ports: []api.ServicePort{{Protocol: "TCP", Port: 10}}}, }) serviceUpdate2 := CreateServiceUpdate(ADD, api.Service{ - ObjectMeta: api.ObjectMeta{Namespace: "testnamespace", Name: "bar"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "testnamespace", Name: "bar"}, Spec: api.ServiceSpec{Ports: []api.ServicePort{{Protocol: "TCP", Port: 20}}}, }) channelOne <- serviceUpdate1 @@ -252,14 +253,14 @@ func TestNewMultipleSourcesEndpointsMultipleHandlersAddedAndNotified(t *testing. config.RegisterHandler(handler) config.RegisterHandler(handler2) endpointsUpdate1 := CreateEndpointsUpdate(ADD, api.Endpoints{ - ObjectMeta: api.ObjectMeta{Namespace: "testnamespace", Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "testnamespace", Name: "foo"}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "1.1.1.1"}, {IP: "2.2.2.2"}}, Ports: []api.EndpointPort{{Port: 80}}, }}, }) endpointsUpdate2 := CreateEndpointsUpdate(ADD, api.Endpoints{ - ObjectMeta: api.ObjectMeta{Namespace: "testnamespace", Name: "bar"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "testnamespace", Name: "bar"}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "3.3.3.3"}, {IP: "4.4.4.4"}}, Ports: []api.EndpointPort{{Port: 80}}, @@ -282,14 +283,14 @@ func TestNewMultipleSourcesEndpointsMultipleHandlersAddRemoveSetAndNotified(t *t config.RegisterHandler(handler) config.RegisterHandler(handler2) endpointsUpdate1 := CreateEndpointsUpdate(ADD, api.Endpoints{ - ObjectMeta: api.ObjectMeta{Namespace: "testnamespace", Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "testnamespace", Name: "foo"}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "1.1.1.1"}, {IP: "2.2.2.2"}}, Ports: []api.EndpointPort{{Port: 80}}, }}, }) endpointsUpdate2 := CreateEndpointsUpdate(ADD, api.Endpoints{ - ObjectMeta: api.ObjectMeta{Namespace: "testnamespace", Name: "bar"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "testnamespace", Name: "bar"}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "3.3.3.3"}, {IP: "4.4.4.4"}}, Ports: []api.EndpointPort{{Port: 80}}, @@ -304,7 +305,7 @@ func TestNewMultipleSourcesEndpointsMultipleHandlersAddRemoveSetAndNotified(t *t // Add one more endpointsUpdate3 := CreateEndpointsUpdate(ADD, api.Endpoints{ - ObjectMeta: api.ObjectMeta{Namespace: "testnamespace", Name: "foobar"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "testnamespace", Name: "foobar"}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "5.5.5.5"}, {IP: "6.6.6.6"}}, Ports: []api.EndpointPort{{Port: 80}}, @@ -317,7 +318,7 @@ func TestNewMultipleSourcesEndpointsMultipleHandlersAddRemoveSetAndNotified(t *t // Update the "foo" service with new endpoints endpointsUpdate1 = CreateEndpointsUpdate(ADD, api.Endpoints{ - ObjectMeta: api.ObjectMeta{Namespace: "testnamespace", Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "testnamespace", Name: "foo"}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "7.7.7.7"}}, Ports: []api.EndpointPort{{Port: 80}}, @@ -329,7 +330,7 @@ func TestNewMultipleSourcesEndpointsMultipleHandlersAddRemoveSetAndNotified(t *t handler2.ValidateEndpoints(t, endpoints) // Remove "bar" service - endpointsUpdate2 = CreateEndpointsUpdate(REMOVE, api.Endpoints{ObjectMeta: api.ObjectMeta{Namespace: "testnamespace", Name: "bar"}}) + endpointsUpdate2 = CreateEndpointsUpdate(REMOVE, api.Endpoints{ObjectMeta: metav1.ObjectMeta{Namespace: "testnamespace", Name: "bar"}}) channelTwo <- endpointsUpdate2 endpoints = []api.Endpoints{endpointsUpdate1.Endpoints[0], endpointsUpdate3.Endpoints[0]} diff --git a/vendor/k8s.io/kubernetes/pkg/proxy/iptables/BUILD b/vendor/k8s.io/kubernetes/pkg/proxy/iptables/BUILD index 03fab428..7c2e7b87 100644 --- a/vendor/k8s.io/kubernetes/pkg/proxy/iptables/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/proxy/iptables/BUILD @@ -21,7 +21,6 @@ go_library( "//pkg/proxy/healthcheck:go_default_library", "//pkg/util/config:go_default_library", "//pkg/util/exec:go_default_library", - "//pkg/util/flowcontrol:go_default_library", "//pkg/util/iptables:go_default_library", "//pkg/util/slice:go_default_library", "//pkg/util/sysctl:go_default_library", @@ -30,6 +29,7 @@ go_library( "//vendor:github.com/golang/glog", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/sets", + "//vendor:k8s.io/client-go/util/flowcontrol", ], ) @@ -46,6 +46,7 @@ go_test( "//pkg/util/intstr:go_default_library", "//pkg/util/iptables:go_default_library", "//pkg/util/iptables/testing:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/proxy/iptables/proxier.go b/vendor/k8s.io/kubernetes/pkg/proxy/iptables/proxier.go index 1bb7bb2f..41547bd8 100644 --- a/vendor/k8s.io/kubernetes/pkg/proxy/iptables/proxier.go +++ b/vendor/k8s.io/kubernetes/pkg/proxy/iptables/proxier.go @@ -36,6 +36,7 @@ import ( "github.com/golang/glog" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/client-go/util/flowcontrol" "k8s.io/kubernetes/pkg/api" apiservice "k8s.io/kubernetes/pkg/api/service" "k8s.io/kubernetes/pkg/api/v1" @@ -44,7 +45,6 @@ import ( "k8s.io/kubernetes/pkg/proxy/healthcheck" featuregate "k8s.io/kubernetes/pkg/util/config" utilexec "k8s.io/kubernetes/pkg/util/exec" - "k8s.io/kubernetes/pkg/util/flowcontrol" utiliptables "k8s.io/kubernetes/pkg/util/iptables" "k8s.io/kubernetes/pkg/util/slice" utilsysctl "k8s.io/kubernetes/pkg/util/sysctl" diff --git a/vendor/k8s.io/kubernetes/pkg/proxy/iptables/proxier_test.go b/vendor/k8s.io/kubernetes/pkg/proxy/iptables/proxier_test.go index dd4b7065..e8d1c21f 100644 --- a/vendor/k8s.io/kubernetes/pkg/proxy/iptables/proxier_test.go +++ b/vendor/k8s.io/kubernetes/pkg/proxy/iptables/proxier_test.go @@ -23,6 +23,7 @@ import ( "net" "strings" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/service" @@ -887,7 +888,7 @@ func onlyLocalNodePorts(t *testing.T, fp *Proxier, ipt *iptablestest.FakeIPTable func makeTestService(namespace, name string, svcFunc func(*api.Service)) api.Service { svc := api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: namespace, }, diff --git a/vendor/k8s.io/kubernetes/pkg/proxy/userspace/BUILD b/vendor/k8s.io/kubernetes/pkg/proxy/userspace/BUILD index b3b331aa..2ed2504f 100644 --- a/vendor/k8s.io/kubernetes/pkg/proxy/userspace/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/proxy/userspace/BUILD @@ -47,6 +47,7 @@ go_test( "//pkg/api:go_default_library", "//pkg/proxy:go_default_library", "//pkg/util/iptables/testing:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/net", "//vendor:k8s.io/apimachinery/pkg/util/runtime", diff --git a/vendor/k8s.io/kubernetes/pkg/proxy/userspace/proxier_test.go b/vendor/k8s.io/kubernetes/pkg/proxy/userspace/proxier_test.go index 71483d24..6650a3d0 100644 --- a/vendor/k8s.io/kubernetes/pkg/proxy/userspace/proxier_test.go +++ b/vendor/k8s.io/kubernetes/pkg/proxy/userspace/proxier_test.go @@ -29,6 +29,7 @@ import ( "testing" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/kubernetes/pkg/api" @@ -202,7 +203,7 @@ func TestTCPProxy(t *testing.T) { service := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "echo"}, Port: "p"} lb.OnEndpointsUpdate([]api.Endpoints{ { - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, Ports: []api.EndpointPort{{Name: "p", Port: tcpServerPort}}, @@ -229,7 +230,7 @@ func TestUDPProxy(t *testing.T) { service := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "echo"}, Port: "p"} lb.OnEndpointsUpdate([]api.Endpoints{ { - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, Ports: []api.EndpointPort{{Name: "p", Port: udpServerPort}}, @@ -256,7 +257,7 @@ func TestUDPProxyTimeout(t *testing.T) { service := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "echo"}, Port: "p"} lb.OnEndpointsUpdate([]api.Endpoints{ { - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, Ports: []api.EndpointPort{{Name: "p", Port: udpServerPort}}, @@ -287,13 +288,13 @@ func TestMultiPortProxy(t *testing.T) { serviceP := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "echo-p"}, Port: "p"} serviceQ := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "echo-q"}, Port: "q"} lb.OnEndpointsUpdate([]api.Endpoints{{ - ObjectMeta: api.ObjectMeta{Name: serviceP.Name, Namespace: serviceP.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: serviceP.Name, Namespace: serviceP.Namespace}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, Ports: []api.EndpointPort{{Name: "p", Protocol: "TCP", Port: tcpServerPort}}, }}, }, { - ObjectMeta: api.ObjectMeta{Name: serviceQ.Name, Namespace: serviceQ.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: serviceQ.Name, Namespace: serviceQ.Namespace}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, Ports: []api.EndpointPort{{Name: "q", Protocol: "UDP", Port: udpServerPort}}, @@ -334,7 +335,7 @@ func TestMultiPortOnServiceUpdate(t *testing.T) { waitForNumProxyLoops(t, p, 0) p.OnServiceUpdate([]api.Service{{ - ObjectMeta: api.ObjectMeta{Name: serviceP.Name, Namespace: serviceP.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: serviceP.Name, Namespace: serviceP.Namespace}, Spec: api.ServiceSpec{ClusterIP: "1.2.3.4", Ports: []api.ServicePort{{ Name: "p", Port: 80, @@ -382,7 +383,7 @@ func TestTCPProxyStop(t *testing.T) { service := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "echo"}, Port: "p"} lb.OnEndpointsUpdate([]api.Endpoints{ { - ObjectMeta: api.ObjectMeta{Namespace: service.Namespace, Name: service.Name}, + ObjectMeta: metav1.ObjectMeta{Namespace: service.Namespace, Name: service.Name}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, Ports: []api.EndpointPort{{Name: "p", Port: tcpServerPort}}, @@ -426,7 +427,7 @@ func TestUDPProxyStop(t *testing.T) { service := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "echo"}, Port: "p"} lb.OnEndpointsUpdate([]api.Endpoints{ { - ObjectMeta: api.ObjectMeta{Namespace: service.Namespace, Name: service.Name}, + ObjectMeta: metav1.ObjectMeta{Namespace: service.Namespace, Name: service.Name}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, Ports: []api.EndpointPort{{Name: "p", Port: udpServerPort}}, @@ -464,7 +465,7 @@ func TestTCPProxyUpdateDelete(t *testing.T) { service := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "echo"}, Port: "p"} lb.OnEndpointsUpdate([]api.Endpoints{ { - ObjectMeta: api.ObjectMeta{Namespace: service.Namespace, Name: service.Name}, + ObjectMeta: metav1.ObjectMeta{Namespace: service.Namespace, Name: service.Name}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, Ports: []api.EndpointPort{{Name: "p", Port: tcpServerPort}}, @@ -501,7 +502,7 @@ func TestUDPProxyUpdateDelete(t *testing.T) { service := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "echo"}, Port: "p"} lb.OnEndpointsUpdate([]api.Endpoints{ { - ObjectMeta: api.ObjectMeta{Namespace: service.Namespace, Name: service.Name}, + ObjectMeta: metav1.ObjectMeta{Namespace: service.Namespace, Name: service.Name}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, Ports: []api.EndpointPort{{Name: "p", Port: udpServerPort}}, @@ -537,7 +538,7 @@ func TestTCPProxyUpdateDeleteUpdate(t *testing.T) { lb := NewLoadBalancerRR() service := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "echo"}, Port: "p"} endpoint := api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, Ports: []api.EndpointPort{{Name: "p", Port: tcpServerPort}}, @@ -571,7 +572,7 @@ func TestTCPProxyUpdateDeleteUpdate(t *testing.T) { // need to add endpoint here because it got clean up during service delete lb.OnEndpointsUpdate([]api.Endpoints{endpoint}) p.OnServiceUpdate([]api.Service{{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Spec: api.ServiceSpec{ClusterIP: "1.2.3.4", Ports: []api.ServicePort{{ Name: "p", Port: int32(svcInfo.proxyPort), @@ -590,7 +591,7 @@ func TestUDPProxyUpdateDeleteUpdate(t *testing.T) { lb := NewLoadBalancerRR() service := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "echo"}, Port: "p"} endpoint := api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, Ports: []api.EndpointPort{{Name: "p", Port: udpServerPort}}, @@ -624,7 +625,7 @@ func TestUDPProxyUpdateDeleteUpdate(t *testing.T) { // need to add endpoint here because it got clean up during service delete lb.OnEndpointsUpdate([]api.Endpoints{endpoint}) p.OnServiceUpdate([]api.Service{{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Spec: api.ServiceSpec{ClusterIP: "1.2.3.4", Ports: []api.ServicePort{{ Name: "p", Port: int32(svcInfo.proxyPort), @@ -644,7 +645,7 @@ func TestTCPProxyUpdatePort(t *testing.T) { service := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "echo"}, Port: "p"} lb.OnEndpointsUpdate([]api.Endpoints{ { - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, Ports: []api.EndpointPort{{Name: "p", Port: tcpServerPort}}, @@ -666,7 +667,7 @@ func TestTCPProxyUpdatePort(t *testing.T) { waitForNumProxyLoops(t, p, 1) p.OnServiceUpdate([]api.Service{{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Spec: api.ServiceSpec{ClusterIP: "1.2.3.4", Ports: []api.ServicePort{{ Name: "p", Port: 99, @@ -692,7 +693,7 @@ func TestUDPProxyUpdatePort(t *testing.T) { service := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "echo"}, Port: "p"} lb.OnEndpointsUpdate([]api.Endpoints{ { - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, Ports: []api.EndpointPort{{Name: "p", Port: udpServerPort}}, @@ -713,7 +714,7 @@ func TestUDPProxyUpdatePort(t *testing.T) { waitForNumProxyLoops(t, p, 1) p.OnServiceUpdate([]api.Service{{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Spec: api.ServiceSpec{ClusterIP: "1.2.3.4", Ports: []api.ServicePort{{ Name: "p", Port: 99, @@ -737,7 +738,7 @@ func TestProxyUpdatePublicIPs(t *testing.T) { service := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "echo"}, Port: "p"} lb.OnEndpointsUpdate([]api.Endpoints{ { - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, Ports: []api.EndpointPort{{Name: "p", Port: tcpServerPort}}, @@ -759,7 +760,7 @@ func TestProxyUpdatePublicIPs(t *testing.T) { waitForNumProxyLoops(t, p, 1) p.OnServiceUpdate([]api.Service{{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Spec: api.ServiceSpec{ Ports: []api.ServicePort{{ Name: "p", @@ -788,7 +789,7 @@ func TestProxyUpdatePortal(t *testing.T) { lb := NewLoadBalancerRR() service := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "echo"}, Port: "p"} endpoint := api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, Ports: []api.EndpointPort{{Name: "p", Port: tcpServerPort}}, @@ -810,7 +811,7 @@ func TestProxyUpdatePortal(t *testing.T) { waitForNumProxyLoops(t, p, 1) p.OnServiceUpdate([]api.Service{{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Spec: api.ServiceSpec{ClusterIP: "", Ports: []api.ServicePort{{ Name: "p", Port: int32(svcInfo.proxyPort), @@ -823,7 +824,7 @@ func TestProxyUpdatePortal(t *testing.T) { } p.OnServiceUpdate([]api.Service{{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Spec: api.ServiceSpec{ClusterIP: "None", Ports: []api.ServicePort{{ Name: "p", Port: int32(svcInfo.proxyPort), @@ -836,7 +837,7 @@ func TestProxyUpdatePortal(t *testing.T) { } p.OnServiceUpdate([]api.Service{{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Spec: api.ServiceSpec{ClusterIP: "1.2.3.4", Ports: []api.ServicePort{{ Name: "p", Port: int32(svcInfo.proxyPort), diff --git a/vendor/k8s.io/kubernetes/pkg/proxy/userspace/roundrobin_test.go b/vendor/k8s.io/kubernetes/pkg/proxy/userspace/roundrobin_test.go index 19f32f0d..0e744c7e 100644 --- a/vendor/k8s.io/kubernetes/pkg/proxy/userspace/roundrobin_test.go +++ b/vendor/k8s.io/kubernetes/pkg/proxy/userspace/roundrobin_test.go @@ -20,6 +20,7 @@ import ( "net" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/proxy" @@ -107,7 +108,7 @@ func TestLoadBalanceWorksWithSingleEndpoint(t *testing.T) { } endpoints := make([]api.Endpoints, 1) endpoints[0] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "endpoint1"}}, Ports: []api.EndpointPort{{Name: "p", Port: 40}}, @@ -145,7 +146,7 @@ func TestLoadBalanceWorksWithMultipleEndpoints(t *testing.T) { } endpoints := make([]api.Endpoints, 1) endpoints[0] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "endpoint"}}, Ports: []api.EndpointPort{{Name: "p", Port: 1}, {Name: "p", Port: 2}, {Name: "p", Port: 3}}, @@ -173,7 +174,7 @@ func TestLoadBalanceWorksWithMultipleEndpointsMultiplePorts(t *testing.T) { } endpoints := make([]api.Endpoints, 1) endpoints[0] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: serviceP.Name, Namespace: serviceP.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: serviceP.Name, Namespace: serviceP.Namespace}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "endpoint1"}, {IP: "endpoint2"}}, @@ -216,7 +217,7 @@ func TestLoadBalanceWorksWithMultipleEndpointsAndUpdates(t *testing.T) { } endpoints := make([]api.Endpoints, 1) endpoints[0] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: serviceP.Name, Namespace: serviceP.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: serviceP.Name, Namespace: serviceP.Namespace}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "endpoint1"}}, @@ -255,7 +256,7 @@ func TestLoadBalanceWorksWithMultipleEndpointsAndUpdates(t *testing.T) { // Then update the configuration with one fewer endpoints, make sure // we start in the beginning again endpoints[0] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: serviceP.Name, Namespace: serviceP.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: serviceP.Name, Namespace: serviceP.Namespace}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "endpoint4"}}, @@ -288,7 +289,7 @@ func TestLoadBalanceWorksWithMultipleEndpointsAndUpdates(t *testing.T) { expectEndpoint(t, loadBalancer, serviceQ, shuffledEndpoints[1], nil) // Clear endpoints - endpoints[0] = api.Endpoints{ObjectMeta: api.ObjectMeta{Name: serviceP.Name, Namespace: serviceP.Namespace}, Subsets: nil} + endpoints[0] = api.Endpoints{ObjectMeta: metav1.ObjectMeta{Name: serviceP.Name, Namespace: serviceP.Namespace}, Subsets: nil} loadBalancer.OnEndpointsUpdate(endpoints) endpoint, err = loadBalancer.NextEndpoint(serviceP, nil, false) @@ -307,7 +308,7 @@ func TestLoadBalanceWorksWithServiceRemoval(t *testing.T) { } endpoints := make([]api.Endpoints, 2) endpoints[0] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: fooServiceP.Name, Namespace: fooServiceP.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: fooServiceP.Name, Namespace: fooServiceP.Namespace}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "endpoint1"}, {IP: "endpoint2"}, {IP: "endpoint3"}}, @@ -316,7 +317,7 @@ func TestLoadBalanceWorksWithServiceRemoval(t *testing.T) { }, } endpoints[1] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: barServiceP.Name, Namespace: barServiceP.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: barServiceP.Name, Namespace: barServiceP.Namespace}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "endpoint4"}, {IP: "endpoint5"}, {IP: "endpoint6"}}, @@ -365,7 +366,7 @@ func TestStickyLoadBalanceWorksWithNewServiceCalledFirst(t *testing.T) { loadBalancer.NewService(service, api.ServiceAffinityClientIP, 0) endpoints := make([]api.Endpoints, 1) endpoints[0] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{ {Addresses: []api.EndpointAddress{{IP: "endpoint1"}}, Ports: []api.EndpointPort{{Port: 1}}}, {Addresses: []api.EndpointAddress{{IP: "endpoint2"}}, Ports: []api.EndpointPort{{Port: 2}}}, @@ -421,7 +422,7 @@ func TestStickyLoadBalanceWorksWithNewServiceCalledSecond(t *testing.T) { // Call OnEndpointsUpdate() before NewService() endpoints := make([]api.Endpoints, 1) endpoints[0] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{ {Addresses: []api.EndpointAddress{{IP: "endpoint1"}}, Ports: []api.EndpointPort{{Port: 1}}}, {Addresses: []api.EndpointAddress{{IP: "endpoint2"}}, Ports: []api.EndpointPort{{Port: 2}}}, @@ -483,7 +484,7 @@ func TestStickyLoadBalanaceWorksWithMultipleEndpointsRemoveOne(t *testing.T) { loadBalancer.NewService(service, api.ServiceAffinityClientIP, 0) endpoints := make([]api.Endpoints, 1) endpoints[0] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "endpoint"}}, @@ -503,7 +504,7 @@ func TestStickyLoadBalanaceWorksWithMultipleEndpointsRemoveOne(t *testing.T) { client3Endpoint := shuffledEndpoints[2] endpoints[0] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "endpoint"}}, @@ -525,7 +526,7 @@ func TestStickyLoadBalanaceWorksWithMultipleEndpointsRemoveOne(t *testing.T) { expectEndpoint(t, loadBalancer, service, client3Endpoint, client3) endpoints[0] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "endpoint"}}, @@ -557,7 +558,7 @@ func TestStickyLoadBalanceWorksWithMultipleEndpointsAndUpdates(t *testing.T) { loadBalancer.NewService(service, api.ServiceAffinityClientIP, 0) endpoints := make([]api.Endpoints, 1) endpoints[0] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "endpoint"}}, @@ -577,7 +578,7 @@ func TestStickyLoadBalanceWorksWithMultipleEndpointsAndUpdates(t *testing.T) { // Then update the configuration with one fewer endpoints, make sure // we start in the beginning again endpoints[0] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "endpoint"}}, @@ -595,7 +596,7 @@ func TestStickyLoadBalanceWorksWithMultipleEndpointsAndUpdates(t *testing.T) { expectEndpoint(t, loadBalancer, service, shuffledEndpoints[1], client2) // Clear endpoints - endpoints[0] = api.Endpoints{ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: nil} + endpoints[0] = api.Endpoints{ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: nil} loadBalancer.OnEndpointsUpdate(endpoints) endpoint, err = loadBalancer.NextEndpoint(service, nil, false) @@ -617,7 +618,7 @@ func TestStickyLoadBalanceWorksWithServiceRemoval(t *testing.T) { loadBalancer.NewService(fooService, api.ServiceAffinityClientIP, 0) endpoints := make([]api.Endpoints, 2) endpoints[0] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: fooService.Name, Namespace: fooService.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: fooService.Name, Namespace: fooService.Namespace}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "endpoint"}}, @@ -628,7 +629,7 @@ func TestStickyLoadBalanceWorksWithServiceRemoval(t *testing.T) { barService := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "bar"}, Port: ""} loadBalancer.NewService(barService, api.ServiceAffinityClientIP, 0) endpoints[1] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: barService.Name, Namespace: barService.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: barService.Name, Namespace: barService.Namespace}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "endpoint"}}, @@ -686,7 +687,7 @@ func TestStickyLoadBalanceWorksWithEndpointFails(t *testing.T) { loadBalancer.NewService(service, api.ServiceAffinityClientIP, 0) endpoints := make([]api.Endpoints, 1) endpoints[0] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{ {Addresses: []api.EndpointAddress{{IP: "endpoint1"}}, Ports: []api.EndpointPort{{Port: 1}}}, {Addresses: []api.EndpointAddress{{IP: "endpoint2"}}, Ports: []api.EndpointPort{{Port: 2}}}, diff --git a/vendor/k8s.io/kubernetes/pkg/proxy/winuserspace/BUILD b/vendor/k8s.io/kubernetes/pkg/proxy/winuserspace/BUILD index 2aed90e7..f2fe3cd4 100644 --- a/vendor/k8s.io/kubernetes/pkg/proxy/winuserspace/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/proxy/winuserspace/BUILD @@ -46,6 +46,7 @@ go_test( "//pkg/api:go_default_library", "//pkg/proxy:go_default_library", "//pkg/util/netsh/testing:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/net", "//vendor:k8s.io/apimachinery/pkg/util/runtime", diff --git a/vendor/k8s.io/kubernetes/pkg/proxy/winuserspace/proxier_test.go b/vendor/k8s.io/kubernetes/pkg/proxy/winuserspace/proxier_test.go index fdedeeb5..60da5fda 100644 --- a/vendor/k8s.io/kubernetes/pkg/proxy/winuserspace/proxier_test.go +++ b/vendor/k8s.io/kubernetes/pkg/proxy/winuserspace/proxier_test.go @@ -29,6 +29,7 @@ import ( "testing" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/kubernetes/pkg/api" @@ -202,7 +203,7 @@ func TestTCPProxy(t *testing.T) { service := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "echo"}, Port: "p"} lb.OnEndpointsUpdate([]api.Endpoints{ { - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, Ports: []api.EndpointPort{{Name: "p", Port: tcpServerPort}}, @@ -229,7 +230,7 @@ func TestUDPProxy(t *testing.T) { service := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "echo"}, Port: "p"} lb.OnEndpointsUpdate([]api.Endpoints{ { - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, Ports: []api.EndpointPort{{Name: "p", Port: udpServerPort}}, @@ -256,7 +257,7 @@ func TestUDPProxyTimeout(t *testing.T) { service := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "echo"}, Port: "p"} lb.OnEndpointsUpdate([]api.Endpoints{ { - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, Ports: []api.EndpointPort{{Name: "p", Port: udpServerPort}}, @@ -287,13 +288,13 @@ func TestMultiPortProxy(t *testing.T) { serviceP := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "echo-p"}, Port: "p"} serviceQ := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "echo-q"}, Port: "q"} lb.OnEndpointsUpdate([]api.Endpoints{{ - ObjectMeta: api.ObjectMeta{Name: serviceP.Name, Namespace: serviceP.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: serviceP.Name, Namespace: serviceP.Namespace}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, Ports: []api.EndpointPort{{Name: "p", Protocol: "TCP", Port: tcpServerPort}}, }}, }, { - ObjectMeta: api.ObjectMeta{Name: serviceQ.Name, Namespace: serviceQ.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: serviceQ.Name, Namespace: serviceQ.Namespace}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, Ports: []api.EndpointPort{{Name: "q", Protocol: "UDP", Port: udpServerPort}}, @@ -334,7 +335,7 @@ func TestMultiPortOnServiceUpdate(t *testing.T) { waitForNumProxyLoops(t, p, 0) p.OnServiceUpdate([]api.Service{{ - ObjectMeta: api.ObjectMeta{Name: serviceP.Name, Namespace: serviceP.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: serviceP.Name, Namespace: serviceP.Namespace}, Spec: api.ServiceSpec{ClusterIP: "1.2.3.4", Ports: []api.ServicePort{{ Name: "p", Port: 80, @@ -382,7 +383,7 @@ func TestTCPProxyStop(t *testing.T) { service := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "echo"}, Port: "p"} lb.OnEndpointsUpdate([]api.Endpoints{ { - ObjectMeta: api.ObjectMeta{Namespace: service.Namespace, Name: service.Name}, + ObjectMeta: metav1.ObjectMeta{Namespace: service.Namespace, Name: service.Name}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, Ports: []api.EndpointPort{{Name: "p", Port: tcpServerPort}}, @@ -426,7 +427,7 @@ func TestUDPProxyStop(t *testing.T) { service := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "echo"}, Port: "p"} lb.OnEndpointsUpdate([]api.Endpoints{ { - ObjectMeta: api.ObjectMeta{Namespace: service.Namespace, Name: service.Name}, + ObjectMeta: metav1.ObjectMeta{Namespace: service.Namespace, Name: service.Name}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, Ports: []api.EndpointPort{{Name: "p", Port: udpServerPort}}, @@ -464,7 +465,7 @@ func TestTCPProxyUpdateDelete(t *testing.T) { service := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "echo"}, Port: "p"} lb.OnEndpointsUpdate([]api.Endpoints{ { - ObjectMeta: api.ObjectMeta{Namespace: service.Namespace, Name: service.Name}, + ObjectMeta: metav1.ObjectMeta{Namespace: service.Namespace, Name: service.Name}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, Ports: []api.EndpointPort{{Name: "p", Port: tcpServerPort}}, @@ -501,7 +502,7 @@ func TestUDPProxyUpdateDelete(t *testing.T) { service := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "echo"}, Port: "p"} lb.OnEndpointsUpdate([]api.Endpoints{ { - ObjectMeta: api.ObjectMeta{Namespace: service.Namespace, Name: service.Name}, + ObjectMeta: metav1.ObjectMeta{Namespace: service.Namespace, Name: service.Name}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, Ports: []api.EndpointPort{{Name: "p", Port: udpServerPort}}, @@ -537,7 +538,7 @@ func TestTCPProxyUpdateDeleteUpdate(t *testing.T) { lb := NewLoadBalancerRR() service := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "echo"}, Port: "p"} endpoint := api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, Ports: []api.EndpointPort{{Name: "p", Port: tcpServerPort}}, @@ -571,7 +572,7 @@ func TestTCPProxyUpdateDeleteUpdate(t *testing.T) { // need to add endpoint here because it got clean up during service delete lb.OnEndpointsUpdate([]api.Endpoints{endpoint}) p.OnServiceUpdate([]api.Service{{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Spec: api.ServiceSpec{ClusterIP: "1.2.3.4", Ports: []api.ServicePort{{ Name: "p", Port: int32(svcInfo.proxyPort), @@ -590,7 +591,7 @@ func TestUDPProxyUpdateDeleteUpdate(t *testing.T) { lb := NewLoadBalancerRR() service := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "echo"}, Port: "p"} endpoint := api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, Ports: []api.EndpointPort{{Name: "p", Port: udpServerPort}}, @@ -624,7 +625,7 @@ func TestUDPProxyUpdateDeleteUpdate(t *testing.T) { // need to add endpoint here because it got clean up during service delete lb.OnEndpointsUpdate([]api.Endpoints{endpoint}) p.OnServiceUpdate([]api.Service{{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Spec: api.ServiceSpec{ClusterIP: "1.2.3.4", Ports: []api.ServicePort{{ Name: "p", Port: int32(svcInfo.proxyPort), @@ -644,7 +645,7 @@ func TestTCPProxyUpdatePort(t *testing.T) { service := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "echo"}, Port: "p"} lb.OnEndpointsUpdate([]api.Endpoints{ { - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, Ports: []api.EndpointPort{{Name: "p", Port: tcpServerPort}}, @@ -666,7 +667,7 @@ func TestTCPProxyUpdatePort(t *testing.T) { waitForNumProxyLoops(t, p, 1) p.OnServiceUpdate([]api.Service{{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Spec: api.ServiceSpec{ClusterIP: "1.2.3.4", Ports: []api.ServicePort{{ Name: "p", Port: 99, @@ -692,7 +693,7 @@ func TestUDPProxyUpdatePort(t *testing.T) { service := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "echo"}, Port: "p"} lb.OnEndpointsUpdate([]api.Endpoints{ { - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, Ports: []api.EndpointPort{{Name: "p", Port: udpServerPort}}, @@ -713,7 +714,7 @@ func TestUDPProxyUpdatePort(t *testing.T) { waitForNumProxyLoops(t, p, 1) p.OnServiceUpdate([]api.Service{{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Spec: api.ServiceSpec{ClusterIP: "1.2.3.4", Ports: []api.ServicePort{{ Name: "p", Port: 99, @@ -737,7 +738,7 @@ func TestProxyUpdatePublicIPs(t *testing.T) { service := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "echo"}, Port: "p"} lb.OnEndpointsUpdate([]api.Endpoints{ { - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, Ports: []api.EndpointPort{{Name: "p", Port: tcpServerPort}}, @@ -759,7 +760,7 @@ func TestProxyUpdatePublicIPs(t *testing.T) { waitForNumProxyLoops(t, p, 1) p.OnServiceUpdate([]api.Service{{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Spec: api.ServiceSpec{ Ports: []api.ServicePort{{ Name: "p", @@ -788,7 +789,7 @@ func TestProxyUpdatePortal(t *testing.T) { lb := NewLoadBalancerRR() service := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "echo"}, Port: "p"} endpoint := api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, Ports: []api.EndpointPort{{Name: "p", Port: tcpServerPort}}, @@ -810,7 +811,7 @@ func TestProxyUpdatePortal(t *testing.T) { waitForNumProxyLoops(t, p, 1) p.OnServiceUpdate([]api.Service{{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Spec: api.ServiceSpec{ClusterIP: "", Ports: []api.ServicePort{{ Name: "p", Port: int32(svcInfo.proxyPort), @@ -823,7 +824,7 @@ func TestProxyUpdatePortal(t *testing.T) { } p.OnServiceUpdate([]api.Service{{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Spec: api.ServiceSpec{ClusterIP: "None", Ports: []api.ServicePort{{ Name: "p", Port: int32(svcInfo.proxyPort), @@ -836,7 +837,7 @@ func TestProxyUpdatePortal(t *testing.T) { } p.OnServiceUpdate([]api.Service{{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Spec: api.ServiceSpec{ClusterIP: "1.2.3.4", Ports: []api.ServicePort{{ Name: "p", Port: int32(svcInfo.proxyPort), diff --git a/vendor/k8s.io/kubernetes/pkg/proxy/winuserspace/roundrobin_test.go b/vendor/k8s.io/kubernetes/pkg/proxy/winuserspace/roundrobin_test.go index ea869985..8983e2e9 100644 --- a/vendor/k8s.io/kubernetes/pkg/proxy/winuserspace/roundrobin_test.go +++ b/vendor/k8s.io/kubernetes/pkg/proxy/winuserspace/roundrobin_test.go @@ -20,6 +20,7 @@ import ( "net" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/proxy" @@ -107,7 +108,7 @@ func TestLoadBalanceWorksWithSingleEndpoint(t *testing.T) { } endpoints := make([]api.Endpoints, 1) endpoints[0] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "endpoint1"}}, Ports: []api.EndpointPort{{Name: "p", Port: 40}}, @@ -145,7 +146,7 @@ func TestLoadBalanceWorksWithMultipleEndpoints(t *testing.T) { } endpoints := make([]api.Endpoints, 1) endpoints[0] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "endpoint"}}, Ports: []api.EndpointPort{{Name: "p", Port: 1}, {Name: "p", Port: 2}, {Name: "p", Port: 3}}, @@ -173,7 +174,7 @@ func TestLoadBalanceWorksWithMultipleEndpointsMultiplePorts(t *testing.T) { } endpoints := make([]api.Endpoints, 1) endpoints[0] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: serviceP.Name, Namespace: serviceP.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: serviceP.Name, Namespace: serviceP.Namespace}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "endpoint1"}, {IP: "endpoint2"}}, @@ -216,7 +217,7 @@ func TestLoadBalanceWorksWithMultipleEndpointsAndUpdates(t *testing.T) { } endpoints := make([]api.Endpoints, 1) endpoints[0] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: serviceP.Name, Namespace: serviceP.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: serviceP.Name, Namespace: serviceP.Namespace}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "endpoint1"}}, @@ -255,7 +256,7 @@ func TestLoadBalanceWorksWithMultipleEndpointsAndUpdates(t *testing.T) { // Then update the configuration with one fewer endpoints, make sure // we start in the beginning again endpoints[0] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: serviceP.Name, Namespace: serviceP.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: serviceP.Name, Namespace: serviceP.Namespace}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "endpoint4"}}, @@ -288,7 +289,7 @@ func TestLoadBalanceWorksWithMultipleEndpointsAndUpdates(t *testing.T) { expectEndpoint(t, loadBalancer, serviceQ, shuffledEndpoints[1], nil) // Clear endpoints - endpoints[0] = api.Endpoints{ObjectMeta: api.ObjectMeta{Name: serviceP.Name, Namespace: serviceP.Namespace}, Subsets: nil} + endpoints[0] = api.Endpoints{ObjectMeta: metav1.ObjectMeta{Name: serviceP.Name, Namespace: serviceP.Namespace}, Subsets: nil} loadBalancer.OnEndpointsUpdate(endpoints) endpoint, err = loadBalancer.NextEndpoint(serviceP, nil, false) @@ -307,7 +308,7 @@ func TestLoadBalanceWorksWithServiceRemoval(t *testing.T) { } endpoints := make([]api.Endpoints, 2) endpoints[0] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: fooServiceP.Name, Namespace: fooServiceP.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: fooServiceP.Name, Namespace: fooServiceP.Namespace}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "endpoint1"}, {IP: "endpoint2"}, {IP: "endpoint3"}}, @@ -316,7 +317,7 @@ func TestLoadBalanceWorksWithServiceRemoval(t *testing.T) { }, } endpoints[1] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: barServiceP.Name, Namespace: barServiceP.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: barServiceP.Name, Namespace: barServiceP.Namespace}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "endpoint4"}, {IP: "endpoint5"}, {IP: "endpoint6"}}, @@ -365,7 +366,7 @@ func TestStickyLoadBalanceWorksWithNewServiceCalledFirst(t *testing.T) { loadBalancer.NewService(service, api.ServiceAffinityClientIP, 0) endpoints := make([]api.Endpoints, 1) endpoints[0] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{ {Addresses: []api.EndpointAddress{{IP: "endpoint1"}}, Ports: []api.EndpointPort{{Port: 1}}}, {Addresses: []api.EndpointAddress{{IP: "endpoint2"}}, Ports: []api.EndpointPort{{Port: 2}}}, @@ -421,7 +422,7 @@ func TestStickyLoadBalanceWorksWithNewServiceCalledSecond(t *testing.T) { // Call OnEndpointsUpdate() before NewService() endpoints := make([]api.Endpoints, 1) endpoints[0] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{ {Addresses: []api.EndpointAddress{{IP: "endpoint1"}}, Ports: []api.EndpointPort{{Port: 1}}}, {Addresses: []api.EndpointAddress{{IP: "endpoint2"}}, Ports: []api.EndpointPort{{Port: 2}}}, @@ -483,7 +484,7 @@ func TestStickyLoadBalanaceWorksWithMultipleEndpointsRemoveOne(t *testing.T) { loadBalancer.NewService(service, api.ServiceAffinityClientIP, 0) endpoints := make([]api.Endpoints, 1) endpoints[0] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "endpoint"}}, @@ -503,7 +504,7 @@ func TestStickyLoadBalanaceWorksWithMultipleEndpointsRemoveOne(t *testing.T) { client3Endpoint := shuffledEndpoints[2] endpoints[0] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "endpoint"}}, @@ -525,7 +526,7 @@ func TestStickyLoadBalanaceWorksWithMultipleEndpointsRemoveOne(t *testing.T) { expectEndpoint(t, loadBalancer, service, client3Endpoint, client3) endpoints[0] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "endpoint"}}, @@ -557,7 +558,7 @@ func TestStickyLoadBalanceWorksWithMultipleEndpointsAndUpdates(t *testing.T) { loadBalancer.NewService(service, api.ServiceAffinityClientIP, 0) endpoints := make([]api.Endpoints, 1) endpoints[0] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "endpoint"}}, @@ -577,7 +578,7 @@ func TestStickyLoadBalanceWorksWithMultipleEndpointsAndUpdates(t *testing.T) { // Then update the configuration with one fewer endpoints, make sure // we start in the beginning again endpoints[0] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "endpoint"}}, @@ -595,7 +596,7 @@ func TestStickyLoadBalanceWorksWithMultipleEndpointsAndUpdates(t *testing.T) { expectEndpoint(t, loadBalancer, service, shuffledEndpoints[1], client2) // Clear endpoints - endpoints[0] = api.Endpoints{ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: nil} + endpoints[0] = api.Endpoints{ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: nil} loadBalancer.OnEndpointsUpdate(endpoints) endpoint, err = loadBalancer.NextEndpoint(service, nil, false) @@ -617,7 +618,7 @@ func TestStickyLoadBalanceWorksWithServiceRemoval(t *testing.T) { loadBalancer.NewService(fooService, api.ServiceAffinityClientIP, 0) endpoints := make([]api.Endpoints, 2) endpoints[0] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: fooService.Name, Namespace: fooService.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: fooService.Name, Namespace: fooService.Namespace}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "endpoint"}}, @@ -628,7 +629,7 @@ func TestStickyLoadBalanceWorksWithServiceRemoval(t *testing.T) { barService := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "bar"}, Port: ""} loadBalancer.NewService(barService, api.ServiceAffinityClientIP, 0) endpoints[1] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: barService.Name, Namespace: barService.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: barService.Name, Namespace: barService.Namespace}, Subsets: []api.EndpointSubset{ { Addresses: []api.EndpointAddress{{IP: "endpoint"}}, @@ -686,7 +687,7 @@ func TestStickyLoadBalanceWorksWithEndpointFails(t *testing.T) { loadBalancer.NewService(service, api.ServiceAffinityClientIP, 0) endpoints := make([]api.Endpoints, 1) endpoints[0] = api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: service.Name, Namespace: service.Namespace}, Subsets: []api.EndpointSubset{ {Addresses: []api.EndpointAddress{{IP: "endpoint1"}}, Ports: []api.EndpointPort{{Port: 1}}}, {Addresses: []api.EndpointAddress{{IP: "endpoint2"}}, Ports: []api.EndpointPort{{Port: 2}}}, diff --git a/vendor/k8s.io/kubernetes/pkg/quota/BUILD b/vendor/k8s.io/kubernetes/pkg/quota/BUILD index fead5cf2..103a3062 100644 --- a/vendor/k8s.io/kubernetes/pkg/quota/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/quota/BUILD @@ -16,13 +16,13 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/admission:go_default_library", "//pkg/api:go_default_library", "//pkg/api/resource:go_default_library", "//pkg/api/v1:go_default_library", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/util/sets", + "//vendor:k8s.io/apiserver/pkg/admission", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/quota/evaluator/core/BUILD b/vendor/k8s.io/kubernetes/pkg/quota/evaluator/core/BUILD index 8ae1e95e..79884aff 100644 --- a/vendor/k8s.io/kubernetes/pkg/quota/evaluator/core/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/quota/evaluator/core/BUILD @@ -23,7 +23,6 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/admission:go_default_library", "//pkg/api:go_default_library", "//pkg/api/resource:go_default_library", "//pkg/api/v1:go_default_library", @@ -34,10 +33,12 @@ go_library( "//pkg/kubelet/qos:go_default_library", "//pkg/quota:go_default_library", "//pkg/quota/generic:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/util/sets", "//vendor:k8s.io/apimachinery/pkg/util/validation/field", + "//vendor:k8s.io/apiserver/pkg/admission", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/quota/evaluator/core/configmap.go b/vendor/k8s.io/kubernetes/pkg/quota/evaluator/core/configmap.go index ecb9e952..edb2841c 100644 --- a/vendor/k8s.io/kubernetes/pkg/quota/evaluator/core/configmap.go +++ b/vendor/k8s.io/kubernetes/pkg/quota/evaluator/core/configmap.go @@ -17,9 +17,9 @@ limitations under the License. package core import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/pkg/quota" "k8s.io/kubernetes/pkg/quota/generic" @@ -31,7 +31,7 @@ func NewConfigMapEvaluator(kubeClient clientset.Interface) quota.Evaluator { AllowCreateOnUpdate: false, InternalGroupKind: api.Kind("ConfigMap"), ResourceName: api.ResourceConfigMaps, - ListFuncByNamespace: func(namespace string, options v1.ListOptions) ([]runtime.Object, error) { + ListFuncByNamespace: func(namespace string, options metav1.ListOptions) ([]runtime.Object, error) { itemList, err := kubeClient.Core().ConfigMaps(namespace).List(options) if err != nil { return nil, err diff --git a/vendor/k8s.io/kubernetes/pkg/quota/evaluator/core/persistent_volume_claims.go b/vendor/k8s.io/kubernetes/pkg/quota/evaluator/core/persistent_volume_claims.go index 85e3e7b1..12e399df 100644 --- a/vendor/k8s.io/kubernetes/pkg/quota/evaluator/core/persistent_volume_claims.go +++ b/vendor/k8s.io/kubernetes/pkg/quota/evaluator/core/persistent_volume_claims.go @@ -20,10 +20,11 @@ import ( "fmt" "strings" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/kubernetes/pkg/admission" + "k8s.io/apiserver/pkg/admission" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" @@ -64,7 +65,7 @@ func listPersistentVolumeClaimsByNamespaceFuncUsingClient(kubeClient clientset.I // TODO: ideally, we could pass dynamic client pool down into this code, and have one way of doing this. // unfortunately, dynamic client works with Unstructured objects, and when we calculate Usage, we require // structured objects. - return func(namespace string, options v1.ListOptions) ([]runtime.Object, error) { + return func(namespace string, options metav1.ListOptions) ([]runtime.Object, error) { itemList, err := kubeClient.Core().PersistentVolumeClaims(namespace).List(options) if err != nil { return nil, err diff --git a/vendor/k8s.io/kubernetes/pkg/quota/evaluator/core/persistent_volume_claims_test.go b/vendor/k8s.io/kubernetes/pkg/quota/evaluator/core/persistent_volume_claims_test.go index 6744fe34..2bf7ba5e 100644 --- a/vendor/k8s.io/kubernetes/pkg/quota/evaluator/core/persistent_volume_claims_test.go +++ b/vendor/k8s.io/kubernetes/pkg/quota/evaluator/core/persistent_volume_claims_test.go @@ -29,7 +29,7 @@ import ( func testVolumeClaim(name string, namespace string, spec api.PersistentVolumeClaimSpec) *api.PersistentVolumeClaim { return &api.PersistentVolumeClaim{ - ObjectMeta: api.ObjectMeta{Name: name, Namespace: namespace}, + ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespace}, Spec: spec, } } diff --git a/vendor/k8s.io/kubernetes/pkg/quota/evaluator/core/pods.go b/vendor/k8s.io/kubernetes/pkg/quota/evaluator/core/pods.go index 8e2900f5..e2940982 100644 --- a/vendor/k8s.io/kubernetes/pkg/quota/evaluator/core/pods.go +++ b/vendor/k8s.io/kubernetes/pkg/quota/evaluator/core/pods.go @@ -20,11 +20,12 @@ import ( "fmt" "strings" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/validation/field" - "k8s.io/kubernetes/pkg/admission" + "k8s.io/apiserver/pkg/admission" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" @@ -52,7 +53,7 @@ func listPodsByNamespaceFuncUsingClient(kubeClient clientset.Interface) generic. // TODO: ideally, we could pass dynamic client pool down into this code, and have one way of doing this. // unfortunately, dynamic client works with Unstructured objects, and when we calculate Usage, we require // structured objects. - return func(namespace string, options v1.ListOptions) ([]runtime.Object, error) { + return func(namespace string, options metav1.ListOptions) ([]runtime.Object, error) { itemList, err := kubeClient.Core().Pods(namespace).List(options) if err != nil { return nil, err diff --git a/vendor/k8s.io/kubernetes/pkg/quota/evaluator/core/replication_controllers.go b/vendor/k8s.io/kubernetes/pkg/quota/evaluator/core/replication_controllers.go index 29521e83..e13e5fe3 100644 --- a/vendor/k8s.io/kubernetes/pkg/quota/evaluator/core/replication_controllers.go +++ b/vendor/k8s.io/kubernetes/pkg/quota/evaluator/core/replication_controllers.go @@ -17,9 +17,9 @@ limitations under the License. package core import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/pkg/quota" "k8s.io/kubernetes/pkg/quota/generic" @@ -31,7 +31,7 @@ func NewReplicationControllerEvaluator(kubeClient clientset.Interface) quota.Eva AllowCreateOnUpdate: false, InternalGroupKind: api.Kind("ReplicationController"), ResourceName: api.ResourceReplicationControllers, - ListFuncByNamespace: func(namespace string, options v1.ListOptions) ([]runtime.Object, error) { + ListFuncByNamespace: func(namespace string, options metav1.ListOptions) ([]runtime.Object, error) { itemList, err := kubeClient.Core().ReplicationControllers(namespace).List(options) if err != nil { return nil, err diff --git a/vendor/k8s.io/kubernetes/pkg/quota/evaluator/core/resource_quotas.go b/vendor/k8s.io/kubernetes/pkg/quota/evaluator/core/resource_quotas.go index bc9133a9..3eb9ba6c 100644 --- a/vendor/k8s.io/kubernetes/pkg/quota/evaluator/core/resource_quotas.go +++ b/vendor/k8s.io/kubernetes/pkg/quota/evaluator/core/resource_quotas.go @@ -17,9 +17,9 @@ limitations under the License. package core import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/pkg/quota" "k8s.io/kubernetes/pkg/quota/generic" @@ -31,7 +31,7 @@ func NewResourceQuotaEvaluator(kubeClient clientset.Interface) quota.Evaluator { AllowCreateOnUpdate: false, InternalGroupKind: api.Kind("ResourceQuota"), ResourceName: api.ResourceQuotas, - ListFuncByNamespace: func(namespace string, options v1.ListOptions) ([]runtime.Object, error) { + ListFuncByNamespace: func(namespace string, options metav1.ListOptions) ([]runtime.Object, error) { itemList, err := kubeClient.Core().ResourceQuotas(namespace).List(options) if err != nil { return nil, err diff --git a/vendor/k8s.io/kubernetes/pkg/quota/evaluator/core/secrets.go b/vendor/k8s.io/kubernetes/pkg/quota/evaluator/core/secrets.go index 4b6022e8..56dd3907 100644 --- a/vendor/k8s.io/kubernetes/pkg/quota/evaluator/core/secrets.go +++ b/vendor/k8s.io/kubernetes/pkg/quota/evaluator/core/secrets.go @@ -17,9 +17,9 @@ limitations under the License. package core import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/pkg/quota" "k8s.io/kubernetes/pkg/quota/generic" @@ -31,7 +31,7 @@ func NewSecretEvaluator(kubeClient clientset.Interface) quota.Evaluator { AllowCreateOnUpdate: false, InternalGroupKind: api.Kind("Secret"), ResourceName: api.ResourceSecrets, - ListFuncByNamespace: func(namespace string, options v1.ListOptions) ([]runtime.Object, error) { + ListFuncByNamespace: func(namespace string, options metav1.ListOptions) ([]runtime.Object, error) { itemList, err := kubeClient.Core().Secrets(namespace).List(options) if err != nil { return nil, err diff --git a/vendor/k8s.io/kubernetes/pkg/quota/evaluator/core/services.go b/vendor/k8s.io/kubernetes/pkg/quota/evaluator/core/services.go index 0dd5b538..2a4aad92 100644 --- a/vendor/k8s.io/kubernetes/pkg/quota/evaluator/core/services.go +++ b/vendor/k8s.io/kubernetes/pkg/quota/evaluator/core/services.go @@ -20,10 +20,11 @@ import ( "fmt" "strings" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/kubernetes/pkg/admission" + "k8s.io/apiserver/pkg/admission" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" @@ -42,7 +43,7 @@ var serviceResources = []api.ResourceName{ // NewServiceEvaluator returns an evaluator that can evaluate service quotas func NewServiceEvaluator(kubeClient clientset.Interface) quota.Evaluator { return &serviceEvaluator{ - listFuncByNamespace: func(namespace string, options v1.ListOptions) ([]runtime.Object, error) { + listFuncByNamespace: func(namespace string, options metav1.ListOptions) ([]runtime.Object, error) { itemList, err := kubeClient.Core().Services(namespace).List(options) if err != nil { return nil, err diff --git a/vendor/k8s.io/kubernetes/pkg/quota/generic/BUILD b/vendor/k8s.io/kubernetes/pkg/quota/generic/BUILD index 6c34e99a..f52ac7b3 100644 --- a/vendor/k8s.io/kubernetes/pkg/quota/generic/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/quota/generic/BUILD @@ -15,15 +15,15 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/admission:go_default_library", "//pkg/api:go_default_library", "//pkg/api/resource:go_default_library", - "//pkg/api/v1:go_default_library", "//pkg/controller/informers:go_default_library", "//pkg/quota:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", + "//vendor:k8s.io/apiserver/pkg/admission", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/quota/generic/evaluator.go b/vendor/k8s.io/kubernetes/pkg/quota/generic/evaluator.go index f12605d7..6903e369 100644 --- a/vendor/k8s.io/kubernetes/pkg/quota/generic/evaluator.go +++ b/vendor/k8s.io/kubernetes/pkg/quota/generic/evaluator.go @@ -19,20 +19,20 @@ package generic import ( "fmt" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/admission" + "k8s.io/apiserver/pkg/admission" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/resource" - "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/controller/informers" "k8s.io/kubernetes/pkg/quota" ) // ListResourceUsingInformerFunc returns a listing function based on the shared informer factory for the specified resource. func ListResourceUsingInformerFunc(f informers.SharedInformerFactory, groupResource schema.GroupResource) ListFuncByNamespace { - return func(namespace string, options v1.ListOptions) ([]runtime.Object, error) { + return func(namespace string, options metav1.ListOptions) ([]runtime.Object, error) { labelSelector, err := labels.Parse(options.LabelSelector) if err != nil { return nil, err @@ -46,7 +46,7 @@ func ListResourceUsingInformerFunc(f informers.SharedInformerFactory, groupResou } // ListFuncByNamespace knows how to list resources in a namespace -type ListFuncByNamespace func(namespace string, options v1.ListOptions) ([]runtime.Object, error) +type ListFuncByNamespace func(namespace string, options metav1.ListOptions) ([]runtime.Object, error) // MatchesScopeFunc knows how to evaluate if an object matches a scope type MatchesScopeFunc func(scope api.ResourceQuotaScope, object runtime.Object) (bool, error) @@ -91,7 +91,7 @@ func CalculateUsageStats(options quota.UsageStatsOptions, for _, resourceName := range options.Resources { result.Used[resourceName] = resource.Quantity{Format: resource.DecimalSI} } - items, err := listFunc(options.Namespace, v1.ListOptions{ + items, err := listFunc(options.Namespace, metav1.ListOptions{ LabelSelector: labels.Everything().String(), }) if err != nil { diff --git a/vendor/k8s.io/kubernetes/pkg/quota/interfaces.go b/vendor/k8s.io/kubernetes/pkg/quota/interfaces.go index 76a19e5d..393e8979 100644 --- a/vendor/k8s.io/kubernetes/pkg/quota/interfaces.go +++ b/vendor/k8s.io/kubernetes/pkg/quota/interfaces.go @@ -19,7 +19,7 @@ package quota import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/admission" + "k8s.io/apiserver/pkg/admission" "k8s.io/kubernetes/pkg/api" ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/BUILD index efb0f0a4..0a8ac4e2 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/BUILD @@ -69,7 +69,6 @@ filegroup( "//pkg/registry/extensions/rest:all-srcs", "//pkg/registry/extensions/thirdpartyresource:all-srcs", "//pkg/registry/extensions/thirdpartyresourcedata:all-srcs", - "//pkg/registry/generic:all-srcs", "//pkg/registry/policy/poddisruptionbudget:all-srcs", "//pkg/registry/policy/rest:all-srcs", "//pkg/registry/rbac:all-srcs", diff --git a/vendor/k8s.io/kubernetes/pkg/registry/OWNERS b/vendor/k8s.io/kubernetes/pkg/registry/OWNERS index c1d7bfa2..02323bf5 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/registry/OWNERS @@ -7,7 +7,6 @@ reviewers: - lavalamp - smarterclayton - wojtek-t -- bgrant0607 - deads2k - yujuhong - derekwaynecarr diff --git a/vendor/k8s.io/kubernetes/pkg/registry/apps/petset/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/apps/petset/BUILD index c6ce956f..5a5cff11 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/apps/petset/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/apps/petset/BUILD @@ -19,13 +19,13 @@ go_library( "//pkg/api:go_default_library", "//pkg/apis/apps:go_default_library", "//pkg/apis/apps/validation:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", "//pkg/storage:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/validation/field", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", "//vendor:k8s.io/apiserver/pkg/storage/names", ], ) @@ -39,7 +39,7 @@ go_test( "//pkg/api:go_default_library", "//pkg/apis/apps:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/apps/petset/storage/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/apps/petset/storage/BUILD index 27a4ceb9..8a1d2729 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/apps/petset/storage/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/apps/petset/storage/BUILD @@ -16,14 +16,14 @@ go_test( deps = [ "//pkg/api:go_default_library", "//pkg/apis/apps:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", - "//pkg/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/registry/registrytest:go_default_library", "//pkg/storage/etcd/testing:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) @@ -33,13 +33,13 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/apis/apps:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic/registry:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/registry/apps/petset:go_default_library", - "//pkg/registry/generic:go_default_library", - "//pkg/registry/generic/registry:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/apps/petset/storage/storage.go b/vendor/k8s.io/kubernetes/pkg/registry/apps/petset/storage/storage.go index b35fb45c..0c89049a 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/apps/petset/storage/storage.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/apps/petset/storage/storage.go @@ -19,12 +19,12 @@ package storage import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" appsapi "k8s.io/kubernetes/pkg/apis/apps" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + genericregistry "k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" "k8s.io/kubernetes/pkg/registry/apps/petset" - "k8s.io/kubernetes/pkg/registry/generic" - genericregistry "k8s.io/kubernetes/pkg/registry/generic/registry" ) // rest implements a RESTStorage for replication controllers against etcd diff --git a/vendor/k8s.io/kubernetes/pkg/registry/apps/petset/storage/storage_test.go b/vendor/k8s.io/kubernetes/pkg/registry/apps/petset/storage/storage_test.go index d79f4475..cbeace27 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/apps/petset/storage/storage_test.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/apps/petset/storage/storage_test.go @@ -20,13 +20,13 @@ import ( "testing" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/apps" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" - "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" "k8s.io/kubernetes/pkg/registry/registrytest" etcdtesting "k8s.io/kubernetes/pkg/storage/etcd/testing" ) @@ -52,15 +52,15 @@ func createStatefulSet(storage *REST, ps apps.StatefulSet, t *testing.T) (apps.S func validNewStatefulSet() *apps.StatefulSet { return &apps.StatefulSet{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, Labels: map[string]string{"a": "b"}, }, Spec: apps.StatefulSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"a": "b"}}, Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"a": "b"}, }, Spec: api.PodSpec{ @@ -87,7 +87,7 @@ func TestCreate(t *testing.T) { defer storage.Store.DestroyFunc() test := registrytest.New(t, storage.Store) ps := validNewStatefulSet() - ps.ObjectMeta = api.ObjectMeta{} + ps.ObjectMeta = metav1.ObjectMeta{} test.TestCreate( // valid ps, @@ -101,8 +101,8 @@ func TestStatusUpdate(t *testing.T) { storage, statusStorage, server := newStorage(t) defer server.Terminate(t) defer storage.Store.DestroyFunc() - ctx := genericapirequest.WithNamespace(genericapirequest.NewContext(), api.NamespaceDefault) - key := "/statefulsets/" + api.NamespaceDefault + "/foo" + ctx := genericapirequest.WithNamespace(genericapirequest.NewContext(), metav1.NamespaceDefault) + key := "/statefulsets/" + metav1.NamespaceDefault + "/foo" validStatefulSet := validNewStatefulSet() if err := storage.Storage.Create(ctx, key, validStatefulSet, nil, 0); err != nil { t.Fatalf("unexpected error: %v", err) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/apps/petset/strategy.go b/vendor/k8s.io/kubernetes/pkg/registry/apps/petset/strategy.go index ba332b60..b8fdba56 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/apps/petset/strategy.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/apps/petset/strategy.go @@ -20,16 +20,16 @@ import ( "fmt" "reflect" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/validation/field" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/storage/names" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/apps" "k8s.io/kubernetes/pkg/apis/apps/validation" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" "k8s.io/kubernetes/pkg/storage" ) @@ -65,7 +65,7 @@ func (statefulSetStrategy) PrepareForUpdate(ctx genericapirequest.Context, obj, // Any changes to the spec increment the generation number, any changes to the // status should reflect the generation number of the corresponding object. - // See api.ObjectMeta description for more information on Generation. + // See metav1.ObjectMeta description for more information on Generation. if !reflect.DeepEqual(oldStatefulSet.Spec, newStatefulSet.Spec) { newStatefulSet.Generation = oldStatefulSet.Generation + 1 } diff --git a/vendor/k8s.io/kubernetes/pkg/registry/apps/petset/strategy_test.go b/vendor/k8s.io/kubernetes/pkg/registry/apps/petset/strategy_test.go index 31b4d457..1690aa8c 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/apps/petset/strategy_test.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/apps/petset/strategy_test.go @@ -20,7 +20,7 @@ import ( "testing" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/apps" ) @@ -37,7 +37,7 @@ func TestStatefulSetStrategy(t *testing.T) { validSelector := map[string]string{"a": "b"} validPodTemplate := api.PodTemplate{ Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validSelector, }, Spec: api.PodSpec{ @@ -48,7 +48,7 @@ func TestStatefulSetStrategy(t *testing.T) { }, } ps := &apps.StatefulSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: apps.StatefulSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validSelector}, Template: validPodTemplate.Template, @@ -67,7 +67,7 @@ func TestStatefulSetStrategy(t *testing.T) { // Just Spec.Replicas is allowed to change validPs := &apps.StatefulSet{ - ObjectMeta: api.ObjectMeta{Name: ps.Name, Namespace: ps.Namespace, ResourceVersion: "1", Generation: 1}, + ObjectMeta: metav1.ObjectMeta{Name: ps.Name, Namespace: ps.Namespace, ResourceVersion: "1", Generation: 1}, Spec: apps.StatefulSetSpec{ Selector: ps.Spec.Selector, Template: validPodTemplate.Template, @@ -99,7 +99,7 @@ func TestStatefulSetStatusStrategy(t *testing.T) { validSelector := map[string]string{"a": "b"} validPodTemplate := api.PodTemplate{ Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validSelector, }, Spec: api.PodSpec{ @@ -110,7 +110,7 @@ func TestStatefulSetStatusStrategy(t *testing.T) { }, } oldPS := &apps.StatefulSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault, ResourceVersion: "10"}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault, ResourceVersion: "10"}, Spec: apps.StatefulSetSpec{ Replicas: 3, Selector: &metav1.LabelSelector{MatchLabels: validSelector}, @@ -121,7 +121,7 @@ func TestStatefulSetStatusStrategy(t *testing.T) { }, } newPS := &apps.StatefulSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault, ResourceVersion: "9"}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault, ResourceVersion: "9"}, Spec: apps.StatefulSetSpec{ Replicas: 1, Selector: &metav1.LabelSelector{MatchLabels: validSelector}, diff --git a/vendor/k8s.io/kubernetes/pkg/registry/apps/rest/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/apps/rest/BUILD index 38e9c29b..7efd8eb5 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/apps/rest/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/apps/rest/BUILD @@ -14,10 +14,10 @@ go_library( deps = [ "//pkg/apis/apps:go_default_library", "//pkg/apis/apps/v1beta1:go_default_library", - "//pkg/genericapiserver:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", + "//pkg/genericapiserver/server:go_default_library", "//pkg/registry/apps/petset/storage:go_default_library", - "//pkg/registry/generic:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/apps/rest/storage_apps.go b/vendor/k8s.io/kubernetes/pkg/registry/apps/rest/storage_apps.go index 016eb096..7ff6a0ac 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/apps/rest/storage_apps.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/apps/rest/storage_apps.go @@ -19,10 +19,10 @@ package rest import ( "k8s.io/kubernetes/pkg/apis/apps" appsapiv1beta1 "k8s.io/kubernetes/pkg/apis/apps/v1beta1" - "k8s.io/kubernetes/pkg/genericapiserver" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" + genericapiserver "k8s.io/kubernetes/pkg/genericapiserver/server" statefulsetstore "k8s.io/kubernetes/pkg/registry/apps/petset/storage" - "k8s.io/kubernetes/pkg/registry/generic" ) type RESTStorageProvider struct{} diff --git a/vendor/k8s.io/kubernetes/pkg/registry/authentication/rest/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/authentication/rest/BUILD index 0922d477..27675333 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/authentication/rest/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/authentication/rest/BUILD @@ -14,10 +14,10 @@ go_library( deps = [ "//pkg/apis/authentication:go_default_library", "//pkg/apis/authentication/v1beta1:go_default_library", - "//pkg/genericapiserver:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", + "//pkg/genericapiserver/server:go_default_library", "//pkg/registry/authentication/tokenreview:go_default_library", - "//pkg/registry/generic:go_default_library", "//vendor:k8s.io/apiserver/pkg/authentication/authenticator", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/authentication/rest/storage_authentication.go b/vendor/k8s.io/kubernetes/pkg/registry/authentication/rest/storage_authentication.go index 58537f98..4f910622 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/authentication/rest/storage_authentication.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/authentication/rest/storage_authentication.go @@ -20,10 +20,10 @@ import ( "k8s.io/apiserver/pkg/authentication/authenticator" "k8s.io/kubernetes/pkg/apis/authentication" authenticationv1beta1 "k8s.io/kubernetes/pkg/apis/authentication/v1beta1" - "k8s.io/kubernetes/pkg/genericapiserver" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" + genericapiserver "k8s.io/kubernetes/pkg/genericapiserver/server" "k8s.io/kubernetes/pkg/registry/authentication/tokenreview" - "k8s.io/kubernetes/pkg/registry/generic" ) type RESTStorageProvider struct { diff --git a/vendor/k8s.io/kubernetes/pkg/registry/authentication/tokenreview/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/authentication/tokenreview/BUILD index f380d98f..0725452e 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/authentication/tokenreview/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/authentication/tokenreview/BUILD @@ -16,7 +16,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apiserver/pkg/authentication/authenticator", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/authentication/tokenreview/storage.go b/vendor/k8s.io/kubernetes/pkg/registry/authentication/tokenreview/storage.go index 7f669117..3c681ef9 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/authentication/tokenreview/storage.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/authentication/tokenreview/storage.go @@ -23,7 +23,7 @@ import ( apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apiserver/pkg/authentication/authenticator" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/apis/authentication" ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/authorization/localsubjectaccessreview/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/authorization/localsubjectaccessreview/BUILD index ba4bff1c..78ace523 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/authorization/localsubjectaccessreview/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/authorization/localsubjectaccessreview/BUILD @@ -18,7 +18,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apiserver/pkg/authorization/authorizer", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/authorization/localsubjectaccessreview/rest.go b/vendor/k8s.io/kubernetes/pkg/registry/authorization/localsubjectaccessreview/rest.go index 44532cca..379a42b9 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/authorization/localsubjectaccessreview/rest.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/authorization/localsubjectaccessreview/rest.go @@ -22,7 +22,7 @@ import ( kapierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apiserver/pkg/authorization/authorizer" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" authorizationapi "k8s.io/kubernetes/pkg/apis/authorization" authorizationvalidation "k8s.io/kubernetes/pkg/apis/authorization/validation" authorizationutil "k8s.io/kubernetes/pkg/registry/authorization/util" diff --git a/vendor/k8s.io/kubernetes/pkg/registry/authorization/rest/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/authorization/rest/BUILD index 666a15a9..2d91afa2 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/authorization/rest/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/authorization/rest/BUILD @@ -14,12 +14,12 @@ go_library( deps = [ "//pkg/apis/authorization:go_default_library", "//pkg/apis/authorization/v1beta1:go_default_library", - "//pkg/genericapiserver:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", + "//pkg/genericapiserver/server:go_default_library", "//pkg/registry/authorization/localsubjectaccessreview:go_default_library", "//pkg/registry/authorization/selfsubjectaccessreview:go_default_library", "//pkg/registry/authorization/subjectaccessreview:go_default_library", - "//pkg/registry/generic:go_default_library", "//vendor:k8s.io/apiserver/pkg/authorization/authorizer", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/authorization/rest/storage_authorization.go b/vendor/k8s.io/kubernetes/pkg/registry/authorization/rest/storage_authorization.go index 20cd2648..9310d69d 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/authorization/rest/storage_authorization.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/authorization/rest/storage_authorization.go @@ -20,12 +20,12 @@ import ( "k8s.io/apiserver/pkg/authorization/authorizer" "k8s.io/kubernetes/pkg/apis/authorization" authorizationv1beta1 "k8s.io/kubernetes/pkg/apis/authorization/v1beta1" - "k8s.io/kubernetes/pkg/genericapiserver" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" + genericapiserver "k8s.io/kubernetes/pkg/genericapiserver/server" "k8s.io/kubernetes/pkg/registry/authorization/localsubjectaccessreview" "k8s.io/kubernetes/pkg/registry/authorization/selfsubjectaccessreview" "k8s.io/kubernetes/pkg/registry/authorization/subjectaccessreview" - "k8s.io/kubernetes/pkg/registry/generic" ) type RESTStorageProvider struct { diff --git a/vendor/k8s.io/kubernetes/pkg/registry/authorization/selfsubjectaccessreview/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/authorization/selfsubjectaccessreview/BUILD index ba4bff1c..78ace523 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/authorization/selfsubjectaccessreview/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/authorization/selfsubjectaccessreview/BUILD @@ -18,7 +18,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apiserver/pkg/authorization/authorizer", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/authorization/selfsubjectaccessreview/rest.go b/vendor/k8s.io/kubernetes/pkg/registry/authorization/selfsubjectaccessreview/rest.go index 9a2d8ebe..94b4c06d 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/authorization/selfsubjectaccessreview/rest.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/authorization/selfsubjectaccessreview/rest.go @@ -22,7 +22,7 @@ import ( apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apiserver/pkg/authorization/authorizer" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" authorizationapi "k8s.io/kubernetes/pkg/apis/authorization" authorizationvalidation "k8s.io/kubernetes/pkg/apis/authorization/validation" authorizationutil "k8s.io/kubernetes/pkg/registry/authorization/util" diff --git a/vendor/k8s.io/kubernetes/pkg/registry/authorization/subjectaccessreview/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/authorization/subjectaccessreview/BUILD index ba4bff1c..78ace523 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/authorization/subjectaccessreview/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/authorization/subjectaccessreview/BUILD @@ -18,7 +18,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apiserver/pkg/authorization/authorizer", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/authorization/subjectaccessreview/rest.go b/vendor/k8s.io/kubernetes/pkg/registry/authorization/subjectaccessreview/rest.go index 93aa33dd..5b984b4c 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/authorization/subjectaccessreview/rest.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/authorization/subjectaccessreview/rest.go @@ -22,7 +22,7 @@ import ( kapierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apiserver/pkg/authorization/authorizer" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" authorizationapi "k8s.io/kubernetes/pkg/apis/authorization" authorizationvalidation "k8s.io/kubernetes/pkg/apis/authorization/validation" authorizationutil "k8s.io/kubernetes/pkg/registry/authorization/util" diff --git a/vendor/k8s.io/kubernetes/pkg/registry/autoscaling/horizontalpodautoscaler/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/autoscaling/horizontalpodautoscaler/BUILD index e913cb17..bf805add 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/autoscaling/horizontalpodautoscaler/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/autoscaling/horizontalpodautoscaler/BUILD @@ -19,12 +19,12 @@ go_library( "//pkg/api:go_default_library", "//pkg/apis/autoscaling:go_default_library", "//pkg/apis/autoscaling/validation:go_default_library", - "//pkg/fields:go_default_library", "//pkg/storage:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/validation/field", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", "//vendor:k8s.io/apiserver/pkg/storage/names", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/autoscaling/horizontalpodautoscaler/storage/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/autoscaling/horizontalpodautoscaler/storage/BUILD index a01a89f9..4b4594ff 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/autoscaling/horizontalpodautoscaler/storage/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/autoscaling/horizontalpodautoscaler/storage/BUILD @@ -14,13 +14,13 @@ go_test( library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//pkg/apis/autoscaling:go_default_library", "//pkg/apis/autoscaling/v1:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", "//pkg/registry/registrytest:go_default_library", "//pkg/storage/etcd/testing:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", ], @@ -32,13 +32,13 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/apis/autoscaling:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic/registry:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/registry/autoscaling/horizontalpodautoscaler:go_default_library", - "//pkg/registry/generic:go_default_library", - "//pkg/registry/generic/registry:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/autoscaling/horizontalpodautoscaler/storage/storage.go b/vendor/k8s.io/kubernetes/pkg/registry/autoscaling/horizontalpodautoscaler/storage/storage.go index d9e14f4f..c5808938 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/autoscaling/horizontalpodautoscaler/storage/storage.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/autoscaling/horizontalpodautoscaler/storage/storage.go @@ -19,12 +19,12 @@ package storage import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/apis/autoscaling" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + genericregistry "k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" "k8s.io/kubernetes/pkg/registry/autoscaling/horizontalpodautoscaler" - "k8s.io/kubernetes/pkg/registry/generic" - genericregistry "k8s.io/kubernetes/pkg/registry/generic/registry" ) type REST struct { diff --git a/vendor/k8s.io/kubernetes/pkg/registry/autoscaling/horizontalpodautoscaler/storage/storage_test.go b/vendor/k8s.io/kubernetes/pkg/registry/autoscaling/horizontalpodautoscaler/storage/storage_test.go index bb7cdd22..bc07f0d4 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/autoscaling/horizontalpodautoscaler/storage/storage_test.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/autoscaling/horizontalpodautoscaler/storage/storage_test.go @@ -19,14 +19,14 @@ package storage import ( "testing" - "k8s.io/kubernetes/pkg/api" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/apis/autoscaling" // Ensure that autoscaling/v1 package is initialized. + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" _ "k8s.io/kubernetes/pkg/apis/autoscaling/v1" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" "k8s.io/kubernetes/pkg/registry/registrytest" etcdtesting "k8s.io/kubernetes/pkg/storage/etcd/testing" ) @@ -46,9 +46,9 @@ func newStorage(t *testing.T) (*REST, *StatusREST, *etcdtesting.EtcdTestServer) func validNewHorizontalPodAutoscaler(name string) *autoscaling.HorizontalPodAutoscaler { cpu := int32(70) return &autoscaling.HorizontalPodAutoscaler{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, Spec: autoscaling.HorizontalPodAutoscalerSpec{ ScaleTargetRef: autoscaling.CrossVersionObjectReference{ @@ -67,7 +67,7 @@ func TestCreate(t *testing.T) { defer storage.Store.DestroyFunc() test := registrytest.New(t, storage.Store) autoscaler := validNewHorizontalPodAutoscaler("foo") - autoscaler.ObjectMeta = api.ObjectMeta{} + autoscaler.ObjectMeta = metav1.ObjectMeta{} test.TestCreate( // valid autoscaler, diff --git a/vendor/k8s.io/kubernetes/pkg/registry/autoscaling/horizontalpodautoscaler/strategy.go b/vendor/k8s.io/kubernetes/pkg/registry/autoscaling/horizontalpodautoscaler/strategy.go index 5b1a895a..3b84a226 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/autoscaling/horizontalpodautoscaler/strategy.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/autoscaling/horizontalpodautoscaler/strategy.go @@ -19,15 +19,15 @@ package horizontalpodautoscaler import ( "fmt" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/validation/field" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/storage/names" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/autoscaling" "k8s.io/kubernetes/pkg/apis/autoscaling/validation" - "k8s.io/kubernetes/pkg/fields" "k8s.io/kubernetes/pkg/storage" ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/autoscaling/rest/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/autoscaling/rest/BUILD index d6aa964a..9ce8efa8 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/autoscaling/rest/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/autoscaling/rest/BUILD @@ -14,10 +14,10 @@ go_library( deps = [ "//pkg/apis/autoscaling:go_default_library", "//pkg/apis/autoscaling/v1:go_default_library", - "//pkg/genericapiserver:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", + "//pkg/genericapiserver/server:go_default_library", "//pkg/registry/autoscaling/horizontalpodautoscaler/storage:go_default_library", - "//pkg/registry/generic:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/autoscaling/rest/storage_autoscaling.go b/vendor/k8s.io/kubernetes/pkg/registry/autoscaling/rest/storage_autoscaling.go index 7d1cbc94..58d9b414 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/autoscaling/rest/storage_autoscaling.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/autoscaling/rest/storage_autoscaling.go @@ -19,10 +19,10 @@ package rest import ( "k8s.io/kubernetes/pkg/apis/autoscaling" autoscalingapiv1 "k8s.io/kubernetes/pkg/apis/autoscaling/v1" - "k8s.io/kubernetes/pkg/genericapiserver" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" + genericapiserver "k8s.io/kubernetes/pkg/genericapiserver/server" horizontalpodautoscalerstore "k8s.io/kubernetes/pkg/registry/autoscaling/horizontalpodautoscaler/storage" - "k8s.io/kubernetes/pkg/registry/generic" ) type RESTStorageProvider struct{} diff --git a/vendor/k8s.io/kubernetes/pkg/registry/batch/cronjob/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/batch/cronjob/BUILD index f1f59a2a..93ad124c 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/batch/cronjob/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/batch/cronjob/BUILD @@ -19,13 +19,13 @@ go_library( "//pkg/api:go_default_library", "//pkg/apis/batch:go_default_library", "//pkg/apis/batch/validation:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", "//pkg/storage:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/validation/field", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", "//vendor:k8s.io/apiserver/pkg/storage/names", ], ) @@ -40,7 +40,7 @@ go_test( "//pkg/api/testing:go_default_library", "//pkg/apis/batch:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/batch/cronjob/storage/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/batch/cronjob/storage/BUILD index 1ca2795f..96f67b4a 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/batch/cronjob/storage/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/batch/cronjob/storage/BUILD @@ -18,10 +18,11 @@ go_test( "//pkg/api/testapi:go_default_library", "//pkg/apis/batch:go_default_library", "//pkg/apis/batch/v2alpha1:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", "//pkg/registry/registrytest:go_default_library", "//pkg/storage/etcd/testing:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", ], @@ -33,13 +34,13 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/apis/batch:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic/registry:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/registry/batch/cronjob:go_default_library", - "//pkg/registry/generic:go_default_library", - "//pkg/registry/generic/registry:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/batch/cronjob/storage/storage.go b/vendor/k8s.io/kubernetes/pkg/registry/batch/cronjob/storage/storage.go index be34c6a6..5a4091bc 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/batch/cronjob/storage/storage.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/batch/cronjob/storage/storage.go @@ -19,12 +19,12 @@ package storage import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/apis/batch" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + genericregistry "k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" "k8s.io/kubernetes/pkg/registry/batch/cronjob" - "k8s.io/kubernetes/pkg/registry/generic" - genericregistry "k8s.io/kubernetes/pkg/registry/generic/registry" ) // REST implements a RESTStorage for scheduled jobs against etcd diff --git a/vendor/k8s.io/kubernetes/pkg/registry/batch/cronjob/storage/storage_test.go b/vendor/k8s.io/kubernetes/pkg/registry/batch/cronjob/storage/storage_test.go index 12169c9e..58e77dc7 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/batch/cronjob/storage/storage_test.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/batch/cronjob/storage/storage_test.go @@ -19,14 +19,15 @@ package storage import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" "k8s.io/kubernetes/pkg/apis/batch" "k8s.io/kubernetes/pkg/apis/batch/v2alpha1" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" "k8s.io/kubernetes/pkg/registry/registrytest" etcdtesting "k8s.io/kubernetes/pkg/storage/etcd/testing" ) @@ -41,9 +42,9 @@ func newStorage(t *testing.T) (*REST, *StatusREST, *etcdtesting.EtcdTestServer) func validNewCronJob() *batch.CronJob { return &batch.CronJob{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, Spec: batch.CronJobSpec{ Schedule: "* * * * ?", @@ -74,7 +75,7 @@ func TestCreate(t *testing.T) { defer storage.Store.DestroyFunc() test := registrytest.New(t, storage.Store) validCronJob := validNewCronJob() - validCronJob.ObjectMeta = api.ObjectMeta{} + validCronJob.ObjectMeta = metav1.ObjectMeta{} test.TestCreate( // valid validCronJob, diff --git a/vendor/k8s.io/kubernetes/pkg/registry/batch/cronjob/strategy.go b/vendor/k8s.io/kubernetes/pkg/registry/batch/cronjob/strategy.go index e6ef0cdd..d9f7ee7b 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/batch/cronjob/strategy.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/batch/cronjob/strategy.go @@ -19,16 +19,16 @@ package cronjob import ( "fmt" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/validation/field" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/storage/names" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/batch" "k8s.io/kubernetes/pkg/apis/batch/validation" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" "k8s.io/kubernetes/pkg/storage" ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/batch/cronjob/strategy_test.go b/vendor/k8s.io/kubernetes/pkg/registry/batch/cronjob/strategy_test.go index ddaa1455..13733d2b 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/batch/cronjob/strategy_test.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/batch/cronjob/strategy_test.go @@ -20,7 +20,7 @@ import ( "testing" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" apitesting "k8s.io/kubernetes/pkg/api/testing" "k8s.io/kubernetes/pkg/apis/batch" @@ -45,13 +45,13 @@ func TestCronJobStrategy(t *testing.T) { Spec: api.PodSpec{ RestartPolicy: api.RestartPolicyOnFailure, DNSPolicy: api.DNSClusterFirst, - Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: api.TerminationMessageReadFile}}, }, } scheduledJob := &batch.CronJob{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "mycronjob", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, Spec: batch.CronJobSpec{ Schedule: "* * * * ?", @@ -74,7 +74,7 @@ func TestCronJobStrategy(t *testing.T) { } now := metav1.Now() updatedCronJob := &batch.CronJob{ - ObjectMeta: api.ObjectMeta{Name: "bar", ResourceVersion: "4"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar", ResourceVersion: "4"}, Spec: batch.CronJobSpec{ Schedule: "5 5 5 * ?", }, @@ -106,14 +106,14 @@ func TestCronJobStatusStrategy(t *testing.T) { Spec: api.PodSpec{ RestartPolicy: api.RestartPolicyOnFailure, DNSPolicy: api.DNSClusterFirst, - Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: api.TerminationMessageReadFile}}, }, } oldSchedule := "* * * * ?" oldCronJob := &batch.CronJob{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "mycronjob", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, ResourceVersion: "10", }, Spec: batch.CronJobSpec{ @@ -128,9 +128,9 @@ func TestCronJobStatusStrategy(t *testing.T) { } now := metav1.Now() newCronJob := &batch.CronJob{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "mycronjob", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, ResourceVersion: "9", }, Spec: batch.CronJobSpec{ diff --git a/vendor/k8s.io/kubernetes/pkg/registry/batch/job/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/batch/job/BUILD index b9632ba5..6ad80216 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/batch/job/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/batch/job/BUILD @@ -19,14 +19,14 @@ go_library( "//pkg/api:go_default_library", "//pkg/apis/batch:go_default_library", "//pkg/apis/batch/validation:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", "//pkg/storage:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/validation/field", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", "//vendor:k8s.io/apiserver/pkg/storage/names", ], ) @@ -43,7 +43,7 @@ go_test( "//pkg/apis/batch:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/batch/job/storage/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/batch/job/storage/BUILD index 25f59ab5..50151562 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/batch/job/storage/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/batch/job/storage/BUILD @@ -16,11 +16,11 @@ go_test( deps = [ "//pkg/api:go_default_library", "//pkg/apis/batch:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", "//pkg/registry/registrytest:go_default_library", "//pkg/storage/etcd/testing:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", ], @@ -32,13 +32,13 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/apis/batch:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic/registry:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/registry/batch/job:go_default_library", - "//pkg/registry/generic:go_default_library", - "//pkg/registry/generic/registry:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/batch/job/storage/storage.go b/vendor/k8s.io/kubernetes/pkg/registry/batch/job/storage/storage.go index 01649b02..00a188cd 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/batch/job/storage/storage.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/batch/job/storage/storage.go @@ -19,12 +19,12 @@ package storage import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/apis/batch" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + genericregistry "k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" "k8s.io/kubernetes/pkg/registry/batch/job" - "k8s.io/kubernetes/pkg/registry/generic" - genericregistry "k8s.io/kubernetes/pkg/registry/generic/registry" ) // JobStorage includes dummy storage for Job. diff --git a/vendor/k8s.io/kubernetes/pkg/registry/batch/job/storage/storage_test.go b/vendor/k8s.io/kubernetes/pkg/registry/batch/job/storage/storage_test.go index 104cf32c..467c574b 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/batch/job/storage/storage_test.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/batch/job/storage/storage_test.go @@ -20,12 +20,12 @@ import ( "testing" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/batch" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" "k8s.io/kubernetes/pkg/registry/registrytest" etcdtesting "k8s.io/kubernetes/pkg/storage/etcd/testing" ) @@ -46,7 +46,7 @@ func validNewJob() *batch.Job { completions := int32(1) parallelism := int32(1) return &batch.Job{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "default", }, @@ -58,15 +58,16 @@ func validNewJob() *batch.Job { }, ManualSelector: newBool(true), Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"a": "b"}, }, Spec: api.PodSpec{ Containers: []api.Container{ { - Name: "test", - Image: "test_image", - ImagePullPolicy: api.PullIfNotPresent, + Name: "test", + Image: "test_image", + ImagePullPolicy: api.PullIfNotPresent, + TerminationMessagePolicy: api.TerminationMessageReadFile, }, }, RestartPolicy: api.RestartPolicyOnFailure, @@ -83,7 +84,7 @@ func TestCreate(t *testing.T) { defer storage.Job.Store.DestroyFunc() test := registrytest.New(t, storage.Job.Store) validJob := validNewJob() - validJob.ObjectMeta = api.ObjectMeta{} + validJob.ObjectMeta = metav1.ObjectMeta{} test.TestCreate( // valid validJob, diff --git a/vendor/k8s.io/kubernetes/pkg/registry/batch/job/strategy.go b/vendor/k8s.io/kubernetes/pkg/registry/batch/job/strategy.go index cd01c8e9..d3a1640e 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/batch/job/strategy.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/batch/job/strategy.go @@ -21,16 +21,16 @@ import ( "strconv" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/validation/field" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/storage/names" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/batch" "k8s.io/kubernetes/pkg/apis/batch/validation" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" "k8s.io/kubernetes/pkg/storage" ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/batch/job/strategy_test.go b/vendor/k8s.io/kubernetes/pkg/registry/batch/job/strategy_test.go index aa1b4627..590afa0e 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/batch/job/strategy_test.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/batch/job/strategy_test.go @@ -22,7 +22,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" apitesting "k8s.io/kubernetes/pkg/api/testing" @@ -48,19 +48,19 @@ func TestJobStrategy(t *testing.T) { MatchLabels: map[string]string{"a": "b"}, } validPodTemplateSpec := api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validSelector.MatchLabels, }, Spec: api.PodSpec{ RestartPolicy: api.RestartPolicyOnFailure, DNSPolicy: api.DNSClusterFirst, - Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: api.TerminationMessageReadFile}}, }, } job := &batch.Job{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "myjob", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, Spec: batch.JobSpec{ Selector: validSelector, @@ -82,7 +82,7 @@ func TestJobStrategy(t *testing.T) { } parallelism := int32(10) updatedJob := &batch.Job{ - ObjectMeta: api.ObjectMeta{Name: "bar", ResourceVersion: "4"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar", ResourceVersion: "4"}, Spec: batch.JobSpec{ Parallelism: ¶llelism, }, @@ -111,13 +111,13 @@ func TestJobStrategyWithGeneration(t *testing.T) { Spec: api.PodSpec{ RestartPolicy: api.RestartPolicyOnFailure, DNSPolicy: api.DNSClusterFirst, - Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: api.TerminationMessageReadFile}}, }, } job := &batch.Job{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "myjob2", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, UID: theUID, }, Spec: batch.JobSpec{ @@ -164,21 +164,21 @@ func TestJobStatusStrategy(t *testing.T) { MatchLabels: map[string]string{"a": "b"}, } validPodTemplateSpec := api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validSelector.MatchLabels, }, Spec: api.PodSpec{ RestartPolicy: api.RestartPolicyOnFailure, DNSPolicy: api.DNSClusterFirst, - Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: api.TerminationMessageReadFile}}, }, } oldParallelism := int32(10) newParallelism := int32(11) oldJob := &batch.Job{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "myjob", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, ResourceVersion: "10", }, Spec: batch.JobSpec{ @@ -191,9 +191,9 @@ func TestJobStatusStrategy(t *testing.T) { }, } newJob := &batch.Job{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "myjob", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, ResourceVersion: "9", }, Spec: batch.JobSpec{ diff --git a/vendor/k8s.io/kubernetes/pkg/registry/batch/rest/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/batch/rest/BUILD index 53feeff6..046e59e0 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/batch/rest/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/batch/rest/BUILD @@ -15,11 +15,11 @@ go_library( "//pkg/apis/batch:go_default_library", "//pkg/apis/batch/v1:go_default_library", "//pkg/apis/batch/v2alpha1:go_default_library", - "//pkg/genericapiserver:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", + "//pkg/genericapiserver/server:go_default_library", "//pkg/registry/batch/cronjob/storage:go_default_library", "//pkg/registry/batch/job/storage:go_default_library", - "//pkg/registry/generic:go_default_library", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/batch/rest/storage_batch.go b/vendor/k8s.io/kubernetes/pkg/registry/batch/rest/storage_batch.go index 88cee306..4760af9b 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/batch/rest/storage_batch.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/batch/rest/storage_batch.go @@ -21,11 +21,11 @@ import ( "k8s.io/kubernetes/pkg/apis/batch" batchapiv1 "k8s.io/kubernetes/pkg/apis/batch/v1" batchapiv2alpha1 "k8s.io/kubernetes/pkg/apis/batch/v2alpha1" - "k8s.io/kubernetes/pkg/genericapiserver" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" + genericapiserver "k8s.io/kubernetes/pkg/genericapiserver/server" cronjobstore "k8s.io/kubernetes/pkg/registry/batch/cronjob/storage" jobstore "k8s.io/kubernetes/pkg/registry/batch/job/storage" - "k8s.io/kubernetes/pkg/registry/generic" ) type RESTStorageProvider struct{} diff --git a/vendor/k8s.io/kubernetes/pkg/registry/certificates/certificates/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/certificates/certificates/BUILD index 52cef8aa..d146dd3c 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/certificates/certificates/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/certificates/certificates/BUILD @@ -20,16 +20,17 @@ go_library( "//pkg/api:go_default_library", "//pkg/apis/certificates:go_default_library", "//pkg/apis/certificates/validation:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", - "//pkg/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/storage:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/internalversion", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/validation/field", "//vendor:k8s.io/apimachinery/pkg/watch", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", "//vendor:k8s.io/apiserver/pkg/storage/names", ], ) @@ -44,7 +45,7 @@ go_test( "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/diff", "//vendor:k8s.io/apiserver/pkg/authentication/user", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/certificates/certificates/registry.go b/vendor/k8s.io/kubernetes/pkg/registry/certificates/certificates/registry.go index 94f9f9db..6bd68b54 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/certificates/certificates/registry.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/certificates/certificates/registry.go @@ -17,22 +17,23 @@ limitations under the License. package certificates import ( + metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/watch" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/certificates" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" ) // Registry is an interface for things that know how to store CSRs. type Registry interface { - ListCSRs(ctx genericapirequest.Context, options *api.ListOptions) (*certificates.CertificateSigningRequestList, error) + ListCSRs(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (*certificates.CertificateSigningRequestList, error) CreateCSR(ctx genericapirequest.Context, csr *certificates.CertificateSigningRequest) error UpdateCSR(ctx genericapirequest.Context, csr *certificates.CertificateSigningRequest) error GetCSR(ctx genericapirequest.Context, csrID string, options *metav1.GetOptions) (*certificates.CertificateSigningRequest, error) DeleteCSR(ctx genericapirequest.Context, csrID string) error - WatchCSRs(ctx genericapirequest.Context, options *api.ListOptions) (watch.Interface, error) + WatchCSRs(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (watch.Interface, error) } // storage puts strong typing around storage calls @@ -46,7 +47,7 @@ func NewRegistry(s rest.StandardStorage) Registry { return &storage{s} } -func (s *storage) ListCSRs(ctx genericapirequest.Context, options *api.ListOptions) (*certificates.CertificateSigningRequestList, error) { +func (s *storage) ListCSRs(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (*certificates.CertificateSigningRequestList, error) { obj, err := s.List(ctx, options) if err != nil { return nil, err @@ -65,7 +66,7 @@ func (s *storage) UpdateCSR(ctx genericapirequest.Context, csr *certificates.Cer return err } -func (s *storage) WatchCSRs(ctx genericapirequest.Context, options *api.ListOptions) (watch.Interface, error) { +func (s *storage) WatchCSRs(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (watch.Interface, error) { return s.Watch(ctx, options) } diff --git a/vendor/k8s.io/kubernetes/pkg/registry/certificates/certificates/storage/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/certificates/certificates/storage/BUILD index 699ed0e3..4730f0b2 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/certificates/certificates/storage/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/certificates/certificates/storage/BUILD @@ -13,12 +13,12 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/apis/certificates:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic/registry:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/registry/certificates/certificates:go_default_library", - "//pkg/registry/generic:go_default_library", - "//pkg/registry/generic/registry:go_default_library", "//vendor:k8s.io/apimachinery/pkg/runtime", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/certificates/certificates/storage/storage.go b/vendor/k8s.io/kubernetes/pkg/registry/certificates/certificates/storage/storage.go index ad70d459..7b2c119b 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/certificates/certificates/storage/storage.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/certificates/certificates/storage/storage.go @@ -18,12 +18,12 @@ package storage import ( "k8s.io/apimachinery/pkg/runtime" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/apis/certificates" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + genericregistry "k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" csrregistry "k8s.io/kubernetes/pkg/registry/certificates/certificates" - "k8s.io/kubernetes/pkg/registry/generic" - genericregistry "k8s.io/kubernetes/pkg/registry/generic/registry" ) // REST implements a RESTStorage for CertificateSigningRequest diff --git a/vendor/k8s.io/kubernetes/pkg/registry/certificates/certificates/strategy.go b/vendor/k8s.io/kubernetes/pkg/registry/certificates/certificates/strategy.go index 0b4d42f8..15ccbbfc 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/certificates/certificates/strategy.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/certificates/certificates/strategy.go @@ -19,16 +19,16 @@ package certificates import ( "fmt" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/validation/field" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/storage/names" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/certificates" "k8s.io/kubernetes/pkg/apis/certificates/validation" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" apistorage "k8s.io/kubernetes/pkg/storage" ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/certificates/certificates/strategy_test.go b/vendor/k8s.io/kubernetes/pkg/registry/certificates/certificates/strategy_test.go index 7dacc7df..57f2f471 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/certificates/certificates/strategy_test.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/certificates/certificates/strategy_test.go @@ -23,7 +23,7 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/diff" "k8s.io/apiserver/pkg/authentication/user" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" certapi "k8s.io/kubernetes/pkg/apis/certificates" ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/certificates/rest/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/certificates/rest/BUILD index 6291d07a..0c2980c1 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/certificates/rest/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/certificates/rest/BUILD @@ -13,11 +13,11 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/apis/certificates:go_default_library", - "//pkg/apis/certificates/v1alpha1:go_default_library", - "//pkg/genericapiserver:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", + "//pkg/apis/certificates/v1beta1:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", + "//pkg/genericapiserver/server:go_default_library", "//pkg/registry/certificates/certificates/storage:go_default_library", - "//pkg/registry/generic:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/certificates/rest/storage_certificates.go b/vendor/k8s.io/kubernetes/pkg/registry/certificates/rest/storage_certificates.go index 1cfee647..8666f194 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/certificates/rest/storage_certificates.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/certificates/rest/storage_certificates.go @@ -18,11 +18,11 @@ package rest import ( "k8s.io/kubernetes/pkg/apis/certificates" - certificatesapiv1alpha1 "k8s.io/kubernetes/pkg/apis/certificates/v1alpha1" - "k8s.io/kubernetes/pkg/genericapiserver" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + certificatesapiv1beta1 "k8s.io/kubernetes/pkg/apis/certificates/v1beta1" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" + genericapiserver "k8s.io/kubernetes/pkg/genericapiserver/server" certificatestore "k8s.io/kubernetes/pkg/registry/certificates/certificates/storage" - "k8s.io/kubernetes/pkg/registry/generic" ) type RESTStorageProvider struct{} @@ -30,16 +30,16 @@ type RESTStorageProvider struct{} func (p RESTStorageProvider) NewRESTStorage(apiResourceConfigSource genericapiserver.APIResourceConfigSource, restOptionsGetter generic.RESTOptionsGetter) (genericapiserver.APIGroupInfo, bool) { apiGroupInfo := genericapiserver.NewDefaultAPIGroupInfo(certificates.GroupName) - if apiResourceConfigSource.AnyResourcesForVersionEnabled(certificatesapiv1alpha1.SchemeGroupVersion) { - apiGroupInfo.VersionedResourcesStorageMap[certificatesapiv1alpha1.SchemeGroupVersion.Version] = p.v1alpha1Storage(apiResourceConfigSource, restOptionsGetter) - apiGroupInfo.GroupMeta.GroupVersion = certificatesapiv1alpha1.SchemeGroupVersion + if apiResourceConfigSource.AnyResourcesForVersionEnabled(certificatesapiv1beta1.SchemeGroupVersion) { + apiGroupInfo.VersionedResourcesStorageMap[certificatesapiv1beta1.SchemeGroupVersion.Version] = p.v1beta1Storage(apiResourceConfigSource, restOptionsGetter) + apiGroupInfo.GroupMeta.GroupVersion = certificatesapiv1beta1.SchemeGroupVersion } return apiGroupInfo, true } -func (p RESTStorageProvider) v1alpha1Storage(apiResourceConfigSource genericapiserver.APIResourceConfigSource, restOptionsGetter generic.RESTOptionsGetter) map[string]rest.Storage { - version := certificatesapiv1alpha1.SchemeGroupVersion +func (p RESTStorageProvider) v1beta1Storage(apiResourceConfigSource genericapiserver.APIResourceConfigSource, restOptionsGetter generic.RESTOptionsGetter) map[string]rest.Storage { + version := certificatesapiv1beta1.SchemeGroupVersion storage := map[string]rest.Storage{} if apiResourceConfigSource.ResourceEnabled(version.WithResource("certificatesigningrequests")) { diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/componentstatus/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/core/componentstatus/BUILD index dc281019..82715dd9 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/componentstatus/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/componentstatus/BUILD @@ -20,10 +20,11 @@ go_library( "//pkg/api:go_default_library", "//pkg/probe:go_default_library", "//pkg/probe/http:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/internalversion", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/net", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) @@ -40,7 +41,7 @@ go_test( "//pkg/probe:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/util/diff", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/componentstatus/rest.go b/vendor/k8s.io/kubernetes/pkg/registry/core/componentstatus/rest.go index c0d0be56..d0a43267 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/componentstatus/rest.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/componentstatus/rest.go @@ -20,9 +20,10 @@ import ( "fmt" "sync" + metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/probe" httpprober "k8s.io/kubernetes/pkg/probe/http" @@ -51,7 +52,7 @@ func (rs *REST) NewList() runtime.Object { // Returns the list of component status. Note that the label and field are both ignored. // Note that this call doesn't support labels or selectors. -func (rs *REST) List(ctx genericapirequest.Context, options *api.ListOptions) (runtime.Object, error) { +func (rs *REST) List(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (runtime.Object, error) { servers := rs.GetServersToValidate() wait := sync.WaitGroup{} diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/componentstatus/rest_test.go b/vendor/k8s.io/kubernetes/pkg/registry/core/componentstatus/rest_test.go index f5e990cb..1d505007 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/componentstatus/rest_test.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/componentstatus/rest_test.go @@ -28,7 +28,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/diff" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/probe" ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/configmap/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/core/configmap/BUILD index 08e33a1e..62ff3f1d 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/configmap/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/configmap/BUILD @@ -19,16 +19,17 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/api/validation:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", - "//pkg/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/storage:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/internalversion", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/validation/field", "//vendor:k8s.io/apimachinery/pkg/watch", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", "//vendor:k8s.io/apiserver/pkg/storage/names", ], ) @@ -41,7 +42,8 @@ go_test( deps = [ "//pkg/api:go_default_library", "//pkg/api/testing:go_default_library", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/configmap/registry.go b/vendor/k8s.io/kubernetes/pkg/registry/core/configmap/registry.go index 0367dbb2..d80c79c7 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/configmap/registry.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/configmap/registry.go @@ -17,17 +17,18 @@ limitations under the License. package configmap import ( + metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/watch" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" ) // Registry is an interface for things that know how to store ConfigMaps. type Registry interface { - ListConfigMaps(ctx genericapirequest.Context, options *api.ListOptions) (*api.ConfigMapList, error) - WatchConfigMaps(ctx genericapirequest.Context, options *api.ListOptions) (watch.Interface, error) + ListConfigMaps(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (*api.ConfigMapList, error) + WatchConfigMaps(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (watch.Interface, error) GetConfigMap(ctx genericapirequest.Context, name string, options *metav1.GetOptions) (*api.ConfigMap, error) CreateConfigMap(ctx genericapirequest.Context, cfg *api.ConfigMap) (*api.ConfigMap, error) UpdateConfigMap(ctx genericapirequest.Context, cfg *api.ConfigMap) (*api.ConfigMap, error) @@ -45,7 +46,7 @@ func NewRegistry(s rest.StandardStorage) Registry { return &storage{s} } -func (s *storage) ListConfigMaps(ctx genericapirequest.Context, options *api.ListOptions) (*api.ConfigMapList, error) { +func (s *storage) ListConfigMaps(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (*api.ConfigMapList, error) { obj, err := s.List(ctx, options) if err != nil { return nil, err @@ -54,7 +55,7 @@ func (s *storage) ListConfigMaps(ctx genericapirequest.Context, options *api.Lis return obj.(*api.ConfigMapList), err } -func (s *storage) WatchConfigMaps(ctx genericapirequest.Context, options *api.ListOptions) (watch.Interface, error) { +func (s *storage) WatchConfigMaps(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (watch.Interface, error) { return s.Watch(ctx, options) } diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/configmap/storage/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/core/configmap/storage/BUILD index 19ef1865..e1287e27 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/configmap/storage/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/configmap/storage/BUILD @@ -15,10 +15,11 @@ go_test( tags = ["automanaged"], deps = [ "//pkg/api:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", "//pkg/registry/registrytest:go_default_library", "//pkg/storage/etcd/testing:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", ], @@ -30,9 +31,9 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/api:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic/registry:go_default_library", "//pkg/registry/core/configmap:go_default_library", - "//pkg/registry/generic:go_default_library", - "//pkg/registry/generic/registry:go_default_library", "//vendor:k8s.io/apimachinery/pkg/runtime", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/configmap/storage/storage.go b/vendor/k8s.io/kubernetes/pkg/registry/core/configmap/storage/storage.go index ee3edd82..7ab07af2 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/configmap/storage/storage.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/configmap/storage/storage.go @@ -19,9 +19,9 @@ package storage import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + genericregistry "k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry" "k8s.io/kubernetes/pkg/registry/core/configmap" - "k8s.io/kubernetes/pkg/registry/generic" - genericregistry "k8s.io/kubernetes/pkg/registry/generic/registry" ) // REST implements a RESTStorage for ConfigMap diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/configmap/storage/storage_test.go b/vendor/k8s.io/kubernetes/pkg/registry/core/configmap/storage/storage_test.go index 9037b990..d951c103 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/configmap/storage/storage_test.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/configmap/storage/storage_test.go @@ -19,11 +19,12 @@ package storage import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" "k8s.io/kubernetes/pkg/registry/registrytest" etcdtesting "k8s.io/kubernetes/pkg/storage/etcd/testing" ) @@ -41,7 +42,7 @@ func newStorage(t *testing.T) (*REST, *etcdtesting.EtcdTestServer) { func validNewConfigMap() *api.ConfigMap { return &api.ConfigMap{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "default", Labels: map[string]string{ @@ -62,20 +63,20 @@ func TestCreate(t *testing.T) { test := registrytest.New(t, storage.Store) validConfigMap := validNewConfigMap() - validConfigMap.ObjectMeta = api.ObjectMeta{ + validConfigMap.ObjectMeta = metav1.ObjectMeta{ GenerateName: "foo-", } test.TestCreate( validConfigMap, &api.ConfigMap{ - ObjectMeta: api.ObjectMeta{Name: "badName"}, + ObjectMeta: metav1.ObjectMeta{Name: "badName"}, Data: map[string]string{ "key": "value", }, }, &api.ConfigMap{ - ObjectMeta: api.ObjectMeta{Name: "name-2"}, + ObjectMeta: metav1.ObjectMeta{Name: "name-2"}, Data: map[string]string{ "..dotfile": "do: nothing\n", }, diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/configmap/strategy.go b/vendor/k8s.io/kubernetes/pkg/registry/core/configmap/strategy.go index 2c9bf186..4dab86cd 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/configmap/strategy.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/configmap/strategy.go @@ -19,16 +19,16 @@ package configmap import ( "fmt" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/validation/field" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/storage/names" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/validation" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" - "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" apistorage "k8s.io/kubernetes/pkg/storage" ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/configmap/strategy_test.go b/vendor/k8s.io/kubernetes/pkg/registry/core/configmap/strategy_test.go index 79b816e2..c001f59c 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/configmap/strategy_test.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/configmap/strategy_test.go @@ -19,7 +19,8 @@ package configmap import ( "testing" - genericapirequest "k8s.io/apiserver/pkg/request" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" apitesting "k8s.io/kubernetes/pkg/api/testing" ) @@ -34,9 +35,9 @@ func TestConfigMapStrategy(t *testing.T) { } cfg := &api.ConfigMap{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "valid-config-data", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, Data: map[string]string{ "foo": "bar", @@ -51,9 +52,9 @@ func TestConfigMapStrategy(t *testing.T) { } newCfg := &api.ConfigMap{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "valid-config-data-2", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, ResourceVersion: "4", }, Data: map[string]string{ diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/controller/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/core/controller/BUILD index 2a54256e..982688a3 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/controller/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/controller/BUILD @@ -19,16 +19,17 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/api/validation:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", - "//pkg/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/storage:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/internalversion", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/validation/field", "//vendor:k8s.io/apimachinery/pkg/watch", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", "//vendor:k8s.io/apiserver/pkg/storage/names", ], ) @@ -41,7 +42,8 @@ go_test( deps = [ "//pkg/api:go_default_library", "//pkg/api/testing:go_default_library", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/controller/registry.go b/vendor/k8s.io/kubernetes/pkg/registry/core/controller/registry.go index f928b13c..c3574538 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/controller/registry.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/controller/registry.go @@ -21,17 +21,18 @@ package controller import ( "fmt" + metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/watch" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" ) // Registry is an interface for things that know how to store ReplicationControllers. type Registry interface { - ListControllers(ctx genericapirequest.Context, options *api.ListOptions) (*api.ReplicationControllerList, error) - WatchControllers(ctx genericapirequest.Context, options *api.ListOptions) (watch.Interface, error) + ListControllers(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (*api.ReplicationControllerList, error) + WatchControllers(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (watch.Interface, error) GetController(ctx genericapirequest.Context, controllerID string, options *metav1.GetOptions) (*api.ReplicationController, error) CreateController(ctx genericapirequest.Context, controller *api.ReplicationController) (*api.ReplicationController, error) UpdateController(ctx genericapirequest.Context, controller *api.ReplicationController) (*api.ReplicationController, error) @@ -49,7 +50,7 @@ func NewRegistry(s rest.StandardStorage) Registry { return &storage{s} } -func (s *storage) ListControllers(ctx genericapirequest.Context, options *api.ListOptions) (*api.ReplicationControllerList, error) { +func (s *storage) ListControllers(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (*api.ReplicationControllerList, error) { if options != nil && options.FieldSelector != nil && !options.FieldSelector.Empty() { return nil, fmt.Errorf("field selector not supported yet") } @@ -60,7 +61,7 @@ func (s *storage) ListControllers(ctx genericapirequest.Context, options *api.Li return obj.(*api.ReplicationControllerList), err } -func (s *storage) WatchControllers(ctx genericapirequest.Context, options *api.ListOptions) (watch.Interface, error) { +func (s *storage) WatchControllers(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (watch.Interface, error) { return s.Watch(ctx, options) } diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/controller/storage/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/core/controller/storage/BUILD index f9ef8378..f673170e 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/controller/storage/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/controller/storage/BUILD @@ -16,17 +16,17 @@ go_test( deps = [ "//pkg/api:go_default_library", "//pkg/apis/autoscaling:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", - "//pkg/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/registry/registrytest:go_default_library", "//pkg/storage/etcd/testing:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/diff", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) @@ -38,15 +38,15 @@ go_library( "//pkg/api:go_default_library", "//pkg/apis/autoscaling:go_default_library", "//pkg/apis/autoscaling/validation:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic/registry:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/registry/core/controller:go_default_library", - "//pkg/registry/generic:go_default_library", - "//pkg/registry/generic/registry:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/controller/storage/storage.go b/vendor/k8s.io/kubernetes/pkg/registry/core/controller/storage/storage.go index 6a429231..5f36b1d4 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/controller/storage/storage.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/controller/storage/storage.go @@ -25,14 +25,14 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/autoscaling" "k8s.io/kubernetes/pkg/apis/autoscaling/validation" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + genericregistry "k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" "k8s.io/kubernetes/pkg/registry/core/controller" - "k8s.io/kubernetes/pkg/registry/generic" - genericregistry "k8s.io/kubernetes/pkg/registry/generic/registry" ) // ControllerStorage includes dummy storage for Replication Controllers and for Scale subresource. @@ -158,7 +158,7 @@ func (r *ScaleREST) Update(ctx genericapirequest.Context, name string, objInfo r // scaleFromRC returns a scale subresource for a replication controller. func scaleFromRC(rc *api.ReplicationController) *autoscaling.Scale { return &autoscaling.Scale{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: rc.Name, Namespace: rc.Namespace, UID: rc.UID, diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/controller/storage/storage_test.go b/vendor/k8s.io/kubernetes/pkg/registry/core/controller/storage/storage_test.go index ddc4d31f..35bf53b2 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/controller/storage/storage_test.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/controller/storage/storage_test.go @@ -21,21 +21,21 @@ import ( "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/diff" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/autoscaling" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" - "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" "k8s.io/kubernetes/pkg/registry/registrytest" etcdtesting "k8s.io/kubernetes/pkg/storage/etcd/testing" ) const ( - namespace = api.NamespaceDefault + namespace = metav1.NamespaceDefault name = "foo" ) @@ -64,22 +64,23 @@ func createController(storage *REST, rc api.ReplicationController, t *testing.T) func validNewController() *api.ReplicationController { return &api.ReplicationController{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: namespace, }, Spec: api.ReplicationControllerSpec{ Selector: map[string]string{"a": "b"}, Template: &api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"a": "b"}, }, Spec: api.PodSpec{ Containers: []api.Container{ { - Name: "test", - Image: "test_image", - ImagePullPolicy: api.PullIfNotPresent, + Name: "test", + Image: "test_image", + ImagePullPolicy: api.PullIfNotPresent, + TerminationMessagePolicy: api.TerminationMessageReadFile, }, }, RestartPolicy: api.RestartPolicyAlways, @@ -98,7 +99,7 @@ func TestCreate(t *testing.T) { defer storage.Controller.Store.DestroyFunc() test := registrytest.New(t, storage.Controller.Store) controller := validNewController() - controller.ObjectMeta = api.ObjectMeta{} + controller.ObjectMeta = metav1.ObjectMeta{} test.TestCreate( // valid controller, @@ -263,7 +264,7 @@ func TestScaleGet(t *testing.T) { } want := &autoscaling.Scale{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: namespace, UID: rc.UID, @@ -300,7 +301,7 @@ func TestScaleUpdate(t *testing.T) { } replicas := int32(12) update := autoscaling.Scale{ - ObjectMeta: api.ObjectMeta{Name: name, Namespace: namespace}, + ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespace}, Spec: autoscaling.ScaleSpec{ Replicas: replicas, }, diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/controller/strategy.go b/vendor/k8s.io/kubernetes/pkg/registry/core/controller/strategy.go index 1a4fc39e..2f7b7751 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/controller/strategy.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/controller/strategy.go @@ -22,17 +22,18 @@ import ( "fmt" "reflect" "strconv" + "strings" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/validation/field" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/storage/names" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/validation" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" - "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" apistorage "k8s.io/kubernetes/pkg/storage" ) @@ -102,9 +103,31 @@ func (rcStrategy) AllowCreateOnUpdate() bool { // ValidateUpdate is the default update validation for an end user. func (rcStrategy) ValidateUpdate(ctx genericapirequest.Context, obj, old runtime.Object) field.ErrorList { - validationErrorList := validation.ValidateReplicationController(obj.(*api.ReplicationController)) - updateErrorList := validation.ValidateReplicationControllerUpdate(obj.(*api.ReplicationController), old.(*api.ReplicationController)) - return append(validationErrorList, updateErrorList...) + oldRc := old.(*api.ReplicationController) + newRc := obj.(*api.ReplicationController) + + validationErrorList := validation.ValidateReplicationController(newRc) + updateErrorList := validation.ValidateReplicationControllerUpdate(newRc, oldRc) + errs := append(validationErrorList, updateErrorList...) + + for key, value := range api.NonConvertibleFields(oldRc.Annotations) { + parts := strings.Split(key, "/") + if len(parts) != 2 { + continue + } + brokenField := parts[1] + + switch { + case strings.Contains(brokenField, "selector"): + if !reflect.DeepEqual(oldRc.Spec.Selector, newRc.Spec.Selector) { + errs = append(errs, field.Invalid(field.NewPath("spec").Child("selector"), newRc.Spec.Selector, "cannot update non-convertible selector")) + } + default: + errs = append(errs, &field.Error{Type: field.ErrorTypeNotFound, BadValue: value, Field: brokenField, Detail: "unknown non-convertible field"}) + } + } + + return errs } func (rcStrategy) AllowUnconditionalUpdate() bool { diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/controller/strategy_test.go b/vendor/k8s.io/kubernetes/pkg/registry/core/controller/strategy_test.go index 7ce0c524..cdad6e9b 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/controller/strategy_test.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/controller/strategy_test.go @@ -17,9 +17,11 @@ limitations under the License. package controller import ( + "strings" "testing" - genericapirequest "k8s.io/apiserver/pkg/request" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" apitesting "k8s.io/kubernetes/pkg/api/testing" ) @@ -36,18 +38,18 @@ func TestControllerStrategy(t *testing.T) { validSelector := map[string]string{"a": "b"} validPodTemplate := api.PodTemplate{ Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validSelector, }, Spec: api.PodSpec{ RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, - Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: api.TerminationMessageReadFile}}, }, }, } rc := &api.ReplicationController{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: api.ReplicationControllerSpec{ Selector: validSelector, Template: &validPodTemplate.Template, @@ -71,7 +73,7 @@ func TestControllerStrategy(t *testing.T) { } invalidRc := &api.ReplicationController{ - ObjectMeta: api.ObjectMeta{Name: "bar", ResourceVersion: "4"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar", ResourceVersion: "4"}, } Strategy.PrepareForUpdate(ctx, invalidRc, rc) errs = Strategy.ValidateUpdate(ctx, invalidRc, rc) @@ -94,18 +96,18 @@ func TestControllerStatusStrategy(t *testing.T) { validSelector := map[string]string{"a": "b"} validPodTemplate := api.PodTemplate{ Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validSelector, }, Spec: api.PodSpec{ RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, - Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, }, }, } oldController := &api.ReplicationController{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault, ResourceVersion: "10"}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault, ResourceVersion: "10"}, Spec: api.ReplicationControllerSpec{ Replicas: 3, Selector: validSelector, @@ -117,7 +119,7 @@ func TestControllerStatusStrategy(t *testing.T) { }, } newController := &api.ReplicationController{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault, ResourceVersion: "9"}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault, ResourceVersion: "9"}, Spec: api.ReplicationControllerSpec{ Replicas: 1, Selector: validSelector, @@ -149,3 +151,67 @@ func TestSelectableFieldLabelConversions(t *testing.T) { nil, ) } + +func TestValidateUpdate(t *testing.T) { + ctx := genericapirequest.NewDefaultContext() + validSelector := map[string]string{"a": "b"} + validPodTemplate := api.PodTemplate{ + Template: api.PodTemplateSpec{ + ObjectMeta: metav1.ObjectMeta{ + Labels: validSelector, + }, + Spec: api.PodSpec{ + RestartPolicy: api.RestartPolicyAlways, + DNSPolicy: api.DNSClusterFirst, + Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}}, + }, + }, + } + oldController := &api.ReplicationController{ + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault, ResourceVersion: "10", Annotations: make(map[string]string)}, + Spec: api.ReplicationControllerSpec{ + Replicas: 3, + Selector: validSelector, + Template: &validPodTemplate.Template, + }, + Status: api.ReplicationControllerStatus{ + Replicas: 1, + ObservedGeneration: int64(10), + }, + } + // Conversion sets this annotation + oldController.Annotations[api.NonConvertibleAnnotationPrefix+"/"+"spec.selector"] = "no way" + + // Deep-copy so we won't mutate both selectors. + objCopy, err := api.Scheme.DeepCopy(oldController) + if err != nil { + t.Fatalf("unexpected deep-copy error: %v", err) + } + newController, ok := objCopy.(*api.ReplicationController) + if !ok { + t.Fatalf("unexpected object: %#v", objCopy) + } + // Irrelevant (to the selector) update for the replication controller. + newController.Spec.Replicas = 5 + + // If they didn't try to update the selector then we should not return any error. + errs := Strategy.ValidateUpdate(ctx, newController, oldController) + if len(errs) > 0 { + t.Fatalf("unexpected errors: %v", errs) + } + + // Update the selector - validation should return an error. + newController.Spec.Selector["shiny"] = "newlabel" + newController.Spec.Template.Labels["shiny"] = "newlabel" + + errs = Strategy.ValidateUpdate(ctx, newController, oldController) + for _, err := range errs { + t.Logf("%#v\n", err) + } + if len(errs) != 1 { + t.Fatalf("expected a validation error") + } + if !strings.Contains(errs[0].Error(), "selector") { + t.Fatalf("expected error related to the selector") + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/endpoint/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/core/endpoint/BUILD index 4dbc1915..bf42593f 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/endpoint/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/endpoint/BUILD @@ -20,16 +20,17 @@ go_library( "//pkg/api:go_default_library", "//pkg/api/endpoints:go_default_library", "//pkg/api/validation:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", - "//pkg/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/storage:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/internalversion", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/validation/field", "//vendor:k8s.io/apimachinery/pkg/watch", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", "//vendor:k8s.io/apiserver/pkg/storage/names", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/endpoint/registry.go b/vendor/k8s.io/kubernetes/pkg/registry/core/endpoint/registry.go index 845ded3c..79487af9 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/endpoint/registry.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/endpoint/registry.go @@ -17,18 +17,19 @@ limitations under the License. package endpoint import ( + metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/watch" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" ) // Registry is an interface for things that know how to store endpoints. type Registry interface { - ListEndpoints(ctx genericapirequest.Context, options *api.ListOptions) (*api.EndpointsList, error) + ListEndpoints(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (*api.EndpointsList, error) GetEndpoints(ctx genericapirequest.Context, name string, options *metav1.GetOptions) (*api.Endpoints, error) - WatchEndpoints(ctx genericapirequest.Context, options *api.ListOptions) (watch.Interface, error) + WatchEndpoints(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (watch.Interface, error) UpdateEndpoints(ctx genericapirequest.Context, e *api.Endpoints) error DeleteEndpoints(ctx genericapirequest.Context, name string) error } @@ -44,7 +45,7 @@ func NewRegistry(s rest.StandardStorage) Registry { return &storage{s} } -func (s *storage) ListEndpoints(ctx genericapirequest.Context, options *api.ListOptions) (*api.EndpointsList, error) { +func (s *storage) ListEndpoints(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (*api.EndpointsList, error) { obj, err := s.List(ctx, options) if err != nil { return nil, err @@ -52,7 +53,7 @@ func (s *storage) ListEndpoints(ctx genericapirequest.Context, options *api.List return obj.(*api.EndpointsList), nil } -func (s *storage) WatchEndpoints(ctx genericapirequest.Context, options *api.ListOptions) (watch.Interface, error) { +func (s *storage) WatchEndpoints(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (watch.Interface, error) { return s.Watch(ctx, options) } diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/endpoint/storage/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/core/endpoint/storage/BUILD index f6121fae..d3cb6061 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/endpoint/storage/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/endpoint/storage/BUILD @@ -15,10 +15,11 @@ go_test( tags = ["automanaged"], deps = [ "//pkg/api:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", "//pkg/registry/registrytest:go_default_library", "//pkg/storage/etcd/testing:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", ], @@ -30,9 +31,9 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/api:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic/registry:go_default_library", "//pkg/registry/core/endpoint:go_default_library", - "//pkg/registry/generic:go_default_library", - "//pkg/registry/generic/registry:go_default_library", "//vendor:k8s.io/apimachinery/pkg/runtime", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/endpoint/storage/storage.go b/vendor/k8s.io/kubernetes/pkg/registry/core/endpoint/storage/storage.go index ec5fa18a..875817d4 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/endpoint/storage/storage.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/endpoint/storage/storage.go @@ -19,9 +19,9 @@ package storage import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + genericregistry "k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry" "k8s.io/kubernetes/pkg/registry/core/endpoint" - "k8s.io/kubernetes/pkg/registry/generic" - genericregistry "k8s.io/kubernetes/pkg/registry/generic/registry" ) type REST struct { diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/endpoint/storage/storage_test.go b/vendor/k8s.io/kubernetes/pkg/registry/core/endpoint/storage/storage_test.go index 433b3afa..1b89cd05 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/endpoint/storage/storage_test.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/endpoint/storage/storage_test.go @@ -19,11 +19,12 @@ package storage import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" "k8s.io/kubernetes/pkg/registry/registrytest" etcdtesting "k8s.io/kubernetes/pkg/storage/etcd/testing" ) @@ -41,9 +42,9 @@ func newStorage(t *testing.T) (*REST, *etcdtesting.EtcdTestServer) { func validNewEndpoints() *api.Endpoints { return &api.Endpoints{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "1.2.3.4"}}, @@ -68,13 +69,13 @@ func TestCreate(t *testing.T) { defer storage.Store.DestroyFunc() test := registrytest.New(t, storage.Store) endpoints := validNewEndpoints() - endpoints.ObjectMeta = api.ObjectMeta{} + endpoints.ObjectMeta = metav1.ObjectMeta{} test.TestCreate( // valid endpoints, // invalid &api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: "_-a123-a_"}, + ObjectMeta: metav1.ObjectMeta{Name: "_-a123-a_"}, }, ) } diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/endpoint/strategy.go b/vendor/k8s.io/kubernetes/pkg/registry/core/endpoint/strategy.go index d5203f56..badc44fa 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/endpoint/strategy.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/endpoint/strategy.go @@ -19,16 +19,16 @@ package endpoint import ( "fmt" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/validation/field" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/storage/names" "k8s.io/kubernetes/pkg/api" endptspkg "k8s.io/kubernetes/pkg/api/endpoints" "k8s.io/kubernetes/pkg/api/validation" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" pkgstorage "k8s.io/kubernetes/pkg/storage" ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/event/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/core/event/BUILD index a515a20e..61a68e86 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/event/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/event/BUILD @@ -18,13 +18,13 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/api/validation:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", "//pkg/storage:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/validation/field", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", "//vendor:k8s.io/apiserver/pkg/storage/names", ], ) @@ -37,7 +37,8 @@ go_test( deps = [ "//pkg/api:go_default_library", "//pkg/api/testing:go_default_library", - "//pkg/fields:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/util/diff", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/event/storage/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/core/event/storage/BUILD index bf7eeb8d..5dbfca47 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/event/storage/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/event/storage/BUILD @@ -15,9 +15,10 @@ go_test( tags = ["automanaged"], deps = [ "//pkg/api:go_default_library", - "//pkg/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", "//pkg/registry/registrytest:go_default_library", "//pkg/storage/etcd/testing:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", ], ) @@ -28,9 +29,9 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/api:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic/registry:go_default_library", "//pkg/registry/core/event:go_default_library", - "//pkg/registry/generic:go_default_library", - "//pkg/registry/generic/registry:go_default_library", "//vendor:k8s.io/apimachinery/pkg/runtime", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/event/storage/storage.go b/vendor/k8s.io/kubernetes/pkg/registry/core/event/storage/storage.go index 85836076..ff5222bd 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/event/storage/storage.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/event/storage/storage.go @@ -19,9 +19,9 @@ package storage import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + genericregistry "k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry" "k8s.io/kubernetes/pkg/registry/core/event" - "k8s.io/kubernetes/pkg/registry/generic" - genericregistry "k8s.io/kubernetes/pkg/registry/generic/registry" ) type REST struct { diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/event/storage/storage_test.go b/vendor/k8s.io/kubernetes/pkg/registry/core/event/storage/storage_test.go index 380fba67..b8042257 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/event/storage/storage_test.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/event/storage/storage_test.go @@ -19,9 +19,10 @@ package storage import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" "k8s.io/kubernetes/pkg/registry/registrytest" etcdtesting "k8s.io/kubernetes/pkg/storage/etcd/testing" ) @@ -41,7 +42,7 @@ func newStorage(t *testing.T) (*REST, *etcdtesting.EtcdTestServer) { func validNewEvent(namespace string) *api.Event { return &api.Event{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: namespace, }, @@ -59,7 +60,7 @@ func TestCreate(t *testing.T) { defer storage.Store.DestroyFunc() test := registrytest.New(t, storage.Store) event := validNewEvent(test.TestNamespace()) - event.ObjectMeta = api.ObjectMeta{} + event.ObjectMeta = metav1.ObjectMeta{} test.TestCreate( // valid event, diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/event/strategy.go b/vendor/k8s.io/kubernetes/pkg/registry/core/event/strategy.go index 9ce61daf..992cbbd2 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/event/strategy.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/event/strategy.go @@ -19,15 +19,15 @@ package event import ( "fmt" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/validation/field" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/storage/names" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/validation" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" "k8s.io/kubernetes/pkg/storage" ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/event/strategy_test.go b/vendor/k8s.io/kubernetes/pkg/registry/core/event/strategy_test.go index 8bc4843e..9b5e5959 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/event/strategy_test.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/event/strategy_test.go @@ -20,15 +20,16 @@ import ( "reflect" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/util/diff" "k8s.io/kubernetes/pkg/api" apitesting "k8s.io/kubernetes/pkg/api/testing" - "k8s.io/kubernetes/pkg/fields" ) func testEvent(name string) *api.Event { return &api.Event{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: "default", }, @@ -41,7 +42,7 @@ func testEvent(name string) *api.Event { func TestGetAttrs(t *testing.T) { eventA := &api.Event{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "f0118", Namespace: "default", }, diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/limitrange/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/core/limitrange/BUILD index 7c1853fd..5a46b38e 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/limitrange/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/limitrange/BUILD @@ -18,13 +18,13 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/api/validation:go_default_library", - "//pkg/fields:go_default_library", "//pkg/storage:go_default_library", "//pkg/util/uuid:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/validation/field", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", "//vendor:k8s.io/apiserver/pkg/storage/names", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/limitrange/storage/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/core/limitrange/storage/BUILD index c1ea5f78..d881f647 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/limitrange/storage/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/limitrange/storage/BUILD @@ -16,10 +16,11 @@ go_test( deps = [ "//pkg/api:go_default_library", "//pkg/api/resource:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", "//pkg/registry/registrytest:go_default_library", "//pkg/storage/etcd/testing:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", ], @@ -31,9 +32,9 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/api:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic/registry:go_default_library", "//pkg/registry/core/limitrange:go_default_library", - "//pkg/registry/generic:go_default_library", - "//pkg/registry/generic/registry:go_default_library", "//vendor:k8s.io/apimachinery/pkg/runtime", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/limitrange/storage/storage.go b/vendor/k8s.io/kubernetes/pkg/registry/core/limitrange/storage/storage.go index 299df9b2..d0ce011f 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/limitrange/storage/storage.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/limitrange/storage/storage.go @@ -19,9 +19,9 @@ package storage import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + genericregistry "k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry" "k8s.io/kubernetes/pkg/registry/core/limitrange" - "k8s.io/kubernetes/pkg/registry/generic" - genericregistry "k8s.io/kubernetes/pkg/registry/generic/registry" ) type REST struct { diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/limitrange/storage/storage_test.go b/vendor/k8s.io/kubernetes/pkg/registry/core/limitrange/storage/storage_test.go index 78fef9a4..0504dbb3 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/limitrange/storage/storage_test.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/limitrange/storage/storage_test.go @@ -19,12 +19,13 @@ package storage import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/resource" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" "k8s.io/kubernetes/pkg/registry/registrytest" etcdtesting "k8s.io/kubernetes/pkg/storage/etcd/testing" ) @@ -42,9 +43,9 @@ func newStorage(t *testing.T) (*REST, *etcdtesting.EtcdTestServer) { func validNewLimitRange() *api.LimitRange { return &api.LimitRange{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, Spec: api.LimitRangeSpec{ Limits: []api.LimitRangeItem{ @@ -70,13 +71,13 @@ func TestCreate(t *testing.T) { defer storage.Store.DestroyFunc() test := registrytest.New(t, storage.Store).GeneratesName() validLimitRange := validNewLimitRange() - validLimitRange.ObjectMeta = api.ObjectMeta{} + validLimitRange.ObjectMeta = metav1.ObjectMeta{} test.TestCreate( // valid validLimitRange, // invalid &api.LimitRange{ - ObjectMeta: api.ObjectMeta{Name: "_-a123-a_"}, + ObjectMeta: metav1.ObjectMeta{Name: "_-a123-a_"}, }, ) } diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/limitrange/strategy.go b/vendor/k8s.io/kubernetes/pkg/registry/core/limitrange/strategy.go index aae6fa0a..4b4b9717 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/limitrange/strategy.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/limitrange/strategy.go @@ -19,14 +19,14 @@ package limitrange import ( "fmt" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/validation/field" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/storage/names" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/validation" - "k8s.io/kubernetes/pkg/fields" "k8s.io/kubernetes/pkg/storage" "k8s.io/kubernetes/pkg/util/uuid" ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/namespace/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/core/namespace/BUILD index 5ac9c3eb..32684371 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/namespace/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/namespace/BUILD @@ -19,16 +19,17 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/api/validation:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", - "//pkg/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/storage:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/internalversion", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/validation/field", "//vendor:k8s.io/apimachinery/pkg/watch", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", "//vendor:k8s.io/apiserver/pkg/storage/names", ], ) @@ -42,7 +43,7 @@ go_test( "//pkg/api:go_default_library", "//pkg/api/testing:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/namespace/registry.go b/vendor/k8s.io/kubernetes/pkg/registry/core/namespace/registry.go index a0b1bd28..58cbb0f2 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/namespace/registry.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/namespace/registry.go @@ -17,17 +17,18 @@ limitations under the License. package namespace import ( + metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/watch" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" ) // Registry is an interface implemented by things that know how to store Namespace objects. type Registry interface { - ListNamespaces(ctx genericapirequest.Context, options *api.ListOptions) (*api.NamespaceList, error) - WatchNamespaces(ctx genericapirequest.Context, options *api.ListOptions) (watch.Interface, error) + ListNamespaces(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (*api.NamespaceList, error) + WatchNamespaces(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (watch.Interface, error) GetNamespace(ctx genericapirequest.Context, namespaceID string, options *metav1.GetOptions) (*api.Namespace, error) CreateNamespace(ctx genericapirequest.Context, namespace *api.Namespace) error UpdateNamespace(ctx genericapirequest.Context, namespace *api.Namespace) error @@ -45,7 +46,7 @@ func NewRegistry(s rest.StandardStorage) Registry { return &storage{s} } -func (s *storage) ListNamespaces(ctx genericapirequest.Context, options *api.ListOptions) (*api.NamespaceList, error) { +func (s *storage) ListNamespaces(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (*api.NamespaceList, error) { obj, err := s.List(ctx, options) if err != nil { return nil, err @@ -53,7 +54,7 @@ func (s *storage) ListNamespaces(ctx genericapirequest.Context, options *api.Lis return obj.(*api.NamespaceList), nil } -func (s *storage) WatchNamespaces(ctx genericapirequest.Context, options *api.ListOptions) (watch.Interface, error) { +func (s *storage) WatchNamespaces(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (watch.Interface, error) { return s.Watch(ctx, options) } diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/namespace/storage/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/core/namespace/storage/BUILD index 2254c15e..69386177 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/namespace/storage/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/namespace/storage/BUILD @@ -15,13 +15,13 @@ go_test( tags = ["automanaged"], deps = [ "//pkg/api:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", "//pkg/registry/registrytest:go_default_library", "//pkg/storage/etcd/testing:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) @@ -32,15 +32,15 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/api/errors/storage:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic/registry:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/registry/core/namespace:go_default_library", - "//pkg/registry/generic:go_default_library", - "//pkg/registry/generic/registry:go_default_library", "//pkg/storage:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/namespace/storage/storage.go b/vendor/k8s.io/kubernetes/pkg/registry/core/namespace/storage/storage.go index ab05b0d8..76c685d2 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/namespace/storage/storage.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/namespace/storage/storage.go @@ -22,13 +22,13 @@ import ( apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" storageerr "k8s.io/kubernetes/pkg/api/errors/storage" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + genericregistry "k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" "k8s.io/kubernetes/pkg/registry/core/namespace" - "k8s.io/kubernetes/pkg/registry/generic" - genericregistry "k8s.io/kubernetes/pkg/registry/generic/registry" "k8s.io/kubernetes/pkg/storage" ) @@ -79,7 +79,7 @@ func NewREST(optsGetter generic.RESTOptionsGetter) (*REST, *StatusREST, *Finaliz } // Delete enforces life-cycle rules for namespace termination -func (r *REST) Delete(ctx genericapirequest.Context, name string, options *api.DeleteOptions) (runtime.Object, error) { +func (r *REST) Delete(ctx genericapirequest.Context, name string, options *metav1.DeleteOptions) (runtime.Object, error) { nsObj, err := r.Get(ctx, name, &metav1.GetOptions{}) if err != nil { return nil, err @@ -89,10 +89,10 @@ func (r *REST) Delete(ctx genericapirequest.Context, name string, options *api.D // Ensure we have a UID precondition if options == nil { - options = api.NewDeleteOptions(0) + options = metav1.NewDeleteOptions(0) } if options.Preconditions == nil { - options.Preconditions = &api.Preconditions{} + options.Preconditions = &metav1.Preconditions{} } if options.Preconditions.UID == nil { options.Preconditions.UID = &namespace.UID diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/namespace/storage/storage_test.go b/vendor/k8s.io/kubernetes/pkg/registry/core/namespace/storage/storage_test.go index c8be3450..2418c335 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/namespace/storage/storage_test.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/namespace/storage/storage_test.go @@ -20,11 +20,11 @@ import ( "testing" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" "k8s.io/kubernetes/pkg/registry/registrytest" etcdtesting "k8s.io/kubernetes/pkg/storage/etcd/testing" ) @@ -38,7 +38,7 @@ func newStorage(t *testing.T) (*REST, *etcdtesting.EtcdTestServer) { func validNewNamespace() *api.Namespace { return &api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, } @@ -50,13 +50,13 @@ func TestCreate(t *testing.T) { defer storage.Store.DestroyFunc() test := registrytest.New(t, storage.Store).ClusterScope() namespace := validNewNamespace() - namespace.ObjectMeta = api.ObjectMeta{GenerateName: "foo"} + namespace.ObjectMeta = metav1.ObjectMeta{GenerateName: "foo"} test.TestCreate( // valid namespace, // invalid &api.Namespace{ - ObjectMeta: api.ObjectMeta{Name: "bad value"}, + ObjectMeta: metav1.ObjectMeta{Name: "bad value"}, }, ) } @@ -145,7 +145,7 @@ func TestDeleteNamespaceWithIncompleteFinalizers(t *testing.T) { ctx := genericapirequest.NewContext() now := metav1.Now() namespace := &api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", DeletionTimestamp: &now, }, @@ -170,7 +170,7 @@ func TestDeleteNamespaceWithCompleteFinalizers(t *testing.T) { ctx := genericapirequest.NewContext() now := metav1.Now() namespace := &api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", DeletionTimestamp: &now, }, diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/namespace/strategy.go b/vendor/k8s.io/kubernetes/pkg/registry/core/namespace/strategy.go index c5d70052..48c9a31a 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/namespace/strategy.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/namespace/strategy.go @@ -19,15 +19,15 @@ package namespace import ( "fmt" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/validation/field" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/storage/names" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/validation" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" apistorage "k8s.io/kubernetes/pkg/storage" ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/namespace/strategy_test.go b/vendor/k8s.io/kubernetes/pkg/registry/core/namespace/strategy_test.go index f3e481e2..37691ac7 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/namespace/strategy_test.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/namespace/strategy_test.go @@ -20,7 +20,7 @@ import ( "testing" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" apitesting "k8s.io/kubernetes/pkg/api/testing" ) @@ -34,7 +34,7 @@ func TestNamespaceStrategy(t *testing.T) { t.Errorf("Namespaces should not allow create on update") } namespace := &api.Namespace{ - ObjectMeta: api.ObjectMeta{Name: "foo", ResourceVersion: "10"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", ResourceVersion: "10"}, Status: api.NamespaceStatus{Phase: api.NamespaceTerminating}, } Strategy.PrepareForCreate(ctx, namespace) @@ -49,7 +49,7 @@ func TestNamespaceStrategy(t *testing.T) { t.Errorf("Unexpected error validating %v", errs) } invalidNamespace := &api.Namespace{ - ObjectMeta: api.ObjectMeta{Name: "bar", ResourceVersion: "4"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar", ResourceVersion: "4"}, } // ensure we copy spec.finalizers from old to new Strategy.PrepareForUpdate(ctx, invalidNamespace, namespace) @@ -75,12 +75,12 @@ func TestNamespaceStatusStrategy(t *testing.T) { } now := metav1.Now() oldNamespace := &api.Namespace{ - ObjectMeta: api.ObjectMeta{Name: "foo", ResourceVersion: "10", DeletionTimestamp: &now}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", ResourceVersion: "10", DeletionTimestamp: &now}, Spec: api.NamespaceSpec{Finalizers: []api.FinalizerName{"kubernetes"}}, Status: api.NamespaceStatus{Phase: api.NamespaceActive}, } namespace := &api.Namespace{ - ObjectMeta: api.ObjectMeta{Name: "foo", ResourceVersion: "9", DeletionTimestamp: &now}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", ResourceVersion: "9", DeletionTimestamp: &now}, Status: api.NamespaceStatus{Phase: api.NamespaceTerminating}, } StatusStrategy.PrepareForUpdate(ctx, namespace, oldNamespace) @@ -108,12 +108,12 @@ func TestNamespaceFinalizeStrategy(t *testing.T) { t.Errorf("Namespaces should not allow create on update") } oldNamespace := &api.Namespace{ - ObjectMeta: api.ObjectMeta{Name: "foo", ResourceVersion: "10"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", ResourceVersion: "10"}, Spec: api.NamespaceSpec{Finalizers: []api.FinalizerName{"kubernetes", "example.com/org"}}, Status: api.NamespaceStatus{Phase: api.NamespaceActive}, } namespace := &api.Namespace{ - ObjectMeta: api.ObjectMeta{Name: "foo", ResourceVersion: "9"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", ResourceVersion: "9"}, Spec: api.NamespaceSpec{Finalizers: []api.FinalizerName{"example.com/foo"}}, Status: api.NamespaceStatus{Phase: api.NamespaceTerminating}, } diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/node/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/core/node/BUILD index 3e7ae6ba..1e45b545 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/node/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/node/BUILD @@ -19,20 +19,21 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/api/validation:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/kubelet/client:go_default_library", - "//pkg/registry/generic:go_default_library", "//pkg/storage:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/internalversion", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/net", "//vendor:k8s.io/apimachinery/pkg/util/validation/field", "//vendor:k8s.io/apimachinery/pkg/watch", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", "//vendor:k8s.io/apiserver/pkg/storage/names", ], ) @@ -45,7 +46,7 @@ go_test( deps = [ "//pkg/api:go_default_library", "//pkg/api/testing:go_default_library", - "//pkg/fields:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/node/registry.go b/vendor/k8s.io/kubernetes/pkg/registry/core/node/registry.go index d2a1be11..0bd61e58 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/node/registry.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/node/registry.go @@ -17,21 +17,22 @@ limitations under the License. package node import ( + metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/watch" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" ) // Registry is an interface for things that know how to store node. type Registry interface { - ListNodes(ctx genericapirequest.Context, options *api.ListOptions) (*api.NodeList, error) + ListNodes(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (*api.NodeList, error) CreateNode(ctx genericapirequest.Context, node *api.Node) error UpdateNode(ctx genericapirequest.Context, node *api.Node) error GetNode(ctx genericapirequest.Context, nodeID string, options *metav1.GetOptions) (*api.Node, error) DeleteNode(ctx genericapirequest.Context, nodeID string) error - WatchNodes(ctx genericapirequest.Context, options *api.ListOptions) (watch.Interface, error) + WatchNodes(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (watch.Interface, error) } // storage puts strong typing around storage calls @@ -45,7 +46,7 @@ func NewRegistry(s rest.StandardStorage) Registry { return &storage{s} } -func (s *storage) ListNodes(ctx genericapirequest.Context, options *api.ListOptions) (*api.NodeList, error) { +func (s *storage) ListNodes(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (*api.NodeList, error) { obj, err := s.List(ctx, options) if err != nil { return nil, err @@ -64,7 +65,7 @@ func (s *storage) UpdateNode(ctx genericapirequest.Context, node *api.Node) erro return err } -func (s *storage) WatchNodes(ctx genericapirequest.Context, options *api.ListOptions) (watch.Interface, error) { +func (s *storage) WatchNodes(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (watch.Interface, error) { return s.Watch(ctx, options) } diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/node/rest/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/core/node/rest/BUILD index e550aed4..0162d0fc 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/node/rest/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/node/rest/BUILD @@ -14,13 +14,13 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/capabilities:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", + "//pkg/genericapiserver/registry/generic/registry:go_default_library", + "//pkg/genericapiserver/registry/generic/rest:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/kubelet/client:go_default_library", "//pkg/registry/core/node:go_default_library", - "//pkg/registry/generic/registry:go_default_library", - "//pkg/registry/generic/rest:go_default_library", "//vendor:k8s.io/apimachinery/pkg/runtime", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/node/rest/proxy.go b/vendor/k8s.io/kubernetes/pkg/registry/core/node/rest/proxy.go index 8e1e7786..5195707e 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/node/rest/proxy.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/node/rest/proxy.go @@ -23,14 +23,14 @@ import ( "path" "k8s.io/apimachinery/pkg/runtime" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/capabilities" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + genericregistry "k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry" + genericrest "k8s.io/kubernetes/pkg/genericapiserver/registry/generic/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" "k8s.io/kubernetes/pkg/kubelet/client" "k8s.io/kubernetes/pkg/registry/core/node" - genericregistry "k8s.io/kubernetes/pkg/registry/generic/registry" - genericrest "k8s.io/kubernetes/pkg/registry/generic/rest" ) // ProxyREST implements the proxy subresource for a Node diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/node/storage/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/core/node/storage/BUILD index f2017f7e..a28f9588 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/node/storage/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/node/storage/BUILD @@ -16,11 +16,12 @@ go_test( deps = [ "//pkg/api:go_default_library", "//pkg/api/resource:go_default_library", - "//pkg/fields:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", "//pkg/kubelet/client:go_default_library", - "//pkg/registry/generic:go_default_library", "//pkg/registry/registrytest:go_default_library", "//pkg/storage/etcd/testing:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", ], @@ -33,15 +34,15 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/api/v1:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic/registry:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/kubelet/client:go_default_library", "//pkg/registry/core/node:go_default_library", "//pkg/registry/core/node/rest:go_default_library", - "//pkg/registry/generic:go_default_library", - "//pkg/registry/generic/registry:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/node/storage/storage.go b/vendor/k8s.io/kubernetes/pkg/registry/core/node/storage/storage.go index c6882c33..d76ee3df 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/node/storage/storage.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/node/storage/storage.go @@ -23,15 +23,15 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + genericregistry "k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" "k8s.io/kubernetes/pkg/kubelet/client" "k8s.io/kubernetes/pkg/registry/core/node" noderest "k8s.io/kubernetes/pkg/registry/core/node/rest" - "k8s.io/kubernetes/pkg/registry/generic" - genericregistry "k8s.io/kubernetes/pkg/registry/generic/registry" ) // NodeStorage includes storage for nodes and all sub resources diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/node/storage/storage_test.go b/vendor/k8s.io/kubernetes/pkg/registry/core/node/storage/storage_test.go index 49874242..c9b52b58 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/node/storage/storage_test.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/node/storage/storage_test.go @@ -19,13 +19,14 @@ package storage import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/resource" - "k8s.io/kubernetes/pkg/fields" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" kubeletclient "k8s.io/kubernetes/pkg/kubelet/client" - "k8s.io/kubernetes/pkg/registry/generic" "k8s.io/kubernetes/pkg/registry/registrytest" etcdtesting "k8s.io/kubernetes/pkg/storage/etcd/testing" ) @@ -47,7 +48,7 @@ func newStorage(t *testing.T) (*REST, *etcdtesting.EtcdTestServer) { func validNewNode() *api.Node { return &api.Node{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{ "name": "foo", @@ -71,13 +72,13 @@ func TestCreate(t *testing.T) { defer storage.Store.DestroyFunc() test := registrytest.New(t, storage.Store).ClusterScope() node := validNewNode() - node.ObjectMeta = api.ObjectMeta{GenerateName: "foo"} + node.ObjectMeta = metav1.ObjectMeta{GenerateName: "foo"} test.TestCreate( // valid node, // invalid &api.Node{ - ObjectMeta: api.ObjectMeta{Name: "_-a123-a_"}, + ObjectMeta: metav1.ObjectMeta{Name: "_-a123-a_"}, }, ) } diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/node/strategy.go b/vendor/k8s.io/kubernetes/pkg/registry/core/node/strategy.go index d977ee2e..cbfe38a8 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/node/strategy.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/node/strategy.go @@ -24,18 +24,18 @@ import ( "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" utilnet "k8s.io/apimachinery/pkg/util/net" "k8s.io/apimachinery/pkg/util/validation/field" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/storage/names" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/validation" - "k8s.io/kubernetes/pkg/fields" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" "k8s.io/kubernetes/pkg/kubelet/client" - "k8s.io/kubernetes/pkg/registry/generic" pkgstorage "k8s.io/kubernetes/pkg/storage" ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/node/strategy_test.go b/vendor/k8s.io/kubernetes/pkg/registry/core/node/strategy_test.go index 4236dacc..2fd33f6a 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/node/strategy_test.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/node/strategy_test.go @@ -19,10 +19,10 @@ package node import ( "testing" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/kubernetes/pkg/api" apitesting "k8s.io/kubernetes/pkg/api/testing" - "k8s.io/kubernetes/pkg/fields" ) func TestMatchNode(t *testing.T) { diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/persistentvolume/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/core/persistentvolume/BUILD index 882315a3..76ec153e 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/persistentvolume/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/persistentvolume/BUILD @@ -18,13 +18,13 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/api/validation:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", "//pkg/storage:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/validation/field", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", "//vendor:k8s.io/apiserver/pkg/storage/names", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/persistentvolume/storage/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/core/persistentvolume/storage/BUILD index 9d2bc450..9cf98d79 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/persistentvolume/storage/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/persistentvolume/storage/BUILD @@ -16,16 +16,16 @@ go_test( deps = [ "//pkg/api:go_default_library", "//pkg/api/resource:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", - "//pkg/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/registry/registrytest:go_default_library", "//pkg/storage/etcd/testing:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/diff", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) @@ -35,13 +35,13 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/api:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic/registry:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/registry/core/persistentvolume:go_default_library", - "//pkg/registry/generic:go_default_library", - "//pkg/registry/generic/registry:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/persistentvolume/storage/storage.go b/vendor/k8s.io/kubernetes/pkg/registry/core/persistentvolume/storage/storage.go index 693072b8..cb22e33d 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/persistentvolume/storage/storage.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/persistentvolume/storage/storage.go @@ -19,12 +19,12 @@ package storage import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + genericregistry "k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" "k8s.io/kubernetes/pkg/registry/core/persistentvolume" - "k8s.io/kubernetes/pkg/registry/generic" - genericregistry "k8s.io/kubernetes/pkg/registry/generic/registry" ) type REST struct { diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/persistentvolume/storage/storage_test.go b/vendor/k8s.io/kubernetes/pkg/registry/core/persistentvolume/storage/storage_test.go index 44d5b233..26f11089 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/persistentvolume/storage/storage_test.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/persistentvolume/storage/storage_test.go @@ -20,15 +20,15 @@ import ( "testing" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/diff" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/resource" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" - "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" "k8s.io/kubernetes/pkg/registry/registrytest" etcdtesting "k8s.io/kubernetes/pkg/storage/etcd/testing" ) @@ -47,7 +47,7 @@ func newStorage(t *testing.T) (*REST, *StatusREST, *etcdtesting.EtcdTestServer) func validNewPersistentVolume(name string) *api.PersistentVolume { pv := &api.PersistentVolume{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Spec: api.PersistentVolumeSpec{ @@ -80,13 +80,13 @@ func TestCreate(t *testing.T) { defer storage.Store.DestroyFunc() test := registrytest.New(t, storage.Store).ClusterScope() pv := validNewPersistentVolume("foo") - pv.ObjectMeta = api.ObjectMeta{GenerateName: "foo"} + pv.ObjectMeta = metav1.ObjectMeta{GenerateName: "foo"} test.TestCreate( // valid pv, // invalid &api.PersistentVolume{ - ObjectMeta: api.ObjectMeta{Name: "*BadName!"}, + ObjectMeta: metav1.ObjectMeta{Name: "*BadName!"}, }, ) } @@ -172,7 +172,7 @@ func TestUpdateStatus(t *testing.T) { } pvIn := &api.PersistentVolume{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Status: api.PersistentVolumeStatus{ diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/persistentvolume/strategy.go b/vendor/k8s.io/kubernetes/pkg/registry/core/persistentvolume/strategy.go index fcf36cd2..8a6faac9 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/persistentvolume/strategy.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/persistentvolume/strategy.go @@ -19,15 +19,15 @@ package persistentvolume import ( "fmt" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/validation/field" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/storage/names" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/validation" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" "k8s.io/kubernetes/pkg/storage" ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/persistentvolumeclaim/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/core/persistentvolumeclaim/BUILD index 1cf12f7f..1ecb69ea 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/persistentvolumeclaim/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/persistentvolumeclaim/BUILD @@ -18,13 +18,13 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/api/validation:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", "//pkg/storage:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/validation/field", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", "//vendor:k8s.io/apiserver/pkg/storage/names", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/persistentvolumeclaim/storage/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/core/persistentvolumeclaim/storage/BUILD index 7981c4c1..e8a9576d 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/persistentvolumeclaim/storage/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/persistentvolumeclaim/storage/BUILD @@ -16,16 +16,16 @@ go_test( deps = [ "//pkg/api:go_default_library", "//pkg/api/resource:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", - "//pkg/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/registry/registrytest:go_default_library", "//pkg/storage/etcd/testing:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/diff", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) @@ -35,13 +35,13 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/api:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic/registry:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/registry/core/persistentvolumeclaim:go_default_library", - "//pkg/registry/generic:go_default_library", - "//pkg/registry/generic/registry:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/persistentvolumeclaim/storage/storage.go b/vendor/k8s.io/kubernetes/pkg/registry/core/persistentvolumeclaim/storage/storage.go index 775416b6..239d9775 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/persistentvolumeclaim/storage/storage.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/persistentvolumeclaim/storage/storage.go @@ -19,12 +19,12 @@ package storage import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + genericregistry "k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" "k8s.io/kubernetes/pkg/registry/core/persistentvolumeclaim" - "k8s.io/kubernetes/pkg/registry/generic" - genericregistry "k8s.io/kubernetes/pkg/registry/generic/registry" ) type REST struct { diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/persistentvolumeclaim/storage/storage_test.go b/vendor/k8s.io/kubernetes/pkg/registry/core/persistentvolumeclaim/storage/storage_test.go index 4091542f..d0412834 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/persistentvolumeclaim/storage/storage_test.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/persistentvolumeclaim/storage/storage_test.go @@ -20,15 +20,15 @@ import ( "testing" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/diff" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/resource" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" - "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" "k8s.io/kubernetes/pkg/registry/registrytest" etcdtesting "k8s.io/kubernetes/pkg/storage/etcd/testing" ) @@ -47,7 +47,7 @@ func newStorage(t *testing.T) (*REST, *StatusREST, *etcdtesting.EtcdTestServer) func validNewPersistentVolumeClaim(name, ns string) *api.PersistentVolumeClaim { pv := &api.PersistentVolumeClaim{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: ns, }, @@ -71,14 +71,14 @@ func TestCreate(t *testing.T) { defer server.Terminate(t) defer storage.Store.DestroyFunc() test := registrytest.New(t, storage.Store) - pv := validNewPersistentVolumeClaim("foo", api.NamespaceDefault) - pv.ObjectMeta = api.ObjectMeta{} + pv := validNewPersistentVolumeClaim("foo", metav1.NamespaceDefault) + pv.ObjectMeta = metav1.ObjectMeta{} test.TestCreate( // valid pv, // invalid &api.PersistentVolumeClaim{ - ObjectMeta: api.ObjectMeta{Name: "*BadName!"}, + ObjectMeta: metav1.ObjectMeta{Name: "*BadName!"}, }, ) } @@ -90,7 +90,7 @@ func TestUpdate(t *testing.T) { test := registrytest.New(t, storage.Store) test.TestUpdate( // valid - validNewPersistentVolumeClaim("foo", api.NamespaceDefault), + validNewPersistentVolumeClaim("foo", metav1.NamespaceDefault), // updateFunc func(obj runtime.Object) runtime.Object { object := obj.(*api.PersistentVolumeClaim) @@ -105,7 +105,7 @@ func TestDelete(t *testing.T) { defer server.Terminate(t) defer storage.Store.DestroyFunc() test := registrytest.New(t, storage.Store).ReturnDeletedObject() - test.TestDelete(validNewPersistentVolumeClaim("foo", api.NamespaceDefault)) + test.TestDelete(validNewPersistentVolumeClaim("foo", metav1.NamespaceDefault)) } func TestGet(t *testing.T) { @@ -113,7 +113,7 @@ func TestGet(t *testing.T) { defer server.Terminate(t) defer storage.Store.DestroyFunc() test := registrytest.New(t, storage.Store) - test.TestGet(validNewPersistentVolumeClaim("foo", api.NamespaceDefault)) + test.TestGet(validNewPersistentVolumeClaim("foo", metav1.NamespaceDefault)) } func TestList(t *testing.T) { @@ -121,7 +121,7 @@ func TestList(t *testing.T) { defer server.Terminate(t) defer storage.Store.DestroyFunc() test := registrytest.New(t, storage.Store) - test.TestList(validNewPersistentVolumeClaim("foo", api.NamespaceDefault)) + test.TestList(validNewPersistentVolumeClaim("foo", metav1.NamespaceDefault)) } func TestWatch(t *testing.T) { @@ -130,7 +130,7 @@ func TestWatch(t *testing.T) { defer storage.Store.DestroyFunc() test := registrytest.New(t, storage.Store) test.TestWatch( - validNewPersistentVolumeClaim("foo", api.NamespaceDefault), + validNewPersistentVolumeClaim("foo", metav1.NamespaceDefault), // matching labels []labels.Set{}, // not matching labels @@ -156,13 +156,13 @@ func TestUpdateStatus(t *testing.T) { ctx := genericapirequest.NewDefaultContext() key, _ := storage.KeyFunc(ctx, "foo") - pvcStart := validNewPersistentVolumeClaim("foo", api.NamespaceDefault) + pvcStart := validNewPersistentVolumeClaim("foo", metav1.NamespaceDefault) err := storage.Storage.Create(ctx, key, pvcStart, nil, 0) pvc := &api.PersistentVolumeClaim{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, Spec: api.PersistentVolumeClaimSpec{ AccessModes: []api.PersistentVolumeAccessMode{api.ReadWriteOnce}, diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/persistentvolumeclaim/strategy.go b/vendor/k8s.io/kubernetes/pkg/registry/core/persistentvolumeclaim/strategy.go index bb039cc8..5eabcc9d 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/persistentvolumeclaim/strategy.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/persistentvolumeclaim/strategy.go @@ -19,15 +19,15 @@ package persistentvolumeclaim import ( "fmt" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/validation/field" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/storage/names" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/validation" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" "k8s.io/kubernetes/pkg/storage" ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/pod/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/core/pod/BUILD index 0ae9227c..473b655c 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/pod/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/pod/BUILD @@ -18,19 +18,19 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/api/validation:go_default_library", - "//pkg/fields:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", "//pkg/kubelet/client:go_default_library", "//pkg/kubelet/qos:go_default_library", - "//pkg/registry/generic:go_default_library", "//pkg/storage:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/net", "//vendor:k8s.io/apimachinery/pkg/util/validation/field", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", "//vendor:k8s.io/apiserver/pkg/storage/names", ], ) @@ -44,12 +44,12 @@ go_test( "//pkg/api:go_default_library", "//pkg/api/resource:go_default_library", "//pkg/api/testing:go_default_library", - "//pkg/fields:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/pod/rest/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/core/pod/rest/BUILD index 3c320881..b81f667d 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/pod/rest/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/pod/rest/BUILD @@ -19,14 +19,14 @@ go_library( "//pkg/api:go_default_library", "//pkg/api/validation:go_default_library", "//pkg/capabilities:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", + "//pkg/genericapiserver/registry/generic/registry:go_default_library", + "//pkg/genericapiserver/registry/generic/rest:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/kubelet/client:go_default_library", "//pkg/registry/core/pod:go_default_library", - "//pkg/registry/generic/registry:go_default_library", - "//pkg/registry/generic/rest:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/runtime", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) @@ -37,11 +37,11 @@ go_test( tags = ["automanaged"], deps = [ "//pkg/api:go_default_library", - "//pkg/registry/generic:go_default_library", - "//pkg/registry/generic/registry:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic/registry:go_default_library", "//pkg/registry/registrytest:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/pod/rest/log.go b/vendor/k8s.io/kubernetes/pkg/registry/core/pod/rest/log.go index 87911e09..ded62e4c 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/pod/rest/log.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/pod/rest/log.go @@ -21,14 +21,14 @@ import ( "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/validation" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + genericregistry "k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry" + genericrest "k8s.io/kubernetes/pkg/genericapiserver/registry/generic/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" "k8s.io/kubernetes/pkg/kubelet/client" "k8s.io/kubernetes/pkg/registry/core/pod" - genericregistry "k8s.io/kubernetes/pkg/registry/generic/registry" - genericrest "k8s.io/kubernetes/pkg/registry/generic/rest" ) // LogREST implements the log endpoint for a Pod diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/pod/rest/log_test.go b/vendor/k8s.io/kubernetes/pkg/registry/core/pod/rest/log_test.go index 7486e009..9e2a2d77 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/pod/rest/log_test.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/pod/rest/log_test.go @@ -20,10 +20,10 @@ import ( "testing" "k8s.io/apimachinery/pkg/api/errors" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/registry/generic" - genericregistry "k8s.io/kubernetes/pkg/registry/generic/registry" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + genericregistry "k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry" "k8s.io/kubernetes/pkg/registry/registrytest" ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/pod/rest/subresources.go b/vendor/k8s.io/kubernetes/pkg/registry/core/pod/rest/subresources.go index 47b2cdbb..9534d995 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/pod/rest/subresources.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/pod/rest/subresources.go @@ -23,14 +23,14 @@ import ( "path" "k8s.io/apimachinery/pkg/runtime" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/capabilities" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + genericregistry "k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry" + genericrest "k8s.io/kubernetes/pkg/genericapiserver/registry/generic/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" "k8s.io/kubernetes/pkg/kubelet/client" "k8s.io/kubernetes/pkg/registry/core/pod" - genericregistry "k8s.io/kubernetes/pkg/registry/generic/registry" - genericrest "k8s.io/kubernetes/pkg/registry/generic/rest" ) // ProxyREST implements the proxy subresource for a Pod diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/pod/storage/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/core/pod/storage/BUILD index 65306dc2..ff605437 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/pod/storage/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/pod/storage/BUILD @@ -16,9 +16,8 @@ go_test( deps = [ "//pkg/api:go_default_library", "//pkg/api/errors/storage:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", - "//pkg/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/registry/registrytest:go_default_library", "//pkg/securitycontext:go_default_library", "//pkg/storage:go_default_library", @@ -26,10 +25,11 @@ go_test( "//vendor:golang.org/x/net/context", "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/diff", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) @@ -47,19 +47,19 @@ go_library( "//pkg/apis/policy:go_default_library", "//pkg/client/clientset_generated/internalclientset/typed/policy/internalversion:go_default_library", "//pkg/client/retry:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic/registry:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/kubelet/client:go_default_library", "//pkg/registry/core/pod:go_default_library", "//pkg/registry/core/pod/rest:go_default_library", - "//pkg/registry/generic:go_default_library", - "//pkg/registry/generic/registry:go_default_library", "//pkg/storage:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/wait", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/pod/storage/eviction.go b/vendor/k8s.io/kubernetes/pkg/registry/core/pod/storage/eviction.go index 60a63b9d..6205f874 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/pod/storage/eviction.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/pod/storage/eviction.go @@ -25,13 +25,13 @@ import ( "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/wait" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/policy" policyclient "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion" "k8s.io/kubernetes/pkg/client/retry" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" - genericregistry "k8s.io/kubernetes/pkg/registry/generic/registry" + genericregistry "k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" ) const ( @@ -181,7 +181,7 @@ func (r *EvictionREST) getPodDisruptionBudgets(ctx genericapirequest.Context, po return nil, nil } - pdbList, err := r.podDisruptionBudgetClient.PodDisruptionBudgets(pod.Namespace).List(api.ListOptions{}) + pdbList, err := r.podDisruptionBudgetClient.PodDisruptionBudgets(pod.Namespace).List(metav1.ListOptions{}) if err != nil { return nil, err } diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/pod/storage/storage.go b/vendor/k8s.io/kubernetes/pkg/registry/core/pod/storage/storage.go index 48d56ea0..2af4220f 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/pod/storage/storage.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/pod/storage/storage.go @@ -24,17 +24,17 @@ import ( "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" storeerr "k8s.io/kubernetes/pkg/api/errors/storage" "k8s.io/kubernetes/pkg/api/validation" policyclient "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + genericregistry "k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" "k8s.io/kubernetes/pkg/kubelet/client" "k8s.io/kubernetes/pkg/registry/core/pod" podrest "k8s.io/kubernetes/pkg/registry/core/pod/rest" - "k8s.io/kubernetes/pkg/registry/generic" - genericregistry "k8s.io/kubernetes/pkg/registry/generic/registry" "k8s.io/kubernetes/pkg/storage" ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/pod/storage/storage_test.go b/vendor/k8s.io/kubernetes/pkg/registry/core/pod/storage/storage_test.go index 0700a0bf..a30fbb83 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/pod/storage/storage_test.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/pod/storage/storage_test.go @@ -23,15 +23,15 @@ import ( "golang.org/x/net/context" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/diff" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" storeerr "k8s.io/kubernetes/pkg/api/errors/storage" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" - "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" "k8s.io/kubernetes/pkg/registry/registrytest" "k8s.io/kubernetes/pkg/securitycontext" "k8s.io/kubernetes/pkg/storage" @@ -53,9 +53,9 @@ func newStorage(t *testing.T) (*REST, *BindingREST, *StatusREST, *etcdtesting.Et func validNewPod() *api.Pod { grace := int64(30) return &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, Spec: api.PodSpec{ RestartPolicy: api.RestartPolicyAlways, @@ -68,11 +68,13 @@ func validNewPod() *api.Pod { Image: "test", ImagePullPolicy: api.PullAlways, - TerminationMessagePath: api.TerminationMessagePathDefault, - SecurityContext: securitycontext.ValidInternalSecurityContextWithContainerDefaults(), + TerminationMessagePath: api.TerminationMessagePathDefault, + TerminationMessagePolicy: api.TerminationMessageReadFile, + SecurityContext: securitycontext.ValidInternalSecurityContextWithContainerDefaults(), }, }, SecurityContext: &api.PodSecurityContext{}, + SchedulerName: api.DefaultSchedulerName, }, } } @@ -91,7 +93,7 @@ func TestCreate(t *testing.T) { defer storage.Store.DestroyFunc() test := registrytest.New(t, storage.Store) pod := validNewPod() - pod.ObjectMeta = api.ObjectMeta{} + pod.ObjectMeta = metav1.ObjectMeta{} // Make an invalid pod with an an incorrect label. invalidPod := validNewPod() invalidPod.Namespace = test.TestNamespace() @@ -166,7 +168,7 @@ func newFailDeleteStorage(t *testing.T, called *bool) (*REST, *etcdtesting.EtcdT func TestIgnoreDeleteNotFound(t *testing.T) { pod := validNewPod() - testContext := genericapirequest.WithNamespace(genericapirequest.NewContext(), api.NamespaceDefault) + testContext := genericapirequest.WithNamespace(genericapirequest.NewContext(), metav1.NamespaceDefault) called := false registry, server := newFailDeleteStorage(t, &called) defer server.Terminate(t) @@ -187,7 +189,7 @@ func TestIgnoreDeleteNotFound(t *testing.T) { // delete object with grace period 0, storage will return NotFound, but the // registry shouldn't get any error since we ignore the NotFound error. zero := int64(0) - opt := &api.DeleteOptions{GracePeriodSeconds: &zero} + opt := &metav1.DeleteOptions{GracePeriodSeconds: &zero} obj, err := registry.Delete(testContext, pod.Name, opt) if err != nil { t.Fatalf("Unexpected error: %v", err) @@ -243,7 +245,7 @@ func TestResourceLocation(t *testing.T) { }{ { pod: api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Status: api.PodStatus{PodIP: expectedIP}, }, query: "foo", @@ -251,7 +253,7 @@ func TestResourceLocation(t *testing.T) { }, { pod: api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Status: api.PodStatus{PodIP: expectedIP}, }, query: "foo:12345", @@ -259,7 +261,7 @@ func TestResourceLocation(t *testing.T) { }, { pod: api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.PodSpec{ Containers: []api.Container{ {Name: "ctr"}, @@ -272,7 +274,7 @@ func TestResourceLocation(t *testing.T) { }, { pod: api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.PodSpec{ Containers: []api.Container{ {Name: "ctr", Ports: []api.ContainerPort{{ContainerPort: 9376}}}, @@ -285,7 +287,7 @@ func TestResourceLocation(t *testing.T) { }, { pod: api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.PodSpec{ Containers: []api.Container{ {Name: "ctr", Ports: []api.ContainerPort{{ContainerPort: 9376}}}, @@ -298,7 +300,7 @@ func TestResourceLocation(t *testing.T) { }, { pod: api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.PodSpec{ Containers: []api.Container{ {Name: "ctr1"}, @@ -312,7 +314,7 @@ func TestResourceLocation(t *testing.T) { }, { pod: api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.PodSpec{ Containers: []api.Container{ {Name: "ctr1", Ports: []api.ContainerPort{{ContainerPort: 9376}}}, @@ -405,7 +407,7 @@ func TestEtcdCreate(t *testing.T) { // Suddenly, a wild scheduler appears: _, err = bindingStorage.Create(ctx, &api.Binding{ - ObjectMeta: api.ObjectMeta{Namespace: api.NamespaceDefault, Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Namespace: metav1.NamespaceDefault, Name: "foo"}, Target: api.ObjectReference{Name: "machine"}, }) if err != nil { @@ -431,7 +433,7 @@ func TestEtcdCreateBindingNoPod(t *testing.T) { // - Schedule (scheduler) // - Delete (apiserver) _, err := bindingStorage.Create(ctx, &api.Binding{ - ObjectMeta: api.ObjectMeta{Namespace: api.NamespaceDefault, Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Namespace: metav1.NamespaceDefault, Name: "foo"}, Target: api.ObjectReference{Name: "machine"}, }) if err == nil { @@ -475,8 +477,8 @@ func TestEtcdCreateWithContainersNotFound(t *testing.T) { // Suddenly, a wild scheduler appears: _, err = bindingStorage.Create(ctx, &api.Binding{ - ObjectMeta: api.ObjectMeta{ - Namespace: api.NamespaceDefault, + ObjectMeta: metav1.ObjectMeta{ + Namespace: metav1.NamespaceDefault, Name: "foo", Annotations: map[string]string{"label1": "value1"}, }, @@ -510,8 +512,8 @@ func TestEtcdCreateWithConflict(t *testing.T) { // Suddenly, a wild scheduler appears: binding := api.Binding{ - ObjectMeta: api.ObjectMeta{ - Namespace: api.NamespaceDefault, + ObjectMeta: metav1.ObjectMeta{ + Namespace: metav1.NamespaceDefault, Name: "foo", Annotations: map[string]string{"label1": "value1"}, }, @@ -540,7 +542,7 @@ func TestEtcdCreateWithExistingContainers(t *testing.T) { // Suddenly, a wild scheduler appears: _, err = bindingStorage.Create(ctx, &api.Binding{ - ObjectMeta: api.ObjectMeta{Namespace: api.NamespaceDefault, Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Namespace: metav1.NamespaceDefault, Name: "foo"}, Target: api.ObjectReference{Name: "machine"}, }) if err != nil { @@ -562,28 +564,28 @@ func TestEtcdCreateBinding(t *testing.T) { }{ "noName": { binding: api.Binding{ - ObjectMeta: api.ObjectMeta{Namespace: api.NamespaceDefault, Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Namespace: metav1.NamespaceDefault, Name: "foo"}, Target: api.ObjectReference{}, }, errOK: func(err error) bool { return err != nil }, }, "badKind": { binding: api.Binding{ - ObjectMeta: api.ObjectMeta{Namespace: api.NamespaceDefault, Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Namespace: metav1.NamespaceDefault, Name: "foo"}, Target: api.ObjectReference{Name: "machine1", Kind: "unknown"}, }, errOK: func(err error) bool { return err != nil }, }, "emptyKind": { binding: api.Binding{ - ObjectMeta: api.ObjectMeta{Namespace: api.NamespaceDefault, Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Namespace: metav1.NamespaceDefault, Name: "foo"}, Target: api.ObjectReference{Name: "machine2"}, }, errOK: func(err error) bool { return err == nil }, }, "kindNode": { binding: api.Binding{ - ObjectMeta: api.ObjectMeta{Namespace: api.NamespaceDefault, Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Namespace: metav1.NamespaceDefault, Name: "foo"}, Target: api.ObjectReference{Name: "machine3", Kind: "Node"}, }, errOK: func(err error) bool { return err == nil }, @@ -645,9 +647,9 @@ func TestEtcdUpdateScheduled(t *testing.T) { key, _ := storage.KeyFunc(ctx, "foo") err := storage.Storage.Create(ctx, key, &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, Spec: api.PodSpec{ NodeName: "machine", @@ -659,6 +661,7 @@ func TestEtcdUpdateScheduled(t *testing.T) { }, }, SecurityContext: &api.PodSecurityContext{}, + SchedulerName: api.DefaultSchedulerName, }, }, nil, 1) if err != nil { @@ -667,7 +670,7 @@ func TestEtcdUpdateScheduled(t *testing.T) { grace := int64(30) podIn := api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{ "foo": "bar", @@ -676,17 +679,19 @@ func TestEtcdUpdateScheduled(t *testing.T) { Spec: api.PodSpec{ NodeName: "machine", Containers: []api.Container{{ - Name: "foobar", - Image: "foo:v2", - ImagePullPolicy: api.PullIfNotPresent, - TerminationMessagePath: api.TerminationMessagePathDefault, - SecurityContext: securitycontext.ValidInternalSecurityContextWithContainerDefaults(), + Name: "foobar", + Image: "foo:v2", + ImagePullPolicy: api.PullIfNotPresent, + TerminationMessagePath: api.TerminationMessagePathDefault, + TerminationMessagePolicy: api.TerminationMessageReadFile, + SecurityContext: securitycontext.ValidInternalSecurityContextWithContainerDefaults(), }}, RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, TerminationGracePeriodSeconds: &grace, SecurityContext: &api.PodSecurityContext{}, + SchedulerName: api.DefaultSchedulerName, }, } _, _, err = storage.Update(ctx, podIn.Name, rest.DefaultUpdatedObjectInfo(&podIn, api.Scheme)) @@ -714,9 +719,9 @@ func TestEtcdUpdateStatus(t *testing.T) { key, _ := storage.KeyFunc(ctx, "foo") podStart := api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, Spec: api.PodSpec{ NodeName: "machine", @@ -727,6 +732,7 @@ func TestEtcdUpdateStatus(t *testing.T) { }, }, SecurityContext: &api.PodSecurityContext{}, + SchedulerName: api.DefaultSchedulerName, }, } err := storage.Storage.Create(ctx, key, &podStart, nil, 0) @@ -735,7 +741,7 @@ func TestEtcdUpdateStatus(t *testing.T) { } podIn := api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Labels: map[string]string{ "foo": "bar", @@ -751,6 +757,7 @@ func TestEtcdUpdateStatus(t *testing.T) { }, }, SecurityContext: &api.PodSecurityContext{}, + SchedulerName: api.DefaultSchedulerName, }, Status: api.PodStatus{ Phase: api.PodRunning, @@ -767,6 +774,7 @@ func TestEtcdUpdateStatus(t *testing.T) { expected.Spec.DNSPolicy = api.DNSClusterFirst expected.Spec.Containers[0].ImagePullPolicy = api.PullIfNotPresent expected.Spec.Containers[0].TerminationMessagePath = api.TerminationMessagePathDefault + expected.Spec.Containers[0].TerminationMessagePolicy = api.TerminationMessageReadFile expected.Labels = podIn.Labels expected.Status = podIn.Status diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/pod/strategy.go b/vendor/k8s.io/kubernetes/pkg/registry/core/pod/strategy.go index 9b388437..245055dc 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/pod/strategy.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/pod/strategy.go @@ -27,19 +27,19 @@ import ( "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" utilnet "k8s.io/apimachinery/pkg/util/net" "k8s.io/apimachinery/pkg/util/validation/field" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/storage/names" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/validation" - "k8s.io/kubernetes/pkg/fields" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" "k8s.io/kubernetes/pkg/kubelet/client" "k8s.io/kubernetes/pkg/kubelet/qos" - "k8s.io/kubernetes/pkg/registry/generic" "k8s.io/kubernetes/pkg/storage" ) @@ -102,7 +102,7 @@ func (podStrategy) AllowUnconditionalUpdate() bool { // CheckGracefulDelete allows a pod to be gracefully deleted. It updates the DeleteOptions to // reflect the desired grace value. -func (podStrategy) CheckGracefulDelete(ctx genericapirequest.Context, obj runtime.Object, options *api.DeleteOptions) bool { +func (podStrategy) CheckGracefulDelete(ctx genericapirequest.Context, obj runtime.Object, options *metav1.DeleteOptions) bool { if options == nil { return false } @@ -135,7 +135,7 @@ type podStrategyWithoutGraceful struct { } // CheckGracefulDelete prohibits graceful deletion. -func (podStrategyWithoutGraceful) CheckGracefulDelete(ctx genericapirequest.Context, obj runtime.Object, options *api.DeleteOptions) bool { +func (podStrategyWithoutGraceful) CheckGracefulDelete(ctx genericapirequest.Context, obj runtime.Object, options *metav1.DeleteOptions) bool { return false } diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/pod/strategy_test.go b/vendor/k8s.io/kubernetes/pkg/registry/core/pod/strategy_test.go index 773cc5a6..9d6e4b82 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/pod/strategy_test.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/pod/strategy_test.go @@ -22,13 +22,13 @@ import ( "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/resource" apitesting "k8s.io/kubernetes/pkg/api/testing" - "k8s.io/kubernetes/pkg/fields" ) func TestMatchPod(t *testing.T) { @@ -124,7 +124,7 @@ func newContainer(name string, requests api.ResourceList, limits api.ResourceLis func newPod(name string, containers []api.Container) *api.Pod { return &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Spec: api.PodSpec{ @@ -210,7 +210,7 @@ func TestCheckGracefulDelete(t *testing.T) { }, } for _, tc := range tcs { - out := &api.DeleteOptions{GracePeriodSeconds: &defaultGracePeriod} + out := &metav1.DeleteOptions{GracePeriodSeconds: &defaultGracePeriod} Strategy.CheckGracefulDelete(genericapirequest.NewContext(), tc.in, out) if out.GracePeriodSeconds == nil { t.Errorf("out grace period was nil but supposed to be %v", tc.gracePeriod) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/podtemplate/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/core/podtemplate/BUILD index 5610976f..7fcd3e78 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/podtemplate/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/podtemplate/BUILD @@ -18,12 +18,12 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/api/validation:go_default_library", - "//pkg/fields:go_default_library", "//pkg/storage:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/validation/field", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", "//vendor:k8s.io/apiserver/pkg/storage/names", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/podtemplate/storage/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/core/podtemplate/storage/BUILD index 41834551..82d3b731 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/podtemplate/storage/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/podtemplate/storage/BUILD @@ -15,10 +15,11 @@ go_test( tags = ["automanaged"], deps = [ "//pkg/api:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", "//pkg/registry/registrytest:go_default_library", "//pkg/storage/etcd/testing:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", ], @@ -30,9 +31,9 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/api:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic/registry:go_default_library", "//pkg/registry/core/podtemplate:go_default_library", - "//pkg/registry/generic:go_default_library", - "//pkg/registry/generic/registry:go_default_library", "//vendor:k8s.io/apimachinery/pkg/runtime", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/podtemplate/storage/storage.go b/vendor/k8s.io/kubernetes/pkg/registry/core/podtemplate/storage/storage.go index 3c75f734..bb548e12 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/podtemplate/storage/storage.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/podtemplate/storage/storage.go @@ -19,9 +19,9 @@ package storage import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + genericregistry "k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry" "k8s.io/kubernetes/pkg/registry/core/podtemplate" - "k8s.io/kubernetes/pkg/registry/generic" - genericregistry "k8s.io/kubernetes/pkg/registry/generic/registry" ) type REST struct { diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/podtemplate/storage/storage_test.go b/vendor/k8s.io/kubernetes/pkg/registry/core/podtemplate/storage/storage_test.go index c1b8ba4f..662f0b11 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/podtemplate/storage/storage_test.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/podtemplate/storage/storage_test.go @@ -19,11 +19,12 @@ package storage import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" "k8s.io/kubernetes/pkg/registry/registrytest" etcdtesting "k8s.io/kubernetes/pkg/storage/etcd/testing" ) @@ -41,12 +42,12 @@ func newStorage(t *testing.T) (*REST, *etcdtesting.EtcdTestServer) { func validNewPodTemplate(name string) *api.PodTemplate { return &api.PodTemplate{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"test": "foo"}, }, Spec: api.PodSpec{ @@ -58,7 +59,8 @@ func validNewPodTemplate(name string) *api.PodTemplate { Image: "test", ImagePullPolicy: api.PullAlways, - TerminationMessagePath: api.TerminationMessagePathDefault, + TerminationMessagePath: api.TerminationMessagePathDefault, + TerminationMessagePolicy: api.TerminationMessageReadFile, }, }, }, @@ -72,7 +74,7 @@ func TestCreate(t *testing.T) { defer storage.Store.DestroyFunc() test := registrytest.New(t, storage.Store) pod := validNewPodTemplate("foo") - pod.ObjectMeta = api.ObjectMeta{} + pod.ObjectMeta = metav1.ObjectMeta{} test.TestCreate( // valid pod, diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/podtemplate/strategy.go b/vendor/k8s.io/kubernetes/pkg/registry/core/podtemplate/strategy.go index 8c6f403e..92e40985 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/podtemplate/strategy.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/podtemplate/strategy.go @@ -19,14 +19,14 @@ package podtemplate import ( "fmt" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/validation/field" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/storage/names" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/validation" - "k8s.io/kubernetes/pkg/fields" "k8s.io/kubernetes/pkg/storage" ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/resourcequota/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/core/resourcequota/BUILD index 6bc239ae..d1e8ef15 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/resourcequota/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/resourcequota/BUILD @@ -18,13 +18,13 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/api/validation:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", "//pkg/storage:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/validation/field", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", "//vendor:k8s.io/apiserver/pkg/storage/names", ], ) @@ -38,7 +38,8 @@ go_test( "//pkg/api:go_default_library", "//pkg/api/resource:go_default_library", "//pkg/api/testing:go_default_library", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/resourcequota/storage/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/core/resourcequota/storage/BUILD index 8d210a73..0f5e1fa4 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/resourcequota/storage/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/resourcequota/storage/BUILD @@ -16,15 +16,15 @@ go_test( deps = [ "//pkg/api:go_default_library", "//pkg/api/resource:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", - "//pkg/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/registry/registrytest:go_default_library", "//pkg/storage/etcd/testing:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/util/diff", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) @@ -34,13 +34,13 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/api:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic/registry:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/registry/core/resourcequota:go_default_library", - "//pkg/registry/generic:go_default_library", - "//pkg/registry/generic/registry:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/resourcequota/storage/storage.go b/vendor/k8s.io/kubernetes/pkg/registry/core/resourcequota/storage/storage.go index 1a9baf27..c0f37c2d 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/resourcequota/storage/storage.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/resourcequota/storage/storage.go @@ -19,12 +19,12 @@ package storage import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + genericregistry "k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" "k8s.io/kubernetes/pkg/registry/core/resourcequota" - "k8s.io/kubernetes/pkg/registry/generic" - genericregistry "k8s.io/kubernetes/pkg/registry/generic/registry" ) type REST struct { diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/resourcequota/storage/storage_test.go b/vendor/k8s.io/kubernetes/pkg/registry/core/resourcequota/storage/storage_test.go index b444685d..9a2cb6af 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/resourcequota/storage/storage_test.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/resourcequota/storage/storage_test.go @@ -20,14 +20,14 @@ import ( "testing" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/util/diff" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/resource" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" - "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" "k8s.io/kubernetes/pkg/registry/registrytest" etcdtesting "k8s.io/kubernetes/pkg/storage/etcd/testing" ) @@ -46,9 +46,9 @@ func newStorage(t *testing.T) (*REST, *StatusREST, *etcdtesting.EtcdTestServer) func validNewResourceQuota() *api.ResourceQuota { return &api.ResourceQuota{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, Spec: api.ResourceQuotaSpec{ Hard: api.ResourceList{ @@ -69,13 +69,13 @@ func TestCreate(t *testing.T) { defer storage.Store.DestroyFunc() test := registrytest.New(t, storage.Store) resourcequota := validNewResourceQuota() - resourcequota.ObjectMeta = api.ObjectMeta{} + resourcequota.ObjectMeta = metav1.ObjectMeta{} test.TestCreate( // valid resourcequota, // invalid &api.ResourceQuota{ - ObjectMeta: api.ObjectMeta{Name: "_-a123-a_"}, + ObjectMeta: metav1.ObjectMeta{Name: "_-a123-a_"}, }, ) } @@ -166,9 +166,9 @@ func TestUpdateStatus(t *testing.T) { } resourcequotaIn := &api.ResourceQuota{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, Status: api.ResourceQuotaStatus{ Used: api.ResourceList{ diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/resourcequota/strategy.go b/vendor/k8s.io/kubernetes/pkg/registry/core/resourcequota/strategy.go index 5611d618..343f94ac 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/resourcequota/strategy.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/resourcequota/strategy.go @@ -19,15 +19,15 @@ package resourcequota import ( "fmt" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/validation/field" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/storage/names" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/validation" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" "k8s.io/kubernetes/pkg/storage" ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/resourcequota/strategy_test.go b/vendor/k8s.io/kubernetes/pkg/registry/core/resourcequota/strategy_test.go index c7fc10cd..66512aff 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/resourcequota/strategy_test.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/resourcequota/strategy_test.go @@ -19,7 +19,8 @@ package resourcequota import ( "testing" - genericapirequest "k8s.io/apiserver/pkg/request" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/resource" apitesting "k8s.io/kubernetes/pkg/api/testing" @@ -33,7 +34,7 @@ func TestResourceQuotaStrategy(t *testing.T) { t.Errorf("ResourceQuota should not allow create on update") } resourceQuota := &api.ResourceQuota{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Status: api.ResourceQuotaStatus{ Used: api.ResourceList{ api.ResourceCPU: resource.MustParse("1"), diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/rest/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/core/rest/BUILD index 58d53aeb..3e55d0bf 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/rest/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/rest/BUILD @@ -26,9 +26,9 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/client/clientset_generated/internalclientset/typed/policy/internalversion:go_default_library", - "//pkg/client/restclient:go_default_library", - "//pkg/genericapiserver:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", + "//pkg/genericapiserver/server:go_default_library", "//pkg/kubelet/client:go_default_library", "//pkg/master/ports:go_default_library", "//pkg/registry/core/componentstatus:go_default_library", @@ -54,11 +54,11 @@ go_library( "//pkg/registry/core/service/portallocator:go_default_library", "//pkg/registry/core/service/storage:go_default_library", "//pkg/registry/core/serviceaccount/storage:go_default_library", - "//pkg/registry/generic:go_default_library", "//pkg/storage/etcd/util:go_default_library", "//vendor:github.com/golang/glog", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/util/net", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/rest/storage_core.go b/vendor/k8s.io/kubernetes/pkg/registry/core/rest/storage_core.go index d2f856dd..828e7a4b 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/rest/storage_core.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/rest/storage_core.go @@ -29,11 +29,12 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" utilnet "k8s.io/apimachinery/pkg/util/net" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" policyclient "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/policy/internalversion" - "k8s.io/kubernetes/pkg/client/restclient" - "k8s.io/kubernetes/pkg/genericapiserver" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" + genericapiserver "k8s.io/kubernetes/pkg/genericapiserver/server" kubeletclient "k8s.io/kubernetes/pkg/kubelet/client" "k8s.io/kubernetes/pkg/master/ports" "k8s.io/kubernetes/pkg/registry/core/componentstatus" @@ -59,7 +60,6 @@ import ( "k8s.io/kubernetes/pkg/registry/core/service/portallocator" servicestore "k8s.io/kubernetes/pkg/registry/core/service/storage" serviceaccountstore "k8s.io/kubernetes/pkg/registry/core/serviceaccount/storage" - "k8s.io/kubernetes/pkg/registry/generic" etcdutil "k8s.io/kubernetes/pkg/storage/etcd/util" ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/secret/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/core/secret/BUILD index 8c1bbb9e..f5e983ef 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/secret/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/secret/BUILD @@ -19,17 +19,18 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/api/validation:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", - "//pkg/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/storage:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/internalversion", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/validation/field", "//vendor:k8s.io/apimachinery/pkg/watch", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", "//vendor:k8s.io/apiserver/pkg/storage/names", ], ) @@ -42,8 +43,9 @@ go_test( deps = [ "//pkg/api:go_default_library", "//pkg/api/testing:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/secret/registry.go b/vendor/k8s.io/kubernetes/pkg/registry/core/secret/registry.go index 770eafe5..12aec0ed 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/secret/registry.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/secret/registry.go @@ -17,17 +17,18 @@ limitations under the License. package secret import ( + metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/watch" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" ) // Registry is an interface implemented by things that know how to store Secret objects. type Registry interface { - ListSecrets(ctx genericapirequest.Context, options *api.ListOptions) (*api.SecretList, error) - WatchSecrets(ctx genericapirequest.Context, options *api.ListOptions) (watch.Interface, error) + ListSecrets(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (*api.SecretList, error) + WatchSecrets(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (watch.Interface, error) GetSecret(ctx genericapirequest.Context, name string, options *metav1.GetOptions) (*api.Secret, error) CreateSecret(ctx genericapirequest.Context, Secret *api.Secret) (*api.Secret, error) UpdateSecret(ctx genericapirequest.Context, Secret *api.Secret) (*api.Secret, error) @@ -45,7 +46,7 @@ func NewRegistry(s rest.StandardStorage) Registry { return &storage{s} } -func (s *storage) ListSecrets(ctx genericapirequest.Context, options *api.ListOptions) (*api.SecretList, error) { +func (s *storage) ListSecrets(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (*api.SecretList, error) { obj, err := s.List(ctx, options) if err != nil { return nil, err @@ -53,7 +54,7 @@ func (s *storage) ListSecrets(ctx genericapirequest.Context, options *api.ListOp return obj.(*api.SecretList), nil } -func (s *storage) WatchSecrets(ctx genericapirequest.Context, options *api.ListOptions) (watch.Interface, error) { +func (s *storage) WatchSecrets(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (watch.Interface, error) { return s.Watch(ctx, options) } diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/secret/storage/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/core/secret/storage/BUILD index b0c184a4..cbd3c515 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/secret/storage/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/secret/storage/BUILD @@ -15,10 +15,11 @@ go_test( tags = ["automanaged"], deps = [ "//pkg/api:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", "//pkg/registry/registrytest:go_default_library", "//pkg/storage/etcd/testing:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", ], @@ -30,9 +31,9 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/api:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic/registry:go_default_library", "//pkg/registry/core/secret:go_default_library", - "//pkg/registry/generic:go_default_library", - "//pkg/registry/generic/registry:go_default_library", "//vendor:k8s.io/apimachinery/pkg/runtime", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/secret/storage/storage.go b/vendor/k8s.io/kubernetes/pkg/registry/core/secret/storage/storage.go index 02ece0a7..1f4c7a5b 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/secret/storage/storage.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/secret/storage/storage.go @@ -19,9 +19,9 @@ package storage import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + genericregistry "k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry" "k8s.io/kubernetes/pkg/registry/core/secret" - "k8s.io/kubernetes/pkg/registry/generic" - genericregistry "k8s.io/kubernetes/pkg/registry/generic/registry" ) type REST struct { diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/secret/storage/storage_test.go b/vendor/k8s.io/kubernetes/pkg/registry/core/secret/storage/storage_test.go index 811d9822..ea026771 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/secret/storage/storage_test.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/secret/storage/storage_test.go @@ -19,11 +19,12 @@ package storage import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" "k8s.io/kubernetes/pkg/registry/registrytest" etcdtesting "k8s.io/kubernetes/pkg/storage/etcd/testing" ) @@ -41,9 +42,9 @@ func newStorage(t *testing.T) (*REST, *etcdtesting.EtcdTestServer) { func validNewSecret(name string) *api.Secret { return &api.Secret{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, Data: map[string][]byte{ "test": []byte("data"), @@ -57,18 +58,18 @@ func TestCreate(t *testing.T) { defer storage.Store.DestroyFunc() test := registrytest.New(t, storage.Store) secret := validNewSecret("foo") - secret.ObjectMeta = api.ObjectMeta{GenerateName: "foo-"} + secret.ObjectMeta = metav1.ObjectMeta{GenerateName: "foo-"} test.TestCreate( // valid secret, // invalid &api.Secret{}, &api.Secret{ - ObjectMeta: api.ObjectMeta{Name: "name"}, + ObjectMeta: metav1.ObjectMeta{Name: "name"}, Data: map[string][]byte{"name with spaces": []byte("")}, }, &api.Secret{ - ObjectMeta: api.ObjectMeta{Name: "name"}, + ObjectMeta: metav1.ObjectMeta{Name: "name"}, Data: map[string][]byte{"~.dotfile": []byte("")}, }, ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/secret/strategy.go b/vendor/k8s.io/kubernetes/pkg/registry/core/secret/strategy.go index 8a1136e5..bdc05ad6 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/secret/strategy.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/secret/strategy.go @@ -20,16 +20,16 @@ import ( "fmt" "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/validation/field" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/storage/names" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/validation" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" - "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" apistorage "k8s.io/kubernetes/pkg/storage" ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/secret/strategy_test.go b/vendor/k8s.io/kubernetes/pkg/registry/core/secret/strategy_test.go index 274b2aad..f021be5d 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/secret/strategy_test.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/secret/strategy_test.go @@ -20,8 +20,9 @@ import ( "reflect" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" apitesting "k8s.io/kubernetes/pkg/api/testing" ) @@ -35,7 +36,7 @@ func TestExportSecret(t *testing.T) { }{ { objIn: &api.Secret{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "bar", }, @@ -44,7 +45,7 @@ func TestExportSecret(t *testing.T) { }, }, objOut: &api.Secret{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "bar", }, @@ -56,7 +57,7 @@ func TestExportSecret(t *testing.T) { }, { objIn: &api.Secret{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "bar", }, @@ -66,7 +67,7 @@ func TestExportSecret(t *testing.T) { }, { objIn: &api.Secret{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "bar", Annotations: map[string]string{ diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/service/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/core/service/BUILD index f71d1726..6d0621b1 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/service/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/service/BUILD @@ -23,25 +23,26 @@ go_library( "//pkg/api/service:go_default_library", "//pkg/api/validation:go_default_library", "//pkg/capabilities:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic/rest:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/registry/core/endpoint:go_default_library", "//pkg/registry/core/service/ipallocator:go_default_library", "//pkg/registry/core/service/portallocator:go_default_library", - "//pkg/registry/generic:go_default_library", - "//pkg/registry/generic/rest:go_default_library", "//pkg/storage:go_default_library", "//pkg/util/config:go_default_library", "//vendor:github.com/golang/glog", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/internalversion", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/net", "//vendor:k8s.io/apimachinery/pkg/util/runtime", "//vendor:k8s.io/apimachinery/pkg/util/validation/field", "//vendor:k8s.io/apimachinery/pkg/watch", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", "//vendor:k8s.io/apiserver/pkg/storage/names", ], ) @@ -58,7 +59,7 @@ go_test( "//pkg/api:go_default_library", "//pkg/api/service:go_default_library", "//pkg/api/testing:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/registry/core/service/ipallocator:go_default_library", "//pkg/registry/core/service/portallocator:go_default_library", "//pkg/registry/registrytest:go_default_library", @@ -68,7 +69,7 @@ go_test( "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/net", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/service/allocator/storage/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/core/service/allocator/storage/BUILD index 4620b685..4362a93e 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/service/allocator/storage/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/service/allocator/storage/BUILD @@ -30,9 +30,9 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/api/errors/storage:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", "//pkg/registry/core/rangeallocation:go_default_library", "//pkg/registry/core/service/allocator:go_default_library", - "//pkg/registry/generic:go_default_library", "//pkg/storage:go_default_library", "//pkg/storage/storagebackend:go_default_library", "//vendor:golang.org/x/net/context", diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/service/allocator/storage/storage.go b/vendor/k8s.io/kubernetes/pkg/registry/core/service/allocator/storage/storage.go index 64be54e9..eb488c07 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/service/allocator/storage/storage.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/service/allocator/storage/storage.go @@ -26,9 +26,9 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/kubernetes/pkg/api" storeerr "k8s.io/kubernetes/pkg/api/errors/storage" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" "k8s.io/kubernetes/pkg/registry/core/rangeallocation" "k8s.io/kubernetes/pkg/registry/core/service/allocator" - "k8s.io/kubernetes/pkg/registry/generic" "k8s.io/kubernetes/pkg/storage" "k8s.io/kubernetes/pkg/storage/storagebackend" diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/service/ipallocator/controller/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/core/service/ipallocator/controller/BUILD index a377daf8..9cc7e4dc 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/service/ipallocator/controller/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/service/ipallocator/controller/BUILD @@ -19,6 +19,7 @@ go_library( "//pkg/registry/core/rangeallocation:go_default_library", "//pkg/registry/core/service/ipallocator:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/util/runtime", "//vendor:k8s.io/apimachinery/pkg/util/wait", ], @@ -33,6 +34,7 @@ go_test( "//pkg/api:go_default_library", "//pkg/client/clientset_generated/internalclientset/fake:go_default_library", "//pkg/registry/core/service/ipallocator:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/service/ipallocator/controller/repair.go b/vendor/k8s.io/kubernetes/pkg/registry/core/service/ipallocator/controller/repair.go index efd748df..d5c9e825 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/service/ipallocator/controller/repair.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/service/ipallocator/controller/repair.go @@ -22,6 +22,7 @@ import ( "time" "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/kubernetes/pkg/api" @@ -119,7 +120,7 @@ func (c *Repair) runOnce() error { // the service collection. The caching layer keeps per-collection RVs, // and this is proper, since in theory the collections could be hosted // in separate etcd (or even non-etcd) instances. - list, err := c.serviceClient.Services(api.NamespaceAll).List(api.ListOptions{}) + list, err := c.serviceClient.Services(metav1.NamespaceAll).List(metav1.ListOptions{}) if err != nil { return fmt.Errorf("unable to refresh the service IP block: %v", err) } diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/service/ipallocator/controller/repair_test.go b/vendor/k8s.io/kubernetes/pkg/registry/core/service/ipallocator/controller/repair_test.go index 7aa3670d..c784f04c 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/service/ipallocator/controller/repair_test.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/service/ipallocator/controller/repair_test.go @@ -22,6 +22,7 @@ import ( "strings" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/fake" "k8s.io/kubernetes/pkg/registry/core/service/ipallocator" @@ -87,7 +88,7 @@ func TestRepairLeak(t *testing.T) { fakeClient := fake.NewSimpleClientset() ipregistry := &mockRangeRegistry{ item: &api.RangeAllocation{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ ResourceVersion: "1", }, Range: dst.Range, @@ -134,34 +135,34 @@ func TestRepairWithExisting(t *testing.T) { fakeClient := fake.NewSimpleClientset( &api.Service{ - ObjectMeta: api.ObjectMeta{Namespace: "one", Name: "one"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "one", Name: "one"}, Spec: api.ServiceSpec{ClusterIP: "192.168.1.1"}, }, &api.Service{ - ObjectMeta: api.ObjectMeta{Namespace: "two", Name: "two"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "two", Name: "two"}, Spec: api.ServiceSpec{ClusterIP: "192.168.1.100"}, }, &api.Service{ // outside CIDR, will be dropped - ObjectMeta: api.ObjectMeta{Namespace: "three", Name: "three"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "three", Name: "three"}, Spec: api.ServiceSpec{ClusterIP: "192.168.0.1"}, }, &api.Service{ // empty, ignored - ObjectMeta: api.ObjectMeta{Namespace: "four", Name: "four"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "four", Name: "four"}, Spec: api.ServiceSpec{ClusterIP: ""}, }, &api.Service{ // duplicate, dropped - ObjectMeta: api.ObjectMeta{Namespace: "five", Name: "five"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "five", Name: "five"}, Spec: api.ServiceSpec{ClusterIP: "192.168.1.1"}, }, &api.Service{ // headless - ObjectMeta: api.ObjectMeta{Namespace: "six", Name: "six"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "six", Name: "six"}, Spec: api.ServiceSpec{ClusterIP: "None"}, }, ) ipregistry := &mockRangeRegistry{ item: &api.RangeAllocation{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ ResourceVersion: "1", }, Range: dst.Range, diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/service/ipallocator/storage/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/core/service/ipallocator/storage/BUILD index 3eebe885..5f7d7f36 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/service/ipallocator/storage/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/service/ipallocator/storage/BUILD @@ -15,10 +15,10 @@ go_test( tags = ["automanaged"], deps = [ "//pkg/api:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", "//pkg/registry/core/service/allocator:go_default_library", "//pkg/registry/core/service/allocator/storage:go_default_library", "//pkg/registry/core/service/ipallocator:go_default_library", - "//pkg/registry/generic:go_default_library", "//pkg/registry/registrytest:go_default_library", "//pkg/storage:go_default_library", "//pkg/storage/etcd/testing:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/service/ipallocator/storage/storage_test.go b/vendor/k8s.io/kubernetes/pkg/registry/core/service/ipallocator/storage/storage_test.go index 94f002cb..3a50a1bf 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/service/ipallocator/storage/storage_test.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/service/ipallocator/storage/storage_test.go @@ -22,10 +22,10 @@ import ( "testing" "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" "k8s.io/kubernetes/pkg/registry/core/service/allocator" allocatorstore "k8s.io/kubernetes/pkg/registry/core/service/allocator/storage" "k8s.io/kubernetes/pkg/registry/core/service/ipallocator" - "k8s.io/kubernetes/pkg/registry/generic" "k8s.io/kubernetes/pkg/registry/registrytest" "k8s.io/kubernetes/pkg/storage" etcdtesting "k8s.io/kubernetes/pkg/storage/etcd/testing" diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/service/portallocator/controller/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/core/service/portallocator/controller/BUILD index 9e03770f..046419ae 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/service/portallocator/controller/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/service/portallocator/controller/BUILD @@ -20,6 +20,7 @@ go_library( "//pkg/registry/core/service:go_default_library", "//pkg/registry/core/service/portallocator:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/util/net", "//vendor:k8s.io/apimachinery/pkg/util/runtime", "//vendor:k8s.io/apimachinery/pkg/util/wait", @@ -35,6 +36,7 @@ go_test( "//pkg/api:go_default_library", "//pkg/client/clientset_generated/internalclientset/fake:go_default_library", "//pkg/registry/core/service/portallocator:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/util/net", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/service/portallocator/controller/repair.go b/vendor/k8s.io/kubernetes/pkg/registry/core/service/portallocator/controller/repair.go index c8c0b8ae..1ce77d47 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/service/portallocator/controller/repair.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/service/portallocator/controller/repair.go @@ -21,6 +21,7 @@ import ( "time" "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/net" "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/wait" @@ -107,7 +108,7 @@ func (c *Repair) runOnce() error { // the service collection. The caching layer keeps per-collection RVs, // and this is proper, since in theory the collections could be hosted // in separate etcd (or even non-etcd) instances. - list, err := c.serviceClient.Services(api.NamespaceAll).List(api.ListOptions{}) + list, err := c.serviceClient.Services(metav1.NamespaceAll).List(metav1.ListOptions{}) if err != nil { return fmt.Errorf("unable to refresh the port block: %v", err) } diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/service/portallocator/controller/repair_test.go b/vendor/k8s.io/kubernetes/pkg/registry/core/service/portallocator/controller/repair_test.go index 7c56de93..beb5a4cf 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/service/portallocator/controller/repair_test.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/service/portallocator/controller/repair_test.go @@ -21,6 +21,7 @@ import ( "strings" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/net" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/fake" @@ -87,7 +88,7 @@ func TestRepairLeak(t *testing.T) { fakeClient := fake.NewSimpleClientset() registry := &mockRangeRegistry{ item: &api.RangeAllocation{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ ResourceVersion: "1", }, Range: dst.Range, @@ -134,31 +135,31 @@ func TestRepairWithExisting(t *testing.T) { fakeClient := fake.NewSimpleClientset( &api.Service{ - ObjectMeta: api.ObjectMeta{Namespace: "one", Name: "one"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "one", Name: "one"}, Spec: api.ServiceSpec{ Ports: []api.ServicePort{{NodePort: 111}}, }, }, &api.Service{ - ObjectMeta: api.ObjectMeta{Namespace: "two", Name: "two"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "two", Name: "two"}, Spec: api.ServiceSpec{ Ports: []api.ServicePort{{NodePort: 122}, {NodePort: 133}}, }, }, &api.Service{ // outside range, will be dropped - ObjectMeta: api.ObjectMeta{Namespace: "three", Name: "three"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "three", Name: "three"}, Spec: api.ServiceSpec{ Ports: []api.ServicePort{{NodePort: 201}}, }, }, &api.Service{ // empty, ignored - ObjectMeta: api.ObjectMeta{Namespace: "four", Name: "four"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "four", Name: "four"}, Spec: api.ServiceSpec{ Ports: []api.ServicePort{{}}, }, }, &api.Service{ // duplicate, dropped - ObjectMeta: api.ObjectMeta{Namespace: "five", Name: "five"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "five", Name: "five"}, Spec: api.ServiceSpec{ Ports: []api.ServicePort{{NodePort: 111}}, }, @@ -167,7 +168,7 @@ func TestRepairWithExisting(t *testing.T) { registry := &mockRangeRegistry{ item: &api.RangeAllocation{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ ResourceVersion: "1", }, Range: dst.Range, diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/service/proxy.go b/vendor/k8s.io/kubernetes/pkg/registry/core/service/proxy.go index 1d741bc4..bb65050d 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/service/proxy.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/service/proxy.go @@ -23,11 +23,11 @@ import ( "path" "k8s.io/apimachinery/pkg/runtime" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/capabilities" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" - genericrest "k8s.io/kubernetes/pkg/registry/generic/rest" + genericrest "k8s.io/kubernetes/pkg/genericapiserver/registry/generic/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" ) // ProxyREST implements the proxy subresource for a Service diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/service/registry.go b/vendor/k8s.io/kubernetes/pkg/registry/core/service/registry.go index 665f7761..07cf763e 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/service/registry.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/service/registry.go @@ -19,21 +19,22 @@ package service import ( "fmt" + metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/watch" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" ) // Registry is an interface for things that know how to store services. type Registry interface { - ListServices(ctx genericapirequest.Context, options *api.ListOptions) (*api.ServiceList, error) + ListServices(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (*api.ServiceList, error) CreateService(ctx genericapirequest.Context, svc *api.Service) (*api.Service, error) GetService(ctx genericapirequest.Context, name string, options *metav1.GetOptions) (*api.Service, error) DeleteService(ctx genericapirequest.Context, name string) error UpdateService(ctx genericapirequest.Context, svc *api.Service) (*api.Service, error) - WatchServices(ctx genericapirequest.Context, options *api.ListOptions) (watch.Interface, error) + WatchServices(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (watch.Interface, error) ExportService(ctx genericapirequest.Context, name string, options metav1.ExportOptions) (*api.Service, error) } @@ -48,7 +49,7 @@ func NewRegistry(s rest.StandardStorage) Registry { return &storage{s} } -func (s *storage) ListServices(ctx genericapirequest.Context, options *api.ListOptions) (*api.ServiceList, error) { +func (s *storage) ListServices(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (*api.ServiceList, error) { obj, err := s.List(ctx, options) if err != nil { return nil, err @@ -85,7 +86,7 @@ func (s *storage) UpdateService(ctx genericapirequest.Context, svc *api.Service) return obj.(*api.Service), nil } -func (s *storage) WatchServices(ctx genericapirequest.Context, options *api.ListOptions) (watch.Interface, error) { +func (s *storage) WatchServices(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (watch.Interface, error) { return s.Watch(ctx, options) } diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/service/rest.go b/vendor/k8s.io/kubernetes/pkg/registry/core/service/rest.go index 22b2990f..ba323314 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/service/rest.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/service/rest.go @@ -26,17 +26,18 @@ import ( "github.com/golang/glog" "k8s.io/apimachinery/pkg/api/errors" + metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" utilnet "k8s.io/apimachinery/pkg/util/net" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/validation/field" "k8s.io/apimachinery/pkg/watch" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" apiservice "k8s.io/kubernetes/pkg/api/service" "k8s.io/kubernetes/pkg/api/validation" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" "k8s.io/kubernetes/pkg/registry/core/endpoint" "k8s.io/kubernetes/pkg/registry/core/service/ipallocator" "k8s.io/kubernetes/pkg/registry/core/service/portallocator" @@ -253,13 +254,13 @@ func (rs *REST) Get(ctx genericapirequest.Context, id string, options *metav1.Ge return rs.registry.GetService(ctx, id, options) } -func (rs *REST) List(ctx genericapirequest.Context, options *api.ListOptions) (runtime.Object, error) { +func (rs *REST) List(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (runtime.Object, error) { return rs.registry.ListServices(ctx, options) } // Watch returns Services events via a watch.Interface. // It implements rest.Watcher. -func (rs *REST) Watch(ctx genericapirequest.Context, options *api.ListOptions) (watch.Interface, error) { +func (rs *REST) Watch(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (watch.Interface, error) { return rs.registry.WatchServices(ctx, options) } diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/service/rest_test.go b/vendor/k8s.io/kubernetes/pkg/registry/core/service/rest_test.go index 271404b4..580b2b28 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/service/rest_test.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/service/rest_test.go @@ -25,10 +25,10 @@ import ( "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" utilnet "k8s.io/apimachinery/pkg/util/net" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/service" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" "k8s.io/kubernetes/pkg/registry/core/service/ipallocator" "k8s.io/kubernetes/pkg/registry/core/service/portallocator" "k8s.io/kubernetes/pkg/registry/registrytest" @@ -79,7 +79,7 @@ func TestServiceRegistryCreate(t *testing.T) { storage, registry := NewTestREST(t, nil) svc := &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.ServiceSpec{ Selector: map[string]string{"bar": "baz"}, SessionAffinity: api.ServiceAffinityNone, @@ -127,7 +127,7 @@ func TestServiceRegistryCreateMultiNodePortsService(t *testing.T) { }{ { svc: &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "foo1"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo1"}, Spec: api.ServiceSpec{ Selector: map[string]string{"bar": "baz"}, SessionAffinity: api.ServiceAffinityNone, @@ -155,7 +155,7 @@ func TestServiceRegistryCreateMultiNodePortsService(t *testing.T) { }, { svc: &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "foo2"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo2"}, Spec: api.ServiceSpec{ Selector: map[string]string{"bar": "baz"}, SessionAffinity: api.ServiceAffinityNone, @@ -182,7 +182,7 @@ func TestServiceRegistryCreateMultiNodePortsService(t *testing.T) { }, { svc: &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "foo3"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo3"}, Spec: api.ServiceSpec{ Selector: map[string]string{"bar": "baz"}, SessionAffinity: api.ServiceAffinityNone, @@ -241,7 +241,7 @@ func TestServiceStorageValidatesCreate(t *testing.T) { storage, _ := NewTestREST(t, nil) failureCases := map[string]api.Service{ "empty ID": { - ObjectMeta: api.ObjectMeta{Name: ""}, + ObjectMeta: metav1.ObjectMeta{Name: ""}, Spec: api.ServiceSpec{ Selector: map[string]string{"bar": "baz"}, SessionAffinity: api.ServiceAffinityNone, @@ -254,7 +254,7 @@ func TestServiceStorageValidatesCreate(t *testing.T) { }, }, "empty port": { - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.ServiceSpec{ Selector: map[string]string{"bar": "baz"}, SessionAffinity: api.ServiceAffinityNone, @@ -265,7 +265,7 @@ func TestServiceStorageValidatesCreate(t *testing.T) { }, }, "missing targetPort": { - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.ServiceSpec{ Selector: map[string]string{"bar": "baz"}, SessionAffinity: api.ServiceAffinityNone, @@ -293,7 +293,7 @@ func TestServiceRegistryUpdate(t *testing.T) { ctx := genericapirequest.NewDefaultContext() storage, registry := NewTestREST(t, nil) svc, err := registry.CreateService(ctx, &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "foo", ResourceVersion: "1", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", ResourceVersion: "1", Namespace: metav1.NamespaceDefault}, Spec: api.ServiceSpec{ Selector: map[string]string{"bar": "baz1"}, Ports: []api.ServicePort{{ @@ -308,7 +308,7 @@ func TestServiceRegistryUpdate(t *testing.T) { t.Fatalf("Expected no error: %v", err) } updated_svc, created, err := storage.Update(ctx, "foo", rest.DefaultUpdatedObjectInfo(&api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", ResourceVersion: svc.ResourceVersion}, Spec: api.ServiceSpec{ @@ -344,7 +344,7 @@ func TestServiceStorageValidatesUpdate(t *testing.T) { ctx := genericapirequest.NewDefaultContext() storage, registry := NewTestREST(t, nil) registry.CreateService(ctx, &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.ServiceSpec{ Selector: map[string]string{"bar": "baz"}, Ports: []api.ServicePort{{ @@ -355,7 +355,7 @@ func TestServiceStorageValidatesUpdate(t *testing.T) { }) failureCases := map[string]api.Service{ "empty ID": { - ObjectMeta: api.ObjectMeta{Name: ""}, + ObjectMeta: metav1.ObjectMeta{Name: ""}, Spec: api.ServiceSpec{ Selector: map[string]string{"bar": "baz"}, SessionAffinity: api.ServiceAffinityNone, @@ -368,7 +368,7 @@ func TestServiceStorageValidatesUpdate(t *testing.T) { }, }, "invalid selector": { - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.ServiceSpec{ Selector: map[string]string{"ThisSelectorFailsValidation": "ok"}, SessionAffinity: api.ServiceAffinityNone, @@ -396,7 +396,7 @@ func TestServiceRegistryExternalService(t *testing.T) { ctx := genericapirequest.NewDefaultContext() storage, registry := NewTestREST(t, nil) svc := &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.ServiceSpec{ Selector: map[string]string{"bar": "baz"}, SessionAffinity: api.ServiceAffinityNone, @@ -425,7 +425,7 @@ func TestServiceRegistryDelete(t *testing.T) { ctx := genericapirequest.NewDefaultContext() storage, registry := NewTestREST(t, nil) svc := &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.ServiceSpec{ Selector: map[string]string{"bar": "baz"}, SessionAffinity: api.ServiceAffinityNone, @@ -447,7 +447,7 @@ func TestServiceRegistryDeleteExternal(t *testing.T) { ctx := genericapirequest.NewDefaultContext() storage, registry := NewTestREST(t, nil) svc := &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.ServiceSpec{ Selector: map[string]string{"bar": "baz"}, SessionAffinity: api.ServiceAffinityNone, @@ -471,7 +471,7 @@ func TestServiceRegistryUpdateExternalService(t *testing.T) { // Create non-external load balancer. svc1 := &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "foo", ResourceVersion: "1"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", ResourceVersion: "1"}, Spec: api.ServiceSpec{ Selector: map[string]string{"bar": "baz"}, SessionAffinity: api.ServiceAffinityNone, @@ -508,7 +508,7 @@ func TestServiceRegistryUpdateMultiPortExternalService(t *testing.T) { // Create external load balancer. svc1 := &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "foo", ResourceVersion: "1"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", ResourceVersion: "1"}, Spec: api.ServiceSpec{ Selector: map[string]string{"bar": "baz"}, SessionAffinity: api.ServiceAffinityNone, @@ -542,7 +542,7 @@ func TestServiceRegistryGet(t *testing.T) { ctx := genericapirequest.NewDefaultContext() storage, registry := NewTestREST(t, nil) registry.CreateService(ctx, &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.ServiceSpec{ Selector: map[string]string{"bar": "baz"}, }, @@ -558,9 +558,9 @@ func TestServiceRegistryResourceLocation(t *testing.T) { endpoints := &api.EndpointsList{ Items: []api.Endpoints{ { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "1.2.3.4"}}, @@ -568,9 +568,9 @@ func TestServiceRegistryResourceLocation(t *testing.T) { }}, }, { - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{}, @@ -587,7 +587,7 @@ func TestServiceRegistryResourceLocation(t *testing.T) { } storage, registry := NewTestREST(t, endpoints) registry.CreateService(ctx, &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.ServiceSpec{ Selector: map[string]string{"bar": "baz"}, Ports: []api.ServicePort{ @@ -678,13 +678,13 @@ func TestServiceRegistryList(t *testing.T) { ctx := genericapirequest.NewDefaultContext() storage, registry := NewTestREST(t, nil) registry.CreateService(ctx, &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: metav1.NamespaceDefault}, Spec: api.ServiceSpec{ Selector: map[string]string{"bar": "baz"}, }, }) registry.CreateService(ctx, &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "foo2", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "foo2", Namespace: metav1.NamespaceDefault}, Spec: api.ServiceSpec{ Selector: map[string]string{"bar2": "baz2"}, }, @@ -710,7 +710,7 @@ func TestServiceRegistryIPAllocation(t *testing.T) { storage, _ := NewTestREST(t, nil) svc1 := &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.ServiceSpec{ Selector: map[string]string{"bar": "baz"}, SessionAffinity: api.ServiceAffinityNone, @@ -733,7 +733,7 @@ func TestServiceRegistryIPAllocation(t *testing.T) { } svc2 := &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar"}, Spec: api.ServiceSpec{ Selector: map[string]string{"bar": "baz"}, SessionAffinity: api.ServiceAffinityNone, @@ -764,7 +764,7 @@ func TestServiceRegistryIPAllocation(t *testing.T) { } svc3 := &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "quux"}, + ObjectMeta: metav1.ObjectMeta{Name: "quux"}, Spec: api.ServiceSpec{ Selector: map[string]string{"bar": "baz"}, ClusterIP: testIP, @@ -792,7 +792,7 @@ func TestServiceRegistryIPReallocation(t *testing.T) { storage, _ := NewTestREST(t, nil) svc1 := &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.ServiceSpec{ Selector: map[string]string{"bar": "baz"}, SessionAffinity: api.ServiceAffinityNone, @@ -820,7 +820,7 @@ func TestServiceRegistryIPReallocation(t *testing.T) { } svc2 := &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar"}, Spec: api.ServiceSpec{ Selector: map[string]string{"bar": "baz"}, SessionAffinity: api.ServiceAffinityNone, @@ -847,7 +847,7 @@ func TestServiceRegistryIPUpdate(t *testing.T) { storage, _ := NewTestREST(t, nil) svc := &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "foo", ResourceVersion: "1"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", ResourceVersion: "1"}, Spec: api.ServiceSpec{ Selector: map[string]string{"bar": "baz"}, SessionAffinity: api.ServiceAffinityNone, @@ -901,7 +901,7 @@ func TestServiceRegistryIPLoadBalancer(t *testing.T) { storage, _ := NewTestREST(t, nil) svc := &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "foo", ResourceVersion: "1"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", ResourceVersion: "1"}, Spec: api.ServiceSpec{ Selector: map[string]string{"bar": "baz"}, SessionAffinity: api.ServiceAffinityNone, @@ -934,7 +934,7 @@ func TestServiceRegistryIPLoadBalancer(t *testing.T) { func TestUpdateServiceWithConflictingNamespace(t *testing.T) { storage, _ := NewTestREST(t, nil) service := &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "test", Namespace: "not-default"}, + ObjectMeta: metav1.ObjectMeta{Name: "test", Namespace: "not-default"}, } ctx := genericapirequest.NewDefaultContext() @@ -955,7 +955,7 @@ func TestServiceRegistryExternalTrafficAnnotationHealthCheckNodePortAllocation(t ctx := genericapirequest.NewDefaultContext() storage, _ := NewTestREST(t, nil) svc := &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "external-lb-esipp", + ObjectMeta: metav1.ObjectMeta{Name: "external-lb-esipp", Annotations: map[string]string{ service.BetaAnnotationExternalTraffic: service.AnnotationValueExternalTrafficLocal, }, @@ -992,7 +992,7 @@ func TestServiceRegistryExternalTrafficBetaAnnotationHealthCheckNodePortUserAllo ctx := genericapirequest.NewDefaultContext() storage, _ := NewTestREST(t, nil) svc := &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "external-lb-esipp", + ObjectMeta: metav1.ObjectMeta{Name: "external-lb-esipp", Annotations: map[string]string{ service.BetaAnnotationExternalTraffic: service.AnnotationValueExternalTrafficLocal, service.BetaAnnotationHealthCheckNodePort: "30200", @@ -1031,7 +1031,7 @@ func TestServiceRegistryExternalTrafficAnnotationNegative(t *testing.T) { ctx := genericapirequest.NewDefaultContext() storage, _ := NewTestREST(t, nil) svc := &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "external-lb-esipp", + ObjectMeta: metav1.ObjectMeta{Name: "external-lb-esipp", Annotations: map[string]string{ service.BetaAnnotationExternalTraffic: service.AnnotationValueExternalTrafficLocal, service.BetaAnnotationHealthCheckNodePort: "-1", @@ -1060,7 +1060,7 @@ func TestServiceRegistryExternalTrafficAnnotationGlobal(t *testing.T) { ctx := genericapirequest.NewDefaultContext() storage, _ := NewTestREST(t, nil) svc := &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "external-lb-esipp", + ObjectMeta: metav1.ObjectMeta{Name: "external-lb-esipp", Annotations: map[string]string{ service.BetaAnnotationExternalTraffic: service.AnnotationValueExternalTrafficGlobal, }, @@ -1097,7 +1097,7 @@ func TestServiceRegistryExternalTrafficAnnotationClusterIP(t *testing.T) { ctx := genericapirequest.NewDefaultContext() storage, _ := NewTestREST(t, nil) svc := &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "external-lb-esipp", + ObjectMeta: metav1.ObjectMeta{Name: "external-lb-esipp", Annotations: map[string]string{ service.BetaAnnotationExternalTraffic: service.AnnotationValueExternalTrafficGlobal, }, diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/service/storage/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/core/service/storage/BUILD index 12e69703..bed29889 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/service/storage/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/service/storage/BUILD @@ -15,11 +15,12 @@ go_test( tags = ["automanaged"], deps = [ "//pkg/api:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", "//pkg/registry/registrytest:go_default_library", "//pkg/storage/etcd/testing:go_default_library", "//pkg/util/intstr:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", ], @@ -31,13 +32,13 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/api:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic/registry:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/registry/core/service:go_default_library", - "//pkg/registry/generic:go_default_library", - "//pkg/registry/generic/registry:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/service/storage/storage.go b/vendor/k8s.io/kubernetes/pkg/registry/core/service/storage/storage.go index bf5f115d..00be8e8b 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/service/storage/storage.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/service/storage/storage.go @@ -19,12 +19,12 @@ package storage import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + genericregistry "k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" "k8s.io/kubernetes/pkg/registry/core/service" - "k8s.io/kubernetes/pkg/registry/generic" - genericregistry "k8s.io/kubernetes/pkg/registry/generic/registry" ) type REST struct { diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/service/storage/storage_test.go b/vendor/k8s.io/kubernetes/pkg/registry/core/service/storage/storage_test.go index a78c8e23..3fc6311c 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/service/storage/storage_test.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/service/storage/storage_test.go @@ -19,11 +19,12 @@ package storage import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" "k8s.io/kubernetes/pkg/registry/registrytest" etcdtesting "k8s.io/kubernetes/pkg/storage/etcd/testing" "k8s.io/kubernetes/pkg/util/intstr" @@ -43,9 +44,9 @@ func newStorage(t *testing.T) (*REST, *StatusREST, *etcdtesting.EtcdTestServer) func validService() *api.Service { return &api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, Spec: api.ServiceSpec{ Selector: map[string]string{"bar": "baz"}, @@ -67,7 +68,7 @@ func TestCreate(t *testing.T) { defer storage.Store.DestroyFunc() test := registrytest.New(t, storage.Store) validService := validService() - validService.ObjectMeta = api.ObjectMeta{} + validService.ObjectMeta = metav1.ObjectMeta{} test.TestCreate( // valid validService, diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/service/strategy.go b/vendor/k8s.io/kubernetes/pkg/registry/core/service/strategy.go index c65b2b2a..a4c6986a 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/service/strategy.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/service/strategy.go @@ -19,15 +19,15 @@ package service import ( "fmt" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/validation/field" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/storage/names" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/validation" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" apistorage "k8s.io/kubernetes/pkg/storage" ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/service/strategy_test.go b/vendor/k8s.io/kubernetes/pkg/registry/core/service/strategy_test.go index d89cdb69..d92e748f 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/service/strategy_test.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/service/strategy_test.go @@ -21,11 +21,12 @@ import ( "testing" "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" apitesting "k8s.io/kubernetes/pkg/api/testing" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" "k8s.io/kubernetes/pkg/util/intstr" ) @@ -38,7 +39,7 @@ func TestExportService(t *testing.T) { }{ { objIn: &api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "bar", }, @@ -51,7 +52,7 @@ func TestExportService(t *testing.T) { }, }, objOut: &api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "bar", }, @@ -60,7 +61,7 @@ func TestExportService(t *testing.T) { }, { objIn: &api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "bar", }, @@ -76,7 +77,7 @@ func TestExportService(t *testing.T) { }, }, objOut: &api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "bar", }, @@ -121,14 +122,14 @@ func TestCheckGeneratedNameError(t *testing.T) { } expect = errors.NewAlreadyExists(api.Resource("foos"), "bar") - if err := rest.CheckGeneratedNameError(Strategy, expect, &api.Pod{ObjectMeta: api.ObjectMeta{GenerateName: "foo"}}); err == nil || !errors.IsServerTimeout(err) { + if err := rest.CheckGeneratedNameError(Strategy, expect, &api.Pod{ObjectMeta: metav1.ObjectMeta{GenerateName: "foo"}}); err == nil || !errors.IsServerTimeout(err) { t.Errorf("expected try again later error: %v", err) } } func makeValidService() api.Service { return api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "valid", Namespace: "default", Labels: map[string]string{}, diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/serviceaccount/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/core/serviceaccount/BUILD index 24730320..703b4e8a 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/serviceaccount/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/serviceaccount/BUILD @@ -19,16 +19,17 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/api/validation:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", - "//pkg/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/storage:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/internalversion", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/validation/field", "//vendor:k8s.io/apimachinery/pkg/watch", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", "//vendor:k8s.io/apiserver/pkg/storage/names", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/serviceaccount/registry.go b/vendor/k8s.io/kubernetes/pkg/registry/core/serviceaccount/registry.go index 097c5c0d..be90fa82 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/serviceaccount/registry.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/serviceaccount/registry.go @@ -17,17 +17,18 @@ limitations under the License. package serviceaccount import ( + metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/watch" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" ) // Registry is an interface implemented by things that know how to store ServiceAccount objects. type Registry interface { - ListServiceAccounts(ctx genericapirequest.Context, options *api.ListOptions) (*api.ServiceAccountList, error) - WatchServiceAccounts(ctx genericapirequest.Context, options *api.ListOptions) (watch.Interface, error) + ListServiceAccounts(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (*api.ServiceAccountList, error) + WatchServiceAccounts(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (watch.Interface, error) GetServiceAccount(ctx genericapirequest.Context, name string, options *metav1.GetOptions) (*api.ServiceAccount, error) CreateServiceAccount(ctx genericapirequest.Context, ServiceAccount *api.ServiceAccount) error UpdateServiceAccount(ctx genericapirequest.Context, ServiceAccount *api.ServiceAccount) error @@ -45,7 +46,7 @@ func NewRegistry(s rest.StandardStorage) Registry { return &storage{s} } -func (s *storage) ListServiceAccounts(ctx genericapirequest.Context, options *api.ListOptions) (*api.ServiceAccountList, error) { +func (s *storage) ListServiceAccounts(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (*api.ServiceAccountList, error) { obj, err := s.List(ctx, options) if err != nil { return nil, err @@ -53,7 +54,7 @@ func (s *storage) ListServiceAccounts(ctx genericapirequest.Context, options *ap return obj.(*api.ServiceAccountList), nil } -func (s *storage) WatchServiceAccounts(ctx genericapirequest.Context, options *api.ListOptions) (watch.Interface, error) { +func (s *storage) WatchServiceAccounts(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (watch.Interface, error) { return s.Watch(ctx, options) } diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/serviceaccount/storage/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/core/serviceaccount/storage/BUILD index 4ae34743..423e7af3 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/serviceaccount/storage/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/serviceaccount/storage/BUILD @@ -15,10 +15,11 @@ go_test( tags = ["automanaged"], deps = [ "//pkg/api:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", "//pkg/registry/registrytest:go_default_library", "//pkg/storage/etcd/testing:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", ], @@ -30,9 +31,9 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/api:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic/registry:go_default_library", "//pkg/registry/core/serviceaccount:go_default_library", - "//pkg/registry/generic:go_default_library", - "//pkg/registry/generic/registry:go_default_library", "//vendor:k8s.io/apimachinery/pkg/runtime", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/serviceaccount/storage/storage.go b/vendor/k8s.io/kubernetes/pkg/registry/core/serviceaccount/storage/storage.go index ecdd4f5d..65b671c0 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/serviceaccount/storage/storage.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/serviceaccount/storage/storage.go @@ -19,9 +19,9 @@ package storage import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + genericregistry "k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry" "k8s.io/kubernetes/pkg/registry/core/serviceaccount" - "k8s.io/kubernetes/pkg/registry/generic" - genericregistry "k8s.io/kubernetes/pkg/registry/generic/registry" ) type REST struct { diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/serviceaccount/storage/storage_test.go b/vendor/k8s.io/kubernetes/pkg/registry/core/serviceaccount/storage/storage_test.go index 70cf497b..87131b6a 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/serviceaccount/storage/storage_test.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/serviceaccount/storage/storage_test.go @@ -19,11 +19,12 @@ package storage import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" "k8s.io/kubernetes/pkg/registry/registrytest" etcdtesting "k8s.io/kubernetes/pkg/storage/etcd/testing" ) @@ -41,9 +42,9 @@ func newStorage(t *testing.T) (*REST, *etcdtesting.EtcdTestServer) { func validNewServiceAccount(name string) *api.ServiceAccount { return &api.ServiceAccount{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, Secrets: []api.ObjectReference{}, } @@ -55,14 +56,14 @@ func TestCreate(t *testing.T) { defer storage.Store.DestroyFunc() test := registrytest.New(t, storage.Store) serviceAccount := validNewServiceAccount("foo") - serviceAccount.ObjectMeta = api.ObjectMeta{GenerateName: "foo-"} + serviceAccount.ObjectMeta = metav1.ObjectMeta{GenerateName: "foo-"} test.TestCreate( // valid serviceAccount, // invalid &api.ServiceAccount{}, &api.ServiceAccount{ - ObjectMeta: api.ObjectMeta{Name: "name with spaces"}, + ObjectMeta: metav1.ObjectMeta{Name: "name with spaces"}, }, ) } diff --git a/vendor/k8s.io/kubernetes/pkg/registry/core/serviceaccount/strategy.go b/vendor/k8s.io/kubernetes/pkg/registry/core/serviceaccount/strategy.go index 044ffa23..4a8d2680 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/core/serviceaccount/strategy.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/core/serviceaccount/strategy.go @@ -19,15 +19,15 @@ package serviceaccount import ( "fmt" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/validation/field" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/storage/names" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/validation" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" apistorage "k8s.io/kubernetes/pkg/storage" ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/extensions/controller/storage/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/extensions/controller/storage/BUILD index a2740c00..c272bcdd 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/extensions/controller/storage/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/extensions/controller/storage/BUILD @@ -16,14 +16,14 @@ go_test( deps = [ "//pkg/api:go_default_library", "//pkg/apis/extensions:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", - "//pkg/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/registry/registrytest:go_default_library", "//pkg/storage:go_default_library", "//pkg/storage/etcd/testing:go_default_library", "//pkg/storage/storagebackend/factory:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) @@ -35,14 +35,14 @@ go_library( "//pkg/api:go_default_library", "//pkg/apis/extensions:go_default_library", "//pkg/apis/extensions/validation:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/registry/core/controller:go_default_library", "//pkg/registry/core/controller/storage:go_default_library", - "//pkg/registry/generic:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/extensions/controller/storage/storage.go b/vendor/k8s.io/kubernetes/pkg/registry/extensions/controller/storage/storage.go index 98da62a7..6ee77059 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/extensions/controller/storage/storage.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/extensions/controller/storage/storage.go @@ -22,14 +22,14 @@ import ( "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/extensions" extvalidation "k8s.io/kubernetes/pkg/apis/extensions/validation" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" "k8s.io/kubernetes/pkg/registry/core/controller" controllerstore "k8s.io/kubernetes/pkg/registry/core/controller/storage" - "k8s.io/kubernetes/pkg/registry/generic" ) // Container includes dummy storage for RC pods and experimental storage for Scale. @@ -102,7 +102,7 @@ func (r *ScaleREST) Update(ctx genericapirequest.Context, name string, objInfo r // scaleFromRC returns a scale subresource for a replication controller. func scaleFromRC(rc *api.ReplicationController) *extensions.Scale { return &extensions.Scale{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: rc.Name, Namespace: rc.Namespace, UID: rc.UID, diff --git a/vendor/k8s.io/kubernetes/pkg/registry/extensions/controller/storage/storage_test.go b/vendor/k8s.io/kubernetes/pkg/registry/extensions/controller/storage/storage_test.go index 71a1a2b8..19a753ce 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/extensions/controller/storage/storage_test.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/extensions/controller/storage/storage_test.go @@ -20,11 +20,11 @@ import ( "testing" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/extensions" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" - "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" "k8s.io/kubernetes/pkg/registry/registrytest" "k8s.io/kubernetes/pkg/storage" etcdtesting "k8s.io/kubernetes/pkg/storage/etcd/testing" @@ -44,7 +44,7 @@ func newStorage(t *testing.T) (*ScaleREST, *etcdtesting.EtcdTestServer, storage. var validPodTemplate = api.PodTemplate{ Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"a": "b"}, }, Spec: api.PodSpec{ @@ -70,12 +70,12 @@ var validControllerSpec = api.ReplicationControllerSpec{ } var validController = api.ReplicationController{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "test"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "test"}, Spec: validControllerSpec, } var validScale = extensions.Scale{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "test"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "test"}, Spec: extensions.ScaleSpec{ Replicas: validReplicas, }, @@ -117,7 +117,7 @@ func TestUpdate(t *testing.T) { } replicas := int32(12) update := extensions.Scale{ - ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "test"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "test"}, Spec: extensions.ScaleSpec{ Replicas: replicas, }, diff --git a/vendor/k8s.io/kubernetes/pkg/registry/extensions/daemonset/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/extensions/daemonset/BUILD index 63bc8460..47606282 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/extensions/daemonset/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/extensions/daemonset/BUILD @@ -19,13 +19,13 @@ go_library( "//pkg/api:go_default_library", "//pkg/apis/extensions:go_default_library", "//pkg/apis/extensions/validation:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", "//pkg/storage:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/validation/field", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", "//vendor:k8s.io/apiserver/pkg/storage/names", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/extensions/daemonset/storage/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/extensions/daemonset/storage/BUILD index 9cff00d6..9d55f2c9 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/extensions/daemonset/storage/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/extensions/daemonset/storage/BUILD @@ -16,11 +16,11 @@ go_test( deps = [ "//pkg/api:go_default_library", "//pkg/apis/extensions:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", "//pkg/registry/registrytest:go_default_library", "//pkg/storage/etcd/testing:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", ], @@ -32,13 +32,13 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/apis/extensions:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic/registry:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/registry/extensions/daemonset:go_default_library", - "//pkg/registry/generic:go_default_library", - "//pkg/registry/generic/registry:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/extensions/daemonset/storage/storage.go b/vendor/k8s.io/kubernetes/pkg/registry/extensions/daemonset/storage/storage.go index 5f1e8321..468f66b3 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/extensions/daemonset/storage/storage.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/extensions/daemonset/storage/storage.go @@ -19,12 +19,12 @@ package storage import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/apis/extensions" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + genericregistry "k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" "k8s.io/kubernetes/pkg/registry/extensions/daemonset" - "k8s.io/kubernetes/pkg/registry/generic" - genericregistry "k8s.io/kubernetes/pkg/registry/generic/registry" ) // rest implements a RESTStorage for DaemonSets diff --git a/vendor/k8s.io/kubernetes/pkg/registry/extensions/daemonset/storage/storage_test.go b/vendor/k8s.io/kubernetes/pkg/registry/extensions/daemonset/storage/storage_test.go index b3b19155..fe041a9d 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/extensions/daemonset/storage/storage_test.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/extensions/daemonset/storage/storage_test.go @@ -20,12 +20,12 @@ import ( "testing" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/extensions" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" "k8s.io/kubernetes/pkg/registry/registrytest" etcdtesting "k8s.io/kubernetes/pkg/storage/etcd/testing" ) @@ -44,22 +44,23 @@ func newStorage(t *testing.T) (*REST, *StatusREST, *etcdtesting.EtcdTestServer) func newValidDaemonSet() *extensions.DaemonSet { return &extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"a": "b"}}, Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"a": "b"}, }, Spec: api.PodSpec{ Containers: []api.Container{ { - Name: "test", - Image: "test_image", - ImagePullPolicy: api.PullIfNotPresent, + Name: "test", + Image: "test_image", + ImagePullPolicy: api.PullIfNotPresent, + TerminationMessagePolicy: api.TerminationMessageReadFile, }, }, RestartPolicy: api.RestartPolicyAlways, @@ -78,7 +79,7 @@ func TestCreate(t *testing.T) { defer storage.Store.DestroyFunc() test := registrytest.New(t, storage.Store) ds := newValidDaemonSet() - ds.ObjectMeta = api.ObjectMeta{} + ds.ObjectMeta = metav1.ObjectMeta{} test.TestCreate( // valid ds, diff --git a/vendor/k8s.io/kubernetes/pkg/registry/extensions/daemonset/strategy.go b/vendor/k8s.io/kubernetes/pkg/registry/extensions/daemonset/strategy.go index 2af39b1f..ccd0b0a1 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/extensions/daemonset/strategy.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/extensions/daemonset/strategy.go @@ -20,16 +20,16 @@ import ( "fmt" "reflect" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/validation/field" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/storage/names" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/extensions" "k8s.io/kubernetes/pkg/apis/extensions/validation" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" "k8s.io/kubernetes/pkg/storage" ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/extensions/deployment/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/extensions/deployment/BUILD index 488a8fce..40c78b71 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/extensions/deployment/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/extensions/deployment/BUILD @@ -21,15 +21,16 @@ go_library( "//pkg/apis/extensions:go_default_library", "//pkg/apis/extensions/validation:go_default_library", "//pkg/controller/deployment/util:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", - "//pkg/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/storage:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/internalversion", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/validation/field", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", "//vendor:k8s.io/apiserver/pkg/storage/names", ], ) @@ -44,8 +45,9 @@ go_test( "//pkg/api/testapi:go_default_library", "//pkg/api/testing:go_default_library", "//pkg/apis/extensions:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/extensions/deployment/registry.go b/vendor/k8s.io/kubernetes/pkg/registry/extensions/deployment/registry.go index f87d406f..616b1f43 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/extensions/deployment/registry.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/extensions/deployment/registry.go @@ -19,16 +19,17 @@ package deployment import ( "fmt" + metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/extensions" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" ) // Registry is an interface for things that know how to store Deployments. type Registry interface { - ListDeployments(ctx genericapirequest.Context, options *api.ListOptions) (*extensions.DeploymentList, error) + ListDeployments(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (*extensions.DeploymentList, error) GetDeployment(ctx genericapirequest.Context, deploymentID string, options *metav1.GetOptions) (*extensions.Deployment, error) CreateDeployment(ctx genericapirequest.Context, deployment *extensions.Deployment) (*extensions.Deployment, error) UpdateDeployment(ctx genericapirequest.Context, deployment *extensions.Deployment) (*extensions.Deployment, error) @@ -45,7 +46,7 @@ func NewRegistry(s rest.StandardStorage) Registry { return &storage{s} } -func (s *storage) ListDeployments(ctx genericapirequest.Context, options *api.ListOptions) (*extensions.DeploymentList, error) { +func (s *storage) ListDeployments(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (*extensions.DeploymentList, error) { if options != nil && options.FieldSelector != nil && !options.FieldSelector.Empty() { return nil, fmt.Errorf("field selector not supported yet") } diff --git a/vendor/k8s.io/kubernetes/pkg/registry/extensions/deployment/storage/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/extensions/deployment/storage/BUILD index 8b188b0e..d781be24 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/extensions/deployment/storage/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/extensions/deployment/storage/BUILD @@ -17,18 +17,18 @@ go_test( "//pkg/api:go_default_library", "//pkg/api/errors/storage:go_default_library", "//pkg/apis/extensions:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", - "//pkg/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/registry/registrytest:go_default_library", "//pkg/storage/etcd/testing:go_default_library", "//pkg/util/intstr:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/diff", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) @@ -37,19 +37,18 @@ go_library( srcs = ["storage.go"], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//pkg/api/errors/storage:go_default_library", "//pkg/apis/extensions:go_default_library", "//pkg/apis/extensions/validation:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic/registry:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/registry/extensions/deployment:go_default_library", - "//pkg/registry/generic:go_default_library", - "//pkg/registry/generic/registry:go_default_library", "//pkg/storage:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/extensions/deployment/storage/storage.go b/vendor/k8s.io/kubernetes/pkg/registry/extensions/deployment/storage/storage.go index 847f243c..cb062882 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/extensions/deployment/storage/storage.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/extensions/deployment/storage/storage.go @@ -23,15 +23,14 @@ import ( "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - genericapirequest "k8s.io/apiserver/pkg/request" - "k8s.io/kubernetes/pkg/api" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" storeerr "k8s.io/kubernetes/pkg/api/errors/storage" "k8s.io/kubernetes/pkg/apis/extensions" extvalidation "k8s.io/kubernetes/pkg/apis/extensions/validation" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + genericregistry "k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" "k8s.io/kubernetes/pkg/registry/extensions/deployment" - "k8s.io/kubernetes/pkg/registry/generic" - genericregistry "k8s.io/kubernetes/pkg/registry/generic/registry" "k8s.io/kubernetes/pkg/storage" ) @@ -240,7 +239,7 @@ func (r *ScaleREST) Update(ctx genericapirequest.Context, name string, objInfo r func scaleFromDeployment(deployment *extensions.Deployment) (*extensions.Scale, error) { return &extensions.Scale{ // TODO: Create a variant of ObjectMeta type that only contains the fields below. - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: deployment.Name, Namespace: deployment.Namespace, UID: deployment.UID, diff --git a/vendor/k8s.io/kubernetes/pkg/registry/extensions/deployment/storage/storage_test.go b/vendor/k8s.io/kubernetes/pkg/registry/extensions/deployment/storage/storage_test.go index 7eb72b00..c60dca51 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/extensions/deployment/storage/storage_test.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/extensions/deployment/storage/storage_test.go @@ -22,16 +22,16 @@ import ( "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/diff" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" storeerr "k8s.io/kubernetes/pkg/api/errors/storage" "k8s.io/kubernetes/pkg/apis/extensions" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" - "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" "k8s.io/kubernetes/pkg/registry/registrytest" etcdtesting "k8s.io/kubernetes/pkg/storage/etcd/testing" "k8s.io/kubernetes/pkg/util/intstr" @@ -51,7 +51,7 @@ var name = "foo-deployment" func validNewDeployment() *extensions.Deployment { return &extensions.Deployment{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: namespace, }, @@ -65,15 +65,16 @@ func validNewDeployment() *extensions.Deployment { }, }, Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"a": "b"}, }, Spec: api.PodSpec{ Containers: []api.Container{ { - Name: "test", - Image: "test_image", - ImagePullPolicy: api.PullIfNotPresent, + Name: "test", + Image: "test_image", + ImagePullPolicy: api.PullIfNotPresent, + TerminationMessagePolicy: api.TerminationMessageReadFile, }, }, RestartPolicy: api.RestartPolicyAlways, @@ -96,7 +97,7 @@ func TestCreate(t *testing.T) { defer storage.Deployment.Store.DestroyFunc() test := registrytest.New(t, storage.Deployment.Store) deployment := validNewDeployment() - deployment.ObjectMeta = api.ObjectMeta{} + deployment.ObjectMeta = metav1.ObjectMeta{} test.TestCreate( // valid deployment, @@ -205,7 +206,7 @@ func TestScaleGet(t *testing.T) { } want := &extensions.Scale{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: namespace, UID: deployment.UID, @@ -242,7 +243,7 @@ func TestScaleUpdate(t *testing.T) { } replicas := int32(12) update := extensions.Scale{ - ObjectMeta: api.ObjectMeta{Name: name, Namespace: namespace}, + ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespace}, Spec: extensions.ScaleSpec{ Replicas: replicas, }, diff --git a/vendor/k8s.io/kubernetes/pkg/registry/extensions/deployment/strategy.go b/vendor/k8s.io/kubernetes/pkg/registry/extensions/deployment/strategy.go index 0145b85e..196ce6be 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/extensions/deployment/strategy.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/extensions/deployment/strategy.go @@ -22,18 +22,18 @@ import ( "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/validation/field" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/storage/names" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/extensions" "k8s.io/kubernetes/pkg/apis/extensions/validation" "k8s.io/kubernetes/pkg/controller/deployment/util" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" - "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" apistorage "k8s.io/kubernetes/pkg/storage" ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/extensions/deployment/strategy_test.go b/vendor/k8s.io/kubernetes/pkg/registry/extensions/deployment/strategy_test.go index 92e96df7..c166457f 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/extensions/deployment/strategy_test.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/extensions/deployment/strategy_test.go @@ -20,8 +20,9 @@ import ( "reflect" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" apitesting "k8s.io/kubernetes/pkg/api/testing" @@ -65,7 +66,7 @@ func TestStatusUpdates(t *testing.T) { func newDeployment(labels, annotations map[string]string) *extensions.Deployment { return &extensions.Deployment{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test", Labels: labels, Annotations: annotations, diff --git a/vendor/k8s.io/kubernetes/pkg/registry/extensions/ingress/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/extensions/ingress/BUILD index 33683c6c..13c70afb 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/extensions/ingress/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/extensions/ingress/BUILD @@ -19,13 +19,13 @@ go_library( "//pkg/api:go_default_library", "//pkg/apis/extensions:go_default_library", "//pkg/apis/extensions/validation:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", "//pkg/storage:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/validation/field", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", "//vendor:k8s.io/apiserver/pkg/storage/names", ], ) @@ -41,7 +41,8 @@ go_test( "//pkg/api/testing:go_default_library", "//pkg/apis/extensions:go_default_library", "//pkg/util/intstr:go_default_library", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/extensions/ingress/storage/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/extensions/ingress/storage/BUILD index 917d196e..a4c6b26b 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/extensions/ingress/storage/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/extensions/ingress/storage/BUILD @@ -16,11 +16,12 @@ go_test( deps = [ "//pkg/api:go_default_library", "//pkg/apis/extensions:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", "//pkg/registry/registrytest:go_default_library", "//pkg/storage/etcd/testing:go_default_library", "//pkg/util/intstr:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", ], @@ -32,13 +33,13 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/apis/extensions:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic/registry:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/registry/extensions/ingress:go_default_library", - "//pkg/registry/generic:go_default_library", - "//pkg/registry/generic/registry:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/extensions/ingress/storage/storage.go b/vendor/k8s.io/kubernetes/pkg/registry/extensions/ingress/storage/storage.go index 23629552..702672f4 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/extensions/ingress/storage/storage.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/extensions/ingress/storage/storage.go @@ -19,12 +19,12 @@ package storage import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/apis/extensions" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + genericregistry "k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" "k8s.io/kubernetes/pkg/registry/extensions/ingress" - "k8s.io/kubernetes/pkg/registry/generic" - genericregistry "k8s.io/kubernetes/pkg/registry/generic/registry" ) // rest implements a RESTStorage for replication controllers diff --git a/vendor/k8s.io/kubernetes/pkg/registry/extensions/ingress/storage/storage_test.go b/vendor/k8s.io/kubernetes/pkg/registry/extensions/ingress/storage/storage_test.go index e6000c72..d2016559 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/extensions/ingress/storage/storage_test.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/extensions/ingress/storage/storage_test.go @@ -19,12 +19,13 @@ package storage import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/extensions" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" "k8s.io/kubernetes/pkg/registry/registrytest" etcdtesting "k8s.io/kubernetes/pkg/storage/etcd/testing" "k8s.io/kubernetes/pkg/util/intstr" @@ -43,7 +44,7 @@ func newStorage(t *testing.T) (*REST, *StatusREST, *etcdtesting.EtcdTestServer) } var ( - namespace = api.NamespaceNone + namespace = metav1.NamespaceNone name = "foo-ingress" defaultHostname = "foo.bar.com" defaultBackendName = "default-backend" @@ -89,7 +90,7 @@ func toIngressRules(hostRules map[string]IngressRuleValues) []extensions.Ingress func newIngress(pathMap map[string]string) *extensions.Ingress { return &extensions.Ingress{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: namespace, }, diff --git a/vendor/k8s.io/kubernetes/pkg/registry/extensions/ingress/strategy.go b/vendor/k8s.io/kubernetes/pkg/registry/extensions/ingress/strategy.go index e5ec6501..890517ca 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/extensions/ingress/strategy.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/extensions/ingress/strategy.go @@ -20,16 +20,16 @@ import ( "fmt" "reflect" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/validation/field" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/storage/names" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/extensions" "k8s.io/kubernetes/pkg/apis/extensions/validation" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" "k8s.io/kubernetes/pkg/storage" ) @@ -65,7 +65,7 @@ func (ingressStrategy) PrepareForUpdate(ctx genericapirequest.Context, obj, old // Any changes to the spec increment the generation number, any changes to the // status should reflect the generation number of the corresponding object. - // See api.ObjectMeta description for more information on Generation. + // See metav1.ObjectMeta description for more information on Generation. if !reflect.DeepEqual(oldIngress.Spec, newIngress.Spec) { newIngress.Generation = oldIngress.Generation + 1 } diff --git a/vendor/k8s.io/kubernetes/pkg/registry/extensions/ingress/strategy_test.go b/vendor/k8s.io/kubernetes/pkg/registry/extensions/ingress/strategy_test.go index 908c6fbf..f7fe2579 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/extensions/ingress/strategy_test.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/extensions/ingress/strategy_test.go @@ -19,7 +19,8 @@ package ingress import ( "testing" - genericapirequest "k8s.io/apiserver/pkg/request" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" apitesting "k8s.io/kubernetes/pkg/api/testing" @@ -33,9 +34,9 @@ func newIngress() extensions.Ingress { ServicePort: intstr.FromInt(80), } return extensions.Ingress{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, Spec: extensions.IngressSpec{ Backend: &extensions.IngressBackend{ diff --git a/vendor/k8s.io/kubernetes/pkg/registry/extensions/networkpolicy/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/extensions/networkpolicy/BUILD index 07d74f8e..ac64faf1 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/extensions/networkpolicy/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/extensions/networkpolicy/BUILD @@ -19,13 +19,13 @@ go_library( "//pkg/api:go_default_library", "//pkg/apis/extensions:go_default_library", "//pkg/apis/extensions/validation:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", "//pkg/storage:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/validation/field", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", "//vendor:k8s.io/apiserver/pkg/storage/names", ], ) @@ -36,10 +36,9 @@ go_test( library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//pkg/apis/extensions:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/extensions/networkpolicy/storage/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/extensions/networkpolicy/storage/BUILD index fc248b2f..f44f9ead 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/extensions/networkpolicy/storage/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/extensions/networkpolicy/storage/BUILD @@ -14,17 +14,16 @@ go_test( library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//pkg/apis/extensions:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", "//pkg/registry/registrytest:go_default_library", "//pkg/storage/etcd/testing:go_default_library", "//pkg/util/intstr:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) @@ -34,9 +33,9 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/apis/extensions:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic/registry:go_default_library", "//pkg/registry/extensions/networkpolicy:go_default_library", - "//pkg/registry/generic:go_default_library", - "//pkg/registry/generic/registry:go_default_library", "//vendor:k8s.io/apimachinery/pkg/runtime", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/extensions/networkpolicy/storage/storage.go b/vendor/k8s.io/kubernetes/pkg/registry/extensions/networkpolicy/storage/storage.go index f2a14104..aa7cc8bf 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/extensions/networkpolicy/storage/storage.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/extensions/networkpolicy/storage/storage.go @@ -19,9 +19,9 @@ package storage import ( "k8s.io/apimachinery/pkg/runtime" extensionsapi "k8s.io/kubernetes/pkg/apis/extensions" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + genericregistry "k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry" "k8s.io/kubernetes/pkg/registry/extensions/networkpolicy" - "k8s.io/kubernetes/pkg/registry/generic" - genericregistry "k8s.io/kubernetes/pkg/registry/generic/registry" ) // rest implements a RESTStorage for network policies diff --git a/vendor/k8s.io/kubernetes/pkg/registry/extensions/networkpolicy/storage/storage_test.go b/vendor/k8s.io/kubernetes/pkg/registry/extensions/networkpolicy/storage/storage_test.go index 987b6384..f6314d32 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/extensions/networkpolicy/storage/storage_test.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/extensions/networkpolicy/storage/storage_test.go @@ -20,13 +20,12 @@ import ( "testing" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" - genericapirequest "k8s.io/apiserver/pkg/request" - "k8s.io/kubernetes/pkg/api" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/apis/extensions" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" "k8s.io/kubernetes/pkg/registry/registrytest" etcdtesting "k8s.io/kubernetes/pkg/storage/etcd/testing" "k8s.io/kubernetes/pkg/util/intstr" @@ -57,9 +56,9 @@ func createNetworkPolicy(storage *REST, np extensions.NetworkPolicy, t *testing. func validNewNetworkPolicy() *extensions.NetworkPolicy { port := intstr.FromInt(80) return &extensions.NetworkPolicy{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, Labels: map[string]string{"a": "b"}, }, Spec: extensions.NetworkPolicySpec{ @@ -90,7 +89,7 @@ func TestCreate(t *testing.T) { defer storage.Store.DestroyFunc() test := registrytest.New(t, storage.Store) np := validNewNetworkPolicy() - np.ObjectMeta = api.ObjectMeta{} + np.ObjectMeta = metav1.ObjectMeta{} invalidSelector := map[string]string{"NoUppercaseOrSpecialCharsLike=Equals": "b"} test.TestCreate( diff --git a/vendor/k8s.io/kubernetes/pkg/registry/extensions/networkpolicy/strategy.go b/vendor/k8s.io/kubernetes/pkg/registry/extensions/networkpolicy/strategy.go index 0a6f34bb..5ac3b446 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/extensions/networkpolicy/strategy.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/extensions/networkpolicy/strategy.go @@ -20,16 +20,16 @@ import ( "fmt" "reflect" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/validation/field" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/storage/names" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/extensions" "k8s.io/kubernetes/pkg/apis/extensions/validation" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" "k8s.io/kubernetes/pkg/storage" ) @@ -60,7 +60,7 @@ func (networkPolicyStrategy) PrepareForUpdate(ctx genericapirequest.Context, obj // Any changes to the spec increment the generation number, any changes to the // status should reflect the generation number of the corresponding object. - // See api.ObjectMeta description for more information on Generation. + // See metav1.ObjectMeta description for more information on Generation. if !reflect.DeepEqual(oldNetworkPolicy.Spec, newNetworkPolicy.Spec) { newNetworkPolicy.Generation = oldNetworkPolicy.Generation + 1 } diff --git a/vendor/k8s.io/kubernetes/pkg/registry/extensions/networkpolicy/strategy_test.go b/vendor/k8s.io/kubernetes/pkg/registry/extensions/networkpolicy/strategy_test.go index 70c8da9e..b609acb7 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/extensions/networkpolicy/strategy_test.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/extensions/networkpolicy/strategy_test.go @@ -20,8 +20,7 @@ import ( "testing" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - genericapirequest "k8s.io/apiserver/pkg/request" - "k8s.io/kubernetes/pkg/api" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/apis/extensions" ) @@ -36,7 +35,7 @@ func TestNetworkPolicyStrategy(t *testing.T) { validMatchLabels := map[string]string{"a": "b"} np := &extensions.NetworkPolicy{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: extensions.NetworkPolicySpec{ PodSelector: metav1.LabelSelector{MatchLabels: validMatchLabels}, Ingress: []extensions.NetworkPolicyIngressRule{}, @@ -50,7 +49,7 @@ func TestNetworkPolicyStrategy(t *testing.T) { } invalidNp := &extensions.NetworkPolicy{ - ObjectMeta: api.ObjectMeta{Name: "bar", ResourceVersion: "4"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar", ResourceVersion: "4"}, } Strategy.PrepareForUpdate(ctx, invalidNp, np) errs = Strategy.ValidateUpdate(ctx, invalidNp, np) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/extensions/podsecuritypolicy/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/extensions/podsecuritypolicy/BUILD index c7528372..f3219366 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/extensions/podsecuritypolicy/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/extensions/podsecuritypolicy/BUILD @@ -18,14 +18,14 @@ go_library( "//pkg/api:go_default_library", "//pkg/apis/extensions:go_default_library", "//pkg/apis/extensions/validation:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", - "//pkg/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/storage:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/validation/field", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", "//vendor:k8s.io/apiserver/pkg/storage/names", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/extensions/podsecuritypolicy/storage/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/extensions/podsecuritypolicy/storage/BUILD index d70c6e04..5abc9c5b 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/extensions/podsecuritypolicy/storage/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/extensions/podsecuritypolicy/storage/BUILD @@ -14,13 +14,13 @@ go_test( library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//pkg/apis/extensions:go_default_library", "//pkg/apis/extensions/v1beta1:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", "//pkg/registry/registrytest:go_default_library", "//pkg/storage/etcd/testing:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", ], @@ -32,9 +32,9 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/apis/extensions:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic/registry:go_default_library", "//pkg/registry/extensions/podsecuritypolicy:go_default_library", - "//pkg/registry/generic:go_default_library", - "//pkg/registry/generic/registry:go_default_library", "//vendor:k8s.io/apimachinery/pkg/runtime", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/extensions/podsecuritypolicy/storage/storage.go b/vendor/k8s.io/kubernetes/pkg/registry/extensions/podsecuritypolicy/storage/storage.go index f41c3d46..58816ae8 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/extensions/podsecuritypolicy/storage/storage.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/extensions/podsecuritypolicy/storage/storage.go @@ -19,9 +19,9 @@ package storage import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/apis/extensions" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + genericregistry "k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry" "k8s.io/kubernetes/pkg/registry/extensions/podsecuritypolicy" - "k8s.io/kubernetes/pkg/registry/generic" - genericregistry "k8s.io/kubernetes/pkg/registry/generic/registry" ) // REST implements a RESTStorage for PodSecurityPolicies. diff --git a/vendor/k8s.io/kubernetes/pkg/registry/extensions/podsecuritypolicy/storage/storage_test.go b/vendor/k8s.io/kubernetes/pkg/registry/extensions/podsecuritypolicy/storage/storage_test.go index f8801950..a2d6956e 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/extensions/podsecuritypolicy/storage/storage_test.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/extensions/podsecuritypolicy/storage/storage_test.go @@ -19,14 +19,14 @@ package storage import ( "testing" - "k8s.io/kubernetes/pkg/api" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/apis/extensions" // Ensure that extensions/v1beta1 package is initialized. + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" _ "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" "k8s.io/kubernetes/pkg/registry/registrytest" etcdtesting "k8s.io/kubernetes/pkg/storage/etcd/testing" ) @@ -44,7 +44,7 @@ func newStorage(t *testing.T) (*REST, *etcdtesting.EtcdTestServer) { func validNewPodSecurityPolicy() *extensions.PodSecurityPolicy { return &extensions.PodSecurityPolicy{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, Spec: extensions.PodSecurityPolicySpec{ @@ -70,13 +70,13 @@ func TestCreate(t *testing.T) { defer storage.Store.DestroyFunc() test := registrytest.New(t, storage.Store).ClusterScope() psp := validNewPodSecurityPolicy() - psp.ObjectMeta = api.ObjectMeta{GenerateName: "foo-"} + psp.ObjectMeta = metav1.ObjectMeta{GenerateName: "foo-"} test.TestCreate( // valid psp, // invalid &extensions.PodSecurityPolicy{ - ObjectMeta: api.ObjectMeta{Name: "name with spaces"}, + ObjectMeta: metav1.ObjectMeta{Name: "name with spaces"}, }, ) } diff --git a/vendor/k8s.io/kubernetes/pkg/registry/extensions/podsecuritypolicy/strategy.go b/vendor/k8s.io/kubernetes/pkg/registry/extensions/podsecuritypolicy/strategy.go index 216b88c0..8fc50b45 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/extensions/podsecuritypolicy/strategy.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/extensions/podsecuritypolicy/strategy.go @@ -19,17 +19,17 @@ package podsecuritypolicy import ( "fmt" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/validation/field" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/storage/names" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/extensions" "k8s.io/kubernetes/pkg/apis/extensions/validation" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" - "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" "k8s.io/kubernetes/pkg/storage" ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/extensions/replicaset/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/extensions/replicaset/BUILD index 1cc3e6fb..2c130d43 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/extensions/replicaset/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/extensions/replicaset/BUILD @@ -20,16 +20,17 @@ go_library( "//pkg/api:go_default_library", "//pkg/apis/extensions:go_default_library", "//pkg/apis/extensions/validation:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", - "//pkg/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/storage:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/internalversion", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/validation/field", "//vendor:k8s.io/apimachinery/pkg/watch", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", "//vendor:k8s.io/apiserver/pkg/storage/names", ], ) @@ -43,7 +44,7 @@ go_test( "//pkg/api:go_default_library", "//pkg/apis/extensions:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/extensions/replicaset/registry.go b/vendor/k8s.io/kubernetes/pkg/registry/extensions/replicaset/registry.go index e217a25e..c0fb90c6 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/extensions/replicaset/registry.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/extensions/replicaset/registry.go @@ -21,18 +21,19 @@ package replicaset import ( "fmt" + metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/watch" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/extensions" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" ) // Registry is an interface for things that know how to store ReplicaSets. type Registry interface { - ListReplicaSets(ctx genericapirequest.Context, options *api.ListOptions) (*extensions.ReplicaSetList, error) - WatchReplicaSets(ctx genericapirequest.Context, options *api.ListOptions) (watch.Interface, error) + ListReplicaSets(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (*extensions.ReplicaSetList, error) + WatchReplicaSets(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (watch.Interface, error) GetReplicaSet(ctx genericapirequest.Context, replicaSetID string, options *metav1.GetOptions) (*extensions.ReplicaSet, error) CreateReplicaSet(ctx genericapirequest.Context, replicaSet *extensions.ReplicaSet) (*extensions.ReplicaSet, error) UpdateReplicaSet(ctx genericapirequest.Context, replicaSet *extensions.ReplicaSet) (*extensions.ReplicaSet, error) @@ -50,7 +51,7 @@ func NewRegistry(s rest.StandardStorage) Registry { return &storage{s} } -func (s *storage) ListReplicaSets(ctx genericapirequest.Context, options *api.ListOptions) (*extensions.ReplicaSetList, error) { +func (s *storage) ListReplicaSets(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (*extensions.ReplicaSetList, error) { if options != nil && options.FieldSelector != nil && !options.FieldSelector.Empty() { return nil, fmt.Errorf("field selector not supported yet") } @@ -61,7 +62,7 @@ func (s *storage) ListReplicaSets(ctx genericapirequest.Context, options *api.Li return obj.(*extensions.ReplicaSetList), err } -func (s *storage) WatchReplicaSets(ctx genericapirequest.Context, options *api.ListOptions) (watch.Interface, error) { +func (s *storage) WatchReplicaSets(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (watch.Interface, error) { return s.Watch(ctx, options) } diff --git a/vendor/k8s.io/kubernetes/pkg/registry/extensions/replicaset/storage/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/extensions/replicaset/storage/BUILD index 9e67e767..bf457621 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/extensions/replicaset/storage/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/extensions/replicaset/storage/BUILD @@ -16,17 +16,17 @@ go_test( deps = [ "//pkg/api:go_default_library", "//pkg/apis/extensions:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", - "//pkg/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/registry/registrytest:go_default_library", "//pkg/storage/etcd/testing:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/diff", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) @@ -35,17 +35,16 @@ go_library( srcs = ["storage.go"], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//pkg/apis/extensions:go_default_library", "//pkg/apis/extensions/validation:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic/registry:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/registry/extensions/replicaset:go_default_library", - "//pkg/registry/generic:go_default_library", - "//pkg/registry/generic/registry:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/extensions/replicaset/storage/storage.go b/vendor/k8s.io/kubernetes/pkg/registry/extensions/replicaset/storage/storage.go index 67474a29..366d0fb2 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/extensions/replicaset/storage/storage.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/extensions/replicaset/storage/storage.go @@ -24,14 +24,13 @@ import ( "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - genericapirequest "k8s.io/apiserver/pkg/request" - "k8s.io/kubernetes/pkg/api" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/apis/extensions" extvalidation "k8s.io/kubernetes/pkg/apis/extensions/validation" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + genericregistry "k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" "k8s.io/kubernetes/pkg/registry/extensions/replicaset" - "k8s.io/kubernetes/pkg/registry/generic" - genericregistry "k8s.io/kubernetes/pkg/registry/generic/registry" ) // ReplicaSetStorage includes dummy storage for ReplicaSets and for Scale subresource. @@ -169,7 +168,7 @@ func (r *ScaleREST) Update(ctx genericapirequest.Context, name string, objInfo r func scaleFromReplicaSet(rs *extensions.ReplicaSet) (*extensions.Scale, error) { return &extensions.Scale{ // TODO: Create a variant of ObjectMeta type that only contains the fields below. - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: rs.Name, Namespace: rs.Namespace, UID: rs.UID, diff --git a/vendor/k8s.io/kubernetes/pkg/registry/extensions/replicaset/storage/storage_test.go b/vendor/k8s.io/kubernetes/pkg/registry/extensions/replicaset/storage/storage_test.go index 8f82b227..7a5c9e3a 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/extensions/replicaset/storage/storage_test.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/extensions/replicaset/storage/storage_test.go @@ -21,15 +21,15 @@ import ( "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/diff" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/extensions" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" - "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" "k8s.io/kubernetes/pkg/registry/registrytest" etcdtesting "k8s.io/kubernetes/pkg/storage/etcd/testing" ) @@ -56,22 +56,23 @@ func createReplicaSet(storage *REST, rs extensions.ReplicaSet, t *testing.T) (ex func validNewReplicaSet() *extensions.ReplicaSet { return &extensions.ReplicaSet{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, Spec: extensions.ReplicaSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"a": "b"}}, Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"a": "b"}, }, Spec: api.PodSpec{ Containers: []api.Container{ { - Name: "test", - Image: "test_image", - ImagePullPolicy: api.PullIfNotPresent, + Name: "test", + Image: "test_image", + ImagePullPolicy: api.PullIfNotPresent, + TerminationMessagePolicy: api.TerminationMessageReadFile, }, }, RestartPolicy: api.RestartPolicyAlways, @@ -94,7 +95,7 @@ func TestCreate(t *testing.T) { defer storage.ReplicaSet.Store.DestroyFunc() test := registrytest.New(t, storage.ReplicaSet.Store) rs := validNewReplicaSet() - rs.ObjectMeta = api.ObjectMeta{} + rs.ObjectMeta = metav1.ObjectMeta{} test.TestCreate( // valid rs, @@ -253,16 +254,16 @@ func TestScaleGet(t *testing.T) { name := "foo" var rs extensions.ReplicaSet - ctx := genericapirequest.WithNamespace(genericapirequest.NewContext(), api.NamespaceDefault) - key := "/replicasets/" + api.NamespaceDefault + "/" + name + ctx := genericapirequest.WithNamespace(genericapirequest.NewContext(), metav1.NamespaceDefault) + key := "/replicasets/" + metav1.NamespaceDefault + "/" + name if err := storage.ReplicaSet.Storage.Create(ctx, key, &validReplicaSet, &rs, 0); err != nil { t.Fatalf("error setting new replica set (key: %s) %v: %v", key, validReplicaSet, err) } want := &extensions.Scale{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, UID: rs.UID, ResourceVersion: rs.ResourceVersion, CreationTimestamp: rs.CreationTimestamp, @@ -293,16 +294,16 @@ func TestScaleUpdate(t *testing.T) { name := "foo" var rs extensions.ReplicaSet - ctx := genericapirequest.WithNamespace(genericapirequest.NewContext(), api.NamespaceDefault) - key := "/replicasets/" + api.NamespaceDefault + "/" + name + ctx := genericapirequest.WithNamespace(genericapirequest.NewContext(), metav1.NamespaceDefault) + key := "/replicasets/" + metav1.NamespaceDefault + "/" + name if err := storage.ReplicaSet.Storage.Create(ctx, key, &validReplicaSet, &rs, 0); err != nil { t.Fatalf("error setting new replica set (key: %s) %v: %v", key, validReplicaSet, err) } replicas := 12 update := extensions.Scale{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, Spec: extensions.ScaleSpec{ Replicas: int32(replicas), @@ -335,8 +336,8 @@ func TestStatusUpdate(t *testing.T) { defer server.Terminate(t) defer storage.ReplicaSet.Store.DestroyFunc() - ctx := genericapirequest.WithNamespace(genericapirequest.NewContext(), api.NamespaceDefault) - key := "/replicasets/" + api.NamespaceDefault + "/foo" + ctx := genericapirequest.WithNamespace(genericapirequest.NewContext(), metav1.NamespaceDefault) + key := "/replicasets/" + metav1.NamespaceDefault + "/foo" if err := storage.ReplicaSet.Storage.Create(ctx, key, &validReplicaSet, nil, 0); err != nil { t.Fatalf("unexpected error: %v", err) } diff --git a/vendor/k8s.io/kubernetes/pkg/registry/extensions/replicaset/strategy.go b/vendor/k8s.io/kubernetes/pkg/registry/extensions/replicaset/strategy.go index c9acce1f..b1036cc5 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/extensions/replicaset/strategy.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/extensions/replicaset/strategy.go @@ -23,17 +23,17 @@ import ( "reflect" "strconv" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/validation/field" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/storage/names" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/extensions" "k8s.io/kubernetes/pkg/apis/extensions/validation" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" - "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" apistorage "k8s.io/kubernetes/pkg/storage" ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/extensions/replicaset/strategy_test.go b/vendor/k8s.io/kubernetes/pkg/registry/extensions/replicaset/strategy_test.go index ac780300..8e9ea6ec 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/extensions/replicaset/strategy_test.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/extensions/replicaset/strategy_test.go @@ -20,7 +20,7 @@ import ( "testing" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/extensions" ) @@ -37,18 +37,18 @@ func TestReplicaSetStrategy(t *testing.T) { validSelector := map[string]string{"a": "b"} validPodTemplate := api.PodTemplate{ Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validSelector, }, Spec: api.PodSpec{ RestartPolicy: api.RestartPolicyAlways, DNSPolicy: api.DNSClusterFirst, - Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent"}}, + Containers: []api.Container{{Name: "abc", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: api.TerminationMessageReadFile}}, }, }, } rs := &extensions.ReplicaSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: extensions.ReplicaSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validSelector}, Template: validPodTemplate.Template, @@ -72,7 +72,7 @@ func TestReplicaSetStrategy(t *testing.T) { } invalidRc := &extensions.ReplicaSet{ - ObjectMeta: api.ObjectMeta{Name: "bar", ResourceVersion: "4"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar", ResourceVersion: "4"}, } Strategy.PrepareForUpdate(ctx, invalidRc, rs) errs = Strategy.ValidateUpdate(ctx, invalidRc, rs) @@ -95,7 +95,7 @@ func TestReplicaSetStatusStrategy(t *testing.T) { validSelector := map[string]string{"a": "b"} validPodTemplate := api.PodTemplate{ Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: validSelector, }, Spec: api.PodSpec{ @@ -106,7 +106,7 @@ func TestReplicaSetStatusStrategy(t *testing.T) { }, } oldRS := &extensions.ReplicaSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault, ResourceVersion: "10"}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault, ResourceVersion: "10"}, Spec: extensions.ReplicaSetSpec{ Replicas: 3, Selector: &metav1.LabelSelector{MatchLabels: validSelector}, @@ -118,7 +118,7 @@ func TestReplicaSetStatusStrategy(t *testing.T) { }, } newRS := &extensions.ReplicaSet{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault, ResourceVersion: "9"}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault, ResourceVersion: "9"}, Spec: extensions.ReplicaSetSpec{ Replicas: 1, Selector: &metav1.LabelSelector{MatchLabels: validSelector}, diff --git a/vendor/k8s.io/kubernetes/pkg/registry/extensions/rest/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/extensions/rest/BUILD index 677c5c3d..bba146e5 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/extensions/rest/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/extensions/rest/BUILD @@ -16,12 +16,12 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//pkg/apis/extensions:go_default_library", "//pkg/apis/extensions/v1beta1:go_default_library", "//pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion:go_default_library", - "//pkg/genericapiserver:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", + "//pkg/genericapiserver/server:go_default_library", "//pkg/registry/autoscaling/horizontalpodautoscaler/storage:go_default_library", "//pkg/registry/batch/job/storage:go_default_library", "//pkg/registry/extensions/controller/storage:go_default_library", @@ -33,8 +33,8 @@ go_library( "//pkg/registry/extensions/replicaset/storage:go_default_library", "//pkg/registry/extensions/thirdpartyresource/storage:go_default_library", "//pkg/registry/extensions/thirdpartyresourcedata:go_default_library", - "//pkg/registry/generic:go_default_library", "//vendor:github.com/golang/glog", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/runtime", "//vendor:k8s.io/apimachinery/pkg/util/sets", @@ -48,9 +48,9 @@ go_test( library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//pkg/apis/extensions:go_default_library", "//pkg/registry/extensions/thirdpartyresourcedata:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/util/sets", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/extensions/rest/storage_extensions.go b/vendor/k8s.io/kubernetes/pkg/registry/extensions/rest/storage_extensions.go index fb91da29..d5e121d8 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/extensions/rest/storage_extensions.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/extensions/rest/storage_extensions.go @@ -27,8 +27,9 @@ import ( "k8s.io/kubernetes/pkg/apis/extensions" extensionsapiv1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" extensionsclient "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion" - "k8s.io/kubernetes/pkg/genericapiserver" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" + genericapiserver "k8s.io/kubernetes/pkg/genericapiserver/server" horizontalpodautoscalerstore "k8s.io/kubernetes/pkg/registry/autoscaling/horizontalpodautoscaler/storage" jobstore "k8s.io/kubernetes/pkg/registry/batch/job/storage" expcontrollerstore "k8s.io/kubernetes/pkg/registry/extensions/controller/storage" @@ -39,7 +40,6 @@ import ( pspstore "k8s.io/kubernetes/pkg/registry/extensions/podsecuritypolicy/storage" replicasetstore "k8s.io/kubernetes/pkg/registry/extensions/replicaset/storage" thirdpartyresourcestore "k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresource/storage" - "k8s.io/kubernetes/pkg/registry/generic" ) type RESTStorageProvider struct { diff --git a/vendor/k8s.io/kubernetes/pkg/registry/extensions/rest/thirdparty_controller.go b/vendor/k8s.io/kubernetes/pkg/registry/extensions/rest/thirdparty_controller.go index 6ac62014..2db39b23 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/extensions/rest/thirdparty_controller.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/extensions/rest/thirdparty_controller.go @@ -20,9 +20,9 @@ import ( "fmt" "strings" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/extensions" extensionsclient "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion" "k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresourcedata" @@ -68,7 +68,7 @@ func (t *ThirdPartyController) SyncOneResource(rsrc *extensions.ThirdPartyResour // Synchronize all resources with RESTful resources on the master func (t *ThirdPartyController) SyncResources() error { - list, err := t.client.ThirdPartyResources().List(api.ListOptions{}) + list, err := t.client.ThirdPartyResources().List(metav1.ListOptions{}) if err != nil { return err } diff --git a/vendor/k8s.io/kubernetes/pkg/registry/extensions/rest/thirdparty_controller_test.go b/vendor/k8s.io/kubernetes/pkg/registry/extensions/rest/thirdparty_controller_test.go index cb974ddf..74c07810 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/extensions/rest/thirdparty_controller_test.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/extensions/rest/thirdparty_controller_test.go @@ -19,8 +19,8 @@ package rest import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/kubernetes/pkg/api" expapi "k8s.io/kubernetes/pkg/apis/extensions" "k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresourcedata" ) @@ -66,7 +66,7 @@ func TestSyncAPIs(t *testing.T) { resourcesNamed := func(names ...string) []expapi.ThirdPartyResource { result := []expapi.ThirdPartyResource{} for _, name := range names { - result = append(result, expapi.ThirdPartyResource{ObjectMeta: api.ObjectMeta{Name: name}}) + result = append(result, expapi.ThirdPartyResource{ObjectMeta: metav1.ObjectMeta{Name: name}}) } return result } diff --git a/vendor/k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresource/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresource/BUILD index 305ce746..0816cd61 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresource/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresource/BUILD @@ -19,13 +19,13 @@ go_library( "//pkg/api:go_default_library", "//pkg/apis/extensions:go_default_library", "//pkg/apis/extensions/validation:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/storage:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/validation/field", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresource/storage/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresource/storage/BUILD index a3e4c3cb..5aa98ef8 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresource/storage/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresource/storage/BUILD @@ -14,13 +14,13 @@ go_test( library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//pkg/apis/extensions:go_default_library", "//pkg/apis/extensions/v1beta1:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", "//pkg/registry/registrytest:go_default_library", "//pkg/storage/etcd/testing:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", ], @@ -32,9 +32,9 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/apis/extensions:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic/registry:go_default_library", "//pkg/registry/extensions/thirdpartyresource:go_default_library", - "//pkg/registry/generic:go_default_library", - "//pkg/registry/generic/registry:go_default_library", "//vendor:k8s.io/apimachinery/pkg/runtime", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresource/storage/storage.go b/vendor/k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresource/storage/storage.go index 8329614e..93a42436 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresource/storage/storage.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresource/storage/storage.go @@ -19,9 +19,9 @@ package storage import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/apis/extensions" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + genericregistry "k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry" "k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresource" - "k8s.io/kubernetes/pkg/registry/generic" - genericregistry "k8s.io/kubernetes/pkg/registry/generic/registry" ) // REST implements a RESTStorage for ThirdPartyResources diff --git a/vendor/k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresource/storage/storage_test.go b/vendor/k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresource/storage/storage_test.go index 4785c85b..c861847b 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresource/storage/storage_test.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresource/storage/storage_test.go @@ -20,14 +20,14 @@ import ( "fmt" "testing" - "k8s.io/kubernetes/pkg/api" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/apis/extensions" // Ensure that extensions/v1beta1 package is initialized. + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" _ "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" "k8s.io/kubernetes/pkg/registry/registrytest" etcdtesting "k8s.io/kubernetes/pkg/storage/etcd/testing" ) @@ -45,7 +45,7 @@ func newStorage(t *testing.T) (*REST, *etcdtesting.EtcdTestServer) { func validNewThirdPartyResource(name string) *extensions.ThirdPartyResource { return &extensions.ThirdPartyResource{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Versions: []extensions.APIVersion{ @@ -71,10 +71,10 @@ func TestCreate(t *testing.T) { rsrc, // invalid &extensions.ThirdPartyResource{}, - &extensions.ThirdPartyResource{ObjectMeta: api.ObjectMeta{Name: "kind"}, Versions: []extensions.APIVersion{{Name: "v1"}}}, - &extensions.ThirdPartyResource{ObjectMeta: api.ObjectMeta{Name: "kind.tld"}, Versions: []extensions.APIVersion{{Name: "v1"}}}, - &extensions.ThirdPartyResource{ObjectMeta: api.ObjectMeta{Name: "kind.domain.tld"}, Versions: []extensions.APIVersion{{Name: "v.1"}}}, - &extensions.ThirdPartyResource{ObjectMeta: api.ObjectMeta{Name: "kind.domain.tld"}, Versions: []extensions.APIVersion{{Name: "stable/v1"}}}, + &extensions.ThirdPartyResource{ObjectMeta: metav1.ObjectMeta{Name: "kind"}, Versions: []extensions.APIVersion{{Name: "v1"}}}, + &extensions.ThirdPartyResource{ObjectMeta: metav1.ObjectMeta{Name: "kind.tld"}, Versions: []extensions.APIVersion{{Name: "v1"}}}, + &extensions.ThirdPartyResource{ObjectMeta: metav1.ObjectMeta{Name: "kind.domain.tld"}, Versions: []extensions.APIVersion{{Name: "v.1"}}}, + &extensions.ThirdPartyResource{ObjectMeta: metav1.ObjectMeta{Name: "kind.domain.tld"}, Versions: []extensions.APIVersion{{Name: "stable/v1"}}}, ) } diff --git a/vendor/k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresource/strategy.go b/vendor/k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresource/strategy.go index 7da966ca..bedc748d 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresource/strategy.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresource/strategy.go @@ -19,15 +19,15 @@ package thirdpartyresource import ( "fmt" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/validation/field" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/extensions" "k8s.io/kubernetes/pkg/apis/extensions/validation" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" "k8s.io/kubernetes/pkg/storage" ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresourcedata/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresourcedata/BUILD index 613472e7..21f8e452 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresourcedata/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresourcedata/BUILD @@ -25,18 +25,19 @@ go_library( "//pkg/apis/extensions:go_default_library", "//pkg/apis/extensions/v1beta1:go_default_library", "//pkg/apis/extensions/validation:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/storage:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/meta", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/internalversion", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/util/validation/field", "//vendor:k8s.io/apimachinery/pkg/util/yaml", "//vendor:k8s.io/apimachinery/pkg/watch", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", "//vendor:k8s.io/apiserver/pkg/storage/names", ], ) @@ -54,7 +55,6 @@ go_test( "//pkg/api:go_default_library", "//pkg/api/testapi:go_default_library", "//pkg/api/testing:go_default_library", - "//pkg/api/v1:go_default_library", "//pkg/apis/extensions:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", diff --git a/vendor/k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresourcedata/codec.go b/vendor/k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresourcedata/codec.go index 52210bb4..514d6bac 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresourcedata/codec.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresourcedata/codec.go @@ -479,13 +479,7 @@ func encodeToJSON(obj *extensions.ThirdPartyResourceData, stream io.Writer) erro return fmt.Errorf("unexpected type: %v", objOut) } - // Convert to a serializable type - versionedObjectMeta := &v1.ObjectMeta{} - if err := v1.Convert_api_ObjectMeta_To_v1_ObjectMeta(&obj.ObjectMeta, versionedObjectMeta, nil); err != nil { - return err - } - - objMap["metadata"] = versionedObjectMeta + objMap["metadata"] = &obj.ObjectMeta encoder := json.NewEncoder(stream) return encoder.Encode(objMap) } diff --git a/vendor/k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresourcedata/codec_test.go b/vendor/k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresourcedata/codec_test.go index 92afcd8c..742f8a0b 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresourcedata/codec_test.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresourcedata/codec_test.go @@ -28,13 +28,12 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" - "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/apis/extensions" ) type Foo struct { - metav1.TypeMeta `json:",inline"` - api.ObjectMeta `json:"metadata,omitempty" description:"standard object metadata"` + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty" description:"standard object metadata"` SomeField string `json:"someField"` OtherField int `json:"otherField"` @@ -61,20 +60,20 @@ func TestCodec(t *testing.T) { { into: &runtime.VersionedObjects{}, obj: &Foo{ - ObjectMeta: api.ObjectMeta{Name: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar"}, TypeMeta: metav1.TypeMeta{APIVersion: "company.com/v1", Kind: "Foo"}, }, expectErr: false, name: "versioned objects list", }, { - obj: &Foo{ObjectMeta: api.ObjectMeta{Name: "bar"}}, + obj: &Foo{ObjectMeta: metav1.ObjectMeta{Name: "bar"}}, expectErr: true, name: "missing kind", }, { obj: &Foo{ - ObjectMeta: api.ObjectMeta{Name: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar"}, TypeMeta: metav1.TypeMeta{APIVersion: "company.com/v1", Kind: "Foo"}, }, name: "basic", @@ -82,7 +81,7 @@ func TestCodec(t *testing.T) { { into: &extensions.ThirdPartyResourceData{}, obj: &Foo{ - ObjectMeta: api.ObjectMeta{Name: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar"}, TypeMeta: metav1.TypeMeta{Kind: "ThirdPartyResourceData"}, }, expectErr: true, @@ -90,14 +89,14 @@ func TestCodec(t *testing.T) { }, { obj: &Foo{ - ObjectMeta: api.ObjectMeta{Name: "bar", ResourceVersion: "baz"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar", ResourceVersion: "baz"}, TypeMeta: metav1.TypeMeta{APIVersion: "company.com/v1", Kind: "Foo"}, }, name: "resource version", }, { obj: &Foo{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "bar", CreationTimestamp: metav1.Time{Time: time.Unix(100, 0)}, }, @@ -110,7 +109,7 @@ func TestCodec(t *testing.T) { }, { obj: &Foo{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "bar", ResourceVersion: "baz", Labels: map[string]string{"foo": "bar", "baz": "blah"}, @@ -211,7 +210,7 @@ func TestCreater(t *testing.T) { { name: "valid ListOptions creation", kind: schema.GroupVersionKind{Version: "v1", Kind: "ListOptions"}, - expectedObj: &v1.ListOptions{}, + expectedObj: &metav1.ListOptions{}, expectErr: false, }, } diff --git a/vendor/k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresourcedata/registry.go b/vendor/k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresourcedata/registry.go index 1c8decba..0e94a359 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresourcedata/registry.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresourcedata/registry.go @@ -17,18 +17,19 @@ limitations under the License. package thirdpartyresourcedata import ( + metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/watch" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/extensions" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" ) // Registry is an interface implemented by things that know how to store ThirdPartyResourceData objects. type Registry interface { - ListThirdPartyResourceData(ctx genericapirequest.Context, options *api.ListOptions) (*extensions.ThirdPartyResourceDataList, error) - WatchThirdPartyResourceData(ctx genericapirequest.Context, options *api.ListOptions) (watch.Interface, error) + ListThirdPartyResourceData(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (*extensions.ThirdPartyResourceDataList, error) + WatchThirdPartyResourceData(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (watch.Interface, error) GetThirdPartyResourceData(ctx genericapirequest.Context, name string, options *metav1.GetOptions) (*extensions.ThirdPartyResourceData, error) CreateThirdPartyResourceData(ctx genericapirequest.Context, resource *extensions.ThirdPartyResourceData) (*extensions.ThirdPartyResourceData, error) UpdateThirdPartyResourceData(ctx genericapirequest.Context, resource *extensions.ThirdPartyResourceData) (*extensions.ThirdPartyResourceData, error) @@ -46,7 +47,7 @@ func NewRegistry(s rest.StandardStorage) Registry { return &storage{s} } -func (s *storage) ListThirdPartyResourceData(ctx genericapirequest.Context, options *api.ListOptions) (*extensions.ThirdPartyResourceDataList, error) { +func (s *storage) ListThirdPartyResourceData(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (*extensions.ThirdPartyResourceDataList, error) { obj, err := s.List(ctx, options) if err != nil { return nil, err @@ -54,7 +55,7 @@ func (s *storage) ListThirdPartyResourceData(ctx genericapirequest.Context, opti return obj.(*extensions.ThirdPartyResourceDataList), nil } -func (s *storage) WatchThirdPartyResourceData(ctx genericapirequest.Context, options *api.ListOptions) (watch.Interface, error) { +func (s *storage) WatchThirdPartyResourceData(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (watch.Interface, error) { return s.Watch(ctx, options) } diff --git a/vendor/k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresourcedata/storage/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresourcedata/storage/BUILD index f84bd224..9e373429 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresourcedata/storage/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresourcedata/storage/BUILD @@ -14,13 +14,13 @@ go_test( library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//pkg/apis/extensions:go_default_library", "//pkg/apis/extensions/v1beta1:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", "//pkg/registry/registrytest:go_default_library", "//pkg/storage/etcd/testing:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", ], @@ -32,9 +32,9 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/apis/extensions:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic/registry:go_default_library", "//pkg/registry/extensions/thirdpartyresourcedata:go_default_library", - "//pkg/registry/generic:go_default_library", - "//pkg/registry/generic/registry:go_default_library", "//vendor:k8s.io/apimachinery/pkg/runtime", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresourcedata/storage/storage.go b/vendor/k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresourcedata/storage/storage.go index b094abb6..3eb8963b 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresourcedata/storage/storage.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresourcedata/storage/storage.go @@ -21,9 +21,9 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/apis/extensions" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + genericregistry "k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry" "k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresourcedata" - "k8s.io/kubernetes/pkg/registry/generic" - genericregistry "k8s.io/kubernetes/pkg/registry/generic/registry" ) // REST implements a RESTStorage for ThirdPartyResourceData diff --git a/vendor/k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresourcedata/storage/storage_test.go b/vendor/k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresourcedata/storage/storage_test.go index 9b5ed242..21a88818 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresourcedata/storage/storage_test.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresourcedata/storage/storage_test.go @@ -19,14 +19,14 @@ package storage import ( "testing" - "k8s.io/kubernetes/pkg/api" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/apis/extensions" // Ensure that extensions/v1beta1 package is initialized. + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" _ "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" "k8s.io/kubernetes/pkg/registry/registrytest" etcdtesting "k8s.io/kubernetes/pkg/storage/etcd/testing" ) @@ -39,9 +39,9 @@ func newStorage(t *testing.T) (*REST, *etcdtesting.EtcdTestServer) { func validNewThirdPartyResourceData(name string) *extensions.ThirdPartyResourceData { return &extensions.ThirdPartyResourceData{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, Data: []byte("foobarbaz"), } @@ -53,7 +53,7 @@ func TestCreate(t *testing.T) { defer storage.Store.DestroyFunc() test := registrytest.New(t, storage.Store) rsrc := validNewThirdPartyResourceData("foo") - rsrc.ObjectMeta = api.ObjectMeta{} + rsrc.ObjectMeta = metav1.ObjectMeta{} test.TestCreate( // valid rsrc, diff --git a/vendor/k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresourcedata/strategy.go b/vendor/k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresourcedata/strategy.go index 7546bc43..7d12a966 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresourcedata/strategy.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresourcedata/strategy.go @@ -19,16 +19,16 @@ package thirdpartyresourcedata import ( "fmt" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/validation/field" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/storage/names" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/extensions" "k8s.io/kubernetes/pkg/apis/extensions/validation" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" apistorage "k8s.io/kubernetes/pkg/storage" ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresourcedata/util_test.go b/vendor/k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresourcedata/util_test.go index c0cd4c1a..025cb55f 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresourcedata/util_test.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/extensions/thirdpartyresourcedata/util_test.go @@ -19,7 +19,7 @@ package thirdpartyresourcedata import ( "testing" - "k8s.io/kubernetes/pkg/api" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/apis/extensions" ) @@ -47,7 +47,7 @@ func TestExtractAPIGroupAndKind(t *testing.T) { } for _, test := range tests { - kind, group, err := ExtractApiGroupAndKind(&extensions.ThirdPartyResource{ObjectMeta: api.ObjectMeta{Name: test.input}}) + kind, group, err := ExtractApiGroupAndKind(&extensions.ThirdPartyResource{ObjectMeta: metav1.ObjectMeta{Name: test.input}}) if err != nil && !test.expectErr { t.Errorf("unexpected error: %v", err) continue diff --git a/vendor/k8s.io/kubernetes/pkg/registry/policy/poddisruptionbudget/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/policy/poddisruptionbudget/BUILD index 525923c0..547817a6 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/policy/poddisruptionbudget/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/policy/poddisruptionbudget/BUILD @@ -19,13 +19,13 @@ go_library( "//pkg/api:go_default_library", "//pkg/apis/policy:go_default_library", "//pkg/apis/policy/validation:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", "//pkg/storage:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/validation/field", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", "//vendor:k8s.io/apiserver/pkg/storage/names", ], ) @@ -36,11 +36,10 @@ go_test( library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//pkg/apis/policy:go_default_library", "//pkg/util/intstr:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/policy/poddisruptionbudget/storage/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/policy/poddisruptionbudget/storage/BUILD index 4196fb51..46e88032 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/policy/poddisruptionbudget/storage/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/policy/poddisruptionbudget/storage/BUILD @@ -16,15 +16,15 @@ go_test( deps = [ "//pkg/api:go_default_library", "//pkg/apis/policy:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", - "//pkg/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/registry/registrytest:go_default_library", "//pkg/storage/etcd/testing:go_default_library", "//pkg/util/intstr:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) @@ -34,13 +34,13 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/apis/policy:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", - "//pkg/registry/generic:go_default_library", - "//pkg/registry/generic/registry:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic/registry:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/registry/policy/poddisruptionbudget:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/policy/poddisruptionbudget/storage/storage.go b/vendor/k8s.io/kubernetes/pkg/registry/policy/poddisruptionbudget/storage/storage.go index f4764e7a..a8877143 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/policy/poddisruptionbudget/storage/storage.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/policy/poddisruptionbudget/storage/storage.go @@ -19,11 +19,11 @@ package storage import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" policyapi "k8s.io/kubernetes/pkg/apis/policy" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" - "k8s.io/kubernetes/pkg/registry/generic" - genericregistry "k8s.io/kubernetes/pkg/registry/generic/registry" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + genericregistry "k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" "k8s.io/kubernetes/pkg/registry/policy/poddisruptionbudget" ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/policy/poddisruptionbudget/storage/storage_test.go b/vendor/k8s.io/kubernetes/pkg/registry/policy/poddisruptionbudget/storage/storage_test.go index 3c96f865..16801ffb 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/policy/poddisruptionbudget/storage/storage_test.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/policy/poddisruptionbudget/storage/storage_test.go @@ -20,13 +20,13 @@ import ( "testing" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/policy" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" - "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" "k8s.io/kubernetes/pkg/registry/registrytest" etcdtesting "k8s.io/kubernetes/pkg/storage/etcd/testing" "k8s.io/kubernetes/pkg/util/intstr" @@ -52,9 +52,9 @@ func createPodDisruptionBudget(storage *REST, pdb policy.PodDisruptionBudget, t func validNewPodDisruptionBudget() *policy.PodDisruptionBudget { return &policy.PodDisruptionBudget{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", - Namespace: api.NamespaceDefault, + Namespace: metav1.NamespaceDefault, Labels: map[string]string{"a": "b"}, }, Spec: policy.PodDisruptionBudgetSpec{ @@ -71,7 +71,7 @@ func TestCreate(t *testing.T) { defer storage.Store.DestroyFunc() test := registrytest.New(t, storage.Store) pdb := validNewPodDisruptionBudget() - pdb.ObjectMeta = api.ObjectMeta{} + pdb.ObjectMeta = metav1.ObjectMeta{} test.TestCreate( // valid pdb, @@ -85,8 +85,8 @@ func TestStatusUpdate(t *testing.T) { storage, statusStorage, server := newStorage(t) defer server.Terminate(t) defer storage.Store.DestroyFunc() - ctx := genericapirequest.WithNamespace(genericapirequest.NewContext(), api.NamespaceDefault) - key := "/poddisruptionbudgets/" + api.NamespaceDefault + "/foo" + ctx := genericapirequest.WithNamespace(genericapirequest.NewContext(), metav1.NamespaceDefault) + key := "/poddisruptionbudgets/" + metav1.NamespaceDefault + "/foo" validPodDisruptionBudget := validNewPodDisruptionBudget() if err := storage.Storage.Create(ctx, key, validPodDisruptionBudget, nil, 0); err != nil { t.Fatalf("unexpected error: %v", err) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/policy/poddisruptionbudget/strategy.go b/vendor/k8s.io/kubernetes/pkg/registry/policy/poddisruptionbudget/strategy.go index 4dd73d3e..fc670ebe 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/policy/poddisruptionbudget/strategy.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/policy/poddisruptionbudget/strategy.go @@ -20,16 +20,16 @@ import ( "fmt" "reflect" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/validation/field" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/storage/names" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/policy" "k8s.io/kubernetes/pkg/apis/policy/validation" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" "k8s.io/kubernetes/pkg/storage" ) @@ -65,7 +65,7 @@ func (podDisruptionBudgetStrategy) PrepareForUpdate(ctx genericapirequest.Contex // Any changes to the spec increment the generation number, any changes to the // status should reflect the generation number of the corresponding object. - // See api.ObjectMeta description for more information on Generation. + // See metav1.ObjectMeta description for more information on Generation. if !reflect.DeepEqual(oldPodDisruptionBudget.Spec, newPodDisruptionBudget.Spec) { newPodDisruptionBudget.Generation = oldPodDisruptionBudget.Generation + 1 } diff --git a/vendor/k8s.io/kubernetes/pkg/registry/policy/poddisruptionbudget/strategy_test.go b/vendor/k8s.io/kubernetes/pkg/registry/policy/poddisruptionbudget/strategy_test.go index 13dc1712..f535eab2 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/policy/poddisruptionbudget/strategy_test.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/policy/poddisruptionbudget/strategy_test.go @@ -20,8 +20,7 @@ import ( "testing" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - genericapirequest "k8s.io/apiserver/pkg/request" - "k8s.io/kubernetes/pkg/api" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/apis/policy" "k8s.io/kubernetes/pkg/util/intstr" ) @@ -37,7 +36,7 @@ func TestPodDisruptionBudgetStrategy(t *testing.T) { validSelector := map[string]string{"a": "b"} pdb := &policy.PodDisruptionBudget{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault}, Spec: policy.PodDisruptionBudgetSpec{ MinAvailable: intstr.FromInt(3), Selector: &metav1.LabelSelector{MatchLabels: validSelector}, @@ -51,7 +50,7 @@ func TestPodDisruptionBudgetStrategy(t *testing.T) { } newPdb := &policy.PodDisruptionBudget{ - ObjectMeta: api.ObjectMeta{Name: pdb.Name, Namespace: pdb.Namespace}, + ObjectMeta: metav1.ObjectMeta{Name: pdb.Name, Namespace: pdb.Namespace}, Spec: pdb.Spec, Status: policy.PodDisruptionBudgetStatus{ PodDisruptionsAllowed: 1, @@ -96,7 +95,7 @@ func TestPodDisruptionBudgetStatusStrategy(t *testing.T) { } validSelector := map[string]string{"a": "b"} oldPdb := &policy.PodDisruptionBudget{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault, ResourceVersion: "10"}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault, ResourceVersion: "10"}, Spec: policy.PodDisruptionBudgetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validSelector}, MinAvailable: intstr.FromInt(3), @@ -109,7 +108,7 @@ func TestPodDisruptionBudgetStatusStrategy(t *testing.T) { }, } newPdb := &policy.PodDisruptionBudget{ - ObjectMeta: api.ObjectMeta{Name: "abc", Namespace: api.NamespaceDefault, ResourceVersion: "9"}, + ObjectMeta: metav1.ObjectMeta{Name: "abc", Namespace: metav1.NamespaceDefault, ResourceVersion: "9"}, Spec: policy.PodDisruptionBudgetSpec{ Selector: &metav1.LabelSelector{MatchLabels: validSelector}, MinAvailable: intstr.FromInt(2), diff --git a/vendor/k8s.io/kubernetes/pkg/registry/policy/rest/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/policy/rest/BUILD index dd6c2eea..855ffcce 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/policy/rest/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/policy/rest/BUILD @@ -14,9 +14,9 @@ go_library( deps = [ "//pkg/apis/policy:go_default_library", "//pkg/apis/policy/v1beta1:go_default_library", - "//pkg/genericapiserver:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", - "//pkg/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", + "//pkg/genericapiserver/server:go_default_library", "//pkg/registry/policy/poddisruptionbudget/storage:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/policy/rest/storage_policy.go b/vendor/k8s.io/kubernetes/pkg/registry/policy/rest/storage_policy.go index 073ea343..2a434065 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/policy/rest/storage_policy.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/policy/rest/storage_policy.go @@ -19,9 +19,9 @@ package rest import ( "k8s.io/kubernetes/pkg/apis/policy" policyapiv1beta1 "k8s.io/kubernetes/pkg/apis/policy/v1beta1" - "k8s.io/kubernetes/pkg/genericapiserver" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" - "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" + genericapiserver "k8s.io/kubernetes/pkg/genericapiserver/server" poddisruptionbudgetstore "k8s.io/kubernetes/pkg/registry/policy/poddisruptionbudget/storage" ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/rbac/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/rbac/BUILD index cd5c3daa..1a772340 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/rbac/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/rbac/BUILD @@ -16,7 +16,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/util/runtime", "//vendor:k8s.io/apiserver/pkg/authentication/user", "//vendor:k8s.io/apiserver/pkg/authorization/authorizer", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrole/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrole/BUILD index e1646e97..8fbda7df 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrole/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrole/BUILD @@ -19,15 +19,16 @@ go_library( "//pkg/api:go_default_library", "//pkg/apis/rbac:go_default_library", "//pkg/apis/rbac/validation:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/storage:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/internalversion", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/validation/field", "//vendor:k8s.io/apimachinery/pkg/watch", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", "//vendor:k8s.io/apiserver/pkg/storage/names", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrole/policybased/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrole/policybased/BUILD index 7aac977d..283641a4 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrole/policybased/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrole/policybased/BUILD @@ -13,12 +13,12 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/apis/rbac:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/registry/rbac:go_default_library", "//pkg/registry/rbac/validation:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/runtime", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrole/policybased/storage.go b/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrole/policybased/storage.go index 4cb234f2..40d56c83 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrole/policybased/storage.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrole/policybased/storage.go @@ -20,9 +20,9 @@ package policybased import ( "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/apis/rbac" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" rbacregistry "k8s.io/kubernetes/pkg/registry/rbac" rbacregistryvalidation "k8s.io/kubernetes/pkg/registry/rbac/validation" ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrole/registry.go b/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrole/registry.go index 984fc162..9285553a 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrole/registry.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrole/registry.go @@ -17,22 +17,23 @@ limitations under the License. package clusterrole import ( + metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/watch" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/rbac" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" ) // Registry is an interface for things that know how to store ClusterRoles. type Registry interface { - ListClusterRoles(ctx genericapirequest.Context, options *api.ListOptions) (*rbac.ClusterRoleList, error) + ListClusterRoles(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (*rbac.ClusterRoleList, error) CreateClusterRole(ctx genericapirequest.Context, clusterRole *rbac.ClusterRole) error UpdateClusterRole(ctx genericapirequest.Context, clusterRole *rbac.ClusterRole) error GetClusterRole(ctx genericapirequest.Context, name string, options *metav1.GetOptions) (*rbac.ClusterRole, error) DeleteClusterRole(ctx genericapirequest.Context, name string) error - WatchClusterRoles(ctx genericapirequest.Context, options *api.ListOptions) (watch.Interface, error) + WatchClusterRoles(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (watch.Interface, error) } // storage puts strong typing around storage calls @@ -46,7 +47,7 @@ func NewRegistry(s rest.StandardStorage) Registry { return &storage{s} } -func (s *storage) ListClusterRoles(ctx genericapirequest.Context, options *api.ListOptions) (*rbac.ClusterRoleList, error) { +func (s *storage) ListClusterRoles(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (*rbac.ClusterRoleList, error) { obj, err := s.List(ctx, options) if err != nil { return nil, err @@ -65,7 +66,7 @@ func (s *storage) UpdateClusterRole(ctx genericapirequest.Context, clusterRole * return err } -func (s *storage) WatchClusterRoles(ctx genericapirequest.Context, options *api.ListOptions) (watch.Interface, error) { +func (s *storage) WatchClusterRoles(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (watch.Interface, error) { return s.Watch(ctx, options) } diff --git a/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrole/storage/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrole/storage/BUILD index 0d4501cb..10f02271 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrole/storage/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrole/storage/BUILD @@ -13,8 +13,8 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/apis/rbac:go_default_library", - "//pkg/registry/generic:go_default_library", - "//pkg/registry/generic/registry:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic/registry:go_default_library", "//pkg/registry/rbac/clusterrole:go_default_library", "//vendor:k8s.io/apimachinery/pkg/runtime", ], diff --git a/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrole/storage/storage.go b/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrole/storage/storage.go index 404c610c..5139775a 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrole/storage/storage.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrole/storage/storage.go @@ -19,8 +19,8 @@ package storage import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/apis/rbac" - "k8s.io/kubernetes/pkg/registry/generic" - genericregistry "k8s.io/kubernetes/pkg/registry/generic/registry" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + genericregistry "k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry" "k8s.io/kubernetes/pkg/registry/rbac/clusterrole" ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrole/strategy.go b/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrole/strategy.go index 79729ee5..cf920d02 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrole/strategy.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrole/strategy.go @@ -19,16 +19,16 @@ package clusterrole import ( "fmt" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/validation/field" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/storage/names" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/rbac" "k8s.io/kubernetes/pkg/apis/rbac/validation" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" apistorage "k8s.io/kubernetes/pkg/storage" ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrolebinding/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrolebinding/BUILD index 5b66fece..0b4475f8 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrolebinding/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrolebinding/BUILD @@ -19,15 +19,16 @@ go_library( "//pkg/api:go_default_library", "//pkg/apis/rbac:go_default_library", "//pkg/apis/rbac/validation:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/storage:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/internalversion", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/validation/field", "//vendor:k8s.io/apimachinery/pkg/watch", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", "//vendor:k8s.io/apiserver/pkg/storage/names", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrolebinding/policybased/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrolebinding/policybased/BUILD index 4d16eb8f..332a2e04 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrolebinding/policybased/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrolebinding/policybased/BUILD @@ -13,13 +13,13 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/apis/rbac:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/registry/rbac:go_default_library", "//pkg/registry/rbac/validation:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apiserver/pkg/authorization/authorizer", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrolebinding/policybased/storage.go b/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrolebinding/policybased/storage.go index 11d7f2dc..8f2aff1f 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrolebinding/policybased/storage.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrolebinding/policybased/storage.go @@ -21,9 +21,9 @@ import ( "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apiserver/pkg/authorization/authorizer" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/apis/rbac" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" rbacregistry "k8s.io/kubernetes/pkg/registry/rbac" rbacregistryvalidation "k8s.io/kubernetes/pkg/registry/rbac/validation" ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrolebinding/registry.go b/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrolebinding/registry.go index 9b338357..ca6cb288 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrolebinding/registry.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrolebinding/registry.go @@ -17,22 +17,23 @@ limitations under the License. package clusterrolebinding import ( + metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/watch" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/rbac" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" ) // Registry is an interface for things that know how to store ClusterRoleBindings. type Registry interface { - ListClusterRoleBindings(ctx genericapirequest.Context, options *api.ListOptions) (*rbac.ClusterRoleBindingList, error) + ListClusterRoleBindings(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (*rbac.ClusterRoleBindingList, error) CreateClusterRoleBinding(ctx genericapirequest.Context, clusterRoleBinding *rbac.ClusterRoleBinding) error UpdateClusterRoleBinding(ctx genericapirequest.Context, clusterRoleBinding *rbac.ClusterRoleBinding) error GetClusterRoleBinding(ctx genericapirequest.Context, name string, options *metav1.GetOptions) (*rbac.ClusterRoleBinding, error) DeleteClusterRoleBinding(ctx genericapirequest.Context, name string) error - WatchClusterRoleBindings(ctx genericapirequest.Context, options *api.ListOptions) (watch.Interface, error) + WatchClusterRoleBindings(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (watch.Interface, error) } // storage puts strong typing around storage calls @@ -46,7 +47,7 @@ func NewRegistry(s rest.StandardStorage) Registry { return &storage{s} } -func (s *storage) ListClusterRoleBindings(ctx genericapirequest.Context, options *api.ListOptions) (*rbac.ClusterRoleBindingList, error) { +func (s *storage) ListClusterRoleBindings(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (*rbac.ClusterRoleBindingList, error) { obj, err := s.List(ctx, options) if err != nil { return nil, err @@ -65,7 +66,7 @@ func (s *storage) UpdateClusterRoleBinding(ctx genericapirequest.Context, cluste return err } -func (s *storage) WatchClusterRoleBindings(ctx genericapirequest.Context, options *api.ListOptions) (watch.Interface, error) { +func (s *storage) WatchClusterRoleBindings(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (watch.Interface, error) { return s.Watch(ctx, options) } @@ -88,7 +89,7 @@ type AuthorizerAdapter struct { } func (a AuthorizerAdapter) ListClusterRoleBindings() ([]*rbac.ClusterRoleBinding, error) { - list, err := a.Registry.ListClusterRoleBindings(genericapirequest.NewContext(), &api.ListOptions{}) + list, err := a.Registry.ListClusterRoleBindings(genericapirequest.NewContext(), &metainternalversion.ListOptions{}) if err != nil { return nil, err } diff --git a/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrolebinding/storage/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrolebinding/storage/BUILD index d86efb3c..443dbde9 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrolebinding/storage/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrolebinding/storage/BUILD @@ -13,8 +13,8 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/apis/rbac:go_default_library", - "//pkg/registry/generic:go_default_library", - "//pkg/registry/generic/registry:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic/registry:go_default_library", "//pkg/registry/rbac/clusterrolebinding:go_default_library", "//vendor:k8s.io/apimachinery/pkg/runtime", ], diff --git a/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrolebinding/storage/storage.go b/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrolebinding/storage/storage.go index 419d0640..6ecee2d6 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrolebinding/storage/storage.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrolebinding/storage/storage.go @@ -19,8 +19,8 @@ package storage import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/apis/rbac" - "k8s.io/kubernetes/pkg/registry/generic" - genericregistry "k8s.io/kubernetes/pkg/registry/generic/registry" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + genericregistry "k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry" "k8s.io/kubernetes/pkg/registry/rbac/clusterrolebinding" ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrolebinding/strategy.go b/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrolebinding/strategy.go index bae25f67..0d7a8c18 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrolebinding/strategy.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/rbac/clusterrolebinding/strategy.go @@ -19,16 +19,16 @@ package clusterrolebinding import ( "fmt" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/validation/field" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/storage/names" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/rbac" "k8s.io/kubernetes/pkg/apis/rbac/validation" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" apistorage "k8s.io/kubernetes/pkg/storage" ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/rbac/escalation_check.go b/vendor/k8s.io/kubernetes/pkg/registry/rbac/escalation_check.go index db493f18..5872504b 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/rbac/escalation_check.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/rbac/escalation_check.go @@ -22,7 +22,7 @@ import ( utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apiserver/pkg/authentication/user" "k8s.io/apiserver/pkg/authorization/authorizer" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/apis/rbac" ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/rbac/rest/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/rbac/rest/BUILD index cc9f09a2..5361dc4b 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/rbac/rest/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/rbac/rest/BUILD @@ -12,13 +12,13 @@ go_library( srcs = ["storage_rbac.go"], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//pkg/apis/rbac:go_default_library", "//pkg/apis/rbac/v1alpha1:go_default_library", + "//pkg/apis/rbac/v1beta1:go_default_library", "//pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion:go_default_library", - "//pkg/genericapiserver:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", - "//pkg/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", + "//pkg/genericapiserver/server:go_default_library", "//pkg/registry/rbac/clusterrole:go_default_library", "//pkg/registry/rbac/clusterrole/policybased:go_default_library", "//pkg/registry/rbac/clusterrole/storage:go_default_library", @@ -34,6 +34,8 @@ go_library( "//pkg/registry/rbac/validation:go_default_library", "//plugin/pkg/auth/authorizer/rbac/bootstrappolicy:go_default_library", "//vendor:github.com/golang/glog", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/util/runtime", "//vendor:k8s.io/apimachinery/pkg/util/wait", "//vendor:k8s.io/apiserver/pkg/authorization/authorizer", diff --git a/vendor/k8s.io/kubernetes/pkg/registry/rbac/rest/storage_rbac.go b/vendor/k8s.io/kubernetes/pkg/registry/rbac/rest/storage_rbac.go index 5cfc90aa..d3df1571 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/rbac/rest/storage_rbac.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/rbac/rest/storage_rbac.go @@ -23,16 +23,18 @@ import ( "github.com/golang/glog" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apiserver/pkg/authorization/authorizer" - "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/rbac" rbacapiv1alpha1 "k8s.io/kubernetes/pkg/apis/rbac/v1alpha1" + rbacapiv1beta1 "k8s.io/kubernetes/pkg/apis/rbac/v1beta1" rbacclient "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion" - "k8s.io/kubernetes/pkg/genericapiserver" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" - "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" + genericapiserver "k8s.io/kubernetes/pkg/genericapiserver/server" "k8s.io/kubernetes/pkg/registry/rbac/clusterrole" clusterrolepolicybased "k8s.io/kubernetes/pkg/registry/rbac/clusterrole/policybased" clusterrolestore "k8s.io/kubernetes/pkg/registry/rbac/clusterrole/storage" @@ -59,16 +61,18 @@ func (p RESTStorageProvider) NewRESTStorage(apiResourceConfigSource genericapise apiGroupInfo := genericapiserver.NewDefaultAPIGroupInfo(rbac.GroupName) if apiResourceConfigSource.AnyResourcesForVersionEnabled(rbacapiv1alpha1.SchemeGroupVersion) { - apiGroupInfo.VersionedResourcesStorageMap[rbacapiv1alpha1.SchemeGroupVersion.Version] = p.v1alpha1Storage(apiResourceConfigSource, restOptionsGetter) + apiGroupInfo.VersionedResourcesStorageMap[rbacapiv1alpha1.SchemeGroupVersion.Version] = p.storage(rbacapiv1alpha1.SchemeGroupVersion, apiResourceConfigSource, restOptionsGetter) apiGroupInfo.GroupMeta.GroupVersion = rbacapiv1alpha1.SchemeGroupVersion } + if apiResourceConfigSource.AnyResourcesForVersionEnabled(rbacapiv1beta1.SchemeGroupVersion) { + apiGroupInfo.VersionedResourcesStorageMap[rbacapiv1beta1.SchemeGroupVersion.Version] = p.storage(rbacapiv1beta1.SchemeGroupVersion, apiResourceConfigSource, restOptionsGetter) + apiGroupInfo.GroupMeta.GroupVersion = rbacapiv1beta1.SchemeGroupVersion + } return apiGroupInfo, true } -func (p RESTStorageProvider) v1alpha1Storage(apiResourceConfigSource genericapiserver.APIResourceConfigSource, restOptionsGetter generic.RESTOptionsGetter) map[string]rest.Storage { - version := rbacapiv1alpha1.SchemeGroupVersion - +func (p RESTStorageProvider) storage(version schema.GroupVersion, apiResourceConfigSource genericapiserver.APIResourceConfigSource, restOptionsGetter generic.RESTOptionsGetter) map[string]rest.Storage { once := new(sync.Once) var ( authorizationRuleResolver rbacregistryvalidation.AuthorizationRuleResolver @@ -128,7 +132,7 @@ func PostStartHook(hookContext genericapiserver.PostStartHookContext) error { return false, nil } - existingClusterRoles, err := clientset.ClusterRoles().List(api.ListOptions{}) + existingClusterRoles, err := clientset.ClusterRoles().List(metav1.ListOptions{}) if err != nil { utilruntime.HandleError(fmt.Errorf("unable to initialize clusterroles: %v", err)) return false, nil @@ -145,7 +149,7 @@ func PostStartHook(hookContext genericapiserver.PostStartHookContext) error { } } - existingClusterRoleBindings, err := clientset.ClusterRoleBindings().List(api.ListOptions{}) + existingClusterRoleBindings, err := clientset.ClusterRoleBindings().List(metav1.ListOptions{}) if err != nil { utilruntime.HandleError(fmt.Errorf("unable to initialize clusterrolebindings: %v", err)) return false, nil diff --git a/vendor/k8s.io/kubernetes/pkg/registry/rbac/role/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/rbac/role/BUILD index 97248fcf..cca088b3 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/rbac/role/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/rbac/role/BUILD @@ -19,15 +19,16 @@ go_library( "//pkg/api:go_default_library", "//pkg/apis/rbac:go_default_library", "//pkg/apis/rbac/validation:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/storage:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/internalversion", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/validation/field", "//vendor:k8s.io/apimachinery/pkg/watch", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", "//vendor:k8s.io/apiserver/pkg/storage/names", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/rbac/role/policybased/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/rbac/role/policybased/BUILD index 7aac977d..283641a4 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/rbac/role/policybased/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/rbac/role/policybased/BUILD @@ -13,12 +13,12 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/apis/rbac:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/registry/rbac:go_default_library", "//pkg/registry/rbac/validation:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/runtime", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/rbac/role/policybased/storage.go b/vendor/k8s.io/kubernetes/pkg/registry/rbac/role/policybased/storage.go index 40d4a2dd..f121972a 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/rbac/role/policybased/storage.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/rbac/role/policybased/storage.go @@ -20,9 +20,9 @@ package policybased import ( "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/apis/rbac" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" rbacregistry "k8s.io/kubernetes/pkg/registry/rbac" rbacregistryvalidation "k8s.io/kubernetes/pkg/registry/rbac/validation" ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/rbac/role/registry.go b/vendor/k8s.io/kubernetes/pkg/registry/rbac/role/registry.go index 4c734c18..7b4cd8cd 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/rbac/role/registry.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/rbac/role/registry.go @@ -17,22 +17,23 @@ limitations under the License. package role import ( + metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/watch" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/rbac" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" ) // Registry is an interface for things that know how to store Roles. type Registry interface { - ListRoles(ctx genericapirequest.Context, options *api.ListOptions) (*rbac.RoleList, error) + ListRoles(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (*rbac.RoleList, error) CreateRole(ctx genericapirequest.Context, role *rbac.Role) error UpdateRole(ctx genericapirequest.Context, role *rbac.Role) error GetRole(ctx genericapirequest.Context, name string, options *metav1.GetOptions) (*rbac.Role, error) DeleteRole(ctx genericapirequest.Context, name string) error - WatchRoles(ctx genericapirequest.Context, options *api.ListOptions) (watch.Interface, error) + WatchRoles(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (watch.Interface, error) } // storage puts strong typing around storage calls @@ -46,7 +47,7 @@ func NewRegistry(s rest.StandardStorage) Registry { return &storage{s} } -func (s *storage) ListRoles(ctx genericapirequest.Context, options *api.ListOptions) (*rbac.RoleList, error) { +func (s *storage) ListRoles(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (*rbac.RoleList, error) { obj, err := s.List(ctx, options) if err != nil { return nil, err @@ -65,7 +66,7 @@ func (s *storage) UpdateRole(ctx genericapirequest.Context, role *rbac.Role) err return err } -func (s *storage) WatchRoles(ctx genericapirequest.Context, options *api.ListOptions) (watch.Interface, error) { +func (s *storage) WatchRoles(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (watch.Interface, error) { return s.Watch(ctx, options) } diff --git a/vendor/k8s.io/kubernetes/pkg/registry/rbac/role/storage/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/rbac/role/storage/BUILD index 050e74bd..ac83440d 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/rbac/role/storage/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/rbac/role/storage/BUILD @@ -13,8 +13,8 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/apis/rbac:go_default_library", - "//pkg/registry/generic:go_default_library", - "//pkg/registry/generic/registry:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic/registry:go_default_library", "//pkg/registry/rbac/role:go_default_library", "//vendor:k8s.io/apimachinery/pkg/runtime", ], diff --git a/vendor/k8s.io/kubernetes/pkg/registry/rbac/role/storage/storage.go b/vendor/k8s.io/kubernetes/pkg/registry/rbac/role/storage/storage.go index 022fa095..44f53eba 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/rbac/role/storage/storage.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/rbac/role/storage/storage.go @@ -19,8 +19,8 @@ package storage import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/apis/rbac" - "k8s.io/kubernetes/pkg/registry/generic" - genericregistry "k8s.io/kubernetes/pkg/registry/generic/registry" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + genericregistry "k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry" "k8s.io/kubernetes/pkg/registry/rbac/role" ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/rbac/role/strategy.go b/vendor/k8s.io/kubernetes/pkg/registry/rbac/role/strategy.go index 86544f30..88ff9110 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/rbac/role/strategy.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/rbac/role/strategy.go @@ -19,16 +19,16 @@ package role import ( "fmt" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/validation/field" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/storage/names" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/rbac" "k8s.io/kubernetes/pkg/apis/rbac/validation" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" apistorage "k8s.io/kubernetes/pkg/storage" ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/rbac/rolebinding/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/rbac/rolebinding/BUILD index 814c0f6d..bf4407ed 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/rbac/rolebinding/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/rbac/rolebinding/BUILD @@ -19,15 +19,16 @@ go_library( "//pkg/api:go_default_library", "//pkg/apis/rbac:go_default_library", "//pkg/apis/rbac/validation:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/storage:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/internalversion", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/validation/field", "//vendor:k8s.io/apimachinery/pkg/watch", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", "//vendor:k8s.io/apiserver/pkg/storage/names", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/rbac/rolebinding/policybased/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/rbac/rolebinding/policybased/BUILD index 4d16eb8f..332a2e04 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/rbac/rolebinding/policybased/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/rbac/rolebinding/policybased/BUILD @@ -13,13 +13,13 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/apis/rbac:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/registry/rbac:go_default_library", "//pkg/registry/rbac/validation:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apiserver/pkg/authorization/authorizer", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/rbac/rolebinding/policybased/storage.go b/vendor/k8s.io/kubernetes/pkg/registry/rbac/rolebinding/policybased/storage.go index 8d1c94e9..e9f054e0 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/rbac/rolebinding/policybased/storage.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/rbac/rolebinding/policybased/storage.go @@ -21,9 +21,9 @@ import ( "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apiserver/pkg/authorization/authorizer" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/apis/rbac" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" rbacregistry "k8s.io/kubernetes/pkg/registry/rbac" rbacregistryvalidation "k8s.io/kubernetes/pkg/registry/rbac/validation" ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/rbac/rolebinding/registry.go b/vendor/k8s.io/kubernetes/pkg/registry/rbac/rolebinding/registry.go index 27c1d642..8997a2c2 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/rbac/rolebinding/registry.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/rbac/rolebinding/registry.go @@ -17,22 +17,23 @@ limitations under the License. package rolebinding import ( + metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/watch" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/rbac" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" ) // Registry is an interface for things that know how to store RoleBindings. type Registry interface { - ListRoleBindings(ctx genericapirequest.Context, options *api.ListOptions) (*rbac.RoleBindingList, error) + ListRoleBindings(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (*rbac.RoleBindingList, error) CreateRoleBinding(ctx genericapirequest.Context, roleBinding *rbac.RoleBinding) error UpdateRoleBinding(ctx genericapirequest.Context, roleBinding *rbac.RoleBinding) error GetRoleBinding(ctx genericapirequest.Context, name string, options *metav1.GetOptions) (*rbac.RoleBinding, error) DeleteRoleBinding(ctx genericapirequest.Context, name string) error - WatchRoleBindings(ctx genericapirequest.Context, options *api.ListOptions) (watch.Interface, error) + WatchRoleBindings(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (watch.Interface, error) } // storage puts strong typing around storage calls @@ -46,7 +47,7 @@ func NewRegistry(s rest.StandardStorage) Registry { return &storage{s} } -func (s *storage) ListRoleBindings(ctx genericapirequest.Context, options *api.ListOptions) (*rbac.RoleBindingList, error) { +func (s *storage) ListRoleBindings(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (*rbac.RoleBindingList, error) { obj, err := s.List(ctx, options) if err != nil { return nil, err @@ -66,7 +67,7 @@ func (s *storage) UpdateRoleBinding(ctx genericapirequest.Context, roleBinding * return err } -func (s *storage) WatchRoleBindings(ctx genericapirequest.Context, options *api.ListOptions) (watch.Interface, error) { +func (s *storage) WatchRoleBindings(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (watch.Interface, error) { return s.Watch(ctx, options) } @@ -89,7 +90,7 @@ type AuthorizerAdapter struct { } func (a AuthorizerAdapter) ListRoleBindings(namespace string) ([]*rbac.RoleBinding, error) { - list, err := a.Registry.ListRoleBindings(genericapirequest.WithNamespace(genericapirequest.NewContext(), namespace), &api.ListOptions{}) + list, err := a.Registry.ListRoleBindings(genericapirequest.WithNamespace(genericapirequest.NewContext(), namespace), &metainternalversion.ListOptions{}) if err != nil { return nil, err } diff --git a/vendor/k8s.io/kubernetes/pkg/registry/rbac/rolebinding/storage/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/rbac/rolebinding/storage/BUILD index 84c8d327..02b5f84f 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/rbac/rolebinding/storage/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/rbac/rolebinding/storage/BUILD @@ -13,8 +13,8 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/apis/rbac:go_default_library", - "//pkg/registry/generic:go_default_library", - "//pkg/registry/generic/registry:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic/registry:go_default_library", "//pkg/registry/rbac/rolebinding:go_default_library", "//vendor:k8s.io/apimachinery/pkg/runtime", ], diff --git a/vendor/k8s.io/kubernetes/pkg/registry/rbac/rolebinding/storage/storage.go b/vendor/k8s.io/kubernetes/pkg/registry/rbac/rolebinding/storage/storage.go index 9a98c01b..dbc8814f 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/rbac/rolebinding/storage/storage.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/rbac/rolebinding/storage/storage.go @@ -19,8 +19,8 @@ package storage import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/apis/rbac" - "k8s.io/kubernetes/pkg/registry/generic" - genericregistry "k8s.io/kubernetes/pkg/registry/generic/registry" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + genericregistry "k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry" "k8s.io/kubernetes/pkg/registry/rbac/rolebinding" ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/rbac/rolebinding/strategy.go b/vendor/k8s.io/kubernetes/pkg/registry/rbac/rolebinding/strategy.go index b0359cd2..21bec281 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/rbac/rolebinding/strategy.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/rbac/rolebinding/strategy.go @@ -19,16 +19,16 @@ package rolebinding import ( "fmt" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/validation/field" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/storage/names" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/rbac" "k8s.io/kubernetes/pkg/apis/rbac/validation" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" apistorage "k8s.io/kubernetes/pkg/storage" ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/rbac/validation/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/rbac/validation/BUILD index 0d5de2f3..2c30ae17 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/rbac/validation/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/rbac/validation/BUILD @@ -17,8 +17,8 @@ go_test( library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//pkg/apis/rbac:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/util/diff", "//vendor:k8s.io/apiserver/pkg/authentication/user", ], @@ -33,12 +33,12 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/apis/rbac:go_default_library", - "//pkg/serviceaccount:go_default_library", "//vendor:github.com/golang/glog", "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/util/errors", + "//vendor:k8s.io/apiserver/pkg/authentication/serviceaccount", "//vendor:k8s.io/apiserver/pkg/authentication/user", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/rbac/validation/rule.go b/vendor/k8s.io/kubernetes/pkg/registry/rbac/validation/rule.go index 498b2de8..17373bc0 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/rbac/validation/rule.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/rbac/validation/rule.go @@ -21,12 +21,13 @@ import ( "fmt" "github.com/golang/glog" + apierrors "k8s.io/apimachinery/pkg/api/errors" utilerrors "k8s.io/apimachinery/pkg/util/errors" + "k8s.io/apiserver/pkg/authentication/serviceaccount" "k8s.io/apiserver/pkg/authentication/user" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/apis/rbac" - "k8s.io/kubernetes/pkg/serviceaccount" ) type AuthorizationRuleResolver interface { diff --git a/vendor/k8s.io/kubernetes/pkg/registry/rbac/validation/rule_test.go b/vendor/k8s.io/kubernetes/pkg/registry/rbac/validation/rule_test.go index 51f660b9..fb45667b 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/rbac/validation/rule_test.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/rbac/validation/rule_test.go @@ -23,9 +23,9 @@ import ( "sort" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/diff" "k8s.io/apiserver/pkg/authentication/user" - "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/rbac" ) @@ -75,23 +75,23 @@ func TestDefaultRuleResolver(t *testing.T) { staticRoles1 := StaticRoles{ roles: []*rbac.Role{ { - ObjectMeta: api.ObjectMeta{Namespace: "namespace1", Name: "readthings"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "namespace1", Name: "readthings"}, Rules: []rbac.PolicyRule{ruleReadPods, ruleReadServices}, }, }, clusterRoles: []*rbac.ClusterRole{ { - ObjectMeta: api.ObjectMeta{Name: "cluster-admin"}, + ObjectMeta: metav1.ObjectMeta{Name: "cluster-admin"}, Rules: []rbac.PolicyRule{ruleAdmin}, }, { - ObjectMeta: api.ObjectMeta{Name: "write-nodes"}, + ObjectMeta: metav1.ObjectMeta{Name: "write-nodes"}, Rules: []rbac.PolicyRule{ruleWriteNodes}, }, }, roleBindings: []*rbac.RoleBinding{ { - ObjectMeta: api.ObjectMeta{Namespace: "namespace1"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "namespace1"}, Subjects: []rbac.Subject{ {Kind: rbac.UserKind, Name: "foobar"}, {Kind: rbac.GroupKind, Name: "group1"}, diff --git a/vendor/k8s.io/kubernetes/pkg/registry/registrytest/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/registrytest/BUILD index af4bb12a..d52cd59e 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/registrytest/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/registrytest/BUILD @@ -20,20 +20,21 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/api/testapi:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/genericapiserver/api/rest/resttest:go_default_library", - "//pkg/registry/generic/registry:go_default_library", + "//pkg/genericapiserver/registry/generic/registry:go_default_library", + "//pkg/genericapiserver/registry/rest/resttest:go_default_library", "//pkg/storage/etcd:go_default_library", "//pkg/storage/etcd/testing:go_default_library", "//pkg/storage/storagebackend:go_default_library", "//pkg/storage/testing:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/api/meta", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/internalversion", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/watch", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/registrytest/endpoint.go b/vendor/k8s.io/kubernetes/pkg/registry/registrytest/endpoint.go index 3686c6a8..cf0fc487 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/registrytest/endpoint.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/registrytest/endpoint.go @@ -21,9 +21,10 @@ import ( "sync" "k8s.io/apimachinery/pkg/api/errors" + metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/watch" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" ) @@ -36,7 +37,7 @@ type EndpointRegistry struct { lock sync.Mutex } -func (e *EndpointRegistry) ListEndpoints(ctx genericapirequest.Context, options *api.ListOptions) (*api.EndpointsList, error) { +func (e *EndpointRegistry) ListEndpoints(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (*api.EndpointsList, error) { // TODO: support namespaces in this mock e.lock.Lock() defer e.lock.Unlock() @@ -61,7 +62,7 @@ func (e *EndpointRegistry) GetEndpoints(ctx genericapirequest.Context, name stri return nil, errors.NewNotFound(api.Resource("endpoints"), name) } -func (e *EndpointRegistry) WatchEndpoints(ctx genericapirequest.Context, options *api.ListOptions) (watch.Interface, error) { +func (e *EndpointRegistry) WatchEndpoints(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (watch.Interface, error) { return nil, fmt.Errorf("unimplemented!") } diff --git a/vendor/k8s.io/kubernetes/pkg/registry/registrytest/etcd.go b/vendor/k8s.io/kubernetes/pkg/registry/registrytest/etcd.go index c0311b3d..50fb7d03 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/registrytest/etcd.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/registrytest/etcd.go @@ -23,14 +23,14 @@ import ( "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest/resttest" - genericregistry "k8s.io/kubernetes/pkg/registry/generic/registry" + genericregistry "k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest/resttest" etcdstorage "k8s.io/kubernetes/pkg/storage/etcd" etcdtesting "k8s.io/kubernetes/pkg/storage/etcd/testing" "k8s.io/kubernetes/pkg/storage/storagebackend" diff --git a/vendor/k8s.io/kubernetes/pkg/registry/registrytest/node.go b/vendor/k8s.io/kubernetes/pkg/registry/registrytest/node.go index ac0c80c6..e853d47a 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/registrytest/node.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/registrytest/node.go @@ -20,9 +20,10 @@ import ( "sync" "k8s.io/apimachinery/pkg/api/errors" + metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/watch" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" ) @@ -59,7 +60,7 @@ func (r *NodeRegistry) SetError(err error) { r.Err = err } -func (r *NodeRegistry) ListNodes(ctx genericapirequest.Context, options *api.ListOptions) (*api.NodeList, error) { +func (r *NodeRegistry) ListNodes(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (*api.NodeList, error) { r.Lock() defer r.Unlock() return &r.Nodes, r.Err @@ -105,13 +106,13 @@ func (r *NodeRegistry) DeleteNode(ctx genericapirequest.Context, nodeID string) var newList []api.Node for _, node := range r.Nodes.Items { if node.Name != nodeID { - newList = append(newList, api.Node{ObjectMeta: api.ObjectMeta{Name: node.Name}}) + newList = append(newList, api.Node{ObjectMeta: metav1.ObjectMeta{Name: node.Name}}) } } r.Nodes.Items = newList return r.Err } -func (r *NodeRegistry) WatchNodes(ctx genericapirequest.Context, options *api.ListOptions) (watch.Interface, error) { +func (r *NodeRegistry) WatchNodes(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (watch.Interface, error) { return nil, r.Err } diff --git a/vendor/k8s.io/kubernetes/pkg/registry/registrytest/service.go b/vendor/k8s.io/kubernetes/pkg/registry/registrytest/service.go index 5d11f8b5..af33e183 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/registrytest/service.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/registrytest/service.go @@ -19,9 +19,10 @@ package registrytest import ( "sync" + metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/watch" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api" ) @@ -47,7 +48,7 @@ func (r *ServiceRegistry) SetError(err error) { r.Err = err } -func (r *ServiceRegistry) ListServices(ctx genericapirequest.Context, options *api.ListOptions) (*api.ServiceList, error) { +func (r *ServiceRegistry) ListServices(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (*api.ServiceList, error) { r.mu.Lock() defer r.mu.Unlock() @@ -58,7 +59,7 @@ func (r *ServiceRegistry) ListServices(ctx genericapirequest.Context, options *a res.TypeMeta = r.List.TypeMeta res.ListMeta = r.List.ListMeta - if ns != api.NamespaceAll { + if ns != metav1.NamespaceAll { for _, service := range r.List.Items { if ns == service.Namespace { res.Items = append(res.Items, service) @@ -113,7 +114,7 @@ func (r *ServiceRegistry) UpdateService(ctx genericapirequest.Context, svc *api. return svc, r.Err } -func (r *ServiceRegistry) WatchServices(ctx genericapirequest.Context, options *api.ListOptions) (watch.Interface, error) { +func (r *ServiceRegistry) WatchServices(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (watch.Interface, error) { r.mu.Lock() defer r.mu.Unlock() diff --git a/vendor/k8s.io/kubernetes/pkg/registry/storage/rest/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/storage/rest/BUILD index dec64ae3..f9629680 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/storage/rest/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/storage/rest/BUILD @@ -14,9 +14,9 @@ go_library( deps = [ "//pkg/apis/storage:go_default_library", "//pkg/apis/storage/v1beta1:go_default_library", - "//pkg/genericapiserver:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", - "//pkg/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", + "//pkg/genericapiserver/server:go_default_library", "//pkg/registry/storage/storageclass/storage:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/storage/rest/storage_storage.go b/vendor/k8s.io/kubernetes/pkg/registry/storage/rest/storage_storage.go index e88fba0a..1dbd12e3 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/storage/rest/storage_storage.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/storage/rest/storage_storage.go @@ -19,9 +19,9 @@ package rest import ( storageapi "k8s.io/kubernetes/pkg/apis/storage" storageapiv1beta1 "k8s.io/kubernetes/pkg/apis/storage/v1beta1" - "k8s.io/kubernetes/pkg/genericapiserver" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" - "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" + genericapiserver "k8s.io/kubernetes/pkg/genericapiserver/server" storageclassstore "k8s.io/kubernetes/pkg/registry/storage/storageclass/storage" ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/storage/storageclass/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/storage/storageclass/BUILD index 43c8cd24..76f85012 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/storage/storageclass/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/storage/storageclass/BUILD @@ -19,13 +19,13 @@ go_library( "//pkg/api:go_default_library", "//pkg/apis/storage:go_default_library", "//pkg/apis/storage/validation:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", "//pkg/storage:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/validation/field", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", "//vendor:k8s.io/apiserver/pkg/storage/names", ], ) @@ -36,9 +36,9 @@ go_test( library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//pkg/apis/storage:go_default_library", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/storage/storageclass/storage/BUILD b/vendor/k8s.io/kubernetes/pkg/registry/storage/storageclass/storage/BUILD index cd839eb0..07534d86 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/storage/storageclass/storage/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/registry/storage/storageclass/storage/BUILD @@ -14,12 +14,12 @@ go_test( library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//pkg/apis/storage:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", "//pkg/registry/registrytest:go_default_library", "//pkg/storage/etcd/testing:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", ], @@ -31,8 +31,8 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/apis/storage:go_default_library", - "//pkg/registry/generic:go_default_library", - "//pkg/registry/generic/registry:go_default_library", + "//pkg/genericapiserver/registry/generic:go_default_library", + "//pkg/genericapiserver/registry/generic/registry:go_default_library", "//pkg/registry/storage/storageclass:go_default_library", "//vendor:k8s.io/apimachinery/pkg/runtime", ], diff --git a/vendor/k8s.io/kubernetes/pkg/registry/storage/storageclass/storage/storage.go b/vendor/k8s.io/kubernetes/pkg/registry/storage/storageclass/storage/storage.go index 79aed25c..fe9d0f75 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/storage/storageclass/storage/storage.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/storage/storageclass/storage/storage.go @@ -19,8 +19,8 @@ package storage import ( "k8s.io/apimachinery/pkg/runtime" storageapi "k8s.io/kubernetes/pkg/apis/storage" - "k8s.io/kubernetes/pkg/registry/generic" - genericregistry "k8s.io/kubernetes/pkg/registry/generic/registry" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" + genericregistry "k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry" "k8s.io/kubernetes/pkg/registry/storage/storageclass" ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/storage/storageclass/storage/storage_test.go b/vendor/k8s.io/kubernetes/pkg/registry/storage/storageclass/storage/storage_test.go index 4b738c28..9ddff60b 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/storage/storageclass/storage/storage_test.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/storage/storageclass/storage/storage_test.go @@ -19,12 +19,12 @@ package storage import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" - "k8s.io/kubernetes/pkg/api" storageapi "k8s.io/kubernetes/pkg/apis/storage" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" "k8s.io/kubernetes/pkg/registry/registrytest" etcdtesting "k8s.io/kubernetes/pkg/storage/etcd/testing" ) @@ -43,7 +43,7 @@ func newStorage(t *testing.T) (*REST, *etcdtesting.EtcdTestServer) { func validNewStorageClass(name string) *storageapi.StorageClass { return &storageapi.StorageClass{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Provisioner: "kubernetes.io/aws-ebs", @@ -63,13 +63,13 @@ func TestCreate(t *testing.T) { defer storage.Store.DestroyFunc() test := registrytest.New(t, storage.Store).ClusterScope() storageClass := validNewStorageClass("foo") - storageClass.ObjectMeta = api.ObjectMeta{GenerateName: "foo"} + storageClass.ObjectMeta = metav1.ObjectMeta{GenerateName: "foo"} test.TestCreate( // valid storageClass, // invalid &storageapi.StorageClass{ - ObjectMeta: api.ObjectMeta{Name: "*BadName!"}, + ObjectMeta: metav1.ObjectMeta{Name: "*BadName!"}, }, ) } diff --git a/vendor/k8s.io/kubernetes/pkg/registry/storage/storageclass/strategy.go b/vendor/k8s.io/kubernetes/pkg/registry/storage/storageclass/strategy.go index 5585853d..d9518a98 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/storage/storageclass/strategy.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/storage/storageclass/strategy.go @@ -19,16 +19,16 @@ package storageclass import ( "fmt" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/validation/field" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/storage/names" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/storage" "k8s.io/kubernetes/pkg/apis/storage/validation" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" apistorage "k8s.io/kubernetes/pkg/storage" ) diff --git a/vendor/k8s.io/kubernetes/pkg/registry/storage/storageclass/strategy_test.go b/vendor/k8s.io/kubernetes/pkg/registry/storage/storageclass/strategy_test.go index 952c19c1..2bcbc21b 100644 --- a/vendor/k8s.io/kubernetes/pkg/registry/storage/storageclass/strategy_test.go +++ b/vendor/k8s.io/kubernetes/pkg/registry/storage/storageclass/strategy_test.go @@ -19,8 +19,8 @@ package storageclass import ( "testing" - genericapirequest "k8s.io/apiserver/pkg/request" - "k8s.io/kubernetes/pkg/api" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/apis/storage" ) @@ -34,7 +34,7 @@ func TestStorageClassStrategy(t *testing.T) { } storageClass := &storage.StorageClass{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "valid-class", }, Provisioner: "kubernetes.io/aws-ebs", @@ -51,7 +51,7 @@ func TestStorageClassStrategy(t *testing.T) { } newStorageClass := &storage.StorageClass{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "valid-class-2", ResourceVersion: "4", }, diff --git a/vendor/k8s.io/kubernetes/pkg/routes/BUILD b/vendor/k8s.io/kubernetes/pkg/routes/BUILD index 50e55545..f74afbe2 100644 --- a/vendor/k8s.io/kubernetes/pkg/routes/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/routes/BUILD @@ -16,7 +16,7 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/genericapiserver/mux:go_default_library", + "//pkg/genericapiserver/server/mux:go_default_library", "//vendor:github.com/emicklei/go-restful", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/routes/logs.go b/vendor/k8s.io/kubernetes/pkg/routes/logs.go index bbe5512a..347c411c 100644 --- a/vendor/k8s.io/kubernetes/pkg/routes/logs.go +++ b/vendor/k8s.io/kubernetes/pkg/routes/logs.go @@ -22,7 +22,7 @@ import ( "github.com/emicklei/go-restful" - "k8s.io/kubernetes/pkg/genericapiserver/mux" + "k8s.io/kubernetes/pkg/genericapiserver/server/mux" ) // Logs adds handlers for the /logs path serving log files from /var/log. diff --git a/vendor/k8s.io/kubernetes/pkg/routes/ui.go b/vendor/k8s.io/kubernetes/pkg/routes/ui.go index b87e1554..96d0ff23 100644 --- a/vendor/k8s.io/kubernetes/pkg/routes/ui.go +++ b/vendor/k8s.io/kubernetes/pkg/routes/ui.go @@ -19,7 +19,7 @@ package routes import ( "net/http" - "k8s.io/kubernetes/pkg/genericapiserver/mux" + "k8s.io/kubernetes/pkg/genericapiserver/server/mux" ) const dashboardPath = "/api/v1/proxy/namespaces/kube-system/services/kubernetes-dashboard" diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/BUILD b/vendor/k8s.io/kubernetes/pkg/runtime/BUILD index 1841dd00..7a99431d 100644 --- a/vendor/k8s.io/kubernetes/pkg/runtime/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/runtime/BUILD @@ -5,67 +5,12 @@ licenses(["notice"]) load( "@io_bazel_rules_go//go:def.bzl", "go_library", - "go_test", ) go_library( name = "go_default_library", - srcs = [ - "codec.go", - "codec_check.go", - "conversion.go", - "doc.go", - "embedded.go", - "error.go", - "extension.go", - "generated.pb.go", - "helper.go", - "interfaces.go", - "register.go", - "scheme.go", - "scheme_builder.go", - "swagger_doc_generator.go", - "types.go", - "types_proto.go", - "zz_generated.deepcopy.go", - ], + srcs = ["doc.go"], tags = ["automanaged"], - deps = [ - "//pkg/conversion:go_default_library", - "//pkg/conversion/queryparams:go_default_library", - "//pkg/runtime/schema:go_default_library", - "//pkg/util/errors:go_default_library", - "//vendor:github.com/gogo/protobuf/proto", - "//vendor:k8s.io/apimachinery/pkg/conversion", - ], -) - -go_test( - name = "go_default_test", - srcs = ["swagger_doc_generator_test.go"], - library = ":go_default_library", - tags = ["automanaged"], -) - -go_test( - name = "go_default_xtest", - srcs = [ - "conversion_test.go", - "embedded_test.go", - "extension_test.go", - "scheme_test.go", - ], - tags = ["automanaged"], - deps = [ - "//pkg/api/meta:go_default_library", - "//pkg/conversion:go_default_library", - "//pkg/runtime:go_default_library", - "//pkg/runtime/schema:go_default_library", - "//pkg/runtime/serializer:go_default_library", - "//pkg/util/diff:go_default_library", - "//vendor:github.com/google/gofuzz", - "//vendor:github.com/spf13/pflag", - ], ) filegroup( @@ -79,7 +24,6 @@ filegroup( name = "all-srcs", srcs = [ ":package-srcs", - "//pkg/runtime/schema:all-srcs", "//pkg/runtime/serializer:all-srcs", ], tags = ["automanaged"], diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/OWNERS b/vendor/k8s.io/kubernetes/pkg/runtime/OWNERS deleted file mode 100644 index a49419f7..00000000 --- a/vendor/k8s.io/kubernetes/pkg/runtime/OWNERS +++ /dev/null @@ -1,19 +0,0 @@ -approvers: -- caesarxuchao -- deads2k -- lavalamp -- smarterclayton -reviewers: -- lavalamp -- smarterclayton -- wojtek-t -- deads2k -- derekwaynecarr -- caesarxuchao -- mikedanese -- nikhiljindal -- gmarek -- krousey -- timothysc -- piosz -- mbohlool diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/codec.go b/vendor/k8s.io/kubernetes/pkg/runtime/codec.go deleted file mode 100644 index 02cca0a5..00000000 --- a/vendor/k8s.io/kubernetes/pkg/runtime/codec.go +++ /dev/null @@ -1,314 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package runtime - -import ( - "bytes" - "encoding/base64" - "fmt" - "io" - "net/url" - "reflect" - - "k8s.io/kubernetes/pkg/conversion/queryparams" - "k8s.io/kubernetes/pkg/runtime/schema" -) - -// codec binds an encoder and decoder. -type codec struct { - Encoder - Decoder -} - -// NewCodec creates a Codec from an Encoder and Decoder. -func NewCodec(e Encoder, d Decoder) Codec { - return codec{e, d} -} - -// Encode is a convenience wrapper for encoding to a []byte from an Encoder -func Encode(e Encoder, obj Object) ([]byte, error) { - // TODO: reuse buffer - buf := &bytes.Buffer{} - if err := e.Encode(obj, buf); err != nil { - return nil, err - } - return buf.Bytes(), nil -} - -// Decode is a convenience wrapper for decoding data into an Object. -func Decode(d Decoder, data []byte) (Object, error) { - obj, _, err := d.Decode(data, nil, nil) - return obj, err -} - -// DecodeInto performs a Decode into the provided object. -func DecodeInto(d Decoder, data []byte, into Object) error { - out, gvk, err := d.Decode(data, nil, into) - if err != nil { - return err - } - if out != into { - return fmt.Errorf("unable to decode %s into %v", gvk, reflect.TypeOf(into)) - } - return nil -} - -// EncodeOrDie is a version of Encode which will panic instead of returning an error. For tests. -func EncodeOrDie(e Encoder, obj Object) string { - bytes, err := Encode(e, obj) - if err != nil { - panic(err) - } - return string(bytes) -} - -// DefaultingSerializer invokes defaulting after decoding. -type DefaultingSerializer struct { - Defaulter ObjectDefaulter - Decoder Decoder - // Encoder is optional to allow this type to be used as both a Decoder and an Encoder - Encoder -} - -// Decode performs a decode and then allows the defaulter to act on the provided object. -func (d DefaultingSerializer) Decode(data []byte, defaultGVK *schema.GroupVersionKind, into Object) (Object, *schema.GroupVersionKind, error) { - obj, gvk, err := d.Decoder.Decode(data, defaultGVK, into) - if err != nil { - return obj, gvk, err - } - d.Defaulter.Default(obj) - return obj, gvk, nil -} - -// UseOrCreateObject returns obj if the canonical ObjectKind returned by the provided typer matches gvk, or -// invokes the ObjectCreator to instantiate a new gvk. Returns an error if the typer cannot find the object. -func UseOrCreateObject(t ObjectTyper, c ObjectCreater, gvk schema.GroupVersionKind, obj Object) (Object, error) { - if obj != nil { - kinds, _, err := t.ObjectKinds(obj) - if err != nil { - return nil, err - } - for _, kind := range kinds { - if gvk == kind { - return obj, nil - } - } - } - return c.New(gvk) -} - -// NoopEncoder converts an Decoder to a Serializer or Codec for code that expects them but only uses decoding. -type NoopEncoder struct { - Decoder -} - -var _ Serializer = NoopEncoder{} - -func (n NoopEncoder) Encode(obj Object, w io.Writer) error { - return fmt.Errorf("encoding is not allowed for this codec: %v", reflect.TypeOf(n.Decoder)) -} - -// NoopDecoder converts an Encoder to a Serializer or Codec for code that expects them but only uses encoding. -type NoopDecoder struct { - Encoder -} - -var _ Serializer = NoopDecoder{} - -func (n NoopDecoder) Decode(data []byte, gvk *schema.GroupVersionKind, into Object) (Object, *schema.GroupVersionKind, error) { - return nil, nil, fmt.Errorf("decoding is not allowed for this codec: %v", reflect.TypeOf(n.Encoder)) -} - -// NewParameterCodec creates a ParameterCodec capable of transforming url values into versioned objects and back. -func NewParameterCodec(scheme *Scheme) ParameterCodec { - return ¶meterCodec{ - typer: scheme, - convertor: scheme, - creator: scheme, - } -} - -// parameterCodec implements conversion to and from query parameters and objects. -type parameterCodec struct { - typer ObjectTyper - convertor ObjectConvertor - creator ObjectCreater -} - -var _ ParameterCodec = ¶meterCodec{} - -// DecodeParameters converts the provided url.Values into an object of type From with the kind of into, and then -// converts that object to into (if necessary). Returns an error if the operation cannot be completed. -func (c *parameterCodec) DecodeParameters(parameters url.Values, from schema.GroupVersion, into Object) error { - if len(parameters) == 0 { - return nil - } - targetGVKs, _, err := c.typer.ObjectKinds(into) - if err != nil { - return err - } - targetGVK := targetGVKs[0] - if targetGVK.GroupVersion() == from { - return c.convertor.Convert(¶meters, into, nil) - } - input, err := c.creator.New(from.WithKind(targetGVK.Kind)) - if err != nil { - return err - } - if err := c.convertor.Convert(¶meters, input, nil); err != nil { - return err - } - return c.convertor.Convert(input, into, nil) -} - -// EncodeParameters converts the provided object into the to version, then converts that object to url.Values. -// Returns an error if conversion is not possible. -func (c *parameterCodec) EncodeParameters(obj Object, to schema.GroupVersion) (url.Values, error) { - gvks, _, err := c.typer.ObjectKinds(obj) - if err != nil { - return nil, err - } - gvk := gvks[0] - if to != gvk.GroupVersion() { - out, err := c.convertor.ConvertToVersion(obj, to) - if err != nil { - return nil, err - } - obj = out - } - return queryparams.Convert(obj) -} - -type base64Serializer struct { - Serializer -} - -func NewBase64Serializer(s Serializer) Serializer { - return &base64Serializer{s} -} - -func (s base64Serializer) Encode(obj Object, stream io.Writer) error { - e := base64.NewEncoder(base64.StdEncoding, stream) - err := s.Serializer.Encode(obj, e) - e.Close() - return err -} - -func (s base64Serializer) Decode(data []byte, defaults *schema.GroupVersionKind, into Object) (Object, *schema.GroupVersionKind, error) { - out := make([]byte, base64.StdEncoding.DecodedLen(len(data))) - n, err := base64.StdEncoding.Decode(out, data) - if err != nil { - return nil, nil, err - } - return s.Serializer.Decode(out[:n], defaults, into) -} - -// SerializerInfoForMediaType returns the first info in types that has a matching media type (which cannot -// include media-type parameters), or the first info with an empty media type, or false if no type matches. -func SerializerInfoForMediaType(types []SerializerInfo, mediaType string) (SerializerInfo, bool) { - for _, info := range types { - if info.MediaType == mediaType { - return info, true - } - } - for _, info := range types { - if len(info.MediaType) == 0 { - return info, true - } - } - return SerializerInfo{}, false -} - -var ( - // InternalGroupVersioner will always prefer the internal version for a given group version kind. - InternalGroupVersioner GroupVersioner = internalGroupVersioner{} - // DisabledGroupVersioner will reject all kinds passed to it. - DisabledGroupVersioner GroupVersioner = disabledGroupVersioner{} -) - -type internalGroupVersioner struct{} - -// KindForGroupVersionKinds returns an internal Kind if one is found, or converts the first provided kind to the internal version. -func (internalGroupVersioner) KindForGroupVersionKinds(kinds []schema.GroupVersionKind) (schema.GroupVersionKind, bool) { - for _, kind := range kinds { - if kind.Version == APIVersionInternal { - return kind, true - } - } - for _, kind := range kinds { - return schema.GroupVersionKind{Group: kind.Group, Version: APIVersionInternal, Kind: kind.Kind}, true - } - return schema.GroupVersionKind{}, false -} - -type disabledGroupVersioner struct{} - -// KindForGroupVersionKinds returns false for any input. -func (disabledGroupVersioner) KindForGroupVersionKinds(kinds []schema.GroupVersionKind) (schema.GroupVersionKind, bool) { - return schema.GroupVersionKind{}, false -} - -// GroupVersioners implements GroupVersioner and resolves to the first exact match for any kind. -type GroupVersioners []GroupVersioner - -// KindForGroupVersionKinds returns the first match of any of the group versioners, or false if no match occured. -func (gvs GroupVersioners) KindForGroupVersionKinds(kinds []schema.GroupVersionKind) (schema.GroupVersionKind, bool) { - for _, gv := range gvs { - target, ok := gv.KindForGroupVersionKinds(kinds) - if !ok { - continue - } - return target, true - } - return schema.GroupVersionKind{}, false -} - -// Assert that schema.GroupVersion and GroupVersions implement GroupVersioner -var _ GroupVersioner = schema.GroupVersion{} -var _ GroupVersioner = schema.GroupVersions{} -var _ GroupVersioner = multiGroupVersioner{} - -type multiGroupVersioner struct { - target schema.GroupVersion - acceptedGroupKinds []schema.GroupKind -} - -// NewMultiGroupVersioner returns the provided group version for any kind that matches one of the provided group kinds. -// Kind may be empty in the provided group kind, in which case any kind will match. -func NewMultiGroupVersioner(gv schema.GroupVersion, groupKinds ...schema.GroupKind) GroupVersioner { - if len(groupKinds) == 0 || (len(groupKinds) == 1 && groupKinds[0].Group == gv.Group) { - return gv - } - return multiGroupVersioner{target: gv, acceptedGroupKinds: groupKinds} -} - -// KindForGroupVersionKinds returns the target group version if any kind matches any of the original group kinds. It will -// use the originating kind where possible. -func (v multiGroupVersioner) KindForGroupVersionKinds(kinds []schema.GroupVersionKind) (schema.GroupVersionKind, bool) { - for _, src := range kinds { - for _, kind := range v.acceptedGroupKinds { - if kind.Group != src.Group { - continue - } - if len(kind.Kind) > 0 && kind.Kind != src.Kind { - continue - } - return v.target.WithKind(src.Kind), true - } - } - return schema.GroupVersionKind{}, false -} diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/codec_check.go b/vendor/k8s.io/kubernetes/pkg/runtime/codec_check.go deleted file mode 100644 index 94df00cc..00000000 --- a/vendor/k8s.io/kubernetes/pkg/runtime/codec_check.go +++ /dev/null @@ -1,50 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package runtime - -import ( - "fmt" - "reflect" - - "k8s.io/kubernetes/pkg/runtime/schema" -) - -// CheckCodec makes sure that the codec can encode objects like internalType, -// decode all of the external types listed, and also decode them into the given -// object. (Will modify internalObject.) (Assumes JSON serialization.) -// TODO: verify that the correct external version is chosen on encode... -func CheckCodec(c Codec, internalType Object, externalTypes ...schema.GroupVersionKind) error { - _, err := Encode(c, internalType) - if err != nil { - return fmt.Errorf("Internal type not encodable: %v", err) - } - for _, et := range externalTypes { - exBytes := []byte(fmt.Sprintf(`{"kind":"%v","apiVersion":"%v"}`, et.Kind, et.GroupVersion().String())) - obj, err := Decode(c, exBytes) - if err != nil { - return fmt.Errorf("external type %s not interpretable: %v", et, err) - } - if reflect.TypeOf(obj) != reflect.TypeOf(internalType) { - return fmt.Errorf("decode of external type %s produced: %#v", et, obj) - } - err = DecodeInto(c, exBytes, internalType) - if err != nil { - return fmt.Errorf("external type %s not convertable to internal type: %v", et, err) - } - } - return nil -} diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/conversion.go b/vendor/k8s.io/kubernetes/pkg/runtime/conversion.go deleted file mode 100644 index dd6e26af..00000000 --- a/vendor/k8s.io/kubernetes/pkg/runtime/conversion.go +++ /dev/null @@ -1,98 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Defines conversions between generic types and structs to map query strings -// to struct objects. -package runtime - -import ( - "reflect" - "strconv" - "strings" - - "k8s.io/kubernetes/pkg/conversion" -) - -// JSONKeyMapper uses the struct tags on a conversion to determine the key value for -// the other side. Use when mapping from a map[string]* to a struct or vice versa. -func JSONKeyMapper(key string, sourceTag, destTag reflect.StructTag) (string, string) { - if s := destTag.Get("json"); len(s) > 0 { - return strings.SplitN(s, ",", 2)[0], key - } - if s := sourceTag.Get("json"); len(s) > 0 { - return key, strings.SplitN(s, ",", 2)[0] - } - return key, key -} - -// DefaultStringConversions are helpers for converting []string and string to real values. -var DefaultStringConversions = []interface{}{ - Convert_Slice_string_To_string, - Convert_Slice_string_To_int, - Convert_Slice_string_To_bool, - Convert_Slice_string_To_int64, -} - -func Convert_Slice_string_To_string(input *[]string, out *string, s conversion.Scope) error { - if len(*input) == 0 { - *out = "" - } - *out = (*input)[0] - return nil -} - -func Convert_Slice_string_To_int(input *[]string, out *int, s conversion.Scope) error { - if len(*input) == 0 { - *out = 0 - } - str := (*input)[0] - i, err := strconv.Atoi(str) - if err != nil { - return err - } - *out = i - return nil -} - -// Conver_Slice_string_To_bool will convert a string parameter to boolean. -// Only the absence of a value, a value of "false", or a value of "0" resolve to false. -// Any other value (including empty string) resolves to true. -func Convert_Slice_string_To_bool(input *[]string, out *bool, s conversion.Scope) error { - if len(*input) == 0 { - *out = false - return nil - } - switch strings.ToLower((*input)[0]) { - case "false", "0": - *out = false - default: - *out = true - } - return nil -} - -func Convert_Slice_string_To_int64(input *[]string, out *int64, s conversion.Scope) error { - if len(*input) == 0 { - *out = 0 - } - str := (*input)[0] - i, err := strconv.ParseInt(str, 10, 64) - if err != nil { - return err - } - *out = i - return nil -} diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/conversion_test.go b/vendor/k8s.io/kubernetes/pkg/runtime/conversion_test.go deleted file mode 100644 index f2b92dce..00000000 --- a/vendor/k8s.io/kubernetes/pkg/runtime/conversion_test.go +++ /dev/null @@ -1,135 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package runtime_test - -import ( - "reflect" - "testing" - - "k8s.io/kubernetes/pkg/runtime" - "k8s.io/kubernetes/pkg/runtime/schema" -) - -type InternalComplex struct { - runtime.TypeMeta - String string - Integer int - Integer64 int64 - Int64 int64 - Bool bool -} - -type ExternalComplex struct { - runtime.TypeMeta `json:",inline"` - String string `json:"string" description:"testing"` - Integer int `json:"int"` - Integer64 int64 `json:",omitempty"` - Int64 int64 - Bool bool `json:"bool"` -} - -func (obj *InternalComplex) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta } -func (obj *ExternalComplex) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta } - -func TestStringMapConversion(t *testing.T) { - internalGV := schema.GroupVersion{Group: "test.group", Version: runtime.APIVersionInternal} - externalGV := schema.GroupVersion{Group: "test.group", Version: "external"} - - scheme := runtime.NewScheme() - scheme.Log(t) - scheme.AddKnownTypeWithName(internalGV.WithKind("Complex"), &InternalComplex{}) - scheme.AddKnownTypeWithName(externalGV.WithKind("Complex"), &ExternalComplex{}) - - testCases := map[string]struct { - input map[string][]string - errFn func(error) bool - expected runtime.Object - }{ - "ignores omitempty": { - input: map[string][]string{ - "String": {"not_used"}, - "string": {"value"}, - "int": {"1"}, - "Integer64": {"2"}, - }, - expected: &ExternalComplex{String: "value", Integer: 1}, - }, - "returns error on bad int": { - input: map[string][]string{ - "int": {"a"}, - }, - errFn: func(err error) bool { return err != nil }, - expected: &ExternalComplex{}, - }, - "parses int64": { - input: map[string][]string{ - "Int64": {"-1"}, - }, - expected: &ExternalComplex{Int64: -1}, - }, - "returns error on bad int64": { - input: map[string][]string{ - "Int64": {"a"}, - }, - errFn: func(err error) bool { return err != nil }, - expected: &ExternalComplex{}, - }, - "parses boolean true": { - input: map[string][]string{ - "bool": {"true"}, - }, - expected: &ExternalComplex{Bool: true}, - }, - "parses boolean any value": { - input: map[string][]string{ - "bool": {"foo"}, - }, - expected: &ExternalComplex{Bool: true}, - }, - "parses boolean false": { - input: map[string][]string{ - "bool": {"false"}, - }, - expected: &ExternalComplex{Bool: false}, - }, - "parses boolean empty value": { - input: map[string][]string{ - "bool": {""}, - }, - expected: &ExternalComplex{Bool: true}, - }, - "parses boolean no value": { - input: map[string][]string{ - "bool": {}, - }, - expected: &ExternalComplex{Bool: false}, - }, - } - - for k, tc := range testCases { - out := &ExternalComplex{} - if err := scheme.Convert(&tc.input, out, nil); (tc.errFn == nil && err != nil) || (tc.errFn != nil && !tc.errFn(err)) { - t.Errorf("%s: unexpected error: %v", k, err) - continue - } else if err != nil { - continue - } - if !reflect.DeepEqual(out, tc.expected) { - t.Errorf("%s: unexpected output: %#v", k, out) - } - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/doc.go b/vendor/k8s.io/kubernetes/pkg/runtime/doc.go index e4eeec25..d9aeba6c 100644 --- a/vendor/k8s.io/kubernetes/pkg/runtime/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/runtime/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,33 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Package runtime includes helper functions for working with API objects -// that follow the kubernetes API object conventions, which are: -// -// 0. Your API objects have a common metadata struct member, TypeMeta. -// 1. Your code refers to an internal set of API objects. -// 2. In a separate package, you have an external set of API objects. -// 3. The external set is considered to be versioned, and no breaking -// changes are ever made to it (fields may be added but not changed -// or removed). -// 4. As your api evolves, you'll make an additional versioned package -// with every major change. -// 5. Versioned packages have conversion functions which convert to -// and from the internal version. -// 6. You'll continue to support older versions according to your -// deprecation policy, and you can easily provide a program/library -// to update old versions into new versions because of 5. -// 7. All of your serializations and deserializations are handled in a -// centralized place. -// -// Package runtime provides a conversion helper to make 5 easy, and the -// Encode/Decode/DecodeInto trio to accomplish 7. You can also register -// additional "codecs" which use a version of your choice. It's -// recommended that you register your types with runtime in your -// package's init function. -// -// As a bonus, a few common types useful from all api objects and versions -// are provided in types.go. -// +k8s:openapi-gen=false - -package runtime // import "k8s.io/kubernetes/pkg/runtime" +// Package runtime only exists until heapster rebases +// TODO genericapiserver remove this empty package. Godep fails without this because heapster relies +// on this package. This will allow us to start splitting packages, but will force +// heapster to update on their next kube rebase. +package runtime diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/embedded.go b/vendor/k8s.io/kubernetes/pkg/runtime/embedded.go deleted file mode 100644 index d0913595..00000000 --- a/vendor/k8s.io/kubernetes/pkg/runtime/embedded.go +++ /dev/null @@ -1,136 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package runtime - -import ( - "errors" - - "k8s.io/kubernetes/pkg/conversion" - "k8s.io/kubernetes/pkg/runtime/schema" -) - -type encodable struct { - E Encoder `json:"-"` - obj Object - versions []schema.GroupVersion -} - -func (e encodable) GetObjectKind() schema.ObjectKind { return e.obj.GetObjectKind() } - -// NewEncodable creates an object that will be encoded with the provided codec on demand. -// Provided as a convenience for test cases dealing with internal objects. -func NewEncodable(e Encoder, obj Object, versions ...schema.GroupVersion) Object { - if _, ok := obj.(*Unknown); ok { - return obj - } - return encodable{e, obj, versions} -} - -func (re encodable) UnmarshalJSON(in []byte) error { - return errors.New("runtime.encodable cannot be unmarshalled from JSON") -} - -// Marshal may get called on pointers or values, so implement MarshalJSON on value. -// http://stackoverflow.com/questions/21390979/custom-marshaljson-never-gets-called-in-go -func (re encodable) MarshalJSON() ([]byte, error) { - return Encode(re.E, re.obj) -} - -// NewEncodableList creates an object that will be encoded with the provided codec on demand. -// Provided as a convenience for test cases dealing with internal objects. -func NewEncodableList(e Encoder, objects []Object, versions ...schema.GroupVersion) []Object { - out := make([]Object, len(objects)) - for i := range objects { - if _, ok := objects[i].(*Unknown); ok { - out[i] = objects[i] - continue - } - out[i] = NewEncodable(e, objects[i], versions...) - } - return out -} - -func (re *Unknown) UnmarshalJSON(in []byte) error { - if re == nil { - return errors.New("runtime.Unknown: UnmarshalJSON on nil pointer") - } - re.TypeMeta = TypeMeta{} - re.Raw = append(re.Raw[0:0], in...) - re.ContentEncoding = "" - re.ContentType = ContentTypeJSON - return nil -} - -// Marshal may get called on pointers or values, so implement MarshalJSON on value. -// http://stackoverflow.com/questions/21390979/custom-marshaljson-never-gets-called-in-go -func (re Unknown) MarshalJSON() ([]byte, error) { - // If ContentType is unset, we assume this is JSON. - if re.ContentType != "" && re.ContentType != ContentTypeJSON { - return nil, errors.New("runtime.Unknown: MarshalJSON on non-json data") - } - if re.Raw == nil { - return []byte("null"), nil - } - return re.Raw, nil -} - -func Convert_runtime_Object_To_runtime_RawExtension(in *Object, out *RawExtension, s conversion.Scope) error { - if in == nil { - out.Raw = []byte("null") - return nil - } - obj := *in - if unk, ok := obj.(*Unknown); ok { - if unk.Raw != nil { - out.Raw = unk.Raw - return nil - } - obj = out.Object - } - if obj == nil { - out.Raw = nil - return nil - } - out.Object = obj - return nil -} - -func Convert_runtime_RawExtension_To_runtime_Object(in *RawExtension, out *Object, s conversion.Scope) error { - if in.Object != nil { - *out = in.Object - return nil - } - data := in.Raw - if len(data) == 0 || (len(data) == 4 && string(data) == "null") { - *out = nil - return nil - } - *out = &Unknown{ - Raw: data, - // TODO: Set ContentEncoding and ContentType appropriately. - // Currently we set ContentTypeJSON to make tests passing. - ContentType: ContentTypeJSON, - } - return nil -} - -func DefaultEmbeddedConversions() []interface{} { - return []interface{}{ - Convert_runtime_Object_To_runtime_RawExtension, - Convert_runtime_RawExtension_To_runtime_Object, - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/embedded_test.go b/vendor/k8s.io/kubernetes/pkg/runtime/embedded_test.go deleted file mode 100644 index f9c9bbc8..00000000 --- a/vendor/k8s.io/kubernetes/pkg/runtime/embedded_test.go +++ /dev/null @@ -1,290 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package runtime_test - -import ( - "encoding/json" - "reflect" - "strings" - "testing" - - "k8s.io/kubernetes/pkg/api/meta" - "k8s.io/kubernetes/pkg/runtime" - "k8s.io/kubernetes/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/runtime/serializer" - "k8s.io/kubernetes/pkg/util/diff" -) - -type EmbeddedTest struct { - runtime.TypeMeta - ID string - Object runtime.Object - EmptyObject runtime.Object -} - -type EmbeddedTestExternal struct { - runtime.TypeMeta `json:",inline"` - ID string `json:"id,omitempty"` - Object runtime.RawExtension `json:"object,omitempty"` - EmptyObject runtime.RawExtension `json:"emptyObject,omitempty"` -} - -type ObjectTest struct { - runtime.TypeMeta - - ID string - Items []runtime.Object -} - -type ObjectTestExternal struct { - runtime.TypeMeta `yaml:",inline" json:",inline"` - - ID string `json:"id,omitempty"` - Items []runtime.RawExtension `json:"items,omitempty"` -} - -func (obj *ObjectTest) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta } -func (obj *ObjectTestExternal) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta } -func (obj *EmbeddedTest) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta } -func (obj *EmbeddedTestExternal) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta } - -func TestDecodeEmptyRawExtensionAsObject(t *testing.T) { - internalGV := schema.GroupVersion{Group: "test.group", Version: runtime.APIVersionInternal} - externalGV := schema.GroupVersion{Group: "test.group", Version: "v1test"} - externalGVK := externalGV.WithKind("ObjectTest") - - s := runtime.NewScheme() - s.AddKnownTypes(internalGV, &ObjectTest{}) - s.AddKnownTypeWithName(externalGVK, &ObjectTestExternal{}) - - codec := serializer.NewCodecFactory(s).LegacyCodec(externalGV) - - obj, gvk, err := codec.Decode([]byte(`{"kind":"`+externalGVK.Kind+`","apiVersion":"`+externalGV.String()+`","items":[{}]}`), nil, nil) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - test := obj.(*ObjectTest) - if unk, ok := test.Items[0].(*runtime.Unknown); !ok || unk.Kind != "" || unk.APIVersion != "" || string(unk.Raw) != "{}" || unk.ContentType != runtime.ContentTypeJSON { - t.Fatalf("unexpected object: %#v", test.Items[0]) - } - if *gvk != externalGVK { - t.Fatalf("unexpected kind: %#v", gvk) - } - - obj, gvk, err = codec.Decode([]byte(`{"kind":"`+externalGVK.Kind+`","apiVersion":"`+externalGV.String()+`","items":[{"kind":"Other","apiVersion":"v1"}]}`), nil, nil) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - test = obj.(*ObjectTest) - if unk, ok := test.Items[0].(*runtime.Unknown); !ok || unk.Kind != "" || unk.APIVersion != "" || string(unk.Raw) != `{"kind":"Other","apiVersion":"v1"}` || unk.ContentType != runtime.ContentTypeJSON { - t.Fatalf("unexpected object: %#v", test.Items[0]) - } - if *gvk != externalGVK { - t.Fatalf("unexpected kind: %#v", gvk) - } -} - -func TestArrayOfRuntimeObject(t *testing.T) { - internalGV := schema.GroupVersion{Group: "test.group", Version: runtime.APIVersionInternal} - externalGV := schema.GroupVersion{Group: "test.group", Version: "v1test"} - - s := runtime.NewScheme() - s.AddKnownTypes(internalGV, &EmbeddedTest{}) - s.AddKnownTypeWithName(externalGV.WithKind("EmbeddedTest"), &EmbeddedTestExternal{}) - s.AddKnownTypes(internalGV, &ObjectTest{}) - s.AddKnownTypeWithName(externalGV.WithKind("ObjectTest"), &ObjectTestExternal{}) - - codec := serializer.NewCodecFactory(s).LegacyCodec(externalGV) - - innerItems := []runtime.Object{ - &EmbeddedTest{ID: "baz"}, - } - items := []runtime.Object{ - &EmbeddedTest{ID: "foo"}, - &EmbeddedTest{ID: "bar"}, - // TODO: until YAML is removed, this JSON must be in ascending key order to ensure consistent roundtrip serialization - &runtime.Unknown{ - Raw: []byte(`{"apiVersion":"unknown.group/unknown","foo":"bar","kind":"OtherTest"}`), - ContentType: runtime.ContentTypeJSON, - }, - &ObjectTest{ - Items: runtime.NewEncodableList(codec, innerItems), - }, - } - internal := &ObjectTest{ - Items: runtime.NewEncodableList(codec, items), - } - wire, err := runtime.Encode(codec, internal) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - t.Logf("Wire format is:\n%s\n", string(wire)) - - obj := &ObjectTestExternal{} - if err := json.Unmarshal(wire, obj); err != nil { - t.Fatalf("unexpected error: %v", err) - } - t.Logf("exact wire is: %s", string(obj.Items[0].Raw)) - - items[3] = &ObjectTest{Items: innerItems} - internal.Items = items - - decoded, err := runtime.Decode(codec, wire) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - list, err := meta.ExtractList(decoded) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - if errs := runtime.DecodeList(list, codec); len(errs) > 0 { - t.Fatalf("unexpected error: %v", errs) - } - - list2, err := meta.ExtractList(list[3]) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - if errs := runtime.DecodeList(list2, codec); len(errs) > 0 { - t.Fatalf("unexpected error: %v", errs) - } - if err := meta.SetList(list[3], list2); err != nil { - t.Fatalf("unexpected error: %v", err) - } - - // we want DecodeList to set type meta if possible, even on runtime.Unknown objects - internal.Items[2].(*runtime.Unknown).TypeMeta = runtime.TypeMeta{Kind: "OtherTest", APIVersion: "unknown.group/unknown"} - if e, a := internal.Items, list; !reflect.DeepEqual(e, a) { - t.Errorf("mismatched decoded: %s", diff.ObjectGoPrintSideBySide(e, a)) - } -} - -func TestNestedObject(t *testing.T) { - internalGV := schema.GroupVersion{Group: "test.group", Version: runtime.APIVersionInternal} - externalGV := schema.GroupVersion{Group: "test.group", Version: "v1test"} - embeddedTestExternalGVK := externalGV.WithKind("EmbeddedTest") - - s := runtime.NewScheme() - s.AddKnownTypes(internalGV, &EmbeddedTest{}) - s.AddKnownTypeWithName(embeddedTestExternalGVK, &EmbeddedTestExternal{}) - - codec := serializer.NewCodecFactory(s).LegacyCodec(externalGV) - - inner := &EmbeddedTest{ - ID: "inner", - } - outer := &EmbeddedTest{ - ID: "outer", - Object: runtime.NewEncodable(codec, inner), - } - - wire, err := runtime.Encode(codec, outer) - if err != nil { - t.Fatalf("Unexpected encode error '%v'", err) - } - - t.Logf("Wire format is:\n%v\n", string(wire)) - - decoded, err := runtime.Decode(codec, wire) - if err != nil { - t.Fatalf("Unexpected decode error %v", err) - } - - // for later tests - outer.Object = inner - - if e, a := outer, decoded; reflect.DeepEqual(e, a) { - t.Errorf("Expected unequal %#v %#v", e, a) - } - - obj, err := runtime.Decode(codec, decoded.(*EmbeddedTest).Object.(*runtime.Unknown).Raw) - if err != nil { - t.Fatal(err) - } - decoded.(*EmbeddedTest).Object = obj - if e, a := outer, decoded; !reflect.DeepEqual(e, a) { - t.Errorf("Expected equal %#v %#v", e, a) - } - - // test JSON decoding of the external object, which should preserve - // raw bytes - var externalViaJSON EmbeddedTestExternal - err = json.Unmarshal(wire, &externalViaJSON) - if err != nil { - t.Fatalf("Unexpected decode error %v", err) - } - if externalViaJSON.Kind == "" || externalViaJSON.APIVersion == "" || externalViaJSON.ID != "outer" { - t.Errorf("Expected objects to have type info set, got %#v", externalViaJSON) - } - if !reflect.DeepEqual(externalViaJSON.EmptyObject.Raw, []byte("null")) || len(externalViaJSON.Object.Raw) == 0 { - t.Errorf("Expected deserialization of nested objects into bytes, got %#v", externalViaJSON) - } - - // test JSON decoding, too, since Decode uses yaml unmarshalling. - // Generic Unmarshalling of JSON cannot load the nested objects because there is - // no default schema set. Consumers wishing to get direct JSON decoding must use - // the external representation - var decodedViaJSON EmbeddedTest - err = json.Unmarshal(wire, &decodedViaJSON) - if err == nil || !strings.Contains(err.Error(), "unmarshal object into Go value of type runtime.Object") { - t.Fatalf("Unexpected decode error %v", err) - } - if a := decodedViaJSON; a.Object != nil || a.EmptyObject != nil { - t.Errorf("Expected embedded objects to be nil: %#v", a) - } -} - -// TestDeepCopyOfRuntimeObject checks to make sure that runtime.Objects's can be passed through DeepCopy with fidelity -func TestDeepCopyOfRuntimeObject(t *testing.T) { - internalGV := schema.GroupVersion{Group: "test.group", Version: runtime.APIVersionInternal} - externalGV := schema.GroupVersion{Group: "test.group", Version: "v1test"} - embeddedTestExternalGVK := externalGV.WithKind("EmbeddedTest") - - s := runtime.NewScheme() - s.AddKnownTypes(internalGV, &EmbeddedTest{}) - s.AddKnownTypeWithName(embeddedTestExternalGVK, &EmbeddedTestExternal{}) - - original := &EmbeddedTest{ - ID: "outer", - Object: &EmbeddedTest{ - ID: "inner", - }, - } - - codec := serializer.NewCodecFactory(s).LegacyCodec(externalGV) - - originalData, err := runtime.Encode(codec, original) - if err != nil { - t.Errorf("unexpected error: %v", err) - } - t.Logf("originalRole = %v\n", string(originalData)) - - copyOfOriginal, err := s.DeepCopy(original) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - - copiedData, err := runtime.Encode(codec, copyOfOriginal.(runtime.Object)) - if err != nil { - t.Errorf("unexpected error: %v", err) - } - t.Logf("copyOfRole = %v\n", string(copiedData)) - - if !reflect.DeepEqual(original, copyOfOriginal) { - t.Errorf("expected \n%v\n, got \n%v", string(originalData), string(copiedData)) - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/error.go b/vendor/k8s.io/kubernetes/pkg/runtime/error.go deleted file mode 100644 index b03282cc..00000000 --- a/vendor/k8s.io/kubernetes/pkg/runtime/error.go +++ /dev/null @@ -1,102 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package runtime - -import ( - "fmt" - "reflect" - - "k8s.io/kubernetes/pkg/runtime/schema" -) - -type notRegisteredErr struct { - gvk schema.GroupVersionKind - t reflect.Type -} - -// NewNotRegisteredErr is exposed for testing. -func NewNotRegisteredErr(gvk schema.GroupVersionKind, t reflect.Type) error { - return ¬RegisteredErr{gvk: gvk, t: t} -} - -func (k *notRegisteredErr) Error() string { - if k.t != nil { - return fmt.Sprintf("no kind is registered for the type %v", k.t) - } - if len(k.gvk.Kind) == 0 { - return fmt.Sprintf("no version %q has been registered", k.gvk.GroupVersion()) - } - if k.gvk.Version == APIVersionInternal { - return fmt.Sprintf("no kind %q is registered for the internal version of group %q", k.gvk.Kind, k.gvk.Group) - } - - return fmt.Sprintf("no kind %q is registered for version %q", k.gvk.Kind, k.gvk.GroupVersion()) -} - -// IsNotRegisteredError returns true if the error indicates the provided -// object or input data is not registered. -func IsNotRegisteredError(err error) bool { - if err == nil { - return false - } - _, ok := err.(*notRegisteredErr) - return ok -} - -type missingKindErr struct { - data string -} - -func NewMissingKindErr(data string) error { - return &missingKindErr{data} -} - -func (k *missingKindErr) Error() string { - return fmt.Sprintf("Object 'Kind' is missing in '%s'", k.data) -} - -// IsMissingKind returns true if the error indicates that the provided object -// is missing a 'Kind' field. -func IsMissingKind(err error) bool { - if err == nil { - return false - } - _, ok := err.(*missingKindErr) - return ok -} - -type missingVersionErr struct { - data string -} - -// IsMissingVersion returns true if the error indicates that the provided object -// is missing a 'Version' field. -func NewMissingVersionErr(data string) error { - return &missingVersionErr{data} -} - -func (k *missingVersionErr) Error() string { - return fmt.Sprintf("Object 'apiVersion' is missing in '%s'", k.data) -} - -func IsMissingVersion(err error) bool { - if err == nil { - return false - } - _, ok := err.(*missingVersionErr) - return ok -} diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/extension.go b/vendor/k8s.io/kubernetes/pkg/runtime/extension.go deleted file mode 100644 index 4d23ee9e..00000000 --- a/vendor/k8s.io/kubernetes/pkg/runtime/extension.go +++ /dev/null @@ -1,48 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package runtime - -import ( - "encoding/json" - "errors" -) - -func (re *RawExtension) UnmarshalJSON(in []byte) error { - if re == nil { - return errors.New("runtime.RawExtension: UnmarshalJSON on nil pointer") - } - re.Raw = append(re.Raw[0:0], in...) - return nil -} - -// Marshal may get called on pointers or values, so implement MarshalJSON on value. -// http://stackoverflow.com/questions/21390979/custom-marshaljson-never-gets-called-in-go -func (re RawExtension) MarshalJSON() ([]byte, error) { - if re.Raw == nil { - // TODO: this is to support legacy behavior of JSONPrinter and YAMLPrinter, which - // expect to call json.Marshal on arbitrary versioned objects (even those not in - // the scheme). pkg/kubectl/resource#AsVersionedObjects and its interaction with - // kubectl get on objects not in the scheme needs to be updated to ensure that the - // objects that are not part of the scheme are correctly put into the right form. - if re.Object != nil { - return json.Marshal(re.Object) - } - return []byte("null"), nil - } - // TODO: Check whether ContentType is actually JSON before returning it. - return re.Raw, nil -} diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/extension_test.go b/vendor/k8s.io/kubernetes/pkg/runtime/extension_test.go deleted file mode 100644 index 40e677b4..00000000 --- a/vendor/k8s.io/kubernetes/pkg/runtime/extension_test.go +++ /dev/null @@ -1,39 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package runtime_test - -import ( - "encoding/json" - "testing" - - "k8s.io/kubernetes/pkg/runtime" -) - -func TestEmbeddedRawExtensionMarshal(t *testing.T) { - type test struct { - Ext runtime.RawExtension - } - - extension := test{Ext: runtime.RawExtension{Raw: []byte(`{"foo":"bar"}`)}} - data, err := json.Marshal(extension) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - if string(data) != `{"Ext":{"foo":"bar"}}` { - t.Errorf("unexpected data: %s", string(data)) - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/generated.pb.go b/vendor/k8s.io/kubernetes/pkg/runtime/generated.pb.go deleted file mode 100644 index 37d6aff4..00000000 --- a/vendor/k8s.io/kubernetes/pkg/runtime/generated.pb.go +++ /dev/null @@ -1,767 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by protoc-gen-gogo. -// source: k8s.io/kubernetes/pkg/runtime/generated.proto -// DO NOT EDIT! - -/* - Package runtime is a generated protocol buffer package. - - It is generated from these files: - k8s.io/kubernetes/pkg/runtime/generated.proto - - It has these top-level messages: - RawExtension - TypeMeta - Unknown -*/ -package runtime - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" - -import strings "strings" -import reflect "reflect" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -const _ = proto.GoGoProtoPackageIsVersion1 - -func (m *RawExtension) Reset() { *m = RawExtension{} } -func (*RawExtension) ProtoMessage() {} -func (*RawExtension) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} } - -func (m *TypeMeta) Reset() { *m = TypeMeta{} } -func (*TypeMeta) ProtoMessage() {} -func (*TypeMeta) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} } - -func (m *Unknown) Reset() { *m = Unknown{} } -func (*Unknown) ProtoMessage() {} -func (*Unknown) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} } - -func init() { - proto.RegisterType((*RawExtension)(nil), "k8s.io.kubernetes.pkg.runtime.RawExtension") - proto.RegisterType((*TypeMeta)(nil), "k8s.io.kubernetes.pkg.runtime.TypeMeta") - proto.RegisterType((*Unknown)(nil), "k8s.io.kubernetes.pkg.runtime.Unknown") -} -func (m *RawExtension) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *RawExtension) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Raw != nil { - data[i] = 0xa - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.Raw))) - i += copy(data[i:], m.Raw) - } - return i, nil -} - -func (m *TypeMeta) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *TypeMeta) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.APIVersion))) - i += copy(data[i:], m.APIVersion) - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.Kind))) - i += copy(data[i:], m.Kind) - return i, nil -} - -func (m *Unknown) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *Unknown) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintGenerated(data, i, uint64(m.TypeMeta.Size())) - n1, err := m.TypeMeta.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n1 - if m.Raw != nil { - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.Raw))) - i += copy(data[i:], m.Raw) - } - data[i] = 0x1a - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.ContentEncoding))) - i += copy(data[i:], m.ContentEncoding) - data[i] = 0x22 - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.ContentType))) - i += copy(data[i:], m.ContentType) - return i, nil -} - -func encodeFixed64Generated(data []byte, offset int, v uint64) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - data[offset+4] = uint8(v >> 32) - data[offset+5] = uint8(v >> 40) - data[offset+6] = uint8(v >> 48) - data[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Generated(data []byte, offset int, v uint32) int { - data[offset] = uint8(v) - data[offset+1] = uint8(v >> 8) - data[offset+2] = uint8(v >> 16) - data[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintGenerated(data []byte, offset int, v uint64) int { - for v >= 1<<7 { - data[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - data[offset] = uint8(v) - return offset + 1 -} -func (m *RawExtension) Size() (n int) { - var l int - _ = l - if m.Raw != nil { - l = len(m.Raw) - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *TypeMeta) Size() (n int) { - var l int - _ = l - l = len(m.APIVersion) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Kind) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *Unknown) Size() (n int) { - var l int - _ = l - l = m.TypeMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if m.Raw != nil { - l = len(m.Raw) - n += 1 + l + sovGenerated(uint64(l)) - } - l = len(m.ContentEncoding) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.ContentType) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func sovGenerated(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozGenerated(x uint64) (n int) { - return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *RawExtension) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&RawExtension{`, - `Raw:` + valueToStringGenerated(this.Raw) + `,`, - `}`, - }, "") - return s -} -func (this *TypeMeta) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TypeMeta{`, - `APIVersion:` + fmt.Sprintf("%v", this.APIVersion) + `,`, - `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`, - `}`, - }, "") - return s -} -func (this *Unknown) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Unknown{`, - `TypeMeta:` + strings.Replace(strings.Replace(this.TypeMeta.String(), "TypeMeta", "TypeMeta", 1), `&`, ``, 1) + `,`, - `Raw:` + valueToStringGenerated(this.Raw) + `,`, - `ContentEncoding:` + fmt.Sprintf("%v", this.ContentEncoding) + `,`, - `ContentType:` + fmt.Sprintf("%v", this.ContentType) + `,`, - `}`, - }, "") - return s -} -func valueToStringGenerated(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *RawExtension) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RawExtension: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RawExtension: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Raw", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Raw = append(m.Raw[:0], data[iNdEx:postIndex]...) - if m.Raw == nil { - m.Raw = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TypeMeta) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TypeMeta: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TypeMeta: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field APIVersion", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.APIVersion = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Kind = string(data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Unknown) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Unknown: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Unknown: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TypeMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.TypeMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Raw", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Raw = append(m.Raw[:0], data[iNdEx:postIndex]...) - if m.Raw == nil { - m.Raw = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContentEncoding", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ContentEncoding = string(data[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContentType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ContentType = string(data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGenerated(data []byte) (n int, err error) { - l := len(data) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if data[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthGenerated - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipGenerated(data[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") -) - -var fileDescriptorGenerated = []byte{ - // 388 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x7c, 0x90, 0x3f, 0x8f, 0xda, 0x30, - 0x18, 0xc6, 0x13, 0x40, 0x82, 0x1a, 0x24, 0x2a, 0x77, 0x68, 0x8a, 0x54, 0x83, 0x58, 0x5a, 0x06, - 0x6c, 0x15, 0xa9, 0x52, 0x57, 0x82, 0x18, 0xaa, 0xaa, 0x52, 0x65, 0x95, 0x0e, 0x9d, 0x1a, 0x12, - 0x37, 0xb5, 0x52, 0xec, 0xc8, 0x71, 0x94, 0x76, 0xeb, 0x47, 0xe8, 0xc7, 0x62, 0x64, 0xbc, 0x09, - 0x1d, 0xb9, 0xcf, 0x70, 0xfb, 0x09, 0x63, 0xfe, 0x1c, 0xa0, 0xdb, 0xe2, 0xf7, 0xf9, 0x3d, 0xcf, - 0xfb, 0xbc, 0x01, 0xc3, 0xe4, 0x43, 0x86, 0xb9, 0x24, 0x49, 0x3e, 0x67, 0x4a, 0x30, 0xcd, 0x32, - 0x92, 0x26, 0x31, 0x51, 0xb9, 0xd0, 0x7c, 0xc1, 0x48, 0xcc, 0x04, 0x53, 0x81, 0x66, 0x11, 0x4e, - 0x95, 0xd4, 0x12, 0xbe, 0xde, 0xe1, 0xf8, 0x88, 0xe3, 0x34, 0x89, 0xb1, 0xc5, 0x3b, 0xc3, 0x98, - 0xeb, 0x5f, 0xf9, 0x1c, 0x87, 0x72, 0x41, 0x62, 0x19, 0x4b, 0x62, 0x5c, 0xf3, 0xfc, 0xa7, 0x79, - 0x99, 0x87, 0xf9, 0xda, 0xa5, 0x75, 0x46, 0xd7, 0x97, 0x07, 0x29, 0x27, 0x8a, 0x65, 0x32, 0x57, - 0xe1, 0x45, 0x83, 0xce, 0xbb, 0xeb, 0x9e, 0x5c, 0xf3, 0xdf, 0x84, 0x0b, 0x9d, 0x69, 0x75, 0x6e, - 0xe9, 0x0f, 0x40, 0x8b, 0x06, 0xc5, 0xf4, 0x8f, 0x66, 0x22, 0xe3, 0x52, 0xc0, 0x57, 0xa0, 0xaa, - 0x82, 0xc2, 0x73, 0x7b, 0xee, 0xdb, 0x96, 0x5f, 0x2f, 0xd7, 0xdd, 0x2a, 0x0d, 0x0a, 0xba, 0x9d, - 0xf5, 0x7f, 0x80, 0xc6, 0xd7, 0xbf, 0x29, 0xfb, 0xcc, 0x74, 0x00, 0x47, 0x00, 0x04, 0x29, 0xff, - 0xc6, 0xd4, 0xd6, 0x64, 0xe8, 0x67, 0x3e, 0x5c, 0xae, 0xbb, 0x4e, 0xb9, 0xee, 0x82, 0xf1, 0x97, - 0x8f, 0x56, 0xa1, 0x27, 0x14, 0xec, 0x81, 0x5a, 0xc2, 0x45, 0xe4, 0x55, 0x0c, 0xdd, 0xb2, 0x74, - 0xed, 0x13, 0x17, 0x11, 0x35, 0x4a, 0xff, 0xde, 0x05, 0xf5, 0x99, 0x48, 0x84, 0x2c, 0x04, 0x9c, - 0x81, 0x86, 0xb6, 0xdb, 0x4c, 0x7e, 0x73, 0xf4, 0x06, 0x3f, 0xf9, 0x83, 0xf1, 0xbe, 0x9c, 0xff, - 0xdc, 0x46, 0x1f, 0xea, 0xd2, 0x43, 0xd4, 0xfe, 0xbe, 0xca, 0xe5, 0x7d, 0x70, 0x0c, 0xda, 0xa1, - 0x14, 0x9a, 0x09, 0x3d, 0x15, 0xa1, 0x8c, 0xb8, 0x88, 0xbd, 0xaa, 0xa9, 0xfa, 0xd2, 0xe6, 0xb5, - 0x27, 0x8f, 0x65, 0x7a, 0xce, 0xc3, 0xf7, 0xa0, 0x69, 0x47, 0xdb, 0xd5, 0x5e, 0xcd, 0xd8, 0x5f, - 0x58, 0x7b, 0x73, 0x72, 0x94, 0xe8, 0x29, 0xe7, 0x0f, 0x96, 0x1b, 0xe4, 0xac, 0x36, 0xc8, 0xb9, - 0xd9, 0x20, 0xe7, 0x5f, 0x89, 0xdc, 0x65, 0x89, 0xdc, 0x55, 0x89, 0xdc, 0xdb, 0x12, 0xb9, 0xff, - 0xef, 0x90, 0xf3, 0xbd, 0x6e, 0x8f, 0x7c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x32, 0xc1, 0x73, 0x2d, - 0x94, 0x02, 0x00, 0x00, -} diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/generated.proto b/vendor/k8s.io/kubernetes/pkg/runtime/generated.proto deleted file mode 100644 index a2b0800b..00000000 --- a/vendor/k8s.io/kubernetes/pkg/runtime/generated.proto +++ /dev/null @@ -1,129 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - - -// This file was autogenerated by go-to-protobuf. Do not edit it manually! - -syntax = 'proto2'; - -package k8s.io.kubernetes.pkg.runtime; - -import "k8s.io/kubernetes/pkg/api/resource/generated.proto"; -import "k8s.io/kubernetes/pkg/util/intstr/generated.proto"; - -// Package-wide variables from generator "generated". -option go_package = "runtime"; - -// RawExtension is used to hold extensions in external versions. -// -// To use this, make a field which has RawExtension as its type in your external, versioned -// struct, and Object in your internal struct. You also need to register your -// various plugin types. -// -// // Internal package: -// type MyAPIObject struct { -// runtime.TypeMeta `json:",inline"` -// MyPlugin runtime.Object `json:"myPlugin"` -// } -// type PluginA struct { -// AOption string `json:"aOption"` -// } -// -// // External package: -// type MyAPIObject struct { -// runtime.TypeMeta `json:",inline"` -// MyPlugin runtime.RawExtension `json:"myPlugin"` -// } -// type PluginA struct { -// AOption string `json:"aOption"` -// } -// -// // On the wire, the JSON will look something like this: -// { -// "kind":"MyAPIObject", -// "apiVersion":"v1", -// "myPlugin": { -// "kind":"PluginA", -// "aOption":"foo", -// }, -// } -// -// So what happens? Decode first uses json or yaml to unmarshal the serialized data into -// your external MyAPIObject. That causes the raw JSON to be stored, but not unpacked. -// The next step is to copy (using pkg/conversion) into the internal struct. The runtime -// package's DefaultScheme has conversion functions installed which will unpack the -// JSON stored in RawExtension, turning it into the correct object type, and storing it -// in the Object. (TODO: In the case where the object is of an unknown type, a -// runtime.Unknown object will be created and stored.) -// -// +k8s:deepcopy-gen=true -// +protobuf=true -// +k8s:openapi-gen=true -message RawExtension { - // Raw is the underlying serialization of this object. - // - // TODO: Determine how to detect ContentType and ContentEncoding of 'Raw' data. - optional bytes raw = 1; -} - -// TypeMeta is shared by all top level objects. The proper way to use it is to inline it in your type, -// like this: -// type MyAwesomeAPIObject struct { -// runtime.TypeMeta `json:",inline"` -// ... // other fields -// } -// func (obj *MyAwesomeAPIObject) SetGroupVersionKind(gvk *metav1.GroupVersionKind) { metav1.UpdateTypeMeta(obj,gvk) }; GroupVersionKind() *GroupVersionKind -// -// TypeMeta is provided here for convenience. You may use it directly from this package or define -// your own with the same fields. -// -// +k8s:deepcopy-gen=true -// +protobuf=true -// +k8s:openapi-gen=true -message TypeMeta { - // +optional - optional string apiVersion = 1; - - // +optional - optional string kind = 2; -} - -// Unknown allows api objects with unknown types to be passed-through. This can be used -// to deal with the API objects from a plug-in. Unknown objects still have functioning -// TypeMeta features-- kind, version, etc. -// TODO: Make this object have easy access to field based accessors and settors for -// metadata and field mutatation. -// -// +k8s:deepcopy-gen=true -// +protobuf=true -// +k8s:openapi-gen=true -message Unknown { - optional TypeMeta typeMeta = 1; - - // Raw will hold the complete serialized object which couldn't be matched - // with a registered type. Most likely, nothing should be done with this - // except for passing it through the system. - optional bytes raw = 2; - - // ContentEncoding is encoding used to encode 'Raw' data. - // Unspecified means no encoding. - optional string contentEncoding = 3; - - // ContentType is serialization method used to serialize 'Raw'. - // Unspecified means ContentTypeJSON. - optional string contentType = 4; -} - diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/helper.go b/vendor/k8s.io/kubernetes/pkg/runtime/helper.go deleted file mode 100644 index af7cda06..00000000 --- a/vendor/k8s.io/kubernetes/pkg/runtime/helper.go +++ /dev/null @@ -1,212 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package runtime - -import ( - "fmt" - "io" - "reflect" - - "k8s.io/kubernetes/pkg/conversion" - "k8s.io/kubernetes/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/util/errors" -) - -// unsafeObjectConvertor implements ObjectConvertor using the unsafe conversion path. -type unsafeObjectConvertor struct { - *Scheme -} - -var _ ObjectConvertor = unsafeObjectConvertor{} - -// ConvertToVersion converts in to the provided outVersion without copying the input first, which -// is only safe if the output object is not mutated or reused. -func (c unsafeObjectConvertor) ConvertToVersion(in Object, outVersion GroupVersioner) (Object, error) { - return c.Scheme.UnsafeConvertToVersion(in, outVersion) -} - -// UnsafeObjectConvertor performs object conversion without copying the object structure, -// for use when the converted object will not be reused or mutated. Primarily for use within -// versioned codecs, which use the external object for serialization but do not return it. -func UnsafeObjectConvertor(scheme *Scheme) ObjectConvertor { - return unsafeObjectConvertor{scheme} -} - -// SetField puts the value of src, into fieldName, which must be a member of v. -// The value of src must be assignable to the field. -func SetField(src interface{}, v reflect.Value, fieldName string) error { - field := v.FieldByName(fieldName) - if !field.IsValid() { - return fmt.Errorf("couldn't find %v field in %#v", fieldName, v.Interface()) - } - srcValue := reflect.ValueOf(src) - if srcValue.Type().AssignableTo(field.Type()) { - field.Set(srcValue) - return nil - } - if srcValue.Type().ConvertibleTo(field.Type()) { - field.Set(srcValue.Convert(field.Type())) - return nil - } - return fmt.Errorf("couldn't assign/convert %v to %v", srcValue.Type(), field.Type()) -} - -// Field puts the value of fieldName, which must be a member of v, into dest, -// which must be a variable to which this field's value can be assigned. -func Field(v reflect.Value, fieldName string, dest interface{}) error { - field := v.FieldByName(fieldName) - if !field.IsValid() { - return fmt.Errorf("couldn't find %v field in %#v", fieldName, v.Interface()) - } - destValue, err := conversion.EnforcePtr(dest) - if err != nil { - return err - } - if field.Type().AssignableTo(destValue.Type()) { - destValue.Set(field) - return nil - } - if field.Type().ConvertibleTo(destValue.Type()) { - destValue.Set(field.Convert(destValue.Type())) - return nil - } - return fmt.Errorf("couldn't assign/convert %v to %v", field.Type(), destValue.Type()) -} - -// fieldPtr puts the address of fieldName, which must be a member of v, -// into dest, which must be an address of a variable to which this field's -// address can be assigned. -func FieldPtr(v reflect.Value, fieldName string, dest interface{}) error { - field := v.FieldByName(fieldName) - if !field.IsValid() { - return fmt.Errorf("couldn't find %v field in %#v", fieldName, v.Interface()) - } - v, err := conversion.EnforcePtr(dest) - if err != nil { - return err - } - field = field.Addr() - if field.Type().AssignableTo(v.Type()) { - v.Set(field) - return nil - } - if field.Type().ConvertibleTo(v.Type()) { - v.Set(field.Convert(v.Type())) - return nil - } - return fmt.Errorf("couldn't assign/convert %v to %v", field.Type(), v.Type()) -} - -// EncodeList ensures that each object in an array is converted to a Unknown{} in serialized form. -// TODO: accept a content type. -func EncodeList(e Encoder, objects []Object) error { - var errs []error - for i := range objects { - data, err := Encode(e, objects[i]) - if err != nil { - errs = append(errs, err) - continue - } - // TODO: Set ContentEncoding and ContentType. - objects[i] = &Unknown{Raw: data} - } - return errors.NewAggregate(errs) -} - -func decodeListItem(obj *Unknown, decoders []Decoder) (Object, error) { - for _, decoder := range decoders { - // TODO: Decode based on ContentType. - obj, err := Decode(decoder, obj.Raw) - if err != nil { - if IsNotRegisteredError(err) { - continue - } - return nil, err - } - return obj, nil - } - // could not decode, so leave the object as Unknown, but give the decoders the - // chance to set Unknown.TypeMeta if it is available. - for _, decoder := range decoders { - if err := DecodeInto(decoder, obj.Raw, obj); err == nil { - return obj, nil - } - } - return obj, nil -} - -// DecodeList alters the list in place, attempting to decode any objects found in -// the list that have the Unknown type. Any errors that occur are returned -// after the entire list is processed. Decoders are tried in order. -func DecodeList(objects []Object, decoders ...Decoder) []error { - errs := []error(nil) - for i, obj := range objects { - switch t := obj.(type) { - case *Unknown: - decoded, err := decodeListItem(t, decoders) - if err != nil { - errs = append(errs, err) - break - } - objects[i] = decoded - } - } - return errs -} - -// MultiObjectTyper returns the types of objects across multiple schemes in order. -type MultiObjectTyper []ObjectTyper - -var _ ObjectTyper = MultiObjectTyper{} - -func (m MultiObjectTyper) ObjectKinds(obj Object) (gvks []schema.GroupVersionKind, unversionedType bool, err error) { - for _, t := range m { - gvks, unversionedType, err = t.ObjectKinds(obj) - if err == nil { - return - } - } - return -} - -func (m MultiObjectTyper) Recognizes(gvk schema.GroupVersionKind) bool { - for _, t := range m { - if t.Recognizes(gvk) { - return true - } - } - return false -} - -// SetZeroValue would set the object of objPtr to zero value of its type. -func SetZeroValue(objPtr Object) error { - v, err := conversion.EnforcePtr(objPtr) - if err != nil { - return err - } - v.Set(reflect.Zero(v.Type())) - return nil -} - -// DefaultFramer is valid for any stream that can read objects serially without -// any separation in the stream. -var DefaultFramer = defaultFramer{} - -type defaultFramer struct{} - -func (defaultFramer) NewFrameReader(r io.ReadCloser) io.ReadCloser { return r } -func (defaultFramer) NewFrameWriter(w io.Writer) io.Writer { return w } diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/interfaces.go b/vendor/k8s.io/kubernetes/pkg/runtime/interfaces.go deleted file mode 100644 index 0626e1ca..00000000 --- a/vendor/k8s.io/kubernetes/pkg/runtime/interfaces.go +++ /dev/null @@ -1,251 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package runtime - -import ( - "io" - "net/url" - - "k8s.io/kubernetes/pkg/runtime/schema" -) - -const ( - // APIVersionInternal may be used if you are registering a type that should not - // be considered stable or serialized - it is a convention only and has no - // special behavior in this package. - APIVersionInternal = "__internal" -) - -// GroupVersioner refines a set of possible conversion targets into a single option. -type GroupVersioner interface { - // KindForGroupVersionKinds returns a desired target group version kind for the given input, or returns ok false if no - // target is known. In general, if the return target is not in the input list, the caller is expected to invoke - // Scheme.New(target) and then perform a conversion between the current Go type and the destination Go type. - // Sophisticated implementations may use additional information about the input kinds to pick a destination kind. - KindForGroupVersionKinds(kinds []schema.GroupVersionKind) (target schema.GroupVersionKind, ok bool) -} - -// Encoders write objects to a serialized form -type Encoder interface { - // Encode writes an object to a stream. Implementations may return errors if the versions are - // incompatible, or if no conversion is defined. - Encode(obj Object, w io.Writer) error -} - -// Decoders attempt to load an object from data. -type Decoder interface { - // Decode attempts to deserialize the provided data using either the innate typing of the scheme or the - // default kind, group, and version provided. It returns a decoded object as well as the kind, group, and - // version from the serialized data, or an error. If into is non-nil, it will be used as the target type - // and implementations may choose to use it rather than reallocating an object. However, the object is not - // guaranteed to be populated. The returned object is not guaranteed to match into. If defaults are - // provided, they are applied to the data by default. If no defaults or partial defaults are provided, the - // type of the into may be used to guide conversion decisions. - Decode(data []byte, defaults *schema.GroupVersionKind, into Object) (Object, *schema.GroupVersionKind, error) -} - -// Serializer is the core interface for transforming objects into a serialized format and back. -// Implementations may choose to perform conversion of the object, but no assumptions should be made. -type Serializer interface { - Encoder - Decoder -} - -// Codec is a Serializer that deals with the details of versioning objects. It offers the same -// interface as Serializer, so this is a marker to consumers that care about the version of the objects -// they receive. -type Codec Serializer - -// ParameterCodec defines methods for serializing and deserializing API objects to url.Values and -// performing any necessary conversion. Unlike the normal Codec, query parameters are not self describing -// and the desired version must be specified. -type ParameterCodec interface { - // DecodeParameters takes the given url.Values in the specified group version and decodes them - // into the provided object, or returns an error. - DecodeParameters(parameters url.Values, from schema.GroupVersion, into Object) error - // EncodeParameters encodes the provided object as query parameters or returns an error. - EncodeParameters(obj Object, to schema.GroupVersion) (url.Values, error) -} - -// Framer is a factory for creating readers and writers that obey a particular framing pattern. -type Framer interface { - NewFrameReader(r io.ReadCloser) io.ReadCloser - NewFrameWriter(w io.Writer) io.Writer -} - -// SerializerInfo contains information about a specific serialization format -type SerializerInfo struct { - // MediaType is the value that represents this serializer over the wire. - MediaType string - // EncodesAsText indicates this serializer can be encoded to UTF-8 safely. - EncodesAsText bool - // Serializer is the individual object serializer for this media type. - Serializer Serializer - // PrettySerializer, if set, can serialize this object in a form biased towards - // readability. - PrettySerializer Serializer - // StreamSerializer, if set, describes the streaming serialization format - // for this media type. - StreamSerializer *StreamSerializerInfo -} - -// StreamSerializerInfo contains information about a specific stream serialization format -type StreamSerializerInfo struct { - // EncodesAsText indicates this serializer can be encoded to UTF-8 safely. - EncodesAsText bool - // Serializer is the top level object serializer for this type when streaming - Serializer - // Framer is the factory for retrieving streams that separate objects on the wire - Framer -} - -// NegotiatedSerializer is an interface used for obtaining encoders, decoders, and serializers -// for multiple supported media types. This would commonly be accepted by a server component -// that performs HTTP content negotiation to accept multiple formats. -type NegotiatedSerializer interface { - // SupportedMediaTypes is the media types supported for reading and writing single objects. - SupportedMediaTypes() []SerializerInfo - - // EncoderForVersion returns an encoder that ensures objects being written to the provided - // serializer are in the provided group version. - EncoderForVersion(serializer Encoder, gv GroupVersioner) Encoder - // DecoderForVersion returns a decoder that ensures objects being read by the provided - // serializer are in the provided group version by default. - DecoderToVersion(serializer Decoder, gv GroupVersioner) Decoder -} - -// StorageSerializer is an interface used for obtaining encoders, decoders, and serializers -// that can read and write data at rest. This would commonly be used by client tools that must -// read files, or server side storage interfaces that persist restful objects. -type StorageSerializer interface { - // SupportedMediaTypes are the media types supported for reading and writing objects. - SupportedMediaTypes() []SerializerInfo - - // UniversalDeserializer returns a Serializer that can read objects in multiple supported formats - // by introspecting the data at rest. - UniversalDeserializer() Decoder - - // EncoderForVersion returns an encoder that ensures objects being written to the provided - // serializer are in the provided group version. - EncoderForVersion(serializer Encoder, gv GroupVersioner) Encoder - // DecoderForVersion returns a decoder that ensures objects being read by the provided - // serializer are in the provided group version by default. - DecoderToVersion(serializer Decoder, gv GroupVersioner) Decoder -} - -// NestedObjectEncoder is an optional interface that objects may implement to be given -// an opportunity to encode any nested Objects / RawExtensions during serialization. -type NestedObjectEncoder interface { - EncodeNestedObjects(e Encoder) error -} - -// NestedObjectDecoder is an optional interface that objects may implement to be given -// an opportunity to decode any nested Objects / RawExtensions during serialization. -type NestedObjectDecoder interface { - DecodeNestedObjects(d Decoder) error -} - -/////////////////////////////////////////////////////////////////////////////// -// Non-codec interfaces - -type ObjectDefaulter interface { - // Default takes an object (must be a pointer) and applies any default values. - // Defaulters may not error. - Default(in Object) -} - -type ObjectVersioner interface { - ConvertToVersion(in Object, gv GroupVersioner) (out Object, err error) -} - -// ObjectConvertor converts an object to a different version. -type ObjectConvertor interface { - // Convert attempts to convert one object into another, or returns an error. This method does - // not guarantee the in object is not mutated. The context argument will be passed to - // all nested conversions. - Convert(in, out, context interface{}) error - // ConvertToVersion takes the provided object and converts it the provided version. This - // method does not guarantee that the in object is not mutated. This method is similar to - // Convert() but handles specific details of choosing the correct output version. - ConvertToVersion(in Object, gv GroupVersioner) (out Object, err error) - ConvertFieldLabel(version, kind, label, value string) (string, string, error) -} - -// ObjectTyper contains methods for extracting the APIVersion and Kind -// of objects. -type ObjectTyper interface { - // ObjectKinds returns the all possible group,version,kind of the provided object, true if - // the object is unversioned, or an error if the object is not recognized - // (IsNotRegisteredError will return true). - ObjectKinds(Object) ([]schema.GroupVersionKind, bool, error) - // Recognizes returns true if the scheme is able to handle the provided version and kind, - // or more precisely that the provided version is a possible conversion or decoding - // target. - Recognizes(gvk schema.GroupVersionKind) bool -} - -// ObjectCreater contains methods for instantiating an object by kind and version. -type ObjectCreater interface { - New(kind schema.GroupVersionKind) (out Object, err error) -} - -// ObjectCopier duplicates an object. -type ObjectCopier interface { - // Copy returns an exact copy of the provided Object, or an error if the - // copy could not be completed. - Copy(Object) (Object, error) -} - -// ResourceVersioner provides methods for setting and retrieving -// the resource version from an API object. -type ResourceVersioner interface { - SetResourceVersion(obj Object, version string) error - ResourceVersion(obj Object) (string, error) -} - -// SelfLinker provides methods for setting and retrieving the SelfLink field of an API object. -type SelfLinker interface { - SetSelfLink(obj Object, selfLink string) error - SelfLink(obj Object) (string, error) - - // Knowing Name is sometimes necessary to use a SelfLinker. - Name(obj Object) (string, error) - // Knowing Namespace is sometimes necessary to use a SelfLinker - Namespace(obj Object) (string, error) -} - -// All API types registered with Scheme must support the Object interface. Since objects in a scheme are -// expected to be serialized to the wire, the interface an Object must provide to the Scheme allows -// serializers to set the kind, version, and group the object is represented as. An Object may choose -// to return a no-op ObjectKindAccessor in cases where it is not expected to be serialized. -type Object interface { - GetObjectKind() schema.ObjectKind -} - -// Unstructured objects store values as map[string]interface{}, with only values that can be serialized -// to JSON allowed. -type Unstructured interface { - // IsUnstructuredObject is a marker interface to allow objects that can be serialized but not introspected - // to bypass conversion. - IsUnstructuredObject() - // IsList returns true if this type is a list or matches the list convention - has an array called "items". - IsList() bool - // UnstructuredContent returns a non-nil, mutable map of the contents of this object. Values may be - // []interface{}, map[string]interface{}, or any primitive type. Contents are typically serialized to - // and from JSON. - UnstructuredContent() map[string]interface{} -} diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/register.go b/vendor/k8s.io/kubernetes/pkg/runtime/register.go deleted file mode 100644 index f53507a3..00000000 --- a/vendor/k8s.io/kubernetes/pkg/runtime/register.go +++ /dev/null @@ -1,61 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package runtime - -import "k8s.io/kubernetes/pkg/runtime/schema" - -// SetGroupVersionKind satisfies the ObjectKind interface for all objects that embed TypeMeta -func (obj *TypeMeta) SetGroupVersionKind(gvk schema.GroupVersionKind) { - obj.APIVersion, obj.Kind = gvk.ToAPIVersionAndKind() -} - -// GroupVersionKind satisfies the ObjectKind interface for all objects that embed TypeMeta -func (obj *TypeMeta) GroupVersionKind() schema.GroupVersionKind { - return schema.FromAPIVersionAndKind(obj.APIVersion, obj.Kind) -} - -func (obj *Unknown) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta } - -// GetObjectKind implements Object for VersionedObjects, returning an empty ObjectKind -// interface if no objects are provided, or the ObjectKind interface of the object in the -// highest array position. -func (obj *VersionedObjects) GetObjectKind() schema.ObjectKind { - last := obj.Last() - if last == nil { - return schema.EmptyObjectKind - } - return last.GetObjectKind() -} - -// First returns the leftmost object in the VersionedObjects array, which is usually the -// object as serialized on the wire. -func (obj *VersionedObjects) First() Object { - if len(obj.Objects) == 0 { - return nil - } - return obj.Objects[0] -} - -// Last is the rightmost object in the VersionedObjects array, which is the object after -// all transformations have been applied. This is the same object that would be returned -// by Decode in a normal invocation (without VersionedObjects in the into argument). -func (obj *VersionedObjects) Last() Object { - if len(obj.Objects) == 0 { - return nil - } - return obj.Objects[len(obj.Objects)-1] -} diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/schema/.readonly b/vendor/k8s.io/kubernetes/pkg/runtime/schema/.readonly deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/schema/BUILD b/vendor/k8s.io/kubernetes/pkg/runtime/schema/BUILD deleted file mode 100644 index 467192cb..00000000 --- a/vendor/k8s.io/kubernetes/pkg/runtime/schema/BUILD +++ /dev/null @@ -1,40 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = [ - "generated.pb.go", - "group_version.go", - "interfaces.go", - ], - tags = ["automanaged"], - deps = ["//vendor:github.com/gogo/protobuf/proto"], -) - -go_test( - name = "go_default_test", - srcs = ["group_version_test.go"], - library = ":go_default_library", - tags = ["automanaged"], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/schema/generated.pb.go b/vendor/k8s.io/kubernetes/pkg/runtime/schema/generated.pb.go deleted file mode 100644 index 6febfc99..00000000 --- a/vendor/k8s.io/kubernetes/pkg/runtime/schema/generated.pb.go +++ /dev/null @@ -1,58 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by protoc-gen-gogo. -// source: k8s.io/kubernetes/pkg/runtime/schema/generated.proto -// DO NOT EDIT! - -/* - Package schema is a generated protocol buffer package. - - It is generated from these files: - k8s.io/kubernetes/pkg/runtime/schema/generated.proto - - It has these top-level messages: -*/ -package schema - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -const _ = proto.GoGoProtoPackageIsVersion1 - -var fileDescriptorGenerated = []byte{ - // 183 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x32, 0xc9, 0xb6, 0x28, 0xd6, - 0xcb, 0xcc, 0xd7, 0xcf, 0x2e, 0x4d, 0x4a, 0x2d, 0xca, 0x4b, 0x2d, 0x49, 0x2d, 0xd6, 0x2f, 0xc8, - 0x4e, 0xd7, 0x2f, 0x2a, 0xcd, 0x2b, 0xc9, 0xcc, 0x4d, 0xd5, 0x2f, 0x4e, 0xce, 0x48, 0xcd, 0x4d, - 0xd4, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0x4a, 0x2c, 0x49, 0x4d, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, - 0x17, 0x52, 0x81, 0xe8, 0xd2, 0x43, 0xe8, 0xd2, 0x2b, 0xc8, 0x4e, 0xd7, 0x83, 0xea, 0xd2, 0x83, - 0xe8, 0x92, 0xd2, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, - 0x4f, 0xcf, 0xd7, 0x07, 0x6b, 0x4e, 0x2a, 0x4d, 0x03, 0xf3, 0xc0, 0x1c, 0x30, 0x0b, 0x62, 0xa8, - 0x94, 0x21, 0x76, 0xa7, 0x94, 0x96, 0x64, 0xe6, 0xe8, 0x67, 0xe6, 0x95, 0x14, 0x97, 0x14, 0xa1, - 0xbb, 0xc3, 0x49, 0xe3, 0xc4, 0x43, 0x39, 0x86, 0x0b, 0x0f, 0xe5, 0x18, 0x6e, 0x3c, 0x94, 0x63, - 0x68, 0x78, 0x24, 0xc7, 0x78, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, - 0x31, 0x4e, 0x78, 0x2c, 0xc7, 0x10, 0xc5, 0x06, 0x71, 0x0b, 0x20, 0x00, 0x00, 0xff, 0xff, 0x8d, - 0x74, 0x75, 0xa7, 0xe8, 0x00, 0x00, 0x00, -} diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/schema/group_version.go b/vendor/k8s.io/kubernetes/pkg/runtime/schema/group_version.go deleted file mode 100644 index 1a9bba10..00000000 --- a/vendor/k8s.io/kubernetes/pkg/runtime/schema/group_version.go +++ /dev/null @@ -1,277 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package schema - -import ( - "fmt" - "strings" -) - -// ParseResourceArg takes the common style of string which may be either `resource.group.com` or `resource.version.group.com` -// and parses it out into both possibilities. This code takes no responsibility for knowing which representation was intended -// but with a knowledge of all GroupVersions, calling code can take a very good guess. If there are only two segments, then -// `*GroupVersionResource` is nil. -// `resource.group.com` -> `group=com, version=group, resource=resource` and `group=group.com, resource=resource` -func ParseResourceArg(arg string) (*GroupVersionResource, GroupResource) { - var gvr *GroupVersionResource - if strings.Count(arg, ".") >= 2 { - s := strings.SplitN(arg, ".", 3) - gvr = &GroupVersionResource{Group: s[2], Version: s[1], Resource: s[0]} - } - - return gvr, ParseGroupResource(arg) -} - -// GroupResource specifies a Group and a Resource, but does not force a version. This is useful for identifying -// concepts during lookup stages without having partially valid types -type GroupResource struct { - Group string - Resource string -} - -func (gr GroupResource) WithVersion(version string) GroupVersionResource { - return GroupVersionResource{Group: gr.Group, Version: version, Resource: gr.Resource} -} - -func (gr GroupResource) Empty() bool { - return len(gr.Group) == 0 && len(gr.Resource) == 0 -} - -func (gr *GroupResource) String() string { - if len(gr.Group) == 0 { - return gr.Resource - } - return gr.Resource + "." + gr.Group -} - -// ParseGroupResource turns "resource.group" string into a GroupResource struct. Empty strings are allowed -// for each field. -func ParseGroupResource(gr string) GroupResource { - if i := strings.Index(gr, "."); i == -1 { - return GroupResource{Resource: gr} - } else { - return GroupResource{Group: gr[i+1:], Resource: gr[:i]} - } -} - -// GroupVersionResource unambiguously identifies a resource. It doesn't anonymously include GroupVersion -// to avoid automatic coercion. It doesn't use a GroupVersion to avoid custom marshalling -type GroupVersionResource struct { - Group string - Version string - Resource string -} - -func (gvr GroupVersionResource) Empty() bool { - return len(gvr.Group) == 0 && len(gvr.Version) == 0 && len(gvr.Resource) == 0 -} - -func (gvr GroupVersionResource) GroupResource() GroupResource { - return GroupResource{Group: gvr.Group, Resource: gvr.Resource} -} - -func (gvr GroupVersionResource) GroupVersion() GroupVersion { - return GroupVersion{Group: gvr.Group, Version: gvr.Version} -} - -func (gvr *GroupVersionResource) String() string { - return strings.Join([]string{gvr.Group, "/", gvr.Version, ", Resource=", gvr.Resource}, "") -} - -// GroupKind specifies a Group and a Kind, but does not force a version. This is useful for identifying -// concepts during lookup stages without having partially valid types -type GroupKind struct { - Group string - Kind string -} - -func (gk GroupKind) Empty() bool { - return len(gk.Group) == 0 && len(gk.Kind) == 0 -} - -func (gk GroupKind) WithVersion(version string) GroupVersionKind { - return GroupVersionKind{Group: gk.Group, Version: version, Kind: gk.Kind} -} - -func (gk *GroupKind) String() string { - if len(gk.Group) == 0 { - return gk.Kind - } - return gk.Kind + "." + gk.Group -} - -// GroupVersionKind unambiguously identifies a kind. It doesn't anonymously include GroupVersion -// to avoid automatic coercion. It doesn't use a GroupVersion to avoid custom marshalling -type GroupVersionKind struct { - Group string - Version string - Kind string -} - -// Empty returns true if group, version, and kind are empty -func (gvk GroupVersionKind) Empty() bool { - return len(gvk.Group) == 0 && len(gvk.Version) == 0 && len(gvk.Kind) == 0 -} - -func (gvk GroupVersionKind) GroupKind() GroupKind { - return GroupKind{Group: gvk.Group, Kind: gvk.Kind} -} - -func (gvk GroupVersionKind) GroupVersion() GroupVersion { - return GroupVersion{Group: gvk.Group, Version: gvk.Version} -} - -func (gvk GroupVersionKind) String() string { - return gvk.Group + "/" + gvk.Version + ", Kind=" + gvk.Kind -} - -// GroupVersion contains the "group" and the "version", which uniquely identifies the API. -type GroupVersion struct { - Group string - Version string -} - -// Empty returns true if group and version are empty -func (gv GroupVersion) Empty() bool { - return len(gv.Group) == 0 && len(gv.Version) == 0 -} - -// String puts "group" and "version" into a single "group/version" string. For the legacy v1 -// it returns "v1". -func (gv GroupVersion) String() string { - // special case the internal apiVersion for the legacy kube types - if gv.Empty() { - return "" - } - - // special case of "v1" for backward compatibility - if len(gv.Group) == 0 && gv.Version == "v1" { - return gv.Version - } - if len(gv.Group) > 0 { - return gv.Group + "/" + gv.Version - } - return gv.Version -} - -// KindForGroupVersionKinds identifies the preferred GroupVersionKind out of a list. It returns ok false -// if none of the options match the group. It prefers a match to group and version over just group. -// TODO: Move GroupVersion to a package under pkg/runtime, since it's used by scheme. -// TODO: Introduce an adapter type between GroupVersion and runtime.GroupVersioner, and use LegacyCodec(GroupVersion) -// in fewer places. -func (gv GroupVersion) KindForGroupVersionKinds(kinds []GroupVersionKind) (target GroupVersionKind, ok bool) { - for _, gvk := range kinds { - if gvk.Group == gv.Group && gvk.Version == gv.Version { - return gvk, true - } - } - for _, gvk := range kinds { - if gvk.Group == gv.Group { - return gv.WithKind(gvk.Kind), true - } - } - return GroupVersionKind{}, false -} - -// ParseGroupVersion turns "group/version" string into a GroupVersion struct. It reports error -// if it cannot parse the string. -func ParseGroupVersion(gv string) (GroupVersion, error) { - // this can be the internal version for the legacy kube types - // TODO once we've cleared the last uses as strings, this special case should be removed. - if (len(gv) == 0) || (gv == "/") { - return GroupVersion{}, nil - } - - switch strings.Count(gv, "/") { - case 0: - return GroupVersion{"", gv}, nil - case 1: - i := strings.Index(gv, "/") - return GroupVersion{gv[:i], gv[i+1:]}, nil - default: - return GroupVersion{}, fmt.Errorf("unexpected GroupVersion string: %v", gv) - } -} - -// WithKind creates a GroupVersionKind based on the method receiver's GroupVersion and the passed Kind. -func (gv GroupVersion) WithKind(kind string) GroupVersionKind { - return GroupVersionKind{Group: gv.Group, Version: gv.Version, Kind: kind} -} - -// WithResource creates a GroupVersionResource based on the method receiver's GroupVersion and the passed Resource. -func (gv GroupVersion) WithResource(resource string) GroupVersionResource { - return GroupVersionResource{Group: gv.Group, Version: gv.Version, Resource: resource} -} - -// GroupVersions can be used to represent a set of desired group versions. -// TODO: Move GroupVersions to a package under pkg/runtime, since it's used by scheme. -// TODO: Introduce an adapter type between GroupVersions and runtime.GroupVersioner, and use LegacyCodec(GroupVersion) -// in fewer places. -type GroupVersions []GroupVersion - -// KindForGroupVersionKinds identifies the preferred GroupVersionKind out of a list. It returns ok false -// if none of the options match the group. -func (gvs GroupVersions) KindForGroupVersionKinds(kinds []GroupVersionKind) (GroupVersionKind, bool) { - var targets []GroupVersionKind - for _, gv := range gvs { - target, ok := gv.KindForGroupVersionKinds(kinds) - if !ok { - continue - } - targets = append(targets, target) - } - if len(targets) == 1 { - return targets[0], true - } - if len(targets) > 1 { - return bestMatch(kinds, targets), true - } - return GroupVersionKind{}, false -} - -// bestMatch tries to pick best matching GroupVersionKind and falls back to the first -// found if no exact match exists. -func bestMatch(kinds []GroupVersionKind, targets []GroupVersionKind) GroupVersionKind { - for _, gvk := range targets { - for _, k := range kinds { - if k == gvk { - return k - } - } - } - return targets[0] -} - -// ToAPIVersionAndKind is a convenience method for satisfying runtime.Object on types that -// do not use TypeMeta. -func (gvk *GroupVersionKind) ToAPIVersionAndKind() (string, string) { - if gvk == nil { - return "", "" - } - return gvk.GroupVersion().String(), gvk.Kind -} - -// FromAPIVersionAndKind returns a GVK representing the provided fields for types that -// do not use TypeMeta. This method exists to support test types and legacy serializations -// that have a distinct group and kind. -// TODO: further reduce usage of this method. -func FromAPIVersionAndKind(apiVersion, kind string) GroupVersionKind { - if gv, err := ParseGroupVersion(apiVersion); err == nil { - return GroupVersionKind{Group: gv.Group, Version: gv.Version, Kind: kind} - } - return GroupVersionKind{Kind: kind} -} diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/schema/group_version_test.go b/vendor/k8s.io/kubernetes/pkg/runtime/schema/group_version_test.go deleted file mode 100644 index 51f26df7..00000000 --- a/vendor/k8s.io/kubernetes/pkg/runtime/schema/group_version_test.go +++ /dev/null @@ -1,136 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package schema - -import ( - "testing" -) - -func TestGroupVersionParse(t *testing.T) { - tests := []struct { - input string - out GroupVersion - err func(error) bool - }{ - {input: "v1", out: GroupVersion{Version: "v1"}}, - {input: "v2", out: GroupVersion{Version: "v2"}}, - {input: "/v1", out: GroupVersion{Version: "v1"}}, - {input: "v1/", out: GroupVersion{Group: "v1"}}, - {input: "/v1/", err: func(err error) bool { return err.Error() == "unexpected GroupVersion string: /v1/" }}, - {input: "v1/a", out: GroupVersion{Group: "v1", Version: "a"}}, - } - for i, test := range tests { - out, err := ParseGroupVersion(test.input) - if test.err == nil && err != nil || err == nil && test.err != nil { - t.Errorf("%d: unexpected error: %v", i, err) - continue - } - if test.err != nil && !test.err(err) { - t.Errorf("%d: unexpected error: %v", i, err) - continue - } - if out != test.out { - t.Errorf("%d: unexpected output: %#v", i, out) - } - } -} - -func TestGroupResourceParse(t *testing.T) { - tests := []struct { - input string - out GroupResource - }{ - {input: "v1", out: GroupResource{Resource: "v1"}}, - {input: ".v1", out: GroupResource{Group: "v1"}}, - {input: "v1.", out: GroupResource{Resource: "v1"}}, - {input: "v1.a", out: GroupResource{Group: "a", Resource: "v1"}}, - {input: "b.v1.a", out: GroupResource{Group: "v1.a", Resource: "b"}}, - } - for i, test := range tests { - out := ParseGroupResource(test.input) - if out != test.out { - t.Errorf("%d: unexpected output: %#v", i, out) - } - } -} - -func TestParseResourceArg(t *testing.T) { - tests := []struct { - input string - gvr *GroupVersionResource - gr GroupResource - }{ - {input: "v1", gr: GroupResource{Resource: "v1"}}, - {input: ".v1", gr: GroupResource{Group: "v1"}}, - {input: "v1.", gr: GroupResource{Resource: "v1"}}, - {input: "v1.a", gr: GroupResource{Group: "a", Resource: "v1"}}, - {input: "b.v1.a", gvr: &GroupVersionResource{Group: "a", Version: "v1", Resource: "b"}, gr: GroupResource{Group: "v1.a", Resource: "b"}}, - } - for i, test := range tests { - gvr, gr := ParseResourceArg(test.input) - if (gvr != nil && test.gvr == nil) || (gvr == nil && test.gvr != nil) || (test.gvr != nil && *gvr != *test.gvr) { - t.Errorf("%d: unexpected output: %#v", i, gvr) - } - if gr != test.gr { - t.Errorf("%d: unexpected output: %#v", i, gr) - } - } -} - -func TestKindForGroupVersionKinds(t *testing.T) { - gvks := GroupVersions{ - GroupVersion{Group: "batch", Version: "v1"}, - GroupVersion{Group: "batch", Version: "v2alpha1"}, - GroupVersion{Group: "policy", Version: "v1beta1"}, - } - cases := []struct { - input []GroupVersionKind - target GroupVersionKind - ok bool - }{ - { - input: []GroupVersionKind{{Group: "batch", Version: "v2alpha1", Kind: "ScheduledJob"}}, - target: GroupVersionKind{Group: "batch", Version: "v2alpha1", Kind: "ScheduledJob"}, - ok: true, - }, - { - input: []GroupVersionKind{{Group: "batch", Version: "v3alpha1", Kind: "CronJob"}}, - target: GroupVersionKind{Group: "batch", Version: "v1", Kind: "CronJob"}, - ok: true, - }, - { - input: []GroupVersionKind{{Group: "policy", Version: "v1beta1", Kind: "PodDisruptionBudget"}}, - target: GroupVersionKind{Group: "policy", Version: "v1beta1", Kind: "PodDisruptionBudget"}, - ok: true, - }, - { - input: []GroupVersionKind{{Group: "apps", Version: "v1alpha1", Kind: "StatefulSet"}}, - target: GroupVersionKind{}, - ok: false, - }, - } - - for i, c := range cases { - target, ok := gvks.KindForGroupVersionKinds(c.input) - if c.target != target { - t.Errorf("%d: unexpected target: %v, expected %v", i, target, c.target) - } - if c.ok != ok { - t.Errorf("%d: unexpected ok: %v, expected %v", i, ok, c.ok) - } - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/schema/interfaces.go b/vendor/k8s.io/kubernetes/pkg/runtime/schema/interfaces.go deleted file mode 100644 index b5706684..00000000 --- a/vendor/k8s.io/kubernetes/pkg/runtime/schema/interfaces.go +++ /dev/null @@ -1,40 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package schema - -// All objects that are serialized from a Scheme encode their type information. This interface is used -// by serialization to set type information from the Scheme onto the serialized version of an object. -// For objects that cannot be serialized or have unique requirements, this interface may be a no-op. -type ObjectKind interface { - // SetGroupVersionKind sets or clears the intended serialized kind of an object. Passing kind nil - // should clear the current setting. - SetGroupVersionKind(kind GroupVersionKind) - // GroupVersionKind returns the stored group, version, and kind of an object, or nil if the object does - // not expose or provide these fields. - GroupVersionKind() GroupVersionKind -} - -// EmptyObjectKind implements the ObjectKind interface as a noop -var EmptyObjectKind = emptyObjectKind{} - -type emptyObjectKind struct{} - -// SetGroupVersionKind implements the ObjectKind interface -func (emptyObjectKind) SetGroupVersionKind(gvk GroupVersionKind) {} - -// GroupVersionKind implements the ObjectKind interface -func (emptyObjectKind) GroupVersionKind() GroupVersionKind { return GroupVersionKind{} } diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/scheme.go b/vendor/k8s.io/kubernetes/pkg/runtime/scheme.go deleted file mode 100644 index 1650b76b..00000000 --- a/vendor/k8s.io/kubernetes/pkg/runtime/scheme.go +++ /dev/null @@ -1,600 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package runtime - -import ( - "fmt" - "net/url" - "reflect" - - "k8s.io/kubernetes/pkg/conversion" - "k8s.io/kubernetes/pkg/runtime/schema" -) - -// Scheme defines methods for serializing and deserializing API objects, a type -// registry for converting group, version, and kind information to and from Go -// schemas, and mappings between Go schemas of different versions. A scheme is the -// foundation for a versioned API and versioned configuration over time. -// -// In a Scheme, a Type is a particular Go struct, a Version is a point-in-time -// identifier for a particular representation of that Type (typically backwards -// compatible), a Kind is the unique name for that Type within the Version, and a -// Group identifies a set of Versions, Kinds, and Types that evolve over time. An -// Unversioned Type is one that is not yet formally bound to a type and is promised -// to be backwards compatible (effectively a "v1" of a Type that does not expect -// to break in the future). -// -// Schemes are not expected to change at runtime and are only threadsafe after -// registration is complete. -type Scheme struct { - // versionMap allows one to figure out the go type of an object with - // the given version and name. - gvkToType map[schema.GroupVersionKind]reflect.Type - - // typeToGroupVersion allows one to find metadata for a given go object. - // The reflect.Type we index by should *not* be a pointer. - typeToGVK map[reflect.Type][]schema.GroupVersionKind - - // unversionedTypes are transformed without conversion in ConvertToVersion. - unversionedTypes map[reflect.Type]schema.GroupVersionKind - - // unversionedKinds are the names of kinds that can be created in the context of any group - // or version - // TODO: resolve the status of unversioned types. - unversionedKinds map[string]reflect.Type - - // Map from version and resource to the corresponding func to convert - // resource field labels in that version to internal version. - fieldLabelConversionFuncs map[string]map[string]FieldLabelConversionFunc - - // defaulterFuncs is an array of interfaces to be called with an object to provide defaulting - // the provided object must be a pointer. - defaulterFuncs map[reflect.Type]func(interface{}) - - // converter stores all registered conversion functions. It also has - // default coverting behavior. - converter *conversion.Converter - - // cloner stores all registered copy functions. It also has default - // deep copy behavior. - cloner *conversion.Cloner -} - -// Function to convert a field selector to internal representation. -type FieldLabelConversionFunc func(label, value string) (internalLabel, internalValue string, err error) - -// NewScheme creates a new Scheme. This scheme is pluggable by default. -func NewScheme() *Scheme { - s := &Scheme{ - gvkToType: map[schema.GroupVersionKind]reflect.Type{}, - typeToGVK: map[reflect.Type][]schema.GroupVersionKind{}, - unversionedTypes: map[reflect.Type]schema.GroupVersionKind{}, - unversionedKinds: map[string]reflect.Type{}, - cloner: conversion.NewCloner(), - fieldLabelConversionFuncs: map[string]map[string]FieldLabelConversionFunc{}, - defaulterFuncs: map[reflect.Type]func(interface{}){}, - } - s.converter = conversion.NewConverter(s.nameFunc) - - s.AddConversionFuncs(DefaultEmbeddedConversions()...) - - // Enable map[string][]string conversions by default - if err := s.AddConversionFuncs(DefaultStringConversions...); err != nil { - panic(err) - } - if err := s.RegisterInputDefaults(&map[string][]string{}, JSONKeyMapper, conversion.AllowDifferentFieldTypeNames|conversion.IgnoreMissingFields); err != nil { - panic(err) - } - if err := s.RegisterInputDefaults(&url.Values{}, JSONKeyMapper, conversion.AllowDifferentFieldTypeNames|conversion.IgnoreMissingFields); err != nil { - panic(err) - } - return s -} - -// nameFunc returns the name of the type that we wish to use to determine when two types attempt -// a conversion. Defaults to the go name of the type if the type is not registered. -func (s *Scheme) nameFunc(t reflect.Type) string { - // find the preferred names for this type - gvks, ok := s.typeToGVK[t] - if !ok { - return t.Name() - } - - for _, gvk := range gvks { - internalGV := gvk.GroupVersion() - internalGV.Version = "__internal" // this is hacky and maybe should be passed in - internalGVK := internalGV.WithKind(gvk.Kind) - - if internalType, exists := s.gvkToType[internalGVK]; exists { - return s.typeToGVK[internalType][0].Kind - } - } - - return gvks[0].Kind -} - -// fromScope gets the input version, desired output version, and desired Scheme -// from a conversion.Scope. -func (s *Scheme) fromScope(scope conversion.Scope) *Scheme { - return s -} - -// Converter allows access to the converter for the scheme -func (s *Scheme) Converter() *conversion.Converter { - return s.converter -} - -// AddUnversionedTypes registers the provided types as "unversioned", which means that they follow special rules. -// Whenever an object of this type is serialized, it is serialized with the provided group version and is not -// converted. Thus unversioned objects are expected to remain backwards compatible forever, as if they were in an -// API group and version that would never be updated. -// -// TODO: there is discussion about removing unversioned and replacing it with objects that are manifest into -// every version with particular schemas. Resolve this method at that point. -func (s *Scheme) AddUnversionedTypes(version schema.GroupVersion, types ...Object) { - s.AddKnownTypes(version, types...) - for _, obj := range types { - t := reflect.TypeOf(obj).Elem() - gvk := version.WithKind(t.Name()) - s.unversionedTypes[t] = gvk - if _, ok := s.unversionedKinds[gvk.Kind]; ok { - panic(fmt.Sprintf("%v has already been registered as unversioned kind %q - kind name must be unique", reflect.TypeOf(t), gvk.Kind)) - } - s.unversionedKinds[gvk.Kind] = t - } -} - -// AddKnownTypes registers all types passed in 'types' as being members of version 'version'. -// All objects passed to types should be pointers to structs. The name that go reports for -// the struct becomes the "kind" field when encoding. Version may not be empty - use the -// APIVersionInternal constant if you have a type that does not have a formal version. -func (s *Scheme) AddKnownTypes(gv schema.GroupVersion, types ...Object) { - if len(gv.Version) == 0 { - panic(fmt.Sprintf("version is required on all types: %s %v", gv, types[0])) - } - for _, obj := range types { - t := reflect.TypeOf(obj) - if t.Kind() != reflect.Ptr { - panic("All types must be pointers to structs.") - } - t = t.Elem() - if t.Kind() != reflect.Struct { - panic("All types must be pointers to structs.") - } - - gvk := gv.WithKind(t.Name()) - s.gvkToType[gvk] = t - s.typeToGVK[t] = append(s.typeToGVK[t], gvk) - } -} - -// AddKnownTypeWithName is like AddKnownTypes, but it lets you specify what this type should -// be encoded as. Useful for testing when you don't want to make multiple packages to define -// your structs. Version may not be empty - use the APIVersionInternal constant if you have a -// type that does not have a formal version. -func (s *Scheme) AddKnownTypeWithName(gvk schema.GroupVersionKind, obj Object) { - t := reflect.TypeOf(obj) - if len(gvk.Version) == 0 { - panic(fmt.Sprintf("version is required on all types: %s %v", gvk, t)) - } - if t.Kind() != reflect.Ptr { - panic("All types must be pointers to structs.") - } - t = t.Elem() - if t.Kind() != reflect.Struct { - panic("All types must be pointers to structs.") - } - - s.gvkToType[gvk] = t - s.typeToGVK[t] = append(s.typeToGVK[t], gvk) -} - -// KnownTypes returns the types known for the given version. -func (s *Scheme) KnownTypes(gv schema.GroupVersion) map[string]reflect.Type { - types := make(map[string]reflect.Type) - for gvk, t := range s.gvkToType { - if gv != gvk.GroupVersion() { - continue - } - - types[gvk.Kind] = t - } - return types -} - -// AllKnownTypes returns the all known types. -func (s *Scheme) AllKnownTypes() map[schema.GroupVersionKind]reflect.Type { - return s.gvkToType -} - -// ObjectKind returns the group,version,kind of the go object and true if this object -// is considered unversioned, or an error if it's not a pointer or is unregistered. -func (s *Scheme) ObjectKind(obj Object) (schema.GroupVersionKind, bool, error) { - gvks, unversionedType, err := s.ObjectKinds(obj) - if err != nil { - return schema.GroupVersionKind{}, false, err - } - return gvks[0], unversionedType, nil -} - -// ObjectKinds returns all possible group,version,kind of the go object, true if the -// object is considered unversioned, or an error if it's not a pointer or is unregistered. -func (s *Scheme) ObjectKinds(obj Object) ([]schema.GroupVersionKind, bool, error) { - v, err := conversion.EnforcePtr(obj) - if err != nil { - return nil, false, err - } - t := v.Type() - - gvks, ok := s.typeToGVK[t] - if !ok { - return nil, false, NewNotRegisteredErr(schema.GroupVersionKind{}, t) - } - _, unversionedType := s.unversionedTypes[t] - - return gvks, unversionedType, nil -} - -// Recognizes returns true if the scheme is able to handle the provided group,version,kind -// of an object. -func (s *Scheme) Recognizes(gvk schema.GroupVersionKind) bool { - _, exists := s.gvkToType[gvk] - return exists -} - -func (s *Scheme) IsUnversioned(obj Object) (bool, bool) { - v, err := conversion.EnforcePtr(obj) - if err != nil { - return false, false - } - t := v.Type() - - if _, ok := s.typeToGVK[t]; !ok { - return false, false - } - _, ok := s.unversionedTypes[t] - return ok, true -} - -// New returns a new API object of the given version and name, or an error if it hasn't -// been registered. The version and kind fields must be specified. -func (s *Scheme) New(kind schema.GroupVersionKind) (Object, error) { - if t, exists := s.gvkToType[kind]; exists { - return reflect.New(t).Interface().(Object), nil - } - - if t, exists := s.unversionedKinds[kind.Kind]; exists { - return reflect.New(t).Interface().(Object), nil - } - return nil, NewNotRegisteredErr(kind, nil) -} - -// AddGenericConversionFunc adds a function that accepts the ConversionFunc call pattern -// (for two conversion types) to the converter. These functions are checked first during -// a normal conversion, but are otherwise not called. Use AddConversionFuncs when registering -// typed conversions. -func (s *Scheme) AddGenericConversionFunc(fn conversion.GenericConversionFunc) { - s.converter.AddGenericConversionFunc(fn) -} - -// Log sets a logger on the scheme. For test purposes only -func (s *Scheme) Log(l conversion.DebugLogger) { - s.converter.Debug = l -} - -// AddIgnoredConversionType identifies a pair of types that should be skipped by -// conversion (because the data inside them is explicitly dropped during -// conversion). -func (s *Scheme) AddIgnoredConversionType(from, to interface{}) error { - return s.converter.RegisterIgnoredConversion(from, to) -} - -// AddConversionFuncs adds functions to the list of conversion functions. The given -// functions should know how to convert between two of your API objects, or their -// sub-objects. We deduce how to call these functions from the types of their two -// parameters; see the comment for Converter.Register. -// -// Note that, if you need to copy sub-objects that didn't change, you can use the -// conversion.Scope object that will be passed to your conversion function. -// Additionally, all conversions started by Scheme will set the SrcVersion and -// DestVersion fields on the Meta object. Example: -// -// s.AddConversionFuncs( -// func(in *InternalObject, out *ExternalObject, scope conversion.Scope) error { -// // You can depend on Meta() being non-nil, and this being set to -// // the source version, e.g., "" -// s.Meta().SrcVersion -// // You can depend on this being set to the destination version, -// // e.g., "v1". -// s.Meta().DestVersion -// // Call scope.Convert to copy sub-fields. -// s.Convert(&in.SubFieldThatMoved, &out.NewLocation.NewName, 0) -// return nil -// }, -// ) -// -// (For more detail about conversion functions, see Converter.Register's comment.) -// -// Also note that the default behavior, if you don't add a conversion function, is to -// sanely copy fields that have the same names and same type names. It's OK if the -// destination type has extra fields, but it must not remove any. So you only need to -// add conversion functions for things with changed/removed fields. -func (s *Scheme) AddConversionFuncs(conversionFuncs ...interface{}) error { - for _, f := range conversionFuncs { - if err := s.converter.RegisterConversionFunc(f); err != nil { - return err - } - } - return nil -} - -// Similar to AddConversionFuncs, but registers conversion functions that were -// automatically generated. -func (s *Scheme) AddGeneratedConversionFuncs(conversionFuncs ...interface{}) error { - for _, f := range conversionFuncs { - if err := s.converter.RegisterGeneratedConversionFunc(f); err != nil { - return err - } - } - return nil -} - -// AddDeepCopyFuncs adds a function to the list of deep-copy functions. -// For the expected format of deep-copy function, see the comment for -// Copier.RegisterDeepCopyFunction. -func (s *Scheme) AddDeepCopyFuncs(deepCopyFuncs ...interface{}) error { - for _, f := range deepCopyFuncs { - if err := s.cloner.RegisterDeepCopyFunc(f); err != nil { - return err - } - } - return nil -} - -// Similar to AddDeepCopyFuncs, but registers deep-copy functions that were -// automatically generated. -func (s *Scheme) AddGeneratedDeepCopyFuncs(deepCopyFuncs ...conversion.GeneratedDeepCopyFunc) error { - for _, fn := range deepCopyFuncs { - if err := s.cloner.RegisterGeneratedDeepCopyFunc(fn); err != nil { - return err - } - } - return nil -} - -// AddFieldLabelConversionFunc adds a conversion function to convert field selectors -// of the given kind from the given version to internal version representation. -func (s *Scheme) AddFieldLabelConversionFunc(version, kind string, conversionFunc FieldLabelConversionFunc) error { - if s.fieldLabelConversionFuncs[version] == nil { - s.fieldLabelConversionFuncs[version] = map[string]FieldLabelConversionFunc{} - } - - s.fieldLabelConversionFuncs[version][kind] = conversionFunc - return nil -} - -// AddStructFieldConversion allows you to specify a mechanical copy for a moved -// or renamed struct field without writing an entire conversion function. See -// the comment in conversion.Converter.SetStructFieldCopy for parameter details. -// Call as many times as needed, even on the same fields. -func (s *Scheme) AddStructFieldConversion(srcFieldType interface{}, srcFieldName string, destFieldType interface{}, destFieldName string) error { - return s.converter.SetStructFieldCopy(srcFieldType, srcFieldName, destFieldType, destFieldName) -} - -// RegisterInputDefaults sets the provided field mapping function and field matching -// as the defaults for the provided input type. The fn may be nil, in which case no -// mapping will happen by default. Use this method to register a mechanism for handling -// a specific input type in conversion, such as a map[string]string to structs. -func (s *Scheme) RegisterInputDefaults(in interface{}, fn conversion.FieldMappingFunc, defaultFlags conversion.FieldMatchingFlags) error { - return s.converter.RegisterInputDefaults(in, fn, defaultFlags) -} - -// AddDefaultingFuncs adds functions to the list of default-value functions. -// Each of the given functions is responsible for applying default values -// when converting an instance of a versioned API object into an internal -// API object. These functions do not need to handle sub-objects. We deduce -// how to call these functions from the types of their two parameters. -// -// s.AddDefaultingFuncs( -// func(obj *v1.Pod) { -// if obj.OptionalField == "" { -// obj.OptionalField = "DefaultValue" -// } -// }, -// ) -func (s *Scheme) AddDefaultingFuncs(defaultingFuncs ...interface{}) error { - for _, f := range defaultingFuncs { - err := s.converter.RegisterDefaultingFunc(f) - if err != nil { - return err - } - } - return nil -} - -// AddTypeDefaultingFuncs registers a function that is passed a pointer to an -// object and can default fields on the object. These functions will be invoked -// when Default() is called. The function will never be called unless the -// defaulted object matches srcType. If this function is invoked twice with the -// same srcType, the fn passed to the later call will be used instead. -func (s *Scheme) AddTypeDefaultingFunc(srcType Object, fn func(interface{})) { - s.defaulterFuncs[reflect.TypeOf(srcType)] = fn -} - -// Default sets defaults on the provided Object. -func (s *Scheme) Default(src Object) { - if fn, ok := s.defaulterFuncs[reflect.TypeOf(src)]; ok { - fn(src) - } -} - -// Copy does a deep copy of an API object. -func (s *Scheme) Copy(src Object) (Object, error) { - dst, err := s.DeepCopy(src) - if err != nil { - return nil, err - } - return dst.(Object), nil -} - -// Performs a deep copy of the given object. -func (s *Scheme) DeepCopy(src interface{}) (interface{}, error) { - return s.cloner.DeepCopy(src) -} - -// Convert will attempt to convert in into out. Both must be pointers. For easy -// testing of conversion functions. Returns an error if the conversion isn't -// possible. You can call this with types that haven't been registered (for example, -// a to test conversion of types that are nested within registered types). The -// context interface is passed to the convertor. -// TODO: identify whether context should be hidden, or behind a formal context/scope -// interface -func (s *Scheme) Convert(in, out interface{}, context interface{}) error { - flags, meta := s.generateConvertMeta(in) - meta.Context = context - if flags == 0 { - flags = conversion.AllowDifferentFieldTypeNames - } - return s.converter.Convert(in, out, flags, meta) -} - -// Converts the given field label and value for an kind field selector from -// versioned representation to an unversioned one. -func (s *Scheme) ConvertFieldLabel(version, kind, label, value string) (string, string, error) { - if s.fieldLabelConversionFuncs[version] == nil { - return "", "", fmt.Errorf("No field label conversion function found for version: %s", version) - } - conversionFunc, ok := s.fieldLabelConversionFuncs[version][kind] - if !ok { - return "", "", fmt.Errorf("No field label conversion function found for version %s and kind %s", version, kind) - } - return conversionFunc(label, value) -} - -// ConvertToVersion attempts to convert an input object to its matching Kind in another -// version within this scheme. Will return an error if the provided version does not -// contain the inKind (or a mapping by name defined with AddKnownTypeWithName). Will also -// return an error if the conversion does not result in a valid Object being -// returned. Passes target down to the conversion methods as the Context on the scope. -func (s *Scheme) ConvertToVersion(in Object, target GroupVersioner) (Object, error) { - return s.convertToVersion(true, in, target) -} - -// UnsafeConvertToVersion will convert in to the provided target if such a conversion is possible, -// but does not guarantee the output object does not share fields with the input object. It attempts to be as -// efficient as possible when doing conversion. -func (s *Scheme) UnsafeConvertToVersion(in Object, target GroupVersioner) (Object, error) { - return s.convertToVersion(false, in, target) -} - -// convertToVersion handles conversion with an optional copy. -func (s *Scheme) convertToVersion(copy bool, in Object, target GroupVersioner) (Object, error) { - // determine the incoming kinds with as few allocations as possible. - t := reflect.TypeOf(in) - if t.Kind() != reflect.Ptr { - return nil, fmt.Errorf("only pointer types may be converted: %v", t) - } - t = t.Elem() - if t.Kind() != reflect.Struct { - return nil, fmt.Errorf("only pointers to struct types may be converted: %v", t) - } - kinds, ok := s.typeToGVK[t] - if !ok || len(kinds) == 0 { - return nil, NewNotRegisteredErr(schema.GroupVersionKind{}, t) - } - - gvk, ok := target.KindForGroupVersionKinds(kinds) - if !ok { - // try to see if this type is listed as unversioned (for legacy support) - // TODO: when we move to server API versions, we should completely remove the unversioned concept - if unversionedKind, ok := s.unversionedTypes[t]; ok { - if gvk, ok := target.KindForGroupVersionKinds([]schema.GroupVersionKind{unversionedKind}); ok { - return copyAndSetTargetKind(copy, s, in, gvk) - } - return copyAndSetTargetKind(copy, s, in, unversionedKind) - } - - // TODO: should this be a typed error? - return nil, fmt.Errorf("%v is not suitable for converting to %q", t, target) - } - - // target wants to use the existing type, set kind and return (no conversion necessary) - for _, kind := range kinds { - if gvk == kind { - return copyAndSetTargetKind(copy, s, in, gvk) - } - } - - // type is unversioned, no conversion necessary - if unversionedKind, ok := s.unversionedTypes[t]; ok { - if gvk, ok := target.KindForGroupVersionKinds([]schema.GroupVersionKind{unversionedKind}); ok { - return copyAndSetTargetKind(copy, s, in, gvk) - } - return copyAndSetTargetKind(copy, s, in, unversionedKind) - } - - out, err := s.New(gvk) - if err != nil { - return nil, err - } - - if copy { - copied, err := s.Copy(in) - if err != nil { - return nil, err - } - in = copied - } - - flags, meta := s.generateConvertMeta(in) - meta.Context = target - if err := s.converter.Convert(in, out, flags, meta); err != nil { - return nil, err - } - - setTargetKind(out, gvk) - return out, nil -} - -// generateConvertMeta constructs the meta value we pass to Convert. -func (s *Scheme) generateConvertMeta(in interface{}) (conversion.FieldMatchingFlags, *conversion.Meta) { - return s.converter.DefaultMeta(reflect.TypeOf(in)) -} - -// copyAndSetTargetKind performs a conditional copy before returning the object, or an error if copy was not successful. -func copyAndSetTargetKind(copy bool, copier ObjectCopier, obj Object, kind schema.GroupVersionKind) (Object, error) { - if copy { - copied, err := copier.Copy(obj) - if err != nil { - return nil, err - } - obj = copied - } - setTargetKind(obj, kind) - return obj, nil -} - -// setTargetKind sets the kind on an object, taking into account whether the target kind is the internal version. -func setTargetKind(obj Object, kind schema.GroupVersionKind) { - if kind.Version == APIVersionInternal { - // internal is a special case - // TODO: look at removing the need to special case this - obj.GetObjectKind().SetGroupVersionKind(schema.GroupVersionKind{}) - return - } - obj.GetObjectKind().SetGroupVersionKind(kind) -} diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/scheme_builder.go b/vendor/k8s.io/kubernetes/pkg/runtime/scheme_builder.go deleted file mode 100644 index 944db481..00000000 --- a/vendor/k8s.io/kubernetes/pkg/runtime/scheme_builder.go +++ /dev/null @@ -1,48 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package runtime - -// SchemeBuilder collects functions that add things to a scheme. It's to allow -// code to compile without explicitly referencing generated types. You should -// declare one in each package that will have generated deep copy or conversion -// functions. -type SchemeBuilder []func(*Scheme) error - -// AddToScheme applies all the stored functions to the scheme. A non-nil error -// indicates that one function failed and the attempt was abandoned. -func (sb *SchemeBuilder) AddToScheme(s *Scheme) error { - for _, f := range *sb { - if err := f(s); err != nil { - return err - } - } - return nil -} - -// Register adds a scheme setup function to the list. -func (sb *SchemeBuilder) Register(funcs ...func(*Scheme) error) { - for _, f := range funcs { - *sb = append(*sb, f) - } -} - -// NewSchemeBuilder calls Register for you. -func NewSchemeBuilder(funcs ...func(*Scheme) error) SchemeBuilder { - var sb SchemeBuilder - sb.Register(funcs...) - return sb -} diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/scheme_test.go b/vendor/k8s.io/kubernetes/pkg/runtime/scheme_test.go deleted file mode 100644 index c505cce2..00000000 --- a/vendor/k8s.io/kubernetes/pkg/runtime/scheme_test.go +++ /dev/null @@ -1,925 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package runtime_test - -import ( - "reflect" - "strings" - "testing" - - "github.com/google/gofuzz" - flag "github.com/spf13/pflag" - - "k8s.io/kubernetes/pkg/conversion" - "k8s.io/kubernetes/pkg/runtime" - "k8s.io/kubernetes/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/runtime/serializer" - "k8s.io/kubernetes/pkg/util/diff" -) - -var fuzzIters = flag.Int("fuzz-iters", 50, "How many fuzzing iterations to do.") - -type InternalSimple struct { - runtime.TypeMeta `json:",inline"` - TestString string `json:"testString"` -} - -type ExternalSimple struct { - runtime.TypeMeta `json:",inline"` - TestString string `json:"testString"` -} - -func (obj *InternalSimple) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta } -func (obj *ExternalSimple) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta } - -func TestScheme(t *testing.T) { - internalGV := schema.GroupVersion{Group: "test.group", Version: runtime.APIVersionInternal} - externalGV := schema.GroupVersion{Group: "test.group", Version: "testExternal"} - - scheme := runtime.NewScheme() - scheme.AddKnownTypeWithName(internalGV.WithKind("Simple"), &InternalSimple{}) - scheme.AddKnownTypeWithName(externalGV.WithKind("Simple"), &ExternalSimple{}) - - // If set, would clear TypeMeta during conversion. - //scheme.AddIgnoredConversionType(&TypeMeta{}, &TypeMeta{}) - - // test that scheme is an ObjectTyper - var _ runtime.ObjectTyper = scheme - - internalToExternalCalls := 0 - externalToInternalCalls := 0 - - // Register functions to verify that scope.Meta() gets set correctly. - err := scheme.AddConversionFuncs( - func(in *InternalSimple, out *ExternalSimple, scope conversion.Scope) error { - scope.Convert(&in.TypeMeta, &out.TypeMeta, 0) - scope.Convert(&in.TestString, &out.TestString, 0) - internalToExternalCalls++ - return nil - }, - func(in *ExternalSimple, out *InternalSimple, scope conversion.Scope) error { - scope.Convert(&in.TypeMeta, &out.TypeMeta, 0) - scope.Convert(&in.TestString, &out.TestString, 0) - externalToInternalCalls++ - return nil - }, - ) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - - codecs := serializer.NewCodecFactory(scheme) - codec := codecs.LegacyCodec(externalGV) - info, _ := runtime.SerializerInfoForMediaType(codecs.SupportedMediaTypes(), runtime.ContentTypeJSON) - jsonserializer := info.Serializer - - simple := &InternalSimple{ - TestString: "foo", - } - - // Test Encode, Decode, DecodeInto, and DecodeToVersion - obj := runtime.Object(simple) - data, err := runtime.Encode(codec, obj) - if err != nil { - t.Fatal(err) - } - - obj2, err := runtime.Decode(codec, data) - if err != nil { - t.Fatal(err) - } - if _, ok := obj2.(*InternalSimple); !ok { - t.Fatalf("Got wrong type") - } - if e, a := simple, obj2; !reflect.DeepEqual(e, a) { - t.Errorf("Expected:\n %#v,\n Got:\n %#v", e, a) - } - - obj3 := &InternalSimple{} - if err := runtime.DecodeInto(codec, data, obj3); err != nil { - t.Fatal(err) - } - // clearing TypeMeta is a function of the scheme, which we do not test here (ConvertToVersion - // does not automatically clear TypeMeta anymore). - simple.TypeMeta = runtime.TypeMeta{Kind: "Simple", APIVersion: externalGV.String()} - if e, a := simple, obj3; !reflect.DeepEqual(e, a) { - t.Errorf("Expected:\n %#v,\n Got:\n %#v", e, a) - } - - obj4, err := runtime.Decode(jsonserializer, data) - if err != nil { - t.Fatal(err) - } - if _, ok := obj4.(*ExternalSimple); !ok { - t.Fatalf("Got wrong type") - } - - // Test Convert - external := &ExternalSimple{} - err = scheme.Convert(simple, external, nil) - if err != nil { - t.Fatalf("Unexpected error: %v", err) - } - if e, a := simple.TestString, external.TestString; e != a { - t.Errorf("Expected %v, got %v", e, a) - } - - // Encode and Convert should each have caused an increment. - if e, a := 2, internalToExternalCalls; e != a { - t.Errorf("Expected %v, got %v", e, a) - } - // DecodeInto and Decode should each have caused an increment because of a conversion - if e, a := 2, externalToInternalCalls; e != a { - t.Errorf("Expected %v, got %v", e, a) - } -} - -func TestBadJSONRejection(t *testing.T) { - scheme := runtime.NewScheme() - codecs := serializer.NewCodecFactory(scheme) - info, _ := runtime.SerializerInfoForMediaType(codecs.SupportedMediaTypes(), runtime.ContentTypeJSON) - jsonserializer := info.Serializer - - badJSONMissingKind := []byte(`{ }`) - if _, err := runtime.Decode(jsonserializer, badJSONMissingKind); err == nil { - t.Errorf("Did not reject despite lack of kind field: %s", badJSONMissingKind) - } - badJSONUnknownType := []byte(`{"kind": "bar"}`) - if _, err1 := runtime.Decode(jsonserializer, badJSONUnknownType); err1 == nil { - t.Errorf("Did not reject despite use of unknown type: %s", badJSONUnknownType) - } - /*badJSONKindMismatch := []byte(`{"kind": "Pod"}`) - if err2 := DecodeInto(badJSONKindMismatch, &Node{}); err2 == nil { - t.Errorf("Kind is set but doesn't match the object type: %s", badJSONKindMismatch) - }*/ -} - -type ExtensionA struct { - runtime.TypeMeta `json:",inline"` - TestString string `json:"testString"` -} - -type ExtensionB struct { - runtime.TypeMeta `json:",inline"` - TestString string `json:"testString"` -} - -type ExternalExtensionType struct { - runtime.TypeMeta `json:",inline"` - Extension runtime.RawExtension `json:"extension"` -} - -type InternalExtensionType struct { - runtime.TypeMeta `json:",inline"` - Extension runtime.Object `json:"extension"` -} - -type ExternalOptionalExtensionType struct { - runtime.TypeMeta `json:",inline"` - Extension runtime.RawExtension `json:"extension,omitempty"` -} - -type InternalOptionalExtensionType struct { - runtime.TypeMeta `json:",inline"` - Extension runtime.Object `json:"extension,omitempty"` -} - -func (obj *ExtensionA) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta } -func (obj *ExtensionB) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta } -func (obj *ExternalExtensionType) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta } -func (obj *InternalExtensionType) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta } -func (obj *ExternalOptionalExtensionType) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta } -func (obj *InternalOptionalExtensionType) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta } - -func TestExternalToInternalMapping(t *testing.T) { - internalGV := schema.GroupVersion{Group: "test.group", Version: runtime.APIVersionInternal} - externalGV := schema.GroupVersion{Group: "test.group", Version: "testExternal"} - - scheme := runtime.NewScheme() - scheme.AddKnownTypeWithName(internalGV.WithKind("OptionalExtensionType"), &InternalOptionalExtensionType{}) - scheme.AddKnownTypeWithName(externalGV.WithKind("OptionalExtensionType"), &ExternalOptionalExtensionType{}) - - codec := serializer.NewCodecFactory(scheme).LegacyCodec(externalGV) - - table := []struct { - obj runtime.Object - encoded string - }{ - { - &InternalOptionalExtensionType{Extension: nil}, - `{"kind":"OptionalExtensionType","apiVersion":"` + externalGV.String() + `"}`, - }, - } - - for i, item := range table { - gotDecoded, err := runtime.Decode(codec, []byte(item.encoded)) - if err != nil { - t.Errorf("unexpected error '%v' (%v)", err, item.encoded) - } else if e, a := item.obj, gotDecoded; !reflect.DeepEqual(e, a) { - t.Errorf("%d: unexpected objects:\n%s", i, diff.ObjectGoPrintSideBySide(e, a)) - } - } -} - -func TestExtensionMapping(t *testing.T) { - internalGV := schema.GroupVersion{Group: "test.group", Version: runtime.APIVersionInternal} - externalGV := schema.GroupVersion{Group: "test.group", Version: "testExternal"} - - scheme := runtime.NewScheme() - scheme.AddKnownTypeWithName(internalGV.WithKind("ExtensionType"), &InternalExtensionType{}) - scheme.AddKnownTypeWithName(internalGV.WithKind("OptionalExtensionType"), &InternalOptionalExtensionType{}) - scheme.AddKnownTypeWithName(externalGV.WithKind("ExtensionType"), &ExternalExtensionType{}) - scheme.AddKnownTypeWithName(externalGV.WithKind("OptionalExtensionType"), &ExternalOptionalExtensionType{}) - - // register external first when the object is the same in both schemes, so ObjectVersionAndKind reports the - // external version. - scheme.AddKnownTypeWithName(externalGV.WithKind("A"), &ExtensionA{}) - scheme.AddKnownTypeWithName(externalGV.WithKind("B"), &ExtensionB{}) - scheme.AddKnownTypeWithName(internalGV.WithKind("A"), &ExtensionA{}) - scheme.AddKnownTypeWithName(internalGV.WithKind("B"), &ExtensionB{}) - - codec := serializer.NewCodecFactory(scheme).LegacyCodec(externalGV) - - table := []struct { - obj runtime.Object - expected runtime.Object - encoded string - }{ - { - &InternalExtensionType{ - Extension: runtime.NewEncodable(codec, &ExtensionA{TestString: "foo"}), - }, - &InternalExtensionType{ - Extension: &runtime.Unknown{ - Raw: []byte(`{"apiVersion":"test.group/testExternal","kind":"A","testString":"foo"}`), - ContentType: runtime.ContentTypeJSON, - }, - }, - // apiVersion is set in the serialized object for easier consumption by clients - `{"apiVersion":"` + externalGV.String() + `","kind":"ExtensionType","extension":{"apiVersion":"test.group/testExternal","kind":"A","testString":"foo"}} -`, - }, { - &InternalExtensionType{Extension: runtime.NewEncodable(codec, &ExtensionB{TestString: "bar"})}, - &InternalExtensionType{ - Extension: &runtime.Unknown{ - Raw: []byte(`{"apiVersion":"test.group/testExternal","kind":"B","testString":"bar"}`), - ContentType: runtime.ContentTypeJSON, - }, - }, - // apiVersion is set in the serialized object for easier consumption by clients - `{"apiVersion":"` + externalGV.String() + `","kind":"ExtensionType","extension":{"apiVersion":"test.group/testExternal","kind":"B","testString":"bar"}} -`, - }, { - &InternalExtensionType{Extension: nil}, - &InternalExtensionType{ - Extension: nil, - }, - `{"apiVersion":"` + externalGV.String() + `","kind":"ExtensionType","extension":null} -`, - }, - } - - for i, item := range table { - gotEncoded, err := runtime.Encode(codec, item.obj) - if err != nil { - t.Errorf("unexpected error '%v' (%#v)", err, item.obj) - } else if e, a := item.encoded, string(gotEncoded); e != a { - t.Errorf("expected\n%#v\ngot\n%#v\n", e, a) - } - - gotDecoded, err := runtime.Decode(codec, []byte(item.encoded)) - if err != nil { - t.Errorf("unexpected error '%v' (%v)", err, item.encoded) - } else if e, a := item.expected, gotDecoded; !reflect.DeepEqual(e, a) { - t.Errorf("%d: unexpected objects:\n%s", i, diff.ObjectGoPrintSideBySide(e, a)) - } - } -} - -func TestEncode(t *testing.T) { - internalGV := schema.GroupVersion{Group: "test.group", Version: runtime.APIVersionInternal} - externalGV := schema.GroupVersion{Group: "test.group", Version: "testExternal"} - - scheme := runtime.NewScheme() - scheme.AddKnownTypeWithName(internalGV.WithKind("Simple"), &InternalSimple{}) - scheme.AddKnownTypeWithName(externalGV.WithKind("Simple"), &ExternalSimple{}) - - codec := serializer.NewCodecFactory(scheme).LegacyCodec(externalGV) - - test := &InternalSimple{ - TestString: "I'm the same", - } - obj := runtime.Object(test) - data, err := runtime.Encode(codec, obj) - obj2, gvk, err2 := codec.Decode(data, nil, nil) - if err != nil || err2 != nil { - t.Fatalf("Failure: '%v' '%v'", err, err2) - } - if _, ok := obj2.(*InternalSimple); !ok { - t.Fatalf("Got wrong type") - } - if !reflect.DeepEqual(obj2, test) { - t.Errorf("Expected:\n %#v,\n Got:\n %#v", test, obj2) - } - if !reflect.DeepEqual(gvk, &schema.GroupVersionKind{Group: "test.group", Version: "testExternal", Kind: "Simple"}) { - t.Errorf("unexpected gvk returned by decode: %#v", gvk) - } -} - -func TestUnversionedTypes(t *testing.T) { - internalGV := schema.GroupVersion{Group: "test.group", Version: runtime.APIVersionInternal} - externalGV := schema.GroupVersion{Group: "test.group", Version: "testExternal"} - otherGV := schema.GroupVersion{Group: "group", Version: "other"} - - scheme := runtime.NewScheme() - scheme.AddUnversionedTypes(externalGV, &InternalSimple{}) - scheme.AddKnownTypeWithName(internalGV.WithKind("Simple"), &InternalSimple{}) - scheme.AddKnownTypeWithName(externalGV.WithKind("Simple"), &ExternalSimple{}) - scheme.AddKnownTypeWithName(otherGV.WithKind("Simple"), &ExternalSimple{}) - - codec := serializer.NewCodecFactory(scheme).LegacyCodec(externalGV) - - if unv, ok := scheme.IsUnversioned(&InternalSimple{}); !unv || !ok { - t.Fatalf("type not unversioned and in scheme: %t %t", unv, ok) - } - - kinds, _, err := scheme.ObjectKinds(&InternalSimple{}) - if err != nil { - t.Fatal(err) - } - kind := kinds[0] - if kind != externalGV.WithKind("InternalSimple") { - t.Fatalf("unexpected: %#v", kind) - } - - test := &InternalSimple{ - TestString: "I'm the same", - } - obj := runtime.Object(test) - data, err := runtime.Encode(codec, obj) - if err != nil { - t.Fatal(err) - } - obj2, gvk, err := codec.Decode(data, nil, nil) - if err != nil { - t.Fatal(err) - } - if _, ok := obj2.(*InternalSimple); !ok { - t.Fatalf("Got wrong type") - } - if !reflect.DeepEqual(obj2, test) { - t.Errorf("Expected:\n %#v,\n Got:\n %#v", test, obj2) - } - // object is serialized as an unversioned object (in the group and version it was defined in) - if !reflect.DeepEqual(gvk, &schema.GroupVersionKind{Group: "test.group", Version: "testExternal", Kind: "InternalSimple"}) { - t.Errorf("unexpected gvk returned by decode: %#v", gvk) - } - - // when serialized to a different group, the object is kept in its preferred name - codec = serializer.NewCodecFactory(scheme).LegacyCodec(otherGV) - data, err = runtime.Encode(codec, obj) - if err != nil { - t.Fatal(err) - } - if string(data) != `{"apiVersion":"test.group/testExternal","kind":"InternalSimple","testString":"I'm the same"}`+"\n" { - t.Errorf("unexpected data: %s", data) - } -} - -// Test a weird version/kind embedding format. -type MyWeirdCustomEmbeddedVersionKindField struct { - ID string `json:"ID,omitempty"` - APIVersion string `json:"myVersionKey,omitempty"` - ObjectKind string `json:"myKindKey,omitempty"` - Z string `json:"Z,omitempty"` - Y uint64 `json:"Y,omitempty"` -} - -type TestType1 struct { - MyWeirdCustomEmbeddedVersionKindField `json:",inline"` - A string `json:"A,omitempty"` - B int `json:"B,omitempty"` - C int8 `json:"C,omitempty"` - D int16 `json:"D,omitempty"` - E int32 `json:"E,omitempty"` - F int64 `json:"F,omitempty"` - G uint `json:"G,omitempty"` - H uint8 `json:"H,omitempty"` - I uint16 `json:"I,omitempty"` - J uint32 `json:"J,omitempty"` - K uint64 `json:"K,omitempty"` - L bool `json:"L,omitempty"` - M map[string]int `json:"M,omitempty"` - N map[string]TestType2 `json:"N,omitempty"` - O *TestType2 `json:"O,omitempty"` - P []TestType2 `json:"Q,omitempty"` -} - -type TestType2 struct { - A string `json:"A,omitempty"` - B int `json:"B,omitempty"` -} - -type ExternalTestType2 struct { - A string `json:"A,omitempty"` - B int `json:"B,omitempty"` -} -type ExternalTestType1 struct { - MyWeirdCustomEmbeddedVersionKindField `json:",inline"` - A string `json:"A,omitempty"` - B int `json:"B,omitempty"` - C int8 `json:"C,omitempty"` - D int16 `json:"D,omitempty"` - E int32 `json:"E,omitempty"` - F int64 `json:"F,omitempty"` - G uint `json:"G,omitempty"` - H uint8 `json:"H,omitempty"` - I uint16 `json:"I,omitempty"` - J uint32 `json:"J,omitempty"` - K uint64 `json:"K,omitempty"` - L bool `json:"L,omitempty"` - M map[string]int `json:"M,omitempty"` - N map[string]ExternalTestType2 `json:"N,omitempty"` - O *ExternalTestType2 `json:"O,omitempty"` - P []ExternalTestType2 `json:"Q,omitempty"` -} - -type ExternalInternalSame struct { - MyWeirdCustomEmbeddedVersionKindField `json:",inline"` - A TestType2 `json:"A,omitempty"` -} - -type UnversionedType struct { - MyWeirdCustomEmbeddedVersionKindField `json:",inline"` - A string `json:"A,omitempty"` -} - -type UnknownType struct { - MyWeirdCustomEmbeddedVersionKindField `json:",inline"` - A string `json:"A,omitempty"` -} - -func (obj *MyWeirdCustomEmbeddedVersionKindField) GetObjectKind() schema.ObjectKind { return obj } -func (obj *MyWeirdCustomEmbeddedVersionKindField) SetGroupVersionKind(gvk schema.GroupVersionKind) { - obj.APIVersion, obj.ObjectKind = gvk.ToAPIVersionAndKind() -} -func (obj *MyWeirdCustomEmbeddedVersionKindField) GroupVersionKind() schema.GroupVersionKind { - return schema.FromAPIVersionAndKind(obj.APIVersion, obj.ObjectKind) -} - -func (obj *ExternalInternalSame) GetObjectKind() schema.ObjectKind { - return &obj.MyWeirdCustomEmbeddedVersionKindField -} - -func (obj *TestType1) GetObjectKind() schema.ObjectKind { - return &obj.MyWeirdCustomEmbeddedVersionKindField -} - -func (obj *ExternalTestType1) GetObjectKind() schema.ObjectKind { - return &obj.MyWeirdCustomEmbeddedVersionKindField -} - -func (obj *TestType2) GetObjectKind() schema.ObjectKind { return schema.EmptyObjectKind } -func (obj *ExternalTestType2) GetObjectKind() schema.ObjectKind { - return schema.EmptyObjectKind -} - -// TestObjectFuzzer can randomly populate all the above objects. -var TestObjectFuzzer = fuzz.New().NilChance(.5).NumElements(1, 100).Funcs( - func(j *MyWeirdCustomEmbeddedVersionKindField, c fuzz.Continue) { - // We have to customize the randomization of MyWeirdCustomEmbeddedVersionKindFields because their - // APIVersion and Kind must remain blank in memory. - j.APIVersion = "" - j.ObjectKind = "" - j.ID = c.RandString() - }, -) - -// Returns a new Scheme set up with the test objects. -func GetTestScheme() *runtime.Scheme { - internalGV := schema.GroupVersion{Version: "__internal"} - externalGV := schema.GroupVersion{Version: "v1"} - alternateExternalGV := schema.GroupVersion{Group: "custom", Version: "v1"} - differentExternalGV := schema.GroupVersion{Group: "other", Version: "v2"} - - s := runtime.NewScheme() - // Ordinarily, we wouldn't add TestType2, but because this is a test and - // both types are from the same package, we need to get it into the system - // so that converter will match it with ExternalType2. - s.AddKnownTypes(internalGV, &TestType1{}, &TestType2{}, &ExternalInternalSame{}) - s.AddKnownTypes(externalGV, &ExternalInternalSame{}) - s.AddKnownTypeWithName(externalGV.WithKind("TestType1"), &ExternalTestType1{}) - s.AddKnownTypeWithName(externalGV.WithKind("TestType2"), &ExternalTestType2{}) - s.AddKnownTypeWithName(internalGV.WithKind("TestType3"), &TestType1{}) - s.AddKnownTypeWithName(externalGV.WithKind("TestType3"), &ExternalTestType1{}) - s.AddKnownTypeWithName(externalGV.WithKind("TestType4"), &ExternalTestType1{}) - s.AddKnownTypeWithName(alternateExternalGV.WithKind("TestType3"), &ExternalTestType1{}) - s.AddKnownTypeWithName(alternateExternalGV.WithKind("TestType5"), &ExternalTestType1{}) - s.AddKnownTypeWithName(differentExternalGV.WithKind("TestType1"), &ExternalTestType1{}) - s.AddUnversionedTypes(externalGV, &UnversionedType{}) - return s -} - -func TestKnownTypes(t *testing.T) { - s := GetTestScheme() - if len(s.KnownTypes(schema.GroupVersion{Group: "group", Version: "v2"})) != 0 { - t.Errorf("should have no known types for v2") - } - - types := s.KnownTypes(schema.GroupVersion{Version: "v1"}) - for _, s := range []string{"TestType1", "TestType2", "TestType3", "ExternalInternalSame"} { - if _, ok := types[s]; !ok { - t.Errorf("missing type %q", s) - } - } -} - -func TestConvertToVersionBasic(t *testing.T) { - s := GetTestScheme() - tt := &TestType1{A: "I'm not a pointer object"} - other, err := s.ConvertToVersion(tt, schema.GroupVersion{Version: "v1"}) - if err != nil { - t.Fatalf("Failure: %v", err) - } - converted, ok := other.(*ExternalTestType1) - if !ok { - t.Fatalf("Got wrong type: %T", other) - } - if tt.A != converted.A { - t.Fatalf("Failed to convert object correctly: %#v", converted) - } -} - -type testGroupVersioner struct { - target schema.GroupVersionKind - ok bool -} - -func (m testGroupVersioner) KindForGroupVersionKinds(kinds []schema.GroupVersionKind) (schema.GroupVersionKind, bool) { - return m.target, m.ok -} - -func TestConvertToVersion(t *testing.T) { - testCases := []struct { - scheme *runtime.Scheme - in runtime.Object - gv runtime.GroupVersioner - same bool - out runtime.Object - errFn func(error) bool - }{ - // errors if the type is not registered in the scheme - { - scheme: GetTestScheme(), - in: &UnknownType{}, - errFn: func(err error) bool { return err != nil && runtime.IsNotRegisteredError(err) }, - }, - // errors if the group versioner returns no target - { - scheme: GetTestScheme(), - in: &ExternalTestType1{A: "test"}, - gv: testGroupVersioner{}, - errFn: func(err error) bool { - return err != nil && strings.Contains(err.Error(), "is not suitable for converting") - }, - }, - // converts to internal - { - scheme: GetTestScheme(), - in: &ExternalTestType1{A: "test"}, - gv: schema.GroupVersion{Version: "__internal"}, - out: &TestType1{A: "test"}, - }, - // prefers the best match - { - scheme: GetTestScheme(), - in: &ExternalTestType1{A: "test"}, - gv: schema.GroupVersions{{Version: "__internal"}, {Version: "v1"}}, - out: &ExternalTestType1{ - MyWeirdCustomEmbeddedVersionKindField: MyWeirdCustomEmbeddedVersionKindField{APIVersion: "v1", ObjectKind: "TestType1"}, - A: "test", - }, - }, - // unversioned type returned as-is - { - scheme: GetTestScheme(), - in: &UnversionedType{A: "test"}, - gv: schema.GroupVersions{{Version: "v1"}}, - same: true, - out: &UnversionedType{ - MyWeirdCustomEmbeddedVersionKindField: MyWeirdCustomEmbeddedVersionKindField{APIVersion: "v1", ObjectKind: "UnversionedType"}, - A: "test", - }, - }, - // unversioned type returned when not included in the target types - { - scheme: GetTestScheme(), - in: &UnversionedType{A: "test"}, - gv: schema.GroupVersions{{Group: "other", Version: "v2"}}, - same: true, - out: &UnversionedType{ - MyWeirdCustomEmbeddedVersionKindField: MyWeirdCustomEmbeddedVersionKindField{APIVersion: "v1", ObjectKind: "UnversionedType"}, - A: "test", - }, - }, - // detected as already being in the target version - { - scheme: GetTestScheme(), - in: &ExternalTestType1{A: "test"}, - gv: schema.GroupVersions{{Version: "v1"}}, - same: true, - out: &ExternalTestType1{ - MyWeirdCustomEmbeddedVersionKindField: MyWeirdCustomEmbeddedVersionKindField{APIVersion: "v1", ObjectKind: "TestType1"}, - A: "test", - }, - }, - // detected as already being in the first target version - { - scheme: GetTestScheme(), - in: &ExternalTestType1{A: "test"}, - gv: schema.GroupVersions{{Version: "v1"}, {Version: "__internal"}}, - same: true, - out: &ExternalTestType1{ - MyWeirdCustomEmbeddedVersionKindField: MyWeirdCustomEmbeddedVersionKindField{APIVersion: "v1", ObjectKind: "TestType1"}, - A: "test", - }, - }, - // detected as already being in the first target version - { - scheme: GetTestScheme(), - in: &ExternalTestType1{A: "test"}, - gv: schema.GroupVersions{{Version: "v1"}, {Version: "__internal"}}, - same: true, - out: &ExternalTestType1{ - MyWeirdCustomEmbeddedVersionKindField: MyWeirdCustomEmbeddedVersionKindField{APIVersion: "v1", ObjectKind: "TestType1"}, - A: "test", - }, - }, - // the external type is registered in multiple groups, versions, and kinds, and can be targeted to all of them (1/3): different kind - { - scheme: GetTestScheme(), - in: &ExternalTestType1{A: "test"}, - gv: testGroupVersioner{ok: true, target: schema.GroupVersionKind{Kind: "TestType3", Version: "v1"}}, - same: true, - out: &ExternalTestType1{ - MyWeirdCustomEmbeddedVersionKindField: MyWeirdCustomEmbeddedVersionKindField{APIVersion: "v1", ObjectKind: "TestType3"}, - A: "test", - }, - }, - // the external type is registered in multiple groups, versions, and kinds, and can be targeted to all of them (2/3): different gv - { - scheme: GetTestScheme(), - in: &ExternalTestType1{A: "test"}, - gv: testGroupVersioner{ok: true, target: schema.GroupVersionKind{Kind: "TestType3", Group: "custom", Version: "v1"}}, - same: true, - out: &ExternalTestType1{ - MyWeirdCustomEmbeddedVersionKindField: MyWeirdCustomEmbeddedVersionKindField{APIVersion: "custom/v1", ObjectKind: "TestType3"}, - A: "test", - }, - }, - // the external type is registered in multiple groups, versions, and kinds, and can be targeted to all of them (3/3): different gvk - { - scheme: GetTestScheme(), - in: &ExternalTestType1{A: "test"}, - gv: testGroupVersioner{ok: true, target: schema.GroupVersionKind{Group: "custom", Version: "v1", Kind: "TestType5"}}, - same: true, - out: &ExternalTestType1{ - MyWeirdCustomEmbeddedVersionKindField: MyWeirdCustomEmbeddedVersionKindField{APIVersion: "custom/v1", ObjectKind: "TestType5"}, - A: "test", - }, - }, - // multi group versioner recognizes multiple groups and forces the output to a particular version, copies because version differs - { - scheme: GetTestScheme(), - in: &ExternalTestType1{A: "test"}, - gv: runtime.NewMultiGroupVersioner(schema.GroupVersion{Group: "other", Version: "v2"}, schema.GroupKind{Group: "custom", Kind: "TestType3"}, schema.GroupKind{Kind: "TestType1"}), - out: &ExternalTestType1{ - MyWeirdCustomEmbeddedVersionKindField: MyWeirdCustomEmbeddedVersionKindField{APIVersion: "other/v2", ObjectKind: "TestType1"}, - A: "test", - }, - }, - // multi group versioner recognizes multiple groups and forces the output to a particular version, copies because version differs - { - scheme: GetTestScheme(), - in: &ExternalTestType1{A: "test"}, - gv: runtime.NewMultiGroupVersioner(schema.GroupVersion{Group: "other", Version: "v2"}, schema.GroupKind{Kind: "TestType1"}, schema.GroupKind{Group: "custom", Kind: "TestType3"}), - out: &ExternalTestType1{ - MyWeirdCustomEmbeddedVersionKindField: MyWeirdCustomEmbeddedVersionKindField{APIVersion: "other/v2", ObjectKind: "TestType1"}, - A: "test", - }, - }, - // multi group versioner is unable to find a match when kind AND group don't match (there is no TestType1 kind in group "other", and no kind "TestType5" in the default group) - { - scheme: GetTestScheme(), - in: &TestType1{A: "test"}, - gv: runtime.NewMultiGroupVersioner(schema.GroupVersion{Group: "custom", Version: "v1"}, schema.GroupKind{Group: "other"}, schema.GroupKind{Kind: "TestType5"}), - errFn: func(err error) bool { - return err != nil && strings.Contains(err.Error(), "is not suitable for converting") - }, - }, - // multi group versioner recognizes multiple groups and forces the output to a particular version, performs no copy - { - scheme: GetTestScheme(), - in: &ExternalTestType1{A: "test"}, - gv: runtime.NewMultiGroupVersioner(schema.GroupVersion{Group: "", Version: "v1"}, schema.GroupKind{Group: "custom", Kind: "TestType3"}, schema.GroupKind{Kind: "TestType1"}), - same: true, - out: &ExternalTestType1{ - MyWeirdCustomEmbeddedVersionKindField: MyWeirdCustomEmbeddedVersionKindField{APIVersion: "v1", ObjectKind: "TestType1"}, - A: "test", - }, - }, - // multi group versioner recognizes multiple groups and forces the output to a particular version, performs no copy - { - scheme: GetTestScheme(), - in: &ExternalTestType1{A: "test"}, - gv: runtime.NewMultiGroupVersioner(schema.GroupVersion{Group: "", Version: "v1"}, schema.GroupKind{Kind: "TestType1"}, schema.GroupKind{Group: "custom", Kind: "TestType3"}), - same: true, - out: &ExternalTestType1{ - MyWeirdCustomEmbeddedVersionKindField: MyWeirdCustomEmbeddedVersionKindField{APIVersion: "v1", ObjectKind: "TestType1"}, - A: "test", - }, - }, - // group versioner can choose a particular target kind for a given input when kind is the same across group versions - { - scheme: GetTestScheme(), - in: &TestType1{A: "test"}, - gv: testGroupVersioner{ok: true, target: schema.GroupVersionKind{Version: "v1", Kind: "TestType3"}}, - out: &ExternalTestType1{ - MyWeirdCustomEmbeddedVersionKindField: MyWeirdCustomEmbeddedVersionKindField{APIVersion: "v1", ObjectKind: "TestType3"}, - A: "test", - }, - }, - // group versioner can choose a different kind - { - scheme: GetTestScheme(), - in: &TestType1{A: "test"}, - gv: testGroupVersioner{ok: true, target: schema.GroupVersionKind{Kind: "TestType5", Group: "custom", Version: "v1"}}, - out: &ExternalTestType1{ - MyWeirdCustomEmbeddedVersionKindField: MyWeirdCustomEmbeddedVersionKindField{APIVersion: "custom/v1", ObjectKind: "TestType5"}, - A: "test", - }, - }, - } - for i, test := range testCases { - original, _ := test.scheme.DeepCopy(test.in) - out, err := test.scheme.ConvertToVersion(test.in, test.gv) - switch { - case test.errFn != nil: - if !test.errFn(err) { - t.Errorf("%d: unexpected error: %v", i, err) - } - continue - case err != nil: - t.Errorf("%d: unexpected error: %v", i, err) - continue - } - if out == test.in { - t.Errorf("%d: ConvertToVersion should always copy out: %#v", i, out) - continue - } - - if test.same { - if !reflect.DeepEqual(original, test.in) { - t.Errorf("%d: unexpected mutation of input: %s", i, diff.ObjectReflectDiff(original, test.in)) - continue - } - if !reflect.DeepEqual(out, test.out) { - t.Errorf("%d: unexpected out: %s", i, diff.ObjectReflectDiff(out, test.out)) - continue - } - unsafe, err := test.scheme.UnsafeConvertToVersion(test.in, test.gv) - if err != nil { - t.Errorf("%d: unexpected error: %v", i, err) - continue - } - if !reflect.DeepEqual(unsafe, test.out) { - t.Errorf("%d: unexpected unsafe: %s", i, diff.ObjectReflectDiff(unsafe, test.out)) - continue - } - if unsafe != test.in { - t.Errorf("%d: UnsafeConvertToVersion should return same object: %#v", i, unsafe) - continue - } - continue - } - if !reflect.DeepEqual(out, test.out) { - t.Errorf("%d: unexpected out: %s", i, diff.ObjectReflectDiff(out, test.out)) - continue - } - } -} - -func TestMetaValues(t *testing.T) { - internalGV := schema.GroupVersion{Group: "test.group", Version: "__internal"} - externalGV := schema.GroupVersion{Group: "test.group", Version: "externalVersion"} - - s := runtime.NewScheme() - s.AddKnownTypeWithName(internalGV.WithKind("Simple"), &InternalSimple{}) - s.AddKnownTypeWithName(externalGV.WithKind("Simple"), &ExternalSimple{}) - - internalToExternalCalls := 0 - externalToInternalCalls := 0 - - // Register functions to verify that scope.Meta() gets set correctly. - err := s.AddConversionFuncs( - func(in *InternalSimple, out *ExternalSimple, scope conversion.Scope) error { - t.Logf("internal -> external") - scope.Convert(&in.TestString, &out.TestString, 0) - internalToExternalCalls++ - return nil - }, - func(in *ExternalSimple, out *InternalSimple, scope conversion.Scope) error { - t.Logf("external -> internal") - scope.Convert(&in.TestString, &out.TestString, 0) - externalToInternalCalls++ - return nil - }, - ) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - simple := &InternalSimple{ - TestString: "foo", - } - - s.Log(t) - - out, err := s.ConvertToVersion(simple, externalGV) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - - internal, err := s.ConvertToVersion(out, internalGV) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - - if e, a := simple, internal; !reflect.DeepEqual(e, a) { - t.Errorf("Expected:\n %#v,\n Got:\n %#v", e, a) - } - - if e, a := 1, internalToExternalCalls; e != a { - t.Errorf("Expected %v, got %v", e, a) - } - if e, a := 1, externalToInternalCalls; e != a { - t.Errorf("Expected %v, got %v", e, a) - } -} - -func TestMetaValuesUnregisteredConvert(t *testing.T) { - type InternalSimple struct { - Version string `json:"apiVersion,omitempty"` - Kind string `json:"kind,omitempty"` - TestString string `json:"testString"` - } - type ExternalSimple struct { - Version string `json:"apiVersion,omitempty"` - Kind string `json:"kind,omitempty"` - TestString string `json:"testString"` - } - s := runtime.NewScheme() - // We deliberately don't register the types. - - internalToExternalCalls := 0 - - // Register functions to verify that scope.Meta() gets set correctly. - err := s.AddConversionFuncs( - func(in *InternalSimple, out *ExternalSimple, scope conversion.Scope) error { - scope.Convert(&in.TestString, &out.TestString, 0) - internalToExternalCalls++ - return nil - }, - ) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - - simple := &InternalSimple{TestString: "foo"} - external := &ExternalSimple{} - err = s.Convert(simple, external, nil) - if err != nil { - t.Fatalf("Unexpected error: %v", err) - } - if e, a := simple.TestString, external.TestString; e != a { - t.Errorf("Expected %v, got %v", e, a) - } - - // Verify that our conversion handler got called. - if e, a := 1, internalToExternalCalls; e != a { - t.Errorf("Expected %v, got %v", e, a) - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/serializer/.readonly b/vendor/k8s.io/kubernetes/pkg/runtime/serializer/.readonly deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/serializer/BUILD b/vendor/k8s.io/kubernetes/pkg/runtime/serializer/BUILD index bec37387..aebc6ca6 100644 --- a/vendor/k8s.io/kubernetes/pkg/runtime/serializer/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/runtime/serializer/BUILD @@ -5,42 +5,12 @@ licenses(["notice"]) load( "@io_bazel_rules_go//go:def.bzl", "go_library", - "go_test", ) go_library( name = "go_default_library", - srcs = [ - "codec_factory.go", - "negotiated_codec.go", - "protobuf_extension.go", - ], + srcs = ["doc.go"], tags = ["automanaged"], - deps = [ - "//pkg/runtime:go_default_library", - "//pkg/runtime/schema:go_default_library", - "//pkg/runtime/serializer/json:go_default_library", - "//pkg/runtime/serializer/protobuf:go_default_library", - "//pkg/runtime/serializer/recognizer:go_default_library", - "//pkg/runtime/serializer/versioning:go_default_library", - ], -) - -go_test( - name = "go_default_test", - srcs = ["codec_test.go"], - library = ":go_default_library", - tags = ["automanaged"], - deps = [ - "//pkg/apis/meta/v1:go_default_library", - "//pkg/conversion:go_default_library", - "//pkg/runtime:go_default_library", - "//pkg/runtime/schema:go_default_library", - "//pkg/util/diff:go_default_library", - "//vendor:github.com/ghodss/yaml", - "//vendor:github.com/google/gofuzz", - "//vendor:github.com/spf13/pflag", - ], ) filegroup( @@ -59,7 +29,6 @@ filegroup( "//pkg/runtime/serializer/recognizer:all-srcs", "//pkg/runtime/serializer/streaming:all-srcs", "//pkg/runtime/serializer/versioning:all-srcs", - "//pkg/runtime/serializer/yaml:all-srcs", ], tags = ["automanaged"], ) diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/serializer/codec_factory.go b/vendor/k8s.io/kubernetes/pkg/runtime/serializer/codec_factory.go deleted file mode 100644 index a0a42509..00000000 --- a/vendor/k8s.io/kubernetes/pkg/runtime/serializer/codec_factory.go +++ /dev/null @@ -1,237 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package serializer - -import ( - "k8s.io/kubernetes/pkg/runtime" - "k8s.io/kubernetes/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/runtime/serializer/json" - "k8s.io/kubernetes/pkg/runtime/serializer/recognizer" - "k8s.io/kubernetes/pkg/runtime/serializer/versioning" -) - -// serializerExtensions are for serializers that are conditionally compiled in -var serializerExtensions = []func(*runtime.Scheme) (serializerType, bool){} - -type serializerType struct { - AcceptContentTypes []string - ContentType string - FileExtensions []string - // EncodesAsText should be true if this content type can be represented safely in UTF-8 - EncodesAsText bool - - Serializer runtime.Serializer - PrettySerializer runtime.Serializer - - AcceptStreamContentTypes []string - StreamContentType string - - Framer runtime.Framer - StreamSerializer runtime.Serializer -} - -func newSerializersForScheme(scheme *runtime.Scheme, mf json.MetaFactory) []serializerType { - jsonSerializer := json.NewSerializer(mf, scheme, scheme, false) - jsonPrettySerializer := json.NewSerializer(mf, scheme, scheme, true) - yamlSerializer := json.NewYAMLSerializer(mf, scheme, scheme) - - serializers := []serializerType{ - { - AcceptContentTypes: []string{"application/json"}, - ContentType: "application/json", - FileExtensions: []string{"json"}, - EncodesAsText: true, - Serializer: jsonSerializer, - PrettySerializer: jsonPrettySerializer, - - Framer: json.Framer, - StreamSerializer: jsonSerializer, - }, - { - AcceptContentTypes: []string{"application/yaml"}, - ContentType: "application/yaml", - FileExtensions: []string{"yaml"}, - EncodesAsText: true, - Serializer: yamlSerializer, - }, - } - - for _, fn := range serializerExtensions { - if serializer, ok := fn(scheme); ok { - serializers = append(serializers, serializer) - } - } - return serializers -} - -// CodecFactory provides methods for retrieving codecs and serializers for specific -// versions and content types. -type CodecFactory struct { - scheme *runtime.Scheme - serializers []serializerType - universal runtime.Decoder - accepts []runtime.SerializerInfo - - legacySerializer runtime.Serializer -} - -// NewCodecFactory provides methods for retrieving serializers for the supported wire formats -// and conversion wrappers to define preferred internal and external versions. In the future, -// as the internal version is used less, callers may instead use a defaulting serializer and -// only convert objects which are shared internally (Status, common API machinery). -// TODO: allow other codecs to be compiled in? -// TODO: accept a scheme interface -func NewCodecFactory(scheme *runtime.Scheme) CodecFactory { - serializers := newSerializersForScheme(scheme, json.DefaultMetaFactory) - return newCodecFactory(scheme, serializers) -} - -// newCodecFactory is a helper for testing that allows a different metafactory to be specified. -func newCodecFactory(scheme *runtime.Scheme, serializers []serializerType) CodecFactory { - decoders := make([]runtime.Decoder, 0, len(serializers)) - var accepts []runtime.SerializerInfo - alreadyAccepted := make(map[string]struct{}) - - var legacySerializer runtime.Serializer - for _, d := range serializers { - decoders = append(decoders, d.Serializer) - for _, mediaType := range d.AcceptContentTypes { - if _, ok := alreadyAccepted[mediaType]; ok { - continue - } - alreadyAccepted[mediaType] = struct{}{} - info := runtime.SerializerInfo{ - MediaType: d.ContentType, - EncodesAsText: d.EncodesAsText, - Serializer: d.Serializer, - PrettySerializer: d.PrettySerializer, - } - if d.StreamSerializer != nil { - info.StreamSerializer = &runtime.StreamSerializerInfo{ - Serializer: d.StreamSerializer, - EncodesAsText: d.EncodesAsText, - Framer: d.Framer, - } - } - accepts = append(accepts, info) - if mediaType == runtime.ContentTypeJSON { - legacySerializer = d.Serializer - } - } - } - if legacySerializer == nil { - legacySerializer = serializers[0].Serializer - } - - return CodecFactory{ - scheme: scheme, - serializers: serializers, - universal: recognizer.NewDecoder(decoders...), - - accepts: accepts, - - legacySerializer: legacySerializer, - } -} - -// SupportedMediaTypes returns the RFC2046 media types that this factory has serializers for. -func (f CodecFactory) SupportedMediaTypes() []runtime.SerializerInfo { - return f.accepts -} - -// LegacyCodec encodes output to a given API versions, and decodes output into the internal form from -// any recognized source. The returned codec will always encode output to JSON. If a type is not -// found in the list of versions an error will be returned. -// -// This method is deprecated - clients and servers should negotiate a serializer by mime-type and -// invoke CodecForVersions. Callers that need only to read data should use UniversalDecoder(). -// -// TODO: make this call exist only in pkg/api, and initialize it with the set of default versions. -// All other callers will be forced to request a Codec directly. -func (f CodecFactory) LegacyCodec(version ...schema.GroupVersion) runtime.Codec { - return versioning.NewDefaultingCodecForScheme(f.scheme, f.legacySerializer, f.universal, schema.GroupVersions(version), runtime.InternalGroupVersioner) -} - -// UniversalDeserializer can convert any stored data recognized by this factory into a Go object that satisfies -// runtime.Object. It does not perform conversion. It does not perform defaulting. -func (f CodecFactory) UniversalDeserializer() runtime.Decoder { - return f.universal -} - -// UniversalDecoder returns a runtime.Decoder capable of decoding all known API objects in all known formats. Used -// by clients that do not need to encode objects but want to deserialize API objects stored on disk. Only decodes -// objects in groups registered with the scheme. The GroupVersions passed may be used to select alternate -// versions of objects to return - by default, runtime.APIVersionInternal is used. If any versions are specified, -// unrecognized groups will be returned in the version they are encoded as (no conversion). This decoder performs -// defaulting. -// -// TODO: the decoder will eventually be removed in favor of dealing with objects in their versioned form -// TODO: only accept a group versioner -func (f CodecFactory) UniversalDecoder(versions ...schema.GroupVersion) runtime.Decoder { - var versioner runtime.GroupVersioner - if len(versions) == 0 { - versioner = runtime.InternalGroupVersioner - } else { - versioner = schema.GroupVersions(versions) - } - return f.CodecForVersions(nil, f.universal, nil, versioner) -} - -// CodecForVersions creates a codec with the provided serializer. If an object is decoded and its group is not in the list, -// it will default to runtime.APIVersionInternal. If encode is not specified for an object's group, the object is not -// converted. If encode or decode are nil, no conversion is performed. -func (f CodecFactory) CodecForVersions(encoder runtime.Encoder, decoder runtime.Decoder, encode runtime.GroupVersioner, decode runtime.GroupVersioner) runtime.Codec { - // TODO: these are for backcompat, remove them in the future - if encode == nil { - encode = runtime.DisabledGroupVersioner - } - if decode == nil { - decode = runtime.InternalGroupVersioner - } - return versioning.NewDefaultingCodecForScheme(f.scheme, encoder, decoder, encode, decode) -} - -// DecoderToVersion returns a decoder that targets the provided group version. -func (f CodecFactory) DecoderToVersion(decoder runtime.Decoder, gv runtime.GroupVersioner) runtime.Decoder { - return f.CodecForVersions(nil, decoder, nil, gv) -} - -// EncoderForVersion returns an encoder that targets the provided group version. -func (f CodecFactory) EncoderForVersion(encoder runtime.Encoder, gv runtime.GroupVersioner) runtime.Encoder { - return f.CodecForVersions(encoder, nil, gv, nil) -} - -// DirectCodecFactory provides methods for retrieving "DirectCodec"s, which do not do conversion. -type DirectCodecFactory struct { - CodecFactory -} - -// EncoderForVersion returns an encoder that does not do conversion. -func (f DirectCodecFactory) EncoderForVersion(serializer runtime.Encoder, version runtime.GroupVersioner) runtime.Encoder { - return versioning.DirectEncoder{ - Version: version, - Encoder: serializer, - ObjectTyper: f.CodecFactory.scheme, - } -} - -// DecoderToVersion returns an decoder that does not do conversion. gv is ignored. -func (f DirectCodecFactory) DecoderToVersion(serializer runtime.Decoder, _ runtime.GroupVersioner) runtime.Decoder { - return versioning.DirectDecoder{ - Decoder: serializer, - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/serializer/codec_test.go b/vendor/k8s.io/kubernetes/pkg/runtime/serializer/codec_test.go deleted file mode 100644 index c9ced597..00000000 --- a/vendor/k8s.io/kubernetes/pkg/runtime/serializer/codec_test.go +++ /dev/null @@ -1,426 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package serializer - -import ( - "encoding/json" - "fmt" - "log" - "os" - "reflect" - "strings" - "testing" - - metav1 "k8s.io/kubernetes/pkg/apis/meta/v1" - "k8s.io/kubernetes/pkg/conversion" - "k8s.io/kubernetes/pkg/runtime" - "k8s.io/kubernetes/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/util/diff" - - "github.com/ghodss/yaml" - "github.com/google/gofuzz" - flag "github.com/spf13/pflag" -) - -var fuzzIters = flag.Int("fuzz-iters", 50, "How many fuzzing iterations to do.") - -type testMetaFactory struct{} - -func (testMetaFactory) Interpret(data []byte) (*schema.GroupVersionKind, error) { - findKind := struct { - APIVersion string `json:"myVersionKey,omitempty"` - ObjectKind string `json:"myKindKey,omitempty"` - }{} - // yaml is a superset of json, so we use it to decode here. That way, - // we understand both. - if err := yaml.Unmarshal(data, &findKind); err != nil { - return nil, fmt.Errorf("couldn't get version/kind: %v", err) - } - gv, err := schema.ParseGroupVersion(findKind.APIVersion) - if err != nil { - return nil, err - } - return &schema.GroupVersionKind{Group: gv.Group, Version: gv.Version, Kind: findKind.ObjectKind}, nil -} - -// Test a weird version/kind embedding format. -type MyWeirdCustomEmbeddedVersionKindField struct { - ID string `json:"ID,omitempty"` - APIVersion string `json:"myVersionKey,omitempty"` - ObjectKind string `json:"myKindKey,omitempty"` - Z string `json:"Z,omitempty"` - Y uint64 `json:"Y,omitempty"` -} - -type TestType1 struct { - MyWeirdCustomEmbeddedVersionKindField `json:",inline"` - A string `json:"A,omitempty"` - B int `json:"B,omitempty"` - C int8 `json:"C,omitempty"` - D int16 `json:"D,omitempty"` - E int32 `json:"E,omitempty"` - F int64 `json:"F,omitempty"` - G uint `json:"G,omitempty"` - H uint8 `json:"H,omitempty"` - I uint16 `json:"I,omitempty"` - J uint32 `json:"J,omitempty"` - K uint64 `json:"K,omitempty"` - L bool `json:"L,omitempty"` - M map[string]int `json:"M,omitempty"` - N map[string]TestType2 `json:"N,omitempty"` - O *TestType2 `json:"O,omitempty"` - P []TestType2 `json:"Q,omitempty"` -} - -type TestType2 struct { - A string `json:"A,omitempty"` - B int `json:"B,omitempty"` -} - -type ExternalTestType2 struct { - A string `json:"A,omitempty"` - B int `json:"B,omitempty"` -} -type ExternalTestType1 struct { - MyWeirdCustomEmbeddedVersionKindField `json:",inline"` - A string `json:"A,omitempty"` - B int `json:"B,omitempty"` - C int8 `json:"C,omitempty"` - D int16 `json:"D,omitempty"` - E int32 `json:"E,omitempty"` - F int64 `json:"F,omitempty"` - G uint `json:"G,omitempty"` - H uint8 `json:"H,omitempty"` - I uint16 `json:"I,omitempty"` - J uint32 `json:"J,omitempty"` - K uint64 `json:"K,omitempty"` - L bool `json:"L,omitempty"` - M map[string]int `json:"M,omitempty"` - N map[string]ExternalTestType2 `json:"N,omitempty"` - O *ExternalTestType2 `json:"O,omitempty"` - P []ExternalTestType2 `json:"Q,omitempty"` -} - -type ExternalInternalSame struct { - MyWeirdCustomEmbeddedVersionKindField `json:",inline"` - A TestType2 `json:"A,omitempty"` -} - -// TestObjectFuzzer can randomly populate all the above objects. -var TestObjectFuzzer = fuzz.New().NilChance(.5).NumElements(1, 100).Funcs( - func(j *MyWeirdCustomEmbeddedVersionKindField, c fuzz.Continue) { - c.FuzzNoCustom(j) - j.APIVersion = "" - j.ObjectKind = "" - }, -) - -func (obj *MyWeirdCustomEmbeddedVersionKindField) GetObjectKind() schema.ObjectKind { return obj } -func (obj *MyWeirdCustomEmbeddedVersionKindField) SetGroupVersionKind(gvk schema.GroupVersionKind) { - obj.APIVersion, obj.ObjectKind = gvk.ToAPIVersionAndKind() -} -func (obj *MyWeirdCustomEmbeddedVersionKindField) GroupVersionKind() schema.GroupVersionKind { - return schema.FromAPIVersionAndKind(obj.APIVersion, obj.ObjectKind) -} - -func (obj *ExternalInternalSame) GetObjectKind() schema.ObjectKind { - return &obj.MyWeirdCustomEmbeddedVersionKindField -} - -func (obj *TestType1) GetObjectKind() schema.ObjectKind { - return &obj.MyWeirdCustomEmbeddedVersionKindField -} - -func (obj *ExternalTestType1) GetObjectKind() schema.ObjectKind { - return &obj.MyWeirdCustomEmbeddedVersionKindField -} - -func (obj *TestType2) GetObjectKind() schema.ObjectKind { return schema.EmptyObjectKind } -func (obj *ExternalTestType2) GetObjectKind() schema.ObjectKind { - return schema.EmptyObjectKind -} - -// Returns a new Scheme set up with the test objects. -func GetTestScheme() (*runtime.Scheme, runtime.Codec) { - internalGV := schema.GroupVersion{Version: runtime.APIVersionInternal} - externalGV := schema.GroupVersion{Version: "v1"} - externalGV2 := schema.GroupVersion{Version: "v2"} - - s := runtime.NewScheme() - // Ordinarily, we wouldn't add TestType2, but because this is a test and - // both types are from the same package, we need to get it into the system - // so that converter will match it with ExternalType2. - s.AddKnownTypes(internalGV, &TestType1{}, &TestType2{}, &ExternalInternalSame{}) - s.AddKnownTypes(externalGV, &ExternalInternalSame{}) - s.AddKnownTypeWithName(externalGV.WithKind("TestType1"), &ExternalTestType1{}) - s.AddKnownTypeWithName(externalGV.WithKind("TestType2"), &ExternalTestType2{}) - s.AddKnownTypeWithName(internalGV.WithKind("TestType3"), &TestType1{}) - s.AddKnownTypeWithName(externalGV.WithKind("TestType3"), &ExternalTestType1{}) - s.AddKnownTypeWithName(externalGV2.WithKind("TestType1"), &ExternalTestType1{}) - - s.AddUnversionedTypes(externalGV, &metav1.Status{}) - - cf := newCodecFactory(s, newSerializersForScheme(s, testMetaFactory{})) - codec := cf.LegacyCodec(schema.GroupVersion{Version: "v1"}) - return s, codec -} - -var semantic = conversion.EqualitiesOrDie( - func(a, b MyWeirdCustomEmbeddedVersionKindField) bool { - a.APIVersion, a.ObjectKind = "", "" - b.APIVersion, b.ObjectKind = "", "" - return a == b - }, -) - -func runTest(t *testing.T, source interface{}) { - name := reflect.TypeOf(source).Elem().Name() - TestObjectFuzzer.Fuzz(source) - - _, codec := GetTestScheme() - data, err := runtime.Encode(codec, source.(runtime.Object)) - if err != nil { - t.Errorf("%v: %v (%#v)", name, err, source) - return - } - obj2, err := runtime.Decode(codec, data) - if err != nil { - t.Errorf("%v: %v (%v)", name, err, string(data)) - return - } - if !semantic.DeepEqual(source, obj2) { - t.Errorf("1: %v: diff: %v", name, diff.ObjectGoPrintSideBySide(source, obj2)) - return - } - obj3 := reflect.New(reflect.TypeOf(source).Elem()).Interface() - if err := runtime.DecodeInto(codec, data, obj3.(runtime.Object)); err != nil { - t.Errorf("2: %v: %v", name, err) - return - } - if !semantic.DeepEqual(source, obj3) { - t.Errorf("3: %v: diff: %v", name, diff.ObjectDiff(source, obj3)) - return - } -} - -func TestTypes(t *testing.T) { - table := []interface{}{ - &TestType1{}, - &ExternalInternalSame{}, - } - for _, item := range table { - // Try a few times, since runTest uses random values. - for i := 0; i < *fuzzIters; i++ { - runTest(t, item) - } - } -} - -func TestVersionedEncoding(t *testing.T) { - s, _ := GetTestScheme() - cf := newCodecFactory(s, newSerializersForScheme(s, testMetaFactory{})) - info, _ := runtime.SerializerInfoForMediaType(cf.SupportedMediaTypes(), runtime.ContentTypeJSON) - encoder := info.Serializer - - codec := cf.CodecForVersions(encoder, nil, schema.GroupVersion{Version: "v2"}, nil) - out, err := runtime.Encode(codec, &TestType1{}) - if err != nil { - t.Fatal(err) - } - if string(out) != `{"myVersionKey":"v2","myKindKey":"TestType1"}`+"\n" { - t.Fatal(string(out)) - } - - codec = cf.CodecForVersions(encoder, nil, schema.GroupVersion{Version: "v3"}, nil) - _, err = runtime.Encode(codec, &TestType1{}) - if err == nil { - t.Fatal(err) - } - - // unversioned encode with no versions is written directly to wire - codec = cf.CodecForVersions(encoder, nil, runtime.InternalGroupVersioner, nil) - out, err = runtime.Encode(codec, &TestType1{}) - if err != nil { - t.Fatal(err) - } - if string(out) != `{}`+"\n" { - t.Fatal(string(out)) - } -} - -func TestMultipleNames(t *testing.T) { - _, codec := GetTestScheme() - - obj, _, err := codec.Decode([]byte(`{"myKindKey":"TestType3","myVersionKey":"v1","A":"value"}`), nil, nil) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - internal := obj.(*TestType1) - if internal.A != "value" { - t.Fatalf("unexpected decoded object: %#v", internal) - } - - out, err := runtime.Encode(codec, internal) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - if !strings.Contains(string(out), `"myKindKey":"TestType1"`) { - t.Errorf("unexpected encoded output: %s", string(out)) - } -} - -func TestConvertTypesWhenDefaultNamesMatch(t *testing.T) { - internalGV := schema.GroupVersion{Version: runtime.APIVersionInternal} - externalGV := schema.GroupVersion{Version: "v1"} - - s := runtime.NewScheme() - // create two names internally, with TestType1 being preferred - s.AddKnownTypeWithName(internalGV.WithKind("TestType1"), &TestType1{}) - s.AddKnownTypeWithName(internalGV.WithKind("OtherType1"), &TestType1{}) - // create two names externally, with TestType1 being preferred - s.AddKnownTypeWithName(externalGV.WithKind("TestType1"), &ExternalTestType1{}) - s.AddKnownTypeWithName(externalGV.WithKind("OtherType1"), &ExternalTestType1{}) - - ext := &ExternalTestType1{} - ext.APIVersion = "v1" - ext.ObjectKind = "OtherType1" - ext.A = "test" - data, err := json.Marshal(ext) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - expect := &TestType1{A: "test"} - - codec := newCodecFactory(s, newSerializersForScheme(s, testMetaFactory{})).LegacyCodec(schema.GroupVersion{Version: "v1"}) - - obj, err := runtime.Decode(codec, data) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - if !semantic.DeepEqual(expect, obj) { - t.Errorf("unexpected object: %#v", obj) - } - - into := &TestType1{} - if err := runtime.DecodeInto(codec, data, into); err != nil { - t.Fatalf("unexpected error: %v", err) - } - if !semantic.DeepEqual(expect, into) { - t.Errorf("unexpected object: %#v", obj) - } -} - -func TestEncode_Ptr(t *testing.T) { - _, codec := GetTestScheme() - tt := &TestType1{A: "I am a pointer object"} - data, err := runtime.Encode(codec, tt) - obj2, err2 := runtime.Decode(codec, data) - if err != nil || err2 != nil { - t.Fatalf("Failure: '%v' '%v'\n%s", err, err2, data) - } - if _, ok := obj2.(*TestType1); !ok { - t.Fatalf("Got wrong type") - } - if !semantic.DeepEqual(obj2, tt) { - t.Errorf("Expected:\n %#v,\n Got:\n %#v", tt, obj2) - } -} - -func TestBadJSONRejection(t *testing.T) { - log.SetOutput(os.Stderr) - _, codec := GetTestScheme() - badJSONs := [][]byte{ - []byte(`{"myVersionKey":"v1"}`), // Missing kind - []byte(`{"myVersionKey":"v1","myKindKey":"bar"}`), // Unknown kind - []byte(`{"myVersionKey":"bar","myKindKey":"TestType1"}`), // Unknown version - []byte(`{"myKindKey":"TestType1"}`), // Missing version - } - for _, b := range badJSONs { - if _, err := runtime.Decode(codec, b); err == nil { - t.Errorf("Did not reject bad json: %s", string(b)) - } - } - badJSONKindMismatch := []byte(`{"myVersionKey":"v1","myKindKey":"ExternalInternalSame"}`) - if err := runtime.DecodeInto(codec, badJSONKindMismatch, &TestType1{}); err == nil { - t.Errorf("Kind is set but doesn't match the object type: %s", badJSONKindMismatch) - } - if err := runtime.DecodeInto(codec, []byte(``), &TestType1{}); err != nil { - t.Errorf("Should allow empty decode: %v", err) - } - if _, _, err := codec.Decode([]byte(``), &schema.GroupVersionKind{Kind: "ExternalInternalSame"}, nil); err == nil { - t.Errorf("Did not give error for empty data with only kind default") - } - if _, _, err := codec.Decode([]byte(`{"myVersionKey":"v1"}`), &schema.GroupVersionKind{Kind: "ExternalInternalSame"}, nil); err != nil { - t.Errorf("Gave error for version and kind default") - } - if _, _, err := codec.Decode([]byte(`{"myKindKey":"ExternalInternalSame"}`), &schema.GroupVersionKind{Version: "v1"}, nil); err != nil { - t.Errorf("Gave error for version and kind default") - } - if _, _, err := codec.Decode([]byte(``), &schema.GroupVersionKind{Kind: "ExternalInternalSame", Version: "v1"}, nil); err != nil { - t.Errorf("Gave error for version and kind defaulted: %v", err) - } - if _, err := runtime.Decode(codec, []byte(``)); err == nil { - t.Errorf("Did not give error for empty data") - } -} - -// Returns a new Scheme set up with the test objects needed by TestDirectCodec. -func GetDirectCodecTestScheme() *runtime.Scheme { - internalGV := schema.GroupVersion{Version: runtime.APIVersionInternal} - externalGV := schema.GroupVersion{Version: "v1"} - - s := runtime.NewScheme() - // Ordinarily, we wouldn't add TestType2, but because this is a test and - // both types are from the same package, we need to get it into the system - // so that converter will match it with ExternalType2. - s.AddKnownTypes(internalGV, &TestType1{}) - s.AddKnownTypes(externalGV, &ExternalTestType1{}) - - s.AddUnversionedTypes(externalGV, &metav1.Status{}) - return s -} - -func TestDirectCodec(t *testing.T) { - s := GetDirectCodecTestScheme() - cf := newCodecFactory(s, newSerializersForScheme(s, testMetaFactory{})) - info, _ := runtime.SerializerInfoForMediaType(cf.SupportedMediaTypes(), runtime.ContentTypeJSON) - serializer := info.Serializer - df := DirectCodecFactory{cf} - ignoredGV, err := schema.ParseGroupVersion("ignored group/ignored version") - if err != nil { - t.Fatal(err) - } - directEncoder := df.EncoderForVersion(serializer, ignoredGV) - directDecoder := df.DecoderToVersion(serializer, ignoredGV) - out, err := runtime.Encode(directEncoder, &ExternalTestType1{}) - if err != nil { - t.Fatal(err) - } - if string(out) != `{"myVersionKey":"v1","myKindKey":"ExternalTestType1"}`+"\n" { - t.Fatal(string(out)) - } - a, _, err := directDecoder.Decode(out, nil, nil) - e := &ExternalTestType1{ - MyWeirdCustomEmbeddedVersionKindField: MyWeirdCustomEmbeddedVersionKindField{ - APIVersion: "v1", - ObjectKind: "ExternalTestType1", - }, - } - if !semantic.DeepEqual(e, a) { - t.Fatalf("expect %v, got %v", e, a) - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/serializer/doc.go b/vendor/k8s.io/kubernetes/pkg/runtime/serializer/doc.go new file mode 100644 index 00000000..6989a4ea --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/runtime/serializer/doc.go @@ -0,0 +1,21 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package serializer only exists until heapster rebases +// TODO genericapiserver remove this empty package. Godep fails without this because heapster relies +// on this package. This will allow us to start splitting packages, but will force +// heapster to update on their next kube rebase. +package serializer diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/serializer/json/.readonly b/vendor/k8s.io/kubernetes/pkg/runtime/serializer/json/.readonly deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/serializer/json/BUILD b/vendor/k8s.io/kubernetes/pkg/runtime/serializer/json/BUILD index 1d79b3a7..deefdcef 100644 --- a/vendor/k8s.io/kubernetes/pkg/runtime/serializer/json/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/runtime/serializer/json/BUILD @@ -5,44 +5,12 @@ licenses(["notice"]) load( "@io_bazel_rules_go//go:def.bzl", "go_library", - "go_test", ) go_library( name = "go_default_library", - srcs = [ - "json.go", - "meta.go", - ], + srcs = ["doc.go"], tags = ["automanaged"], - deps = [ - "//pkg/runtime:go_default_library", - "//pkg/runtime/schema:go_default_library", - "//pkg/runtime/serializer/recognizer:go_default_library", - "//pkg/util/framer:go_default_library", - "//pkg/util/yaml:go_default_library", - "//vendor:github.com/ghodss/yaml", - "//vendor:github.com/ugorji/go/codec", - ], -) - -go_test( - name = "go_default_test", - srcs = ["meta_test.go"], - library = ":go_default_library", - tags = ["automanaged"], -) - -go_test( - name = "go_default_xtest", - srcs = ["json_test.go"], - tags = ["automanaged"], - deps = [ - "//pkg/runtime:go_default_library", - "//pkg/runtime/schema:go_default_library", - "//pkg/runtime/serializer/json:go_default_library", - "//pkg/util/diff:go_default_library", - ], ) filegroup( diff --git a/vendor/k8s.io/kubernetes/pkg/util/sets/empty.go b/vendor/k8s.io/kubernetes/pkg/runtime/serializer/json/doc.go similarity index 65% rename from vendor/k8s.io/kubernetes/pkg/util/sets/empty.go rename to vendor/k8s.io/kubernetes/pkg/runtime/serializer/json/doc.go index cd22b953..a7c3c015 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/sets/empty.go +++ b/vendor/k8s.io/kubernetes/pkg/runtime/serializer/json/doc.go @@ -14,10 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by set-gen. Do not edit it manually! - -package sets - -// Empty is public since it is used by some internal API objects for conversions between external -// string arrays and internal sets, and conversion logic requires public types today. -type Empty struct{} +// Package json only exists until heapster rebases +// TODO genericapiserver remove this empty package. Godep fails without this because heapster relies +// on this package. This will allow us to start splitting packages, but will force +// heapster to update on their next kube rebase. +package json diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/serializer/json/json.go b/vendor/k8s.io/kubernetes/pkg/runtime/serializer/json/json.go deleted file mode 100644 index bba89b1f..00000000 --- a/vendor/k8s.io/kubernetes/pkg/runtime/serializer/json/json.go +++ /dev/null @@ -1,245 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package json - -import ( - "encoding/json" - "io" - - "github.com/ghodss/yaml" - "github.com/ugorji/go/codec" - - "k8s.io/kubernetes/pkg/runtime" - "k8s.io/kubernetes/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/runtime/serializer/recognizer" - "k8s.io/kubernetes/pkg/util/framer" - utilyaml "k8s.io/kubernetes/pkg/util/yaml" -) - -// NewSerializer creates a JSON serializer that handles encoding versioned objects into the proper JSON form. If typer -// is not nil, the object has the group, version, and kind fields set. -func NewSerializer(meta MetaFactory, creater runtime.ObjectCreater, typer runtime.ObjectTyper, pretty bool) *Serializer { - return &Serializer{ - meta: meta, - creater: creater, - typer: typer, - yaml: false, - pretty: pretty, - } -} - -// NewYAMLSerializer creates a YAML serializer that handles encoding versioned objects into the proper YAML form. If typer -// is not nil, the object has the group, version, and kind fields set. This serializer supports only the subset of YAML that -// matches JSON, and will error if constructs are used that do not serialize to JSON. -func NewYAMLSerializer(meta MetaFactory, creater runtime.ObjectCreater, typer runtime.ObjectTyper) *Serializer { - return &Serializer{ - meta: meta, - creater: creater, - typer: typer, - yaml: true, - } -} - -type Serializer struct { - meta MetaFactory - creater runtime.ObjectCreater - typer runtime.ObjectTyper - yaml bool - pretty bool -} - -// Serializer implements Serializer -var _ runtime.Serializer = &Serializer{} -var _ recognizer.RecognizingDecoder = &Serializer{} - -// Decode attempts to convert the provided data into YAML or JSON, extract the stored schema kind, apply the provided default gvk, and then -// load that data into an object matching the desired schema kind or the provided into. If into is *runtime.Unknown, the raw data will be -// extracted and no decoding will be performed. If into is not registered with the typer, then the object will be straight decoded using -// normal JSON/YAML unmarshalling. If into is provided and the original data is not fully qualified with kind/version/group, the type of -// the into will be used to alter the returned gvk. On success or most errors, the method will return the calculated schema kind. -func (s *Serializer) Decode(originalData []byte, gvk *schema.GroupVersionKind, into runtime.Object) (runtime.Object, *schema.GroupVersionKind, error) { - if versioned, ok := into.(*runtime.VersionedObjects); ok { - into = versioned.Last() - obj, actual, err := s.Decode(originalData, gvk, into) - if err != nil { - return nil, actual, err - } - versioned.Objects = []runtime.Object{obj} - return versioned, actual, nil - } - - data := originalData - if s.yaml { - altered, err := yaml.YAMLToJSON(data) - if err != nil { - return nil, nil, err - } - data = altered - } - - actual, err := s.meta.Interpret(data) - if err != nil { - return nil, nil, err - } - - if gvk != nil { - // apply kind and version defaulting from provided default - if len(actual.Kind) == 0 { - actual.Kind = gvk.Kind - } - if len(actual.Version) == 0 && len(actual.Group) == 0 { - actual.Group = gvk.Group - actual.Version = gvk.Version - } - if len(actual.Version) == 0 && actual.Group == gvk.Group { - actual.Version = gvk.Version - } - } - - if unk, ok := into.(*runtime.Unknown); ok && unk != nil { - unk.Raw = originalData - unk.ContentType = runtime.ContentTypeJSON - unk.GetObjectKind().SetGroupVersionKind(*actual) - return unk, actual, nil - } - - if into != nil { - types, _, err := s.typer.ObjectKinds(into) - switch { - case runtime.IsNotRegisteredError(err): - if err := codec.NewDecoderBytes(data, new(codec.JsonHandle)).Decode(into); err != nil { - return nil, actual, err - } - return into, actual, nil - case err != nil: - return nil, actual, err - default: - typed := types[0] - if len(actual.Kind) == 0 { - actual.Kind = typed.Kind - } - if len(actual.Version) == 0 && len(actual.Group) == 0 { - actual.Group = typed.Group - actual.Version = typed.Version - } - if len(actual.Version) == 0 && actual.Group == typed.Group { - actual.Version = typed.Version - } - } - } - - if len(actual.Kind) == 0 { - return nil, actual, runtime.NewMissingKindErr(string(originalData)) - } - if len(actual.Version) == 0 { - return nil, actual, runtime.NewMissingVersionErr(string(originalData)) - } - - // use the target if necessary - obj, err := runtime.UseOrCreateObject(s.typer, s.creater, *actual, into) - if err != nil { - return nil, actual, err - } - - if err := codec.NewDecoderBytes(data, new(codec.JsonHandle)).Decode(obj); err != nil { - return nil, actual, err - } - return obj, actual, nil -} - -// Encode serializes the provided object to the given writer. -func (s *Serializer) Encode(obj runtime.Object, w io.Writer) error { - if s.yaml { - json, err := json.Marshal(obj) - if err != nil { - return err - } - data, err := yaml.JSONToYAML(json) - if err != nil { - return err - } - _, err = w.Write(data) - return err - } - - if s.pretty { - data, err := json.MarshalIndent(obj, "", " ") - if err != nil { - return err - } - _, err = w.Write(data) - return err - } - encoder := json.NewEncoder(w) - return encoder.Encode(obj) -} - -// RecognizesData implements the RecognizingDecoder interface. -func (s *Serializer) RecognizesData(peek io.Reader) (ok, unknown bool, err error) { - if s.yaml { - // we could potentially look for '---' - return false, true, nil - } - _, _, ok = utilyaml.GuessJSONStream(peek, 2048) - return ok, false, nil -} - -// Framer is the default JSON framing behavior, with newlines delimiting individual objects. -var Framer = jsonFramer{} - -type jsonFramer struct{} - -// NewFrameWriter implements stream framing for this serializer -func (jsonFramer) NewFrameWriter(w io.Writer) io.Writer { - // we can write JSON objects directly to the writer, because they are self-framing - return w -} - -// NewFrameReader implements stream framing for this serializer -func (jsonFramer) NewFrameReader(r io.ReadCloser) io.ReadCloser { - // we need to extract the JSON chunks of data to pass to Decode() - return framer.NewJSONFramedReader(r) -} - -// Framer is the default JSON framing behavior, with newlines delimiting individual objects. -var YAMLFramer = yamlFramer{} - -type yamlFramer struct{} - -// NewFrameWriter implements stream framing for this serializer -func (yamlFramer) NewFrameWriter(w io.Writer) io.Writer { - return yamlFrameWriter{w} -} - -// NewFrameReader implements stream framing for this serializer -func (yamlFramer) NewFrameReader(r io.ReadCloser) io.ReadCloser { - // extract the YAML document chunks directly - return utilyaml.NewDocumentDecoder(r) -} - -type yamlFrameWriter struct { - w io.Writer -} - -// Write separates each document with the YAML document separator (`---` followed by line -// break). Writers must write well formed YAML documents (include a final line break). -func (w yamlFrameWriter) Write(data []byte) (n int, err error) { - if _, err := w.w.Write([]byte("---\n")); err != nil { - return 0, err - } - return w.w.Write(data) -} diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/serializer/json/json_test.go b/vendor/k8s.io/kubernetes/pkg/runtime/serializer/json/json_test.go deleted file mode 100644 index e56079fc..00000000 --- a/vendor/k8s.io/kubernetes/pkg/runtime/serializer/json/json_test.go +++ /dev/null @@ -1,264 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package json_test - -import ( - "fmt" - "reflect" - "strings" - "testing" - - "k8s.io/kubernetes/pkg/runtime" - "k8s.io/kubernetes/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/runtime/serializer/json" - "k8s.io/kubernetes/pkg/util/diff" -) - -type testDecodable struct { - Other string - Value int `json:"value"` - gvk schema.GroupVersionKind -} - -func (d *testDecodable) GetObjectKind() schema.ObjectKind { return d } -func (d *testDecodable) SetGroupVersionKind(gvk schema.GroupVersionKind) { d.gvk = gvk } -func (d *testDecodable) GroupVersionKind() schema.GroupVersionKind { return d.gvk } - -func TestDecode(t *testing.T) { - testCases := []struct { - creater runtime.ObjectCreater - typer runtime.ObjectTyper - yaml bool - pretty bool - - data []byte - defaultGVK *schema.GroupVersionKind - into runtime.Object - - errFn func(error) bool - expectedObject runtime.Object - expectedGVK *schema.GroupVersionKind - }{ - { - data: []byte("{}"), - - expectedGVK: &schema.GroupVersionKind{}, - errFn: func(err error) bool { return strings.Contains(err.Error(), "Object 'Kind' is missing in") }, - }, - { - data: []byte("{}"), - defaultGVK: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"}, - creater: &mockCreater{err: fmt.Errorf("fake error")}, - - expectedGVK: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"}, - errFn: func(err error) bool { return err.Error() == "fake error" }, - }, - { - data: []byte("{}"), - defaultGVK: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"}, - creater: &mockCreater{obj: &testDecodable{}}, - expectedObject: &testDecodable{}, - expectedGVK: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"}, - }, - - // version without group is not defaulted - { - data: []byte(`{"apiVersion":"blah"}`), - defaultGVK: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"}, - creater: &mockCreater{obj: &testDecodable{}}, - expectedObject: &testDecodable{}, - expectedGVK: &schema.GroupVersionKind{Kind: "Test", Group: "", Version: "blah"}, - }, - // group without version is defaulted - { - data: []byte(`{"apiVersion":"other/"}`), - defaultGVK: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"}, - creater: &mockCreater{obj: &testDecodable{}}, - expectedObject: &testDecodable{}, - expectedGVK: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"}, - }, - - // accept runtime.Unknown as into and bypass creator - { - data: []byte(`{}`), - into: &runtime.Unknown{}, - - expectedGVK: &schema.GroupVersionKind{}, - expectedObject: &runtime.Unknown{ - Raw: []byte(`{}`), - ContentType: runtime.ContentTypeJSON, - }, - }, - { - data: []byte(`{"test":"object"}`), - into: &runtime.Unknown{}, - - expectedGVK: &schema.GroupVersionKind{}, - expectedObject: &runtime.Unknown{ - Raw: []byte(`{"test":"object"}`), - ContentType: runtime.ContentTypeJSON, - }, - }, - { - data: []byte(`{"test":"object"}`), - into: &runtime.Unknown{}, - defaultGVK: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"}, - expectedGVK: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"}, - expectedObject: &runtime.Unknown{ - TypeMeta: runtime.TypeMeta{APIVersion: "other/blah", Kind: "Test"}, - Raw: []byte(`{"test":"object"}`), - ContentType: runtime.ContentTypeJSON, - }, - }, - - // unregistered objects can be decoded into directly - { - data: []byte(`{"kind":"Test","apiVersion":"other/blah","value":1,"Other":"test"}`), - into: &testDecodable{}, - typer: &mockTyper{err: runtime.NewNotRegisteredErr(schema.GroupVersionKind{}, nil)}, - expectedGVK: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"}, - expectedObject: &testDecodable{ - Other: "test", - Value: 1, - }, - }, - // registered types get defaulted by the into object kind - { - data: []byte(`{"value":1,"Other":"test"}`), - into: &testDecodable{}, - typer: &mockTyper{gvk: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"}}, - expectedGVK: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"}, - expectedObject: &testDecodable{ - Other: "test", - Value: 1, - }, - }, - // registered types get defaulted by the into object kind even without version, but return an error - { - data: []byte(`{"value":1,"Other":"test"}`), - into: &testDecodable{}, - typer: &mockTyper{gvk: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: ""}}, - expectedGVK: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: ""}, - errFn: func(err error) bool { return strings.Contains(err.Error(), "Object 'apiVersion' is missing in") }, - expectedObject: &testDecodable{ - Other: "test", - Value: 1, - }, - }, - - // runtime.VersionedObjects are decoded - { - data: []byte(`{"value":1,"Other":"test"}`), - into: &runtime.VersionedObjects{Objects: []runtime.Object{}}, - creater: &mockCreater{obj: &testDecodable{}}, - typer: &mockTyper{gvk: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"}}, - defaultGVK: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"}, - expectedGVK: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"}, - expectedObject: &runtime.VersionedObjects{ - Objects: []runtime.Object{ - &testDecodable{ - Other: "test", - Value: 1, - }, - }, - }, - }, - // runtime.VersionedObjects with an object are decoded into - { - data: []byte(`{"Other":"test"}`), - into: &runtime.VersionedObjects{Objects: []runtime.Object{&testDecodable{Value: 2}}}, - typer: &mockTyper{gvk: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"}}, - expectedGVK: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"}, - expectedObject: &runtime.VersionedObjects{ - Objects: []runtime.Object{ - &testDecodable{ - Other: "test", - Value: 2, - }, - }, - }, - }, - } - - for i, test := range testCases { - var s runtime.Serializer - if test.yaml { - s = json.NewYAMLSerializer(json.DefaultMetaFactory, test.creater, test.typer) - } else { - s = json.NewSerializer(json.DefaultMetaFactory, test.creater, test.typer, test.pretty) - } - obj, gvk, err := s.Decode([]byte(test.data), test.defaultGVK, test.into) - - if !reflect.DeepEqual(test.expectedGVK, gvk) { - t.Errorf("%d: unexpected GVK: %v", i, gvk) - } - - switch { - case err == nil && test.errFn != nil: - t.Errorf("%d: failed: %v", i, err) - continue - case err != nil && test.errFn == nil: - t.Errorf("%d: failed: %v", i, err) - continue - case err != nil: - if !test.errFn(err) { - t.Errorf("%d: failed: %v", i, err) - } - if obj != nil { - t.Errorf("%d: should have returned nil object", i) - } - continue - } - - if test.into != nil && test.into != obj { - t.Errorf("%d: expected into to be returned: %v", i, obj) - continue - } - - if !reflect.DeepEqual(test.expectedObject, obj) { - t.Errorf("%d: unexpected object:\n%s", i, diff.ObjectGoPrintSideBySide(test.expectedObject, obj)) - } - } -} - -type mockCreater struct { - apiVersion string - kind string - err error - obj runtime.Object -} - -func (c *mockCreater) New(kind schema.GroupVersionKind) (runtime.Object, error) { - c.apiVersion, c.kind = kind.GroupVersion().String(), kind.Kind - return c.obj, c.err -} - -type mockTyper struct { - gvk *schema.GroupVersionKind - err error -} - -func (t *mockTyper) ObjectKinds(obj runtime.Object) ([]schema.GroupVersionKind, bool, error) { - if t.gvk == nil { - return nil, false, t.err - } - return []schema.GroupVersionKind{*t.gvk}, false, t.err -} - -func (t *mockTyper) Recognizes(_ schema.GroupVersionKind) bool { - return false -} diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/serializer/json/meta.go b/vendor/k8s.io/kubernetes/pkg/runtime/serializer/json/meta.go deleted file mode 100644 index 6b9494de..00000000 --- a/vendor/k8s.io/kubernetes/pkg/runtime/serializer/json/meta.go +++ /dev/null @@ -1,63 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package json - -import ( - "encoding/json" - "fmt" - - "k8s.io/kubernetes/pkg/runtime/schema" -) - -// MetaFactory is used to store and retrieve the version and kind -// information for JSON objects in a serializer. -type MetaFactory interface { - // Interpret should return the version and kind of the wire-format of - // the object. - Interpret(data []byte) (*schema.GroupVersionKind, error) -} - -// DefaultMetaFactory is a default factory for versioning objects in JSON. The object -// in memory and in the default JSON serialization will use the "kind" and "apiVersion" -// fields. -var DefaultMetaFactory = SimpleMetaFactory{} - -// SimpleMetaFactory provides default methods for retrieving the type and version of objects -// that are identified with an "apiVersion" and "kind" fields in their JSON -// serialization. It may be parameterized with the names of the fields in memory, or an -// optional list of base structs to search for those fields in memory. -type SimpleMetaFactory struct { -} - -// Interpret will return the APIVersion and Kind of the JSON wire-format -// encoding of an object, or an error. -func (SimpleMetaFactory) Interpret(data []byte) (*schema.GroupVersionKind, error) { - findKind := struct { - // +optional - APIVersion string `json:"apiVersion,omitempty"` - // +optional - Kind string `json:"kind,omitempty"` - }{} - if err := json.Unmarshal(data, &findKind); err != nil { - return nil, fmt.Errorf("couldn't get version/kind; json parse error: %v", err) - } - gv, err := schema.ParseGroupVersion(findKind.APIVersion) - if err != nil { - return nil, err - } - return &schema.GroupVersionKind{Group: gv.Group, Version: gv.Version, Kind: findKind.Kind}, nil -} diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/serializer/json/meta_test.go b/vendor/k8s.io/kubernetes/pkg/runtime/serializer/json/meta_test.go deleted file mode 100644 index f4e34a22..00000000 --- a/vendor/k8s.io/kubernetes/pkg/runtime/serializer/json/meta_test.go +++ /dev/null @@ -1,45 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package json - -import "testing" - -func TestSimpleMetaFactoryInterpret(t *testing.T) { - factory := SimpleMetaFactory{} - gvk, err := factory.Interpret([]byte(`{"apiVersion":"1","kind":"object"}`)) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - if gvk.Version != "1" || gvk.Kind != "object" { - t.Errorf("unexpected interpret: %#v", gvk) - } - - // no kind or version - gvk, err = factory.Interpret([]byte(`{}`)) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - if gvk.Version != "" || gvk.Kind != "" { - t.Errorf("unexpected interpret: %#v", gvk) - } - - // unparsable - gvk, err = factory.Interpret([]byte(`{`)) - if err == nil { - t.Errorf("unexpected non-error") - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/serializer/negotiated_codec.go b/vendor/k8s.io/kubernetes/pkg/runtime/serializer/negotiated_codec.go deleted file mode 100644 index 20337fc4..00000000 --- a/vendor/k8s.io/kubernetes/pkg/runtime/serializer/negotiated_codec.go +++ /dev/null @@ -1,43 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package serializer - -import ( - "k8s.io/kubernetes/pkg/runtime" -) - -// TODO: We should split negotiated serializers that we can change versions on from those we can change -// serialization formats on -type negotiatedSerializerWrapper struct { - info runtime.SerializerInfo -} - -func NegotiatedSerializerWrapper(info runtime.SerializerInfo) runtime.NegotiatedSerializer { - return &negotiatedSerializerWrapper{info} -} - -func (n *negotiatedSerializerWrapper) SupportedMediaTypes() []runtime.SerializerInfo { - return []runtime.SerializerInfo{n.info} -} - -func (n *negotiatedSerializerWrapper) EncoderForVersion(e runtime.Encoder, _ runtime.GroupVersioner) runtime.Encoder { - return e -} - -func (n *negotiatedSerializerWrapper) DecoderToVersion(d runtime.Decoder, _gv runtime.GroupVersioner) runtime.Decoder { - return d -} diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/serializer/protobuf/.readonly b/vendor/k8s.io/kubernetes/pkg/runtime/serializer/protobuf/.readonly deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/serializer/protobuf/BUILD b/vendor/k8s.io/kubernetes/pkg/runtime/serializer/protobuf/BUILD index ba3ebbe8..deefdcef 100644 --- a/vendor/k8s.io/kubernetes/pkg/runtime/serializer/protobuf/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/runtime/serializer/protobuf/BUILD @@ -9,18 +9,8 @@ load( go_library( name = "go_default_library", - srcs = [ - "doc.go", - "protobuf.go", - ], + srcs = ["doc.go"], tags = ["automanaged"], - deps = [ - "//pkg/runtime:go_default_library", - "//pkg/runtime/schema:go_default_library", - "//pkg/runtime/serializer/recognizer:go_default_library", - "//pkg/util/framer:go_default_library", - "//vendor:github.com/gogo/protobuf/proto", - ], ) filegroup( diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/serializer/protobuf/doc.go b/vendor/k8s.io/kubernetes/pkg/runtime/serializer/protobuf/doc.go index 19e8a692..b63cce0e 100644 --- a/vendor/k8s.io/kubernetes/pkg/runtime/serializer/protobuf/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/runtime/serializer/protobuf/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Package protobuf provides a Kubernetes serializer for the protobuf format. -package protobuf // import "k8s.io/kubernetes/pkg/runtime/serializer/protobuf" +// Package protobuf only exists until heapster rebases +// TODO genericapiserver remove this empty package. Godep fails without this because heapster relies +// on this package. This will allow us to start splitting packages, but will force +// heapster to update on their next kube rebase. +package protobuf diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/serializer/protobuf/protobuf.go b/vendor/k8s.io/kubernetes/pkg/runtime/serializer/protobuf/protobuf.go deleted file mode 100644 index 5fbc65fb..00000000 --- a/vendor/k8s.io/kubernetes/pkg/runtime/serializer/protobuf/protobuf.go +++ /dev/null @@ -1,448 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package protobuf - -import ( - "bytes" - "fmt" - "io" - "reflect" - - "github.com/gogo/protobuf/proto" - - "k8s.io/kubernetes/pkg/runtime" - "k8s.io/kubernetes/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/runtime/serializer/recognizer" - "k8s.io/kubernetes/pkg/util/framer" -) - -var ( - // protoEncodingPrefix serves as a magic number for an encoded protobuf message on this serializer. All - // proto messages serialized by this schema will be preceded by the bytes 0x6b 0x38 0x73, with the fourth - // byte being reserved for the encoding style. The only encoding style defined is 0x00, which means that - // the rest of the byte stream is a message of type k8s.io.kubernetes.pkg.runtime.Unknown (proto2). - // - // See k8s.io/kubernetes/pkg/runtime/generated.proto for details of the runtime.Unknown message. - // - // This encoding scheme is experimental, and is subject to change at any time. - protoEncodingPrefix = []byte{0x6b, 0x38, 0x73, 0x00} -) - -type errNotMarshalable struct { - t reflect.Type -} - -func (e errNotMarshalable) Error() string { - return fmt.Sprintf("object %v does not implement the protobuf marshalling interface and cannot be encoded to a protobuf message", e.t) -} - -func IsNotMarshalable(err error) bool { - _, ok := err.(errNotMarshalable) - return err != nil && ok -} - -// NewSerializer creates a Protobuf serializer that handles encoding versioned objects into the proper wire form. If a typer -// is passed, the encoded object will have group, version, and kind fields set. If typer is nil, the objects will be written -// as-is (any type info passed with the object will be used). -// -// This encoding scheme is experimental, and is subject to change at any time. -func NewSerializer(creater runtime.ObjectCreater, typer runtime.ObjectTyper, defaultContentType string) *Serializer { - return &Serializer{ - prefix: protoEncodingPrefix, - creater: creater, - typer: typer, - contentType: defaultContentType, - } -} - -type Serializer struct { - prefix []byte - creater runtime.ObjectCreater - typer runtime.ObjectTyper - contentType string -} - -var _ runtime.Serializer = &Serializer{} -var _ recognizer.RecognizingDecoder = &Serializer{} - -// Decode attempts to convert the provided data into a protobuf message, extract the stored schema kind, apply the provided default -// gvk, and then load that data into an object matching the desired schema kind or the provided into. If into is *runtime.Unknown, -// the raw data will be extracted and no decoding will be performed. If into is not registered with the typer, then the object will -// be straight decoded using normal protobuf unmarshalling (the MarshalTo interface). If into is provided and the original data is -// not fully qualified with kind/version/group, the type of the into will be used to alter the returned gvk. On success or most -// errors, the method will return the calculated schema kind. -func (s *Serializer) Decode(originalData []byte, gvk *schema.GroupVersionKind, into runtime.Object) (runtime.Object, *schema.GroupVersionKind, error) { - if versioned, ok := into.(*runtime.VersionedObjects); ok { - into = versioned.Last() - obj, actual, err := s.Decode(originalData, gvk, into) - if err != nil { - return nil, actual, err - } - // the last item in versioned becomes into, so if versioned was not originally empty we reset the object - // array so the first position is the decoded object and the second position is the outermost object. - // if there were no objects in the versioned list passed to us, only add ourselves. - if into != nil && into != obj { - versioned.Objects = []runtime.Object{obj, into} - } else { - versioned.Objects = []runtime.Object{obj} - } - return versioned, actual, err - } - - prefixLen := len(s.prefix) - switch { - case len(originalData) == 0: - // TODO: treat like decoding {} from JSON with defaulting - return nil, nil, fmt.Errorf("empty data") - case len(originalData) < prefixLen || !bytes.Equal(s.prefix, originalData[:prefixLen]): - return nil, nil, fmt.Errorf("provided data does not appear to be a protobuf message, expected prefix %v", s.prefix) - case len(originalData) == prefixLen: - // TODO: treat like decoding {} from JSON with defaulting - return nil, nil, fmt.Errorf("empty body") - } - - data := originalData[prefixLen:] - unk := runtime.Unknown{} - if err := unk.Unmarshal(data); err != nil { - return nil, nil, err - } - - actual := unk.GroupVersionKind() - copyKindDefaults(&actual, gvk) - - if intoUnknown, ok := into.(*runtime.Unknown); ok && intoUnknown != nil { - *intoUnknown = unk - if ok, _, _ := s.RecognizesData(bytes.NewBuffer(unk.Raw)); ok { - intoUnknown.ContentType = s.contentType - } - return intoUnknown, &actual, nil - } - - if into != nil { - types, _, err := s.typer.ObjectKinds(into) - switch { - case runtime.IsNotRegisteredError(err): - pb, ok := into.(proto.Message) - if !ok { - return nil, &actual, errNotMarshalable{reflect.TypeOf(into)} - } - if err := proto.Unmarshal(unk.Raw, pb); err != nil { - return nil, &actual, err - } - return into, &actual, nil - case err != nil: - return nil, &actual, err - default: - copyKindDefaults(&actual, &types[0]) - // if the result of defaulting did not set a version or group, ensure that at least group is set - // (copyKindDefaults will not assign Group if version is already set). This guarantees that the group - // of into is set if there is no better information from the caller or object. - if len(actual.Version) == 0 && len(actual.Group) == 0 { - actual.Group = types[0].Group - } - } - } - - if len(actual.Kind) == 0 { - return nil, &actual, runtime.NewMissingKindErr(fmt.Sprintf("%#v", unk.TypeMeta)) - } - if len(actual.Version) == 0 { - return nil, &actual, runtime.NewMissingVersionErr(fmt.Sprintf("%#v", unk.TypeMeta)) - } - - return unmarshalToObject(s.typer, s.creater, &actual, into, unk.Raw) -} - -// Encode serializes the provided object to the given writer. -func (s *Serializer) Encode(obj runtime.Object, w io.Writer) error { - prefixSize := uint64(len(s.prefix)) - - var unk runtime.Unknown - switch t := obj.(type) { - case *runtime.Unknown: - estimatedSize := prefixSize + uint64(t.Size()) - data := make([]byte, estimatedSize) - i, err := t.MarshalTo(data[prefixSize:]) - if err != nil { - return err - } - copy(data, s.prefix) - _, err = w.Write(data[:prefixSize+uint64(i)]) - return err - default: - kind := obj.GetObjectKind().GroupVersionKind() - unk = runtime.Unknown{ - TypeMeta: runtime.TypeMeta{ - Kind: kind.Kind, - APIVersion: kind.GroupVersion().String(), - }, - } - } - - switch t := obj.(type) { - case bufferedMarshaller: - // this path performs a single allocation during write but requires the caller to implement - // the more efficient Size and MarshalTo methods - encodedSize := uint64(t.Size()) - estimatedSize := prefixSize + estimateUnknownSize(&unk, encodedSize) - data := make([]byte, estimatedSize) - - i, err := unk.NestedMarshalTo(data[prefixSize:], t, encodedSize) - if err != nil { - return err - } - - copy(data, s.prefix) - - _, err = w.Write(data[:prefixSize+uint64(i)]) - return err - - case proto.Marshaler: - // this path performs extra allocations - data, err := t.Marshal() - if err != nil { - return err - } - unk.Raw = data - - estimatedSize := prefixSize + uint64(unk.Size()) - data = make([]byte, estimatedSize) - - i, err := unk.MarshalTo(data[prefixSize:]) - if err != nil { - return err - } - - copy(data, s.prefix) - - _, err = w.Write(data[:prefixSize+uint64(i)]) - return err - - default: - // TODO: marshal with a different content type and serializer (JSON for third party objects) - return errNotMarshalable{reflect.TypeOf(obj)} - } -} - -// RecognizesData implements the RecognizingDecoder interface. -func (s *Serializer) RecognizesData(peek io.Reader) (bool, bool, error) { - prefix := make([]byte, 4) - n, err := peek.Read(prefix) - if err != nil { - if err == io.EOF { - return false, false, nil - } - return false, false, err - } - if n != 4 { - return false, false, nil - } - return bytes.Equal(s.prefix, prefix), false, nil -} - -// copyKindDefaults defaults dst to the value in src if dst does not have a value set. -func copyKindDefaults(dst, src *schema.GroupVersionKind) { - if src == nil { - return - } - // apply kind and version defaulting from provided default - if len(dst.Kind) == 0 { - dst.Kind = src.Kind - } - if len(dst.Version) == 0 && len(src.Version) > 0 { - dst.Group = src.Group - dst.Version = src.Version - } -} - -// bufferedMarshaller describes a more efficient marshalling interface that can avoid allocating multiple -// byte buffers by pre-calculating the size of the final buffer needed. -type bufferedMarshaller interface { - proto.Sizer - runtime.ProtobufMarshaller -} - -// estimateUnknownSize returns the expected bytes consumed by a given runtime.Unknown -// object with a nil RawJSON struct and the expected size of the provided buffer. The -// returned size will not be correct if RawJSOn is set on unk. -func estimateUnknownSize(unk *runtime.Unknown, byteSize uint64) uint64 { - size := uint64(unk.Size()) - // protobuf uses 1 byte for the tag, a varint for the length of the array (at most 8 bytes - uint64 - here), - // and the size of the array. - size += 1 + 8 + byteSize - return size -} - -// NewRawSerializer creates a Protobuf serializer that handles encoding versioned objects into the proper wire form. If typer -// is not nil, the object has the group, version, and kind fields set. This serializer does not provide type information for the -// encoded object, and thus is not self describing (callers must know what type is being described in order to decode). -// -// This encoding scheme is experimental, and is subject to change at any time. -func NewRawSerializer(creater runtime.ObjectCreater, typer runtime.ObjectTyper, defaultContentType string) *RawSerializer { - return &RawSerializer{ - creater: creater, - typer: typer, - contentType: defaultContentType, - } -} - -// RawSerializer encodes and decodes objects without adding a runtime.Unknown wrapper (objects are encoded without identifying -// type). -type RawSerializer struct { - creater runtime.ObjectCreater - typer runtime.ObjectTyper - contentType string -} - -var _ runtime.Serializer = &RawSerializer{} - -// Decode attempts to convert the provided data into a protobuf message, extract the stored schema kind, apply the provided default -// gvk, and then load that data into an object matching the desired schema kind or the provided into. If into is *runtime.Unknown, -// the raw data will be extracted and no decoding will be performed. If into is not registered with the typer, then the object will -// be straight decoded using normal protobuf unmarshalling (the MarshalTo interface). If into is provided and the original data is -// not fully qualified with kind/version/group, the type of the into will be used to alter the returned gvk. On success or most -// errors, the method will return the calculated schema kind. -func (s *RawSerializer) Decode(originalData []byte, gvk *schema.GroupVersionKind, into runtime.Object) (runtime.Object, *schema.GroupVersionKind, error) { - if into == nil { - return nil, nil, fmt.Errorf("this serializer requires an object to decode into: %#v", s) - } - - if versioned, ok := into.(*runtime.VersionedObjects); ok { - into = versioned.Last() - obj, actual, err := s.Decode(originalData, gvk, into) - if err != nil { - return nil, actual, err - } - if into != nil && into != obj { - versioned.Objects = []runtime.Object{obj, into} - } else { - versioned.Objects = []runtime.Object{obj} - } - return versioned, actual, err - } - - if len(originalData) == 0 { - // TODO: treat like decoding {} from JSON with defaulting - return nil, nil, fmt.Errorf("empty data") - } - data := originalData - - actual := &schema.GroupVersionKind{} - copyKindDefaults(actual, gvk) - - if intoUnknown, ok := into.(*runtime.Unknown); ok && intoUnknown != nil { - intoUnknown.Raw = data - intoUnknown.ContentEncoding = "" - intoUnknown.ContentType = s.contentType - intoUnknown.SetGroupVersionKind(*actual) - return intoUnknown, actual, nil - } - - types, _, err := s.typer.ObjectKinds(into) - switch { - case runtime.IsNotRegisteredError(err): - pb, ok := into.(proto.Message) - if !ok { - return nil, actual, errNotMarshalable{reflect.TypeOf(into)} - } - if err := proto.Unmarshal(data, pb); err != nil { - return nil, actual, err - } - return into, actual, nil - case err != nil: - return nil, actual, err - default: - copyKindDefaults(actual, &types[0]) - // if the result of defaulting did not set a version or group, ensure that at least group is set - // (copyKindDefaults will not assign Group if version is already set). This guarantees that the group - // of into is set if there is no better information from the caller or object. - if len(actual.Version) == 0 && len(actual.Group) == 0 { - actual.Group = types[0].Group - } - } - - if len(actual.Kind) == 0 { - return nil, actual, runtime.NewMissingKindErr("") - } - if len(actual.Version) == 0 { - return nil, actual, runtime.NewMissingVersionErr("") - } - - return unmarshalToObject(s.typer, s.creater, actual, into, data) -} - -// unmarshalToObject is the common code between decode in the raw and normal serializer. -func unmarshalToObject(typer runtime.ObjectTyper, creater runtime.ObjectCreater, actual *schema.GroupVersionKind, into runtime.Object, data []byte) (runtime.Object, *schema.GroupVersionKind, error) { - // use the target if necessary - obj, err := runtime.UseOrCreateObject(typer, creater, *actual, into) - if err != nil { - return nil, actual, err - } - - pb, ok := obj.(proto.Message) - if !ok { - return nil, actual, errNotMarshalable{reflect.TypeOf(obj)} - } - if err := proto.Unmarshal(data, pb); err != nil { - return nil, actual, err - } - return obj, actual, nil -} - -// Encode serializes the provided object to the given writer. Overrides is ignored. -func (s *RawSerializer) Encode(obj runtime.Object, w io.Writer) error { - switch t := obj.(type) { - case bufferedMarshaller: - // this path performs a single allocation during write but requires the caller to implement - // the more efficient Size and MarshalTo methods - encodedSize := uint64(t.Size()) - data := make([]byte, encodedSize) - - n, err := t.MarshalTo(data) - if err != nil { - return err - } - _, err = w.Write(data[:n]) - return err - - case proto.Marshaler: - // this path performs extra allocations - data, err := t.Marshal() - if err != nil { - return err - } - _, err = w.Write(data) - return err - - default: - return errNotMarshalable{reflect.TypeOf(obj)} - } -} - -var LengthDelimitedFramer = lengthDelimitedFramer{} - -type lengthDelimitedFramer struct{} - -// NewFrameWriter implements stream framing for this serializer -func (lengthDelimitedFramer) NewFrameWriter(w io.Writer) io.Writer { - return framer.NewLengthDelimitedFrameWriter(w) -} - -// NewFrameReader implements stream framing for this serializer -func (lengthDelimitedFramer) NewFrameReader(r io.ReadCloser) io.ReadCloser { - return framer.NewLengthDelimitedFrameReader(r) -} diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/serializer/protobuf_extension.go b/vendor/k8s.io/kubernetes/pkg/runtime/serializer/protobuf_extension.go deleted file mode 100644 index a50dae54..00000000 --- a/vendor/k8s.io/kubernetes/pkg/runtime/serializer/protobuf_extension.go +++ /dev/null @@ -1,48 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package serializer - -import ( - "k8s.io/kubernetes/pkg/runtime" - "k8s.io/kubernetes/pkg/runtime/serializer/protobuf" -) - -const ( - // contentTypeProtobuf is the protobuf type exposed for Kubernetes. It is private to prevent others from - // depending on it unintentionally. - // TODO: potentially move to pkg/api (since it's part of the Kube public API) and pass it in to the - // CodecFactory on initialization. - contentTypeProtobuf = "application/vnd.kubernetes.protobuf" -) - -func protobufSerializer(scheme *runtime.Scheme) (serializerType, bool) { - serializer := protobuf.NewSerializer(scheme, scheme, contentTypeProtobuf) - raw := protobuf.NewRawSerializer(scheme, scheme, contentTypeProtobuf) - return serializerType{ - AcceptContentTypes: []string{contentTypeProtobuf}, - ContentType: contentTypeProtobuf, - FileExtensions: []string{"pb"}, - Serializer: serializer, - - Framer: protobuf.LengthDelimitedFramer, - StreamSerializer: raw, - }, true -} - -func init() { - serializerExtensions = append(serializerExtensions, protobufSerializer) -} diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/serializer/recognizer/.readonly b/vendor/k8s.io/kubernetes/pkg/runtime/serializer/recognizer/.readonly deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/serializer/recognizer/BUILD b/vendor/k8s.io/kubernetes/pkg/runtime/serializer/recognizer/BUILD index d0b08651..deefdcef 100644 --- a/vendor/k8s.io/kubernetes/pkg/runtime/serializer/recognizer/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/runtime/serializer/recognizer/BUILD @@ -9,12 +9,8 @@ load( go_library( name = "go_default_library", - srcs = ["recognizer.go"], + srcs = ["doc.go"], tags = ["automanaged"], - deps = [ - "//pkg/runtime:go_default_library", - "//pkg/runtime/schema:go_default_library", - ], ) filegroup( @@ -26,9 +22,6 @@ filegroup( filegroup( name = "all-srcs", - srcs = [ - ":package-srcs", - "//pkg/runtime/serializer/recognizer/testing:all-srcs", - ], + srcs = [":package-srcs"], tags = ["automanaged"], ) diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/serializer/recognizer/doc.go b/vendor/k8s.io/kubernetes/pkg/runtime/serializer/recognizer/doc.go new file mode 100644 index 00000000..48331428 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/runtime/serializer/recognizer/doc.go @@ -0,0 +1,21 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package recognizer only exists until heapster rebases +// TODO genericapiserver remove this empty package. Godep fails without this because heapster relies +// on this package. This will allow us to start splitting packages, but will force +// heapster to update on their next kube rebase. +package recognizer diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/serializer/recognizer/recognizer.go b/vendor/k8s.io/kubernetes/pkg/runtime/serializer/recognizer/recognizer.go deleted file mode 100644 index 66693647..00000000 --- a/vendor/k8s.io/kubernetes/pkg/runtime/serializer/recognizer/recognizer.go +++ /dev/null @@ -1,127 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package recognizer - -import ( - "bufio" - "bytes" - "fmt" - "io" - - "k8s.io/kubernetes/pkg/runtime" - "k8s.io/kubernetes/pkg/runtime/schema" -) - -type RecognizingDecoder interface { - runtime.Decoder - // RecognizesData should return true if the input provided in the provided reader - // belongs to this decoder, or an error if the data could not be read or is ambiguous. - // Unknown is true if the data could not be determined to match the decoder type. - // Decoders should assume that they can read as much of peek as they need (as the caller - // provides) and may return unknown if the data provided is not sufficient to make a - // a determination. When peek returns EOF that may mean the end of the input or the - // end of buffered input - recognizers should return the best guess at that time. - RecognizesData(peek io.Reader) (ok, unknown bool, err error) -} - -// NewDecoder creates a decoder that will attempt multiple decoders in an order defined -// by: -// -// 1. The decoder implements RecognizingDecoder and identifies the data -// 2. All other decoders, and any decoder that returned true for unknown. -// -// The order passed to the constructor is preserved within those priorities. -func NewDecoder(decoders ...runtime.Decoder) runtime.Decoder { - return &decoder{ - decoders: decoders, - } -} - -type decoder struct { - decoders []runtime.Decoder -} - -var _ RecognizingDecoder = &decoder{} - -func (d *decoder) RecognizesData(peek io.Reader) (bool, bool, error) { - var ( - lastErr error - anyUnknown bool - ) - data, _ := bufio.NewReaderSize(peek, 1024).Peek(1024) - for _, r := range d.decoders { - switch t := r.(type) { - case RecognizingDecoder: - ok, unknown, err := t.RecognizesData(bytes.NewBuffer(data)) - if err != nil { - lastErr = err - continue - } - anyUnknown = anyUnknown || unknown - if !ok { - continue - } - return true, false, nil - } - } - return false, anyUnknown, lastErr -} - -func (d *decoder) Decode(data []byte, gvk *schema.GroupVersionKind, into runtime.Object) (runtime.Object, *schema.GroupVersionKind, error) { - var ( - lastErr error - skipped []runtime.Decoder - ) - - // try recognizers, record any decoders we need to give a chance later - for _, r := range d.decoders { - switch t := r.(type) { - case RecognizingDecoder: - buf := bytes.NewBuffer(data) - ok, unknown, err := t.RecognizesData(buf) - if err != nil { - lastErr = err - continue - } - if unknown { - skipped = append(skipped, t) - continue - } - if !ok { - continue - } - return r.Decode(data, gvk, into) - default: - skipped = append(skipped, t) - } - } - - // try recognizers that returned unknown or didn't recognize their data - for _, r := range skipped { - out, actual, err := r.Decode(data, gvk, into) - if err != nil { - lastErr = err - continue - } - return out, actual, nil - } - - if lastErr == nil { - lastErr = fmt.Errorf("no serialization format matched the provided data") - } - return nil, nil, lastErr -} diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/serializer/recognizer/testing/.readonly b/vendor/k8s.io/kubernetes/pkg/runtime/serializer/recognizer/testing/.readonly deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/serializer/recognizer/testing/BUILD b/vendor/k8s.io/kubernetes/pkg/runtime/serializer/recognizer/testing/BUILD deleted file mode 100644 index 5f1b9e6a..00000000 --- a/vendor/k8s.io/kubernetes/pkg/runtime/serializer/recognizer/testing/BUILD +++ /dev/null @@ -1,33 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["recognizer_test.go"], - tags = ["automanaged"], - deps = [ - "//pkg/runtime:go_default_library", - "//pkg/runtime/schema:go_default_library", - "//pkg/runtime/serializer/json:go_default_library", - "//pkg/runtime/serializer/recognizer:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/serializer/recognizer/testing/recognizer_test.go b/vendor/k8s.io/kubernetes/pkg/runtime/serializer/recognizer/testing/recognizer_test.go deleted file mode 100644 index ddeb626c..00000000 --- a/vendor/k8s.io/kubernetes/pkg/runtime/serializer/recognizer/testing/recognizer_test.go +++ /dev/null @@ -1,58 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package testing - -import ( - "testing" - - "k8s.io/kubernetes/pkg/runtime" - "k8s.io/kubernetes/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/runtime/serializer/json" - "k8s.io/kubernetes/pkg/runtime/serializer/recognizer" -) - -type A struct{} - -func (A) GetObjectKind() schema.ObjectKind { return schema.EmptyObjectKind } - -func TestRecognizer(t *testing.T) { - s := runtime.NewScheme() - s.AddKnownTypes(schema.GroupVersion{Version: "v1"}, &A{}) - d := recognizer.NewDecoder( - json.NewSerializer(json.DefaultMetaFactory, s, s, false), - json.NewYAMLSerializer(json.DefaultMetaFactory, s, s), - ) - out, _, err := d.Decode([]byte(` -kind: A -apiVersion: v1 -`), nil, nil) - if err != nil { - t.Fatal(err) - } - t.Logf("%#v", out) - - out, _, err = d.Decode([]byte(` -{ - "kind":"A", - "apiVersion":"v1" -} -`), nil, nil) - if err != nil { - t.Fatal(err) - } - t.Logf("%#v", out) -} diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/serializer/streaming/.readonly b/vendor/k8s.io/kubernetes/pkg/runtime/serializer/streaming/.readonly deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/serializer/streaming/BUILD b/vendor/k8s.io/kubernetes/pkg/runtime/serializer/streaming/BUILD index 271dd647..deefdcef 100644 --- a/vendor/k8s.io/kubernetes/pkg/runtime/serializer/streaming/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/runtime/serializer/streaming/BUILD @@ -5,29 +5,12 @@ licenses(["notice"]) load( "@io_bazel_rules_go//go:def.bzl", "go_library", - "go_test", ) go_library( name = "go_default_library", - srcs = ["streaming.go"], + srcs = ["doc.go"], tags = ["automanaged"], - deps = [ - "//pkg/runtime:go_default_library", - "//pkg/runtime/schema:go_default_library", - ], -) - -go_test( - name = "go_default_test", - srcs = ["streaming_test.go"], - library = ":go_default_library", - tags = ["automanaged"], - deps = [ - "//pkg/runtime:go_default_library", - "//pkg/runtime/schema:go_default_library", - "//pkg/util/framer:go_default_library", - ], ) filegroup( diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/serializer/streaming/doc.go b/vendor/k8s.io/kubernetes/pkg/runtime/serializer/streaming/doc.go new file mode 100644 index 00000000..ddac0959 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/runtime/serializer/streaming/doc.go @@ -0,0 +1,21 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package streaming only exists until heapster rebases +// TODO genericapiserver remove this empty package. Godep fails without this because heapster relies +// on this package. This will allow us to start splitting packages, but will force +// heapster to update on their next kube rebase. +package streaming diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/serializer/streaming/streaming.go b/vendor/k8s.io/kubernetes/pkg/runtime/serializer/streaming/streaming.go deleted file mode 100644 index 4b069f30..00000000 --- a/vendor/k8s.io/kubernetes/pkg/runtime/serializer/streaming/streaming.go +++ /dev/null @@ -1,137 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Package streaming implements encoder and decoder for streams -// of runtime.Objects over io.Writer/Readers. -package streaming - -import ( - "bytes" - "fmt" - "io" - - "k8s.io/kubernetes/pkg/runtime" - "k8s.io/kubernetes/pkg/runtime/schema" -) - -// Encoder is a runtime.Encoder on a stream. -type Encoder interface { - // Encode will write the provided object to the stream or return an error. It obeys the same - // contract as runtime.VersionedEncoder. - Encode(obj runtime.Object) error -} - -// Decoder is a runtime.Decoder from a stream. -type Decoder interface { - // Decode will return io.EOF when no more objects are available. - Decode(defaults *schema.GroupVersionKind, into runtime.Object) (runtime.Object, *schema.GroupVersionKind, error) - // Close closes the underlying stream. - Close() error -} - -// Serializer is a factory for creating encoders and decoders that work over streams. -type Serializer interface { - NewEncoder(w io.Writer) Encoder - NewDecoder(r io.ReadCloser) Decoder -} - -type decoder struct { - reader io.ReadCloser - decoder runtime.Decoder - buf []byte - maxBytes int - resetRead bool -} - -// NewDecoder creates a streaming decoder that reads object chunks from r and decodes them with d. -// The reader is expected to return ErrShortRead if the provided buffer is not large enough to read -// an entire object. -func NewDecoder(r io.ReadCloser, d runtime.Decoder) Decoder { - return &decoder{ - reader: r, - decoder: d, - buf: make([]byte, 1024), - maxBytes: 1024 * 1024, - } -} - -var ErrObjectTooLarge = fmt.Errorf("object to decode was longer than maximum allowed size") - -// Decode reads the next object from the stream and decodes it. -func (d *decoder) Decode(defaults *schema.GroupVersionKind, into runtime.Object) (runtime.Object, *schema.GroupVersionKind, error) { - base := 0 - for { - n, err := d.reader.Read(d.buf[base:]) - if err == io.ErrShortBuffer { - if n == 0 { - return nil, nil, fmt.Errorf("got short buffer with n=0, base=%d, cap=%d", base, cap(d.buf)) - } - if d.resetRead { - continue - } - // double the buffer size up to maxBytes - if len(d.buf) < d.maxBytes { - base += n - d.buf = append(d.buf, make([]byte, len(d.buf))...) - continue - } - // must read the rest of the frame (until we stop getting ErrShortBuffer) - d.resetRead = true - base = 0 - return nil, nil, ErrObjectTooLarge - } - if err != nil { - return nil, nil, err - } - if d.resetRead { - // now that we have drained the large read, continue - d.resetRead = false - continue - } - base += n - break - } - return d.decoder.Decode(d.buf[:base], defaults, into) -} - -func (d *decoder) Close() error { - return d.reader.Close() -} - -type encoder struct { - writer io.Writer - encoder runtime.Encoder - buf *bytes.Buffer -} - -// NewEncoder returns a new streaming encoder. -func NewEncoder(w io.Writer, e runtime.Encoder) Encoder { - return &encoder{ - writer: w, - encoder: e, - buf: &bytes.Buffer{}, - } -} - -// Encode writes the provided object to the nested writer. -func (e *encoder) Encode(obj runtime.Object) error { - if err := e.encoder.Encode(obj, e.buf); err != nil { - return err - } - _, err := e.writer.Write(e.buf.Bytes()) - e.buf.Reset() - return err -} diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/serializer/streaming/streaming_test.go b/vendor/k8s.io/kubernetes/pkg/runtime/serializer/streaming/streaming_test.go deleted file mode 100644 index f6b0ead6..00000000 --- a/vendor/k8s.io/kubernetes/pkg/runtime/serializer/streaming/streaming_test.go +++ /dev/null @@ -1,84 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package streaming - -import ( - "bytes" - "io" - "io/ioutil" - "testing" - - "k8s.io/kubernetes/pkg/runtime" - "k8s.io/kubernetes/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/util/framer" -) - -type fakeDecoder struct { - got []byte - obj runtime.Object - err error -} - -func (d *fakeDecoder) Decode(data []byte, gvk *schema.GroupVersionKind, into runtime.Object) (runtime.Object, *schema.GroupVersionKind, error) { - d.got = data - return d.obj, nil, d.err -} - -func TestEmptyDecoder(t *testing.T) { - buf := bytes.NewBuffer([]byte{}) - d := &fakeDecoder{} - _, _, err := NewDecoder(ioutil.NopCloser(buf), d).Decode(nil, nil) - if err != io.EOF { - t.Fatal(err) - } -} - -func TestDecoder(t *testing.T) { - frames := [][]byte{ - make([]byte, 1025), - make([]byte, 1024*5), - make([]byte, 1024*1024*5), - make([]byte, 1025), - } - pr, pw := io.Pipe() - fw := framer.NewLengthDelimitedFrameWriter(pw) - go func() { - for i := range frames { - fw.Write(frames[i]) - } - pw.Close() - }() - - r := framer.NewLengthDelimitedFrameReader(pr) - d := &fakeDecoder{} - dec := NewDecoder(r, d) - if _, _, err := dec.Decode(nil, nil); err != nil || !bytes.Equal(d.got, frames[0]) { - t.Fatalf("unexpected %v %v", err, len(d.got)) - } - if _, _, err := dec.Decode(nil, nil); err != nil || !bytes.Equal(d.got, frames[1]) { - t.Fatalf("unexpected %v %v", err, len(d.got)) - } - if _, _, err := dec.Decode(nil, nil); err != ErrObjectTooLarge || !bytes.Equal(d.got, frames[1]) { - t.Fatalf("unexpected %v %v", err, len(d.got)) - } - if _, _, err := dec.Decode(nil, nil); err != nil || !bytes.Equal(d.got, frames[3]) { - t.Fatalf("unexpected %v %v", err, len(d.got)) - } - if _, _, err := dec.Decode(nil, nil); err != io.EOF { - t.Fatalf("unexpected %v %v", err, len(d.got)) - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/serializer/versioning/.readonly b/vendor/k8s.io/kubernetes/pkg/runtime/serializer/versioning/.readonly deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/serializer/versioning/BUILD b/vendor/k8s.io/kubernetes/pkg/runtime/serializer/versioning/BUILD index b41d1c88..deefdcef 100644 --- a/vendor/k8s.io/kubernetes/pkg/runtime/serializer/versioning/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/runtime/serializer/versioning/BUILD @@ -5,30 +5,12 @@ licenses(["notice"]) load( "@io_bazel_rules_go//go:def.bzl", "go_library", - "go_test", ) go_library( name = "go_default_library", - srcs = ["versioning.go"], + srcs = ["doc.go"], tags = ["automanaged"], - deps = [ - "//pkg/runtime:go_default_library", - "//pkg/runtime/schema:go_default_library", - "//pkg/util/runtime:go_default_library", - ], -) - -go_test( - name = "go_default_test", - srcs = ["versioning_test.go"], - library = ":go_default_library", - tags = ["automanaged"], - deps = [ - "//pkg/runtime:go_default_library", - "//pkg/runtime/schema:go_default_library", - "//pkg/util/diff:go_default_library", - ], ) filegroup( diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/serializer/versioning/doc.go b/vendor/k8s.io/kubernetes/pkg/runtime/serializer/versioning/doc.go new file mode 100644 index 00000000..8c7bb140 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/runtime/serializer/versioning/doc.go @@ -0,0 +1,21 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package versioning only exists until heapster rebases +// TODO genericapiserver remove this empty package. Godep fails without this because heapster relies +// on this package. This will allow us to start splitting packages, but will force +// heapster to update on their next kube rebase. +package versioning diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/serializer/versioning/versioning.go b/vendor/k8s.io/kubernetes/pkg/runtime/serializer/versioning/versioning.go deleted file mode 100644 index d8fd62d5..00000000 --- a/vendor/k8s.io/kubernetes/pkg/runtime/serializer/versioning/versioning.go +++ /dev/null @@ -1,273 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package versioning - -import ( - "io" - - "k8s.io/kubernetes/pkg/runtime" - "k8s.io/kubernetes/pkg/runtime/schema" - utilruntime "k8s.io/kubernetes/pkg/util/runtime" -) - -// NewCodecForScheme is a convenience method for callers that are using a scheme. -func NewCodecForScheme( - // TODO: I should be a scheme interface? - scheme *runtime.Scheme, - encoder runtime.Encoder, - decoder runtime.Decoder, - encodeVersion runtime.GroupVersioner, - decodeVersion runtime.GroupVersioner, -) runtime.Codec { - return NewCodec(encoder, decoder, runtime.UnsafeObjectConvertor(scheme), scheme, scheme, scheme, nil, encodeVersion, decodeVersion) -} - -// NewDefaultingCodecForScheme is a convenience method for callers that are using a scheme. -func NewDefaultingCodecForScheme( - // TODO: I should be a scheme interface? - scheme *runtime.Scheme, - encoder runtime.Encoder, - decoder runtime.Decoder, - encodeVersion runtime.GroupVersioner, - decodeVersion runtime.GroupVersioner, -) runtime.Codec { - return NewCodec(encoder, decoder, runtime.UnsafeObjectConvertor(scheme), scheme, scheme, scheme, scheme, encodeVersion, decodeVersion) -} - -// NewCodec takes objects in their internal versions and converts them to external versions before -// serializing them. It assumes the serializer provided to it only deals with external versions. -// This class is also a serializer, but is generally used with a specific version. -func NewCodec( - encoder runtime.Encoder, - decoder runtime.Decoder, - convertor runtime.ObjectConvertor, - creater runtime.ObjectCreater, - copier runtime.ObjectCopier, - typer runtime.ObjectTyper, - defaulter runtime.ObjectDefaulter, - encodeVersion runtime.GroupVersioner, - decodeVersion runtime.GroupVersioner, -) runtime.Codec { - internal := &codec{ - encoder: encoder, - decoder: decoder, - convertor: convertor, - creater: creater, - copier: copier, - typer: typer, - defaulter: defaulter, - - encodeVersion: encodeVersion, - decodeVersion: decodeVersion, - } - return internal -} - -type codec struct { - encoder runtime.Encoder - decoder runtime.Decoder - convertor runtime.ObjectConvertor - creater runtime.ObjectCreater - copier runtime.ObjectCopier - typer runtime.ObjectTyper - defaulter runtime.ObjectDefaulter - - encodeVersion runtime.GroupVersioner - decodeVersion runtime.GroupVersioner -} - -// Decode attempts a decode of the object, then tries to convert it to the internal version. If into is provided and the decoding is -// successful, the returned runtime.Object will be the value passed as into. Note that this may bypass conversion if you pass an -// into that matches the serialized version. -func (c *codec) Decode(data []byte, defaultGVK *schema.GroupVersionKind, into runtime.Object) (runtime.Object, *schema.GroupVersionKind, error) { - versioned, isVersioned := into.(*runtime.VersionedObjects) - if isVersioned { - into = versioned.Last() - } - - obj, gvk, err := c.decoder.Decode(data, defaultGVK, into) - if err != nil { - return nil, gvk, err - } - - if d, ok := obj.(runtime.NestedObjectDecoder); ok { - if err := d.DecodeNestedObjects(DirectDecoder{c.decoder}); err != nil { - return nil, gvk, err - } - } - - // if we specify a target, use generic conversion. - if into != nil { - if into == obj { - if isVersioned { - return versioned, gvk, nil - } - return into, gvk, nil - } - - // perform defaulting if requested - if c.defaulter != nil { - // create a copy to ensure defaulting is not applied to the original versioned objects - if isVersioned { - copied, err := c.copier.Copy(obj) - if err != nil { - utilruntime.HandleError(err) - copied = obj - } - versioned.Objects = []runtime.Object{copied} - } - c.defaulter.Default(obj) - } else { - if isVersioned { - versioned.Objects = []runtime.Object{obj} - } - } - - if err := c.convertor.Convert(obj, into, c.decodeVersion); err != nil { - return nil, gvk, err - } - - if isVersioned { - versioned.Objects = append(versioned.Objects, into) - return versioned, gvk, nil - } - return into, gvk, nil - } - - // Convert if needed. - if isVersioned { - // create a copy, because ConvertToVersion does not guarantee non-mutation of objects - copied, err := c.copier.Copy(obj) - if err != nil { - utilruntime.HandleError(err) - copied = obj - } - versioned.Objects = []runtime.Object{copied} - } - - // perform defaulting if requested - if c.defaulter != nil { - c.defaulter.Default(obj) - } - - out, err := c.convertor.ConvertToVersion(obj, c.decodeVersion) - if err != nil { - return nil, gvk, err - } - if isVersioned { - if versioned.Last() != out { - versioned.Objects = append(versioned.Objects, out) - } - return versioned, gvk, nil - } - return out, gvk, nil -} - -// Encode ensures the provided object is output in the appropriate group and version, invoking -// conversion if necessary. Unversioned objects (according to the ObjectTyper) are output as is. -func (c *codec) Encode(obj runtime.Object, w io.Writer) error { - switch obj.(type) { - case *runtime.Unknown, runtime.Unstructured: - return c.encoder.Encode(obj, w) - } - - gvks, isUnversioned, err := c.typer.ObjectKinds(obj) - if err != nil { - return err - } - - if c.encodeVersion == nil || isUnversioned { - if e, ok := obj.(runtime.NestedObjectEncoder); ok { - if err := e.EncodeNestedObjects(DirectEncoder{Encoder: c.encoder, ObjectTyper: c.typer}); err != nil { - return err - } - } - objectKind := obj.GetObjectKind() - old := objectKind.GroupVersionKind() - objectKind.SetGroupVersionKind(gvks[0]) - err = c.encoder.Encode(obj, w) - objectKind.SetGroupVersionKind(old) - return err - } - - // Perform a conversion if necessary - objectKind := obj.GetObjectKind() - old := objectKind.GroupVersionKind() - out, err := c.convertor.ConvertToVersion(obj, c.encodeVersion) - if err != nil { - return err - } - - if e, ok := out.(runtime.NestedObjectEncoder); ok { - if err := e.EncodeNestedObjects(DirectEncoder{Encoder: c.encoder, ObjectTyper: c.typer}); err != nil { - return err - } - } - - // Conversion is responsible for setting the proper group, version, and kind onto the outgoing object - err = c.encoder.Encode(out, w) - // restore the old GVK, in case conversion returned the same object - objectKind.SetGroupVersionKind(old) - return err -} - -// DirectEncoder serializes an object and ensures the GVK is set. -type DirectEncoder struct { - Version runtime.GroupVersioner - runtime.Encoder - runtime.ObjectTyper -} - -// Encode does not do conversion. It sets the gvk during serialization. -func (e DirectEncoder) Encode(obj runtime.Object, stream io.Writer) error { - gvks, _, err := e.ObjectTyper.ObjectKinds(obj) - if err != nil { - if runtime.IsNotRegisteredError(err) { - return e.Encoder.Encode(obj, stream) - } - return err - } - kind := obj.GetObjectKind() - oldGVK := kind.GroupVersionKind() - gvk := gvks[0] - if e.Version != nil { - preferredGVK, ok := e.Version.KindForGroupVersionKinds(gvks) - if ok { - gvk = preferredGVK - } - } - kind.SetGroupVersionKind(gvk) - err = e.Encoder.Encode(obj, stream) - kind.SetGroupVersionKind(oldGVK) - return err -} - -// DirectDecoder clears the group version kind of a deserialized object. -type DirectDecoder struct { - runtime.Decoder -} - -// Decode does not do conversion. It removes the gvk during deserialization. -func (d DirectDecoder) Decode(data []byte, defaults *schema.GroupVersionKind, into runtime.Object) (runtime.Object, *schema.GroupVersionKind, error) { - obj, gvk, err := d.Decoder.Decode(data, defaults, into) - if obj != nil { - kind := obj.GetObjectKind() - // clearing the gvk is just a convention of a codec - kind.SetGroupVersionKind(schema.GroupVersionKind{}) - } - return obj, gvk, err -} diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/serializer/versioning/versioning_test.go b/vendor/k8s.io/kubernetes/pkg/runtime/serializer/versioning/versioning_test.go deleted file mode 100644 index 8737965f..00000000 --- a/vendor/k8s.io/kubernetes/pkg/runtime/serializer/versioning/versioning_test.go +++ /dev/null @@ -1,399 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package versioning - -import ( - "fmt" - "io" - "io/ioutil" - "reflect" - "testing" - - "k8s.io/kubernetes/pkg/runtime" - "k8s.io/kubernetes/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/util/diff" -) - -type testDecodable struct { - Other string - Value int `json:"value"` - gvk schema.GroupVersionKind -} - -func (d *testDecodable) GetObjectKind() schema.ObjectKind { return d } -func (d *testDecodable) SetGroupVersionKind(gvk schema.GroupVersionKind) { d.gvk = gvk } -func (d *testDecodable) GroupVersionKind() schema.GroupVersionKind { return d.gvk } - -type testNestedDecodable struct { - Other string - Value int `json:"value"` - - gvk schema.GroupVersionKind - nestedCalled bool - nestedErr error -} - -func (d *testNestedDecodable) GetObjectKind() schema.ObjectKind { return d } -func (d *testNestedDecodable) SetGroupVersionKind(gvk schema.GroupVersionKind) { d.gvk = gvk } -func (d *testNestedDecodable) GroupVersionKind() schema.GroupVersionKind { return d.gvk } - -func (d *testNestedDecodable) EncodeNestedObjects(e runtime.Encoder) error { - d.nestedCalled = true - return d.nestedErr -} - -func (d *testNestedDecodable) DecodeNestedObjects(_ runtime.Decoder) error { - d.nestedCalled = true - return d.nestedErr -} - -func TestNestedDecode(t *testing.T) { - n := &testNestedDecodable{nestedErr: fmt.Errorf("unable to decode")} - decoder := &mockSerializer{obj: n} - codec := NewCodec(nil, decoder, nil, nil, nil, nil, nil, nil, nil) - if _, _, err := codec.Decode([]byte(`{}`), nil, n); err != n.nestedErr { - t.Errorf("unexpected error: %v", err) - } - if !n.nestedCalled { - t.Errorf("did not invoke nested decoder") - } -} - -func TestNestedEncode(t *testing.T) { - n := &testNestedDecodable{nestedErr: fmt.Errorf("unable to decode")} - n2 := &testNestedDecodable{nestedErr: fmt.Errorf("unable to decode 2")} - encoder := &mockSerializer{obj: n} - codec := NewCodec( - encoder, nil, - &checkConvertor{obj: n2, groupVersion: schema.GroupVersion{Group: "other"}}, - nil, nil, - &mockTyper{gvks: []schema.GroupVersionKind{{Kind: "test"}}}, - nil, - schema.GroupVersion{Group: "other"}, nil, - ) - if err := codec.Encode(n, ioutil.Discard); err != n2.nestedErr { - t.Errorf("unexpected error: %v", err) - } - if n.nestedCalled || !n2.nestedCalled { - t.Errorf("did not invoke correct nested decoder") - } -} - -func TestDecode(t *testing.T) { - gvk1 := &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"} - decodable1 := &testDecodable{} - decodable2 := &testDecodable{} - decodable3 := &testDecodable{} - versionedDecodable1 := &runtime.VersionedObjects{Objects: []runtime.Object{decodable1}} - - testCases := []struct { - serializer runtime.Serializer - convertor runtime.ObjectConvertor - creater runtime.ObjectCreater - copier runtime.ObjectCopier - typer runtime.ObjectTyper - defaulter runtime.ObjectDefaulter - yaml bool - pretty bool - - encodes, decodes runtime.GroupVersioner - - defaultGVK *schema.GroupVersionKind - into runtime.Object - - errFn func(error) bool - expectedObject runtime.Object - sameObject runtime.Object - expectedGVK *schema.GroupVersionKind - }{ - { - serializer: &mockSerializer{actual: gvk1}, - convertor: &checkConvertor{groupVersion: schema.GroupVersion{Group: "other", Version: "__internal"}}, - expectedGVK: gvk1, - decodes: schema.GroupVersion{Group: "other", Version: "__internal"}, - }, - { - serializer: &mockSerializer{actual: gvk1, obj: decodable1}, - convertor: &checkConvertor{in: decodable1, obj: decodable2, groupVersion: schema.GroupVersion{Group: "other", Version: "__internal"}}, - expectedGVK: gvk1, - sameObject: decodable2, - decodes: schema.GroupVersion{Group: "other", Version: "__internal"}, - }, - // defaultGVK.Group is allowed to force a conversion to the destination group - { - serializer: &mockSerializer{actual: gvk1, obj: decodable1}, - defaultGVK: &schema.GroupVersionKind{Group: "force"}, - convertor: &checkConvertor{in: decodable1, obj: decodable2, groupVersion: schema.GroupVersion{Group: "force", Version: "__internal"}}, - expectedGVK: gvk1, - sameObject: decodable2, - decodes: schema.GroupVersion{Group: "force", Version: "__internal"}, - }, - // uses direct conversion for into when objects differ - { - into: decodable3, - serializer: &mockSerializer{actual: gvk1, obj: decodable1}, - convertor: &checkConvertor{in: decodable1, obj: decodable3, directConvert: true}, - expectedGVK: gvk1, - sameObject: decodable3, - }, - { - into: versionedDecodable1, - serializer: &mockSerializer{actual: gvk1, obj: decodable3}, - convertor: &checkConvertor{in: decodable3, obj: decodable1, directConvert: true}, - expectedGVK: gvk1, - sameObject: versionedDecodable1, - }, - // returns directly when serializer returns into - { - into: decodable3, - serializer: &mockSerializer{actual: gvk1, obj: decodable3}, - expectedGVK: gvk1, - sameObject: decodable3, - }, - // returns directly when serializer returns into - { - into: versionedDecodable1, - serializer: &mockSerializer{actual: gvk1, obj: decodable1}, - expectedGVK: gvk1, - sameObject: versionedDecodable1, - }, - - // runtime.VersionedObjects are decoded - { - into: &runtime.VersionedObjects{Objects: []runtime.Object{}}, - - serializer: &mockSerializer{actual: gvk1, obj: decodable1}, - copier: &checkCopy{in: decodable1, obj: decodable1}, - convertor: &checkConvertor{in: decodable1, obj: decodable2, groupVersion: schema.GroupVersion{Group: "other", Version: "__internal"}}, - expectedGVK: gvk1, - expectedObject: &runtime.VersionedObjects{Objects: []runtime.Object{decodable1, decodable2}}, - decodes: schema.GroupVersion{Group: "other", Version: "__internal"}, - }, - { - into: &runtime.VersionedObjects{Objects: []runtime.Object{}}, - - serializer: &mockSerializer{actual: gvk1, obj: decodable1}, - copier: &checkCopy{in: decodable1, obj: nil, err: fmt.Errorf("error on copy")}, - convertor: &checkConvertor{in: decodable1, obj: decodable2, groupVersion: schema.GroupVersion{Group: "other", Version: "__internal"}}, - expectedGVK: gvk1, - expectedObject: &runtime.VersionedObjects{Objects: []runtime.Object{decodable1, decodable2}}, - decodes: schema.GroupVersion{Group: "other", Version: "__internal"}, - }, - - // decode into the same version as the serialized object - { - decodes: schema.GroupVersions{gvk1.GroupVersion()}, - - serializer: &mockSerializer{actual: gvk1, obj: decodable1}, - convertor: &checkConvertor{in: decodable1, obj: decodable1, groupVersion: schema.GroupVersions{{Group: "other", Version: "blah"}}}, - expectedGVK: gvk1, - expectedObject: decodable1, - }, - { - into: &runtime.VersionedObjects{Objects: []runtime.Object{}}, - decodes: schema.GroupVersions{gvk1.GroupVersion()}, - - serializer: &mockSerializer{actual: gvk1, obj: decodable1}, - convertor: &checkConvertor{in: decodable1, obj: decodable1, groupVersion: schema.GroupVersions{{Group: "other", Version: "blah"}}}, - copier: &checkCopy{in: decodable1, obj: decodable1, err: nil}, - expectedGVK: gvk1, - expectedObject: &runtime.VersionedObjects{Objects: []runtime.Object{decodable1}}, - }, - - // codec with non matching version skips conversion altogether - { - decodes: schema.GroupVersions{{Group: "something", Version: "else"}}, - - serializer: &mockSerializer{actual: gvk1, obj: decodable1}, - convertor: &checkConvertor{in: decodable1, obj: decodable1, groupVersion: schema.GroupVersions{{Group: "something", Version: "else"}}}, - expectedGVK: gvk1, - expectedObject: decodable1, - }, - { - into: &runtime.VersionedObjects{Objects: []runtime.Object{}}, - decodes: schema.GroupVersions{{Group: "something", Version: "else"}}, - - serializer: &mockSerializer{actual: gvk1, obj: decodable1}, - convertor: &checkConvertor{in: decodable1, obj: decodable1, groupVersion: schema.GroupVersions{{Group: "something", Version: "else"}}}, - copier: &checkCopy{in: decodable1, obj: decodable1, err: nil}, - expectedGVK: gvk1, - expectedObject: &runtime.VersionedObjects{Objects: []runtime.Object{decodable1}}, - }, - } - - for i, test := range testCases { - t.Logf("%d", i) - s := NewCodec(test.serializer, test.serializer, test.convertor, test.creater, test.copier, test.typer, test.defaulter, test.encodes, test.decodes) - obj, gvk, err := s.Decode([]byte(`{}`), test.defaultGVK, test.into) - - if !reflect.DeepEqual(test.expectedGVK, gvk) { - t.Errorf("%d: unexpected GVK: %v", i, gvk) - } - - switch { - case err == nil && test.errFn != nil: - t.Errorf("%d: failed: %v", i, err) - continue - case err != nil && test.errFn == nil: - t.Errorf("%d: failed: %v", i, err) - continue - case err != nil: - if !test.errFn(err) { - t.Errorf("%d: failed: %v", i, err) - } - if obj != nil { - t.Errorf("%d: should have returned nil object", i) - } - continue - } - - if test.into != nil && test.into != obj { - t.Errorf("%d: expected into to be returned: %v", i, obj) - continue - } - - switch { - case test.expectedObject != nil: - if !reflect.DeepEqual(test.expectedObject, obj) { - t.Errorf("%d: unexpected object:\n%s", i, diff.ObjectGoPrintSideBySide(test.expectedObject, obj)) - } - case test.sameObject != nil: - if test.sameObject != obj { - t.Errorf("%d: unexpected object:\n%s", i, diff.ObjectGoPrintSideBySide(test.sameObject, obj)) - } - case obj != nil: - t.Errorf("%d: unexpected object: %#v", i, obj) - } - } -} - -type checkCopy struct { - in, obj runtime.Object - err error -} - -func (c *checkCopy) Copy(obj runtime.Object) (runtime.Object, error) { - if c.in != nil && c.in != obj { - return nil, fmt.Errorf("unexpected input to copy: %#v", obj) - } - return c.obj, c.err -} - -type checkConvertor struct { - err error - in, obj runtime.Object - groupVersion runtime.GroupVersioner - directConvert bool -} - -func (c *checkConvertor) Convert(in, out, context interface{}) error { - if !c.directConvert { - return fmt.Errorf("unexpected call to Convert") - } - if c.in != nil && c.in != in { - return fmt.Errorf("unexpected in: %s", in) - } - if c.obj != nil && c.obj != out { - return fmt.Errorf("unexpected out: %s", out) - } - return c.err -} -func (c *checkConvertor) ConvertToVersion(in runtime.Object, outVersion runtime.GroupVersioner) (out runtime.Object, err error) { - if c.directConvert { - return nil, fmt.Errorf("unexpected call to ConvertToVersion") - } - if c.in != nil && c.in != in { - return nil, fmt.Errorf("unexpected in: %s", in) - } - if !reflect.DeepEqual(c.groupVersion, outVersion) { - return nil, fmt.Errorf("unexpected outversion: %s (%s)", outVersion, c.groupVersion) - } - return c.obj, c.err -} -func (c *checkConvertor) ConvertFieldLabel(version, kind, label, value string) (string, string, error) { - return "", "", fmt.Errorf("unexpected call to ConvertFieldLabel") -} - -type mockSerializer struct { - err error - obj runtime.Object - encodingObjGVK schema.GroupVersionKind - - defaults, actual *schema.GroupVersionKind - into runtime.Object -} - -func (s *mockSerializer) Decode(data []byte, defaults *schema.GroupVersionKind, into runtime.Object) (runtime.Object, *schema.GroupVersionKind, error) { - s.defaults = defaults - s.into = into - return s.obj, s.actual, s.err -} - -func (s *mockSerializer) Encode(obj runtime.Object, w io.Writer) error { - s.obj = obj - s.encodingObjGVK = obj.GetObjectKind().GroupVersionKind() - return s.err -} - -type mockCreater struct { - err error - obj runtime.Object -} - -func (c *mockCreater) New(kind schema.GroupVersionKind) (runtime.Object, error) { - return c.obj, c.err -} - -type mockTyper struct { - gvks []schema.GroupVersionKind - unversioned bool - err error -} - -func (t *mockTyper) ObjectKinds(obj runtime.Object) ([]schema.GroupVersionKind, bool, error) { - return t.gvks, t.unversioned, t.err -} - -func (t *mockTyper) Recognizes(_ schema.GroupVersionKind) bool { - return true -} - -func TestDirectCodecEncode(t *testing.T) { - serializer := mockSerializer{} - typer := mockTyper{ - gvks: []schema.GroupVersionKind{ - { - Group: "wrong_group", - Kind: "some_kind", - }, - { - Group: "expected_group", - Kind: "some_kind", - }, - }, - } - - c := DirectEncoder{ - Version: schema.GroupVersion{Group: "expected_group"}, - Encoder: &serializer, - ObjectTyper: &typer, - } - c.Encode(&testDecodable{}, ioutil.Discard) - if e, a := "expected_group", serializer.encodingObjGVK.Group; e != a { - t.Errorf("expected group to be %v, got %v", e, a) - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/serializer/yaml/.readonly b/vendor/k8s.io/kubernetes/pkg/runtime/serializer/yaml/.readonly deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/serializer/yaml/yaml.go b/vendor/k8s.io/kubernetes/pkg/runtime/serializer/yaml/yaml.go deleted file mode 100644 index 43dc41a1..00000000 --- a/vendor/k8s.io/kubernetes/pkg/runtime/serializer/yaml/yaml.go +++ /dev/null @@ -1,46 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package yaml - -import ( - "k8s.io/kubernetes/pkg/runtime" - "k8s.io/kubernetes/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/util/yaml" -) - -// yamlSerializer converts YAML passed to the Decoder methods to JSON. -type yamlSerializer struct { - // the nested serializer - runtime.Serializer -} - -// yamlSerializer implements Serializer -var _ runtime.Serializer = yamlSerializer{} - -// NewDecodingSerializer adds YAML decoding support to a serializer that supports JSON. -func NewDecodingSerializer(jsonSerializer runtime.Serializer) runtime.Serializer { - return &yamlSerializer{jsonSerializer} -} - -func (c yamlSerializer) Decode(data []byte, gvk *schema.GroupVersionKind, into runtime.Object) (runtime.Object, *schema.GroupVersionKind, error) { - out, err := yaml.ToJSON(data) - if err != nil { - return nil, nil, err - } - data = out - return c.Serializer.Decode(data, gvk, into) -} diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/swagger_doc_generator.go b/vendor/k8s.io/kubernetes/pkg/runtime/swagger_doc_generator.go deleted file mode 100644 index 29722d52..00000000 --- a/vendor/k8s.io/kubernetes/pkg/runtime/swagger_doc_generator.go +++ /dev/null @@ -1,262 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package runtime - -import ( - "bytes" - "fmt" - "go/ast" - "go/doc" - "go/parser" - "go/token" - "io" - "reflect" - "strings" -) - -// Pair of strings. We keed the name of fields and the doc -type Pair struct { - Name, Doc string -} - -// KubeTypes is an array to represent all available types in a parsed file. [0] is for the type itself -type KubeTypes []Pair - -func astFrom(filePath string) *doc.Package { - fset := token.NewFileSet() - m := make(map[string]*ast.File) - - f, err := parser.ParseFile(fset, filePath, nil, parser.ParseComments) - if err != nil { - fmt.Println(err) - return nil - } - - m[filePath] = f - apkg, _ := ast.NewPackage(fset, m, nil, nil) - - return doc.New(apkg, "", 0) -} - -func fmtRawDoc(rawDoc string) string { - var buffer bytes.Buffer - delPrevChar := func() { - if buffer.Len() > 0 { - buffer.Truncate(buffer.Len() - 1) // Delete the last " " or "\n" - } - } - - // Ignore all lines after --- - rawDoc = strings.Split(rawDoc, "---")[0] - - for _, line := range strings.Split(rawDoc, "\n") { - line = strings.TrimRight(line, " ") - leading := strings.TrimLeft(line, " ") - switch { - case len(line) == 0: // Keep paragraphs - delPrevChar() - buffer.WriteString("\n\n") - case strings.HasPrefix(leading, "TODO"): // Ignore one line TODOs - case strings.HasPrefix(leading, "+"): // Ignore instructions to go2idl - default: - if strings.HasPrefix(line, " ") || strings.HasPrefix(line, "\t") { - delPrevChar() - line = "\n" + line + "\n" // Replace it with newline. This is useful when we have a line with: "Example:\n\tJSON-someting..." - } else { - line += " " - } - buffer.WriteString(line) - } - } - - postDoc := strings.TrimRight(buffer.String(), "\n") - postDoc = strings.Replace(postDoc, "\\\"", "\"", -1) // replace user's \" to " - postDoc = strings.Replace(postDoc, "\"", "\\\"", -1) // Escape " - postDoc = strings.Replace(postDoc, "\n", "\\n", -1) - postDoc = strings.Replace(postDoc, "\t", "\\t", -1) - - return postDoc -} - -// fieldName returns the name of the field as it should appear in JSON format -// "-" indicates that this field is not part of the JSON representation -func fieldName(field *ast.Field) string { - jsonTag := "" - if field.Tag != nil { - jsonTag = reflect.StructTag(field.Tag.Value[1 : len(field.Tag.Value)-1]).Get("json") // Delete first and last quotation - if strings.Contains(jsonTag, "inline") { - return "-" - } - } - - jsonTag = strings.Split(jsonTag, ",")[0] // This can return "-" - if jsonTag == "" { - if field.Names != nil { - return field.Names[0].Name - } - return field.Type.(*ast.Ident).Name - } - return jsonTag -} - -// A buffer of lines that will be written. -type bufferedLine struct { - line string - indentation int -} - -type buffer struct { - lines []bufferedLine -} - -func newBuffer() *buffer { - return &buffer{ - lines: make([]bufferedLine, 0), - } -} - -func (b *buffer) addLine(line string, indent int) { - b.lines = append(b.lines, bufferedLine{line, indent}) -} - -func (b *buffer) flushLines(w io.Writer) error { - for _, line := range b.lines { - indentation := strings.Repeat("\t", line.indentation) - fullLine := fmt.Sprintf("%s%s", indentation, line.line) - if _, err := io.WriteString(w, fullLine); err != nil { - return err - } - } - return nil -} - -func writeFuncHeader(b *buffer, structName string, indent int) { - s := fmt.Sprintf("var map_%s = map[string]string {\n", structName) - b.addLine(s, indent) -} - -func writeFuncFooter(b *buffer, structName string, indent int) { - b.addLine("}\n", indent) // Closes the map definition - - s := fmt.Sprintf("func (%s) SwaggerDoc() map[string]string {\n", structName) - b.addLine(s, indent) - s = fmt.Sprintf("return map_%s\n", structName) - b.addLine(s, indent+1) - b.addLine("}\n", indent) // Closes the function definition -} - -func writeMapBody(b *buffer, kubeType []Pair, indent int) { - format := "\"%s\": \"%s\",\n" - for _, pair := range kubeType { - s := fmt.Sprintf(format, pair.Name, pair.Doc) - b.addLine(s, indent+2) - } -} - -// ParseDocumentationFrom gets all types' documentation and returns them as an -// array. Each type is again represented as an array (we have to use arrays as we -// need to be sure for the order of the fields). This function returns fields and -// struct definitions that have no documentation as {name, ""}. -func ParseDocumentationFrom(src string) []KubeTypes { - var docForTypes []KubeTypes - - pkg := astFrom(src) - - for _, kubType := range pkg.Types { - if structType, ok := kubType.Decl.Specs[0].(*ast.TypeSpec).Type.(*ast.StructType); ok { - var ks KubeTypes - ks = append(ks, Pair{kubType.Name, fmtRawDoc(kubType.Doc)}) - - for _, field := range structType.Fields.List { - if n := fieldName(field); n != "-" { - fieldDoc := fmtRawDoc(field.Doc.Text()) - ks = append(ks, Pair{n, fieldDoc}) - } - } - docForTypes = append(docForTypes, ks) - } - } - - return docForTypes -} - -// WriteSwaggerDocFunc writes a declaration of a function as a string. This function is used in -// Swagger as a documentation source for structs and theirs fields -func WriteSwaggerDocFunc(kubeTypes []KubeTypes, w io.Writer) error { - for _, kubeType := range kubeTypes { - structName := kubeType[0].Name - kubeType[0].Name = "" - - // Ignore empty documentation - docfulTypes := make(KubeTypes, 0, len(kubeType)) - for _, pair := range kubeType { - if pair.Doc != "" { - docfulTypes = append(docfulTypes, pair) - } - } - - if len(docfulTypes) == 0 { - continue // If no fields and the struct have documentation, skip the function definition - } - - indent := 0 - buffer := newBuffer() - - writeFuncHeader(buffer, structName, indent) - writeMapBody(buffer, docfulTypes, indent) - writeFuncFooter(buffer, structName, indent) - buffer.addLine("\n", 0) - - if err := buffer.flushLines(w); err != nil { - return err - } - } - - return nil -} - -// VerifySwaggerDocsExist writes in a io.Writer a list of structs and fields that -// are missing of documentation. -func VerifySwaggerDocsExist(kubeTypes []KubeTypes, w io.Writer) (int, error) { - missingDocs := 0 - buffer := newBuffer() - - for _, kubeType := range kubeTypes { - structName := kubeType[0].Name - if kubeType[0].Doc == "" { - format := "Missing documentation for the struct itself: %s\n" - s := fmt.Sprintf(format, structName) - buffer.addLine(s, 0) - missingDocs++ - } - kubeType = kubeType[1:] // Skip struct definition - - for _, pair := range kubeType { // Iterate only the fields - if pair.Doc == "" { - format := "In struct: %s, field documentation is missing: %s\n" - s := fmt.Sprintf(format, structName, pair.Name) - buffer.addLine(s, 0) - missingDocs++ - } - } - } - - if err := buffer.flushLines(w); err != nil { - return -1, err - } - return missingDocs, nil -} diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/swagger_doc_generator_test.go b/vendor/k8s.io/kubernetes/pkg/runtime/swagger_doc_generator_test.go deleted file mode 100644 index a6f338d3..00000000 --- a/vendor/k8s.io/kubernetes/pkg/runtime/swagger_doc_generator_test.go +++ /dev/null @@ -1,43 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package runtime - -import ( - "testing" -) - -func TestFmtRawDoc(t *testing.T) { - tests := []struct { - t, expected string - }{ - {"aaa\n --- asd\n TODO: tooooodo\n toooodoooooo\n", "aaa"}, - {"aaa\nasd\n TODO: tooooodo\nbbbb\n --- toooodoooooo\n", "aaa asd bbbb"}, - {" TODO: tooooodo\n", ""}, - {"Par1\n\nPar2\n\n", "Par1\\n\\nPar2"}, - {"", ""}, - {" ", ""}, - {" \n", ""}, - {" \n\n ", ""}, - {"Example:\n\tl1\n\t\tl2\n", "Example:\\n\\tl1\\n\\t\\tl2"}, - } - - for _, test := range tests { - if o := fmtRawDoc(test.t); o != test.expected { - t.Fatalf("Expected: %q, got %q", test.expected, o) - } - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/types.go b/vendor/k8s.io/kubernetes/pkg/runtime/types.go deleted file mode 100644 index 4e31ad0f..00000000 --- a/vendor/k8s.io/kubernetes/pkg/runtime/types.go +++ /dev/null @@ -1,130 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package runtime - -// Note that the types provided in this file are not versioned and are intended to be -// safe to use from within all versions of every API object. - -// TypeMeta is shared by all top level objects. The proper way to use it is to inline it in your type, -// like this: -// type MyAwesomeAPIObject struct { -// runtime.TypeMeta `json:",inline"` -// ... // other fields -// } -// func (obj *MyAwesomeAPIObject) SetGroupVersionKind(gvk *metav1.GroupVersionKind) { metav1.UpdateTypeMeta(obj,gvk) }; GroupVersionKind() *GroupVersionKind -// -// TypeMeta is provided here for convenience. You may use it directly from this package or define -// your own with the same fields. -// -// +k8s:deepcopy-gen=true -// +protobuf=true -type TypeMeta struct { - // +optional - APIVersion string `json:"apiVersion,omitempty" yaml:"apiVersion,omitempty" protobuf:"bytes,1,opt,name=apiVersion"` - // +optional - Kind string `json:"kind,omitempty" yaml:"kind,omitempty" protobuf:"bytes,2,opt,name=kind"` -} - -const ( - ContentTypeJSON string = "application/json" -) - -// RawExtension is used to hold extensions in external versions. -// -// To use this, make a field which has RawExtension as its type in your external, versioned -// struct, and Object in your internal struct. You also need to register your -// various plugin types. -// -// // Internal package: -// type MyAPIObject struct { -// runtime.TypeMeta `json:",inline"` -// MyPlugin runtime.Object `json:"myPlugin"` -// } -// type PluginA struct { -// AOption string `json:"aOption"` -// } -// -// // External package: -// type MyAPIObject struct { -// runtime.TypeMeta `json:",inline"` -// MyPlugin runtime.RawExtension `json:"myPlugin"` -// } -// type PluginA struct { -// AOption string `json:"aOption"` -// } -// -// // On the wire, the JSON will look something like this: -// { -// "kind":"MyAPIObject", -// "apiVersion":"v1", -// "myPlugin": { -// "kind":"PluginA", -// "aOption":"foo", -// }, -// } -// -// So what happens? Decode first uses json or yaml to unmarshal the serialized data into -// your external MyAPIObject. That causes the raw JSON to be stored, but not unpacked. -// The next step is to copy (using pkg/conversion) into the internal struct. The runtime -// package's DefaultScheme has conversion functions installed which will unpack the -// JSON stored in RawExtension, turning it into the correct object type, and storing it -// in the Object. (TODO: In the case where the object is of an unknown type, a -// runtime.Unknown object will be created and stored.) -// -// +k8s:deepcopy-gen=true -// +protobuf=true -type RawExtension struct { - // Raw is the underlying serialization of this object. - // - // TODO: Determine how to detect ContentType and ContentEncoding of 'Raw' data. - Raw []byte `protobuf:"bytes,1,opt,name=raw"` - // Object can hold a representation of this extension - useful for working with versioned - // structs. - Object Object `json:"-"` -} - -// Unknown allows api objects with unknown types to be passed-through. This can be used -// to deal with the API objects from a plug-in. Unknown objects still have functioning -// TypeMeta features-- kind, version, etc. -// TODO: Make this object have easy access to field based accessors and settors for -// metadata and field mutatation. -// -// +k8s:deepcopy-gen=true -// +protobuf=true -type Unknown struct { - TypeMeta `json:",inline" protobuf:"bytes,1,opt,name=typeMeta"` - // Raw will hold the complete serialized object which couldn't be matched - // with a registered type. Most likely, nothing should be done with this - // except for passing it through the system. - Raw []byte `protobuf:"bytes,2,opt,name=raw"` - // ContentEncoding is encoding used to encode 'Raw' data. - // Unspecified means no encoding. - ContentEncoding string `protobuf:"bytes,3,opt,name=contentEncoding"` - // ContentType is serialization method used to serialize 'Raw'. - // Unspecified means ContentTypeJSON. - ContentType string `protobuf:"bytes,4,opt,name=contentType"` -} - -// VersionedObjects is used by Decoders to give callers a way to access all versions -// of an object during the decoding process. -type VersionedObjects struct { - // Objects is the set of objects retrieved during decoding, in order of conversion. - // The 0 index is the object as serialized on the wire. If conversion has occurred, - // other objects may be present. The right most object is the same as would be returned - // by a normal Decode call. - Objects []Object -} diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/types_proto.go b/vendor/k8s.io/kubernetes/pkg/runtime/types_proto.go deleted file mode 100644 index ead96ee0..00000000 --- a/vendor/k8s.io/kubernetes/pkg/runtime/types_proto.go +++ /dev/null @@ -1,69 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package runtime - -import ( - "fmt" -) - -type ProtobufMarshaller interface { - MarshalTo(data []byte) (int, error) -} - -// NestedMarshalTo allows a caller to avoid extra allocations during serialization of an Unknown -// that will contain an object that implements ProtobufMarshaller. -func (m *Unknown) NestedMarshalTo(data []byte, b ProtobufMarshaller, size uint64) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintGenerated(data, i, uint64(m.TypeMeta.Size())) - n1, err := m.TypeMeta.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n1 - - if b != nil { - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, size) - n2, err := b.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - if uint64(n2) != size { - // programmer error: the Size() method for protobuf does not match the results of MarshalTo, which means the proto - // struct returned would be wrong. - return 0, fmt.Errorf("the Size() value of %T was %d, but NestedMarshalTo wrote %d bytes to data", b, size, n2) - } - i += n2 - } - - data[i] = 0x1a - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.ContentEncoding))) - i += copy(data[i:], m.ContentEncoding) - - data[i] = 0x22 - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.ContentType))) - i += copy(data[i:], m.ContentType) - return i, nil -} diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/runtime/zz_generated.deepcopy.go deleted file mode 100644 index b75b3ebb..00000000 --- a/vendor/k8s.io/kubernetes/pkg/runtime/zz_generated.deepcopy.go +++ /dev/null @@ -1,80 +0,0 @@ -// +build !ignore_autogenerated - -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was autogenerated by deepcopy-gen. Do not edit it manually! - -package runtime - -import ( - conversion "k8s.io/apimachinery/pkg/conversion" - reflect "reflect" -) - -// GetGeneratedDeepCopyFuncs returns the generated funcs, since we aren't registering them. -func GetGeneratedDeepCopyFuncs() []conversion.GeneratedDeepCopyFunc { - return []conversion.GeneratedDeepCopyFunc{ - {Fn: DeepCopy_runtime_RawExtension, InType: reflect.TypeOf(&RawExtension{})}, - {Fn: DeepCopy_runtime_TypeMeta, InType: reflect.TypeOf(&TypeMeta{})}, - {Fn: DeepCopy_runtime_Unknown, InType: reflect.TypeOf(&Unknown{})}, - } -} - -func DeepCopy_runtime_RawExtension(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*RawExtension) - out := out.(*RawExtension) - *out = *in - if in.Raw != nil { - in, out := &in.Raw, &out.Raw - *out = make([]byte, len(*in)) - copy(*out, *in) - } - // in.Object is kind 'Interface' - if in.Object != nil { - if newVal, err := c.DeepCopy(&in.Object); err != nil { - return err - } else { - out.Object = *newVal.(*Object) - } - } - return nil - } -} - -func DeepCopy_runtime_TypeMeta(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*TypeMeta) - out := out.(*TypeMeta) - *out = *in - return nil - } -} - -func DeepCopy_runtime_Unknown(in interface{}, out interface{}, c *conversion.Cloner) error { - { - in := in.(*Unknown) - out := out.(*Unknown) - *out = *in - if in.Raw != nil { - in, out := &in.Raw, &out.Raw - *out = make([]byte, len(*in)) - copy(*out, *in) - } - return nil - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/security/apparmor/BUILD b/vendor/k8s.io/kubernetes/pkg/security/apparmor/BUILD index 3682baca..f194512a 100644 --- a/vendor/k8s.io/kubernetes/pkg/security/apparmor/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/security/apparmor/BUILD @@ -33,6 +33,7 @@ go_test( deps = [ "//pkg/api/v1:go_default_library", "//vendor:github.com/stretchr/testify/assert", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/security/apparmor/validate_test.go b/vendor/k8s.io/kubernetes/pkg/security/apparmor/validate_test.go index 2c293a5f..467decfc 100644 --- a/vendor/k8s.io/kubernetes/pkg/security/apparmor/validate_test.go +++ b/vendor/k8s.io/kubernetes/pkg/security/apparmor/validate_test.go @@ -21,6 +21,7 @@ import ( "fmt" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" "github.com/stretchr/testify/assert" @@ -134,7 +135,7 @@ func TestValidateValidHost(t *testing.T) { // Test multi-container pod. pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ ContainerAnnotationKeyPrefix + "init": ProfileNamePrefix + "foo-container", ContainerAnnotationKeyPrefix + "test1": ProfileRuntimeDefault, @@ -182,7 +183,7 @@ func getPodWithProfile(profile string) *v1.Pod { } } return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: annotations, }, Spec: v1.PodSpec{ diff --git a/vendor/k8s.io/kubernetes/pkg/security/podsecuritypolicy/BUILD b/vendor/k8s.io/kubernetes/pkg/security/podsecuritypolicy/BUILD index 6e4f454f..e78c2966 100644 --- a/vendor/k8s.io/kubernetes/pkg/security/podsecuritypolicy/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/security/podsecuritypolicy/BUILD @@ -47,6 +47,7 @@ go_test( "//pkg/security/podsecuritypolicy/seccomp:go_default_library", "//pkg/security/podsecuritypolicy/util:go_default_library", "//vendor:github.com/davecgh/go-spew/spew", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/util/diff", "//vendor:k8s.io/apimachinery/pkg/util/validation/field", ], diff --git a/vendor/k8s.io/kubernetes/pkg/security/podsecuritypolicy/apparmor/BUILD b/vendor/k8s.io/kubernetes/pkg/security/podsecuritypolicy/apparmor/BUILD index 6e2fdea9..6b6fdb81 100644 --- a/vendor/k8s.io/kubernetes/pkg/security/podsecuritypolicy/apparmor/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/security/podsecuritypolicy/apparmor/BUILD @@ -31,6 +31,7 @@ go_test( "//pkg/util/maps:go_default_library", "//vendor:github.com/davecgh/go-spew/spew", "//vendor:github.com/stretchr/testify/assert", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/security/podsecuritypolicy/apparmor/strategy_test.go b/vendor/k8s.io/kubernetes/pkg/security/podsecuritypolicy/apparmor/strategy_test.go index 64e56f60..927bdf9a 100644 --- a/vendor/k8s.io/kubernetes/pkg/security/podsecuritypolicy/apparmor/strategy_test.go +++ b/vendor/k8s.io/kubernetes/pkg/security/podsecuritypolicy/apparmor/strategy_test.go @@ -22,6 +22,7 @@ import ( "github.com/davecgh/go-spew/spew" "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/security/apparmor" "k8s.io/kubernetes/pkg/util/maps" @@ -162,7 +163,7 @@ func TestValidate(t *testing.T) { func makeTestPod(annotations map[string]string) (*api.Pod, *api.Container) { return &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test-pod", Annotations: maps.CopySS(annotations), }, diff --git a/vendor/k8s.io/kubernetes/pkg/security/podsecuritypolicy/provider_test.go b/vendor/k8s.io/kubernetes/pkg/security/podsecuritypolicy/provider_test.go index d35af12f..3e29ec1a 100644 --- a/vendor/k8s.io/kubernetes/pkg/security/podsecuritypolicy/provider_test.go +++ b/vendor/k8s.io/kubernetes/pkg/security/podsecuritypolicy/provider_test.go @@ -24,6 +24,7 @@ import ( "github.com/davecgh/go-spew/spew" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/diff" "k8s.io/apimachinery/pkg/util/validation/field" "k8s.io/kubernetes/pkg/api" @@ -49,7 +50,7 @@ func TestCreatePodSecurityContextNonmutating(t *testing.T) { // Create a PSP with strategies that will populate a blank psc createPSP := func() *extensions.PodSecurityPolicy { return &extensions.PodSecurityPolicy{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "psp-sa", Annotations: map[string]string{ seccomp.AllowedProfilesAnnotationKey: "*", @@ -125,7 +126,7 @@ func TestCreateContainerSecurityContextNonmutating(t *testing.T) { createPSP := func() *extensions.PodSecurityPolicy { var uid int64 = 1 return &extensions.PodSecurityPolicy{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "psp-sa", Annotations: map[string]string{ seccomp.AllowedProfilesAnnotationKey: "*", @@ -891,7 +892,7 @@ func TestGenerateContainerSecurityContextReadOnlyRootFS(t *testing.T) { func defaultPSP() *extensions.PodSecurityPolicy { return &extensions.PodSecurityPolicy{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "psp-sa", Annotations: map[string]string{}, }, @@ -915,7 +916,7 @@ func defaultPSP() *extensions.PodSecurityPolicy { func defaultPod() *api.Pod { var notPriv bool = false return &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{}, }, Spec: api.PodSpec{ @@ -939,7 +940,7 @@ func defaultPod() *api.Pod { func defaultV1Pod() *v1.Pod { var notPriv bool = false return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{}, }, Spec: v1.PodSpec{ diff --git a/vendor/k8s.io/kubernetes/pkg/security/podsecuritypolicy/seccomp/BUILD b/vendor/k8s.io/kubernetes/pkg/security/podsecuritypolicy/seccomp/BUILD index a3b2276f..3c1311cb 100644 --- a/vendor/k8s.io/kubernetes/pkg/security/podsecuritypolicy/seccomp/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/security/podsecuritypolicy/seccomp/BUILD @@ -23,7 +23,10 @@ go_test( srcs = ["strategy_test.go"], library = ":go_default_library", tags = ["automanaged"], - deps = ["//pkg/api:go_default_library"], + deps = [ + "//pkg/api:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + ], ) filegroup( diff --git a/vendor/k8s.io/kubernetes/pkg/security/podsecuritypolicy/seccomp/strategy_test.go b/vendor/k8s.io/kubernetes/pkg/security/podsecuritypolicy/seccomp/strategy_test.go index 6a371f4c..663900ec 100644 --- a/vendor/k8s.io/kubernetes/pkg/security/podsecuritypolicy/seccomp/strategy_test.go +++ b/vendor/k8s.io/kubernetes/pkg/security/podsecuritypolicy/seccomp/strategy_test.go @@ -21,6 +21,7 @@ import ( "strings" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api" ) @@ -208,7 +209,7 @@ func TestValidatePod(t *testing.T) { } for k, v := range tests { pod := &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: v.podAnnotations, }, } @@ -295,7 +296,7 @@ func TestValidateContainer(t *testing.T) { } for k, v := range tests { pod := &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: v.podAnnotations, }, } diff --git a/vendor/k8s.io/kubernetes/pkg/selection/.readonly b/vendor/k8s.io/kubernetes/pkg/selection/.readonly deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/k8s.io/kubernetes/pkg/serviceaccount/BUILD b/vendor/k8s.io/kubernetes/pkg/serviceaccount/BUILD index 6011cdd1..f56e4a0b 100644 --- a/vendor/k8s.io/kubernetes/pkg/serviceaccount/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/serviceaccount/BUILD @@ -8,13 +8,6 @@ load( "go_test", ) -go_test( - name = "go_default_test", - srcs = ["util_test.go"], - library = ":go_default_library", - tags = ["automanaged"], -) - go_library( name = "go_default_library", srcs = [ @@ -25,10 +18,10 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/api/v1:go_default_library", - "//pkg/api/validation/genericvalidation:go_default_library", "//vendor:github.com/dgrijalva/jwt-go", "//vendor:github.com/golang/glog", "//vendor:k8s.io/apiserver/pkg/authentication/authenticator", + "//vendor:k8s.io/apiserver/pkg/authentication/serviceaccount", "//vendor:k8s.io/apiserver/pkg/authentication/user", ], ) @@ -43,6 +36,8 @@ go_test( "//pkg/client/clientset_generated/clientset/fake:go_default_library", "//pkg/controller/serviceaccount:go_default_library", "//pkg/serviceaccount:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apiserver/pkg/authentication/serviceaccount", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/serviceaccount/jwt.go b/vendor/k8s.io/kubernetes/pkg/serviceaccount/jwt.go index 51590fa9..ad53a180 100644 --- a/vendor/k8s.io/kubernetes/pkg/serviceaccount/jwt.go +++ b/vendor/k8s.io/kubernetes/pkg/serviceaccount/jwt.go @@ -27,6 +27,7 @@ import ( "io/ioutil" "k8s.io/apiserver/pkg/authentication/authenticator" + apiserverserviceaccount "k8s.io/apiserver/pkg/authentication/serviceaccount" "k8s.io/apiserver/pkg/authentication/user" "k8s.io/kubernetes/pkg/api/v1" @@ -176,7 +177,7 @@ func (j *jwtTokenGenerator) GenerateToken(serviceAccount v1.ServiceAccount, secr claims[IssuerClaim] = Issuer // Username - claims[SubjectClaim] = MakeUsername(serviceAccount.Namespace, serviceAccount.Name) + claims[SubjectClaim] = apiserverserviceaccount.MakeUsername(serviceAccount.Namespace, serviceAccount.Name) // Persist enough structured info for the authenticator to be able to look up the service account and secret claims[NamespaceClaim] = serviceAccount.Namespace @@ -287,7 +288,7 @@ func (j *jwtTokenAuthenticator) AuthenticateToken(token string) (user.Info, bool return nil, false, errors.New("serviceAccountUID claim is missing") } - subjectNamespace, subjectName, err := SplitUsername(sub) + subjectNamespace, subjectName, err := apiserverserviceaccount.SplitUsername(sub) if err != nil || subjectNamespace != namespace || subjectName != serviceAccountName { return nil, false, errors.New("sub claim is invalid") } diff --git a/vendor/k8s.io/kubernetes/pkg/serviceaccount/jwt_test.go b/vendor/k8s.io/kubernetes/pkg/serviceaccount/jwt_test.go index 07ec40c1..7908114f 100644 --- a/vendor/k8s.io/kubernetes/pkg/serviceaccount/jwt_test.go +++ b/vendor/k8s.io/kubernetes/pkg/serviceaccount/jwt_test.go @@ -22,6 +22,8 @@ import ( "reflect" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apiserverserviceaccount "k8s.io/apiserver/pkg/authentication/serviceaccount" "k8s.io/kubernetes/pkg/api/v1" clientset "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" @@ -165,20 +167,20 @@ func TestTokenGenerateAndValidate(t *testing.T) { // Related API objects serviceAccount := &v1.ServiceAccount{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "my-service-account", UID: "12345", Namespace: "test", }, } rsaSecret := &v1.Secret{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "my-rsa-secret", Namespace: "test", }, } ecdsaSecret := &v1.Secret{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "my-ecdsa-secret", Namespace: "test", }, @@ -349,8 +351,8 @@ func TestTokenGenerateAndValidate(t *testing.T) { } func TestMakeSplitUsername(t *testing.T) { - username := serviceaccount.MakeUsername("ns", "name") - ns, name, err := serviceaccount.SplitUsername(username) + username := apiserverserviceaccount.MakeUsername("ns", "name") + ns, name, err := apiserverserviceaccount.SplitUsername(username) if err != nil { t.Errorf("Unexpected error %v", err) } @@ -360,7 +362,7 @@ func TestMakeSplitUsername(t *testing.T) { invalid := []string{"test", "system:serviceaccount", "system:serviceaccount:", "system:serviceaccount:ns", "system:serviceaccount:ns:name:extra"} for _, n := range invalid { - _, _, err := serviceaccount.SplitUsername("test") + _, _, err := apiserverserviceaccount.SplitUsername("test") if err == nil { t.Errorf("Expected error for %s", n) } diff --git a/vendor/k8s.io/kubernetes/pkg/serviceaccount/util.go b/vendor/k8s.io/kubernetes/pkg/serviceaccount/util.go index 88cc423d..1fd5bd89 100644 --- a/vendor/k8s.io/kubernetes/pkg/serviceaccount/util.go +++ b/vendor/k8s.io/kubernetes/pkg/serviceaccount/util.go @@ -17,70 +17,18 @@ limitations under the License. package serviceaccount import ( - "fmt" - "strings" - + apiserverserviceaccount "k8s.io/apiserver/pkg/authentication/serviceaccount" "k8s.io/apiserver/pkg/authentication/user" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" - "k8s.io/kubernetes/pkg/api/validation/genericvalidation" ) -const ( - ServiceAccountUsernamePrefix = "system:serviceaccount:" - ServiceAccountUsernameSeparator = ":" - ServiceAccountGroupPrefix = "system:serviceaccounts:" - AllServiceAccountsGroup = "system:serviceaccounts" -) - -// MakeUsername generates a username from the given namespace and ServiceAccount name. -// The resulting username can be passed to SplitUsername to extract the original namespace and ServiceAccount name. -func MakeUsername(namespace, name string) string { - return ServiceAccountUsernamePrefix + namespace + ServiceAccountUsernameSeparator + name -} - -var invalidUsernameErr = fmt.Errorf("Username must be in the form %s", MakeUsername("namespace", "name")) - -// SplitUsername returns the namespace and ServiceAccount name embedded in the given username, -// or an error if the username is not a valid name produced by MakeUsername -func SplitUsername(username string) (string, string, error) { - if !strings.HasPrefix(username, ServiceAccountUsernamePrefix) { - return "", "", invalidUsernameErr - } - trimmed := strings.TrimPrefix(username, ServiceAccountUsernamePrefix) - parts := strings.Split(trimmed, ServiceAccountUsernameSeparator) - if len(parts) != 2 { - return "", "", invalidUsernameErr - } - namespace, name := parts[0], parts[1] - if len(genericvalidation.ValidateNamespaceName(namespace, false)) != 0 { - return "", "", invalidUsernameErr - } - if len(genericvalidation.ValidateServiceAccountName(name, false)) != 0 { - return "", "", invalidUsernameErr - } - return namespace, name, nil -} - -// MakeGroupNames generates service account group names for the given namespace and ServiceAccount name -func MakeGroupNames(namespace, name string) []string { - return []string{ - AllServiceAccountsGroup, - MakeNamespaceGroupName(namespace), - } -} - -// MakeNamespaceGroupName returns the name of the group all service accounts in the namespace are included in -func MakeNamespaceGroupName(namespace string) string { - return ServiceAccountGroupPrefix + namespace -} - // UserInfo returns a user.Info interface for the given namespace, service account name and UID func UserInfo(namespace, name, uid string) user.Info { return &user.DefaultInfo{ - Name: MakeUsername(namespace, name), + Name: apiserverserviceaccount.MakeUsername(namespace, name), UID: uid, - Groups: MakeGroupNames(namespace, name), + Groups: apiserverserviceaccount.MakeGroupNames(namespace, name), } } diff --git a/vendor/k8s.io/kubernetes/pkg/storage/BUILD b/vendor/k8s.io/kubernetes/pkg/storage/BUILD index af1d5be6..97ed6f2e 100644 --- a/vendor/k8s.io/kubernetes/pkg/storage/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/storage/BUILD @@ -23,18 +23,16 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/api:go_default_library", - "//pkg/api/v1:go_default_library", "//pkg/api/validation/path:go_default_library", "//pkg/client/cache:go_default_library", - "//pkg/fields:go_default_library", "//pkg/util:go_default_library", - "//pkg/util/clock:go_default_library", "//vendor:github.com/golang/glog", "//vendor:golang.org/x/net/context", "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/api/meta", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/conversion", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/types", @@ -42,6 +40,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/util/validation/field", "//vendor:k8s.io/apimachinery/pkg/util/wait", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/util/clock", ], ) @@ -58,18 +57,17 @@ go_test( tags = ["automanaged"], deps = [ "//pkg/api:go_default_library", - "//pkg/api/v1:go_default_library", "//pkg/client/cache:go_default_library", - "//pkg/fields:go_default_library", - "//pkg/util/clock:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/util/sets", "//vendor:k8s.io/apimachinery/pkg/util/wait", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/util/clock", ], ) @@ -81,7 +79,6 @@ go_test( "//pkg/api:go_default_library", "//pkg/api/testapi:go_default_library", "//pkg/api/testing:go_default_library", - "//pkg/fields:go_default_library", "//pkg/registry/core/pod:go_default_library", "//pkg/storage:go_default_library", "//pkg/storage/etcd:go_default_library", @@ -92,6 +89,7 @@ go_test( "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/api/meta", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/sets", diff --git a/vendor/k8s.io/kubernetes/pkg/storage/cacher.go b/vendor/k8s.io/kubernetes/pkg/storage/cacher.go index 8f382faf..a73a4cf9 100644 --- a/vendor/k8s.io/kubernetes/pkg/storage/cacher.go +++ b/vendor/k8s.io/kubernetes/pkg/storage/cacher.go @@ -28,15 +28,14 @@ import ( "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/conversion" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apimachinery/pkg/watch" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/cache" - "k8s.io/kubernetes/pkg/fields" "k8s.io/kubernetes/pkg/util" "github.com/golang/glog" @@ -188,9 +187,9 @@ type Cacher struct { stopWg sync.WaitGroup } -// Create a new Cacher responsible from service WATCH and LIST requests from its -// internal cache and updating its cache in the background based on the given -// configuration. +// Create a new Cacher responsible for servicing WATCH and LIST requests from +// its internal cache and updating its cache in the background based on the +// given configuration. func NewCacherFromConfig(config CacherConfig) *Cacher { watchCache := newWatchCache(config.CacheCapacity, config.KeyFunc, config.GetAttrsFunc) listerWatcher := newCacherListerWatcher(config.Storage, config.ResourcePrefix, config.NewListFunc) @@ -692,7 +691,7 @@ func newCacherListerWatcher(storage Interface, resourcePrefix string, newListFun } // Implements cache.ListerWatcher interface. -func (lw *cacherListerWatcher) List(options v1.ListOptions) (runtime.Object, error) { +func (lw *cacherListerWatcher) List(options metav1.ListOptions) (runtime.Object, error) { list := lw.newListFunc() if err := lw.storage.List(context.TODO(), lw.resourcePrefix, "", Everything, list); err != nil { return nil, err @@ -701,7 +700,7 @@ func (lw *cacherListerWatcher) List(options v1.ListOptions) (runtime.Object, err } // Implements cache.ListerWatcher interface. -func (lw *cacherListerWatcher) Watch(options v1.ListOptions) (watch.Interface, error) { +func (lw *cacherListerWatcher) Watch(options metav1.ListOptions) (watch.Interface, error) { return lw.storage.WatchList(context.TODO(), lw.resourcePrefix, options.ResourceVersion, Everything) } diff --git a/vendor/k8s.io/kubernetes/pkg/storage/cacher_test.go b/vendor/k8s.io/kubernetes/pkg/storage/cacher_test.go index 3cc804f7..12bce78d 100644 --- a/vendor/k8s.io/kubernetes/pkg/storage/cacher_test.go +++ b/vendor/k8s.io/kubernetes/pkg/storage/cacher_test.go @@ -27,6 +27,7 @@ import ( "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/sets" @@ -35,7 +36,6 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" apitesting "k8s.io/kubernetes/pkg/api/testing" - "k8s.io/kubernetes/pkg/fields" corepod "k8s.io/kubernetes/pkg/registry/core/pod" "k8s.io/kubernetes/pkg/storage" etcdstorage "k8s.io/kubernetes/pkg/storage/etcd" @@ -70,7 +70,7 @@ func newTestCacher(s storage.Interface, cap int) *storage.Cacher { func makeTestPod(name string) *api.Pod { return &api.Pod{ - ObjectMeta: api.ObjectMeta{Namespace: "ns", Name: name}, + ObjectMeta: metav1.ObjectMeta{Namespace: "ns", Name: name}, Spec: apitesting.DeepEqualSafePodSpec(), } } diff --git a/vendor/k8s.io/kubernetes/pkg/storage/cacher_whitebox_test.go b/vendor/k8s.io/kubernetes/pkg/storage/cacher_whitebox_test.go index c111adda..48f9f20e 100644 --- a/vendor/k8s.io/kubernetes/pkg/storage/cacher_whitebox_test.go +++ b/vendor/k8s.io/kubernetes/pkg/storage/cacher_whitebox_test.go @@ -21,10 +21,10 @@ import ( "testing" "time" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/fields" ) // verifies the cacheWatcher.process goroutine is properly cleaned up even if diff --git a/vendor/k8s.io/kubernetes/pkg/storage/errors.go b/vendor/k8s.io/kubernetes/pkg/storage/errors.go index 7d91bfd2..a4d134ac 100644 --- a/vendor/k8s.io/kubernetes/pkg/storage/errors.go +++ b/vendor/k8s.io/kubernetes/pkg/storage/errors.go @@ -105,8 +105,8 @@ func IsUnreachable(err error) bool { return isErrCode(err, ErrCodeUnreachable) } -// IsTestFailed returns true if and only if err is a write conflict. -func IsTestFailed(err error) bool { +// IsConflict returns true if and only if err is a write conflict. +func IsConflict(err error) bool { return isErrCode(err, ErrCodeResourceVersionConflicts) } diff --git a/vendor/k8s.io/kubernetes/pkg/storage/etcd/BUILD b/vendor/k8s.io/kubernetes/pkg/storage/etcd/BUILD index 10b101a9..8291c357 100644 --- a/vendor/k8s.io/kubernetes/pkg/storage/etcd/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/storage/etcd/BUILD @@ -49,15 +49,15 @@ go_test( "//pkg/api:go_default_library", "//pkg/api/testapi:go_default_library", "//pkg/api/testing:go_default_library", - "//pkg/api/v1:go_default_library", - "//pkg/fields:go_default_library", "//pkg/storage:go_default_library", "//pkg/storage/etcd/etcdtest:go_default_library", "//pkg/storage/etcd/testing:go_default_library", "//pkg/storage/testing:go_default_library", "//vendor:github.com/coreos/etcd/client", "//vendor:golang.org/x/net/context", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/conversion", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/serializer", diff --git a/vendor/k8s.io/kubernetes/pkg/storage/etcd/api_object_versioner.go b/vendor/k8s.io/kubernetes/pkg/storage/etcd/api_object_versioner.go index 0200e14d..dcf81377 100644 --- a/vendor/k8s.io/kubernetes/pkg/storage/etcd/api_object_versioner.go +++ b/vendor/k8s.io/kubernetes/pkg/storage/etcd/api_object_versioner.go @@ -20,8 +20,8 @@ import ( "strconv" "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/storage" ) @@ -45,7 +45,7 @@ func (a APIObjectVersioner) UpdateObject(obj runtime.Object, resourceVersion uin // UpdateList implements Versioner func (a APIObjectVersioner) UpdateList(obj runtime.Object, resourceVersion uint64) error { - listMeta, err := api.ListMetaFor(obj) + listMeta, err := metav1.ListMetaFor(obj) if err != nil || listMeta == nil { return err } diff --git a/vendor/k8s.io/kubernetes/pkg/storage/etcd/api_object_versioner_test.go b/vendor/k8s.io/kubernetes/pkg/storage/etcd/api_object_versioner_test.go index ad64e928..acbce624 100644 --- a/vendor/k8s.io/kubernetes/pkg/storage/etcd/api_object_versioner_test.go +++ b/vendor/k8s.io/kubernetes/pkg/storage/etcd/api_object_versioner_test.go @@ -19,19 +19,19 @@ package etcd import ( "testing" - apiv1 "k8s.io/kubernetes/pkg/api/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" storagetesting "k8s.io/kubernetes/pkg/storage/testing" ) func TestObjectVersioner(t *testing.T) { v := APIObjectVersioner{} - if ver, err := v.ObjectResourceVersion(&storagetesting.TestResource{ObjectMeta: apiv1.ObjectMeta{ResourceVersion: "5"}}); err != nil || ver != 5 { + if ver, err := v.ObjectResourceVersion(&storagetesting.TestResource{ObjectMeta: metav1.ObjectMeta{ResourceVersion: "5"}}); err != nil || ver != 5 { t.Errorf("unexpected version: %d %v", ver, err) } - if ver, err := v.ObjectResourceVersion(&storagetesting.TestResource{ObjectMeta: apiv1.ObjectMeta{ResourceVersion: "a"}}); err == nil || ver != 0 { + if ver, err := v.ObjectResourceVersion(&storagetesting.TestResource{ObjectMeta: metav1.ObjectMeta{ResourceVersion: "a"}}); err == nil || ver != 0 { t.Errorf("unexpected version: %d %v", ver, err) } - obj := &storagetesting.TestResource{ObjectMeta: apiv1.ObjectMeta{ResourceVersion: "a"}} + obj := &storagetesting.TestResource{ObjectMeta: metav1.ObjectMeta{ResourceVersion: "a"}} if err := v.UpdateObject(obj, 5); err != nil { t.Fatalf("unexpected error: %v", err) } @@ -41,8 +41,8 @@ func TestObjectVersioner(t *testing.T) { } func TestCompareResourceVersion(t *testing.T) { - five := &storagetesting.TestResource{ObjectMeta: apiv1.ObjectMeta{ResourceVersion: "5"}} - six := &storagetesting.TestResource{ObjectMeta: apiv1.ObjectMeta{ResourceVersion: "6"}} + five := &storagetesting.TestResource{ObjectMeta: metav1.ObjectMeta{ResourceVersion: "5"}} + six := &storagetesting.TestResource{ObjectMeta: metav1.ObjectMeta{ResourceVersion: "6"}} versioner := APIObjectVersioner{} diff --git a/vendor/k8s.io/kubernetes/pkg/storage/etcd/etcd_helper.go b/vendor/k8s.io/kubernetes/pkg/storage/etcd/etcd_helper.go index fd6c226c..f92f6ac1 100644 --- a/vendor/k8s.io/kubernetes/pkg/storage/etcd/etcd_helper.go +++ b/vendor/k8s.io/kubernetes/pkg/storage/etcd/etcd_helper.go @@ -24,6 +24,7 @@ import ( "time" "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/conversion" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" @@ -131,7 +132,7 @@ func checkPreconditions(key string, preconditions *storage.Preconditions, out ru if preconditions == nil { return nil } - objMeta, err := api.ObjectMetaFor(out) + objMeta, err := metav1.ObjectMetaFor(out) if err != nil { return storage.NewInternalErrorf("can't enforce preconditions %v on un-introspectable object %v, got error: %v", *preconditions, out, err) } diff --git a/vendor/k8s.io/kubernetes/pkg/storage/etcd/etcd_helper_test.go b/vendor/k8s.io/kubernetes/pkg/storage/etcd/etcd_helper_test.go index aa1d9ded..b062072d 100644 --- a/vendor/k8s.io/kubernetes/pkg/storage/etcd/etcd_helper_test.go +++ b/vendor/k8s.io/kubernetes/pkg/storage/etcd/etcd_helper_test.go @@ -25,15 +25,15 @@ import ( etcd "github.com/coreos/etcd/client" "golang.org/x/net/context" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/conversion" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/serializer" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" apitesting "k8s.io/kubernetes/pkg/api/testing" - apiv1 "k8s.io/kubernetes/pkg/api/v1" - "k8s.io/kubernetes/pkg/fields" "k8s.io/kubernetes/pkg/storage" "k8s.io/kubernetes/pkg/storage/etcd/etcdtest" etcdtesting "k8s.io/kubernetes/pkg/storage/etcd/testing" @@ -68,7 +68,7 @@ func newEtcdHelper(client etcd.Client, codec runtime.Codec, prefix string) etcdH // Returns an encoded version of api.Pod with the given name. func getEncodedPod(name string) string { pod, _ := runtime.Encode(testapi.Default.Codec(), &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: name}, + ObjectMeta: metav1.ObjectMeta{Name: name}, }) return string(pod) } @@ -101,15 +101,15 @@ func TestList(t *testing.T) { list := api.PodList{ Items: []api.Pod{ { - ObjectMeta: api.ObjectMeta{Name: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar"}, Spec: apitesting.DeepEqualSafePodSpec(), }, { - ObjectMeta: api.ObjectMeta{Name: "baz"}, + ObjectMeta: metav1.ObjectMeta{Name: "baz"}, Spec: apitesting.DeepEqualSafePodSpec(), }, { - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: apitesting.DeepEqualSafePodSpec(), }, }, @@ -137,15 +137,15 @@ func TestListFiltered(t *testing.T) { list := api.PodList{ Items: []api.Pod{ { - ObjectMeta: api.ObjectMeta{Name: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar"}, Spec: apitesting.DeepEqualSafePodSpec(), }, { - ObjectMeta: api.ObjectMeta{Name: "baz"}, + ObjectMeta: metav1.ObjectMeta{Name: "baz"}, Spec: apitesting.DeepEqualSafePodSpec(), }, { - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: apitesting.DeepEqualSafePodSpec(), }, }, @@ -184,15 +184,15 @@ func TestListAcrossDirectories(t *testing.T) { list := api.PodList{ Items: []api.Pod{ { - ObjectMeta: api.ObjectMeta{Name: "baz"}, + ObjectMeta: metav1.ObjectMeta{Name: "baz"}, Spec: apitesting.DeepEqualSafePodSpec(), }, { - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: apitesting.DeepEqualSafePodSpec(), }, { - ObjectMeta: api.ObjectMeta{Name: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar"}, Spec: apitesting.DeepEqualSafePodSpec(), }, }, @@ -224,7 +224,7 @@ func TestGet(t *testing.T) { key := "/some/key" helper := newEtcdHelper(server.Client, testapi.Default.Codec(), etcdtest.PathPrefix()) expect := api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: apitesting.DeepEqualSafePodSpec(), } var got api.Pod @@ -254,7 +254,7 @@ func TestGetNotFoundErr(t *testing.T) { } func TestCreate(t *testing.T) { - obj := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}} + obj := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} server := etcdtesting.NewEtcdTestClientServer(t) defer server.Terminate(t) helper := newEtcdHelper(server.Client, testapi.Default.Codec(), etcdtest.PathPrefix()) @@ -281,7 +281,7 @@ func TestCreate(t *testing.T) { } func TestCreateNilOutParam(t *testing.T) { - obj := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}} + obj := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} server := etcdtesting.NewEtcdTestClientServer(t) defer server.Terminate(t) helper := newEtcdHelper(server.Client, testapi.Default.Codec(), etcdtest.PathPrefix()) @@ -298,7 +298,7 @@ func TestGuaranteedUpdate(t *testing.T) { key := "/some/key" helper := newEtcdHelper(server.Client, codec, etcdtest.PathPrefix()) - obj := &storagetesting.TestResource{ObjectMeta: apiv1.ObjectMeta{Name: "foo"}, Value: 1} + obj := &storagetesting.TestResource{ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Value: 1} err := helper.GuaranteedUpdate(context.TODO(), key, &storagetesting.TestResource{}, true, nil, storage.SimpleUpdate(func(in runtime.Object) (runtime.Object, error) { return obj, nil })) @@ -308,7 +308,7 @@ func TestGuaranteedUpdate(t *testing.T) { // Update an existing node. callbackCalled := false - objUpdate := &storagetesting.TestResource{ObjectMeta: apiv1.ObjectMeta{Name: "foo"}, Value: 2} + objUpdate := &storagetesting.TestResource{ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Value: 2} err = helper.GuaranteedUpdate(context.TODO(), key, &storagetesting.TestResource{}, true, nil, storage.SimpleUpdate(func(in runtime.Object) (runtime.Object, error) { callbackCalled = true @@ -343,7 +343,7 @@ func TestGuaranteedUpdateNoChange(t *testing.T) { key := "/some/key" helper := newEtcdHelper(server.Client, codec, etcdtest.PathPrefix()) - obj := &storagetesting.TestResource{ObjectMeta: apiv1.ObjectMeta{Name: "foo"}, Value: 1} + obj := &storagetesting.TestResource{ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Value: 1} err := helper.GuaranteedUpdate(context.TODO(), key, &storagetesting.TestResource{}, true, nil, storage.SimpleUpdate(func(in runtime.Object) (runtime.Object, error) { return obj, nil })) @@ -353,7 +353,7 @@ func TestGuaranteedUpdateNoChange(t *testing.T) { // Update an existing node with the same data callbackCalled := false - objUpdate := &storagetesting.TestResource{ObjectMeta: apiv1.ObjectMeta{Name: "foo"}, Value: 1} + objUpdate := &storagetesting.TestResource{ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Value: 1} err = helper.GuaranteedUpdate(context.TODO(), key, &storagetesting.TestResource{}, true, nil, storage.SimpleUpdate(func(in runtime.Object) (runtime.Object, error) { callbackCalled = true return objUpdate, nil @@ -374,7 +374,7 @@ func TestGuaranteedUpdateKeyNotFound(t *testing.T) { helper := newEtcdHelper(server.Client, codec, etcdtest.PathPrefix()) // Create a new node. - obj := &storagetesting.TestResource{ObjectMeta: apiv1.ObjectMeta{Name: "foo"}, Value: 1} + obj := &storagetesting.TestResource{ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Value: 1} f := storage.SimpleUpdate(func(in runtime.Object) (runtime.Object, error) { return obj, nil @@ -422,7 +422,7 @@ func TestGuaranteedUpdate_CreateCollision(t *testing.T) { } currValue := in.(*storagetesting.TestResource).Value - obj := &storagetesting.TestResource{ObjectMeta: apiv1.ObjectMeta{Name: "foo"}, Value: currValue + 1} + obj := &storagetesting.TestResource{ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Value: currValue + 1} return obj, nil })) if err != nil { @@ -448,7 +448,7 @@ func TestGuaranteedUpdateUIDMismatch(t *testing.T) { prefix := path.Join("/", etcdtest.PathPrefix()) helper := newEtcdHelper(server.Client, testapi.Default.Codec(), prefix) - obj := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo", UID: "A"}} + obj := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo", UID: "A"}} podPtr := &api.Pod{} err := helper.Create(context.TODO(), "/some/key", obj, podPtr, 0) if err != nil { @@ -468,7 +468,7 @@ func TestDeleteUIDMismatch(t *testing.T) { prefix := path.Join("/", etcdtest.PathPrefix()) helper := newEtcdHelper(server.Client, testapi.Default.Codec(), prefix) - obj := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo", UID: "A"}} + obj := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo", UID: "A"}} podPtr := &api.Pod{} err := helper.Create(context.TODO(), "/some/key", obj, podPtr, 0) if err != nil { @@ -507,7 +507,7 @@ func TestDeleteWithRetry(t *testing.T) { defer server.Terminate(t) prefix := path.Join("/", etcdtest.PathPrefix()) - obj := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo", UID: "A"}} + obj := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo", UID: "A"}} // fakeGet returns a large ModifiedIndex to emulate the case that another // party has updated the object. fakeGet := func(ctx context.Context, key string, opts *etcd.GetOptions) (*etcd.Response, error) { diff --git a/vendor/k8s.io/kubernetes/pkg/storage/etcd/etcd_watcher_test.go b/vendor/k8s.io/kubernetes/pkg/storage/etcd/etcd_watcher_test.go index 359ff3fe..c07c189f 100644 --- a/vendor/k8s.io/kubernetes/pkg/storage/etcd/etcd_watcher_test.go +++ b/vendor/k8s.io/kubernetes/pkg/storage/etcd/etcd_watcher_test.go @@ -20,6 +20,7 @@ import ( rt "runtime" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" "k8s.io/kubernetes/pkg/api" @@ -49,9 +50,9 @@ var _ etcdCache = &fakeEtcdCache{} func TestWatchInterpretations(t *testing.T) { codec := testapi.Default.Codec() // Declare some pods to make the test cases compact. - podFoo := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}} - podBar := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "bar"}} - podBaz := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "baz"}} + podFoo := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} + podBar := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "bar"}} + podBaz := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "baz"}} // All of these test cases will be run with the firstLetterIsB Filter. table := map[string]struct { @@ -229,8 +230,8 @@ func TestSendResultDeleteEventHaveLatestIndex(t *testing.T) { eventChan <- e } - fooPod := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}} - barPod := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "bar"}} + fooPod := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} + barPod := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "bar"}} fooBytes, err := runtime.Encode(codec, fooPod) if err != nil { t.Fatalf("Encode failed: %v", err) @@ -299,7 +300,7 @@ func TestWatch(t *testing.T) { // watching is explicitly closed below. // Test normal case - pod := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}} + pod := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} returnObj := &api.Pod{} err = h.Create(context.TODO(), key, pod, returnObj, 0) if err != nil { @@ -353,7 +354,7 @@ func TestWatchEtcdState(t *testing.T) { defer watching.Stop() endpoint := &api.Endpoints{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Subsets: emptySubsets(), } @@ -397,7 +398,7 @@ func TestWatchEtcdState(t *testing.T) { func TestWatchFromZeroIndex(t *testing.T) { codec := testapi.Default.Codec() - pod := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}} + pod := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} key := "/somekey/foo" server := etcdtesting.NewEtcdTestClientServer(t) @@ -482,7 +483,7 @@ func TestWatchListFromZeroIndex(t *testing.T) { defer watching.Stop() // creates foo which should trigger the WatchList for "/" - pod := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}} + pod := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} err = h.Create(context.TODO(), pod.Name, pod, pod, 0) if err != nil { t.Fatalf("Unexpected error: %v", err) @@ -500,7 +501,7 @@ func TestWatchListFromZeroIndex(t *testing.T) { func TestWatchListIgnoresRootKey(t *testing.T) { codec := testapi.Default.Codec() - pod := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}} + pod := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} key := "/some/key" server := etcdtesting.NewEtcdTestClientServer(t) defer server.Terminate(t) diff --git a/vendor/k8s.io/kubernetes/pkg/storage/etcd3/BUILD b/vendor/k8s.io/kubernetes/pkg/storage/etcd3/BUILD index 66848682..94046467 100644 --- a/vendor/k8s.io/kubernetes/pkg/storage/etcd3/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/storage/etcd3/BUILD @@ -18,7 +18,6 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//pkg/storage:go_default_library", "//pkg/storage/etcd:go_default_library", "//pkg/util:go_default_library", @@ -47,13 +46,13 @@ go_test( deps = [ "//pkg/api:go_default_library", "//pkg/api/testapi:go_default_library", - "//pkg/fields:go_default_library", "//pkg/storage:go_default_library", "//vendor:github.com/coreos/etcd/clientv3", "//vendor:github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes", "//vendor:github.com/coreos/etcd/integration", "//vendor:golang.org/x/net/context", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", diff --git a/vendor/k8s.io/kubernetes/pkg/storage/etcd3/store.go b/vendor/k8s.io/kubernetes/pkg/storage/etcd3/store.go index 809d94f7..bcecfbfc 100644 --- a/vendor/k8s.io/kubernetes/pkg/storage/etcd3/store.go +++ b/vendor/k8s.io/kubernetes/pkg/storage/etcd3/store.go @@ -26,10 +26,10 @@ import ( "time" "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/conversion" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" - "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/storage" "k8s.io/kubernetes/pkg/storage/etcd" "k8s.io/kubernetes/pkg/util" @@ -497,7 +497,7 @@ func checkPreconditions(key string, preconditions *storage.Preconditions, out ru if preconditions == nil { return nil } - objMeta, err := api.ObjectMetaFor(out) + objMeta, err := metav1.ObjectMetaFor(out) if err != nil { return storage.NewInternalErrorf("can't enforce preconditions %v on un-introspectable object %v, got error: %v", *preconditions, out, err) } diff --git a/vendor/k8s.io/kubernetes/pkg/storage/etcd3/store_test.go b/vendor/k8s.io/kubernetes/pkg/storage/etcd3/store_test.go index 5de7a91e..0acf07cc 100644 --- a/vendor/k8s.io/kubernetes/pkg/storage/etcd3/store_test.go +++ b/vendor/k8s.io/kubernetes/pkg/storage/etcd3/store_test.go @@ -22,11 +22,12 @@ import ( "sync" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" - "k8s.io/kubernetes/pkg/fields" "k8s.io/kubernetes/pkg/storage" "github.com/coreos/etcd/integration" @@ -41,7 +42,7 @@ func TestCreate(t *testing.T) { key := "/testkey" out := &api.Pod{} - obj := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}} + obj := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} // verify that kv pair is empty before set getResp, err := etcdClient.KV.Get(ctx, key) @@ -78,7 +79,7 @@ func TestCreateWithTTL(t *testing.T) { ctx, store, cluster := testSetup(t) defer cluster.Terminate(t) - input := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}} + input := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} key := "/somekey" out := &api.Pod{} @@ -96,7 +97,7 @@ func TestCreateWithTTL(t *testing.T) { func TestCreateWithKeyExist(t *testing.T) { ctx, store, cluster := testSetup(t) defer cluster.Terminate(t) - obj := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}} + obj := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} key, _ := testPropogateStore(ctx, t, store, obj) out := &api.Pod{} err := store.Create(ctx, key, obj, out, 0) @@ -108,7 +109,7 @@ func TestCreateWithKeyExist(t *testing.T) { func TestGet(t *testing.T) { ctx, store, cluster := testSetup(t) defer cluster.Terminate(t) - key, storedObj := testPropogateStore(ctx, t, store, &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}}) + key, storedObj := testPropogateStore(ctx, t, store, &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}) tests := []struct { key string @@ -152,7 +153,7 @@ func TestGet(t *testing.T) { func TestUnconditionalDelete(t *testing.T) { ctx, store, cluster := testSetup(t) defer cluster.Terminate(t) - key, storedObj := testPropogateStore(ctx, t, store, &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}}) + key, storedObj := testPropogateStore(ctx, t, store, &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}) tests := []struct { key string @@ -189,7 +190,7 @@ func TestUnconditionalDelete(t *testing.T) { func TestConditionalDelete(t *testing.T) { ctx, store, cluster := testSetup(t) defer cluster.Terminate(t) - key, storedObj := testPropogateStore(ctx, t, store, &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo", UID: "A"}}) + key, storedObj := testPropogateStore(ctx, t, store, &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo", UID: "A"}}) tests := []struct { precondition *storage.Preconditions @@ -217,14 +218,14 @@ func TestConditionalDelete(t *testing.T) { if !reflect.DeepEqual(storedObj, out) { t.Errorf("#%d: pod want=%#v, get=%#v", i, storedObj, out) } - key, storedObj = testPropogateStore(ctx, t, store, &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo", UID: "A"}}) + key, storedObj = testPropogateStore(ctx, t, store, &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo", UID: "A"}}) } } func TestGetToList(t *testing.T) { ctx, store, cluster := testSetup(t) defer cluster.Terminate(t) - key, storedObj := testPropogateStore(ctx, t, store, &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}}) + key, storedObj := testPropogateStore(ctx, t, store, &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}) tests := []struct { key string @@ -273,7 +274,7 @@ func TestGetToList(t *testing.T) { func TestGuaranteedUpdate(t *testing.T) { ctx, store, cluster := testSetup(t) defer cluster.Terminate(t) - key, storeObj := testPropogateStore(ctx, t, store, &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo", UID: "A"}}) + key, storeObj := testPropogateStore(ctx, t, store, &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo", UID: "A"}}) tests := []struct { key string @@ -381,7 +382,7 @@ func TestGuaranteedUpdateWithTTL(t *testing.T) { ctx, store, cluster := testSetup(t) defer cluster.Terminate(t) - input := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}} + input := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} key := "/somekey" out := &api.Pod{} @@ -404,7 +405,7 @@ func TestGuaranteedUpdateWithTTL(t *testing.T) { func TestGuaranteedUpdateWithConflict(t *testing.T) { ctx, store, cluster := testSetup(t) defer cluster.Terminate(t) - key, _ := testPropogateStore(ctx, t, store, &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}}) + key, _ := testPropogateStore(ctx, t, store, &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}) errChan := make(chan error, 1) var firstToFinish sync.WaitGroup @@ -471,13 +472,13 @@ func TestList(t *testing.T) { storedObj *api.Pod }{{ key: "/one-level/test", - obj: &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}}, + obj: &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}, }, { key: "/two-level/1/test", - obj: &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}}, + obj: &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}, }, { key: "/two-level/2/test", - obj: &api.Pod{ObjectMeta: api.ObjectMeta{Name: "bar"}}, + obj: &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "bar"}}, }} for i, ps := range preset { diff --git a/vendor/k8s.io/kubernetes/pkg/storage/etcd3/watcher_test.go b/vendor/k8s.io/kubernetes/pkg/storage/etcd3/watcher_test.go index 447bcc1d..f36db9ba 100644 --- a/vendor/k8s.io/kubernetes/pkg/storage/etcd3/watcher_test.go +++ b/vendor/k8s.io/kubernetes/pkg/storage/etcd3/watcher_test.go @@ -29,6 +29,7 @@ import ( "github.com/coreos/etcd/integration" "golang.org/x/net/context" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" @@ -36,7 +37,6 @@ import ( "k8s.io/apimachinery/pkg/watch" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" - "k8s.io/kubernetes/pkg/fields" "k8s.io/kubernetes/pkg/storage" ) @@ -55,8 +55,8 @@ func TestWatchList(t *testing.T) { func testWatch(t *testing.T, recursive bool) { ctx, store, cluster := testSetup(t) defer cluster.Terminate(t) - podFoo := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}} - podBar := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "bar"}} + podFoo := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} + podBar := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "bar"}} tests := []struct { key string @@ -130,7 +130,7 @@ func testWatch(t *testing.T, recursive bool) { func TestDeleteTriggerWatch(t *testing.T) { ctx, store, cluster := testSetup(t) defer cluster.Terminate(t) - key, storedObj := testPropogateStore(ctx, t, store, &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}}) + key, storedObj := testPropogateStore(ctx, t, store, &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}) w, err := store.Watch(ctx, key, storedObj.ResourceVersion, storage.Everything) if err != nil { t.Fatalf("Watch failed: %v", err) @@ -147,7 +147,7 @@ func TestDeleteTriggerWatch(t *testing.T) { func TestWatchFromZero(t *testing.T) { ctx, store, cluster := testSetup(t) defer cluster.Terminate(t) - key, storedObj := testPropogateStore(ctx, t, store, &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "ns"}}) + key, storedObj := testPropogateStore(ctx, t, store, &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "ns"}}) w, err := store.Watch(ctx, key, "0", storage.Everything) if err != nil { @@ -160,7 +160,7 @@ func TestWatchFromZero(t *testing.T) { out := &api.Pod{} err = store.GuaranteedUpdate(ctx, key, out, true, nil, storage.SimpleUpdate( func(runtime.Object) (runtime.Object, error) { - return &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "ns", Annotations: map[string]string{"a": "1"}}}, nil + return &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "ns", Annotations: map[string]string{"a": "1"}}}, nil })) if err != nil { t.Fatalf("GuaranteedUpdate failed: %v", err) @@ -178,7 +178,7 @@ func TestWatchFromZero(t *testing.T) { out = &api.Pod{} err = store.GuaranteedUpdate(ctx, key, out, true, nil, storage.SimpleUpdate( func(runtime.Object) (runtime.Object, error) { - return &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo", Namespace: "ns"}}, nil + return &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "ns"}}, nil })) if err != nil { t.Fatalf("GuaranteedUpdate failed: %v", err) @@ -207,7 +207,7 @@ func TestWatchFromZero(t *testing.T) { func TestWatchFromNoneZero(t *testing.T) { ctx, store, cluster := testSetup(t) defer cluster.Terminate(t) - key, storedObj := testPropogateStore(ctx, t, store, &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}}) + key, storedObj := testPropogateStore(ctx, t, store, &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}) w, err := store.Watch(ctx, key, storedObj.ResourceVersion, storage.Everything) if err != nil { @@ -216,7 +216,7 @@ func TestWatchFromNoneZero(t *testing.T) { out := &api.Pod{} store.GuaranteedUpdate(ctx, key, out, true, nil, storage.SimpleUpdate( func(runtime.Object) (runtime.Object, error) { - return &api.Pod{ObjectMeta: api.ObjectMeta{Name: "bar"}}, err + return &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "bar"}}, err })) testCheckResult(t, 0, watch.Modified, w, out) } @@ -233,7 +233,7 @@ func TestWatchError(t *testing.T) { validStore := newStore(cluster.RandClient(), false, testapi.Default.Codec(), "") validStore.GuaranteedUpdate(ctx, "/abc", &api.Pod{}, true, nil, storage.SimpleUpdate( func(runtime.Object) (runtime.Object, error) { - return &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}}, nil + return &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}, nil })) testCheckEventType(t, watch.Error, w) } @@ -286,7 +286,7 @@ func TestWatchErrResultNotBlockAfterCancel(t *testing.T) { func TestWatchDeleteEventObjectHaveLatestRV(t *testing.T) { ctx, store, cluster := testSetup(t) defer cluster.Terminate(t) - key, storedObj := testPropogateStore(ctx, t, store, &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}}) + key, storedObj := testPropogateStore(ctx, t, store, &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}) w, err := store.Watch(ctx, key, storedObj.ResourceVersion, storage.Everything) if err != nil { diff --git a/vendor/k8s.io/kubernetes/pkg/storage/interfaces.go b/vendor/k8s.io/kubernetes/pkg/storage/interfaces.go index 75569c38..e8181c3e 100644 --- a/vendor/k8s.io/kubernetes/pkg/storage/interfaces.go +++ b/vendor/k8s.io/kubernetes/pkg/storage/interfaces.go @@ -18,11 +18,11 @@ package storage import ( "golang.org/x/net/context" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/watch" - "k8s.io/kubernetes/pkg/fields" ) // Versioner abstracts setting and retrieving metadata fields from database response diff --git a/vendor/k8s.io/kubernetes/pkg/storage/selection_predicate.go b/vendor/k8s.io/kubernetes/pkg/storage/selection_predicate.go index 59dd7830..c4f79288 100644 --- a/vendor/k8s.io/kubernetes/pkg/storage/selection_predicate.go +++ b/vendor/k8s.io/kubernetes/pkg/storage/selection_predicate.go @@ -17,9 +17,9 @@ limitations under the License. package storage import ( + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" - "k8s.io/kubernetes/pkg/fields" ) // AttrFunc returns label and field sets for List or Watch to match. diff --git a/vendor/k8s.io/kubernetes/pkg/storage/selection_predicate_test.go b/vendor/k8s.io/kubernetes/pkg/storage/selection_predicate_test.go index edf78a5f..d51666e2 100644 --- a/vendor/k8s.io/kubernetes/pkg/storage/selection_predicate_test.go +++ b/vendor/k8s.io/kubernetes/pkg/storage/selection_predicate_test.go @@ -20,10 +20,10 @@ import ( "errors" "testing" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/fields" ) type Ignored struct { diff --git a/vendor/k8s.io/kubernetes/pkg/storage/storagebackend/factory/tls_test.go b/vendor/k8s.io/kubernetes/pkg/storage/storagebackend/factory/tls_test.go index 448cf16f..23c76346 100644 --- a/vendor/k8s.io/kubernetes/pkg/storage/storagebackend/factory/tls_test.go +++ b/vendor/k8s.io/kubernetes/pkg/storage/storagebackend/factory/tls_test.go @@ -20,6 +20,7 @@ import ( "io/ioutil" "os" "path" + "path/filepath" "testing" "golang.org/x/net/context" @@ -35,6 +36,7 @@ import ( func TestTLSConnection(t *testing.T) { certFile, keyFile, caFile := configureTLSCerts(t) + defer os.RemoveAll(filepath.Dir(certFile)) tlsInfo := &transport.TLSInfo{ CertFile: certFile, diff --git a/vendor/k8s.io/kubernetes/pkg/storage/testing/BUILD b/vendor/k8s.io/kubernetes/pkg/storage/testing/BUILD index 0b70d657..487ed43e 100644 --- a/vendor/k8s.io/kubernetes/pkg/storage/testing/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/storage/testing/BUILD @@ -16,7 +16,6 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api/v1:go_default_library", "//pkg/storage:go_default_library", "//vendor:github.com/ugorji/go/codec", "//vendor:golang.org/x/net/context", diff --git a/vendor/k8s.io/kubernetes/pkg/storage/testing/types.generated.go b/vendor/k8s.io/kubernetes/pkg/storage/testing/types.generated.go index 07cc99c3..cf7e8aef 100644 --- a/vendor/k8s.io/kubernetes/pkg/storage/testing/types.generated.go +++ b/vendor/k8s.io/kubernetes/pkg/storage/testing/types.generated.go @@ -26,8 +26,7 @@ import ( "fmt" codec1978 "github.com/ugorji/go/codec" pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - pkg3_types "k8s.io/apimachinery/pkg/types" - pkg2_v1 "k8s.io/kubernetes/pkg/api/v1" + pkg2_types "k8s.io/apimachinery/pkg/types" "reflect" "runtime" time "time" @@ -64,10 +63,9 @@ func init() { } if false { // reference the types, but skip this branch at build/run time var v0 pkg1_v1.TypeMeta - var v1 pkg3_types.UID - var v2 pkg2_v1.ObjectMeta - var v3 time.Time - _, _, _, _ = v0, v1, v2, v3 + var v1 pkg2_types.UID + var v2 time.Time + _, _, _ = v0, v1, v2 } } @@ -156,13 +154,25 @@ func (x *TestResource) CodecEncodeSelf(e *codec1978.Encoder) { if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) @@ -270,21 +280,27 @@ func (x *TestResource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "value": if r.TryDecodeAsNil() { x.Value = 0 } else { - yyv9 := &x.Value - yym10 := z.DecBinary() - _ = yym10 + yyv10 := &x.Value + yym11 := z.DecBinary() + _ = yym11 if false { } else { - *((*int)(yyv9)) = int(r.DecodeInt(codecSelferBitsize1234)) + *((*int)(yyv10)) = int(r.DecodeInt(codecSelferBitsize1234)) } } default: @@ -298,16 +314,16 @@ func (x *TestResource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -315,21 +331,21 @@ func (x *TestResource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -337,38 +353,44 @@ func (x *TestResource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -376,26 +398,26 @@ func (x *TestResource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Value = 0 } else { - yyv17 := &x.Value - yym18 := z.DecBinary() - _ = yym18 + yyv19 := &x.Value + yym20 := z.DecBinary() + _ = yym20 if false { } else { - *((*int)(yyv17)) = int(r.DecodeInt(codecSelferBitsize1234)) + *((*int)(yyv19)) = int(r.DecodeInt(codecSelferBitsize1234)) } } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } diff --git a/vendor/k8s.io/kubernetes/pkg/storage/testing/types.go b/vendor/k8s.io/kubernetes/pkg/storage/testing/types.go index 40ddcb4c..6606f2e8 100644 --- a/vendor/k8s.io/kubernetes/pkg/storage/testing/types.go +++ b/vendor/k8s.io/kubernetes/pkg/storage/testing/types.go @@ -19,13 +19,12 @@ package testing import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" - apiv1 "k8s.io/kubernetes/pkg/api/v1" ) type TestResource struct { - metav1.TypeMeta `json:",inline"` - apiv1.ObjectMeta `json:"metadata"` - Value int `json:"value"` + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata"` + Value int `json:"value"` } func (obj *TestResource) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta } diff --git a/vendor/k8s.io/kubernetes/pkg/storage/watch_cache.go b/vendor/k8s.io/kubernetes/pkg/storage/watch_cache.go index 67b1d869..d55ca261 100644 --- a/vendor/k8s.io/kubernetes/pkg/storage/watch_cache.go +++ b/vendor/k8s.io/kubernetes/pkg/storage/watch_cache.go @@ -25,13 +25,13 @@ import ( "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/util/clock" "k8s.io/kubernetes/pkg/client/cache" - "k8s.io/kubernetes/pkg/fields" "k8s.io/kubernetes/pkg/util" - "k8s.io/kubernetes/pkg/util/clock" ) const ( diff --git a/vendor/k8s.io/kubernetes/pkg/storage/watch_cache_test.go b/vendor/k8s.io/kubernetes/pkg/storage/watch_cache_test.go index 7ce54853..b84e008d 100644 --- a/vendor/k8s.io/kubernetes/pkg/storage/watch_cache_test.go +++ b/vendor/k8s.io/kubernetes/pkg/storage/watch_cache_test.go @@ -23,21 +23,20 @@ import ( "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/util/clock" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/cache" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/util/clock" ) func makeTestPod(name string, resourceVersion uint64) *api.Pod { return &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "ns", Name: name, ResourceVersion: strconv.FormatUint(resourceVersion, 10), @@ -318,14 +317,14 @@ func TestWaitUntilFreshAndListTimeout(t *testing.T) { } type testLW struct { - ListFunc func(options v1.ListOptions) (runtime.Object, error) - WatchFunc func(options v1.ListOptions) (watch.Interface, error) + ListFunc func(options metav1.ListOptions) (runtime.Object, error) + WatchFunc func(options metav1.ListOptions) (watch.Interface, error) } -func (t *testLW) List(options v1.ListOptions) (runtime.Object, error) { +func (t *testLW) List(options metav1.ListOptions) (runtime.Object, error) { return t.ListFunc(options) } -func (t *testLW) Watch(options v1.ListOptions) (watch.Interface, error) { +func (t *testLW) Watch(options metav1.ListOptions) (watch.Interface, error) { return t.WatchFunc(options) } @@ -343,12 +342,12 @@ func TestReflectorForWatchCache(t *testing.T) { } lw := &testLW{ - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { fw := watch.NewFake() go fw.Stop() return fw, nil }, - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { return &api.PodList{ListMeta: metav1.ListMeta{ResourceVersion: "10"}}, nil }, } diff --git a/vendor/k8s.io/kubernetes/pkg/types/.readonly b/vendor/k8s.io/kubernetes/pkg/types/.readonly deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/k8s.io/kubernetes/pkg/types/BUILD b/vendor/k8s.io/kubernetes/pkg/types/BUILD index 38051292..deefdcef 100644 --- a/vendor/k8s.io/kubernetes/pkg/types/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/types/BUILD @@ -9,13 +9,7 @@ load( go_library( name = "go_default_library", - srcs = [ - "doc.go", - "namespacedname.go", - "nodename.go", - "uid.go", - "unix_user_id.go", - ], + srcs = ["doc.go"], tags = ["automanaged"], ) diff --git a/vendor/k8s.io/kubernetes/pkg/types/doc.go b/vendor/k8s.io/kubernetes/pkg/types/doc.go index b2f6f58b..e3822713 100644 --- a/vendor/k8s.io/kubernetes/pkg/types/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/types/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Package types implements various generic types used throughout kubernetes. -package types // import "k8s.io/kubernetes/pkg/types" +// Package types only exists until heapster rebases +// TODO genericapiserver remove this empty package. Godep fails without this because heapster relies +// on this package. This will allow us to start splitting packages, but will force +// heapster to update on their next kube rebase. +package types diff --git a/vendor/k8s.io/kubernetes/pkg/types/namespacedname.go b/vendor/k8s.io/kubernetes/pkg/types/namespacedname.go deleted file mode 100644 index 1e2130da..00000000 --- a/vendor/k8s.io/kubernetes/pkg/types/namespacedname.go +++ /dev/null @@ -1,60 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package types - -import ( - "fmt" - "strings" -) - -// NamespacedName comprises a resource name, with a mandatory namespace, -// rendered as "/". Being a type captures intent and -// helps make sure that UIDs, namespaced names and non-namespaced names -// do not get conflated in code. For most use cases, namespace and name -// will already have been format validated at the API entry point, so we -// don't do that here. Where that's not the case (e.g. in testing), -// consider using NamespacedNameOrDie() in testing.go in this package. - -type NamespacedName struct { - Namespace string - Name string -} - -const ( - Separator = '/' -) - -// String returns the general purpose string representation -func (n NamespacedName) String() string { - return fmt.Sprintf("%s%c%s", n.Namespace, Separator, n.Name) -} - -// NewNamespacedNameFromString parses the provided string and returns a NamespacedName. -// The expected format is as per String() above. -// If the input string is invalid, the returned NamespacedName has all empty string field values. -// This allows a single-value return from this function, while still allowing error checks in the caller. -// Note that an input string which does not include exactly one Separator is not a valid input (as it could never -// have neem returned by String() ) -func NewNamespacedNameFromString(s string) NamespacedName { - nn := NamespacedName{} - result := strings.Split(s, string(Separator)) - if len(result) == 2 { - nn.Namespace = result[0] - nn.Name = result[1] - } - return nn -} diff --git a/vendor/k8s.io/kubernetes/pkg/types/nodename.go b/vendor/k8s.io/kubernetes/pkg/types/nodename.go deleted file mode 100644 index fee348d7..00000000 --- a/vendor/k8s.io/kubernetes/pkg/types/nodename.go +++ /dev/null @@ -1,43 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package types - -// NodeName is a type that holds a api.Node's Name identifier. -// Being a type captures intent and helps make sure that the node name -// is not confused with similar concepts (the hostname, the cloud provider id, -// the cloud provider name etc) -// -// To clarify the various types: -// -// * Node.Name is the Name field of the Node in the API. This should be stored in a NodeName. -// Unfortunately, because Name is part of ObjectMeta, we can't store it as a NodeName at the API level. -// -// * Hostname is the hostname of the local machine (from uname -n). -// However, some components allow the user to pass in a --hostname-override flag, -// which will override this in most places. In the absence of anything more meaningful, -// kubelet will use Hostname as the Node.Name when it creates the Node. -// -// * The cloudproviders have the own names: GCE has InstanceName, AWS has InstanceId. -// -// For GCE, InstanceName is the Name of an Instance object in the GCE API. On GCE, Instance.Name becomes the -// Hostname, and thus it makes sense also to use it as the Node.Name. But that is GCE specific, and it is up -// to the cloudprovider how to do this mapping. -// -// For AWS, the InstanceID is not yet suitable for use as a Node.Name, so we actually use the -// PrivateDnsName for the Node.Name. And this is _not_ always the same as the hostname: if -// we are using a custom DHCP domain it won't be. -type NodeName string diff --git a/vendor/k8s.io/kubernetes/pkg/util/BUILD b/vendor/k8s.io/kubernetes/pkg/util/BUILD index 84e3c2ef..45dbcf9c 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/util/BUILD @@ -49,36 +49,29 @@ filegroup( ":package-srcs", "//pkg/util/async:all-srcs", "//pkg/util/bandwidth:all-srcs", - "//pkg/util/cert:all-srcs", "//pkg/util/chmod:all-srcs", "//pkg/util/chown:all-srcs", - "//pkg/util/clock:all-srcs", "//pkg/util/config:all-srcs", "//pkg/util/configz:all-srcs", "//pkg/util/crlf:all-srcs", "//pkg/util/dbus:all-srcs", - "//pkg/util/diff:all-srcs", "//pkg/util/ebtables:all-srcs", "//pkg/util/env:all-srcs", "//pkg/util/errors:all-srcs", "//pkg/util/exec:all-srcs", "//pkg/util/flag:all-srcs", "//pkg/util/flock:all-srcs", - "//pkg/util/flowcontrol:all-srcs", "//pkg/util/framer:all-srcs", "//pkg/util/goroutinemap:all-srcs", "//pkg/util/hash:all-srcs", - "//pkg/util/homedir:all-srcs", "//pkg/util/httpstream:all-srcs", "//pkg/util/i18n:all-srcs", "//pkg/util/initsystem:all-srcs", - "//pkg/util/integer:all-srcs", "//pkg/util/interrupt:all-srcs", "//pkg/util/intstr:all-srcs", "//pkg/util/io:all-srcs", "//pkg/util/iptables:all-srcs", "//pkg/util/json:all-srcs", - "//pkg/util/jsonpath:all-srcs", "//pkg/util/keymutex:all-srcs", "//pkg/util/labels:all-srcs", "//pkg/util/limitwriter:all-srcs", @@ -104,9 +97,9 @@ filegroup( "//pkg/util/strings:all-srcs", "//pkg/util/sysctl:all-srcs", "//pkg/util/system:all-srcs", + "//pkg/util/tail:all-srcs", "//pkg/util/taints:all-srcs", "//pkg/util/term:all-srcs", - "//pkg/util/testing:all-srcs", "//pkg/util/threading:all-srcs", "//pkg/util/uuid:all-srcs", "//pkg/util/validation:all-srcs", diff --git a/vendor/k8s.io/kubernetes/pkg/util/bandwidth/BUILD b/vendor/k8s.io/kubernetes/pkg/util/bandwidth/BUILD index 7036489b..13584add 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/bandwidth/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/util/bandwidth/BUILD @@ -38,6 +38,7 @@ go_test( "//pkg/api:go_default_library", "//pkg/api/resource:go_default_library", "//pkg/util/exec:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/util/bandwidth/utils_test.go b/vendor/k8s.io/kubernetes/pkg/util/bandwidth/utils_test.go index 48696f40..be572db7 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/bandwidth/utils_test.go +++ b/vendor/k8s.io/kubernetes/pkg/util/bandwidth/utils_test.go @@ -20,6 +20,7 @@ import ( "reflect" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/resource" ) @@ -30,7 +31,7 @@ func TestExtractPodBandwidthResources(t *testing.T) { twenty, _ := resource.ParseQuantity("20M") testPod := func(ingress, egress string) *api.Pod { - pod := &api.Pod{ObjectMeta: api.ObjectMeta{Annotations: map[string]string{}}} + pod := &api.Pod{ObjectMeta: metav1.ObjectMeta{Annotations: map[string]string{}}} if len(ingress) != 0 { pod.Annotations["kubernetes.io/ingress-bandwidth"] = ingress } diff --git a/vendor/k8s.io/kubernetes/pkg/util/cert/BUILD b/vendor/k8s.io/kubernetes/pkg/util/cert/BUILD deleted file mode 100644 index 30a8d2ca..00000000 --- a/vendor/k8s.io/kubernetes/pkg/util/cert/BUILD +++ /dev/null @@ -1,46 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = [ - "cert.go", - "csr.go", - "io.go", - "pem.go", - ], - tags = ["automanaged"], -) - -go_test( - name = "go_default_test", - srcs = ["csr_test.go"], - data = [ - "testdata/dontUseThisKey.pem", - ], - library = ":go_default_library", - tags = ["automanaged"], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//pkg/util/cert/triple:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/vendor/k8s.io/kubernetes/pkg/util/config/feature_gate.go b/vendor/k8s.io/kubernetes/pkg/util/config/feature_gate.go index ff90f2fb..ea01833f 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/config/feature_gate.go +++ b/vendor/k8s.io/kubernetes/pkg/util/config/feature_gate.go @@ -61,7 +61,7 @@ var ( appArmor: {true, beta}, dynamicKubeletConfig: {false, alpha}, dynamicVolumeProvisioning: {true, alpha}, - streamingProxyRedirects: {false, alpha}, + streamingProxyRedirects: {true, beta}, experimentalHostUserNamespaceDefaultingGate: {false, alpha}, } diff --git a/vendor/k8s.io/kubernetes/pkg/util/diff/.readonly b/vendor/k8s.io/kubernetes/pkg/util/diff/.readonly deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/k8s.io/kubernetes/pkg/util/diff/diff.go b/vendor/k8s.io/kubernetes/pkg/util/diff/diff.go deleted file mode 100644 index cf7b97a9..00000000 --- a/vendor/k8s.io/kubernetes/pkg/util/diff/diff.go +++ /dev/null @@ -1,280 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package diff - -import ( - "bytes" - "encoding/json" - "fmt" - "reflect" - "sort" - "strings" - "text/tabwriter" - - "github.com/davecgh/go-spew/spew" - - "k8s.io/kubernetes/pkg/util/validation/field" -) - -// StringDiff diffs a and b and returns a human readable diff. -func StringDiff(a, b string) string { - ba := []byte(a) - bb := []byte(b) - out := []byte{} - i := 0 - for ; i < len(ba) && i < len(bb); i++ { - if ba[i] != bb[i] { - break - } - out = append(out, ba[i]) - } - out = append(out, []byte("\n\nA: ")...) - out = append(out, ba[i:]...) - out = append(out, []byte("\n\nB: ")...) - out = append(out, bb[i:]...) - out = append(out, []byte("\n\n")...) - return string(out) -} - -// ObjectDiff writes the two objects out as JSON and prints out the identical part of -// the objects followed by the remaining part of 'a' and finally the remaining part of 'b'. -// For debugging tests. -func ObjectDiff(a, b interface{}) string { - ab, err := json.Marshal(a) - if err != nil { - panic(fmt.Sprintf("a: %v", err)) - } - bb, err := json.Marshal(b) - if err != nil { - panic(fmt.Sprintf("b: %v", err)) - } - return StringDiff(string(ab), string(bb)) -} - -// ObjectGoPrintDiff is like ObjectDiff, but uses go-spew to print the objects, -// which shows absolutely everything by recursing into every single pointer -// (go's %#v formatters OTOH stop at a certain point). This is needed when you -// can't figure out why reflect.DeepEqual is returning false and nothing is -// showing you differences. This will. -func ObjectGoPrintDiff(a, b interface{}) string { - s := spew.ConfigState{DisableMethods: true} - return StringDiff( - s.Sprintf("%#v", a), - s.Sprintf("%#v", b), - ) -} - -func ObjectReflectDiff(a, b interface{}) string { - vA, vB := reflect.ValueOf(a), reflect.ValueOf(b) - if vA.Type() != vB.Type() { - return fmt.Sprintf("type A %T and type B %T do not match", a, b) - } - diffs := objectReflectDiff(field.NewPath("object"), vA, vB) - if len(diffs) == 0 { - return "" - } - out := []string{""} - for _, d := range diffs { - out = append(out, - fmt.Sprintf("%s:", d.path), - limit(fmt.Sprintf(" a: %#v", d.a), 80), - limit(fmt.Sprintf(" b: %#v", d.b), 80), - ) - } - return strings.Join(out, "\n") -} - -func limit(s string, max int) string { - if len(s) > max { - return s[:max] - } - return s -} - -func public(s string) bool { - if len(s) == 0 { - return false - } - return s[:1] == strings.ToUpper(s[:1]) -} - -type diff struct { - path *field.Path - a, b interface{} -} - -type orderedDiffs []diff - -func (d orderedDiffs) Len() int { return len(d) } -func (d orderedDiffs) Swap(i, j int) { d[i], d[j] = d[j], d[i] } -func (d orderedDiffs) Less(i, j int) bool { - a, b := d[i].path.String(), d[j].path.String() - if a < b { - return true - } - return false -} - -func objectReflectDiff(path *field.Path, a, b reflect.Value) []diff { - switch a.Type().Kind() { - case reflect.Struct: - var changes []diff - for i := 0; i < a.Type().NumField(); i++ { - if !public(a.Type().Field(i).Name) { - if reflect.DeepEqual(a.Interface(), b.Interface()) { - continue - } - return []diff{{path: path, a: fmt.Sprintf("%#v", a), b: fmt.Sprintf("%#v", b)}} - } - if sub := objectReflectDiff(path.Child(a.Type().Field(i).Name), a.Field(i), b.Field(i)); len(sub) > 0 { - changes = append(changes, sub...) - } else { - if !reflect.DeepEqual(a.Field(i).Interface(), b.Field(i).Interface()) { - changes = append(changes, diff{path: path, a: a.Field(i).Interface(), b: b.Field(i).Interface()}) - } - } - } - return changes - case reflect.Ptr, reflect.Interface: - if a.IsNil() || b.IsNil() { - switch { - case a.IsNil() && b.IsNil(): - return nil - case a.IsNil(): - return []diff{{path: path, a: nil, b: b.Interface()}} - default: - return []diff{{path: path, a: a.Interface(), b: nil}} - } - } - return objectReflectDiff(path, a.Elem(), b.Elem()) - case reflect.Chan: - if !reflect.DeepEqual(a.Interface(), b.Interface()) { - return []diff{{path: path, a: a.Interface(), b: b.Interface()}} - } - return nil - case reflect.Slice: - lA, lB := a.Len(), b.Len() - l := lA - if lB < lA { - l = lB - } - if lA == lB && lA == 0 { - if a.IsNil() != b.IsNil() { - return []diff{{path: path, a: a.Interface(), b: b.Interface()}} - } - return nil - } - for i := 0; i < l; i++ { - if !reflect.DeepEqual(a.Index(i), b.Index(i)) { - return objectReflectDiff(path.Index(i), a.Index(i), b.Index(i)) - } - } - var diffs []diff - for i := l; i < lA; i++ { - diffs = append(diffs, diff{path: path.Index(i), a: a.Index(i), b: nil}) - } - for i := l; i < lB; i++ { - diffs = append(diffs, diff{path: path.Index(i), a: nil, b: b.Index(i)}) - } - if len(diffs) == 0 { - diffs = append(diffs, diff{path: path, a: a, b: b}) - } - return diffs - case reflect.Map: - if reflect.DeepEqual(a.Interface(), b.Interface()) { - return nil - } - aKeys := make(map[interface{}]interface{}) - for _, key := range a.MapKeys() { - aKeys[key.Interface()] = a.MapIndex(key).Interface() - } - var missing []diff - for _, key := range b.MapKeys() { - if _, ok := aKeys[key.Interface()]; ok { - delete(aKeys, key.Interface()) - if reflect.DeepEqual(a.MapIndex(key).Interface(), b.MapIndex(key).Interface()) { - continue - } - missing = append(missing, objectReflectDiff(path.Key(fmt.Sprintf("%s", key.Interface())), a.MapIndex(key), b.MapIndex(key))...) - continue - } - missing = append(missing, diff{path: path.Key(fmt.Sprintf("%s", key.Interface())), a: nil, b: b.MapIndex(key).Interface()}) - } - for key, value := range aKeys { - missing = append(missing, diff{path: path.Key(fmt.Sprintf("%s", key)), a: value, b: nil}) - } - if len(missing) == 0 { - missing = append(missing, diff{path: path, a: a.Interface(), b: b.Interface()}) - } - sort.Sort(orderedDiffs(missing)) - return missing - default: - if reflect.DeepEqual(a.Interface(), b.Interface()) { - return nil - } - if !a.CanInterface() { - return []diff{{path: path, a: fmt.Sprintf("%#v", a), b: fmt.Sprintf("%#v", b)}} - } - return []diff{{path: path, a: a.Interface(), b: b.Interface()}} - } -} - -// ObjectGoPrintSideBySide prints a and b as textual dumps side by side, -// enabling easy visual scanning for mismatches. -func ObjectGoPrintSideBySide(a, b interface{}) string { - s := spew.ConfigState{ - Indent: " ", - // Extra deep spew. - DisableMethods: true, - } - sA := s.Sdump(a) - sB := s.Sdump(b) - - linesA := strings.Split(sA, "\n") - linesB := strings.Split(sB, "\n") - width := 0 - for _, s := range linesA { - l := len(s) - if l > width { - width = l - } - } - for _, s := range linesB { - l := len(s) - if l > width { - width = l - } - } - buf := &bytes.Buffer{} - w := tabwriter.NewWriter(buf, width, 0, 1, ' ', 0) - max := len(linesA) - if len(linesB) > max { - max = len(linesB) - } - for i := 0; i < max; i++ { - var a, b string - if i < len(linesA) { - a = linesA[i] - } - if i < len(linesB) { - b = linesB[i] - } - fmt.Fprintf(w, "%s\t%s\n", a, b) - } - w.Flush() - return buf.String() -} diff --git a/vendor/k8s.io/kubernetes/pkg/util/diff/diff_test.go b/vendor/k8s.io/kubernetes/pkg/util/diff/diff_test.go deleted file mode 100644 index 1f3fcb34..00000000 --- a/vendor/k8s.io/kubernetes/pkg/util/diff/diff_test.go +++ /dev/null @@ -1,88 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package diff - -import ( - "testing" -) - -func TestObjectReflectDiff(t *testing.T) { - type struct1 struct{ A []int } - - testCases := map[string]struct { - a, b interface{} - out string - }{ - "map": { - a: map[string]int{}, - b: map[string]int{}, - }, - "detect nil map": { - a: map[string]int(nil), - b: map[string]int{}, - out: ` -object: - a: map[string]int(nil) - b: map[string]int{}`, - }, - "detect map changes": { - a: map[string]int{"test": 1, "other": 2}, - b: map[string]int{"test": 2, "third": 3}, - out: ` -object[other]: - a: 2 - b: -object[test]: - a: 1 - b: 2 -object[third]: - a: - b: 3`, - }, - "nil slice": {a: struct1{A: nil}, b: struct1{A: nil}}, - "empty slice": {a: struct1{A: []int{}}, b: struct1{A: []int{}}}, - "detect slice changes 1": {a: struct1{A: []int{1}}, b: struct1{A: []int{2}}, out: ` -object.A[0]: - a: 1 - b: 2`, - }, - "detect slice changes 2": {a: struct1{A: []int{}}, b: struct1{A: []int{2}}, out: ` -object.A[0]: - a: - b: 2`, - }, - "detect slice changes 3": {a: struct1{A: []int{1}}, b: struct1{A: []int{}}, out: ` -object.A[0]: - a: 1 - b: `, - }, - "detect nil vs empty slices": {a: struct1{A: nil}, b: struct1{A: []int{}}, out: ` -object.A: - a: []int(nil) - b: []int{}`, - }, - } - for name, test := range testCases { - expect := test.out - if len(expect) == 0 { - expect = "" - } - if actual := ObjectReflectDiff(test.a, test.b); actual != expect { - t.Errorf("%s: unexpected output: %s", name, actual) - } - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/util/errors/.readonly b/vendor/k8s.io/kubernetes/pkg/util/errors/.readonly deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/k8s.io/kubernetes/pkg/util/errors/BUILD b/vendor/k8s.io/kubernetes/pkg/util/errors/BUILD index 82b83b04..deefdcef 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/errors/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/util/errors/BUILD @@ -5,22 +5,11 @@ licenses(["notice"]) load( "@io_bazel_rules_go//go:def.bzl", "go_library", - "go_test", ) go_library( name = "go_default_library", - srcs = [ - "doc.go", - "errors.go", - ], - tags = ["automanaged"], -) - -go_test( - name = "go_default_test", - srcs = ["errors_test.go"], - library = ":go_default_library", + srcs = ["doc.go"], tags = ["automanaged"], ) diff --git a/vendor/k8s.io/kubernetes/pkg/util/errors/doc.go b/vendor/k8s.io/kubernetes/pkg/util/errors/doc.go index 9590c0d2..38d26161 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/errors/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/util/errors/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Package errors implements various utility functions and types around errors. -package errors // import "k8s.io/kubernetes/pkg/util/errors" +// Package errors only exists until heapster rebases +// TODO genericapiserver remove this empty package. Godep fails without this because heapster relies +// on this package. This will allow us to start splitting packages, but will force +// heapster to update on their next kube rebase. +package errors diff --git a/vendor/k8s.io/kubernetes/pkg/util/errors/errors.go b/vendor/k8s.io/kubernetes/pkg/util/errors/errors.go deleted file mode 100644 index de62fe39..00000000 --- a/vendor/k8s.io/kubernetes/pkg/util/errors/errors.go +++ /dev/null @@ -1,182 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package errors - -import ( - "errors" - "fmt" -) - -// Aggregate represents an object that contains multiple errors, but does not -// necessarily have singular semantic meaning. -type Aggregate interface { - error - Errors() []error -} - -// NewAggregate converts a slice of errors into an Aggregate interface, which -// is itself an implementation of the error interface. If the slice is empty, -// this returns nil. -// It will check if any of the element of input error list is nil, to avoid -// nil pointer panic when call Error(). -func NewAggregate(errlist []error) Aggregate { - if len(errlist) == 0 { - return nil - } - // In case of input error list contains nil - var errs []error - for _, e := range errlist { - if e != nil { - errs = append(errs, e) - } - } - if len(errs) == 0 { - return nil - } - return aggregate(errs) -} - -// This helper implements the error and Errors interfaces. Keeping it private -// prevents people from making an aggregate of 0 errors, which is not -// an error, but does satisfy the error interface. -type aggregate []error - -// Error is part of the error interface. -func (agg aggregate) Error() string { - if len(agg) == 0 { - // This should never happen, really. - return "" - } - if len(agg) == 1 { - return agg[0].Error() - } - result := fmt.Sprintf("[%s", agg[0].Error()) - for i := 1; i < len(agg); i++ { - result += fmt.Sprintf(", %s", agg[i].Error()) - } - result += "]" - return result -} - -// Errors is part of the Aggregate interface. -func (agg aggregate) Errors() []error { - return []error(agg) -} - -// Matcher is used to match errors. Returns true if the error matches. -type Matcher func(error) bool - -// FilterOut removes all errors that match any of the matchers from the input -// error. If the input is a singular error, only that error is tested. If the -// input implements the Aggregate interface, the list of errors will be -// processed recursively. -// -// This can be used, for example, to remove known-OK errors (such as io.EOF or -// os.PathNotFound) from a list of errors. -func FilterOut(err error, fns ...Matcher) error { - if err == nil { - return nil - } - if agg, ok := err.(Aggregate); ok { - return NewAggregate(filterErrors(agg.Errors(), fns...)) - } - if !matchesError(err, fns...) { - return err - } - return nil -} - -// matchesError returns true if any Matcher returns true -func matchesError(err error, fns ...Matcher) bool { - for _, fn := range fns { - if fn(err) { - return true - } - } - return false -} - -// filterErrors returns any errors (or nested errors, if the list contains -// nested Errors) for which all fns return false. If no errors -// remain a nil list is returned. The resulting silec will have all -// nested slices flattened as a side effect. -func filterErrors(list []error, fns ...Matcher) []error { - result := []error{} - for _, err := range list { - r := FilterOut(err, fns...) - if r != nil { - result = append(result, r) - } - } - return result -} - -// Flatten takes an Aggregate, which may hold other Aggregates in arbitrary -// nesting, and flattens them all into a single Aggregate, recursively. -func Flatten(agg Aggregate) Aggregate { - result := []error{} - if agg == nil { - return nil - } - for _, err := range agg.Errors() { - if a, ok := err.(Aggregate); ok { - r := Flatten(a) - if r != nil { - result = append(result, r.Errors()...) - } - } else { - if err != nil { - result = append(result, err) - } - } - } - return NewAggregate(result) -} - -// Reduce will return err or, if err is an Aggregate and only has one item, -// the first item in the aggregate. -func Reduce(err error) error { - if agg, ok := err.(Aggregate); ok && err != nil { - switch len(agg.Errors()) { - case 1: - return agg.Errors()[0] - case 0: - return nil - } - } - return err -} - -// AggregateGoroutines runs the provided functions in parallel, stuffing all -// non-nil errors into the returned Aggregate. -// Returns nil if all the functions complete successfully. -func AggregateGoroutines(funcs ...func() error) Aggregate { - errChan := make(chan error, len(funcs)) - for _, f := range funcs { - go func(f func() error) { errChan <- f() }(f) - } - errs := make([]error, 0) - for i := 0; i < cap(errChan); i++ { - if err := <-errChan; err != nil { - errs = append(errs, err) - } - } - return NewAggregate(errs) -} - -// ErrPreconditionViolated is returned when the precondition is violated -var ErrPreconditionViolated = errors.New("precondition is violated") diff --git a/vendor/k8s.io/kubernetes/pkg/util/errors/errors_test.go b/vendor/k8s.io/kubernetes/pkg/util/errors/errors_test.go deleted file mode 100644 index f453e570..00000000 --- a/vendor/k8s.io/kubernetes/pkg/util/errors/errors_test.go +++ /dev/null @@ -1,326 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package errors - -import ( - "fmt" - "reflect" - "testing" -) - -func TestEmptyAggregate(t *testing.T) { - var slice []error - var agg Aggregate - var err error - - agg = NewAggregate(slice) - if agg != nil { - t.Errorf("expected nil, got %#v", agg) - } - err = NewAggregate(slice) - if err != nil { - t.Errorf("expected nil, got %#v", err) - } - - // This is not normally possible, but pedantry demands I test it. - agg = aggregate(slice) // empty aggregate - if s := agg.Error(); s != "" { - t.Errorf("expected empty string, got %q", s) - } - if s := agg.Errors(); len(s) != 0 { - t.Errorf("expected empty slice, got %#v", s) - } - err = agg.(error) - if s := err.Error(); s != "" { - t.Errorf("expected empty string, got %q", s) - } -} - -func TestAggregateWithNil(t *testing.T) { - var slice []error - slice = []error{nil} - var agg Aggregate - var err error - - agg = NewAggregate(slice) - if agg != nil { - t.Errorf("expected nil, got %#v", agg) - } - err = NewAggregate(slice) - if err != nil { - t.Errorf("expected nil, got %#v", err) - } - - // Append a non-nil error - slice = append(slice, fmt.Errorf("err")) - agg = NewAggregate(slice) - if agg == nil { - t.Errorf("expected non-nil") - } - if s := agg.Error(); s != "err" { - t.Errorf("expected 'err', got %q", s) - } - if s := agg.Errors(); len(s) != 1 { - t.Errorf("expected one-element slice, got %#v", s) - } - if s := agg.Errors()[0].Error(); s != "err" { - t.Errorf("expected 'err', got %q", s) - } - - err = agg.(error) - if err == nil { - t.Errorf("expected non-nil") - } - if s := err.Error(); s != "err" { - t.Errorf("expected 'err', got %q", s) - } -} - -func TestSingularAggregate(t *testing.T) { - var slice []error = []error{fmt.Errorf("err")} - var agg Aggregate - var err error - - agg = NewAggregate(slice) - if agg == nil { - t.Errorf("expected non-nil") - } - if s := agg.Error(); s != "err" { - t.Errorf("expected 'err', got %q", s) - } - if s := agg.Errors(); len(s) != 1 { - t.Errorf("expected one-element slice, got %#v", s) - } - if s := agg.Errors()[0].Error(); s != "err" { - t.Errorf("expected 'err', got %q", s) - } - - err = agg.(error) - if err == nil { - t.Errorf("expected non-nil") - } - if s := err.Error(); s != "err" { - t.Errorf("expected 'err', got %q", s) - } -} - -func TestPluralAggregate(t *testing.T) { - var slice []error = []error{fmt.Errorf("abc"), fmt.Errorf("123")} - var agg Aggregate - var err error - - agg = NewAggregate(slice) - if agg == nil { - t.Errorf("expected non-nil") - } - if s := agg.Error(); s != "[abc, 123]" { - t.Errorf("expected '[abc, 123]', got %q", s) - } - if s := agg.Errors(); len(s) != 2 { - t.Errorf("expected two-elements slice, got %#v", s) - } - if s := agg.Errors()[0].Error(); s != "abc" { - t.Errorf("expected '[abc, 123]', got %q", s) - } - - err = agg.(error) - if err == nil { - t.Errorf("expected non-nil") - } - if s := err.Error(); s != "[abc, 123]" { - t.Errorf("expected '[abc, 123]', got %q", s) - } -} - -func TestFilterOut(t *testing.T) { - testCases := []struct { - err error - filter []Matcher - expected error - }{ - { - nil, - []Matcher{}, - nil, - }, - { - aggregate{}, - []Matcher{}, - nil, - }, - { - aggregate{fmt.Errorf("abc")}, - []Matcher{}, - aggregate{fmt.Errorf("abc")}, - }, - { - aggregate{fmt.Errorf("abc")}, - []Matcher{func(err error) bool { return false }}, - aggregate{fmt.Errorf("abc")}, - }, - { - aggregate{fmt.Errorf("abc")}, - []Matcher{func(err error) bool { return true }}, - nil, - }, - { - aggregate{fmt.Errorf("abc")}, - []Matcher{func(err error) bool { return false }, func(err error) bool { return false }}, - aggregate{fmt.Errorf("abc")}, - }, - { - aggregate{fmt.Errorf("abc")}, - []Matcher{func(err error) bool { return false }, func(err error) bool { return true }}, - nil, - }, - { - aggregate{fmt.Errorf("abc"), fmt.Errorf("def"), fmt.Errorf("ghi")}, - []Matcher{func(err error) bool { return err.Error() == "def" }}, - aggregate{fmt.Errorf("abc"), fmt.Errorf("ghi")}, - }, - { - aggregate{aggregate{fmt.Errorf("abc")}}, - []Matcher{}, - aggregate{aggregate{fmt.Errorf("abc")}}, - }, - { - aggregate{aggregate{fmt.Errorf("abc"), aggregate{fmt.Errorf("def")}}}, - []Matcher{}, - aggregate{aggregate{fmt.Errorf("abc"), aggregate{fmt.Errorf("def")}}}, - }, - { - aggregate{aggregate{fmt.Errorf("abc"), aggregate{fmt.Errorf("def")}}}, - []Matcher{func(err error) bool { return err.Error() == "def" }}, - aggregate{aggregate{fmt.Errorf("abc")}}, - }, - } - for i, testCase := range testCases { - err := FilterOut(testCase.err, testCase.filter...) - if !reflect.DeepEqual(testCase.expected, err) { - t.Errorf("%d: expected %v, got %v", i, testCase.expected, err) - } - } -} - -func TestFlatten(t *testing.T) { - testCases := []struct { - agg Aggregate - expected Aggregate - }{ - { - nil, - nil, - }, - { - aggregate{}, - nil, - }, - { - aggregate{fmt.Errorf("abc")}, - aggregate{fmt.Errorf("abc")}, - }, - { - aggregate{fmt.Errorf("abc"), fmt.Errorf("def"), fmt.Errorf("ghi")}, - aggregate{fmt.Errorf("abc"), fmt.Errorf("def"), fmt.Errorf("ghi")}, - }, - { - aggregate{aggregate{fmt.Errorf("abc")}}, - aggregate{fmt.Errorf("abc")}, - }, - { - aggregate{aggregate{aggregate{fmt.Errorf("abc")}}}, - aggregate{fmt.Errorf("abc")}, - }, - { - aggregate{aggregate{fmt.Errorf("abc"), aggregate{fmt.Errorf("def")}}}, - aggregate{fmt.Errorf("abc"), fmt.Errorf("def")}, - }, - { - aggregate{aggregate{aggregate{fmt.Errorf("abc")}, fmt.Errorf("def"), aggregate{fmt.Errorf("ghi")}}}, - aggregate{fmt.Errorf("abc"), fmt.Errorf("def"), fmt.Errorf("ghi")}, - }, - } - for i, testCase := range testCases { - agg := Flatten(testCase.agg) - if !reflect.DeepEqual(testCase.expected, agg) { - t.Errorf("%d: expected %v, got %v", i, testCase.expected, agg) - } - } -} - -func TestAggregateGoroutines(t *testing.T) { - testCases := []struct { - errs []error - expected map[string]bool // can't compare directly to Aggregate due to non-deterministic ordering - }{ - { - []error{}, - nil, - }, - { - []error{nil}, - nil, - }, - { - []error{nil, nil}, - nil, - }, - { - []error{fmt.Errorf("1")}, - map[string]bool{"1": true}, - }, - { - []error{fmt.Errorf("1"), nil}, - map[string]bool{"1": true}, - }, - { - []error{fmt.Errorf("1"), fmt.Errorf("267")}, - map[string]bool{"1": true, "267": true}, - }, - { - []error{fmt.Errorf("1"), nil, fmt.Errorf("1234")}, - map[string]bool{"1": true, "1234": true}, - }, - { - []error{nil, fmt.Errorf("1"), nil, fmt.Errorf("1234"), fmt.Errorf("22")}, - map[string]bool{"1": true, "1234": true, "22": true}, - }, - } - for i, testCase := range testCases { - funcs := make([]func() error, len(testCase.errs)) - for i := range testCase.errs { - err := testCase.errs[i] - funcs[i] = func() error { return err } - } - agg := AggregateGoroutines(funcs...) - if agg == nil { - if len(testCase.expected) > 0 { - t.Errorf("%d: expected %v, got nil", i, testCase.expected) - } - continue - } - if len(agg.Errors()) != len(testCase.expected) { - t.Errorf("%d: expected %d errors in aggregate, got %v", i, len(testCase.expected), agg) - continue - } - for _, err := range agg.Errors() { - if !testCase.expected[err.Error()] { - t.Errorf("%d: expected %v, got aggregate containing %v", i, testCase.expected, err) - } - } - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/util/flowcontrol/BUILD b/vendor/k8s.io/kubernetes/pkg/util/flowcontrol/BUILD deleted file mode 100644 index bac27709..00000000 --- a/vendor/k8s.io/kubernetes/pkg/util/flowcontrol/BUILD +++ /dev/null @@ -1,47 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = [ - "backoff.go", - "throttle.go", - ], - tags = ["automanaged"], - deps = [ - "//pkg/util/clock:go_default_library", - "//pkg/util/integer:go_default_library", - "//vendor:github.com/juju/ratelimit", - ], -) - -go_test( - name = "go_default_test", - srcs = [ - "backoff_test.go", - "throttle_test.go", - ], - library = ":go_default_library", - tags = ["automanaged"], - deps = ["//pkg/util/clock:go_default_library"], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/vendor/k8s.io/kubernetes/pkg/util/flowcontrol/backoff.go b/vendor/k8s.io/kubernetes/pkg/util/flowcontrol/backoff.go deleted file mode 100644 index 2d91cc5e..00000000 --- a/vendor/k8s.io/kubernetes/pkg/util/flowcontrol/backoff.go +++ /dev/null @@ -1,149 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package flowcontrol - -import ( - "sync" - "time" - - "k8s.io/kubernetes/pkg/util/clock" - "k8s.io/kubernetes/pkg/util/integer" -) - -type backoffEntry struct { - backoff time.Duration - lastUpdate time.Time -} - -type Backoff struct { - sync.Mutex - Clock clock.Clock - defaultDuration time.Duration - maxDuration time.Duration - perItemBackoff map[string]*backoffEntry -} - -func NewFakeBackOff(initial, max time.Duration, tc *clock.FakeClock) *Backoff { - return &Backoff{ - perItemBackoff: map[string]*backoffEntry{}, - Clock: tc, - defaultDuration: initial, - maxDuration: max, - } -} - -func NewBackOff(initial, max time.Duration) *Backoff { - return &Backoff{ - perItemBackoff: map[string]*backoffEntry{}, - Clock: clock.RealClock{}, - defaultDuration: initial, - maxDuration: max, - } -} - -// Get the current backoff Duration -func (p *Backoff) Get(id string) time.Duration { - p.Lock() - defer p.Unlock() - var delay time.Duration - entry, ok := p.perItemBackoff[id] - if ok { - delay = entry.backoff - } - return delay -} - -// move backoff to the next mark, capping at maxDuration -func (p *Backoff) Next(id string, eventTime time.Time) { - p.Lock() - defer p.Unlock() - entry, ok := p.perItemBackoff[id] - if !ok || hasExpired(eventTime, entry.lastUpdate, p.maxDuration) { - entry = p.initEntryUnsafe(id) - } else { - delay := entry.backoff * 2 // exponential - entry.backoff = time.Duration(integer.Int64Min(int64(delay), int64(p.maxDuration))) - } - entry.lastUpdate = p.Clock.Now() -} - -// Reset forces clearing of all backoff data for a given key. -func (p *Backoff) Reset(id string) { - p.Lock() - defer p.Unlock() - delete(p.perItemBackoff, id) -} - -// Returns True if the elapsed time since eventTime is smaller than the current backoff window -func (p *Backoff) IsInBackOffSince(id string, eventTime time.Time) bool { - p.Lock() - defer p.Unlock() - entry, ok := p.perItemBackoff[id] - if !ok { - return false - } - if hasExpired(eventTime, entry.lastUpdate, p.maxDuration) { - return false - } - return p.Clock.Now().Sub(eventTime) < entry.backoff -} - -// Returns True if time since lastupdate is less than the current backoff window. -func (p *Backoff) IsInBackOffSinceUpdate(id string, eventTime time.Time) bool { - p.Lock() - defer p.Unlock() - entry, ok := p.perItemBackoff[id] - if !ok { - return false - } - if hasExpired(eventTime, entry.lastUpdate, p.maxDuration) { - return false - } - return eventTime.Sub(entry.lastUpdate) < entry.backoff -} - -// Garbage collect records that have aged past maxDuration. Backoff users are expected -// to invoke this periodically. -func (p *Backoff) GC() { - p.Lock() - defer p.Unlock() - now := p.Clock.Now() - for id, entry := range p.perItemBackoff { - if now.Sub(entry.lastUpdate) > p.maxDuration*2 { - // GC when entry has not been updated for 2*maxDuration - delete(p.perItemBackoff, id) - } - } -} - -func (p *Backoff) DeleteEntry(id string) { - p.Lock() - defer p.Unlock() - delete(p.perItemBackoff, id) -} - -// Take a lock on *Backoff, before calling initEntryUnsafe -func (p *Backoff) initEntryUnsafe(id string) *backoffEntry { - entry := &backoffEntry{backoff: p.defaultDuration} - p.perItemBackoff[id] = entry - return entry -} - -// After 2*maxDuration we restart the backoff factor to the beginning -func hasExpired(eventTime time.Time, lastUpdate time.Time, maxDuration time.Duration) bool { - return eventTime.Sub(lastUpdate) > maxDuration*2 // consider stable if it's ok for twice the maxDuration -} diff --git a/vendor/k8s.io/kubernetes/pkg/util/framer/.readonly b/vendor/k8s.io/kubernetes/pkg/util/framer/.readonly deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/k8s.io/kubernetes/pkg/util/framer/BUILD b/vendor/k8s.io/kubernetes/pkg/util/framer/BUILD index c0aedc66..deefdcef 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/framer/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/util/framer/BUILD @@ -5,19 +5,11 @@ licenses(["notice"]) load( "@io_bazel_rules_go//go:def.bzl", "go_library", - "go_test", ) go_library( name = "go_default_library", - srcs = ["framer.go"], - tags = ["automanaged"], -) - -go_test( - name = "go_default_test", - srcs = ["framer_test.go"], - library = ":go_default_library", + srcs = ["doc.go"], tags = ["automanaged"], ) diff --git a/vendor/k8s.io/kubernetes/pkg/util/framer/doc.go b/vendor/k8s.io/kubernetes/pkg/util/framer/doc.go new file mode 100644 index 00000000..168acea0 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/util/framer/doc.go @@ -0,0 +1,21 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package framer only exists until heapster rebases +// TODO genericapiserver remove this empty package. Godep fails without this because heapster relies +// on this package. This will allow us to start splitting packages, but will force +// heapster to update on their next kube rebase. +package framer diff --git a/vendor/k8s.io/kubernetes/pkg/util/framer/framer.go b/vendor/k8s.io/kubernetes/pkg/util/framer/framer.go deleted file mode 100644 index 066680f4..00000000 --- a/vendor/k8s.io/kubernetes/pkg/util/framer/framer.go +++ /dev/null @@ -1,167 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Package framer implements simple frame decoding techniques for an io.ReadCloser -package framer - -import ( - "encoding/binary" - "encoding/json" - "io" -) - -type lengthDelimitedFrameWriter struct { - w io.Writer - h [4]byte -} - -func NewLengthDelimitedFrameWriter(w io.Writer) io.Writer { - return &lengthDelimitedFrameWriter{w: w} -} - -// Write writes a single frame to the nested writer, prepending it with the length in -// in bytes of data (as a 4 byte, bigendian uint32). -func (w *lengthDelimitedFrameWriter) Write(data []byte) (int, error) { - binary.BigEndian.PutUint32(w.h[:], uint32(len(data))) - n, err := w.w.Write(w.h[:]) - if err != nil { - return 0, err - } - if n != len(w.h) { - return 0, io.ErrShortWrite - } - return w.w.Write(data) -} - -type lengthDelimitedFrameReader struct { - r io.ReadCloser - remaining int -} - -// NewLengthDelimitedFrameReader returns an io.Reader that will decode length-prefixed -// frames off of a stream. -// -// The protocol is: -// -// stream: message ... -// message: prefix body -// prefix: 4 byte uint32 in BigEndian order, denotes length of body -// body: bytes (0..prefix) -// -// If the buffer passed to Read is not long enough to contain an entire frame, io.ErrShortRead -// will be returned along with the number of bytes read. -func NewLengthDelimitedFrameReader(r io.ReadCloser) io.ReadCloser { - return &lengthDelimitedFrameReader{r: r} -} - -// Read attempts to read an entire frame into data. If that is not possible, io.ErrShortBuffer -// is returned and subsequent calls will attempt to read the last frame. A frame is complete when -// err is nil. -func (r *lengthDelimitedFrameReader) Read(data []byte) (int, error) { - if r.remaining <= 0 { - header := [4]byte{} - n, err := io.ReadAtLeast(r.r, header[:4], 4) - if err != nil { - return 0, err - } - if n != 4 { - return 0, io.ErrUnexpectedEOF - } - frameLength := int(binary.BigEndian.Uint32(header[:])) - r.remaining = frameLength - } - - expect := r.remaining - max := expect - if max > len(data) { - max = len(data) - } - n, err := io.ReadAtLeast(r.r, data[:max], int(max)) - r.remaining -= n - if err == io.ErrShortBuffer || r.remaining > 0 { - return n, io.ErrShortBuffer - } - if err != nil { - return n, err - } - if n != expect { - return n, io.ErrUnexpectedEOF - } - - return n, nil -} - -func (r *lengthDelimitedFrameReader) Close() error { - return r.r.Close() -} - -type jsonFrameReader struct { - r io.ReadCloser - decoder *json.Decoder - remaining []byte -} - -// NewJSONFramedReader returns an io.Reader that will decode individual JSON objects off -// of a wire. -// -// The boundaries between each frame are valid JSON objects. A JSON parsing error will terminate -// the read. -func NewJSONFramedReader(r io.ReadCloser) io.ReadCloser { - return &jsonFrameReader{ - r: r, - decoder: json.NewDecoder(r), - } -} - -// ReadFrame decodes the next JSON object in the stream, or returns an error. The returned -// byte slice will be modified the next time ReadFrame is invoked and should not be altered. -func (r *jsonFrameReader) Read(data []byte) (int, error) { - // Return whatever remaining data exists from an in progress frame - if n := len(r.remaining); n > 0 { - if n <= len(data) { - data = append(data[0:0], r.remaining...) - r.remaining = nil - return n, nil - } - - n = len(data) - data = append(data[0:0], r.remaining[:n]...) - r.remaining = r.remaining[n:] - return n, io.ErrShortBuffer - } - - // RawMessage#Unmarshal appends to data - we reset the slice down to 0 and will either see - // data written to data, or be larger than data and a different array. - n := len(data) - m := json.RawMessage(data[:0]) - if err := r.decoder.Decode(&m); err != nil { - return 0, err - } - - // If capacity of data is less than length of the message, decoder will allocate a new slice - // and set m to it, which means we need to copy the partial result back into data and preserve - // the remaining result for subsequent reads. - if len(m) > n { - data = append(data[0:0], m[:n]...) - r.remaining = m[n:] - return n, io.ErrShortBuffer - } - return len(m), nil -} - -func (r *jsonFrameReader) Close() error { - return r.r.Close() -} diff --git a/vendor/k8s.io/kubernetes/pkg/util/framer/framer_test.go b/vendor/k8s.io/kubernetes/pkg/util/framer/framer_test.go deleted file mode 100644 index b7ed00f5..00000000 --- a/vendor/k8s.io/kubernetes/pkg/util/framer/framer_test.go +++ /dev/null @@ -1,176 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package framer - -import ( - "bytes" - "io" - "io/ioutil" - "testing" -) - -func TestRead(t *testing.T) { - data := []byte{ - 0x00, 0x00, 0x00, 0x04, - 0x01, 0x02, 0x03, 0x04, - 0x00, 0x00, 0x00, 0x03, - 0x05, 0x06, 0x07, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, - 0x08, - } - b := bytes.NewBuffer(data) - r := NewLengthDelimitedFrameReader(ioutil.NopCloser(b)) - buf := make([]byte, 1) - if n, err := r.Read(buf); err != io.ErrShortBuffer && n != 1 && bytes.Equal(buf, []byte{0x01}) { - t.Fatalf("unexpected: %v %d %v", err, n, buf) - } - if n, err := r.Read(buf); err != io.ErrShortBuffer && n != 1 && bytes.Equal(buf, []byte{0x02}) { - t.Fatalf("unexpected: %v %d %v", err, n, buf) - } - // read the remaining frame - buf = make([]byte, 2) - if n, err := r.Read(buf); err != nil && n != 2 && bytes.Equal(buf, []byte{0x03, 0x04}) { - t.Fatalf("unexpected: %v %d %v", err, n, buf) - } - // read with buffer equal to frame - buf = make([]byte, 3) - if n, err := r.Read(buf); err != nil && n != 3 && bytes.Equal(buf, []byte{0x05, 0x06, 0x07}) { - t.Fatalf("unexpected: %v %d %v", err, n, buf) - } - // read empty frame - buf = make([]byte, 3) - if n, err := r.Read(buf); err != nil && n != 0 && bytes.Equal(buf, []byte{}) { - t.Fatalf("unexpected: %v %d %v", err, n, buf) - } - // read with larger buffer than frame - buf = make([]byte, 3) - if n, err := r.Read(buf); err != nil && n != 1 && bytes.Equal(buf, []byte{0x08}) { - t.Fatalf("unexpected: %v %d %v", err, n, buf) - } - // read EOF - if n, err := r.Read(buf); err != io.EOF && n != 0 { - t.Fatalf("unexpected: %v %d", err, n) - } -} - -func TestReadLarge(t *testing.T) { - data := []byte{ - 0x00, 0x00, 0x00, 0x04, - 0x01, 0x02, 0x03, 0x04, - 0x00, 0x00, 0x00, 0x03, - 0x05, 0x06, 0x07, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, - 0x08, - } - b := bytes.NewBuffer(data) - r := NewLengthDelimitedFrameReader(ioutil.NopCloser(b)) - buf := make([]byte, 40) - if n, err := r.Read(buf); err != nil && n != 4 && bytes.Equal(buf, []byte{0x01, 0x02, 0x03, 0x04}) { - t.Fatalf("unexpected: %v %d %v", err, n, buf) - } - if n, err := r.Read(buf); err != nil && n != 3 && bytes.Equal(buf, []byte{0x05, 0x06, 0x7}) { - t.Fatalf("unexpected: %v %d %v", err, n, buf) - } - if n, err := r.Read(buf); err != nil && n != 0 && bytes.Equal(buf, []byte{}) { - t.Fatalf("unexpected: %v %d %v", err, n, buf) - } - if n, err := r.Read(buf); err != nil && n != 1 && bytes.Equal(buf, []byte{0x08}) { - t.Fatalf("unexpected: %v %d %v", err, n, buf) - } - // read EOF - if n, err := r.Read(buf); err != io.EOF && n != 0 { - t.Fatalf("unexpected: %v %d", err, n) - } -} -func TestReadInvalidFrame(t *testing.T) { - data := []byte{ - 0x00, 0x00, 0x00, 0x04, - 0x01, 0x02, - } - b := bytes.NewBuffer(data) - r := NewLengthDelimitedFrameReader(ioutil.NopCloser(b)) - buf := make([]byte, 1) - if n, err := r.Read(buf); err != io.ErrShortBuffer && n != 1 && bytes.Equal(buf, []byte{0x01}) { - t.Fatalf("unexpected: %v %d %v", err, n, buf) - } - // read the remaining frame - buf = make([]byte, 3) - if n, err := r.Read(buf); err != io.ErrUnexpectedEOF && n != 1 && bytes.Equal(buf, []byte{0x02}) { - t.Fatalf("unexpected: %v %d %v", err, n, buf) - } - // read EOF - if n, err := r.Read(buf); err != io.EOF && n != 0 { - t.Fatalf("unexpected: %v %d", err, n) - } -} - -func TestJSONFrameReader(t *testing.T) { - b := bytes.NewBufferString("{\"test\":true}\n1\n[\"a\"]") - r := NewJSONFramedReader(ioutil.NopCloser(b)) - buf := make([]byte, 20) - if n, err := r.Read(buf); err != nil || n != 13 || string(buf[:n]) != `{"test":true}` { - t.Fatalf("unexpected: %v %d %q", err, n, buf) - } - if n, err := r.Read(buf); err != nil || n != 1 || string(buf[:n]) != `1` { - t.Fatalf("unexpected: %v %d %q", err, n, buf) - } - if n, err := r.Read(buf); err != nil || n != 5 || string(buf[:n]) != `["a"]` { - t.Fatalf("unexpected: %v %d %q", err, n, buf) - } - if n, err := r.Read(buf); err != io.EOF || n != 0 { - t.Fatalf("unexpected: %v %d %q", err, n, buf) - } -} - -func TestJSONFrameReaderShortBuffer(t *testing.T) { - b := bytes.NewBufferString("{\"test\":true}\n1\n[\"a\"]") - r := NewJSONFramedReader(ioutil.NopCloser(b)) - buf := make([]byte, 3) - - if n, err := r.Read(buf); err != io.ErrShortBuffer || n != 3 || string(buf[:n]) != `{"t` { - t.Fatalf("unexpected: %v %d %q", err, n, buf) - } - if n, err := r.Read(buf); err != io.ErrShortBuffer || n != 3 || string(buf[:n]) != `est` { - t.Fatalf("unexpected: %v %d %q", err, n, buf) - } - if n, err := r.Read(buf); err != io.ErrShortBuffer || n != 3 || string(buf[:n]) != `":t` { - t.Fatalf("unexpected: %v %d %q", err, n, buf) - } - if n, err := r.Read(buf); err != io.ErrShortBuffer || n != 3 || string(buf[:n]) != `rue` { - t.Fatalf("unexpected: %v %d %q", err, n, buf) - } - if n, err := r.Read(buf); err != nil || n != 1 || string(buf[:n]) != `}` { - t.Fatalf("unexpected: %v %d %q", err, n, buf) - } - - if n, err := r.Read(buf); err != nil || n != 1 || string(buf[:n]) != `1` { - t.Fatalf("unexpected: %v %d %q", err, n, buf) - } - - if n, err := r.Read(buf); err != io.ErrShortBuffer || n != 3 || string(buf[:n]) != `["a` { - t.Fatalf("unexpected: %v %d %q", err, n, buf) - } - if n, err := r.Read(buf); err != nil || n != 2 || string(buf[:n]) != `"]` { - t.Fatalf("unexpected: %v %d %q", err, n, buf) - } - - if n, err := r.Read(buf); err != io.EOF || n != 0 { - t.Fatalf("unexpected: %v %d %q", err, n, buf) - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/util/goroutinemap/OWNERS b/vendor/k8s.io/kubernetes/pkg/util/goroutinemap/OWNERS index 73ab6a21..9d44e9ce 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/goroutinemap/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/util/goroutinemap/OWNERS @@ -1,2 +1,4 @@ -assignees: - - saad-ali +approvers: +- saad-ali +reviewers: +- saad-ali diff --git a/vendor/k8s.io/kubernetes/pkg/util/integer/BUILD b/vendor/k8s.io/kubernetes/pkg/util/integer/BUILD deleted file mode 100644 index 2d4453af..00000000 --- a/vendor/k8s.io/kubernetes/pkg/util/integer/BUILD +++ /dev/null @@ -1,35 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = ["integer.go"], - tags = ["automanaged"], -) - -go_test( - name = "go_default_test", - srcs = ["integer_test.go"], - library = ":go_default_library", - tags = ["automanaged"], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/vendor/k8s.io/kubernetes/pkg/util/io/BUILD b/vendor/k8s.io/kubernetes/pkg/util/io/BUILD index bc167702..2e8a73e6 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/io/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/util/io/BUILD @@ -30,10 +30,10 @@ go_test( deps = [ "//pkg/api:go_default_library", "//pkg/util/io:go_default_library", - "//pkg/util/testing:go_default_library", "//pkg/volume:go_default_library", "//vendor:github.com/pborman/uuid", "//vendor:k8s.io/apimachinery/pkg/runtime", + "//vendor:k8s.io/client-go/util/testing", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/util/io/io_test.go b/vendor/k8s.io/kubernetes/pkg/util/io/io_test.go index 688e4f25..86b00394 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/io/io_test.go +++ b/vendor/k8s.io/kubernetes/pkg/util/io/io_test.go @@ -23,9 +23,9 @@ import ( "github.com/pborman/uuid" "k8s.io/apimachinery/pkg/runtime" + utiltesting "k8s.io/client-go/util/testing" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/util/io" - utiltesting "k8s.io/kubernetes/pkg/util/testing" "k8s.io/kubernetes/pkg/volume" ) diff --git a/vendor/k8s.io/kubernetes/pkg/util/json/.readonly b/vendor/k8s.io/kubernetes/pkg/util/json/.readonly deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/k8s.io/kubernetes/pkg/util/json/BUILD b/vendor/k8s.io/kubernetes/pkg/util/json/BUILD index 9b9a1996..deefdcef 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/json/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/util/json/BUILD @@ -5,19 +5,11 @@ licenses(["notice"]) load( "@io_bazel_rules_go//go:def.bzl", "go_library", - "go_test", ) go_library( name = "go_default_library", - srcs = ["json.go"], - tags = ["automanaged"], -) - -go_test( - name = "go_default_test", - srcs = ["json_test.go"], - library = ":go_default_library", + srcs = ["doc.go"], tags = ["automanaged"], ) diff --git a/vendor/k8s.io/kubernetes/pkg/util/json/doc.go b/vendor/k8s.io/kubernetes/pkg/util/json/doc.go new file mode 100644 index 00000000..a7c3c015 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/util/json/doc.go @@ -0,0 +1,21 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package json only exists until heapster rebases +// TODO genericapiserver remove this empty package. Godep fails without this because heapster relies +// on this package. This will allow us to start splitting packages, but will force +// heapster to update on their next kube rebase. +package json diff --git a/vendor/k8s.io/kubernetes/pkg/util/json/json.go b/vendor/k8s.io/kubernetes/pkg/util/json/json.go deleted file mode 100644 index e8054a12..00000000 --- a/vendor/k8s.io/kubernetes/pkg/util/json/json.go +++ /dev/null @@ -1,107 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package json - -import ( - "bytes" - "encoding/json" - "io" -) - -// NewEncoder delegates to json.NewEncoder -// It is only here so this package can be a drop-in for common encoding/json uses -func NewEncoder(w io.Writer) *json.Encoder { - return json.NewEncoder(w) -} - -// Marshal delegates to json.Marshal -// It is only here so this package can be a drop-in for common encoding/json uses -func Marshal(v interface{}) ([]byte, error) { - return json.Marshal(v) -} - -// Unmarshal unmarshals the given data -// If v is a *map[string]interface{}, numbers are converted to int64 or float64 -func Unmarshal(data []byte, v interface{}) error { - switch v := v.(type) { - case *map[string]interface{}: - // Build a decoder from the given data - decoder := json.NewDecoder(bytes.NewBuffer(data)) - // Preserve numbers, rather than casting to float64 automatically - decoder.UseNumber() - // Run the decode - if err := decoder.Decode(v); err != nil { - return err - } - // If the decode succeeds, post-process the map to convert json.Number objects to int64 or float64 - return convertMapNumbers(*v) - - default: - return json.Unmarshal(data, v) - } -} - -// convertMapNumbers traverses the map, converting any json.Number values to int64 or float64. -// values which are map[string]interface{} or []interface{} are recursively visited -func convertMapNumbers(m map[string]interface{}) error { - var err error - for k, v := range m { - switch v := v.(type) { - case json.Number: - m[k], err = convertNumber(v) - case map[string]interface{}: - err = convertMapNumbers(v) - case []interface{}: - err = convertSliceNumbers(v) - } - if err != nil { - return err - } - } - return nil -} - -// convertSliceNumbers traverses the slice, converting any json.Number values to int64 or float64. -// values which are map[string]interface{} or []interface{} are recursively visited -func convertSliceNumbers(s []interface{}) error { - var err error - for i, v := range s { - switch v := v.(type) { - case json.Number: - s[i], err = convertNumber(v) - case map[string]interface{}: - err = convertMapNumbers(v) - case []interface{}: - err = convertSliceNumbers(v) - } - if err != nil { - return err - } - } - return nil -} - -// convertNumber converts a json.Number to an int64 or float64, or returns an error -func convertNumber(n json.Number) (interface{}, error) { - // Attempt to convert to an int64 first - if i, err := n.Int64(); err == nil { - return i, nil - } - // Return a float64 (default json.Decode() behavior) - // An overflow will return an error - return n.Float64() -} diff --git a/vendor/k8s.io/kubernetes/pkg/util/json/json_test.go b/vendor/k8s.io/kubernetes/pkg/util/json/json_test.go deleted file mode 100644 index 1896a3e3..00000000 --- a/vendor/k8s.io/kubernetes/pkg/util/json/json_test.go +++ /dev/null @@ -1,317 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package json - -import ( - "fmt" - "math" - "reflect" - "strconv" - "strings" - "testing" -) - -func TestEvaluateTypes(t *testing.T) { - testCases := []struct { - In string - Data interface{} - Out string - Err bool - }{ - // Invalid syntaxes - { - In: `x`, - Err: true, - }, - { - In: ``, - Err: true, - }, - - // Null - { - In: `null`, - Data: nil, - Out: `null`, - }, - // Booleans - { - In: `true`, - Data: true, - Out: `true`, - }, - { - In: `false`, - Data: false, - Out: `false`, - }, - - // Integers - { - In: `0`, - Data: int64(0), - Out: `0`, - }, - { - In: `-0`, - Data: int64(-0), - Out: `0`, - }, - { - In: `1`, - Data: int64(1), - Out: `1`, - }, - { - In: `2147483647`, - Data: int64(math.MaxInt32), - Out: `2147483647`, - }, - { - In: `-2147483648`, - Data: int64(math.MinInt32), - Out: `-2147483648`, - }, - { - In: `9223372036854775807`, - Data: int64(math.MaxInt64), - Out: `9223372036854775807`, - }, - { - In: `-9223372036854775808`, - Data: int64(math.MinInt64), - Out: `-9223372036854775808`, - }, - - // Int overflow - { - In: `9223372036854775808`, // MaxInt64 + 1 - Data: float64(9223372036854775808), - Out: strconv.FormatFloat(9223372036854775808, 'g', -1, 64), - }, - { - In: `-9223372036854775809`, // MinInt64 - 1 - Data: float64(math.MinInt64), - Out: strconv.FormatFloat(-9223372036854775809, 'g', -1, 64), - }, - - // Floats - { - In: `0.0`, - Data: float64(0), - Out: `0`, - }, - { - In: `-0.0`, - Data: float64(-0.0), - Out: `-0`, - }, - { - In: `0.5`, - Data: float64(0.5), - Out: `0.5`, - }, - { - In: `1e3`, - Data: float64(1e3), - Out: `1000`, - }, - { - In: `1.5`, - Data: float64(1.5), - Out: `1.5`, - }, - { - In: `-0.3`, - Data: float64(-.3), - Out: `-0.3`, - }, - { - // Largest representable float32 - In: `3.40282346638528859811704183484516925440e+38`, - Data: float64(math.MaxFloat32), - Out: strconv.FormatFloat(math.MaxFloat32, 'g', -1, 64), - }, - { - // Smallest float32 without losing precision - In: `1.175494351e-38`, - Data: float64(1.175494351e-38), - Out: `1.175494351e-38`, - }, - { - // float32 closest to zero - In: `1.401298464324817070923729583289916131280e-45`, - Data: float64(math.SmallestNonzeroFloat32), - Out: strconv.FormatFloat(math.SmallestNonzeroFloat32, 'g', -1, 64), - }, - { - // Largest representable float64 - In: `1.797693134862315708145274237317043567981e+308`, - Data: float64(math.MaxFloat64), - Out: strconv.FormatFloat(math.MaxFloat64, 'g', -1, 64), - }, - { - // Closest to zero without losing precision - In: `2.2250738585072014e-308`, - Data: float64(2.2250738585072014e-308), - Out: `2.2250738585072014e-308`, - }, - - { - // float64 closest to zero - In: `4.940656458412465441765687928682213723651e-324`, - Data: float64(math.SmallestNonzeroFloat64), - Out: strconv.FormatFloat(math.SmallestNonzeroFloat64, 'g', -1, 64), - }, - - { - // math.MaxFloat64 + 2 overflow - In: `1.7976931348623159e+308`, - Err: true, - }, - - // Strings - { - In: `""`, - Data: string(""), - Out: `""`, - }, - { - In: `"0"`, - Data: string("0"), - Out: `"0"`, - }, - { - In: `"A"`, - Data: string("A"), - Out: `"A"`, - }, - { - In: `"Iñtërnâtiônàlizætiøn"`, - Data: string("Iñtërnâtiônàlizætiøn"), - Out: `"Iñtërnâtiônàlizætiøn"`, - }, - - // Arrays - { - In: `[]`, - Data: []interface{}{}, - Out: `[]`, - }, - { - In: `[` + strings.Join([]string{ - `null`, - `true`, - `false`, - `0`, - `9223372036854775807`, - `0.0`, - `0.5`, - `1.0`, - `1.797693134862315708145274237317043567981e+308`, - `"0"`, - `"A"`, - `"Iñtërnâtiônàlizætiøn"`, - `[null,true,1,1.0,1.5]`, - `{"boolkey":true,"floatkey":1.0,"intkey":1,"nullkey":null}`, - }, ",") + `]`, - Data: []interface{}{ - nil, - true, - false, - int64(0), - int64(math.MaxInt64), - float64(0.0), - float64(0.5), - float64(1.0), - float64(math.MaxFloat64), - string("0"), - string("A"), - string("Iñtërnâtiônàlizætiøn"), - []interface{}{nil, true, int64(1), float64(1.0), float64(1.5)}, - map[string]interface{}{"nullkey": nil, "boolkey": true, "intkey": int64(1), "floatkey": float64(1.0)}, - }, - Out: `[` + strings.Join([]string{ - `null`, - `true`, - `false`, - `0`, - `9223372036854775807`, - `0`, - `0.5`, - `1`, - strconv.FormatFloat(math.MaxFloat64, 'g', -1, 64), - `"0"`, - `"A"`, - `"Iñtërnâtiônàlizætiøn"`, - `[null,true,1,1,1.5]`, - `{"boolkey":true,"floatkey":1,"intkey":1,"nullkey":null}`, // gets alphabetized by Marshal - }, ",") + `]`, - }, - - // Maps - { - In: `{}`, - Data: map[string]interface{}{}, - Out: `{}`, - }, - { - In: `{"boolkey":true,"floatkey":1.0,"intkey":1,"nullkey":null}`, - Data: map[string]interface{}{"nullkey": nil, "boolkey": true, "intkey": int64(1), "floatkey": float64(1.0)}, - Out: `{"boolkey":true,"floatkey":1,"intkey":1,"nullkey":null}`, // gets alphabetized by Marshal - }, - } - - for _, tc := range testCases { - inputJSON := fmt.Sprintf(`{"data":%s}`, tc.In) - expectedJSON := fmt.Sprintf(`{"data":%s}`, tc.Out) - m := map[string]interface{}{} - err := Unmarshal([]byte(inputJSON), &m) - if tc.Err && err != nil { - // Expected error - continue - } - if err != nil { - t.Errorf("%s: error decoding: %v", tc.In, err) - continue - } - if tc.Err { - t.Errorf("%s: expected error, got none", tc.In) - continue - } - data, ok := m["data"] - if !ok { - t.Errorf("%s: decoded object missing data key: %#v", tc.In, m) - continue - } - if !reflect.DeepEqual(tc.Data, data) { - t.Errorf("%s: expected\n\t%#v (%v), got\n\t%#v (%v)", tc.In, tc.Data, reflect.TypeOf(tc.Data), data, reflect.TypeOf(data)) - continue - } - - outputJSON, err := Marshal(m) - if err != nil { - t.Errorf("%s: error encoding: %v", tc.In, err) - continue - } - - if expectedJSON != string(outputJSON) { - t.Errorf("%s: expected\n\t%s, got\n\t%s", tc.In, expectedJSON, string(outputJSON)) - continue - } - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/util/jsonpath/BUILD b/vendor/k8s.io/kubernetes/pkg/util/jsonpath/BUILD deleted file mode 100644 index b54bfbd0..00000000 --- a/vendor/k8s.io/kubernetes/pkg/util/jsonpath/BUILD +++ /dev/null @@ -1,44 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "jsonpath.go", - "node.go", - "parser.go", - ], - tags = ["automanaged"], - deps = ["//third_party/forked/golang/template:go_default_library"], -) - -go_test( - name = "go_default_test", - srcs = [ - "jsonpath_test.go", - "parser_test.go", - ], - library = ":go_default_library", - tags = ["automanaged"], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/vendor/k8s.io/kubernetes/pkg/util/jsonpath/jsonpath.go b/vendor/k8s.io/kubernetes/pkg/util/jsonpath/jsonpath.go deleted file mode 100644 index d84a1855..00000000 --- a/vendor/k8s.io/kubernetes/pkg/util/jsonpath/jsonpath.go +++ /dev/null @@ -1,498 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package jsonpath - -import ( - "bytes" - "fmt" - "io" - "reflect" - "strings" - - "k8s.io/kubernetes/third_party/forked/golang/template" -) - -type JSONPath struct { - name string - parser *Parser - stack [][]reflect.Value //push and pop values in different scopes - cur []reflect.Value //current scope values - beginRange int - inRange int - endRange int - - allowMissingKeys bool -} - -func New(name string) *JSONPath { - return &JSONPath{ - name: name, - beginRange: 0, - inRange: 0, - endRange: 0, - } -} - -// AllowMissingKeys allows a caller to specify whether they want an error if a field or map key -// cannot be located, or simply an empty result. The receiver is returned for chaining. -func (j *JSONPath) AllowMissingKeys(allow bool) *JSONPath { - j.allowMissingKeys = allow - return j -} - -// Parse parse the given template, return error -func (j *JSONPath) Parse(text string) (err error) { - j.parser, err = Parse(j.name, text) - return -} - -// Execute bounds data into template and write the result -func (j *JSONPath) Execute(wr io.Writer, data interface{}) error { - fullResults, err := j.FindResults(data) - if err != nil { - return err - } - for ix := range fullResults { - if err := j.PrintResults(wr, fullResults[ix]); err != nil { - return err - } - } - return nil -} - -func (j *JSONPath) FindResults(data interface{}) ([][]reflect.Value, error) { - if j.parser == nil { - return nil, fmt.Errorf("%s is an incomplete jsonpath template", j.name) - } - - j.cur = []reflect.Value{reflect.ValueOf(data)} - nodes := j.parser.Root.Nodes - fullResult := [][]reflect.Value{} - for i := 0; i < len(nodes); i++ { - node := nodes[i] - results, err := j.walk(j.cur, node) - if err != nil { - return nil, err - } - - //encounter an end node, break the current block - if j.endRange > 0 && j.endRange <= j.inRange { - j.endRange -= 1 - break - } - //encounter a range node, start a range loop - if j.beginRange > 0 { - j.beginRange -= 1 - j.inRange += 1 - for k, value := range results { - j.parser.Root.Nodes = nodes[i+1:] - if k == len(results)-1 { - j.inRange -= 1 - } - nextResults, err := j.FindResults(value.Interface()) - if err != nil { - return nil, err - } - fullResult = append(fullResult, nextResults...) - } - break - } - fullResult = append(fullResult, results) - } - return fullResult, nil -} - -// PrintResults write the results into writer -func (j *JSONPath) PrintResults(wr io.Writer, results []reflect.Value) error { - for i, r := range results { - text, err := j.evalToText(r) - if err != nil { - return err - } - if i != len(results)-1 { - text = append(text, ' ') - } - if _, err = wr.Write(text); err != nil { - return err - } - } - return nil -} - -// walk visits tree rooted at the given node in DFS order -func (j *JSONPath) walk(value []reflect.Value, node Node) ([]reflect.Value, error) { - switch node := node.(type) { - case *ListNode: - return j.evalList(value, node) - case *TextNode: - return []reflect.Value{reflect.ValueOf(node.Text)}, nil - case *FieldNode: - return j.evalField(value, node) - case *ArrayNode: - return j.evalArray(value, node) - case *FilterNode: - return j.evalFilter(value, node) - case *IntNode: - return j.evalInt(value, node) - case *FloatNode: - return j.evalFloat(value, node) - case *WildcardNode: - return j.evalWildcard(value, node) - case *RecursiveNode: - return j.evalRecursive(value, node) - case *UnionNode: - return j.evalUnion(value, node) - case *IdentifierNode: - return j.evalIdentifier(value, node) - default: - return value, fmt.Errorf("unexpected Node %v", node) - } -} - -// evalInt evaluates IntNode -func (j *JSONPath) evalInt(input []reflect.Value, node *IntNode) ([]reflect.Value, error) { - result := make([]reflect.Value, len(input)) - for i := range input { - result[i] = reflect.ValueOf(node.Value) - } - return result, nil -} - -// evalFloat evaluates FloatNode -func (j *JSONPath) evalFloat(input []reflect.Value, node *FloatNode) ([]reflect.Value, error) { - result := make([]reflect.Value, len(input)) - for i := range input { - result[i] = reflect.ValueOf(node.Value) - } - return result, nil -} - -// evalList evaluates ListNode -func (j *JSONPath) evalList(value []reflect.Value, node *ListNode) ([]reflect.Value, error) { - var err error - curValue := value - for _, node := range node.Nodes { - curValue, err = j.walk(curValue, node) - if err != nil { - return curValue, err - } - } - return curValue, nil -} - -// evalIdentifier evaluates IdentifierNode -func (j *JSONPath) evalIdentifier(input []reflect.Value, node *IdentifierNode) ([]reflect.Value, error) { - results := []reflect.Value{} - switch node.Name { - case "range": - j.stack = append(j.stack, j.cur) - j.beginRange += 1 - results = input - case "end": - if j.endRange < j.inRange { //inside a loop, break the current block - j.endRange += 1 - break - } - // the loop is about to end, pop value and continue the following execution - if len(j.stack) > 0 { - j.cur, j.stack = j.stack[len(j.stack)-1], j.stack[:len(j.stack)-1] - } else { - return results, fmt.Errorf("not in range, nothing to end") - } - default: - return input, fmt.Errorf("unrecognized identifier %v", node.Name) - } - return results, nil -} - -// evalArray evaluates ArrayNode -func (j *JSONPath) evalArray(input []reflect.Value, node *ArrayNode) ([]reflect.Value, error) { - result := []reflect.Value{} - for _, value := range input { - - value, isNil := template.Indirect(value) - if isNil { - continue - } - if value.Kind() != reflect.Array && value.Kind() != reflect.Slice { - return input, fmt.Errorf("%v is not array or slice", value.Type()) - } - params := node.Params - if !params[0].Known { - params[0].Value = 0 - } - if params[0].Value < 0 { - params[0].Value += value.Len() - } - if !params[1].Known { - params[1].Value = value.Len() - } - - if params[1].Value < 0 { - params[1].Value += value.Len() - } - - sliceLength := value.Len() - if params[1].Value != params[0].Value { // if you're requesting zero elements, allow it through. - if params[0].Value >= sliceLength { - return input, fmt.Errorf("array index out of bounds: index %d, length %d", params[0].Value, sliceLength) - } - if params[1].Value > sliceLength { - return input, fmt.Errorf("array index out of bounds: index %d, length %d", params[1].Value-1, sliceLength) - } - } - - if !params[2].Known { - value = value.Slice(params[0].Value, params[1].Value) - } else { - value = value.Slice3(params[0].Value, params[1].Value, params[2].Value) - } - for i := 0; i < value.Len(); i++ { - result = append(result, value.Index(i)) - } - } - return result, nil -} - -// evalUnion evaluates UnionNode -func (j *JSONPath) evalUnion(input []reflect.Value, node *UnionNode) ([]reflect.Value, error) { - result := []reflect.Value{} - for _, listNode := range node.Nodes { - temp, err := j.evalList(input, listNode) - if err != nil { - return input, err - } - result = append(result, temp...) - } - return result, nil -} - -func (j *JSONPath) findFieldInValue(value *reflect.Value, node *FieldNode) (reflect.Value, error) { - t := value.Type() - var inlineValue *reflect.Value - for ix := 0; ix < t.NumField(); ix++ { - f := t.Field(ix) - jsonTag := f.Tag.Get("json") - parts := strings.Split(jsonTag, ",") - if len(parts) == 0 { - continue - } - if parts[0] == node.Value { - return value.Field(ix), nil - } - if len(parts[0]) == 0 { - val := value.Field(ix) - inlineValue = &val - } - } - if inlineValue != nil { - if inlineValue.Kind() == reflect.Struct { - // handle 'inline' - match, err := j.findFieldInValue(inlineValue, node) - if err != nil { - return reflect.Value{}, err - } - if match.IsValid() { - return match, nil - } - } - } - return value.FieldByName(node.Value), nil -} - -// evalField evaluates field of struct or key of map. -func (j *JSONPath) evalField(input []reflect.Value, node *FieldNode) ([]reflect.Value, error) { - results := []reflect.Value{} - // If there's no input, there's no output - if len(input) == 0 { - return results, nil - } - for _, value := range input { - var result reflect.Value - value, isNil := template.Indirect(value) - if isNil { - continue - } - - if value.Kind() == reflect.Struct { - var err error - if result, err = j.findFieldInValue(&value, node); err != nil { - return nil, err - } - } else if value.Kind() == reflect.Map { - mapKeyType := value.Type().Key() - nodeValue := reflect.ValueOf(node.Value) - // node value type must be convertible to map key type - if !nodeValue.Type().ConvertibleTo(mapKeyType) { - return results, fmt.Errorf("%s is not convertible to %s", nodeValue, mapKeyType) - } - result = value.MapIndex(nodeValue.Convert(mapKeyType)) - } - if result.IsValid() { - results = append(results, result) - } - } - if len(results) == 0 { - if j.allowMissingKeys { - return results, nil - } - return results, fmt.Errorf("%s is not found", node.Value) - } - return results, nil -} - -// evalWildcard extract all contents of the given value -func (j *JSONPath) evalWildcard(input []reflect.Value, node *WildcardNode) ([]reflect.Value, error) { - results := []reflect.Value{} - for _, value := range input { - value, isNil := template.Indirect(value) - if isNil { - continue - } - - kind := value.Kind() - if kind == reflect.Struct { - for i := 0; i < value.NumField(); i++ { - results = append(results, value.Field(i)) - } - } else if kind == reflect.Map { - for _, key := range value.MapKeys() { - results = append(results, value.MapIndex(key)) - } - } else if kind == reflect.Array || kind == reflect.Slice || kind == reflect.String { - for i := 0; i < value.Len(); i++ { - results = append(results, value.Index(i)) - } - } - } - return results, nil -} - -// evalRecursive visit the given value recursively and push all of them to result -func (j *JSONPath) evalRecursive(input []reflect.Value, node *RecursiveNode) ([]reflect.Value, error) { - result := []reflect.Value{} - for _, value := range input { - results := []reflect.Value{} - value, isNil := template.Indirect(value) - if isNil { - continue - } - - kind := value.Kind() - if kind == reflect.Struct { - for i := 0; i < value.NumField(); i++ { - results = append(results, value.Field(i)) - } - } else if kind == reflect.Map { - for _, key := range value.MapKeys() { - results = append(results, value.MapIndex(key)) - } - } else if kind == reflect.Array || kind == reflect.Slice || kind == reflect.String { - for i := 0; i < value.Len(); i++ { - results = append(results, value.Index(i)) - } - } - if len(results) != 0 { - result = append(result, value) - output, err := j.evalRecursive(results, node) - if err != nil { - return result, err - } - result = append(result, output...) - } - } - return result, nil -} - -// evalFilter filter array according to FilterNode -func (j *JSONPath) evalFilter(input []reflect.Value, node *FilterNode) ([]reflect.Value, error) { - results := []reflect.Value{} - for _, value := range input { - value, _ = template.Indirect(value) - - if value.Kind() != reflect.Array && value.Kind() != reflect.Slice { - return input, fmt.Errorf("%v is not array or slice and cannot be filtered", value) - } - for i := 0; i < value.Len(); i++ { - temp := []reflect.Value{value.Index(i)} - lefts, err := j.evalList(temp, node.Left) - - //case exists - if node.Operator == "exists" { - if len(lefts) > 0 { - results = append(results, value.Index(i)) - } - continue - } - - if err != nil { - return input, err - } - - var left, right interface{} - if len(lefts) != 1 { - return input, fmt.Errorf("can only compare one element at a time") - } - left = lefts[0].Interface() - - rights, err := j.evalList(temp, node.Right) - if err != nil { - return input, err - } - if len(rights) != 1 { - return input, fmt.Errorf("can only compare one element at a time") - } - right = rights[0].Interface() - - pass := false - switch node.Operator { - case "<": - pass, err = template.Less(left, right) - case ">": - pass, err = template.Greater(left, right) - case "==": - pass, err = template.Equal(left, right) - case "!=": - pass, err = template.NotEqual(left, right) - case "<=": - pass, err = template.LessEqual(left, right) - case ">=": - pass, err = template.GreaterEqual(left, right) - default: - return results, fmt.Errorf("unrecognized filter operator %s", node.Operator) - } - if err != nil { - return results, err - } - if pass { - results = append(results, value.Index(i)) - } - } - } - return results, nil -} - -// evalToText translates reflect value to corresponding text -func (j *JSONPath) evalToText(v reflect.Value) ([]byte, error) { - iface, ok := template.PrintableValue(v) - if !ok { - return nil, fmt.Errorf("can't print type %s", v.Type()) - } - var buffer bytes.Buffer - fmt.Fprint(&buffer, iface) - return buffer.Bytes(), nil -} diff --git a/vendor/k8s.io/kubernetes/pkg/api/meta/.readonly b/vendor/k8s.io/kubernetes/pkg/util/labels/.readonly similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/api/meta/.readonly rename to vendor/k8s.io/kubernetes/pkg/util/labels/.readonly diff --git a/vendor/k8s.io/kubernetes/pkg/util/metrics/BUILD b/vendor/k8s.io/kubernetes/pkg/util/metrics/BUILD index a96ec81e..41664171 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/metrics/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/util/metrics/BUILD @@ -12,10 +12,10 @@ go_library( srcs = ["util.go"], tags = ["automanaged"], deps = [ - "//pkg/util/flowcontrol:go_default_library", "//vendor:github.com/golang/glog", "//vendor:github.com/prometheus/client_golang/prometheus", "//vendor:k8s.io/apimachinery/pkg/util/wait", + "//vendor:k8s.io/client-go/util/flowcontrol", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/util/metrics/util.go b/vendor/k8s.io/kubernetes/pkg/util/metrics/util.go index 8f5bd2ef..e183be1d 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/metrics/util.go +++ b/vendor/k8s.io/kubernetes/pkg/util/metrics/util.go @@ -22,7 +22,7 @@ import ( "time" "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/kubernetes/pkg/util/flowcontrol" + "k8s.io/client-go/util/flowcontrol" "github.com/golang/glog" "github.com/prometheus/client_golang/prometheus" diff --git a/vendor/k8s.io/kubernetes/pkg/util/mount/mount_linux.go b/vendor/k8s.io/kubernetes/pkg/util/mount/mount_linux.go index 4cd7103a..69f756d1 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/mount/mount_linux.go +++ b/vendor/k8s.io/kubernetes/pkg/util/mount/mount_linux.go @@ -359,7 +359,7 @@ func (mounter *SafeFormatAndMount) formatAndMount(source string, target string, fstype = "ext4" } if fstype == "ext4" || fstype == "ext3" { - args = []string{"-E", "lazy_itable_init=0,lazy_journal_init=0", "-F", source} + args = []string{"-F", source} } glog.Infof("Disk %q appears to be unformatted, attempting to format as type: %q with options: %v", source, fstype, args) cmd := mounter.Runner.Command("mkfs."+fstype, args...) diff --git a/vendor/k8s.io/kubernetes/pkg/util/mount/safe_format_and_mount_test.go b/vendor/k8s.io/kubernetes/pkg/util/mount/safe_format_and_mount_test.go index 8ce48335..a6669080 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/mount/safe_format_and_mount_test.go +++ b/vendor/k8s.io/kubernetes/pkg/util/mount/safe_format_and_mount_test.go @@ -109,7 +109,7 @@ func TestSafeFormatAndMount(t *testing.T) { execScripts: []ExecArgs{ {"fsck", []string{"-a", "/dev/foo"}, "", nil}, {"lsblk", []string{"-nd", "-o", "FSTYPE", "/dev/foo"}, "", nil}, - {"mkfs.ext4", []string{"-E", "lazy_itable_init=0,lazy_journal_init=0", "-F", "/dev/foo"}, "", fmt.Errorf("formatting failed")}, + {"mkfs.ext4", []string{"-F", "/dev/foo"}, "", fmt.Errorf("formatting failed")}, }, expectedError: fmt.Errorf("formatting failed"), }, @@ -120,7 +120,7 @@ func TestSafeFormatAndMount(t *testing.T) { execScripts: []ExecArgs{ {"fsck", []string{"-a", "/dev/foo"}, "", nil}, {"lsblk", []string{"-nd", "-o", "FSTYPE", "/dev/foo"}, "", nil}, - {"mkfs.ext4", []string{"-E", "lazy_itable_init=0,lazy_journal_init=0", "-F", "/dev/foo"}, "", nil}, + {"mkfs.ext4", []string{"-F", "/dev/foo"}, "", nil}, }, expectedError: fmt.Errorf("Still cannot mount"), }, @@ -131,7 +131,7 @@ func TestSafeFormatAndMount(t *testing.T) { execScripts: []ExecArgs{ {"fsck", []string{"-a", "/dev/foo"}, "", nil}, {"lsblk", []string{"-nd", "-o", "FSTYPE", "/dev/foo"}, "", nil}, - {"mkfs.ext4", []string{"-E", "lazy_itable_init=0,lazy_journal_init=0", "-F", "/dev/foo"}, "", nil}, + {"mkfs.ext4", []string{"-F", "/dev/foo"}, "", nil}, }, expectedError: nil, }, @@ -142,7 +142,7 @@ func TestSafeFormatAndMount(t *testing.T) { execScripts: []ExecArgs{ {"fsck", []string{"-a", "/dev/foo"}, "", nil}, {"lsblk", []string{"-nd", "-o", "FSTYPE", "/dev/foo"}, "", nil}, - {"mkfs.ext3", []string{"-E", "lazy_itable_init=0,lazy_journal_init=0", "-F", "/dev/foo"}, "", nil}, + {"mkfs.ext3", []string{"-F", "/dev/foo"}, "", nil}, }, expectedError: nil, }, diff --git a/vendor/k8s.io/kubernetes/pkg/util/net/.readonly b/vendor/k8s.io/kubernetes/pkg/util/net/.readonly deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/k8s.io/kubernetes/pkg/util/net/BUILD b/vendor/k8s.io/kubernetes/pkg/util/net/BUILD index dcc51ec3..3ee4e871 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/net/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/util/net/BUILD @@ -5,41 +5,12 @@ licenses(["notice"]) load( "@io_bazel_rules_go//go:def.bzl", "go_library", - "go_test", ) go_library( name = "go_default_library", - srcs = [ - "http.go", - "interface.go", - "port_range.go", - "port_split.go", - "util.go", - ], + srcs = ["doc.go"], tags = ["automanaged"], - deps = [ - "//pkg/util/sets:go_default_library", - "//vendor:github.com/golang/glog", - "//vendor:golang.org/x/net/http2", - ], -) - -go_test( - name = "go_default_test", - srcs = [ - "http_test.go", - "interface_test.go", - "port_range_test.go", - "port_split_test.go", - "util_test.go", - ], - library = ":go_default_library", - tags = ["automanaged"], - deps = [ - "//pkg/util/sets:go_default_library", - "//vendor:github.com/spf13/pflag", - ], ) filegroup( diff --git a/vendor/k8s.io/kubernetes/pkg/runtime/schema/generated.proto b/vendor/k8s.io/kubernetes/pkg/util/net/doc.go similarity index 65% rename from vendor/k8s.io/kubernetes/pkg/runtime/schema/generated.proto rename to vendor/k8s.io/kubernetes/pkg/util/net/doc.go index 1563b39b..61bf9e38 100644 --- a/vendor/k8s.io/kubernetes/pkg/runtime/schema/generated.proto +++ b/vendor/k8s.io/kubernetes/pkg/util/net/doc.go @@ -14,15 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ - -// This file was autogenerated by go-to-protobuf. Do not edit it manually! - -syntax = 'proto2'; - -package k8s.io.kubernetes.pkg.runtime.schema; - -import "k8s.io/kubernetes/pkg/util/intstr/generated.proto"; - -// Package-wide variables from generator "generated". -option go_package = "schema"; - +// Package net only exists until heapster rebases +// TODO genericapiserver remove this empty package. Godep fails without this because heapster relies +// on this package. This will allow us to start splitting packages, but will force +// heapster to update on their next kube rebase. +package net diff --git a/vendor/k8s.io/kubernetes/pkg/util/net/http.go b/vendor/k8s.io/kubernetes/pkg/util/net/http.go deleted file mode 100644 index c32082e9..00000000 --- a/vendor/k8s.io/kubernetes/pkg/util/net/http.go +++ /dev/null @@ -1,269 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package net - -import ( - "crypto/tls" - "fmt" - "io" - "net" - "net/http" - "net/url" - "os" - "strconv" - "strings" - - "github.com/golang/glog" - "golang.org/x/net/http2" -) - -// IsProbableEOF returns true if the given error resembles a connection termination -// scenario that would justify assuming that the watch is empty. -// These errors are what the Go http stack returns back to us which are general -// connection closure errors (strongly correlated) and callers that need to -// differentiate probable errors in connection behavior between normal "this is -// disconnected" should use the method. -func IsProbableEOF(err error) bool { - if uerr, ok := err.(*url.Error); ok { - err = uerr.Err - } - switch { - case err == io.EOF: - return true - case err.Error() == "http: can't write HTTP request on broken connection": - return true - case strings.Contains(err.Error(), "connection reset by peer"): - return true - case strings.Contains(strings.ToLower(err.Error()), "use of closed network connection"): - return true - } - return false -} - -var defaultTransport = http.DefaultTransport.(*http.Transport) - -// SetOldTransportDefaults applies the defaults from http.DefaultTransport -// for the Proxy, Dial, and TLSHandshakeTimeout fields if unset -func SetOldTransportDefaults(t *http.Transport) *http.Transport { - if t.Proxy == nil || isDefault(t.Proxy) { - // http.ProxyFromEnvironment doesn't respect CIDRs and that makes it impossible to exclude things like pod and service IPs from proxy settings - // ProxierWithNoProxyCIDR allows CIDR rules in NO_PROXY - t.Proxy = NewProxierWithNoProxyCIDR(http.ProxyFromEnvironment) - } - if t.Dial == nil { - t.Dial = defaultTransport.Dial - } - if t.TLSHandshakeTimeout == 0 { - t.TLSHandshakeTimeout = defaultTransport.TLSHandshakeTimeout - } - return t -} - -// SetTransportDefaults applies the defaults from http.DefaultTransport -// for the Proxy, Dial, and TLSHandshakeTimeout fields if unset -func SetTransportDefaults(t *http.Transport) *http.Transport { - t = SetOldTransportDefaults(t) - // Allow clients to disable http2 if needed. - if s := os.Getenv("DISABLE_HTTP2"); len(s) > 0 { - glog.Infof("HTTP2 has been explicitly disabled") - } else { - if err := http2.ConfigureTransport(t); err != nil { - glog.Warningf("Transport failed http2 configuration: %v", err) - } - } - return t -} - -type RoundTripperWrapper interface { - http.RoundTripper - WrappedRoundTripper() http.RoundTripper -} - -type DialFunc func(net, addr string) (net.Conn, error) - -func Dialer(transport http.RoundTripper) (DialFunc, error) { - if transport == nil { - return nil, nil - } - - switch transport := transport.(type) { - case *http.Transport: - return transport.Dial, nil - case RoundTripperWrapper: - return Dialer(transport.WrappedRoundTripper()) - default: - return nil, fmt.Errorf("unknown transport type: %v", transport) - } -} - -// CloneTLSConfig returns a tls.Config with all exported fields except SessionTicketsDisabled and SessionTicketKey copied. -// This makes it safe to call CloneTLSConfig on a config in active use by a server. -// TODO: replace with tls.Config#Clone when we move to go1.8 -func CloneTLSConfig(cfg *tls.Config) *tls.Config { - if cfg == nil { - return &tls.Config{} - } - return &tls.Config{ - Rand: cfg.Rand, - Time: cfg.Time, - Certificates: cfg.Certificates, - NameToCertificate: cfg.NameToCertificate, - GetCertificate: cfg.GetCertificate, - RootCAs: cfg.RootCAs, - NextProtos: cfg.NextProtos, - ServerName: cfg.ServerName, - ClientAuth: cfg.ClientAuth, - ClientCAs: cfg.ClientCAs, - InsecureSkipVerify: cfg.InsecureSkipVerify, - CipherSuites: cfg.CipherSuites, - PreferServerCipherSuites: cfg.PreferServerCipherSuites, - ClientSessionCache: cfg.ClientSessionCache, - MinVersion: cfg.MinVersion, - MaxVersion: cfg.MaxVersion, - CurvePreferences: cfg.CurvePreferences, - } -} - -type TLSClientConfigHolder interface { - TLSClientConfig() *tls.Config -} - -func TLSClientConfig(transport http.RoundTripper) (*tls.Config, error) { - if transport == nil { - return nil, nil - } - - switch transport := transport.(type) { - case *http.Transport: - return transport.TLSClientConfig, nil - case TLSClientConfigHolder: - return transport.TLSClientConfig(), nil - case RoundTripperWrapper: - return TLSClientConfig(transport.WrappedRoundTripper()) - default: - return nil, fmt.Errorf("unknown transport type: %v", transport) - } -} - -func FormatURL(scheme string, host string, port int, path string) *url.URL { - return &url.URL{ - Scheme: scheme, - Host: net.JoinHostPort(host, strconv.Itoa(port)), - Path: path, - } -} - -func GetHTTPClient(req *http.Request) string { - if userAgent, ok := req.Header["User-Agent"]; ok { - if len(userAgent) > 0 { - return userAgent[0] - } - } - return "unknown" -} - -// Extracts and returns the clients IP from the given request. -// Looks at X-Forwarded-For header, X-Real-Ip header and request.RemoteAddr in that order. -// Returns nil if none of them are set or is set to an invalid value. -func GetClientIP(req *http.Request) net.IP { - hdr := req.Header - // First check the X-Forwarded-For header for requests via proxy. - hdrForwardedFor := hdr.Get("X-Forwarded-For") - if hdrForwardedFor != "" { - // X-Forwarded-For can be a csv of IPs in case of multiple proxies. - // Use the first valid one. - parts := strings.Split(hdrForwardedFor, ",") - for _, part := range parts { - ip := net.ParseIP(strings.TrimSpace(part)) - if ip != nil { - return ip - } - } - } - - // Try the X-Real-Ip header. - hdrRealIp := hdr.Get("X-Real-Ip") - if hdrRealIp != "" { - ip := net.ParseIP(hdrRealIp) - if ip != nil { - return ip - } - } - - // Fallback to Remote Address in request, which will give the correct client IP when there is no proxy. - // Remote Address in Go's HTTP server is in the form host:port so we need to split that first. - host, _, err := net.SplitHostPort(req.RemoteAddr) - if err == nil { - return net.ParseIP(host) - } - - // Fallback if Remote Address was just IP. - return net.ParseIP(req.RemoteAddr) -} - -var defaultProxyFuncPointer = fmt.Sprintf("%p", http.ProxyFromEnvironment) - -// isDefault checks to see if the transportProxierFunc is pointing to the default one -func isDefault(transportProxier func(*http.Request) (*url.URL, error)) bool { - transportProxierPointer := fmt.Sprintf("%p", transportProxier) - return transportProxierPointer == defaultProxyFuncPointer -} - -// NewProxierWithNoProxyCIDR constructs a Proxier function that respects CIDRs in NO_PROXY and delegates if -// no matching CIDRs are found -func NewProxierWithNoProxyCIDR(delegate func(req *http.Request) (*url.URL, error)) func(req *http.Request) (*url.URL, error) { - // we wrap the default method, so we only need to perform our check if the NO_PROXY envvar has a CIDR in it - noProxyEnv := os.Getenv("NO_PROXY") - noProxyRules := strings.Split(noProxyEnv, ",") - - cidrs := []*net.IPNet{} - for _, noProxyRule := range noProxyRules { - _, cidr, _ := net.ParseCIDR(noProxyRule) - if cidr != nil { - cidrs = append(cidrs, cidr) - } - } - - if len(cidrs) == 0 { - return delegate - } - - return func(req *http.Request) (*url.URL, error) { - host := req.URL.Host - // for some urls, the Host is already the host, not the host:port - if net.ParseIP(host) == nil { - var err error - host, _, err = net.SplitHostPort(req.URL.Host) - if err != nil { - return delegate(req) - } - } - - ip := net.ParseIP(host) - if ip == nil { - return delegate(req) - } - - for _, cidr := range cidrs { - if cidr.Contains(ip) { - return nil, nil - } - } - - return delegate(req) - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/util/net/http_test.go b/vendor/k8s.io/kubernetes/pkg/util/net/http_test.go deleted file mode 100644 index ee7bc501..00000000 --- a/vendor/k8s.io/kubernetes/pkg/util/net/http_test.go +++ /dev/null @@ -1,246 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package net - -import ( - "crypto/tls" - "net" - "net/http" - "net/url" - "os" - "reflect" - "runtime" - "strings" - "testing" - - "k8s.io/kubernetes/pkg/util/sets" -) - -func TestCloneTLSConfig(t *testing.T) { - expected := sets.NewString( - // These fields are copied in CloneTLSConfig - "Rand", - "Time", - "Certificates", - "RootCAs", - "NextProtos", - "ServerName", - "InsecureSkipVerify", - "CipherSuites", - "PreferServerCipherSuites", - "MinVersion", - "MaxVersion", - "CurvePreferences", - "NameToCertificate", - "GetCertificate", - "ClientAuth", - "ClientCAs", - "ClientSessionCache", - - // These fields are not copied - "SessionTicketsDisabled", - "SessionTicketKey", - - // These fields are unexported - "serverInitOnce", - "mutex", - "sessionTicketKeys", - ) - - // See #33936. - if strings.HasPrefix(runtime.Version(), "go1.7") { - expected.Insert("DynamicRecordSizingDisabled", "Renegotiation") - } - - fields := sets.NewString() - structType := reflect.TypeOf(tls.Config{}) - for i := 0; i < structType.NumField(); i++ { - fields.Insert(structType.Field(i).Name) - } - - if missing := expected.Difference(fields); len(missing) > 0 { - t.Errorf("Expected fields that were not seen in http.Transport: %v", missing.List()) - } - if extra := fields.Difference(expected); len(extra) > 0 { - t.Errorf("New fields seen in http.Transport: %v\nAdd to CopyClientTLSConfig if client-relevant, then add to expected list in TestCopyClientTLSConfig", extra.List()) - } -} - -func TestGetClientIP(t *testing.T) { - ipString := "10.0.0.1" - ip := net.ParseIP(ipString) - invalidIPString := "invalidIPString" - testCases := []struct { - Request http.Request - ExpectedIP net.IP - }{ - { - Request: http.Request{}, - }, - { - Request: http.Request{ - Header: map[string][]string{ - "X-Real-Ip": {ipString}, - }, - }, - ExpectedIP: ip, - }, - { - Request: http.Request{ - Header: map[string][]string{ - "X-Real-Ip": {invalidIPString}, - }, - }, - }, - { - Request: http.Request{ - Header: map[string][]string{ - "X-Forwarded-For": {ipString}, - }, - }, - ExpectedIP: ip, - }, - { - Request: http.Request{ - Header: map[string][]string{ - "X-Forwarded-For": {invalidIPString}, - }, - }, - }, - { - Request: http.Request{ - Header: map[string][]string{ - "X-Forwarded-For": {invalidIPString + "," + ipString}, - }, - }, - ExpectedIP: ip, - }, - { - Request: http.Request{ - // RemoteAddr is in the form host:port - RemoteAddr: ipString + ":1234", - }, - ExpectedIP: ip, - }, - { - Request: http.Request{ - RemoteAddr: invalidIPString, - }, - }, - { - Request: http.Request{ - Header: map[string][]string{ - "X-Forwarded-For": {invalidIPString}, - }, - // RemoteAddr is in the form host:port - RemoteAddr: ipString, - }, - ExpectedIP: ip, - }, - } - - for i, test := range testCases { - if a, e := GetClientIP(&test.Request), test.ExpectedIP; reflect.DeepEqual(e, a) != true { - t.Fatalf("test case %d failed. expected: %v, actual: %v", i, e, a) - } - } -} - -func TestProxierWithNoProxyCIDR(t *testing.T) { - testCases := []struct { - name string - noProxy string - url string - - expectedDelegated bool - }{ - { - name: "no env", - url: "https://192.168.143.1/api", - expectedDelegated: true, - }, - { - name: "no cidr", - noProxy: "192.168.63.1", - url: "https://192.168.143.1/api", - expectedDelegated: true, - }, - { - name: "hostname", - noProxy: "192.168.63.0/24,192.168.143.0/24", - url: "https://my-hostname/api", - expectedDelegated: true, - }, - { - name: "match second cidr", - noProxy: "192.168.63.0/24,192.168.143.0/24", - url: "https://192.168.143.1/api", - expectedDelegated: false, - }, - { - name: "match second cidr with host:port", - noProxy: "192.168.63.0/24,192.168.143.0/24", - url: "https://192.168.143.1:8443/api", - expectedDelegated: false, - }, - } - - for _, test := range testCases { - os.Setenv("NO_PROXY", test.noProxy) - actualDelegated := false - proxyFunc := NewProxierWithNoProxyCIDR(func(req *http.Request) (*url.URL, error) { - actualDelegated = true - return nil, nil - }) - - req, err := http.NewRequest("GET", test.url, nil) - if err != nil { - t.Errorf("%s: unexpected err: %v", test.name, err) - continue - } - if _, err := proxyFunc(req); err != nil { - t.Errorf("%s: unexpected err: %v", test.name, err) - continue - } - - if test.expectedDelegated != actualDelegated { - t.Errorf("%s: expected %v, got %v", test.name, test.expectedDelegated, actualDelegated) - continue - } - } -} - -type fakeTLSClientConfigHolder struct { - called bool -} - -func (f *fakeTLSClientConfigHolder) TLSClientConfig() *tls.Config { - f.called = true - return nil -} -func (f *fakeTLSClientConfigHolder) RoundTrip(*http.Request) (*http.Response, error) { - return nil, nil -} - -func TestTLSClientConfigHolder(t *testing.T) { - rt := &fakeTLSClientConfigHolder{} - TLSClientConfig(rt) - - if !rt.called { - t.Errorf("didn't find tls config") - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/util/net/interface.go b/vendor/k8s.io/kubernetes/pkg/util/net/interface.go deleted file mode 100644 index a1e53d2e..00000000 --- a/vendor/k8s.io/kubernetes/pkg/util/net/interface.go +++ /dev/null @@ -1,278 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package net - -import ( - "bufio" - "encoding/hex" - "fmt" - "io" - "net" - "os" - - "strings" - - "github.com/golang/glog" -) - -type Route struct { - Interface string - Destination net.IP - Gateway net.IP - // TODO: add more fields here if needed -} - -func getRoutes(input io.Reader) ([]Route, error) { - routes := []Route{} - if input == nil { - return nil, fmt.Errorf("input is nil") - } - scanner := bufio.NewReader(input) - for { - line, err := scanner.ReadString('\n') - if err == io.EOF { - break - } - //ignore the headers in the route info - if strings.HasPrefix(line, "Iface") { - continue - } - fields := strings.Fields(line) - routes = append(routes, Route{}) - route := &routes[len(routes)-1] - route.Interface = fields[0] - ip, err := parseIP(fields[1]) - if err != nil { - return nil, err - } - route.Destination = ip - ip, err = parseIP(fields[2]) - if err != nil { - return nil, err - } - route.Gateway = ip - } - return routes, nil -} - -func parseIP(str string) (net.IP, error) { - if str == "" { - return nil, fmt.Errorf("input is nil") - } - bytes, err := hex.DecodeString(str) - if err != nil { - return nil, err - } - //TODO add ipv6 support - if len(bytes) != net.IPv4len { - return nil, fmt.Errorf("only IPv4 is supported") - } - bytes[0], bytes[1], bytes[2], bytes[3] = bytes[3], bytes[2], bytes[1], bytes[0] - return net.IP(bytes), nil -} - -func isInterfaceUp(intf *net.Interface) bool { - if intf == nil { - return false - } - if intf.Flags&net.FlagUp != 0 { - glog.V(4).Infof("Interface %v is up", intf.Name) - return true - } - return false -} - -//getFinalIP method receives all the IP addrs of a Interface -//and returns a nil if the address is Loopback, Ipv6, link-local or nil. -//It returns a valid IPv4 if an Ipv4 address is found in the array. -func getFinalIP(addrs []net.Addr) (net.IP, error) { - if len(addrs) > 0 { - for i := range addrs { - glog.V(4).Infof("Checking addr %s.", addrs[i].String()) - ip, _, err := net.ParseCIDR(addrs[i].String()) - if err != nil { - return nil, err - } - //Only IPv4 - //TODO : add IPv6 support - if ip.To4() != nil { - if !ip.IsLoopback() && !ip.IsLinkLocalMulticast() && !ip.IsLinkLocalUnicast() { - glog.V(4).Infof("IP found %v", ip) - return ip, nil - } else { - glog.V(4).Infof("Loopback/link-local found %v", ip) - } - } else { - glog.V(4).Infof("%v is not a valid IPv4 address", ip) - } - - } - } - return nil, nil -} - -func getIPFromInterface(intfName string, nw networkInterfacer) (net.IP, error) { - intf, err := nw.InterfaceByName(intfName) - if err != nil { - return nil, err - } - if isInterfaceUp(intf) { - addrs, err := nw.Addrs(intf) - if err != nil { - return nil, err - } - glog.V(4).Infof("Interface %q has %d addresses :%v.", intfName, len(addrs), addrs) - finalIP, err := getFinalIP(addrs) - if err != nil { - return nil, err - } - if finalIP != nil { - glog.V(4).Infof("valid IPv4 address for interface %q found as %v.", intfName, finalIP) - return finalIP, nil - } - } - - return nil, nil -} - -func flagsSet(flags net.Flags, test net.Flags) bool { - return flags&test != 0 -} - -func flagsClear(flags net.Flags, test net.Flags) bool { - return flags&test == 0 -} - -func chooseHostInterfaceNativeGo() (net.IP, error) { - intfs, err := net.Interfaces() - if err != nil { - return nil, err - } - i := 0 - var ip net.IP - for i = range intfs { - if flagsSet(intfs[i].Flags, net.FlagUp) && flagsClear(intfs[i].Flags, net.FlagLoopback|net.FlagPointToPoint) { - addrs, err := intfs[i].Addrs() - if err != nil { - return nil, err - } - if len(addrs) > 0 { - for _, addr := range addrs { - if addrIP, _, err := net.ParseCIDR(addr.String()); err == nil { - if addrIP.To4() != nil { - ip = addrIP.To4() - if !ip.IsLinkLocalMulticast() && !ip.IsLinkLocalUnicast() { - break - } - } - } - } - if ip != nil { - // This interface should suffice. - break - } - } - } - } - if ip == nil { - return nil, fmt.Errorf("no acceptable interface from host") - } - glog.V(4).Infof("Choosing interface %s (IP %v) as default", intfs[i].Name, ip) - return ip, nil -} - -//ChooseHostInterface is a method used fetch an IP for a daemon. -//It uses data from /proc/net/route file. -//For a node with no internet connection ,it returns error -//For a multi n/w interface node it returns the IP of the interface with gateway on it. -func ChooseHostInterface() (net.IP, error) { - inFile, err := os.Open("/proc/net/route") - if err != nil { - if os.IsNotExist(err) { - return chooseHostInterfaceNativeGo() - } - return nil, err - } - defer inFile.Close() - var nw networkInterfacer = networkInterface{} - return chooseHostInterfaceFromRoute(inFile, nw) -} - -type networkInterfacer interface { - InterfaceByName(intfName string) (*net.Interface, error) - Addrs(intf *net.Interface) ([]net.Addr, error) -} - -type networkInterface struct{} - -func (_ networkInterface) InterfaceByName(intfName string) (*net.Interface, error) { - intf, err := net.InterfaceByName(intfName) - if err != nil { - return nil, err - } - return intf, nil -} - -func (_ networkInterface) Addrs(intf *net.Interface) ([]net.Addr, error) { - addrs, err := intf.Addrs() - if err != nil { - return nil, err - } - return addrs, nil -} - -func chooseHostInterfaceFromRoute(inFile io.Reader, nw networkInterfacer) (net.IP, error) { - routes, err := getRoutes(inFile) - if err != nil { - return nil, err - } - zero := net.IP{0, 0, 0, 0} - var finalIP net.IP - for i := range routes { - //find interface with gateway - if routes[i].Destination.Equal(zero) { - glog.V(4).Infof("Default route transits interface %q", routes[i].Interface) - finalIP, err := getIPFromInterface(routes[i].Interface, nw) - if err != nil { - return nil, err - } - if finalIP != nil { - glog.V(4).Infof("Choosing IP %v ", finalIP) - return finalIP, nil - } - } - } - glog.V(4).Infof("No valid IP found") - if finalIP == nil { - return nil, fmt.Errorf("Unable to select an IP.") - } - return nil, nil -} - -// If bind-address is usable, return it directly -// If bind-address is not usable (unset, 0.0.0.0, or loopback), we will use the host's default -// interface. -func ChooseBindAddress(bindAddress net.IP) (net.IP, error) { - if bindAddress == nil || bindAddress.IsUnspecified() || bindAddress.IsLoopback() { - hostIP, err := ChooseHostInterface() - if err != nil { - return nil, err - } - bindAddress = hostIP - } - return bindAddress, nil -} diff --git a/vendor/k8s.io/kubernetes/pkg/util/net/interface_test.go b/vendor/k8s.io/kubernetes/pkg/util/net/interface_test.go deleted file mode 100644 index fc66904c..00000000 --- a/vendor/k8s.io/kubernetes/pkg/util/net/interface_test.go +++ /dev/null @@ -1,300 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package net - -import ( - "fmt" - "io" - "net" - "strings" - "testing" -) - -const gatewayfirst = `Iface Destination Gateway Flags RefCnt Use Metric Mask MTU Window IRTT -eth3 00000000 0100FE0A 0003 0 0 1024 00000000 0 0 0 -eth3 0000FE0A 00000000 0001 0 0 0 0080FFFF 0 0 0 -docker0 000011AC 00000000 0001 0 0 0 0000FFFF 0 0 0 -virbr0 007AA8C0 00000000 0001 0 0 0 00FFFFFF 0 0 0 -` -const gatewaylast = `Iface Destination Gateway Flags RefCnt Use Metric Mask MTU Window IRTT -docker0 000011AC 00000000 0001 0 0 0 0000FFFF 0 0 0 -virbr0 007AA8C0 00000000 0001 0 0 0 00FFFFFF 0 0 0 -eth3 0000FE0A 00000000 0001 0 0 0 0080FFFF 0 0 0 -eth3 00000000 0100FE0A 0003 0 0 1024 00000000 0 0 0 -` -const gatewaymiddle = `Iface Destination Gateway Flags RefCnt Use Metric Mask MTU Window IRTT -eth3 0000FE0A 00000000 0001 0 0 0 0080FFFF 0 0 0 -docker0 000011AC 00000000 0001 0 0 0 0000FFFF 0 0 0 -eth3 00000000 0100FE0A 0003 0 0 1024 00000000 0 0 0 -virbr0 007AA8C0 00000000 0001 0 0 0 00FFFFFF 0 0 0 -` -const noInternetConnection = `Iface Destination Gateway Flags RefCnt Use Metric Mask MTU Window IRTT -docker0 000011AC 00000000 0001 0 0 0 0000FFFF 0 0 0 -virbr0 007AA8C0 00000000 0001 0 0 0 00FFFFFF 0 0 0 -` -const nothing = `Iface Destination Gateway Flags RefCnt Use Metric Mask MTU Window IRTT -` -const gatewayfirstIpv6_1 = `Iface Destination Gateway Flags RefCnt Use Metric Mask MTU Window IRTT -eth3 00000000 0100FE0A 0003 0 0 1024 00000000 0 0 0 -eth3 0000FE0AA1 00000000 0001 0 0 0 0080FFFF 0 0 0 -docker0 000011AC 00000000 0001 0 0 0 0000FFFF 0 0 0 -virbr0 007AA8C0 00000000 0001 0 0 0 00FFFFFF 0 0 0 -` -const gatewayfirstIpv6_2 = `Iface Destination Gateway Flags RefCnt Use Metric Mask MTU Window IRTT -eth3 00000000 0100FE0AA1 0003 0 0 1024 00000000 0 0 0 -eth3 0000FE0A 00000000 0001 0 0 0 0080FFFF 0 0 0 -docker0 000011AC 00000000 0001 0 0 0 0000FFFF 0 0 0 -virbr0 007AA8C0 00000000 0001 0 0 0 00FFFFFF 0 0 0 -` -const route_Invalidhex = `Iface Destination Gateway Flags RefCnt Use Metric Mask MTU Window IRTT -eth3 00000000 0100FE0AA 0003 0 0 1024 00000000 0 0 0 -eth3 0000FE0A 00000000 0001 0 0 0 0080FFFF 0 0 0 -docker0 000011AC 00000000 0001 0 0 0 0000FFFF 0 0 0 -virbr0 007AA8C0 00000000 0001 0 0 0 00FFFFFF 0 0 0 -` - -// Based on DigitalOcean COREOS -const gatewayfirstLinkLocal = `Iface Destination Gateway Flags RefCnt Use Metric Mask MTU Window IRTT -eth0 00000000 0120372D 0001 0 0 0 00000000 0 0 0 -eth0 00000000 00000000 0001 0 0 2048 00000000 0 0 0 -` - -func TestGetRoutes(t *testing.T) { - testCases := []struct { - tcase string - route string - expected int - }{ - {"gatewayfirst", gatewayfirst, 4}, - {"gatewaymiddle", gatewaymiddle, 4}, - {"gatewaylast", gatewaylast, 4}, - {"nothing", nothing, 0}, - {"gatewayfirstIpv6_1", gatewayfirstIpv6_1, 0}, - {"gatewayfirstIpv6_2", gatewayfirstIpv6_2, 0}, - {"route_Invalidhex", route_Invalidhex, 0}, - } - for _, tc := range testCases { - r := strings.NewReader(tc.route) - routes, err := getRoutes(r) - if len(routes) != tc.expected { - t.Errorf("case[%v]: expected %v, got %v .err : %v", tc.tcase, tc.expected, len(routes), err) - } - } -} - -func TestParseIP(t *testing.T) { - testCases := []struct { - tcase string - ip string - success bool - expected net.IP - }{ - {"empty", "", false, nil}, - {"too short", "AA", false, nil}, - {"too long", "0011223344", false, nil}, - {"invalid", "invalid!", false, nil}, - {"zero", "00000000", true, net.IP{0, 0, 0, 0}}, - {"ffff", "FFFFFFFF", true, net.IP{0xff, 0xff, 0xff, 0xff}}, - {"valid", "12345678", true, net.IP{120, 86, 52, 18}}, - } - for _, tc := range testCases { - ip, err := parseIP(tc.ip) - if !ip.Equal(tc.expected) { - t.Errorf("case[%v]: expected %q, got %q . err : %v", tc.tcase, tc.expected, ip, err) - } - } -} - -func TestIsInterfaceUp(t *testing.T) { - testCases := []struct { - tcase string - intf net.Interface - expected bool - }{ - {"up", net.Interface{Index: 0, MTU: 0, Name: "eth3", HardwareAddr: nil, Flags: net.FlagUp}, true}, - {"down", net.Interface{Index: 0, MTU: 0, Name: "eth3", HardwareAddr: nil, Flags: 0}, false}, - {"nothing", net.Interface{}, false}, - } - for _, tc := range testCases { - it := isInterfaceUp(&tc.intf) - if it != tc.expected { - t.Errorf("case[%v]: expected %v, got %v .", tc.tcase, tc.expected, it) - } - } -} - -type addrStruct struct{ val string } - -func (a addrStruct) Network() string { - return a.val -} -func (a addrStruct) String() string { - return a.val -} - -func TestFinalIP(t *testing.T) { - testCases := []struct { - tcase string - addr []net.Addr - expected net.IP - }{ - {"ipv6", []net.Addr{addrStruct{val: "fe80::2f7:6fff:fe6e:2956/64"}}, nil}, - {"invalidCIDR", []net.Addr{addrStruct{val: "fe80::2f7:67fff:fe6e:2956/64"}}, nil}, - {"loopback", []net.Addr{addrStruct{val: "127.0.0.1/24"}}, nil}, - {"ip4", []net.Addr{addrStruct{val: "10.254.12.132/17"}}, net.ParseIP("10.254.12.132")}, - - {"nothing", []net.Addr{}, nil}, - } - for _, tc := range testCases { - ip, err := getFinalIP(tc.addr) - if !ip.Equal(tc.expected) { - t.Errorf("case[%v]: expected %v, got %v .err : %v", tc.tcase, tc.expected, ip, err) - } - } -} - -func TestAddrs(t *testing.T) { - var nw networkInterfacer = validNetworkInterface{} - intf := net.Interface{Index: 0, MTU: 0, Name: "eth3", HardwareAddr: nil, Flags: 0} - addrs, err := nw.Addrs(&intf) - if err != nil { - t.Errorf("expected no error got : %v", err) - } - if len(addrs) != 2 { - t.Errorf("expected addrs: 2 got null") - } -} - -type validNetworkInterface struct { -} - -func (_ validNetworkInterface) InterfaceByName(intfName string) (*net.Interface, error) { - c := net.Interface{Index: 0, MTU: 0, Name: "eth3", HardwareAddr: nil, Flags: net.FlagUp} - return &c, nil -} -func (_ validNetworkInterface) Addrs(intf *net.Interface) ([]net.Addr, error) { - var ifat []net.Addr - ifat = []net.Addr{ - addrStruct{val: "fe80::2f7:6fff:fe6e:2956/64"}, addrStruct{val: "10.254.71.145/17"}} - return ifat, nil -} - -type validNetworkInterfaceWithLinkLocal struct { -} - -func (_ validNetworkInterfaceWithLinkLocal) InterfaceByName(intfName string) (*net.Interface, error) { - c := net.Interface{Index: 0, MTU: 0, Name: "eth0", HardwareAddr: nil, Flags: net.FlagUp} - return &c, nil -} -func (_ validNetworkInterfaceWithLinkLocal) Addrs(intf *net.Interface) ([]net.Addr, error) { - var ifat []net.Addr - ifat = []net.Addr{addrStruct{val: "169.254.162.166/16"}, addrStruct{val: "45.55.47.146/19"}} - return ifat, nil -} - -type validNetworkInterfacewithIpv6Only struct { -} - -func (_ validNetworkInterfacewithIpv6Only) InterfaceByName(intfName string) (*net.Interface, error) { - c := net.Interface{Index: 0, MTU: 0, Name: "eth3", HardwareAddr: nil, Flags: net.FlagUp} - return &c, nil -} -func (_ validNetworkInterfacewithIpv6Only) Addrs(intf *net.Interface) ([]net.Addr, error) { - var ifat []net.Addr - ifat = []net.Addr{addrStruct{val: "fe80::2f7:6fff:fe6e:2956/64"}} - return ifat, nil -} - -type noNetworkInterface struct { -} - -func (_ noNetworkInterface) InterfaceByName(intfName string) (*net.Interface, error) { - return nil, fmt.Errorf("unable get Interface") -} -func (_ noNetworkInterface) Addrs(intf *net.Interface) ([]net.Addr, error) { - return nil, nil -} - -type networkInterfacewithNoAddrs struct { -} - -func (_ networkInterfacewithNoAddrs) InterfaceByName(intfName string) (*net.Interface, error) { - c := net.Interface{Index: 0, MTU: 0, Name: "eth3", HardwareAddr: nil, Flags: net.FlagUp} - return &c, nil -} -func (_ networkInterfacewithNoAddrs) Addrs(intf *net.Interface) ([]net.Addr, error) { - return nil, fmt.Errorf("unable get Addrs") -} - -type networkInterfacewithIpv6addrs struct { -} - -func (_ networkInterfacewithIpv6addrs) InterfaceByName(intfName string) (*net.Interface, error) { - c := net.Interface{Index: 0, MTU: 0, Name: "eth3", HardwareAddr: nil, Flags: net.FlagUp} - return &c, nil -} -func (_ networkInterfacewithIpv6addrs) Addrs(intf *net.Interface) ([]net.Addr, error) { - var ifat []net.Addr - ifat = []net.Addr{addrStruct{val: "fe80::2f7:6ffff:fe6e:2956/64"}} - return ifat, nil -} - -func TestGetIPFromInterface(t *testing.T) { - testCases := []struct { - tcase string - nwname string - nw networkInterfacer - expected net.IP - }{ - {"valid", "eth3", validNetworkInterface{}, net.ParseIP("10.254.71.145")}, - {"ipv6", "eth3", validNetworkInterfacewithIpv6Only{}, nil}, - {"nothing", "eth3", noNetworkInterface{}, nil}, - } - for _, tc := range testCases { - ip, err := getIPFromInterface(tc.nwname, tc.nw) - if !ip.Equal(tc.expected) { - t.Errorf("case[%v]: expected %v, got %+v .err : %v", tc.tcase, tc.expected, ip, err) - } - } -} - -func TestChooseHostInterfaceFromRoute(t *testing.T) { - testCases := []struct { - tcase string - inFile io.Reader - nw networkInterfacer - expected net.IP - }{ - {"valid_routefirst", strings.NewReader(gatewayfirst), validNetworkInterface{}, net.ParseIP("10.254.71.145")}, - {"valid_routelast", strings.NewReader(gatewaylast), validNetworkInterface{}, net.ParseIP("10.254.71.145")}, - {"valid_routemiddle", strings.NewReader(gatewaymiddle), validNetworkInterface{}, net.ParseIP("10.254.71.145")}, - {"valid_routemiddle_ipv6", strings.NewReader(gatewaymiddle), validNetworkInterfacewithIpv6Only{}, nil}, - {"no internet connection", strings.NewReader(noInternetConnection), validNetworkInterface{}, nil}, - {"no non-link-local ip", strings.NewReader(gatewayfirstLinkLocal), validNetworkInterfaceWithLinkLocal{}, net.ParseIP("45.55.47.146")}, - {"no route", strings.NewReader(nothing), validNetworkInterface{}, nil}, - {"no route file", nil, validNetworkInterface{}, nil}, - {"no interfaces", nil, noNetworkInterface{}, nil}, - {"no interface Addrs", strings.NewReader(gatewaymiddle), networkInterfacewithNoAddrs{}, nil}, - {"Invalid Addrs", strings.NewReader(gatewaymiddle), networkInterfacewithIpv6addrs{}, nil}, - } - for _, tc := range testCases { - ip, err := chooseHostInterfaceFromRoute(tc.inFile, tc.nw) - if !ip.Equal(tc.expected) { - t.Errorf("case[%v]: expected %v, got %+v .err : %v", tc.tcase, tc.expected, ip, err) - } - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/util/net/port_range.go b/vendor/k8s.io/kubernetes/pkg/util/net/port_range.go deleted file mode 100644 index 6a50e618..00000000 --- a/vendor/k8s.io/kubernetes/pkg/util/net/port_range.go +++ /dev/null @@ -1,113 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package net - -import ( - "fmt" - "strconv" - "strings" -) - -// PortRange represents a range of TCP/UDP ports. To represent a single port, -// set Size to 1. -type PortRange struct { - Base int - Size int -} - -// Contains tests whether a given port falls within the PortRange. -func (pr *PortRange) Contains(p int) bool { - return (p >= pr.Base) && ((p - pr.Base) < pr.Size) -} - -// String converts the PortRange to a string representation, which can be -// parsed by PortRange.Set or ParsePortRange. -func (pr PortRange) String() string { - if pr.Size == 0 { - return "" - } - return fmt.Sprintf("%d-%d", pr.Base, pr.Base+pr.Size-1) -} - -// Set parses a string of the form "min-max", inclusive at both ends, and -// sets the PortRange from it. This is part of the flag.Value and pflag.Value -// interfaces. -func (pr *PortRange) Set(value string) error { - value = strings.TrimSpace(value) - - // TODO: Accept "80" syntax - // TODO: Accept "80+8" syntax - - if value == "" { - pr.Base = 0 - pr.Size = 0 - return nil - } - - hyphenIndex := strings.Index(value, "-") - if hyphenIndex == -1 { - return fmt.Errorf("expected hyphen in port range") - } - - var err error - var low int - var high int - low, err = strconv.Atoi(value[:hyphenIndex]) - if err == nil { - high, err = strconv.Atoi(value[hyphenIndex+1:]) - } - if err != nil { - return fmt.Errorf("unable to parse port range: %s: %v", value, err) - } - - if low > 65535 || high > 65535 { - return fmt.Errorf("the port range cannot be greater than 65535: %s", value) - } - - if high < low { - return fmt.Errorf("end port cannot be less than start port: %s", value) - } - - pr.Base = low - pr.Size = 1 + high - low - return nil -} - -// Type returns a descriptive string about this type. This is part of the -// pflag.Value interface. -func (*PortRange) Type() string { - return "portRange" -} - -// ParsePortRange parses a string of the form "min-max", inclusive at both -// ends, and initializs a new PortRange from it. -func ParsePortRange(value string) (*PortRange, error) { - pr := &PortRange{} - err := pr.Set(value) - if err != nil { - return nil, err - } - return pr, nil -} - -func ParsePortRangeOrDie(value string) *PortRange { - pr, err := ParsePortRange(value) - if err != nil { - panic(fmt.Sprintf("couldn't parse port range %q: %v", value, err)) - } - return pr -} diff --git a/vendor/k8s.io/kubernetes/pkg/util/net/port_range_test.go b/vendor/k8s.io/kubernetes/pkg/util/net/port_range_test.go deleted file mode 100644 index 897b8df6..00000000 --- a/vendor/k8s.io/kubernetes/pkg/util/net/port_range_test.go +++ /dev/null @@ -1,69 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package net - -import ( - "testing" - - flag "github.com/spf13/pflag" -) - -func TestPortRange(t *testing.T) { - testCases := []struct { - input string - success bool - expected string - included int - excluded int - }{ - {"100-200", true, "100-200", 200, 201}, - {" 100-200 ", true, "100-200", 200, 201}, - {"0-0", true, "0-0", 0, 1}, - {"", true, "", -1, 0}, - {"100", false, "", -1, -1}, - {"100 - 200", false, "", -1, -1}, - {"-100", false, "", -1, -1}, - {"100-", false, "", -1, -1}, - {"200-100", false, "", -1, -1}, - {"60000-70000", false, "", -1, -1}, - {"70000-80000", false, "", -1, -1}, - } - - for i := range testCases { - tc := &testCases[i] - pr := &PortRange{} - var f flag.Value = pr - err := f.Set(tc.input) - if err != nil && tc.success == true { - t.Errorf("expected success, got %q", err) - continue - } else if err == nil && tc.success == false { - t.Errorf("expected failure") - continue - } else if tc.success { - if f.String() != tc.expected { - t.Errorf("expected %q, got %q", tc.expected, f.String()) - } - if tc.included >= 0 && !pr.Contains(tc.included) { - t.Errorf("expected %q to include %d", f.String(), tc.included) - } - if tc.excluded >= 0 && pr.Contains(tc.excluded) { - t.Errorf("expected %q to exclude %d", f.String(), tc.excluded) - } - } - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/util/net/port_split.go b/vendor/k8s.io/kubernetes/pkg/util/net/port_split.go deleted file mode 100644 index 29c985ed..00000000 --- a/vendor/k8s.io/kubernetes/pkg/util/net/port_split.go +++ /dev/null @@ -1,77 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package net - -import ( - "strings" - - "k8s.io/kubernetes/pkg/util/sets" -) - -var validSchemes = sets.NewString("http", "https", "") - -// SplitSchemeNamePort takes a string of the following forms: -// * "", returns "", "","", true -// * ":", returns "", "","",true -// * "::", returns "","","",true -// -// Name must be non-empty or valid will be returned false. -// Scheme must be "http" or "https" if specified -// Port is returned as a string, and it is not required to be numeric (could be -// used for a named port, for example). -func SplitSchemeNamePort(id string) (scheme, name, port string, valid bool) { - parts := strings.Split(id, ":") - switch len(parts) { - case 1: - name = parts[0] - case 2: - name = parts[0] - port = parts[1] - case 3: - scheme = parts[0] - name = parts[1] - port = parts[2] - default: - return "", "", "", false - } - - if len(name) > 0 && validSchemes.Has(scheme) { - return scheme, name, port, true - } else { - return "", "", "", false - } -} - -// JoinSchemeNamePort returns a string that specifies the scheme, name, and port: -// * "" -// * ":" -// * "::" -// None of the parameters may contain a ':' character -// Name is required -// Scheme must be "", "http", or "https" -func JoinSchemeNamePort(scheme, name, port string) string { - if len(scheme) > 0 { - // Must include three segments to specify scheme - return scheme + ":" + name + ":" + port - } - if len(port) > 0 { - // Must include two segments to specify port - return name + ":" + port - } - // Return name alone - return name -} diff --git a/vendor/k8s.io/kubernetes/pkg/util/net/port_split_test.go b/vendor/k8s.io/kubernetes/pkg/util/net/port_split_test.go deleted file mode 100644 index e801bdbe..00000000 --- a/vendor/k8s.io/kubernetes/pkg/util/net/port_split_test.go +++ /dev/null @@ -1,121 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package net - -import ( - "testing" -) - -func TestSplitSchemeNamePort(t *testing.T) { - table := []struct { - in string - name, port, scheme string - valid bool - normalized bool - }{ - { - in: "aoeu:asdf", - name: "aoeu", - port: "asdf", - valid: true, - normalized: true, - }, { - in: "http:aoeu:asdf", - scheme: "http", - name: "aoeu", - port: "asdf", - valid: true, - normalized: true, - }, { - in: "https:aoeu:", - scheme: "https", - name: "aoeu", - port: "", - valid: true, - normalized: false, - }, { - in: "https:aoeu:asdf", - scheme: "https", - name: "aoeu", - port: "asdf", - valid: true, - normalized: true, - }, { - in: "aoeu:", - name: "aoeu", - valid: true, - normalized: false, - }, { - in: "aoeu", - name: "aoeu", - valid: true, - normalized: true, - }, { - in: ":asdf", - valid: false, - }, { - in: "aoeu:asdf:htns", - valid: false, - }, { - in: "http::asdf", - valid: false, - }, { - in: "http::", - valid: false, - }, { - in: "", - valid: false, - }, - } - - for _, item := range table { - scheme, name, port, valid := SplitSchemeNamePort(item.in) - if e, a := item.scheme, scheme; e != a { - t.Errorf("%q: Wanted %q, got %q", item.in, e, a) - } - if e, a := item.name, name; e != a { - t.Errorf("%q: Wanted %q, got %q", item.in, e, a) - } - if e, a := item.port, port; e != a { - t.Errorf("%q: Wanted %q, got %q", item.in, e, a) - } - if e, a := item.valid, valid; e != a { - t.Errorf("%q: Wanted %t, got %t", item.in, e, a) - } - - // Make sure valid items round trip through JoinSchemeNamePort - if item.valid { - out := JoinSchemeNamePort(scheme, name, port) - if item.normalized && out != item.in { - t.Errorf("%q: Wanted %s, got %s", item.in, item.in, out) - } - scheme, name, port, valid := SplitSchemeNamePort(out) - if e, a := item.scheme, scheme; e != a { - t.Errorf("%q: Wanted %q, got %q", item.in, e, a) - } - if e, a := item.name, name; e != a { - t.Errorf("%q: Wanted %q, got %q", item.in, e, a) - } - if e, a := item.port, port; e != a { - t.Errorf("%q: Wanted %q, got %q", item.in, e, a) - } - if e, a := item.valid, valid; e != a { - t.Errorf("%q: Wanted %t, got %t", item.in, e, a) - } - } - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/util/net/util.go b/vendor/k8s.io/kubernetes/pkg/util/net/util.go deleted file mode 100644 index 461144f0..00000000 --- a/vendor/k8s.io/kubernetes/pkg/util/net/util.go +++ /dev/null @@ -1,46 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package net - -import ( - "net" - "reflect" - "syscall" -) - -// IPNetEqual checks if the two input IPNets are representing the same subnet. -// For example, -// 10.0.0.1/24 and 10.0.0.0/24 are the same subnet. -// 10.0.0.1/24 and 10.0.0.0/25 are not the same subnet. -func IPNetEqual(ipnet1, ipnet2 *net.IPNet) bool { - if ipnet1 == nil || ipnet2 == nil { - return false - } - if reflect.DeepEqual(ipnet1.Mask, ipnet2.Mask) && ipnet1.Contains(ipnet2.IP) && ipnet2.Contains(ipnet1.IP) { - return true - } - return false -} - -// Returns if the given err is "connection reset by peer" error. -func IsConnectionReset(err error) bool { - opErr, ok := err.(*net.OpError) - if ok && opErr.Err.Error() == syscall.ECONNRESET.Error() { - return true - } - return false -} diff --git a/vendor/k8s.io/kubernetes/pkg/util/net/util_test.go b/vendor/k8s.io/kubernetes/pkg/util/net/util_test.go deleted file mode 100644 index bcbef753..00000000 --- a/vendor/k8s.io/kubernetes/pkg/util/net/util_test.go +++ /dev/null @@ -1,68 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package net - -import ( - "net" - "testing" -) - -func getIPNet(cidr string) *net.IPNet { - _, ipnet, _ := net.ParseCIDR(cidr) - return ipnet -} - -func TestIPNetEqual(t *testing.T) { - testCases := []struct { - ipnet1 *net.IPNet - ipnet2 *net.IPNet - expect bool - }{ - //null case - { - getIPNet("10.0.0.1/24"), - getIPNet(""), - false, - }, - { - getIPNet("10.0.0.0/24"), - getIPNet("10.0.0.0/24"), - true, - }, - { - getIPNet("10.0.0.0/24"), - getIPNet("10.0.0.1/24"), - true, - }, - { - getIPNet("10.0.0.0/25"), - getIPNet("10.0.0.0/24"), - false, - }, - { - getIPNet("10.0.1.0/24"), - getIPNet("10.0.0.0/24"), - false, - }, - } - - for _, tc := range testCases { - if tc.expect != IPNetEqual(tc.ipnet1, tc.ipnet2) { - t.Errorf("Expect equality of %s and %s be to %v", tc.ipnet1.String(), tc.ipnet2.String(), tc.expect) - } - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/util/node/node.go b/vendor/k8s.io/kubernetes/pkg/util/node/node.go index 8e85e835..a37e8665 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/node/node.go +++ b/vendor/k8s.io/kubernetes/pkg/util/node/node.go @@ -177,7 +177,7 @@ func PatchNodeStatus(c clientset.Interface, nodeName types.NodeName, oldNode *v1 return nil, fmt.Errorf("failed to create patch for node %q: %v", nodeName, err) } - updatedNode, err := c.Core().Nodes().Patch(string(nodeName), api.StrategicMergePatchType, patchBytes, "status") + updatedNode, err := c.Core().Nodes().Patch(string(nodeName), types.StrategicMergePatchType, patchBytes, "status") if err != nil { return nil, fmt.Errorf("failed to patch status %q for node %q: %v", patchBytes, nodeName, err) } diff --git a/vendor/k8s.io/kubernetes/pkg/util/node/node_test.go b/vendor/k8s.io/kubernetes/pkg/util/node/node_test.go index ddf7c330..ca8fb15f 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/node/node_test.go +++ b/vendor/k8s.io/kubernetes/pkg/util/node/node_test.go @@ -72,7 +72,7 @@ func TestGetPreferredAddress(t *testing.T) { for k, tc := range testcases { node := &v1.Node{ - ObjectMeta: v1.ObjectMeta{Labels: tc.Labels}, + ObjectMeta: metav1.ObjectMeta{Labels: tc.Labels}, Status: v1.NodeStatus{Addresses: tc.Addresses}, } address, err := GetPreferredNodeAddress(node, tc.Preferences) diff --git a/vendor/k8s.io/kubernetes/pkg/util/runtime/.readonly b/vendor/k8s.io/kubernetes/pkg/util/runtime/.readonly deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/k8s.io/kubernetes/pkg/util/runtime/BUILD b/vendor/k8s.io/kubernetes/pkg/util/runtime/BUILD index f4812dd2..deefdcef 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/runtime/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/util/runtime/BUILD @@ -5,20 +5,11 @@ licenses(["notice"]) load( "@io_bazel_rules_go//go:def.bzl", "go_library", - "go_test", ) go_library( name = "go_default_library", - srcs = ["runtime.go"], - tags = ["automanaged"], - deps = ["//vendor:github.com/golang/glog"], -) - -go_test( - name = "go_default_test", - srcs = ["runtime_test.go"], - library = ":go_default_library", + srcs = ["doc.go"], tags = ["automanaged"], ) diff --git a/vendor/k8s.io/kubernetes/pkg/util/runtime/doc.go b/vendor/k8s.io/kubernetes/pkg/util/runtime/doc.go new file mode 100644 index 00000000..d9aeba6c --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/util/runtime/doc.go @@ -0,0 +1,21 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package runtime only exists until heapster rebases +// TODO genericapiserver remove this empty package. Godep fails without this because heapster relies +// on this package. This will allow us to start splitting packages, but will force +// heapster to update on their next kube rebase. +package runtime diff --git a/vendor/k8s.io/kubernetes/pkg/util/runtime/runtime.go b/vendor/k8s.io/kubernetes/pkg/util/runtime/runtime.go deleted file mode 100644 index 976de49d..00000000 --- a/vendor/k8s.io/kubernetes/pkg/util/runtime/runtime.go +++ /dev/null @@ -1,128 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package runtime - -import ( - "fmt" - "runtime" - - "github.com/golang/glog" -) - -var ( - // ReallyCrash controls the behavior of HandleCrash and now defaults - // true. It's still exposed so components can optionally set to false - // to restore prior behavior. - ReallyCrash = true -) - -// PanicHandlers is a list of functions which will be invoked when a panic happens. -var PanicHandlers = []func(interface{}){logPanic} - -// HandleCrash simply catches a crash and logs an error. Meant to be called via -// defer. Additional context-specific handlers can be provided, and will be -// called in case of panic. HandleCrash actually crashes, after calling the -// handlers and logging the panic message. -// -// TODO: remove this function. We are switching to a world where it's safe for -// apiserver to panic, since it will be restarted by kubelet. At the beginning -// of the Kubernetes project, nothing was going to restart apiserver and so -// catching panics was important. But it's actually much simpler for montoring -// software if we just exit when an unexpected panic happens. -func HandleCrash(additionalHandlers ...func(interface{})) { - if r := recover(); r != nil { - for _, fn := range PanicHandlers { - fn(r) - } - for _, fn := range additionalHandlers { - fn(r) - } - if ReallyCrash { - // Actually proceed to panic. - panic(r) - } - } -} - -// logPanic logs the caller tree when a panic occurs. -func logPanic(r interface{}) { - callers := getCallers(r) - glog.Errorf("Observed a panic: %#v (%v)\n%v", r, r, callers) -} - -func getCallers(r interface{}) string { - callers := "" - for i := 0; true; i++ { - _, file, line, ok := runtime.Caller(i) - if !ok { - break - } - callers = callers + fmt.Sprintf("%v:%v\n", file, line) - } - - return callers -} - -// ErrorHandlers is a list of functions which will be invoked when an unreturnable -// error occurs. -var ErrorHandlers = []func(error){logError} - -// HandlerError is a method to invoke when a non-user facing piece of code cannot -// return an error and needs to indicate it has been ignored. Invoking this method -// is preferable to logging the error - the default behavior is to log but the -// errors may be sent to a remote server for analysis. -func HandleError(err error) { - // this is sometimes called with a nil error. We probably shouldn't fail and should do nothing instead - if err == nil { - return - } - - for _, fn := range ErrorHandlers { - fn(err) - } -} - -// logError prints an error with the call stack of the location it was reported -func logError(err error) { - glog.ErrorDepth(2, err) -} - -// GetCaller returns the caller of the function that calls it. -func GetCaller() string { - var pc [1]uintptr - runtime.Callers(3, pc[:]) - f := runtime.FuncForPC(pc[0]) - if f == nil { - return fmt.Sprintf("Unable to find caller") - } - return f.Name() -} - -// RecoverFromPanic replaces the specified error with an error containing the -// original error, and the call tree when a panic occurs. This enables error -// handlers to handle errors and panics the same way. -func RecoverFromPanic(err *error) { - if r := recover(); r != nil { - callers := getCallers(r) - - *err = fmt.Errorf( - "recovered from panic %q. (err=%v) Call stack:\n%v", - r, - *err, - callers) - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/util/runtime/runtime_test.go b/vendor/k8s.io/kubernetes/pkg/util/runtime/runtime_test.go deleted file mode 100644 index 9dff17ea..00000000 --- a/vendor/k8s.io/kubernetes/pkg/util/runtime/runtime_test.go +++ /dev/null @@ -1,71 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package runtime - -import ( - "fmt" - "testing" -) - -func TestHandleCrash(t *testing.T) { - defer func() { - if x := recover(); x == nil { - t.Errorf("Expected a panic to recover from") - } - }() - defer HandleCrash() - panic("Test Panic") -} - -func TestCustomHandleCrash(t *testing.T) { - old := PanicHandlers - defer func() { PanicHandlers = old }() - var result interface{} - PanicHandlers = []func(interface{}){ - func(r interface{}) { - result = r - }, - } - func() { - defer func() { - if x := recover(); x == nil { - t.Errorf("Expected a panic to recover from") - } - }() - defer HandleCrash() - panic("test") - }() - if result != "test" { - t.Errorf("did not receive custom handler") - } -} - -func TestCustomHandleError(t *testing.T) { - old := ErrorHandlers - defer func() { ErrorHandlers = old }() - var result error - ErrorHandlers = []func(error){ - func(err error) { - result = err - }, - } - err := fmt.Errorf("test") - HandleError(err) - if result != err { - t.Errorf("did not receive custom handler") - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/util/sets/.readonly b/vendor/k8s.io/kubernetes/pkg/util/sets/.readonly deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/k8s.io/kubernetes/pkg/util/sets/BUILD b/vendor/k8s.io/kubernetes/pkg/util/sets/BUILD index 481b60bd..9d385a0f 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/sets/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/util/sets/BUILD @@ -5,49 +5,14 @@ licenses(["notice"]) load( "@io_bazel_rules_go//go:def.bzl", "go_library", - "go_test", ) go_library( name = "go_default_library", - srcs = [ - ":set-gen", - ], -) - -go_test( - name = "go_default_test", - srcs = ["set_test.go"], - library = ":go_default_library", + srcs = ["doc.go"], tags = ["automanaged"], ) -genrule( - name = "set-gen", - srcs = [ - "//pkg/util/sets/types:types.go", - "//hack/boilerplate:boilerplate.go.txt", - ], - outs = [ - "byte.go", - "doc.go", - "empty.go", - "int.go", - "int64.go", - "string.go", - ], - cmd = """ -$(location //cmd/libs/go2idl/set-gen) \ - --input-dirs ./pkg/util/sets/types \ - --output-base $(GENDIR)/pkg/util \ - --go-header-file $(location //hack/boilerplate:boilerplate.go.txt) \ - --output-package sets - """, - tools = [ - "//cmd/libs/go2idl/set-gen", - ], -) - filegroup( name = "package-srcs", srcs = glob(["**"]), diff --git a/vendor/k8s.io/kubernetes/pkg/util/sets/byte.go b/vendor/k8s.io/kubernetes/pkg/util/sets/byte.go deleted file mode 100644 index a460e4b1..00000000 --- a/vendor/k8s.io/kubernetes/pkg/util/sets/byte.go +++ /dev/null @@ -1,203 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was autogenerated by set-gen. Do not edit it manually! - -package sets - -import ( - "reflect" - "sort" -) - -// sets.Byte is a set of bytes, implemented via map[byte]struct{} for minimal memory consumption. -type Byte map[byte]Empty - -// New creates a Byte from a list of values. -func NewByte(items ...byte) Byte { - ss := Byte{} - ss.Insert(items...) - return ss -} - -// ByteKeySet creates a Byte from a keys of a map[byte](? extends interface{}). -// If the value passed in is not actually a map, this will panic. -func ByteKeySet(theMap interface{}) Byte { - v := reflect.ValueOf(theMap) - ret := Byte{} - - for _, keyValue := range v.MapKeys() { - ret.Insert(keyValue.Interface().(byte)) - } - return ret -} - -// Insert adds items to the set. -func (s Byte) Insert(items ...byte) { - for _, item := range items { - s[item] = Empty{} - } -} - -// Delete removes all items from the set. -func (s Byte) Delete(items ...byte) { - for _, item := range items { - delete(s, item) - } -} - -// Has returns true if and only if item is contained in the set. -func (s Byte) Has(item byte) bool { - _, contained := s[item] - return contained -} - -// HasAll returns true if and only if all items are contained in the set. -func (s Byte) HasAll(items ...byte) bool { - for _, item := range items { - if !s.Has(item) { - return false - } - } - return true -} - -// HasAny returns true if any items are contained in the set. -func (s Byte) HasAny(items ...byte) bool { - for _, item := range items { - if s.Has(item) { - return true - } - } - return false -} - -// Difference returns a set of objects that are not in s2 -// For example: -// s1 = {a1, a2, a3} -// s2 = {a1, a2, a4, a5} -// s1.Difference(s2) = {a3} -// s2.Difference(s1) = {a4, a5} -func (s Byte) Difference(s2 Byte) Byte { - result := NewByte() - for key := range s { - if !s2.Has(key) { - result.Insert(key) - } - } - return result -} - -// Union returns a new set which includes items in either s1 or s2. -// For example: -// s1 = {a1, a2} -// s2 = {a3, a4} -// s1.Union(s2) = {a1, a2, a3, a4} -// s2.Union(s1) = {a1, a2, a3, a4} -func (s1 Byte) Union(s2 Byte) Byte { - result := NewByte() - for key := range s1 { - result.Insert(key) - } - for key := range s2 { - result.Insert(key) - } - return result -} - -// Intersection returns a new set which includes the item in BOTH s1 and s2 -// For example: -// s1 = {a1, a2} -// s2 = {a2, a3} -// s1.Intersection(s2) = {a2} -func (s1 Byte) Intersection(s2 Byte) Byte { - var walk, other Byte - result := NewByte() - if s1.Len() < s2.Len() { - walk = s1 - other = s2 - } else { - walk = s2 - other = s1 - } - for key := range walk { - if other.Has(key) { - result.Insert(key) - } - } - return result -} - -// IsSuperset returns true if and only if s1 is a superset of s2. -func (s1 Byte) IsSuperset(s2 Byte) bool { - for item := range s2 { - if !s1.Has(item) { - return false - } - } - return true -} - -// Equal returns true if and only if s1 is equal (as a set) to s2. -// Two sets are equal if their membership is identical. -// (In practice, this means same elements, order doesn't matter) -func (s1 Byte) Equal(s2 Byte) bool { - return len(s1) == len(s2) && s1.IsSuperset(s2) -} - -type sortableSliceOfByte []byte - -func (s sortableSliceOfByte) Len() int { return len(s) } -func (s sortableSliceOfByte) Less(i, j int) bool { return lessByte(s[i], s[j]) } -func (s sortableSliceOfByte) Swap(i, j int) { s[i], s[j] = s[j], s[i] } - -// List returns the contents as a sorted byte slice. -func (s Byte) List() []byte { - res := make(sortableSliceOfByte, 0, len(s)) - for key := range s { - res = append(res, key) - } - sort.Sort(res) - return []byte(res) -} - -// UnsortedList returns the slice with contents in random order. -func (s Byte) UnsortedList() []byte { - res := make([]byte, 0, len(s)) - for key := range s { - res = append(res, key) - } - return res -} - -// Returns a single element from the set. -func (s Byte) PopAny() (byte, bool) { - for key := range s { - s.Delete(key) - return key, true - } - var zeroValue byte - return zeroValue, false -} - -// Len returns the size of the set. -func (s Byte) Len() int { - return len(s) -} - -func lessByte(lhs, rhs byte) bool { - return lhs < rhs -} diff --git a/vendor/k8s.io/kubernetes/pkg/util/sets/doc.go b/vendor/k8s.io/kubernetes/pkg/util/sets/doc.go index 28a6a7d5..5fe6f4f9 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/sets/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/util/sets/doc.go @@ -14,7 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by set-gen. Do not edit it manually! - -// Package sets has auto-generated set types. +// Package sets only exists until heapster rebases +// TODO genericapiserver remove this empty package. Godep fails without this because heapster relies +// on this package. This will allow us to start splitting packages, but will force +// heapster to update on their next kube rebase. package sets diff --git a/vendor/k8s.io/kubernetes/pkg/util/sets/int.go b/vendor/k8s.io/kubernetes/pkg/util/sets/int.go deleted file mode 100644 index 0614e9fb..00000000 --- a/vendor/k8s.io/kubernetes/pkg/util/sets/int.go +++ /dev/null @@ -1,203 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was autogenerated by set-gen. Do not edit it manually! - -package sets - -import ( - "reflect" - "sort" -) - -// sets.Int is a set of ints, implemented via map[int]struct{} for minimal memory consumption. -type Int map[int]Empty - -// New creates a Int from a list of values. -func NewInt(items ...int) Int { - ss := Int{} - ss.Insert(items...) - return ss -} - -// IntKeySet creates a Int from a keys of a map[int](? extends interface{}). -// If the value passed in is not actually a map, this will panic. -func IntKeySet(theMap interface{}) Int { - v := reflect.ValueOf(theMap) - ret := Int{} - - for _, keyValue := range v.MapKeys() { - ret.Insert(keyValue.Interface().(int)) - } - return ret -} - -// Insert adds items to the set. -func (s Int) Insert(items ...int) { - for _, item := range items { - s[item] = Empty{} - } -} - -// Delete removes all items from the set. -func (s Int) Delete(items ...int) { - for _, item := range items { - delete(s, item) - } -} - -// Has returns true if and only if item is contained in the set. -func (s Int) Has(item int) bool { - _, contained := s[item] - return contained -} - -// HasAll returns true if and only if all items are contained in the set. -func (s Int) HasAll(items ...int) bool { - for _, item := range items { - if !s.Has(item) { - return false - } - } - return true -} - -// HasAny returns true if any items are contained in the set. -func (s Int) HasAny(items ...int) bool { - for _, item := range items { - if s.Has(item) { - return true - } - } - return false -} - -// Difference returns a set of objects that are not in s2 -// For example: -// s1 = {a1, a2, a3} -// s2 = {a1, a2, a4, a5} -// s1.Difference(s2) = {a3} -// s2.Difference(s1) = {a4, a5} -func (s Int) Difference(s2 Int) Int { - result := NewInt() - for key := range s { - if !s2.Has(key) { - result.Insert(key) - } - } - return result -} - -// Union returns a new set which includes items in either s1 or s2. -// For example: -// s1 = {a1, a2} -// s2 = {a3, a4} -// s1.Union(s2) = {a1, a2, a3, a4} -// s2.Union(s1) = {a1, a2, a3, a4} -func (s1 Int) Union(s2 Int) Int { - result := NewInt() - for key := range s1 { - result.Insert(key) - } - for key := range s2 { - result.Insert(key) - } - return result -} - -// Intersection returns a new set which includes the item in BOTH s1 and s2 -// For example: -// s1 = {a1, a2} -// s2 = {a2, a3} -// s1.Intersection(s2) = {a2} -func (s1 Int) Intersection(s2 Int) Int { - var walk, other Int - result := NewInt() - if s1.Len() < s2.Len() { - walk = s1 - other = s2 - } else { - walk = s2 - other = s1 - } - for key := range walk { - if other.Has(key) { - result.Insert(key) - } - } - return result -} - -// IsSuperset returns true if and only if s1 is a superset of s2. -func (s1 Int) IsSuperset(s2 Int) bool { - for item := range s2 { - if !s1.Has(item) { - return false - } - } - return true -} - -// Equal returns true if and only if s1 is equal (as a set) to s2. -// Two sets are equal if their membership is identical. -// (In practice, this means same elements, order doesn't matter) -func (s1 Int) Equal(s2 Int) bool { - return len(s1) == len(s2) && s1.IsSuperset(s2) -} - -type sortableSliceOfInt []int - -func (s sortableSliceOfInt) Len() int { return len(s) } -func (s sortableSliceOfInt) Less(i, j int) bool { return lessInt(s[i], s[j]) } -func (s sortableSliceOfInt) Swap(i, j int) { s[i], s[j] = s[j], s[i] } - -// List returns the contents as a sorted int slice. -func (s Int) List() []int { - res := make(sortableSliceOfInt, 0, len(s)) - for key := range s { - res = append(res, key) - } - sort.Sort(res) - return []int(res) -} - -// UnsortedList returns the slice with contents in random order. -func (s Int) UnsortedList() []int { - res := make([]int, 0, len(s)) - for key := range s { - res = append(res, key) - } - return res -} - -// Returns a single element from the set. -func (s Int) PopAny() (int, bool) { - for key := range s { - s.Delete(key) - return key, true - } - var zeroValue int - return zeroValue, false -} - -// Len returns the size of the set. -func (s Int) Len() int { - return len(s) -} - -func lessInt(lhs, rhs int) bool { - return lhs < rhs -} diff --git a/vendor/k8s.io/kubernetes/pkg/util/sets/int64.go b/vendor/k8s.io/kubernetes/pkg/util/sets/int64.go deleted file mode 100644 index 82e1ba78..00000000 --- a/vendor/k8s.io/kubernetes/pkg/util/sets/int64.go +++ /dev/null @@ -1,203 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was autogenerated by set-gen. Do not edit it manually! - -package sets - -import ( - "reflect" - "sort" -) - -// sets.Int64 is a set of int64s, implemented via map[int64]struct{} for minimal memory consumption. -type Int64 map[int64]Empty - -// New creates a Int64 from a list of values. -func NewInt64(items ...int64) Int64 { - ss := Int64{} - ss.Insert(items...) - return ss -} - -// Int64KeySet creates a Int64 from a keys of a map[int64](? extends interface{}). -// If the value passed in is not actually a map, this will panic. -func Int64KeySet(theMap interface{}) Int64 { - v := reflect.ValueOf(theMap) - ret := Int64{} - - for _, keyValue := range v.MapKeys() { - ret.Insert(keyValue.Interface().(int64)) - } - return ret -} - -// Insert adds items to the set. -func (s Int64) Insert(items ...int64) { - for _, item := range items { - s[item] = Empty{} - } -} - -// Delete removes all items from the set. -func (s Int64) Delete(items ...int64) { - for _, item := range items { - delete(s, item) - } -} - -// Has returns true if and only if item is contained in the set. -func (s Int64) Has(item int64) bool { - _, contained := s[item] - return contained -} - -// HasAll returns true if and only if all items are contained in the set. -func (s Int64) HasAll(items ...int64) bool { - for _, item := range items { - if !s.Has(item) { - return false - } - } - return true -} - -// HasAny returns true if any items are contained in the set. -func (s Int64) HasAny(items ...int64) bool { - for _, item := range items { - if s.Has(item) { - return true - } - } - return false -} - -// Difference returns a set of objects that are not in s2 -// For example: -// s1 = {a1, a2, a3} -// s2 = {a1, a2, a4, a5} -// s1.Difference(s2) = {a3} -// s2.Difference(s1) = {a4, a5} -func (s Int64) Difference(s2 Int64) Int64 { - result := NewInt64() - for key := range s { - if !s2.Has(key) { - result.Insert(key) - } - } - return result -} - -// Union returns a new set which includes items in either s1 or s2. -// For example: -// s1 = {a1, a2} -// s2 = {a3, a4} -// s1.Union(s2) = {a1, a2, a3, a4} -// s2.Union(s1) = {a1, a2, a3, a4} -func (s1 Int64) Union(s2 Int64) Int64 { - result := NewInt64() - for key := range s1 { - result.Insert(key) - } - for key := range s2 { - result.Insert(key) - } - return result -} - -// Intersection returns a new set which includes the item in BOTH s1 and s2 -// For example: -// s1 = {a1, a2} -// s2 = {a2, a3} -// s1.Intersection(s2) = {a2} -func (s1 Int64) Intersection(s2 Int64) Int64 { - var walk, other Int64 - result := NewInt64() - if s1.Len() < s2.Len() { - walk = s1 - other = s2 - } else { - walk = s2 - other = s1 - } - for key := range walk { - if other.Has(key) { - result.Insert(key) - } - } - return result -} - -// IsSuperset returns true if and only if s1 is a superset of s2. -func (s1 Int64) IsSuperset(s2 Int64) bool { - for item := range s2 { - if !s1.Has(item) { - return false - } - } - return true -} - -// Equal returns true if and only if s1 is equal (as a set) to s2. -// Two sets are equal if their membership is identical. -// (In practice, this means same elements, order doesn't matter) -func (s1 Int64) Equal(s2 Int64) bool { - return len(s1) == len(s2) && s1.IsSuperset(s2) -} - -type sortableSliceOfInt64 []int64 - -func (s sortableSliceOfInt64) Len() int { return len(s) } -func (s sortableSliceOfInt64) Less(i, j int) bool { return lessInt64(s[i], s[j]) } -func (s sortableSliceOfInt64) Swap(i, j int) { s[i], s[j] = s[j], s[i] } - -// List returns the contents as a sorted int64 slice. -func (s Int64) List() []int64 { - res := make(sortableSliceOfInt64, 0, len(s)) - for key := range s { - res = append(res, key) - } - sort.Sort(res) - return []int64(res) -} - -// UnsortedList returns the slice with contents in random order. -func (s Int64) UnsortedList() []int64 { - res := make([]int64, 0, len(s)) - for key := range s { - res = append(res, key) - } - return res -} - -// Returns a single element from the set. -func (s Int64) PopAny() (int64, bool) { - for key := range s { - s.Delete(key) - return key, true - } - var zeroValue int64 - return zeroValue, false -} - -// Len returns the size of the set. -func (s Int64) Len() int { - return len(s) -} - -func lessInt64(lhs, rhs int64) bool { - return lhs < rhs -} diff --git a/vendor/k8s.io/kubernetes/pkg/util/sets/set_test.go b/vendor/k8s.io/kubernetes/pkg/util/sets/set_test.go deleted file mode 100644 index df722ec2..00000000 --- a/vendor/k8s.io/kubernetes/pkg/util/sets/set_test.go +++ /dev/null @@ -1,270 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package sets - -import ( - "reflect" - "testing" -) - -func TestStringSet(t *testing.T) { - s := String{} - s2 := String{} - if len(s) != 0 { - t.Errorf("Expected len=0: %d", len(s)) - } - s.Insert("a", "b") - if len(s) != 2 { - t.Errorf("Expected len=2: %d", len(s)) - } - s.Insert("c") - if s.Has("d") { - t.Errorf("Unexpected contents: %#v", s) - } - if !s.Has("a") { - t.Errorf("Missing contents: %#v", s) - } - s.Delete("a") - if s.Has("a") { - t.Errorf("Unexpected contents: %#v", s) - } - s.Insert("a") - if s.HasAll("a", "b", "d") { - t.Errorf("Unexpected contents: %#v", s) - } - if !s.HasAll("a", "b") { - t.Errorf("Missing contents: %#v", s) - } - s2.Insert("a", "b", "d") - if s.IsSuperset(s2) { - t.Errorf("Unexpected contents: %#v", s) - } - s2.Delete("d") - if !s.IsSuperset(s2) { - t.Errorf("Missing contents: %#v", s) - } -} - -func TestStringSetDeleteMultiples(t *testing.T) { - s := String{} - s.Insert("a", "b", "c") - if len(s) != 3 { - t.Errorf("Expected len=3: %d", len(s)) - } - - s.Delete("a", "c") - if len(s) != 1 { - t.Errorf("Expected len=1: %d", len(s)) - } - if s.Has("a") { - t.Errorf("Unexpected contents: %#v", s) - } - if s.Has("c") { - t.Errorf("Unexpected contents: %#v", s) - } - if !s.Has("b") { - t.Errorf("Missing contents: %#v", s) - } - -} - -func TestNewStringSet(t *testing.T) { - s := NewString("a", "b", "c") - if len(s) != 3 { - t.Errorf("Expected len=3: %d", len(s)) - } - if !s.Has("a") || !s.Has("b") || !s.Has("c") { - t.Errorf("Unexpected contents: %#v", s) - } -} - -func TestStringSetList(t *testing.T) { - s := NewString("z", "y", "x", "a") - if !reflect.DeepEqual(s.List(), []string{"a", "x", "y", "z"}) { - t.Errorf("List gave unexpected result: %#v", s.List()) - } -} - -func TestStringSetDifference(t *testing.T) { - a := NewString("1", "2", "3") - b := NewString("1", "2", "4", "5") - c := a.Difference(b) - d := b.Difference(a) - if len(c) != 1 { - t.Errorf("Expected len=1: %d", len(c)) - } - if !c.Has("3") { - t.Errorf("Unexpected contents: %#v", c.List()) - } - if len(d) != 2 { - t.Errorf("Expected len=2: %d", len(d)) - } - if !d.Has("4") || !d.Has("5") { - t.Errorf("Unexpected contents: %#v", d.List()) - } -} - -func TestStringSetHasAny(t *testing.T) { - a := NewString("1", "2", "3") - - if !a.HasAny("1", "4") { - t.Errorf("expected true, got false") - } - - if a.HasAny("0", "4") { - t.Errorf("expected false, got true") - } -} - -func TestStringSetEquals(t *testing.T) { - // Simple case (order doesn't matter) - a := NewString("1", "2") - b := NewString("2", "1") - if !a.Equal(b) { - t.Errorf("Expected to be equal: %v vs %v", a, b) - } - - // It is a set; duplicates are ignored - b = NewString("2", "2", "1") - if !a.Equal(b) { - t.Errorf("Expected to be equal: %v vs %v", a, b) - } - - // Edge cases around empty sets / empty strings - a = NewString() - b = NewString() - if !a.Equal(b) { - t.Errorf("Expected to be equal: %v vs %v", a, b) - } - - b = NewString("1", "2", "3") - if a.Equal(b) { - t.Errorf("Expected to be not-equal: %v vs %v", a, b) - } - - b = NewString("1", "2", "") - if a.Equal(b) { - t.Errorf("Expected to be not-equal: %v vs %v", a, b) - } - - // Check for equality after mutation - a = NewString() - a.Insert("1") - if a.Equal(b) { - t.Errorf("Expected to be not-equal: %v vs %v", a, b) - } - - a.Insert("2") - if a.Equal(b) { - t.Errorf("Expected to be not-equal: %v vs %v", a, b) - } - - a.Insert("") - if !a.Equal(b) { - t.Errorf("Expected to be equal: %v vs %v", a, b) - } - - a.Delete("") - if a.Equal(b) { - t.Errorf("Expected to be not-equal: %v vs %v", a, b) - } -} - -func TestStringUnion(t *testing.T) { - tests := []struct { - s1 String - s2 String - expected String - }{ - { - NewString("1", "2", "3", "4"), - NewString("3", "4", "5", "6"), - NewString("1", "2", "3", "4", "5", "6"), - }, - { - NewString("1", "2", "3", "4"), - NewString(), - NewString("1", "2", "3", "4"), - }, - { - NewString(), - NewString("1", "2", "3", "4"), - NewString("1", "2", "3", "4"), - }, - { - NewString(), - NewString(), - NewString(), - }, - } - - for _, test := range tests { - union := test.s1.Union(test.s2) - if union.Len() != test.expected.Len() { - t.Errorf("Expected union.Len()=%d but got %d", test.expected.Len(), union.Len()) - } - - if !union.Equal(test.expected) { - t.Errorf("Expected union.Equal(expected) but not true. union:%v expected:%v", union.List(), test.expected.List()) - } - } -} - -func TestStringIntersection(t *testing.T) { - tests := []struct { - s1 String - s2 String - expected String - }{ - { - NewString("1", "2", "3", "4"), - NewString("3", "4", "5", "6"), - NewString("3", "4"), - }, - { - NewString("1", "2", "3", "4"), - NewString("1", "2", "3", "4"), - NewString("1", "2", "3", "4"), - }, - { - NewString("1", "2", "3", "4"), - NewString(), - NewString(), - }, - { - NewString(), - NewString("1", "2", "3", "4"), - NewString(), - }, - { - NewString(), - NewString(), - NewString(), - }, - } - - for _, test := range tests { - intersection := test.s1.Intersection(test.s2) - if intersection.Len() != test.expected.Len() { - t.Errorf("Expected intersection.Len()=%d but got %d", test.expected.Len(), intersection.Len()) - } - - if !intersection.Equal(test.expected) { - t.Errorf("Expected intersection.Equal(expected) but not true. intersection:%v expected:%v", intersection.List(), test.expected.List()) - } - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/util/sets/string.go b/vendor/k8s.io/kubernetes/pkg/util/sets/string.go deleted file mode 100644 index baef7a6a..00000000 --- a/vendor/k8s.io/kubernetes/pkg/util/sets/string.go +++ /dev/null @@ -1,203 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was autogenerated by set-gen. Do not edit it manually! - -package sets - -import ( - "reflect" - "sort" -) - -// sets.String is a set of strings, implemented via map[string]struct{} for minimal memory consumption. -type String map[string]Empty - -// New creates a String from a list of values. -func NewString(items ...string) String { - ss := String{} - ss.Insert(items...) - return ss -} - -// StringKeySet creates a String from a keys of a map[string](? extends interface{}). -// If the value passed in is not actually a map, this will panic. -func StringKeySet(theMap interface{}) String { - v := reflect.ValueOf(theMap) - ret := String{} - - for _, keyValue := range v.MapKeys() { - ret.Insert(keyValue.Interface().(string)) - } - return ret -} - -// Insert adds items to the set. -func (s String) Insert(items ...string) { - for _, item := range items { - s[item] = Empty{} - } -} - -// Delete removes all items from the set. -func (s String) Delete(items ...string) { - for _, item := range items { - delete(s, item) - } -} - -// Has returns true if and only if item is contained in the set. -func (s String) Has(item string) bool { - _, contained := s[item] - return contained -} - -// HasAll returns true if and only if all items are contained in the set. -func (s String) HasAll(items ...string) bool { - for _, item := range items { - if !s.Has(item) { - return false - } - } - return true -} - -// HasAny returns true if any items are contained in the set. -func (s String) HasAny(items ...string) bool { - for _, item := range items { - if s.Has(item) { - return true - } - } - return false -} - -// Difference returns a set of objects that are not in s2 -// For example: -// s1 = {a1, a2, a3} -// s2 = {a1, a2, a4, a5} -// s1.Difference(s2) = {a3} -// s2.Difference(s1) = {a4, a5} -func (s String) Difference(s2 String) String { - result := NewString() - for key := range s { - if !s2.Has(key) { - result.Insert(key) - } - } - return result -} - -// Union returns a new set which includes items in either s1 or s2. -// For example: -// s1 = {a1, a2} -// s2 = {a3, a4} -// s1.Union(s2) = {a1, a2, a3, a4} -// s2.Union(s1) = {a1, a2, a3, a4} -func (s1 String) Union(s2 String) String { - result := NewString() - for key := range s1 { - result.Insert(key) - } - for key := range s2 { - result.Insert(key) - } - return result -} - -// Intersection returns a new set which includes the item in BOTH s1 and s2 -// For example: -// s1 = {a1, a2} -// s2 = {a2, a3} -// s1.Intersection(s2) = {a2} -func (s1 String) Intersection(s2 String) String { - var walk, other String - result := NewString() - if s1.Len() < s2.Len() { - walk = s1 - other = s2 - } else { - walk = s2 - other = s1 - } - for key := range walk { - if other.Has(key) { - result.Insert(key) - } - } - return result -} - -// IsSuperset returns true if and only if s1 is a superset of s2. -func (s1 String) IsSuperset(s2 String) bool { - for item := range s2 { - if !s1.Has(item) { - return false - } - } - return true -} - -// Equal returns true if and only if s1 is equal (as a set) to s2. -// Two sets are equal if their membership is identical. -// (In practice, this means same elements, order doesn't matter) -func (s1 String) Equal(s2 String) bool { - return len(s1) == len(s2) && s1.IsSuperset(s2) -} - -type sortableSliceOfString []string - -func (s sortableSliceOfString) Len() int { return len(s) } -func (s sortableSliceOfString) Less(i, j int) bool { return lessString(s[i], s[j]) } -func (s sortableSliceOfString) Swap(i, j int) { s[i], s[j] = s[j], s[i] } - -// List returns the contents as a sorted string slice. -func (s String) List() []string { - res := make(sortableSliceOfString, 0, len(s)) - for key := range s { - res = append(res, key) - } - sort.Sort(res) - return []string(res) -} - -// UnsortedList returns the slice with contents in random order. -func (s String) UnsortedList() []string { - res := make([]string, 0, len(s)) - for key := range s { - res = append(res, key) - } - return res -} - -// Returns a single element from the set. -func (s String) PopAny() (string, bool) { - for key := range s { - s.Delete(key) - return key, true - } - var zeroValue string - return zeroValue, false -} - -// Len returns the size of the set. -func (s String) Len() int { - return len(s) -} - -func lessString(lhs, rhs string) bool { - return lhs < rhs -} diff --git a/vendor/k8s.io/kubernetes/pkg/util/strategicpatch/patch.go b/vendor/k8s.io/kubernetes/pkg/util/strategicpatch/patch.go index a81207ce..fe8f2c33 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/strategicpatch/patch.go +++ b/vendor/k8s.io/kubernetes/pkg/util/strategicpatch/patch.go @@ -48,6 +48,13 @@ const ( deleteFromPrimitiveListDirectivePrefix = "$deleteFromPrimitiveList" ) +// JSONMap is a representations of JSON object encoded as map[string]interface{} +// where the children can be either map[string]interface{}, []interface{} or +// primitive type). +// Operating on JSONMap representation is much faster as it doesn't require any +// json marshaling and/or unmarshaling operations. +type JSONMap map[string]interface{} + // IsPreconditionFailed returns true if the provided error indicates // a precondition failed. func IsPreconditionFailed(err error) bool { @@ -136,11 +143,6 @@ func RequireMetadataKeyUnchanged(key string) PreconditionFunc { } } -// Deprecated: Use the synonym CreateTwoWayMergePatch, instead. -func CreateStrategicMergePatch(original, modified []byte, dataStruct interface{}) ([]byte, error) { - return CreateTwoWayMergePatch(original, modified, dataStruct) -} - // CreateTwoWayMergePatch creates a patch that can be passed to StrategicMergePatch from an original // document and a modified document, which are passed to the method as json encoded content. It will // return a patch that yields the modified document when applied to the original document, or an error @@ -160,12 +162,24 @@ func CreateTwoWayMergePatch(original, modified []byte, dataStruct interface{}, f } } + patchMap, err := CreateTwoWayMergeMapPatch(originalMap, modifiedMap, dataStruct, fns...) + if err != nil { + return nil, err + } + + return json.Marshal(patchMap) +} + +// CreateTwoWayMergeMapPatch creates a patch from an original and modified JSON objects, +// encoded JSONMap. +// The serialized version of the map can then be passed to StrategicMergeMapPatch. +func CreateTwoWayMergeMapPatch(original, modified JSONMap, dataStruct interface{}, fns ...PreconditionFunc) (JSONMap, error) { t, err := getTagStructType(dataStruct) if err != nil { return nil, err } - patchMap, err := diffMaps(originalMap, modifiedMap, t, false, false) + patchMap, err := diffMaps(original, modified, t, false, false) if err != nil { return nil, err } @@ -177,7 +191,7 @@ func CreateTwoWayMergePatch(original, modified []byte, dataStruct interface{}, f } } - return json.Marshal(patchMap) + return patchMap, nil } // Returns a (recursive) strategic merge patch that yields modified when applied to original. @@ -494,12 +508,6 @@ loopB: return patch, nil } -// Deprecated: StrategicMergePatchData is deprecated. Use the synonym StrategicMergePatch, -// instead, which follows the naming convention of evanphx/json-patch. -func StrategicMergePatchData(original, patch []byte, dataStruct interface{}) ([]byte, error) { - return StrategicMergePatch(original, patch, dataStruct) -} - // StrategicMergePatch applies a strategic merge patch. The patch and the original document // must be json encoded content. A patch can be created from an original and a modified document // by calling CreateStrategicMergePatch. @@ -524,12 +532,7 @@ func StrategicMergePatch(original, patch []byte, dataStruct interface{}) ([]byte return nil, errBadJSONDoc } - t, err := getTagStructType(dataStruct) - if err != nil { - return nil, err - } - - result, err := mergeMap(originalMap, patchMap, t, true) + result, err := StrategicMergeMapPatch(originalMap, patchMap, dataStruct) if err != nil { return nil, err } @@ -537,6 +540,17 @@ func StrategicMergePatch(original, patch []byte, dataStruct interface{}) ([]byte return json.Marshal(result) } +// StrategicMergePatch applies a strategic merge patch. The original and patch documents +// must be JSONMap. A patch can be created from an original and modified document by +// calling CreateTwoWayMergeMapPatch. +func StrategicMergeMapPatch(original, patch JSONMap, dataStruct interface{}) (JSONMap, error) { + t, err := getTagStructType(dataStruct) + if err != nil { + return nil, err + } + return mergeMap(original, patch, t, true) +} + func getTagStructType(dataStruct interface{}) (reflect.Type, error) { if dataStruct == nil { return nil, fmt.Errorf(errBadArgTypeFmt, "struct", "nil") diff --git a/vendor/k8s.io/kubernetes/pkg/util/system/BUILD b/vendor/k8s.io/kubernetes/pkg/util/system/BUILD index e5421672..1904ade5 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/system/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/util/system/BUILD @@ -19,7 +19,10 @@ go_test( srcs = ["system_utils_test.go"], library = ":go_default_library", tags = ["automanaged"], - deps = ["//pkg/api/v1:go_default_library"], + deps = [ + "//pkg/api/v1:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + ], ) filegroup( diff --git a/vendor/k8s.io/kubernetes/pkg/util/system/system_utils_test.go b/vendor/k8s.io/kubernetes/pkg/util/system/system_utils_test.go index 69dcc8fd..23b98b04 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/system/system_utils_test.go +++ b/vendor/k8s.io/kubernetes/pkg/util/system/system_utils_test.go @@ -19,6 +19,7 @@ package system import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" ) @@ -37,7 +38,7 @@ func TestIsMasterNode(t *testing.T) { } for _, tc := range testCases { - node := v1.Node{ObjectMeta: v1.ObjectMeta{Name: tc.input}} + node := v1.Node{ObjectMeta: metav1.ObjectMeta{Name: tc.input}} res := IsMasterNode(node.Name) if res != tc.result { t.Errorf("case \"%s\": expected %t, got %t", tc.input, tc.result, res) diff --git a/vendor/k8s.io/kubernetes/pkg/util/clock/BUILD b/vendor/k8s.io/kubernetes/pkg/util/tail/BUILD similarity index 91% rename from vendor/k8s.io/kubernetes/pkg/util/clock/BUILD rename to vendor/k8s.io/kubernetes/pkg/util/tail/BUILD index 488fcac7..5d7a1b54 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/clock/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/util/tail/BUILD @@ -8,19 +8,6 @@ load( "go_test", ) -go_library( - name = "go_default_library", - srcs = ["clock.go"], - tags = ["automanaged"], -) - -go_test( - name = "go_default_test", - srcs = ["clock_test.go"], - library = ":go_default_library", - tags = ["automanaged"], -) - filegroup( name = "package-srcs", srcs = glob(["**"]), @@ -33,3 +20,16 @@ filegroup( srcs = [":package-srcs"], tags = ["automanaged"], ) + +go_test( + name = "go_default_test", + srcs = ["tail_test.go"], + library = ":go_default_library", + tags = ["automanaged"], +) + +go_library( + name = "go_default_library", + srcs = ["tail.go"], + tags = ["automanaged"], +) diff --git a/vendor/k8s.io/kubernetes/pkg/util/tail/tail.go b/vendor/k8s.io/kubernetes/pkg/util/tail/tail.go new file mode 100644 index 00000000..23ad4ae7 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/util/tail/tail.go @@ -0,0 +1,99 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package tail + +import ( + "bytes" + "io" + "io/ioutil" + "os" +) + +const ( + // blockSize is the block size used in tail. + blockSize = 1024 +) + +var ( + // eol is the end-of-line sign in the log. + eol = []byte{'\n'} +) + +// ReadAtMost reads at most max bytes from the end of the file identified by path or +// returns an error. It returns true if the file was longer than max. It will +// allocate up to max bytes. +func ReadAtMost(path string, max int64) ([]byte, bool, error) { + f, err := os.Open(path) + if err != nil { + return nil, false, err + } + defer f.Close() + fi, err := f.Stat() + if err != nil { + return nil, false, err + } + size := fi.Size() + if size == 0 { + return nil, false, nil + } + if size < max { + max = size + } + offset, err := f.Seek(-max, os.SEEK_END) + if err != nil { + return nil, false, err + } + data, err := ioutil.ReadAll(f) + return data, offset > 0, err +} + +// FindTailLineStartIndex returns the start of last nth line. +// * If n < 0, return the beginning of the file. +// * If n >= 0, return the beginning of last nth line. +// Notice that if the last line is incomplete (no end-of-line), it will not be counted +// as one line. +func FindTailLineStartIndex(f io.ReadSeeker, n int64) (int64, error) { + if n < 0 { + return 0, nil + } + size, err := f.Seek(0, os.SEEK_END) + if err != nil { + return 0, err + } + var left, cnt int64 + buf := make([]byte, blockSize) + for right := size; right > 0 && cnt <= n; right -= blockSize { + left = right - blockSize + if left < 0 { + left = 0 + buf = make([]byte, right) + } + if _, err := f.Seek(left, os.SEEK_SET); err != nil { + return 0, err + } + if _, err := f.Read(buf); err != nil { + return 0, err + } + cnt += int64(bytes.Count(buf, eol)) + } + for ; cnt > n; cnt-- { + idx := bytes.Index(buf, eol) + 1 + buf = buf[idx:] + left += int64(idx) + } + return left, nil +} diff --git a/vendor/k8s.io/kubernetes/pkg/util/tail/tail_test.go b/vendor/k8s.io/kubernetes/pkg/util/tail/tail_test.go new file mode 100644 index 00000000..18d3f90c --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/util/tail/tail_test.go @@ -0,0 +1,52 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package tail + +import ( + "bytes" + "strings" + "testing" +) + +func TestTail(t *testing.T) { + line := strings.Repeat("a", blockSize) + testBytes := []byte(line + "\n" + + line + "\n" + + line + "\n" + + line + "\n" + + line[blockSize/2:]) // incomplete line + + for c, test := range []struct { + n int64 + start int64 + }{ + {n: -1, start: 0}, + {n: 0, start: int64(len(line)+1) * 4}, + {n: 1, start: int64(len(line)+1) * 3}, + {n: 9999, start: 0}, + } { + t.Logf("TestCase #%d: %+v", c, test) + r := bytes.NewReader(testBytes) + s, err := FindTailLineStartIndex(r, test.n) + if err != nil { + t.Error(err) + } + if s != test.start { + t.Errorf("%d != %d", s, test.start) + } + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/util/taints/BUILD b/vendor/k8s.io/kubernetes/pkg/util/taints/BUILD index f0363157..0233a5d0 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/taints/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/util/taints/BUILD @@ -14,6 +14,7 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/api:go_default_library", + "//pkg/api/v1:go_default_library", "//vendor:k8s.io/apimachinery/pkg/util/validation", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/util/taints/taints.go b/vendor/k8s.io/kubernetes/pkg/util/taints/taints.go index 32470c42..5c0e8c17 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/taints/taints.go +++ b/vendor/k8s.io/kubernetes/pkg/util/taints/taints.go @@ -23,11 +23,12 @@ import ( "k8s.io/apimachinery/pkg/util/validation" "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/api/v1" ) // ParseTaint parses a taint from a string. Taint must be off the format '=:'. -func ParseTaint(st string) (api.Taint, error) { - var taint api.Taint +func ParseTaint(st string) (v1.Taint, error) { + var taint v1.Taint parts := strings.Split(st, "=") if len(parts) != 2 || len(parts[1]) == 0 || len(validation.IsQualifiedName(parts[0])) > 0 { return taint, fmt.Errorf("invalid taint spec: %v", st) @@ -35,14 +36,14 @@ func ParseTaint(st string) (api.Taint, error) { parts2 := strings.Split(parts[1], ":") - effect := api.TaintEffect(parts2[1]) + effect := v1.TaintEffect(parts2[1]) errs := validation.IsValidLabelValue(parts2[0]) if len(parts2) != 2 || len(errs) != 0 { return taint, fmt.Errorf("invalid taint spec: %v, %s", st, strings.Join(errs, "; ")) } - if effect != api.TaintEffectNoSchedule && effect != api.TaintEffectPreferNoSchedule { + if effect != v1.TaintEffectNoSchedule && effect != v1.TaintEffectPreferNoSchedule { return taint, fmt.Errorf("invalid taint spec: %v, unsupported taint effect", st) } @@ -73,7 +74,7 @@ func (t taintsVar) Set(s string) error { if err != nil { return err } - taints = append(taints, taint) + taints = append(taints, api.Taint{Key: taint.Key, Value: taint.Value, Effect: api.TaintEffect(taint.Effect)}) } *t.ptr = taints return nil diff --git a/vendor/k8s.io/kubernetes/pkg/util/validation/.readonly b/vendor/k8s.io/kubernetes/pkg/util/validation/.readonly deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/k8s.io/kubernetes/pkg/util/validation/BUILD b/vendor/k8s.io/kubernetes/pkg/util/validation/BUILD index 34add18c..e67c7910 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/validation/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/util/validation/BUILD @@ -5,19 +5,11 @@ licenses(["notice"]) load( "@io_bazel_rules_go//go:def.bzl", "go_library", - "go_test", ) go_library( name = "go_default_library", - srcs = ["validation.go"], - tags = ["automanaged"], -) - -go_test( - name = "go_default_test", - srcs = ["validation_test.go"], - library = ":go_default_library", + srcs = ["doc.go"], tags = ["automanaged"], ) diff --git a/vendor/k8s.io/kubernetes/pkg/util/validation/doc.go b/vendor/k8s.io/kubernetes/pkg/util/validation/doc.go new file mode 100644 index 00000000..345315c0 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/util/validation/doc.go @@ -0,0 +1,21 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package validation only exists until heapster rebases +// TODO genericapiserver remove this empty package. Godep fails without this because heapster relies +// on this package. This will allow us to start splitting packages, but will force +// heapster to update on their next kube rebase. +package validation diff --git a/vendor/k8s.io/kubernetes/pkg/util/validation/field/.readonly b/vendor/k8s.io/kubernetes/pkg/util/validation/field/.readonly deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/k8s.io/kubernetes/pkg/util/validation/field/BUILD b/vendor/k8s.io/kubernetes/pkg/util/validation/field/BUILD index f76f3a72..deefdcef 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/validation/field/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/util/validation/field/BUILD @@ -5,29 +5,11 @@ licenses(["notice"]) load( "@io_bazel_rules_go//go:def.bzl", "go_library", - "go_test", ) go_library( name = "go_default_library", - srcs = [ - "errors.go", - "path.go", - ], - tags = ["automanaged"], - deps = [ - "//pkg/util/errors:go_default_library", - "//pkg/util/sets:go_default_library", - ], -) - -go_test( - name = "go_default_test", - srcs = [ - "errors_test.go", - "path_test.go", - ], - library = ":go_default_library", + srcs = ["doc.go"], tags = ["automanaged"], ) diff --git a/vendor/k8s.io/kubernetes/pkg/util/validation/field/doc.go b/vendor/k8s.io/kubernetes/pkg/util/validation/field/doc.go new file mode 100644 index 00000000..0421cbda --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/util/validation/field/doc.go @@ -0,0 +1,21 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package field only exists until heapster rebases +// TODO genericapiserver remove this empty package. Godep fails without this because heapster relies +// on this package. This will allow us to start splitting packages, but will force +// heapster to update on their next kube rebase. +package field diff --git a/vendor/k8s.io/kubernetes/pkg/util/validation/field/errors.go b/vendor/k8s.io/kubernetes/pkg/util/validation/field/errors.go deleted file mode 100644 index 227a49ee..00000000 --- a/vendor/k8s.io/kubernetes/pkg/util/validation/field/errors.go +++ /dev/null @@ -1,235 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package field - -import ( - "encoding/json" - "fmt" - "strings" - - utilerrors "k8s.io/kubernetes/pkg/util/errors" - "k8s.io/kubernetes/pkg/util/sets" -) - -// Error is an implementation of the 'error' interface, which represents a -// field-level validation error. -type Error struct { - Type ErrorType - Field string - BadValue interface{} - Detail string -} - -var _ error = &Error{} - -// Error implements the error interface. -func (v *Error) Error() string { - return fmt.Sprintf("%s: %s", v.Field, v.ErrorBody()) -} - -// ErrorBody returns the error message without the field name. This is useful -// for building nice-looking higher-level error reporting. -func (v *Error) ErrorBody() string { - var s string - switch v.Type { - case ErrorTypeRequired, ErrorTypeForbidden, ErrorTypeTooLong, ErrorTypeInternal: - s = fmt.Sprintf("%s", v.Type) - default: - var bad string - badBytes, err := json.Marshal(v.BadValue) - if err != nil { - bad = err.Error() - } else { - bad = string(badBytes) - } - s = fmt.Sprintf("%s: %s", v.Type, bad) - } - if len(v.Detail) != 0 { - s += fmt.Sprintf(": %s", v.Detail) - } - return s -} - -// ErrorType is a machine readable value providing more detail about why -// a field is invalid. These values are expected to match 1-1 with -// CauseType in api/types.go. -type ErrorType string - -// TODO: These values are duplicated in api/types.go, but there's a circular dep. Fix it. -const ( - // ErrorTypeNotFound is used to report failure to find a requested value - // (e.g. looking up an ID). See NotFound(). - ErrorTypeNotFound ErrorType = "FieldValueNotFound" - // ErrorTypeRequired is used to report required values that are not - // provided (e.g. empty strings, null values, or empty arrays). See - // Required(). - ErrorTypeRequired ErrorType = "FieldValueRequired" - // ErrorTypeDuplicate is used to report collisions of values that must be - // unique (e.g. unique IDs). See Duplicate(). - ErrorTypeDuplicate ErrorType = "FieldValueDuplicate" - // ErrorTypeInvalid is used to report malformed values (e.g. failed regex - // match, too long, out of bounds). See Invalid(). - ErrorTypeInvalid ErrorType = "FieldValueInvalid" - // ErrorTypeNotSupported is used to report unknown values for enumerated - // fields (e.g. a list of valid values). See NotSupported(). - ErrorTypeNotSupported ErrorType = "FieldValueNotSupported" - // ErrorTypeForbidden is used to report valid (as per formatting rules) - // values which would be accepted under some conditions, but which are not - // permitted by the current conditions (such as security policy). See - // Forbidden(). - ErrorTypeForbidden ErrorType = "FieldValueForbidden" - // ErrorTypeTooLong is used to report that the given value is too long. - // This is similar to ErrorTypeInvalid, but the error will not include the - // too-long value. See TooLong(). - ErrorTypeTooLong ErrorType = "FieldValueTooLong" - // ErrorTypeInternal is used to report other errors that are not related - // to user input. See InternalError(). - ErrorTypeInternal ErrorType = "InternalError" -) - -// String converts a ErrorType into its corresponding canonical error message. -func (t ErrorType) String() string { - switch t { - case ErrorTypeNotFound: - return "Not found" - case ErrorTypeRequired: - return "Required value" - case ErrorTypeDuplicate: - return "Duplicate value" - case ErrorTypeInvalid: - return "Invalid value" - case ErrorTypeNotSupported: - return "Unsupported value" - case ErrorTypeForbidden: - return "Forbidden" - case ErrorTypeTooLong: - return "Too long" - case ErrorTypeInternal: - return "Internal error" - default: - panic(fmt.Sprintf("unrecognized validation error: %q", string(t))) - } -} - -// NotFound returns a *Error indicating "value not found". This is -// used to report failure to find a requested value (e.g. looking up an ID). -func NotFound(field *Path, value interface{}) *Error { - return &Error{ErrorTypeNotFound, field.String(), value, ""} -} - -// Required returns a *Error indicating "value required". This is used -// to report required values that are not provided (e.g. empty strings, null -// values, or empty arrays). -func Required(field *Path, detail string) *Error { - return &Error{ErrorTypeRequired, field.String(), "", detail} -} - -// Duplicate returns a *Error indicating "duplicate value". This is -// used to report collisions of values that must be unique (e.g. names or IDs). -func Duplicate(field *Path, value interface{}) *Error { - return &Error{ErrorTypeDuplicate, field.String(), value, ""} -} - -// Invalid returns a *Error indicating "invalid value". This is used -// to report malformed values (e.g. failed regex match, too long, out of bounds). -func Invalid(field *Path, value interface{}, detail string) *Error { - return &Error{ErrorTypeInvalid, field.String(), value, detail} -} - -// NotSupported returns a *Error indicating "unsupported value". -// This is used to report unknown values for enumerated fields (e.g. a list of -// valid values). -func NotSupported(field *Path, value interface{}, validValues []string) *Error { - detail := "" - if validValues != nil && len(validValues) > 0 { - detail = "supported values: " + strings.Join(validValues, ", ") - } - return &Error{ErrorTypeNotSupported, field.String(), value, detail} -} - -// Forbidden returns a *Error indicating "forbidden". This is used to -// report valid (as per formatting rules) values which would be accepted under -// some conditions, but which are not permitted by current conditions (e.g. -// security policy). -func Forbidden(field *Path, detail string) *Error { - return &Error{ErrorTypeForbidden, field.String(), "", detail} -} - -// TooLong returns a *Error indicating "too long". This is used to -// report that the given value is too long. This is similar to -// Invalid, but the returned error will not include the too-long -// value. -func TooLong(field *Path, value interface{}, maxLength int) *Error { - return &Error{ErrorTypeTooLong, field.String(), value, fmt.Sprintf("must have at most %d characters", maxLength)} -} - -// InternalError returns a *Error indicating "internal error". This is used -// to signal that an error was found that was not directly related to user -// input. The err argument must be non-nil. -func InternalError(field *Path, err error) *Error { - return &Error{ErrorTypeInternal, field.String(), nil, err.Error()} -} - -// ErrorList holds a set of Errors. It is plausible that we might one day have -// non-field errors in this same umbrella package, but for now we don't, so -// we can keep it simple and leave ErrorList here. -type ErrorList []*Error - -// NewErrorTypeMatcher returns an errors.Matcher that returns true -// if the provided error is a Error and has the provided ErrorType. -func NewErrorTypeMatcher(t ErrorType) utilerrors.Matcher { - return func(err error) bool { - if e, ok := err.(*Error); ok { - return e.Type == t - } - return false - } -} - -// ToAggregate converts the ErrorList into an errors.Aggregate. -func (list ErrorList) ToAggregate() utilerrors.Aggregate { - errs := make([]error, 0, len(list)) - errorMsgs := sets.NewString() - for _, err := range list { - msg := fmt.Sprintf("%v", err) - if errorMsgs.Has(msg) { - continue - } - errorMsgs.Insert(msg) - errs = append(errs, err) - } - return utilerrors.NewAggregate(errs) -} - -func fromAggregate(agg utilerrors.Aggregate) ErrorList { - errs := agg.Errors() - list := make(ErrorList, len(errs)) - for i := range errs { - list[i] = errs[i].(*Error) - } - return list -} - -// Filter removes items from the ErrorList that match the provided fns. -func (list ErrorList) Filter(fns ...utilerrors.Matcher) ErrorList { - err := utilerrors.FilterOut(list.ToAggregate(), fns...) - if err == nil { - return nil - } - // FilterOut takes an Aggregate and returns an Aggregate - return fromAggregate(err.(utilerrors.Aggregate)) -} diff --git a/vendor/k8s.io/kubernetes/pkg/util/validation/field/errors_test.go b/vendor/k8s.io/kubernetes/pkg/util/validation/field/errors_test.go deleted file mode 100644 index 023939c8..00000000 --- a/vendor/k8s.io/kubernetes/pkg/util/validation/field/errors_test.go +++ /dev/null @@ -1,158 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package field - -import ( - "fmt" - "strings" - "testing" -) - -func TestMakeFuncs(t *testing.T) { - testCases := []struct { - fn func() *Error - expected ErrorType - }{ - { - func() *Error { return Invalid(NewPath("f"), "v", "d") }, - ErrorTypeInvalid, - }, - { - func() *Error { return NotSupported(NewPath("f"), "v", nil) }, - ErrorTypeNotSupported, - }, - { - func() *Error { return Duplicate(NewPath("f"), "v") }, - ErrorTypeDuplicate, - }, - { - func() *Error { return NotFound(NewPath("f"), "v") }, - ErrorTypeNotFound, - }, - { - func() *Error { return Required(NewPath("f"), "d") }, - ErrorTypeRequired, - }, - { - func() *Error { return InternalError(NewPath("f"), fmt.Errorf("e")) }, - ErrorTypeInternal, - }, - } - - for _, testCase := range testCases { - err := testCase.fn() - if err.Type != testCase.expected { - t.Errorf("expected Type %q, got %q", testCase.expected, err.Type) - } - } -} - -func TestErrorUsefulMessage(t *testing.T) { - s := Invalid(NewPath("foo"), "bar", "deet").Error() - t.Logf("message: %v", s) - for _, part := range []string{"foo", "bar", "deet", ErrorTypeInvalid.String()} { - if !strings.Contains(s, part) { - t.Errorf("error message did not contain expected part '%v'", part) - } - } - - type complicated struct { - Baz int - Qux string - Inner interface{} - KV map[string]int - } - s = Invalid( - NewPath("foo"), - &complicated{ - Baz: 1, - Qux: "aoeu", - Inner: &complicated{Qux: "asdf"}, - KV: map[string]int{"Billy": 2}, - }, - "detail", - ).Error() - t.Logf("message: %v", s) - for _, part := range []string{ - "foo", ErrorTypeInvalid.String(), - "Baz", "Qux", "Inner", "KV", "detail", - "1", "aoeu", "asdf", "Billy", "2", - } { - if !strings.Contains(s, part) { - t.Errorf("error message did not contain expected part '%v'", part) - } - } -} - -func TestToAggregate(t *testing.T) { - testCases := struct { - ErrList []ErrorList - NumExpectedErrs []int - }{ - []ErrorList{ - nil, - {}, - {Invalid(NewPath("f"), "v", "d")}, - {Invalid(NewPath("f"), "v", "d"), Invalid(NewPath("f"), "v", "d")}, - {Invalid(NewPath("f"), "v", "d"), InternalError(NewPath(""), fmt.Errorf("e"))}, - }, - []int{ - 0, - 0, - 1, - 1, - 2, - }, - } - - if len(testCases.ErrList) != len(testCases.NumExpectedErrs) { - t.Errorf("Mismatch: length of NumExpectedErrs does not match length of ErrList") - } - for i, tc := range testCases.ErrList { - agg := tc.ToAggregate() - numErrs := 0 - - if agg != nil { - numErrs = len(agg.Errors()) - } - if numErrs != testCases.NumExpectedErrs[i] { - t.Errorf("[%d] Expected %d, got %d", i, testCases.NumExpectedErrs[i], numErrs) - } - - if len(tc) == 0 { - if agg != nil { - t.Errorf("[%d] Expected nil, got %#v", i, agg) - } - } else if agg == nil { - t.Errorf("[%d] Expected non-nil", i) - } - } -} - -func TestErrListFilter(t *testing.T) { - list := ErrorList{ - Invalid(NewPath("test.field"), "", ""), - Invalid(NewPath("field.test"), "", ""), - Duplicate(NewPath("test"), "value"), - } - if len(list.Filter(NewErrorTypeMatcher(ErrorTypeDuplicate))) != 2 { - t.Errorf("should not filter") - } - if len(list.Filter(NewErrorTypeMatcher(ErrorTypeInvalid))) != 1 { - t.Errorf("should filter") - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/util/validation/field/path.go b/vendor/k8s.io/kubernetes/pkg/util/validation/field/path.go deleted file mode 100644 index 2efc8eec..00000000 --- a/vendor/k8s.io/kubernetes/pkg/util/validation/field/path.go +++ /dev/null @@ -1,91 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package field - -import ( - "bytes" - "fmt" - "strconv" -) - -// Path represents the path from some root to a particular field. -type Path struct { - name string // the name of this field or "" if this is an index - index string // if name == "", this is a subscript (index or map key) of the previous element - parent *Path // nil if this is the root element -} - -// NewPath creates a root Path object. -func NewPath(name string, moreNames ...string) *Path { - r := &Path{name: name, parent: nil} - for _, anotherName := range moreNames { - r = &Path{name: anotherName, parent: r} - } - return r -} - -// Root returns the root element of this Path. -func (p *Path) Root() *Path { - for ; p.parent != nil; p = p.parent { - // Do nothing. - } - return p -} - -// Child creates a new Path that is a child of the method receiver. -func (p *Path) Child(name string, moreNames ...string) *Path { - r := NewPath(name, moreNames...) - r.Root().parent = p - return r -} - -// Index indicates that the previous Path is to be subscripted by an int. -// This sets the same underlying value as Key. -func (p *Path) Index(index int) *Path { - return &Path{index: strconv.Itoa(index), parent: p} -} - -// Key indicates that the previous Path is to be subscripted by a string. -// This sets the same underlying value as Index. -func (p *Path) Key(key string) *Path { - return &Path{index: key, parent: p} -} - -// String produces a string representation of the Path. -func (p *Path) String() string { - // make a slice to iterate - elems := []*Path{} - for ; p != nil; p = p.parent { - elems = append(elems, p) - } - - // iterate, but it has to be backwards - buf := bytes.NewBuffer(nil) - for i := range elems { - p := elems[len(elems)-1-i] - if p.parent != nil && len(p.name) > 0 { - // This is either the root or it is a subscript. - buf.WriteString(".") - } - if len(p.name) > 0 { - buf.WriteString(p.name) - } else { - fmt.Fprintf(buf, "[%s]", p.index) - } - } - return buf.String() -} diff --git a/vendor/k8s.io/kubernetes/pkg/util/validation/field/path_test.go b/vendor/k8s.io/kubernetes/pkg/util/validation/field/path_test.go deleted file mode 100644 index d2f568c3..00000000 --- a/vendor/k8s.io/kubernetes/pkg/util/validation/field/path_test.go +++ /dev/null @@ -1,123 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package field - -import "testing" - -func TestPath(t *testing.T) { - testCases := []struct { - op func(*Path) *Path - expected string - }{ - { - func(p *Path) *Path { return p }, - "root", - }, - { - func(p *Path) *Path { return p.Child("first") }, - "root.first", - }, - { - func(p *Path) *Path { return p.Child("second") }, - "root.first.second", - }, - { - func(p *Path) *Path { return p.Index(0) }, - "root.first.second[0]", - }, - { - func(p *Path) *Path { return p.Child("third") }, - "root.first.second[0].third", - }, - { - func(p *Path) *Path { return p.Index(93) }, - "root.first.second[0].third[93]", - }, - { - func(p *Path) *Path { return p.parent }, - "root.first.second[0].third", - }, - { - func(p *Path) *Path { return p.parent }, - "root.first.second[0]", - }, - { - func(p *Path) *Path { return p.Key("key") }, - "root.first.second[0][key]", - }, - } - - root := NewPath("root") - p := root - for i, tc := range testCases { - p = tc.op(p) - if p.String() != tc.expected { - t.Errorf("[%d] Expected %q, got %q", i, tc.expected, p.String()) - } - if p.Root() != root { - t.Errorf("[%d] Wrong root: %#v", i, p.Root()) - } - } -} - -func TestPathMultiArg(t *testing.T) { - testCases := []struct { - op func(*Path) *Path - expected string - }{ - { - func(p *Path) *Path { return p }, - "root.first", - }, - { - func(p *Path) *Path { return p.Child("second", "third") }, - "root.first.second.third", - }, - { - func(p *Path) *Path { return p.Index(0) }, - "root.first.second.third[0]", - }, - { - func(p *Path) *Path { return p.parent }, - "root.first.second.third", - }, - { - func(p *Path) *Path { return p.parent }, - "root.first.second", - }, - { - func(p *Path) *Path { return p.parent }, - "root.first", - }, - { - func(p *Path) *Path { return p.parent }, - "root", - }, - } - - root := NewPath("root", "first") - p := root - for i, tc := range testCases { - p = tc.op(p) - if p.String() != tc.expected { - t.Errorf("[%d] Expected %q, got %q", i, tc.expected, p.String()) - } - if p.Root() != root.Root() { - t.Errorf("[%d] Wrong root: %#v", i, p.Root()) - } - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/util/validation/validation.go b/vendor/k8s.io/kubernetes/pkg/util/validation/validation.go deleted file mode 100644 index f49ac157..00000000 --- a/vendor/k8s.io/kubernetes/pkg/util/validation/validation.go +++ /dev/null @@ -1,343 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package validation - -import ( - "fmt" - "math" - "net" - "regexp" - "strings" -) - -const qnameCharFmt string = "[A-Za-z0-9]" -const qnameExtCharFmt string = "[-A-Za-z0-9_.]" -const qualifiedNameFmt string = "(" + qnameCharFmt + qnameExtCharFmt + "*)?" + qnameCharFmt -const qualifiedNameErrMsg string = "must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character" -const qualifiedNameMaxLength int = 63 - -var qualifiedNameRegexp = regexp.MustCompile("^" + qualifiedNameFmt + "$") - -// IsQualifiedName tests whether the value passed is what Kubernetes calls a -// "qualified name". This is a format used in various places throughout the -// system. If the value is not valid, a list of error strings is returned. -// Otherwise an empty list (or nil) is returned. -func IsQualifiedName(value string) []string { - var errs []string - parts := strings.Split(value, "/") - var name string - switch len(parts) { - case 1: - name = parts[0] - case 2: - var prefix string - prefix, name = parts[0], parts[1] - if len(prefix) == 0 { - errs = append(errs, "prefix part "+EmptyError()) - } else if msgs := IsDNS1123Subdomain(prefix); len(msgs) != 0 { - errs = append(errs, prefixEach(msgs, "prefix part ")...) - } - default: - return append(errs, "a qualified name "+RegexError(qualifiedNameErrMsg, qualifiedNameFmt, "MyName", "my.name", "123-abc")+ - " with an optional DNS subdomain prefix and '/' (e.g. 'example.com/MyName')") - } - - if len(name) == 0 { - errs = append(errs, "name part "+EmptyError()) - } else if len(name) > qualifiedNameMaxLength { - errs = append(errs, "name part "+MaxLenError(qualifiedNameMaxLength)) - } - if !qualifiedNameRegexp.MatchString(name) { - errs = append(errs, "name part "+RegexError(qualifiedNameErrMsg, qualifiedNameFmt, "MyName", "my.name", "123-abc")) - } - return errs -} - -const labelValueFmt string = "(" + qualifiedNameFmt + ")?" -const labelValueErrMsg string = "a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character" -const LabelValueMaxLength int = 63 - -var labelValueRegexp = regexp.MustCompile("^" + labelValueFmt + "$") - -// IsValidLabelValue tests whether the value passed is a valid label value. If -// the value is not valid, a list of error strings is returned. Otherwise an -// empty list (or nil) is returned. -func IsValidLabelValue(value string) []string { - var errs []string - if len(value) > LabelValueMaxLength { - errs = append(errs, MaxLenError(LabelValueMaxLength)) - } - if !labelValueRegexp.MatchString(value) { - errs = append(errs, RegexError(labelValueErrMsg, labelValueFmt, "MyValue", "my_value", "12345")) - } - return errs -} - -const dns1123LabelFmt string = "[a-z0-9]([-a-z0-9]*[a-z0-9])?" -const dns1123LabelErrMsg string = "a valid DNS (RFC 1123) label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character" -const DNS1123LabelMaxLength int = 63 - -var dns1123LabelRegexp = regexp.MustCompile("^" + dns1123LabelFmt + "$") - -// IsDNS1123Label tests for a string that conforms to the definition of a label in -// DNS (RFC 1123). -func IsDNS1123Label(value string) []string { - var errs []string - if len(value) > DNS1123LabelMaxLength { - errs = append(errs, MaxLenError(DNS1123LabelMaxLength)) - } - if !dns1123LabelRegexp.MatchString(value) { - errs = append(errs, RegexError(dns1123LabelErrMsg, dns1123LabelFmt, "my-name", "123-abc")) - } - return errs -} - -const dns1123SubdomainFmt string = dns1123LabelFmt + "(\\." + dns1123LabelFmt + ")*" -const dns1123SubdomainErrorMsg string = "a valid DNS (RFC 1123) subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character" -const DNS1123SubdomainMaxLength int = 253 - -var dns1123SubdomainRegexp = regexp.MustCompile("^" + dns1123SubdomainFmt + "$") - -// IsDNS1123Subdomain tests for a string that conforms to the definition of a -// subdomain in DNS (RFC 1123). -func IsDNS1123Subdomain(value string) []string { - var errs []string - if len(value) > DNS1123SubdomainMaxLength { - errs = append(errs, MaxLenError(DNS1123SubdomainMaxLength)) - } - if !dns1123SubdomainRegexp.MatchString(value) { - errs = append(errs, RegexError(dns1123SubdomainErrorMsg, dns1123SubdomainFmt, "example.com")) - } - return errs -} - -const dns1035LabelFmt string = "[a-z]([-a-z0-9]*[a-z0-9])?" -const dns1035LabelErrMsg string = "a valid DNS (RFC 1035) label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character" -const DNS1035LabelMaxLength int = 63 - -var dns1035LabelRegexp = regexp.MustCompile("^" + dns1035LabelFmt + "$") - -// IsDNS1035Label tests for a string that conforms to the definition of a label in -// DNS (RFC 1035). -func IsDNS1035Label(value string) []string { - var errs []string - if len(value) > DNS1035LabelMaxLength { - errs = append(errs, MaxLenError(DNS1035LabelMaxLength)) - } - if !dns1035LabelRegexp.MatchString(value) { - errs = append(errs, RegexError(dns1035LabelErrMsg, dns1035LabelFmt, "my-name", "abc-123")) - } - return errs -} - -// wildcard definition - RFC 1034 section 4.3.3. -// examples: -// - valid: *.bar.com, *.foo.bar.com -// - invalid: *.*.bar.com, *.foo.*.com, *bar.com, f*.bar.com, * -const wildcardDNS1123SubdomainFmt = "\\*\\." + dns1123SubdomainFmt -const wildcardDNS1123SubdomainErrMsg = "a valid wildcard DNS (RFC 1123) subdomain must start with '*.', followed by a valid DNS subdomain, which must consist of lower case alphanumeric characters, '-' or '.' and end with an alphanumeric character" - -// IsWildcardDNS1123Subdomain tests for a string that conforms to the definition of a -// wildcard subdomain in DNS (RFC 1034 section 4.3.3). -func IsWildcardDNS1123Subdomain(value string) []string { - wildcardDNS1123SubdomainRegexp := regexp.MustCompile("^" + wildcardDNS1123SubdomainFmt + "$") - - var errs []string - if len(value) > DNS1123SubdomainMaxLength { - errs = append(errs, MaxLenError(DNS1123SubdomainMaxLength)) - } - if !wildcardDNS1123SubdomainRegexp.MatchString(value) { - errs = append(errs, RegexError(wildcardDNS1123SubdomainErrMsg, wildcardDNS1123SubdomainFmt, "*.example.com")) - } - return errs -} - -const cIdentifierFmt string = "[A-Za-z_][A-Za-z0-9_]*" -const identifierErrMsg string = "a valid C identifier must start with alphabetic character or '_', followed by a string of alphanumeric characters or '_'" - -var cIdentifierRegexp = regexp.MustCompile("^" + cIdentifierFmt + "$") - -// IsCIdentifier tests for a string that conforms the definition of an identifier -// in C. This checks the format, but not the length. -func IsCIdentifier(value string) []string { - if !cIdentifierRegexp.MatchString(value) { - return []string{RegexError(identifierErrMsg, cIdentifierFmt, "my_name", "MY_NAME", "MyName")} - } - return nil -} - -// IsValidPortNum tests that the argument is a valid, non-zero port number. -func IsValidPortNum(port int) []string { - if 1 <= port && port <= 65535 { - return nil - } - return []string{InclusiveRangeError(1, 65535)} -} - -// Now in libcontainer UID/GID limits is 0 ~ 1<<31 - 1 -// TODO: once we have a type for UID/GID we should make these that type. -const ( - minUserID = 0 - maxUserID = math.MaxInt32 - minGroupID = 0 - maxGroupID = math.MaxInt32 -) - -// IsValidGroupId tests that the argument is a valid Unix GID. -func IsValidGroupId(gid int64) []string { - if minGroupID <= gid && gid <= maxGroupID { - return nil - } - return []string{InclusiveRangeError(minGroupID, maxGroupID)} -} - -// IsValidUserId tests that the argument is a valid Unix UID. -func IsValidUserId(uid int64) []string { - if minUserID <= uid && uid <= maxUserID { - return nil - } - return []string{InclusiveRangeError(minUserID, maxUserID)} -} - -var portNameCharsetRegex = regexp.MustCompile("^[-a-z0-9]+$") -var portNameOneLetterRegexp = regexp.MustCompile("[a-z]") - -// IsValidPortName check that the argument is valid syntax. It must be -// non-empty and no more than 15 characters long. It may contain only [-a-z0-9] -// and must contain at least one letter [a-z]. It must not start or end with a -// hyphen, nor contain adjacent hyphens. -// -// Note: We only allow lower-case characters, even though RFC 6335 is case -// insensitive. -func IsValidPortName(port string) []string { - var errs []string - if len(port) > 15 { - errs = append(errs, MaxLenError(15)) - } - if !portNameCharsetRegex.MatchString(port) { - errs = append(errs, "must contain only alpha-numeric characters (a-z, 0-9), and hyphens (-)") - } - if !portNameOneLetterRegexp.MatchString(port) { - errs = append(errs, "must contain at least one letter or number (a-z, 0-9)") - } - if strings.Contains(port, "--") { - errs = append(errs, "must not contain consecutive hyphens") - } - if len(port) > 0 && (port[0] == '-' || port[len(port)-1] == '-') { - errs = append(errs, "must not begin or end with a hyphen") - } - return errs -} - -// IsValidIP tests that the argument is a valid IP address. -func IsValidIP(value string) []string { - if net.ParseIP(value) == nil { - return []string{"must be a valid IP address, (e.g. 10.9.8.7)"} - } - return nil -} - -const percentFmt string = "[0-9]+%" -const percentErrMsg string = "a valid percent string must be a numeric string followed by an ending '%'" - -var percentRegexp = regexp.MustCompile("^" + percentFmt + "$") - -func IsValidPercent(percent string) []string { - if !percentRegexp.MatchString(percent) { - return []string{RegexError(percentErrMsg, percentFmt, "1%", "93%")} - } - return nil -} - -const httpHeaderNameFmt string = "[-A-Za-z0-9]+" -const httpHeaderNameErrMsg string = "a valid HTTP header must consist of alphanumeric characters or '-'" - -var httpHeaderNameRegexp = regexp.MustCompile("^" + httpHeaderNameFmt + "$") - -// IsHTTPHeaderName checks that a string conforms to the Go HTTP library's -// definition of a valid header field name (a stricter subset than RFC7230). -func IsHTTPHeaderName(value string) []string { - if !httpHeaderNameRegexp.MatchString(value) { - return []string{RegexError(httpHeaderNameErrMsg, httpHeaderNameFmt, "X-Header-Name")} - } - return nil -} - -const configMapKeyFmt = `[-._a-zA-Z0-9]+` -const configMapKeyErrMsg string = "a valid config key must consist of alphanumeric characters, '-', '_' or '.'" - -var configMapKeyRegexp = regexp.MustCompile("^" + configMapKeyFmt + "$") - -// IsConfigMapKey tests for a string that is a valid key for a ConfigMap or Secret -func IsConfigMapKey(value string) []string { - var errs []string - if len(value) > DNS1123SubdomainMaxLength { - errs = append(errs, MaxLenError(DNS1123SubdomainMaxLength)) - } - if !configMapKeyRegexp.MatchString(value) { - errs = append(errs, RegexError(configMapKeyErrMsg, configMapKeyFmt, "key.name", "KEY_NAME", "key-name")) - } - if value == "." { - errs = append(errs, `must not be '.'`) - } else if value == ".." { - errs = append(errs, `must not be '..'`) - } else if strings.HasPrefix(value, "..") { - errs = append(errs, `must not start with '..'`) - } - return errs -} - -// MaxLenError returns a string explanation of a "string too long" validation -// failure. -func MaxLenError(length int) string { - return fmt.Sprintf("must be no more than %d characters", length) -} - -// RegexError returns a string explanation of a regex validation failure. -func RegexError(msg string, fmt string, examples ...string) string { - if len(examples) == 0 { - return msg + " (regex used for validation is '" + fmt + "')" - } - msg += " (e.g. " - for i := range examples { - if i > 0 { - msg += " or " - } - msg += "'" + examples[i] + "', " - } - msg += "regex used for validation is '" + fmt + "')" - return msg -} - -// EmptyError returns a string explanation of a "must not be empty" validation -// failure. -func EmptyError() string { - return "must be non-empty" -} - -func prefixEach(msgs []string, prefix string) []string { - for i := range msgs { - msgs[i] = prefix + msgs[i] - } - return msgs -} - -// InclusiveRangeError returns a string explanation of a numeric "must be -// between" validation failure. -func InclusiveRangeError(lo, hi int) string { - return fmt.Sprintf(`must be between %d and %d, inclusive`, lo, hi) -} diff --git a/vendor/k8s.io/kubernetes/pkg/util/validation/validation_test.go b/vendor/k8s.io/kubernetes/pkg/util/validation/validation_test.go deleted file mode 100644 index 7dfa73e5..00000000 --- a/vendor/k8s.io/kubernetes/pkg/util/validation/validation_test.go +++ /dev/null @@ -1,436 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package validation - -import ( - "strings" - "testing" -) - -func TestIsDNS1123Label(t *testing.T) { - goodValues := []string{ - "a", "ab", "abc", "a1", "a-1", "a--1--2--b", - "0", "01", "012", "1a", "1-a", "1--a--b--2", - strings.Repeat("a", 63), - } - for _, val := range goodValues { - if msgs := IsDNS1123Label(val); len(msgs) != 0 { - t.Errorf("expected true for '%s': %v", val, msgs) - } - } - - badValues := []string{ - "", "A", "ABC", "aBc", "A1", "A-1", "1-A", - "-", "a-", "-a", "1-", "-1", - "_", "a_", "_a", "a_b", "1_", "_1", "1_2", - ".", "a.", ".a", "a.b", "1.", ".1", "1.2", - " ", "a ", " a", "a b", "1 ", " 1", "1 2", - strings.Repeat("a", 64), - } - for _, val := range badValues { - if msgs := IsDNS1123Label(val); len(msgs) == 0 { - t.Errorf("expected false for '%s'", val) - } - } -} - -func TestIsDNS1123Subdomain(t *testing.T) { - goodValues := []string{ - "a", "ab", "abc", "a1", "a-1", "a--1--2--b", - "0", "01", "012", "1a", "1-a", "1--a--b--2", - "a.a", "ab.a", "abc.a", "a1.a", "a-1.a", "a--1--2--b.a", - "a.1", "ab.1", "abc.1", "a1.1", "a-1.1", "a--1--2--b.1", - "0.a", "01.a", "012.a", "1a.a", "1-a.a", "1--a--b--2", - "0.1", "01.1", "012.1", "1a.1", "1-a.1", "1--a--b--2.1", - "a.b.c.d.e", "aa.bb.cc.dd.ee", "1.2.3.4.5", "11.22.33.44.55", - strings.Repeat("a", 253), - } - for _, val := range goodValues { - if msgs := IsDNS1123Subdomain(val); len(msgs) != 0 { - t.Errorf("expected true for '%s': %v", val, msgs) - } - } - - badValues := []string{ - "", "A", "ABC", "aBc", "A1", "A-1", "1-A", - "-", "a-", "-a", "1-", "-1", - "_", "a_", "_a", "a_b", "1_", "_1", "1_2", - ".", "a.", ".a", "a..b", "1.", ".1", "1..2", - " ", "a ", " a", "a b", "1 ", " 1", "1 2", - "A.a", "aB.a", "ab.A", "A1.a", "a1.A", - "A.1", "aB.1", "A1.1", "1A.1", - "0.A", "01.A", "012.A", "1A.a", "1a.A", - "A.B.C.D.E", "AA.BB.CC.DD.EE", "a.B.c.d.e", "aa.bB.cc.dd.ee", - "a@b", "a,b", "a_b", "a;b", - "a:b", "a%b", "a?b", "a$b", - strings.Repeat("a", 254), - } - for _, val := range badValues { - if msgs := IsDNS1123Subdomain(val); len(msgs) == 0 { - t.Errorf("expected false for '%s'", val) - } - } -} - -func TestIsDNS1035Label(t *testing.T) { - goodValues := []string{ - "a", "ab", "abc", "a1", "a-1", "a--1--2--b", - strings.Repeat("a", 63), - } - for _, val := range goodValues { - if msgs := IsDNS1035Label(val); len(msgs) != 0 { - t.Errorf("expected true for '%s': %v", val, msgs) - } - } - - badValues := []string{ - "0", "01", "012", "1a", "1-a", "1--a--b--2", - "", "A", "ABC", "aBc", "A1", "A-1", "1-A", - "-", "a-", "-a", "1-", "-1", - "_", "a_", "_a", "a_b", "1_", "_1", "1_2", - ".", "a.", ".a", "a.b", "1.", ".1", "1.2", - " ", "a ", " a", "a b", "1 ", " 1", "1 2", - strings.Repeat("a", 64), - } - for _, val := range badValues { - if msgs := IsDNS1035Label(val); len(msgs) == 0 { - t.Errorf("expected false for '%s'", val) - } - } -} - -func TestIsCIdentifier(t *testing.T) { - goodValues := []string{ - "a", "ab", "abc", "a1", "_a", "a_", "a_b", "a_1", "a__1__2__b", "__abc_123", - "A", "AB", "AbC", "A1", "_A", "A_", "A_B", "A_1", "A__1__2__B", "__123_ABC", - } - for _, val := range goodValues { - if msgs := IsCIdentifier(val); len(msgs) != 0 { - t.Errorf("expected true for '%s': %v", val, msgs) - } - } - - badValues := []string{ - "", "1", "123", "1a", - "-", "a-", "-a", "1-", "-1", "1_", "1_2", - ".", "a.", ".a", "a.b", "1.", ".1", "1.2", - " ", "a ", " a", "a b", "1 ", " 1", "1 2", - "#a#", - } - for _, val := range badValues { - if msgs := IsCIdentifier(val); len(msgs) == 0 { - t.Errorf("expected false for '%s'", val) - } - } -} - -func TestIsValidPortNum(t *testing.T) { - goodValues := []int{1, 2, 1000, 16384, 32768, 65535} - for _, val := range goodValues { - if msgs := IsValidPortNum(val); len(msgs) != 0 { - t.Errorf("expected true for %d, got %v", val, msgs) - } - } - - badValues := []int{0, -1, 65536, 100000} - for _, val := range badValues { - if msgs := IsValidPortNum(val); len(msgs) == 0 { - t.Errorf("expected false for %d", val) - } - } -} - -func TestIsValidGroupId(t *testing.T) { - goodValues := []int64{0, 1, 1000, 65535, 2147483647} - for _, val := range goodValues { - if msgs := IsValidGroupId(val); len(msgs) != 0 { - t.Errorf("expected true for '%d': %v", val, msgs) - } - } - - badValues := []int64{-1, -1003, 2147483648, 4147483647} - for _, val := range badValues { - if msgs := IsValidGroupId(val); len(msgs) == 0 { - t.Errorf("expected false for '%d'", val) - } - } -} - -func TestIsValidUserId(t *testing.T) { - goodValues := []int64{0, 1, 1000, 65535, 2147483647} - for _, val := range goodValues { - if msgs := IsValidUserId(val); len(msgs) != 0 { - t.Errorf("expected true for '%d': %v", val, msgs) - } - } - - badValues := []int64{-1, -1003, 2147483648, 4147483647} - for _, val := range badValues { - if msgs := IsValidUserId(val); len(msgs) == 0 { - t.Errorf("expected false for '%d'", val) - } - } -} - -func TestIsValidPortName(t *testing.T) { - goodValues := []string{"telnet", "re-mail-ck", "pop3", "a", "a-1", "1-a", "a-1-b-2-c", "1-a-2-b-3"} - for _, val := range goodValues { - if msgs := IsValidPortName(val); len(msgs) != 0 { - t.Errorf("expected true for %q: %v", val, msgs) - } - } - - badValues := []string{"longerthan15characters", "", strings.Repeat("a", 16), "12345", "1-2-3-4", "-begin", "end-", "two--hyphens", "whois++"} - for _, val := range badValues { - if msgs := IsValidPortName(val); len(msgs) == 0 { - t.Errorf("expected false for %q", val) - } - } -} - -func TestIsQualifiedName(t *testing.T) { - successCases := []string{ - "simple", - "now-with-dashes", - "1-starts-with-num", - "1234", - "simple/simple", - "now-with-dashes/simple", - "now-with-dashes/now-with-dashes", - "now.with.dots/simple", - "now-with.dashes-and.dots/simple", - "1-num.2-num/3-num", - "1234/5678", - "1.2.3.4/5678", - "Uppercase_Is_OK_123", - "example.com/Uppercase_Is_OK_123", - "requests.storage-foo", - strings.Repeat("a", 63), - strings.Repeat("a", 253) + "/" + strings.Repeat("b", 63), - } - for i := range successCases { - if errs := IsQualifiedName(successCases[i]); len(errs) != 0 { - t.Errorf("case[%d]: %q: expected success: %v", i, successCases[i], errs) - } - } - - errorCases := []string{ - "nospecialchars%^=@", - "cantendwithadash-", - "-cantstartwithadash-", - "only/one/slash", - "Example.com/abc", - "example_com/abc", - "example.com/", - "/simple", - strings.Repeat("a", 64), - strings.Repeat("a", 254) + "/abc", - } - for i := range errorCases { - if errs := IsQualifiedName(errorCases[i]); len(errs) == 0 { - t.Errorf("case[%d]: %q: expected failure", i, errorCases[i]) - } - } -} - -func TestIsValidLabelValue(t *testing.T) { - successCases := []string{ - "simple", - "now-with-dashes", - "1-starts-with-num", - "end-with-num-1", - "1234", // only num - strings.Repeat("a", 63), // to the limit - "", // empty value - } - for i := range successCases { - if errs := IsValidLabelValue(successCases[i]); len(errs) != 0 { - t.Errorf("case %s expected success: %v", successCases[i], errs) - } - } - - errorCases := []string{ - "nospecialchars%^=@", - "Tama-nui-te-rā.is.Māori.sun", - "\\backslashes\\are\\bad", - "-starts-with-dash", - "ends-with-dash-", - ".starts.with.dot", - "ends.with.dot.", - strings.Repeat("a", 64), // over the limit - } - for i := range errorCases { - if errs := IsValidLabelValue(errorCases[i]); len(errs) == 0 { - t.Errorf("case[%d] expected failure", i) - } - } -} - -func TestIsValidIP(t *testing.T) { - goodValues := []string{ - "::1", - "2a00:79e0:2:0:f1c3:e797:93c1:df80", - "::", - "2001:4860:4860::8888", - "::fff:1.1.1.1", - "1.1.1.1", - "1.1.1.01", - "255.0.0.1", - "1.0.0.0", - "0.0.0.0", - } - for _, val := range goodValues { - if msgs := IsValidIP(val); len(msgs) != 0 { - t.Errorf("expected true for %q: %v", val, msgs) - } - } - - badValues := []string{ - "[2001:db8:0:1]:80", - "myhost.mydomain", - "-1.0.0.0", - "[2001:db8:0:1]", - "a", - } - for _, val := range badValues { - if msgs := IsValidIP(val); len(msgs) == 0 { - t.Errorf("expected false for %q", val) - } - } -} - -func TestIsHTTPHeaderName(t *testing.T) { - goodValues := []string{ - // Common ones - "Accept-Encoding", "Host", "If-Modified-Since", "X-Forwarded-For", - // Weirdo, but still conforming names - "a", "ab", "abc", "a1", "-a", "a-", "a-b", "a-1", "a--1--2--b", "--abc-123", - "A", "AB", "AbC", "A1", "-A", "A-", "A-B", "A-1", "A--1--2--B", "--123-ABC", - } - for _, val := range goodValues { - if msgs := IsHTTPHeaderName(val); len(msgs) != 0 { - t.Errorf("expected true for '%s': %v", val, msgs) - } - } - - badValues := []string{ - "Host:", "X-Forwarded-For:", "X-@Home", - "", "_", "a_", "_a", "1_", "1_2", ".", "a.", ".a", "a.b", "1.", ".1", "1.2", - " ", "a ", " a", "a b", "1 ", " 1", "1 2", "#a#", "^", ",", ";", "=", "<", - "?", "@", "{", - } - for _, val := range badValues { - if msgs := IsHTTPHeaderName(val); len(msgs) == 0 { - t.Errorf("expected false for '%s'", val) - } - } -} - -func TestIsValidPercent(t *testing.T) { - goodValues := []string{ - "0%", - "00000%", - "1%", - "01%", - "99%", - "100%", - "101%", - } - for _, val := range goodValues { - if msgs := IsValidPercent(val); len(msgs) != 0 { - t.Errorf("expected true for %q: %v", val, msgs) - } - } - - badValues := []string{ - "", - "0", - "100", - "0.0%", - "99.9%", - "hundred", - " 1%", - "1% ", - "-0%", - "-1%", - "+1%", - } - for _, val := range badValues { - if msgs := IsValidPercent(val); len(msgs) == 0 { - t.Errorf("expected false for %q", val) - } - } -} - -func TestIsConfigMapKey(t *testing.T) { - successCases := []string{ - "a", - "good", - "good-good", - "still.good", - "this.is.also.good", - ".so.is.this", - "THIS_IS_GOOD", - "so_is_this_17", - } - - for i := range successCases { - if errs := IsConfigMapKey(successCases[i]); len(errs) != 0 { - t.Errorf("[%d] expected success: %v", i, errs) - } - } - - failureCases := []string{ - ".", - "..", - "..bad", - "b*d", - "bad!&bad", - } - - for i := range failureCases { - if errs := IsConfigMapKey(failureCases[i]); len(errs) == 0 { - t.Errorf("[%d] expected failure", i) - } - } -} - -func TestIsWildcardDNS1123Subdomain(t *testing.T) { - goodValues := []string{ - "*.example.com", - "*.bar.com", - "*.foo.bar.com", - } - for _, val := range goodValues { - if errs := IsWildcardDNS1123Subdomain(val); len(errs) != 0 { - t.Errorf("expected no errors for %q: %v", val, errs) - } - } - - badValues := []string{ - "*.*.bar.com", - "*.foo.*.com", - "*bar.com", - "f*.bar.com", - "*", - } - for _, val := range badValues { - if errs := IsWildcardDNS1123Subdomain(val); len(errs) == 0 { - t.Errorf("expected errors for %q", val) - } - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/util/wait/.readonly b/vendor/k8s.io/kubernetes/pkg/util/wait/.readonly deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/k8s.io/kubernetes/pkg/util/wait/BUILD b/vendor/k8s.io/kubernetes/pkg/util/wait/BUILD index 21beff53..deefdcef 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/wait/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/util/wait/BUILD @@ -5,25 +5,12 @@ licenses(["notice"]) load( "@io_bazel_rules_go//go:def.bzl", "go_library", - "go_test", ) go_library( name = "go_default_library", - srcs = [ - "doc.go", - "wait.go", - ], + srcs = ["doc.go"], tags = ["automanaged"], - deps = ["//pkg/util/runtime:go_default_library"], -) - -go_test( - name = "go_default_test", - srcs = ["wait_test.go"], - library = ":go_default_library", - tags = ["automanaged"], - deps = ["//pkg/util/runtime:go_default_library"], ) filegroup( diff --git a/vendor/k8s.io/kubernetes/pkg/util/wait/doc.go b/vendor/k8s.io/kubernetes/pkg/util/wait/doc.go index 59007139..748c3a18 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/wait/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/util/wait/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Package wait provides tools for polling or listening for changes -// to a condition. -package wait // import "k8s.io/kubernetes/pkg/util/wait" +// Package wait only exists until heapster rebases +// TODO genericapiserver remove this empty package. Godep fails without this because heapster relies +// on this package. This will allow us to start splitting packages, but will force +// heapster to update on their next kube rebase. +package wait diff --git a/vendor/k8s.io/kubernetes/pkg/util/wait/wait.go b/vendor/k8s.io/kubernetes/pkg/util/wait/wait.go deleted file mode 100644 index 34ed2301..00000000 --- a/vendor/k8s.io/kubernetes/pkg/util/wait/wait.go +++ /dev/null @@ -1,332 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package wait - -import ( - "errors" - "math/rand" - "time" - - "k8s.io/kubernetes/pkg/util/runtime" -) - -// For any test of the style: -// ... -// <- time.After(timeout): -// t.Errorf("Timed out") -// The value for timeout should effectively be "forever." Obviously we don't want our tests to truly lock up forever, but 30s -// is long enough that it is effectively forever for the things that can slow down a run on a heavily contended machine -// (GC, seeks, etc), but not so long as to make a developer ctrl-c a test run if they do happen to break that test. -var ForeverTestTimeout = time.Second * 30 - -// NeverStop may be passed to Until to make it never stop. -var NeverStop <-chan struct{} = make(chan struct{}) - -// Forever calls f every period for ever. -// -// Forever is syntactic sugar on top of Until. -func Forever(f func(), period time.Duration) { - Until(f, period, NeverStop) -} - -// Until loops until stop channel is closed, running f every period. -// -// Until is syntactic sugar on top of JitterUntil with zero jitter factor and -// with sliding = true (which means the timer for period starts after the f -// completes). -func Until(f func(), period time.Duration, stopCh <-chan struct{}) { - JitterUntil(f, period, 0.0, true, stopCh) -} - -// NonSlidingUntil loops until stop channel is closed, running f every -// period. -// -// NonSlidingUntil is syntactic sugar on top of JitterUntil with zero jitter -// factor, with sliding = false (meaning the timer for period starts at the same -// time as the function starts). -func NonSlidingUntil(f func(), period time.Duration, stopCh <-chan struct{}) { - JitterUntil(f, period, 0.0, false, stopCh) -} - -// JitterUntil loops until stop channel is closed, running f every period. -// -// If jitterFactor is positive, the period is jittered before every run of f. -// If jitterFactor is not positive, the period is unchanged and not jitterd. -// -// If slidingis true, the period is computed after f runs. If it is false then -// period includes the runtime for f. -// -// Close stopCh to stop. f may not be invoked if stop channel is already -// closed. Pass NeverStop to if you don't want it stop. -func JitterUntil(f func(), period time.Duration, jitterFactor float64, sliding bool, stopCh <-chan struct{}) { - for { - - select { - case <-stopCh: - return - default: - } - - jitteredPeriod := period - if jitterFactor > 0.0 { - jitteredPeriod = Jitter(period, jitterFactor) - } - - var t *time.Timer - if !sliding { - t = time.NewTimer(jitteredPeriod) - } - - func() { - defer runtime.HandleCrash() - f() - }() - - if sliding { - t = time.NewTimer(jitteredPeriod) - } - - // NOTE: b/c there is no priority selection in golang - // it is possible for this to race, meaning we could - // trigger t.C and stopCh, and t.C select falls through. - // In order to mitigate we re-check stopCh at the beginning - // of every loop to prevent extra executions of f(). - select { - case <-stopCh: - return - case <-t.C: - } - } -} - -// Jitter returns a time.Duration between duration and duration + maxFactor * -// duration. -// -// This allows clients to avoid converging on periodic behavior. If maxFactor -// is 0.0, a suggested default value will be chosen. -func Jitter(duration time.Duration, maxFactor float64) time.Duration { - if maxFactor <= 0.0 { - maxFactor = 1.0 - } - wait := duration + time.Duration(rand.Float64()*maxFactor*float64(duration)) - return wait -} - -// ErrWaitTimeout is returned when the condition exited without success. -var ErrWaitTimeout = errors.New("timed out waiting for the condition") - -// ConditionFunc returns true if the condition is satisfied, or an error -// if the loop should be aborted. -type ConditionFunc func() (done bool, err error) - -// Backoff holds parameters applied to a Backoff function. -type Backoff struct { - Duration time.Duration // the base duration - Factor float64 // Duration is multipled by factor each iteration - Jitter float64 // The amount of jitter applied each iteration - Steps int // Exit with error after this many steps -} - -// ExponentialBackoff repeats a condition check with exponential backoff. -// -// It checks the condition up to Steps times, increasing the wait by multipling -// the previous duration by Factor. -// -// If Jitter is greater than zero, a random amount of each duration is added -// (between duration and duration*(1+jitter)). -// -// If the condition never returns true, ErrWaitTimeout is returned. All other -// errors terminate immediately. -func ExponentialBackoff(backoff Backoff, condition ConditionFunc) error { - duration := backoff.Duration - for i := 0; i < backoff.Steps; i++ { - if i != 0 { - adjusted := duration - if backoff.Jitter > 0.0 { - adjusted = Jitter(duration, backoff.Jitter) - } - time.Sleep(adjusted) - duration = time.Duration(float64(duration) * backoff.Factor) - } - if ok, err := condition(); err != nil || ok { - return err - } - } - return ErrWaitTimeout -} - -// Poll tries a condition func until it returns true, an error, or the timeout -// is reached. -// -// Poll always waits the interval before the run of 'condition'. -// 'condition' will always be invoked at least once. -// -// Some intervals may be missed if the condition takes too long or the time -// window is too short. -// -// If you want to Poll something forever, see PollInfinite. -func Poll(interval, timeout time.Duration, condition ConditionFunc) error { - return pollInternal(poller(interval, timeout), condition) -} - -func pollInternal(wait WaitFunc, condition ConditionFunc) error { - return WaitFor(wait, condition, NeverStop) -} - -// PollImmediate tries a condition func until it returns true, an error, or the timeout -// is reached. -// -// Poll always checks 'condition' before waiting for the interval. 'condition' -// will always be invoked at least once. -// -// Some intervals may be missed if the condition takes too long or the time -// window is too short. -// -// If you want to Poll something forever, see PollInfinite. -func PollImmediate(interval, timeout time.Duration, condition ConditionFunc) error { - return pollImmediateInternal(poller(interval, timeout), condition) -} - -func pollImmediateInternal(wait WaitFunc, condition ConditionFunc) error { - done, err := condition() - if err != nil { - return err - } - if done { - return nil - } - return pollInternal(wait, condition) -} - -// PollInfinite tries a condition func until it returns true or an error -// -// PollInfinite always waits the interval before the run of 'condition'. -// -// Some intervals may be missed if the condition takes too long or the time -// window is too short. -func PollInfinite(interval time.Duration, condition ConditionFunc) error { - done := make(chan struct{}) - defer close(done) - return PollUntil(interval, condition, done) -} - -// PollImmediateInfinite tries a condition func until it returns true or an error -// -// PollImmediateInfinite runs the 'condition' before waiting for the interval. -// -// Some intervals may be missed if the condition takes too long or the time -// window is too short. -func PollImmediateInfinite(interval time.Duration, condition ConditionFunc) error { - done, err := condition() - if err != nil { - return err - } - if done { - return nil - } - return PollInfinite(interval, condition) -} - -// PollUntil tries a condition func until it returns true, an error or stopCh is -// closed. -// -// PolUntil always waits interval before the first run of 'condition'. -// 'condition' will always be invoked at least once. -func PollUntil(interval time.Duration, condition ConditionFunc, stopCh <-chan struct{}) error { - return WaitFor(poller(interval, 0), condition, stopCh) -} - -// WaitFunc creates a channel that receives an item every time a test -// should be executed and is closed when the last test should be invoked. -type WaitFunc func(done <-chan struct{}) <-chan struct{} - -// WaitFor continually checks 'fn' as driven by 'wait'. -// -// WaitFor gets a channel from 'wait()'', and then invokes 'fn' once for every value -// placed on the channel and once more when the channel is closed. -// -// If 'fn' returns an error the loop ends and that error is returned, and if -// 'fn' returns true the loop ends and nil is returned. -// -// ErrWaitTimeout will be returned if the channel is closed without fn ever -// returning true. -func WaitFor(wait WaitFunc, fn ConditionFunc, done <-chan struct{}) error { - c := wait(done) - for { - _, open := <-c - ok, err := fn() - if err != nil { - return err - } - if ok { - return nil - } - if !open { - break - } - } - return ErrWaitTimeout -} - -// poller returns a WaitFunc that will send to the channel every interval until -// timeout has elapsed and then closes the channel. -// -// Over very short intervals you may receive no ticks before the channel is -// closed. A timeout of 0 is interpreted as an infinity. -// -// Output ticks are not buffered. If the channel is not ready to receive an -// item, the tick is skipped. -func poller(interval, timeout time.Duration) WaitFunc { - return WaitFunc(func(done <-chan struct{}) <-chan struct{} { - ch := make(chan struct{}) - - go func() { - defer close(ch) - - tick := time.NewTicker(interval) - defer tick.Stop() - - var after <-chan time.Time - if timeout != 0 { - // time.After is more convenient, but it - // potentially leaves timers around much longer - // than necessary if we exit early. - timer := time.NewTimer(timeout) - after = timer.C - defer timer.Stop() - } - - for { - select { - case <-tick.C: - // If the consumer isn't ready for this signal drop it and - // check the other channels. - select { - case ch <- struct{}{}: - default: - } - case <-after: - return - case <-done: - return - } - } - }() - - return ch - }) -} diff --git a/vendor/k8s.io/kubernetes/pkg/util/wait/wait_test.go b/vendor/k8s.io/kubernetes/pkg/util/wait/wait_test.go deleted file mode 100644 index 3c928424..00000000 --- a/vendor/k8s.io/kubernetes/pkg/util/wait/wait_test.go +++ /dev/null @@ -1,501 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package wait - -import ( - "errors" - "fmt" - "sync" - "sync/atomic" - "testing" - "time" - - "k8s.io/kubernetes/pkg/util/runtime" -) - -func TestUntil(t *testing.T) { - ch := make(chan struct{}) - close(ch) - Until(func() { - t.Fatal("should not have been invoked") - }, 0, ch) - - ch = make(chan struct{}) - called := make(chan struct{}) - go func() { - Until(func() { - called <- struct{}{} - }, 0, ch) - close(called) - }() - <-called - close(ch) - <-called -} - -func TestNonSlidingUntil(t *testing.T) { - ch := make(chan struct{}) - close(ch) - NonSlidingUntil(func() { - t.Fatal("should not have been invoked") - }, 0, ch) - - ch = make(chan struct{}) - called := make(chan struct{}) - go func() { - NonSlidingUntil(func() { - called <- struct{}{} - }, 0, ch) - close(called) - }() - <-called - close(ch) - <-called -} - -func TestUntilReturnsImmediately(t *testing.T) { - now := time.Now() - ch := make(chan struct{}) - Until(func() { - close(ch) - }, 30*time.Second, ch) - if now.Add(25 * time.Second).Before(time.Now()) { - t.Errorf("Until did not return immediately when the stop chan was closed inside the func") - } -} - -func TestJitterUntil(t *testing.T) { - ch := make(chan struct{}) - // if a channel is closed JitterUntil never calls function f - // and returns immediately - close(ch) - JitterUntil(func() { - t.Fatal("should not have been invoked") - }, 0, 1.0, true, ch) - - ch = make(chan struct{}) - called := make(chan struct{}) - go func() { - JitterUntil(func() { - called <- struct{}{} - }, 0, 1.0, true, ch) - close(called) - }() - <-called - close(ch) - <-called -} - -func TestJitterUntilReturnsImmediately(t *testing.T) { - now := time.Now() - ch := make(chan struct{}) - JitterUntil(func() { - close(ch) - }, 30*time.Second, 1.0, true, ch) - if now.Add(25 * time.Second).Before(time.Now()) { - t.Errorf("JitterUntil did not return immediately when the stop chan was closed inside the func") - } -} - -func TestJitterUntilRecoversPanic(t *testing.T) { - // Save and restore crash handlers - originalReallyCrash := runtime.ReallyCrash - originalHandlers := runtime.PanicHandlers - defer func() { - runtime.ReallyCrash = originalReallyCrash - runtime.PanicHandlers = originalHandlers - }() - - called := 0 - handled := 0 - - // Hook up a custom crash handler to ensure it is called when a jitter function panics - runtime.ReallyCrash = false - runtime.PanicHandlers = []func(interface{}){ - func(p interface{}) { - handled++ - }, - } - - ch := make(chan struct{}) - JitterUntil(func() { - called++ - if called > 2 { - close(ch) - return - } - panic("TestJitterUntilRecoversPanic") - }, time.Millisecond, 1.0, true, ch) - - if called != 3 { - t.Errorf("Expected panic recovers") - } -} - -func TestJitterUntilNegativeFactor(t *testing.T) { - now := time.Now() - ch := make(chan struct{}) - called := make(chan struct{}) - received := make(chan struct{}) - go func() { - JitterUntil(func() { - called <- struct{}{} - <-received - }, time.Second, -30.0, true, ch) - }() - // first loop - <-called - received <- struct{}{} - // second loop - <-called - close(ch) - received <- struct{}{} - - // it should take at most 2 seconds + some overhead, not 3 - if now.Add(3 * time.Second).Before(time.Now()) { - t.Errorf("JitterUntil did not returned after predefined period with negative jitter factor when the stop chan was closed inside the func") - } - -} - -func TestExponentialBackoff(t *testing.T) { - opts := Backoff{Factor: 1.0, Steps: 3} - - // waits up to steps - i := 0 - err := ExponentialBackoff(opts, func() (bool, error) { - i++ - return false, nil - }) - if err != ErrWaitTimeout || i != opts.Steps { - t.Errorf("unexpected error: %v", err) - } - - // returns immediately - i = 0 - err = ExponentialBackoff(opts, func() (bool, error) { - i++ - return true, nil - }) - if err != nil || i != 1 { - t.Errorf("unexpected error: %v", err) - } - - // returns immediately on error - testErr := fmt.Errorf("some other error") - err = ExponentialBackoff(opts, func() (bool, error) { - return false, testErr - }) - if err != testErr { - t.Errorf("unexpected error: %v", err) - } - - // invoked multiple times - i = 1 - err = ExponentialBackoff(opts, func() (bool, error) { - if i < opts.Steps { - i++ - return false, nil - } - return true, nil - }) - if err != nil || i != opts.Steps { - t.Errorf("unexpected error: %v", err) - } -} - -func TestPoller(t *testing.T) { - done := make(chan struct{}) - defer close(done) - w := poller(time.Millisecond, 2*time.Millisecond) - ch := w(done) - count := 0 -DRAIN: - for { - select { - case _, open := <-ch: - if !open { - break DRAIN - } - count++ - case <-time.After(ForeverTestTimeout): - t.Errorf("unexpected timeout after poll") - } - } - if count > 3 { - t.Errorf("expected up to three values, got %d", count) - } -} - -type fakePoller struct { - max int - used int32 // accessed with atomics - wg sync.WaitGroup -} - -func fakeTicker(max int, used *int32, doneFunc func()) WaitFunc { - return func(done <-chan struct{}) <-chan struct{} { - ch := make(chan struct{}) - go func() { - defer doneFunc() - defer close(ch) - for i := 0; i < max; i++ { - select { - case ch <- struct{}{}: - case <-done: - return - } - if used != nil { - atomic.AddInt32(used, 1) - } - } - }() - return ch - } -} - -func (fp *fakePoller) GetWaitFunc() WaitFunc { - fp.wg.Add(1) - return fakeTicker(fp.max, &fp.used, fp.wg.Done) -} - -func TestPoll(t *testing.T) { - invocations := 0 - f := ConditionFunc(func() (bool, error) { - invocations++ - return true, nil - }) - fp := fakePoller{max: 1} - if err := pollInternal(fp.GetWaitFunc(), f); err != nil { - t.Fatalf("unexpected error %v", err) - } - fp.wg.Wait() - if invocations != 1 { - t.Errorf("Expected exactly one invocation, got %d", invocations) - } - used := atomic.LoadInt32(&fp.used) - if used != 1 { - t.Errorf("Expected exactly one tick, got %d", used) - } -} - -func TestPollError(t *testing.T) { - expectedError := errors.New("Expected error") - f := ConditionFunc(func() (bool, error) { - return false, expectedError - }) - fp := fakePoller{max: 1} - if err := pollInternal(fp.GetWaitFunc(), f); err == nil || err != expectedError { - t.Fatalf("Expected error %v, got none %v", expectedError, err) - } - fp.wg.Wait() - used := atomic.LoadInt32(&fp.used) - if used != 1 { - t.Errorf("Expected exactly one tick, got %d", used) - } -} - -func TestPollImmediate(t *testing.T) { - invocations := 0 - f := ConditionFunc(func() (bool, error) { - invocations++ - return true, nil - }) - fp := fakePoller{max: 0} - if err := pollImmediateInternal(fp.GetWaitFunc(), f); err != nil { - t.Fatalf("unexpected error %v", err) - } - // We don't need to wait for fp.wg, as pollImmediate shouldn't call WaitFunc at all. - if invocations != 1 { - t.Errorf("Expected exactly one invocation, got %d", invocations) - } - used := atomic.LoadInt32(&fp.used) - if used != 0 { - t.Errorf("Expected exactly zero ticks, got %d", used) - } -} - -func TestPollImmediateError(t *testing.T) { - expectedError := errors.New("Expected error") - f := ConditionFunc(func() (bool, error) { - return false, expectedError - }) - fp := fakePoller{max: 0} - if err := pollImmediateInternal(fp.GetWaitFunc(), f); err == nil || err != expectedError { - t.Fatalf("Expected error %v, got none %v", expectedError, err) - } - // We don't need to wait for fp.wg, as pollImmediate shouldn't call WaitFunc at all. - used := atomic.LoadInt32(&fp.used) - if used != 0 { - t.Errorf("Expected exactly zero ticks, got %d", used) - } -} - -func TestPollForever(t *testing.T) { - ch := make(chan struct{}) - done := make(chan struct{}, 1) - complete := make(chan struct{}) - go func() { - f := ConditionFunc(func() (bool, error) { - ch <- struct{}{} - select { - case <-done: - return true, nil - default: - } - return false, nil - }) - - if err := PollInfinite(time.Microsecond, f); err != nil { - t.Fatalf("unexpected error %v", err) - } - - close(ch) - complete <- struct{}{} - }() - - // ensure the condition is opened - <-ch - - // ensure channel sends events - for i := 0; i < 10; i++ { - select { - case _, open := <-ch: - if !open { - t.Fatalf("did not expect channel to be closed") - } - case <-time.After(ForeverTestTimeout): - t.Fatalf("channel did not return at least once within the poll interval") - } - } - - // at most one poll notification should be sent once we return from the condition - done <- struct{}{} - go func() { - for i := 0; i < 2; i++ { - _, open := <-ch - if !open { - return - } - } - t.Fatalf("expected closed channel after two iterations") - }() - <-complete -} - -func TestWaitFor(t *testing.T) { - var invocations int - testCases := map[string]struct { - F ConditionFunc - Ticks int - Invoked int - Err bool - }{ - "invoked once": { - ConditionFunc(func() (bool, error) { - invocations++ - return true, nil - }), - 2, - 1, - false, - }, - "invoked and returns a timeout": { - ConditionFunc(func() (bool, error) { - invocations++ - return false, nil - }), - 2, - 3, // the contract of WaitFor() says the func is called once more at the end of the wait - true, - }, - "returns immediately on error": { - ConditionFunc(func() (bool, error) { - invocations++ - return false, errors.New("test") - }), - 2, - 1, - true, - }, - } - for k, c := range testCases { - invocations = 0 - ticker := fakeTicker(c.Ticks, nil, func() {}) - err := func() error { - done := make(chan struct{}) - defer close(done) - return WaitFor(ticker, c.F, done) - }() - switch { - case c.Err && err == nil: - t.Errorf("%s: Expected error, got nil", k) - continue - case !c.Err && err != nil: - t.Errorf("%s: Expected no error, got: %#v", k, err) - continue - } - if invocations != c.Invoked { - t.Errorf("%s: Expected %d invocations, got %d", k, c.Invoked, invocations) - } - } -} - -func TestWaitForWithDelay(t *testing.T) { - done := make(chan struct{}) - defer close(done) - WaitFor(poller(time.Millisecond, ForeverTestTimeout), func() (bool, error) { - time.Sleep(10 * time.Millisecond) - return true, nil - }, done) - // If polling goroutine doesn't see the done signal it will leak timers. - select { - case done <- struct{}{}: - case <-time.After(ForeverTestTimeout): - t.Errorf("expected an ack of the done signal.") - } -} - -func TestPollUntil(t *testing.T) { - stopCh := make(chan struct{}) - called := make(chan bool) - pollDone := make(chan struct{}) - - go func() { - PollUntil(time.Microsecond, ConditionFunc(func() (bool, error) { - called <- true - return false, nil - }), stopCh) - - close(pollDone) - }() - - // make sure we're called once - <-called - // this should trigger a "done" - close(stopCh) - - go func() { - // release the condition func if needed - for { - <-called - } - }() - - // make sure we finished the poll - <-pollDone -} diff --git a/vendor/k8s.io/kubernetes/pkg/util/workqueue/BUILD b/vendor/k8s.io/kubernetes/pkg/util/workqueue/BUILD index 79fecc40..74cc0efb 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/workqueue/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/util/workqueue/BUILD @@ -22,9 +22,9 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/util/clock:go_default_library", "//vendor:github.com/juju/ratelimit", "//vendor:k8s.io/apimachinery/pkg/util/runtime", + "//vendor:k8s.io/client-go/util/clock", ], ) @@ -40,8 +40,8 @@ go_test( tags = ["automanaged"], deps = [ "//pkg/api/v1:go_default_library", - "//pkg/util/clock:go_default_library", "//vendor:k8s.io/apimachinery/pkg/util/wait", + "//vendor:k8s.io/client-go/util/clock", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/util/workqueue/delaying_queue.go b/vendor/k8s.io/kubernetes/pkg/util/workqueue/delaying_queue.go index 7b17da09..593ad9ad 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/workqueue/delaying_queue.go +++ b/vendor/k8s.io/kubernetes/pkg/util/workqueue/delaying_queue.go @@ -21,7 +21,7 @@ import ( "time" utilruntime "k8s.io/apimachinery/pkg/util/runtime" - "k8s.io/kubernetes/pkg/util/clock" + "k8s.io/client-go/util/clock" ) // DelayingInterface is an Interface that can Add an item at a later time. This makes it easier to diff --git a/vendor/k8s.io/kubernetes/pkg/util/workqueue/delaying_queue_test.go b/vendor/k8s.io/kubernetes/pkg/util/workqueue/delaying_queue_test.go index dc584610..1b766106 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/workqueue/delaying_queue_test.go +++ b/vendor/k8s.io/kubernetes/pkg/util/workqueue/delaying_queue_test.go @@ -23,7 +23,7 @@ import ( "time" "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/kubernetes/pkg/util/clock" + "k8s.io/client-go/util/clock" ) func TestSimpleQueue(t *testing.T) { diff --git a/vendor/k8s.io/kubernetes/pkg/util/workqueue/rate_limitting_queue_test.go b/vendor/k8s.io/kubernetes/pkg/util/workqueue/rate_limitting_queue_test.go index c02b3883..47100689 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/workqueue/rate_limitting_queue_test.go +++ b/vendor/k8s.io/kubernetes/pkg/util/workqueue/rate_limitting_queue_test.go @@ -20,7 +20,7 @@ import ( "testing" "time" - "k8s.io/kubernetes/pkg/util/clock" + "k8s.io/client-go/util/clock" ) func TestRateLimitingQueue(t *testing.T) { diff --git a/vendor/k8s.io/kubernetes/pkg/util/yaml/.readonly b/vendor/k8s.io/kubernetes/pkg/util/yaml/.readonly deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/k8s.io/kubernetes/pkg/util/yaml/BUILD b/vendor/k8s.io/kubernetes/pkg/util/yaml/BUILD index 25ec9bcb..deefdcef 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/yaml/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/util/yaml/BUILD @@ -5,23 +5,11 @@ licenses(["notice"]) load( "@io_bazel_rules_go//go:def.bzl", "go_library", - "go_test", ) go_library( name = "go_default_library", - srcs = ["decoder.go"], - tags = ["automanaged"], - deps = [ - "//vendor:github.com/ghodss/yaml", - "//vendor:github.com/golang/glog", - ], -) - -go_test( - name = "go_default_test", - srcs = ["decoder_test.go"], - library = ":go_default_library", + srcs = ["doc.go"], tags = ["automanaged"], ) diff --git a/vendor/k8s.io/kubernetes/pkg/util/yaml/decoder.go b/vendor/k8s.io/kubernetes/pkg/util/yaml/decoder.go deleted file mode 100644 index 27b7500e..00000000 --- a/vendor/k8s.io/kubernetes/pkg/util/yaml/decoder.go +++ /dev/null @@ -1,327 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package yaml - -import ( - "bufio" - "bytes" - "encoding/json" - "fmt" - "io" - "io/ioutil" - "strings" - "unicode" - - "github.com/ghodss/yaml" - "github.com/golang/glog" -) - -// ToJSON converts a single YAML document into a JSON document -// or returns an error. If the document appears to be JSON the -// YAML decoding path is not used (so that error messages are -// JSON specific). -func ToJSON(data []byte) ([]byte, error) { - if hasJSONPrefix(data) { - return data, nil - } - return yaml.YAMLToJSON(data) -} - -// YAMLToJSONDecoder decodes YAML documents from an io.Reader by -// separating individual documents. It first converts the YAML -// body to JSON, then unmarshals the JSON. -type YAMLToJSONDecoder struct { - reader Reader -} - -// NewYAMLToJSONDecoder decodes YAML documents from the provided -// stream in chunks by converting each document (as defined by -// the YAML spec) into its own chunk, converting it to JSON via -// yaml.YAMLToJSON, and then passing it to json.Decoder. -func NewYAMLToJSONDecoder(r io.Reader) *YAMLToJSONDecoder { - reader := bufio.NewReader(r) - return &YAMLToJSONDecoder{ - reader: NewYAMLReader(reader), - } -} - -// Decode reads a YAML document as JSON from the stream or returns -// an error. The decoding rules match json.Unmarshal, not -// yaml.Unmarshal. -func (d *YAMLToJSONDecoder) Decode(into interface{}) error { - bytes, err := d.reader.Read() - if err != nil && err != io.EOF { - return err - } - - if len(bytes) != 0 { - data, err := yaml.YAMLToJSON(bytes) - if err != nil { - return err - } - return json.Unmarshal(data, into) - } - return err -} - -// YAMLDecoder reads chunks of objects and returns ErrShortBuffer if -// the data is not sufficient. -type YAMLDecoder struct { - r io.ReadCloser - scanner *bufio.Scanner - remaining []byte -} - -// NewDocumentDecoder decodes YAML documents from the provided -// stream in chunks by converting each document (as defined by -// the YAML spec) into its own chunk. io.ErrShortBuffer will be -// returned if the entire buffer could not be read to assist -// the caller in framing the chunk. -func NewDocumentDecoder(r io.ReadCloser) io.ReadCloser { - scanner := bufio.NewScanner(r) - scanner.Split(splitYAMLDocument) - return &YAMLDecoder{ - r: r, - scanner: scanner, - } -} - -// Read reads the previous slice into the buffer, or attempts to read -// the next chunk. -// TODO: switch to readline approach. -func (d *YAMLDecoder) Read(data []byte) (n int, err error) { - left := len(d.remaining) - if left == 0 { - // return the next chunk from the stream - if !d.scanner.Scan() { - err := d.scanner.Err() - if err == nil { - err = io.EOF - } - return 0, err - } - out := d.scanner.Bytes() - d.remaining = out - left = len(out) - } - - // fits within data - if left <= len(data) { - copy(data, d.remaining) - d.remaining = nil - return len(d.remaining), nil - } - - // caller will need to reread - copy(data, d.remaining[:left]) - d.remaining = d.remaining[left:] - return len(data), io.ErrShortBuffer -} - -func (d *YAMLDecoder) Close() error { - return d.r.Close() -} - -const yamlSeparator = "\n---" -const separator = "---" - -// splitYAMLDocument is a bufio.SplitFunc for splitting YAML streams into individual documents. -func splitYAMLDocument(data []byte, atEOF bool) (advance int, token []byte, err error) { - if atEOF && len(data) == 0 { - return 0, nil, nil - } - sep := len([]byte(yamlSeparator)) - if i := bytes.Index(data, []byte(yamlSeparator)); i >= 0 { - // We have a potential document terminator - i += sep - after := data[i:] - if len(after) == 0 { - // we can't read any more characters - if atEOF { - return len(data), data[:len(data)-sep], nil - } - return 0, nil, nil - } - if j := bytes.IndexByte(after, '\n'); j >= 0 { - return i + j + 1, data[0 : i-sep], nil - } - return 0, nil, nil - } - // If we're at EOF, we have a final, non-terminated line. Return it. - if atEOF { - return len(data), data, nil - } - // Request more data. - return 0, nil, nil -} - -// decoder is a convenience interface for Decode. -type decoder interface { - Decode(into interface{}) error -} - -// YAMLOrJSONDecoder attempts to decode a stream of JSON documents or -// YAML documents by sniffing for a leading { character. -type YAMLOrJSONDecoder struct { - r io.Reader - bufferSize int - - decoder decoder - rawData []byte -} - -// NewYAMLOrJSONDecoder returns a decoder that will process YAML documents -// or JSON documents from the given reader as a stream. bufferSize determines -// how far into the stream the decoder will look to figure out whether this -// is a JSON stream (has whitespace followed by an open brace). -func NewYAMLOrJSONDecoder(r io.Reader, bufferSize int) *YAMLOrJSONDecoder { - return &YAMLOrJSONDecoder{ - r: r, - bufferSize: bufferSize, - } -} - -// Decode unmarshals the next object from the underlying stream into the -// provide object, or returns an error. -func (d *YAMLOrJSONDecoder) Decode(into interface{}) error { - if d.decoder == nil { - buffer, origData, isJSON := GuessJSONStream(d.r, d.bufferSize) - if isJSON { - glog.V(4).Infof("decoding stream as JSON") - d.decoder = json.NewDecoder(buffer) - d.rawData = origData - } else { - glog.V(4).Infof("decoding stream as YAML") - d.decoder = NewYAMLToJSONDecoder(buffer) - } - } - err := d.decoder.Decode(into) - if jsonDecoder, ok := d.decoder.(*json.Decoder); ok { - if syntax, ok := err.(*json.SyntaxError); ok { - data, readErr := ioutil.ReadAll(jsonDecoder.Buffered()) - if readErr != nil { - glog.V(4).Infof("reading stream failed: %v", readErr) - } - js := string(data) - - // if contents from io.Reader are not complete, - // use the original raw data to prevent panic - if int64(len(js)) <= syntax.Offset { - js = string(d.rawData) - } - - start := strings.LastIndex(js[:syntax.Offset], "\n") + 1 - line := strings.Count(js[:start], "\n") - return fmt.Errorf("json: line %d: %s", line, syntax.Error()) - } - } - return err -} - -type Reader interface { - Read() ([]byte, error) -} - -type YAMLReader struct { - reader Reader -} - -func NewYAMLReader(r *bufio.Reader) *YAMLReader { - return &YAMLReader{ - reader: &LineReader{reader: r}, - } -} - -// Read returns a full YAML document. -func (r *YAMLReader) Read() ([]byte, error) { - var buffer bytes.Buffer - for { - line, err := r.reader.Read() - if err != nil && err != io.EOF { - return nil, err - } - - sep := len([]byte(separator)) - if i := bytes.Index(line, []byte(separator)); i == 0 { - // We have a potential document terminator - i += sep - after := line[i:] - if len(strings.TrimRightFunc(string(after), unicode.IsSpace)) == 0 { - if buffer.Len() != 0 { - return buffer.Bytes(), nil - } - if err == io.EOF { - return nil, err - } - } - } - if err == io.EOF { - if buffer.Len() != 0 { - // If we're at EOF, we have a final, non-terminated line. Return it. - return buffer.Bytes(), nil - } - return nil, err - } - buffer.Write(line) - } -} - -type LineReader struct { - reader *bufio.Reader -} - -// Read returns a single line (with '\n' ended) from the underlying reader. -// An error is returned iff there is an error with the underlying reader. -func (r *LineReader) Read() ([]byte, error) { - var ( - isPrefix bool = true - err error = nil - line []byte - buffer bytes.Buffer - ) - - for isPrefix && err == nil { - line, isPrefix, err = r.reader.ReadLine() - buffer.Write(line) - } - buffer.WriteByte('\n') - return buffer.Bytes(), err -} - -// GuessJSONStream scans the provided reader up to size, looking -// for an open brace indicating this is JSON. It will return the -// bufio.Reader it creates for the consumer. -func GuessJSONStream(r io.Reader, size int) (io.Reader, []byte, bool) { - buffer := bufio.NewReaderSize(r, size) - b, _ := buffer.Peek(size) - return buffer, b, hasJSONPrefix(b) -} - -var jsonPrefix = []byte("{") - -// hasJSONPrefix returns true if the provided buffer appears to start with -// a JSON open brace. -func hasJSONPrefix(buf []byte) bool { - return hasPrefix(buf, jsonPrefix) -} - -// Return true if the first non-whitespace bytes in buf is -// prefix. -func hasPrefix(buf []byte, prefix []byte) bool { - trim := bytes.TrimLeftFunc(buf, unicode.IsSpace) - return bytes.HasPrefix(trim, prefix) -} diff --git a/vendor/k8s.io/kubernetes/pkg/util/yaml/decoder_test.go b/vendor/k8s.io/kubernetes/pkg/util/yaml/decoder_test.go deleted file mode 100644 index 5712b307..00000000 --- a/vendor/k8s.io/kubernetes/pkg/util/yaml/decoder_test.go +++ /dev/null @@ -1,316 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package yaml - -import ( - "bufio" - "bytes" - "encoding/json" - "fmt" - "io" - "math/rand" - "reflect" - "strings" - "testing" -) - -func TestSplitYAMLDocument(t *testing.T) { - testCases := []struct { - input string - atEOF bool - expect string - adv int - }{ - {"foo", true, "foo", 3}, - {"fo", false, "", 0}, - - {"---", true, "---", 3}, - {"---\n", true, "---\n", 4}, - {"---\n", false, "", 0}, - - {"\n---\n", false, "", 5}, - {"\n---\n", true, "", 5}, - - {"abc\n---\ndef", true, "abc", 8}, - {"def", true, "def", 3}, - {"", true, "", 0}, - } - for i, testCase := range testCases { - adv, token, err := splitYAMLDocument([]byte(testCase.input), testCase.atEOF) - if err != nil { - t.Errorf("%d: unexpected error: %v", i, err) - continue - } - if adv != testCase.adv { - t.Errorf("%d: advance did not match: %d %d", i, testCase.adv, adv) - } - if testCase.expect != string(token) { - t.Errorf("%d: token did not match: %q %q", i, testCase.expect, string(token)) - } - } -} - -func TestGuessJSON(t *testing.T) { - if r, _, isJSON := GuessJSONStream(bytes.NewReader([]byte(" \n{}")), 100); !isJSON { - t.Fatalf("expected stream to be JSON") - } else { - b := make([]byte, 30) - n, err := r.Read(b) - if err != nil || n != 4 { - t.Fatalf("unexpected body: %d / %v", n, err) - } - if string(b[:n]) != " \n{}" { - t.Fatalf("unexpected body: %q", string(b[:n])) - } - } -} - -func TestScanYAML(t *testing.T) { - s := bufio.NewScanner(bytes.NewReader([]byte(`--- -stuff: 1 - ---- - `))) - s.Split(splitYAMLDocument) - if !s.Scan() { - t.Fatalf("should have been able to scan") - } - t.Logf("scan: %s", s.Text()) - if !s.Scan() { - t.Fatalf("should have been able to scan") - } - t.Logf("scan: %s", s.Text()) - if s.Scan() { - t.Fatalf("scan should have been done") - } - if s.Err() != nil { - t.Fatalf("err should have been nil: %v", s.Err()) - } -} - -func TestDecodeYAML(t *testing.T) { - s := NewYAMLToJSONDecoder(bytes.NewReader([]byte(`--- -stuff: 1 - ---- - `))) - obj := generic{} - if err := s.Decode(&obj); err != nil { - t.Fatalf("unexpected error: %v", err) - } - if fmt.Sprintf("%#v", obj) != `yaml.generic{"stuff":1}` { - t.Errorf("unexpected object: %#v", obj) - } - obj = generic{} - if err := s.Decode(&obj); err != nil { - t.Fatalf("unexpected error: %v", err) - } - if len(obj) != 0 { - t.Fatalf("unexpected object: %#v", obj) - } - obj = generic{} - if err := s.Decode(&obj); err != io.EOF { - t.Fatalf("unexpected error: %v", err) - } -} - -func TestDecodeBrokenYAML(t *testing.T) { - s := NewYAMLOrJSONDecoder(bytes.NewReader([]byte(`--- -stuff: 1 - test-foo: 1 - ---- - `)), 100) - obj := generic{} - err := s.Decode(&obj) - if err == nil { - t.Fatal("expected error with yaml: violate, got no error") - } - fmt.Printf("err: %s\n", err.Error()) - if !strings.HasPrefix(err.Error(), "yaml: line 2:") { - t.Fatalf("expected %q to have 'yaml: line 2:' found a tab character", err.Error()) - } -} - -func TestDecodeBrokenJSON(t *testing.T) { - s := NewYAMLOrJSONDecoder(bytes.NewReader([]byte(`{ - "foo": { - "stuff": 1 - "otherStuff": 2 - } -} - `)), 100) - obj := generic{} - err := s.Decode(&obj) - if err == nil { - t.Fatal("expected error with json: prefix, got no error") - } - if !strings.HasPrefix(err.Error(), "json: line 3:") { - t.Fatalf("expected %q to have 'json: line 3:' prefix", err.Error()) - } -} - -type generic map[string]interface{} - -func TestYAMLOrJSONDecoder(t *testing.T) { - testCases := []struct { - input string - buffer int - isJSON bool - err bool - out []generic - }{ - {` {"1":2}{"3":4}`, 2, true, false, []generic{ - {"1": 2}, - {"3": 4}, - }}, - {" \n{}", 3, true, false, []generic{ - {}, - }}, - {" \na: b", 2, false, false, []generic{ - {"a": "b"}, - }}, - {" \n{\"a\": \"b\"}", 2, false, true, []generic{ - {"a": "b"}, - }}, - {" \n{\"a\": \"b\"}", 3, true, false, []generic{ - {"a": "b"}, - }}, - {` {"a":"b"}`, 100, true, false, []generic{ - {"a": "b"}, - }}, - {"", 1, false, false, []generic{}}, - {"foo: bar\n---\nbaz: biz", 100, false, false, []generic{ - {"foo": "bar"}, - {"baz": "biz"}, - }}, - {"foo: bar\n---\n", 100, false, false, []generic{ - {"foo": "bar"}, - }}, - {"foo: bar\n---", 100, false, false, []generic{ - {"foo": "bar"}, - }}, - {"foo: bar\n--", 100, false, true, []generic{ - {"foo": "bar"}, - }}, - {"foo: bar\n-", 100, false, true, []generic{ - {"foo": "bar"}, - }}, - {"foo: bar\n", 100, false, false, []generic{ - {"foo": "bar"}, - }}, - } - for i, testCase := range testCases { - decoder := NewYAMLOrJSONDecoder(bytes.NewReader([]byte(testCase.input)), testCase.buffer) - objs := []generic{} - - var err error - for { - out := make(generic) - err = decoder.Decode(&out) - if err != nil { - break - } - objs = append(objs, out) - } - if err != io.EOF { - switch { - case testCase.err && err == nil: - t.Errorf("%d: unexpected non-error", i) - continue - case !testCase.err && err != nil: - t.Errorf("%d: unexpected error: %v", i, err) - continue - case err != nil: - continue - } - } - switch decoder.decoder.(type) { - case *YAMLToJSONDecoder: - if testCase.isJSON { - t.Errorf("%d: expected JSON decoder, got YAML", i) - } - case *json.Decoder: - if !testCase.isJSON { - t.Errorf("%d: expected YAML decoder, got JSON", i) - } - } - if fmt.Sprintf("%#v", testCase.out) != fmt.Sprintf("%#v", objs) { - t.Errorf("%d: objects were not equal: \n%#v\n%#v", i, testCase.out, objs) - } - } -} - -func TestReadSingleLongLine(t *testing.T) { - testReadLines(t, []int{128 * 1024}) -} - -func TestReadRandomLineLengths(t *testing.T) { - minLength := 100 - maxLength := 96 * 1024 - maxLines := 100 - - lineLengths := make([]int, maxLines) - for i := 0; i < maxLines; i++ { - lineLengths[i] = rand.Intn(maxLength-minLength) + minLength - } - - testReadLines(t, lineLengths) -} - -func testReadLines(t *testing.T, lineLengths []int) { - var ( - lines [][]byte - inputStream []byte - ) - for _, lineLength := range lineLengths { - inputLine := make([]byte, lineLength+1) - for i := 0; i < lineLength; i++ { - char := rand.Intn('z'-'A') + 'A' - inputLine[i] = byte(char) - } - inputLine[len(inputLine)-1] = '\n' - lines = append(lines, inputLine) - } - for _, line := range lines { - inputStream = append(inputStream, line...) - } - - // init Reader - reader := bufio.NewReader(bytes.NewReader(inputStream)) - lineReader := &LineReader{reader: reader} - - // read lines - var readLines [][]byte - for range lines { - bytes, err := lineReader.Read() - if err != nil && err != io.EOF { - t.Fatalf("failed to read lines: %v", err) - } - readLines = append(readLines, bytes) - } - - // validate - for i := range lines { - if len(lines[i]) != len(readLines[i]) { - t.Fatalf("expected line length: %d, but got %d", len(lines[i]), len(readLines[i])) - } - if !reflect.DeepEqual(lines[i], readLines[i]) { - t.Fatalf("expected line: %v, but got %v", lines[i], readLines[i]) - } - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/util/yaml/doc.go b/vendor/k8s.io/kubernetes/pkg/util/yaml/doc.go new file mode 100644 index 00000000..f046b9b4 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/util/yaml/doc.go @@ -0,0 +1,21 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package yaml only exists until heapster rebases +// TODO genericapiserver remove this empty package. Godep fails without this because heapster relies +// on this package. This will allow us to start splitting packages, but will force +// heapster to update on their next kube rebase. +package yaml diff --git a/vendor/k8s.io/kubernetes/pkg/version/BUILD b/vendor/k8s.io/kubernetes/pkg/version/BUILD index d9de60d9..00216c5e 100644 --- a/vendor/k8s.io/kubernetes/pkg/version/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/version/BUILD @@ -15,6 +15,7 @@ go_library( "version.go", ], tags = ["automanaged"], + deps = ["//vendor:k8s.io/apimachinery/pkg/version"], ) filegroup( diff --git a/vendor/k8s.io/kubernetes/pkg/version/verflag/verflag.go b/vendor/k8s.io/kubernetes/pkg/version/verflag/verflag.go index d1f08da0..5809c3aa 100644 --- a/vendor/k8s.io/kubernetes/pkg/version/verflag/verflag.go +++ b/vendor/k8s.io/kubernetes/pkg/version/verflag/verflag.go @@ -24,6 +24,7 @@ import ( "strconv" flag "github.com/spf13/pflag" + "k8s.io/kubernetes/pkg/version" ) diff --git a/vendor/k8s.io/kubernetes/pkg/version/version.go b/vendor/k8s.io/kubernetes/pkg/version/version.go index 0da3aadd..8c8350d1 100644 --- a/vendor/k8s.io/kubernetes/pkg/version/version.go +++ b/vendor/k8s.io/kubernetes/pkg/version/version.go @@ -19,29 +19,16 @@ package version import ( "fmt" "runtime" -) -// Info contains versioning information. -// TODO: Add []string of api versions supported? It's still unclear -// how we'll want to distribute that information. -type Info struct { - Major string `json:"major"` - Minor string `json:"minor"` - GitVersion string `json:"gitVersion"` - GitCommit string `json:"gitCommit"` - GitTreeState string `json:"gitTreeState"` - BuildDate string `json:"buildDate"` - GoVersion string `json:"goVersion"` - Compiler string `json:"compiler"` - Platform string `json:"platform"` -} + apimachineryversion "k8s.io/apimachinery/pkg/version" +) // Get returns the overall codebase version. It's for detecting // what code a binary was built from. -func Get() Info { +func Get() apimachineryversion.Info { // These variables typically come from -ldflags settings and in // their absence fallback to the settings in pkg/version/base.go - return Info{ + return apimachineryversion.Info{ Major: gitMajor, Minor: gitMinor, GitVersion: gitVersion, @@ -53,8 +40,3 @@ func Get() Info { Platform: fmt.Sprintf("%s/%s", runtime.GOOS, runtime.GOARCH), } } - -// String returns info as a human-friendly version string. -func (info Info) String() string { - return info.GitVersion -} diff --git a/vendor/k8s.io/kubernetes/pkg/volume/BUILD b/vendor/k8s.io/kubernetes/pkg/volume/BUILD index f73beda2..874a004a 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/volume/BUILD @@ -28,7 +28,6 @@ go_library( "//pkg/api/v1:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", "//pkg/cloudprovider:go_default_library", - "//pkg/fields:go_default_library", "//pkg/util/chmod:go_default_library", "//pkg/util/chown:go_default_library", "//pkg/util/io:go_default_library", @@ -37,6 +36,7 @@ go_library( "//vendor:github.com/golang/glog", "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/errors", "//vendor:k8s.io/apimachinery/pkg/util/sets", @@ -59,10 +59,11 @@ go_test( "//pkg/api:go_default_library", "//pkg/api/resource:go_default_library", "//pkg/api/v1:go_default_library", - "//pkg/util/testing:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/client-go/util/testing", ], ) @@ -71,9 +72,9 @@ go_test( srcs = ["metrics_du_test.go"], tags = ["automanaged"], deps = [ - "//pkg/util/testing:go_default_library", "//pkg/volume:go_default_library", "//pkg/volume/testing:go_default_library", + "//vendor:k8s.io/client-go/util/testing", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/volume/OWNERS b/vendor/k8s.io/kubernetes/pkg/volume/OWNERS index 01da542a..d9e47cfa 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/volume/OWNERS @@ -1,5 +1,20 @@ -assignees: - - saad-ali - - thockin - - pmorie - - jsafrane +approvers: +- saad-ali +- thockin +- jsafrane +- matchstick +reviewers: +- thockin +- smarterclayton +- deads2k +- brendandburns +- derekwaynecarr +- bprashanth +- pmorie +- saad-ali +- justinsb +- jsafrane +- rootfs +- jingxu97 +- rkouj +- msau42 diff --git a/vendor/k8s.io/kubernetes/pkg/volume/aws_ebs/BUILD b/vendor/k8s.io/kubernetes/pkg/volume/aws_ebs/BUILD index f93138b9..cbcb6086 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/aws_ebs/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/volume/aws_ebs/BUILD @@ -28,6 +28,7 @@ go_library( "//pkg/volume:go_default_library", "//pkg/volume/util:go_default_library", "//vendor:github.com/golang/glog", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", ], ) @@ -45,11 +46,12 @@ go_test( "//pkg/client/clientset_generated/clientset/fake:go_default_library", "//pkg/cloudprovider/providers/aws:go_default_library", "//pkg/util/mount:go_default_library", - "//pkg/util/testing:go_default_library", "//pkg/volume:go_default_library", "//pkg/volume/testing:go_default_library", "//vendor:github.com/golang/glog", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", + "//vendor:k8s.io/client-go/util/testing", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/volume/aws_ebs/OWNERS b/vendor/k8s.io/kubernetes/pkg/volume/aws_ebs/OWNERS index 4e05cdd3..e2eedd52 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/aws_ebs/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/volume/aws_ebs/OWNERS @@ -1,3 +1,17 @@ -maintainers: +approvers: - jsafrane - justinsb +- chrislovecnm +- jingxu97 +reviewers: +- thockin +- smarterclayton +- deads2k +- pmorie +- saad-ali +- justinsb +- jsafrane +- rootfs +- jingxu97 +- chakri-nelluri +- screeley44 diff --git a/vendor/k8s.io/kubernetes/pkg/volume/aws_ebs/aws_ebs.go b/vendor/k8s.io/kubernetes/pkg/volume/aws_ebs/aws_ebs.go index 8a2a44d4..20a7f4ab 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/aws_ebs/aws_ebs.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/aws_ebs/aws_ebs.go @@ -25,6 +25,7 @@ import ( "strings" "github.com/golang/glog" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" @@ -427,7 +428,7 @@ func (c *awsElasticBlockStoreProvisioner) Provision() (*v1.PersistentVolume, err } pv := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: c.options.PVName, Labels: map[string]string{}, Annotations: map[string]string{ diff --git a/vendor/k8s.io/kubernetes/pkg/volume/aws_ebs/aws_ebs_test.go b/vendor/k8s.io/kubernetes/pkg/volume/aws_ebs/aws_ebs_test.go index 5c966533..1f461afd 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/aws_ebs/aws_ebs_test.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/aws_ebs/aws_ebs_test.go @@ -22,12 +22,13 @@ import ( "path" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" + utiltesting "k8s.io/client-go/util/testing" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" "k8s.io/kubernetes/pkg/cloudprovider/providers/aws" "k8s.io/kubernetes/pkg/util/mount" - utiltesting "k8s.io/kubernetes/pkg/util/testing" "k8s.io/kubernetes/pkg/volume" volumetest "k8s.io/kubernetes/pkg/volume/testing" ) @@ -216,7 +217,7 @@ func TestPlugin(t *testing.T) { func TestPersistentClaimReadOnlyFlag(t *testing.T) { pv := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pvA", }, Spec: v1.PersistentVolumeSpec{ @@ -230,7 +231,7 @@ func TestPersistentClaimReadOnlyFlag(t *testing.T) { } claim := &v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "claimA", Namespace: "nsA", }, @@ -255,7 +256,7 @@ func TestPersistentClaimReadOnlyFlag(t *testing.T) { // readOnly bool is supplied by persistent-claim volume source when its mounter creates other volumes spec := volume.NewSpecFromPersistentVolume(pv, true) - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: types.UID("poduid")}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: types.UID("poduid")}} mounter, _ := plug.NewMounter(spec, pod, volume.VolumeOptions{}) if !mounter.GetAttributes().ReadOnly { diff --git a/vendor/k8s.io/kubernetes/pkg/volume/azure_dd/BUILD b/vendor/k8s.io/kubernetes/pkg/volume/azure_dd/BUILD index 7cc093e0..373ead3a 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/azure_dd/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/volume/azure_dd/BUILD @@ -30,6 +30,7 @@ go_library( "//pkg/volume/util:go_default_library", "//vendor:github.com/Azure/azure-sdk-for-go/arm/compute", "//vendor:github.com/golang/glog", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/wait", ], @@ -47,11 +48,11 @@ go_test( "//pkg/api/v1:go_default_library", "//pkg/util/exec:go_default_library", "//pkg/util/mount:go_default_library", - "//pkg/util/testing:go_default_library", "//pkg/volume:go_default_library", "//pkg/volume/testing:go_default_library", "//vendor:github.com/Azure/azure-sdk-for-go/arm/compute", "//vendor:k8s.io/apimachinery/pkg/types", + "//vendor:k8s.io/client-go/util/testing", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/volume/azure_dd/OWNERS b/vendor/k8s.io/kubernetes/pkg/volume/azure_dd/OWNERS new file mode 100755 index 00000000..36f2dca1 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/volume/azure_dd/OWNERS @@ -0,0 +1,21 @@ +approvers: +- brendandburns +- rootfs +reviewers: +- justinsb +- rootfs +- brendandburns +- thockin +- smarterclayton +- deads2k +- brendandburns +- derekwaynecarr +- bprashanth +- pmorie +- saad-ali +- justinsb +- jsafrane +- rootfs +- jingxu97 +- rkouj +- msau42 diff --git a/vendor/k8s.io/kubernetes/pkg/volume/azure_dd/azure_dd_test.go b/vendor/k8s.io/kubernetes/pkg/volume/azure_dd/azure_dd_test.go index 095eb129..db885c40 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/azure_dd/azure_dd_test.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/azure_dd/azure_dd_test.go @@ -25,9 +25,9 @@ import ( "github.com/Azure/azure-sdk-for-go/arm/compute" "k8s.io/apimachinery/pkg/types" + utiltesting "k8s.io/client-go/util/testing" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/util/mount" - utiltesting "k8s.io/kubernetes/pkg/util/testing" "k8s.io/kubernetes/pkg/volume" volumetest "k8s.io/kubernetes/pkg/volume/testing" ) diff --git a/vendor/k8s.io/kubernetes/pkg/volume/azure_dd/azure_provision.go b/vendor/k8s.io/kubernetes/pkg/volume/azure_dd/azure_provision.go index 5c9b1353..56e1f62a 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/azure_dd/azure_provision.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/azure_dd/azure_provision.go @@ -21,6 +21,7 @@ import ( "strings" "github.com/golang/glog" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" utilstrings "k8s.io/kubernetes/pkg/util/strings" @@ -107,7 +108,8 @@ var _ volume.Provisioner = &azureDiskProvisioner{} func (a *azureDiskProvisioner) Provision() (*v1.PersistentVolume, error) { var sku, location, account string - name := volume.GenerateVolumeName(a.options.ClusterName, a.options.PVName, 255) + // maxLength = 79 - (4 for ".vhd") = 75 + name := volume.GenerateVolumeName(a.options.ClusterName, a.options.PVName, 75) capacity := a.options.PVC.Spec.Resources.Requests[v1.ResourceName(v1.ResourceStorage)] requestBytes := capacity.Value() requestGB := int(volume.RoundUpSize(requestBytes, 1024*1024*1024)) @@ -137,7 +139,7 @@ func (a *azureDiskProvisioner) Provision() (*v1.PersistentVolume, error) { } pv := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: a.options.PVName, Labels: map[string]string{}, Annotations: map[string]string{ diff --git a/vendor/k8s.io/kubernetes/pkg/volume/azure_file/BUILD b/vendor/k8s.io/kubernetes/pkg/volume/azure_file/BUILD index d77d9f62..f851038e 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/azure_file/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/volume/azure_file/BUILD @@ -39,6 +39,7 @@ go_test( "//pkg/util/mount:go_default_library", "//pkg/volume:go_default_library", "//pkg/volume/testing:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/volume/azure_file/OWNERS b/vendor/k8s.io/kubernetes/pkg/volume/azure_file/OWNERS index 68ed9176..36f2dca1 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/azure_file/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/volume/azure_file/OWNERS @@ -1,2 +1,21 @@ -assignees: +approvers: +- brendandburns - rootfs +reviewers: +- justinsb +- rootfs +- brendandburns +- thockin +- smarterclayton +- deads2k +- brendandburns +- derekwaynecarr +- bprashanth +- pmorie +- saad-ali +- justinsb +- jsafrane +- rootfs +- jingxu97 +- rkouj +- msau42 diff --git a/vendor/k8s.io/kubernetes/pkg/volume/azure_file/azure_file.go b/vendor/k8s.io/kubernetes/pkg/volume/azure_file/azure_file.go index 51d922ef..14ed10f2 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/azure_file/azure_file.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/azure_file/azure_file.go @@ -20,6 +20,7 @@ import ( "fmt" "os" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/util/mount" @@ -119,7 +120,7 @@ func (plugin *azureFilePlugin) newUnmounterInternal(volName string, podUID types return &azureFileUnmounter{&azureFile{ volName: volName, mounter: mounter, - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: podUID}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: podUID}}, plugin: plugin, MetricsProvider: volume.NewMetricsStatFS(getPath(podUID, volName, plugin.host)), }}, nil diff --git a/vendor/k8s.io/kubernetes/pkg/volume/azure_file/azure_file_test.go b/vendor/k8s.io/kubernetes/pkg/volume/azure_file/azure_file_test.go index 006bc323..9bf8bfd9 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/azure_file/azure_file_test.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/azure_file/azure_file_test.go @@ -22,6 +22,7 @@ import ( "path" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" @@ -104,7 +105,7 @@ func TestPlugin(t *testing.T) { }, } fake := &mount.FakeMounter{} - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: types.UID("poduid")}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: types.UID("poduid")}} mounter, err := plug.(*azureFilePlugin).newMounterInternal(volume.NewSpecFromVolume(spec), pod, &fakeAzureSvc{}, fake) if err != nil { t.Errorf("Failed to make a new Mounter: %v", err) @@ -156,7 +157,7 @@ func TestPlugin(t *testing.T) { func TestPersistentClaimReadOnlyFlag(t *testing.T) { pv := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pvA", }, Spec: v1.PersistentVolumeSpec{ @@ -170,7 +171,7 @@ func TestPersistentClaimReadOnlyFlag(t *testing.T) { } claim := &v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "claimA", Namespace: "nsA", }, @@ -190,7 +191,7 @@ func TestPersistentClaimReadOnlyFlag(t *testing.T) { // readOnly bool is supplied by persistent-claim volume source when its mounter creates other volumes spec := volume.NewSpecFromPersistentVolume(pv, true) - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: types.UID("poduid")}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: types.UID("poduid")}} mounter, _ := plug.NewMounter(spec, pod, volume.VolumeOptions{}) if !mounter.GetAttributes().ReadOnly { @@ -227,7 +228,7 @@ func TestMounterAndUnmounterTypeAssert(t *testing.T) { }, } fake := &mount.FakeMounter{} - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: types.UID("poduid")}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: types.UID("poduid")}} mounter, err := plug.(*azureFilePlugin).newMounterInternal(volume.NewSpecFromVolume(spec), pod, &fakeAzureSvc{}, fake) if _, ok := mounter.(volume.Unmounter); ok { t.Errorf("Volume Mounter can be type-assert to Unmounter") diff --git a/vendor/k8s.io/kubernetes/pkg/volume/cephfs/BUILD b/vendor/k8s.io/kubernetes/pkg/volume/cephfs/BUILD index 1a15b262..47088522 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/cephfs/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/volume/cephfs/BUILD @@ -35,10 +35,10 @@ go_test( deps = [ "//pkg/api/v1:go_default_library", "//pkg/util/mount:go_default_library", - "//pkg/util/testing:go_default_library", "//pkg/volume:go_default_library", "//pkg/volume/testing:go_default_library", "//vendor:k8s.io/apimachinery/pkg/types", + "//vendor:k8s.io/client-go/util/testing", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/volume/cephfs/OWNERS b/vendor/k8s.io/kubernetes/pkg/volume/cephfs/OWNERS index 68ed9176..5a4e5491 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/cephfs/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/volume/cephfs/OWNERS @@ -1,2 +1,21 @@ -assignees: +approvers: - rootfs +- saad-ali +reviewers: +- justinsb +- rootfs +- brendandburns +- thockin +- smarterclayton +- deads2k +- brendandburns +- derekwaynecarr +- bprashanth +- pmorie +- saad-ali +- justinsb +- jsafrane +- rootfs +- jingxu97 +- rkouj +- msau42 diff --git a/vendor/k8s.io/kubernetes/pkg/volume/cephfs/cephfs_test.go b/vendor/k8s.io/kubernetes/pkg/volume/cephfs/cephfs_test.go index c49d0c7b..cc91f5b0 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/cephfs/cephfs_test.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/cephfs/cephfs_test.go @@ -22,9 +22,9 @@ import ( "testing" "k8s.io/apimachinery/pkg/types" + utiltesting "k8s.io/client-go/util/testing" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/util/mount" - utiltesting "k8s.io/kubernetes/pkg/util/testing" "k8s.io/kubernetes/pkg/volume" volumetest "k8s.io/kubernetes/pkg/volume/testing" ) diff --git a/vendor/k8s.io/kubernetes/pkg/volume/cinder/BUILD b/vendor/k8s.io/kubernetes/pkg/volume/cinder/BUILD index 34154279..cd92fe15 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/cinder/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/volume/cinder/BUILD @@ -30,6 +30,7 @@ go_library( "//pkg/volume:go_default_library", "//pkg/volume/util:go_default_library", "//vendor:github.com/golang/glog", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", ], ) @@ -46,11 +47,11 @@ go_test( "//pkg/api/v1:go_default_library", "//pkg/cloudprovider:go_default_library", "//pkg/util/mount:go_default_library", - "//pkg/util/testing:go_default_library", "//pkg/volume:go_default_library", "//pkg/volume/testing:go_default_library", "//vendor:github.com/golang/glog", "//vendor:k8s.io/apimachinery/pkg/types", + "//vendor:k8s.io/client-go/util/testing", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/volume/cinder/OWNERS b/vendor/k8s.io/kubernetes/pkg/volume/cinder/OWNERS index 1849a038..ff9fb810 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/cinder/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/volume/cinder/OWNERS @@ -1,3 +1,21 @@ -maintainers: +approvers: - jsafrane -- spothanis +reviewers: +- anguslees +- justinsb +- rootfs +- brendandburns +- thockin +- smarterclayton +- deads2k +- brendandburns +- derekwaynecarr +- bprashanth +- pmorie +- saad-ali +- justinsb +- jsafrane +- rootfs +- jingxu97 +- rkouj +- msau42 diff --git a/vendor/k8s.io/kubernetes/pkg/volume/cinder/cinder.go b/vendor/k8s.io/kubernetes/pkg/volume/cinder/cinder.go index 3b087716..d02e41cb 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/cinder/cinder.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/cinder/cinder.go @@ -23,6 +23,7 @@ import ( "path" "github.com/golang/glog" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" @@ -479,7 +480,7 @@ func (c *cinderVolumeProvisioner) Provision() (*v1.PersistentVolume, error) { } pv := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: c.options.PVName, Labels: map[string]string{}, Annotations: map[string]string{ diff --git a/vendor/k8s.io/kubernetes/pkg/volume/cinder/cinder_test.go b/vendor/k8s.io/kubernetes/pkg/volume/cinder/cinder_test.go index ae0a3b06..7b1735fa 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/cinder/cinder_test.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/cinder/cinder_test.go @@ -24,9 +24,9 @@ import ( "time" "k8s.io/apimachinery/pkg/types" + utiltesting "k8s.io/client-go/util/testing" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/util/mount" - utiltesting "k8s.io/kubernetes/pkg/util/testing" "k8s.io/kubernetes/pkg/volume" volumetest "k8s.io/kubernetes/pkg/volume/testing" ) diff --git a/vendor/k8s.io/kubernetes/pkg/volume/cinder/cinder_util.go b/vendor/k8s.io/kubernetes/pkg/volume/cinder/cinder_util.go index 1a701099..f3e50c5c 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/cinder/cinder_util.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/cinder/cinder_util.go @@ -19,6 +19,7 @@ package cinder import ( "errors" "fmt" + "io/ioutil" "os" "strings" "time" @@ -174,6 +175,9 @@ func (util *CinderDiskUtil) CreateVolume(c *cinderVolumeProvisioner) (volumeID s } func probeAttachedVolume() error { + // rescan scsi bus + scsiHostRescan() + executor := exec.New() args := []string{"trigger"} cmd := executor.Command("/usr/bin/udevadm", args...) @@ -185,3 +189,14 @@ func probeAttachedVolume() error { glog.V(4).Infof("Successfully probed all attachments") return nil } + +func scsiHostRescan() { + scsi_path := "/sys/class/scsi_host/" + if dirs, err := ioutil.ReadDir(scsi_path); err == nil { + for _, f := range dirs { + name := scsi_path + f.Name() + "/scan" + data := []byte("- - -") + ioutil.WriteFile(name, data, 0666) + } + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/volume/configmap/BUILD b/vendor/k8s.io/kubernetes/pkg/volume/configmap/BUILD index 1a005674..0536ab6a 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/configmap/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/volume/configmap/BUILD @@ -23,6 +23,7 @@ go_library( "//pkg/volume:go_default_library", "//pkg/volume/util:go_default_library", "//vendor:github.com/golang/glog", + "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", ], @@ -41,6 +42,7 @@ go_test( "//pkg/volume/empty_dir:go_default_library", "//pkg/volume/testing:go_default_library", "//pkg/volume/util:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/volume/configmap/OWNERS b/vendor/k8s.io/kubernetes/pkg/volume/configmap/OWNERS index 87269d78..d8e2f68d 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/configmap/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/volume/configmap/OWNERS @@ -1,2 +1,23 @@ -maintainers: +approvers: - pmorie +- saad-ali +- thockin +- matchstick +reviewers: +- ivan4th +- rata +- sjenning +- thockin +- smarterclayton +- deads2k +- brendandburns +- derekwaynecarr +- bprashanth +- pmorie +- saad-ali +- justinsb +- jsafrane +- rootfs +- jingxu97 +- rkouj +- msau42 diff --git a/vendor/k8s.io/kubernetes/pkg/volume/configmap/configmap.go b/vendor/k8s.io/kubernetes/pkg/volume/configmap/configmap.go index 48a389c9..b6b231a2 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/configmap/configmap.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/configmap/configmap.go @@ -20,6 +20,7 @@ import ( "fmt" "github.com/golang/glog" + "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api/v1" @@ -170,10 +171,19 @@ func (b *configMapVolumeMounter) SetUpAt(dir string, fsGroup *int64) error { return fmt.Errorf("Cannot setup configMap volume %v because kube client is not configured", b.volName) } + optional := b.source.Optional != nil && *b.source.Optional configMap, err := kubeClient.Core().ConfigMaps(b.pod.Namespace).Get(b.source.Name, metav1.GetOptions{}) if err != nil { - glog.Errorf("Couldn't get configMap %v/%v: %v", b.pod.Namespace, b.source.Name, err) - return err + if !(errors.IsNotFound(err) && optional) { + glog.Errorf("Couldn't get configMap %v/%v: %v", b.pod.Namespace, b.source.Name, err) + return err + } + configMap = &v1.ConfigMap{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: b.pod.Namespace, + Name: b.source.Name, + }, + } } totalBytes := totalBytes(configMap) @@ -183,7 +193,7 @@ func (b *configMapVolumeMounter) SetUpAt(dir string, fsGroup *int64) error { len(configMap.Data), totalBytes) - payload, err := makePayload(b.source.Items, configMap, b.source.DefaultMode) + payload, err := makePayload(b.source.Items, configMap, b.source.DefaultMode, optional) if err != nil { return err } @@ -210,7 +220,7 @@ func (b *configMapVolumeMounter) SetUpAt(dir string, fsGroup *int64) error { return nil } -func makePayload(mappings []v1.KeyToPath, configMap *v1.ConfigMap, defaultMode *int32) (map[string]volumeutil.FileProjection, error) { +func makePayload(mappings []v1.KeyToPath, configMap *v1.ConfigMap, defaultMode *int32, optional bool) (map[string]volumeutil.FileProjection, error) { if defaultMode == nil { return nil, fmt.Errorf("No defaultMode used, not even the default value for it") } @@ -228,6 +238,9 @@ func makePayload(mappings []v1.KeyToPath, configMap *v1.ConfigMap, defaultMode * for _, ktp := range mappings { content, ok := configMap.Data[ktp.Key] if !ok { + if optional { + continue + } err_msg := "references non-existent config key" glog.Errorf(err_msg) return nil, fmt.Errorf(err_msg) diff --git a/vendor/k8s.io/kubernetes/pkg/volume/configmap/configmap_test.go b/vendor/k8s.io/kubernetes/pkg/volume/configmap/configmap_test.go index aae4b43b..80fa9b11 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/configmap/configmap_test.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/configmap/configmap_test.go @@ -25,6 +25,7 @@ import ( "strings" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" @@ -42,6 +43,7 @@ func TestMakePayload(t *testing.T) { mappings []v1.KeyToPath configMap *v1.ConfigMap mode int32 + optional bool payload map[string]util.FileProjection success bool }{ @@ -214,10 +216,29 @@ func TestMakePayload(t *testing.T) { }, success: true, }, + { + name: "optional non existent key", + mappings: []v1.KeyToPath{ + { + Key: "zab", + Path: "path/to/foo.txt", + }, + }, + configMap: &v1.ConfigMap{ + Data: map[string]string{ + "foo": "foo", + "bar": "bar", + }, + }, + mode: 0644, + optional: true, + payload: map[string]util.FileProjection{}, + success: true, + }, } for _, tc := range cases { - actualPayload, err := makePayload(tc.mappings, tc.configMap, &tc.mode) + actualPayload, err := makePayload(tc.mappings, tc.configMap, &tc.mode, tc.optional) if err != nil && tc.success { t.Errorf("%v: unexpected failure making payload: %v", tc.name, err) continue @@ -290,7 +311,7 @@ func TestPlugin(t *testing.T) { t.Errorf("Can't find the plugin by name") } - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{Namespace: testNamespace, UID: testPodUID}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Namespace: testNamespace, UID: testPodUID}} mounter, err := plugin.NewMounter(volume.NewSpecFromVolume(volumeSpec), pod, volume.VolumeOptions{}) if err != nil { t.Errorf("Failed to make a new Mounter: %v", err) @@ -354,7 +375,7 @@ func TestPluginReboot(t *testing.T) { t.Errorf("Can't find the plugin by name") } - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{Namespace: testNamespace, UID: testPodUID}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Namespace: testNamespace, UID: testPodUID}} mounter, err := plugin.NewMounter(volume.NewSpecFromVolume(volumeSpec), pod, volume.VolumeOptions{}) if err != nil { t.Errorf("Failed to make a new Mounter: %v", err) @@ -387,6 +408,143 @@ func TestPluginReboot(t *testing.T) { doTestCleanAndTeardown(plugin, testPodUID, testVolumeName, volumePath, t) } +func TestPluginOptional(t *testing.T) { + var ( + testPodUID = types.UID("test_pod_uid") + testVolumeName = "test_volume_name" + testNamespace = "test_configmap_namespace" + testName = "test_configmap_name" + trueVal = true + + volumeSpec = volumeSpec(testVolumeName, testName, 0644) + client = fake.NewSimpleClientset() + pluginMgr = volume.VolumePluginMgr{} + tempDir, host = newTestHost(t, client) + ) + volumeSpec.VolumeSource.ConfigMap.Optional = &trueVal + + defer os.RemoveAll(tempDir) + pluginMgr.InitPlugins(ProbeVolumePlugins(), host) + + plugin, err := pluginMgr.FindPluginByName(configMapPluginName) + if err != nil { + t.Errorf("Can't find the plugin by name") + } + + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Namespace: testNamespace, UID: testPodUID}} + mounter, err := plugin.NewMounter(volume.NewSpecFromVolume(volumeSpec), pod, volume.VolumeOptions{}) + if err != nil { + t.Errorf("Failed to make a new Mounter: %v", err) + } + if mounter == nil { + t.Errorf("Got a nil Mounter") + } + + vName, err := plugin.GetVolumeName(volume.NewSpecFromVolume(volumeSpec)) + if err != nil { + t.Errorf("Failed to GetVolumeName: %v", err) + } + if vName != "test_volume_name/test_configmap_name" { + t.Errorf("Got unexpect VolumeName %v", vName) + } + + volumePath := mounter.GetPath() + if !strings.HasSuffix(volumePath, fmt.Sprintf("pods/test_pod_uid/volumes/kubernetes.io~configmap/test_volume_name")) { + t.Errorf("Got unexpected path: %s", volumePath) + } + + fsGroup := int64(1001) + err = mounter.SetUp(&fsGroup) + if err != nil { + t.Errorf("Failed to setup volume: %v", err) + } + if _, err := os.Stat(volumePath); err != nil { + if os.IsNotExist(err) { + t.Errorf("SetUp() failed, volume path not created: %s", volumePath) + } else { + t.Errorf("SetUp() failed: %v", err) + } + } + + infos, err := ioutil.ReadDir(volumePath) + if err != nil { + t.Fatalf("couldn't find volume path, %s", volumePath) + } + if len(infos) != 0 { + t.Errorf("empty directory, %s, not found", volumePath) + } + doTestCleanAndTeardown(plugin, testPodUID, testVolumeName, volumePath, t) +} + +func TestPluginKeysOptional(t *testing.T) { + var ( + testPodUID = types.UID("test_pod_uid") + testVolumeName = "test_volume_name" + testNamespace = "test_configmap_namespace" + testName = "test_configmap_name" + trueVal = true + + volumeSpec = volumeSpec(testVolumeName, testName, 0644) + configMap = configMap(testNamespace, testName) + client = fake.NewSimpleClientset(&configMap) + pluginMgr = volume.VolumePluginMgr{} + tempDir, host = newTestHost(t, client) + ) + volumeSpec.VolumeSource.ConfigMap.Items = []v1.KeyToPath{ + {Key: "data-1", Path: "data-1"}, + {Key: "data-2", Path: "data-2"}, + {Key: "data-3", Path: "data-3"}, + {Key: "missing", Path: "missing"}, + } + volumeSpec.VolumeSource.ConfigMap.Optional = &trueVal + + defer os.RemoveAll(tempDir) + pluginMgr.InitPlugins(ProbeVolumePlugins(), host) + + plugin, err := pluginMgr.FindPluginByName(configMapPluginName) + if err != nil { + t.Errorf("Can't find the plugin by name") + } + + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Namespace: testNamespace, UID: testPodUID}} + mounter, err := plugin.NewMounter(volume.NewSpecFromVolume(volumeSpec), pod, volume.VolumeOptions{}) + if err != nil { + t.Errorf("Failed to make a new Mounter: %v", err) + } + if mounter == nil { + t.Errorf("Got a nil Mounter") + } + + vName, err := plugin.GetVolumeName(volume.NewSpecFromVolume(volumeSpec)) + if err != nil { + t.Errorf("Failed to GetVolumeName: %v", err) + } + if vName != "test_volume_name/test_configmap_name" { + t.Errorf("Got unexpect VolumeName %v", vName) + } + + volumePath := mounter.GetPath() + if !strings.HasSuffix(volumePath, fmt.Sprintf("pods/test_pod_uid/volumes/kubernetes.io~configmap/test_volume_name")) { + t.Errorf("Got unexpected path: %s", volumePath) + } + + fsGroup := int64(1001) + err = mounter.SetUp(&fsGroup) + if err != nil { + t.Errorf("Failed to setup volume: %v", err) + } + if _, err := os.Stat(volumePath); err != nil { + if os.IsNotExist(err) { + t.Errorf("SetUp() failed, volume path not created: %s", volumePath) + } else { + t.Errorf("SetUp() failed: %v", err) + } + } + + doTestConfigMapDataInVolume(volumePath, configMap, t) + doTestCleanAndTeardown(plugin, testPodUID, testVolumeName, volumePath, t) +} + func volumeSpec(volumeName, configMapName string, defaultMode int32) *v1.Volume { return &v1.Volume{ Name: volumeName, @@ -403,7 +561,7 @@ func volumeSpec(volumeName, configMapName string, defaultMode int32) *v1.Volume func configMap(namespace, name string) v1.ConfigMap { return v1.ConfigMap{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: namespace, Name: name, }, diff --git a/vendor/k8s.io/kubernetes/pkg/volume/downwardapi/BUILD b/vendor/k8s.io/kubernetes/pkg/volume/downwardapi/BUILD index a62d953b..4fd3da87 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/downwardapi/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/volume/downwardapi/BUILD @@ -34,11 +34,12 @@ go_test( "//pkg/client/clientset_generated/clientset:go_default_library", "//pkg/client/clientset_generated/clientset/fake:go_default_library", "//pkg/fieldpath:go_default_library", - "//pkg/util/testing:go_default_library", "//pkg/volume:go_default_library", "//pkg/volume/empty_dir:go_default_library", "//pkg/volume/testing:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", + "//vendor:k8s.io/client-go/util/testing", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/volume/downwardapi/OWNERS b/vendor/k8s.io/kubernetes/pkg/volume/downwardapi/OWNERS index 85285e58..d8e2f68d 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/downwardapi/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/volume/downwardapi/OWNERS @@ -1,3 +1,23 @@ -maintainers: +approvers: - pmorie -- sdminonne +- saad-ali +- thockin +- matchstick +reviewers: +- ivan4th +- rata +- sjenning +- thockin +- smarterclayton +- deads2k +- brendandburns +- derekwaynecarr +- bprashanth +- pmorie +- saad-ali +- justinsb +- jsafrane +- rootfs +- jingxu97 +- rkouj +- msau42 diff --git a/vendor/k8s.io/kubernetes/pkg/volume/downwardapi/downwardapi_test.go b/vendor/k8s.io/kubernetes/pkg/volume/downwardapi/downwardapi_test.go index 2dbca39e..e602ed20 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/downwardapi/downwardapi_test.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/downwardapi/downwardapi_test.go @@ -23,12 +23,13 @@ import ( "path" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" + utiltesting "k8s.io/client-go/util/testing" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" "k8s.io/kubernetes/pkg/fieldpath" - utiltesting "k8s.io/kubernetes/pkg/util/testing" "k8s.io/kubernetes/pkg/volume" "k8s.io/kubernetes/pkg/volume/empty_dir" volumetest "k8s.io/kubernetes/pkg/volume/testing" @@ -91,7 +92,7 @@ func TestLabels(t *testing.T) { "key2": "value2"} clientset := fake.NewSimpleClientset(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: testName, Namespace: testNamespace, Labels: labels, @@ -117,7 +118,7 @@ func TestLabels(t *testing.T) { if err != nil { t.Errorf("Can't find the plugin by name") } - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: testPodUID, Labels: labels}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: testPodUID, Labels: labels}} mounter, err := plugin.NewMounter(volume.NewSpecFromVolume(volumeSpec), pod, volume.VolumeOptions{}) if err != nil { @@ -182,7 +183,7 @@ func TestAnnotations(t *testing.T) { } clientset := fake.NewSimpleClientset(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: testName, Namespace: testNamespace, Annotations: annotations, @@ -197,7 +198,7 @@ func TestAnnotations(t *testing.T) { if err != nil { t.Errorf("Can't find the plugin by name") } - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: testPodUID, Annotations: annotations}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: testPodUID, Annotations: annotations}} mounter, err := plugin.NewMounter(volume.NewSpecFromVolume(volumeSpec), pod, volume.VolumeOptions{}) if err != nil { t.Errorf("Failed to make a new Mounter: %v", err) @@ -247,7 +248,7 @@ func TestName(t *testing.T) { } clientset := fake.NewSimpleClientset(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: testName, Namespace: testNamespace, }, @@ -261,7 +262,7 @@ func TestName(t *testing.T) { if err != nil { t.Errorf("Can't find the plugin by name") } - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: testPodUID, Name: testName}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: testPodUID, Name: testName}} mounter, err := plugin.NewMounter(volume.NewSpecFromVolume(volumeSpec), pod, volume.VolumeOptions{}) if err != nil { t.Errorf("Failed to make a new Mounter: %v", err) @@ -312,7 +313,7 @@ func TestNamespace(t *testing.T) { } clientset := fake.NewSimpleClientset(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: testName, Namespace: testNamespace, }, @@ -326,7 +327,7 @@ func TestNamespace(t *testing.T) { if err != nil { t.Errorf("Can't find the plugin by name") } - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: testPodUID, Namespace: testNamespace}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: testPodUID, Namespace: testNamespace}} mounter, err := plugin.NewMounter(volume.NewSpecFromVolume(volumeSpec), pod, volume.VolumeOptions{}) if err != nil { t.Errorf("Failed to make a new Mounter: %v", err) @@ -368,7 +369,7 @@ func TestWriteTwiceNoUpdate(t *testing.T) { "key2": "value2"} clientset := fake.NewSimpleClientset(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: testName, Namespace: testNamespace, Labels: labels, @@ -393,7 +394,7 @@ func TestWriteTwiceNoUpdate(t *testing.T) { if err != nil { t.Errorf("Can't find the plugin by name") } - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: testPodUID, Labels: labels}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: testPodUID, Labels: labels}} mounter, err := plugin.NewMounter(volume.NewSpecFromVolume(volumeSpec), pod, volume.VolumeOptions{}) if err != nil { @@ -456,7 +457,7 @@ func TestWriteTwiceWithUpdate(t *testing.T) { "key2": "value2"} clientset := fake.NewSimpleClientset(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: testName, Namespace: testNamespace, Labels: labels, @@ -481,7 +482,7 @@ func TestWriteTwiceWithUpdate(t *testing.T) { if err != nil { t.Errorf("Can't find the plugin by name") } - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: testPodUID, Labels: labels}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: testPodUID, Labels: labels}} mounter, err := plugin.NewMounter(volume.NewSpecFromVolume(volumeSpec), pod, volume.VolumeOptions{}) if err != nil { @@ -563,7 +564,7 @@ func TestWriteWithUnixPath(t *testing.T) { "a2": "value2"} clientset := fake.NewSimpleClientset(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: testName, Namespace: testNamespace, Labels: labels, @@ -591,7 +592,7 @@ func TestWriteWithUnixPath(t *testing.T) { if err != nil { t.Errorf("Can't find the plugin by name") } - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: testPodUID, Labels: labels, Annotations: annotations}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: testPodUID, Labels: labels, Annotations: annotations}} mounter, err := plugin.NewMounter(volume.NewSpecFromVolume(volumeSpec), pod, volume.VolumeOptions{}) if err != nil { @@ -641,7 +642,7 @@ func TestWriteWithUnixPathBadPath(t *testing.T) { } clientset := fake.NewSimpleClientset(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: testName, Namespace: testNamespace, Labels: labels, @@ -675,7 +676,7 @@ func TestWriteWithUnixPathBadPath(t *testing.T) { }, } - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: testPodUID, Labels: labels}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: testPodUID, Labels: labels}} mounter, err := plugin.NewMounter(volume.NewSpecFromVolume(volumeSpec), pod, volume.VolumeOptions{}) if err != nil { t.Fatalf("Failed to make a new Mounter: %v", err) @@ -722,7 +723,7 @@ func TestDefaultMode(t *testing.T) { } clientset := fake.NewSimpleClientset(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: testName, Namespace: testNamespace, }, @@ -736,7 +737,7 @@ func TestDefaultMode(t *testing.T) { if err != nil { t.Errorf("Can't find the plugin by name") } - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: testPodUID, Name: testName}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: testPodUID, Name: testName}} mounter, err := plugin.NewMounter(volume.NewSpecFromVolume(volumeSpec), pod, volume.VolumeOptions{}) if err != nil { t.Errorf("Failed to make a new Mounter: %v", err) @@ -792,7 +793,7 @@ func TestItemMode(t *testing.T) { } clientset := fake.NewSimpleClientset(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: testName, Namespace: testNamespace, }, @@ -806,7 +807,7 @@ func TestItemMode(t *testing.T) { if err != nil { t.Errorf("Can't find the plugin by name") } - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: testPodUID, Name: testName}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: testPodUID, Name: testName}} mounter, err := plugin.NewMounter(volume.NewSpecFromVolume(volumeSpec), pod, volume.VolumeOptions{}) if err != nil { t.Errorf("Failed to make a new Mounter: %v", err) diff --git a/vendor/k8s.io/kubernetes/pkg/volume/empty_dir/BUILD b/vendor/k8s.io/kubernetes/pkg/volume/empty_dir/BUILD index a1d5b1b1..80dd46fa 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/empty_dir/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/volume/empty_dir/BUILD @@ -23,6 +23,7 @@ go_library( "//pkg/volume:go_default_library", "//pkg/volume/util:go_default_library", "//vendor:github.com/golang/glog", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", ], ) @@ -35,11 +36,12 @@ go_test( deps = [ "//pkg/api/v1:go_default_library", "//pkg/util/mount:go_default_library", - "//pkg/util/testing:go_default_library", "//pkg/volume:go_default_library", "//pkg/volume/testing:go_default_library", "//pkg/volume/util:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", + "//vendor:k8s.io/client-go/util/testing", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/volume/empty_dir/OWNERS b/vendor/k8s.io/kubernetes/pkg/volume/empty_dir/OWNERS index b4ae5e68..d8e2f68d 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/empty_dir/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/volume/empty_dir/OWNERS @@ -1,4 +1,23 @@ -maintainers: +approvers: - pmorie - saad-ali - thockin +- matchstick +reviewers: +- ivan4th +- rata +- sjenning +- thockin +- smarterclayton +- deads2k +- brendandburns +- derekwaynecarr +- bprashanth +- pmorie +- saad-ali +- justinsb +- jsafrane +- rootfs +- jingxu97 +- rkouj +- msau42 diff --git a/vendor/k8s.io/kubernetes/pkg/volume/empty_dir/empty_dir.go b/vendor/k8s.io/kubernetes/pkg/volume/empty_dir/empty_dir.go index 74100bdf..3252cbc1 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/empty_dir/empty_dir.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/empty_dir/empty_dir.go @@ -22,6 +22,7 @@ import ( "path" "github.com/golang/glog" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/util/mount" @@ -116,7 +117,7 @@ func (plugin *emptyDirPlugin) NewUnmounter(volName string, podUID types.UID) (vo func (plugin *emptyDirPlugin) newUnmounterInternal(volName string, podUID types.UID, mounter mount.Interface, mountDetector mountDetector) (volume.Unmounter, error) { ed := &emptyDir{ - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: podUID}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: podUID}}, volName: volName, medium: v1.StorageMediumDefault, // might be changed later mounter: mounter, diff --git a/vendor/k8s.io/kubernetes/pkg/volume/empty_dir/empty_dir_test.go b/vendor/k8s.io/kubernetes/pkg/volume/empty_dir/empty_dir_test.go index ac6dbbac..7308246d 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/empty_dir/empty_dir_test.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/empty_dir/empty_dir_test.go @@ -23,10 +23,11 @@ import ( "path" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" + utiltesting "k8s.io/client-go/util/testing" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/util/mount" - utiltesting "k8s.io/kubernetes/pkg/util/testing" "k8s.io/kubernetes/pkg/volume" volumetest "k8s.io/kubernetes/pkg/volume/testing" "k8s.io/kubernetes/pkg/volume/util" @@ -108,7 +109,7 @@ func doTestPlugin(t *testing.T, config pluginTestConfig) { physicalMounter = mount.FakeMounter{} mountDetector = fakeMountDetector{} - pod = &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: types.UID("poduid")}} + pod = &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: types.UID("poduid")}} ) if config.idempotent { @@ -214,7 +215,7 @@ func TestPluginBackCompat(t *testing.T) { spec := &v1.Volume{ Name: "vol1", } - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: types.UID("poduid")}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: types.UID("poduid")}} mounter, err := plug.NewMounter(volume.NewSpecFromVolume(spec), pod, volume.VolumeOptions{}) if err != nil { t.Errorf("Failed to make a new Mounter: %v", err) @@ -243,7 +244,7 @@ func TestMetrics(t *testing.T) { spec := &v1.Volume{ Name: "vol1", } - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: types.UID("poduid")}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: types.UID("poduid")}} mounter, err := plug.NewMounter(volume.NewSpecFromVolume(spec), pod, volume.VolumeOptions{}) if err != nil { t.Errorf("Failed to make a new Mounter: %v", err) diff --git a/vendor/k8s.io/kubernetes/pkg/volume/fc/BUILD b/vendor/k8s.io/kubernetes/pkg/volume/fc/BUILD index 92c30df8..fd9ac248 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/fc/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/volume/fc/BUILD @@ -41,10 +41,11 @@ go_test( "//pkg/api/v1:go_default_library", "//pkg/client/clientset_generated/clientset/fake:go_default_library", "//pkg/util/mount:go_default_library", - "//pkg/util/testing:go_default_library", "//pkg/volume:go_default_library", "//pkg/volume/testing:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", + "//vendor:k8s.io/client-go/util/testing", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/volume/fc/OWNERS b/vendor/k8s.io/kubernetes/pkg/volume/fc/OWNERS index 68ed9176..84b816e6 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/fc/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/volume/fc/OWNERS @@ -1,2 +1,18 @@ -assignees: +approvers: - rootfs +- saad-ali +reviewers: +- thockin +- smarterclayton +- deads2k +- brendandburns +- derekwaynecarr +- bprashanth +- pmorie +- saad-ali +- justinsb +- jsafrane +- rootfs +- jingxu97 +- rkouj +- msau42 diff --git a/vendor/k8s.io/kubernetes/pkg/volume/fc/fc_test.go b/vendor/k8s.io/kubernetes/pkg/volume/fc/fc_test.go index 565522c3..3531740d 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/fc/fc_test.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/fc/fc_test.go @@ -21,11 +21,12 @@ import ( "os" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" + utiltesting "k8s.io/client-go/util/testing" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" "k8s.io/kubernetes/pkg/util/mount" - utiltesting "k8s.io/kubernetes/pkg/util/testing" "k8s.io/kubernetes/pkg/volume" volumetest "k8s.io/kubernetes/pkg/volume/testing" ) @@ -216,7 +217,7 @@ func TestPluginVolume(t *testing.T) { func TestPluginPersistentVolume(t *testing.T) { lun := int32(0) vol := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "vol1", }, Spec: v1.PersistentVolumeSpec{ @@ -241,7 +242,7 @@ func TestPersistentClaimReadOnlyFlag(t *testing.T) { lun := int32(0) pv := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pvA", }, Spec: v1.PersistentVolumeSpec{ @@ -259,7 +260,7 @@ func TestPersistentClaimReadOnlyFlag(t *testing.T) { } claim := &v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "claimA", Namespace: "nsA", }, @@ -279,7 +280,7 @@ func TestPersistentClaimReadOnlyFlag(t *testing.T) { // readOnly bool is supplied by persistent-claim volume source when its mounter creates other volumes spec := volume.NewSpecFromPersistentVolume(pv, true) - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: types.UID("poduid")}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: types.UID("poduid")}} mounter, _ := plug.NewMounter(spec, pod, volume.VolumeOptions{}) if !mounter.GetAttributes().ReadOnly { diff --git a/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/BUILD b/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/BUILD index 955514a7..0c8f14d6 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/BUILD @@ -37,10 +37,11 @@ go_test( "//pkg/api/v1:go_default_library", "//pkg/util/exec:go_default_library", "//pkg/util/mount:go_default_library", - "//pkg/util/testing:go_default_library", "//pkg/volume:go_default_library", "//pkg/volume/testing:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", + "//vendor:k8s.io/client-go/util/testing", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/OWNERS b/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/OWNERS index b29ad9ff..d1af8882 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/OWNERS @@ -1,2 +1,22 @@ -maintainers: -- nelcy +approvers: +- chakri-nelluri +- saad-ali +reviewers: +- ivan4th +- rata +- sjenning +- thockin +- smarterclayton +- deads2k +- brendandburns +- derekwaynecarr +- bprashanth +- pmorie +- saad-ali +- justinsb +- jsafrane +- rootfs +- jingxu97 +- rkouj +- msau42 +- chakri-nelluri diff --git a/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/flexvolume_test.go b/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/flexvolume_test.go index b6805ae8..95503604 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/flexvolume_test.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/flexvolume_test.go @@ -25,11 +25,12 @@ import ( "testing" "text/template" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" + utiltesting "k8s.io/client-go/util/testing" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/util/exec" "k8s.io/kubernetes/pkg/util/mount" - utiltesting "k8s.io/kubernetes/pkg/util/testing" "k8s.io/kubernetes/pkg/volume" volumetest "k8s.io/kubernetes/pkg/volume/testing" ) @@ -239,7 +240,7 @@ func doTestPluginAttachDetach(t *testing.T, spec *volume.Spec, tmpDir string) { t.Errorf("Can't find the plugin by name") } fake := &mount.FakeMounter{} - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: types.UID("poduid")}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: types.UID("poduid")}} secretMap := make(map[string]string) secretMap["flexsecret"] = base64.StdEncoding.EncodeToString([]byte("foo")) mounter, err := plugin.(*flexVolumePlugin).newMounterInternal(spec, pod, &flexVolumeUtil{}, fake, exec.New(), secretMap) @@ -320,7 +321,7 @@ func doTestPluginMountUnmount(t *testing.T, spec *volume.Spec, tmpDir string) { t.Errorf("Can't find the plugin by name") } fake := &mount.FakeMounter{} - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: types.UID("poduid")}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: types.UID("poduid")}} // Use nil secret to test for nil secret case. mounter, err := plugin.(*flexVolumePlugin).newMounterInternal(spec, pod, &flexVolumeUtil{}, fake, exec.New(), nil) volumePath := mounter.GetPath() @@ -403,7 +404,7 @@ func TestPluginPersistentVolume(t *testing.T) { defer os.RemoveAll(tmpDir) vol := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "vol1", }, Spec: v1.PersistentVolumeSpec{ diff --git a/vendor/k8s.io/kubernetes/pkg/volume/flocker/BUILD b/vendor/k8s.io/kubernetes/pkg/volume/flocker/BUILD index f3cfe1c6..869a346c 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/flocker/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/volume/flocker/BUILD @@ -27,6 +27,7 @@ go_library( "//pkg/volume/util:go_default_library", "//vendor:github.com/clusterhq/flocker-go", "//vendor:github.com/golang/glog", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/rand", ], @@ -44,13 +45,13 @@ go_test( deps = [ "//pkg/api/v1:go_default_library", "//pkg/util/mount:go_default_library", - "//pkg/util/testing:go_default_library", "//pkg/volume:go_default_library", "//pkg/volume/testing:go_default_library", "//vendor:github.com/clusterhq/flocker-go", "//vendor:github.com/stretchr/testify/assert", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", + "//vendor:k8s.io/client-go/util/testing", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/volume/flocker/OWNERS b/vendor/k8s.io/kubernetes/pkg/volume/flocker/OWNERS index 95c6d0de..4b866fc5 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/flocker/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/volume/flocker/OWNERS @@ -1,3 +1,20 @@ -maintainers: +approvers: +- rootfs +- saad-ali +reviewers: - agonzalezro - simonswine +- thockin +- smarterclayton +- deads2k +- brendandburns +- derekwaynecarr +- bprashanth +- pmorie +- saad-ali +- justinsb +- jsafrane +- rootfs +- jingxu97 +- rkouj +- msau42 diff --git a/vendor/k8s.io/kubernetes/pkg/volume/flocker/flocker_test.go b/vendor/k8s.io/kubernetes/pkg/volume/flocker/flocker_test.go index 36679ed0..ae8ce243 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/flocker/flocker_test.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/flocker/flocker_test.go @@ -22,9 +22,9 @@ import ( "testing" "k8s.io/apimachinery/pkg/types" + utiltesting "k8s.io/client-go/util/testing" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/util/mount" - utiltesting "k8s.io/kubernetes/pkg/util/testing" "k8s.io/kubernetes/pkg/volume" volumetest "k8s.io/kubernetes/pkg/volume/testing" @@ -165,7 +165,8 @@ func TestPlugin(t *testing.T) { func TestGetByName(t *testing.T) { assert := assert.New(t) - plugMgr, _ := newInitializedVolumePlugMgr(t) + plugMgr, dir := newInitializedVolumePlugMgr(t) + defer os.RemoveAll(dir) plug, err := plugMgr.FindPluginByName(pluginName) assert.NotNil(plug, "Can't find the plugin by name") @@ -174,7 +175,8 @@ func TestGetByName(t *testing.T) { func TestCanSupport(t *testing.T) { assert := assert.New(t) - plugMgr, _ := newInitializedVolumePlugMgr(t) + plugMgr, dir := newInitializedVolumePlugMgr(t) + defer os.RemoveAll(dir) plug, err := plugMgr.FindPluginByName(pluginName) assert.NoError(err) @@ -242,7 +244,8 @@ func TestGetFlockerVolumeSource(t *testing.T) { func TestNewMounterDatasetName(t *testing.T) { assert := assert.New(t) - plugMgr, _ := newInitializedVolumePlugMgr(t) + plugMgr, dir := newInitializedVolumePlugMgr(t) + defer os.RemoveAll(dir) plug, err := plugMgr.FindPluginByName(pluginName) assert.NoError(err) @@ -263,7 +266,8 @@ func TestNewMounterDatasetName(t *testing.T) { func TestNewMounterDatasetUUID(t *testing.T) { assert := assert.New(t) - plugMgr, _ := newInitializedVolumePlugMgr(t) + plugMgr, dir := newInitializedVolumePlugMgr(t) + defer os.RemoveAll(dir) plug, err := plugMgr.FindPluginByName(pluginName) assert.NoError(err) @@ -349,7 +353,7 @@ func TestSetUpAtInternal(t *testing.T) { plug, err := plugMgr.FindPluginByName(flockerPluginName) assert.NoError(err) - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: types.UID("poduid")}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: types.UID("poduid")}} b := flockerVolumeMounter{flockerVolume: &flockerVolume{pod: pod, plugin: plug.(*flockerPlugin)}} b.client = newMockFlockerClient("dataset-id", "primary-uid", mockPath) diff --git a/vendor/k8s.io/kubernetes/pkg/volume/flocker/flocker_util_test.go b/vendor/k8s.io/kubernetes/pkg/volume/flocker/flocker_util_test.go index d10c1c14..c47ca006 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/flocker/flocker_util_test.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/flocker/flocker_util_test.go @@ -18,6 +18,7 @@ package flocker import ( "fmt" + "os" "testing" "k8s.io/kubernetes/pkg/api/v1" @@ -38,7 +39,9 @@ func TestFlockerUtil_CreateVolume(t *testing.T) { } fakeFlockerClient := newFakeFlockerClient() - provisioner := newTestableProvisioner(assert, options).(*flockerVolumeProvisioner) + dir, p := newTestableProvisioner(assert, options) + provisioner := p.(*flockerVolumeProvisioner) + defer os.RemoveAll(dir) provisioner.flockerClient = fakeFlockerClient flockerUtil := &FlockerUtil{} diff --git a/vendor/k8s.io/kubernetes/pkg/volume/flocker/flocker_volume.go b/vendor/k8s.io/kubernetes/pkg/volume/flocker/flocker_volume.go index 112eeaaf..c3b5f8cc 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/flocker/flocker_volume.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/flocker/flocker_volume.go @@ -19,6 +19,7 @@ package flocker import ( "fmt" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/volume" @@ -68,7 +69,7 @@ func (c *flockerVolumeProvisioner) Provision() (*v1.PersistentVolume, error) { } pv := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: c.options.PVName, Labels: map[string]string{}, Annotations: map[string]string{ diff --git a/vendor/k8s.io/kubernetes/pkg/volume/flocker/flocker_volume_test.go b/vendor/k8s.io/kubernetes/pkg/volume/flocker/flocker_volume_test.go index b9c19f23..8905b22e 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/flocker/flocker_volume_test.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/flocker/flocker_volume_test.go @@ -18,18 +18,19 @@ package flocker import ( "fmt" + "os" "testing" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + utiltesting "k8s.io/client-go/util/testing" "k8s.io/kubernetes/pkg/api/v1" - utiltesting "k8s.io/kubernetes/pkg/util/testing" "k8s.io/kubernetes/pkg/volume" volumetest "k8s.io/kubernetes/pkg/volume/testing" "github.com/stretchr/testify/assert" ) -func newTestableProvisioner(assert *assert.Assertions, options volume.VolumeOptions) volume.Provisioner { +func newTestableProvisioner(assert *assert.Assertions, options volume.VolumeOptions) (string, volume.Provisioner) { tmpDir, err := utiltesting.MkTmpdir("flockervolumeTest") assert.NoError(err, fmt.Sprintf("can't make a temp dir: %v", err)) @@ -41,7 +42,7 @@ func newTestableProvisioner(assert *assert.Assertions, options volume.VolumeOpti provisioner, err := plug.(*flockerPlugin).newProvisionerInternal(options, &fakeFlockerUtil{}) - return provisioner + return tmpDir, provisioner } func TestProvision(t *testing.T) { @@ -53,7 +54,8 @@ func TestProvision(t *testing.T) { PersistentVolumeReclaimPolicy: v1.PersistentVolumeReclaimDelete, } - provisioner := newTestableProvisioner(assert, options) + dir, provisioner := newTestableProvisioner(assert, options) + defer os.RemoveAll(dir) persistentSpec, err := provisioner.Provision() assert.NoError(err, "Provision() failed: ", err) @@ -81,7 +83,8 @@ func TestProvision(t *testing.T) { }, } - provisioner = newTestableProvisioner(assert, options) + dir, provisioner = newTestableProvisioner(assert, options) + defer os.RemoveAll(dir) persistentSpec, err = provisioner.Provision() assert.Error(err, "Provision() did not fail with Parameters specified") @@ -92,8 +95,8 @@ func TestProvision(t *testing.T) { PersistentVolumeReclaimPolicy: v1.PersistentVolumeReclaimDelete, } - provisioner = newTestableProvisioner(assert, options) + dir, provisioner = newTestableProvisioner(assert, options) + defer os.RemoveAll(dir) persistentSpec, err = provisioner.Provision() assert.Error(err, "Provision() did not fail with Selector specified") - } diff --git a/vendor/k8s.io/kubernetes/pkg/volume/gce_pd/BUILD b/vendor/k8s.io/kubernetes/pkg/volume/gce_pd/BUILD index 9ba1e068..949df811 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/gce_pd/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/volume/gce_pd/BUILD @@ -28,6 +28,7 @@ go_library( "//pkg/volume:go_default_library", "//pkg/volume/util:go_default_library", "//vendor:github.com/golang/glog", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/sets", ], @@ -45,11 +46,12 @@ go_test( "//pkg/api/v1:go_default_library", "//pkg/client/clientset_generated/clientset/fake:go_default_library", "//pkg/util/mount:go_default_library", - "//pkg/util/testing:go_default_library", "//pkg/volume:go_default_library", "//pkg/volume/testing:go_default_library", "//vendor:github.com/golang/glog", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", + "//vendor:k8s.io/client-go/util/testing", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/volume/gce_pd/OWNERS b/vendor/k8s.io/kubernetes/pkg/volume/gce_pd/OWNERS index 4a346480..6588277a 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/gce_pd/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/volume/gce_pd/OWNERS @@ -1,3 +1,14 @@ -maintainers: +approvers: - saad-ali - thockin +reviewers: +- thockin +- smarterclayton +- bprashanth +- pmorie +- saad-ali +- justinsb +- jsafrane +- markturansky +- jingxu97 +- matchstick diff --git a/vendor/k8s.io/kubernetes/pkg/volume/gce_pd/gce_pd.go b/vendor/k8s.io/kubernetes/pkg/volume/gce_pd/gce_pd.go index 78d629d9..74224d31 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/gce_pd/gce_pd.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/gce_pd/gce_pd.go @@ -23,6 +23,7 @@ import ( "strconv" "github.com/golang/glog" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" @@ -371,7 +372,7 @@ func (c *gcePersistentDiskProvisioner) Provision() (*v1.PersistentVolume, error) } pv := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: c.options.PVName, Labels: map[string]string{}, Annotations: map[string]string{ diff --git a/vendor/k8s.io/kubernetes/pkg/volume/gce_pd/gce_pd_test.go b/vendor/k8s.io/kubernetes/pkg/volume/gce_pd/gce_pd_test.go index 03afdfda..5cfe2950 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/gce_pd/gce_pd_test.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/gce_pd/gce_pd_test.go @@ -22,11 +22,12 @@ import ( "path" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" + utiltesting "k8s.io/client-go/util/testing" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" "k8s.io/kubernetes/pkg/util/mount" - utiltesting "k8s.io/kubernetes/pkg/util/testing" "k8s.io/kubernetes/pkg/volume" volumetest "k8s.io/kubernetes/pkg/volume/testing" ) @@ -209,7 +210,7 @@ func TestPlugin(t *testing.T) { func TestPersistentClaimReadOnlyFlag(t *testing.T) { pv := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pvA", }, Spec: v1.PersistentVolumeSpec{ @@ -223,7 +224,7 @@ func TestPersistentClaimReadOnlyFlag(t *testing.T) { } claim := &v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "claimA", Namespace: "nsA", }, @@ -248,7 +249,7 @@ func TestPersistentClaimReadOnlyFlag(t *testing.T) { // readOnly bool is supplied by persistent-claim volume source when its mounter creates other volumes spec := volume.NewSpecFromPersistentVolume(pv, true) - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: types.UID("poduid")}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: types.UID("poduid")}} mounter, _ := plug.NewMounter(spec, pod, volume.VolumeOptions{}) if !mounter.GetAttributes().ReadOnly { diff --git a/vendor/k8s.io/kubernetes/pkg/volume/git_repo/BUILD b/vendor/k8s.io/kubernetes/pkg/volume/git_repo/BUILD index 269dc867..4797b461 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/git_repo/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/volume/git_repo/BUILD @@ -36,6 +36,7 @@ go_test( "//pkg/volume:go_default_library", "//pkg/volume/empty_dir:go_default_library", "//pkg/volume/testing:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/volume/git_repo/OWNERS b/vendor/k8s.io/kubernetes/pkg/volume/git_repo/OWNERS index 0d97d126..9267fe63 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/git_repo/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/volume/git_repo/OWNERS @@ -1,2 +1,18 @@ -maintainers: +approvers: - thockin +- saad-ali +reviewers: +- thockin +- smarterclayton +- deads2k +- brendandburns +- derekwaynecarr +- bprashanth +- pmorie +- saad-ali +- justinsb +- jsafrane +- rootfs +- jingxu97 +- rkouj +- msau42 diff --git a/vendor/k8s.io/kubernetes/pkg/volume/git_repo/git_repo_test.go b/vendor/k8s.io/kubernetes/pkg/volume/git_repo/git_repo_test.go index 58f789fb..354d4b94 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/git_repo/git_repo_test.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/git_repo/git_repo_test.go @@ -25,6 +25,7 @@ import ( "strings" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/util/exec" @@ -231,7 +232,7 @@ func doTestPlugin(scenario struct { fmt.Errorf("Can't find the plugin by name")) return allErrs } - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: types.UID("poduid")}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: types.UID("poduid")}} mounter, err := plug.NewMounter(volume.NewSpecFromVolume(scenario.vol), pod, volume.VolumeOptions{}) if err != nil { diff --git a/vendor/k8s.io/kubernetes/pkg/volume/glusterfs/BUILD b/vendor/k8s.io/kubernetes/pkg/volume/glusterfs/BUILD index 27f8302f..63ce7f8d 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/glusterfs/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/volume/glusterfs/BUILD @@ -52,12 +52,13 @@ go_test( "//pkg/client/testing/core:go_default_library", "//pkg/util/exec:go_default_library", "//pkg/util/mount:go_default_library", - "//pkg/util/testing:go_default_library", "//pkg/volume:go_default_library", "//pkg/volume/testing:go_default_library", "//vendor:github.com/heketi/heketi/pkg/glusterfs/api", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/types", + "//vendor:k8s.io/client-go/util/testing", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/volume/glusterfs/OWNERS b/vendor/k8s.io/kubernetes/pkg/volume/glusterfs/OWNERS index 68ed9176..12b0da7b 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/glusterfs/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/volume/glusterfs/OWNERS @@ -1,2 +1,19 @@ -assignees: +approvers: - rootfs +- saad-ali +- jingxu97 +reviewers: +- thockin +- smarterclayton +- deads2k +- brendandburns +- derekwaynecarr +- bprashanth +- pmorie +- saad-ali +- justinsb +- jsafrane +- rootfs +- jingxu97 +- rkouj +- msau42 diff --git a/vendor/k8s.io/kubernetes/pkg/volume/glusterfs/glusterfs.go b/vendor/k8s.io/kubernetes/pkg/volume/glusterfs/glusterfs.go index f7fd683e..9b838eb7 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/glusterfs/glusterfs.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/glusterfs/glusterfs.go @@ -175,7 +175,7 @@ func (plugin *glusterfsPlugin) newUnmounterInternal(volName string, podUID types return &glusterfsUnmounter{&glusterfs{ volName: volName, mounter: mounter, - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: podUID}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: podUID}}, plugin: plugin, }}, nil } @@ -456,7 +456,7 @@ func (p *glusterfsPlugin) collectGids(className string, gidTable *MinMaxAllocato if kubeClient == nil { return fmt.Errorf("glusterfs: failed to get kube client when collecting gids") } - pvList, err := kubeClient.Core().PersistentVolumes().List(v1.ListOptions{LabelSelector: labels.Everything().String()}) + pvList, err := kubeClient.Core().PersistentVolumes().List(metav1.ListOptions{LabelSelector: labels.Everything().String()}) if err != nil { glog.Errorf("glusterfs: failed to get existing persistent volumes") return err @@ -771,7 +771,7 @@ func (p *glusterfsVolumeProvisioner) createEndpointService(namespace string, epS addrlist[i].IP = v } endpoint = &v1.Endpoints{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: namespace, Name: epServiceName, Labels: map[string]string{ @@ -797,7 +797,7 @@ func (p *glusterfsVolumeProvisioner) createEndpointService(namespace string, epS return nil, nil, fmt.Errorf("error creating endpoint: %v", err) } service = &v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: epServiceName, Namespace: namespace, Labels: map[string]string{ diff --git a/vendor/k8s.io/kubernetes/pkg/volume/glusterfs/glusterfs_test.go b/vendor/k8s.io/kubernetes/pkg/volume/glusterfs/glusterfs_test.go index d03a6822..a5fbe56f 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/glusterfs/glusterfs_test.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/glusterfs/glusterfs_test.go @@ -23,14 +23,15 @@ import ( "testing" gapi "github.com/heketi/heketi/pkg/glusterfs/api" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" + utiltesting "k8s.io/client-go/util/testing" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" "k8s.io/kubernetes/pkg/client/testing/core" "k8s.io/kubernetes/pkg/util/exec" "k8s.io/kubernetes/pkg/util/mount" - utiltesting "k8s.io/kubernetes/pkg/util/testing" "k8s.io/kubernetes/pkg/volume" volumetest "k8s.io/kubernetes/pkg/volume/testing" ) @@ -100,7 +101,7 @@ func doTestPlugin(t *testing.T, spec *volume.Spec) { if err != nil { t.Errorf("Can't find the plugin by name") } - ep := &v1.Endpoints{ObjectMeta: v1.ObjectMeta{Name: "foo"}, Subsets: []v1.EndpointSubset{{ + ep := &v1.Endpoints{ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Subsets: []v1.EndpointSubset{{ Addresses: []v1.EndpointAddress{{IP: "127.0.0.1"}}}}} var fcmd exec.FakeCmd fcmd = exec.FakeCmd{ @@ -116,7 +117,7 @@ func doTestPlugin(t *testing.T, spec *volume.Spec) { func(cmd string, args ...string) exec.Cmd { return exec.InitFakeCmd(&fcmd, cmd, args...) }, }, } - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: types.UID("poduid")}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: types.UID("poduid")}} mounter, err := plug.(*glusterfsPlugin).newMounterInternal(spec, ep, pod, &mount.FakeMounter{}, &fake) volumePath := mounter.GetPath() if err != nil { @@ -167,7 +168,7 @@ func TestPluginVolume(t *testing.T) { func TestPluginPersistentVolume(t *testing.T) { vol := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "vol1", }, Spec: v1.PersistentVolumeSpec{ @@ -188,7 +189,7 @@ func TestPersistentClaimReadOnlyFlag(t *testing.T) { defer os.RemoveAll(tmpDir) pv := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pvA", }, Spec: v1.PersistentVolumeSpec{ @@ -202,7 +203,7 @@ func TestPersistentClaimReadOnlyFlag(t *testing.T) { } claim := &v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "claimA", Namespace: "nsA", }, @@ -215,7 +216,7 @@ func TestPersistentClaimReadOnlyFlag(t *testing.T) { } ep := &v1.Endpoints{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "nsA", Name: "ep", }, @@ -233,7 +234,7 @@ func TestPersistentClaimReadOnlyFlag(t *testing.T) { // readOnly bool is supplied by persistent-claim volume source when its mounter creates other volumes spec := volume.NewSpecFromPersistentVolume(pv, true) - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{Namespace: "nsA", UID: types.UID("poduid")}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Namespace: "nsA", UID: types.UID("poduid")}} mounter, _ := plug.NewMounter(spec, pod, volume.VolumeOptions{}) if !mounter.GetAttributes().ReadOnly { diff --git a/vendor/k8s.io/kubernetes/pkg/volume/host_path/BUILD b/vendor/k8s.io/kubernetes/pkg/volume/host_path/BUILD index e980c7b0..8429e9f1 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/host_path/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/volume/host_path/BUILD @@ -20,6 +20,7 @@ go_library( "//pkg/api/v1:go_default_library", "//pkg/util/uuid:go_default_library", "//pkg/volume:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", ], ) @@ -37,6 +38,7 @@ go_test( "//pkg/util/uuid:go_default_library", "//pkg/volume:go_default_library", "//pkg/volume/testing:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/volume/host_path/OWNERS b/vendor/k8s.io/kubernetes/pkg/volume/host_path/OWNERS index 4a346480..fbac628a 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/host_path/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/volume/host_path/OWNERS @@ -1,3 +1,19 @@ -maintainers: +approvers: +- pmorie - saad-ali - thockin +reviewers: +- thockin +- smarterclayton +- deads2k +- brendandburns +- derekwaynecarr +- bprashanth +- pmorie +- saad-ali +- justinsb +- jsafrane +- rootfs +- jingxu97 +- rkouj +- msau42 diff --git a/vendor/k8s.io/kubernetes/pkg/volume/host_path/host_path.go b/vendor/k8s.io/kubernetes/pkg/volume/host_path/host_path.go index 48e7c04a..c39cb3b4 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/host_path/host_path.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/host_path/host_path.go @@ -21,6 +21,7 @@ import ( "os" "regexp" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" @@ -275,7 +276,7 @@ func (r *hostPathProvisioner) Provision() (*v1.PersistentVolume, error) { capacity := r.options.PVC.Spec.Resources.Requests[v1.ResourceName(v1.ResourceStorage)] pv := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: r.options.PVName, Annotations: map[string]string{ "kubernetes.io/createdby": "hostpath-dynamic-provisioner", diff --git a/vendor/k8s.io/kubernetes/pkg/volume/host_path/host_path_test.go b/vendor/k8s.io/kubernetes/pkg/volume/host_path/host_path_test.go index 422ecae8..c759c0b2 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/host_path/host_path_test.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/host_path/host_path_test.go @@ -23,6 +23,7 @@ import ( "os" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" @@ -200,7 +201,7 @@ func TestPlugin(t *testing.T) { Name: "vol1", VolumeSource: v1.VolumeSource{HostPath: &v1.HostPathVolumeSource{Path: "/vol1"}}, } - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: types.UID("poduid")}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: types.UID("poduid")}} mounter, err := plug.NewMounter(volume.NewSpecFromVolume(spec), pod, volume.VolumeOptions{}) if err != nil { t.Errorf("Failed to make a new Mounter: %v", err) @@ -233,7 +234,7 @@ func TestPlugin(t *testing.T) { func TestPersistentClaimReadOnlyFlag(t *testing.T) { pv := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pvA", }, Spec: v1.PersistentVolumeSpec{ @@ -247,7 +248,7 @@ func TestPersistentClaimReadOnlyFlag(t *testing.T) { } claim := &v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "claimA", Namespace: "nsA", }, @@ -267,7 +268,7 @@ func TestPersistentClaimReadOnlyFlag(t *testing.T) { // readOnly bool is supplied by persistent-claim volume source when its mounter creates other volumes spec := volume.NewSpecFromPersistentVolume(pv, true) - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: types.UID("poduid")}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: types.UID("poduid")}} mounter, _ := plug.NewMounter(spec, pod, volume.VolumeOptions{}) if !mounter.GetAttributes().ReadOnly { diff --git a/vendor/k8s.io/kubernetes/pkg/volume/iscsi/BUILD b/vendor/k8s.io/kubernetes/pkg/volume/iscsi/BUILD index 17727c16..d2406fde 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/iscsi/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/volume/iscsi/BUILD @@ -41,10 +41,11 @@ go_test( "//pkg/api/v1:go_default_library", "//pkg/client/clientset_generated/clientset/fake:go_default_library", "//pkg/util/mount:go_default_library", - "//pkg/util/testing:go_default_library", "//pkg/volume:go_default_library", "//pkg/volume/testing:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", + "//vendor:k8s.io/client-go/util/testing", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/volume/iscsi/OWNERS b/vendor/k8s.io/kubernetes/pkg/volume/iscsi/OWNERS index 68ed9176..a729137b 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/iscsi/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/volume/iscsi/OWNERS @@ -1,2 +1,19 @@ -assignees: +approvers: +- pmorie +- saad-ali - rootfs +reviewers: +- thockin +- smarterclayton +- deads2k +- brendandburns +- derekwaynecarr +- bprashanth +- pmorie +- saad-ali +- justinsb +- jsafrane +- rootfs +- jingxu97 +- rkouj +- msau42 diff --git a/vendor/k8s.io/kubernetes/pkg/volume/iscsi/iscsi_test.go b/vendor/k8s.io/kubernetes/pkg/volume/iscsi/iscsi_test.go index 0f314529..596a85d3 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/iscsi/iscsi_test.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/iscsi/iscsi_test.go @@ -21,11 +21,12 @@ import ( "os" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" + utiltesting "k8s.io/client-go/util/testing" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" "k8s.io/kubernetes/pkg/util/mount" - utiltesting "k8s.io/kubernetes/pkg/util/testing" "k8s.io/kubernetes/pkg/volume" volumetest "k8s.io/kubernetes/pkg/volume/testing" ) @@ -215,7 +216,7 @@ func TestPluginVolume(t *testing.T) { func TestPluginPersistentVolume(t *testing.T) { vol := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "vol1", }, Spec: v1.PersistentVolumeSpec{ @@ -240,7 +241,7 @@ func TestPersistentClaimReadOnlyFlag(t *testing.T) { defer os.RemoveAll(tmpDir) pv := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pvA", }, Spec: v1.PersistentVolumeSpec{ @@ -259,7 +260,7 @@ func TestPersistentClaimReadOnlyFlag(t *testing.T) { } claim := &v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "claimA", Namespace: "nsA", }, @@ -279,7 +280,7 @@ func TestPersistentClaimReadOnlyFlag(t *testing.T) { // readOnly bool is supplied by persistent-claim volume source when its mounter creates other volumes spec := volume.NewSpecFromPersistentVolume(pv, true) - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: types.UID("poduid")}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: types.UID("poduid")}} mounter, _ := plug.NewMounter(spec, pod, volume.VolumeOptions{}) if !mounter.GetAttributes().ReadOnly { diff --git a/vendor/k8s.io/kubernetes/pkg/volume/metrics_du_test.go b/vendor/k8s.io/kubernetes/pkg/volume/metrics_du_test.go index a866897c..454564ac 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/metrics_du_test.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/metrics_du_test.go @@ -24,7 +24,7 @@ import ( "path/filepath" "testing" - utiltesting "k8s.io/kubernetes/pkg/util/testing" + utiltesting "k8s.io/client-go/util/testing" . "k8s.io/kubernetes/pkg/volume" volumetest "k8s.io/kubernetes/pkg/volume/testing" ) diff --git a/vendor/k8s.io/kubernetes/pkg/volume/metrics_statfs_test.go b/vendor/k8s.io/kubernetes/pkg/volume/metrics_statfs_test.go index 9418b4f1..369b9621 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/metrics_statfs_test.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/metrics_statfs_test.go @@ -20,7 +20,7 @@ import ( "os" "testing" - utiltesting "k8s.io/kubernetes/pkg/util/testing" + utiltesting "k8s.io/client-go/util/testing" ) func TestGetMetricsStatFS(t *testing.T) { diff --git a/vendor/k8s.io/kubernetes/pkg/volume/nfs/BUILD b/vendor/k8s.io/kubernetes/pkg/volume/nfs/BUILD index 79388b6f..5e3eb5c2 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/nfs/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/volume/nfs/BUILD @@ -24,6 +24,7 @@ go_library( "//pkg/volume:go_default_library", "//pkg/volume/util:go_default_library", "//vendor:github.com/golang/glog", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", ], ) @@ -37,10 +38,11 @@ go_test( "//pkg/api/v1:go_default_library", "//pkg/client/clientset_generated/clientset/fake:go_default_library", "//pkg/util/mount:go_default_library", - "//pkg/util/testing:go_default_library", "//pkg/volume:go_default_library", "//pkg/volume/testing:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", + "//vendor:k8s.io/client-go/util/testing", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/volume/nfs/OWNERS b/vendor/k8s.io/kubernetes/pkg/volume/nfs/OWNERS index 68ed9176..84179312 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/nfs/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/volume/nfs/OWNERS @@ -1,2 +1,20 @@ -assignees: +approvers: - rootfs +- saad-ali +- jingxu97 +reviewers: +- sjenning +- thockin +- smarterclayton +- deads2k +- brendandburns +- derekwaynecarr +- bprashanth +- pmorie +- saad-ali +- justinsb +- jsafrane +- rootfs +- jingxu97 +- rkouj +- msau42 diff --git a/vendor/k8s.io/kubernetes/pkg/volume/nfs/nfs.go b/vendor/k8s.io/kubernetes/pkg/volume/nfs/nfs.go index ae307aba..233db97e 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/nfs/nfs.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/nfs/nfs.go @@ -22,6 +22,7 @@ import ( "runtime" "github.com/golang/glog" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" @@ -127,7 +128,7 @@ func (plugin *nfsPlugin) newUnmounterInternal(volName string, podUID types.UID, return &nfsUnmounter{&nfs{ volName: volName, mounter: mounter, - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: podUID}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: podUID}}, plugin: plugin, }}, nil } diff --git a/vendor/k8s.io/kubernetes/pkg/volume/nfs/nfs_test.go b/vendor/k8s.io/kubernetes/pkg/volume/nfs/nfs_test.go index 6504b2ec..ab136a0a 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/nfs/nfs_test.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/nfs/nfs_test.go @@ -21,11 +21,12 @@ import ( "os" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" + utiltesting "k8s.io/client-go/util/testing" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" "k8s.io/kubernetes/pkg/util/mount" - utiltesting "k8s.io/kubernetes/pkg/util/testing" "k8s.io/kubernetes/pkg/volume" volumetest "k8s.io/kubernetes/pkg/volume/testing" ) @@ -139,7 +140,7 @@ func doTestPlugin(t *testing.T, spec *volume.Spec) { t.Errorf("Can't find the plugin by name") } fake := &mount.FakeMounter{} - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: types.UID("poduid")}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: types.UID("poduid")}} mounter, err := plug.(*nfsPlugin).newMounterInternal(spec, pod, fake) volumePath := mounter.GetPath() if err != nil { @@ -211,7 +212,7 @@ func TestPluginVolume(t *testing.T) { func TestPluginPersistentVolume(t *testing.T) { vol := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "vol1", }, Spec: v1.PersistentVolumeSpec{ @@ -232,7 +233,7 @@ func TestPersistentClaimReadOnlyFlag(t *testing.T) { defer os.RemoveAll(tmpDir) pv := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pvA", }, Spec: v1.PersistentVolumeSpec{ @@ -246,7 +247,7 @@ func TestPersistentClaimReadOnlyFlag(t *testing.T) { } claim := &v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "claimA", Namespace: "nsA", }, @@ -266,7 +267,7 @@ func TestPersistentClaimReadOnlyFlag(t *testing.T) { // readOnly bool is supplied by persistent-claim volume source when its mounter creates other volumes spec := volume.NewSpecFromPersistentVolume(pv, true) - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: types.UID("poduid")}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: types.UID("poduid")}} mounter, _ := plug.NewMounter(spec, pod, volume.VolumeOptions{}) if !mounter.GetAttributes().ReadOnly { diff --git a/vendor/k8s.io/kubernetes/pkg/volume/photon_pd/BUILD b/vendor/k8s.io/kubernetes/pkg/volume/photon_pd/BUILD index e9e9d16d..c964b668 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/photon_pd/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/volume/photon_pd/BUILD @@ -27,6 +27,7 @@ go_library( "//pkg/volume:go_default_library", "//pkg/volume/util:go_default_library", "//vendor:github.com/golang/glog", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", ], ) @@ -43,11 +44,11 @@ go_test( "//pkg/api/v1:go_default_library", "//pkg/cloudprovider/providers/photon:go_default_library", "//pkg/util/mount:go_default_library", - "//pkg/util/testing:go_default_library", "//pkg/volume:go_default_library", "//pkg/volume/testing:go_default_library", "//vendor:github.com/golang/glog", "//vendor:k8s.io/apimachinery/pkg/types", + "//vendor:k8s.io/client-go/util/testing", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/volume/photon_pd/photon_pd.go b/vendor/k8s.io/kubernetes/pkg/volume/photon_pd/photon_pd.go index 942481f1..a935a7b6 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/photon_pd/photon_pd.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/photon_pd/photon_pd.go @@ -22,6 +22,7 @@ import ( "path" "github.com/golang/glog" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" @@ -339,7 +340,7 @@ func (p *photonPersistentDiskProvisioner) Provision() (*v1.PersistentVolume, err } pv := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: p.options.PVName, Labels: map[string]string{}, Annotations: map[string]string{ diff --git a/vendor/k8s.io/kubernetes/pkg/volume/photon_pd/photon_pd_test.go b/vendor/k8s.io/kubernetes/pkg/volume/photon_pd/photon_pd_test.go index 86b7df8d..2d843542 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/photon_pd/photon_pd_test.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/photon_pd/photon_pd_test.go @@ -23,9 +23,9 @@ import ( "testing" "k8s.io/apimachinery/pkg/types" + utiltesting "k8s.io/client-go/util/testing" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/util/mount" - utiltesting "k8s.io/kubernetes/pkg/util/testing" "k8s.io/kubernetes/pkg/volume" volumetest "k8s.io/kubernetes/pkg/volume/testing" ) diff --git a/vendor/k8s.io/kubernetes/pkg/volume/plugins.go b/vendor/k8s.io/kubernetes/pkg/volume/plugins.go index f77b63ac..f63b8993 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/plugins.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/plugins.go @@ -23,6 +23,7 @@ import ( "sync" "github.com/golang/glog" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" utilerrors "k8s.io/apimachinery/pkg/util/errors" "k8s.io/apimachinery/pkg/util/validation" @@ -212,8 +213,11 @@ type VolumeHost interface { // Returns host IP or nil in the case of error. GetHostIP() (net.IP, error) - // Returns node allocatable + // Returns node allocatable. GetNodeAllocatable() (v1.ResourceList, error) + + // Returns a function that returns a secret. + GetSecretFunc() func(namespace, name string) (*v1.Secret, error) } // VolumePluginMgr tracks registered plugins. @@ -529,9 +533,9 @@ func (pm *VolumePluginMgr) FindAttachablePluginByName(name string) (AttachableVo func NewPersistentVolumeRecyclerPodTemplate() *v1.Pod { timeout := int64(60) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ GenerateName: "pv-recycler-", - Namespace: v1.NamespaceDefault, + Namespace: metav1.NamespaceDefault, }, Spec: v1.PodSpec{ ActiveDeadlineSeconds: &timeout, diff --git a/vendor/k8s.io/kubernetes/pkg/volume/plugins_test.go b/vendor/k8s.io/kubernetes/pkg/volume/plugins_test.go index da154992..d08f555a 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/plugins_test.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/plugins_test.go @@ -19,6 +19,7 @@ package volume import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api/v1" ) @@ -38,7 +39,7 @@ func TestSpecSourceConverters(t *testing.T) { } pv := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{Name: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar"}, Spec: v1.PersistentVolumeSpec{ PersistentVolumeSource: v1.PersistentVolumeSource{AWSElasticBlockStore: &v1.AWSElasticBlockStoreVolumeSource{}}, }, diff --git a/vendor/k8s.io/kubernetes/pkg/volume/quobyte/BUILD b/vendor/k8s.io/kubernetes/pkg/volume/quobyte/BUILD index f121b0b8..ea356a92 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/quobyte/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/volume/quobyte/BUILD @@ -27,6 +27,7 @@ go_library( "//vendor:github.com/golang/glog", "//vendor:github.com/pborman/uuid", "//vendor:github.com/quobyte/api", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", ], ) @@ -40,10 +41,11 @@ go_test( "//pkg/api/v1:go_default_library", "//pkg/client/clientset_generated/clientset/fake:go_default_library", "//pkg/util/mount:go_default_library", - "//pkg/util/testing:go_default_library", "//pkg/volume:go_default_library", "//pkg/volume/testing:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", + "//vendor:k8s.io/client-go/util/testing", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/volume/quobyte/OWNERS b/vendor/k8s.io/kubernetes/pkg/volume/quobyte/OWNERS index 3b914ad3..1df5e081 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/quobyte/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/volume/quobyte/OWNERS @@ -1,3 +1,19 @@ -maintainers: +approvers: +- rootfs +- saad-ali +reviewers: - johscheuer -- quofelix +- thockin +- smarterclayton +- deads2k +- brendandburns +- derekwaynecarr +- bprashanth +- pmorie +- saad-ali +- justinsb +- jsafrane +- rootfs +- jingxu97 +- rkouj +- msau42 diff --git a/vendor/k8s.io/kubernetes/pkg/volume/quobyte/quobyte.go b/vendor/k8s.io/kubernetes/pkg/volume/quobyte/quobyte.go index 9a5dcdf8..8e827bb7 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/quobyte/quobyte.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/quobyte/quobyte.go @@ -24,6 +24,7 @@ import ( "github.com/golang/glog" "github.com/pborman/uuid" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" @@ -182,7 +183,7 @@ func (plugin *quobytePlugin) newUnmounterInternal(volName string, podUID types.U &quobyte{ volName: volName, mounter: mounter, - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: podUID}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: podUID}}, plugin: plugin, }, }, nil diff --git a/vendor/k8s.io/kubernetes/pkg/volume/quobyte/quobyte_test.go b/vendor/k8s.io/kubernetes/pkg/volume/quobyte/quobyte_test.go index f37d2e15..0a7b6320 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/quobyte/quobyte_test.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/quobyte/quobyte_test.go @@ -21,11 +21,12 @@ import ( "os" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" + utiltesting "k8s.io/client-go/util/testing" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" "k8s.io/kubernetes/pkg/util/mount" - utiltesting "k8s.io/kubernetes/pkg/util/testing" "k8s.io/kubernetes/pkg/volume" volumetest "k8s.io/kubernetes/pkg/volume/testing" ) @@ -96,7 +97,7 @@ func doTestPlugin(t *testing.T, spec *volume.Spec) { t.Errorf("Can't find the plugin by name") } - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: types.UID("poduid")}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: types.UID("poduid")}} mounter, err := plug.(*quobytePlugin).newMounterInternal(spec, pod, &mount.FakeMounter{}) volumePath := mounter.GetPath() if err != nil { @@ -137,7 +138,7 @@ func TestPluginVolume(t *testing.T) { func TestPluginPersistentVolume(t *testing.T) { vol := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "vol1", }, Spec: v1.PersistentVolumeSpec{ @@ -152,7 +153,7 @@ func TestPluginPersistentVolume(t *testing.T) { func TestPersistentClaimReadOnlyFlag(t *testing.T) { pv := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pvA", }, Spec: v1.PersistentVolumeSpec{ @@ -166,7 +167,7 @@ func TestPersistentClaimReadOnlyFlag(t *testing.T) { } claim := &v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "claimA", Namespace: "nsA", }, @@ -191,7 +192,7 @@ func TestPersistentClaimReadOnlyFlag(t *testing.T) { // readOnly bool is supplied by persistent-claim volume source when its mounter creates other volumes spec := volume.NewSpecFromPersistentVolume(pv, true) - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: types.UID("poduid")}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: types.UID("poduid")}} mounter, _ := plug.NewMounter(spec, pod, volume.VolumeOptions{}) if !mounter.GetAttributes().ReadOnly { diff --git a/vendor/k8s.io/kubernetes/pkg/volume/rbd/BUILD b/vendor/k8s.io/kubernetes/pkg/volume/rbd/BUILD index 48d628d0..285efc7c 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/rbd/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/volume/rbd/BUILD @@ -42,10 +42,11 @@ go_test( "//pkg/api/v1:go_default_library", "//pkg/client/clientset_generated/clientset/fake:go_default_library", "//pkg/util/mount:go_default_library", - "//pkg/util/testing:go_default_library", "//pkg/volume:go_default_library", "//pkg/volume/testing:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", + "//vendor:k8s.io/client-go/util/testing", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/volume/rbd/OWNERS b/vendor/k8s.io/kubernetes/pkg/volume/rbd/OWNERS index 68ed9176..874ac8fd 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/rbd/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/volume/rbd/OWNERS @@ -1,2 +1,18 @@ -assignees: +approvers: - rootfs +reviewers: +- sjenning +- thockin +- smarterclayton +- deads2k +- brendandburns +- derekwaynecarr +- bprashanth +- pmorie +- saad-ali +- justinsb +- jsafrane +- rootfs +- jingxu97 +- rkouj +- msau42 diff --git a/vendor/k8s.io/kubernetes/pkg/volume/rbd/rbd_test.go b/vendor/k8s.io/kubernetes/pkg/volume/rbd/rbd_test.go index 48266a22..3ac2f0f3 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/rbd/rbd_test.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/rbd/rbd_test.go @@ -21,11 +21,12 @@ import ( "os" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" + utiltesting "k8s.io/client-go/util/testing" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" "k8s.io/kubernetes/pkg/util/mount" - utiltesting "k8s.io/kubernetes/pkg/util/testing" "k8s.io/kubernetes/pkg/volume" volumetest "k8s.io/kubernetes/pkg/volume/testing" ) @@ -169,7 +170,7 @@ func TestPluginVolume(t *testing.T) { } func TestPluginPersistentVolume(t *testing.T) { vol := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "vol1", }, Spec: v1.PersistentVolumeSpec{ @@ -194,7 +195,7 @@ func TestPersistentClaimReadOnlyFlag(t *testing.T) { defer os.RemoveAll(tmpDir) pv := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pvA", }, Spec: v1.PersistentVolumeSpec{ @@ -212,7 +213,7 @@ func TestPersistentClaimReadOnlyFlag(t *testing.T) { } claim := &v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "claimA", Namespace: "nsA", }, @@ -232,7 +233,7 @@ func TestPersistentClaimReadOnlyFlag(t *testing.T) { // readOnly bool is supplied by persistent-claim volume source when its mounter creates other volumes spec := volume.NewSpecFromPersistentVolume(pv, true) - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{UID: types.UID("poduid")}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: types.UID("poduid")}} mounter, _ := plug.NewMounter(spec, pod, volume.VolumeOptions{}) if !mounter.GetAttributes().ReadOnly { diff --git a/vendor/k8s.io/kubernetes/pkg/volume/secret/BUILD b/vendor/k8s.io/kubernetes/pkg/volume/secret/BUILD index 2cfcf0aa..2f26e3c2 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/secret/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/volume/secret/BUILD @@ -23,6 +23,7 @@ go_library( "//pkg/volume:go_default_library", "//pkg/volume/util:go_default_library", "//vendor:github.com/golang/glog", + "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", ], @@ -42,6 +43,7 @@ go_test( "//pkg/volume/testing:go_default_library", "//pkg/volume/util:go_default_library", "//vendor:github.com/stretchr/testify/assert", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/volume/secret/OWNERS b/vendor/k8s.io/kubernetes/pkg/volume/secret/OWNERS index 87269d78..d8e2f68d 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/secret/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/volume/secret/OWNERS @@ -1,2 +1,23 @@ -maintainers: +approvers: - pmorie +- saad-ali +- thockin +- matchstick +reviewers: +- ivan4th +- rata +- sjenning +- thockin +- smarterclayton +- deads2k +- brendandburns +- derekwaynecarr +- bprashanth +- pmorie +- saad-ali +- justinsb +- jsafrane +- rootfs +- jingxu97 +- rkouj +- msau42 diff --git a/vendor/k8s.io/kubernetes/pkg/volume/secret/secret.go b/vendor/k8s.io/kubernetes/pkg/volume/secret/secret.go index 7daf0d43..f3af74db 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/secret/secret.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/secret/secret.go @@ -22,6 +22,7 @@ import ( "runtime" "github.com/golang/glog" + "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api/v1" @@ -43,7 +44,8 @@ const ( // secretPlugin implements the VolumePlugin interface. type secretPlugin struct { - host volume.VolumeHost + host volume.VolumeHost + getSecret func(namespace, name string) (*v1.Secret, error) } var _ volume.VolumePlugin = &secretPlugin{} @@ -60,6 +62,7 @@ func getPath(uid types.UID, volName string, host volume.VolumeHost) string { func (plugin *secretPlugin) Init(host volume.VolumeHost) error { plugin.host = host + plugin.getSecret = host.GetSecretFunc() return nil } @@ -94,9 +97,10 @@ func (plugin *secretPlugin) NewMounter(spec *volume.Spec, pod *v1.Pod, opts volu plugin.host.GetWriter(), volume.NewCachedMetrics(volume.NewMetricsDu(getPath(pod.UID, spec.Name(), plugin.host))), }, - source: *spec.Volume.Secret, - pod: *pod, - opts: &opts, + source: *spec.Volume.Secret, + pod: *pod, + opts: &opts, + getSecret: plugin.getSecret, }, nil } @@ -145,9 +149,10 @@ func (sv *secretVolume) GetPath() string { type secretVolumeMounter struct { *secretVolume - source v1.SecretVolumeSource - pod v1.Pod - opts *volume.VolumeOptions + source v1.SecretVolumeSource + pod v1.Pod + opts *volume.VolumeOptions + getSecret func(namespace, name string) (*v1.Secret, error) } var _ volume.Mounter = &secretVolumeMounter{} @@ -188,15 +193,19 @@ func (b *secretVolumeMounter) SetUpAt(dir string, fsGroup *int64) error { return err } - kubeClient := b.plugin.host.GetKubeClient() - if kubeClient == nil { - return fmt.Errorf("Cannot setup secret volume %v because kube client is not configured", b.volName) - } - - secret, err := kubeClient.Core().Secrets(b.pod.Namespace).Get(b.source.SecretName, metav1.GetOptions{}) + optional := b.source.Optional != nil && *b.source.Optional + secret, err := b.getSecret(b.pod.Namespace, b.source.SecretName) if err != nil { - glog.Errorf("Couldn't get secret %v/%v", b.pod.Namespace, b.source.SecretName) - return err + if !(errors.IsNotFound(err) && optional) { + glog.Errorf("Couldn't get secret %v/%v", b.pod.Namespace, b.source.SecretName) + return err + } + secret = &v1.Secret{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: b.pod.Namespace, + Name: b.source.SecretName, + }, + } } totalBytes := totalSecretBytes(secret) @@ -206,7 +215,7 @@ func (b *secretVolumeMounter) SetUpAt(dir string, fsGroup *int64) error { len(secret.Data), totalBytes) - payload, err := makePayload(b.source.Items, secret, b.source.DefaultMode) + payload, err := makePayload(b.source.Items, secret, b.source.DefaultMode, optional) if err != nil { return err } @@ -233,7 +242,7 @@ func (b *secretVolumeMounter) SetUpAt(dir string, fsGroup *int64) error { return nil } -func makePayload(mappings []v1.KeyToPath, secret *v1.Secret, defaultMode *int32) (map[string]volumeutil.FileProjection, error) { +func makePayload(mappings []v1.KeyToPath, secret *v1.Secret, defaultMode *int32, optional bool) (map[string]volumeutil.FileProjection, error) { if defaultMode == nil { return nil, fmt.Errorf("No defaultMode used, not even the default value for it") } @@ -251,6 +260,9 @@ func makePayload(mappings []v1.KeyToPath, secret *v1.Secret, defaultMode *int32) for _, ktp := range mappings { content, ok := secret.Data[ktp.Key] if !ok { + if optional { + continue + } err_msg := "references non-existent secret key" glog.Errorf(err_msg) return nil, fmt.Errorf(err_msg) diff --git a/vendor/k8s.io/kubernetes/pkg/volume/secret/secret_test.go b/vendor/k8s.io/kubernetes/pkg/volume/secret/secret_test.go index 136dfda0..ee7e83fd 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/secret/secret_test.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/secret/secret_test.go @@ -26,6 +26,7 @@ import ( "strings" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" @@ -45,6 +46,7 @@ func TestMakePayload(t *testing.T) { mappings []v1.KeyToPath secret *v1.Secret mode int32 + optional bool payload map[string]util.FileProjection success bool }{ @@ -217,10 +219,29 @@ func TestMakePayload(t *testing.T) { }, success: true, }, + { + name: "optional non existent key", + mappings: []v1.KeyToPath{ + { + Key: "zab", + Path: "path/to/foo.txt", + }, + }, + secret: &v1.Secret{ + Data: map[string][]byte{ + "foo": []byte("foo"), + "bar": []byte("bar"), + }, + }, + mode: 0644, + optional: true, + payload: map[string]util.FileProjection{}, + success: true, + }, } for _, tc := range cases { - actualPayload, err := makePayload(tc.mappings, tc.secret, &tc.mode) + actualPayload, err := makePayload(tc.mappings, tc.secret, &tc.mode, tc.optional) if err != nil && tc.success { t.Errorf("%v: unexpected failure making payload: %v", tc.name, err) continue @@ -292,7 +313,7 @@ func TestPlugin(t *testing.T) { t.Errorf("Can't find the plugin by name") } - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{Namespace: testNamespace, UID: testPodUID}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Namespace: testNamespace, UID: testPodUID}} mounter, err := plugin.NewMounter(volume.NewSpecFromVolume(volumeSpec), pod, volume.VolumeOptions{}) if err != nil { t.Errorf("Failed to make a new Mounter: %v", err) @@ -365,7 +386,7 @@ func TestPluginReboot(t *testing.T) { t.Errorf("Can't find the plugin by name") } - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{Namespace: testNamespace, UID: testPodUID}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Namespace: testNamespace, UID: testPodUID}} mounter, err := plugin.NewMounter(volume.NewSpecFromVolume(volumeSpec), pod, volume.VolumeOptions{}) if err != nil { t.Errorf("Failed to make a new Mounter: %v", err) @@ -397,6 +418,154 @@ func TestPluginReboot(t *testing.T) { doTestCleanAndTeardown(plugin, testPodUID, testVolumeName, volumePath, t) } +func TestPluginOptional(t *testing.T) { + var ( + testPodUID = types.UID("test_pod_uid") + testVolumeName = "test_volume_name" + testNamespace = "test_secret_namespace" + testName = "test_secret_name" + trueVal = true + + volumeSpec = volumeSpec(testVolumeName, testName, 0644) + client = fake.NewSimpleClientset() + pluginMgr = volume.VolumePluginMgr{} + rootDir, host = newTestHost(t, client) + ) + volumeSpec.Secret.Optional = &trueVal + defer os.RemoveAll(rootDir) + pluginMgr.InitPlugins(ProbeVolumePlugins(), host) + + plugin, err := pluginMgr.FindPluginByName(secretPluginName) + if err != nil { + t.Errorf("Can't find the plugin by name") + } + + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Namespace: testNamespace, UID: testPodUID}} + mounter, err := plugin.NewMounter(volume.NewSpecFromVolume(volumeSpec), pod, volume.VolumeOptions{}) + if err != nil { + t.Errorf("Failed to make a new Mounter: %v", err) + } + if mounter == nil { + t.Errorf("Got a nil Mounter") + } + + volumePath := mounter.GetPath() + if !strings.HasSuffix(volumePath, fmt.Sprintf("pods/test_pod_uid/volumes/kubernetes.io~secret/test_volume_name")) { + t.Errorf("Got unexpected path: %s", volumePath) + } + + err = mounter.SetUp(nil) + if err != nil { + t.Errorf("Failed to setup volume: %v", err) + } + if _, err := os.Stat(volumePath); err != nil { + if os.IsNotExist(err) { + t.Errorf("SetUp() failed, volume path not created: %s", volumePath) + } else { + t.Errorf("SetUp() failed: %v", err) + } + } + + // secret volume should create its own empty wrapper path + podWrapperMetadataDir := fmt.Sprintf("%v/pods/test_pod_uid/plugins/kubernetes.io~empty-dir/wrapped_test_volume_name", rootDir) + + if _, err := os.Stat(podWrapperMetadataDir); err != nil { + if os.IsNotExist(err) { + t.Errorf("SetUp() failed, empty-dir wrapper path is not created: %s", podWrapperMetadataDir) + } else { + t.Errorf("SetUp() failed: %v", err) + } + } + + infos, err := ioutil.ReadDir(volumePath) + if err != nil { + t.Fatalf("couldn't find volume path, %s", volumePath) + } + if len(infos) != 0 { + t.Errorf("empty directory, %s, not found", volumePath) + } + + defer doTestCleanAndTeardown(plugin, testPodUID, testVolumeName, volumePath, t) +} + +func TestPluginOptionalKeys(t *testing.T) { + var ( + testPodUID = types.UID("test_pod_uid") + testVolumeName = "test_volume_name" + testNamespace = "test_secret_namespace" + testName = "test_secret_name" + trueVal = true + + volumeSpec = volumeSpec(testVolumeName, testName, 0644) + secret = secret(testNamespace, testName) + client = fake.NewSimpleClientset(&secret) + pluginMgr = volume.VolumePluginMgr{} + rootDir, host = newTestHost(t, client) + ) + volumeSpec.VolumeSource.Secret.Items = []v1.KeyToPath{ + {Key: "data-1", Path: "data-1"}, + {Key: "data-2", Path: "data-2"}, + {Key: "data-3", Path: "data-3"}, + {Key: "missing", Path: "missing"}, + } + volumeSpec.Secret.Optional = &trueVal + defer os.RemoveAll(rootDir) + pluginMgr.InitPlugins(ProbeVolumePlugins(), host) + + plugin, err := pluginMgr.FindPluginByName(secretPluginName) + if err != nil { + t.Errorf("Can't find the plugin by name") + } + + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Namespace: testNamespace, UID: testPodUID}} + mounter, err := plugin.NewMounter(volume.NewSpecFromVolume(volumeSpec), pod, volume.VolumeOptions{}) + if err != nil { + t.Errorf("Failed to make a new Mounter: %v", err) + } + if mounter == nil { + t.Errorf("Got a nil Mounter") + } + + volumePath := mounter.GetPath() + if !strings.HasSuffix(volumePath, fmt.Sprintf("pods/test_pod_uid/volumes/kubernetes.io~secret/test_volume_name")) { + t.Errorf("Got unexpected path: %s", volumePath) + } + + err = mounter.SetUp(nil) + if err != nil { + t.Errorf("Failed to setup volume: %v", err) + } + if _, err := os.Stat(volumePath); err != nil { + if os.IsNotExist(err) { + t.Errorf("SetUp() failed, volume path not created: %s", volumePath) + } else { + t.Errorf("SetUp() failed: %v", err) + } + } + + // secret volume should create its own empty wrapper path + podWrapperMetadataDir := fmt.Sprintf("%v/pods/test_pod_uid/plugins/kubernetes.io~empty-dir/wrapped_test_volume_name", rootDir) + + if _, err := os.Stat(podWrapperMetadataDir); err != nil { + if os.IsNotExist(err) { + t.Errorf("SetUp() failed, empty-dir wrapper path is not created: %s", podWrapperMetadataDir) + } else { + t.Errorf("SetUp() failed: %v", err) + } + } + doTestSecretDataInVolume(volumePath, secret, t) + defer doTestCleanAndTeardown(plugin, testPodUID, testVolumeName, volumePath, t) + + // Metrics only supported on linux + metrics, err := mounter.GetMetrics() + if runtime.GOOS == "linux" { + assert.NotEmpty(t, metrics) + assert.NoError(t, err) + } else { + t.Skipf("Volume metrics not supported on %s", runtime.GOOS) + } +} + func volumeSpec(volumeName, secretName string, defaultMode int32) *v1.Volume { return &v1.Volume{ Name: volumeName, @@ -411,7 +580,7 @@ func volumeSpec(volumeName, secretName string, defaultMode int32) *v1.Volume { func secret(namespace, name string) v1.Secret { return v1.Secret{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: namespace, Name: name, }, diff --git a/vendor/k8s.io/kubernetes/pkg/volume/testing/BUILD b/vendor/k8s.io/kubernetes/pkg/volume/testing/BUILD index b3ee7d0c..fd356610 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/testing/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/volume/testing/BUILD @@ -22,11 +22,12 @@ go_library( "//pkg/util/io:go_default_library", "//pkg/util/mount:go_default_library", "//pkg/util/strings:go_default_library", - "//pkg/util/testing:go_default_library", "//pkg/util/uuid:go_default_library", "//pkg/volume:go_default_library", "//vendor:github.com/stretchr/testify/mock", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", + "//vendor:k8s.io/client-go/util/testing", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/volume/testing/OWNERS b/vendor/k8s.io/kubernetes/pkg/volume/testing/OWNERS new file mode 100755 index 00000000..876d1363 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/volume/testing/OWNERS @@ -0,0 +1,21 @@ +approvers: +- pmorie +- saad-ali +- rootfs +- jsafrane +reviewers: +- jeffvance +- thockin +- smarterclayton +- deads2k +- brendandburns +- derekwaynecarr +- bprashanth +- pmorie +- saad-ali +- justinsb +- jsafrane +- rootfs +- jingxu97 +- rkouj +- msau42 diff --git a/vendor/k8s.io/kubernetes/pkg/volume/testing/testing.go b/vendor/k8s.io/kubernetes/pkg/volume/testing/testing.go index df5c9c23..ca8cad02 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/testing/testing.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/testing/testing.go @@ -27,7 +27,9 @@ import ( "testing" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" + utiltesting "k8s.io/client-go/util/testing" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" @@ -35,7 +37,6 @@ import ( "k8s.io/kubernetes/pkg/util/io" "k8s.io/kubernetes/pkg/util/mount" utilstrings "k8s.io/kubernetes/pkg/util/strings" - utiltesting "k8s.io/kubernetes/pkg/util/testing" "k8s.io/kubernetes/pkg/util/uuid" . "k8s.io/kubernetes/pkg/volume" ) @@ -126,6 +127,12 @@ func (f *fakeVolumeHost) GetNodeAllocatable() (v1.ResourceList, error) { return v1.ResourceList{}, nil } +func (f *fakeVolumeHost) GetSecretFunc() func(namespace, name string) (*v1.Secret, error) { + return func(namespace, name string) (*v1.Secret, error) { + return f.kubeClient.Core().Secrets(namespace).Get(name, metav1.GetOptions{}) + } +} + func ProbeVolumePlugins(config VolumeConfig) []VolumePlugin { if _, ok := config.OtherAttributes["fake-property"]; ok { return []VolumePlugin{ @@ -477,7 +484,7 @@ func (fc *FakeProvisioner) Provision() (*v1.PersistentVolume, error) { fullpath := fmt.Sprintf("/tmp/hostpath_pv/%s", uuid.NewUUID()) pv := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: fc.Options.PVName, Annotations: map[string]string{ "kubernetes.io/createdby": "fakeplugin-provisioner", @@ -507,6 +514,7 @@ func FindEmptyDirectoryUsageOnTmpfs() (*resource.Quantity, error) { if err != nil { return nil, err } + defer os.RemoveAll(tmpDir) out, err := exec.Command("nice", "-n", "19", "du", "-s", "-B", "1", tmpDir).CombinedOutput() if err != nil { return nil, fmt.Errorf("failed command 'du' on %s with error %v", tmpDir, err) @@ -737,7 +745,7 @@ func GetTestVolumePluginMgr( // CreateTestPVC returns a provisionable PVC for tests func CreateTestPVC(capacity string, accessModes []v1.PersistentVolumeAccessMode) *v1.PersistentVolumeClaim { claim := v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "dummy", Namespace: "default", }, diff --git a/vendor/k8s.io/kubernetes/pkg/volume/util.go b/vendor/k8s.io/kubernetes/pkg/volume/util.go index 8a463804..a3e98abd 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/util.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/util.go @@ -21,10 +21,10 @@ import ( "reflect" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/watch" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/fields" "hash/fnv" "math/rand" @@ -178,7 +178,7 @@ func (c *realRecyclerClient) Event(eventtype, message string) { func (c *realRecyclerClient) WatchPod(name, namespace string, stopChannel chan struct{}) (<-chan watch.Event, error) { podSelector, _ := fields.ParseSelector("metadata.name=" + name) - options := v1.ListOptions{ + options := metav1.ListOptions{ FieldSelector: podSelector.String(), Watch: true, } @@ -189,7 +189,7 @@ func (c *realRecyclerClient) WatchPod(name, namespace string, stopChannel chan s } eventSelector, _ := fields.ParseSelector("involvedObject.name=" + name) - eventWatch, err := c.client.Core().Events(namespace).Watch(v1.ListOptions{ + eventWatch, err := c.client.Core().Events(namespace).Watch(metav1.ListOptions{ FieldSelector: eventSelector.String(), Watch: true, }) diff --git a/vendor/k8s.io/kubernetes/pkg/volume/util/BUILD b/vendor/k8s.io/kubernetes/pkg/volume/util/BUILD index 9cac087b..4ff3adc0 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/util/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/volume/util/BUILD @@ -41,8 +41,8 @@ go_test( library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/util/testing:go_default_library", "//vendor:k8s.io/apimachinery/pkg/util/sets", + "//vendor:k8s.io/client-go/util/testing", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/volume/util/OWNERS b/vendor/k8s.io/kubernetes/pkg/volume/util/OWNERS new file mode 100755 index 00000000..abea2824 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/volume/util/OWNERS @@ -0,0 +1,11 @@ +approvers: +- saad-ali +reviewers: +- thockin +- smarterclayton +- pmorie +- saad-ali +- justinsb +- rootfs +- jingxu97 +- screeley44 diff --git a/vendor/k8s.io/kubernetes/pkg/volume/util/atomic_writer_test.go b/vendor/k8s.io/kubernetes/pkg/volume/util/atomic_writer_test.go index f0551d00..f535e149 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/util/atomic_writer_test.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/util/atomic_writer_test.go @@ -29,7 +29,7 @@ import ( "testing" "k8s.io/apimachinery/pkg/util/sets" - utiltesting "k8s.io/kubernetes/pkg/util/testing" + utiltesting "k8s.io/client-go/util/testing" ) func TestNewAtomicWriter(t *testing.T) { @@ -37,6 +37,7 @@ func TestNewAtomicWriter(t *testing.T) { if err != nil { t.Fatalf("unexpected error creating tmp dir: %v", err) } + defer os.RemoveAll(targetDir) _, err = NewAtomicWriter(targetDir, "-test-") if err != nil { @@ -225,6 +226,7 @@ func TestPathsToRemove(t *testing.T) { t.Errorf("%v: unexpected error creating tmp dir: %v", tc.name, err) continue } + defer os.RemoveAll(targetDir) writer := &AtomicWriter{targetDir: targetDir, logContext: "-test-"} err = writer.Write(tc.payload1) @@ -382,6 +384,7 @@ IAAAAAAAsDyZDwU=` t.Errorf("%v: unexpected error creating tmp dir: %v", tc.name, err) continue } + defer os.RemoveAll(targetDir) writer := &AtomicWriter{targetDir: targetDir, logContext: "-test-"} err = writer.Write(tc.payload) @@ -557,6 +560,7 @@ func TestUpdate(t *testing.T) { t.Errorf("%v: unexpected error creating tmp dir: %v", tc.name, err) continue } + defer os.RemoveAll(targetDir) writer := &AtomicWriter{targetDir: targetDir, logContext: "-test-"} @@ -724,6 +728,7 @@ func TestMultipleUpdates(t *testing.T) { t.Errorf("%v: unexpected error creating tmp dir: %v", tc.name, err) continue } + defer os.RemoveAll(targetDir) writer := &AtomicWriter{targetDir: targetDir, logContext: "-test-"} diff --git a/vendor/k8s.io/kubernetes/pkg/volume/util/nestedpendingoperations/OWNERS b/vendor/k8s.io/kubernetes/pkg/volume/util/nestedpendingoperations/OWNERS index 73ab6a21..4739819c 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/util/nestedpendingoperations/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/volume/util/nestedpendingoperations/OWNERS @@ -1,2 +1,2 @@ -assignees: - - saad-ali +approvers: +- saad-ali diff --git a/vendor/k8s.io/kubernetes/pkg/volume/util/operationexecutor/BUILD b/vendor/k8s.io/kubernetes/pkg/volume/util/operationexecutor/BUILD index 75708295..af9aa421 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/util/operationexecutor/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/volume/util/operationexecutor/BUILD @@ -42,6 +42,7 @@ go_test( "//pkg/util/mount:go_default_library", "//pkg/util/uuid:go_default_library", "//pkg/volume/util/types:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/volume/util/operationexecutor/OWNERS b/vendor/k8s.io/kubernetes/pkg/volume/util/operationexecutor/OWNERS index 73ab6a21..4739819c 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/util/operationexecutor/OWNERS +++ b/vendor/k8s.io/kubernetes/pkg/volume/util/operationexecutor/OWNERS @@ -1,2 +1,2 @@ -assignees: - - saad-ali +approvers: +- saad-ali diff --git a/vendor/k8s.io/kubernetes/pkg/volume/util/operationexecutor/operation_executor_test.go b/vendor/k8s.io/kubernetes/pkg/volume/util/operationexecutor/operation_executor_test.go index 460793a4..dfedbe61 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/util/operationexecutor/operation_executor_test.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/util/operationexecutor/operation_executor_test.go @@ -17,14 +17,16 @@ limitations under the License. package operationexecutor import ( + "strconv" + "testing" + "time" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/util/mount" "k8s.io/kubernetes/pkg/util/uuid" volumetypes "k8s.io/kubernetes/pkg/volume/util/types" - "strconv" - "testing" - "time" ) const ( @@ -281,7 +283,7 @@ func (fopg *fakeOperationGenerator) GenerateVerifyControllerAttachedVolumeFunc(v func getTestPodWithSecret(podName, secretName string) *v1.Pod { return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, UID: types.UID(podName), }, @@ -318,7 +320,7 @@ func getTestPodWithSecret(podName, secretName string) *v1.Pod { func getTestPodWithGCEPD(podName, pdName string) *v1.Pod { return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, UID: types.UID(podName + string(uuid.NewUUID())), }, diff --git a/vendor/k8s.io/kubernetes/pkg/volume/util_test.go b/vendor/k8s.io/kubernetes/pkg/volume/util_test.go index 5c284cb8..04d8eeba 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/util_test.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/util_test.go @@ -22,6 +22,7 @@ import ( "testing" "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/watch" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/resource" @@ -56,8 +57,8 @@ func newEvent(eventtype, message string) watch.Event { return watch.Event{ Type: watch.Added, Object: &v1.Event{ - ObjectMeta: v1.ObjectMeta{ - Namespace: v1.NamespaceDefault, + ObjectMeta: metav1.ObjectMeta{ + Namespace: metav1.NamespaceDefault, }, Reason: "MockEvent", Message: message, @@ -68,8 +69,8 @@ func newEvent(eventtype, message string) watch.Event { func newPod(name string, phase v1.PodPhase, message string) *v1.Pod { return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ - Namespace: v1.NamespaceDefault, + ObjectMeta: metav1.ObjectMeta{ + Namespace: metav1.NamespaceDefault, Name: name, }, Status: v1.PodStatus{ diff --git a/vendor/k8s.io/kubernetes/pkg/volume/vsphere_volume/BUILD b/vendor/k8s.io/kubernetes/pkg/volume/vsphere_volume/BUILD index 888c965d..c01ab8cd 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/vsphere_volume/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/volume/vsphere_volume/BUILD @@ -28,6 +28,7 @@ go_library( "//pkg/volume:go_default_library", "//pkg/volume/util:go_default_library", "//vendor:github.com/golang/glog", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", ], ) @@ -44,11 +45,11 @@ go_test( "//pkg/api/v1:go_default_library", "//pkg/cloudprovider/providers/vsphere:go_default_library", "//pkg/util/mount:go_default_library", - "//pkg/util/testing:go_default_library", "//pkg/volume:go_default_library", "//pkg/volume/testing:go_default_library", "//vendor:github.com/golang/glog", "//vendor:k8s.io/apimachinery/pkg/types", + "//vendor:k8s.io/client-go/util/testing", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/volume/vsphere_volume/OWNERS b/vendor/k8s.io/kubernetes/pkg/volume/vsphere_volume/OWNERS new file mode 100755 index 00000000..8fd4e1f6 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/volume/vsphere_volume/OWNERS @@ -0,0 +1,22 @@ +approvers: +- pmorie +- saad-ali +- thockin +- matchstick +reviewers: +- abithap +- abrarshivani +- thockin +- smarterclayton +- deads2k +- brendandburns +- derekwaynecarr +- bprashanth +- pmorie +- saad-ali +- justinsb +- jsafrane +- rootfs +- jingxu97 +- rkouj +- msau42 diff --git a/vendor/k8s.io/kubernetes/pkg/volume/vsphere_volume/vsphere_volume.go b/vendor/k8s.io/kubernetes/pkg/volume/vsphere_volume/vsphere_volume.go index 016fe3cd..abaa9472 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/vsphere_volume/vsphere_volume.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/vsphere_volume/vsphere_volume.go @@ -23,6 +23,7 @@ import ( "strings" "github.com/golang/glog" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" @@ -340,7 +341,7 @@ func (v *vsphereVolumeProvisioner) Provision() (*v1.PersistentVolume, error) { } pv := &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: v.options.PVName, Labels: map[string]string{}, Annotations: map[string]string{ diff --git a/vendor/k8s.io/kubernetes/pkg/volume/vsphere_volume/vsphere_volume_test.go b/vendor/k8s.io/kubernetes/pkg/volume/vsphere_volume/vsphere_volume_test.go index b16fb82c..a0b19ee2 100644 --- a/vendor/k8s.io/kubernetes/pkg/volume/vsphere_volume/vsphere_volume_test.go +++ b/vendor/k8s.io/kubernetes/pkg/volume/vsphere_volume/vsphere_volume_test.go @@ -23,9 +23,9 @@ import ( "testing" "k8s.io/apimachinery/pkg/types" + utiltesting "k8s.io/client-go/util/testing" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/util/mount" - utiltesting "k8s.io/kubernetes/pkg/util/testing" "k8s.io/kubernetes/pkg/volume" volumetest "k8s.io/kubernetes/pkg/volume/testing" ) diff --git a/vendor/k8s.io/kubernetes/pkg/watch/.readonly b/vendor/k8s.io/kubernetes/pkg/watch/.readonly deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/k8s.io/kubernetes/pkg/watch/BUILD b/vendor/k8s.io/kubernetes/pkg/watch/BUILD index ac329ce7..af76644e 100644 --- a/vendor/k8s.io/kubernetes/pkg/watch/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/watch/BUILD @@ -5,45 +5,12 @@ licenses(["notice"]) load( "@io_bazel_rules_go//go:def.bzl", "go_library", - "go_test", ) go_library( name = "go_default_library", - srcs = [ - "doc.go", - "filter.go", - "mux.go", - "streamwatcher.go", - "until.go", - "watch.go", - ], + srcs = ["doc.go"], tags = ["automanaged"], - deps = [ - "//pkg/runtime:go_default_library", - "//pkg/runtime/schema:go_default_library", - "//pkg/util/net:go_default_library", - "//pkg/util/runtime:go_default_library", - "//pkg/util/wait:go_default_library", - "//vendor:github.com/golang/glog", - ], -) - -go_test( - name = "go_default_xtest", - srcs = [ - "filter_test.go", - "mux_test.go", - "streamwatcher_test.go", - "watch_test.go", - ], - tags = ["automanaged"], - deps = [ - "//pkg/runtime:go_default_library", - "//pkg/runtime/schema:go_default_library", - "//pkg/util/wait:go_default_library", - "//pkg/watch:go_default_library", - ], ) filegroup( diff --git a/vendor/k8s.io/kubernetes/pkg/watch/doc.go b/vendor/k8s.io/kubernetes/pkg/watch/doc.go index cb866d87..499b7bea 100644 --- a/vendor/k8s.io/kubernetes/pkg/watch/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/watch/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Package watch contains a generic watchable interface, and a fake for -// testing code that uses the watch interface. -package watch // import "k8s.io/kubernetes/pkg/watch" +// Package watch only exists until heapster rebases +// TODO genericapiserver remove this empty package. Godep fails without this because heapster relies +// on this package. This will allow us to start splitting packages, but will force +// heapster to update on their next kube rebase. +package watch diff --git a/vendor/k8s.io/kubernetes/pkg/watch/filter.go b/vendor/k8s.io/kubernetes/pkg/watch/filter.go deleted file mode 100644 index 3ca27f22..00000000 --- a/vendor/k8s.io/kubernetes/pkg/watch/filter.go +++ /dev/null @@ -1,109 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package watch - -import ( - "sync" -) - -// FilterFunc should take an event, possibly modify it in some way, and return -// the modified event. If the event should be ignored, then return keep=false. -type FilterFunc func(in Event) (out Event, keep bool) - -// Filter passes all events through f before allowing them to pass on. -// Putting a filter on a watch, as an unavoidable side-effect due to the way -// go channels work, effectively causes the watch's event channel to have its -// queue length increased by one. -// -// WARNING: filter has a fatal flaw, in that it can't properly update the -// Type field (Add/Modified/Deleted) to reflect items beginning to pass the -// filter when they previously didn't. -// -func Filter(w Interface, f FilterFunc) Interface { - fw := &filteredWatch{ - incoming: w, - result: make(chan Event), - f: f, - } - go fw.loop() - return fw -} - -type filteredWatch struct { - incoming Interface - result chan Event - f FilterFunc -} - -// ResultChan returns a channel which will receive filtered events. -func (fw *filteredWatch) ResultChan() <-chan Event { - return fw.result -} - -// Stop stops the upstream watch, which will eventually stop this watch. -func (fw *filteredWatch) Stop() { - fw.incoming.Stop() -} - -// loop waits for new values, filters them, and resends them. -func (fw *filteredWatch) loop() { - defer close(fw.result) - for { - event, ok := <-fw.incoming.ResultChan() - if !ok { - break - } - filtered, keep := fw.f(event) - if keep { - fw.result <- filtered - } - } -} - -// Recorder records all events that are sent from the watch until it is closed. -type Recorder struct { - Interface - - lock sync.Mutex - events []Event -} - -var _ Interface = &Recorder{} - -// NewRecorder wraps an Interface and records any changes sent across it. -func NewRecorder(w Interface) *Recorder { - r := &Recorder{} - r.Interface = Filter(w, r.record) - return r -} - -// record is a FilterFunc and tracks each received event. -func (r *Recorder) record(in Event) (Event, bool) { - r.lock.Lock() - defer r.lock.Unlock() - r.events = append(r.events, in) - return in, true -} - -// Events returns a copy of the events sent across this recorder. -func (r *Recorder) Events() []Event { - r.lock.Lock() - defer r.lock.Unlock() - copied := make([]Event, len(r.events)) - copy(copied, r.events) - return copied -} diff --git a/vendor/k8s.io/kubernetes/pkg/watch/filter_test.go b/vendor/k8s.io/kubernetes/pkg/watch/filter_test.go deleted file mode 100644 index abe714df..00000000 --- a/vendor/k8s.io/kubernetes/pkg/watch/filter_test.go +++ /dev/null @@ -1,84 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package watch_test - -import ( - "reflect" - "testing" - - . "k8s.io/kubernetes/pkg/watch" -) - -func TestFilter(t *testing.T) { - table := []Event{ - {Type: Added, Object: testType("foo")}, - {Type: Added, Object: testType("bar")}, - {Type: Added, Object: testType("baz")}, - {Type: Added, Object: testType("qux")}, - {Type: Added, Object: testType("zoo")}, - } - - source := NewFake() - filtered := Filter(source, func(e Event) (Event, bool) { - return e, e.Object.(testType)[0] != 'b' - }) - - go func() { - for _, item := range table { - source.Action(item.Type, item.Object) - } - source.Stop() - }() - - var got []string - for { - event, ok := <-filtered.ResultChan() - if !ok { - break - } - got = append(got, string(event.Object.(testType))) - } - - if e, a := []string{"foo", "qux", "zoo"}, got; !reflect.DeepEqual(e, a) { - t.Errorf("got %v, wanted %v", e, a) - } -} - -func TestFilterStop(t *testing.T) { - source := NewFake() - filtered := Filter(source, func(e Event) (Event, bool) { - return e, e.Object.(testType)[0] != 'b' - }) - - go func() { - source.Add(testType("foo")) - filtered.Stop() - }() - - var got []string - for { - event, ok := <-filtered.ResultChan() - if !ok { - break - } - got = append(got, string(event.Object.(testType))) - } - - if e, a := []string{"foo"}, got; !reflect.DeepEqual(e, a) { - t.Errorf("got %v, wanted %v", e, a) - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/watch/mux.go b/vendor/k8s.io/kubernetes/pkg/watch/mux.go deleted file mode 100644 index ad79dbc8..00000000 --- a/vendor/k8s.io/kubernetes/pkg/watch/mux.go +++ /dev/null @@ -1,257 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package watch - -import ( - "sync" - - "k8s.io/kubernetes/pkg/runtime" - "k8s.io/kubernetes/pkg/runtime/schema" -) - -// FullChannelBehavior controls how the Broadcaster reacts if a watcher's watch -// channel is full. -type FullChannelBehavior int - -const ( - WaitIfChannelFull FullChannelBehavior = iota - DropIfChannelFull -) - -// Buffer the incoming queue a little bit even though it should rarely ever accumulate -// anything, just in case a few events are received in such a short window that -// Broadcaster can't move them onto the watchers' queues fast enough. -const incomingQueueLength = 25 - -// Broadcaster distributes event notifications among any number of watchers. Every event -// is delivered to every watcher. -type Broadcaster struct { - // TODO: see if this lock is needed now that new watchers go through - // the incoming channel. - lock sync.Mutex - - watchers map[int64]*broadcasterWatcher - nextWatcher int64 - distributing sync.WaitGroup - - incoming chan Event - - // How large to make watcher's channel. - watchQueueLength int - // If one of the watch channels is full, don't wait for it to become empty. - // Instead just deliver it to the watchers that do have space in their - // channels and move on to the next event. - // It's more fair to do this on a per-watcher basis than to do it on the - // "incoming" channel, which would allow one slow watcher to prevent all - // other watchers from getting new events. - fullChannelBehavior FullChannelBehavior -} - -// NewBroadcaster creates a new Broadcaster. queueLength is the maximum number of events to queue per watcher. -// It is guaranteed that events will be distributed in the order in which they occur, -// but the order in which a single event is distributed among all of the watchers is unspecified. -func NewBroadcaster(queueLength int, fullChannelBehavior FullChannelBehavior) *Broadcaster { - m := &Broadcaster{ - watchers: map[int64]*broadcasterWatcher{}, - incoming: make(chan Event, incomingQueueLength), - watchQueueLength: queueLength, - fullChannelBehavior: fullChannelBehavior, - } - m.distributing.Add(1) - go m.loop() - return m -} - -const internalRunFunctionMarker = "internal-do-function" - -// a function type we can shoehorn into the queue. -type functionFakeRuntimeObject func() - -func (obj functionFakeRuntimeObject) GetObjectKind() schema.ObjectKind { - return schema.EmptyObjectKind -} - -// Execute f, blocking the incoming queue (and waiting for it to drain first). -// The purpose of this terrible hack is so that watchers added after an event -// won't ever see that event, and will always see any event after they are -// added. -func (b *Broadcaster) blockQueue(f func()) { - var wg sync.WaitGroup - wg.Add(1) - b.incoming <- Event{ - Type: internalRunFunctionMarker, - Object: functionFakeRuntimeObject(func() { - defer wg.Done() - f() - }), - } - wg.Wait() -} - -// Watch adds a new watcher to the list and returns an Interface for it. -// Note: new watchers will only receive new events. They won't get an entire history -// of previous events. -func (m *Broadcaster) Watch() Interface { - var w *broadcasterWatcher - m.blockQueue(func() { - m.lock.Lock() - defer m.lock.Unlock() - id := m.nextWatcher - m.nextWatcher++ - w = &broadcasterWatcher{ - result: make(chan Event, m.watchQueueLength), - stopped: make(chan struct{}), - id: id, - m: m, - } - m.watchers[id] = w - }) - return w -} - -// WatchWithPrefix adds a new watcher to the list and returns an Interface for it. It sends -// queuedEvents down the new watch before beginning to send ordinary events from Broadcaster. -// The returned watch will have a queue length that is at least large enough to accommodate -// all of the items in queuedEvents. -func (m *Broadcaster) WatchWithPrefix(queuedEvents []Event) Interface { - var w *broadcasterWatcher - m.blockQueue(func() { - m.lock.Lock() - defer m.lock.Unlock() - id := m.nextWatcher - m.nextWatcher++ - length := m.watchQueueLength - if n := len(queuedEvents) + 1; n > length { - length = n - } - w = &broadcasterWatcher{ - result: make(chan Event, length), - stopped: make(chan struct{}), - id: id, - m: m, - } - m.watchers[id] = w - for _, e := range queuedEvents { - w.result <- e - } - }) - return w -} - -// stopWatching stops the given watcher and removes it from the list. -func (m *Broadcaster) stopWatching(id int64) { - m.lock.Lock() - defer m.lock.Unlock() - w, ok := m.watchers[id] - if !ok { - // No need to do anything, it's already been removed from the list. - return - } - delete(m.watchers, id) - close(w.result) -} - -// closeAll disconnects all watchers (presumably in response to a Shutdown call). -func (m *Broadcaster) closeAll() { - m.lock.Lock() - defer m.lock.Unlock() - for _, w := range m.watchers { - close(w.result) - } - // Delete everything from the map, since presence/absence in the map is used - // by stopWatching to avoid double-closing the channel. - m.watchers = map[int64]*broadcasterWatcher{} -} - -// Action distributes the given event among all watchers. -func (m *Broadcaster) Action(action EventType, obj runtime.Object) { - m.incoming <- Event{action, obj} -} - -// Shutdown disconnects all watchers (but any queued events will still be distributed). -// You must not call Action or Watch* after calling Shutdown. This call blocks -// until all events have been distributed through the outbound channels. Note -// that since they can be buffered, this means that the watchers might not -// have received the data yet as it can remain sitting in the buffered -// channel. -func (m *Broadcaster) Shutdown() { - close(m.incoming) - m.distributing.Wait() -} - -// loop receives from m.incoming and distributes to all watchers. -func (m *Broadcaster) loop() { - // Deliberately not catching crashes here. Yes, bring down the process if there's a - // bug in watch.Broadcaster. - for { - event, ok := <-m.incoming - if !ok { - break - } - if event.Type == internalRunFunctionMarker { - event.Object.(functionFakeRuntimeObject)() - continue - } - m.distribute(event) - } - m.closeAll() - m.distributing.Done() -} - -// distribute sends event to all watchers. Blocking. -func (m *Broadcaster) distribute(event Event) { - m.lock.Lock() - defer m.lock.Unlock() - if m.fullChannelBehavior == DropIfChannelFull { - for _, w := range m.watchers { - select { - case w.result <- event: - case <-w.stopped: - default: // Don't block if the event can't be queued. - } - } - } else { - for _, w := range m.watchers { - select { - case w.result <- event: - case <-w.stopped: - } - } - } -} - -// broadcasterWatcher handles a single watcher of a broadcaster -type broadcasterWatcher struct { - result chan Event - stopped chan struct{} - stop sync.Once - id int64 - m *Broadcaster -} - -// ResultChan returns a channel to use for waiting on events. -func (mw *broadcasterWatcher) ResultChan() <-chan Event { - return mw.result -} - -// Stop stops watching and removes mw from its list. -func (mw *broadcasterWatcher) Stop() { - mw.stop.Do(func() { - close(mw.stopped) - mw.m.stopWatching(mw.id) - }) -} diff --git a/vendor/k8s.io/kubernetes/pkg/watch/mux_test.go b/vendor/k8s.io/kubernetes/pkg/watch/mux_test.go deleted file mode 100644 index 96e26de1..00000000 --- a/vendor/k8s.io/kubernetes/pkg/watch/mux_test.go +++ /dev/null @@ -1,168 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package watch_test - -import ( - "reflect" - "sync" - "testing" - "time" - - "k8s.io/kubernetes/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/util/wait" - . "k8s.io/kubernetes/pkg/watch" -) - -type myType struct { - ID string - Value string -} - -func (obj *myType) GetObjectKind() schema.ObjectKind { return schema.EmptyObjectKind } - -func TestBroadcaster(t *testing.T) { - table := []Event{ - {Type: Added, Object: &myType{"foo", "hello world 1"}}, - {Type: Added, Object: &myType{"bar", "hello world 2"}}, - {Type: Modified, Object: &myType{"foo", "goodbye world 3"}}, - {Type: Deleted, Object: &myType{"bar", "hello world 4"}}, - } - - // The broadcaster we're testing - m := NewBroadcaster(0, WaitIfChannelFull) - - // Add a bunch of watchers - const testWatchers = 2 - wg := sync.WaitGroup{} - wg.Add(testWatchers) - for i := 0; i < testWatchers; i++ { - // Verify that each watcher gets the events in the correct order - go func(watcher int, w Interface) { - tableLine := 0 - for { - event, ok := <-w.ResultChan() - if !ok { - break - } - if e, a := table[tableLine], event; !reflect.DeepEqual(e, a) { - t.Errorf("Watcher %v, line %v: Expected (%v, %#v), got (%v, %#v)", - watcher, tableLine, e.Type, e.Object, a.Type, a.Object) - } else { - t.Logf("Got (%v, %#v)", event.Type, event.Object) - } - tableLine++ - } - wg.Done() - }(i, m.Watch()) - } - - for i, item := range table { - t.Logf("Sending %v", i) - m.Action(item.Type, item.Object) - } - - m.Shutdown() - - wg.Wait() -} - -func TestBroadcasterWatcherClose(t *testing.T) { - m := NewBroadcaster(0, WaitIfChannelFull) - w := m.Watch() - w2 := m.Watch() - w.Stop() - m.Shutdown() - if _, open := <-w.ResultChan(); open { - t.Errorf("Stop didn't work?") - } - if _, open := <-w2.ResultChan(); open { - t.Errorf("Shutdown didn't work?") - } - // Extra stops don't hurt things - w.Stop() - w2.Stop() -} - -func TestBroadcasterWatcherStopDeadlock(t *testing.T) { - done := make(chan bool) - m := NewBroadcaster(0, WaitIfChannelFull) - go func(w0, w1 Interface) { - // We know Broadcaster is in the distribute loop once one watcher receives - // an event. Stop the other watcher while distribute is trying to - // send to it. - select { - case <-w0.ResultChan(): - w1.Stop() - case <-w1.ResultChan(): - w0.Stop() - } - close(done) - }(m.Watch(), m.Watch()) - m.Action(Added, &myType{}) - select { - case <-time.After(wait.ForeverTestTimeout): - t.Error("timeout: deadlocked") - case <-done: - } - m.Shutdown() -} - -func TestBroadcasterDropIfChannelFull(t *testing.T) { - m := NewBroadcaster(1, DropIfChannelFull) - - event1 := Event{Type: Added, Object: &myType{"foo", "hello world 1"}} - event2 := Event{Type: Added, Object: &myType{"bar", "hello world 2"}} - - // Add a couple watchers - watches := make([]Interface, 2) - for i := range watches { - watches[i] = m.Watch() - } - - // Send a couple events before closing the broadcast channel. - t.Log("Sending event 1") - m.Action(event1.Type, event1.Object) - t.Log("Sending event 2") - m.Action(event2.Type, event2.Object) - m.Shutdown() - - // Pull events from the queue. - wg := sync.WaitGroup{} - wg.Add(len(watches)) - for i := range watches { - // Verify that each watcher only gets the first event because its watch - // queue of length one was full from the first one. - go func(watcher int, w Interface) { - defer wg.Done() - e1, ok := <-w.ResultChan() - if !ok { - t.Errorf("Watcher %v failed to retrieve first event.", watcher) - } - if e, a := event1, e1; !reflect.DeepEqual(e, a) { - t.Errorf("Watcher %v: Expected (%v, %#v), got (%v, %#v)", - watcher, e.Type, e.Object, a.Type, a.Object) - } - t.Logf("Got (%v, %#v)", e1.Type, e1.Object) - e2, ok := <-w.ResultChan() - if ok { - t.Errorf("Watcher %v received second event (%v, %#v) even though it shouldn't have.", - watcher, e2.Type, e2.Object) - } - }(i, watches[i]) - } - wg.Wait() -} diff --git a/vendor/k8s.io/kubernetes/pkg/watch/streamwatcher.go b/vendor/k8s.io/kubernetes/pkg/watch/streamwatcher.go deleted file mode 100644 index 26cf61d0..00000000 --- a/vendor/k8s.io/kubernetes/pkg/watch/streamwatcher.go +++ /dev/null @@ -1,119 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package watch - -import ( - "io" - "sync" - - "github.com/golang/glog" - "k8s.io/kubernetes/pkg/runtime" - "k8s.io/kubernetes/pkg/util/net" - utilruntime "k8s.io/kubernetes/pkg/util/runtime" -) - -// Decoder allows StreamWatcher to watch any stream for which a Decoder can be written. -type Decoder interface { - // Decode should return the type of event, the decoded object, or an error. - // An error will cause StreamWatcher to call Close(). Decode should block until - // it has data or an error occurs. - Decode() (action EventType, object runtime.Object, err error) - - // Close should close the underlying io.Reader, signalling to the source of - // the stream that it is no longer being watched. Close() must cause any - // outstanding call to Decode() to return with an error of some sort. - Close() -} - -// StreamWatcher turns any stream for which you can write a Decoder interface -// into a watch.Interface. -type StreamWatcher struct { - sync.Mutex - source Decoder - result chan Event - stopped bool -} - -// NewStreamWatcher creates a StreamWatcher from the given decoder. -func NewStreamWatcher(d Decoder) *StreamWatcher { - sw := &StreamWatcher{ - source: d, - // It's easy for a consumer to add buffering via an extra - // goroutine/channel, but impossible for them to remove it, - // so nonbuffered is better. - result: make(chan Event), - } - go sw.receive() - return sw -} - -// ResultChan implements Interface. -func (sw *StreamWatcher) ResultChan() <-chan Event { - return sw.result -} - -// Stop implements Interface. -func (sw *StreamWatcher) Stop() { - // Call Close() exactly once by locking and setting a flag. - sw.Lock() - defer sw.Unlock() - if !sw.stopped { - sw.stopped = true - sw.source.Close() - } -} - -// stopping returns true if Stop() was called previously. -func (sw *StreamWatcher) stopping() bool { - sw.Lock() - defer sw.Unlock() - return sw.stopped -} - -// receive reads result from the decoder in a loop and sends down the result channel. -func (sw *StreamWatcher) receive() { - defer close(sw.result) - defer sw.Stop() - defer utilruntime.HandleCrash() - for { - action, obj, err := sw.source.Decode() - if err != nil { - // Ignore expected error. - if sw.stopping() { - return - } - switch err { - case io.EOF: - // watch closed normally - case io.ErrUnexpectedEOF: - glog.V(1).Infof("Unexpected EOF during watch stream event decoding: %v", err) - default: - msg := "Unable to decode an event from the watch stream: %v" - if net.IsProbableEOF(err) { - glog.V(5).Infof(msg, err) - } else { - glog.Errorf(msg, err) - } - } - return - } - sw.result <- Event{ - Type: action, - Object: obj, - } - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/watch/streamwatcher_test.go b/vendor/k8s.io/kubernetes/pkg/watch/streamwatcher_test.go deleted file mode 100644 index 50afdd5f..00000000 --- a/vendor/k8s.io/kubernetes/pkg/watch/streamwatcher_test.go +++ /dev/null @@ -1,68 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package watch_test - -import ( - "io" - "reflect" - "testing" - - "k8s.io/kubernetes/pkg/runtime" - . "k8s.io/kubernetes/pkg/watch" -) - -type fakeDecoder struct { - items chan Event -} - -func (f fakeDecoder) Decode() (action EventType, object runtime.Object, err error) { - item, open := <-f.items - if !open { - return action, nil, io.EOF - } - return item.Type, item.Object, nil -} - -func (f fakeDecoder) Close() { - close(f.items) -} - -func TestStreamWatcher(t *testing.T) { - table := []Event{ - {Type: Added, Object: testType("foo")}, - } - - fd := fakeDecoder{make(chan Event, 5)} - sw := NewStreamWatcher(fd) - - for _, item := range table { - fd.items <- item - got, open := <-sw.ResultChan() - if !open { - t.Errorf("unexpected early close") - } - if e, a := item, got; !reflect.DeepEqual(e, a) { - t.Errorf("expected %v, got %v", e, a) - } - } - - sw.Stop() - _, open := <-sw.ResultChan() - if open { - t.Errorf("Unexpected failure to close") - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/watch/until.go b/vendor/k8s.io/kubernetes/pkg/watch/until.go deleted file mode 100644 index 17970b02..00000000 --- a/vendor/k8s.io/kubernetes/pkg/watch/until.go +++ /dev/null @@ -1,83 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package watch - -import ( - "time" - - "k8s.io/kubernetes/pkg/util/wait" -) - -// ConditionFunc returns true if the condition has been reached, false if it has not been reached yet, -// or an error if the condition cannot be checked and should terminate. In general, it is better to define -// level driven conditions over edge driven conditions (pod has ready=true, vs pod modified and ready changed -// from false to true). -type ConditionFunc func(event Event) (bool, error) - -// Until reads items from the watch until each provided condition succeeds, and then returns the last watch -// encountered. The first condition that returns an error terminates the watch (and the event is also returned). -// If no event has been received, the returned event will be nil. -// Conditions are satisfied sequentially so as to provide a useful primitive for higher level composition. -// A zero timeout means to wait forever. -func Until(timeout time.Duration, watcher Interface, conditions ...ConditionFunc) (*Event, error) { - ch := watcher.ResultChan() - defer watcher.Stop() - var after <-chan time.Time - if timeout > 0 { - after = time.After(timeout) - } else { - ch := make(chan time.Time) - defer close(ch) - after = ch - } - var lastEvent *Event - for _, condition := range conditions { - // check the next condition against the previous event and short circuit waiting for the next watch - if lastEvent != nil { - done, err := condition(*lastEvent) - if err != nil { - return lastEvent, err - } - if done { - continue - } - } - ConditionSucceeded: - for { - select { - case event, ok := <-ch: - if !ok { - return lastEvent, wait.ErrWaitTimeout - } - lastEvent = &event - - // TODO: check for watch expired error and retry watch from latest point? - done, err := condition(event) - if err != nil { - return lastEvent, err - } - if done { - break ConditionSucceeded - } - - case <-after: - return lastEvent, wait.ErrWaitTimeout - } - } - } - return lastEvent, nil -} diff --git a/vendor/k8s.io/kubernetes/pkg/watch/watch.go b/vendor/k8s.io/kubernetes/pkg/watch/watch.go deleted file mode 100644 index 550149c6..00000000 --- a/vendor/k8s.io/kubernetes/pkg/watch/watch.go +++ /dev/null @@ -1,269 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package watch - -import ( - "fmt" - "sync" - - "k8s.io/kubernetes/pkg/runtime" - - "github.com/golang/glog" -) - -// Interface can be implemented by anything that knows how to watch and report changes. -type Interface interface { - // Stops watching. Will close the channel returned by ResultChan(). Releases - // any resources used by the watch. - Stop() - - // Returns a chan which will receive all the events. If an error occurs - // or Stop() is called, this channel will be closed, in which case the - // watch should be completely cleaned up. - ResultChan() <-chan Event -} - -// EventType defines the possible types of events. -type EventType string - -const ( - Added EventType = "ADDED" - Modified EventType = "MODIFIED" - Deleted EventType = "DELETED" - Error EventType = "ERROR" - - DefaultChanSize int32 = 100 -) - -// Event represents a single event to a watched resource. -type Event struct { - Type EventType - - // Object is: - // * If Type is Added or Modified: the new state of the object. - // * If Type is Deleted: the state of the object immediately before deletion. - // * If Type is Error: *api.Status is recommended; other types may make sense - // depending on context. - Object runtime.Object -} - -type emptyWatch chan Event - -// NewEmptyWatch returns a watch interface that returns no results and is closed. -// May be used in certain error conditions where no information is available but -// an error is not warranted. -func NewEmptyWatch() Interface { - ch := make(chan Event) - close(ch) - return emptyWatch(ch) -} - -// Stop implements Interface -func (w emptyWatch) Stop() { -} - -// ResultChan implements Interface -func (w emptyWatch) ResultChan() <-chan Event { - return chan Event(w) -} - -// FakeWatcher lets you test anything that consumes a watch.Interface; threadsafe. -type FakeWatcher struct { - result chan Event - Stopped bool - sync.Mutex -} - -func NewFake() *FakeWatcher { - return &FakeWatcher{ - result: make(chan Event), - } -} - -func NewFakeWithChanSize(size int, blocking bool) *FakeWatcher { - return &FakeWatcher{ - result: make(chan Event, size), - } -} - -// Stop implements Interface.Stop(). -func (f *FakeWatcher) Stop() { - f.Lock() - defer f.Unlock() - if !f.Stopped { - glog.V(4).Infof("Stopping fake watcher.") - close(f.result) - f.Stopped = true - } -} - -func (f *FakeWatcher) IsStopped() bool { - f.Lock() - defer f.Unlock() - return f.Stopped -} - -// Reset prepares the watcher to be reused. -func (f *FakeWatcher) Reset() { - f.Lock() - defer f.Unlock() - f.Stopped = false - f.result = make(chan Event) -} - -func (f *FakeWatcher) ResultChan() <-chan Event { - return f.result -} - -// Add sends an add event. -func (f *FakeWatcher) Add(obj runtime.Object) { - f.result <- Event{Added, obj} -} - -// Modify sends a modify event. -func (f *FakeWatcher) Modify(obj runtime.Object) { - f.result <- Event{Modified, obj} -} - -// Delete sends a delete event. -func (f *FakeWatcher) Delete(lastValue runtime.Object) { - f.result <- Event{Deleted, lastValue} -} - -// Error sends an Error event. -func (f *FakeWatcher) Error(errValue runtime.Object) { - f.result <- Event{Error, errValue} -} - -// Action sends an event of the requested type, for table-based testing. -func (f *FakeWatcher) Action(action EventType, obj runtime.Object) { - f.result <- Event{action, obj} -} - -// RaceFreeFakeWatcher lets you test anything that consumes a watch.Interface; threadsafe. -type RaceFreeFakeWatcher struct { - result chan Event - Stopped bool - sync.Mutex -} - -func NewRaceFreeFake() *RaceFreeFakeWatcher { - return &RaceFreeFakeWatcher{ - result: make(chan Event, DefaultChanSize), - } -} - -// Stop implements Interface.Stop(). -func (f *RaceFreeFakeWatcher) Stop() { - f.Lock() - defer f.Unlock() - if !f.Stopped { - glog.V(4).Infof("Stopping fake watcher.") - close(f.result) - f.Stopped = true - } -} - -func (f *RaceFreeFakeWatcher) IsStopped() bool { - f.Lock() - defer f.Unlock() - return f.Stopped -} - -// Reset prepares the watcher to be reused. -func (f *RaceFreeFakeWatcher) Reset() { - f.Lock() - defer f.Unlock() - f.Stopped = false - f.result = make(chan Event, DefaultChanSize) -} - -func (f *RaceFreeFakeWatcher) ResultChan() <-chan Event { - f.Lock() - defer f.Unlock() - return f.result -} - -// Add sends an add event. -func (f *RaceFreeFakeWatcher) Add(obj runtime.Object) { - f.Lock() - defer f.Unlock() - if !f.Stopped { - select { - case f.result <- Event{Added, obj}: - return - default: - panic(fmt.Errorf("channel full")) - } - } -} - -// Modify sends a modify event. -func (f *RaceFreeFakeWatcher) Modify(obj runtime.Object) { - f.Lock() - defer f.Unlock() - if !f.Stopped { - select { - case f.result <- Event{Modified, obj}: - return - default: - panic(fmt.Errorf("channel full")) - } - } -} - -// Delete sends a delete event. -func (f *RaceFreeFakeWatcher) Delete(lastValue runtime.Object) { - f.Lock() - defer f.Unlock() - if !f.Stopped { - select { - case f.result <- Event{Deleted, lastValue}: - return - default: - panic(fmt.Errorf("channel full")) - } - } -} - -// Error sends an Error event. -func (f *RaceFreeFakeWatcher) Error(errValue runtime.Object) { - f.Lock() - defer f.Unlock() - if !f.Stopped { - select { - case f.result <- Event{Error, errValue}: - return - default: - panic(fmt.Errorf("channel full")) - } - } -} - -// Action sends an event of the requested type, for table-based testing. -func (f *RaceFreeFakeWatcher) Action(action EventType, obj runtime.Object) { - f.Lock() - defer f.Unlock() - if !f.Stopped { - select { - case f.result <- Event{action, obj}: - return - default: - panic(fmt.Errorf("channel full")) - } - } -} diff --git a/vendor/k8s.io/kubernetes/pkg/watch/watch_test.go b/vendor/k8s.io/kubernetes/pkg/watch/watch_test.go deleted file mode 100644 index c2e32668..00000000 --- a/vendor/k8s.io/kubernetes/pkg/watch/watch_test.go +++ /dev/null @@ -1,135 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package watch_test - -import ( - "testing" - - "k8s.io/kubernetes/pkg/runtime/schema" - . "k8s.io/kubernetes/pkg/watch" -) - -type testType string - -func (obj testType) GetObjectKind() schema.ObjectKind { return schema.EmptyObjectKind } - -func TestFake(t *testing.T) { - f := NewFake() - - table := []struct { - t EventType - s testType - }{ - {Added, testType("foo")}, - {Modified, testType("qux")}, - {Modified, testType("bar")}, - {Deleted, testType("bar")}, - {Error, testType("error: blah")}, - } - - // Prove that f implements Interface by phrasing this as a function. - consumer := func(w Interface) { - for _, expect := range table { - got, ok := <-w.ResultChan() - if !ok { - t.Fatalf("closed early") - } - if e, a := expect.t, got.Type; e != a { - t.Fatalf("Expected %v, got %v", e, a) - } - if a, ok := got.Object.(testType); !ok || a != expect.s { - t.Fatalf("Expected %v, got %v", expect.s, a) - } - } - _, stillOpen := <-w.ResultChan() - if stillOpen { - t.Fatal("Never stopped") - } - } - - sender := func() { - f.Add(testType("foo")) - f.Action(Modified, testType("qux")) - f.Modify(testType("bar")) - f.Delete(testType("bar")) - f.Error(testType("error: blah")) - f.Stop() - } - - go sender() - consumer(f) -} - -func TestRaceFreeFake(t *testing.T) { - f := NewRaceFreeFake() - - table := []struct { - t EventType - s testType - }{ - {Added, testType("foo")}, - {Modified, testType("qux")}, - {Modified, testType("bar")}, - {Deleted, testType("bar")}, - {Error, testType("error: blah")}, - } - - // Prove that f implements Interface by phrasing this as a function. - consumer := func(w Interface) { - for _, expect := range table { - got, ok := <-w.ResultChan() - if !ok { - t.Fatalf("closed early") - } - if e, a := expect.t, got.Type; e != a { - t.Fatalf("Expected %v, got %v", e, a) - } - if a, ok := got.Object.(testType); !ok || a != expect.s { - t.Fatalf("Expected %v, got %v", expect.s, a) - } - } - _, stillOpen := <-w.ResultChan() - if stillOpen { - t.Fatal("Never stopped") - } - } - - sender := func() { - f.Add(testType("foo")) - f.Action(Modified, testType("qux")) - f.Modify(testType("bar")) - f.Delete(testType("bar")) - f.Error(testType("error: blah")) - f.Stop() - } - - go sender() - consumer(f) -} - -func TestEmpty(t *testing.T) { - w := NewEmptyWatch() - _, ok := <-w.ResultChan() - if ok { - t.Errorf("unexpected result channel result") - } - w.Stop() - _, ok = <-w.ResultChan() - if ok { - t.Errorf("unexpected result channel result") - } -} diff --git a/vendor/k8s.io/kubernetes/plugin/BUILD b/vendor/k8s.io/kubernetes/plugin/BUILD index fabfccfa..9225d06f 100644 --- a/vendor/k8s.io/kubernetes/plugin/BUILD +++ b/vendor/k8s.io/kubernetes/plugin/BUILD @@ -34,7 +34,6 @@ filegroup( "//plugin/pkg/admission/serviceaccount:all-srcs", "//plugin/pkg/admission/storageclass/default:all-srcs", "//plugin/pkg/auth:all-srcs", - "//plugin/pkg/client/auth:all-srcs", "//plugin/pkg/scheduler:all-srcs", ], tags = ["automanaged"], diff --git a/vendor/k8s.io/kubernetes/plugin/OWNERS b/vendor/k8s.io/kubernetes/plugin/OWNERS index 2c7bcdee..1f32c648 100644 --- a/vendor/k8s.io/kubernetes/plugin/OWNERS +++ b/vendor/k8s.io/kubernetes/plugin/OWNERS @@ -1,4 +1,10 @@ -assignees: +reviewers: + - brendandburns + - davidopp + - dchen1107 + - lavalamp + - thockin +approvers: - brendandburns - davidopp - dchen1107 diff --git a/vendor/k8s.io/kubernetes/plugin/cmd/kube-scheduler/OWNERS b/vendor/k8s.io/kubernetes/plugin/cmd/kube-scheduler/OWNERS index 44bd78a2..6a4023f8 100644 --- a/vendor/k8s.io/kubernetes/plugin/cmd/kube-scheduler/OWNERS +++ b/vendor/k8s.io/kubernetes/plugin/cmd/kube-scheduler/OWNERS @@ -1,2 +1,4 @@ -assignees: - - davidopp +approvers: +- davidopp +reviewers: +- davidopp diff --git a/vendor/k8s.io/kubernetes/plugin/cmd/kube-scheduler/app/BUILD b/vendor/k8s.io/kubernetes/plugin/cmd/kube-scheduler/app/BUILD index a5c4374c..2c75cbe9 100644 --- a/vendor/k8s.io/kubernetes/plugin/cmd/kube-scheduler/app/BUILD +++ b/vendor/k8s.io/kubernetes/plugin/cmd/kube-scheduler/app/BUILD @@ -18,8 +18,6 @@ go_library( "//pkg/client/leaderelection:go_default_library", "//pkg/client/leaderelection/resourcelock:go_default_library", "//pkg/client/record:go_default_library", - "//pkg/client/restclient:go_default_library", - "//pkg/client/unversioned/clientcmd:go_default_library", "//pkg/util/configz:go_default_library", "//plugin/cmd/kube-scheduler/app/options:go_default_library", "//plugin/pkg/scheduler:go_default_library", @@ -31,8 +29,11 @@ go_library( "//vendor:github.com/prometheus/client_golang/prometheus", "//vendor:github.com/spf13/cobra", "//vendor:github.com/spf13/pflag", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", - "//vendor:k8s.io/apiserver/pkg/healthz", + "//vendor:k8s.io/apiserver/pkg/server/healthz", + "//vendor:k8s.io/client-go/rest", + "//vendor:k8s.io/client-go/tools/clientcmd", ], ) diff --git a/vendor/k8s.io/kubernetes/plugin/cmd/kube-scheduler/app/options/options.go b/vendor/k8s.io/kubernetes/plugin/cmd/kube-scheduler/app/options/options.go index 4b599c7a..840bed0c 100644 --- a/vendor/k8s.io/kubernetes/plugin/cmd/kube-scheduler/app/options/options.go +++ b/vendor/k8s.io/kubernetes/plugin/cmd/kube-scheduler/app/options/options.go @@ -66,7 +66,7 @@ func (s *SchedulerServer) AddFlags(fs *pflag.FlagSet) { fs.StringVar(&s.ContentType, "kube-api-content-type", s.ContentType, "Content type of requests sent to apiserver.") fs.Float32Var(&s.KubeAPIQPS, "kube-api-qps", s.KubeAPIQPS, "QPS to use while talking with kubernetes apiserver") fs.Int32Var(&s.KubeAPIBurst, "kube-api-burst", s.KubeAPIBurst, "Burst to use while talking with kubernetes apiserver") - fs.StringVar(&s.SchedulerName, "scheduler-name", s.SchedulerName, "Name of the scheduler, used to select which pods will be processed by this scheduler, based on pod's annotation with key 'scheduler.alpha.kubernetes.io/name'") + fs.StringVar(&s.SchedulerName, "scheduler-name", s.SchedulerName, "Name of the scheduler, used to select which pods will be processed by this scheduler, based on pod's \"spec.SchedulerName\".") fs.IntVar(&s.HardPodAffinitySymmetricWeight, "hard-pod-affinity-symmetric-weight", api.DefaultHardPodAffinitySymmetricWeight, "RequiredDuringScheduling affinity is not symmetric, but there is an implicit PreferredDuringScheduling affinity rule corresponding "+ "to every RequiredDuringScheduling affinity rule. --hard-pod-affinity-symmetric-weight represents the weight of implicit PreferredDuringScheduling affinity rule.") 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 f2e63511..ac040808 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 @@ -27,16 +27,17 @@ import ( goruntime "runtime" "strconv" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apiserver/pkg/healthz" + "k8s.io/apiserver/pkg/server/healthz" + restclient "k8s.io/client-go/rest" + "k8s.io/client-go/tools/clientcmd" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" v1core "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1" "k8s.io/kubernetes/pkg/client/leaderelection" "k8s.io/kubernetes/pkg/client/leaderelection/resourcelock" "k8s.io/kubernetes/pkg/client/record" - "k8s.io/kubernetes/pkg/client/restclient" - "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" "k8s.io/kubernetes/pkg/util/configz" "k8s.io/kubernetes/plugin/cmd/kube-scheduler/app/options" "k8s.io/kubernetes/plugin/pkg/scheduler" @@ -101,7 +102,7 @@ func Run(s *options.SchedulerServer) error { } // TODO: enable other lock types rl := &resourcelock.EndpointsLock{ - EndpointsMeta: v1.ObjectMeta{ + EndpointsMeta: metav1.ObjectMeta{ Namespace: "kube-system", Name: "kube-scheduler", }, diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/OWNERS b/vendor/k8s.io/kubernetes/plugin/pkg/admission/OWNERS index 6b9dd4b1..5c88b018 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/OWNERS +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/OWNERS @@ -1,2 +1,4 @@ -assignees: - - derekwaynecarr +approvers: +- derekwaynecarr +reviewers: +- derekwaynecarr diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/admit/BUILD b/vendor/k8s.io/kubernetes/plugin/pkg/admission/admit/BUILD index 1b7a5b43..260cfd43 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/admit/BUILD +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/admit/BUILD @@ -12,7 +12,7 @@ go_library( name = "go_default_library", srcs = ["admission.go"], tags = ["automanaged"], - deps = ["//pkg/admission:go_default_library"], + deps = ["//vendor:k8s.io/apiserver/pkg/admission"], ) go_test( diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/admit/admission.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/admit/admission.go index 6aab9b0e..e9319938 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/admit/admission.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/admit/admission.go @@ -19,7 +19,7 @@ package admit import ( "io" - "k8s.io/kubernetes/pkg/admission" + "k8s.io/apiserver/pkg/admission" ) func init() { diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/alwayspullimages/BUILD b/vendor/k8s.io/kubernetes/plugin/pkg/admission/alwayspullimages/BUILD index 78e1d415..63ac7d59 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/alwayspullimages/BUILD +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/alwayspullimages/BUILD @@ -13,9 +13,9 @@ go_library( srcs = ["admission.go"], tags = ["automanaged"], deps = [ - "//pkg/admission:go_default_library", "//pkg/api:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apiserver/pkg/admission", ], ) @@ -25,9 +25,10 @@ go_test( library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/admission:go_default_library", "//pkg/api:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", + "//vendor:k8s.io/apiserver/pkg/admission", ], ) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/alwayspullimages/admission.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/alwayspullimages/admission.go index 830b2493..12b05fc2 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/alwayspullimages/admission.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/alwayspullimages/admission.go @@ -28,7 +28,7 @@ import ( "io" apierrors "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/kubernetes/pkg/admission" + "k8s.io/apiserver/pkg/admission" "k8s.io/kubernetes/pkg/api" ) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/alwayspullimages/admission_test.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/alwayspullimages/admission_test.go index 1c4559c3..e291e6e6 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/alwayspullimages/admission_test.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/alwayspullimages/admission_test.go @@ -19,8 +19,9 @@ package alwayspullimages import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - "k8s.io/kubernetes/pkg/admission" + "k8s.io/apiserver/pkg/admission" "k8s.io/kubernetes/pkg/api" ) @@ -30,7 +31,7 @@ func TestAdmission(t *testing.T) { namespace := "test" handler := &alwaysPullImages{} pod := api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "123", Namespace: namespace}, + ObjectMeta: metav1.ObjectMeta{Name: "123", Namespace: namespace}, Spec: api.PodSpec{ InitContainers: []api.Container{ {Name: "init1", Image: "image"}, @@ -68,7 +69,7 @@ func TestOtherResources(t *testing.T) { namespace := "testnamespace" name := "testname" pod := &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: name, Namespace: namespace}, + ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespace}, Spec: api.PodSpec{ Containers: []api.Container{ {Name: "ctr2", Image: "image", ImagePullPolicy: api.PullNever}, diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/antiaffinity/BUILD b/vendor/k8s.io/kubernetes/plugin/pkg/admission/antiaffinity/BUILD index b9da65f6..d245549c 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/antiaffinity/BUILD +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/antiaffinity/BUILD @@ -16,10 +16,10 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/admission:go_default_library", "//pkg/api:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apiserver/pkg/admission", ], ) @@ -29,10 +29,10 @@ go_test( library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/admission:go_default_library", "//pkg/api:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", + "//vendor:k8s.io/apiserver/pkg/admission", ], ) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/antiaffinity/admission.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/antiaffinity/admission.go index ea50fc4f..a90e7e48 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/antiaffinity/admission.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/antiaffinity/admission.go @@ -22,7 +22,7 @@ import ( apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/kubernetes/pkg/admission" + "k8s.io/apiserver/pkg/admission" "k8s.io/kubernetes/pkg/api" ) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/antiaffinity/admission_test.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/antiaffinity/admission_test.go index 4834b44b..af5cff11 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/antiaffinity/admission_test.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/antiaffinity/admission_test.go @@ -21,7 +21,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - "k8s.io/kubernetes/pkg/admission" + "k8s.io/apiserver/pkg/admission" "k8s.io/kubernetes/pkg/api" ) @@ -250,7 +250,7 @@ func TestOtherResources(t *testing.T) { namespace := "testnamespace" name := "testname" pod := &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: name, Namespace: namespace}, + ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespace}, } tests := []struct { name string diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/deny/BUILD b/vendor/k8s.io/kubernetes/plugin/pkg/admission/deny/BUILD index c426be60..f1f1a82a 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/deny/BUILD +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/deny/BUILD @@ -12,7 +12,7 @@ go_library( name = "go_default_library", srcs = ["admission.go"], tags = ["automanaged"], - deps = ["//pkg/admission:go_default_library"], + deps = ["//vendor:k8s.io/apiserver/pkg/admission"], ) go_test( @@ -21,8 +21,8 @@ go_test( library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/admission:go_default_library", "//pkg/api:go_default_library", + "//vendor:k8s.io/apiserver/pkg/admission", ], ) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/deny/admission.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/deny/admission.go index f7a93f96..e5090742 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/deny/admission.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/deny/admission.go @@ -20,7 +20,7 @@ import ( "errors" "io" - "k8s.io/kubernetes/pkg/admission" + "k8s.io/apiserver/pkg/admission" ) func init() { diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/deny/admission_test.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/deny/admission_test.go index d9281e3b..7cf1daee 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/deny/admission_test.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/deny/admission_test.go @@ -19,7 +19,7 @@ package deny import ( "testing" - "k8s.io/kubernetes/pkg/admission" + "k8s.io/apiserver/pkg/admission" "k8s.io/kubernetes/pkg/api" ) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/exec/BUILD b/vendor/k8s.io/kubernetes/plugin/pkg/admission/exec/BUILD index 56aec7a4..824add70 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/exec/BUILD +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/exec/BUILD @@ -13,13 +13,13 @@ go_library( srcs = ["admission.go"], tags = ["automanaged"], deps = [ - "//pkg/admission:go_default_library", "//pkg/api:go_default_library", "//pkg/client/clientset_generated/internalclientset:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", "//pkg/kubeapiserver/admission:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apiserver/pkg/admission", ], ) @@ -29,12 +29,13 @@ go_test( library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/admission:go_default_library", "//pkg/api:go_default_library", "//pkg/client/clientset_generated/internalclientset/fake:go_default_library", "//pkg/client/testing/core:go_default_library", - "//pkg/genericapiserver/api/rest:go_default_library", + "//pkg/genericapiserver/registry/rest:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", + "//vendor:k8s.io/apiserver/pkg/admission", ], ) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/exec/admission.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/exec/admission.go index 06035366..e82bb020 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/exec/admission.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/exec/admission.go @@ -22,10 +22,10 @@ import ( "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/kubernetes/pkg/admission" + "k8s.io/apiserver/pkg/admission" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" kubeapiserveradmission "k8s.io/kubernetes/pkg/kubeapiserver/admission" ) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/exec/admission_test.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/exec/admission_test.go index 1094d576..b7734426 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/exec/admission_test.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/exec/admission_test.go @@ -19,12 +19,13 @@ package exec import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - "k8s.io/kubernetes/pkg/admission" + "k8s.io/apiserver/pkg/admission" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/fake" "k8s.io/kubernetes/pkg/client/testing/core" - "k8s.io/kubernetes/pkg/genericapiserver/api/rest" + "k8s.io/kubernetes/pkg/genericapiserver/registry/rest" ) func TestAdmission(t *testing.T) { @@ -207,7 +208,7 @@ func TestDenyExecOnPrivileged(t *testing.T) { func validPod(name string) *api.Pod { return &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: name, Namespace: "test"}, + ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: "test"}, Spec: api.PodSpec{ Containers: []api.Container{ {Name: "ctr1", Image: "image"}, diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/gc/BUILD b/vendor/k8s.io/kubernetes/plugin/pkg/admission/gc/BUILD index ed499df8..61295d7c 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/gc/BUILD +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/gc/BUILD @@ -13,10 +13,10 @@ go_library( srcs = ["gc_admission.go"], tags = ["automanaged"], deps = [ - "//pkg/admission:go_default_library", "//pkg/api:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/meta", "//vendor:k8s.io/apimachinery/pkg/runtime", + "//vendor:k8s.io/apiserver/pkg/admission", "//vendor:k8s.io/apiserver/pkg/authorization/authorizer", ], ) @@ -27,11 +27,11 @@ go_test( library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/admission:go_default_library", "//pkg/api:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", + "//vendor:k8s.io/apiserver/pkg/admission", "//vendor:k8s.io/apiserver/pkg/authentication/user", "//vendor:k8s.io/apiserver/pkg/authorization/authorizer", ], diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/gc/gc_admission.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/gc/gc_admission.go index c00ce184..5f21d16b 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/gc/gc_admission.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/gc/gc_admission.go @@ -22,8 +22,8 @@ import ( "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apiserver/pkg/admission" "k8s.io/apiserver/pkg/authorization/authorizer" - "k8s.io/kubernetes/pkg/admission" "k8s.io/kubernetes/pkg/api" ) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/gc/gc_admission_test.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/gc/gc_admission_test.go index 08c89271..b37dbe17 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/gc/gc_admission_test.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/gc/gc_admission_test.go @@ -22,9 +22,9 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apiserver/pkg/admission" "k8s.io/apiserver/pkg/authentication/user" "k8s.io/apiserver/pkg/authorization/authorizer" - "k8s.io/kubernetes/pkg/admission" "k8s.io/kubernetes/pkg/api" ) @@ -71,7 +71,7 @@ func TestGCAdmission(t *testing.T) { name: "super-user, create, objectref change", username: "super", resource: api.SchemeGroupVersion.WithResource("pods"), - newObj: &api.Pod{ObjectMeta: api.ObjectMeta{OwnerReferences: []metav1.OwnerReference{{Name: "first"}}}}, + newObj: &api.Pod{ObjectMeta: metav1.ObjectMeta{OwnerReferences: []metav1.OwnerReference{{Name: "first"}}}}, expectedAllowed: true, }, { @@ -85,7 +85,7 @@ func TestGCAdmission(t *testing.T) { name: "non-deleter, create, objectref change", username: "non-deleter", resource: api.SchemeGroupVersion.WithResource("pods"), - newObj: &api.Pod{ObjectMeta: api.ObjectMeta{OwnerReferences: []metav1.OwnerReference{{Name: "first"}}}}, + newObj: &api.Pod{ObjectMeta: metav1.ObjectMeta{OwnerReferences: []metav1.OwnerReference{{Name: "first"}}}}, expectedAllowed: false, }, { @@ -99,14 +99,14 @@ func TestGCAdmission(t *testing.T) { name: "non-pod-deleter, create, objectref change", username: "non-pod-deleter", resource: api.SchemeGroupVersion.WithResource("pods"), - newObj: &api.Pod{ObjectMeta: api.ObjectMeta{OwnerReferences: []metav1.OwnerReference{{Name: "first"}}}}, + newObj: &api.Pod{ObjectMeta: metav1.ObjectMeta{OwnerReferences: []metav1.OwnerReference{{Name: "first"}}}}, expectedAllowed: false, }, { name: "non-pod-deleter, create, objectref change, but not a pod", username: "non-pod-deleter", resource: api.SchemeGroupVersion.WithResource("not-pods"), - newObj: &api.Pod{ObjectMeta: api.ObjectMeta{OwnerReferences: []metav1.OwnerReference{{Name: "first"}}}}, + newObj: &api.Pod{ObjectMeta: metav1.ObjectMeta{OwnerReferences: []metav1.OwnerReference{{Name: "first"}}}}, expectedAllowed: true, }, @@ -122,8 +122,8 @@ func TestGCAdmission(t *testing.T) { name: "super-user, update, no objectref change two", username: "super", resource: api.SchemeGroupVersion.WithResource("pods"), - oldObj: &api.Pod{ObjectMeta: api.ObjectMeta{OwnerReferences: []metav1.OwnerReference{{Name: "first"}}}}, - newObj: &api.Pod{ObjectMeta: api.ObjectMeta{OwnerReferences: []metav1.OwnerReference{{Name: "first"}}}}, + oldObj: &api.Pod{ObjectMeta: metav1.ObjectMeta{OwnerReferences: []metav1.OwnerReference{{Name: "first"}}}}, + newObj: &api.Pod{ObjectMeta: metav1.ObjectMeta{OwnerReferences: []metav1.OwnerReference{{Name: "first"}}}}, expectedAllowed: true, }, { @@ -131,7 +131,7 @@ func TestGCAdmission(t *testing.T) { username: "super", resource: api.SchemeGroupVersion.WithResource("pods"), oldObj: &api.Pod{}, - newObj: &api.Pod{ObjectMeta: api.ObjectMeta{OwnerReferences: []metav1.OwnerReference{{Name: "first"}}}}, + newObj: &api.Pod{ObjectMeta: metav1.ObjectMeta{OwnerReferences: []metav1.OwnerReference{{Name: "first"}}}}, expectedAllowed: true, }, { @@ -146,8 +146,8 @@ func TestGCAdmission(t *testing.T) { name: "non-deleter, update, no objectref change two", username: "non-deleter", resource: api.SchemeGroupVersion.WithResource("pods"), - oldObj: &api.Pod{ObjectMeta: api.ObjectMeta{OwnerReferences: []metav1.OwnerReference{{Name: "first"}}}}, - newObj: &api.Pod{ObjectMeta: api.ObjectMeta{OwnerReferences: []metav1.OwnerReference{{Name: "first"}}}}, + oldObj: &api.Pod{ObjectMeta: metav1.ObjectMeta{OwnerReferences: []metav1.OwnerReference{{Name: "first"}}}}, + newObj: &api.Pod{ObjectMeta: metav1.ObjectMeta{OwnerReferences: []metav1.OwnerReference{{Name: "first"}}}}, expectedAllowed: true, }, { @@ -155,15 +155,15 @@ func TestGCAdmission(t *testing.T) { username: "non-deleter", resource: api.SchemeGroupVersion.WithResource("pods"), oldObj: &api.Pod{}, - newObj: &api.Pod{ObjectMeta: api.ObjectMeta{OwnerReferences: []metav1.OwnerReference{{Name: "first"}}}}, + newObj: &api.Pod{ObjectMeta: metav1.ObjectMeta{OwnerReferences: []metav1.OwnerReference{{Name: "first"}}}}, expectedAllowed: false, }, { name: "non-deleter, update, objectref change two", username: "non-deleter", resource: api.SchemeGroupVersion.WithResource("pods"), - oldObj: &api.Pod{ObjectMeta: api.ObjectMeta{OwnerReferences: []metav1.OwnerReference{{Name: "first"}}}}, - newObj: &api.Pod{ObjectMeta: api.ObjectMeta{OwnerReferences: []metav1.OwnerReference{{Name: "first"}, {Name: "second"}}}}, + oldObj: &api.Pod{ObjectMeta: metav1.ObjectMeta{OwnerReferences: []metav1.OwnerReference{{Name: "first"}}}}, + newObj: &api.Pod{ObjectMeta: metav1.ObjectMeta{OwnerReferences: []metav1.OwnerReference{{Name: "first"}, {Name: "second"}}}}, expectedAllowed: false, }, { @@ -179,7 +179,7 @@ func TestGCAdmission(t *testing.T) { username: "non-pod-deleter", resource: api.SchemeGroupVersion.WithResource("pods"), oldObj: &api.Pod{}, - newObj: &api.Pod{ObjectMeta: api.ObjectMeta{OwnerReferences: []metav1.OwnerReference{{Name: "first"}}}}, + newObj: &api.Pod{ObjectMeta: metav1.ObjectMeta{OwnerReferences: []metav1.OwnerReference{{Name: "first"}}}}, expectedAllowed: false, }, { @@ -187,7 +187,7 @@ func TestGCAdmission(t *testing.T) { username: "non-pod-deleter", resource: api.SchemeGroupVersion.WithResource("not-pods"), oldObj: &api.Pod{}, - newObj: &api.Pod{ObjectMeta: api.ObjectMeta{OwnerReferences: []metav1.OwnerReference{{Name: "first"}}}}, + newObj: &api.Pod{ObjectMeta: metav1.ObjectMeta{OwnerReferences: []metav1.OwnerReference{{Name: "first"}}}}, expectedAllowed: true, }, } @@ -202,7 +202,7 @@ func TestGCAdmission(t *testing.T) { operation = admission.Update } user := &user.DefaultInfo{Name: tc.username} - attributes := admission.NewAttributesRecord(tc.newObj, tc.oldObj, schema.GroupVersionKind{}, api.NamespaceDefault, "foo", tc.resource, "", operation, user) + attributes := admission.NewAttributesRecord(tc.newObj, tc.oldObj, schema.GroupVersionKind{}, metav1.NamespaceDefault, "foo", tc.resource, "", operation, user) err := gcAdmit.Admit(attributes) switch { diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/imagepolicy/BUILD b/vendor/k8s.io/kubernetes/plugin/pkg/admission/imagepolicy/BUILD index 4c464f53..c30cbfa9 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/imagepolicy/BUILD +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/imagepolicy/BUILD @@ -17,15 +17,15 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/admission:go_default_library", "//pkg/api:go_default_library", "//pkg/apis/imagepolicy/install:go_default_library", "//vendor:github.com/golang/glog", + "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/util/yaml", + "//vendor:k8s.io/apiserver/pkg/admission", "//vendor:k8s.io/apiserver/pkg/util/cache", - "//vendor:k8s.io/apiserver/pkg/webhook", - "//vendor:k8s.io/client-go/pkg/api/errors", + "//vendor:k8s.io/apiserver/pkg/util/webhook", "//vendor:k8s.io/client-go/pkg/apis/imagepolicy/install", "//vendor:k8s.io/client-go/pkg/apis/imagepolicy/v1alpha1", "//vendor:k8s.io/client-go/rest", @@ -42,12 +42,12 @@ go_test( library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/admission:go_default_library", "//pkg/api:go_default_library", "//pkg/apis/imagepolicy/install:go_default_library", "//pkg/apis/imagepolicy/v1alpha1:go_default_library", - "//pkg/client/unversioned/clientcmd/api/v1:go_default_library", + "//vendor:k8s.io/apiserver/pkg/admission", "//vendor:k8s.io/apiserver/pkg/authentication/user", + "//vendor:k8s.io/client-go/tools/clientcmd/api/v1", ], ) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/imagepolicy/admission.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/imagepolicy/admission.go index 6a865ce7..3c3c06f9 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/imagepolicy/admission.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/imagepolicy/admission.go @@ -28,16 +28,16 @@ import ( "github.com/golang/glog" + apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime/schema" kubeschema "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/yaml" + "k8s.io/apiserver/pkg/admission" "k8s.io/apiserver/pkg/util/cache" - "k8s.io/apiserver/pkg/webhook" - apierrors "k8s.io/client-go/pkg/api/errors" + "k8s.io/apiserver/pkg/util/webhook" "k8s.io/client-go/pkg/apis/imagepolicy/v1alpha1" "k8s.io/client-go/rest" - "k8s.io/kubernetes/pkg/admission" "k8s.io/kubernetes/pkg/api" // install the clientgo image policy API for use with api registry diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/imagepolicy/admission_test.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/imagepolicy/admission_test.go index a32320fe..caded8ff 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/imagepolicy/admission_test.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/imagepolicy/admission_test.go @@ -28,11 +28,11 @@ import ( "testing" "time" + "k8s.io/apiserver/pkg/admission" "k8s.io/apiserver/pkg/authentication/user" - "k8s.io/kubernetes/pkg/admission" + "k8s.io/client-go/tools/clientcmd/api/v1" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1" - "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/v1" "fmt" "io/ioutil" diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/initialresources/BUILD b/vendor/k8s.io/kubernetes/plugin/pkg/admission/initialresources/BUILD index 0dbbe2df..4b9d47b8 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/initialresources/BUILD +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/initialresources/BUILD @@ -19,11 +19,8 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/admission:go_default_library", "//pkg/api:go_default_library", "//pkg/api/resource:go_default_library", - "//pkg/client/restclient:go_default_library", - "//pkg/client/unversioned/clientcmd:go_default_library", "//vendor:cloud.google.com/go/compute/metadata", "//vendor:github.com/golang/glog", "//vendor:github.com/hawkular/hawkular-client-go/metrics", @@ -32,6 +29,10 @@ go_library( "//vendor:golang.org/x/oauth2/google", "//vendor:google.golang.org/api/cloudmonitoring/v2beta2", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apiserver/pkg/admission", + "//vendor:k8s.io/client-go/rest", + "//vendor:k8s.io/client-go/tools/clientcmd", ], ) @@ -44,10 +45,11 @@ go_test( library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/admission:go_default_library", "//pkg/api:go_default_library", "//pkg/api/resource:go_default_library", "//vendor:github.com/stretchr/testify/require", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apiserver/pkg/admission", ], ) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/initialresources/admission.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/initialresources/admission.go index 13f7cce9..453f96e8 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/initialresources/admission.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/initialresources/admission.go @@ -26,7 +26,7 @@ import ( "github.com/golang/glog" apierrors "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/kubernetes/pkg/admission" + "k8s.io/apiserver/pkg/admission" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/resource" ) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/initialresources/admission_test.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/initialresources/admission_test.go index 255c2a4b..a3c4660e 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/initialresources/admission_test.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/initialresources/admission_test.go @@ -20,7 +20,8 @@ import ( "testing" "time" - "k8s.io/kubernetes/pkg/admission" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apiserver/pkg/admission" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/resource" ) @@ -57,7 +58,7 @@ func addContainer(pod *api.Pod, name, image string, request api.ResourceList) { func createPod(name string, image string, request api.ResourceList) *api.Pod { pod := &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: name, Namespace: "test-ns"}, + ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: "test-ns"}, Spec: api.PodSpec{}, } pod.Spec.Containers = []api.Container{} diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/initialresources/hawkular.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/initialresources/hawkular.go index 80d9ab86..63d2f21b 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/initialresources/hawkular.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/initialresources/hawkular.go @@ -29,10 +29,11 @@ import ( "github.com/golang/glog" "github.com/hawkular/hawkular-client-go/metrics" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/client/restclient" - "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" + restclient "k8s.io/client-go/rest" + "k8s.io/client-go/tools/clientcmd" ) type hawkularSource struct { @@ -90,7 +91,7 @@ func (hs *hawkularSource) GetUsagePercentile(kind api.ResourceName, perc int64, m := make([]metrics.Modifier, len(hs.modifiers), 2+len(hs.modifiers)) copy(m, hs.modifiers) - if namespace != api.NamespaceAll { + if namespace != metav1.NamespaceAll { m = append(m, metrics.Tenant(namespace)) } diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/limitranger/BUILD b/vendor/k8s.io/kubernetes/plugin/pkg/admission/limitranger/BUILD index b1897234..911f8841 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/limitranger/BUILD +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/limitranger/BUILD @@ -16,7 +16,6 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/admission:go_default_library", "//pkg/api:go_default_library", "//pkg/api/resource:go_default_library", "//pkg/client/clientset_generated/internalclientset:go_default_library", @@ -25,9 +24,11 @@ go_library( "//pkg/kubeapiserver/admission:go_default_library", "//vendor:github.com/hashicorp/golang-lru", "//vendor:k8s.io/apimachinery/pkg/api/meta", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/errors", + "//vendor:k8s.io/apiserver/pkg/admission", ], ) @@ -37,7 +38,6 @@ go_test( library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/admission:go_default_library", "//pkg/api:go_default_library", "//pkg/api/resource:go_default_library", "//pkg/client/clientset_generated/internalclientset:go_default_library", @@ -48,6 +48,7 @@ go_test( "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/wait", + "//vendor:k8s.io/apiserver/pkg/admission", ], ) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/limitranger/admission.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/limitranger/admission.go index 40a63cdf..8515a7cd 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/limitranger/admission.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/limitranger/admission.go @@ -26,10 +26,11 @@ import ( lru "github.com/hashicorp/golang-lru" "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" utilerrors "k8s.io/apimachinery/pkg/util/errors" - "k8s.io/kubernetes/pkg/admission" + "k8s.io/apiserver/pkg/admission" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" @@ -112,7 +113,7 @@ func (l *limitRanger) Admit(a admission.Attributes) (err error) { // If there is already in-flight List() for a given namespace, we should wait until // it is finished and cache is updated instead of doing the same, also to avoid // throttling - see #22422 for details. - liveList, err := l.client.Core().LimitRanges(a.GetNamespace()).List(api.ListOptions{}) + liveList, err := l.client.Core().LimitRanges(a.GetNamespace()).List(metav1.ListOptions{}) if err != nil { return admission.NewForbidden(a, err) } diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/limitranger/admission_test.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/limitranger/admission_test.go index 7639716e..c502319e 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/limitranger/admission_test.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/limitranger/admission_test.go @@ -25,7 +25,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/kubernetes/pkg/admission" + "k8s.io/apiserver/pkg/admission" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/resource" clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" @@ -64,7 +64,7 @@ func getResourceRequirements(requests, limits api.ResourceList) api.ResourceRequ // createLimitRange creates a limit range with the specified data func createLimitRange(limitType api.LimitType, min, max, defaultLimit, defaultRequest, maxLimitRequestRatio api.ResourceList) api.LimitRange { return api.LimitRange{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc", Namespace: "test", }, @@ -85,7 +85,7 @@ func createLimitRange(limitType api.LimitType, min, max, defaultLimit, defaultRe func validLimitRange() api.LimitRange { return api.LimitRange{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc", Namespace: "test", }, @@ -110,7 +110,7 @@ func validLimitRange() api.LimitRange { func validLimitRangeNoDefaults() api.LimitRange { return api.LimitRange{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "abc", Namespace: "test", }, @@ -133,7 +133,7 @@ func validLimitRangeNoDefaults() api.LimitRange { func validPod(name string, numContainers int, resources api.ResourceRequirements) api.Pod { pod := api.Pod{ - ObjectMeta: api.ObjectMeta{Name: name, Namespace: "test"}, + ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: "test"}, Spec: api.PodSpec{}, } pod.Spec.Containers = make([]api.Container, 0, numContainers) @@ -602,7 +602,7 @@ func newHandlerForTest(c clientset.Interface) (admission.Interface, informers.Sh func validPersistentVolumeClaim(name string, resources api.ResourceRequirements) api.PersistentVolumeClaim { pvc := api.PersistentVolumeClaim{ - ObjectMeta: api.ObjectMeta{Name: name, Namespace: "test"}, + ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: "test"}, Spec: api.PersistentVolumeClaimSpec{ Resources: resources, }, diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/limitranger/interfaces.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/limitranger/interfaces.go index 0be881e1..f42b3269 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/limitranger/interfaces.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/limitranger/interfaces.go @@ -18,7 +18,7 @@ package limitranger import ( "k8s.io/apimachinery/pkg/runtime" - "k8s.io/kubernetes/pkg/admission" + "k8s.io/apiserver/pkg/admission" "k8s.io/kubernetes/pkg/api" ) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/namespace/autoprovision/BUILD b/vendor/k8s.io/kubernetes/plugin/pkg/admission/namespace/autoprovision/BUILD index 3169cfff..d7a257ca 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/namespace/autoprovision/BUILD +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/namespace/autoprovision/BUILD @@ -13,13 +13,14 @@ go_library( srcs = ["admission.go"], tags = ["automanaged"], deps = [ - "//pkg/admission:go_default_library", "//pkg/api:go_default_library", "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/internalclientset:go_default_library", "//pkg/controller/informers:go_default_library", "//pkg/kubeapiserver/admission:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apiserver/pkg/admission", ], ) @@ -29,7 +30,6 @@ go_test( library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/admission:go_default_library", "//pkg/api:go_default_library", "//pkg/client/clientset_generated/internalclientset:go_default_library", "//pkg/client/clientset_generated/internalclientset/fake:go_default_library", @@ -40,6 +40,7 @@ go_test( "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/wait", + "//vendor:k8s.io/apiserver/pkg/admission", ], ) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/namespace/autoprovision/admission.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/namespace/autoprovision/admission.go index 57133d53..fdf2e091 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/namespace/autoprovision/admission.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/namespace/autoprovision/admission.go @@ -21,7 +21,8 @@ import ( "io" "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/kubernetes/pkg/admission" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apiserver/pkg/admission" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/cache" "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" @@ -59,7 +60,7 @@ func (p *provision) Admit(a admission.Attributes) (err error) { return admission.NewForbidden(a, fmt.Errorf("not yet ready to handle request")) } namespace := &api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: a.GetNamespace(), Namespace: "", }, diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/namespace/autoprovision/admission_test.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/namespace/autoprovision/admission_test.go index 1e9306e6..46f10f3d 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/namespace/autoprovision/admission_test.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/namespace/autoprovision/admission_test.go @@ -25,7 +25,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/kubernetes/pkg/admission" + "k8s.io/apiserver/pkg/admission" "k8s.io/kubernetes/pkg/api" clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/fake" @@ -55,7 +55,7 @@ func newMockClientForTest(namespaces []string) *fake.Clientset { } for i, ns := range namespaces { namespaceList.Items = append(namespaceList.Items, api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: ns, ResourceVersion: fmt.Sprintf("%d", i), }, @@ -69,7 +69,7 @@ func newMockClientForTest(namespaces []string) *fake.Clientset { // newPod returns a new pod for the specified namespace func newPod(namespace string) api.Pod { return api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "123", Namespace: namespace}, + ObjectMeta: metav1.ObjectMeta{Name: "123", Namespace: namespace}, Spec: api.PodSpec{ Volumes: []api.Volume{{Name: "vol"}}, Containers: []api.Container{{Name: "ctr", Image: "image"}}, diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/namespace/exists/BUILD b/vendor/k8s.io/kubernetes/plugin/pkg/admission/namespace/exists/BUILD index 36b8d1df..1071aa62 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/namespace/exists/BUILD +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/namespace/exists/BUILD @@ -13,7 +13,6 @@ go_library( srcs = ["admission.go"], tags = ["automanaged"], deps = [ - "//pkg/admission:go_default_library", "//pkg/api:go_default_library", "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/internalclientset:go_default_library", @@ -21,6 +20,7 @@ go_library( "//pkg/kubeapiserver/admission:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apiserver/pkg/admission", ], ) @@ -30,7 +30,6 @@ go_test( library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/admission:go_default_library", "//pkg/api:go_default_library", "//pkg/client/clientset_generated/internalclientset:go_default_library", "//pkg/client/clientset_generated/internalclientset/fake:go_default_library", @@ -40,6 +39,7 @@ go_test( "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/wait", + "//vendor:k8s.io/apiserver/pkg/admission", ], ) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/namespace/exists/admission.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/namespace/exists/admission.go index 0b9d1a80..f62b8080 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/namespace/exists/admission.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/namespace/exists/admission.go @@ -22,7 +22,7 @@ import ( "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/kubernetes/pkg/admission" + "k8s.io/apiserver/pkg/admission" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/cache" "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" @@ -61,7 +61,7 @@ func (e *exists) Admit(a admission.Attributes) (err error) { return admission.NewForbidden(a, fmt.Errorf("not yet ready to handle request")) } namespace := &api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: a.GetNamespace(), Namespace: "", }, diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/namespace/exists/admission_test.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/namespace/exists/admission_test.go index 1b45db60..1423900d 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/namespace/exists/admission_test.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/namespace/exists/admission_test.go @@ -24,7 +24,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/kubernetes/pkg/admission" + "k8s.io/apiserver/pkg/admission" "k8s.io/kubernetes/pkg/api" clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/fake" @@ -54,7 +54,7 @@ func newMockClientForTest(namespaces []string) *fake.Clientset { } for i, ns := range namespaces { namespaceList.Items = append(namespaceList.Items, api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: ns, ResourceVersion: fmt.Sprintf("%d", i), }, @@ -68,7 +68,7 @@ func newMockClientForTest(namespaces []string) *fake.Clientset { // newPod returns a new pod for the specified namespace func newPod(namespace string) api.Pod { return api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "123", Namespace: namespace}, + ObjectMeta: metav1.ObjectMeta{Name: "123", Namespace: namespace}, Spec: api.PodSpec{ Volumes: []api.Volume{{Name: "vol"}}, Containers: []api.Container{{Name: "ctr", Image: "image"}}, diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/namespace/lifecycle/BUILD b/vendor/k8s.io/kubernetes/plugin/pkg/admission/namespace/lifecycle/BUILD index fb5e8c98..9fc1a5a7 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/namespace/lifecycle/BUILD +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/namespace/lifecycle/BUILD @@ -13,18 +13,18 @@ go_library( srcs = ["admission.go"], tags = ["automanaged"], deps = [ - "//pkg/admission:go_default_library", "//pkg/api:go_default_library", "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/internalclientset:go_default_library", "//pkg/controller/informers:go_default_library", "//pkg/kubeapiserver/admission:go_default_library", - "//pkg/util/clock:go_default_library", "//vendor:github.com/golang/glog", "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/util/sets", + "//vendor:k8s.io/apiserver/pkg/admission", "//vendor:k8s.io/apiserver/pkg/util/cache", + "//vendor:k8s.io/client-go/util/clock", ], ) @@ -34,18 +34,18 @@ go_test( library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/admission:go_default_library", "//pkg/api:go_default_library", "//pkg/client/clientset_generated/internalclientset:go_default_library", "//pkg/client/clientset_generated/internalclientset/fake:go_default_library", "//pkg/client/testing/core:go_default_library", "//pkg/controller/informers:go_default_library", "//pkg/kubeapiserver/admission:go_default_library", - "//pkg/util/clock:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/sets", "//vendor:k8s.io/apimachinery/pkg/util/wait", + "//vendor:k8s.io/apiserver/pkg/admission", + "//vendor:k8s.io/client-go/util/clock", ], ) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/namespace/lifecycle/admission.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/namespace/lifecycle/admission.go index f57b4301..1747b0f5 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/namespace/lifecycle/admission.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/namespace/lifecycle/admission.go @@ -26,14 +26,14 @@ import ( "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/apiserver/pkg/admission" utilcache "k8s.io/apiserver/pkg/util/cache" - "k8s.io/kubernetes/pkg/admission" + "k8s.io/client-go/util/clock" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/cache" "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" "k8s.io/kubernetes/pkg/controller/informers" kubeapiserveradmission "k8s.io/kubernetes/pkg/kubeapiserver/admission" - "k8s.io/kubernetes/pkg/util/clock" ) const ( @@ -51,7 +51,7 @@ const ( func init() { admission.RegisterPlugin(PluginName, func(config io.Reader) (admission.Interface, error) { - return NewLifecycle(sets.NewString(api.NamespaceDefault, api.NamespaceSystem)) + return NewLifecycle(sets.NewString(metav1.NamespaceDefault, metav1.NamespaceSystem)) }) } @@ -76,7 +76,7 @@ var _ = kubeapiserveradmission.WantsInternalClientSet(&lifecycle{}) func makeNamespaceKey(namespace string) *api.Namespace { return &api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: namespace, Namespace: "", }, diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/namespace/lifecycle/admission_test.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/namespace/lifecycle/admission_test.go index 882df2c0..d64941c7 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/namespace/lifecycle/admission_test.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/namespace/lifecycle/admission_test.go @@ -25,14 +25,14 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/kubernetes/pkg/admission" + "k8s.io/apiserver/pkg/admission" + "k8s.io/client-go/util/clock" "k8s.io/kubernetes/pkg/api" clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/fake" "k8s.io/kubernetes/pkg/client/testing/core" "k8s.io/kubernetes/pkg/controller/informers" kubeadmission "k8s.io/kubernetes/pkg/kubeapiserver/admission" - "k8s.io/kubernetes/pkg/util/clock" ) // newHandlerForTest returns a configured handler for testing. @@ -43,7 +43,7 @@ func newHandlerForTest(c clientset.Interface) (admission.Interface, informers.Sh // newHandlerForTestWithClock returns a configured handler for testing. func newHandlerForTestWithClock(c clientset.Interface, cacheClock clock.Clock) (admission.Interface, informers.SharedInformerFactory, error) { f := informers.NewSharedInformerFactory(nil, c, 5*time.Minute) - handler, err := newLifecycleWithClock(sets.NewString(api.NamespaceDefault, api.NamespaceSystem), cacheClock) + handler, err := newLifecycleWithClock(sets.NewString(metav1.NamespaceDefault, metav1.NamespaceSystem), cacheClock) if err != nil { return nil, f, err } @@ -65,7 +65,7 @@ func newMockClientForTest(namespaces map[string]api.NamespacePhase) *fake.Client index := 0 for name, phase := range namespaces { namespaceList.Items = append(namespaceList.Items, api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, ResourceVersion: fmt.Sprintf("%d", index), }, @@ -83,7 +83,7 @@ func newMockClientForTest(namespaces map[string]api.NamespacePhase) *fake.Client // newPod returns a new pod for the specified namespace func newPod(namespace string) api.Pod { return api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "123", Namespace: namespace}, + ObjectMeta: metav1.ObjectMeta{Name: "123", Namespace: namespace}, Spec: api.PodSpec{ Volumes: []api.Volume{{Name: "vol"}}, Containers: []api.Container{{Name: "ctr", Image: "image"}}, @@ -168,7 +168,7 @@ func TestAdmissionNamespaceTerminating(t *testing.T) { } // verify delete of namespace default can never proceed - err = handler.Admit(admission.NewAttributesRecord(nil, nil, api.Kind("Namespace").WithVersion("version"), "", api.NamespaceDefault, api.Resource("namespaces").WithVersion("version"), "", admission.Delete, nil)) + err = handler.Admit(admission.NewAttributesRecord(nil, nil, api.Kind("Namespace").WithVersion("version"), "", metav1.NamespaceDefault, api.Resource("namespaces").WithVersion("version"), "", admission.Delete, nil)) if err == nil { t.Errorf("Expected an error that this namespace can never be deleted") } @@ -188,7 +188,7 @@ func TestAdmissionNamespaceForceLiveLookup(t *testing.T) { mockClient := newMockClientForTest(phases) mockClient.AddReactor("get", "namespaces", func(action core.Action) (bool, runtime.Object, error) { getCalls++ - return true, &api.Namespace{ObjectMeta: api.ObjectMeta{Name: namespace}, Status: api.NamespaceStatus{Phase: phases[namespace]}}, nil + return true, &api.Namespace{ObjectMeta: metav1.ObjectMeta{Name: namespace}, Status: api.NamespaceStatus{Phase: phases[namespace]}}, nil }) fakeClock := clock.NewFakeClock(time.Now()) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/persistentvolume/label/BUILD b/vendor/k8s.io/kubernetes/plugin/pkg/admission/persistentvolume/label/BUILD index 7fbdf931..f8c6ef86 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/persistentvolume/label/BUILD +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/persistentvolume/label/BUILD @@ -16,13 +16,13 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/admission:go_default_library", "//pkg/api:go_default_library", "//pkg/cloudprovider:go_default_library", "//pkg/cloudprovider/providers/aws:go_default_library", "//pkg/cloudprovider/providers/gce:go_default_library", "//pkg/volume:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apiserver/pkg/admission", ], ) @@ -32,10 +32,11 @@ go_test( library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/admission:go_default_library", "//pkg/api:go_default_library", "//pkg/cloudprovider/providers/aws:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", + "//vendor:k8s.io/apiserver/pkg/admission", ], ) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/persistentvolume/label/admission.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/persistentvolume/label/admission.go index 5b7973bf..11fdec74 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/persistentvolume/label/admission.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/persistentvolume/label/admission.go @@ -22,7 +22,7 @@ import ( "sync" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/kubernetes/pkg/admission" + "k8s.io/apiserver/pkg/admission" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/cloudprovider" "k8s.io/kubernetes/pkg/cloudprovider/providers/aws" diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/persistentvolume/label/admission_test.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/persistentvolume/label/admission_test.go index 38f07c06..632ded64 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/persistentvolume/label/admission_test.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/persistentvolume/label/admission_test.go @@ -21,8 +21,9 @@ import ( "fmt" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - "k8s.io/kubernetes/pkg/admission" + "k8s.io/apiserver/pkg/admission" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/cloudprovider/providers/aws" ) @@ -79,7 +80,7 @@ func TestAdmission(t *testing.T) { pvHandler := NewPersistentVolumeLabel() handler := admission.NewChainHandler(pvHandler) ignoredPV := api.PersistentVolume{ - ObjectMeta: api.ObjectMeta{Name: "noncloud", Namespace: "myns"}, + ObjectMeta: metav1.ObjectMeta{Name: "noncloud", Namespace: "myns"}, Spec: api.PersistentVolumeSpec{ PersistentVolumeSource: api.PersistentVolumeSource{ HostPath: &api.HostPathVolumeSource{ @@ -89,7 +90,7 @@ func TestAdmission(t *testing.T) { }, } awsPV := api.PersistentVolume{ - ObjectMeta: api.ObjectMeta{Name: "noncloud", Namespace: "myns"}, + ObjectMeta: metav1.ObjectMeta{Name: "noncloud", Namespace: "myns"}, Spec: api.PersistentVolumeSpec{ PersistentVolumeSource: api.PersistentVolumeSource{ AWSElasticBlockStore: &api.AWSElasticBlockStoreVolumeSource{ diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/podnodeselector/BUILD b/vendor/k8s.io/kubernetes/plugin/pkg/admission/podnodeselector/BUILD index f8c3f7eb..3ec99c30 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/podnodeselector/BUILD +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/podnodeselector/BUILD @@ -13,7 +13,6 @@ go_library( srcs = ["admission.go"], tags = ["automanaged"], deps = [ - "//pkg/admission:go_default_library", "//pkg/api:go_default_library", "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/internalclientset:go_default_library", @@ -24,6 +23,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/util/yaml", + "//vendor:k8s.io/apiserver/pkg/admission", ], ) @@ -33,14 +33,15 @@ go_test( library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/admission:go_default_library", "//pkg/api:go_default_library", "//pkg/client/clientset_generated/internalclientset:go_default_library", "//pkg/client/clientset_generated/internalclientset/fake:go_default_library", "//pkg/controller/informers:go_default_library", "//pkg/kubeapiserver/admission:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/util/wait", + "//vendor:k8s.io/apiserver/pkg/admission", ], ) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/podnodeselector/admission.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/podnodeselector/admission.go index 05332e80..8ac339ee 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/podnodeselector/admission.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/podnodeselector/admission.go @@ -27,7 +27,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/util/yaml" - "k8s.io/kubernetes/pkg/admission" + "k8s.io/apiserver/pkg/admission" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/cache" "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" @@ -115,7 +115,7 @@ func (p *podNodeSelector) Admit(a admission.Attributes) error { var namespace *api.Namespace namespaceObj, exists, err := p.namespaceInformer.GetStore().Get(&api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: nsName, Namespace: "", }, diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/podnodeselector/admission_test.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/podnodeselector/admission_test.go index bbd7b36a..c638fa9d 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/podnodeselector/admission_test.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/podnodeselector/admission_test.go @@ -20,9 +20,10 @@ import ( "testing" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/kubernetes/pkg/admission" + "k8s.io/apiserver/pkg/admission" "k8s.io/kubernetes/pkg/api" clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/fake" @@ -33,7 +34,7 @@ import ( // TestPodAdmission verifies various scenarios involving pod/namespace/global node label selectors func TestPodAdmission(t *testing.T) { namespace := &api.Namespace{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "testNamespace", Namespace: "", }, @@ -47,7 +48,7 @@ func TestPodAdmission(t *testing.T) { informerFactory.Start(wait.NeverStop) pod := &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "testPod", Namespace: "testNamespace"}, + ObjectMeta: metav1.ObjectMeta{Name: "testPod", Namespace: "testNamespace"}, } tests := []struct { diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/resourcequota/BUILD b/vendor/k8s.io/kubernetes/plugin/pkg/admission/resourcequota/BUILD index eb9beb2f..e4a6b6a8 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/resourcequota/BUILD +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/resourcequota/BUILD @@ -18,9 +18,7 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/admission:go_default_library", "//pkg/api:go_default_library", - "//pkg/api/v1:go_default_library", "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/internalclientset:go_default_library", "//pkg/kubeapiserver/admission:go_default_library", @@ -32,11 +30,13 @@ go_library( "//vendor:github.com/golang/glog", "//vendor:github.com/hashicorp/golang-lru", "//vendor:k8s.io/apimachinery/pkg/api/meta", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/runtime", "//vendor:k8s.io/apimachinery/pkg/util/sets", "//vendor:k8s.io/apimachinery/pkg/util/wait", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/apiserver/pkg/admission", ], ) @@ -46,7 +46,6 @@ go_test( library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/admission:go_default_library", "//pkg/api:go_default_library", "//pkg/api/resource:go_default_library", "//pkg/client/cache:go_default_library", @@ -56,8 +55,10 @@ go_test( "//pkg/quota/generic:go_default_library", "//pkg/quota/install:go_default_library", "//vendor:github.com/hashicorp/golang-lru", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/util/sets", + "//vendor:k8s.io/apiserver/pkg/admission", ], ) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/resourcequota/admission.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/resourcequota/admission.go index 42a51cbe..95438166 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/resourcequota/admission.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/resourcequota/admission.go @@ -21,7 +21,7 @@ import ( "io" "time" - "k8s.io/kubernetes/pkg/admission" + "k8s.io/apiserver/pkg/admission" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" kubeapiserveradmission "k8s.io/kubernetes/pkg/kubeapiserver/admission" diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/resourcequota/admission_test.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/resourcequota/admission_test.go index ca2edc6b..7df423d1 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/resourcequota/admission_test.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/resourcequota/admission_test.go @@ -24,9 +24,10 @@ import ( lru "github.com/hashicorp/golang-lru" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/kubernetes/pkg/admission" + "k8s.io/apiserver/pkg/admission" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/client/cache" @@ -57,7 +58,7 @@ func getResourceRequirements(requests, limits api.ResourceList) api.ResourceRequ func validPod(name string, numContainers int, resources api.ResourceRequirements) *api.Pod { pod := &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: name, Namespace: "test"}, + ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: "test"}, Spec: api.PodSpec{}, } pod.Spec.Containers = make([]api.Container, 0, numContainers) @@ -72,7 +73,7 @@ func validPod(name string, numContainers int, resources api.ResourceRequirements func validPersistentVolumeClaim(name string, resources api.ResourceRequirements) *api.PersistentVolumeClaim { return &api.PersistentVolumeClaim{ - ObjectMeta: api.ObjectMeta{Name: name, Namespace: "test"}, + ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: "test"}, Spec: api.PersistentVolumeClaimSpec{ Resources: resources, }, @@ -184,7 +185,7 @@ func TestAdmissionIgnoresSubresources(t *testing.T) { // TestAdmitBelowQuotaLimit verifies that a pod when created has its usage reflected on the quota func TestAdmitBelowQuotaLimit(t *testing.T) { resourceQuota := &api.ResourceQuota{ - ObjectMeta: api.ObjectMeta{Name: "quota", Namespace: "test", ResourceVersion: "124"}, + ObjectMeta: metav1.ObjectMeta{Name: "quota", Namespace: "test", ResourceVersion: "124"}, Status: api.ResourceQuotaStatus{ Hard: api.ResourceList{ api.ResourceCPU: resource.MustParse("3"), @@ -264,7 +265,7 @@ func TestAdmitBelowQuotaLimit(t *testing.T) { func TestAdmitHandlesOldObjects(t *testing.T) { // in this scenario, the old quota was based on a service type=loadbalancer resourceQuota := &api.ResourceQuota{ - ObjectMeta: api.ObjectMeta{Name: "quota", Namespace: "test", ResourceVersion: "124"}, + ObjectMeta: metav1.ObjectMeta{Name: "quota", Namespace: "test", ResourceVersion: "124"}, Status: api.ResourceQuotaStatus{ Hard: api.ResourceList{ api.ResourceServices: resource.MustParse("10"), @@ -298,11 +299,11 @@ func TestAdmitHandlesOldObjects(t *testing.T) { // old service was a load balancer, but updated version is a node port. existingService := &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "service", Namespace: "test", ResourceVersion: "1"}, + ObjectMeta: metav1.ObjectMeta{Name: "service", Namespace: "test", ResourceVersion: "1"}, Spec: api.ServiceSpec{Type: api.ServiceTypeLoadBalancer}, } newService := &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "service", Namespace: "test"}, + ObjectMeta: metav1.ObjectMeta{Name: "service", Namespace: "test"}, Spec: api.ServiceSpec{ Type: api.ServiceTypeNodePort, Ports: []api.ServicePort{{Port: 1234}}, @@ -360,7 +361,7 @@ func TestAdmitHandlesOldObjects(t *testing.T) { func TestAdmitHandlesCreatingUpdates(t *testing.T) { // in this scenario, there is an existing service resourceQuota := &api.ResourceQuota{ - ObjectMeta: api.ObjectMeta{Name: "quota", Namespace: "test", ResourceVersion: "124"}, + ObjectMeta: metav1.ObjectMeta{Name: "quota", Namespace: "test", ResourceVersion: "124"}, Status: api.ResourceQuotaStatus{ Hard: api.ResourceList{ api.ResourceServices: resource.MustParse("10"), @@ -394,11 +395,11 @@ func TestAdmitHandlesCreatingUpdates(t *testing.T) { // old service didn't exist, so this update is actually a create oldService := &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "service", Namespace: "test", ResourceVersion: ""}, + ObjectMeta: metav1.ObjectMeta{Name: "service", Namespace: "test", ResourceVersion: ""}, Spec: api.ServiceSpec{Type: api.ServiceTypeLoadBalancer}, } newService := &api.Service{ - ObjectMeta: api.ObjectMeta{Name: "service", Namespace: "test"}, + ObjectMeta: metav1.ObjectMeta{Name: "service", Namespace: "test"}, Spec: api.ServiceSpec{ Type: api.ServiceTypeNodePort, Ports: []api.ServicePort{{Port: 1234}}, @@ -455,7 +456,7 @@ func TestAdmitHandlesCreatingUpdates(t *testing.T) { // TestAdmitExceedQuotaLimit verifies that if a pod exceeded allowed usage that its rejected during admission. func TestAdmitExceedQuotaLimit(t *testing.T) { resourceQuota := &api.ResourceQuota{ - ObjectMeta: api.ObjectMeta{Name: "quota", Namespace: "test", ResourceVersion: "124"}, + ObjectMeta: metav1.ObjectMeta{Name: "quota", Namespace: "test", ResourceVersion: "124"}, Status: api.ResourceQuotaStatus{ Hard: api.ResourceList{ api.ResourceCPU: resource.MustParse("3"), @@ -496,7 +497,7 @@ func TestAdmitExceedQuotaLimit(t *testing.T) { // We ensure that a pod that does not specify a memory limit that it fails in admission. func TestAdmitEnforceQuotaConstraints(t *testing.T) { resourceQuota := &api.ResourceQuota{ - ObjectMeta: api.ObjectMeta{Name: "quota", Namespace: "test", ResourceVersion: "124"}, + ObjectMeta: metav1.ObjectMeta{Name: "quota", Namespace: "test", ResourceVersion: "124"}, Status: api.ResourceQuotaStatus{ Hard: api.ResourceList{ api.ResourceCPU: resource.MustParse("3"), @@ -544,7 +545,7 @@ func TestAdmitEnforceQuotaConstraints(t *testing.T) { // TestAdmitPodInNamespaceWithoutQuota ensures that if a namespace has no quota, that a pod can get in func TestAdmitPodInNamespaceWithoutQuota(t *testing.T) { resourceQuota := &api.ResourceQuota{ - ObjectMeta: api.ObjectMeta{Name: "quota", Namespace: "other", ResourceVersion: "124"}, + ObjectMeta: metav1.ObjectMeta{Name: "quota", Namespace: "other", ResourceVersion: "124"}, Status: api.ResourceQuotaStatus{ Hard: api.ResourceList{ api.ResourceCPU: resource.MustParse("3"), @@ -595,7 +596,7 @@ func TestAdmitPodInNamespaceWithoutQuota(t *testing.T) { // It ensures that the terminating quota is incremented, and the non-terminating quota is not. func TestAdmitBelowTerminatingQuotaLimit(t *testing.T) { resourceQuotaNonTerminating := &api.ResourceQuota{ - ObjectMeta: api.ObjectMeta{Name: "quota-non-terminating", Namespace: "test", ResourceVersion: "124"}, + ObjectMeta: metav1.ObjectMeta{Name: "quota-non-terminating", Namespace: "test", ResourceVersion: "124"}, Spec: api.ResourceQuotaSpec{ Scopes: []api.ResourceQuotaScope{api.ResourceQuotaScopeNotTerminating}, }, @@ -613,7 +614,7 @@ func TestAdmitBelowTerminatingQuotaLimit(t *testing.T) { }, } resourceQuotaTerminating := &api.ResourceQuota{ - ObjectMeta: api.ObjectMeta{Name: "quota-terminating", Namespace: "test", ResourceVersion: "124"}, + ObjectMeta: metav1.ObjectMeta{Name: "quota-terminating", Namespace: "test", ResourceVersion: "124"}, Spec: api.ResourceQuotaSpec{ Scopes: []api.ResourceQuotaScope{api.ResourceQuotaScopeTerminating}, }, @@ -707,7 +708,7 @@ func TestAdmitBelowTerminatingQuotaLimit(t *testing.T) { // It verifies that best effort pods are properly scoped to the best effort quota document. func TestAdmitBelowBestEffortQuotaLimit(t *testing.T) { resourceQuotaBestEffort := &api.ResourceQuota{ - ObjectMeta: api.ObjectMeta{Name: "quota-besteffort", Namespace: "test", ResourceVersion: "124"}, + ObjectMeta: metav1.ObjectMeta{Name: "quota-besteffort", Namespace: "test", ResourceVersion: "124"}, Spec: api.ResourceQuotaSpec{ Scopes: []api.ResourceQuotaScope{api.ResourceQuotaScopeBestEffort}, }, @@ -721,7 +722,7 @@ func TestAdmitBelowBestEffortQuotaLimit(t *testing.T) { }, } resourceQuotaNotBestEffort := &api.ResourceQuota{ - ObjectMeta: api.ObjectMeta{Name: "quota-not-besteffort", Namespace: "test", ResourceVersion: "124"}, + ObjectMeta: metav1.ObjectMeta{Name: "quota-not-besteffort", Namespace: "test", ResourceVersion: "124"}, Spec: api.ResourceQuotaSpec{ Scopes: []api.ResourceQuotaScope{api.ResourceQuotaScopeNotBestEffort}, }, @@ -812,7 +813,7 @@ func removeListWatch(in []testcore.Action) []testcore.Action { // guaranteed pod. func TestAdmitBestEffortQuotaLimitIgnoresBurstable(t *testing.T) { resourceQuota := &api.ResourceQuota{ - ObjectMeta: api.ObjectMeta{Name: "quota-besteffort", Namespace: "test", ResourceVersion: "124"}, + ObjectMeta: metav1.ObjectMeta{Name: "quota-besteffort", Namespace: "test", ResourceVersion: "124"}, Spec: api.ResourceQuotaSpec{ Scopes: []api.ResourceQuotaScope{api.ResourceQuotaScopeBestEffort}, }, @@ -898,7 +899,7 @@ func TestHasUsageStats(t *testing.T) { func TestAdmissionSetsMissingNamespace(t *testing.T) { namespace := "test" resourceQuota := &api.ResourceQuota{ - ObjectMeta: api.ObjectMeta{Name: "quota", Namespace: namespace, ResourceVersion: "124"}, + ObjectMeta: metav1.ObjectMeta{Name: "quota", Namespace: namespace, ResourceVersion: "124"}, Status: api.ResourceQuotaStatus{ Hard: api.ResourceList{ api.ResourcePods: resource.MustParse("3"), @@ -953,7 +954,7 @@ func TestAdmissionSetsMissingNamespace(t *testing.T) { // TestAdmitRejectsNegativeUsage verifies that usage for any measured resource cannot be negative. func TestAdmitRejectsNegativeUsage(t *testing.T) { resourceQuota := &api.ResourceQuota{ - ObjectMeta: api.ObjectMeta{Name: "quota", Namespace: "test", ResourceVersion: "124"}, + ObjectMeta: metav1.ObjectMeta{Name: "quota", Namespace: "test", ResourceVersion: "124"}, Status: api.ResourceQuotaStatus{ Hard: api.ResourceList{ api.ResourcePersistentVolumeClaims: resource.MustParse("3"), @@ -998,7 +999,7 @@ func TestAdmitRejectsNegativeUsage(t *testing.T) { // TestAdmitWhenUnrelatedResourceExceedsQuota verifies that if resource X exceeds quota, it does not prohibit resource Y from admission. func TestAdmitWhenUnrelatedResourceExceedsQuota(t *testing.T) { resourceQuota := &api.ResourceQuota{ - ObjectMeta: api.ObjectMeta{Name: "quota", Namespace: "test", ResourceVersion: "124"}, + ObjectMeta: metav1.ObjectMeta{Name: "quota", Namespace: "test", ResourceVersion: "124"}, Status: api.ResourceQuotaStatus{ Hard: api.ResourceList{ api.ResourceServices: resource.MustParse("3"), diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/resourcequota/controller.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/resourcequota/controller.go index 4fd308a7..79f355e4 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/resourcequota/controller.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/resourcequota/controller.go @@ -29,7 +29,7 @@ import ( utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/kubernetes/pkg/admission" + "k8s.io/apiserver/pkg/admission" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/quota" "k8s.io/kubernetes/pkg/util/workqueue" diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/resourcequota/resource_access.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/resourcequota/resource_access.go index 8656cbdb..2c35bc64 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/resourcequota/resource_access.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/resourcequota/resource_access.go @@ -23,14 +23,13 @@ import ( "github.com/golang/glog" lru "github.com/hashicorp/golang-lru" - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" - + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/watch" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/cache" + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" "k8s.io/kubernetes/pkg/storage/etcd" ) @@ -74,15 +73,11 @@ func newQuotaAccessor(client clientset.Interface) (*quotaAccessor, error) { return nil, err } lw := &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - internalOptions := api.ListOptions{} - v1.Convert_v1_ListOptions_To_api_ListOptions(&options, &internalOptions, nil) - return client.Core().ResourceQuotas(api.NamespaceAll).List(internalOptions) + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + return client.Core().ResourceQuotas(metav1.NamespaceAll).List(options) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - internalOptions := api.ListOptions{} - v1.Convert_v1_ListOptions_To_api_ListOptions(&options, &internalOptions, nil) - return client.Core().ResourceQuotas(api.NamespaceAll).Watch(internalOptions) + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + return client.Core().ResourceQuotas(metav1.NamespaceAll).Watch(options) }, } indexer, reflector := cache.NewNamespaceKeyedIndexerAndReflector(lw, &api.ResourceQuota{}, 0) @@ -141,7 +136,7 @@ func (e *quotaAccessor) checkCache(quota *api.ResourceQuota) *api.ResourceQuota func (e *quotaAccessor) GetQuotas(namespace string) ([]api.ResourceQuota, error) { // determine if there are any quotas in this namespace // if there are no quotas, we don't need to do anything - items, err := e.indexer.Index("namespace", &api.ResourceQuota{ObjectMeta: api.ObjectMeta{Namespace: namespace, Name: ""}}) + items, err := e.indexer.Index("namespace", &api.ResourceQuota{ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: ""}}) if err != nil { return nil, fmt.Errorf("error resolving quota.") } @@ -155,7 +150,7 @@ func (e *quotaAccessor) GetQuotas(namespace string) ([]api.ResourceQuota, error) // If there is already in-flight List() for a given namespace, we should wait until // it is finished and cache is updated instead of doing the same, also to avoid // throttling - see #22422 for details. - liveList, err := e.client.Core().ResourceQuotas(namespace).List(api.ListOptions{}) + liveList, err := e.client.Core().ResourceQuotas(namespace).List(metav1.ListOptions{}) if err != nil { return nil, err } diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/security/podsecuritypolicy/BUILD b/vendor/k8s.io/kubernetes/plugin/pkg/admission/security/podsecuritypolicy/BUILD index 9b9b5165..bc3d2f63 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/security/podsecuritypolicy/BUILD +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/security/podsecuritypolicy/BUILD @@ -13,9 +13,7 @@ go_library( srcs = ["admission.go"], tags = ["automanaged"], deps = [ - "//pkg/admission:go_default_library", "//pkg/api:go_default_library", - "//pkg/api/v1:go_default_library", "//pkg/apis/extensions:go_default_library", "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/internalclientset:go_default_library", @@ -27,9 +25,11 @@ go_library( "//pkg/util/maps:go_default_library", "//vendor:github.com/golang/glog", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/validation/field", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/apiserver/pkg/admission", "//vendor:k8s.io/apiserver/pkg/authentication/user", "//vendor:k8s.io/apiserver/pkg/authorization/authorizer", ], @@ -41,7 +41,6 @@ go_test( library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/admission:go_default_library", "//pkg/api:go_default_library", "//pkg/apis/extensions:go_default_library", "//pkg/client/cache:go_default_library", @@ -50,8 +49,10 @@ go_test( "//pkg/security/podsecuritypolicy/seccomp:go_default_library", "//pkg/security/podsecuritypolicy/util:go_default_library", "//vendor:github.com/stretchr/testify/assert", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/util/diff", "//vendor:k8s.io/apimachinery/pkg/util/sets", + "//vendor:k8s.io/apiserver/pkg/admission", "//vendor:k8s.io/apiserver/pkg/authentication/user", "//vendor:k8s.io/apiserver/pkg/authorization/authorizer", ], diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/security/podsecuritypolicy/admission.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/security/podsecuritypolicy/admission.go index 821d8429..39d45e75 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/security/podsecuritypolicy/admission.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/security/podsecuritypolicy/admission.go @@ -24,14 +24,14 @@ import ( "github.com/golang/glog" "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/validation/field" "k8s.io/apimachinery/pkg/watch" + "k8s.io/apiserver/pkg/admission" "k8s.io/apiserver/pkg/authentication/user" "k8s.io/apiserver/pkg/authorization/authorizer" - "k8s.io/kubernetes/pkg/admission" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/apis/extensions" "k8s.io/kubernetes/pkg/client/cache" "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" @@ -108,15 +108,11 @@ func (a *podSecurityPolicyPlugin) SetInternalClientSet(client internalclientset. a.store = cache.NewStore(cache.MetaNamespaceKeyFunc) a.reflector = cache.NewReflector( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - internalOptions := api.ListOptions{} - v1.Convert_v1_ListOptions_To_api_ListOptions(&options, &internalOptions, nil) - return client.Extensions().PodSecurityPolicies().List(internalOptions) + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + return client.Extensions().PodSecurityPolicies().List(options) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - internalOptions := api.ListOptions{} - v1.Convert_v1_ListOptions_To_api_ListOptions(&options, &internalOptions, nil) - return client.Extensions().PodSecurityPolicies().Watch(internalOptions) + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + return client.Extensions().PodSecurityPolicies().Watch(options) }, }, &extensions.PodSecurityPolicy{}, diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/security/podsecuritypolicy/admission_test.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/security/podsecuritypolicy/admission_test.go index 55edc384..72e00269 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/security/podsecuritypolicy/admission_test.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/security/podsecuritypolicy/admission_test.go @@ -24,11 +24,12 @@ import ( "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/diff" "k8s.io/apimachinery/pkg/util/sets" + kadmission "k8s.io/apiserver/pkg/admission" "k8s.io/apiserver/pkg/authentication/user" "k8s.io/apiserver/pkg/authorization/authorizer" - kadmission "k8s.io/kubernetes/pkg/admission" kapi "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/extensions" "k8s.io/kubernetes/pkg/client/cache" @@ -172,7 +173,7 @@ func TestAdmitSeccomp(t *testing.T) { psp := restrictivePSP() psp.Annotations = v.pspAnnotations pod := &kapi.Pod{ - ObjectMeta: kapi.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: v.podAnnotations, }, Spec: kapi.PodSpec{ @@ -1457,7 +1458,7 @@ func TestCreateProvidersFromConstraints(t *testing.T) { "valid psp": { psp: func() *extensions.PodSecurityPolicy { return &extensions.PodSecurityPolicy{ - ObjectMeta: kapi.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "valid psp", }, Spec: extensions.PodSecurityPolicySpec{ @@ -1480,7 +1481,7 @@ func TestCreateProvidersFromConstraints(t *testing.T) { "bad psp strategy options": { psp: func() *extensions.PodSecurityPolicy { return &extensions.PodSecurityPolicy{ - ObjectMeta: kapi.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "bad psp user options", }, Spec: extensions.PodSecurityPolicySpec{ @@ -1650,7 +1651,7 @@ func TestGetMatchingPolicies(t *testing.T) { func restrictivePSP() *extensions.PodSecurityPolicy { return &extensions.PodSecurityPolicy{ - ObjectMeta: kapi.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "restrictive", Annotations: map[string]string{}, }, @@ -1685,7 +1686,7 @@ func restrictivePSP() *extensions.PodSecurityPolicy { func createNamespaceForTest() *kapi.Namespace { return &kapi.Namespace{ - ObjectMeta: kapi.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "default", }, } @@ -1693,7 +1694,7 @@ func createNamespaceForTest() *kapi.Namespace { func createSAForTest() *kapi.ServiceAccount { return &kapi.ServiceAccount{ - ObjectMeta: kapi.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "default", Name: "default", }, @@ -1705,7 +1706,7 @@ func createSAForTest() *kapi.ServiceAccount { // psp when defaults are filled in. func goodPod() *kapi.Pod { return &kapi.Pod{ - ObjectMeta: kapi.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{}, }, Spec: kapi.PodSpec{ diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/securitycontext/scdeny/BUILD b/vendor/k8s.io/kubernetes/plugin/pkg/admission/securitycontext/scdeny/BUILD index cbd040b2..3b31cec0 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/securitycontext/scdeny/BUILD +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/securitycontext/scdeny/BUILD @@ -13,9 +13,9 @@ go_library( srcs = ["admission.go"], tags = ["automanaged"], deps = [ - "//pkg/admission:go_default_library", "//pkg/api:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apiserver/pkg/admission", ], ) @@ -25,8 +25,8 @@ go_test( library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/admission:go_default_library", "//pkg/api:go_default_library", + "//vendor:k8s.io/apiserver/pkg/admission", ], ) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/securitycontext/scdeny/admission.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/securitycontext/scdeny/admission.go index 706dae60..db3cc968 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/securitycontext/scdeny/admission.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/securitycontext/scdeny/admission.go @@ -21,7 +21,7 @@ import ( "io" apierrors "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/kubernetes/pkg/admission" + "k8s.io/apiserver/pkg/admission" "k8s.io/kubernetes/pkg/api" ) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/securitycontext/scdeny/admission_test.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/securitycontext/scdeny/admission_test.go index d96e2240..faeeab1e 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/securitycontext/scdeny/admission_test.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/securitycontext/scdeny/admission_test.go @@ -19,7 +19,7 @@ package scdeny import ( "testing" - "k8s.io/kubernetes/pkg/admission" + "k8s.io/apiserver/pkg/admission" "k8s.io/kubernetes/pkg/api" ) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/serviceaccount/BUILD b/vendor/k8s.io/kubernetes/plugin/pkg/admission/serviceaccount/BUILD index ab9b8156..7706d7dc 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/serviceaccount/BUILD +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/serviceaccount/BUILD @@ -16,21 +16,20 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/admission:go_default_library", "//pkg/api:go_default_library", - "//pkg/api/v1:go_default_library", "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/internalclientset:go_default_library", - "//pkg/fields:go_default_library", "//pkg/kubeapiserver/admission:go_default_library", "//pkg/kubelet/types:go_default_library", "//pkg/serviceaccount:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apimachinery/pkg/util/sets", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/apiserver/pkg/admission", "//vendor:k8s.io/apiserver/pkg/storage/names", ], ) @@ -41,12 +40,13 @@ go_test( library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/admission:go_default_library", "//pkg/api:go_default_library", "//pkg/client/clientset_generated/internalclientset/fake:go_default_library", "//pkg/kubelet/types:go_default_library", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/types", + "//vendor:k8s.io/apiserver/pkg/admission", ], ) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/serviceaccount/admission.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/serviceaccount/admission.go index 760ed091..cf68bfb9 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/serviceaccount/admission.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/serviceaccount/admission.go @@ -25,17 +25,16 @@ import ( "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/watch" + "k8s.io/apiserver/pkg/admission" "k8s.io/apiserver/pkg/storage/names" - "k8s.io/kubernetes/pkg/admission" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/cache" "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" - "k8s.io/kubernetes/pkg/fields" kubeapiserveradmission "k8s.io/kubernetes/pkg/kubeapiserver/admission" kubelet "k8s.io/kubernetes/pkg/kubelet/types" "k8s.io/kubernetes/pkg/serviceaccount" @@ -108,15 +107,11 @@ func (a *serviceAccount) SetInternalClientSet(cl internalclientset.Interface) { a.client = cl a.serviceAccounts, a.serviceAccountsReflector = cache.NewNamespaceKeyedIndexerAndReflector( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - internalOptions := api.ListOptions{} - v1.Convert_v1_ListOptions_To_api_ListOptions(&options, &internalOptions, nil) - return cl.Core().ServiceAccounts(api.NamespaceAll).List(internalOptions) + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + return cl.Core().ServiceAccounts(metav1.NamespaceAll).List(options) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - internalOptions := api.ListOptions{} - v1.Convert_v1_ListOptions_To_api_ListOptions(&options, &internalOptions, nil) - return cl.Core().ServiceAccounts(api.NamespaceAll).Watch(internalOptions) + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + return cl.Core().ServiceAccounts(metav1.NamespaceAll).Watch(options) }, }, &api.ServiceAccount{}, @@ -126,17 +121,13 @@ func (a *serviceAccount) SetInternalClientSet(cl internalclientset.Interface) { tokenSelector := fields.SelectorFromSet(map[string]string{api.SecretTypeField: string(api.SecretTypeServiceAccountToken)}) a.secrets, a.secretsReflector = cache.NewNamespaceKeyedIndexerAndReflector( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - internalOptions := api.ListOptions{} - v1.Convert_v1_ListOptions_To_api_ListOptions(&options, &internalOptions, nil) - internalOptions.FieldSelector = tokenSelector - return cl.Core().Secrets(api.NamespaceAll).List(internalOptions) + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + options.FieldSelector = tokenSelector.String() + return cl.Core().Secrets(metav1.NamespaceAll).List(options) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - internalOptions := api.ListOptions{} - v1.Convert_v1_ListOptions_To_api_ListOptions(&options, &internalOptions, nil) - internalOptions.FieldSelector = tokenSelector - return cl.Core().Secrets(api.NamespaceAll).Watch(internalOptions) + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + options.FieldSelector = tokenSelector.String() + return cl.Core().Secrets(metav1.NamespaceAll).Watch(options) }, }, &api.Secret{}, @@ -265,7 +256,7 @@ func (s *serviceAccount) enforceMountableSecrets(serviceAccount *api.ServiceAcco // getServiceAccount returns the ServiceAccount for the given namespace and name if it exists func (s *serviceAccount) getServiceAccount(namespace string, name string) (*api.ServiceAccount, error) { - key := &api.ServiceAccount{ObjectMeta: api.ObjectMeta{Namespace: namespace}} + key := &api.ServiceAccount{ObjectMeta: metav1.ObjectMeta{Namespace: namespace}} index, err := s.serviceAccounts.Index("namespace", key) if err != nil { return nil, err @@ -327,7 +318,7 @@ func (s *serviceAccount) getReferencedServiceAccountToken(serviceAccount *api.Se // getServiceAccountTokens returns all ServiceAccountToken secrets for the given ServiceAccount func (s *serviceAccount) getServiceAccountTokens(serviceAccount *api.ServiceAccount) ([]*api.Secret, error) { - key := &api.Secret{ObjectMeta: api.ObjectMeta{Namespace: serviceAccount.Namespace}} + key := &api.Secret{ObjectMeta: metav1.ObjectMeta{Namespace: serviceAccount.Namespace}} index, err := s.secrets.Index("namespace", key) if err != nil { return nil, err diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/serviceaccount/admission_test.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/serviceaccount/admission_test.go index 96478459..1447054c 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/serviceaccount/admission_test.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/serviceaccount/admission_test.go @@ -22,8 +22,9 @@ import ( "testing" "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - "k8s.io/kubernetes/pkg/admission" + "k8s.io/apiserver/pkg/admission" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/fake" kubelet "k8s.io/kubernetes/pkg/kubelet/types" @@ -69,7 +70,7 @@ func TestIgnoresNonPodObject(t *testing.T) { func TestIgnoresMirrorPod(t *testing.T) { pod := &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ kubelet.ConfigMirrorAnnotationKey: "true", }, @@ -89,7 +90,7 @@ func TestIgnoresMirrorPod(t *testing.T) { func TestRejectsMirrorPodWithServiceAccount(t *testing.T) { pod := &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ kubelet.ConfigMirrorAnnotationKey: "true", }, @@ -107,7 +108,7 @@ func TestRejectsMirrorPodWithServiceAccount(t *testing.T) { func TestRejectsMirrorPodWithSecretVolumes(t *testing.T) { pod := &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ kubelet.ConfigMirrorAnnotationKey: "true", }, @@ -135,7 +136,7 @@ func TestAssignsDefaultServiceAccountAndToleratesMissingAPIToken(t *testing.T) { // Add the default service account for the ns into the cache admit.serviceAccounts.Add(&api.ServiceAccount{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: DefaultServiceAccountName, Namespace: ns, }, @@ -162,7 +163,7 @@ func TestAssignsDefaultServiceAccountAndRejectsMissingAPIToken(t *testing.T) { // Add the default service account for the ns into the cache admit.serviceAccounts.Add(&api.ServiceAccount{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: DefaultServiceAccountName, Namespace: ns, }, @@ -181,7 +182,7 @@ func TestFetchesUncachedServiceAccount(t *testing.T) { // Build a test client that the admission plugin can use to look up the service account missing from its cache client := fake.NewSimpleClientset(&api.ServiceAccount{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: DefaultServiceAccountName, Namespace: ns, }, @@ -245,7 +246,7 @@ func TestAutomountsAPIToken(t *testing.T) { // Add the default service account for the ns with a token into the cache admit.serviceAccounts.Add(&api.ServiceAccount{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: serviceAccountName, Namespace: ns, UID: types.UID(serviceAccountUID), @@ -256,7 +257,7 @@ func TestAutomountsAPIToken(t *testing.T) { }) // Add a token for the service account into the cache admit.secrets.Add(&api.Secret{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: tokenName, Namespace: ns, Annotations: map[string]string{ @@ -345,7 +346,7 @@ func TestRespectsExistingMount(t *testing.T) { // Add the default service account for the ns with a token into the cache admit.serviceAccounts.Add(&api.ServiceAccount{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: serviceAccountName, Namespace: ns, UID: types.UID(serviceAccountUID), @@ -356,7 +357,7 @@ func TestRespectsExistingMount(t *testing.T) { }) // Add a token for the service account into the cache admit.secrets.Add(&api.Secret{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: tokenName, Namespace: ns, Annotations: map[string]string{ @@ -442,7 +443,7 @@ func TestAllowsReferencedSecret(t *testing.T) { // Add the default service account for the ns with a secret reference into the cache admit.serviceAccounts.Add(&api.ServiceAccount{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: DefaultServiceAccountName, Namespace: ns, }, @@ -522,7 +523,7 @@ func TestRejectsUnreferencedSecretVolumes(t *testing.T) { // Add the default service account for the ns into the cache admit.serviceAccounts.Add(&api.ServiceAccount{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: DefaultServiceAccountName, Namespace: ns, }, @@ -599,7 +600,7 @@ func TestAllowUnreferencedSecretVolumesForPermissiveSAs(t *testing.T) { // Add the default service account for the ns into the cache admit.serviceAccounts.Add(&api.ServiceAccount{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: DefaultServiceAccountName, Namespace: ns, Annotations: map[string]string{EnforceMountableSecretsAnnotation: "true"}, @@ -630,7 +631,7 @@ func TestAllowsReferencedImagePullSecrets(t *testing.T) { // Add the default service account for the ns with a secret reference into the cache admit.serviceAccounts.Add(&api.ServiceAccount{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: DefaultServiceAccountName, Namespace: ns, }, @@ -661,7 +662,7 @@ func TestRejectsUnreferencedImagePullSecrets(t *testing.T) { // Add the default service account for the ns into the cache admit.serviceAccounts.Add(&api.ServiceAccount{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: DefaultServiceAccountName, Namespace: ns, }, @@ -689,7 +690,7 @@ func TestDoNotAddImagePullSecrets(t *testing.T) { // Add the default service account for the ns with a secret reference into the cache admit.serviceAccounts.Add(&api.ServiceAccount{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: DefaultServiceAccountName, Namespace: ns, }, @@ -724,7 +725,7 @@ func TestAddImagePullSecrets(t *testing.T) { admit.RequireAPIToken = false sa := &api.ServiceAccount{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: DefaultServiceAccountName, Namespace: ns, }, diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/storageclass/default/BUILD b/vendor/k8s.io/kubernetes/plugin/pkg/admission/storageclass/default/BUILD index d7618773..8fce57f4 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/storageclass/default/BUILD +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/storageclass/default/BUILD @@ -13,9 +13,7 @@ go_library( srcs = ["admission.go"], tags = ["automanaged"], deps = [ - "//pkg/admission:go_default_library", "//pkg/api:go_default_library", - "//pkg/api/v1:go_default_library", "//pkg/apis/storage:go_default_library", "//pkg/apis/storage/util:go_default_library", "//pkg/client/cache:go_default_library", @@ -23,8 +21,10 @@ go_library( "//pkg/kubeapiserver/admission:go_default_library", "//vendor:github.com/golang/glog", "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/apiserver/pkg/admission", ], ) @@ -34,12 +34,12 @@ go_test( library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/admission:go_default_library", "//pkg/api:go_default_library", "//pkg/apis/storage:go_default_library", "//pkg/apis/storage/util:go_default_library", "//vendor:github.com/golang/glog", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apiserver/pkg/admission", ], ) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/storageclass/default/admission.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/storageclass/default/admission.go index 1b1b6dae..2ae18ec6 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/storageclass/default/admission.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/storageclass/default/admission.go @@ -23,11 +23,11 @@ import ( "github.com/golang/glog" "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" - admission "k8s.io/kubernetes/pkg/admission" + admission "k8s.io/apiserver/pkg/admission" api "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/apis/storage" storageutil "k8s.io/kubernetes/pkg/apis/storage/util" "k8s.io/kubernetes/pkg/client/cache" @@ -71,15 +71,11 @@ func (a *claimDefaulterPlugin) SetInternalClientSet(client internalclientset.Int a.store = cache.NewStore(cache.MetaNamespaceKeyFunc) a.reflector = cache.NewReflector( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - internalOptions := api.ListOptions{} - v1.Convert_v1_ListOptions_To_api_ListOptions(&options, &internalOptions, nil) - return client.Storage().StorageClasses().List(internalOptions) + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + return client.Storage().StorageClasses().List(options) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - internalOptions := api.ListOptions{} - v1.Convert_v1_ListOptions_To_api_ListOptions(&options, &internalOptions, nil) - return client.Storage().StorageClasses().Watch(internalOptions) + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + return client.Storage().StorageClasses().Watch(options) }, }, &storage.StorageClass{}, diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/admission/storageclass/default/admission_test.go b/vendor/k8s.io/kubernetes/plugin/pkg/admission/storageclass/default/admission_test.go index 9c4f8282..ff953a17 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/admission/storageclass/default/admission_test.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/admission/storageclass/default/admission_test.go @@ -22,7 +22,7 @@ import ( "github.com/golang/glog" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/kubernetes/pkg/admission" + "k8s.io/apiserver/pkg/admission" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/storage" storageutil "k8s.io/kubernetes/pkg/apis/storage/util" @@ -33,7 +33,7 @@ func TestAdmission(t *testing.T) { TypeMeta: metav1.TypeMeta{ Kind: "StorageClass", }, - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "default1", Annotations: map[string]string{ storageutil.IsDefaultStorageClassAnnotation: "true", @@ -45,7 +45,7 @@ func TestAdmission(t *testing.T) { TypeMeta: metav1.TypeMeta{ Kind: "StorageClass", }, - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "default2", Annotations: map[string]string{ storageutil.IsDefaultStorageClassAnnotation: "true", @@ -58,7 +58,7 @@ func TestAdmission(t *testing.T) { TypeMeta: metav1.TypeMeta{ Kind: "StorageClass", }, - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "nondefault1", Annotations: map[string]string{ storageutil.IsDefaultStorageClassAnnotation: "false", @@ -71,7 +71,7 @@ func TestAdmission(t *testing.T) { TypeMeta: metav1.TypeMeta{ Kind: "StorageClass", }, - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "nondefault2", }, Provisioner: "nondefault1", @@ -81,7 +81,7 @@ func TestAdmission(t *testing.T) { TypeMeta: metav1.TypeMeta{ Kind: "StorageClass", }, - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "nondefault2", Annotations: map[string]string{ storageutil.IsDefaultStorageClassAnnotation: "", @@ -94,7 +94,7 @@ func TestAdmission(t *testing.T) { TypeMeta: metav1.TypeMeta{ Kind: "PersistentVolumeClaim", }, - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "claimWithClass", Namespace: "ns", Annotations: map[string]string{ @@ -106,7 +106,7 @@ func TestAdmission(t *testing.T) { TypeMeta: metav1.TypeMeta{ Kind: "PersistentVolumeClaim", }, - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "claimWithEmptyClass", Namespace: "ns", Annotations: map[string]string{ @@ -118,7 +118,7 @@ func TestAdmission(t *testing.T) { TypeMeta: metav1.TypeMeta{ Kind: "PersistentVolumeClaim", }, - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "claimWithNoClass", Namespace: "ns", }, diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/auth/OWNERS b/vendor/k8s.io/kubernetes/plugin/pkg/auth/OWNERS index 766c481b..d2679c57 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/auth/OWNERS +++ b/vendor/k8s.io/kubernetes/plugin/pkg/auth/OWNERS @@ -1,3 +1,6 @@ -assignees: - - erictune - - liggitt +approvers: +- erictune +- liggitt +reviewers: +- erictune +- liggitt diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/auth/authenticator/password/keystone/BUILD b/vendor/k8s.io/kubernetes/plugin/pkg/auth/authenticator/password/keystone/BUILD index 179cc623..71b404e2 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/auth/authenticator/password/keystone/BUILD +++ b/vendor/k8s.io/kubernetes/plugin/pkg/auth/authenticator/password/keystone/BUILD @@ -15,12 +15,12 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/util/cert:go_default_library", "//vendor:github.com/golang/glog", "//vendor:github.com/rackspace/gophercloud", "//vendor:github.com/rackspace/gophercloud/openstack", "//vendor:k8s.io/apimachinery/pkg/util/net", "//vendor:k8s.io/apiserver/pkg/authentication/user", + "//vendor:k8s.io/client-go/util/cert", ], ) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/auth/authenticator/password/keystone/keystone.go b/vendor/k8s.io/kubernetes/plugin/pkg/auth/authenticator/password/keystone/keystone.go index ce792410..730bc06c 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/auth/authenticator/password/keystone/keystone.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/auth/authenticator/password/keystone/keystone.go @@ -27,7 +27,7 @@ import ( "github.com/rackspace/gophercloud/openstack" netutil "k8s.io/apimachinery/pkg/util/net" "k8s.io/apiserver/pkg/authentication/user" - certutil "k8s.io/kubernetes/pkg/util/cert" + certutil "k8s.io/client-go/util/cert" ) // KeystoneAuthenticator contacts openstack keystone to validate user's credentials passed in the request. diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/auth/authenticator/token/oidc/BUILD b/vendor/k8s.io/kubernetes/plugin/pkg/auth/authenticator/token/oidc/BUILD index ff2a3ea9..62d38d43 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/auth/authenticator/token/oidc/BUILD +++ b/vendor/k8s.io/kubernetes/plugin/pkg/auth/authenticator/token/oidc/BUILD @@ -13,13 +13,13 @@ go_library( srcs = ["oidc.go"], tags = ["automanaged"], deps = [ - "//pkg/util/cert:go_default_library", "//vendor:github.com/coreos/go-oidc/jose", "//vendor:github.com/coreos/go-oidc/oidc", "//vendor:github.com/golang/glog", "//vendor:k8s.io/apimachinery/pkg/util/net", "//vendor:k8s.io/apimachinery/pkg/util/runtime", "//vendor:k8s.io/apiserver/pkg/authentication/user", + "//vendor:k8s.io/client-go/util/cert", ], ) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/auth/authenticator/token/oidc/OWNERS b/vendor/k8s.io/kubernetes/plugin/pkg/auth/authenticator/token/oidc/OWNERS index 2f80bc7e..d2210cb8 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/auth/authenticator/token/oidc/OWNERS +++ b/vendor/k8s.io/kubernetes/plugin/pkg/auth/authenticator/token/oidc/OWNERS @@ -1,2 +1,4 @@ -assignees: - - ericchiang +approvers: +- ericchiang +reviewers: +- ericchiang diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/auth/authenticator/token/oidc/oidc.go b/vendor/k8s.io/kubernetes/plugin/pkg/auth/authenticator/token/oidc/oidc.go index 2187124b..1b6e8f31 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/auth/authenticator/token/oidc/oidc.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/auth/authenticator/token/oidc/oidc.go @@ -42,7 +42,7 @@ import ( "k8s.io/apimachinery/pkg/util/net" "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apiserver/pkg/authentication/user" - certutil "k8s.io/kubernetes/pkg/util/cert" + certutil "k8s.io/client-go/util/cert" ) type OIDCOptions struct { diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/auth/authenticator/token/webhook/BUILD b/vendor/k8s.io/kubernetes/plugin/pkg/auth/authenticator/token/webhook/BUILD index a2308ab7..d2a2bdd1 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/auth/authenticator/token/webhook/BUILD +++ b/vendor/k8s.io/kubernetes/plugin/pkg/auth/authenticator/token/webhook/BUILD @@ -18,7 +18,7 @@ go_library( "//vendor:k8s.io/apiserver/pkg/authentication/authenticator", "//vendor:k8s.io/apiserver/pkg/authentication/user", "//vendor:k8s.io/apiserver/pkg/util/cache", - "//vendor:k8s.io/apiserver/pkg/webhook", + "//vendor:k8s.io/apiserver/pkg/util/webhook", "//vendor:k8s.io/client-go/kubernetes/typed/authentication/v1beta1", "//vendor:k8s.io/client-go/pkg/apis/authentication/install", "//vendor:k8s.io/client-go/pkg/apis/authentication/v1beta1", @@ -35,9 +35,9 @@ go_test( tags = ["automanaged"], deps = [ "//pkg/apis/authentication/v1beta1:go_default_library", - "//pkg/client/unversioned/clientcmd/api/v1:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apiserver/pkg/authentication/user", + "//vendor:k8s.io/client-go/tools/clientcmd/api/v1", ], ) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/auth/authenticator/token/webhook/webhook.go b/vendor/k8s.io/kubernetes/plugin/pkg/auth/authenticator/token/webhook/webhook.go index 85476cbf..a9b50242 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/auth/authenticator/token/webhook/webhook.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/auth/authenticator/token/webhook/webhook.go @@ -27,7 +27,7 @@ import ( authenticationclient "k8s.io/client-go/kubernetes/typed/authentication/v1beta1" authentication "k8s.io/client-go/pkg/apis/authentication/v1beta1" - "k8s.io/apiserver/pkg/webhook" + "k8s.io/apiserver/pkg/util/webhook" _ "k8s.io/client-go/pkg/apis/authentication/install" _ "k8s.io/kubernetes/pkg/apis/authentication/install" diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/auth/authenticator/token/webhook/webhook_test.go b/vendor/k8s.io/kubernetes/plugin/pkg/auth/authenticator/token/webhook/webhook_test.go index aefdf056..18847c83 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/auth/authenticator/token/webhook/webhook_test.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/auth/authenticator/token/webhook/webhook_test.go @@ -32,8 +32,8 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apiserver/pkg/authentication/user" + "k8s.io/client-go/tools/clientcmd/api/v1" "k8s.io/kubernetes/pkg/apis/authentication/v1beta1" - "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/v1" ) // Service mocks a remote authentication service. diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/rbac/BUILD b/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/rbac/BUILD index 45ac8441..4677e176 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/rbac/BUILD +++ b/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/rbac/BUILD @@ -34,9 +34,9 @@ go_test( library = ":go_default_library", tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//pkg/apis/rbac:go_default_library", "//pkg/registry/rbac/validation:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apiserver/pkg/authentication/user", "//vendor:k8s.io/apiserver/pkg/authorization/authorizer", ], diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/BUILD b/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/BUILD index 3de0026d..fcdd401f 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/BUILD +++ b/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/BUILD @@ -16,9 +16,9 @@ go_library( ], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//pkg/apis/rbac:go_default_library", "//vendor:github.com/golang/glog", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apiserver/pkg/authentication/user", ], ) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/controller_policy.go b/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/controller_policy.go index 3572978c..ccbd08fb 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/controller_policy.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/controller_policy.go @@ -21,7 +21,7 @@ import ( "github.com/golang/glog" - "k8s.io/kubernetes/pkg/api" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" rbac "k8s.io/kubernetes/pkg/apis/rbac" ) @@ -59,7 +59,7 @@ func eventsRule() rbac.PolicyRule { func init() { addControllerRole(rbac.ClusterRole{ - ObjectMeta: api.ObjectMeta{Name: saRolePrefix + "attachdetach-controller"}, + ObjectMeta: metav1.ObjectMeta{Name: saRolePrefix + "attachdetach-controller"}, Rules: []rbac.PolicyRule{ rbac.NewRule("list", "watch").Groups(legacyGroup).Resources("persistentvolumes", "persistentvolumeclaims").RuleOrDie(), rbac.NewRule("get", "list", "watch").Groups(legacyGroup).Resources("nodes").RuleOrDie(), @@ -69,7 +69,7 @@ func init() { }, }) addControllerRole(rbac.ClusterRole{ - ObjectMeta: api.ObjectMeta{Name: saRolePrefix + "cronjob-controller"}, + ObjectMeta: metav1.ObjectMeta{Name: saRolePrefix + "cronjob-controller"}, Rules: []rbac.PolicyRule{ rbac.NewRule("get", "list", "watch", "update").Groups(batchGroup).Resources("cronjobs").RuleOrDie(), rbac.NewRule("get", "list", "watch", "create", "update", "delete").Groups(batchGroup).Resources("jobs").RuleOrDie(), @@ -79,7 +79,7 @@ func init() { }, }) addControllerRole(rbac.ClusterRole{ - ObjectMeta: api.ObjectMeta{Name: saRolePrefix + "daemon-set-controller"}, + ObjectMeta: metav1.ObjectMeta{Name: saRolePrefix + "daemon-set-controller"}, Rules: []rbac.PolicyRule{ rbac.NewRule("get", "list", "watch").Groups(extensionsGroup).Resources("daemonsets").RuleOrDie(), rbac.NewRule("update").Groups(extensionsGroup).Resources("daemonsets/status").RuleOrDie(), @@ -90,7 +90,7 @@ func init() { }, }) addControllerRole(rbac.ClusterRole{ - ObjectMeta: api.ObjectMeta{Name: saRolePrefix + "deployment-controller"}, + ObjectMeta: metav1.ObjectMeta{Name: saRolePrefix + "deployment-controller"}, Rules: []rbac.PolicyRule{ rbac.NewRule("get", "list", "watch", "update").Groups(extensionsGroup).Resources("deployments").RuleOrDie(), rbac.NewRule("update").Groups(extensionsGroup).Resources("deployments/status").RuleOrDie(), @@ -102,7 +102,7 @@ func init() { }, }) addControllerRole(rbac.ClusterRole{ - ObjectMeta: api.ObjectMeta{Name: saRolePrefix + "disruption-controller"}, + ObjectMeta: metav1.ObjectMeta{Name: saRolePrefix + "disruption-controller"}, Rules: []rbac.PolicyRule{ rbac.NewRule("get", "list", "watch").Groups(extensionsGroup).Resources("deployments").RuleOrDie(), rbac.NewRule("get", "list", "watch").Groups(extensionsGroup).Resources("replicasets").RuleOrDie(), @@ -114,7 +114,7 @@ func init() { }, }) addControllerRole(rbac.ClusterRole{ - ObjectMeta: api.ObjectMeta{Name: saRolePrefix + "endpoint-controller"}, + ObjectMeta: metav1.ObjectMeta{Name: saRolePrefix + "endpoint-controller"}, Rules: []rbac.PolicyRule{ rbac.NewRule("get", "list", "watch").Groups(legacyGroup).Resources("services", "pods").RuleOrDie(), rbac.NewRule("get", "list", "create", "update", "delete").Groups(legacyGroup).Resources("endpoints").RuleOrDie(), @@ -123,7 +123,7 @@ func init() { }, }) addControllerRole(rbac.ClusterRole{ - ObjectMeta: api.ObjectMeta{Name: saRolePrefix + "generic-garbage-collector"}, + ObjectMeta: metav1.ObjectMeta{Name: saRolePrefix + "generic-garbage-collector"}, Rules: []rbac.PolicyRule{ // the GC controller needs to run list/watches, selective gets, and updates against any resource rbac.NewRule("get", "list", "watch", "patch", "update", "delete").Groups("*").Resources("*").RuleOrDie(), @@ -131,7 +131,7 @@ func init() { }, }) addControllerRole(rbac.ClusterRole{ - ObjectMeta: api.ObjectMeta{Name: saRolePrefix + "horizontal-pod-autoscaler"}, + ObjectMeta: metav1.ObjectMeta{Name: saRolePrefix + "horizontal-pod-autoscaler"}, Rules: []rbac.PolicyRule{ rbac.NewRule("get", "list", "watch").Groups(autoscalingGroup, extensionsGroup).Resources("horizontalpodautoscalers").RuleOrDie(), rbac.NewRule("update").Groups(autoscalingGroup, extensionsGroup).Resources("horizontalpodautoscalers/status").RuleOrDie(), @@ -147,7 +147,7 @@ func init() { }, }) addControllerRole(rbac.ClusterRole{ - ObjectMeta: api.ObjectMeta{Name: saRolePrefix + "job-controller"}, + ObjectMeta: metav1.ObjectMeta{Name: saRolePrefix + "job-controller"}, Rules: []rbac.PolicyRule{ rbac.NewRule("get", "list", "watch", "update").Groups(batchGroup).Resources("jobs").RuleOrDie(), rbac.NewRule("update").Groups(batchGroup).Resources("jobs/status").RuleOrDie(), @@ -156,7 +156,7 @@ func init() { }, }) addControllerRole(rbac.ClusterRole{ - ObjectMeta: api.ObjectMeta{Name: saRolePrefix + "namespace-controller"}, + ObjectMeta: metav1.ObjectMeta{Name: saRolePrefix + "namespace-controller"}, Rules: []rbac.PolicyRule{ rbac.NewRule("get", "list", "watch", "delete").Groups(legacyGroup).Resources("namespaces").RuleOrDie(), rbac.NewRule("update").Groups(legacyGroup).Resources("namespaces/finalize", "namespaces/status").RuleOrDie(), @@ -164,7 +164,7 @@ func init() { }, }) addControllerRole(rbac.ClusterRole{ - ObjectMeta: api.ObjectMeta{Name: saRolePrefix + "node-controller"}, + ObjectMeta: metav1.ObjectMeta{Name: saRolePrefix + "node-controller"}, Rules: []rbac.PolicyRule{ rbac.NewRule("get", "list", "update", "delete").Groups(legacyGroup).Resources("nodes").RuleOrDie(), rbac.NewRule("update").Groups(legacyGroup).Resources("nodes/status").RuleOrDie(), @@ -175,7 +175,7 @@ func init() { }, }) addControllerRole(rbac.ClusterRole{ - ObjectMeta: api.ObjectMeta{Name: saRolePrefix + "persistent-volume-binder"}, + ObjectMeta: metav1.ObjectMeta{Name: saRolePrefix + "persistent-volume-binder"}, Rules: []rbac.PolicyRule{ rbac.NewRule("get", "list", "watch", "update", "create", "delete").Groups(legacyGroup).Resources("persistentvolumes").RuleOrDie(), rbac.NewRule("update").Groups(legacyGroup).Resources("persistentvolumes/status").RuleOrDie(), @@ -195,14 +195,14 @@ func init() { }, }) addControllerRole(rbac.ClusterRole{ - ObjectMeta: api.ObjectMeta{Name: saRolePrefix + "pod-garbage-collector"}, + ObjectMeta: metav1.ObjectMeta{Name: saRolePrefix + "pod-garbage-collector"}, Rules: []rbac.PolicyRule{ rbac.NewRule("list", "watch", "delete").Groups(legacyGroup).Resources("pods").RuleOrDie(), rbac.NewRule("list").Groups(legacyGroup).Resources("nodes").RuleOrDie(), }, }) addControllerRole(rbac.ClusterRole{ - ObjectMeta: api.ObjectMeta{Name: saRolePrefix + "replicaset-controller"}, + ObjectMeta: metav1.ObjectMeta{Name: saRolePrefix + "replicaset-controller"}, Rules: []rbac.PolicyRule{ rbac.NewRule("get", "list", "watch", "update").Groups(extensionsGroup).Resources("replicasets").RuleOrDie(), rbac.NewRule("update").Groups(extensionsGroup).Resources("replicasets/status").RuleOrDie(), @@ -211,7 +211,7 @@ func init() { }, }) addControllerRole(rbac.ClusterRole{ - ObjectMeta: api.ObjectMeta{Name: saRolePrefix + "replication-controller"}, + ObjectMeta: metav1.ObjectMeta{Name: saRolePrefix + "replication-controller"}, Rules: []rbac.PolicyRule{ // 1.0 controllers needed get, update, so without these old controllers break on new servers rbac.NewRule("get", "list", "watch", "update").Groups(legacyGroup).Resources("replicationcontrollers").RuleOrDie(), @@ -221,7 +221,7 @@ func init() { }, }) addControllerRole(rbac.ClusterRole{ - ObjectMeta: api.ObjectMeta{Name: saRolePrefix + "resourcequota-controller"}, + ObjectMeta: metav1.ObjectMeta{Name: saRolePrefix + "resourcequota-controller"}, Rules: []rbac.PolicyRule{ // quota can count quota on anything for reconcilation, so it needs full viewing powers rbac.NewRule("list", "watch").Groups("*").Resources("*").RuleOrDie(), @@ -230,7 +230,7 @@ func init() { }, }) addControllerRole(rbac.ClusterRole{ - ObjectMeta: api.ObjectMeta{Name: saRolePrefix + "route-controller"}, + ObjectMeta: metav1.ObjectMeta{Name: saRolePrefix + "route-controller"}, Rules: []rbac.PolicyRule{ rbac.NewRule("list", "watch").Groups(legacyGroup).Resources("nodes").RuleOrDie(), rbac.NewRule("patch").Groups(legacyGroup).Resources("nodes/status").RuleOrDie(), @@ -238,14 +238,14 @@ func init() { }, }) addControllerRole(rbac.ClusterRole{ - ObjectMeta: api.ObjectMeta{Name: saRolePrefix + "service-account-controller"}, + ObjectMeta: metav1.ObjectMeta{Name: saRolePrefix + "service-account-controller"}, Rules: []rbac.PolicyRule{ rbac.NewRule("create").Groups(legacyGroup).Resources("serviceaccounts").RuleOrDie(), eventsRule(), }, }) addControllerRole(rbac.ClusterRole{ - ObjectMeta: api.ObjectMeta{Name: saRolePrefix + "service-controller"}, + ObjectMeta: metav1.ObjectMeta{Name: saRolePrefix + "service-controller"}, Rules: []rbac.PolicyRule{ rbac.NewRule("get", "list", "watch").Groups(legacyGroup).Resources("services").RuleOrDie(), rbac.NewRule("update").Groups(legacyGroup).Resources("services/status").RuleOrDie(), @@ -254,7 +254,7 @@ func init() { }, }) addControllerRole(rbac.ClusterRole{ - ObjectMeta: api.ObjectMeta{Name: saRolePrefix + "statefulset-controller"}, + ObjectMeta: metav1.ObjectMeta{Name: saRolePrefix + "statefulset-controller"}, Rules: []rbac.PolicyRule{ rbac.NewRule("list", "watch").Groups(legacyGroup).Resources("pods").RuleOrDie(), rbac.NewRule("get", "list", "watch").Groups(appsGroup).Resources("statefulsets").RuleOrDie(), @@ -265,7 +265,7 @@ func init() { }, }) addControllerRole(rbac.ClusterRole{ - ObjectMeta: api.ObjectMeta{Name: saRolePrefix + "certificate-controller"}, + ObjectMeta: metav1.ObjectMeta{Name: saRolePrefix + "certificate-controller"}, Rules: []rbac.PolicyRule{ rbac.NewRule("get", "list", "watch").Groups(certificatesGroup).Resources("certificatesigningrequests").RuleOrDie(), rbac.NewRule("update").Groups(certificatesGroup).Resources("certificatesigningrequests/status", "certificatesigningrequests/approval").RuleOrDie(), diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/policy.go b/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/policy.go index ca0c5d92..40cacf5c 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/policy.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/policy.go @@ -17,8 +17,8 @@ limitations under the License. package bootstrappolicy import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apiserver/pkg/authentication/user" - "k8s.io/kubernetes/pkg/api" rbac "k8s.io/kubernetes/pkg/apis/rbac" ) @@ -72,7 +72,7 @@ func ClusterRoles() []rbac.ClusterRole { roles := []rbac.ClusterRole{ { // a "root" role which can do absolutely anything - ObjectMeta: api.ObjectMeta{Name: "cluster-admin"}, + ObjectMeta: metav1.ObjectMeta{Name: "cluster-admin"}, Rules: []rbac.PolicyRule{ rbac.NewRule("*").Groups("*").Resources("*").RuleOrDie(), rbac.NewRule("*").URLs("*").RuleOrDie(), @@ -80,14 +80,14 @@ func ClusterRoles() []rbac.ClusterRole { }, { // a role which provides just enough power to discovery API versions for negotiation - ObjectMeta: api.ObjectMeta{Name: "system:discovery"}, + ObjectMeta: metav1.ObjectMeta{Name: "system:discovery"}, Rules: []rbac.PolicyRule{ rbac.NewRule("get").URLs("/version", "/swaggerapi", "/swaggerapi/*", "/api", "/api/*", "/apis", "/apis/*").RuleOrDie(), }, }, { // a role which provides minimal resource access to allow a "normal" user to learn information about themselves - ObjectMeta: api.ObjectMeta{Name: "system:basic-user"}, + ObjectMeta: metav1.ObjectMeta{Name: "system:basic-user"}, Rules: []rbac.PolicyRule{ // TODO add future selfsubjectrulesreview, project request APIs, project listing APIs rbac.NewRule("create").Groups(authorizationGroup).Resources("selfsubjectaccessreviews").RuleOrDie(), @@ -96,7 +96,7 @@ func ClusterRoles() []rbac.ClusterRole { { // a role for a namespace level admin. It is `edit` plus the power to grant permissions to other users. - ObjectMeta: api.ObjectMeta{Name: "admin"}, + ObjectMeta: metav1.ObjectMeta{Name: "admin"}, Rules: []rbac.PolicyRule{ rbac.NewRule(ReadWrite...).Groups(legacyGroup).Resources("pods", "pods/attach", "pods/proxy", "pods/exec", "pods/portforward").RuleOrDie(), rbac.NewRule(ReadWrite...).Groups(legacyGroup).Resources("replicationcontrollers", "replicationcontrollers/scale", "serviceaccounts", @@ -114,8 +114,8 @@ func ClusterRoles() []rbac.ClusterRole { rbac.NewRule(ReadWrite...).Groups(batchGroup).Resources("jobs", "cronjobs", "scheduledjobs").RuleOrDie(), - rbac.NewRule(ReadWrite...).Groups(extensionsGroup).Resources("daemonsets", "horizontalpodautoscalers", - "replicationcontrollers/scale", "replicasets", "replicasets/scale", "deployments", "deployments/scale").RuleOrDie(), + rbac.NewRule(ReadWrite...).Groups(extensionsGroup).Resources("daemonsets", "deployments", "deployments/scale", + "horizontalpodautoscalers", "ingresses", "replicasets", "replicasets/scale", "replicationcontrollers/scale").RuleOrDie(), // additional admin powers rbac.NewRule("create").Groups(authorizationGroup).Resources("localsubjectaccessreviews").RuleOrDie(), @@ -126,7 +126,7 @@ func ClusterRoles() []rbac.ClusterRole { // a role for a namespace level editor. It grants access to all user level actions in a namespace. // It does not grant powers for "privileged" resources which are domain of the system: `/status` // subresources or `quota`/`limits` which are used to control namespaces - ObjectMeta: api.ObjectMeta{Name: "edit"}, + ObjectMeta: metav1.ObjectMeta{Name: "edit"}, Rules: []rbac.PolicyRule{ rbac.NewRule(ReadWrite...).Groups(legacyGroup).Resources("pods", "pods/attach", "pods/proxy", "pods/exec", "pods/portforward").RuleOrDie(), rbac.NewRule(ReadWrite...).Groups(legacyGroup).Resources("replicationcontrollers", "replicationcontrollers/scale", "serviceaccounts", @@ -144,14 +144,14 @@ func ClusterRoles() []rbac.ClusterRole { rbac.NewRule(ReadWrite...).Groups(batchGroup).Resources("jobs", "cronjobs", "scheduledjobs").RuleOrDie(), - rbac.NewRule(ReadWrite...).Groups(extensionsGroup).Resources("daemonsets", "horizontalpodautoscalers", - "replicationcontrollers/scale", "replicasets", "replicasets/scale", "deployments", "deployments/scale").RuleOrDie(), + rbac.NewRule(ReadWrite...).Groups(extensionsGroup).Resources("daemonsets", "deployments", "deployments/scale", + "horizontalpodautoscalers", "ingresses", "replicasets", "replicasets/scale", "replicationcontrollers/scale").RuleOrDie(), }, }, { // a role for namespace level viewing. It grants Read-only access to non-escalating resources in // a namespace. - ObjectMeta: api.ObjectMeta{Name: "view"}, + ObjectMeta: metav1.ObjectMeta{Name: "view"}, Rules: []rbac.PolicyRule{ rbac.NewRule(Read...).Groups(legacyGroup).Resources("pods", "replicationcontrollers", "replicationcontrollers/scale", "serviceaccounts", "services", "endpoints", "persistentvolumeclaims", "configmaps").RuleOrDie(), @@ -167,13 +167,20 @@ func ClusterRoles() []rbac.ClusterRole { rbac.NewRule(Read...).Groups(batchGroup).Resources("jobs", "cronjobs", "scheduledjobs").RuleOrDie(), - rbac.NewRule(Read...).Groups(extensionsGroup).Resources("daemonsets", "horizontalpodautoscalers", - "replicationcontrollers/scale", "replicasets", "replicasets/scale", "deployments", "deployments/scale").RuleOrDie(), + rbac.NewRule(Read...).Groups(extensionsGroup).Resources("daemonsets", "deployments", "deployments/scale", + "horizontalpodautoscalers", "ingresses", "replicasets", "replicasets/scale", "replicationcontrollers/scale").RuleOrDie(), + }, + }, + { + // a role to use for heapster's connections back to the API server + ObjectMeta: metav1.ObjectMeta{Name: "system:heapster"}, + Rules: []rbac.PolicyRule{ + rbac.NewRule(Read...).Groups(legacyGroup).Resources("events", "pods", "nodes", "namespaces").RuleOrDie(), }, }, { // a role for nodes to use to have the access they need for running pods - ObjectMeta: api.ObjectMeta{Name: "system:node"}, + ObjectMeta: metav1.ObjectMeta{Name: "system:node"}, Rules: []rbac.PolicyRule{ // Needed to check API access. These creates are non-mutating rbac.NewRule("create").Groups(authenticationGroup).Resources("tokenreviews").RuleOrDie(), @@ -212,9 +219,19 @@ func ClusterRoles() []rbac.ClusterRole { rbac.NewRule("get").Groups(legacyGroup).Resources("endpoints").RuleOrDie(), }, }, + { + // a role to use for node-problem-detector access. It does not get bound to default location since + // deployment locations can reasonably vary. + ObjectMeta: metav1.ObjectMeta{Name: "system:node-problem-detector"}, + Rules: []rbac.PolicyRule{ + rbac.NewRule("get").Groups(legacyGroup).Resources("nodes").RuleOrDie(), + rbac.NewRule("patch").Groups(legacyGroup).Resources("nodes/status").RuleOrDie(), + eventsRule(), + }, + }, { // a role to use for setting up a proxy - ObjectMeta: api.ObjectMeta{Name: "system:node-proxier"}, + ObjectMeta: metav1.ObjectMeta{Name: "system:node-proxier"}, Rules: []rbac.PolicyRule{ // Used to build serviceLister rbac.NewRule("list", "watch").Groups(legacyGroup).Resources("services", "endpoints").RuleOrDie(), @@ -223,9 +240,19 @@ func ClusterRoles() []rbac.ClusterRole { eventsRule(), }, }, + { + // a role to use for bootstrapping a node's client certificates + ObjectMeta: metav1.ObjectMeta{Name: "system:node-bootstrapper"}, + Rules: []rbac.PolicyRule{ + // used to check if the node already exists + rbac.NewRule("get").Groups(legacyGroup).Resources("nodes").RuleOrDie(), + // used to create a certificatesigningrequest for a node-specific client certificate, and watch for it to be signed + rbac.NewRule("create", "get", "list", "watch").Groups(certificatesGroup).Resources("certificatesigningrequests").RuleOrDie(), + }, + }, { // a role to use for allowing authentication and authorization delegation - ObjectMeta: api.ObjectMeta{Name: "system:auth-delegator"}, + ObjectMeta: metav1.ObjectMeta{Name: "system:auth-delegator"}, Rules: []rbac.PolicyRule{ // These creates are non-mutating rbac.NewRule("create").Groups(authenticationGroup).Resources("tokenreviews").RuleOrDie(), @@ -234,7 +261,7 @@ func ClusterRoles() []rbac.ClusterRole { }, { // a role to use for the API registry, summarization, and proxy handling - ObjectMeta: api.ObjectMeta{Name: "system:kube-aggregator"}, + ObjectMeta: metav1.ObjectMeta{Name: "system:kube-aggregator"}, Rules: []rbac.PolicyRule{ // it needs to see all services so that it knows whether the ones it points to exist or not rbac.NewRule(Read...).Groups(legacyGroup).Resources("services", "endpoints").RuleOrDie(), @@ -243,7 +270,7 @@ func ClusterRoles() []rbac.ClusterRole { { // a role to use for bootstrapping the kube-controller-manager so it can create the shared informers // service accounts, and secrets that we need to create separate identities for other controllers - ObjectMeta: api.ObjectMeta{Name: "system:kube-controller-manager"}, + ObjectMeta: metav1.ObjectMeta{Name: "system:kube-controller-manager"}, Rules: []rbac.PolicyRule{ eventsRule(), rbac.NewRule("create").Groups(legacyGroup).Resources("endpoints", "secrets", "serviceaccounts").RuleOrDie(), diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/testdata/cluster-roles.yaml b/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/testdata/cluster-roles.yaml index 305169c9..cbb258ab 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/testdata/cluster-roles.yaml +++ b/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/testdata/cluster-roles.yaml @@ -10,7 +10,6 @@ items: rules: - apiGroups: - "" - attributeRestrictions: null resources: - pods - pods/attach @@ -28,7 +27,6 @@ items: - watch - apiGroups: - "" - attributeRestrictions: null resources: - configmaps - endpoints @@ -50,7 +48,6 @@ items: - watch - apiGroups: - "" - attributeRestrictions: null resources: - bindings - events @@ -67,7 +64,6 @@ items: - watch - apiGroups: - "" - attributeRestrictions: null resources: - namespaces verbs: @@ -76,14 +72,12 @@ items: - watch - apiGroups: - "" - attributeRestrictions: null resources: - serviceaccounts verbs: - impersonate - apiGroups: - apps - attributeRestrictions: null resources: - statefulsets verbs: @@ -97,7 +91,6 @@ items: - watch - apiGroups: - autoscaling - attributeRestrictions: null resources: - horizontalpodautoscalers verbs: @@ -111,7 +104,6 @@ items: - watch - apiGroups: - batch - attributeRestrictions: null resources: - cronjobs - jobs @@ -127,12 +119,12 @@ items: - watch - apiGroups: - extensions - attributeRestrictions: null resources: - daemonsets - deployments - deployments/scale - horizontalpodautoscalers + - ingresses - replicasets - replicasets/scale - replicationcontrollers/scale @@ -147,14 +139,12 @@ items: - watch - apiGroups: - authorization.k8s.io - attributeRestrictions: null resources: - localsubjectaccessreviews verbs: - create - apiGroups: - rbac.authorization.k8s.io - attributeRestrictions: null resources: - rolebindings - roles @@ -177,13 +167,11 @@ items: rules: - apiGroups: - '*' - attributeRestrictions: null resources: - '*' verbs: - '*' - - attributeRestrictions: null - nonResourceURLs: + - nonResourceURLs: - '*' verbs: - '*' @@ -197,7 +185,6 @@ items: rules: - apiGroups: - "" - attributeRestrictions: null resources: - pods - pods/attach @@ -215,7 +202,6 @@ items: - watch - apiGroups: - "" - attributeRestrictions: null resources: - configmaps - endpoints @@ -237,7 +223,6 @@ items: - watch - apiGroups: - "" - attributeRestrictions: null resources: - bindings - events @@ -254,7 +239,6 @@ items: - watch - apiGroups: - "" - attributeRestrictions: null resources: - namespaces verbs: @@ -263,14 +247,12 @@ items: - watch - apiGroups: - "" - attributeRestrictions: null resources: - serviceaccounts verbs: - impersonate - apiGroups: - apps - attributeRestrictions: null resources: - statefulsets verbs: @@ -284,7 +266,6 @@ items: - watch - apiGroups: - autoscaling - attributeRestrictions: null resources: - horizontalpodautoscalers verbs: @@ -298,7 +279,6 @@ items: - watch - apiGroups: - batch - attributeRestrictions: null resources: - cronjobs - jobs @@ -314,12 +294,12 @@ items: - watch - apiGroups: - extensions - attributeRestrictions: null resources: - daemonsets - deployments - deployments/scale - horizontalpodautoscalers + - ingresses - replicasets - replicasets/scale - replicationcontrollers/scale @@ -342,14 +322,12 @@ items: rules: - apiGroups: - authentication.k8s.io - attributeRestrictions: null resources: - tokenreviews verbs: - create - apiGroups: - authorization.k8s.io - attributeRestrictions: null resources: - subjectaccessreviews verbs: @@ -364,7 +342,6 @@ items: rules: - apiGroups: - authorization.k8s.io - attributeRestrictions: null resources: - selfsubjectaccessreviews verbs: @@ -377,8 +354,7 @@ items: kubernetes.io/bootstrapping: rbac-defaults name: system:discovery rules: - - attributeRestrictions: null - nonResourceURLs: + - nonResourceURLs: - /api - /api/* - /apis @@ -388,6 +364,25 @@ items: - /version verbs: - get +- apiVersion: rbac.authorization.k8s.io/v1alpha1 + kind: ClusterRole + metadata: + creationTimestamp: null + labels: + kubernetes.io/bootstrapping: rbac-defaults + name: system:heapster + rules: + - apiGroups: + - "" + resources: + - events + - namespaces + - nodes + - pods + verbs: + - get + - list + - watch - apiVersion: rbac.authorization.k8s.io/v1alpha1 kind: ClusterRole metadata: @@ -398,7 +393,6 @@ items: rules: - apiGroups: - "" - attributeRestrictions: null resources: - endpoints - services @@ -416,7 +410,6 @@ items: rules: - apiGroups: - "" - attributeRestrictions: null resources: - events verbs: @@ -425,7 +418,6 @@ items: - update - apiGroups: - "" - attributeRestrictions: null resources: - endpoints - secrets @@ -434,14 +426,12 @@ items: - create - apiGroups: - "" - attributeRestrictions: null resources: - secrets verbs: - delete - apiGroups: - "" - attributeRestrictions: null resources: - endpoints - namespaces @@ -450,7 +440,6 @@ items: - get - apiGroups: - "" - attributeRestrictions: null resources: - endpoints - serviceaccounts @@ -458,7 +447,6 @@ items: - update - apiGroups: - '*' - attributeRestrictions: null resources: - namespaces - nodes @@ -473,7 +461,6 @@ items: - watch - apiGroups: - extensions - attributeRestrictions: null resources: - daemonsets - deployments @@ -483,7 +470,6 @@ items: - watch - apiGroups: - batch - attributeRestrictions: null resources: - cronjobs - jobs @@ -500,14 +486,12 @@ items: rules: - apiGroups: - authentication.k8s.io - attributeRestrictions: null resources: - tokenreviews verbs: - create - apiGroups: - authorization.k8s.io - attributeRestrictions: null resources: - localsubjectaccessreviews - subjectaccessreviews @@ -515,7 +499,6 @@ items: - create - apiGroups: - "" - attributeRestrictions: null resources: - services verbs: @@ -524,7 +507,6 @@ items: - watch - apiGroups: - "" - attributeRestrictions: null resources: - nodes verbs: @@ -534,7 +516,6 @@ items: - watch - apiGroups: - "" - attributeRestrictions: null resources: - nodes/status verbs: @@ -542,7 +523,6 @@ items: - update - apiGroups: - "" - attributeRestrictions: null resources: - events verbs: @@ -551,7 +531,6 @@ items: - update - apiGroups: - "" - attributeRestrictions: null resources: - pods verbs: @@ -560,7 +539,6 @@ items: - watch - apiGroups: - "" - attributeRestrictions: null resources: - pods verbs: @@ -569,14 +547,12 @@ items: - get - apiGroups: - "" - attributeRestrictions: null resources: - pods/status verbs: - update - apiGroups: - "" - attributeRestrictions: null resources: - configmaps - secrets @@ -584,7 +560,6 @@ items: - get - apiGroups: - "" - attributeRestrictions: null resources: - persistentvolumeclaims - persistentvolumes @@ -592,11 +567,61 @@ items: - get - apiGroups: - "" - attributeRestrictions: null resources: - endpoints verbs: - get +- apiVersion: rbac.authorization.k8s.io/v1alpha1 + kind: ClusterRole + metadata: + creationTimestamp: null + labels: + kubernetes.io/bootstrapping: rbac-defaults + name: system:node-bootstrapper + rules: + - apiGroups: + - "" + resources: + - nodes + verbs: + - get + - apiGroups: + - certificates.k8s.io + resources: + - certificatesigningrequests + verbs: + - create + - get + - list + - watch +- apiVersion: rbac.authorization.k8s.io/v1alpha1 + kind: ClusterRole + metadata: + creationTimestamp: null + labels: + kubernetes.io/bootstrapping: rbac-defaults + name: system:node-problem-detector + rules: + - apiGroups: + - "" + resources: + - nodes + verbs: + - get + - apiGroups: + - "" + resources: + - nodes/status + verbs: + - patch + - apiGroups: + - "" + resources: + - events + verbs: + - create + - patch + - update - apiVersion: rbac.authorization.k8s.io/v1alpha1 kind: ClusterRole metadata: @@ -607,7 +632,6 @@ items: rules: - apiGroups: - "" - attributeRestrictions: null resources: - endpoints - services @@ -616,14 +640,12 @@ items: - watch - apiGroups: - "" - attributeRestrictions: null resources: - nodes verbs: - get - apiGroups: - "" - attributeRestrictions: null resources: - events verbs: @@ -640,7 +662,6 @@ items: rules: - apiGroups: - "" - attributeRestrictions: null resources: - configmaps - endpoints @@ -656,7 +677,6 @@ items: - watch - apiGroups: - "" - attributeRestrictions: null resources: - bindings - events @@ -673,7 +693,6 @@ items: - watch - apiGroups: - "" - attributeRestrictions: null resources: - namespaces verbs: @@ -682,7 +701,6 @@ items: - watch - apiGroups: - apps - attributeRestrictions: null resources: - statefulsets verbs: @@ -691,7 +709,6 @@ items: - watch - apiGroups: - autoscaling - attributeRestrictions: null resources: - horizontalpodautoscalers verbs: @@ -700,7 +717,6 @@ items: - watch - apiGroups: - batch - attributeRestrictions: null resources: - cronjobs - jobs @@ -711,12 +727,12 @@ items: - watch - apiGroups: - extensions - attributeRestrictions: null resources: - daemonsets - deployments - deployments/scale - horizontalpodautoscalers + - ingresses - replicasets - replicasets/scale - replicationcontrollers/scale diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/testdata/controller-roles.yaml b/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/testdata/controller-roles.yaml index cfbb602f..c322eb53 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/testdata/controller-roles.yaml +++ b/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/testdata/controller-roles.yaml @@ -10,7 +10,6 @@ items: rules: - apiGroups: - "" - attributeRestrictions: null resources: - persistentvolumeclaims - persistentvolumes @@ -19,7 +18,6 @@ items: - watch - apiGroups: - "" - attributeRestrictions: null resources: - nodes verbs: @@ -28,7 +26,6 @@ items: - watch - apiGroups: - "" - attributeRestrictions: null resources: - nodes/status verbs: @@ -36,7 +33,6 @@ items: - update - apiGroups: - "" - attributeRestrictions: null resources: - pods verbs: @@ -44,7 +40,6 @@ items: - watch - apiGroups: - "" - attributeRestrictions: null resources: - events verbs: @@ -61,7 +56,6 @@ items: rules: - apiGroups: - certificates.k8s.io - attributeRestrictions: null resources: - certificatesigningrequests verbs: @@ -70,7 +64,6 @@ items: - watch - apiGroups: - certificates.k8s.io - attributeRestrictions: null resources: - certificatesigningrequests/approval - certificatesigningrequests/status @@ -78,7 +71,6 @@ items: - update - apiGroups: - "" - attributeRestrictions: null resources: - events verbs: @@ -95,7 +87,6 @@ items: rules: - apiGroups: - batch - attributeRestrictions: null resources: - cronjobs verbs: @@ -105,7 +96,6 @@ items: - watch - apiGroups: - batch - attributeRestrictions: null resources: - jobs verbs: @@ -117,14 +107,12 @@ items: - watch - apiGroups: - batch - attributeRestrictions: null resources: - cronjobs/status verbs: - update - apiGroups: - "" - attributeRestrictions: null resources: - pods verbs: @@ -132,7 +120,6 @@ items: - list - apiGroups: - "" - attributeRestrictions: null resources: - events verbs: @@ -149,7 +136,6 @@ items: rules: - apiGroups: - extensions - attributeRestrictions: null resources: - daemonsets verbs: @@ -158,14 +144,12 @@ items: - watch - apiGroups: - extensions - attributeRestrictions: null resources: - daemonsets/status verbs: - update - apiGroups: - "" - attributeRestrictions: null resources: - nodes verbs: @@ -173,7 +157,6 @@ items: - watch - apiGroups: - "" - attributeRestrictions: null resources: - pods verbs: @@ -183,14 +166,12 @@ items: - watch - apiGroups: - "" - attributeRestrictions: null resources: - pods/binding verbs: - create - apiGroups: - "" - attributeRestrictions: null resources: - events verbs: @@ -207,7 +188,6 @@ items: rules: - apiGroups: - extensions - attributeRestrictions: null resources: - deployments verbs: @@ -217,14 +197,12 @@ items: - watch - apiGroups: - extensions - attributeRestrictions: null resources: - deployments/status verbs: - update - apiGroups: - extensions - attributeRestrictions: null resources: - replicasets verbs: @@ -237,7 +215,6 @@ items: - watch - apiGroups: - "" - attributeRestrictions: null resources: - pods verbs: @@ -247,7 +224,6 @@ items: - watch - apiGroups: - "" - attributeRestrictions: null resources: - events verbs: @@ -264,7 +240,6 @@ items: rules: - apiGroups: - extensions - attributeRestrictions: null resources: - deployments verbs: @@ -273,7 +248,6 @@ items: - watch - apiGroups: - extensions - attributeRestrictions: null resources: - replicasets verbs: @@ -282,7 +256,6 @@ items: - watch - apiGroups: - "" - attributeRestrictions: null resources: - replicationcontrollers verbs: @@ -291,7 +264,6 @@ items: - watch - apiGroups: - policy - attributeRestrictions: null resources: - poddisruptionbudgets verbs: @@ -300,7 +272,6 @@ items: - watch - apiGroups: - apps - attributeRestrictions: null resources: - statefulsets verbs: @@ -309,14 +280,12 @@ items: - watch - apiGroups: - policy - attributeRestrictions: null resources: - poddisruptionbudgets/status verbs: - update - apiGroups: - "" - attributeRestrictions: null resources: - events verbs: @@ -333,7 +302,6 @@ items: rules: - apiGroups: - "" - attributeRestrictions: null resources: - pods - services @@ -343,7 +311,6 @@ items: - watch - apiGroups: - "" - attributeRestrictions: null resources: - endpoints verbs: @@ -354,14 +321,12 @@ items: - update - apiGroups: - "" - attributeRestrictions: null resources: - endpoints/restricted verbs: - create - apiGroups: - "" - attributeRestrictions: null resources: - events verbs: @@ -378,7 +343,6 @@ items: rules: - apiGroups: - '*' - attributeRestrictions: null resources: - '*' verbs: @@ -390,7 +354,6 @@ items: - watch - apiGroups: - "" - attributeRestrictions: null resources: - events verbs: @@ -408,7 +371,6 @@ items: - apiGroups: - autoscaling - extensions - attributeRestrictions: null resources: - horizontalpodautoscalers verbs: @@ -418,14 +380,12 @@ items: - apiGroups: - autoscaling - extensions - attributeRestrictions: null resources: - horizontalpodautoscalers/status verbs: - update - apiGroups: - "" - attributeRestrictions: null resources: - replicationcontrollers/scale verbs: @@ -433,7 +393,6 @@ items: - update - apiGroups: - extensions - attributeRestrictions: null resources: - replicationcontrollers/scale verbs: @@ -441,7 +400,6 @@ items: - update - apiGroups: - extensions - attributeRestrictions: null resources: - deployments/scale - replicasets/scale @@ -450,14 +408,12 @@ items: - update - apiGroups: - "" - attributeRestrictions: null resources: - pods verbs: - list - apiGroups: - "" - attributeRestrictions: null resourceNames: - 'http:heapster:' - 'https:heapster:' @@ -467,7 +423,6 @@ items: - proxy - apiGroups: - "" - attributeRestrictions: null resources: - events verbs: @@ -484,7 +439,6 @@ items: rules: - apiGroups: - batch - attributeRestrictions: null resources: - jobs verbs: @@ -494,14 +448,12 @@ items: - watch - apiGroups: - batch - attributeRestrictions: null resources: - jobs/status verbs: - update - apiGroups: - "" - attributeRestrictions: null resources: - pods verbs: @@ -511,7 +463,6 @@ items: - watch - apiGroups: - "" - attributeRestrictions: null resources: - events verbs: @@ -528,7 +479,6 @@ items: rules: - apiGroups: - "" - attributeRestrictions: null resources: - namespaces verbs: @@ -538,7 +488,6 @@ items: - watch - apiGroups: - "" - attributeRestrictions: null resources: - namespaces/finalize - namespaces/status @@ -546,7 +495,6 @@ items: - update - apiGroups: - '*' - attributeRestrictions: null resources: - '*' verbs: @@ -564,7 +512,6 @@ items: rules: - apiGroups: - "" - attributeRestrictions: null resources: - nodes verbs: @@ -574,21 +521,18 @@ items: - update - apiGroups: - "" - attributeRestrictions: null resources: - nodes/status verbs: - update - apiGroups: - "" - attributeRestrictions: null resources: - pods/status verbs: - update - apiGroups: - "" - attributeRestrictions: null resources: - pods verbs: @@ -596,7 +540,6 @@ items: - list - apiGroups: - "" - attributeRestrictions: null resources: - events verbs: @@ -613,7 +556,6 @@ items: rules: - apiGroups: - "" - attributeRestrictions: null resources: - persistentvolumes verbs: @@ -625,14 +567,12 @@ items: - watch - apiGroups: - "" - attributeRestrictions: null resources: - persistentvolumes/status verbs: - update - apiGroups: - "" - attributeRestrictions: null resources: - persistentvolumeclaims verbs: @@ -642,14 +582,12 @@ items: - watch - apiGroups: - "" - attributeRestrictions: null resources: - persistentvolumeclaims/status verbs: - update - apiGroups: - "" - attributeRestrictions: null resources: - pods verbs: @@ -660,7 +598,6 @@ items: - watch - apiGroups: - storage.k8s.io - attributeRestrictions: null resources: - storageclasses verbs: @@ -669,7 +606,6 @@ items: - watch - apiGroups: - "" - attributeRestrictions: null resources: - endpoints - services @@ -679,21 +615,18 @@ items: - get - apiGroups: - "" - attributeRestrictions: null resources: - secrets verbs: - get - apiGroups: - "" - attributeRestrictions: null resources: - events verbs: - watch - apiGroups: - "" - attributeRestrictions: null resources: - events verbs: @@ -710,7 +643,6 @@ items: rules: - apiGroups: - "" - attributeRestrictions: null resources: - pods verbs: @@ -719,7 +651,6 @@ items: - watch - apiGroups: - "" - attributeRestrictions: null resources: - nodes verbs: @@ -734,7 +665,6 @@ items: rules: - apiGroups: - extensions - attributeRestrictions: null resources: - replicasets verbs: @@ -744,14 +674,12 @@ items: - watch - apiGroups: - extensions - attributeRestrictions: null resources: - replicasets/status verbs: - update - apiGroups: - "" - attributeRestrictions: null resources: - pods verbs: @@ -762,7 +690,6 @@ items: - watch - apiGroups: - "" - attributeRestrictions: null resources: - events verbs: @@ -779,7 +706,6 @@ items: rules: - apiGroups: - "" - attributeRestrictions: null resources: - replicationcontrollers verbs: @@ -789,14 +715,12 @@ items: - watch - apiGroups: - "" - attributeRestrictions: null resources: - replicationcontrollers/status verbs: - update - apiGroups: - "" - attributeRestrictions: null resources: - pods verbs: @@ -807,7 +731,6 @@ items: - watch - apiGroups: - "" - attributeRestrictions: null resources: - events verbs: @@ -824,7 +747,6 @@ items: rules: - apiGroups: - '*' - attributeRestrictions: null resources: - '*' verbs: @@ -832,14 +754,12 @@ items: - watch - apiGroups: - "" - attributeRestrictions: null resources: - resourcequotas/status verbs: - update - apiGroups: - "" - attributeRestrictions: null resources: - events verbs: @@ -856,7 +776,6 @@ items: rules: - apiGroups: - "" - attributeRestrictions: null resources: - nodes verbs: @@ -864,14 +783,12 @@ items: - watch - apiGroups: - "" - attributeRestrictions: null resources: - nodes/status verbs: - patch - apiGroups: - "" - attributeRestrictions: null resources: - events verbs: @@ -888,14 +805,12 @@ items: rules: - apiGroups: - "" - attributeRestrictions: null resources: - serviceaccounts verbs: - create - apiGroups: - "" - attributeRestrictions: null resources: - events verbs: @@ -912,7 +827,6 @@ items: rules: - apiGroups: - "" - attributeRestrictions: null resources: - services verbs: @@ -921,14 +835,12 @@ items: - watch - apiGroups: - "" - attributeRestrictions: null resources: - services/status verbs: - update - apiGroups: - "" - attributeRestrictions: null resources: - nodes verbs: @@ -936,7 +848,6 @@ items: - watch - apiGroups: - "" - attributeRestrictions: null resources: - events verbs: @@ -953,7 +864,6 @@ items: rules: - apiGroups: - "" - attributeRestrictions: null resources: - pods verbs: @@ -961,7 +871,6 @@ items: - watch - apiGroups: - apps - attributeRestrictions: null resources: - statefulsets verbs: @@ -970,14 +879,12 @@ items: - watch - apiGroups: - apps - attributeRestrictions: null resources: - statefulsets/status verbs: - update - apiGroups: - "" - attributeRestrictions: null resources: - pods verbs: @@ -987,7 +894,6 @@ items: - update - apiGroups: - "" - attributeRestrictions: null resources: - persistentvolumeclaims verbs: @@ -995,7 +901,6 @@ items: - get - apiGroups: - "" - attributeRestrictions: null resources: - events verbs: diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/rbac/rbac_test.go b/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/rbac/rbac_test.go index 3cb11622..05e52dc5 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/rbac/rbac_test.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/rbac/rbac_test.go @@ -21,9 +21,9 @@ import ( "strings" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apiserver/pkg/authentication/user" "k8s.io/apiserver/pkg/authorization/authorizer" - "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/rbac" rbacregistryvalidation "k8s.io/kubernetes/pkg/registry/rbac/validation" ) @@ -38,11 +38,11 @@ func newRule(verbs, apiGroups, resources, nonResourceURLs string) rbac.PolicyRul } func newRole(name, namespace string, rules ...rbac.PolicyRule) *rbac.Role { - return &rbac.Role{ObjectMeta: api.ObjectMeta{Namespace: namespace, Name: name}, Rules: rules} + return &rbac.Role{ObjectMeta: metav1.ObjectMeta{Namespace: namespace, Name: name}, Rules: rules} } func newClusterRole(name string, rules ...rbac.PolicyRule) *rbac.ClusterRole { - return &rbac.ClusterRole{ObjectMeta: api.ObjectMeta{Name: name}, Rules: rules} + return &rbac.ClusterRole{ObjectMeta: metav1.ObjectMeta{Name: name}, Rules: rules} } const ( @@ -52,7 +52,7 @@ const ( func newClusterRoleBinding(roleName string, subjects ...string) *rbac.ClusterRoleBinding { r := &rbac.ClusterRoleBinding{ - ObjectMeta: api.ObjectMeta{}, + ObjectMeta: metav1.ObjectMeta{}, RoleRef: rbac.RoleRef{ APIGroup: rbac.GroupName, Kind: "ClusterRole", // ClusterRoleBindings can only refer to ClusterRole @@ -69,7 +69,7 @@ func newClusterRoleBinding(roleName string, subjects ...string) *rbac.ClusterRol } func newRoleBinding(namespace, roleName string, bindType uint16, subjects ...string) *rbac.RoleBinding { - r := &rbac.RoleBinding{ObjectMeta: api.ObjectMeta{Namespace: namespace}} + r := &rbac.RoleBinding{ObjectMeta: metav1.ObjectMeta{Namespace: namespace}} switch bindType { case bindToRole: diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/webhook/BUILD b/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/webhook/BUILD index c7c85611..12e9ca1a 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/webhook/BUILD +++ b/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/webhook/BUILD @@ -18,7 +18,7 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/runtime/schema", "//vendor:k8s.io/apiserver/pkg/authorization/authorizer", "//vendor:k8s.io/apiserver/pkg/util/cache", - "//vendor:k8s.io/apiserver/pkg/webhook", + "//vendor:k8s.io/apiserver/pkg/util/webhook", "//vendor:k8s.io/client-go/kubernetes/typed/authorization/v1beta1", "//vendor:k8s.io/client-go/pkg/apis/authorization/install", "//vendor:k8s.io/client-go/pkg/apis/authorization/v1beta1", @@ -35,11 +35,11 @@ go_test( tags = ["automanaged"], deps = [ "//pkg/apis/authorization/v1beta1:go_default_library", - "//pkg/client/unversioned/clientcmd/api/v1:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/util/diff", "//vendor:k8s.io/apiserver/pkg/authentication/user", "//vendor:k8s.io/apiserver/pkg/authorization/authorizer", + "//vendor:k8s.io/client-go/tools/clientcmd/api/v1", ], ) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/webhook/webhook.go b/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/webhook/webhook.go index 068fc4b8..abcc3340 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/webhook/webhook.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/webhook/webhook.go @@ -29,7 +29,7 @@ import ( authorizationclient "k8s.io/client-go/kubernetes/typed/authorization/v1beta1" authorization "k8s.io/client-go/pkg/apis/authorization/v1beta1" - "k8s.io/apiserver/pkg/webhook" + "k8s.io/apiserver/pkg/util/webhook" _ "k8s.io/client-go/pkg/apis/authorization/install" _ "k8s.io/kubernetes/pkg/apis/authorization/install" diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/webhook/webhook_test.go b/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/webhook/webhook_test.go index 0d6f0d2a..f434cf5e 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/webhook/webhook_test.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/webhook/webhook_test.go @@ -36,8 +36,8 @@ import ( "k8s.io/apimachinery/pkg/util/diff" "k8s.io/apiserver/pkg/authentication/user" "k8s.io/apiserver/pkg/authorization/authorizer" + "k8s.io/client-go/tools/clientcmd/api/v1" "k8s.io/kubernetes/pkg/apis/authorization/v1beta1" - "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/v1" ) func TestNewFromConfig(t *testing.T) { diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/client/auth/BUILD b/vendor/k8s.io/kubernetes/plugin/pkg/client/auth/BUILD deleted file mode 100644 index 11c15383..00000000 --- a/vendor/k8s.io/kubernetes/plugin/pkg/client/auth/BUILD +++ /dev/null @@ -1,35 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["plugins.go"], - tags = ["automanaged"], - deps = [ - "//plugin/pkg/client/auth/gcp:go_default_library", - "//plugin/pkg/client/auth/oidc:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//plugin/pkg/client/auth/gcp:all-srcs", - "//plugin/pkg/client/auth/oidc:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/client/auth/gcp/BUILD b/vendor/k8s.io/kubernetes/plugin/pkg/client/auth/gcp/BUILD deleted file mode 100644 index 45247423..00000000 --- a/vendor/k8s.io/kubernetes/plugin/pkg/client/auth/gcp/BUILD +++ /dev/null @@ -1,45 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = ["gcp.go"], - tags = ["automanaged"], - deps = [ - "//pkg/client/restclient:go_default_library", - "//pkg/util/jsonpath:go_default_library", - "//vendor:github.com/golang/glog", - "//vendor:golang.org/x/net/context", - "//vendor:golang.org/x/oauth2", - "//vendor:golang.org/x/oauth2/google", - "//vendor:k8s.io/apimachinery/pkg/util/yaml", - ], -) - -go_test( - name = "go_default_test", - srcs = ["gcp_test.go"], - library = ":go_default_library", - tags = ["automanaged"], - deps = ["//vendor:golang.org/x/oauth2"], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/client/auth/gcp/OWNERS b/vendor/k8s.io/kubernetes/plugin/pkg/client/auth/gcp/OWNERS deleted file mode 100644 index d75421c5..00000000 --- a/vendor/k8s.io/kubernetes/plugin/pkg/client/auth/gcp/OWNERS +++ /dev/null @@ -1,3 +0,0 @@ -assignees: - - cjcullen - - jlowdermilk diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/client/auth/gcp/gcp.go b/vendor/k8s.io/kubernetes/plugin/pkg/client/auth/gcp/gcp.go deleted file mode 100644 index e4a87cd1..00000000 --- a/vendor/k8s.io/kubernetes/plugin/pkg/client/auth/gcp/gcp.go +++ /dev/null @@ -1,274 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gcp - -import ( - "bytes" - "encoding/json" - "fmt" - "net/http" - "os/exec" - "strings" - "sync" - "time" - - "github.com/golang/glog" - "golang.org/x/net/context" - "golang.org/x/oauth2" - "golang.org/x/oauth2/google" - "k8s.io/apimachinery/pkg/util/yaml" - "k8s.io/kubernetes/pkg/client/restclient" - "k8s.io/kubernetes/pkg/util/jsonpath" -) - -func init() { - if err := restclient.RegisterAuthProviderPlugin("gcp", newGCPAuthProvider); err != nil { - glog.Fatalf("Failed to register gcp auth plugin: %v", err) - } -} - -// gcpAuthProvider is an auth provider plugin that uses GCP credentials to provide -// tokens for kubectl to authenticate itself to the apiserver. A sample json config -// is provided below with all recognized options described. -// -// { -// 'auth-provider': { -// # Required -// "name": "gcp", -// -// 'config': { -// # Caching options -// -// # Raw string data representing cached access token. -// "access-token": "ya29.CjWdA4GiBPTt", -// # RFC3339Nano expiration timestamp for cached access token. -// "expiry": "2016-10-31 22:31:9.123", -// -// # Command execution options -// # These options direct the plugin to execute a specified command and parse -// # token and expiry time from the output of the command. -// -// # Command to execute for access token. String is split on whitespace -// # with first field treated as the executable, remaining fields as args. -// # Command output will be parsed as JSON. -// "cmd-path": "/usr/bin/gcloud config config-helper --output=json", -// -// # JSONPath to the string field that represents the access token in -// # command output. If omitted, defaults to "{.access_token}". -// "token-key": "{.credential.access_token}", -// -// # JSONPath to the string field that represents expiration timestamp -// # of the access token in the command output. If omitted, defaults to -// # "{.token_expiry}" -// "expiry-key": ""{.credential.token_expiry}", -// -// # golang reference time in the format that the expiration timestamp uses. -// # If omitted, defaults to time.RFC3339Nano -// "time-fmt": "2006-01-02 15:04:05.999999999" -// } -// } -// } -// -type gcpAuthProvider struct { - tokenSource oauth2.TokenSource - persister restclient.AuthProviderConfigPersister -} - -func newGCPAuthProvider(_ string, gcpConfig map[string]string, persister restclient.AuthProviderConfigPersister) (restclient.AuthProvider, error) { - cmd, useCmd := gcpConfig["cmd-path"] - var ts oauth2.TokenSource - var err error - if useCmd { - ts, err = newCmdTokenSource(cmd, gcpConfig["token-key"], gcpConfig["expiry-key"], gcpConfig["time-fmt"]) - } else { - ts, err = google.DefaultTokenSource(context.Background(), "https://www.googleapis.com/auth/cloud-platform") - } - if err != nil { - return nil, err - } - cts, err := newCachedTokenSource(gcpConfig["access-token"], gcpConfig["expiry"], persister, ts, gcpConfig) - if err != nil { - return nil, err - } - return &gcpAuthProvider{cts, persister}, nil -} - -func (g *gcpAuthProvider) WrapTransport(rt http.RoundTripper) http.RoundTripper { - return &oauth2.Transport{ - Source: g.tokenSource, - Base: rt, - } -} - -func (g *gcpAuthProvider) Login() error { return nil } - -type cachedTokenSource struct { - lk sync.Mutex - source oauth2.TokenSource - accessToken string - expiry time.Time - persister restclient.AuthProviderConfigPersister - cache map[string]string -} - -func newCachedTokenSource(accessToken, expiry string, persister restclient.AuthProviderConfigPersister, ts oauth2.TokenSource, cache map[string]string) (*cachedTokenSource, error) { - var expiryTime time.Time - if parsedTime, err := time.Parse(time.RFC3339Nano, expiry); err == nil { - expiryTime = parsedTime - } - if cache == nil { - cache = make(map[string]string) - } - return &cachedTokenSource{ - source: ts, - accessToken: accessToken, - expiry: expiryTime, - persister: persister, - cache: cache, - }, nil -} - -func (t *cachedTokenSource) Token() (*oauth2.Token, error) { - tok := t.cachedToken() - if tok.Valid() && !tok.Expiry.IsZero() { - return tok, nil - } - tok, err := t.source.Token() - if err != nil { - return nil, err - } - cache := t.update(tok) - if t.persister != nil { - if err := t.persister.Persist(cache); err != nil { - glog.V(4).Infof("Failed to persist token: %v", err) - } - } - return tok, nil -} - -func (t *cachedTokenSource) cachedToken() *oauth2.Token { - t.lk.Lock() - defer t.lk.Unlock() - return &oauth2.Token{ - AccessToken: t.accessToken, - TokenType: "Bearer", - Expiry: t.expiry, - } -} - -func (t *cachedTokenSource) update(tok *oauth2.Token) map[string]string { - t.lk.Lock() - defer t.lk.Unlock() - t.accessToken = tok.AccessToken - t.expiry = tok.Expiry - ret := map[string]string{} - for k, v := range t.cache { - ret[k] = v - } - ret["access-token"] = t.accessToken - ret["expiry"] = t.expiry.Format(time.RFC3339Nano) - return ret -} - -type commandTokenSource struct { - cmd string - args []string - tokenKey string - expiryKey string - timeFmt string -} - -func newCmdTokenSource(cmd, tokenKey, expiryKey, timeFmt string) (*commandTokenSource, error) { - if len(timeFmt) == 0 { - timeFmt = time.RFC3339Nano - } - if len(tokenKey) == 0 { - tokenKey = "{.access_token}" - } - if len(expiryKey) == 0 { - expiryKey = "{.token_expiry}" - } - fields := strings.Fields(cmd) - if len(fields) == 0 { - return nil, fmt.Errorf("missing access token cmd") - } - return &commandTokenSource{ - cmd: fields[0], - args: fields[1:], - tokenKey: tokenKey, - expiryKey: expiryKey, - timeFmt: timeFmt, - }, nil -} - -func (c *commandTokenSource) Token() (*oauth2.Token, error) { - fullCmd := fmt.Sprintf("%s %s", c.cmd, strings.Join(c.args, " ")) - cmd := exec.Command(c.cmd, c.args...) - output, err := cmd.Output() - if err != nil { - return nil, fmt.Errorf("error executing access token command %q: %v", fullCmd, err) - } - token, err := c.parseTokenCmdOutput(output) - if err != nil { - return nil, fmt.Errorf("error parsing output for access token command %q: %v", fullCmd, err) - } - return token, nil -} - -func (c *commandTokenSource) parseTokenCmdOutput(output []byte) (*oauth2.Token, error) { - output, err := yaml.ToJSON(output) - if err != nil { - return nil, err - } - var data interface{} - if err := json.Unmarshal(output, &data); err != nil { - return nil, err - } - - accessToken, err := parseJSONPath(data, "token-key", c.tokenKey) - if err != nil { - return nil, fmt.Errorf("error parsing token-key %q: %v", c.tokenKey, err) - } - expiryStr, err := parseJSONPath(data, "expiry-key", c.expiryKey) - if err != nil { - return nil, fmt.Errorf("error parsing expiry-key %q: %v", c.expiryKey, err) - } - var expiry time.Time - if t, err := time.Parse(c.timeFmt, expiryStr); err != nil { - glog.V(4).Infof("Failed to parse token expiry from %s (fmt=%s): %v", expiryStr, c.timeFmt, err) - } else { - expiry = t - } - - return &oauth2.Token{ - AccessToken: accessToken, - TokenType: "Bearer", - Expiry: expiry, - }, nil -} - -func parseJSONPath(input interface{}, name, template string) (string, error) { - j := jsonpath.New(name) - buf := new(bytes.Buffer) - if err := j.Parse(template); err != nil { - return "", err - } - if err := j.Execute(buf, input); err != nil { - return "", err - } - return buf.String(), nil -} diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/client/auth/gcp/gcp_test.go b/vendor/k8s.io/kubernetes/plugin/pkg/client/auth/gcp/gcp_test.go deleted file mode 100644 index cb64b838..00000000 --- a/vendor/k8s.io/kubernetes/plugin/pkg/client/auth/gcp/gcp_test.go +++ /dev/null @@ -1,211 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package gcp - -import ( - "fmt" - "reflect" - "strings" - "sync" - "testing" - "time" - - "golang.org/x/oauth2" -) - -func TestCmdTokenSource(t *testing.T) { - fakeExpiry := time.Date(2016, 10, 31, 22, 31, 9, 123000000, time.UTC) - customFmt := "2006-01-02 15:04:05.999999999" - - tests := []struct { - name string - output []byte - cmd, tokenKey, expiryKey, timeFmt string - tok *oauth2.Token - expectErr error - }{ - { - "defaults", - []byte(`{ - "access_token": "faketoken", - "token_expiry": "2016-10-31T22:31:09.123000000Z" -}`), - "/fake/cmd/path", "", "", "", - &oauth2.Token{ - AccessToken: "faketoken", - TokenType: "Bearer", - Expiry: fakeExpiry, - }, - nil, - }, - { - "custom keys", - []byte(`{ - "token": "faketoken", - "token_expiry": { - "datetime": "2016-10-31 22:31:09.123" - } -}`), - "/fake/cmd/path", "{.token}", "{.token_expiry.datetime}", customFmt, - &oauth2.Token{ - AccessToken: "faketoken", - TokenType: "Bearer", - Expiry: fakeExpiry, - }, - nil, - }, - { - "missing cmd", - nil, - "", "", "", "", - nil, - fmt.Errorf("missing access token cmd"), - }, - { - "missing token-key", - []byte(`{ - "broken": "faketoken", - "token_expiry": { - "datetime": "2016-10-31 22:31:09.123000000Z" - } -}`), - "/fake/cmd/path", "{.token}", "", "", - nil, - fmt.Errorf("error parsing token-key %q", "{.token}"), - }, - { - "missing expiry-key", - []byte(`{ - "access_token": "faketoken", - "expires": "2016-10-31T22:31:09.123000000Z" -}`), - "/fake/cmd/path", "", "{.expiry}", "", - nil, - fmt.Errorf("error parsing expiry-key %q", "{.expiry}"), - }, - { - "invalid expiry timestamp", - []byte(`{ - "access_token": "faketoken", - "token_expiry": "sometime soon, idk" -}`), - "/fake/cmd/path", "", "", "", - &oauth2.Token{ - AccessToken: "faketoken", - TokenType: "Bearer", - Expiry: time.Time{}, - }, - nil, - }, - { - "bad JSON", - []byte(`{ - "access_token": "faketoken", - "token_expiry": "sometime soon, idk" - ------ -`), - "/fake/cmd", "", "", "", - nil, - fmt.Errorf("invalid character '-' after object key:value pair"), - }, - } - - for _, tc := range tests { - ts, err := newCmdTokenSource(tc.cmd, tc.tokenKey, tc.expiryKey, tc.timeFmt) - if err != nil { - if !strings.Contains(err.Error(), tc.expectErr.Error()) { - t.Errorf("%s newCmdTokenSource error: %v, want %v", tc.name, err, tc.expectErr) - } - continue - } - tok, err := ts.parseTokenCmdOutput(tc.output) - - if err != tc.expectErr && !strings.Contains(err.Error(), tc.expectErr.Error()) { - t.Errorf("%s parseCmdTokenSource error: %v, want %v", tc.name, err, tc.expectErr) - } - if !reflect.DeepEqual(tok, tc.tok) { - t.Errorf("%s got token %v, want %v", tc.name, tok, tc.tok) - } - } -} - -type fakePersister struct { - lk sync.Mutex - cache map[string]string -} - -func (f *fakePersister) Persist(cache map[string]string) error { - f.lk.Lock() - defer f.lk.Unlock() - f.cache = map[string]string{} - for k, v := range cache { - f.cache[k] = v - } - return nil -} - -func (f *fakePersister) read() map[string]string { - ret := map[string]string{} - f.lk.Lock() - for k, v := range f.cache { - ret[k] = v - } - return ret -} - -type fakeTokenSource struct { - token *oauth2.Token - err error -} - -func (f *fakeTokenSource) Token() (*oauth2.Token, error) { - return f.token, f.err -} - -func TestCachedTokenSource(t *testing.T) { - tok := &oauth2.Token{AccessToken: "fakeaccesstoken"} - persister := &fakePersister{} - source := &fakeTokenSource{ - token: tok, - err: nil, - } - cache := map[string]string{ - "foo": "bar", - "baz": "bazinga", - } - ts, err := newCachedTokenSource("fakeaccesstoken", "", persister, source, cache) - if err != nil { - t.Fatal(err) - } - var wg sync.WaitGroup - wg.Add(10) - for i := 0; i < 10; i++ { - go func() { - _, err := ts.Token() - if err != nil { - t.Errorf("unexpected error: %s", err) - } - wg.Done() - }() - } - wg.Wait() - cache["access-token"] = "fakeaccesstoken" - cache["expiry"] = tok.Expiry.Format(time.RFC3339Nano) - if got := persister.read(); !reflect.DeepEqual(got, cache) { - t.Errorf("got cache %v, want %v", got, cache) - } -} diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/client/auth/oidc/BUILD b/vendor/k8s.io/kubernetes/plugin/pkg/client/auth/oidc/BUILD deleted file mode 100644 index fdac035a..00000000 --- a/vendor/k8s.io/kubernetes/plugin/pkg/client/auth/oidc/BUILD +++ /dev/null @@ -1,48 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = ["oidc.go"], - tags = ["automanaged"], - deps = [ - "//pkg/client/restclient:go_default_library", - "//vendor:github.com/coreos/go-oidc/jose", - "//vendor:github.com/coreos/go-oidc/oauth2", - "//vendor:github.com/coreos/go-oidc/oidc", - "//vendor:github.com/golang/glog", - ], -) - -go_test( - name = "go_default_test", - srcs = ["oidc_test.go"], - library = ":go_default_library", - tags = ["automanaged"], - deps = [ - "//plugin/pkg/auth/authenticator/token/oidc/testing:go_default_library", - "//vendor:github.com/coreos/go-oidc/jose", - "//vendor:github.com/coreos/go-oidc/key", - "//vendor:github.com/coreos/go-oidc/oauth2", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/client/auth/oidc/OWNERS b/vendor/k8s.io/kubernetes/plugin/pkg/client/auth/oidc/OWNERS deleted file mode 100644 index 2f80bc7e..00000000 --- a/vendor/k8s.io/kubernetes/plugin/pkg/client/auth/oidc/OWNERS +++ /dev/null @@ -1,2 +0,0 @@ -assignees: - - ericchiang diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/client/auth/oidc/oidc.go b/vendor/k8s.io/kubernetes/plugin/pkg/client/auth/oidc/oidc.go deleted file mode 100644 index 68168bf9..00000000 --- a/vendor/k8s.io/kubernetes/plugin/pkg/client/auth/oidc/oidc.go +++ /dev/null @@ -1,333 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package oidc - -import ( - "encoding/base64" - "errors" - "fmt" - "net/http" - "strings" - "sync" - "time" - - "github.com/coreos/go-oidc/jose" - "github.com/coreos/go-oidc/oauth2" - "github.com/coreos/go-oidc/oidc" - "github.com/golang/glog" - - "k8s.io/kubernetes/pkg/client/restclient" -) - -const ( - cfgIssuerUrl = "idp-issuer-url" - cfgClientID = "client-id" - cfgClientSecret = "client-secret" - cfgCertificateAuthority = "idp-certificate-authority" - cfgCertificateAuthorityData = "idp-certificate-authority-data" - cfgExtraScopes = "extra-scopes" - cfgIDToken = "id-token" - cfgRefreshToken = "refresh-token" -) - -func init() { - if err := restclient.RegisterAuthProviderPlugin("oidc", newOIDCAuthProvider); err != nil { - glog.Fatalf("Failed to register oidc auth plugin: %v", err) - } -} - -// expiryDelta determines how earlier a token should be considered -// expired than its actual expiration time. It is used to avoid late -// expirations due to client-server time mismatches. -// -// NOTE(ericchiang): this is take from golang.org/x/oauth2 -const expiryDelta = 10 * time.Second - -var cache = newClientCache() - -// Like TLS transports, keep a cache of OIDC clients indexed by issuer URL. -type clientCache struct { - mu sync.RWMutex - cache map[cacheKey]*oidcAuthProvider -} - -func newClientCache() *clientCache { - return &clientCache{cache: make(map[cacheKey]*oidcAuthProvider)} -} - -type cacheKey struct { - // Canonical issuer URL string of the provider. - issuerURL string - - clientID string - clientSecret string - - // Don't use CA as cache key because we only add a cache entry if we can connect - // to the issuer in the first place. A valid CA is a prerequisite. -} - -func (c *clientCache) getClient(issuer, clientID, clientSecret string) (*oidcAuthProvider, bool) { - c.mu.RLock() - defer c.mu.RUnlock() - client, ok := c.cache[cacheKey{issuer, clientID, clientSecret}] - return client, ok -} - -// setClient attempts to put the client in the cache but may return any clients -// with the same keys set before. This is so there's only ever one client for a provider. -func (c *clientCache) setClient(issuer, clientID, clientSecret string, client *oidcAuthProvider) *oidcAuthProvider { - c.mu.Lock() - defer c.mu.Unlock() - key := cacheKey{issuer, clientID, clientSecret} - - // If another client has already initialized a client for the given provider we want - // to use that client instead of the one we're trying to set. This is so all transports - // share a client and can coordinate around the same mutex when refreshing and writing - // to the kubeconfig. - if oldClient, ok := c.cache[key]; ok { - return oldClient - } - - c.cache[key] = client - return client -} - -func newOIDCAuthProvider(_ string, cfg map[string]string, persister restclient.AuthProviderConfigPersister) (restclient.AuthProvider, error) { - issuer := cfg[cfgIssuerUrl] - if issuer == "" { - return nil, fmt.Errorf("Must provide %s", cfgIssuerUrl) - } - - clientID := cfg[cfgClientID] - if clientID == "" { - return nil, fmt.Errorf("Must provide %s", cfgClientID) - } - - clientSecret := cfg[cfgClientSecret] - if clientSecret == "" { - return nil, fmt.Errorf("Must provide %s", cfgClientSecret) - } - - // Check cache for existing provider. - if provider, ok := cache.getClient(issuer, clientID, clientSecret); ok { - return provider, nil - } - - var certAuthData []byte - var err error - if cfg[cfgCertificateAuthorityData] != "" { - certAuthData, err = base64.StdEncoding.DecodeString(cfg[cfgCertificateAuthorityData]) - if err != nil { - return nil, err - } - } - - clientConfig := restclient.Config{ - TLSClientConfig: restclient.TLSClientConfig{ - CAFile: cfg[cfgCertificateAuthority], - CAData: certAuthData, - }, - } - - trans, err := restclient.TransportFor(&clientConfig) - if err != nil { - return nil, err - } - hc := &http.Client{Transport: trans} - - providerCfg, err := oidc.FetchProviderConfig(hc, issuer) - if err != nil { - return nil, fmt.Errorf("error fetching provider config: %v", err) - } - - scopes := strings.Split(cfg[cfgExtraScopes], ",") - oidcCfg := oidc.ClientConfig{ - HTTPClient: hc, - Credentials: oidc.ClientCredentials{ - ID: clientID, - Secret: clientSecret, - }, - ProviderConfig: providerCfg, - Scope: append(scopes, oidc.DefaultScope...), - } - client, err := oidc.NewClient(oidcCfg) - if err != nil { - return nil, fmt.Errorf("error creating OIDC Client: %v", err) - } - - provider := &oidcAuthProvider{ - client: &oidcClient{client}, - cfg: cfg, - persister: persister, - now: time.Now, - } - - return cache.setClient(issuer, clientID, clientSecret, provider), nil -} - -type oidcAuthProvider struct { - // Interface rather than a raw *oidc.Client for testing. - client OIDCClient - - // Stubbed out for testing. - now func() time.Time - - // Mutex guards persisting to the kubeconfig file and allows synchronized - // updates to the in-memory config. It also ensures concurrent calls to - // the RoundTripper only trigger a single refresh request. - mu sync.Mutex - cfg map[string]string - persister restclient.AuthProviderConfigPersister -} - -func (p *oidcAuthProvider) WrapTransport(rt http.RoundTripper) http.RoundTripper { - return &roundTripper{ - wrapped: rt, - provider: p, - } -} - -func (p *oidcAuthProvider) Login() error { - return errors.New("not yet implemented") -} - -type OIDCClient interface { - refreshToken(rt string) (oauth2.TokenResponse, error) - verifyJWT(jwt *jose.JWT) error -} - -type roundTripper struct { - provider *oidcAuthProvider - wrapped http.RoundTripper -} - -func (r *roundTripper) RoundTrip(req *http.Request) (*http.Response, error) { - token, err := r.provider.idToken() - if err != nil { - return nil, err - } - - // shallow copy of the struct - r2 := new(http.Request) - *r2 = *req - // deep copy of the Header so we don't modify the original - // request's Header (as per RoundTripper contract). - r2.Header = make(http.Header) - for k, s := range req.Header { - r2.Header[k] = s - } - r2.Header.Set("Authorization", fmt.Sprintf("Bearer %s", token)) - - return r.wrapped.RoundTrip(r2) -} - -func (p *oidcAuthProvider) idToken() (string, error) { - p.mu.Lock() - defer p.mu.Unlock() - - if idToken, ok := p.cfg[cfgIDToken]; ok && len(idToken) > 0 { - valid, err := verifyJWTExpiry(p.now(), idToken) - if err != nil { - return "", err - } - if valid { - // If the cached id token is still valid use it. - return idToken, nil - } - } - - // Try to request a new token using the refresh token. - rt, ok := p.cfg[cfgRefreshToken] - if !ok || len(rt) == 0 { - return "", errors.New("No valid id-token, and cannot refresh without refresh-token") - } - - tokens, err := p.client.refreshToken(rt) - if err != nil { - return "", fmt.Errorf("could not refresh token: %v", err) - } - jwt, err := jose.ParseJWT(tokens.IDToken) - if err != nil { - return "", err - } - - if err := p.client.verifyJWT(&jwt); err != nil { - return "", err - } - - // Create a new config to persist. - newCfg := make(map[string]string) - for key, val := range p.cfg { - newCfg[key] = val - } - - if tokens.RefreshToken != "" && tokens.RefreshToken != rt { - newCfg[cfgRefreshToken] = tokens.RefreshToken - } - - newCfg[cfgIDToken] = tokens.IDToken - if err = p.persister.Persist(newCfg); err != nil { - return "", fmt.Errorf("could not perist new tokens: %v", err) - } - - // Update the in memory config to reflect the on disk one. - p.cfg = newCfg - - return tokens.IDToken, nil -} - -// oidcClient is the real implementation of the OIDCClient interface, which is -// used for testing. -type oidcClient struct { - client *oidc.Client -} - -func (o *oidcClient) refreshToken(rt string) (oauth2.TokenResponse, error) { - oac, err := o.client.OAuthClient() - if err != nil { - return oauth2.TokenResponse{}, err - } - - return oac.RequestToken(oauth2.GrantTypeRefreshToken, rt) -} - -func (o *oidcClient) verifyJWT(jwt *jose.JWT) error { - return o.client.VerifyJWT(*jwt) -} - -func verifyJWTExpiry(now time.Time, s string) (valid bool, err error) { - jwt, err := jose.ParseJWT(s) - if err != nil { - return false, fmt.Errorf("invalid %q", cfgIDToken) - } - claims, err := jwt.Claims() - if err != nil { - return false, err - } - - exp, ok, err := claims.TimeClaim("exp") - switch { - case err != nil: - return false, fmt.Errorf("failed to parse 'exp' claim: %v", err) - case !ok: - return false, errors.New("missing required 'exp' claim") - case exp.After(now.Add(expiryDelta)): - return true, nil - } - - return false, nil -} diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/client/auth/oidc/oidc_test.go b/vendor/k8s.io/kubernetes/plugin/pkg/client/auth/oidc/oidc_test.go deleted file mode 100644 index 16e11492..00000000 --- a/vendor/k8s.io/kubernetes/plugin/pkg/client/auth/oidc/oidc_test.go +++ /dev/null @@ -1,384 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package oidc - -import ( - "encoding/base64" - "errors" - "io/ioutil" - "os" - "path" - "reflect" - "testing" - "time" - - "github.com/coreos/go-oidc/jose" - "github.com/coreos/go-oidc/key" - "github.com/coreos/go-oidc/oauth2" - - oidctesting "k8s.io/kubernetes/plugin/pkg/auth/authenticator/token/oidc/testing" -) - -func clearCache() { - cache = newClientCache() -} - -type persister struct{} - -// we don't need to actually persist anything because there's no way for us to -// read from a persister. -func (p *persister) Persist(map[string]string) error { return nil } - -type noRefreshOIDCClient struct{} - -func (c *noRefreshOIDCClient) refreshToken(rt string) (oauth2.TokenResponse, error) { - return oauth2.TokenResponse{}, errors.New("alwaysErrOIDCClient: cannot refresh token") -} - -func (c *noRefreshOIDCClient) verifyJWT(jwt *jose.JWT) error { - return nil -} - -type mockOIDCClient struct { - tokenResponse oauth2.TokenResponse -} - -func (c *mockOIDCClient) refreshToken(rt string) (oauth2.TokenResponse, error) { - return c.tokenResponse, nil -} - -func (c *mockOIDCClient) verifyJWT(jwt *jose.JWT) error { - return nil -} - -func TestNewOIDCAuthProvider(t *testing.T) { - tempDir, err := ioutil.TempDir(os.TempDir(), "oidc_test") - if err != nil { - t.Fatalf("Cannot make temp dir %v", err) - } - cert := path.Join(tempDir, "oidc-cert") - key := path.Join(tempDir, "oidc-key") - defer os.RemoveAll(tempDir) - - oidctesting.GenerateSelfSignedCert(t, "127.0.0.1", cert, key) - op := oidctesting.NewOIDCProvider(t, "") - srv, err := op.ServeTLSWithKeyPair(cert, key) - if err != nil { - t.Fatalf("Cannot start server %v", err) - } - defer srv.Close() - - certData, err := ioutil.ReadFile(cert) - if err != nil { - t.Fatalf("Could not read cert bytes %v", err) - } - - makeToken := func(exp time.Time) *jose.JWT { - jwt, err := jose.NewSignedJWT(jose.Claims(map[string]interface{}{ - "exp": exp.UTC().Unix(), - }), op.PrivKey.Signer()) - if err != nil { - t.Fatalf("Could not create signed JWT %v", err) - } - return jwt - } - - t0 := time.Now() - - goodToken := makeToken(t0.Add(time.Hour)).Encode() - expiredToken := makeToken(t0.Add(-time.Hour)).Encode() - - tests := []struct { - name string - - cfg map[string]string - wantInitErr bool - - client OIDCClient - wantCfg map[string]string - wantTokenErr bool - }{ - { - // A Valid configuration - name: "no id token and no refresh token", - cfg: map[string]string{ - cfgIssuerUrl: srv.URL, - cfgCertificateAuthority: cert, - cfgClientID: "client-id", - cfgClientSecret: "client-secret", - }, - wantTokenErr: true, - }, - { - name: "valid config with an initial token", - cfg: map[string]string{ - cfgIssuerUrl: srv.URL, - cfgCertificateAuthority: cert, - cfgClientID: "client-id", - cfgClientSecret: "client-secret", - cfgIDToken: goodToken, - }, - client: new(noRefreshOIDCClient), - wantCfg: map[string]string{ - cfgIssuerUrl: srv.URL, - cfgCertificateAuthority: cert, - cfgClientID: "client-id", - cfgClientSecret: "client-secret", - cfgIDToken: goodToken, - }, - }, - { - name: "invalid ID token with a refresh token", - cfg: map[string]string{ - cfgIssuerUrl: srv.URL, - cfgCertificateAuthority: cert, - cfgClientID: "client-id", - cfgClientSecret: "client-secret", - cfgRefreshToken: "foo", - cfgIDToken: expiredToken, - }, - client: &mockOIDCClient{ - tokenResponse: oauth2.TokenResponse{ - IDToken: goodToken, - }, - }, - wantCfg: map[string]string{ - cfgIssuerUrl: srv.URL, - cfgCertificateAuthority: cert, - cfgClientID: "client-id", - cfgClientSecret: "client-secret", - cfgRefreshToken: "foo", - cfgIDToken: goodToken, - }, - }, - { - name: "invalid ID token with a refresh token, server returns new refresh token", - cfg: map[string]string{ - cfgIssuerUrl: srv.URL, - cfgCertificateAuthority: cert, - cfgClientID: "client-id", - cfgClientSecret: "client-secret", - cfgRefreshToken: "foo", - cfgIDToken: expiredToken, - }, - client: &mockOIDCClient{ - tokenResponse: oauth2.TokenResponse{ - IDToken: goodToken, - RefreshToken: "bar", - }, - }, - wantCfg: map[string]string{ - cfgIssuerUrl: srv.URL, - cfgCertificateAuthority: cert, - cfgClientID: "client-id", - cfgClientSecret: "client-secret", - cfgRefreshToken: "bar", - cfgIDToken: goodToken, - }, - }, - { - name: "expired token and no refresh otken", - cfg: map[string]string{ - cfgIssuerUrl: srv.URL, - cfgCertificateAuthority: cert, - cfgClientID: "client-id", - cfgClientSecret: "client-secret", - cfgIDToken: expiredToken, - }, - wantTokenErr: true, - }, - { - name: "valid base64d ca", - cfg: map[string]string{ - cfgIssuerUrl: srv.URL, - cfgCertificateAuthorityData: base64.StdEncoding.EncodeToString(certData), - cfgClientID: "client-id", - cfgClientSecret: "client-secret", - }, - client: new(noRefreshOIDCClient), - wantTokenErr: true, - }, - { - name: "missing client ID", - cfg: map[string]string{ - cfgIssuerUrl: srv.URL, - cfgCertificateAuthority: cert, - cfgClientSecret: "client-secret", - }, - wantInitErr: true, - }, - { - name: "missing client secret", - cfg: map[string]string{ - cfgIssuerUrl: srv.URL, - cfgCertificateAuthority: cert, - cfgClientID: "client-id", - }, - wantInitErr: true, - }, - { - name: "missing issuer URL", - cfg: map[string]string{ - cfgCertificateAuthority: cert, - cfgClientID: "client-id", - cfgClientSecret: "secret", - }, - wantInitErr: true, - }, - { - name: "missing TLS config", - cfg: map[string]string{ - cfgIssuerUrl: srv.URL, - cfgClientID: "client-id", - cfgClientSecret: "secret", - }, - wantInitErr: true, - }, - } - - for _, tt := range tests { - clearCache() - - p, err := newOIDCAuthProvider("cluster.example.com", tt.cfg, new(persister)) - if tt.wantInitErr { - if err == nil { - t.Errorf("%s: want non-nil err", tt.name) - } - continue - } - - if err != nil { - t.Errorf("%s: unexpected error on newOIDCAuthProvider: %v", tt.name, err) - continue - } - - provider := p.(*oidcAuthProvider) - provider.client = tt.client - provider.now = func() time.Time { return t0 } - - if _, err := provider.idToken(); err != nil { - if !tt.wantTokenErr { - t.Errorf("%s: failed to get id token: %v", tt.name, err) - } - continue - } - if tt.wantTokenErr { - t.Errorf("%s: expected to not get id token: %v", tt.name, err) - continue - } - - if !reflect.DeepEqual(tt.wantCfg, provider.cfg) { - t.Errorf("%s: expected config %#v got %#v", tt.name, tt.wantCfg, provider.cfg) - } - } -} - -func TestVerifyJWTExpiry(t *testing.T) { - privKey, err := key.GeneratePrivateKey() - if err != nil { - t.Fatalf("can't generate private key: %v", err) - } - makeToken := func(s string, exp time.Time, count int) *jose.JWT { - jwt, err := jose.NewSignedJWT(jose.Claims(map[string]interface{}{ - "test": s, - "exp": exp.UTC().Unix(), - "count": count, - }), privKey.Signer()) - if err != nil { - t.Fatalf("Could not create signed JWT %v", err) - } - return jwt - } - - t0 := time.Now() - - tests := []struct { - name string - jwt *jose.JWT - now time.Time - wantErr bool - wantExpired bool - }{ - { - name: "valid jwt", - jwt: makeToken("foo", t0.Add(time.Hour), 1), - now: t0, - }, - { - name: "invalid jwt", - jwt: &jose.JWT{}, - now: t0, - wantErr: true, - }, - { - name: "expired jwt", - jwt: makeToken("foo", t0.Add(-time.Hour), 1), - now: t0, - wantExpired: true, - }, - { - name: "jwt expires soon enough to be marked expired", - jwt: makeToken("foo", t0, 1), - now: t0, - wantExpired: true, - }, - } - - for _, tc := range tests { - func() { - valid, err := verifyJWTExpiry(tc.now, tc.jwt.Encode()) - if err != nil { - if !tc.wantErr { - t.Errorf("%s: %v", tc.name, err) - } - return - } - if tc.wantErr { - t.Errorf("%s: expected error", tc.name) - return - } - - if valid && tc.wantExpired { - t.Errorf("%s: expected token to be expired", tc.name) - } - if !valid && !tc.wantExpired { - t.Errorf("%s: expected token to be valid", tc.name) - } - }() - } -} - -func TestClientCache(t *testing.T) { - cache := newClientCache() - - if _, ok := cache.getClient("issuer1", "id1", "secret1"); ok { - t.Fatalf("got client before putting one in the cache") - } - - cli1 := new(oidcAuthProvider) - cli2 := new(oidcAuthProvider) - - gotcli := cache.setClient("issuer1", "id1", "secret1", cli1) - if cli1 != gotcli { - t.Fatalf("set first client and got a different one") - } - - gotcli = cache.setClient("issuer1", "id1", "secret1", cli2) - if cli1 != gotcli { - t.Fatalf("set a second client and didn't get the first") - } -} diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/client/auth/plugins.go b/vendor/k8s.io/kubernetes/plugin/pkg/client/auth/plugins.go deleted file mode 100644 index 21813b05..00000000 --- a/vendor/k8s.io/kubernetes/plugin/pkg/client/auth/plugins.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package auth - -import ( - // Initialize all known client auth plugins. - _ "k8s.io/kubernetes/plugin/pkg/client/auth/gcp" - _ "k8s.io/kubernetes/plugin/pkg/client/auth/oidc" -) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/BUILD b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/BUILD index fc7ff26c..43e349c9 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/BUILD +++ b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/BUILD @@ -19,8 +19,9 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/api/v1:go_default_library", + "//pkg/client/cache:go_default_library", + "//pkg/client/clientset_generated/clientset:go_default_library", "//pkg/client/record:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/util:go_default_library", "//pkg/util/hash:go_default_library", "//pkg/util/workqueue:go_default_library", @@ -29,11 +30,15 @@ go_library( "//plugin/pkg/scheduler/api:go_default_library", "//plugin/pkg/scheduler/metrics:go_default_library", "//plugin/pkg/scheduler/schedulercache:go_default_library", + "//plugin/pkg/scheduler/util:go_default_library", "//vendor:github.com/golang/glog", "//vendor:github.com/golang/groupcache/lru", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/util/errors", "//vendor:k8s.io/apimachinery/pkg/util/net", + "//vendor:k8s.io/apimachinery/pkg/util/sets", "//vendor:k8s.io/apimachinery/pkg/util/wait", + "//vendor:k8s.io/client-go/rest", ], ) @@ -60,6 +65,7 @@ go_test( "//plugin/pkg/scheduler/api:go_default_library", "//plugin/pkg/scheduler/schedulercache:go_default_library", "//plugin/pkg/scheduler/testing:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/util/diff", "//vendor:k8s.io/apimachinery/pkg/util/sets", @@ -85,6 +91,7 @@ filegroup( "//plugin/pkg/scheduler/metrics:all-srcs", "//plugin/pkg/scheduler/schedulercache:all-srcs", "//plugin/pkg/scheduler/testing:all-srcs", + "//plugin/pkg/scheduler/util:all-srcs", ], tags = ["automanaged"], ) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/OWNERS b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/OWNERS index 7ca55a81..2372f575 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/OWNERS +++ b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/OWNERS @@ -1,9 +1,8 @@ -assignees: - - davidopp - - timothysc - - wojtek-t +approvers: +- davidopp +- timothysc +- wojtek-t reviewers: - - davidopp - - timothysc - - wojtek-t - - jayunit100 +- davidopp +- timothysc +- wojtek-t diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/predicates/BUILD b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/predicates/BUILD index 4326afd2..83f2a112 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/predicates/BUILD +++ b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/predicates/BUILD @@ -19,7 +19,7 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/api/v1:go_default_library", - "//pkg/client/cache:go_default_library", + "//pkg/client/legacylisters:go_default_library", "//pkg/kubelet/qos:go_default_library", "//pkg/util/workqueue:go_default_library", "//plugin/pkg/scheduler/algorithm:go_default_library", diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/predicates/predicates.go b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/predicates/predicates.go index a5b2935e..c443964c 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/predicates/predicates.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/predicates/predicates.go @@ -29,7 +29,7 @@ import ( "k8s.io/apimachinery/pkg/labels" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/kubernetes/pkg/api/v1" - "k8s.io/kubernetes/pkg/client/cache" + "k8s.io/kubernetes/pkg/client/legacylisters" "k8s.io/kubernetes/pkg/kubelet/qos" "k8s.io/kubernetes/pkg/util/workqueue" "k8s.io/kubernetes/plugin/pkg/scheduler/algorithm" @@ -64,7 +64,7 @@ type PersistentVolumeClaimInfo interface { // CachedPersistentVolumeClaimInfo implements PersistentVolumeClaimInfo type CachedPersistentVolumeClaimInfo struct { - *cache.StoreToPersistentVolumeClaimLister + *listers.StoreToPersistentVolumeClaimLister } // GetPersistentVolumeClaimInfo fetches the claim in specified namespace with specified name @@ -73,12 +73,12 @@ func (c *CachedPersistentVolumeClaimInfo) GetPersistentVolumeClaimInfo(namespace } type CachedNodeInfo struct { - *cache.StoreToNodeLister + *listers.StoreToNodeLister } // GetNodeInfo returns cached data for the node 'id'. func (c *CachedNodeInfo) GetNodeInfo(id string) (*v1.Node, error) { - node, exists, err := c.Get(&v1.Node{ObjectMeta: v1.ObjectMeta{Name: id}}) + node, exists, err := c.Get(&v1.Node{ObjectMeta: metav1.ObjectMeta{Name: id}}) if err != nil { return nil, fmt.Errorf("error retrieving node '%v' from cache: %v", id, err) @@ -463,11 +463,7 @@ func GetResourceRequest(pod *v1.Pod) *schedulercache.Resource { result.NvidiaGPU += rQuantity.Value() default: if v1.IsOpaqueIntResourceName(rName) { - // Lazily allocate this map only if required. - if result.OpaqueIntResources == nil { - result.OpaqueIntResources = map[v1.ResourceName]int64{} - } - result.OpaqueIntResources[rName] += rQuantity.Value() + result.AddOpaque(rName, rQuantity.Value()) } } } @@ -490,11 +486,9 @@ func GetResourceRequest(pod *v1.Pod) *schedulercache.Resource { } default: if v1.IsOpaqueIntResourceName(rName) { - // Lazily allocate this map only if required. - if result.OpaqueIntResources == nil { - result.OpaqueIntResources = map[v1.ResourceName]int64{} - } value := rQuantity.Value() + // Ensure the opaque resource map is initialized in the result. + result.AddOpaque(rName, int64(0)) if value > result.OpaqueIntResources[rName] { result.OpaqueIntResources[rName] = value } @@ -1170,11 +1164,6 @@ func tolerationsToleratesTaints(tolerations []v1.Toleration, taints []v1.Taint) return true } - // The taint list isn't nil/empty, a nil/empty toleration list can't tolerate them. - if len(tolerations) == 0 { - return false - } - for i := range taints { taint := &taints[i] // skip taints that have effect PreferNoSchedule, since it is for priorities @@ -1182,7 +1171,7 @@ func tolerationsToleratesTaints(tolerations []v1.Toleration, taints []v1.Taint) continue } - if !v1.TaintToleratedByTolerations(taint, tolerations) { + if len(tolerations) == 0 || !v1.TaintToleratedByTolerations(taint, tolerations) { return false } } diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/predicates/predicates_test.go b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/predicates/predicates_test.go index fda8ce2d..39ebcc27 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/predicates/predicates_test.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/predicates/predicates_test.go @@ -418,7 +418,7 @@ func TestPodFitsHost(t *testing.T) { }, }, node: &v1.Node{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, }, @@ -432,7 +432,7 @@ func TestPodFitsHost(t *testing.T) { }, }, node: &v1.Node{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, }, @@ -1184,7 +1184,7 @@ func TestPodFitsSelector(t *testing.T) { // TODO: Uncomment this test when implement RequiredDuringSchedulingRequiredDuringExecution // { // pod: &v1.Pod{ - // ObjectMeta: v1.ObjectMeta{ + // ObjectMeta: metav1.ObjectMeta{ // Annotations: map[string]string{ // v1.AffinityAnnotationKey: ` // {"nodeAffinity": { @@ -1283,7 +1283,7 @@ func TestPodFitsSelector(t *testing.T) { expectedFailureReasons := []algorithm.PredicateFailureReason{ErrNodeSelectorNotMatch} for _, test := range tests { - node := v1.Node{ObjectMeta: v1.ObjectMeta{Labels: test.labels}} + node := v1.Node{ObjectMeta: metav1.ObjectMeta{Labels: test.labels}} nodeInfo := schedulercache.NewNodeInfo() nodeInfo.SetNode(&node) @@ -1349,7 +1349,7 @@ func TestNodeLabelPresence(t *testing.T) { expectedFailureReasons := []algorithm.PredicateFailureReason{ErrNodeLabelPresenceViolated} for _, test := range tests { - node := v1.Node{ObjectMeta: v1.ObjectMeta{Labels: label}} + node := v1.Node{ObjectMeta: metav1.ObjectMeta{Labels: label}} nodeInfo := schedulercache.NewNodeInfo() nodeInfo.SetNode(&node) @@ -1385,11 +1385,11 @@ func TestServiceAffinity(t *testing.T) { "region": "r2", "zone": "z22", } - node1 := v1.Node{ObjectMeta: v1.ObjectMeta{Name: "machine1", Labels: labels1}} - node2 := v1.Node{ObjectMeta: v1.ObjectMeta{Name: "machine2", Labels: labels2}} - node3 := v1.Node{ObjectMeta: v1.ObjectMeta{Name: "machine3", Labels: labels3}} - node4 := v1.Node{ObjectMeta: v1.ObjectMeta{Name: "machine4", Labels: labels4}} - node5 := v1.Node{ObjectMeta: v1.ObjectMeta{Name: "machine5", Labels: labels4}} + node1 := v1.Node{ObjectMeta: metav1.ObjectMeta{Name: "machine1", Labels: labels1}} + node2 := v1.Node{ObjectMeta: metav1.ObjectMeta{Name: "machine2", Labels: labels2}} + node3 := v1.Node{ObjectMeta: metav1.ObjectMeta{Name: "machine3", Labels: labels3}} + node4 := v1.Node{ObjectMeta: metav1.ObjectMeta{Name: "machine4", Labels: labels4}} + node5 := v1.Node{ObjectMeta: metav1.ObjectMeta{Name: "machine5", Labels: labels4}} tests := []struct { pod *v1.Pod pods []*v1.Pod @@ -1421,8 +1421,8 @@ func TestServiceAffinity(t *testing.T) { test: "pod with region label mismatch", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: selector}}, - pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: v1.ObjectMeta{Labels: selector}}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: selector}}, + pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: metav1.ObjectMeta{Labels: selector}}}, node: &node1, services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: selector}}}, fits: true, @@ -1430,8 +1430,8 @@ func TestServiceAffinity(t *testing.T) { test: "service pod on same node", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: selector}}, - pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine2"}, ObjectMeta: v1.ObjectMeta{Labels: selector}}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: selector}}, + pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine2"}, ObjectMeta: metav1.ObjectMeta{Labels: selector}}}, node: &node1, services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: selector}}}, fits: true, @@ -1439,8 +1439,8 @@ func TestServiceAffinity(t *testing.T) { test: "service pod on different node, region match", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: selector}}, - pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine3"}, ObjectMeta: v1.ObjectMeta{Labels: selector}}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: selector}}, + pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine3"}, ObjectMeta: metav1.ObjectMeta{Labels: selector}}}, node: &node1, services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: selector}}}, fits: false, @@ -1448,35 +1448,35 @@ func TestServiceAffinity(t *testing.T) { test: "service pod on different node, region mismatch", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: selector, Namespace: "ns1"}}, - pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine3"}, ObjectMeta: v1.ObjectMeta{Labels: selector, Namespace: "ns1"}}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: selector, Namespace: "ns1"}}, + pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine3"}, ObjectMeta: metav1.ObjectMeta{Labels: selector, Namespace: "ns1"}}}, node: &node1, - services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: selector}, ObjectMeta: v1.ObjectMeta{Namespace: "ns2"}}}, + services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: selector}, ObjectMeta: metav1.ObjectMeta{Namespace: "ns2"}}}, fits: true, labels: []string{"region"}, test: "service in different namespace, region mismatch", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: selector, Namespace: "ns1"}}, - pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine3"}, ObjectMeta: v1.ObjectMeta{Labels: selector, Namespace: "ns2"}}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: selector, Namespace: "ns1"}}, + pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine3"}, ObjectMeta: metav1.ObjectMeta{Labels: selector, Namespace: "ns2"}}}, node: &node1, - services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: selector}, ObjectMeta: v1.ObjectMeta{Namespace: "ns1"}}}, + services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: selector}, ObjectMeta: metav1.ObjectMeta{Namespace: "ns1"}}}, fits: true, labels: []string{"region"}, test: "pod in different namespace, region mismatch", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: selector, Namespace: "ns1"}}, - pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine3"}, ObjectMeta: v1.ObjectMeta{Labels: selector, Namespace: "ns1"}}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: selector, Namespace: "ns1"}}, + pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine3"}, ObjectMeta: metav1.ObjectMeta{Labels: selector, Namespace: "ns1"}}}, node: &node1, - services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: selector}, ObjectMeta: v1.ObjectMeta{Namespace: "ns1"}}}, + services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: selector}, ObjectMeta: metav1.ObjectMeta{Namespace: "ns1"}}}, fits: false, labels: []string{"region"}, test: "service and pod in same namespace, region mismatch", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: selector}}, - pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine2"}, ObjectMeta: v1.ObjectMeta{Labels: selector}}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: selector}}, + pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine2"}, ObjectMeta: metav1.ObjectMeta{Labels: selector}}}, node: &node1, services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: selector}}}, fits: false, @@ -1484,8 +1484,8 @@ func TestServiceAffinity(t *testing.T) { test: "service pod on different node, multiple labels, not all match", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: selector}}, - pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine5"}, ObjectMeta: v1.ObjectMeta{Labels: selector}}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: selector}}, + pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine5"}, ObjectMeta: metav1.ObjectMeta{Labels: selector}}}, node: &node4, services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: selector}}}, fits: true, @@ -1749,7 +1749,7 @@ func TestEBSVolumeCountConflicts(t *testing.T) { pvInfo := FakePersistentVolumeInfo{ { - ObjectMeta: v1.ObjectMeta{Name: "someEBSVol"}, + ObjectMeta: metav1.ObjectMeta{Name: "someEBSVol"}, Spec: v1.PersistentVolumeSpec{ PersistentVolumeSource: v1.PersistentVolumeSource{ AWSElasticBlockStore: &v1.AWSElasticBlockStoreVolumeSource{VolumeID: "ebsVol"}, @@ -1757,7 +1757,7 @@ func TestEBSVolumeCountConflicts(t *testing.T) { }, }, { - ObjectMeta: v1.ObjectMeta{Name: "someNonEBSVol"}, + ObjectMeta: metav1.ObjectMeta{Name: "someNonEBSVol"}, Spec: v1.PersistentVolumeSpec{ PersistentVolumeSource: v1.PersistentVolumeSource{}, }, @@ -1766,15 +1766,15 @@ func TestEBSVolumeCountConflicts(t *testing.T) { pvcInfo := FakePersistentVolumeClaimInfo{ { - ObjectMeta: v1.ObjectMeta{Name: "someEBSVol"}, + ObjectMeta: metav1.ObjectMeta{Name: "someEBSVol"}, Spec: v1.PersistentVolumeClaimSpec{VolumeName: "someEBSVol"}, }, { - ObjectMeta: v1.ObjectMeta{Name: "someNonEBSVol"}, + ObjectMeta: metav1.ObjectMeta{Name: "someNonEBSVol"}, Spec: v1.PersistentVolumeClaimSpec{VolumeName: "someNonEBSVol"}, }, { - ObjectMeta: v1.ObjectMeta{Name: "pvcWithDeletedPV"}, + ObjectMeta: metav1.ObjectMeta{Name: "pvcWithDeletedPV"}, Spec: v1.PersistentVolumeClaimSpec{VolumeName: "pvcWithDeletedPV"}, }, } @@ -1841,7 +1841,7 @@ func TestRunGeneralPredicates(t *testing.T) { nodeInfo: schedulercache.NewNodeInfo( newResourcePod(schedulercache.Resource{MilliCPU: 9, Memory: 19})), node: &v1.Node{ - ObjectMeta: v1.ObjectMeta{Name: "machine1"}, + ObjectMeta: metav1.ObjectMeta{Name: "machine1"}, Status: v1.NodeStatus{Capacity: makeResources(10, 20, 0, 32, 0).Capacity, Allocatable: makeAllocatableResources(10, 20, 0, 32, 0)}, }, fits: true, @@ -1853,7 +1853,7 @@ func TestRunGeneralPredicates(t *testing.T) { nodeInfo: schedulercache.NewNodeInfo( newResourcePod(schedulercache.Resource{MilliCPU: 5, Memory: 19})), node: &v1.Node{ - ObjectMeta: v1.ObjectMeta{Name: "machine1"}, + ObjectMeta: metav1.ObjectMeta{Name: "machine1"}, Status: v1.NodeStatus{Capacity: makeResources(10, 20, 0, 32, 0).Capacity, Allocatable: makeAllocatableResources(10, 20, 0, 32, 0)}, }, fits: false, @@ -1900,7 +1900,7 @@ func TestRunGeneralPredicates(t *testing.T) { }, nodeInfo: schedulercache.NewNodeInfo(), node: &v1.Node{ - ObjectMeta: v1.ObjectMeta{Name: "machine1"}, + ObjectMeta: metav1.ObjectMeta{Name: "machine1"}, Status: v1.NodeStatus{Capacity: makeResources(10, 20, 0, 32, 0).Capacity, Allocatable: makeAllocatableResources(10, 20, 0, 32, 0)}, }, fits: false, @@ -1912,7 +1912,7 @@ func TestRunGeneralPredicates(t *testing.T) { pod: newPodWithPort(123), nodeInfo: schedulercache.NewNodeInfo(newPodWithPort(123)), node: &v1.Node{ - ObjectMeta: v1.ObjectMeta{Name: "machine1"}, + ObjectMeta: metav1.ObjectMeta{Name: "machine1"}, Status: v1.NodeStatus{Capacity: makeResources(10, 20, 0, 32, 0).Capacity, Allocatable: makeAllocatableResources(10, 20, 0, 32, 0)}, }, fits: false, @@ -1943,7 +1943,7 @@ func TestInterPodAffinity(t *testing.T) { "zone": "z11", } podLabel2 := map[string]string{"security": "S1"} - node1 := v1.Node{ObjectMeta: v1.ObjectMeta{Name: "machine1", Labels: labels1}} + node1 := v1.Node{ObjectMeta: metav1.ObjectMeta{Name: "machine1", Labels: labels1}} tests := []struct { pod *v1.Pod pods []*v1.Pod @@ -1959,7 +1959,7 @@ func TestInterPodAffinity(t *testing.T) { }, { pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: podLabel2, }, Spec: v1.PodSpec{ @@ -1983,14 +1983,14 @@ func TestInterPodAffinity(t *testing.T) { }, }, }, - pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: v1.ObjectMeta{Labels: podLabel}}}, + pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabel}}}, node: &node1, fits: true, test: "satisfies with requiredDuringSchedulingIgnoredDuringExecution in PodAffinity using In operator that matches the existing pod", }, { pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: podLabel2, }, Spec: v1.PodSpec{ @@ -2014,14 +2014,14 @@ func TestInterPodAffinity(t *testing.T) { }, }, }, - pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: v1.ObjectMeta{Labels: podLabel}}}, + pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabel}}}, node: &node1, fits: true, test: "satisfies the pod with requiredDuringSchedulingIgnoredDuringExecution in PodAffinity using not in operator in labelSelector that matches the existing pod", }, { pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: podLabel2, }, Spec: v1.PodSpec{ @@ -2045,14 +2045,14 @@ func TestInterPodAffinity(t *testing.T) { }, }, }, - pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: v1.ObjectMeta{Labels: podLabel, Namespace: "ns"}}}, + pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabel, Namespace: "ns"}}}, node: &node1, fits: false, test: "Does not satisfy the PodAffinity with labelSelector because of diff Namespace", }, { pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: podLabel, }, Spec: v1.PodSpec{ @@ -2075,14 +2075,14 @@ func TestInterPodAffinity(t *testing.T) { }, }, }, - pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: v1.ObjectMeta{Labels: podLabel}}}, + pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabel}}}, node: &node1, fits: false, test: "Doesn't satisfy the PodAffinity because of unmatching labelSelector with the existing pod", }, { pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: podLabel2, }, Spec: v1.PodSpec{ @@ -2123,14 +2123,14 @@ func TestInterPodAffinity(t *testing.T) { }, }, }, - pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: v1.ObjectMeta{Labels: podLabel}}}, + pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabel}}}, node: &node1, fits: true, test: "satisfies the PodAffinity with different label Operators in multiple RequiredDuringSchedulingIgnoredDuringExecution ", }, { pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: podLabel2, }, Spec: v1.PodSpec{ @@ -2171,14 +2171,14 @@ func TestInterPodAffinity(t *testing.T) { }, }, }, - pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: v1.ObjectMeta{Labels: podLabel}}}, + pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabel}}}, node: &node1, fits: false, test: "The labelSelector requirements(items of matchExpressions) are ANDed, the pod cannot schedule onto the node because one of the matchExpression item don't match.", }, { pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: podLabel2, }, Spec: v1.PodSpec{ @@ -2218,7 +2218,7 @@ func TestInterPodAffinity(t *testing.T) { }, }, }, - pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: v1.ObjectMeta{Labels: podLabel}}}, + pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabel}}}, node: &node1, fits: true, test: "satisfies the PodAffinity and PodAntiAffinity with the existing pod", @@ -2226,7 +2226,7 @@ func TestInterPodAffinity(t *testing.T) { // TODO: Uncomment this block when implement RequiredDuringSchedulingRequiredDuringExecution. //{ // pod: &v1.Pod{ - // ObjectMeta: v1.ObjectMeta{ + // ObjectMeta: metav1.ObjectMeta{ // Labels: podLabel2, // Annotations: map[string]string{ // v1.AffinityAnnotationKey: ` @@ -2262,14 +2262,14 @@ func TestInterPodAffinity(t *testing.T) { // }, // }, // }, - // pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: v1.ObjectMeta{Labels: podlabel}}}, + // pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: metav1.ObjectMeta{Labels: podlabel}}}, // node: &node1, // fits: true, // test: "satisfies the PodAffinity with different Label Operators in multiple RequiredDuringSchedulingRequiredDuringExecution ", //}, { pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: podLabel2, }, Spec: v1.PodSpec{ @@ -2332,7 +2332,7 @@ func TestInterPodAffinity(t *testing.T) { }, }, }, - ObjectMeta: v1.ObjectMeta{Labels: podLabel}, + ObjectMeta: metav1.ObjectMeta{Labels: podLabel}, }, }, node: &node1, @@ -2341,7 +2341,7 @@ func TestInterPodAffinity(t *testing.T) { }, { pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: podLabel2, }, Spec: v1.PodSpec{ @@ -2381,14 +2381,14 @@ func TestInterPodAffinity(t *testing.T) { }, }, }, - pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: v1.ObjectMeta{Labels: podLabel}}}, + pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabel}}}, node: &node1, fits: false, test: "satisfies the PodAffinity but doesn't satisfies the PodAntiAffinity with the existing pod", }, { pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: podLabel, }, Spec: v1.PodSpec{ @@ -2451,7 +2451,7 @@ func TestInterPodAffinity(t *testing.T) { }, }, }, - ObjectMeta: v1.ObjectMeta{Labels: podLabel}, + ObjectMeta: metav1.ObjectMeta{Labels: podLabel}, }, }, node: &node1, @@ -2460,7 +2460,7 @@ func TestInterPodAffinity(t *testing.T) { }, { pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: podLabel, }, Spec: v1.PodSpec{ @@ -2484,14 +2484,14 @@ func TestInterPodAffinity(t *testing.T) { }, }, }, - pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine2"}, ObjectMeta: v1.ObjectMeta{Labels: podLabel}}}, + pods: []*v1.Pod{{Spec: v1.PodSpec{NodeName: "machine2"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabel}}}, node: &node1, fits: false, test: "pod matches its own Label in PodAffinity and that matches the existing pod Labels", }, { pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: podLabel, }, }, @@ -2517,7 +2517,7 @@ func TestInterPodAffinity(t *testing.T) { }, }, }, - ObjectMeta: v1.ObjectMeta{Labels: podLabel}, + ObjectMeta: metav1.ObjectMeta{Labels: podLabel}, }, }, node: &node1, @@ -2526,7 +2526,7 @@ func TestInterPodAffinity(t *testing.T) { }, { pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: podLabel, }, }, @@ -2552,7 +2552,7 @@ func TestInterPodAffinity(t *testing.T) { }, }, }, - ObjectMeta: v1.ObjectMeta{Labels: podLabel}, + ObjectMeta: metav1.ObjectMeta{Labels: podLabel}, }, }, node: &node1, @@ -2642,12 +2642,12 @@ func TestInterPodAffinityWithMultipleNodes(t *testing.T) { }, }, pods: []*v1.Pod{ - {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelA}}, + {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelA}}, }, nodes: []v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "machine1", Labels: labelRgChina}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine2", Labels: labelRgChinaAzAz1}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine3", Labels: labelRgIndia}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine1", Labels: labelRgChina}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine2", Labels: labelRgChinaAzAz1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine3", Labels: labelRgIndia}}, }, fits: map[string]bool{ "machine1": true, @@ -2695,12 +2695,12 @@ func TestInterPodAffinityWithMultipleNodes(t *testing.T) { }, }, pods: []*v1.Pod{ - {Spec: v1.PodSpec{NodeName: "nodeA"}, ObjectMeta: v1.ObjectMeta{Labels: map[string]string{"foo": "abc"}}}, - {Spec: v1.PodSpec{NodeName: "nodeB"}, ObjectMeta: v1.ObjectMeta{Labels: map[string]string{"foo": "def"}}}, + {Spec: v1.PodSpec{NodeName: "nodeA"}, ObjectMeta: metav1.ObjectMeta{Labels: map[string]string{"foo": "abc"}}}, + {Spec: v1.PodSpec{NodeName: "nodeB"}, ObjectMeta: metav1.ObjectMeta{Labels: map[string]string{"foo": "def"}}}, }, nodes: []v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "nodeA", Labels: map[string]string{"region": "r1", "hostname": "h1"}}}, - {ObjectMeta: v1.ObjectMeta{Name: "nodeB", Labels: map[string]string{"region": "r1", "hostname": "h2"}}}, + {ObjectMeta: metav1.ObjectMeta{Name: "nodeA", Labels: map[string]string{"region": "r1", "hostname": "h1"}}}, + {ObjectMeta: metav1.ObjectMeta{Name: "nodeB", Labels: map[string]string{"region": "r1", "hostname": "h2"}}}, }, fits: map[string]bool{ "nodeA": false, @@ -2710,7 +2710,7 @@ func TestInterPodAffinityWithMultipleNodes(t *testing.T) { }, { pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "foo": "bar", }, @@ -2738,8 +2738,8 @@ func TestInterPodAffinityWithMultipleNodes(t *testing.T) { }, pods: []*v1.Pod{}, nodes: []v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "nodeA", Labels: map[string]string{"zone": "az1", "hostname": "h1"}}}, - {ObjectMeta: v1.ObjectMeta{Name: "nodeB", Labels: map[string]string{"zone": "az2", "hostname": "h2"}}}, + {ObjectMeta: metav1.ObjectMeta{Name: "nodeA", Labels: map[string]string{"zone": "az1", "hostname": "h1"}}}, + {ObjectMeta: metav1.ObjectMeta{Name: "nodeB", Labels: map[string]string{"zone": "az2", "hostname": "h2"}}}, }, fits: map[string]bool{ "nodeA": true, @@ -2772,11 +2772,11 @@ func TestInterPodAffinityWithMultipleNodes(t *testing.T) { }, }, pods: []*v1.Pod{ - {Spec: v1.PodSpec{NodeName: "nodeA"}, ObjectMeta: v1.ObjectMeta{Labels: map[string]string{"foo": "abc"}}}, + {Spec: v1.PodSpec{NodeName: "nodeA"}, ObjectMeta: metav1.ObjectMeta{Labels: map[string]string{"foo": "abc"}}}, }, nodes: []v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "nodeA", Labels: map[string]string{"region": "r1", "hostname": "nodeA"}}}, - {ObjectMeta: v1.ObjectMeta{Name: "nodeB", Labels: map[string]string{"region": "r1", "hostname": "nodeB"}}}, + {ObjectMeta: metav1.ObjectMeta{Name: "nodeA", Labels: map[string]string{"region": "r1", "hostname": "nodeA"}}}, + {ObjectMeta: metav1.ObjectMeta{Name: "nodeB", Labels: map[string]string{"region": "r1", "hostname": "nodeB"}}}, }, fits: map[string]bool{ "nodeA": false, @@ -2808,12 +2808,12 @@ func TestInterPodAffinityWithMultipleNodes(t *testing.T) { }, }, pods: []*v1.Pod{ - {Spec: v1.PodSpec{NodeName: "nodeA"}, ObjectMeta: v1.ObjectMeta{Labels: map[string]string{"foo": "abc"}}}, + {Spec: v1.PodSpec{NodeName: "nodeA"}, ObjectMeta: metav1.ObjectMeta{Labels: map[string]string{"foo": "abc"}}}, }, nodes: []v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "nodeA", Labels: labelRgChina}}, - {ObjectMeta: v1.ObjectMeta{Name: "nodeB", Labels: labelRgChinaAzAz1}}, - {ObjectMeta: v1.ObjectMeta{Name: "nodeC", Labels: labelRgIndia}}, + {ObjectMeta: metav1.ObjectMeta{Name: "nodeA", Labels: labelRgChina}}, + {ObjectMeta: metav1.ObjectMeta{Name: "nodeB", Labels: labelRgChinaAzAz1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "nodeC", Labels: labelRgIndia}}, }, fits: map[string]bool{ "nodeA": false, @@ -2824,7 +2824,7 @@ func TestInterPodAffinityWithMultipleNodes(t *testing.T) { }, { pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{Labels: map[string]string{"foo": "123"}}, + ObjectMeta: metav1.ObjectMeta{Labels: map[string]string{"foo": "123"}}, Spec: v1.PodSpec{ Affinity: &v1.Affinity{ PodAntiAffinity: &v1.PodAntiAffinity{ @@ -2847,7 +2847,7 @@ func TestInterPodAffinityWithMultipleNodes(t *testing.T) { }, }, pods: []*v1.Pod{ - {Spec: v1.PodSpec{NodeName: "nodeA"}, ObjectMeta: v1.ObjectMeta{Labels: map[string]string{"foo": "bar"}}}, + {Spec: v1.PodSpec{NodeName: "nodeA"}, ObjectMeta: metav1.ObjectMeta{Labels: map[string]string{"foo": "bar"}}}, { Spec: v1.PodSpec{ NodeName: "nodeC", @@ -2873,10 +2873,10 @@ func TestInterPodAffinityWithMultipleNodes(t *testing.T) { }, }, nodes: []v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "nodeA", Labels: labelRgChina}}, - {ObjectMeta: v1.ObjectMeta{Name: "nodeB", Labels: labelRgChinaAzAz1}}, - {ObjectMeta: v1.ObjectMeta{Name: "nodeC", Labels: labelRgIndia}}, - {ObjectMeta: v1.ObjectMeta{Name: "nodeD", Labels: labelRgUS}}, + {ObjectMeta: metav1.ObjectMeta{Name: "nodeA", Labels: labelRgChina}}, + {ObjectMeta: metav1.ObjectMeta{Name: "nodeB", Labels: labelRgChinaAzAz1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "nodeC", Labels: labelRgIndia}}, + {ObjectMeta: metav1.ObjectMeta{Name: "nodeD", Labels: labelRgUS}}, }, fits: map[string]bool{ "nodeA": false, @@ -2954,12 +2954,12 @@ func TestPodToleratesTaints(t *testing.T) { }{ { pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod0", }, }, node: v1.Node{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ v1.TaintsAnnotationKey: ` [{ @@ -2975,7 +2975,7 @@ func TestPodToleratesTaints(t *testing.T) { }, { pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod1", Annotations: map[string]string{ v1.TolerationsAnnotationKey: ` @@ -2991,7 +2991,7 @@ func TestPodToleratesTaints(t *testing.T) { }, }, node: v1.Node{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ v1.TaintsAnnotationKey: ` [{ @@ -3007,7 +3007,7 @@ func TestPodToleratesTaints(t *testing.T) { }, { pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod2", Annotations: map[string]string{ v1.TolerationsAnnotationKey: ` @@ -3024,7 +3024,7 @@ func TestPodToleratesTaints(t *testing.T) { }, }, node: v1.Node{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ v1.TaintsAnnotationKey: ` [{ @@ -3040,7 +3040,7 @@ func TestPodToleratesTaints(t *testing.T) { }, { pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod2", Annotations: map[string]string{ v1.TolerationsAnnotationKey: ` @@ -3056,7 +3056,7 @@ func TestPodToleratesTaints(t *testing.T) { }, }, node: v1.Node{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ v1.TaintsAnnotationKey: ` [{ @@ -3072,7 +3072,7 @@ func TestPodToleratesTaints(t *testing.T) { }, { pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod2", Annotations: map[string]string{ v1.TolerationsAnnotationKey: ` @@ -3093,7 +3093,7 @@ func TestPodToleratesTaints(t *testing.T) { }, }, node: v1.Node{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ v1.TaintsAnnotationKey: ` [{ @@ -3113,7 +3113,7 @@ func TestPodToleratesTaints(t *testing.T) { }, { pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod2", Annotations: map[string]string{ v1.TolerationsAnnotationKey: ` @@ -3130,7 +3130,7 @@ func TestPodToleratesTaints(t *testing.T) { }, }, node: v1.Node{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ v1.TaintsAnnotationKey: ` [{ @@ -3147,7 +3147,7 @@ func TestPodToleratesTaints(t *testing.T) { }, { pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod2", Annotations: map[string]string{ v1.TolerationsAnnotationKey: ` @@ -3163,7 +3163,7 @@ func TestPodToleratesTaints(t *testing.T) { }, }, node: v1.Node{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ v1.TaintsAnnotationKey: ` [{ @@ -3180,7 +3180,7 @@ func TestPodToleratesTaints(t *testing.T) { }, { pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod2", Annotations: map[string]string{ v1.TolerationsAnnotationKey: ` @@ -3197,7 +3197,7 @@ func TestPodToleratesTaints(t *testing.T) { }, }, node: v1.Node{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ v1.TaintsAnnotationKey: ` [{ @@ -3212,6 +3212,31 @@ func TestPodToleratesTaints(t *testing.T) { test: "The pod has a toleration that key and value don't match the taint on the node, " + "but the effect of taint on node is PreferNochedule. Pod can be scheduled onto the node", }, + { + pod: &v1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "pod2", + }, + Spec: v1.PodSpec{ + Containers: []v1.Container{{Image: "pod2:V1"}}, + }, + }, + node: v1.Node{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + v1.TaintsAnnotationKey: ` + [{ + "key": "dedicated", + "value": "user1", + "effect": "PreferNoSchedule" + }]`, + }, + }, + }, + fits: true, + test: "The pod has no toleration, " + + "but the effect of taint on node is PreferNochedule. Pod can be scheduled onto the node", + }, } expectedFailureReasons := []algorithm.PredicateFailureReason{ErrTaintsTolerationsNotMatch} @@ -3412,3 +3437,149 @@ func TestPodSchedulesOnNodeWithDiskPressureCondition(t *testing.T) { } } } + +func createPodWithVolume(pod, pv, pvc string) *v1.Pod { + return &v1.Pod{ + ObjectMeta: metav1.ObjectMeta{Name: pod, Namespace: "default"}, + Spec: v1.PodSpec{ + Volumes: []v1.Volume{ + { + Name: pv, + VolumeSource: v1.VolumeSource{ + PersistentVolumeClaim: &v1.PersistentVolumeClaimVolumeSource{ + ClaimName: pvc, + }, + }, + }, + }, + }, + } +} + +func TestVolumeZonePredicate(t *testing.T) { + pvInfo := FakePersistentVolumeInfo{ + { + ObjectMeta: metav1.ObjectMeta{Name: "Vol_1", Labels: map[string]string{metav1.LabelZoneFailureDomain: "zone_1"}}, + }, + { + ObjectMeta: metav1.ObjectMeta{Name: "Vol_2", Labels: map[string]string{metav1.LabelZoneRegion: "zone_2", "uselessLabel": "none"}}, + }, + { + ObjectMeta: metav1.ObjectMeta{Name: "Vol_3", Labels: map[string]string{metav1.LabelZoneRegion: "zone_3"}}, + }, + } + + pvcInfo := FakePersistentVolumeClaimInfo{ + { + ObjectMeta: metav1.ObjectMeta{Name: "PVC_1", Namespace: "default"}, + Spec: v1.PersistentVolumeClaimSpec{VolumeName: "Vol_1"}, + }, + { + ObjectMeta: metav1.ObjectMeta{Name: "PVC_2", Namespace: "default"}, + Spec: v1.PersistentVolumeClaimSpec{VolumeName: "Vol_2"}, + }, + { + ObjectMeta: metav1.ObjectMeta{Name: "PVC_3", Namespace: "default"}, + Spec: v1.PersistentVolumeClaimSpec{VolumeName: "Vol_3"}, + }, + { + ObjectMeta: metav1.ObjectMeta{Name: "PVC_4", Namespace: "default"}, + Spec: v1.PersistentVolumeClaimSpec{VolumeName: "Vol_not_exist"}, + }, + } + + tests := []struct { + Name string + Pod *v1.Pod + Fits bool + Node *v1.Node + }{ + { + Name: "pod without volume", + Pod: &v1.Pod{ + ObjectMeta: metav1.ObjectMeta{Name: "pod_1", Namespace: "default"}, + }, + Node: &v1.Node{ + ObjectMeta: metav1.ObjectMeta{ + Name: "host1", + Labels: map[string]string{metav1.LabelZoneFailureDomain: "zone_1"}, + }, + }, + Fits: true, + }, + { + Name: "node without labels", + Pod: createPodWithVolume("pod_1", "vol_1", "PVC_1"), + Node: &v1.Node{ + ObjectMeta: metav1.ObjectMeta{ + Name: "host1", + }, + }, + Fits: true, + }, + { + Name: "label zone failure domain matched", + Pod: createPodWithVolume("pod_1", "vol_1", "PVC_1"), + Node: &v1.Node{ + ObjectMeta: metav1.ObjectMeta{ + Name: "host1", + Labels: map[string]string{metav1.LabelZoneFailureDomain: "zone_1", "uselessLabel": "none"}, + }, + }, + Fits: true, + }, + { + Name: "label zone region matched", + Pod: createPodWithVolume("pod_1", "vol_1", "PVC_2"), + Node: &v1.Node{ + ObjectMeta: metav1.ObjectMeta{ + Name: "host1", + Labels: map[string]string{metav1.LabelZoneRegion: "zone_2", "uselessLabel": "none"}, + }, + }, + Fits: true, + }, + { + Name: "label zone region failed match", + Pod: createPodWithVolume("pod_1", "vol_1", "PVC_2"), + Node: &v1.Node{ + ObjectMeta: metav1.ObjectMeta{ + Name: "host1", + Labels: map[string]string{metav1.LabelZoneRegion: "no_zone_2", "uselessLabel": "none"}, + }, + }, + Fits: false, + }, + { + Name: "label zone failure domain failed match", + Pod: createPodWithVolume("pod_1", "vol_1", "PVC_1"), + Node: &v1.Node{ + ObjectMeta: metav1.ObjectMeta{ + Name: "host1", + Labels: map[string]string{metav1.LabelZoneFailureDomain: "no_zone_1", "uselessLabel": "none"}, + }, + }, + Fits: false, + }, + } + + expectedFailureReasons := []algorithm.PredicateFailureReason{ErrVolumeZoneConflict} + + for _, test := range tests { + fit := NewVolumeZonePredicate(pvInfo, pvcInfo) + node := &schedulercache.NodeInfo{} + node.SetNode(test.Node) + + fits, reasons, err := fit(test.Pod, nil, node) + if err != nil { + t.Errorf("%s: unexpected error: %v", test.Name, err) + } + if !fits && !reflect.DeepEqual(reasons, expectedFailureReasons) { + t.Errorf("%s: unexpected failure reasons: %v, want: %v", test.Name, reasons, expectedFailureReasons) + } + if fits != test.Fits { + t.Errorf("%s: expected %v got %v", test.Name, test.Fits, fits) + } + + } +} diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/predicates/utils_test.go b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/predicates/utils_test.go index 7ddc9aff..f4febd18 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/predicates/utils_test.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/predicates/utils_test.go @@ -19,6 +19,7 @@ package predicates import ( "fmt" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/kubernetes/pkg/api/v1" ) @@ -32,7 +33,7 @@ func ExampleFindLabelsInSet() { // Utility functions will inspect their labels, filter them, and so on. nsPods := []*v1.Pod{ { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod1", Namespace: "ns1", Labels: map[string]string{ @@ -43,14 +44,14 @@ func ExampleFindLabelsInSet() { }, }, // first pod which will be used via the utilities { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod2", Namespace: "ns1", }, }, { - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod3ThatWeWontSee", }, }, diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/priorities/balanced_resource_allocation_test.go b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/priorities/balanced_resource_allocation_test.go index 607668ae..63348242 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/priorities/balanced_resource_allocation_test.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/priorities/balanced_resource_allocation_test.go @@ -20,6 +20,7 @@ import ( "reflect" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" schedulerapi "k8s.io/kubernetes/plugin/pkg/scheduler/api" @@ -146,10 +147,10 @@ func TestBalancedResourceAllocation(t *testing.T) { expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 10}, {Host: "machine2", Score: 10}}, test: "no resources requested, pods scheduled", pods: []*v1.Pod{ - {Spec: machine1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels2}}, - {Spec: machine1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, - {Spec: machine2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, - {Spec: machine2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, + {Spec: machine1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels2}}, + {Spec: machine1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, + {Spec: machine2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, + {Spec: machine2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, }, }, { @@ -169,10 +170,10 @@ func TestBalancedResourceAllocation(t *testing.T) { expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 4}, {Host: "machine2", Score: 6}}, test: "no resources requested, pods scheduled with resources", pods: []*v1.Pod{ - {Spec: cpuOnly, ObjectMeta: v1.ObjectMeta{Labels: labels2}}, - {Spec: cpuOnly, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, - {Spec: cpuOnly2, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, - {Spec: cpuAndMemory, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, + {Spec: cpuOnly, ObjectMeta: metav1.ObjectMeta{Labels: labels2}}, + {Spec: cpuOnly, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, + {Spec: cpuOnly2, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, + {Spec: cpuAndMemory, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, }, }, { diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/priorities/image_locality_test.go b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/priorities/image_locality_test.go index 0612a2e4..43a6f7d3 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/priorities/image_locality_test.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/priorities/image_locality_test.go @@ -21,6 +21,7 @@ import ( "sort" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" schedulerapi "k8s.io/kubernetes/plugin/pkg/scheduler/api" "k8s.io/kubernetes/plugin/pkg/scheduler/schedulercache" @@ -176,7 +177,7 @@ func TestImageLocalityPriority(t *testing.T) { func makeImageNode(node string, status v1.NodeStatus) *v1.Node { return &v1.Node{ - ObjectMeta: v1.ObjectMeta{Name: node}, + ObjectMeta: metav1.ObjectMeta{Name: node}, Status: status, } } diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/priorities/interpod_affinity_test.go b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/priorities/interpod_affinity_test.go index e61b54f6..ed143874 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/priorities/interpod_affinity_test.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/priorities/interpod_affinity_test.go @@ -272,11 +272,11 @@ func TestInterPodAffinityPriority(t *testing.T) { test string }{ { - pod: &v1.Pod{Spec: v1.PodSpec{NodeName: ""}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, + pod: &v1.Pod{Spec: v1.PodSpec{NodeName: ""}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, nodes: []*v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "machine1", Labels: labelRgChina}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine2", Labels: labelRgIndia}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine3", Labels: labelAzAz1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine1", Labels: labelRgChina}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine2", Labels: labelRgIndia}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine3", Labels: labelAzAz1}}, }, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 0}, {Host: "machine2", Score: 0}, {Host: "machine3", Score: 0}}, test: "all machines are same priority as Affinity is nil", @@ -285,16 +285,16 @@ func TestInterPodAffinityPriority(t *testing.T) { // the node(machine3) that don't have the label {"region": "whatever the value is"} (mismatch the topology key) but that have existing pods that match the labelSelector get low score // the node(machine2) that have the label {"region": "China"} (match the topology key) but that have existing pods that mismatch the labelSelector get low score { - pod: &v1.Pod{Spec: v1.PodSpec{NodeName: "", Affinity: stayWithS1InRegion}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, + pod: &v1.Pod{Spec: v1.PodSpec{NodeName: "", Affinity: stayWithS1InRegion}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, pods: []*v1.Pod{ - {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, - {Spec: v1.PodSpec{NodeName: "machine2"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS2}}, - {Spec: v1.PodSpec{NodeName: "machine3"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, + {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, + {Spec: v1.PodSpec{NodeName: "machine2"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS2}}, + {Spec: v1.PodSpec{NodeName: "machine3"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, }, nodes: []*v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "machine1", Labels: labelRgChina}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine2", Labels: labelRgIndia}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine3", Labels: labelAzAz1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine1", Labels: labelRgChina}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine2", Labels: labelRgIndia}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine3", Labels: labelAzAz1}}, }, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 10}, {Host: "machine2", Score: 0}, {Host: "machine3", Score: 0}}, test: "Affinity: pod that matches topology key & pods in nodes will get high score comparing to others" + @@ -307,12 +307,12 @@ func TestInterPodAffinityPriority(t *testing.T) { { pod: &v1.Pod{Spec: v1.PodSpec{NodeName: "", Affinity: stayWithS1InRegion}}, pods: []*v1.Pod{ - {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, + {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, }, nodes: []*v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "machine1", Labels: labelRgChina}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine2", Labels: labelRgChinaAzAz1}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine3", Labels: labelRgIndia}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine1", Labels: labelRgChina}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine2", Labels: labelRgChinaAzAz1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine3", Labels: labelRgIndia}}, }, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 10}, {Host: "machine2", Score: 10}, {Host: "machine3", Score: 0}}, test: "All the nodes that have the same topology key & label value with one of them has an existing pod that match the affinity rules, have the same score", @@ -322,37 +322,37 @@ func TestInterPodAffinityPriority(t *testing.T) { // Then, nodes in regionChina get higher score than nodes in regionIndia, and all the nodes in regionChina should get a same score(high score), // while all the nodes in regionIndia should get another same score(low score). { - pod: &v1.Pod{Spec: v1.PodSpec{NodeName: "", Affinity: stayWithS2InRegion}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, + pod: &v1.Pod{Spec: v1.PodSpec{NodeName: "", Affinity: stayWithS2InRegion}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, pods: []*v1.Pod{ - {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS2}}, - {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS2}}, - {Spec: v1.PodSpec{NodeName: "machine2"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS2}}, - {Spec: v1.PodSpec{NodeName: "machine3"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS2}}, - {Spec: v1.PodSpec{NodeName: "machine4"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS2}}, - {Spec: v1.PodSpec{NodeName: "machine5"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS2}}, + {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS2}}, + {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS2}}, + {Spec: v1.PodSpec{NodeName: "machine2"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS2}}, + {Spec: v1.PodSpec{NodeName: "machine3"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS2}}, + {Spec: v1.PodSpec{NodeName: "machine4"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS2}}, + {Spec: v1.PodSpec{NodeName: "machine5"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS2}}, }, nodes: []*v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "machine1", Labels: labelRgChina}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine2", Labels: labelRgIndia}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine3", Labels: labelRgChina}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine4", Labels: labelRgChina}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine5", Labels: labelRgIndia}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine1", Labels: labelRgChina}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine2", Labels: labelRgIndia}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine3", Labels: labelRgChina}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine4", Labels: labelRgChina}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine5", Labels: labelRgIndia}}, }, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 10}, {Host: "machine2", Score: 5}, {Host: "machine3", Score: 10}, {Host: "machine4", Score: 10}, {Host: "machine5", Score: 5}}, test: "Affinity: nodes in one region has more matching pods comparing to other reqion, so the region which has more macthes will get high score", }, // Test with the different operators and values for pod affinity scheduling preference, including some match failures. { - pod: &v1.Pod{Spec: v1.PodSpec{NodeName: "", Affinity: affinity3}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, + pod: &v1.Pod{Spec: v1.PodSpec{NodeName: "", Affinity: affinity3}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, pods: []*v1.Pod{ - {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, - {Spec: v1.PodSpec{NodeName: "machine2"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS2}}, - {Spec: v1.PodSpec{NodeName: "machine3"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, + {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, + {Spec: v1.PodSpec{NodeName: "machine2"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS2}}, + {Spec: v1.PodSpec{NodeName: "machine3"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, }, nodes: []*v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "machine1", Labels: labelRgChina}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine2", Labels: labelRgIndia}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine3", Labels: labelAzAz1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine1", Labels: labelRgChina}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine2", Labels: labelRgIndia}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine3", Labels: labelAzAz1}}, }, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 2}, {Host: "machine2", Score: 10}, {Host: "machine3", Score: 0}}, test: "Affinity: different Label operators and values for pod affinity scheduling preference, including some match failures ", @@ -360,29 +360,29 @@ func TestInterPodAffinityPriority(t *testing.T) { // Test the symmetry cases for affinity, the difference between affinity and symmetry is not the pod wants to run together with some existing pods, // but the existing pods have the inter pod affinity preference while the pod to schedule satisfy the preference. { - pod: &v1.Pod{Spec: v1.PodSpec{NodeName: ""}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS2}}, + pod: &v1.Pod{Spec: v1.PodSpec{NodeName: ""}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS2}}, pods: []*v1.Pod{ - {Spec: v1.PodSpec{NodeName: "machine1", Affinity: stayWithS1InRegion}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, - {Spec: v1.PodSpec{NodeName: "machine2", Affinity: stayWithS2InRegion}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS2}}, + {Spec: v1.PodSpec{NodeName: "machine1", Affinity: stayWithS1InRegion}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, + {Spec: v1.PodSpec{NodeName: "machine2", Affinity: stayWithS2InRegion}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS2}}, }, nodes: []*v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "machine1", Labels: labelRgChina}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine2", Labels: labelRgIndia}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine3", Labels: labelAzAz1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine1", Labels: labelRgChina}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine2", Labels: labelRgIndia}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine3", Labels: labelAzAz1}}, }, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 0}, {Host: "machine2", Score: 10}, {Host: "machine3", Score: 0}}, test: "Affinity symmetry: considred only the preferredDuringSchedulingIgnoredDuringExecution in pod affinity symmetry", }, { - pod: &v1.Pod{Spec: v1.PodSpec{NodeName: ""}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, + pod: &v1.Pod{Spec: v1.PodSpec{NodeName: ""}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, pods: []*v1.Pod{ - {Spec: v1.PodSpec{NodeName: "machine1", Affinity: hardAffinity}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, - {Spec: v1.PodSpec{NodeName: "machine2", Affinity: hardAffinity}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS2}}, + {Spec: v1.PodSpec{NodeName: "machine1", Affinity: hardAffinity}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, + {Spec: v1.PodSpec{NodeName: "machine2", Affinity: hardAffinity}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS2}}, }, nodes: []*v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "machine1", Labels: labelRgChina}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine2", Labels: labelRgIndia}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine3", Labels: labelAzAz1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine1", Labels: labelRgChina}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine2", Labels: labelRgIndia}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine3", Labels: labelAzAz1}}, }, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 10}, {Host: "machine2", Score: 10}, {Host: "machine3", Score: 0}}, test: "Affinity symmetry: considred RequiredDuringSchedulingIgnoredDuringExecution in pod affinity symmetry", @@ -395,69 +395,69 @@ func TestInterPodAffinityPriority(t *testing.T) { // there are 2 nodes, say node1 and node2, both nodes have pods that match the labelSelector and have topology-key in node.Labels. // But there are more pods on node1 that match the preference than node2. Then, node1 get a lower score than node2. { - pod: &v1.Pod{Spec: v1.PodSpec{NodeName: "", Affinity: awayFromS1InAz}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, + pod: &v1.Pod{Spec: v1.PodSpec{NodeName: "", Affinity: awayFromS1InAz}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, pods: []*v1.Pod{ - {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, - {Spec: v1.PodSpec{NodeName: "machine2"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS2}}, + {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, + {Spec: v1.PodSpec{NodeName: "machine2"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS2}}, }, nodes: []*v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "machine1", Labels: labelAzAz1}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine2", Labels: labelRgChina}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine1", Labels: labelAzAz1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine2", Labels: labelRgChina}}, }, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 0}, {Host: "machine2", Score: 10}}, test: "Anti Affinity: pod that doesnot match existing pods in node will get high score ", }, { - pod: &v1.Pod{Spec: v1.PodSpec{NodeName: "", Affinity: awayFromS1InAz}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, + pod: &v1.Pod{Spec: v1.PodSpec{NodeName: "", Affinity: awayFromS1InAz}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, pods: []*v1.Pod{ - {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, - {Spec: v1.PodSpec{NodeName: "machine2"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, + {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, + {Spec: v1.PodSpec{NodeName: "machine2"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, }, nodes: []*v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "machine1", Labels: labelAzAz1}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine2", Labels: labelRgChina}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine1", Labels: labelAzAz1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine2", Labels: labelRgChina}}, }, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 0}, {Host: "machine2", Score: 10}}, test: "Anti Affinity: pod that does not matches topology key & matches the pods in nodes will get higher score comparing to others ", }, { - pod: &v1.Pod{Spec: v1.PodSpec{NodeName: "", Affinity: awayFromS1InAz}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, + pod: &v1.Pod{Spec: v1.PodSpec{NodeName: "", Affinity: awayFromS1InAz}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, pods: []*v1.Pod{ - {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, - {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, - {Spec: v1.PodSpec{NodeName: "machine2"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS2}}, + {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, + {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, + {Spec: v1.PodSpec{NodeName: "machine2"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS2}}, }, nodes: []*v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "machine1", Labels: labelAzAz1}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine2", Labels: labelRgIndia}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine1", Labels: labelAzAz1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine2", Labels: labelRgIndia}}, }, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 0}, {Host: "machine2", Score: 10}}, test: "Anti Affinity: one node has more matching pods comparing to other node, so the node which has more unmacthes will get high score", }, // Test the symmetry cases for anti affinity { - pod: &v1.Pod{Spec: v1.PodSpec{NodeName: ""}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS2}}, + pod: &v1.Pod{Spec: v1.PodSpec{NodeName: ""}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS2}}, pods: []*v1.Pod{ - {Spec: v1.PodSpec{NodeName: "machine1", Affinity: awayFromS2InAz}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, - {Spec: v1.PodSpec{NodeName: "machine2", Affinity: awayFromS1InAz}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS2}}, + {Spec: v1.PodSpec{NodeName: "machine1", Affinity: awayFromS2InAz}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, + {Spec: v1.PodSpec{NodeName: "machine2", Affinity: awayFromS1InAz}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS2}}, }, nodes: []*v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "machine1", Labels: labelAzAz1}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine2", Labels: labelAzAz2}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine1", Labels: labelAzAz1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine2", Labels: labelAzAz2}}, }, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 0}, {Host: "machine2", Score: 10}}, test: "Anti Affinity symmetry: the existing pods in node which has anti affinity match will get high score", }, // Test both affinity and anti-affinity { - pod: &v1.Pod{Spec: v1.PodSpec{NodeName: "", Affinity: stayWithS1InRegionAwayFromS2InAz}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, + pod: &v1.Pod{Spec: v1.PodSpec{NodeName: "", Affinity: stayWithS1InRegionAwayFromS2InAz}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, pods: []*v1.Pod{ - {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, - {Spec: v1.PodSpec{NodeName: "machine2"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, + {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, + {Spec: v1.PodSpec{NodeName: "machine2"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, }, nodes: []*v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "machine1", Labels: labelRgChina}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine2", Labels: labelAzAz1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine1", Labels: labelRgChina}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine2", Labels: labelAzAz1}}, }, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 10}, {Host: "machine2", Score: 0}}, test: "Affinity and Anti Affinity: considered only preferredDuringSchedulingIgnoredDuringExecution in both pod affinity & anti affinity", @@ -467,22 +467,22 @@ func TestInterPodAffinityPriority(t *testing.T) { // so that all the pods of a RC/service can stay in a same region but trying to separate with each other // machine-1,machine-3,machine-4 are in ChinaRegion others machin-2,machine-5 are in IndiaRegion { - pod: &v1.Pod{Spec: v1.PodSpec{NodeName: "", Affinity: stayWithS1InRegionAwayFromS2InAz}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, + pod: &v1.Pod{Spec: v1.PodSpec{NodeName: "", Affinity: stayWithS1InRegionAwayFromS2InAz}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, pods: []*v1.Pod{ - {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, - {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, - {Spec: v1.PodSpec{NodeName: "machine2"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, - {Spec: v1.PodSpec{NodeName: "machine3"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, - {Spec: v1.PodSpec{NodeName: "machine3"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, - {Spec: v1.PodSpec{NodeName: "machine4"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, - {Spec: v1.PodSpec{NodeName: "machine5"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, + {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, + {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, + {Spec: v1.PodSpec{NodeName: "machine2"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, + {Spec: v1.PodSpec{NodeName: "machine3"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, + {Spec: v1.PodSpec{NodeName: "machine3"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, + {Spec: v1.PodSpec{NodeName: "machine4"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, + {Spec: v1.PodSpec{NodeName: "machine5"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, }, nodes: []*v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "machine1", Labels: labelRgChinaAzAz1}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine2", Labels: labelRgIndia}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine3", Labels: labelRgChina}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine4", Labels: labelRgChina}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine5", Labels: labelRgIndia}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine1", Labels: labelRgChinaAzAz1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine2", Labels: labelRgIndia}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine3", Labels: labelRgChina}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine4", Labels: labelRgChina}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine5", Labels: labelRgIndia}}, }, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 10}, {Host: "machine2", Score: 4}, {Host: "machine3", Score: 10}, {Host: "machine4", Score: 10}, {Host: "machine5", Score: 4}}, test: "Affinity and Anti Affinity: considering both affinity and anti-affinity, the pod to schedule and existing pods have the same labels", @@ -493,18 +493,18 @@ func TestInterPodAffinityPriority(t *testing.T) { // for Affinity symmetry, the weights are: 0, 0, 8, 0 // for Anti Affinity symmetry, the weights are: 0, 0, 0, -5 { - pod: &v1.Pod{Spec: v1.PodSpec{NodeName: "", Affinity: stayWithS1InRegionAwayFromS2InAz}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, + pod: &v1.Pod{Spec: v1.PodSpec{NodeName: "", Affinity: stayWithS1InRegionAwayFromS2InAz}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, pods: []*v1.Pod{ - {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS1}}, - {Spec: v1.PodSpec{NodeName: "machine2"}, ObjectMeta: v1.ObjectMeta{Labels: podLabelSecurityS2}}, + {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS1}}, + {Spec: v1.PodSpec{NodeName: "machine2"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelSecurityS2}}, {Spec: v1.PodSpec{NodeName: "machine3", Affinity: stayWithS1InRegionAwayFromS2InAz}}, {Spec: v1.PodSpec{NodeName: "machine4", Affinity: awayFromS1InAz}}, }, nodes: []*v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "machine1", Labels: labelRgChina}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine2", Labels: labelAzAz1}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine3", Labels: labelRgIndia}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine4", Labels: labelAzAz2}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine1", Labels: labelRgChina}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine2", Labels: labelAzAz1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine3", Labels: labelRgIndia}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine4", Labels: labelAzAz2}}, }, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 10}, {Host: "machine2", Score: 0}, {Host: "machine3", Score: 10}, {Host: "machine4", Score: 0}}, test: "Affinity and Anti Affinity and symmetry: considered only preferredDuringSchedulingIgnoredDuringExecution in both pod affinity & anti affinity & symmetry", @@ -569,30 +569,30 @@ func TestHardPodAffinitySymmetricWeight(t *testing.T) { test string }{ { - pod: &v1.Pod{Spec: v1.PodSpec{NodeName: ""}, ObjectMeta: v1.ObjectMeta{Labels: podLabelServiceS1}}, + pod: &v1.Pod{Spec: v1.PodSpec{NodeName: ""}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelServiceS1}}, pods: []*v1.Pod{ {Spec: v1.PodSpec{NodeName: "machine1", Affinity: hardPodAffinity}}, {Spec: v1.PodSpec{NodeName: "machine2", Affinity: hardPodAffinity}}, }, nodes: []*v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "machine1", Labels: labelRgChina}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine2", Labels: labelRgIndia}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine3", Labels: labelAzAz1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine1", Labels: labelRgChina}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine2", Labels: labelRgIndia}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine3", Labels: labelAzAz1}}, }, hardPodAffinityWeight: v1.DefaultHardPodAffinitySymmetricWeight, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 10}, {Host: "machine2", Score: 10}, {Host: "machine3", Score: 0}}, test: "Hard Pod Affinity symmetry: hard pod affinity symmetry weights 1 by default, then nodes that match the hard pod affinity symmetry rules, get a high score", }, { - pod: &v1.Pod{Spec: v1.PodSpec{NodeName: ""}, ObjectMeta: v1.ObjectMeta{Labels: podLabelServiceS1}}, + pod: &v1.Pod{Spec: v1.PodSpec{NodeName: ""}, ObjectMeta: metav1.ObjectMeta{Labels: podLabelServiceS1}}, pods: []*v1.Pod{ {Spec: v1.PodSpec{NodeName: "machine1", Affinity: hardPodAffinity}}, {Spec: v1.PodSpec{NodeName: "machine2", Affinity: hardPodAffinity}}, }, nodes: []*v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "machine1", Labels: labelRgChina}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine2", Labels: labelRgIndia}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine3", Labels: labelAzAz1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine1", Labels: labelRgChina}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine2", Labels: labelRgIndia}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine3", Labels: labelAzAz1}}, }, hardPodAffinityWeight: 0, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 0}, {Host: "machine2", Score: 0}, {Host: "machine3", Score: 0}}, @@ -657,28 +657,28 @@ func TestSoftPodAntiAffinityWithFailureDomains(t *testing.T) { test string }{ { - pod: &v1.Pod{Spec: v1.PodSpec{NodeName: "", Affinity: antiAffinity1}, ObjectMeta: v1.ObjectMeta{Labels: podLabel1}}, + pod: &v1.Pod{Spec: v1.PodSpec{NodeName: "", Affinity: antiAffinity1}, ObjectMeta: metav1.ObjectMeta{Labels: podLabel1}}, pods: []*v1.Pod{ - {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: v1.ObjectMeta{Labels: podLabel1}}, - {Spec: v1.PodSpec{NodeName: "machine2"}, ObjectMeta: v1.ObjectMeta{Labels: podLabel1}}, + {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabel1}}, + {Spec: v1.PodSpec{NodeName: "machine2"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabel1}}, }, nodes: []*v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "machine1", Labels: LabelZoneFailureDomainAZ1}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine2", Labels: labelAzAZ1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine1", Labels: LabelZoneFailureDomainAZ1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine2", Labels: labelAzAZ1}}, }, failureDomains: priorityutil.Topologies{DefaultKeys: strings.Split(v1.DefaultFailureDomains, ",")}, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 0}, {Host: "machine2", Score: 10}}, test: "Soft Pod Anti Affinity: when the topologyKey is emtpy, match among topologyKeys indicated by failure domains.", }, { - pod: &v1.Pod{Spec: v1.PodSpec{NodeName: "", Affinity: antiAffinity1}, ObjectMeta: v1.ObjectMeta{Labels: podLabel1}}, + pod: &v1.Pod{Spec: v1.PodSpec{NodeName: "", Affinity: antiAffinity1}, ObjectMeta: metav1.ObjectMeta{Labels: podLabel1}}, pods: []*v1.Pod{ - {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: v1.ObjectMeta{Labels: podLabel1}}, - {Spec: v1.PodSpec{NodeName: "machine2"}, ObjectMeta: v1.ObjectMeta{Labels: podLabel1}}, + {Spec: v1.PodSpec{NodeName: "machine1"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabel1}}, + {Spec: v1.PodSpec{NodeName: "machine2"}, ObjectMeta: metav1.ObjectMeta{Labels: podLabel1}}, }, nodes: []*v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "machine1", Labels: LabelZoneFailureDomainAZ1}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine2", Labels: labelAzAZ1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine1", Labels: LabelZoneFailureDomainAZ1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine2", Labels: labelAzAZ1}}, }, failureDomains: priorityutil.Topologies{}, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 0}, {Host: "machine2", Score: 0}}, diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/priorities/least_requested_test.go b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/priorities/least_requested_test.go index f47a76e6..d9393d45 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/priorities/least_requested_test.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/priorities/least_requested_test.go @@ -20,6 +20,7 @@ import ( "reflect" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" schedulerapi "k8s.io/kubernetes/plugin/pkg/scheduler/api" @@ -146,10 +147,10 @@ func TestLeastRequested(t *testing.T) { expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 10}, {Host: "machine2", Score: 10}}, test: "no resources requested, pods scheduled", pods: []*v1.Pod{ - {Spec: machine1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels2}}, - {Spec: machine1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, - {Spec: machine2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, - {Spec: machine2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, + {Spec: machine1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels2}}, + {Spec: machine1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, + {Spec: machine2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, + {Spec: machine2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, }, }, { @@ -169,10 +170,10 @@ func TestLeastRequested(t *testing.T) { expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 7}, {Host: "machine2", Score: 5}}, test: "no resources requested, pods scheduled with resources", pods: []*v1.Pod{ - {Spec: cpuOnly, ObjectMeta: v1.ObjectMeta{Labels: labels2}}, - {Spec: cpuOnly, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, - {Spec: cpuOnly2, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, - {Spec: cpuAndMemory, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, + {Spec: cpuOnly, ObjectMeta: metav1.ObjectMeta{Labels: labels2}}, + {Spec: cpuOnly, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, + {Spec: cpuOnly2, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, + {Spec: cpuAndMemory, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, }, }, { diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/priorities/most_requested_test.go b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/priorities/most_requested_test.go index fef9748a..794aefac 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/priorities/most_requested_test.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/priorities/most_requested_test.go @@ -20,6 +20,7 @@ import ( "reflect" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" schedulerapi "k8s.io/kubernetes/plugin/pkg/scheduler/api" @@ -140,10 +141,10 @@ func TestMostRequested(t *testing.T) { expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 3}, {Host: "machine2", Score: 4}}, test: "no resources requested, pods scheduled with resources", pods: []*v1.Pod{ - {Spec: cpuOnly, ObjectMeta: v1.ObjectMeta{Labels: labels2}}, - {Spec: cpuOnly, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, - {Spec: cpuOnly2, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, - {Spec: cpuAndMemory, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, + {Spec: cpuOnly, ObjectMeta: metav1.ObjectMeta{Labels: labels2}}, + {Spec: cpuOnly, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, + {Spec: cpuOnly2, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, + {Spec: cpuAndMemory, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, }, }, { diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/priorities/node_affinity_test.go b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/priorities/node_affinity_test.go index a13b90a7..5f81ebeb 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/priorities/node_affinity_test.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/priorities/node_affinity_test.go @@ -20,6 +20,7 @@ import ( "reflect" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" schedulerapi "k8s.io/kubernetes/plugin/pkg/scheduler/api" "k8s.io/kubernetes/plugin/pkg/scheduler/schedulercache" @@ -108,14 +109,14 @@ func TestNodeAffinityPriority(t *testing.T) { }{ { pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{}, }, }, nodes: []*v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "machine1", Labels: label1}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine2", Labels: label2}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine3", Labels: label3}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine1", Labels: label1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine2", Labels: label2}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine3", Labels: label3}}, }, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 0}, {Host: "machine2", Score: 0}, {Host: "machine3", Score: 0}}, test: "all machines are same priority as NodeAffinity is nil", @@ -127,9 +128,9 @@ func TestNodeAffinityPriority(t *testing.T) { }, }, nodes: []*v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "machine1", Labels: label4}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine2", Labels: label2}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine3", Labels: label3}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine1", Labels: label4}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine2", Labels: label2}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine3", Labels: label3}}, }, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 0}, {Host: "machine2", Score: 0}, {Host: "machine3", Score: 0}}, test: "no machine macthes preferred scheduling requirements in NodeAffinity of pod so all machines' priority is zero", @@ -141,9 +142,9 @@ func TestNodeAffinityPriority(t *testing.T) { }, }, nodes: []*v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "machine1", Labels: label1}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine2", Labels: label2}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine3", Labels: label3}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine1", Labels: label1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine2", Labels: label2}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine3", Labels: label3}}, }, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 10}, {Host: "machine2", Score: 0}, {Host: "machine3", Score: 0}}, test: "only machine1 matches the preferred scheduling requirements of pod", @@ -155,9 +156,9 @@ func TestNodeAffinityPriority(t *testing.T) { }, }, nodes: []*v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "machine1", Labels: label1}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine5", Labels: label5}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine2", Labels: label2}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine1", Labels: label1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine5", Labels: label5}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine2", Labels: label2}}, }, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 1}, {Host: "machine5", Score: 10}, {Host: "machine2", Score: 3}}, test: "all machines matches the preferred scheduling requirements of pod but with different priorities ", diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/priorities/node_label_test.go b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/priorities/node_label_test.go index 58913ae4..b8f413ba 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/priorities/node_label_test.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/priorities/node_label_test.go @@ -21,6 +21,7 @@ import ( "sort" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" schedulerapi "k8s.io/kubernetes/plugin/pkg/scheduler/api" "k8s.io/kubernetes/plugin/pkg/scheduler/schedulercache" @@ -39,9 +40,9 @@ func TestNewNodeLabelPriority(t *testing.T) { }{ { nodes: []*v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "machine1", Labels: label1}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine2", Labels: label2}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine3", Labels: label3}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine1", Labels: label1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine2", Labels: label2}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine3", Labels: label3}}, }, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 0}, {Host: "machine2", Score: 0}, {Host: "machine3", Score: 0}}, label: "baz", @@ -50,9 +51,9 @@ func TestNewNodeLabelPriority(t *testing.T) { }, { nodes: []*v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "machine1", Labels: label1}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine2", Labels: label2}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine3", Labels: label3}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine1", Labels: label1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine2", Labels: label2}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine3", Labels: label3}}, }, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 10}, {Host: "machine2", Score: 10}, {Host: "machine3", Score: 10}}, label: "baz", @@ -61,9 +62,9 @@ func TestNewNodeLabelPriority(t *testing.T) { }, { nodes: []*v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "machine1", Labels: label1}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine2", Labels: label2}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine3", Labels: label3}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine1", Labels: label1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine2", Labels: label2}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine3", Labels: label3}}, }, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 10}, {Host: "machine2", Score: 0}, {Host: "machine3", Score: 0}}, label: "foo", @@ -72,9 +73,9 @@ func TestNewNodeLabelPriority(t *testing.T) { }, { nodes: []*v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "machine1", Labels: label1}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine2", Labels: label2}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine3", Labels: label3}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine1", Labels: label1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine2", Labels: label2}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine3", Labels: label3}}, }, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 0}, {Host: "machine2", Score: 10}, {Host: "machine3", Score: 10}}, label: "foo", @@ -83,9 +84,9 @@ func TestNewNodeLabelPriority(t *testing.T) { }, { nodes: []*v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "machine1", Labels: label1}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine2", Labels: label2}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine3", Labels: label3}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine1", Labels: label1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine2", Labels: label2}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine3", Labels: label3}}, }, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 0}, {Host: "machine2", Score: 10}, {Host: "machine3", Score: 10}}, label: "bar", @@ -94,9 +95,9 @@ func TestNewNodeLabelPriority(t *testing.T) { }, { nodes: []*v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "machine1", Labels: label1}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine2", Labels: label2}}, - {ObjectMeta: v1.ObjectMeta{Name: "machine3", Labels: label3}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine1", Labels: label1}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine2", Labels: label2}}, + {ObjectMeta: metav1.ObjectMeta{Name: "machine3", Labels: label3}}, }, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 10}, {Host: "machine2", Score: 0}, {Host: "machine3", Score: 0}}, label: "bar", diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/priorities/node_prefer_avoid_pods_test.go b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/priorities/node_prefer_avoid_pods_test.go index f5f54bf0..9cac8d4b 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/priorities/node_prefer_avoid_pods_test.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/priorities/node_prefer_avoid_pods_test.go @@ -70,13 +70,13 @@ func TestNodePreferAvoidPriority(t *testing.T) { } testNodes := []*v1.Node{ { - ObjectMeta: v1.ObjectMeta{Name: "machine1", Annotations: annotations1}, + ObjectMeta: metav1.ObjectMeta{Name: "machine1", Annotations: annotations1}, }, { - ObjectMeta: v1.ObjectMeta{Name: "machine2", Annotations: annotations2}, + ObjectMeta: metav1.ObjectMeta{Name: "machine2", Annotations: annotations2}, }, { - ObjectMeta: v1.ObjectMeta{Name: "machine3"}, + ObjectMeta: metav1.ObjectMeta{Name: "machine3"}, }, } trueVar := true @@ -88,7 +88,7 @@ func TestNodePreferAvoidPriority(t *testing.T) { }{ { pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "default", OwnerReferences: []metav1.OwnerReference{ {Kind: "ReplicationController", Name: "foo", UID: "abcdef123456", Controller: &trueVar}, @@ -101,7 +101,7 @@ func TestNodePreferAvoidPriority(t *testing.T) { }, { pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "default", OwnerReferences: []metav1.OwnerReference{ {Kind: "RandomController", Name: "foo", UID: "abcdef123456", Controller: &trueVar}, @@ -114,7 +114,7 @@ func TestNodePreferAvoidPriority(t *testing.T) { }, { pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "default", OwnerReferences: []metav1.OwnerReference{ {Kind: "ReplicationController", Name: "foo", UID: "abcdef123456"}, @@ -127,7 +127,7 @@ func TestNodePreferAvoidPriority(t *testing.T) { }, { pod: &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "default", OwnerReferences: []metav1.OwnerReference{ {Kind: "ReplicaSet", Name: "foo", UID: "qwert12345", Controller: &trueVar}, diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/priorities/selector_spreading_test.go b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/priorities/selector_spreading_test.go index 7237012a..226d7557 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/priorities/selector_spreading_test.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/priorities/selector_spreading_test.go @@ -70,25 +70,25 @@ func TestSelectorSpreadPriority(t *testing.T) { test: "nothing scheduled", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: labels1}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, pods: []*v1.Pod{{Spec: zone1Spec}}, nodes: []string{"machine1", "machine2"}, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 10}, {Host: "machine2", Score: 10}}, test: "no services", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: labels1}}, - pods: []*v1.Pod{{Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels2}}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, + pods: []*v1.Pod{{Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels2}}}, nodes: []string{"machine1", "machine2"}, services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: map[string]string{"key": "value"}}}}, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 10}, {Host: "machine2", Score: 10}}, test: "different services", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: labels1}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, pods: []*v1.Pod{ - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels2}}, - {Spec: zone2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels2}}, + {Spec: zone2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, }, nodes: []string{"machine1", "machine2"}, services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: labels1}}}, @@ -96,13 +96,13 @@ func TestSelectorSpreadPriority(t *testing.T) { test: "two pods, one service pod", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: labels1}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, pods: []*v1.Pod{ - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels2}}, - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1, Namespace: v1.NamespaceDefault}}, - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1, Namespace: "ns1"}}, - {Spec: zone2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, - {Spec: zone2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels2}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels2}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1, Namespace: metav1.NamespaceDefault}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1, Namespace: "ns1"}}, + {Spec: zone2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, + {Spec: zone2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels2}}, }, nodes: []string{"machine1", "machine2"}, services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: labels1}}}, @@ -110,38 +110,38 @@ func TestSelectorSpreadPriority(t *testing.T) { test: "five pods, one service pod in no namespace", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: labels1, Namespace: v1.NamespaceDefault}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: labels1, Namespace: metav1.NamespaceDefault}}, pods: []*v1.Pod{ - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1, Namespace: "ns1"}}, - {Spec: zone2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1, Namespace: v1.NamespaceDefault}}, - {Spec: zone2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels2}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1, Namespace: "ns1"}}, + {Spec: zone2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1, Namespace: metav1.NamespaceDefault}}, + {Spec: zone2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels2}}, }, nodes: []string{"machine1", "machine2"}, - services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: labels1}, ObjectMeta: v1.ObjectMeta{Namespace: v1.NamespaceDefault}}}, + services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: labels1}, ObjectMeta: metav1.ObjectMeta{Namespace: metav1.NamespaceDefault}}}, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 10}, {Host: "machine2", Score: 0}}, test: "four pods, one service pod in default namespace", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: labels1, Namespace: "ns1"}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: labels1, Namespace: "ns1"}}, pods: []*v1.Pod{ - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1, Namespace: v1.NamespaceDefault}}, - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1, Namespace: "ns2"}}, - {Spec: zone2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1, Namespace: "ns1"}}, - {Spec: zone2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels2}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1, Namespace: metav1.NamespaceDefault}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1, Namespace: "ns2"}}, + {Spec: zone2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1, Namespace: "ns1"}}, + {Spec: zone2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels2}}, }, nodes: []string{"machine1", "machine2"}, - services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: labels1}, ObjectMeta: v1.ObjectMeta{Namespace: "ns1"}}}, + services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: labels1}, ObjectMeta: metav1.ObjectMeta{Namespace: "ns1"}}}, expectedList: []schedulerapi.HostPriority{{Host: "machine1", Score: 10}, {Host: "machine2", Score: 0}}, test: "five pods, one service pod in specific namespace", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: labels1}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, pods: []*v1.Pod{ - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels2}}, - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, - {Spec: zone2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels2}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, + {Spec: zone2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, }, nodes: []string{"machine1", "machine2"}, services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: labels1}}}, @@ -149,12 +149,12 @@ func TestSelectorSpreadPriority(t *testing.T) { test: "three pods, two service pods on different machines", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: labels1}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, pods: []*v1.Pod{ - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels2}}, - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, - {Spec: zone2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, - {Spec: zone2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels2}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, + {Spec: zone2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, + {Spec: zone2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, }, nodes: []string{"machine1", "machine2"}, services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: labels1}}}, @@ -162,11 +162,11 @@ func TestSelectorSpreadPriority(t *testing.T) { test: "four pods, three service pods", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: labels1}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, pods: []*v1.Pod{ - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels2}}, - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, - {Spec: zone2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels2}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, + {Spec: zone2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, }, nodes: []string{"machine1", "machine2"}, services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: map[string]string{"baz": "blah"}}}}, @@ -174,11 +174,11 @@ func TestSelectorSpreadPriority(t *testing.T) { test: "service with partial pod label matches", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicationController", "name", "abc123")}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicationController", "name", "abc123")}}, pods: []*v1.Pod{ - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels2}}, - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicationController", "name", "abc123")}}, - {Spec: zone2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicationController", "name", "abc123")}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels2}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicationController", "name", "abc123")}}, + {Spec: zone2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicationController", "name", "abc123")}}, }, nodes: []string{"machine1", "machine2"}, rcs: []*v1.ReplicationController{{Spec: v1.ReplicationControllerSpec{Selector: map[string]string{"foo": "bar"}}}}, @@ -189,11 +189,11 @@ func TestSelectorSpreadPriority(t *testing.T) { test: "service with partial pod label matches with service and replication controller", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicaSet", "name", "abc123")}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicaSet", "name", "abc123")}}, pods: []*v1.Pod{ - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels2}}, - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicaSet", "name", "abc123")}}, - {Spec: zone2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicaSet", "name", "abc123")}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels2}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicaSet", "name", "abc123")}}, + {Spec: zone2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicaSet", "name", "abc123")}}, }, nodes: []string{"machine1", "machine2"}, services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: map[string]string{"baz": "blah"}}}}, @@ -203,11 +203,11 @@ func TestSelectorSpreadPriority(t *testing.T) { test: "service with partial pod label matches with service and replica set", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: map[string]string{"foo": "bar", "bar": "foo"}, OwnerReferences: controllerRef("ReplicationController", "name", "abc123")}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: map[string]string{"foo": "bar", "bar": "foo"}, OwnerReferences: controllerRef("ReplicationController", "name", "abc123")}}, pods: []*v1.Pod{ - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels2}}, - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicationController", "name", "abc123")}}, - {Spec: zone2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicationController", "name", "abc123")}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels2}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicationController", "name", "abc123")}}, + {Spec: zone2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicationController", "name", "abc123")}}, }, nodes: []string{"machine1", "machine2"}, rcs: []*v1.ReplicationController{{Spec: v1.ReplicationControllerSpec{Selector: map[string]string{"foo": "bar"}}}}, @@ -217,11 +217,11 @@ func TestSelectorSpreadPriority(t *testing.T) { test: "disjoined service and replication controller should be treated equally", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: map[string]string{"foo": "bar", "bar": "foo"}, OwnerReferences: controllerRef("ReplicaSet", "name", "abc123")}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: map[string]string{"foo": "bar", "bar": "foo"}, OwnerReferences: controllerRef("ReplicaSet", "name", "abc123")}}, pods: []*v1.Pod{ - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels2}}, - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicaSet", "name", "abc123")}}, - {Spec: zone2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicaSet", "name", "abc123")}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels2}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicaSet", "name", "abc123")}}, + {Spec: zone2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicaSet", "name", "abc123")}}, }, nodes: []string{"machine1", "machine2"}, services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: map[string]string{"bar": "foo"}}}}, @@ -231,11 +231,11 @@ func TestSelectorSpreadPriority(t *testing.T) { test: "disjoined service and replica set should be treated equally", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicationController", "name", "abc123")}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicationController", "name", "abc123")}}, pods: []*v1.Pod{ - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels2}}, - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicationController", "name", "abc123")}}, - {Spec: zone2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicationController", "name", "abc123")}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels2}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicationController", "name", "abc123")}}, + {Spec: zone2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicationController", "name", "abc123")}}, }, nodes: []string{"machine1", "machine2"}, rcs: []*v1.ReplicationController{{Spec: v1.ReplicationControllerSpec{Selector: map[string]string{"foo": "bar"}}}}, @@ -244,11 +244,11 @@ func TestSelectorSpreadPriority(t *testing.T) { test: "Replication controller with partial pod label matches", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicaSet", "name", "abc123")}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicaSet", "name", "abc123")}}, pods: []*v1.Pod{ - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels2}}, - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicaSet", "name", "abc123")}}, - {Spec: zone2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicaSet", "name", "abc123")}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels2}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicaSet", "name", "abc123")}}, + {Spec: zone2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicaSet", "name", "abc123")}}, }, nodes: []string{"machine1", "machine2"}, rss: []*extensions.ReplicaSet{{Spec: extensions.ReplicaSetSpec{Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"foo": "bar"}}}}}, @@ -257,11 +257,11 @@ func TestSelectorSpreadPriority(t *testing.T) { test: "Replica set with partial pod label matches", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicationController", "name", "abc123")}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicationController", "name", "abc123")}}, pods: []*v1.Pod{ - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels2, OwnerReferences: controllerRef("ReplicationController", "name", "abc123")}}, - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicationController", "name", "abc123")}}, - {Spec: zone2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicationController", "name", "abc123")}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels2, OwnerReferences: controllerRef("ReplicationController", "name", "abc123")}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicationController", "name", "abc123")}}, + {Spec: zone2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicationController", "name", "abc123")}}, }, nodes: []string{"machine1", "machine2"}, rcs: []*v1.ReplicationController{{Spec: v1.ReplicationControllerSpec{Selector: map[string]string{"baz": "blah"}}}}, @@ -269,11 +269,11 @@ func TestSelectorSpreadPriority(t *testing.T) { test: "Another replication controller with partial pod label matches", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicaSet", "name", "abc123")}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicaSet", "name", "abc123")}}, pods: []*v1.Pod{ - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels2, OwnerReferences: controllerRef("ReplicaSet", "name", "abc123")}}, - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicaSet", "name", "abc123")}}, - {Spec: zone2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicaSet", "name", "abc123")}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels2, OwnerReferences: controllerRef("ReplicaSet", "name", "abc123")}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicaSet", "name", "abc123")}}, + {Spec: zone2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1, OwnerReferences: controllerRef("ReplicaSet", "name", "abc123")}}, }, nodes: []string{"machine1", "machine2"}, rss: []*extensions.ReplicaSet{{Spec: extensions.ReplicaSetSpec{Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"baz": "blah"}}}}}, @@ -302,7 +302,7 @@ func TestSelectorSpreadPriority(t *testing.T) { func buildPod(nodeName string, labels map[string]string, ownerRefs []metav1.OwnerReference) *v1.Pod { return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{Labels: labels, OwnerReferences: ownerRefs}, + ObjectMeta: metav1.ObjectMeta{Labels: labels, OwnerReferences: ownerRefs}, Spec: v1.PodSpec{NodeName: nodeName}, } } @@ -559,7 +559,7 @@ func TestZoneSpreadPriority(t *testing.T) { test: "nothing scheduled", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: labels1}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, pods: []*v1.Pod{{Spec: zone1Spec}}, nodes: labeledNodes, expectedList: []schedulerapi.HostPriority{{Host: "machine11", Score: 10}, {Host: "machine12", Score: 10}, @@ -568,8 +568,8 @@ func TestZoneSpreadPriority(t *testing.T) { test: "no services", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: labels1}}, - pods: []*v1.Pod{{Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels2}}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, + pods: []*v1.Pod{{Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels2}}}, nodes: labeledNodes, services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: map[string]string{"key": "value"}}}}, expectedList: []schedulerapi.HostPriority{{Host: "machine11", Score: 10}, {Host: "machine12", Score: 10}, @@ -578,11 +578,11 @@ func TestZoneSpreadPriority(t *testing.T) { test: "different services", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: labels1}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, pods: []*v1.Pod{ - {Spec: zone0Spec, ObjectMeta: v1.ObjectMeta{Labels: labels2}}, - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels2}}, - {Spec: zone2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, + {Spec: zone0Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels2}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels2}}, + {Spec: zone2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, }, nodes: labeledNodes, services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: labels1}}}, @@ -592,11 +592,11 @@ func TestZoneSpreadPriority(t *testing.T) { test: "three pods, one service pod", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: labels1}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, pods: []*v1.Pod{ - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels2}}, - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, - {Spec: zone2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels2}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, + {Spec: zone2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, }, nodes: labeledNodes, services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: labels1}}}, @@ -606,27 +606,27 @@ func TestZoneSpreadPriority(t *testing.T) { test: "three pods, two service pods on different machines", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: labels1, Namespace: v1.NamespaceDefault}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: labels1, Namespace: metav1.NamespaceDefault}}, pods: []*v1.Pod{ - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1, Namespace: v1.NamespaceDefault}}, - {Spec: zone2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, - {Spec: zone2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1, Namespace: "ns1"}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1, Namespace: metav1.NamespaceDefault}}, + {Spec: zone2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, + {Spec: zone2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1, Namespace: "ns1"}}, }, nodes: labeledNodes, - services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: labels1}, ObjectMeta: v1.ObjectMeta{Namespace: v1.NamespaceDefault}}}, + services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: labels1}, ObjectMeta: metav1.ObjectMeta{Namespace: metav1.NamespaceDefault}}}, expectedList: []schedulerapi.HostPriority{{Host: "machine11", Score: 0}, {Host: "machine12", Score: 0}, {Host: "machine21", Score: 10}, {Host: "machine22", Score: 10}, {Host: "machine01", Score: 0}, {Host: "machine02", Score: 0}}, test: "three service label match pods in different namespaces", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: labels1}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, pods: []*v1.Pod{ - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels2}}, - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, - {Spec: zone2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, - {Spec: zone2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels2}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, + {Spec: zone2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, + {Spec: zone2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, }, nodes: labeledNodes, services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: labels1}}}, @@ -636,11 +636,11 @@ func TestZoneSpreadPriority(t *testing.T) { test: "four pods, three service pods", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: labels1}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, pods: []*v1.Pod{ - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels2}}, - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, - {Spec: zone2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels2}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, + {Spec: zone2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, }, nodes: labeledNodes, services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: map[string]string{"baz": "blah"}}}}, @@ -650,12 +650,12 @@ func TestZoneSpreadPriority(t *testing.T) { test: "service with partial pod label matches", }, { - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Labels: labels1}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, pods: []*v1.Pod{ - {Spec: zone0Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, - {Spec: zone1Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, - {Spec: zone2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, - {Spec: zone2Spec, ObjectMeta: v1.ObjectMeta{Labels: labels1}}, + {Spec: zone0Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, + {Spec: zone1Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, + {Spec: zone2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, + {Spec: zone2Spec, ObjectMeta: metav1.ObjectMeta{Labels: labels1}}, }, nodes: labeledNodes, services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: labels1}}}, @@ -685,7 +685,7 @@ func TestZoneSpreadPriority(t *testing.T) { func makeLabeledNodeList(nodeMap map[string]map[string]string) []*v1.Node { nodes := make([]*v1.Node, 0, len(nodeMap)) for nodeName, labels := range nodeMap { - nodes = append(nodes, &v1.Node{ObjectMeta: v1.ObjectMeta{Name: nodeName, Labels: labels}}) + nodes = append(nodes, &v1.Node{ObjectMeta: metav1.ObjectMeta{Name: nodeName, Labels: labels}}) } return nodes } @@ -693,7 +693,7 @@ func makeLabeledNodeList(nodeMap map[string]map[string]string) []*v1.Node { func makeNodeList(nodeNames []string) []*v1.Node { nodes := make([]*v1.Node, 0, len(nodeNames)) for _, nodeName := range nodeNames { - nodes = append(nodes, &v1.Node{ObjectMeta: v1.ObjectMeta{Name: nodeName}}) + nodes = append(nodes, &v1.Node{ObjectMeta: metav1.ObjectMeta{Name: nodeName}}) } return nodes } diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/priorities/taint_toleration_test.go b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/priorities/taint_toleration_test.go index c71664a8..2994c812 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/priorities/taint_toleration_test.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/priorities/taint_toleration_test.go @@ -21,6 +21,7 @@ import ( "reflect" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" schedulerapi "k8s.io/kubernetes/plugin/pkg/scheduler/api" "k8s.io/kubernetes/plugin/pkg/scheduler/schedulercache" @@ -29,7 +30,7 @@ import ( func nodeWithTaints(nodeName string, taints []v1.Taint) *v1.Node { taintsData, _ := json.Marshal(taints) return &v1.Node{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: nodeName, Annotations: map[string]string{ v1.TaintsAnnotationKey: string(taintsData), @@ -41,7 +42,7 @@ func nodeWithTaints(nodeName string, taints []v1.Taint) *v1.Node { func podWithTolerations(tolerations []v1.Toleration) *v1.Pod { tolerationData, _ := json.Marshal(tolerations) return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ v1.TolerationsAnnotationKey: string(tolerationData), }, diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/priorities/test_util.go b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/priorities/test_util.go index a09a5943..1d1898c8 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/priorities/test_util.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/priorities/test_util.go @@ -17,6 +17,7 @@ limitations under the License. package priorities import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/plugin/pkg/scheduler/algorithm" @@ -26,7 +27,7 @@ import ( func makeNode(node string, milliCPU, memory int64) *v1.Node { return &v1.Node{ - ObjectMeta: v1.ObjectMeta{Name: node}, + ObjectMeta: metav1.ObjectMeta{Name: node}, Status: v1.NodeStatus{ Capacity: v1.ResourceList{ "cpu": *resource.NewMilliQuantity(milliCPU, resource.DecimalSI), diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithmprovider/defaults/BUILD b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithmprovider/defaults/BUILD index f76e5668..c1c9dc28 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithmprovider/defaults/BUILD +++ b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithmprovider/defaults/BUILD @@ -35,13 +35,13 @@ go_test( "//pkg/api:go_default_library", "//pkg/api/v1:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", - "//pkg/client/restclient:go_default_library", - "//pkg/util/testing:go_default_library", "//plugin/pkg/scheduler/api:go_default_library", "//plugin/pkg/scheduler/api/latest:go_default_library", "//plugin/pkg/scheduler/factory:go_default_library", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/util/sets", + "//vendor:k8s.io/client-go/rest", + "//vendor:k8s.io/client-go/util/testing", ], ) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithmprovider/defaults/compatibility_test.go b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithmprovider/defaults/compatibility_test.go index 7bbc1a4c..df5844cf 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithmprovider/defaults/compatibility_test.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithmprovider/defaults/compatibility_test.go @@ -25,11 +25,11 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/sets" + restclient "k8s.io/client-go/rest" + utiltesting "k8s.io/client-go/util/testing" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/client/restclient" - utiltesting "k8s.io/kubernetes/pkg/util/testing" schedulerapi "k8s.io/kubernetes/plugin/pkg/scheduler/api" latestschedulerapi "k8s.io/kubernetes/plugin/pkg/scheduler/api/latest" "k8s.io/kubernetes/plugin/pkg/scheduler/factory" diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/api/BUILD b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/api/BUILD index 167b90d1..6b65eaef 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/api/BUILD +++ b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/api/BUILD @@ -16,10 +16,10 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/api/v1:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/api/types.go b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/api/types.go index 8f4f6551..bad6abc6 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/api/types.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/api/types.go @@ -20,8 +20,8 @@ import ( "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api/v1" - "k8s.io/kubernetes/pkg/client/restclient" ) type Policy struct { diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/api/v1/BUILD b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/api/v1/BUILD index 1a55ca63..2433d15b 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/api/v1/BUILD +++ b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/api/v1/BUILD @@ -16,11 +16,11 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/api/v1:go_default_library", - "//pkg/client/restclient:go_default_library", "//plugin/pkg/scheduler/api:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/api/v1/types.go b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/api/v1/types.go index 371cd0e7..3097d83b 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/api/v1/types.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/api/v1/types.go @@ -20,8 +20,8 @@ import ( "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + restclient "k8s.io/client-go/rest" apiv1 "k8s.io/kubernetes/pkg/api/v1" - "k8s.io/kubernetes/pkg/client/restclient" ) type Policy struct { diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/extender.go b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/extender.go index 55a18e64..dca08567 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/extender.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/extender.go @@ -25,8 +25,8 @@ import ( "time" utilnet "k8s.io/apimachinery/pkg/util/net" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api/v1" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/plugin/pkg/scheduler/algorithm" schedulerapi "k8s.io/kubernetes/plugin/pkg/scheduler/api" ) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/extender_test.go b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/extender_test.go index f24c563c..09ee08aa 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/extender_test.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/extender_test.go @@ -21,6 +21,7 @@ import ( "testing" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/plugin/pkg/scheduler/algorithm" @@ -283,7 +284,7 @@ func TestGenericSchedulerWithExtenders(t *testing.T) { } cache := schedulercache.New(time.Duration(0), wait.NeverStop) for _, name := range test.nodes { - cache.AddNode(&v1.Node{ObjectMeta: v1.ObjectMeta{Name: name}}) + cache.AddNode(&v1.Node{ObjectMeta: metav1.ObjectMeta{Name: name}}) } scheduler := NewGenericScheduler( cache, test.predicates, algorithm.EmptyMetadataProducer, test.prioritizers, algorithm.EmptyMetadataProducer, extenders) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/factory/BUILD b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/factory/BUILD index e0bcb18c..969be7b6 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/factory/BUILD +++ b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/factory/BUILD @@ -20,8 +20,8 @@ go_library( "//pkg/apis/extensions/v1beta1:go_default_library", "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", + "//pkg/client/legacylisters:go_default_library", "//pkg/controller/informers:go_default_library", - "//pkg/fields:go_default_library", "//plugin/pkg/scheduler:go_default_library", "//plugin/pkg/scheduler/algorithm:go_default_library", "//plugin/pkg/scheduler/algorithm/predicates:go_default_library", @@ -29,14 +29,16 @@ go_library( "//plugin/pkg/scheduler/api:go_default_library", "//plugin/pkg/scheduler/api/validation:go_default_library", "//plugin/pkg/scheduler/schedulercache:go_default_library", + "//plugin/pkg/scheduler/util:go_default_library", "//vendor:github.com/golang/glog", "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/runtime", "//vendor:k8s.io/apimachinery/pkg/util/sets", "//vendor:k8s.io/apimachinery/pkg/util/validation", - "//vendor:k8s.io/apiserver/pkg/request", + "//vendor:k8s.io/apiserver/pkg/endpoints/request", ], ) @@ -55,14 +57,15 @@ go_test( "//pkg/api/v1:go_default_library", "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", - "//pkg/client/restclient:go_default_library", - "//pkg/util/testing:go_default_library", "//plugin/pkg/scheduler/algorithm:go_default_library", "//plugin/pkg/scheduler/api:go_default_library", "//plugin/pkg/scheduler/api/latest:go_default_library", "//plugin/pkg/scheduler/schedulercache:go_default_library", + "//plugin/pkg/scheduler/util:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", - "//vendor:k8s.io/apimachinery/pkg/types", + "//vendor:k8s.io/client-go/rest", + "//vendor:k8s.io/client-go/util/testing", ], ) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/factory/factory.go b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/factory/factory.go index 3ead7721..adf59fee 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/factory/factory.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/factory/factory.go @@ -21,22 +21,21 @@ package factory import ( "fmt" "strings" - "sync" - "sync/atomic" "time" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/sets" utilvalidation "k8s.io/apimachinery/pkg/util/validation" - genericapirequest "k8s.io/apiserver/pkg/request" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/cache" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" + "k8s.io/kubernetes/pkg/client/legacylisters" "k8s.io/kubernetes/pkg/controller/informers" - "k8s.io/kubernetes/pkg/fields" "k8s.io/kubernetes/plugin/pkg/scheduler" "k8s.io/kubernetes/plugin/pkg/scheduler/algorithm" "k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/predicates" @@ -46,35 +45,36 @@ import ( "github.com/golang/glog" extensions "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" "k8s.io/kubernetes/plugin/pkg/scheduler/schedulercache" + "k8s.io/kubernetes/plugin/pkg/scheduler/util" ) const ( - SchedulerAnnotationKey = "scheduler.alpha.kubernetes.io/name" - initialGetBackoff = 100 * time.Millisecond - maximalGetBackoff = time.Minute + initialGetBackoff = 100 * time.Millisecond + maximalGetBackoff = time.Minute ) -// ConfigFactory knows how to fill out a scheduler config with its support functions. +// ConfigFactory is the default implementation of the scheduler.Configurator interface. +// TODO make this private if possible, so that only its interface is externally used. type ConfigFactory struct { - Client clientset.Interface + client clientset.Interface // queue for pods that need scheduling - PodQueue *cache.FIFO + podQueue *cache.FIFO // a means to list all known scheduled pods. - ScheduledPodLister *cache.StoreToPodLister + scheduledPodLister *listers.StoreToPodLister // a means to list all known scheduled pods and pods assumed to have been scheduled. - PodLister algorithm.PodLister + podLister algorithm.PodLister // a means to list all nodes - NodeLister *cache.StoreToNodeLister + nodeLister *listers.StoreToNodeLister // a means to list all PersistentVolumes - PVLister *cache.StoreToPVFetcher + pVLister *listers.StoreToPVFetcher // a means to list all PersistentVolumeClaims - PVCLister *cache.StoreToPersistentVolumeClaimLister + pVCLister *listers.StoreToPersistentVolumeClaimLister // a means to list all services - ServiceLister *cache.StoreToServiceLister + serviceLister *listers.StoreToServiceLister // a means to list all controllers - ControllerLister *cache.StoreToReplicationControllerLister + controllerLister *listers.StoreToReplicationControllerLister // a means to list all replicasets - ReplicaSetLister *cache.StoreToReplicaSetLister + replicaSetLister *listers.StoreToReplicaSetLister // Close this to stop all reflectors StopEverything chan struct{} @@ -90,24 +90,24 @@ type ConfigFactory struct { schedulerCache schedulercache.Cache // SchedulerName of a scheduler is used to select which pods will be - // processed by this scheduler, based on pods's annotation key: - // 'scheduler.alpha.kubernetes.io/name' - SchedulerName string + // processed by this scheduler, based on pods's "spec.SchedulerName". + schedulerName string // RequiredDuringScheduling affinity is not symmetric, but there is an implicit PreferredDuringScheduling affinity rule // corresponding to every RequiredDuringScheduling affinity rule. // HardPodAffinitySymmetricWeight represents the weight of implicit PreferredDuringScheduling affinity rule, in the range 0-100. - HardPodAffinitySymmetricWeight int + hardPodAffinitySymmetricWeight int // Indicate the "all topologies" set for empty topologyKey when it's used for PreferredDuringScheduling pod anti-affinity. - FailureDomains string + failureDomains []string // Equivalence class cache - EquivalencePodCache *scheduler.EquivalenceCache + equivalencePodCache *scheduler.EquivalenceCache } -// Initializes the factory. -func NewConfigFactory(client clientset.Interface, schedulerName string, hardPodAffinitySymmetricWeight int, failureDomains string) *ConfigFactory { +// NewConfigFactory initializes the default implementation of a Configurator To encourage eventual privatization of the struct type, we only +// return the interface. +func NewConfigFactory(client clientset.Interface, schedulerName string, hardPodAffinitySymmetricWeight int, failureDomains string) scheduler.Configurator { stopEverything := make(chan struct{}) schedulerCache := schedulercache.New(30*time.Second, stopEverything) @@ -116,32 +116,32 @@ func NewConfigFactory(client clientset.Interface, schedulerName string, hardPodA pvcInformer := informerFactory.PersistentVolumeClaims() c := &ConfigFactory{ - Client: client, - PodQueue: cache.NewFIFO(cache.MetaNamespaceKeyFunc), - ScheduledPodLister: &cache.StoreToPodLister{}, + client: client, + podQueue: cache.NewFIFO(cache.MetaNamespaceKeyFunc), + scheduledPodLister: &listers.StoreToPodLister{}, informerFactory: informerFactory, // Only nodes in the "Ready" condition with status == "True" are schedulable - NodeLister: &cache.StoreToNodeLister{}, - PVLister: &cache.StoreToPVFetcher{Store: cache.NewStore(cache.MetaNamespaceKeyFunc)}, - PVCLister: pvcInformer.Lister(), + nodeLister: &listers.StoreToNodeLister{}, + pVLister: &listers.StoreToPVFetcher{Store: cache.NewStore(cache.MetaNamespaceKeyFunc)}, + pVCLister: pvcInformer.Lister(), pvcPopulator: pvcInformer.Informer().GetController(), - ServiceLister: &cache.StoreToServiceLister{Indexer: cache.NewIndexer(cache.MetaNamespaceKeyFunc, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc})}, - ControllerLister: &cache.StoreToReplicationControllerLister{Indexer: cache.NewIndexer(cache.MetaNamespaceKeyFunc, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc})}, - ReplicaSetLister: &cache.StoreToReplicaSetLister{Indexer: cache.NewIndexer(cache.MetaNamespaceKeyFunc, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc})}, + serviceLister: &listers.StoreToServiceLister{Indexer: cache.NewIndexer(cache.MetaNamespaceKeyFunc, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc})}, + controllerLister: &listers.StoreToReplicationControllerLister{Indexer: cache.NewIndexer(cache.MetaNamespaceKeyFunc, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc})}, + replicaSetLister: &listers.StoreToReplicaSetLister{Indexer: cache.NewIndexer(cache.MetaNamespaceKeyFunc, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc})}, schedulerCache: schedulerCache, StopEverything: stopEverything, - SchedulerName: schedulerName, - HardPodAffinitySymmetricWeight: hardPodAffinitySymmetricWeight, - FailureDomains: failureDomains, + schedulerName: schedulerName, + hardPodAffinitySymmetricWeight: hardPodAffinitySymmetricWeight, + failureDomains: strings.Split(failureDomains, ","), } - c.PodLister = schedulerCache + c.podLister = schedulerCache // On add/delete to the scheduled pods, remove from the assumed pods. // We construct this here instead of in CreateFromKeys because // ScheduledPodLister is something we provide to plug in functions that // they may need to call. - c.ScheduledPodLister.Indexer, c.scheduledPodPopulator = cache.NewIndexerInformer( + c.scheduledPodLister.Indexer, c.scheduledPodPopulator = cache.NewIndexerInformer( c.createAssignedNonTerminatedPodLW(), &v1.Pod{}, 0, @@ -153,7 +153,7 @@ func NewConfigFactory(client clientset.Interface, schedulerName string, hardPodA cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, ) - c.NodeLister.Store, c.nodePopulator = cache.NewInformer( + c.nodeLister.Store, c.nodePopulator = cache.NewInformer( c.createNodeLW(), &v1.Node{}, 0, @@ -165,14 +165,14 @@ func NewConfigFactory(client clientset.Interface, schedulerName string, hardPodA ) // TODO(harryz) need to fill all the handlers here and below for equivalence cache - c.PVLister.Store, c.pvPopulator = cache.NewInformer( + c.pVLister.Store, c.pvPopulator = cache.NewInformer( c.createPersistentVolumeLW(), &v1.PersistentVolume{}, 0, cache.ResourceEventHandlerFuncs{}, ) - c.ServiceLister.Indexer, c.servicePopulator = cache.NewIndexerInformer( + c.serviceLister.Indexer, c.servicePopulator = cache.NewIndexerInformer( c.createServiceLW(), &v1.Service{}, 0, @@ -180,7 +180,7 @@ func NewConfigFactory(client clientset.Interface, schedulerName string, hardPodA cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, ) - c.ControllerLister.Indexer, c.controllerPopulator = cache.NewIndexerInformer( + c.controllerLister.Indexer, c.controllerPopulator = cache.NewIndexerInformer( c.createControllerLW(), &v1.ReplicationController{}, 0, @@ -191,6 +191,33 @@ func NewConfigFactory(client clientset.Interface, schedulerName string, hardPodA return c } +// GetNodeStore provides the cache to the nodes, mostly internal use, but may also be called by mock-tests. +func (c *ConfigFactory) GetNodeStore() cache.Store { + return c.nodeLister.Store +} + +func (c *ConfigFactory) GetHardPodAffinitySymmetricWeight() int { + return c.hardPodAffinitySymmetricWeight +} + +func (c *ConfigFactory) GetFailureDomains() []string { + return c.failureDomains +} + +func (f *ConfigFactory) GetSchedulerName() string { + return f.schedulerName +} + +// GetClient provides a kubernetes client, mostly internal use, but may also be called by mock-tests. +func (f *ConfigFactory) GetClient() clientset.Interface { + return f.client +} + +// GetScheduledPodListerIndexer provides a pod lister, mostly internal use, but may also be called by mock-tests. +func (c *ConfigFactory) GetScheduledPodListerIndexer() cache.Indexer { + return c.scheduledPodLister.Indexer +} + // TODO(harryz) need to update all the handlers here and below for equivalence cache func (c *ConfigFactory) addPodToCache(obj interface{}) { pod, ok := obj.(*v1.Pod) @@ -345,10 +372,10 @@ func (f *ConfigFactory) CreateFromConfig(policy schedulerapi.Policy) (*scheduler // Creates a scheduler from a set of registered fit predicate keys and priority keys. func (f *ConfigFactory) CreateFromKeys(predicateKeys, priorityKeys sets.String, extenders []algorithm.SchedulerExtender) (*scheduler.Config, error) { - glog.V(2).Infof("creating scheduler with fit predicates '%v' and priority functions '%v", predicateKeys, priorityKeys) + glog.V(2).Infof("Creating scheduler with fit predicates '%v' and priority functions '%v", predicateKeys, priorityKeys) - if f.HardPodAffinitySymmetricWeight < 0 || f.HardPodAffinitySymmetricWeight > 100 { - return nil, fmt.Errorf("invalid hardPodAffinitySymmetricWeight: %d, must be in the range 0-100", f.HardPodAffinitySymmetricWeight) + if f.GetHardPodAffinitySymmetricWeight() < 0 || f.GetHardPodAffinitySymmetricWeight() > 100 { + return nil, fmt.Errorf("invalid hardPodAffinitySymmetricWeight: %d, must be in the range 0-100", f.GetHardPodAffinitySymmetricWeight()) } predicateFuncs, err := f.GetPredicates(predicateKeys) @@ -373,25 +400,18 @@ func (f *ConfigFactory) CreateFromKeys(predicateKeys, priorityKeys sets.String, f.Run() algo := scheduler.NewGenericScheduler(f.schedulerCache, predicateFuncs, predicateMetaProducer, priorityConfigs, priorityMetaProducer, extenders) - podBackoff := podBackoff{ - perPodBackoff: map[types.NamespacedName]*backoffEntry{}, - clock: realClock{}, - - defaultDuration: 1 * time.Second, - maxDuration: 60 * time.Second, - } - + podBackoff := util.CreateDefaultPodBackoff() return &scheduler.Config{ SchedulerCache: f.schedulerCache, // The scheduler only needs to consider schedulable nodes. - NodeLister: f.NodeLister.NodeCondition(getNodeConditionPredicate()), + NodeLister: f.nodeLister.NodeCondition(getNodeConditionPredicate()), Algorithm: algo, - Binder: &binder{f.Client}, - PodConditionUpdater: &podConditionUpdater{f.Client}, + Binder: &binder{f.client}, + PodConditionUpdater: &podConditionUpdater{f.client}, NextPod: func() *v1.Pod { return f.getNextPod() }, - Error: f.makeDefaultErrorFunc(&podBackoff, f.PodQueue), + Error: f.MakeDefaultErrorFunc(podBackoff, f.podQueue), StopEverything: f.StopEverything, }, nil } @@ -432,31 +452,30 @@ func (f *ConfigFactory) GetPredicates(predicateKeys sets.String) (map[string]alg } func (f *ConfigFactory) getPluginArgs() (*PluginFactoryArgs, error) { - failureDomainArgs := strings.Split(f.FailureDomains, ",") - for _, failureDomain := range failureDomainArgs { + for _, failureDomain := range f.failureDomains { if errs := utilvalidation.IsQualifiedName(failureDomain); len(errs) != 0 { return nil, fmt.Errorf("invalid failure domain: %q: %s", failureDomain, strings.Join(errs, ";")) } } return &PluginFactoryArgs{ - PodLister: f.PodLister, - ServiceLister: f.ServiceLister, - ControllerLister: f.ControllerLister, - ReplicaSetLister: f.ReplicaSetLister, + PodLister: f.podLister, + ServiceLister: f.serviceLister, + ControllerLister: f.controllerLister, + ReplicaSetLister: f.replicaSetLister, // All fit predicates only need to consider schedulable nodes. - NodeLister: f.NodeLister.NodeCondition(getNodeConditionPredicate()), - NodeInfo: &predicates.CachedNodeInfo{StoreToNodeLister: f.NodeLister}, - PVInfo: f.PVLister, - PVCInfo: &predicates.CachedPersistentVolumeClaimInfo{StoreToPersistentVolumeClaimLister: f.PVCLister}, - HardPodAffinitySymmetricWeight: f.HardPodAffinitySymmetricWeight, - FailureDomains: sets.NewString(failureDomainArgs...).List(), + NodeLister: f.nodeLister.NodeCondition(getNodeConditionPredicate()), + NodeInfo: &predicates.CachedNodeInfo{StoreToNodeLister: f.nodeLister}, + PVInfo: f.pVLister, + PVCInfo: &predicates.CachedPersistentVolumeClaimInfo{StoreToPersistentVolumeClaimLister: f.pVCLister}, + HardPodAffinitySymmetricWeight: f.hardPodAffinitySymmetricWeight, + FailureDomains: sets.NewString(f.failureDomains...).List(), }, nil } func (f *ConfigFactory) Run() { // Watch and queue pods that need scheduling. - cache.NewReflector(f.createUnassignedNonTerminatedPodLW(), &v1.Pod{}, f.PodQueue, 0).RunUntil(f.StopEverything) + cache.NewReflector(f.createUnassignedNonTerminatedPodLW(), &v1.Pod{}, f.podQueue, 0).RunUntil(f.StopEverything) // Begin populating scheduled pods. go f.scheduledPodPopulator.Run(f.StopEverything) @@ -480,28 +499,24 @@ func (f *ConfigFactory) Run() { // Watch and cache all ReplicaSet objects. Scheduler needs to find all pods // created by the same services or ReplicationControllers/ReplicaSets, so that it can spread them correctly. // Cache this locally. - cache.NewReflector(f.createReplicaSetLW(), &extensions.ReplicaSet{}, f.ReplicaSetLister.Indexer, 0).RunUntil(f.StopEverything) + cache.NewReflector(f.createReplicaSetLW(), &extensions.ReplicaSet{}, f.replicaSetLister.Indexer, 0).RunUntil(f.StopEverything) } func (f *ConfigFactory) getNextPod() *v1.Pod { for { - pod := cache.Pop(f.PodQueue).(*v1.Pod) - if f.responsibleForPod(pod) { + pod := cache.Pop(f.podQueue).(*v1.Pod) + if f.ResponsibleForPod(pod) { glog.V(4).Infof("About to try and schedule pod %v", pod.Name) return pod } } } -func (f *ConfigFactory) responsibleForPod(pod *v1.Pod) bool { - if f.SchedulerName == v1.DefaultSchedulerName { - return pod.Annotations[SchedulerAnnotationKey] == f.SchedulerName || pod.Annotations[SchedulerAnnotationKey] == "" - } else { - return pod.Annotations[SchedulerAnnotationKey] == f.SchedulerName - } +func (f *ConfigFactory) ResponsibleForPod(pod *v1.Pod) bool { + return f.schedulerName == pod.Spec.SchedulerName } -func getNodeConditionPredicate() cache.NodeConditionPredicate { +func getNodeConditionPredicate() listers.NodeConditionPredicate { return func(node *v1.Node) bool { for i := range node.Status.Conditions { cond := &node.Status.Conditions[i] @@ -533,7 +548,7 @@ func getNodeConditionPredicate() cache.NodeConditionPredicate { // scheduled. func (factory *ConfigFactory) createUnassignedNonTerminatedPodLW() *cache.ListWatch { selector := fields.ParseSelectorOrDie("spec.nodeName==" + "" + ",status.phase!=" + string(v1.PodSucceeded) + ",status.phase!=" + string(v1.PodFailed)) - return cache.NewListWatchFromClient(factory.Client.Core().RESTClient(), "pods", v1.NamespaceAll, selector) + return cache.NewListWatchFromClient(factory.client.Core().RESTClient(), "pods", metav1.NamespaceAll, selector) } // Returns a cache.ListWatch that finds all pods that are @@ -541,7 +556,7 @@ func (factory *ConfigFactory) createUnassignedNonTerminatedPodLW() *cache.ListWa // TODO: return a ListerWatcher interface instead? func (factory *ConfigFactory) createAssignedNonTerminatedPodLW() *cache.ListWatch { selector := fields.ParseSelectorOrDie("spec.nodeName!=" + "" + ",status.phase!=" + string(v1.PodSucceeded) + ",status.phase!=" + string(v1.PodFailed)) - return cache.NewListWatchFromClient(factory.Client.Core().RESTClient(), "pods", v1.NamespaceAll, selector) + return cache.NewListWatchFromClient(factory.client.Core().RESTClient(), "pods", metav1.NamespaceAll, selector) } // createNodeLW returns a cache.ListWatch that gets all changes to nodes. @@ -549,42 +564,42 @@ func (factory *ConfigFactory) createNodeLW() *cache.ListWatch { // all nodes are considered to ensure that the scheduler cache has access to all nodes for lookups // the NodeCondition is used to filter out the nodes that are not ready or unschedulable // the filtered list is used as the super set of nodes to consider for scheduling - return cache.NewListWatchFromClient(factory.Client.Core().RESTClient(), "nodes", v1.NamespaceAll, fields.ParseSelectorOrDie("")) + return cache.NewListWatchFromClient(factory.client.Core().RESTClient(), "nodes", metav1.NamespaceAll, fields.ParseSelectorOrDie("")) } // createPersistentVolumeLW returns a cache.ListWatch that gets all changes to persistentVolumes. func (factory *ConfigFactory) createPersistentVolumeLW() *cache.ListWatch { - return cache.NewListWatchFromClient(factory.Client.Core().RESTClient(), "persistentVolumes", v1.NamespaceAll, fields.ParseSelectorOrDie("")) + return cache.NewListWatchFromClient(factory.client.Core().RESTClient(), "persistentVolumes", metav1.NamespaceAll, fields.ParseSelectorOrDie("")) } // createPersistentVolumeClaimLW returns a cache.ListWatch that gets all changes to persistentVolumeClaims. func (factory *ConfigFactory) createPersistentVolumeClaimLW() *cache.ListWatch { - return cache.NewListWatchFromClient(factory.Client.Core().RESTClient(), "persistentVolumeClaims", v1.NamespaceAll, fields.ParseSelectorOrDie("")) + return cache.NewListWatchFromClient(factory.client.Core().RESTClient(), "persistentVolumeClaims", metav1.NamespaceAll, fields.ParseSelectorOrDie("")) } // Returns a cache.ListWatch that gets all changes to services. func (factory *ConfigFactory) createServiceLW() *cache.ListWatch { - return cache.NewListWatchFromClient(factory.Client.Core().RESTClient(), "services", v1.NamespaceAll, fields.ParseSelectorOrDie("")) + return cache.NewListWatchFromClient(factory.client.Core().RESTClient(), "services", metav1.NamespaceAll, fields.ParseSelectorOrDie("")) } // Returns a cache.ListWatch that gets all changes to controllers. func (factory *ConfigFactory) createControllerLW() *cache.ListWatch { - return cache.NewListWatchFromClient(factory.Client.Core().RESTClient(), "replicationControllers", v1.NamespaceAll, fields.ParseSelectorOrDie("")) + return cache.NewListWatchFromClient(factory.client.Core().RESTClient(), "replicationControllers", metav1.NamespaceAll, fields.ParseSelectorOrDie("")) } // Returns a cache.ListWatch that gets all changes to replicasets. func (factory *ConfigFactory) createReplicaSetLW() *cache.ListWatch { - return cache.NewListWatchFromClient(factory.Client.Extensions().RESTClient(), "replicasets", v1.NamespaceAll, fields.ParseSelectorOrDie("")) + return cache.NewListWatchFromClient(factory.client.Extensions().RESTClient(), "replicasets", metav1.NamespaceAll, fields.ParseSelectorOrDie("")) } -func (factory *ConfigFactory) makeDefaultErrorFunc(backoff *podBackoff, podQueue *cache.FIFO) func(pod *v1.Pod, err error) { +func (factory *ConfigFactory) MakeDefaultErrorFunc(backoff *util.PodBackoff, podQueue *cache.FIFO) func(pod *v1.Pod, err error) { return func(pod *v1.Pod, err error) { if err == scheduler.ErrNoNodesAvailable { glog.V(4).Infof("Unable to schedule %v %v: no nodes are registered to the cluster; waiting", pod.Namespace, pod.Name) } else { glog.Errorf("Error scheduling %v %v: %v; retrying", pod.Namespace, pod.Name, err) } - backoff.gc() + backoff.Gc() // Retry asynchronously. // Note that this is extremely rudimentary and we need a more real error handling path. go func() { @@ -594,15 +609,15 @@ func (factory *ConfigFactory) makeDefaultErrorFunc(backoff *podBackoff, podQueue Name: pod.Name, } - entry := backoff.getEntry(podID) - if !entry.TryWait(backoff.maxDuration) { + entry := backoff.GetEntry(podID) + if !entry.TryWait(backoff.MaxDuration()) { glog.Warningf("Request for pod %v already in flight, abandoning", podID) return } // Get the pod again; it may have changed/been scheduled already. getBackoff := initialGetBackoff for { - pod, err := factory.Client.Core().Pods(podID.Namespace).Get(podID.Name, metav1.GetOptions{}) + pod, err := factory.client.Core().Pods(podID.Namespace).Get(podID.Name, metav1.GetOptions{}) if err == nil { if len(pod.Spec.NodeName) == 0 { podQueue.AddIfNotPresent(pod) @@ -666,91 +681,3 @@ func (p *podConditionUpdater) Update(pod *v1.Pod, condition *v1.PodCondition) er } return nil } - -type clock interface { - Now() time.Time -} - -type realClock struct{} - -func (realClock) Now() time.Time { - return time.Now() -} - -// backoffEntry is single threaded. in particular, it only allows a single action to be waiting on backoff at a time. -// It is expected that all users will only use the public TryWait(...) method -// It is also not safe to copy this object. -type backoffEntry struct { - backoff time.Duration - lastUpdate time.Time - reqInFlight int32 -} - -// tryLock attempts to acquire a lock via atomic compare and swap. -// returns true if the lock was acquired, false otherwise -func (b *backoffEntry) tryLock() bool { - return atomic.CompareAndSwapInt32(&b.reqInFlight, 0, 1) -} - -// unlock returns the lock. panics if the lock isn't held -func (b *backoffEntry) unlock() { - if !atomic.CompareAndSwapInt32(&b.reqInFlight, 1, 0) { - panic(fmt.Sprintf("unexpected state on unlocking: %+v", b)) - } -} - -// TryWait tries to acquire the backoff lock, maxDuration is the maximum allowed period to wait for. -func (b *backoffEntry) TryWait(maxDuration time.Duration) bool { - if !b.tryLock() { - return false - } - defer b.unlock() - b.wait(maxDuration) - return true -} - -func (entry *backoffEntry) getBackoff(maxDuration time.Duration) time.Duration { - duration := entry.backoff - newDuration := time.Duration(duration) * 2 - if newDuration > maxDuration { - newDuration = maxDuration - } - entry.backoff = newDuration - glog.V(4).Infof("Backing off %s for pod %+v", duration.String(), entry) - return duration -} - -func (entry *backoffEntry) wait(maxDuration time.Duration) { - time.Sleep(entry.getBackoff(maxDuration)) -} - -type podBackoff struct { - perPodBackoff map[types.NamespacedName]*backoffEntry - lock sync.Mutex - clock clock - defaultDuration time.Duration - maxDuration time.Duration -} - -func (p *podBackoff) getEntry(podID types.NamespacedName) *backoffEntry { - p.lock.Lock() - defer p.lock.Unlock() - entry, ok := p.perPodBackoff[podID] - if !ok { - entry = &backoffEntry{backoff: p.defaultDuration} - p.perPodBackoff[podID] = entry - } - entry.lastUpdate = p.clock.Now() - return entry -} - -func (p *podBackoff) gc() { - p.lock.Lock() - defer p.lock.Unlock() - now := p.clock.Now() - for podID, entry := range p.perPodBackoff { - if now.Sub(entry.lastUpdate) > p.maxDuration { - delete(p.perPodBackoff, podID) - } - } -} diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/factory/factory_test.go b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/factory/factory_test.go index 747f88ae..6980a9df 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/factory/factory_test.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/factory/factory_test.go @@ -23,20 +23,21 @@ import ( "testing" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/types" + restclient "k8s.io/client-go/rest" + utiltesting "k8s.io/client-go/util/testing" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" apitesting "k8s.io/kubernetes/pkg/api/testing" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/cache" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/client/restclient" - utiltesting "k8s.io/kubernetes/pkg/util/testing" "k8s.io/kubernetes/plugin/pkg/scheduler/algorithm" schedulerapi "k8s.io/kubernetes/plugin/pkg/scheduler/api" latestschedulerapi "k8s.io/kubernetes/plugin/pkg/scheduler/api/latest" "k8s.io/kubernetes/plugin/pkg/scheduler/schedulercache" + "k8s.io/kubernetes/plugin/pkg/scheduler/util" ) func TestCreate(t *testing.T) { @@ -135,7 +136,7 @@ func PriorityTwo(pod *v1.Pod, nodeNameToInfo map[string]*schedulercache.NodeInfo func TestDefaultErrorFunc(t *testing.T) { testPod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{Name: "foo", Namespace: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "bar"}, Spec: apitesting.V1DeepEqualSafePodSpec(), } handler := utiltesting.FakeHandler{ @@ -151,13 +152,8 @@ func TestDefaultErrorFunc(t *testing.T) { defer server.Close() factory := NewConfigFactory(clientset.NewForConfigOrDie(&restclient.Config{Host: server.URL, ContentConfig: restclient.ContentConfig{GroupVersion: &api.Registry.GroupOrDie(v1.GroupName).GroupVersion}}), v1.DefaultSchedulerName, v1.DefaultHardPodAffinitySymmetricWeight, v1.DefaultFailureDomains) queue := cache.NewFIFO(cache.MetaNamespaceKeyFunc) - podBackoff := podBackoff{ - perPodBackoff: map[types.NamespacedName]*backoffEntry{}, - clock: &fakeClock{}, - defaultDuration: 1 * time.Millisecond, - maxDuration: 1 * time.Second, - } - errFunc := factory.makeDefaultErrorFunc(&podBackoff, queue) + podBackoff := util.CreatePodBackoff(1*time.Millisecond, 1*time.Second) + errFunc := factory.MakeDefaultErrorFunc(podBackoff, queue) errFunc(testPod, nil) for { @@ -180,9 +176,9 @@ func TestDefaultErrorFunc(t *testing.T) { func TestNodeEnumerator(t *testing.T) { testList := &v1.NodeList{ Items: []v1.Node{ - {ObjectMeta: v1.ObjectMeta{Name: "foo"}}, - {ObjectMeta: v1.ObjectMeta{Name: "bar"}}, - {ObjectMeta: v1.ObjectMeta{Name: "baz"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "foo"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "bar"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "baz"}}, }, } me := nodeEnumerator{testList} @@ -201,21 +197,13 @@ func TestNodeEnumerator(t *testing.T) { } } -type fakeClock struct { - t time.Time -} - -func (f *fakeClock) Now() time.Time { - return f.t -} - func TestBind(t *testing.T) { table := []struct { binding *v1.Binding }{ {binding: &v1.Binding{ - ObjectMeta: v1.ObjectMeta{ - Namespace: v1.NamespaceDefault, + ObjectMeta: metav1.ObjectMeta{ + Namespace: metav1.NamespaceDefault, Name: "foo", }, Target: v1.ObjectReference{ @@ -240,67 +228,7 @@ func TestBind(t *testing.T) { continue } expectedBody := runtime.EncodeOrDie(testapi.Default.Codec(), item.binding) - handler.ValidateRequest(t, testapi.Default.ResourcePath("bindings", v1.NamespaceDefault, ""), "POST", &expectedBody) - } -} - -func TestBackoff(t *testing.T) { - clock := fakeClock{} - backoff := podBackoff{ - perPodBackoff: map[types.NamespacedName]*backoffEntry{}, - clock: &clock, - defaultDuration: 1 * time.Second, - maxDuration: 60 * time.Second, - } - - tests := []struct { - podID types.NamespacedName - expectedDuration time.Duration - advanceClock time.Duration - }{ - { - podID: types.NamespacedName{Namespace: "default", Name: "foo"}, - expectedDuration: 1 * time.Second, - }, - { - podID: types.NamespacedName{Namespace: "default", Name: "foo"}, - expectedDuration: 2 * time.Second, - }, - { - podID: types.NamespacedName{Namespace: "default", Name: "foo"}, - expectedDuration: 4 * time.Second, - }, - { - podID: types.NamespacedName{Namespace: "default", Name: "bar"}, - expectedDuration: 1 * time.Second, - advanceClock: 120 * time.Second, - }, - // 'foo' should have been gc'd here. - { - podID: types.NamespacedName{Namespace: "default", Name: "foo"}, - expectedDuration: 1 * time.Second, - }, - } - - for _, test := range tests { - duration := backoff.getEntry(test.podID).getBackoff(backoff.maxDuration) - if duration != test.expectedDuration { - t.Errorf("expected: %s, got %s for %s", test.expectedDuration.String(), duration.String(), test.podID) - } - clock.t = clock.t.Add(test.advanceClock) - backoff.gc() - } - fooID := types.NamespacedName{Namespace: "default", Name: "foo"} - backoff.perPodBackoff[fooID].backoff = 60 * time.Second - duration := backoff.getEntry(fooID).getBackoff(backoff.maxDuration) - if duration != 60*time.Second { - t.Errorf("expected: 60, got %s", duration.String()) - } - // Verify that we split on namespaces correctly, same name, different namespace - fooID.Namespace = "other" - duration = backoff.getEntry(fooID).getBackoff(backoff.maxDuration) - if duration != 1*time.Second { - t.Errorf("expected: 1, got %s", duration.String()) + handler.ValidateRequest(t, testapi.Default.ResourcePath("bindings", metav1.NamespaceDefault, ""), "POST", &expectedBody) } } @@ -323,47 +251,41 @@ func TestResponsibleForPod(t *testing.T) { // factory of "foo-scheduler" factoryFooScheduler := NewConfigFactory(client, "foo-scheduler", v1.DefaultHardPodAffinitySymmetricWeight, v1.DefaultFailureDomains) // scheduler annotations to be tested - schedulerAnnotationFitsDefault := map[string]string{"scheduler.alpha.kubernetes.io/name": "default-scheduler"} - schedulerAnnotationFitsFoo := map[string]string{"scheduler.alpha.kubernetes.io/name": "foo-scheduler"} - schedulerAnnotationFitsNone := map[string]string{"scheduler.alpha.kubernetes.io/name": "bar-scheduler"} + schedulerFitsDefault := "default-scheduler" + schedulerFitsFoo := "foo-scheduler" + schedulerFitsNone := "bar-scheduler" + tests := []struct { pod *v1.Pod pickedByDefault bool pickedByFoo bool }{ { - // pod with no annotation "scheduler.alpha.kubernetes.io/name=" should be - // picked by the default scheduler, NOT by the one of name "foo-scheduler" - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "foo", Namespace: "bar"}}, - pickedByDefault: true, - pickedByFoo: false, - }, - { - // pod with annotation "scheduler.alpha.kubernetes.io/name=default-scheduler" should be picked + // pod with "spec.Schedulername=default-scheduler" should be picked // by the scheduler of name "default-scheduler", NOT by the one of name "foo-scheduler" - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "foo", Namespace: "bar", Annotations: schedulerAnnotationFitsDefault}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "bar"}, Spec: v1.PodSpec{SchedulerName: schedulerFitsDefault}}, pickedByDefault: true, pickedByFoo: false, }, { - // pod with annotataion "scheduler.alpha.kubernetes.io/name=foo-scheduler" should be NOT + // pod with "spec.SchedulerName=foo-scheduler" should be NOT // be picked by the scheduler of name "default-scheduler", but by the one of name "foo-scheduler" - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "foo", Namespace: "bar", Annotations: schedulerAnnotationFitsFoo}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "bar"}, Spec: v1.PodSpec{SchedulerName: schedulerFitsFoo}}, pickedByDefault: false, pickedByFoo: true, }, { - // pod with annotataion "scheduler.alpha.kubernetes.io/name=foo-scheduler" should be NOT + // pod with "spec.SchedulerName=foo-scheduler" should be NOT // be picked by niether the scheduler of name "default-scheduler" nor the one of name "foo-scheduler" - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "foo", Namespace: "bar", Annotations: schedulerAnnotationFitsNone}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "bar"}, Spec: v1.PodSpec{SchedulerName: schedulerFitsNone}}, pickedByDefault: false, pickedByFoo: false, }, } for _, test := range tests { - podOfDefault := factoryDefaultScheduler.responsibleForPod(test.pod) - podOfFoo := factoryFooScheduler.responsibleForPod(test.pod) + podOfDefault := factoryDefaultScheduler.ResponsibleForPod(test.pod) + podOfFoo := factoryFooScheduler.ResponsibleForPod(test.pod) results := []bool{podOfDefault, podOfFoo} expected := []bool{test.pickedByDefault, test.pickedByFoo} if !reflect.DeepEqual(results, expected) { @@ -437,29 +359,29 @@ func TestNodeConditionPredicate(t *testing.T) { nodeList := &v1.NodeList{ Items: []v1.Node{ // node1 considered - {ObjectMeta: v1.ObjectMeta{Name: "node1"}, Status: v1.NodeStatus{Conditions: []v1.NodeCondition{{Type: v1.NodeReady, Status: v1.ConditionTrue}}}}, + {ObjectMeta: metav1.ObjectMeta{Name: "node1"}, Status: v1.NodeStatus{Conditions: []v1.NodeCondition{{Type: v1.NodeReady, Status: v1.ConditionTrue}}}}, // node2 ignored - node not Ready - {ObjectMeta: v1.ObjectMeta{Name: "node2"}, Status: v1.NodeStatus{Conditions: []v1.NodeCondition{{Type: v1.NodeReady, Status: v1.ConditionFalse}}}}, + {ObjectMeta: metav1.ObjectMeta{Name: "node2"}, Status: v1.NodeStatus{Conditions: []v1.NodeCondition{{Type: v1.NodeReady, Status: v1.ConditionFalse}}}}, // node3 ignored - node out of disk - {ObjectMeta: v1.ObjectMeta{Name: "node3"}, Status: v1.NodeStatus{Conditions: []v1.NodeCondition{{Type: v1.NodeOutOfDisk, Status: v1.ConditionTrue}}}}, + {ObjectMeta: metav1.ObjectMeta{Name: "node3"}, Status: v1.NodeStatus{Conditions: []v1.NodeCondition{{Type: v1.NodeOutOfDisk, Status: v1.ConditionTrue}}}}, // node4 considered - {ObjectMeta: v1.ObjectMeta{Name: "node4"}, Status: v1.NodeStatus{Conditions: []v1.NodeCondition{{Type: v1.NodeOutOfDisk, Status: v1.ConditionFalse}}}}, + {ObjectMeta: metav1.ObjectMeta{Name: "node4"}, Status: v1.NodeStatus{Conditions: []v1.NodeCondition{{Type: v1.NodeOutOfDisk, Status: v1.ConditionFalse}}}}, // node5 ignored - node out of disk - {ObjectMeta: v1.ObjectMeta{Name: "node5"}, Status: v1.NodeStatus{Conditions: []v1.NodeCondition{{Type: v1.NodeReady, Status: v1.ConditionTrue}, {Type: v1.NodeOutOfDisk, Status: v1.ConditionTrue}}}}, + {ObjectMeta: metav1.ObjectMeta{Name: "node5"}, Status: v1.NodeStatus{Conditions: []v1.NodeCondition{{Type: v1.NodeReady, Status: v1.ConditionTrue}, {Type: v1.NodeOutOfDisk, Status: v1.ConditionTrue}}}}, // node6 considered - {ObjectMeta: v1.ObjectMeta{Name: "node6"}, Status: v1.NodeStatus{Conditions: []v1.NodeCondition{{Type: v1.NodeReady, Status: v1.ConditionTrue}, {Type: v1.NodeOutOfDisk, Status: v1.ConditionFalse}}}}, + {ObjectMeta: metav1.ObjectMeta{Name: "node6"}, Status: v1.NodeStatus{Conditions: []v1.NodeCondition{{Type: v1.NodeReady, Status: v1.ConditionTrue}, {Type: v1.NodeOutOfDisk, Status: v1.ConditionFalse}}}}, // node7 ignored - node out of disk, node not Ready - {ObjectMeta: v1.ObjectMeta{Name: "node7"}, Status: v1.NodeStatus{Conditions: []v1.NodeCondition{{Type: v1.NodeReady, Status: v1.ConditionFalse}, {Type: v1.NodeOutOfDisk, Status: v1.ConditionTrue}}}}, + {ObjectMeta: metav1.ObjectMeta{Name: "node7"}, Status: v1.NodeStatus{Conditions: []v1.NodeCondition{{Type: v1.NodeReady, Status: v1.ConditionFalse}, {Type: v1.NodeOutOfDisk, Status: v1.ConditionTrue}}}}, // node8 ignored - node not Ready - {ObjectMeta: v1.ObjectMeta{Name: "node8"}, Status: v1.NodeStatus{Conditions: []v1.NodeCondition{{Type: v1.NodeReady, Status: v1.ConditionFalse}, {Type: v1.NodeOutOfDisk, Status: v1.ConditionFalse}}}}, + {ObjectMeta: metav1.ObjectMeta{Name: "node8"}, Status: v1.NodeStatus{Conditions: []v1.NodeCondition{{Type: v1.NodeReady, Status: v1.ConditionFalse}, {Type: v1.NodeOutOfDisk, Status: v1.ConditionFalse}}}}, // node9 ignored - node unschedulable - {ObjectMeta: v1.ObjectMeta{Name: "node9"}, Spec: v1.NodeSpec{Unschedulable: true}}, + {ObjectMeta: metav1.ObjectMeta{Name: "node9"}, Spec: v1.NodeSpec{Unschedulable: true}}, // node10 considered - {ObjectMeta: v1.ObjectMeta{Name: "node10"}, Spec: v1.NodeSpec{Unschedulable: false}}, + {ObjectMeta: metav1.ObjectMeta{Name: "node10"}, Spec: v1.NodeSpec{Unschedulable: false}}, // node11 considered - {ObjectMeta: v1.ObjectMeta{Name: "node11"}}, + {ObjectMeta: metav1.ObjectMeta{Name: "node11"}}, }, } diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/generic_scheduler_test.go b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/generic_scheduler_test.go index f03d642b..2610573c 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/generic_scheduler_test.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/generic_scheduler_test.go @@ -25,6 +25,7 @@ import ( "testing" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/kubernetes/pkg/api/resource" @@ -105,7 +106,7 @@ func reverseNumericPriority(pod *v1.Pod, nodeNameToInfo map[string]*schedulercac func makeNodeList(nodeNames []string) []*v1.Node { result := make([]*v1.Node, 0, len(nodeNames)) for _, nodeName := range nodeNames { - result = append(result, &v1.Node{ObjectMeta: v1.ObjectMeta{Name: nodeName}}) + result = append(result, &v1.Node{ObjectMeta: metav1.ObjectMeta{Name: nodeName}}) } return result } @@ -193,10 +194,10 @@ func TestGenericScheduler(t *testing.T) { prioritizers: []algorithm.PriorityConfig{{Map: EqualPriorityMap, Weight: 1}}, nodes: []string{"machine1", "machine2"}, expectsErr: true, - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "2"}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "2"}}, name: "test 1", wErr: &FitError{ - Pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "2"}}, + Pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "2"}}, FailedPredicates: FailedPredicateMap{ "machine1": []algorithm.PredicateFailureReason{algorithmpredicates.ErrFakePredicate}, "machine2": []algorithm.PredicateFailureReason{algorithmpredicates.ErrFakePredicate}, @@ -206,7 +207,7 @@ func TestGenericScheduler(t *testing.T) { predicates: map[string]algorithm.FitPredicate{"true": truePredicate}, prioritizers: []algorithm.PriorityConfig{{Map: EqualPriorityMap, Weight: 1}}, nodes: []string{"machine1", "machine2"}, - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "ignore"}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "ignore"}}, expectedHosts: sets.NewString("machine1", "machine2"), name: "test 2", wErr: nil, @@ -216,7 +217,7 @@ func TestGenericScheduler(t *testing.T) { predicates: map[string]algorithm.FitPredicate{"matches": matchesPredicate}, prioritizers: []algorithm.PriorityConfig{{Map: EqualPriorityMap, Weight: 1}}, nodes: []string{"machine1", "machine2"}, - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "machine2"}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "machine2"}}, expectedHosts: sets.NewString("machine2"), name: "test 3", wErr: nil, @@ -225,7 +226,7 @@ func TestGenericScheduler(t *testing.T) { predicates: map[string]algorithm.FitPredicate{"true": truePredicate}, prioritizers: []algorithm.PriorityConfig{{Function: numericPriority, Weight: 1}}, nodes: []string{"3", "2", "1"}, - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "ignore"}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "ignore"}}, expectedHosts: sets.NewString("3"), name: "test 4", wErr: nil, @@ -234,7 +235,7 @@ func TestGenericScheduler(t *testing.T) { predicates: map[string]algorithm.FitPredicate{"matches": matchesPredicate}, prioritizers: []algorithm.PriorityConfig{{Function: numericPriority, Weight: 1}}, nodes: []string{"3", "2", "1"}, - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "2"}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "2"}}, expectedHosts: sets.NewString("2"), name: "test 5", wErr: nil, @@ -243,7 +244,7 @@ func TestGenericScheduler(t *testing.T) { predicates: map[string]algorithm.FitPredicate{"true": truePredicate}, prioritizers: []algorithm.PriorityConfig{{Function: numericPriority, Weight: 1}, {Function: reverseNumericPriority, Weight: 2}}, nodes: []string{"3", "2", "1"}, - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "2"}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "2"}}, expectedHosts: sets.NewString("1"), name: "test 6", wErr: nil, @@ -252,11 +253,11 @@ func TestGenericScheduler(t *testing.T) { predicates: map[string]algorithm.FitPredicate{"true": truePredicate, "false": falsePredicate}, prioritizers: []algorithm.PriorityConfig{{Function: numericPriority, Weight: 1}}, nodes: []string{"3", "2", "1"}, - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "2"}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "2"}}, expectsErr: true, name: "test 7", wErr: &FitError{ - Pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "2"}}, + Pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "2"}}, FailedPredicates: FailedPredicateMap{ "3": []algorithm.PredicateFailureReason{algorithmpredicates.ErrFakePredicate}, "2": []algorithm.PredicateFailureReason{algorithmpredicates.ErrFakePredicate}, @@ -271,7 +272,7 @@ func TestGenericScheduler(t *testing.T) { }, pods: []*v1.Pod{ { - ObjectMeta: v1.ObjectMeta{Name: "2"}, + ObjectMeta: metav1.ObjectMeta{Name: "2"}, Spec: v1.PodSpec{ NodeName: "2", }, @@ -280,13 +281,13 @@ func TestGenericScheduler(t *testing.T) { }, }, }, - pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "2"}}, + pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "2"}}, prioritizers: []algorithm.PriorityConfig{{Function: numericPriority, Weight: 1}}, nodes: []string{"1", "2"}, expectsErr: true, name: "test 8", wErr: &FitError{ - Pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "2"}}, + Pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "2"}}, FailedPredicates: FailedPredicateMap{ "1": []algorithm.PredicateFailureReason{algorithmpredicates.ErrFakePredicate}, "2": []algorithm.PredicateFailureReason{algorithmpredicates.ErrFakePredicate}, @@ -300,7 +301,7 @@ func TestGenericScheduler(t *testing.T) { cache.AddPod(pod) } for _, name := range test.nodes { - cache.AddNode(&v1.Node{ObjectMeta: v1.ObjectMeta{Name: name}}) + cache.AddNode(&v1.Node{ObjectMeta: metav1.ObjectMeta{Name: name}}) } scheduler := NewGenericScheduler( @@ -349,14 +350,14 @@ func TestFindFitAllError(t *testing.T) { func TestFindFitSomeError(t *testing.T) { nodes := []string{"3", "2", "1"} predicates := map[string]algorithm.FitPredicate{"true": truePredicate, "match": matchesPredicate} - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "1"}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "1"}} nodeNameToInfo := map[string]*schedulercache.NodeInfo{ "3": schedulercache.NewNodeInfo(), "2": schedulercache.NewNodeInfo(), "1": schedulercache.NewNodeInfo(pod), } for name := range nodeNameToInfo { - nodeNameToInfo[name].SetNode(&v1.Node{ObjectMeta: v1.ObjectMeta{Name: name}}) + nodeNameToInfo[name].SetNode(&v1.Node{ObjectMeta: metav1.ObjectMeta{Name: name}}) } _, predicateMap, err := findNodesThatFit(pod, nodeNameToInfo, makeNodeList(nodes), predicates, nil, algorithm.EmptyMetadataProducer) @@ -384,7 +385,7 @@ func TestFindFitSomeError(t *testing.T) { func makeNode(node string, milliCPU, memory int64) *v1.Node { return &v1.Node{ - ObjectMeta: v1.ObjectMeta{Name: node}, + ObjectMeta: metav1.ObjectMeta{Name: node}, Status: v1.NodeStatus{ Capacity: v1.ResourceList{ "cpu": *resource.NewMilliQuantity(milliCPU, resource.DecimalSI), @@ -400,7 +401,7 @@ func makeNode(node string, milliCPU, memory int64) *v1.Node { func TestHumanReadableFitError(t *testing.T) { error := &FitError{ - Pod: &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "2"}}, + Pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "2"}}, FailedPredicates: FailedPredicateMap{ "1": []algorithm.PredicateFailureReason{algorithmpredicates.ErrNodeUnderMemoryPressure}, "2": []algorithm.PredicateFailureReason{algorithmpredicates.ErrNodeUnderDiskPressure}, diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/scheduler.go b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/scheduler.go index 87c1327f..51858b7b 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/scheduler.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/scheduler.go @@ -19,14 +19,21 @@ package scheduler import ( "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/record" "k8s.io/kubernetes/plugin/pkg/scheduler/algorithm" + schedulerapi "k8s.io/kubernetes/plugin/pkg/scheduler/api" "k8s.io/kubernetes/plugin/pkg/scheduler/metrics" "k8s.io/kubernetes/plugin/pkg/scheduler/schedulercache" + "k8s.io/kubernetes/plugin/pkg/scheduler/util" + + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "github.com/golang/glog" + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/kubernetes/pkg/client/cache" ) // Binder knows how to write a binding. @@ -44,6 +51,33 @@ type Scheduler struct { config *Config } +// These are the functions which need to be provided in order to build a Scheduler configuration. +// An implementation of this can be seen in factory.go. +type Configurator interface { + GetPriorityFunctionConfigs(priorityKeys sets.String) ([]algorithm.PriorityConfig, error) + GetPriorityMetadataProducer() (algorithm.MetadataProducer, error) + GetPredicateMetadataProducer() (algorithm.MetadataProducer, error) + GetPredicates(predicateKeys sets.String) (map[string]algorithm.FitPredicate, error) + GetHardPodAffinitySymmetricWeight() int + GetFailureDomains() []string + GetSchedulerName() string + MakeDefaultErrorFunc(backoff *util.PodBackoff, podQueue *cache.FIFO) func(pod *v1.Pod, err error) + + // Probably doesn't need to be public. But exposed for now in case. + ResponsibleForPod(pod *v1.Pod) bool + + // Needs to be exposed for things like integration tests where we want to make fake nodes. + GetNodeStore() cache.Store + GetClient() clientset.Interface + GetScheduledPodListerIndexer() cache.Indexer + Run() + + Create() (*Config, error) + CreateFromProvider(providerName string) (*Config, error) + CreateFromConfig(policy schedulerapi.Policy) (*Config, error) + CreateFromKeys(predicateKeys, priorityKeys sets.String, extenders []algorithm.SchedulerExtender) (*Config, error) +} + type Config struct { // It is expected that changes made via SchedulerCache will be observed // by NodeLister and Algorithm. @@ -128,7 +162,7 @@ func (s *Scheduler) scheduleOne() { defer metrics.E2eSchedulingLatency.Observe(metrics.SinceInMicroseconds(start)) b := &v1.Binding{ - ObjectMeta: v1.ObjectMeta{Namespace: pod.Namespace, Name: pod.Name}, + ObjectMeta: metav1.ObjectMeta{Namespace: pod.Namespace, Name: pod.Name}, Target: v1.ObjectReference{ Kind: "Node", Name: dest, diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/scheduler_test.go b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/scheduler_test.go index 2161c0c2..fe44fd4e 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/scheduler_test.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/scheduler_test.go @@ -23,6 +23,7 @@ import ( "testing" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/util/diff" "k8s.io/apimachinery/pkg/util/wait" @@ -51,7 +52,7 @@ func (fc fakePodConditionUpdater) Update(pod *v1.Pod, podCondition *v1.PodCondit func podWithID(id, desiredHost string) *v1.Pod { return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{Name: id, SelfLink: testapi.Default.SelfLink("pods", id)}, + ObjectMeta: metav1.ObjectMeta{Name: id, SelfLink: testapi.Default.SelfLink("pods", id)}, Spec: v1.PodSpec{ NodeName: desiredHost, }, @@ -88,7 +89,7 @@ func TestScheduler(t *testing.T) { eventBroadcaster.StartLogging(t.Logf).Stop() errS := errors.New("scheduler") errB := errors.New("binder") - testNode := v1.Node{ObjectMeta: v1.ObjectMeta{Name: "machine1"}} + testNode := v1.Node{ObjectMeta: metav1.ObjectMeta{Name: "machine1"}} table := []struct { injectBindError error @@ -103,7 +104,7 @@ func TestScheduler(t *testing.T) { { sendPod: podWithID("foo", ""), algo: mockScheduler{testNode.Name, nil}, - expectBind: &v1.Binding{ObjectMeta: v1.ObjectMeta{Name: "foo"}, Target: v1.ObjectReference{Kind: "Node", Name: testNode.Name}}, + expectBind: &v1.Binding{ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Target: v1.ObjectReference{Kind: "Node", Name: testNode.Name}}, expectAssumedPod: podWithID("foo", testNode.Name), eventReason: "Scheduled", }, { @@ -115,7 +116,7 @@ func TestScheduler(t *testing.T) { }, { sendPod: podWithID("foo", ""), algo: mockScheduler{testNode.Name, nil}, - expectBind: &v1.Binding{ObjectMeta: v1.ObjectMeta{Name: "foo"}, Target: v1.ObjectReference{Kind: "Node", Name: testNode.Name}}, + expectBind: &v1.Binding{ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Target: v1.ObjectReference{Kind: "Node", Name: testNode.Name}}, expectAssumedPod: podWithID("foo", testNode.Name), injectBindError: errB, expectError: errB, @@ -185,7 +186,7 @@ func TestSchedulerNoPhantomPodAfterExpire(t *testing.T) { queuedPodStore := clientcache.NewFIFO(clientcache.MetaNamespaceKeyFunc) scache := schedulercache.New(100*time.Millisecond, stop) pod := podWithPort("pod.Name", "", 8080) - node := v1.Node{ObjectMeta: v1.ObjectMeta{Name: "machine1"}} + node := v1.Node{ObjectMeta: metav1.ObjectMeta{Name: "machine1"}} scache.AddNode(&node) nodeLister := algorithm.FakeNodeLister([]*v1.Node{&node}) predicateMap := map[string]algorithm.FitPredicate{"PodFitsHostPorts": predicates.PodFitsHostPorts} @@ -226,7 +227,7 @@ func TestSchedulerNoPhantomPodAfterExpire(t *testing.T) { select { case b := <-bindingChan: expectBinding := &v1.Binding{ - ObjectMeta: v1.ObjectMeta{Name: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar"}, Target: v1.ObjectReference{Kind: "Node", Name: node.Name}, } if !reflect.DeepEqual(expectBinding, b) { @@ -243,7 +244,7 @@ func TestSchedulerNoPhantomPodAfterDelete(t *testing.T) { queuedPodStore := clientcache.NewFIFO(clientcache.MetaNamespaceKeyFunc) scache := schedulercache.New(10*time.Minute, stop) firstPod := podWithPort("pod.Name", "", 8080) - node := v1.Node{ObjectMeta: v1.ObjectMeta{Name: "machine1"}} + node := v1.Node{ObjectMeta: metav1.ObjectMeta{Name: "machine1"}} scache.AddNode(&node) nodeLister := algorithm.FakeNodeLister([]*v1.Node{&node}) predicateMap := map[string]algorithm.FitPredicate{"PodFitsHostPorts": predicates.PodFitsHostPorts} @@ -286,7 +287,7 @@ func TestSchedulerNoPhantomPodAfterDelete(t *testing.T) { select { case b := <-bindingChan: expectBinding := &v1.Binding{ - ObjectMeta: v1.ObjectMeta{Name: "bar"}, + ObjectMeta: metav1.ObjectMeta{Name: "bar"}, Target: v1.ObjectReference{Kind: "Node", Name: node.Name}, } if !reflect.DeepEqual(expectBinding, b) { @@ -325,7 +326,7 @@ func TestSchedulerErrorWithLongBinding(t *testing.T) { queuedPodStore := clientcache.NewFIFO(clientcache.MetaNamespaceKeyFunc) scache := schedulercache.New(test.CacheTTL, stop) - node := v1.Node{ObjectMeta: v1.ObjectMeta{Name: "machine1"}} + node := v1.Node{ObjectMeta: metav1.ObjectMeta{Name: "machine1"}} scache.AddNode(&node) nodeLister := algorithm.FakeNodeLister([]*v1.Node{&node}) @@ -374,7 +375,7 @@ func setupTestSchedulerWithOnePodOnNode(t *testing.T, queuedPodStore *clientcach select { case b := <-bindingChan: expectBinding := &v1.Binding{ - ObjectMeta: v1.ObjectMeta{Name: pod.Name}, + ObjectMeta: metav1.ObjectMeta{Name: pod.Name}, Target: v1.ObjectReference{Kind: "Node", Name: node.Name}, } if !reflect.DeepEqual(expectBinding, b) { @@ -407,7 +408,7 @@ func TestSchedulerFailedSchedulingReasons(t *testing.T) { nodes := []*v1.Node{} for i := 0; i < 100; i++ { node := v1.Node{ - ObjectMeta: v1.ObjectMeta{Name: fmt.Sprintf("machine%v", i)}, + ObjectMeta: metav1.ObjectMeta{Name: fmt.Sprintf("machine%v", i)}, Status: v1.NodeStatus{ Capacity: v1.ResourceList{ v1.ResourceCPU: *(resource.NewQuantity(cpu/2, resource.DecimalSI)), diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/schedulercache/BUILD b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/schedulercache/BUILD index d0d850db..6126730c 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/schedulercache/BUILD +++ b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/schedulercache/BUILD @@ -37,6 +37,7 @@ go_test( "//pkg/api/resource:go_default_library", "//pkg/api/v1:go_default_library", "//plugin/pkg/scheduler/algorithm/priorities/util:go_default_library", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/labels", ], ) diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/schedulercache/cache_test.go b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/schedulercache/cache_test.go index 2e363139..27ade20f 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/schedulercache/cache_test.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/schedulercache/cache_test.go @@ -22,6 +22,7 @@ import ( "testing" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" @@ -533,7 +534,7 @@ func makeBasePod(nodeName, objName, cpu, mem string, ports []v1.ContainerPort) * } } return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: "node_info_cache_test", Name: objName, }, diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/schedulercache/node_info.go b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/schedulercache/node_info.go index 94f07900..1d048be8 100644 --- a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/schedulercache/node_info.go +++ b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/schedulercache/node_info.go @@ -82,6 +82,14 @@ func (r *Resource) ResourceList() v1.ResourceList { return result } +func (r *Resource) AddOpaque(name v1.ResourceName, quantity int64) { + // Lazily allocate opaque integer resource map. + if r.OpaqueIntResources == nil { + r.OpaqueIntResources = map[v1.ResourceName]int64{} + } + r.OpaqueIntResources[name] += quantity +} + // NewNodeInfo returns a ready to use empty NodeInfo object. // If any pods are given in arguments, their information will be aggregated in // the returned object. @@ -215,7 +223,6 @@ func hasPodAffinityConstraints(pod *v1.Pod) bool { // addPod adds pod information to this NodeInfo. func (n *NodeInfo) addPod(pod *v1.Pod) { - // cpu, mem, nvidia_gpu, non0_cpu, non0_mem := calculateResource(pod) res, non0_cpu, non0_mem := calculateResource(pod) n.requestedResource.MilliCPU += res.MilliCPU n.requestedResource.Memory += res.Memory @@ -298,11 +305,7 @@ func calculateResource(pod *v1.Pod) (res Resource, non0_cpu int64, non0_mem int6 res.NvidiaGPU += rQuant.Value() default: if v1.IsOpaqueIntResourceName(rName) { - // Lazily allocate opaque resource map. - if res.OpaqueIntResources == nil { - res.OpaqueIntResources = map[v1.ResourceName]int64{} - } - res.OpaqueIntResources[rName] += rQuant.Value() + res.AddOpaque(rName, rQuant.Value()) } } } @@ -330,11 +333,7 @@ func (n *NodeInfo) SetNode(node *v1.Node) error { n.allowedPodNumber = int(rQuant.Value()) default: if v1.IsOpaqueIntResourceName(rName) { - // Lazily allocate opaque resource map. - if n.allocatableResource.OpaqueIntResources == nil { - n.allocatableResource.OpaqueIntResources = map[v1.ResourceName]int64{} - } - n.allocatableResource.OpaqueIntResources[rName] = rQuant.Value() + n.allocatableResource.AddOpaque(rName, rQuant.Value()) } } } diff --git a/vendor/k8s.io/kubernetes/pkg/util/diff/BUILD b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/util/BUILD similarity index 72% rename from vendor/k8s.io/kubernetes/pkg/util/diff/BUILD rename to vendor/k8s.io/kubernetes/plugin/pkg/scheduler/util/BUILD index 66aaf5b5..6f1b76e1 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/diff/BUILD +++ b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/util/BUILD @@ -8,21 +8,22 @@ load( "go_test", ) -go_library( - name = "go_default_library", - srcs = ["diff.go"], - tags = ["automanaged"], - deps = [ - "//pkg/util/validation/field:go_default_library", - "//vendor:github.com/davecgh/go-spew/spew", - ], -) - go_test( name = "go_default_test", - srcs = ["diff_test.go"], + srcs = ["backoff_utils_test.go"], library = ":go_default_library", tags = ["automanaged"], + deps = ["//vendor:k8s.io/apimachinery/pkg/types"], +) + +go_library( + name = "go_default_library", + srcs = ["backoff_utils.go"], + tags = ["automanaged"], + deps = [ + "//vendor:github.com/golang/glog", + "//vendor:k8s.io/apimachinery/pkg/types", + ], ) filegroup( diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/util/backoff_utils.go b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/util/backoff_utils.go new file mode 100644 index 00000000..90566bbf --- /dev/null +++ b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/util/backoff_utils.go @@ -0,0 +1,135 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package util + +import ( + "fmt" + "github.com/golang/glog" + ktypes "k8s.io/apimachinery/pkg/types" + "sync" + "sync/atomic" + "time" +) + +type clock interface { + Now() time.Time +} + +type realClock struct{} + +func (realClock) Now() time.Time { + return time.Now() +} + +// backoffEntry is single threaded. in particular, it only allows a single action to be waiting on backoff at a time. +// It is expected that all users will only use the public TryWait(...) method +// It is also not safe to copy this object. +type backoffEntry struct { + backoff time.Duration + lastUpdate time.Time + reqInFlight int32 +} + +// tryLock attempts to acquire a lock via atomic compare and swap. +// returns true if the lock was acquired, false otherwise +func (b *backoffEntry) tryLock() bool { + return atomic.CompareAndSwapInt32(&b.reqInFlight, 0, 1) +} + +// unlock returns the lock. panics if the lock isn't held +func (b *backoffEntry) unlock() { + if !atomic.CompareAndSwapInt32(&b.reqInFlight, 1, 0) { + panic(fmt.Sprintf("unexpected state on unlocking: %+v", b)) + } +} + +// TryWait tries to acquire the backoff lock, maxDuration is the maximum allowed period to wait for. +func (b *backoffEntry) TryWait(maxDuration time.Duration) bool { + if !b.tryLock() { + return false + } + defer b.unlock() + b.wait(maxDuration) + return true +} + +func (entry *backoffEntry) getBackoff(maxDuration time.Duration) time.Duration { + duration := entry.backoff + newDuration := time.Duration(duration) * 2 + if newDuration > maxDuration { + newDuration = maxDuration + } + entry.backoff = newDuration + glog.V(4).Infof("Backing off %s for pod %+v", duration.String(), entry) + return duration +} + +func (entry *backoffEntry) wait(maxDuration time.Duration) { + time.Sleep(entry.getBackoff(maxDuration)) +} + +type PodBackoff struct { + perPodBackoff map[ktypes.NamespacedName]*backoffEntry + lock sync.Mutex + clock clock + defaultDuration time.Duration + maxDuration time.Duration +} + +func (p *PodBackoff) MaxDuration() time.Duration { + return p.maxDuration +} + +func CreateDefaultPodBackoff() *PodBackoff { + return CreatePodBackoff(1*time.Second, 60*time.Second) +} + +func CreatePodBackoff(defaultDuration, maxDuration time.Duration) *PodBackoff { + return CreatePodBackoffWithClock(defaultDuration, maxDuration, realClock{}) +} + +func CreatePodBackoffWithClock(defaultDuration, maxDuration time.Duration, clock clock) *PodBackoff { + return &PodBackoff{ + perPodBackoff: map[ktypes.NamespacedName]*backoffEntry{}, + clock: clock, + defaultDuration: defaultDuration, + maxDuration: maxDuration, + } +} + +func (p *PodBackoff) GetEntry(podID ktypes.NamespacedName) *backoffEntry { + p.lock.Lock() + defer p.lock.Unlock() + entry, ok := p.perPodBackoff[podID] + if !ok { + entry = &backoffEntry{backoff: p.defaultDuration} + p.perPodBackoff[podID] = entry + } + entry.lastUpdate = p.clock.Now() + return entry +} + +func (p *PodBackoff) Gc() { + p.lock.Lock() + defer p.lock.Unlock() + now := p.clock.Now() + for podID, entry := range p.perPodBackoff { + if now.Sub(entry.lastUpdate) > p.maxDuration { + delete(p.perPodBackoff, podID) + } + } +} diff --git a/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/util/backoff_utils_test.go b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/util/backoff_utils_test.go new file mode 100644 index 00000000..11c6fd56 --- /dev/null +++ b/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/util/backoff_utils_test.go @@ -0,0 +1,85 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package util + +import ( + ktypes "k8s.io/apimachinery/pkg/types" + "testing" + "time" +) + +type fakeClock struct { + t time.Time +} + +func (f *fakeClock) Now() time.Time { + return f.t +} + +func TestBackoff(t *testing.T) { + clock := fakeClock{} + backoff := CreatePodBackoffWithClock(1*time.Second, 60*time.Second, &clock) + tests := []struct { + podID ktypes.NamespacedName + expectedDuration time.Duration + advanceClock time.Duration + }{ + { + podID: ktypes.NamespacedName{Namespace: "default", Name: "foo"}, + expectedDuration: 1 * time.Second, + }, + { + podID: ktypes.NamespacedName{Namespace: "default", Name: "foo"}, + expectedDuration: 2 * time.Second, + }, + { + podID: ktypes.NamespacedName{Namespace: "default", Name: "foo"}, + expectedDuration: 4 * time.Second, + }, + { + podID: ktypes.NamespacedName{Namespace: "default", Name: "bar"}, + expectedDuration: 1 * time.Second, + advanceClock: 120 * time.Second, + }, + // 'foo' should have been gc'd here. + { + podID: ktypes.NamespacedName{Namespace: "default", Name: "foo"}, + expectedDuration: 1 * time.Second, + }, + } + + for _, test := range tests { + duration := backoff.GetEntry(test.podID).getBackoff(backoff.maxDuration) + if duration != test.expectedDuration { + t.Errorf("expected: %s, got %s for %s", test.expectedDuration.String(), duration.String(), test.podID) + } + clock.t = clock.t.Add(test.advanceClock) + backoff.Gc() + } + fooID := ktypes.NamespacedName{Namespace: "default", Name: "foo"} + backoff.perPodBackoff[fooID].backoff = 60 * time.Second + duration := backoff.GetEntry(fooID).getBackoff(backoff.maxDuration) + if duration != 60*time.Second { + t.Errorf("expected: 60, got %s", duration.String()) + } + // Verify that we split on namespaces correctly, same name, different namespace + fooID.Namespace = "other" + duration = backoff.GetEntry(fooID).getBackoff(backoff.maxDuration) + if duration != 1*time.Second { + t.Errorf("expected: 1, got %s", duration.String()) + } +} diff --git a/vendor/k8s.io/kubernetes/staging/copy.sh b/vendor/k8s.io/kubernetes/staging/copy.sh index 3ea89cf6..30b4c611 100755 --- a/vendor/k8s.io/kubernetes/staging/copy.sh +++ b/vendor/k8s.io/kubernetes/staging/copy.sh @@ -55,29 +55,53 @@ echo "creating the tmp directory" mkdir -p "${CLIENT_REPO_TEMP}" cd "${CLIENT_REPO}" +# there are two classes of package in staging/client-go, those which are authoritative (client-go has the only copy) +# and those which are copied and rewritten (client-go is not authoritative). +# we first copy out the authoritative packages to the temp location, then copy non-authoritative packages +# then save over the original + + +# save copies code from client-go into the temp folder to make sure we don't lose it by accident +# TODO this is temporary until everything in certain directories is authoritative +function save() { + mkdir -p "${CLIENT_REPO_TEMP}/$1" + cp -r "${CLIENT_REPO}/$1/"* "${CLIENT_REPO_TEMP}/$1" +} + +# save everything for which the staging directory is the source of truth +save "rest" +# remove the rest/fake until we're authoritative for it (need to update for registry) +rm -rf ${CLIENT_REPO_TEMP}/rest/fake +save "tools/auth" +save "tools/clientcmd" +save "tools/metrics" +save "transport" +save "pkg/third_party" +save "plugin" +save "util" + + + # mkcp copies file from the main repo to the client repo, it creates the directory if it doesn't exist in the client repo. function mkcp() { mkdir -p "${CLIENT_REPO_TEMP}/$2" && cp -r "${MAIN_REPO}/$1" "${CLIENT_REPO_TEMP}/$2" } +# assemble all the other parts of the staging directory echo "copying client packages" mkcp "pkg/client/clientset_generated/${CLIENTSET}" "pkg/client/clientset_generated" mkcp "/pkg/client/record" "/pkg/client" mkcp "/pkg/client/cache" "/pkg/client" # TODO: make this test file not depending on pkg/client/unversioned rm "${CLIENT_REPO_TEMP}"/pkg/client/cache/listwatch_test.go -mkcp "/pkg/client/restclient" "/pkg/client" +mkcp "/pkg/client/restclient/fake" "/pkg/client/restclient" mkcp "/pkg/client/testing" "/pkg/client" # remove this test because it imports the internal clientset rm "${CLIENT_REPO_TEMP}"/pkg/client/testing/core/fake_test.go -mkcp "/pkg/client/transport" "/pkg/client" mkcp "/pkg/client/typed" "/pkg/client" -mkcp "/pkg/client/unversioned/auth" "/pkg/client/unversioned" -mkcp "/pkg/client/unversioned/clientcmd" "/pkg/client/unversioned" mkcp "/pkg/client/unversioned/portforward" "/pkg/client/unversioned" -mkcp "/plugin/pkg/client/auth" "/plugin/pkg/client" mkcp "/pkg/util/workqueue" "pkg/util" # remove this folder because it imports prometheus rm -rf "${CLIENT_REPO_TEMP}/pkg/util/workqueue/prometheus" @@ -124,8 +148,6 @@ find "${CLIENT_REPO_TEMP}"/pkg/client/record -type f -name "*.go" -print0 | xarg # gofmt the changed files echo "rewrite conflicting Prometheus registration" -sed -i "s/request_latency_microseconds/request_latency_microseconds_copy/g" "${CLIENT_REPO_TEMP}"/pkg/client/metrics/metrics.go -sed -i "s/request_status_codes/request_status_codes_copy/g" "${CLIENT_REPO_TEMP}"/pkg/client/metrics/metrics.go sed -i "s/kubernetes_build_info/kubernetes_build_info_copy/g" "${CLIENT_REPO_TEMP}"/pkg/version/version.go echo "rewrite proto names in proto.RegisterType" @@ -143,12 +165,9 @@ echo "rearranging directory layout" function mvfolder { local src=${1%/#/} local dst=${2%/#/} - # create the parent directory of dst - if [ "${dst%/*}" != "${dst}" ]; then - mkdir -p "${CLIENT_REPO_TEMP}/${dst%/*}" - fi + mkdir -p "${CLIENT_REPO_TEMP}/${dst}" # move - mv "${CLIENT_REPO_TEMP}/${src}" "${CLIENT_REPO_TEMP}/${dst}" + mv "${CLIENT_REPO_TEMP}/${src}"/* "${CLIENT_REPO_TEMP}/${dst}" # rewrite package local src_package="${src##*/}" local dst_package="${dst##*/}" @@ -170,14 +189,10 @@ function mvfolder { mvfolder "pkg/client/clientset_generated/${CLIENTSET}" kubernetes mvfolder pkg/client/typed/discovery discovery mvfolder pkg/client/typed/dynamic dynamic -mvfolder pkg/client/transport transport mvfolder pkg/client/record tools/record -mvfolder pkg/client/restclient rest +mvfolder pkg/client/restclient/fake rest/fake mvfolder pkg/client/cache tools/cache -mvfolder pkg/client/unversioned/auth tools/auth -mvfolder pkg/client/unversioned/clientcmd tools/clientcmd mvfolder pkg/client/unversioned/portforward tools/portforward -mvfolder pkg/client/metrics tools/metrics mvfolder pkg/client/testing/core testing mvfolder pkg/client/testing/cache tools/cache/testing mvfolder cmd/kubeadm/app/apis/kubeadm pkg/apis/kubeadm @@ -187,7 +202,6 @@ if [ "$(find "${CLIENT_REPO_TEMP}"/pkg/client -type f -name "*.go")" ]; then else rm -r "${CLIENT_REPO_TEMP}"/pkg/client fi -mvfolder third_party pkg/third_party mvfolder federation pkg/federation echo "running gofmt" @@ -202,6 +216,9 @@ find "${CLIENT_REPO_TEMP}" -type f \( \ -name "*.sh" \ \) -delete +echo "remove cyclical godep" +rm -rf "${CLIENT_REPO_TEMP}/_vendor/k8s.io/client-go" + if [ "${VERIFYONLY}" = true ]; then echo "running verify-only" ret=0 diff --git a/vendor/k8s.io/kubernetes/staging/godeps-json-updater.go b/vendor/k8s.io/kubernetes/staging/godeps-json-updater.go index a9a66d37..7f8fbe98 100644 --- a/vendor/k8s.io/kubernetes/staging/godeps-json-updater.go +++ b/vendor/k8s.io/kubernetes/staging/godeps-json-updater.go @@ -70,6 +70,9 @@ func main() { if strings.Contains(dep.ImportPath, "k8s.io/kubernetes") { continue } + if strings.Contains(dep.ImportPath, "k8s.io/client-go") { + continue + } g.Deps[i] = dep i++ } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/api/errors/OWNERS b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/api/errors/OWNERS index 155e203d..ae828ad2 100755 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/api/errors/OWNERS +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/api/errors/OWNERS @@ -3,7 +3,6 @@ reviewers: - lavalamp - smarterclayton - wojtek-t -- bgrant0607 - deads2k - brendandburns - derekwaynecarr diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/mapper.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/api/meta/default.go similarity index 65% rename from vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/mapper.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/api/meta/default.go index 69334b07..5ea906a2 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/mapper.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/api/meta/default.go @@ -14,28 +14,21 @@ See the License for the specific language governing permissions and limitations under the License. */ -package api +package meta import ( "strings" - "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/sets" ) -// Instantiates a DefaultRESTMapper based on types registered in api.Scheme -func NewDefaultRESTMapper(defaultGroupVersions []schema.GroupVersion, interfacesFunc meta.VersionInterfacesFunc, - importPathPrefix string, ignoredKinds, rootScoped sets.String) *meta.DefaultRESTMapper { - return NewDefaultRESTMapperFromScheme(defaultGroupVersions, interfacesFunc, importPathPrefix, ignoredKinds, rootScoped, Scheme) -} +// NewDefaultRESTMapperFromScheme instantiates a DefaultRESTMapper based on types registered in the given scheme. +func NewDefaultRESTMapperFromScheme(defaultGroupVersions []schema.GroupVersion, interfacesFunc VersionInterfacesFunc, + importPathPrefix string, ignoredKinds, rootScoped sets.String, scheme *runtime.Scheme) *DefaultRESTMapper { -// Instantiates a DefaultRESTMapper based on types registered in the given scheme. -func NewDefaultRESTMapperFromScheme(defaultGroupVersions []schema.GroupVersion, interfacesFunc meta.VersionInterfacesFunc, - importPathPrefix string, ignoredKinds, rootScoped sets.String, scheme *runtime.Scheme) *meta.DefaultRESTMapper { - - mapper := meta.NewDefaultRESTMapper(defaultGroupVersions, interfacesFunc) + mapper := NewDefaultRESTMapper(defaultGroupVersions, interfacesFunc) // enumerate all supported versions, get the kinds, and register with the mapper how to address // our resources. for _, gv := range defaultGroupVersions { @@ -47,9 +40,9 @@ func NewDefaultRESTMapperFromScheme(defaultGroupVersions []schema.GroupVersion, if !strings.Contains(oType.PkgPath(), importPathPrefix) || ignoredKinds.Has(kind) { continue } - scope := meta.RESTScopeNamespace + scope := RESTScopeNamespace if rootScoped.Has(kind) { - scope = meta.RESTScopeRoot + scope = RESTScopeRoot } mapper.Add(gvk, scope) } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/api/meta/interfaces.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/api/meta/interfaces.go index 6f04ec32..524b1ebd 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/api/meta/interfaces.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/api/meta/interfaces.go @@ -18,7 +18,6 @@ package meta import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" @@ -30,46 +29,6 @@ type VersionInterfaces struct { MetadataAccessor } -type ObjectMetaAccessor interface { - GetObjectMeta() Object -} - -// Object lets you work with object metadata from any of the versioned or -// internal API objects. Attempting to set or retrieve a field on an object that does -// not support that field (Name, UID, Namespace on lists) will be a no-op and return -// a default value. -type Object interface { - GetNamespace() string - SetNamespace(namespace string) - GetName() string - SetName(name string) - GetGenerateName() string - SetGenerateName(name string) - GetUID() types.UID - SetUID(uid types.UID) - GetResourceVersion() string - SetResourceVersion(version string) - GetSelfLink() string - SetSelfLink(selfLink string) - GetCreationTimestamp() metav1.Time - SetCreationTimestamp(timestamp metav1.Time) - GetDeletionTimestamp() *metav1.Time - SetDeletionTimestamp(timestamp *metav1.Time) - GetLabels() map[string]string - SetLabels(labels map[string]string) - GetAnnotations() map[string]string - SetAnnotations(annotations map[string]string) - GetFinalizers() []string - SetFinalizers(finalizers []string) - GetOwnerReferences() []metav1.OwnerReference - SetOwnerReferences([]metav1.OwnerReference) - GetClusterName() string - SetClusterName(clusterName string) -} - -// TODO: move me to pkg/apis/meta/v1/unstructured once Object is moved to pkg/apis/meta/v1 -var _ Object = &unstructured.Unstructured{} - type ListMetaAccessor interface { GetListMeta() List } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/api/meta/meta.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/api/meta/meta.go index 149474dd..4a958a92 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/api/meta/meta.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/api/meta/meta.go @@ -20,13 +20,13 @@ import ( "fmt" "reflect" + "github.com/golang/glog" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/conversion" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" - - "github.com/golang/glog" ) // errNotList is returned when an object implements the Object style interfaces but not the List style @@ -54,9 +54,9 @@ func ListAccessor(obj interface{}) (List, error) { return m, nil } return nil, errNotList - case Object: + case metav1.Object: return t, nil - case ObjectMetaAccessor: + case metav1.ObjectMetaAccessor: if m := t.GetObjectMeta(); m != nil { return m, nil } @@ -75,11 +75,11 @@ var errNotObject = fmt.Errorf("object does not implement the Object interfaces") // required fields are missing. Fields that are not required return the default // value and are a no-op if set. // TODO: return bool instead of error -func Accessor(obj interface{}) (Object, error) { +func Accessor(obj interface{}) (metav1.Object, error) { switch t := obj.(type) { - case Object: + case metav1.Object: return t, nil - case ObjectMetaAccessor: + case metav1.ObjectMetaAccessor: if m := t.GetObjectMeta(); m != nil { return m, nil } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/api/validation/doc.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/api/validation/doc.go new file mode 100644 index 00000000..9f20152e --- /dev/null +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/api/validation/doc.go @@ -0,0 +1,18 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package validation contains generic api type validation functions. +package validation // import "k8s.io/apimachinery/pkg/api/validation" diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/api/validation/generic.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/api/validation/generic.go new file mode 100644 index 00000000..348cdc08 --- /dev/null +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/api/validation/generic.go @@ -0,0 +1,85 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package validation + +import ( + "strings" + + "k8s.io/apimachinery/pkg/util/validation" + "k8s.io/apimachinery/pkg/util/validation/field" +) + +const IsNegativeErrorMsg string = `must be greater than or equal to 0` + +// ValidateNameFunc validates that the provided name is valid for a given resource type. +// Not all resources have the same validation rules for names. Prefix is true +// if the name will have a value appended to it. If the name is not valid, +// this returns a list of descriptions of individual characteristics of the +// value that were not valid. Otherwise this returns an empty list or nil. +type ValidateNameFunc func(name string, prefix bool) []string + +// NameIsDNSSubdomain is a ValidateNameFunc for names that must be a DNS subdomain. +func NameIsDNSSubdomain(name string, prefix bool) []string { + if prefix { + name = maskTrailingDash(name) + } + return validation.IsDNS1123Subdomain(name) +} + +// NameIsDNSLabel is a ValidateNameFunc for names that must be a DNS 1123 label. +func NameIsDNSLabel(name string, prefix bool) []string { + if prefix { + name = maskTrailingDash(name) + } + return validation.IsDNS1123Label(name) +} + +// NameIsDNS1035Label is a ValidateNameFunc for names that must be a DNS 952 label. +func NameIsDNS1035Label(name string, prefix bool) []string { + if prefix { + name = maskTrailingDash(name) + } + return validation.IsDNS1035Label(name) +} + +// ValidateNamespaceName can be used to check whether the given namespace name is valid. +// Prefix indicates this name will be used as part of generation, in which case +// trailing dashes are allowed. +var ValidateNamespaceName = NameIsDNSLabel + +// ValidateServiceAccountName can be used to check whether the given service account name is valid. +// Prefix indicates this name will be used as part of generation, in which case +// trailing dashes are allowed. +var ValidateServiceAccountName = NameIsDNSSubdomain + +// maskTrailingDash replaces the final character of a string with a subdomain safe +// value if is a dash. +func maskTrailingDash(name string) string { + if strings.HasSuffix(name, "-") { + return name[:len(name)-2] + "a" + } + return name +} + +// Validates that given value is not negative. +func ValidateNonnegativeField(value int64, fldPath *field.Path) field.ErrorList { + allErrs := field.ErrorList{} + if value < 0 { + allErrs = append(allErrs, field.Invalid(fldPath, value, IsNegativeErrorMsg)) + } + return allErrs +} diff --git a/vendor/k8s.io/kubernetes/pkg/apimachinery/announced/announced.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apimachinery/announced/announced.go similarity index 93% rename from vendor/k8s.io/kubernetes/pkg/apimachinery/announced/announced.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apimachinery/announced/announced.go index 054dc4aa..2c8568c1 100644 --- a/vendor/k8s.io/kubernetes/pkg/apimachinery/announced/announced.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apimachinery/announced/announced.go @@ -28,14 +28,6 @@ import ( "k8s.io/apimachinery/pkg/runtime" ) -var ( - DefaultGroupFactoryRegistry = make(APIGroupFactoryRegistry) - - // These functions will announce your group or version. - AnnounceGroupVersion = DefaultGroupFactoryRegistry.AnnounceGroupVersion - AnnounceGroup = DefaultGroupFactoryRegistry.AnnounceGroup -) - // APIGroupFactoryRegistry allows for groups and versions to announce themselves, // which simply makes them available and doesn't take other actions. Later, // users of the registry can select which groups and versions they'd actually diff --git a/vendor/k8s.io/kubernetes/pkg/apimachinery/announced/announced_test.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apimachinery/announced/announced_test.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/apimachinery/announced/announced_test.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apimachinery/announced/announced_test.go diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apimachinery/announced/group_factory.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apimachinery/announced/group_factory.go similarity index 94% rename from vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apimachinery/announced/group_factory.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apimachinery/announced/group_factory.go index c8b39814..2f4b0898 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apimachinery/announced/group_factory.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apimachinery/announced/group_factory.go @@ -27,7 +27,6 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/client-go/pkg/api" ) type SchemeFunc func(*runtime.Scheme) error @@ -79,8 +78,8 @@ func NewGroupMetaFactory(groupArgs *GroupMetaFactoryArgs, versions VersionToSche // programmer importing the wrong set of packages. If this assumption doesn't // work for you, just call DefaultGroupFactoryRegistry.AnnouncePreconstructedFactory // yourself. -func (gmf *GroupMetaFactory) Announce() *GroupMetaFactory { - if err := DefaultGroupFactoryRegistry.AnnouncePreconstructedFactory(gmf); err != nil { +func (gmf *GroupMetaFactory) Announce(groupFactoryRegistry APIGroupFactoryRegistry) *GroupMetaFactory { + if err := groupFactoryRegistry.AnnouncePreconstructedFactory(gmf); err != nil { panic(err) } return gmf @@ -171,7 +170,7 @@ func (gmf *GroupMetaFactory) newRESTMapper(scheme *runtime.Scheme, externalVersi ignoredKinds = gmf.GroupArgs.IgnoredKinds } - return api.NewDefaultRESTMapperFromScheme( + return meta.NewDefaultRESTMapperFromScheme( externalVersions, groupMeta.InterfacesFor, gmf.GroupArgs.ImportPrefix, @@ -235,11 +234,11 @@ func (gmf *GroupMetaFactory) Enable(m *registered.APIRegistrationManager, scheme // RegisterAndEnable is provided only to allow this code to get added in multiple steps. // It's really bad that this is called in init() methods, but supporting this // temporarily lets us do the change incrementally. -func (gmf *GroupMetaFactory) RegisterAndEnable() error { - if err := gmf.Register(api.Registry); err != nil { +func (gmf *GroupMetaFactory) RegisterAndEnable(registry *registered.APIRegistrationManager, scheme *runtime.Scheme) error { + if err := gmf.Register(registry); err != nil { return err } - if err := gmf.Enable(api.Registry, api.Scheme); err != nil { + if err := gmf.Enable(registry, scheme); err != nil { return err } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apimachinery/registered/registered.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apimachinery/registered/registered.go index 5256be65..f2e32c88 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apimachinery/registered/registered.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apimachinery/registered/registered.go @@ -105,7 +105,7 @@ func (m *APIRegistrationManager) RegisterVersions(availableVersions []schema.Gro func (m *APIRegistrationManager) RegisterGroup(groupMeta apimachinery.GroupMeta) error { groupName := groupMeta.GroupVersion.Group if _, found := m.groupMetaMap[groupName]; found { - return fmt.Errorf("group %v is already registered", m.groupMetaMap) + return fmt.Errorf("group %q is already registered in groupsMap: %v", groupName, m.groupMetaMap) } m.groupMetaMap[groupName] = &groupMeta return nil diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apis/meta/internalversion/conversion.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apis/meta/internalversion/conversion.go new file mode 100644 index 00000000..804e1824 --- /dev/null +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apis/meta/internalversion/conversion.go @@ -0,0 +1,106 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package internalversion + +import ( + "fmt" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/conversion" + "k8s.io/apimachinery/pkg/fields" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/util/validation/field" +) + +func Convert_internalversion_ListOptions_To_v1_ListOptions(in *ListOptions, out *metav1.ListOptions, s conversion.Scope) error { + if err := Convert_fields_Selector_To_string(&in.FieldSelector, &out.FieldSelector, s); err != nil { + return err + } + if err := Convert_labels_Selector_To_string(&in.LabelSelector, &out.LabelSelector, s); err != nil { + return err + } + out.ResourceVersion = in.ResourceVersion + out.TimeoutSeconds = in.TimeoutSeconds + out.Watch = in.Watch + return nil +} + +func Convert_v1_ListOptions_To_internalversion_ListOptions(in *metav1.ListOptions, out *ListOptions, s conversion.Scope) error { + if err := Convert_string_To_fields_Selector(&in.FieldSelector, &out.FieldSelector, s); err != nil { + return err + } + if err := Convert_string_To_labels_Selector(&in.LabelSelector, &out.LabelSelector, s); err != nil { + return err + } + out.ResourceVersion = in.ResourceVersion + out.TimeoutSeconds = in.TimeoutSeconds + out.Watch = in.Watch + return nil +} + +func Convert_string_To_labels_Selector(in *string, out *labels.Selector, s conversion.Scope) error { + selector, err := labels.Parse(*in) + if err != nil { + return err + } + *out = selector + return nil +} + +func Convert_string_To_fields_Selector(in *string, out *fields.Selector, s conversion.Scope) error { + selector, err := fields.ParseSelector(*in) + if err != nil { + return err + } + *out = selector + return nil +} + +func Convert_labels_Selector_To_string(in *labels.Selector, out *string, s conversion.Scope) error { + if *in == nil { + return nil + } + *out = (*in).String() + return nil +} + +func Convert_fields_Selector_To_string(in *fields.Selector, out *string, s conversion.Scope) error { + if *in == nil { + return nil + } + *out = (*in).String() + return nil +} + +func Convert_map_to_v1_LabelSelector(in *map[string]string, out *metav1.LabelSelector, s conversion.Scope) error { + if in == nil { + return nil + } + out = new(metav1.LabelSelector) + for labelKey, labelValue := range *in { + metav1.AddLabelToSelector(out, labelKey, labelValue) + } + return nil +} + +func Convert_v1_LabelSelector_to_map(in *metav1.LabelSelector, out *map[string]string, s conversion.Scope) error { + var err error + *out, err = metav1.LabelSelectorAsMap(in) + if err != nil { + err = field.Invalid(field.NewPath("labelSelector"), *in, fmt.Sprintf("cannot convert to old selector: %v", err)) + } + return err +} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apis/meta/internalversion/register.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apis/meta/internalversion/register.go new file mode 100644 index 00000000..4a76c03e --- /dev/null +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apis/meta/internalversion/register.go @@ -0,0 +1,77 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package internalversion + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/runtime/serializer" +) + +// GroupName is the group name for this API. +const GroupName = "meta.k8s.io" + +// Scheme is the registry for any type that adheres to the meta API spec. +var scheme = runtime.NewScheme() + +// Codecs provides access to encoding and decoding for the scheme +var codecs = serializer.NewCodecFactory(scheme) + +// SchemeGroupVersion is group version used to register these objects +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} + +// ParameterCodec handles versioning of objects that are converted to query parameters. +var ParameterCodec = runtime.NewParameterCodec(scheme) + +// Kind takes an unqualified kind and returns a Group qualified GroupKind +func Kind(kind string) schema.GroupKind { + return SchemeGroupVersion.WithKind(kind).GroupKind() +} + +// addToGroupVersion registers common meta types into schemas. +func addToGroupVersion(scheme *runtime.Scheme, groupVersion schema.GroupVersion) error { + if err := scheme.AddIgnoredConversionType(&metav1.TypeMeta{}, &metav1.TypeMeta{}); err != nil { + return err + } + scheme.AddConversionFuncs( + Convert_string_To_labels_Selector, + Convert_labels_Selector_To_string, + + Convert_string_To_fields_Selector, + Convert_fields_Selector_To_string, + + Convert_map_to_v1_LabelSelector, + Convert_v1_LabelSelector_to_map, + + Convert_internalversion_ListOptions_To_v1_ListOptions, + Convert_v1_ListOptions_To_internalversion_ListOptions, + ) + scheme.AddKnownTypes(SchemeGroupVersion, + &ListOptions{}, + ) + metav1.AddToGroupVersion(scheme, metav1.SchemeGroupVersion) + return nil +} + +// Unlike other API groups, meta internal knows about all meta external versions, but keeps +// the logic for conversion private. +func init() { + if err := addToGroupVersion(scheme, SchemeGroupVersion); err != nil { + panic(err) + } +} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apis/meta/internalversion/register_test.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apis/meta/internalversion/register_test.go new file mode 100644 index 00000000..151f99a0 --- /dev/null +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apis/meta/internalversion/register_test.go @@ -0,0 +1,89 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package internalversion + +import ( + "net/url" + "reflect" + "testing" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/diff" +) + +func TestListOptions(t *testing.T) { + // verify round trip conversion + ten := int64(10) + in := &metav1.ListOptions{ + LabelSelector: "a=1", + FieldSelector: "b=1", + ResourceVersion: "10", + TimeoutSeconds: &ten, + Watch: true, + } + out := &ListOptions{} + if err := scheme.Convert(in, out, nil); err != nil { + t.Fatal(err) + } + actual := &metav1.ListOptions{} + if err := scheme.Convert(out, actual, nil); err != nil { + t.Fatal(err) + } + if !reflect.DeepEqual(in, actual) { + t.Errorf("unexpected: %s", diff.ObjectReflectDiff(in, actual)) + } + + // verify failing conversion + for i, failingObject := range []*metav1.ListOptions{ + &metav1.ListOptions{LabelSelector: "a!!!"}, + &metav1.ListOptions{FieldSelector: "a!!!"}, + } { + out = &ListOptions{} + if err := scheme.Convert(failingObject, out, nil); err == nil { + t.Errorf("%d: unexpected conversion: %#v", i, out) + } + } + + // verify kind registration + if gvk, unversioned, err := scheme.ObjectKind(in); err != nil || unversioned || gvk != metav1.SchemeGroupVersion.WithKind("ListOptions") { + t.Errorf("unexpected: %v %v %v", gvk, unversioned, err) + } + if gvk, unversioned, err := scheme.ObjectKind(out); err != nil || unversioned || gvk != SchemeGroupVersion.WithKind("ListOptions") { + t.Errorf("unexpected: %v %v %v", gvk, unversioned, err) + } + + actual = &metav1.ListOptions{} + if err := ParameterCodec.DecodeParameters(url.Values{"watch": []string{"1"}}, metav1.SchemeGroupVersion, actual); err != nil { + t.Fatal(err) + } + if !actual.Watch { + t.Errorf("unexpected watch decode: %#v", actual) + } + + // check ParameterCodec + query, err := ParameterCodec.EncodeParameters(in, metav1.SchemeGroupVersion) + if err != nil { + t.Fatal(err) + } + actual = &metav1.ListOptions{} + if err := ParameterCodec.DecodeParameters(query, metav1.SchemeGroupVersion, actual); err != nil { + t.Fatal(err) + } + if !reflect.DeepEqual(in, actual) { + t.Errorf("unexpected: %s", diff.ObjectReflectDiff(in, actual)) + } +} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apis/meta/internalversion/types.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apis/meta/internalversion/types.go new file mode 100644 index 00000000..98965e34 --- /dev/null +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apis/meta/internalversion/types.go @@ -0,0 +1,45 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package internalversion + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" + "k8s.io/apimachinery/pkg/labels" +) + +// ListOptions is the query options to a standard REST list call, and has future support for +// watch calls. +type ListOptions struct { + metav1.TypeMeta + + // A selector based on labels + LabelSelector labels.Selector + // A selector based on fields + FieldSelector fields.Selector + // If true, watch for changes to this list + Watch bool + // When specified with a watch call, shows changes that occur after that particular version of a resource. + // Defaults to changes from the beginning of history. + // When specified for list: + // - if unset, then the result is returned from remote storage based on quorum-read flag; + // - if it's 0, then we simply return what we currently have in cache, no guarantee; + // - if set to non zero, then the result is at least as fresh as given rv. + ResourceVersion string + // Timeout for the list/watch call. + TimeoutSeconds *int64 +} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go index 7e2f0abc..dfc3eb39 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go @@ -30,6 +30,7 @@ limitations under the License. APIResource APIResourceList APIVersions + DeleteOptions Duration ExportOptions GetOptions @@ -42,7 +43,10 @@ limitations under the License. LabelSelector LabelSelectorRequirement ListMeta + ListOptions + ObjectMeta OwnerReference + Preconditions RootPaths ServerAddressByClientCIDR Status @@ -98,103 +102,119 @@ func (m *APIVersions) Reset() { *m = APIVersions{} } func (*APIVersions) ProtoMessage() {} func (*APIVersions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} } +func (m *DeleteOptions) Reset() { *m = DeleteOptions{} } +func (*DeleteOptions) ProtoMessage() {} +func (*DeleteOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} } + func (m *Duration) Reset() { *m = Duration{} } func (*Duration) ProtoMessage() {} -func (*Duration) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} } +func (*Duration) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} } func (m *ExportOptions) Reset() { *m = ExportOptions{} } func (*ExportOptions) ProtoMessage() {} -func (*ExportOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} } +func (*ExportOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} } func (m *GetOptions) Reset() { *m = GetOptions{} } func (*GetOptions) ProtoMessage() {} -func (*GetOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} } +func (*GetOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} } func (m *GroupKind) Reset() { *m = GroupKind{} } func (*GroupKind) ProtoMessage() {} -func (*GroupKind) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} } +func (*GroupKind) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} } func (m *GroupResource) Reset() { *m = GroupResource{} } func (*GroupResource) ProtoMessage() {} -func (*GroupResource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} } +func (*GroupResource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{10} } func (m *GroupVersion) Reset() { *m = GroupVersion{} } func (*GroupVersion) ProtoMessage() {} -func (*GroupVersion) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{10} } +func (*GroupVersion) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{11} } func (m *GroupVersionForDiscovery) Reset() { *m = GroupVersionForDiscovery{} } func (*GroupVersionForDiscovery) ProtoMessage() {} func (*GroupVersionForDiscovery) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{11} + return fileDescriptorGenerated, []int{12} } func (m *GroupVersionKind) Reset() { *m = GroupVersionKind{} } func (*GroupVersionKind) ProtoMessage() {} -func (*GroupVersionKind) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{12} } +func (*GroupVersionKind) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{13} } func (m *GroupVersionResource) Reset() { *m = GroupVersionResource{} } func (*GroupVersionResource) ProtoMessage() {} -func (*GroupVersionResource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{13} } +func (*GroupVersionResource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{14} } func (m *LabelSelector) Reset() { *m = LabelSelector{} } func (*LabelSelector) ProtoMessage() {} -func (*LabelSelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{14} } +func (*LabelSelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{15} } func (m *LabelSelectorRequirement) Reset() { *m = LabelSelectorRequirement{} } func (*LabelSelectorRequirement) ProtoMessage() {} func (*LabelSelectorRequirement) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{15} + return fileDescriptorGenerated, []int{16} } func (m *ListMeta) Reset() { *m = ListMeta{} } func (*ListMeta) ProtoMessage() {} -func (*ListMeta) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{16} } +func (*ListMeta) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{17} } + +func (m *ListOptions) Reset() { *m = ListOptions{} } +func (*ListOptions) ProtoMessage() {} +func (*ListOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{18} } + +func (m *ObjectMeta) Reset() { *m = ObjectMeta{} } +func (*ObjectMeta) ProtoMessage() {} +func (*ObjectMeta) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{19} } func (m *OwnerReference) Reset() { *m = OwnerReference{} } func (*OwnerReference) ProtoMessage() {} -func (*OwnerReference) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{17} } +func (*OwnerReference) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{20} } + +func (m *Preconditions) Reset() { *m = Preconditions{} } +func (*Preconditions) ProtoMessage() {} +func (*Preconditions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{21} } func (m *RootPaths) Reset() { *m = RootPaths{} } func (*RootPaths) ProtoMessage() {} -func (*RootPaths) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{18} } +func (*RootPaths) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{22} } func (m *ServerAddressByClientCIDR) Reset() { *m = ServerAddressByClientCIDR{} } func (*ServerAddressByClientCIDR) ProtoMessage() {} func (*ServerAddressByClientCIDR) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{19} + return fileDescriptorGenerated, []int{23} } func (m *Status) Reset() { *m = Status{} } func (*Status) ProtoMessage() {} -func (*Status) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{20} } +func (*Status) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{24} } func (m *StatusCause) Reset() { *m = StatusCause{} } func (*StatusCause) ProtoMessage() {} -func (*StatusCause) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{21} } +func (*StatusCause) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{25} } func (m *StatusDetails) Reset() { *m = StatusDetails{} } func (*StatusDetails) ProtoMessage() {} -func (*StatusDetails) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{22} } +func (*StatusDetails) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{26} } func (m *Time) Reset() { *m = Time{} } func (*Time) ProtoMessage() {} -func (*Time) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{23} } +func (*Time) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{27} } func (m *Timestamp) Reset() { *m = Timestamp{} } func (*Timestamp) ProtoMessage() {} -func (*Timestamp) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{24} } +func (*Timestamp) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{28} } func (m *TypeMeta) Reset() { *m = TypeMeta{} } func (*TypeMeta) ProtoMessage() {} -func (*TypeMeta) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{25} } +func (*TypeMeta) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{29} } func (m *Verbs) Reset() { *m = Verbs{} } func (*Verbs) ProtoMessage() {} -func (*Verbs) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{26} } +func (*Verbs) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{30} } func (m *WatchEvent) Reset() { *m = WatchEvent{} } func (*WatchEvent) ProtoMessage() {} -func (*WatchEvent) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{27} } +func (*WatchEvent) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{31} } func init() { proto.RegisterType((*APIGroup)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.APIGroup") @@ -202,6 +222,7 @@ func init() { proto.RegisterType((*APIResource)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.APIResource") proto.RegisterType((*APIResourceList)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.APIResourceList") proto.RegisterType((*APIVersions)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.APIVersions") + proto.RegisterType((*DeleteOptions)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.DeleteOptions") proto.RegisterType((*Duration)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.Duration") proto.RegisterType((*ExportOptions)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.ExportOptions") proto.RegisterType((*GetOptions)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.GetOptions") @@ -214,7 +235,10 @@ func init() { proto.RegisterType((*LabelSelector)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector") proto.RegisterType((*LabelSelectorRequirement)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelectorRequirement") proto.RegisterType((*ListMeta)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta") + proto.RegisterType((*ListOptions)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.ListOptions") + proto.RegisterType((*ObjectMeta)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta") proto.RegisterType((*OwnerReference)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.OwnerReference") + proto.RegisterType((*Preconditions)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.Preconditions") proto.RegisterType((*RootPaths)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.RootPaths") proto.RegisterType((*ServerAddressByClientCIDR)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.ServerAddressByClientCIDR") proto.RegisterType((*Status)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.Status") @@ -433,6 +457,49 @@ func (m *APIVersions) MarshalTo(data []byte) (int, error) { return i, nil } +func (m *DeleteOptions) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *DeleteOptions) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.GracePeriodSeconds != nil { + data[i] = 0x8 + i++ + i = encodeVarintGenerated(data, i, uint64(*m.GracePeriodSeconds)) + } + if m.Preconditions != nil { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(m.Preconditions.Size())) + n3, err := m.Preconditions.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n3 + } + if m.OrphanDependents != nil { + data[i] = 0x18 + i++ + if *m.OrphanDependents { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + } + return i, nil +} + func (m *Duration) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) @@ -788,6 +855,182 @@ func (m *ListMeta) MarshalTo(data []byte) (int, error) { return i, nil } +func (m *ListOptions) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ListOptions) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.LabelSelector))) + i += copy(data[i:], m.LabelSelector) + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.FieldSelector))) + i += copy(data[i:], m.FieldSelector) + data[i] = 0x18 + i++ + if m.Watch { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + data[i] = 0x22 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.ResourceVersion))) + i += copy(data[i:], m.ResourceVersion) + if m.TimeoutSeconds != nil { + data[i] = 0x28 + i++ + i = encodeVarintGenerated(data, i, uint64(*m.TimeoutSeconds)) + } + return i, nil +} + +func (m *ObjectMeta) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ObjectMeta) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Name))) + i += copy(data[i:], m.Name) + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.GenerateName))) + i += copy(data[i:], m.GenerateName) + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Namespace))) + i += copy(data[i:], m.Namespace) + data[i] = 0x22 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.SelfLink))) + i += copy(data[i:], m.SelfLink) + data[i] = 0x2a + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.UID))) + i += copy(data[i:], m.UID) + data[i] = 0x32 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.ResourceVersion))) + i += copy(data[i:], m.ResourceVersion) + data[i] = 0x38 + i++ + i = encodeVarintGenerated(data, i, uint64(m.Generation)) + data[i] = 0x42 + i++ + i = encodeVarintGenerated(data, i, uint64(m.CreationTimestamp.Size())) + n4, err := m.CreationTimestamp.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n4 + if m.DeletionTimestamp != nil { + data[i] = 0x4a + i++ + i = encodeVarintGenerated(data, i, uint64(m.DeletionTimestamp.Size())) + n5, err := m.DeletionTimestamp.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n5 + } + if m.DeletionGracePeriodSeconds != nil { + data[i] = 0x50 + i++ + i = encodeVarintGenerated(data, i, uint64(*m.DeletionGracePeriodSeconds)) + } + if len(m.Labels) > 0 { + for k := range m.Labels { + data[i] = 0x5a + i++ + v := m.Labels[k] + mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) + i = encodeVarintGenerated(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + if len(m.Annotations) > 0 { + for k := range m.Annotations { + data[i] = 0x62 + i++ + v := m.Annotations[k] + mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) + i = encodeVarintGenerated(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + if len(m.OwnerReferences) > 0 { + for _, msg := range m.OwnerReferences { + data[i] = 0x6a + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Finalizers) > 0 { + for _, s := range m.Finalizers { + data[i] = 0x72 + i++ + l = len(s) + for l >= 1<<7 { + data[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + data[i] = uint8(l) + i++ + i += copy(data[i:], s) + } + } + data[i] = 0x7a + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.ClusterName))) + i += copy(data[i:], m.ClusterName) + return i, nil +} + func (m *OwnerReference) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) @@ -832,6 +1075,30 @@ func (m *OwnerReference) MarshalTo(data []byte) (int, error) { return i, nil } +func (m *Preconditions) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Preconditions) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.UID != nil { + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(*m.UID))) + i += copy(data[i:], *m.UID) + } + return i, nil +} + func (m *RootPaths) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) @@ -909,11 +1176,11 @@ func (m *Status) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n3, err := m.ListMeta.MarshalTo(data[i:]) + n6, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n3 + i += n6 data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(len(m.Status))) @@ -930,11 +1197,11 @@ func (m *Status) MarshalTo(data []byte) (int, error) { data[i] = 0x2a i++ i = encodeVarintGenerated(data, i, uint64(m.Details.Size())) - n4, err := m.Details.MarshalTo(data[i:]) + n7, err := m.Details.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n4 + i += n7 } data[i] = 0x30 i++ @@ -1122,11 +1389,11 @@ func (m *WatchEvent) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.Object.Size())) - n5, err := m.Object.MarshalTo(data[i:]) + n8, err := m.Object.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n5 + i += n8 return i, nil } @@ -1238,6 +1505,22 @@ func (m *APIVersions) Size() (n int) { return n } +func (m *DeleteOptions) Size() (n int) { + var l int + _ = l + if m.GracePeriodSeconds != nil { + n += 1 + sovGenerated(uint64(*m.GracePeriodSeconds)) + } + if m.Preconditions != nil { + l = m.Preconditions.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.OrphanDependents != nil { + n += 2 + } + return n +} + func (m *Duration) Size() (n int) { var l int _ = l @@ -1371,6 +1654,80 @@ func (m *ListMeta) Size() (n int) { return n } +func (m *ListOptions) Size() (n int) { + var l int + _ = l + l = len(m.LabelSelector) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.FieldSelector) + n += 1 + l + sovGenerated(uint64(l)) + n += 2 + l = len(m.ResourceVersion) + n += 1 + l + sovGenerated(uint64(l)) + if m.TimeoutSeconds != nil { + n += 1 + sovGenerated(uint64(*m.TimeoutSeconds)) + } + return n +} + +func (m *ObjectMeta) Size() (n int) { + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.GenerateName) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Namespace) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.SelfLink) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.UID) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.ResourceVersion) + n += 1 + l + sovGenerated(uint64(l)) + n += 1 + sovGenerated(uint64(m.Generation)) + l = m.CreationTimestamp.Size() + n += 1 + l + sovGenerated(uint64(l)) + if m.DeletionTimestamp != nil { + l = m.DeletionTimestamp.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.DeletionGracePeriodSeconds != nil { + n += 1 + sovGenerated(uint64(*m.DeletionGracePeriodSeconds)) + } + if len(m.Labels) > 0 { + for k, v := range m.Labels { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) + n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) + } + } + if len(m.Annotations) > 0 { + for k, v := range m.Annotations { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) + n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) + } + } + if len(m.OwnerReferences) > 0 { + for _, e := range m.OwnerReferences { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.Finalizers) > 0 { + for _, s := range m.Finalizers { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + l = len(m.ClusterName) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + func (m *OwnerReference) Size() (n int) { var l int _ = l @@ -1388,6 +1745,16 @@ func (m *OwnerReference) Size() (n int) { return n } +func (m *Preconditions) Size() (n int) { + var l int + _ = l + if m.UID != nil { + l = len(*m.UID) + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + func (m *RootPaths) Size() (n int) { var l int _ = l @@ -1560,6 +1927,18 @@ func (this *APIResourceList) String() string { }, "") return s } +func (this *DeleteOptions) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeleteOptions{`, + `GracePeriodSeconds:` + valueToStringGenerated(this.GracePeriodSeconds) + `,`, + `Preconditions:` + strings.Replace(fmt.Sprintf("%v", this.Preconditions), "Preconditions", "Preconditions", 1) + `,`, + `OrphanDependents:` + valueToStringGenerated(this.OrphanDependents) + `,`, + `}`, + }, "") + return s +} func (this *Duration) String() string { if this == nil { return "nil" @@ -1646,6 +2025,64 @@ func (this *ListMeta) String() string { }, "") return s } +func (this *ListOptions) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ListOptions{`, + `LabelSelector:` + fmt.Sprintf("%v", this.LabelSelector) + `,`, + `FieldSelector:` + fmt.Sprintf("%v", this.FieldSelector) + `,`, + `Watch:` + fmt.Sprintf("%v", this.Watch) + `,`, + `ResourceVersion:` + fmt.Sprintf("%v", this.ResourceVersion) + `,`, + `TimeoutSeconds:` + valueToStringGenerated(this.TimeoutSeconds) + `,`, + `}`, + }, "") + return s +} +func (this *ObjectMeta) String() string { + if this == nil { + return "nil" + } + keysForLabels := make([]string, 0, len(this.Labels)) + for k := range this.Labels { + keysForLabels = append(keysForLabels, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) + mapStringForLabels := "map[string]string{" + for _, k := range keysForLabels { + mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) + } + mapStringForLabels += "}" + keysForAnnotations := make([]string, 0, len(this.Annotations)) + for k := range this.Annotations { + keysForAnnotations = append(keysForAnnotations, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations) + mapStringForAnnotations := "map[string]string{" + for _, k := range keysForAnnotations { + mapStringForAnnotations += fmt.Sprintf("%v: %v,", k, this.Annotations[k]) + } + mapStringForAnnotations += "}" + s := strings.Join([]string{`&ObjectMeta{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `GenerateName:` + fmt.Sprintf("%v", this.GenerateName) + `,`, + `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, + `SelfLink:` + fmt.Sprintf("%v", this.SelfLink) + `,`, + `UID:` + fmt.Sprintf("%v", this.UID) + `,`, + `ResourceVersion:` + fmt.Sprintf("%v", this.ResourceVersion) + `,`, + `Generation:` + fmt.Sprintf("%v", this.Generation) + `,`, + `CreationTimestamp:` + strings.Replace(strings.Replace(this.CreationTimestamp.String(), "Time", "Time", 1), `&`, ``, 1) + `,`, + `DeletionTimestamp:` + strings.Replace(fmt.Sprintf("%v", this.DeletionTimestamp), "Time", "Time", 1) + `,`, + `DeletionGracePeriodSeconds:` + valueToStringGenerated(this.DeletionGracePeriodSeconds) + `,`, + `Labels:` + mapStringForLabels + `,`, + `Annotations:` + mapStringForAnnotations + `,`, + `OwnerReferences:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.OwnerReferences), "OwnerReference", "OwnerReference", 1), `&`, ``, 1) + `,`, + `Finalizers:` + fmt.Sprintf("%v", this.Finalizers) + `,`, + `ClusterName:` + fmt.Sprintf("%v", this.ClusterName) + `,`, + `}`, + }, "") + return s +} func (this *OwnerReference) String() string { if this == nil { return "nil" @@ -1660,6 +2097,16 @@ func (this *OwnerReference) String() string { }, "") return s } +func (this *Preconditions) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Preconditions{`, + `UID:` + valueToStringGenerated(this.UID) + `,`, + `}`, + }, "") + return s +} func (this *RootPaths) String() string { if this == nil { return "nil" @@ -2396,6 +2843,130 @@ func (m *APIVersions) Unmarshal(data []byte) error { } return nil } +func (m *DeleteOptions) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeleteOptions: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeleteOptions: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GracePeriodSeconds", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.GracePeriodSeconds = &v + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Preconditions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Preconditions == nil { + m.Preconditions = &Preconditions{} + } + if err := m.Preconditions.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OrphanDependents", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.OrphanDependents = &b + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *Duration) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 @@ -3777,6 +4348,820 @@ func (m *ListMeta) Unmarshal(data []byte) error { } return nil } +func (m *ListOptions) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ListOptions: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListOptions: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LabelSelector", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LabelSelector = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldSelector", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldSelector = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Watch", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Watch = bool(v != 0) + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ResourceVersion = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeoutSeconds", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TimeoutSeconds = &v + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ObjectMeta) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ObjectMeta: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ObjectMeta: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GenerateName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GenerateName = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Namespace = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SelfLink", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SelfLink = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UID = k8s_io_apimachinery_pkg_types.UID(data[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ResourceVersion = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Generation", wireType) + } + m.Generation = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Generation |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CreationTimestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.CreationTimestamp.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeletionTimestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.DeletionTimestamp == nil { + m.DeletionTimestamp = &Time{} + } + if err := m.DeletionTimestamp.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DeletionGracePeriodSeconds", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.DeletionGracePeriodSeconds = &v + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(data[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + if m.Labels == nil { + m.Labels = make(map[string]string) + } + m.Labels[mapkey] = mapvalue + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(data[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + if m.Annotations == nil { + m.Annotations = make(map[string]string) + } + m.Annotations[mapkey] = mapvalue + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerReferences", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerReferences = append(m.OwnerReferences, OwnerReference{}) + if err := m.OwnerReferences[len(m.OwnerReferences)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Finalizers", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Finalizers = append(m.Finalizers, string(data[iNdEx:postIndex])) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClusterName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClusterName = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *OwnerReference) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 @@ -3964,6 +5349,86 @@ func (m *OwnerReference) Unmarshal(data []byte) error { } return nil } +func (m *Preconditions) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Preconditions: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Preconditions: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := k8s_io_apimachinery_pkg_types.UID(data[iNdEx:postIndex]) + m.UID = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *RootPaths) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 @@ -5184,107 +6649,136 @@ var ( ) var fileDescriptorGenerated = []byte{ - // 1628 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x58, 0xcf, 0x6f, 0x1b, 0xc5, - 0x17, 0xf7, 0xda, 0xb1, 0x6b, 0x3f, 0xc7, 0x4d, 0xba, 0xdf, 0x54, 0x5f, 0x37, 0xd2, 0xd7, 0x4e, - 0xb7, 0xd5, 0x57, 0xa9, 0x68, 0xd7, 0x24, 0x48, 0x55, 0x55, 0x44, 0x51, 0x36, 0x49, 0xab, 0xa8, - 0x49, 0x13, 0x4d, 0xda, 0x20, 0x4a, 0x0f, 0x6c, 0xbc, 0x13, 0x67, 0x89, 0xbd, 0xbb, 0xcc, 0x8c, - 0xdd, 0x58, 0x3d, 0xd0, 0x03, 0x48, 0x1c, 0x10, 0xea, 0x91, 0x03, 0x42, 0xad, 0xe0, 0x2f, 0xe0, - 0x9f, 0xa0, 0xc7, 0x4a, 0xbd, 0x70, 0x40, 0x16, 0x0d, 0x07, 0x8e, 0xdc, 0x23, 0x0e, 0x68, 0x66, - 0x67, 0xd6, 0x6b, 0xa7, 0x26, 0x1b, 0xd1, 0x03, 0xa7, 0x78, 0xde, 0x8f, 0xcf, 0x7b, 0xf3, 0xe6, - 0x33, 0x6f, 0xde, 0x06, 0xd6, 0xf6, 0xae, 0x51, 0xd3, 0xf5, 0x6b, 0x7b, 0xed, 0x6d, 0x4c, 0x3c, - 0xcc, 0x30, 0xad, 0x75, 0xb0, 0xe7, 0xf8, 0xa4, 0x26, 0x15, 0x76, 0xe0, 0xb6, 0xec, 0xfa, 0xae, - 0xeb, 0x61, 0xd2, 0xad, 0x05, 0x7b, 0x0d, 0x2e, 0xa0, 0xb5, 0x16, 0x66, 0x76, 0xad, 0x33, 0x57, - 0x6b, 0x60, 0x0f, 0x13, 0x9b, 0x61, 0xc7, 0x0c, 0x88, 0xcf, 0x7c, 0xfd, 0x62, 0xe8, 0x65, 0xc6, - 0xbd, 0xcc, 0x60, 0xaf, 0xc1, 0x05, 0xd4, 0xe4, 0x5e, 0x66, 0x67, 0x6e, 0xfa, 0x4a, 0xc3, 0x65, - 0xbb, 0xed, 0x6d, 0xb3, 0xee, 0xb7, 0x6a, 0x0d, 0xbf, 0xe1, 0xd7, 0x84, 0xf3, 0x76, 0x7b, 0x47, - 0xac, 0xc4, 0x42, 0xfc, 0x0a, 0x41, 0xa7, 0x47, 0xa6, 0x42, 0xda, 0x1e, 0x73, 0x5b, 0x78, 0x38, - 0x8b, 0xe9, 0xab, 0xc7, 0x39, 0xd0, 0xfa, 0x2e, 0x6e, 0xd9, 0x47, 0xfc, 0xe6, 0x8f, 0x16, 0x43, - 0xee, 0xb8, 0x46, 0x30, 0xf5, 0xdb, 0xa4, 0x7e, 0x34, 0xd6, 0xdc, 0xeb, 0x7d, 0xda, 0xcc, 0x6d, - 0xd6, 0x5c, 0x8f, 0x51, 0x46, 0x86, 0x5d, 0x8c, 0x9f, 0x32, 0x90, 0x5f, 0xd8, 0x58, 0xb9, 0x45, - 0xfc, 0x76, 0xa0, 0xcf, 0xc0, 0x98, 0x67, 0xb7, 0x70, 0x59, 0x9b, 0xd1, 0x66, 0x0b, 0xd6, 0xf8, - 0xf3, 0x5e, 0x35, 0x75, 0xd0, 0xab, 0x8e, 0xdd, 0xb1, 0x5b, 0x18, 0x09, 0x8d, 0xde, 0x84, 0x7c, - 0x07, 0x13, 0xea, 0xfa, 0x1e, 0x2d, 0xa7, 0x67, 0x32, 0xb3, 0xc5, 0xf9, 0x1b, 0x66, 0x92, 0x32, - 0x9b, 0x22, 0xc0, 0x56, 0xe8, 0x7a, 0xd3, 0x27, 0x4b, 0x2e, 0xad, 0xfb, 0x1d, 0x4c, 0xba, 0xd6, - 0xa4, 0x8c, 0x92, 0x97, 0x4a, 0x8a, 0xa2, 0x08, 0xfa, 0xe7, 0x1a, 0x4c, 0x06, 0x04, 0xef, 0x60, - 0x42, 0xb0, 0x23, 0xf5, 0xe5, 0xcc, 0x8c, 0xf6, 0x06, 0xc2, 0x96, 0x65, 0xd8, 0xc9, 0x8d, 0x21, - 0x7c, 0x74, 0x24, 0xa2, 0xfe, 0xbd, 0x06, 0xd3, 0x14, 0x93, 0x0e, 0x26, 0x0b, 0x8e, 0x43, 0x30, - 0xa5, 0x56, 0x77, 0xb1, 0xe9, 0x62, 0x8f, 0x2d, 0xae, 0x2c, 0x21, 0x5a, 0x1e, 0x13, 0x75, 0x78, - 0x3f, 0x59, 0x42, 0x9b, 0xa3, 0x70, 0x2c, 0x43, 0x66, 0x34, 0x3d, 0xd2, 0x84, 0xa2, 0xbf, 0x49, - 0xc3, 0xd8, 0x81, 0x71, 0x75, 0x90, 0xab, 0x2e, 0x65, 0xfa, 0x16, 0xe4, 0x1a, 0x7c, 0x41, 0xcb, - 0x9a, 0x48, 0xd0, 0x4c, 0x96, 0xa0, 0xc2, 0xb0, 0x4e, 0xcb, 0x7c, 0x72, 0x62, 0x49, 0x91, 0x44, - 0x33, 0x5e, 0x6a, 0x50, 0x5c, 0xd8, 0x58, 0x41, 0x92, 0x84, 0x09, 0x48, 0x33, 0x0f, 0xc0, 0xff, - 0xd2, 0xc0, 0xae, 0x63, 0xa7, 0x9c, 0x9e, 0xd1, 0x66, 0xf3, 0x96, 0x2e, 0xed, 0xe0, 0x4e, 0xa4, - 0x41, 0x31, 0x2b, 0x8e, 0xba, 0xe7, 0x7a, 0x8e, 0x38, 0xed, 0x18, 0xea, 0x6d, 0xd7, 0x73, 0x90, - 0xd0, 0xe8, 0xab, 0x90, 0xed, 0x60, 0xb2, 0xcd, 0xeb, 0xcf, 0x09, 0xf1, 0x56, 0xb2, 0xed, 0x6d, - 0x71, 0x17, 0xab, 0x70, 0xd0, 0xab, 0x66, 0xc5, 0x4f, 0x14, 0x82, 0x18, 0x3f, 0x6a, 0x30, 0x11, - 0xdb, 0x95, 0xa8, 0xe0, 0x35, 0x18, 0x6f, 0xc4, 0xf8, 0x23, 0x77, 0x38, 0x25, 0x73, 0x19, 0x8f, - 0x73, 0x0b, 0x0d, 0x58, 0xea, 0x18, 0x0a, 0xea, 0x92, 0xaa, 0x7b, 0x32, 0x97, 0xb8, 0xfc, 0x2a, - 0x87, 0x7e, 0xa4, 0x98, 0x90, 0xa2, 0x3e, 0xb2, 0xf1, 0x7b, 0x78, 0x14, 0xea, 0xe6, 0xe8, 0xb3, - 0xb1, 0xdb, 0xc9, 0x0f, 0xbd, 0x60, 0x8d, 0x8f, 0xb8, 0x59, 0xc7, 0x50, 0x3a, 0xfd, 0xaf, 0xa0, - 0xf4, 0xf5, 0xfc, 0x37, 0x4f, 0xab, 0xa9, 0xc7, 0xbf, 0xcc, 0xa4, 0x8c, 0x15, 0xc8, 0x2f, 0xb5, - 0x89, 0xcd, 0x78, 0x71, 0xdf, 0x83, 0xbc, 0x23, 0x7f, 0x8b, 0x23, 0xc9, 0x58, 0xe7, 0x55, 0x0f, - 0x51, 0x36, 0x87, 0xbd, 0x6a, 0x89, 0x37, 0x57, 0x53, 0x09, 0x50, 0xe4, 0x62, 0x3c, 0x80, 0xd2, - 0xf2, 0x7e, 0xe0, 0x13, 0xb6, 0x1e, 0x30, 0x51, 0x8b, 0xff, 0x43, 0x0e, 0x0b, 0x81, 0x40, 0xcb, - 0xf7, 0x89, 0x1f, 0x9a, 0x21, 0xa9, 0xd5, 0x2f, 0x40, 0x16, 0xef, 0xdb, 0x75, 0x26, 0x19, 0x5c, - 0x92, 0x66, 0xd9, 0x65, 0x2e, 0x44, 0xa1, 0xce, 0x58, 0x07, 0xb8, 0x85, 0x23, 0xe8, 0x05, 0x98, - 0x50, 0xa7, 0x35, 0x48, 0xa2, 0xff, 0x4a, 0xe7, 0x09, 0x34, 0xa8, 0x46, 0xc3, 0xf6, 0xc6, 0x03, - 0x28, 0x08, 0xa2, 0x71, 0xe6, 0xf3, 0x14, 0x04, 0xcf, 0x24, 0x4a, 0x94, 0x82, 0xb0, 0x40, 0xa1, - 0x2e, 0xba, 0x3a, 0xe9, 0x51, 0x57, 0x27, 0x56, 0xd7, 0x26, 0x94, 0x42, 0x5f, 0x75, 0x9b, 0x13, - 0x45, 0xb8, 0x0c, 0x79, 0x95, 0xa6, 0x8c, 0x12, 0x75, 0x71, 0x05, 0x84, 0x22, 0x8b, 0x58, 0xb4, - 0x5d, 0x18, 0xb8, 0x34, 0xc9, 0x82, 0x5d, 0x82, 0x53, 0x92, 0xb6, 0x32, 0xd6, 0x84, 0x34, 0x3b, - 0xa5, 0x6a, 0xa6, 0xf4, 0xb1, 0x48, 0x9f, 0x41, 0x79, 0x54, 0xeb, 0xff, 0x07, 0xd7, 0x3a, 0x79, - 0x2a, 0xc6, 0xd7, 0x1a, 0x4c, 0xc6, 0x91, 0x92, 0x1f, 0x5f, 0xf2, 0x20, 0xc7, 0x37, 0xc9, 0x58, - 0x45, 0xbe, 0xd3, 0x60, 0x6a, 0x60, 0x6b, 0x27, 0x3a, 0xf1, 0x13, 0x24, 0x15, 0x27, 0x47, 0xe6, - 0x04, 0xe4, 0x78, 0x99, 0x86, 0xd2, 0xaa, 0xbd, 0x8d, 0x9b, 0x9b, 0xb8, 0x89, 0xeb, 0xcc, 0x27, - 0xfa, 0x23, 0x28, 0xb6, 0x6c, 0x56, 0xdf, 0x15, 0x52, 0xf5, 0x8c, 0x2d, 0x25, 0x6b, 0x4a, 0x03, - 0x48, 0xe6, 0x5a, 0x1f, 0x66, 0xd9, 0x63, 0xa4, 0x6b, 0xfd, 0x47, 0xa6, 0x54, 0x8c, 0x69, 0x50, - 0x3c, 0x9a, 0x98, 0x3d, 0xc4, 0x7a, 0x79, 0x3f, 0xe0, 0x9d, 0xe9, 0xe4, 0x23, 0xcf, 0x40, 0x0a, - 0x08, 0x7f, 0xda, 0x76, 0x09, 0x6e, 0x61, 0x8f, 0xf5, 0x67, 0x8f, 0xb5, 0x21, 0x7c, 0x74, 0x24, - 0xe2, 0xf4, 0x0d, 0x98, 0x1c, 0x4e, 0x5e, 0x9f, 0x84, 0xcc, 0x1e, 0xee, 0x86, 0xe7, 0x85, 0xf8, - 0x4f, 0x7d, 0x0a, 0xb2, 0x1d, 0xbb, 0xd9, 0x96, 0xb7, 0x11, 0x85, 0x8b, 0xeb, 0xe9, 0x6b, 0x9a, - 0xf1, 0x83, 0x06, 0xe5, 0x51, 0x89, 0xe8, 0xff, 0x8b, 0x01, 0x59, 0x45, 0x99, 0x55, 0xe6, 0x36, - 0xee, 0x86, 0xa8, 0xcb, 0x90, 0xf7, 0x03, 0x3e, 0x2d, 0xfa, 0x44, 0x9e, 0xfa, 0x25, 0x75, 0x92, - 0xeb, 0x52, 0x7e, 0xd8, 0xab, 0x9e, 0x1d, 0x80, 0x57, 0x0a, 0x14, 0xb9, 0xea, 0x06, 0xe4, 0x44, - 0x3e, 0xb4, 0x9c, 0x11, 0x6f, 0x12, 0xf0, 0xde, 0xba, 0x25, 0x24, 0x48, 0x6a, 0x8c, 0x47, 0x90, - 0xe7, 0x4f, 0xee, 0x1a, 0x66, 0x36, 0x27, 0x10, 0xc5, 0xcd, 0x9d, 0x55, 0xd7, 0xdb, 0x93, 0xa9, - 0x45, 0x04, 0xda, 0x94, 0x72, 0x14, 0x59, 0xbc, 0xae, 0xc5, 0xa6, 0x4f, 0xd8, 0x62, 0xff, 0xd4, - 0xe0, 0xf4, 0xfa, 0x43, 0x0f, 0x13, 0xc4, 0x07, 0x3f, 0xec, 0x85, 0x43, 0x8d, 0xb8, 0x59, 0xda, - 0xc8, 0xf1, 0x43, 0x8d, 0x3d, 0x99, 0x91, 0x63, 0x8f, 0x05, 0x99, 0xb6, 0xeb, 0x88, 0xf1, 0xa4, - 0x60, 0xbd, 0xad, 0xaa, 0x7b, 0x6f, 0x65, 0xe9, 0xb0, 0x57, 0x3d, 0x3f, 0xea, 0xab, 0x80, 0x75, - 0x03, 0x4c, 0xcd, 0x7b, 0x2b, 0x4b, 0x88, 0x3b, 0xf3, 0xd1, 0xc9, 0x0e, 0x5c, 0xb5, 0xb1, 0xac, - 0x80, 0x8a, 0x46, 0xa7, 0xfe, 0xd3, 0x8f, 0x62, 0x56, 0xba, 0x09, 0x50, 0xf7, 0x3d, 0x46, 0xfc, - 0x66, 0x13, 0x93, 0x72, 0x2e, 0x7c, 0xd3, 0xb8, 0xfd, 0x62, 0x24, 0x45, 0x31, 0x0b, 0xe3, 0x32, - 0x14, 0x90, 0xef, 0xb3, 0x0d, 0x9b, 0xed, 0x52, 0xbd, 0x0a, 0xd9, 0x80, 0xff, 0x90, 0xf3, 0x83, - 0x18, 0x94, 0x84, 0x06, 0x85, 0x72, 0xe3, 0x2b, 0x0d, 0xce, 0x8d, 0x7c, 0xce, 0x79, 0xbe, 0xf5, - 0x68, 0x25, 0xab, 0x17, 0xe5, 0xdb, 0xb7, 0x43, 0x31, 0x2b, 0xfd, 0x5d, 0x28, 0x0d, 0xcc, 0x00, - 0xf2, 0xfc, 0xce, 0x4a, 0xb7, 0xd2, 0x40, 0x34, 0x34, 0x68, 0x6b, 0xfc, 0x91, 0x86, 0xdc, 0x26, - 0xb3, 0x59, 0x9b, 0xea, 0x0f, 0x20, 0xcf, 0xaf, 0x9e, 0x63, 0x33, 0x5b, 0x44, 0x4e, 0x3c, 0xf2, - 0x2a, 0xe6, 0xf5, 0x79, 0xa6, 0x24, 0x28, 0x42, 0xe4, 0x53, 0x02, 0x15, 0x71, 0x64, 0x7a, 0xd1, - 0x94, 0x10, 0x46, 0x47, 0x52, 0xcb, 0x3b, 0x65, 0x0b, 0x53, 0x6a, 0x37, 0x14, 0x35, 0xa2, 0x4e, - 0xb9, 0x16, 0x8a, 0x91, 0xd2, 0xeb, 0x57, 0x21, 0x47, 0xb0, 0x4d, 0x7d, 0x4f, 0x72, 0xa4, 0xa2, - 0x20, 0x91, 0x90, 0x1e, 0xf6, 0xaa, 0xe3, 0x12, 0x5c, 0xac, 0x91, 0xb4, 0xd6, 0xef, 0xc3, 0x29, - 0x07, 0x33, 0xdb, 0x6d, 0x52, 0xc1, 0x88, 0xe2, 0xfc, 0x3b, 0x09, 0x07, 0x35, 0x01, 0xb6, 0x14, - 0xba, 0x5a, 0x45, 0x9e, 0x93, 0x5c, 0x20, 0x05, 0xc8, 0x69, 0x5d, 0xf7, 0x1d, 0x2c, 0x68, 0x93, - 0xed, 0xd3, 0x7a, 0xd1, 0x77, 0x30, 0x12, 0x1a, 0xe3, 0x89, 0x06, 0xc5, 0x10, 0x69, 0xd1, 0x6e, - 0x53, 0xac, 0xcf, 0x45, 0xbb, 0x08, 0x8f, 0xfb, 0x9c, 0xf2, 0xb9, 0xdb, 0x0d, 0xf0, 0x61, 0xaf, - 0x5a, 0x10, 0x66, 0x7c, 0x11, 0x6d, 0x20, 0x56, 0xa3, 0xf4, 0x31, 0x35, 0xba, 0x00, 0xd9, 0x1d, - 0x17, 0x37, 0xd5, 0x1b, 0x17, 0xbd, 0x4e, 0x37, 0xb9, 0x10, 0x85, 0x3a, 0xe3, 0xdb, 0x34, 0x94, - 0x06, 0x36, 0x97, 0xe0, 0xa3, 0x24, 0x7a, 0xf6, 0xd2, 0x09, 0x46, 0xa9, 0xd1, 0x5f, 0x21, 0x1f, - 0x42, 0xae, 0xce, 0xf7, 0xa7, 0x3e, 0x03, 0xe7, 0x4e, 0x72, 0x14, 0xa2, 0x32, 0x7d, 0x26, 0x89, - 0x25, 0x45, 0x12, 0x50, 0xbf, 0x05, 0x67, 0x08, 0x66, 0xa4, 0xbb, 0xb0, 0xc3, 0x30, 0xd9, 0xc4, - 0x75, 0xdf, 0x73, 0xc2, 0x03, 0xcf, 0x46, 0x35, 0x3e, 0x83, 0x86, 0x0d, 0xd0, 0x51, 0x1f, 0xa3, - 0x09, 0x63, 0x77, 0xdd, 0x16, 0xe6, 0x65, 0xa7, 0x12, 0x26, 0x9c, 0x9b, 0xa3, 0xb2, 0x2b, 0x67, - 0xa5, 0xe7, 0xd5, 0xf1, 0x6c, 0xcf, 0x0f, 0xc9, 0x9e, 0xed, 0x57, 0xe7, 0x0e, 0x17, 0xa2, 0x50, - 0x77, 0x7d, 0x8a, 0xbf, 0xdd, 0x5f, 0x3e, 0xab, 0xa6, 0x9e, 0x3c, 0xab, 0xa6, 0x9e, 0x3e, 0x93, - 0xef, 0xf8, 0x47, 0x50, 0xe0, 0xd1, 0x28, 0xb3, 0x5b, 0xc1, 0x9b, 0x0e, 0x69, 0x7c, 0x0c, 0x79, - 0xce, 0x24, 0xf1, 0x4e, 0x1c, 0xdf, 0xa3, 0x07, 0xbb, 0x67, 0x3a, 0x49, 0xf7, 0x34, 0xe6, 0x21, - 0xfc, 0x30, 0xe4, 0x9d, 0xd0, 0x65, 0xb8, 0x35, 0xd0, 0x09, 0x57, 0xb8, 0x00, 0x85, 0xf2, 0xd8, - 0xe8, 0xf2, 0x85, 0x06, 0xf0, 0x81, 0x78, 0xb9, 0x3b, 0xfc, 0x59, 0x9d, 0x81, 0x31, 0xde, 0xc6, - 0x87, 0x13, 0x13, 0x57, 0x40, 0x68, 0xf4, 0x7b, 0x90, 0xf3, 0xb7, 0x3f, 0xc1, 0xf2, 0x5b, 0xa2, - 0x38, 0x7f, 0x65, 0x24, 0x6b, 0xe4, 0x7f, 0x89, 0x4c, 0x64, 0x3f, 0x5c, 0xde, 0x67, 0xd8, 0xe3, - 0x39, 0xf6, 0x19, 0xb3, 0x2e, 0x40, 0x90, 0x04, 0xb3, 0x2e, 0x3e, 0x7f, 0x55, 0x49, 0xbd, 0x78, - 0x55, 0x49, 0xfd, 0xfc, 0xaa, 0x92, 0x7a, 0x7c, 0x50, 0xd1, 0x9e, 0x1f, 0x54, 0xb4, 0x17, 0x07, - 0x15, 0xed, 0xd7, 0x83, 0x8a, 0xf6, 0xe4, 0xb7, 0x4a, 0xea, 0x7e, 0xba, 0x33, 0xf7, 0x57, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x1f, 0xa7, 0xfc, 0x28, 0x67, 0x13, 0x00, 0x00, + // 2089 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x19, 0x4d, 0x6f, 0x23, 0x49, + 0x35, 0xed, 0xc4, 0x1e, 0xfb, 0x39, 0xce, 0x47, 0x91, 0x01, 0x6f, 0x24, 0xec, 0x6c, 0xef, 0x0a, + 0xcd, 0xc2, 0xac, 0x4d, 0x02, 0xac, 0x86, 0x01, 0x06, 0xe2, 0x38, 0x13, 0x45, 0x3b, 0x99, 0x44, + 0x95, 0x9d, 0x41, 0x2c, 0x23, 0x44, 0xc7, 0x5d, 0x71, 0x9a, 0xb4, 0xbb, 0x9b, 0xaa, 0xb2, 0x27, + 0x61, 0x0f, 0xac, 0x04, 0x08, 0x0e, 0x08, 0xcd, 0x91, 0x03, 0x42, 0x3b, 0x82, 0x1b, 0x37, 0xfe, + 0x04, 0x73, 0x5c, 0x69, 0x2f, 0x1c, 0x90, 0xc5, 0x84, 0x03, 0x47, 0xee, 0x11, 0x07, 0x54, 0xd5, + 0x55, 0xfd, 0x61, 0xc7, 0x9b, 0x36, 0xbb, 0x87, 0x3d, 0xc5, 0xf5, 0xbe, 0xbf, 0xea, 0xbd, 0x57, + 0x1d, 0xd8, 0x3b, 0xbd, 0xc3, 0x1a, 0x8e, 0xdf, 0x3c, 0xed, 0x1f, 0x11, 0xea, 0x11, 0x4e, 0x58, + 0x73, 0x40, 0x3c, 0xdb, 0xa7, 0x4d, 0x85, 0xb0, 0x02, 0xa7, 0x67, 0x75, 0x4e, 0x1c, 0x8f, 0xd0, + 0xf3, 0x66, 0x70, 0xda, 0x15, 0x00, 0xd6, 0xec, 0x11, 0x6e, 0x35, 0x07, 0xeb, 0xcd, 0x2e, 0xf1, + 0x08, 0xb5, 0x38, 0xb1, 0x1b, 0x01, 0xf5, 0xb9, 0x8f, 0x5e, 0x0f, 0xb9, 0x1a, 0x49, 0xae, 0x46, + 0x70, 0xda, 0x15, 0x00, 0xd6, 0x10, 0x5c, 0x8d, 0xc1, 0xfa, 0xea, 0x9b, 0x5d, 0x87, 0x9f, 0xf4, + 0x8f, 0x1a, 0x1d, 0xbf, 0xd7, 0xec, 0xfa, 0x5d, 0xbf, 0x29, 0x99, 0x8f, 0xfa, 0xc7, 0xf2, 0x24, + 0x0f, 0xf2, 0x57, 0x28, 0x74, 0x75, 0xa2, 0x29, 0xb4, 0xef, 0x71, 0xa7, 0x47, 0x46, 0xad, 0x58, + 0x7d, 0xeb, 0x3a, 0x06, 0xd6, 0x39, 0x21, 0x3d, 0x6b, 0x8c, 0x6f, 0x63, 0x3c, 0x18, 0xca, 0xe3, + 0x26, 0x25, 0xcc, 0xef, 0xd3, 0xce, 0xb8, 0xae, 0xf5, 0xab, 0x79, 0xfa, 0xdc, 0x71, 0x9b, 0x8e, + 0xc7, 0x19, 0xa7, 0xa3, 0x2c, 0xe6, 0xdf, 0x66, 0xa1, 0xb8, 0x79, 0xb0, 0xbb, 0x43, 0xfd, 0x7e, + 0x80, 0xd6, 0x60, 0xce, 0xb3, 0x7a, 0xa4, 0x6a, 0xac, 0x19, 0xb7, 0x4a, 0xad, 0xf9, 0x17, 0xc3, + 0xfa, 0xcc, 0xc5, 0xb0, 0x3e, 0xf7, 0xd0, 0xea, 0x11, 0x2c, 0x31, 0xc8, 0x85, 0xe2, 0x80, 0x50, + 0xe6, 0xf8, 0x1e, 0xab, 0xe6, 0xd6, 0x66, 0x6f, 0x95, 0x37, 0xee, 0x35, 0xb2, 0x84, 0xb9, 0x21, + 0x15, 0x3c, 0x0e, 0x59, 0xef, 0xfb, 0xb4, 0xed, 0xb0, 0x8e, 0x3f, 0x20, 0xf4, 0xbc, 0xb5, 0xa4, + 0xb4, 0x14, 0x15, 0x92, 0xe1, 0x48, 0x03, 0xfa, 0xa5, 0x01, 0x4b, 0x01, 0x25, 0xc7, 0x84, 0x52, + 0x62, 0x2b, 0x7c, 0x75, 0x76, 0xcd, 0xf8, 0x14, 0xd4, 0x56, 0x95, 0xda, 0xa5, 0x83, 0x11, 0xf9, + 0x78, 0x4c, 0x23, 0xfa, 0x93, 0x01, 0xab, 0x8c, 0xd0, 0x01, 0xa1, 0x9b, 0xb6, 0x4d, 0x09, 0x63, + 0xad, 0xf3, 0x2d, 0xd7, 0x21, 0x1e, 0xdf, 0xda, 0x6d, 0x63, 0x56, 0x9d, 0x93, 0x71, 0xf8, 0x6e, + 0x36, 0x83, 0x0e, 0x27, 0xc9, 0x69, 0x99, 0xca, 0xa2, 0xd5, 0x89, 0x24, 0x0c, 0x7f, 0x8c, 0x19, + 0xe6, 0x31, 0xcc, 0xeb, 0x44, 0x3e, 0x70, 0x18, 0x47, 0x8f, 0xa1, 0xd0, 0x15, 0x07, 0x56, 0x35, + 0xa4, 0x81, 0x8d, 0x6c, 0x06, 0x6a, 0x19, 0xad, 0x05, 0x65, 0x4f, 0x41, 0x1e, 0x19, 0x56, 0xd2, + 0xcc, 0x8f, 0x0c, 0x28, 0x6f, 0x1e, 0xec, 0x62, 0x55, 0x84, 0x19, 0x8a, 0x66, 0x03, 0x40, 0xfc, + 0x65, 0x81, 0xd5, 0x21, 0x76, 0x35, 0xb7, 0x66, 0xdc, 0x2a, 0xb6, 0x90, 0xa2, 0x83, 0x87, 0x11, + 0x06, 0x27, 0xa8, 0x84, 0xd4, 0x53, 0xc7, 0xb3, 0x65, 0xb6, 0x13, 0x52, 0xdf, 0x76, 0x3c, 0x1b, + 0x4b, 0x0c, 0x7a, 0x00, 0xf9, 0x01, 0xa1, 0x47, 0x22, 0xfe, 0xa2, 0x20, 0xbe, 0x92, 0xcd, 0xbd, + 0xc7, 0x82, 0xa5, 0x55, 0xba, 0x18, 0xd6, 0xf3, 0xf2, 0x27, 0x0e, 0x85, 0x98, 0x7f, 0x35, 0x60, + 0x31, 0xe1, 0x95, 0x8c, 0xe0, 0x1d, 0x98, 0xef, 0x26, 0xea, 0x47, 0x79, 0xb8, 0xa2, 0x6c, 0x99, + 0x4f, 0xd6, 0x16, 0x4e, 0x51, 0x22, 0x02, 0x25, 0x7d, 0x49, 0xf5, 0x3d, 0x59, 0xcf, 0x1c, 0x7e, + 0x6d, 0x43, 0xac, 0x29, 0x01, 0x64, 0x38, 0x96, 0x6c, 0xfe, 0x3b, 0x4c, 0x85, 0xbe, 0x39, 0xe8, + 0x56, 0xe2, 0x76, 0x8a, 0xa4, 0x97, 0x5a, 0xf3, 0x13, 0x6e, 0xd6, 0x35, 0x25, 0x9d, 0xfb, 0x4c, + 0x94, 0xf4, 0xdd, 0xe2, 0xef, 0x3f, 0xa8, 0xcf, 0xbc, 0xff, 0x8f, 0xb5, 0x19, 0xf3, 0xd7, 0x39, + 0xa8, 0xb4, 0x89, 0x4b, 0x38, 0xd9, 0x0f, 0xb8, 0xf4, 0xe0, 0x3e, 0xa0, 0x2e, 0xb5, 0x3a, 0xe4, + 0x80, 0x50, 0xc7, 0xb7, 0x0f, 0x49, 0xc7, 0xf7, 0x6c, 0x26, 0x53, 0x34, 0xdb, 0xfa, 0xfc, 0xc5, + 0xb0, 0x8e, 0x76, 0xc6, 0xb0, 0xf8, 0x0a, 0x0e, 0xe4, 0x42, 0x25, 0xa0, 0xf2, 0xb7, 0xc3, 0x55, + 0x5b, 0x13, 0xe5, 0xf4, 0xb5, 0x6c, 0xbe, 0x1f, 0x24, 0x59, 0x5b, 0xcb, 0x17, 0xc3, 0x7a, 0x25, + 0x05, 0xc2, 0x69, 0xe1, 0xe8, 0x7b, 0xb0, 0xe4, 0xd3, 0xe0, 0xc4, 0xf2, 0xda, 0x24, 0x20, 0x9e, + 0x4d, 0x3c, 0xce, 0x64, 0x89, 0x17, 0x5b, 0x2b, 0xa2, 0x19, 0xed, 0x8f, 0xe0, 0xf0, 0x18, 0xb5, + 0xb9, 0x0b, 0xc5, 0x76, 0x9f, 0x5a, 0x42, 0x1c, 0xfa, 0x0e, 0x14, 0x6d, 0xf5, 0x5b, 0x79, 0xfe, + 0xaa, 0xee, 0xa6, 0x9a, 0xe6, 0x72, 0x58, 0xaf, 0x88, 0x31, 0xd3, 0xd0, 0x00, 0x1c, 0xb1, 0x98, + 0x4f, 0xa0, 0xb2, 0x7d, 0x16, 0xf8, 0x94, 0xeb, 0x98, 0x7e, 0x09, 0x0a, 0x44, 0x02, 0xa4, 0xb4, + 0x62, 0xdc, 0x02, 0x42, 0x32, 0xac, 0xb0, 0xe8, 0x35, 0xc8, 0x93, 0x33, 0xab, 0xc3, 0xd5, 0x5d, + 0xae, 0x28, 0xb2, 0xfc, 0xb6, 0x00, 0xe2, 0x10, 0x67, 0xee, 0x03, 0xec, 0x90, 0x48, 0xf4, 0x26, + 0x2c, 0xea, 0xba, 0x4d, 0x5f, 0xa7, 0x2f, 0x28, 0xe6, 0x45, 0x9c, 0x46, 0xe3, 0x51, 0x7a, 0xf3, + 0x09, 0x94, 0xe4, 0x95, 0x13, 0x3d, 0x40, 0x98, 0x20, 0x6f, 0x9c, 0x92, 0x12, 0x99, 0x20, 0x29, + 0x70, 0x88, 0x8b, 0x9a, 0x48, 0x6e, 0x52, 0x13, 0x49, 0x54, 0x98, 0x0b, 0x95, 0x90, 0x57, 0xf7, + 0xb5, 0x4c, 0x1a, 0x6e, 0x43, 0x51, 0x9b, 0xa9, 0xb4, 0x44, 0xf3, 0x4c, 0x0b, 0xc2, 0x11, 0x45, + 0x42, 0xdb, 0x09, 0xa4, 0xda, 0x47, 0x36, 0x65, 0x6f, 0xc0, 0x0d, 0x75, 0x81, 0x95, 0xae, 0x45, + 0x45, 0x76, 0x43, 0xc7, 0x4c, 0xe3, 0x13, 0x9a, 0x7e, 0x0e, 0xd5, 0x49, 0x43, 0xf0, 0x13, 0x34, + 0xb8, 0xec, 0xa6, 0x98, 0xbf, 0x33, 0x60, 0x29, 0x29, 0x29, 0x7b, 0xfa, 0xb2, 0x2b, 0xb9, 0x7e, + 0x5c, 0x24, 0x22, 0xf2, 0x47, 0x03, 0x56, 0x52, 0xae, 0x4d, 0x95, 0xf1, 0x29, 0x8c, 0x4a, 0x16, + 0xc7, 0xec, 0x14, 0xc5, 0xf1, 0x51, 0x0e, 0x2a, 0x0f, 0xac, 0x23, 0xe2, 0x1e, 0x12, 0x97, 0x74, + 0xb8, 0x4f, 0xd1, 0x7b, 0x50, 0xee, 0x59, 0xbc, 0x73, 0x22, 0xa1, 0x7a, 0xa0, 0xb7, 0xb3, 0xb5, + 0xa8, 0x94, 0xa4, 0xc6, 0x5e, 0x2c, 0x66, 0xdb, 0xe3, 0xf4, 0xbc, 0xf5, 0x39, 0x65, 0x52, 0x39, + 0x81, 0xc1, 0x49, 0x6d, 0x72, 0x0b, 0x93, 0xe7, 0xed, 0xb3, 0x40, 0xf4, 0xe8, 0xe9, 0x97, 0xbf, + 0x94, 0x09, 0x98, 0xfc, 0xb4, 0xef, 0x50, 0xd2, 0x23, 0x1e, 0x8f, 0xb7, 0xb0, 0xbd, 0x11, 0xf9, + 0x78, 0x4c, 0xe3, 0xea, 0x3d, 0x58, 0x1a, 0x35, 0x1e, 0x2d, 0xc1, 0xec, 0x29, 0x39, 0x0f, 0xf3, + 0x85, 0xc5, 0x4f, 0xb4, 0x02, 0xf9, 0x81, 0xe5, 0xf6, 0xd5, 0x6d, 0xc4, 0xe1, 0xe1, 0x6e, 0xee, + 0x8e, 0x61, 0xfe, 0xd9, 0x80, 0xea, 0x24, 0x43, 0xd0, 0x17, 0x13, 0x82, 0x5a, 0x65, 0x65, 0xd5, + 0xec, 0xdb, 0xe4, 0x3c, 0x94, 0xba, 0x0d, 0x45, 0x3f, 0x10, 0x7b, 0xb3, 0x4f, 0x55, 0xd6, 0xdf, + 0xd0, 0x99, 0xdc, 0x57, 0xf0, 0xcb, 0x61, 0xfd, 0x66, 0x4a, 0xbc, 0x46, 0xe0, 0x88, 0x15, 0x99, + 0x50, 0x90, 0xf6, 0x88, 0x9e, 0x2f, 0xa6, 0x33, 0x88, 0xde, 0xfa, 0x58, 0x42, 0xb0, 0xc2, 0x98, + 0xef, 0x41, 0x51, 0x2c, 0x1f, 0x7b, 0x84, 0x5b, 0xa2, 0x80, 0x18, 0x71, 0x8f, 0x1f, 0x38, 0xde, + 0xa9, 0x32, 0x2d, 0x2a, 0xa0, 0x43, 0x05, 0xc7, 0x11, 0xc5, 0x55, 0x2d, 0x36, 0x37, 0x65, 0x8b, + 0xfd, 0x4b, 0x0e, 0xca, 0x42, 0xbb, 0xee, 0xda, 0xdf, 0x82, 0x8a, 0x9b, 0xf4, 0x49, 0x59, 0x71, + 0x53, 0x09, 0x4c, 0x57, 0x29, 0x4e, 0xd3, 0x0a, 0xe6, 0x63, 0x87, 0xb8, 0x76, 0xc4, 0x9c, 0x4b, + 0x33, 0xdf, 0x4f, 0x22, 0x71, 0x9a, 0x56, 0xdc, 0xc5, 0xa7, 0x22, 0xdb, 0x6a, 0x3a, 0x46, 0x77, + 0xf1, 0xfb, 0x02, 0x88, 0x43, 0xdc, 0x55, 0x1e, 0xcf, 0x4d, 0xe7, 0x31, 0xba, 0x0b, 0x0b, 0x62, + 0x3c, 0xfa, 0x7d, 0xae, 0x57, 0x88, 0xbc, 0x1c, 0xa4, 0xe8, 0x62, 0x58, 0x5f, 0x78, 0x27, 0x85, + 0xc1, 0x23, 0x94, 0xe6, 0x2f, 0x00, 0x60, 0xff, 0xe8, 0x27, 0xa4, 0x13, 0x66, 0xeb, 0xfa, 0x45, + 0x58, 0xf4, 0x5b, 0xf5, 0xfe, 0x12, 0x50, 0x15, 0x90, 0xb8, 0xdf, 0x26, 0x70, 0x38, 0x45, 0x89, + 0x9a, 0x50, 0x8a, 0x96, 0x63, 0xd5, 0x4b, 0x96, 0x15, 0x5b, 0x29, 0xda, 0xa0, 0x71, 0x4c, 0x93, + 0x2a, 0x9d, 0xb9, 0x6b, 0x4b, 0xa7, 0x05, 0xb3, 0x7d, 0xc7, 0x96, 0xae, 0x97, 0x5a, 0x5f, 0xd5, + 0xe5, 0xff, 0x68, 0xb7, 0x7d, 0x39, 0xac, 0xbf, 0x3a, 0xe9, 0x01, 0xcb, 0xcf, 0x03, 0xc2, 0x1a, + 0x8f, 0x76, 0xdb, 0x58, 0x30, 0x5f, 0x95, 0x8c, 0xc2, 0x94, 0xc9, 0xd8, 0x00, 0x50, 0x5e, 0x0b, + 0xee, 0x1b, 0x61, 0x22, 0xf4, 0x43, 0x61, 0x27, 0xc2, 0xe0, 0x04, 0x15, 0x62, 0xb0, 0xdc, 0xa1, + 0x44, 0xfe, 0x16, 0xe9, 0x62, 0xdc, 0xea, 0x05, 0xd5, 0xa2, 0xdc, 0xe1, 0xbe, 0x9c, 0xad, 0x3b, + 0x09, 0xb6, 0xd6, 0x2b, 0x4a, 0xcd, 0xf2, 0xd6, 0xa8, 0x30, 0x3c, 0x2e, 0x1f, 0xf9, 0xb0, 0x6c, + 0x8b, 0x6d, 0x34, 0xa5, 0xb4, 0x34, 0xb5, 0xd2, 0x9b, 0x42, 0x61, 0x7b, 0x54, 0x10, 0x1e, 0x97, + 0x8d, 0x7e, 0x04, 0xab, 0x1a, 0x38, 0xbe, 0xd7, 0x56, 0x41, 0x46, 0xaa, 0x26, 0x36, 0xed, 0xf6, + 0x44, 0x2a, 0xfc, 0x31, 0x12, 0x90, 0x0d, 0x05, 0x37, 0x9c, 0x2d, 0x65, 0xd9, 0xd8, 0xbf, 0x9d, + 0xcd, 0x8b, 0xb8, 0xfa, 0x1b, 0xc9, 0x99, 0x12, 0xed, 0x8d, 0x6a, 0x9c, 0x28, 0xd9, 0xe8, 0x0c, + 0xca, 0x96, 0xe7, 0xf9, 0xdc, 0x0a, 0x37, 0xed, 0x79, 0xa9, 0x6a, 0x73, 0x6a, 0x55, 0x9b, 0xb1, + 0x8c, 0x91, 0x19, 0x96, 0xc0, 0xe0, 0xa4, 0x2a, 0xf4, 0x14, 0x16, 0xfd, 0xa7, 0x1e, 0xa1, 0x58, + 0x3c, 0xed, 0x89, 0x27, 0x9e, 0x65, 0x15, 0xa9, 0xfd, 0xeb, 0x19, 0xb5, 0xa7, 0x98, 0xe3, 0x92, + 0x4e, 0xc3, 0x19, 0x1e, 0xd5, 0x82, 0x1a, 0x00, 0xc7, 0x8e, 0x67, 0xb9, 0xce, 0xcf, 0x08, 0x65, + 0xd5, 0x05, 0xd9, 0xf6, 0x17, 0x44, 0x39, 0xdf, 0x8f, 0xa0, 0x38, 0x41, 0x81, 0xbe, 0x01, 0xe5, + 0x8e, 0xdb, 0x67, 0x9c, 0x50, 0xd9, 0x21, 0x16, 0xe5, 0x0d, 0x8a, 0xfc, 0xdb, 0x8a, 0x51, 0x38, + 0x49, 0xb7, 0xfa, 0x4d, 0x28, 0xff, 0x9f, 0x73, 0x51, 0xcc, 0xd5, 0xd1, 0x80, 0x4e, 0x35, 0x57, + 0xff, 0x6b, 0xc0, 0x42, 0x3a, 0x0c, 0xd1, 0x36, 0x66, 0x4c, 0x7c, 0xbc, 0xeb, 0x5e, 0x39, 0x3b, + 0xb1, 0x57, 0xaa, 0x96, 0x34, 0xf7, 0x49, 0x5a, 0xd2, 0x06, 0x80, 0x15, 0x38, 0xba, 0x1b, 0x85, + 0xdd, 0x2d, 0xea, 0x27, 0xf1, 0xc3, 0x19, 0x27, 0xa8, 0x44, 0xc2, 0x3a, 0xbe, 0xc7, 0xa9, 0xef, + 0xba, 0x84, 0xca, 0x0e, 0x56, 0x0c, 0x13, 0xb6, 0x15, 0x41, 0x71, 0x82, 0xc2, 0xdc, 0x87, 0xf4, + 0x8b, 0x0f, 0xdd, 0x0b, 0x0d, 0x0f, 0x7d, 0xbf, 0x3d, 0xb5, 0xd1, 0xe6, 0x6d, 0x28, 0x61, 0xdf, + 0xe7, 0x07, 0x16, 0x3f, 0x61, 0xa8, 0x0e, 0xf9, 0x40, 0xfc, 0x50, 0xcf, 0x79, 0xf9, 0xdd, 0x42, + 0x62, 0x70, 0x08, 0x37, 0x7f, 0x6b, 0xc0, 0x2b, 0x13, 0x5f, 0xd7, 0x22, 0x00, 0x9d, 0xe8, 0xa4, + 0x4c, 0x8a, 0x02, 0x10, 0xd3, 0xe1, 0x04, 0x95, 0x18, 0xdb, 0xa9, 0x27, 0xf9, 0xe8, 0xd8, 0x4e, + 0x69, 0xc3, 0x69, 0x5a, 0xf3, 0x3f, 0x39, 0x28, 0x1c, 0x72, 0x8b, 0xf7, 0x19, 0x7a, 0x02, 0x45, + 0x71, 0x7b, 0x6c, 0x8b, 0x5b, 0x52, 0x73, 0xe6, 0x2f, 0x50, 0x7a, 0xfd, 0x89, 0x27, 0x96, 0x86, + 0xe0, 0x48, 0xa2, 0x78, 0xaa, 0x32, 0xa9, 0x47, 0x99, 0x17, 0xb5, 0x9c, 0x50, 0x3b, 0x56, 0x58, + 0xb1, 0xae, 0xf7, 0x08, 0x63, 0x56, 0x57, 0xd7, 0x5a, 0xb4, 0xae, 0xef, 0x85, 0x60, 0xac, 0xf1, + 0xe8, 0x2d, 0x28, 0x50, 0x62, 0xb1, 0x68, 0x89, 0xa8, 0x69, 0x91, 0x58, 0x42, 0x2f, 0x87, 0xf5, + 0x79, 0x25, 0x5c, 0x9e, 0xb1, 0xa2, 0x46, 0xef, 0xc2, 0x0d, 0x9b, 0x70, 0xcb, 0x71, 0xc3, 0xdd, + 0x21, 0xf3, 0xb7, 0x83, 0x50, 0x58, 0x3b, 0x64, 0x6d, 0x95, 0x85, 0x4d, 0xea, 0x80, 0xb5, 0x40, + 0x71, 0x4f, 0x3a, 0xbe, 0x4d, 0x64, 0x1d, 0xe6, 0xe3, 0x7b, 0xb2, 0xe5, 0xdb, 0x04, 0x4b, 0x8c, + 0xf9, 0xcc, 0x80, 0x72, 0x28, 0x69, 0xcb, 0xea, 0x33, 0x82, 0xd6, 0x23, 0x2f, 0xc2, 0x74, 0xeb, + 0xc1, 0x36, 0xf7, 0xce, 0x79, 0x40, 0x2e, 0x87, 0xf5, 0x92, 0x24, 0x13, 0x87, 0xc8, 0x81, 0x44, + 0x8c, 0x72, 0xd7, 0xc4, 0xe8, 0x35, 0xc8, 0xcb, 0x3d, 0x4d, 0x05, 0x33, 0x5a, 0xcb, 0xe4, 0x2e, + 0x87, 0x43, 0x9c, 0xf9, 0x87, 0x1c, 0x54, 0x52, 0xce, 0x65, 0x58, 0x8d, 0xa2, 0xb7, 0x57, 0x2e, + 0xc3, 0x7b, 0x7e, 0xf2, 0x47, 0xc1, 0x1f, 0x40, 0xa1, 0x23, 0xfc, 0xd3, 0x5f, 0x65, 0xd7, 0xa7, + 0x49, 0x85, 0x8c, 0x4c, 0x5c, 0x49, 0xf2, 0xc8, 0xb0, 0x12, 0x88, 0x76, 0x60, 0x99, 0x12, 0x4e, + 0xcf, 0x37, 0x8f, 0x39, 0xa1, 0xc9, 0x65, 0x31, 0x1f, 0x2f, 0x0f, 0x78, 0x94, 0x00, 0x8f, 0xf3, + 0x98, 0x2e, 0xcc, 0x89, 0xc1, 0x2e, 0xc2, 0xce, 0x52, 0x9f, 0xad, 0xa2, 0xb0, 0x6b, 0x66, 0x8d, + 0x17, 0xd1, 0xf1, 0x2c, 0xcf, 0x0f, 0x8b, 0x3d, 0x1f, 0x47, 0xe7, 0xa1, 0x00, 0xe2, 0x10, 0x77, + 0x77, 0x45, 0x3c, 0x20, 0x7f, 0xf3, 0xbc, 0x3e, 0xf3, 0xec, 0x79, 0x7d, 0xe6, 0x83, 0xe7, 0xea, + 0x31, 0xf9, 0x43, 0x28, 0xc5, 0x6b, 0xc4, 0xa7, 0xac, 0xd2, 0xfc, 0x31, 0x14, 0x45, 0x25, 0xe9, + 0xf5, 0xf7, 0x9a, 0xa6, 0x9f, 0x6e, 0xc7, 0xb9, 0x2c, 0xed, 0xd8, 0xdc, 0x80, 0xf0, 0x3b, 0xad, + 0xe8, 0x84, 0x0e, 0x27, 0xbd, 0x54, 0x27, 0xdc, 0x15, 0x00, 0x1c, 0xc2, 0x13, 0xef, 0xe7, 0x5f, + 0x19, 0x00, 0xf2, 0x9d, 0xb0, 0x3d, 0x10, 0x6f, 0xbb, 0x35, 0x98, 0x13, 0x2d, 0x76, 0xd4, 0x30, + 0x79, 0x05, 0x24, 0x06, 0x3d, 0x82, 0x82, 0x2f, 0xd7, 0x0b, 0xf5, 0xf1, 0xef, 0xcd, 0x89, 0x55, + 0xa3, 0xfe, 0x69, 0xd3, 0xc0, 0xd6, 0xd3, 0xed, 0x33, 0x4e, 0x3c, 0x61, 0x63, 0x5c, 0x31, 0xe1, + 0x8e, 0x82, 0x95, 0xb0, 0xd6, 0xeb, 0x2f, 0x5e, 0xd6, 0x66, 0x3e, 0x7c, 0x59, 0x9b, 0xf9, 0xfb, + 0xcb, 0xda, 0xcc, 0xfb, 0x17, 0x35, 0xe3, 0xc5, 0x45, 0xcd, 0xf8, 0xf0, 0xa2, 0x66, 0xfc, 0xf3, + 0xa2, 0x66, 0x3c, 0xfb, 0x57, 0x6d, 0xe6, 0xdd, 0xdc, 0x60, 0xfd, 0x7f, 0x01, 0x00, 0x00, 0xff, + 0xff, 0x0c, 0x01, 0x08, 0xec, 0xf6, 0x1a, 0x00, 0x00, } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto index 5dd45c38..70699610 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto @@ -105,6 +105,26 @@ message APIVersions { repeated ServerAddressByClientCIDR serverAddressByClientCIDRs = 2; } +// DeleteOptions may be provided when deleting an API object. +message DeleteOptions { + // The duration in seconds before the object should be deleted. Value must be non-negative integer. + // The value zero indicates delete immediately. If this value is nil, the default grace period for the + // specified type will be used. + // Defaults to a per object value if not specified. zero means delete immediately. + // +optional + optional int64 gracePeriodSeconds = 1; + + // Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be + // returned. + // +optional + optional Preconditions preconditions = 2; + + // Should the dependent objects be orphaned. If true/false, the "orphan" + // finalizer will be added to/removed from the object's finalizers list. + // +optional + optional bool orphanDependents = 3; +} + // Duration is a wrapper around time.Duration which supports correct // marshaling to YAML and JSON. In particular, it marshals into strings, which // can be used as map keys in json. @@ -246,6 +266,185 @@ message ListMeta { optional string resourceVersion = 2; } +// ListOptions is the query options to a standard REST list call. +message ListOptions { + // A selector to restrict the list of returned objects by their labels. + // Defaults to everything. + // +optional + optional string labelSelector = 1; + + // A selector to restrict the list of returned objects by their fields. + // Defaults to everything. + // +optional + optional string fieldSelector = 2; + + // Watch for changes to the described resources and return them as a stream of + // add, update, and remove notifications. Specify resourceVersion. + // +optional + optional bool watch = 3; + + // When specified with a watch call, shows changes that occur after that particular version of a resource. + // Defaults to changes from the beginning of history. + // When specified for list: + // - if unset, then the result is returned from remote storage based on quorum-read flag; + // - if it's 0, then we simply return what we currently have in cache, no guarantee; + // - if set to non zero, then the result is at least as fresh as given rv. + // +optional + optional string resourceVersion = 4; + + // Timeout for the list/watch call. + // +optional + optional int64 timeoutSeconds = 5; +} + +// ObjectMeta is metadata that all persisted resources must have, which includes all objects +// users must create. +message ObjectMeta { + // Name must be unique within a namespace. Is required when creating resources, although + // some resources may allow a client to request the generation of an appropriate name + // automatically. Name is primarily intended for creation idempotence and configuration + // definition. + // Cannot be updated. + // More info: http://kubernetes.io/docs/user-guide/identifiers#names + // +optional + optional string name = 1; + + // GenerateName is an optional prefix, used by the server, to generate a unique + // name ONLY IF the Name field has not been provided. + // If this field is used, the name returned to the client will be different + // than the name passed. This value will also be combined with a unique suffix. + // The provided value has the same validation rules as the Name field, + // and may be truncated by the length of the suffix required to make the value + // unique on the server. + // + // If this field is specified and the generated name exists, the server will + // NOT return a 409 - instead, it will either return 201 Created or 500 with Reason + // ServerTimeout indicating a unique name could not be found in the time allotted, and the client + // should retry (optionally after the time indicated in the Retry-After header). + // + // Applied only if Name is not specified. + // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#idempotency + // +optional + optional string generateName = 2; + + // Namespace defines the space within each name must be unique. An empty namespace is + // equivalent to the "default" namespace, but "default" is the canonical representation. + // Not all objects are required to be scoped to a namespace - the value of this field for + // those objects will be empty. + // + // Must be a DNS_LABEL. + // Cannot be updated. + // More info: http://kubernetes.io/docs/user-guide/namespaces + // +optional + optional string namespace = 3; + + // SelfLink is a URL representing this object. + // Populated by the system. + // Read-only. + // +optional + optional string selfLink = 4; + + // UID is the unique in time and space value for this object. It is typically generated by + // the server on successful creation of a resource and is not allowed to change on PUT + // operations. + // + // Populated by the system. + // Read-only. + // More info: http://kubernetes.io/docs/user-guide/identifiers#uids + // +optional + optional string uid = 5; + + // An opaque value that represents the internal version of this object that can + // be used by clients to determine when objects have changed. May be used for optimistic + // concurrency, change detection, and the watch operation on a resource or set of resources. + // Clients must treat these values as opaque and passed unmodified back to the server. + // They may only be valid for a particular resource or set of resources. + // + // Populated by the system. + // Read-only. + // Value must be treated as opaque by clients and . + // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency + // +optional + optional string resourceVersion = 6; + + // A sequence number representing a specific generation of the desired state. + // Populated by the system. Read-only. + // +optional + optional int64 generation = 7; + + // CreationTimestamp is a timestamp representing the server time when this object was + // created. It is not guaranteed to be set in happens-before order across separate operations. + // Clients may not set this value. It is represented in RFC3339 form and is in UTC. + // + // Populated by the system. + // Read-only. + // Null for lists. + // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + // +optional + optional Time creationTimestamp = 8; + + // DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This + // field is set by the server when a graceful deletion is requested by the user, and is not + // directly settable by a client. The resource is expected to be deleted (no longer visible + // from resource lists, and not reachable by name) after the time in this field. Once set, + // this value may not be unset or be set further into the future, although it may be shortened + // or the resource may be deleted prior to this time. For example, a user may request that + // a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination + // signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard + // termination signal (SIGKILL) to the container and after cleanup, remove the pod from the + // API. In the presence of network partitions, this object may still exist after this + // timestamp, until an administrator or automated process can determine the resource is + // fully terminated. + // If not set, graceful deletion of the object has not been requested. + // + // Populated by the system when a graceful deletion is requested. + // Read-only. + // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + // +optional + optional Time deletionTimestamp = 9; + + // Number of seconds allowed for this object to gracefully terminate before + // it will be removed from the system. Only set when deletionTimestamp is also set. + // May only be shortened. + // Read-only. + // +optional + optional int64 deletionGracePeriodSeconds = 10; + + // Map of string keys and values that can be used to organize and categorize + // (scope and select) objects. May match selectors of replication controllers + // and services. + // More info: http://kubernetes.io/docs/user-guide/labels + // +optional + map labels = 11; + + // Annotations is an unstructured key value map stored with a resource that may be + // set by external tools to store and retrieve arbitrary metadata. They are not + // queryable and should be preserved when modifying objects. + // More info: http://kubernetes.io/docs/user-guide/annotations + // +optional + map annotations = 12; + + // List of objects depended by this object. If ALL objects in the list have + // been deleted, this object will be garbage collected. If this object is managed by a controller, + // then an entry in this list will point to this controller, with the controller field set to true. + // There cannot be more than one managing controller. + // +optional + repeated OwnerReference ownerReferences = 13; + + // Must be empty before the object is deleted from the registry. Each entry + // is an identifier for the responsible component that will remove the entry + // from the list. If the deletionTimestamp of the object is non-nil, entries + // in this list can only be removed. + // +optional + repeated string finalizers = 14; + + // The name of the cluster which the object belongs to. + // This is used to distinguish resources with same name and namespace in different clusters. + // This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. + // +optional + optional string clusterName = 15; +} + // OwnerReference contains enough information to let you identify an owning // object. Currently, an owning object must be in the same namespace, so there // is no namespace field. @@ -270,6 +469,13 @@ message OwnerReference { optional bool controller = 6; } +// Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out. +message Preconditions { + // Specifies the target UID. + // +optional + optional string uid = 1; +} + // RootPaths lists the paths available at root. // For example: "/healthz", "/apis". message RootPaths { diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/helpers.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/helpers.go index 10eb5f2f..877aa193 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/helpers.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/helpers.go @@ -19,8 +19,10 @@ package v1 import ( "fmt" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/selection" + "k8s.io/apimachinery/pkg/types" ) // LabelSelectorAsSelector converts the LabelSelector api type into a struct that implements @@ -181,3 +183,46 @@ func ExtractGroupVersions(l *APIGroupList) []string { } return groupVersions } + +// HasAnnotation returns a bool if passed in annotation exists +func HasAnnotation(obj ObjectMeta, ann string) bool { + _, found := obj.Annotations[ann] + return found +} + +// SetMetaDataAnnotation sets the annotation and value +func SetMetaDataAnnotation(obj *ObjectMeta, ann string, value string) { + if obj.Annotations == nil { + obj.Annotations = make(map[string]string) + } + obj.Annotations[ann] = value +} + +// SingleObject returns a ListOptions for watching a single object. +func SingleObject(meta ObjectMeta) ListOptions { + return ListOptions{ + FieldSelector: fields.OneTermEqualSelector("metadata.name", meta.Name).String(), + ResourceVersion: meta.ResourceVersion, + } +} + +// NewDeleteOptions returns a DeleteOptions indicating the resource should +// be deleted within the specified grace period. Use zero to indicate +// immediate deletion. If you would prefer to use the default grace period, +// use &metav1.DeleteOptions{} directly. +func NewDeleteOptions(grace int64) *DeleteOptions { + return &DeleteOptions{GracePeriodSeconds: &grace} +} + +// NewPreconditionDeleteOptions returns a DeleteOptions with a UID precondition set. +func NewPreconditionDeleteOptions(uid string) *DeleteOptions { + u := types.UID(uid) + p := Preconditions{UID: &u} + return &DeleteOptions{Preconditions: &p} +} + +// NewUIDPreconditions returns a Preconditions with UID set. +func NewUIDPreconditions(uid string) *Preconditions { + u := types.UID(uid) + return &Preconditions{UID: &u} +} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/labels.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/labels.go new file mode 100644 index 00000000..8b4c0423 --- /dev/null +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/labels.go @@ -0,0 +1,75 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +// Clones the given selector and returns a new selector with the given key and value added. +// Returns the given selector, if labelKey is empty. +func CloneSelectorAndAddLabel(selector *LabelSelector, labelKey, labelValue string) *LabelSelector { + if labelKey == "" { + // Don't need to add a label. + return selector + } + + // Clone. + newSelector := new(LabelSelector) + + // TODO(madhusudancs): Check if you can use deepCopy_extensions_LabelSelector here. + newSelector.MatchLabels = make(map[string]string) + if selector.MatchLabels != nil { + for key, val := range selector.MatchLabels { + newSelector.MatchLabels[key] = val + } + } + newSelector.MatchLabels[labelKey] = labelValue + + if selector.MatchExpressions != nil { + newMExps := make([]LabelSelectorRequirement, len(selector.MatchExpressions)) + for i, me := range selector.MatchExpressions { + newMExps[i].Key = me.Key + newMExps[i].Operator = me.Operator + if me.Values != nil { + newMExps[i].Values = make([]string, len(me.Values)) + copy(newMExps[i].Values, me.Values) + } else { + newMExps[i].Values = nil + } + } + newSelector.MatchExpressions = newMExps + } else { + newSelector.MatchExpressions = nil + } + + return newSelector +} + +// AddLabelToSelector returns a selector with the given key and value added to the given selector's MatchLabels. +func AddLabelToSelector(selector *LabelSelector, labelKey, labelValue string) *LabelSelector { + if labelKey == "" { + // Don't need to add a label. + return selector + } + if selector.MatchLabels == nil { + selector.MatchLabels = make(map[string]string) + } + selector.MatchLabels[labelKey] = labelValue + return selector +} + +// SelectorHasLabel checks if the given selector contains the given label key in its MatchLabels +func SelectorHasLabel(selector *LabelSelector, labelKey string) bool { + return len(selector.MatchLabels[labelKey]) > 0 +} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/labels_test.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/labels_test.go new file mode 100644 index 00000000..b1bccad4 --- /dev/null +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/labels_test.go @@ -0,0 +1,120 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + "reflect" + "testing" +) + +func TestCloneSelectorAndAddLabel(t *testing.T) { + labels := map[string]string{ + "foo1": "bar1", + "foo2": "bar2", + "foo3": "bar3", + } + + cases := []struct { + labels map[string]string + labelKey string + labelValue string + want map[string]string + }{ + { + labels: labels, + want: labels, + }, + { + labels: labels, + labelKey: "foo4", + labelValue: "89", + want: map[string]string{ + "foo1": "bar1", + "foo2": "bar2", + "foo3": "bar3", + "foo4": "89", + }, + }, + { + labels: nil, + labelKey: "foo4", + labelValue: "12", + want: map[string]string{ + "foo4": "12", + }, + }, + } + + for _, tc := range cases { + ls_in := LabelSelector{MatchLabels: tc.labels} + ls_out := LabelSelector{MatchLabels: tc.want} + + got := CloneSelectorAndAddLabel(&ls_in, tc.labelKey, tc.labelValue) + if !reflect.DeepEqual(got, &ls_out) { + t.Errorf("got %v, want %v", got, tc.want) + } + } +} + +func TestAddLabelToSelector(t *testing.T) { + labels := map[string]string{ + "foo1": "bar1", + "foo2": "bar2", + "foo3": "bar3", + } + + cases := []struct { + labels map[string]string + labelKey string + labelValue string + want map[string]string + }{ + { + labels: labels, + want: labels, + }, + { + labels: labels, + labelKey: "foo4", + labelValue: "89", + want: map[string]string{ + "foo1": "bar1", + "foo2": "bar2", + "foo3": "bar3", + "foo4": "89", + }, + }, + { + labels: nil, + labelKey: "foo4", + labelValue: "12", + want: map[string]string{ + "foo4": "12", + }, + }, + } + + for _, tc := range cases { + ls_in := LabelSelector{MatchLabels: tc.labels} + ls_out := LabelSelector{MatchLabels: tc.want} + + got := AddLabelToSelector(&ls_in, tc.labelKey, tc.labelValue) + if !reflect.DeepEqual(got, &ls_out) { + t.Errorf("got %v, want %v", got, tc.want) + } + } +} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/meta.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/meta.go index d7dcea1a..871858ec 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/meta.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/meta.go @@ -17,11 +17,78 @@ limitations under the License. package v1 import ( + "k8s.io/apimachinery/pkg/conversion" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/types" ) +// ObjectMetaFor returns a pointer to a provided object's ObjectMeta. +// TODO: allow runtime.Unknown to extract this object +// TODO: Remove this function and use meta.ObjectMetaAccessor() instead. +func ObjectMetaFor(obj runtime.Object) (*ObjectMeta, error) { + v, err := conversion.EnforcePtr(obj) + if err != nil { + return nil, err + } + var meta *ObjectMeta + err = runtime.FieldPtr(v, "ObjectMeta", &meta) + return meta, err +} + +// ListMetaFor returns a pointer to a provided object's ListMeta, +// or an error if the object does not have that pointer. +// TODO: allow runtime.Unknown to extract this object +// TODO: Remove this function and use meta.ObjectMetaAccessor() instead. +func ListMetaFor(obj runtime.Object) (*ListMeta, error) { + v, err := conversion.EnforcePtr(obj) + if err != nil { + return nil, err + } + var meta *ListMeta + err = runtime.FieldPtr(v, "ListMeta", &meta) + return meta, err +} + +// TODO: move this, Object, List, and Type to a different package +type ObjectMetaAccessor interface { + GetObjectMeta() Object +} + +// Object lets you work with object metadata from any of the versioned or +// internal API objects. Attempting to set or retrieve a field on an object that does +// not support that field (Name, UID, Namespace on lists) will be a no-op and return +// a default value. +type Object interface { + GetNamespace() string + SetNamespace(namespace string) + GetName() string + SetName(name string) + GetGenerateName() string + SetGenerateName(name string) + GetUID() types.UID + SetUID(uid types.UID) + GetResourceVersion() string + SetResourceVersion(version string) + GetSelfLink() string + SetSelfLink(selfLink string) + GetCreationTimestamp() Time + SetCreationTimestamp(timestamp Time) + GetDeletionTimestamp() *Time + SetDeletionTimestamp(timestamp *Time) + GetLabels() map[string]string + SetLabels(labels map[string]string) + GetAnnotations() map[string]string + SetAnnotations(annotations map[string]string) + GetFinalizers() []string + SetFinalizers(finalizers []string) + GetOwnerReferences() []OwnerReference + SetOwnerReferences([]OwnerReference) + GetClusterName() string + SetClusterName(clusterName string) +} + // ListMetaAccessor retrieves the list interface from an object -// TODO: move this, and TypeMeta and ListMeta, to a different package type ListMetaAccessor interface { GetListMeta() List } @@ -64,3 +131,71 @@ func (obj *TypeMeta) GroupVersionKind() schema.GroupVersionKind { } func (obj *ListMeta) GetListMeta() List { return obj } + +func (obj *ObjectMeta) GetObjectMeta() Object { return obj } + +// Namespace implements metav1.Object for any object with an ObjectMeta typed field. Allows +// fast, direct access to metadata fields for API objects. +func (meta *ObjectMeta) GetNamespace() string { return meta.Namespace } +func (meta *ObjectMeta) SetNamespace(namespace string) { meta.Namespace = namespace } +func (meta *ObjectMeta) GetName() string { return meta.Name } +func (meta *ObjectMeta) SetName(name string) { meta.Name = name } +func (meta *ObjectMeta) GetGenerateName() string { return meta.GenerateName } +func (meta *ObjectMeta) SetGenerateName(generateName string) { meta.GenerateName = generateName } +func (meta *ObjectMeta) GetUID() types.UID { return meta.UID } +func (meta *ObjectMeta) SetUID(uid types.UID) { meta.UID = uid } +func (meta *ObjectMeta) GetResourceVersion() string { return meta.ResourceVersion } +func (meta *ObjectMeta) SetResourceVersion(version string) { meta.ResourceVersion = version } +func (meta *ObjectMeta) GetSelfLink() string { return meta.SelfLink } +func (meta *ObjectMeta) SetSelfLink(selfLink string) { meta.SelfLink = selfLink } +func (meta *ObjectMeta) GetCreationTimestamp() Time { return meta.CreationTimestamp } +func (meta *ObjectMeta) SetCreationTimestamp(creationTimestamp Time) { + meta.CreationTimestamp = creationTimestamp +} +func (meta *ObjectMeta) GetDeletionTimestamp() *Time { return meta.DeletionTimestamp } +func (meta *ObjectMeta) SetDeletionTimestamp(deletionTimestamp *Time) { + meta.DeletionTimestamp = deletionTimestamp +} +func (meta *ObjectMeta) GetLabels() map[string]string { return meta.Labels } +func (meta *ObjectMeta) SetLabels(labels map[string]string) { meta.Labels = labels } +func (meta *ObjectMeta) GetAnnotations() map[string]string { return meta.Annotations } +func (meta *ObjectMeta) SetAnnotations(annotations map[string]string) { meta.Annotations = annotations } +func (meta *ObjectMeta) GetFinalizers() []string { return meta.Finalizers } +func (meta *ObjectMeta) SetFinalizers(finalizers []string) { meta.Finalizers = finalizers } + +func (meta *ObjectMeta) GetOwnerReferences() []OwnerReference { + ret := make([]OwnerReference, len(meta.OwnerReferences)) + for i := 0; i < len(meta.OwnerReferences); i++ { + ret[i].Kind = meta.OwnerReferences[i].Kind + ret[i].Name = meta.OwnerReferences[i].Name + ret[i].UID = meta.OwnerReferences[i].UID + ret[i].APIVersion = meta.OwnerReferences[i].APIVersion + if meta.OwnerReferences[i].Controller != nil { + value := *meta.OwnerReferences[i].Controller + ret[i].Controller = &value + } + } + return ret +} + +func (meta *ObjectMeta) SetOwnerReferences(references []OwnerReference) { + newReferences := make([]OwnerReference, len(references)) + for i := 0; i < len(references); i++ { + newReferences[i].Kind = references[i].Kind + newReferences[i].Name = references[i].Name + newReferences[i].UID = references[i].UID + newReferences[i].APIVersion = references[i].APIVersion + if references[i].Controller != nil { + value := *references[i].Controller + newReferences[i].Controller = &value + } + } + meta.OwnerReferences = newReferences +} + +func (meta *ObjectMeta) GetClusterName() string { + return meta.ClusterName +} +func (meta *ObjectMeta) SetClusterName(clusterName string) { + meta.ClusterName = clusterName +} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/register.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/register.go index c20c35b6..735f5e6c 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/register.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/register.go @@ -25,7 +25,7 @@ import ( const GroupName = "meta.k8s.io" // SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = schema.GroupVersion{Group: "", Version: ""} +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} // WatchEventKind is name reserved for serializing watch events. const WatchEventKind = "WatchEvent" @@ -42,6 +42,12 @@ func AddToGroupVersion(scheme *runtime.Scheme, groupVersion schema.GroupVersion) schema.GroupVersion{Group: groupVersion.Group, Version: runtime.APIVersionInternal}.WithKind(WatchEventKind), &InternalEvent{}, ) + scheme.AddKnownTypes(groupVersion, + &ListOptions{}, + &ExportOptions{}, + &GetOptions{}, + &DeleteOptions{}, + ) scheme.AddConversionFuncs( Convert_versioned_Event_to_watch_Event, Convert_versioned_InternalEvent_to_versioned_Event, @@ -49,3 +55,15 @@ func AddToGroupVersion(scheme *runtime.Scheme, groupVersion schema.GroupVersion) Convert_versioned_Event_to_versioned_InternalEvent, ) } + +// scheme is the registry for the common types that adhere to the meta v1 API spec. +var scheme = runtime.NewScheme() + +// ParameterCodec knows about query parameters used with the meta v1 API spec. +var ParameterCodec = runtime.NewParameterCodec(scheme) + +func init() { + scheme.AddUnversionedTypes(SchemeGroupVersion, + &ListOptions{}, + ) +} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/types.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/types.go index 5ec008d4..feb5e72e 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/types.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/types.go @@ -71,6 +71,165 @@ type ListMeta struct { ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,2,opt,name=resourceVersion"` } +// ObjectMeta is metadata that all persisted resources must have, which includes all objects +// users must create. +type ObjectMeta struct { + // Name must be unique within a namespace. Is required when creating resources, although + // some resources may allow a client to request the generation of an appropriate name + // automatically. Name is primarily intended for creation idempotence and configuration + // definition. + // Cannot be updated. + // More info: http://kubernetes.io/docs/user-guide/identifiers#names + // +optional + Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"` + + // GenerateName is an optional prefix, used by the server, to generate a unique + // name ONLY IF the Name field has not been provided. + // If this field is used, the name returned to the client will be different + // than the name passed. This value will also be combined with a unique suffix. + // The provided value has the same validation rules as the Name field, + // and may be truncated by the length of the suffix required to make the value + // unique on the server. + // + // If this field is specified and the generated name exists, the server will + // NOT return a 409 - instead, it will either return 201 Created or 500 with Reason + // ServerTimeout indicating a unique name could not be found in the time allotted, and the client + // should retry (optionally after the time indicated in the Retry-After header). + // + // Applied only if Name is not specified. + // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#idempotency + // +optional + GenerateName string `json:"generateName,omitempty" protobuf:"bytes,2,opt,name=generateName"` + + // Namespace defines the space within each name must be unique. An empty namespace is + // equivalent to the "default" namespace, but "default" is the canonical representation. + // Not all objects are required to be scoped to a namespace - the value of this field for + // those objects will be empty. + // + // Must be a DNS_LABEL. + // Cannot be updated. + // More info: http://kubernetes.io/docs/user-guide/namespaces + // +optional + Namespace string `json:"namespace,omitempty" protobuf:"bytes,3,opt,name=namespace"` + + // SelfLink is a URL representing this object. + // Populated by the system. + // Read-only. + // +optional + SelfLink string `json:"selfLink,omitempty" protobuf:"bytes,4,opt,name=selfLink"` + + // UID is the unique in time and space value for this object. It is typically generated by + // the server on successful creation of a resource and is not allowed to change on PUT + // operations. + // + // Populated by the system. + // Read-only. + // More info: http://kubernetes.io/docs/user-guide/identifiers#uids + // +optional + UID types.UID `json:"uid,omitempty" protobuf:"bytes,5,opt,name=uid,casttype=k8s.io/kubernetes/pkg/types.UID"` + + // An opaque value that represents the internal version of this object that can + // be used by clients to determine when objects have changed. May be used for optimistic + // concurrency, change detection, and the watch operation on a resource or set of resources. + // Clients must treat these values as opaque and passed unmodified back to the server. + // They may only be valid for a particular resource or set of resources. + // + // Populated by the system. + // Read-only. + // Value must be treated as opaque by clients and . + // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency + // +optional + ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,6,opt,name=resourceVersion"` + + // A sequence number representing a specific generation of the desired state. + // Populated by the system. Read-only. + // +optional + Generation int64 `json:"generation,omitempty" protobuf:"varint,7,opt,name=generation"` + + // CreationTimestamp is a timestamp representing the server time when this object was + // created. It is not guaranteed to be set in happens-before order across separate operations. + // Clients may not set this value. It is represented in RFC3339 form and is in UTC. + // + // Populated by the system. + // Read-only. + // Null for lists. + // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + // +optional + CreationTimestamp Time `json:"creationTimestamp,omitempty" protobuf:"bytes,8,opt,name=creationTimestamp"` + + // DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This + // field is set by the server when a graceful deletion is requested by the user, and is not + // directly settable by a client. The resource is expected to be deleted (no longer visible + // from resource lists, and not reachable by name) after the time in this field. Once set, + // this value may not be unset or be set further into the future, although it may be shortened + // or the resource may be deleted prior to this time. For example, a user may request that + // a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination + // signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard + // termination signal (SIGKILL) to the container and after cleanup, remove the pod from the + // API. In the presence of network partitions, this object may still exist after this + // timestamp, until an administrator or automated process can determine the resource is + // fully terminated. + // If not set, graceful deletion of the object has not been requested. + // + // Populated by the system when a graceful deletion is requested. + // Read-only. + // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + // +optional + DeletionTimestamp *Time `json:"deletionTimestamp,omitempty" protobuf:"bytes,9,opt,name=deletionTimestamp"` + + // Number of seconds allowed for this object to gracefully terminate before + // it will be removed from the system. Only set when deletionTimestamp is also set. + // May only be shortened. + // Read-only. + // +optional + DeletionGracePeriodSeconds *int64 `json:"deletionGracePeriodSeconds,omitempty" protobuf:"varint,10,opt,name=deletionGracePeriodSeconds"` + + // Map of string keys and values that can be used to organize and categorize + // (scope and select) objects. May match selectors of replication controllers + // and services. + // More info: http://kubernetes.io/docs/user-guide/labels + // +optional + Labels map[string]string `json:"labels,omitempty" protobuf:"bytes,11,rep,name=labels"` + + // Annotations is an unstructured key value map stored with a resource that may be + // set by external tools to store and retrieve arbitrary metadata. They are not + // queryable and should be preserved when modifying objects. + // More info: http://kubernetes.io/docs/user-guide/annotations + // +optional + Annotations map[string]string `json:"annotations,omitempty" protobuf:"bytes,12,rep,name=annotations"` + + // List of objects depended by this object. If ALL objects in the list have + // been deleted, this object will be garbage collected. If this object is managed by a controller, + // then an entry in this list will point to this controller, with the controller field set to true. + // There cannot be more than one managing controller. + // +optional + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" patchStrategy:"merge" patchMergeKey:"uid" protobuf:"bytes,13,rep,name=ownerReferences"` + + // Must be empty before the object is deleted from the registry. Each entry + // is an identifier for the responsible component that will remove the entry + // from the list. If the deletionTimestamp of the object is non-nil, entries + // in this list can only be removed. + // +optional + Finalizers []string `json:"finalizers,omitempty" patchStrategy:"merge" protobuf:"bytes,14,rep,name=finalizers"` + + // The name of the cluster which the object belongs to. + // This is used to distinguish resources with same name and namespace in different clusters. + // This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. + // +optional + ClusterName string `json:"clusterName,omitempty" protobuf:"bytes,15,opt,name=clusterName"` +} + +const ( + // NamespaceDefault means the object is in the default namespace which is applied when not specified by clients + NamespaceDefault string = "default" + // NamespaceAll is the default argument to specify on a context when you want to list or filter resources across all namespaces + NamespaceAll string = "" + // NamespaceNone is the argument for a context when there is no namespace. + NamespaceNone string = "" + // NamespaceSystem is the system namespace where we place system components. + NamespaceSystem string = "kube-system" +) + // OwnerReference contains enough information to let you identify an owning // object. Currently, an owning object must be in the same namespace, so there // is no namespace field. @@ -91,6 +250,35 @@ type OwnerReference struct { Controller *bool `json:"controller,omitempty" protobuf:"varint,6,opt,name=controller"` } +// ListOptions is the query options to a standard REST list call. +type ListOptions struct { + TypeMeta `json:",inline"` + + // A selector to restrict the list of returned objects by their labels. + // Defaults to everything. + // +optional + LabelSelector string `json:"labelSelector,omitempty" protobuf:"bytes,1,opt,name=labelSelector"` + // A selector to restrict the list of returned objects by their fields. + // Defaults to everything. + // +optional + FieldSelector string `json:"fieldSelector,omitempty" protobuf:"bytes,2,opt,name=fieldSelector"` + // Watch for changes to the described resources and return them as a stream of + // add, update, and remove notifications. Specify resourceVersion. + // +optional + Watch bool `json:"watch,omitempty" protobuf:"varint,3,opt,name=watch"` + // When specified with a watch call, shows changes that occur after that particular version of a resource. + // Defaults to changes from the beginning of history. + // When specified for list: + // - if unset, then the result is returned from remote storage based on quorum-read flag; + // - if it's 0, then we simply return what we currently have in cache, no guarantee; + // - if set to non zero, then the result is at least as fresh as given rv. + // +optional + ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,4,opt,name=resourceVersion"` + // Timeout for the list/watch call. + // +optional + TimeoutSeconds *int64 `json:"timeoutSeconds,omitempty" protobuf:"varint,5,opt,name=timeoutSeconds"` +} + // ExportOptions is the query options to the standard REST get call. type ExportOptions struct { TypeMeta `json:",inline"` @@ -110,6 +298,35 @@ type GetOptions struct { ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,1,opt,name=resourceVersion"` } +// DeleteOptions may be provided when deleting an API object. +type DeleteOptions struct { + TypeMeta `json:",inline"` + + // The duration in seconds before the object should be deleted. Value must be non-negative integer. + // The value zero indicates delete immediately. If this value is nil, the default grace period for the + // specified type will be used. + // Defaults to a per object value if not specified. zero means delete immediately. + // +optional + GracePeriodSeconds *int64 `json:"gracePeriodSeconds,omitempty" protobuf:"varint,1,opt,name=gracePeriodSeconds"` + + // Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be + // returned. + // +optional + Preconditions *Preconditions `json:"preconditions,omitempty" protobuf:"bytes,2,opt,name=preconditions"` + + // Should the dependent objects be orphaned. If true/false, the "orphan" + // finalizer will be added to/removed from the object's finalizers list. + // +optional + OrphanDependents *bool `json:"orphanDependents,omitempty" protobuf:"varint,3,opt,name=orphanDependents"` +} + +// Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out. +type Preconditions struct { + // Specifies the target UID. + // +optional + UID *types.UID `json:"uid,omitempty" protobuf:"bytes,1,opt,name=uid,casttype=k8s.io/apimachinery/pkg/types.UID"` +} + // Status is a return value for calls that don't return other objects. type Status struct { TypeMeta `json:",inline"` diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go index 0cc65f1b..3b23e525 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go @@ -80,6 +80,17 @@ func (APIVersions) SwaggerDoc() map[string]string { return map_APIVersions } +var map_DeleteOptions = map[string]string{ + "": "DeleteOptions may be provided when deleting an API object.", + "gracePeriodSeconds": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "preconditions": "Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.", + "orphanDependents": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", +} + +func (DeleteOptions) SwaggerDoc() map[string]string { + return map_DeleteOptions +} + var map_ExportOptions = map[string]string{ "": "ExportOptions is the query options to the standard REST get call.", "export": "Should this value be exported. Export strips fields that a user can not specify.", @@ -140,6 +151,42 @@ func (ListMeta) SwaggerDoc() map[string]string { return map_ListMeta } +var map_ListOptions = map[string]string{ + "": "ListOptions is the query options to a standard REST list call.", + "labelSelector": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "fieldSelector": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "watch": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "resourceVersion": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "timeoutSeconds": "Timeout for the list/watch call.", +} + +func (ListOptions) SwaggerDoc() map[string]string { + return map_ListOptions +} + +var map_ObjectMeta = map[string]string{ + "": "ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.", + "name": "Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names", + "generateName": "GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.\n\nIf this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).\n\nApplied only if Name is not specified. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#idempotency", + "namespace": "Namespace defines the space within each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.\n\nMust be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces", + "selfLink": "SelfLink is a URL representing this object. Populated by the system. Read-only.", + "uid": "UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.\n\nPopulated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids", + "resourceVersion": "An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.\n\nPopulated by the system. Read-only. Value must be treated as opaque by clients and . More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency", + "generation": "A sequence number representing a specific generation of the desired state. Populated by the system. Read-only.", + "creationTimestamp": "CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system. Read-only. Null for lists. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", + "deletionTimestamp": "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field. Once set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested. Read-only. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", + "deletionGracePeriodSeconds": "Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only.", + "labels": "Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels", + "annotations": "Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations", + "ownerReferences": "List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller.", + "finalizers": "Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed.", + "clusterName": "The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.", +} + +func (ObjectMeta) SwaggerDoc() map[string]string { + return map_ObjectMeta +} + var map_OwnerReference = map[string]string{ "": "OwnerReference contains enough information to let you identify an owning object. Currently, an owning object must be in the same namespace, so there is no namespace field.", "apiVersion": "API version of the referent.", @@ -161,6 +208,15 @@ func (Patch) SwaggerDoc() map[string]string { return map_Patch } +var map_Preconditions = map[string]string{ + "": "Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.", + "uid": "Specifies the target UID.", +} + +func (Preconditions) SwaggerDoc() map[string]string { + return map_Preconditions +} + var map_RootPaths = map[string]string{ "": "RootPaths lists the paths available at root. For example: \"/healthz\", \"/apis\".", "paths": "paths are the paths available at root.", diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured.go index 92530758..bb16abe4 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured.go @@ -48,6 +48,7 @@ type Unstructured struct { Object map[string]interface{} } +var _ metav1.Object = &Unstructured{} var _ runtime.Unstructured = &Unstructured{} var _ runtime.Unstructured = &UnstructuredList{} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.deepcopy.go index 82545002..4bc909c1 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.deepcopy.go @@ -23,6 +23,7 @@ package v1 import ( conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" + types "k8s.io/apimachinery/pkg/types" reflect "reflect" ) @@ -34,6 +35,7 @@ func GetGeneratedDeepCopyFuncs() []conversion.GeneratedDeepCopyFunc { {Fn: DeepCopy_v1_APIResource, InType: reflect.TypeOf(&APIResource{})}, {Fn: DeepCopy_v1_APIResourceList, InType: reflect.TypeOf(&APIResourceList{})}, {Fn: DeepCopy_v1_APIVersions, InType: reflect.TypeOf(&APIVersions{})}, + {Fn: DeepCopy_v1_DeleteOptions, InType: reflect.TypeOf(&DeleteOptions{})}, {Fn: DeepCopy_v1_Duration, InType: reflect.TypeOf(&Duration{})}, {Fn: DeepCopy_v1_ExportOptions, InType: reflect.TypeOf(&ExportOptions{})}, {Fn: DeepCopy_v1_GetOptions, InType: reflect.TypeOf(&GetOptions{})}, @@ -47,8 +49,11 @@ func GetGeneratedDeepCopyFuncs() []conversion.GeneratedDeepCopyFunc { {Fn: DeepCopy_v1_LabelSelector, InType: reflect.TypeOf(&LabelSelector{})}, {Fn: DeepCopy_v1_LabelSelectorRequirement, InType: reflect.TypeOf(&LabelSelectorRequirement{})}, {Fn: DeepCopy_v1_ListMeta, InType: reflect.TypeOf(&ListMeta{})}, + {Fn: DeepCopy_v1_ListOptions, InType: reflect.TypeOf(&ListOptions{})}, + {Fn: DeepCopy_v1_ObjectMeta, InType: reflect.TypeOf(&ObjectMeta{})}, {Fn: DeepCopy_v1_OwnerReference, InType: reflect.TypeOf(&OwnerReference{})}, {Fn: DeepCopy_v1_Patch, InType: reflect.TypeOf(&Patch{})}, + {Fn: DeepCopy_v1_Preconditions, InType: reflect.TypeOf(&Preconditions{})}, {Fn: DeepCopy_v1_RootPaths, InType: reflect.TypeOf(&RootPaths{})}, {Fn: DeepCopy_v1_ServerAddressByClientCIDR, InType: reflect.TypeOf(&ServerAddressByClientCIDR{})}, {Fn: DeepCopy_v1_Status, InType: reflect.TypeOf(&Status{})}, @@ -69,16 +74,12 @@ func DeepCopy_v1_APIGroup(in interface{}, out interface{}, c *conversion.Cloner) if in.Versions != nil { in, out := &in.Versions, &out.Versions *out = make([]GroupVersionForDiscovery, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.ServerAddressByClientCIDRs != nil { in, out := &in.ServerAddressByClientCIDRs, &out.ServerAddressByClientCIDRs *out = make([]ServerAddressByClientCIDR, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } @@ -93,8 +94,10 @@ func DeepCopy_v1_APIGroupList(in interface{}, out interface{}, c *conversion.Clo in, out := &in.Groups, &out.Groups *out = make([]APIGroup, len(*in)) for i := range *in { - if err := DeepCopy_v1_APIGroup(&(*in)[i], &(*out)[i], c); err != nil { + if newVal, err := c.DeepCopy(&(*in)[i]); err != nil { return err + } else { + (*out)[i] = *newVal.(*APIGroup) } } } @@ -125,8 +128,10 @@ func DeepCopy_v1_APIResourceList(in interface{}, out interface{}, c *conversion. in, out := &in.APIResources, &out.APIResources *out = make([]APIResource, len(*in)) for i := range *in { - if err := DeepCopy_v1_APIResource(&(*in)[i], &(*out)[i], c); err != nil { + if newVal, err := c.DeepCopy(&(*in)[i]); err != nil { return err + } else { + (*out)[i] = *newVal.(*APIResource) } } } @@ -147,10 +152,35 @@ func DeepCopy_v1_APIVersions(in interface{}, out interface{}, c *conversion.Clon if in.ServerAddressByClientCIDRs != nil { in, out := &in.ServerAddressByClientCIDRs, &out.ServerAddressByClientCIDRs *out = make([]ServerAddressByClientCIDR, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] + copy(*out, *in) + } + return nil + } +} + +func DeepCopy_v1_DeleteOptions(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*DeleteOptions) + out := out.(*DeleteOptions) + *out = *in + if in.GracePeriodSeconds != nil { + in, out := &in.GracePeriodSeconds, &out.GracePeriodSeconds + *out = new(int64) + **out = **in + } + if in.Preconditions != nil { + in, out := &in.Preconditions, &out.Preconditions + if newVal, err := c.DeepCopy(*in); err != nil { + return err + } else { + *out = newVal.(*Preconditions) } } + if in.OrphanDependents != nil { + in, out := &in.OrphanDependents, &out.OrphanDependents + *out = new(bool) + **out = **in + } return nil } } @@ -269,8 +299,10 @@ func DeepCopy_v1_LabelSelector(in interface{}, out interface{}, c *conversion.Cl in, out := &in.MatchExpressions, &out.MatchExpressions *out = make([]LabelSelectorRequirement, len(*in)) for i := range *in { - if err := DeepCopy_v1_LabelSelectorRequirement(&(*in)[i], &(*out)[i], c); err != nil { + if newVal, err := c.DeepCopy(&(*in)[i]); err != nil { return err + } else { + (*out)[i] = *newVal.(*LabelSelectorRequirement) } } } @@ -301,6 +333,70 @@ func DeepCopy_v1_ListMeta(in interface{}, out interface{}, c *conversion.Cloner) } } +func DeepCopy_v1_ListOptions(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*ListOptions) + out := out.(*ListOptions) + *out = *in + if in.TimeoutSeconds != nil { + in, out := &in.TimeoutSeconds, &out.TimeoutSeconds + *out = new(int64) + **out = **in + } + return nil + } +} + +func DeepCopy_v1_ObjectMeta(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*ObjectMeta) + out := out.(*ObjectMeta) + *out = *in + out.CreationTimestamp = in.CreationTimestamp.DeepCopy() + if in.DeletionTimestamp != nil { + in, out := &in.DeletionTimestamp, &out.DeletionTimestamp + *out = new(Time) + **out = (*in).DeepCopy() + } + if in.DeletionGracePeriodSeconds != nil { + in, out := &in.DeletionGracePeriodSeconds, &out.DeletionGracePeriodSeconds + *out = new(int64) + **out = **in + } + if in.Labels != nil { + in, out := &in.Labels, &out.Labels + *out = make(map[string]string) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Annotations != nil { + in, out := &in.Annotations, &out.Annotations + *out = make(map[string]string) + for key, val := range *in { + (*out)[key] = val + } + } + if in.OwnerReferences != nil { + in, out := &in.OwnerReferences, &out.OwnerReferences + *out = make([]OwnerReference, len(*in)) + for i := range *in { + if newVal, err := c.DeepCopy(&(*in)[i]); err != nil { + return err + } else { + (*out)[i] = *newVal.(*OwnerReference) + } + } + } + if in.Finalizers != nil { + in, out := &in.Finalizers, &out.Finalizers + *out = make([]string, len(*in)) + copy(*out, *in) + } + return nil + } +} + func DeepCopy_v1_OwnerReference(in interface{}, out interface{}, c *conversion.Cloner) error { { in := in.(*OwnerReference) @@ -324,6 +420,20 @@ func DeepCopy_v1_Patch(in interface{}, out interface{}, c *conversion.Cloner) er } } +func DeepCopy_v1_Preconditions(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*Preconditions) + out := out.(*Preconditions) + *out = *in + if in.UID != nil { + in, out := &in.UID, &out.UID + *out = new(types.UID) + **out = **in + } + return nil + } +} + func DeepCopy_v1_RootPaths(in interface{}, out interface{}, c *conversion.Cloner) error { { in := in.(*RootPaths) @@ -354,9 +464,10 @@ func DeepCopy_v1_Status(in interface{}, out interface{}, c *conversion.Cloner) e *out = *in if in.Details != nil { in, out := &in.Details, &out.Details - *out = new(StatusDetails) - if err := DeepCopy_v1_StatusDetails(*in, *out, c); err != nil { + if newVal, err := c.DeepCopy(*in); err != nil { return err + } else { + *out = newVal.(*StatusDetails) } } return nil @@ -380,9 +491,7 @@ func DeepCopy_v1_StatusDetails(in interface{}, out interface{}, c *conversion.Cl if in.Causes != nil { in, out := &in.Causes, &out.Causes *out = make([]StatusCause, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } @@ -420,8 +529,10 @@ func DeepCopy_v1_WatchEvent(in interface{}, out interface{}, c *conversion.Clone in := in.(*WatchEvent) out := out.(*WatchEvent) *out = *in - if err := runtime.DeepCopy_runtime_RawExtension(&in.Object, &out.Object, c); err != nil { + if newVal, err := c.DeepCopy(&in.Object); err != nil { return err + } else { + out.Object = *newVal.(*runtime.RawExtension) } return nil } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/conversion/OWNERS b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/conversion/OWNERS index a046efc0..c25e7faf 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/conversion/OWNERS +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/conversion/OWNERS @@ -1,5 +1,10 @@ -assignees: - - derekwaynecarr - - lavalamp - - smarterclayton - - wojtek-t +approvers: +- derekwaynecarr +- lavalamp +- smarterclayton +- wojtek-t +reviewers: +- derekwaynecarr +- lavalamp +- smarterclayton +- wojtek-t diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/fields/doc.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/fields/doc.go new file mode 100644 index 00000000..c39b8039 --- /dev/null +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/fields/doc.go @@ -0,0 +1,19 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package fields implements a simple field system, parsing and matching +// selectors with sets of fields. +package fields // import "k8s.io/apimachinery/pkg/fields" diff --git a/vendor/k8s.io/kubernetes/pkg/fields/fields.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/fields/fields.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/fields/fields.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/fields/fields.go diff --git a/vendor/k8s.io/kubernetes/pkg/fields/fields_test.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/fields/fields_test.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/fields/fields_test.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/fields/fields_test.go diff --git a/vendor/k8s.io/kubernetes/pkg/fields/requirements.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/fields/requirements.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/fields/requirements.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/fields/requirements.go diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/fields/selector.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/fields/selector.go similarity index 58% rename from vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/fields/selector.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/fields/selector.go index 3959c032..554d011d 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/fields/selector.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/fields/selector.go @@ -17,6 +17,7 @@ limitations under the License. package fields import ( + "bytes" "fmt" "sort" "strings" @@ -90,7 +91,7 @@ func (t *hasTerm) Requirements() Requirements { } func (t *hasTerm) String() string { - return fmt.Sprintf("%v=%v", t.field, t.value) + return fmt.Sprintf("%v=%v", t.field, EscapeValue(t.value)) } type notHasTerm struct { @@ -126,7 +127,7 @@ func (t *notHasTerm) Requirements() Requirements { } func (t *notHasTerm) String() string { - return fmt.Sprintf("%v!=%v", t.field, t.value) + return fmt.Sprintf("%v!=%v", t.field, EscapeValue(t.value)) } type andTerm []Selector @@ -212,6 +213,81 @@ func SelectorFromSet(ls Set) Selector { return andTerm(items) } +// valueEscaper prefixes \,= characters with a backslash +var valueEscaper = strings.NewReplacer( + // escape \ characters + `\`, `\\`, + // then escape , and = characters to allow unambiguous parsing of the value in a fieldSelector + `,`, `\,`, + `=`, `\=`, +) + +// Escapes an arbitrary literal string for use as a fieldSelector value +func EscapeValue(s string) string { + return valueEscaper.Replace(s) +} + +// InvalidEscapeSequence indicates an error occurred unescaping a field selector +type InvalidEscapeSequence struct { + sequence string +} + +func (i InvalidEscapeSequence) Error() string { + return fmt.Sprintf("invalid field selector: invalid escape sequence: %s", i.sequence) +} + +// UnescapedRune indicates an error occurred unescaping a field selector +type UnescapedRune struct { + r rune +} + +func (i UnescapedRune) Error() string { + return fmt.Sprintf("invalid field selector: unescaped character in value: %v", i.r) +} + +// Unescapes a fieldSelector value and returns the original literal value. +// May return the original string if it contains no escaped or special characters. +func UnescapeValue(s string) (string, error) { + // if there's no escaping or special characters, just return to avoid allocation + if !strings.ContainsAny(s, `\,=`) { + return s, nil + } + + v := bytes.NewBuffer(make([]byte, 0, len(s))) + inSlash := false + for _, c := range s { + if inSlash { + switch c { + case '\\', ',', '=': + // omit the \ for recognized escape sequences + v.WriteRune(c) + default: + // error on unrecognized escape sequences + return "", InvalidEscapeSequence{sequence: string([]rune{'\\', c})} + } + inSlash = false + continue + } + + switch c { + case '\\': + inSlash = true + case ',', '=': + // unescaped , and = characters are not allowed in field selector values + return "", UnescapedRune{r: c} + default: + v.WriteRune(c) + } + } + + // Ending with a single backslash is an invalid sequence + if inSlash { + return "", InvalidEscapeSequence{sequence: "\\"} + } + + return v.String(), nil +} + // ParseSelectorOrDie takes a string representing a selector and returns an // object suitable for matching, or panic when an error occur. func ParseSelectorOrDie(s string) Selector { @@ -239,29 +315,83 @@ func ParseAndTransformSelector(selector string, fn TransformFunc) (Selector, err // Function to transform selectors. type TransformFunc func(field, value string) (newField, newValue string, err error) -func try(selectorPiece, op string) (lhs, rhs string, ok bool) { - pieces := strings.Split(selectorPiece, op) - if len(pieces) == 2 { - return pieces[0], pieces[1], true +// splitTerms returns the comma-separated terms contained in the given fieldSelector. +// Backslash-escaped commas are treated as data instead of delimiters, and are included in the returned terms, with the leading backslash preserved. +func splitTerms(fieldSelector string) []string { + if len(fieldSelector) == 0 { + return nil } - return "", "", false + + terms := make([]string, 0, 1) + startIndex := 0 + inSlash := false + for i, c := range fieldSelector { + switch { + case inSlash: + inSlash = false + case c == '\\': + inSlash = true + case c == ',': + terms = append(terms, fieldSelector[startIndex:i]) + startIndex = i + 1 + } + } + + terms = append(terms, fieldSelector[startIndex:]) + + return terms +} + +const ( + notEqualOperator = "!=" + doubleEqualOperator = "==" + equalOperator = "=" +) + +// termOperators holds the recognized operators supported in fieldSelectors. +// doubleEqualOperator and equal are equivalent, but doubleEqualOperator is checked first +// to avoid leaving a leading = character on the rhs value. +var termOperators = []string{notEqualOperator, doubleEqualOperator, equalOperator} + +// splitTerm returns the lhs, operator, and rhs parsed from the given term, along with an indicator of whether the parse was successful. +// no escaping of special characters is supported in the lhs value, so the first occurance of a recognized operator is used as the split point. +// the literal rhs is returned, and the caller is responsible for applying any desired unescaping. +func splitTerm(term string) (lhs, op, rhs string, ok bool) { + for i := range term { + remaining := term[i:] + for _, op := range termOperators { + if strings.HasPrefix(remaining, op) { + return term[0:i], op, term[i+len(op):], true + } + } + } + return "", "", "", false } func parseSelector(selector string, fn TransformFunc) (Selector, error) { - parts := strings.Split(selector, ",") + parts := splitTerms(selector) sort.StringSlice(parts).Sort() var items []Selector for _, part := range parts { if part == "" { continue } - if lhs, rhs, ok := try(part, "!="); ok { - items = append(items, ¬HasTerm{field: lhs, value: rhs}) - } else if lhs, rhs, ok := try(part, "=="); ok { - items = append(items, &hasTerm{field: lhs, value: rhs}) - } else if lhs, rhs, ok := try(part, "="); ok { - items = append(items, &hasTerm{field: lhs, value: rhs}) - } else { + lhs, op, rhs, ok := splitTerm(part) + if !ok { + return nil, fmt.Errorf("invalid selector: '%s'; can't understand '%s'", selector, part) + } + unescapedRHS, err := UnescapeValue(rhs) + if err != nil { + return nil, err + } + switch op { + case notEqualOperator: + items = append(items, ¬HasTerm{field: lhs, value: unescapedRHS}) + case doubleEqualOperator: + items = append(items, &hasTerm{field: lhs, value: unescapedRHS}) + case equalOperator: + items = append(items, &hasTerm{field: lhs, value: unescapedRHS}) + default: return nil, fmt.Errorf("invalid selector: '%s'; can't understand '%s'", selector, part) } } diff --git a/vendor/k8s.io/kubernetes/pkg/fields/selector_test.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/fields/selector_test.go similarity index 60% rename from vendor/k8s.io/kubernetes/pkg/fields/selector_test.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/fields/selector_test.go index be0819e6..458d1574 100644 --- a/vendor/k8s.io/kubernetes/pkg/fields/selector_test.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/fields/selector_test.go @@ -17,18 +17,134 @@ limitations under the License. package fields import ( + "reflect" "testing" ) +func TestSplitTerms(t *testing.T) { + testcases := map[string][]string{ + // Simple selectors + `a`: {`a`}, + `a=avalue`: {`a=avalue`}, + `a=avalue,b=bvalue`: {`a=avalue`, `b=bvalue`}, + `a=avalue,b==bvalue,c!=cvalue`: {`a=avalue`, `b==bvalue`, `c!=cvalue`}, + + // Empty terms + ``: nil, + `a=a,`: {`a=a`, ``}, + `,a=a`: {``, `a=a`}, + + // Escaped values + `k=\,,k2=v2`: {`k=\,`, `k2=v2`}, // escaped comma in value + `k=\\,k2=v2`: {`k=\\`, `k2=v2`}, // escaped backslash, unescaped comma + `k=\\\,,k2=v2`: {`k=\\\,`, `k2=v2`}, // escaped backslash and comma + `k=\a\b\`: {`k=\a\b\`}, // non-escape sequences + `k=\`: {`k=\`}, // orphan backslash + + // Multi-byte + `함=수,목=록`: {`함=수`, `목=록`}, + } + + for selector, expectedTerms := range testcases { + if terms := splitTerms(selector); !reflect.DeepEqual(terms, expectedTerms) { + t.Errorf("splitSelectors(`%s`): Expected\n%#v\ngot\n%#v", selector, expectedTerms, terms) + } + } +} + +func TestSplitTerm(t *testing.T) { + testcases := map[string]struct { + lhs string + op string + rhs string + ok bool + }{ + // Simple terms + `a=value`: {lhs: `a`, op: `=`, rhs: `value`, ok: true}, + `b==value`: {lhs: `b`, op: `==`, rhs: `value`, ok: true}, + `c!=value`: {lhs: `c`, op: `!=`, rhs: `value`, ok: true}, + + // Empty or invalid terms + ``: {lhs: ``, op: ``, rhs: ``, ok: false}, + `a`: {lhs: ``, op: ``, rhs: ``, ok: false}, + + // Escaped values + `k=\,`: {lhs: `k`, op: `=`, rhs: `\,`, ok: true}, + `k=\=`: {lhs: `k`, op: `=`, rhs: `\=`, ok: true}, + `k=\\\a\b\=\,\`: {lhs: `k`, op: `=`, rhs: `\\\a\b\=\,\`, ok: true}, + + // Multi-byte + `함=수`: {lhs: `함`, op: `=`, rhs: `수`, ok: true}, + } + + for term, expected := range testcases { + lhs, op, rhs, ok := splitTerm(term) + if lhs != expected.lhs || op != expected.op || rhs != expected.rhs || ok != expected.ok { + t.Errorf( + "splitTerm(`%s`): Expected\n%s,%s,%s,%v\nGot\n%s,%s,%s,%v", + term, + expected.lhs, expected.op, expected.rhs, expected.ok, + lhs, op, rhs, ok, + ) + } + } +} + +func TestEscapeValue(t *testing.T) { + // map values to their normalized escaped values + testcases := map[string]string{ + ``: ``, + `a`: `a`, + `=`: `\=`, + `,`: `\,`, + `\`: `\\`, + `\=\,\`: `\\\=\\\,\\`, + } + + for unescapedValue, escapedValue := range testcases { + actualEscaped := EscapeValue(unescapedValue) + if actualEscaped != escapedValue { + t.Errorf("EscapeValue(%s): expected %s, got %s", unescapedValue, escapedValue, actualEscaped) + } + + actualUnescaped, err := UnescapeValue(escapedValue) + if err != nil { + t.Errorf("UnescapeValue(%s): unexpected error %v", escapedValue, err) + } + if actualUnescaped != unescapedValue { + t.Errorf("UnescapeValue(%s): expected %s, got %s", escapedValue, unescapedValue, actualUnescaped) + } + } + + // test invalid escape sequences + invalidTestcases := []string{ + `\`, // orphan slash is invalid + `\\\`, // orphan slash is invalid + `\a`, // unrecognized escape sequence is invalid + } + for _, invalidValue := range invalidTestcases { + _, err := UnescapeValue(invalidValue) + if _, ok := err.(InvalidEscapeSequence); !ok || err == nil { + t.Errorf("UnescapeValue(%s): expected invalid escape sequence error, got %#v", invalidValue, err) + } + } +} + func TestSelectorParse(t *testing.T) { testGoodStrings := []string{ "x=a,y=b,z=c", "", "x!=a,y=b", + `x=a||y\=b`, + `x=a\=\=b`, } testBadStrings := []string{ "x=a||y=b", "x==a==b", + "x=a,b", + "x in (a)", + "x in (a,b,c)", + "x", } for _, test := range testGoodStrings { lq, err := ParseSelector(test) @@ -99,16 +215,18 @@ func TestSelectorMatches(t *testing.T) { expectNoMatch(t, "x=y,z=w", Set{"x": "w", "z": "w"}) expectNoMatch(t, "x!=y,z!=w", Set{"x": "z", "z": "w"}) - labelset := Set{ - "foo": "bar", - "baz": "blah", + fieldset := Set{ + "foo": "bar", + "baz": "blah", + "complex": `=value\,\`, } - expectMatch(t, "foo=bar", labelset) - expectMatch(t, "baz=blah", labelset) - expectMatch(t, "foo=bar,baz=blah", labelset) - expectNoMatch(t, "foo=blah", labelset) - expectNoMatch(t, "baz=bar", labelset) - expectNoMatch(t, "foo=bar,foobar=bar,baz=blah", labelset) + expectMatch(t, "foo=bar", fieldset) + expectMatch(t, "baz=blah", fieldset) + expectMatch(t, "foo=bar,baz=blah", fieldset) + expectMatch(t, `foo=bar,baz=blah,complex=\=value\\\,\\`, fieldset) + expectNoMatch(t, "foo=blah", fieldset) + expectNoMatch(t, "baz=bar", fieldset) + expectNoMatch(t, "foo=bar,foobar=bar,baz=blah", fieldset) } func TestOneTermEqualSelector(t *testing.T) { diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/labels/selector.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/labels/selector.go index 501d0187..9bddc35a 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/labels/selector.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/labels/selector.go @@ -62,7 +62,7 @@ type nothingSelector struct{} func (n nothingSelector) Matches(_ Labels) bool { return false } func (n nothingSelector) Empty() bool { return false } -func (n nothingSelector) String() string { return "" } +func (n nothingSelector) String() string { return "" } func (n nothingSelector) Add(_ ...Requirement) Selector { return n } func (n nothingSelector) Requirements() (Requirements, bool) { return nil, false } @@ -793,7 +793,7 @@ func validateLabelValue(v string) error { // SelectorFromSet returns a Selector which will match exactly the given Set. A // nil and empty Sets are considered equivalent to Everything(). func SelectorFromSet(ls Set) Selector { - if ls == nil { + if ls == nil || len(ls) == 0 { return internalSelector{} } var requirements internalSelector @@ -807,14 +807,14 @@ func SelectorFromSet(ls Set) Selector { } // sort to have deterministic string representation sort.Sort(ByKey(requirements)) - return internalSelector(requirements) + return requirements } // SelectorFromValidatedSet returns a Selector which will match exactly the given Set. // A nil and empty Sets are considered equivalent to Everything(). // It assumes that Set is already validated and doesn't do any validation. func SelectorFromValidatedSet(ls Set) Selector { - if ls == nil { + if ls == nil || len(ls) == 0 { return internalSelector{} } var requirements internalSelector @@ -823,7 +823,7 @@ func SelectorFromValidatedSet(ls Set) Selector { } // sort to have deterministic string representation sort.Sort(ByKey(requirements)) - return internalSelector(requirements) + return requirements } // ParseToRequirements takes a string representing a selector and returns a list of diff --git a/vendor/k8s.io/kubernetes/pkg/types/uid.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/types/patch.go similarity index 58% rename from vendor/k8s.io/kubernetes/pkg/types/uid.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/types/patch.go index 86933922..d522d1db 100644 --- a/vendor/k8s.io/kubernetes/pkg/types/uid.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/types/patch.go @@ -16,7 +16,13 @@ limitations under the License. package types -// UID is a type that holds unique ID values, including UUIDs. Because we -// don't ONLY use UUIDs, this is an alias to string. Being a type captures -// intent and helps make sure that UIDs and names do not get conflated. -type UID string +// Similarly to above, these are constants to support HTTP PATCH utilized by +// both the client and server that didn't make sense for a whole package to be +// dedicated to. +type PatchType string + +const ( + JSONPatchType PatchType = "application/json-patch+json" + MergePatchType PatchType = "application/merge-patch+json" + StrategicMergePatchType PatchType = "application/strategic-merge-patch+json" +) diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/version/doc.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/version/doc.go new file mode 100644 index 00000000..5e77af7e --- /dev/null +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/version/doc.go @@ -0,0 +1,19 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package version supplies the type for version information collected at build time. +// +k8s:openapi-gen=true +package version // import "k8s.io/apimachinery/pkg/version" diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/version/types.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/version/types.go new file mode 100644 index 00000000..72727b50 --- /dev/null +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apimachinery/pkg/version/types.go @@ -0,0 +1,37 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package version + +// Info contains versioning information. +// TODO: Add []string of api versions supported? It's still unclear +// how we'll want to distribute that information. +type Info struct { + Major string `json:"major"` + Minor string `json:"minor"` + GitVersion string `json:"gitVersion"` + GitCommit string `json:"gitCommit"` + GitTreeState string `json:"gitTreeState"` + BuildDate string `json:"buildDate"` + GoVersion string `json:"goVersion"` + Compiler string `json:"compiler"` + Platform string `json:"platform"` +} + +// String returns info as a human-friendly version string. +func (info Info) String() string { + return info.GitVersion +} diff --git a/vendor/k8s.io/kubernetes/pkg/admission/OWNERS b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/admission/OWNERS similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/admission/OWNERS rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/admission/OWNERS diff --git a/vendor/k8s.io/kubernetes/pkg/admission/attributes.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/admission/attributes.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/admission/attributes.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/admission/attributes.go diff --git a/vendor/k8s.io/kubernetes/pkg/admission/chain.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/admission/chain.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/admission/chain.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/admission/chain.go diff --git a/vendor/k8s.io/kubernetes/pkg/admission/chain_test.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/admission/chain_test.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/admission/chain_test.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/admission/chain_test.go diff --git a/vendor/k8s.io/kubernetes/pkg/admission/errors.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/admission/errors.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/admission/errors.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/admission/errors.go diff --git a/vendor/k8s.io/kubernetes/pkg/admission/handler.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/admission/handler.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/admission/handler.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/admission/handler.go diff --git a/vendor/k8s.io/kubernetes/pkg/admission/interfaces.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/admission/interfaces.go similarity index 94% rename from vendor/k8s.io/kubernetes/pkg/admission/interfaces.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/admission/interfaces.go index 703d3c2a..a8e671db 100644 --- a/vendor/k8s.io/kubernetes/pkg/admission/interfaces.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/admission/interfaces.go @@ -17,6 +17,8 @@ limitations under the License. package admission import ( + "io" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apiserver/pkg/authentication/user" @@ -81,3 +83,8 @@ type PluginInitializer interface { type Validator interface { Validate() error } + +// ConfigProvider provides a way to get configuration for an admission plugin based on its name +type ConfigProvider interface { + ConfigFor(pluginName string) (io.Reader, error) +} diff --git a/vendor/k8s.io/kubernetes/pkg/admission/plugins.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/admission/plugins.go similarity index 92% rename from vendor/k8s.io/kubernetes/pkg/admission/plugins.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/admission/plugins.go index 5f557e55..bb110f9b 100644 --- a/vendor/k8s.io/kubernetes/pkg/admission/plugins.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/admission/plugins.go @@ -113,16 +113,10 @@ func splitStream(config io.Reader) (io.Reader, io.Reader, error) { // NewFromPlugins returns an admission.Interface that will enforce admission control decisions of all // the given plugins. -func NewFromPlugins(pluginNames []string, configFilePath string, pluginInitializer PluginInitializer) (Interface, error) { - // load config file path into a componentconfig.AdmissionConfiguration - admissionCfg, err := ReadAdmissionConfiguration(pluginNames, configFilePath) - if err != nil { - return nil, err - } - +func NewFromPlugins(pluginNames []string, configProvider ConfigProvider, pluginInitializer PluginInitializer) (Interface, error) { plugins := []Interface{} for _, pluginName := range pluginNames { - pluginConfig, err := GetAdmissionPluginConfiguration(admissionCfg, pluginName) + pluginConfig, err := configProvider.ConfigFor(pluginName) if err != nil { return nil, err } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/authentication/request/headerrequest/requestheader.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/authentication/request/headerrequest/requestheader.go index 7b515c35..3c34db62 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/authentication/request/headerrequest/requestheader.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/authentication/request/headerrequest/requestheader.go @@ -27,7 +27,7 @@ import ( "k8s.io/apiserver/pkg/authentication/authenticator" x509request "k8s.io/apiserver/pkg/authentication/request/x509" "k8s.io/apiserver/pkg/authentication/user" - utilcert "k8s.io/client-go/pkg/util/cert" + utilcert "k8s.io/client-go/util/cert" ) type requestHeaderAuthRequestHandler struct { diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/authentication/serviceaccount/util.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/authentication/serviceaccount/util.go new file mode 100644 index 00000000..ac3c252b --- /dev/null +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/authentication/serviceaccount/util.go @@ -0,0 +1,73 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package serviceaccount + +import ( + "fmt" + "strings" + + apimachineryvalidation "k8s.io/apimachinery/pkg/api/validation" +) + +const ( + ServiceAccountUsernamePrefix = "system:serviceaccount:" + ServiceAccountUsernameSeparator = ":" + ServiceAccountGroupPrefix = "system:serviceaccounts:" + AllServiceAccountsGroup = "system:serviceaccounts" +) + +// MakeUsername generates a username from the given namespace and ServiceAccount name. +// The resulting username can be passed to SplitUsername to extract the original namespace and ServiceAccount name. +func MakeUsername(namespace, name string) string { + return ServiceAccountUsernamePrefix + namespace + ServiceAccountUsernameSeparator + name +} + +var invalidUsernameErr = fmt.Errorf("Username must be in the form %s", MakeUsername("namespace", "name")) + +// SplitUsername returns the namespace and ServiceAccount name embedded in the given username, +// or an error if the username is not a valid name produced by MakeUsername +func SplitUsername(username string) (string, string, error) { + if !strings.HasPrefix(username, ServiceAccountUsernamePrefix) { + return "", "", invalidUsernameErr + } + trimmed := strings.TrimPrefix(username, ServiceAccountUsernamePrefix) + parts := strings.Split(trimmed, ServiceAccountUsernameSeparator) + if len(parts) != 2 { + return "", "", invalidUsernameErr + } + namespace, name := parts[0], parts[1] + if len(apimachineryvalidation.ValidateNamespaceName(namespace, false)) != 0 { + return "", "", invalidUsernameErr + } + if len(apimachineryvalidation.ValidateServiceAccountName(name, false)) != 0 { + return "", "", invalidUsernameErr + } + return namespace, name, nil +} + +// MakeGroupNames generates service account group names for the given namespace and ServiceAccount name +func MakeGroupNames(namespace, name string) []string { + return []string{ + AllServiceAccountsGroup, + MakeNamespaceGroupName(namespace), + } +} + +// MakeNamespaceGroupName returns the name of the group all service accounts in the namespace are included in +func MakeNamespaceGroupName(namespace string) string { + return ServiceAccountGroupPrefix + namespace +} diff --git a/vendor/k8s.io/kubernetes/pkg/serviceaccount/util_test.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/authentication/serviceaccount/util_test.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/serviceaccount/util_test.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/authentication/serviceaccount/util_test.go diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/handlers/negotiation/doc.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/negotiation/doc.go similarity index 88% rename from vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/handlers/negotiation/doc.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/negotiation/doc.go index b03b273a..759db7a0 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/handlers/negotiation/doc.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/negotiation/doc.go @@ -15,4 +15,4 @@ limitations under the License. */ // Package negotation contains media type negotiation logic. -package negotiation // import "k8s.io/apiserver/pkg/handlers/negotiation" +package negotiation // import "k8s.io/apiserver/pkg/endpoints/handlers/negotiation" diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/handlers/negotiation/errors.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/negotiation/errors.go similarity index 100% rename from vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/handlers/negotiation/errors.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/negotiation/errors.go diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/handlers/negotiation/negotiate.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/negotiation/negotiate.go similarity index 100% rename from vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/handlers/negotiation/negotiate.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/negotiation/negotiate.go diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/handlers/negotiation/negotiate_test.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/negotiation/negotiate_test.go similarity index 100% rename from vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/handlers/negotiation/negotiate_test.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/negotiation/negotiate_test.go diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/metrics/OWNERS b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/endpoints/metrics/OWNERS similarity index 100% rename from vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/metrics/OWNERS rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/endpoints/metrics/OWNERS diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/metrics/metrics.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/endpoints/metrics/metrics.go similarity index 100% rename from vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/metrics/metrics.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/endpoints/metrics/metrics.go diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/request/OWNERS b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/endpoints/request/OWNERS similarity index 100% rename from vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/request/OWNERS rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/endpoints/request/OWNERS diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/request/context.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/endpoints/request/context.go similarity index 99% rename from vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/request/context.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/endpoints/request/context.go index b6e7d0db..cc64aa19 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/request/context.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/endpoints/request/context.go @@ -63,7 +63,7 @@ const ( // userAgentKey is the context key for the request user agent. userAgentKey - namespaceDefault = "default" // TODO(sttts): solve import cycle when using api.NamespaceDefault + namespaceDefault = "default" // TODO(sttts): solve import cycle when using metav1.NamespaceDefault ) // NewContext instantiates a base context object for request flows. diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/request/context_test.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/endpoints/request/context_test.go similarity index 94% rename from vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/request/context_test.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/endpoints/request/context_test.go index 3f8f62e8..365cb114 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/request/context_test.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/endpoints/request/context_test.go @@ -19,10 +19,10 @@ package request_test import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/apiserver/pkg/authentication/user" - genericapirequest "k8s.io/apiserver/pkg/request" - "k8s.io/kubernetes/pkg/api" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" ) // TestNamespaceContext validates that a namespace can be get/set on a context object @@ -32,8 +32,8 @@ func TestNamespaceContext(t *testing.T) { if !ok { t.Fatalf("Error getting namespace") } - if api.NamespaceDefault != result { - t.Fatalf("Expected: %s, Actual: %s", api.NamespaceDefault, result) + if metav1.NamespaceDefault != result { + t.Fatalf("Expected: %s, Actual: %s", metav1.NamespaceDefault, result) } ctx = genericapirequest.NewContext() diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/request/doc.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/endpoints/request/doc.go similarity index 92% rename from vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/request/doc.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/endpoints/request/doc.go index 20436ebb..96da6f2b 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/request/doc.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/endpoints/request/doc.go @@ -17,4 +17,4 @@ limitations under the License. // Package request contains everything around extracting info from // a http request object. // TODO: this package is temporary. Handlers must move into pkg/apiserver/handlers to avoid dependency cycle -package request // import "k8s.io/apiserver/pkg/request" +package request // import "k8s.io/apiserver/pkg/endpoints/request" diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/request/requestcontext.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/endpoints/request/requestcontext.go similarity index 100% rename from vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/request/requestcontext.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/endpoints/request/requestcontext.go diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/request/requestinfo.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/endpoints/request/requestinfo.go similarity index 99% rename from vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/request/requestinfo.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/endpoints/request/requestinfo.go index 4f231319..bbfc547a 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/request/requestinfo.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/endpoints/request/requestinfo.go @@ -176,7 +176,7 @@ func (r *RequestInfoFactory) NewRequestInfo(req *http.Request) (*RequestInfo, er } } } else { - requestInfo.Namespace = "" // TODO(sttts): solve import cycle when using api.NamespaceNone + requestInfo.Namespace = "" // TODO(sttts): solve import cycle when using metav1.NamespaceNone } // parsing successful, so we now know the proper value for .Parts diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/request/requestinfo_test.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/endpoints/request/requestinfo_test.go similarity index 99% rename from vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/request/requestinfo_test.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/endpoints/request/requestinfo_test.go index 6e8550f4..20ddb4b4 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/request/requestinfo_test.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/endpoints/request/requestinfo_test.go @@ -31,7 +31,7 @@ func (f fakeRL) TryAccept() bool { return bool(f) } func (f fakeRL) Accept() {} func TestGetAPIRequestInfo(t *testing.T) { - namespaceAll := "" // TODO(sttts): solve import cycle when using api.NamespaceAll + namespaceAll := "" // TODO(sttts): solve import cycle when using metav1.NamespaceAll successCases := []struct { method string url string diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/genericapiserver/openapi/common/doc.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/server/doc.go similarity index 80% rename from vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/genericapiserver/openapi/common/doc.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/server/doc.go index 0308d58b..b5f97c65 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/genericapiserver/openapi/common/doc.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/server/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,5 @@ See the License for the specific language governing permissions and limitations under the License. */ -// package common holds shared codes and types between open API code generator and spec generator. -package common +// Package server contains the plumbing to create kubernetes-like API server command. +package server diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/healthz/doc.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/server/healthz/doc.go similarity index 85% rename from vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/healthz/doc.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/server/healthz/doc.go index a1549e2f..06e67f6f 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/healthz/doc.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/server/healthz/doc.go @@ -16,6 +16,6 @@ limitations under the License. // Package healthz implements basic http server health checking. // Usage: -// import "k8s.io/apiserver/pkg/healthz" +// import "k8s.io/apiserver/pkg/server/healthz" // healthz.DefaultHealthz() -package healthz // import "k8s.io/apiserver/pkg/healthz" +package healthz // import "k8s.io/apiserver/pkg/server/healthz" diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/healthz/healthz.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/server/healthz/healthz.go similarity index 100% rename from vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/healthz/healthz.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/server/healthz/healthz.go diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/healthz/healthz_test.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/server/healthz/healthz_test.go similarity index 100% rename from vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/healthz/healthz_test.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/server/healthz/healthz_test.go diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/httplog/doc.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/server/httplog/doc.go similarity index 91% rename from vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/httplog/doc.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/server/httplog/doc.go index ade3e974..caa6572c 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/httplog/doc.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/server/httplog/doc.go @@ -16,4 +16,4 @@ limitations under the License. // Package httplog contains a helper object and functions to maintain a log // along with an http response. -package httplog // import "k8s.io/apiserver/pkg/httplog" +package httplog // import "k8s.io/apiserver/pkg/server/httplog" diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/httplog/log.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/server/httplog/log.go similarity index 100% rename from vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/httplog/log.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/server/httplog/log.go diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/httplog/log_test.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/server/httplog/log_test.go similarity index 100% rename from vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/httplog/log_test.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/server/httplog/log_test.go diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/storage/names/generate_test.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/storage/names/generate_test.go index d0ca0885..e55845a2 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/storage/names/generate_test.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/storage/names/generate_test.go @@ -21,59 +21,9 @@ import ( "testing" ) -type nameGeneratorFunc func(base string) string - -func (fn nameGeneratorFunc) GenerateName(base string) string { - return fn(base) -} - -func TestGenerateName(t *testing.T) { - testCases := []struct { - meta ObjectMeta - - base string - returned string - }{ - { - returned: "", - }, - { - meta: ObjectMeta{ - GenerateName: "test", - }, - base: "test", - returned: "test", - }, - { - meta: ObjectMeta{ - Name: "foo", - GenerateName: "test", - }, - base: "test", - returned: "foo", - }, - } - - for i, testCase := range testCases { - GenerateName(nameGeneratorFunc(func(base string) string { - if base != testCase.base { - t.Errorf("%d: unexpected call with base", i) - } - return "test" - }), &testCase.meta) - expect := testCase.returned - if expect != testCase.meta.Name { - t.Errorf("%d: unexpected name: %#v", i, testCase.meta) - } - } -} - func TestSimpleNameGenerator(t *testing.T) { - meta := &ObjectMeta{ - GenerateName: "foo", - } - GenerateName(SimpleNameGenerator, meta) - if !strings.HasPrefix(meta.Name, "foo") || meta.Name == "foo" { - t.Errorf("unexpected name: %#v", meta) + name := SimpleNameGenerator.GenerateName("foo") + if !strings.HasPrefix(name, "foo") || name == "foo" { + t.Errorf("unexpected name: %s", name) } } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/util/cache/lruexpirecache_test.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/util/cache/lruexpirecache_test.go index 35c538d4..4990f56c 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/util/cache/lruexpirecache_test.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/util/cache/lruexpirecache_test.go @@ -20,7 +20,7 @@ import ( "testing" "time" - "k8s.io/kubernetes/pkg/util/clock" + "k8s.io/client-go/util/clock" "github.com/golang/groupcache/lru" ) diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/webhook/webhook.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/util/webhook/webhook.go similarity index 98% rename from vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/webhook/webhook.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/util/webhook/webhook.go index 1d05d444..989dcda4 100755 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/webhook/webhook.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/apiserver/pkg/util/webhook/webhook.go @@ -21,12 +21,12 @@ import ( "fmt" "time" + apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" runtimeserializer "k8s.io/apimachinery/pkg/runtime/serializer" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/client-go/pkg/api" - apierrors "k8s.io/client-go/pkg/api/errors" "k8s.io/client-go/rest" "k8s.io/client-go/tools/clientcmd" diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/Godeps/Godeps.json b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/Godeps/Godeps.json index 140ff3f2..b5431fb0 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/Godeps/Godeps.json +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/Godeps/Godeps.json @@ -322,137 +322,153 @@ "ImportPath": "gopkg.in/yaml.v2", "Rev": "53feefa2559fb8dfa8d81baad31be332c97d6c77" }, + { + "ImportPath": "k8s.io/apimachinery/pkg/api/errors", + "Rev": "1f1411cd407a75607081ff37f3ca1baeeb63d05a" + }, { "ImportPath": "k8s.io/apimachinery/pkg/api/meta", - "Rev": "40b9317c36d3e02d20da77c4233f4a22af6831f8" + "Rev": "1f1411cd407a75607081ff37f3ca1baeeb63d05a" }, { "ImportPath": "k8s.io/apimachinery/pkg/apimachinery", - "Rev": "40b9317c36d3e02d20da77c4233f4a22af6831f8" + "Rev": "1f1411cd407a75607081ff37f3ca1baeeb63d05a" + }, + { + "ImportPath": "k8s.io/apimachinery/pkg/apimachinery/announced", + "Rev": "1f1411cd407a75607081ff37f3ca1baeeb63d05a" }, { "ImportPath": "k8s.io/apimachinery/pkg/apimachinery/registered", - "Rev": "40b9317c36d3e02d20da77c4233f4a22af6831f8" + "Rev": "1f1411cd407a75607081ff37f3ca1baeeb63d05a" }, { "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1", - "Rev": "40b9317c36d3e02d20da77c4233f4a22af6831f8" + "Rev": "1f1411cd407a75607081ff37f3ca1baeeb63d05a" }, { "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured", - "Rev": "40b9317c36d3e02d20da77c4233f4a22af6831f8" + "Rev": "1f1411cd407a75607081ff37f3ca1baeeb63d05a" }, { "ImportPath": "k8s.io/apimachinery/pkg/conversion", - "Rev": "40b9317c36d3e02d20da77c4233f4a22af6831f8" + "Rev": "1f1411cd407a75607081ff37f3ca1baeeb63d05a" }, { "ImportPath": "k8s.io/apimachinery/pkg/conversion/queryparams", - "Rev": "40b9317c36d3e02d20da77c4233f4a22af6831f8" + "Rev": "1f1411cd407a75607081ff37f3ca1baeeb63d05a" }, { - "ImportPath": "k8s.io/apimachinery/pkg/genericapiserver/openapi/common", - "Rev": "40b9317c36d3e02d20da77c4233f4a22af6831f8" + "ImportPath": "k8s.io/apimachinery/pkg/fields", + "Rev": "1f1411cd407a75607081ff37f3ca1baeeb63d05a" }, { "ImportPath": "k8s.io/apimachinery/pkg/labels", - "Rev": "40b9317c36d3e02d20da77c4233f4a22af6831f8" + "Rev": "1f1411cd407a75607081ff37f3ca1baeeb63d05a" }, { "ImportPath": "k8s.io/apimachinery/pkg/openapi", - "Rev": "40b9317c36d3e02d20da77c4233f4a22af6831f8" + "Rev": "1f1411cd407a75607081ff37f3ca1baeeb63d05a" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime", - "Rev": "40b9317c36d3e02d20da77c4233f4a22af6831f8" + "Rev": "1f1411cd407a75607081ff37f3ca1baeeb63d05a" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/schema", - "Rev": "40b9317c36d3e02d20da77c4233f4a22af6831f8" + "Rev": "1f1411cd407a75607081ff37f3ca1baeeb63d05a" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer", - "Rev": "40b9317c36d3e02d20da77c4233f4a22af6831f8" + "Rev": "1f1411cd407a75607081ff37f3ca1baeeb63d05a" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/json", - "Rev": "40b9317c36d3e02d20da77c4233f4a22af6831f8" + "Rev": "1f1411cd407a75607081ff37f3ca1baeeb63d05a" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/protobuf", - "Rev": "40b9317c36d3e02d20da77c4233f4a22af6831f8" + "Rev": "1f1411cd407a75607081ff37f3ca1baeeb63d05a" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/recognizer", - "Rev": "40b9317c36d3e02d20da77c4233f4a22af6831f8" + "Rev": "1f1411cd407a75607081ff37f3ca1baeeb63d05a" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/streaming", - "Rev": "40b9317c36d3e02d20da77c4233f4a22af6831f8" + "Rev": "1f1411cd407a75607081ff37f3ca1baeeb63d05a" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/versioning", - "Rev": "40b9317c36d3e02d20da77c4233f4a22af6831f8" + "Rev": "1f1411cd407a75607081ff37f3ca1baeeb63d05a" }, { "ImportPath": "k8s.io/apimachinery/pkg/selection", - "Rev": "40b9317c36d3e02d20da77c4233f4a22af6831f8" + "Rev": "1f1411cd407a75607081ff37f3ca1baeeb63d05a" }, { "ImportPath": "k8s.io/apimachinery/pkg/types", - "Rev": "40b9317c36d3e02d20da77c4233f4a22af6831f8" + "Rev": "1f1411cd407a75607081ff37f3ca1baeeb63d05a" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/diff", - "Rev": "40b9317c36d3e02d20da77c4233f4a22af6831f8" + "Rev": "1f1411cd407a75607081ff37f3ca1baeeb63d05a" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/errors", - "Rev": "40b9317c36d3e02d20da77c4233f4a22af6831f8" + "Rev": "1f1411cd407a75607081ff37f3ca1baeeb63d05a" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/framer", - "Rev": "40b9317c36d3e02d20da77c4233f4a22af6831f8" + "Rev": "1f1411cd407a75607081ff37f3ca1baeeb63d05a" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/json", - "Rev": "40b9317c36d3e02d20da77c4233f4a22af6831f8" + "Rev": "1f1411cd407a75607081ff37f3ca1baeeb63d05a" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/net", - "Rev": "40b9317c36d3e02d20da77c4233f4a22af6831f8" + "Rev": "1f1411cd407a75607081ff37f3ca1baeeb63d05a" + }, + { + "ImportPath": "k8s.io/apimachinery/pkg/util/rand", + "Rev": "1f1411cd407a75607081ff37f3ca1baeeb63d05a" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/runtime", - "Rev": "40b9317c36d3e02d20da77c4233f4a22af6831f8" + "Rev": "1f1411cd407a75607081ff37f3ca1baeeb63d05a" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/sets", - "Rev": "40b9317c36d3e02d20da77c4233f4a22af6831f8" + "Rev": "1f1411cd407a75607081ff37f3ca1baeeb63d05a" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/validation", - "Rev": "40b9317c36d3e02d20da77c4233f4a22af6831f8" + "Rev": "1f1411cd407a75607081ff37f3ca1baeeb63d05a" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/validation/field", - "Rev": "40b9317c36d3e02d20da77c4233f4a22af6831f8" + "Rev": "1f1411cd407a75607081ff37f3ca1baeeb63d05a" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/wait", - "Rev": "40b9317c36d3e02d20da77c4233f4a22af6831f8" + "Rev": "1f1411cd407a75607081ff37f3ca1baeeb63d05a" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/yaml", - "Rev": "40b9317c36d3e02d20da77c4233f4a22af6831f8" + "Rev": "1f1411cd407a75607081ff37f3ca1baeeb63d05a" + }, + { + "ImportPath": "k8s.io/apimachinery/pkg/version", + "Rev": "1f1411cd407a75607081ff37f3ca1baeeb63d05a" }, { "ImportPath": "k8s.io/apimachinery/pkg/watch", - "Rev": "40b9317c36d3e02d20da77c4233f4a22af6831f8" + "Rev": "1f1411cd407a75607081ff37f3ca1baeeb63d05a" }, { "ImportPath": "k8s.io/apimachinery/third_party/forked/golang/reflect", - "Rev": "40b9317c36d3e02d20da77c4233f4a22af6831f8" + "Rev": "1f1411cd407a75607081ff37f3ca1baeeb63d05a" } ] } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/errors/OWNERS b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/api/errors/OWNERS similarity index 96% rename from vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/errors/OWNERS rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/api/errors/OWNERS index 155e203d..ae828ad2 100755 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/errors/OWNERS +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/api/errors/OWNERS @@ -3,7 +3,6 @@ reviewers: - lavalamp - smarterclayton - wojtek-t -- bgrant0607 - deads2k - brendandburns - derekwaynecarr diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/errors/doc.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/api/errors/doc.go similarity index 100% rename from vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/errors/doc.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/api/errors/doc.go diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/errors/errors.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/api/errors/errors.go similarity index 100% rename from vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/errors/errors.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/api/errors/errors.go diff --git a/vendor/k8s.io/kubernetes/pkg/api/mapper.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/api/meta/default.go similarity index 65% rename from vendor/k8s.io/kubernetes/pkg/api/mapper.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/api/meta/default.go index 69334b07..5ea906a2 100644 --- a/vendor/k8s.io/kubernetes/pkg/api/mapper.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/api/meta/default.go @@ -14,28 +14,21 @@ See the License for the specific language governing permissions and limitations under the License. */ -package api +package meta import ( "strings" - "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/sets" ) -// Instantiates a DefaultRESTMapper based on types registered in api.Scheme -func NewDefaultRESTMapper(defaultGroupVersions []schema.GroupVersion, interfacesFunc meta.VersionInterfacesFunc, - importPathPrefix string, ignoredKinds, rootScoped sets.String) *meta.DefaultRESTMapper { - return NewDefaultRESTMapperFromScheme(defaultGroupVersions, interfacesFunc, importPathPrefix, ignoredKinds, rootScoped, Scheme) -} +// NewDefaultRESTMapperFromScheme instantiates a DefaultRESTMapper based on types registered in the given scheme. +func NewDefaultRESTMapperFromScheme(defaultGroupVersions []schema.GroupVersion, interfacesFunc VersionInterfacesFunc, + importPathPrefix string, ignoredKinds, rootScoped sets.String, scheme *runtime.Scheme) *DefaultRESTMapper { -// Instantiates a DefaultRESTMapper based on types registered in the given scheme. -func NewDefaultRESTMapperFromScheme(defaultGroupVersions []schema.GroupVersion, interfacesFunc meta.VersionInterfacesFunc, - importPathPrefix string, ignoredKinds, rootScoped sets.String, scheme *runtime.Scheme) *meta.DefaultRESTMapper { - - mapper := meta.NewDefaultRESTMapper(defaultGroupVersions, interfacesFunc) + mapper := NewDefaultRESTMapper(defaultGroupVersions, interfacesFunc) // enumerate all supported versions, get the kinds, and register with the mapper how to address // our resources. for _, gv := range defaultGroupVersions { @@ -47,9 +40,9 @@ func NewDefaultRESTMapperFromScheme(defaultGroupVersions []schema.GroupVersion, if !strings.Contains(oType.PkgPath(), importPathPrefix) || ignoredKinds.Has(kind) { continue } - scope := meta.RESTScopeNamespace + scope := RESTScopeNamespace if rootScoped.Has(kind) { - scope = meta.RESTScopeRoot + scope = RESTScopeRoot } mapper.Add(gvk, scope) } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/api/meta/interfaces.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/api/meta/interfaces.go index 6f04ec32..524b1ebd 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/api/meta/interfaces.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/api/meta/interfaces.go @@ -18,7 +18,6 @@ package meta import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" @@ -30,46 +29,6 @@ type VersionInterfaces struct { MetadataAccessor } -type ObjectMetaAccessor interface { - GetObjectMeta() Object -} - -// Object lets you work with object metadata from any of the versioned or -// internal API objects. Attempting to set or retrieve a field on an object that does -// not support that field (Name, UID, Namespace on lists) will be a no-op and return -// a default value. -type Object interface { - GetNamespace() string - SetNamespace(namespace string) - GetName() string - SetName(name string) - GetGenerateName() string - SetGenerateName(name string) - GetUID() types.UID - SetUID(uid types.UID) - GetResourceVersion() string - SetResourceVersion(version string) - GetSelfLink() string - SetSelfLink(selfLink string) - GetCreationTimestamp() metav1.Time - SetCreationTimestamp(timestamp metav1.Time) - GetDeletionTimestamp() *metav1.Time - SetDeletionTimestamp(timestamp *metav1.Time) - GetLabels() map[string]string - SetLabels(labels map[string]string) - GetAnnotations() map[string]string - SetAnnotations(annotations map[string]string) - GetFinalizers() []string - SetFinalizers(finalizers []string) - GetOwnerReferences() []metav1.OwnerReference - SetOwnerReferences([]metav1.OwnerReference) - GetClusterName() string - SetClusterName(clusterName string) -} - -// TODO: move me to pkg/apis/meta/v1/unstructured once Object is moved to pkg/apis/meta/v1 -var _ Object = &unstructured.Unstructured{} - type ListMetaAccessor interface { GetListMeta() List } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/api/meta/meta.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/api/meta/meta.go index 149474dd..4a958a92 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/api/meta/meta.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/api/meta/meta.go @@ -20,13 +20,13 @@ import ( "fmt" "reflect" + "github.com/golang/glog" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/conversion" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" - - "github.com/golang/glog" ) // errNotList is returned when an object implements the Object style interfaces but not the List style @@ -54,9 +54,9 @@ func ListAccessor(obj interface{}) (List, error) { return m, nil } return nil, errNotList - case Object: + case metav1.Object: return t, nil - case ObjectMetaAccessor: + case metav1.ObjectMetaAccessor: if m := t.GetObjectMeta(); m != nil { return m, nil } @@ -75,11 +75,11 @@ var errNotObject = fmt.Errorf("object does not implement the Object interfaces") // required fields are missing. Fields that are not required return the default // value and are a no-op if set. // TODO: return bool instead of error -func Accessor(obj interface{}) (Object, error) { +func Accessor(obj interface{}) (metav1.Object, error) { switch t := obj.(type) { - case Object: + case metav1.Object: return t, nil - case ObjectMetaAccessor: + case metav1.ObjectMetaAccessor: if m := t.GetObjectMeta(); m != nil { return m, nil } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apimachinery/announced/announced.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/apimachinery/announced/announced.go similarity index 93% rename from vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apimachinery/announced/announced.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/apimachinery/announced/announced.go index 054dc4aa..2c8568c1 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apimachinery/announced/announced.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/apimachinery/announced/announced.go @@ -28,14 +28,6 @@ import ( "k8s.io/apimachinery/pkg/runtime" ) -var ( - DefaultGroupFactoryRegistry = make(APIGroupFactoryRegistry) - - // These functions will announce your group or version. - AnnounceGroupVersion = DefaultGroupFactoryRegistry.AnnounceGroupVersion - AnnounceGroup = DefaultGroupFactoryRegistry.AnnounceGroup -) - // APIGroupFactoryRegistry allows for groups and versions to announce themselves, // which simply makes them available and doesn't take other actions. Later, // users of the registry can select which groups and versions they'd actually diff --git a/vendor/k8s.io/kubernetes/pkg/apimachinery/announced/group_factory.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/apimachinery/announced/group_factory.go similarity index 94% rename from vendor/k8s.io/kubernetes/pkg/apimachinery/announced/group_factory.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/apimachinery/announced/group_factory.go index 400f1c13..2f4b0898 100644 --- a/vendor/k8s.io/kubernetes/pkg/apimachinery/announced/group_factory.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/apimachinery/announced/group_factory.go @@ -27,7 +27,6 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/kubernetes/pkg/api" ) type SchemeFunc func(*runtime.Scheme) error @@ -79,8 +78,8 @@ func NewGroupMetaFactory(groupArgs *GroupMetaFactoryArgs, versions VersionToSche // programmer importing the wrong set of packages. If this assumption doesn't // work for you, just call DefaultGroupFactoryRegistry.AnnouncePreconstructedFactory // yourself. -func (gmf *GroupMetaFactory) Announce() *GroupMetaFactory { - if err := DefaultGroupFactoryRegistry.AnnouncePreconstructedFactory(gmf); err != nil { +func (gmf *GroupMetaFactory) Announce(groupFactoryRegistry APIGroupFactoryRegistry) *GroupMetaFactory { + if err := groupFactoryRegistry.AnnouncePreconstructedFactory(gmf); err != nil { panic(err) } return gmf @@ -171,7 +170,7 @@ func (gmf *GroupMetaFactory) newRESTMapper(scheme *runtime.Scheme, externalVersi ignoredKinds = gmf.GroupArgs.IgnoredKinds } - return api.NewDefaultRESTMapperFromScheme( + return meta.NewDefaultRESTMapperFromScheme( externalVersions, groupMeta.InterfacesFor, gmf.GroupArgs.ImportPrefix, @@ -235,11 +234,11 @@ func (gmf *GroupMetaFactory) Enable(m *registered.APIRegistrationManager, scheme // RegisterAndEnable is provided only to allow this code to get added in multiple steps. // It's really bad that this is called in init() methods, but supporting this // temporarily lets us do the change incrementally. -func (gmf *GroupMetaFactory) RegisterAndEnable() error { - if err := gmf.Register(api.Registry); err != nil { +func (gmf *GroupMetaFactory) RegisterAndEnable(registry *registered.APIRegistrationManager, scheme *runtime.Scheme) error { + if err := gmf.Register(registry); err != nil { return err } - if err := gmf.Enable(api.Registry, api.Scheme); err != nil { + if err := gmf.Enable(registry, scheme); err != nil { return err } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/apimachinery/registered/registered.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/apimachinery/registered/registered.go index 5256be65..f2e32c88 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/apimachinery/registered/registered.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/apimachinery/registered/registered.go @@ -105,7 +105,7 @@ func (m *APIRegistrationManager) RegisterVersions(availableVersions []schema.Gro func (m *APIRegistrationManager) RegisterGroup(groupMeta apimachinery.GroupMeta) error { groupName := groupMeta.GroupVersion.Group if _, found := m.groupMetaMap[groupName]; found { - return fmt.Errorf("group %v is already registered", m.groupMetaMap) + return fmt.Errorf("group %q is already registered in groupsMap: %v", groupName, m.groupMetaMap) } m.groupMetaMap[groupName] = &groupMeta return nil diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go index 7e2f0abc..03ae8b15 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go @@ -42,6 +42,8 @@ limitations under the License. LabelSelector LabelSelectorRequirement ListMeta + ListOptions + ObjectMeta OwnerReference RootPaths ServerAddressByClientCIDR @@ -150,51 +152,59 @@ func (m *ListMeta) Reset() { *m = ListMeta{} } func (*ListMeta) ProtoMessage() {} func (*ListMeta) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{16} } +func (m *ListOptions) Reset() { *m = ListOptions{} } +func (*ListOptions) ProtoMessage() {} +func (*ListOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{17} } + +func (m *ObjectMeta) Reset() { *m = ObjectMeta{} } +func (*ObjectMeta) ProtoMessage() {} +func (*ObjectMeta) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{18} } + func (m *OwnerReference) Reset() { *m = OwnerReference{} } func (*OwnerReference) ProtoMessage() {} -func (*OwnerReference) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{17} } +func (*OwnerReference) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{19} } func (m *RootPaths) Reset() { *m = RootPaths{} } func (*RootPaths) ProtoMessage() {} -func (*RootPaths) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{18} } +func (*RootPaths) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{20} } func (m *ServerAddressByClientCIDR) Reset() { *m = ServerAddressByClientCIDR{} } func (*ServerAddressByClientCIDR) ProtoMessage() {} func (*ServerAddressByClientCIDR) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{19} + return fileDescriptorGenerated, []int{21} } func (m *Status) Reset() { *m = Status{} } func (*Status) ProtoMessage() {} -func (*Status) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{20} } +func (*Status) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{22} } func (m *StatusCause) Reset() { *m = StatusCause{} } func (*StatusCause) ProtoMessage() {} -func (*StatusCause) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{21} } +func (*StatusCause) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{23} } func (m *StatusDetails) Reset() { *m = StatusDetails{} } func (*StatusDetails) ProtoMessage() {} -func (*StatusDetails) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{22} } +func (*StatusDetails) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{24} } func (m *Time) Reset() { *m = Time{} } func (*Time) ProtoMessage() {} -func (*Time) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{23} } +func (*Time) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{25} } func (m *Timestamp) Reset() { *m = Timestamp{} } func (*Timestamp) ProtoMessage() {} -func (*Timestamp) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{24} } +func (*Timestamp) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{26} } func (m *TypeMeta) Reset() { *m = TypeMeta{} } func (*TypeMeta) ProtoMessage() {} -func (*TypeMeta) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{25} } +func (*TypeMeta) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{27} } func (m *Verbs) Reset() { *m = Verbs{} } func (*Verbs) ProtoMessage() {} -func (*Verbs) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{26} } +func (*Verbs) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{28} } func (m *WatchEvent) Reset() { *m = WatchEvent{} } func (*WatchEvent) ProtoMessage() {} -func (*WatchEvent) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{27} } +func (*WatchEvent) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{29} } func init() { proto.RegisterType((*APIGroup)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.APIGroup") @@ -214,6 +224,8 @@ func init() { proto.RegisterType((*LabelSelector)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector") proto.RegisterType((*LabelSelectorRequirement)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelectorRequirement") proto.RegisterType((*ListMeta)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta") + proto.RegisterType((*ListOptions)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.ListOptions") + proto.RegisterType((*ObjectMeta)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta") proto.RegisterType((*OwnerReference)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.OwnerReference") proto.RegisterType((*RootPaths)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.RootPaths") proto.RegisterType((*ServerAddressByClientCIDR)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.ServerAddressByClientCIDR") @@ -788,6 +800,182 @@ func (m *ListMeta) MarshalTo(data []byte) (int, error) { return i, nil } +func (m *ListOptions) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ListOptions) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.LabelSelector))) + i += copy(data[i:], m.LabelSelector) + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.FieldSelector))) + i += copy(data[i:], m.FieldSelector) + data[i] = 0x18 + i++ + if m.Watch { + data[i] = 1 + } else { + data[i] = 0 + } + i++ + data[i] = 0x22 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.ResourceVersion))) + i += copy(data[i:], m.ResourceVersion) + if m.TimeoutSeconds != nil { + data[i] = 0x28 + i++ + i = encodeVarintGenerated(data, i, uint64(*m.TimeoutSeconds)) + } + return i, nil +} + +func (m *ObjectMeta) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ObjectMeta) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Name))) + i += copy(data[i:], m.Name) + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.GenerateName))) + i += copy(data[i:], m.GenerateName) + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Namespace))) + i += copy(data[i:], m.Namespace) + data[i] = 0x22 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.SelfLink))) + i += copy(data[i:], m.SelfLink) + data[i] = 0x2a + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.UID))) + i += copy(data[i:], m.UID) + data[i] = 0x32 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.ResourceVersion))) + i += copy(data[i:], m.ResourceVersion) + data[i] = 0x38 + i++ + i = encodeVarintGenerated(data, i, uint64(m.Generation)) + data[i] = 0x42 + i++ + i = encodeVarintGenerated(data, i, uint64(m.CreationTimestamp.Size())) + n3, err := m.CreationTimestamp.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n3 + if m.DeletionTimestamp != nil { + data[i] = 0x4a + i++ + i = encodeVarintGenerated(data, i, uint64(m.DeletionTimestamp.Size())) + n4, err := m.DeletionTimestamp.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n4 + } + if m.DeletionGracePeriodSeconds != nil { + data[i] = 0x50 + i++ + i = encodeVarintGenerated(data, i, uint64(*m.DeletionGracePeriodSeconds)) + } + if len(m.Labels) > 0 { + for k := range m.Labels { + data[i] = 0x5a + i++ + v := m.Labels[k] + mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) + i = encodeVarintGenerated(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + if len(m.Annotations) > 0 { + for k := range m.Annotations { + data[i] = 0x62 + i++ + v := m.Annotations[k] + mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) + i = encodeVarintGenerated(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } + if len(m.OwnerReferences) > 0 { + for _, msg := range m.OwnerReferences { + data[i] = 0x6a + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Finalizers) > 0 { + for _, s := range m.Finalizers { + data[i] = 0x72 + i++ + l = len(s) + for l >= 1<<7 { + data[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + data[i] = uint8(l) + i++ + i += copy(data[i:], s) + } + } + data[i] = 0x7a + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.ClusterName))) + i += copy(data[i:], m.ClusterName) + return i, nil +} + func (m *OwnerReference) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) @@ -909,11 +1097,11 @@ func (m *Status) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n3, err := m.ListMeta.MarshalTo(data[i:]) + n5, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n3 + i += n5 data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(len(m.Status))) @@ -930,11 +1118,11 @@ func (m *Status) MarshalTo(data []byte) (int, error) { data[i] = 0x2a i++ i = encodeVarintGenerated(data, i, uint64(m.Details.Size())) - n4, err := m.Details.MarshalTo(data[i:]) + n6, err := m.Details.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n4 + i += n6 } data[i] = 0x30 i++ @@ -1122,11 +1310,11 @@ func (m *WatchEvent) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.Object.Size())) - n5, err := m.Object.MarshalTo(data[i:]) + n7, err := m.Object.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n5 + i += n7 return i, nil } @@ -1371,6 +1559,80 @@ func (m *ListMeta) Size() (n int) { return n } +func (m *ListOptions) Size() (n int) { + var l int + _ = l + l = len(m.LabelSelector) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.FieldSelector) + n += 1 + l + sovGenerated(uint64(l)) + n += 2 + l = len(m.ResourceVersion) + n += 1 + l + sovGenerated(uint64(l)) + if m.TimeoutSeconds != nil { + n += 1 + sovGenerated(uint64(*m.TimeoutSeconds)) + } + return n +} + +func (m *ObjectMeta) Size() (n int) { + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.GenerateName) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Namespace) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.SelfLink) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.UID) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.ResourceVersion) + n += 1 + l + sovGenerated(uint64(l)) + n += 1 + sovGenerated(uint64(m.Generation)) + l = m.CreationTimestamp.Size() + n += 1 + l + sovGenerated(uint64(l)) + if m.DeletionTimestamp != nil { + l = m.DeletionTimestamp.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.DeletionGracePeriodSeconds != nil { + n += 1 + sovGenerated(uint64(*m.DeletionGracePeriodSeconds)) + } + if len(m.Labels) > 0 { + for k, v := range m.Labels { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) + n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) + } + } + if len(m.Annotations) > 0 { + for k, v := range m.Annotations { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) + n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) + } + } + if len(m.OwnerReferences) > 0 { + for _, e := range m.OwnerReferences { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.Finalizers) > 0 { + for _, s := range m.Finalizers { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + l = len(m.ClusterName) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + func (m *OwnerReference) Size() (n int) { var l int _ = l @@ -1646,6 +1908,64 @@ func (this *ListMeta) String() string { }, "") return s } +func (this *ListOptions) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ListOptions{`, + `LabelSelector:` + fmt.Sprintf("%v", this.LabelSelector) + `,`, + `FieldSelector:` + fmt.Sprintf("%v", this.FieldSelector) + `,`, + `Watch:` + fmt.Sprintf("%v", this.Watch) + `,`, + `ResourceVersion:` + fmt.Sprintf("%v", this.ResourceVersion) + `,`, + `TimeoutSeconds:` + valueToStringGenerated(this.TimeoutSeconds) + `,`, + `}`, + }, "") + return s +} +func (this *ObjectMeta) String() string { + if this == nil { + return "nil" + } + keysForLabels := make([]string, 0, len(this.Labels)) + for k := range this.Labels { + keysForLabels = append(keysForLabels, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) + mapStringForLabels := "map[string]string{" + for _, k := range keysForLabels { + mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) + } + mapStringForLabels += "}" + keysForAnnotations := make([]string, 0, len(this.Annotations)) + for k := range this.Annotations { + keysForAnnotations = append(keysForAnnotations, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations) + mapStringForAnnotations := "map[string]string{" + for _, k := range keysForAnnotations { + mapStringForAnnotations += fmt.Sprintf("%v: %v,", k, this.Annotations[k]) + } + mapStringForAnnotations += "}" + s := strings.Join([]string{`&ObjectMeta{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `GenerateName:` + fmt.Sprintf("%v", this.GenerateName) + `,`, + `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, + `SelfLink:` + fmt.Sprintf("%v", this.SelfLink) + `,`, + `UID:` + fmt.Sprintf("%v", this.UID) + `,`, + `ResourceVersion:` + fmt.Sprintf("%v", this.ResourceVersion) + `,`, + `Generation:` + fmt.Sprintf("%v", this.Generation) + `,`, + `CreationTimestamp:` + strings.Replace(strings.Replace(this.CreationTimestamp.String(), "Time", "Time", 1), `&`, ``, 1) + `,`, + `DeletionTimestamp:` + strings.Replace(fmt.Sprintf("%v", this.DeletionTimestamp), "Time", "Time", 1) + `,`, + `DeletionGracePeriodSeconds:` + valueToStringGenerated(this.DeletionGracePeriodSeconds) + `,`, + `Labels:` + mapStringForLabels + `,`, + `Annotations:` + mapStringForAnnotations + `,`, + `OwnerReferences:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.OwnerReferences), "OwnerReference", "OwnerReference", 1), `&`, ``, 1) + `,`, + `Finalizers:` + fmt.Sprintf("%v", this.Finalizers) + `,`, + `ClusterName:` + fmt.Sprintf("%v", this.ClusterName) + `,`, + `}`, + }, "") + return s +} func (this *OwnerReference) String() string { if this == nil { return "nil" @@ -3777,6 +4097,820 @@ func (m *ListMeta) Unmarshal(data []byte) error { } return nil } +func (m *ListOptions) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ListOptions: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListOptions: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LabelSelector", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LabelSelector = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldSelector", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldSelector = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Watch", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Watch = bool(v != 0) + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ResourceVersion = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeoutSeconds", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TimeoutSeconds = &v + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ObjectMeta) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ObjectMeta: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ObjectMeta: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GenerateName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GenerateName = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Namespace = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SelfLink", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SelfLink = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UID = k8s_io_apimachinery_pkg_types.UID(data[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ResourceVersion = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Generation", wireType) + } + m.Generation = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + m.Generation |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CreationTimestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.CreationTimestamp.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeletionTimestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.DeletionTimestamp == nil { + m.DeletionTimestamp = &Time{} + } + if err := m.DeletionTimestamp.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DeletionGracePeriodSeconds", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.DeletionGracePeriodSeconds = &v + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(data[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + if m.Labels == nil { + m.Labels = make(map[string]string) + } + m.Labels[mapkey] = mapvalue + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(data[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + if m.Annotations == nil { + m.Annotations = make(map[string]string) + } + m.Annotations[mapkey] = mapvalue + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerReferences", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerReferences = append(m.OwnerReferences, OwnerReference{}) + if err := m.OwnerReferences[len(m.OwnerReferences)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Finalizers", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Finalizers = append(m.Finalizers, string(data[iNdEx:postIndex])) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClusterName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClusterName = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *OwnerReference) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 @@ -5184,107 +6318,130 @@ var ( ) var fileDescriptorGenerated = []byte{ - // 1628 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x58, 0xcf, 0x6f, 0x1b, 0xc5, - 0x17, 0xf7, 0xda, 0xb1, 0x6b, 0x3f, 0xc7, 0x4d, 0xba, 0xdf, 0x54, 0x5f, 0x37, 0xd2, 0xd7, 0x4e, - 0xb7, 0xd5, 0x57, 0xa9, 0x68, 0xd7, 0x24, 0x48, 0x55, 0x55, 0x44, 0x51, 0x36, 0x49, 0xab, 0xa8, - 0x49, 0x13, 0x4d, 0xda, 0x20, 0x4a, 0x0f, 0x6c, 0xbc, 0x13, 0x67, 0x89, 0xbd, 0xbb, 0xcc, 0x8c, - 0xdd, 0x58, 0x3d, 0xd0, 0x03, 0x48, 0x1c, 0x10, 0xea, 0x91, 0x03, 0x42, 0xad, 0xe0, 0x2f, 0xe0, - 0x9f, 0xa0, 0xc7, 0x4a, 0xbd, 0x70, 0x40, 0x16, 0x0d, 0x07, 0x8e, 0xdc, 0x23, 0x0e, 0x68, 0x66, - 0x67, 0xd6, 0x6b, 0xa7, 0x26, 0x1b, 0xd1, 0x03, 0xa7, 0x78, 0xde, 0x8f, 0xcf, 0x7b, 0xf3, 0xe6, - 0x33, 0x6f, 0xde, 0x06, 0xd6, 0xf6, 0xae, 0x51, 0xd3, 0xf5, 0x6b, 0x7b, 0xed, 0x6d, 0x4c, 0x3c, - 0xcc, 0x30, 0xad, 0x75, 0xb0, 0xe7, 0xf8, 0xa4, 0x26, 0x15, 0x76, 0xe0, 0xb6, 0xec, 0xfa, 0xae, - 0xeb, 0x61, 0xd2, 0xad, 0x05, 0x7b, 0x0d, 0x2e, 0xa0, 0xb5, 0x16, 0x66, 0x76, 0xad, 0x33, 0x57, - 0x6b, 0x60, 0x0f, 0x13, 0x9b, 0x61, 0xc7, 0x0c, 0x88, 0xcf, 0x7c, 0xfd, 0x62, 0xe8, 0x65, 0xc6, - 0xbd, 0xcc, 0x60, 0xaf, 0xc1, 0x05, 0xd4, 0xe4, 0x5e, 0x66, 0x67, 0x6e, 0xfa, 0x4a, 0xc3, 0x65, - 0xbb, 0xed, 0x6d, 0xb3, 0xee, 0xb7, 0x6a, 0x0d, 0xbf, 0xe1, 0xd7, 0x84, 0xf3, 0x76, 0x7b, 0x47, - 0xac, 0xc4, 0x42, 0xfc, 0x0a, 0x41, 0xa7, 0x47, 0xa6, 0x42, 0xda, 0x1e, 0x73, 0x5b, 0x78, 0x38, - 0x8b, 0xe9, 0xab, 0xc7, 0x39, 0xd0, 0xfa, 0x2e, 0x6e, 0xd9, 0x47, 0xfc, 0xe6, 0x8f, 0x16, 0x43, - 0xee, 0xb8, 0x46, 0x30, 0xf5, 0xdb, 0xa4, 0x7e, 0x34, 0xd6, 0xdc, 0xeb, 0x7d, 0xda, 0xcc, 0x6d, - 0xd6, 0x5c, 0x8f, 0x51, 0x46, 0x86, 0x5d, 0x8c, 0x9f, 0x32, 0x90, 0x5f, 0xd8, 0x58, 0xb9, 0x45, - 0xfc, 0x76, 0xa0, 0xcf, 0xc0, 0x98, 0x67, 0xb7, 0x70, 0x59, 0x9b, 0xd1, 0x66, 0x0b, 0xd6, 0xf8, - 0xf3, 0x5e, 0x35, 0x75, 0xd0, 0xab, 0x8e, 0xdd, 0xb1, 0x5b, 0x18, 0x09, 0x8d, 0xde, 0x84, 0x7c, - 0x07, 0x13, 0xea, 0xfa, 0x1e, 0x2d, 0xa7, 0x67, 0x32, 0xb3, 0xc5, 0xf9, 0x1b, 0x66, 0x92, 0x32, - 0x9b, 0x22, 0xc0, 0x56, 0xe8, 0x7a, 0xd3, 0x27, 0x4b, 0x2e, 0xad, 0xfb, 0x1d, 0x4c, 0xba, 0xd6, - 0xa4, 0x8c, 0x92, 0x97, 0x4a, 0x8a, 0xa2, 0x08, 0xfa, 0xe7, 0x1a, 0x4c, 0x06, 0x04, 0xef, 0x60, - 0x42, 0xb0, 0x23, 0xf5, 0xe5, 0xcc, 0x8c, 0xf6, 0x06, 0xc2, 0x96, 0x65, 0xd8, 0xc9, 0x8d, 0x21, - 0x7c, 0x74, 0x24, 0xa2, 0xfe, 0xbd, 0x06, 0xd3, 0x14, 0x93, 0x0e, 0x26, 0x0b, 0x8e, 0x43, 0x30, - 0xa5, 0x56, 0x77, 0xb1, 0xe9, 0x62, 0x8f, 0x2d, 0xae, 0x2c, 0x21, 0x5a, 0x1e, 0x13, 0x75, 0x78, - 0x3f, 0x59, 0x42, 0x9b, 0xa3, 0x70, 0x2c, 0x43, 0x66, 0x34, 0x3d, 0xd2, 0x84, 0xa2, 0xbf, 0x49, - 0xc3, 0xd8, 0x81, 0x71, 0x75, 0x90, 0xab, 0x2e, 0x65, 0xfa, 0x16, 0xe4, 0x1a, 0x7c, 0x41, 0xcb, - 0x9a, 0x48, 0xd0, 0x4c, 0x96, 0xa0, 0xc2, 0xb0, 0x4e, 0xcb, 0x7c, 0x72, 0x62, 0x49, 0x91, 0x44, - 0x33, 0x5e, 0x6a, 0x50, 0x5c, 0xd8, 0x58, 0x41, 0x92, 0x84, 0x09, 0x48, 0x33, 0x0f, 0xc0, 0xff, - 0xd2, 0xc0, 0xae, 0x63, 0xa7, 0x9c, 0x9e, 0xd1, 0x66, 0xf3, 0x96, 0x2e, 0xed, 0xe0, 0x4e, 0xa4, - 0x41, 0x31, 0x2b, 0x8e, 0xba, 0xe7, 0x7a, 0x8e, 0x38, 0xed, 0x18, 0xea, 0x6d, 0xd7, 0x73, 0x90, - 0xd0, 0xe8, 0xab, 0x90, 0xed, 0x60, 0xb2, 0xcd, 0xeb, 0xcf, 0x09, 0xf1, 0x56, 0xb2, 0xed, 0x6d, - 0x71, 0x17, 0xab, 0x70, 0xd0, 0xab, 0x66, 0xc5, 0x4f, 0x14, 0x82, 0x18, 0x3f, 0x6a, 0x30, 0x11, - 0xdb, 0x95, 0xa8, 0xe0, 0x35, 0x18, 0x6f, 0xc4, 0xf8, 0x23, 0x77, 0x38, 0x25, 0x73, 0x19, 0x8f, - 0x73, 0x0b, 0x0d, 0x58, 0xea, 0x18, 0x0a, 0xea, 0x92, 0xaa, 0x7b, 0x32, 0x97, 0xb8, 0xfc, 0x2a, - 0x87, 0x7e, 0xa4, 0x98, 0x90, 0xa2, 0x3e, 0xb2, 0xf1, 0x7b, 0x78, 0x14, 0xea, 0xe6, 0xe8, 0xb3, - 0xb1, 0xdb, 0xc9, 0x0f, 0xbd, 0x60, 0x8d, 0x8f, 0xb8, 0x59, 0xc7, 0x50, 0x3a, 0xfd, 0xaf, 0xa0, - 0xf4, 0xf5, 0xfc, 0x37, 0x4f, 0xab, 0xa9, 0xc7, 0xbf, 0xcc, 0xa4, 0x8c, 0x15, 0xc8, 0x2f, 0xb5, - 0x89, 0xcd, 0x78, 0x71, 0xdf, 0x83, 0xbc, 0x23, 0x7f, 0x8b, 0x23, 0xc9, 0x58, 0xe7, 0x55, 0x0f, - 0x51, 0x36, 0x87, 0xbd, 0x6a, 0x89, 0x37, 0x57, 0x53, 0x09, 0x50, 0xe4, 0x62, 0x3c, 0x80, 0xd2, - 0xf2, 0x7e, 0xe0, 0x13, 0xb6, 0x1e, 0x30, 0x51, 0x8b, 0xff, 0x43, 0x0e, 0x0b, 0x81, 0x40, 0xcb, - 0xf7, 0x89, 0x1f, 0x9a, 0x21, 0xa9, 0xd5, 0x2f, 0x40, 0x16, 0xef, 0xdb, 0x75, 0x26, 0x19, 0x5c, - 0x92, 0x66, 0xd9, 0x65, 0x2e, 0x44, 0xa1, 0xce, 0x58, 0x07, 0xb8, 0x85, 0x23, 0xe8, 0x05, 0x98, - 0x50, 0xa7, 0x35, 0x48, 0xa2, 0xff, 0x4a, 0xe7, 0x09, 0x34, 0xa8, 0x46, 0xc3, 0xf6, 0xc6, 0x03, - 0x28, 0x08, 0xa2, 0x71, 0xe6, 0xf3, 0x14, 0x04, 0xcf, 0x24, 0x4a, 0x94, 0x82, 0xb0, 0x40, 0xa1, - 0x2e, 0xba, 0x3a, 0xe9, 0x51, 0x57, 0x27, 0x56, 0xd7, 0x26, 0x94, 0x42, 0x5f, 0x75, 0x9b, 0x13, - 0x45, 0xb8, 0x0c, 0x79, 0x95, 0xa6, 0x8c, 0x12, 0x75, 0x71, 0x05, 0x84, 0x22, 0x8b, 0x58, 0xb4, - 0x5d, 0x18, 0xb8, 0x34, 0xc9, 0x82, 0x5d, 0x82, 0x53, 0x92, 0xb6, 0x32, 0xd6, 0x84, 0x34, 0x3b, - 0xa5, 0x6a, 0xa6, 0xf4, 0xb1, 0x48, 0x9f, 0x41, 0x79, 0x54, 0xeb, 0xff, 0x07, 0xd7, 0x3a, 0x79, - 0x2a, 0xc6, 0xd7, 0x1a, 0x4c, 0xc6, 0x91, 0x92, 0x1f, 0x5f, 0xf2, 0x20, 0xc7, 0x37, 0xc9, 0x58, - 0x45, 0xbe, 0xd3, 0x60, 0x6a, 0x60, 0x6b, 0x27, 0x3a, 0xf1, 0x13, 0x24, 0x15, 0x27, 0x47, 0xe6, - 0x04, 0xe4, 0x78, 0x99, 0x86, 0xd2, 0xaa, 0xbd, 0x8d, 0x9b, 0x9b, 0xb8, 0x89, 0xeb, 0xcc, 0x27, - 0xfa, 0x23, 0x28, 0xb6, 0x6c, 0x56, 0xdf, 0x15, 0x52, 0xf5, 0x8c, 0x2d, 0x25, 0x6b, 0x4a, 0x03, - 0x48, 0xe6, 0x5a, 0x1f, 0x66, 0xd9, 0x63, 0xa4, 0x6b, 0xfd, 0x47, 0xa6, 0x54, 0x8c, 0x69, 0x50, - 0x3c, 0x9a, 0x98, 0x3d, 0xc4, 0x7a, 0x79, 0x3f, 0xe0, 0x9d, 0xe9, 0xe4, 0x23, 0xcf, 0x40, 0x0a, - 0x08, 0x7f, 0xda, 0x76, 0x09, 0x6e, 0x61, 0x8f, 0xf5, 0x67, 0x8f, 0xb5, 0x21, 0x7c, 0x74, 0x24, - 0xe2, 0xf4, 0x0d, 0x98, 0x1c, 0x4e, 0x5e, 0x9f, 0x84, 0xcc, 0x1e, 0xee, 0x86, 0xe7, 0x85, 0xf8, - 0x4f, 0x7d, 0x0a, 0xb2, 0x1d, 0xbb, 0xd9, 0x96, 0xb7, 0x11, 0x85, 0x8b, 0xeb, 0xe9, 0x6b, 0x9a, - 0xf1, 0x83, 0x06, 0xe5, 0x51, 0x89, 0xe8, 0xff, 0x8b, 0x01, 0x59, 0x45, 0x99, 0x55, 0xe6, 0x36, - 0xee, 0x86, 0xa8, 0xcb, 0x90, 0xf7, 0x03, 0x3e, 0x2d, 0xfa, 0x44, 0x9e, 0xfa, 0x25, 0x75, 0x92, - 0xeb, 0x52, 0x7e, 0xd8, 0xab, 0x9e, 0x1d, 0x80, 0x57, 0x0a, 0x14, 0xb9, 0xea, 0x06, 0xe4, 0x44, - 0x3e, 0xb4, 0x9c, 0x11, 0x6f, 0x12, 0xf0, 0xde, 0xba, 0x25, 0x24, 0x48, 0x6a, 0x8c, 0x47, 0x90, - 0xe7, 0x4f, 0xee, 0x1a, 0x66, 0x36, 0x27, 0x10, 0xc5, 0xcd, 0x9d, 0x55, 0xd7, 0xdb, 0x93, 0xa9, - 0x45, 0x04, 0xda, 0x94, 0x72, 0x14, 0x59, 0xbc, 0xae, 0xc5, 0xa6, 0x4f, 0xd8, 0x62, 0xff, 0xd4, - 0xe0, 0xf4, 0xfa, 0x43, 0x0f, 0x13, 0xc4, 0x07, 0x3f, 0xec, 0x85, 0x43, 0x8d, 0xb8, 0x59, 0xda, - 0xc8, 0xf1, 0x43, 0x8d, 0x3d, 0x99, 0x91, 0x63, 0x8f, 0x05, 0x99, 0xb6, 0xeb, 0x88, 0xf1, 0xa4, - 0x60, 0xbd, 0xad, 0xaa, 0x7b, 0x6f, 0x65, 0xe9, 0xb0, 0x57, 0x3d, 0x3f, 0xea, 0xab, 0x80, 0x75, - 0x03, 0x4c, 0xcd, 0x7b, 0x2b, 0x4b, 0x88, 0x3b, 0xf3, 0xd1, 0xc9, 0x0e, 0x5c, 0xb5, 0xb1, 0xac, - 0x80, 0x8a, 0x46, 0xa7, 0xfe, 0xd3, 0x8f, 0x62, 0x56, 0xba, 0x09, 0x50, 0xf7, 0x3d, 0x46, 0xfc, - 0x66, 0x13, 0x93, 0x72, 0x2e, 0x7c, 0xd3, 0xb8, 0xfd, 0x62, 0x24, 0x45, 0x31, 0x0b, 0xe3, 0x32, - 0x14, 0x90, 0xef, 0xb3, 0x0d, 0x9b, 0xed, 0x52, 0xbd, 0x0a, 0xd9, 0x80, 0xff, 0x90, 0xf3, 0x83, - 0x18, 0x94, 0x84, 0x06, 0x85, 0x72, 0xe3, 0x2b, 0x0d, 0xce, 0x8d, 0x7c, 0xce, 0x79, 0xbe, 0xf5, - 0x68, 0x25, 0xab, 0x17, 0xe5, 0xdb, 0xb7, 0x43, 0x31, 0x2b, 0xfd, 0x5d, 0x28, 0x0d, 0xcc, 0x00, - 0xf2, 0xfc, 0xce, 0x4a, 0xb7, 0xd2, 0x40, 0x34, 0x34, 0x68, 0x6b, 0xfc, 0x91, 0x86, 0xdc, 0x26, - 0xb3, 0x59, 0x9b, 0xea, 0x0f, 0x20, 0xcf, 0xaf, 0x9e, 0x63, 0x33, 0x5b, 0x44, 0x4e, 0x3c, 0xf2, - 0x2a, 0xe6, 0xf5, 0x79, 0xa6, 0x24, 0x28, 0x42, 0xe4, 0x53, 0x02, 0x15, 0x71, 0x64, 0x7a, 0xd1, - 0x94, 0x10, 0x46, 0x47, 0x52, 0xcb, 0x3b, 0x65, 0x0b, 0x53, 0x6a, 0x37, 0x14, 0x35, 0xa2, 0x4e, - 0xb9, 0x16, 0x8a, 0x91, 0xd2, 0xeb, 0x57, 0x21, 0x47, 0xb0, 0x4d, 0x7d, 0x4f, 0x72, 0xa4, 0xa2, - 0x20, 0x91, 0x90, 0x1e, 0xf6, 0xaa, 0xe3, 0x12, 0x5c, 0xac, 0x91, 0xb4, 0xd6, 0xef, 0xc3, 0x29, - 0x07, 0x33, 0xdb, 0x6d, 0x52, 0xc1, 0x88, 0xe2, 0xfc, 0x3b, 0x09, 0x07, 0x35, 0x01, 0xb6, 0x14, - 0xba, 0x5a, 0x45, 0x9e, 0x93, 0x5c, 0x20, 0x05, 0xc8, 0x69, 0x5d, 0xf7, 0x1d, 0x2c, 0x68, 0x93, - 0xed, 0xd3, 0x7a, 0xd1, 0x77, 0x30, 0x12, 0x1a, 0xe3, 0x89, 0x06, 0xc5, 0x10, 0x69, 0xd1, 0x6e, - 0x53, 0xac, 0xcf, 0x45, 0xbb, 0x08, 0x8f, 0xfb, 0x9c, 0xf2, 0xb9, 0xdb, 0x0d, 0xf0, 0x61, 0xaf, - 0x5a, 0x10, 0x66, 0x7c, 0x11, 0x6d, 0x20, 0x56, 0xa3, 0xf4, 0x31, 0x35, 0xba, 0x00, 0xd9, 0x1d, - 0x17, 0x37, 0xd5, 0x1b, 0x17, 0xbd, 0x4e, 0x37, 0xb9, 0x10, 0x85, 0x3a, 0xe3, 0xdb, 0x34, 0x94, - 0x06, 0x36, 0x97, 0xe0, 0xa3, 0x24, 0x7a, 0xf6, 0xd2, 0x09, 0x46, 0xa9, 0xd1, 0x5f, 0x21, 0x1f, - 0x42, 0xae, 0xce, 0xf7, 0xa7, 0x3e, 0x03, 0xe7, 0x4e, 0x72, 0x14, 0xa2, 0x32, 0x7d, 0x26, 0x89, - 0x25, 0x45, 0x12, 0x50, 0xbf, 0x05, 0x67, 0x08, 0x66, 0xa4, 0xbb, 0xb0, 0xc3, 0x30, 0xd9, 0xc4, - 0x75, 0xdf, 0x73, 0xc2, 0x03, 0xcf, 0x46, 0x35, 0x3e, 0x83, 0x86, 0x0d, 0xd0, 0x51, 0x1f, 0xa3, - 0x09, 0x63, 0x77, 0xdd, 0x16, 0xe6, 0x65, 0xa7, 0x12, 0x26, 0x9c, 0x9b, 0xa3, 0xb2, 0x2b, 0x67, - 0xa5, 0xe7, 0xd5, 0xf1, 0x6c, 0xcf, 0x0f, 0xc9, 0x9e, 0xed, 0x57, 0xe7, 0x0e, 0x17, 0xa2, 0x50, - 0x77, 0x7d, 0x8a, 0xbf, 0xdd, 0x5f, 0x3e, 0xab, 0xa6, 0x9e, 0x3c, 0xab, 0xa6, 0x9e, 0x3e, 0x93, - 0xef, 0xf8, 0x47, 0x50, 0xe0, 0xd1, 0x28, 0xb3, 0x5b, 0xc1, 0x9b, 0x0e, 0x69, 0x7c, 0x0c, 0x79, - 0xce, 0x24, 0xf1, 0x4e, 0x1c, 0xdf, 0xa3, 0x07, 0xbb, 0x67, 0x3a, 0x49, 0xf7, 0x34, 0xe6, 0x21, - 0xfc, 0x30, 0xe4, 0x9d, 0xd0, 0x65, 0xb8, 0x35, 0xd0, 0x09, 0x57, 0xb8, 0x00, 0x85, 0xf2, 0xd8, - 0xe8, 0xf2, 0x85, 0x06, 0xf0, 0x81, 0x78, 0xb9, 0x3b, 0xfc, 0x59, 0x9d, 0x81, 0x31, 0xde, 0xc6, - 0x87, 0x13, 0x13, 0x57, 0x40, 0x68, 0xf4, 0x7b, 0x90, 0xf3, 0xb7, 0x3f, 0xc1, 0xf2, 0x5b, 0xa2, - 0x38, 0x7f, 0x65, 0x24, 0x6b, 0xe4, 0x7f, 0x89, 0x4c, 0x64, 0x3f, 0x5c, 0xde, 0x67, 0xd8, 0xe3, - 0x39, 0xf6, 0x19, 0xb3, 0x2e, 0x40, 0x90, 0x04, 0xb3, 0x2e, 0x3e, 0x7f, 0x55, 0x49, 0xbd, 0x78, - 0x55, 0x49, 0xfd, 0xfc, 0xaa, 0x92, 0x7a, 0x7c, 0x50, 0xd1, 0x9e, 0x1f, 0x54, 0xb4, 0x17, 0x07, - 0x15, 0xed, 0xd7, 0x83, 0x8a, 0xf6, 0xe4, 0xb7, 0x4a, 0xea, 0x7e, 0xba, 0x33, 0xf7, 0x57, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x1f, 0xa7, 0xfc, 0x28, 0x67, 0x13, 0x00, 0x00, + // 1992 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x19, 0x4d, 0x6f, 0x23, 0x49, + 0xd5, 0xed, 0xaf, 0xb1, 0x9f, 0xf3, 0x59, 0xcc, 0x08, 0x6f, 0x24, 0xec, 0x6c, 0xef, 0x0a, 0xcd, + 0xc2, 0xae, 0x4d, 0x02, 0xac, 0x86, 0x01, 0x16, 0xc5, 0x71, 0x26, 0x8a, 0x76, 0x32, 0x13, 0x55, + 0x76, 0x06, 0xb1, 0x8c, 0x10, 0x9d, 0xee, 0x8a, 0xd3, 0xa4, 0xdd, 0x6d, 0xaa, 0xca, 0x9e, 0x98, + 0x3d, 0xb0, 0x12, 0x20, 0x71, 0x40, 0x68, 0x8e, 0x1c, 0x10, 0xda, 0x11, 0xdc, 0xb8, 0xf1, 0x27, + 0x98, 0xe3, 0x4a, 0x7b, 0xe1, 0x80, 0x2c, 0x26, 0x1c, 0x38, 0x72, 0x8f, 0x38, 0xa0, 0xaa, 0xae, + 0xea, 0x0f, 0x27, 0xde, 0xb4, 0xd9, 0x3d, 0x70, 0x4a, 0xd7, 0xfb, 0xae, 0xf7, 0x5e, 0xbd, 0x0f, + 0x07, 0xf6, 0x4f, 0xef, 0xb0, 0x96, 0x1b, 0xb4, 0x4f, 0x87, 0x47, 0x84, 0xfa, 0x84, 0x13, 0xd6, + 0x1e, 0x11, 0xdf, 0x09, 0x68, 0x5b, 0x21, 0xac, 0x81, 0xdb, 0xb7, 0xec, 0x13, 0xd7, 0x27, 0x74, + 0xdc, 0x1e, 0x9c, 0xf6, 0x04, 0x80, 0xb5, 0xfb, 0x84, 0x5b, 0xed, 0xd1, 0x46, 0xbb, 0x47, 0x7c, + 0x42, 0x2d, 0x4e, 0x9c, 0xd6, 0x80, 0x06, 0x3c, 0x40, 0xaf, 0x87, 0x5c, 0xad, 0x24, 0x57, 0x6b, + 0x70, 0xda, 0x13, 0x00, 0xd6, 0x12, 0x5c, 0xad, 0xd1, 0xc6, 0xda, 0x5b, 0x3d, 0x97, 0x9f, 0x0c, + 0x8f, 0x5a, 0x76, 0xd0, 0x6f, 0xf7, 0x82, 0x5e, 0xd0, 0x96, 0xcc, 0x47, 0xc3, 0x63, 0x79, 0x92, + 0x07, 0xf9, 0x15, 0x0a, 0x5d, 0x9b, 0x69, 0x0a, 0x1d, 0xfa, 0xdc, 0xed, 0x93, 0x69, 0x2b, 0xd6, + 0xde, 0xbe, 0x8e, 0x81, 0xd9, 0x27, 0xa4, 0x6f, 0x5d, 0xe2, 0xdb, 0xbc, 0xec, 0x0c, 0x75, 0xe3, + 0x36, 0x25, 0x2c, 0x18, 0x52, 0xfb, 0xb2, 0xae, 0x8d, 0xab, 0x79, 0x86, 0xdc, 0xf5, 0xda, 0xae, + 0xcf, 0x19, 0xa7, 0xd3, 0x2c, 0xe6, 0x5f, 0x0b, 0x50, 0xd9, 0x3a, 0xd8, 0xdb, 0xa5, 0xc1, 0x70, + 0x80, 0xd6, 0xa1, 0xe8, 0x5b, 0x7d, 0x52, 0x37, 0xd6, 0x8d, 0xdb, 0xd5, 0xce, 0xc2, 0x8b, 0x49, + 0x33, 0x77, 0x3e, 0x69, 0x16, 0x1f, 0x58, 0x7d, 0x82, 0x25, 0x06, 0x79, 0x50, 0x19, 0x11, 0xca, + 0xdc, 0xc0, 0x67, 0xf5, 0xfc, 0x7a, 0xe1, 0x76, 0x6d, 0xf3, 0x9d, 0x56, 0x16, 0x37, 0xb7, 0xa4, + 0x82, 0xc7, 0x21, 0xeb, 0xbd, 0x80, 0x76, 0x5d, 0x66, 0x07, 0x23, 0x42, 0xc7, 0x9d, 0x15, 0xa5, + 0xa5, 0xa2, 0x90, 0x0c, 0x47, 0x1a, 0xd0, 0x2f, 0x0d, 0x58, 0x19, 0x50, 0x72, 0x4c, 0x28, 0x25, + 0x8e, 0xc2, 0xd7, 0x0b, 0xeb, 0xc6, 0xe7, 0xa0, 0xb6, 0xae, 0xd4, 0xae, 0x1c, 0x4c, 0xc9, 0xc7, + 0x97, 0x34, 0xa2, 0x3f, 0x1a, 0xb0, 0xc6, 0x08, 0x1d, 0x11, 0xba, 0xe5, 0x38, 0x94, 0x30, 0xd6, + 0x19, 0x6f, 0x7b, 0x2e, 0xf1, 0xf9, 0xf6, 0x5e, 0x17, 0xb3, 0x7a, 0x51, 0xfa, 0xe1, 0x7b, 0xd9, + 0x0c, 0x3a, 0x9c, 0x25, 0xa7, 0x63, 0x2a, 0x8b, 0xd6, 0x66, 0x92, 0x30, 0xfc, 0x29, 0x66, 0x98, + 0xc7, 0xb0, 0xa0, 0x03, 0x79, 0xdf, 0x65, 0x1c, 0x3d, 0x86, 0x72, 0x4f, 0x1c, 0x58, 0xdd, 0x90, + 0x06, 0xb6, 0xb2, 0x19, 0xa8, 0x65, 0x74, 0x96, 0x94, 0x3d, 0x65, 0x79, 0x64, 0x58, 0x49, 0x33, + 0x3f, 0x31, 0xa0, 0xb6, 0x75, 0xb0, 0x87, 0x55, 0x12, 0x66, 0x48, 0x9a, 0x4d, 0x00, 0xf1, 0x97, + 0x0d, 0x2c, 0x9b, 0x38, 0xf5, 0xfc, 0xba, 0x71, 0xbb, 0xd2, 0x41, 0x8a, 0x0e, 0x1e, 0x44, 0x18, + 0x9c, 0xa0, 0x12, 0x52, 0x4f, 0x5d, 0xdf, 0x91, 0xd1, 0x4e, 0x48, 0x7d, 0xd7, 0xf5, 0x1d, 0x2c, + 0x31, 0xe8, 0x3e, 0x94, 0x46, 0x84, 0x1e, 0x09, 0xff, 0x8b, 0x84, 0xf8, 0x6a, 0xb6, 0xeb, 0x3d, + 0x16, 0x2c, 0x9d, 0xea, 0xf9, 0xa4, 0x59, 0x92, 0x9f, 0x38, 0x14, 0x62, 0xfe, 0xc5, 0x80, 0xe5, + 0xc4, 0xad, 0xa4, 0x07, 0xef, 0xc0, 0x42, 0x2f, 0x91, 0x3f, 0xea, 0x86, 0x37, 0x95, 0x2d, 0x0b, + 0xc9, 0xdc, 0xc2, 0x29, 0x4a, 0x44, 0xa0, 0xaa, 0x1f, 0xa9, 0x7e, 0x27, 0x1b, 0x99, 0xdd, 0xaf, + 0x6d, 0x88, 0x35, 0x25, 0x80, 0x0c, 0xc7, 0x92, 0xcd, 0x7f, 0x85, 0xa1, 0xd0, 0x2f, 0x07, 0xdd, + 0x4e, 0xbc, 0x4e, 0x11, 0xf4, 0x6a, 0x67, 0x61, 0xc6, 0xcb, 0xba, 0x26, 0xa5, 0xf3, 0xff, 0x17, + 0x29, 0x7d, 0xb7, 0xf2, 0xbb, 0x8f, 0x9a, 0xb9, 0x0f, 0xff, 0xbe, 0x9e, 0x33, 0xf7, 0xa0, 0xd2, + 0x1d, 0x52, 0x8b, 0x0b, 0xe7, 0x7e, 0x17, 0x2a, 0x8e, 0xfa, 0x96, 0x21, 0x29, 0x74, 0x5e, 0xd5, + 0x35, 0x44, 0xd3, 0x5c, 0x4c, 0x9a, 0x8b, 0xa2, 0xb8, 0xb6, 0x34, 0x00, 0x47, 0x2c, 0xe6, 0x13, + 0x58, 0xdc, 0x39, 0x1b, 0x04, 0x94, 0x3f, 0x1c, 0x70, 0xe9, 0x8b, 0x2f, 0x43, 0x99, 0x48, 0x80, + 0x94, 0x56, 0x89, 0x13, 0x3f, 0x24, 0xc3, 0x0a, 0x8b, 0x5e, 0x83, 0x12, 0x39, 0xb3, 0x6c, 0xae, + 0x32, 0x78, 0x51, 0x91, 0x95, 0x76, 0x04, 0x10, 0x87, 0x38, 0xf3, 0x21, 0xc0, 0x2e, 0x89, 0x44, + 0x6f, 0xc1, 0xb2, 0x8e, 0x56, 0x3a, 0x89, 0xbe, 0xa8, 0x98, 0x97, 0x71, 0x1a, 0x8d, 0xa7, 0xe9, + 0xcd, 0x27, 0x50, 0x95, 0x89, 0x26, 0x32, 0x5f, 0x98, 0x20, 0xf3, 0x4c, 0x49, 0x89, 0x4c, 0x90, + 0x14, 0x38, 0xc4, 0x45, 0x4f, 0x27, 0x3f, 0xeb, 0xe9, 0x24, 0xfc, 0xea, 0xc1, 0x62, 0xc8, 0xab, + 0x5f, 0x73, 0x26, 0x0d, 0x6f, 0x42, 0x45, 0x9b, 0xa9, 0xb4, 0x44, 0x55, 0x5c, 0x0b, 0xc2, 0x11, + 0x45, 0x42, 0xdb, 0x09, 0xa4, 0x1e, 0x4d, 0x36, 0x65, 0x6f, 0xc0, 0x0d, 0x95, 0xb6, 0x4a, 0xd7, + 0xb2, 0x22, 0xbb, 0xa1, 0x7d, 0xa6, 0xf1, 0x09, 0x4d, 0x3f, 0x87, 0xfa, 0xac, 0xd2, 0xff, 0x19, + 0x9e, 0x75, 0x76, 0x53, 0xcc, 0xdf, 0x1a, 0xb0, 0x92, 0x94, 0x94, 0x3d, 0x7c, 0xd9, 0x95, 0x5c, + 0x5f, 0x24, 0x13, 0x1e, 0xf9, 0x83, 0x01, 0x37, 0x53, 0x57, 0x9b, 0x2b, 0xe2, 0x73, 0x18, 0x95, + 0x4c, 0x8e, 0xc2, 0x1c, 0xc9, 0xf1, 0x49, 0x1e, 0x16, 0xef, 0x5b, 0x47, 0xc4, 0x3b, 0x24, 0x1e, + 0xb1, 0x79, 0x40, 0xd1, 0x07, 0x50, 0xeb, 0x5b, 0xdc, 0x3e, 0x91, 0x50, 0xdd, 0xc6, 0xba, 0xd9, + 0x8a, 0x52, 0x4a, 0x52, 0x6b, 0x3f, 0x16, 0xb3, 0xe3, 0x73, 0x3a, 0xee, 0x7c, 0x41, 0x99, 0x54, + 0x4b, 0x60, 0x70, 0x52, 0x9b, 0x9c, 0x3d, 0xe4, 0x79, 0xe7, 0x6c, 0x20, 0x2a, 0xd3, 0xfc, 0x23, + 0x4f, 0xca, 0x04, 0x4c, 0x7e, 0x3a, 0x74, 0x29, 0xe9, 0x13, 0x9f, 0xc7, 0xb3, 0xc7, 0xfe, 0x94, + 0x7c, 0x7c, 0x49, 0xe3, 0xda, 0x3b, 0xb0, 0x32, 0x6d, 0x3c, 0x5a, 0x81, 0xc2, 0x29, 0x19, 0x87, + 0xf1, 0xc2, 0xe2, 0x13, 0xdd, 0x84, 0xd2, 0xc8, 0xf2, 0x86, 0xea, 0x35, 0xe2, 0xf0, 0x70, 0x37, + 0x7f, 0xc7, 0x30, 0xff, 0x64, 0x40, 0x7d, 0x96, 0x21, 0xe8, 0x4b, 0x09, 0x41, 0x9d, 0x9a, 0xb2, + 0xaa, 0xf0, 0x2e, 0x19, 0x87, 0x52, 0x77, 0xa0, 0x12, 0x0c, 0xc4, 0xb4, 0x18, 0x50, 0x15, 0xf5, + 0x37, 0x74, 0x24, 0x1f, 0x2a, 0xf8, 0xc5, 0xa4, 0x79, 0x2b, 0x25, 0x5e, 0x23, 0x70, 0xc4, 0x8a, + 0x4c, 0x28, 0x4b, 0x7b, 0x58, 0xbd, 0x20, 0x7b, 0x12, 0x88, 0xda, 0xfa, 0x58, 0x42, 0xb0, 0xc2, + 0x98, 0x1f, 0x40, 0x45, 0xb4, 0xdc, 0x7d, 0xc2, 0x2d, 0x91, 0x40, 0x8c, 0x78, 0xc7, 0xf7, 0x5d, + 0xff, 0x54, 0x99, 0x16, 0x25, 0xd0, 0xa1, 0x82, 0xe3, 0x88, 0xe2, 0xaa, 0x12, 0x9b, 0x9f, 0xb3, + 0xc4, 0xfe, 0x39, 0x0f, 0x35, 0xa1, 0x5d, 0x57, 0xed, 0x6f, 0xc3, 0xa2, 0x97, 0xbc, 0x93, 0xb2, + 0xe2, 0x96, 0x12, 0x98, 0xce, 0x52, 0x9c, 0xa6, 0x15, 0xcc, 0xc7, 0x2e, 0xf1, 0x9c, 0x88, 0x39, + 0x9f, 0x66, 0xbe, 0x97, 0x44, 0xe2, 0x34, 0xad, 0x78, 0x8b, 0x4f, 0x45, 0xb4, 0xe5, 0xc3, 0x49, + 0xb4, 0x98, 0xef, 0x0b, 0x20, 0x0e, 0x71, 0x57, 0xdd, 0xb8, 0x38, 0xdf, 0x8d, 0xd1, 0x5d, 0x58, + 0x12, 0xed, 0x31, 0x18, 0xf2, 0x43, 0x62, 0x07, 0xbe, 0xc3, 0xea, 0x25, 0xd9, 0x48, 0xd1, 0xf9, + 0xa4, 0xb9, 0xf4, 0x5e, 0x0a, 0x83, 0xa7, 0x28, 0xcd, 0x5f, 0x00, 0xc0, 0xc3, 0xa3, 0x9f, 0x10, + 0x3b, 0x8c, 0xd6, 0xf5, 0xe3, 0x9f, 0xa8, 0xb7, 0x6a, 0xeb, 0x10, 0x50, 0xe5, 0x90, 0xb8, 0xde, + 0x26, 0x70, 0x38, 0x45, 0x89, 0xda, 0x50, 0x8d, 0x46, 0x42, 0x55, 0x4b, 0x56, 0x15, 0x5b, 0x35, + 0x9a, 0x1b, 0x71, 0x4c, 0x93, 0x4a, 0x9d, 0xe2, 0xb5, 0xa9, 0xd3, 0x81, 0xc2, 0xd0, 0x75, 0xe4, + 0xd5, 0xab, 0x9d, 0xaf, 0xe9, 0xf4, 0x7f, 0xb4, 0xd7, 0xbd, 0x98, 0x34, 0x5f, 0x9d, 0xb5, 0xb6, + 0xf1, 0xf1, 0x80, 0xb0, 0xd6, 0xa3, 0xbd, 0x2e, 0x16, 0xcc, 0x57, 0x05, 0xa3, 0x3c, 0x67, 0x30, + 0x36, 0x01, 0xd4, 0xad, 0x05, 0xf7, 0x8d, 0x30, 0x10, 0x7a, 0x3c, 0xde, 0x8d, 0x30, 0x38, 0x41, + 0x85, 0x18, 0xac, 0xda, 0x94, 0xc8, 0x6f, 0x11, 0x2e, 0xc6, 0xad, 0xfe, 0xa0, 0x5e, 0x91, 0x83, + 0xf0, 0x57, 0xb2, 0x55, 0x27, 0xc1, 0xd6, 0x79, 0x45, 0xa9, 0x59, 0xdd, 0x9e, 0x16, 0x86, 0x2f, + 0xcb, 0x47, 0x01, 0xac, 0x3a, 0xc4, 0x23, 0x69, 0xa5, 0xd5, 0xb9, 0x95, 0xde, 0x12, 0x0a, 0xbb, + 0xd3, 0x82, 0xf0, 0x65, 0xd9, 0xe8, 0x47, 0xb0, 0xa6, 0x81, 0xbb, 0xd4, 0xb2, 0xc9, 0x01, 0xa1, + 0x6e, 0xe0, 0xe8, 0x94, 0x05, 0xe9, 0xa9, 0x86, 0x98, 0x2f, 0xbb, 0x33, 0xa9, 0xf0, 0xa7, 0x48, + 0x40, 0x0e, 0x94, 0xbd, 0xb0, 0xb7, 0xd4, 0x64, 0x61, 0xff, 0x4e, 0xb6, 0x5b, 0xc4, 0xd9, 0xdf, + 0x4a, 0xf6, 0x94, 0x68, 0x6e, 0x54, 0xed, 0x44, 0xc9, 0x46, 0x67, 0x50, 0xb3, 0x7c, 0x3f, 0xe0, + 0xd2, 0x9b, 0xac, 0xbe, 0x20, 0x55, 0x6d, 0xcd, 0xad, 0x6a, 0x2b, 0x96, 0x31, 0xd5, 0xc3, 0x12, + 0x18, 0x9c, 0x54, 0x85, 0x9e, 0xc2, 0x72, 0xf0, 0xd4, 0x27, 0x14, 0x8b, 0x85, 0x96, 0xf8, 0x62, + 0x19, 0x59, 0x94, 0xda, 0xbf, 0x91, 0x51, 0x7b, 0x8a, 0x39, 0x4e, 0xe9, 0x34, 0x9c, 0xe1, 0x69, + 0x2d, 0xa8, 0x05, 0x70, 0xec, 0xfa, 0x96, 0xe7, 0xfe, 0x8c, 0x50, 0x56, 0x5f, 0x92, 0x65, 0x7f, + 0x49, 0xa4, 0xf3, 0xbd, 0x08, 0x8a, 0x13, 0x14, 0xe8, 0x9b, 0x50, 0xb3, 0xbd, 0x21, 0xe3, 0x84, + 0xca, 0x0a, 0xb1, 0x2c, 0x5f, 0x50, 0x74, 0xbf, 0xed, 0x18, 0x85, 0x93, 0x74, 0x6b, 0xdf, 0x82, + 0xda, 0xff, 0xd8, 0x17, 0x45, 0x5f, 0x9d, 0x76, 0xe8, 0x5c, 0x7d, 0xf5, 0x3f, 0x06, 0x2c, 0xa5, + 0xdd, 0x10, 0x4d, 0x63, 0xc6, 0xcc, 0x95, 0x55, 0xd7, 0xca, 0xc2, 0xcc, 0x5a, 0xa9, 0x4a, 0x52, + 0xf1, 0xb3, 0x94, 0xa4, 0x4d, 0x00, 0x6b, 0xe0, 0xea, 0x6a, 0x14, 0x56, 0xb7, 0xa8, 0x9e, 0xc4, + 0xeb, 0x22, 0x4e, 0x50, 0x89, 0x80, 0xd9, 0x81, 0xcf, 0x69, 0xe0, 0x79, 0x84, 0xca, 0x0a, 0x56, + 0x09, 0x03, 0xb6, 0x1d, 0x41, 0x71, 0x82, 0xc2, 0x7c, 0x13, 0xaa, 0x38, 0x08, 0xf8, 0x81, 0xc5, + 0x4f, 0x18, 0x6a, 0x42, 0x69, 0x20, 0x3e, 0xd4, 0xce, 0x29, 0x97, 0x6b, 0x89, 0xc1, 0x21, 0xdc, + 0xfc, 0x8d, 0x01, 0xaf, 0xcc, 0x5c, 0x01, 0x85, 0xbd, 0x76, 0x74, 0x52, 0xde, 0x8b, 0xec, 0x8d, + 0xe9, 0x70, 0x82, 0x4a, 0x74, 0xd9, 0xd4, 0xde, 0x38, 0xdd, 0x65, 0x53, 0xda, 0x70, 0x9a, 0xd6, + 0xfc, 0x77, 0x1e, 0xca, 0x87, 0xdc, 0xe2, 0x43, 0x86, 0x9e, 0x40, 0x45, 0x24, 0xbb, 0x63, 0x71, + 0x4b, 0x6a, 0xce, 0xfc, 0x33, 0x89, 0x9e, 0x56, 0xe2, 0x06, 0xa3, 0x21, 0x38, 0x92, 0x28, 0x36, + 0x4b, 0x26, 0xf5, 0x28, 0xf3, 0xa2, 0x0a, 0x11, 0x6a, 0xc7, 0x0a, 0x2b, 0xa6, 0xeb, 0x3e, 0x61, + 0xcc, 0xea, 0xe9, 0xd4, 0x88, 0xa6, 0xeb, 0xfd, 0x10, 0x8c, 0x35, 0x1e, 0xbd, 0x0d, 0x65, 0x4a, + 0x2c, 0x16, 0xf5, 0xfc, 0x86, 0x16, 0x89, 0x25, 0xf4, 0x62, 0xd2, 0x5c, 0x50, 0xc2, 0xe5, 0x19, + 0x2b, 0x6a, 0xf4, 0x3e, 0xdc, 0x70, 0x08, 0xb7, 0x5c, 0x2f, 0x6c, 0xf5, 0xb5, 0xcd, 0xaf, 0x67, + 0x5c, 0xee, 0xa5, 0xb0, 0x6e, 0xc8, 0xda, 0xa9, 0x09, 0x9b, 0xd4, 0x01, 0x6b, 0x81, 0x22, 0xad, + 0xed, 0xc0, 0x21, 0x32, 0x6d, 0x4a, 0x71, 0x5a, 0x6f, 0x07, 0x0e, 0xc1, 0x12, 0x63, 0x3e, 0x33, + 0xa0, 0x16, 0x4a, 0xda, 0xb6, 0x86, 0x8c, 0xa0, 0x8d, 0xe8, 0x16, 0x61, 0xb8, 0x75, 0x1f, 0x2a, + 0xbe, 0x37, 0x1e, 0x90, 0x8b, 0x49, 0xb3, 0x2a, 0xc9, 0xc4, 0x21, 0xba, 0x40, 0xc2, 0x47, 0xf9, + 0x6b, 0x7c, 0xf4, 0x1a, 0x94, 0xe4, 0x58, 0xa5, 0x9c, 0x19, 0x4d, 0x51, 0x72, 0xf4, 0xc2, 0x21, + 0xce, 0xfc, 0x7d, 0x1e, 0x16, 0x53, 0x97, 0xcb, 0x30, 0xc9, 0x44, 0xab, 0x52, 0x3e, 0xc3, 0xfa, + 0x3d, 0xfb, 0x97, 0xab, 0x1f, 0x40, 0xd9, 0x16, 0xf7, 0xd3, 0x3f, 0x1d, 0x6e, 0xcc, 0x13, 0x0a, + 0xe9, 0x99, 0x38, 0x93, 0xe4, 0x91, 0x61, 0x25, 0x10, 0xed, 0xc2, 0x2a, 0x25, 0x9c, 0x8e, 0xb7, + 0x8e, 0x39, 0xa1, 0xc9, 0xd9, 0xae, 0x14, 0xf7, 0x7a, 0x3c, 0x4d, 0x80, 0x2f, 0xf3, 0x98, 0x1e, + 0x14, 0x45, 0x1f, 0x16, 0x6e, 0x67, 0x4a, 0x4c, 0xf8, 0x5b, 0x4b, 0xe4, 0x76, 0xcd, 0xac, 0xf1, + 0xc2, 0x3b, 0xbe, 0xe5, 0x07, 0x61, 0xb2, 0x97, 0x62, 0xef, 0x3c, 0x10, 0x40, 0x1c, 0xe2, 0xee, + 0xde, 0x14, 0xfb, 0xde, 0xaf, 0x9f, 0x37, 0x73, 0xcf, 0x9e, 0x37, 0x73, 0x1f, 0x3d, 0x57, 0xbb, + 0xdf, 0x0f, 0xa1, 0x1a, 0x77, 0xfd, 0xcf, 0x59, 0xa5, 0xf9, 0x63, 0xa8, 0x88, 0x4c, 0xd2, 0xd3, + 0xea, 0x35, 0x35, 0x3a, 0x5d, 0x3d, 0xf3, 0x59, 0xaa, 0xa7, 0xb9, 0x09, 0xe1, 0x8f, 0x89, 0xa2, + 0x12, 0xba, 0x9c, 0xf4, 0x53, 0x95, 0x70, 0x4f, 0x00, 0x70, 0x08, 0x4f, 0xac, 0xbb, 0xbf, 0x32, + 0x00, 0xe4, 0x58, 0xbf, 0x33, 0x12, 0xab, 0xd8, 0x3a, 0x14, 0x45, 0x19, 0x9f, 0x36, 0x4c, 0x3e, + 0x01, 0x89, 0x41, 0x8f, 0xa0, 0x1c, 0xc8, 0x69, 0x40, 0x1a, 0x55, 0xdb, 0x7c, 0x6b, 0x66, 0xd6, + 0xa8, 0xff, 0x2c, 0xb4, 0xb0, 0xf5, 0x74, 0xe7, 0x8c, 0x13, 0x5f, 0xd8, 0x18, 0x67, 0x4c, 0x38, + 0x52, 0x60, 0x25, 0xac, 0xf3, 0xfa, 0x8b, 0x97, 0x8d, 0xdc, 0xc7, 0x2f, 0x1b, 0xb9, 0xbf, 0xbd, + 0x6c, 0xe4, 0x3e, 0x3c, 0x6f, 0x18, 0x2f, 0xce, 0x1b, 0xc6, 0xc7, 0xe7, 0x0d, 0xe3, 0x1f, 0xe7, + 0x0d, 0xe3, 0xd9, 0x3f, 0x1b, 0xb9, 0xf7, 0xf3, 0xa3, 0x8d, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, + 0x01, 0xac, 0x25, 0xfa, 0x9b, 0x19, 0x00, 0x00, } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto index 5dd45c38..2acd4727 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto @@ -246,6 +246,185 @@ message ListMeta { optional string resourceVersion = 2; } +// ListOptions is the query options to a standard REST list call. +message ListOptions { + // A selector to restrict the list of returned objects by their labels. + // Defaults to everything. + // +optional + optional string labelSelector = 1; + + // A selector to restrict the list of returned objects by their fields. + // Defaults to everything. + // +optional + optional string fieldSelector = 2; + + // Watch for changes to the described resources and return them as a stream of + // add, update, and remove notifications. Specify resourceVersion. + // +optional + optional bool watch = 3; + + // When specified with a watch call, shows changes that occur after that particular version of a resource. + // Defaults to changes from the beginning of history. + // When specified for list: + // - if unset, then the result is returned from remote storage based on quorum-read flag; + // - if it's 0, then we simply return what we currently have in cache, no guarantee; + // - if set to non zero, then the result is at least as fresh as given rv. + // +optional + optional string resourceVersion = 4; + + // Timeout for the list/watch call. + // +optional + optional int64 timeoutSeconds = 5; +} + +// ObjectMeta is metadata that all persisted resources must have, which includes all objects +// users must create. +message ObjectMeta { + // Name must be unique within a namespace. Is required when creating resources, although + // some resources may allow a client to request the generation of an appropriate name + // automatically. Name is primarily intended for creation idempotence and configuration + // definition. + // Cannot be updated. + // More info: http://kubernetes.io/docs/user-guide/identifiers#names + // +optional + optional string name = 1; + + // GenerateName is an optional prefix, used by the server, to generate a unique + // name ONLY IF the Name field has not been provided. + // If this field is used, the name returned to the client will be different + // than the name passed. This value will also be combined with a unique suffix. + // The provided value has the same validation rules as the Name field, + // and may be truncated by the length of the suffix required to make the value + // unique on the server. + // + // If this field is specified and the generated name exists, the server will + // NOT return a 409 - instead, it will either return 201 Created or 500 with Reason + // ServerTimeout indicating a unique name could not be found in the time allotted, and the client + // should retry (optionally after the time indicated in the Retry-After header). + // + // Applied only if Name is not specified. + // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#idempotency + // +optional + optional string generateName = 2; + + // Namespace defines the space within each name must be unique. An empty namespace is + // equivalent to the "default" namespace, but "default" is the canonical representation. + // Not all objects are required to be scoped to a namespace - the value of this field for + // those objects will be empty. + // + // Must be a DNS_LABEL. + // Cannot be updated. + // More info: http://kubernetes.io/docs/user-guide/namespaces + // +optional + optional string namespace = 3; + + // SelfLink is a URL representing this object. + // Populated by the system. + // Read-only. + // +optional + optional string selfLink = 4; + + // UID is the unique in time and space value for this object. It is typically generated by + // the server on successful creation of a resource and is not allowed to change on PUT + // operations. + // + // Populated by the system. + // Read-only. + // More info: http://kubernetes.io/docs/user-guide/identifiers#uids + // +optional + optional string uid = 5; + + // An opaque value that represents the internal version of this object that can + // be used by clients to determine when objects have changed. May be used for optimistic + // concurrency, change detection, and the watch operation on a resource or set of resources. + // Clients must treat these values as opaque and passed unmodified back to the server. + // They may only be valid for a particular resource or set of resources. + // + // Populated by the system. + // Read-only. + // Value must be treated as opaque by clients and . + // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency + // +optional + optional string resourceVersion = 6; + + // A sequence number representing a specific generation of the desired state. + // Populated by the system. Read-only. + // +optional + optional int64 generation = 7; + + // CreationTimestamp is a timestamp representing the server time when this object was + // created. It is not guaranteed to be set in happens-before order across separate operations. + // Clients may not set this value. It is represented in RFC3339 form and is in UTC. + // + // Populated by the system. + // Read-only. + // Null for lists. + // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + // +optional + optional Time creationTimestamp = 8; + + // DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This + // field is set by the server when a graceful deletion is requested by the user, and is not + // directly settable by a client. The resource is expected to be deleted (no longer visible + // from resource lists, and not reachable by name) after the time in this field. Once set, + // this value may not be unset or be set further into the future, although it may be shortened + // or the resource may be deleted prior to this time. For example, a user may request that + // a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination + // signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard + // termination signal (SIGKILL) to the container and after cleanup, remove the pod from the + // API. In the presence of network partitions, this object may still exist after this + // timestamp, until an administrator or automated process can determine the resource is + // fully terminated. + // If not set, graceful deletion of the object has not been requested. + // + // Populated by the system when a graceful deletion is requested. + // Read-only. + // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + // +optional + optional Time deletionTimestamp = 9; + + // Number of seconds allowed for this object to gracefully terminate before + // it will be removed from the system. Only set when deletionTimestamp is also set. + // May only be shortened. + // Read-only. + // +optional + optional int64 deletionGracePeriodSeconds = 10; + + // Map of string keys and values that can be used to organize and categorize + // (scope and select) objects. May match selectors of replication controllers + // and services. + // More info: http://kubernetes.io/docs/user-guide/labels + // +optional + map labels = 11; + + // Annotations is an unstructured key value map stored with a resource that may be + // set by external tools to store and retrieve arbitrary metadata. They are not + // queryable and should be preserved when modifying objects. + // More info: http://kubernetes.io/docs/user-guide/annotations + // +optional + map annotations = 12; + + // List of objects depended by this object. If ALL objects in the list have + // been deleted, this object will be garbage collected. If this object is managed by a controller, + // then an entry in this list will point to this controller, with the controller field set to true. + // There cannot be more than one managing controller. + // +optional + repeated OwnerReference ownerReferences = 13; + + // Must be empty before the object is deleted from the registry. Each entry + // is an identifier for the responsible component that will remove the entry + // from the list. If the deletionTimestamp of the object is non-nil, entries + // in this list can only be removed. + // +optional + repeated string finalizers = 14; + + // The name of the cluster which the object belongs to. + // This is used to distinguish resources with same name and namespace in different clusters. + // This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. + // +optional + optional string clusterName = 15; +} + // OwnerReference contains enough information to let you identify an owning // object. Currently, an owning object must be in the same namespace, so there // is no namespace field. diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/apis/meta/v1/helpers.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/apis/meta/v1/helpers.go index 10eb5f2f..5836bb32 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/apis/meta/v1/helpers.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/apis/meta/v1/helpers.go @@ -19,6 +19,7 @@ package v1 import ( "fmt" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/selection" ) @@ -181,3 +182,25 @@ func ExtractGroupVersions(l *APIGroupList) []string { } return groupVersions } + +// HasAnnotation returns a bool if passed in annotation exists +func HasAnnotation(obj ObjectMeta, ann string) bool { + _, found := obj.Annotations[ann] + return found +} + +// SetMetaDataAnnotation sets the annotation and value +func SetMetaDataAnnotation(obj *ObjectMeta, ann string, value string) { + if obj.Annotations == nil { + obj.Annotations = make(map[string]string) + } + obj.Annotations[ann] = value +} + +// SingleObject returns a ListOptions for watching a single object. +func SingleObject(meta ObjectMeta) ListOptions { + return ListOptions{ + FieldSelector: fields.OneTermEqualSelector("metadata.name", meta.Name).String(), + ResourceVersion: meta.ResourceVersion, + } +} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/apis/meta/v1/labels.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/apis/meta/v1/labels.go new file mode 100644 index 00000000..8b4c0423 --- /dev/null +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/apis/meta/v1/labels.go @@ -0,0 +1,75 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +// Clones the given selector and returns a new selector with the given key and value added. +// Returns the given selector, if labelKey is empty. +func CloneSelectorAndAddLabel(selector *LabelSelector, labelKey, labelValue string) *LabelSelector { + if labelKey == "" { + // Don't need to add a label. + return selector + } + + // Clone. + newSelector := new(LabelSelector) + + // TODO(madhusudancs): Check if you can use deepCopy_extensions_LabelSelector here. + newSelector.MatchLabels = make(map[string]string) + if selector.MatchLabels != nil { + for key, val := range selector.MatchLabels { + newSelector.MatchLabels[key] = val + } + } + newSelector.MatchLabels[labelKey] = labelValue + + if selector.MatchExpressions != nil { + newMExps := make([]LabelSelectorRequirement, len(selector.MatchExpressions)) + for i, me := range selector.MatchExpressions { + newMExps[i].Key = me.Key + newMExps[i].Operator = me.Operator + if me.Values != nil { + newMExps[i].Values = make([]string, len(me.Values)) + copy(newMExps[i].Values, me.Values) + } else { + newMExps[i].Values = nil + } + } + newSelector.MatchExpressions = newMExps + } else { + newSelector.MatchExpressions = nil + } + + return newSelector +} + +// AddLabelToSelector returns a selector with the given key and value added to the given selector's MatchLabels. +func AddLabelToSelector(selector *LabelSelector, labelKey, labelValue string) *LabelSelector { + if labelKey == "" { + // Don't need to add a label. + return selector + } + if selector.MatchLabels == nil { + selector.MatchLabels = make(map[string]string) + } + selector.MatchLabels[labelKey] = labelValue + return selector +} + +// SelectorHasLabel checks if the given selector contains the given label key in its MatchLabels +func SelectorHasLabel(selector *LabelSelector, labelKey string) bool { + return len(selector.MatchLabels[labelKey]) > 0 +} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/apis/meta/v1/meta.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/apis/meta/v1/meta.go index d7dcea1a..871858ec 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/apis/meta/v1/meta.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/apis/meta/v1/meta.go @@ -17,11 +17,78 @@ limitations under the License. package v1 import ( + "k8s.io/apimachinery/pkg/conversion" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/types" ) +// ObjectMetaFor returns a pointer to a provided object's ObjectMeta. +// TODO: allow runtime.Unknown to extract this object +// TODO: Remove this function and use meta.ObjectMetaAccessor() instead. +func ObjectMetaFor(obj runtime.Object) (*ObjectMeta, error) { + v, err := conversion.EnforcePtr(obj) + if err != nil { + return nil, err + } + var meta *ObjectMeta + err = runtime.FieldPtr(v, "ObjectMeta", &meta) + return meta, err +} + +// ListMetaFor returns a pointer to a provided object's ListMeta, +// or an error if the object does not have that pointer. +// TODO: allow runtime.Unknown to extract this object +// TODO: Remove this function and use meta.ObjectMetaAccessor() instead. +func ListMetaFor(obj runtime.Object) (*ListMeta, error) { + v, err := conversion.EnforcePtr(obj) + if err != nil { + return nil, err + } + var meta *ListMeta + err = runtime.FieldPtr(v, "ListMeta", &meta) + return meta, err +} + +// TODO: move this, Object, List, and Type to a different package +type ObjectMetaAccessor interface { + GetObjectMeta() Object +} + +// Object lets you work with object metadata from any of the versioned or +// internal API objects. Attempting to set or retrieve a field on an object that does +// not support that field (Name, UID, Namespace on lists) will be a no-op and return +// a default value. +type Object interface { + GetNamespace() string + SetNamespace(namespace string) + GetName() string + SetName(name string) + GetGenerateName() string + SetGenerateName(name string) + GetUID() types.UID + SetUID(uid types.UID) + GetResourceVersion() string + SetResourceVersion(version string) + GetSelfLink() string + SetSelfLink(selfLink string) + GetCreationTimestamp() Time + SetCreationTimestamp(timestamp Time) + GetDeletionTimestamp() *Time + SetDeletionTimestamp(timestamp *Time) + GetLabels() map[string]string + SetLabels(labels map[string]string) + GetAnnotations() map[string]string + SetAnnotations(annotations map[string]string) + GetFinalizers() []string + SetFinalizers(finalizers []string) + GetOwnerReferences() []OwnerReference + SetOwnerReferences([]OwnerReference) + GetClusterName() string + SetClusterName(clusterName string) +} + // ListMetaAccessor retrieves the list interface from an object -// TODO: move this, and TypeMeta and ListMeta, to a different package type ListMetaAccessor interface { GetListMeta() List } @@ -64,3 +131,71 @@ func (obj *TypeMeta) GroupVersionKind() schema.GroupVersionKind { } func (obj *ListMeta) GetListMeta() List { return obj } + +func (obj *ObjectMeta) GetObjectMeta() Object { return obj } + +// Namespace implements metav1.Object for any object with an ObjectMeta typed field. Allows +// fast, direct access to metadata fields for API objects. +func (meta *ObjectMeta) GetNamespace() string { return meta.Namespace } +func (meta *ObjectMeta) SetNamespace(namespace string) { meta.Namespace = namespace } +func (meta *ObjectMeta) GetName() string { return meta.Name } +func (meta *ObjectMeta) SetName(name string) { meta.Name = name } +func (meta *ObjectMeta) GetGenerateName() string { return meta.GenerateName } +func (meta *ObjectMeta) SetGenerateName(generateName string) { meta.GenerateName = generateName } +func (meta *ObjectMeta) GetUID() types.UID { return meta.UID } +func (meta *ObjectMeta) SetUID(uid types.UID) { meta.UID = uid } +func (meta *ObjectMeta) GetResourceVersion() string { return meta.ResourceVersion } +func (meta *ObjectMeta) SetResourceVersion(version string) { meta.ResourceVersion = version } +func (meta *ObjectMeta) GetSelfLink() string { return meta.SelfLink } +func (meta *ObjectMeta) SetSelfLink(selfLink string) { meta.SelfLink = selfLink } +func (meta *ObjectMeta) GetCreationTimestamp() Time { return meta.CreationTimestamp } +func (meta *ObjectMeta) SetCreationTimestamp(creationTimestamp Time) { + meta.CreationTimestamp = creationTimestamp +} +func (meta *ObjectMeta) GetDeletionTimestamp() *Time { return meta.DeletionTimestamp } +func (meta *ObjectMeta) SetDeletionTimestamp(deletionTimestamp *Time) { + meta.DeletionTimestamp = deletionTimestamp +} +func (meta *ObjectMeta) GetLabels() map[string]string { return meta.Labels } +func (meta *ObjectMeta) SetLabels(labels map[string]string) { meta.Labels = labels } +func (meta *ObjectMeta) GetAnnotations() map[string]string { return meta.Annotations } +func (meta *ObjectMeta) SetAnnotations(annotations map[string]string) { meta.Annotations = annotations } +func (meta *ObjectMeta) GetFinalizers() []string { return meta.Finalizers } +func (meta *ObjectMeta) SetFinalizers(finalizers []string) { meta.Finalizers = finalizers } + +func (meta *ObjectMeta) GetOwnerReferences() []OwnerReference { + ret := make([]OwnerReference, len(meta.OwnerReferences)) + for i := 0; i < len(meta.OwnerReferences); i++ { + ret[i].Kind = meta.OwnerReferences[i].Kind + ret[i].Name = meta.OwnerReferences[i].Name + ret[i].UID = meta.OwnerReferences[i].UID + ret[i].APIVersion = meta.OwnerReferences[i].APIVersion + if meta.OwnerReferences[i].Controller != nil { + value := *meta.OwnerReferences[i].Controller + ret[i].Controller = &value + } + } + return ret +} + +func (meta *ObjectMeta) SetOwnerReferences(references []OwnerReference) { + newReferences := make([]OwnerReference, len(references)) + for i := 0; i < len(references); i++ { + newReferences[i].Kind = references[i].Kind + newReferences[i].Name = references[i].Name + newReferences[i].UID = references[i].UID + newReferences[i].APIVersion = references[i].APIVersion + if references[i].Controller != nil { + value := *references[i].Controller + newReferences[i].Controller = &value + } + } + meta.OwnerReferences = newReferences +} + +func (meta *ObjectMeta) GetClusterName() string { + return meta.ClusterName +} +func (meta *ObjectMeta) SetClusterName(clusterName string) { + meta.ClusterName = clusterName +} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/apis/meta/v1/register.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/apis/meta/v1/register.go index c20c35b6..ec3c221d 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/apis/meta/v1/register.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/apis/meta/v1/register.go @@ -25,7 +25,7 @@ import ( const GroupName = "meta.k8s.io" // SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = schema.GroupVersion{Group: "", Version: ""} +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} // WatchEventKind is name reserved for serializing watch events. const WatchEventKind = "WatchEvent" @@ -42,6 +42,7 @@ func AddToGroupVersion(scheme *runtime.Scheme, groupVersion schema.GroupVersion) schema.GroupVersion{Group: groupVersion.Group, Version: runtime.APIVersionInternal}.WithKind(WatchEventKind), &InternalEvent{}, ) + scheme.AddKnownTypes(groupVersion, &ListOptions{}) scheme.AddConversionFuncs( Convert_versioned_Event_to_watch_Event, Convert_versioned_InternalEvent_to_versioned_Event, @@ -49,3 +50,15 @@ func AddToGroupVersion(scheme *runtime.Scheme, groupVersion schema.GroupVersion) Convert_versioned_Event_to_versioned_InternalEvent, ) } + +// scheme is the registry for the common types that adhere to the meta v1 API spec. +var scheme = runtime.NewScheme() + +// ParameterCodec knows about query parameters used with the meta v1 API spec. +var ParameterCodec = runtime.NewParameterCodec(scheme) + +func init() { + scheme.AddUnversionedTypes(SchemeGroupVersion, + &ListOptions{}, + ) +} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/apis/meta/v1/time.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/apis/meta/v1/time.go index 87fdd5a0..a1e01f34 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/apis/meta/v1/time.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/apis/meta/v1/time.go @@ -145,8 +145,8 @@ func (t Time) MarshalJSON() ([]byte, error) { return json.Marshal(t.UTC().Format(time.RFC3339)) } -func (_ Time) OpenAPIDefinition() common.OpenAPIDefinition { - return common.OpenAPIDefinition{ +func (_ Time) OpenAPIDefinition() openapi.OpenAPIDefinition { + return openapi.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Type: []string{"string"}, diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go index 5ec008d4..dd096ffa 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go @@ -71,6 +71,165 @@ type ListMeta struct { ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,2,opt,name=resourceVersion"` } +// ObjectMeta is metadata that all persisted resources must have, which includes all objects +// users must create. +type ObjectMeta struct { + // Name must be unique within a namespace. Is required when creating resources, although + // some resources may allow a client to request the generation of an appropriate name + // automatically. Name is primarily intended for creation idempotence and configuration + // definition. + // Cannot be updated. + // More info: http://kubernetes.io/docs/user-guide/identifiers#names + // +optional + Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"` + + // GenerateName is an optional prefix, used by the server, to generate a unique + // name ONLY IF the Name field has not been provided. + // If this field is used, the name returned to the client will be different + // than the name passed. This value will also be combined with a unique suffix. + // The provided value has the same validation rules as the Name field, + // and may be truncated by the length of the suffix required to make the value + // unique on the server. + // + // If this field is specified and the generated name exists, the server will + // NOT return a 409 - instead, it will either return 201 Created or 500 with Reason + // ServerTimeout indicating a unique name could not be found in the time allotted, and the client + // should retry (optionally after the time indicated in the Retry-After header). + // + // Applied only if Name is not specified. + // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#idempotency + // +optional + GenerateName string `json:"generateName,omitempty" protobuf:"bytes,2,opt,name=generateName"` + + // Namespace defines the space within each name must be unique. An empty namespace is + // equivalent to the "default" namespace, but "default" is the canonical representation. + // Not all objects are required to be scoped to a namespace - the value of this field for + // those objects will be empty. + // + // Must be a DNS_LABEL. + // Cannot be updated. + // More info: http://kubernetes.io/docs/user-guide/namespaces + // +optional + Namespace string `json:"namespace,omitempty" protobuf:"bytes,3,opt,name=namespace"` + + // SelfLink is a URL representing this object. + // Populated by the system. + // Read-only. + // +optional + SelfLink string `json:"selfLink,omitempty" protobuf:"bytes,4,opt,name=selfLink"` + + // UID is the unique in time and space value for this object. It is typically generated by + // the server on successful creation of a resource and is not allowed to change on PUT + // operations. + // + // Populated by the system. + // Read-only. + // More info: http://kubernetes.io/docs/user-guide/identifiers#uids + // +optional + UID types.UID `json:"uid,omitempty" protobuf:"bytes,5,opt,name=uid,casttype=k8s.io/kubernetes/pkg/types.UID"` + + // An opaque value that represents the internal version of this object that can + // be used by clients to determine when objects have changed. May be used for optimistic + // concurrency, change detection, and the watch operation on a resource or set of resources. + // Clients must treat these values as opaque and passed unmodified back to the server. + // They may only be valid for a particular resource or set of resources. + // + // Populated by the system. + // Read-only. + // Value must be treated as opaque by clients and . + // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency + // +optional + ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,6,opt,name=resourceVersion"` + + // A sequence number representing a specific generation of the desired state. + // Populated by the system. Read-only. + // +optional + Generation int64 `json:"generation,omitempty" protobuf:"varint,7,opt,name=generation"` + + // CreationTimestamp is a timestamp representing the server time when this object was + // created. It is not guaranteed to be set in happens-before order across separate operations. + // Clients may not set this value. It is represented in RFC3339 form and is in UTC. + // + // Populated by the system. + // Read-only. + // Null for lists. + // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + // +optional + CreationTimestamp Time `json:"creationTimestamp,omitempty" protobuf:"bytes,8,opt,name=creationTimestamp"` + + // DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This + // field is set by the server when a graceful deletion is requested by the user, and is not + // directly settable by a client. The resource is expected to be deleted (no longer visible + // from resource lists, and not reachable by name) after the time in this field. Once set, + // this value may not be unset or be set further into the future, although it may be shortened + // or the resource may be deleted prior to this time. For example, a user may request that + // a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination + // signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard + // termination signal (SIGKILL) to the container and after cleanup, remove the pod from the + // API. In the presence of network partitions, this object may still exist after this + // timestamp, until an administrator or automated process can determine the resource is + // fully terminated. + // If not set, graceful deletion of the object has not been requested. + // + // Populated by the system when a graceful deletion is requested. + // Read-only. + // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + // +optional + DeletionTimestamp *Time `json:"deletionTimestamp,omitempty" protobuf:"bytes,9,opt,name=deletionTimestamp"` + + // Number of seconds allowed for this object to gracefully terminate before + // it will be removed from the system. Only set when deletionTimestamp is also set. + // May only be shortened. + // Read-only. + // +optional + DeletionGracePeriodSeconds *int64 `json:"deletionGracePeriodSeconds,omitempty" protobuf:"varint,10,opt,name=deletionGracePeriodSeconds"` + + // Map of string keys and values that can be used to organize and categorize + // (scope and select) objects. May match selectors of replication controllers + // and services. + // More info: http://kubernetes.io/docs/user-guide/labels + // +optional + Labels map[string]string `json:"labels,omitempty" protobuf:"bytes,11,rep,name=labels"` + + // Annotations is an unstructured key value map stored with a resource that may be + // set by external tools to store and retrieve arbitrary metadata. They are not + // queryable and should be preserved when modifying objects. + // More info: http://kubernetes.io/docs/user-guide/annotations + // +optional + Annotations map[string]string `json:"annotations,omitempty" protobuf:"bytes,12,rep,name=annotations"` + + // List of objects depended by this object. If ALL objects in the list have + // been deleted, this object will be garbage collected. If this object is managed by a controller, + // then an entry in this list will point to this controller, with the controller field set to true. + // There cannot be more than one managing controller. + // +optional + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" patchStrategy:"merge" patchMergeKey:"uid" protobuf:"bytes,13,rep,name=ownerReferences"` + + // Must be empty before the object is deleted from the registry. Each entry + // is an identifier for the responsible component that will remove the entry + // from the list. If the deletionTimestamp of the object is non-nil, entries + // in this list can only be removed. + // +optional + Finalizers []string `json:"finalizers,omitempty" patchStrategy:"merge" protobuf:"bytes,14,rep,name=finalizers"` + + // The name of the cluster which the object belongs to. + // This is used to distinguish resources with same name and namespace in different clusters. + // This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. + // +optional + ClusterName string `json:"clusterName,omitempty" protobuf:"bytes,15,opt,name=clusterName"` +} + +const ( + // NamespaceDefault means the object is in the default namespace which is applied when not specified by clients + NamespaceDefault string = "default" + // NamespaceAll is the default argument to specify on a context when you want to list or filter resources across all namespaces + NamespaceAll string = "" + // NamespaceNone is the argument for a context when there is no namespace. + NamespaceNone string = "" + // NamespaceSystem is the system namespace where we place system components. + NamespaceSystem string = "kube-system" +) + // OwnerReference contains enough information to let you identify an owning // object. Currently, an owning object must be in the same namespace, so there // is no namespace field. @@ -91,6 +250,35 @@ type OwnerReference struct { Controller *bool `json:"controller,omitempty" protobuf:"varint,6,opt,name=controller"` } +// ListOptions is the query options to a standard REST list call. +type ListOptions struct { + TypeMeta `json:",inline"` + + // A selector to restrict the list of returned objects by their labels. + // Defaults to everything. + // +optional + LabelSelector string `json:"labelSelector,omitempty" protobuf:"bytes,1,opt,name=labelSelector"` + // A selector to restrict the list of returned objects by their fields. + // Defaults to everything. + // +optional + FieldSelector string `json:"fieldSelector,omitempty" protobuf:"bytes,2,opt,name=fieldSelector"` + // Watch for changes to the described resources and return them as a stream of + // add, update, and remove notifications. Specify resourceVersion. + // +optional + Watch bool `json:"watch,omitempty" protobuf:"varint,3,opt,name=watch"` + // When specified with a watch call, shows changes that occur after that particular version of a resource. + // Defaults to changes from the beginning of history. + // When specified for list: + // - if unset, then the result is returned from remote storage based on quorum-read flag; + // - if it's 0, then we simply return what we currently have in cache, no guarantee; + // - if set to non zero, then the result is at least as fresh as given rv. + // +optional + ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,4,opt,name=resourceVersion"` + // Timeout for the list/watch call. + // +optional + TimeoutSeconds *int64 `json:"timeoutSeconds,omitempty" protobuf:"varint,5,opt,name=timeoutSeconds"` +} + // ExportOptions is the query options to the standard REST get call. type ExportOptions struct { TypeMeta `json:",inline"` diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go index 0cc65f1b..43eb0f11 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go @@ -140,6 +140,42 @@ func (ListMeta) SwaggerDoc() map[string]string { return map_ListMeta } +var map_ListOptions = map[string]string{ + "": "ListOptions is the query options to a standard REST list call.", + "labelSelector": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "fieldSelector": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "watch": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "resourceVersion": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "timeoutSeconds": "Timeout for the list/watch call.", +} + +func (ListOptions) SwaggerDoc() map[string]string { + return map_ListOptions +} + +var map_ObjectMeta = map[string]string{ + "": "ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.", + "name": "Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names", + "generateName": "GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.\n\nIf this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).\n\nApplied only if Name is not specified. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#idempotency", + "namespace": "Namespace defines the space within each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.\n\nMust be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces", + "selfLink": "SelfLink is a URL representing this object. Populated by the system. Read-only.", + "uid": "UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.\n\nPopulated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids", + "resourceVersion": "An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.\n\nPopulated by the system. Read-only. Value must be treated as opaque by clients and . More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency", + "generation": "A sequence number representing a specific generation of the desired state. Populated by the system. Read-only.", + "creationTimestamp": "CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system. Read-only. Null for lists. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", + "deletionTimestamp": "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field. Once set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested. Read-only. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", + "deletionGracePeriodSeconds": "Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only.", + "labels": "Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels", + "annotations": "Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations", + "ownerReferences": "List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller.", + "finalizers": "Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed.", + "clusterName": "The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.", +} + +func (ObjectMeta) SwaggerDoc() map[string]string { + return map_ObjectMeta +} + var map_OwnerReference = map[string]string{ "": "OwnerReference contains enough information to let you identify an owning object. Currently, an owning object must be in the same namespace, so there is no namespace field.", "apiVersion": "API version of the referent.", diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured.go index 92530758..bb16abe4 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured.go @@ -48,6 +48,7 @@ type Unstructured struct { Object map[string]interface{} } +var _ metav1.Object = &Unstructured{} var _ runtime.Unstructured = &Unstructured{} var _ runtime.Unstructured = &UnstructuredList{} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.deepcopy.go index 82545002..871767e9 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.deepcopy.go @@ -47,6 +47,8 @@ func GetGeneratedDeepCopyFuncs() []conversion.GeneratedDeepCopyFunc { {Fn: DeepCopy_v1_LabelSelector, InType: reflect.TypeOf(&LabelSelector{})}, {Fn: DeepCopy_v1_LabelSelectorRequirement, InType: reflect.TypeOf(&LabelSelectorRequirement{})}, {Fn: DeepCopy_v1_ListMeta, InType: reflect.TypeOf(&ListMeta{})}, + {Fn: DeepCopy_v1_ListOptions, InType: reflect.TypeOf(&ListOptions{})}, + {Fn: DeepCopy_v1_ObjectMeta, InType: reflect.TypeOf(&ObjectMeta{})}, {Fn: DeepCopy_v1_OwnerReference, InType: reflect.TypeOf(&OwnerReference{})}, {Fn: DeepCopy_v1_Patch, InType: reflect.TypeOf(&Patch{})}, {Fn: DeepCopy_v1_RootPaths, InType: reflect.TypeOf(&RootPaths{})}, @@ -93,8 +95,10 @@ func DeepCopy_v1_APIGroupList(in interface{}, out interface{}, c *conversion.Clo in, out := &in.Groups, &out.Groups *out = make([]APIGroup, len(*in)) for i := range *in { - if err := DeepCopy_v1_APIGroup(&(*in)[i], &(*out)[i], c); err != nil { + if newVal, err := c.DeepCopy(&(*in)[i]); err != nil { return err + } else { + (*out)[i] = *newVal.(*APIGroup) } } } @@ -125,8 +129,10 @@ func DeepCopy_v1_APIResourceList(in interface{}, out interface{}, c *conversion. in, out := &in.APIResources, &out.APIResources *out = make([]APIResource, len(*in)) for i := range *in { - if err := DeepCopy_v1_APIResource(&(*in)[i], &(*out)[i], c); err != nil { + if newVal, err := c.DeepCopy(&(*in)[i]); err != nil { return err + } else { + (*out)[i] = *newVal.(*APIResource) } } } @@ -269,8 +275,10 @@ func DeepCopy_v1_LabelSelector(in interface{}, out interface{}, c *conversion.Cl in, out := &in.MatchExpressions, &out.MatchExpressions *out = make([]LabelSelectorRequirement, len(*in)) for i := range *in { - if err := DeepCopy_v1_LabelSelectorRequirement(&(*in)[i], &(*out)[i], c); err != nil { + if newVal, err := c.DeepCopy(&(*in)[i]); err != nil { return err + } else { + (*out)[i] = *newVal.(*LabelSelectorRequirement) } } } @@ -301,6 +309,70 @@ func DeepCopy_v1_ListMeta(in interface{}, out interface{}, c *conversion.Cloner) } } +func DeepCopy_v1_ListOptions(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*ListOptions) + out := out.(*ListOptions) + *out = *in + if in.TimeoutSeconds != nil { + in, out := &in.TimeoutSeconds, &out.TimeoutSeconds + *out = new(int64) + **out = **in + } + return nil + } +} + +func DeepCopy_v1_ObjectMeta(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*ObjectMeta) + out := out.(*ObjectMeta) + *out = *in + out.CreationTimestamp = in.CreationTimestamp.DeepCopy() + if in.DeletionTimestamp != nil { + in, out := &in.DeletionTimestamp, &out.DeletionTimestamp + *out = new(Time) + **out = (*in).DeepCopy() + } + if in.DeletionGracePeriodSeconds != nil { + in, out := &in.DeletionGracePeriodSeconds, &out.DeletionGracePeriodSeconds + *out = new(int64) + **out = **in + } + if in.Labels != nil { + in, out := &in.Labels, &out.Labels + *out = make(map[string]string) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Annotations != nil { + in, out := &in.Annotations, &out.Annotations + *out = make(map[string]string) + for key, val := range *in { + (*out)[key] = val + } + } + if in.OwnerReferences != nil { + in, out := &in.OwnerReferences, &out.OwnerReferences + *out = make([]OwnerReference, len(*in)) + for i := range *in { + if newVal, err := c.DeepCopy(&(*in)[i]); err != nil { + return err + } else { + (*out)[i] = *newVal.(*OwnerReference) + } + } + } + if in.Finalizers != nil { + in, out := &in.Finalizers, &out.Finalizers + *out = make([]string, len(*in)) + copy(*out, *in) + } + return nil + } +} + func DeepCopy_v1_OwnerReference(in interface{}, out interface{}, c *conversion.Cloner) error { { in := in.(*OwnerReference) @@ -354,9 +426,10 @@ func DeepCopy_v1_Status(in interface{}, out interface{}, c *conversion.Cloner) e *out = *in if in.Details != nil { in, out := &in.Details, &out.Details - *out = new(StatusDetails) - if err := DeepCopy_v1_StatusDetails(*in, *out, c); err != nil { + if newVal, err := c.DeepCopy(*in); err != nil { return err + } else { + *out = newVal.(*StatusDetails) } } return nil @@ -420,8 +493,10 @@ func DeepCopy_v1_WatchEvent(in interface{}, out interface{}, c *conversion.Clone in := in.(*WatchEvent) out := out.(*WatchEvent) *out = *in - if err := runtime.DeepCopy_runtime_RawExtension(&in.Object, &out.Object, c); err != nil { + if newVal, err := c.DeepCopy(&in.Object); err != nil { return err + } else { + out.Object = *newVal.(*runtime.RawExtension) } return nil } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/fields/doc.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/fields/doc.go similarity index 100% rename from vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/fields/doc.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/fields/doc.go diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/fields/fields.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/fields/fields.go similarity index 100% rename from vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/fields/fields.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/fields/fields.go diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/fields/requirements.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/fields/requirements.go similarity index 100% rename from vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/fields/requirements.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/fields/requirements.go diff --git a/vendor/k8s.io/kubernetes/pkg/fields/selector.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/fields/selector.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/fields/selector.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/fields/selector.go diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/genericapiserver/openapi/common/common.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/genericapiserver/openapi/common/common.go deleted file mode 100644 index d2a80f2e..00000000 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/genericapiserver/openapi/common/common.go +++ /dev/null @@ -1,143 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package common - -import ( - "github.com/emicklei/go-restful" - "github.com/go-openapi/spec" -) - -// OpenAPIDefinition describes single type. Normally these definitions are auto-generated using gen-openapi. -type OpenAPIDefinition struct { - Schema spec.Schema - Dependencies []string -} - -// OpenAPIDefinitions is collection of all definitions. -type OpenAPIDefinitions map[string]OpenAPIDefinition - -// OpenAPIDefinitionGetter gets openAPI definitions for a given type. If a type implements this interface, -// the definition returned by it will be used, otherwise the auto-generated definitions will be used. See -// GetOpenAPITypeFormat for more information about trade-offs of using this interface or GetOpenAPITypeFormat method when -// possible. -type OpenAPIDefinitionGetter interface { - OpenAPIDefinition() *OpenAPIDefinition -} - -// Config is set of configuration for openAPI spec generation. -type Config struct { - // List of supported protocols such as https, http, etc. - ProtocolList []string - - // Info is general information about the API. - Info *spec.Info - - // DefaultResponse will be used if an operation does not have any responses listed. It - // will show up as ... "responses" : {"default" : $DefaultResponse} in the spec. - DefaultResponse *spec.Response - - // CommonResponses will be added as a response to all operation specs. This is a good place to add common - // responses such as authorization failed. - CommonResponses map[int]spec.Response - - // List of webservice's path prefixes to ignore - IgnorePrefixes []string - - // OpenAPIDefinitions should provide definition for all models used by routes. Failure to provide this map - // or any of the models will result in spec generation failure. - Definitions *OpenAPIDefinitions - - // GetOperationIDAndTags returns operation id and tags for a restful route. It is an optional function to customize operation IDs. - GetOperationIDAndTags func(servePath string, r *restful.Route) (string, []string, error) - - // SecurityDefinitions is list of all security definitions for OpenAPI service. If this is not nil, the user of config - // is responsible to provide DefaultSecurity and (maybe) add unauthorized response to CommonResponses. - SecurityDefinitions *spec.SecurityDefinitions - - // DefaultSecurity for all operations. This will pass as spec.SwaggerProps.Security to OpenAPI. - // For most cases, this will be list of acceptable definitions in SecurityDefinitions. - DefaultSecurity []map[string][]string -} - -// This function is a reference for converting go (or any custom type) to a simple open API type,format pair. There are -// two ways to customize spec for a type. If you add it here, a type will be converted to a simple type and the type -// comment (the comment that is added before type definition) will be lost. The spec will still have the property -// comment. The second way is to implement OpenAPIDefinitionGetter interface. That function can customize the spec (so -// the spec does not need to be simple type,format) or can even return a simple type,format (e.g. IntOrString). For simple -// type formats, the benefit of adding OpenAPIDefinitionGetter interface is to keep both type and property documentation. -// Example: -// type Sample struct { -// ... -// // port of the server -// port IntOrString -// ... -// } -// // IntOrString documentation... -// type IntOrString { ... } -// -// Adding IntOrString to this function: -// "port" : { -// format: "string", -// type: "int-or-string", -// Description: "port of the server" -// } -// -// Implement OpenAPIDefinitionGetter for IntOrString: -// -// "port" : { -// $Ref: "#/definitions/IntOrString" -// Description: "port of the server" -// } -// ... -// definitions: -// { -// "IntOrString": { -// format: "string", -// type: "int-or-string", -// Description: "IntOrString documentation..." // new -// } -// } -// -func GetOpenAPITypeFormat(typeName string) (string, string) { - schemaTypeFormatMap := map[string][]string{ - "uint": {"integer", "int32"}, - "uint8": {"integer", "byte"}, - "uint16": {"integer", "int32"}, - "uint32": {"integer", "int64"}, - "uint64": {"integer", "int64"}, - "int": {"integer", "int32"}, - "int8": {"integer", "byte"}, - "int16": {"integer", "int32"}, - "int32": {"integer", "int32"}, - "int64": {"integer", "int64"}, - "byte": {"integer", "byte"}, - "float64": {"number", "double"}, - "float32": {"number", "float"}, - "bool": {"boolean", ""}, - "time.Time": {"string", "date-time"}, - "string": {"string", ""}, - "integer": {"integer", ""}, - "number": {"number", ""}, - "boolean": {"boolean", ""}, - "[]byte": {"string", "byte"}, // base64 encoded characters - } - mapped, ok := schemaTypeFormatMap[typeName] - if !ok { - return "", "" - } - return mapped[0], mapped[1] -} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/labels/selector.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/labels/selector.go index 501d0187..8cfa44ba 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/labels/selector.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/labels/selector.go @@ -62,7 +62,7 @@ type nothingSelector struct{} func (n nothingSelector) Matches(_ Labels) bool { return false } func (n nothingSelector) Empty() bool { return false } -func (n nothingSelector) String() string { return "" } +func (n nothingSelector) String() string { return "" } func (n nothingSelector) Add(_ ...Requirement) Selector { return n } func (n nothingSelector) Requirements() (Requirements, bool) { return nil, false } diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/openapi/common/common.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/openapi/common.go similarity index 99% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/openapi/common/common.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/openapi/common.go index d2a80f2e..e81dac9e 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/openapi/common/common.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/openapi/common.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package common +package openapi import ( "github.com/emicklei/go-restful" diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/openapi/common/doc.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/openapi/doc.go similarity index 83% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/openapi/common/doc.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/openapi/doc.go index 0308d58b..5ed572cc 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/openapi/common/doc.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/openapi/doc.go @@ -14,5 +14,5 @@ See the License for the specific language governing permissions and limitations under the License. */ -// package common holds shared codes and types between open API code generator and spec generator. -package common +// package openapi holds shared codes and types between open API code generator and spec generator. +package openapi diff --git a/vendor/k8s.io/kubernetes/pkg/util/jsonpath/doc.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/types/patch.go similarity index 56% rename from vendor/k8s.io/kubernetes/pkg/util/jsonpath/doc.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/types/patch.go index 0077f303..d522d1db 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/jsonpath/doc.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/types/patch.go @@ -14,7 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -// package jsonpath is a template engine using jsonpath syntax, -// which can be seen at http://goessner.net/articles/JsonPath/. -// In addition, it has {range} {end} function to iterate list and slice. -package jsonpath // import "k8s.io/kubernetes/pkg/util/jsonpath" +package types + +// Similarly to above, these are constants to support HTTP PATCH utilized by +// both the client and server that didn't make sense for a whole package to be +// dedicated to. +type PatchType string + +const ( + JSONPatchType PatchType = "application/json-patch+json" + MergePatchType PatchType = "application/merge-patch+json" + StrategicMergePatchType PatchType = "application/strategic-merge-patch+json" +) diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/rand/rand.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/util/rand/rand.go similarity index 100% rename from vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/rand/rand.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/util/rand/rand.go diff --git a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/doc.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/version/doc.go similarity index 80% rename from vendor/k8s.io/kubernetes/pkg/genericapiserver/api/doc.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/version/doc.go index 62be8550..afbab6ab 100644 --- a/vendor/k8s.io/kubernetes/pkg/genericapiserver/api/doc.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/version/doc.go @@ -14,5 +14,5 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Package api contains the code that provides a rest.ful api service. -package api // import "k8s.io/kubernetes/pkg/genericapiserver/api" +// Package version supplies the type for version information collected at build time. +package version diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/version/types.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/version/types.go new file mode 100644 index 00000000..72727b50 --- /dev/null +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/_vendor/k8s.io/apimachinery/pkg/version/types.go @@ -0,0 +1,37 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package version + +// Info contains versioning information. +// TODO: Add []string of api versions supported? It's still unclear +// how we'll want to distribute that information. +type Info struct { + Major string `json:"major"` + Minor string `json:"minor"` + GitVersion string `json:"gitVersion"` + GitCommit string `json:"gitCommit"` + GitTreeState string `json:"gitTreeState"` + BuildDate string `json:"buildDate"` + GoVersion string `json:"goVersion"` + Compiler string `json:"compiler"` + Platform string `json:"platform"` +} + +// String returns info as a human-friendly version string. +func (info Info) String() string { + return info.GitVersion +} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/discovery/discovery_client.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/discovery/discovery_client.go index 2b801aeb..25fa2cfa 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/discovery/discovery_client.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/discovery/discovery_client.go @@ -25,15 +25,15 @@ import ( "github.com/emicklei/go-restful/swagger" + "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/runtime/serializer" + "k8s.io/apimachinery/pkg/version" "k8s.io/client-go/pkg/api" - "k8s.io/client-go/pkg/api/errors" "k8s.io/client-go/pkg/api/v1" - "k8s.io/client-go/pkg/version" - "k8s.io/client-go/rest" + restclient "k8s.io/client-go/rest" ) // defaultRetries is the number of times a resource discovery is repeated if an api group disappears on the fly (e.g. ThirdPartyResources). @@ -42,7 +42,7 @@ const defaultRetries = 2 // DiscoveryInterface holds the methods that discover server-supported API groups, // versions and resources. type DiscoveryInterface interface { - RESTClient() rest.Interface + RESTClient() restclient.Interface ServerGroupsInterface ServerResourcesInterface ServerVersionInterface @@ -94,7 +94,7 @@ type SwaggerSchemaInterface interface { // DiscoveryClient implements the functions that discover server-supported API groups, // versions and resources. type DiscoveryClient struct { - restClient rest.Interface + restClient restclient.Interface LegacyPrefix string } @@ -380,31 +380,31 @@ func withRetries(maxRetries int, f func(failEarly bool) ([]*metav1.APIResourceLi return result, err } -func setDiscoveryDefaults(config *rest.Config) error { +func setDiscoveryDefaults(config *restclient.Config) error { config.APIPath = "" config.GroupVersion = nil codec := runtime.NoopEncoder{Decoder: api.Codecs.UniversalDecoder()} config.NegotiatedSerializer = serializer.NegotiatedSerializerWrapper(runtime.SerializerInfo{Serializer: codec}) if len(config.UserAgent) == 0 { - config.UserAgent = rest.DefaultKubernetesUserAgent() + config.UserAgent = restclient.DefaultKubernetesUserAgent() } return nil } // NewDiscoveryClientForConfig creates a new DiscoveryClient for the given config. This client // can be used to discover supported resources in the API server. -func NewDiscoveryClientForConfig(c *rest.Config) (*DiscoveryClient, error) { +func NewDiscoveryClientForConfig(c *restclient.Config) (*DiscoveryClient, error) { config := *c if err := setDiscoveryDefaults(&config); err != nil { return nil, err } - client, err := rest.UnversionedRESTClientFor(&config) + client, err := restclient.UnversionedRESTClientFor(&config) return &DiscoveryClient{restClient: client, LegacyPrefix: "/api"}, err } // NewDiscoveryClientForConfig creates a new DiscoveryClient for the given config. If // there is an error, it panics. -func NewDiscoveryClientForConfigOrDie(c *rest.Config) *DiscoveryClient { +func NewDiscoveryClientForConfigOrDie(c *restclient.Config) *DiscoveryClient { client, err := NewDiscoveryClientForConfig(c) if err != nil { panic(err) @@ -414,7 +414,7 @@ func NewDiscoveryClientForConfigOrDie(c *rest.Config) *DiscoveryClient { } // New creates a new DiscoveryClient for the given RESTClient. -func NewDiscoveryClient(c rest.Interface) *DiscoveryClient { +func NewDiscoveryClient(c restclient.Interface) *DiscoveryClient { return &DiscoveryClient{restClient: c, LegacyPrefix: "/api"} } @@ -429,7 +429,7 @@ func stringDoesntExistIn(str string, slice []string) bool { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *DiscoveryClient) RESTClient() rest.Interface { +func (c *DiscoveryClient) RESTClient() restclient.Interface { if c == nil { return nil } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/discovery/discovery_client_test.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/discovery/discovery_client_test.go index 0c2f31b1..043ce67d 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/discovery/discovery_client_test.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/discovery/discovery_client_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package discovery +package discovery_test import ( "encoding/json" @@ -28,9 +28,10 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/apimachinery/pkg/version" + . "k8s.io/client-go/discovery" "k8s.io/client-go/pkg/api/v1" - "k8s.io/client-go/pkg/version" - "k8s.io/client-go/rest" + restclient "k8s.io/client-go/rest" ) func TestGetServerVersion(t *testing.T) { @@ -50,7 +51,7 @@ func TestGetServerVersion(t *testing.T) { w.Write(output) })) defer server.Close() - client := NewDiscoveryClientForConfigOrDie(&rest.Config{Host: server.URL}) + client := NewDiscoveryClientForConfigOrDie(&restclient.Config{Host: server.URL}) got, err := client.ServerVersion() if err != nil { @@ -85,7 +86,7 @@ func TestGetServerGroupsWithV1Server(t *testing.T) { w.Write(output) })) defer server.Close() - client := NewDiscoveryClientForConfigOrDie(&rest.Config{Host: server.URL}) + client := NewDiscoveryClientForConfigOrDie(&restclient.Config{Host: server.URL}) // ServerGroups should not return an error even if server returns error at /api and /apis apiGroupList, err := client.ServerGroups() if err != nil { @@ -103,7 +104,7 @@ func TestGetServerGroupsWithBrokenServer(t *testing.T) { w.WriteHeader(statusCode) })) defer server.Close() - client := NewDiscoveryClientForConfigOrDie(&rest.Config{Host: server.URL}) + client := NewDiscoveryClientForConfigOrDie(&restclient.Config{Host: server.URL}) // ServerGroups should not return an error even if server returns Not Found or Forbidden error at all end points apiGroupList, err := client.ServerGroups() if err != nil { @@ -140,7 +141,7 @@ func TestGetServerResourcesWithV1Server(t *testing.T) { w.Write(output) })) defer server.Close() - client := NewDiscoveryClientForConfigOrDie(&rest.Config{Host: server.URL}) + client := NewDiscoveryClientForConfigOrDie(&restclient.Config{Host: server.URL}) // ServerResources should not return an error even if server returns error at /api/v1. serverResources, err := client.ServerResources() if err != nil { @@ -232,7 +233,7 @@ func TestGetServerResources(t *testing.T) { w.Write(output) })) defer server.Close() - client := NewDiscoveryClientForConfigOrDie(&rest.Config{Host: server.URL}) + client := NewDiscoveryClientForConfigOrDie(&restclient.Config{Host: server.URL}) for _, test := range tests { got, err := client.ServerResourcesForGroupVersion(test.request) if test.expectErr { @@ -295,7 +296,7 @@ func TestGetSwaggerSchema(t *testing.T) { } defer server.Close() - client := NewDiscoveryClientForConfigOrDie(&rest.Config{Host: server.URL}) + client := NewDiscoveryClientForConfigOrDie(&restclient.Config{Host: server.URL}) got, err := client.SwaggerSchema(v1.SchemeGroupVersion) if err != nil { t.Fatalf("unexpected encoding error: %v", err) @@ -314,7 +315,7 @@ func TestGetSwaggerSchemaFail(t *testing.T) { } defer server.Close() - client := NewDiscoveryClientForConfigOrDie(&rest.Config{Host: server.URL}) + client := NewDiscoveryClientForConfigOrDie(&restclient.Config{Host: server.URL}) got, err := client.SwaggerSchema(schema.GroupVersion{Group: "api.group", Version: "v4"}) if got != nil { t.Fatalf("unexpected response: %v", got) @@ -427,7 +428,7 @@ func TestServerPreferredResources(t *testing.T) { server := httptest.NewServer(http.HandlerFunc(test.response)) defer server.Close() - client := NewDiscoveryClientForConfigOrDie(&rest.Config{Host: server.URL}) + client := NewDiscoveryClientForConfigOrDie(&restclient.Config{Host: server.URL}) resources, err := client.ServerPreferredResources() if test.expectErr != nil { if err == nil { @@ -540,7 +541,7 @@ func TestServerPreferredResourcesRetries(t *testing.T) { server := httptest.NewServer(http.HandlerFunc(response(tc.responseErrors))) defer server.Close() - client := NewDiscoveryClientForConfigOrDie(&rest.Config{Host: server.URL}) + client := NewDiscoveryClientForConfigOrDie(&restclient.Config{Host: server.URL}) resources, err := client.ServerPreferredResources() if !tc.expectedError(err) { t.Errorf("case %d: unexpected error: %v", i, err) @@ -711,7 +712,7 @@ func TestServerPreferredNamespacedResources(t *testing.T) { server := httptest.NewServer(http.HandlerFunc(test.response)) defer server.Close() - client := NewDiscoveryClientForConfigOrDie(&rest.Config{Host: server.URL}) + client := NewDiscoveryClientForConfigOrDie(&restclient.Config{Host: server.URL}) resources, err := client.ServerPreferredNamespacedResources() if err != nil { t.Errorf("[%d] unexpected error: %v", i, err) diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/discovery/fake/discovery.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/discovery/fake/discovery.go index c1f6268d..8fbed28d 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/discovery/fake/discovery.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/discovery/fake/discovery.go @@ -23,9 +23,10 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/version" "k8s.io/client-go/pkg/api/v1" - "k8s.io/client-go/pkg/version" - "k8s.io/client-go/rest" + kubeversion "k8s.io/client-go/pkg/version" + restclient "k8s.io/client-go/rest" "k8s.io/client-go/testing" ) @@ -74,7 +75,7 @@ func (c *FakeDiscovery) ServerVersion() (*version.Info, error) { action.Resource = schema.GroupVersionResource{Resource: "version"} c.Invokes(action, nil) - versionInfo := version.Get() + versionInfo := kubeversion.Get() return &versionInfo, nil } @@ -91,6 +92,6 @@ func (c *FakeDiscovery) SwaggerSchema(version schema.GroupVersion) (*swagger.Api return &swagger.ApiDeclaration{}, nil } -func (c *FakeDiscovery) RESTClient() rest.Interface { +func (c *FakeDiscovery) RESTClient() restclient.Interface { return nil } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/discovery/helper_blackbox_test.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/discovery/helper_blackbox_test.go index 1253732b..8731658a 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/discovery/helper_blackbox_test.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/discovery/helper_blackbox_test.go @@ -34,7 +34,7 @@ import ( "k8s.io/client-go/discovery" "k8s.io/client-go/pkg/api" "k8s.io/client-go/pkg/api/testapi" - "k8s.io/client-go/rest" + restclient "k8s.io/client-go/rest" "k8s.io/client-go/rest/fake" ) @@ -139,8 +139,8 @@ func TestNegotiateVersion(t *testing.T) { return &http.Response{StatusCode: test.statusCode, Header: header, Body: objBody(&uapi.APIVersions{Versions: test.serverVersions})}, nil }), } - c := discovery.NewDiscoveryClientForConfigOrDie(&rest.Config{}) - c.RESTClient().(*rest.RESTClient).Client = fakeClient.Client + c := discovery.NewDiscoveryClientForConfigOrDie(&restclient.Config{}) + c.RESTClient().(*restclient.RESTClient).Client = fakeClient.Client response, err := discovery.NegotiateVersion(c, test.requiredVersion, test.clientVersions) if err == nil && test.expectErr != nil { t.Errorf("expected error, got nil for [%s].", test.name) diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/discovery/restmapper.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/discovery/restmapper.go index e535d378..de2ec139 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/discovery/restmapper.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/discovery/restmapper.go @@ -20,10 +20,10 @@ import ( "fmt" "sync" + "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/client-go/pkg/api/errors" "github.com/golang/glog" ) diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/discovery/restmapper_test.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/discovery/restmapper_test.go index 28658955..7be1a990 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/discovery/restmapper_test.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/discovery/restmapper_test.go @@ -14,18 +14,19 @@ See the License for the specific language governing permissions and limitations under the License. */ -package discovery +package discovery_test import ( "reflect" "testing" + "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/version" + . "k8s.io/client-go/discovery" "k8s.io/client-go/pkg/api" - "k8s.io/client-go/pkg/api/errors" - "k8s.io/client-go/pkg/version" - "k8s.io/client-go/rest" + restclient "k8s.io/client-go/rest" "k8s.io/client-go/rest/fake" "github.com/emicklei/go-restful/swagger" @@ -246,7 +247,7 @@ func (c *fakeCachedDiscoveryInterface) Invalidate() { c.enabledA = true } -func (c *fakeCachedDiscoveryInterface) RESTClient() rest.Interface { +func (c *fakeCachedDiscoveryInterface) RESTClient() restclient.Interface { return &fake.RESTClient{} } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/dynamic/client.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/dynamic/client.go index 744570ea..8fad7ce9 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/dynamic/client.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/dynamic/client.go @@ -32,23 +32,24 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/runtime/serializer" + "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/pkg/api" "k8s.io/client-go/pkg/api/v1" - "k8s.io/client-go/pkg/util/flowcontrol" - "k8s.io/client-go/rest" + restclient "k8s.io/client-go/rest" + "k8s.io/client-go/util/flowcontrol" ) // Client is a Kubernetes client that allows you to access metadata // and manipulate metadata of a Kubernetes API group. type Client struct { - cl *rest.RESTClient + cl *restclient.RESTClient parameterCodec runtime.ParameterCodec } // NewClient returns a new client based on the passed in config. The // codec is ignored, as the dynamic client uses it's own codec. -func NewClient(conf *rest.Config) (*Client, error) { +func NewClient(conf *restclient.Config) (*Client, error) { // avoid changing the original config confCopy := *conf conf = &confCopy @@ -65,10 +66,10 @@ func NewClient(conf *rest.Config) (*Client, error) { } if len(conf.UserAgent) == 0 { - conf.UserAgent = rest.DefaultKubernetesUserAgent() + conf.UserAgent = restclient.DefaultKubernetesUserAgent() } - cl, err := rest.RESTClientFor(conf) + cl, err := restclient.RESTClientFor(conf) if err != nil { return nil, err } @@ -104,7 +105,7 @@ func (c *Client) ParameterCodec(parameterCodec runtime.ParameterCodec) *Client { // ResourceClient is an API interface to a specific resource under a // dynamic client. type ResourceClient struct { - cl *rest.RESTClient + cl *restclient.RESTClient resource *metav1.APIResource ns string parameterCodec runtime.ParameterCodec @@ -204,7 +205,7 @@ func (rc *ResourceClient) Watch(opts runtime.Object) (watch.Interface, error) { Watch() } -func (rc *ResourceClient) Patch(name string, pt api.PatchType, data []byte) (*unstructured.Unstructured, error) { +func (rc *ResourceClient) Patch(name string, pt types.PatchType, data []byte) (*unstructured.Unstructured, error) { result := new(unstructured.Unstructured) err := rc.cl.Patch(pt). NamespaceIfScoped(rc.ns, rc.resource.Namespaced). @@ -241,8 +242,8 @@ func (dynamicCodec) Encode(obj runtime.Object, w io.Writer) error { return unstructured.UnstructuredJSONScheme.Encode(obj, w) } -// ContentConfig returns a rest.ContentConfig for dynamic types. -func ContentConfig() rest.ContentConfig { +// ContentConfig returns a restclient.ContentConfig for dynamic types. +func ContentConfig() restclient.ContentConfig { var jsonInfo runtime.SerializerInfo // TODO: api.Codecs here should become "pkg/apis/server/scheme" which is the minimal core you need // to talk to a kubernetes server @@ -255,7 +256,7 @@ func ContentConfig() rest.ContentConfig { jsonInfo.Serializer = dynamicCodec{} jsonInfo.PrettySerializer = nil - return rest.ContentConfig{ + return restclient.ContentConfig{ AcceptContentTypes: runtime.ContentTypeJSON, ContentType: runtime.ContentTypeJSON, NegotiatedSerializer: serializer.NegotiatedSerializerWrapper(jsonInfo), diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/dynamic/client_pool.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/dynamic/client_pool.go index a5ff7f04..205d8a0d 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/dynamic/client_pool.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/dynamic/client_pool.go @@ -21,7 +21,7 @@ import ( "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/client-go/rest" + restclient "k8s.io/client-go/rest" ) // ClientPool manages a pool of dynamic clients. @@ -50,7 +50,7 @@ func LegacyAPIPathResolverFunc(kind schema.GroupVersionKind) string { // is asked to retrieve. This type is thread safe. type clientPoolImpl struct { lock sync.RWMutex - config *rest.Config + config *restclient.Config clients map[schema.GroupVersion]*Client apiPathResolverFunc APIPathResolverFunc mapper meta.RESTMapper @@ -59,7 +59,7 @@ type clientPoolImpl struct { // NewClientPool returns a ClientPool from the specified config. It reuses clients for the the same // group version. It is expected this type may be wrapped by specific logic that special cases certain // resources or groups. -func NewClientPool(config *rest.Config, mapper meta.RESTMapper, apiPathResolverFunc APIPathResolverFunc) ClientPool { +func NewClientPool(config *restclient.Config, mapper meta.RESTMapper, apiPathResolverFunc APIPathResolverFunc) ClientPool { confCopy := *config return &clientPoolImpl{ diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/dynamic/client_test.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/dynamic/client_test.go index 3335b6be..0426d7b1 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/dynamic/client_test.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/dynamic/client_test.go @@ -30,10 +30,9 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/runtime/serializer/streaming" + "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/watch" - "k8s.io/client-go/pkg/api" - "k8s.io/client-go/pkg/api/v1" - "k8s.io/client-go/rest" + restclient "k8s.io/client-go/rest" restclientwatch "k8s.io/client-go/rest/watch" ) @@ -61,9 +60,9 @@ func getObject(version, kind, name string) *unstructured.Unstructured { func getClientServer(gv *schema.GroupVersion, h func(http.ResponseWriter, *http.Request)) (*Client, *httptest.Server, error) { srv := httptest.NewServer(http.HandlerFunc(h)) - cl, err := NewClient(&rest.Config{ + cl, err := NewClient(&restclient.Config{ Host: srv.URL, - ContentConfig: rest.ContentConfig{GroupVersion: gv}, + ContentConfig: restclient.ContentConfig{GroupVersion: gv}, }) if err != nil { srv.Close() @@ -137,7 +136,7 @@ func TestList(t *testing.T) { } defer srv.Close() - got, err := cl.Resource(resource, tc.namespace).List(&v1.ListOptions{}) + got, err := cl.Resource(resource, tc.namespace).List(&metav1.ListOptions{}) if err != nil { t.Errorf("unexpected error when listing %q: %v", tc.name, err) continue @@ -294,7 +293,7 @@ func TestDeleteCollection(t *testing.T) { } defer srv.Close() - err = cl.Resource(resource, tc.namespace).DeleteCollection(nil, &v1.ListOptions{}) + err = cl.Resource(resource, tc.namespace).DeleteCollection(nil, &metav1.ListOptions{}) if err != nil { t.Errorf("unexpected error when deleting collection %q: %v", tc.name, err) continue @@ -470,7 +469,7 @@ func TestWatch(t *testing.T) { } defer srv.Close() - watcher, err := cl.Resource(resource, tc.namespace).Watch(&v1.ListOptions{}) + watcher, err := cl.Resource(resource, tc.namespace).Watch(&metav1.ListOptions{}) if err != nil { t.Errorf("unexpected error when watching %q: %v", tc.name, err) continue @@ -520,8 +519,8 @@ func TestPatch(t *testing.T) { } content := r.Header.Get("Content-Type") - if content != string(api.StrategicMergePatchType) { - t.Errorf("Patch(%q) got Content-Type %s. wanted %s", tc.name, content, api.StrategicMergePatchType) + if content != string(types.StrategicMergePatchType) { + t.Errorf("Patch(%q) got Content-Type %s. wanted %s", tc.name, content, types.StrategicMergePatchType) } data, err := ioutil.ReadAll(r.Body) @@ -540,7 +539,7 @@ func TestPatch(t *testing.T) { } defer srv.Close() - got, err := cl.Resource(resource, tc.namespace).Patch(tc.name, api.StrategicMergePatchType, tc.patch) + got, err := cl.Resource(resource, tc.namespace).Patch(tc.name, types.StrategicMergePatchType, tc.patch) if err != nil { t.Errorf("unexpected error when patching %q: %v", tc.name, err) continue diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/clientset.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/clientset.go index d05d1ec0..5e0c99ec 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/clientset.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/clientset.go @@ -25,15 +25,16 @@ import ( v1autoscaling "k8s.io/client-go/kubernetes/typed/autoscaling/v1" v1batch "k8s.io/client-go/kubernetes/typed/batch/v1" v2alpha1batch "k8s.io/client-go/kubernetes/typed/batch/v2alpha1" - v1alpha1certificates "k8s.io/client-go/kubernetes/typed/certificates/v1alpha1" + v1beta1certificates "k8s.io/client-go/kubernetes/typed/certificates/v1beta1" v1core "k8s.io/client-go/kubernetes/typed/core/v1" v1beta1extensions "k8s.io/client-go/kubernetes/typed/extensions/v1beta1" v1beta1policy "k8s.io/client-go/kubernetes/typed/policy/v1beta1" v1alpha1rbac "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1" + v1beta1rbac "k8s.io/client-go/kubernetes/typed/rbac/v1beta1" v1beta1storage "k8s.io/client-go/kubernetes/typed/storage/v1beta1" - "k8s.io/client-go/pkg/util/flowcontrol" _ "k8s.io/client-go/plugin/pkg/client/auth" rest "k8s.io/client-go/rest" + "k8s.io/client-go/util/flowcontrol" ) type Interface interface { @@ -58,18 +59,20 @@ type Interface interface { Batch() v1batch.BatchV1Interface BatchV2alpha1() v2alpha1batch.BatchV2alpha1Interface - CertificatesV1alpha1() v1alpha1certificates.CertificatesV1alpha1Interface + CertificatesV1beta1() v1beta1certificates.CertificatesV1beta1Interface // Deprecated: please explicitly pick a version if possible. - Certificates() v1alpha1certificates.CertificatesV1alpha1Interface + Certificates() v1beta1certificates.CertificatesV1beta1Interface ExtensionsV1beta1() v1beta1extensions.ExtensionsV1beta1Interface // Deprecated: please explicitly pick a version if possible. Extensions() v1beta1extensions.ExtensionsV1beta1Interface PolicyV1beta1() v1beta1policy.PolicyV1beta1Interface // Deprecated: please explicitly pick a version if possible. Policy() v1beta1policy.PolicyV1beta1Interface - RbacV1alpha1() v1alpha1rbac.RbacV1alpha1Interface + RbacV1beta1() v1beta1rbac.RbacV1beta1Interface // Deprecated: please explicitly pick a version if possible. - Rbac() v1alpha1rbac.RbacV1alpha1Interface + Rbac() v1beta1rbac.RbacV1beta1Interface + RbacV1alpha1() v1alpha1rbac.RbacV1alpha1Interface + StorageV1beta1() v1beta1storage.StorageV1beta1Interface // Deprecated: please explicitly pick a version if possible. Storage() v1beta1storage.StorageV1beta1Interface @@ -86,9 +89,10 @@ type Clientset struct { *v1autoscaling.AutoscalingV1Client *v1batch.BatchV1Client *v2alpha1batch.BatchV2alpha1Client - *v1alpha1certificates.CertificatesV1alpha1Client + *v1beta1certificates.CertificatesV1beta1Client *v1beta1extensions.ExtensionsV1beta1Client *v1beta1policy.PolicyV1beta1Client + *v1beta1rbac.RbacV1beta1Client *v1alpha1rbac.RbacV1alpha1Client *v1beta1storage.StorageV1beta1Client } @@ -203,21 +207,21 @@ func (c *Clientset) BatchV2alpha1() v2alpha1batch.BatchV2alpha1Interface { return c.BatchV2alpha1Client } -// CertificatesV1alpha1 retrieves the CertificatesV1alpha1Client -func (c *Clientset) CertificatesV1alpha1() v1alpha1certificates.CertificatesV1alpha1Interface { +// CertificatesV1beta1 retrieves the CertificatesV1beta1Client +func (c *Clientset) CertificatesV1beta1() v1beta1certificates.CertificatesV1beta1Interface { if c == nil { return nil } - return c.CertificatesV1alpha1Client + return c.CertificatesV1beta1Client } // Deprecated: Certificates retrieves the default version of CertificatesClient. // Please explicitly pick a version. -func (c *Clientset) Certificates() v1alpha1certificates.CertificatesV1alpha1Interface { +func (c *Clientset) Certificates() v1beta1certificates.CertificatesV1beta1Interface { if c == nil { return nil } - return c.CertificatesV1alpha1Client + return c.CertificatesV1beta1Client } // ExtensionsV1beta1 retrieves the ExtensionsV1beta1Client @@ -254,17 +258,25 @@ func (c *Clientset) Policy() v1beta1policy.PolicyV1beta1Interface { return c.PolicyV1beta1Client } -// RbacV1alpha1 retrieves the RbacV1alpha1Client -func (c *Clientset) RbacV1alpha1() v1alpha1rbac.RbacV1alpha1Interface { +// RbacV1beta1 retrieves the RbacV1beta1Client +func (c *Clientset) RbacV1beta1() v1beta1rbac.RbacV1beta1Interface { if c == nil { return nil } - return c.RbacV1alpha1Client + return c.RbacV1beta1Client } // Deprecated: Rbac retrieves the default version of RbacClient. // Please explicitly pick a version. -func (c *Clientset) Rbac() v1alpha1rbac.RbacV1alpha1Interface { +func (c *Clientset) Rbac() v1beta1rbac.RbacV1beta1Interface { + if c == nil { + return nil + } + return c.RbacV1beta1Client +} + +// RbacV1alpha1 retrieves the RbacV1alpha1Client +func (c *Clientset) RbacV1alpha1() v1alpha1rbac.RbacV1alpha1Interface { if c == nil { return nil } @@ -332,7 +344,7 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { if err != nil { return nil, err } - cs.CertificatesV1alpha1Client, err = v1alpha1certificates.NewForConfig(&configShallowCopy) + cs.CertificatesV1beta1Client, err = v1beta1certificates.NewForConfig(&configShallowCopy) if err != nil { return nil, err } @@ -344,6 +356,10 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { if err != nil { return nil, err } + cs.RbacV1beta1Client, err = v1beta1rbac.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } cs.RbacV1alpha1Client, err = v1alpha1rbac.NewForConfig(&configShallowCopy) if err != nil { return nil, err @@ -372,9 +388,10 @@ func NewForConfigOrDie(c *rest.Config) *Clientset { cs.AutoscalingV1Client = v1autoscaling.NewForConfigOrDie(c) cs.BatchV1Client = v1batch.NewForConfigOrDie(c) cs.BatchV2alpha1Client = v2alpha1batch.NewForConfigOrDie(c) - cs.CertificatesV1alpha1Client = v1alpha1certificates.NewForConfigOrDie(c) + cs.CertificatesV1beta1Client = v1beta1certificates.NewForConfigOrDie(c) cs.ExtensionsV1beta1Client = v1beta1extensions.NewForConfigOrDie(c) cs.PolicyV1beta1Client = v1beta1policy.NewForConfigOrDie(c) + cs.RbacV1beta1Client = v1beta1rbac.NewForConfigOrDie(c) cs.RbacV1alpha1Client = v1alpha1rbac.NewForConfigOrDie(c) cs.StorageV1beta1Client = v1beta1storage.NewForConfigOrDie(c) @@ -392,9 +409,10 @@ func New(c rest.Interface) *Clientset { cs.AutoscalingV1Client = v1autoscaling.New(c) cs.BatchV1Client = v1batch.New(c) cs.BatchV2alpha1Client = v2alpha1batch.New(c) - cs.CertificatesV1alpha1Client = v1alpha1certificates.New(c) + cs.CertificatesV1beta1Client = v1beta1certificates.New(c) cs.ExtensionsV1beta1Client = v1beta1extensions.New(c) cs.PolicyV1beta1Client = v1beta1policy.New(c) + cs.RbacV1beta1Client = v1beta1rbac.New(c) cs.RbacV1alpha1Client = v1alpha1rbac.New(c) cs.StorageV1beta1Client = v1beta1storage.New(c) diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/doc.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/doc.go index 5c74fd71..cd50cd92 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/doc.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1] +// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1] // This package has the automatically generated clientset. package kubernetes diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/fake/clientset_generated.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/fake/clientset_generated.go index fe707f61..a624d115 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/fake/clientset_generated.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/fake/clientset_generated.go @@ -34,8 +34,8 @@ import ( fakev1batch "k8s.io/client-go/kubernetes/typed/batch/v1/fake" v2alpha1batch "k8s.io/client-go/kubernetes/typed/batch/v2alpha1" fakev2alpha1batch "k8s.io/client-go/kubernetes/typed/batch/v2alpha1/fake" - v1alpha1certificates "k8s.io/client-go/kubernetes/typed/certificates/v1alpha1" - fakev1alpha1certificates "k8s.io/client-go/kubernetes/typed/certificates/v1alpha1/fake" + v1beta1certificates "k8s.io/client-go/kubernetes/typed/certificates/v1beta1" + fakev1beta1certificates "k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake" v1core "k8s.io/client-go/kubernetes/typed/core/v1" fakev1core "k8s.io/client-go/kubernetes/typed/core/v1/fake" v1beta1extensions "k8s.io/client-go/kubernetes/typed/extensions/v1beta1" @@ -44,6 +44,8 @@ import ( fakev1beta1policy "k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake" v1alpha1rbac "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1" fakev1alpha1rbac "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake" + v1beta1rbac "k8s.io/client-go/kubernetes/typed/rbac/v1beta1" + fakev1beta1rbac "k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake" v1beta1storage "k8s.io/client-go/kubernetes/typed/storage/v1beta1" fakev1beta1storage "k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake" "k8s.io/client-go/pkg/api" @@ -148,14 +150,14 @@ func (c *Clientset) BatchV2alpha1() v2alpha1batch.BatchV2alpha1Interface { return &fakev2alpha1batch.FakeBatchV2alpha1{Fake: &c.Fake} } -// CertificatesV1alpha1 retrieves the CertificatesV1alpha1Client -func (c *Clientset) CertificatesV1alpha1() v1alpha1certificates.CertificatesV1alpha1Interface { - return &fakev1alpha1certificates.FakeCertificatesV1alpha1{Fake: &c.Fake} +// CertificatesV1beta1 retrieves the CertificatesV1beta1Client +func (c *Clientset) CertificatesV1beta1() v1beta1certificates.CertificatesV1beta1Interface { + return &fakev1beta1certificates.FakeCertificatesV1beta1{Fake: &c.Fake} } -// Certificates retrieves the CertificatesV1alpha1Client -func (c *Clientset) Certificates() v1alpha1certificates.CertificatesV1alpha1Interface { - return &fakev1alpha1certificates.FakeCertificatesV1alpha1{Fake: &c.Fake} +// Certificates retrieves the CertificatesV1beta1Client +func (c *Clientset) Certificates() v1beta1certificates.CertificatesV1beta1Interface { + return &fakev1beta1certificates.FakeCertificatesV1beta1{Fake: &c.Fake} } // ExtensionsV1beta1 retrieves the ExtensionsV1beta1Client @@ -178,13 +180,18 @@ func (c *Clientset) Policy() v1beta1policy.PolicyV1beta1Interface { return &fakev1beta1policy.FakePolicyV1beta1{Fake: &c.Fake} } -// RbacV1alpha1 retrieves the RbacV1alpha1Client -func (c *Clientset) RbacV1alpha1() v1alpha1rbac.RbacV1alpha1Interface { - return &fakev1alpha1rbac.FakeRbacV1alpha1{Fake: &c.Fake} +// RbacV1beta1 retrieves the RbacV1beta1Client +func (c *Clientset) RbacV1beta1() v1beta1rbac.RbacV1beta1Interface { + return &fakev1beta1rbac.FakeRbacV1beta1{Fake: &c.Fake} } -// Rbac retrieves the RbacV1alpha1Client -func (c *Clientset) Rbac() v1alpha1rbac.RbacV1alpha1Interface { +// Rbac retrieves the RbacV1beta1Client +func (c *Clientset) Rbac() v1beta1rbac.RbacV1beta1Interface { + return &fakev1beta1rbac.FakeRbacV1beta1{Fake: &c.Fake} +} + +// RbacV1alpha1 retrieves the RbacV1alpha1Client +func (c *Clientset) RbacV1alpha1() v1alpha1rbac.RbacV1alpha1Interface { return &fakev1alpha1rbac.FakeRbacV1alpha1{Fake: &c.Fake} } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/fake/doc.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/fake/doc.go index ab373a87..f2bc62de 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/fake/doc.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/fake/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1] +// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1] // This package has the automatically generated fake clientset. package fake diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/doc.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/doc.go index e596bf01..0e58290b 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/doc.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1] +// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1] // This package has the automatically generated typed clients. package v1beta1 diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/doc.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/doc.go index ea928c21..c4753e08 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/doc.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1] +// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1] // Package fake has the automatically generated clients. package fake diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_statefulset.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_statefulset.go index 27538078..19bfd1b6 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_statefulset.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_statefulset.go @@ -20,8 +20,8 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" v1beta1 "k8s.io/client-go/pkg/apis/apps/v1beta1" testing "k8s.io/client-go/testing" @@ -72,7 +72,7 @@ func (c *FakeStatefulSets) Delete(name string, options *v1.DeleteOptions) error return err } -func (c *FakeStatefulSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *FakeStatefulSets) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { action := testing.NewDeleteCollectionAction(statefulsetsResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &v1beta1.StatefulSetList{}) @@ -89,7 +89,7 @@ func (c *FakeStatefulSets) Get(name string, options meta_v1.GetOptions) (result return obj.(*v1beta1.StatefulSet), err } -func (c *FakeStatefulSets) List(opts v1.ListOptions) (result *v1beta1.StatefulSetList, err error) { +func (c *FakeStatefulSets) List(opts meta_v1.ListOptions) (result *v1beta1.StatefulSetList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(statefulsetsResource, c.ns, opts), &v1beta1.StatefulSetList{}) @@ -111,14 +111,14 @@ func (c *FakeStatefulSets) List(opts v1.ListOptions) (result *v1beta1.StatefulSe } // Watch returns a watch.Interface that watches the requested statefulSets. -func (c *FakeStatefulSets) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeStatefulSets) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(statefulsetsResource, c.ns, opts)) } // Patch applies the patch and returns the patched statefulSet. -func (c *FakeStatefulSets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.StatefulSet, err error) { +func (c *FakeStatefulSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.StatefulSet, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(statefulsetsResource, c.ns, name, data, subresources...), &v1beta1.StatefulSet{}) diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/statefulset.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/statefulset.go index cfb30fa7..cda7cbe0 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/statefulset.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/statefulset.go @@ -18,6 +18,7 @@ package v1beta1 import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" @@ -37,11 +38,11 @@ type StatefulSetInterface interface { Update(*v1beta1.StatefulSet) (*v1beta1.StatefulSet, error) UpdateStatus(*v1beta1.StatefulSet) (*v1beta1.StatefulSet, error) Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error Get(name string, options meta_v1.GetOptions) (*v1beta1.StatefulSet, error) - List(opts v1.ListOptions) (*v1beta1.StatefulSetList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.StatefulSet, err error) + List(opts meta_v1.ListOptions) (*v1beta1.StatefulSetList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.StatefulSet, err error) StatefulSetExpansion } @@ -112,7 +113,7 @@ func (c *statefulSets) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *statefulSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *statefulSets) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("statefulsets"). @@ -136,7 +137,7 @@ func (c *statefulSets) Get(name string, options meta_v1.GetOptions) (result *v1b } // List takes label and field selectors, and returns the list of StatefulSets that match those selectors. -func (c *statefulSets) List(opts v1.ListOptions) (result *v1beta1.StatefulSetList, err error) { +func (c *statefulSets) List(opts meta_v1.ListOptions) (result *v1beta1.StatefulSetList, err error) { result = &v1beta1.StatefulSetList{} err = c.client.Get(). Namespace(c.ns). @@ -148,7 +149,7 @@ func (c *statefulSets) List(opts v1.ListOptions) (result *v1beta1.StatefulSetLis } // Watch returns a watch.Interface that watches the requested statefulSets. -func (c *statefulSets) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *statefulSets) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -158,7 +159,7 @@ func (c *statefulSets) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched statefulSet. -func (c *statefulSets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.StatefulSet, err error) { +func (c *statefulSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.StatefulSet, err error) { result = &v1beta1.StatefulSet{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/doc.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/doc.go index e596bf01..0e58290b 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/doc.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1] +// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1] // This package has the automatically generated typed clients. package v1beta1 diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake/doc.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake/doc.go index ea928c21..c4753e08 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake/doc.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1] +// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1] // Package fake has the automatically generated clients. package fake diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/doc.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/doc.go index e596bf01..0e58290b 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/doc.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1] +// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1] // This package has the automatically generated typed clients. package v1beta1 diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/doc.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/doc.go index ea928c21..c4753e08 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/doc.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1] +// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1] // Package fake has the automatically generated clients. package fake diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v1/doc.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v1/doc.go index acd71f25..4b43d84f 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v1/doc.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v1/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1] +// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1] // This package has the automatically generated typed clients. package v1 diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake/doc.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake/doc.go index ea928c21..c4753e08 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake/doc.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1] +// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1] // Package fake has the automatically generated clients. package fake diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake/fake_horizontalpodautoscaler.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake/fake_horizontalpodautoscaler.go index 0663ac0b..26fa3275 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake/fake_horizontalpodautoscaler.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake/fake_horizontalpodautoscaler.go @@ -20,8 +20,8 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/client-go/pkg/api" api_v1 "k8s.io/client-go/pkg/api/v1" v1 "k8s.io/client-go/pkg/apis/autoscaling/v1" testing "k8s.io/client-go/testing" @@ -72,7 +72,7 @@ func (c *FakeHorizontalPodAutoscalers) Delete(name string, options *api_v1.Delet return err } -func (c *FakeHorizontalPodAutoscalers) DeleteCollection(options *api_v1.DeleteOptions, listOptions api_v1.ListOptions) error { +func (c *FakeHorizontalPodAutoscalers) DeleteCollection(options *api_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { action := testing.NewDeleteCollectionAction(horizontalpodautoscalersResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &v1.HorizontalPodAutoscalerList{}) @@ -89,7 +89,7 @@ func (c *FakeHorizontalPodAutoscalers) Get(name string, options meta_v1.GetOptio return obj.(*v1.HorizontalPodAutoscaler), err } -func (c *FakeHorizontalPodAutoscalers) List(opts api_v1.ListOptions) (result *v1.HorizontalPodAutoscalerList, err error) { +func (c *FakeHorizontalPodAutoscalers) List(opts meta_v1.ListOptions) (result *v1.HorizontalPodAutoscalerList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(horizontalpodautoscalersResource, c.ns, opts), &v1.HorizontalPodAutoscalerList{}) @@ -111,14 +111,14 @@ func (c *FakeHorizontalPodAutoscalers) List(opts api_v1.ListOptions) (result *v1 } // Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers. -func (c *FakeHorizontalPodAutoscalers) Watch(opts api_v1.ListOptions) (watch.Interface, error) { +func (c *FakeHorizontalPodAutoscalers) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(horizontalpodautoscalersResource, c.ns, opts)) } // Patch applies the patch and returns the patched horizontalPodAutoscaler. -func (c *FakeHorizontalPodAutoscalers) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.HorizontalPodAutoscaler, err error) { +func (c *FakeHorizontalPodAutoscalers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.HorizontalPodAutoscaler, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, name, data, subresources...), &v1.HorizontalPodAutoscaler{}) diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v1/horizontalpodautoscaler.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v1/horizontalpodautoscaler.go index 007613f4..80f16ad2 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v1/horizontalpodautoscaler.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v1/horizontalpodautoscaler.go @@ -18,6 +18,7 @@ package v1 import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/client-go/pkg/api" api_v1 "k8s.io/client-go/pkg/api/v1" @@ -37,11 +38,11 @@ type HorizontalPodAutoscalerInterface interface { Update(*v1.HorizontalPodAutoscaler) (*v1.HorizontalPodAutoscaler, error) UpdateStatus(*v1.HorizontalPodAutoscaler) (*v1.HorizontalPodAutoscaler, error) Delete(name string, options *api_v1.DeleteOptions) error - DeleteCollection(options *api_v1.DeleteOptions, listOptions api_v1.ListOptions) error + DeleteCollection(options *api_v1.DeleteOptions, listOptions meta_v1.ListOptions) error Get(name string, options meta_v1.GetOptions) (*v1.HorizontalPodAutoscaler, error) - List(opts api_v1.ListOptions) (*v1.HorizontalPodAutoscalerList, error) - Watch(opts api_v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.HorizontalPodAutoscaler, err error) + List(opts meta_v1.ListOptions) (*v1.HorizontalPodAutoscalerList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.HorizontalPodAutoscaler, err error) HorizontalPodAutoscalerExpansion } @@ -112,7 +113,7 @@ func (c *horizontalPodAutoscalers) Delete(name string, options *api_v1.DeleteOpt } // DeleteCollection deletes a collection of objects. -func (c *horizontalPodAutoscalers) DeleteCollection(options *api_v1.DeleteOptions, listOptions api_v1.ListOptions) error { +func (c *horizontalPodAutoscalers) DeleteCollection(options *api_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("horizontalpodautoscalers"). @@ -136,7 +137,7 @@ func (c *horizontalPodAutoscalers) Get(name string, options meta_v1.GetOptions) } // List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors. -func (c *horizontalPodAutoscalers) List(opts api_v1.ListOptions) (result *v1.HorizontalPodAutoscalerList, err error) { +func (c *horizontalPodAutoscalers) List(opts meta_v1.ListOptions) (result *v1.HorizontalPodAutoscalerList, err error) { result = &v1.HorizontalPodAutoscalerList{} err = c.client.Get(). Namespace(c.ns). @@ -148,7 +149,7 @@ func (c *horizontalPodAutoscalers) List(opts api_v1.ListOptions) (result *v1.Hor } // Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers. -func (c *horizontalPodAutoscalers) Watch(opts api_v1.ListOptions) (watch.Interface, error) { +func (c *horizontalPodAutoscalers) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -158,7 +159,7 @@ func (c *horizontalPodAutoscalers) Watch(opts api_v1.ListOptions) (watch.Interfa } // Patch applies the patch and returns the patched horizontalPodAutoscaler. -func (c *horizontalPodAutoscalers) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.HorizontalPodAutoscaler, err error) { +func (c *horizontalPodAutoscalers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.HorizontalPodAutoscaler, err error) { result = &v1.HorizontalPodAutoscaler{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1/doc.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1/doc.go index acd71f25..4b43d84f 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1/doc.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1] +// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1] // This package has the automatically generated typed clients. package v1 diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1/fake/doc.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1/fake/doc.go index ea928c21..c4753e08 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1/fake/doc.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1/fake/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1] +// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1] // Package fake has the automatically generated clients. package fake diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1/fake/fake_job.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1/fake/fake_job.go index d9d94555..30ef2dbe 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1/fake/fake_job.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1/fake/fake_job.go @@ -20,8 +20,8 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/client-go/pkg/api" api_v1 "k8s.io/client-go/pkg/api/v1" v1 "k8s.io/client-go/pkg/apis/batch/v1" testing "k8s.io/client-go/testing" @@ -72,7 +72,7 @@ func (c *FakeJobs) Delete(name string, options *api_v1.DeleteOptions) error { return err } -func (c *FakeJobs) DeleteCollection(options *api_v1.DeleteOptions, listOptions api_v1.ListOptions) error { +func (c *FakeJobs) DeleteCollection(options *api_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { action := testing.NewDeleteCollectionAction(jobsResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &v1.JobList{}) @@ -89,7 +89,7 @@ func (c *FakeJobs) Get(name string, options meta_v1.GetOptions) (result *v1.Job, return obj.(*v1.Job), err } -func (c *FakeJobs) List(opts api_v1.ListOptions) (result *v1.JobList, err error) { +func (c *FakeJobs) List(opts meta_v1.ListOptions) (result *v1.JobList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(jobsResource, c.ns, opts), &v1.JobList{}) @@ -111,14 +111,14 @@ func (c *FakeJobs) List(opts api_v1.ListOptions) (result *v1.JobList, err error) } // Watch returns a watch.Interface that watches the requested jobs. -func (c *FakeJobs) Watch(opts api_v1.ListOptions) (watch.Interface, error) { +func (c *FakeJobs) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(jobsResource, c.ns, opts)) } // Patch applies the patch and returns the patched job. -func (c *FakeJobs) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Job, err error) { +func (c *FakeJobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Job, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(jobsResource, c.ns, name, data, subresources...), &v1.Job{}) diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1/job.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1/job.go index e141bf62..a7a22d15 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1/job.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/batch/v1/job.go @@ -18,6 +18,7 @@ package v1 import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/client-go/pkg/api" api_v1 "k8s.io/client-go/pkg/api/v1" @@ -37,11 +38,11 @@ type JobInterface interface { Update(*v1.Job) (*v1.Job, error) UpdateStatus(*v1.Job) (*v1.Job, error) Delete(name string, options *api_v1.DeleteOptions) error - DeleteCollection(options *api_v1.DeleteOptions, listOptions api_v1.ListOptions) error + DeleteCollection(options *api_v1.DeleteOptions, listOptions meta_v1.ListOptions) error Get(name string, options meta_v1.GetOptions) (*v1.Job, error) - List(opts api_v1.ListOptions) (*v1.JobList, error) - Watch(opts api_v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Job, err error) + List(opts meta_v1.ListOptions) (*v1.JobList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Job, err error) JobExpansion } @@ -112,7 +113,7 @@ func (c *jobs) Delete(name string, options *api_v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *jobs) DeleteCollection(options *api_v1.DeleteOptions, listOptions api_v1.ListOptions) error { +func (c *jobs) DeleteCollection(options *api_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("jobs"). @@ -136,7 +137,7 @@ func (c *jobs) Get(name string, options meta_v1.GetOptions) (result *v1.Job, err } // List takes label and field selectors, and returns the list of Jobs that match those selectors. -func (c *jobs) List(opts api_v1.ListOptions) (result *v1.JobList, err error) { +func (c *jobs) List(opts meta_v1.ListOptions) (result *v1.JobList, err error) { result = &v1.JobList{} err = c.client.Get(). Namespace(c.ns). @@ -148,7 +149,7 @@ func (c *jobs) List(opts api_v1.ListOptions) (result *v1.JobList, err error) { } // Watch returns a watch.Interface that watches the requested jobs. -func (c *jobs) Watch(opts api_v1.ListOptions) (watch.Interface, error) { +func (c *jobs) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -158,7 +159,7 @@ func (c *jobs) Watch(opts api_v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched job. -func (c *jobs) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Job, err error) { +func (c *jobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Job, err error) { result = &v1.Job{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/cronjob.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/cronjob.go index 7dc78957..7f0ccaea 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/cronjob.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/cronjob.go @@ -18,6 +18,7 @@ package v2alpha1 import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" @@ -37,11 +38,11 @@ type CronJobInterface interface { Update(*v2alpha1.CronJob) (*v2alpha1.CronJob, error) UpdateStatus(*v2alpha1.CronJob) (*v2alpha1.CronJob, error) Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error Get(name string, options meta_v1.GetOptions) (*v2alpha1.CronJob, error) - List(opts v1.ListOptions) (*v2alpha1.CronJobList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v2alpha1.CronJob, err error) + List(opts meta_v1.ListOptions) (*v2alpha1.CronJobList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2alpha1.CronJob, err error) CronJobExpansion } @@ -112,7 +113,7 @@ func (c *cronJobs) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *cronJobs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *cronJobs) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("cronjobs"). @@ -136,7 +137,7 @@ func (c *cronJobs) Get(name string, options meta_v1.GetOptions) (result *v2alpha } // List takes label and field selectors, and returns the list of CronJobs that match those selectors. -func (c *cronJobs) List(opts v1.ListOptions) (result *v2alpha1.CronJobList, err error) { +func (c *cronJobs) List(opts meta_v1.ListOptions) (result *v2alpha1.CronJobList, err error) { result = &v2alpha1.CronJobList{} err = c.client.Get(). Namespace(c.ns). @@ -148,7 +149,7 @@ func (c *cronJobs) List(opts v1.ListOptions) (result *v2alpha1.CronJobList, err } // Watch returns a watch.Interface that watches the requested cronJobs. -func (c *cronJobs) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *cronJobs) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -158,7 +159,7 @@ func (c *cronJobs) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched cronJob. -func (c *cronJobs) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v2alpha1.CronJob, err error) { +func (c *cronJobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2alpha1.CronJob, err error) { result = &v2alpha1.CronJob{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/doc.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/doc.go index 59c111e7..e1d1a76d 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/doc.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1] +// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1] // This package has the automatically generated typed clients. package v2alpha1 diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/fake/doc.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/fake/doc.go index ea928c21..c4753e08 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/fake/doc.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/fake/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1] +// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1] // Package fake has the automatically generated clients. package fake diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/fake/fake_cronjob.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/fake/fake_cronjob.go index 1c8d89c7..176d01b9 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/fake/fake_cronjob.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/fake/fake_cronjob.go @@ -20,8 +20,8 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" v2alpha1 "k8s.io/client-go/pkg/apis/batch/v2alpha1" testing "k8s.io/client-go/testing" @@ -72,7 +72,7 @@ func (c *FakeCronJobs) Delete(name string, options *v1.DeleteOptions) error { return err } -func (c *FakeCronJobs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *FakeCronJobs) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { action := testing.NewDeleteCollectionAction(cronjobsResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &v2alpha1.CronJobList{}) @@ -89,7 +89,7 @@ func (c *FakeCronJobs) Get(name string, options meta_v1.GetOptions) (result *v2a return obj.(*v2alpha1.CronJob), err } -func (c *FakeCronJobs) List(opts v1.ListOptions) (result *v2alpha1.CronJobList, err error) { +func (c *FakeCronJobs) List(opts meta_v1.ListOptions) (result *v2alpha1.CronJobList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(cronjobsResource, c.ns, opts), &v2alpha1.CronJobList{}) @@ -111,14 +111,14 @@ func (c *FakeCronJobs) List(opts v1.ListOptions) (result *v2alpha1.CronJobList, } // Watch returns a watch.Interface that watches the requested cronJobs. -func (c *FakeCronJobs) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeCronJobs) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(cronjobsResource, c.ns, opts)) } // Patch applies the patch and returns the patched cronJob. -func (c *FakeCronJobs) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v2alpha1.CronJob, err error) { +func (c *FakeCronJobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2alpha1.CronJob, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(cronjobsResource, c.ns, name, data, subresources...), &v2alpha1.CronJob{}) diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/fake/fake_job.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/fake/fake_job.go index fe089aa6..11f41865 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/fake/fake_job.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/fake/fake_job.go @@ -20,8 +20,8 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" v2alpha1 "k8s.io/client-go/pkg/apis/batch/v2alpha1" testing "k8s.io/client-go/testing" @@ -72,7 +72,7 @@ func (c *FakeJobs) Delete(name string, options *v1.DeleteOptions) error { return err } -func (c *FakeJobs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *FakeJobs) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { action := testing.NewDeleteCollectionAction(jobsResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &v2alpha1.JobList{}) @@ -89,7 +89,7 @@ func (c *FakeJobs) Get(name string, options meta_v1.GetOptions) (result *v2alpha return obj.(*v2alpha1.Job), err } -func (c *FakeJobs) List(opts v1.ListOptions) (result *v2alpha1.JobList, err error) { +func (c *FakeJobs) List(opts meta_v1.ListOptions) (result *v2alpha1.JobList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(jobsResource, c.ns, opts), &v2alpha1.JobList{}) @@ -111,14 +111,14 @@ func (c *FakeJobs) List(opts v1.ListOptions) (result *v2alpha1.JobList, err erro } // Watch returns a watch.Interface that watches the requested jobs. -func (c *FakeJobs) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeJobs) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(jobsResource, c.ns, opts)) } // Patch applies the patch and returns the patched job. -func (c *FakeJobs) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v2alpha1.Job, err error) { +func (c *FakeJobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2alpha1.Job, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(jobsResource, c.ns, name, data, subresources...), &v2alpha1.Job{}) diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/job.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/job.go index 8bcef77f..96609169 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/job.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/job.go @@ -18,6 +18,7 @@ package v2alpha1 import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" @@ -37,11 +38,11 @@ type JobInterface interface { Update(*v2alpha1.Job) (*v2alpha1.Job, error) UpdateStatus(*v2alpha1.Job) (*v2alpha1.Job, error) Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error Get(name string, options meta_v1.GetOptions) (*v2alpha1.Job, error) - List(opts v1.ListOptions) (*v2alpha1.JobList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v2alpha1.Job, err error) + List(opts meta_v1.ListOptions) (*v2alpha1.JobList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2alpha1.Job, err error) JobExpansion } @@ -112,7 +113,7 @@ func (c *jobs) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *jobs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *jobs) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("jobs"). @@ -136,7 +137,7 @@ func (c *jobs) Get(name string, options meta_v1.GetOptions) (result *v2alpha1.Jo } // List takes label and field selectors, and returns the list of Jobs that match those selectors. -func (c *jobs) List(opts v1.ListOptions) (result *v2alpha1.JobList, err error) { +func (c *jobs) List(opts meta_v1.ListOptions) (result *v2alpha1.JobList, err error) { result = &v2alpha1.JobList{} err = c.client.Get(). Namespace(c.ns). @@ -148,7 +149,7 @@ func (c *jobs) List(opts v1.ListOptions) (result *v2alpha1.JobList, err error) { } // Watch returns a watch.Interface that watches the requested jobs. -func (c *jobs) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *jobs) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -158,7 +159,7 @@ func (c *jobs) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched job. -func (c *jobs) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v2alpha1.Job, err error) { +func (c *jobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2alpha1.Job, err error) { result = &v2alpha1.Job{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1alpha1/certificates_client.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificates_client.go similarity index 61% rename from vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1alpha1/certificates_client.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificates_client.go index 60d19545..b5bf9d8b 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1alpha1/certificates_client.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificates_client.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package v1beta1 import ( fmt "fmt" @@ -24,22 +24,22 @@ import ( rest "k8s.io/client-go/rest" ) -type CertificatesV1alpha1Interface interface { +type CertificatesV1beta1Interface interface { RESTClient() rest.Interface CertificateSigningRequestsGetter } -// CertificatesV1alpha1Client is used to interact with features provided by the certificates.k8s.io group. -type CertificatesV1alpha1Client struct { +// CertificatesV1beta1Client is used to interact with features provided by the certificates.k8s.io group. +type CertificatesV1beta1Client struct { restClient rest.Interface } -func (c *CertificatesV1alpha1Client) CertificateSigningRequests() CertificateSigningRequestInterface { +func (c *CertificatesV1beta1Client) CertificateSigningRequests() CertificateSigningRequestInterface { return newCertificateSigningRequests(c) } -// NewForConfig creates a new CertificatesV1alpha1Client for the given config. -func NewForConfig(c *rest.Config) (*CertificatesV1alpha1Client, error) { +// NewForConfig creates a new CertificatesV1beta1Client for the given config. +func NewForConfig(c *rest.Config) (*CertificatesV1beta1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err @@ -48,12 +48,12 @@ func NewForConfig(c *rest.Config) (*CertificatesV1alpha1Client, error) { if err != nil { return nil, err } - return &CertificatesV1alpha1Client{client}, nil + return &CertificatesV1beta1Client{client}, nil } -// NewForConfigOrDie creates a new CertificatesV1alpha1Client for the given config and +// NewForConfigOrDie creates a new CertificatesV1beta1Client for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *CertificatesV1alpha1Client { +func NewForConfigOrDie(c *rest.Config) *CertificatesV1beta1Client { client, err := NewForConfig(c) if err != nil { panic(err) @@ -61,19 +61,19 @@ func NewForConfigOrDie(c *rest.Config) *CertificatesV1alpha1Client { return client } -// New creates a new CertificatesV1alpha1Client for the given RESTClient. -func New(c rest.Interface) *CertificatesV1alpha1Client { - return &CertificatesV1alpha1Client{c} +// New creates a new CertificatesV1beta1Client for the given RESTClient. +func New(c rest.Interface) *CertificatesV1beta1Client { + return &CertificatesV1beta1Client{c} } func setConfigDefaults(config *rest.Config) error { - gv, err := schema.ParseGroupVersion("certificates.k8s.io/v1alpha1") + gv, err := schema.ParseGroupVersion("certificates.k8s.io/v1beta1") if err != nil { return err } - // if certificates.k8s.io/v1alpha1 is not enabled, return an error + // if certificates.k8s.io/v1beta1 is not enabled, return an error if !api.Registry.IsEnabledVersion(gv) { - return fmt.Errorf("certificates.k8s.io/v1alpha1 is not enabled") + return fmt.Errorf("certificates.k8s.io/v1beta1 is not enabled") } config.APIPath = "/apis" if config.UserAgent == "" { @@ -89,7 +89,7 @@ func setConfigDefaults(config *rest.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *CertificatesV1alpha1Client) RESTClient() rest.Interface { +func (c *CertificatesV1beta1Client) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1alpha1/certificatesigningrequest.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificatesigningrequest.go similarity index 68% rename from vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1alpha1/certificatesigningrequest.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificatesigningrequest.go index 7f91eec2..02a4d8e6 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1alpha1/certificatesigningrequest.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificatesigningrequest.go @@ -14,15 +14,16 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package v1beta1 import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" - v1alpha1 "k8s.io/kubernetes/pkg/apis/certificates/v1alpha1" - restclient "k8s.io/kubernetes/pkg/client/restclient" + api "k8s.io/client-go/pkg/api" + v1 "k8s.io/client-go/pkg/api/v1" + v1beta1 "k8s.io/client-go/pkg/apis/certificates/v1beta1" + rest "k8s.io/client-go/rest" ) // CertificateSigningRequestsGetter has a method to return a CertificateSigningRequestInterface. @@ -33,33 +34,33 @@ type CertificateSigningRequestsGetter interface { // CertificateSigningRequestInterface has methods to work with CertificateSigningRequest resources. type CertificateSigningRequestInterface interface { - Create(*v1alpha1.CertificateSigningRequest) (*v1alpha1.CertificateSigningRequest, error) - Update(*v1alpha1.CertificateSigningRequest) (*v1alpha1.CertificateSigningRequest, error) - UpdateStatus(*v1alpha1.CertificateSigningRequest) (*v1alpha1.CertificateSigningRequest, error) + Create(*v1beta1.CertificateSigningRequest) (*v1beta1.CertificateSigningRequest, error) + Update(*v1beta1.CertificateSigningRequest) (*v1beta1.CertificateSigningRequest, error) + UpdateStatus(*v1beta1.CertificateSigningRequest) (*v1beta1.CertificateSigningRequest, error) Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options meta_v1.GetOptions) (*v1alpha1.CertificateSigningRequest, error) - List(opts v1.ListOptions) (*v1alpha1.CertificateSigningRequestList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.CertificateSigningRequest, err error) + DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error + Get(name string, options meta_v1.GetOptions) (*v1beta1.CertificateSigningRequest, error) + List(opts meta_v1.ListOptions) (*v1beta1.CertificateSigningRequestList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CertificateSigningRequest, err error) CertificateSigningRequestExpansion } // certificateSigningRequests implements CertificateSigningRequestInterface type certificateSigningRequests struct { - client restclient.Interface + client rest.Interface } // newCertificateSigningRequests returns a CertificateSigningRequests -func newCertificateSigningRequests(c *CertificatesV1alpha1Client) *certificateSigningRequests { +func newCertificateSigningRequests(c *CertificatesV1beta1Client) *certificateSigningRequests { return &certificateSigningRequests{ client: c.RESTClient(), } } // Create takes the representation of a certificateSigningRequest and creates it. Returns the server's representation of the certificateSigningRequest, and an error, if there is any. -func (c *certificateSigningRequests) Create(certificateSigningRequest *v1alpha1.CertificateSigningRequest) (result *v1alpha1.CertificateSigningRequest, err error) { - result = &v1alpha1.CertificateSigningRequest{} +func (c *certificateSigningRequests) Create(certificateSigningRequest *v1beta1.CertificateSigningRequest) (result *v1beta1.CertificateSigningRequest, err error) { + result = &v1beta1.CertificateSigningRequest{} err = c.client.Post(). Resource("certificatesigningrequests"). Body(certificateSigningRequest). @@ -69,8 +70,8 @@ func (c *certificateSigningRequests) Create(certificateSigningRequest *v1alpha1. } // Update takes the representation of a certificateSigningRequest and updates it. Returns the server's representation of the certificateSigningRequest, and an error, if there is any. -func (c *certificateSigningRequests) Update(certificateSigningRequest *v1alpha1.CertificateSigningRequest) (result *v1alpha1.CertificateSigningRequest, err error) { - result = &v1alpha1.CertificateSigningRequest{} +func (c *certificateSigningRequests) Update(certificateSigningRequest *v1beta1.CertificateSigningRequest) (result *v1beta1.CertificateSigningRequest, err error) { + result = &v1beta1.CertificateSigningRequest{} err = c.client.Put(). Resource("certificatesigningrequests"). Name(certificateSigningRequest.Name). @@ -83,8 +84,8 @@ func (c *certificateSigningRequests) Update(certificateSigningRequest *v1alpha1. // UpdateStatus was generated because the type contains a Status member. // Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus(). -func (c *certificateSigningRequests) UpdateStatus(certificateSigningRequest *v1alpha1.CertificateSigningRequest) (result *v1alpha1.CertificateSigningRequest, err error) { - result = &v1alpha1.CertificateSigningRequest{} +func (c *certificateSigningRequests) UpdateStatus(certificateSigningRequest *v1beta1.CertificateSigningRequest) (result *v1beta1.CertificateSigningRequest, err error) { + result = &v1beta1.CertificateSigningRequest{} err = c.client.Put(). Resource("certificatesigningrequests"). Name(certificateSigningRequest.Name). @@ -106,7 +107,7 @@ func (c *certificateSigningRequests) Delete(name string, options *v1.DeleteOptio } // DeleteCollection deletes a collection of objects. -func (c *certificateSigningRequests) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *certificateSigningRequests) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Resource("certificatesigningrequests"). VersionedParams(&listOptions, api.ParameterCodec). @@ -116,8 +117,8 @@ func (c *certificateSigningRequests) DeleteCollection(options *v1.DeleteOptions, } // Get takes name of the certificateSigningRequest, and returns the corresponding certificateSigningRequest object, and an error if there is any. -func (c *certificateSigningRequests) Get(name string, options meta_v1.GetOptions) (result *v1alpha1.CertificateSigningRequest, err error) { - result = &v1alpha1.CertificateSigningRequest{} +func (c *certificateSigningRequests) Get(name string, options meta_v1.GetOptions) (result *v1beta1.CertificateSigningRequest, err error) { + result = &v1beta1.CertificateSigningRequest{} err = c.client.Get(). Resource("certificatesigningrequests"). Name(name). @@ -128,8 +129,8 @@ func (c *certificateSigningRequests) Get(name string, options meta_v1.GetOptions } // List takes label and field selectors, and returns the list of CertificateSigningRequests that match those selectors. -func (c *certificateSigningRequests) List(opts v1.ListOptions) (result *v1alpha1.CertificateSigningRequestList, err error) { - result = &v1alpha1.CertificateSigningRequestList{} +func (c *certificateSigningRequests) List(opts meta_v1.ListOptions) (result *v1beta1.CertificateSigningRequestList, err error) { + result = &v1beta1.CertificateSigningRequestList{} err = c.client.Get(). Resource("certificatesigningrequests"). VersionedParams(&opts, api.ParameterCodec). @@ -139,7 +140,7 @@ func (c *certificateSigningRequests) List(opts v1.ListOptions) (result *v1alpha1 } // Watch returns a watch.Interface that watches the requested certificateSigningRequests. -func (c *certificateSigningRequests) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *certificateSigningRequests) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Resource("certificatesigningrequests"). @@ -148,8 +149,8 @@ func (c *certificateSigningRequests) Watch(opts v1.ListOptions) (watch.Interface } // Patch applies the patch and returns the patched certificateSigningRequest. -func (c *certificateSigningRequests) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.CertificateSigningRequest, err error) { - result = &v1alpha1.CertificateSigningRequest{} +func (c *certificateSigningRequests) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CertificateSigningRequest, err error) { + result = &v1beta1.CertificateSigningRequest{} err = c.client.Patch(pt). Resource("certificatesigningrequests"). SubResource(subresources...). diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1alpha1/certificatesigningrequest_expansion.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificatesigningrequest_expansion.go similarity index 90% rename from vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1alpha1/certificatesigningrequest_expansion.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificatesigningrequest_expansion.go index d7b9298e..4765bba8 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1alpha1/certificatesigningrequest_expansion.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificatesigningrequest_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,10 +14,10 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package v1beta1 import ( - certificates "k8s.io/kubernetes/pkg/apis/certificates/v1alpha1" + certificates "k8s.io/client-go/pkg/apis/certificates/v1beta1" ) type CertificateSigningRequestExpansion interface { diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/doc.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/doc.go new file mode 100644 index 00000000..0e58290b --- /dev/null +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1] + +// This package has the automatically generated typed clients. +package v1beta1 diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake/doc.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake/doc.go new file mode 100644 index 00000000..c4753e08 --- /dev/null +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1] + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1alpha1/fake/fake_certificates_client.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake/fake_certificates_client.go similarity index 75% rename from vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1alpha1/fake/fake_certificates_client.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake/fake_certificates_client.go index cbbe0f1f..550c5bba 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1alpha1/fake/fake_certificates_client.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake/fake_certificates_client.go @@ -17,22 +17,22 @@ limitations under the License. package fake import ( - v1alpha1 "k8s.io/client-go/kubernetes/typed/certificates/v1alpha1" + v1beta1 "k8s.io/client-go/kubernetes/typed/certificates/v1beta1" rest "k8s.io/client-go/rest" testing "k8s.io/client-go/testing" ) -type FakeCertificatesV1alpha1 struct { +type FakeCertificatesV1beta1 struct { *testing.Fake } -func (c *FakeCertificatesV1alpha1) CertificateSigningRequests() v1alpha1.CertificateSigningRequestInterface { +func (c *FakeCertificatesV1beta1) CertificateSigningRequests() v1beta1.CertificateSigningRequestInterface { return &FakeCertificateSigningRequests{c} } // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeCertificatesV1alpha1) RESTClient() rest.Interface { +func (c *FakeCertificatesV1beta1) RESTClient() rest.Interface { var ret *rest.RESTClient return ret } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1alpha1/fake/fake_certificatesigningrequest.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake/fake_certificatesigningrequest.go similarity index 59% rename from vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1alpha1/fake/fake_certificatesigningrequest.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake/fake_certificatesigningrequest.go index 248d84e6..45f881bb 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1alpha1/fake/fake_certificatesigningrequest.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake/fake_certificatesigningrequest.go @@ -20,72 +20,72 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" - v1alpha1 "k8s.io/client-go/pkg/apis/certificates/v1alpha1" + v1beta1 "k8s.io/client-go/pkg/apis/certificates/v1beta1" testing "k8s.io/client-go/testing" ) // FakeCertificateSigningRequests implements CertificateSigningRequestInterface type FakeCertificateSigningRequests struct { - Fake *FakeCertificatesV1alpha1 + Fake *FakeCertificatesV1beta1 } -var certificatesigningrequestsResource = schema.GroupVersionResource{Group: "certificates.k8s.io", Version: "v1alpha1", Resource: "certificatesigningrequests"} +var certificatesigningrequestsResource = schema.GroupVersionResource{Group: "certificates.k8s.io", Version: "v1beta1", Resource: "certificatesigningrequests"} -func (c *FakeCertificateSigningRequests) Create(certificateSigningRequest *v1alpha1.CertificateSigningRequest) (result *v1alpha1.CertificateSigningRequest, err error) { +func (c *FakeCertificateSigningRequests) Create(certificateSigningRequest *v1beta1.CertificateSigningRequest) (result *v1beta1.CertificateSigningRequest, err error) { obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(certificatesigningrequestsResource, certificateSigningRequest), &v1alpha1.CertificateSigningRequest{}) + Invokes(testing.NewRootCreateAction(certificatesigningrequestsResource, certificateSigningRequest), &v1beta1.CertificateSigningRequest{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.CertificateSigningRequest), err + return obj.(*v1beta1.CertificateSigningRequest), err } -func (c *FakeCertificateSigningRequests) Update(certificateSigningRequest *v1alpha1.CertificateSigningRequest) (result *v1alpha1.CertificateSigningRequest, err error) { +func (c *FakeCertificateSigningRequests) Update(certificateSigningRequest *v1beta1.CertificateSigningRequest) (result *v1beta1.CertificateSigningRequest, err error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(certificatesigningrequestsResource, certificateSigningRequest), &v1alpha1.CertificateSigningRequest{}) + Invokes(testing.NewRootUpdateAction(certificatesigningrequestsResource, certificateSigningRequest), &v1beta1.CertificateSigningRequest{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.CertificateSigningRequest), err + return obj.(*v1beta1.CertificateSigningRequest), err } -func (c *FakeCertificateSigningRequests) UpdateStatus(certificateSigningRequest *v1alpha1.CertificateSigningRequest) (*v1alpha1.CertificateSigningRequest, error) { +func (c *FakeCertificateSigningRequests) UpdateStatus(certificateSigningRequest *v1beta1.CertificateSigningRequest) (*v1beta1.CertificateSigningRequest, error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(certificatesigningrequestsResource, "status", certificateSigningRequest), &v1alpha1.CertificateSigningRequest{}) + Invokes(testing.NewRootUpdateSubresourceAction(certificatesigningrequestsResource, "status", certificateSigningRequest), &v1beta1.CertificateSigningRequest{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.CertificateSigningRequest), err + return obj.(*v1beta1.CertificateSigningRequest), err } func (c *FakeCertificateSigningRequests) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewRootDeleteAction(certificatesigningrequestsResource, name), &v1alpha1.CertificateSigningRequest{}) + Invokes(testing.NewRootDeleteAction(certificatesigningrequestsResource, name), &v1beta1.CertificateSigningRequest{}) return err } -func (c *FakeCertificateSigningRequests) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *FakeCertificateSigningRequests) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { action := testing.NewRootDeleteCollectionAction(certificatesigningrequestsResource, listOptions) - _, err := c.Fake.Invokes(action, &v1alpha1.CertificateSigningRequestList{}) + _, err := c.Fake.Invokes(action, &v1beta1.CertificateSigningRequestList{}) return err } -func (c *FakeCertificateSigningRequests) Get(name string, options meta_v1.GetOptions) (result *v1alpha1.CertificateSigningRequest, err error) { +func (c *FakeCertificateSigningRequests) Get(name string, options meta_v1.GetOptions) (result *v1beta1.CertificateSigningRequest, err error) { obj, err := c.Fake. - Invokes(testing.NewRootGetAction(certificatesigningrequestsResource, name), &v1alpha1.CertificateSigningRequest{}) + Invokes(testing.NewRootGetAction(certificatesigningrequestsResource, name), &v1beta1.CertificateSigningRequest{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.CertificateSigningRequest), err + return obj.(*v1beta1.CertificateSigningRequest), err } -func (c *FakeCertificateSigningRequests) List(opts v1.ListOptions) (result *v1alpha1.CertificateSigningRequestList, err error) { +func (c *FakeCertificateSigningRequests) List(opts meta_v1.ListOptions) (result *v1beta1.CertificateSigningRequestList, err error) { obj, err := c.Fake. - Invokes(testing.NewRootListAction(certificatesigningrequestsResource, opts), &v1alpha1.CertificateSigningRequestList{}) + Invokes(testing.NewRootListAction(certificatesigningrequestsResource, opts), &v1beta1.CertificateSigningRequestList{}) if obj == nil { return nil, err } @@ -94,8 +94,8 @@ func (c *FakeCertificateSigningRequests) List(opts v1.ListOptions) (result *v1al if label == nil { label = labels.Everything() } - list := &v1alpha1.CertificateSigningRequestList{} - for _, item := range obj.(*v1alpha1.CertificateSigningRequestList).Items { + list := &v1beta1.CertificateSigningRequestList{} + for _, item := range obj.(*v1beta1.CertificateSigningRequestList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -104,17 +104,17 @@ func (c *FakeCertificateSigningRequests) List(opts v1.ListOptions) (result *v1al } // Watch returns a watch.Interface that watches the requested certificateSigningRequests. -func (c *FakeCertificateSigningRequests) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeCertificateSigningRequests) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(certificatesigningrequestsResource, opts)) } // Patch applies the patch and returns the patched certificateSigningRequest. -func (c *FakeCertificateSigningRequests) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.CertificateSigningRequest, err error) { +func (c *FakeCertificateSigningRequests) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CertificateSigningRequest, err error) { obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(certificatesigningrequestsResource, name, data, subresources...), &v1alpha1.CertificateSigningRequest{}) + Invokes(testing.NewRootPatchSubresourceAction(certificatesigningrequestsResource, name, data, subresources...), &v1beta1.CertificateSigningRequest{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.CertificateSigningRequest), err + return obj.(*v1beta1.CertificateSigningRequest), err } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1alpha1/fake/fake_certificatesigningrequest_expansion.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake/fake_certificatesigningrequest_expansion.go similarity index 91% rename from vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1alpha1/fake/fake_certificatesigningrequest_expansion.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake/fake_certificatesigningrequest_expansion.go index 7f527790..bf684078 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1alpha1/fake/fake_certificatesigningrequest_expansion.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake/fake_certificatesigningrequest_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -17,7 +17,7 @@ limitations under the License. package fake import ( - certificates "k8s.io/client-go/pkg/apis/certificates/v1alpha1" + certificates "k8s.io/client-go/pkg/apis/certificates/v1beta1" "k8s.io/client-go/testing" ) diff --git a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1alpha1/generated_expansion.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/generated_expansion.go similarity index 97% rename from vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1alpha1/generated_expansion.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/generated_expansion.go index 48a74f4a..2b7e8ca0 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1alpha1/generated_expansion.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/generated_expansion.go @@ -14,4 +14,4 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package v1beta1 diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/componentstatus.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/componentstatus.go index 59f472bb..f6217847 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/componentstatus.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/componentstatus.go @@ -18,6 +18,7 @@ package v1 import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" @@ -35,11 +36,11 @@ type ComponentStatusInterface interface { Create(*v1.ComponentStatus) (*v1.ComponentStatus, error) Update(*v1.ComponentStatus) (*v1.ComponentStatus, error) Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error Get(name string, options meta_v1.GetOptions) (*v1.ComponentStatus, error) - List(opts v1.ListOptions) (*v1.ComponentStatusList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ComponentStatus, err error) + List(opts meta_v1.ListOptions) (*v1.ComponentStatusList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ComponentStatus, err error) ComponentStatusExpansion } @@ -89,7 +90,7 @@ func (c *componentStatuses) Delete(name string, options *v1.DeleteOptions) error } // DeleteCollection deletes a collection of objects. -func (c *componentStatuses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *componentStatuses) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Resource("componentstatuses"). VersionedParams(&listOptions, api.ParameterCodec). @@ -111,7 +112,7 @@ func (c *componentStatuses) Get(name string, options meta_v1.GetOptions) (result } // List takes label and field selectors, and returns the list of ComponentStatuses that match those selectors. -func (c *componentStatuses) List(opts v1.ListOptions) (result *v1.ComponentStatusList, err error) { +func (c *componentStatuses) List(opts meta_v1.ListOptions) (result *v1.ComponentStatusList, err error) { result = &v1.ComponentStatusList{} err = c.client.Get(). Resource("componentstatuses"). @@ -122,7 +123,7 @@ func (c *componentStatuses) List(opts v1.ListOptions) (result *v1.ComponentStatu } // Watch returns a watch.Interface that watches the requested componentStatuses. -func (c *componentStatuses) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *componentStatuses) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Resource("componentstatuses"). @@ -131,7 +132,7 @@ func (c *componentStatuses) Watch(opts v1.ListOptions) (watch.Interface, error) } // Patch applies the patch and returns the patched componentStatus. -func (c *componentStatuses) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ComponentStatus, err error) { +func (c *componentStatuses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ComponentStatus, err error) { result = &v1.ComponentStatus{} err = c.client.Patch(pt). Resource("componentstatuses"). diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/configmap.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/configmap.go index c6d849eb..6eda267c 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/configmap.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/configmap.go @@ -18,6 +18,7 @@ package v1 import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" @@ -35,11 +36,11 @@ type ConfigMapInterface interface { Create(*v1.ConfigMap) (*v1.ConfigMap, error) Update(*v1.ConfigMap) (*v1.ConfigMap, error) Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error Get(name string, options meta_v1.GetOptions) (*v1.ConfigMap, error) - List(opts v1.ListOptions) (*v1.ConfigMapList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ConfigMap, err error) + List(opts meta_v1.ListOptions) (*v1.ConfigMapList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ConfigMap, err error) ConfigMapExpansion } @@ -94,7 +95,7 @@ func (c *configMaps) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *configMaps) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *configMaps) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("configmaps"). @@ -118,7 +119,7 @@ func (c *configMaps) Get(name string, options meta_v1.GetOptions) (result *v1.Co } // List takes label and field selectors, and returns the list of ConfigMaps that match those selectors. -func (c *configMaps) List(opts v1.ListOptions) (result *v1.ConfigMapList, err error) { +func (c *configMaps) List(opts meta_v1.ListOptions) (result *v1.ConfigMapList, err error) { result = &v1.ConfigMapList{} err = c.client.Get(). Namespace(c.ns). @@ -130,7 +131,7 @@ func (c *configMaps) List(opts v1.ListOptions) (result *v1.ConfigMapList, err er } // Watch returns a watch.Interface that watches the requested configMaps. -func (c *configMaps) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *configMaps) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -140,7 +141,7 @@ func (c *configMaps) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched configMap. -func (c *configMaps) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ConfigMap, err error) { +func (c *configMaps) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ConfigMap, err error) { result = &v1.ConfigMap{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/doc.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/doc.go index acd71f25..4b43d84f 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/doc.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1] +// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1] // This package has the automatically generated typed clients. package v1 diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/endpoints.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/endpoints.go index d0985b28..e5737aa4 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/endpoints.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/endpoints.go @@ -18,6 +18,7 @@ package v1 import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" @@ -35,11 +36,11 @@ type EndpointsInterface interface { Create(*v1.Endpoints) (*v1.Endpoints, error) Update(*v1.Endpoints) (*v1.Endpoints, error) Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error Get(name string, options meta_v1.GetOptions) (*v1.Endpoints, error) - List(opts v1.ListOptions) (*v1.EndpointsList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Endpoints, err error) + List(opts meta_v1.ListOptions) (*v1.EndpointsList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Endpoints, err error) EndpointsExpansion } @@ -94,7 +95,7 @@ func (c *endpoints) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *endpoints) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *endpoints) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("endpoints"). @@ -118,7 +119,7 @@ func (c *endpoints) Get(name string, options meta_v1.GetOptions) (result *v1.End } // List takes label and field selectors, and returns the list of Endpoints that match those selectors. -func (c *endpoints) List(opts v1.ListOptions) (result *v1.EndpointsList, err error) { +func (c *endpoints) List(opts meta_v1.ListOptions) (result *v1.EndpointsList, err error) { result = &v1.EndpointsList{} err = c.client.Get(). Namespace(c.ns). @@ -130,7 +131,7 @@ func (c *endpoints) List(opts v1.ListOptions) (result *v1.EndpointsList, err err } // Watch returns a watch.Interface that watches the requested endpoints. -func (c *endpoints) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *endpoints) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -140,7 +141,7 @@ func (c *endpoints) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched endpoints. -func (c *endpoints) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Endpoints, err error) { +func (c *endpoints) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Endpoints, err error) { result = &v1.Endpoints{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/event.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/event.go index 5623f199..5837d516 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/event.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/event.go @@ -18,6 +18,7 @@ package v1 import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" @@ -35,11 +36,11 @@ type EventInterface interface { Create(*v1.Event) (*v1.Event, error) Update(*v1.Event) (*v1.Event, error) Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error Get(name string, options meta_v1.GetOptions) (*v1.Event, error) - List(opts v1.ListOptions) (*v1.EventList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Event, err error) + List(opts meta_v1.ListOptions) (*v1.EventList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Event, err error) EventExpansion } @@ -94,7 +95,7 @@ func (c *events) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *events) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *events) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("events"). @@ -118,7 +119,7 @@ func (c *events) Get(name string, options meta_v1.GetOptions) (result *v1.Event, } // List takes label and field selectors, and returns the list of Events that match those selectors. -func (c *events) List(opts v1.ListOptions) (result *v1.EventList, err error) { +func (c *events) List(opts meta_v1.ListOptions) (result *v1.EventList, err error) { result = &v1.EventList{} err = c.client.Get(). Namespace(c.ns). @@ -130,7 +131,7 @@ func (c *events) List(opts v1.ListOptions) (result *v1.EventList, err error) { } // Watch returns a watch.Interface that watches the requested events. -func (c *events) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *events) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -140,7 +141,7 @@ func (c *events) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched event. -func (c *events) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Event, err error) { +func (c *events) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Event, err error) { result = &v1.Event{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/event_expansion.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/event_expansion.go index 20aee7ac..e18f2541 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/event_expansion.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/event_expansion.go @@ -19,10 +19,12 @@ package v1 import ( "fmt" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/pkg/api" "k8s.io/client-go/pkg/api/v1" - "k8s.io/client-go/pkg/fields" ) // The EventExpansion interface allows manually adding extra methods to the EventInterface. @@ -84,7 +86,7 @@ func (e *events) PatchWithEventNamespace(incompleteEvent *v1.Event, data []byte) return nil, fmt.Errorf("can't patch an event with namespace '%v' in namespace '%v'", incompleteEvent.Namespace, e.ns) } result := &v1.Event{} - err := e.client.Patch(api.StrategicMergePatchType). + err := e.client.Patch(types.StrategicMergePatchType). NamespaceIfScoped(incompleteEvent.Namespace, len(incompleteEvent.Namespace) > 0). Resource("events"). Name(incompleteEvent.Name). @@ -116,7 +118,7 @@ func (e *events) Search(objOrRef runtime.Object) (*v1.EventList, error) { refUID = &stringRefUID } fieldSelector := e.GetFieldSelector(&ref.Name, &ref.Namespace, refKind, refUID) - return e.List(v1.ListOptions{FieldSelector: fieldSelector.String()}) + return e.List(metav1.ListOptions{FieldSelector: fieldSelector.String()}) } // Returns the appropriate field selector based on the API version being used to communicate with the server. diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/doc.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/doc.go index ea928c21..c4753e08 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/doc.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1] +// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1] // Package fake has the automatically generated clients. package fake diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_componentstatus.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_componentstatus.go index dc3a7ba7..3412c859 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_componentstatus.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_componentstatus.go @@ -20,8 +20,8 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" testing "k8s.io/client-go/testing" ) @@ -57,7 +57,7 @@ func (c *FakeComponentStatuses) Delete(name string, options *v1.DeleteOptions) e return err } -func (c *FakeComponentStatuses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *FakeComponentStatuses) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { action := testing.NewRootDeleteCollectionAction(componentstatusesResource, listOptions) _, err := c.Fake.Invokes(action, &v1.ComponentStatusList{}) @@ -73,7 +73,7 @@ func (c *FakeComponentStatuses) Get(name string, options meta_v1.GetOptions) (re return obj.(*v1.ComponentStatus), err } -func (c *FakeComponentStatuses) List(opts v1.ListOptions) (result *v1.ComponentStatusList, err error) { +func (c *FakeComponentStatuses) List(opts meta_v1.ListOptions) (result *v1.ComponentStatusList, err error) { obj, err := c.Fake. Invokes(testing.NewRootListAction(componentstatusesResource, opts), &v1.ComponentStatusList{}) if obj == nil { @@ -94,13 +94,13 @@ func (c *FakeComponentStatuses) List(opts v1.ListOptions) (result *v1.ComponentS } // Watch returns a watch.Interface that watches the requested componentStatuses. -func (c *FakeComponentStatuses) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeComponentStatuses) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(componentstatusesResource, opts)) } // Patch applies the patch and returns the patched componentStatus. -func (c *FakeComponentStatuses) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ComponentStatus, err error) { +func (c *FakeComponentStatuses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ComponentStatus, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(componentstatusesResource, name, data, subresources...), &v1.ComponentStatus{}) if obj == nil { diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_configmap.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_configmap.go index 1e29875c..0ba0d56f 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_configmap.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_configmap.go @@ -20,8 +20,8 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" testing "k8s.io/client-go/testing" ) @@ -61,7 +61,7 @@ func (c *FakeConfigMaps) Delete(name string, options *v1.DeleteOptions) error { return err } -func (c *FakeConfigMaps) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *FakeConfigMaps) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { action := testing.NewDeleteCollectionAction(configmapsResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &v1.ConfigMapList{}) @@ -78,7 +78,7 @@ func (c *FakeConfigMaps) Get(name string, options meta_v1.GetOptions) (result *v return obj.(*v1.ConfigMap), err } -func (c *FakeConfigMaps) List(opts v1.ListOptions) (result *v1.ConfigMapList, err error) { +func (c *FakeConfigMaps) List(opts meta_v1.ListOptions) (result *v1.ConfigMapList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(configmapsResource, c.ns, opts), &v1.ConfigMapList{}) @@ -100,14 +100,14 @@ func (c *FakeConfigMaps) List(opts v1.ListOptions) (result *v1.ConfigMapList, er } // Watch returns a watch.Interface that watches the requested configMaps. -func (c *FakeConfigMaps) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeConfigMaps) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(configmapsResource, c.ns, opts)) } // Patch applies the patch and returns the patched configMap. -func (c *FakeConfigMaps) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ConfigMap, err error) { +func (c *FakeConfigMaps) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ConfigMap, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(configmapsResource, c.ns, name, data, subresources...), &v1.ConfigMap{}) diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_endpoints.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_endpoints.go index 7858e97c..5bd3e0a6 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_endpoints.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_endpoints.go @@ -20,8 +20,8 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" testing "k8s.io/client-go/testing" ) @@ -61,7 +61,7 @@ func (c *FakeEndpoints) Delete(name string, options *v1.DeleteOptions) error { return err } -func (c *FakeEndpoints) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *FakeEndpoints) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { action := testing.NewDeleteCollectionAction(endpointsResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &v1.EndpointsList{}) @@ -78,7 +78,7 @@ func (c *FakeEndpoints) Get(name string, options meta_v1.GetOptions) (result *v1 return obj.(*v1.Endpoints), err } -func (c *FakeEndpoints) List(opts v1.ListOptions) (result *v1.EndpointsList, err error) { +func (c *FakeEndpoints) List(opts meta_v1.ListOptions) (result *v1.EndpointsList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(endpointsResource, c.ns, opts), &v1.EndpointsList{}) @@ -100,14 +100,14 @@ func (c *FakeEndpoints) List(opts v1.ListOptions) (result *v1.EndpointsList, err } // Watch returns a watch.Interface that watches the requested endpoints. -func (c *FakeEndpoints) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeEndpoints) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(endpointsResource, c.ns, opts)) } // Patch applies the patch and returns the patched endpoints. -func (c *FakeEndpoints) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Endpoints, err error) { +func (c *FakeEndpoints) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Endpoints, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(endpointsResource, c.ns, name, data, subresources...), &v1.Endpoints{}) diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_event.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_event.go index bc24a611..6850d535 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_event.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_event.go @@ -20,8 +20,8 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" testing "k8s.io/client-go/testing" ) @@ -61,7 +61,7 @@ func (c *FakeEvents) Delete(name string, options *v1.DeleteOptions) error { return err } -func (c *FakeEvents) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *FakeEvents) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { action := testing.NewDeleteCollectionAction(eventsResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &v1.EventList{}) @@ -78,7 +78,7 @@ func (c *FakeEvents) Get(name string, options meta_v1.GetOptions) (result *v1.Ev return obj.(*v1.Event), err } -func (c *FakeEvents) List(opts v1.ListOptions) (result *v1.EventList, err error) { +func (c *FakeEvents) List(opts meta_v1.ListOptions) (result *v1.EventList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(eventsResource, c.ns, opts), &v1.EventList{}) @@ -100,14 +100,14 @@ func (c *FakeEvents) List(opts v1.ListOptions) (result *v1.EventList, err error) } // Watch returns a watch.Interface that watches the requested events. -func (c *FakeEvents) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeEvents) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(eventsResource, c.ns, opts)) } // Patch applies the patch and returns the patched event. -func (c *FakeEvents) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Event, err error) { +func (c *FakeEvents) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Event, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(eventsResource, c.ns, name, data, subresources...), &v1.Event{}) diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_event_expansion.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_event_expansion.go index 7ed87d53..f66bb862 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_event_expansion.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_event_expansion.go @@ -17,10 +17,10 @@ limitations under the License. package fake import ( + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/pkg/api" "k8s.io/client-go/pkg/api/v1" - "k8s.io/client-go/pkg/fields" "k8s.io/client-go/testing" ) diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_limitrange.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_limitrange.go index 6a3ea3e7..3a3e2405 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_limitrange.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_limitrange.go @@ -20,8 +20,8 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" testing "k8s.io/client-go/testing" ) @@ -61,7 +61,7 @@ func (c *FakeLimitRanges) Delete(name string, options *v1.DeleteOptions) error { return err } -func (c *FakeLimitRanges) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *FakeLimitRanges) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { action := testing.NewDeleteCollectionAction(limitrangesResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &v1.LimitRangeList{}) @@ -78,7 +78,7 @@ func (c *FakeLimitRanges) Get(name string, options meta_v1.GetOptions) (result * return obj.(*v1.LimitRange), err } -func (c *FakeLimitRanges) List(opts v1.ListOptions) (result *v1.LimitRangeList, err error) { +func (c *FakeLimitRanges) List(opts meta_v1.ListOptions) (result *v1.LimitRangeList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(limitrangesResource, c.ns, opts), &v1.LimitRangeList{}) @@ -100,14 +100,14 @@ func (c *FakeLimitRanges) List(opts v1.ListOptions) (result *v1.LimitRangeList, } // Watch returns a watch.Interface that watches the requested limitRanges. -func (c *FakeLimitRanges) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeLimitRanges) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(limitrangesResource, c.ns, opts)) } // Patch applies the patch and returns the patched limitRange. -func (c *FakeLimitRanges) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.LimitRange, err error) { +func (c *FakeLimitRanges) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.LimitRange, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(limitrangesResource, c.ns, name, data, subresources...), &v1.LimitRange{}) diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_namespace.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_namespace.go index ae756ded..2d95ebef 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_namespace.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_namespace.go @@ -20,8 +20,8 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" testing "k8s.io/client-go/testing" ) @@ -66,7 +66,7 @@ func (c *FakeNamespaces) Delete(name string, options *v1.DeleteOptions) error { return err } -func (c *FakeNamespaces) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *FakeNamespaces) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { action := testing.NewRootDeleteCollectionAction(namespacesResource, listOptions) _, err := c.Fake.Invokes(action, &v1.NamespaceList{}) @@ -82,7 +82,7 @@ func (c *FakeNamespaces) Get(name string, options meta_v1.GetOptions) (result *v return obj.(*v1.Namespace), err } -func (c *FakeNamespaces) List(opts v1.ListOptions) (result *v1.NamespaceList, err error) { +func (c *FakeNamespaces) List(opts meta_v1.ListOptions) (result *v1.NamespaceList, err error) { obj, err := c.Fake. Invokes(testing.NewRootListAction(namespacesResource, opts), &v1.NamespaceList{}) if obj == nil { @@ -103,13 +103,13 @@ func (c *FakeNamespaces) List(opts v1.ListOptions) (result *v1.NamespaceList, er } // Watch returns a watch.Interface that watches the requested namespaces. -func (c *FakeNamespaces) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeNamespaces) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(namespacesResource, opts)) } // Patch applies the patch and returns the patched namespace. -func (c *FakeNamespaces) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Namespace, err error) { +func (c *FakeNamespaces) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Namespace, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(namespacesResource, name, data, subresources...), &v1.Namespace{}) if obj == nil { diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_node.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_node.go index 891d1e9a..1ee38968 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_node.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_node.go @@ -20,8 +20,8 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" testing "k8s.io/client-go/testing" ) @@ -66,7 +66,7 @@ func (c *FakeNodes) Delete(name string, options *v1.DeleteOptions) error { return err } -func (c *FakeNodes) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *FakeNodes) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { action := testing.NewRootDeleteCollectionAction(nodesResource, listOptions) _, err := c.Fake.Invokes(action, &v1.NodeList{}) @@ -82,7 +82,7 @@ func (c *FakeNodes) Get(name string, options meta_v1.GetOptions) (result *v1.Nod return obj.(*v1.Node), err } -func (c *FakeNodes) List(opts v1.ListOptions) (result *v1.NodeList, err error) { +func (c *FakeNodes) List(opts meta_v1.ListOptions) (result *v1.NodeList, err error) { obj, err := c.Fake. Invokes(testing.NewRootListAction(nodesResource, opts), &v1.NodeList{}) if obj == nil { @@ -103,13 +103,13 @@ func (c *FakeNodes) List(opts v1.ListOptions) (result *v1.NodeList, err error) { } // Watch returns a watch.Interface that watches the requested nodes. -func (c *FakeNodes) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeNodes) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(nodesResource, opts)) } // Patch applies the patch and returns the patched node. -func (c *FakeNodes) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Node, err error) { +func (c *FakeNodes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Node, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(nodesResource, name, data, subresources...), &v1.Node{}) if obj == nil { diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_persistentvolume.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_persistentvolume.go index 2fb7a51b..f123be04 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_persistentvolume.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_persistentvolume.go @@ -20,8 +20,8 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" testing "k8s.io/client-go/testing" ) @@ -66,7 +66,7 @@ func (c *FakePersistentVolumes) Delete(name string, options *v1.DeleteOptions) e return err } -func (c *FakePersistentVolumes) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *FakePersistentVolumes) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { action := testing.NewRootDeleteCollectionAction(persistentvolumesResource, listOptions) _, err := c.Fake.Invokes(action, &v1.PersistentVolumeList{}) @@ -82,7 +82,7 @@ func (c *FakePersistentVolumes) Get(name string, options meta_v1.GetOptions) (re return obj.(*v1.PersistentVolume), err } -func (c *FakePersistentVolumes) List(opts v1.ListOptions) (result *v1.PersistentVolumeList, err error) { +func (c *FakePersistentVolumes) List(opts meta_v1.ListOptions) (result *v1.PersistentVolumeList, err error) { obj, err := c.Fake. Invokes(testing.NewRootListAction(persistentvolumesResource, opts), &v1.PersistentVolumeList{}) if obj == nil { @@ -103,13 +103,13 @@ func (c *FakePersistentVolumes) List(opts v1.ListOptions) (result *v1.Persistent } // Watch returns a watch.Interface that watches the requested persistentVolumes. -func (c *FakePersistentVolumes) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakePersistentVolumes) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(persistentvolumesResource, opts)) } // Patch applies the patch and returns the patched persistentVolume. -func (c *FakePersistentVolumes) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolume, err error) { +func (c *FakePersistentVolumes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolume, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(persistentvolumesResource, name, data, subresources...), &v1.PersistentVolume{}) if obj == nil { diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_persistentvolumeclaim.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_persistentvolumeclaim.go index 1c17171e..f1d294ae 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_persistentvolumeclaim.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_persistentvolumeclaim.go @@ -20,8 +20,8 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" testing "k8s.io/client-go/testing" ) @@ -71,7 +71,7 @@ func (c *FakePersistentVolumeClaims) Delete(name string, options *v1.DeleteOptio return err } -func (c *FakePersistentVolumeClaims) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *FakePersistentVolumeClaims) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { action := testing.NewDeleteCollectionAction(persistentvolumeclaimsResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &v1.PersistentVolumeClaimList{}) @@ -88,7 +88,7 @@ func (c *FakePersistentVolumeClaims) Get(name string, options meta_v1.GetOptions return obj.(*v1.PersistentVolumeClaim), err } -func (c *FakePersistentVolumeClaims) List(opts v1.ListOptions) (result *v1.PersistentVolumeClaimList, err error) { +func (c *FakePersistentVolumeClaims) List(opts meta_v1.ListOptions) (result *v1.PersistentVolumeClaimList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(persistentvolumeclaimsResource, c.ns, opts), &v1.PersistentVolumeClaimList{}) @@ -110,14 +110,14 @@ func (c *FakePersistentVolumeClaims) List(opts v1.ListOptions) (result *v1.Persi } // Watch returns a watch.Interface that watches the requested persistentVolumeClaims. -func (c *FakePersistentVolumeClaims) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakePersistentVolumeClaims) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(persistentvolumeclaimsResource, c.ns, opts)) } // Patch applies the patch and returns the patched persistentVolumeClaim. -func (c *FakePersistentVolumeClaims) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolumeClaim, err error) { +func (c *FakePersistentVolumeClaims) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolumeClaim, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(persistentvolumeclaimsResource, c.ns, name, data, subresources...), &v1.PersistentVolumeClaim{}) diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_pod.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_pod.go index 7ba33a2f..1aa827b2 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_pod.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_pod.go @@ -20,8 +20,8 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" testing "k8s.io/client-go/testing" ) @@ -71,7 +71,7 @@ func (c *FakePods) Delete(name string, options *v1.DeleteOptions) error { return err } -func (c *FakePods) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *FakePods) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { action := testing.NewDeleteCollectionAction(podsResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &v1.PodList{}) @@ -88,7 +88,7 @@ func (c *FakePods) Get(name string, options meta_v1.GetOptions) (result *v1.Pod, return obj.(*v1.Pod), err } -func (c *FakePods) List(opts v1.ListOptions) (result *v1.PodList, err error) { +func (c *FakePods) List(opts meta_v1.ListOptions) (result *v1.PodList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(podsResource, c.ns, opts), &v1.PodList{}) @@ -110,14 +110,14 @@ func (c *FakePods) List(opts v1.ListOptions) (result *v1.PodList, err error) { } // Watch returns a watch.Interface that watches the requested pods. -func (c *FakePods) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakePods) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(podsResource, c.ns, opts)) } // Patch applies the patch and returns the patched pod. -func (c *FakePods) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Pod, err error) { +func (c *FakePods) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Pod, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(podsResource, c.ns, name, data, subresources...), &v1.Pod{}) diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_pod_expansion.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_pod_expansion.go index 4fe2a05b..c54c1658 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_pod_expansion.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_pod_expansion.go @@ -19,7 +19,7 @@ package fake import ( "k8s.io/client-go/pkg/api/v1" policy "k8s.io/client-go/pkg/apis/policy/v1beta1" - "k8s.io/client-go/rest" + restclient "k8s.io/client-go/rest" "k8s.io/client-go/testing" ) @@ -34,7 +34,7 @@ func (c *FakePods) Bind(binding *v1.Binding) error { return err } -func (c *FakePods) GetLogs(name string, opts *v1.PodLogOptions) *rest.Request { +func (c *FakePods) GetLogs(name string, opts *v1.PodLogOptions) *restclient.Request { action := testing.GenericActionImpl{} action.Verb = "get" action.Namespace = c.ns @@ -43,7 +43,7 @@ func (c *FakePods) GetLogs(name string, opts *v1.PodLogOptions) *rest.Request { action.Value = opts _, _ = c.Fake.Invokes(action, &v1.Pod{}) - return &rest.Request{} + return &restclient.Request{} } func (c *FakePods) Evict(eviction *policy.Eviction) error { diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_podtemplate.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_podtemplate.go index 1669d173..38550970 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_podtemplate.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_podtemplate.go @@ -20,8 +20,8 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" testing "k8s.io/client-go/testing" ) @@ -61,7 +61,7 @@ func (c *FakePodTemplates) Delete(name string, options *v1.DeleteOptions) error return err } -func (c *FakePodTemplates) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *FakePodTemplates) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { action := testing.NewDeleteCollectionAction(podtemplatesResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &v1.PodTemplateList{}) @@ -78,7 +78,7 @@ func (c *FakePodTemplates) Get(name string, options meta_v1.GetOptions) (result return obj.(*v1.PodTemplate), err } -func (c *FakePodTemplates) List(opts v1.ListOptions) (result *v1.PodTemplateList, err error) { +func (c *FakePodTemplates) List(opts meta_v1.ListOptions) (result *v1.PodTemplateList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(podtemplatesResource, c.ns, opts), &v1.PodTemplateList{}) @@ -100,14 +100,14 @@ func (c *FakePodTemplates) List(opts v1.ListOptions) (result *v1.PodTemplateList } // Watch returns a watch.Interface that watches the requested podTemplates. -func (c *FakePodTemplates) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakePodTemplates) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(podtemplatesResource, c.ns, opts)) } // Patch applies the patch and returns the patched podTemplate. -func (c *FakePodTemplates) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.PodTemplate, err error) { +func (c *FakePodTemplates) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PodTemplate, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(podtemplatesResource, c.ns, name, data, subresources...), &v1.PodTemplate{}) diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_replicationcontroller.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_replicationcontroller.go index 94c19de0..871b423e 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_replicationcontroller.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_replicationcontroller.go @@ -20,8 +20,8 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" testing "k8s.io/client-go/testing" ) @@ -71,7 +71,7 @@ func (c *FakeReplicationControllers) Delete(name string, options *v1.DeleteOptio return err } -func (c *FakeReplicationControllers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *FakeReplicationControllers) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { action := testing.NewDeleteCollectionAction(replicationcontrollersResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &v1.ReplicationControllerList{}) @@ -88,7 +88,7 @@ func (c *FakeReplicationControllers) Get(name string, options meta_v1.GetOptions return obj.(*v1.ReplicationController), err } -func (c *FakeReplicationControllers) List(opts v1.ListOptions) (result *v1.ReplicationControllerList, err error) { +func (c *FakeReplicationControllers) List(opts meta_v1.ListOptions) (result *v1.ReplicationControllerList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(replicationcontrollersResource, c.ns, opts), &v1.ReplicationControllerList{}) @@ -110,14 +110,14 @@ func (c *FakeReplicationControllers) List(opts v1.ListOptions) (result *v1.Repli } // Watch returns a watch.Interface that watches the requested replicationControllers. -func (c *FakeReplicationControllers) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeReplicationControllers) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(replicationcontrollersResource, c.ns, opts)) } // Patch applies the patch and returns the patched replicationController. -func (c *FakeReplicationControllers) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ReplicationController, err error) { +func (c *FakeReplicationControllers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ReplicationController, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(replicationcontrollersResource, c.ns, name, data, subresources...), &v1.ReplicationController{}) diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_resourcequota.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_resourcequota.go index 01ce9808..61e8ce8c 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_resourcequota.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_resourcequota.go @@ -20,8 +20,8 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" testing "k8s.io/client-go/testing" ) @@ -71,7 +71,7 @@ func (c *FakeResourceQuotas) Delete(name string, options *v1.DeleteOptions) erro return err } -func (c *FakeResourceQuotas) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *FakeResourceQuotas) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { action := testing.NewDeleteCollectionAction(resourcequotasResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &v1.ResourceQuotaList{}) @@ -88,7 +88,7 @@ func (c *FakeResourceQuotas) Get(name string, options meta_v1.GetOptions) (resul return obj.(*v1.ResourceQuota), err } -func (c *FakeResourceQuotas) List(opts v1.ListOptions) (result *v1.ResourceQuotaList, err error) { +func (c *FakeResourceQuotas) List(opts meta_v1.ListOptions) (result *v1.ResourceQuotaList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(resourcequotasResource, c.ns, opts), &v1.ResourceQuotaList{}) @@ -110,14 +110,14 @@ func (c *FakeResourceQuotas) List(opts v1.ListOptions) (result *v1.ResourceQuota } // Watch returns a watch.Interface that watches the requested resourceQuotas. -func (c *FakeResourceQuotas) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeResourceQuotas) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(resourcequotasResource, c.ns, opts)) } // Patch applies the patch and returns the patched resourceQuota. -func (c *FakeResourceQuotas) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ResourceQuota, err error) { +func (c *FakeResourceQuotas) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ResourceQuota, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(resourcequotasResource, c.ns, name, data, subresources...), &v1.ResourceQuota{}) diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_secret.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_secret.go index 59b86a75..d9c1a18d 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_secret.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_secret.go @@ -20,8 +20,8 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" testing "k8s.io/client-go/testing" ) @@ -61,7 +61,7 @@ func (c *FakeSecrets) Delete(name string, options *v1.DeleteOptions) error { return err } -func (c *FakeSecrets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *FakeSecrets) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { action := testing.NewDeleteCollectionAction(secretsResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &v1.SecretList{}) @@ -78,7 +78,7 @@ func (c *FakeSecrets) Get(name string, options meta_v1.GetOptions) (result *v1.S return obj.(*v1.Secret), err } -func (c *FakeSecrets) List(opts v1.ListOptions) (result *v1.SecretList, err error) { +func (c *FakeSecrets) List(opts meta_v1.ListOptions) (result *v1.SecretList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(secretsResource, c.ns, opts), &v1.SecretList{}) @@ -100,14 +100,14 @@ func (c *FakeSecrets) List(opts v1.ListOptions) (result *v1.SecretList, err erro } // Watch returns a watch.Interface that watches the requested secrets. -func (c *FakeSecrets) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeSecrets) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(secretsResource, c.ns, opts)) } // Patch applies the patch and returns the patched secret. -func (c *FakeSecrets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Secret, err error) { +func (c *FakeSecrets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Secret, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(secretsResource, c.ns, name, data, subresources...), &v1.Secret{}) diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_service.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_service.go index 7bff637a..5f35e5c2 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_service.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_service.go @@ -20,8 +20,8 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" testing "k8s.io/client-go/testing" ) @@ -71,7 +71,7 @@ func (c *FakeServices) Delete(name string, options *v1.DeleteOptions) error { return err } -func (c *FakeServices) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *FakeServices) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { action := testing.NewDeleteCollectionAction(servicesResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &v1.ServiceList{}) @@ -88,7 +88,7 @@ func (c *FakeServices) Get(name string, options meta_v1.GetOptions) (result *v1. return obj.(*v1.Service), err } -func (c *FakeServices) List(opts v1.ListOptions) (result *v1.ServiceList, err error) { +func (c *FakeServices) List(opts meta_v1.ListOptions) (result *v1.ServiceList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(servicesResource, c.ns, opts), &v1.ServiceList{}) @@ -110,14 +110,14 @@ func (c *FakeServices) List(opts v1.ListOptions) (result *v1.ServiceList, err er } // Watch returns a watch.Interface that watches the requested services. -func (c *FakeServices) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeServices) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(servicesResource, c.ns, opts)) } // Patch applies the patch and returns the patched service. -func (c *FakeServices) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Service, err error) { +func (c *FakeServices) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Service, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(servicesResource, c.ns, name, data, subresources...), &v1.Service{}) diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_service_expansion.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_service_expansion.go index f3128b8f..59fa8e51 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_service_expansion.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_service_expansion.go @@ -17,10 +17,10 @@ limitations under the License. package fake import ( - "k8s.io/client-go/rest" + restclient "k8s.io/client-go/rest" "k8s.io/client-go/testing" ) -func (c *FakeServices) ProxyGet(scheme, name, port, path string, params map[string]string) rest.ResponseWrapper { +func (c *FakeServices) ProxyGet(scheme, name, port, path string, params map[string]string) restclient.ResponseWrapper { return c.Fake.InvokesProxy(testing.NewProxyGetAction(servicesResource, c.ns, scheme, name, port, path, params)) } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_serviceaccount.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_serviceaccount.go index ddbdb1dd..b52f3f22 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_serviceaccount.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_serviceaccount.go @@ -20,8 +20,8 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" testing "k8s.io/client-go/testing" ) @@ -61,7 +61,7 @@ func (c *FakeServiceAccounts) Delete(name string, options *v1.DeleteOptions) err return err } -func (c *FakeServiceAccounts) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *FakeServiceAccounts) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { action := testing.NewDeleteCollectionAction(serviceaccountsResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &v1.ServiceAccountList{}) @@ -78,7 +78,7 @@ func (c *FakeServiceAccounts) Get(name string, options meta_v1.GetOptions) (resu return obj.(*v1.ServiceAccount), err } -func (c *FakeServiceAccounts) List(opts v1.ListOptions) (result *v1.ServiceAccountList, err error) { +func (c *FakeServiceAccounts) List(opts meta_v1.ListOptions) (result *v1.ServiceAccountList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(serviceaccountsResource, c.ns, opts), &v1.ServiceAccountList{}) @@ -100,14 +100,14 @@ func (c *FakeServiceAccounts) List(opts v1.ListOptions) (result *v1.ServiceAccou } // Watch returns a watch.Interface that watches the requested serviceAccounts. -func (c *FakeServiceAccounts) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeServiceAccounts) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(serviceaccountsResource, c.ns, opts)) } // Patch applies the patch and returns the patched serviceAccount. -func (c *FakeServiceAccounts) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ServiceAccount, err error) { +func (c *FakeServiceAccounts) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ServiceAccount, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(serviceaccountsResource, c.ns, name, data, subresources...), &v1.ServiceAccount{}) diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/limitrange.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/limitrange.go index d7470a6a..0c3d03a8 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/limitrange.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/limitrange.go @@ -18,6 +18,7 @@ package v1 import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" @@ -35,11 +36,11 @@ type LimitRangeInterface interface { Create(*v1.LimitRange) (*v1.LimitRange, error) Update(*v1.LimitRange) (*v1.LimitRange, error) Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error Get(name string, options meta_v1.GetOptions) (*v1.LimitRange, error) - List(opts v1.ListOptions) (*v1.LimitRangeList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.LimitRange, err error) + List(opts meta_v1.ListOptions) (*v1.LimitRangeList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.LimitRange, err error) LimitRangeExpansion } @@ -94,7 +95,7 @@ func (c *limitRanges) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *limitRanges) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *limitRanges) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("limitranges"). @@ -118,7 +119,7 @@ func (c *limitRanges) Get(name string, options meta_v1.GetOptions) (result *v1.L } // List takes label and field selectors, and returns the list of LimitRanges that match those selectors. -func (c *limitRanges) List(opts v1.ListOptions) (result *v1.LimitRangeList, err error) { +func (c *limitRanges) List(opts meta_v1.ListOptions) (result *v1.LimitRangeList, err error) { result = &v1.LimitRangeList{} err = c.client.Get(). Namespace(c.ns). @@ -130,7 +131,7 @@ func (c *limitRanges) List(opts v1.ListOptions) (result *v1.LimitRangeList, err } // Watch returns a watch.Interface that watches the requested limitRanges. -func (c *limitRanges) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *limitRanges) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -140,7 +141,7 @@ func (c *limitRanges) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched limitRange. -func (c *limitRanges) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.LimitRange, err error) { +func (c *limitRanges) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.LimitRange, err error) { result = &v1.LimitRange{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/namespace.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/namespace.go index 6c87008f..362a608c 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/namespace.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/namespace.go @@ -18,6 +18,7 @@ package v1 import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" @@ -36,11 +37,11 @@ type NamespaceInterface interface { Update(*v1.Namespace) (*v1.Namespace, error) UpdateStatus(*v1.Namespace) (*v1.Namespace, error) Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error Get(name string, options meta_v1.GetOptions) (*v1.Namespace, error) - List(opts v1.ListOptions) (*v1.NamespaceList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Namespace, err error) + List(opts meta_v1.ListOptions) (*v1.NamespaceList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Namespace, err error) NamespaceExpansion } @@ -105,7 +106,7 @@ func (c *namespaces) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *namespaces) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *namespaces) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Resource("namespaces"). VersionedParams(&listOptions, api.ParameterCodec). @@ -127,7 +128,7 @@ func (c *namespaces) Get(name string, options meta_v1.GetOptions) (result *v1.Na } // List takes label and field selectors, and returns the list of Namespaces that match those selectors. -func (c *namespaces) List(opts v1.ListOptions) (result *v1.NamespaceList, err error) { +func (c *namespaces) List(opts meta_v1.ListOptions) (result *v1.NamespaceList, err error) { result = &v1.NamespaceList{} err = c.client.Get(). Resource("namespaces"). @@ -138,7 +139,7 @@ func (c *namespaces) List(opts v1.ListOptions) (result *v1.NamespaceList, err er } // Watch returns a watch.Interface that watches the requested namespaces. -func (c *namespaces) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *namespaces) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Resource("namespaces"). @@ -147,7 +148,7 @@ func (c *namespaces) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched namespace. -func (c *namespaces) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Namespace, err error) { +func (c *namespaces) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Namespace, err error) { result = &v1.Namespace{} err = c.client.Patch(pt). Resource("namespaces"). diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/node.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/node.go index d6531f7d..ccbc8309 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/node.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/node.go @@ -18,6 +18,7 @@ package v1 import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" @@ -36,11 +37,11 @@ type NodeInterface interface { Update(*v1.Node) (*v1.Node, error) UpdateStatus(*v1.Node) (*v1.Node, error) Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error Get(name string, options meta_v1.GetOptions) (*v1.Node, error) - List(opts v1.ListOptions) (*v1.NodeList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Node, err error) + List(opts meta_v1.ListOptions) (*v1.NodeList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Node, err error) NodeExpansion } @@ -105,7 +106,7 @@ func (c *nodes) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *nodes) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *nodes) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Resource("nodes"). VersionedParams(&listOptions, api.ParameterCodec). @@ -127,7 +128,7 @@ func (c *nodes) Get(name string, options meta_v1.GetOptions) (result *v1.Node, e } // List takes label and field selectors, and returns the list of Nodes that match those selectors. -func (c *nodes) List(opts v1.ListOptions) (result *v1.NodeList, err error) { +func (c *nodes) List(opts meta_v1.ListOptions) (result *v1.NodeList, err error) { result = &v1.NodeList{} err = c.client.Get(). Resource("nodes"). @@ -138,7 +139,7 @@ func (c *nodes) List(opts v1.ListOptions) (result *v1.NodeList, err error) { } // Watch returns a watch.Interface that watches the requested nodes. -func (c *nodes) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *nodes) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Resource("nodes"). @@ -147,7 +148,7 @@ func (c *nodes) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched node. -func (c *nodes) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Node, err error) { +func (c *nodes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Node, err error) { result = &v1.Node{} err = c.client.Patch(pt). Resource("nodes"). diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/node_expansion.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/node_expansion.go index 748b8c6a..29c12aab 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/node_expansion.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/node_expansion.go @@ -17,7 +17,7 @@ limitations under the License. package v1 import ( - "k8s.io/client-go/pkg/api" + "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/pkg/api/v1" ) @@ -32,7 +32,7 @@ type NodeExpansion interface { // the node that the server returns, or an error. func (c *nodes) PatchStatus(nodeName string, data []byte) (*v1.Node, error) { result := &v1.Node{} - err := c.client.Patch(api.StrategicMergePatchType). + err := c.client.Patch(types.StrategicMergePatchType). Resource("nodes"). Name(nodeName). SubResource("status"). diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolume.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolume.go index 30941d52..5de1f427 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolume.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolume.go @@ -18,6 +18,7 @@ package v1 import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" @@ -36,11 +37,11 @@ type PersistentVolumeInterface interface { Update(*v1.PersistentVolume) (*v1.PersistentVolume, error) UpdateStatus(*v1.PersistentVolume) (*v1.PersistentVolume, error) Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error Get(name string, options meta_v1.GetOptions) (*v1.PersistentVolume, error) - List(opts v1.ListOptions) (*v1.PersistentVolumeList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolume, err error) + List(opts meta_v1.ListOptions) (*v1.PersistentVolumeList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolume, err error) PersistentVolumeExpansion } @@ -105,7 +106,7 @@ func (c *persistentVolumes) Delete(name string, options *v1.DeleteOptions) error } // DeleteCollection deletes a collection of objects. -func (c *persistentVolumes) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *persistentVolumes) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Resource("persistentvolumes"). VersionedParams(&listOptions, api.ParameterCodec). @@ -127,7 +128,7 @@ func (c *persistentVolumes) Get(name string, options meta_v1.GetOptions) (result } // List takes label and field selectors, and returns the list of PersistentVolumes that match those selectors. -func (c *persistentVolumes) List(opts v1.ListOptions) (result *v1.PersistentVolumeList, err error) { +func (c *persistentVolumes) List(opts meta_v1.ListOptions) (result *v1.PersistentVolumeList, err error) { result = &v1.PersistentVolumeList{} err = c.client.Get(). Resource("persistentvolumes"). @@ -138,7 +139,7 @@ func (c *persistentVolumes) List(opts v1.ListOptions) (result *v1.PersistentVolu } // Watch returns a watch.Interface that watches the requested persistentVolumes. -func (c *persistentVolumes) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *persistentVolumes) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Resource("persistentvolumes"). @@ -147,7 +148,7 @@ func (c *persistentVolumes) Watch(opts v1.ListOptions) (watch.Interface, error) } // Patch applies the patch and returns the patched persistentVolume. -func (c *persistentVolumes) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolume, err error) { +func (c *persistentVolumes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolume, err error) { result = &v1.PersistentVolume{} err = c.client.Patch(pt). Resource("persistentvolumes"). diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolumeclaim.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolumeclaim.go index b9046e6f..3c3e89c2 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolumeclaim.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolumeclaim.go @@ -18,6 +18,7 @@ package v1 import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" @@ -36,11 +37,11 @@ type PersistentVolumeClaimInterface interface { Update(*v1.PersistentVolumeClaim) (*v1.PersistentVolumeClaim, error) UpdateStatus(*v1.PersistentVolumeClaim) (*v1.PersistentVolumeClaim, error) Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error Get(name string, options meta_v1.GetOptions) (*v1.PersistentVolumeClaim, error) - List(opts v1.ListOptions) (*v1.PersistentVolumeClaimList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolumeClaim, err error) + List(opts meta_v1.ListOptions) (*v1.PersistentVolumeClaimList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolumeClaim, err error) PersistentVolumeClaimExpansion } @@ -111,7 +112,7 @@ func (c *persistentVolumeClaims) Delete(name string, options *v1.DeleteOptions) } // DeleteCollection deletes a collection of objects. -func (c *persistentVolumeClaims) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *persistentVolumeClaims) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("persistentvolumeclaims"). @@ -135,7 +136,7 @@ func (c *persistentVolumeClaims) Get(name string, options meta_v1.GetOptions) (r } // List takes label and field selectors, and returns the list of PersistentVolumeClaims that match those selectors. -func (c *persistentVolumeClaims) List(opts v1.ListOptions) (result *v1.PersistentVolumeClaimList, err error) { +func (c *persistentVolumeClaims) List(opts meta_v1.ListOptions) (result *v1.PersistentVolumeClaimList, err error) { result = &v1.PersistentVolumeClaimList{} err = c.client.Get(). Namespace(c.ns). @@ -147,7 +148,7 @@ func (c *persistentVolumeClaims) List(opts v1.ListOptions) (result *v1.Persisten } // Watch returns a watch.Interface that watches the requested persistentVolumeClaims. -func (c *persistentVolumeClaims) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *persistentVolumeClaims) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -157,7 +158,7 @@ func (c *persistentVolumeClaims) Watch(opts v1.ListOptions) (watch.Interface, er } // Patch applies the patch and returns the patched persistentVolumeClaim. -func (c *persistentVolumeClaims) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolumeClaim, err error) { +func (c *persistentVolumeClaims) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolumeClaim, err error) { result = &v1.PersistentVolumeClaim{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/pod.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/pod.go index 75ae88b6..cb762b41 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/pod.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/pod.go @@ -18,6 +18,7 @@ package v1 import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" @@ -36,11 +37,11 @@ type PodInterface interface { Update(*v1.Pod) (*v1.Pod, error) UpdateStatus(*v1.Pod) (*v1.Pod, error) Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error Get(name string, options meta_v1.GetOptions) (*v1.Pod, error) - List(opts v1.ListOptions) (*v1.PodList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Pod, err error) + List(opts meta_v1.ListOptions) (*v1.PodList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Pod, err error) PodExpansion } @@ -111,7 +112,7 @@ func (c *pods) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *pods) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *pods) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("pods"). @@ -135,7 +136,7 @@ func (c *pods) Get(name string, options meta_v1.GetOptions) (result *v1.Pod, err } // List takes label and field selectors, and returns the list of Pods that match those selectors. -func (c *pods) List(opts v1.ListOptions) (result *v1.PodList, err error) { +func (c *pods) List(opts meta_v1.ListOptions) (result *v1.PodList, err error) { result = &v1.PodList{} err = c.client.Get(). Namespace(c.ns). @@ -147,7 +148,7 @@ func (c *pods) List(opts v1.ListOptions) (result *v1.PodList, err error) { } // Watch returns a watch.Interface that watches the requested pods. -func (c *pods) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *pods) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -157,7 +158,7 @@ func (c *pods) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched pod. -func (c *pods) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Pod, err error) { +func (c *pods) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Pod, err error) { result = &v1.Pod{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/pod_expansion.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/pod_expansion.go index c54ba6a7..82f3b7fb 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/pod_expansion.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/pod_expansion.go @@ -20,14 +20,14 @@ import ( "k8s.io/client-go/pkg/api" "k8s.io/client-go/pkg/api/v1" policy "k8s.io/client-go/pkg/apis/policy/v1beta1" - "k8s.io/client-go/rest" + restclient "k8s.io/client-go/rest" ) // The PodExpansion interface allows manually adding extra methods to the PodInterface. type PodExpansion interface { Bind(binding *v1.Binding) error Evict(eviction *policy.Eviction) error - GetLogs(name string, opts *v1.PodLogOptions) *rest.Request + GetLogs(name string, opts *v1.PodLogOptions) *restclient.Request } // Bind applies the provided binding to the named pod in the current namespace (binding.Namespace is ignored). @@ -40,6 +40,6 @@ func (c *pods) Evict(eviction *policy.Eviction) error { } // Get constructs a request for getting the logs for a pod -func (c *pods) GetLogs(name string, opts *v1.PodLogOptions) *rest.Request { +func (c *pods) GetLogs(name string, opts *v1.PodLogOptions) *restclient.Request { return c.client.Get().Namespace(c.ns).Name(name).Resource("pods").SubResource("log").VersionedParams(opts, api.ParameterCodec) } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/podtemplate.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/podtemplate.go index ea34cdf8..c3fdee97 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/podtemplate.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/podtemplate.go @@ -18,6 +18,7 @@ package v1 import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" @@ -35,11 +36,11 @@ type PodTemplateInterface interface { Create(*v1.PodTemplate) (*v1.PodTemplate, error) Update(*v1.PodTemplate) (*v1.PodTemplate, error) Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error Get(name string, options meta_v1.GetOptions) (*v1.PodTemplate, error) - List(opts v1.ListOptions) (*v1.PodTemplateList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.PodTemplate, err error) + List(opts meta_v1.ListOptions) (*v1.PodTemplateList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PodTemplate, err error) PodTemplateExpansion } @@ -94,7 +95,7 @@ func (c *podTemplates) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *podTemplates) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *podTemplates) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("podtemplates"). @@ -118,7 +119,7 @@ func (c *podTemplates) Get(name string, options meta_v1.GetOptions) (result *v1. } // List takes label and field selectors, and returns the list of PodTemplates that match those selectors. -func (c *podTemplates) List(opts v1.ListOptions) (result *v1.PodTemplateList, err error) { +func (c *podTemplates) List(opts meta_v1.ListOptions) (result *v1.PodTemplateList, err error) { result = &v1.PodTemplateList{} err = c.client.Get(). Namespace(c.ns). @@ -130,7 +131,7 @@ func (c *podTemplates) List(opts v1.ListOptions) (result *v1.PodTemplateList, er } // Watch returns a watch.Interface that watches the requested podTemplates. -func (c *podTemplates) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *podTemplates) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -140,7 +141,7 @@ func (c *podTemplates) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched podTemplate. -func (c *podTemplates) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.PodTemplate, err error) { +func (c *podTemplates) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PodTemplate, err error) { result = &v1.PodTemplate{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/replicationcontroller.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/replicationcontroller.go index 475181c1..49712869 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/replicationcontroller.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/replicationcontroller.go @@ -18,6 +18,7 @@ package v1 import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" @@ -36,11 +37,11 @@ type ReplicationControllerInterface interface { Update(*v1.ReplicationController) (*v1.ReplicationController, error) UpdateStatus(*v1.ReplicationController) (*v1.ReplicationController, error) Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error Get(name string, options meta_v1.GetOptions) (*v1.ReplicationController, error) - List(opts v1.ListOptions) (*v1.ReplicationControllerList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ReplicationController, err error) + List(opts meta_v1.ListOptions) (*v1.ReplicationControllerList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ReplicationController, err error) ReplicationControllerExpansion } @@ -111,7 +112,7 @@ func (c *replicationControllers) Delete(name string, options *v1.DeleteOptions) } // DeleteCollection deletes a collection of objects. -func (c *replicationControllers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *replicationControllers) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("replicationcontrollers"). @@ -135,7 +136,7 @@ func (c *replicationControllers) Get(name string, options meta_v1.GetOptions) (r } // List takes label and field selectors, and returns the list of ReplicationControllers that match those selectors. -func (c *replicationControllers) List(opts v1.ListOptions) (result *v1.ReplicationControllerList, err error) { +func (c *replicationControllers) List(opts meta_v1.ListOptions) (result *v1.ReplicationControllerList, err error) { result = &v1.ReplicationControllerList{} err = c.client.Get(). Namespace(c.ns). @@ -147,7 +148,7 @@ func (c *replicationControllers) List(opts v1.ListOptions) (result *v1.Replicati } // Watch returns a watch.Interface that watches the requested replicationControllers. -func (c *replicationControllers) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *replicationControllers) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -157,7 +158,7 @@ func (c *replicationControllers) Watch(opts v1.ListOptions) (watch.Interface, er } // Patch applies the patch and returns the patched replicationController. -func (c *replicationControllers) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ReplicationController, err error) { +func (c *replicationControllers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ReplicationController, err error) { result = &v1.ReplicationController{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/resourcequota.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/resourcequota.go index 77401851..5311b6c7 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/resourcequota.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/resourcequota.go @@ -18,6 +18,7 @@ package v1 import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" @@ -36,11 +37,11 @@ type ResourceQuotaInterface interface { Update(*v1.ResourceQuota) (*v1.ResourceQuota, error) UpdateStatus(*v1.ResourceQuota) (*v1.ResourceQuota, error) Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error Get(name string, options meta_v1.GetOptions) (*v1.ResourceQuota, error) - List(opts v1.ListOptions) (*v1.ResourceQuotaList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ResourceQuota, err error) + List(opts meta_v1.ListOptions) (*v1.ResourceQuotaList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ResourceQuota, err error) ResourceQuotaExpansion } @@ -111,7 +112,7 @@ func (c *resourceQuotas) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *resourceQuotas) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *resourceQuotas) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("resourcequotas"). @@ -135,7 +136,7 @@ func (c *resourceQuotas) Get(name string, options meta_v1.GetOptions) (result *v } // List takes label and field selectors, and returns the list of ResourceQuotas that match those selectors. -func (c *resourceQuotas) List(opts v1.ListOptions) (result *v1.ResourceQuotaList, err error) { +func (c *resourceQuotas) List(opts meta_v1.ListOptions) (result *v1.ResourceQuotaList, err error) { result = &v1.ResourceQuotaList{} err = c.client.Get(). Namespace(c.ns). @@ -147,7 +148,7 @@ func (c *resourceQuotas) List(opts v1.ListOptions) (result *v1.ResourceQuotaList } // Watch returns a watch.Interface that watches the requested resourceQuotas. -func (c *resourceQuotas) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *resourceQuotas) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -157,7 +158,7 @@ func (c *resourceQuotas) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched resourceQuota. -func (c *resourceQuotas) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ResourceQuota, err error) { +func (c *resourceQuotas) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ResourceQuota, err error) { result = &v1.ResourceQuota{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/secret.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/secret.go index 685a89e2..62d5397e 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/secret.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/secret.go @@ -18,6 +18,7 @@ package v1 import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" @@ -35,11 +36,11 @@ type SecretInterface interface { Create(*v1.Secret) (*v1.Secret, error) Update(*v1.Secret) (*v1.Secret, error) Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error Get(name string, options meta_v1.GetOptions) (*v1.Secret, error) - List(opts v1.ListOptions) (*v1.SecretList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Secret, err error) + List(opts meta_v1.ListOptions) (*v1.SecretList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Secret, err error) SecretExpansion } @@ -94,7 +95,7 @@ func (c *secrets) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *secrets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *secrets) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("secrets"). @@ -118,7 +119,7 @@ func (c *secrets) Get(name string, options meta_v1.GetOptions) (result *v1.Secre } // List takes label and field selectors, and returns the list of Secrets that match those selectors. -func (c *secrets) List(opts v1.ListOptions) (result *v1.SecretList, err error) { +func (c *secrets) List(opts meta_v1.ListOptions) (result *v1.SecretList, err error) { result = &v1.SecretList{} err = c.client.Get(). Namespace(c.ns). @@ -130,7 +131,7 @@ func (c *secrets) List(opts v1.ListOptions) (result *v1.SecretList, err error) { } // Watch returns a watch.Interface that watches the requested secrets. -func (c *secrets) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *secrets) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -140,7 +141,7 @@ func (c *secrets) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched secret. -func (c *secrets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Secret, err error) { +func (c *secrets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Secret, err error) { result = &v1.Secret{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/service.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/service.go index 60a9edd6..762d5761 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/service.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/service.go @@ -18,6 +18,7 @@ package v1 import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" @@ -36,11 +37,11 @@ type ServiceInterface interface { Update(*v1.Service) (*v1.Service, error) UpdateStatus(*v1.Service) (*v1.Service, error) Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error Get(name string, options meta_v1.GetOptions) (*v1.Service, error) - List(opts v1.ListOptions) (*v1.ServiceList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Service, err error) + List(opts meta_v1.ListOptions) (*v1.ServiceList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Service, err error) ServiceExpansion } @@ -111,7 +112,7 @@ func (c *services) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *services) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *services) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("services"). @@ -135,7 +136,7 @@ func (c *services) Get(name string, options meta_v1.GetOptions) (result *v1.Serv } // List takes label and field selectors, and returns the list of Services that match those selectors. -func (c *services) List(opts v1.ListOptions) (result *v1.ServiceList, err error) { +func (c *services) List(opts meta_v1.ListOptions) (result *v1.ServiceList, err error) { result = &v1.ServiceList{} err = c.client.Get(). Namespace(c.ns). @@ -147,7 +148,7 @@ func (c *services) List(opts v1.ListOptions) (result *v1.ServiceList, err error) } // Watch returns a watch.Interface that watches the requested services. -func (c *services) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *services) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -157,7 +158,7 @@ func (c *services) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched service. -func (c *services) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Service, err error) { +func (c *services) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Service, err error) { result = &v1.Service{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/service_expansion.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/service_expansion.go index 07b212bb..d2bb531d 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/service_expansion.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/service_expansion.go @@ -18,16 +18,16 @@ package v1 import ( "k8s.io/apimachinery/pkg/util/net" - "k8s.io/client-go/rest" + restclient "k8s.io/client-go/rest" ) // The ServiceExpansion interface allows manually adding extra methods to the ServiceInterface. type ServiceExpansion interface { - ProxyGet(scheme, name, port, path string, params map[string]string) rest.ResponseWrapper + ProxyGet(scheme, name, port, path string, params map[string]string) restclient.ResponseWrapper } // ProxyGet returns a response of the service by calling it through the proxy. -func (c *services) ProxyGet(scheme, name, port, path string, params map[string]string) rest.ResponseWrapper { +func (c *services) ProxyGet(scheme, name, port, path string, params map[string]string) restclient.ResponseWrapper { request := c.client.Get(). Prefix("proxy"). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/serviceaccount.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/serviceaccount.go index 00ce051e..bc9cd6ba 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/serviceaccount.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/core/v1/serviceaccount.go @@ -18,6 +18,7 @@ package v1 import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" @@ -35,11 +36,11 @@ type ServiceAccountInterface interface { Create(*v1.ServiceAccount) (*v1.ServiceAccount, error) Update(*v1.ServiceAccount) (*v1.ServiceAccount, error) Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error Get(name string, options meta_v1.GetOptions) (*v1.ServiceAccount, error) - List(opts v1.ListOptions) (*v1.ServiceAccountList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ServiceAccount, err error) + List(opts meta_v1.ListOptions) (*v1.ServiceAccountList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ServiceAccount, err error) ServiceAccountExpansion } @@ -94,7 +95,7 @@ func (c *serviceAccounts) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *serviceAccounts) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *serviceAccounts) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("serviceaccounts"). @@ -118,7 +119,7 @@ func (c *serviceAccounts) Get(name string, options meta_v1.GetOptions) (result * } // List takes label and field selectors, and returns the list of ServiceAccounts that match those selectors. -func (c *serviceAccounts) List(opts v1.ListOptions) (result *v1.ServiceAccountList, err error) { +func (c *serviceAccounts) List(opts meta_v1.ListOptions) (result *v1.ServiceAccountList, err error) { result = &v1.ServiceAccountList{} err = c.client.Get(). Namespace(c.ns). @@ -130,7 +131,7 @@ func (c *serviceAccounts) List(opts v1.ListOptions) (result *v1.ServiceAccountLi } // Watch returns a watch.Interface that watches the requested serviceAccounts. -func (c *serviceAccounts) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *serviceAccounts) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -140,7 +141,7 @@ func (c *serviceAccounts) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched serviceAccount. -func (c *serviceAccounts) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ServiceAccount, err error) { +func (c *serviceAccounts) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ServiceAccount, err error) { result = &v1.ServiceAccount{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/daemonset.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/daemonset.go index e15db628..f9c4cada 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/daemonset.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/daemonset.go @@ -18,6 +18,7 @@ package v1beta1 import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" @@ -37,11 +38,11 @@ type DaemonSetInterface interface { Update(*v1beta1.DaemonSet) (*v1beta1.DaemonSet, error) UpdateStatus(*v1beta1.DaemonSet) (*v1beta1.DaemonSet, error) Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error Get(name string, options meta_v1.GetOptions) (*v1beta1.DaemonSet, error) - List(opts v1.ListOptions) (*v1beta1.DaemonSetList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.DaemonSet, err error) + List(opts meta_v1.ListOptions) (*v1beta1.DaemonSetList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.DaemonSet, err error) DaemonSetExpansion } @@ -112,7 +113,7 @@ func (c *daemonSets) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *daemonSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *daemonSets) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("daemonsets"). @@ -136,7 +137,7 @@ func (c *daemonSets) Get(name string, options meta_v1.GetOptions) (result *v1bet } // List takes label and field selectors, and returns the list of DaemonSets that match those selectors. -func (c *daemonSets) List(opts v1.ListOptions) (result *v1beta1.DaemonSetList, err error) { +func (c *daemonSets) List(opts meta_v1.ListOptions) (result *v1beta1.DaemonSetList, err error) { result = &v1beta1.DaemonSetList{} err = c.client.Get(). Namespace(c.ns). @@ -148,7 +149,7 @@ func (c *daemonSets) List(opts v1.ListOptions) (result *v1beta1.DaemonSetList, e } // Watch returns a watch.Interface that watches the requested daemonSets. -func (c *daemonSets) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *daemonSets) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -158,7 +159,7 @@ func (c *daemonSets) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched daemonSet. -func (c *daemonSets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.DaemonSet, err error) { +func (c *daemonSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.DaemonSet, err error) { result = &v1beta1.DaemonSet{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/deployment.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/deployment.go index ee3f3474..48ea1acd 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/deployment.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/deployment.go @@ -18,6 +18,7 @@ package v1beta1 import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" @@ -37,11 +38,11 @@ type DeploymentInterface interface { Update(*v1beta1.Deployment) (*v1beta1.Deployment, error) UpdateStatus(*v1beta1.Deployment) (*v1beta1.Deployment, error) Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error Get(name string, options meta_v1.GetOptions) (*v1beta1.Deployment, error) - List(opts v1.ListOptions) (*v1beta1.DeploymentList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error) + List(opts meta_v1.ListOptions) (*v1beta1.DeploymentList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error) DeploymentExpansion } @@ -112,7 +113,7 @@ func (c *deployments) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *deployments) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *deployments) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("deployments"). @@ -136,7 +137,7 @@ func (c *deployments) Get(name string, options meta_v1.GetOptions) (result *v1be } // List takes label and field selectors, and returns the list of Deployments that match those selectors. -func (c *deployments) List(opts v1.ListOptions) (result *v1beta1.DeploymentList, err error) { +func (c *deployments) List(opts meta_v1.ListOptions) (result *v1beta1.DeploymentList, err error) { result = &v1beta1.DeploymentList{} err = c.client.Get(). Namespace(c.ns). @@ -148,7 +149,7 @@ func (c *deployments) List(opts v1.ListOptions) (result *v1beta1.DeploymentList, } // Watch returns a watch.Interface that watches the requested deployments. -func (c *deployments) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *deployments) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -158,7 +159,7 @@ func (c *deployments) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched deployment. -func (c *deployments) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error) { +func (c *deployments) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error) { result = &v1beta1.Deployment{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/doc.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/doc.go index e596bf01..0e58290b 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/doc.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1] +// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1] // This package has the automatically generated typed clients. package v1beta1 diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/doc.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/doc.go index ea928c21..c4753e08 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/doc.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1] +// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1] // Package fake has the automatically generated clients. package fake diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_daemonset.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_daemonset.go index 4c048e85..741c2fb9 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_daemonset.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_daemonset.go @@ -20,8 +20,8 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" v1beta1 "k8s.io/client-go/pkg/apis/extensions/v1beta1" testing "k8s.io/client-go/testing" @@ -72,7 +72,7 @@ func (c *FakeDaemonSets) Delete(name string, options *v1.DeleteOptions) error { return err } -func (c *FakeDaemonSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *FakeDaemonSets) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { action := testing.NewDeleteCollectionAction(daemonsetsResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &v1beta1.DaemonSetList{}) @@ -89,7 +89,7 @@ func (c *FakeDaemonSets) Get(name string, options meta_v1.GetOptions) (result *v return obj.(*v1beta1.DaemonSet), err } -func (c *FakeDaemonSets) List(opts v1.ListOptions) (result *v1beta1.DaemonSetList, err error) { +func (c *FakeDaemonSets) List(opts meta_v1.ListOptions) (result *v1beta1.DaemonSetList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(daemonsetsResource, c.ns, opts), &v1beta1.DaemonSetList{}) @@ -111,14 +111,14 @@ func (c *FakeDaemonSets) List(opts v1.ListOptions) (result *v1beta1.DaemonSetLis } // Watch returns a watch.Interface that watches the requested daemonSets. -func (c *FakeDaemonSets) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeDaemonSets) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(daemonsetsResource, c.ns, opts)) } // Patch applies the patch and returns the patched daemonSet. -func (c *FakeDaemonSets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.DaemonSet, err error) { +func (c *FakeDaemonSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.DaemonSet, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(daemonsetsResource, c.ns, name, data, subresources...), &v1beta1.DaemonSet{}) diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_deployment.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_deployment.go index c93dc73a..77fa8d14 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_deployment.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_deployment.go @@ -20,8 +20,8 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" v1beta1 "k8s.io/client-go/pkg/apis/extensions/v1beta1" testing "k8s.io/client-go/testing" @@ -72,7 +72,7 @@ func (c *FakeDeployments) Delete(name string, options *v1.DeleteOptions) error { return err } -func (c *FakeDeployments) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *FakeDeployments) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { action := testing.NewDeleteCollectionAction(deploymentsResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &v1beta1.DeploymentList{}) @@ -89,7 +89,7 @@ func (c *FakeDeployments) Get(name string, options meta_v1.GetOptions) (result * return obj.(*v1beta1.Deployment), err } -func (c *FakeDeployments) List(opts v1.ListOptions) (result *v1beta1.DeploymentList, err error) { +func (c *FakeDeployments) List(opts meta_v1.ListOptions) (result *v1beta1.DeploymentList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(deploymentsResource, c.ns, opts), &v1beta1.DeploymentList{}) @@ -111,14 +111,14 @@ func (c *FakeDeployments) List(opts v1.ListOptions) (result *v1beta1.DeploymentL } // Watch returns a watch.Interface that watches the requested deployments. -func (c *FakeDeployments) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeDeployments) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(deploymentsResource, c.ns, opts)) } // Patch applies the patch and returns the patched deployment. -func (c *FakeDeployments) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error) { +func (c *FakeDeployments) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Deployment, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(deploymentsResource, c.ns, name, data, subresources...), &v1beta1.Deployment{}) diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_ingress.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_ingress.go index 59843853..7722e698 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_ingress.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_ingress.go @@ -20,8 +20,8 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" v1beta1 "k8s.io/client-go/pkg/apis/extensions/v1beta1" testing "k8s.io/client-go/testing" @@ -72,7 +72,7 @@ func (c *FakeIngresses) Delete(name string, options *v1.DeleteOptions) error { return err } -func (c *FakeIngresses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *FakeIngresses) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { action := testing.NewDeleteCollectionAction(ingressesResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &v1beta1.IngressList{}) @@ -89,7 +89,7 @@ func (c *FakeIngresses) Get(name string, options meta_v1.GetOptions) (result *v1 return obj.(*v1beta1.Ingress), err } -func (c *FakeIngresses) List(opts v1.ListOptions) (result *v1beta1.IngressList, err error) { +func (c *FakeIngresses) List(opts meta_v1.ListOptions) (result *v1beta1.IngressList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(ingressesResource, c.ns, opts), &v1beta1.IngressList{}) @@ -111,14 +111,14 @@ func (c *FakeIngresses) List(opts v1.ListOptions) (result *v1beta1.IngressList, } // Watch returns a watch.Interface that watches the requested ingresses. -func (c *FakeIngresses) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeIngresses) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(ingressesResource, c.ns, opts)) } // Patch applies the patch and returns the patched ingress. -func (c *FakeIngresses) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.Ingress, err error) { +func (c *FakeIngresses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Ingress, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(ingressesResource, c.ns, name, data, subresources...), &v1beta1.Ingress{}) diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_podsecuritypolicy.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_podsecuritypolicy.go index 1143585f..d64c6440 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_podsecuritypolicy.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_podsecuritypolicy.go @@ -20,8 +20,8 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" v1beta1 "k8s.io/client-go/pkg/apis/extensions/v1beta1" testing "k8s.io/client-go/testing" @@ -58,7 +58,7 @@ func (c *FakePodSecurityPolicies) Delete(name string, options *v1.DeleteOptions) return err } -func (c *FakePodSecurityPolicies) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *FakePodSecurityPolicies) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { action := testing.NewRootDeleteCollectionAction(podsecuritypoliciesResource, listOptions) _, err := c.Fake.Invokes(action, &v1beta1.PodSecurityPolicyList{}) @@ -74,7 +74,7 @@ func (c *FakePodSecurityPolicies) Get(name string, options meta_v1.GetOptions) ( return obj.(*v1beta1.PodSecurityPolicy), err } -func (c *FakePodSecurityPolicies) List(opts v1.ListOptions) (result *v1beta1.PodSecurityPolicyList, err error) { +func (c *FakePodSecurityPolicies) List(opts meta_v1.ListOptions) (result *v1beta1.PodSecurityPolicyList, err error) { obj, err := c.Fake. Invokes(testing.NewRootListAction(podsecuritypoliciesResource, opts), &v1beta1.PodSecurityPolicyList{}) if obj == nil { @@ -95,13 +95,13 @@ func (c *FakePodSecurityPolicies) List(opts v1.ListOptions) (result *v1beta1.Pod } // Watch returns a watch.Interface that watches the requested podSecurityPolicies. -func (c *FakePodSecurityPolicies) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakePodSecurityPolicies) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(podsecuritypoliciesResource, opts)) } // Patch applies the patch and returns the patched podSecurityPolicy. -func (c *FakePodSecurityPolicies) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.PodSecurityPolicy, err error) { +func (c *FakePodSecurityPolicies) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.PodSecurityPolicy, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(podsecuritypoliciesResource, name, data, subresources...), &v1beta1.PodSecurityPolicy{}) if obj == nil { diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_replicaset.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_replicaset.go index 82c9e72a..7fbd1715 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_replicaset.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_replicaset.go @@ -20,8 +20,8 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" v1beta1 "k8s.io/client-go/pkg/apis/extensions/v1beta1" testing "k8s.io/client-go/testing" @@ -72,7 +72,7 @@ func (c *FakeReplicaSets) Delete(name string, options *v1.DeleteOptions) error { return err } -func (c *FakeReplicaSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *FakeReplicaSets) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { action := testing.NewDeleteCollectionAction(replicasetsResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &v1beta1.ReplicaSetList{}) @@ -89,7 +89,7 @@ func (c *FakeReplicaSets) Get(name string, options meta_v1.GetOptions) (result * return obj.(*v1beta1.ReplicaSet), err } -func (c *FakeReplicaSets) List(opts v1.ListOptions) (result *v1beta1.ReplicaSetList, err error) { +func (c *FakeReplicaSets) List(opts meta_v1.ListOptions) (result *v1beta1.ReplicaSetList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(replicasetsResource, c.ns, opts), &v1beta1.ReplicaSetList{}) @@ -111,14 +111,14 @@ func (c *FakeReplicaSets) List(opts v1.ListOptions) (result *v1beta1.ReplicaSetL } // Watch returns a watch.Interface that watches the requested replicaSets. -func (c *FakeReplicaSets) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeReplicaSets) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(replicasetsResource, c.ns, opts)) } // Patch applies the patch and returns the patched replicaSet. -func (c *FakeReplicaSets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.ReplicaSet, err error) { +func (c *FakeReplicaSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ReplicaSet, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(replicasetsResource, c.ns, name, data, subresources...), &v1beta1.ReplicaSet{}) diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_thirdpartyresource.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_thirdpartyresource.go index e3e7ace1..43842eb5 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_thirdpartyresource.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_thirdpartyresource.go @@ -20,8 +20,8 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" v1beta1 "k8s.io/client-go/pkg/apis/extensions/v1beta1" testing "k8s.io/client-go/testing" @@ -58,7 +58,7 @@ func (c *FakeThirdPartyResources) Delete(name string, options *v1.DeleteOptions) return err } -func (c *FakeThirdPartyResources) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *FakeThirdPartyResources) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { action := testing.NewRootDeleteCollectionAction(thirdpartyresourcesResource, listOptions) _, err := c.Fake.Invokes(action, &v1beta1.ThirdPartyResourceList{}) @@ -74,7 +74,7 @@ func (c *FakeThirdPartyResources) Get(name string, options meta_v1.GetOptions) ( return obj.(*v1beta1.ThirdPartyResource), err } -func (c *FakeThirdPartyResources) List(opts v1.ListOptions) (result *v1beta1.ThirdPartyResourceList, err error) { +func (c *FakeThirdPartyResources) List(opts meta_v1.ListOptions) (result *v1beta1.ThirdPartyResourceList, err error) { obj, err := c.Fake. Invokes(testing.NewRootListAction(thirdpartyresourcesResource, opts), &v1beta1.ThirdPartyResourceList{}) if obj == nil { @@ -95,13 +95,13 @@ func (c *FakeThirdPartyResources) List(opts v1.ListOptions) (result *v1beta1.Thi } // Watch returns a watch.Interface that watches the requested thirdPartyResources. -func (c *FakeThirdPartyResources) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeThirdPartyResources) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(thirdpartyresourcesResource, opts)) } // Patch applies the patch and returns the patched thirdPartyResource. -func (c *FakeThirdPartyResources) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.ThirdPartyResource, err error) { +func (c *FakeThirdPartyResources) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ThirdPartyResource, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(thirdpartyresourcesResource, name, data, subresources...), &v1beta1.ThirdPartyResource{}) if obj == nil { diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/ingress.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/ingress.go index e60e2b56..6e4c42ee 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/ingress.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/ingress.go @@ -18,6 +18,7 @@ package v1beta1 import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" @@ -37,11 +38,11 @@ type IngressInterface interface { Update(*v1beta1.Ingress) (*v1beta1.Ingress, error) UpdateStatus(*v1beta1.Ingress) (*v1beta1.Ingress, error) Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error Get(name string, options meta_v1.GetOptions) (*v1beta1.Ingress, error) - List(opts v1.ListOptions) (*v1beta1.IngressList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.Ingress, err error) + List(opts meta_v1.ListOptions) (*v1beta1.IngressList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Ingress, err error) IngressExpansion } @@ -112,7 +113,7 @@ func (c *ingresses) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *ingresses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *ingresses) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("ingresses"). @@ -136,7 +137,7 @@ func (c *ingresses) Get(name string, options meta_v1.GetOptions) (result *v1beta } // List takes label and field selectors, and returns the list of Ingresses that match those selectors. -func (c *ingresses) List(opts v1.ListOptions) (result *v1beta1.IngressList, err error) { +func (c *ingresses) List(opts meta_v1.ListOptions) (result *v1beta1.IngressList, err error) { result = &v1beta1.IngressList{} err = c.client.Get(). Namespace(c.ns). @@ -148,7 +149,7 @@ func (c *ingresses) List(opts v1.ListOptions) (result *v1beta1.IngressList, err } // Watch returns a watch.Interface that watches the requested ingresses. -func (c *ingresses) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *ingresses) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -158,7 +159,7 @@ func (c *ingresses) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched ingress. -func (c *ingresses) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.Ingress, err error) { +func (c *ingresses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Ingress, err error) { result = &v1beta1.Ingress{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/podsecuritypolicy.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/podsecuritypolicy.go index 2fcb1497..c839dad4 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/podsecuritypolicy.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/podsecuritypolicy.go @@ -18,6 +18,7 @@ package v1beta1 import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" @@ -36,11 +37,11 @@ type PodSecurityPolicyInterface interface { Create(*v1beta1.PodSecurityPolicy) (*v1beta1.PodSecurityPolicy, error) Update(*v1beta1.PodSecurityPolicy) (*v1beta1.PodSecurityPolicy, error) Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error Get(name string, options meta_v1.GetOptions) (*v1beta1.PodSecurityPolicy, error) - List(opts v1.ListOptions) (*v1beta1.PodSecurityPolicyList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.PodSecurityPolicy, err error) + List(opts meta_v1.ListOptions) (*v1beta1.PodSecurityPolicyList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.PodSecurityPolicy, err error) PodSecurityPolicyExpansion } @@ -90,7 +91,7 @@ func (c *podSecurityPolicies) Delete(name string, options *v1.DeleteOptions) err } // DeleteCollection deletes a collection of objects. -func (c *podSecurityPolicies) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *podSecurityPolicies) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Resource("podsecuritypolicies"). VersionedParams(&listOptions, api.ParameterCodec). @@ -112,7 +113,7 @@ func (c *podSecurityPolicies) Get(name string, options meta_v1.GetOptions) (resu } // List takes label and field selectors, and returns the list of PodSecurityPolicies that match those selectors. -func (c *podSecurityPolicies) List(opts v1.ListOptions) (result *v1beta1.PodSecurityPolicyList, err error) { +func (c *podSecurityPolicies) List(opts meta_v1.ListOptions) (result *v1beta1.PodSecurityPolicyList, err error) { result = &v1beta1.PodSecurityPolicyList{} err = c.client.Get(). Resource("podsecuritypolicies"). @@ -123,7 +124,7 @@ func (c *podSecurityPolicies) List(opts v1.ListOptions) (result *v1beta1.PodSecu } // Watch returns a watch.Interface that watches the requested podSecurityPolicies. -func (c *podSecurityPolicies) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *podSecurityPolicies) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Resource("podsecuritypolicies"). @@ -132,7 +133,7 @@ func (c *podSecurityPolicies) Watch(opts v1.ListOptions) (watch.Interface, error } // Patch applies the patch and returns the patched podSecurityPolicy. -func (c *podSecurityPolicies) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.PodSecurityPolicy, err error) { +func (c *podSecurityPolicies) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.PodSecurityPolicy, err error) { result = &v1beta1.PodSecurityPolicy{} err = c.client.Patch(pt). Resource("podsecuritypolicies"). diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/replicaset.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/replicaset.go index 99ad92b6..84463c92 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/replicaset.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/replicaset.go @@ -18,6 +18,7 @@ package v1beta1 import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" @@ -37,11 +38,11 @@ type ReplicaSetInterface interface { Update(*v1beta1.ReplicaSet) (*v1beta1.ReplicaSet, error) UpdateStatus(*v1beta1.ReplicaSet) (*v1beta1.ReplicaSet, error) Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error Get(name string, options meta_v1.GetOptions) (*v1beta1.ReplicaSet, error) - List(opts v1.ListOptions) (*v1beta1.ReplicaSetList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.ReplicaSet, err error) + List(opts meta_v1.ListOptions) (*v1beta1.ReplicaSetList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ReplicaSet, err error) ReplicaSetExpansion } @@ -112,7 +113,7 @@ func (c *replicaSets) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *replicaSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *replicaSets) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("replicasets"). @@ -136,7 +137,7 @@ func (c *replicaSets) Get(name string, options meta_v1.GetOptions) (result *v1be } // List takes label and field selectors, and returns the list of ReplicaSets that match those selectors. -func (c *replicaSets) List(opts v1.ListOptions) (result *v1beta1.ReplicaSetList, err error) { +func (c *replicaSets) List(opts meta_v1.ListOptions) (result *v1beta1.ReplicaSetList, err error) { result = &v1beta1.ReplicaSetList{} err = c.client.Get(). Namespace(c.ns). @@ -148,7 +149,7 @@ func (c *replicaSets) List(opts v1.ListOptions) (result *v1beta1.ReplicaSetList, } // Watch returns a watch.Interface that watches the requested replicaSets. -func (c *replicaSets) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *replicaSets) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -158,7 +159,7 @@ func (c *replicaSets) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched replicaSet. -func (c *replicaSets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.ReplicaSet, err error) { +func (c *replicaSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ReplicaSet, err error) { result = &v1beta1.ReplicaSet{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/thirdpartyresource.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/thirdpartyresource.go index 9fd61d8f..e8378d35 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/thirdpartyresource.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/thirdpartyresource.go @@ -18,6 +18,7 @@ package v1beta1 import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" @@ -36,11 +37,11 @@ type ThirdPartyResourceInterface interface { Create(*v1beta1.ThirdPartyResource) (*v1beta1.ThirdPartyResource, error) Update(*v1beta1.ThirdPartyResource) (*v1beta1.ThirdPartyResource, error) Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error Get(name string, options meta_v1.GetOptions) (*v1beta1.ThirdPartyResource, error) - List(opts v1.ListOptions) (*v1beta1.ThirdPartyResourceList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.ThirdPartyResource, err error) + List(opts meta_v1.ListOptions) (*v1beta1.ThirdPartyResourceList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ThirdPartyResource, err error) ThirdPartyResourceExpansion } @@ -90,7 +91,7 @@ func (c *thirdPartyResources) Delete(name string, options *v1.DeleteOptions) err } // DeleteCollection deletes a collection of objects. -func (c *thirdPartyResources) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *thirdPartyResources) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Resource("thirdpartyresources"). VersionedParams(&listOptions, api.ParameterCodec). @@ -112,7 +113,7 @@ func (c *thirdPartyResources) Get(name string, options meta_v1.GetOptions) (resu } // List takes label and field selectors, and returns the list of ThirdPartyResources that match those selectors. -func (c *thirdPartyResources) List(opts v1.ListOptions) (result *v1beta1.ThirdPartyResourceList, err error) { +func (c *thirdPartyResources) List(opts meta_v1.ListOptions) (result *v1beta1.ThirdPartyResourceList, err error) { result = &v1beta1.ThirdPartyResourceList{} err = c.client.Get(). Resource("thirdpartyresources"). @@ -123,7 +124,7 @@ func (c *thirdPartyResources) List(opts v1.ListOptions) (result *v1beta1.ThirdPa } // Watch returns a watch.Interface that watches the requested thirdPartyResources. -func (c *thirdPartyResources) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *thirdPartyResources) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Resource("thirdpartyresources"). @@ -132,7 +133,7 @@ func (c *thirdPartyResources) Watch(opts v1.ListOptions) (watch.Interface, error } // Patch applies the patch and returns the patched thirdPartyResource. -func (c *thirdPartyResources) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.ThirdPartyResource, err error) { +func (c *thirdPartyResources) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ThirdPartyResource, err error) { result = &v1beta1.ThirdPartyResource{} err = c.client.Patch(pt). Resource("thirdpartyresources"). diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1alpha1/fake/fake_poddisruptionbudget.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1alpha1/fake/fake_poddisruptionbudget.go deleted file mode 100644 index f5be449c..00000000 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1alpha1/fake/fake_poddisruptionbudget.go +++ /dev/null @@ -1,128 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package fake - -import ( - labels "k8s.io/apimachinery/pkg/labels" - "k8s.io/apimachinery/pkg/runtime/schema" - watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/client-go/pkg/api" - v1 "k8s.io/client-go/pkg/api/v1" - v1alpha1 "k8s.io/client-go/pkg/apis/policy/v1alpha1" - testing "k8s.io/client-go/testing" -) - -// FakePodDisruptionBudgets implements PodDisruptionBudgetInterface -type FakePodDisruptionBudgets struct { - Fake *FakePolicyV1alpha1 - ns string -} - -var poddisruptionbudgetsResource = schema.GroupVersionResource{Group: "policy", Version: "v1alpha1", Resource: "poddisruptionbudgets"} - -func (c *FakePodDisruptionBudgets) Create(podDisruptionBudget *v1alpha1.PodDisruptionBudget) (result *v1alpha1.PodDisruptionBudget, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(poddisruptionbudgetsResource, c.ns, podDisruptionBudget), &v1alpha1.PodDisruptionBudget{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.PodDisruptionBudget), err -} - -func (c *FakePodDisruptionBudgets) Update(podDisruptionBudget *v1alpha1.PodDisruptionBudget) (result *v1alpha1.PodDisruptionBudget, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(poddisruptionbudgetsResource, c.ns, podDisruptionBudget), &v1alpha1.PodDisruptionBudget{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.PodDisruptionBudget), err -} - -func (c *FakePodDisruptionBudgets) UpdateStatus(podDisruptionBudget *v1alpha1.PodDisruptionBudget) (*v1alpha1.PodDisruptionBudget, error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(poddisruptionbudgetsResource, "status", c.ns, podDisruptionBudget), &v1alpha1.PodDisruptionBudget{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.PodDisruptionBudget), err -} - -func (c *FakePodDisruptionBudgets) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteAction(poddisruptionbudgetsResource, c.ns, name), &v1alpha1.PodDisruptionBudget{}) - - return err -} - -func (c *FakePodDisruptionBudgets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(poddisruptionbudgetsResource, c.ns, listOptions) - - _, err := c.Fake.Invokes(action, &v1alpha1.PodDisruptionBudgetList{}) - return err -} - -func (c *FakePodDisruptionBudgets) Get(name string) (result *v1alpha1.PodDisruptionBudget, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(poddisruptionbudgetsResource, c.ns, name), &v1alpha1.PodDisruptionBudget{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.PodDisruptionBudget), err -} - -func (c *FakePodDisruptionBudgets) List(opts v1.ListOptions) (result *v1alpha1.PodDisruptionBudgetList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(poddisruptionbudgetsResource, c.ns, opts), &v1alpha1.PodDisruptionBudgetList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1alpha1.PodDisruptionBudgetList{} - for _, item := range obj.(*v1alpha1.PodDisruptionBudgetList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested podDisruptionBudgets. -func (c *FakePodDisruptionBudgets) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(poddisruptionbudgetsResource, c.ns, opts)) - -} - -// Patch applies the patch and returns the patched podDisruptionBudget. -func (c *FakePodDisruptionBudgets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.PodDisruptionBudget, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(poddisruptionbudgetsResource, c.ns, name, data, subresources...), &v1alpha1.PodDisruptionBudget{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.PodDisruptionBudget), err -} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1alpha1/poddisruptionbudget.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1alpha1/poddisruptionbudget.go deleted file mode 100644 index 883d715f..00000000 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1alpha1/poddisruptionbudget.go +++ /dev/null @@ -1,167 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1 - -import ( - watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/client-go/pkg/api" - v1 "k8s.io/client-go/pkg/api/v1" - v1alpha1 "k8s.io/client-go/pkg/apis/policy/v1alpha1" - rest "k8s.io/client-go/rest" -) - -// PodDisruptionBudgetsGetter has a method to return a PodDisruptionBudgetInterface. -// A group's client should implement this interface. -type PodDisruptionBudgetsGetter interface { - PodDisruptionBudgets(namespace string) PodDisruptionBudgetInterface -} - -// PodDisruptionBudgetInterface has methods to work with PodDisruptionBudget resources. -type PodDisruptionBudgetInterface interface { - Create(*v1alpha1.PodDisruptionBudget) (*v1alpha1.PodDisruptionBudget, error) - Update(*v1alpha1.PodDisruptionBudget) (*v1alpha1.PodDisruptionBudget, error) - UpdateStatus(*v1alpha1.PodDisruptionBudget) (*v1alpha1.PodDisruptionBudget, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string) (*v1alpha1.PodDisruptionBudget, error) - List(opts v1.ListOptions) (*v1alpha1.PodDisruptionBudgetList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.PodDisruptionBudget, err error) - PodDisruptionBudgetExpansion -} - -// podDisruptionBudgets implements PodDisruptionBudgetInterface -type podDisruptionBudgets struct { - client rest.Interface - ns string -} - -// newPodDisruptionBudgets returns a PodDisruptionBudgets -func newPodDisruptionBudgets(c *PolicyV1alpha1Client, namespace string) *podDisruptionBudgets { - return &podDisruptionBudgets{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Create takes the representation of a podDisruptionBudget and creates it. Returns the server's representation of the podDisruptionBudget, and an error, if there is any. -func (c *podDisruptionBudgets) Create(podDisruptionBudget *v1alpha1.PodDisruptionBudget) (result *v1alpha1.PodDisruptionBudget, err error) { - result = &v1alpha1.PodDisruptionBudget{} - err = c.client.Post(). - Namespace(c.ns). - Resource("poddisruptionbudgets"). - Body(podDisruptionBudget). - Do(). - Into(result) - return -} - -// Update takes the representation of a podDisruptionBudget and updates it. Returns the server's representation of the podDisruptionBudget, and an error, if there is any. -func (c *podDisruptionBudgets) Update(podDisruptionBudget *v1alpha1.PodDisruptionBudget) (result *v1alpha1.PodDisruptionBudget, err error) { - result = &v1alpha1.PodDisruptionBudget{} - err = c.client.Put(). - Namespace(c.ns). - Resource("poddisruptionbudgets"). - Name(podDisruptionBudget.Name). - Body(podDisruptionBudget). - Do(). - Into(result) - return -} - -func (c *podDisruptionBudgets) UpdateStatus(podDisruptionBudget *v1alpha1.PodDisruptionBudget) (result *v1alpha1.PodDisruptionBudget, err error) { - result = &v1alpha1.PodDisruptionBudget{} - err = c.client.Put(). - Namespace(c.ns). - Resource("poddisruptionbudgets"). - Name(podDisruptionBudget.Name). - SubResource("status"). - Body(podDisruptionBudget). - Do(). - Into(result) - return -} - -// Delete takes name of the podDisruptionBudget and deletes it. Returns an error if one occurs. -func (c *podDisruptionBudgets) Delete(name string, options *v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("poddisruptionbudgets"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *podDisruptionBudgets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("poddisruptionbudgets"). - VersionedParams(&listOptions, api.ParameterCodec). - Body(options). - Do(). - Error() -} - -// Get takes name of the podDisruptionBudget, and returns the corresponding podDisruptionBudget object, and an error if there is any. -func (c *podDisruptionBudgets) Get(name string) (result *v1alpha1.PodDisruptionBudget, err error) { - result = &v1alpha1.PodDisruptionBudget{} - err = c.client.Get(). - Namespace(c.ns). - Resource("poddisruptionbudgets"). - Name(name). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of PodDisruptionBudgets that match those selectors. -func (c *podDisruptionBudgets) List(opts v1.ListOptions) (result *v1alpha1.PodDisruptionBudgetList, err error) { - result = &v1alpha1.PodDisruptionBudgetList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("poddisruptionbudgets"). - VersionedParams(&opts, api.ParameterCodec). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested podDisruptionBudgets. -func (c *podDisruptionBudgets) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.client.Get(). - Prefix("watch"). - Namespace(c.ns). - Resource("poddisruptionbudgets"). - VersionedParams(&opts, api.ParameterCodec). - Watch() -} - -// Patch applies the patch and returns the patched podDisruptionBudget. -func (c *podDisruptionBudgets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.PodDisruptionBudget, err error) { - result = &v1alpha1.PodDisruptionBudget{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("poddisruptionbudgets"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1/doc.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1/doc.go index e596bf01..0e58290b 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1/doc.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1] +// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1] // This package has the automatically generated typed clients. package v1beta1 diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/doc.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/doc.go index ea928c21..c4753e08 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/doc.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1] +// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1] // Package fake has the automatically generated clients. package fake diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_poddisruptionbudget.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_poddisruptionbudget.go index ca878633..9e5a57ca 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_poddisruptionbudget.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_poddisruptionbudget.go @@ -20,8 +20,8 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" v1beta1 "k8s.io/client-go/pkg/apis/policy/v1beta1" testing "k8s.io/client-go/testing" @@ -72,7 +72,7 @@ func (c *FakePodDisruptionBudgets) Delete(name string, options *v1.DeleteOptions return err } -func (c *FakePodDisruptionBudgets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *FakePodDisruptionBudgets) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { action := testing.NewDeleteCollectionAction(poddisruptionbudgetsResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &v1beta1.PodDisruptionBudgetList{}) @@ -89,7 +89,7 @@ func (c *FakePodDisruptionBudgets) Get(name string, options meta_v1.GetOptions) return obj.(*v1beta1.PodDisruptionBudget), err } -func (c *FakePodDisruptionBudgets) List(opts v1.ListOptions) (result *v1beta1.PodDisruptionBudgetList, err error) { +func (c *FakePodDisruptionBudgets) List(opts meta_v1.ListOptions) (result *v1beta1.PodDisruptionBudgetList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(poddisruptionbudgetsResource, c.ns, opts), &v1beta1.PodDisruptionBudgetList{}) @@ -111,14 +111,14 @@ func (c *FakePodDisruptionBudgets) List(opts v1.ListOptions) (result *v1beta1.Po } // Watch returns a watch.Interface that watches the requested podDisruptionBudgets. -func (c *FakePodDisruptionBudgets) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakePodDisruptionBudgets) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(poddisruptionbudgetsResource, c.ns, opts)) } // Patch applies the patch and returns the patched podDisruptionBudget. -func (c *FakePodDisruptionBudgets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.PodDisruptionBudget, err error) { +func (c *FakePodDisruptionBudgets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.PodDisruptionBudget, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(poddisruptionbudgetsResource, c.ns, name, data, subresources...), &v1beta1.PodDisruptionBudget{}) diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1/poddisruptionbudget.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1/poddisruptionbudget.go index 8232ba30..36bdce6d 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1/poddisruptionbudget.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1/poddisruptionbudget.go @@ -18,6 +18,7 @@ package v1beta1 import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" @@ -37,11 +38,11 @@ type PodDisruptionBudgetInterface interface { Update(*v1beta1.PodDisruptionBudget) (*v1beta1.PodDisruptionBudget, error) UpdateStatus(*v1beta1.PodDisruptionBudget) (*v1beta1.PodDisruptionBudget, error) Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error Get(name string, options meta_v1.GetOptions) (*v1beta1.PodDisruptionBudget, error) - List(opts v1.ListOptions) (*v1beta1.PodDisruptionBudgetList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.PodDisruptionBudget, err error) + List(opts meta_v1.ListOptions) (*v1beta1.PodDisruptionBudgetList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.PodDisruptionBudget, err error) PodDisruptionBudgetExpansion } @@ -112,7 +113,7 @@ func (c *podDisruptionBudgets) Delete(name string, options *v1.DeleteOptions) er } // DeleteCollection deletes a collection of objects. -func (c *podDisruptionBudgets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *podDisruptionBudgets) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("poddisruptionbudgets"). @@ -136,7 +137,7 @@ func (c *podDisruptionBudgets) Get(name string, options meta_v1.GetOptions) (res } // List takes label and field selectors, and returns the list of PodDisruptionBudgets that match those selectors. -func (c *podDisruptionBudgets) List(opts v1.ListOptions) (result *v1beta1.PodDisruptionBudgetList, err error) { +func (c *podDisruptionBudgets) List(opts meta_v1.ListOptions) (result *v1beta1.PodDisruptionBudgetList, err error) { result = &v1beta1.PodDisruptionBudgetList{} err = c.client.Get(). Namespace(c.ns). @@ -148,7 +149,7 @@ func (c *podDisruptionBudgets) List(opts v1.ListOptions) (result *v1beta1.PodDis } // Watch returns a watch.Interface that watches the requested podDisruptionBudgets. -func (c *podDisruptionBudgets) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *podDisruptionBudgets) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -158,7 +159,7 @@ func (c *podDisruptionBudgets) Watch(opts v1.ListOptions) (watch.Interface, erro } // Patch applies the patch and returns the patched podDisruptionBudget. -func (c *podDisruptionBudgets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.PodDisruptionBudget, err error) { +func (c *podDisruptionBudgets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.PodDisruptionBudget, err error) { result = &v1beta1.PodDisruptionBudget{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrole.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrole.go index f9d4bc6f..1f7a61ca 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrole.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrole.go @@ -18,6 +18,7 @@ package v1alpha1 import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" @@ -36,11 +37,11 @@ type ClusterRoleInterface interface { Create(*v1alpha1.ClusterRole) (*v1alpha1.ClusterRole, error) Update(*v1alpha1.ClusterRole) (*v1alpha1.ClusterRole, error) Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error Get(name string, options meta_v1.GetOptions) (*v1alpha1.ClusterRole, error) - List(opts v1.ListOptions) (*v1alpha1.ClusterRoleList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterRole, err error) + List(opts meta_v1.ListOptions) (*v1alpha1.ClusterRoleList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterRole, err error) ClusterRoleExpansion } @@ -90,7 +91,7 @@ func (c *clusterRoles) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *clusterRoles) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *clusterRoles) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Resource("clusterroles"). VersionedParams(&listOptions, api.ParameterCodec). @@ -112,7 +113,7 @@ func (c *clusterRoles) Get(name string, options meta_v1.GetOptions) (result *v1a } // List takes label and field selectors, and returns the list of ClusterRoles that match those selectors. -func (c *clusterRoles) List(opts v1.ListOptions) (result *v1alpha1.ClusterRoleList, err error) { +func (c *clusterRoles) List(opts meta_v1.ListOptions) (result *v1alpha1.ClusterRoleList, err error) { result = &v1alpha1.ClusterRoleList{} err = c.client.Get(). Resource("clusterroles"). @@ -123,7 +124,7 @@ func (c *clusterRoles) List(opts v1.ListOptions) (result *v1alpha1.ClusterRoleLi } // Watch returns a watch.Interface that watches the requested clusterRoles. -func (c *clusterRoles) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *clusterRoles) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Resource("clusterroles"). @@ -132,7 +133,7 @@ func (c *clusterRoles) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched clusterRole. -func (c *clusterRoles) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterRole, err error) { +func (c *clusterRoles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterRole, err error) { result = &v1alpha1.ClusterRole{} err = c.client.Patch(pt). Resource("clusterroles"). diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrolebinding.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrolebinding.go index a42cafcc..b80fadd7 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrolebinding.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrolebinding.go @@ -18,6 +18,7 @@ package v1alpha1 import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" @@ -36,11 +37,11 @@ type ClusterRoleBindingInterface interface { Create(*v1alpha1.ClusterRoleBinding) (*v1alpha1.ClusterRoleBinding, error) Update(*v1alpha1.ClusterRoleBinding) (*v1alpha1.ClusterRoleBinding, error) Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error Get(name string, options meta_v1.GetOptions) (*v1alpha1.ClusterRoleBinding, error) - List(opts v1.ListOptions) (*v1alpha1.ClusterRoleBindingList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterRoleBinding, err error) + List(opts meta_v1.ListOptions) (*v1alpha1.ClusterRoleBindingList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterRoleBinding, err error) ClusterRoleBindingExpansion } @@ -90,7 +91,7 @@ func (c *clusterRoleBindings) Delete(name string, options *v1.DeleteOptions) err } // DeleteCollection deletes a collection of objects. -func (c *clusterRoleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *clusterRoleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Resource("clusterrolebindings"). VersionedParams(&listOptions, api.ParameterCodec). @@ -112,7 +113,7 @@ func (c *clusterRoleBindings) Get(name string, options meta_v1.GetOptions) (resu } // List takes label and field selectors, and returns the list of ClusterRoleBindings that match those selectors. -func (c *clusterRoleBindings) List(opts v1.ListOptions) (result *v1alpha1.ClusterRoleBindingList, err error) { +func (c *clusterRoleBindings) List(opts meta_v1.ListOptions) (result *v1alpha1.ClusterRoleBindingList, err error) { result = &v1alpha1.ClusterRoleBindingList{} err = c.client.Get(). Resource("clusterrolebindings"). @@ -123,7 +124,7 @@ func (c *clusterRoleBindings) List(opts v1.ListOptions) (result *v1alpha1.Cluste } // Watch returns a watch.Interface that watches the requested clusterRoleBindings. -func (c *clusterRoleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *clusterRoleBindings) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Resource("clusterrolebindings"). @@ -132,7 +133,7 @@ func (c *clusterRoleBindings) Watch(opts v1.ListOptions) (watch.Interface, error } // Patch applies the patch and returns the patched clusterRoleBinding. -func (c *clusterRoleBindings) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterRoleBinding, err error) { +func (c *clusterRoleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterRoleBinding, err error) { result = &v1alpha1.ClusterRoleBinding{} err = c.client.Patch(pt). Resource("clusterrolebindings"). diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/doc.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/doc.go index f7b1fe66..69d4d845 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/doc.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1] +// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1] // This package has the automatically generated typed clients. package v1alpha1 diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/doc.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/doc.go index ea928c21..c4753e08 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/doc.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1] +// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1] // Package fake has the automatically generated clients. package fake diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_clusterrole.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_clusterrole.go index 11fab803..4b3af7d3 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_clusterrole.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_clusterrole.go @@ -20,8 +20,8 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" v1alpha1 "k8s.io/client-go/pkg/apis/rbac/v1alpha1" testing "k8s.io/client-go/testing" @@ -58,7 +58,7 @@ func (c *FakeClusterRoles) Delete(name string, options *v1.DeleteOptions) error return err } -func (c *FakeClusterRoles) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *FakeClusterRoles) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { action := testing.NewRootDeleteCollectionAction(clusterrolesResource, listOptions) _, err := c.Fake.Invokes(action, &v1alpha1.ClusterRoleList{}) @@ -74,7 +74,7 @@ func (c *FakeClusterRoles) Get(name string, options meta_v1.GetOptions) (result return obj.(*v1alpha1.ClusterRole), err } -func (c *FakeClusterRoles) List(opts v1.ListOptions) (result *v1alpha1.ClusterRoleList, err error) { +func (c *FakeClusterRoles) List(opts meta_v1.ListOptions) (result *v1alpha1.ClusterRoleList, err error) { obj, err := c.Fake. Invokes(testing.NewRootListAction(clusterrolesResource, opts), &v1alpha1.ClusterRoleList{}) if obj == nil { @@ -95,13 +95,13 @@ func (c *FakeClusterRoles) List(opts v1.ListOptions) (result *v1alpha1.ClusterRo } // Watch returns a watch.Interface that watches the requested clusterRoles. -func (c *FakeClusterRoles) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeClusterRoles) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(clusterrolesResource, opts)) } // Patch applies the patch and returns the patched clusterRole. -func (c *FakeClusterRoles) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterRole, err error) { +func (c *FakeClusterRoles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterRole, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(clusterrolesResource, name, data, subresources...), &v1alpha1.ClusterRole{}) if obj == nil { diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_clusterrolebinding.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_clusterrolebinding.go index 08f719f6..96a93c9e 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_clusterrolebinding.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_clusterrolebinding.go @@ -20,8 +20,8 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" v1alpha1 "k8s.io/client-go/pkg/apis/rbac/v1alpha1" testing "k8s.io/client-go/testing" @@ -58,7 +58,7 @@ func (c *FakeClusterRoleBindings) Delete(name string, options *v1.DeleteOptions) return err } -func (c *FakeClusterRoleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *FakeClusterRoleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { action := testing.NewRootDeleteCollectionAction(clusterrolebindingsResource, listOptions) _, err := c.Fake.Invokes(action, &v1alpha1.ClusterRoleBindingList{}) @@ -74,7 +74,7 @@ func (c *FakeClusterRoleBindings) Get(name string, options meta_v1.GetOptions) ( return obj.(*v1alpha1.ClusterRoleBinding), err } -func (c *FakeClusterRoleBindings) List(opts v1.ListOptions) (result *v1alpha1.ClusterRoleBindingList, err error) { +func (c *FakeClusterRoleBindings) List(opts meta_v1.ListOptions) (result *v1alpha1.ClusterRoleBindingList, err error) { obj, err := c.Fake. Invokes(testing.NewRootListAction(clusterrolebindingsResource, opts), &v1alpha1.ClusterRoleBindingList{}) if obj == nil { @@ -95,13 +95,13 @@ func (c *FakeClusterRoleBindings) List(opts v1.ListOptions) (result *v1alpha1.Cl } // Watch returns a watch.Interface that watches the requested clusterRoleBindings. -func (c *FakeClusterRoleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeClusterRoleBindings) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(clusterrolebindingsResource, opts)) } // Patch applies the patch and returns the patched clusterRoleBinding. -func (c *FakeClusterRoleBindings) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterRoleBinding, err error) { +func (c *FakeClusterRoleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterRoleBinding, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(clusterrolebindingsResource, name, data, subresources...), &v1alpha1.ClusterRoleBinding{}) if obj == nil { diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_role.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_role.go index 0be64723..5c3df069 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_role.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_role.go @@ -20,8 +20,8 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" v1alpha1 "k8s.io/client-go/pkg/apis/rbac/v1alpha1" testing "k8s.io/client-go/testing" @@ -62,7 +62,7 @@ func (c *FakeRoles) Delete(name string, options *v1.DeleteOptions) error { return err } -func (c *FakeRoles) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *FakeRoles) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { action := testing.NewDeleteCollectionAction(rolesResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &v1alpha1.RoleList{}) @@ -79,7 +79,7 @@ func (c *FakeRoles) Get(name string, options meta_v1.GetOptions) (result *v1alph return obj.(*v1alpha1.Role), err } -func (c *FakeRoles) List(opts v1.ListOptions) (result *v1alpha1.RoleList, err error) { +func (c *FakeRoles) List(opts meta_v1.ListOptions) (result *v1alpha1.RoleList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(rolesResource, c.ns, opts), &v1alpha1.RoleList{}) @@ -101,14 +101,14 @@ func (c *FakeRoles) List(opts v1.ListOptions) (result *v1alpha1.RoleList, err er } // Watch returns a watch.Interface that watches the requested roles. -func (c *FakeRoles) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeRoles) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(rolesResource, c.ns, opts)) } // Patch applies the patch and returns the patched role. -func (c *FakeRoles) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.Role, err error) { +func (c *FakeRoles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Role, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(rolesResource, c.ns, name, data, subresources...), &v1alpha1.Role{}) diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_rolebinding.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_rolebinding.go index c7c32386..6e854d73 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_rolebinding.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_rolebinding.go @@ -20,8 +20,8 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" v1alpha1 "k8s.io/client-go/pkg/apis/rbac/v1alpha1" testing "k8s.io/client-go/testing" @@ -62,7 +62,7 @@ func (c *FakeRoleBindings) Delete(name string, options *v1.DeleteOptions) error return err } -func (c *FakeRoleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *FakeRoleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { action := testing.NewDeleteCollectionAction(rolebindingsResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &v1alpha1.RoleBindingList{}) @@ -79,7 +79,7 @@ func (c *FakeRoleBindings) Get(name string, options meta_v1.GetOptions) (result return obj.(*v1alpha1.RoleBinding), err } -func (c *FakeRoleBindings) List(opts v1.ListOptions) (result *v1alpha1.RoleBindingList, err error) { +func (c *FakeRoleBindings) List(opts meta_v1.ListOptions) (result *v1alpha1.RoleBindingList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(rolebindingsResource, c.ns, opts), &v1alpha1.RoleBindingList{}) @@ -101,14 +101,14 @@ func (c *FakeRoleBindings) List(opts v1.ListOptions) (result *v1alpha1.RoleBindi } // Watch returns a watch.Interface that watches the requested roleBindings. -func (c *FakeRoleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeRoleBindings) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(rolebindingsResource, c.ns, opts)) } // Patch applies the patch and returns the patched roleBinding. -func (c *FakeRoleBindings) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.RoleBinding, err error) { +func (c *FakeRoleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.RoleBinding, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(rolebindingsResource, c.ns, name, data, subresources...), &v1alpha1.RoleBinding{}) diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/role.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/role.go index 7ed5c195..ba2dbadc 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/role.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/role.go @@ -18,6 +18,7 @@ package v1alpha1 import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" @@ -36,11 +37,11 @@ type RoleInterface interface { Create(*v1alpha1.Role) (*v1alpha1.Role, error) Update(*v1alpha1.Role) (*v1alpha1.Role, error) Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error Get(name string, options meta_v1.GetOptions) (*v1alpha1.Role, error) - List(opts v1.ListOptions) (*v1alpha1.RoleList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.Role, err error) + List(opts meta_v1.ListOptions) (*v1alpha1.RoleList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Role, err error) RoleExpansion } @@ -95,7 +96,7 @@ func (c *roles) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *roles) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *roles) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("roles"). @@ -119,7 +120,7 @@ func (c *roles) Get(name string, options meta_v1.GetOptions) (result *v1alpha1.R } // List takes label and field selectors, and returns the list of Roles that match those selectors. -func (c *roles) List(opts v1.ListOptions) (result *v1alpha1.RoleList, err error) { +func (c *roles) List(opts meta_v1.ListOptions) (result *v1alpha1.RoleList, err error) { result = &v1alpha1.RoleList{} err = c.client.Get(). Namespace(c.ns). @@ -131,7 +132,7 @@ func (c *roles) List(opts v1.ListOptions) (result *v1alpha1.RoleList, err error) } // Watch returns a watch.Interface that watches the requested roles. -func (c *roles) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *roles) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -141,7 +142,7 @@ func (c *roles) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched role. -func (c *roles) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.Role, err error) { +func (c *roles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Role, err error) { result = &v1alpha1.Role{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/rolebinding.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/rolebinding.go index 519806fe..20fc4778 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/rolebinding.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/rolebinding.go @@ -18,6 +18,7 @@ package v1alpha1 import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" @@ -36,11 +37,11 @@ type RoleBindingInterface interface { Create(*v1alpha1.RoleBinding) (*v1alpha1.RoleBinding, error) Update(*v1alpha1.RoleBinding) (*v1alpha1.RoleBinding, error) Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error Get(name string, options meta_v1.GetOptions) (*v1alpha1.RoleBinding, error) - List(opts v1.ListOptions) (*v1alpha1.RoleBindingList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.RoleBinding, err error) + List(opts meta_v1.ListOptions) (*v1alpha1.RoleBindingList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.RoleBinding, err error) RoleBindingExpansion } @@ -95,7 +96,7 @@ func (c *roleBindings) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *roleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *roleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("rolebindings"). @@ -119,7 +120,7 @@ func (c *roleBindings) Get(name string, options meta_v1.GetOptions) (result *v1a } // List takes label and field selectors, and returns the list of RoleBindings that match those selectors. -func (c *roleBindings) List(opts v1.ListOptions) (result *v1alpha1.RoleBindingList, err error) { +func (c *roleBindings) List(opts meta_v1.ListOptions) (result *v1alpha1.RoleBindingList, err error) { result = &v1alpha1.RoleBindingList{} err = c.client.Get(). Namespace(c.ns). @@ -131,7 +132,7 @@ func (c *roleBindings) List(opts v1.ListOptions) (result *v1alpha1.RoleBindingLi } // Watch returns a watch.Interface that watches the requested roleBindings. -func (c *roleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *roleBindings) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Namespace(c.ns). @@ -141,7 +142,7 @@ func (c *roleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched roleBinding. -func (c *roleBindings) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.RoleBinding, err error) { +func (c *roleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.RoleBinding, err error) { result = &v1alpha1.RoleBinding{} err = c.client.Patch(pt). Namespace(c.ns). diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrole.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrole.go new file mode 100644 index 00000000..0f10a6ec --- /dev/null +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrole.go @@ -0,0 +1,146 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + api "k8s.io/client-go/pkg/api" + v1 "k8s.io/client-go/pkg/api/v1" + v1beta1 "k8s.io/client-go/pkg/apis/rbac/v1beta1" + rest "k8s.io/client-go/rest" +) + +// ClusterRolesGetter has a method to return a ClusterRoleInterface. +// A group's client should implement this interface. +type ClusterRolesGetter interface { + ClusterRoles() ClusterRoleInterface +} + +// ClusterRoleInterface has methods to work with ClusterRole resources. +type ClusterRoleInterface interface { + Create(*v1beta1.ClusterRole) (*v1beta1.ClusterRole, error) + Update(*v1beta1.ClusterRole) (*v1beta1.ClusterRole, error) + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error + Get(name string, options meta_v1.GetOptions) (*v1beta1.ClusterRole, error) + List(opts meta_v1.ListOptions) (*v1beta1.ClusterRoleList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ClusterRole, err error) + ClusterRoleExpansion +} + +// clusterRoles implements ClusterRoleInterface +type clusterRoles struct { + client rest.Interface +} + +// newClusterRoles returns a ClusterRoles +func newClusterRoles(c *RbacV1beta1Client) *clusterRoles { + return &clusterRoles{ + client: c.RESTClient(), + } +} + +// Create takes the representation of a clusterRole and creates it. Returns the server's representation of the clusterRole, and an error, if there is any. +func (c *clusterRoles) Create(clusterRole *v1beta1.ClusterRole) (result *v1beta1.ClusterRole, err error) { + result = &v1beta1.ClusterRole{} + err = c.client.Post(). + Resource("clusterroles"). + Body(clusterRole). + Do(). + Into(result) + return +} + +// Update takes the representation of a clusterRole and updates it. Returns the server's representation of the clusterRole, and an error, if there is any. +func (c *clusterRoles) Update(clusterRole *v1beta1.ClusterRole) (result *v1beta1.ClusterRole, err error) { + result = &v1beta1.ClusterRole{} + err = c.client.Put(). + Resource("clusterroles"). + Name(clusterRole.Name). + Body(clusterRole). + Do(). + Into(result) + return +} + +// Delete takes name of the clusterRole and deletes it. Returns an error if one occurs. +func (c *clusterRoles) Delete(name string, options *v1.DeleteOptions) error { + return c.client.Delete(). + Resource("clusterroles"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *clusterRoles) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { + return c.client.Delete(). + Resource("clusterroles"). + VersionedParams(&listOptions, api.ParameterCodec). + Body(options). + Do(). + Error() +} + +// Get takes name of the clusterRole, and returns the corresponding clusterRole object, and an error if there is any. +func (c *clusterRoles) Get(name string, options meta_v1.GetOptions) (result *v1beta1.ClusterRole, err error) { + result = &v1beta1.ClusterRole{} + err = c.client.Get(). + Resource("clusterroles"). + Name(name). + VersionedParams(&options, api.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of ClusterRoles that match those selectors. +func (c *clusterRoles) List(opts meta_v1.ListOptions) (result *v1beta1.ClusterRoleList, err error) { + result = &v1beta1.ClusterRoleList{} + err = c.client.Get(). + Resource("clusterroles"). + VersionedParams(&opts, api.ParameterCodec). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested clusterRoles. +func (c *clusterRoles) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { + return c.client.Get(). + Prefix("watch"). + Resource("clusterroles"). + VersionedParams(&opts, api.ParameterCodec). + Watch() +} + +// Patch applies the patch and returns the patched clusterRole. +func (c *clusterRoles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ClusterRole, err error) { + result = &v1beta1.ClusterRole{} + err = c.client.Patch(pt). + Resource("clusterroles"). + SubResource(subresources...). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrolebinding.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrolebinding.go new file mode 100644 index 00000000..f6d03d7d --- /dev/null +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrolebinding.go @@ -0,0 +1,146 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + api "k8s.io/client-go/pkg/api" + v1 "k8s.io/client-go/pkg/api/v1" + v1beta1 "k8s.io/client-go/pkg/apis/rbac/v1beta1" + rest "k8s.io/client-go/rest" +) + +// ClusterRoleBindingsGetter has a method to return a ClusterRoleBindingInterface. +// A group's client should implement this interface. +type ClusterRoleBindingsGetter interface { + ClusterRoleBindings() ClusterRoleBindingInterface +} + +// ClusterRoleBindingInterface has methods to work with ClusterRoleBinding resources. +type ClusterRoleBindingInterface interface { + Create(*v1beta1.ClusterRoleBinding) (*v1beta1.ClusterRoleBinding, error) + Update(*v1beta1.ClusterRoleBinding) (*v1beta1.ClusterRoleBinding, error) + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error + Get(name string, options meta_v1.GetOptions) (*v1beta1.ClusterRoleBinding, error) + List(opts meta_v1.ListOptions) (*v1beta1.ClusterRoleBindingList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ClusterRoleBinding, err error) + ClusterRoleBindingExpansion +} + +// clusterRoleBindings implements ClusterRoleBindingInterface +type clusterRoleBindings struct { + client rest.Interface +} + +// newClusterRoleBindings returns a ClusterRoleBindings +func newClusterRoleBindings(c *RbacV1beta1Client) *clusterRoleBindings { + return &clusterRoleBindings{ + client: c.RESTClient(), + } +} + +// Create takes the representation of a clusterRoleBinding and creates it. Returns the server's representation of the clusterRoleBinding, and an error, if there is any. +func (c *clusterRoleBindings) Create(clusterRoleBinding *v1beta1.ClusterRoleBinding) (result *v1beta1.ClusterRoleBinding, err error) { + result = &v1beta1.ClusterRoleBinding{} + err = c.client.Post(). + Resource("clusterrolebindings"). + Body(clusterRoleBinding). + Do(). + Into(result) + return +} + +// Update takes the representation of a clusterRoleBinding and updates it. Returns the server's representation of the clusterRoleBinding, and an error, if there is any. +func (c *clusterRoleBindings) Update(clusterRoleBinding *v1beta1.ClusterRoleBinding) (result *v1beta1.ClusterRoleBinding, err error) { + result = &v1beta1.ClusterRoleBinding{} + err = c.client.Put(). + Resource("clusterrolebindings"). + Name(clusterRoleBinding.Name). + Body(clusterRoleBinding). + Do(). + Into(result) + return +} + +// Delete takes name of the clusterRoleBinding and deletes it. Returns an error if one occurs. +func (c *clusterRoleBindings) Delete(name string, options *v1.DeleteOptions) error { + return c.client.Delete(). + Resource("clusterrolebindings"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *clusterRoleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { + return c.client.Delete(). + Resource("clusterrolebindings"). + VersionedParams(&listOptions, api.ParameterCodec). + Body(options). + Do(). + Error() +} + +// Get takes name of the clusterRoleBinding, and returns the corresponding clusterRoleBinding object, and an error if there is any. +func (c *clusterRoleBindings) Get(name string, options meta_v1.GetOptions) (result *v1beta1.ClusterRoleBinding, err error) { + result = &v1beta1.ClusterRoleBinding{} + err = c.client.Get(). + Resource("clusterrolebindings"). + Name(name). + VersionedParams(&options, api.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of ClusterRoleBindings that match those selectors. +func (c *clusterRoleBindings) List(opts meta_v1.ListOptions) (result *v1beta1.ClusterRoleBindingList, err error) { + result = &v1beta1.ClusterRoleBindingList{} + err = c.client.Get(). + Resource("clusterrolebindings"). + VersionedParams(&opts, api.ParameterCodec). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested clusterRoleBindings. +func (c *clusterRoleBindings) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { + return c.client.Get(). + Prefix("watch"). + Resource("clusterrolebindings"). + VersionedParams(&opts, api.ParameterCodec). + Watch() +} + +// Patch applies the patch and returns the patched clusterRoleBinding. +func (c *clusterRoleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ClusterRoleBinding, err error) { + result = &v1beta1.ClusterRoleBinding{} + err = c.client.Patch(pt). + Resource("clusterrolebindings"). + SubResource(subresources...). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/doc.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/doc.go new file mode 100644 index 00000000..0e58290b --- /dev/null +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1] + +// This package has the automatically generated typed clients. +package v1beta1 diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/doc.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/doc.go new file mode 100644 index 00000000..c4753e08 --- /dev/null +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1] + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_clusterrole.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_clusterrole.go new file mode 100644 index 00000000..de0a67c9 --- /dev/null +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_clusterrole.go @@ -0,0 +1,111 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package fake + +import ( + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + v1 "k8s.io/client-go/pkg/api/v1" + v1beta1 "k8s.io/client-go/pkg/apis/rbac/v1beta1" + testing "k8s.io/client-go/testing" +) + +// FakeClusterRoles implements ClusterRoleInterface +type FakeClusterRoles struct { + Fake *FakeRbacV1beta1 +} + +var clusterrolesResource = schema.GroupVersionResource{Group: "rbac.authorization.k8s.io", Version: "v1beta1", Resource: "clusterroles"} + +func (c *FakeClusterRoles) Create(clusterRole *v1beta1.ClusterRole) (result *v1beta1.ClusterRole, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(clusterrolesResource, clusterRole), &v1beta1.ClusterRole{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.ClusterRole), err +} + +func (c *FakeClusterRoles) Update(clusterRole *v1beta1.ClusterRole) (result *v1beta1.ClusterRole, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(clusterrolesResource, clusterRole), &v1beta1.ClusterRole{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.ClusterRole), err +} + +func (c *FakeClusterRoles) Delete(name string, options *v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteAction(clusterrolesResource, name), &v1beta1.ClusterRole{}) + return err +} + +func (c *FakeClusterRoles) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(clusterrolesResource, listOptions) + + _, err := c.Fake.Invokes(action, &v1beta1.ClusterRoleList{}) + return err +} + +func (c *FakeClusterRoles) Get(name string, options meta_v1.GetOptions) (result *v1beta1.ClusterRole, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(clusterrolesResource, name), &v1beta1.ClusterRole{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.ClusterRole), err +} + +func (c *FakeClusterRoles) List(opts meta_v1.ListOptions) (result *v1beta1.ClusterRoleList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(clusterrolesResource, opts), &v1beta1.ClusterRoleList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.ClusterRoleList{} + for _, item := range obj.(*v1beta1.ClusterRoleList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested clusterRoles. +func (c *FakeClusterRoles) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(clusterrolesResource, opts)) +} + +// Patch applies the patch and returns the patched clusterRole. +func (c *FakeClusterRoles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ClusterRole, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(clusterrolesResource, name, data, subresources...), &v1beta1.ClusterRole{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.ClusterRole), err +} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_clusterrolebinding.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_clusterrolebinding.go new file mode 100644 index 00000000..3ad5f479 --- /dev/null +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_clusterrolebinding.go @@ -0,0 +1,111 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package fake + +import ( + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + v1 "k8s.io/client-go/pkg/api/v1" + v1beta1 "k8s.io/client-go/pkg/apis/rbac/v1beta1" + testing "k8s.io/client-go/testing" +) + +// FakeClusterRoleBindings implements ClusterRoleBindingInterface +type FakeClusterRoleBindings struct { + Fake *FakeRbacV1beta1 +} + +var clusterrolebindingsResource = schema.GroupVersionResource{Group: "rbac.authorization.k8s.io", Version: "v1beta1", Resource: "clusterrolebindings"} + +func (c *FakeClusterRoleBindings) Create(clusterRoleBinding *v1beta1.ClusterRoleBinding) (result *v1beta1.ClusterRoleBinding, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(clusterrolebindingsResource, clusterRoleBinding), &v1beta1.ClusterRoleBinding{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.ClusterRoleBinding), err +} + +func (c *FakeClusterRoleBindings) Update(clusterRoleBinding *v1beta1.ClusterRoleBinding) (result *v1beta1.ClusterRoleBinding, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(clusterrolebindingsResource, clusterRoleBinding), &v1beta1.ClusterRoleBinding{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.ClusterRoleBinding), err +} + +func (c *FakeClusterRoleBindings) Delete(name string, options *v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteAction(clusterrolebindingsResource, name), &v1beta1.ClusterRoleBinding{}) + return err +} + +func (c *FakeClusterRoleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(clusterrolebindingsResource, listOptions) + + _, err := c.Fake.Invokes(action, &v1beta1.ClusterRoleBindingList{}) + return err +} + +func (c *FakeClusterRoleBindings) Get(name string, options meta_v1.GetOptions) (result *v1beta1.ClusterRoleBinding, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(clusterrolebindingsResource, name), &v1beta1.ClusterRoleBinding{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.ClusterRoleBinding), err +} + +func (c *FakeClusterRoleBindings) List(opts meta_v1.ListOptions) (result *v1beta1.ClusterRoleBindingList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(clusterrolebindingsResource, opts), &v1beta1.ClusterRoleBindingList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.ClusterRoleBindingList{} + for _, item := range obj.(*v1beta1.ClusterRoleBindingList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested clusterRoleBindings. +func (c *FakeClusterRoleBindings) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(clusterrolebindingsResource, opts)) +} + +// Patch applies the patch and returns the patched clusterRoleBinding. +func (c *FakeClusterRoleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ClusterRoleBinding, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(clusterrolebindingsResource, name, data, subresources...), &v1beta1.ClusterRoleBinding{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.ClusterRoleBinding), err +} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_rbac_client.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_rbac_client.go new file mode 100644 index 00000000..929d0352 --- /dev/null +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_rbac_client.go @@ -0,0 +1,50 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package fake + +import ( + v1beta1 "k8s.io/client-go/kubernetes/typed/rbac/v1beta1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeRbacV1beta1 struct { + *testing.Fake +} + +func (c *FakeRbacV1beta1) ClusterRoles() v1beta1.ClusterRoleInterface { + return &FakeClusterRoles{c} +} + +func (c *FakeRbacV1beta1) ClusterRoleBindings() v1beta1.ClusterRoleBindingInterface { + return &FakeClusterRoleBindings{c} +} + +func (c *FakeRbacV1beta1) Roles(namespace string) v1beta1.RoleInterface { + return &FakeRoles{c, namespace} +} + +func (c *FakeRbacV1beta1) RoleBindings(namespace string) v1beta1.RoleBindingInterface { + return &FakeRoleBindings{c, namespace} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeRbacV1beta1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_role.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_role.go new file mode 100644 index 00000000..b9581247 --- /dev/null +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_role.go @@ -0,0 +1,119 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package fake + +import ( + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + v1 "k8s.io/client-go/pkg/api/v1" + v1beta1 "k8s.io/client-go/pkg/apis/rbac/v1beta1" + testing "k8s.io/client-go/testing" +) + +// FakeRoles implements RoleInterface +type FakeRoles struct { + Fake *FakeRbacV1beta1 + ns string +} + +var rolesResource = schema.GroupVersionResource{Group: "rbac.authorization.k8s.io", Version: "v1beta1", Resource: "roles"} + +func (c *FakeRoles) Create(role *v1beta1.Role) (result *v1beta1.Role, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(rolesResource, c.ns, role), &v1beta1.Role{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Role), err +} + +func (c *FakeRoles) Update(role *v1beta1.Role) (result *v1beta1.Role, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(rolesResource, c.ns, role), &v1beta1.Role{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Role), err +} + +func (c *FakeRoles) Delete(name string, options *v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteAction(rolesResource, c.ns, name), &v1beta1.Role{}) + + return err +} + +func (c *FakeRoles) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(rolesResource, c.ns, listOptions) + + _, err := c.Fake.Invokes(action, &v1beta1.RoleList{}) + return err +} + +func (c *FakeRoles) Get(name string, options meta_v1.GetOptions) (result *v1beta1.Role, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(rolesResource, c.ns, name), &v1beta1.Role{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Role), err +} + +func (c *FakeRoles) List(opts meta_v1.ListOptions) (result *v1beta1.RoleList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(rolesResource, c.ns, opts), &v1beta1.RoleList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.RoleList{} + for _, item := range obj.(*v1beta1.RoleList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested roles. +func (c *FakeRoles) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(rolesResource, c.ns, opts)) + +} + +// Patch applies the patch and returns the patched role. +func (c *FakeRoles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Role, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(rolesResource, c.ns, name, data, subresources...), &v1beta1.Role{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Role), err +} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_rolebinding.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_rolebinding.go new file mode 100644 index 00000000..c7a96d10 --- /dev/null +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_rolebinding.go @@ -0,0 +1,119 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package fake + +import ( + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + v1 "k8s.io/client-go/pkg/api/v1" + v1beta1 "k8s.io/client-go/pkg/apis/rbac/v1beta1" + testing "k8s.io/client-go/testing" +) + +// FakeRoleBindings implements RoleBindingInterface +type FakeRoleBindings struct { + Fake *FakeRbacV1beta1 + ns string +} + +var rolebindingsResource = schema.GroupVersionResource{Group: "rbac.authorization.k8s.io", Version: "v1beta1", Resource: "rolebindings"} + +func (c *FakeRoleBindings) Create(roleBinding *v1beta1.RoleBinding) (result *v1beta1.RoleBinding, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(rolebindingsResource, c.ns, roleBinding), &v1beta1.RoleBinding{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.RoleBinding), err +} + +func (c *FakeRoleBindings) Update(roleBinding *v1beta1.RoleBinding) (result *v1beta1.RoleBinding, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(rolebindingsResource, c.ns, roleBinding), &v1beta1.RoleBinding{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.RoleBinding), err +} + +func (c *FakeRoleBindings) Delete(name string, options *v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteAction(rolebindingsResource, c.ns, name), &v1beta1.RoleBinding{}) + + return err +} + +func (c *FakeRoleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(rolebindingsResource, c.ns, listOptions) + + _, err := c.Fake.Invokes(action, &v1beta1.RoleBindingList{}) + return err +} + +func (c *FakeRoleBindings) Get(name string, options meta_v1.GetOptions) (result *v1beta1.RoleBinding, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(rolebindingsResource, c.ns, name), &v1beta1.RoleBinding{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.RoleBinding), err +} + +func (c *FakeRoleBindings) List(opts meta_v1.ListOptions) (result *v1beta1.RoleBindingList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(rolebindingsResource, c.ns, opts), &v1beta1.RoleBindingList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.RoleBindingList{} + for _, item := range obj.(*v1beta1.RoleBindingList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested roleBindings. +func (c *FakeRoleBindings) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(rolebindingsResource, c.ns, opts)) + +} + +// Patch applies the patch and returns the patched roleBinding. +func (c *FakeRoleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.RoleBinding, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(rolebindingsResource, c.ns, name, data, subresources...), &v1beta1.RoleBinding{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.RoleBinding), err +} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/generated_expansion.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/generated_expansion.go new file mode 100644 index 00000000..d7f80c00 --- /dev/null +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/generated_expansion.go @@ -0,0 +1,25 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +type ClusterRoleExpansion interface{} + +type ClusterRoleBindingExpansion interface{} + +type RoleExpansion interface{} + +type RoleBindingExpansion interface{} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/rbac_client.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/rbac_client.go new file mode 100644 index 00000000..1800744f --- /dev/null +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/rbac_client.go @@ -0,0 +1,112 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + fmt "fmt" + schema "k8s.io/apimachinery/pkg/runtime/schema" + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + api "k8s.io/client-go/pkg/api" + rest "k8s.io/client-go/rest" +) + +type RbacV1beta1Interface interface { + RESTClient() rest.Interface + ClusterRolesGetter + ClusterRoleBindingsGetter + RolesGetter + RoleBindingsGetter +} + +// RbacV1beta1Client is used to interact with features provided by the rbac.authorization.k8s.io group. +type RbacV1beta1Client struct { + restClient rest.Interface +} + +func (c *RbacV1beta1Client) ClusterRoles() ClusterRoleInterface { + return newClusterRoles(c) +} + +func (c *RbacV1beta1Client) ClusterRoleBindings() ClusterRoleBindingInterface { + return newClusterRoleBindings(c) +} + +func (c *RbacV1beta1Client) Roles(namespace string) RoleInterface { + return newRoles(c, namespace) +} + +func (c *RbacV1beta1Client) RoleBindings(namespace string) RoleBindingInterface { + return newRoleBindings(c, namespace) +} + +// NewForConfig creates a new RbacV1beta1Client for the given config. +func NewForConfig(c *rest.Config) (*RbacV1beta1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &RbacV1beta1Client{client}, nil +} + +// NewForConfigOrDie creates a new RbacV1beta1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *RbacV1beta1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new RbacV1beta1Client for the given RESTClient. +func New(c rest.Interface) *RbacV1beta1Client { + return &RbacV1beta1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv, err := schema.ParseGroupVersion("rbac.authorization.k8s.io/v1beta1") + if err != nil { + return err + } + // if rbac.authorization.k8s.io/v1beta1 is not enabled, return an error + if !api.Registry.IsEnabledVersion(gv) { + return fmt.Errorf("rbac.authorization.k8s.io/v1beta1 is not enabled") + } + config.APIPath = "/apis" + if config.UserAgent == "" { + config.UserAgent = rest.DefaultKubernetesUserAgent() + } + copyGroupVersion := gv + config.GroupVersion = ©GroupVersion + + config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: api.Codecs} + + return nil +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *RbacV1beta1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/role.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/role.go new file mode 100644 index 00000000..ccab602b --- /dev/null +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/role.go @@ -0,0 +1,156 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + api "k8s.io/client-go/pkg/api" + v1 "k8s.io/client-go/pkg/api/v1" + v1beta1 "k8s.io/client-go/pkg/apis/rbac/v1beta1" + rest "k8s.io/client-go/rest" +) + +// RolesGetter has a method to return a RoleInterface. +// A group's client should implement this interface. +type RolesGetter interface { + Roles(namespace string) RoleInterface +} + +// RoleInterface has methods to work with Role resources. +type RoleInterface interface { + Create(*v1beta1.Role) (*v1beta1.Role, error) + Update(*v1beta1.Role) (*v1beta1.Role, error) + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error + Get(name string, options meta_v1.GetOptions) (*v1beta1.Role, error) + List(opts meta_v1.ListOptions) (*v1beta1.RoleList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Role, err error) + RoleExpansion +} + +// roles implements RoleInterface +type roles struct { + client rest.Interface + ns string +} + +// newRoles returns a Roles +func newRoles(c *RbacV1beta1Client, namespace string) *roles { + return &roles{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Create takes the representation of a role and creates it. Returns the server's representation of the role, and an error, if there is any. +func (c *roles) Create(role *v1beta1.Role) (result *v1beta1.Role, err error) { + result = &v1beta1.Role{} + err = c.client.Post(). + Namespace(c.ns). + Resource("roles"). + Body(role). + Do(). + Into(result) + return +} + +// Update takes the representation of a role and updates it. Returns the server's representation of the role, and an error, if there is any. +func (c *roles) Update(role *v1beta1.Role) (result *v1beta1.Role, err error) { + result = &v1beta1.Role{} + err = c.client.Put(). + Namespace(c.ns). + Resource("roles"). + Name(role.Name). + Body(role). + Do(). + Into(result) + return +} + +// Delete takes name of the role and deletes it. Returns an error if one occurs. +func (c *roles) Delete(name string, options *v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("roles"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *roles) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("roles"). + VersionedParams(&listOptions, api.ParameterCodec). + Body(options). + Do(). + Error() +} + +// Get takes name of the role, and returns the corresponding role object, and an error if there is any. +func (c *roles) Get(name string, options meta_v1.GetOptions) (result *v1beta1.Role, err error) { + result = &v1beta1.Role{} + err = c.client.Get(). + Namespace(c.ns). + Resource("roles"). + Name(name). + VersionedParams(&options, api.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of Roles that match those selectors. +func (c *roles) List(opts meta_v1.ListOptions) (result *v1beta1.RoleList, err error) { + result = &v1beta1.RoleList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("roles"). + VersionedParams(&opts, api.ParameterCodec). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested roles. +func (c *roles) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { + return c.client.Get(). + Prefix("watch"). + Namespace(c.ns). + Resource("roles"). + VersionedParams(&opts, api.ParameterCodec). + Watch() +} + +// Patch applies the patch and returns the patched role. +func (c *roles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Role, err error) { + result = &v1beta1.Role{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("roles"). + SubResource(subresources...). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/rolebinding.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/rolebinding.go new file mode 100644 index 00000000..f75460e3 --- /dev/null +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/rolebinding.go @@ -0,0 +1,156 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + api "k8s.io/client-go/pkg/api" + v1 "k8s.io/client-go/pkg/api/v1" + v1beta1 "k8s.io/client-go/pkg/apis/rbac/v1beta1" + rest "k8s.io/client-go/rest" +) + +// RoleBindingsGetter has a method to return a RoleBindingInterface. +// A group's client should implement this interface. +type RoleBindingsGetter interface { + RoleBindings(namespace string) RoleBindingInterface +} + +// RoleBindingInterface has methods to work with RoleBinding resources. +type RoleBindingInterface interface { + Create(*v1beta1.RoleBinding) (*v1beta1.RoleBinding, error) + Update(*v1beta1.RoleBinding) (*v1beta1.RoleBinding, error) + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error + Get(name string, options meta_v1.GetOptions) (*v1beta1.RoleBinding, error) + List(opts meta_v1.ListOptions) (*v1beta1.RoleBindingList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.RoleBinding, err error) + RoleBindingExpansion +} + +// roleBindings implements RoleBindingInterface +type roleBindings struct { + client rest.Interface + ns string +} + +// newRoleBindings returns a RoleBindings +func newRoleBindings(c *RbacV1beta1Client, namespace string) *roleBindings { + return &roleBindings{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Create takes the representation of a roleBinding and creates it. Returns the server's representation of the roleBinding, and an error, if there is any. +func (c *roleBindings) Create(roleBinding *v1beta1.RoleBinding) (result *v1beta1.RoleBinding, err error) { + result = &v1beta1.RoleBinding{} + err = c.client.Post(). + Namespace(c.ns). + Resource("rolebindings"). + Body(roleBinding). + Do(). + Into(result) + return +} + +// Update takes the representation of a roleBinding and updates it. Returns the server's representation of the roleBinding, and an error, if there is any. +func (c *roleBindings) Update(roleBinding *v1beta1.RoleBinding) (result *v1beta1.RoleBinding, err error) { + result = &v1beta1.RoleBinding{} + err = c.client.Put(). + Namespace(c.ns). + Resource("rolebindings"). + Name(roleBinding.Name). + Body(roleBinding). + Do(). + Into(result) + return +} + +// Delete takes name of the roleBinding and deletes it. Returns an error if one occurs. +func (c *roleBindings) Delete(name string, options *v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("rolebindings"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *roleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("rolebindings"). + VersionedParams(&listOptions, api.ParameterCodec). + Body(options). + Do(). + Error() +} + +// Get takes name of the roleBinding, and returns the corresponding roleBinding object, and an error if there is any. +func (c *roleBindings) Get(name string, options meta_v1.GetOptions) (result *v1beta1.RoleBinding, err error) { + result = &v1beta1.RoleBinding{} + err = c.client.Get(). + Namespace(c.ns). + Resource("rolebindings"). + Name(name). + VersionedParams(&options, api.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of RoleBindings that match those selectors. +func (c *roleBindings) List(opts meta_v1.ListOptions) (result *v1beta1.RoleBindingList, err error) { + result = &v1beta1.RoleBindingList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("rolebindings"). + VersionedParams(&opts, api.ParameterCodec). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested roleBindings. +func (c *roleBindings) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { + return c.client.Get(). + Prefix("watch"). + Namespace(c.ns). + Resource("rolebindings"). + VersionedParams(&opts, api.ParameterCodec). + Watch() +} + +// Patch applies the patch and returns the patched roleBinding. +func (c *roleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.RoleBinding, err error) { + result = &v1beta1.RoleBinding{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("rolebindings"). + SubResource(subresources...). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/doc.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/doc.go index e596bf01..0e58290b 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/doc.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1] +// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1] // This package has the automatically generated typed clients. package v1beta1 diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/doc.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/doc.go index ea928c21..c4753e08 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/doc.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1] +// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1] // Package fake has the automatically generated clients. package fake diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_storageclass.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_storageclass.go index d34197a2..fb3f40d3 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_storageclass.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_storageclass.go @@ -20,8 +20,8 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" v1beta1 "k8s.io/client-go/pkg/apis/storage/v1beta1" testing "k8s.io/client-go/testing" @@ -58,7 +58,7 @@ func (c *FakeStorageClasses) Delete(name string, options *v1.DeleteOptions) erro return err } -func (c *FakeStorageClasses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *FakeStorageClasses) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { action := testing.NewRootDeleteCollectionAction(storageclassesResource, listOptions) _, err := c.Fake.Invokes(action, &v1beta1.StorageClassList{}) @@ -74,7 +74,7 @@ func (c *FakeStorageClasses) Get(name string, options meta_v1.GetOptions) (resul return obj.(*v1beta1.StorageClass), err } -func (c *FakeStorageClasses) List(opts v1.ListOptions) (result *v1beta1.StorageClassList, err error) { +func (c *FakeStorageClasses) List(opts meta_v1.ListOptions) (result *v1beta1.StorageClassList, err error) { obj, err := c.Fake. Invokes(testing.NewRootListAction(storageclassesResource, opts), &v1beta1.StorageClassList{}) if obj == nil { @@ -95,13 +95,13 @@ func (c *FakeStorageClasses) List(opts v1.ListOptions) (result *v1beta1.StorageC } // Watch returns a watch.Interface that watches the requested storageClasses. -func (c *FakeStorageClasses) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeStorageClasses) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(storageclassesResource, opts)) } // Patch applies the patch and returns the patched storageClass. -func (c *FakeStorageClasses) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.StorageClass, err error) { +func (c *FakeStorageClasses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.StorageClass, err error) { obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceAction(storageclassesResource, name, data, subresources...), &v1beta1.StorageClass{}) if obj == nil { diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/storageclass.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/storageclass.go index 49906a58..4436a8ac 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/storageclass.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/storageclass.go @@ -18,6 +18,7 @@ package v1beta1 import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" api "k8s.io/client-go/pkg/api" v1 "k8s.io/client-go/pkg/api/v1" @@ -36,11 +37,11 @@ type StorageClassInterface interface { Create(*v1beta1.StorageClass) (*v1beta1.StorageClass, error) Update(*v1beta1.StorageClass) (*v1beta1.StorageClass, error) Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error Get(name string, options meta_v1.GetOptions) (*v1beta1.StorageClass, error) - List(opts v1.ListOptions) (*v1beta1.StorageClassList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.StorageClass, err error) + List(opts meta_v1.ListOptions) (*v1beta1.StorageClassList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.StorageClass, err error) StorageClassExpansion } @@ -90,7 +91,7 @@ func (c *storageClasses) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *storageClasses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *storageClasses) DeleteCollection(options *v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Resource("storageclasses"). VersionedParams(&listOptions, api.ParameterCodec). @@ -112,7 +113,7 @@ func (c *storageClasses) Get(name string, options meta_v1.GetOptions) (result *v } // List takes label and field selectors, and returns the list of StorageClasses that match those selectors. -func (c *storageClasses) List(opts v1.ListOptions) (result *v1beta1.StorageClassList, err error) { +func (c *storageClasses) List(opts meta_v1.ListOptions) (result *v1beta1.StorageClassList, err error) { result = &v1beta1.StorageClassList{} err = c.client.Get(). Resource("storageclasses"). @@ -123,7 +124,7 @@ func (c *storageClasses) List(opts v1.ListOptions) (result *v1beta1.StorageClass } // Watch returns a watch.Interface that watches the requested storageClasses. -func (c *storageClasses) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *storageClasses) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { return c.client.Get(). Prefix("watch"). Resource("storageclasses"). @@ -132,7 +133,7 @@ func (c *storageClasses) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched storageClass. -func (c *storageClasses) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.StorageClass, err error) { +func (c *storageClasses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.StorageClass, err error) { result = &v1beta1.StorageClass{} err = c.client.Patch(pt). Resource("storageclasses"). diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/OWNERS b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/OWNERS index 569ba5b5..3a9b0c6d 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/OWNERS +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/OWNERS @@ -1,5 +1,4 @@ approvers: -- bgrant0607 - erictune - lavalamp - smarterclayton @@ -9,7 +8,6 @@ reviewers: - lavalamp - smarterclayton - wojtek-t -- bgrant0607 - deads2k - yujuhong - brendandburns diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/conversion.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/conversion.go index c8234cee..39ce83ad 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/conversion.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/conversion.go @@ -18,14 +18,15 @@ package api import ( "fmt" + "strconv" + "strings" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/conversion" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/util/validation/field" "k8s.io/client-go/pkg/api/resource" - "k8s.io/client-go/pkg/fields" "k8s.io/client-go/pkg/util/intstr" utillabels "k8s.io/client-go/pkg/util/labels" ) @@ -67,6 +68,8 @@ func addConversionFuncs(scheme *runtime.Scheme) error { Convert_map_to_unversioned_LabelSelector, Convert_unversioned_LabelSelector_to_map, + + Convert_Slice_string_To_Slice_int32, ) } @@ -243,8 +246,21 @@ func Convert_map_to_unversioned_LabelSelector(in *map[string]string, out *metav1 func Convert_unversioned_LabelSelector_to_map(in *metav1.LabelSelector, out *map[string]string, s conversion.Scope) error { var err error *out, err = metav1.LabelSelectorAsMap(in) - if err != nil { - err = field.Invalid(field.NewPath("labelSelector"), *in, fmt.Sprintf("cannot convert to old selector: %v", err)) - } return err } + +// Convert_Slice_string_To_Slice_int32 converts multiple query parameters or +// a single query parameter with a comma delimited value to multiple int32. +// This is used for port forwarding which needs the ports as int32. +func Convert_Slice_string_To_Slice_int32(in *[]string, out *[]int32, s conversion.Scope) error { + for _, s := range *in { + for _, v := range strings.Split(s, ",") { + x, err := strconv.ParseUint(v, 10, 16) + if err != nil { + return fmt.Errorf("cannot convert to []int32: %v", err) + } + *out = append(*out, int32(x)) + } + } + return nil +} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/defaults.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/defaults.go index 57ffd7bf..baa49a8d 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/defaults.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/defaults.go @@ -17,9 +17,9 @@ limitations under the License. package api import ( + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" - "k8s.io/client-go/pkg/fields" ) func addDefaultingFuncs(scheme *runtime.Scheme) error { diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/generate.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/generate.go deleted file mode 100644 index a4a003ba..00000000 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/generate.go +++ /dev/null @@ -1,64 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package api - -import ( - "fmt" - - utilrand "k8s.io/client-go/pkg/util/rand" -) - -// NameGenerator generates names for objects. Some backends may have more information -// available to guide selection of new names and this interface hides those details. -type NameGenerator interface { - // GenerateName generates a valid name from the base name, adding a random suffix to the - // the base. If base is valid, the returned name must also be valid. The generator is - // responsible for knowing the maximum valid name length. - GenerateName(base string) string -} - -// GenerateName will resolve the object name of the provided ObjectMeta to a generated version if -// necessary. It expects that validation for ObjectMeta has already completed (that Base is a -// valid name) and that the NameGenerator generates a name that is also valid. -func GenerateName(u NameGenerator, meta *ObjectMeta) { - if len(meta.GenerateName) == 0 || len(meta.Name) != 0 { - return - } - meta.Name = u.GenerateName(meta.GenerateName) -} - -// simpleNameGenerator generates random names. -type simpleNameGenerator struct{} - -// SimpleNameGenerator is a generator that returns the name plus a random suffix of five alphanumerics -// when a name is requested. The string is guaranteed to not exceed the length of a standard Kubernetes -// name (63 characters) -var SimpleNameGenerator NameGenerator = simpleNameGenerator{} - -const ( - // TODO: make this flexible for non-core resources with alternate naming rules. - maxNameLength = 63 - randomLength = 5 - maxGeneratedNameLength = maxNameLength - randomLength -) - -func (simpleNameGenerator) GenerateName(base string) string { - if len(base) > maxGeneratedNameLength { - base = base[:maxGeneratedNameLength] - } - return fmt.Sprintf("%s%s", base, utilrand.String(randomLength)) -} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/helpers.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/helpers.go index 0916ead3..d0c2dd0e 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/helpers.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/helpers.go @@ -18,23 +18,22 @@ package api import ( "crypto/md5" - "encoding/json" "fmt" "reflect" "strings" "time" + "github.com/davecgh/go-spew/spew" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/conversion" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/selection" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/client-go/pkg/api/resource" - "k8s.io/client-go/pkg/fields" - - "github.com/davecgh/go-spew/spew" ) // Conversion error conveniently packages up errors in conversions. @@ -51,6 +50,23 @@ func (c *ConversionError) Error() string { ) } +const ( + // annotation key prefix used to identify non-convertible json paths. + NonConvertibleAnnotationPrefix = "non-convertible.kubernetes.io" +) + +// NonConvertibleFields iterates over the provided map and filters out all but +// any keys with the "non-convertible.kubernetes.io" prefix. +func NonConvertibleFields(annotations map[string]string) map[string]string { + nonConvertibleKeys := map[string]string{} + for key, value := range annotations { + if strings.HasPrefix(key, NonConvertibleAnnotationPrefix) { + nonConvertibleKeys[key] = value + } + } + return nonConvertibleKeys +} + // Semantic can do semantic deep equality checks for api objects. // Example: api.Semantic.DeepEqual(aPod, aPodWithNonNilButEmptyMaps) == true var Semantic = conversion.EqualitiesOrDie( @@ -271,14 +287,6 @@ func IsStandardFinalizerName(str string) bool { return standardFinalizers.Has(str) } -// SingleObject returns a ListOptions for watching a single object. -func SingleObject(meta ObjectMeta) ListOptions { - return ListOptions{ - FieldSelector: fields.OneTermEqualSelector("metadata.name", meta.Name), - ResourceVersion: meta.ResourceVersion, - } -} - // AddToNodeAddresses appends the NodeAddresses to the passed-by-pointer slice, // only if they do not already exist func AddToNodeAddresses(addresses *[]NodeAddress, addAddresses ...NodeAddress) { @@ -486,32 +494,6 @@ const ( UnsafeSysctlsPodAnnotationKey string = "security.alpha.kubernetes.io/unsafe-sysctls" ) -// GetTolerationsFromPodAnnotations gets the json serialized tolerations data from Pod.Annotations -// and converts it to the []Toleration type in api. -func GetTolerationsFromPodAnnotations(annotations map[string]string) ([]Toleration, error) { - var tolerations []Toleration - if len(annotations) > 0 && annotations[TolerationsAnnotationKey] != "" { - err := json.Unmarshal([]byte(annotations[TolerationsAnnotationKey]), &tolerations) - if err != nil { - return tolerations, err - } - } - return tolerations, nil -} - -// GetTaintsFromNodeAnnotations gets the json serialized taints data from Pod.Annotations -// and converts it to the []Taint type in api. -func GetTaintsFromNodeAnnotations(annotations map[string]string) ([]Taint, error) { - var taints []Taint - if len(annotations) > 0 && annotations[TaintsAnnotationKey] != "" { - err := json.Unmarshal([]byte(annotations[TaintsAnnotationKey]), &taints) - if err != nil { - return []Taint{}, err - } - } - return taints, nil -} - // TolerationToleratesTaint checks if the toleration tolerates the taint. func TolerationToleratesTaint(toleration *Toleration, taint *Taint) bool { if len(toleration.Effect) != 0 && toleration.Effect != taint.Effect { @@ -557,17 +539,6 @@ func (t *Taint) ToString() string { return fmt.Sprintf("%v=%v:%v", t.Key, t.Value, t.Effect) } -func GetAvoidPodsFromNodeAnnotations(annotations map[string]string) (AvoidPods, error) { - var avoidPods AvoidPods - if len(annotations) > 0 && annotations[PreferAvoidPodsAnnotationKey] != "" { - err := json.Unmarshal([]byte(annotations[PreferAvoidPodsAnnotationKey]), &avoidPods) - if err != nil { - return avoidPods, err - } - } - return avoidPods, nil -} - // SysctlsFromPodAnnotations parses the sysctl annotations into a slice of safe Sysctls // and a slice of unsafe Sysctls. This is only a convenience wrapper around // SysctlsFromPodAnnotation. diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/install/install.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/install/install.go index 648afade..f5927c05 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/install/install.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/install/install.go @@ -102,6 +102,7 @@ func newRESTMapper(externalVersions []schema.GroupVersion) meta.RESTMapper { "PodLogOptions", "PodExecOptions", "PodAttachOptions", + "PodPortForwardOptions", "PodProxyOptions", "NodeProxyOptions", "ServiceProxyOptions", @@ -109,7 +110,7 @@ func newRESTMapper(externalVersions []schema.GroupVersion) meta.RESTMapper { "ThirdPartyResourceData", "ThirdPartyResourceList") - mapper := api.NewDefaultRESTMapper(externalVersions, interfacesFor, importPrefix, ignoredKinds, rootScoped) + mapper := meta.NewDefaultRESTMapperFromScheme(externalVersions, interfacesFor, importPrefix, ignoredKinds, rootScoped, api.Scheme) return mapper } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/json.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/json.go new file mode 100644 index 00000000..fbc7444e --- /dev/null +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/json.go @@ -0,0 +1,40 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package api + +import "encoding/json" + +// This file implements json marshaling/unmarshaling interfaces on objects that are currently marshaled into annotations +// to prevent anyone from marshaling these internal structs. + +var _ = json.Marshaler(Taint{}) +var _ = json.Unmarshaler(&Taint{}) + +func (Taint) MarshalJSON() ([]byte, error) { panic("do not marshal internal struct") } +func (*Taint) UnmarshalJSON([]byte) error { panic("do not unmarshal to internal struct") } + +var _ = json.Marshaler(Toleration{}) +var _ = json.Unmarshaler(&Toleration{}) + +func (Toleration) MarshalJSON() ([]byte, error) { panic("do not marshal internal struct") } +func (*Toleration) UnmarshalJSON([]byte) error { panic("do not unmarshal to internal struct") } + +var _ = json.Marshaler(&AvoidPods{}) +var _ = json.Unmarshaler(&AvoidPods{}) + +func (AvoidPods) MarshalJSON() ([]byte, error) { panic("do not marshal internal struct") } +func (*AvoidPods) UnmarshalJSON([]byte) error { panic("do not unmarshal to internal struct") } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/meta.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/meta.go index 7ad2e1d3..3df6a2e7 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/meta.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/meta.go @@ -17,109 +17,11 @@ limitations under the License. package api import ( - "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/conversion" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/types" ) // HasObjectMetaSystemFieldValues returns true if fields that are managed by the system on ObjectMeta have values. -func HasObjectMetaSystemFieldValues(meta *ObjectMeta) bool { +func HasObjectMetaSystemFieldValues(meta *metav1.ObjectMeta) bool { return !meta.CreationTimestamp.Time.IsZero() || len(meta.UID) != 0 } - -// ObjectMetaFor returns a pointer to a provided object's ObjectMeta. -// TODO: allow runtime.Unknown to extract this object -// TODO: Remove this function and use meta.Accessor() instead. -func ObjectMetaFor(obj runtime.Object) (*ObjectMeta, error) { - v, err := conversion.EnforcePtr(obj) - if err != nil { - return nil, err - } - var meta *ObjectMeta - err = runtime.FieldPtr(v, "ObjectMeta", &meta) - return meta, err -} - -// ListMetaFor returns a pointer to a provided object's ListMeta, -// or an error if the object does not have that pointer. -// TODO: allow runtime.Unknown to extract this object -func ListMetaFor(obj runtime.Object) (*metav1.ListMeta, error) { - v, err := conversion.EnforcePtr(obj) - if err != nil { - return nil, err - } - var meta *metav1.ListMeta - err = runtime.FieldPtr(v, "ListMeta", &meta) - return meta, err -} - -func (obj *ObjectMeta) GetObjectMeta() meta.Object { return obj } - -// Namespace implements meta.Object for any object with an ObjectMeta typed field. Allows -// fast, direct access to metadata fields for API objects. -func (meta *ObjectMeta) GetNamespace() string { return meta.Namespace } -func (meta *ObjectMeta) SetNamespace(namespace string) { meta.Namespace = namespace } -func (meta *ObjectMeta) GetName() string { return meta.Name } -func (meta *ObjectMeta) SetName(name string) { meta.Name = name } -func (meta *ObjectMeta) GetGenerateName() string { return meta.GenerateName } -func (meta *ObjectMeta) SetGenerateName(generateName string) { meta.GenerateName = generateName } -func (meta *ObjectMeta) GetUID() types.UID { return meta.UID } -func (meta *ObjectMeta) SetUID(uid types.UID) { meta.UID = uid } -func (meta *ObjectMeta) GetResourceVersion() string { return meta.ResourceVersion } -func (meta *ObjectMeta) SetResourceVersion(version string) { meta.ResourceVersion = version } -func (meta *ObjectMeta) GetSelfLink() string { return meta.SelfLink } -func (meta *ObjectMeta) SetSelfLink(selfLink string) { meta.SelfLink = selfLink } -func (meta *ObjectMeta) GetCreationTimestamp() metav1.Time { return meta.CreationTimestamp } -func (meta *ObjectMeta) SetCreationTimestamp(creationTimestamp metav1.Time) { - meta.CreationTimestamp = creationTimestamp -} -func (meta *ObjectMeta) GetDeletionTimestamp() *metav1.Time { return meta.DeletionTimestamp } -func (meta *ObjectMeta) SetDeletionTimestamp(deletionTimestamp *metav1.Time) { - meta.DeletionTimestamp = deletionTimestamp -} -func (meta *ObjectMeta) GetLabels() map[string]string { return meta.Labels } -func (meta *ObjectMeta) SetLabels(labels map[string]string) { meta.Labels = labels } -func (meta *ObjectMeta) GetAnnotations() map[string]string { return meta.Annotations } -func (meta *ObjectMeta) SetAnnotations(annotations map[string]string) { meta.Annotations = annotations } -func (meta *ObjectMeta) GetFinalizers() []string { return meta.Finalizers } -func (meta *ObjectMeta) SetFinalizers(finalizers []string) { meta.Finalizers = finalizers } - -func (meta *ObjectMeta) GetOwnerReferences() []metav1.OwnerReference { - ret := make([]metav1.OwnerReference, len(meta.OwnerReferences)) - for i := 0; i < len(meta.OwnerReferences); i++ { - ret[i].Kind = meta.OwnerReferences[i].Kind - ret[i].Name = meta.OwnerReferences[i].Name - ret[i].UID = meta.OwnerReferences[i].UID - ret[i].APIVersion = meta.OwnerReferences[i].APIVersion - if meta.OwnerReferences[i].Controller != nil { - value := *meta.OwnerReferences[i].Controller - ret[i].Controller = &value - } - } - return ret -} - -func (meta *ObjectMeta) SetOwnerReferences(references []metav1.OwnerReference) { - newReferences := make([]metav1.OwnerReference, len(references)) - for i := 0; i < len(references); i++ { - newReferences[i].Kind = references[i].Kind - newReferences[i].Name = references[i].Name - newReferences[i].UID = references[i].UID - newReferences[i].APIVersion = references[i].APIVersion - if references[i].Controller != nil { - value := *references[i].Controller - newReferences[i].Controller = &value - } - } - meta.OwnerReferences = newReferences -} - -func (meta *ObjectMeta) GetClusterName() string { - return meta.ClusterName -} -func (meta *ObjectMeta) SetClusterName(clusterName string) { - meta.ClusterName = clusterName -} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/register.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/register.go index 1847e0c0..0e0809c7 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/register.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/register.go @@ -19,6 +19,7 @@ package api import ( "os" + "k8s.io/apimachinery/pkg/apimachinery/announced" "k8s.io/apimachinery/pkg/apimachinery/registered" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" @@ -26,6 +27,9 @@ import ( "k8s.io/apimachinery/pkg/runtime/serializer" ) +// GroupFactoryRegistry is the APIGroupFactoryRegistry (overlaps a bit with Registry, see comments in package for details) +var GroupFactoryRegistry = make(announced.APIGroupFactoryRegistry) + // Registry is an instance of an API registry. This is an interim step to start removing the idea of a global // API registry. var Registry = registered.NewOrDie(os.Getenv("KUBE_API_VERSIONS")) @@ -125,6 +129,7 @@ func addKnownTypes(scheme *runtime.Scheme) error { &PodAttachOptions{}, &PodLogOptions{}, &PodExecOptions{}, + &PodPortForwardOptions{}, &PodProxyOptions{}, &ComponentStatus{}, &ComponentStatusList{}, diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/testapi/testapi.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/testapi/testapi.go index 447dbcfb..afaa49c1 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/testapi/testapi.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/testapi/testapi.go @@ -200,8 +200,8 @@ func init() { externalGroupVersion := schema.GroupVersion{Group: apps.GroupName, Version: api.Registry.GroupOrDie(apps.GroupName).GroupVersion.Version} Groups[apps.GroupName] = TestGroup{ externalGroupVersion: externalGroupVersion, - internalGroupVersion: extensions.SchemeGroupVersion, - internalTypes: api.Scheme.KnownTypes(extensions.SchemeGroupVersion), + internalGroupVersion: apps.SchemeGroupVersion, + internalTypes: api.Scheme.KnownTypes(apps.SchemeGroupVersion), externalTypes: api.Scheme.KnownTypes(externalGroupVersion), } } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/types.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/types.go index f80737e1..fdae0968 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/types.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/types.go @@ -18,11 +18,11 @@ package api import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/pkg/api/resource" - "k8s.io/client-go/pkg/fields" "k8s.io/client-go/pkg/util/intstr" ) @@ -57,6 +57,7 @@ import ( // ObjectMeta is metadata that all persisted resources must have, which includes all objects // users must create. +// DEPRECATED: Use k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta instead - this type will be removed soon. type ObjectMeta struct { // Name is unique within a namespace. Name is required when creating resources, although // some resources may allow a client to request the generation of an appropriate name @@ -370,7 +371,7 @@ type PersistentVolumeClaimVolumeSource struct { type PersistentVolume struct { metav1.TypeMeta // +optional - ObjectMeta + metav1.ObjectMeta //Spec defines a persistent volume owned by the cluster // +optional @@ -441,7 +442,7 @@ type PersistentVolumeList struct { type PersistentVolumeClaim struct { metav1.TypeMeta // +optional - ObjectMeta + metav1.ObjectMeta // Spec defines the volume requested by a pod author // +optional @@ -1141,6 +1142,9 @@ type EnvFromSource struct { // The ConfigMap to select from. //+optional ConfigMapRef *ConfigMapEnvSource + // The Secret to select from. + //+optional + SecretRef *SecretEnvSource } // ConfigMapEnvSource selects a ConfigMap to populate the environment @@ -1153,6 +1157,16 @@ type ConfigMapEnvSource struct { LocalObjectReference } +// SecretEnvSource selects a Secret to populate the environment +// variables with. +// +// The contents of the target Secret's Data field will represent the +// key-value pairs as environment variables. +type SecretEnvSource struct { + // The Secret to select from. + LocalObjectReference +} + // HTTPHeader describes a custom header to be used in HTTP probes type HTTPHeader struct { // The header field name @@ -1243,6 +1257,19 @@ const ( PullIfNotPresent PullPolicy = "IfNotPresent" ) +// TerminationMessagePolicy describes how termination messages are retrieved from a container. +type TerminationMessagePolicy string + +const ( + // TerminationMessageReadFile is the default behavior and will set the container status message to + // the contents of the container's terminationMessagePath when the container exits. + TerminationMessageReadFile TerminationMessagePolicy = "File" + // TerminationMessageFallbackToLogsOnError will read the most recent contents of the container logs + // for the container status message when the container exits with an error and the + // terminationMessagePath has no contents. + TerminationMessageFallbackToLogsOnError TerminationMessagePolicy = "FallbackToLogsOnError" +) + // Capability represent POSIX capabilities type type Capability string @@ -1318,6 +1345,8 @@ type Container struct { // Required. // +optional TerminationMessagePath string + // +optional + TerminationMessagePolicy TerminationMessagePolicy // Required: Policy for pulling images for this container ImagePullPolicy PullPolicy // Optional: SecurityContext defines the security options the container should be run with. @@ -1855,6 +1884,10 @@ type PodSpec struct { // If specified, the pod's scheduling constraints // +optional Affinity *Affinity + // If specified, the pod will be dispatched by specified scheduler. + // If not specified, the pod will be dispatched by default scheduler. + // +optional + SchedulerName string } // Sysctl defines a kernel parameter to be set @@ -1981,7 +2014,7 @@ type PodStatus struct { type PodStatusResult struct { metav1.TypeMeta // +optional - ObjectMeta + metav1.ObjectMeta // Status represents the current information about a pod. This data may not be up // to date. // +optional @@ -1994,7 +2027,7 @@ type PodStatusResult struct { type Pod struct { metav1.TypeMeta // +optional - ObjectMeta + metav1.ObjectMeta // Spec defines the behavior of a pod. // +optional @@ -2010,7 +2043,7 @@ type Pod struct { type PodTemplateSpec struct { // Metadata of the pods created from this template. // +optional - ObjectMeta + metav1.ObjectMeta // Spec defines the behavior of a pod. // +optional @@ -2023,7 +2056,7 @@ type PodTemplateSpec struct { type PodTemplate struct { metav1.TypeMeta // +optional - ObjectMeta + metav1.ObjectMeta // Template defines the pods that will be created from this pod template // +optional @@ -2128,7 +2161,7 @@ type ReplicationControllerCondition struct { type ReplicationController struct { metav1.TypeMeta // +optional - ObjectMeta + metav1.ObjectMeta // Spec defines the desired behavior of this replication controller. // +optional @@ -2333,7 +2366,7 @@ type ServicePort struct { type Service struct { metav1.TypeMeta // +optional - ObjectMeta + metav1.ObjectMeta // Spec defines the behavior of a service. // +optional @@ -2353,7 +2386,7 @@ type Service struct { type ServiceAccount struct { metav1.TypeMeta // +optional - ObjectMeta + metav1.ObjectMeta // Secrets is the list of secrets allowed to be used by pods running using this ServiceAccount Secrets []ObjectReference @@ -2391,7 +2424,7 @@ type ServiceAccountList struct { type Endpoints struct { metav1.TypeMeta // +optional - ObjectMeta + metav1.ObjectMeta // The set of all endpoints is the union of all subsets. Subsets []EndpointSubset @@ -2713,7 +2746,7 @@ type ResourceList map[ResourceName]resource.Quantity type Node struct { metav1.TypeMeta // +optional - ObjectMeta + metav1.ObjectMeta // Spec defines the behavior of a node. // +optional @@ -2773,7 +2806,7 @@ const ( type Namespace struct { metav1.TypeMeta // +optional - ObjectMeta + metav1.ObjectMeta // Spec defines the behavior of the Namespace. // +optional @@ -2798,7 +2831,7 @@ type Binding struct { metav1.TypeMeta // ObjectMeta describes the object that is being bound. // +optional - ObjectMeta + metav1.ObjectMeta // Target is the object to bind to. Target ObjectReference @@ -2834,6 +2867,7 @@ type DeleteOptions struct { // ListOptions is the query options to a standard REST list call, and has future support for // watch calls. +// DEPRECATED: This type has been moved to meta/v1 and will be removed soon. type ListOptions struct { metav1.TypeMeta @@ -2935,6 +2969,15 @@ type PodExecOptions struct { Command []string } +// PodPortForwardOptions is the query options to a Pod's port forward call +type PodPortForwardOptions struct { + metav1.TypeMeta + + // The list of ports to forward + // +optional + Ports []int32 +} + // PodProxyOptions is the query options to a Pod's proxy call type PodProxyOptions struct { metav1.TypeMeta @@ -3026,7 +3069,7 @@ const ( type Event struct { metav1.TypeMeta // +optional - ObjectMeta + metav1.ObjectMeta // Required. The object that this event is about. // +optional @@ -3129,7 +3172,7 @@ type LimitRangeSpec struct { type LimitRange struct { metav1.TypeMeta // +optional - ObjectMeta + metav1.ObjectMeta // Spec defines the limits enforced // +optional @@ -3219,7 +3262,7 @@ type ResourceQuotaStatus struct { type ResourceQuota struct { metav1.TypeMeta // +optional - ObjectMeta + metav1.ObjectMeta // Spec defines the desired quota // +optional @@ -3247,7 +3290,7 @@ type ResourceQuotaList struct { type Secret struct { metav1.TypeMeta // +optional - ObjectMeta + metav1.ObjectMeta // Data contains the secret data. Each key must be a valid DNS_SUBDOMAIN // or leading dot followed by valid DNS_SUBDOMAIN. @@ -3362,7 +3405,7 @@ type SecretList struct { type ConfigMap struct { metav1.TypeMeta // +optional - ObjectMeta + metav1.ObjectMeta // Data contains the configuration data. // Each key must be a valid DNS_SUBDOMAIN with an optional leading dot. @@ -3421,17 +3464,6 @@ const ( PortForwardRequestIDHeader = "requestID" ) -// Similarly to above, these are constants to support HTTP PATCH utilized by -// both the client and server that didn't make sense for a whole package to be -// dedicated to. -type PatchType string - -const ( - JSONPatchType PatchType = "application/json-patch+json" - MergePatchType PatchType = "application/merge-patch+json" - StrategicMergePatchType PatchType = "application/strategic-merge-patch+json" -) - // Type and constants for component health validation. type ComponentConditionType string @@ -3456,7 +3488,7 @@ type ComponentCondition struct { type ComponentStatus struct { metav1.TypeMeta // +optional - ObjectMeta + metav1.ObjectMeta // +optional Conditions []ComponentCondition @@ -3535,7 +3567,7 @@ type SELinuxOptions struct { type RangeAllocation struct { metav1.TypeMeta // +optional - ObjectMeta + metav1.ObjectMeta // A string representing a unique label for a range of resources, such as a CIDR "10.0.0.0/8" or // port range "10000-30000". Range is not strongly schema'd here. The Range is expected to define // a start and end unless there is an implicit end. diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/v1/conversion.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/v1/conversion.go index 2ee13fc6..c03da073 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/v1/conversion.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/v1/conversion.go @@ -35,9 +35,6 @@ const ( // Value used to identify mirror pods from pre-v1.1 kubelet. mirrorAnnotationValue_1_0 = "mirror" - - // annotation key prefix used to identify non-convertible json paths. - NonConvertibleAnnotationPrefix = "kubernetes.io/non-convertible" ) // This is a "fast-path" that avoids reflection for common types. It focuses on the objects that are @@ -269,9 +266,7 @@ func addConversionFuncs(scheme *runtime.Scheme) error { } func Convert_v1_ReplicationController_to_extensions_ReplicaSet(in *ReplicationController, out *extensions.ReplicaSet, s conversion.Scope) error { - if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_ReplicationControllerSpec_to_extensions_ReplicaSetSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -304,9 +299,7 @@ func Convert_v1_ReplicationControllerStatus_to_extensions_ReplicaSetStatus(in *R } func Convert_extensions_ReplicaSet_to_v1_ReplicationController(in *extensions.ReplicaSet, out *ReplicationController, s conversion.Scope) error { - if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_extensions_ReplicaSetSpec_to_v1_ReplicationControllerSpec(&in.Spec, &out.Spec, s); err != nil { fieldErr, ok := err.(*field.Error) if !ok { @@ -315,7 +308,7 @@ func Convert_extensions_ReplicaSet_to_v1_ReplicationController(in *extensions.Re if out.Annotations == nil { out.Annotations = make(map[string]string) } - out.Annotations[NonConvertibleAnnotationPrefix+"/"+fieldErr.Field] = reflect.ValueOf(fieldErr.BadValue).String() + out.Annotations[api.NonConvertibleAnnotationPrefix+"/"+fieldErr.Field] = reflect.ValueOf(fieldErr.BadValue).String() } if err := Convert_extensions_ReplicaSetStatus_to_v1_ReplicationControllerStatus(&in.Status, &out.Status, s); err != nil { return err diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/v1/defaults.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/v1/defaults.go index 764f84d9..5ba65502 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/v1/defaults.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/v1/defaults.go @@ -121,6 +121,9 @@ func SetDefaults_Container(obj *Container) { if obj.TerminationMessagePath == "" { obj.TerminationMessagePath = TerminationMessagePathDefault } + if obj.TerminationMessagePolicy == "" { + obj.TerminationMessagePolicy = TerminationMessageReadFile + } } func SetDefaults_ServiceSpec(obj *ServiceSpec) { if obj.SessionAffinity == "" { @@ -174,6 +177,9 @@ func SetDefaults_PodSpec(obj *PodSpec) { period := int64(DefaultTerminationGracePeriodSeconds) obj.TerminationGracePeriodSeconds = &period } + if obj.SchedulerName == "" { + obj.SchedulerName = DefaultSchedulerName + } } func SetDefaults_Probe(obj *Probe) { if obj.TimeoutSeconds == 0 { diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/v1/generate.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/v1/generate.go index 9145114e..b8c44e4c 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/v1/generate.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/v1/generate.go @@ -19,7 +19,7 @@ package v1 import ( "fmt" - utilrand "k8s.io/client-go/pkg/util/rand" + utilrand "k8s.io/apimachinery/pkg/util/rand" ) // NameGenerator generates names for objects. Some backends may have more information diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/v1/generated.pb.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/v1/generated.pb.go index 130dd8b4..8dd836ac 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/v1/generated.pb.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/v1/generated.pb.go @@ -132,6 +132,7 @@ limitations under the License. PodExecOptions PodList PodLogOptions + PodPortForwardOptions PodProxyOptions PodSecurityContext PodSignature @@ -161,6 +162,7 @@ limitations under the License. ResourceRequirements SELinuxOptions Secret + SecretEnvSource SecretKeySelector SecretList SecretVolumeSource @@ -660,222 +662,230 @@ func (m *PodLogOptions) Reset() { *m = PodLogOptions{} } func (*PodLogOptions) ProtoMessage() {} func (*PodLogOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{106} } +func (m *PodPortForwardOptions) Reset() { *m = PodPortForwardOptions{} } +func (*PodPortForwardOptions) ProtoMessage() {} +func (*PodPortForwardOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{107} } + func (m *PodProxyOptions) Reset() { *m = PodProxyOptions{} } func (*PodProxyOptions) ProtoMessage() {} -func (*PodProxyOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{107} } +func (*PodProxyOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{108} } func (m *PodSecurityContext) Reset() { *m = PodSecurityContext{} } func (*PodSecurityContext) ProtoMessage() {} -func (*PodSecurityContext) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{108} } +func (*PodSecurityContext) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{109} } func (m *PodSignature) Reset() { *m = PodSignature{} } func (*PodSignature) ProtoMessage() {} -func (*PodSignature) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{109} } +func (*PodSignature) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{110} } func (m *PodSpec) Reset() { *m = PodSpec{} } func (*PodSpec) ProtoMessage() {} -func (*PodSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{110} } +func (*PodSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{111} } func (m *PodStatus) Reset() { *m = PodStatus{} } func (*PodStatus) ProtoMessage() {} -func (*PodStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{111} } +func (*PodStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{112} } func (m *PodStatusResult) Reset() { *m = PodStatusResult{} } func (*PodStatusResult) ProtoMessage() {} -func (*PodStatusResult) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{112} } +func (*PodStatusResult) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{113} } func (m *PodTemplate) Reset() { *m = PodTemplate{} } func (*PodTemplate) ProtoMessage() {} -func (*PodTemplate) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{113} } +func (*PodTemplate) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{114} } func (m *PodTemplateList) Reset() { *m = PodTemplateList{} } func (*PodTemplateList) ProtoMessage() {} -func (*PodTemplateList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{114} } +func (*PodTemplateList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{115} } func (m *PodTemplateSpec) Reset() { *m = PodTemplateSpec{} } func (*PodTemplateSpec) ProtoMessage() {} -func (*PodTemplateSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{115} } +func (*PodTemplateSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{116} } func (m *Preconditions) Reset() { *m = Preconditions{} } func (*Preconditions) ProtoMessage() {} -func (*Preconditions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{116} } +func (*Preconditions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{117} } func (m *PreferAvoidPodsEntry) Reset() { *m = PreferAvoidPodsEntry{} } func (*PreferAvoidPodsEntry) ProtoMessage() {} -func (*PreferAvoidPodsEntry) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{117} } +func (*PreferAvoidPodsEntry) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{118} } func (m *PreferredSchedulingTerm) Reset() { *m = PreferredSchedulingTerm{} } func (*PreferredSchedulingTerm) ProtoMessage() {} func (*PreferredSchedulingTerm) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{118} + return fileDescriptorGenerated, []int{119} } func (m *Probe) Reset() { *m = Probe{} } func (*Probe) ProtoMessage() {} -func (*Probe) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{119} } +func (*Probe) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{120} } func (m *QuobyteVolumeSource) Reset() { *m = QuobyteVolumeSource{} } func (*QuobyteVolumeSource) ProtoMessage() {} -func (*QuobyteVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{120} } +func (*QuobyteVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{121} } func (m *RBDVolumeSource) Reset() { *m = RBDVolumeSource{} } func (*RBDVolumeSource) ProtoMessage() {} -func (*RBDVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{121} } +func (*RBDVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{122} } func (m *RangeAllocation) Reset() { *m = RangeAllocation{} } func (*RangeAllocation) ProtoMessage() {} -func (*RangeAllocation) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{122} } +func (*RangeAllocation) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{123} } func (m *ReplicationController) Reset() { *m = ReplicationController{} } func (*ReplicationController) ProtoMessage() {} -func (*ReplicationController) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{123} } +func (*ReplicationController) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{124} } func (m *ReplicationControllerCondition) Reset() { *m = ReplicationControllerCondition{} } func (*ReplicationControllerCondition) ProtoMessage() {} func (*ReplicationControllerCondition) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{124} + return fileDescriptorGenerated, []int{125} } func (m *ReplicationControllerList) Reset() { *m = ReplicationControllerList{} } func (*ReplicationControllerList) ProtoMessage() {} func (*ReplicationControllerList) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{125} + return fileDescriptorGenerated, []int{126} } func (m *ReplicationControllerSpec) Reset() { *m = ReplicationControllerSpec{} } func (*ReplicationControllerSpec) ProtoMessage() {} func (*ReplicationControllerSpec) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{126} + return fileDescriptorGenerated, []int{127} } func (m *ReplicationControllerStatus) Reset() { *m = ReplicationControllerStatus{} } func (*ReplicationControllerStatus) ProtoMessage() {} func (*ReplicationControllerStatus) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{127} + return fileDescriptorGenerated, []int{128} } func (m *ResourceFieldSelector) Reset() { *m = ResourceFieldSelector{} } func (*ResourceFieldSelector) ProtoMessage() {} -func (*ResourceFieldSelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{128} } +func (*ResourceFieldSelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{129} } func (m *ResourceQuota) Reset() { *m = ResourceQuota{} } func (*ResourceQuota) ProtoMessage() {} -func (*ResourceQuota) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{129} } +func (*ResourceQuota) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{130} } func (m *ResourceQuotaList) Reset() { *m = ResourceQuotaList{} } func (*ResourceQuotaList) ProtoMessage() {} -func (*ResourceQuotaList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{130} } +func (*ResourceQuotaList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{131} } func (m *ResourceQuotaSpec) Reset() { *m = ResourceQuotaSpec{} } func (*ResourceQuotaSpec) ProtoMessage() {} -func (*ResourceQuotaSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{131} } +func (*ResourceQuotaSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{132} } func (m *ResourceQuotaStatus) Reset() { *m = ResourceQuotaStatus{} } func (*ResourceQuotaStatus) ProtoMessage() {} -func (*ResourceQuotaStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{132} } +func (*ResourceQuotaStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{133} } func (m *ResourceRequirements) Reset() { *m = ResourceRequirements{} } func (*ResourceRequirements) ProtoMessage() {} -func (*ResourceRequirements) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{133} } +func (*ResourceRequirements) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{134} } func (m *SELinuxOptions) Reset() { *m = SELinuxOptions{} } func (*SELinuxOptions) ProtoMessage() {} -func (*SELinuxOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{134} } +func (*SELinuxOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{135} } func (m *Secret) Reset() { *m = Secret{} } func (*Secret) ProtoMessage() {} -func (*Secret) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{135} } +func (*Secret) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{136} } + +func (m *SecretEnvSource) Reset() { *m = SecretEnvSource{} } +func (*SecretEnvSource) ProtoMessage() {} +func (*SecretEnvSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{137} } func (m *SecretKeySelector) Reset() { *m = SecretKeySelector{} } func (*SecretKeySelector) ProtoMessage() {} -func (*SecretKeySelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{136} } +func (*SecretKeySelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{138} } func (m *SecretList) Reset() { *m = SecretList{} } func (*SecretList) ProtoMessage() {} -func (*SecretList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{137} } +func (*SecretList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{139} } func (m *SecretVolumeSource) Reset() { *m = SecretVolumeSource{} } func (*SecretVolumeSource) ProtoMessage() {} -func (*SecretVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{138} } +func (*SecretVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{140} } func (m *SecurityContext) Reset() { *m = SecurityContext{} } func (*SecurityContext) ProtoMessage() {} -func (*SecurityContext) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{139} } +func (*SecurityContext) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{141} } func (m *SerializedReference) Reset() { *m = SerializedReference{} } func (*SerializedReference) ProtoMessage() {} -func (*SerializedReference) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{140} } +func (*SerializedReference) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{142} } func (m *Service) Reset() { *m = Service{} } func (*Service) ProtoMessage() {} -func (*Service) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{141} } +func (*Service) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{143} } func (m *ServiceAccount) Reset() { *m = ServiceAccount{} } func (*ServiceAccount) ProtoMessage() {} -func (*ServiceAccount) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{142} } +func (*ServiceAccount) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{144} } func (m *ServiceAccountList) Reset() { *m = ServiceAccountList{} } func (*ServiceAccountList) ProtoMessage() {} -func (*ServiceAccountList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{143} } +func (*ServiceAccountList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{145} } func (m *ServiceList) Reset() { *m = ServiceList{} } func (*ServiceList) ProtoMessage() {} -func (*ServiceList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{144} } +func (*ServiceList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{146} } func (m *ServicePort) Reset() { *m = ServicePort{} } func (*ServicePort) ProtoMessage() {} -func (*ServicePort) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{145} } +func (*ServicePort) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{147} } func (m *ServiceProxyOptions) Reset() { *m = ServiceProxyOptions{} } func (*ServiceProxyOptions) ProtoMessage() {} -func (*ServiceProxyOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{146} } +func (*ServiceProxyOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{148} } func (m *ServiceSpec) Reset() { *m = ServiceSpec{} } func (*ServiceSpec) ProtoMessage() {} -func (*ServiceSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{147} } +func (*ServiceSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{149} } func (m *ServiceStatus) Reset() { *m = ServiceStatus{} } func (*ServiceStatus) ProtoMessage() {} -func (*ServiceStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{148} } +func (*ServiceStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{150} } func (m *Sysctl) Reset() { *m = Sysctl{} } func (*Sysctl) ProtoMessage() {} -func (*Sysctl) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{149} } +func (*Sysctl) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{151} } func (m *TCPSocketAction) Reset() { *m = TCPSocketAction{} } func (*TCPSocketAction) ProtoMessage() {} -func (*TCPSocketAction) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{150} } +func (*TCPSocketAction) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{152} } func (m *Taint) Reset() { *m = Taint{} } func (*Taint) ProtoMessage() {} -func (*Taint) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{151} } +func (*Taint) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{153} } func (m *Toleration) Reset() { *m = Toleration{} } func (*Toleration) ProtoMessage() {} -func (*Toleration) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{152} } +func (*Toleration) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{154} } func (m *Volume) Reset() { *m = Volume{} } func (*Volume) ProtoMessage() {} -func (*Volume) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{153} } +func (*Volume) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{155} } func (m *VolumeMount) Reset() { *m = VolumeMount{} } func (*VolumeMount) ProtoMessage() {} -func (*VolumeMount) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{154} } +func (*VolumeMount) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{156} } func (m *VolumeSource) Reset() { *m = VolumeSource{} } func (*VolumeSource) ProtoMessage() {} -func (*VolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{155} } +func (*VolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{157} } func (m *VsphereVirtualDiskVolumeSource) Reset() { *m = VsphereVirtualDiskVolumeSource{} } func (*VsphereVirtualDiskVolumeSource) ProtoMessage() {} func (*VsphereVirtualDiskVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{156} + return fileDescriptorGenerated, []int{158} } func (m *WeightedPodAffinityTerm) Reset() { *m = WeightedPodAffinityTerm{} } func (*WeightedPodAffinityTerm) ProtoMessage() {} func (*WeightedPodAffinityTerm) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{157} + return fileDescriptorGenerated, []int{159} } func init() { @@ -986,6 +996,7 @@ func init() { proto.RegisterType((*PodExecOptions)(nil), "k8s.io.client-go.pkg.api.v1.PodExecOptions") proto.RegisterType((*PodList)(nil), "k8s.io.client-go.pkg.api.v1.PodList") proto.RegisterType((*PodLogOptions)(nil), "k8s.io.client-go.pkg.api.v1.PodLogOptions") + proto.RegisterType((*PodPortForwardOptions)(nil), "k8s.io.client-go.pkg.api.v1.PodPortForwardOptions") proto.RegisterType((*PodProxyOptions)(nil), "k8s.io.client-go.pkg.api.v1.PodProxyOptions") proto.RegisterType((*PodSecurityContext)(nil), "k8s.io.client-go.pkg.api.v1.PodSecurityContext") proto.RegisterType((*PodSignature)(nil), "k8s.io.client-go.pkg.api.v1.PodSignature") @@ -1015,6 +1026,7 @@ func init() { proto.RegisterType((*ResourceRequirements)(nil), "k8s.io.client-go.pkg.api.v1.ResourceRequirements") proto.RegisterType((*SELinuxOptions)(nil), "k8s.io.client-go.pkg.api.v1.SELinuxOptions") proto.RegisterType((*Secret)(nil), "k8s.io.client-go.pkg.api.v1.Secret") + proto.RegisterType((*SecretEnvSource)(nil), "k8s.io.client-go.pkg.api.v1.SecretEnvSource") proto.RegisterType((*SecretKeySelector)(nil), "k8s.io.client-go.pkg.api.v1.SecretKeySelector") proto.RegisterType((*SecretList)(nil), "k8s.io.client-go.pkg.api.v1.SecretList") proto.RegisterType((*SecretVolumeSource)(nil), "k8s.io.client-go.pkg.api.v1.SecretVolumeSource") @@ -1923,6 +1935,12 @@ func (m *Container) MarshalTo(data []byte) (int, error) { i += n } } + data[i] = 0xa2 + i++ + data[i] = 0x1 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.TerminationMessagePolicy))) + i += copy(data[i:], m.TerminationMessagePolicy) return i, nil } @@ -2609,6 +2627,16 @@ func (m *EnvFromSource) MarshalTo(data []byte) (int, error) { } i += n33 } + if m.SecretRef != nil { + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.SecretRef.Size())) + n34, err := m.SecretRef.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n34 + } return i, nil } @@ -2639,11 +2667,11 @@ func (m *EnvVar) MarshalTo(data []byte) (int, error) { data[i] = 0x1a i++ i = encodeVarintGenerated(data, i, uint64(m.ValueFrom.Size())) - n34, err := m.ValueFrom.MarshalTo(data[i:]) + n35, err := m.ValueFrom.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n34 + i += n35 } return i, nil } @@ -2667,42 +2695,42 @@ func (m *EnvVarSource) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.FieldRef.Size())) - n35, err := m.FieldRef.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n35 - } - if m.ResourceFieldRef != nil { - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(m.ResourceFieldRef.Size())) - n36, err := m.ResourceFieldRef.MarshalTo(data[i:]) + n36, err := m.FieldRef.MarshalTo(data[i:]) if err != nil { return 0, err } i += n36 } - if m.ConfigMapKeyRef != nil { - data[i] = 0x1a + if m.ResourceFieldRef != nil { + data[i] = 0x12 i++ - i = encodeVarintGenerated(data, i, uint64(m.ConfigMapKeyRef.Size())) - n37, err := m.ConfigMapKeyRef.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.ResourceFieldRef.Size())) + n37, err := m.ResourceFieldRef.MarshalTo(data[i:]) if err != nil { return 0, err } i += n37 } - if m.SecretKeyRef != nil { - data[i] = 0x22 + if m.ConfigMapKeyRef != nil { + data[i] = 0x1a i++ - i = encodeVarintGenerated(data, i, uint64(m.SecretKeyRef.Size())) - n38, err := m.SecretKeyRef.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.ConfigMapKeyRef.Size())) + n38, err := m.ConfigMapKeyRef.MarshalTo(data[i:]) if err != nil { return 0, err } i += n38 } + if m.SecretKeyRef != nil { + data[i] = 0x22 + i++ + i = encodeVarintGenerated(data, i, uint64(m.SecretKeyRef.Size())) + n39, err := m.SecretKeyRef.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n39 + } return i, nil } @@ -2724,19 +2752,19 @@ func (m *Event) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n39, err := m.ObjectMeta.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n39 - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(m.InvolvedObject.Size())) - n40, err := m.InvolvedObject.MarshalTo(data[i:]) + n40, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } i += n40 + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(m.InvolvedObject.Size())) + n41, err := m.InvolvedObject.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n41 data[i] = 0x1a i++ i = encodeVarintGenerated(data, i, uint64(len(m.Reason))) @@ -2748,27 +2776,27 @@ func (m *Event) MarshalTo(data []byte) (int, error) { data[i] = 0x2a i++ i = encodeVarintGenerated(data, i, uint64(m.Source.Size())) - n41, err := m.Source.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n41 - data[i] = 0x32 - i++ - i = encodeVarintGenerated(data, i, uint64(m.FirstTimestamp.Size())) - n42, err := m.FirstTimestamp.MarshalTo(data[i:]) + n42, err := m.Source.MarshalTo(data[i:]) if err != nil { return 0, err } i += n42 - data[i] = 0x3a + data[i] = 0x32 i++ - i = encodeVarintGenerated(data, i, uint64(m.LastTimestamp.Size())) - n43, err := m.LastTimestamp.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.FirstTimestamp.Size())) + n43, err := m.FirstTimestamp.MarshalTo(data[i:]) if err != nil { return 0, err } i += n43 + data[i] = 0x3a + i++ + i = encodeVarintGenerated(data, i, uint64(m.LastTimestamp.Size())) + n44, err := m.LastTimestamp.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n44 data[i] = 0x40 i++ i = encodeVarintGenerated(data, i, uint64(m.Count)) @@ -2797,11 +2825,11 @@ func (m *EventList) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n44, err := m.ListMeta.MarshalTo(data[i:]) + n45, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n44 + i += n45 if len(m.Items) > 0 { for _, msg := range m.Items { data[i] = 0x12 @@ -2953,11 +2981,11 @@ func (m *FlexVolumeSource) MarshalTo(data []byte) (int, error) { data[i] = 0x1a i++ i = encodeVarintGenerated(data, i, uint64(m.SecretRef.Size())) - n45, err := m.SecretRef.MarshalTo(data[i:]) + n46, err := m.SecretRef.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n45 + i += n46 } data[i] = 0x20 i++ @@ -3136,11 +3164,11 @@ func (m *HTTPGetAction) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.Port.Size())) - n46, err := m.Port.MarshalTo(data[i:]) + n47, err := m.Port.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n46 + i += n47 data[i] = 0x1a i++ i = encodeVarintGenerated(data, i, uint64(len(m.Host))) @@ -3209,32 +3237,32 @@ func (m *Handler) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.Exec.Size())) - n47, err := m.Exec.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n47 - } - if m.HTTPGet != nil { - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(m.HTTPGet.Size())) - n48, err := m.HTTPGet.MarshalTo(data[i:]) + n48, err := m.Exec.MarshalTo(data[i:]) if err != nil { return 0, err } i += n48 } - if m.TCPSocket != nil { - data[i] = 0x1a + if m.HTTPGet != nil { + data[i] = 0x12 i++ - i = encodeVarintGenerated(data, i, uint64(m.TCPSocket.Size())) - n49, err := m.TCPSocket.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.HTTPGet.Size())) + n49, err := m.HTTPGet.MarshalTo(data[i:]) if err != nil { return 0, err } i += n49 } + if m.TCPSocket != nil { + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.TCPSocket.Size())) + n50, err := m.TCPSocket.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n50 + } return i, nil } @@ -3355,21 +3383,21 @@ func (m *Lifecycle) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.PostStart.Size())) - n50, err := m.PostStart.MarshalTo(data[i:]) + n51, err := m.PostStart.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n50 + i += n51 } if m.PreStop != nil { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.PreStop.Size())) - n51, err := m.PreStop.MarshalTo(data[i:]) + n52, err := m.PreStop.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n51 + i += n52 } return i, nil } @@ -3392,19 +3420,19 @@ func (m *LimitRange) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n52, err := m.ObjectMeta.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n52 - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) - n53, err := m.Spec.MarshalTo(data[i:]) + n53, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } i += n53 + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) + n54, err := m.Spec.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n54 return i, nil } @@ -3442,11 +3470,11 @@ func (m *LimitRangeItem) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64((&v).Size())) - n54, err := (&v).MarshalTo(data[i:]) + n55, err := (&v).MarshalTo(data[i:]) if err != nil { return 0, err } - i += n54 + i += n55 } } if len(m.Min) > 0 { @@ -3464,11 +3492,11 @@ func (m *LimitRangeItem) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64((&v).Size())) - n55, err := (&v).MarshalTo(data[i:]) + n56, err := (&v).MarshalTo(data[i:]) if err != nil { return 0, err } - i += n55 + i += n56 } } if len(m.Default) > 0 { @@ -3486,11 +3514,11 @@ func (m *LimitRangeItem) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64((&v).Size())) - n56, err := (&v).MarshalTo(data[i:]) + n57, err := (&v).MarshalTo(data[i:]) if err != nil { return 0, err } - i += n56 + i += n57 } } if len(m.DefaultRequest) > 0 { @@ -3508,11 +3536,11 @@ func (m *LimitRangeItem) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64((&v).Size())) - n57, err := (&v).MarshalTo(data[i:]) + n58, err := (&v).MarshalTo(data[i:]) if err != nil { return 0, err } - i += n57 + i += n58 } } if len(m.MaxLimitRequestRatio) > 0 { @@ -3530,11 +3558,11 @@ func (m *LimitRangeItem) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64((&v).Size())) - n58, err := (&v).MarshalTo(data[i:]) + n59, err := (&v).MarshalTo(data[i:]) if err != nil { return 0, err } - i += n58 + i += n59 } } return i, nil @@ -3558,11 +3586,11 @@ func (m *LimitRangeList) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n59, err := m.ListMeta.MarshalTo(data[i:]) + n60, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n59 + i += n60 if len(m.Items) > 0 { for _, msg := range m.Items { data[i] = 0x12 @@ -3626,11 +3654,11 @@ func (m *List) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n60, err := m.ListMeta.MarshalTo(data[i:]) + n61, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n60 + i += n61 if len(m.Items) > 0 { for _, msg := range m.Items { data[i] = 0x12 @@ -3819,27 +3847,27 @@ func (m *Namespace) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n61, err := m.ObjectMeta.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n61 - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) - n62, err := m.Spec.MarshalTo(data[i:]) + n62, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } i += n62 - data[i] = 0x1a + data[i] = 0x12 i++ - i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) - n63, err := m.Status.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) + n63, err := m.Spec.MarshalTo(data[i:]) if err != nil { return 0, err } i += n63 + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) + n64, err := m.Status.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n64 return i, nil } @@ -3861,11 +3889,11 @@ func (m *NamespaceList) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n64, err := m.ListMeta.MarshalTo(data[i:]) + n65, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n64 + i += n65 if len(m.Items) > 0 { for _, msg := range m.Items { data[i] = 0x12 @@ -3954,27 +3982,27 @@ func (m *Node) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n65, err := m.ObjectMeta.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n65 - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) - n66, err := m.Spec.MarshalTo(data[i:]) + n66, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } i += n66 - data[i] = 0x1a + data[i] = 0x12 i++ - i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) - n67, err := m.Status.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) + n67, err := m.Spec.MarshalTo(data[i:]) if err != nil { return 0, err } i += n67 + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) + n68, err := m.Status.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n68 return i, nil } @@ -4023,11 +4051,11 @@ func (m *NodeAffinity) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.RequiredDuringSchedulingIgnoredDuringExecution.Size())) - n68, err := m.RequiredDuringSchedulingIgnoredDuringExecution.MarshalTo(data[i:]) + n69, err := m.RequiredDuringSchedulingIgnoredDuringExecution.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n68 + i += n69 } if len(m.PreferredDuringSchedulingIgnoredDuringExecution) > 0 { for _, msg := range m.PreferredDuringSchedulingIgnoredDuringExecution { @@ -4070,19 +4098,19 @@ func (m *NodeCondition) MarshalTo(data []byte) (int, error) { data[i] = 0x1a i++ i = encodeVarintGenerated(data, i, uint64(m.LastHeartbeatTime.Size())) - n69, err := m.LastHeartbeatTime.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n69 - data[i] = 0x22 - i++ - i = encodeVarintGenerated(data, i, uint64(m.LastTransitionTime.Size())) - n70, err := m.LastTransitionTime.MarshalTo(data[i:]) + n70, err := m.LastHeartbeatTime.MarshalTo(data[i:]) if err != nil { return 0, err } i += n70 + data[i] = 0x22 + i++ + i = encodeVarintGenerated(data, i, uint64(m.LastTransitionTime.Size())) + n71, err := m.LastTransitionTime.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n71 data[i] = 0x2a i++ i = encodeVarintGenerated(data, i, uint64(len(m.Reason))) @@ -4112,11 +4140,11 @@ func (m *NodeDaemonEndpoints) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.KubeletEndpoint.Size())) - n71, err := m.KubeletEndpoint.MarshalTo(data[i:]) + n72, err := m.KubeletEndpoint.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n71 + i += n72 return i, nil } @@ -4138,11 +4166,11 @@ func (m *NodeList) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n72, err := m.ListMeta.MarshalTo(data[i:]) + n73, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n72 + i += n73 if len(m.Items) > 0 { for _, msg := range m.Items { data[i] = 0x12 @@ -4210,11 +4238,11 @@ func (m *NodeResources) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64((&v).Size())) - n73, err := (&v).MarshalTo(data[i:]) + n74, err := (&v).MarshalTo(data[i:]) if err != nil { return 0, err } - i += n73 + i += n74 } } return i, nil @@ -4389,11 +4417,11 @@ func (m *NodeStatus) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64((&v).Size())) - n74, err := (&v).MarshalTo(data[i:]) + n75, err := (&v).MarshalTo(data[i:]) if err != nil { return 0, err } - i += n74 + i += n75 } } if len(m.Allocatable) > 0 { @@ -4411,11 +4439,11 @@ func (m *NodeStatus) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64((&v).Size())) - n75, err := (&v).MarshalTo(data[i:]) + n76, err := (&v).MarshalTo(data[i:]) if err != nil { return 0, err } - i += n75 + i += n76 } } data[i] = 0x1a @@ -4449,19 +4477,19 @@ func (m *NodeStatus) MarshalTo(data []byte) (int, error) { data[i] = 0x32 i++ i = encodeVarintGenerated(data, i, uint64(m.DaemonEndpoints.Size())) - n76, err := m.DaemonEndpoints.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n76 - data[i] = 0x3a - i++ - i = encodeVarintGenerated(data, i, uint64(m.NodeInfo.Size())) - n77, err := m.NodeInfo.MarshalTo(data[i:]) + n77, err := m.DaemonEndpoints.MarshalTo(data[i:]) if err != nil { return 0, err } i += n77 + data[i] = 0x3a + i++ + i = encodeVarintGenerated(data, i, uint64(m.NodeInfo.Size())) + n78, err := m.NodeInfo.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n78 if len(m.Images) > 0 { for _, msg := range m.Images { data[i] = 0x42 @@ -4633,20 +4661,20 @@ func (m *ObjectMeta) MarshalTo(data []byte) (int, error) { data[i] = 0x42 i++ i = encodeVarintGenerated(data, i, uint64(m.CreationTimestamp.Size())) - n78, err := m.CreationTimestamp.MarshalTo(data[i:]) + n79, err := m.CreationTimestamp.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n78 + i += n79 if m.DeletionTimestamp != nil { data[i] = 0x4a i++ i = encodeVarintGenerated(data, i, uint64(m.DeletionTimestamp.Size())) - n79, err := m.DeletionTimestamp.MarshalTo(data[i:]) + n80, err := m.DeletionTimestamp.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n79 + i += n80 } if m.DeletionGracePeriodSeconds != nil { data[i] = 0x50 @@ -4785,27 +4813,27 @@ func (m *PersistentVolume) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n80, err := m.ObjectMeta.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n80 - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) - n81, err := m.Spec.MarshalTo(data[i:]) + n81, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } i += n81 - data[i] = 0x1a + data[i] = 0x12 i++ - i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) - n82, err := m.Status.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) + n82, err := m.Spec.MarshalTo(data[i:]) if err != nil { return 0, err } i += n82 + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) + n83, err := m.Status.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n83 return i, nil } @@ -4827,27 +4855,27 @@ func (m *PersistentVolumeClaim) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n83, err := m.ObjectMeta.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n83 - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) - n84, err := m.Spec.MarshalTo(data[i:]) + n84, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } i += n84 - data[i] = 0x1a + data[i] = 0x12 i++ - i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) - n85, err := m.Status.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) + n85, err := m.Spec.MarshalTo(data[i:]) if err != nil { return 0, err } i += n85 + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) + n86, err := m.Status.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n86 return i, nil } @@ -4869,11 +4897,11 @@ func (m *PersistentVolumeClaimList) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n86, err := m.ListMeta.MarshalTo(data[i:]) + n87, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n86 + i += n87 if len(m.Items) > 0 { for _, msg := range m.Items { data[i] = 0x12 @@ -4922,11 +4950,11 @@ func (m *PersistentVolumeClaimSpec) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.Resources.Size())) - n87, err := m.Resources.MarshalTo(data[i:]) + n88, err := m.Resources.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n87 + i += n88 data[i] = 0x1a i++ i = encodeVarintGenerated(data, i, uint64(len(m.VolumeName))) @@ -4935,11 +4963,11 @@ func (m *PersistentVolumeClaimSpec) MarshalTo(data []byte) (int, error) { data[i] = 0x22 i++ i = encodeVarintGenerated(data, i, uint64(m.Selector.Size())) - n88, err := m.Selector.MarshalTo(data[i:]) + n89, err := m.Selector.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n88 + i += n89 } return i, nil } @@ -4993,11 +5021,11 @@ func (m *PersistentVolumeClaimStatus) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64((&v).Size())) - n89, err := (&v).MarshalTo(data[i:]) + n90, err := (&v).MarshalTo(data[i:]) if err != nil { return 0, err } - i += n89 + i += n90 } } return i, nil @@ -5051,11 +5079,11 @@ func (m *PersistentVolumeList) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n90, err := m.ListMeta.MarshalTo(data[i:]) + n91, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n90 + i += n91 if len(m.Items) > 0 { for _, msg := range m.Items { data[i] = 0x12 @@ -5090,163 +5118,163 @@ func (m *PersistentVolumeSource) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.GCEPersistentDisk.Size())) - n91, err := m.GCEPersistentDisk.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n91 - } - if m.AWSElasticBlockStore != nil { - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(m.AWSElasticBlockStore.Size())) - n92, err := m.AWSElasticBlockStore.MarshalTo(data[i:]) + n92, err := m.GCEPersistentDisk.MarshalTo(data[i:]) if err != nil { return 0, err } i += n92 } - if m.HostPath != nil { - data[i] = 0x1a + if m.AWSElasticBlockStore != nil { + data[i] = 0x12 i++ - i = encodeVarintGenerated(data, i, uint64(m.HostPath.Size())) - n93, err := m.HostPath.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.AWSElasticBlockStore.Size())) + n93, err := m.AWSElasticBlockStore.MarshalTo(data[i:]) if err != nil { return 0, err } i += n93 } - if m.Glusterfs != nil { - data[i] = 0x22 + if m.HostPath != nil { + data[i] = 0x1a i++ - i = encodeVarintGenerated(data, i, uint64(m.Glusterfs.Size())) - n94, err := m.Glusterfs.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.HostPath.Size())) + n94, err := m.HostPath.MarshalTo(data[i:]) if err != nil { return 0, err } i += n94 } - if m.NFS != nil { - data[i] = 0x2a + if m.Glusterfs != nil { + data[i] = 0x22 i++ - i = encodeVarintGenerated(data, i, uint64(m.NFS.Size())) - n95, err := m.NFS.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.Glusterfs.Size())) + n95, err := m.Glusterfs.MarshalTo(data[i:]) if err != nil { return 0, err } i += n95 } - if m.RBD != nil { - data[i] = 0x32 + if m.NFS != nil { + data[i] = 0x2a i++ - i = encodeVarintGenerated(data, i, uint64(m.RBD.Size())) - n96, err := m.RBD.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.NFS.Size())) + n96, err := m.NFS.MarshalTo(data[i:]) if err != nil { return 0, err } i += n96 } - if m.ISCSI != nil { - data[i] = 0x3a + if m.RBD != nil { + data[i] = 0x32 i++ - i = encodeVarintGenerated(data, i, uint64(m.ISCSI.Size())) - n97, err := m.ISCSI.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.RBD.Size())) + n97, err := m.RBD.MarshalTo(data[i:]) if err != nil { return 0, err } i += n97 } - if m.Cinder != nil { - data[i] = 0x42 + if m.ISCSI != nil { + data[i] = 0x3a i++ - i = encodeVarintGenerated(data, i, uint64(m.Cinder.Size())) - n98, err := m.Cinder.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.ISCSI.Size())) + n98, err := m.ISCSI.MarshalTo(data[i:]) if err != nil { return 0, err } i += n98 } - if m.CephFS != nil { - data[i] = 0x4a + if m.Cinder != nil { + data[i] = 0x42 i++ - i = encodeVarintGenerated(data, i, uint64(m.CephFS.Size())) - n99, err := m.CephFS.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.Cinder.Size())) + n99, err := m.Cinder.MarshalTo(data[i:]) if err != nil { return 0, err } i += n99 } - if m.FC != nil { - data[i] = 0x52 + if m.CephFS != nil { + data[i] = 0x4a i++ - i = encodeVarintGenerated(data, i, uint64(m.FC.Size())) - n100, err := m.FC.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.CephFS.Size())) + n100, err := m.CephFS.MarshalTo(data[i:]) if err != nil { return 0, err } i += n100 } - if m.Flocker != nil { - data[i] = 0x5a + if m.FC != nil { + data[i] = 0x52 i++ - i = encodeVarintGenerated(data, i, uint64(m.Flocker.Size())) - n101, err := m.Flocker.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.FC.Size())) + n101, err := m.FC.MarshalTo(data[i:]) if err != nil { return 0, err } i += n101 } - if m.FlexVolume != nil { - data[i] = 0x62 + if m.Flocker != nil { + data[i] = 0x5a i++ - i = encodeVarintGenerated(data, i, uint64(m.FlexVolume.Size())) - n102, err := m.FlexVolume.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.Flocker.Size())) + n102, err := m.Flocker.MarshalTo(data[i:]) if err != nil { return 0, err } i += n102 } - if m.AzureFile != nil { - data[i] = 0x6a + if m.FlexVolume != nil { + data[i] = 0x62 i++ - i = encodeVarintGenerated(data, i, uint64(m.AzureFile.Size())) - n103, err := m.AzureFile.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.FlexVolume.Size())) + n103, err := m.FlexVolume.MarshalTo(data[i:]) if err != nil { return 0, err } i += n103 } - if m.VsphereVolume != nil { - data[i] = 0x72 + if m.AzureFile != nil { + data[i] = 0x6a i++ - i = encodeVarintGenerated(data, i, uint64(m.VsphereVolume.Size())) - n104, err := m.VsphereVolume.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.AzureFile.Size())) + n104, err := m.AzureFile.MarshalTo(data[i:]) if err != nil { return 0, err } i += n104 } - if m.Quobyte != nil { - data[i] = 0x7a + if m.VsphereVolume != nil { + data[i] = 0x72 i++ - i = encodeVarintGenerated(data, i, uint64(m.Quobyte.Size())) - n105, err := m.Quobyte.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.VsphereVolume.Size())) + n105, err := m.VsphereVolume.MarshalTo(data[i:]) if err != nil { return 0, err } i += n105 } + if m.Quobyte != nil { + data[i] = 0x7a + i++ + i = encodeVarintGenerated(data, i, uint64(m.Quobyte.Size())) + n106, err := m.Quobyte.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n106 + } if m.AzureDisk != nil { data[i] = 0x82 i++ data[i] = 0x1 i++ i = encodeVarintGenerated(data, i, uint64(m.AzureDisk.Size())) - n106, err := m.AzureDisk.MarshalTo(data[i:]) + n107, err := m.AzureDisk.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n106 + i += n107 } if m.PhotonPersistentDisk != nil { data[i] = 0x8a @@ -5254,11 +5282,11 @@ func (m *PersistentVolumeSource) MarshalTo(data []byte) (int, error) { data[i] = 0x1 i++ i = encodeVarintGenerated(data, i, uint64(m.PhotonPersistentDisk.Size())) - n107, err := m.PhotonPersistentDisk.MarshalTo(data[i:]) + n108, err := m.PhotonPersistentDisk.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n107 + i += n108 } return i, nil } @@ -5293,21 +5321,21 @@ func (m *PersistentVolumeSpec) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64((&v).Size())) - n108, err := (&v).MarshalTo(data[i:]) + n109, err := (&v).MarshalTo(data[i:]) if err != nil { return 0, err } - i += n108 + i += n109 } } data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.PersistentVolumeSource.Size())) - n109, err := m.PersistentVolumeSource.MarshalTo(data[i:]) + n110, err := m.PersistentVolumeSource.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n109 + i += n110 if len(m.AccessModes) > 0 { for _, s := range m.AccessModes { data[i] = 0x1a @@ -5327,11 +5355,11 @@ func (m *PersistentVolumeSpec) MarshalTo(data []byte) (int, error) { data[i] = 0x22 i++ i = encodeVarintGenerated(data, i, uint64(m.ClaimRef.Size())) - n110, err := m.ClaimRef.MarshalTo(data[i:]) + n111, err := m.ClaimRef.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n110 + i += n111 } data[i] = 0x2a i++ @@ -5414,27 +5442,27 @@ func (m *Pod) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n111, err := m.ObjectMeta.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n111 - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) - n112, err := m.Spec.MarshalTo(data[i:]) + n112, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } i += n112 - data[i] = 0x1a + data[i] = 0x12 i++ - i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) - n113, err := m.Status.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) + n113, err := m.Spec.MarshalTo(data[i:]) if err != nil { return 0, err } i += n113 + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) + n114, err := m.Status.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n114 return i, nil } @@ -5499,11 +5527,11 @@ func (m *PodAffinityTerm) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.LabelSelector.Size())) - n114, err := m.LabelSelector.MarshalTo(data[i:]) + n115, err := m.LabelSelector.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n114 + i += n115 } if len(m.Namespaces) > 0 { for _, s := range m.Namespaces { @@ -5649,19 +5677,19 @@ func (m *PodCondition) MarshalTo(data []byte) (int, error) { data[i] = 0x1a i++ i = encodeVarintGenerated(data, i, uint64(m.LastProbeTime.Size())) - n115, err := m.LastProbeTime.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n115 - data[i] = 0x22 - i++ - i = encodeVarintGenerated(data, i, uint64(m.LastTransitionTime.Size())) - n116, err := m.LastTransitionTime.MarshalTo(data[i:]) + n116, err := m.LastProbeTime.MarshalTo(data[i:]) if err != nil { return 0, err } i += n116 + data[i] = 0x22 + i++ + i = encodeVarintGenerated(data, i, uint64(m.LastTransitionTime.Size())) + n117, err := m.LastTransitionTime.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n117 data[i] = 0x2a i++ i = encodeVarintGenerated(data, i, uint64(len(m.Reason))) @@ -5760,11 +5788,11 @@ func (m *PodList) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n117, err := m.ListMeta.MarshalTo(data[i:]) + n118, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n117 + i += n118 if len(m.Items) > 0 { for _, msg := range m.Items { data[i] = 0x12 @@ -5824,11 +5852,11 @@ func (m *PodLogOptions) MarshalTo(data []byte) (int, error) { data[i] = 0x2a i++ i = encodeVarintGenerated(data, i, uint64(m.SinceTime.Size())) - n118, err := m.SinceTime.MarshalTo(data[i:]) + n119, err := m.SinceTime.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n118 + i += n119 } data[i] = 0x30 i++ @@ -5851,6 +5879,31 @@ func (m *PodLogOptions) MarshalTo(data []byte) (int, error) { return i, nil } +func (m *PodPortForwardOptions) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *PodPortForwardOptions) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Ports) > 0 { + for _, num := range m.Ports { + data[i] = 0x8 + i++ + i = encodeVarintGenerated(data, i, uint64(num)) + } + } + return i, nil +} + func (m *PodProxyOptions) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) @@ -5892,11 +5945,11 @@ func (m *PodSecurityContext) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.SELinuxOptions.Size())) - n119, err := m.SELinuxOptions.MarshalTo(data[i:]) + n120, err := m.SELinuxOptions.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n119 + i += n120 } if m.RunAsUser != nil { data[i] = 0x10 @@ -5947,11 +6000,11 @@ func (m *PodSignature) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.PodController.Size())) - n120, err := m.PodController.MarshalTo(data[i:]) + n121, err := m.PodController.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n120 + i += n121 } return i, nil } @@ -6070,11 +6123,11 @@ func (m *PodSpec) MarshalTo(data []byte) (int, error) { data[i] = 0x72 i++ i = encodeVarintGenerated(data, i, uint64(m.SecurityContext.Size())) - n121, err := m.SecurityContext.MarshalTo(data[i:]) + n122, err := m.SecurityContext.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n121 + i += n122 } if len(m.ImagePullSecrets) > 0 { for _, msg := range m.ImagePullSecrets { @@ -6106,12 +6159,18 @@ func (m *PodSpec) MarshalTo(data []byte) (int, error) { data[i] = 0x1 i++ i = encodeVarintGenerated(data, i, uint64(m.Affinity.Size())) - n122, err := m.Affinity.MarshalTo(data[i:]) + n123, err := m.Affinity.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n122 + i += n123 } + data[i] = 0x9a + i++ + data[i] = 0x1 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.SchedulerName))) + i += copy(data[i:], m.SchedulerName) return i, nil } @@ -6166,11 +6225,11 @@ func (m *PodStatus) MarshalTo(data []byte) (int, error) { data[i] = 0x3a i++ i = encodeVarintGenerated(data, i, uint64(m.StartTime.Size())) - n123, err := m.StartTime.MarshalTo(data[i:]) + n124, err := m.StartTime.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n123 + i += n124 } if len(m.ContainerStatuses) > 0 { for _, msg := range m.ContainerStatuses { @@ -6209,19 +6268,19 @@ func (m *PodStatusResult) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n124, err := m.ObjectMeta.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n124 - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) - n125, err := m.Status.MarshalTo(data[i:]) + n125, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } i += n125 + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) + n126, err := m.Status.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n126 return i, nil } @@ -6243,19 +6302,19 @@ func (m *PodTemplate) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n126, err := m.ObjectMeta.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n126 - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(m.Template.Size())) - n127, err := m.Template.MarshalTo(data[i:]) + n127, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } i += n127 + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(m.Template.Size())) + n128, err := m.Template.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n128 return i, nil } @@ -6277,11 +6336,11 @@ func (m *PodTemplateList) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n128, err := m.ListMeta.MarshalTo(data[i:]) + n129, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n128 + i += n129 if len(m.Items) > 0 { for _, msg := range m.Items { data[i] = 0x12 @@ -6315,19 +6374,19 @@ func (m *PodTemplateSpec) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n129, err := m.ObjectMeta.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n129 - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) - n130, err := m.Spec.MarshalTo(data[i:]) + n130, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } i += n130 + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) + n131, err := m.Spec.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n131 return i, nil } @@ -6373,19 +6432,19 @@ func (m *PreferAvoidPodsEntry) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.PodSignature.Size())) - n131, err := m.PodSignature.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n131 - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(m.EvictionTime.Size())) - n132, err := m.EvictionTime.MarshalTo(data[i:]) + n132, err := m.PodSignature.MarshalTo(data[i:]) if err != nil { return 0, err } i += n132 + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(m.EvictionTime.Size())) + n133, err := m.EvictionTime.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n133 data[i] = 0x1a i++ i = encodeVarintGenerated(data, i, uint64(len(m.Reason))) @@ -6418,11 +6477,11 @@ func (m *PreferredSchedulingTerm) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.Preference.Size())) - n133, err := m.Preference.MarshalTo(data[i:]) + n134, err := m.Preference.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n133 + i += n134 return i, nil } @@ -6444,11 +6503,11 @@ func (m *Probe) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.Handler.Size())) - n134, err := m.Handler.MarshalTo(data[i:]) + n135, err := m.Handler.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n134 + i += n135 data[i] = 0x10 i++ i = encodeVarintGenerated(data, i, uint64(m.InitialDelaySeconds)) @@ -6563,11 +6622,11 @@ func (m *RBDVolumeSource) MarshalTo(data []byte) (int, error) { data[i] = 0x3a i++ i = encodeVarintGenerated(data, i, uint64(m.SecretRef.Size())) - n135, err := m.SecretRef.MarshalTo(data[i:]) + n136, err := m.SecretRef.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n135 + i += n136 } data[i] = 0x40 i++ @@ -6598,11 +6657,11 @@ func (m *RangeAllocation) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n136, err := m.ObjectMeta.MarshalTo(data[i:]) + n137, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n136 + i += n137 data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(len(m.Range))) @@ -6634,27 +6693,27 @@ func (m *ReplicationController) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n137, err := m.ObjectMeta.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n137 - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) - n138, err := m.Spec.MarshalTo(data[i:]) + n138, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } i += n138 - data[i] = 0x1a + data[i] = 0x12 i++ - i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) - n139, err := m.Status.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) + n139, err := m.Spec.MarshalTo(data[i:]) if err != nil { return 0, err } i += n139 + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) + n140, err := m.Status.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n140 return i, nil } @@ -6684,11 +6743,11 @@ func (m *ReplicationControllerCondition) MarshalTo(data []byte) (int, error) { data[i] = 0x1a i++ i = encodeVarintGenerated(data, i, uint64(m.LastTransitionTime.Size())) - n140, err := m.LastTransitionTime.MarshalTo(data[i:]) + n141, err := m.LastTransitionTime.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n140 + i += n141 data[i] = 0x22 i++ i = encodeVarintGenerated(data, i, uint64(len(m.Reason))) @@ -6718,11 +6777,11 @@ func (m *ReplicationControllerList) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n141, err := m.ListMeta.MarshalTo(data[i:]) + n142, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n141 + i += n142 if len(m.Items) > 0 { for _, msg := range m.Items { data[i] = 0x12 @@ -6779,11 +6838,11 @@ func (m *ReplicationControllerSpec) MarshalTo(data []byte) (int, error) { data[i] = 0x1a i++ i = encodeVarintGenerated(data, i, uint64(m.Template.Size())) - n142, err := m.Template.MarshalTo(data[i:]) + n143, err := m.Template.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n142 + i += n143 } data[i] = 0x20 i++ @@ -6862,11 +6921,11 @@ func (m *ResourceFieldSelector) MarshalTo(data []byte) (int, error) { data[i] = 0x1a i++ i = encodeVarintGenerated(data, i, uint64(m.Divisor.Size())) - n143, err := m.Divisor.MarshalTo(data[i:]) + n144, err := m.Divisor.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n143 + i += n144 return i, nil } @@ -6888,27 +6947,27 @@ func (m *ResourceQuota) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n144, err := m.ObjectMeta.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n144 - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) - n145, err := m.Spec.MarshalTo(data[i:]) + n145, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } i += n145 - data[i] = 0x1a + data[i] = 0x12 i++ - i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) - n146, err := m.Status.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) + n146, err := m.Spec.MarshalTo(data[i:]) if err != nil { return 0, err } i += n146 + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) + n147, err := m.Status.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n147 return i, nil } @@ -6930,11 +6989,11 @@ func (m *ResourceQuotaList) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n147, err := m.ListMeta.MarshalTo(data[i:]) + n148, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n147 + i += n148 if len(m.Items) > 0 { for _, msg := range m.Items { data[i] = 0x12 @@ -6980,11 +7039,11 @@ func (m *ResourceQuotaSpec) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64((&v).Size())) - n148, err := (&v).MarshalTo(data[i:]) + n149, err := (&v).MarshalTo(data[i:]) if err != nil { return 0, err } - i += n148 + i += n149 } } if len(m.Scopes) > 0 { @@ -7035,11 +7094,11 @@ func (m *ResourceQuotaStatus) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64((&v).Size())) - n149, err := (&v).MarshalTo(data[i:]) + n150, err := (&v).MarshalTo(data[i:]) if err != nil { return 0, err } - i += n149 + i += n150 } } if len(m.Used) > 0 { @@ -7057,11 +7116,11 @@ func (m *ResourceQuotaStatus) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64((&v).Size())) - n150, err := (&v).MarshalTo(data[i:]) + n151, err := (&v).MarshalTo(data[i:]) if err != nil { return 0, err } - i += n150 + i += n151 } } return i, nil @@ -7097,11 +7156,11 @@ func (m *ResourceRequirements) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64((&v).Size())) - n151, err := (&v).MarshalTo(data[i:]) + n152, err := (&v).MarshalTo(data[i:]) if err != nil { return 0, err } - i += n151 + i += n152 } } if len(m.Requests) > 0 { @@ -7119,11 +7178,11 @@ func (m *ResourceRequirements) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64((&v).Size())) - n152, err := (&v).MarshalTo(data[i:]) + n153, err := (&v).MarshalTo(data[i:]) if err != nil { return 0, err } - i += n152 + i += n153 } } return i, nil @@ -7181,11 +7240,11 @@ func (m *Secret) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n153, err := m.ObjectMeta.MarshalTo(data[i:]) + n154, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n153 + i += n154 if len(m.Data) > 0 { for k := range m.Data { data[i] = 0x12 @@ -7227,6 +7286,32 @@ func (m *Secret) MarshalTo(data []byte) (int, error) { return i, nil } +func (m *SecretEnvSource) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *SecretEnvSource) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.LocalObjectReference.Size())) + n155, err := m.LocalObjectReference.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n155 + return i, nil +} + func (m *SecretKeySelector) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) @@ -7245,11 +7330,11 @@ func (m *SecretKeySelector) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.LocalObjectReference.Size())) - n154, err := m.LocalObjectReference.MarshalTo(data[i:]) + n156, err := m.LocalObjectReference.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n154 + i += n156 data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(len(m.Key))) @@ -7275,11 +7360,11 @@ func (m *SecretList) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n155, err := m.ListMeta.MarshalTo(data[i:]) + n157, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n155 + i += n157 if len(m.Items) > 0 { for _, msg := range m.Items { data[i] = 0x12 @@ -7353,11 +7438,11 @@ func (m *SecurityContext) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.Capabilities.Size())) - n156, err := m.Capabilities.MarshalTo(data[i:]) + n158, err := m.Capabilities.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n156 + i += n158 } if m.Privileged != nil { data[i] = 0x10 @@ -7373,11 +7458,11 @@ func (m *SecurityContext) MarshalTo(data []byte) (int, error) { data[i] = 0x1a i++ i = encodeVarintGenerated(data, i, uint64(m.SELinuxOptions.Size())) - n157, err := m.SELinuxOptions.MarshalTo(data[i:]) + n159, err := m.SELinuxOptions.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n157 + i += n159 } if m.RunAsUser != nil { data[i] = 0x20 @@ -7425,11 +7510,11 @@ func (m *SerializedReference) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.Reference.Size())) - n158, err := m.Reference.MarshalTo(data[i:]) + n160, err := m.Reference.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n158 + i += n160 return i, nil } @@ -7451,27 +7536,27 @@ func (m *Service) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n159, err := m.ObjectMeta.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n159 - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) - n160, err := m.Spec.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n160 - data[i] = 0x1a - i++ - i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) - n161, err := m.Status.MarshalTo(data[i:]) + n161, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } i += n161 + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) + n162, err := m.Spec.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n162 + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) + n163, err := m.Status.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n163 return i, nil } @@ -7493,11 +7578,11 @@ func (m *ServiceAccount) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n162, err := m.ObjectMeta.MarshalTo(data[i:]) + n164, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n162 + i += n164 if len(m.Secrets) > 0 { for _, msg := range m.Secrets { data[i] = 0x12 @@ -7543,11 +7628,11 @@ func (m *ServiceAccountList) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n163, err := m.ListMeta.MarshalTo(data[i:]) + n165, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n163 + i += n165 if len(m.Items) > 0 { for _, msg := range m.Items { data[i] = 0x12 @@ -7581,11 +7666,11 @@ func (m *ServiceList) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n164, err := m.ListMeta.MarshalTo(data[i:]) + n166, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n164 + i += n166 if len(m.Items) > 0 { for _, msg := range m.Items { data[i] = 0x12 @@ -7630,11 +7715,11 @@ func (m *ServicePort) MarshalTo(data []byte) (int, error) { data[i] = 0x22 i++ i = encodeVarintGenerated(data, i, uint64(m.TargetPort.Size())) - n165, err := m.TargetPort.MarshalTo(data[i:]) + n167, err := m.TargetPort.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n165 + i += n167 data[i] = 0x28 i++ i = encodeVarintGenerated(data, i, uint64(m.NodePort)) @@ -7793,11 +7878,11 @@ func (m *ServiceStatus) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.LoadBalancer.Size())) - n166, err := m.LoadBalancer.MarshalTo(data[i:]) + n168, err := m.LoadBalancer.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n166 + i += n168 return i, nil } @@ -7845,11 +7930,11 @@ func (m *TCPSocketAction) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.Port.Size())) - n167, err := m.Port.MarshalTo(data[i:]) + n169, err := m.Port.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n167 + i += n169 return i, nil } @@ -7939,11 +8024,11 @@ func (m *Volume) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.VolumeSource.Size())) - n168, err := m.VolumeSource.MarshalTo(data[i:]) + n170, err := m.VolumeSource.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n168 + i += n170 return i, nil } @@ -8004,163 +8089,163 @@ func (m *VolumeSource) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.HostPath.Size())) - n169, err := m.HostPath.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n169 - } - if m.EmptyDir != nil { - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(m.EmptyDir.Size())) - n170, err := m.EmptyDir.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n170 - } - if m.GCEPersistentDisk != nil { - data[i] = 0x1a - i++ - i = encodeVarintGenerated(data, i, uint64(m.GCEPersistentDisk.Size())) - n171, err := m.GCEPersistentDisk.MarshalTo(data[i:]) + n171, err := m.HostPath.MarshalTo(data[i:]) if err != nil { return 0, err } i += n171 } - if m.AWSElasticBlockStore != nil { - data[i] = 0x22 + if m.EmptyDir != nil { + data[i] = 0x12 i++ - i = encodeVarintGenerated(data, i, uint64(m.AWSElasticBlockStore.Size())) - n172, err := m.AWSElasticBlockStore.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.EmptyDir.Size())) + n172, err := m.EmptyDir.MarshalTo(data[i:]) if err != nil { return 0, err } i += n172 } - if m.GitRepo != nil { - data[i] = 0x2a + if m.GCEPersistentDisk != nil { + data[i] = 0x1a i++ - i = encodeVarintGenerated(data, i, uint64(m.GitRepo.Size())) - n173, err := m.GitRepo.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.GCEPersistentDisk.Size())) + n173, err := m.GCEPersistentDisk.MarshalTo(data[i:]) if err != nil { return 0, err } i += n173 } - if m.Secret != nil { - data[i] = 0x32 + if m.AWSElasticBlockStore != nil { + data[i] = 0x22 i++ - i = encodeVarintGenerated(data, i, uint64(m.Secret.Size())) - n174, err := m.Secret.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.AWSElasticBlockStore.Size())) + n174, err := m.AWSElasticBlockStore.MarshalTo(data[i:]) if err != nil { return 0, err } i += n174 } - if m.NFS != nil { - data[i] = 0x3a + if m.GitRepo != nil { + data[i] = 0x2a i++ - i = encodeVarintGenerated(data, i, uint64(m.NFS.Size())) - n175, err := m.NFS.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.GitRepo.Size())) + n175, err := m.GitRepo.MarshalTo(data[i:]) if err != nil { return 0, err } i += n175 } - if m.ISCSI != nil { - data[i] = 0x42 + if m.Secret != nil { + data[i] = 0x32 i++ - i = encodeVarintGenerated(data, i, uint64(m.ISCSI.Size())) - n176, err := m.ISCSI.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.Secret.Size())) + n176, err := m.Secret.MarshalTo(data[i:]) if err != nil { return 0, err } i += n176 } - if m.Glusterfs != nil { - data[i] = 0x4a + if m.NFS != nil { + data[i] = 0x3a i++ - i = encodeVarintGenerated(data, i, uint64(m.Glusterfs.Size())) - n177, err := m.Glusterfs.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.NFS.Size())) + n177, err := m.NFS.MarshalTo(data[i:]) if err != nil { return 0, err } i += n177 } - if m.PersistentVolumeClaim != nil { - data[i] = 0x52 + if m.ISCSI != nil { + data[i] = 0x42 i++ - i = encodeVarintGenerated(data, i, uint64(m.PersistentVolumeClaim.Size())) - n178, err := m.PersistentVolumeClaim.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.ISCSI.Size())) + n178, err := m.ISCSI.MarshalTo(data[i:]) if err != nil { return 0, err } i += n178 } - if m.RBD != nil { - data[i] = 0x5a + if m.Glusterfs != nil { + data[i] = 0x4a i++ - i = encodeVarintGenerated(data, i, uint64(m.RBD.Size())) - n179, err := m.RBD.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.Glusterfs.Size())) + n179, err := m.Glusterfs.MarshalTo(data[i:]) if err != nil { return 0, err } i += n179 } - if m.FlexVolume != nil { - data[i] = 0x62 + if m.PersistentVolumeClaim != nil { + data[i] = 0x52 i++ - i = encodeVarintGenerated(data, i, uint64(m.FlexVolume.Size())) - n180, err := m.FlexVolume.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.PersistentVolumeClaim.Size())) + n180, err := m.PersistentVolumeClaim.MarshalTo(data[i:]) if err != nil { return 0, err } i += n180 } - if m.Cinder != nil { - data[i] = 0x6a + if m.RBD != nil { + data[i] = 0x5a i++ - i = encodeVarintGenerated(data, i, uint64(m.Cinder.Size())) - n181, err := m.Cinder.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.RBD.Size())) + n181, err := m.RBD.MarshalTo(data[i:]) if err != nil { return 0, err } i += n181 } - if m.CephFS != nil { - data[i] = 0x72 + if m.FlexVolume != nil { + data[i] = 0x62 i++ - i = encodeVarintGenerated(data, i, uint64(m.CephFS.Size())) - n182, err := m.CephFS.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.FlexVolume.Size())) + n182, err := m.FlexVolume.MarshalTo(data[i:]) if err != nil { return 0, err } i += n182 } - if m.Flocker != nil { - data[i] = 0x7a + if m.Cinder != nil { + data[i] = 0x6a i++ - i = encodeVarintGenerated(data, i, uint64(m.Flocker.Size())) - n183, err := m.Flocker.MarshalTo(data[i:]) + i = encodeVarintGenerated(data, i, uint64(m.Cinder.Size())) + n183, err := m.Cinder.MarshalTo(data[i:]) if err != nil { return 0, err } i += n183 } + if m.CephFS != nil { + data[i] = 0x72 + i++ + i = encodeVarintGenerated(data, i, uint64(m.CephFS.Size())) + n184, err := m.CephFS.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n184 + } + if m.Flocker != nil { + data[i] = 0x7a + i++ + i = encodeVarintGenerated(data, i, uint64(m.Flocker.Size())) + n185, err := m.Flocker.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n185 + } if m.DownwardAPI != nil { data[i] = 0x82 i++ data[i] = 0x1 i++ i = encodeVarintGenerated(data, i, uint64(m.DownwardAPI.Size())) - n184, err := m.DownwardAPI.MarshalTo(data[i:]) + n186, err := m.DownwardAPI.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n184 + i += n186 } if m.FC != nil { data[i] = 0x8a @@ -8168,11 +8253,11 @@ func (m *VolumeSource) MarshalTo(data []byte) (int, error) { data[i] = 0x1 i++ i = encodeVarintGenerated(data, i, uint64(m.FC.Size())) - n185, err := m.FC.MarshalTo(data[i:]) + n187, err := m.FC.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n185 + i += n187 } if m.AzureFile != nil { data[i] = 0x92 @@ -8180,11 +8265,11 @@ func (m *VolumeSource) MarshalTo(data []byte) (int, error) { data[i] = 0x1 i++ i = encodeVarintGenerated(data, i, uint64(m.AzureFile.Size())) - n186, err := m.AzureFile.MarshalTo(data[i:]) + n188, err := m.AzureFile.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n186 + i += n188 } if m.ConfigMap != nil { data[i] = 0x9a @@ -8192,11 +8277,11 @@ func (m *VolumeSource) MarshalTo(data []byte) (int, error) { data[i] = 0x1 i++ i = encodeVarintGenerated(data, i, uint64(m.ConfigMap.Size())) - n187, err := m.ConfigMap.MarshalTo(data[i:]) + n189, err := m.ConfigMap.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n187 + i += n189 } if m.VsphereVolume != nil { data[i] = 0xa2 @@ -8204,11 +8289,11 @@ func (m *VolumeSource) MarshalTo(data []byte) (int, error) { data[i] = 0x1 i++ i = encodeVarintGenerated(data, i, uint64(m.VsphereVolume.Size())) - n188, err := m.VsphereVolume.MarshalTo(data[i:]) + n190, err := m.VsphereVolume.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n188 + i += n190 } if m.Quobyte != nil { data[i] = 0xaa @@ -8216,11 +8301,11 @@ func (m *VolumeSource) MarshalTo(data []byte) (int, error) { data[i] = 0x1 i++ i = encodeVarintGenerated(data, i, uint64(m.Quobyte.Size())) - n189, err := m.Quobyte.MarshalTo(data[i:]) + n191, err := m.Quobyte.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n189 + i += n191 } if m.AzureDisk != nil { data[i] = 0xb2 @@ -8228,11 +8313,11 @@ func (m *VolumeSource) MarshalTo(data []byte) (int, error) { data[i] = 0x1 i++ i = encodeVarintGenerated(data, i, uint64(m.AzureDisk.Size())) - n190, err := m.AzureDisk.MarshalTo(data[i:]) + n192, err := m.AzureDisk.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n190 + i += n192 } if m.PhotonPersistentDisk != nil { data[i] = 0xba @@ -8240,11 +8325,11 @@ func (m *VolumeSource) MarshalTo(data []byte) (int, error) { data[i] = 0x1 i++ i = encodeVarintGenerated(data, i, uint64(m.PhotonPersistentDisk.Size())) - n191, err := m.PhotonPersistentDisk.MarshalTo(data[i:]) + n193, err := m.PhotonPersistentDisk.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n191 + i += n193 } return i, nil } @@ -8296,11 +8381,11 @@ func (m *WeightedPodAffinityTerm) MarshalTo(data []byte) (int, error) { data[i] = 0x12 i++ i = encodeVarintGenerated(data, i, uint64(m.PodAffinityTerm.Size())) - n192, err := m.PodAffinityTerm.MarshalTo(data[i:]) + n194, err := m.PodAffinityTerm.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n192 + i += n194 return i, nil } @@ -8654,6 +8739,8 @@ func (m *Container) Size() (n int) { n += 2 + l + sovGenerated(uint64(l)) } } + l = len(m.TerminationMessagePolicy) + n += 2 + l + sovGenerated(uint64(l)) return n } @@ -8913,6 +9000,10 @@ func (m *EnvFromSource) Size() (n int) { l = m.ConfigMapRef.Size() n += 1 + l + sovGenerated(uint64(l)) } + if m.SecretRef != nil { + l = m.SecretRef.Size() + n += 1 + l + sovGenerated(uint64(l)) + } return n } @@ -10111,6 +10202,17 @@ func (m *PodLogOptions) Size() (n int) { return n } +func (m *PodPortForwardOptions) Size() (n int) { + var l int + _ = l + if len(m.Ports) > 0 { + for _, e := range m.Ports { + n += 1 + sovGenerated(uint64(e)) + } + } + return n +} + func (m *PodProxyOptions) Size() (n int) { var l int _ = l @@ -10213,6 +10315,8 @@ func (m *PodSpec) Size() (n int) { l = m.Affinity.Size() n += 2 + l + sovGenerated(uint64(l)) } + l = len(m.SchedulerName) + n += 2 + l + sovGenerated(uint64(l)) return n } @@ -10624,6 +10728,14 @@ func (m *Secret) Size() (n int) { return n } +func (m *SecretEnvSource) Size() (n int) { + var l int + _ = l + l = m.LocalObjectReference.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + func (m *SecretKeySelector) Size() (n int) { var l int _ = l @@ -11111,7 +11223,7 @@ func (this *Binding) String() string { return "nil" } s := strings.Join([]string{`&Binding{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Target:` + strings.Replace(strings.Replace(this.Target.String(), "ObjectReference", "ObjectReference", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -11173,7 +11285,7 @@ func (this *ComponentStatus) String() string { return "nil" } s := strings.Join([]string{`&ComponentStatus{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Conditions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Conditions), "ComponentCondition", "ComponentCondition", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -11205,7 +11317,7 @@ func (this *ConfigMap) String() string { } mapStringForData += "}" s := strings.Join([]string{`&ConfigMap{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Data:` + mapStringForData + `,`, `}`, }, "") @@ -11279,6 +11391,7 @@ func (this *Container) String() string { `StdinOnce:` + fmt.Sprintf("%v", this.StdinOnce) + `,`, `TTY:` + fmt.Sprintf("%v", this.TTY) + `,`, `EnvFrom:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.EnvFrom), "EnvFromSource", "EnvFromSource", 1), `&`, ``, 1) + `,`, + `TerminationMessagePolicy:` + fmt.Sprintf("%v", this.TerminationMessagePolicy) + `,`, `}`, }, "") return s @@ -11472,7 +11585,7 @@ func (this *Endpoints) String() string { return "nil" } s := strings.Join([]string{`&Endpoints{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Subsets:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Subsets), "EndpointSubset", "EndpointSubset", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -11496,6 +11609,7 @@ func (this *EnvFromSource) String() string { s := strings.Join([]string{`&EnvFromSource{`, `Prefix:` + fmt.Sprintf("%v", this.Prefix) + `,`, `ConfigMapRef:` + strings.Replace(fmt.Sprintf("%v", this.ConfigMapRef), "ConfigMapEnvSource", "ConfigMapEnvSource", 1) + `,`, + `SecretRef:` + strings.Replace(fmt.Sprintf("%v", this.SecretRef), "SecretEnvSource", "SecretEnvSource", 1) + `,`, `}`, }, "") return s @@ -11530,7 +11644,7 @@ func (this *Event) String() string { return "nil" } s := strings.Join([]string{`&Event{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `InvolvedObject:` + strings.Replace(strings.Replace(this.InvolvedObject.String(), "ObjectReference", "ObjectReference", 1), `&`, ``, 1) + `,`, `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, `Message:` + fmt.Sprintf("%v", this.Message) + `,`, @@ -11750,7 +11864,7 @@ func (this *LimitRange) String() string { return "nil" } s := strings.Join([]string{`&LimitRange{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "LimitRangeSpec", "LimitRangeSpec", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -11915,7 +12029,7 @@ func (this *Namespace) String() string { return "nil" } s := strings.Join([]string{`&Namespace{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "NamespaceSpec", "NamespaceSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "NamespaceStatus", "NamespaceStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -11958,7 +12072,7 @@ func (this *Node) String() string { return "nil" } s := strings.Join([]string{`&Node{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "NodeSpec", "NodeSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "NodeStatus", "NodeStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -12232,7 +12346,7 @@ func (this *PersistentVolume) String() string { return "nil" } s := strings.Join([]string{`&PersistentVolume{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PersistentVolumeSpec", "PersistentVolumeSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "PersistentVolumeStatus", "PersistentVolumeStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -12244,7 +12358,7 @@ func (this *PersistentVolumeClaim) String() string { return "nil" } s := strings.Join([]string{`&PersistentVolumeClaim{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PersistentVolumeClaimSpec", "PersistentVolumeClaimSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "PersistentVolumeClaimStatus", "PersistentVolumeClaimStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -12397,7 +12511,7 @@ func (this *Pod) String() string { return "nil" } s := strings.Join([]string{`&Pod{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PodSpec", "PodSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "PodStatus", "PodStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -12510,6 +12624,16 @@ func (this *PodLogOptions) String() string { }, "") return s } +func (this *PodPortForwardOptions) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PodPortForwardOptions{`, + `Ports:` + fmt.Sprintf("%v", this.Ports) + `,`, + `}`, + }, "") + return s +} func (this *PodProxyOptions) String() string { if this == nil { return "nil" @@ -12577,6 +12701,7 @@ func (this *PodSpec) String() string { `Hostname:` + fmt.Sprintf("%v", this.Hostname) + `,`, `Subdomain:` + fmt.Sprintf("%v", this.Subdomain) + `,`, `Affinity:` + strings.Replace(fmt.Sprintf("%v", this.Affinity), "Affinity", "Affinity", 1) + `,`, + `SchedulerName:` + fmt.Sprintf("%v", this.SchedulerName) + `,`, `}`, }, "") return s @@ -12604,7 +12729,7 @@ func (this *PodStatusResult) String() string { return "nil" } s := strings.Join([]string{`&PodStatusResult{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "PodStatus", "PodStatus", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -12615,7 +12740,7 @@ func (this *PodTemplate) String() string { return "nil" } s := strings.Join([]string{`&PodTemplate{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Template:` + strings.Replace(strings.Replace(this.Template.String(), "PodTemplateSpec", "PodTemplateSpec", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -12637,7 +12762,7 @@ func (this *PodTemplateSpec) String() string { return "nil" } s := strings.Join([]string{`&PodTemplateSpec{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PodSpec", "PodSpec", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -12728,7 +12853,7 @@ func (this *RangeAllocation) String() string { return "nil" } s := strings.Join([]string{`&RangeAllocation{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Range:` + fmt.Sprintf("%v", this.Range) + `,`, `Data:` + valueToStringGenerated(this.Data) + `,`, `}`, @@ -12740,7 +12865,7 @@ func (this *ReplicationController) String() string { return "nil" } s := strings.Join([]string{`&ReplicationController{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ReplicationControllerSpec", "ReplicationControllerSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ReplicationControllerStatus", "ReplicationControllerStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -12827,7 +12952,7 @@ func (this *ResourceQuota) String() string { return "nil" } s := strings.Join([]string{`&ResourceQuota{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ResourceQuotaSpec", "ResourceQuotaSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ResourceQuotaStatus", "ResourceQuotaStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -12966,7 +13091,7 @@ func (this *Secret) String() string { } mapStringForStringData += "}" s := strings.Join([]string{`&Secret{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Data:` + mapStringForData + `,`, `Type:` + fmt.Sprintf("%v", this.Type) + `,`, `StringData:` + mapStringForStringData + `,`, @@ -12974,6 +13099,16 @@ func (this *Secret) String() string { }, "") return s } +func (this *SecretEnvSource) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SecretEnvSource{`, + `LocalObjectReference:` + strings.Replace(strings.Replace(this.LocalObjectReference.String(), "LocalObjectReference", "LocalObjectReference", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} func (this *SecretKeySelector) String() string { if this == nil { return "nil" @@ -13038,7 +13173,7 @@ func (this *Service) String() string { return "nil" } s := strings.Join([]string{`&Service{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ServiceSpec", "ServiceSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ServiceStatus", "ServiceStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -13050,7 +13185,7 @@ func (this *ServiceAccount) String() string { return "nil" } s := strings.Join([]string{`&ServiceAccount{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Secrets:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Secrets), "ObjectReference", "ObjectReference", 1), `&`, ``, 1) + `,`, `ImagePullSecrets:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ImagePullSecrets), "LocalObjectReference", "LocalObjectReference", 1), `&`, ``, 1) + `,`, `}`, @@ -16229,6 +16364,35 @@ func (m *Container) Unmarshal(data []byte) error { return err } iNdEx = postIndex + case 20: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TerminationMessagePolicy", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TerminationMessagePolicy = TerminationMessagePolicy(data[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(data[iNdEx:]) @@ -18652,6 +18816,39 @@ func (m *EnvFromSource) Unmarshal(data []byte) error { return err } iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SecretRef", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SecretRef == nil { + m.SecretRef = &SecretEnvSource{} + } + if err := m.SecretRef.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(data[iNdEx:]) @@ -30479,6 +30676,76 @@ func (m *PodLogOptions) Unmarshal(data []byte) error { } return nil } +func (m *PodPortForwardOptions) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PodPortForwardOptions: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PodPortForwardOptions: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Ports", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Ports = append(m.Ports, v) + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *PodProxyOptions) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 @@ -31407,6 +31674,35 @@ func (m *PodSpec) Unmarshal(data []byte) error { return err } iNdEx = postIndex + case 19: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SchedulerName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SchedulerName = string(data[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(data[iNdEx:]) @@ -35815,6 +36111,86 @@ func (m *Secret) Unmarshal(data []byte) error { } return nil } +func (m *SecretEnvSource) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SecretEnvSource: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SecretEnvSource: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LocalObjectReference", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.LocalObjectReference.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *SecretKeySelector) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 @@ -39586,640 +39962,647 @@ var ( ) var fileDescriptorGenerated = []byte{ - // 10157 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x7d, 0x6d, 0x6c, 0x24, 0xc9, - 0x75, 0x98, 0x7a, 0x86, 0x5f, 0xf3, 0xf8, 0xb9, 0xb5, 0x1f, 0xc7, 0xa3, 0xee, 0x96, 0x7b, 0x7d, - 0xba, 0xd3, 0xde, 0xdd, 0x1e, 0x79, 0xbb, 0x77, 0xa7, 0x5b, 0xe9, 0x94, 0x93, 0x48, 0x0e, 0xb9, - 0x4b, 0xed, 0x07, 0xe7, 0x6a, 0xb8, 0xbb, 0x27, 0xe9, 0x22, 0xa9, 0x39, 0x5d, 0x24, 0x5b, 0xdb, - 0xd3, 0x3d, 0xd7, 0xdd, 0xc3, 0x5d, 0x4a, 0x11, 0xe0, 0xc8, 0x17, 0x1b, 0x81, 0x85, 0x44, 0x49, - 0x20, 0x24, 0x80, 0xf3, 0xa1, 0x04, 0x70, 0xe0, 0xc4, 0x88, 0x1d, 0x45, 0xfe, 0x90, 0x63, 0xc5, - 0x41, 0x10, 0xdb, 0x91, 0x13, 0x24, 0x90, 0x61, 0x20, 0x36, 0x6c, 0x80, 0xf1, 0xd1, 0x41, 0x7e, - 0xe6, 0x47, 0xfc, 0x2b, 0x84, 0x91, 0x04, 0xf5, 0xd9, 0x55, 0x3d, 0x33, 0xec, 0x1e, 0xde, 0x92, - 0x3a, 0x19, 0xf9, 0x37, 0xf3, 0xde, 0xab, 0x57, 0x1f, 0x5d, 0xf5, 0xea, 0xbd, 0x57, 0xaf, 0x5e, - 0xc1, 0xa5, 0xfb, 0x57, 0xe3, 0x39, 0x2f, 0x9c, 0xbf, 0xdf, 0xde, 0x20, 0x51, 0x40, 0x12, 0x12, - 0xcf, 0xb7, 0xee, 0x6f, 0xcd, 0x3b, 0x2d, 0x6f, 0x7e, 0xe7, 0xf2, 0xfc, 0x16, 0x09, 0x48, 0xe4, - 0x24, 0xc4, 0x9d, 0x6b, 0x45, 0x61, 0x12, 0xa2, 0x27, 0x38, 0xf5, 0x5c, 0x4a, 0x3d, 0xd7, 0xba, - 0xbf, 0x35, 0xe7, 0xb4, 0xbc, 0xb9, 0x9d, 0xcb, 0x33, 0x2f, 0x6e, 0x79, 0xc9, 0x76, 0x7b, 0x63, - 0xae, 0x11, 0x36, 0xe7, 0xb7, 0xc2, 0xad, 0x70, 0x9e, 0x15, 0xda, 0x68, 0x6f, 0xb2, 0x7f, 0xec, - 0x0f, 0xfb, 0xc5, 0x99, 0xcd, 0xbc, 0x22, 0xaa, 0x76, 0x5a, 0x5e, 0xd3, 0x69, 0x6c, 0x7b, 0x01, - 0x89, 0x76, 0x65, 0xe5, 0xf1, 0x7c, 0x93, 0x24, 0x4e, 0x97, 0x26, 0xcc, 0xcc, 0xf7, 0x2a, 0x15, - 0xb5, 0x83, 0xc4, 0x6b, 0x92, 0x8e, 0x02, 0x1f, 0xcb, 0x2b, 0x10, 0x37, 0xb6, 0x49, 0xd3, 0xe9, - 0x28, 0x77, 0xa5, 0xf7, 0xc8, 0x44, 0x24, 0x0e, 0xdb, 0x51, 0xa3, 0xb3, 0xae, 0xcb, 0xdd, 0xcb, - 0xb4, 0x13, 0xcf, 0x9f, 0xf7, 0x82, 0x24, 0x4e, 0xa2, 0x6c, 0x11, 0xfb, 0x0f, 0x2c, 0xb8, 0xb0, - 0x70, 0xaf, 0xbe, 0xec, 0x3b, 0x71, 0xe2, 0x35, 0x16, 0xfd, 0xb0, 0x71, 0xbf, 0x9e, 0x84, 0x11, - 0xb9, 0x1b, 0xfa, 0xed, 0x26, 0xa9, 0xb3, 0x7a, 0xd0, 0x25, 0x18, 0xd9, 0x61, 0xff, 0x57, 0xab, - 0xd3, 0xd6, 0x05, 0xeb, 0x62, 0x65, 0x71, 0xea, 0x07, 0x7b, 0xb3, 0x1f, 0xda, 0xdf, 0x9b, 0x1d, - 0xb9, 0x2b, 0xe0, 0x58, 0x51, 0xa0, 0x67, 0x61, 0x68, 0x33, 0x5e, 0xdf, 0x6d, 0x91, 0xe9, 0x12, - 0xa3, 0x9d, 0x10, 0xb4, 0x43, 0x2b, 0x75, 0x0a, 0xc5, 0x02, 0x8b, 0xe6, 0xa1, 0xd2, 0x72, 0xa2, - 0xc4, 0x4b, 0xbc, 0x30, 0x98, 0x2e, 0x5f, 0xb0, 0x2e, 0x0e, 0x2e, 0x9e, 0x12, 0xa4, 0x95, 0x9a, - 0x44, 0xe0, 0x94, 0x86, 0x36, 0x23, 0x22, 0x8e, 0xbb, 0x16, 0xf8, 0xbb, 0xd3, 0x03, 0x17, 0xac, - 0x8b, 0x23, 0x69, 0x33, 0xb0, 0x80, 0x63, 0x45, 0x61, 0x7f, 0xaf, 0x04, 0x23, 0x0b, 0x9b, 0x9b, - 0x5e, 0xe0, 0x25, 0xbb, 0xe8, 0x4b, 0x30, 0x16, 0x84, 0x2e, 0x91, 0xff, 0x59, 0x2f, 0x46, 0xaf, - 0x3c, 0x3f, 0x77, 0xd8, 0x84, 0x9a, 0xbb, 0xad, 0x95, 0x58, 0x9c, 0xda, 0xdf, 0x9b, 0x1d, 0xd3, - 0x21, 0xd8, 0xe0, 0x88, 0xde, 0x86, 0xd1, 0x56, 0xe8, 0xaa, 0x0a, 0x4a, 0xac, 0x82, 0xe7, 0x0e, - 0xaf, 0xa0, 0x96, 0x16, 0x58, 0x9c, 0xdc, 0xdf, 0x9b, 0x1d, 0xd5, 0x00, 0x58, 0x67, 0x87, 0x7c, - 0x98, 0xa4, 0x7f, 0x83, 0xc4, 0x53, 0x35, 0x94, 0x59, 0x0d, 0x2f, 0xe6, 0xd7, 0xa0, 0x15, 0x5a, - 0x3c, 0xbd, 0xbf, 0x37, 0x3b, 0x99, 0x01, 0xe2, 0x2c, 0x6b, 0xfb, 0x2b, 0x30, 0xb1, 0x90, 0x24, - 0x4e, 0x63, 0x9b, 0xb8, 0xfc, 0xfb, 0xa2, 0x57, 0x60, 0x20, 0x70, 0x9a, 0x44, 0x7c, 0xfd, 0x0b, - 0x62, 0xd8, 0x07, 0x6e, 0x3b, 0x4d, 0x72, 0xb0, 0x37, 0x3b, 0x75, 0x27, 0xf0, 0xde, 0x69, 0x8b, - 0x39, 0x43, 0x61, 0x98, 0x51, 0xa3, 0x2b, 0x00, 0x2e, 0xd9, 0xf1, 0x1a, 0xa4, 0xe6, 0x24, 0xdb, - 0x62, 0x36, 0x20, 0x51, 0x16, 0xaa, 0x0a, 0x83, 0x35, 0x2a, 0xfb, 0xeb, 0x16, 0x54, 0x16, 0x76, - 0x42, 0xcf, 0xad, 0x85, 0x6e, 0x8c, 0xda, 0x30, 0xd9, 0x8a, 0xc8, 0x26, 0x89, 0x14, 0x68, 0xda, - 0xba, 0x50, 0xbe, 0x38, 0x7a, 0xe5, 0x4a, 0x4e, 0xbf, 0xcd, 0x42, 0xcb, 0x41, 0x12, 0xed, 0x2e, - 0x3e, 0x26, 0xaa, 0x9e, 0xcc, 0x60, 0x71, 0xb6, 0x0e, 0xfb, 0x6f, 0x95, 0xe0, 0xec, 0xc2, 0x57, - 0xda, 0x11, 0xa9, 0x7a, 0xf1, 0xfd, 0xec, 0x52, 0x70, 0xbd, 0xf8, 0xfe, 0xed, 0x74, 0x30, 0xd4, - 0x1c, 0xac, 0x0a, 0x38, 0x56, 0x14, 0xe8, 0x45, 0x18, 0xa6, 0xbf, 0xef, 0xe0, 0x55, 0xd1, 0xfb, - 0xd3, 0x82, 0x78, 0xb4, 0xea, 0x24, 0x4e, 0x95, 0xa3, 0xb0, 0xa4, 0x41, 0xb7, 0x60, 0xb4, 0xc1, - 0x64, 0xc4, 0xd6, 0xad, 0xd0, 0x25, 0xec, 0x0b, 0x57, 0x16, 0x5f, 0xa0, 0xe4, 0x4b, 0x29, 0xf8, - 0x60, 0x6f, 0x76, 0x9a, 0xb7, 0x4d, 0xb0, 0xd0, 0x70, 0x58, 0x2f, 0x8f, 0x6c, 0xb5, 0x10, 0x07, - 0x18, 0x27, 0xe8, 0xb2, 0x08, 0x2f, 0x6a, 0x6b, 0x6a, 0x90, 0xad, 0xa9, 0xb1, 0x1e, 0xeb, 0xe9, - 0x9f, 0x5b, 0x62, 0x4c, 0x56, 0x3c, 0xdf, 0x14, 0x0f, 0x57, 0x00, 0x62, 0xd2, 0x88, 0x48, 0xa2, - 0x8d, 0x8a, 0xfa, 0xcc, 0x75, 0x85, 0xc1, 0x1a, 0x15, 0x5d, 0xfc, 0xf1, 0xb6, 0x13, 0xb1, 0xd9, - 0x22, 0xc6, 0x46, 0x2d, 0xfe, 0xba, 0x44, 0xe0, 0x94, 0xc6, 0x58, 0xfc, 0xe5, 0xdc, 0xc5, 0xff, - 0xaf, 0x2d, 0x18, 0x5e, 0xf4, 0x02, 0xd7, 0x0b, 0xb6, 0xd0, 0x5b, 0x30, 0x42, 0xa5, 0xb9, 0xeb, - 0x24, 0x8e, 0x58, 0xf7, 0x17, 0x0f, 0x9f, 0x3c, 0x6b, 0x1b, 0x5f, 0x26, 0x8d, 0xe4, 0x16, 0x49, - 0x9c, 0xb4, 0x1b, 0x29, 0x0c, 0x2b, 0x6e, 0xe8, 0x0e, 0x0c, 0x25, 0x4e, 0xb4, 0x45, 0x12, 0xb1, - 0xdc, 0x5f, 0x2c, 0xc2, 0x17, 0xd3, 0xa9, 0x46, 0x82, 0x06, 0x49, 0x05, 0xe3, 0x3a, 0x63, 0x82, - 0x05, 0x33, 0xbb, 0x01, 0x63, 0x4b, 0x4e, 0xcb, 0xd9, 0xf0, 0x7c, 0x2f, 0xf1, 0x48, 0x8c, 0x3e, - 0x0a, 0x65, 0xc7, 0x75, 0xd9, 0xc4, 0xaf, 0x2c, 0x9e, 0xdd, 0xdf, 0x9b, 0x2d, 0x2f, 0xb8, 0xee, - 0xc1, 0xde, 0x2c, 0x28, 0xaa, 0x5d, 0x4c, 0x29, 0xd0, 0xf3, 0x30, 0xe0, 0x46, 0x61, 0x6b, 0xba, - 0xc4, 0x28, 0xcf, 0xd1, 0x15, 0x5a, 0x8d, 0xc2, 0x56, 0x86, 0x94, 0xd1, 0xd8, 0xbf, 0x5d, 0x02, - 0xb4, 0x44, 0x5a, 0xdb, 0x2b, 0x75, 0xe3, 0x5b, 0x5e, 0x84, 0x91, 0x66, 0x18, 0x78, 0x49, 0x18, - 0xc5, 0xa2, 0x42, 0x36, 0x1f, 0x6e, 0x09, 0x18, 0x56, 0x58, 0x74, 0x01, 0x06, 0x5a, 0xe9, 0xb2, - 0x1e, 0x93, 0x22, 0x81, 0x2d, 0x68, 0x86, 0xa1, 0x14, 0xed, 0x98, 0x44, 0x62, 0x1e, 0x2b, 0x8a, - 0x3b, 0x31, 0x89, 0x30, 0xc3, 0xa4, 0x33, 0x87, 0xce, 0x29, 0x31, 0x4b, 0x33, 0x33, 0x87, 0x62, - 0xb0, 0x46, 0x85, 0xbe, 0x08, 0x15, 0xfe, 0x0f, 0x93, 0x4d, 0x36, 0x65, 0x73, 0x85, 0xc1, 0xcd, - 0xb0, 0xe1, 0xf8, 0xd9, 0xc1, 0x1f, 0x67, 0x33, 0x4d, 0x32, 0xc2, 0x29, 0x4f, 0x63, 0xa6, 0x0d, - 0xe5, 0xce, 0xb4, 0xbf, 0x67, 0x01, 0x5a, 0xf2, 0x02, 0x97, 0x44, 0x27, 0xb0, 0x65, 0xf6, 0xb7, - 0x08, 0xfe, 0x98, 0x36, 0x2d, 0x6c, 0xb6, 0xc2, 0x80, 0x04, 0xc9, 0x52, 0x18, 0xb8, 0x7c, 0x1b, - 0xfd, 0x04, 0x0c, 0x24, 0xb4, 0x2a, 0xde, 0xac, 0x67, 0xe5, 0x67, 0xa1, 0x15, 0x1c, 0xec, 0xcd, - 0x9e, 0xeb, 0x2c, 0xc1, 0x9a, 0xc0, 0xca, 0xa0, 0x8f, 0xc3, 0x50, 0x9c, 0x38, 0x49, 0x3b, 0x16, - 0x0d, 0x7d, 0x4a, 0x36, 0xb4, 0xce, 0xa0, 0x07, 0x7b, 0xb3, 0x93, 0xaa, 0x18, 0x07, 0x61, 0x51, - 0x00, 0x3d, 0x07, 0xc3, 0x4d, 0x12, 0xc7, 0xce, 0x96, 0x14, 0x6c, 0x93, 0xa2, 0xec, 0xf0, 0x2d, - 0x0e, 0xc6, 0x12, 0x8f, 0x9e, 0x86, 0x41, 0x12, 0x45, 0x61, 0x24, 0x66, 0xc4, 0xb8, 0x20, 0x1c, - 0x5c, 0xa6, 0x40, 0xcc, 0x71, 0xf6, 0xef, 0x59, 0x30, 0xa9, 0xda, 0xca, 0xeb, 0x3a, 0xc6, 0xa5, - 0xee, 0x02, 0x34, 0x64, 0xc7, 0x62, 0xb6, 0xc0, 0x46, 0xaf, 0xbc, 0x74, 0x38, 0xef, 0xce, 0x81, - 0x4c, 0xeb, 0x50, 0xa0, 0x18, 0x6b, 0x7c, 0xed, 0xff, 0x60, 0xc1, 0xe9, 0x4c, 0x9f, 0x6e, 0x7a, - 0x71, 0x82, 0xde, 0xee, 0xe8, 0xd7, 0x9c, 0xac, 0x5b, 0xd7, 0x2b, 0x65, 0xed, 0xf1, 0x1c, 0xa5, - 0x66, 0x53, 0xdf, 0x8b, 0x79, 0xef, 0xd4, 0x3c, 0x91, 0x10, 0xad, 0x6f, 0x18, 0x06, 0xbd, 0x84, - 0x34, 0x65, 0xb7, 0x5e, 0x2c, 0xd8, 0x2d, 0xde, 0xbe, 0xf4, 0xeb, 0xac, 0x52, 0x1e, 0x98, 0xb3, - 0xb2, 0xff, 0xcc, 0x82, 0xca, 0x52, 0x18, 0x6c, 0x7a, 0x5b, 0xb7, 0x9c, 0xd6, 0x31, 0x7e, 0x97, - 0x3a, 0x0c, 0x30, 0xae, 0xbc, 0xe9, 0x97, 0xf3, 0x9a, 0x2e, 0x1a, 0x34, 0x47, 0xf7, 0x4e, 0xae, - 0x14, 0x28, 0xb1, 0x44, 0x41, 0x98, 0x31, 0x9b, 0x79, 0x0d, 0x2a, 0x8a, 0x00, 0x4d, 0x41, 0xf9, - 0x3e, 0xe1, 0x1a, 0x63, 0x05, 0xd3, 0x9f, 0xe8, 0x0c, 0x0c, 0xee, 0x38, 0x7e, 0x5b, 0x2c, 0x56, - 0xcc, 0xff, 0x7c, 0xa2, 0x74, 0xd5, 0xb2, 0x7f, 0x96, 0xad, 0x38, 0x51, 0xc9, 0x72, 0xb0, 0x23, - 0x84, 0xc1, 0xbb, 0x16, 0x9c, 0xf1, 0xbb, 0x08, 0x21, 0x31, 0x16, 0x47, 0x11, 0x5f, 0x4f, 0x88, - 0x66, 0x9f, 0xe9, 0x86, 0xc5, 0x5d, 0x6b, 0xb3, 0xbf, 0x6f, 0xc1, 0x19, 0xd5, 0xba, 0x1b, 0x64, - 0xb7, 0x4e, 0x7c, 0xd2, 0x48, 0xc2, 0xe8, 0x03, 0xd2, 0x3e, 0xf4, 0x24, 0x1f, 0x69, 0x2e, 0x59, - 0x46, 0x05, 0x83, 0xf2, 0x0d, 0xb2, 0xcb, 0x86, 0xdd, 0xfe, 0x0d, 0x0b, 0xc6, 0x55, 0xf3, 0x4f, - 0x60, 0x59, 0xdc, 0x34, 0x97, 0xc5, 0x47, 0x0b, 0xce, 0xad, 0x1e, 0x0b, 0xe2, 0x1f, 0x95, 0xe0, - 0xac, 0xa2, 0x31, 0xb6, 0x8a, 0x0f, 0xc8, 0xe8, 0xf7, 0xd7, 0xdd, 0x1b, 0x64, 0x77, 0x3d, 0xa4, - 0x7b, 0x7d, 0xf7, 0xee, 0xa2, 0xcb, 0x30, 0xea, 0x92, 0x4d, 0xa7, 0xed, 0x27, 0x4a, 0x95, 0x1d, - 0xe4, 0x36, 0x4e, 0x35, 0x05, 0x63, 0x9d, 0xc6, 0xfe, 0x39, 0x60, 0x22, 0x23, 0x71, 0xe8, 0x47, - 0xa3, 0xca, 0x83, 0x66, 0x71, 0x8c, 0xe9, 0x16, 0x87, 0xb0, 0x2e, 0x9e, 0x86, 0x41, 0xaf, 0x49, - 0xb7, 0x93, 0x92, 0xb9, 0x4b, 0xac, 0x52, 0x20, 0xe6, 0x38, 0xf4, 0x0c, 0x0c, 0x37, 0xc2, 0x66, - 0xd3, 0x09, 0xdc, 0xe9, 0x32, 0x53, 0x67, 0x46, 0xe9, 0x8e, 0xb3, 0xc4, 0x41, 0x58, 0xe2, 0xd0, - 0x13, 0x30, 0xe0, 0x44, 0x5b, 0xf1, 0xf4, 0x00, 0xa3, 0x19, 0xa1, 0x35, 0x2d, 0x44, 0x5b, 0x31, - 0x66, 0x50, 0xaa, 0xa6, 0x3c, 0x08, 0xa3, 0xfb, 0x5e, 0xb0, 0x55, 0xf5, 0x22, 0xa6, 0x73, 0x68, - 0x6a, 0xca, 0x3d, 0x85, 0xc1, 0x1a, 0x15, 0xaa, 0xc1, 0x60, 0x2b, 0x8c, 0x92, 0x78, 0x7a, 0x88, - 0x0d, 0xe7, 0x0b, 0xb9, 0xb3, 0x87, 0xf7, 0xbb, 0x16, 0x46, 0x49, 0xda, 0x15, 0xfa, 0x2f, 0xc6, - 0x9c, 0x11, 0x5a, 0x82, 0x32, 0x09, 0x76, 0xa6, 0x87, 0x19, 0xbf, 0x8f, 0x1c, 0xce, 0x6f, 0x39, - 0xd8, 0xb9, 0xeb, 0x44, 0xe9, 0x22, 0x5a, 0x0e, 0x76, 0x30, 0x2d, 0x8d, 0x1a, 0x50, 0x91, 0xee, - 0x83, 0x78, 0x7a, 0xa4, 0xc8, 0x04, 0xc3, 0x82, 0x1c, 0x93, 0x77, 0xda, 0x5e, 0x44, 0x9a, 0x24, - 0x48, 0xe2, 0x54, 0x57, 0x97, 0xd8, 0x18, 0xa7, 0x7c, 0x51, 0x03, 0xc6, 0xb8, 0x6a, 0x73, 0x2b, - 0x6c, 0x07, 0x49, 0x3c, 0x5d, 0x61, 0x4d, 0xce, 0x31, 0x86, 0xef, 0xa6, 0x25, 0x16, 0xcf, 0x08, - 0xf6, 0x63, 0x1a, 0x30, 0xc6, 0x06, 0x53, 0xf4, 0x36, 0x8c, 0xfb, 0xde, 0x0e, 0x09, 0x48, 0x1c, - 0xd7, 0xa2, 0x70, 0x83, 0x4c, 0x03, 0xeb, 0xcd, 0xd3, 0x79, 0x86, 0x61, 0xb8, 0x41, 0x16, 0x4f, - 0xed, 0xef, 0xcd, 0x8e, 0xdf, 0xd4, 0x4b, 0x63, 0x93, 0x19, 0xfa, 0x22, 0x4c, 0x50, 0x3d, 0xca, - 0x4b, 0xd9, 0x8f, 0x16, 0x67, 0x8f, 0xf6, 0xf7, 0x66, 0x27, 0xb0, 0x51, 0x1c, 0x67, 0xd8, 0xa1, - 0x75, 0xa8, 0xf8, 0xde, 0x26, 0x69, 0xec, 0x36, 0x7c, 0x32, 0x3d, 0xc6, 0x78, 0xe7, 0x2c, 0xb9, - 0x9b, 0x92, 0x9c, 0xeb, 0xae, 0xea, 0x2f, 0x4e, 0x19, 0xa1, 0xbb, 0x70, 0x2e, 0x21, 0x51, 0xd3, - 0x0b, 0x1c, 0xaa, 0x50, 0x08, 0xc5, 0x8a, 0x59, 0xdf, 0xe3, 0x6c, 0xd6, 0x9e, 0x17, 0x03, 0x7b, - 0x6e, 0xbd, 0x2b, 0x15, 0xee, 0x51, 0x1a, 0xad, 0xc1, 0x24, 0x5b, 0x4f, 0xb5, 0xb6, 0xef, 0xd7, - 0x42, 0xdf, 0x6b, 0xec, 0x4e, 0x4f, 0x30, 0x86, 0xcf, 0x48, 0x9b, 0x7a, 0xd5, 0x44, 0x53, 0x9b, - 0x23, 0xfd, 0x87, 0xb3, 0xa5, 0x91, 0x0f, 0x93, 0x31, 0x69, 0xb4, 0x23, 0x2f, 0xd9, 0xa5, 0x73, - 0x9f, 0x3c, 0x4c, 0xa6, 0x27, 0x8b, 0xd8, 0x50, 0x75, 0xb3, 0x10, 0x77, 0x68, 0x64, 0x80, 0x38, - 0xcb, 0x9a, 0x8a, 0x8a, 0x38, 0x71, 0xbd, 0x60, 0x7a, 0x8a, 0x29, 0xcd, 0x6a, 0x7d, 0xd5, 0x29, - 0x10, 0x73, 0x1c, 0x33, 0x49, 0xe9, 0x8f, 0x35, 0x2a, 0x7b, 0x4f, 0x31, 0xc2, 0xd4, 0x24, 0x95, - 0x08, 0x9c, 0xd2, 0xd0, 0xfd, 0x2a, 0x49, 0x76, 0xa7, 0x11, 0x23, 0x55, 0x4b, 0x6d, 0x7d, 0xfd, - 0xb3, 0x98, 0xc2, 0xd1, 0x5d, 0x18, 0x26, 0xc1, 0xce, 0x4a, 0x14, 0x36, 0xa7, 0x4f, 0x17, 0x91, - 0x01, 0xcb, 0x9c, 0x98, 0xef, 0x0a, 0xa9, 0x76, 0x2c, 0xc0, 0x58, 0x32, 0xb3, 0x37, 0x60, 0x42, - 0x89, 0x0b, 0x36, 0xea, 0x68, 0x16, 0x06, 0xa9, 0x44, 0x94, 0x16, 0x5b, 0x85, 0x76, 0x8d, 0x0a, - 0xca, 0x18, 0x73, 0x38, 0xeb, 0x9a, 0xf7, 0x15, 0xb2, 0xb8, 0x9b, 0x10, 0xae, 0xb9, 0x97, 0xb5, - 0xae, 0x49, 0x04, 0x4e, 0x69, 0xec, 0xff, 0xc3, 0xf7, 0xda, 0x54, 0x26, 0x15, 0x90, 0xc7, 0x97, - 0x60, 0x64, 0x3b, 0x8c, 0x13, 0x4a, 0xcd, 0xea, 0x18, 0x4c, 0x77, 0xd7, 0xeb, 0x02, 0x8e, 0x15, - 0x05, 0x7a, 0x1d, 0xc6, 0x1b, 0x7a, 0x05, 0x62, 0x8b, 0x38, 0x2b, 0x8a, 0x98, 0xb5, 0x63, 0x93, - 0x16, 0x5d, 0x85, 0x11, 0xe6, 0xbe, 0x6c, 0x84, 0xbe, 0xb0, 0x11, 0xe4, 0x8e, 0x37, 0x52, 0x13, - 0xf0, 0x03, 0xed, 0x37, 0x56, 0xd4, 0xd4, 0xd2, 0xa2, 0x4d, 0x58, 0xad, 0x09, 0x31, 0xae, 0x2c, - 0xad, 0xeb, 0x0c, 0x8a, 0x05, 0xd6, 0xfe, 0x97, 0x25, 0x6d, 0x94, 0xa9, 0xa6, 0x4b, 0xd0, 0xe7, - 0x60, 0xf8, 0x81, 0xe3, 0x25, 0x5e, 0xb0, 0x25, 0x76, 0xe6, 0x97, 0x0b, 0xca, 0x74, 0x56, 0xfc, - 0x1e, 0x2f, 0xca, 0xf7, 0x1f, 0xf1, 0x07, 0x4b, 0x86, 0x94, 0x77, 0xd4, 0x0e, 0x02, 0xca, 0xbb, - 0xd4, 0x3f, 0x6f, 0xcc, 0x8b, 0x72, 0xde, 0xe2, 0x0f, 0x96, 0x0c, 0xd1, 0x26, 0x80, 0x5c, 0xd5, - 0xc4, 0x15, 0x6e, 0xc3, 0x8f, 0xf5, 0xc3, 0x7e, 0x5d, 0x95, 0x5e, 0x9c, 0xa0, 0x3b, 0x5e, 0xfa, - 0x1f, 0x6b, 0x9c, 0xed, 0x84, 0x29, 0x38, 0x9d, 0xcd, 0x42, 0x9f, 0xa7, 0x0b, 0xcb, 0x89, 0x12, - 0xe2, 0x2e, 0x24, 0x59, 0xcf, 0xeb, 0xe1, 0x7a, 0xda, 0xba, 0xd7, 0x24, 0xfa, 0x22, 0x14, 0x4c, - 0x70, 0xca, 0xcf, 0xfe, 0xb5, 0x32, 0x4c, 0xf7, 0x6a, 0x2e, 0x9d, 0x92, 0xe4, 0xa1, 0x97, 0x2c, - 0x51, 0x15, 0xc4, 0x32, 0xa7, 0xe4, 0xb2, 0x80, 0x63, 0x45, 0x41, 0xe7, 0x46, 0xec, 0x6d, 0x05, - 0x8e, 0x2f, 0xa6, 0xaf, 0x9a, 0x1b, 0x75, 0x06, 0xc5, 0x02, 0x4b, 0xe9, 0x22, 0xe2, 0xc4, 0xc2, - 0x6b, 0xad, 0xcd, 0x21, 0xcc, 0xa0, 0x58, 0x60, 0x75, 0x8b, 0x77, 0x20, 0xc7, 0xe2, 0x35, 0x86, - 0x68, 0xf0, 0xd1, 0x0e, 0x11, 0xfa, 0x02, 0xc0, 0xa6, 0x17, 0x78, 0xf1, 0x36, 0xe3, 0x3e, 0xd4, - 0x37, 0x77, 0xa5, 0xea, 0xac, 0x28, 0x2e, 0x58, 0xe3, 0x88, 0x5e, 0x85, 0x51, 0xb5, 0x3c, 0x57, - 0xab, 0xd3, 0xc3, 0xa6, 0xa7, 0x33, 0x95, 0x55, 0x55, 0xac, 0xd3, 0xd9, 0x5f, 0xce, 0xce, 0x17, - 0xb1, 0x2a, 0xb4, 0xf1, 0xb5, 0x8a, 0x8e, 0x6f, 0xe9, 0xf0, 0xf1, 0xb5, 0xff, 0x6b, 0x19, 0x26, - 0x8d, 0xca, 0xda, 0x71, 0x01, 0x89, 0xf6, 0x26, 0xdd, 0x36, 0x9c, 0x84, 0x88, 0x35, 0x79, 0xa9, - 0x9f, 0x45, 0xa3, 0x6f, 0x32, 0x74, 0x2d, 0x70, 0x4e, 0x68, 0x1b, 0x2a, 0xbe, 0x13, 0x33, 0xdb, - 0x99, 0x88, 0xb5, 0xd8, 0x1f, 0xdb, 0x54, 0xb5, 0x77, 0xe2, 0x44, 0xdb, 0xc5, 0x79, 0x2d, 0x29, - 0x73, 0xba, 0xe7, 0x51, 0x95, 0x43, 0x1e, 0x95, 0xa8, 0xe6, 0x50, 0xbd, 0x64, 0x17, 0x73, 0x1c, - 0xba, 0x0a, 0x63, 0x11, 0x61, 0x33, 0x65, 0x89, 0x6a, 0x55, 0x6c, 0xea, 0x0d, 0xa6, 0xea, 0x17, - 0xd6, 0x70, 0xd8, 0xa0, 0x4c, 0xb5, 0xef, 0xa1, 0x43, 0xb4, 0xef, 0xe7, 0x60, 0x98, 0xfd, 0x50, - 0xb3, 0x42, 0x7d, 0xa1, 0x55, 0x0e, 0xc6, 0x12, 0x9f, 0x9d, 0x44, 0x23, 0x05, 0x27, 0xd1, 0xf3, - 0x30, 0x51, 0x75, 0x48, 0x33, 0x0c, 0x96, 0x03, 0xb7, 0x15, 0x7a, 0x41, 0x82, 0xa6, 0x61, 0x80, - 0xed, 0x27, 0x7c, 0xbd, 0x0f, 0x50, 0x0e, 0x78, 0x80, 0x6a, 0xd0, 0xf6, 0xff, 0xb5, 0x60, 0xbc, - 0x4a, 0x7c, 0x92, 0x90, 0xb5, 0x16, 0xf3, 0xb7, 0xa0, 0x15, 0x40, 0x5b, 0x91, 0xd3, 0x20, 0x35, - 0x12, 0x79, 0xa1, 0x5b, 0x27, 0x8d, 0x30, 0x60, 0x27, 0x0c, 0x74, 0x83, 0x3c, 0xb7, 0xbf, 0x37, - 0x8b, 0xae, 0x75, 0x60, 0x71, 0x97, 0x12, 0xc8, 0x85, 0xf1, 0x56, 0x44, 0x0c, 0x07, 0x91, 0x95, - 0xbf, 0xe1, 0xd7, 0xf4, 0x22, 0x5c, 0x27, 0x35, 0x40, 0xd8, 0x64, 0x8a, 0x3e, 0x0d, 0x53, 0x61, - 0xd4, 0xda, 0x76, 0x82, 0x2a, 0x69, 0x91, 0xc0, 0xa5, 0x8a, 0xb8, 0xf0, 0x02, 0x9e, 0xd9, 0xdf, - 0x9b, 0x9d, 0x5a, 0xcb, 0xe0, 0x70, 0x07, 0xb5, 0xfd, 0x0b, 0x25, 0x38, 0x5b, 0x0d, 0x1f, 0x04, - 0x0f, 0x9c, 0xc8, 0x5d, 0xa8, 0xad, 0x72, 0xed, 0x9a, 0x79, 0x55, 0xa5, 0x37, 0xd7, 0xea, 0xe9, - 0xcd, 0xfd, 0x3c, 0x8c, 0x6c, 0x7a, 0xc4, 0x77, 0x31, 0xd9, 0x14, 0xdd, 0xbb, 0x5c, 0xc4, 0x87, - 0xb3, 0x42, 0xcb, 0x48, 0x4f, 0x03, 0x77, 0x26, 0xaf, 0x08, 0x36, 0x58, 0x31, 0x44, 0x6d, 0x98, - 0x92, 0xe6, 0x83, 0xc4, 0x8a, 0xd5, 0xf1, 0x72, 0x31, 0xeb, 0xc4, 0xac, 0x86, 0x8d, 0x07, 0xce, - 0x30, 0xc4, 0x1d, 0x55, 0x50, 0xb3, 0xaf, 0x49, 0xf7, 0x86, 0x01, 0x36, 0x57, 0x98, 0xd9, 0xc7, - 0xec, 0x52, 0x06, 0xb5, 0xff, 0xa9, 0x05, 0x8f, 0x75, 0x8c, 0x96, 0x30, 0xda, 0xdf, 0x92, 0xd6, - 0x32, 0x3f, 0x8e, 0xca, 0x69, 0x65, 0xd7, 0x31, 0x2f, 0x66, 0x39, 0x97, 0x0a, 0x58, 0xce, 0x6b, - 0x70, 0x66, 0xb9, 0xd9, 0x4a, 0x76, 0xab, 0x9e, 0xe9, 0x84, 0x7e, 0x0d, 0x86, 0x9a, 0xc4, 0xf5, - 0xda, 0x4d, 0xf1, 0x59, 0x67, 0xa5, 0x20, 0xbd, 0xc5, 0xa0, 0x07, 0x7b, 0xb3, 0xe3, 0xf5, 0x24, - 0x8c, 0x9c, 0x2d, 0xc2, 0x01, 0x58, 0x90, 0xdb, 0xef, 0x59, 0x30, 0x29, 0x17, 0xd4, 0x82, 0xeb, - 0x46, 0x24, 0x8e, 0xd1, 0x0c, 0x94, 0xbc, 0x96, 0x60, 0x04, 0x82, 0x51, 0x69, 0xb5, 0x86, 0x4b, - 0x5e, 0x0b, 0x7d, 0x0e, 0x2a, 0xfc, 0xec, 0x22, 0x9d, 0x1c, 0x7d, 0x9e, 0x85, 0x30, 0x93, 0x66, - 0x5d, 0xf2, 0xc0, 0x29, 0x3b, 0xa9, 0x56, 0x32, 0x51, 0x5d, 0x36, 0x3d, 0xe9, 0xd7, 0x05, 0x1c, - 0x2b, 0x0a, 0x74, 0x11, 0x46, 0x82, 0xd0, 0xe5, 0xc7, 0x4a, 0x7c, 0xd3, 0x65, 0x53, 0xee, 0xb6, - 0x80, 0x61, 0x85, 0xb5, 0xbf, 0x61, 0xc1, 0x98, 0xec, 0x63, 0x41, 0x0d, 0x97, 0x2e, 0x92, 0x54, - 0xbb, 0x4d, 0x17, 0x09, 0xd5, 0x50, 0x19, 0xc6, 0x50, 0x4c, 0xcb, 0xfd, 0x28, 0xa6, 0xf6, 0xaf, - 0x97, 0x60, 0x42, 0x36, 0xa7, 0xde, 0xde, 0x88, 0x09, 0xdd, 0xb7, 0x2b, 0x0e, 0x1f, 0x7c, 0x22, - 0xe7, 0xd9, 0x8b, 0x79, 0x26, 0x84, 0xf1, 0xcd, 0x52, 0xbd, 0x60, 0x41, 0xf2, 0xc1, 0x29, 0x4b, - 0xb4, 0x03, 0xa7, 0x82, 0x30, 0x61, 0xfb, 0x81, 0xc2, 0x17, 0xf3, 0x01, 0x67, 0xeb, 0x79, 0x5c, - 0xd4, 0x73, 0xea, 0x76, 0x96, 0x1f, 0xee, 0xac, 0x02, 0xad, 0x49, 0xd7, 0x48, 0x99, 0xd5, 0xf5, - 0x7c, 0xb1, 0xba, 0x7a, 0x7b, 0x46, 0xec, 0xdf, 0xb4, 0xa0, 0x22, 0xc9, 0x8e, 0xf3, 0x10, 0xe0, - 0x1e, 0x0c, 0xc7, 0xec, 0xd3, 0xc8, 0x61, 0xba, 0x54, 0xac, 0xe9, 0xfc, 0x7b, 0xa6, 0x9b, 0x1f, - 0xff, 0x1f, 0x63, 0xc9, 0x8d, 0xb9, 0x36, 0x55, 0x07, 0x3e, 0x70, 0xae, 0x4d, 0xd5, 0xb2, 0x5e, - 0xae, 0x4d, 0xd6, 0x7a, 0xcd, 0x78, 0xa5, 0x1a, 0x5c, 0x2b, 0x22, 0x9b, 0xde, 0xc3, 0xac, 0x06, - 0x57, 0x63, 0x50, 0x2c, 0xb0, 0x68, 0x13, 0xc6, 0x1a, 0xd2, 0x27, 0x9a, 0x8a, 0x8e, 0x97, 0x0a, - 0x7a, 0x5a, 0x95, 0x83, 0x9d, 0x07, 0x67, 0x2c, 0x69, 0x9c, 0xb0, 0xc1, 0xd7, 0xfe, 0x79, 0x0b, - 0x86, 0xb8, 0x4b, 0xac, 0x98, 0x5f, 0x51, 0x73, 0xef, 0xa7, 0x7d, 0xbe, 0x4b, 0x81, 0xc2, 0xdb, - 0x8f, 0xee, 0x41, 0x85, 0xfd, 0x60, 0xe6, 0x7d, 0xb9, 0x48, 0x34, 0x09, 0xaf, 0x5f, 0x34, 0x98, - 0x89, 0xbb, 0xbb, 0x92, 0x01, 0x4e, 0x79, 0xd9, 0xdf, 0x2f, 0x53, 0xb1, 0x94, 0x92, 0x1a, 0xfb, - 0xae, 0x75, 0x12, 0xfb, 0x6e, 0xe9, 0xf8, 0xf7, 0xdd, 0x77, 0x60, 0xb2, 0xa1, 0x1d, 0x44, 0xa4, - 0xbb, 0xfd, 0x95, 0x82, 0x9f, 0x5e, 0x3b, 0xbd, 0xe0, 0x2e, 0xa0, 0x25, 0x93, 0x1d, 0xce, 0xf2, - 0x47, 0x04, 0xc6, 0xf8, 0x11, 0xaf, 0xa8, 0x6f, 0x80, 0xd5, 0x37, 0x9f, 0xeb, 0x6d, 0xe2, 0x25, - 0x54, 0x65, 0x6c, 0xa6, 0xd5, 0x35, 0x46, 0xd8, 0x60, 0x6b, 0xff, 0xed, 0x41, 0x18, 0x5c, 0xde, - 0x21, 0x41, 0x72, 0x8c, 0x62, 0xa8, 0x09, 0x13, 0x5e, 0xb0, 0x13, 0xfa, 0x3b, 0xc4, 0xe5, 0xf8, - 0xa3, 0x6d, 0xb9, 0xe7, 0x44, 0x25, 0x13, 0xab, 0x06, 0x33, 0x9c, 0x61, 0x7e, 0x1c, 0xe6, 0xee, - 0x9b, 0x30, 0xc4, 0x67, 0x84, 0xb0, 0x75, 0x73, 0x5c, 0xc3, 0x6c, 0x40, 0xc5, 0xca, 0x49, 0x8d, - 0x72, 0xee, 0x95, 0x16, 0x8c, 0xd0, 0x97, 0x61, 0x62, 0xd3, 0x8b, 0xe2, 0x84, 0x5a, 0xac, 0x71, - 0xe2, 0x34, 0x5b, 0x47, 0x30, 0x74, 0xd5, 0x88, 0xac, 0x18, 0x9c, 0x70, 0x86, 0x33, 0xda, 0x82, - 0x71, 0x6a, 0x67, 0xa5, 0x55, 0x0d, 0xf7, 0x5d, 0x95, 0xf2, 0x73, 0xdd, 0xd4, 0x19, 0x61, 0x93, - 0x2f, 0x15, 0x45, 0x0d, 0x66, 0x97, 0x8d, 0x30, 0x8d, 0x43, 0x89, 0x22, 0x6e, 0x90, 0x71, 0x1c, - 0x95, 0x68, 0xec, 0x3c, 0xbf, 0x62, 0x4a, 0xb4, 0xf4, 0xd4, 0xde, 0xfe, 0x2e, 0xdd, 0x1f, 0xe9, - 0x18, 0x9e, 0xc0, 0xd6, 0x72, 0xdd, 0xdc, 0x5a, 0x9e, 0x2e, 0xf0, 0x65, 0x7b, 0x6c, 0x2b, 0x5f, - 0x82, 0x51, 0xed, 0xc3, 0xa3, 0x79, 0xa8, 0x34, 0xe4, 0xd1, 0xb3, 0x90, 0xde, 0x4a, 0xbd, 0x51, - 0x67, 0xd2, 0x38, 0xa5, 0xa1, 0xe3, 0x42, 0xd5, 0xc2, 0x6c, 0x80, 0x0a, 0x55, 0x1a, 0x31, 0xc3, - 0xd8, 0x2f, 0x03, 0x2c, 0x3f, 0x24, 0x8d, 0x85, 0x06, 0x8b, 0x8b, 0xd0, 0x8e, 0x8a, 0xac, 0xde, - 0x47, 0x45, 0xf6, 0x77, 0x2c, 0x98, 0x58, 0x59, 0x32, 0xf4, 0xec, 0x39, 0x00, 0xae, 0xaf, 0xde, - 0xbb, 0x77, 0x5b, 0x3a, 0x61, 0xb9, 0xa7, 0x4c, 0x41, 0xb1, 0x46, 0x81, 0x1e, 0x87, 0xb2, 0xdf, - 0x0e, 0x84, 0x1a, 0x39, 0xbc, 0xbf, 0x37, 0x5b, 0xbe, 0xd9, 0x0e, 0x30, 0x85, 0x69, 0x91, 0x20, - 0xe5, 0xc2, 0x91, 0x20, 0xf9, 0xb1, 0x90, 0xdf, 0x2a, 0xc3, 0xd4, 0x8a, 0x4f, 0x1e, 0x1a, 0xad, - 0x7e, 0x16, 0x86, 0xdc, 0xc8, 0xdb, 0x21, 0x51, 0x76, 0x93, 0xae, 0x32, 0x28, 0x16, 0xd8, 0xc2, - 0xc1, 0x29, 0x46, 0x60, 0x4e, 0xf9, 0x98, 0x03, 0x73, 0x72, 0xfb, 0x8c, 0x36, 0x61, 0x38, 0xe4, - 0x66, 0xfe, 0xf4, 0x20, 0x9b, 0x8a, 0xaf, 0x1f, 0xde, 0x98, 0xec, 0xf8, 0xcc, 0x09, 0x27, 0x01, - 0x0f, 0x13, 0x50, 0xb2, 0x4c, 0x40, 0xb1, 0x64, 0x3e, 0xf3, 0x09, 0x18, 0xd3, 0x29, 0xfb, 0x8a, - 0x17, 0xf8, 0x49, 0x0b, 0x4e, 0xaf, 0xf8, 0x61, 0xe3, 0x7e, 0x26, 0x7a, 0xe8, 0x55, 0x18, 0xa5, - 0x8b, 0x29, 0x36, 0x42, 0xea, 0x8c, 0xd8, 0x41, 0x81, 0xc2, 0x3a, 0x9d, 0x56, 0xec, 0xce, 0x9d, - 0xd5, 0x6a, 0xb7, 0x90, 0x43, 0x81, 0xc2, 0x3a, 0x9d, 0xfd, 0x5f, 0x2c, 0x78, 0xf2, 0xda, 0xd2, - 0x72, 0x8d, 0x44, 0xb1, 0x17, 0x27, 0x24, 0x48, 0x3a, 0xa2, 0x1e, 0xa9, 0x3e, 0xe7, 0x6a, 0x4d, - 0x49, 0xf5, 0xb9, 0x2a, 0x6b, 0x85, 0xc0, 0x7e, 0x50, 0x42, 0x7f, 0x7f, 0xde, 0x82, 0xd3, 0xd7, - 0xbc, 0x04, 0x93, 0x56, 0x98, 0x0d, 0x54, 0x8c, 0x48, 0x2b, 0x8c, 0xbd, 0x24, 0x8c, 0x76, 0xb3, - 0x81, 0x8a, 0x58, 0x61, 0xb0, 0x46, 0xc5, 0x6b, 0xde, 0xf1, 0x62, 0xda, 0xd2, 0x92, 0x69, 0x7e, - 0x62, 0x01, 0xc7, 0x8a, 0x82, 0x76, 0xcc, 0xf5, 0x22, 0xa6, 0x2a, 0xec, 0x8a, 0x15, 0xac, 0x3a, - 0x56, 0x95, 0x08, 0x9c, 0xd2, 0xd8, 0x7f, 0xdf, 0x82, 0xb3, 0xd7, 0xfc, 0x76, 0x9c, 0x90, 0x68, - 0x33, 0x36, 0x1a, 0xfb, 0x32, 0x54, 0x88, 0x54, 0xbc, 0x45, 0x5b, 0xd5, 0xa6, 0xa1, 0x34, 0x72, - 0x1e, 0x25, 0xa9, 0xe8, 0x0a, 0x04, 0xe5, 0xf5, 0x17, 0x42, 0xf6, 0x1b, 0x25, 0x18, 0xbf, 0xbe, - 0xbe, 0x5e, 0xbb, 0x46, 0x12, 0x21, 0x25, 0xf3, 0x1d, 0x45, 0x35, 0xcd, 0x4a, 0xd6, 0xf6, 0x96, - 0xcc, 0xaa, 0x6b, 0x27, 0x9e, 0x3f, 0xc7, 0x83, 0xd2, 0xe7, 0x56, 0x83, 0x64, 0x2d, 0xaa, 0x27, - 0x91, 0x17, 0x6c, 0x75, 0xb5, 0xaa, 0xa5, 0x24, 0x2f, 0xf7, 0x92, 0xe4, 0xe8, 0x65, 0x18, 0x62, - 0x71, 0xf4, 0x52, 0xf5, 0xf8, 0xb0, 0xd2, 0x12, 0x18, 0xf4, 0x60, 0x6f, 0xb6, 0x72, 0x07, 0xaf, - 0xf2, 0x3f, 0x58, 0x90, 0xa2, 0x2f, 0xc2, 0xe8, 0x76, 0x92, 0xb4, 0xae, 0x13, 0xc7, 0x25, 0x91, - 0x94, 0x12, 0x39, 0x4a, 0x1a, 0x1d, 0x0c, 0x5e, 0x20, 0x5d, 0x58, 0x29, 0x2c, 0xc6, 0x3a, 0x47, - 0xbb, 0x0e, 0x90, 0xe2, 0x1e, 0x91, 0xe5, 0x61, 0xff, 0xd5, 0x12, 0x0c, 0x5f, 0x77, 0x02, 0xd7, - 0x27, 0x11, 0x5a, 0x81, 0x01, 0xf2, 0x90, 0x34, 0x8a, 0xe9, 0x97, 0xe9, 0x56, 0xc7, 0x3d, 0x5d, - 0xf4, 0x3f, 0x66, 0xe5, 0x11, 0x86, 0x61, 0xda, 0xee, 0x6b, 0x2a, 0x92, 0xf5, 0x85, 0xfc, 0x51, - 0x50, 0x53, 0x82, 0xef, 0x93, 0x02, 0x84, 0x25, 0x23, 0xe6, 0x13, 0x6a, 0xb4, 0xea, 0x54, 0xb8, - 0x25, 0xc5, 0x82, 0xd5, 0xd7, 0x97, 0x6a, 0x9c, 0x5c, 0xf0, 0xe5, 0x3e, 0x21, 0x09, 0xc4, 0x29, - 0x3b, 0xfb, 0x2a, 0x9c, 0x61, 0x47, 0x8a, 0x4e, 0xb2, 0x6d, 0xac, 0x99, 0xdc, 0xc9, 0x69, 0xff, - 0xe3, 0x12, 0x9c, 0x5a, 0xad, 0x2f, 0xd5, 0x4d, 0x6f, 0xde, 0x55, 0x18, 0xe3, 0xdb, 0x33, 0x9d, - 0x74, 0x8e, 0x2f, 0xca, 0x2b, 0x37, 0xf8, 0xba, 0x86, 0xc3, 0x06, 0x25, 0x7a, 0x12, 0xca, 0xde, - 0x3b, 0x41, 0x36, 0x66, 0x69, 0xf5, 0xcd, 0xdb, 0x98, 0xc2, 0x29, 0x9a, 0xee, 0xf4, 0x5c, 0xc4, - 0x29, 0xb4, 0xda, 0xed, 0xdf, 0x80, 0x09, 0x2f, 0x6e, 0xc4, 0xde, 0x6a, 0x40, 0xd7, 0xbf, 0xd3, - 0x90, 0xd3, 0x37, 0x55, 0xcd, 0x69, 0x53, 0x15, 0x16, 0x67, 0xa8, 0x35, 0x79, 0x3b, 0x58, 0x58, - 0x5b, 0xc8, 0x0f, 0x69, 0xfd, 0x32, 0x54, 0x54, 0x78, 0x8f, 0x0c, 0xca, 0xb2, 0xba, 0x07, 0x65, - 0x15, 0x10, 0x38, 0xd2, 0xc7, 0x5a, 0xee, 0xea, 0x63, 0xfd, 0x17, 0x16, 0xa4, 0x91, 0x0c, 0x08, - 0x43, 0xa5, 0x15, 0xb2, 0x03, 0x8c, 0x48, 0x9e, 0x14, 0x3e, 0x93, 0x33, 0x13, 0xf9, 0x4a, 0xe0, - 0x73, 0xa5, 0x26, 0xcb, 0xe2, 0x94, 0x0d, 0xba, 0x09, 0xc3, 0xad, 0x88, 0xd4, 0x13, 0x16, 0x17, - 0xdd, 0x07, 0x47, 0x36, 0xab, 0x6b, 0xbc, 0x24, 0x96, 0x2c, 0xec, 0x5f, 0xb5, 0x00, 0x6e, 0x7a, - 0x4d, 0x2f, 0xc1, 0x4e, 0xb0, 0x45, 0x8e, 0xd1, 0xc8, 0xbb, 0x0d, 0x03, 0x71, 0x8b, 0x34, 0x8a, - 0x1d, 0x3d, 0xa5, 0x2d, 0xaa, 0xb7, 0x48, 0x23, 0xfd, 0x0c, 0xf4, 0x1f, 0x66, 0x7c, 0xec, 0x5f, - 0x04, 0x98, 0x48, 0xc9, 0xa8, 0xa2, 0x8d, 0x5e, 0x34, 0x02, 0x81, 0x1f, 0xcf, 0x04, 0x02, 0x57, - 0x18, 0xb5, 0x16, 0xfb, 0x9b, 0x40, 0xb9, 0xe9, 0x3c, 0x14, 0x7a, 0xfd, 0xab, 0x45, 0x1b, 0x44, - 0x6b, 0x9a, 0xbb, 0xe5, 0x3c, 0xe4, 0x6a, 0xd4, 0x0b, 0x72, 0x02, 0xdd, 0x72, 0x1e, 0x1e, 0xf0, - 0x03, 0x26, 0xb6, 0x02, 0xa9, 0x21, 0xf1, 0xf5, 0xff, 0x96, 0xfe, 0x67, 0x42, 0x91, 0x56, 0xc7, - 0x6a, 0xf5, 0x02, 0xe1, 0x2a, 0xec, 0xb3, 0x56, 0x2f, 0xc8, 0xd6, 0xea, 0x05, 0x05, 0x6a, 0xf5, - 0x02, 0xf4, 0xae, 0x05, 0xc3, 0xc2, 0xc3, 0xce, 0x62, 0xc2, 0x46, 0xaf, 0x7c, 0xbc, 0xaf, 0xaa, - 0x85, 0xab, 0x9e, 0x57, 0x3f, 0x2f, 0x75, 0x47, 0x01, 0xcd, 0x6d, 0x82, 0xac, 0x1a, 0x7d, 0xdb, - 0x82, 0x09, 0xf1, 0x1b, 0x93, 0x77, 0xda, 0x24, 0x4e, 0xc4, 0x2e, 0xf5, 0xe9, 0xa3, 0xb4, 0x46, - 0xb0, 0xe0, 0x8d, 0xfa, 0x98, 0x14, 0x31, 0x26, 0x32, 0xb7, 0x6d, 0x99, 0xf6, 0xa0, 0xef, 0x59, - 0x70, 0xa6, 0xe9, 0x3c, 0xe4, 0x35, 0x72, 0x18, 0x76, 0x12, 0x2f, 0x14, 0x71, 0x6f, 0x2b, 0xfd, - 0xce, 0x93, 0x0e, 0x46, 0xbc, 0xb9, 0x9f, 0x94, 0xc7, 0x9e, 0xdd, 0x48, 0x72, 0x1b, 0xdd, 0xb5, - 0x85, 0x33, 0x2e, 0x8c, 0xc8, 0x89, 0xd9, 0x45, 0x6b, 0x5f, 0xd4, 0x37, 0xe3, 0xc3, 0x57, 0xa0, - 0xf4, 0x6f, 0xcd, 0xbd, 0xd9, 0x76, 0x82, 0xc4, 0x4b, 0x76, 0x35, 0x1d, 0x9f, 0xd5, 0x22, 0x26, - 0xe2, 0x31, 0xd6, 0xb2, 0x0d, 0x63, 0xfa, 0x9c, 0x3b, 0xc6, 0x9a, 0x42, 0x38, 0xdd, 0x65, 0x3e, - 0x1d, 0x63, 0x85, 0x6d, 0x78, 0xbc, 0xe7, 0xbc, 0x38, 0xbe, 0x6a, 0xed, 0x7f, 0x63, 0xe9, 0x02, - 0xf3, 0x04, 0x3c, 0x27, 0xb7, 0x4c, 0xcf, 0xc9, 0xc5, 0xa2, 0x2b, 0xa7, 0x87, 0xfb, 0x64, 0x53, - 0x6f, 0x3e, 0xdd, 0x08, 0xd0, 0x3a, 0x0c, 0xf9, 0x14, 0x22, 0x0f, 0x93, 0x2e, 0xf5, 0xb3, 0x36, - 0x53, 0xdd, 0x82, 0xc1, 0x63, 0x2c, 0x78, 0xd9, 0xdf, 0xb3, 0x60, 0xe0, 0x47, 0x78, 0x49, 0xa1, - 0x83, 0xb5, 0xb8, 0x57, 0x3b, 0x87, 0x9d, 0x07, 0xcb, 0x0f, 0x13, 0x12, 0xc4, 0x4c, 0x95, 0xec, - 0x3a, 0x44, 0xbf, 0x50, 0x82, 0x51, 0x5a, 0x95, 0x0c, 0x07, 0x78, 0x1d, 0xc6, 0x7d, 0x67, 0x83, - 0xf8, 0xd2, 0xdb, 0x9b, 0x35, 0xbb, 0x6e, 0xea, 0x48, 0x6c, 0xd2, 0xd2, 0xc2, 0x9b, 0xba, 0x33, - 0x5c, 0xa8, 0x44, 0xaa, 0xb0, 0xe1, 0x29, 0xc7, 0x26, 0x2d, 0xd5, 0xfc, 0x1f, 0x38, 0x49, 0x63, - 0x5b, 0x98, 0x64, 0xaa, 0xb9, 0xf7, 0x28, 0x10, 0x73, 0x1c, 0x5a, 0x80, 0x49, 0x39, 0x63, 0xef, - 0x52, 0x5b, 0x3d, 0x0c, 0x84, 0xba, 0xa8, 0x2e, 0x36, 0x62, 0x13, 0x8d, 0xb3, 0xf4, 0xe8, 0x13, - 0x30, 0x41, 0x07, 0x27, 0x6c, 0x27, 0x32, 0xd8, 0x61, 0x90, 0x05, 0x3b, 0xb0, 0x88, 0xd5, 0x75, - 0x03, 0x83, 0x33, 0x94, 0xf6, 0x17, 0xe1, 0xf4, 0xcd, 0xd0, 0x71, 0x17, 0x1d, 0xdf, 0x09, 0x1a, - 0x24, 0x5a, 0x0d, 0xb6, 0x72, 0xcf, 0x85, 0xf5, 0xb3, 0xdb, 0x52, 0xde, 0xd9, 0xad, 0x1d, 0x01, - 0xd2, 0x2b, 0x10, 0x61, 0x3a, 0x6f, 0xc3, 0xb0, 0xc7, 0xab, 0x12, 0xd3, 0xf6, 0x72, 0x9e, 0x53, - 0xa9, 0xa3, 0x8d, 0x5a, 0xd8, 0x09, 0x07, 0x60, 0xc9, 0x92, 0x5a, 0x12, 0xdd, 0xbc, 0x50, 0xf9, - 0xc6, 0x9a, 0xfd, 0xd7, 0x2d, 0x98, 0xbc, 0x9d, 0xb9, 0x3d, 0xf7, 0x2c, 0x0c, 0xc5, 0x24, 0xea, - 0xe2, 0x52, 0xab, 0x33, 0x28, 0x16, 0xd8, 0x47, 0x6e, 0xa6, 0xff, 0x4c, 0x09, 0x2a, 0x2c, 0xe0, - 0xb3, 0xe5, 0x34, 0x8e, 0x53, 0x29, 0xbd, 0x65, 0x28, 0xa5, 0x39, 0x46, 0xa2, 0x6a, 0x50, 0x2f, - 0x9d, 0x14, 0xdd, 0x51, 0xb7, 0xc9, 0x0a, 0xd9, 0x87, 0x29, 0x43, 0x7e, 0xf3, 0x68, 0xc2, 0xbc, - 0x7c, 0x26, 0x6f, 0x9a, 0xb1, 0xd3, 0x54, 0x45, 0xfb, 0x81, 0x3b, 0x4d, 0x55, 0x2d, 0xeb, 0x21, - 0x94, 0x6a, 0x5a, 0xe3, 0x99, 0xd8, 0xfe, 0x14, 0x0b, 0xdf, 0x73, 0x7c, 0xef, 0x2b, 0x44, 0x5d, - 0xca, 0x9c, 0x15, 0xe1, 0x78, 0x02, 0x7a, 0xc0, 0xe4, 0x8b, 0xf8, 0xc7, 0xef, 0xda, 0xa6, 0x45, - 0xec, 0xeb, 0x30, 0x99, 0x19, 0x3a, 0xf4, 0x2a, 0x0c, 0xb6, 0xb6, 0x9d, 0x98, 0x64, 0x02, 0x43, - 0x06, 0x6b, 0x14, 0x78, 0xb0, 0x37, 0x3b, 0xa1, 0x0a, 0x30, 0x08, 0xe6, 0xd4, 0xf6, 0x9f, 0x5b, - 0x30, 0x70, 0x3b, 0x74, 0x8f, 0x73, 0x8a, 0x5d, 0x37, 0xa6, 0xd8, 0xb3, 0xf9, 0x37, 0xf4, 0x7b, - 0xce, 0xae, 0x5a, 0x66, 0x76, 0x5d, 0x2c, 0xc0, 0xeb, 0xf0, 0x89, 0xd5, 0x84, 0x51, 0x96, 0x01, - 0x40, 0x44, 0xc4, 0xbc, 0x6c, 0xd8, 0x4f, 0xb3, 0x19, 0xfb, 0x69, 0x52, 0x23, 0xd5, 0xac, 0xa8, - 0xe7, 0x60, 0x58, 0x44, 0x60, 0x64, 0x83, 0x16, 0x05, 0x2d, 0x96, 0x78, 0xfb, 0x5f, 0x95, 0xc1, - 0xc8, 0x38, 0x80, 0x7e, 0xc7, 0x82, 0xb9, 0x88, 0x5f, 0xc3, 0x70, 0xab, 0xed, 0xc8, 0x0b, 0xb6, - 0xea, 0x8d, 0x6d, 0xe2, 0xb6, 0x7d, 0x2f, 0xd8, 0x5a, 0xdd, 0x0a, 0x42, 0x05, 0x5e, 0x7e, 0x48, - 0x1a, 0x6d, 0xe6, 0x5c, 0x2d, 0x9c, 0xe8, 0x40, 0x9d, 0x70, 0x5e, 0xd9, 0xdf, 0x9b, 0x9d, 0xc3, - 0x7d, 0xd5, 0x82, 0xfb, 0x6c, 0x15, 0xfa, 0x43, 0x0b, 0xe6, 0xf9, 0x9d, 0xfb, 0xe2, 0x3d, 0x29, - 0x64, 0x77, 0xd6, 0x24, 0xd3, 0x94, 0xdd, 0x3a, 0x89, 0x9a, 0x8b, 0xaf, 0x89, 0x41, 0x9e, 0xaf, - 0xf5, 0x57, 0x2b, 0xee, 0xb7, 0x99, 0xf6, 0xbf, 0x2b, 0xc3, 0x38, 0x1d, 0xcf, 0xf4, 0xbe, 0xed, - 0xab, 0xc6, 0x34, 0x79, 0x2a, 0x33, 0x4d, 0x4e, 0x19, 0xc4, 0x8f, 0xe6, 0xaa, 0x6d, 0x0c, 0xa7, - 0x7c, 0x27, 0x4e, 0xae, 0x13, 0x27, 0x4a, 0x36, 0x88, 0xc3, 0x0e, 0x14, 0xb3, 0x41, 0x0a, 0x05, - 0xce, 0x28, 0x55, 0x54, 0xcf, 0xcd, 0x2c, 0x33, 0xdc, 0xc9, 0x1f, 0xed, 0x00, 0x62, 0x87, 0x97, - 0x91, 0x13, 0xc4, 0xbc, 0x2f, 0x9e, 0x70, 0xc7, 0xf6, 0x57, 0xeb, 0x8c, 0xa8, 0x15, 0xdd, 0xec, - 0xe0, 0x86, 0xbb, 0xd4, 0xa0, 0x1d, 0x4f, 0x0f, 0x16, 0x3d, 0x9e, 0x1e, 0xca, 0x89, 0x16, 0xfe, - 0x29, 0x0b, 0x4e, 0xd3, 0xcf, 0x62, 0x46, 0x96, 0xc6, 0x28, 0x84, 0x49, 0x3a, 0xed, 0x7c, 0x92, - 0x48, 0x98, 0x58, 0x5f, 0x39, 0x9a, 0xb4, 0xc9, 0x27, 0x55, 0xd7, 0x6e, 0x98, 0xcc, 0x70, 0x96, - 0xbb, 0xfd, 0x1d, 0x0b, 0x58, 0xe8, 0xda, 0x09, 0x6c, 0x62, 0xd7, 0xcc, 0x4d, 0xcc, 0xce, 0x97, - 0x18, 0x3d, 0xf6, 0xaf, 0x57, 0x60, 0x8a, 0x62, 0x6b, 0x51, 0xf8, 0x70, 0x57, 0x2a, 0xd6, 0xf9, - 0x7e, 0xd9, 0x77, 0x4b, 0x7c, 0xd9, 0xa8, 0xfb, 0x64, 0xe8, 0xa7, 0x2d, 0x18, 0x69, 0x38, 0x2d, - 0xa7, 0xc1, 0xf3, 0xb5, 0x14, 0xf0, 0xc1, 0x18, 0xe5, 0xe7, 0x96, 0x44, 0x59, 0xee, 0x3f, 0x78, - 0x49, 0x76, 0x5d, 0x82, 0x73, 0x7d, 0x06, 0xaa, 0xf2, 0x19, 0x0f, 0xc6, 0x0d, 0x66, 0xc7, 0x68, - 0x74, 0xfe, 0xb4, 0xc5, 0x45, 0xbe, 0x32, 0x0c, 0x1e, 0xc0, 0xa9, 0x40, 0xfb, 0x4f, 0x85, 0x99, - 0xd4, 0x83, 0xe7, 0x8a, 0x0b, 0x75, 0x26, 0x03, 0xb5, 0x20, 0xbd, 0x0c, 0x43, 0xdc, 0x59, 0x87, - 0xfd, 0x4f, 0x2c, 0x78, 0x4c, 0x27, 0xd4, 0xae, 0xff, 0xe5, 0xf9, 0x84, 0xab, 0x30, 0x12, 0xb6, - 0x48, 0xe4, 0xa4, 0x46, 0xd0, 0x45, 0x39, 0xfa, 0x6b, 0x02, 0x7e, 0xb0, 0x37, 0x7b, 0x46, 0xe7, - 0x2e, 0xe1, 0x58, 0x95, 0x44, 0x36, 0x0c, 0xb1, 0x71, 0x89, 0xc5, 0xc5, 0x4d, 0x96, 0xbd, 0x84, - 0x9d, 0x84, 0xc4, 0x58, 0x60, 0xec, 0xbf, 0x69, 0xf1, 0xc9, 0xa6, 0x37, 0x1d, 0x7d, 0x15, 0xa6, - 0x9a, 0xd4, 0x5e, 0x5a, 0x7e, 0xd8, 0xa2, 0xdb, 0x28, 0x3b, 0x01, 0xb6, 0x8a, 0x6c, 0x1e, 0x3d, - 0xba, 0xbb, 0x38, 0x2d, 0x5a, 0x3f, 0x75, 0x2b, 0xc3, 0x16, 0x77, 0x54, 0x64, 0xff, 0x91, 0x58, - 0xb1, 0x4c, 0x73, 0x7b, 0x0e, 0x86, 0x5b, 0xa1, 0xbb, 0xb4, 0x5a, 0xc5, 0x62, 0xac, 0x94, 0xc8, - 0xa9, 0x71, 0x30, 0x96, 0x78, 0x74, 0x05, 0x80, 0x3c, 0x4c, 0x48, 0x14, 0x38, 0xbe, 0x3a, 0xb9, - 0x55, 0x8a, 0xd2, 0xb2, 0xc2, 0x60, 0x8d, 0x8a, 0x96, 0x69, 0x45, 0xe1, 0x8e, 0xe7, 0xb2, 0x88, - 0xf9, 0xb2, 0x59, 0xa6, 0xa6, 0x30, 0x58, 0xa3, 0xa2, 0x56, 0x6a, 0x3b, 0x88, 0xf9, 0x26, 0xe6, - 0x6c, 0x88, 0xa4, 0x1b, 0x23, 0xa9, 0x95, 0x7a, 0x47, 0x47, 0x62, 0x93, 0xd6, 0xfe, 0xbd, 0x0a, - 0x40, 0xaa, 0x26, 0xa1, 0x77, 0x3b, 0x57, 0xe8, 0xc7, 0x8a, 0xea, 0x58, 0x8f, 0x6e, 0x79, 0xa2, - 0x6f, 0x5a, 0x30, 0xea, 0xf8, 0x7e, 0xd8, 0x70, 0x12, 0xd6, 0xa3, 0x52, 0x51, 0x59, 0x21, 0x5a, - 0xb2, 0x90, 0x96, 0xe5, 0x8d, 0x79, 0x59, 0x1e, 0xec, 0x69, 0x98, 0xdc, 0xf6, 0xe8, 0x4d, 0x40, - 0x2f, 0x49, 0xf5, 0x9a, 0x7f, 0x94, 0x99, 0xac, 0x7a, 0x5d, 0x61, 0x12, 0x52, 0xd3, 0xac, 0xd1, - 0x17, 0x8d, 0xfc, 0x12, 0x03, 0x45, 0xee, 0x0b, 0x1a, 0x8a, 0x43, 0x5e, 0x6a, 0x09, 0xf4, 0x39, - 0x3d, 0x98, 0x78, 0xb0, 0xc8, 0x85, 0x5c, 0x4d, 0x7f, 0xcd, 0x09, 0x24, 0x4e, 0x60, 0xd2, 0x35, - 0xb7, 0x4a, 0x11, 0x7c, 0x75, 0x39, 0xbf, 0x86, 0xcc, 0x1e, 0x9b, 0x6e, 0x8e, 0x19, 0x04, 0xce, - 0x56, 0x81, 0x3e, 0xc7, 0x43, 0xbd, 0x57, 0x83, 0xcd, 0x50, 0x04, 0x60, 0x5d, 0x2a, 0xf0, 0xcd, - 0x77, 0xe3, 0x84, 0x34, 0x69, 0x99, 0x74, 0x37, 0xbc, 0x2d, 0xb8, 0x60, 0xc5, 0x0f, 0xad, 0xc3, - 0x10, 0xbb, 0x98, 0x12, 0x4f, 0x8f, 0x14, 0x71, 0x95, 0x99, 0xf7, 0x31, 0x53, 0x15, 0x84, 0xfd, - 0x8d, 0xb1, 0xe0, 0x85, 0xae, 0xcb, 0x7b, 0xd1, 0xf1, 0x6a, 0x70, 0x27, 0x26, 0xec, 0x5e, 0x74, - 0x65, 0xf1, 0x23, 0xe9, 0x45, 0x67, 0x0e, 0xef, 0x9a, 0x51, 0xcb, 0x28, 0x49, 0x35, 0x11, 0xf1, - 0x5f, 0x26, 0xea, 0x9a, 0x86, 0x22, 0x0d, 0x35, 0xd3, 0x7a, 0xa5, 0x83, 0x7d, 0xd7, 0x64, 0x86, - 0xb3, 0xdc, 0x4f, 0x70, 0x0f, 0x9c, 0xf1, 0x61, 0x2a, 0xbb, 0x24, 0x8f, 0x71, 0xc7, 0xfd, 0xd3, - 0x01, 0x98, 0x30, 0x27, 0x06, 0x9a, 0x87, 0x8a, 0xd0, 0xa6, 0x54, 0xf2, 0x1e, 0x35, 0xff, 0x6f, - 0x49, 0x04, 0x4e, 0x69, 0x58, 0x1a, 0x23, 0x56, 0x5c, 0x0b, 0xbb, 0x49, 0xd3, 0x18, 0x29, 0x0c, - 0xd6, 0xa8, 0xa8, 0xda, 0xba, 0x11, 0x86, 0x89, 0x12, 0xdc, 0x6a, 0xce, 0x2c, 0x32, 0x28, 0x16, - 0x58, 0x2a, 0xb0, 0xef, 0xd3, 0x0e, 0xf9, 0xa6, 0xcb, 0x4f, 0x09, 0xec, 0x1b, 0x3a, 0x12, 0x9b, - 0xb4, 0x74, 0x03, 0x0a, 0x63, 0x36, 0x09, 0x85, 0x72, 0x9c, 0x86, 0x31, 0xd5, 0xf9, 0x45, 0x2d, - 0x89, 0x47, 0x9f, 0x85, 0xc7, 0xd4, 0xbd, 0x2a, 0xcc, 0x5d, 0xa8, 0xb2, 0xc6, 0x21, 0xc3, 0xbe, - 0x7d, 0x6c, 0xa9, 0x3b, 0x19, 0xee, 0x55, 0x1e, 0xbd, 0x01, 0x13, 0x42, 0xb1, 0x95, 0x1c, 0x87, - 0xcd, 0x53, 0xee, 0x1b, 0x06, 0x16, 0x67, 0xa8, 0x51, 0x15, 0xa6, 0x28, 0x84, 0x69, 0x94, 0x92, - 0x03, 0xbf, 0x1f, 0xa6, 0x76, 0xe6, 0x1b, 0x19, 0x3c, 0xee, 0x28, 0x81, 0x16, 0x60, 0x92, 0xeb, - 0x16, 0xd4, 0x8a, 0x63, 0xdf, 0x41, 0x44, 0x4c, 0xaa, 0x45, 0xb0, 0x66, 0xa2, 0x71, 0x96, 0x1e, - 0x5d, 0x85, 0x31, 0x27, 0x6a, 0x6c, 0x7b, 0x09, 0x69, 0x24, 0xed, 0x88, 0x67, 0x1c, 0xd0, 0xc2, - 0x04, 0x16, 0x34, 0x1c, 0x36, 0x28, 0xed, 0xaf, 0xc0, 0xe9, 0x2e, 0x61, 0xd9, 0x74, 0xe2, 0x38, - 0x2d, 0x4f, 0xf6, 0x29, 0x13, 0x90, 0xb4, 0x50, 0x5b, 0x95, 0xbd, 0xd1, 0xa8, 0xe8, 0xec, 0x64, - 0xbe, 0x63, 0x2d, 0xa7, 0x9e, 0x9a, 0x9d, 0x2b, 0x12, 0x81, 0x53, 0x1a, 0xfb, 0xcf, 0x2a, 0xa0, - 0xb9, 0x5a, 0x0a, 0x84, 0xa1, 0x5c, 0x85, 0x31, 0x99, 0x26, 0x52, 0x4b, 0xcf, 0xa6, 0xba, 0x79, - 0x4d, 0xc3, 0x61, 0x83, 0x92, 0xb6, 0x2d, 0x90, 0x8e, 0xa3, 0x6c, 0xf8, 0x93, 0xf2, 0x28, 0xe1, - 0x94, 0x06, 0x5d, 0x82, 0x91, 0x98, 0xf8, 0x9b, 0x37, 0xbd, 0xe0, 0xbe, 0x98, 0xd8, 0x4a, 0x2a, - 0xd7, 0x05, 0x1c, 0x2b, 0x0a, 0xb4, 0x08, 0xe5, 0xb6, 0xe7, 0x8a, 0xa9, 0x2c, 0x55, 0x86, 0xf2, - 0x9d, 0xd5, 0xea, 0xc1, 0xde, 0xec, 0x53, 0xbd, 0xf2, 0x6c, 0x52, 0x63, 0x3a, 0x9e, 0xa3, 0xcb, - 0x8f, 0x16, 0xee, 0xe6, 0x44, 0x1f, 0xea, 0xd3, 0x89, 0x7e, 0x05, 0x40, 0xf4, 0x5a, 0xce, 0xe5, - 0x72, 0xfa, 0xd5, 0xae, 0x29, 0x0c, 0xd6, 0xa8, 0xa8, 0x49, 0xde, 0x88, 0x88, 0x23, 0xad, 0x56, - 0x1e, 0x36, 0x3c, 0x72, 0x74, 0x93, 0x7c, 0x29, 0xcb, 0x0c, 0x77, 0xf2, 0x47, 0x21, 0x9c, 0x72, - 0xe9, 0x42, 0x32, 0x2a, 0xad, 0xf4, 0x1f, 0xab, 0x4c, 0x2b, 0xac, 0x66, 0x19, 0xe1, 0x4e, 0xde, - 0xe8, 0x0b, 0x30, 0x23, 0x81, 0x9d, 0x37, 0x27, 0xd9, 0x72, 0x29, 0x2f, 0x9e, 0xdf, 0xdf, 0x9b, - 0x9d, 0xa9, 0xf6, 0xa4, 0xc2, 0x87, 0x70, 0x40, 0x6f, 0xc3, 0x10, 0x3b, 0x74, 0x89, 0xa7, 0x47, - 0xd9, 0x6e, 0xf7, 0x4a, 0x51, 0xa7, 0xe3, 0x1c, 0x3b, 0xba, 0x11, 0xb1, 0x9c, 0xe9, 0x49, 0x16, - 0x03, 0x62, 0xc1, 0x13, 0xb5, 0x60, 0xd4, 0x09, 0x82, 0x30, 0x71, 0xb8, 0x12, 0x36, 0x56, 0x44, - 0x8f, 0xd4, 0xaa, 0x58, 0x48, 0xcb, 0xf2, 0x7a, 0x54, 0x80, 0x98, 0x86, 0xc1, 0x7a, 0x15, 0xe8, - 0x01, 0x4c, 0x86, 0x0f, 0xa8, 0xc0, 0x94, 0xe7, 0x0e, 0xf1, 0xf4, 0xb8, 0xd9, 0xb1, 0xc3, 0x3f, - 0xcf, 0x9a, 0x51, 0x58, 0x93, 0x64, 0x26, 0x53, 0x9c, 0xad, 0x05, 0xcd, 0x19, 0x3e, 0xe5, 0x89, - 0x34, 0x62, 0x39, 0xf5, 0x29, 0xeb, 0x2e, 0x64, 0x76, 0x3b, 0x97, 0x47, 0x29, 0x32, 0x89, 0x30, - 0x99, 0xb9, 0x9d, 0x9b, 0xa2, 0xb0, 0x4e, 0x37, 0xf3, 0x71, 0x18, 0xd5, 0x06, 0xbe, 0x9f, 0xd0, - 0xd8, 0x99, 0x37, 0x60, 0x2a, 0x3b, 0xa0, 0x7d, 0x85, 0xd6, 0xfe, 0xaf, 0x12, 0x4c, 0x76, 0x39, - 0xd4, 0xb9, 0xef, 0xb1, 0xf0, 0x6e, 0x43, 0xf4, 0xdd, 0xf0, 0x02, 0x17, 0x33, 0x8c, 0x29, 0xc0, - 0x4a, 0x05, 0x04, 0x98, 0x94, 0xa6, 0xe5, 0x9e, 0xd2, 0x54, 0x08, 0xad, 0x81, 0xf7, 0x23, 0xb4, - 0xcc, 0x7d, 0x62, 0xb0, 0xd0, 0x3e, 0xf1, 0x08, 0x04, 0x9d, 0xb1, 0xd5, 0x0c, 0x17, 0xd8, 0x6a, - 0xbe, 0x5d, 0x82, 0xa9, 0x34, 0x8c, 0x58, 0xe4, 0x8e, 0x3d, 0xbe, 0xb3, 0x82, 0x75, 0xe3, 0xac, - 0x20, 0x2f, 0x25, 0x6c, 0xa6, 0x5d, 0x3d, 0xcf, 0x0d, 0xde, 0xce, 0x9c, 0x1b, 0xbc, 0xd2, 0x27, - 0xdf, 0xc3, 0xcf, 0x10, 0x7e, 0xa9, 0x04, 0x67, 0xb3, 0x45, 0x96, 0x7c, 0xc7, 0x6b, 0x1e, 0xe3, - 0x38, 0x7d, 0xd6, 0x18, 0xa7, 0xd7, 0xfa, 0xeb, 0x0f, 0x6b, 0x5c, 0xcf, 0xc1, 0x72, 0x32, 0x83, - 0xf5, 0xf1, 0xa3, 0x30, 0x3f, 0x7c, 0xc4, 0x7e, 0xdf, 0x82, 0xc7, 0xbb, 0x96, 0x3b, 0x01, 0xaf, - 0xe8, 0x5b, 0xa6, 0x57, 0xf4, 0xe5, 0x23, 0xf4, 0xae, 0x87, 0x9b, 0xf4, 0xbf, 0x97, 0x7a, 0xf4, - 0x8a, 0x79, 0x8e, 0xd6, 0x60, 0xd4, 0x69, 0x34, 0x48, 0x1c, 0xdf, 0x0a, 0x5d, 0x95, 0xd7, 0xe7, - 0x45, 0xb6, 0x97, 0xa4, 0xe0, 0x83, 0xbd, 0xd9, 0x99, 0x2c, 0x8b, 0x14, 0x8d, 0x75, 0x0e, 0x66, - 0xde, 0xaf, 0xd2, 0x31, 0xe5, 0xfd, 0xba, 0x02, 0xb0, 0xa3, 0x2c, 0xd6, 0xac, 0x43, 0x4a, 0xb3, - 0x65, 0x35, 0x2a, 0xf4, 0x97, 0x99, 0x06, 0xc8, 0x23, 0x26, 0x06, 0xcc, 0x9b, 0x87, 0x39, 0xdf, - 0x4f, 0x8f, 0xbe, 0xe0, 0x17, 0x1c, 0x95, 0xf3, 0x4e, 0xb1, 0xb4, 0x7f, 0xb9, 0x0c, 0x1f, 0x3e, - 0x64, 0xd2, 0xa1, 0x05, 0xf3, 0x20, 0xf4, 0x85, 0xac, 0xa7, 0x66, 0xa6, 0x6b, 0x61, 0xc3, 0x75, - 0x93, 0xf9, 0x56, 0xa5, 0xf7, 0xfd, 0xad, 0xbe, 0xa5, 0xfb, 0xd5, 0x78, 0xe0, 0xe3, 0xb5, 0x23, - 0x2f, 0xab, 0x1f, 0x4f, 0x3f, 0xf8, 0xd7, 0x2d, 0x78, 0xaa, 0x6b, 0xa7, 0x8c, 0x70, 0x8b, 0x79, - 0xa8, 0x34, 0x28, 0x50, 0xbb, 0x99, 0x92, 0x5e, 0x09, 0x93, 0x08, 0x9c, 0xd2, 0x18, 0x51, 0x15, - 0xa5, 0xdc, 0xa8, 0x8a, 0xdf, 0xb5, 0xe0, 0x4c, 0xb6, 0x11, 0x27, 0x20, 0x73, 0xea, 0xa6, 0xcc, - 0x99, 0xeb, 0xef, 0xd3, 0xf7, 0x10, 0x37, 0xdf, 0x1e, 0x87, 0x73, 0x1d, 0x3b, 0x15, 0x1f, 0xc5, - 0x9f, 0xb0, 0xe0, 0xd4, 0x16, 0xd3, 0xb4, 0xb5, 0xeb, 0x3f, 0xa2, 0x5f, 0x39, 0x77, 0xa6, 0x0e, - 0xbd, 0x35, 0xc4, 0xed, 0x86, 0x0e, 0x12, 0xdc, 0x59, 0x19, 0xfa, 0x86, 0x05, 0x67, 0x9c, 0x07, - 0x71, 0xc7, 0x2b, 0x04, 0x62, 0x1a, 0xbd, 0x91, 0xe3, 0xd4, 0xca, 0x79, 0xbf, 0x60, 0x71, 0x7a, - 0x7f, 0x6f, 0xf6, 0x4c, 0x37, 0x2a, 0xdc, 0xb5, 0x56, 0xfa, 0x7d, 0xb7, 0xc5, 0xf5, 0x82, 0x62, - 0x17, 0xd9, 0xba, 0x5d, 0x46, 0xe0, 0x22, 0x49, 0x62, 0xb0, 0xe2, 0x88, 0xbe, 0x04, 0x95, 0x2d, - 0x79, 0xe3, 0x27, 0x2b, 0xf2, 0x7a, 0x0c, 0x73, 0xb7, 0x0b, 0x42, 0x3c, 0xe4, 0x5d, 0xa1, 0x70, - 0xca, 0x14, 0x5d, 0x87, 0x72, 0xb0, 0x19, 0x8b, 0xbb, 0xb5, 0x79, 0x41, 0x35, 0x66, 0x08, 0x13, - 0xbf, 0x8e, 0x78, 0x7b, 0xa5, 0x8e, 0x29, 0x0b, 0xca, 0x29, 0xda, 0x70, 0x85, 0x37, 0x37, 0x87, - 0x13, 0x5e, 0xac, 0x76, 0x72, 0xc2, 0x8b, 0x55, 0x4c, 0x59, 0xa0, 0x1a, 0x0c, 0xb2, 0xcb, 0x0b, - 0xc2, 0x55, 0x9b, 0x73, 0xf1, 0xba, 0xe3, 0x8a, 0x06, 0x4f, 0x6a, 0xc7, 0xc0, 0x98, 0x33, 0x42, - 0xeb, 0x30, 0xd4, 0x60, 0x89, 0xb7, 0x85, 0x1d, 0x9d, 0x97, 0x36, 0xa0, 0x23, 0x49, 0x37, 0x3f, - 0x52, 0xe2, 0x70, 0x2c, 0x78, 0x31, 0xae, 0xa4, 0xb5, 0xbd, 0x19, 0x0b, 0x43, 0x39, 0x8f, 0x6b, - 0x47, 0x0a, 0x75, 0xc1, 0x95, 0xc1, 0xb1, 0xe0, 0x85, 0xaa, 0x50, 0xda, 0x6c, 0x88, 0x0c, 0x95, - 0x39, 0x2e, 0x5a, 0xf3, 0x6e, 0xe9, 0xe2, 0xd0, 0xfe, 0xde, 0x6c, 0x69, 0x65, 0x09, 0x97, 0x36, - 0x1b, 0xe8, 0x2d, 0x18, 0xde, 0xe4, 0xb7, 0x05, 0x45, 0x36, 0xca, 0xcb, 0x79, 0x57, 0x1a, 0x3b, - 0xae, 0x16, 0xf2, 0x6b, 0x0d, 0x02, 0x81, 0x25, 0x3b, 0x96, 0x22, 0x4c, 0xdd, 0x7f, 0x14, 0xe9, - 0x28, 0xe7, 0xfa, 0xbb, 0x2f, 0x29, 0xec, 0x47, 0x05, 0xc5, 0x1a, 0x47, 0x3a, 0xe7, 0x1d, 0xf9, - 0x76, 0x00, 0x4b, 0x45, 0x99, 0x3b, 0xe7, 0xbb, 0x3e, 0x35, 0xc0, 0xe7, 0xbc, 0x42, 0xe1, 0x94, - 0x29, 0x6a, 0xc3, 0xf8, 0x4e, 0xdc, 0xda, 0x26, 0x72, 0xe9, 0xb3, 0xfc, 0x94, 0xa3, 0x57, 0x3e, - 0x99, 0x93, 0x74, 0x54, 0x14, 0xf1, 0xa2, 0xa4, 0xed, 0xf8, 0x1d, 0x12, 0x8c, 0xe5, 0x64, 0xba, - 0xab, 0xb3, 0xc5, 0x66, 0x2d, 0xf4, 0x93, 0xbc, 0xd3, 0x0e, 0x37, 0x76, 0x13, 0x22, 0xf2, 0x57, - 0xe6, 0x7c, 0x92, 0x37, 0x39, 0x71, 0xe7, 0x27, 0x11, 0x08, 0x2c, 0xd9, 0xa9, 0x21, 0x63, 0xd2, - 0x78, 0xaa, 0xf0, 0x90, 0x75, 0xf4, 0x21, 0x1d, 0x32, 0x26, 0x7d, 0x53, 0xa6, 0x4c, 0xea, 0xb6, - 0xb6, 0xc3, 0x24, 0x0c, 0x32, 0xb2, 0xff, 0x54, 0x11, 0xa9, 0x5b, 0xeb, 0x52, 0xb2, 0x53, 0xea, - 0x76, 0xa3, 0xc2, 0x5d, 0x6b, 0xb5, 0xff, 0x68, 0xb0, 0x73, 0xbb, 0x65, 0xca, 0xf0, 0xdf, 0xe8, - 0x3c, 0x67, 0xfc, 0x74, 0xff, 0xb6, 0xde, 0x23, 0x3c, 0x71, 0xfc, 0x86, 0x05, 0xe7, 0x5a, 0x5d, - 0x37, 0x53, 0xb1, 0x61, 0xf5, 0x6b, 0x32, 0xf2, 0x01, 0x53, 0xc9, 0x59, 0xbb, 0xe3, 0x71, 0x8f, - 0x3a, 0xb3, 0x0a, 0x68, 0xf9, 0x7d, 0x2b, 0xa0, 0xf7, 0x60, 0x84, 0xe9, 0x4c, 0x69, 0x9e, 0x8c, - 0x3e, 0x53, 0x4b, 0xb0, 0xad, 0x6f, 0x49, 0xb0, 0xc0, 0x8a, 0x19, 0x1d, 0xb8, 0x27, 0xb3, 0x9d, - 0xc0, 0x84, 0xa1, 0x45, 0x56, 0x59, 0xee, 0xdb, 0x58, 0x11, 0x23, 0xf1, 0x64, 0xed, 0x30, 0xe2, - 0x83, 0x3c, 0x02, 0x7c, 0x78, 0x65, 0x27, 0xa9, 0xd0, 0xfe, 0x33, 0xab, 0x8b, 0xfe, 0xc5, 0x4d, - 0x90, 0x4f, 0x9a, 0x26, 0xc8, 0xb3, 0x59, 0x13, 0xa4, 0xc3, 0x5d, 0x60, 0x58, 0x1f, 0xc5, 0x93, - 0x20, 0x16, 0x4d, 0xe4, 0x61, 0xfb, 0x70, 0x21, 0x6f, 0x71, 0xb3, 0x88, 0x1e, 0x57, 0x1d, 0x8f, - 0xa5, 0x11, 0x3d, 0xee, 0x6a, 0x15, 0x33, 0x4c, 0xd1, 0xbb, 0xe0, 0xf6, 0xff, 0xb6, 0xa0, 0x5c, - 0x0b, 0xdd, 0x63, 0x74, 0x7f, 0x5c, 0x33, 0xdc, 0x1f, 0xcf, 0xe4, 0xbe, 0x98, 0xd4, 0xd3, 0xd9, - 0xb1, 0x96, 0x71, 0x76, 0x7c, 0x34, 0x9f, 0xd5, 0xe1, 0xae, 0x8d, 0xef, 0x95, 0x41, 0x7f, 0xf3, - 0x09, 0xfd, 0xe7, 0xa3, 0x04, 0x78, 0x96, 0x8b, 0x3d, 0x03, 0x25, 0xea, 0x60, 0xa1, 0x40, 0xf2, - 0xf2, 0xd7, 0x8f, 0x6d, 0x9c, 0xe7, 0x3d, 0xe2, 0x6d, 0x6d, 0x27, 0xc4, 0xcd, 0x76, 0xec, 0xe4, - 0xe2, 0x3c, 0xff, 0x87, 0x05, 0x93, 0x99, 0xda, 0x91, 0xdf, 0xed, 0xfe, 0xc8, 0x11, 0x1d, 0x1a, - 0xa7, 0x72, 0x2f, 0x9c, 0xcc, 0x01, 0x28, 0x3f, 0xb4, 0x74, 0x3b, 0x30, 0x1d, 0x4c, 0x39, 0xaa, - 0x63, 0xac, 0x51, 0xa0, 0x57, 0x61, 0x34, 0x09, 0x5b, 0xa1, 0x1f, 0x6e, 0xed, 0xde, 0x20, 0x32, - 0x3b, 0x81, 0xf2, 0xe1, 0xaf, 0xa7, 0x28, 0xac, 0xd3, 0xd9, 0xdf, 0x2f, 0x43, 0xf6, 0xc5, 0xb0, - 0xff, 0x3f, 0x4f, 0x7f, 0x7c, 0xe6, 0xe9, 0x1f, 0x58, 0x30, 0x45, 0x6b, 0x67, 0x81, 0x1c, 0x32, - 0x1e, 0x53, 0xe5, 0x43, 0xb7, 0x0e, 0xc9, 0x87, 0xfe, 0x2c, 0x95, 0x76, 0x6e, 0xd8, 0x4e, 0x84, - 0xab, 0x44, 0x13, 0x62, 0x14, 0x8a, 0x05, 0x56, 0xd0, 0x91, 0x28, 0x12, 0x17, 0x55, 0x74, 0x3a, - 0x12, 0x45, 0x58, 0x60, 0x65, 0xba, 0xf4, 0x81, 0x1e, 0xe9, 0xd2, 0x59, 0x7e, 0x1f, 0x11, 0x40, - 0x20, 0xd4, 0x00, 0x2d, 0xbf, 0x8f, 0x8c, 0x2c, 0x48, 0x69, 0xec, 0xef, 0x96, 0x61, 0xac, 0x16, - 0xba, 0x69, 0xa0, 0xf5, 0x2b, 0x46, 0xa0, 0xf5, 0x85, 0x4c, 0xa0, 0xf5, 0x94, 0x4e, 0xfb, 0x68, - 0xe2, 0xac, 0x45, 0x1e, 0x28, 0x96, 0xd0, 0xff, 0x88, 0x31, 0xd6, 0x46, 0x1e, 0x28, 0xc5, 0x08, - 0x9b, 0x7c, 0xff, 0x22, 0xc5, 0x56, 0xff, 0xb9, 0x05, 0x13, 0xb5, 0xd0, 0xa5, 0x13, 0xf4, 0x2f, - 0xd2, 0x6c, 0xd4, 0xb3, 0x47, 0x0d, 0x1d, 0x92, 0x3d, 0xea, 0x97, 0x2c, 0x18, 0xae, 0x85, 0xee, - 0x09, 0xb8, 0x11, 0x57, 0x4c, 0x37, 0xe2, 0x53, 0xb9, 0x92, 0xb7, 0x87, 0xe7, 0xf0, 0x57, 0xcb, - 0x30, 0x4e, 0x5b, 0x1c, 0x6e, 0xc9, 0xef, 0x65, 0x8c, 0x8d, 0x55, 0x60, 0x6c, 0xa8, 0x2a, 0x18, - 0xfa, 0x7e, 0xf8, 0x20, 0xfb, 0xed, 0x56, 0x18, 0x14, 0x0b, 0x2c, 0xba, 0x04, 0x23, 0xad, 0x88, - 0xec, 0x78, 0x61, 0x3b, 0xce, 0x5e, 0x7a, 0xab, 0x09, 0x38, 0x56, 0x14, 0xe8, 0x15, 0x18, 0x8b, - 0xbd, 0xa0, 0x41, 0x64, 0x78, 0xc1, 0x00, 0x0b, 0x2f, 0xe0, 0x09, 0xfa, 0x34, 0x38, 0x36, 0xa8, - 0xd0, 0x3d, 0xa8, 0xb0, 0xff, 0x6c, 0x05, 0xf5, 0x9f, 0x69, 0x9d, 0x67, 0xa7, 0x92, 0x0c, 0x70, - 0xca, 0x0b, 0x5d, 0x01, 0x48, 0x64, 0x20, 0x44, 0x2c, 0xb2, 0x6c, 0x28, 0xbd, 0x54, 0x85, 0x48, - 0xc4, 0x58, 0xa3, 0x42, 0x2f, 0x40, 0x25, 0x71, 0x3c, 0xff, 0xa6, 0x17, 0x90, 0x58, 0x04, 0x92, - 0x88, 0x44, 0xb8, 0x02, 0x88, 0x53, 0x3c, 0xdd, 0xef, 0xd9, 0x95, 0x5b, 0xfe, 0x8a, 0xc3, 0x08, - 0xa3, 0x66, 0xfb, 0xfd, 0x4d, 0x05, 0xc5, 0x1a, 0x85, 0xfd, 0x32, 0xdb, 0xb7, 0xfb, 0x8c, 0xc3, - 0xff, 0x61, 0x09, 0x50, 0x8d, 0x05, 0x5c, 0x18, 0x0f, 0x68, 0x6c, 0xc3, 0x44, 0x4c, 0x6e, 0x7a, - 0x41, 0xfb, 0xa1, 0x60, 0x55, 0xec, 0xe2, 0x43, 0x7d, 0x59, 0x2f, 0xc3, 0x6f, 0x99, 0x9a, 0x30, - 0x9c, 0xe1, 0x4b, 0x87, 0x24, 0x6a, 0x07, 0x0b, 0xf1, 0x9d, 0x98, 0x44, 0xe2, 0xa9, 0x0a, 0x36, - 0x24, 0x58, 0x02, 0x71, 0x8a, 0xa7, 0x53, 0x80, 0xfd, 0xb9, 0x1d, 0x06, 0x38, 0x0c, 0x13, 0x39, - 0x69, 0x58, 0xea, 0x72, 0x0d, 0x8e, 0x0d, 0x2a, 0xb4, 0x02, 0x28, 0x6e, 0xb7, 0x5a, 0x3e, 0x3b, - 0xd3, 0x72, 0xfc, 0x6b, 0x51, 0xd8, 0x6e, 0xf1, 0x98, 0x5b, 0x91, 0xf5, 0xbb, 0xde, 0x81, 0xc5, - 0x5d, 0x4a, 0xd0, 0x25, 0xbf, 0x19, 0xb3, 0xdf, 0xe2, 0x16, 0x2d, 0xf7, 0xad, 0xd5, 0x19, 0x08, - 0x4b, 0x9c, 0xfd, 0x35, 0xb6, 0x4d, 0xb1, 0x37, 0x04, 0x92, 0x76, 0x44, 0x50, 0x13, 0xc6, 0x5b, - 0x6c, 0x2b, 0x4a, 0xa2, 0xd0, 0xf7, 0x89, 0xd4, 0x12, 0x8f, 0x16, 0xf2, 0xc1, 0xb3, 0x86, 0xeb, - 0xec, 0xb0, 0xc9, 0xdd, 0xfe, 0x87, 0xa3, 0x4c, 0xe2, 0x88, 0x63, 0xc5, 0x61, 0x11, 0xd8, 0x29, - 0xf4, 0xb1, 0x8f, 0x14, 0x79, 0x93, 0x27, 0x95, 0xe6, 0x22, 0x4c, 0x14, 0x4b, 0x2e, 0xe8, 0xf3, - 0x2c, 0x6c, 0x99, 0x2f, 0xf3, 0xe2, 0x0f, 0x65, 0x71, 0x7a, 0x23, 0x64, 0x59, 0xb0, 0xc0, 0x1a, - 0x3b, 0x74, 0x13, 0xc6, 0x45, 0xca, 0x79, 0xe1, 0x1c, 0x28, 0x1b, 0x06, 0xf2, 0x38, 0xd6, 0x91, - 0x07, 0x59, 0x00, 0x36, 0x0b, 0xa3, 0x2d, 0x78, 0x52, 0x7b, 0xdc, 0xa6, 0x4b, 0x78, 0x12, 0x97, - 0x1f, 0x4f, 0xed, 0xef, 0xcd, 0x3e, 0xb9, 0x7e, 0x18, 0x21, 0x3e, 0x9c, 0x0f, 0x5a, 0x83, 0xb3, - 0x4e, 0x23, 0xf1, 0x76, 0x48, 0x95, 0x38, 0xae, 0xef, 0x05, 0xc4, 0xbc, 0x6a, 0xfd, 0xf8, 0xfe, - 0xde, 0xec, 0xd9, 0x85, 0x6e, 0x04, 0xb8, 0x7b, 0x39, 0xf4, 0x49, 0xa8, 0xb8, 0x41, 0x2c, 0xc6, - 0x60, 0xc8, 0x78, 0xc7, 0xa7, 0x52, 0xbd, 0x5d, 0x57, 0xfd, 0x4f, 0xff, 0xe0, 0xb4, 0x00, 0x7a, - 0x87, 0x3f, 0x7d, 0xac, 0x6c, 0x12, 0xfe, 0x7e, 0xd4, 0x6b, 0x85, 0xac, 0x60, 0xe3, 0x4a, 0x04, - 0xf7, 0x9b, 0xa9, 0x30, 0x40, 0xe3, 0xb6, 0x84, 0x51, 0x05, 0xfa, 0x0c, 0xa0, 0x98, 0x44, 0x3b, - 0x5e, 0x83, 0x2c, 0x34, 0x58, 0x8e, 0x4a, 0x76, 0x40, 0x37, 0x62, 0xc4, 0xc2, 0xa3, 0x7a, 0x07, - 0x05, 0xee, 0x52, 0x0a, 0x5d, 0xa7, 0x92, 0x47, 0x87, 0x8a, 0xa8, 0x4d, 0xa9, 0xde, 0x4d, 0x57, - 0x49, 0x2b, 0x22, 0x0d, 0x27, 0x21, 0xae, 0xc9, 0x11, 0x67, 0xca, 0xd1, 0xdd, 0x45, 0xa5, 0x06, - 0x07, 0x33, 0xd6, 0xb0, 0x33, 0x3d, 0x38, 0xb5, 0x96, 0xb6, 0xc3, 0x38, 0xb9, 0x4d, 0x92, 0x07, - 0x61, 0x74, 0x9f, 0xf9, 0xdb, 0x47, 0xb4, 0x94, 0x5f, 0x29, 0x0a, 0xeb, 0x74, 0x54, 0x13, 0x62, - 0x07, 0x3d, 0xab, 0x55, 0xe6, 0x45, 0x1f, 0x49, 0xd7, 0xce, 0x75, 0x0e, 0xc6, 0x12, 0x2f, 0x49, - 0x57, 0x6b, 0x4b, 0xcc, 0x23, 0x9e, 0x21, 0x5d, 0xad, 0x2d, 0x61, 0x89, 0x47, 0x61, 0xe7, 0x6b, - 0x49, 0x13, 0x45, 0x4e, 0x27, 0x3a, 0x25, 0x79, 0xc1, 0x07, 0x93, 0x1e, 0xc2, 0x94, 0x7a, 0xb1, - 0x89, 0xe7, 0x62, 0x8c, 0xa7, 0x27, 0x8b, 0x3c, 0xbc, 0xdc, 0x35, 0xa5, 0xa3, 0x0a, 0xd3, 0x5d, - 0xcd, 0xf0, 0xc4, 0x1d, 0xb5, 0x18, 0x29, 0x03, 0xa6, 0x72, 0xd3, 0xbd, 0xcf, 0x43, 0x25, 0x6e, - 0x6f, 0xb8, 0x61, 0xd3, 0xf1, 0x02, 0xe6, 0xb6, 0xd6, 0x9f, 0x11, 0x96, 0x08, 0x9c, 0xd2, 0xa0, - 0x1a, 0x8c, 0x38, 0xf2, 0x05, 0x6d, 0x54, 0xe4, 0x8a, 0xb1, 0x7a, 0x3a, 0x9b, 0xf9, 0x34, 0xd5, - 0x9b, 0xd9, 0x8a, 0xcb, 0xcc, 0xa7, 0xe0, 0x54, 0xc7, 0x2a, 0xe9, 0x2b, 0x52, 0xed, 0x3f, 0x0e, - 0x40, 0x45, 0xb9, 0x8a, 0xd0, 0xbc, 0xe9, 0x0d, 0x7c, 0x3c, 0xeb, 0x0d, 0x1c, 0xa1, 0x7b, 0xba, - 0xee, 0x00, 0xfc, 0x42, 0x97, 0x97, 0x49, 0x9f, 0xcf, 0x9d, 0x16, 0xc5, 0x2f, 0x8e, 0xf4, 0xf1, - 0x6e, 0x6b, 0x6a, 0x2e, 0x0c, 0x1c, 0x6a, 0x2e, 0x14, 0x7c, 0x84, 0x89, 0x1a, 0x06, 0xad, 0xd0, - 0x5d, 0xad, 0x65, 0xdf, 0x18, 0xa9, 0x51, 0x20, 0xe6, 0x38, 0xa6, 0xd0, 0x51, 0x31, 0xcf, 0x14, - 0xba, 0xe1, 0x23, 0x2a, 0x74, 0x92, 0x01, 0x4e, 0x79, 0xa1, 0x1d, 0x38, 0xd5, 0x30, 0x9f, 0x8c, - 0x51, 0xd7, 0x41, 0x5e, 0xec, 0xe3, 0xc9, 0x96, 0xb6, 0x96, 0x1e, 0x7f, 0x29, 0xcb, 0x0f, 0x77, - 0x56, 0x81, 0x5e, 0x87, 0x91, 0x77, 0xc2, 0x78, 0xc9, 0x77, 0xe2, 0x58, 0xc8, 0x3a, 0x19, 0x7a, - 0x3f, 0xf2, 0xe6, 0x5a, 0x9d, 0xc1, 0x0f, 0xf8, 0x5b, 0xf1, 0xf2, 0x2f, 0x56, 0x05, 0xec, 0xef, - 0x73, 0xb7, 0x94, 0x30, 0x54, 0x49, 0xdc, 0xf6, 0x8f, 0x33, 0x13, 0xf5, 0x9a, 0x61, 0x3b, 0x3f, - 0x02, 0x87, 0xe8, 0x6f, 0x59, 0xcc, 0x21, 0xba, 0x4e, 0x9a, 0x2d, 0xdf, 0x49, 0x8e, 0x33, 0x76, - 0xf0, 0xf3, 0x30, 0x92, 0x88, 0x5a, 0x8a, 0xa5, 0xcf, 0xd6, 0x9a, 0xc5, 0x1c, 0xc4, 0x4a, 0x2c, - 0x49, 0x28, 0x56, 0x0c, 0xed, 0x7f, 0xcb, 0xbf, 0x82, 0xc4, 0x9c, 0x80, 0xb5, 0x77, 0xdb, 0xb4, - 0xf6, 0x9e, 0x2b, 0xdc, 0x97, 0x1e, 0x56, 0xdf, 0x2f, 0x9b, 0x3d, 0x60, 0xda, 0xe3, 0x07, 0xdf, - 0x43, 0x6f, 0xaf, 0x81, 0xf9, 0x84, 0x0e, 0x7a, 0x83, 0x47, 0xdf, 0x72, 0x61, 0x7a, 0xa9, 0xef, - 0xc8, 0x5b, 0xfb, 0x57, 0x4a, 0x70, 0x86, 0xfb, 0xe8, 0x16, 0x76, 0x42, 0xcf, 0xad, 0x85, 0xae, - 0x88, 0x45, 0x76, 0x61, 0xac, 0xa5, 0x69, 0xf5, 0xc5, 0x12, 0x2d, 0xe8, 0x76, 0x40, 0xaa, 0x49, - 0xe9, 0x50, 0x6c, 0x70, 0xa5, 0xb5, 0x90, 0x1d, 0xaf, 0xa1, 0x5c, 0x3e, 0xa5, 0xbe, 0xe5, 0x9b, - 0xaa, 0x65, 0x59, 0xe3, 0x83, 0x0d, 0xae, 0xc7, 0x90, 0xe1, 0xdd, 0xfe, 0x39, 0x0b, 0x1e, 0xeb, - 0x91, 0x8c, 0x81, 0x56, 0xf7, 0x80, 0xf9, 0x45, 0xc5, 0x1b, 0x4d, 0xaa, 0x3a, 0xee, 0x2d, 0xc5, - 0x02, 0x8b, 0x36, 0x00, 0xb8, 0xb7, 0x93, 0xbd, 0x86, 0x5b, 0x2a, 0x12, 0x94, 0xd0, 0x71, 0xe9, - 0x59, 0xbb, 0x0f, 0xab, 0xde, 0xbf, 0xd5, 0xb8, 0xda, 0xdf, 0x29, 0xc3, 0x20, 0x7f, 0x90, 0xb3, - 0x06, 0xc3, 0xdb, 0x3c, 0xf5, 0x63, 0x7f, 0x99, 0x27, 0x53, 0xad, 0x8d, 0x03, 0xb0, 0x64, 0x83, - 0x6e, 0xc1, 0x69, 0xaa, 0x22, 0x78, 0x8e, 0x5f, 0x25, 0xbe, 0xb3, 0x2b, 0xcd, 0x00, 0x9e, 0xf6, - 0x5b, 0x66, 0xa8, 0x3d, 0xbd, 0xda, 0x49, 0x82, 0xbb, 0x95, 0x43, 0x6f, 0x74, 0xe4, 0x6e, 0xe2, - 0x29, 0x35, 0xd5, 0x35, 0xaa, 0xc3, 0xf3, 0x37, 0xa1, 0xd7, 0x61, 0xbc, 0xd5, 0x61, 0xf0, 0x68, - 0x2f, 0x2e, 0x9a, 0x46, 0x8e, 0x49, 0x8b, 0xaa, 0x30, 0x15, 0xb7, 0xd9, 0x11, 0xf1, 0xfa, 0x76, - 0x44, 0xe2, 0xed, 0xd0, 0x77, 0xc5, 0x63, 0x61, 0x4a, 0xb9, 0xab, 0x67, 0xf0, 0xb8, 0xa3, 0x04, - 0xe5, 0xb2, 0xe9, 0x78, 0x7e, 0x3b, 0x22, 0x29, 0x97, 0x21, 0x93, 0xcb, 0x4a, 0x06, 0x8f, 0x3b, - 0x4a, 0xd8, 0x7f, 0x62, 0xc1, 0xe9, 0x2e, 0x71, 0x14, 0x3c, 0xba, 0x6f, 0xcb, 0x8b, 0x13, 0x95, - 0xdc, 0x59, 0x8b, 0xee, 0xe3, 0x70, 0xac, 0x28, 0xe8, 0x2c, 0xe4, 0x56, 0x6c, 0xf6, 0x7c, 0x52, - 0x9c, 0x14, 0x0b, 0x6c, 0x7f, 0x99, 0x98, 0xd0, 0x05, 0x18, 0x68, 0xc7, 0x44, 0xbe, 0x5c, 0xaf, - 0x44, 0x14, 0x73, 0x5c, 0x30, 0x0c, 0x55, 0x6a, 0xb6, 0x94, 0xcf, 0x40, 0x53, 0x6a, 0xb8, 0xd7, - 0x80, 0xe3, 0xec, 0x6f, 0x95, 0x61, 0x32, 0x13, 0x4f, 0x45, 0x1b, 0xd2, 0x0c, 0x03, 0x2f, 0x09, - 0x55, 0x16, 0x20, 0xfe, 0xec, 0x09, 0x69, 0x6d, 0xdf, 0x12, 0x70, 0xac, 0x28, 0xd0, 0xb3, 0xe6, - 0xeb, 0xc8, 0x69, 0x9b, 0x17, 0xab, 0xc6, 0x13, 0x6d, 0x45, 0x13, 0xce, 0x3f, 0x0d, 0x03, 0xad, - 0x50, 0x3d, 0xb7, 0xa9, 0x26, 0x3d, 0x5e, 0xac, 0xd6, 0xc2, 0xd0, 0xc7, 0x0c, 0x89, 0x9e, 0x11, - 0xbd, 0xcf, 0x38, 0x4c, 0xb1, 0xe3, 0x86, 0xb1, 0x36, 0x04, 0xcf, 0xc1, 0xf0, 0x7d, 0xb2, 0x1b, - 0x79, 0xc1, 0x56, 0xd6, 0x5d, 0x7c, 0x83, 0x83, 0xb1, 0xc4, 0x9b, 0x49, 0xe5, 0x87, 0x8f, 0x39, - 0xa9, 0xfc, 0x48, 0x6e, 0x48, 0xe8, 0x2f, 0x5a, 0x30, 0xc9, 0x52, 0xe2, 0x89, 0x1b, 0xaa, 0x5e, - 0x18, 0x1c, 0xe3, 0xb6, 0xf8, 0x34, 0x0c, 0x46, 0xb4, 0xb2, 0x6c, 0x3e, 0x68, 0xd6, 0x02, 0xcc, - 0x71, 0xe8, 0x09, 0xf1, 0x02, 0x3e, 0xfd, 0x7c, 0x63, 0x3c, 0xbf, 0x6e, 0xfa, 0x94, 0x3d, 0xbb, - 0x6e, 0x80, 0x49, 0xcb, 0xf7, 0x78, 0x63, 0x53, 0xbf, 0xd0, 0x07, 0xe5, 0xba, 0x41, 0xd7, 0xc6, - 0x3d, 0xaa, 0xeb, 0x06, 0xdd, 0x99, 0x1f, 0xae, 0x82, 0xfe, 0xcf, 0x12, 0x9c, 0xef, 0x5a, 0x2e, - 0x3d, 0x68, 0x5a, 0x31, 0x0e, 0x9a, 0xae, 0x64, 0x0e, 0x9a, 0xec, 0xc3, 0x4b, 0x3f, 0x9a, 0xa3, - 0xa7, 0xee, 0x27, 0x42, 0xe5, 0x13, 0x3c, 0x11, 0x1a, 0x28, 0xaa, 0x2a, 0x0c, 0xe6, 0xa8, 0x0a, - 0xbf, 0x6f, 0xc1, 0xe3, 0x5d, 0x87, 0xec, 0x03, 0x77, 0xbf, 0xa3, 0x6b, 0x2b, 0x7b, 0x28, 0xd0, - 0x7f, 0xa7, 0xdc, 0xa3, 0x57, 0x4c, 0x95, 0xbe, 0x48, 0xa5, 0x0e, 0x43, 0xc6, 0x42, 0x09, 0x1a, - 0xe3, 0x12, 0x87, 0xc3, 0xb0, 0xc2, 0xa2, 0x58, 0xbb, 0x1f, 0xc1, 0x1b, 0xb9, 0x7c, 0xc4, 0x05, - 0x35, 0x67, 0x3a, 0xf2, 0xf4, 0x8b, 0xb6, 0x99, 0x5b, 0x13, 0xe8, 0x9e, 0x66, 0x1c, 0x95, 0x8f, - 0x62, 0x1c, 0x8d, 0x75, 0x37, 0x8c, 0xd0, 0x02, 0x4c, 0x36, 0xbd, 0x80, 0xbd, 0x07, 0x67, 0x6a, - 0x21, 0xea, 0x52, 0xda, 0x2d, 0x13, 0x8d, 0xb3, 0xf4, 0x33, 0xaf, 0xc3, 0xf8, 0xd1, 0x7d, 0x2d, - 0xef, 0x95, 0xe1, 0xc3, 0x87, 0x08, 0x05, 0xbe, 0x1b, 0x18, 0xdf, 0x45, 0xdb, 0x0d, 0x3a, 0xbe, - 0x4d, 0x0d, 0xce, 0x6c, 0xb6, 0x7d, 0x7f, 0x97, 0x85, 0x69, 0x10, 0x57, 0x52, 0x08, 0x0d, 0x4f, - 0xbd, 0xd4, 0xba, 0xd2, 0x85, 0x06, 0x77, 0x2d, 0x89, 0x3e, 0x03, 0x28, 0xdc, 0x60, 0x49, 0x22, - 0xdd, 0xf4, 0x22, 0x31, 0xfb, 0x04, 0xe5, 0x74, 0xa9, 0xae, 0x75, 0x50, 0xe0, 0x2e, 0xa5, 0xa8, - 0xbe, 0xc7, 0x1e, 0x79, 0x55, 0xcd, 0xca, 0xe8, 0x7b, 0x58, 0x47, 0x62, 0x93, 0x16, 0x5d, 0x83, - 0x53, 0xce, 0x8e, 0xe3, 0xf1, 0x34, 0x30, 0x92, 0x01, 0x57, 0xf8, 0x94, 0x37, 0x63, 0x21, 0x4b, - 0x80, 0x3b, 0xcb, 0xa0, 0x96, 0xe1, 0x9e, 0xe2, 0x49, 0xa1, 0x3f, 0x79, 0x84, 0x19, 0x5c, 0xd8, - 0x61, 0x65, 0xff, 0xb1, 0x45, 0xb7, 0xbc, 0x2e, 0xcf, 0x93, 0x19, 0x6f, 0x8e, 0x6b, 0x77, 0x46, - 0x3a, 0xdf, 0x1c, 0x67, 0xbe, 0x60, 0x93, 0x96, 0x4f, 0x8d, 0x38, 0x8d, 0xf2, 0x34, 0xb4, 0x4b, - 0x71, 0x55, 0x4a, 0x51, 0xa0, 0x7b, 0x30, 0xec, 0x7a, 0x3b, 0x5e, 0x1c, 0x46, 0x05, 0x5e, 0xf9, - 0xed, 0x88, 0x1c, 0x4c, 0xa5, 0x65, 0x95, 0x33, 0xc1, 0x92, 0x9b, 0xfd, 0x77, 0x4b, 0x30, 0x2e, - 0xeb, 0x7b, 0xb3, 0x1d, 0x32, 0x19, 0x76, 0x5c, 0x1b, 0xf9, 0x9b, 0xc6, 0x46, 0x3e, 0x5f, 0xec, - 0xbe, 0x18, 0x6b, 0x54, 0xcf, 0x0d, 0xfc, 0xb3, 0x99, 0x0d, 0xfc, 0x72, 0x3f, 0x4c, 0x0f, 0xdf, - 0xb8, 0xff, 0xbd, 0x05, 0xa7, 0x0c, 0xfa, 0x13, 0xd8, 0x3f, 0x6a, 0xe6, 0xfe, 0xf1, 0x42, 0x1f, - 0xbd, 0xe9, 0xb1, 0x6f, 0x7c, 0xa7, 0x94, 0xe9, 0x05, 0xdb, 0x2f, 0xbe, 0x0a, 0x03, 0xdb, 0x4e, - 0xe4, 0x16, 0xcb, 0x83, 0xd6, 0x51, 0x7c, 0xee, 0xba, 0x13, 0xb9, 0x5c, 0xea, 0x5f, 0x52, 0x8f, - 0xa7, 0x38, 0x91, 0x9b, 0x1b, 0xf2, 0xcc, 0x2a, 0x45, 0x57, 0x61, 0x28, 0x6e, 0x84, 0x2d, 0x15, - 0x64, 0x76, 0x81, 0x3f, 0xac, 0x42, 0x21, 0x07, 0x7b, 0xb3, 0xc8, 0xac, 0x8e, 0x82, 0xb1, 0xa0, - 0x9f, 0x21, 0x50, 0x51, 0x55, 0x1f, 0x63, 0x70, 0xed, 0x7b, 0x65, 0x38, 0xdd, 0x65, 0xa6, 0xa0, - 0xaf, 0x19, 0xa3, 0xf6, 0x7a, 0xdf, 0x53, 0xed, 0x7d, 0x8e, 0xdb, 0xd7, 0x98, 0x35, 0xe4, 0x8a, - 0xb9, 0x71, 0x84, 0xea, 0xef, 0xc4, 0x24, 0x5b, 0x3d, 0x05, 0xe5, 0x57, 0x4f, 0xab, 0x3d, 0xa1, - 0xc1, 0xa7, 0xd5, 0xa8, 0x76, 0x1e, 0xe3, 0x37, 0x7e, 0x77, 0x00, 0xce, 0x74, 0xbb, 0x92, 0x8a, - 0x7e, 0xca, 0xca, 0xa4, 0x35, 0x7f, 0xa3, 0xff, 0x7b, 0xad, 0x3c, 0xd7, 0xb9, 0x48, 0xdb, 0x30, - 0x67, 0x26, 0x3a, 0xcf, 0x1d, 0x6d, 0x51, 0x3b, 0xbb, 0xa6, 0x10, 0xf1, 0x04, 0xf5, 0x52, 0x1e, - 0x7c, 0xfa, 0x08, 0x4d, 0x11, 0x39, 0xee, 0xe3, 0xcc, 0x35, 0x05, 0x09, 0xce, 0xbf, 0xa6, 0x20, - 0xdb, 0x30, 0xb3, 0x05, 0xa3, 0x5a, 0xbf, 0x8e, 0x71, 0x0a, 0x78, 0x74, 0x4b, 0xd2, 0x5a, 0x7d, - 0x8c, 0xd3, 0xe0, 0x67, 0x2d, 0xc8, 0x44, 0x90, 0x28, 0x97, 0x8b, 0xd5, 0xd3, 0xe5, 0x72, 0x01, - 0x06, 0xa2, 0xd0, 0x27, 0xd9, 0x74, 0xdb, 0x38, 0xf4, 0x09, 0x66, 0x18, 0xf5, 0x86, 0x62, 0xb9, - 0xd7, 0x1b, 0x8a, 0xd4, 0x16, 0xf7, 0xc9, 0x0e, 0x91, 0x0e, 0x10, 0x25, 0xbc, 0x6f, 0x52, 0x20, - 0xe6, 0x38, 0xfb, 0x77, 0xca, 0x30, 0xc4, 0xbd, 0x0c, 0xc7, 0xb8, 0x2b, 0xd7, 0x84, 0xc1, 0x5f, - 0xe8, 0x7a, 0x28, 0x6f, 0xcd, 0x5c, 0xd5, 0x49, 0x1c, 0x3e, 0xa1, 0x54, 0xdf, 0x52, 0x27, 0x01, - 0x9a, 0x33, 0x7a, 0x3f, 0x93, 0xb1, 0x67, 0x81, 0xf3, 0xd0, 0xc6, 0x62, 0x1b, 0x20, 0x66, 0xaf, - 0x75, 0x51, 0x1e, 0x22, 0x59, 0xdd, 0x2b, 0x85, 0xda, 0x51, 0x57, 0xc5, 0x78, 0x6b, 0xd2, 0x2c, - 0x59, 0x0a, 0x81, 0x35, 0xde, 0x33, 0xaf, 0x41, 0x45, 0x11, 0xe7, 0x29, 0xfa, 0x63, 0xfa, 0x94, - 0xfc, 0x4b, 0x30, 0x99, 0xa9, 0xab, 0x2f, 0x3b, 0xe1, 0xd7, 0x2d, 0x38, 0xd5, 0xf1, 0xf8, 0x2b, - 0x7a, 0xd7, 0x82, 0x33, 0x7e, 0x17, 0xf7, 0x92, 0xf8, 0xc0, 0x47, 0x71, 0x4c, 0x29, 0x23, 0xa1, - 0x1b, 0x16, 0x77, 0xad, 0x4d, 0xa6, 0xdf, 0x2c, 0x75, 0x4f, 0xbf, 0x69, 0xff, 0x8a, 0x05, 0xe2, - 0x93, 0x9d, 0x80, 0x02, 0xb4, 0x6a, 0x2a, 0x40, 0x1f, 0x29, 0x32, 0x0b, 0x7a, 0x68, 0x3e, 0xbf, - 0x6b, 0x01, 0xe2, 0x04, 0xd9, 0x47, 0xfb, 0xb8, 0xb7, 0x4e, 0xd3, 0xd8, 0xd3, 0x69, 0xa3, 0x30, - 0x58, 0xa3, 0xea, 0x33, 0x23, 0xbb, 0x7a, 0xec, 0xaa, 0xd8, 0x8b, 0xfc, 0xe5, 0x02, 0x2f, 0xf2, - 0xff, 0x56, 0x19, 0xb2, 0x41, 0x16, 0xe8, 0x4b, 0x30, 0xd6, 0x70, 0x5a, 0xce, 0x86, 0xe7, 0x7b, - 0x89, 0x47, 0xe2, 0x62, 0x27, 0x46, 0x4b, 0x5a, 0x09, 0xe1, 0xef, 0xd5, 0x20, 0xd8, 0xe0, 0x88, - 0xe6, 0x00, 0x5a, 0x91, 0xb7, 0xe3, 0xf9, 0x64, 0x8b, 0xa9, 0x1d, 0x2c, 0xd6, 0x92, 0x1f, 0x7e, - 0x48, 0x28, 0xd6, 0x28, 0xba, 0x44, 0xf5, 0x95, 0x4f, 0x22, 0xaa, 0x6f, 0xa0, 0xcf, 0xa8, 0xbe, - 0xc1, 0x42, 0x51, 0x7d, 0x18, 0xce, 0x49, 0x37, 0x2d, 0xfd, 0xbf, 0xe2, 0xf9, 0x84, 0xa7, 0xdb, - 0x13, 0xb1, 0x98, 0x33, 0xfb, 0x7b, 0xb3, 0xe7, 0x70, 0x57, 0x0a, 0xdc, 0xa3, 0xa4, 0xdd, 0x86, - 0xd3, 0x75, 0x12, 0x79, 0x2c, 0x0b, 0x92, 0x9b, 0x2e, 0xc0, 0x2f, 0x40, 0x25, 0xca, 0xac, 0xfd, - 0x3e, 0x2f, 0xc8, 0x69, 0x79, 0x34, 0xe4, 0x5a, 0x4f, 0x59, 0xda, 0x7f, 0xad, 0x04, 0xc3, 0x22, - 0x98, 0xe9, 0x18, 0xf7, 0x91, 0x1b, 0x86, 0x75, 0xf7, 0x5c, 0xde, 0xca, 0x65, 0xcd, 0xe9, 0x69, - 0xd7, 0xd5, 0x33, 0x76, 0xdd, 0x0b, 0xc5, 0xd8, 0x1d, 0x6e, 0xd1, 0xfd, 0x66, 0x09, 0x26, 0xcc, - 0xa0, 0xae, 0x63, 0x1c, 0x8e, 0xb7, 0x60, 0x38, 0x16, 0x91, 0x4e, 0xa5, 0x22, 0x41, 0x1e, 0xd9, - 0x4f, 0x9a, 0xbe, 0xee, 0x2f, 0x62, 0x9b, 0x24, 0xbb, 0xae, 0xc1, 0x54, 0xe5, 0x93, 0x08, 0xa6, - 0xb2, 0x7f, 0x9b, 0x89, 0x54, 0x7d, 0x00, 0x4f, 0x60, 0x4b, 0x78, 0xd3, 0x14, 0xbe, 0x97, 0x0a, - 0xcd, 0x04, 0xd1, 0xbc, 0x1e, 0x5b, 0xc3, 0xaf, 0x59, 0x30, 0x2a, 0x08, 0x4f, 0xa0, 0x03, 0x9f, - 0x31, 0x3b, 0xf0, 0x4c, 0xa1, 0x0e, 0xf4, 0x68, 0xf9, 0x3f, 0x28, 0xa9, 0x96, 0xd7, 0xc4, 0x53, - 0xa6, 0xb9, 0xd9, 0x17, 0x47, 0x5a, 0x51, 0x98, 0x84, 0x8d, 0xd0, 0x17, 0x5b, 0xfc, 0x13, 0x69, - 0x10, 0x3c, 0x87, 0x1f, 0x68, 0xbf, 0xb1, 0xa2, 0x66, 0xd1, 0xdd, 0x61, 0x94, 0x88, 0x0d, 0xaa, - 0xdb, 0x43, 0xaa, 0x1b, 0xf2, 0xa1, 0x6a, 0x0a, 0x13, 0xf7, 0x47, 0xfa, 0x7d, 0xa0, 0x35, 0x8d, - 0x69, 0x57, 0x9c, 0xb0, 0xc6, 0x55, 0x86, 0x59, 0xb2, 0x1a, 0x06, 0x4d, 0x17, 0xea, 0x6d, 0x01, - 0xc7, 0x8a, 0xc2, 0x7e, 0x8d, 0x49, 0x58, 0x36, 0x3c, 0xfd, 0x05, 0xaa, 0xff, 0xcc, 0x90, 0x1a, - 0x58, 0xe6, 0x21, 0xb9, 0x0d, 0x83, 0xb4, 0x8b, 0xd2, 0x08, 0x2c, 0x26, 0xce, 0x68, 0x13, 0xf4, - 0xb0, 0xb2, 0x28, 0x89, 0x31, 0x67, 0x83, 0x48, 0x87, 0xdf, 0xfd, 0xb5, 0xc2, 0x12, 0xb2, 0x0f, - 0x4f, 0x3b, 0x4b, 0x61, 0xc3, 0xf2, 0x76, 0xac, 0xd6, 0xb2, 0x19, 0x33, 0x97, 0x24, 0x02, 0xa7, - 0x34, 0x68, 0x5e, 0xe8, 0xea, 0xe6, 0x3b, 0xb7, 0x52, 0x57, 0x97, 0x43, 0xa2, 0x29, 0xeb, 0x97, - 0x61, 0x54, 0xe5, 0x0c, 0xaf, 0xf1, 0xd4, 0xcf, 0x15, 0xae, 0xbd, 0x2c, 0xa7, 0x60, 0xac, 0xd3, - 0xa0, 0x55, 0x38, 0xed, 0xaa, 0xa8, 0xda, 0x5a, 0x7b, 0xc3, 0xf7, 0x1a, 0xb4, 0x28, 0xbf, 0xd7, - 0xf2, 0xd8, 0xfe, 0xde, 0xec, 0xe9, 0x6a, 0x27, 0x1a, 0x77, 0x2b, 0x83, 0xd6, 0x61, 0x32, 0xe6, - 0xb9, 0xd1, 0x65, 0xe8, 0xa4, 0x48, 0x24, 0xf7, 0xbc, 0x74, 0xf8, 0xd7, 0x4d, 0xf4, 0x01, 0x03, - 0x71, 0x99, 0x20, 0x83, 0x2d, 0xb3, 0x2c, 0xd0, 0x1b, 0x30, 0xe1, 0xeb, 0xcf, 0x3c, 0xd5, 0x44, - 0x70, 0xb1, 0x0a, 0x85, 0x30, 0x1e, 0x81, 0xaa, 0xe1, 0x0c, 0x35, 0x7a, 0x0b, 0xa6, 0x75, 0x88, - 0xb8, 0x5f, 0xef, 0x04, 0x5b, 0x24, 0x16, 0x49, 0x99, 0x9f, 0xd8, 0xdf, 0x9b, 0x9d, 0xbe, 0xd9, - 0x83, 0x06, 0xf7, 0x2c, 0x8d, 0xae, 0xc2, 0x98, 0x1c, 0x49, 0x2d, 0xd0, 0x38, 0x0d, 0xc2, 0xd1, - 0x70, 0xd8, 0xa0, 0x7c, 0x7f, 0xe7, 0x1a, 0x5f, 0xa5, 0x85, 0xb5, 0x2d, 0x15, 0x7d, 0x19, 0xc6, - 0xf4, 0x36, 0x0a, 0x29, 0xf9, 0x52, 0xf1, 0xa7, 0xb3, 0xc4, 0xd6, 0xac, 0x5a, 0xae, 0xe3, 0xb0, - 0xc1, 0xdb, 0x5e, 0x83, 0xa1, 0xfa, 0x6e, 0xdc, 0x48, 0xfc, 0x47, 0xf5, 0xc4, 0x71, 0x03, 0x26, - 0x33, 0x6f, 0x01, 0xab, 0x47, 0xa5, 0xad, 0x47, 0xf5, 0xa8, 0xb4, 0xfd, 0x75, 0x0b, 0x06, 0xd7, - 0x1d, 0x2f, 0xff, 0x39, 0x83, 0x22, 0x4d, 0x46, 0xaf, 0xc2, 0x10, 0xd9, 0xdc, 0x24, 0x0d, 0xf9, - 0x48, 0xf5, 0x93, 0x52, 0xa5, 0x59, 0x66, 0x50, 0xba, 0x34, 0x59, 0x65, 0xfc, 0x2f, 0x16, 0xc4, - 0xf6, 0x7f, 0xb2, 0x00, 0xd6, 0x43, 0x5f, 0x1e, 0xd9, 0xe4, 0xb4, 0x64, 0xb1, 0xe3, 0x61, 0x85, - 0x67, 0xbb, 0x3c, 0xac, 0x80, 0x52, 0x86, 0x5d, 0x9e, 0x55, 0x50, 0xbd, 0x29, 0x17, 0xea, 0xcd, - 0x40, 0x3f, 0xbd, 0xf9, 0xa6, 0x05, 0x22, 0x7a, 0xa6, 0xc0, 0x4c, 0x70, 0x65, 0x32, 0x74, 0x23, - 0x73, 0xc6, 0xf3, 0x45, 0x2e, 0xa4, 0x88, 0x7c, 0x19, 0x6a, 0x6e, 0x1a, 0x59, 0x32, 0x0c, 0xae, - 0xd4, 0x90, 0x1f, 0xe5, 0xe8, 0x5b, 0x4c, 0x7f, 0xcc, 0x6f, 0x57, 0x5f, 0x39, 0xc2, 0x58, 0xae, - 0x70, 0xca, 0x58, 0xe5, 0x8a, 0xd2, 0x73, 0x85, 0x4b, 0x04, 0x4e, 0x69, 0xd0, 0x73, 0x30, 0x1c, - 0xb7, 0x37, 0x18, 0x79, 0x26, 0x94, 0xa6, 0xce, 0xc1, 0x58, 0xe2, 0xed, 0x9f, 0x44, 0x60, 0x74, - 0xcd, 0xc8, 0x4b, 0x65, 0x3d, 0xf2, 0xbc, 0x54, 0x6f, 0xc3, 0x08, 0x69, 0xb6, 0x92, 0xdd, 0xaa, - 0x17, 0x15, 0xcb, 0x10, 0xb8, 0x2c, 0xa8, 0x3b, 0xb9, 0x4b, 0x0c, 0x56, 0x1c, 0x7b, 0x64, 0x19, - 0x2b, 0x7f, 0x20, 0xb2, 0x8c, 0x0d, 0xfc, 0x48, 0xb2, 0x8c, 0xbd, 0x05, 0xc3, 0x5b, 0x5e, 0x82, - 0x49, 0x2b, 0x14, 0xf7, 0x10, 0x73, 0xce, 0xc2, 0xae, 0x71, 0xe2, 0xce, 0xd4, 0x41, 0x02, 0x81, - 0x25, 0x3b, 0xb4, 0x0e, 0x43, 0xdc, 0xf6, 0x10, 0x89, 0xbb, 0x5e, 0x2a, 0xe2, 0x95, 0xe9, 0xcc, - 0x61, 0x25, 0xe2, 0xa5, 0x04, 0x2f, 0x99, 0x55, 0x6c, 0xf8, 0xfd, 0x67, 0x15, 0x53, 0xb9, 0xc0, - 0x46, 0x1e, 0x55, 0x2e, 0x30, 0x23, 0xa7, 0x5a, 0xe5, 0x38, 0x72, 0xaa, 0x7d, 0xd3, 0x82, 0xb3, - 0xad, 0x6e, 0x19, 0x09, 0x45, 0x56, 0xaf, 0x4f, 0x1d, 0x21, 0x43, 0xa3, 0x51, 0x35, 0xbb, 0x17, - 0xd6, 0x95, 0x0c, 0x77, 0xaf, 0x58, 0x26, 0x67, 0x1b, 0x7d, 0xff, 0xc9, 0xd9, 0x8e, 0x3b, 0xfd, - 0x57, 0x9a, 0xaa, 0x6d, 0xfc, 0x58, 0x52, 0xb5, 0x4d, 0x3c, 0xc2, 0x54, 0x6d, 0x5a, 0x92, 0xb5, - 0xc9, 0x47, 0x9b, 0x64, 0x6d, 0x1b, 0x46, 0xdd, 0xf0, 0x41, 0xf0, 0xc0, 0x89, 0xdc, 0x85, 0xda, - 0xaa, 0xc8, 0xe9, 0x95, 0x93, 0x40, 0xa2, 0x9a, 0x16, 0x30, 0x6a, 0xe0, 0xee, 0xc7, 0x14, 0x89, - 0x75, 0xd6, 0x22, 0xdd, 0xdc, 0xa9, 0xf7, 0x99, 0x6e, 0xce, 0x48, 0xda, 0x86, 0x8e, 0x23, 0x69, - 0xdb, 0x97, 0xd8, 0x4d, 0xf2, 0x4d, 0x6f, 0xeb, 0x96, 0xd3, 0x9a, 0x3e, 0x5d, 0xa4, 0x86, 0x25, - 0x49, 0xde, 0x59, 0x83, 0x42, 0xe1, 0x94, 0x69, 0x67, 0x5a, 0xb8, 0x33, 0x27, 0x9d, 0x16, 0xee, - 0xec, 0x31, 0xa6, 0x85, 0x3b, 0x77, 0xa2, 0x69, 0xe1, 0x1e, 0xfb, 0x91, 0xa4, 0x85, 0xfb, 0x2b, - 0x70, 0xfe, 0xf0, 0xcf, 0x91, 0xa6, 0x1d, 0xae, 0xa5, 0x2e, 0x83, 0x4c, 0xda, 0x61, 0xa6, 0xea, - 0x68, 0x54, 0x85, 0xb3, 0x53, 0x7d, 0xd7, 0x82, 0xc7, 0x7a, 0x24, 0x71, 0x29, 0x7c, 0x8f, 0xa1, - 0x05, 0x93, 0x2d, 0xb3, 0x68, 0xe1, 0x1b, 0x47, 0x46, 0xd2, 0x18, 0x15, 0x23, 0x97, 0x41, 0xe0, - 0x2c, 0xfb, 0xc5, 0x8f, 0xfc, 0xe0, 0xbd, 0xf3, 0x1f, 0xfa, 0xe1, 0x7b, 0xe7, 0x3f, 0xf4, 0x87, - 0xef, 0x9d, 0xff, 0xd0, 0x4f, 0xec, 0x9f, 0xb7, 0x7e, 0xb0, 0x7f, 0xde, 0xfa, 0xe1, 0xfe, 0x79, - 0xeb, 0x4f, 0xf6, 0xcf, 0x5b, 0xdf, 0xfc, 0xd3, 0xf3, 0x1f, 0xfa, 0x5c, 0x69, 0xe7, 0xf2, 0xff, - 0x0b, 0x00, 0x00, 0xff, 0xff, 0x1f, 0x95, 0x60, 0xd6, 0x7d, 0xb7, 0x00, 0x00, + // 10271 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x7d, 0x6d, 0x6c, 0x24, 0xc7, + 0x95, 0x98, 0x7b, 0x86, 0x5f, 0xf3, 0xf8, 0xb9, 0xb5, 0x1f, 0xa2, 0x68, 0x69, 0xb9, 0x6a, 0x59, + 0xf2, 0x4a, 0x5a, 0x91, 0xde, 0x95, 0x64, 0xad, 0x2d, 0x47, 0x36, 0xc9, 0x21, 0x77, 0xe9, 0x25, + 0x77, 0x47, 0x35, 0xdc, 0x5d, 0xd9, 0x56, 0x2c, 0x35, 0xa7, 0x8b, 0x64, 0x6b, 0x9b, 0xdd, 0xa3, + 0xee, 0x1e, 0xee, 0x52, 0x8e, 0x81, 0x3b, 0x9f, 0x70, 0x87, 0x20, 0x4e, 0xe2, 0xe0, 0x60, 0xe0, + 0x90, 0x4b, 0xe0, 0x4b, 0x80, 0x04, 0x4e, 0x0e, 0xf9, 0x70, 0x9c, 0x3b, 0xfb, 0x70, 0x4e, 0x82, + 0x24, 0x77, 0x8e, 0x2f, 0x1f, 0x07, 0x07, 0x07, 0xe4, 0x2e, 0x67, 0x80, 0x39, 0xf1, 0x82, 0xfc, + 0xcc, 0x8f, 0xe4, 0x1f, 0x13, 0x24, 0x41, 0x7d, 0x76, 0x55, 0xcf, 0x0c, 0xbb, 0x87, 0x5a, 0xd2, + 0xf2, 0x21, 0xff, 0x66, 0xde, 0x7b, 0xf5, 0xea, 0xa3, 0x5f, 0x55, 0xbd, 0xf7, 0xea, 0xd5, 0x2b, + 0xb8, 0x74, 0xef, 0x6a, 0x3c, 0xe3, 0x85, 0xb3, 0xf7, 0x5a, 0xeb, 0x24, 0x0a, 0x48, 0x42, 0xe2, + 0xd9, 0xe6, 0xbd, 0xcd, 0x59, 0xa7, 0xe9, 0xcd, 0xee, 0x5c, 0x9e, 0xdd, 0x24, 0x01, 0x89, 0x9c, + 0x84, 0xb8, 0x33, 0xcd, 0x28, 0x4c, 0x42, 0xf4, 0x18, 0xa7, 0x9e, 0x49, 0xa9, 0x67, 0x9a, 0xf7, + 0x36, 0x67, 0x9c, 0xa6, 0x37, 0xb3, 0x73, 0x79, 0xea, 0xf9, 0x4d, 0x2f, 0xd9, 0x6a, 0xad, 0xcf, + 0x34, 0xc2, 0xed, 0xd9, 0xcd, 0x70, 0x33, 0x9c, 0x65, 0x85, 0xd6, 0x5b, 0x1b, 0xec, 0x1f, 0xfb, + 0xc3, 0x7e, 0x71, 0x66, 0x53, 0x2f, 0x8a, 0xaa, 0x9d, 0xa6, 0xb7, 0xed, 0x34, 0xb6, 0xbc, 0x80, + 0x44, 0xbb, 0xb2, 0xf2, 0x78, 0x76, 0x9b, 0x24, 0x4e, 0x87, 0x26, 0x4c, 0xcd, 0x76, 0x2b, 0x15, + 0xb5, 0x82, 0xc4, 0xdb, 0x26, 0x6d, 0x05, 0x3e, 0x99, 0x57, 0x20, 0x6e, 0x6c, 0x91, 0x6d, 0xa7, + 0xad, 0xdc, 0x95, 0xee, 0x23, 0x13, 0x91, 0x38, 0x6c, 0x45, 0x8d, 0xf6, 0xba, 0x2e, 0x77, 0x2e, + 0xd3, 0x4a, 0x3c, 0x7f, 0xd6, 0x0b, 0x92, 0x38, 0x89, 0xb2, 0x45, 0xec, 0x3f, 0xb4, 0xe0, 0xc2, + 0xdc, 0xdd, 0xfa, 0xa2, 0xef, 0xc4, 0x89, 0xd7, 0x98, 0xf7, 0xc3, 0xc6, 0xbd, 0x7a, 0x12, 0x46, + 0xe4, 0x4e, 0xe8, 0xb7, 0xb6, 0x49, 0x9d, 0xd5, 0x83, 0x2e, 0xc1, 0xd0, 0x0e, 0xfb, 0xbf, 0x5c, + 0x9d, 0xb4, 0x2e, 0x58, 0x17, 0x2b, 0xf3, 0x13, 0x3f, 0xda, 0x9b, 0xfe, 0xc8, 0xfe, 0xde, 0xf4, + 0xd0, 0x1d, 0x01, 0xc7, 0x8a, 0x02, 0x3d, 0x0d, 0x03, 0x1b, 0xf1, 0xda, 0x6e, 0x93, 0x4c, 0x96, + 0x18, 0xed, 0x98, 0xa0, 0x1d, 0x58, 0xaa, 0x53, 0x28, 0x16, 0x58, 0x34, 0x0b, 0x95, 0xa6, 0x13, + 0x25, 0x5e, 0xe2, 0x85, 0xc1, 0x64, 0xf9, 0x82, 0x75, 0xb1, 0x7f, 0xfe, 0x94, 0x20, 0xad, 0xd4, + 0x24, 0x02, 0xa7, 0x34, 0xb4, 0x19, 0x11, 0x71, 0xdc, 0x5b, 0x81, 0xbf, 0x3b, 0xd9, 0x77, 0xc1, + 0xba, 0x38, 0x94, 0x36, 0x03, 0x0b, 0x38, 0x56, 0x14, 0xf6, 0xf7, 0x4b, 0x30, 0x34, 0xb7, 0xb1, + 0xe1, 0x05, 0x5e, 0xb2, 0x8b, 0xde, 0x82, 0x91, 0x20, 0x74, 0x89, 0xfc, 0xcf, 0x7a, 0x31, 0x7c, + 0xe5, 0xd9, 0x99, 0xc3, 0x04, 0x6a, 0xe6, 0xa6, 0x56, 0x62, 0x7e, 0x62, 0x7f, 0x6f, 0x7a, 0x44, + 0x87, 0x60, 0x83, 0x23, 0x7a, 0x03, 0x86, 0x9b, 0xa1, 0xab, 0x2a, 0x28, 0xb1, 0x0a, 0x9e, 0x39, + 0xbc, 0x82, 0x5a, 0x5a, 0x60, 0x7e, 0x7c, 0x7f, 0x6f, 0x7a, 0x58, 0x03, 0x60, 0x9d, 0x1d, 0xf2, + 0x61, 0x9c, 0xfe, 0x0d, 0x12, 0x4f, 0xd5, 0x50, 0x66, 0x35, 0x3c, 0x9f, 0x5f, 0x83, 0x56, 0x68, + 0xfe, 0xf4, 0xfe, 0xde, 0xf4, 0x78, 0x06, 0x88, 0xb3, 0xac, 0xed, 0x77, 0x61, 0x6c, 0x2e, 0x49, + 0x9c, 0xc6, 0x16, 0x71, 0xf9, 0xf7, 0x45, 0x2f, 0x42, 0x5f, 0xe0, 0x6c, 0x13, 0xf1, 0xf5, 0x2f, + 0x88, 0x61, 0xef, 0xbb, 0xe9, 0x6c, 0x93, 0x83, 0xbd, 0xe9, 0x89, 0xdb, 0x81, 0xf7, 0x4e, 0x4b, + 0xc8, 0x0c, 0x85, 0x61, 0x46, 0x8d, 0xae, 0x00, 0xb8, 0x64, 0xc7, 0x6b, 0x90, 0x9a, 0x93, 0x6c, + 0x09, 0x69, 0x40, 0xa2, 0x2c, 0x54, 0x15, 0x06, 0x6b, 0x54, 0xf6, 0xd7, 0x2c, 0xa8, 0xcc, 0xed, + 0x84, 0x9e, 0x5b, 0x0b, 0xdd, 0x18, 0xb5, 0x60, 0xbc, 0x19, 0x91, 0x0d, 0x12, 0x29, 0xd0, 0xa4, + 0x75, 0xa1, 0x7c, 0x71, 0xf8, 0xca, 0x95, 0x9c, 0x7e, 0x9b, 0x85, 0x16, 0x83, 0x24, 0xda, 0x9d, + 0x7f, 0x44, 0x54, 0x3d, 0x9e, 0xc1, 0xe2, 0x6c, 0x1d, 0xf6, 0x5f, 0x2b, 0xc1, 0xd9, 0xb9, 0x77, + 0x5b, 0x11, 0xa9, 0x7a, 0xf1, 0xbd, 0xec, 0x54, 0x70, 0xbd, 0xf8, 0xde, 0xcd, 0x74, 0x30, 0x94, + 0x0c, 0x56, 0x05, 0x1c, 0x2b, 0x0a, 0xf4, 0x3c, 0x0c, 0xd2, 0xdf, 0xb7, 0xf1, 0xb2, 0xe8, 0xfd, + 0x69, 0x41, 0x3c, 0x5c, 0x75, 0x12, 0xa7, 0xca, 0x51, 0x58, 0xd2, 0xa0, 0x55, 0x18, 0x6e, 0xb0, + 0x35, 0x62, 0x73, 0x35, 0x74, 0x09, 0xfb, 0xc2, 0x95, 0xf9, 0xe7, 0x28, 0xf9, 0x42, 0x0a, 0x3e, + 0xd8, 0x9b, 0x9e, 0xe4, 0x6d, 0x13, 0x2c, 0x34, 0x1c, 0xd6, 0xcb, 0x23, 0x5b, 0x4d, 0xc4, 0x3e, + 0xc6, 0x09, 0x3a, 0x4c, 0xc2, 0x8b, 0xda, 0x9c, 0xea, 0x67, 0x73, 0x6a, 0xa4, 0xcb, 0x7c, 0xfa, + 0xfb, 0x96, 0x18, 0x93, 0x25, 0xcf, 0x37, 0x97, 0x87, 0x2b, 0x00, 0x31, 0x69, 0x44, 0x24, 0xd1, + 0x46, 0x45, 0x7d, 0xe6, 0xba, 0xc2, 0x60, 0x8d, 0x8a, 0x4e, 0xfe, 0x78, 0xcb, 0x89, 0x98, 0xb4, + 0x88, 0xb1, 0x51, 0x93, 0xbf, 0x2e, 0x11, 0x38, 0xa5, 0x31, 0x26, 0x7f, 0x39, 0x77, 0xf2, 0xff, + 0x2b, 0x0b, 0x06, 0xe7, 0xbd, 0xc0, 0xf5, 0x82, 0x4d, 0xf4, 0x16, 0x0c, 0xd1, 0xd5, 0xdc, 0x75, + 0x12, 0x47, 0xcc, 0xfb, 0x4f, 0x48, 0xe1, 0xd1, 0x17, 0x65, 0x29, 0x3e, 0xf1, 0x0c, 0xa5, 0xa6, + 0x42, 0x74, 0x6b, 0xfd, 0x6d, 0xd2, 0x48, 0x56, 0x49, 0xe2, 0xa4, 0xdd, 0x49, 0x61, 0x58, 0x71, + 0x45, 0xb7, 0x61, 0x20, 0x71, 0xa2, 0x4d, 0x92, 0x88, 0x69, 0x9f, 0x33, 0x29, 0x39, 0x0f, 0x4c, + 0x45, 0x8e, 0x04, 0x0d, 0x92, 0x2e, 0x90, 0x6b, 0x8c, 0x09, 0x16, 0xcc, 0xec, 0x06, 0x8c, 0x2c, + 0x38, 0x4d, 0x67, 0xdd, 0xf3, 0xbd, 0xc4, 0x23, 0x31, 0xfa, 0x38, 0x94, 0x1d, 0xd7, 0x65, 0x13, + 0xa0, 0x32, 0x7f, 0x76, 0x7f, 0x6f, 0xba, 0x3c, 0xe7, 0xba, 0x07, 0x7b, 0xd3, 0xa0, 0xa8, 0x76, + 0x31, 0xa5, 0x40, 0xcf, 0x42, 0x9f, 0x1b, 0x85, 0xcd, 0xc9, 0x12, 0xa3, 0x3c, 0x47, 0x67, 0x6a, + 0x35, 0x0a, 0x9b, 0x19, 0x52, 0x46, 0x63, 0xff, 0x6e, 0x09, 0xd0, 0x02, 0x69, 0x6e, 0x2d, 0xd5, + 0x8d, 0x6f, 0x7a, 0x11, 0x86, 0xb6, 0xc3, 0xc0, 0x4b, 0xc2, 0x28, 0x16, 0x15, 0x32, 0xb9, 0x58, + 0x15, 0x30, 0xac, 0xb0, 0xe8, 0x02, 0xf4, 0x35, 0xd3, 0xe9, 0x3d, 0x22, 0x97, 0x06, 0x36, 0xb1, + 0x19, 0x86, 0x52, 0xb4, 0x62, 0x12, 0x09, 0x79, 0x56, 0x14, 0xb7, 0x63, 0x12, 0x61, 0x86, 0x49, + 0x25, 0x88, 0xca, 0x96, 0x90, 0xd6, 0x8c, 0x04, 0x51, 0x0c, 0xd6, 0xa8, 0xd0, 0x9b, 0x50, 0xe1, + 0xff, 0x30, 0xd9, 0x60, 0xa2, 0x9b, 0xbb, 0x28, 0xac, 0x84, 0x0d, 0xc7, 0xcf, 0x0e, 0xfe, 0x28, + 0x93, 0x38, 0xc9, 0x08, 0xa7, 0x3c, 0x0d, 0x89, 0x1b, 0xc8, 0x95, 0xb8, 0x5f, 0xb1, 0x00, 0x2d, + 0x78, 0x81, 0x4b, 0xa2, 0x13, 0xd8, 0x3a, 0x7b, 0x9b, 0x0c, 0x3f, 0xa1, 0x4d, 0x0b, 0xb7, 0x9b, + 0x61, 0x40, 0x82, 0x64, 0x21, 0x0c, 0x5c, 0xbe, 0x9d, 0x7e, 0x1a, 0xfa, 0x12, 0x5a, 0x15, 0x6f, + 0xd6, 0xd3, 0xf2, 0xb3, 0xd0, 0x0a, 0x0e, 0xf6, 0xa6, 0xcf, 0xb5, 0x97, 0x60, 0x4d, 0x60, 0x65, + 0xd0, 0xa7, 0x60, 0x20, 0x4e, 0x9c, 0xa4, 0x15, 0x8b, 0x86, 0x3e, 0x21, 0x1b, 0x5a, 0x67, 0xd0, + 0x83, 0xbd, 0xe9, 0x71, 0x55, 0x8c, 0x83, 0xb0, 0x28, 0x80, 0x9e, 0x81, 0xc1, 0x6d, 0x12, 0xc7, + 0xce, 0xa6, 0x5c, 0xe0, 0xc6, 0x45, 0xd9, 0xc1, 0x55, 0x0e, 0xc6, 0x12, 0x8f, 0x9e, 0x84, 0x7e, + 0x12, 0x45, 0x61, 0x24, 0x24, 0x62, 0x54, 0x10, 0xf6, 0x2f, 0x52, 0x20, 0xe6, 0x38, 0xfb, 0x3f, + 0x5b, 0x30, 0xae, 0xda, 0xca, 0xeb, 0x3a, 0x81, 0x29, 0xef, 0x02, 0x34, 0x64, 0x07, 0x63, 0x36, + 0xd1, 0xb4, 0x3a, 0x3a, 0x8b, 0x5f, 0xfb, 0x80, 0xa6, 0x75, 0x28, 0x50, 0x8c, 0x35, 0xbe, 0xf6, + 0xbf, 0xb1, 0xe0, 0x74, 0xa6, 0x6f, 0x2b, 0x5e, 0x9c, 0xa0, 0x37, 0xda, 0xfa, 0x37, 0x53, 0xac, + 0x7f, 0xb4, 0x34, 0xeb, 0x9d, 0x92, 0x17, 0x09, 0xd1, 0xfa, 0x86, 0xa1, 0xdf, 0x4b, 0xc8, 0xb6, + 0xec, 0xd6, 0xf3, 0x05, 0xbb, 0xc5, 0xdb, 0x97, 0x7e, 0xa5, 0x65, 0xca, 0x03, 0x73, 0x56, 0xf6, + 0xff, 0xb2, 0xa0, 0xb2, 0x10, 0x06, 0x1b, 0xde, 0xe6, 0xaa, 0xd3, 0x3c, 0x81, 0xef, 0x53, 0x87, + 0x3e, 0xc6, 0x9d, 0x77, 0xe1, 0x72, 0x5e, 0x17, 0x44, 0xc3, 0x66, 0xe8, 0x9e, 0xca, 0x95, 0x05, + 0xb5, 0x4c, 0x51, 0x10, 0x66, 0xcc, 0xa6, 0x5e, 0x86, 0x8a, 0x22, 0x40, 0x13, 0x50, 0xbe, 0x47, + 0xb8, 0x26, 0x59, 0xc1, 0xf4, 0x27, 0x3a, 0x03, 0xfd, 0x3b, 0x8e, 0xdf, 0x12, 0x93, 0x17, 0xf3, + 0x3f, 0x9f, 0x2e, 0x5d, 0xb5, 0xec, 0x5f, 0x65, 0x33, 0x50, 0x54, 0xb2, 0x18, 0xec, 0x88, 0xc5, + 0xe1, 0x3d, 0x0b, 0xce, 0xf8, 0x1d, 0x16, 0x25, 0x31, 0x26, 0x47, 0x59, 0xce, 0x1e, 0x13, 0xcd, + 0x3e, 0xd3, 0x09, 0x8b, 0x3b, 0xd6, 0x66, 0xff, 0xc0, 0x82, 0x33, 0xaa, 0x75, 0x37, 0xc8, 0x6e, + 0x9d, 0xf8, 0xa4, 0x91, 0x84, 0xd1, 0x87, 0xa4, 0x7d, 0xe8, 0x71, 0x3e, 0xd2, 0x7c, 0xa5, 0x19, + 0x16, 0x0c, 0xca, 0x37, 0xc8, 0x2e, 0x1b, 0x76, 0xfb, 0xb7, 0x2d, 0x18, 0x55, 0xcd, 0x3f, 0x81, + 0xe9, 0xb1, 0x62, 0x4e, 0x8f, 0x8f, 0x17, 0x94, 0xad, 0x2e, 0x13, 0xe3, 0x5b, 0x25, 0x38, 0xab, + 0x68, 0x8c, 0xad, 0xe3, 0x43, 0x32, 0xfa, 0xbd, 0x75, 0xf7, 0x06, 0xd9, 0x5d, 0x0b, 0xe9, 0xde, + 0xdf, 0xb9, 0xbb, 0xe8, 0x32, 0x0c, 0xbb, 0x64, 0xc3, 0x69, 0xf9, 0x89, 0x52, 0x71, 0xfb, 0xb9, + 0xed, 0x53, 0x4d, 0xc1, 0x58, 0xa7, 0xb1, 0xbf, 0x35, 0xcc, 0x96, 0x8e, 0xc4, 0xa1, 0x1f, 0x8d, + 0x2a, 0x13, 0x9a, 0x25, 0x32, 0xa2, 0x5b, 0x22, 0xc2, 0xea, 0x78, 0x12, 0xfa, 0xbd, 0x6d, 0xba, + 0xbd, 0x94, 0xcc, 0x5d, 0x63, 0x99, 0x02, 0x31, 0xc7, 0xa1, 0xa7, 0x60, 0xb0, 0x11, 0x6e, 0x6f, + 0x3b, 0x81, 0x3b, 0x59, 0x66, 0xea, 0xcd, 0x30, 0xdd, 0x81, 0x16, 0x38, 0x08, 0x4b, 0x1c, 0x7a, + 0x0c, 0xfa, 0x9c, 0x68, 0x33, 0x9e, 0xec, 0x63, 0x34, 0x43, 0xb4, 0xa6, 0xb9, 0x68, 0x33, 0xc6, + 0x0c, 0x4a, 0xd5, 0x96, 0xfb, 0x61, 0x74, 0xcf, 0x0b, 0x36, 0xab, 0x5e, 0xc4, 0x74, 0x10, 0x4d, + 0x6d, 0xb9, 0xab, 0x30, 0x58, 0xa3, 0x42, 0x35, 0xe8, 0x6f, 0x86, 0x51, 0x12, 0x4f, 0x0e, 0xb0, + 0xe1, 0x7c, 0x2e, 0x57, 0x7a, 0x78, 0xbf, 0x6b, 0x61, 0x94, 0xa4, 0x5d, 0xa1, 0xff, 0x62, 0xcc, + 0x19, 0xa1, 0x05, 0x28, 0x93, 0x60, 0x67, 0x72, 0x90, 0xf1, 0xfb, 0xd8, 0xe1, 0xfc, 0x16, 0x83, + 0x9d, 0x3b, 0x4e, 0x94, 0x4e, 0xa2, 0xc5, 0x60, 0x07, 0xd3, 0xd2, 0xa8, 0x01, 0x15, 0xe9, 0x56, + 0x88, 0x27, 0x87, 0x8a, 0x08, 0x18, 0x16, 0xe4, 0x98, 0xbc, 0xd3, 0xf2, 0x22, 0xb2, 0x4d, 0x82, + 0x24, 0x4e, 0x75, 0x78, 0x89, 0x8d, 0x71, 0xca, 0x17, 0x35, 0x60, 0x84, 0xab, 0x3a, 0xab, 0x61, + 0x2b, 0x48, 0xe2, 0xc9, 0x0a, 0x6b, 0x72, 0x8e, 0x91, 0x7c, 0x27, 0x2d, 0x31, 0x7f, 0x46, 0xb0, + 0x1f, 0xd1, 0x80, 0x31, 0x36, 0x98, 0xa2, 0x37, 0x60, 0xd4, 0xf7, 0x76, 0x48, 0x40, 0xe2, 0xb8, + 0x16, 0x85, 0xeb, 0x64, 0x12, 0x58, 0x6f, 0x9e, 0xcc, 0x33, 0x18, 0xc3, 0x75, 0x32, 0x7f, 0x6a, + 0x7f, 0x6f, 0x7a, 0x74, 0x45, 0x2f, 0x8d, 0x4d, 0x66, 0xe8, 0x4d, 0x18, 0xa3, 0x7a, 0x95, 0x97, + 0xb2, 0x1f, 0x2e, 0xce, 0x1e, 0xed, 0xef, 0x4d, 0x8f, 0x61, 0xa3, 0x38, 0xce, 0xb0, 0x43, 0x6b, + 0x50, 0xf1, 0xbd, 0x0d, 0xd2, 0xd8, 0x6d, 0xf8, 0x64, 0x72, 0x84, 0xf1, 0xce, 0x99, 0x72, 0x2b, + 0x92, 0x9c, 0xeb, 0xb2, 0xea, 0x2f, 0x4e, 0x19, 0xa1, 0x3b, 0x70, 0x2e, 0x21, 0xd1, 0xb6, 0x17, + 0x38, 0x54, 0xb1, 0x10, 0x8a, 0x16, 0xb3, 0xca, 0x47, 0x99, 0xd4, 0x9e, 0x17, 0x03, 0x7b, 0x6e, + 0xad, 0x23, 0x15, 0xee, 0x52, 0x1a, 0xdd, 0x82, 0x71, 0x36, 0x9f, 0x6a, 0x2d, 0xdf, 0xaf, 0x85, + 0xbe, 0xd7, 0xd8, 0x9d, 0x1c, 0x63, 0x0c, 0x9f, 0x92, 0xb6, 0xf6, 0xb2, 0x89, 0xa6, 0x36, 0x48, + 0xfa, 0x0f, 0x67, 0x4b, 0x23, 0x1f, 0xc6, 0x63, 0xd2, 0x68, 0x45, 0x5e, 0xb2, 0x4b, 0x65, 0x9f, + 0x3c, 0x48, 0x26, 0xc7, 0x8b, 0xd8, 0x54, 0x75, 0xb3, 0x10, 0x77, 0x74, 0x64, 0x80, 0x38, 0xcb, + 0x9a, 0x2e, 0x15, 0x71, 0xe2, 0x7a, 0xc1, 0xe4, 0x04, 0x53, 0xa2, 0xd5, 0xfc, 0xaa, 0x53, 0x20, + 0xe6, 0x38, 0x66, 0xaa, 0xd2, 0x1f, 0xb7, 0xe8, 0xda, 0x7b, 0x8a, 0x11, 0xa6, 0xa6, 0xaa, 0x44, + 0xe0, 0x94, 0x86, 0xee, 0x57, 0x49, 0xb2, 0x3b, 0x89, 0x18, 0xa9, 0x9a, 0x6a, 0x6b, 0x6b, 0x5f, + 0xc0, 0x14, 0x8e, 0xee, 0xc0, 0x20, 0x09, 0x76, 0x96, 0xa2, 0x70, 0x7b, 0xf2, 0x74, 0x91, 0x35, + 0x60, 0x91, 0x13, 0xf3, 0x5d, 0x21, 0xd5, 0x96, 0x05, 0x18, 0x4b, 0x66, 0xe8, 0x01, 0x4c, 0x76, + 0xf8, 0x4a, 0xfc, 0xa3, 0x9c, 0x61, 0x1f, 0xe5, 0x33, 0xa2, 0xec, 0xe4, 0x5a, 0x17, 0xba, 0x83, + 0x43, 0x70, 0xb8, 0x2b, 0x77, 0x7b, 0x1d, 0xc6, 0xd4, 0x42, 0xc5, 0xbe, 0x37, 0x9a, 0x86, 0x7e, + 0xba, 0x16, 0x4b, 0xdb, 0xb1, 0x42, 0x07, 0x95, 0x2e, 0xd1, 0x31, 0xe6, 0x70, 0x36, 0xa8, 0xde, + 0xbb, 0x64, 0x7e, 0x37, 0x21, 0xdc, 0x86, 0x28, 0x6b, 0x83, 0x2a, 0x11, 0x38, 0xa5, 0xb1, 0xff, + 0x0f, 0xdf, 0xe5, 0xd3, 0xd5, 0xb0, 0xc0, 0x4e, 0x70, 0x09, 0x86, 0xb6, 0xc2, 0x38, 0xa1, 0xd4, + 0xac, 0x8e, 0xfe, 0x74, 0x5f, 0xbf, 0x2e, 0xe0, 0x58, 0x51, 0xa0, 0x57, 0x60, 0xb4, 0xa1, 0x57, + 0x20, 0x36, 0xa7, 0xb3, 0xa2, 0x88, 0x59, 0x3b, 0x36, 0x69, 0xd1, 0x55, 0x18, 0x62, 0x0e, 0xd5, + 0x46, 0xe8, 0x0b, 0x6b, 0x45, 0xee, 0xb5, 0x43, 0x35, 0x01, 0x3f, 0xd0, 0x7e, 0x63, 0x45, 0x4d, + 0x6d, 0x3e, 0xda, 0x84, 0xe5, 0x9a, 0xd8, 0x40, 0x94, 0xcd, 0x77, 0x9d, 0x41, 0xb1, 0xc0, 0xda, + 0xff, 0xb8, 0xa4, 0x8d, 0x32, 0xd5, 0xb5, 0x09, 0xfa, 0x22, 0x0c, 0xde, 0x77, 0xbc, 0xc4, 0x0b, + 0x36, 0x85, 0x4e, 0xf0, 0x42, 0xc1, 0xdd, 0x84, 0x15, 0xbf, 0xcb, 0x8b, 0xf2, 0x9d, 0x4f, 0xfc, + 0xc1, 0x92, 0x21, 0xe5, 0x1d, 0xb5, 0x82, 0x80, 0xf2, 0x2e, 0xf5, 0xce, 0x1b, 0xf3, 0xa2, 0x9c, + 0xb7, 0xf8, 0x83, 0x25, 0x43, 0xb4, 0x01, 0x20, 0x65, 0x89, 0xb8, 0xc2, 0x91, 0xf9, 0xc9, 0x5e, + 0xd8, 0xaf, 0xa9, 0xd2, 0xf3, 0x63, 0x74, 0xaf, 0x4d, 0xff, 0x63, 0x8d, 0xb3, 0x9d, 0x30, 0xd5, + 0xaa, 0xbd, 0x59, 0xe8, 0x4b, 0x74, 0x4a, 0x3b, 0x51, 0x42, 0xdc, 0xb9, 0x24, 0xeb, 0x0b, 0x3e, + 0x5c, 0x43, 0x5c, 0xf3, 0xb6, 0x89, 0x3e, 0xfd, 0x05, 0x13, 0x9c, 0xf2, 0xb3, 0xbf, 0x57, 0x86, + 0xc9, 0x6e, 0xcd, 0xa5, 0x22, 0x49, 0x1e, 0x78, 0xc9, 0x02, 0x55, 0x7e, 0x2c, 0x53, 0x24, 0x17, + 0x05, 0x1c, 0x2b, 0x0a, 0x2a, 0x1b, 0xb1, 0xb7, 0x19, 0x38, 0xbe, 0x10, 0x5f, 0x25, 0x1b, 0x75, + 0x06, 0xc5, 0x02, 0x4b, 0xe9, 0x22, 0xe2, 0xc4, 0xc2, 0x8f, 0xae, 0xc9, 0x10, 0x66, 0x50, 0x2c, + 0xb0, 0xba, 0xed, 0xdd, 0x97, 0x63, 0x7b, 0x1b, 0x43, 0xd4, 0xff, 0x70, 0x87, 0x08, 0x7d, 0x19, + 0x60, 0xc3, 0x0b, 0xbc, 0x78, 0x8b, 0x71, 0x1f, 0xe8, 0x99, 0xbb, 0x52, 0xb2, 0x96, 0x14, 0x17, + 0xac, 0x71, 0x44, 0x2f, 0xc1, 0xb0, 0x9a, 0x9e, 0xcb, 0xd5, 0xc9, 0x41, 0xd3, 0xf7, 0x9a, 0xae, + 0x55, 0x55, 0xac, 0xd3, 0xd9, 0x6f, 0x67, 0xe5, 0x45, 0xcc, 0x0a, 0x6d, 0x7c, 0xad, 0xa2, 0xe3, + 0x5b, 0x3a, 0x7c, 0x7c, 0xed, 0xff, 0x54, 0x86, 0x71, 0xa3, 0xb2, 0x56, 0x5c, 0x60, 0x45, 0x7b, + 0x8d, 0x6e, 0x58, 0x4e, 0x42, 0xc4, 0x9c, 0xbc, 0xd4, 0xcb, 0xa4, 0xd1, 0xb7, 0x37, 0x3a, 0x17, + 0x38, 0x27, 0xb4, 0x05, 0x15, 0xdf, 0x89, 0x99, 0xf5, 0x4e, 0xc4, 0x5c, 0xec, 0x8d, 0x6d, 0x6a, + 0x54, 0x38, 0x71, 0xa2, 0xed, 0x1e, 0xbc, 0x96, 0x94, 0x39, 0xdd, 0x6d, 0xa9, 0xb2, 0x23, 0x0f, + 0x6f, 0x54, 0x73, 0xa8, 0x46, 0xb4, 0x8b, 0x39, 0x0e, 0x5d, 0x85, 0x91, 0x88, 0x30, 0x49, 0x59, + 0xa0, 0xfa, 0x1c, 0x13, 0xbd, 0xfe, 0x54, 0xf1, 0xc3, 0x1a, 0x0e, 0x1b, 0x94, 0xa9, 0xde, 0x3f, + 0x70, 0x88, 0xde, 0xff, 0x0c, 0x0c, 0xb2, 0x1f, 0x4a, 0x2a, 0xd4, 0x17, 0x5a, 0xe6, 0x60, 0x2c, + 0xf1, 0x59, 0x21, 0x1a, 0x2a, 0x28, 0x44, 0xcf, 0xc2, 0x58, 0xd5, 0x21, 0xdb, 0x61, 0xb0, 0x18, + 0xb8, 0xcd, 0xd0, 0x0b, 0x12, 0x34, 0x09, 0x7d, 0x6c, 0x3f, 0xe1, 0xf3, 0xbd, 0x8f, 0x72, 0xc0, + 0x7d, 0x54, 0x77, 0xb7, 0xff, 0xaf, 0x05, 0xa3, 0x55, 0xe2, 0x93, 0x84, 0xdc, 0x6a, 0x32, 0x8f, + 0x0f, 0x5a, 0x02, 0xb4, 0x19, 0x39, 0x0d, 0x52, 0x23, 0x91, 0x17, 0xba, 0x75, 0xd2, 0x08, 0x03, + 0x76, 0xe6, 0x41, 0x37, 0xc8, 0x73, 0xfb, 0x7b, 0xd3, 0xe8, 0x5a, 0x1b, 0x16, 0x77, 0x28, 0x81, + 0x5c, 0x18, 0x6d, 0x46, 0xc4, 0x70, 0x51, 0x59, 0xf9, 0xaa, 0x46, 0x4d, 0x2f, 0xc2, 0xb5, 0x61, + 0x03, 0x84, 0x4d, 0xa6, 0xe8, 0x73, 0x30, 0x11, 0x46, 0xcd, 0x2d, 0x27, 0xa8, 0x92, 0x26, 0x09, + 0x5c, 0x6a, 0x02, 0x08, 0x7f, 0xe4, 0x99, 0xfd, 0xbd, 0xe9, 0x89, 0x5b, 0x19, 0x1c, 0x6e, 0xa3, + 0xb6, 0x7f, 0xbd, 0x04, 0x67, 0xab, 0xe1, 0xfd, 0xe0, 0xbe, 0x13, 0xb9, 0x73, 0xb5, 0x65, 0xae, + 0xd7, 0x33, 0xff, 0xae, 0xf4, 0x2b, 0x5b, 0x5d, 0xfd, 0xca, 0x5f, 0x82, 0xa1, 0x0d, 0x8f, 0xf8, + 0x2e, 0x26, 0x1b, 0xa2, 0x7b, 0x97, 0x8b, 0x38, 0xde, 0x97, 0x68, 0x19, 0xe9, 0xe3, 0xe0, 0x6e, + 0xed, 0x25, 0xc1, 0x06, 0x2b, 0x86, 0xa8, 0x05, 0x13, 0xd2, 0x70, 0x91, 0x58, 0x31, 0x3b, 0x5e, + 0x28, 0x66, 0x17, 0x99, 0xd5, 0xb0, 0xf1, 0xc0, 0x19, 0x86, 0xb8, 0xad, 0x0a, 0x6a, 0x70, 0x6e, + 0xd3, 0xbd, 0xa1, 0x8f, 0xc9, 0x0a, 0x33, 0x38, 0x99, 0x45, 0xcc, 0xa0, 0xf6, 0xdf, 0xb5, 0xe0, + 0x91, 0xb6, 0xd1, 0x12, 0xee, 0x82, 0xd7, 0xa5, 0x9d, 0xce, 0x0f, 0xc8, 0x72, 0x5a, 0xd9, 0x71, + 0xcc, 0x8b, 0xd9, 0xec, 0xa5, 0x02, 0x36, 0xfb, 0x2d, 0x38, 0xb3, 0xb8, 0xdd, 0x4c, 0x76, 0xab, + 0x9e, 0xe9, 0x0e, 0x7f, 0x19, 0x06, 0xb6, 0x89, 0xeb, 0xb5, 0xb6, 0xc5, 0x67, 0x9d, 0x96, 0x0b, + 0xe9, 0x2a, 0x83, 0x1e, 0xec, 0x4d, 0x8f, 0xd6, 0x93, 0x30, 0x72, 0x36, 0x09, 0x07, 0x60, 0x41, + 0x6e, 0xbf, 0x6f, 0xc1, 0xb8, 0x9c, 0x50, 0x73, 0xae, 0x1b, 0x91, 0x38, 0x46, 0x53, 0x50, 0xf2, + 0x9a, 0x82, 0x11, 0x08, 0x46, 0xa5, 0xe5, 0x1a, 0x2e, 0x79, 0x4d, 0xf4, 0x45, 0xa8, 0xf0, 0x53, + 0x94, 0x54, 0x38, 0x7a, 0x3c, 0x95, 0x61, 0xc6, 0xd4, 0x9a, 0xe4, 0x81, 0x53, 0x76, 0x52, 0xad, + 0x64, 0x4b, 0x75, 0xd9, 0xf4, 0xe9, 0x5f, 0x17, 0x70, 0xac, 0x28, 0xd0, 0x45, 0x18, 0x0a, 0x42, + 0x97, 0x1f, 0x74, 0xf1, 0x4d, 0x97, 0x89, 0xdc, 0x4d, 0x01, 0xc3, 0x0a, 0x6b, 0x7f, 0xdd, 0x82, + 0x11, 0xd9, 0xc7, 0x82, 0x1a, 0x2e, 0x9d, 0x24, 0xa9, 0x76, 0x9b, 0x4e, 0x12, 0xaa, 0xa1, 0x32, + 0x8c, 0xa1, 0x98, 0x96, 0x7b, 0x51, 0x4c, 0xed, 0xdf, 0x2a, 0xc1, 0x98, 0x6c, 0x4e, 0xbd, 0xb5, + 0x1e, 0x13, 0xba, 0x6f, 0x57, 0x1c, 0x3e, 0xf8, 0x44, 0xca, 0xd9, 0xf3, 0x79, 0xc6, 0x8b, 0xf1, + 0xcd, 0x52, 0xbd, 0x60, 0x4e, 0xf2, 0xc1, 0x29, 0x4b, 0xb4, 0x03, 0xa7, 0x82, 0x30, 0x61, 0xfb, + 0x81, 0xc2, 0x17, 0xf3, 0x42, 0x67, 0xeb, 0x79, 0x54, 0xd4, 0x73, 0xea, 0x66, 0x96, 0x1f, 0x6e, + 0xaf, 0x02, 0xdd, 0x92, 0x4e, 0x99, 0x32, 0xab, 0xeb, 0xd9, 0x62, 0x75, 0x75, 0xf7, 0xc9, 0xd8, + 0x3f, 0xb4, 0xa0, 0x22, 0xc9, 0x4e, 0xe2, 0x38, 0xe2, 0x2e, 0x0c, 0xc6, 0xec, 0x13, 0xc9, 0xe1, + 0xba, 0x54, 0xac, 0x0b, 0xfc, 0xbb, 0xa6, 0x9b, 0x20, 0xff, 0x1f, 0x63, 0xc9, 0x8d, 0x39, 0x57, + 0x55, 0x47, 0x3e, 0x74, 0xce, 0x55, 0xd5, 0xb2, 0xee, 0xa7, 0x0e, 0xa3, 0x86, 0xf9, 0x4c, 0x35, + 0xb9, 0x66, 0x44, 0x36, 0xbc, 0x07, 0x59, 0x4d, 0xae, 0xc6, 0xa0, 0x58, 0x60, 0xd1, 0x06, 0x8c, + 0x34, 0xa4, 0x57, 0x36, 0x5d, 0x42, 0x3e, 0x51, 0xd0, 0xd7, 0xab, 0x5c, 0xfc, 0x3c, 0x6c, 0x64, + 0x41, 0xe3, 0x84, 0x0d, 0xbe, 0x74, 0x9d, 0x4a, 0x4f, 0x31, 0xcb, 0x05, 0x3d, 0x1d, 0x11, 0x49, + 0xd2, 0x1a, 0xba, 0x1e, 0x60, 0xda, 0xdf, 0xb6, 0x60, 0x80, 0x3b, 0xfc, 0x8a, 0x79, 0x4d, 0xb5, + 0xc3, 0x8b, 0x74, 0x3c, 0xef, 0x50, 0xa0, 0x38, 0xcb, 0x40, 0x77, 0xa1, 0xc2, 0x7e, 0x30, 0xe7, + 0x45, 0xb9, 0x48, 0x0c, 0x0d, 0xaf, 0x5f, 0x6f, 0xea, 0x1d, 0xc9, 0x00, 0xa7, 0xbc, 0xec, 0x1f, + 0x94, 0xe9, 0xd2, 0x97, 0x92, 0x1a, 0x7b, 0xbb, 0x75, 0x12, 0x7b, 0x7b, 0xe9, 0xf8, 0xf7, 0xf6, + 0x77, 0x60, 0xbc, 0xa1, 0x1d, 0xb3, 0xa4, 0x5f, 0xfc, 0x4a, 0x41, 0xb1, 0xd2, 0xce, 0x66, 0xb8, + 0x83, 0x6b, 0xc1, 0x64, 0x87, 0xb3, 0xfc, 0x11, 0x81, 0x11, 0x2e, 0x0f, 0xa2, 0xbe, 0x3e, 0x56, + 0xdf, 0x6c, 0x11, 0x09, 0xd3, 0x2b, 0x63, 0x52, 0x5c, 0xd7, 0x18, 0x61, 0x83, 0xad, 0xfd, 0xd7, + 0xfb, 0xa1, 0x7f, 0x71, 0x87, 0x04, 0xc9, 0x09, 0x2c, 0x75, 0xdb, 0x30, 0xe6, 0x05, 0x3b, 0xa1, + 0xbf, 0x43, 0x5c, 0x8e, 0x3f, 0xda, 0xf6, 0x7e, 0x4e, 0x54, 0x32, 0xb6, 0x6c, 0x30, 0xc3, 0x19, + 0xe6, 0xc7, 0x61, 0x5a, 0xbf, 0x06, 0x03, 0x5c, 0x32, 0x84, 0x5d, 0x9d, 0xe3, 0x00, 0x67, 0x03, + 0x2b, 0x66, 0x50, 0xea, 0x00, 0xe0, 0xbe, 0x77, 0xc1, 0x08, 0xbd, 0x0d, 0x63, 0x1b, 0x5e, 0x14, + 0x27, 0xd4, 0x3a, 0x8e, 0x13, 0x67, 0xbb, 0x79, 0x04, 0xa3, 0x5a, 0x8d, 0xc8, 0x92, 0xc1, 0x09, + 0x67, 0x38, 0xa3, 0x4d, 0x18, 0xa5, 0x36, 0x5d, 0x5a, 0xd5, 0x60, 0xcf, 0x55, 0x29, 0x9f, 0xda, + 0x8a, 0xce, 0x08, 0x9b, 0x7c, 0xe9, 0x92, 0xd4, 0x60, 0x36, 0xe0, 0x10, 0xd3, 0x6e, 0xd4, 0x92, + 0xc4, 0x8d, 0x3f, 0x8e, 0xa3, 0x2b, 0x1b, 0x8b, 0x62, 0xa8, 0x98, 0x2b, 0x5b, 0x1a, 0xab, 0x60, + 0x7f, 0x97, 0xee, 0xc5, 0x74, 0x0c, 0x4f, 0x60, 0xfb, 0xba, 0x6e, 0x6e, 0x5f, 0x4f, 0x16, 0xf8, + 0xb2, 0x5d, 0xb6, 0xae, 0xb7, 0x60, 0x58, 0xfb, 0xf0, 0x68, 0x16, 0x2a, 0x0d, 0x79, 0xd0, 0x2e, + 0x56, 0x71, 0xa5, 0x4a, 0xa9, 0x13, 0x78, 0x9c, 0xd2, 0xd0, 0x71, 0xa1, 0x2a, 0x68, 0x36, 0x2c, + 0x87, 0x2a, 0xa8, 0x98, 0x61, 0xec, 0x17, 0x00, 0x16, 0x1f, 0x90, 0xc6, 0x5c, 0x83, 0x45, 0x83, + 0x68, 0x07, 0x62, 0x56, 0xf7, 0x03, 0x31, 0xfb, 0x3b, 0x16, 0x8c, 0x2d, 0x2d, 0x18, 0x3a, 0xfd, + 0x0c, 0x00, 0xd7, 0x8d, 0xef, 0xde, 0xbd, 0x29, 0x1d, 0xbe, 0xdc, 0x2b, 0xa7, 0xa0, 0x58, 0xa3, + 0x40, 0x8f, 0x42, 0xd9, 0x6f, 0x05, 0x42, 0x65, 0x1d, 0xdc, 0xdf, 0x9b, 0x2e, 0xaf, 0xb4, 0x02, + 0x4c, 0x61, 0x5a, 0xfc, 0x4b, 0xb9, 0x70, 0xfc, 0x4b, 0x7e, 0x24, 0xe8, 0x37, 0xcb, 0x30, 0xb1, + 0xe4, 0x93, 0x07, 0x46, 0xab, 0x9f, 0x86, 0x01, 0x37, 0xf2, 0x76, 0x48, 0x94, 0x55, 0x04, 0xaa, + 0x0c, 0x8a, 0x05, 0xb6, 0x70, 0x48, 0xce, 0x9b, 0xed, 0x1b, 0xf9, 0xf1, 0x85, 0x23, 0xe5, 0xf6, + 0x19, 0x6d, 0xc0, 0x60, 0xc8, 0x5d, 0x0a, 0x93, 0xfd, 0x4c, 0x14, 0x5f, 0x39, 0xbc, 0x31, 0xd9, + 0xf1, 0x99, 0x11, 0x0e, 0x09, 0x1e, 0x0c, 0xa1, 0xd6, 0x32, 0x01, 0xc5, 0x92, 0xf9, 0xd4, 0xa7, + 0x61, 0x44, 0xa7, 0xec, 0x29, 0x2a, 0xe2, 0x17, 0x2c, 0x38, 0xbd, 0xe4, 0x87, 0x8d, 0x7b, 0x99, + 0x98, 0xa9, 0x97, 0x60, 0x98, 0x4e, 0xa6, 0xd8, 0x08, 0x28, 0x34, 0x22, 0x27, 0x05, 0x0a, 0xeb, + 0x74, 0x5a, 0xb1, 0xdb, 0xb7, 0x97, 0xab, 0x9d, 0x02, 0x2e, 0x05, 0x0a, 0xeb, 0x74, 0xf6, 0xef, + 0x5b, 0xf0, 0xf8, 0xb5, 0x85, 0xc5, 0x1a, 0x89, 0x62, 0x2f, 0x4e, 0x48, 0x90, 0xb4, 0xc5, 0x7c, + 0x52, 0x9d, 0xd1, 0xd5, 0x9a, 0x92, 0xea, 0x8c, 0x55, 0xd6, 0x0a, 0x81, 0xfd, 0xb0, 0x04, 0x3e, + 0x7f, 0xdb, 0x82, 0xd3, 0xd7, 0xbc, 0x04, 0x93, 0x66, 0x98, 0x0d, 0xd3, 0x8c, 0x48, 0x33, 0x8c, + 0xbd, 0x24, 0x8c, 0x76, 0xb3, 0x61, 0x9a, 0x58, 0x61, 0xb0, 0x46, 0xc5, 0x6b, 0xde, 0xf1, 0x62, + 0xda, 0xd2, 0x92, 0x69, 0xea, 0x62, 0x01, 0xc7, 0x8a, 0x82, 0x76, 0xcc, 0xf5, 0x22, 0xa6, 0x32, + 0xec, 0x8a, 0x19, 0xac, 0x3a, 0x56, 0x95, 0x08, 0x9c, 0xd2, 0xd8, 0x7f, 0xc3, 0x82, 0xb3, 0xd7, + 0xfc, 0x56, 0x9c, 0x90, 0x68, 0x23, 0x36, 0x1a, 0xfb, 0x02, 0x54, 0x88, 0x54, 0xee, 0x45, 0x5b, + 0xd5, 0xa6, 0xa1, 0xb4, 0x7e, 0x1e, 0x23, 0xaa, 0xe8, 0x0a, 0x84, 0x22, 0xf6, 0x16, 0x38, 0xf7, + 0xdb, 0x25, 0x18, 0xbd, 0xbe, 0xb6, 0x56, 0xbb, 0x46, 0x12, 0xb1, 0x4a, 0xe6, 0x3b, 0xa5, 0x6a, + 0x9a, 0x45, 0xae, 0xed, 0x2d, 0x99, 0x59, 0xd7, 0x4a, 0x3c, 0x7f, 0x86, 0x87, 0xe4, 0xcf, 0x2c, + 0x07, 0xc9, 0xad, 0xa8, 0x9e, 0x44, 0x5e, 0xb0, 0xd9, 0xd1, 0x82, 0x97, 0x2b, 0x79, 0xb9, 0xdb, + 0x4a, 0x8e, 0x5e, 0x80, 0x01, 0x76, 0x8b, 0x40, 0xaa, 0x1e, 0x1f, 0x55, 0x5a, 0x02, 0x83, 0x1e, + 0xec, 0x4d, 0x57, 0x6e, 0xe3, 0x65, 0xfe, 0x07, 0x0b, 0x52, 0xf4, 0x26, 0x0c, 0x6f, 0x25, 0x49, + 0xf3, 0x3a, 0x71, 0x5c, 0x12, 0xc9, 0x55, 0xe2, 0xe2, 0xe1, 0xab, 0x04, 0x1d, 0x0c, 0x5e, 0x20, + 0x9d, 0x58, 0x29, 0x2c, 0xc6, 0x3a, 0x47, 0xbb, 0x0e, 0x90, 0xe2, 0x1e, 0x92, 0x05, 0x62, 0xff, + 0x7c, 0x09, 0x06, 0xaf, 0x3b, 0x81, 0xeb, 0x93, 0x08, 0x2d, 0x41, 0x1f, 0x79, 0x40, 0x1a, 0x62, + 0x1b, 0xcf, 0x69, 0x7a, 0xba, 0xd5, 0x71, 0xaf, 0x1a, 0xfd, 0x8f, 0x59, 0x79, 0x84, 0x61, 0x90, + 0xb6, 0xfb, 0x9a, 0x8a, 0xdf, 0x7d, 0x2e, 0x7f, 0x14, 0x94, 0x48, 0xf0, 0x7d, 0x52, 0x80, 0xb0, + 0x64, 0xc4, 0xfc, 0x4f, 0x8d, 0x66, 0x9d, 0x2e, 0x6e, 0x49, 0x31, 0xbb, 0x6e, 0x6d, 0xa1, 0xc6, + 0xc9, 0x05, 0x5f, 0xee, 0x7f, 0x92, 0x40, 0x9c, 0xb2, 0xb3, 0xaf, 0xc2, 0x19, 0x76, 0x7c, 0xe9, + 0x24, 0x5b, 0xc6, 0x9c, 0xc9, 0x15, 0x4e, 0xfb, 0x6f, 0x95, 0xe0, 0xd4, 0x72, 0x7d, 0xa1, 0x6e, + 0x7a, 0x0e, 0xaf, 0xc2, 0x08, 0xdf, 0x9e, 0xa9, 0xd0, 0x39, 0xbe, 0x28, 0xaf, 0x5c, 0xee, 0x6b, + 0x1a, 0x0e, 0x1b, 0x94, 0xe8, 0x71, 0x28, 0x7b, 0xef, 0x04, 0xd9, 0xc8, 0xac, 0xe5, 0xd7, 0x6e, + 0x62, 0x0a, 0xa7, 0x68, 0xba, 0xd3, 0xf3, 0x25, 0x4e, 0xa1, 0xd5, 0x6e, 0xff, 0x2a, 0x8c, 0x79, + 0x71, 0x23, 0xf6, 0x96, 0x03, 0x3a, 0xff, 0x9d, 0x86, 0x14, 0xdf, 0x54, 0x35, 0xa7, 0x4d, 0x55, + 0x58, 0x9c, 0xa1, 0xd6, 0xd6, 0xdb, 0xfe, 0xc2, 0xda, 0x42, 0x7e, 0x20, 0xef, 0xdb, 0x50, 0x51, + 0x41, 0x4c, 0x32, 0xf4, 0xcc, 0xea, 0x1c, 0x7a, 0x56, 0x60, 0xc1, 0x91, 0xfe, 0xdc, 0x72, 0x47, + 0x7f, 0xee, 0x3f, 0xb0, 0x20, 0x8d, 0xd7, 0x40, 0x18, 0x2a, 0xcd, 0x90, 0x1d, 0x96, 0x44, 0xf2, + 0x54, 0xf2, 0xa9, 0x1c, 0x49, 0xe4, 0x33, 0x81, 0xcb, 0x4a, 0x4d, 0x96, 0xc5, 0x29, 0x1b, 0xb4, + 0x02, 0x83, 0xcd, 0x88, 0xd4, 0x13, 0x16, 0x0d, 0xde, 0x03, 0x47, 0x26, 0xd5, 0x35, 0x5e, 0x12, + 0x4b, 0x16, 0xf6, 0x3f, 0xb7, 0x00, 0x56, 0xbc, 0x6d, 0x2f, 0xc1, 0x4e, 0xb0, 0x49, 0x4e, 0xc0, + 0xd8, 0xbb, 0x09, 0x7d, 0x71, 0x93, 0x34, 0x8a, 0x1d, 0x77, 0xa5, 0x2d, 0xab, 0x37, 0x49, 0x23, + 0xfd, 0x1c, 0xf4, 0x1f, 0x66, 0x7c, 0xec, 0x7f, 0x08, 0x30, 0x96, 0x92, 0x51, 0x85, 0x1b, 0x3d, + 0x6f, 0x84, 0x41, 0x3f, 0x9a, 0x09, 0x83, 0xae, 0x30, 0x6a, 0x2d, 0xf2, 0x39, 0x81, 0xf2, 0xb6, + 0xf3, 0x40, 0xe8, 0xf7, 0x2f, 0x15, 0x6d, 0x10, 0xad, 0x69, 0x66, 0xd5, 0x79, 0xc0, 0xd5, 0xa9, + 0xe7, 0xa4, 0x20, 0xad, 0x3a, 0x0f, 0x0e, 0xf8, 0xa1, 0x16, 0x9b, 0x89, 0xd4, 0xa0, 0xf8, 0xda, + 0x7f, 0x49, 0xff, 0xb3, 0xc5, 0x91, 0x56, 0xc7, 0x6a, 0xf5, 0x02, 0xe1, 0x9e, 0xec, 0xb1, 0x56, + 0x2f, 0xc8, 0xd6, 0xea, 0x05, 0x05, 0x6a, 0xf5, 0x02, 0xf4, 0x9e, 0x05, 0x83, 0xc2, 0xab, 0xcf, + 0x22, 0xe0, 0x86, 0xaf, 0x7c, 0xaa, 0xa7, 0xaa, 0xc5, 0xf1, 0x00, 0xaf, 0x7e, 0x56, 0xea, 0x90, + 0x02, 0x9a, 0xdb, 0x04, 0x59, 0x35, 0xfa, 0x35, 0x0b, 0xc6, 0xc4, 0x6f, 0x4c, 0xde, 0x69, 0x91, + 0x38, 0x11, 0xbb, 0xd5, 0xe7, 0x8e, 0xd2, 0x1a, 0xc1, 0x82, 0x37, 0xea, 0x93, 0x72, 0xa9, 0x31, + 0x91, 0xb9, 0x6d, 0xcb, 0xb4, 0x07, 0x7d, 0xdf, 0x82, 0x33, 0xdb, 0xce, 0x03, 0x5e, 0x23, 0x87, + 0x61, 0x27, 0xf1, 0x42, 0x11, 0xe5, 0xb7, 0xd4, 0xab, 0x9c, 0xb4, 0x31, 0xe2, 0xcd, 0x95, 0x01, + 0x3c, 0x67, 0x3a, 0x91, 0xe4, 0x36, 0xba, 0x63, 0x0b, 0xa7, 0x5c, 0x18, 0x92, 0x82, 0xd9, 0x41, + 0x7b, 0x9f, 0xd7, 0x37, 0xe5, 0xc3, 0x67, 0xa0, 0xf4, 0x77, 0xcd, 0xbc, 0xd6, 0x72, 0x82, 0xc4, + 0x4b, 0x76, 0x35, 0x5d, 0x9f, 0xd5, 0x22, 0x04, 0xf1, 0x18, 0x6b, 0xd9, 0x82, 0x11, 0x5d, 0xe6, + 0x8e, 0xb1, 0xa6, 0x10, 0x4e, 0x77, 0x90, 0xa7, 0x63, 0xac, 0xb0, 0x05, 0x8f, 0x76, 0x95, 0x8b, + 0xe3, 0xab, 0xd6, 0xfe, 0x67, 0x96, 0xbe, 0x60, 0x9e, 0x80, 0x07, 0x65, 0xd5, 0xf4, 0xa0, 0x5c, + 0x2c, 0x3a, 0x73, 0xba, 0xb8, 0x51, 0x36, 0xf4, 0xe6, 0xd3, 0x8d, 0x00, 0xad, 0xc1, 0x80, 0x4f, + 0x21, 0xf2, 0x00, 0xeb, 0x52, 0x2f, 0x73, 0x33, 0xd5, 0x31, 0x18, 0x3c, 0xc6, 0x82, 0x97, 0xfd, + 0x7d, 0x0b, 0xfa, 0x7e, 0x8a, 0x57, 0x33, 0xda, 0x58, 0x8b, 0xdb, 0xc5, 0x33, 0xd8, 0xb9, 0xbf, + 0xf8, 0x20, 0x21, 0x41, 0xcc, 0x54, 0xca, 0x8e, 0x43, 0xf4, 0xeb, 0x25, 0x18, 0xa6, 0x55, 0xc9, + 0x10, 0x84, 0x57, 0x60, 0xd4, 0x77, 0xd6, 0x89, 0x2f, 0xbd, 0xbf, 0x59, 0xf3, 0x6b, 0x45, 0x47, + 0x62, 0x93, 0x96, 0x16, 0xde, 0xd0, 0x9d, 0xe3, 0x42, 0x35, 0x52, 0x85, 0x0d, 0xcf, 0x39, 0x36, + 0x69, 0xa9, 0x05, 0x70, 0xdf, 0x49, 0x1a, 0x5b, 0xc2, 0x34, 0x53, 0xcd, 0xbd, 0x4b, 0x81, 0x98, + 0xe3, 0xd0, 0x1c, 0x8c, 0x4b, 0x89, 0xbd, 0x43, 0x6d, 0xf6, 0x30, 0x10, 0x6a, 0xa3, 0xba, 0xde, + 0x89, 0x4d, 0x34, 0xce, 0xd2, 0xa3, 0x4f, 0xc3, 0x18, 0x1d, 0x9c, 0xb0, 0x95, 0xc8, 0x00, 0x8b, + 0x7e, 0x16, 0x60, 0xc1, 0xe2, 0x73, 0xd7, 0x0c, 0x0c, 0xce, 0x50, 0xda, 0x6f, 0xc2, 0xe9, 0x95, + 0xd0, 0x71, 0xe7, 0x1d, 0xdf, 0x09, 0x1a, 0x24, 0x5a, 0x0e, 0x36, 0x73, 0xcf, 0xa2, 0xf5, 0xf3, + 0xe2, 0x52, 0xde, 0x79, 0xb1, 0x1d, 0x01, 0xd2, 0x2b, 0x10, 0xa1, 0x41, 0x6f, 0xc0, 0xa0, 0xc7, + 0xab, 0x12, 0x62, 0x7b, 0x39, 0xcf, 0xb9, 0xd4, 0xd6, 0x46, 0x2d, 0xd4, 0x85, 0x03, 0xb0, 0x64, + 0x49, 0x2d, 0x8a, 0x4e, 0xde, 0xa8, 0x7c, 0xa3, 0xcd, 0xfe, 0x8b, 0x16, 0x8c, 0xdf, 0xcc, 0xdc, + 0x1d, 0x7c, 0x1a, 0x06, 0x62, 0x12, 0x75, 0x70, 0xad, 0xd5, 0x19, 0x14, 0x0b, 0xec, 0x43, 0x37, + 0xd7, 0x7f, 0xb9, 0x04, 0x15, 0x16, 0x64, 0xda, 0xa4, 0xd6, 0xc1, 0xf1, 0x2b, 0xa7, 0xab, 0x86, + 0x72, 0x9a, 0x63, 0x34, 0xaa, 0x86, 0x75, 0xd3, 0x4d, 0xd1, 0x6d, 0x75, 0xa7, 0xae, 0x90, 0xbd, + 0x98, 0x32, 0xe4, 0xf7, 0xae, 0xc6, 0xcc, 0x2b, 0x78, 0xf2, 0xbe, 0x1d, 0x3b, 0xc1, 0x55, 0xb4, + 0x1f, 0xba, 0x13, 0x5c, 0xd5, 0xb2, 0x2e, 0x8b, 0x53, 0x4d, 0x6b, 0x3c, 0x5b, 0xbe, 0x3f, 0xcb, + 0x42, 0x07, 0x1d, 0xdf, 0x7b, 0x97, 0xa8, 0xab, 0xa9, 0xd3, 0x22, 0x14, 0x50, 0x40, 0x0f, 0xd8, + 0x3a, 0x23, 0xfe, 0xf1, 0x9b, 0xc7, 0x69, 0x11, 0xfb, 0x3a, 0x8c, 0x67, 0x86, 0x0e, 0xbd, 0x04, + 0xfd, 0xcd, 0x2d, 0x27, 0x26, 0x99, 0xa0, 0x94, 0xfe, 0x1a, 0x05, 0x1e, 0xec, 0x4d, 0x8f, 0xa9, + 0x02, 0x0c, 0x82, 0x39, 0xb5, 0xfd, 0x5e, 0x09, 0xfa, 0x6e, 0x86, 0xee, 0x49, 0x88, 0xda, 0x75, + 0x43, 0xd4, 0x9e, 0xce, 0xcf, 0x5b, 0xd0, 0x55, 0xca, 0x6a, 0x19, 0x29, 0xbb, 0x58, 0x80, 0xd7, + 0xe1, 0x02, 0xb6, 0x0d, 0xc3, 0x2c, 0x2f, 0x82, 0x88, 0xca, 0x79, 0xc1, 0xb0, 0xa7, 0xa6, 0x33, + 0xf6, 0xd4, 0xb8, 0x46, 0xaa, 0x59, 0x55, 0xcf, 0xc0, 0xa0, 0x88, 0x02, 0xc9, 0x06, 0x4e, 0x0a, + 0x5a, 0x2c, 0xf1, 0xf6, 0x3f, 0x29, 0x83, 0x91, 0x87, 0x01, 0xfd, 0xd0, 0x82, 0x99, 0x88, 0x5f, + 0x42, 0x71, 0xab, 0xad, 0xc8, 0x0b, 0x36, 0xeb, 0x8d, 0x2d, 0xe2, 0xb6, 0x7c, 0x2f, 0xd8, 0x5c, + 0xde, 0x0c, 0x42, 0x05, 0x5e, 0x7c, 0x40, 0x1a, 0x2d, 0xe6, 0x74, 0x2d, 0x9c, 0xfe, 0x41, 0x9d, + 0x80, 0x5e, 0xd9, 0xdf, 0x9b, 0x9e, 0xc1, 0x3d, 0xd5, 0x82, 0x7b, 0x6c, 0x15, 0xfa, 0x23, 0x0b, + 0x66, 0x79, 0x26, 0x82, 0xe2, 0x3d, 0x29, 0x64, 0x87, 0xd6, 0x24, 0xd3, 0x94, 0xdd, 0x1a, 0x89, + 0xb6, 0xe7, 0x5f, 0x16, 0x83, 0x3c, 0x5b, 0xeb, 0xad, 0x56, 0xdc, 0x6b, 0x33, 0xed, 0x7f, 0x59, + 0x86, 0x51, 0x3a, 0x9e, 0xe9, 0xed, 0xe3, 0x97, 0x0c, 0x31, 0x79, 0x22, 0x23, 0x26, 0xa7, 0x0c, + 0xe2, 0x87, 0x73, 0xf1, 0x38, 0x86, 0x53, 0xbe, 0x13, 0x27, 0xd7, 0x89, 0x13, 0x25, 0xeb, 0xc4, + 0x61, 0x07, 0x8d, 0xd9, 0x20, 0x86, 0x02, 0x67, 0x97, 0x2a, 0xb2, 0x68, 0x25, 0xcb, 0x0c, 0xb7, + 0xf3, 0x47, 0x3b, 0x80, 0xd8, 0xa1, 0x66, 0xe4, 0x04, 0x31, 0xef, 0x8b, 0x27, 0xdc, 0xb4, 0xbd, + 0xd5, 0x3a, 0x25, 0x6a, 0x45, 0x2b, 0x6d, 0xdc, 0x70, 0x87, 0x1a, 0xb4, 0x63, 0xeb, 0xfe, 0xa2, + 0xc7, 0xd6, 0x03, 0x39, 0x11, 0xcb, 0xbf, 0x68, 0xc1, 0x69, 0xfa, 0x59, 0xcc, 0xe8, 0xd6, 0x18, + 0x85, 0x30, 0x4e, 0xc5, 0xce, 0x27, 0x89, 0x84, 0x89, 0xf9, 0x95, 0xa3, 0x59, 0x9b, 0x7c, 0x52, + 0xf5, 0xed, 0x86, 0xc9, 0x0c, 0x67, 0xb9, 0xdb, 0xdf, 0xb1, 0x80, 0x85, 0xcf, 0x9d, 0xc0, 0x66, + 0x76, 0xcd, 0xdc, 0xcc, 0xec, 0xfc, 0x15, 0xa3, 0xcb, 0x3e, 0xf6, 0x22, 0x4c, 0x50, 0x6c, 0x2d, + 0x0a, 0x1f, 0xec, 0x4a, 0x45, 0x3b, 0xdf, 0x5f, 0xfb, 0x5e, 0x89, 0x4f, 0x1b, 0x75, 0x9b, 0x0e, + 0xfd, 0x92, 0x05, 0x43, 0x0d, 0xa7, 0xe9, 0x34, 0x78, 0x16, 0x9b, 0x02, 0x3e, 0x19, 0xa3, 0xfc, + 0xcc, 0x82, 0x28, 0xcb, 0xfd, 0x09, 0x9f, 0x90, 0x5d, 0x97, 0xe0, 0x5c, 0x1f, 0x82, 0xaa, 0x7c, + 0xca, 0x83, 0x51, 0x83, 0xd9, 0x31, 0x1a, 0xa1, 0xbf, 0x64, 0xf1, 0x25, 0x5f, 0x19, 0x0a, 0xf7, + 0xe1, 0x54, 0xa0, 0xfd, 0xa7, 0x8b, 0x99, 0xd4, 0x8b, 0x67, 0x8a, 0x2f, 0xea, 0x6c, 0x0d, 0xd4, + 0x02, 0x05, 0x33, 0x0c, 0x71, 0x7b, 0x1d, 0xf6, 0xdf, 0xb6, 0xe0, 0x11, 0x9d, 0x50, 0xbb, 0xfc, + 0x98, 0xe7, 0x2b, 0xae, 0xc2, 0x50, 0xd8, 0x24, 0x91, 0x93, 0x1a, 0x45, 0x17, 0xe5, 0xe8, 0xdf, + 0x12, 0xf0, 0x83, 0xbd, 0xe9, 0x33, 0x3a, 0x77, 0x09, 0xc7, 0xaa, 0x24, 0xb2, 0x61, 0x80, 0x8d, + 0x4b, 0x2c, 0xae, 0xad, 0xb2, 0x9c, 0x2e, 0xec, 0x84, 0x24, 0xc6, 0x02, 0x63, 0xff, 0x55, 0x8b, + 0x0b, 0x9b, 0xde, 0x74, 0xf4, 0x15, 0x98, 0xd8, 0xa6, 0xf6, 0xd3, 0xe2, 0x83, 0x26, 0xdd, 0x46, + 0xd9, 0xc9, 0xb0, 0x55, 0x64, 0xf3, 0xe8, 0xd2, 0xdd, 0xf9, 0x49, 0xd1, 0xfa, 0x89, 0xd5, 0x0c, + 0x5b, 0xdc, 0x56, 0x91, 0xfd, 0xc7, 0x62, 0xc6, 0x32, 0x0d, 0xee, 0x19, 0x18, 0x6c, 0x86, 0xee, + 0xc2, 0x72, 0x15, 0x8b, 0xb1, 0x52, 0x4b, 0x4e, 0x8d, 0x83, 0xb1, 0xc4, 0xa3, 0x2b, 0x00, 0xe4, + 0x41, 0x42, 0xa2, 0xc0, 0xf1, 0xd5, 0x89, 0xae, 0x52, 0x94, 0x16, 0x15, 0x06, 0x6b, 0x54, 0xb4, + 0x4c, 0x33, 0x0a, 0x77, 0x3c, 0x97, 0x45, 0xed, 0x97, 0xcd, 0x32, 0x35, 0x85, 0xc1, 0x1a, 0x15, + 0xb5, 0x5a, 0x5b, 0x41, 0xcc, 0x37, 0x31, 0x67, 0x5d, 0xa4, 0x20, 0x19, 0x4a, 0xad, 0xd6, 0xdb, + 0x3a, 0x12, 0x9b, 0xb4, 0xf6, 0x7f, 0xac, 0x00, 0xa4, 0x6a, 0x12, 0x7a, 0xaf, 0x7d, 0x86, 0x7e, + 0xb2, 0xa8, 0x8e, 0xf5, 0xf0, 0xa6, 0x27, 0xfa, 0x86, 0x05, 0xc3, 0x8e, 0xef, 0x87, 0x0d, 0x27, + 0x61, 0x3d, 0x2a, 0x15, 0x5d, 0x2b, 0x44, 0x4b, 0xe6, 0xd2, 0xb2, 0xbc, 0x31, 0x2f, 0xc8, 0x03, + 0x3f, 0x0d, 0x93, 0xdb, 0x1e, 0xbd, 0x09, 0xe8, 0x13, 0x52, 0xcd, 0xe6, 0x1f, 0x65, 0x2a, 0xab, + 0x66, 0x57, 0xd8, 0x0a, 0xa9, 0x69, 0xd8, 0xe8, 0x4d, 0x23, 0xcb, 0x46, 0x5f, 0x91, 0xdb, 0x92, + 0x86, 0xe2, 0x90, 0x97, 0x60, 0x03, 0x7d, 0x51, 0x0f, 0x68, 0xee, 0x2f, 0x72, 0x1d, 0x59, 0xd3, + 0x5f, 0x73, 0x82, 0x99, 0x13, 0x18, 0x77, 0xcd, 0xad, 0x52, 0x04, 0x65, 0x5d, 0xce, 0xaf, 0x21, + 0xb3, 0xc7, 0xa6, 0x9b, 0x63, 0x06, 0x81, 0xb3, 0x55, 0xa0, 0x2f, 0xf2, 0x70, 0xf3, 0xe5, 0x60, + 0x23, 0x14, 0x81, 0x59, 0x97, 0x0a, 0x7c, 0xf3, 0xdd, 0x38, 0x21, 0xdb, 0xb4, 0x4c, 0xba, 0x1b, + 0xde, 0x14, 0x5c, 0xb0, 0xe2, 0x87, 0xd6, 0x60, 0x80, 0x5d, 0x8e, 0x89, 0x27, 0x87, 0x8a, 0xb8, + 0xce, 0xcc, 0x3b, 0xa1, 0xa9, 0x0a, 0xc2, 0xfe, 0xc6, 0x58, 0xf0, 0x42, 0xd7, 0xe5, 0xad, 0xf0, + 0x78, 0x39, 0xb8, 0x1d, 0x13, 0x76, 0x2b, 0xbc, 0x32, 0xff, 0xb1, 0xf4, 0x9a, 0x37, 0x87, 0x77, + 0xcc, 0x33, 0x66, 0x94, 0xa4, 0x9a, 0x88, 0xf8, 0x2f, 0xd3, 0x97, 0x4d, 0x42, 0x91, 0x86, 0x9a, + 0xc9, 0xce, 0xd2, 0xc1, 0xbe, 0x63, 0x32, 0xc3, 0x59, 0xee, 0x27, 0xb8, 0x07, 0x4e, 0xf9, 0x30, + 0x91, 0x9d, 0x92, 0xc7, 0xb8, 0xe3, 0xfe, 0x69, 0x1f, 0x8c, 0x99, 0x82, 0x81, 0x66, 0xa1, 0x22, + 0xb4, 0x29, 0x95, 0xca, 0x48, 0xc9, 0xff, 0xaa, 0x44, 0xe0, 0x94, 0x86, 0x25, 0x75, 0x62, 0xc5, + 0xb5, 0x70, 0x9c, 0x34, 0xa9, 0x93, 0xc2, 0x60, 0x8d, 0x8a, 0xaa, 0xad, 0xeb, 0x61, 0x98, 0xa8, + 0x85, 0x5b, 0xc9, 0xcc, 0x3c, 0x83, 0x62, 0x81, 0xa5, 0x0b, 0xf6, 0x3d, 0xda, 0x21, 0xdf, 0x74, + 0x01, 0xaa, 0x05, 0xfb, 0x86, 0x8e, 0xc4, 0x26, 0x2d, 0xdd, 0x80, 0xc2, 0x98, 0x09, 0xa1, 0x50, + 0x8e, 0xd3, 0xf0, 0xa6, 0x3a, 0xbf, 0x2c, 0x26, 0xf1, 0xe8, 0x0b, 0xf0, 0x88, 0xba, 0xdb, 0x85, + 0xb9, 0x4b, 0x55, 0xd6, 0x38, 0x60, 0xd8, 0xb7, 0x8f, 0x2c, 0x74, 0x26, 0xc3, 0xdd, 0xca, 0xa3, + 0x57, 0x61, 0x4c, 0x28, 0xb6, 0x92, 0xe3, 0xa0, 0x79, 0xfa, 0x7d, 0xc3, 0xc0, 0xe2, 0x0c, 0x35, + 0xaa, 0xc2, 0x04, 0x85, 0x30, 0x8d, 0x52, 0x72, 0xe0, 0x77, 0xd4, 0xd4, 0xce, 0x7c, 0x23, 0x83, + 0xc7, 0x6d, 0x25, 0xd0, 0x1c, 0x8c, 0x73, 0xdd, 0x82, 0x5a, 0x71, 0xec, 0x3b, 0x88, 0x48, 0x4a, + 0x35, 0x09, 0x6e, 0x99, 0x68, 0x9c, 0xa5, 0x47, 0x57, 0x61, 0xc4, 0x89, 0x1a, 0x5b, 0x5e, 0x42, + 0x1a, 0x49, 0x2b, 0xe2, 0xf9, 0x16, 0xb4, 0xf0, 0x81, 0x39, 0x0d, 0x87, 0x0d, 0x4a, 0xfb, 0x5d, + 0x38, 0xdd, 0x21, 0x6c, 0x9b, 0x0a, 0x8e, 0xd3, 0xf4, 0x64, 0x9f, 0x32, 0x81, 0x4a, 0x73, 0xb5, + 0x65, 0xd9, 0x1b, 0x8d, 0x8a, 0x4a, 0x27, 0xf3, 0x25, 0x6b, 0x99, 0x06, 0x95, 0x74, 0x2e, 0x49, + 0x04, 0x4e, 0x69, 0xec, 0xff, 0x59, 0x01, 0xcd, 0xd5, 0x52, 0x20, 0x3c, 0xe5, 0x2a, 0x8c, 0xc8, + 0xe4, 0x99, 0x5a, 0xd2, 0x3a, 0xd5, 0xcd, 0x6b, 0x1a, 0x0e, 0x1b, 0x94, 0xb4, 0x6d, 0x81, 0x74, + 0x20, 0x65, 0xc3, 0xa2, 0x94, 0x67, 0x09, 0xa7, 0x34, 0xe8, 0x12, 0x0c, 0xc5, 0xc4, 0xdf, 0x58, + 0xf1, 0x82, 0x7b, 0x42, 0xb0, 0xd5, 0xaa, 0x5c, 0x17, 0x70, 0xac, 0x28, 0xd0, 0x3c, 0x94, 0x5b, + 0x9e, 0x2b, 0x44, 0x59, 0xaa, 0x0c, 0xe5, 0xdb, 0xcb, 0xd5, 0x83, 0xbd, 0xe9, 0x27, 0xba, 0x65, + 0x1f, 0xa5, 0xc6, 0x74, 0x3c, 0x43, 0xa7, 0x1f, 0x2d, 0xdc, 0xc9, 0xa9, 0x3e, 0xd0, 0xa3, 0x53, + 0xfd, 0x0a, 0x80, 0xe8, 0xb5, 0x94, 0xe5, 0x72, 0xfa, 0xd5, 0xae, 0x29, 0x0c, 0xd6, 0xa8, 0xa8, + 0x49, 0xde, 0x88, 0x88, 0x23, 0xad, 0x56, 0x1e, 0x4e, 0x3c, 0x74, 0x74, 0x93, 0x7c, 0x21, 0xcb, + 0x0c, 0xb7, 0xf3, 0x47, 0x21, 0x9c, 0x72, 0xe9, 0x44, 0x32, 0x2a, 0xad, 0xf4, 0x1e, 0xc3, 0x4c, + 0x2b, 0xac, 0x66, 0x19, 0xe1, 0x76, 0xde, 0xe8, 0xcb, 0x30, 0x25, 0x81, 0xed, 0xb7, 0x37, 0xd9, + 0x74, 0x29, 0xcf, 0x9f, 0xdf, 0xdf, 0x9b, 0x9e, 0xaa, 0x76, 0xa5, 0xc2, 0x87, 0x70, 0x40, 0x6f, + 0xc0, 0x00, 0x3b, 0x84, 0x89, 0x27, 0x87, 0xd9, 0x6e, 0xf7, 0x62, 0x91, 0x48, 0x78, 0x2a, 0xf5, + 0x33, 0xec, 0x28, 0x47, 0xc4, 0x78, 0xa6, 0x27, 0x5b, 0x0c, 0x88, 0x05, 0x4f, 0xd4, 0x84, 0x61, + 0x27, 0x08, 0xc2, 0xc4, 0xe1, 0x4a, 0xd8, 0x48, 0x11, 0x3d, 0x52, 0xab, 0x62, 0x2e, 0x2d, 0xcb, + 0xeb, 0x51, 0x81, 0x63, 0x1a, 0x06, 0xeb, 0x55, 0xa0, 0xfb, 0x30, 0x1e, 0xde, 0xa7, 0x0b, 0xa6, + 0x3c, 0x87, 0x88, 0x27, 0x47, 0xcd, 0x8e, 0xe5, 0x78, 0x55, 0x8d, 0xc2, 0xda, 0x4a, 0x66, 0x32, + 0xc5, 0xd9, 0x5a, 0xd0, 0x8c, 0xe1, 0x5b, 0x1e, 0x4b, 0x23, 0x99, 0x53, 0xdf, 0xb2, 0xee, 0x4a, + 0x66, 0x37, 0x84, 0x79, 0xf4, 0x22, 0x5b, 0x11, 0xc6, 0x33, 0x37, 0x84, 0x53, 0x14, 0xd6, 0xe9, + 0xa6, 0x3e, 0x05, 0xc3, 0xda, 0xc0, 0xf7, 0x12, 0x32, 0x3b, 0xf5, 0x2a, 0x4c, 0x64, 0x07, 0xb4, + 0xa7, 0x90, 0xdb, 0xff, 0x51, 0x82, 0xf1, 0x0e, 0x87, 0x3c, 0xf7, 0x3c, 0x16, 0xf6, 0x6d, 0x2c, + 0x7d, 0x37, 0xbc, 0xc0, 0xc5, 0x0c, 0x63, 0x2e, 0x60, 0xa5, 0x02, 0x0b, 0x98, 0x5c, 0x4d, 0xcb, + 0x5d, 0x57, 0x53, 0xb1, 0x68, 0xf5, 0x7d, 0x90, 0x45, 0xcb, 0xdc, 0x27, 0xfa, 0x0b, 0xed, 0x13, + 0x0f, 0x61, 0xa1, 0x33, 0xb6, 0x9a, 0xc1, 0x02, 0x5b, 0xcd, 0xb7, 0x4b, 0x30, 0x91, 0x86, 0x17, + 0x8b, 0x8c, 0xba, 0xc7, 0x7f, 0x66, 0xb0, 0x66, 0x9c, 0x19, 0xe4, 0x25, 0xcc, 0xcd, 0xb4, 0xaf, + 0xeb, 0xf9, 0xc1, 0x1b, 0x99, 0xf3, 0x83, 0x17, 0x7b, 0xe4, 0x7b, 0xf8, 0x59, 0xc2, 0xf7, 0x4a, + 0x70, 0x36, 0x5b, 0x64, 0xc1, 0x77, 0xbc, 0xed, 0x13, 0x18, 0xaf, 0x2f, 0x18, 0xe3, 0xf5, 0x72, + 0x6f, 0xfd, 0x62, 0x8d, 0xec, 0x3a, 0x68, 0x4e, 0x66, 0xd0, 0x3e, 0x75, 0x14, 0xe6, 0x87, 0x8f, + 0xdc, 0x1f, 0x58, 0xf0, 0x68, 0xc7, 0x72, 0x27, 0xe0, 0x25, 0x7d, 0xdd, 0xf4, 0x92, 0xbe, 0x70, + 0x84, 0xde, 0x75, 0x71, 0x9b, 0xfe, 0xd7, 0x52, 0x97, 0x5e, 0x31, 0x4f, 0xd2, 0x2d, 0x18, 0x76, + 0x1a, 0x0d, 0x12, 0xc7, 0xab, 0xa1, 0xab, 0x72, 0x0d, 0x3d, 0xcf, 0xf6, 0x96, 0x14, 0x7c, 0xb0, + 0x37, 0x3d, 0x95, 0x65, 0x91, 0xa2, 0xb1, 0xce, 0xc1, 0xcc, 0x82, 0x56, 0x3a, 0xa6, 0x2c, 0x68, + 0x57, 0x00, 0x76, 0x94, 0x05, 0x9b, 0x75, 0x50, 0x69, 0xb6, 0xad, 0x46, 0x85, 0xfe, 0x3c, 0xd3, + 0x08, 0x79, 0x44, 0x45, 0x9f, 0x79, 0x53, 0x31, 0xe7, 0xfb, 0xe9, 0xd1, 0x19, 0xfc, 0x42, 0xa4, + 0x72, 0xe6, 0x29, 0x96, 0xf6, 0x3f, 0x2d, 0xc3, 0x47, 0x0f, 0x11, 0x3a, 0x34, 0x67, 0x1e, 0x90, + 0x3e, 0x97, 0xf5, 0xdc, 0x4c, 0x75, 0x2c, 0x6c, 0xb8, 0x72, 0x32, 0xdf, 0xaa, 0xf4, 0x81, 0xbf, + 0xd5, 0x37, 0x75, 0x3f, 0x1b, 0x0f, 0x8c, 0xbc, 0x76, 0xe4, 0x69, 0xf5, 0xb3, 0xe9, 0x17, 0xff, + 0x9a, 0x05, 0x4f, 0x74, 0xec, 0x94, 0x11, 0x8e, 0x31, 0x0b, 0x95, 0x06, 0x05, 0x6a, 0x37, 0x58, + 0xd2, 0xab, 0x63, 0x12, 0x81, 0x53, 0x1a, 0x23, 0xea, 0xa2, 0x94, 0x1b, 0x75, 0xf1, 0x7b, 0x16, + 0x9c, 0xc9, 0x36, 0xe2, 0x04, 0xd6, 0x9c, 0xba, 0xb9, 0xe6, 0xcc, 0xf4, 0xf6, 0xe9, 0xbb, 0x2c, + 0x37, 0xbf, 0x36, 0x0a, 0xe7, 0xda, 0x76, 0x2c, 0x3e, 0x8a, 0x3f, 0x67, 0xc1, 0xa9, 0x4d, 0xa6, + 0x79, 0x6b, 0xd7, 0x84, 0x44, 0xbf, 0x72, 0xee, 0x56, 0x1d, 0x7a, 0xbb, 0x88, 0xdb, 0x11, 0x6d, + 0x24, 0xb8, 0xbd, 0x32, 0xf4, 0x75, 0x0b, 0xce, 0x38, 0xf7, 0xe3, 0xb6, 0xb7, 0x1a, 0x84, 0x18, + 0xbd, 0x9a, 0xe3, 0xe4, 0xca, 0x79, 0xe5, 0x61, 0x7e, 0x72, 0x7f, 0x6f, 0xfa, 0x4c, 0x27, 0x2a, + 0xdc, 0xb1, 0x56, 0xfa, 0x7d, 0xb7, 0xc4, 0x35, 0x84, 0x62, 0x17, 0xde, 0x3a, 0x5d, 0x5a, 0xe0, + 0x4b, 0x92, 0xc4, 0x60, 0xc5, 0x11, 0xbd, 0x05, 0x95, 0x4d, 0x79, 0x33, 0x28, 0xbb, 0xe4, 0x75, + 0x19, 0xe6, 0x4e, 0x17, 0x89, 0x78, 0x68, 0xbc, 0x42, 0xe1, 0x94, 0x29, 0xba, 0x0e, 0xe5, 0x60, + 0x23, 0x16, 0x77, 0x70, 0xf3, 0x82, 0x6d, 0xcc, 0x10, 0x27, 0x7e, 0x6d, 0xf1, 0xe6, 0x52, 0x1d, + 0x53, 0x16, 0x94, 0x53, 0xb4, 0xee, 0x0a, 0xef, 0x6e, 0x0e, 0x27, 0x3c, 0x5f, 0x6d, 0xe7, 0x84, + 0xe7, 0xab, 0x98, 0xb2, 0x40, 0x35, 0xe8, 0x67, 0x97, 0x1c, 0x84, 0xeb, 0x36, 0xe7, 0xa2, 0x76, + 0xdb, 0x55, 0x0e, 0x9e, 0x68, 0x8f, 0x81, 0x31, 0x67, 0x84, 0xd6, 0x60, 0xa0, 0xc1, 0xd2, 0x92, + 0x0b, 0xbb, 0x3a, 0x2f, 0x85, 0x41, 0x5b, 0x0a, 0x73, 0x7e, 0xc4, 0xc4, 0xe1, 0x58, 0xf0, 0x62, + 0x5c, 0x49, 0x73, 0x6b, 0x23, 0x16, 0x86, 0x73, 0x1e, 0xd7, 0xb6, 0x04, 0xf3, 0x82, 0x2b, 0x83, + 0x63, 0xc1, 0x0b, 0x55, 0xa1, 0xb4, 0xd1, 0x10, 0xf9, 0x3a, 0x73, 0x5c, 0xb6, 0xe6, 0x1d, 0xd4, + 0xf9, 0x81, 0xfd, 0xbd, 0xe9, 0xd2, 0xd2, 0x02, 0x2e, 0x6d, 0x34, 0xd0, 0xeb, 0x30, 0xb8, 0xc1, + 0x6f, 0x15, 0x8a, 0xdc, 0x9c, 0x97, 0xf3, 0xae, 0x3e, 0xb6, 0x5d, 0x41, 0xe4, 0xd7, 0x1f, 0x04, + 0x02, 0x4b, 0x76, 0x2c, 0x6d, 0x99, 0xba, 0x27, 0x29, 0x92, 0x73, 0xce, 0xf4, 0x76, 0xaf, 0x52, + 0xd8, 0x93, 0x0a, 0x8a, 0x35, 0x8e, 0x54, 0xe6, 0x1d, 0xf9, 0xc2, 0x02, 0x4b, 0xcc, 0x99, 0x2b, + 0xf3, 0x1d, 0x1f, 0x64, 0xe0, 0x32, 0xaf, 0x50, 0x38, 0x65, 0x8a, 0x5a, 0x30, 0xba, 0x13, 0x37, + 0xb7, 0x88, 0x9c, 0xfa, 0x2c, 0x5b, 0xe7, 0xf0, 0x95, 0xcf, 0xe4, 0xa4, 0x60, 0x15, 0x45, 0xbc, + 0x28, 0x69, 0x39, 0x7e, 0xdb, 0x0a, 0xc6, 0xf2, 0x44, 0xdd, 0xd1, 0xd9, 0x62, 0xb3, 0x16, 0xfa, + 0x49, 0xde, 0x69, 0x85, 0xeb, 0xbb, 0x09, 0x11, 0xd9, 0x3c, 0x73, 0x3e, 0xc9, 0x6b, 0x9c, 0xb8, + 0xfd, 0x93, 0x08, 0x04, 0x96, 0xec, 0xd4, 0x90, 0xb1, 0xd5, 0x78, 0xa2, 0xf0, 0x90, 0xb5, 0xf5, + 0x21, 0x1d, 0x32, 0xb6, 0xfa, 0xa6, 0x4c, 0xd9, 0xaa, 0xdb, 0xdc, 0x0a, 0x93, 0x30, 0xc8, 0xac, + 0xfd, 0xa7, 0x8a, 0xac, 0xba, 0xb5, 0x0e, 0x25, 0xdb, 0x57, 0xdd, 0x4e, 0x54, 0xb8, 0x63, 0xad, + 0xf6, 0x1f, 0xf7, 0xb7, 0x6f, 0xb7, 0x4c, 0x19, 0xfe, 0x2b, 0xed, 0xe7, 0x8e, 0x9f, 0xeb, 0xdd, + 0xe6, 0x7b, 0x88, 0x27, 0x90, 0x5f, 0xb7, 0xe0, 0x5c, 0xb3, 0xe3, 0x66, 0x2a, 0x36, 0xac, 0x5e, + 0x4d, 0x47, 0x3e, 0x60, 0x2a, 0x55, 0x6d, 0x67, 0x3c, 0xee, 0x52, 0x67, 0x56, 0x01, 0x2d, 0x7f, + 0x60, 0x05, 0xf4, 0x2e, 0x0c, 0x31, 0x9d, 0x29, 0xcd, 0xab, 0xd1, 0x63, 0x0a, 0x0a, 0xb6, 0xf5, + 0x2d, 0x08, 0x16, 0x58, 0x31, 0xa3, 0x03, 0xf7, 0x78, 0xb6, 0x13, 0x98, 0x30, 0xb4, 0x48, 0xe7, + 0xca, 0x7d, 0x1d, 0x4b, 0x62, 0x24, 0x1e, 0xaf, 0x1d, 0x46, 0x7c, 0x90, 0x47, 0x80, 0x0f, 0xaf, + 0xec, 0x24, 0x15, 0xda, 0xbf, 0x67, 0x75, 0xd0, 0xbf, 0xb8, 0x09, 0xf2, 0x19, 0xd3, 0x04, 0x79, + 0x3a, 0x6b, 0x82, 0xb4, 0xb9, 0x0d, 0x0c, 0xeb, 0xa3, 0x78, 0x62, 0xc6, 0xa2, 0x09, 0x3f, 0x6c, + 0x1f, 0x2e, 0xe4, 0x4d, 0x6e, 0x16, 0xe1, 0xe3, 0xaa, 0xe3, 0xb2, 0x34, 0xc2, 0xc7, 0x5d, 0xae, + 0x62, 0x86, 0x29, 0x7a, 0x67, 0xdc, 0xfe, 0xf9, 0x12, 0x94, 0x6b, 0xa1, 0x7b, 0x02, 0x6e, 0x90, + 0x6b, 0x86, 0x1b, 0xe4, 0xa9, 0xdc, 0xf7, 0xa5, 0xba, 0x3a, 0x3d, 0x6e, 0x65, 0x9c, 0x1e, 0x1f, + 0xcf, 0x67, 0x75, 0xb8, 0x8b, 0xe3, 0xfb, 0x65, 0xd0, 0x5f, 0xc8, 0x42, 0xff, 0xe1, 0x28, 0x81, + 0x9f, 0xe5, 0x62, 0x8f, 0x66, 0x89, 0x3a, 0x58, 0x88, 0x90, 0xbc, 0x24, 0xf6, 0x33, 0x1b, 0xff, + 0x79, 0x97, 0x78, 0x9b, 0x5b, 0x09, 0x71, 0xb3, 0x1d, 0x3b, 0xb9, 0xf8, 0xcf, 0xff, 0x66, 0xc1, + 0x78, 0xa6, 0x76, 0xe4, 0x77, 0xba, 0x67, 0x72, 0x44, 0xc7, 0xc6, 0xa9, 0xdc, 0x8b, 0x29, 0x33, + 0x00, 0xca, 0x3f, 0x2d, 0xdd, 0x0f, 0x4c, 0x17, 0x53, 0x0e, 0xec, 0x18, 0x6b, 0x14, 0xe8, 0x25, + 0x18, 0x4e, 0xc2, 0x66, 0xe8, 0x87, 0x9b, 0xbb, 0x37, 0x88, 0xcc, 0x66, 0xa0, 0x7c, 0xfb, 0x6b, + 0x29, 0x0a, 0xeb, 0x74, 0xf6, 0x0f, 0xca, 0x90, 0x7d, 0x5f, 0xed, 0xff, 0xcb, 0xe9, 0xcf, 0x8e, + 0x9c, 0xfe, 0xa1, 0x05, 0x13, 0xb4, 0x76, 0x16, 0xe0, 0x21, 0xe3, 0x34, 0x55, 0x96, 0x78, 0xeb, + 0x90, 0x2c, 0xf1, 0x4f, 0xd3, 0xd5, 0xce, 0x0d, 0x5b, 0x89, 0x70, 0x99, 0x68, 0x8b, 0x18, 0x85, + 0x62, 0x81, 0x15, 0x74, 0x24, 0x8a, 0xc4, 0x85, 0x16, 0x9d, 0x8e, 0x44, 0x11, 0x16, 0x58, 0x99, + 0x44, 0xbe, 0xaf, 0x4b, 0x12, 0x79, 0x96, 0x0f, 0x48, 0x04, 0x16, 0x08, 0x75, 0x40, 0xcb, 0x07, + 0x24, 0x23, 0x0e, 0x52, 0x1a, 0xfb, 0xbb, 0x65, 0x18, 0xa9, 0x85, 0x6e, 0x1a, 0x80, 0xfd, 0xa2, + 0x11, 0x80, 0x7d, 0x21, 0x13, 0x80, 0x3d, 0xa1, 0xd3, 0x3e, 0x9c, 0xf8, 0x6b, 0x91, 0x37, 0x8a, + 0x3d, 0x73, 0x70, 0xc4, 0xd8, 0x6b, 0x23, 0x6f, 0x94, 0x62, 0x84, 0x4d, 0xbe, 0x7f, 0x96, 0x62, + 0xae, 0xff, 0xb7, 0x05, 0x63, 0xb5, 0xd0, 0xa5, 0x02, 0xfa, 0x67, 0x49, 0x1a, 0xf5, 0x6c, 0x53, + 0x03, 0x87, 0x64, 0x9b, 0xfa, 0x47, 0x16, 0x0c, 0xd6, 0x42, 0xf7, 0x04, 0xdc, 0x89, 0x4b, 0xa6, + 0x3b, 0xf1, 0x89, 0xdc, 0x95, 0xb7, 0x8b, 0x07, 0xf1, 0x37, 0xcb, 0x30, 0x4a, 0x5b, 0x1c, 0x6e, + 0xca, 0xef, 0x65, 0x8c, 0x8d, 0x55, 0x60, 0x6c, 0xa8, 0x4a, 0x18, 0xfa, 0x7e, 0x78, 0x3f, 0xfb, + 0xed, 0x96, 0x18, 0x14, 0x0b, 0x2c, 0xba, 0x04, 0x43, 0xcd, 0x88, 0xec, 0x78, 0x61, 0x2b, 0xce, + 0x5e, 0x8e, 0xab, 0x09, 0x38, 0x56, 0x14, 0xe8, 0x45, 0x18, 0x89, 0xbd, 0xa0, 0x41, 0x64, 0xd8, + 0x41, 0x1f, 0x0b, 0x3b, 0xe0, 0x89, 0xfd, 0x34, 0x38, 0x36, 0xa8, 0xd0, 0x5d, 0xa8, 0xb0, 0xff, + 0x6c, 0x06, 0xf5, 0x9e, 0x05, 0x9e, 0x67, 0xb3, 0x92, 0x0c, 0x70, 0xca, 0x0b, 0x5d, 0x01, 0x48, + 0x64, 0x80, 0x44, 0x2c, 0xb2, 0x72, 0x28, 0xbd, 0x54, 0x85, 0x4e, 0xc4, 0x58, 0xa3, 0x42, 0xcf, + 0x41, 0x25, 0x71, 0x3c, 0x7f, 0xc5, 0x0b, 0x48, 0x2c, 0x02, 0x4c, 0x44, 0x92, 0x5e, 0x01, 0xc4, + 0x29, 0x9e, 0xee, 0xf7, 0xec, 0x6a, 0x2e, 0x7f, 0x61, 0x62, 0x88, 0x51, 0xb3, 0xfd, 0x7e, 0x45, + 0x41, 0xb1, 0x46, 0x61, 0x5f, 0x85, 0xb3, 0xb5, 0xd0, 0xad, 0x85, 0x51, 0xb2, 0x14, 0x46, 0xf7, + 0x9d, 0xc8, 0x95, 0xdf, 0x6f, 0x5a, 0xe6, 0x86, 0xa5, 0x7b, 0x72, 0x3f, 0xf7, 0xb0, 0x19, 0xb9, + 0x5e, 0x5f, 0x60, 0x3b, 0x7e, 0x8f, 0x91, 0xfd, 0x3f, 0x2e, 0x01, 0xaa, 0xb1, 0x10, 0x0e, 0xe3, + 0x41, 0x92, 0x2d, 0x18, 0x8b, 0xc9, 0x8a, 0x17, 0xb4, 0x1e, 0x08, 0x56, 0xc5, 0xae, 0x52, 0xd4, + 0x17, 0xf5, 0x32, 0xfc, 0x1e, 0xab, 0x09, 0xc3, 0x19, 0xbe, 0x74, 0x30, 0xa3, 0x56, 0x30, 0x17, + 0xdf, 0x8e, 0x49, 0x24, 0x1e, 0xe0, 0x60, 0x83, 0x89, 0x25, 0x10, 0xa7, 0x78, 0x2a, 0x3c, 0xec, + 0xcf, 0xcd, 0x30, 0xc0, 0x61, 0x98, 0x48, 0x71, 0x63, 0x09, 0xd9, 0x35, 0x38, 0x36, 0xa8, 0xd0, + 0x12, 0xa0, 0xb8, 0xd5, 0x6c, 0xfa, 0xec, 0x54, 0xcc, 0xf1, 0xaf, 0x45, 0x61, 0xab, 0xc9, 0xa3, + 0x78, 0x45, 0x2e, 0xf3, 0x7a, 0x1b, 0x16, 0x77, 0x28, 0x41, 0x17, 0x8b, 0x8d, 0x98, 0xfd, 0x16, + 0xf7, 0x74, 0xb9, 0x77, 0xae, 0xce, 0x40, 0x58, 0xe2, 0xec, 0xaf, 0xb2, 0x0d, 0x8e, 0xbd, 0x8c, + 0x90, 0xb4, 0x22, 0x82, 0xb6, 0x61, 0xb4, 0xc9, 0x36, 0xb1, 0x24, 0x0a, 0x7d, 0x9f, 0x48, 0xfd, + 0xf2, 0x68, 0x41, 0x24, 0x3c, 0x17, 0xba, 0xce, 0x0e, 0x9b, 0xdc, 0xed, 0x9f, 0x0c, 0xb3, 0xb5, + 0x4a, 0x1c, 0x4c, 0x0e, 0x8a, 0x50, 0x51, 0xa1, 0xc9, 0x7d, 0xac, 0xc8, 0x1b, 0x47, 0xe9, 0x3e, + 0x20, 0x02, 0x4f, 0xb1, 0xe4, 0x82, 0xbe, 0xc4, 0x02, 0xa1, 0xf9, 0x02, 0x51, 0xfc, 0xe1, 0x31, + 0x4e, 0x6f, 0x04, 0x41, 0x0b, 0x16, 0x58, 0x63, 0x87, 0x56, 0x60, 0x54, 0x24, 0xd2, 0x17, 0xee, + 0x85, 0xb2, 0x61, 0x62, 0x8f, 0x62, 0x1d, 0x79, 0x90, 0x05, 0x60, 0xb3, 0x30, 0xda, 0x84, 0xc7, + 0xb5, 0x87, 0x62, 0x3a, 0x04, 0x3c, 0xf1, 0x95, 0xe7, 0x89, 0xfd, 0xbd, 0xe9, 0xc7, 0xd7, 0x0e, + 0x23, 0xc4, 0x87, 0xf3, 0x41, 0xb7, 0xe0, 0xac, 0xd3, 0x48, 0xbc, 0x1d, 0x52, 0x25, 0x8e, 0xeb, + 0x7b, 0x01, 0x31, 0x2f, 0x73, 0x3f, 0xba, 0xbf, 0x37, 0x7d, 0x76, 0xae, 0x13, 0x01, 0xee, 0x5c, + 0x0e, 0x7d, 0x06, 0x2a, 0x6e, 0x10, 0x8b, 0x31, 0x18, 0x30, 0xde, 0x45, 0xaa, 0x54, 0x6f, 0xd6, + 0x55, 0xff, 0xd3, 0x3f, 0x38, 0x2d, 0x80, 0xde, 0xe1, 0x4f, 0x4c, 0x2b, 0x6b, 0x86, 0xbf, 0xc7, + 0xf5, 0x72, 0x21, 0xfb, 0xd9, 0xb8, 0x64, 0xc1, 0x3d, 0x6f, 0x2a, 0xb0, 0xd0, 0xb8, 0x7f, 0x61, + 0x54, 0x81, 0x3e, 0x0f, 0x28, 0x26, 0xd1, 0x8e, 0xd7, 0x20, 0x73, 0x0d, 0x96, 0x0d, 0x93, 0x1d, + 0xf1, 0x0d, 0x19, 0xd1, 0xf5, 0xa8, 0xde, 0x46, 0x81, 0x3b, 0x94, 0x42, 0xd7, 0xe9, 0xca, 0xa3, + 0x43, 0x45, 0x1c, 0xa8, 0x54, 0x0c, 0x27, 0xab, 0xa4, 0x19, 0x91, 0x86, 0x93, 0x10, 0xd7, 0xe4, + 0x88, 0x33, 0xe5, 0xe8, 0xbe, 0xa4, 0x12, 0x9e, 0x83, 0x19, 0xbd, 0xd8, 0x9e, 0xf4, 0x9c, 0xda, + 0x59, 0x5b, 0x61, 0x9c, 0xdc, 0x24, 0xc9, 0xfd, 0x30, 0xba, 0xc7, 0x3c, 0xf6, 0x43, 0x5a, 0x72, + 0xb1, 0x14, 0x85, 0x75, 0x3a, 0xaa, 0x43, 0xb1, 0xa3, 0xa2, 0xe5, 0x2a, 0xf3, 0xc3, 0x0f, 0xa5, + 0x73, 0xe7, 0x3a, 0x07, 0x63, 0x89, 0x97, 0xa4, 0xcb, 0xb5, 0x05, 0xe6, 0x53, 0xcf, 0x90, 0x2e, + 0xd7, 0x16, 0xb0, 0xc4, 0xa3, 0xb0, 0xfd, 0xf5, 0xa9, 0xb1, 0x22, 0xe7, 0x1b, 0xed, 0x2b, 0x79, + 0xc1, 0x07, 0xa8, 0x1e, 0xc0, 0x84, 0x7a, 0x01, 0x8b, 0x67, 0x7d, 0x8c, 0x27, 0xc7, 0x8b, 0x3c, + 0x70, 0xdd, 0x31, 0x79, 0xa4, 0x0a, 0xfc, 0x5d, 0xce, 0xf0, 0xc4, 0x6d, 0xb5, 0x18, 0x49, 0x09, + 0x26, 0x72, 0x93, 0xd8, 0xcf, 0x42, 0x25, 0x6e, 0xad, 0xbb, 0xe1, 0xb6, 0xe3, 0x05, 0xcc, 0xf1, + 0xad, 0x3f, 0xd7, 0x2c, 0x11, 0x38, 0xa5, 0x41, 0x35, 0x18, 0x72, 0xe4, 0x4b, 0xe5, 0xa8, 0xc8, + 0xa5, 0x65, 0xf5, 0x44, 0x39, 0xf3, 0x8a, 0xaa, 0xb7, 0xc9, 0x15, 0x17, 0xf4, 0x0a, 0x8c, 0x8a, + 0x5b, 0x37, 0x24, 0x62, 0xad, 0x3e, 0x6d, 0x86, 0x7c, 0xd7, 0x25, 0x92, 0x09, 0x98, 0x49, 0x3b, + 0xf5, 0x59, 0x38, 0xd5, 0x36, 0xc5, 0x7a, 0x0a, 0x9c, 0xfb, 0xb7, 0x7d, 0x50, 0x51, 0x1e, 0x2a, + 0x34, 0x6b, 0x3a, 0x23, 0x1f, 0xcd, 0x3a, 0x23, 0x87, 0xa8, 0x42, 0xa0, 0xfb, 0x1f, 0xbf, 0xdc, + 0xe1, 0xb9, 0xd8, 0x67, 0x73, 0x65, 0xaa, 0xf8, 0x3d, 0x96, 0x1e, 0x1e, 0xd5, 0x4d, 0xad, 0x94, + 0xbe, 0x43, 0xad, 0x94, 0x82, 0xef, 0x52, 0x51, 0x7b, 0xa4, 0x19, 0xba, 0xcb, 0xb5, 0xec, 0xb3, + 0x2b, 0x35, 0x0a, 0xc4, 0x1c, 0xc7, 0xf4, 0x48, 0xba, 0x47, 0x30, 0x3d, 0x72, 0xf0, 0x88, 0x7a, + 0xa4, 0x64, 0x80, 0x53, 0x5e, 0x68, 0x07, 0x4e, 0x35, 0xcc, 0x57, 0x74, 0xd4, 0xed, 0x94, 0xe7, + 0x7b, 0x78, 0xc5, 0xa6, 0xa5, 0xbd, 0x18, 0xb0, 0x90, 0xe5, 0x87, 0xdb, 0xab, 0x40, 0xaf, 0xc0, + 0xd0, 0x3b, 0x61, 0xbc, 0xe0, 0x3b, 0x71, 0x2c, 0x16, 0x4a, 0x79, 0x13, 0x60, 0xe8, 0xb5, 0x5b, + 0x75, 0x06, 0x3f, 0xe0, 0x0f, 0xfa, 0xcb, 0xbf, 0x58, 0x15, 0xb0, 0x7f, 0x87, 0x7b, 0xc3, 0x84, + 0x7d, 0x4c, 0xe2, 0x96, 0x7f, 0x12, 0x89, 0xb3, 0x6f, 0x19, 0xa6, 0xfb, 0x43, 0xf0, 0xc7, 0xfe, + 0x7b, 0x8b, 0xf9, 0x63, 0xd7, 0xc8, 0x76, 0xd3, 0x77, 0x92, 0x93, 0x08, 0x69, 0xfc, 0x12, 0x0c, + 0x25, 0xa2, 0xb6, 0x62, 0x59, 0xbf, 0xb5, 0xe6, 0x31, 0x3f, 0xb5, 0x5a, 0xe3, 0x24, 0x14, 0x2b, + 0x86, 0xf6, 0xbf, 0xe0, 0x5f, 0x45, 0x62, 0x4e, 0xc0, 0xe8, 0xbc, 0x69, 0x1a, 0x9d, 0xcf, 0x14, + 0xee, 0x4b, 0x17, 0xe3, 0xf3, 0x07, 0x66, 0x0f, 0x98, 0x2a, 0xfa, 0xb3, 0x73, 0x60, 0x60, 0xdf, + 0x02, 0xf3, 0xb5, 0x21, 0xf4, 0x2a, 0x0f, 0x12, 0xe6, 0x8b, 0xec, 0xa5, 0x9e, 0x03, 0x84, 0xed, + 0xdf, 0x28, 0xc1, 0x19, 0xee, 0x32, 0x9c, 0xdb, 0x09, 0x3d, 0xb7, 0x16, 0xba, 0x22, 0x64, 0xda, + 0x85, 0x91, 0xa6, 0x66, 0x2a, 0x14, 0xcb, 0x07, 0xa1, 0x1b, 0x17, 0xa9, 0x7a, 0xa6, 0x43, 0xb1, + 0xc1, 0x95, 0xd6, 0x42, 0x76, 0xbc, 0x86, 0xf2, 0x40, 0x95, 0x7a, 0x5e, 0xf7, 0x54, 0x2d, 0x8b, + 0x1a, 0x1f, 0x6c, 0x70, 0x3d, 0x86, 0x04, 0xf5, 0xf6, 0xdf, 0xb1, 0xe0, 0x91, 0x2e, 0x39, 0x23, + 0x68, 0x75, 0xf7, 0x99, 0x9b, 0x56, 0x3c, 0x67, 0xa5, 0xaa, 0xe3, 0xce, 0x5b, 0x2c, 0xb0, 0x68, + 0x1d, 0x80, 0x3b, 0x5f, 0xd9, 0x93, 0xc5, 0xa5, 0x22, 0xb1, 0x12, 0x6d, 0x77, 0xb3, 0xb5, 0x6b, + 0xbb, 0xea, 0x91, 0x62, 0x8d, 0xab, 0xfd, 0x9d, 0x32, 0xf4, 0xf3, 0x57, 0x53, 0x6b, 0x30, 0xb8, + 0xc5, 0x33, 0x57, 0xf6, 0x96, 0x38, 0x33, 0x55, 0x05, 0x39, 0x00, 0x4b, 0x36, 0x68, 0x15, 0x4e, + 0x53, 0xbd, 0xc3, 0x73, 0xfc, 0x2a, 0xf1, 0x9d, 0x5d, 0x69, 0x5b, 0xf0, 0xac, 0xe5, 0x32, 0xc1, + 0xee, 0xe9, 0xe5, 0x76, 0x12, 0xdc, 0xa9, 0x1c, 0x7a, 0xb5, 0x2d, 0xe5, 0x14, 0xcf, 0x08, 0xaa, + 0x6e, 0x7b, 0x1d, 0x9e, 0x76, 0x8a, 0x6a, 0x3f, 0xcd, 0x36, 0x2b, 0x4a, 0x7b, 0x9c, 0xd2, 0xb4, + 0x9c, 0x4c, 0x5a, 0x54, 0x85, 0x89, 0xb8, 0xc5, 0x4e, 0xae, 0xd7, 0xb6, 0x22, 0x12, 0x6f, 0x85, + 0xbe, 0x2b, 0xde, 0x55, 0x53, 0x1a, 0x63, 0x3d, 0x83, 0xc7, 0x6d, 0x25, 0x28, 0x97, 0x0d, 0xc7, + 0xf3, 0x5b, 0x11, 0x49, 0xb9, 0x0c, 0x98, 0x5c, 0x96, 0x32, 0x78, 0xdc, 0x56, 0xc2, 0xfe, 0x13, + 0x0b, 0x4e, 0x77, 0x08, 0xef, 0xe0, 0x41, 0x87, 0x9b, 0x5e, 0x9c, 0xa8, 0xdc, 0xd4, 0x5a, 0xd0, + 0x21, 0x87, 0x63, 0x45, 0x41, 0xa5, 0x90, 0x9b, 0xc6, 0xd9, 0x63, 0x53, 0x71, 0x80, 0x2d, 0xb0, + 0xbd, 0x25, 0x90, 0x42, 0x17, 0xa0, 0xaf, 0x15, 0x93, 0x48, 0x3e, 0xd3, 0x24, 0x97, 0x28, 0xe6, + 0x0d, 0x61, 0x18, 0xaa, 0xec, 0x6c, 0x2a, 0x47, 0x84, 0xa6, 0xec, 0x70, 0x57, 0x04, 0xc7, 0xd9, + 0xdf, 0x2c, 0xc3, 0x78, 0x26, 0xcc, 0x8b, 0x36, 0x64, 0x3b, 0x0c, 0xbc, 0x24, 0x54, 0x49, 0x8b, + 0xf8, 0xcb, 0x30, 0xa4, 0xb9, 0xb5, 0x2a, 0xe0, 0x58, 0x51, 0xa0, 0xa7, 0xcd, 0x27, 0xac, 0xd3, + 0x36, 0xcf, 0x57, 0x8d, 0xd7, 0xec, 0x8a, 0xe6, 0xcb, 0x7f, 0x12, 0xfa, 0x9a, 0xa1, 0x7a, 0x99, + 0x54, 0x09, 0x3d, 0x9e, 0xaf, 0xd6, 0xc2, 0xd0, 0xc7, 0x0c, 0x89, 0x9e, 0x12, 0xbd, 0xcf, 0xf8, + 0x6f, 0xb1, 0xe3, 0x86, 0xb1, 0x36, 0x04, 0xcf, 0xc0, 0xe0, 0x3d, 0xb2, 0x1b, 0x79, 0xc1, 0x66, + 0xd6, 0x7b, 0x7d, 0x83, 0x83, 0xb1, 0xc4, 0x9b, 0x39, 0xf1, 0x07, 0x8f, 0x39, 0x27, 0xfe, 0x50, + 0x6e, 0xa4, 0xea, 0x6f, 0x5a, 0x30, 0xce, 0x32, 0xf9, 0x89, 0x8b, 0xb4, 0x5e, 0x18, 0x9c, 0xc0, + 0xf6, 0xf8, 0x24, 0xf4, 0x47, 0xb4, 0xd2, 0x6c, 0x5a, 0x6b, 0xd6, 0x12, 0xcc, 0x71, 0xe8, 0x31, + 0xe8, 0x63, 0x4d, 0xa0, 0x9f, 0x71, 0x84, 0xa7, 0x09, 0xae, 0x3a, 0x89, 0x83, 0x19, 0x94, 0xdd, + 0x8a, 0xc0, 0xa4, 0xe9, 0x7b, 0xbc, 0xd1, 0xa9, 0xd3, 0xe9, 0xc3, 0x76, 0x2b, 0xa2, 0x63, 0x23, + 0x1f, 0xd6, 0xad, 0x88, 0xce, 0xcc, 0x0f, 0x57, 0x51, 0xff, 0x7b, 0x09, 0xce, 0x77, 0x2c, 0x97, + 0x9e, 0x83, 0x2d, 0x19, 0xe7, 0x60, 0x57, 0x32, 0xe7, 0x60, 0xf6, 0xe1, 0xa5, 0x1f, 0xce, 0xc9, + 0x58, 0xe7, 0x03, 0xab, 0xf2, 0x09, 0x1e, 0x58, 0xf5, 0x15, 0x55, 0x1d, 0xfa, 0x73, 0x54, 0x87, + 0x3f, 0xb0, 0xe0, 0xd1, 0x8e, 0x43, 0xf6, 0xa1, 0xbb, 0x86, 0xd2, 0xb1, 0x95, 0x5d, 0x14, 0xeb, + 0x5f, 0x2e, 0x77, 0xe9, 0x15, 0x53, 0xb1, 0x2f, 0xd2, 0x55, 0x88, 0x21, 0x63, 0xa1, 0x14, 0x8d, + 0xf0, 0x15, 0x88, 0xc3, 0xb0, 0xc2, 0xa2, 0x58, 0xbb, 0xc6, 0xc1, 0x1b, 0xb9, 0x78, 0xc4, 0x09, + 0x35, 0x63, 0x7a, 0x0b, 0xf5, 0xfb, 0xc1, 0x99, 0xcb, 0x1d, 0xe8, 0xae, 0x66, 0x34, 0x95, 0x8f, + 0x62, 0x34, 0x8d, 0x74, 0x36, 0x98, 0xd0, 0x1c, 0x8c, 0x6f, 0x7b, 0x01, 0x7b, 0x4a, 0xcf, 0xd4, + 0x4a, 0xd4, 0x5d, 0xba, 0x55, 0x13, 0x8d, 0xb3, 0xf4, 0x53, 0xaf, 0xc0, 0xe8, 0xd1, 0x7d, 0x32, + 0xef, 0x97, 0xe1, 0xa3, 0x87, 0x2c, 0x0a, 0x7c, 0x77, 0x30, 0xbe, 0x8b, 0xb6, 0x3b, 0xb4, 0x7d, + 0x9b, 0x1a, 0x9c, 0xd9, 0x68, 0xf9, 0xfe, 0x2e, 0x8b, 0x22, 0x21, 0xae, 0xa4, 0x10, 0x1a, 0x9f, + 0x7a, 0xe4, 0x76, 0xa9, 0x03, 0x0d, 0xee, 0x58, 0x12, 0x7d, 0x1e, 0x50, 0xb8, 0xce, 0x72, 0x5d, + 0xba, 0xe9, 0xfd, 0x67, 0xf6, 0x09, 0xca, 0xe9, 0x54, 0xbd, 0xd5, 0x46, 0x81, 0x3b, 0x94, 0xa2, + 0xfa, 0x1f, 0x7b, 0x1f, 0x57, 0x35, 0x2b, 0xa3, 0xff, 0x61, 0x1d, 0x89, 0x4d, 0x5a, 0x74, 0x0d, + 0x4e, 0x39, 0x3b, 0x8e, 0xc7, 0xb3, 0xd7, 0x48, 0x06, 0x5c, 0x01, 0x54, 0x5e, 0x8f, 0xb9, 0x2c, + 0x01, 0x6e, 0x2f, 0x83, 0x9a, 0x86, 0x1b, 0x8b, 0xe7, 0xb6, 0xfe, 0xcc, 0x11, 0x24, 0xb8, 0xb0, + 0x63, 0xcb, 0xfe, 0x89, 0x45, 0xb7, 0xbe, 0x0e, 0xaf, 0xae, 0x19, 0xcf, 0xb5, 0x6b, 0x57, 0x5b, + 0xda, 0x9f, 0x6b, 0xe7, 0xfe, 0x40, 0x83, 0x96, 0x8b, 0x46, 0x9c, 0x06, 0xa3, 0x1a, 0xda, 0xa6, + 0xb8, 0xd1, 0xa5, 0x28, 0xd0, 0x5d, 0x18, 0x74, 0xbd, 0x1d, 0x2f, 0x0e, 0xa3, 0x02, 0x0f, 0x24, + 0xb7, 0x05, 0x38, 0xa6, 0xab, 0x65, 0x95, 0x33, 0xc1, 0x92, 0x9b, 0xfd, 0xad, 0x12, 0x8c, 0xca, + 0xfa, 0x5e, 0x6b, 0x85, 0x89, 0x73, 0x02, 0x1b, 0xfa, 0x6b, 0xc6, 0x86, 0x3e, 0x5b, 0xec, 0x7a, + 0x1b, 0x6b, 0x5c, 0xd7, 0x8d, 0xfc, 0x0b, 0x99, 0x8d, 0xfc, 0x72, 0x2f, 0x4c, 0x0f, 0xdf, 0xc0, + 0xff, 0xb5, 0x05, 0xa7, 0x0c, 0xfa, 0x13, 0xd8, 0x47, 0x6a, 0xe6, 0x3e, 0xf2, 0x5c, 0x0f, 0xbd, + 0xe9, 0xb2, 0x7f, 0x7c, 0xa7, 0x94, 0xe9, 0x05, 0xdb, 0x37, 0xbe, 0x02, 0x7d, 0x5b, 0x4e, 0xe4, + 0x16, 0x4b, 0xe3, 0xd6, 0x56, 0x7c, 0xe6, 0xba, 0x13, 0xb9, 0x7c, 0xf5, 0xbf, 0xa4, 0xde, 0x84, + 0x71, 0x22, 0x37, 0x37, 0x42, 0x9b, 0x55, 0x8a, 0xae, 0xc2, 0x40, 0xdc, 0x08, 0x9b, 0x2a, 0x16, + 0xee, 0x02, 0x7f, 0x2f, 0x86, 0x42, 0x0e, 0xf6, 0xa6, 0x91, 0x59, 0x1d, 0x05, 0x63, 0x41, 0x3f, + 0x45, 0xa0, 0xa2, 0xaa, 0x3e, 0xc6, 0x58, 0xe0, 0xf7, 0xcb, 0x70, 0xba, 0x83, 0xa4, 0xa0, 0xaf, + 0x1a, 0xa3, 0xf6, 0x4a, 0xcf, 0xa2, 0xf6, 0x01, 0xc7, 0xed, 0xab, 0xcc, 0x4a, 0x72, 0x85, 0x6c, + 0x1c, 0xa1, 0xfa, 0xdb, 0x31, 0xc9, 0x56, 0x4f, 0x41, 0xf9, 0xd5, 0xd3, 0x6a, 0x4f, 0x68, 0xf0, + 0x69, 0x35, 0xaa, 0x9d, 0xc7, 0xf8, 0x8d, 0xdf, 0xeb, 0x83, 0x33, 0x9d, 0x6e, 0xd0, 0xa2, 0x5f, + 0xb4, 0x32, 0x59, 0xda, 0x5f, 0xed, 0xfd, 0x1a, 0x2e, 0x4f, 0xdd, 0x2e, 0xb2, 0x4e, 0xcc, 0x98, + 0x79, 0xdb, 0x73, 0x47, 0x5b, 0xd4, 0xce, 0x6e, 0x55, 0x44, 0x3c, 0xdf, 0xbe, 0x5c, 0x0f, 0x3e, + 0x77, 0x84, 0xa6, 0x88, 0x94, 0xfd, 0x71, 0xe6, 0x56, 0x85, 0x04, 0xe7, 0xdf, 0xaa, 0x90, 0x6d, + 0x98, 0xda, 0x84, 0x61, 0xad, 0x5f, 0xc7, 0x28, 0x02, 0x1e, 0xdd, 0x9a, 0xb4, 0x56, 0x1f, 0xa3, + 0x18, 0xfc, 0xaa, 0x05, 0x99, 0x70, 0x15, 0xe5, 0x8a, 0xb1, 0xba, 0xba, 0x62, 0x2e, 0x40, 0x5f, + 0x14, 0xfa, 0x24, 0x9b, 0x3d, 0x1c, 0x87, 0x3e, 0xc1, 0x0c, 0xa3, 0x9e, 0x86, 0x2c, 0x77, 0x7b, + 0x1a, 0x92, 0xda, 0xe6, 0x3e, 0xd9, 0x21, 0xd2, 0x31, 0xa2, 0x16, 0xef, 0x15, 0x0a, 0xc4, 0x1c, + 0x67, 0xff, 0x7e, 0x19, 0x06, 0xb8, 0xf7, 0xe1, 0x04, 0x76, 0xe7, 0x9a, 0x70, 0x04, 0x14, 0xba, + 0xd5, 0xca, 0x5b, 0x35, 0x53, 0x75, 0x12, 0x87, 0x0b, 0x96, 0xea, 0x63, 0xea, 0x3c, 0x40, 0x33, + 0xc6, 0x28, 0x4c, 0x65, 0xec, 0x5b, 0xe0, 0x3c, 0xb4, 0x31, 0xd9, 0x02, 0x88, 0xd9, 0x63, 0x64, + 0x94, 0x87, 0xc8, 0xb9, 0xf7, 0x62, 0xa1, 0x76, 0xd4, 0x55, 0x31, 0xde, 0x9a, 0x34, 0xd9, 0x97, + 0x42, 0x60, 0x8d, 0xf7, 0xd4, 0xcb, 0x50, 0x51, 0xc4, 0x79, 0x8a, 0xff, 0x88, 0x2e, 0x9a, 0x7f, + 0x0e, 0xc6, 0x33, 0x75, 0xf5, 0x64, 0x37, 0xfc, 0x8a, 0x05, 0xe3, 0x99, 0x57, 0x94, 0xd1, 0x7b, + 0x16, 0x9c, 0xf1, 0x3b, 0x38, 0x9f, 0xc4, 0x67, 0x3e, 0x8a, 0xdb, 0x4a, 0x99, 0x0c, 0x9d, 0xb0, + 0xb8, 0x63, 0x6d, 0xf6, 0x6f, 0x59, 0x70, 0xaa, 0xed, 0xf9, 0xdd, 0x0f, 0x49, 0xe3, 0x64, 0x82, + 0xd3, 0x52, 0xe7, 0x04, 0xa7, 0xf6, 0x6f, 0x58, 0x20, 0xa4, 0xe9, 0x04, 0x74, 0xb4, 0x65, 0x53, + 0x47, 0xfb, 0x58, 0x11, 0x01, 0xed, 0xa2, 0x9c, 0xfd, 0x9e, 0x05, 0x88, 0x13, 0x64, 0x9f, 0x4b, + 0xe4, 0x8e, 0x46, 0xcd, 0xb8, 0x48, 0x25, 0x5a, 0x61, 0xb0, 0x46, 0xd5, 0x63, 0xee, 0x7b, 0xf5, + 0xcc, 0x58, 0xe7, 0x86, 0xa1, 0xcb, 0x30, 0x2c, 0x9e, 0x19, 0x5a, 0x4d, 0x9f, 0x10, 0x1b, 0x67, + 0x8f, 0x59, 0xa6, 0x60, 0xac, 0xd3, 0xd8, 0xbf, 0x53, 0x86, 0x6c, 0xd0, 0x09, 0x7a, 0x0b, 0x46, + 0x1a, 0x4e, 0xd3, 0x59, 0xf7, 0x7c, 0x2f, 0xf1, 0x48, 0x5c, 0xec, 0xb0, 0x6b, 0x41, 0x2b, 0x21, + 0x5c, 0xd5, 0x1a, 0x04, 0x1b, 0x1c, 0xd1, 0x0c, 0x40, 0x33, 0xf2, 0x76, 0x3c, 0x9f, 0x6c, 0x32, + 0xcd, 0x88, 0x45, 0xad, 0xf2, 0x73, 0x1b, 0x09, 0xc5, 0x1a, 0x45, 0x87, 0x28, 0xc7, 0xf2, 0x49, + 0x44, 0x39, 0xf6, 0xf5, 0x18, 0xe5, 0xd8, 0x5f, 0x28, 0xca, 0x11, 0xc3, 0x39, 0xe9, 0x61, 0xa6, + 0xff, 0x97, 0x3c, 0x9f, 0xf0, 0x84, 0x86, 0x22, 0xaa, 0x75, 0x6a, 0x7f, 0x6f, 0xfa, 0x1c, 0xee, + 0x48, 0x81, 0xbb, 0x94, 0xb4, 0x5b, 0x70, 0xba, 0x4e, 0x22, 0x8f, 0xe5, 0x99, 0x72, 0xd3, 0x09, + 0xf8, 0x65, 0xa8, 0x44, 0x99, 0xb9, 0xdf, 0xe3, 0x95, 0x43, 0x2d, 0x33, 0x89, 0x9c, 0xeb, 0x29, + 0x4b, 0xfb, 0x2f, 0x97, 0x60, 0x50, 0x04, 0x77, 0x9d, 0xc0, 0x56, 0x77, 0xc3, 0x30, 0x44, 0x9f, + 0xc9, 0x9b, 0xc1, 0xac, 0x59, 0x5d, 0x4d, 0xd0, 0x7a, 0xc6, 0x04, 0x7d, 0xae, 0x18, 0xbb, 0xc3, + 0x8d, 0xcf, 0x1f, 0x96, 0x60, 0xcc, 0x0c, 0x76, 0x3b, 0x81, 0x61, 0x79, 0x1d, 0x06, 0x63, 0x11, + 0x09, 0x56, 0x2a, 0x12, 0xc7, 0x92, 0xfd, 0xc4, 0xca, 0xdb, 0x20, 0x63, 0xbf, 0x24, 0xbb, 0x8e, + 0xc1, 0x66, 0xe5, 0x93, 0x08, 0x36, 0xb3, 0x7f, 0x97, 0x2d, 0xb1, 0xfa, 0x40, 0x9e, 0xc0, 0x16, + 0xf1, 0x9a, 0xb9, 0x18, 0x5f, 0x2a, 0x24, 0x11, 0xa2, 0x79, 0x5d, 0xb6, 0x8a, 0xef, 0x59, 0x30, + 0x2c, 0x08, 0x4f, 0xa0, 0x03, 0x9f, 0x37, 0x3b, 0xf0, 0x54, 0xa1, 0x0e, 0x74, 0x69, 0xf9, 0xdf, + 0x2c, 0xa9, 0x96, 0xd7, 0xc4, 0xa3, 0xb2, 0xb9, 0xf9, 0x2e, 0x87, 0x9a, 0x51, 0x98, 0x84, 0x8d, + 0xd0, 0x17, 0x5b, 0xfe, 0x63, 0xe9, 0xf5, 0x02, 0x0e, 0x3f, 0xd0, 0x7e, 0x63, 0x45, 0xcd, 0xa2, + 0xdf, 0xc3, 0x28, 0x11, 0x1b, 0x56, 0xa7, 0x27, 0x6d, 0xd7, 0xe5, 0x93, 0xe1, 0x14, 0x26, 0x6e, + 0xe6, 0xf4, 0xfa, 0x54, 0x6e, 0x7a, 0x5b, 0x40, 0x71, 0xc2, 0x1a, 0x57, 0x19, 0x86, 0xca, 0x6a, + 0xe8, 0x37, 0xbd, 0xbf, 0x37, 0x05, 0x1c, 0x2b, 0x0a, 0xfb, 0x65, 0xb6, 0xe2, 0xb2, 0xe1, 0xe9, + 0x2d, 0x90, 0xff, 0x2f, 0x0d, 0xa8, 0x81, 0x65, 0x4e, 0x9d, 0x9b, 0xfa, 0x75, 0x81, 0xa2, 0xcb, + 0x1a, 0x6d, 0x82, 0x1e, 0x39, 0x97, 0xde, 0x2e, 0x40, 0xa4, 0xed, 0xc8, 0xe0, 0xe5, 0xc2, 0x2b, + 0x65, 0x0f, 0x87, 0x04, 0x2c, 0x49, 0x10, 0xcb, 0x8c, 0xb2, 0x5c, 0xcb, 0xe6, 0x28, 0x5d, 0x90, + 0x08, 0x9c, 0xd2, 0xa0, 0x59, 0x61, 0x56, 0x98, 0x2f, 0x0e, 0x4b, 0xb3, 0x42, 0x0e, 0x89, 0x66, + 0x57, 0x5c, 0x86, 0x61, 0x95, 0xa5, 0xbd, 0xc6, 0x93, 0x6d, 0x57, 0xb8, 0x36, 0xb3, 0x98, 0x82, + 0xb1, 0x4e, 0x83, 0x96, 0xe1, 0xb4, 0xab, 0xa2, 0x8e, 0x6b, 0xad, 0x75, 0xdf, 0x6b, 0xd0, 0xa2, + 0xfc, 0xc6, 0xd0, 0x23, 0xfb, 0x7b, 0xd3, 0xa7, 0xab, 0xed, 0x68, 0xdc, 0xa9, 0x0c, 0x5a, 0x83, + 0xf1, 0x98, 0x67, 0xa3, 0x97, 0xa1, 0xa5, 0x22, 0x75, 0xdf, 0xb3, 0xf2, 0xac, 0xa2, 0x6e, 0xa2, + 0x0f, 0x18, 0x88, 0xaf, 0x09, 0x32, 0x18, 0x35, 0xcb, 0x02, 0xbd, 0x0a, 0x63, 0xbe, 0xfe, 0xd0, + 0x56, 0x4d, 0x04, 0x5f, 0xab, 0xa8, 0x0e, 0xe3, 0x19, 0xae, 0x1a, 0xce, 0x50, 0xa3, 0xd7, 0x61, + 0x52, 0x87, 0x88, 0x0c, 0x06, 0x4e, 0xb0, 0x49, 0x62, 0x91, 0x06, 0xfb, 0xb1, 0xfd, 0xbd, 0xe9, + 0xc9, 0x95, 0x2e, 0x34, 0xb8, 0x6b, 0x69, 0x74, 0x15, 0x46, 0xe4, 0x48, 0x6a, 0x81, 0xd8, 0x69, + 0x3c, 0x91, 0x86, 0xc3, 0x06, 0xe5, 0x07, 0x3b, 0x92, 0xf9, 0x0a, 0x2d, 0xac, 0x6d, 0xad, 0xe8, + 0x6d, 0x18, 0xd1, 0xdb, 0x98, 0xdd, 0x33, 0xf3, 0x1f, 0x2f, 0x13, 0x5b, 0xb4, 0x6a, 0xb9, 0x8e, + 0xc3, 0x06, 0x6f, 0xfb, 0x16, 0x0c, 0xd4, 0x77, 0xe3, 0x46, 0xe2, 0x3f, 0xac, 0xc7, 0xa6, 0x1b, + 0x30, 0x9e, 0x79, 0x95, 0x59, 0x3d, 0xef, 0x6d, 0x3d, 0xac, 0xe7, 0xbd, 0xed, 0xaf, 0x59, 0xd0, + 0xbf, 0xe6, 0x78, 0xf9, 0x0f, 0x48, 0x14, 0x69, 0x32, 0x7a, 0x09, 0x06, 0xc8, 0xc6, 0x06, 0x69, + 0xc8, 0xe7, 0xc2, 0x1f, 0x97, 0xaa, 0xcd, 0x22, 0x83, 0xd2, 0xa9, 0xc9, 0x2a, 0xe3, 0x7f, 0xb1, + 0x20, 0xb6, 0xff, 0x9d, 0x05, 0xb0, 0x16, 0xfa, 0xf2, 0xb4, 0x29, 0xa7, 0x25, 0xf3, 0x6d, 0x4f, + 0x59, 0x3c, 0xdd, 0xe1, 0x29, 0x0b, 0x94, 0x32, 0xec, 0xf0, 0x90, 0x85, 0xea, 0x4d, 0xb9, 0x50, + 0x6f, 0xfa, 0x7a, 0xe9, 0xcd, 0x37, 0x2c, 0x10, 0x81, 0x40, 0x05, 0x24, 0xc1, 0x95, 0xe9, 0xe7, + 0x8d, 0xdc, 0x24, 0xcf, 0x16, 0xb9, 0xb0, 0x23, 0x32, 0x92, 0x28, 0xd9, 0x34, 0xf2, 0x90, 0x18, + 0x5c, 0xa9, 0x61, 0x3f, 0xcc, 0xd1, 0xab, 0x4c, 0x8f, 0xcc, 0x6f, 0x57, 0x4f, 0x59, 0xd8, 0x58, + 0x76, 0x76, 0xca, 0x58, 0x65, 0xe3, 0xd2, 0xb3, 0xb3, 0x4b, 0x04, 0x4e, 0x69, 0xd0, 0x33, 0x30, + 0x18, 0xb7, 0xd6, 0x19, 0x79, 0x26, 0x2a, 0xa8, 0xce, 0xc1, 0x58, 0xe2, 0xed, 0x5f, 0x40, 0x60, + 0x74, 0xcd, 0xc8, 0xfc, 0x65, 0x3d, 0xf4, 0xcc, 0x5f, 0x6f, 0xc0, 0x10, 0xd9, 0x6e, 0x26, 0xbb, + 0x55, 0x2f, 0x2a, 0x96, 0x83, 0x71, 0x51, 0x50, 0xb7, 0x73, 0x97, 0x18, 0xac, 0x38, 0x76, 0xc9, + 0xe3, 0x56, 0xfe, 0x50, 0xe4, 0x71, 0xeb, 0xfb, 0xa9, 0xe4, 0x71, 0x7b, 0x1d, 0x06, 0x37, 0xbd, + 0x04, 0x93, 0x66, 0x28, 0x6e, 0x78, 0xe6, 0x1c, 0xdf, 0x5d, 0xe3, 0xc4, 0xed, 0xc9, 0x99, 0x04, + 0x02, 0x4b, 0x76, 0x68, 0x0d, 0x06, 0xb8, 0xed, 0x21, 0x52, 0xa3, 0x7d, 0xa2, 0x88, 0x97, 0xa6, + 0x3d, 0x4b, 0x98, 0x08, 0xfd, 0x12, 0xbc, 0x64, 0xde, 0xb6, 0xc1, 0x0f, 0x9e, 0xb7, 0x4d, 0x65, + 0x5b, 0x1b, 0x7a, 0x58, 0xd9, 0xd6, 0x8c, 0xac, 0x75, 0x95, 0xe3, 0xc8, 0x5a, 0xf7, 0x0d, 0x0b, + 0xce, 0x36, 0x3b, 0xe5, 0x7c, 0x14, 0x79, 0xd3, 0x3e, 0x7b, 0x84, 0x1c, 0x98, 0x46, 0xd5, 0xec, + 0xde, 0x5c, 0x47, 0x32, 0xdc, 0xb9, 0x62, 0x99, 0xfe, 0x6e, 0xf8, 0x83, 0xa7, 0xbf, 0x3b, 0xee, + 0x04, 0x6b, 0x69, 0x32, 0xbc, 0xd1, 0x63, 0x49, 0x86, 0x37, 0xf6, 0x10, 0x93, 0xe1, 0x69, 0x69, + 0xec, 0xc6, 0x1f, 0x6e, 0x1a, 0xbb, 0x2d, 0x18, 0x76, 0xc3, 0xfb, 0xc1, 0x7d, 0x27, 0x72, 0xe7, + 0x6a, 0xcb, 0x22, 0x6b, 0x5a, 0x4e, 0x6a, 0x8e, 0x6a, 0x5a, 0xc0, 0xa8, 0x81, 0xbb, 0x23, 0x53, + 0x24, 0xd6, 0x59, 0x8b, 0x84, 0x7e, 0xa7, 0x3e, 0x60, 0x42, 0x3f, 0x23, 0x2d, 0x1e, 0x3a, 0x8e, + 0xb4, 0x78, 0x6f, 0xb1, 0x3b, 0xfa, 0x1b, 0xde, 0xe6, 0xaa, 0xd3, 0x64, 0xf7, 0xca, 0x72, 0x6b, + 0x58, 0x90, 0xe4, 0xed, 0x35, 0x28, 0x14, 0x4e, 0x99, 0xb6, 0x27, 0xde, 0x3b, 0x73, 0xd2, 0x89, + 0xf7, 0xce, 0x1e, 0x63, 0xe2, 0xbd, 0x73, 0x27, 0x9a, 0x78, 0xef, 0x91, 0x9f, 0x4a, 0xe2, 0xbd, + 0xbf, 0x00, 0xe7, 0x0f, 0xff, 0x1c, 0x69, 0x62, 0xe7, 0x5a, 0xea, 0x32, 0xc8, 0x24, 0x76, 0x66, + 0xaa, 0x8e, 0x46, 0x55, 0x38, 0xff, 0xd7, 0x77, 0x2d, 0x78, 0xa4, 0x4b, 0x7a, 0x9c, 0xc2, 0x57, + 0x32, 0x9a, 0x30, 0xde, 0x34, 0x8b, 0x16, 0xbe, 0x44, 0x65, 0xa4, 0xe3, 0x51, 0xe1, 0x7d, 0x19, + 0x04, 0xce, 0xb2, 0x9f, 0xff, 0xd8, 0x8f, 0xde, 0x3f, 0xff, 0x91, 0x1f, 0xbf, 0x7f, 0xfe, 0x23, + 0x7f, 0xf4, 0xfe, 0xf9, 0x8f, 0xfc, 0xdc, 0xfe, 0x79, 0xeb, 0x47, 0xfb, 0xe7, 0xad, 0x1f, 0xef, + 0x9f, 0xb7, 0xfe, 0x64, 0xff, 0xbc, 0xf5, 0x8d, 0x3f, 0x3d, 0xff, 0x91, 0x2f, 0x96, 0x76, 0x2e, + 0xff, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x37, 0x41, 0x6d, 0xd5, 0x05, 0xba, 0x00, 0x00, } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/v1/generated.proto b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/v1/generated.proto index 00e26331..3196ae4d 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/v1/generated.proto +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/v1/generated.proto @@ -141,7 +141,7 @@ message Binding { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // The target object that you want to bind to the standard object. optional ObjectReference target = 2; @@ -240,7 +240,7 @@ message ComponentStatus { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // List of component conditions observed // +optional @@ -263,7 +263,7 @@ message ConfigMap { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Data contains the configuration data. // Each key must be a valid DNS_SUBDOMAIN with an optional leading dot. @@ -426,11 +426,23 @@ message Container { // Optional: Path at which the file to which the container's termination message // will be written is mounted into the container's filesystem. // Message written is intended to be brief final status, such as an assertion failure message. + // Will be truncated by the node if greater than 4096 bytes. The total message length across + // all containers will be limited to 12kb. // Defaults to /dev/termination-log. // Cannot be updated. // +optional optional string terminationMessagePath = 13; + // Indicate how the termination message should be populated. File will use the contents of + // terminationMessagePath to populate the container status message on both success and failure. + // FallbackToLogsOnError will use the last chunk of container log output if the termination + // message file is empty and the container exited with an error. + // The log output is limited to 2048 bytes or 80 lines, whichever is smaller. + // Defaults to File. + // Cannot be updated. + // +optional + optional string terminationMessagePolicy = 20; + // Image pull policy. // One of Always, Never, IfNotPresent. // Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. @@ -767,7 +779,7 @@ message Endpoints { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // The set of all endpoints is the union of all subsets. Addresses are placed into // subsets according to the IPs they share. A single address with multiple ports, @@ -799,6 +811,10 @@ message EnvFromSource { // The ConfigMap to select from // +optional optional ConfigMapEnvSource configMapRef = 2; + + // The Secret to select from + // +optional + optional SecretEnvSource secretRef = 3; } // EnvVar represents an environment variable present in a Container. @@ -848,7 +864,7 @@ message EnvVarSource { message Event { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - optional ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // The object that this event is about. optional ObjectReference involvedObject = 2; @@ -1195,7 +1211,7 @@ message LimitRange { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec defines the limits enforced. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -1260,6 +1276,8 @@ message List { } // ListOptions is the query options to a standard REST list call. +// DEPRECATED: This type has been moved to meta/v1 and will be removed soon. +// +k8s:openapi-gen=false message ListOptions { // A selector to restrict the list of returned objects by their labels. // Defaults to everything. @@ -1347,7 +1365,7 @@ message Namespace { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec defines the behavior of the Namespace. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -1394,7 +1412,7 @@ message Node { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec defines the behavior of a node. // http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -1652,6 +1670,8 @@ message ObjectFieldSelector { // ObjectMeta is metadata that all persisted resources must have, which includes all objects // users must create. +// DEPRECATED: Use k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta instead - this type will be removed soon. +// +k8s:openapi-gen=false message ObjectMeta { // Name must be unique within a namespace. Is required when creating resources, although // some resources may allow a client to request the generation of an appropriate name @@ -1848,7 +1868,7 @@ message PersistentVolume { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec defines a specification of a persistent volume owned by the cluster. // Provisioned by an administrator. @@ -1869,7 +1889,7 @@ message PersistentVolumeClaim { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec defines the desired characteristics of a volume requested by a pod author. // More info: http://kubernetes.io/docs/user-guide/persistent-volumes#persistentvolumeclaims @@ -2111,7 +2131,7 @@ message Pod { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Specification of the desired behavior of the pod. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -2378,6 +2398,19 @@ message PodLogOptions { optional int64 limitBytes = 8; } +// PodPortForwardOptions is the query options to a Pod's port forward call +// when using WebSockets. +// The `port` query parameter must specify the port or +// ports (comma separated) to forward over. +// Port forwarding over SPDY does not use these options. It requires the port +// to be passed in the `port` header as part of request. +message PodPortForwardOptions { + // List of ports to forward + // Required when using WebSockets + // +optional + repeated int32 ports = 1; +} + // PodProxyOptions is the query options to a Pod's proxy call. message PodProxyOptions { // Path is the URL path to use for the current proxy request to pod. @@ -2551,6 +2584,11 @@ message PodSpec { // If specified, the pod's scheduling constraints // +optional optional Affinity affinity = 18; + + // If specified, the pod will be dispatched by specified scheduler. + // If not specified, the pod will be dispatched by default scheduler. + // +optional + optional string schedulername = 19; } // PodStatus represents information about the status of a pod. Status may trail the actual @@ -2607,7 +2645,7 @@ message PodStatusResult { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Most recently observed status of the pod. // This data may not be up to date. @@ -2623,7 +2661,7 @@ message PodTemplate { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Template defines the pods that will be created from this pod template. // http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -2647,7 +2685,7 @@ message PodTemplateSpec { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Specification of the desired behavior of the pod. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -2806,7 +2844,7 @@ message RangeAllocation { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Range is string that identifies the range represented by 'data'. optional string range = 2; @@ -2821,7 +2859,7 @@ message ReplicationController { // be the same as the Pod(s) that the replication controller manages. // Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec defines the specification of the desired behavior of the replication controller. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -2947,7 +2985,7 @@ message ResourceQuota { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec defines the desired quota. // http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -3037,7 +3075,7 @@ message Secret { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Data contains the secret data. Each key must be a valid DNS_SUBDOMAIN // or leading dot followed by valid DNS_SUBDOMAIN. @@ -3060,6 +3098,16 @@ message Secret { optional string type = 3; } +// SecretEnvSource selects a Secret to populate the environment +// variables with. +// +// The contents of the target Secret's Data field will represent the +// key-value pairs as environment variables. +message SecretEnvSource { + // The Secret to select from. + optional LocalObjectReference localObjectReference = 1; +} + // SecretKeySelector selects a key of a Secret. message SecretKeySelector { // The name of the secret in the pod's namespace to select from. @@ -3169,7 +3217,7 @@ message Service { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec defines the behavior of a service. // http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -3192,7 +3240,7 @@ message ServiceAccount { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Secrets is the list of secrets allowed to be used by pods running using this ServiceAccount. // More info: http://kubernetes.io/docs/user-guide/secrets diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/v1/helpers.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/v1/helpers.go index 828f7675..7463e68f 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/v1/helpers.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/v1/helpers.go @@ -26,7 +26,6 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/client-go/pkg/api" - "k8s.io/client-go/pkg/fields" ) // IsOpaqueIntResourceName returns true if the resource name has the opaque @@ -86,32 +85,10 @@ var standardFinalizers = sets.NewString( FinalizerOrphan, ) -// HasAnnotation returns a bool if passed in annotation exists -func HasAnnotation(obj ObjectMeta, ann string) bool { - _, found := obj.Annotations[ann] - return found -} - -// SetMetaDataAnnotation sets the annotation and value -func SetMetaDataAnnotation(obj *ObjectMeta, ann string, value string) { - if obj.Annotations == nil { - obj.Annotations = make(map[string]string) - } - obj.Annotations[ann] = value -} - func IsStandardFinalizerName(str string) bool { return standardFinalizers.Has(str) } -// SingleObject returns a ListOptions for watching a single object. -func SingleObject(meta ObjectMeta) ListOptions { - return ListOptions{ - FieldSelector: fields.OneTermEqualSelector("metadata.name", meta.Name).String(), - ResourceVersion: meta.ResourceVersion, - } -} - // AddToNodeAddresses appends the NodeAddresses to the passed-by-pointer slice, // only if they do not already exist func AddToNodeAddresses(addresses *[]NodeAddress, addAddresses ...NodeAddress) { diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/v1/meta.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/v1/meta.go index 89ea6847..fd30ef1f 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/v1/meta.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/v1/meta.go @@ -17,14 +17,13 @@ limitations under the License. package v1 import ( - "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" ) -func (obj *ObjectMeta) GetObjectMeta() meta.Object { return obj } +func (obj *ObjectMeta) GetObjectMeta() metav1.Object { return obj } -// Namespace implements meta.Object for any object with an ObjectMeta typed field. Allows +// Namespace implements metav1.Object for any object with an ObjectMeta typed field. Allows // fast, direct access to metadata fields for API objects. func (meta *ObjectMeta) GetNamespace() string { return meta.Namespace } func (meta *ObjectMeta) SetNamespace(namespace string) { meta.Namespace = namespace } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/v1/register.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/v1/register.go index 915a66f6..2ad0c4a9 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/v1/register.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/v1/register.go @@ -81,6 +81,7 @@ func addKnownTypes(scheme *runtime.Scheme) error { &PodAttachOptions{}, &PodLogOptions{}, &PodExecOptions{}, + &PodPortForwardOptions{}, &PodProxyOptions{}, &ComponentStatus{}, &ComponentStatusList{}, diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/v1/types.generated.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/v1/types.generated.go index a156f103..07e02483 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/v1/types.generated.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/v1/types.generated.go @@ -5935,7 +5935,13 @@ func (x *PersistentVolume) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -5945,7 +5951,13 @@ func (x *PersistentVolume) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -6069,24 +6081,30 @@ func (x *PersistentVolume) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = PersistentVolumeSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = PersistentVolumeStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -6099,16 +6117,16 @@ func (x *PersistentVolume) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6116,21 +6134,21 @@ func (x *PersistentVolume) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6138,38 +6156,44 @@ func (x *PersistentVolume) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6177,16 +6201,16 @@ func (x *PersistentVolume) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Spec = PersistentVolumeSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -6194,21 +6218,21 @@ func (x *PersistentVolume) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Status = PersistentVolumeStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -8602,7 +8626,13 @@ func (x *PersistentVolumeClaim) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -8612,7 +8642,13 @@ func (x *PersistentVolumeClaim) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -8736,24 +8772,30 @@ func (x *PersistentVolumeClaim) codecDecodeSelfFromMap(l int, d *codec1978.Decod } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = PersistentVolumeClaimSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = PersistentVolumeClaimStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -8766,16 +8808,16 @@ func (x *PersistentVolumeClaim) codecDecodeSelfFromArray(l int, d *codec1978.Dec var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8783,21 +8825,21 @@ func (x *PersistentVolumeClaim) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8805,38 +8847,44 @@ func (x *PersistentVolumeClaim) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8844,16 +8892,16 @@ func (x *PersistentVolumeClaim) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.Spec = PersistentVolumeClaimSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8861,21 +8909,21 @@ func (x *PersistentVolumeClaim) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.Status = PersistentVolumeClaimStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -19780,14 +19828,15 @@ func (x *EnvFromSource) CodecEncodeSelf(e *codec1978.Encoder) { } else { yysep2 := !z.EncBinary() yy2arr2 := z.EncBasicHandle().StructToArray - var yyq2 [2]bool + var yyq2 [3]bool _, _, _ = yysep2, yyq2, yy2arr2 const yyr2 bool = false yyq2[0] = x.Prefix != "" yyq2[1] = x.ConfigMapRef != nil + yyq2[2] = x.SecretRef != nil var yynn2 int if yyr2 || yy2arr2 { - r.EncodeArrayStart(2) + r.EncodeArrayStart(3) } else { yynn2 = 0 for _, b := range yyq2 { @@ -19846,6 +19895,29 @@ func (x *EnvFromSource) CodecEncodeSelf(e *codec1978.Encoder) { } } } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + if x.SecretRef == nil { + r.EncodeNil() + } else { + x.SecretRef.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("secretRef")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.SecretRef == nil { + r.EncodeNil() + } else { + x.SecretRef.CodecEncodeSelf(e) + } + } + } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { @@ -19930,6 +20002,17 @@ func (x *EnvFromSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } x.ConfigMapRef.CodecDecodeSelf(d) } + case "secretRef": + if r.TryDecodeAsNil() { + if x.SecretRef != nil { + x.SecretRef = nil + } + } else { + if x.SecretRef == nil { + x.SecretRef = new(SecretEnvSource) + } + x.SecretRef.CodecDecodeSelf(d) + } default: z.DecStructFieldNotFound(-1, yys3) } // end switch yys3 @@ -19941,16 +20024,16 @@ func (x *EnvFromSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj7 int - var yyb7 bool - var yyhl7 bool = l >= 0 - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l + var yyj8 int + var yyb8 bool + var yyhl8 bool = l >= 0 + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb7 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb7 { + if yyb8 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -19958,21 +20041,21 @@ func (x *EnvFromSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Prefix = "" } else { - yyv8 := &x.Prefix - yym9 := z.DecBinary() - _ = yym9 + yyv9 := &x.Prefix + yym10 := z.DecBinary() + _ = yym10 if false { } else { - *((*string)(yyv8)) = r.DecodeString() + *((*string)(yyv9)) = r.DecodeString() } } - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l } else { - yyb7 = r.CheckBreak() + yyb8 = r.CheckBreak() } - if yyb7 { + if yyb8 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -19987,18 +20070,39 @@ func (x *EnvFromSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.ConfigMapRef.CodecDecodeSelf(d) } - for { - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + if x.SecretRef != nil { + x.SecretRef = nil } - if yyb7 { + } else { + if x.SecretRef == nil { + x.SecretRef = new(SecretEnvSource) + } + x.SecretRef.CodecDecodeSelf(d) + } + for { + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj7-1, "") + z.DecStructFieldNotFound(yyj8-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -20184,6 +20288,187 @@ func (x *ConfigMapEnvSource) codecDecodeSelfFromArray(l int, d *codec1978.Decode z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } +func (x *SecretEnvSource) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [1]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Name != "" + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(1) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Name)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("name")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Name)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *SecretEnvSource) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *SecretEnvSource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "name": + if r.TryDecodeAsNil() { + x.Name = "" + } else { + yyv4 := &x.Name + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *SecretEnvSource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj6 int + var yyb6 bool + var yyhl6 bool = l >= 0 + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l + } else { + yyb6 = r.CheckBreak() + } + if yyb6 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Name = "" + } else { + yyv7 := &x.Name + yym8 := z.DecBinary() + _ = yym8 + if false { + } else { + *((*string)(yyv7)) = r.DecodeString() + } + } + for { + yyj6++ + if yyhl6 { + yyb6 = yyj6 > l + } else { + yyb6 = r.CheckBreak() + } + if yyb6 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj6-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + func (x *HTTPHeader) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) @@ -21905,6 +22190,32 @@ func (x *PullPolicy) CodecDecodeSelf(d *codec1978.Decoder) { } } +func (x TerminationMessagePolicy) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x)) + } +} + +func (x *TerminationMessagePolicy) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + *((*string)(x)) = r.DecodeString() + } +} + func (x Capability) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) @@ -22419,7 +22730,7 @@ func (x *Container) CodecEncodeSelf(e *codec1978.Encoder) { } else { yysep2 := !z.EncBinary() yy2arr2 := z.EncBasicHandle().StructToArray - var yyq2 [19]bool + var yyq2 [20]bool _, _, _ = yysep2, yyq2, yy2arr2 const yyr2 bool = false yyq2[1] = x.Image != "" @@ -22435,14 +22746,15 @@ func (x *Container) CodecEncodeSelf(e *codec1978.Encoder) { yyq2[11] = x.ReadinessProbe != nil yyq2[12] = x.Lifecycle != nil yyq2[13] = x.TerminationMessagePath != "" - yyq2[14] = x.ImagePullPolicy != "" - yyq2[15] = x.SecurityContext != nil - yyq2[16] = x.Stdin != false - yyq2[17] = x.StdinOnce != false - yyq2[18] = x.TTY != false + yyq2[14] = x.TerminationMessagePolicy != "" + yyq2[15] = x.ImagePullPolicy != "" + yyq2[16] = x.SecurityContext != nil + yyq2[17] = x.Stdin != false + yyq2[18] = x.StdinOnce != false + yyq2[19] = x.TTY != false var yynn2 int if yyr2 || yy2arr2 { - r.EncodeArrayStart(19) + r.EncodeArrayStart(20) } else { yynn2 = 1 for _, b := range yyq2 { @@ -22834,12 +23146,27 @@ func (x *Container) CodecEncodeSelf(e *codec1978.Encoder) { if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[14] { - x.ImagePullPolicy.CodecEncodeSelf(e) + x.TerminationMessagePolicy.CodecEncodeSelf(e) } else { r.EncodeString(codecSelferC_UTF81234, "") } } else { if yyq2[14] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("terminationMessagePolicy")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + x.TerminationMessagePolicy.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[15] { + x.ImagePullPolicy.CodecEncodeSelf(e) + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[15] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("imagePullPolicy")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -22848,7 +23175,7 @@ func (x *Container) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[15] { + if yyq2[16] { if x.SecurityContext == nil { r.EncodeNil() } else { @@ -22858,7 +23185,7 @@ func (x *Container) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq2[15] { + if yyq2[16] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("securityContext")) z.EncSendContainerState(codecSelfer_containerMapValue1234) @@ -22869,31 +23196,6 @@ func (x *Container) CodecEncodeSelf(e *codec1978.Encoder) { } } } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[16] { - yym54 := z.EncBinary() - _ = yym54 - if false { - } else { - r.EncodeBool(bool(x.Stdin)) - } - } else { - r.EncodeBool(false) - } - } else { - if yyq2[16] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("stdin")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym55 := z.EncBinary() - _ = yym55 - if false { - } else { - r.EncodeBool(bool(x.Stdin)) - } - } - } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[17] { @@ -22901,7 +23203,7 @@ func (x *Container) CodecEncodeSelf(e *codec1978.Encoder) { _ = yym57 if false { } else { - r.EncodeBool(bool(x.StdinOnce)) + r.EncodeBool(bool(x.Stdin)) } } else { r.EncodeBool(false) @@ -22909,13 +23211,13 @@ func (x *Container) CodecEncodeSelf(e *codec1978.Encoder) { } else { if yyq2[17] { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("stdinOnce")) + r.EncodeString(codecSelferC_UTF81234, string("stdin")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yym58 := z.EncBinary() _ = yym58 if false { } else { - r.EncodeBool(bool(x.StdinOnce)) + r.EncodeBool(bool(x.Stdin)) } } } @@ -22926,7 +23228,7 @@ func (x *Container) CodecEncodeSelf(e *codec1978.Encoder) { _ = yym60 if false { } else { - r.EncodeBool(bool(x.TTY)) + r.EncodeBool(bool(x.StdinOnce)) } } else { r.EncodeBool(false) @@ -22934,11 +23236,36 @@ func (x *Container) CodecEncodeSelf(e *codec1978.Encoder) { } else { if yyq2[18] { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("tty")) + r.EncodeString(codecSelferC_UTF81234, string("stdinOnce")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yym61 := z.EncBinary() _ = yym61 if false { + } else { + r.EncodeBool(bool(x.StdinOnce)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[19] { + yym63 := z.EncBinary() + _ = yym63 + if false { + } else { + r.EncodeBool(bool(x.TTY)) + } + } else { + r.EncodeBool(false) + } + } else { + if yyq2[19] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("tty")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym64 := z.EncBinary() + _ = yym64 + if false { } else { r.EncodeBool(bool(x.TTY)) } @@ -23165,12 +23492,19 @@ func (x *Container) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { *((*string)(yyv26)) = r.DecodeString() } } + case "terminationMessagePolicy": + if r.TryDecodeAsNil() { + x.TerminationMessagePolicy = "" + } else { + yyv28 := &x.TerminationMessagePolicy + yyv28.CodecDecodeSelf(d) + } case "imagePullPolicy": if r.TryDecodeAsNil() { x.ImagePullPolicy = "" } else { - yyv28 := &x.ImagePullPolicy - yyv28.CodecDecodeSelf(d) + yyv29 := &x.ImagePullPolicy + yyv29.CodecDecodeSelf(d) } case "securityContext": if r.TryDecodeAsNil() { @@ -23187,36 +23521,36 @@ func (x *Container) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Stdin = false } else { - yyv30 := &x.Stdin - yym31 := z.DecBinary() - _ = yym31 + yyv31 := &x.Stdin + yym32 := z.DecBinary() + _ = yym32 if false { } else { - *((*bool)(yyv30)) = r.DecodeBool() + *((*bool)(yyv31)) = r.DecodeBool() } } case "stdinOnce": if r.TryDecodeAsNil() { x.StdinOnce = false } else { - yyv32 := &x.StdinOnce - yym33 := z.DecBinary() - _ = yym33 + yyv33 := &x.StdinOnce + yym34 := z.DecBinary() + _ = yym34 if false { } else { - *((*bool)(yyv32)) = r.DecodeBool() + *((*bool)(yyv33)) = r.DecodeBool() } } case "tty": if r.TryDecodeAsNil() { x.TTY = false } else { - yyv34 := &x.TTY - yym35 := z.DecBinary() - _ = yym35 + yyv35 := &x.TTY + yym36 := z.DecBinary() + _ = yym36 if false { } else { - *((*bool)(yyv34)) = r.DecodeBool() + *((*bool)(yyv35)) = r.DecodeBool() } } default: @@ -23230,16 +23564,16 @@ func (x *Container) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj36 int - var yyb36 bool - var yyhl36 bool = l >= 0 - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + var yyj37 int + var yyb37 bool + var yyhl37 bool = l >= 0 + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l } else { - yyb36 = r.CheckBreak() + yyb37 = r.CheckBreak() } - if yyb36 { + if yyb37 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23247,21 +23581,21 @@ func (x *Container) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Name = "" } else { - yyv37 := &x.Name - yym38 := z.DecBinary() - _ = yym38 + yyv38 := &x.Name + yym39 := z.DecBinary() + _ = yym39 if false { } else { - *((*string)(yyv37)) = r.DecodeString() + *((*string)(yyv38)) = r.DecodeString() } } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l } else { - yyb36 = r.CheckBreak() + yyb37 = r.CheckBreak() } - if yyb36 { + if yyb37 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23269,21 +23603,21 @@ func (x *Container) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Image = "" } else { - yyv39 := &x.Image - yym40 := z.DecBinary() - _ = yym40 + yyv40 := &x.Image + yym41 := z.DecBinary() + _ = yym41 if false { } else { - *((*string)(yyv39)) = r.DecodeString() + *((*string)(yyv40)) = r.DecodeString() } } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l } else { - yyb36 = r.CheckBreak() + yyb37 = r.CheckBreak() } - if yyb36 { + if yyb37 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23291,21 +23625,21 @@ func (x *Container) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Command = nil } else { - yyv41 := &x.Command - yym42 := z.DecBinary() - _ = yym42 + yyv42 := &x.Command + yym43 := z.DecBinary() + _ = yym43 if false { } else { - z.F.DecSliceStringX(yyv41, false, d) + z.F.DecSliceStringX(yyv42, false, d) } } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l } else { - yyb36 = r.CheckBreak() + yyb37 = r.CheckBreak() } - if yyb36 { + if yyb37 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23313,21 +23647,21 @@ func (x *Container) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Args = nil } else { - yyv43 := &x.Args - yym44 := z.DecBinary() - _ = yym44 + yyv44 := &x.Args + yym45 := z.DecBinary() + _ = yym45 if false { } else { - z.F.DecSliceStringX(yyv43, false, d) + z.F.DecSliceStringX(yyv44, false, d) } } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l } else { - yyb36 = r.CheckBreak() + yyb37 = r.CheckBreak() } - if yyb36 { + if yyb37 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23335,21 +23669,21 @@ func (x *Container) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.WorkingDir = "" } else { - yyv45 := &x.WorkingDir - yym46 := z.DecBinary() - _ = yym46 + yyv46 := &x.WorkingDir + yym47 := z.DecBinary() + _ = yym47 if false { } else { - *((*string)(yyv45)) = r.DecodeString() + *((*string)(yyv46)) = r.DecodeString() } } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l } else { - yyb36 = r.CheckBreak() + yyb37 = r.CheckBreak() } - if yyb36 { + if yyb37 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23357,21 +23691,21 @@ func (x *Container) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Ports = nil } else { - yyv47 := &x.Ports - yym48 := z.DecBinary() - _ = yym48 + yyv48 := &x.Ports + yym49 := z.DecBinary() + _ = yym49 if false { } else { - h.decSliceContainerPort((*[]ContainerPort)(yyv47), d) + h.decSliceContainerPort((*[]ContainerPort)(yyv48), d) } } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l } else { - yyb36 = r.CheckBreak() + yyb37 = r.CheckBreak() } - if yyb36 { + if yyb37 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23379,21 +23713,21 @@ func (x *Container) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.EnvFrom = nil } else { - yyv49 := &x.EnvFrom - yym50 := z.DecBinary() - _ = yym50 + yyv50 := &x.EnvFrom + yym51 := z.DecBinary() + _ = yym51 if false { } else { - h.decSliceEnvFromSource((*[]EnvFromSource)(yyv49), d) + h.decSliceEnvFromSource((*[]EnvFromSource)(yyv50), d) } } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l } else { - yyb36 = r.CheckBreak() + yyb37 = r.CheckBreak() } - if yyb36 { + if yyb37 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23401,21 +23735,21 @@ func (x *Container) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Env = nil } else { - yyv51 := &x.Env - yym52 := z.DecBinary() - _ = yym52 + yyv52 := &x.Env + yym53 := z.DecBinary() + _ = yym53 if false { } else { - h.decSliceEnvVar((*[]EnvVar)(yyv51), d) + h.decSliceEnvVar((*[]EnvVar)(yyv52), d) } } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l } else { - yyb36 = r.CheckBreak() + yyb37 = r.CheckBreak() } - if yyb36 { + if yyb37 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23423,16 +23757,16 @@ func (x *Container) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Resources = ResourceRequirements{} } else { - yyv53 := &x.Resources - yyv53.CodecDecodeSelf(d) + yyv54 := &x.Resources + yyv54.CodecDecodeSelf(d) } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l } else { - yyb36 = r.CheckBreak() + yyb37 = r.CheckBreak() } - if yyb36 { + if yyb37 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23440,21 +23774,21 @@ func (x *Container) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.VolumeMounts = nil } else { - yyv54 := &x.VolumeMounts - yym55 := z.DecBinary() - _ = yym55 + yyv55 := &x.VolumeMounts + yym56 := z.DecBinary() + _ = yym56 if false { } else { - h.decSliceVolumeMount((*[]VolumeMount)(yyv54), d) + h.decSliceVolumeMount((*[]VolumeMount)(yyv55), d) } } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l } else { - yyb36 = r.CheckBreak() + yyb37 = r.CheckBreak() } - if yyb36 { + if yyb37 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23469,13 +23803,13 @@ func (x *Container) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.LivenessProbe.CodecDecodeSelf(d) } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l } else { - yyb36 = r.CheckBreak() + yyb37 = r.CheckBreak() } - if yyb36 { + if yyb37 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23490,13 +23824,13 @@ func (x *Container) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.ReadinessProbe.CodecDecodeSelf(d) } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l } else { - yyb36 = r.CheckBreak() + yyb37 = r.CheckBreak() } - if yyb36 { + if yyb37 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23511,13 +23845,13 @@ func (x *Container) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.Lifecycle.CodecDecodeSelf(d) } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l } else { - yyb36 = r.CheckBreak() + yyb37 = r.CheckBreak() } - if yyb36 { + if yyb37 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23525,21 +23859,38 @@ func (x *Container) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.TerminationMessagePath = "" } else { - yyv59 := &x.TerminationMessagePath - yym60 := z.DecBinary() - _ = yym60 + yyv60 := &x.TerminationMessagePath + yym61 := z.DecBinary() + _ = yym61 if false { } else { - *((*string)(yyv59)) = r.DecodeString() + *((*string)(yyv60)) = r.DecodeString() } } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l } else { - yyb36 = r.CheckBreak() + yyb37 = r.CheckBreak() } - if yyb36 { + if yyb37 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.TerminationMessagePolicy = "" + } else { + yyv62 := &x.TerminationMessagePolicy + yyv62.CodecDecodeSelf(d) + } + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l + } else { + yyb37 = r.CheckBreak() + } + if yyb37 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23547,16 +23898,16 @@ func (x *Container) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ImagePullPolicy = "" } else { - yyv61 := &x.ImagePullPolicy - yyv61.CodecDecodeSelf(d) + yyv63 := &x.ImagePullPolicy + yyv63.CodecDecodeSelf(d) } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l } else { - yyb36 = r.CheckBreak() + yyb37 = r.CheckBreak() } - if yyb36 { + if yyb37 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23571,13 +23922,13 @@ func (x *Container) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.SecurityContext.CodecDecodeSelf(d) } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l } else { - yyb36 = r.CheckBreak() + yyb37 = r.CheckBreak() } - if yyb36 { + if yyb37 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -23585,29 +23936,7 @@ func (x *Container) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Stdin = false } else { - yyv63 := &x.Stdin - yym64 := z.DecBinary() - _ = yym64 - if false { - } else { - *((*bool)(yyv63)) = r.DecodeBool() - } - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.StdinOnce = false - } else { - yyv65 := &x.StdinOnce + yyv65 := &x.Stdin yym66 := z.DecBinary() _ = yym66 if false { @@ -23615,21 +23944,21 @@ func (x *Container) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { *((*bool)(yyv65)) = r.DecodeBool() } } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l } else { - yyb36 = r.CheckBreak() + yyb37 = r.CheckBreak() } - if yyb36 { + if yyb37 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.TTY = false + x.StdinOnce = false } else { - yyv67 := &x.TTY + yyv67 := &x.StdinOnce yym68 := z.DecBinary() _ = yym68 if false { @@ -23637,18 +23966,40 @@ func (x *Container) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { *((*bool)(yyv67)) = r.DecodeBool() } } - for { - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l + } else { + yyb37 = r.CheckBreak() + } + if yyb37 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.TTY = false + } else { + yyv69 := &x.TTY + yym70 := z.DecBinary() + _ = yym70 + if false { } else { - yyb36 = r.CheckBreak() + *((*bool)(yyv69)) = r.DecodeBool() } - if yyb36 { + } + for { + yyj37++ + if yyhl37 { + yyb37 = yyj37 > l + } else { + yyb37 = r.CheckBreak() + } + if yyb37 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj36-1, "") + z.DecStructFieldNotFound(yyj37-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -29724,7 +30075,7 @@ func (x *PodSpec) CodecEncodeSelf(e *codec1978.Encoder) { } else { yysep2 := !z.EncBinary() yy2arr2 := z.EncBasicHandle().StructToArray - var yyq2 [18]bool + var yyq2 [19]bool _, _, _ = yysep2, yyq2, yy2arr2 const yyr2 bool = false yyq2[0] = len(x.Volumes) != 0 @@ -29744,9 +30095,10 @@ func (x *PodSpec) CodecEncodeSelf(e *codec1978.Encoder) { yyq2[15] = x.Hostname != "" yyq2[16] = x.Subdomain != "" yyq2[17] = x.Affinity != nil + yyq2[18] = x.SchedulerName != "" var yynn2 int if yyr2 || yy2arr2 { - r.EncodeArrayStart(18) + r.EncodeArrayStart(19) } else { yynn2 = 1 for _, b := range yyq2 { @@ -30229,6 +30581,31 @@ func (x *PodSpec) CodecEncodeSelf(e *codec1978.Encoder) { } } } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[18] { + yym62 := z.EncBinary() + _ = yym62 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.SchedulerName)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[18] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("schedulername")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym63 := z.EncBinary() + _ = yym63 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.SchedulerName)) + } + } + } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { @@ -30502,6 +30879,18 @@ func (x *PodSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } x.Affinity.CodecDecodeSelf(d) } + case "schedulername": + if r.TryDecodeAsNil() { + x.SchedulerName = "" + } else { + yyv36 := &x.SchedulerName + yym37 := z.DecBinary() + _ = yym37 + if false { + } else { + *((*string)(yyv36)) = r.DecodeString() + } + } default: z.DecStructFieldNotFound(-1, yys3) } // end switch yys3 @@ -30513,16 +30902,16 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj36 int - var yyb36 bool - var yyhl36 bool = l >= 0 - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + var yyj38 int + var yyb38 bool + var yyhl38 bool = l >= 0 + yyj38++ + if yyhl38 { + yyb38 = yyj38 > l } else { - yyb36 = r.CheckBreak() + yyb38 = r.CheckBreak() } - if yyb36 { + if yyb38 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30530,21 +30919,21 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Volumes = nil } else { - yyv37 := &x.Volumes - yym38 := z.DecBinary() - _ = yym38 + yyv39 := &x.Volumes + yym40 := z.DecBinary() + _ = yym40 if false { } else { - h.decSliceVolume((*[]Volume)(yyv37), d) + h.decSliceVolume((*[]Volume)(yyv39), d) } } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj38++ + if yyhl38 { + yyb38 = yyj38 > l } else { - yyb36 = r.CheckBreak() + yyb38 = r.CheckBreak() } - if yyb36 { + if yyb38 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30552,21 +30941,21 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Containers = nil } else { - yyv39 := &x.Containers - yym40 := z.DecBinary() - _ = yym40 + yyv41 := &x.Containers + yym42 := z.DecBinary() + _ = yym42 if false { } else { - h.decSliceContainer((*[]Container)(yyv39), d) + h.decSliceContainer((*[]Container)(yyv41), d) } } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj38++ + if yyhl38 { + yyb38 = yyj38 > l } else { - yyb36 = r.CheckBreak() + yyb38 = r.CheckBreak() } - if yyb36 { + if yyb38 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30574,16 +30963,16 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.RestartPolicy = "" } else { - yyv41 := &x.RestartPolicy - yyv41.CodecDecodeSelf(d) + yyv43 := &x.RestartPolicy + yyv43.CodecDecodeSelf(d) } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj38++ + if yyhl38 { + yyb38 = yyj38 > l } else { - yyb36 = r.CheckBreak() + yyb38 = r.CheckBreak() } - if yyb36 { + if yyb38 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30596,20 +30985,20 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.TerminationGracePeriodSeconds == nil { x.TerminationGracePeriodSeconds = new(int64) } - yym43 := z.DecBinary() - _ = yym43 + yym45 := z.DecBinary() + _ = yym45 if false { } else { *((*int64)(x.TerminationGracePeriodSeconds)) = int64(r.DecodeInt(64)) } } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj38++ + if yyhl38 { + yyb38 = yyj38 > l } else { - yyb36 = r.CheckBreak() + yyb38 = r.CheckBreak() } - if yyb36 { + if yyb38 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30622,20 +31011,20 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if x.ActiveDeadlineSeconds == nil { x.ActiveDeadlineSeconds = new(int64) } - yym45 := z.DecBinary() - _ = yym45 + yym47 := z.DecBinary() + _ = yym47 if false { } else { *((*int64)(x.ActiveDeadlineSeconds)) = int64(r.DecodeInt(64)) } } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj38++ + if yyhl38 { + yyb38 = yyj38 > l } else { - yyb36 = r.CheckBreak() + yyb38 = r.CheckBreak() } - if yyb36 { + if yyb38 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30643,16 +31032,16 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.DNSPolicy = "" } else { - yyv46 := &x.DNSPolicy - yyv46.CodecDecodeSelf(d) + yyv48 := &x.DNSPolicy + yyv48.CodecDecodeSelf(d) } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj38++ + if yyhl38 { + yyb38 = yyj38 > l } else { - yyb36 = r.CheckBreak() + yyb38 = r.CheckBreak() } - if yyb36 { + if yyb38 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30660,21 +31049,21 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.NodeSelector = nil } else { - yyv47 := &x.NodeSelector - yym48 := z.DecBinary() - _ = yym48 + yyv49 := &x.NodeSelector + yym50 := z.DecBinary() + _ = yym50 if false { } else { - z.F.DecMapStringStringX(yyv47, false, d) + z.F.DecMapStringStringX(yyv49, false, d) } } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj38++ + if yyhl38 { + yyb38 = yyj38 > l } else { - yyb36 = r.CheckBreak() + yyb38 = r.CheckBreak() } - if yyb36 { + if yyb38 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30682,29 +31071,7 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ServiceAccountName = "" } else { - yyv49 := &x.ServiceAccountName - yym50 := z.DecBinary() - _ = yym50 - if false { - } else { - *((*string)(yyv49)) = r.DecodeString() - } - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.DeprecatedServiceAccount = "" - } else { - yyv51 := &x.DeprecatedServiceAccount + yyv51 := &x.ServiceAccountName yym52 := z.DecBinary() _ = yym52 if false { @@ -30712,21 +31079,21 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { *((*string)(yyv51)) = r.DecodeString() } } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj38++ + if yyhl38 { + yyb38 = yyj38 > l } else { - yyb36 = r.CheckBreak() + yyb38 = r.CheckBreak() } - if yyb36 { + if yyb38 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.NodeName = "" + x.DeprecatedServiceAccount = "" } else { - yyv53 := &x.NodeName + yyv53 := &x.DeprecatedServiceAccount yym54 := z.DecBinary() _ = yym54 if false { @@ -30734,13 +31101,35 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { *((*string)(yyv53)) = r.DecodeString() } } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj38++ + if yyhl38 { + yyb38 = yyj38 > l } else { - yyb36 = r.CheckBreak() + yyb38 = r.CheckBreak() } - if yyb36 { + if yyb38 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.NodeName = "" + } else { + yyv55 := &x.NodeName + yym56 := z.DecBinary() + _ = yym56 + if false { + } else { + *((*string)(yyv55)) = r.DecodeString() + } + } + yyj38++ + if yyhl38 { + yyb38 = yyj38 > l + } else { + yyb38 = r.CheckBreak() + } + if yyb38 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30748,29 +31137,7 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.HostNetwork = false } else { - yyv55 := &x.HostNetwork - yym56 := z.DecBinary() - _ = yym56 - if false { - } else { - *((*bool)(yyv55)) = r.DecodeBool() - } - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.HostPID = false - } else { - yyv57 := &x.HostPID + yyv57 := &x.HostNetwork yym58 := z.DecBinary() _ = yym58 if false { @@ -30778,21 +31145,21 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { *((*bool)(yyv57)) = r.DecodeBool() } } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj38++ + if yyhl38 { + yyb38 = yyj38 > l } else { - yyb36 = r.CheckBreak() + yyb38 = r.CheckBreak() } - if yyb36 { + if yyb38 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.HostIPC = false + x.HostPID = false } else { - yyv59 := &x.HostIPC + yyv59 := &x.HostPID yym60 := z.DecBinary() _ = yym60 if false { @@ -30800,13 +31167,35 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { *((*bool)(yyv59)) = r.DecodeBool() } } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj38++ + if yyhl38 { + yyb38 = yyj38 > l } else { - yyb36 = r.CheckBreak() + yyb38 = r.CheckBreak() } - if yyb36 { + if yyb38 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.HostIPC = false + } else { + yyv61 := &x.HostIPC + yym62 := z.DecBinary() + _ = yym62 + if false { + } else { + *((*bool)(yyv61)) = r.DecodeBool() + } + } + yyj38++ + if yyhl38 { + yyb38 = yyj38 > l + } else { + yyb38 = r.CheckBreak() + } + if yyb38 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30821,13 +31210,13 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.SecurityContext.CodecDecodeSelf(d) } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj38++ + if yyhl38 { + yyb38 = yyj38 > l } else { - yyb36 = r.CheckBreak() + yyb38 = r.CheckBreak() } - if yyb36 { + if yyb38 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30835,21 +31224,21 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ImagePullSecrets = nil } else { - yyv62 := &x.ImagePullSecrets - yym63 := z.DecBinary() - _ = yym63 + yyv64 := &x.ImagePullSecrets + yym65 := z.DecBinary() + _ = yym65 if false { } else { - h.decSliceLocalObjectReference((*[]LocalObjectReference)(yyv62), d) + h.decSliceLocalObjectReference((*[]LocalObjectReference)(yyv64), d) } } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj38++ + if yyhl38 { + yyb38 = yyj38 > l } else { - yyb36 = r.CheckBreak() + yyb38 = r.CheckBreak() } - if yyb36 { + if yyb38 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30857,29 +31246,7 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Hostname = "" } else { - yyv64 := &x.Hostname - yym65 := z.DecBinary() - _ = yym65 - if false { - } else { - *((*string)(yyv64)) = r.DecodeString() - } - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Subdomain = "" - } else { - yyv66 := &x.Subdomain + yyv66 := &x.Hostname yym67 := z.DecBinary() _ = yym67 if false { @@ -30887,13 +31254,35 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { *((*string)(yyv66)) = r.DecodeString() } } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj38++ + if yyhl38 { + yyb38 = yyj38 > l } else { - yyb36 = r.CheckBreak() + yyb38 = r.CheckBreak() } - if yyb36 { + if yyb38 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Subdomain = "" + } else { + yyv68 := &x.Subdomain + yym69 := z.DecBinary() + _ = yym69 + if false { + } else { + *((*string)(yyv68)) = r.DecodeString() + } + } + yyj38++ + if yyhl38 { + yyb38 = yyj38 > l + } else { + yyb38 = r.CheckBreak() + } + if yyb38 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -30908,18 +31297,40 @@ func (x *PodSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } x.Affinity.CodecDecodeSelf(d) } - for { - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l + yyj38++ + if yyhl38 { + yyb38 = yyj38 > l + } else { + yyb38 = r.CheckBreak() + } + if yyb38 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.SchedulerName = "" + } else { + yyv71 := &x.SchedulerName + yym72 := z.DecBinary() + _ = yym72 + if false { } else { - yyb36 = r.CheckBreak() + *((*string)(yyv71)) = r.DecodeString() } - if yyb36 { + } + for { + yyj38++ + if yyhl38 { + yyb38 = yyj38 > l + } else { + yyb38 = r.CheckBreak() + } + if yyb38 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj36-1, "") + z.DecStructFieldNotFound(yyj38-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -32190,7 +32601,13 @@ func (x *PodStatusResult) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -32200,7 +32617,13 @@ func (x *PodStatusResult) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -32307,17 +32730,23 @@ func (x *PodStatusResult) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "status": if r.TryDecodeAsNil() { x.Status = PodStatus{} } else { - yyv9 := &x.Status - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Status + yyv10.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -32330,16 +32759,16 @@ func (x *PodStatusResult) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + var yyj11 int + var yyb11 bool + var yyhl11 bool = l >= 0 + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -32347,21 +32776,21 @@ func (x *PodStatusResult) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv11 := &x.Kind - yym12 := z.DecBinary() - _ = yym12 + yyv12 := &x.Kind + yym13 := z.DecBinary() + _ = yym13 if false { } else { - *((*string)(yyv11)) = r.DecodeString() + *((*string)(yyv12)) = r.DecodeString() } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -32369,38 +32798,44 @@ func (x *PodStatusResult) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv13 := &x.APIVersion - yym14 := z.DecBinary() - _ = yym14 + yyv14 := &x.APIVersion + yym15 := z.DecBinary() + _ = yym15 if false { } else { - *((*string)(yyv13)) = r.DecodeString() + *((*string)(yyv14)) = r.DecodeString() } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv15 := &x.ObjectMeta - yyv15.CodecDecodeSelf(d) + yyv16 := &x.ObjectMeta + yym17 := z.DecBinary() + _ = yym17 + if false { + } else if z.HasExtensions() && z.DecExt(yyv16) { + } else { + z.DecFallback(yyv16, false) + } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -32408,21 +32843,21 @@ func (x *PodStatusResult) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Status = PodStatus{} } else { - yyv16 := &x.Status - yyv16.CodecDecodeSelf(d) + yyv18 := &x.Status + yyv18.CodecDecodeSelf(d) } for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj10-1, "") + z.DecStructFieldNotFound(yyj11-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -32516,7 +32951,13 @@ func (x *Pod) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -32526,7 +32967,13 @@ func (x *Pod) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -32650,24 +33097,30 @@ func (x *Pod) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = PodSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = PodStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -32680,16 +33133,16 @@ func (x *Pod) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -32697,21 +33150,21 @@ func (x *Pod) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -32719,38 +33172,44 @@ func (x *Pod) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -32758,16 +33217,16 @@ func (x *Pod) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = PodSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -32775,21 +33234,21 @@ func (x *Pod) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = PodStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -33198,7 +33657,13 @@ func (x *PodTemplateSpec) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[0] { yy4 := &x.ObjectMeta - yy4.CodecEncodeSelf(e) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else if z.HasExtensions() && z.EncExt(yy4) { + } else { + z.EncFallback(yy4) + } } else { r.EncodeNil() } @@ -33208,7 +33673,13 @@ func (x *PodTemplateSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy6 := &x.ObjectMeta - yy6.CodecEncodeSelf(e) + yym7 := z.EncBinary() + _ = yym7 + if false { + } else if z.HasExtensions() && z.EncExt(yy6) { + } else { + z.EncFallback(yy6) + } } } if yyr2 || yy2arr2 { @@ -33291,17 +33762,23 @@ func (x *PodTemplateSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { switch yys3 { case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv4 := &x.ObjectMeta - yyv4.CodecDecodeSelf(d) + yym5 := z.DecBinary() + _ = yym5 + if false { + } else if z.HasExtensions() && z.DecExt(yyv4) { + } else { + z.DecFallback(yyv4, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = PodSpec{} } else { - yyv5 := &x.Spec - yyv5.CodecDecodeSelf(d) + yyv6 := &x.Spec + yyv6.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -33314,33 +33791,39 @@ func (x *PodTemplateSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj6 int - var yyb6 bool - var yyhl6 bool = l >= 0 - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l + var yyj7 int + var yyb7 bool + var yyhl7 bool = l >= 0 + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb6 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb6 { + if yyb7 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv7 := &x.ObjectMeta - yyv7.CodecDecodeSelf(d) + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb6 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb6 { + if yyb7 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -33348,21 +33831,21 @@ func (x *PodTemplateSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Spec = PodSpec{} } else { - yyv8 := &x.Spec - yyv8.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } for { - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb6 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb6 { + if yyb7 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj6-1, "") + z.DecStructFieldNotFound(yyj7-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -33455,7 +33938,13 @@ func (x *PodTemplate) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -33465,7 +33954,13 @@ func (x *PodTemplate) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -33572,17 +34067,23 @@ func (x *PodTemplate) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "template": if r.TryDecodeAsNil() { x.Template = PodTemplateSpec{} } else { - yyv9 := &x.Template - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Template + yyv10.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -33595,16 +34096,16 @@ func (x *PodTemplate) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + var yyj11 int + var yyb11 bool + var yyhl11 bool = l >= 0 + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -33612,21 +34113,21 @@ func (x *PodTemplate) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv11 := &x.Kind - yym12 := z.DecBinary() - _ = yym12 + yyv12 := &x.Kind + yym13 := z.DecBinary() + _ = yym13 if false { } else { - *((*string)(yyv11)) = r.DecodeString() + *((*string)(yyv12)) = r.DecodeString() } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -33634,38 +34135,44 @@ func (x *PodTemplate) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv13 := &x.APIVersion - yym14 := z.DecBinary() - _ = yym14 + yyv14 := &x.APIVersion + yym15 := z.DecBinary() + _ = yym15 if false { } else { - *((*string)(yyv13)) = r.DecodeString() + *((*string)(yyv14)) = r.DecodeString() } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv15 := &x.ObjectMeta - yyv15.CodecDecodeSelf(d) + yyv16 := &x.ObjectMeta + yym17 := z.DecBinary() + _ = yym17 + if false { + } else if z.HasExtensions() && z.DecExt(yyv16) { + } else { + z.DecFallback(yyv16, false) + } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -33673,21 +34180,21 @@ func (x *PodTemplate) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Template = PodTemplateSpec{} } else { - yyv16 := &x.Template - yyv16.CodecDecodeSelf(d) + yyv18 := &x.Template + yyv18.CodecDecodeSelf(d) } for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj10-1, "") + z.DecStructFieldNotFound(yyj11-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -35429,7 +35936,13 @@ func (x *ReplicationController) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -35439,7 +35952,13 @@ func (x *ReplicationController) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -35563,24 +36082,30 @@ func (x *ReplicationController) codecDecodeSelfFromMap(l int, d *codec1978.Decod } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = ReplicationControllerSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = ReplicationControllerStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -35593,16 +36118,16 @@ func (x *ReplicationController) codecDecodeSelfFromArray(l int, d *codec1978.Dec var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35610,21 +36135,21 @@ func (x *ReplicationController) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35632,38 +36157,44 @@ func (x *ReplicationController) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35671,16 +36202,16 @@ func (x *ReplicationController) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.Spec = ReplicationControllerSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -35688,21 +36219,21 @@ func (x *ReplicationController) codecDecodeSelfFromArray(l int, d *codec1978.Dec if r.TryDecodeAsNil() { x.Status = ReplicationControllerStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -37938,7 +38469,13 @@ func (x *Service) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -37948,7 +38485,13 @@ func (x *Service) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -38072,24 +38615,30 @@ func (x *Service) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = ServiceSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = ServiceStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -38102,16 +38651,16 @@ func (x *Service) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -38119,21 +38668,21 @@ func (x *Service) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -38141,38 +38690,44 @@ func (x *Service) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -38180,16 +38735,16 @@ func (x *Service) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = ServiceSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -38197,21 +38752,21 @@ func (x *Service) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = ServiceStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -38673,7 +39228,13 @@ func (x *ServiceAccount) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -38683,7 +39244,13 @@ func (x *ServiceAccount) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -38839,33 +39406,39 @@ func (x *ServiceAccount) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "secrets": if r.TryDecodeAsNil() { x.Secrets = nil } else { - yyv9 := &x.Secrets - yym10 := z.DecBinary() - _ = yym10 + yyv10 := &x.Secrets + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decSliceObjectReference((*[]ObjectReference)(yyv9), d) + h.decSliceObjectReference((*[]ObjectReference)(yyv10), d) } } case "imagePullSecrets": if r.TryDecodeAsNil() { x.ImagePullSecrets = nil } else { - yyv11 := &x.ImagePullSecrets - yym12 := z.DecBinary() - _ = yym12 + yyv12 := &x.ImagePullSecrets + yym13 := z.DecBinary() + _ = yym13 if false { } else { - h.decSliceLocalObjectReference((*[]LocalObjectReference)(yyv11), d) + h.decSliceLocalObjectReference((*[]LocalObjectReference)(yyv12), d) } } default: @@ -38879,16 +39452,16 @@ func (x *ServiceAccount) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj13 int - var yyb13 bool - var yyhl13 bool = l >= 0 - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + var yyj14 int + var yyb14 bool + var yyhl14 bool = l >= 0 + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -38896,21 +39469,21 @@ func (x *ServiceAccount) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv14 := &x.Kind - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.Kind + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -38918,38 +39491,44 @@ func (x *ServiceAccount) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv16 := &x.APIVersion - yym17 := z.DecBinary() - _ = yym17 + yyv17 := &x.APIVersion + yym18 := z.DecBinary() + _ = yym18 if false { } else { - *((*string)(yyv16)) = r.DecodeString() + *((*string)(yyv17)) = r.DecodeString() } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv18 := &x.ObjectMeta - yyv18.CodecDecodeSelf(d) + yyv19 := &x.ObjectMeta + yym20 := z.DecBinary() + _ = yym20 + if false { + } else if z.HasExtensions() && z.DecExt(yyv19) { + } else { + z.DecFallback(yyv19, false) + } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -38957,21 +39536,21 @@ func (x *ServiceAccount) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Secrets = nil } else { - yyv19 := &x.Secrets - yym20 := z.DecBinary() - _ = yym20 + yyv21 := &x.Secrets + yym22 := z.DecBinary() + _ = yym22 if false { } else { - h.decSliceObjectReference((*[]ObjectReference)(yyv19), d) + h.decSliceObjectReference((*[]ObjectReference)(yyv21), d) } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -38979,26 +39558,26 @@ func (x *ServiceAccount) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ImagePullSecrets = nil } else { - yyv21 := &x.ImagePullSecrets - yym22 := z.DecBinary() - _ = yym22 + yyv23 := &x.ImagePullSecrets + yym24 := z.DecBinary() + _ = yym24 if false { } else { - h.decSliceLocalObjectReference((*[]LocalObjectReference)(yyv21), d) + h.decSliceLocalObjectReference((*[]LocalObjectReference)(yyv23), d) } } for { - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj13-1, "") + z.DecStructFieldNotFound(yyj14-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -39458,7 +40037,13 @@ func (x *Endpoints) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -39468,7 +40053,13 @@ func (x *Endpoints) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -39585,21 +40176,27 @@ func (x *Endpoints) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "subsets": if r.TryDecodeAsNil() { x.Subsets = nil } else { - yyv9 := &x.Subsets - yym10 := z.DecBinary() - _ = yym10 + yyv10 := &x.Subsets + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decSliceEndpointSubset((*[]EndpointSubset)(yyv9), d) + h.decSliceEndpointSubset((*[]EndpointSubset)(yyv10), d) } } default: @@ -39613,16 +40210,16 @@ func (x *Endpoints) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39630,21 +40227,21 @@ func (x *Endpoints) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39652,38 +40249,44 @@ func (x *Endpoints) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -39691,26 +40294,26 @@ func (x *Endpoints) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Subsets = nil } else { - yyv17 := &x.Subsets - yym18 := z.DecBinary() - _ = yym18 + yyv19 := &x.Subsets + yym20 := z.DecBinary() + _ = yym20 if false { } else { - h.decSliceEndpointSubset((*[]EndpointSubset)(yyv17), d) + h.decSliceEndpointSubset((*[]EndpointSubset)(yyv19), d) } } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -45204,7 +45807,13 @@ func (x *Node) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -45214,7 +45823,13 @@ func (x *Node) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -45338,24 +45953,30 @@ func (x *Node) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = NodeSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = NodeStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -45368,16 +45989,16 @@ func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45385,21 +46006,21 @@ func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45407,38 +46028,44 @@ func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45446,16 +46073,16 @@ func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = NodeSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -45463,21 +46090,21 @@ func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = NodeStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -46341,7 +46968,13 @@ func (x *Namespace) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -46351,7 +46984,13 @@ func (x *Namespace) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -46475,24 +47114,30 @@ func (x *Namespace) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = NamespaceSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = NamespaceStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -46505,16 +47150,16 @@ func (x *Namespace) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -46522,21 +47167,21 @@ func (x *Namespace) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -46544,38 +47189,44 @@ func (x *Namespace) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -46583,16 +47234,16 @@ func (x *Namespace) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = NamespaceSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -46600,21 +47251,21 @@ func (x *Namespace) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = NamespaceStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -47074,7 +47725,13 @@ func (x *Binding) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -47084,7 +47741,13 @@ func (x *Binding) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -47185,17 +47848,23 @@ func (x *Binding) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "target": if r.TryDecodeAsNil() { x.Target = ObjectReference{} } else { - yyv9 := &x.Target - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Target + yyv10.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -47208,16 +47877,16 @@ func (x *Binding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + var yyj11 int + var yyb11 bool + var yyhl11 bool = l >= 0 + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -47225,21 +47894,21 @@ func (x *Binding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv11 := &x.Kind - yym12 := z.DecBinary() - _ = yym12 + yyv12 := &x.Kind + yym13 := z.DecBinary() + _ = yym13 if false { } else { - *((*string)(yyv11)) = r.DecodeString() + *((*string)(yyv12)) = r.DecodeString() } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -47247,38 +47916,44 @@ func (x *Binding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv13 := &x.APIVersion - yym14 := z.DecBinary() - _ = yym14 + yyv14 := &x.APIVersion + yym15 := z.DecBinary() + _ = yym15 if false { } else { - *((*string)(yyv13)) = r.DecodeString() + *((*string)(yyv14)) = r.DecodeString() } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv15 := &x.ObjectMeta - yyv15.CodecDecodeSelf(d) + yyv16 := &x.ObjectMeta + yym17 := z.DecBinary() + _ = yym17 + if false { + } else if z.HasExtensions() && z.DecExt(yyv16) { + } else { + z.DecFallback(yyv16, false) + } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -47286,21 +47961,21 @@ func (x *Binding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Target = ObjectReference{} } else { - yyv16 := &x.Target - yyv16.CodecDecodeSelf(d) + yyv18 := &x.Target + yyv18.CodecDecodeSelf(d) } for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj10-1, "") + z.DecStructFieldNotFound(yyj11-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -50474,6 +51149,315 @@ func (x *PodExecOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } +func (x *PodPortForwardOptions) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [3]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = len(x.Ports) != 0 + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(3) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + if x.Ports == nil { + r.EncodeNil() + } else { + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + z.F.EncSliceInt32V(x.Ports, false, e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("ports")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Ports == nil { + r.EncodeNil() + } else { + yym11 := z.EncBinary() + _ = yym11 + if false { + } else { + z.F.EncSliceInt32V(x.Ports, false, e) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *PodPortForwardOptions) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *PodPortForwardOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "ports": + if r.TryDecodeAsNil() { + x.Ports = nil + } else { + yyv8 := &x.Ports + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + z.F.DecSliceInt32X(yyv8, false, d) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *PodPortForwardOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj10 int + var yyb10 bool + var yyhl10 bool = l >= 0 + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv11 := &x.Kind + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*string)(yyv11)) = r.DecodeString() + } + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv13 := &x.APIVersion + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Ports = nil + } else { + yyv15 := &x.Ports + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + z.F.DecSliceInt32X(yyv15, false, d) + } + } + for { + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj10-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + func (x *PodProxyOptions) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) @@ -52719,13 +53703,25 @@ func (x *Event) CodecEncodeSelf(e *codec1978.Encoder) { if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) @@ -53016,105 +54012,111 @@ func (x *Event) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "involvedObject": if r.TryDecodeAsNil() { x.InvolvedObject = ObjectReference{} } else { - yyv9 := &x.InvolvedObject - yyv9.CodecDecodeSelf(d) + yyv10 := &x.InvolvedObject + yyv10.CodecDecodeSelf(d) } case "reason": if r.TryDecodeAsNil() { x.Reason = "" } else { - yyv10 := &x.Reason - yym11 := z.DecBinary() - _ = yym11 + yyv11 := &x.Reason + yym12 := z.DecBinary() + _ = yym12 if false { } else { - *((*string)(yyv10)) = r.DecodeString() + *((*string)(yyv11)) = r.DecodeString() } } case "message": if r.TryDecodeAsNil() { x.Message = "" } else { - yyv12 := &x.Message - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Message + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } case "source": if r.TryDecodeAsNil() { x.Source = EventSource{} } else { - yyv14 := &x.Source - yyv14.CodecDecodeSelf(d) + yyv15 := &x.Source + yyv15.CodecDecodeSelf(d) } case "firstTimestamp": if r.TryDecodeAsNil() { x.FirstTimestamp = pkg2_v1.Time{} } else { - yyv15 := &x.FirstTimestamp - yym16 := z.DecBinary() - _ = yym16 + yyv16 := &x.FirstTimestamp + yym17 := z.DecBinary() + _ = yym17 if false { - } else if z.HasExtensions() && z.DecExt(yyv15) { - } else if yym16 { - z.DecBinaryUnmarshal(yyv15) - } else if !yym16 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv15) + } else if z.HasExtensions() && z.DecExt(yyv16) { + } else if yym17 { + z.DecBinaryUnmarshal(yyv16) + } else if !yym17 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv16) } else { - z.DecFallback(yyv15, false) + z.DecFallback(yyv16, false) } } case "lastTimestamp": if r.TryDecodeAsNil() { x.LastTimestamp = pkg2_v1.Time{} } else { - yyv17 := &x.LastTimestamp - yym18 := z.DecBinary() - _ = yym18 + yyv18 := &x.LastTimestamp + yym19 := z.DecBinary() + _ = yym19 if false { - } else if z.HasExtensions() && z.DecExt(yyv17) { - } else if yym18 { - z.DecBinaryUnmarshal(yyv17) - } else if !yym18 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv17) + } else if z.HasExtensions() && z.DecExt(yyv18) { + } else if yym19 { + z.DecBinaryUnmarshal(yyv18) + } else if !yym19 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv18) } else { - z.DecFallback(yyv17, false) + z.DecFallback(yyv18, false) } } case "count": if r.TryDecodeAsNil() { x.Count = 0 } else { - yyv19 := &x.Count - yym20 := z.DecBinary() - _ = yym20 + yyv20 := &x.Count + yym21 := z.DecBinary() + _ = yym21 if false { } else { - *((*int32)(yyv19)) = int32(r.DecodeInt(32)) + *((*int32)(yyv20)) = int32(r.DecodeInt(32)) } } case "type": if r.TryDecodeAsNil() { x.Type = "" } else { - yyv21 := &x.Type - yym22 := z.DecBinary() - _ = yym22 + yyv22 := &x.Type + yym23 := z.DecBinary() + _ = yym23 if false { } else { - *((*string)(yyv21)) = r.DecodeString() + *((*string)(yyv22)) = r.DecodeString() } } default: @@ -53128,16 +54130,16 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj23 int - var yyb23 bool - var yyhl23 bool = l >= 0 - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l + var yyj24 int + var yyb24 bool + var yyhl24 bool = l >= 0 + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb23 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb23 { + if yyb24 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -53145,21 +54147,21 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv24 := &x.Kind - yym25 := z.DecBinary() - _ = yym25 + yyv25 := &x.Kind + yym26 := z.DecBinary() + _ = yym26 if false { } else { - *((*string)(yyv24)) = r.DecodeString() + *((*string)(yyv25)) = r.DecodeString() } } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb23 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb23 { + if yyb24 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -53167,38 +54169,44 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv26 := &x.APIVersion - yym27 := z.DecBinary() - _ = yym27 + yyv27 := &x.APIVersion + yym28 := z.DecBinary() + _ = yym28 if false { } else { - *((*string)(yyv26)) = r.DecodeString() + *((*string)(yyv27)) = r.DecodeString() } } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb23 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb23 { + if yyb24 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv28 := &x.ObjectMeta - yyv28.CodecDecodeSelf(d) + yyv29 := &x.ObjectMeta + yym30 := z.DecBinary() + _ = yym30 + if false { + } else if z.HasExtensions() && z.DecExt(yyv29) { + } else { + z.DecFallback(yyv29, false) + } } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb23 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb23 { + if yyb24 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -53206,16 +54214,16 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.InvolvedObject = ObjectReference{} } else { - yyv29 := &x.InvolvedObject - yyv29.CodecDecodeSelf(d) + yyv31 := &x.InvolvedObject + yyv31.CodecDecodeSelf(d) } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb23 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb23 { + if yyb24 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -53223,29 +54231,7 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Reason = "" } else { - yyv30 := &x.Reason - yym31 := z.DecBinary() - _ = yym31 - if false { - } else { - *((*string)(yyv30)) = r.DecodeString() - } - } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l - } else { - yyb23 = r.CheckBreak() - } - if yyb23 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Message = "" - } else { - yyv32 := &x.Message + yyv32 := &x.Reason yym33 := z.DecBinary() _ = yym33 if false { @@ -53253,13 +54239,35 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { *((*string)(yyv32)) = r.DecodeString() } } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb23 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb23 { + if yyb24 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Message = "" + } else { + yyv34 := &x.Message + yym35 := z.DecBinary() + _ = yym35 + if false { + } else { + *((*string)(yyv34)) = r.DecodeString() + } + } + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l + } else { + yyb24 = r.CheckBreak() + } + if yyb24 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -53267,16 +54275,16 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Source = EventSource{} } else { - yyv34 := &x.Source - yyv34.CodecDecodeSelf(d) + yyv36 := &x.Source + yyv36.CodecDecodeSelf(d) } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb23 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb23 { + if yyb24 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -53284,34 +54292,7 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.FirstTimestamp = pkg2_v1.Time{} } else { - yyv35 := &x.FirstTimestamp - yym36 := z.DecBinary() - _ = yym36 - if false { - } else if z.HasExtensions() && z.DecExt(yyv35) { - } else if yym36 { - z.DecBinaryUnmarshal(yyv35) - } else if !yym36 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv35) - } else { - z.DecFallback(yyv35, false) - } - } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l - } else { - yyb23 = r.CheckBreak() - } - if yyb23 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.LastTimestamp = pkg2_v1.Time{} - } else { - yyv37 := &x.LastTimestamp + yyv37 := &x.FirstTimestamp yym38 := z.DecBinary() _ = yym38 if false { @@ -53324,13 +54305,40 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { z.DecFallback(yyv37, false) } } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb23 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb23 { + if yyb24 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.LastTimestamp = pkg2_v1.Time{} + } else { + yyv39 := &x.LastTimestamp + yym40 := z.DecBinary() + _ = yym40 + if false { + } else if z.HasExtensions() && z.DecExt(yyv39) { + } else if yym40 { + z.DecBinaryUnmarshal(yyv39) + } else if !yym40 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv39) + } else { + z.DecFallback(yyv39, false) + } + } + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l + } else { + yyb24 = r.CheckBreak() + } + if yyb24 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -53338,21 +54346,21 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Count = 0 } else { - yyv39 := &x.Count - yym40 := z.DecBinary() - _ = yym40 + yyv41 := &x.Count + yym42 := z.DecBinary() + _ = yym42 if false { } else { - *((*int32)(yyv39)) = int32(r.DecodeInt(32)) + *((*int32)(yyv41)) = int32(r.DecodeInt(32)) } } - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb23 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb23 { + if yyb24 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -53360,26 +54368,26 @@ func (x *Event) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Type = "" } else { - yyv41 := &x.Type - yym42 := z.DecBinary() - _ = yym42 + yyv43 := &x.Type + yym44 := z.DecBinary() + _ = yym44 if false { } else { - *((*string)(yyv41)) = r.DecodeString() + *((*string)(yyv43)) = r.DecodeString() } } for { - yyj23++ - if yyhl23 { - yyb23 = yyj23 > l + yyj24++ + if yyhl24 { + yyb24 = yyj24 > l } else { - yyb23 = r.CheckBreak() + yyb24 = r.CheckBreak() } - if yyb23 { + if yyb24 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj23-1, "") + z.DecStructFieldNotFound(yyj24-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -54817,7 +55825,13 @@ func (x *LimitRange) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -54827,7 +55841,13 @@ func (x *LimitRange) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -54934,17 +55954,23 @@ func (x *LimitRange) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = LimitRangeSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -54957,16 +55983,16 @@ func (x *LimitRange) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + var yyj11 int + var yyb11 bool + var yyhl11 bool = l >= 0 + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -54974,21 +56000,21 @@ func (x *LimitRange) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv11 := &x.Kind - yym12 := z.DecBinary() - _ = yym12 + yyv12 := &x.Kind + yym13 := z.DecBinary() + _ = yym13 if false { } else { - *((*string)(yyv11)) = r.DecodeString() + *((*string)(yyv12)) = r.DecodeString() } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -54996,38 +56022,44 @@ func (x *LimitRange) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv13 := &x.APIVersion - yym14 := z.DecBinary() - _ = yym14 + yyv14 := &x.APIVersion + yym15 := z.DecBinary() + _ = yym15 if false { } else { - *((*string)(yyv13)) = r.DecodeString() + *((*string)(yyv14)) = r.DecodeString() } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv15 := &x.ObjectMeta - yyv15.CodecDecodeSelf(d) + yyv16 := &x.ObjectMeta + yym17 := z.DecBinary() + _ = yym17 + if false { + } else if z.HasExtensions() && z.DecExt(yyv16) { + } else { + z.DecFallback(yyv16, false) + } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -55035,21 +56067,21 @@ func (x *LimitRange) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = LimitRangeSpec{} } else { - yyv16 := &x.Spec - yyv16.CodecDecodeSelf(d) + yyv18 := &x.Spec + yyv18.CodecDecodeSelf(d) } for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj10-1, "") + z.DecStructFieldNotFound(yyj11-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -55991,7 +57023,13 @@ func (x *ResourceQuota) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -56001,7 +57039,13 @@ func (x *ResourceQuota) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -56125,24 +57169,30 @@ func (x *ResourceQuota) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = ResourceQuotaSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = ResourceQuotaStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -56155,16 +57205,16 @@ func (x *ResourceQuota) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -56172,21 +57222,21 @@ func (x *ResourceQuota) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -56194,38 +57244,44 @@ func (x *ResourceQuota) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -56233,16 +57289,16 @@ func (x *ResourceQuota) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = ResourceQuotaSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -56250,21 +57306,21 @@ func (x *ResourceQuota) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = ResourceQuotaStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -56727,7 +57783,13 @@ func (x *Secret) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -56737,7 +57799,13 @@ func (x *Secret) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -56908,41 +57976,47 @@ func (x *Secret) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "data": if r.TryDecodeAsNil() { x.Data = nil } else { - yyv9 := &x.Data - yym10 := z.DecBinary() - _ = yym10 + yyv10 := &x.Data + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decMapstringSliceuint8((*map[string][]uint8)(yyv9), d) + h.decMapstringSliceuint8((*map[string][]uint8)(yyv10), d) } } case "stringData": if r.TryDecodeAsNil() { x.StringData = nil } else { - yyv11 := &x.StringData - yym12 := z.DecBinary() - _ = yym12 + yyv12 := &x.StringData + yym13 := z.DecBinary() + _ = yym13 if false { } else { - z.F.DecMapStringStringX(yyv11, false, d) + z.F.DecMapStringStringX(yyv12, false, d) } } case "type": if r.TryDecodeAsNil() { x.Type = "" } else { - yyv13 := &x.Type - yyv13.CodecDecodeSelf(d) + yyv14 := &x.Type + yyv14.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -56955,16 +58029,16 @@ func (x *Secret) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj14 int - var yyb14 bool - var yyhl14 bool = l >= 0 - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l + var yyj15 int + var yyb15 bool + var yyhl15 bool = l >= 0 + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l } else { - yyb14 = r.CheckBreak() + yyb15 = r.CheckBreak() } - if yyb14 { + if yyb15 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -56972,21 +58046,21 @@ func (x *Secret) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv15 := &x.Kind - yym16 := z.DecBinary() - _ = yym16 + yyv16 := &x.Kind + yym17 := z.DecBinary() + _ = yym17 if false { } else { - *((*string)(yyv15)) = r.DecodeString() + *((*string)(yyv16)) = r.DecodeString() } } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l } else { - yyb14 = r.CheckBreak() + yyb15 = r.CheckBreak() } - if yyb14 { + if yyb15 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -56994,38 +58068,44 @@ func (x *Secret) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv17 := &x.APIVersion - yym18 := z.DecBinary() - _ = yym18 + yyv18 := &x.APIVersion + yym19 := z.DecBinary() + _ = yym19 if false { } else { - *((*string)(yyv17)) = r.DecodeString() + *((*string)(yyv18)) = r.DecodeString() } } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l } else { - yyb14 = r.CheckBreak() + yyb15 = r.CheckBreak() } - if yyb14 { + if yyb15 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv19 := &x.ObjectMeta - yyv19.CodecDecodeSelf(d) + yyv20 := &x.ObjectMeta + yym21 := z.DecBinary() + _ = yym21 + if false { + } else if z.HasExtensions() && z.DecExt(yyv20) { + } else { + z.DecFallback(yyv20, false) + } } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l } else { - yyb14 = r.CheckBreak() + yyb15 = r.CheckBreak() } - if yyb14 { + if yyb15 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -57033,21 +58113,21 @@ func (x *Secret) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Data = nil } else { - yyv20 := &x.Data - yym21 := z.DecBinary() - _ = yym21 + yyv22 := &x.Data + yym23 := z.DecBinary() + _ = yym23 if false { } else { - h.decMapstringSliceuint8((*map[string][]uint8)(yyv20), d) + h.decMapstringSliceuint8((*map[string][]uint8)(yyv22), d) } } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l } else { - yyb14 = r.CheckBreak() + yyb15 = r.CheckBreak() } - if yyb14 { + if yyb15 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -57055,21 +58135,21 @@ func (x *Secret) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.StringData = nil } else { - yyv22 := &x.StringData - yym23 := z.DecBinary() - _ = yym23 + yyv24 := &x.StringData + yym25 := z.DecBinary() + _ = yym25 if false { } else { - z.F.DecMapStringStringX(yyv22, false, d) + z.F.DecMapStringStringX(yyv24, false, d) } } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l } else { - yyb14 = r.CheckBreak() + yyb15 = r.CheckBreak() } - if yyb14 { + if yyb15 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -57077,21 +58157,21 @@ func (x *Secret) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Type = "" } else { - yyv24 := &x.Type - yyv24.CodecDecodeSelf(d) + yyv26 := &x.Type + yyv26.CodecDecodeSelf(d) } for { - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l + yyj15++ + if yyhl15 { + yyb15 = yyj15 > l } else { - yyb14 = r.CheckBreak() + yyb15 = r.CheckBreak() } - if yyb14 { + if yyb15 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj14-1, "") + z.DecStructFieldNotFound(yyj15-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -57578,7 +58658,13 @@ func (x *ConfigMap) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -57588,7 +58674,13 @@ func (x *ConfigMap) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -57711,21 +58803,27 @@ func (x *ConfigMap) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "data": if r.TryDecodeAsNil() { x.Data = nil } else { - yyv9 := &x.Data - yym10 := z.DecBinary() - _ = yym10 + yyv10 := &x.Data + yym11 := z.DecBinary() + _ = yym11 if false { } else { - z.F.DecMapStringStringX(yyv9, false, d) + z.F.DecMapStringStringX(yyv10, false, d) } } default: @@ -57739,16 +58837,16 @@ func (x *ConfigMap) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -57756,21 +58854,21 @@ func (x *ConfigMap) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -57778,38 +58876,44 @@ func (x *ConfigMap) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -57817,26 +58921,26 @@ func (x *ConfigMap) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Data = nil } else { - yyv17 := &x.Data - yym18 := z.DecBinary() - _ = yym18 + yyv19 := &x.Data + yym20 := z.DecBinary() + _ = yym20 if false { } else { - z.F.DecMapStringStringX(yyv17, false, d) + z.F.DecMapStringStringX(yyv19, false, d) } } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -58630,7 +59734,13 @@ func (x *ComponentStatus) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -58640,7 +59750,13 @@ func (x *ComponentStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -58763,21 +59879,27 @@ func (x *ComponentStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "conditions": if r.TryDecodeAsNil() { x.Conditions = nil } else { - yyv9 := &x.Conditions - yym10 := z.DecBinary() - _ = yym10 + yyv10 := &x.Conditions + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decSliceComponentCondition((*[]ComponentCondition)(yyv9), d) + h.decSliceComponentCondition((*[]ComponentCondition)(yyv10), d) } } default: @@ -58791,16 +59913,16 @@ func (x *ComponentStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -58808,21 +59930,21 @@ func (x *ComponentStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -58830,38 +59952,44 @@ func (x *ComponentStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -58869,26 +59997,26 @@ func (x *ComponentStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Conditions = nil } else { - yyv17 := &x.Conditions - yym18 := z.DecBinary() - _ = yym18 + yyv19 := &x.Conditions + yym20 := z.DecBinary() + _ = yym20 if false { } else { - h.decSliceComponentCondition((*[]ComponentCondition)(yyv17), d) + h.decSliceComponentCondition((*[]ComponentCondition)(yyv19), d) } } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -60885,7 +62013,13 @@ func (x *RangeAllocation) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -60895,7 +62029,13 @@ func (x *RangeAllocation) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -61031,33 +62171,39 @@ func (x *RangeAllocation) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "range": if r.TryDecodeAsNil() { x.Range = "" } else { - yyv9 := &x.Range - yym10 := z.DecBinary() - _ = yym10 + yyv10 := &x.Range + yym11 := z.DecBinary() + _ = yym11 if false { } else { - *((*string)(yyv9)) = r.DecodeString() + *((*string)(yyv10)) = r.DecodeString() } } case "data": if r.TryDecodeAsNil() { x.Data = nil } else { - yyv11 := &x.Data - yym12 := z.DecBinary() - _ = yym12 + yyv12 := &x.Data + yym13 := z.DecBinary() + _ = yym13 if false { } else { - *yyv11 = r.DecodeBytes(*(*[]byte)(yyv11), false, false) + *yyv12 = r.DecodeBytes(*(*[]byte)(yyv12), false, false) } } default: @@ -61071,16 +62217,16 @@ func (x *RangeAllocation) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj13 int - var yyb13 bool - var yyhl13 bool = l >= 0 - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + var yyj14 int + var yyb14 bool + var yyhl14 bool = l >= 0 + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -61088,21 +62234,21 @@ func (x *RangeAllocation) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv14 := &x.Kind - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.Kind + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -61110,38 +62256,44 @@ func (x *RangeAllocation) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv16 := &x.APIVersion - yym17 := z.DecBinary() - _ = yym17 + yyv17 := &x.APIVersion + yym18 := z.DecBinary() + _ = yym18 if false { } else { - *((*string)(yyv16)) = r.DecodeString() + *((*string)(yyv17)) = r.DecodeString() } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv18 := &x.ObjectMeta - yyv18.CodecDecodeSelf(d) + yyv19 := &x.ObjectMeta + yym20 := z.DecBinary() + _ = yym20 + if false { + } else if z.HasExtensions() && z.DecExt(yyv19) { + } else { + z.DecFallback(yyv19, false) + } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -61149,21 +62301,21 @@ func (x *RangeAllocation) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Range = "" } else { - yyv19 := &x.Range - yym20 := z.DecBinary() - _ = yym20 + yyv21 := &x.Range + yym22 := z.DecBinary() + _ = yym22 if false { } else { - *((*string)(yyv19)) = r.DecodeString() + *((*string)(yyv21)) = r.DecodeString() } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -61171,26 +62323,26 @@ func (x *RangeAllocation) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Data = nil } else { - yyv21 := &x.Data - yym22 := z.DecBinary() - _ = yym22 + yyv23 := &x.Data + yym24 := z.DecBinary() + _ = yym24 if false { } else { - *yyv21 = r.DecodeBytes(*(*[]byte)(yyv21), false, false) + *yyv23 = r.DecodeBytes(*(*[]byte)(yyv23), false, false) } } for { - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj13-1, "") + z.DecStructFieldNotFound(yyj14-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -62198,7 +63350,7 @@ func (x codecSelfer1234) decSliceEnvFromSource(v *[]EnvFromSource, d *codec1978. yyrg1 := len(yyv1) > 0 yyv21 := yyv1 - yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 24) + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 32) if yyrt1 { if yyrl1 <= cap(yyv1) { yyv1 = yyv1[:yyrl1] @@ -63269,7 +64421,7 @@ func (x codecSelfer1234) decSliceContainer(v *[]Container, d *codec1978.Decoder) yyrg1 := len(yyv1) > 0 yyv21 := yyv1 - yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 280) + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 296) if yyrt1 { if yyrl1 <= cap(yyv1) { yyv1 = yyv1[:yyrl1] @@ -63745,7 +64897,7 @@ func (x codecSelfer1234) decSlicePod(v *[]Pod, d *codec1978.Decoder) { yyrg1 := len(yyv1) > 0 yyv21 := yyv1 - yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 688) + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 704) if yyrt1 { if yyrl1 <= cap(yyv1) { yyv1 = yyv1[:yyrl1] @@ -63864,7 +65016,7 @@ func (x codecSelfer1234) decSlicePodTemplate(v *[]PodTemplate, d *codec1978.Deco yyrg1 := len(yyv1) > 0 yyv21 := yyv1 - yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 736) + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 752) if yyrt1 { if yyrl1 <= cap(yyv1) { yyv1 = yyv1[:yyrl1] diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/v1/types.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/v1/types.go index 24ca55f0..3e58af4f 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/v1/types.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/v1/types.go @@ -65,6 +65,8 @@ import ( // ObjectMeta is metadata that all persisted resources must have, which includes all objects // users must create. +// DEPRECATED: Use k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta instead - this type will be removed soon. +// +k8s:openapi-gen=false type ObjectMeta struct { // Name must be unique within a namespace. Is required when creating resources, although // some resources may allow a client to request the generation of an appropriate name @@ -118,7 +120,7 @@ type ObjectMeta struct { // Read-only. // More info: http://kubernetes.io/docs/user-guide/identifiers#uids // +optional - UID types.UID `json:"uid,omitempty" protobuf:"bytes,5,opt,name=uid,casttype=k8s.io/kubernetes/pkg/types.UID"` + UID types.UID `json:"uid,omitempty" protobuf:"bytes,5,opt,name=uid,casttype=k8s.io/apimachinery/pkg/types.UID"` // An opaque value that represents the internal version of this object that can // be used by clients to determine when objects have changed. May be used for optimistic @@ -422,7 +424,7 @@ type PersistentVolume struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec defines a specification of a persistent volume owned by the cluster. // Provisioned by an administrator. @@ -514,7 +516,7 @@ type PersistentVolumeClaim struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec defines the desired characteristics of a volume requested by a pod author. // More info: http://kubernetes.io/docs/user-guide/persistent-volumes#persistentvolumeclaims @@ -1241,6 +1243,9 @@ type EnvFromSource struct { // The ConfigMap to select from // +optional ConfigMapRef *ConfigMapEnvSource `json:"configMapRef,omitempty" protobuf:"bytes,2,opt,name=configMapRef"` + // The Secret to select from + // +optional + SecretRef *SecretEnvSource `json:"secretRef,omitempty" protobuf:"bytes,3,opt,name=secretRef"` } // ConfigMapEnvSource selects a ConfigMap to populate the environment @@ -1253,6 +1258,16 @@ type ConfigMapEnvSource struct { LocalObjectReference `json:",inline" protobuf:"bytes,1,opt,name=localObjectReference"` } +// SecretEnvSource selects a Secret to populate the environment +// variables with. +// +// The contents of the target Secret's Data field will represent the +// key-value pairs as environment variables. +type SecretEnvSource struct { + // The Secret to select from. + LocalObjectReference `json:",inline" protobuf:"bytes,1,opt,name=localObjectReference"` +} + // HTTPHeader describes a custom header to be used in HTTP probes type HTTPHeader struct { // The header field name @@ -1352,6 +1367,19 @@ const ( PullIfNotPresent PullPolicy = "IfNotPresent" ) +// TerminationMessagePolicy describes how termination messages are retrieved from a container. +type TerminationMessagePolicy string + +const ( + // TerminationMessageReadFile is the default behavior and will set the container status message to + // the contents of the container's terminationMessagePath when the container exits. + TerminationMessageReadFile TerminationMessagePolicy = "File" + // TerminationMessageFallbackToLogsOnError will read the most recent contents of the container logs + // for the container status message when the container exits with an error and the + // terminationMessagePath has no contents. + TerminationMessageFallbackToLogsOnError TerminationMessagePolicy = "FallbackToLogsOnError" +) + // Capability represent POSIX capabilities type type Capability string @@ -1469,10 +1497,21 @@ type Container struct { // Optional: Path at which the file to which the container's termination message // will be written is mounted into the container's filesystem. // Message written is intended to be brief final status, such as an assertion failure message. + // Will be truncated by the node if greater than 4096 bytes. The total message length across + // all containers will be limited to 12kb. // Defaults to /dev/termination-log. // Cannot be updated. // +optional TerminationMessagePath string `json:"terminationMessagePath,omitempty" protobuf:"bytes,13,opt,name=terminationMessagePath"` + // Indicate how the termination message should be populated. File will use the contents of + // terminationMessagePath to populate the container status message on both success and failure. + // FallbackToLogsOnError will use the last chunk of container log output if the termination + // message file is empty and the container exited with an error. + // The log output is limited to 2048 bytes or 80 lines, whichever is smaller. + // Defaults to File. + // Cannot be updated. + // +optional + TerminationMessagePolicy TerminationMessagePolicy `json:"terminationMessagePolicy,omitempty" protobuf:"bytes,20,opt,name=terminationMessagePolicy,casttype=TerminationMessagePolicy"` // Image pull policy. // One of Always, Never, IfNotPresent. // Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. @@ -2138,6 +2177,10 @@ type PodSpec struct { // If specified, the pod's scheduling constraints // +optional Affinity *Affinity `json:"affinity,omitempty" protobuf:"bytes,18,opt,name=affinity"` + // If specified, the pod will be dispatched by specified scheduler. + // If not specified, the pod will be dispatched by default scheduler. + // +optional + SchedulerName string `json:"schedulername,omitempty" protobuf:"bytes,19,opt,name=schedulername"` } // PodSecurityContext holds pod-level security attributes and common container settings. @@ -2252,7 +2295,7 @@ type PodStatusResult struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Most recently observed status of the pod. // This data may not be up to date. // Populated by the system. @@ -2271,7 +2314,7 @@ type Pod struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Specification of the desired behavior of the pod. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -2305,7 +2348,7 @@ type PodTemplateSpec struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Specification of the desired behavior of the pod. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -2321,7 +2364,7 @@ type PodTemplate struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Template defines the pods that will be created from this pod template. // http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -2442,7 +2485,7 @@ type ReplicationController struct { // be the same as the Pod(s) that the replication controller manages. // Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec defines the specification of the desired behavior of the replication controller. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -2675,7 +2718,7 @@ type Service struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec defines the behavior of a service. // http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -2719,7 +2762,7 @@ type ServiceAccount struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Secrets is the list of secrets allowed to be used by pods running using this ServiceAccount. // More info: http://kubernetes.io/docs/user-guide/secrets @@ -2766,7 +2809,7 @@ type Endpoints struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // The set of all endpoints is the union of all subsets. Addresses are placed into // subsets according to the IPs they share. A single address with multiple ports, @@ -3124,7 +3167,7 @@ type Node struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec defines the behavior of a node. // http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -3196,7 +3239,7 @@ type Namespace struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec defines the behavior of the Namespace. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -3229,7 +3272,7 @@ type Binding struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // The target object that you want to bind to the standard object. Target ObjectReference `json:"target" protobuf:"bytes,2,opt,name=target"` @@ -3239,7 +3282,7 @@ type Binding struct { type Preconditions struct { // Specifies the target UID. // +optional - UID *types.UID `json:"uid,omitempty" protobuf:"bytes,1,opt,name=uid,casttype=k8s.io/kubernetes/pkg/types.UID"` + UID *types.UID `json:"uid,omitempty" protobuf:"bytes,1,opt,name=uid,casttype=k8s.io/apimachinery/pkg/types.UID"` } // DeleteOptions may be provided when deleting an API object @@ -3265,6 +3308,8 @@ type DeleteOptions struct { } // ListOptions is the query options to a standard REST list call. +// DEPRECATED: This type has been moved to meta/v1 and will be removed soon. +// +k8s:openapi-gen=false type ListOptions struct { metav1.TypeMeta `json:",inline"` @@ -3404,6 +3449,21 @@ type PodExecOptions struct { Command []string `json:"command" protobuf:"bytes,6,rep,name=command"` } +// PodPortForwardOptions is the query options to a Pod's port forward call +// when using WebSockets. +// The `port` query parameter must specify the port or +// ports (comma separated) to forward over. +// Port forwarding over SPDY does not use these options. It requires the port +// to be passed in the `port` header as part of request. +type PodPortForwardOptions struct { + metav1.TypeMeta `json:",inline"` + + // List of ports to forward + // Required when using WebSockets + // +optional + Ports []int32 `json:"ports,omitempty" protobuf:"varint,1,rep,name=ports"` +} + // PodProxyOptions is the query options to a Pod's proxy call. type PodProxyOptions struct { metav1.TypeMeta `json:",inline"` @@ -3452,7 +3512,7 @@ type ObjectReference struct { // UID of the referent. // More info: http://kubernetes.io/docs/user-guide/identifiers#uids // +optional - UID types.UID `json:"uid,omitempty" protobuf:"bytes,4,opt,name=uid,casttype=k8s.io/kubernetes/pkg/types.UID"` + UID types.UID `json:"uid,omitempty" protobuf:"bytes,4,opt,name=uid,casttype=k8s.io/apimachinery/pkg/types.UID"` // API version of the referent. // +optional APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,5,opt,name=apiVersion"` @@ -3517,7 +3577,7 @@ type Event struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - ObjectMeta `json:"metadata" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata" protobuf:"bytes,1,opt,name=metadata"` // The object that this event is about. InvolvedObject ObjectReference `json:"involvedObject" protobuf:"bytes,2,opt,name=involvedObject"` @@ -3626,7 +3686,7 @@ type LimitRange struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec defines the limits enforced. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -3724,7 +3784,7 @@ type ResourceQuota struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec defines the desired quota. // http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -3759,7 +3819,7 @@ type Secret struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Data contains the secret data. Each key must be a valid DNS_SUBDOMAIN // or leading dot followed by valid DNS_SUBDOMAIN. @@ -3886,7 +3946,7 @@ type ConfigMap struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Data contains the configuration data. // Each key must be a valid DNS_SUBDOMAIN with an optional leading dot. @@ -3941,7 +4001,7 @@ type ComponentStatus struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // List of component conditions observed // +optional @@ -4059,7 +4119,7 @@ type RangeAllocation struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Range is string that identifies the range represented by 'data'. Range string `json:"range" protobuf:"bytes,2,opt,name=range"` diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/v1/types_swagger_doc_generated.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/v1/types_swagger_doc_generated.go index c15d1992..9928598d 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/v1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/v1/types_swagger_doc_generated.go @@ -218,26 +218,27 @@ func (ConfigMapVolumeSource) SwaggerDoc() map[string]string { } var map_Container = map[string]string{ - "": "A single application container that you want to run within a pod.", - "name": "Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.", - "image": "Docker image name. More info: http://kubernetes.io/docs/user-guide/images", - "command": "Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/containers#containers-and-commands", - "args": "Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/containers#containers-and-commands", - "workingDir": "Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated.", - "ports": "List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default \"0.0.0.0\" address inside a container will be accessible from the network. Cannot be updated.", - "envFrom": "List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. An invalid key will prevent the container from starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated.", - "env": "List of environment variables to set in the container. Cannot be updated.", - "resources": "Compute Resources required by this container. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#resources", - "volumeMounts": "Pod volumes to mount into the container's filesystem. Cannot be updated.", - "livenessProbe": "Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/pod-states#container-probes", - "readinessProbe": "Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/pod-states#container-probes", - "lifecycle": "Actions that the management system should take in response to container lifecycle events. Cannot be updated.", - "terminationMessagePath": "Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated.", - "imagePullPolicy": "Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/images#updating-images", - "securityContext": "Security options the pod should run with. More info: http://releases.k8s.io/HEAD/docs/design/security_context.md", - "stdin": "Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false.", - "stdinOnce": "Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false", - "tty": "Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false.", + "": "A single application container that you want to run within a pod.", + "name": "Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.", + "image": "Docker image name. More info: http://kubernetes.io/docs/user-guide/images", + "command": "Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/containers#containers-and-commands", + "args": "Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/containers#containers-and-commands", + "workingDir": "Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated.", + "ports": "List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default \"0.0.0.0\" address inside a container will be accessible from the network. Cannot be updated.", + "envFrom": "List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. An invalid key will prevent the container from starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated.", + "env": "List of environment variables to set in the container. Cannot be updated.", + "resources": "Compute Resources required by this container. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#resources", + "volumeMounts": "Pod volumes to mount into the container's filesystem. Cannot be updated.", + "livenessProbe": "Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/pod-states#container-probes", + "readinessProbe": "Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/pod-states#container-probes", + "lifecycle": "Actions that the management system should take in response to container lifecycle events. Cannot be updated.", + "terminationMessagePath": "Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated.", + "terminationMessagePolicy": "Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.", + "imagePullPolicy": "Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/images#updating-images", + "securityContext": "Security options the pod should run with. More info: http://releases.k8s.io/HEAD/docs/design/security_context.md", + "stdin": "Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false.", + "stdinOnce": "Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false", + "tty": "Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false.", } func (Container) SwaggerDoc() map[string]string { @@ -437,6 +438,7 @@ var map_EnvFromSource = map[string]string{ "": "EnvFromSource represents the source of a set of ConfigMaps", "prefix": "An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.", "configMapRef": "The ConfigMap to select from", + "secretRef": "The Secret to select from", } func (EnvFromSource) SwaggerDoc() map[string]string { @@ -713,7 +715,7 @@ func (List) SwaggerDoc() map[string]string { } var map_ListOptions = map[string]string{ - "": "ListOptions is the query options to a standard REST list call.", + "": "ListOptions is the query options to a standard REST list call. DEPRECATED: This type has been moved to meta/v1 and will be removed soon.", "labelSelector": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "fieldSelector": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "watch": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", @@ -964,7 +966,7 @@ func (ObjectFieldSelector) SwaggerDoc() map[string]string { } var map_ObjectMeta = map[string]string{ - "": "ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.", + "": "ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create. DEPRECATED: Use k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta instead - this type will be removed soon.", "name": "Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names", "generateName": "GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.\n\nIf this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).\n\nApplied only if Name is not specified. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#idempotency", "namespace": "Namespace defines the space within each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.\n\nMust be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces", @@ -1243,6 +1245,15 @@ func (PodLogOptions) SwaggerDoc() map[string]string { return map_PodLogOptions } +var map_PodPortForwardOptions = map[string]string{ + "": "PodPortForwardOptions is the query options to a Pod's port forward call when using WebSockets. The `port` query parameter must specify the port or ports (comma separated) to forward over. Port forwarding over SPDY does not use these options. It requires the port to be passed in the `port` header as part of request.", + "ports": "List of ports to forward Required when using WebSockets", +} + +func (PodPortForwardOptions) SwaggerDoc() map[string]string { + return map_PodPortForwardOptions +} + var map_PodProxyOptions = map[string]string{ "": "PodProxyOptions is the query options to a Pod's proxy call.", "path": "Path is the URL path to use for the current proxy request to pod.", @@ -1294,6 +1305,7 @@ var map_PodSpec = map[string]string{ "hostname": "Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value.", "subdomain": "If specified, the fully qualified Pod hostname will be \"...svc.\". If not specified, the pod will not have a domainname at all.", "affinity": "If specified, the pod's scheduling constraints", + "schedulername": "If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler.", } func (PodSpec) SwaggerDoc() map[string]string { @@ -1587,6 +1599,14 @@ func (Secret) SwaggerDoc() map[string]string { return map_Secret } +var map_SecretEnvSource = map[string]string{ + "": "SecretEnvSource selects a Secret to populate the environment variables with.\n\nThe contents of the target Secret's Data field will represent the key-value pairs as environment variables.", +} + +func (SecretEnvSource) SwaggerDoc() map[string]string { + return map_SecretEnvSource +} + var map_SecretKeySelector = map[string]string{ "": "SecretKeySelector selects a key of a Secret.", "key": "The key of the secret to select from. Must be a valid secret key.", diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/v1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/v1/zz_generated.conversion.go index 679af67f..44ce6d35 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/v1/zz_generated.conversion.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/v1/zz_generated.conversion.go @@ -251,6 +251,8 @@ func RegisterConversions(scheme *runtime.Scheme) error { Convert_api_PodList_To_v1_PodList, Convert_v1_PodLogOptions_To_api_PodLogOptions, Convert_api_PodLogOptions_To_v1_PodLogOptions, + Convert_v1_PodPortForwardOptions_To_api_PodPortForwardOptions, + Convert_api_PodPortForwardOptions_To_v1_PodPortForwardOptions, Convert_v1_PodProxyOptions_To_api_PodProxyOptions, Convert_api_PodProxyOptions_To_v1_PodProxyOptions, Convert_v1_PodSecurityContext_To_api_PodSecurityContext, @@ -309,6 +311,8 @@ func RegisterConversions(scheme *runtime.Scheme) error { Convert_api_SELinuxOptions_To_v1_SELinuxOptions, Convert_v1_Secret_To_api_Secret, Convert_api_Secret_To_v1_Secret, + Convert_v1_SecretEnvSource_To_api_SecretEnvSource, + Convert_api_SecretEnvSource_To_v1_SecretEnvSource, Convert_v1_SecretKeySelector_To_api_SecretKeySelector, Convert_api_SecretKeySelector_To_v1_SecretKeySelector, Convert_v1_SecretList_To_api_SecretList, @@ -489,9 +493,7 @@ func Convert_api_AzureFileVolumeSource_To_v1_AzureFileVolumeSource(in *api.Azure } func autoConvert_v1_Binding_To_api_Binding(in *Binding, out *api.Binding, s conversion.Scope) error { - if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_ObjectReference_To_api_ObjectReference(&in.Target, &out.Target, s); err != nil { return err } @@ -503,9 +505,7 @@ func Convert_v1_Binding_To_api_Binding(in *Binding, out *api.Binding, s conversi } func autoConvert_api_Binding_To_v1_Binding(in *api.Binding, out *Binding, s conversion.Scope) error { - if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_api_ObjectReference_To_v1_ObjectReference(&in.Target, &out.Target, s); err != nil { return err } @@ -611,9 +611,7 @@ func Convert_api_ComponentCondition_To_v1_ComponentCondition(in *api.ComponentCo } func autoConvert_v1_ComponentStatus_To_api_ComponentStatus(in *ComponentStatus, out *api.ComponentStatus, s conversion.Scope) error { - if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.Conditions = *(*[]api.ComponentCondition)(unsafe.Pointer(&in.Conditions)) return nil } @@ -623,9 +621,7 @@ func Convert_v1_ComponentStatus_To_api_ComponentStatus(in *ComponentStatus, out } func autoConvert_api_ComponentStatus_To_v1_ComponentStatus(in *api.ComponentStatus, out *ComponentStatus, s conversion.Scope) error { - if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.Conditions = *(*[]ComponentCondition)(unsafe.Pointer(&in.Conditions)) return nil } @@ -655,9 +651,7 @@ func Convert_api_ComponentStatusList_To_v1_ComponentStatusList(in *api.Component } func autoConvert_v1_ConfigMap_To_api_ConfigMap(in *ConfigMap, out *api.ConfigMap, s conversion.Scope) error { - if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.Data = *(*map[string]string)(unsafe.Pointer(&in.Data)) return nil } @@ -667,9 +661,7 @@ func Convert_v1_ConfigMap_To_api_ConfigMap(in *ConfigMap, out *api.ConfigMap, s } func autoConvert_api_ConfigMap_To_v1_ConfigMap(in *api.ConfigMap, out *ConfigMap, s conversion.Scope) error { - if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.Data = *(*map[string]string)(unsafe.Pointer(&in.Data)) return nil } @@ -787,6 +779,7 @@ func autoConvert_v1_Container_To_api_Container(in *Container, out *api.Container out.ReadinessProbe = (*api.Probe)(unsafe.Pointer(in.ReadinessProbe)) out.Lifecycle = (*api.Lifecycle)(unsafe.Pointer(in.Lifecycle)) out.TerminationMessagePath = in.TerminationMessagePath + out.TerminationMessagePolicy = api.TerminationMessagePolicy(in.TerminationMessagePolicy) out.ImagePullPolicy = api.PullPolicy(in.ImagePullPolicy) out.SecurityContext = (*api.SecurityContext)(unsafe.Pointer(in.SecurityContext)) out.Stdin = in.Stdin @@ -816,6 +809,7 @@ func autoConvert_api_Container_To_v1_Container(in *api.Container, out *Container out.ReadinessProbe = (*Probe)(unsafe.Pointer(in.ReadinessProbe)) out.Lifecycle = (*Lifecycle)(unsafe.Pointer(in.Lifecycle)) out.TerminationMessagePath = in.TerminationMessagePath + out.TerminationMessagePolicy = TerminationMessagePolicy(in.TerminationMessagePolicy) out.ImagePullPolicy = PullPolicy(in.ImagePullPolicy) out.SecurityContext = (*SecurityContext)(unsafe.Pointer(in.SecurityContext)) out.Stdin = in.Stdin @@ -1175,9 +1169,7 @@ func Convert_api_EndpointSubset_To_v1_EndpointSubset(in *api.EndpointSubset, out } func autoConvert_v1_Endpoints_To_api_Endpoints(in *Endpoints, out *api.Endpoints, s conversion.Scope) error { - if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.Subsets = *(*[]api.EndpointSubset)(unsafe.Pointer(&in.Subsets)) return nil } @@ -1187,9 +1179,7 @@ func Convert_v1_Endpoints_To_api_Endpoints(in *Endpoints, out *api.Endpoints, s } func autoConvert_api_Endpoints_To_v1_Endpoints(in *api.Endpoints, out *Endpoints, s conversion.Scope) error { - if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.Subsets = *(*[]EndpointSubset)(unsafe.Pointer(&in.Subsets)) return nil } @@ -1221,6 +1211,7 @@ func Convert_api_EndpointsList_To_v1_EndpointsList(in *api.EndpointsList, out *E func autoConvert_v1_EnvFromSource_To_api_EnvFromSource(in *EnvFromSource, out *api.EnvFromSource, s conversion.Scope) error { out.Prefix = in.Prefix out.ConfigMapRef = (*api.ConfigMapEnvSource)(unsafe.Pointer(in.ConfigMapRef)) + out.SecretRef = (*api.SecretEnvSource)(unsafe.Pointer(in.SecretRef)) return nil } @@ -1231,6 +1222,7 @@ func Convert_v1_EnvFromSource_To_api_EnvFromSource(in *EnvFromSource, out *api.E func autoConvert_api_EnvFromSource_To_v1_EnvFromSource(in *api.EnvFromSource, out *EnvFromSource, s conversion.Scope) error { out.Prefix = in.Prefix out.ConfigMapRef = (*ConfigMapEnvSource)(unsafe.Pointer(in.ConfigMapRef)) + out.SecretRef = (*SecretEnvSource)(unsafe.Pointer(in.SecretRef)) return nil } @@ -1285,9 +1277,7 @@ func Convert_api_EnvVarSource_To_v1_EnvVarSource(in *api.EnvVarSource, out *EnvV } func autoConvert_v1_Event_To_api_Event(in *Event, out *api.Event, s conversion.Scope) error { - if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_ObjectReference_To_api_ObjectReference(&in.InvolvedObject, &out.InvolvedObject, s); err != nil { return err } @@ -1308,9 +1298,7 @@ func Convert_v1_Event_To_api_Event(in *Event, out *api.Event, s conversion.Scope } func autoConvert_api_Event_To_v1_Event(in *api.Event, out *Event, s conversion.Scope) error { - if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_api_ObjectReference_To_v1_ObjectReference(&in.InvolvedObject, &out.InvolvedObject, s); err != nil { return err } @@ -1683,9 +1671,7 @@ func Convert_api_Lifecycle_To_v1_Lifecycle(in *api.Lifecycle, out *Lifecycle, s } func autoConvert_v1_LimitRange_To_api_LimitRange(in *LimitRange, out *api.LimitRange, s conversion.Scope) error { - if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_LimitRangeSpec_To_api_LimitRangeSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -1697,9 +1683,7 @@ func Convert_v1_LimitRange_To_api_LimitRange(in *LimitRange, out *api.LimitRange } func autoConvert_api_LimitRange_To_v1_LimitRange(in *api.LimitRange, out *LimitRange, s conversion.Scope) error { - if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_api_LimitRangeSpec_To_v1_LimitRangeSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -1929,9 +1913,7 @@ func Convert_api_NFSVolumeSource_To_v1_NFSVolumeSource(in *api.NFSVolumeSource, } func autoConvert_v1_Namespace_To_api_Namespace(in *Namespace, out *api.Namespace, s conversion.Scope) error { - if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_NamespaceSpec_To_api_NamespaceSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -1946,9 +1928,7 @@ func Convert_v1_Namespace_To_api_Namespace(in *Namespace, out *api.Namespace, s } func autoConvert_api_Namespace_To_v1_Namespace(in *api.Namespace, out *Namespace, s conversion.Scope) error { - if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_api_NamespaceSpec_To_v1_NamespaceSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -2019,9 +1999,7 @@ func Convert_api_NamespaceStatus_To_v1_NamespaceStatus(in *api.NamespaceStatus, } func autoConvert_v1_Node_To_api_Node(in *Node, out *api.Node, s conversion.Scope) error { - if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_NodeSpec_To_api_NodeSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -2036,9 +2014,7 @@ func Convert_v1_Node_To_api_Node(in *Node, out *api.Node, s conversion.Scope) er } func autoConvert_api_Node_To_v1_Node(in *api.Node, out *Node, s conversion.Scope) error { - if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_api_NodeSpec_To_v1_NodeSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -2457,9 +2433,7 @@ func Convert_api_ObjectReference_To_v1_ObjectReference(in *api.ObjectReference, } func autoConvert_v1_PersistentVolume_To_api_PersistentVolume(in *PersistentVolume, out *api.PersistentVolume, s conversion.Scope) error { - if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_PersistentVolumeSpec_To_api_PersistentVolumeSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -2474,9 +2448,7 @@ func Convert_v1_PersistentVolume_To_api_PersistentVolume(in *PersistentVolume, o } func autoConvert_api_PersistentVolume_To_v1_PersistentVolume(in *api.PersistentVolume, out *PersistentVolume, s conversion.Scope) error { - if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_api_PersistentVolumeSpec_To_v1_PersistentVolumeSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -2491,9 +2463,7 @@ func Convert_api_PersistentVolume_To_v1_PersistentVolume(in *api.PersistentVolum } func autoConvert_v1_PersistentVolumeClaim_To_api_PersistentVolumeClaim(in *PersistentVolumeClaim, out *api.PersistentVolumeClaim, s conversion.Scope) error { - if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_PersistentVolumeClaimSpec_To_api_PersistentVolumeClaimSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -2508,9 +2478,7 @@ func Convert_v1_PersistentVolumeClaim_To_api_PersistentVolumeClaim(in *Persisten } func autoConvert_api_PersistentVolumeClaim_To_v1_PersistentVolumeClaim(in *api.PersistentVolumeClaim, out *PersistentVolumeClaim, s conversion.Scope) error { - if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_api_PersistentVolumeClaimSpec_To_v1_PersistentVolumeClaimSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -2777,9 +2745,7 @@ func Convert_api_PhotonPersistentDiskVolumeSource_To_v1_PhotonPersistentDiskVolu } func autoConvert_v1_Pod_To_api_Pod(in *Pod, out *api.Pod, s conversion.Scope) error { - if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_PodSpec_To_api_PodSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -2790,9 +2756,7 @@ func autoConvert_v1_Pod_To_api_Pod(in *Pod, out *api.Pod, s conversion.Scope) er } func autoConvert_api_Pod_To_v1_Pod(in *api.Pod, out *Pod, s conversion.Scope) error { - if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_api_PodSpec_To_v1_PodSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -3018,6 +2982,24 @@ func Convert_api_PodLogOptions_To_v1_PodLogOptions(in *api.PodLogOptions, out *P return autoConvert_api_PodLogOptions_To_v1_PodLogOptions(in, out, s) } +func autoConvert_v1_PodPortForwardOptions_To_api_PodPortForwardOptions(in *PodPortForwardOptions, out *api.PodPortForwardOptions, s conversion.Scope) error { + out.Ports = *(*[]int32)(unsafe.Pointer(&in.Ports)) + return nil +} + +func Convert_v1_PodPortForwardOptions_To_api_PodPortForwardOptions(in *PodPortForwardOptions, out *api.PodPortForwardOptions, s conversion.Scope) error { + return autoConvert_v1_PodPortForwardOptions_To_api_PodPortForwardOptions(in, out, s) +} + +func autoConvert_api_PodPortForwardOptions_To_v1_PodPortForwardOptions(in *api.PodPortForwardOptions, out *PodPortForwardOptions, s conversion.Scope) error { + out.Ports = *(*[]int32)(unsafe.Pointer(&in.Ports)) + return nil +} + +func Convert_api_PodPortForwardOptions_To_v1_PodPortForwardOptions(in *api.PodPortForwardOptions, out *PodPortForwardOptions, s conversion.Scope) error { + return autoConvert_api_PodPortForwardOptions_To_v1_PodPortForwardOptions(in, out, s) +} + func autoConvert_v1_PodProxyOptions_To_api_PodProxyOptions(in *PodProxyOptions, out *api.PodProxyOptions, s conversion.Scope) error { out.Path = in.Path return nil @@ -3113,6 +3095,7 @@ func autoConvert_v1_PodSpec_To_api_PodSpec(in *PodSpec, out *api.PodSpec, s conv out.Hostname = in.Hostname out.Subdomain = in.Subdomain out.Affinity = (*api.Affinity)(unsafe.Pointer(in.Affinity)) + out.SchedulerName = in.SchedulerName return nil } @@ -3150,6 +3133,7 @@ func autoConvert_api_PodSpec_To_v1_PodSpec(in *api.PodSpec, out *PodSpec, s conv out.Hostname = in.Hostname out.Subdomain = in.Subdomain out.Affinity = (*Affinity)(unsafe.Pointer(in.Affinity)) + out.SchedulerName = in.SchedulerName return nil } @@ -3190,9 +3174,7 @@ func Convert_api_PodStatus_To_v1_PodStatus(in *api.PodStatus, out *PodStatus, s } func autoConvert_v1_PodStatusResult_To_api_PodStatusResult(in *PodStatusResult, out *api.PodStatusResult, s conversion.Scope) error { - if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_PodStatus_To_api_PodStatus(&in.Status, &out.Status, s); err != nil { return err } @@ -3200,9 +3182,7 @@ func autoConvert_v1_PodStatusResult_To_api_PodStatusResult(in *PodStatusResult, } func autoConvert_api_PodStatusResult_To_v1_PodStatusResult(in *api.PodStatusResult, out *PodStatusResult, s conversion.Scope) error { - if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_api_PodStatus_To_v1_PodStatus(&in.Status, &out.Status, s); err != nil { return err } @@ -3210,9 +3190,7 @@ func autoConvert_api_PodStatusResult_To_v1_PodStatusResult(in *api.PodStatusResu } func autoConvert_v1_PodTemplate_To_api_PodTemplate(in *PodTemplate, out *api.PodTemplate, s conversion.Scope) error { - if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(&in.Template, &out.Template, s); err != nil { return err } @@ -3224,9 +3202,7 @@ func Convert_v1_PodTemplate_To_api_PodTemplate(in *PodTemplate, out *api.PodTemp } func autoConvert_api_PodTemplate_To_v1_PodTemplate(in *api.PodTemplate, out *PodTemplate, s conversion.Scope) error { - if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_api_PodTemplateSpec_To_v1_PodTemplateSpec(&in.Template, &out.Template, s); err != nil { return err } @@ -3278,9 +3254,7 @@ func Convert_api_PodTemplateList_To_v1_PodTemplateList(in *api.PodTemplateList, } func autoConvert_v1_PodTemplateSpec_To_api_PodTemplateSpec(in *PodTemplateSpec, out *api.PodTemplateSpec, s conversion.Scope) error { - if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_PodSpec_To_api_PodSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -3288,9 +3262,7 @@ func autoConvert_v1_PodTemplateSpec_To_api_PodTemplateSpec(in *PodTemplateSpec, } func autoConvert_api_PodTemplateSpec_To_v1_PodTemplateSpec(in *api.PodTemplateSpec, out *PodTemplateSpec, s conversion.Scope) error { - if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_api_PodSpec_To_v1_PodSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -3458,9 +3430,7 @@ func Convert_api_RBDVolumeSource_To_v1_RBDVolumeSource(in *api.RBDVolumeSource, } func autoConvert_v1_RangeAllocation_To_api_RangeAllocation(in *RangeAllocation, out *api.RangeAllocation, s conversion.Scope) error { - if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.Range = in.Range out.Data = *(*[]byte)(unsafe.Pointer(&in.Data)) return nil @@ -3471,9 +3441,7 @@ func Convert_v1_RangeAllocation_To_api_RangeAllocation(in *RangeAllocation, out } func autoConvert_api_RangeAllocation_To_v1_RangeAllocation(in *api.RangeAllocation, out *RangeAllocation, s conversion.Scope) error { - if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.Range = in.Range out.Data = *(*[]byte)(unsafe.Pointer(&in.Data)) return nil @@ -3484,9 +3452,7 @@ func Convert_api_RangeAllocation_To_v1_RangeAllocation(in *api.RangeAllocation, } func autoConvert_v1_ReplicationController_To_api_ReplicationController(in *ReplicationController, out *api.ReplicationController, s conversion.Scope) error { - if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_ReplicationControllerSpec_To_api_ReplicationControllerSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -3501,9 +3467,7 @@ func Convert_v1_ReplicationController_To_api_ReplicationController(in *Replicati } func autoConvert_api_ReplicationController_To_v1_ReplicationController(in *api.ReplicationController, out *ReplicationController, s conversion.Scope) error { - if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_api_ReplicationControllerSpec_To_v1_ReplicationControllerSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -3670,9 +3634,7 @@ func Convert_api_ResourceFieldSelector_To_v1_ResourceFieldSelector(in *api.Resou } func autoConvert_v1_ResourceQuota_To_api_ResourceQuota(in *ResourceQuota, out *api.ResourceQuota, s conversion.Scope) error { - if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_ResourceQuotaSpec_To_api_ResourceQuotaSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -3687,9 +3649,7 @@ func Convert_v1_ResourceQuota_To_api_ResourceQuota(in *ResourceQuota, out *api.R } func autoConvert_api_ResourceQuota_To_v1_ResourceQuota(in *api.ResourceQuota, out *ResourceQuota, s conversion.Scope) error { - if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_api_ResourceQuotaSpec_To_v1_ResourceQuotaSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -3808,9 +3768,7 @@ func Convert_api_SELinuxOptions_To_v1_SELinuxOptions(in *api.SELinuxOptions, out } func autoConvert_v1_Secret_To_api_Secret(in *Secret, out *api.Secret, s conversion.Scope) error { - if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.Data = *(*map[string][]byte)(unsafe.Pointer(&in.Data)) // INFO: in.StringData opted out of conversion generation out.Type = api.SecretType(in.Type) @@ -3818,9 +3776,7 @@ func autoConvert_v1_Secret_To_api_Secret(in *Secret, out *api.Secret, s conversi } func autoConvert_api_Secret_To_v1_Secret(in *api.Secret, out *Secret, s conversion.Scope) error { - if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.Data = *(*map[string][]byte)(unsafe.Pointer(&in.Data)) out.Type = SecretType(in.Type) return nil @@ -3830,6 +3786,28 @@ func Convert_api_Secret_To_v1_Secret(in *api.Secret, out *Secret, s conversion.S return autoConvert_api_Secret_To_v1_Secret(in, out, s) } +func autoConvert_v1_SecretEnvSource_To_api_SecretEnvSource(in *SecretEnvSource, out *api.SecretEnvSource, s conversion.Scope) error { + if err := Convert_v1_LocalObjectReference_To_api_LocalObjectReference(&in.LocalObjectReference, &out.LocalObjectReference, s); err != nil { + return err + } + return nil +} + +func Convert_v1_SecretEnvSource_To_api_SecretEnvSource(in *SecretEnvSource, out *api.SecretEnvSource, s conversion.Scope) error { + return autoConvert_v1_SecretEnvSource_To_api_SecretEnvSource(in, out, s) +} + +func autoConvert_api_SecretEnvSource_To_v1_SecretEnvSource(in *api.SecretEnvSource, out *SecretEnvSource, s conversion.Scope) error { + if err := Convert_api_LocalObjectReference_To_v1_LocalObjectReference(&in.LocalObjectReference, &out.LocalObjectReference, s); err != nil { + return err + } + return nil +} + +func Convert_api_SecretEnvSource_To_v1_SecretEnvSource(in *api.SecretEnvSource, out *SecretEnvSource, s conversion.Scope) error { + return autoConvert_api_SecretEnvSource_To_v1_SecretEnvSource(in, out, s) +} + func autoConvert_v1_SecretKeySelector_To_api_SecretKeySelector(in *SecretKeySelector, out *api.SecretKeySelector, s conversion.Scope) error { if err := Convert_v1_LocalObjectReference_To_api_LocalObjectReference(&in.LocalObjectReference, &out.LocalObjectReference, s); err != nil { return err @@ -3967,9 +3945,7 @@ func Convert_api_SerializedReference_To_v1_SerializedReference(in *api.Serialize } func autoConvert_v1_Service_To_api_Service(in *Service, out *api.Service, s conversion.Scope) error { - if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_ServiceSpec_To_api_ServiceSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -3984,9 +3960,7 @@ func Convert_v1_Service_To_api_Service(in *Service, out *api.Service, s conversi } func autoConvert_api_Service_To_v1_Service(in *api.Service, out *Service, s conversion.Scope) error { - if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_api_ServiceSpec_To_v1_ServiceSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -4001,9 +3975,7 @@ func Convert_api_Service_To_v1_Service(in *api.Service, out *Service, s conversi } func autoConvert_v1_ServiceAccount_To_api_ServiceAccount(in *ServiceAccount, out *api.ServiceAccount, s conversion.Scope) error { - if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.Secrets = *(*[]api.ObjectReference)(unsafe.Pointer(&in.Secrets)) out.ImagePullSecrets = *(*[]api.LocalObjectReference)(unsafe.Pointer(&in.ImagePullSecrets)) return nil @@ -4014,9 +3986,7 @@ func Convert_v1_ServiceAccount_To_api_ServiceAccount(in *ServiceAccount, out *ap } func autoConvert_api_ServiceAccount_To_v1_ServiceAccount(in *api.ServiceAccount, out *ServiceAccount, s conversion.Scope) error { - if err := Convert_api_ObjectMeta_To_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.Secrets = *(*[]ObjectReference)(unsafe.Pointer(&in.Secrets)) out.ImagePullSecrets = *(*[]LocalObjectReference)(unsafe.Pointer(&in.ImagePullSecrets)) return nil diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/v1/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/v1/zz_generated.deepcopy.go index aeab418f..6a04adcb 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/v1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/v1/zz_generated.deepcopy.go @@ -143,6 +143,7 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error { conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodExecOptions, InType: reflect.TypeOf(&PodExecOptions{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodList, InType: reflect.TypeOf(&PodList{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodLogOptions, InType: reflect.TypeOf(&PodLogOptions{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodPortForwardOptions, InType: reflect.TypeOf(&PodPortForwardOptions{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodProxyOptions, InType: reflect.TypeOf(&PodProxyOptions{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodSecurityContext, InType: reflect.TypeOf(&PodSecurityContext{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodSignature, InType: reflect.TypeOf(&PodSignature{})}, @@ -172,6 +173,7 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error { conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_ResourceRequirements, InType: reflect.TypeOf(&ResourceRequirements{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_SELinuxOptions, InType: reflect.TypeOf(&SELinuxOptions{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Secret, InType: reflect.TypeOf(&Secret{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_SecretEnvSource, InType: reflect.TypeOf(&SecretEnvSource{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_SecretKeySelector, InType: reflect.TypeOf(&SecretKeySelector{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_SecretList, InType: reflect.TypeOf(&SecretList{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_SecretVolumeSource, InType: reflect.TypeOf(&SecretVolumeSource{})}, @@ -301,8 +303,10 @@ func DeepCopy_v1_Binding(in interface{}, out interface{}, c *conversion.Cloner) in := in.(*Binding) out := out.(*Binding) *out = *in - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } return nil } @@ -316,16 +320,12 @@ func DeepCopy_v1_Capabilities(in interface{}, out interface{}, c *conversion.Clo if in.Add != nil { in, out := &in.Add, &out.Add *out = make([]Capability, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.Drop != nil { in, out := &in.Drop, &out.Drop *out = make([]Capability, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } @@ -373,15 +373,15 @@ func DeepCopy_v1_ComponentStatus(in interface{}, out interface{}, c *conversion. in := in.(*ComponentStatus) out := out.(*ComponentStatus) *out = *in - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions *out = make([]ComponentCondition, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } @@ -410,8 +410,10 @@ func DeepCopy_v1_ConfigMap(in interface{}, out interface{}, c *conversion.Cloner in := in.(*ConfigMap) out := out.(*ConfigMap) *out = *in - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if in.Data != nil { in, out := &in.Data, &out.Data @@ -501,9 +503,7 @@ func DeepCopy_v1_Container(in interface{}, out interface{}, c *conversion.Cloner if in.Ports != nil { in, out := &in.Ports, &out.Ports *out = make([]ContainerPort, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.EnvFrom != nil { in, out := &in.EnvFrom, &out.EnvFrom @@ -529,9 +529,7 @@ func DeepCopy_v1_Container(in interface{}, out interface{}, c *conversion.Cloner if in.VolumeMounts != nil { in, out := &in.VolumeMounts, &out.VolumeMounts *out = make([]VolumeMount, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.LivenessProbe != nil { in, out := &in.LivenessProbe, &out.LivenessProbe @@ -808,9 +806,7 @@ func DeepCopy_v1_EndpointSubset(in interface{}, out interface{}, c *conversion.C if in.Ports != nil { in, out := &in.Ports, &out.Ports *out = make([]EndpointPort, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } @@ -821,8 +817,10 @@ func DeepCopy_v1_Endpoints(in interface{}, out interface{}, c *conversion.Cloner in := in.(*Endpoints) out := out.(*Endpoints) *out = *in - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if in.Subsets != nil { in, out := &in.Subsets, &out.Subsets @@ -865,6 +863,11 @@ func DeepCopy_v1_EnvFromSource(in interface{}, out interface{}, c *conversion.Cl *out = new(ConfigMapEnvSource) **out = **in } + if in.SecretRef != nil { + in, out := &in.SecretRef, &out.SecretRef + *out = new(SecretEnvSource) + **out = **in + } return nil } } @@ -921,8 +924,10 @@ func DeepCopy_v1_Event(in interface{}, out interface{}, c *conversion.Cloner) er in := in.(*Event) out := out.(*Event) *out = *in - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } out.FirstTimestamp = in.FirstTimestamp.DeepCopy() out.LastTimestamp = in.LastTimestamp.DeepCopy() @@ -1055,9 +1060,7 @@ func DeepCopy_v1_HTTPGetAction(in interface{}, out interface{}, c *conversion.Cl if in.HTTPHeaders != nil { in, out := &in.HTTPHeaders, &out.HTTPHeaders *out = make([]HTTPHeader, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } @@ -1160,8 +1163,10 @@ func DeepCopy_v1_LimitRange(in interface{}, out interface{}, c *conversion.Clone in := in.(*LimitRange) out := out.(*LimitRange) *out = *in - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if err := DeepCopy_v1_LimitRangeSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -1301,9 +1306,7 @@ func DeepCopy_v1_LoadBalancerStatus(in interface{}, out interface{}, c *conversi if in.Ingress != nil { in, out := &in.Ingress, &out.Ingress *out = make([]LoadBalancerIngress, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } @@ -1332,8 +1335,10 @@ func DeepCopy_v1_Namespace(in interface{}, out interface{}, c *conversion.Cloner in := in.(*Namespace) out := out.(*Namespace) *out = *in - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if err := DeepCopy_v1_NamespaceSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -1368,9 +1373,7 @@ func DeepCopy_v1_NamespaceSpec(in interface{}, out interface{}, c *conversion.Cl if in.Finalizers != nil { in, out := &in.Finalizers, &out.Finalizers *out = make([]FinalizerName, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } @@ -1390,8 +1393,10 @@ func DeepCopy_v1_Node(in interface{}, out interface{}, c *conversion.Cloner) err in := in.(*Node) out := out.(*Node) *out = *in - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if err := DeepCopy_v1_NodeStatus(&in.Status, &out.Status, c); err != nil { return err @@ -1587,9 +1592,7 @@ func DeepCopy_v1_NodeStatus(in interface{}, out interface{}, c *conversion.Clone if in.Addresses != nil { in, out := &in.Addresses, &out.Addresses *out = make([]NodeAddress, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.Images != nil { in, out := &in.Images, &out.Images @@ -1603,16 +1606,12 @@ func DeepCopy_v1_NodeStatus(in interface{}, out interface{}, c *conversion.Clone if in.VolumesInUse != nil { in, out := &in.VolumesInUse, &out.VolumesInUse *out = make([]UniqueVolumeName, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.VolumesAttached != nil { in, out := &in.VolumesAttached, &out.VolumesAttached *out = make([]AttachedVolume, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } @@ -1700,8 +1699,10 @@ func DeepCopy_v1_PersistentVolume(in interface{}, out interface{}, c *conversion in := in.(*PersistentVolume) out := out.(*PersistentVolume) *out = *in - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if err := DeepCopy_v1_PersistentVolumeSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -1715,8 +1716,10 @@ func DeepCopy_v1_PersistentVolumeClaim(in interface{}, out interface{}, c *conve in := in.(*PersistentVolumeClaim) out := out.(*PersistentVolumeClaim) *out = *in - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if err := DeepCopy_v1_PersistentVolumeClaimSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -1754,9 +1757,7 @@ func DeepCopy_v1_PersistentVolumeClaimSpec(in interface{}, out interface{}, c *c if in.AccessModes != nil { in, out := &in.AccessModes, &out.AccessModes *out = make([]PersistentVolumeAccessMode, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.Selector != nil { in, out := &in.Selector, &out.Selector @@ -1781,9 +1782,7 @@ func DeepCopy_v1_PersistentVolumeClaimStatus(in interface{}, out interface{}, c if in.AccessModes != nil { in, out := &in.AccessModes, &out.AccessModes *out = make([]PersistentVolumeAccessMode, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.Capacity != nil { in, out := &in.Capacity, &out.Capacity @@ -1945,9 +1944,7 @@ func DeepCopy_v1_PersistentVolumeSpec(in interface{}, out interface{}, c *conver if in.AccessModes != nil { in, out := &in.AccessModes, &out.AccessModes *out = make([]PersistentVolumeAccessMode, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.ClaimRef != nil { in, out := &in.ClaimRef, &out.ClaimRef @@ -1981,8 +1978,10 @@ func DeepCopy_v1_Pod(in interface{}, out interface{}, c *conversion.Cloner) erro in := in.(*Pod) out := out.(*Pod) *out = *in - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if err := DeepCopy_v1_PodSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -2151,6 +2150,20 @@ func DeepCopy_v1_PodLogOptions(in interface{}, out interface{}, c *conversion.Cl } } +func DeepCopy_v1_PodPortForwardOptions(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*PodPortForwardOptions) + out := out.(*PodPortForwardOptions) + *out = *in + if in.Ports != nil { + in, out := &in.Ports, &out.Ports + *out = make([]int32, len(*in)) + copy(*out, *in) + } + return nil + } +} + func DeepCopy_v1_PodProxyOptions(in interface{}, out interface{}, c *conversion.Cloner) error { { in := in.(*PodProxyOptions) @@ -2270,9 +2283,7 @@ func DeepCopy_v1_PodSpec(in interface{}, out interface{}, c *conversion.Cloner) if in.ImagePullSecrets != nil { in, out := &in.ImagePullSecrets, &out.ImagePullSecrets *out = make([]LocalObjectReference, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.Affinity != nil { in, out := &in.Affinity, &out.Affinity @@ -2331,8 +2342,10 @@ func DeepCopy_v1_PodStatusResult(in interface{}, out interface{}, c *conversion. in := in.(*PodStatusResult) out := out.(*PodStatusResult) *out = *in - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if err := DeepCopy_v1_PodStatus(&in.Status, &out.Status, c); err != nil { return err @@ -2346,8 +2359,10 @@ func DeepCopy_v1_PodTemplate(in interface{}, out interface{}, c *conversion.Clon in := in.(*PodTemplate) out := out.(*PodTemplate) *out = *in - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if err := DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil { return err @@ -2379,8 +2394,10 @@ func DeepCopy_v1_PodTemplateSpec(in interface{}, out interface{}, c *conversion. in := in.(*PodTemplateSpec) out := out.(*PodTemplateSpec) *out = *in - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if err := DeepCopy_v1_PodSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -2473,8 +2490,10 @@ func DeepCopy_v1_RangeAllocation(in interface{}, out interface{}, c *conversion. in := in.(*RangeAllocation) out := out.(*RangeAllocation) *out = *in - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if in.Data != nil { in, out := &in.Data, &out.Data @@ -2490,8 +2509,10 @@ func DeepCopy_v1_ReplicationController(in interface{}, out interface{}, c *conve in := in.(*ReplicationController) out := out.(*ReplicationController) *out = *in - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if err := DeepCopy_v1_ReplicationControllerSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -2592,8 +2613,10 @@ func DeepCopy_v1_ResourceQuota(in interface{}, out interface{}, c *conversion.Cl in := in.(*ResourceQuota) out := out.(*ResourceQuota) *out = *in - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if err := DeepCopy_v1_ResourceQuotaSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -2638,9 +2661,7 @@ func DeepCopy_v1_ResourceQuotaSpec(in interface{}, out interface{}, c *conversio if in.Scopes != nil { in, out := &in.Scopes, &out.Scopes *out = make([]ResourceQuotaScope, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } @@ -2706,8 +2727,10 @@ func DeepCopy_v1_Secret(in interface{}, out interface{}, c *conversion.Cloner) e in := in.(*Secret) out := out.(*Secret) *out = *in - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if in.Data != nil { in, out := &in.Data, &out.Data @@ -2731,6 +2754,15 @@ func DeepCopy_v1_Secret(in interface{}, out interface{}, c *conversion.Cloner) e } } +func DeepCopy_v1_SecretEnvSource(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*SecretEnvSource) + out := out.(*SecretEnvSource) + *out = *in + return nil + } +} + func DeepCopy_v1_SecretKeySelector(in interface{}, out interface{}, c *conversion.Cloner) error { { in := in.(*SecretKeySelector) @@ -2836,8 +2868,10 @@ func DeepCopy_v1_Service(in interface{}, out interface{}, c *conversion.Cloner) in := in.(*Service) out := out.(*Service) *out = *in - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if err := DeepCopy_v1_ServiceSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -2854,22 +2888,20 @@ func DeepCopy_v1_ServiceAccount(in interface{}, out interface{}, c *conversion.C in := in.(*ServiceAccount) out := out.(*ServiceAccount) *out = *in - if err := DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if in.Secrets != nil { in, out := &in.Secrets, &out.Secrets *out = make([]ObjectReference, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.ImagePullSecrets != nil { in, out := &in.ImagePullSecrets, &out.ImagePullSecrets *out = make([]LocalObjectReference, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } @@ -2937,9 +2969,7 @@ func DeepCopy_v1_ServiceSpec(in interface{}, out interface{}, c *conversion.Clon if in.Ports != nil { in, out := &in.Ports, &out.Ports *out = make([]ServicePort, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.Selector != nil { in, out := &in.Selector, &out.Selector diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/validation/path/name.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/validation/path/name.go deleted file mode 100644 index a50cd089..00000000 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/validation/path/name.go +++ /dev/null @@ -1,68 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package path - -import ( - "fmt" - "strings" -) - -// NameMayNotBe specifies strings that cannot be used as names specified as path segments (like the REST API or etcd store) -var NameMayNotBe = []string{".", ".."} - -// NameMayNotContain specifies substrings that cannot be used in names specified as path segments (like the REST API or etcd store) -var NameMayNotContain = []string{"/", "%"} - -// IsValidPathSegmentName validates the name can be safely encoded as a path segment -func IsValidPathSegmentName(name string) []string { - for _, illegalName := range NameMayNotBe { - if name == illegalName { - return []string{fmt.Sprintf(`may not be '%s'`, illegalName)} - } - } - - var errors []string - for _, illegalContent := range NameMayNotContain { - if strings.Contains(name, illegalContent) { - errors = append(errors, fmt.Sprintf(`may not contain '%s'`, illegalContent)) - } - } - - return errors -} - -// IsValidPathSegmentPrefix validates the name can be used as a prefix for a name which will be encoded as a path segment -// It does not check for exact matches with disallowed names, since an arbitrary suffix might make the name valid -func IsValidPathSegmentPrefix(name string) []string { - var errors []string - for _, illegalContent := range NameMayNotContain { - if strings.Contains(name, illegalContent) { - errors = append(errors, fmt.Sprintf(`may not contain '%s'`, illegalContent)) - } - } - - return errors -} - -// ValidatePathSegmentName validates the name can be safely encoded as a path segment -func ValidatePathSegmentName(name string, prefix bool) []string { - if prefix { - return IsValidPathSegmentPrefix(name) - } else { - return IsValidPathSegmentName(name) - } -} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/zz_generated.deepcopy.go index 55887c13..b489267e 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/api/zz_generated.deepcopy.go @@ -23,10 +23,10 @@ package api import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" + fields "k8s.io/apimachinery/pkg/fields" labels "k8s.io/apimachinery/pkg/labels" runtime "k8s.io/apimachinery/pkg/runtime" types "k8s.io/apimachinery/pkg/types" - fields "k8s.io/client-go/pkg/fields" reflect "reflect" ) @@ -146,6 +146,7 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error { conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodExecOptions, InType: reflect.TypeOf(&PodExecOptions{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodList, InType: reflect.TypeOf(&PodList{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodLogOptions, InType: reflect.TypeOf(&PodLogOptions{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodPortForwardOptions, InType: reflect.TypeOf(&PodPortForwardOptions{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodProxyOptions, InType: reflect.TypeOf(&PodProxyOptions{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodSecurityContext, InType: reflect.TypeOf(&PodSecurityContext{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodSignature, InType: reflect.TypeOf(&PodSignature{})}, @@ -175,6 +176,7 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error { conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_ResourceRequirements, InType: reflect.TypeOf(&ResourceRequirements{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_SELinuxOptions, InType: reflect.TypeOf(&SELinuxOptions{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Secret, InType: reflect.TypeOf(&Secret{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_SecretEnvSource, InType: reflect.TypeOf(&SecretEnvSource{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_SecretKeySelector, InType: reflect.TypeOf(&SecretKeySelector{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_SecretList, InType: reflect.TypeOf(&SecretList{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_SecretVolumeSource, InType: reflect.TypeOf(&SecretVolumeSource{})}, @@ -304,8 +306,10 @@ func DeepCopy_api_Binding(in interface{}, out interface{}, c *conversion.Cloner) in := in.(*Binding) out := out.(*Binding) *out = *in - if err := DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } return nil } @@ -319,16 +323,12 @@ func DeepCopy_api_Capabilities(in interface{}, out interface{}, c *conversion.Cl if in.Add != nil { in, out := &in.Add, &out.Add *out = make([]Capability, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.Drop != nil { in, out := &in.Drop, &out.Drop *out = make([]Capability, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } @@ -376,15 +376,15 @@ func DeepCopy_api_ComponentStatus(in interface{}, out interface{}, c *conversion in := in.(*ComponentStatus) out := out.(*ComponentStatus) *out = *in - if err := DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions *out = make([]ComponentCondition, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } @@ -413,8 +413,10 @@ func DeepCopy_api_ConfigMap(in interface{}, out interface{}, c *conversion.Clone in := in.(*ConfigMap) out := out.(*ConfigMap) *out = *in - if err := DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.Data != nil { in, out := &in.Data, &out.Data @@ -504,9 +506,7 @@ func DeepCopy_api_Container(in interface{}, out interface{}, c *conversion.Clone if in.Ports != nil { in, out := &in.Ports, &out.Ports *out = make([]ContainerPort, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.EnvFrom != nil { in, out := &in.EnvFrom, &out.EnvFrom @@ -532,9 +532,7 @@ func DeepCopy_api_Container(in interface{}, out interface{}, c *conversion.Clone if in.VolumeMounts != nil { in, out := &in.VolumeMounts, &out.VolumeMounts *out = make([]VolumeMount, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.LivenessProbe != nil { in, out := &in.LivenessProbe, &out.LivenessProbe @@ -836,9 +834,7 @@ func DeepCopy_api_EndpointSubset(in interface{}, out interface{}, c *conversion. if in.Ports != nil { in, out := &in.Ports, &out.Ports *out = make([]EndpointPort, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } @@ -849,8 +845,10 @@ func DeepCopy_api_Endpoints(in interface{}, out interface{}, c *conversion.Clone in := in.(*Endpoints) out := out.(*Endpoints) *out = *in - if err := DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.Subsets != nil { in, out := &in.Subsets, &out.Subsets @@ -893,6 +891,11 @@ func DeepCopy_api_EnvFromSource(in interface{}, out interface{}, c *conversion.C *out = new(ConfigMapEnvSource) **out = **in } + if in.SecretRef != nil { + in, out := &in.SecretRef, &out.SecretRef + *out = new(SecretEnvSource) + **out = **in + } return nil } } @@ -949,8 +952,10 @@ func DeepCopy_api_Event(in interface{}, out interface{}, c *conversion.Cloner) e in := in.(*Event) out := out.(*Event) *out = *in - if err := DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } out.FirstTimestamp = in.FirstTimestamp.DeepCopy() out.LastTimestamp = in.LastTimestamp.DeepCopy() @@ -1083,9 +1088,7 @@ func DeepCopy_api_HTTPGetAction(in interface{}, out interface{}, c *conversion.C if in.HTTPHeaders != nil { in, out := &in.HTTPHeaders, &out.HTTPHeaders *out = make([]HTTPHeader, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } @@ -1188,8 +1191,10 @@ func DeepCopy_api_LimitRange(in interface{}, out interface{}, c *conversion.Clon in := in.(*LimitRange) out := out.(*LimitRange) *out = *in - if err := DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_api_LimitRangeSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -1345,9 +1350,7 @@ func DeepCopy_api_LoadBalancerStatus(in interface{}, out interface{}, c *convers if in.Ingress != nil { in, out := &in.Ingress, &out.Ingress *out = make([]LoadBalancerIngress, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } @@ -1376,8 +1379,10 @@ func DeepCopy_api_Namespace(in interface{}, out interface{}, c *conversion.Clone in := in.(*Namespace) out := out.(*Namespace) *out = *in - if err := DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_api_NamespaceSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -1412,9 +1417,7 @@ func DeepCopy_api_NamespaceSpec(in interface{}, out interface{}, c *conversion.C if in.Finalizers != nil { in, out := &in.Finalizers, &out.Finalizers *out = make([]FinalizerName, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } @@ -1434,8 +1437,10 @@ func DeepCopy_api_Node(in interface{}, out interface{}, c *conversion.Cloner) er in := in.(*Node) out := out.(*Node) *out = *in - if err := DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_api_NodeStatus(&in.Status, &out.Status, c); err != nil { return err @@ -1631,9 +1636,7 @@ func DeepCopy_api_NodeStatus(in interface{}, out interface{}, c *conversion.Clon if in.Addresses != nil { in, out := &in.Addresses, &out.Addresses *out = make([]NodeAddress, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.Images != nil { in, out := &in.Images, &out.Images @@ -1647,16 +1650,12 @@ func DeepCopy_api_NodeStatus(in interface{}, out interface{}, c *conversion.Clon if in.VolumesInUse != nil { in, out := &in.VolumesInUse, &out.VolumesInUse *out = make([]UniqueVolumeName, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.VolumesAttached != nil { in, out := &in.VolumesAttached, &out.VolumesAttached *out = make([]AttachedVolume, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } @@ -1744,8 +1743,10 @@ func DeepCopy_api_PersistentVolume(in interface{}, out interface{}, c *conversio in := in.(*PersistentVolume) out := out.(*PersistentVolume) *out = *in - if err := DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_api_PersistentVolumeSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -1759,8 +1760,10 @@ func DeepCopy_api_PersistentVolumeClaim(in interface{}, out interface{}, c *conv in := in.(*PersistentVolumeClaim) out := out.(*PersistentVolumeClaim) *out = *in - if err := DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_api_PersistentVolumeClaimSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -1798,9 +1801,7 @@ func DeepCopy_api_PersistentVolumeClaimSpec(in interface{}, out interface{}, c * if in.AccessModes != nil { in, out := &in.AccessModes, &out.AccessModes *out = make([]PersistentVolumeAccessMode, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.Selector != nil { in, out := &in.Selector, &out.Selector @@ -1825,9 +1826,7 @@ func DeepCopy_api_PersistentVolumeClaimStatus(in interface{}, out interface{}, c if in.AccessModes != nil { in, out := &in.AccessModes, &out.AccessModes *out = make([]PersistentVolumeAccessMode, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.Capacity != nil { in, out := &in.Capacity, &out.Capacity @@ -1989,9 +1988,7 @@ func DeepCopy_api_PersistentVolumeSpec(in interface{}, out interface{}, c *conve if in.AccessModes != nil { in, out := &in.AccessModes, &out.AccessModes *out = make([]PersistentVolumeAccessMode, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.ClaimRef != nil { in, out := &in.ClaimRef, &out.ClaimRef @@ -2025,8 +2022,10 @@ func DeepCopy_api_Pod(in interface{}, out interface{}, c *conversion.Cloner) err in := in.(*Pod) out := out.(*Pod) *out = *in - if err := DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_api_PodSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -2195,6 +2194,20 @@ func DeepCopy_api_PodLogOptions(in interface{}, out interface{}, c *conversion.C } } +func DeepCopy_api_PodPortForwardOptions(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*PodPortForwardOptions) + out := out.(*PodPortForwardOptions) + *out = *in + if in.Ports != nil { + in, out := &in.Ports, &out.Ports + *out = make([]int32, len(*in)) + copy(*out, *in) + } + return nil + } +} + func DeepCopy_api_PodProxyOptions(in interface{}, out interface{}, c *conversion.Cloner) error { { in := in.(*PodProxyOptions) @@ -2314,9 +2327,7 @@ func DeepCopy_api_PodSpec(in interface{}, out interface{}, c *conversion.Cloner) if in.ImagePullSecrets != nil { in, out := &in.ImagePullSecrets, &out.ImagePullSecrets *out = make([]LocalObjectReference, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.Affinity != nil { in, out := &in.Affinity, &out.Affinity @@ -2375,8 +2386,10 @@ func DeepCopy_api_PodStatusResult(in interface{}, out interface{}, c *conversion in := in.(*PodStatusResult) out := out.(*PodStatusResult) *out = *in - if err := DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_api_PodStatus(&in.Status, &out.Status, c); err != nil { return err @@ -2390,8 +2403,10 @@ func DeepCopy_api_PodTemplate(in interface{}, out interface{}, c *conversion.Clo in := in.(*PodTemplate) out := out.(*PodTemplate) *out = *in - if err := DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_api_PodTemplateSpec(&in.Template, &out.Template, c); err != nil { return err @@ -2423,8 +2438,10 @@ func DeepCopy_api_PodTemplateSpec(in interface{}, out interface{}, c *conversion in := in.(*PodTemplateSpec) out := out.(*PodTemplateSpec) *out = *in - if err := DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_api_PodSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -2517,8 +2534,10 @@ func DeepCopy_api_RangeAllocation(in interface{}, out interface{}, c *conversion in := in.(*RangeAllocation) out := out.(*RangeAllocation) *out = *in - if err := DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.Data != nil { in, out := &in.Data, &out.Data @@ -2534,8 +2553,10 @@ func DeepCopy_api_ReplicationController(in interface{}, out interface{}, c *conv in := in.(*ReplicationController) out := out.(*ReplicationController) *out = *in - if err := DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_api_ReplicationControllerSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -2631,8 +2652,10 @@ func DeepCopy_api_ResourceQuota(in interface{}, out interface{}, c *conversion.C in := in.(*ResourceQuota) out := out.(*ResourceQuota) *out = *in - if err := DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_api_ResourceQuotaSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -2677,9 +2700,7 @@ func DeepCopy_api_ResourceQuotaSpec(in interface{}, out interface{}, c *conversi if in.Scopes != nil { in, out := &in.Scopes, &out.Scopes *out = make([]ResourceQuotaScope, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } @@ -2745,8 +2766,10 @@ func DeepCopy_api_Secret(in interface{}, out interface{}, c *conversion.Cloner) in := in.(*Secret) out := out.(*Secret) *out = *in - if err := DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.Data != nil { in, out := &in.Data, &out.Data @@ -2763,6 +2786,15 @@ func DeepCopy_api_Secret(in interface{}, out interface{}, c *conversion.Cloner) } } +func DeepCopy_api_SecretEnvSource(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*SecretEnvSource) + out := out.(*SecretEnvSource) + *out = *in + return nil + } +} + func DeepCopy_api_SecretKeySelector(in interface{}, out interface{}, c *conversion.Cloner) error { { in := in.(*SecretKeySelector) @@ -2868,8 +2900,10 @@ func DeepCopy_api_Service(in interface{}, out interface{}, c *conversion.Cloner) in := in.(*Service) out := out.(*Service) *out = *in - if err := DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_api_ServiceSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -2886,22 +2920,20 @@ func DeepCopy_api_ServiceAccount(in interface{}, out interface{}, c *conversion. in := in.(*ServiceAccount) out := out.(*ServiceAccount) *out = *in - if err := DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.Secrets != nil { in, out := &in.Secrets, &out.Secrets *out = make([]ObjectReference, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.ImagePullSecrets != nil { in, out := &in.ImagePullSecrets, &out.ImagePullSecrets *out = make([]LocalObjectReference, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } @@ -2969,9 +3001,7 @@ func DeepCopy_api_ServiceSpec(in interface{}, out interface{}, c *conversion.Clo if in.Ports != nil { in, out := &in.Ports, &out.Ports *out = make([]ServicePort, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.Selector != nil { in, out := &in.Selector, &out.Selector diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/apps/install/install.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/apps/install/install.go index 3a9263d6..ca50f3ea 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/apps/install/install.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/apps/install/install.go @@ -19,12 +19,20 @@ limitations under the License. package install import ( - "k8s.io/client-go/pkg/apimachinery/announced" + "k8s.io/apimachinery/pkg/apimachinery/announced" + "k8s.io/apimachinery/pkg/apimachinery/registered" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/client-go/pkg/api" "k8s.io/client-go/pkg/apis/apps" "k8s.io/client-go/pkg/apis/apps/v1beta1" ) func init() { + Install(api.GroupFactoryRegistry, api.Registry, api.Scheme) +} + +// Install registers the API group and adds types to a scheme +func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) { if err := announced.NewGroupMetaFactory( &announced.GroupMetaFactoryArgs{ GroupName: apps.GroupName, @@ -35,7 +43,7 @@ func init() { announced.VersionToSchemeFunc{ v1beta1.SchemeGroupVersion.Version: v1beta1.AddToScheme, }, - ).Announce().RegisterAndEnable(); err != nil { + ).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil { panic(err) } } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/apps/register.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/apps/register.go index a5e4e7ca..fc1ea934 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/apps/register.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/apps/register.go @@ -49,7 +49,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &StatefulSet{}, &StatefulSetList{}, - &api.ListOptions{}, &api.DeleteOptions{}, ) return nil diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/apps/types.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/apps/types.go index 59512f8d..cd5ce828 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/apps/types.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/apps/types.go @@ -32,7 +32,7 @@ import ( type StatefulSet struct { metav1.TypeMeta // +optional - api.ObjectMeta + metav1.ObjectMeta // Spec defines the desired identities of pods in this set. // +optional diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/generated.pb.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/generated.pb.go index b6e8ba8f..dc0db856 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/generated.pb.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/generated.pb.go @@ -343,7 +343,7 @@ func (this *StatefulSet) String() string { return "nil" } s := strings.Join([]string{`&StatefulSet{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "StatefulSetSpec", "StatefulSetSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "StatefulSetStatus", "StatefulSetStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -1034,45 +1034,45 @@ var ( var fileDescriptorGenerated = []byte{ // 645 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x9c, 0x53, 0x4d, 0x6f, 0xd3, 0x40, - 0x10, 0x8d, 0x93, 0xa6, 0x84, 0x4d, 0xf9, 0x5a, 0x2a, 0x14, 0x55, 0xc8, 0xad, 0x72, 0x21, 0x48, - 0xed, 0x5a, 0x69, 0x0b, 0x54, 0x1c, 0x8d, 0x04, 0x42, 0x02, 0x8a, 0x1c, 0x54, 0x41, 0x81, 0xc3, - 0xda, 0x99, 0xa6, 0x4b, 0xfc, 0x25, 0xef, 0x38, 0x12, 0x37, 0x2e, 0x1c, 0xb8, 0xf1, 0x2f, 0xf8, - 0x07, 0xfc, 0x86, 0x8a, 0x53, 0x8f, 0x9c, 0x2a, 0x1a, 0xfe, 0x08, 0xf2, 0x66, 0x93, 0x18, 0x9c, - 0xd0, 0xaa, 0x37, 0xcf, 0xee, 0xbc, 0xf7, 0x66, 0xde, 0x3e, 0x93, 0x07, 0xfd, 0x1d, 0xc9, 0x44, - 0x64, 0xf5, 0x53, 0x17, 0x92, 0x10, 0x10, 0xa4, 0x15, 0xf7, 0x7b, 0x16, 0x8f, 0x85, 0xb4, 0x78, - 0x1c, 0x4b, 0x6b, 0xd0, 0x76, 0x01, 0x79, 0xdb, 0xea, 0x41, 0x08, 0x09, 0x47, 0xe8, 0xb2, 0x38, - 0x89, 0x30, 0xa2, 0x77, 0x46, 0x40, 0x36, 0x05, 0xb2, 0xb8, 0xdf, 0x63, 0x19, 0x90, 0x65, 0x40, - 0xa6, 0x81, 0x2b, 0x1b, 0x3d, 0x81, 0x87, 0xa9, 0xcb, 0xbc, 0x28, 0xb0, 0x7a, 0x51, 0x2f, 0xb2, - 0x14, 0xde, 0x4d, 0x0f, 0x54, 0xa5, 0x0a, 0xf5, 0x35, 0xe2, 0x5d, 0xd9, 0xd6, 0x03, 0xf1, 0x58, - 0x04, 0xdc, 0x3b, 0x14, 0x21, 0x24, 0x1f, 0xa7, 0x23, 0x05, 0x80, 0xdc, 0x1a, 0x14, 0xa6, 0x59, - 0xb1, 0xe6, 0xa1, 0x92, 0x34, 0x44, 0x11, 0x40, 0x01, 0x70, 0xff, 0x2c, 0x80, 0xf4, 0x0e, 0x21, - 0xe0, 0x05, 0xdc, 0xe6, 0x5c, 0xbf, 0xac, 0x04, 0x64, 0x94, 0x26, 0x5e, 0x51, 0x6b, 0x7d, 0x3e, - 0x66, 0xc6, 0x2a, 0xed, 0xd9, 0xdd, 0x29, 0x0a, 0xdf, 0x12, 0x21, 0x4a, 0x4c, 0xfe, 0x85, 0x34, - 0xbf, 0x95, 0x49, 0xbd, 0x83, 0x1c, 0xe1, 0x20, 0xf5, 0x3b, 0x80, 0xf4, 0x35, 0xa9, 0x65, 0x46, - 0x75, 0x39, 0xf2, 0x86, 0xb1, 0x66, 0xb4, 0xea, 0x9b, 0x2d, 0x36, 0xf7, 0xb9, 0xd8, 0xa0, 0xcd, - 0x76, 0xdd, 0x0f, 0xe0, 0xe1, 0x73, 0x40, 0x6e, 0xd3, 0xa3, 0x93, 0xd5, 0xd2, 0xf0, 0x64, 0x95, - 0x4c, 0xcf, 0x9c, 0x09, 0x1b, 0xdd, 0x27, 0x0b, 0x32, 0x06, 0xaf, 0x51, 0x56, 0xac, 0x3b, 0xec, - 0x9c, 0x21, 0x60, 0xb9, 0xe9, 0x3a, 0x31, 0x78, 0xf6, 0x92, 0x56, 0x59, 0xc8, 0x2a, 0x47, 0x71, - 0x52, 0x97, 0x2c, 0x4a, 0xe4, 0x98, 0xca, 0x46, 0x45, 0xb1, 0x3f, 0xbc, 0x10, 0xbb, 0x62, 0xb0, - 0xaf, 0x6a, 0xfe, 0xc5, 0x51, 0xed, 0x68, 0xe6, 0xe6, 0x0f, 0x83, 0x5c, 0xcb, 0x75, 0x3f, 0x13, - 0x12, 0xe9, 0xbb, 0x82, 0x5b, 0x6c, 0xac, 0x9c, 0x4f, 0xc7, 0x54, 0x3b, 0xeb, 0xce, 0x5c, 0xcb, - 0xd0, 0xca, 0xb3, 0xeb, 0x5a, 0xad, 0x36, 0x3e, 0xc9, 0x39, 0xf6, 0x86, 0x54, 0x05, 0x42, 0x20, - 0x1b, 0xe5, 0xb5, 0x4a, 0xab, 0xbe, 0xb9, 0x7d, 0x91, 0xa5, 0xec, 0x2b, 0x5a, 0xa0, 0xfa, 0x34, - 0xa3, 0x72, 0x46, 0x8c, 0xcd, 0xef, 0x95, 0xbf, 0x96, 0xc9, 0xac, 0xa4, 0x2d, 0x52, 0x4b, 0x20, - 0xf6, 0x85, 0xc7, 0xa5, 0x5a, 0xa6, 0x6a, 0x2f, 0x65, 0x83, 0x39, 0xfa, 0xcc, 0x99, 0xdc, 0xd2, - 0xf7, 0xa4, 0x26, 0xc1, 0x07, 0x0f, 0xa3, 0x44, 0x3f, 0xe7, 0xd6, 0x39, 0xd7, 0xe6, 0x2e, 0xf8, - 0x1d, 0x0d, 0x1d, 0xd1, 0x8f, 0x2b, 0x67, 0x42, 0x49, 0xdf, 0x92, 0x1a, 0x42, 0x10, 0xfb, 0x1c, - 0x41, 0xbf, 0xe7, 0xc6, 0xff, 0x33, 0xf8, 0x32, 0xea, 0xbe, 0xd2, 0x00, 0x15, 0x91, 0x89, 0xa9, - 0xe3, 0x53, 0x67, 0x42, 0x48, 0x3f, 0x1b, 0x64, 0x79, 0x10, 0xf9, 0x69, 0x00, 0x8f, 0x7c, 0x2e, - 0x82, 0x71, 0x87, 0x6c, 0x2c, 0x28, 0x93, 0xb7, 0xce, 0x50, 0x82, 0x44, 0x0a, 0x89, 0x10, 0xe2, - 0xde, 0x94, 0xc3, 0xbe, 0xad, 0xf5, 0x96, 0xf7, 0x66, 0x10, 0x3b, 0x33, 0xe5, 0xe8, 0x3d, 0x52, - 0x97, 0x90, 0x0c, 0x84, 0x07, 0x2f, 0x78, 0x00, 0x8d, 0xea, 0x9a, 0xd1, 0xba, 0x6c, 0xdf, 0xd4, - 0x44, 0xf5, 0xce, 0xf4, 0xca, 0xc9, 0xf7, 0x35, 0xbf, 0x18, 0xe4, 0x46, 0x21, 0xb3, 0xf4, 0x31, - 0xa1, 0x91, 0x9b, 0xb5, 0x41, 0xf7, 0xc9, 0xe8, 0x07, 0x17, 0x51, 0xa8, 0x1e, 0xb1, 0x62, 0xdf, - 0x1a, 0x9e, 0xac, 0xd2, 0xdd, 0xc2, 0xad, 0x33, 0x03, 0x41, 0xd7, 0x73, 0x11, 0x28, 0xab, 0x08, - 0x4c, 0xac, 0x2c, 0xc6, 0xc0, 0xbe, 0x7b, 0x74, 0x6a, 0x96, 0x8e, 0x4f, 0xcd, 0xd2, 0xcf, 0x53, - 0xb3, 0xf4, 0x69, 0x68, 0x1a, 0x47, 0x43, 0xd3, 0x38, 0x1e, 0x9a, 0xc6, 0xaf, 0xa1, 0x69, 0x7c, - 0xfd, 0x6d, 0x96, 0xf6, 0x2f, 0xe9, 0x44, 0xfe, 0x09, 0x00, 0x00, 0xff, 0xff, 0xbb, 0xf0, 0xd3, - 0x7e, 0x2c, 0x06, 0x00, 0x00, + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x9c, 0x93, 0xcd, 0x6e, 0xd3, 0x40, + 0x10, 0xc7, 0xe3, 0xa4, 0x29, 0x61, 0x53, 0xbe, 0x96, 0x0a, 0x45, 0x15, 0x72, 0xab, 0x5c, 0x08, + 0x52, 0xbb, 0x26, 0x6d, 0x81, 0x8a, 0xa3, 0x91, 0x40, 0x48, 0x40, 0x91, 0x83, 0x2a, 0x51, 0x40, + 0x62, 0xed, 0x4c, 0xd3, 0x25, 0xfe, 0x92, 0x77, 0x1c, 0x89, 0x1b, 0x17, 0x0e, 0xdc, 0x78, 0x13, + 0x6e, 0x3c, 0x43, 0xc5, 0xa9, 0x47, 0x4e, 0x15, 0x0d, 0x2f, 0x82, 0xbc, 0xd9, 0x24, 0x06, 0x27, + 0x6a, 0xd5, 0x5b, 0x66, 0x3d, 0xff, 0xdf, 0xcc, 0xfc, 0x67, 0x42, 0x1e, 0xf6, 0x77, 0x24, 0x13, + 0x91, 0xd5, 0x4f, 0x5d, 0x48, 0x42, 0x40, 0x90, 0x56, 0xdc, 0xef, 0x59, 0x3c, 0x16, 0xd2, 0xe2, + 0x71, 0x2c, 0xad, 0x41, 0xdb, 0x05, 0xe4, 0x6d, 0xab, 0x07, 0x21, 0x24, 0x1c, 0xa1, 0xcb, 0xe2, + 0x24, 0xc2, 0x88, 0xde, 0x19, 0x09, 0xd9, 0x54, 0xc8, 0xe2, 0x7e, 0x8f, 0x65, 0x42, 0x96, 0x09, + 0x99, 0x16, 0xae, 0x6c, 0xf4, 0x04, 0x1e, 0xa6, 0x2e, 0xf3, 0xa2, 0xc0, 0xea, 0x45, 0xbd, 0xc8, + 0x52, 0x7a, 0x37, 0x3d, 0x50, 0x91, 0x0a, 0xd4, 0xaf, 0x11, 0x77, 0x65, 0x5b, 0x37, 0xc4, 0x63, + 0x11, 0x70, 0xef, 0x50, 0x84, 0x90, 0x7c, 0x9a, 0xb6, 0x14, 0x00, 0x72, 0x6b, 0x50, 0xe8, 0x66, + 0xc5, 0x9a, 0xa7, 0x4a, 0xd2, 0x10, 0x45, 0x00, 0x05, 0xc1, 0x83, 0xb3, 0x04, 0xd2, 0x3b, 0x84, + 0x80, 0x17, 0x74, 0x9b, 0x73, 0xfd, 0xb2, 0x12, 0x90, 0x51, 0x9a, 0x78, 0xc5, 0x5a, 0xeb, 0xf3, + 0x35, 0x33, 0x46, 0x69, 0xcf, 0xce, 0x4e, 0x51, 0xf8, 0x96, 0x08, 0x51, 0x62, 0xf2, 0xbf, 0xa4, + 0xf9, 0xbd, 0x4c, 0xea, 0x1d, 0xe4, 0x08, 0x07, 0xa9, 0xdf, 0x01, 0xa4, 0x1f, 0x48, 0x2d, 0x33, + 0xaa, 0xcb, 0x91, 0x37, 0x8c, 0x35, 0xa3, 0x55, 0xdf, 0xbc, 0xc7, 0xf4, 0xba, 0xf2, 0xf3, 0x4e, + 0x17, 0x96, 0x65, 0xb3, 0x41, 0x9b, 0xed, 0xba, 0x1f, 0xc1, 0xc3, 0x17, 0x80, 0xdc, 0xa6, 0x47, + 0x27, 0xab, 0xa5, 0xe1, 0xc9, 0x2a, 0x99, 0xbe, 0x39, 0x13, 0x2a, 0xdd, 0x27, 0x0b, 0x32, 0x06, + 0xaf, 0x51, 0x56, 0xf4, 0x1d, 0x76, 0xce, 0x63, 0x60, 0xb9, 0x2e, 0x3b, 0x31, 0x78, 0xf6, 0x92, + 0xae, 0xb2, 0x90, 0x45, 0x8e, 0x62, 0x52, 0x97, 0x2c, 0x4a, 0xe4, 0x98, 0xca, 0x46, 0x45, 0xd1, + 0x1f, 0x5d, 0x88, 0xae, 0x08, 0xf6, 0x55, 0xcd, 0x5f, 0x1c, 0xc5, 0x8e, 0x26, 0x37, 0x7f, 0x1a, + 0xe4, 0x5a, 0x2e, 0xfb, 0xb9, 0x90, 0x48, 0xdf, 0x15, 0x5c, 0x63, 0xe7, 0x73, 0x2d, 0x53, 0x2b, + 0xcf, 0xae, 0xeb, 0x6a, 0xb5, 0xf1, 0x4b, 0xce, 0xb1, 0x37, 0xa4, 0x2a, 0x10, 0x02, 0xd9, 0x28, + 0xaf, 0x55, 0x5a, 0xf5, 0xcd, 0xed, 0x8b, 0x0c, 0x65, 0x5f, 0xd1, 0x05, 0xaa, 0xcf, 0x32, 0x94, + 0x33, 0x22, 0x36, 0x7f, 0x54, 0xfe, 0x19, 0x26, 0xb3, 0x92, 0xb6, 0x48, 0x2d, 0x81, 0xd8, 0x17, + 0x1e, 0x97, 0x6a, 0x98, 0xaa, 0xbd, 0x94, 0x35, 0xe6, 0xe8, 0x37, 0x67, 0xf2, 0x95, 0xbe, 0x27, + 0x35, 0x09, 0x3e, 0x78, 0x18, 0x25, 0x7a, 0x9d, 0x5b, 0xe7, 0x1c, 0x9b, 0xbb, 0xe0, 0x77, 0xb4, + 0x74, 0x84, 0x1f, 0x47, 0xce, 0x04, 0x49, 0xdf, 0x92, 0x1a, 0x42, 0x10, 0xfb, 0x1c, 0x41, 0xef, + 0x73, 0x63, 0xfe, 0xe8, 0x19, 0xf6, 0x55, 0xd4, 0x7d, 0xad, 0x05, 0xea, 0x44, 0x26, 0xa6, 0x8e, + 0x5f, 0x9d, 0x09, 0x90, 0x7e, 0x31, 0xc8, 0xf2, 0x20, 0xf2, 0xd3, 0x00, 0x1e, 0xfb, 0x5c, 0x04, + 0xe3, 0x0c, 0xd9, 0x58, 0x50, 0x26, 0x6f, 0x9d, 0x51, 0x09, 0x12, 0x29, 0x24, 0x42, 0x88, 0x7b, + 0x53, 0x86, 0x7d, 0x5b, 0xd7, 0x5b, 0xde, 0x9b, 0x01, 0x76, 0x66, 0x96, 0xa3, 0xf7, 0x49, 0x5d, + 0x42, 0x32, 0x10, 0x1e, 0xbc, 0xe4, 0x01, 0x34, 0xaa, 0x6b, 0x46, 0xeb, 0xb2, 0x7d, 0x53, 0x83, + 0xea, 0x9d, 0xe9, 0x27, 0x27, 0x9f, 0xd7, 0xfc, 0x6a, 0x90, 0x1b, 0x85, 0x9b, 0xa5, 0x4f, 0x08, + 0x8d, 0xdc, 0x2c, 0x0d, 0xba, 0x4f, 0x47, 0x7f, 0x74, 0x11, 0x85, 0x6a, 0x89, 0x15, 0xfb, 0xd6, + 0xf0, 0x64, 0x95, 0xee, 0x16, 0xbe, 0x3a, 0x33, 0x14, 0x74, 0x3d, 0x77, 0x02, 0x65, 0x75, 0x02, + 0x13, 0x2b, 0x8b, 0x67, 0x60, 0xdf, 0x3d, 0x3a, 0x35, 0x4b, 0xc7, 0xa7, 0x66, 0xe9, 0xd7, 0xa9, + 0x59, 0xfa, 0x3c, 0x34, 0x8d, 0xa3, 0xa1, 0x69, 0x1c, 0x0f, 0x4d, 0xe3, 0xf7, 0xd0, 0x34, 0xbe, + 0xfd, 0x31, 0x4b, 0xfb, 0x97, 0xf4, 0x45, 0xfe, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xe5, 0x5a, 0x18, + 0x81, 0x34, 0x06, 0x00, 0x00, } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/generated.proto b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/generated.proto index 249af7dc..e7555c9d 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/generated.proto +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/generated.proto @@ -39,7 +39,7 @@ option go_package = "v1beta1"; // map to the same storage identity. message StatefulSet { // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec defines the desired identities of pods in this set. // +optional diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/register.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/register.go index bdef65d8..bf5ae0c7 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/register.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/register.go @@ -44,7 +44,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &StatefulSet{}, &StatefulSetList{}, - &v1.ListOptions{}, &v1.DeleteOptions{}, &metav1.ExportOptions{}, &metav1.GetOptions{}, diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/types.generated.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/types.generated.go index 6c961cee..5effa1be 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/types.generated.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/types.generated.go @@ -26,9 +26,9 @@ import ( "fmt" codec1978 "github.com/ugorji/go/codec" pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - pkg3_types "k8s.io/apimachinery/pkg/types" + pkg2_types "k8s.io/apimachinery/pkg/types" pkg4_resource "k8s.io/client-go/pkg/api/resource" - pkg2_v1 "k8s.io/client-go/pkg/api/v1" + pkg3_v1 "k8s.io/client-go/pkg/api/v1" pkg5_intstr "k8s.io/client-go/pkg/util/intstr" "reflect" "runtime" @@ -66,9 +66,9 @@ func init() { } if false { // reference the types, but skip this branch at build/run time var v0 pkg1_v1.TypeMeta - var v1 pkg3_types.UID + var v1 pkg2_types.UID var v2 pkg4_resource.Quantity - var v3 pkg2_v1.ObjectMeta + var v3 pkg3_v1.PodTemplateSpec var v4 pkg5_intstr.IntOrString var v5 time.Time _, _, _, _, _, _ = v0, v1, v2, v3, v4, v5 @@ -164,7 +164,13 @@ func (x *StatefulSet) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -174,7 +180,13 @@ func (x *StatefulSet) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -298,24 +310,30 @@ func (x *StatefulSet) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = StatefulSetSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = StatefulSetStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -328,16 +346,16 @@ func (x *StatefulSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -345,21 +363,21 @@ func (x *StatefulSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -367,38 +385,44 @@ func (x *StatefulSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -406,16 +430,16 @@ func (x *StatefulSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = StatefulSetSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -423,21 +447,21 @@ func (x *StatefulSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = StatefulSetStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -566,7 +590,7 @@ func (x *StatefulSetSpec) CodecEncodeSelf(e *codec1978.Encoder) { _ = yym17 if false { } else { - h.encSlicev1_PersistentVolumeClaim(([]pkg2_v1.PersistentVolumeClaim)(x.VolumeClaimTemplates), e) + h.encSlicev1_PersistentVolumeClaim(([]pkg3_v1.PersistentVolumeClaim)(x.VolumeClaimTemplates), e) } } } else { @@ -584,7 +608,7 @@ func (x *StatefulSetSpec) CodecEncodeSelf(e *codec1978.Encoder) { _ = yym18 if false { } else { - h.encSlicev1_PersistentVolumeClaim(([]pkg2_v1.PersistentVolumeClaim)(x.VolumeClaimTemplates), e) + h.encSlicev1_PersistentVolumeClaim(([]pkg3_v1.PersistentVolumeClaim)(x.VolumeClaimTemplates), e) } } } @@ -704,7 +728,7 @@ func (x *StatefulSetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "template": if r.TryDecodeAsNil() { - x.Template = pkg2_v1.PodTemplateSpec{} + x.Template = pkg3_v1.PodTemplateSpec{} } else { yyv8 := &x.Template yyv8.CodecDecodeSelf(d) @@ -718,7 +742,7 @@ func (x *StatefulSetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { _ = yym10 if false { } else { - h.decSlicev1_PersistentVolumeClaim((*[]pkg2_v1.PersistentVolumeClaim)(yyv9), d) + h.decSlicev1_PersistentVolumeClaim((*[]pkg3_v1.PersistentVolumeClaim)(yyv9), d) } } case "serviceName": @@ -812,7 +836,7 @@ func (x *StatefulSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.Template = pkg2_v1.PodTemplateSpec{} + x.Template = pkg3_v1.PodTemplateSpec{} } else { yyv18 := &x.Template yyv18.CodecDecodeSelf(d) @@ -836,7 +860,7 @@ func (x *StatefulSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) _ = yym20 if false { } else { - h.decSlicev1_PersistentVolumeClaim((*[]pkg2_v1.PersistentVolumeClaim)(yyv19), d) + h.decSlicev1_PersistentVolumeClaim((*[]pkg3_v1.PersistentVolumeClaim)(yyv19), d) } } yyj13++ @@ -1497,7 +1521,7 @@ func (x *StatefulSetList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } -func (x codecSelfer1234) encSlicev1_PersistentVolumeClaim(v []pkg2_v1.PersistentVolumeClaim, e *codec1978.Encoder) { +func (x codecSelfer1234) encSlicev1_PersistentVolumeClaim(v []pkg3_v1.PersistentVolumeClaim, e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r @@ -1510,7 +1534,7 @@ func (x codecSelfer1234) encSlicev1_PersistentVolumeClaim(v []pkg2_v1.Persistent z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } -func (x codecSelfer1234) decSlicev1_PersistentVolumeClaim(v *[]pkg2_v1.PersistentVolumeClaim, d *codec1978.Decoder) { +func (x codecSelfer1234) decSlicev1_PersistentVolumeClaim(v *[]pkg3_v1.PersistentVolumeClaim, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r @@ -1521,7 +1545,7 @@ func (x codecSelfer1234) decSlicev1_PersistentVolumeClaim(v *[]pkg2_v1.Persisten _ = yyc1 if yyl1 == 0 { if yyv1 == nil { - yyv1 = []pkg2_v1.PersistentVolumeClaim{} + yyv1 = []pkg3_v1.PersistentVolumeClaim{} yyc1 = true } else if len(yyv1) != 0 { yyv1 = yyv1[:0] @@ -1541,10 +1565,10 @@ func (x codecSelfer1234) decSlicev1_PersistentVolumeClaim(v *[]pkg2_v1.Persisten if yyrl1 <= cap(yyv1) { yyv1 = yyv1[:yyrl1] } else { - yyv1 = make([]pkg2_v1.PersistentVolumeClaim, yyrl1) + yyv1 = make([]pkg3_v1.PersistentVolumeClaim, yyrl1) } } else { - yyv1 = make([]pkg2_v1.PersistentVolumeClaim, yyrl1) + yyv1 = make([]pkg3_v1.PersistentVolumeClaim, yyrl1) } yyc1 = true yyrr1 = len(yyv1) @@ -1559,7 +1583,7 @@ func (x codecSelfer1234) decSlicev1_PersistentVolumeClaim(v *[]pkg2_v1.Persisten for ; yyj1 < yyrr1; yyj1++ { yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv1[yyj1] = pkg2_v1.PersistentVolumeClaim{} + yyv1[yyj1] = pkg3_v1.PersistentVolumeClaim{} } else { yyv2 := &yyv1[yyj1] yyv2.CodecDecodeSelf(d) @@ -1568,10 +1592,10 @@ func (x codecSelfer1234) decSlicev1_PersistentVolumeClaim(v *[]pkg2_v1.Persisten } if yyrt1 { for ; yyj1 < yyl1; yyj1++ { - yyv1 = append(yyv1, pkg2_v1.PersistentVolumeClaim{}) + yyv1 = append(yyv1, pkg3_v1.PersistentVolumeClaim{}) yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv1[yyj1] = pkg2_v1.PersistentVolumeClaim{} + yyv1[yyj1] = pkg3_v1.PersistentVolumeClaim{} } else { yyv3 := &yyv1[yyj1] yyv3.CodecDecodeSelf(d) @@ -1585,13 +1609,13 @@ func (x codecSelfer1234) decSlicev1_PersistentVolumeClaim(v *[]pkg2_v1.Persisten for ; !r.CheckBreak(); yyj1++ { if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, pkg2_v1.PersistentVolumeClaim{}) // var yyz1 pkg2_v1.PersistentVolumeClaim + yyv1 = append(yyv1, pkg3_v1.PersistentVolumeClaim{}) // var yyz1 pkg3_v1.PersistentVolumeClaim yyc1 = true } yyh1.ElemContainerState(yyj1) if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv1[yyj1] = pkg2_v1.PersistentVolumeClaim{} + yyv1[yyj1] = pkg3_v1.PersistentVolumeClaim{} } else { yyv4 := &yyv1[yyj1] yyv4.CodecDecodeSelf(d) @@ -1606,7 +1630,7 @@ func (x codecSelfer1234) decSlicev1_PersistentVolumeClaim(v *[]pkg2_v1.Persisten yyv1 = yyv1[:yyj1] yyc1 = true } else if yyj1 == 0 && yyv1 == nil { - yyv1 = []pkg2_v1.PersistentVolumeClaim{} + yyv1 = []pkg3_v1.PersistentVolumeClaim{} yyc1 = true } } @@ -1655,7 +1679,7 @@ func (x codecSelfer1234) decSliceStatefulSet(v *[]StatefulSet, d *codec1978.Deco yyrg1 := len(yyv1) > 0 yyv21 := yyv1 - yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 808) + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 824) if yyrt1 { if yyrl1 <= cap(yyv1) { yyv1 = yyv1[:yyrl1] diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/types.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/types.go index f7ebed67..d28a6499 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/types.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/types.go @@ -32,7 +32,7 @@ import ( type StatefulSet struct { metav1.TypeMeta `json:",inline"` // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec defines the desired identities of pods in this set. // +optional diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/zz_generated.conversion.go index 4a7d6f3f..43863dcd 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/zz_generated.conversion.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/zz_generated.conversion.go @@ -50,10 +50,7 @@ func RegisterConversions(scheme *runtime.Scheme) error { } func autoConvert_v1beta1_StatefulSet_To_apps_StatefulSet(in *StatefulSet, out *apps.StatefulSet, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_StatefulSetSpec_To_apps_StatefulSetSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -68,10 +65,7 @@ func Convert_v1beta1_StatefulSet_To_apps_StatefulSet(in *StatefulSet, out *apps. } func autoConvert_apps_StatefulSet_To_v1beta1_StatefulSet(in *apps.StatefulSet, out *StatefulSet, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_apps_StatefulSetSpec_To_v1beta1_StatefulSetSpec(&in.Spec, &out.Spec, s); err != nil { return err } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/zz_generated.deepcopy.go index 77f5ef4c..cd7963d1 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/apps/v1beta1/zz_generated.deepcopy.go @@ -21,10 +21,10 @@ limitations under the License. package v1beta1 import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - v1 "k8s.io/client-go/pkg/api/v1" + api_v1 "k8s.io/client-go/pkg/api/v1" reflect "reflect" ) @@ -48,8 +48,10 @@ func DeepCopy_v1beta1_StatefulSet(in interface{}, out interface{}, c *conversion in := in.(*StatefulSet) out := out.(*StatefulSet) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v1beta1_StatefulSetSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -94,17 +96,17 @@ func DeepCopy_v1beta1_StatefulSetSpec(in interface{}, out interface{}, c *conver if newVal, err := c.DeepCopy(*in); err != nil { return err } else { - *out = newVal.(*meta_v1.LabelSelector) + *out = newVal.(*v1.LabelSelector) } } - if err := v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil { + if err := api_v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil { return err } if in.VolumeClaimTemplates != nil { in, out := &in.VolumeClaimTemplates, &out.VolumeClaimTemplates - *out = make([]v1.PersistentVolumeClaim, len(*in)) + *out = make([]api_v1.PersistentVolumeClaim, len(*in)) for i := range *in { - if err := v1.DeepCopy_v1_PersistentVolumeClaim(&(*in)[i], &(*out)[i], c); err != nil { + if err := api_v1.DeepCopy_v1_PersistentVolumeClaim(&(*in)[i], &(*out)[i], c); err != nil { return err } } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/apps/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/apps/zz_generated.deepcopy.go index 21623398..5048531c 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/apps/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/apps/zz_generated.deepcopy.go @@ -48,8 +48,10 @@ func DeepCopy_apps_StatefulSet(in interface{}, out interface{}, c *conversion.Cl in := in.(*StatefulSet) out := out.(*StatefulSet) *out = *in - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_apps_StatefulSetSpec(&in.Spec, &out.Spec, c); err != nil { return err diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authentication/install/install.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authentication/install/install.go index 6af56b3b..7180e05d 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authentication/install/install.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authentication/install/install.go @@ -19,13 +19,21 @@ limitations under the License. package install import ( + "k8s.io/apimachinery/pkg/apimachinery/announced" + "k8s.io/apimachinery/pkg/apimachinery/registered" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/client-go/pkg/apimachinery/announced" + "k8s.io/client-go/pkg/api" "k8s.io/client-go/pkg/apis/authentication" "k8s.io/client-go/pkg/apis/authentication/v1beta1" ) func init() { + Install(api.GroupFactoryRegistry, api.Registry, api.Scheme) +} + +// Install registers the API group and adds types to a scheme +func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) { if err := announced.NewGroupMetaFactory( &announced.GroupMetaFactoryArgs{ GroupName: authentication.GroupName, @@ -37,7 +45,7 @@ func init() { announced.VersionToSchemeFunc{ v1beta1.SchemeGroupVersion.Version: v1beta1.AddToScheme, }, - ).Announce().RegisterAndEnable(); err != nil { + ).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil { panic(err) } } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authentication/register.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authentication/register.go index 73c214d5..9233bf95 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authentication/register.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authentication/register.go @@ -46,7 +46,6 @@ var ( func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, - &api.ListOptions{}, &api.DeleteOptions{}, &metav1.ExportOptions{}, &metav1.GetOptions{}, diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authentication/types.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authentication/types.go index ac69188e..9c1e66b7 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authentication/types.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authentication/types.go @@ -18,7 +18,6 @@ package authentication import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/client-go/pkg/api" ) const ( @@ -43,9 +42,9 @@ const ( // TokenReview attempts to authenticate a token to a known user. type TokenReview struct { metav1.TypeMeta - // ObjectMeta fulfills the meta.ObjectMetaAccessor interface so that the stock + // ObjectMeta fulfills the metav1.ObjectMetaAccessor interface so that the stock // REST handler paths work - api.ObjectMeta + metav1.ObjectMeta // Spec holds information about the request being evaluated Spec TokenReviewSpec diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authentication/v1beta1/generated.pb.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authentication/v1beta1/generated.pb.go index 3f247d51..2a1ac2ff 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authentication/v1beta1/generated.pb.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authentication/v1beta1/generated.pb.go @@ -390,7 +390,7 @@ func (this *TokenReview) String() string { return "nil" } s := strings.Join([]string{`&TokenReview{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "TokenReviewSpec", "TokenReviewSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "TokenReviewStatus", "TokenReviewStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -1236,46 +1236,47 @@ var ( ) var fileDescriptorGenerated = []byte{ - // 656 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xa4, 0x53, 0xcd, 0x6e, 0xd3, 0x4c, - 0x14, 0xb5, 0xf3, 0xd3, 0x2f, 0x99, 0x7c, 0x85, 0x32, 0x12, 0x52, 0x14, 0x09, 0x27, 0x0a, 0x9b, - 0x20, 0x95, 0xb1, 0x52, 0xa1, 0x52, 0xb5, 0x62, 0x51, 0xab, 0x05, 0x75, 0x81, 0x90, 0xa6, 0x14, - 0x21, 0x24, 0x16, 0x13, 0xe7, 0xd6, 0x31, 0xae, 0x7f, 0x34, 0x1e, 0xa7, 0x74, 0xd7, 0x47, 0x60, - 0xc9, 0x92, 0xf7, 0xe0, 0x05, 0xba, 0xec, 0x82, 0x05, 0x0b, 0x14, 0x91, 0xf0, 0x22, 0x68, 0xc6, - 0x43, 0x93, 0x36, 0x8d, 0x10, 0xed, 0xce, 0x73, 0xe6, 0x9e, 0x73, 0xee, 0x3d, 0xe3, 0x8b, 0xb6, - 0x83, 0x8d, 0x94, 0xf8, 0xb1, 0x1d, 0x64, 0x3d, 0xe0, 0x11, 0x08, 0x48, 0xed, 0x24, 0xf0, 0x6c, - 0x96, 0xf8, 0xa9, 0xcd, 0x32, 0x31, 0x80, 0x48, 0xf8, 0x2e, 0x13, 0x7e, 0x1c, 0xd9, 0xc3, 0x6e, - 0x0f, 0x04, 0xeb, 0xda, 0x1e, 0x44, 0xc0, 0x99, 0x80, 0x3e, 0x49, 0x78, 0x2c, 0x62, 0xdc, 0xcd, - 0x25, 0xc8, 0x54, 0x82, 0x24, 0x81, 0x47, 0xa4, 0x04, 0xb9, 0x2c, 0x41, 0xb4, 0x44, 0xe3, 0xb1, - 0xe7, 0x8b, 0x41, 0xd6, 0x23, 0x6e, 0x1c, 0xda, 0x5e, 0xec, 0xc5, 0xb6, 0x52, 0xea, 0x65, 0x87, - 0xea, 0xa4, 0x0e, 0xea, 0x2b, 0x77, 0x68, 0x3c, 0xd1, 0x4d, 0xb2, 0xc4, 0x0f, 0x99, 0x3b, 0xf0, - 0x23, 0xe0, 0x27, 0xd3, 0x36, 0x43, 0x10, 0xcc, 0x1e, 0xce, 0xf5, 0xd5, 0xb0, 0x17, 0xb1, 0x78, - 0x16, 0x09, 0x3f, 0x84, 0x39, 0xc2, 0xfa, 0xdf, 0x08, 0xa9, 0x3b, 0x80, 0x90, 0xcd, 0xf1, 0xd6, - 0x16, 0x66, 0x68, 0x73, 0x48, 0xe3, 0x8c, 0xbb, 0xf3, 0x5e, 0xab, 0x8b, 0x39, 0xd7, 0x8c, 0xd2, - 0xbd, 0xbe, 0x3a, 0x13, 0xfe, 0x91, 0xed, 0x47, 0x22, 0x15, 0xfc, 0x2a, 0xa5, 0xfd, 0x14, 0xa1, - 0xdd, 0x8f, 0x82, 0xb3, 0x37, 0xec, 0x28, 0x03, 0xdc, 0x44, 0x65, 0x5f, 0x40, 0x98, 0xd6, 0xcd, - 0x56, 0xb1, 0x53, 0x75, 0xaa, 0x93, 0x51, 0xb3, 0xbc, 0x27, 0x01, 0x9a, 0xe3, 0x9b, 0x95, 0xcf, - 0x5f, 0x9a, 0xc6, 0xe9, 0x8f, 0x96, 0xd1, 0xfe, 0x5a, 0x40, 0xb5, 0xd7, 0x71, 0x00, 0x11, 0x85, - 0xa1, 0x0f, 0xc7, 0xf8, 0x2d, 0xaa, 0xc8, 0x84, 0xfb, 0x4c, 0xb0, 0xba, 0xd9, 0x32, 0x3b, 0xb5, - 0xb5, 0x0e, 0x59, 0xf8, 0xe2, 0x64, 0xd8, 0x25, 0xaf, 0x7a, 0x1f, 0xc0, 0x15, 0x2f, 0x41, 0x30, - 0x07, 0x9f, 0x8d, 0x9a, 0xc6, 0x64, 0xd4, 0x44, 0x53, 0x8c, 0x5e, 0xa8, 0xe1, 0x3e, 0x2a, 0xa5, - 0x09, 0xb8, 0xf5, 0x82, 0x52, 0x75, 0xc8, 0x3f, 0xff, 0x47, 0x64, 0xa6, 0xcf, 0xfd, 0x04, 0x5c, - 0xe7, 0x7f, 0xed, 0x57, 0x92, 0x27, 0xaa, 0xd4, 0xf1, 0x11, 0x5a, 0x4a, 0x05, 0x13, 0x59, 0x5a, - 0x2f, 0x2a, 0x9f, 0x9d, 0x5b, 0xfa, 0x28, 0x2d, 0xe7, 0x8e, 0x76, 0x5a, 0xca, 0xcf, 0x54, 0x7b, - 0xb4, 0xd7, 0xd1, 0xdd, 0x2b, 0x4d, 0xe1, 0x87, 0xa8, 0x2c, 0x24, 0xa4, 0xd2, 0xab, 0x3a, 0xcb, - 0x9a, 0x59, 0xce, 0xeb, 0xf2, 0xbb, 0xf6, 0x37, 0x13, 0xdd, 0x9b, 0x73, 0xc1, 0x5b, 0x68, 0x79, - 0xa6, 0x23, 0xe8, 0x2b, 0x89, 0x8a, 0x73, 0x5f, 0x4b, 0x2c, 0x6f, 0xcf, 0x5e, 0xd2, 0xcb, 0xb5, - 0xf8, 0x3d, 0x2a, 0x65, 0x29, 0x70, 0x1d, 0xef, 0xd6, 0x0d, 0xc6, 0x3e, 0x48, 0x81, 0xef, 0x45, - 0x87, 0xf1, 0x34, 0x57, 0x89, 0x50, 0x25, 0x2b, 0xc7, 0x02, 0xce, 0x63, 0xae, 0x62, 0x9d, 0x19, - 0x6b, 0x57, 0x82, 0x34, 0xbf, 0x6b, 0x8f, 0x0b, 0xa8, 0xf2, 0x47, 0x05, 0xaf, 0xa2, 0x8a, 0x64, - 0x46, 0x2c, 0x04, 0x9d, 0xc5, 0x8a, 0x26, 0xa9, 0x1a, 0x89, 0xd3, 0x8b, 0x0a, 0xfc, 0x00, 0x15, - 0x33, 0xbf, 0xaf, 0xba, 0xaf, 0x3a, 0x35, 0x5d, 0x58, 0x3c, 0xd8, 0xdb, 0xa1, 0x12, 0xc7, 0x6d, - 0xb4, 0xe4, 0xf1, 0x38, 0x4b, 0xe4, 0xb3, 0xca, 0x5f, 0x1a, 0xc9, 0xc7, 0x78, 0xa1, 0x10, 0xaa, - 0x6f, 0x70, 0x80, 0xca, 0x20, 0x77, 0xa0, 0x5e, 0x6a, 0x15, 0x3b, 0xb5, 0xb5, 0xe7, 0xb7, 0x88, - 0x80, 0xa8, 0x65, 0xda, 0x8d, 0x04, 0x3f, 0x99, 0x19, 0x55, 0x62, 0x34, 0xf7, 0x68, 0x1c, 0xeb, - 0x85, 0x53, 0x35, 0x78, 0x05, 0x15, 0x03, 0x38, 0xc9, 0xc7, 0xa4, 0xf2, 0x13, 0xef, 0xa3, 0xf2, - 0x50, 0xee, 0xa2, 0x7e, 0x8f, 0x67, 0x37, 0x68, 0x66, 0xba, 0xd0, 0x34, 0xd7, 0xda, 0x2c, 0x6c, - 0x98, 0xce, 0xa3, 0xb3, 0xb1, 0x65, 0x9c, 0x8f, 0x2d, 0xe3, 0xfb, 0xd8, 0x32, 0x4e, 0x27, 0x96, - 0x79, 0x36, 0xb1, 0xcc, 0xf3, 0x89, 0x65, 0xfe, 0x9c, 0x58, 0xe6, 0xa7, 0x5f, 0x96, 0xf1, 0xee, - 0x3f, 0x2d, 0xf0, 0x3b, 0x00, 0x00, 0xff, 0xff, 0xec, 0x29, 0x42, 0xc3, 0xee, 0x05, 0x00, 0x00, + // 660 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xa4, 0x53, 0xcf, 0x4f, 0x13, 0x41, + 0x14, 0xee, 0xf6, 0x07, 0xb6, 0x53, 0x51, 0x9c, 0xc4, 0xa4, 0x69, 0xe2, 0xb6, 0xa9, 0x17, 0x4c, + 0x70, 0xd6, 0x12, 0x83, 0x04, 0xe2, 0x81, 0x0d, 0x68, 0x38, 0x18, 0x93, 0x41, 0x3c, 0x98, 0x98, + 0x38, 0xdd, 0x3e, 0xb6, 0xe3, 0xb2, 0x3f, 0x32, 0x3b, 0x5b, 0xe4, 0xc6, 0x9f, 0xe0, 0xd1, 0xa3, + 0xff, 0x8b, 0x17, 0x8e, 0x1c, 0x3c, 0x78, 0x30, 0xc4, 0xd6, 0x7f, 0xc4, 0xcc, 0xec, 0x48, 0x0b, + 0x85, 0x18, 0xe1, 0xb6, 0xf3, 0xcd, 0xfb, 0xbe, 0xef, 0xbd, 0x6f, 0xf6, 0xa1, 0x8d, 0x60, 0x35, + 0x25, 0x3c, 0x76, 0x82, 0xac, 0x07, 0x22, 0x02, 0x09, 0xa9, 0x93, 0x04, 0xbe, 0xc3, 0x12, 0x9e, + 0x3a, 0x2c, 0x93, 0x03, 0x88, 0x24, 0xf7, 0x98, 0xe4, 0x71, 0xe4, 0x0c, 0xbb, 0x3d, 0x90, 0xac, + 0xeb, 0xf8, 0x10, 0x81, 0x60, 0x12, 0xfa, 0x24, 0x11, 0xb1, 0x8c, 0x71, 0x37, 0x97, 0x20, 0x13, + 0x09, 0x92, 0x04, 0x3e, 0x51, 0x12, 0xe4, 0xbc, 0x04, 0x31, 0x12, 0xcd, 0xc7, 0x3e, 0x97, 0x83, + 0xac, 0x47, 0xbc, 0x38, 0x74, 0xfc, 0xd8, 0x8f, 0x1d, 0xad, 0xd4, 0xcb, 0xf6, 0xf4, 0x49, 0x1f, + 0xf4, 0x57, 0xee, 0xd0, 0x7c, 0x6a, 0x9a, 0x64, 0x09, 0x0f, 0x99, 0x37, 0xe0, 0x11, 0x88, 0xc3, + 0x49, 0x9b, 0x21, 0x48, 0xe6, 0x0c, 0x67, 0xfa, 0x6a, 0x3a, 0x57, 0xb1, 0x44, 0x16, 0x49, 0x1e, + 0xc2, 0x0c, 0x61, 0xe5, 0x5f, 0x84, 0xd4, 0x1b, 0x40, 0xc8, 0x66, 0x78, 0xcb, 0x57, 0x66, 0xe8, + 0x08, 0x48, 0xe3, 0x4c, 0x78, 0xb3, 0x5e, 0x4b, 0x57, 0x73, 0x2e, 0x19, 0xa5, 0x7b, 0x79, 0x75, + 0x26, 0xf9, 0xbe, 0xc3, 0x23, 0x99, 0x4a, 0x71, 0x91, 0xd2, 0x79, 0x86, 0xd0, 0xd6, 0x27, 0x29, + 0xd8, 0x5b, 0xb6, 0x9f, 0x01, 0x6e, 0xa1, 0x0a, 0x97, 0x10, 0xa6, 0x0d, 0xab, 0x5d, 0x5a, 0xac, + 0xb9, 0xb5, 0xf1, 0x69, 0xab, 0xb2, 0xad, 0x00, 0x9a, 0xe3, 0x6b, 0xd5, 0x2f, 0x5f, 0x5b, 0x85, + 0xa3, 0x9f, 0xed, 0x42, 0xe7, 0x5b, 0x11, 0xd5, 0xdf, 0xc4, 0x01, 0x44, 0x14, 0x86, 0x1c, 0x0e, + 0xf0, 0x07, 0x54, 0x55, 0x09, 0xf7, 0x99, 0x64, 0x0d, 0xab, 0x6d, 0x2d, 0xd6, 0x97, 0x9f, 0x10, + 0xf3, 0xe2, 0xd3, 0x41, 0x4d, 0xde, 0x5c, 0x55, 0x93, 0x61, 0x97, 0xbc, 0xee, 0x7d, 0x04, 0x4f, + 0xbe, 0x02, 0xc9, 0x5c, 0x7c, 0x7c, 0xda, 0x2a, 0x8c, 0x4f, 0x5b, 0x68, 0x82, 0xd1, 0x33, 0x55, + 0xdc, 0x47, 0xe5, 0x34, 0x01, 0xaf, 0x51, 0xd4, 0xea, 0x2e, 0xf9, 0xef, 0xff, 0x89, 0x4c, 0xf5, + 0xbb, 0x93, 0x80, 0xe7, 0xde, 0x36, 0x7e, 0x65, 0x75, 0xa2, 0x5a, 0x1d, 0xef, 0xa3, 0xb9, 0x54, + 0x32, 0x99, 0xa5, 0x8d, 0x92, 0xf6, 0xd9, 0xbc, 0xa1, 0x8f, 0xd6, 0x72, 0xef, 0x18, 0xa7, 0xb9, + 0xfc, 0x4c, 0x8d, 0x47, 0x67, 0x05, 0xdd, 0xbd, 0xd0, 0x14, 0x7e, 0x88, 0x2a, 0x52, 0x41, 0x3a, + 0xc5, 0x9a, 0x3b, 0x6f, 0x98, 0x95, 0xbc, 0x2e, 0xbf, 0xeb, 0x7c, 0xb7, 0xd0, 0xbd, 0x19, 0x17, + 0xbc, 0x8e, 0xe6, 0xa7, 0x3a, 0x82, 0xbe, 0x96, 0xa8, 0xba, 0xf7, 0x8d, 0xc4, 0xfc, 0xc6, 0xf4, + 0x25, 0x3d, 0x5f, 0x8b, 0xdf, 0xa3, 0x72, 0x96, 0x82, 0x30, 0xf1, 0xae, 0x5f, 0x63, 0xec, 0xdd, + 0x14, 0xc4, 0x76, 0xb4, 0x17, 0x4f, 0x72, 0x55, 0x08, 0xd5, 0xb2, 0x6a, 0x2c, 0x10, 0x22, 0x16, + 0x3a, 0xd6, 0xa9, 0xb1, 0xb6, 0x14, 0x48, 0xf3, 0xbb, 0xce, 0xa8, 0x88, 0xaa, 0x7f, 0x55, 0xf0, + 0x12, 0xaa, 0x2a, 0x66, 0xc4, 0x42, 0x30, 0x59, 0x2c, 0x18, 0x92, 0xae, 0x51, 0x38, 0x3d, 0xab, + 0xc0, 0x0f, 0x50, 0x29, 0xe3, 0x7d, 0xdd, 0x7d, 0xcd, 0xad, 0x9b, 0xc2, 0xd2, 0xee, 0xf6, 0x26, + 0x55, 0x38, 0xee, 0xa0, 0x39, 0x5f, 0xc4, 0x59, 0xa2, 0x9e, 0x55, 0xfd, 0xda, 0x48, 0x3d, 0xc6, + 0x4b, 0x8d, 0x50, 0x73, 0x83, 0x03, 0x54, 0x01, 0xb5, 0x0b, 0x8d, 0x72, 0xbb, 0xb4, 0x58, 0x5f, + 0x7e, 0x71, 0x83, 0x08, 0x88, 0x5e, 0xaa, 0xad, 0x48, 0x8a, 0xc3, 0xa9, 0x51, 0x15, 0x46, 0x73, + 0x8f, 0xe6, 0x81, 0x59, 0x3c, 0x5d, 0x83, 0x17, 0x50, 0x29, 0x80, 0xc3, 0x7c, 0x4c, 0xaa, 0x3e, + 0xf1, 0x0e, 0xaa, 0x0c, 0xd5, 0x4e, 0x9a, 0xf7, 0x78, 0x7e, 0x8d, 0x66, 0x26, 0x8b, 0x4d, 0x73, + 0xad, 0xb5, 0xe2, 0xaa, 0xe5, 0x3e, 0x3a, 0x1e, 0xd9, 0x85, 0x93, 0x91, 0x5d, 0xf8, 0x31, 0xb2, + 0x0b, 0x47, 0x63, 0xdb, 0x3a, 0x1e, 0xdb, 0xd6, 0xc9, 0xd8, 0xb6, 0x7e, 0x8d, 0x6d, 0xeb, 0xf3, + 0x6f, 0xbb, 0xf0, 0xee, 0x96, 0x11, 0xf8, 0x13, 0x00, 0x00, 0xff, 0xff, 0x29, 0x85, 0x06, 0x53, + 0xf6, 0x05, 0x00, 0x00, } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authentication/v1beta1/generated.proto b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authentication/v1beta1/generated.proto index 7df6a8d7..96c1504b 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authentication/v1beta1/generated.proto +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authentication/v1beta1/generated.proto @@ -45,7 +45,7 @@ message ExtraValue { // plugin in the kube-apiserver. message TokenReview { // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec holds information about the request being evaluated optional TokenReviewSpec spec = 2; diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authentication/v1beta1/register.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authentication/v1beta1/register.go index fa5216ac..91f7cb09 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authentication/v1beta1/register.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authentication/v1beta1/register.go @@ -42,12 +42,12 @@ var ( // Adds the list of known types to api.Scheme. func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, - &v1.ListOptions{}, &v1.DeleteOptions{}, &metav1.ExportOptions{}, &metav1.GetOptions{}, &TokenReview{}, ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authentication/v1beta1/types.generated.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authentication/v1beta1/types.generated.go index 560eb49c..b8990af1 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authentication/v1beta1/types.generated.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authentication/v1beta1/types.generated.go @@ -26,8 +26,7 @@ import ( "fmt" codec1978 "github.com/ugorji/go/codec" pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - pkg3_types "k8s.io/apimachinery/pkg/types" - pkg2_v1 "k8s.io/client-go/pkg/api/v1" + pkg2_types "k8s.io/apimachinery/pkg/types" "reflect" "runtime" time "time" @@ -64,10 +63,9 @@ func init() { } if false { // reference the types, but skip this branch at build/run time var v0 pkg1_v1.TypeMeta - var v1 pkg3_types.UID - var v2 pkg2_v1.ObjectMeta - var v3 time.Time - _, _, _, _ = v0, v1, v2, v3 + var v1 pkg2_types.UID + var v2 time.Time + _, _, _ = v0, v1, v2 } } @@ -159,7 +157,13 @@ func (x *TokenReview) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -169,7 +173,13 @@ func (x *TokenReview) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -287,24 +297,30 @@ func (x *TokenReview) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = TokenReviewSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = TokenReviewStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -317,16 +333,16 @@ func (x *TokenReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -334,21 +350,21 @@ func (x *TokenReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -356,38 +372,44 @@ func (x *TokenReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -395,16 +417,16 @@ func (x *TokenReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = TokenReviewSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -412,21 +434,21 @@ func (x *TokenReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = TokenReviewStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authentication/v1beta1/types.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authentication/v1beta1/types.go index 8412079b..57c96e3b 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authentication/v1beta1/types.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authentication/v1beta1/types.go @@ -20,7 +20,6 @@ import ( "fmt" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/client-go/pkg/api/v1" ) // +genclient=true @@ -33,7 +32,7 @@ import ( type TokenReview struct { metav1.TypeMeta `json:",inline"` // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec holds information about the request being evaluated Spec TokenReviewSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authentication/v1beta1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authentication/v1beta1/zz_generated.conversion.go index 39cee62f..5fc83362 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authentication/v1beta1/zz_generated.conversion.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authentication/v1beta1/zz_generated.conversion.go @@ -47,10 +47,7 @@ func RegisterConversions(scheme *runtime.Scheme) error { } func autoConvert_v1beta1_TokenReview_To_authentication_TokenReview(in *TokenReview, out *authentication.TokenReview, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_TokenReviewSpec_To_authentication_TokenReviewSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -65,10 +62,7 @@ func Convert_v1beta1_TokenReview_To_authentication_TokenReview(in *TokenReview, } func autoConvert_authentication_TokenReview_To_v1beta1_TokenReview(in *authentication.TokenReview, out *TokenReview, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_authentication_TokenReviewSpec_To_v1beta1_TokenReviewSpec(&in.Spec, &out.Spec, s); err != nil { return err } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authentication/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authentication/v1beta1/zz_generated.deepcopy.go index f20aea04..01260cc1 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authentication/v1beta1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authentication/v1beta1/zz_generated.deepcopy.go @@ -21,9 +21,9 @@ limitations under the License. package v1beta1 import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - v1 "k8s.io/client-go/pkg/api/v1" reflect "reflect" ) @@ -47,8 +47,10 @@ func DeepCopy_v1beta1_TokenReview(in interface{}, out interface{}, c *conversion in := in.(*TokenReview) out := out.(*TokenReview) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v1beta1_TokenReviewStatus(&in.Status, &out.Status, c); err != nil { return err diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authentication/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authentication/zz_generated.deepcopy.go index 3b33a93a..ec322c5f 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authentication/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authentication/zz_generated.deepcopy.go @@ -21,9 +21,9 @@ limitations under the License. package authentication import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - api "k8s.io/client-go/pkg/api" reflect "reflect" ) @@ -47,8 +47,10 @@ func DeepCopy_authentication_TokenReview(in interface{}, out interface{}, c *con in := in.(*TokenReview) out := out.(*TokenReview) *out = *in - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_authentication_TokenReviewStatus(&in.Status, &out.Status, c); err != nil { return err diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authorization/install/install.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authorization/install/install.go index 8554cc7e..be65ff7d 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authorization/install/install.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authorization/install/install.go @@ -19,13 +19,21 @@ limitations under the License. package install import ( + "k8s.io/apimachinery/pkg/apimachinery/announced" + "k8s.io/apimachinery/pkg/apimachinery/registered" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/client-go/pkg/apimachinery/announced" + "k8s.io/client-go/pkg/api" "k8s.io/client-go/pkg/apis/authorization" "k8s.io/client-go/pkg/apis/authorization/v1beta1" ) func init() { + Install(api.GroupFactoryRegistry, api.Registry, api.Scheme) +} + +// Install registers the API group and adds types to a scheme +func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) { if err := announced.NewGroupMetaFactory( &announced.GroupMetaFactoryArgs{ GroupName: authorization.GroupName, @@ -37,7 +45,7 @@ func init() { announced.VersionToSchemeFunc{ v1beta1.SchemeGroupVersion.Version: v1beta1.AddToScheme, }, - ).Announce().RegisterAndEnable(); err != nil { + ).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil { panic(err) } } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authorization/register.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authorization/register.go index 4a369e9b..11da9c78 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authorization/register.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authorization/register.go @@ -46,7 +46,6 @@ var ( func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, - &api.ListOptions{}, &api.DeleteOptions{}, &metav1.ExportOptions{}, &metav1.GetOptions{}, diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authorization/types.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authorization/types.go index e9bc9c79..d8ccfaf3 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authorization/types.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authorization/types.go @@ -18,7 +18,6 @@ package authorization import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/client-go/pkg/api" ) // +genclient=true @@ -29,7 +28,7 @@ import ( // spec.namespace means "in all namespaces". type SubjectAccessReview struct { metav1.TypeMeta - api.ObjectMeta + metav1.ObjectMeta // Spec holds information about the request being evaluated Spec SubjectAccessReviewSpec @@ -47,7 +46,7 @@ type SubjectAccessReview struct { // to check whether they can perform an action type SelfSubjectAccessReview struct { metav1.TypeMeta - api.ObjectMeta + metav1.ObjectMeta // Spec holds information about the request being evaluated. Spec SelfSubjectAccessReviewSpec @@ -64,7 +63,7 @@ type SelfSubjectAccessReview struct { // checking. type LocalSubjectAccessReview struct { metav1.TypeMeta - api.ObjectMeta + metav1.ObjectMeta // Spec holds information about the request being evaluated. spec.namespace must be equal to the namespace // you made the request against. If empty, it is defaulted. diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authorization/v1beta1/generated.pb.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authorization/v1beta1/generated.pb.go index 0232b801..4246a8b4 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authorization/v1beta1/generated.pb.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authorization/v1beta1/generated.pb.go @@ -670,7 +670,7 @@ func (this *LocalSubjectAccessReview) String() string { return "nil" } s := strings.Join([]string{`&LocalSubjectAccessReview{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "SubjectAccessReviewSpec", "SubjectAccessReviewSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "SubjectAccessReviewStatus", "SubjectAccessReviewStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -709,7 +709,7 @@ func (this *SelfSubjectAccessReview) String() string { return "nil" } s := strings.Join([]string{`&SelfSubjectAccessReview{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "SelfSubjectAccessReviewSpec", "SelfSubjectAccessReviewSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "SubjectAccessReviewStatus", "SubjectAccessReviewStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -732,7 +732,7 @@ func (this *SubjectAccessReview) String() string { return "nil" } s := strings.Join([]string{`&SubjectAccessReview{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "SubjectAccessReviewSpec", "SubjectAccessReviewSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "SubjectAccessReviewStatus", "SubjectAccessReviewStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -2283,61 +2283,62 @@ var ( ) var fileDescriptorGenerated = []byte{ - // 891 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x56, 0x4f, 0x8f, 0xdb, 0x44, - 0x14, 0x8f, 0x93, 0x78, 0x37, 0x99, 0x05, 0xb6, 0x4c, 0x55, 0xd6, 0x5d, 0x24, 0x27, 0x0a, 0x12, - 0xda, 0x4a, 0xc5, 0x66, 0x57, 0xfc, 0xa9, 0x2a, 0x0e, 0xac, 0xc5, 0xaa, 0xaa, 0xa0, 0x05, 0xcd, - 0xc2, 0x0a, 0xc1, 0x69, 0xec, 0x7d, 0x4d, 0x4c, 0x12, 0x8f, 0x35, 0x33, 0x76, 0x09, 0xa7, 0x7e, - 0x00, 0x0e, 0x1c, 0x7b, 0xe4, 0x2b, 0xf0, 0x05, 0xb8, 0xb2, 0xc7, 0x72, 0x41, 0x20, 0xa1, 0x88, - 0x35, 0xdf, 0x82, 0x13, 0xf2, 0x78, 0x12, 0x37, 0x8d, 0x43, 0x15, 0x58, 0xa1, 0x1e, 0x7a, 0xf3, - 0xbc, 0x3f, 0xbf, 0xf7, 0x9b, 0x37, 0xbf, 0xf1, 0x1b, 0xf4, 0xfe, 0xf0, 0x86, 0x70, 0x42, 0xe6, - 0x0e, 0x13, 0x1f, 0x78, 0x04, 0x12, 0x84, 0x1b, 0x0f, 0xfb, 0x2e, 0x8d, 0x43, 0xe1, 0xd2, 0x44, - 0x0e, 0x18, 0x0f, 0xbf, 0xa1, 0x32, 0x64, 0x91, 0x9b, 0xee, 0xfb, 0x20, 0xe9, 0xbe, 0xdb, 0x87, - 0x08, 0x38, 0x95, 0x70, 0xea, 0xc4, 0x9c, 0x49, 0x86, 0xdf, 0x2c, 0x10, 0x9c, 0x12, 0xc1, 0x89, - 0x87, 0x7d, 0x27, 0x47, 0x70, 0x16, 0x10, 0x1c, 0x8d, 0xb0, 0xfb, 0x46, 0x3f, 0x94, 0x83, 0xc4, - 0x77, 0x02, 0x36, 0x76, 0xfb, 0xac, 0xcf, 0x5c, 0x05, 0xe4, 0x27, 0xf7, 0xd4, 0x4a, 0x2d, 0xd4, - 0x57, 0x51, 0x60, 0xf7, 0x2d, 0x4d, 0x91, 0xc6, 0xe1, 0x98, 0x06, 0x83, 0x30, 0x02, 0x3e, 0x29, - 0x49, 0x8e, 0x41, 0x52, 0x37, 0x5d, 0xa2, 0xb5, 0xeb, 0xae, 0xca, 0xe2, 0x49, 0x24, 0xc3, 0x31, - 0x2c, 0x25, 0xbc, 0xf3, 0xb4, 0x04, 0x11, 0x0c, 0x60, 0x4c, 0x97, 0xf2, 0x0e, 0x56, 0x76, 0xd0, - 0xe5, 0x20, 0x58, 0xc2, 0x83, 0xe5, 0x5a, 0xd7, 0x57, 0xe7, 0x54, 0x6c, 0x65, 0xbf, 0x3a, 0x3a, - 0x91, 0xe1, 0xc8, 0x0d, 0x23, 0x29, 0x24, 0x7f, 0x32, 0xa5, 0xf7, 0x2e, 0x42, 0x47, 0x5f, 0x4b, - 0x4e, 0x4f, 0xe8, 0x28, 0x01, 0xdc, 0x41, 0x66, 0x28, 0x61, 0x2c, 0x2c, 0xa3, 0xdb, 0xd8, 0x6b, - 0x7b, 0xed, 0x6c, 0xda, 0x31, 0x6f, 0xe7, 0x06, 0x52, 0xd8, 0x6f, 0xb6, 0x1e, 0x7e, 0xdf, 0xa9, - 0x3d, 0xf8, 0xbd, 0x5b, 0xeb, 0xfd, 0x52, 0x47, 0xd6, 0x47, 0x2c, 0xa0, 0xa3, 0xe3, 0xc4, 0xff, - 0x0a, 0x02, 0x79, 0x18, 0x04, 0x20, 0x04, 0x81, 0x34, 0x84, 0xfb, 0xf8, 0x73, 0xd4, 0xca, 0xdb, - 0x7d, 0x4a, 0x25, 0xb5, 0x8c, 0xae, 0xb1, 0xb7, 0x75, 0xb0, 0xe7, 0xac, 0x3c, 0x7d, 0x27, 0xdd, - 0x77, 0x3e, 0x56, 0x18, 0x77, 0x40, 0x52, 0x0f, 0x9f, 0x4d, 0x3b, 0xb5, 0x6c, 0xda, 0x41, 0xa5, - 0x8d, 0xcc, 0xd1, 0xf0, 0x10, 0x35, 0x45, 0x0c, 0x81, 0x55, 0x57, 0xa8, 0xb7, 0x9d, 0x75, 0x35, - 0xe5, 0x54, 0xd0, 0x3d, 0x8e, 0x21, 0xf0, 0x5e, 0xd0, 0x65, 0x9b, 0xf9, 0x8a, 0xa8, 0x22, 0x58, - 0xa0, 0x0d, 0x21, 0xa9, 0x4c, 0x84, 0xd5, 0x50, 0xe5, 0x3e, 0xbc, 0x98, 0x72, 0x0a, 0xd2, 0x7b, - 0x49, 0x17, 0xdc, 0x28, 0xd6, 0x44, 0x97, 0xea, 0x7d, 0x89, 0xae, 0xdc, 0x65, 0x11, 0xd1, 0x8a, - 0x38, 0x94, 0x92, 0x87, 0x7e, 0x22, 0x41, 0xe0, 0x2e, 0x6a, 0xc6, 0x54, 0x0e, 0x54, 0x43, 0xdb, - 0x25, 0xdf, 0x4f, 0xa8, 0x1c, 0x10, 0xe5, 0xc9, 0x23, 0x52, 0xe0, 0xbe, 0x6a, 0xce, 0x63, 0x11, - 0x27, 0xc0, 0x7d, 0xa2, 0x3c, 0xbd, 0x1f, 0xeb, 0x08, 0x57, 0x40, 0xbb, 0xa8, 0x1d, 0xd1, 0x31, - 0x88, 0x98, 0x06, 0xa0, 0xf1, 0x5f, 0xd6, 0xd9, 0xed, 0xbb, 0x33, 0x07, 0x29, 0x63, 0x9e, 0x5e, - 0x09, 0xbf, 0x86, 0xcc, 0x3e, 0x67, 0x49, 0xac, 0x5a, 0xd7, 0xf6, 0x5e, 0xd4, 0x21, 0xe6, 0xad, - 0xdc, 0x48, 0x0a, 0x1f, 0xbe, 0x86, 0x36, 0x53, 0xe0, 0x22, 0x64, 0x91, 0xd5, 0x54, 0x61, 0xdb, - 0x3a, 0x6c, 0xf3, 0xa4, 0x30, 0x93, 0x99, 0x1f, 0x5f, 0x47, 0xad, 0xd9, 0x2d, 0xb1, 0x4c, 0x15, - 0x7b, 0x49, 0xc7, 0xb6, 0x66, 0x1b, 0x22, 0xf3, 0x08, 0xfc, 0x36, 0xda, 0x12, 0x89, 0x3f, 0x4f, - 0xd8, 0x50, 0x09, 0x97, 0x75, 0xc2, 0xd6, 0x71, 0xe9, 0x22, 0x8f, 0xc7, 0xe5, 0xdb, 0xca, 0xf7, - 0x68, 0x6d, 0x2e, 0x6e, 0x2b, 0x6f, 0x01, 0x51, 0x9e, 0xde, 0x6f, 0x75, 0xb4, 0x73, 0x0c, 0xa3, - 0x7b, 0xff, 0xaf, 0xea, 0xd9, 0x82, 0xea, 0xef, 0xfc, 0x0b, 0x19, 0x56, 0x53, 0x7e, 0xb6, 0x94, - 0xff, 0x53, 0x1d, 0xbd, 0xfa, 0x0f, 0x44, 0xf1, 0xb7, 0x06, 0xc2, 0x7c, 0x49, 0xbc, 0xba, 0xd5, - 0x1f, 0xac, 0xcf, 0x70, 0xf9, 0x22, 0x78, 0xaf, 0x64, 0xd3, 0x4e, 0xc5, 0x05, 0x21, 0x15, 0x75, - 0xf1, 0x43, 0x03, 0x5d, 0x89, 0xaa, 0x6e, 0xaa, 0x3e, 0xa6, 0x5b, 0xeb, 0x33, 0xaa, 0xbc, 0xf8, - 0xde, 0xd5, 0x6c, 0xda, 0xa9, 0xfe, 0x27, 0x90, 0x6a, 0x02, 0xbd, 0x9f, 0xeb, 0xe8, 0xf2, 0xf3, - 0xff, 0xf2, 0xc5, 0xaa, 0xf3, 0xaf, 0x26, 0xda, 0x79, 0xae, 0xcc, 0xff, 0xa8, 0xcc, 0xf9, 0xe0, - 0x68, 0x2c, 0xfe, 0x61, 0x3f, 0x13, 0xc0, 0xf5, 0xe0, 0xe8, 0xce, 0x06, 0x47, 0x53, 0xbd, 0x41, - 0x50, 0x7e, 0x14, 0x6a, 0x68, 0x88, 0xd9, 0xd4, 0x98, 0x20, 0x13, 0xf2, 0x37, 0x8b, 0x65, 0x76, - 0x1b, 0x7b, 0x5b, 0x07, 0x9f, 0x5e, 0x98, 0xd8, 0x1c, 0xf5, 0x14, 0x3a, 0x8a, 0x24, 0x9f, 0x94, - 0x03, 0x4b, 0xd9, 0x48, 0x51, 0x71, 0x37, 0xd5, 0xcf, 0x25, 0x15, 0x83, 0x2f, 0xa1, 0xc6, 0x10, - 0x26, 0xc5, 0xc0, 0x24, 0xf9, 0x27, 0x26, 0xc8, 0x4c, 0xf3, 0x97, 0x94, 0x6e, 0xf4, 0x7b, 0xeb, - 0x53, 0x2b, 0x5f, 0x63, 0xa4, 0x80, 0xba, 0x59, 0xbf, 0x61, 0xf4, 0x7e, 0x30, 0xd0, 0xd5, 0x95, - 0x92, 0xcd, 0xc7, 0x28, 0x1d, 0x8d, 0xd8, 0x7d, 0x38, 0x55, 0x5c, 0x5a, 0xe5, 0x18, 0x3d, 0x2c, - 0xcc, 0x64, 0xe6, 0xc7, 0xaf, 0xa3, 0x0d, 0x0e, 0x54, 0xb0, 0x48, 0x8f, 0xee, 0xb9, 0xda, 0x89, - 0xb2, 0x12, 0xed, 0xc5, 0x87, 0x68, 0x1b, 0xf2, 0xf2, 0x8a, 0xdc, 0x11, 0xe7, 0x8c, 0xeb, 0x23, - 0xdb, 0xd1, 0x09, 0xdb, 0x47, 0x8b, 0x6e, 0xf2, 0x64, 0xbc, 0x77, 0xed, 0xec, 0xdc, 0xae, 0x3d, - 0x3a, 0xb7, 0x6b, 0xbf, 0x9e, 0xdb, 0xb5, 0x07, 0x99, 0x6d, 0x9c, 0x65, 0xb6, 0xf1, 0x28, 0xb3, - 0x8d, 0x3f, 0x32, 0xdb, 0xf8, 0xee, 0x4f, 0xbb, 0xf6, 0xc5, 0xa6, 0xde, 0xf4, 0xdf, 0x01, 0x00, - 0x00, 0xff, 0xff, 0x1f, 0x8b, 0xf7, 0x94, 0x5d, 0x0c, 0x00, 0x00, + // 897 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x56, 0x4f, 0x6f, 0xdc, 0x44, + 0x14, 0x5f, 0xef, 0x9f, 0x64, 0x77, 0x02, 0xa4, 0x4c, 0x55, 0xe2, 0x06, 0xc9, 0xbb, 0x5a, 0x24, + 0x94, 0x4a, 0xc5, 0x6e, 0x22, 0xfe, 0x54, 0x15, 0x07, 0x62, 0x11, 0x55, 0x15, 0xb4, 0xa0, 0x09, + 0xe4, 0x00, 0x17, 0xc6, 0xce, 0xeb, 0xae, 0xd9, 0x5d, 0x8f, 0x35, 0x33, 0x76, 0x09, 0xa7, 0x7e, + 0x00, 0x0e, 0x1c, 0x7b, 0xe4, 0x2b, 0xf0, 0x05, 0xb8, 0x92, 0x63, 0x8f, 0x20, 0xa1, 0x15, 0x31, + 0xdf, 0x82, 0x13, 0x9a, 0xf1, 0xec, 0x3a, 0xdb, 0x75, 0xa8, 0x16, 0x8a, 0xe8, 0xa1, 0x37, 0xfb, + 0xbd, 0xdf, 0xfb, 0xbd, 0xdf, 0xbc, 0x79, 0x33, 0x6f, 0xd0, 0x07, 0xa3, 0x9b, 0xc2, 0x8d, 0x98, + 0x37, 0x4a, 0x03, 0xe0, 0x31, 0x48, 0x10, 0x5e, 0x32, 0x1a, 0x78, 0x34, 0x89, 0x84, 0x47, 0x53, + 0x39, 0x64, 0x3c, 0xfa, 0x96, 0xca, 0x88, 0xc5, 0x5e, 0xb6, 0x1b, 0x80, 0xa4, 0xbb, 0xde, 0x00, + 0x62, 0xe0, 0x54, 0xc2, 0xb1, 0x9b, 0x70, 0x26, 0x19, 0xbe, 0x51, 0x30, 0xb8, 0x25, 0x83, 0x9b, + 0x8c, 0x06, 0xae, 0x62, 0x70, 0x17, 0x18, 0x5c, 0xc3, 0xb0, 0xfd, 0xd6, 0x20, 0x92, 0xc3, 0x34, + 0x70, 0x43, 0x36, 0xf1, 0x06, 0x6c, 0xc0, 0x3c, 0x4d, 0x14, 0xa4, 0xf7, 0xf5, 0x9f, 0xfe, 0xd1, + 0x5f, 0x45, 0x82, 0xed, 0xb7, 0x8d, 0x44, 0x9a, 0x44, 0x13, 0x1a, 0x0e, 0xa3, 0x18, 0xf8, 0x49, + 0x29, 0x72, 0x02, 0x92, 0x7a, 0xd9, 0x92, 0xac, 0x6d, 0xef, 0xa2, 0x28, 0x9e, 0xc6, 0x32, 0x9a, + 0xc0, 0x52, 0xc0, 0xbb, 0x4f, 0x0b, 0x10, 0xe1, 0x10, 0x26, 0x74, 0x29, 0x6e, 0xef, 0xc2, 0x0a, + 0x7a, 0x1c, 0x04, 0x4b, 0x79, 0xb8, 0x9c, 0xeb, 0xfa, 0xc5, 0x31, 0x15, 0x4b, 0xd9, 0xad, 0x46, + 0xa7, 0x32, 0x1a, 0x7b, 0x51, 0x2c, 0x85, 0xe4, 0x4f, 0x86, 0xf4, 0xdf, 0x43, 0xe8, 0xe0, 0x1b, + 0xc9, 0xe9, 0x11, 0x1d, 0xa7, 0x80, 0xbb, 0xa8, 0x15, 0x49, 0x98, 0x08, 0xdb, 0xea, 0x35, 0x76, + 0x3a, 0x7e, 0x27, 0x9f, 0x76, 0x5b, 0x77, 0x94, 0x81, 0x14, 0xf6, 0x5b, 0xed, 0x47, 0x3f, 0x74, + 0x6b, 0x0f, 0x7f, 0xeb, 0xd5, 0xfa, 0xd3, 0x3a, 0xb2, 0x3f, 0x66, 0x21, 0x1d, 0x1f, 0xa6, 0xc1, + 0xd7, 0x10, 0xca, 0xfd, 0x30, 0x04, 0x21, 0x08, 0x64, 0x11, 0x3c, 0xc0, 0x5f, 0xa1, 0xb6, 0x2a, + 0xf7, 0x31, 0x95, 0xd4, 0xb6, 0x7a, 0xd6, 0xce, 0xc6, 0xde, 0x0d, 0xd7, 0xec, 0xfe, 0xf9, 0xaa, + 0x95, 0xfb, 0xaf, 0xd0, 0x6e, 0xb6, 0xeb, 0x7e, 0xa2, 0xb9, 0xee, 0x82, 0xa4, 0x3e, 0x3e, 0x9d, + 0x76, 0x6b, 0xf9, 0xb4, 0x8b, 0x4a, 0x1b, 0x99, 0xb3, 0xe2, 0x11, 0x6a, 0x8a, 0x04, 0x42, 0xbb, + 0xae, 0xd9, 0xef, 0xb8, 0xab, 0xf6, 0x96, 0x5b, 0x21, 0xfb, 0x30, 0x81, 0xd0, 0x7f, 0xc9, 0xa4, + 0x6d, 0xaa, 0x3f, 0xa2, 0x93, 0x60, 0x81, 0xd6, 0x84, 0xa4, 0x32, 0x15, 0x76, 0x43, 0xa7, 0xfb, + 0xe8, 0xd9, 0xa4, 0xd3, 0x94, 0xfe, 0x2b, 0x26, 0xe1, 0x5a, 0xf1, 0x4f, 0x4c, 0xaa, 0xfe, 0x97, + 0xe8, 0xca, 0x3d, 0x16, 0x13, 0xd3, 0x19, 0xfb, 0x52, 0xf2, 0x28, 0x48, 0x25, 0x08, 0xdc, 0x43, + 0xcd, 0x84, 0xca, 0xa1, 0x2e, 0x6c, 0xa7, 0xd4, 0xfb, 0x29, 0x95, 0x43, 0xa2, 0x3d, 0x0a, 0x91, + 0x01, 0x0f, 0x74, 0x71, 0xce, 0x21, 0x8e, 0x80, 0x07, 0x44, 0x7b, 0xfa, 0x3f, 0xd5, 0x11, 0xae, + 0xa0, 0xf6, 0x50, 0x27, 0xa6, 0x13, 0x10, 0x09, 0x0d, 0xc1, 0xf0, 0xbf, 0x6a, 0xa2, 0x3b, 0xf7, + 0x66, 0x0e, 0x52, 0x62, 0x9e, 0x9e, 0x09, 0xbf, 0x81, 0x5a, 0x03, 0xce, 0xd2, 0x44, 0x97, 0xae, + 0xe3, 0xbf, 0x6c, 0x20, 0xad, 0xdb, 0xca, 0x48, 0x0a, 0x1f, 0xbe, 0x86, 0xd6, 0x33, 0xe0, 0x22, + 0x62, 0xb1, 0xdd, 0xd4, 0xb0, 0x4d, 0x03, 0x5b, 0x3f, 0x2a, 0xcc, 0x64, 0xe6, 0xc7, 0xd7, 0x51, + 0x7b, 0x76, 0x5a, 0xec, 0x96, 0xc6, 0x5e, 0x32, 0xd8, 0xf6, 0x6c, 0x41, 0x64, 0x8e, 0xc0, 0xef, + 0xa0, 0x0d, 0x91, 0x06, 0xf3, 0x80, 0x35, 0x1d, 0x70, 0xd9, 0x04, 0x6c, 0x1c, 0x96, 0x2e, 0x72, + 0x1e, 0xa7, 0x96, 0xa5, 0xd6, 0x68, 0xaf, 0x2f, 0x2e, 0x4b, 0x95, 0x80, 0x68, 0x4f, 0xff, 0xac, + 0x8e, 0xb6, 0x0e, 0x61, 0x7c, 0xff, 0xff, 0xe9, 0x7e, 0xb6, 0xd0, 0xfd, 0x77, 0xff, 0x41, 0x3b, + 0x56, 0x4b, 0x7f, 0xbe, 0x4e, 0xc0, 0xcf, 0x75, 0xf4, 0xfa, 0xdf, 0x08, 0xc5, 0xdf, 0x59, 0x08, + 0xf3, 0xa5, 0x26, 0x36, 0x25, 0xff, 0x70, 0x75, 0x85, 0xcb, 0x07, 0xc2, 0x7f, 0x2d, 0x9f, 0x76, + 0x2b, 0x0e, 0x0a, 0xa9, 0xc8, 0x8b, 0x1f, 0x59, 0xe8, 0x4a, 0x5c, 0x75, 0x62, 0xcd, 0x36, 0xdd, + 0x5e, 0x5d, 0x51, 0xe5, 0x05, 0xe0, 0x5f, 0xcd, 0xa7, 0xdd, 0xea, 0xbb, 0x81, 0x54, 0x0b, 0xe8, + 0xff, 0x5a, 0x47, 0x97, 0x5f, 0xdc, 0xd3, 0xff, 0x4d, 0x97, 0xfe, 0xd9, 0x44, 0x5b, 0x2f, 0x3a, + 0xf4, 0x5f, 0x76, 0xe8, 0x7c, 0x90, 0x34, 0x16, 0x6f, 0xdc, 0xcf, 0x05, 0x70, 0x33, 0x48, 0x7a, + 0xb3, 0x41, 0xd2, 0xd4, 0x6f, 0x13, 0xa4, 0xb6, 0x42, 0x0f, 0x11, 0x31, 0x9b, 0x22, 0x27, 0xa8, + 0x05, 0xea, 0x2d, 0x63, 0xb7, 0x7a, 0x8d, 0x9d, 0x8d, 0xbd, 0xcf, 0x9e, 0x59, 0xb3, 0xb9, 0xfa, + 0x89, 0x74, 0x10, 0x4b, 0x7e, 0x52, 0x0e, 0x30, 0x6d, 0x23, 0x45, 0xc6, 0xed, 0xcc, 0x3c, 0xa3, + 0x34, 0x06, 0x5f, 0x42, 0x8d, 0x11, 0x9c, 0x14, 0x03, 0x94, 0xa8, 0x4f, 0x4c, 0x50, 0x2b, 0x53, + 0x2f, 0x2c, 0x53, 0xe8, 0xf7, 0x57, 0x97, 0x56, 0xbe, 0xd2, 0x48, 0x41, 0x75, 0xab, 0x7e, 0xd3, + 0xea, 0xff, 0x68, 0xa1, 0xab, 0x17, 0xb6, 0xac, 0x1a, 0xab, 0x74, 0x3c, 0x66, 0x0f, 0xe0, 0x58, + 0x6b, 0x69, 0x97, 0x63, 0x75, 0xbf, 0x30, 0x93, 0x99, 0x1f, 0xbf, 0x89, 0xd6, 0x38, 0x50, 0xc1, + 0x62, 0x33, 0xca, 0xe7, 0xdd, 0x4e, 0xb4, 0x95, 0x18, 0x2f, 0xde, 0x47, 0x9b, 0xa0, 0xd2, 0x6b, + 0x71, 0x07, 0x9c, 0x33, 0x6e, 0xb6, 0x6c, 0xcb, 0x04, 0x6c, 0x1e, 0x2c, 0xba, 0xc9, 0x93, 0x78, + 0xff, 0xda, 0xe9, 0x99, 0x53, 0x7b, 0x7c, 0xe6, 0xd4, 0x7e, 0x39, 0x73, 0x6a, 0x0f, 0x73, 0xc7, + 0x3a, 0xcd, 0x1d, 0xeb, 0x71, 0xee, 0x58, 0xbf, 0xe7, 0x8e, 0xf5, 0xfd, 0x1f, 0x4e, 0xed, 0x8b, + 0x75, 0xb3, 0xe8, 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0x31, 0x9f, 0xbd, 0x1e, 0x75, 0x0c, 0x00, + 0x00, } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authorization/v1beta1/generated.proto b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authorization/v1beta1/generated.proto index 6afbfb66..26d2b835 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authorization/v1beta1/generated.proto +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authorization/v1beta1/generated.proto @@ -45,7 +45,7 @@ message ExtraValue { // checking. message LocalSubjectAccessReview { // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec holds information about the request being evaluated. spec.namespace must be equal to the namespace // you made the request against. If empty, it is defaulted. @@ -106,7 +106,7 @@ message ResourceAttributes { // to check whether they can perform an action message SelfSubjectAccessReview { // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec holds information about the request being evaluated. user and groups must be empty optional SelfSubjectAccessReviewSpec spec = 2; @@ -131,7 +131,7 @@ message SelfSubjectAccessReviewSpec { // SubjectAccessReview checks whether or not a user or group can perform an action. message SubjectAccessReview { // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec holds information about the request being evaluated optional SubjectAccessReviewSpec spec = 2; diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authorization/v1beta1/register.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authorization/v1beta1/register.go index 5e60571d..fba266f5 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authorization/v1beta1/register.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authorization/v1beta1/register.go @@ -42,7 +42,6 @@ var ( // Adds the list of known types to api.Scheme. func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, - &v1.ListOptions{}, &v1.DeleteOptions{}, &metav1.ExportOptions{}, &metav1.GetOptions{}, diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authorization/v1beta1/types.generated.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authorization/v1beta1/types.generated.go index 27d6fcf4..939603c5 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authorization/v1beta1/types.generated.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authorization/v1beta1/types.generated.go @@ -26,8 +26,7 @@ import ( "fmt" codec1978 "github.com/ugorji/go/codec" pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - pkg3_types "k8s.io/apimachinery/pkg/types" - pkg2_v1 "k8s.io/client-go/pkg/api/v1" + pkg2_types "k8s.io/apimachinery/pkg/types" "reflect" "runtime" time "time" @@ -64,10 +63,9 @@ func init() { } if false { // reference the types, but skip this branch at build/run time var v0 pkg1_v1.TypeMeta - var v1 pkg3_types.UID - var v2 pkg2_v1.ObjectMeta - var v3 time.Time - _, _, _, _ = v0, v1, v2, v3 + var v1 pkg2_types.UID + var v2 time.Time + _, _, _ = v0, v1, v2 } } @@ -159,7 +157,13 @@ func (x *SubjectAccessReview) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -169,7 +173,13 @@ func (x *SubjectAccessReview) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -287,24 +297,30 @@ func (x *SubjectAccessReview) codecDecodeSelfFromMap(l int, d *codec1978.Decoder } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = SubjectAccessReviewSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = SubjectAccessReviewStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -317,16 +333,16 @@ func (x *SubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.Decod var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -334,21 +350,21 @@ func (x *SubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -356,38 +372,44 @@ func (x *SubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -395,16 +417,16 @@ func (x *SubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.Spec = SubjectAccessReviewSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -412,21 +434,21 @@ func (x *SubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.Status = SubjectAccessReviewStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -519,7 +541,13 @@ func (x *SelfSubjectAccessReview) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -529,7 +557,13 @@ func (x *SelfSubjectAccessReview) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -647,24 +681,30 @@ func (x *SelfSubjectAccessReview) codecDecodeSelfFromMap(l int, d *codec1978.Dec } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = SelfSubjectAccessReviewSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = SubjectAccessReviewStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -677,16 +717,16 @@ func (x *SelfSubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.D var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -694,21 +734,21 @@ func (x *SelfSubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.D if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -716,38 +756,44 @@ func (x *SelfSubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.D if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -755,16 +801,16 @@ func (x *SelfSubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.D if r.TryDecodeAsNil() { x.Spec = SelfSubjectAccessReviewSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -772,21 +818,21 @@ func (x *SelfSubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978.D if r.TryDecodeAsNil() { x.Status = SubjectAccessReviewStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -879,7 +925,13 @@ func (x *LocalSubjectAccessReview) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -889,7 +941,13 @@ func (x *LocalSubjectAccessReview) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -1007,24 +1065,30 @@ func (x *LocalSubjectAccessReview) codecDecodeSelfFromMap(l int, d *codec1978.De } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = SubjectAccessReviewSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = SubjectAccessReviewStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -1037,16 +1101,16 @@ func (x *LocalSubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978. var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1054,21 +1118,21 @@ func (x *LocalSubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978. if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1076,38 +1140,44 @@ func (x *LocalSubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978. if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1115,16 +1185,16 @@ func (x *LocalSubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978. if r.TryDecodeAsNil() { x.Spec = SubjectAccessReviewSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1132,21 +1202,21 @@ func (x *LocalSubjectAccessReview) codecDecodeSelfFromArray(l int, d *codec1978. if r.TryDecodeAsNil() { x.Status = SubjectAccessReviewStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authorization/v1beta1/types.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authorization/v1beta1/types.go index 813bfd71..8a172742 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authorization/v1beta1/types.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authorization/v1beta1/types.go @@ -20,7 +20,6 @@ import ( "fmt" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/client-go/pkg/api/v1" ) // +genclient=true @@ -31,7 +30,7 @@ import ( type SubjectAccessReview struct { metav1.TypeMeta `json:",inline"` // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec holds information about the request being evaluated Spec SubjectAccessReviewSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` @@ -51,7 +50,7 @@ type SubjectAccessReview struct { type SelfSubjectAccessReview struct { metav1.TypeMeta `json:",inline"` // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec holds information about the request being evaluated. user and groups must be empty Spec SelfSubjectAccessReviewSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` @@ -70,7 +69,7 @@ type SelfSubjectAccessReview struct { type LocalSubjectAccessReview struct { metav1.TypeMeta `json:",inline"` // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec holds information about the request being evaluated. spec.namespace must be equal to the namespace // you made the request against. If empty, it is defaulted. diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authorization/v1beta1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authorization/v1beta1/zz_generated.conversion.go index dc22725c..7702201d 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authorization/v1beta1/zz_generated.conversion.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authorization/v1beta1/zz_generated.conversion.go @@ -55,10 +55,7 @@ func RegisterConversions(scheme *runtime.Scheme) error { } func autoConvert_v1beta1_LocalSubjectAccessReview_To_authorization_LocalSubjectAccessReview(in *LocalSubjectAccessReview, out *authorization.LocalSubjectAccessReview, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_SubjectAccessReviewSpec_To_authorization_SubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -73,10 +70,7 @@ func Convert_v1beta1_LocalSubjectAccessReview_To_authorization_LocalSubjectAcces } func autoConvert_authorization_LocalSubjectAccessReview_To_v1beta1_LocalSubjectAccessReview(in *authorization.LocalSubjectAccessReview, out *LocalSubjectAccessReview, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_authorization_SubjectAccessReviewSpec_To_v1beta1_SubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -141,10 +135,7 @@ func Convert_authorization_ResourceAttributes_To_v1beta1_ResourceAttributes(in * } func autoConvert_v1beta1_SelfSubjectAccessReview_To_authorization_SelfSubjectAccessReview(in *SelfSubjectAccessReview, out *authorization.SelfSubjectAccessReview, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_SelfSubjectAccessReviewSpec_To_authorization_SelfSubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -159,10 +150,7 @@ func Convert_v1beta1_SelfSubjectAccessReview_To_authorization_SelfSubjectAccessR } func autoConvert_authorization_SelfSubjectAccessReview_To_v1beta1_SelfSubjectAccessReview(in *authorization.SelfSubjectAccessReview, out *SelfSubjectAccessReview, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_authorization_SelfSubjectAccessReviewSpec_To_v1beta1_SelfSubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -197,10 +185,7 @@ func Convert_authorization_SelfSubjectAccessReviewSpec_To_v1beta1_SelfSubjectAcc } func autoConvert_v1beta1_SubjectAccessReview_To_authorization_SubjectAccessReview(in *SubjectAccessReview, out *authorization.SubjectAccessReview, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_SubjectAccessReviewSpec_To_authorization_SubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -215,10 +200,7 @@ func Convert_v1beta1_SubjectAccessReview_To_authorization_SubjectAccessReview(in } func autoConvert_authorization_SubjectAccessReview_To_v1beta1_SubjectAccessReview(in *authorization.SubjectAccessReview, out *SubjectAccessReview, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_authorization_SubjectAccessReviewSpec_To_v1beta1_SubjectAccessReviewSpec(&in.Spec, &out.Spec, s); err != nil { return err } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authorization/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authorization/v1beta1/zz_generated.deepcopy.go index 906708e3..2bbd414a 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authorization/v1beta1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authorization/v1beta1/zz_generated.deepcopy.go @@ -21,9 +21,9 @@ limitations under the License. package v1beta1 import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - v1 "k8s.io/client-go/pkg/api/v1" reflect "reflect" ) @@ -51,8 +51,10 @@ func DeepCopy_v1beta1_LocalSubjectAccessReview(in interface{}, out interface{}, in := in.(*LocalSubjectAccessReview) out := out.(*LocalSubjectAccessReview) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v1beta1_SubjectAccessReviewSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -84,8 +86,10 @@ func DeepCopy_v1beta1_SelfSubjectAccessReview(in interface{}, out interface{}, c in := in.(*SelfSubjectAccessReview) out := out.(*SelfSubjectAccessReview) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v1beta1_SelfSubjectAccessReviewSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -118,8 +122,10 @@ func DeepCopy_v1beta1_SubjectAccessReview(in interface{}, out interface{}, c *co in := in.(*SubjectAccessReview) out := out.(*SubjectAccessReview) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v1beta1_SubjectAccessReviewSpec(&in.Spec, &out.Spec, c); err != nil { return err diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authorization/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authorization/zz_generated.deepcopy.go index 4d4a903e..19ccebda 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authorization/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/authorization/zz_generated.deepcopy.go @@ -21,9 +21,9 @@ limitations under the License. package authorization import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - api "k8s.io/client-go/pkg/api" reflect "reflect" ) @@ -51,8 +51,10 @@ func DeepCopy_authorization_LocalSubjectAccessReview(in interface{}, out interfa in := in.(*LocalSubjectAccessReview) out := out.(*LocalSubjectAccessReview) *out = *in - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_authorization_SubjectAccessReviewSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -84,8 +86,10 @@ func DeepCopy_authorization_SelfSubjectAccessReview(in interface{}, out interfac in := in.(*SelfSubjectAccessReview) out := out.(*SelfSubjectAccessReview) *out = *in - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_authorization_SelfSubjectAccessReviewSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -118,8 +122,10 @@ func DeepCopy_authorization_SubjectAccessReview(in interface{}, out interface{}, in := in.(*SubjectAccessReview) out := out.(*SubjectAccessReview) *out = *in - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_authorization_SubjectAccessReviewSpec(&in.Spec, &out.Spec, c); err != nil { return err diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/autoscaling/install/install.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/autoscaling/install/install.go index 060aa077..9cfbd2a7 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/autoscaling/install/install.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/autoscaling/install/install.go @@ -19,12 +19,20 @@ limitations under the License. package install import ( - "k8s.io/client-go/pkg/apimachinery/announced" + "k8s.io/apimachinery/pkg/apimachinery/announced" + "k8s.io/apimachinery/pkg/apimachinery/registered" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/client-go/pkg/api" "k8s.io/client-go/pkg/apis/autoscaling" "k8s.io/client-go/pkg/apis/autoscaling/v1" ) func init() { + Install(api.GroupFactoryRegistry, api.Registry, api.Scheme) +} + +// Install registers the API group and adds types to a scheme +func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) { if err := announced.NewGroupMetaFactory( &announced.GroupMetaFactoryArgs{ GroupName: autoscaling.GroupName, @@ -35,7 +43,7 @@ func init() { announced.VersionToSchemeFunc{ v1.SchemeGroupVersion.Version: v1.AddToScheme, }, - ).Announce().RegisterAndEnable(); err != nil { + ).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil { panic(err) } } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/autoscaling/register.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/autoscaling/register.go index b2f7398d..814c076b 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/autoscaling/register.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/autoscaling/register.go @@ -49,7 +49,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { &Scale{}, &HorizontalPodAutoscaler{}, &HorizontalPodAutoscalerList{}, - &api.ListOptions{}, &api.DeleteOptions{}, ) return nil diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/autoscaling/types.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/autoscaling/types.go index 89ef08c7..55af1907 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/autoscaling/types.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/autoscaling/types.go @@ -18,7 +18,6 @@ package autoscaling import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/client-go/pkg/api" ) // Scale represents a scaling request for a resource. @@ -26,7 +25,7 @@ type Scale struct { metav1.TypeMeta // Standard object metadata; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata. // +optional - api.ObjectMeta + metav1.ObjectMeta // defines the behavior of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. // +optional @@ -113,7 +112,7 @@ type HorizontalPodAutoscalerStatus struct { type HorizontalPodAutoscaler struct { metav1.TypeMeta // +optional - api.ObjectMeta + metav1.ObjectMeta // behaviour of autoscaler. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. // +optional diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/autoscaling/v1/generated.pb.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/autoscaling/v1/generated.pb.go index 223837a6..c5f68121 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/autoscaling/v1/generated.pb.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/autoscaling/v1/generated.pb.go @@ -543,7 +543,7 @@ func (this *HorizontalPodAutoscaler) String() string { return "nil" } s := strings.Join([]string{`&HorizontalPodAutoscaler{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "HorizontalPodAutoscalerSpec", "HorizontalPodAutoscalerSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "HorizontalPodAutoscalerStatus", "HorizontalPodAutoscalerStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -593,7 +593,7 @@ func (this *Scale) String() string { return "nil" } s := strings.Join([]string{`&Scale{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ScaleSpec", "ScaleSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ScaleStatus", "ScaleStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -1731,58 +1731,58 @@ var ( var fileDescriptorGenerated = []byte{ // 855 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xb4, 0x55, 0xcd, 0x6f, 0xdc, 0x44, - 0x14, 0x5f, 0xef, 0x47, 0x95, 0x8e, 0x49, 0x02, 0x83, 0xd4, 0xae, 0x52, 0x61, 0x47, 0x0b, 0x87, - 0x80, 0x8a, 0xad, 0x5d, 0x95, 0x8a, 0x1e, 0xe3, 0xa0, 0xd2, 0x8a, 0x86, 0x46, 0x93, 0xb6, 0x42, - 0x08, 0x21, 0xcd, 0x7a, 0x5f, 0x9d, 0xe9, 0xae, 0x3d, 0xd6, 0xcc, 0x78, 0x05, 0x3d, 0x71, 0xe2, - 0xcc, 0x85, 0x03, 0x7f, 0x0e, 0xb7, 0xdc, 0xe8, 0x91, 0xd3, 0x8a, 0x18, 0xfe, 0x0c, 0x0e, 0xc8, - 0xb3, 0x13, 0xef, 0x57, 0xbc, 0x49, 0x04, 0xdc, 0x76, 0xe6, 0xfd, 0x3e, 0xde, 0xbc, 0xf7, 0xfc, - 0x16, 0x3d, 0x18, 0x7e, 0x2a, 0x3d, 0xc6, 0xfd, 0x61, 0xd6, 0x07, 0x91, 0x80, 0x02, 0xe9, 0xa7, - 0xc3, 0xc8, 0xa7, 0x29, 0x93, 0x3e, 0xcd, 0x14, 0x97, 0x21, 0x1d, 0xb1, 0x24, 0xf2, 0xc7, 0x5d, - 0x3f, 0x82, 0x04, 0x04, 0x55, 0x30, 0xf0, 0x52, 0xc1, 0x15, 0xc7, 0x1f, 0x4e, 0xa9, 0xde, 0x8c, - 0xea, 0xa5, 0xc3, 0xc8, 0x2b, 0xa8, 0xde, 0x1c, 0xd5, 0x1b, 0x77, 0x77, 0x3e, 0x8e, 0x98, 0x3a, - 0xc9, 0xfa, 0x5e, 0xc8, 0x63, 0x3f, 0xe2, 0x11, 0xf7, 0xb5, 0x42, 0x3f, 0x7b, 0xa9, 0x4f, 0xfa, - 0xa0, 0x7f, 0x4d, 0x95, 0x77, 0xee, 0x99, 0xa4, 0x68, 0xca, 0x62, 0x1a, 0x9e, 0xb0, 0x04, 0xc4, - 0xf7, 0xb3, 0xb4, 0x62, 0x50, 0xf4, 0x82, 0x7c, 0x76, 0xfc, 0x2a, 0x96, 0xc8, 0x12, 0xc5, 0x62, - 0x58, 0x21, 0xdc, 0xbf, 0x8c, 0x20, 0xc3, 0x13, 0x88, 0xe9, 0x0a, 0xaf, 0x57, 0x59, 0x33, 0x5f, - 0x80, 0xe4, 0x99, 0x08, 0x57, 0xbd, 0xee, 0x56, 0x73, 0x2e, 0x78, 0x4a, 0xf7, 0x62, 0x74, 0xa6, - 0xd8, 0xc8, 0x67, 0x89, 0x92, 0x4a, 0x2c, 0x53, 0x3a, 0x3f, 0x5b, 0xe8, 0xce, 0x81, 0xe0, 0x52, - 0xbe, 0x00, 0x21, 0x19, 0x4f, 0x9e, 0xf6, 0x5f, 0x41, 0xa8, 0x08, 0xbc, 0x04, 0x01, 0x49, 0x08, - 0x78, 0x17, 0x35, 0x87, 0x2c, 0x19, 0xb4, 0xad, 0x5d, 0x6b, 0xef, 0x66, 0xf0, 0xd6, 0xe9, 0xc4, - 0xad, 0xe5, 0x13, 0xb7, 0xf9, 0x05, 0x4b, 0x06, 0x44, 0x47, 0x0a, 0x44, 0x42, 0x63, 0x68, 0xd7, - 0x17, 0x11, 0x5f, 0xd2, 0x18, 0x88, 0x8e, 0xe0, 0x1e, 0x42, 0x34, 0x65, 0xc6, 0xa0, 0xdd, 0xd0, - 0x38, 0x6c, 0x70, 0x68, 0xff, 0xe8, 0xb1, 0x89, 0x90, 0x39, 0x54, 0xe7, 0xb7, 0x3a, 0xba, 0xfd, - 0x88, 0x0b, 0xf6, 0x9a, 0x27, 0x8a, 0x8e, 0x8e, 0xf8, 0x60, 0xdf, 0x8c, 0x06, 0x08, 0xfc, 0x15, - 0xda, 0x28, 0x9a, 0x39, 0xa0, 0x8a, 0xea, 0xbc, 0xec, 0xde, 0x9e, 0x57, 0x39, 0x54, 0xde, 0xb8, - 0xeb, 0x4d, 0x1f, 0x75, 0x08, 0x8a, 0xce, 0x7c, 0x67, 0x77, 0xa4, 0x54, 0xc3, 0x27, 0xa8, 0x29, - 0x53, 0x08, 0xf5, 0x5b, 0xec, 0xde, 0x43, 0xef, 0xca, 0xa3, 0xea, 0x55, 0xe4, 0x7a, 0x9c, 0x42, - 0x38, 0xab, 0x49, 0x71, 0x22, 0xda, 0x01, 0xa7, 0xe8, 0x86, 0x54, 0x54, 0x65, 0x52, 0xd7, 0xc3, - 0xee, 0x3d, 0xfa, 0x0f, 0xbc, 0xb4, 0x5e, 0xb0, 0x65, 0xdc, 0x6e, 0x4c, 0xcf, 0xc4, 0xf8, 0x74, - 0xfe, 0xb2, 0xd0, 0x9d, 0x0a, 0xe6, 0x13, 0x26, 0x15, 0xfe, 0x66, 0xa5, 0xaa, 0xde, 0x79, 0x4e, - 0xf3, 0x93, 0x3e, 0xcb, 0xaa, 0x40, 0x17, 0xe9, 0x14, 0x6c, 0x5d, 0xdb, 0xb7, 0x8d, 0xf3, 0xc6, - 0xf9, 0xcd, 0x5c, 0x65, 0x23, 0xd4, 0x62, 0x0a, 0x62, 0xd9, 0xae, 0xef, 0x36, 0xf6, 0xec, 0x5e, - 0xf0, 0xef, 0x9f, 0x1b, 0x6c, 0x1a, 0xbb, 0xd6, 0xe3, 0x42, 0x98, 0x4c, 0xf5, 0x3b, 0x7f, 0xd7, - 0x2b, 0x9f, 0x59, 0x94, 0x1f, 0xff, 0x68, 0xa1, 0x2d, 0x7d, 0x7c, 0x46, 0x45, 0x04, 0xc5, 0xa4, - 0x9b, 0xd7, 0x5e, 0xa7, 0xdb, 0x6b, 0xbe, 0x98, 0xe0, 0x96, 0x49, 0x6b, 0xeb, 0x78, 0xc1, 0x85, - 0x2c, 0xb9, 0xe2, 0x2e, 0xb2, 0x63, 0x96, 0x10, 0x48, 0x47, 0x2c, 0xa4, 0x52, 0x8f, 0x5c, 0x2b, - 0xd8, 0xce, 0x27, 0xae, 0x7d, 0x38, 0xbb, 0x26, 0xf3, 0x18, 0xfc, 0x09, 0xb2, 0x63, 0xfa, 0x5d, - 0x49, 0x69, 0x68, 0xca, 0xbb, 0xc6, 0xcf, 0x3e, 0x9c, 0x85, 0xc8, 0x3c, 0x0e, 0xbf, 0x42, 0x8e, - 0xd2, 0xb6, 0x07, 0x47, 0xcf, 0x9f, 0x2b, 0x36, 0x62, 0xaf, 0xa9, 0x62, 0x3c, 0x39, 0x02, 0x11, - 0x42, 0xa2, 0x68, 0x04, 0xed, 0xa6, 0x56, 0xea, 0xe4, 0x13, 0xd7, 0x79, 0xb6, 0x16, 0x49, 0x2e, - 0x51, 0xea, 0xfc, 0xda, 0x40, 0xef, 0xad, 0x9d, 0x4f, 0xfc, 0x10, 0x61, 0xde, 0x97, 0x20, 0xc6, - 0x30, 0xf8, 0x7c, 0xba, 0x8c, 0x8a, 0xad, 0x50, 0xf4, 0xa0, 0x11, 0xdc, 0xca, 0x27, 0x2e, 0x7e, - 0xba, 0x12, 0x25, 0x17, 0x30, 0x70, 0x88, 0x36, 0x47, 0x54, 0xaa, 0x69, 0x95, 0x99, 0x59, 0x40, - 0x76, 0xef, 0xa3, 0xab, 0x0d, 0x6d, 0xc1, 0x08, 0xde, 0xc9, 0x27, 0xee, 0xe6, 0x93, 0x79, 0x11, - 0xb2, 0xa8, 0x89, 0xf7, 0xd1, 0x76, 0x98, 0x09, 0x01, 0x89, 0x5a, 0xaa, 0xfa, 0x6d, 0x53, 0xf5, - 0xed, 0x83, 0xc5, 0x30, 0x59, 0xc6, 0x17, 0x12, 0x03, 0x90, 0x4c, 0xc0, 0xa0, 0x94, 0x68, 0x2e, - 0x4a, 0x7c, 0xb6, 0x18, 0x26, 0xcb, 0x78, 0x1c, 0x23, 0xd7, 0xa8, 0x56, 0x76, 0xb0, 0xa5, 0x25, - 0xdf, 0xcf, 0x27, 0xae, 0x7b, 0xb0, 0x1e, 0x4a, 0x2e, 0xd3, 0xea, 0xfc, 0x52, 0x47, 0x2d, 0x5d, - 0x82, 0xff, 0x71, 0xd3, 0xbe, 0x58, 0xd8, 0xb4, 0xf7, 0xae, 0xf1, 0xed, 0xe9, 0xcc, 0x2a, 0xf7, - 0xea, 0xb7, 0x4b, 0x7b, 0xf5, 0xfe, 0xb5, 0x95, 0xd7, 0x6f, 0xd1, 0x07, 0xe8, 0x66, 0x99, 0x00, - 0xbe, 0x8b, 0x36, 0xc4, 0x79, 0x4f, 0x2d, 0xdd, 0x80, 0x72, 0x05, 0x96, 0xcd, 0x2c, 0x11, 0x1d, - 0x86, 0xec, 0x39, 0x87, 0xeb, 0x91, 0x0b, 0xb4, 0x84, 0x11, 0x84, 0x8a, 0x0b, 0xf3, 0x4f, 0x5b, - 0xa2, 0x8f, 0xcd, 0x3d, 0x29, 0x11, 0xc1, 0x07, 0xa7, 0x67, 0x4e, 0xed, 0xcd, 0x99, 0x53, 0xfb, - 0xfd, 0xcc, 0xa9, 0xfd, 0x90, 0x3b, 0xd6, 0x69, 0xee, 0x58, 0x6f, 0x72, 0xc7, 0xfa, 0x23, 0x77, - 0xac, 0x9f, 0xfe, 0x74, 0x6a, 0x5f, 0xd7, 0xc7, 0xdd, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xe2, - 0xa2, 0xe7, 0x25, 0xc5, 0x09, 0x00, 0x00, + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xbc, 0x55, 0x4f, 0x6f, 0xdc, 0x44, + 0x14, 0x5f, 0xef, 0x9f, 0x2a, 0x1d, 0x93, 0x04, 0x06, 0xa9, 0x5d, 0xa5, 0xc2, 0x8e, 0x16, 0x0e, + 0x05, 0x15, 0x9b, 0x5d, 0x95, 0x8a, 0x1e, 0xe3, 0xa0, 0xd2, 0x8a, 0x86, 0x46, 0x93, 0xb6, 0x07, + 0x84, 0x10, 0xb3, 0xde, 0x57, 0x67, 0xba, 0x6b, 0x8f, 0x35, 0x33, 0x5e, 0x41, 0x4f, 0x9c, 0x38, + 0x73, 0xe1, 0x03, 0xf0, 0x51, 0xb8, 0xe5, 0xd8, 0x1b, 0x9c, 0x56, 0xc4, 0xf0, 0x31, 0x38, 0x20, + 0xcf, 0x4e, 0xbc, 0xff, 0xe2, 0x4d, 0x22, 0x50, 0x6f, 0x3b, 0xf3, 0x7e, 0x7f, 0xde, 0xbc, 0xf7, + 0xfc, 0x16, 0xdd, 0x1f, 0x7e, 0x26, 0x3d, 0xc6, 0xfd, 0x61, 0xd6, 0x07, 0x91, 0x80, 0x02, 0xe9, + 0xa7, 0xc3, 0xc8, 0xa7, 0x29, 0x93, 0x3e, 0xcd, 0x14, 0x97, 0x21, 0x1d, 0xb1, 0x24, 0xf2, 0xc7, + 0x5d, 0x3f, 0x82, 0x04, 0x04, 0x55, 0x30, 0xf0, 0x52, 0xc1, 0x15, 0xc7, 0x1f, 0x4e, 0xa9, 0xde, + 0x8c, 0xea, 0xa5, 0xc3, 0xc8, 0x2b, 0xa8, 0xde, 0x1c, 0xd5, 0x1b, 0x77, 0x77, 0x3e, 0x8e, 0x98, + 0x3a, 0xce, 0xfa, 0x5e, 0xc8, 0x63, 0x3f, 0xe2, 0x11, 0xf7, 0xb5, 0x42, 0x3f, 0x7b, 0xa1, 0x4f, + 0xfa, 0xa0, 0x7f, 0x4d, 0x95, 0x77, 0xee, 0x9a, 0xa4, 0x68, 0xca, 0x62, 0x1a, 0x1e, 0xb3, 0x04, + 0xc4, 0x0f, 0xb3, 0xb4, 0x62, 0x50, 0xf4, 0x9c, 0x7c, 0x76, 0xfc, 0x2a, 0x96, 0xc8, 0x12, 0xc5, + 0x62, 0x58, 0x21, 0xdc, 0xbb, 0x88, 0x20, 0xc3, 0x63, 0x88, 0xe9, 0x0a, 0xaf, 0x57, 0x59, 0x33, + 0x5f, 0x80, 0xe4, 0x99, 0x08, 0x57, 0xbd, 0xee, 0x54, 0x73, 0xce, 0x79, 0x4a, 0xf7, 0x7c, 0x74, + 0xa6, 0xd8, 0xc8, 0x67, 0x89, 0x92, 0x4a, 0x2c, 0x53, 0x3a, 0xbf, 0x58, 0xe8, 0xd6, 0xbe, 0xe0, + 0x52, 0x3e, 0x07, 0x21, 0x19, 0x4f, 0x9e, 0xf4, 0x5f, 0x42, 0xa8, 0x08, 0xbc, 0x00, 0x01, 0x49, + 0x08, 0x78, 0x17, 0x35, 0x87, 0x2c, 0x19, 0xb4, 0xad, 0x5d, 0xeb, 0xf6, 0xf5, 0xe0, 0xad, 0x93, + 0x89, 0x5b, 0xcb, 0x27, 0x6e, 0xf3, 0x4b, 0x96, 0x0c, 0x88, 0x8e, 0x14, 0x88, 0x84, 0xc6, 0xd0, + 0xae, 0x2f, 0x22, 0xbe, 0xa2, 0x31, 0x10, 0x1d, 0xc1, 0x3d, 0x84, 0x68, 0xca, 0x8c, 0x41, 0xbb, + 0xa1, 0x71, 0xd8, 0xe0, 0xd0, 0xde, 0xe1, 0x23, 0x13, 0x21, 0x73, 0xa8, 0xce, 0xef, 0x75, 0x74, + 0xf3, 0x21, 0x17, 0xec, 0x15, 0x4f, 0x14, 0x1d, 0x1d, 0xf2, 0xc1, 0x9e, 0x19, 0x0d, 0x10, 0xf8, + 0x3b, 0xb4, 0x51, 0x34, 0x73, 0x40, 0x15, 0xd5, 0x79, 0xd9, 0xbd, 0x4f, 0x3c, 0x33, 0x54, 0xf3, + 0x3d, 0x99, 0x8d, 0x55, 0x81, 0xf6, 0xc6, 0x5d, 0x6f, 0xfa, 0xb8, 0x03, 0x50, 0x74, 0xe6, 0x3f, + 0xbb, 0x23, 0xa5, 0x2a, 0x3e, 0x46, 0x4d, 0x99, 0x42, 0xa8, 0xdf, 0x64, 0xf7, 0x1e, 0x78, 0x97, + 0x1e, 0x59, 0xaf, 0x22, 0xe7, 0xa3, 0x14, 0xc2, 0x59, 0x6d, 0x8a, 0x13, 0xd1, 0x0e, 0x38, 0x45, + 0xd7, 0xa4, 0xa2, 0x2a, 0x93, 0xba, 0x2e, 0x76, 0xef, 0xe1, 0xff, 0xe0, 0xa5, 0xf5, 0x82, 0x2d, + 0xe3, 0x76, 0x6d, 0x7a, 0x26, 0xc6, 0xa7, 0xf3, 0xb7, 0x85, 0x6e, 0x55, 0x30, 0x1f, 0x33, 0xa9, + 0xf0, 0x37, 0x2b, 0xd5, 0xf5, 0x2e, 0x57, 0xdd, 0x82, 0xad, 0x6b, 0xfb, 0xb6, 0x71, 0xde, 0x38, + 0xbb, 0x99, 0xab, 0x6c, 0x84, 0x5a, 0x4c, 0x41, 0x2c, 0xdb, 0xf5, 0xdd, 0xc6, 0x6d, 0xbb, 0x17, + 0xfc, 0xf7, 0xe7, 0x06, 0x9b, 0xc6, 0xae, 0xf5, 0xa8, 0x10, 0x26, 0x53, 0xfd, 0xce, 0x3f, 0xf5, + 0xca, 0x67, 0x16, 0xe5, 0xc7, 0x3f, 0x59, 0x68, 0x4b, 0x1f, 0x9f, 0x52, 0x11, 0x41, 0x31, 0xf1, + 0xe6, 0xb5, 0x57, 0xe9, 0xf6, 0x9a, 0x2f, 0x27, 0xb8, 0x61, 0xd2, 0xda, 0x3a, 0x5a, 0x70, 0x21, + 0x4b, 0xae, 0xb8, 0x8b, 0xec, 0x98, 0x25, 0x04, 0xd2, 0x11, 0x0b, 0xa9, 0xd4, 0x23, 0xd7, 0x0a, + 0xb6, 0xf3, 0x89, 0x6b, 0x1f, 0xcc, 0xae, 0xc9, 0x3c, 0x06, 0x7f, 0x8a, 0xec, 0x98, 0x7e, 0x5f, + 0x52, 0x1a, 0x9a, 0xf2, 0xae, 0xf1, 0xb3, 0x0f, 0x66, 0x21, 0x32, 0x8f, 0xc3, 0x2f, 0x91, 0xa3, + 0xb4, 0xed, 0xfe, 0xe1, 0xb3, 0x67, 0x8a, 0x8d, 0xd8, 0x2b, 0xaa, 0x18, 0x4f, 0x0e, 0x41, 0x84, + 0x90, 0x28, 0x1a, 0x41, 0xbb, 0xa9, 0x95, 0x3a, 0xf9, 0xc4, 0x75, 0x9e, 0xae, 0x45, 0x92, 0x0b, + 0x94, 0x3a, 0xbf, 0x35, 0xd0, 0x7b, 0x6b, 0xe7, 0x13, 0x3f, 0x40, 0x98, 0xf7, 0x25, 0x88, 0x31, + 0x0c, 0xbe, 0x98, 0x2e, 0xa5, 0x62, 0x3b, 0x14, 0x3d, 0x68, 0x04, 0x37, 0xf2, 0x89, 0x8b, 0x9f, + 0xac, 0x44, 0xc9, 0x39, 0x0c, 0x1c, 0xa2, 0xcd, 0x11, 0x95, 0x6a, 0x5a, 0x65, 0x66, 0x16, 0x91, + 0xdd, 0xfb, 0xe8, 0x72, 0x43, 0x5b, 0x30, 0x82, 0x77, 0xf2, 0x89, 0xbb, 0xf9, 0x78, 0x5e, 0x84, + 0x2c, 0x6a, 0xe2, 0x3d, 0xb4, 0x1d, 0x66, 0x42, 0x40, 0xa2, 0x96, 0xaa, 0x7e, 0xd3, 0x54, 0x7d, + 0x7b, 0x7f, 0x31, 0x4c, 0x96, 0xf1, 0x85, 0xc4, 0x00, 0x24, 0x13, 0x30, 0x28, 0x25, 0x9a, 0x8b, + 0x12, 0x9f, 0x2f, 0x86, 0xc9, 0x32, 0x1e, 0xc7, 0xc8, 0x35, 0xaa, 0x95, 0x1d, 0x6c, 0x69, 0xc9, + 0xf7, 0xf3, 0x89, 0xeb, 0xee, 0xaf, 0x87, 0x92, 0x8b, 0xb4, 0x3a, 0xbf, 0xd6, 0x51, 0x4b, 0x97, + 0xe0, 0x0d, 0x6c, 0xdc, 0xe7, 0x0b, 0x1b, 0xf7, 0xee, 0x15, 0xbe, 0x41, 0x9d, 0x61, 0xe5, 0x7e, + 0xfd, 0x76, 0x69, 0xbf, 0xde, 0xbb, 0xb2, 0xf2, 0xfa, 0x6d, 0x7a, 0x1f, 0x5d, 0x2f, 0x13, 0xc0, + 0x77, 0xd0, 0x86, 0x38, 0xeb, 0xad, 0xa5, 0x1b, 0x51, 0xae, 0xc2, 0xb2, 0xa9, 0x25, 0xa2, 0xc3, + 0x90, 0x3d, 0xe7, 0x70, 0x35, 0x72, 0x81, 0x96, 0x30, 0x82, 0x50, 0x71, 0x61, 0xfe, 0x79, 0x4b, + 0xf4, 0x91, 0xb9, 0x27, 0x25, 0x22, 0xf8, 0xe0, 0xe4, 0xd4, 0xa9, 0xbd, 0x3e, 0x75, 0x6a, 0x7f, + 0x9c, 0x3a, 0xb5, 0x1f, 0x73, 0xc7, 0x3a, 0xc9, 0x1d, 0xeb, 0x75, 0xee, 0x58, 0x7f, 0xe6, 0x8e, + 0xf5, 0xf3, 0x5f, 0x4e, 0xed, 0xeb, 0xfa, 0xb8, 0xfb, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x81, + 0xf7, 0x9a, 0x52, 0xd5, 0x09, 0x00, 0x00, } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/autoscaling/v1/generated.proto b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/autoscaling/v1/generated.proto index e84fdd96..4d4fa8e6 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/autoscaling/v1/generated.proto +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/autoscaling/v1/generated.proto @@ -48,7 +48,7 @@ message CrossVersionObjectReference { message HorizontalPodAutoscaler { // Standard object metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // behaviour of autoscaler. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. // +optional @@ -115,7 +115,7 @@ message HorizontalPodAutoscalerStatus { message Scale { // Standard object metadata; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata. // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // defines the behavior of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. // +optional diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/autoscaling/v1/register.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/autoscaling/v1/register.go index c1ef0f85..2dbc4733 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/autoscaling/v1/register.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/autoscaling/v1/register.go @@ -45,7 +45,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { &HorizontalPodAutoscaler{}, &HorizontalPodAutoscalerList{}, &Scale{}, - &v1.ListOptions{}, &v1.DeleteOptions{}, &metav1.ExportOptions{}, &metav1.GetOptions{}, diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/autoscaling/v1/types.generated.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/autoscaling/v1/types.generated.go index 41120a26..41e91bad 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/autoscaling/v1/types.generated.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/autoscaling/v1/types.generated.go @@ -26,8 +26,7 @@ import ( "fmt" codec1978 "github.com/ugorji/go/codec" pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - pkg3_types "k8s.io/apimachinery/pkg/types" - pkg2_v1 "k8s.io/client-go/pkg/api/v1" + pkg2_types "k8s.io/apimachinery/pkg/types" "reflect" "runtime" time "time" @@ -64,10 +63,9 @@ func init() { } if false { // reference the types, but skip this branch at build/run time var v0 pkg1_v1.Time - var v1 pkg3_types.UID - var v2 pkg2_v1.ObjectMeta - var v3 time.Time - _, _, _, _ = v0, v1, v2, v3 + var v1 pkg2_types.UID + var v2 time.Time + _, _, _ = v0, v1, v2 } } @@ -1291,7 +1289,13 @@ func (x *HorizontalPodAutoscaler) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -1301,7 +1305,13 @@ func (x *HorizontalPodAutoscaler) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -1425,24 +1435,30 @@ func (x *HorizontalPodAutoscaler) codecDecodeSelfFromMap(l int, d *codec1978.Dec } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = HorizontalPodAutoscalerSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = HorizontalPodAutoscalerStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -1455,16 +1471,16 @@ func (x *HorizontalPodAutoscaler) codecDecodeSelfFromArray(l int, d *codec1978.D var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1472,21 +1488,21 @@ func (x *HorizontalPodAutoscaler) codecDecodeSelfFromArray(l int, d *codec1978.D if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1494,38 +1510,44 @@ func (x *HorizontalPodAutoscaler) codecDecodeSelfFromArray(l int, d *codec1978.D if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1533,16 +1555,16 @@ func (x *HorizontalPodAutoscaler) codecDecodeSelfFromArray(l int, d *codec1978.D if r.TryDecodeAsNil() { x.Spec = HorizontalPodAutoscalerSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1550,21 +1572,21 @@ func (x *HorizontalPodAutoscaler) codecDecodeSelfFromArray(l int, d *codec1978.D if r.TryDecodeAsNil() { x.Status = HorizontalPodAutoscalerStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -2026,7 +2048,13 @@ func (x *Scale) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -2036,7 +2064,13 @@ func (x *Scale) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -2160,24 +2194,30 @@ func (x *Scale) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = ScaleSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = ScaleStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -2190,16 +2230,16 @@ func (x *Scale) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2207,21 +2247,21 @@ func (x *Scale) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2229,38 +2269,44 @@ func (x *Scale) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2268,16 +2314,16 @@ func (x *Scale) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = ScaleSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2285,21 +2331,21 @@ func (x *Scale) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = ScaleStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/autoscaling/v1/types.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/autoscaling/v1/types.go index 6ad8a5f3..2e867c9c 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/autoscaling/v1/types.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/autoscaling/v1/types.go @@ -16,10 +16,7 @@ limitations under the License. package v1 -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/client-go/pkg/api/v1" -) +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" // CrossVersionObjectReference contains enough information to let you identify the referred resource. type CrossVersionObjectReference struct { @@ -78,7 +75,7 @@ type HorizontalPodAutoscaler struct { metav1.TypeMeta `json:",inline"` // Standard object metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // behaviour of autoscaler. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. // +optional @@ -105,7 +102,7 @@ type Scale struct { metav1.TypeMeta `json:",inline"` // Standard object metadata; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata. // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // defines the behavior of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. // +optional diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/autoscaling/v1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/autoscaling/v1/zz_generated.conversion.go index 749d68be..8ebe1ff2 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/autoscaling/v1/zz_generated.conversion.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/autoscaling/v1/zz_generated.conversion.go @@ -78,10 +78,7 @@ func Convert_autoscaling_CrossVersionObjectReference_To_v1_CrossVersionObjectRef } func autoConvert_v1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler(in *HorizontalPodAutoscaler, out *autoscaling.HorizontalPodAutoscaler, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -96,10 +93,7 @@ func Convert_v1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler(i } func autoConvert_autoscaling_HorizontalPodAutoscaler_To_v1_HorizontalPodAutoscaler(in *autoscaling.HorizontalPodAutoscaler, out *HorizontalPodAutoscaler, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_autoscaling_HorizontalPodAutoscalerSpec_To_v1_HorizontalPodAutoscalerSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -188,10 +182,7 @@ func Convert_autoscaling_HorizontalPodAutoscalerStatus_To_v1_HorizontalPodAutosc } func autoConvert_v1_Scale_To_autoscaling_Scale(in *Scale, out *autoscaling.Scale, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_ScaleSpec_To_autoscaling_ScaleSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -206,10 +197,7 @@ func Convert_v1_Scale_To_autoscaling_Scale(in *Scale, out *autoscaling.Scale, s } func autoConvert_autoscaling_Scale_To_v1_Scale(in *autoscaling.Scale, out *Scale, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_autoscaling_ScaleSpec_To_v1_ScaleSpec(&in.Spec, &out.Spec, s); err != nil { return err } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/autoscaling/v1/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/autoscaling/v1/zz_generated.deepcopy.go index 68338488..f5c104d8 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/autoscaling/v1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/autoscaling/v1/zz_generated.deepcopy.go @@ -24,7 +24,6 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - api_v1 "k8s.io/client-go/pkg/api/v1" reflect "reflect" ) @@ -61,8 +60,10 @@ func DeepCopy_v1_HorizontalPodAutoscaler(in interface{}, out interface{}, c *con in := in.(*HorizontalPodAutoscaler) out := out.(*HorizontalPodAutoscaler) *out = *in - if err := api_v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if err := DeepCopy_v1_HorizontalPodAutoscalerSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -140,8 +141,10 @@ func DeepCopy_v1_Scale(in interface{}, out interface{}, c *conversion.Cloner) er in := in.(*Scale) out := out.(*Scale) *out = *in - if err := api_v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } return nil } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/autoscaling/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/autoscaling/zz_generated.deepcopy.go index 647db5ae..2a62cfb5 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/autoscaling/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/autoscaling/zz_generated.deepcopy.go @@ -24,7 +24,6 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - api "k8s.io/client-go/pkg/api" reflect "reflect" ) @@ -61,8 +60,10 @@ func DeepCopy_autoscaling_HorizontalPodAutoscaler(in interface{}, out interface{ in := in.(*HorizontalPodAutoscaler) out := out.(*HorizontalPodAutoscaler) *out = *in - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_autoscaling_HorizontalPodAutoscalerSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -140,8 +141,10 @@ func DeepCopy_autoscaling_Scale(in interface{}, out interface{}, c *conversion.C in := in.(*Scale) out := out.(*Scale) *out = *in - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } return nil } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/install/install.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/install/install.go index 6d511f6d..d37f3182 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/install/install.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/install/install.go @@ -19,13 +19,21 @@ limitations under the License. package install import ( - "k8s.io/client-go/pkg/apimachinery/announced" + "k8s.io/apimachinery/pkg/apimachinery/announced" + "k8s.io/apimachinery/pkg/apimachinery/registered" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/client-go/pkg/api" "k8s.io/client-go/pkg/apis/batch" "k8s.io/client-go/pkg/apis/batch/v1" "k8s.io/client-go/pkg/apis/batch/v2alpha1" ) func init() { + Install(api.GroupFactoryRegistry, api.Registry, api.Scheme) +} + +// Install registers the API group and adds types to a scheme +func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) { if err := announced.NewGroupMetaFactory( &announced.GroupMetaFactoryArgs{ GroupName: batch.GroupName, @@ -37,7 +45,7 @@ func init() { v1.SchemeGroupVersion.Version: v1.AddToScheme, v2alpha1.SchemeGroupVersion.Version: v2alpha1.AddToScheme, }, - ).Announce().RegisterAndEnable(); err != nil { + ).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil { panic(err) } } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/register.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/register.go index ba2190a5..a5055826 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/register.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/register.go @@ -51,7 +51,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { &JobTemplate{}, &CronJob{}, &CronJobList{}, - &api.ListOptions{}, &api.DeleteOptions{}, ) scheme.AddKnownTypeWithName(SchemeGroupVersion.WithKind("ScheduledJob"), &CronJob{}) diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/types.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/types.go index 8887b916..b39f2e46 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/types.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/types.go @@ -29,7 +29,7 @@ type Job struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - api.ObjectMeta + metav1.ObjectMeta // Spec is a structure defining the expected behavior of a job. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -60,7 +60,7 @@ type JobTemplate struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - api.ObjectMeta + metav1.ObjectMeta // Template defines jobs that will be created from this template // http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -73,7 +73,7 @@ type JobTemplateSpec struct { // Standard object's metadata of the jobs created from this template. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - api.ObjectMeta + metav1.ObjectMeta // Specification of the desired behavior of the job. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -196,7 +196,7 @@ type CronJob struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - api.ObjectMeta + metav1.ObjectMeta // Spec is a structure defining the expected behavior of a job, including the schedule. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/v1/generated.pb.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/v1/generated.pb.go index 2f29405c..91138c0c 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/v1/generated.pb.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/v1/generated.pb.go @@ -468,7 +468,7 @@ func (this *Job) String() string { return "nil" } s := strings.Join([]string{`&Job{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "JobSpec", "JobSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "JobStatus", "JobStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -1520,60 +1520,61 @@ var ( ) var fileDescriptorGenerated = []byte{ - // 879 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x9c, 0x54, 0xcd, 0x6f, 0xe3, 0x44, - 0x14, 0xcf, 0x47, 0xd3, 0x4d, 0xa6, 0x1f, 0xbb, 0x8c, 0x54, 0x29, 0xf4, 0x90, 0xac, 0x02, 0x42, - 0x0b, 0xda, 0xb5, 0x95, 0xee, 0x0a, 0x21, 0x0e, 0x48, 0xb8, 0x08, 0x89, 0xaa, 0x65, 0xab, 0x49, - 0x05, 0x88, 0x8f, 0xc3, 0xd8, 0x7e, 0x4d, 0x87, 0xda, 0x1e, 0xcb, 0x33, 0x8e, 0xd4, 0x1b, 0x37, - 0xae, 0xfc, 0x31, 0x08, 0xf1, 0x27, 0xf4, 0xd8, 0x23, 0xa7, 0x88, 0x9a, 0xff, 0x62, 0x4f, 0x68, - 0xc6, 0xe3, 0x8f, 0x34, 0x69, 0xc9, 0x72, 0xb3, 0xdf, 0xbc, 0xdf, 0xef, 0x7d, 0xfd, 0xde, 0x43, - 0x2f, 0x2f, 0x3f, 0x11, 0x16, 0xe3, 0xf6, 0x65, 0xea, 0x42, 0x12, 0x81, 0x04, 0x61, 0xc7, 0x97, - 0x53, 0x9b, 0xc6, 0x4c, 0xd8, 0x2e, 0x95, 0xde, 0x85, 0x3d, 0x1b, 0xdb, 0x53, 0x88, 0x20, 0xa1, - 0x12, 0x7c, 0x2b, 0x4e, 0xb8, 0xe4, 0xf8, 0xbd, 0x1c, 0x64, 0x55, 0x20, 0x2b, 0xbe, 0x9c, 0x5a, - 0x0a, 0x64, 0x69, 0x90, 0x35, 0x1b, 0xef, 0xbf, 0x98, 0x32, 0x79, 0x91, 0xba, 0x96, 0xc7, 0x43, - 0x7b, 0xca, 0xa7, 0xdc, 0xd6, 0x58, 0x37, 0x3d, 0xd7, 0x7f, 0xfa, 0x47, 0x7f, 0xe5, 0x9c, 0xfb, - 0xaf, 0x4c, 0x22, 0x34, 0x66, 0x21, 0xf5, 0x2e, 0x58, 0x04, 0xc9, 0x55, 0x95, 0x4a, 0x08, 0x92, - 0xae, 0xc8, 0x64, 0xdf, 0xbe, 0x0f, 0x95, 0xa4, 0x91, 0x64, 0x21, 0x2c, 0x01, 0x3e, 0xfe, 0x2f, - 0x80, 0xf0, 0x2e, 0x20, 0xa4, 0x4b, 0xb8, 0x83, 0x7b, 0xfb, 0x64, 0x27, 0x20, 0x78, 0x9a, 0x78, - 0xcb, 0xb1, 0x9e, 0xdf, 0x8f, 0x59, 0x51, 0xca, 0x78, 0xb5, 0x77, 0x2a, 0x59, 0x60, 0xb3, 0x48, - 0x0a, 0x99, 0xdc, 0x85, 0x8c, 0x7e, 0x6d, 0xa1, 0xf6, 0x11, 0x77, 0xf1, 0x77, 0xa8, 0xab, 0x1a, - 0xe4, 0x53, 0x49, 0xfb, 0xcd, 0xa7, 0xcd, 0x67, 0x5b, 0x07, 0xcf, 0xac, 0x7b, 0x47, 0x64, 0xcd, - 0xc6, 0xd6, 0x6b, 0xf7, 0x67, 0xf0, 0xe4, 0x09, 0x48, 0xea, 0xe0, 0xeb, 0xf9, 0xb0, 0x91, 0xcd, - 0x87, 0xa8, 0xb2, 0x91, 0x92, 0x0d, 0x7f, 0x8d, 0x36, 0x44, 0x0c, 0x5e, 0xbf, 0xa5, 0x59, 0x9f, - 0x5b, 0x6b, 0x0c, 0xde, 0x3a, 0xe2, 0xee, 0x24, 0x06, 0xcf, 0xd9, 0x36, 0xcc, 0x1b, 0xea, 0x8f, - 0x68, 0x1e, 0xfc, 0x0d, 0xda, 0x14, 0x92, 0xca, 0x54, 0xf4, 0xdb, 0x9a, 0xd1, 0x5a, 0x9b, 0x51, - 0xa3, 0x9c, 0x5d, 0xc3, 0xb9, 0x99, 0xff, 0x13, 0xc3, 0x36, 0xba, 0x69, 0xa3, 0xed, 0x23, 0xee, - 0x1e, 0xf2, 0xc8, 0x67, 0x92, 0xf1, 0x08, 0xbf, 0x42, 0x1b, 0xf2, 0x2a, 0x06, 0xdd, 0x8e, 0x9e, - 0xf3, 0xb4, 0x48, 0xe5, 0xec, 0x2a, 0x86, 0x37, 0xf3, 0xe1, 0x93, 0xba, 0xaf, 0xb2, 0x11, 0xed, - 0x5d, 0x4b, 0xaf, 0xa5, 0x71, 0x9f, 0x2d, 0x86, 0x7b, 0x33, 0x1f, 0x3e, 0x38, 0x53, 0xab, 0xe4, - 0x5c, 0x4c, 0x0f, 0x4f, 0xd1, 0x4e, 0x40, 0x85, 0x3c, 0x4d, 0xb8, 0x0b, 0x67, 0x2c, 0x04, 0x53, - 0xfd, 0x47, 0x45, 0xf5, 0x75, 0x35, 0x56, 0xf5, 0xab, 0x29, 0xa8, 0xf2, 0x15, 0xc2, 0xd9, 0x33, - 0xa9, 0xec, 0x1c, 0xd7, 0x89, 0xc8, 0x22, 0x2f, 0x9e, 0x21, 0xac, 0x0c, 0x67, 0x09, 0x8d, 0x44, - 0x5e, 0x9c, 0x8a, 0xb6, 0xf1, 0xd6, 0xd1, 0xf6, 0x4d, 0x34, 0x7c, 0xbc, 0xc4, 0x46, 0x56, 0x44, - 0xc0, 0x1f, 0xa0, 0xcd, 0x04, 0xa8, 0xe0, 0x51, 0xbf, 0xa3, 0x1b, 0x57, 0xce, 0x89, 0x68, 0x2b, - 0x31, 0xaf, 0xf8, 0x43, 0xf4, 0x28, 0x04, 0x21, 0xe8, 0x14, 0xfa, 0x9b, 0xda, 0xf1, 0xb1, 0x71, - 0x7c, 0x74, 0x92, 0x9b, 0x49, 0xf1, 0x3e, 0xfa, 0xa3, 0x89, 0x1e, 0x1d, 0x71, 0xf7, 0x98, 0x09, - 0x89, 0x7f, 0x5c, 0x12, 0xb8, 0xb5, 0x5e, 0x31, 0x0a, 0xad, 0x65, 0xfe, 0xc4, 0xc4, 0xe9, 0x16, - 0x96, 0x9a, 0xc8, 0x4f, 0x50, 0x87, 0x49, 0x08, 0xd5, 0xd0, 0xdb, 0x0f, 0xef, 0xce, 0xa2, 0x26, - 0x9d, 0x1d, 0x43, 0xda, 0xf9, 0x4a, 0xc1, 0x49, 0xce, 0x32, 0xfa, 0xb3, 0xad, 0x13, 0x57, 0xaa, - 0xc7, 0x63, 0xb4, 0x15, 0xd3, 0x84, 0x06, 0x01, 0x04, 0x4c, 0x84, 0x3a, 0xf7, 0x8e, 0xf3, 0x38, - 0x9b, 0x0f, 0xb7, 0x4e, 0x2b, 0x33, 0xa9, 0xfb, 0x28, 0x88, 0xc7, 0xc3, 0x38, 0x00, 0xd5, 0xdc, - 0x5c, 0x88, 0x06, 0x72, 0x58, 0x99, 0x49, 0xdd, 0x07, 0xbf, 0x46, 0x7b, 0xd4, 0x93, 0x6c, 0x06, - 0x5f, 0x00, 0xf5, 0x03, 0x16, 0xc1, 0x04, 0x3c, 0x1e, 0xf9, 0xf9, 0x92, 0xb5, 0x9d, 0x77, 0xb3, - 0xf9, 0x70, 0xef, 0xf3, 0x55, 0x0e, 0x64, 0x35, 0x0e, 0xff, 0x84, 0xba, 0x02, 0x02, 0xf0, 0x24, - 0x4f, 0x8c, 0x78, 0x5e, 0xae, 0xd9, 0x6f, 0xea, 0x42, 0x30, 0x31, 0x50, 0x67, 0x5b, 0x35, 0xbc, - 0xf8, 0x23, 0x25, 0x25, 0xfe, 0x14, 0xed, 0x86, 0x34, 0x4a, 0x69, 0xe9, 0xa9, 0x55, 0xd3, 0x75, - 0x70, 0x36, 0x1f, 0xee, 0x9e, 0x2c, 0xbc, 0x90, 0x3b, 0x9e, 0xf8, 0x07, 0xd4, 0x95, 0x10, 0xc6, - 0x01, 0x95, 0xb9, 0x84, 0xb6, 0x0e, 0x5e, 0x3c, 0x7c, 0xeb, 0x4e, 0xb9, 0x7f, 0x66, 0x00, 0xfa, - 0x2c, 0x95, 0x4a, 0x28, 0xac, 0xa4, 0x24, 0x1c, 0xfd, 0xde, 0x46, 0xbd, 0xf2, 0xd8, 0x60, 0x40, - 0xc8, 0x2b, 0x16, 0x5a, 0xf4, 0x9b, 0x5a, 0x1c, 0xe3, 0x75, 0xc5, 0x51, 0x9e, 0x82, 0xea, 0xc2, - 0x96, 0x26, 0x41, 0x6a, 0xc4, 0xf8, 0x5b, 0xd4, 0x13, 0x92, 0x26, 0x52, 0xaf, 0x6a, 0xeb, 0xad, - 0x57, 0x75, 0x27, 0x9b, 0x0f, 0x7b, 0x93, 0x82, 0x80, 0x54, 0x5c, 0xf8, 0x1c, 0xed, 0x56, 0x2a, - 0xf9, 0x9f, 0x67, 0x47, 0x8f, 0xe4, 0x70, 0x81, 0x85, 0xdc, 0x61, 0x55, 0xcb, 0x9f, 0xcb, 0x48, - 0x6b, 0xa5, 0x53, 0x2d, 0x7f, 0xae, 0x39, 0x62, 0x5e, 0xb1, 0x8d, 0x7a, 0x22, 0xf5, 0x3c, 0x00, - 0x1f, 0x7c, 0x3d, 0xf1, 0x8e, 0xf3, 0x8e, 0x71, 0xed, 0x4d, 0x8a, 0x07, 0x52, 0xf9, 0x28, 0xe2, - 0x73, 0xca, 0x02, 0xf0, 0xf5, 0xa4, 0x6b, 0xc4, 0x5f, 0x6a, 0x2b, 0x31, 0xaf, 0xce, 0xfb, 0xd7, - 0xb7, 0x83, 0xc6, 0xcd, 0xed, 0xa0, 0xf1, 0xd7, 0xed, 0xa0, 0xf1, 0x4b, 0x36, 0x68, 0x5e, 0x67, - 0x83, 0xe6, 0x4d, 0x36, 0x68, 0xfe, 0x9d, 0x0d, 0x9a, 0xbf, 0xfd, 0x33, 0x68, 0x7c, 0xdf, 0x9a, - 0x8d, 0xff, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xa1, 0x15, 0xe7, 0x70, 0xeb, 0x08, 0x00, 0x00, + // 881 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x9c, 0x54, 0xdd, 0x6e, 0xe3, 0x44, + 0x14, 0xce, 0x4f, 0xd3, 0x26, 0x93, 0xb6, 0xbb, 0x8c, 0x54, 0x29, 0xf4, 0x22, 0x59, 0x05, 0x84, + 0x0a, 0xda, 0xb5, 0x49, 0x77, 0x85, 0x10, 0x17, 0x48, 0xb8, 0x08, 0x89, 0xaa, 0x65, 0xab, 0x49, + 0x05, 0x12, 0x3f, 0x12, 0x63, 0xfb, 0x34, 0x1d, 0x6a, 0x7b, 0x2c, 0xcf, 0x38, 0x52, 0xef, 0x78, + 0x03, 0x78, 0x18, 0x84, 0x78, 0x84, 0x5e, 0xf6, 0x92, 0xab, 0x88, 0x9a, 0xb7, 0xd8, 0x2b, 0x34, + 0xe3, 0x89, 0xed, 0x34, 0x29, 0xa4, 0xdc, 0xd9, 0x67, 0xbe, 0xef, 0x3b, 0x67, 0xce, 0xf9, 0xce, + 0xa0, 0x97, 0x57, 0x1f, 0x0b, 0x8b, 0x71, 0xfb, 0x2a, 0x75, 0x21, 0x89, 0x40, 0x82, 0xb0, 0xe3, + 0xab, 0x89, 0x4d, 0x63, 0x26, 0x6c, 0x97, 0x4a, 0xef, 0xd2, 0x9e, 0x8e, 0xec, 0x09, 0x44, 0x90, + 0x50, 0x09, 0xbe, 0x15, 0x27, 0x5c, 0x72, 0xfc, 0x4e, 0x4e, 0xb2, 0x4a, 0x92, 0x15, 0x5f, 0x4d, + 0x2c, 0x45, 0xb2, 0x34, 0xc9, 0x9a, 0x8e, 0xf6, 0x5f, 0x4c, 0x98, 0xbc, 0x4c, 0x5d, 0xcb, 0xe3, + 0xa1, 0x3d, 0xe1, 0x13, 0x6e, 0x6b, 0xae, 0x9b, 0x5e, 0xe8, 0x3f, 0xfd, 0xa3, 0xbf, 0x72, 0xcd, + 0xfd, 0x57, 0xa6, 0x10, 0x1a, 0xb3, 0x90, 0x7a, 0x97, 0x2c, 0x82, 0xe4, 0xba, 0x2c, 0x25, 0x04, + 0x49, 0x57, 0x54, 0xb2, 0x6f, 0x3f, 0xc4, 0x4a, 0xd2, 0x48, 0xb2, 0x10, 0x96, 0x08, 0x1f, 0xfd, + 0x17, 0x41, 0x78, 0x97, 0x10, 0xd2, 0x25, 0xde, 0xe1, 0x83, 0x7d, 0xb2, 0x13, 0x10, 0x3c, 0x4d, + 0xbc, 0xe5, 0x5c, 0xcf, 0x1f, 0xe6, 0xac, 0xb8, 0xca, 0x68, 0x35, 0x3a, 0x95, 0x2c, 0xb0, 0x59, + 0x24, 0x85, 0x4c, 0xee, 0x53, 0x86, 0xbf, 0x34, 0x50, 0xf3, 0x98, 0xbb, 0xf8, 0x47, 0xd4, 0x56, + 0x0d, 0xf2, 0xa9, 0xa4, 0xbd, 0xfa, 0xb3, 0xfa, 0x41, 0xf7, 0xf0, 0x43, 0xcb, 0x8c, 0xa8, 0x7a, + 0xcf, 0x72, 0x48, 0x0a, 0x6d, 0x4d, 0x47, 0xd6, 0x6b, 0xf7, 0x27, 0xf0, 0xe4, 0x29, 0x48, 0xea, + 0xe0, 0x9b, 0xd9, 0xa0, 0x96, 0xcd, 0x06, 0xa8, 0x8c, 0x91, 0x42, 0x15, 0x7f, 0x85, 0x36, 0x44, + 0x0c, 0x5e, 0xaf, 0xa1, 0xd5, 0x9f, 0x5b, 0x6b, 0x18, 0xc0, 0x3a, 0xe6, 0xee, 0x38, 0x06, 0xcf, + 0xd9, 0x36, 0xca, 0x1b, 0xea, 0x8f, 0x68, 0x1d, 0xfc, 0x35, 0xda, 0x14, 0x92, 0xca, 0x54, 0xf4, + 0x9a, 0x5a, 0xd1, 0x5a, 0x5b, 0x51, 0xb3, 0x9c, 0x5d, 0xa3, 0xb9, 0x99, 0xff, 0x13, 0xa3, 0x36, + 0xbc, 0x6d, 0xa2, 0xed, 0x63, 0xee, 0x1e, 0xf1, 0xc8, 0x67, 0x92, 0xf1, 0x08, 0xbf, 0x42, 0x1b, + 0xf2, 0x3a, 0x06, 0xdd, 0x96, 0x8e, 0xf3, 0x6c, 0x5e, 0xca, 0xf9, 0x75, 0x0c, 0x6f, 0x66, 0x83, + 0xa7, 0x55, 0xac, 0x8a, 0x11, 0x8d, 0xae, 0x94, 0xd7, 0xd0, 0xbc, 0x4f, 0x17, 0xd3, 0xbd, 0x99, + 0x0d, 0xfe, 0x75, 0xb6, 0x56, 0xa1, 0xb9, 0x58, 0x1e, 0x9e, 0xa0, 0x9d, 0x80, 0x0a, 0x79, 0x96, + 0x70, 0x17, 0xce, 0x59, 0x08, 0xe6, 0xf6, 0x1f, 0xac, 0x37, 0x2d, 0xc5, 0x70, 0xf6, 0x4c, 0x29, + 0x3b, 0x27, 0x55, 0x21, 0xb2, 0xa8, 0x8b, 0xa7, 0x08, 0xab, 0xc0, 0x79, 0x42, 0x23, 0x91, 0x5f, + 0x4e, 0x65, 0xdb, 0x78, 0x74, 0xb6, 0x7d, 0x93, 0x0d, 0x9f, 0x2c, 0xa9, 0x91, 0x15, 0x19, 0xf0, + 0x7b, 0x68, 0x33, 0x01, 0x2a, 0x78, 0xd4, 0x6b, 0xe9, 0xc6, 0x15, 0x73, 0x22, 0x3a, 0x4a, 0xcc, + 0x29, 0x7e, 0x1f, 0x6d, 0x85, 0x20, 0x04, 0x9d, 0x40, 0x6f, 0x53, 0x03, 0x9f, 0x18, 0xe0, 0xd6, + 0x69, 0x1e, 0x26, 0xf3, 0xf3, 0xe1, 0xef, 0x75, 0xb4, 0x75, 0xcc, 0xdd, 0x13, 0x26, 0x24, 0xfe, + 0x7e, 0xc9, 0xe8, 0xd6, 0x7a, 0x97, 0x51, 0x6c, 0x6d, 0xf3, 0xa7, 0x26, 0x4f, 0x7b, 0x1e, 0xa9, + 0x98, 0xfc, 0x14, 0xb5, 0x98, 0x84, 0x50, 0x0d, 0xbd, 0x79, 0xd0, 0x3d, 0x3c, 0x58, 0xd7, 0x93, + 0xce, 0x8e, 0x11, 0x6d, 0x7d, 0xa9, 0xe8, 0x24, 0x57, 0x19, 0xfe, 0xd1, 0xd4, 0x85, 0x2b, 0xd7, + 0xe3, 0x11, 0xea, 0xc6, 0x34, 0xa1, 0x41, 0x00, 0x01, 0x13, 0xa1, 0xae, 0xbd, 0xe5, 0x3c, 0xc9, + 0x66, 0x83, 0xee, 0x59, 0x19, 0x26, 0x55, 0x8c, 0xa2, 0x78, 0x3c, 0x8c, 0x03, 0x50, 0xcd, 0xcd, + 0x8d, 0x68, 0x28, 0x47, 0x65, 0x98, 0x54, 0x31, 0xf8, 0x35, 0xda, 0xa3, 0x9e, 0x64, 0x53, 0xf8, + 0x1c, 0xa8, 0x1f, 0xb0, 0x08, 0xc6, 0xe0, 0xf1, 0xc8, 0xcf, 0x97, 0xac, 0xe9, 0xbc, 0x9d, 0xcd, + 0x06, 0x7b, 0x9f, 0xad, 0x02, 0x90, 0xd5, 0x3c, 0xfc, 0x03, 0x6a, 0x0b, 0x08, 0xc0, 0x93, 0x3c, + 0x31, 0xe6, 0x79, 0xb9, 0x66, 0xbf, 0xa9, 0x0b, 0xc1, 0xd8, 0x50, 0x9d, 0x6d, 0xd5, 0xf0, 0xf9, + 0x1f, 0x29, 0x24, 0xf1, 0x27, 0x68, 0x37, 0xa4, 0x51, 0x4a, 0x0b, 0xa4, 0x76, 0x4d, 0xdb, 0xc1, + 0xd9, 0x6c, 0xb0, 0x7b, 0xba, 0x70, 0x42, 0xee, 0x21, 0xf1, 0x77, 0xa8, 0x2d, 0x21, 0x8c, 0x03, + 0x2a, 0x73, 0x0b, 0x75, 0x0f, 0x5f, 0x3c, 0x3c, 0x2f, 0x55, 0xd2, 0x19, 0xf7, 0xcf, 0x0d, 0x41, + 0x3f, 0x4b, 0x85, 0x13, 0xe6, 0x51, 0x52, 0x08, 0x0e, 0x7f, 0x6b, 0xa2, 0x4e, 0xf1, 0xd8, 0x60, + 0x40, 0xc8, 0x9b, 0x2f, 0xb4, 0xe8, 0xd5, 0xb5, 0x39, 0x46, 0xeb, 0x9a, 0xa3, 0x78, 0x0a, 0xca, + 0x17, 0xb6, 0x08, 0x09, 0x52, 0x11, 0xc6, 0xdf, 0xa0, 0x8e, 0x90, 0x34, 0x91, 0x7a, 0x55, 0x1b, + 0x8f, 0x5e, 0xd5, 0x9d, 0x6c, 0x36, 0xe8, 0x8c, 0xe7, 0x02, 0xa4, 0xd4, 0xc2, 0x17, 0x68, 0xb7, + 0x74, 0xc9, 0xff, 0x7c, 0x76, 0xf4, 0x48, 0x8e, 0x16, 0x54, 0xc8, 0x3d, 0x55, 0xb5, 0xfc, 0xb9, + 0x8d, 0xb4, 0x57, 0x5a, 0xe5, 0xf2, 0xe7, 0x9e, 0x23, 0xe6, 0x14, 0xdb, 0xa8, 0x23, 0x52, 0xcf, + 0x03, 0xf0, 0xc1, 0xd7, 0x13, 0x6f, 0x39, 0x6f, 0x19, 0x68, 0x67, 0x3c, 0x3f, 0x20, 0x25, 0x46, + 0x09, 0x5f, 0x50, 0x16, 0x80, 0xaf, 0x27, 0x5d, 0x11, 0xfe, 0x42, 0x47, 0x89, 0x39, 0x75, 0xde, + 0xbd, 0xb9, 0xeb, 0xd7, 0x6e, 0xef, 0xfa, 0xb5, 0x3f, 0xef, 0xfa, 0xb5, 0x9f, 0xb3, 0x7e, 0xfd, + 0x26, 0xeb, 0xd7, 0x6f, 0xb3, 0x7e, 0xfd, 0xaf, 0xac, 0x5f, 0xff, 0xf5, 0xef, 0x7e, 0xed, 0xdb, + 0xc6, 0x74, 0xf4, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x9a, 0xe5, 0xae, 0xf3, 0x08, 0x00, + 0x00, } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/v1/generated.proto b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/v1/generated.proto index f159250b..2d84a500 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/v1/generated.proto +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/v1/generated.proto @@ -36,7 +36,7 @@ message Job { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec is a structure defining the expected behavior of a job. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/v1/register.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/v1/register.go index 61d924ee..6463b62f 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/v1/register.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/v1/register.go @@ -44,7 +44,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &Job{}, &JobList{}, - &v1.ListOptions{}, &v1.DeleteOptions{}, &metav1.ExportOptions{}, &metav1.GetOptions{}, diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/v1/types.generated.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/v1/types.generated.go index 48a702cf..be841598 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/v1/types.generated.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/v1/types.generated.go @@ -26,9 +26,9 @@ import ( "fmt" codec1978 "github.com/ugorji/go/codec" pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - pkg3_types "k8s.io/apimachinery/pkg/types" + pkg2_types "k8s.io/apimachinery/pkg/types" pkg4_resource "k8s.io/client-go/pkg/api/resource" - pkg2_v1 "k8s.io/client-go/pkg/api/v1" + pkg3_v1 "k8s.io/client-go/pkg/api/v1" pkg5_intstr "k8s.io/client-go/pkg/util/intstr" "reflect" "runtime" @@ -66,9 +66,9 @@ func init() { } if false { // reference the types, but skip this branch at build/run time var v0 pkg1_v1.TypeMeta - var v1 pkg3_types.UID + var v1 pkg2_types.UID var v2 pkg4_resource.Quantity - var v3 pkg2_v1.ObjectMeta + var v3 pkg3_v1.PodTemplateSpec var v4 pkg5_intstr.IntOrString var v5 time.Time _, _, _, _, _, _ = v0, v1, v2, v3, v4, v5 @@ -164,7 +164,13 @@ func (x *Job) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -174,7 +180,13 @@ func (x *Job) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -298,24 +310,30 @@ func (x *Job) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = JobSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = JobStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -328,16 +346,16 @@ func (x *Job) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -345,21 +363,21 @@ func (x *Job) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -367,38 +385,44 @@ func (x *Job) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -406,16 +430,16 @@ func (x *Job) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = JobSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -423,21 +447,21 @@ func (x *Job) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = JobStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -1175,7 +1199,7 @@ func (x *JobSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "template": if r.TryDecodeAsNil() { - x.Template = pkg2_v1.PodTemplateSpec{} + x.Template = pkg3_v1.PodTemplateSpec{} } else { yyv14 := &x.Template yyv14.CodecDecodeSelf(d) @@ -1337,7 +1361,7 @@ func (x *JobSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.Template = pkg2_v1.PodTemplateSpec{} + x.Template = pkg3_v1.PodTemplateSpec{} } else { yyv26 := &x.Template yyv26.CodecDecodeSelf(d) @@ -2457,7 +2481,7 @@ func (x codecSelfer1234) decSliceJob(v *[]Job, d *codec1978.Decoder) { yyrg1 := len(yyv1) > 0 yyv21 := yyv1 - yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 832) + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 848) if yyrt1 { if yyrl1 <= cap(yyv1) { yyv1 = yyv1[:yyrl1] diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/v1/types.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/v1/types.go index 55baa786..734e6204 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/v1/types.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/v1/types.go @@ -29,7 +29,7 @@ type Job struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec is a structure defining the expected behavior of a job. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/v1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/v1/zz_generated.conversion.go index e2847325..71803707 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/v1/zz_generated.conversion.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/v1/zz_generated.conversion.go @@ -52,10 +52,7 @@ func RegisterConversions(scheme *runtime.Scheme) error { } func autoConvert_v1_Job_To_batch_Job(in *Job, out *batch.Job, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1_JobSpec_To_batch_JobSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -70,10 +67,7 @@ func Convert_v1_Job_To_batch_Job(in *Job, out *batch.Job, s conversion.Scope) er } func autoConvert_batch_Job_To_v1_Job(in *batch.Job, out *Job, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_batch_JobSpec_To_v1_JobSpec(&in.Spec, &out.Spec, s); err != nil { return err } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/v1/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/v1/zz_generated.deepcopy.go index fb2599b7..5e31d596 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/v1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/v1/zz_generated.deepcopy.go @@ -49,8 +49,10 @@ func DeepCopy_v1_Job(in interface{}, out interface{}, c *conversion.Cloner) erro in := in.(*Job) out := out.(*Job) *out = *in - if err := api_v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*meta_v1.ObjectMeta) } if err := DeepCopy_v1_JobSpec(&in.Spec, &out.Spec, c); err != nil { return err diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/v2alpha1/generated.pb.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/v2alpha1/generated.pb.go index 84acfa10..bd615006 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/v2alpha1/generated.pb.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/v2alpha1/generated.pb.go @@ -821,7 +821,7 @@ func (this *CronJob) String() string { return "nil" } s := strings.Join([]string{`&CronJob{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "CronJobSpec", "CronJobSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "CronJobStatus", "CronJobStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -869,7 +869,7 @@ func (this *Job) String() string { return "nil" } s := strings.Join([]string{`&Job{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "JobSpec", "JobSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "JobStatus", "JobStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -937,7 +937,7 @@ func (this *JobTemplate) String() string { return "nil" } s := strings.Join([]string{`&JobTemplate{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Template:` + strings.Replace(strings.Replace(this.Template.String(), "JobTemplateSpec", "JobTemplateSpec", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -948,7 +948,7 @@ func (this *JobTemplateSpec) String() string { return "nil" } s := strings.Join([]string{`&JobTemplateSpec{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "JobSpec", "JobSpec", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -2708,77 +2708,77 @@ var ( var fileDescriptorGenerated = []byte{ // 1158 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xd4, 0x56, 0x4b, 0x6f, 0x23, 0x45, - 0x10, 0xce, 0xd8, 0x89, 0x1f, 0xed, 0xcd, 0xab, 0x21, 0x5a, 0x13, 0x24, 0x3b, 0xb2, 0x04, 0xca, - 0xae, 0x76, 0x67, 0x14, 0x13, 0x2d, 0xcb, 0x1e, 0x90, 0x76, 0x82, 0x90, 0x88, 0x12, 0x6d, 0xd4, - 0xce, 0xb2, 0x2b, 0x08, 0x12, 0xed, 0x71, 0xc7, 0x9e, 0xcd, 0xcc, 0xf4, 0x30, 0xdd, 0x13, 0x29, - 0x37, 0xce, 0x9c, 0x90, 0xf8, 0x01, 0xfc, 0x0d, 0x84, 0xb8, 0x20, 0x71, 0xc8, 0x31, 0x48, 0x1c, - 0x38, 0x59, 0x64, 0xf8, 0x17, 0x39, 0xa1, 0x6e, 0xf7, 0x3c, 0xfc, 0xca, 0xc6, 0x41, 0x8b, 0xc4, - 0xcd, 0x53, 0x5d, 0xdf, 0x57, 0xd5, 0x55, 0x5f, 0x57, 0x19, 0x7c, 0x74, 0xf2, 0x98, 0xe9, 0x36, - 0x35, 0x4e, 0xc2, 0x36, 0x09, 0x3c, 0xc2, 0x09, 0x33, 0xfc, 0x93, 0xae, 0x81, 0x7d, 0x9b, 0x19, - 0x6d, 0xcc, 0xad, 0x9e, 0x71, 0xda, 0xc4, 0x8e, 0xdf, 0xc3, 0x5b, 0x46, 0x97, 0x78, 0x24, 0xc0, - 0x9c, 0x74, 0x74, 0x3f, 0xa0, 0x9c, 0xc2, 0x7b, 0x03, 0xa8, 0x9e, 0x42, 0x75, 0xff, 0xa4, 0xab, - 0x0b, 0xa8, 0x2e, 0xa1, 0x7a, 0x0c, 0x5d, 0x7f, 0xd8, 0xb5, 0x79, 0x2f, 0x6c, 0xeb, 0x16, 0x75, - 0x8d, 0x2e, 0xed, 0x52, 0x43, 0x32, 0xb4, 0xc3, 0x63, 0xf9, 0x25, 0x3f, 0xe4, 0xaf, 0x01, 0xf3, - 0xfa, 0xb6, 0x4a, 0x0a, 0xfb, 0xb6, 0x8b, 0xad, 0x9e, 0xed, 0x91, 0xe0, 0x2c, 0x4d, 0xcb, 0x25, - 0x1c, 0x1b, 0xa7, 0x63, 0xf9, 0xac, 0x1b, 0xd3, 0x50, 0x41, 0xe8, 0x71, 0xdb, 0x25, 0x63, 0x80, - 0x47, 0xaf, 0x03, 0x30, 0xab, 0x47, 0x5c, 0x3c, 0x86, 0x6b, 0x4e, 0xad, 0x99, 0x11, 0x10, 0x46, - 0xc3, 0xc0, 0x1a, 0x8f, 0xf5, 0x60, 0x3a, 0x66, 0xc2, 0x55, 0xb6, 0x26, 0x7b, 0x87, 0xdc, 0x76, - 0x0c, 0xdb, 0xe3, 0x8c, 0x07, 0xa3, 0x90, 0xc6, 0x8f, 0x39, 0x50, 0xdc, 0x09, 0xa8, 0xb7, 0x4b, - 0xdb, 0xf0, 0x25, 0x28, 0x89, 0x22, 0x75, 0x30, 0xc7, 0x55, 0x6d, 0x43, 0xdb, 0xac, 0x34, 0x37, - 0xf5, 0xa9, 0xcd, 0xd2, 0x4f, 0xb7, 0xf4, 0x67, 0xed, 0x57, 0xc4, 0xe2, 0xfb, 0x84, 0x63, 0x13, - 0x9e, 0xf7, 0xeb, 0x73, 0x51, 0xbf, 0x0e, 0x52, 0x1b, 0x4a, 0xd8, 0xe0, 0x4b, 0x30, 0xcf, 0x7c, - 0x62, 0x55, 0x73, 0x92, 0xf5, 0x91, 0x7e, 0x63, 0x09, 0xe8, 0x2a, 0xb7, 0x96, 0x4f, 0x2c, 0xf3, - 0x8e, 0x8a, 0x31, 0x2f, 0xbe, 0x90, 0x64, 0x84, 0x5f, 0x83, 0x02, 0xe3, 0x98, 0x87, 0xac, 0x9a, - 0x97, 0xdc, 0x8f, 0x6f, 0xc1, 0x2d, 0xf1, 0xe6, 0x92, 0x62, 0x2f, 0x0c, 0xbe, 0x91, 0xe2, 0x6d, - 0xfc, 0xa6, 0x81, 0x8a, 0xf2, 0xdc, 0xb3, 0x19, 0x87, 0x47, 0x63, 0x55, 0xd2, 0xe3, 0x98, 0x59, - 0x45, 0xa4, 0x51, 0x85, 0xb7, 0xa8, 0x96, 0x40, 0xcb, 0x5a, 0xad, 0xa8, 0x48, 0xa5, 0xd8, 0x92, - 0xa9, 0xd4, 0x0b, 0xb0, 0x60, 0x73, 0xe2, 0xb2, 0x6a, 0x6e, 0x23, 0xbf, 0x59, 0x69, 0x36, 0x67, - 0xbf, 0x8e, 0xb9, 0xa8, 0xe8, 0x17, 0x3e, 0x13, 0x44, 0x68, 0xc0, 0xd7, 0xf8, 0x2e, 0x9f, 0x5c, - 0x43, 0x94, 0x0f, 0x3e, 0x00, 0x25, 0xa1, 0xd3, 0x4e, 0xe8, 0x10, 0x79, 0x8d, 0x72, 0x9a, 0x56, - 0x4b, 0xd9, 0x51, 0xe2, 0x01, 0x9f, 0x83, 0xbb, 0x8c, 0xe3, 0x80, 0xdb, 0x5e, 0xf7, 0x13, 0x82, - 0x3b, 0x8e, 0xed, 0x91, 0x16, 0xb1, 0xa8, 0xd7, 0x61, 0xb2, 0xa7, 0x79, 0xf3, 0xdd, 0xa8, 0x5f, - 0xbf, 0xdb, 0x9a, 0xec, 0x82, 0xa6, 0x61, 0xe1, 0x11, 0x58, 0xb5, 0xa8, 0x67, 0x85, 0x41, 0x40, - 0x3c, 0xeb, 0xec, 0x80, 0x3a, 0xb6, 0x75, 0x26, 0x1b, 0x59, 0x36, 0x75, 0x95, 0xcd, 0xea, 0xce, - 0xa8, 0xc3, 0xd5, 0x24, 0x23, 0x1a, 0x27, 0x82, 0xef, 0x81, 0x22, 0x0b, 0x99, 0x4f, 0xbc, 0x4e, - 0x75, 0x7e, 0x43, 0xdb, 0x2c, 0x99, 0x95, 0xa8, 0x5f, 0x2f, 0xb6, 0x06, 0x26, 0x14, 0x9f, 0xc1, - 0x6f, 0x40, 0xe5, 0x15, 0x6d, 0x1f, 0x12, 0xd7, 0x77, 0x30, 0x27, 0xd5, 0x05, 0xd9, 0xd3, 0x27, - 0x33, 0x14, 0x7e, 0x37, 0x45, 0x4b, 0x9d, 0xbe, 0xa5, 0x52, 0xaf, 0x64, 0x0e, 0x50, 0x36, 0x46, - 0xe3, 0x0f, 0x0d, 0x2c, 0x0e, 0xa9, 0x0f, 0x3e, 0x07, 0x05, 0x6c, 0x71, 0xfb, 0x54, 0x34, 0x43, - 0x34, 0xfe, 0xe1, 0x4d, 0x5e, 0x1e, 0x22, 0xc7, 0x44, 0x5c, 0x98, 0xa4, 0xe2, 0x7d, 0x2a, 0x49, - 0x90, 0x22, 0x83, 0x0e, 0x58, 0x71, 0x30, 0xe3, 0x71, 0x47, 0x0f, 0x6d, 0x97, 0xc8, 0x5a, 0x54, - 0x9a, 0xf7, 0x6f, 0x26, 0x5a, 0x81, 0x30, 0xdf, 0x8e, 0xfa, 0xf5, 0x95, 0xbd, 0x11, 0x1e, 0x34, - 0xc6, 0xdc, 0xf8, 0x21, 0x07, 0xf2, 0x6f, 0x76, 0x90, 0x1c, 0x0e, 0x0d, 0x92, 0xe6, 0x6c, 0x4d, - 0x9a, 0x3a, 0x44, 0x8e, 0x46, 0x86, 0xc8, 0xf6, 0x8c, 0xbc, 0xd7, 0x0f, 0x90, 0x8b, 0x3c, 0xb8, - 0xb3, 0x4b, 0xdb, 0x3b, 0xd4, 0xeb, 0xd8, 0xdc, 0xa6, 0x1e, 0xdc, 0x06, 0xf3, 0xfc, 0xcc, 0x8f, - 0x9f, 0xdd, 0x46, 0x9c, 0xd0, 0xe1, 0x99, 0x4f, 0xae, 0xfa, 0xf5, 0x95, 0xac, 0xaf, 0xb0, 0x21, - 0xe9, 0x0d, 0x3f, 0x4f, 0x92, 0xcc, 0x49, 0xdc, 0xc7, 0xc3, 0xe1, 0xae, 0xfa, 0xf5, 0x6b, 0x97, - 0x85, 0x9e, 0x70, 0x0e, 0xa7, 0x07, 0xbb, 0x60, 0x51, 0x34, 0xf2, 0x20, 0xa0, 0xed, 0x81, 0x3e, - 0xf2, 0x33, 0xeb, 0x63, 0x4d, 0xa5, 0xb2, 0xb8, 0x97, 0x25, 0x42, 0xc3, 0xbc, 0xf0, 0x14, 0x40, - 0x61, 0x38, 0x0c, 0xb0, 0xc7, 0x06, 0x97, 0xbb, 0x9d, 0x1a, 0xd7, 0x55, 0x34, 0xb8, 0x37, 0xc6, - 0x86, 0x26, 0x44, 0x80, 0xef, 0x83, 0x42, 0x40, 0x30, 0xa3, 0x9e, 0x7c, 0xda, 0xe5, 0xb4, 0x4f, - 0x48, 0x5a, 0x91, 0x3a, 0x85, 0xf7, 0x40, 0xd1, 0x25, 0x8c, 0xe1, 0x2e, 0xa9, 0x16, 0xa4, 0xe3, - 0xb2, 0x72, 0x2c, 0xee, 0x0f, 0xcc, 0x28, 0x3e, 0x6f, 0xfc, 0xa2, 0x81, 0xe2, 0x7f, 0xb3, 0x0f, - 0x5a, 0xc3, 0xfb, 0x40, 0x9f, 0x4d, 0x99, 0x53, 0x76, 0xc1, 0x4f, 0x79, 0x99, 0xbe, 0xdc, 0x03, - 0x5b, 0xa0, 0xe2, 0xe3, 0x00, 0x3b, 0x0e, 0x71, 0x6c, 0xe6, 0xca, 0x1b, 0x2c, 0x98, 0xcb, 0x62, - 0x7a, 0x1d, 0xa4, 0x66, 0x94, 0xf5, 0x11, 0x10, 0x8b, 0xba, 0xbe, 0x43, 0x44, 0x89, 0x07, 0x72, - 0x54, 0x90, 0x9d, 0xd4, 0x8c, 0xb2, 0x3e, 0xf0, 0x19, 0x58, 0x1b, 0x4c, 0xa4, 0xd1, 0xed, 0x91, - 0x97, 0xdb, 0xe3, 0x9d, 0xa8, 0x5f, 0x5f, 0x7b, 0x3a, 0xc9, 0x01, 0x4d, 0xc6, 0xc1, 0xaf, 0x40, - 0x89, 0x11, 0x87, 0x58, 0x9c, 0x06, 0x4a, 0x42, 0x1f, 0xdc, 0xb0, 0xea, 0xb8, 0x4d, 0x9c, 0x96, - 0x82, 0x9a, 0x77, 0xe4, 0xbe, 0x53, 0x5f, 0x28, 0xa1, 0x84, 0x4f, 0xc0, 0x92, 0x8b, 0xbd, 0x10, - 0x27, 0x9e, 0x52, 0x3b, 0x25, 0x13, 0x46, 0xfd, 0xfa, 0xd2, 0xfe, 0xd0, 0x09, 0x1a, 0xf1, 0x84, - 0x5f, 0x82, 0x12, 0x8f, 0x97, 0x49, 0x41, 0xa6, 0xf6, 0x9a, 0x61, 0x7e, 0x40, 0x3b, 0x43, 0xfb, - 0x23, 0xd1, 0x43, 0xb2, 0x3c, 0x12, 0xc2, 0xc6, 0xcf, 0x79, 0x50, 0x4e, 0xb7, 0xc6, 0x09, 0x00, - 0x56, 0xfc, 0xac, 0x99, 0xda, 0x1c, 0x1f, 0xce, 0x26, 0x91, 0x64, 0x2c, 0xa4, 0x93, 0x37, 0x31, - 0x31, 0x94, 0xa1, 0x87, 0x2f, 0x40, 0x59, 0xee, 0x71, 0xf9, 0x6c, 0x73, 0x33, 0x3f, 0xdb, 0xc5, - 0xa8, 0x5f, 0x2f, 0xb7, 0x62, 0x02, 0x94, 0x72, 0xc1, 0x63, 0xb0, 0x94, 0x6a, 0xe5, 0x96, 0x23, - 0x48, 0x36, 0x66, 0x67, 0x88, 0x05, 0x8d, 0xb0, 0x8a, 0x41, 0xa0, 0x76, 0xec, 0xbc, 0x94, 0xec, - 0xb4, 0xa5, 0x69, 0x80, 0x32, 0x0b, 0x2d, 0x8b, 0x90, 0x0e, 0xe9, 0xc8, 0xbe, 0x2f, 0x98, 0xab, - 0xca, 0xb5, 0xdc, 0x8a, 0x0f, 0x50, 0xea, 0x23, 0x88, 0x8f, 0xb1, 0xed, 0x90, 0x8e, 0xec, 0x77, - 0x86, 0xf8, 0x53, 0x69, 0x45, 0xea, 0xb4, 0xf1, 0xbb, 0x06, 0xb2, 0xff, 0x09, 0xde, 0xe0, 0x9e, - 0xec, 0x65, 0x34, 0x98, 0xfb, 0xd7, 0x7f, 0x68, 0xae, 0x13, 0xe4, 0xaf, 0x1a, 0x58, 0x1e, 0xf1, - 0xff, 0xbf, 0xed, 0x7f, 0xf3, 0xfe, 0xf9, 0x65, 0x6d, 0xee, 0xe2, 0xb2, 0x36, 0xf7, 0xe7, 0x65, - 0x6d, 0xee, 0xdb, 0xa8, 0xa6, 0x9d, 0x47, 0x35, 0xed, 0x22, 0xaa, 0x69, 0x7f, 0x45, 0x35, 0xed, - 0xfb, 0xbf, 0x6b, 0x73, 0x5f, 0x94, 0x62, 0x9e, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x00, 0x9d, - 0xf9, 0x2b, 0xfa, 0x0e, 0x00, 0x00, + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xd4, 0x56, 0xcd, 0x6f, 0xe3, 0x44, + 0x14, 0xaf, 0x93, 0x36, 0x1f, 0x93, 0x7e, 0x0e, 0x54, 0x1b, 0x8a, 0x94, 0x54, 0x91, 0x40, 0xdd, + 0xd5, 0xae, 0x4d, 0x43, 0xb5, 0x2c, 0x7b, 0x40, 0x5a, 0x17, 0x21, 0x51, 0xb5, 0xda, 0x6a, 0xd2, + 0x65, 0x11, 0x14, 0x69, 0x27, 0xf6, 0x34, 0xf1, 0xd6, 0xf6, 0x18, 0xcf, 0xb8, 0x52, 0x6e, 0x9c, + 0x39, 0x71, 0xe7, 0x0f, 0xe0, 0x5f, 0x40, 0x88, 0x23, 0x87, 0x72, 0xeb, 0x81, 0x03, 0x5c, 0x22, + 0x6a, 0xfe, 0x8b, 0x9e, 0x90, 0x27, 0xe3, 0x8f, 0x7c, 0x75, 0x9b, 0x22, 0x55, 0xe2, 0xe6, 0x79, + 0xf3, 0x7e, 0xbf, 0x79, 0xf3, 0xde, 0x6f, 0xde, 0x33, 0xf8, 0xf8, 0xf4, 0x09, 0x53, 0x2d, 0xaa, + 0x9d, 0x06, 0x6d, 0xe2, 0xbb, 0x84, 0x13, 0xa6, 0x79, 0xa7, 0x1d, 0x0d, 0x7b, 0x16, 0xd3, 0xda, + 0x98, 0x1b, 0x5d, 0xed, 0xac, 0x89, 0x6d, 0xaf, 0x8b, 0xb7, 0xb5, 0x0e, 0x71, 0x89, 0x8f, 0x39, + 0x31, 0x55, 0xcf, 0xa7, 0x9c, 0xc2, 0xfb, 0x03, 0xa8, 0x9a, 0x42, 0x55, 0xef, 0xb4, 0xa3, 0x46, + 0x50, 0x55, 0x40, 0xd5, 0x18, 0xba, 0xf1, 0xa8, 0x63, 0xf1, 0x6e, 0xd0, 0x56, 0x0d, 0xea, 0x68, + 0x1d, 0xda, 0xa1, 0x9a, 0x60, 0x68, 0x07, 0x27, 0x62, 0x25, 0x16, 0xe2, 0x6b, 0xc0, 0xbc, 0xb1, + 0x23, 0x83, 0xc2, 0x9e, 0xe5, 0x60, 0xa3, 0x6b, 0xb9, 0xc4, 0xef, 0xa5, 0x61, 0x39, 0x84, 0x63, + 0xed, 0x6c, 0x2c, 0x9e, 0x0d, 0x6d, 0x1a, 0xca, 0x0f, 0x5c, 0x6e, 0x39, 0x64, 0x0c, 0xf0, 0xf8, + 0x4d, 0x00, 0x66, 0x74, 0x89, 0x83, 0xc7, 0x70, 0xcd, 0xa9, 0x39, 0xd3, 0x7c, 0xc2, 0x68, 0xe0, + 0x1b, 0xe3, 0x67, 0x3d, 0x9c, 0x8e, 0x99, 0x70, 0x95, 0xed, 0xc9, 0xde, 0x01, 0xb7, 0x6c, 0xcd, + 0x72, 0x39, 0xe3, 0xfe, 0x28, 0xa4, 0xf1, 0x53, 0x0e, 0x14, 0x77, 0x7d, 0xea, 0xee, 0xd1, 0x36, + 0x7c, 0x05, 0x4a, 0x51, 0x92, 0x4c, 0xcc, 0x71, 0x55, 0xd9, 0x54, 0xb6, 0x2a, 0xcd, 0x0f, 0x54, + 0x59, 0xac, 0xec, 0x5d, 0xd3, 0x72, 0x45, 0xde, 0xea, 0xd9, 0xb6, 0xfa, 0xbc, 0xfd, 0x9a, 0x18, + 0xfc, 0x80, 0x70, 0xac, 0xc3, 0xf3, 0x7e, 0x7d, 0x2e, 0xec, 0xd7, 0x41, 0x6a, 0x43, 0x09, 0x2b, + 0xfc, 0x12, 0xcc, 0x33, 0x8f, 0x18, 0xd5, 0x9c, 0x60, 0x7f, 0xac, 0xde, 0x58, 0x0a, 0xaa, 0x8c, + 0xb1, 0xe5, 0x11, 0x43, 0x5f, 0x94, 0x67, 0xcc, 0x47, 0x2b, 0x24, 0x18, 0xe1, 0x2b, 0x50, 0x60, + 0x1c, 0xf3, 0x80, 0x55, 0xf3, 0x82, 0xfb, 0xc9, 0x2d, 0xb8, 0x05, 0x5e, 0x5f, 0x96, 0xec, 0x85, + 0xc1, 0x1a, 0x49, 0xde, 0xc6, 0x6f, 0x0a, 0xa8, 0x48, 0xcf, 0x7d, 0x8b, 0x71, 0x78, 0x3c, 0x96, + 0x2d, 0xf5, 0x66, 0xd9, 0x8a, 0xd0, 0x22, 0x57, 0xab, 0xf2, 0xa4, 0x52, 0x6c, 0xc9, 0x64, 0xea, + 0x25, 0x58, 0xb0, 0x38, 0x71, 0x58, 0x35, 0xb7, 0x99, 0xdf, 0xaa, 0x34, 0x9b, 0xb3, 0x5f, 0x47, + 0x5f, 0x92, 0xf4, 0x0b, 0x9f, 0x47, 0x44, 0x68, 0xc0, 0xd7, 0xf8, 0x3e, 0x9f, 0x5c, 0x23, 0x4a, + 0x1f, 0x7c, 0x08, 0x4a, 0x91, 0x5e, 0xcd, 0xc0, 0x26, 0xe2, 0x1a, 0xe5, 0x34, 0xac, 0x96, 0xb4, + 0xa3, 0xc4, 0x03, 0xbe, 0x00, 0xf7, 0x18, 0xc7, 0x3e, 0xb7, 0xdc, 0xce, 0xa7, 0x04, 0x9b, 0xb6, + 0xe5, 0x92, 0x16, 0x31, 0xa8, 0x6b, 0x32, 0x51, 0xd3, 0xbc, 0xfe, 0x6e, 0xd8, 0xaf, 0xdf, 0x6b, + 0x4d, 0x76, 0x41, 0xd3, 0xb0, 0xf0, 0x18, 0xac, 0x19, 0xd4, 0x35, 0x02, 0xdf, 0x27, 0xae, 0xd1, + 0x3b, 0xa4, 0xb6, 0x65, 0xf4, 0x44, 0x21, 0xcb, 0xba, 0x2a, 0xa3, 0x59, 0xdb, 0x1d, 0x75, 0xb8, + 0x9a, 0x64, 0x44, 0xe3, 0x44, 0xf0, 0x3d, 0x50, 0x64, 0x01, 0xf3, 0x88, 0x6b, 0x56, 0xe7, 0x37, + 0x95, 0xad, 0x92, 0x5e, 0x09, 0xfb, 0xf5, 0x62, 0x6b, 0x60, 0x42, 0xf1, 0x1e, 0xfc, 0x16, 0x54, + 0x5e, 0xd3, 0xf6, 0x11, 0x71, 0x3c, 0x1b, 0x73, 0x52, 0x5d, 0x10, 0x35, 0x7d, 0x3a, 0x43, 0xe2, + 0xf7, 0x52, 0xb4, 0xd0, 0xe9, 0x5b, 0x32, 0xf4, 0x4a, 0x66, 0x03, 0x65, 0xcf, 0x68, 0xfc, 0xa1, + 0x80, 0xa5, 0x21, 0xf5, 0xc1, 0x17, 0xa0, 0x80, 0x0d, 0x6e, 0x9d, 0x45, 0xc5, 0x88, 0x0a, 0xff, + 0x68, 0xfa, 0xf9, 0xe9, 0xcb, 0x43, 0xe4, 0x84, 0x44, 0x17, 0x26, 0xa9, 0x78, 0x9f, 0x09, 0x12, + 0x24, 0xc9, 0xa0, 0x0d, 0x56, 0x6d, 0xcc, 0x78, 0x5c, 0xd1, 0x23, 0xcb, 0x21, 0x22, 0x17, 0x95, + 0xe6, 0x83, 0x9b, 0x89, 0x36, 0x42, 0xe8, 0x6f, 0x87, 0xfd, 0xfa, 0xea, 0xfe, 0x08, 0x0f, 0x1a, + 0x63, 0x6e, 0xfc, 0x98, 0x03, 0xf9, 0xbb, 0x69, 0x28, 0x47, 0x43, 0x0d, 0xa5, 0x39, 0x5b, 0xb1, + 0xa6, 0x36, 0x93, 0xe3, 0x91, 0x66, 0xb2, 0x33, 0x23, 0xef, 0xf5, 0x8d, 0xe4, 0x22, 0x0f, 0x16, + 0xf7, 0x68, 0x7b, 0x97, 0xba, 0xa6, 0xc5, 0x2d, 0xea, 0xc2, 0x1d, 0x30, 0xcf, 0x7b, 0x5e, 0xfc, + 0xfc, 0x36, 0xe3, 0x80, 0x8e, 0x7a, 0x1e, 0xb9, 0xea, 0xd7, 0x57, 0xb3, 0xbe, 0x91, 0x0d, 0x09, + 0x6f, 0xf8, 0x45, 0x12, 0x64, 0x4e, 0xe0, 0x3e, 0x19, 0x3e, 0xee, 0xaa, 0x5f, 0xbf, 0x76, 0x78, + 0xa8, 0x09, 0xe7, 0x70, 0x78, 0xb0, 0x03, 0x96, 0xa2, 0x82, 0x1e, 0xfa, 0xb4, 0x3d, 0xd0, 0x49, + 0x7e, 0x66, 0x9d, 0xac, 0xcb, 0x50, 0x96, 0xf6, 0xb3, 0x44, 0x68, 0x98, 0x17, 0x9e, 0x01, 0x18, + 0x19, 0x8e, 0x7c, 0xec, 0xb2, 0xc1, 0xe5, 0x6e, 0xa7, 0xca, 0x0d, 0x79, 0x1a, 0xdc, 0x1f, 0x63, + 0x43, 0x13, 0x4e, 0x80, 0xef, 0x83, 0x82, 0x4f, 0x30, 0xa3, 0xae, 0x78, 0xe2, 0xe5, 0xb4, 0x4e, + 0x48, 0x58, 0x91, 0xdc, 0x85, 0xf7, 0x41, 0xd1, 0x21, 0x8c, 0xe1, 0x0e, 0xa9, 0x16, 0x84, 0xe3, + 0x8a, 0x74, 0x2c, 0x1e, 0x0c, 0xcc, 0x28, 0xde, 0x6f, 0xfc, 0xaa, 0x80, 0xe2, 0xdd, 0xcc, 0x85, + 0xd6, 0xf0, 0x5c, 0x50, 0x67, 0x53, 0xe6, 0x94, 0x99, 0xf0, 0x73, 0x5e, 0x84, 0x2f, 0xe6, 0xc1, + 0x36, 0xa8, 0x78, 0xd8, 0xc7, 0xb6, 0x4d, 0x6c, 0x8b, 0x39, 0xe2, 0x06, 0x0b, 0xfa, 0x4a, 0xd4, + 0xc5, 0x0e, 0x53, 0x33, 0xca, 0xfa, 0x44, 0x10, 0x83, 0x3a, 0x9e, 0x4d, 0xa2, 0x14, 0x0f, 0xe4, + 0x28, 0x21, 0xbb, 0xa9, 0x19, 0x65, 0x7d, 0xe0, 0x73, 0xb0, 0x3e, 0xe8, 0x4c, 0xa3, 0x53, 0x24, + 0x2f, 0xa6, 0xc8, 0x3b, 0x61, 0xbf, 0xbe, 0xfe, 0x6c, 0x92, 0x03, 0x9a, 0x8c, 0x83, 0xdf, 0x80, + 0x12, 0x23, 0x36, 0x31, 0x38, 0xf5, 0xa5, 0x84, 0x3e, 0xbc, 0x61, 0xd6, 0x71, 0x9b, 0xd8, 0x2d, + 0x09, 0xd5, 0x17, 0xc5, 0xdc, 0x93, 0x2b, 0x94, 0x50, 0xc2, 0xa7, 0x60, 0xd9, 0xc1, 0x6e, 0x80, + 0x13, 0x4f, 0xa1, 0x9d, 0x92, 0x0e, 0xc3, 0x7e, 0x7d, 0xf9, 0x60, 0x68, 0x07, 0x8d, 0x78, 0xc2, + 0xaf, 0x41, 0x89, 0xc7, 0x43, 0xa5, 0x20, 0x42, 0x7b, 0x43, 0x53, 0x3f, 0xa4, 0xe6, 0xd0, 0x1c, + 0x49, 0xf4, 0x90, 0x0c, 0x91, 0x84, 0xb0, 0xf1, 0x4b, 0x1e, 0x94, 0xd3, 0xe9, 0x71, 0x0a, 0x80, + 0x11, 0x3f, 0x6b, 0x26, 0x27, 0xc8, 0x47, 0xb3, 0x49, 0x24, 0x69, 0x0b, 0x69, 0xe7, 0x4d, 0x4c, + 0x0c, 0x65, 0xe8, 0xe1, 0x4b, 0x50, 0x16, 0xf3, 0x5c, 0x3c, 0xdb, 0xdc, 0xcc, 0xcf, 0x76, 0x29, + 0xec, 0xd7, 0xcb, 0xad, 0x98, 0x00, 0xa5, 0x5c, 0xf0, 0x04, 0x2c, 0xa7, 0x5a, 0xb9, 0x65, 0x0b, + 0x12, 0x85, 0xd9, 0x1d, 0x62, 0x41, 0x23, 0xac, 0x51, 0x23, 0x90, 0xb3, 0x76, 0x5e, 0x48, 0x76, + 0xda, 0xf0, 0xd4, 0x40, 0x99, 0x05, 0x86, 0x41, 0x88, 0x49, 0x4c, 0x51, 0xf7, 0x05, 0x7d, 0x4d, + 0xba, 0x96, 0x5b, 0xf1, 0x06, 0x4a, 0x7d, 0x22, 0xe2, 0x13, 0x6c, 0xd9, 0xc4, 0x14, 0xf5, 0xce, + 0x10, 0x7f, 0x26, 0xac, 0x48, 0xee, 0x36, 0xfe, 0x52, 0x40, 0xf6, 0xdf, 0xe0, 0x0e, 0xe6, 0x65, + 0x37, 0xa3, 0xc5, 0xdc, 0x7f, 0xfe, 0xc1, 0xb9, 0x4e, 0x98, 0xbf, 0x2b, 0x60, 0x65, 0xc4, 0xff, + 0xff, 0xfa, 0x3f, 0xa0, 0x3f, 0x38, 0xbf, 0xac, 0xcd, 0x5d, 0x5c, 0xd6, 0xe6, 0xfe, 0xbc, 0xac, + 0xcd, 0x7d, 0x17, 0xd6, 0x94, 0xf3, 0xb0, 0xa6, 0x5c, 0x84, 0x35, 0xe5, 0xef, 0xb0, 0xa6, 0xfc, + 0xf0, 0x4f, 0x6d, 0xee, 0xab, 0x52, 0xcc, 0xf3, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x94, 0x36, + 0x56, 0x74, 0x1a, 0x0f, 0x00, 0x00, } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/v2alpha1/generated.proto b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/v2alpha1/generated.proto index 67194ebb..1654920f 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/v2alpha1/generated.proto +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/v2alpha1/generated.proto @@ -36,7 +36,7 @@ message CronJob { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec is a structure defining the expected behavior of a job, including the schedule. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -100,7 +100,7 @@ message Job { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec is a structure defining the expected behavior of a job. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -235,7 +235,7 @@ message JobTemplate { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Template defines jobs that will be created from this template // http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -248,7 +248,7 @@ message JobTemplateSpec { // Standard object's metadata of the jobs created from this template. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Specification of the desired behavior of the job. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/v2alpha1/register.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/v2alpha1/register.go index b462cca4..92318111 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/v2alpha1/register.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/v2alpha1/register.go @@ -47,7 +47,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { &JobTemplate{}, &CronJob{}, &CronJobList{}, - &v1.ListOptions{}, &v1.DeleteOptions{}, &metav1.ExportOptions{}, &metav1.GetOptions{}, diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/v2alpha1/types.generated.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/v2alpha1/types.generated.go index 7b71a844..e5815f46 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/v2alpha1/types.generated.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/v2alpha1/types.generated.go @@ -26,9 +26,9 @@ import ( "fmt" codec1978 "github.com/ugorji/go/codec" pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - pkg3_types "k8s.io/apimachinery/pkg/types" + pkg2_types "k8s.io/apimachinery/pkg/types" pkg4_resource "k8s.io/client-go/pkg/api/resource" - pkg2_v1 "k8s.io/client-go/pkg/api/v1" + pkg3_v1 "k8s.io/client-go/pkg/api/v1" pkg5_intstr "k8s.io/client-go/pkg/util/intstr" "reflect" "runtime" @@ -66,9 +66,9 @@ func init() { } if false { // reference the types, but skip this branch at build/run time var v0 pkg1_v1.TypeMeta - var v1 pkg3_types.UID + var v1 pkg2_types.UID var v2 pkg4_resource.Quantity - var v3 pkg2_v1.ObjectMeta + var v3 pkg3_v1.PodTemplateSpec var v4 pkg5_intstr.IntOrString var v5 time.Time _, _, _, _, _, _ = v0, v1, v2, v3, v4, v5 @@ -164,7 +164,13 @@ func (x *Job) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -174,7 +180,13 @@ func (x *Job) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -298,24 +310,30 @@ func (x *Job) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = JobSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = JobStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -328,16 +346,16 @@ func (x *Job) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -345,21 +363,21 @@ func (x *Job) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -367,38 +385,44 @@ func (x *Job) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -406,16 +430,16 @@ func (x *Job) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = JobSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -423,21 +447,21 @@ func (x *Job) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = JobStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -898,7 +922,13 @@ func (x *JobTemplate) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -908,7 +938,13 @@ func (x *JobTemplate) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -1015,17 +1051,23 @@ func (x *JobTemplate) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "template": if r.TryDecodeAsNil() { x.Template = JobTemplateSpec{} } else { - yyv9 := &x.Template - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Template + yyv10.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -1038,16 +1080,16 @@ func (x *JobTemplate) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + var yyj11 int + var yyb11 bool + var yyhl11 bool = l >= 0 + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1055,21 +1097,21 @@ func (x *JobTemplate) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv11 := &x.Kind - yym12 := z.DecBinary() - _ = yym12 + yyv12 := &x.Kind + yym13 := z.DecBinary() + _ = yym13 if false { } else { - *((*string)(yyv11)) = r.DecodeString() + *((*string)(yyv12)) = r.DecodeString() } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1077,38 +1119,44 @@ func (x *JobTemplate) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv13 := &x.APIVersion - yym14 := z.DecBinary() - _ = yym14 + yyv14 := &x.APIVersion + yym15 := z.DecBinary() + _ = yym15 if false { } else { - *((*string)(yyv13)) = r.DecodeString() + *((*string)(yyv14)) = r.DecodeString() } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv15 := &x.ObjectMeta - yyv15.CodecDecodeSelf(d) + yyv16 := &x.ObjectMeta + yym17 := z.DecBinary() + _ = yym17 + if false { + } else if z.HasExtensions() && z.DecExt(yyv16) { + } else { + z.DecFallback(yyv16, false) + } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1116,21 +1164,21 @@ func (x *JobTemplate) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Template = JobTemplateSpec{} } else { - yyv16 := &x.Template - yyv16.CodecDecodeSelf(d) + yyv18 := &x.Template + yyv18.CodecDecodeSelf(d) } for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj10-1, "") + z.DecStructFieldNotFound(yyj11-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -1171,7 +1219,13 @@ func (x *JobTemplateSpec) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[0] { yy4 := &x.ObjectMeta - yy4.CodecEncodeSelf(e) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else if z.HasExtensions() && z.EncExt(yy4) { + } else { + z.EncFallback(yy4) + } } else { r.EncodeNil() } @@ -1181,7 +1235,13 @@ func (x *JobTemplateSpec) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy6 := &x.ObjectMeta - yy6.CodecEncodeSelf(e) + yym7 := z.EncBinary() + _ = yym7 + if false { + } else if z.HasExtensions() && z.EncExt(yy6) { + } else { + z.EncFallback(yy6) + } } } if yyr2 || yy2arr2 { @@ -1264,17 +1324,23 @@ func (x *JobTemplateSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { switch yys3 { case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv4 := &x.ObjectMeta - yyv4.CodecDecodeSelf(d) + yym5 := z.DecBinary() + _ = yym5 + if false { + } else if z.HasExtensions() && z.DecExt(yyv4) { + } else { + z.DecFallback(yyv4, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = JobSpec{} } else { - yyv5 := &x.Spec - yyv5.CodecDecodeSelf(d) + yyv6 := &x.Spec + yyv6.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -1287,33 +1353,39 @@ func (x *JobTemplateSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj6 int - var yyb6 bool - var yyhl6 bool = l >= 0 - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l + var yyj7 int + var yyb7 bool + var yyhl7 bool = l >= 0 + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb6 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb6 { + if yyb7 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv7 := &x.ObjectMeta - yyv7.CodecDecodeSelf(d) + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb6 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb6 { + if yyb7 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1321,21 +1393,21 @@ func (x *JobTemplateSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) if r.TryDecodeAsNil() { x.Spec = JobSpec{} } else { - yyv8 := &x.Spec - yyv8.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } for { - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l + yyj7++ + if yyhl7 { + yyb7 = yyj7 > l } else { - yyb6 = r.CheckBreak() + yyb7 = r.CheckBreak() } - if yyb6 { + if yyb7 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj6-1, "") + z.DecStructFieldNotFound(yyj7-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -1705,7 +1777,7 @@ func (x *JobSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "template": if r.TryDecodeAsNil() { - x.Template = pkg2_v1.PodTemplateSpec{} + x.Template = pkg3_v1.PodTemplateSpec{} } else { yyv14 := &x.Template yyv14.CodecDecodeSelf(d) @@ -1867,7 +1939,7 @@ func (x *JobSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.Template = pkg2_v1.PodTemplateSpec{} + x.Template = pkg3_v1.PodTemplateSpec{} } else { yyv26 := &x.Template yyv26.CodecDecodeSelf(d) @@ -3037,7 +3109,13 @@ func (x *CronJob) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -3047,7 +3125,13 @@ func (x *CronJob) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -3171,24 +3255,30 @@ func (x *CronJob) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = CronJobSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = CronJobStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -3201,16 +3291,16 @@ func (x *CronJob) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3218,21 +3308,21 @@ func (x *CronJob) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3240,38 +3330,44 @@ func (x *CronJob) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3279,16 +3375,16 @@ func (x *CronJob) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = CronJobSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3296,21 +3392,21 @@ func (x *CronJob) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = CronJobStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -4156,7 +4252,7 @@ func (x *CronJobStatus) CodecEncodeSelf(e *codec1978.Encoder) { _ = yym4 if false { } else { - h.encSlicev1_ObjectReference(([]pkg2_v1.ObjectReference)(x.Active), e) + h.encSlicev1_ObjectReference(([]pkg3_v1.ObjectReference)(x.Active), e) } } } else { @@ -4174,7 +4270,7 @@ func (x *CronJobStatus) CodecEncodeSelf(e *codec1978.Encoder) { _ = yym5 if false { } else { - h.encSlicev1_ObjectReference(([]pkg2_v1.ObjectReference)(x.Active), e) + h.encSlicev1_ObjectReference(([]pkg3_v1.ObjectReference)(x.Active), e) } } } @@ -4292,7 +4388,7 @@ func (x *CronJobStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { _ = yym5 if false { } else { - h.decSlicev1_ObjectReference((*[]pkg2_v1.ObjectReference)(yyv4), d) + h.decSlicev1_ObjectReference((*[]pkg3_v1.ObjectReference)(yyv4), d) } } case "lastScheduleTime": @@ -4349,7 +4445,7 @@ func (x *CronJobStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { _ = yym10 if false { } else { - h.decSlicev1_ObjectReference((*[]pkg2_v1.ObjectReference)(yyv9), d) + h.decSlicev1_ObjectReference((*[]pkg3_v1.ObjectReference)(yyv9), d) } } yyj8++ @@ -4438,7 +4534,7 @@ func (x codecSelfer1234) decSliceJob(v *[]Job, d *codec1978.Decoder) { yyrg1 := len(yyv1) > 0 yyv21 := yyv1 - yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 832) + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 848) if yyrt1 { if yyrl1 <= cap(yyv1) { yyv1 = yyv1[:yyrl1] @@ -4676,7 +4772,7 @@ func (x codecSelfer1234) decSliceCronJob(v *[]CronJob, d *codec1978.Decoder) { yyrg1 := len(yyv1) > 0 yyv21 := yyv1 - yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 1080) + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 1096) if yyrt1 { if yyrl1 <= cap(yyv1) { yyv1 = yyv1[:yyrl1] @@ -4756,7 +4852,7 @@ func (x codecSelfer1234) decSliceCronJob(v *[]CronJob, d *codec1978.Decoder) { } } -func (x codecSelfer1234) encSlicev1_ObjectReference(v []pkg2_v1.ObjectReference, e *codec1978.Encoder) { +func (x codecSelfer1234) encSlicev1_ObjectReference(v []pkg3_v1.ObjectReference, e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r @@ -4769,7 +4865,7 @@ func (x codecSelfer1234) encSlicev1_ObjectReference(v []pkg2_v1.ObjectReference, z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } -func (x codecSelfer1234) decSlicev1_ObjectReference(v *[]pkg2_v1.ObjectReference, d *codec1978.Decoder) { +func (x codecSelfer1234) decSlicev1_ObjectReference(v *[]pkg3_v1.ObjectReference, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r @@ -4780,7 +4876,7 @@ func (x codecSelfer1234) decSlicev1_ObjectReference(v *[]pkg2_v1.ObjectReference _ = yyc1 if yyl1 == 0 { if yyv1 == nil { - yyv1 = []pkg2_v1.ObjectReference{} + yyv1 = []pkg3_v1.ObjectReference{} yyc1 = true } else if len(yyv1) != 0 { yyv1 = yyv1[:0] @@ -4800,10 +4896,10 @@ func (x codecSelfer1234) decSlicev1_ObjectReference(v *[]pkg2_v1.ObjectReference if yyrl1 <= cap(yyv1) { yyv1 = yyv1[:yyrl1] } else { - yyv1 = make([]pkg2_v1.ObjectReference, yyrl1) + yyv1 = make([]pkg3_v1.ObjectReference, yyrl1) } } else { - yyv1 = make([]pkg2_v1.ObjectReference, yyrl1) + yyv1 = make([]pkg3_v1.ObjectReference, yyrl1) } yyc1 = true yyrr1 = len(yyv1) @@ -4818,7 +4914,7 @@ func (x codecSelfer1234) decSlicev1_ObjectReference(v *[]pkg2_v1.ObjectReference for ; yyj1 < yyrr1; yyj1++ { yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv1[yyj1] = pkg2_v1.ObjectReference{} + yyv1[yyj1] = pkg3_v1.ObjectReference{} } else { yyv2 := &yyv1[yyj1] yyv2.CodecDecodeSelf(d) @@ -4827,10 +4923,10 @@ func (x codecSelfer1234) decSlicev1_ObjectReference(v *[]pkg2_v1.ObjectReference } if yyrt1 { for ; yyj1 < yyl1; yyj1++ { - yyv1 = append(yyv1, pkg2_v1.ObjectReference{}) + yyv1 = append(yyv1, pkg3_v1.ObjectReference{}) yyh1.ElemContainerState(yyj1) if r.TryDecodeAsNil() { - yyv1[yyj1] = pkg2_v1.ObjectReference{} + yyv1[yyj1] = pkg3_v1.ObjectReference{} } else { yyv3 := &yyv1[yyj1] yyv3.CodecDecodeSelf(d) @@ -4844,13 +4940,13 @@ func (x codecSelfer1234) decSlicev1_ObjectReference(v *[]pkg2_v1.ObjectReference for ; !r.CheckBreak(); yyj1++ { if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, pkg2_v1.ObjectReference{}) // var yyz1 pkg2_v1.ObjectReference + yyv1 = append(yyv1, pkg3_v1.ObjectReference{}) // var yyz1 pkg3_v1.ObjectReference yyc1 = true } yyh1.ElemContainerState(yyj1) if yyj1 < len(yyv1) { if r.TryDecodeAsNil() { - yyv1[yyj1] = pkg2_v1.ObjectReference{} + yyv1[yyj1] = pkg3_v1.ObjectReference{} } else { yyv4 := &yyv1[yyj1] yyv4.CodecDecodeSelf(d) @@ -4865,7 +4961,7 @@ func (x codecSelfer1234) decSlicev1_ObjectReference(v *[]pkg2_v1.ObjectReference yyv1 = yyv1[:yyj1] yyc1 = true } else if yyj1 == 0 && yyv1 == nil { - yyv1 = []pkg2_v1.ObjectReference{} + yyv1 = []pkg3_v1.ObjectReference{} yyc1 = true } } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/v2alpha1/types.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/v2alpha1/types.go index bde96d97..655a07cf 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/v2alpha1/types.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/v2alpha1/types.go @@ -29,7 +29,7 @@ type Job struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec is a structure defining the expected behavior of a job. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -60,7 +60,7 @@ type JobTemplate struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Template defines jobs that will be created from this template // http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -73,7 +73,7 @@ type JobTemplateSpec struct { // Standard object's metadata of the jobs created from this template. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Specification of the desired behavior of the job. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -202,7 +202,7 @@ type CronJob struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec is a structure defining the expected behavior of a job, including the schedule. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/v2alpha1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/v2alpha1/zz_generated.conversion.go index 5d3be8be..0d395348 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/v2alpha1/zz_generated.conversion.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/v2alpha1/zz_generated.conversion.go @@ -64,10 +64,7 @@ func RegisterConversions(scheme *runtime.Scheme) error { } func autoConvert_v2alpha1_CronJob_To_batch_CronJob(in *CronJob, out *batch.CronJob, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v2alpha1_CronJobSpec_To_batch_CronJobSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -82,10 +79,7 @@ func Convert_v2alpha1_CronJob_To_batch_CronJob(in *CronJob, out *batch.CronJob, } func autoConvert_batch_CronJob_To_v2alpha1_CronJob(in *batch.CronJob, out *CronJob, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_batch_CronJobSpec_To_v2alpha1_CronJobSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -190,10 +184,7 @@ func Convert_batch_CronJobStatus_To_v2alpha1_CronJobStatus(in *batch.CronJobStat } func autoConvert_v2alpha1_Job_To_batch_Job(in *Job, out *batch.Job, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v2alpha1_JobSpec_To_batch_JobSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -208,10 +199,7 @@ func Convert_v2alpha1_Job_To_batch_Job(in *Job, out *batch.Job, s conversion.Sco } func autoConvert_batch_Job_To_v2alpha1_Job(in *batch.Job, out *Job, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_batch_JobSpec_To_v2alpha1_JobSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -346,10 +334,7 @@ func Convert_batch_JobStatus_To_v2alpha1_JobStatus(in *batch.JobStatus, out *Job } func autoConvert_v2alpha1_JobTemplate_To_batch_JobTemplate(in *JobTemplate, out *batch.JobTemplate, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v2alpha1_JobTemplateSpec_To_batch_JobTemplateSpec(&in.Template, &out.Template, s); err != nil { return err } @@ -361,10 +346,7 @@ func Convert_v2alpha1_JobTemplate_To_batch_JobTemplate(in *JobTemplate, out *bat } func autoConvert_batch_JobTemplate_To_v2alpha1_JobTemplate(in *batch.JobTemplate, out *JobTemplate, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_batch_JobTemplateSpec_To_v2alpha1_JobTemplateSpec(&in.Template, &out.Template, s); err != nil { return err } @@ -376,10 +358,7 @@ func Convert_batch_JobTemplate_To_v2alpha1_JobTemplate(in *batch.JobTemplate, ou } func autoConvert_v2alpha1_JobTemplateSpec_To_batch_JobTemplateSpec(in *JobTemplateSpec, out *batch.JobTemplateSpec, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v2alpha1_JobSpec_To_batch_JobSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -391,10 +370,7 @@ func Convert_v2alpha1_JobTemplateSpec_To_batch_JobTemplateSpec(in *JobTemplateSp } func autoConvert_batch_JobTemplateSpec_To_v2alpha1_JobTemplateSpec(in *batch.JobTemplateSpec, out *JobTemplateSpec, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_batch_JobSpec_To_v2alpha1_JobSpec(&in.Spec, &out.Spec, s); err != nil { return err } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/v2alpha1/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/v2alpha1/zz_generated.deepcopy.go index d9e0160d..35b17c4d 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/v2alpha1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/v2alpha1/zz_generated.deepcopy.go @@ -21,10 +21,10 @@ limitations under the License. package v2alpha1 import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - v1 "k8s.io/client-go/pkg/api/v1" + api_v1 "k8s.io/client-go/pkg/api/v1" reflect "reflect" ) @@ -55,8 +55,10 @@ func DeepCopy_v2alpha1_CronJob(in interface{}, out interface{}, c *conversion.Cl in := in.(*CronJob) out := out.(*CronJob) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v2alpha1_CronJobSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -115,14 +117,12 @@ func DeepCopy_v2alpha1_CronJobStatus(in interface{}, out interface{}, c *convers *out = *in if in.Active != nil { in, out := &in.Active, &out.Active - *out = make([]v1.ObjectReference, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + *out = make([]api_v1.ObjectReference, len(*in)) + copy(*out, *in) } if in.LastScheduleTime != nil { in, out := &in.LastScheduleTime, &out.LastScheduleTime - *out = new(meta_v1.Time) + *out = new(v1.Time) **out = (*in).DeepCopy() } return nil @@ -134,8 +134,10 @@ func DeepCopy_v2alpha1_Job(in interface{}, out interface{}, c *conversion.Cloner in := in.(*Job) out := out.(*Job) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v2alpha1_JobSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -201,7 +203,7 @@ func DeepCopy_v2alpha1_JobSpec(in interface{}, out interface{}, c *conversion.Cl if newVal, err := c.DeepCopy(*in); err != nil { return err } else { - *out = newVal.(*meta_v1.LabelSelector) + *out = newVal.(*v1.LabelSelector) } } if in.ManualSelector != nil { @@ -209,7 +211,7 @@ func DeepCopy_v2alpha1_JobSpec(in interface{}, out interface{}, c *conversion.Cl *out = new(bool) **out = **in } - if err := v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil { + if err := api_v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil { return err } return nil @@ -232,12 +234,12 @@ func DeepCopy_v2alpha1_JobStatus(in interface{}, out interface{}, c *conversion. } if in.StartTime != nil { in, out := &in.StartTime, &out.StartTime - *out = new(meta_v1.Time) + *out = new(v1.Time) **out = (*in).DeepCopy() } if in.CompletionTime != nil { in, out := &in.CompletionTime, &out.CompletionTime - *out = new(meta_v1.Time) + *out = new(v1.Time) **out = (*in).DeepCopy() } return nil @@ -249,8 +251,10 @@ func DeepCopy_v2alpha1_JobTemplate(in interface{}, out interface{}, c *conversio in := in.(*JobTemplate) out := out.(*JobTemplate) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v2alpha1_JobTemplateSpec(&in.Template, &out.Template, c); err != nil { return err @@ -264,8 +268,10 @@ func DeepCopy_v2alpha1_JobTemplateSpec(in interface{}, out interface{}, c *conve in := in.(*JobTemplateSpec) out := out.(*JobTemplateSpec) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v2alpha1_JobSpec(&in.Spec, &out.Spec, c); err != nil { return err diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/zz_generated.deepcopy.go index 8f60b1b2..a4fffc15 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/batch/zz_generated.deepcopy.go @@ -55,8 +55,10 @@ func DeepCopy_batch_CronJob(in interface{}, out interface{}, c *conversion.Clone in := in.(*CronJob) out := out.(*CronJob) *out = *in - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_batch_CronJobSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -116,9 +118,7 @@ func DeepCopy_batch_CronJobStatus(in interface{}, out interface{}, c *conversion if in.Active != nil { in, out := &in.Active, &out.Active *out = make([]api.ObjectReference, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.LastScheduleTime != nil { in, out := &in.LastScheduleTime, &out.LastScheduleTime @@ -134,8 +134,10 @@ func DeepCopy_batch_Job(in interface{}, out interface{}, c *conversion.Cloner) e in := in.(*Job) out := out.(*Job) *out = *in - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_batch_JobSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -249,8 +251,10 @@ func DeepCopy_batch_JobTemplate(in interface{}, out interface{}, c *conversion.C in := in.(*JobTemplate) out := out.(*JobTemplate) *out = *in - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_batch_JobTemplateSpec(&in.Template, &out.Template, c); err != nil { return err @@ -264,8 +268,10 @@ func DeepCopy_batch_JobTemplateSpec(in interface{}, out interface{}, c *conversi in := in.(*JobTemplateSpec) out := out.(*JobTemplateSpec) *out = *in - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_batch_JobSpec(&in.Spec, &out.Spec, c); err != nil { return err diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/helpers.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/helpers.go new file mode 100644 index 00000000..2608e407 --- /dev/null +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/helpers.go @@ -0,0 +1,38 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package certificates + +import ( + "crypto/x509" + "encoding/pem" + "errors" +) + +// ParseCSR extracts the CSR from the API object and decodes it. +func ParseCSR(obj *CertificateSigningRequest) (*x509.CertificateRequest, error) { + // extract PEM from request object + pemBytes := obj.Spec.Request + block, _ := pem.Decode(pemBytes) + if block == nil || block.Type != "CERTIFICATE REQUEST" { + return nil, errors.New("PEM block type must be CERTIFICATE REQUEST") + } + csr, err := x509.ParseCertificateRequest(block.Bytes) + if err != nil { + return nil, err + } + return csr, nil +} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/install/install.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/install/install.go index 140f8e88..8850e07a 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/install/install.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/install/install.go @@ -19,25 +19,33 @@ limitations under the License. package install import ( + "k8s.io/apimachinery/pkg/apimachinery/announced" + "k8s.io/apimachinery/pkg/apimachinery/registered" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/client-go/pkg/apimachinery/announced" + "k8s.io/client-go/pkg/api" "k8s.io/client-go/pkg/apis/certificates" - "k8s.io/client-go/pkg/apis/certificates/v1alpha1" + "k8s.io/client-go/pkg/apis/certificates/v1beta1" ) func init() { + Install(api.GroupFactoryRegistry, api.Registry, api.Scheme) +} + +// Install registers the API group and adds types to a scheme +func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) { if err := announced.NewGroupMetaFactory( &announced.GroupMetaFactoryArgs{ GroupName: certificates.GroupName, - VersionPreferenceOrder: []string{v1alpha1.SchemeGroupVersion.Version}, + VersionPreferenceOrder: []string{v1beta1.SchemeGroupVersion.Version}, ImportPrefix: "k8s.io/client-go/pkg/apis/certificates", RootScopedKinds: sets.NewString("CertificateSigningRequest"), AddInternalObjectsToScheme: certificates.AddToScheme, }, announced.VersionToSchemeFunc{ - v1alpha1.SchemeGroupVersion.Version: v1alpha1.AddToScheme, + v1beta1.SchemeGroupVersion.Version: v1beta1.AddToScheme, }, - ).Announce().RegisterAndEnable(); err != nil { + ).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil { panic(err) } } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/register.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/register.go index 73584e8a..8eadfec3 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/register.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/register.go @@ -48,7 +48,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &CertificateSigningRequest{}, &CertificateSigningRequestList{}, - &api.ListOptions{}, &api.DeleteOptions{}, ) return nil diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/types.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/types.go index ace47bc1..4aee19f2 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/types.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/types.go @@ -16,10 +16,7 @@ limitations under the License. package certificates -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/client-go/pkg/api" -) +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" // +genclient=true // +nonNamespaced=true @@ -28,7 +25,7 @@ import ( type CertificateSigningRequest struct { metav1.TypeMeta // +optional - api.ObjectMeta + metav1.ObjectMeta // The certificate request itself and any additional information. // +optional diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1alpha1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1alpha1/zz_generated.conversion.go deleted file mode 100644 index e70734b7..00000000 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1alpha1/zz_generated.conversion.go +++ /dev/null @@ -1,175 +0,0 @@ -// +build !ignore_autogenerated - -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was autogenerated by conversion-gen. Do not edit it manually! - -package v1alpha1 - -import ( - conversion "k8s.io/apimachinery/pkg/conversion" - runtime "k8s.io/apimachinery/pkg/runtime" - certificates "k8s.io/client-go/pkg/apis/certificates" - unsafe "unsafe" -) - -func init() { - SchemeBuilder.Register(RegisterConversions) -} - -// RegisterConversions adds conversion functions to the given scheme. -// Public to allow building arbitrary schemes. -func RegisterConversions(scheme *runtime.Scheme) error { - return scheme.AddGeneratedConversionFuncs( - Convert_v1alpha1_CertificateSigningRequest_To_certificates_CertificateSigningRequest, - Convert_certificates_CertificateSigningRequest_To_v1alpha1_CertificateSigningRequest, - Convert_v1alpha1_CertificateSigningRequestCondition_To_certificates_CertificateSigningRequestCondition, - Convert_certificates_CertificateSigningRequestCondition_To_v1alpha1_CertificateSigningRequestCondition, - Convert_v1alpha1_CertificateSigningRequestList_To_certificates_CertificateSigningRequestList, - Convert_certificates_CertificateSigningRequestList_To_v1alpha1_CertificateSigningRequestList, - Convert_v1alpha1_CertificateSigningRequestSpec_To_certificates_CertificateSigningRequestSpec, - Convert_certificates_CertificateSigningRequestSpec_To_v1alpha1_CertificateSigningRequestSpec, - Convert_v1alpha1_CertificateSigningRequestStatus_To_certificates_CertificateSigningRequestStatus, - Convert_certificates_CertificateSigningRequestStatus_To_v1alpha1_CertificateSigningRequestStatus, - ) -} - -func autoConvert_v1alpha1_CertificateSigningRequest_To_certificates_CertificateSigningRequest(in *CertificateSigningRequest, out *certificates.CertificateSigningRequest, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } - if err := Convert_v1alpha1_CertificateSigningRequestSpec_To_certificates_CertificateSigningRequestSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha1_CertificateSigningRequestStatus_To_certificates_CertificateSigningRequestStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -func Convert_v1alpha1_CertificateSigningRequest_To_certificates_CertificateSigningRequest(in *CertificateSigningRequest, out *certificates.CertificateSigningRequest, s conversion.Scope) error { - return autoConvert_v1alpha1_CertificateSigningRequest_To_certificates_CertificateSigningRequest(in, out, s) -} - -func autoConvert_certificates_CertificateSigningRequest_To_v1alpha1_CertificateSigningRequest(in *certificates.CertificateSigningRequest, out *CertificateSigningRequest, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } - if err := Convert_certificates_CertificateSigningRequestSpec_To_v1alpha1_CertificateSigningRequestSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_certificates_CertificateSigningRequestStatus_To_v1alpha1_CertificateSigningRequestStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -func Convert_certificates_CertificateSigningRequest_To_v1alpha1_CertificateSigningRequest(in *certificates.CertificateSigningRequest, out *CertificateSigningRequest, s conversion.Scope) error { - return autoConvert_certificates_CertificateSigningRequest_To_v1alpha1_CertificateSigningRequest(in, out, s) -} - -func autoConvert_v1alpha1_CertificateSigningRequestCondition_To_certificates_CertificateSigningRequestCondition(in *CertificateSigningRequestCondition, out *certificates.CertificateSigningRequestCondition, s conversion.Scope) error { - out.Type = certificates.RequestConditionType(in.Type) - out.Reason = in.Reason - out.Message = in.Message - out.LastUpdateTime = in.LastUpdateTime - return nil -} - -func Convert_v1alpha1_CertificateSigningRequestCondition_To_certificates_CertificateSigningRequestCondition(in *CertificateSigningRequestCondition, out *certificates.CertificateSigningRequestCondition, s conversion.Scope) error { - return autoConvert_v1alpha1_CertificateSigningRequestCondition_To_certificates_CertificateSigningRequestCondition(in, out, s) -} - -func autoConvert_certificates_CertificateSigningRequestCondition_To_v1alpha1_CertificateSigningRequestCondition(in *certificates.CertificateSigningRequestCondition, out *CertificateSigningRequestCondition, s conversion.Scope) error { - out.Type = RequestConditionType(in.Type) - out.Reason = in.Reason - out.Message = in.Message - out.LastUpdateTime = in.LastUpdateTime - return nil -} - -func Convert_certificates_CertificateSigningRequestCondition_To_v1alpha1_CertificateSigningRequestCondition(in *certificates.CertificateSigningRequestCondition, out *CertificateSigningRequestCondition, s conversion.Scope) error { - return autoConvert_certificates_CertificateSigningRequestCondition_To_v1alpha1_CertificateSigningRequestCondition(in, out, s) -} - -func autoConvert_v1alpha1_CertificateSigningRequestList_To_certificates_CertificateSigningRequestList(in *CertificateSigningRequestList, out *certificates.CertificateSigningRequestList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]certificates.CertificateSigningRequest)(unsafe.Pointer(&in.Items)) - return nil -} - -func Convert_v1alpha1_CertificateSigningRequestList_To_certificates_CertificateSigningRequestList(in *CertificateSigningRequestList, out *certificates.CertificateSigningRequestList, s conversion.Scope) error { - return autoConvert_v1alpha1_CertificateSigningRequestList_To_certificates_CertificateSigningRequestList(in, out, s) -} - -func autoConvert_certificates_CertificateSigningRequestList_To_v1alpha1_CertificateSigningRequestList(in *certificates.CertificateSigningRequestList, out *CertificateSigningRequestList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]CertificateSigningRequest)(unsafe.Pointer(&in.Items)) - return nil -} - -func Convert_certificates_CertificateSigningRequestList_To_v1alpha1_CertificateSigningRequestList(in *certificates.CertificateSigningRequestList, out *CertificateSigningRequestList, s conversion.Scope) error { - return autoConvert_certificates_CertificateSigningRequestList_To_v1alpha1_CertificateSigningRequestList(in, out, s) -} - -func autoConvert_v1alpha1_CertificateSigningRequestSpec_To_certificates_CertificateSigningRequestSpec(in *CertificateSigningRequestSpec, out *certificates.CertificateSigningRequestSpec, s conversion.Scope) error { - out.Request = *(*[]byte)(unsafe.Pointer(&in.Request)) - out.Usages = *(*[]certificates.KeyUsage)(unsafe.Pointer(&in.Usages)) - out.Username = in.Username - out.UID = in.UID - out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups)) - return nil -} - -func Convert_v1alpha1_CertificateSigningRequestSpec_To_certificates_CertificateSigningRequestSpec(in *CertificateSigningRequestSpec, out *certificates.CertificateSigningRequestSpec, s conversion.Scope) error { - return autoConvert_v1alpha1_CertificateSigningRequestSpec_To_certificates_CertificateSigningRequestSpec(in, out, s) -} - -func autoConvert_certificates_CertificateSigningRequestSpec_To_v1alpha1_CertificateSigningRequestSpec(in *certificates.CertificateSigningRequestSpec, out *CertificateSigningRequestSpec, s conversion.Scope) error { - out.Request = *(*[]byte)(unsafe.Pointer(&in.Request)) - out.Usages = *(*[]KeyUsage)(unsafe.Pointer(&in.Usages)) - out.Username = in.Username - out.UID = in.UID - out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups)) - return nil -} - -func Convert_certificates_CertificateSigningRequestSpec_To_v1alpha1_CertificateSigningRequestSpec(in *certificates.CertificateSigningRequestSpec, out *CertificateSigningRequestSpec, s conversion.Scope) error { - return autoConvert_certificates_CertificateSigningRequestSpec_To_v1alpha1_CertificateSigningRequestSpec(in, out, s) -} - -func autoConvert_v1alpha1_CertificateSigningRequestStatus_To_certificates_CertificateSigningRequestStatus(in *CertificateSigningRequestStatus, out *certificates.CertificateSigningRequestStatus, s conversion.Scope) error { - out.Conditions = *(*[]certificates.CertificateSigningRequestCondition)(unsafe.Pointer(&in.Conditions)) - out.Certificate = *(*[]byte)(unsafe.Pointer(&in.Certificate)) - return nil -} - -func Convert_v1alpha1_CertificateSigningRequestStatus_To_certificates_CertificateSigningRequestStatus(in *CertificateSigningRequestStatus, out *certificates.CertificateSigningRequestStatus, s conversion.Scope) error { - return autoConvert_v1alpha1_CertificateSigningRequestStatus_To_certificates_CertificateSigningRequestStatus(in, out, s) -} - -func autoConvert_certificates_CertificateSigningRequestStatus_To_v1alpha1_CertificateSigningRequestStatus(in *certificates.CertificateSigningRequestStatus, out *CertificateSigningRequestStatus, s conversion.Scope) error { - out.Conditions = *(*[]CertificateSigningRequestCondition)(unsafe.Pointer(&in.Conditions)) - out.Certificate = *(*[]byte)(unsafe.Pointer(&in.Certificate)) - return nil -} - -func Convert_certificates_CertificateSigningRequestStatus_To_v1alpha1_CertificateSigningRequestStatus(in *certificates.CertificateSigningRequestStatus, out *CertificateSigningRequestStatus, s conversion.Scope) error { - return autoConvert_certificates_CertificateSigningRequestStatus_To_v1alpha1_CertificateSigningRequestStatus(in, out, s) -} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1alpha1/conversion.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1beta1/conversion.go similarity index 98% rename from vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1alpha1/conversion.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1beta1/conversion.go index df9f7b0e..a51b37ae 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1alpha1/conversion.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1beta1/conversion.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package v1beta1 import ( "fmt" diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1alpha1/defaults.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1beta1/defaults.go similarity index 98% rename from vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1alpha1/defaults.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1beta1/defaults.go index d4bea720..cd6a29d3 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1alpha1/defaults.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1beta1/defaults.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package v1beta1 import "k8s.io/apimachinery/pkg/runtime" diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1alpha1/doc.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1beta1/doc.go similarity index 97% rename from vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1alpha1/doc.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1beta1/doc.go index 260dc11b..6f257909 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1alpha1/doc.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1beta1/doc.go @@ -15,4 +15,4 @@ limitations under the License. */ // +groupName=certificates.k8s.io -package v1alpha1 +package v1beta1 diff --git a/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/generated.pb.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1beta1/generated.pb.go similarity index 85% rename from vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/generated.pb.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1beta1/generated.pb.go index aaf4adc5..92937f2c 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/generated.pb.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1beta1/generated.pb.go @@ -15,14 +15,14 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. -// source: k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/generated.proto +// source: k8s.io/kubernetes/pkg/apis/certificates/v1beta1/generated.proto // DO NOT EDIT! /* - Package v1alpha1 is a generated protocol buffer package. + Package v1beta1 is a generated protocol buffer package. It is generated from these files: - k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/generated.proto + k8s.io/kubernetes/pkg/apis/certificates/v1beta1/generated.proto It has these top-level messages: CertificateSigningRequest @@ -31,7 +31,7 @@ limitations under the License. CertificateSigningRequestSpec CertificateSigningRequestStatus */ -package v1alpha1 +package v1beta1 import proto "github.com/gogo/protobuf/proto" import fmt "fmt" @@ -82,11 +82,11 @@ func (*CertificateSigningRequestStatus) Descriptor() ([]byte, []int) { } func init() { - proto.RegisterType((*CertificateSigningRequest)(nil), "k8s.io.kubernetes.pkg.apis.certificates.v1alpha1.CertificateSigningRequest") - proto.RegisterType((*CertificateSigningRequestCondition)(nil), "k8s.io.kubernetes.pkg.apis.certificates.v1alpha1.CertificateSigningRequestCondition") - proto.RegisterType((*CertificateSigningRequestList)(nil), "k8s.io.kubernetes.pkg.apis.certificates.v1alpha1.CertificateSigningRequestList") - proto.RegisterType((*CertificateSigningRequestSpec)(nil), "k8s.io.kubernetes.pkg.apis.certificates.v1alpha1.CertificateSigningRequestSpec") - proto.RegisterType((*CertificateSigningRequestStatus)(nil), "k8s.io.kubernetes.pkg.apis.certificates.v1alpha1.CertificateSigningRequestStatus") + proto.RegisterType((*CertificateSigningRequest)(nil), "k8s.io.client-go.pkg.apis.certificates.v1beta1.CertificateSigningRequest") + proto.RegisterType((*CertificateSigningRequestCondition)(nil), "k8s.io.client-go.pkg.apis.certificates.v1beta1.CertificateSigningRequestCondition") + proto.RegisterType((*CertificateSigningRequestList)(nil), "k8s.io.client-go.pkg.apis.certificates.v1beta1.CertificateSigningRequestList") + proto.RegisterType((*CertificateSigningRequestSpec)(nil), "k8s.io.client-go.pkg.apis.certificates.v1beta1.CertificateSigningRequestSpec") + proto.RegisterType((*CertificateSigningRequestStatus)(nil), "k8s.io.client-go.pkg.apis.certificates.v1beta1.CertificateSigningRequestStatus") } func (m *CertificateSigningRequest) Marshal() (data []byte, err error) { size := m.Size() @@ -431,7 +431,7 @@ func (this *CertificateSigningRequest) String() string { return "nil" } s := strings.Join([]string{`&CertificateSigningRequest{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "CertificateSigningRequestSpec", "CertificateSigningRequestSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "CertificateSigningRequestStatus", "CertificateSigningRequestStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -1328,51 +1328,51 @@ var ( ) var fileDescriptorGenerated = []byte{ - // 735 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xac, 0x54, 0xbf, 0x4f, 0x1b, 0x49, - 0x14, 0xf6, 0xda, 0xc6, 0xd8, 0x63, 0x0e, 0x4e, 0xa3, 0x13, 0xf2, 0x21, 0xb1, 0x46, 0xd6, 0xdd, - 0xc9, 0x87, 0xb8, 0xdd, 0xb3, 0x15, 0x45, 0x94, 0xd1, 0x12, 0x29, 0x42, 0x80, 0x50, 0x06, 0x2c, - 0x45, 0x51, 0x9a, 0xf1, 0xfa, 0xb1, 0x1e, 0xcc, 0xfe, 0x60, 0x67, 0x16, 0xc9, 0x5d, 0xca, 0x94, - 0xf9, 0x07, 0xf2, 0xff, 0x50, 0x52, 0xa6, 0x72, 0x82, 0x29, 0x53, 0xa4, 0xa7, 0x8a, 0x66, 0x3c, - 0x6b, 0x3b, 0x18, 0x87, 0x44, 0xa2, 0xf3, 0x7c, 0xf3, 0xde, 0xf7, 0xbd, 0xf9, 0xde, 0xb7, 0x46, - 0xcf, 0x7a, 0xdb, 0xdc, 0x62, 0xa1, 0xdd, 0x4b, 0xda, 0x10, 0x07, 0x20, 0x80, 0xdb, 0x51, 0xcf, - 0xb3, 0x69, 0xc4, 0xb8, 0xed, 0x42, 0x2c, 0xd8, 0x09, 0x73, 0xa9, 0x44, 0x2f, 0x1a, 0xf4, 0x2c, - 0xea, 0xd2, 0x86, 0xed, 0x41, 0x00, 0x31, 0x15, 0xd0, 0xb1, 0xa2, 0x38, 0x14, 0x21, 0xfe, 0x7f, - 0xc4, 0x60, 0x4d, 0x18, 0xac, 0xa8, 0xe7, 0x59, 0x92, 0xc1, 0x9a, 0x66, 0xb0, 0x52, 0x86, 0xb5, - 0xff, 0x3c, 0x26, 0xba, 0x49, 0xdb, 0x72, 0x43, 0xdf, 0xf6, 0x42, 0x2f, 0xb4, 0x15, 0x51, 0x3b, - 0x39, 0x51, 0x27, 0x75, 0x50, 0xbf, 0x46, 0x02, 0x6b, 0x4f, 0xf4, 0x88, 0x34, 0x62, 0x3e, 0x75, - 0xbb, 0x2c, 0x80, 0xb8, 0x3f, 0x19, 0xd2, 0x07, 0x41, 0xed, 0x8b, 0x99, 0xb1, 0xd6, 0xec, 0x79, - 0x5d, 0x71, 0x12, 0x08, 0xe6, 0xc3, 0x4c, 0xc3, 0xd3, 0x87, 0x1a, 0xb8, 0xdb, 0x05, 0x9f, 0xce, - 0xf4, 0x35, 0xe7, 0x3a, 0x68, 0xc7, 0xc0, 0xc3, 0x24, 0x76, 0x67, 0xb5, 0xb6, 0xe6, 0xf7, 0xdc, - 0xf3, 0x94, 0xc6, 0xfd, 0xd5, 0x89, 0x60, 0x67, 0x36, 0x0b, 0x04, 0x17, 0xf1, 0xdd, 0x96, 0xda, - 0x4d, 0x16, 0xfd, 0xb9, 0x33, 0x31, 0xff, 0x88, 0x79, 0x01, 0x0b, 0x3c, 0x02, 0xe7, 0x09, 0x70, - 0x81, 0x5f, 0xa1, 0xa2, 0xb4, 0xad, 0x43, 0x05, 0xad, 0x18, 0x1b, 0x46, 0xbd, 0xdc, 0xac, 0x5b, - 0x73, 0xb7, 0x68, 0x5d, 0x34, 0xac, 0xc3, 0xf6, 0x29, 0xb8, 0xe2, 0x00, 0x04, 0x75, 0xf0, 0xe5, - 0xa0, 0x9a, 0x19, 0x0e, 0xaa, 0x68, 0x82, 0x91, 0x31, 0x1b, 0x3e, 0x47, 0x79, 0x1e, 0x81, 0x5b, - 0xc9, 0x2a, 0xd6, 0x43, 0xeb, 0x57, 0xb3, 0x61, 0xcd, 0x1d, 0xfa, 0x28, 0x02, 0xd7, 0x59, 0xd2, - 0xe2, 0x79, 0x79, 0x22, 0x4a, 0x0a, 0xf7, 0x51, 0x81, 0x0b, 0x2a, 0x12, 0x5e, 0xc9, 0x29, 0xd1, - 0x97, 0x8f, 0x29, 0xaa, 0x88, 0x9d, 0x65, 0x2d, 0x5b, 0x18, 0x9d, 0x89, 0x16, 0xac, 0x7d, 0xc8, - 0xa2, 0xda, 0xdc, 0xde, 0x9d, 0x30, 0xe8, 0x30, 0xc1, 0xc2, 0x00, 0x6f, 0xa3, 0xbc, 0xe8, 0x47, - 0xa0, 0xac, 0x2e, 0x39, 0x7f, 0xa5, 0x6f, 0x38, 0xee, 0x47, 0x70, 0x3b, 0xa8, 0xfe, 0x71, 0xb7, - 0x5e, 0xe2, 0x44, 0x75, 0xe0, 0x7f, 0x50, 0x21, 0x06, 0xca, 0xc3, 0x40, 0x19, 0x5a, 0x9a, 0x0c, - 0x42, 0x14, 0x4a, 0xf4, 0x2d, 0xfe, 0x17, 0x2d, 0xfa, 0xc0, 0x39, 0xf5, 0x40, 0x99, 0x50, 0x72, - 0x56, 0x74, 0xe1, 0xe2, 0xc1, 0x08, 0x26, 0xe9, 0x3d, 0x3e, 0x45, 0xcb, 0x67, 0x94, 0x8b, 0x56, - 0xd4, 0xa1, 0x02, 0x8e, 0x99, 0x0f, 0x95, 0xbc, 0xb2, 0x6d, 0x33, 0xb5, 0x6d, 0x3a, 0xff, 0x13, - 0xe3, 0xe4, 0x86, 0x65, 0x12, 0x64, 0x87, 0xb3, 0xaa, 0xd9, 0x97, 0xf7, 0xbf, 0x63, 0x22, 0x77, - 0x98, 0x6b, 0x5f, 0x0d, 0xb4, 0x3e, 0xd7, 0x9f, 0x7d, 0xc6, 0x05, 0x7e, 0x33, 0x93, 0x44, 0xeb, - 0xe7, 0xe6, 0x90, 0xdd, 0x2a, 0x8f, 0xbf, 0xeb, 0x59, 0x8a, 0x29, 0x32, 0x95, 0xc6, 0x08, 0x2d, - 0x30, 0x01, 0x3e, 0xaf, 0x64, 0x37, 0x72, 0xf5, 0x72, 0x73, 0xef, 0x11, 0x93, 0xe1, 0xfc, 0xa6, - 0x75, 0x17, 0x76, 0xa5, 0x02, 0x19, 0x09, 0xd5, 0xbe, 0xfc, 0xe8, 0xc5, 0x32, 0xb4, 0xf8, 0x6f, - 0xb4, 0x18, 0x8f, 0x8e, 0xea, 0xc1, 0x4b, 0x4e, 0x59, 0xae, 0x49, 0x57, 0x90, 0xf4, 0x0e, 0x6f, - 0xa1, 0x62, 0xc2, 0x21, 0x0e, 0xa8, 0x0f, 0x7a, 0xf7, 0xe3, 0x87, 0xb6, 0x34, 0x4e, 0xc6, 0x15, - 0x78, 0x1d, 0xe5, 0x12, 0xd6, 0xd1, 0xbb, 0x2f, 0xeb, 0xc2, 0x5c, 0x6b, 0xf7, 0x39, 0x91, 0x38, - 0xae, 0xa1, 0x82, 0x17, 0x87, 0x49, 0xc4, 0x2b, 0xf9, 0x8d, 0x5c, 0xbd, 0xe4, 0x20, 0x19, 0xa1, - 0x17, 0x0a, 0x21, 0xfa, 0x06, 0x37, 0x51, 0xb1, 0x07, 0xfd, 0x96, 0xca, 0xd0, 0x82, 0xaa, 0x5a, - 0x95, 0x55, 0x0a, 0xe0, 0xb7, 0x83, 0x6a, 0x71, 0x4f, 0xdf, 0x92, 0x71, 0x5d, 0xed, 0x93, 0x81, - 0xaa, 0x0f, 0x7c, 0x3b, 0xf8, 0x9d, 0x81, 0x90, 0x9b, 0x46, 0x9b, 0x57, 0x0c, 0xb5, 0x89, 0xe3, - 0x47, 0xdc, 0xc4, 0xf8, 0xbb, 0x99, 0xfc, 0x35, 0x8d, 0x21, 0x4e, 0xa6, 0xb4, 0x71, 0x03, 0x95, - 0xa7, 0xb8, 0x95, 0xad, 0x4b, 0xce, 0xca, 0x70, 0x50, 0x2d, 0x4f, 0x91, 0x93, 0xe9, 0x1a, 0x67, - 0xf3, 0xf2, 0xda, 0xcc, 0x5c, 0x5d, 0x9b, 0x99, 0x8f, 0xd7, 0x66, 0xe6, 0xed, 0xd0, 0x34, 0x2e, - 0x87, 0xa6, 0x71, 0x35, 0x34, 0x8d, 0xcf, 0x43, 0xd3, 0x78, 0x7f, 0x63, 0x66, 0x5e, 0x17, 0xd3, - 0x09, 0xbf, 0x05, 0x00, 0x00, 0xff, 0xff, 0x55, 0xe5, 0xc0, 0xfd, 0x4b, 0x07, 0x00, 0x00, + // 731 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xac, 0x54, 0x4d, 0x4f, 0x13, 0x5b, + 0x18, 0xee, 0xb4, 0xa5, 0x1f, 0xa7, 0x5c, 0xb8, 0x39, 0xb9, 0x21, 0xbd, 0x24, 0x4c, 0x49, 0x73, + 0xaf, 0x01, 0x83, 0x33, 0xb6, 0x31, 0x86, 0x9d, 0xc9, 0x60, 0x62, 0x50, 0x50, 0x73, 0xa0, 0x1b, + 0xe3, 0xc2, 0xd3, 0xe9, 0xcb, 0x70, 0x28, 0xf3, 0xe1, 0x9c, 0x33, 0xc4, 0xee, 0xdc, 0xb9, 0xf5, + 0x0f, 0xf8, 0x7f, 0x58, 0xb2, 0x74, 0xd5, 0x48, 0x5d, 0x19, 0x13, 0x7f, 0x00, 0x2b, 0x73, 0x4e, + 0x4f, 0xdb, 0x91, 0x52, 0xc1, 0x84, 0x5d, 0xcf, 0xf3, 0x3e, 0xef, 0xf3, 0xbc, 0x5f, 0x53, 0xf4, + 0xa8, 0xbb, 0xc9, 0x2d, 0x16, 0xda, 0xdd, 0xa4, 0x0d, 0x71, 0x00, 0x02, 0xb8, 0x1d, 0x75, 0x3d, + 0x9b, 0x46, 0x8c, 0xdb, 0x2e, 0xc4, 0x82, 0x1d, 0x30, 0x97, 0x4a, 0xf4, 0xa4, 0xd1, 0x06, 0x41, + 0x1b, 0xb6, 0x07, 0x01, 0xc4, 0x54, 0x40, 0xc7, 0x8a, 0xe2, 0x50, 0x84, 0xd8, 0x1e, 0x0a, 0x58, + 0x13, 0x01, 0x2b, 0xea, 0x7a, 0x96, 0x14, 0xb0, 0xd2, 0x02, 0x96, 0x16, 0x58, 0xbe, 0xe7, 0x31, + 0x71, 0x98, 0xb4, 0x2d, 0x37, 0xf4, 0x6d, 0x2f, 0xf4, 0x42, 0x5b, 0xe9, 0xb4, 0x93, 0x03, 0xf5, + 0x52, 0x0f, 0xf5, 0x6b, 0xa8, 0xbf, 0xfc, 0x40, 0x17, 0x48, 0x23, 0xe6, 0x53, 0xf7, 0x90, 0x05, + 0x10, 0xf7, 0x26, 0x25, 0xfa, 0x20, 0xa8, 0x7d, 0x32, 0x55, 0xd5, 0xb2, 0x3d, 0x2b, 0x2b, 0x4e, + 0x02, 0xc1, 0x7c, 0x98, 0x4a, 0x78, 0x78, 0x5d, 0x02, 0x77, 0x0f, 0xc1, 0xa7, 0x53, 0x79, 0xcd, + 0x99, 0xf3, 0xb3, 0x63, 0xe0, 0x61, 0x12, 0xbb, 0xd3, 0x5e, 0x1b, 0xb3, 0x73, 0xae, 0x68, 0xa5, + 0x71, 0x35, 0x3b, 0x11, 0xec, 0xd8, 0x66, 0x81, 0xe0, 0x22, 0xbe, 0x9c, 0x52, 0xff, 0x96, 0x45, + 0xff, 0x6e, 0x4d, 0x66, 0xbf, 0xc7, 0xbc, 0x80, 0x05, 0x1e, 0x81, 0xb7, 0x09, 0x70, 0x81, 0xdf, + 0xa0, 0x92, 0x1c, 0x5b, 0x87, 0x0a, 0x5a, 0x35, 0x56, 0x8d, 0xb5, 0x4a, 0xf3, 0xbe, 0xa5, 0x97, + 0x98, 0xee, 0x7e, 0xb2, 0x46, 0xc9, 0xb6, 0x4e, 0x1a, 0xd6, 0x8b, 0xf6, 0x11, 0xb8, 0x62, 0x17, + 0x04, 0x75, 0xf0, 0x69, 0xbf, 0x96, 0x19, 0xf4, 0x6b, 0x68, 0x82, 0x91, 0xb1, 0x2a, 0x8e, 0x50, + 0x9e, 0x47, 0xe0, 0x56, 0xb3, 0x4a, 0xfd, 0xb9, 0xf5, 0x87, 0x27, 0x62, 0xcd, 0xac, 0x7d, 0x2f, + 0x02, 0xd7, 0x99, 0xd7, 0xde, 0x79, 0xf9, 0x22, 0xca, 0x09, 0xbf, 0x43, 0x05, 0x2e, 0xa8, 0x48, + 0x78, 0x35, 0xa7, 0x3c, 0x5f, 0xde, 0xa2, 0xa7, 0xd2, 0x75, 0x16, 0xb4, 0x6b, 0x61, 0xf8, 0x26, + 0xda, 0xaf, 0xfe, 0x29, 0x8b, 0xea, 0x33, 0x73, 0xb7, 0xc2, 0xa0, 0xc3, 0x04, 0x0b, 0x03, 0xbc, + 0x89, 0xf2, 0xa2, 0x17, 0x81, 0x1a, 0x78, 0xd9, 0xf9, 0x6f, 0xd4, 0xc2, 0x7e, 0x2f, 0x82, 0x8b, + 0x7e, 0xed, 0x9f, 0xcb, 0x7c, 0x89, 0x13, 0x95, 0x81, 0xef, 0xa0, 0x42, 0x0c, 0x94, 0x87, 0x81, + 0x1a, 0x67, 0x79, 0x52, 0x08, 0x51, 0x28, 0xd1, 0x51, 0xbc, 0x8e, 0x8a, 0x3e, 0x70, 0x4e, 0x3d, + 0x50, 0x33, 0x28, 0x3b, 0x8b, 0x9a, 0x58, 0xdc, 0x1d, 0xc2, 0x64, 0x14, 0xc7, 0x47, 0x68, 0xe1, + 0x98, 0x72, 0xd1, 0x8a, 0x3a, 0x54, 0xc0, 0x3e, 0xf3, 0xa1, 0x9a, 0x57, 0x53, 0xbb, 0x7b, 0xb3, + 0x3b, 0x90, 0x19, 0xce, 0x92, 0x56, 0x5f, 0xd8, 0xf9, 0x45, 0x89, 0x5c, 0x52, 0xae, 0xff, 0x30, + 0xd0, 0xca, 0xcc, 0xf9, 0xec, 0x30, 0x2e, 0xf0, 0xeb, 0xa9, 0x7b, 0xb4, 0x6e, 0x56, 0x87, 0xcc, + 0x56, 0xd7, 0xf8, 0xb7, 0xae, 0xa5, 0x34, 0x42, 0x52, 0xb7, 0x18, 0xa2, 0x39, 0x26, 0xc0, 0xe7, + 0xd5, 0xec, 0x6a, 0x6e, 0xad, 0xd2, 0x7c, 0x7a, 0x7b, 0x87, 0xe1, 0xfc, 0xa5, 0x6d, 0xe7, 0xb6, + 0xa5, 0x01, 0x19, 0xfa, 0xd4, 0xbf, 0xff, 0xae, 0x61, 0x79, 0xb2, 0xf8, 0x7f, 0x54, 0x8c, 0x87, + 0x4f, 0xd5, 0xef, 0xbc, 0x53, 0x91, 0x5b, 0xd2, 0x0c, 0x32, 0x8a, 0xe1, 0x0d, 0x54, 0x4a, 0x38, + 0xc4, 0x01, 0xf5, 0x41, 0xaf, 0x7e, 0xdc, 0x67, 0x4b, 0xe3, 0x64, 0xcc, 0xc0, 0x2b, 0x28, 0x97, + 0xb0, 0x8e, 0x5e, 0x7d, 0x45, 0x13, 0x73, 0xad, 0xed, 0xc7, 0x44, 0xe2, 0xb8, 0x8e, 0x0a, 0x5e, + 0x1c, 0x26, 0x11, 0xaf, 0xe6, 0x57, 0x73, 0x6b, 0x65, 0x07, 0xc9, 0x0b, 0x7a, 0xa2, 0x10, 0xa2, + 0x23, 0xb8, 0x89, 0x4a, 0x5d, 0xe8, 0xb5, 0xd4, 0x09, 0xcd, 0x29, 0xd6, 0x92, 0x64, 0x29, 0x80, + 0x5f, 0xf4, 0x6b, 0xa5, 0x67, 0x3a, 0x4a, 0xc6, 0xbc, 0x7a, 0xdf, 0x40, 0xb5, 0x6b, 0x3e, 0x1d, + 0xfc, 0xc1, 0x40, 0xc8, 0x1d, 0x5d, 0x36, 0xaf, 0x1a, 0x6a, 0x11, 0x7b, 0xb7, 0xb7, 0x88, 0xf1, + 0x57, 0x33, 0xf9, 0x5b, 0x1a, 0x43, 0x9c, 0xa4, 0xac, 0x71, 0x03, 0x55, 0x52, 0xd2, 0x6a, 0xaa, + 0xf3, 0xce, 0xe2, 0xa0, 0x5f, 0xab, 0xa4, 0xc4, 0x49, 0x9a, 0xe3, 0xac, 0x9f, 0x9e, 0x9b, 0x99, + 0xb3, 0x73, 0x33, 0xf3, 0xf9, 0xdc, 0xcc, 0xbc, 0x1f, 0x98, 0xc6, 0xe9, 0xc0, 0x34, 0xce, 0x06, + 0xa6, 0xf1, 0x65, 0x60, 0x1a, 0x1f, 0xbf, 0x9a, 0x99, 0x57, 0x45, 0x5d, 0xe0, 0xcf, 0x00, 0x00, + 0x00, 0xff, 0xff, 0xa8, 0x84, 0xfa, 0xbc, 0x4c, 0x07, 0x00, 0x00, } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1alpha1/generated.proto b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1beta1/generated.proto similarity index 95% rename from vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1alpha1/generated.proto rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1beta1/generated.proto index eb0ef771..cb432875 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1alpha1/generated.proto +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1beta1/generated.proto @@ -19,7 +19,7 @@ limitations under the License. syntax = 'proto2'; -package k8s.io.kubernetes.pkg.apis.certificates.v1alpha1; +package k8s.io.kubernetes.pkg.apis.certificates.v1beta1; import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/generated.proto"; @@ -29,12 +29,12 @@ import "k8s.io/kubernetes/pkg/api/v1/generated.proto"; import "k8s.io/kubernetes/pkg/util/intstr/generated.proto"; // Package-wide variables from generator "generated". -option go_package = "v1alpha1"; +option go_package = "v1beta1"; // Describes a certificate signing request message CertificateSigningRequest { // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // The certificate request itself and any additional information. // +optional diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1beta1/helpers.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1beta1/helpers.go new file mode 100644 index 00000000..1375063c --- /dev/null +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1beta1/helpers.go @@ -0,0 +1,38 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + "crypto/x509" + "encoding/pem" + "errors" +) + +// ParseCSR extracts the CSR from the API object and decodes it. +func ParseCSR(obj *CertificateSigningRequest) (*x509.CertificateRequest, error) { + // extract PEM from request object + pemBytes := obj.Spec.Request + block, _ := pem.Decode(pemBytes) + if block == nil || block.Type != "CERTIFICATE REQUEST" { + return nil, errors.New("PEM block type must be CERTIFICATE REQUEST") + } + csr, err := x509.ParseCertificateRequest(block.Bytes) + if err != nil { + return nil, err + } + return csr, nil +} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1alpha1/register.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1beta1/register.go similarity index 97% rename from vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1alpha1/register.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1beta1/register.go index 81312ee6..ecdcdfea 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1alpha1/register.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1beta1/register.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package v1beta1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -27,7 +27,7 @@ import ( const GroupName = "certificates.k8s.io" // SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"} // Kind takes an unqualified kind and returns a Group qualified GroupKind func Kind(kind string) schema.GroupKind { @@ -49,7 +49,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &CertificateSigningRequest{}, &CertificateSigningRequestList{}, - &v1.ListOptions{}, &v1.DeleteOptions{}, &metav1.ExportOptions{}, &metav1.GetOptions{}, diff --git a/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/types.generated.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1beta1/types.generated.go similarity index 96% rename from vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/types.generated.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1beta1/types.generated.go index 88a83133..b2741033 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/types.generated.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1beta1/types.generated.go @@ -19,15 +19,14 @@ limitations under the License. // THIS FILE IS AUTO-GENERATED BY codecgen. // ************************************************************ -package v1alpha1 +package v1beta1 import ( "errors" "fmt" codec1978 "github.com/ugorji/go/codec" pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - pkg3_types "k8s.io/apimachinery/pkg/types" - pkg2_v1 "k8s.io/kubernetes/pkg/api/v1" + pkg2_types "k8s.io/apimachinery/pkg/types" "reflect" "runtime" time "time" @@ -64,10 +63,9 @@ func init() { } if false { // reference the types, but skip this branch at build/run time var v0 pkg1_v1.TypeMeta - var v1 pkg3_types.UID - var v2 pkg2_v1.ObjectMeta - var v3 time.Time - _, _, _, _ = v0, v1, v2, v3 + var v1 pkg2_types.UID + var v2 time.Time + _, _, _ = v0, v1, v2 } } @@ -160,7 +158,13 @@ func (x *CertificateSigningRequest) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -170,7 +174,13 @@ func (x *CertificateSigningRequest) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -294,24 +304,30 @@ func (x *CertificateSigningRequest) codecDecodeSelfFromMap(l int, d *codec1978.D } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = CertificateSigningRequestSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = CertificateSigningRequestStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -324,16 +340,16 @@ func (x *CertificateSigningRequest) codecDecodeSelfFromArray(l int, d *codec1978 var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -341,21 +357,21 @@ func (x *CertificateSigningRequest) codecDecodeSelfFromArray(l int, d *codec1978 if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -363,38 +379,44 @@ func (x *CertificateSigningRequest) codecDecodeSelfFromArray(l int, d *codec1978 if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -402,16 +424,16 @@ func (x *CertificateSigningRequest) codecDecodeSelfFromArray(l int, d *codec1978 if r.TryDecodeAsNil() { x.Spec = CertificateSigningRequestSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -419,21 +441,21 @@ func (x *CertificateSigningRequest) codecDecodeSelfFromArray(l int, d *codec1978 if r.TryDecodeAsNil() { x.Status = CertificateSigningRequestStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/types.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1beta1/types.go similarity index 97% rename from vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/types.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1beta1/types.go index eb950bb9..bdbb6cbf 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/types.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1beta1/types.go @@ -14,11 +14,10 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package v1beta1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/kubernetes/pkg/api/v1" ) // +genclient=true @@ -28,7 +27,7 @@ import ( type CertificateSigningRequest struct { metav1.TypeMeta `json:",inline"` // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // The certificate request itself and any additional information. // +optional diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1alpha1/types_swagger_doc_generated.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1beta1/types_swagger_doc_generated.go similarity index 99% rename from vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1alpha1/types_swagger_doc_generated.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1beta1/types_swagger_doc_generated.go index 26a9dceb..46892098 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1alpha1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1beta1/types_swagger_doc_generated.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package v1beta1 // This file contains a collection of methods that can be used from go-restful to // generate Swagger API documentation for its models. Please read this PR for more diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1beta1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1beta1/zz_generated.conversion.go new file mode 100644 index 00000000..d6ad5a61 --- /dev/null +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1beta1/zz_generated.conversion.go @@ -0,0 +1,169 @@ +// +build !ignore_autogenerated + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was autogenerated by conversion-gen. Do not edit it manually! + +package v1beta1 + +import ( + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + certificates "k8s.io/client-go/pkg/apis/certificates" + unsafe "unsafe" +) + +func init() { + SchemeBuilder.Register(RegisterConversions) +} + +// RegisterConversions adds conversion functions to the given scheme. +// Public to allow building arbitrary schemes. +func RegisterConversions(scheme *runtime.Scheme) error { + return scheme.AddGeneratedConversionFuncs( + Convert_v1beta1_CertificateSigningRequest_To_certificates_CertificateSigningRequest, + Convert_certificates_CertificateSigningRequest_To_v1beta1_CertificateSigningRequest, + Convert_v1beta1_CertificateSigningRequestCondition_To_certificates_CertificateSigningRequestCondition, + Convert_certificates_CertificateSigningRequestCondition_To_v1beta1_CertificateSigningRequestCondition, + Convert_v1beta1_CertificateSigningRequestList_To_certificates_CertificateSigningRequestList, + Convert_certificates_CertificateSigningRequestList_To_v1beta1_CertificateSigningRequestList, + Convert_v1beta1_CertificateSigningRequestSpec_To_certificates_CertificateSigningRequestSpec, + Convert_certificates_CertificateSigningRequestSpec_To_v1beta1_CertificateSigningRequestSpec, + Convert_v1beta1_CertificateSigningRequestStatus_To_certificates_CertificateSigningRequestStatus, + Convert_certificates_CertificateSigningRequestStatus_To_v1beta1_CertificateSigningRequestStatus, + ) +} + +func autoConvert_v1beta1_CertificateSigningRequest_To_certificates_CertificateSigningRequest(in *CertificateSigningRequest, out *certificates.CertificateSigningRequest, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1beta1_CertificateSigningRequestSpec_To_certificates_CertificateSigningRequestSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1beta1_CertificateSigningRequestStatus_To_certificates_CertificateSigningRequestStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +func Convert_v1beta1_CertificateSigningRequest_To_certificates_CertificateSigningRequest(in *CertificateSigningRequest, out *certificates.CertificateSigningRequest, s conversion.Scope) error { + return autoConvert_v1beta1_CertificateSigningRequest_To_certificates_CertificateSigningRequest(in, out, s) +} + +func autoConvert_certificates_CertificateSigningRequest_To_v1beta1_CertificateSigningRequest(in *certificates.CertificateSigningRequest, out *CertificateSigningRequest, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_certificates_CertificateSigningRequestSpec_To_v1beta1_CertificateSigningRequestSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_certificates_CertificateSigningRequestStatus_To_v1beta1_CertificateSigningRequestStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +func Convert_certificates_CertificateSigningRequest_To_v1beta1_CertificateSigningRequest(in *certificates.CertificateSigningRequest, out *CertificateSigningRequest, s conversion.Scope) error { + return autoConvert_certificates_CertificateSigningRequest_To_v1beta1_CertificateSigningRequest(in, out, s) +} + +func autoConvert_v1beta1_CertificateSigningRequestCondition_To_certificates_CertificateSigningRequestCondition(in *CertificateSigningRequestCondition, out *certificates.CertificateSigningRequestCondition, s conversion.Scope) error { + out.Type = certificates.RequestConditionType(in.Type) + out.Reason = in.Reason + out.Message = in.Message + out.LastUpdateTime = in.LastUpdateTime + return nil +} + +func Convert_v1beta1_CertificateSigningRequestCondition_To_certificates_CertificateSigningRequestCondition(in *CertificateSigningRequestCondition, out *certificates.CertificateSigningRequestCondition, s conversion.Scope) error { + return autoConvert_v1beta1_CertificateSigningRequestCondition_To_certificates_CertificateSigningRequestCondition(in, out, s) +} + +func autoConvert_certificates_CertificateSigningRequestCondition_To_v1beta1_CertificateSigningRequestCondition(in *certificates.CertificateSigningRequestCondition, out *CertificateSigningRequestCondition, s conversion.Scope) error { + out.Type = RequestConditionType(in.Type) + out.Reason = in.Reason + out.Message = in.Message + out.LastUpdateTime = in.LastUpdateTime + return nil +} + +func Convert_certificates_CertificateSigningRequestCondition_To_v1beta1_CertificateSigningRequestCondition(in *certificates.CertificateSigningRequestCondition, out *CertificateSigningRequestCondition, s conversion.Scope) error { + return autoConvert_certificates_CertificateSigningRequestCondition_To_v1beta1_CertificateSigningRequestCondition(in, out, s) +} + +func autoConvert_v1beta1_CertificateSigningRequestList_To_certificates_CertificateSigningRequestList(in *CertificateSigningRequestList, out *certificates.CertificateSigningRequestList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]certificates.CertificateSigningRequest)(unsafe.Pointer(&in.Items)) + return nil +} + +func Convert_v1beta1_CertificateSigningRequestList_To_certificates_CertificateSigningRequestList(in *CertificateSigningRequestList, out *certificates.CertificateSigningRequestList, s conversion.Scope) error { + return autoConvert_v1beta1_CertificateSigningRequestList_To_certificates_CertificateSigningRequestList(in, out, s) +} + +func autoConvert_certificates_CertificateSigningRequestList_To_v1beta1_CertificateSigningRequestList(in *certificates.CertificateSigningRequestList, out *CertificateSigningRequestList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]CertificateSigningRequest)(unsafe.Pointer(&in.Items)) + return nil +} + +func Convert_certificates_CertificateSigningRequestList_To_v1beta1_CertificateSigningRequestList(in *certificates.CertificateSigningRequestList, out *CertificateSigningRequestList, s conversion.Scope) error { + return autoConvert_certificates_CertificateSigningRequestList_To_v1beta1_CertificateSigningRequestList(in, out, s) +} + +func autoConvert_v1beta1_CertificateSigningRequestSpec_To_certificates_CertificateSigningRequestSpec(in *CertificateSigningRequestSpec, out *certificates.CertificateSigningRequestSpec, s conversion.Scope) error { + out.Request = *(*[]byte)(unsafe.Pointer(&in.Request)) + out.Usages = *(*[]certificates.KeyUsage)(unsafe.Pointer(&in.Usages)) + out.Username = in.Username + out.UID = in.UID + out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups)) + return nil +} + +func Convert_v1beta1_CertificateSigningRequestSpec_To_certificates_CertificateSigningRequestSpec(in *CertificateSigningRequestSpec, out *certificates.CertificateSigningRequestSpec, s conversion.Scope) error { + return autoConvert_v1beta1_CertificateSigningRequestSpec_To_certificates_CertificateSigningRequestSpec(in, out, s) +} + +func autoConvert_certificates_CertificateSigningRequestSpec_To_v1beta1_CertificateSigningRequestSpec(in *certificates.CertificateSigningRequestSpec, out *CertificateSigningRequestSpec, s conversion.Scope) error { + out.Request = *(*[]byte)(unsafe.Pointer(&in.Request)) + out.Usages = *(*[]KeyUsage)(unsafe.Pointer(&in.Usages)) + out.Username = in.Username + out.UID = in.UID + out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups)) + return nil +} + +func Convert_certificates_CertificateSigningRequestSpec_To_v1beta1_CertificateSigningRequestSpec(in *certificates.CertificateSigningRequestSpec, out *CertificateSigningRequestSpec, s conversion.Scope) error { + return autoConvert_certificates_CertificateSigningRequestSpec_To_v1beta1_CertificateSigningRequestSpec(in, out, s) +} + +func autoConvert_v1beta1_CertificateSigningRequestStatus_To_certificates_CertificateSigningRequestStatus(in *CertificateSigningRequestStatus, out *certificates.CertificateSigningRequestStatus, s conversion.Scope) error { + out.Conditions = *(*[]certificates.CertificateSigningRequestCondition)(unsafe.Pointer(&in.Conditions)) + out.Certificate = *(*[]byte)(unsafe.Pointer(&in.Certificate)) + return nil +} + +func Convert_v1beta1_CertificateSigningRequestStatus_To_certificates_CertificateSigningRequestStatus(in *CertificateSigningRequestStatus, out *certificates.CertificateSigningRequestStatus, s conversion.Scope) error { + return autoConvert_v1beta1_CertificateSigningRequestStatus_To_certificates_CertificateSigningRequestStatus(in, out, s) +} + +func autoConvert_certificates_CertificateSigningRequestStatus_To_v1beta1_CertificateSigningRequestStatus(in *certificates.CertificateSigningRequestStatus, out *CertificateSigningRequestStatus, s conversion.Scope) error { + out.Conditions = *(*[]CertificateSigningRequestCondition)(unsafe.Pointer(&in.Conditions)) + out.Certificate = *(*[]byte)(unsafe.Pointer(&in.Certificate)) + return nil +} + +func Convert_certificates_CertificateSigningRequestStatus_To_v1beta1_CertificateSigningRequestStatus(in *certificates.CertificateSigningRequestStatus, out *CertificateSigningRequestStatus, s conversion.Scope) error { + return autoConvert_certificates_CertificateSigningRequestStatus_To_v1beta1_CertificateSigningRequestStatus(in, out, s) +} diff --git a/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1beta1/zz_generated.deepcopy.go similarity index 57% rename from vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/zz_generated.deepcopy.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1beta1/zz_generated.deepcopy.go index 9bacf350..5db3b92a 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1beta1/zz_generated.deepcopy.go @@ -18,12 +18,12 @@ limitations under the License. // This file was autogenerated by deepcopy-gen. Do not edit it manually! -package v1alpha1 +package v1beta1 import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - v1 "k8s.io/kubernetes/pkg/api/v1" reflect "reflect" ) @@ -35,33 +35,35 @@ func init() { // to allow building arbitrary schemes. func RegisterDeepCopies(scheme *runtime.Scheme) error { return scheme.AddGeneratedDeepCopyFuncs( - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_CertificateSigningRequest, InType: reflect.TypeOf(&CertificateSigningRequest{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_CertificateSigningRequestCondition, InType: reflect.TypeOf(&CertificateSigningRequestCondition{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_CertificateSigningRequestList, InType: reflect.TypeOf(&CertificateSigningRequestList{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_CertificateSigningRequestSpec, InType: reflect.TypeOf(&CertificateSigningRequestSpec{})}, - conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1alpha1_CertificateSigningRequestStatus, InType: reflect.TypeOf(&CertificateSigningRequestStatus{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_CertificateSigningRequest, InType: reflect.TypeOf(&CertificateSigningRequest{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_CertificateSigningRequestCondition, InType: reflect.TypeOf(&CertificateSigningRequestCondition{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_CertificateSigningRequestList, InType: reflect.TypeOf(&CertificateSigningRequestList{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_CertificateSigningRequestSpec, InType: reflect.TypeOf(&CertificateSigningRequestSpec{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_CertificateSigningRequestStatus, InType: reflect.TypeOf(&CertificateSigningRequestStatus{})}, ) } -func DeepCopy_v1alpha1_CertificateSigningRequest(in interface{}, out interface{}, c *conversion.Cloner) error { +func DeepCopy_v1beta1_CertificateSigningRequest(in interface{}, out interface{}, c *conversion.Cloner) error { { in := in.(*CertificateSigningRequest) out := out.(*CertificateSigningRequest) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { + return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) + } + if err := DeepCopy_v1beta1_CertificateSigningRequestSpec(&in.Spec, &out.Spec, c); err != nil { return err } - if err := DeepCopy_v1alpha1_CertificateSigningRequestSpec(&in.Spec, &out.Spec, c); err != nil { - return err - } - if err := DeepCopy_v1alpha1_CertificateSigningRequestStatus(&in.Status, &out.Status, c); err != nil { + if err := DeepCopy_v1beta1_CertificateSigningRequestStatus(&in.Status, &out.Status, c); err != nil { return err } return nil } } -func DeepCopy_v1alpha1_CertificateSigningRequestCondition(in interface{}, out interface{}, c *conversion.Cloner) error { +func DeepCopy_v1beta1_CertificateSigningRequestCondition(in interface{}, out interface{}, c *conversion.Cloner) error { { in := in.(*CertificateSigningRequestCondition) out := out.(*CertificateSigningRequestCondition) @@ -71,7 +73,7 @@ func DeepCopy_v1alpha1_CertificateSigningRequestCondition(in interface{}, out in } } -func DeepCopy_v1alpha1_CertificateSigningRequestList(in interface{}, out interface{}, c *conversion.Cloner) error { +func DeepCopy_v1beta1_CertificateSigningRequestList(in interface{}, out interface{}, c *conversion.Cloner) error { { in := in.(*CertificateSigningRequestList) out := out.(*CertificateSigningRequestList) @@ -80,7 +82,7 @@ func DeepCopy_v1alpha1_CertificateSigningRequestList(in interface{}, out interfa in, out := &in.Items, &out.Items *out = make([]CertificateSigningRequest, len(*in)) for i := range *in { - if err := DeepCopy_v1alpha1_CertificateSigningRequest(&(*in)[i], &(*out)[i], c); err != nil { + if err := DeepCopy_v1beta1_CertificateSigningRequest(&(*in)[i], &(*out)[i], c); err != nil { return err } } @@ -89,7 +91,7 @@ func DeepCopy_v1alpha1_CertificateSigningRequestList(in interface{}, out interfa } } -func DeepCopy_v1alpha1_CertificateSigningRequestSpec(in interface{}, out interface{}, c *conversion.Cloner) error { +func DeepCopy_v1beta1_CertificateSigningRequestSpec(in interface{}, out interface{}, c *conversion.Cloner) error { { in := in.(*CertificateSigningRequestSpec) out := out.(*CertificateSigningRequestSpec) @@ -102,9 +104,7 @@ func DeepCopy_v1alpha1_CertificateSigningRequestSpec(in interface{}, out interfa if in.Usages != nil { in, out := &in.Usages, &out.Usages *out = make([]KeyUsage, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.Groups != nil { in, out := &in.Groups, &out.Groups @@ -115,7 +115,7 @@ func DeepCopy_v1alpha1_CertificateSigningRequestSpec(in interface{}, out interfa } } -func DeepCopy_v1alpha1_CertificateSigningRequestStatus(in interface{}, out interface{}, c *conversion.Cloner) error { +func DeepCopy_v1beta1_CertificateSigningRequestStatus(in interface{}, out interface{}, c *conversion.Cloner) error { { in := in.(*CertificateSigningRequestStatus) out := out.(*CertificateSigningRequestStatus) @@ -124,7 +124,7 @@ func DeepCopy_v1alpha1_CertificateSigningRequestStatus(in interface{}, out inter in, out := &in.Conditions, &out.Conditions *out = make([]CertificateSigningRequestCondition, len(*in)) for i := range *in { - if err := DeepCopy_v1alpha1_CertificateSigningRequestCondition(&(*in)[i], &(*out)[i], c); err != nil { + if err := DeepCopy_v1beta1_CertificateSigningRequestCondition(&(*in)[i], &(*out)[i], c); err != nil { return err } } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/zz_generated.defaults.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1beta1/zz_generated.defaults.go similarity index 98% rename from vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/zz_generated.defaults.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1beta1/zz_generated.defaults.go index d3403d1d..3c5ae036 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/zz_generated.defaults.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/v1beta1/zz_generated.defaults.go @@ -18,7 +18,7 @@ limitations under the License. // This file was autogenerated by defaulter-gen. Do not edit it manually! -package v1alpha1 +package v1beta1 import ( runtime "k8s.io/apimachinery/pkg/runtime" diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/zz_generated.deepcopy.go index 810f3160..2372ca64 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/certificates/zz_generated.deepcopy.go @@ -21,9 +21,9 @@ limitations under the License. package certificates import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - api "k8s.io/client-go/pkg/api" reflect "reflect" ) @@ -48,8 +48,10 @@ func DeepCopy_certificates_CertificateSigningRequest(in interface{}, out interfa in := in.(*CertificateSigningRequest) out := out.(*CertificateSigningRequest) *out = *in - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_certificates_CertificateSigningRequestSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -102,9 +104,7 @@ func DeepCopy_certificates_CertificateSigningRequestSpec(in interface{}, out int if in.Usages != nil { in, out := &in.Usages, &out.Usages *out = make([]KeyUsage, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.Groups != nil { in, out := &in.Groups, &out.Groups diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/componentconfig/install/install.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/componentconfig/install/install.go index 38e9c02f..3861d6b5 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/componentconfig/install/install.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/componentconfig/install/install.go @@ -19,12 +19,20 @@ limitations under the License. package install import ( - "k8s.io/client-go/pkg/apimachinery/announced" + "k8s.io/apimachinery/pkg/apimachinery/announced" + "k8s.io/apimachinery/pkg/apimachinery/registered" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/client-go/pkg/api" "k8s.io/client-go/pkg/apis/componentconfig" "k8s.io/client-go/pkg/apis/componentconfig/v1alpha1" ) func init() { + Install(api.GroupFactoryRegistry, api.Registry, api.Scheme) +} + +// Install registers the API group and adds types to a scheme +func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) { if err := announced.NewGroupMetaFactory( &announced.GroupMetaFactoryArgs{ GroupName: componentconfig.GroupName, @@ -35,7 +43,7 @@ func init() { announced.VersionToSchemeFunc{ v1alpha1.SchemeGroupVersion.Version: v1alpha1.AddToScheme, }, - ).Announce().RegisterAndEnable(); err != nil { + ).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil { panic(err) } } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/componentconfig/types.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/componentconfig/types.go index 4bba16ba..70cf601b 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/componentconfig/types.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/componentconfig/types.go @@ -481,6 +481,9 @@ type KubeletConfiguration struct { // (binaries, etc.) to mount the volume are available on the underlying node. If the check is enabled // and fails the mount operation fails. ExperimentalCheckNodeCapabilitiesBeforeMount bool + // This flag, if set, instructs the kubelet to keep volumes from terminated pods mounted to the node. + // This can be useful for debugging volume related issues. + KeepTerminatedPodVolumes bool } type KubeletAuthorizationMode string @@ -561,8 +564,7 @@ type KubeSchedulerConfiguration struct { // kubeAPIBurst is the QPS burst to use while talking with kubernetes apiserver. KubeAPIBurst int32 // schedulerName is name of the scheduler, used to select which pods - // will be processed by this scheduler, based on pod's annotation with - // key 'scheduler.alpha.kubernetes.io/name'. + // will be processed by this scheduler, based on pod's "spec.SchedulerName". SchedulerName string // RequiredDuringScheduling affinity is not symmetric, but there is an implicit PreferredDuringScheduling affinity rule // corresponding to every RequiredDuringScheduling affinity rule. diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/componentconfig/v1alpha1/defaults.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/componentconfig/v1alpha1/defaults.go index ba67bd7f..bc2a5ef4 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/componentconfig/v1alpha1/defaults.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/componentconfig/v1alpha1/defaults.go @@ -277,7 +277,7 @@ func SetDefaults_KubeletConfiguration(obj *KubeletConfiguration) { obj.LowDiskSpaceThresholdMB = 256 } if obj.MasterServiceNamespace == "" { - obj.MasterServiceNamespace = api.NamespaceDefault + obj.MasterServiceNamespace = metav1.NamespaceDefault } if obj.MaxContainerCount == nil { temp := int32(-1) diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/componentconfig/v1alpha1/types.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/componentconfig/v1alpha1/types.go index 2b5281d9..4b2734c9 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/componentconfig/v1alpha1/types.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/componentconfig/v1alpha1/types.go @@ -122,8 +122,7 @@ type KubeSchedulerConfiguration struct { // kubeAPIBurst is the QPS burst to use while talking with kubernetes apiserver. KubeAPIBurst int `json:"kubeAPIBurst"` // schedulerName is name of the scheduler, used to select which pods - // will be processed by this scheduler, based on pod's annotation with - // key 'scheduler.alpha.kubernetes.io/name'. + // will be processed by this scheduler, based on pod's "spec.SchedulerName". SchedulerName string `json:"schedulerName"` // RequiredDuringScheduling affinity is not symmetric, but there is an implicit PreferredDuringScheduling affinity rule // corresponding to every RequiredDuringScheduling affinity rule. @@ -522,6 +521,9 @@ type KubeletConfiguration struct { // (binaries, etc.) to mount the volume are available on the underlying node. If the check is enabled // and fails the mount operation fails. ExperimentalCheckNodeCapabilitiesBeforeMount bool `json:"experimentalCheckNodeCapabilitiesBeforeMount,omitempty"` + // This flag, if set, instructs the kubelet to keep volumes from terminated pods mounted to the node. + // This can be useful for debugging volume related issues. + KeepTerminatedPodVolumes bool `json:"keepTerminatedPodVolumes,omitempty"` } type KubeletAuthorizationMode string diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/componentconfig/v1alpha1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/componentconfig/v1alpha1/zz_generated.conversion.go index faec669f..a413b81c 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/componentconfig/v1alpha1/zz_generated.conversion.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/componentconfig/v1alpha1/zz_generated.conversion.go @@ -481,6 +481,7 @@ func autoConvert_v1alpha1_KubeletConfiguration_To_componentconfig_KubeletConfigu out.EnableCRI = in.EnableCRI out.ExperimentalFailSwapOn = in.ExperimentalFailSwapOn out.ExperimentalCheckNodeCapabilitiesBeforeMount = in.ExperimentalCheckNodeCapabilitiesBeforeMount + out.KeepTerminatedPodVolumes = in.KeepTerminatedPodVolumes return nil } @@ -652,6 +653,7 @@ func autoConvert_componentconfig_KubeletConfiguration_To_v1alpha1_KubeletConfigu out.EnableCRI = in.EnableCRI out.ExperimentalFailSwapOn = in.ExperimentalFailSwapOn out.ExperimentalCheckNodeCapabilitiesBeforeMount = in.ExperimentalCheckNodeCapabilitiesBeforeMount + out.KeepTerminatedPodVolumes = in.KeepTerminatedPodVolumes return nil } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/componentconfig/v1alpha1/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/componentconfig/v1alpha1/zz_generated.deepcopy.go index b6a49818..b6b3cb62 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/componentconfig/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/componentconfig/v1alpha1/zz_generated.deepcopy.go @@ -257,9 +257,7 @@ func DeepCopy_v1alpha1_KubeletConfiguration(in interface{}, out interface{}, c * if in.RegisterWithTaints != nil { in, out := &in.RegisterWithTaints, &out.RegisterWithTaints *out = make([]v1.Taint, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.KubeAPIQPS != nil { in, out := &in.KubeAPIQPS, &out.KubeAPIQPS diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/componentconfig/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/componentconfig/zz_generated.deepcopy.go index a4151382..b50958f4 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/componentconfig/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/componentconfig/zz_generated.deepcopy.go @@ -197,9 +197,7 @@ func DeepCopy_componentconfig_KubeletConfiguration(in interface{}, out interface if in.RegisterWithTaints != nil { in, out := &in.RegisterWithTaints, &out.RegisterWithTaints *out = make([]api.Taint, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.NodeLabels != nil { in, out := &in.NodeLabels, &out.NodeLabels diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/extensions/install/install.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/extensions/install/install.go index 57c98b4b..1f968e86 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/extensions/install/install.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/extensions/install/install.go @@ -19,13 +19,21 @@ limitations under the License. package install import ( + "k8s.io/apimachinery/pkg/apimachinery/announced" + "k8s.io/apimachinery/pkg/apimachinery/registered" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/client-go/pkg/apimachinery/announced" + "k8s.io/client-go/pkg/api" "k8s.io/client-go/pkg/apis/extensions" "k8s.io/client-go/pkg/apis/extensions/v1beta1" ) func init() { + Install(api.GroupFactoryRegistry, api.Registry, api.Scheme) +} + +// Install registers the API group and adds types to a scheme +func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) { if err := announced.NewGroupMetaFactory( &announced.GroupMetaFactoryArgs{ GroupName: extensions.GroupName, @@ -37,7 +45,7 @@ func init() { announced.VersionToSchemeFunc{ v1beta1.SchemeGroupVersion.Version: v1beta1.AddToScheme, }, - ).Announce().RegisterAndEnable(); err != nil { + ).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil { panic(err) } } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/extensions/register.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/extensions/register.go index 97741e4d..ff51b4bc 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/extensions/register.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/extensions/register.go @@ -64,7 +64,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { &ThirdPartyResourceDataList{}, &Ingress{}, &IngressList{}, - &api.ListOptions{}, &api.DeleteOptions{}, &ReplicaSet{}, &ReplicaSetList{}, diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/extensions/types.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/extensions/types.go index 5e4c4ffa..86a488ee 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/extensions/types.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/extensions/types.go @@ -68,7 +68,7 @@ type Scale struct { metav1.TypeMeta // Standard object metadata; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata. // +optional - api.ObjectMeta + metav1.ObjectMeta // defines the behavior of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. // +optional @@ -117,7 +117,7 @@ type ThirdPartyResource struct { // Standard object metadata // +optional - api.ObjectMeta + metav1.ObjectMeta // Description is the description of this object. // +optional @@ -150,7 +150,7 @@ type ThirdPartyResourceData struct { metav1.TypeMeta // Standard object metadata. // +optional - api.ObjectMeta + metav1.ObjectMeta // Data is the raw JSON data for this data. // +optional @@ -162,7 +162,7 @@ type ThirdPartyResourceData struct { type Deployment struct { metav1.TypeMeta // +optional - api.ObjectMeta + metav1.ObjectMeta // Specification of the desired behavior of the Deployment. // +optional @@ -492,7 +492,7 @@ type DaemonSet struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - api.ObjectMeta + metav1.ObjectMeta // Spec defines the desired behavior of this daemon set. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -541,7 +541,7 @@ type Ingress struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - api.ObjectMeta + metav1.ObjectMeta // Spec is the desired state of the Ingress. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -702,7 +702,7 @@ type IngressBackend struct { type ReplicaSet struct { metav1.TypeMeta // +optional - api.ObjectMeta + metav1.ObjectMeta // Spec defines the desired behavior of this ReplicaSet. // +optional @@ -810,7 +810,7 @@ type ReplicaSetCondition struct { type PodSecurityPolicy struct { metav1.TypeMeta // +optional - api.ObjectMeta + metav1.ObjectMeta // Spec defines the policy enforced. // +optional @@ -1017,7 +1017,7 @@ type PodSecurityPolicyList struct { type NetworkPolicy struct { metav1.TypeMeta // +optional - api.ObjectMeta + metav1.ObjectMeta // Specification of the desired behavior for this NetworkPolicy. // +optional diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/extensions/v1beta1/generated.pb.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/extensions/v1beta1/generated.pb.go index c7570a35..5ec46798 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/extensions/v1beta1/generated.pb.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/extensions/v1beta1/generated.pb.go @@ -3780,7 +3780,7 @@ func (this *DaemonSet) String() string { return "nil" } s := strings.Join([]string{`&DaemonSet{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "DaemonSetSpec", "DaemonSetSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "DaemonSetStatus", "DaemonSetStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -3828,7 +3828,7 @@ func (this *Deployment) String() string { return "nil" } s := strings.Join([]string{`&Deployment{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "DeploymentSpec", "DeploymentSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "DeploymentStatus", "DeploymentStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -3965,7 +3965,7 @@ func (this *HorizontalPodAutoscaler) String() string { return "nil" } s := strings.Join([]string{`&HorizontalPodAutoscaler{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "HorizontalPodAutoscalerSpec", "HorizontalPodAutoscalerSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "HorizontalPodAutoscalerStatus", "HorizontalPodAutoscalerStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -4037,7 +4037,7 @@ func (this *Ingress) String() string { return "nil" } s := strings.Join([]string{`&Ingress{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "IngressSpec", "IngressSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "IngressStatus", "IngressStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -4125,7 +4125,7 @@ func (this *NetworkPolicy) String() string { return "nil" } s := strings.Join([]string{`&NetworkPolicy{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "NetworkPolicySpec", "NetworkPolicySpec", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -4191,7 +4191,7 @@ func (this *PodSecurityPolicy) String() string { return "nil" } s := strings.Join([]string{`&PodSecurityPolicy{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PodSecurityPolicySpec", "PodSecurityPolicySpec", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -4236,7 +4236,7 @@ func (this *ReplicaSet) String() string { return "nil" } s := strings.Join([]string{`&ReplicaSet{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ReplicaSetSpec", "ReplicaSetSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ReplicaSetStatus", "ReplicaSetStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -4353,7 +4353,7 @@ func (this *Scale) String() string { return "nil" } s := strings.Join([]string{`&Scale{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ScaleSpec", "ScaleSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ScaleStatus", "ScaleStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -4421,7 +4421,7 @@ func (this *ThirdPartyResource) String() string { return "nil" } s := strings.Join([]string{`&ThirdPartyResource{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Description:` + fmt.Sprintf("%v", this.Description) + `,`, `Versions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Versions), "APIVersion", "APIVersion", 1), `&`, ``, 1) + `,`, `}`, @@ -4433,7 +4433,7 @@ func (this *ThirdPartyResourceData) String() string { return "nil" } s := strings.Join([]string{`&ThirdPartyResourceData{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Data:` + valueToStringGenerated(this.Data) + `,`, `}`, }, "") @@ -12526,229 +12526,229 @@ var ( ) var fileDescriptorGenerated = []byte{ - // 3576 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe4, 0x5b, 0x4d, 0x6c, 0x1c, 0xc7, - 0x95, 0x56, 0xcf, 0x70, 0x44, 0xf2, 0x51, 0x24, 0xc5, 0x22, 0x4d, 0x8d, 0x69, 0x9b, 0x23, 0xb7, - 0xb1, 0xb6, 0xbc, 0xb0, 0x87, 0x2b, 0x79, 0xe5, 0xb5, 0x65, 0x5b, 0x36, 0x87, 0x14, 0x25, 0x7a, - 0x49, 0x69, 0x5c, 0x43, 0x6a, 0xbd, 0xfe, 0x45, 0x73, 0xa6, 0x38, 0x6c, 0xb1, 0xff, 0xdc, 0x5d, - 0x4d, 0x73, 0x6c, 0x04, 0x36, 0x10, 0xe4, 0xea, 0xf8, 0x96, 0x1c, 0x9c, 0x43, 0x0e, 0x41, 0x4e, - 0x31, 0x62, 0x20, 0x80, 0x91, 0x63, 0x0e, 0x41, 0x04, 0xe4, 0x07, 0x0e, 0x90, 0x20, 0x39, 0x18, - 0x93, 0x88, 0x41, 0x8c, 0xdc, 0x03, 0x5f, 0x94, 0x4b, 0x50, 0xd5, 0xd5, 0xbf, 0xd3, 0x3d, 0xe2, - 0x0c, 0x7f, 0x10, 0x20, 0x37, 0x4e, 0xd5, 0x7b, 0xdf, 0xfb, 0xa9, 0xea, 0xf7, 0x5e, 0x55, 0x3d, - 0xc2, 0x0b, 0xdb, 0xcf, 0x38, 0x65, 0xd5, 0x9c, 0xdb, 0x76, 0x37, 0x88, 0x6d, 0x10, 0x4a, 0x9c, - 0x39, 0x6b, 0xbb, 0x39, 0xa7, 0x58, 0xaa, 0x33, 0x47, 0x76, 0x29, 0x31, 0x1c, 0xd5, 0x34, 0x9c, - 0xb9, 0x9d, 0xf3, 0x1b, 0x84, 0x2a, 0xe7, 0xe7, 0x9a, 0xc4, 0x20, 0xb6, 0x42, 0x49, 0xa3, 0x6c, - 0xd9, 0x26, 0x35, 0xd1, 0x93, 0x1e, 0x7b, 0x39, 0x64, 0x2f, 0x5b, 0xdb, 0xcd, 0x32, 0x63, 0x2f, - 0x87, 0xec, 0x65, 0xc1, 0x3e, 0xf3, 0x64, 0x53, 0xa5, 0x5b, 0xee, 0x46, 0xb9, 0x6e, 0xea, 0x73, - 0x4d, 0xb3, 0x69, 0xce, 0x71, 0x94, 0x0d, 0x77, 0x93, 0xff, 0xe2, 0x3f, 0xf8, 0x5f, 0x1e, 0xfa, - 0xcc, 0x7f, 0x0b, 0xe5, 0x14, 0x4b, 0xd5, 0x95, 0xfa, 0x96, 0x6a, 0x10, 0xbb, 0x15, 0xaa, 0xa7, - 0x13, 0xaa, 0xcc, 0xed, 0x74, 0xe8, 0x34, 0x33, 0x97, 0xc5, 0x65, 0xbb, 0x06, 0x55, 0x75, 0xd2, - 0xc1, 0xf0, 0xf4, 0xbd, 0x18, 0x9c, 0xfa, 0x16, 0xd1, 0x95, 0x0e, 0xbe, 0x0b, 0x99, 0xbe, 0x9b, - 0xb3, 0x89, 0x63, 0xba, 0x76, 0xbd, 0x53, 0xd6, 0x13, 0xd9, 0x3c, 0x29, 0xa6, 0x9c, 0x4f, 0xa7, - 0x76, 0xa9, 0xaa, 0xcd, 0xa9, 0x06, 0x75, 0xa8, 0x9d, 0x64, 0x91, 0xcb, 0x00, 0xf3, 0xd5, 0xe5, - 0x9b, 0xc4, 0x66, 0x9e, 0x47, 0x67, 0x61, 0xc0, 0x50, 0x74, 0x52, 0x94, 0xce, 0x4a, 0xe7, 0x86, - 0x2b, 0xa7, 0x6e, 0xb7, 0x4b, 0x27, 0xf6, 0xda, 0xa5, 0x81, 0xeb, 0x8a, 0x4e, 0x30, 0x9f, 0x91, - 0xdf, 0x80, 0xa9, 0x85, 0xea, 0xfa, 0x9a, 0x62, 0x37, 0x09, 0x5d, 0xa7, 0xaa, 0xa6, 0xbe, 0xa7, - 0x50, 0xc6, 0xb9, 0x08, 0xa7, 0x29, 0x1f, 0xac, 0x12, 0xbb, 0x4e, 0x0c, 0xaa, 0x34, 0x3d, 0x94, - 0x42, 0xa5, 0x28, 0x50, 0x4e, 0xaf, 0x25, 0xe6, 0x71, 0x07, 0x87, 0xfc, 0x1d, 0x09, 0xee, 0x5f, - 0x70, 0x1d, 0x6a, 0xea, 0xab, 0x84, 0xda, 0x6a, 0x7d, 0xc1, 0xb5, 0x6d, 0x62, 0xd0, 0x1a, 0x55, - 0xa8, 0xeb, 0xdc, 0x5b, 0x3b, 0xf4, 0x2a, 0x14, 0x76, 0x14, 0xcd, 0x25, 0xc5, 0xdc, 0x59, 0xe9, - 0xdc, 0xc8, 0x85, 0x27, 0xca, 0x99, 0xfb, 0xad, 0xec, 0xbb, 0xbc, 0xfc, 0x8a, 0xab, 0x18, 0x54, - 0xa5, 0xad, 0xca, 0x94, 0x00, 0x3c, 0x25, 0xa4, 0xde, 0x64, 0x48, 0xd8, 0x03, 0x94, 0x3f, 0x92, - 0xe0, 0xa1, 0x4c, 0xcd, 0x56, 0x54, 0x87, 0x22, 0x1d, 0x0a, 0x2a, 0x25, 0xba, 0x53, 0x94, 0xce, - 0xe6, 0xcf, 0x8d, 0x5c, 0xb8, 0x56, 0xee, 0x69, 0xaf, 0x97, 0x33, 0xc1, 0x2b, 0xa3, 0x42, 0xaf, - 0xc2, 0x32, 0x83, 0xc7, 0x9e, 0x14, 0xf9, 0xdb, 0x12, 0xa0, 0x28, 0x8f, 0xe7, 0xdd, 0x7d, 0xf8, - 0xe8, 0xff, 0x0e, 0xe2, 0xa3, 0x49, 0x01, 0x38, 0xe2, 0x89, 0x8b, 0xb9, 0xe8, 0x43, 0x09, 0xa6, - 0x3b, 0x35, 0xe2, 0xbe, 0xd9, 0x8c, 0xfb, 0x66, 0xfe, 0x00, 0xbe, 0xf1, 0x50, 0x33, 0x9c, 0xf2, - 0xa3, 0x1c, 0x0c, 0x2f, 0x2a, 0x44, 0x37, 0x8d, 0x1a, 0xa1, 0xe8, 0x55, 0x18, 0x62, 0x1f, 0x7d, - 0x43, 0xa1, 0x0a, 0xf7, 0xc7, 0xc8, 0x85, 0x73, 0x5d, 0x8c, 0xdd, 0x39, 0x5f, 0xbe, 0xb1, 0x71, - 0x8b, 0xd4, 0xe9, 0x2a, 0xa1, 0x4a, 0x05, 0x09, 0x7c, 0x08, 0xc7, 0x70, 0x80, 0x86, 0xde, 0x82, - 0x01, 0xc7, 0x22, 0x75, 0xe1, 0xc2, 0xe7, 0x7b, 0x34, 0x27, 0xd0, 0xb0, 0x66, 0x91, 0x7a, 0xb8, - 0x46, 0xec, 0x17, 0xe6, 0xb8, 0x68, 0x13, 0x4e, 0x3a, 0x7c, 0xf1, 0x8b, 0x79, 0x2e, 0xe1, 0x72, - 0xdf, 0x12, 0xbc, 0x2d, 0x34, 0x26, 0x64, 0x9c, 0xf4, 0x7e, 0x63, 0x81, 0x2e, 0xff, 0x4a, 0x82, - 0xd1, 0x80, 0x96, 0xaf, 0xd4, 0x1b, 0x1d, 0x3e, 0x2b, 0xfb, 0xb2, 0xa3, 0xf1, 0x2e, 0x94, 0xce, - 0xa8, 0x99, 0xef, 0x18, 0x37, 0xf7, 0xdc, 0x69, 0x21, 0x6b, 0xc8, 0x1f, 0x89, 0xf8, 0xed, 0x4d, - 0x7f, 0x1f, 0xe4, 0xf8, 0x3e, 0x78, 0xa6, 0x5f, 0xb3, 0x32, 0x96, 0xff, 0x97, 0x51, 0x73, 0x98, - 0x3b, 0xd1, 0x9b, 0x30, 0xe4, 0x10, 0x8d, 0xd4, 0xa9, 0x69, 0x0b, 0x73, 0x9e, 0xda, 0xa7, 0x39, - 0xca, 0x06, 0xd1, 0x6a, 0x82, 0xb5, 0x72, 0x8a, 0xd9, 0xe3, 0xff, 0xc2, 0x01, 0x24, 0x7a, 0x1d, - 0x86, 0x28, 0xd1, 0x2d, 0x4d, 0xa1, 0xfe, 0xe7, 0xf4, 0x64, 0xf7, 0x1d, 0x56, 0x35, 0x1b, 0x6b, - 0x82, 0x81, 0x2f, 0x7e, 0xe0, 0x2c, 0x7f, 0x14, 0x07, 0x80, 0xf2, 0xc7, 0x79, 0x18, 0x4f, 0x2c, - 0x24, 0xba, 0x09, 0xd3, 0x75, 0x2f, 0x38, 0x5c, 0x77, 0xf5, 0x0d, 0x62, 0xd7, 0xea, 0x5b, 0xa4, - 0xe1, 0x6a, 0xa4, 0x21, 0x82, 0xed, 0xac, 0xc0, 0x9b, 0x5e, 0x48, 0xa5, 0xc2, 0x19, 0xdc, 0xe8, - 0x65, 0x40, 0x06, 0x1f, 0x5a, 0x55, 0x1d, 0x27, 0xc0, 0xcc, 0x71, 0xcc, 0x19, 0x81, 0x89, 0xae, - 0x77, 0x50, 0xe0, 0x14, 0x2e, 0xa6, 0x63, 0x83, 0x38, 0xaa, 0x4d, 0x1a, 0x49, 0x1d, 0xf3, 0x71, - 0x1d, 0x17, 0x53, 0xa9, 0x70, 0x06, 0x37, 0xba, 0x08, 0x23, 0x9e, 0x34, 0x4c, 0x94, 0x46, 0xab, - 0x38, 0xc0, 0xc1, 0x82, 0x80, 0x74, 0x3d, 0x9c, 0xc2, 0x51, 0x3a, 0x66, 0x9a, 0xb9, 0xe1, 0x10, - 0x7b, 0x87, 0x34, 0xae, 0x7a, 0xc9, 0x4f, 0x35, 0x8d, 0x62, 0xe1, 0xac, 0x74, 0x2e, 0x1f, 0x9a, - 0x76, 0xa3, 0x83, 0x02, 0xa7, 0x70, 0xc9, 0x3f, 0xce, 0x01, 0x2c, 0x12, 0x4b, 0x33, 0x5b, 0x3a, - 0x31, 0x8e, 0x32, 0xc0, 0xbc, 0x1d, 0x0b, 0x30, 0x2f, 0xf4, 0xfa, 0x9d, 0x04, 0x2a, 0x66, 0x46, - 0x98, 0x66, 0x22, 0xc2, 0xbc, 0xd8, 0xbf, 0x88, 0xee, 0x21, 0xe6, 0x4e, 0x1e, 0x26, 0x43, 0xe2, - 0x05, 0xd3, 0x68, 0xa8, 0xbc, 0x60, 0x78, 0x0e, 0x06, 0x68, 0xcb, 0xf2, 0x13, 0xd5, 0x63, 0xbe, - 0x8a, 0x6b, 0x2d, 0x8b, 0xdc, 0x6d, 0x97, 0xce, 0xa4, 0xb0, 0xb0, 0x29, 0xcc, 0x99, 0xd0, 0xcd, - 0x40, 0xfb, 0x1c, 0x67, 0xbf, 0x1c, 0x17, 0x7e, 0xb7, 0x5d, 0xea, 0x5a, 0x38, 0x95, 0x03, 0xcc, - 0xb8, 0xb2, 0xe8, 0x51, 0x38, 0x69, 0x13, 0xc5, 0x31, 0x0d, 0xbe, 0xbb, 0x86, 0x43, 0xa3, 0x30, - 0x1f, 0xc5, 0x62, 0x16, 0x3d, 0x0e, 0x83, 0x3a, 0x71, 0x1c, 0x56, 0xe4, 0x14, 0x38, 0xe1, 0xb8, - 0x20, 0x1c, 0x5c, 0xf5, 0x86, 0xb1, 0x3f, 0x8f, 0x6e, 0xc1, 0x98, 0xa6, 0x38, 0x74, 0xdd, 0x6a, - 0x28, 0x94, 0xac, 0xa9, 0x3a, 0x29, 0x9e, 0xe4, 0x0e, 0xff, 0xcf, 0xfd, 0xc5, 0x21, 0xc6, 0x51, - 0x99, 0x16, 0xe8, 0x63, 0x2b, 0x31, 0x24, 0x9c, 0x40, 0x46, 0x3b, 0x80, 0xd8, 0xc8, 0x9a, 0xad, - 0x18, 0x8e, 0xe7, 0x32, 0x26, 0x6f, 0xb0, 0x67, 0x79, 0xc1, 0x67, 0xb1, 0xd2, 0x81, 0x86, 0x53, - 0x24, 0xc8, 0xbf, 0x91, 0x60, 0x2c, 0x5c, 0xb0, 0x63, 0xc8, 0x23, 0x6f, 0xc5, 0xf3, 0xc8, 0xb3, - 0x7d, 0x6f, 0xde, 0x8c, 0x44, 0xf2, 0xdd, 0x3c, 0xa0, 0x90, 0x08, 0x9b, 0x9a, 0xb6, 0xa1, 0xd4, - 0xb7, 0xf7, 0x51, 0x5c, 0xfd, 0x40, 0x02, 0xe4, 0xf2, 0x05, 0x69, 0xcc, 0x1b, 0x86, 0x49, 0x79, - 0xd8, 0xf0, 0xd5, 0xfc, 0xff, 0xbe, 0xd5, 0xf4, 0x35, 0x28, 0xaf, 0x77, 0x60, 0x5f, 0x31, 0xa8, - 0xdd, 0x0a, 0x57, 0xac, 0x93, 0x00, 0xa7, 0x28, 0x84, 0xde, 0x01, 0xb0, 0x05, 0xe6, 0x9a, 0x29, - 0x42, 0x40, 0xaf, 0x51, 0xc6, 0x57, 0x6a, 0xc1, 0x34, 0x36, 0xd5, 0x66, 0x18, 0xd0, 0x70, 0x00, - 0x8c, 0x23, 0x42, 0x66, 0xae, 0xc0, 0x99, 0x0c, 0xed, 0xd1, 0x69, 0xc8, 0x6f, 0x93, 0x96, 0xe7, - 0x56, 0xcc, 0xfe, 0x44, 0x53, 0xd1, 0x22, 0x75, 0x58, 0x54, 0x98, 0x97, 0x72, 0xcf, 0x48, 0xf2, - 0x57, 0x85, 0xe8, 0x5e, 0xe3, 0x49, 0xfe, 0x1c, 0x0c, 0xd9, 0xc4, 0xd2, 0xd4, 0xba, 0xe2, 0x88, - 0x34, 0xc8, 0xf3, 0x35, 0x16, 0x63, 0x38, 0x98, 0x8d, 0x95, 0x03, 0xb9, 0xa3, 0x2d, 0x07, 0xf2, - 0x87, 0x5c, 0x0e, 0x20, 0x13, 0x86, 0x1c, 0xca, 0x8e, 0x6e, 0x4d, 0x2f, 0xf7, 0xf5, 0x5e, 0x46, - 0x47, 0x63, 0xb6, 0x07, 0x14, 0x0a, 0xf4, 0x47, 0x70, 0x20, 0x04, 0xcd, 0xc3, 0xb8, 0xae, 0x1a, - 0x3c, 0x89, 0xd6, 0x48, 0xdd, 0x34, 0x1a, 0x0e, 0x0f, 0x76, 0x85, 0xca, 0x19, 0xc1, 0x34, 0xbe, - 0x1a, 0x9f, 0xc6, 0x49, 0x7a, 0xb4, 0x02, 0x53, 0x36, 0xd9, 0x51, 0x99, 0x1a, 0xd7, 0x54, 0x87, - 0x9a, 0x76, 0x6b, 0x45, 0xd5, 0x55, 0xca, 0x43, 0x60, 0xa1, 0x52, 0xdc, 0x6b, 0x97, 0xa6, 0x70, - 0xca, 0x3c, 0x4e, 0xe5, 0x62, 0xd1, 0xd9, 0x52, 0x5c, 0x87, 0x34, 0x78, 0x48, 0x1b, 0x0a, 0xa3, - 0x73, 0x95, 0x8f, 0x62, 0x31, 0x8b, 0xf4, 0xd8, 0xe6, 0x1e, 0x3a, 0x8c, 0xcd, 0x3d, 0x96, 0xbd, - 0xb1, 0xd1, 0x3a, 0x9c, 0xb1, 0x6c, 0xb3, 0x69, 0x13, 0xc7, 0x59, 0x24, 0x4a, 0x43, 0x53, 0x0d, - 0xe2, 0xfb, 0x6b, 0x98, 0xdb, 0xf9, 0xc0, 0x5e, 0xbb, 0x74, 0xa6, 0x9a, 0x4e, 0x82, 0xb3, 0x78, - 0xe5, 0x4f, 0x06, 0xe0, 0x74, 0x32, 0xcb, 0x66, 0x14, 0x33, 0x52, 0x3f, 0xc5, 0x0c, 0x7a, 0x22, - 0xf2, 0xd9, 0x78, 0x95, 0x5e, 0xb0, 0x1b, 0x52, 0x3e, 0x9d, 0x79, 0x18, 0x17, 0x71, 0xc4, 0x9f, - 0x14, 0xe5, 0x5c, 0xb0, 0x1b, 0xd6, 0xe3, 0xd3, 0x38, 0x49, 0x8f, 0xae, 0xc2, 0x84, 0xb2, 0xa3, - 0xa8, 0x9a, 0xb2, 0xa1, 0x91, 0x00, 0xc4, 0x2b, 0xe3, 0xee, 0x17, 0x20, 0x13, 0xf3, 0x49, 0x02, - 0xdc, 0xc9, 0x83, 0x56, 0x61, 0xd2, 0x35, 0x3a, 0xa1, 0xbc, 0xdd, 0xf9, 0x80, 0x80, 0x9a, 0x5c, - 0xef, 0x24, 0xc1, 0x69, 0x7c, 0x68, 0x07, 0xa0, 0xee, 0x17, 0x04, 0x4e, 0xf1, 0x24, 0x8f, 0xd5, - 0x95, 0xbe, 0xbf, 0xad, 0xa0, 0xb6, 0x08, 0x23, 0x62, 0x30, 0xe4, 0xe0, 0x88, 0x24, 0xf4, 0x1c, - 0x8c, 0xda, 0xbc, 0x5e, 0xf5, 0x0d, 0x18, 0xe4, 0x06, 0xdc, 0x27, 0xd8, 0x46, 0x71, 0x74, 0x12, - 0xc7, 0x69, 0xe5, 0xdf, 0x4a, 0xd1, 0x14, 0xe5, 0x7f, 0xbe, 0xe8, 0x52, 0xac, 0xac, 0x7a, 0x34, - 0x51, 0x56, 0x4d, 0x77, 0x72, 0x44, 0xaa, 0xaa, 0x0f, 0x60, 0x94, 0x6d, 0x6b, 0xd5, 0x68, 0x7a, - 0x4b, 0x29, 0x42, 0xe4, 0x52, 0x1f, 0x9f, 0x4e, 0x80, 0x11, 0x49, 0xb5, 0x13, 0xdc, 0xa6, 0xe8, - 0x24, 0x8e, 0xcb, 0x93, 0x3f, 0x93, 0x60, 0x7a, 0xa9, 0x76, 0xd5, 0x36, 0x5d, 0xcb, 0x57, 0xef, - 0x86, 0xe5, 0xf9, 0xea, 0x7f, 0x60, 0xc0, 0x76, 0x35, 0xdf, 0xae, 0x47, 0x7c, 0xbb, 0xb0, 0xab, - 0x31, 0xbb, 0x26, 0x13, 0x5c, 0x9e, 0x51, 0x8c, 0x01, 0xbd, 0x05, 0x27, 0x6d, 0xc5, 0x68, 0x12, - 0x3f, 0x09, 0x3f, 0xdd, 0xa3, 0x35, 0xcb, 0x8b, 0x98, 0xb1, 0x47, 0x4a, 0x41, 0x8e, 0x86, 0x05, - 0xaa, 0xfc, 0x3d, 0x09, 0xc6, 0xaf, 0xad, 0xad, 0x55, 0x97, 0x0d, 0xfe, 0x15, 0x57, 0x15, 0xba, - 0xc5, 0xea, 0x04, 0x4b, 0xa1, 0x5b, 0xc9, 0x3a, 0x81, 0xcd, 0x61, 0x3e, 0x83, 0xb6, 0x60, 0x90, - 0x45, 0x0f, 0x62, 0x34, 0xfa, 0x2c, 0xf1, 0x85, 0xb8, 0x8a, 0x07, 0x12, 0xd6, 0x9f, 0x62, 0x00, - 0xfb, 0xf0, 0xf2, 0xfb, 0x30, 0x15, 0x51, 0x8f, 0xf9, 0x8b, 0x5f, 0xda, 0xa0, 0x3a, 0x14, 0x98, - 0x26, 0xfe, 0x95, 0x4c, 0xaf, 0x37, 0x0c, 0x09, 0x93, 0xc3, 0x3a, 0x8a, 0xfd, 0x72, 0xb0, 0x87, - 0x2d, 0xff, 0x21, 0x07, 0x67, 0xae, 0x99, 0xb6, 0xfa, 0x9e, 0x69, 0x50, 0x45, 0xab, 0x9a, 0x8d, - 0x79, 0x97, 0x9a, 0x4e, 0x5d, 0xd1, 0x88, 0x7d, 0x84, 0x87, 0x27, 0x2d, 0x76, 0x78, 0x7a, 0xb9, - 0x57, 0xcb, 0xd2, 0xf5, 0xcd, 0x3c, 0x49, 0xd1, 0xc4, 0x49, 0x6a, 0xe5, 0x90, 0xe4, 0x75, 0x3f, - 0x56, 0xfd, 0x4d, 0x82, 0x07, 0x32, 0x38, 0x8f, 0xa1, 0xfe, 0xde, 0x8e, 0xd7, 0xdf, 0x4b, 0x87, - 0x63, 0x72, 0x46, 0x31, 0xfe, 0x8f, 0x5c, 0xa6, 0xa9, 0xbc, 0xfc, 0x7b, 0x07, 0x86, 0xf8, 0x2f, - 0x4c, 0x36, 0x85, 0xa9, 0x0b, 0x3d, 0xea, 0x53, 0x73, 0x37, 0xfc, 0xab, 0x4e, 0x4c, 0x36, 0x89, - 0x4d, 0x8c, 0x3a, 0x89, 0x94, 0x46, 0x02, 0x1c, 0x07, 0x62, 0xd0, 0x79, 0x18, 0xe1, 0xa5, 0x4e, - 0x2c, 0x7b, 0x8e, 0xef, 0xb5, 0x4b, 0x23, 0xab, 0xe1, 0x30, 0x8e, 0xd2, 0xa0, 0x8b, 0x30, 0xa2, - 0x2b, 0xbb, 0x89, 0xdc, 0x19, 0xdc, 0x5e, 0xac, 0x86, 0x53, 0x38, 0x4a, 0x87, 0x3e, 0x80, 0xb1, - 0xba, 0xe5, 0x46, 0x6e, 0xda, 0x45, 0xed, 0xd7, 0xab, 0x89, 0x69, 0x97, 0xf6, 0x15, 0xc4, 0xce, - 0x94, 0x0b, 0xd5, 0xf5, 0xc8, 0x18, 0x4e, 0x88, 0x93, 0x7f, 0x96, 0x87, 0x87, 0xba, 0x6e, 0x51, - 0xb4, 0xd4, 0xa5, 0x26, 0x99, 0xee, 0xa1, 0x1e, 0xa9, 0xc3, 0x28, 0x3b, 0x5b, 0x72, 0x77, 0xf3, - 0x83, 0x6b, 0xae, 0xe7, 0x83, 0x2b, 0x4f, 0x31, 0x2b, 0x51, 0x10, 0x1c, 0xc7, 0x64, 0x65, 0x8c, - 0xb8, 0x02, 0xcb, 0x2a, 0x63, 0x16, 0xe2, 0xd3, 0x38, 0x49, 0xcf, 0x20, 0xc4, 0x0d, 0x55, 0xa2, - 0x88, 0x09, 0x20, 0x16, 0xe3, 0xd3, 0x38, 0x49, 0x8f, 0x74, 0x28, 0x09, 0xd4, 0xb8, 0xf7, 0x23, - 0x8f, 0x27, 0x5e, 0x31, 0xf3, 0xc8, 0x5e, 0xbb, 0x54, 0x5a, 0xe8, 0x4e, 0x8a, 0xef, 0x85, 0x25, - 0xaf, 0xc2, 0xe8, 0x35, 0xd3, 0xa1, 0x55, 0xd3, 0xa6, 0x3c, 0x7b, 0xa1, 0x87, 0x20, 0xaf, 0xab, - 0x86, 0x38, 0x2c, 0x8d, 0x08, 0xb5, 0xf3, 0x6c, 0xef, 0xb2, 0x71, 0x3e, 0xad, 0xec, 0x8a, 0x6d, - 0x1d, 0x4e, 0x2b, 0xbb, 0x98, 0x8d, 0xcb, 0x57, 0x61, 0x50, 0x64, 0xc5, 0x28, 0x50, 0xbe, 0x3b, - 0x50, 0x3e, 0x05, 0xe8, 0x87, 0x39, 0x18, 0x14, 0x49, 0xe4, 0x08, 0xd3, 0xc1, 0x1b, 0xb1, 0x74, - 0x70, 0xa9, 0xbf, 0x44, 0x9b, 0x19, 0xfe, 0x1b, 0x89, 0xf0, 0xff, 0x7c, 0x9f, 0xf8, 0xdd, 0xc3, - 0xfd, 0xa7, 0x12, 0x8c, 0xc5, 0x53, 0x3e, 0x0b, 0x28, 0xec, 0x13, 0x52, 0xeb, 0xe4, 0x7a, 0x78, - 0x27, 0x11, 0x04, 0x94, 0x5a, 0x38, 0x85, 0xa3, 0x74, 0x88, 0x04, 0x6c, 0x6c, 0x3b, 0x08, 0xa7, - 0x94, 0x33, 0x94, 0x76, 0xa9, 0xaa, 0x95, 0xbd, 0x97, 0xc3, 0xf2, 0xb2, 0x41, 0x6f, 0xd8, 0x35, - 0x6a, 0xab, 0x46, 0xb3, 0x43, 0x0c, 0xdf, 0x59, 0x51, 0x5c, 0xf9, 0xb6, 0x04, 0x23, 0x42, 0xe1, - 0x63, 0xc8, 0x47, 0xaf, 0xc7, 0xf3, 0xd1, 0xd3, 0x7d, 0x16, 0x53, 0xe9, 0xf9, 0xe7, 0xf3, 0xd0, - 0x14, 0x56, 0x3e, 0xb1, 0xea, 0x6e, 0xcb, 0x74, 0x68, 0xb2, 0xba, 0x63, 0x5f, 0x18, 0xe6, 0x33, - 0xe8, 0x5b, 0x12, 0x9c, 0x56, 0x13, 0x05, 0x97, 0xf0, 0xf4, 0x8b, 0xfd, 0xa9, 0x16, 0xc0, 0x84, - 0xcf, 0xa9, 0xc9, 0x19, 0xdc, 0x21, 0x52, 0x76, 0xa1, 0x83, 0x0a, 0x29, 0x30, 0xb0, 0x45, 0xa9, - 0xd5, 0x67, 0xa6, 0x4c, 0x2b, 0x25, 0x2b, 0x43, 0xdc, 0xfc, 0xb5, 0xb5, 0x2a, 0xe6, 0xd0, 0xf2, - 0xa7, 0xb9, 0xc0, 0x61, 0x35, 0xef, 0x13, 0x09, 0x8a, 0x5d, 0xe9, 0x30, 0x8a, 0xdd, 0x91, 0xb4, - 0x42, 0x17, 0xbd, 0x0a, 0x79, 0xaa, 0xf5, 0x7b, 0x23, 0x28, 0x24, 0xac, 0xad, 0xd4, 0xc2, 0x30, - 0xb5, 0xb6, 0x52, 0xc3, 0x0c, 0x12, 0xbd, 0x0d, 0x05, 0x76, 0x94, 0x60, 0x5f, 0x78, 0xbe, 0xff, - 0x08, 0xc2, 0xfc, 0x15, 0xee, 0x30, 0xf6, 0xcb, 0xc1, 0x1e, 0xae, 0xfc, 0x3e, 0x8c, 0xc6, 0xc2, - 0x00, 0xba, 0x05, 0xa7, 0x34, 0x53, 0x69, 0x54, 0x14, 0x4d, 0x31, 0xea, 0xc4, 0x7f, 0xba, 0xfa, - 0xaf, 0xee, 0x01, 0x71, 0x25, 0xc2, 0x21, 0xc2, 0x49, 0xf0, 0xa4, 0x1d, 0x9d, 0xc3, 0x31, 0x6c, - 0x59, 0x01, 0x08, 0xad, 0x47, 0x25, 0x28, 0xb0, 0x2d, 0xec, 0x1d, 0x0b, 0x86, 0x2b, 0xc3, 0x4c, - 0x57, 0xb6, 0xb3, 0x1d, 0xec, 0x8d, 0xa3, 0x0b, 0x00, 0x0e, 0xa9, 0xdb, 0x84, 0xf2, 0xa8, 0xe3, - 0x5d, 0xbf, 0x07, 0xf1, 0xb7, 0x16, 0xcc, 0xe0, 0x08, 0x95, 0xfc, 0x6b, 0x09, 0x46, 0xaf, 0x13, - 0xfa, 0xae, 0x69, 0x6f, 0x57, 0x4d, 0x4d, 0xad, 0xb7, 0x8e, 0x30, 0xda, 0x6f, 0xc4, 0xa2, 0xfd, - 0x4b, 0x3d, 0xae, 0x55, 0x4c, 0xcb, 0xac, 0x98, 0x2f, 0xff, 0x55, 0x82, 0x62, 0x8c, 0x32, 0x1a, - 0x1e, 0x08, 0x14, 0x2c, 0xd3, 0xa6, 0xfe, 0xc1, 0xea, 0x40, 0x1a, 0xb0, 0x50, 0x1a, 0x39, 0x5a, - 0x31, 0x58, 0xec, 0xa1, 0x33, 0x3b, 0x37, 0x6d, 0x53, 0x17, 0xfb, 0xfd, 0x60, 0x52, 0x08, 0xb1, - 0x43, 0x3b, 0x97, 0x6c, 0x53, 0xc7, 0x1c, 0x5b, 0xfe, 0x9d, 0x04, 0x13, 0x31, 0xca, 0x63, 0x08, - 0xe5, 0x4a, 0x3c, 0x94, 0x3f, 0x7f, 0x10, 0xc3, 0x32, 0x02, 0xfa, 0xd7, 0x49, 0xb3, 0x98, 0x03, - 0xd0, 0x26, 0x8c, 0x58, 0x66, 0xa3, 0x76, 0x08, 0xaf, 0xc5, 0xfc, 0x20, 0x50, 0x0d, 0xb1, 0x70, - 0x14, 0x18, 0xed, 0xc2, 0x84, 0xa1, 0xe8, 0xc4, 0xb1, 0x94, 0x3a, 0xa9, 0x1d, 0xc2, 0x65, 0xf4, - 0x7d, 0x7b, 0xed, 0xd2, 0xc4, 0xf5, 0x24, 0x22, 0xee, 0x14, 0x22, 0xff, 0xa4, 0xc3, 0x6e, 0xd3, - 0xa6, 0xe8, 0x15, 0x18, 0xe2, 0xad, 0x40, 0x75, 0x53, 0x13, 0x29, 0xed, 0x22, 0x5b, 0x9a, 0xaa, - 0x18, 0xbb, 0xdb, 0x2e, 0xfd, 0x47, 0xd7, 0xb7, 0x34, 0x9f, 0x10, 0x07, 0x30, 0x68, 0x05, 0x06, - 0xac, 0xfe, 0x8b, 0x0b, 0x9e, 0x4e, 0x78, 0x45, 0xc1, 0x51, 0xe4, 0xbf, 0x27, 0xd5, 0xe6, 0x49, - 0xe5, 0xd6, 0xa1, 0x2d, 0x57, 0x50, 0xcc, 0x64, 0x2e, 0x99, 0x0d, 0x83, 0x22, 0xb7, 0x8a, 0x5d, - 0x79, 0xf5, 0x20, 0xbb, 0x32, 0x9a, 0x0f, 0x82, 0x7b, 0x1b, 0x7f, 0xd0, 0x17, 0x24, 0xff, 0x5e, - 0x82, 0x09, 0xae, 0x50, 0xdd, 0xb5, 0x55, 0xda, 0x3a, 0xf2, 0xb8, 0xb9, 0x19, 0x8b, 0x9b, 0x8b, - 0x3d, 0x1a, 0xd8, 0xa1, 0x69, 0x66, 0xec, 0xfc, 0x52, 0x82, 0xfb, 0x3a, 0xa8, 0x8f, 0x21, 0xae, - 0x90, 0x78, 0x5c, 0x79, 0xe9, 0xa0, 0x06, 0x66, 0xc4, 0x96, 0xdb, 0x90, 0x62, 0x1e, 0xdf, 0xb0, - 0x17, 0x00, 0x2c, 0x5b, 0xdd, 0x51, 0x35, 0xd2, 0x14, 0xed, 0x1a, 0x43, 0xe1, 0x92, 0x54, 0x83, - 0x19, 0x1c, 0xa1, 0x42, 0xdf, 0x80, 0xe9, 0x06, 0xd9, 0x54, 0x5c, 0x8d, 0xce, 0x37, 0x1a, 0x0b, - 0x8a, 0xa5, 0x6c, 0xa8, 0x9a, 0x4a, 0x55, 0x71, 0x99, 0x39, 0x5c, 0xb9, 0xe2, 0xb5, 0x51, 0xa4, - 0x51, 0xdc, 0x6d, 0x97, 0x1e, 0xeb, 0xfe, 0x06, 0xee, 0x13, 0xb7, 0x70, 0x86, 0x10, 0xf4, 0x4d, - 0x09, 0x8a, 0x36, 0x79, 0xc7, 0x65, 0x67, 0xd7, 0x45, 0xdb, 0xb4, 0x62, 0x1a, 0xe4, 0xb9, 0x06, - 0x57, 0xf7, 0xda, 0xa5, 0x22, 0xce, 0xa0, 0xe9, 0x45, 0x87, 0x4c, 0x41, 0x88, 0xc2, 0xa4, 0xa2, - 0x69, 0xe6, 0xbb, 0x24, 0xee, 0x81, 0x01, 0x2e, 0xbf, 0xb2, 0xd7, 0x2e, 0x4d, 0xce, 0x77, 0x4e, - 0xf7, 0x22, 0x3a, 0x0d, 0x1e, 0xcd, 0xc1, 0xe0, 0x8e, 0xa9, 0xb9, 0x3a, 0x71, 0x8a, 0x05, 0x2e, - 0x89, 0xc5, 0xd9, 0xc1, 0x9b, 0xde, 0xd0, 0xdd, 0x76, 0xe9, 0xe4, 0x52, 0x8d, 0xdf, 0x32, 0xfb, - 0x54, 0xec, 0x3c, 0xc6, 0x2a, 0x24, 0xf1, 0xa9, 0xf3, 0x27, 0xae, 0xa1, 0x30, 0xb6, 0x5c, 0x0b, - 0xa7, 0x70, 0x94, 0x0e, 0xe9, 0x30, 0xbc, 0x25, 0xce, 0xe6, 0x4e, 0x71, 0xb0, 0xaf, 0x9c, 0x17, - 0x3b, 0xdb, 0x57, 0x26, 0x84, 0xc8, 0x61, 0x7f, 0xd8, 0xc1, 0xa1, 0x04, 0xf4, 0x38, 0x0c, 0xf2, - 0x1f, 0xcb, 0x8b, 0xfc, 0x61, 0x6c, 0x28, 0x8c, 0x40, 0xd7, 0xbc, 0x61, 0xec, 0xcf, 0xfb, 0xa4, - 0xcb, 0xd5, 0x05, 0xfe, 0x8e, 0x95, 0x20, 0x5d, 0xae, 0x2e, 0x60, 0x7f, 0x1e, 0x59, 0x30, 0xe8, - 0x90, 0x15, 0xd5, 0x70, 0x77, 0x8b, 0xc0, 0xbf, 0xdc, 0x2b, 0xbd, 0xde, 0xc0, 0x5d, 0xe1, 0xdc, - 0x89, 0x5b, 0xff, 0x50, 0xa2, 0x98, 0xc7, 0xbe, 0x18, 0xb4, 0x0b, 0xc3, 0xb6, 0x6b, 0xcc, 0x3b, - 0xeb, 0x0e, 0xb1, 0x8b, 0x23, 0x5c, 0x66, 0xaf, 0x41, 0x19, 0xfb, 0xfc, 0x49, 0xa9, 0x81, 0x07, - 0x03, 0x0a, 0x1c, 0x0a, 0x43, 0x9f, 0x48, 0x80, 0x1c, 0xd7, 0xb2, 0x34, 0xa2, 0x13, 0x83, 0x2a, - 0x1a, 0x7f, 0x78, 0x70, 0x8a, 0xa7, 0xb8, 0x0e, 0xd5, 0x9e, 0x6f, 0x1e, 0x93, 0x40, 0x49, 0x65, - 0x82, 0x57, 0xbd, 0x4e, 0x52, 0x9c, 0xa2, 0x07, 0x5b, 0x8a, 0x4d, 0x87, 0xff, 0x5d, 0x1c, 0xed, - 0x6b, 0x29, 0xd2, 0x1f, 0x60, 0xc2, 0xa5, 0x10, 0xf3, 0xd8, 0x17, 0x83, 0x6e, 0xc2, 0xb4, 0x4d, - 0x94, 0xc6, 0x0d, 0x43, 0x6b, 0x61, 0xd3, 0xa4, 0x4b, 0xaa, 0x46, 0x9c, 0x96, 0x43, 0x89, 0x5e, - 0x1c, 0xe3, 0xdb, 0x26, 0xe8, 0xf7, 0xc2, 0xa9, 0x54, 0x38, 0x83, 0x9b, 0x37, 0x5b, 0x89, 0x1b, - 0xb3, 0xa3, 0xed, 0xe6, 0x3c, 0x58, 0xb3, 0x55, 0xa8, 0xe2, 0x91, 0x35, 0x5b, 0x45, 0x44, 0x74, - 0xbf, 0x26, 0xfa, 0x3a, 0x07, 0x93, 0x21, 0xf1, 0xbe, 0x9b, 0xad, 0x52, 0x58, 0x8e, 0xa1, 0xd9, - 0x2a, 0xbd, 0x5b, 0x29, 0x7f, 0xd4, 0xdd, 0x4a, 0x47, 0xd0, 0xe4, 0xc5, 0x1b, 0xa0, 0x42, 0x27, - 0xfe, 0xeb, 0x37, 0x40, 0x85, 0xba, 0x66, 0x94, 0x31, 0x3f, 0xcd, 0x45, 0x0d, 0xfa, 0x37, 0xea, - 0xb2, 0x49, 0x69, 0x7a, 0x19, 0xe8, 0xad, 0xe9, 0x45, 0xfe, 0x32, 0x0f, 0xa7, 0x93, 0x5f, 0x6c, - 0xac, 0xd9, 0x42, 0xba, 0x67, 0xb3, 0x45, 0x15, 0xa6, 0x36, 0x5d, 0x4d, 0x6b, 0x71, 0x87, 0x44, - 0xde, 0x19, 0xbc, 0x1b, 0xf9, 0x07, 0x05, 0xe7, 0xd4, 0x52, 0x0a, 0x0d, 0x4e, 0xe5, 0xcc, 0x68, - 0x1c, 0xc9, 0xf7, 0xd5, 0x38, 0xd2, 0xd1, 0xb7, 0x30, 0xb0, 0xff, 0xbe, 0x85, 0xf4, 0x26, 0x90, - 0x42, 0x1f, 0x4d, 0x20, 0x87, 0xd1, 0xb5, 0x91, 0x12, 0xf8, 0xee, 0xd5, 0xb5, 0x21, 0x3f, 0x08, - 0x33, 0x82, 0x8d, 0xfd, 0x5e, 0x30, 0x0d, 0x6a, 0x9b, 0x9a, 0x46, 0xec, 0x45, 0x57, 0xd7, 0x5b, - 0xf2, 0x65, 0x18, 0x8b, 0xb7, 0x0e, 0x79, 0x2b, 0xef, 0x75, 0x33, 0x89, 0x77, 0x92, 0xc8, 0xca, - 0x7b, 0xe3, 0x38, 0xa0, 0x90, 0xff, 0x24, 0xc1, 0x99, 0x8c, 0x06, 0x0a, 0x74, 0x0b, 0xc6, 0x74, - 0x65, 0x37, 0xd2, 0xd6, 0x92, 0x0c, 0x2c, 0xfb, 0x3c, 0x60, 0xf3, 0x67, 0xbf, 0xd5, 0x18, 0x12, - 0x4e, 0x20, 0xf3, 0x6c, 0xab, 0xec, 0xd6, 0x5c, 0xbb, 0x49, 0xfa, 0x3c, 0xc6, 0xf3, 0xcf, 0x77, - 0x55, 0x60, 0xe0, 0x00, 0x4d, 0xfe, 0x4c, 0x82, 0x62, 0x56, 0xe9, 0x85, 0x2e, 0xc6, 0xda, 0x3c, - 0x1e, 0x4e, 0xb4, 0x79, 0x4c, 0x74, 0xf0, 0x1d, 0x53, 0x93, 0xc7, 0xe7, 0x12, 0x4c, 0xa7, 0x97, - 0xa8, 0xe8, 0xa9, 0x98, 0xc6, 0xa5, 0x84, 0xc6, 0xe3, 0x09, 0x2e, 0xa1, 0xef, 0x16, 0x8c, 0x89, - 0x42, 0x56, 0xc0, 0xec, 0xe3, 0x9f, 0x71, 0x76, 0x82, 0x2a, 0xd9, 0x2f, 0xc9, 0xf8, 0x3a, 0xc6, - 0xc7, 0x70, 0x02, 0x57, 0xfe, 0x7e, 0x0e, 0x0a, 0xfc, 0xf5, 0xf3, 0x08, 0xeb, 0xa7, 0xd7, 0x62, - 0xf5, 0x53, 0xaf, 0xff, 0xd4, 0xc1, 0xb5, 0xcb, 0x2c, 0x9d, 0x36, 0x12, 0xa5, 0xd3, 0xa5, 0xbe, - 0xd0, 0xbb, 0x57, 0x4d, 0xcf, 0xc2, 0x70, 0xa0, 0x44, 0x6f, 0x81, 0x9a, 0xd5, 0xa8, 0x23, 0x11, - 0x11, 0x3d, 0x86, 0xf9, 0x9d, 0x58, 0xa2, 0xec, 0xe7, 0xbf, 0xc6, 0x22, 0xb2, 0xcb, 0x7e, 0xaa, - 0xf4, 0x3a, 0x82, 0xc3, 0xf6, 0x85, 0xce, 0x0c, 0x7a, 0x19, 0xc6, 0xbc, 0x7f, 0xbd, 0x0b, 0xae, - 0xcf, 0xf2, 0x7c, 0xf7, 0x06, 0x7d, 0xe6, 0x6b, 0xb1, 0x59, 0x9c, 0xa0, 0x9e, 0x79, 0x0e, 0x46, - 0x63, 0xc2, 0x7a, 0x6a, 0xe0, 0xfd, 0xb9, 0x04, 0x53, 0x69, 0x0d, 0x17, 0xe8, 0x2c, 0x0c, 0x6c, - 0xab, 0xe2, 0x8d, 0x28, 0xf2, 0xae, 0xf6, 0xbf, 0xaa, 0xd1, 0xc0, 0x7c, 0x26, 0xe8, 0xbf, 0xce, - 0x65, 0xf6, 0x5f, 0x5f, 0x00, 0x50, 0x2c, 0x55, 0xfc, 0x3b, 0xa3, 0xb0, 0x2a, 0xd8, 0xbc, 0xe1, - 0x3f, 0x3a, 0xe2, 0x08, 0x15, 0x7f, 0x48, 0x0d, 0xf5, 0x11, 0x45, 0x61, 0xf8, 0xc2, 0x19, 0x51, - 0x35, 0x4a, 0x27, 0xff, 0x42, 0x82, 0x87, 0xef, 0x79, 0x7c, 0x43, 0x95, 0x58, 0x78, 0x28, 0x27, - 0xc2, 0xc3, 0x6c, 0x36, 0xc0, 0x31, 0xb6, 0xb0, 0x7d, 0x94, 0x03, 0xb4, 0xb6, 0xa5, 0xda, 0x8d, - 0xaa, 0x62, 0xd3, 0x16, 0x16, 0x06, 0x1e, 0x61, 0xc0, 0xb8, 0x08, 0x23, 0x0d, 0xe2, 0xd4, 0x6d, - 0x95, 0x3b, 0x49, 0x2c, 0x67, 0xe0, 0xf1, 0xc5, 0x70, 0x0a, 0x47, 0xe9, 0x50, 0x13, 0x86, 0x76, - 0xbc, 0x35, 0xf3, 0x9f, 0xe2, 0x7a, 0xad, 0x7b, 0xc3, 0x1d, 0x10, 0x7e, 0x1f, 0x62, 0xc0, 0xc1, - 0x01, 0xb8, 0xfc, 0xb1, 0x04, 0xd3, 0x9d, 0x0e, 0x59, 0x64, 0xaa, 0x1f, 0x9d, 0x53, 0x1e, 0x84, - 0x01, 0x8e, 0xca, 0xbc, 0x71, 0xca, 0xbb, 0x04, 0x67, 0x12, 0x31, 0x1f, 0x95, 0xbf, 0x92, 0x60, - 0x26, 0x5d, 0xa5, 0x63, 0x38, 0x6d, 0xdc, 0x8a, 0x9f, 0x36, 0x7a, 0xbd, 0x51, 0x48, 0xd7, 0x3b, - 0xe3, 0xe4, 0xd1, 0x4e, 0xf5, 0xfd, 0x31, 0x18, 0xb9, 0x19, 0x37, 0x72, 0xfe, 0xc0, 0x46, 0xa6, - 0x1b, 0x58, 0x79, 0xfc, 0xf6, 0x9d, 0xd9, 0x13, 0x5f, 0xdc, 0x99, 0x3d, 0xf1, 0xc7, 0x3b, 0xb3, - 0x27, 0x3e, 0xdc, 0x9b, 0x95, 0x6e, 0xef, 0xcd, 0x4a, 0x5f, 0xec, 0xcd, 0x4a, 0x7f, 0xde, 0x9b, - 0x95, 0x3e, 0xfe, 0xcb, 0xec, 0x89, 0xd7, 0x06, 0x05, 0xe6, 0x3f, 0x03, 0x00, 0x00, 0xff, 0xff, - 0x09, 0x2f, 0xde, 0x45, 0x6e, 0x3f, 0x00, 0x00, + // 3580 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe4, 0x5b, 0x4f, 0x6c, 0x1b, 0xc7, + 0xd5, 0xf7, 0x92, 0xa2, 0x45, 0x3d, 0x59, 0x92, 0x35, 0x52, 0x64, 0x46, 0x49, 0x44, 0x67, 0x83, + 0x2f, 0x71, 0x3e, 0x24, 0xd4, 0x67, 0xe7, 0x73, 0xbe, 0xc4, 0x49, 0x9c, 0x88, 0x92, 0x65, 0x2b, + 0x9f, 0x64, 0x33, 0x43, 0xc9, 0x4d, 0xf3, 0xb7, 0x2b, 0x72, 0x44, 0xad, 0xb5, 0xff, 0xb2, 0x3b, + 0xab, 0x88, 0x09, 0x8a, 0x04, 0x28, 0x7a, 0x6d, 0x73, 0x6a, 0x73, 0x48, 0x8f, 0x3d, 0xf4, 0x92, + 0x36, 0x40, 0x8b, 0xb4, 0xc7, 0x1e, 0x8a, 0x1a, 0x68, 0x51, 0xa4, 0x40, 0x0b, 0xf4, 0x90, 0x2a, + 0xb5, 0x8a, 0x06, 0xbd, 0x17, 0xb9, 0xb8, 0x97, 0x62, 0x66, 0x67, 0xff, 0x72, 0x57, 0x16, 0x29, + 0x99, 0x28, 0xd0, 0x1b, 0x77, 0xe6, 0xbd, 0xdf, 0xfb, 0x33, 0x33, 0x6f, 0xde, 0xcc, 0x3c, 0xc2, + 0x73, 0x5b, 0x4f, 0x39, 0x15, 0xd5, 0x9c, 0xdd, 0x72, 0xd7, 0x89, 0x6d, 0x10, 0x4a, 0x9c, 0x59, + 0x6b, 0xab, 0x35, 0xab, 0x58, 0xaa, 0x33, 0x4b, 0x76, 0x28, 0x31, 0x1c, 0xd5, 0x34, 0x9c, 0xd9, + 0xed, 0xb3, 0xeb, 0x84, 0x2a, 0x67, 0x67, 0x5b, 0xc4, 0x20, 0xb6, 0x42, 0x49, 0xb3, 0x62, 0xd9, + 0x26, 0x35, 0xd1, 0xe3, 0x1e, 0x7b, 0x25, 0x64, 0xaf, 0x58, 0x5b, 0xad, 0x0a, 0x63, 0xaf, 0x84, + 0xec, 0x15, 0xc1, 0x3e, 0xfd, 0x78, 0x4b, 0xa5, 0x9b, 0xee, 0x7a, 0xa5, 0x61, 0xea, 0xb3, 0x2d, + 0xb3, 0x65, 0xce, 0x72, 0x94, 0x75, 0x77, 0x83, 0x7f, 0xf1, 0x0f, 0xfe, 0xcb, 0x43, 0x9f, 0xfe, + 0x5f, 0xa1, 0x9c, 0x62, 0xa9, 0xba, 0xd2, 0xd8, 0x54, 0x0d, 0x62, 0xb7, 0x43, 0xf5, 0x74, 0x42, + 0x95, 0xd9, 0xed, 0x0e, 0x9d, 0xa6, 0x67, 0xb3, 0xb8, 0x6c, 0xd7, 0xa0, 0xaa, 0x4e, 0x3a, 0x18, + 0x9e, 0xbc, 0x13, 0x83, 0xd3, 0xd8, 0x24, 0xba, 0xd2, 0xc1, 0x77, 0x2e, 0xd3, 0x77, 0xb3, 0x36, + 0x71, 0x4c, 0xd7, 0x6e, 0x74, 0xca, 0x7a, 0x2c, 0x9b, 0x27, 0xc5, 0x94, 0xb3, 0xe9, 0xd4, 0x2e, + 0x55, 0xb5, 0x59, 0xd5, 0xa0, 0x0e, 0xb5, 0x93, 0x2c, 0x72, 0x05, 0x60, 0xae, 0xb6, 0x74, 0x9d, + 0xd8, 0xcc, 0xf3, 0xe8, 0x34, 0x0c, 0x18, 0x8a, 0x4e, 0x4a, 0xd2, 0x69, 0xe9, 0xcc, 0x50, 0xf5, + 0xc4, 0xcd, 0xdd, 0xf2, 0xb1, 0xbd, 0xdd, 0xf2, 0xc0, 0x55, 0x45, 0x27, 0x98, 0xf7, 0xc8, 0xaf, + 0xc1, 0xe4, 0x7c, 0x6d, 0x6d, 0x55, 0xb1, 0x5b, 0x84, 0xae, 0x51, 0x55, 0x53, 0xdf, 0x51, 0x28, + 0xe3, 0x5c, 0x80, 0x93, 0x94, 0x37, 0xd6, 0x88, 0xdd, 0x20, 0x06, 0x55, 0x5a, 0x1e, 0x4a, 0xa1, + 0x5a, 0x12, 0x28, 0x27, 0x57, 0x13, 0xfd, 0xb8, 0x83, 0x43, 0xfe, 0xbe, 0x04, 0xf7, 0xce, 0xbb, + 0x0e, 0x35, 0xf5, 0x15, 0x42, 0x6d, 0xb5, 0x31, 0xef, 0xda, 0x36, 0x31, 0x68, 0x9d, 0x2a, 0xd4, + 0x75, 0xee, 0xac, 0x1d, 0x7a, 0x19, 0x0a, 0xdb, 0x8a, 0xe6, 0x92, 0x52, 0xee, 0xb4, 0x74, 0x66, + 0xf8, 0xdc, 0x63, 0x95, 0xcc, 0xf9, 0x56, 0xf1, 0x5d, 0x5e, 0x79, 0xc9, 0x55, 0x0c, 0xaa, 0xd2, + 0x76, 0x75, 0x52, 0x00, 0x9e, 0x10, 0x52, 0xaf, 0x33, 0x24, 0xec, 0x01, 0xca, 0xdf, 0x91, 0xe0, + 0x81, 0x4c, 0xcd, 0x96, 0x55, 0x87, 0x22, 0x1d, 0x0a, 0x2a, 0x25, 0xba, 0x53, 0x92, 0x4e, 0xe7, + 0xcf, 0x0c, 0x9f, 0xbb, 0x52, 0xe9, 0x6a, 0xae, 0x57, 0x32, 0xc1, 0xab, 0x23, 0x42, 0xaf, 0xc2, + 0x12, 0x83, 0xc7, 0x9e, 0x14, 0xf9, 0xbb, 0x12, 0xa0, 0x28, 0x8f, 0xe7, 0xdd, 0x03, 0xf8, 0xe8, + 0x6b, 0x87, 0xf1, 0xd1, 0x84, 0x00, 0x1c, 0xf6, 0xc4, 0xc5, 0x5c, 0xf4, 0xbe, 0x04, 0x53, 0x9d, + 0x1a, 0x71, 0xdf, 0x6c, 0xc4, 0x7d, 0x33, 0x77, 0x08, 0xdf, 0x78, 0xa8, 0x19, 0x4e, 0xf9, 0x59, + 0x0e, 0x86, 0x16, 0x14, 0xa2, 0x9b, 0x46, 0x9d, 0x50, 0xf4, 0x0d, 0x28, 0xb2, 0x45, 0xdf, 0x54, + 0xa8, 0xc2, 0xfd, 0x31, 0x7c, 0xee, 0x7f, 0x7c, 0xc1, 0xd1, 0xb5, 0x1b, 0x8a, 0x66, 0xd4, 0x95, + 0xed, 0xb3, 0x95, 0x6b, 0xeb, 0x37, 0x48, 0x83, 0xae, 0x10, 0xaa, 0x54, 0x91, 0x90, 0x03, 0x61, + 0x1b, 0x0e, 0x50, 0xd1, 0x1b, 0x30, 0xe0, 0x58, 0xa4, 0x21, 0x5c, 0xf9, 0x6c, 0x97, 0x66, 0x05, + 0x9a, 0xd6, 0x2d, 0xd2, 0x08, 0xc7, 0x8a, 0x7d, 0x61, 0x8e, 0x8b, 0x36, 0xe0, 0xb8, 0xc3, 0x27, + 0x41, 0x29, 0xcf, 0x25, 0x5c, 0xec, 0x59, 0x82, 0x37, 0x95, 0x46, 0x85, 0x8c, 0xe3, 0xde, 0x37, + 0x16, 0xe8, 0xf2, 0x6f, 0x25, 0x18, 0x09, 0x68, 0xf9, 0x88, 0xbd, 0xd6, 0xe1, 0xbb, 0xca, 0xc1, + 0x7c, 0xc7, 0xb8, 0xb9, 0xe7, 0x4e, 0x0a, 0x59, 0x45, 0xbf, 0x25, 0xe2, 0xb7, 0xd7, 0xfd, 0xf9, + 0x90, 0xe3, 0xf3, 0xe1, 0xa9, 0x5e, 0xcd, 0xca, 0x98, 0x06, 0xbf, 0x89, 0x9a, 0xc3, 0xdc, 0x89, + 0x5e, 0x87, 0xa2, 0x43, 0x34, 0xd2, 0xa0, 0xa6, 0x2d, 0xcc, 0x79, 0xe2, 0x80, 0xe6, 0x28, 0xeb, + 0x44, 0xab, 0x0b, 0xd6, 0xea, 0x09, 0x66, 0x8f, 0xff, 0x85, 0x03, 0x48, 0xf4, 0x2a, 0x14, 0x29, + 0xd1, 0x2d, 0x4d, 0xa1, 0xfe, 0xb2, 0x7a, 0x7c, 0x9f, 0x65, 0xb5, 0x7d, 0xb6, 0x52, 0x33, 0x9b, + 0xab, 0x82, 0x81, 0x0f, 0x7e, 0xe0, 0x2c, 0xbf, 0x15, 0x07, 0x80, 0xf2, 0x07, 0x79, 0x18, 0x4b, + 0x0c, 0x24, 0xba, 0x0e, 0x53, 0x0d, 0x2f, 0x48, 0x5c, 0x75, 0xf5, 0x75, 0x62, 0xd7, 0x1b, 0x9b, + 0xa4, 0xe9, 0x6a, 0xa4, 0x29, 0x82, 0xee, 0x8c, 0xc0, 0x9b, 0x9a, 0x4f, 0xa5, 0xc2, 0x19, 0xdc, + 0xe8, 0x45, 0x40, 0x06, 0x6f, 0x5a, 0x51, 0x1d, 0x27, 0xc0, 0xcc, 0x71, 0xcc, 0x69, 0x81, 0x89, + 0xae, 0x76, 0x50, 0xe0, 0x14, 0x2e, 0xa6, 0x63, 0x93, 0x38, 0xaa, 0x4d, 0x9a, 0x49, 0x1d, 0xf3, + 0x71, 0x1d, 0x17, 0x52, 0xa9, 0x70, 0x06, 0x37, 0x3a, 0x0f, 0xc3, 0x9e, 0x34, 0x4c, 0x94, 0x66, + 0xbb, 0x34, 0xc0, 0xc1, 0x82, 0xc0, 0x74, 0x35, 0xec, 0xc2, 0x51, 0x3a, 0x66, 0x9a, 0xb9, 0xee, + 0x10, 0x7b, 0x9b, 0x34, 0x2f, 0x7b, 0x9b, 0xa0, 0x6a, 0x1a, 0xa5, 0xc2, 0x69, 0xe9, 0x4c, 0x3e, + 0x34, 0xed, 0x5a, 0x07, 0x05, 0x4e, 0xe1, 0x92, 0x7f, 0x9e, 0x03, 0x58, 0x20, 0x96, 0x66, 0xb6, + 0x75, 0x62, 0xf4, 0x23, 0xd0, 0xbc, 0x19, 0x0b, 0x34, 0xcf, 0x75, 0xbb, 0x5e, 0x02, 0x55, 0x33, + 0x23, 0x4d, 0x2b, 0x11, 0x69, 0x9e, 0xef, 0x5d, 0xc4, 0xfe, 0xa1, 0xe6, 0x56, 0x1e, 0x26, 0x42, + 0xe2, 0x79, 0xd3, 0x68, 0xaa, 0x3c, 0x81, 0x78, 0x06, 0x06, 0x68, 0xdb, 0xf2, 0x37, 0xae, 0x47, + 0x7c, 0x15, 0x57, 0xdb, 0x16, 0xb9, 0xbd, 0x5b, 0x3e, 0x95, 0xc2, 0xc2, 0xba, 0x30, 0x67, 0x42, + 0xd7, 0x03, 0xed, 0x73, 0x9c, 0xfd, 0x62, 0x5c, 0xf8, 0xed, 0xdd, 0xf2, 0xbe, 0x89, 0x54, 0x25, + 0xc0, 0x8c, 0x2b, 0x8b, 0x1e, 0x86, 0xe3, 0x36, 0x51, 0x1c, 0xd3, 0xe0, 0xb3, 0x6c, 0x28, 0x34, + 0x0a, 0xf3, 0x56, 0x2c, 0x7a, 0xd1, 0xa3, 0x30, 0xa8, 0x13, 0xc7, 0x61, 0x49, 0x4f, 0x81, 0x13, + 0x8e, 0x09, 0xc2, 0xc1, 0x15, 0xaf, 0x19, 0xfb, 0xfd, 0xe8, 0x06, 0x8c, 0x6a, 0x8a, 0x43, 0xd7, + 0xac, 0xa6, 0x42, 0xc9, 0xaa, 0xaa, 0x93, 0xd2, 0x71, 0xee, 0xf0, 0xff, 0x3e, 0xd8, 0x8c, 0x61, + 0x1c, 0xd5, 0x29, 0x81, 0x3e, 0xba, 0x1c, 0x43, 0xc2, 0x09, 0x64, 0xb4, 0x0d, 0x88, 0xb5, 0xac, + 0xda, 0x8a, 0xe1, 0x78, 0x2e, 0x63, 0xf2, 0x06, 0xbb, 0x96, 0x17, 0x2c, 0x8f, 0xe5, 0x0e, 0x34, + 0x9c, 0x22, 0x41, 0xfe, 0x9d, 0x04, 0xa3, 0xe1, 0x80, 0xf5, 0x61, 0x3f, 0x79, 0x23, 0xbe, 0x9f, + 0x3c, 0xdd, 0xf3, 0xe4, 0xcd, 0xd8, 0x50, 0x3e, 0xcc, 0x03, 0x0a, 0x89, 0xb0, 0xa9, 0x69, 0xeb, + 0x4a, 0x63, 0xeb, 0x00, 0xc9, 0xd6, 0x0f, 0x25, 0x40, 0x2e, 0x1f, 0x90, 0xe6, 0x9c, 0x61, 0x98, + 0x94, 0x87, 0x0f, 0x5f, 0xcd, 0xaf, 0xf7, 0xac, 0xa6, 0xaf, 0x41, 0x65, 0xad, 0x03, 0xfb, 0x92, + 0x41, 0xed, 0x76, 0x38, 0x62, 0x9d, 0x04, 0x38, 0x45, 0x21, 0xf4, 0x16, 0x80, 0x2d, 0x30, 0x57, + 0x4d, 0x11, 0x02, 0xba, 0x8d, 0x32, 0xbe, 0x52, 0xf3, 0xa6, 0xb1, 0xa1, 0xb6, 0xc2, 0x80, 0x86, + 0x03, 0x60, 0x1c, 0x11, 0x32, 0x7d, 0x09, 0x4e, 0x65, 0x68, 0x8f, 0x4e, 0x42, 0x7e, 0x8b, 0xb4, + 0x3d, 0xb7, 0x62, 0xf6, 0x13, 0x4d, 0x46, 0x93, 0xd6, 0x21, 0x91, 0x71, 0x5e, 0xc8, 0x3d, 0x25, + 0xc9, 0x5f, 0x16, 0xa2, 0x73, 0x8d, 0x6f, 0xf6, 0x67, 0xa0, 0x68, 0x13, 0x4b, 0x53, 0x1b, 0x8a, + 0x23, 0xb6, 0x43, 0xbe, 0x6f, 0x63, 0xd1, 0x86, 0x83, 0xde, 0x58, 0x5a, 0x90, 0xbb, 0xbb, 0x69, + 0x41, 0xfe, 0x88, 0xd3, 0x02, 0x64, 0x42, 0xd1, 0xa1, 0xec, 0x28, 0xd7, 0xf2, 0xf6, 0xc0, 0xee, + 0xd3, 0xea, 0x68, 0xcc, 0xf6, 0x80, 0x42, 0x81, 0x7e, 0x0b, 0x0e, 0x84, 0xa0, 0x39, 0x18, 0xd3, + 0x55, 0x83, 0x6f, 0xa6, 0x75, 0xd2, 0x30, 0x8d, 0xa6, 0xc3, 0x83, 0x5d, 0xa1, 0x7a, 0x4a, 0x30, + 0x8d, 0xad, 0xc4, 0xbb, 0x71, 0x92, 0x1e, 0x2d, 0xc3, 0xa4, 0x4d, 0xb6, 0x55, 0xa6, 0xc6, 0x15, + 0xd5, 0xa1, 0xa6, 0xdd, 0x5e, 0x56, 0x75, 0x95, 0xf2, 0x10, 0x58, 0xa8, 0x96, 0xf6, 0x76, 0xcb, + 0x93, 0x38, 0xa5, 0x1f, 0xa7, 0x72, 0xb1, 0xe8, 0x6c, 0x29, 0xae, 0x43, 0x9a, 0x3c, 0xa4, 0x15, + 0xc3, 0xe8, 0x5c, 0xe3, 0xad, 0x58, 0xf4, 0x22, 0x3d, 0x36, 0xb9, 0x8b, 0x47, 0x31, 0xb9, 0x47, + 0xb3, 0x27, 0x36, 0x5a, 0x83, 0x53, 0x96, 0x6d, 0xb6, 0x6c, 0xe2, 0x38, 0x0b, 0x44, 0x69, 0x6a, + 0xaa, 0x41, 0x7c, 0x7f, 0x0d, 0x71, 0x3b, 0xef, 0xdb, 0xdb, 0x2d, 0x9f, 0xaa, 0xa5, 0x93, 0xe0, + 0x2c, 0x5e, 0xf9, 0xa3, 0x01, 0x38, 0x99, 0xdc, 0x65, 0x33, 0x92, 0x1a, 0xa9, 0x97, 0xa4, 0x06, + 0x3d, 0x16, 0x59, 0x36, 0x5e, 0xc6, 0x17, 0xcc, 0x86, 0x94, 0xa5, 0x33, 0x07, 0x63, 0x22, 0x8e, + 0xf8, 0x9d, 0x22, 0xad, 0x0b, 0x66, 0xc3, 0x5a, 0xbc, 0x1b, 0x27, 0xe9, 0xd1, 0x65, 0x18, 0x57, + 0xb6, 0x15, 0x55, 0x53, 0xd6, 0x35, 0x12, 0x80, 0x78, 0xe9, 0xdc, 0xbd, 0x02, 0x64, 0x7c, 0x2e, + 0x49, 0x80, 0x3b, 0x79, 0xd0, 0x0a, 0x4c, 0xb8, 0x46, 0x27, 0x94, 0x37, 0x3b, 0xef, 0x13, 0x50, + 0x13, 0x6b, 0x9d, 0x24, 0x38, 0x8d, 0x0f, 0x6d, 0x03, 0x34, 0xfc, 0x84, 0xc0, 0x29, 0x1d, 0xe7, + 0xb1, 0xba, 0xda, 0xf3, 0xda, 0x0a, 0x72, 0x8b, 0x30, 0x22, 0x06, 0x4d, 0x0e, 0x8e, 0x48, 0x42, + 0xcf, 0xc0, 0x88, 0xcd, 0xf3, 0x56, 0xdf, 0x80, 0x41, 0x6e, 0xc0, 0x3d, 0x82, 0x6d, 0x04, 0x47, + 0x3b, 0x71, 0x9c, 0x56, 0xfe, 0xbd, 0x14, 0xdd, 0xa2, 0xfc, 0xe5, 0x8b, 0x2e, 0xc4, 0xd2, 0xaa, + 0x87, 0x13, 0x69, 0xd5, 0x54, 0x27, 0x47, 0x24, 0xab, 0x7a, 0x0f, 0x46, 0xd8, 0xb4, 0x56, 0x8d, + 0x96, 0x37, 0x94, 0x22, 0x44, 0x2e, 0xf6, 0xb0, 0x74, 0x02, 0x8c, 0xc8, 0x56, 0x3b, 0xce, 0x6d, + 0x8a, 0x76, 0xe2, 0xb8, 0x3c, 0xf9, 0x13, 0x09, 0xa6, 0x16, 0xeb, 0x97, 0x6d, 0xd3, 0xb5, 0x7c, + 0xf5, 0xae, 0x59, 0x9e, 0xaf, 0xfe, 0x0f, 0x06, 0x6c, 0x57, 0xf3, 0xed, 0x7a, 0xc8, 0xb7, 0x0b, + 0xbb, 0x1a, 0xb3, 0x6b, 0x22, 0xc1, 0xe5, 0x19, 0xc5, 0x18, 0xd0, 0x1b, 0x70, 0xdc, 0x56, 0x8c, + 0x16, 0xf1, 0x37, 0xe1, 0x27, 0xbb, 0xb4, 0x66, 0x69, 0x01, 0x33, 0xf6, 0x48, 0x2a, 0xc8, 0xd1, + 0xb0, 0x40, 0x95, 0x7f, 0x20, 0xc1, 0xd8, 0x95, 0xd5, 0xd5, 0xda, 0x92, 0xc1, 0x57, 0x71, 0x4d, + 0xa1, 0x9b, 0x2c, 0x4f, 0xb0, 0x14, 0xba, 0x99, 0xcc, 0x13, 0x58, 0x1f, 0xe6, 0x3d, 0x68, 0x13, + 0x06, 0x59, 0xf4, 0x20, 0x46, 0xb3, 0xc7, 0x14, 0x5f, 0x88, 0xab, 0x7a, 0x20, 0x61, 0xfe, 0x29, + 0x1a, 0xb0, 0x0f, 0x2f, 0xbf, 0x0b, 0x93, 0x11, 0xf5, 0x98, 0xbf, 0xf8, 0x25, 0x0e, 0x6a, 0x40, + 0x81, 0x69, 0xe2, 0x5f, 0xd1, 0x74, 0x7b, 0xd3, 0x90, 0x30, 0x39, 0xcc, 0xa3, 0xd8, 0x97, 0x83, + 0x3d, 0x6c, 0xf9, 0x8b, 0x1c, 0x9c, 0xba, 0x62, 0xda, 0xea, 0x3b, 0xa6, 0x41, 0x15, 0xad, 0x66, + 0x36, 0xe7, 0x5c, 0x6a, 0x3a, 0x0d, 0x45, 0x23, 0x76, 0x1f, 0x0e, 0x51, 0x5a, 0xec, 0x10, 0xf5, + 0x62, 0xb7, 0x16, 0xa6, 0xeb, 0x9d, 0x79, 0xa2, 0xa2, 0x89, 0x13, 0xd5, 0xf2, 0x11, 0xc9, 0xdb, + 0xff, 0x78, 0xf5, 0x77, 0x09, 0xee, 0xcb, 0xe0, 0xec, 0x43, 0x1e, 0xbe, 0x15, 0xcf, 0xc3, 0x17, + 0x8f, 0xc6, 0xe4, 0x8c, 0xa4, 0xfc, 0x9f, 0xb9, 0x4c, 0x53, 0x79, 0x1a, 0xf8, 0x16, 0x14, 0xf9, + 0x17, 0x26, 0x1b, 0xc2, 0xd4, 0xf9, 0x2e, 0xf5, 0xa9, 0xbb, 0xeb, 0xfe, 0x15, 0x28, 0x26, 0x1b, + 0xc4, 0x26, 0x46, 0x83, 0x44, 0x52, 0x24, 0x01, 0x8e, 0x03, 0x31, 0xe8, 0x2c, 0x0c, 0xf3, 0x94, + 0x27, 0xb6, 0x8b, 0x8e, 0xed, 0xed, 0x96, 0x87, 0x57, 0xc2, 0x66, 0x1c, 0xa5, 0x41, 0xe7, 0x61, + 0x58, 0x57, 0x76, 0x12, 0x7b, 0x68, 0x70, 0x9b, 0xb1, 0x12, 0x76, 0xe1, 0x28, 0x1d, 0x7a, 0x0f, + 0x46, 0x1b, 0x96, 0x1b, 0xb9, 0x81, 0x17, 0x39, 0x60, 0xb7, 0x26, 0xa6, 0x5d, 0xe6, 0x57, 0x11, + 0x3b, 0x5b, 0xce, 0xd7, 0xd6, 0x22, 0x6d, 0x38, 0x21, 0x4e, 0xfe, 0x65, 0x1e, 0x1e, 0xd8, 0x77, + 0x8a, 0xa2, 0xc5, 0x7d, 0x72, 0x93, 0xa9, 0x2e, 0xf2, 0x92, 0x06, 0x8c, 0xb0, 0x33, 0x26, 0x77, + 0x37, 0x3f, 0xc0, 0xe6, 0xba, 0x3e, 0xc0, 0xf2, 0xad, 0x66, 0x39, 0x0a, 0x82, 0xe3, 0x98, 0x2c, + 0x9d, 0x11, 0x57, 0x62, 0x59, 0xe9, 0xcc, 0x7c, 0xbc, 0x1b, 0x27, 0xe9, 0x19, 0x84, 0xb8, 0xb1, + 0x4a, 0x24, 0x33, 0x01, 0xc4, 0x42, 0xbc, 0x1b, 0x27, 0xe9, 0x91, 0x0e, 0x65, 0x81, 0x1a, 0xf7, + 0x7e, 0xe4, 0x51, 0xc5, 0x4b, 0x6a, 0x1e, 0xda, 0xdb, 0x2d, 0x97, 0xe7, 0xf7, 0x27, 0xc5, 0x77, + 0xc2, 0x92, 0x57, 0x60, 0xe4, 0x8a, 0xe9, 0xd0, 0x9a, 0x69, 0x53, 0xbe, 0x8b, 0xa1, 0x07, 0x20, + 0xaf, 0xab, 0x86, 0x38, 0x34, 0x0d, 0x0b, 0xb5, 0xf3, 0x6c, 0xee, 0xb2, 0x76, 0xde, 0xad, 0xec, + 0x88, 0x69, 0x1d, 0x76, 0x2b, 0x3b, 0x98, 0xb5, 0xcb, 0x97, 0x61, 0x50, 0xec, 0x8e, 0x51, 0xa0, + 0xfc, 0xfe, 0x40, 0xf9, 0x14, 0xa0, 0x1f, 0xe7, 0x60, 0x50, 0x6c, 0x26, 0x7d, 0xd8, 0x16, 0x5e, + 0x8b, 0x6d, 0x0b, 0x17, 0x7a, 0xdb, 0x78, 0x33, 0xb7, 0x81, 0x66, 0x62, 0x1b, 0x78, 0xb6, 0x47, + 0xfc, 0xfd, 0xc3, 0xfe, 0xc7, 0x12, 0x8c, 0xc6, 0x53, 0x00, 0x16, 0x58, 0xd8, 0x52, 0x52, 0x1b, + 0xe4, 0x6a, 0x78, 0x47, 0x11, 0x04, 0x96, 0x7a, 0xd8, 0x85, 0xa3, 0x74, 0x88, 0x04, 0x6c, 0x6c, + 0x5a, 0x08, 0xa7, 0x54, 0x32, 0x94, 0x76, 0xa9, 0xaa, 0x55, 0xbc, 0x97, 0xc5, 0xca, 0x92, 0x41, + 0xaf, 0xd9, 0x75, 0x6a, 0xab, 0x46, 0xab, 0x43, 0x0c, 0x9f, 0x61, 0x51, 0x5c, 0xf9, 0xa6, 0x04, + 0xc3, 0x42, 0xe1, 0x3e, 0xec, 0x4b, 0xaf, 0xc6, 0xf7, 0xa5, 0x27, 0x7b, 0x4c, 0xae, 0xd2, 0xf7, + 0xa1, 0x4f, 0x43, 0x53, 0x58, 0x3a, 0xc5, 0xb2, 0xbd, 0x4d, 0xd3, 0xa1, 0xc9, 0x6c, 0x8f, 0xad, + 0x34, 0xcc, 0x7b, 0xd0, 0xb7, 0x25, 0x38, 0xa9, 0x26, 0x12, 0x30, 0xe1, 0xe9, 0xe7, 0x7b, 0x53, + 0x2d, 0x80, 0x09, 0x9f, 0x5b, 0x93, 0x3d, 0xb8, 0x43, 0xa4, 0xec, 0x42, 0x07, 0x15, 0x52, 0x60, + 0x60, 0x93, 0x52, 0xab, 0xc7, 0x1d, 0x33, 0x2d, 0xb5, 0xac, 0x16, 0xb9, 0xf9, 0xab, 0xab, 0x35, + 0xcc, 0xa1, 0xe5, 0x8f, 0x73, 0x81, 0xc3, 0xea, 0xde, 0x12, 0x09, 0x92, 0x5f, 0xe9, 0x28, 0x92, + 0xdf, 0xe1, 0xb4, 0xc4, 0x17, 0xbd, 0x0c, 0x79, 0xaa, 0xf5, 0x7a, 0x43, 0x28, 0x24, 0xac, 0x2e, + 0xd7, 0xc3, 0x70, 0xb5, 0xba, 0x5c, 0xc7, 0x0c, 0x12, 0xbd, 0x09, 0x05, 0x76, 0xb4, 0x60, 0x2b, + 0x3c, 0xdf, 0x7b, 0x04, 0x61, 0xfe, 0x0a, 0x67, 0x18, 0xfb, 0x72, 0xb0, 0x87, 0x2b, 0xbf, 0x0b, + 0x23, 0xb1, 0x30, 0x80, 0x6e, 0xc0, 0x09, 0xcd, 0x54, 0x9a, 0x55, 0x45, 0x53, 0x8c, 0x06, 0xb1, + 0x93, 0x81, 0x31, 0xfd, 0x72, 0x69, 0x39, 0xc2, 0x21, 0xc2, 0x49, 0xf0, 0xe4, 0x1d, 0xed, 0xc3, + 0x31, 0x6c, 0x59, 0x01, 0x08, 0xad, 0x47, 0x65, 0x28, 0xb0, 0x29, 0xec, 0x1d, 0x13, 0x86, 0xaa, + 0x43, 0x4c, 0x57, 0x36, 0xb3, 0x1d, 0xec, 0xb5, 0xa3, 0x73, 0x00, 0x0e, 0x69, 0xd8, 0x84, 0xf2, + 0xa8, 0xe3, 0x5d, 0xc7, 0x07, 0xf1, 0xb7, 0x1e, 0xf4, 0xe0, 0x08, 0x95, 0xfc, 0x47, 0x09, 0x46, + 0xae, 0x12, 0xfa, 0xb6, 0x69, 0x6f, 0xd5, 0x4c, 0x4d, 0x6d, 0xb4, 0xfb, 0x10, 0xf5, 0xd7, 0x63, + 0x51, 0xff, 0x85, 0x2e, 0xc7, 0x2c, 0xa6, 0x6d, 0x56, 0xec, 0x97, 0xff, 0x26, 0x41, 0x29, 0x46, + 0x19, 0x0d, 0x13, 0x04, 0x0a, 0x96, 0x69, 0x53, 0xff, 0xc0, 0x75, 0x28, 0x0d, 0x58, 0x48, 0x8d, + 0x1c, 0xb9, 0x18, 0x2c, 0xf6, 0xd0, 0x99, 0x9d, 0x1b, 0xb6, 0xa9, 0x8b, 0x79, 0x7f, 0x38, 0x29, + 0x84, 0xd8, 0xa1, 0x9d, 0x8b, 0xb6, 0xa9, 0x63, 0x8e, 0x2d, 0xff, 0x41, 0x82, 0xf1, 0x18, 0x65, + 0x1f, 0x42, 0xba, 0x12, 0x0f, 0xe9, 0xcf, 0x1e, 0xc6, 0xb0, 0x8c, 0xc0, 0xfe, 0x55, 0xd2, 0x2c, + 0xe6, 0x00, 0xb4, 0x01, 0xc3, 0x96, 0xd9, 0xac, 0x1f, 0xc1, 0x6b, 0x32, 0x3f, 0x18, 0xd4, 0x42, + 0x2c, 0x1c, 0x05, 0x46, 0x3b, 0x30, 0x6e, 0x28, 0x3a, 0x71, 0x2c, 0xa5, 0x41, 0xea, 0x47, 0x70, + 0x49, 0x7d, 0xcf, 0xde, 0x6e, 0x79, 0xfc, 0x6a, 0x12, 0x11, 0x77, 0x0a, 0x91, 0x7f, 0xda, 0x61, + 0xb7, 0x69, 0x53, 0xf4, 0x12, 0x14, 0x79, 0xc9, 0x50, 0xc3, 0xd4, 0xc4, 0xd6, 0x76, 0x9e, 0x0d, + 0x4d, 0x4d, 0xb4, 0xdd, 0xde, 0x2d, 0xff, 0xd7, 0xbe, 0x6f, 0x6c, 0x3e, 0x21, 0x0e, 0x60, 0xd0, + 0x32, 0x0c, 0x58, 0xbd, 0x27, 0x19, 0x7c, 0x5b, 0xe1, 0x99, 0x05, 0x47, 0x91, 0xff, 0x91, 0x54, + 0x9b, 0x6f, 0x2e, 0x37, 0x8e, 0x6c, 0xb8, 0x82, 0xa4, 0x26, 0x73, 0xc8, 0x6c, 0x18, 0x14, 0x7b, + 0xac, 0x98, 0x95, 0x97, 0x0f, 0x33, 0x2b, 0xa3, 0xfb, 0x42, 0x70, 0x9f, 0xe3, 0x37, 0xfa, 0x82, + 0xe4, 0x3f, 0x4b, 0x30, 0xce, 0x15, 0x6a, 0xb8, 0xb6, 0x4a, 0xdb, 0x7d, 0x8b, 0x9f, 0x1b, 0xb1, + 0xf8, 0xb9, 0xd0, 0xa5, 0xa1, 0x1d, 0x1a, 0x67, 0xc6, 0xd0, 0xcf, 0x25, 0xb8, 0xa7, 0x83, 0xba, + 0x0f, 0xf1, 0x85, 0xc4, 0xe3, 0xcb, 0x0b, 0x87, 0x35, 0x30, 0x23, 0xc6, 0xdc, 0x84, 0x14, 0xf3, + 0xf8, 0xc4, 0x3d, 0x07, 0x60, 0xd9, 0xea, 0xb6, 0xaa, 0x91, 0x96, 0x28, 0xeb, 0x28, 0x86, 0x43, + 0x52, 0x0b, 0x7a, 0x70, 0x84, 0x0a, 0x7d, 0x13, 0xa6, 0x9a, 0x64, 0x43, 0x71, 0x35, 0x3a, 0xd7, + 0x6c, 0xce, 0x2b, 0x96, 0xb2, 0xae, 0x6a, 0x2a, 0x55, 0xc5, 0x65, 0xe7, 0x50, 0xf5, 0x92, 0x57, + 0x6e, 0x91, 0x46, 0x71, 0x7b, 0xb7, 0xfc, 0xc8, 0xfe, 0x6f, 0xe4, 0x3e, 0x71, 0x1b, 0x67, 0x08, + 0x41, 0xdf, 0x92, 0xa0, 0x64, 0x93, 0xb7, 0x5c, 0x76, 0xa6, 0x5d, 0xb0, 0x4d, 0x2b, 0xa6, 0x41, + 0x9e, 0x6b, 0x70, 0x79, 0x6f, 0xb7, 0x5c, 0xc2, 0x19, 0x34, 0xdd, 0xe8, 0x90, 0x29, 0x08, 0x51, + 0x98, 0x50, 0x34, 0xcd, 0x7c, 0x9b, 0xc4, 0x3d, 0x30, 0xc0, 0xe5, 0x57, 0xf7, 0x76, 0xcb, 0x13, + 0x73, 0x9d, 0xdd, 0xdd, 0x88, 0x4e, 0x83, 0x47, 0xb3, 0x30, 0xb8, 0x6d, 0x6a, 0xae, 0x4e, 0x9c, + 0x52, 0x81, 0x4b, 0x62, 0xf1, 0x76, 0xf0, 0xba, 0xd7, 0x74, 0x7b, 0xb7, 0x7c, 0x7c, 0xb1, 0xce, + 0x6f, 0xa1, 0x7d, 0x2a, 0x76, 0x3e, 0x63, 0x19, 0x93, 0x58, 0xf2, 0xfc, 0x09, 0xac, 0x18, 0xc6, + 0x98, 0x2b, 0x61, 0x17, 0x8e, 0xd2, 0x21, 0x1d, 0x86, 0x36, 0xc5, 0x99, 0xdd, 0x29, 0x0d, 0xf6, + 0xb4, 0xf7, 0xc5, 0xce, 0xfc, 0xd5, 0x71, 0x21, 0x72, 0xc8, 0x6f, 0x76, 0x70, 0x28, 0x01, 0x3d, + 0x0a, 0x83, 0xfc, 0x63, 0x69, 0x81, 0x3f, 0x9c, 0x15, 0xc3, 0x48, 0x74, 0xc5, 0x6b, 0xc6, 0x7e, + 0xbf, 0x4f, 0xba, 0x54, 0x9b, 0xe7, 0xef, 0x5c, 0x09, 0xd2, 0xa5, 0xda, 0x3c, 0xf6, 0xfb, 0x91, + 0x05, 0x83, 0x0e, 0x59, 0x56, 0x0d, 0x77, 0xa7, 0x04, 0x7c, 0xe5, 0x5e, 0xea, 0xf6, 0x66, 0xee, + 0x12, 0xe7, 0x4e, 0xbc, 0x0a, 0x84, 0x12, 0x45, 0x3f, 0xf6, 0xc5, 0xa0, 0x1d, 0x18, 0xb2, 0x5d, + 0x63, 0xce, 0x59, 0x73, 0x88, 0x5d, 0x1a, 0xe6, 0x32, 0xbb, 0x0d, 0xce, 0xd8, 0xe7, 0x4f, 0x4a, + 0x0d, 0x3c, 0x18, 0x50, 0xe0, 0x50, 0x18, 0xfa, 0x48, 0x02, 0xe4, 0xb8, 0x96, 0xa5, 0x11, 0x9d, + 0x18, 0x54, 0xd1, 0xf8, 0xc3, 0x84, 0x53, 0x3a, 0xc1, 0x75, 0xa8, 0x75, 0x7d, 0x23, 0x99, 0x04, + 0x4a, 0x2a, 0x13, 0xbc, 0xfa, 0x75, 0x92, 0xe2, 0x14, 0x3d, 0xd8, 0x50, 0x6c, 0x38, 0xfc, 0x77, + 0x69, 0xa4, 0xa7, 0xa1, 0x48, 0x7f, 0xa0, 0x09, 0x87, 0x42, 0xf4, 0x63, 0x5f, 0x0c, 0xba, 0x0e, + 0x53, 0x36, 0x51, 0x9a, 0xd7, 0x0c, 0xad, 0x8d, 0x4d, 0x93, 0x2e, 0xaa, 0x1a, 0x71, 0xda, 0x0e, + 0x25, 0x7a, 0x69, 0x94, 0x4f, 0x9b, 0xa0, 0x2e, 0x0c, 0xa7, 0x52, 0xe1, 0x0c, 0x6e, 0x5e, 0x94, + 0x25, 0x6e, 0xd2, 0xfa, 0x53, 0xfd, 0x79, 0xb8, 0xa2, 0xac, 0x50, 0xd5, 0xbb, 0x56, 0x94, 0x15, + 0x11, 0xb1, 0xff, 0xf5, 0xd1, 0x57, 0x39, 0x98, 0x08, 0x89, 0x0f, 0x5c, 0x94, 0x95, 0xc2, 0xd2, + 0x87, 0xa2, 0xac, 0xf4, 0xaa, 0xa6, 0xfc, 0xdd, 0xae, 0x6a, 0xba, 0x0b, 0xc5, 0x60, 0xbc, 0x50, + 0x2a, 0x74, 0xe2, 0xbf, 0x7f, 0xa1, 0x54, 0xa8, 0x6b, 0x46, 0x3a, 0xf3, 0x8b, 0x5c, 0xd4, 0xa0, + 0xff, 0xa0, 0x6a, 0x9c, 0x94, 0xe2, 0x98, 0x81, 0xee, 0x8a, 0x63, 0xe4, 0xcf, 0xf3, 0x70, 0x32, + 0xb9, 0x62, 0x63, 0x45, 0x19, 0xd2, 0x1d, 0x8b, 0x32, 0x6a, 0x30, 0xb9, 0xe1, 0x6a, 0x5a, 0x9b, + 0x3b, 0x24, 0xf2, 0x0e, 0xe1, 0xdd, 0xd8, 0xdf, 0x2f, 0x38, 0x27, 0x17, 0x53, 0x68, 0x70, 0x2a, + 0x67, 0x46, 0x81, 0x49, 0xbe, 0xa7, 0x02, 0x93, 0x8e, 0xfa, 0x86, 0x81, 0x83, 0xd7, 0x37, 0xa4, + 0x17, 0x8b, 0x14, 0x7a, 0x28, 0x16, 0x39, 0x8a, 0xea, 0x8e, 0x94, 0xc0, 0x77, 0xa7, 0xea, 0x0e, + 0xf9, 0x7e, 0x98, 0x16, 0x6c, 0xec, 0x7b, 0xde, 0x34, 0xa8, 0x6d, 0x6a, 0x1a, 0xb1, 0x17, 0x5c, + 0x5d, 0x6f, 0xcb, 0x17, 0x61, 0x34, 0x5e, 0x62, 0xe4, 0x8d, 0xbc, 0x57, 0xf5, 0x24, 0xde, 0x51, + 0x22, 0x23, 0xef, 0xb5, 0xe3, 0x80, 0x42, 0xfe, 0x42, 0x82, 0x53, 0x19, 0x85, 0x16, 0xe8, 0x06, + 0x8c, 0xea, 0xca, 0x4e, 0xa4, 0xfc, 0x25, 0x19, 0x58, 0x0e, 0x78, 0xe0, 0xe6, 0xcf, 0x82, 0x2b, + 0x31, 0x24, 0x9c, 0x40, 0x46, 0x2f, 0x43, 0x51, 0x57, 0x76, 0xea, 0xae, 0xdd, 0x22, 0x3d, 0x1e, + 0xeb, 0xf9, 0xf2, 0x5d, 0x11, 0x18, 0x38, 0x40, 0x93, 0x3f, 0x91, 0xa0, 0x94, 0x95, 0x82, 0xa1, + 0xf3, 0xb1, 0x72, 0x90, 0x07, 0x13, 0xe5, 0x20, 0xe3, 0x1d, 0x7c, 0x7d, 0x2a, 0x06, 0xf9, 0x54, + 0x82, 0xa9, 0xf4, 0x54, 0x15, 0x3d, 0x11, 0xd3, 0xb8, 0x9c, 0xd0, 0x78, 0x2c, 0xc1, 0x25, 0xf4, + 0xdd, 0x84, 0x51, 0x91, 0xd0, 0x0a, 0x98, 0x03, 0xfc, 0x89, 0x67, 0x3b, 0xc8, 0x96, 0xfd, 0xd4, + 0x8c, 0x8f, 0x63, 0xbc, 0x0d, 0x27, 0x70, 0xe5, 0x1f, 0xe5, 0xa0, 0xc0, 0x5f, 0x47, 0xfb, 0x90, + 0x47, 0xbd, 0x12, 0xcb, 0xa3, 0xba, 0xfd, 0x33, 0x08, 0xd7, 0x32, 0x33, 0x85, 0x5a, 0x4f, 0xa4, + 0x50, 0x17, 0x7a, 0x42, 0xdf, 0x3f, 0x7b, 0x7a, 0x1a, 0x86, 0x02, 0x25, 0xba, 0x0b, 0xd8, 0xf2, + 0x4f, 0x72, 0x30, 0x1c, 0x11, 0xd1, 0x65, 0xb8, 0xdf, 0x8e, 0x6d, 0x98, 0xbd, 0xfc, 0xeb, 0x2c, + 0x22, 0xbb, 0xe2, 0x6f, 0x99, 0x5e, 0x05, 0x71, 0x58, 0xe6, 0xd0, 0xb9, 0x93, 0x5e, 0x84, 0x51, + 0xef, 0xaf, 0x7b, 0xc1, 0xb5, 0x5a, 0x9e, 0xcf, 0xe2, 0xa0, 0x2e, 0x7d, 0x35, 0xd6, 0x8b, 0x13, + 0xd4, 0xd3, 0xcf, 0xc0, 0x48, 0x4c, 0x58, 0x57, 0x05, 0xbf, 0xbf, 0x92, 0x60, 0x32, 0xad, 0x30, + 0x03, 0x9d, 0x86, 0x81, 0x2d, 0x55, 0xbc, 0x21, 0x45, 0xde, 0xdd, 0xfe, 0x5f, 0x35, 0x9a, 0x98, + 0xf7, 0x04, 0xf5, 0xda, 0xb9, 0xcc, 0x7a, 0xed, 0x73, 0x00, 0x8a, 0xa5, 0x8a, 0xbf, 0x43, 0x0a, + 0xab, 0x82, 0xc9, 0x1b, 0xfe, 0x51, 0x12, 0x47, 0xa8, 0xf8, 0x43, 0x6b, 0xa8, 0x8f, 0x48, 0x0e, + 0xc3, 0x17, 0xd0, 0x88, 0xaa, 0x51, 0x3a, 0xf9, 0xd7, 0x12, 0x3c, 0x78, 0xc7, 0xe3, 0x1c, 0xaa, + 0xc6, 0xc2, 0x44, 0x25, 0x11, 0x26, 0x66, 0xb2, 0x01, 0xfa, 0x58, 0xf2, 0xf6, 0xbd, 0x1c, 0xa0, + 0xd5, 0x4d, 0xd5, 0x6e, 0xd6, 0x14, 0x9b, 0xb6, 0xb1, 0x30, 0xb0, 0x0f, 0x81, 0xe3, 0x3c, 0x0c, + 0x37, 0x89, 0xd3, 0xb0, 0x55, 0xee, 0x2c, 0x31, 0xac, 0x81, 0xe7, 0x17, 0xc2, 0x2e, 0x1c, 0xa5, + 0x43, 0x2d, 0x28, 0x6e, 0x7b, 0x63, 0xe7, 0x3f, 0xd9, 0x75, 0x9b, 0x07, 0x87, 0x33, 0x21, 0x5c, + 0x27, 0xa2, 0xc1, 0xc1, 0x01, 0xb8, 0xfc, 0xa1, 0x04, 0x53, 0x9d, 0x8e, 0x59, 0x60, 0xaa, 0xdf, + 0x7d, 0xe7, 0xdc, 0x0f, 0x03, 0x1c, 0x9d, 0x79, 0xe5, 0x84, 0x77, 0x59, 0xce, 0x24, 0x63, 0xde, + 0x2a, 0x7f, 0x29, 0xc1, 0x74, 0xba, 0x6a, 0x7d, 0x38, 0x85, 0xdc, 0x88, 0x9f, 0x42, 0xba, 0xbd, + 0x71, 0x48, 0xd7, 0x3b, 0xe3, 0x44, 0xb2, 0x9b, 0x3a, 0x06, 0x7d, 0x30, 0x72, 0x23, 0x6e, 0xe4, + 0xdc, 0xa1, 0x8d, 0x4c, 0x37, 0xb0, 0xfa, 0xe8, 0xcd, 0x5b, 0x33, 0xc7, 0x3e, 0xbb, 0x35, 0x73, + 0xec, 0x4f, 0xb7, 0x66, 0x8e, 0xbd, 0xbf, 0x37, 0x23, 0xdd, 0xdc, 0x9b, 0x91, 0x3e, 0xdb, 0x9b, + 0x91, 0xfe, 0xb2, 0x37, 0x23, 0x7d, 0xf0, 0xd7, 0x99, 0x63, 0xaf, 0x0c, 0x0a, 0xcc, 0x7f, 0x05, + 0x00, 0x00, 0xff, 0xff, 0x15, 0x10, 0x78, 0x1f, 0xbe, 0x3f, 0x00, 0x00, } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/extensions/v1beta1/generated.proto b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/extensions/v1beta1/generated.proto index 692588b5..d6a2751c 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/extensions/v1beta1/generated.proto +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/extensions/v1beta1/generated.proto @@ -74,7 +74,7 @@ message DaemonSet { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec defines the desired behavior of this daemon set. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -148,7 +148,7 @@ message DaemonSetStatus { message Deployment { // Standard object metadata. // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Specification of the desired behavior of the Deployment. // +optional @@ -341,7 +341,7 @@ message HTTPIngressRuleValue { message HorizontalPodAutoscaler { // Standard object metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // behaviour of autoscaler. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. // +optional @@ -431,7 +431,7 @@ message Ingress { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec is the desired state of the Ingress. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -553,7 +553,7 @@ message NetworkPolicy { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Specification of the desired behavior for this NetworkPolicy. // +optional @@ -652,7 +652,7 @@ message PodSecurityPolicy { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // spec defines the policy enforced. // +optional @@ -741,7 +741,7 @@ message ReplicaSet { // be the same as the Pod(s) that the ReplicaSet manages. // Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec defines the specification of the desired behavior of the ReplicaSet. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -911,7 +911,7 @@ message SELinuxStrategyOptions { message Scale { // Standard object metadata; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata. // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // defines the behavior of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. // +optional @@ -984,7 +984,7 @@ message SupplementalGroupsStrategyOptions { message ThirdPartyResource { // Standard object metadata // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Description is the description of this object. // +optional @@ -999,7 +999,7 @@ message ThirdPartyResource { message ThirdPartyResourceData { // Standard object metadata. // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Data is the raw JSON data for this data. // +optional diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/extensions/v1beta1/register.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/extensions/v1beta1/register.go index d27bba62..769f4737 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/extensions/v1beta1/register.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/extensions/v1beta1/register.go @@ -57,7 +57,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { &ThirdPartyResourceDataList{}, &Ingress{}, &IngressList{}, - &v1.ListOptions{}, &v1.DeleteOptions{}, &metav1.ExportOptions{}, &metav1.GetOptions{}, diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/extensions/v1beta1/types.generated.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/extensions/v1beta1/types.generated.go index 0667e729..bad0b479 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/extensions/v1beta1/types.generated.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/extensions/v1beta1/types.generated.go @@ -26,9 +26,9 @@ import ( "fmt" codec1978 "github.com/ugorji/go/codec" pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - pkg3_types "k8s.io/apimachinery/pkg/types" - pkg4_resource "k8s.io/client-go/pkg/api/resource" - pkg2_v1 "k8s.io/client-go/pkg/api/v1" + pkg2_types "k8s.io/apimachinery/pkg/types" + pkg3_resource "k8s.io/client-go/pkg/api/resource" + pkg4_v1 "k8s.io/client-go/pkg/api/v1" pkg5_intstr "k8s.io/client-go/pkg/util/intstr" "reflect" "runtime" @@ -66,9 +66,9 @@ func init() { } if false { // reference the types, but skip this branch at build/run time var v0 pkg1_v1.TypeMeta - var v1 pkg3_types.UID - var v2 pkg4_resource.Quantity - var v3 pkg2_v1.ObjectMeta + var v1 pkg2_types.UID + var v2 pkg3_resource.Quantity + var v3 pkg4_v1.PodTemplateSpec var v4 pkg5_intstr.IntOrString var v5 time.Time _, _, _, _, _, _ = v0, v1, v2, v3, v4, v5 @@ -647,7 +647,13 @@ func (x *Scale) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -657,7 +663,13 @@ func (x *Scale) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -781,24 +793,30 @@ func (x *Scale) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = ScaleSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = ScaleStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -811,16 +829,16 @@ func (x *Scale) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -828,21 +846,21 @@ func (x *Scale) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -850,38 +868,44 @@ func (x *Scale) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -889,16 +913,16 @@ func (x *Scale) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = ScaleSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -906,21 +930,21 @@ func (x *Scale) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = ScaleStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -1852,7 +1876,7 @@ func (x *CustomMetricTarget) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } case "value": if r.TryDecodeAsNil() { - x.TargetValue = pkg4_resource.Quantity{} + x.TargetValue = pkg3_resource.Quantity{} } else { yyv6 := &x.TargetValue yym7 := z.DecBinary() @@ -1913,7 +1937,7 @@ func (x *CustomMetricTarget) codecDecodeSelfFromArray(l int, d *codec1978.Decode } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.TargetValue = pkg4_resource.Quantity{} + x.TargetValue = pkg3_resource.Quantity{} } else { yyv11 := &x.TargetValue yym12 := z.DecBinary() @@ -2275,7 +2299,7 @@ func (x *CustomMetricCurrentStatus) codecDecodeSelfFromMap(l int, d *codec1978.D } case "value": if r.TryDecodeAsNil() { - x.CurrentValue = pkg4_resource.Quantity{} + x.CurrentValue = pkg3_resource.Quantity{} } else { yyv6 := &x.CurrentValue yym7 := z.DecBinary() @@ -2336,7 +2360,7 @@ func (x *CustomMetricCurrentStatus) codecDecodeSelfFromArray(l int, d *codec1978 } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.CurrentValue = pkg4_resource.Quantity{} + x.CurrentValue = pkg3_resource.Quantity{} } else { yyv11 := &x.CurrentValue yym12 := z.DecBinary() @@ -3458,7 +3482,13 @@ func (x *HorizontalPodAutoscaler) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -3468,7 +3498,13 @@ func (x *HorizontalPodAutoscaler) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -3592,24 +3628,30 @@ func (x *HorizontalPodAutoscaler) codecDecodeSelfFromMap(l int, d *codec1978.Dec } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = HorizontalPodAutoscalerSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = HorizontalPodAutoscalerStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -3622,16 +3664,16 @@ func (x *HorizontalPodAutoscaler) codecDecodeSelfFromArray(l int, d *codec1978.D var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3639,21 +3681,21 @@ func (x *HorizontalPodAutoscaler) codecDecodeSelfFromArray(l int, d *codec1978.D if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3661,38 +3703,44 @@ func (x *HorizontalPodAutoscaler) codecDecodeSelfFromArray(l int, d *codec1978.D if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3700,16 +3748,16 @@ func (x *HorizontalPodAutoscaler) codecDecodeSelfFromArray(l int, d *codec1978.D if r.TryDecodeAsNil() { x.Spec = HorizontalPodAutoscalerSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3717,21 +3765,21 @@ func (x *HorizontalPodAutoscaler) codecDecodeSelfFromArray(l int, d *codec1978.D if r.TryDecodeAsNil() { x.Status = HorizontalPodAutoscalerStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -4193,7 +4241,13 @@ func (x *ThirdPartyResource) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -4203,7 +4257,13 @@ func (x *ThirdPartyResource) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -4351,33 +4411,39 @@ func (x *ThirdPartyResource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "description": if r.TryDecodeAsNil() { x.Description = "" } else { - yyv9 := &x.Description - yym10 := z.DecBinary() - _ = yym10 + yyv10 := &x.Description + yym11 := z.DecBinary() + _ = yym11 if false { } else { - *((*string)(yyv9)) = r.DecodeString() + *((*string)(yyv10)) = r.DecodeString() } } case "versions": if r.TryDecodeAsNil() { x.Versions = nil } else { - yyv11 := &x.Versions - yym12 := z.DecBinary() - _ = yym12 + yyv12 := &x.Versions + yym13 := z.DecBinary() + _ = yym13 if false { } else { - h.decSliceAPIVersion((*[]APIVersion)(yyv11), d) + h.decSliceAPIVersion((*[]APIVersion)(yyv12), d) } } default: @@ -4391,16 +4457,16 @@ func (x *ThirdPartyResource) codecDecodeSelfFromArray(l int, d *codec1978.Decode var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj13 int - var yyb13 bool - var yyhl13 bool = l >= 0 - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + var yyj14 int + var yyb14 bool + var yyhl14 bool = l >= 0 + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4408,21 +4474,21 @@ func (x *ThirdPartyResource) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv14 := &x.Kind - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.Kind + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4430,38 +4496,44 @@ func (x *ThirdPartyResource) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv16 := &x.APIVersion - yym17 := z.DecBinary() - _ = yym17 + yyv17 := &x.APIVersion + yym18 := z.DecBinary() + _ = yym18 if false { } else { - *((*string)(yyv16)) = r.DecodeString() + *((*string)(yyv17)) = r.DecodeString() } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv18 := &x.ObjectMeta - yyv18.CodecDecodeSelf(d) + yyv19 := &x.ObjectMeta + yym20 := z.DecBinary() + _ = yym20 + if false { + } else if z.HasExtensions() && z.DecExt(yyv19) { + } else { + z.DecFallback(yyv19, false) + } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4469,21 +4541,21 @@ func (x *ThirdPartyResource) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.Description = "" } else { - yyv19 := &x.Description - yym20 := z.DecBinary() - _ = yym20 + yyv21 := &x.Description + yym22 := z.DecBinary() + _ = yym22 if false { } else { - *((*string)(yyv19)) = r.DecodeString() + *((*string)(yyv21)) = r.DecodeString() } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -4491,26 +4563,26 @@ func (x *ThirdPartyResource) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.Versions = nil } else { - yyv21 := &x.Versions - yym22 := z.DecBinary() - _ = yym22 + yyv23 := &x.Versions + yym24 := z.DecBinary() + _ = yym24 if false { } else { - h.decSliceAPIVersion((*[]APIVersion)(yyv21), d) + h.decSliceAPIVersion((*[]APIVersion)(yyv23), d) } } for { - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj13-1, "") + z.DecStructFieldNotFound(yyj14-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -5152,7 +5224,13 @@ func (x *ThirdPartyResourceData) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -5162,7 +5240,13 @@ func (x *ThirdPartyResourceData) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -5285,21 +5369,27 @@ func (x *ThirdPartyResourceData) codecDecodeSelfFromMap(l int, d *codec1978.Deco } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "data": if r.TryDecodeAsNil() { x.Data = nil } else { - yyv9 := &x.Data - yym10 := z.DecBinary() - _ = yym10 + yyv10 := &x.Data + yym11 := z.DecBinary() + _ = yym11 if false { } else { - *yyv9 = r.DecodeBytes(*(*[]byte)(yyv9), false, false) + *yyv10 = r.DecodeBytes(*(*[]byte)(yyv10), false, false) } } default: @@ -5313,16 +5403,16 @@ func (x *ThirdPartyResourceData) codecDecodeSelfFromArray(l int, d *codec1978.De var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5330,21 +5420,21 @@ func (x *ThirdPartyResourceData) codecDecodeSelfFromArray(l int, d *codec1978.De if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5352,38 +5442,44 @@ func (x *ThirdPartyResourceData) codecDecodeSelfFromArray(l int, d *codec1978.De if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5391,26 +5487,26 @@ func (x *ThirdPartyResourceData) codecDecodeSelfFromArray(l int, d *codec1978.De if r.TryDecodeAsNil() { x.Data = nil } else { - yyv17 := &x.Data - yym18 := z.DecBinary() - _ = yym18 + yyv19 := &x.Data + yym20 := z.DecBinary() + _ = yym20 if false { } else { - *yyv17 = r.DecodeBytes(*(*[]byte)(yyv17), false, false) + *yyv19 = r.DecodeBytes(*(*[]byte)(yyv19), false, false) } } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -5504,7 +5600,13 @@ func (x *Deployment) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -5514,7 +5616,13 @@ func (x *Deployment) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -5638,24 +5746,30 @@ func (x *Deployment) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = DeploymentSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = DeploymentStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -5668,16 +5782,16 @@ func (x *Deployment) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5685,21 +5799,21 @@ func (x *Deployment) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5707,38 +5821,44 @@ func (x *Deployment) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5746,16 +5866,16 @@ func (x *Deployment) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = DeploymentSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -5763,21 +5883,21 @@ func (x *Deployment) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = DeploymentStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -6157,7 +6277,7 @@ func (x *DeploymentSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "template": if r.TryDecodeAsNil() { - x.Template = pkg2_v1.PodTemplateSpec{} + x.Template = pkg4_v1.PodTemplateSpec{} } else { yyv8 := &x.Template yyv8.CodecDecodeSelf(d) @@ -6315,7 +6435,7 @@ func (x *DeploymentSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.Template = pkg2_v1.PodTemplateSpec{} + x.Template = pkg4_v1.PodTemplateSpec{} } else { yyv24 := &x.Template yyv24.CodecDecodeSelf(d) @@ -9161,7 +9281,7 @@ func (x *DaemonSetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "template": if r.TryDecodeAsNil() { - x.Template = pkg2_v1.PodTemplateSpec{} + x.Template = pkg4_v1.PodTemplateSpec{} } else { yyv6 := &x.Template yyv6.CodecDecodeSelf(d) @@ -9219,7 +9339,7 @@ func (x *DaemonSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.Template = pkg2_v1.PodTemplateSpec{} + x.Template = pkg4_v1.PodTemplateSpec{} } else { yyv10 := &x.Template yyv10.CodecDecodeSelf(d) @@ -9722,7 +9842,13 @@ func (x *DaemonSet) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -9732,7 +9858,13 @@ func (x *DaemonSet) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -9856,24 +9988,30 @@ func (x *DaemonSet) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = DaemonSetSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = DaemonSetStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -9886,16 +10024,16 @@ func (x *DaemonSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9903,21 +10041,21 @@ func (x *DaemonSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9925,38 +10063,44 @@ func (x *DaemonSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9964,16 +10108,16 @@ func (x *DaemonSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = DaemonSetSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -9981,21 +10125,21 @@ func (x *DaemonSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = DaemonSetStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -10825,7 +10969,13 @@ func (x *Ingress) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -10835,7 +10985,13 @@ func (x *Ingress) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -10959,24 +11115,30 @@ func (x *Ingress) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = IngressSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = IngressStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -10989,16 +11151,16 @@ func (x *Ingress) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11006,21 +11168,21 @@ func (x *Ingress) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11028,38 +11190,44 @@ func (x *Ingress) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11067,16 +11235,16 @@ func (x *Ingress) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = IngressSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -11084,21 +11252,21 @@ func (x *Ingress) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = IngressStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -12144,7 +12312,7 @@ func (x *IngressStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { switch yys3 { case "loadBalancer": if r.TryDecodeAsNil() { - x.LoadBalancer = pkg2_v1.LoadBalancerStatus{} + x.LoadBalancer = pkg4_v1.LoadBalancerStatus{} } else { yyv4 := &x.LoadBalancer yyv4.CodecDecodeSelf(d) @@ -12175,7 +12343,7 @@ func (x *IngressStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.LoadBalancer = pkg2_v1.LoadBalancerStatus{} + x.LoadBalancer = pkg4_v1.LoadBalancerStatus{} } else { yyv6 := &x.LoadBalancer yyv6.CodecDecodeSelf(d) @@ -13358,7 +13526,13 @@ func (x *ReplicaSet) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -13368,7 +13542,13 @@ func (x *ReplicaSet) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -13492,24 +13672,30 @@ func (x *ReplicaSet) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = ReplicaSetSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = ReplicaSetStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -13522,16 +13708,16 @@ func (x *ReplicaSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -13539,21 +13725,21 @@ func (x *ReplicaSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -13561,38 +13747,44 @@ func (x *ReplicaSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -13600,16 +13792,16 @@ func (x *ReplicaSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = ReplicaSetSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -13617,21 +13809,21 @@ func (x *ReplicaSet) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = ReplicaSetStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -14258,7 +14450,7 @@ func (x *ReplicaSetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "template": if r.TryDecodeAsNil() { - x.Template = pkg2_v1.PodTemplateSpec{} + x.Template = pkg4_v1.PodTemplateSpec{} } else { yyv10 := &x.Template yyv10.CodecDecodeSelf(d) @@ -14364,7 +14556,7 @@ func (x *ReplicaSetSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.Template = pkg2_v1.PodTemplateSpec{} + x.Template = pkg4_v1.PodTemplateSpec{} } else { yyv18 := &x.Template yyv18.CodecDecodeSelf(d) @@ -15372,7 +15564,13 @@ func (x *PodSecurityPolicy) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -15382,7 +15580,13 @@ func (x *PodSecurityPolicy) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -15489,17 +15693,23 @@ func (x *PodSecurityPolicy) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = PodSecurityPolicySpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -15512,16 +15722,16 @@ func (x *PodSecurityPolicy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + var yyj11 int + var yyb11 bool + var yyhl11 bool = l >= 0 + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -15529,21 +15739,21 @@ func (x *PodSecurityPolicy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv11 := &x.Kind - yym12 := z.DecBinary() - _ = yym12 + yyv12 := &x.Kind + yym13 := z.DecBinary() + _ = yym13 if false { } else { - *((*string)(yyv11)) = r.DecodeString() + *((*string)(yyv12)) = r.DecodeString() } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -15551,38 +15761,44 @@ func (x *PodSecurityPolicy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv13 := &x.APIVersion - yym14 := z.DecBinary() - _ = yym14 + yyv14 := &x.APIVersion + yym15 := z.DecBinary() + _ = yym15 if false { } else { - *((*string)(yyv13)) = r.DecodeString() + *((*string)(yyv14)) = r.DecodeString() } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv15 := &x.ObjectMeta - yyv15.CodecDecodeSelf(d) + yyv16 := &x.ObjectMeta + yym17 := z.DecBinary() + _ = yym17 + if false { + } else if z.HasExtensions() && z.DecExt(yyv16) { + } else { + z.DecFallback(yyv16, false) + } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -15590,21 +15806,21 @@ func (x *PodSecurityPolicy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder if r.TryDecodeAsNil() { x.Spec = PodSecurityPolicySpec{} } else { - yyv16 := &x.Spec - yyv16.CodecDecodeSelf(d) + yyv18 := &x.Spec + yyv18.CodecDecodeSelf(d) } for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj10-1, "") + z.DecStructFieldNotFound(yyj11-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -15684,7 +15900,7 @@ func (x *PodSecurityPolicySpec) CodecEncodeSelf(e *codec1978.Encoder) { _ = yym7 if false { } else { - h.encSlicev1_Capability(([]pkg2_v1.Capability)(x.DefaultAddCapabilities), e) + h.encSlicev1_Capability(([]pkg4_v1.Capability)(x.DefaultAddCapabilities), e) } } } else { @@ -15702,7 +15918,7 @@ func (x *PodSecurityPolicySpec) CodecEncodeSelf(e *codec1978.Encoder) { _ = yym8 if false { } else { - h.encSlicev1_Capability(([]pkg2_v1.Capability)(x.DefaultAddCapabilities), e) + h.encSlicev1_Capability(([]pkg4_v1.Capability)(x.DefaultAddCapabilities), e) } } } @@ -15717,7 +15933,7 @@ func (x *PodSecurityPolicySpec) CodecEncodeSelf(e *codec1978.Encoder) { _ = yym10 if false { } else { - h.encSlicev1_Capability(([]pkg2_v1.Capability)(x.RequiredDropCapabilities), e) + h.encSlicev1_Capability(([]pkg4_v1.Capability)(x.RequiredDropCapabilities), e) } } } else { @@ -15735,7 +15951,7 @@ func (x *PodSecurityPolicySpec) CodecEncodeSelf(e *codec1978.Encoder) { _ = yym11 if false { } else { - h.encSlicev1_Capability(([]pkg2_v1.Capability)(x.RequiredDropCapabilities), e) + h.encSlicev1_Capability(([]pkg4_v1.Capability)(x.RequiredDropCapabilities), e) } } } @@ -15750,7 +15966,7 @@ func (x *PodSecurityPolicySpec) CodecEncodeSelf(e *codec1978.Encoder) { _ = yym13 if false { } else { - h.encSlicev1_Capability(([]pkg2_v1.Capability)(x.AllowedCapabilities), e) + h.encSlicev1_Capability(([]pkg4_v1.Capability)(x.AllowedCapabilities), e) } } } else { @@ -15768,7 +15984,7 @@ func (x *PodSecurityPolicySpec) CodecEncodeSelf(e *codec1978.Encoder) { _ = yym14 if false { } else { - h.encSlicev1_Capability(([]pkg2_v1.Capability)(x.AllowedCapabilities), e) + h.encSlicev1_Capability(([]pkg4_v1.Capability)(x.AllowedCapabilities), e) } } } @@ -16065,7 +16281,7 @@ func (x *PodSecurityPolicySpec) codecDecodeSelfFromMap(l int, d *codec1978.Decod _ = yym7 if false { } else { - h.decSlicev1_Capability((*[]pkg2_v1.Capability)(yyv6), d) + h.decSlicev1_Capability((*[]pkg4_v1.Capability)(yyv6), d) } } case "requiredDropCapabilities": @@ -16077,7 +16293,7 @@ func (x *PodSecurityPolicySpec) codecDecodeSelfFromMap(l int, d *codec1978.Decod _ = yym9 if false { } else { - h.decSlicev1_Capability((*[]pkg2_v1.Capability)(yyv8), d) + h.decSlicev1_Capability((*[]pkg4_v1.Capability)(yyv8), d) } } case "allowedCapabilities": @@ -16089,7 +16305,7 @@ func (x *PodSecurityPolicySpec) codecDecodeSelfFromMap(l int, d *codec1978.Decod _ = yym11 if false { } else { - h.decSlicev1_Capability((*[]pkg2_v1.Capability)(yyv10), d) + h.decSlicev1_Capability((*[]pkg4_v1.Capability)(yyv10), d) } } case "volumes": @@ -16247,7 +16463,7 @@ func (x *PodSecurityPolicySpec) codecDecodeSelfFromArray(l int, d *codec1978.Dec _ = yym32 if false { } else { - h.decSlicev1_Capability((*[]pkg2_v1.Capability)(yyv31), d) + h.decSlicev1_Capability((*[]pkg4_v1.Capability)(yyv31), d) } } yyj28++ @@ -16269,7 +16485,7 @@ func (x *PodSecurityPolicySpec) codecDecodeSelfFromArray(l int, d *codec1978.Dec _ = yym34 if false { } else { - h.decSlicev1_Capability((*[]pkg2_v1.Capability)(yyv33), d) + h.decSlicev1_Capability((*[]pkg4_v1.Capability)(yyv33), d) } } yyj28++ @@ -16291,7 +16507,7 @@ func (x *PodSecurityPolicySpec) codecDecodeSelfFromArray(l int, d *codec1978.Dec _ = yym36 if false { } else { - h.decSlicev1_Capability((*[]pkg2_v1.Capability)(yyv35), d) + h.decSlicev1_Capability((*[]pkg4_v1.Capability)(yyv35), d) } } yyj28++ @@ -16901,7 +17117,7 @@ func (x *SELinuxStrategyOptions) codecDecodeSelfFromMap(l int, d *codec1978.Deco } } else { if x.SELinuxOptions == nil { - x.SELinuxOptions = new(pkg2_v1.SELinuxOptions) + x.SELinuxOptions = new(pkg4_v1.SELinuxOptions) } x.SELinuxOptions.CodecDecodeSelf(d) } @@ -16953,7 +17169,7 @@ func (x *SELinuxStrategyOptions) codecDecodeSelfFromArray(l int, d *codec1978.De } } else { if x.SELinuxOptions == nil { - x.SELinuxOptions = new(pkg2_v1.SELinuxOptions) + x.SELinuxOptions = new(pkg4_v1.SELinuxOptions) } x.SELinuxOptions.CodecDecodeSelf(d) } @@ -18440,7 +18656,13 @@ func (x *NetworkPolicy) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -18450,7 +18672,13 @@ func (x *NetworkPolicy) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -18557,17 +18785,23 @@ func (x *NetworkPolicy) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = NetworkPolicySpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -18580,16 +18814,16 @@ func (x *NetworkPolicy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + var yyj11 int + var yyb11 bool + var yyhl11 bool = l >= 0 + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -18597,21 +18831,21 @@ func (x *NetworkPolicy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv11 := &x.Kind - yym12 := z.DecBinary() - _ = yym12 + yyv12 := &x.Kind + yym13 := z.DecBinary() + _ = yym13 if false { } else { - *((*string)(yyv11)) = r.DecodeString() + *((*string)(yyv12)) = r.DecodeString() } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -18619,38 +18853,44 @@ func (x *NetworkPolicy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv13 := &x.APIVersion - yym14 := z.DecBinary() - _ = yym14 + yyv14 := &x.APIVersion + yym15 := z.DecBinary() + _ = yym15 if false { } else { - *((*string)(yyv13)) = r.DecodeString() + *((*string)(yyv14)) = r.DecodeString() } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv15 := &x.ObjectMeta - yyv15.CodecDecodeSelf(d) + yyv16 := &x.ObjectMeta + yym17 := z.DecBinary() + _ = yym17 + if false { + } else if z.HasExtensions() && z.DecExt(yyv16) { + } else { + z.DecFallback(yyv16, false) + } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -18658,21 +18898,21 @@ func (x *NetworkPolicy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = NetworkPolicySpec{} } else { - yyv16 := &x.Spec - yyv16.CodecDecodeSelf(d) + yyv18 := &x.Spec + yyv18.CodecDecodeSelf(d) } for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj10-1, "") + z.DecStructFieldNotFound(yyj11-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -19348,7 +19588,7 @@ func (x *NetworkPolicyPort) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } } else { if x.Protocol == nil { - x.Protocol = new(pkg2_v1.Protocol) + x.Protocol = new(pkg4_v1.Protocol) } x.Protocol.CodecDecodeSelf(d) } @@ -19402,7 +19642,7 @@ func (x *NetworkPolicyPort) codecDecodeSelfFromArray(l int, d *codec1978.Decoder } } else { if x.Protocol == nil { - x.Protocol = new(pkg2_v1.Protocol) + x.Protocol = new(pkg4_v1.Protocol) } x.Protocol.CodecDecodeSelf(d) } @@ -20853,7 +21093,7 @@ func (x codecSelfer1234) decSliceDeployment(v *[]Deployment, d *codec1978.Decode yyrg1 := len(yyv1) > 0 yyv21 := yyv1 - yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 872) + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 888) if yyrt1 { if yyrl1 <= cap(yyv1) { yyv1 = yyv1[:yyrl1] @@ -20972,7 +21212,7 @@ func (x codecSelfer1234) decSliceDaemonSet(v *[]DaemonSet, d *codec1978.Decoder) yyrg1 := len(yyv1) > 0 yyv21 := yyv1 - yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 768) + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 784) if yyrt1 { if yyrl1 <= cap(yyv1) { yyv1 = yyv1[:yyrl1] @@ -21686,7 +21926,7 @@ func (x codecSelfer1234) decSliceReplicaSet(v *[]ReplicaSet, d *codec1978.Decode yyrg1 := len(yyv1) > 0 yyv21 := yyv1 - yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 808) + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 824) if yyrt1 { if yyrl1 <= cap(yyv1) { yyv1 = yyv1[:yyrl1] @@ -21885,7 +22125,7 @@ func (x codecSelfer1234) decSliceReplicaSetCondition(v *[]ReplicaSetCondition, d } } -func (x codecSelfer1234) encSlicev1_Capability(v []pkg2_v1.Capability, e *codec1978.Encoder) { +func (x codecSelfer1234) encSlicev1_Capability(v []pkg4_v1.Capability, e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) _, _, _ = h, z, r @@ -21898,7 +22138,7 @@ func (x codecSelfer1234) encSlicev1_Capability(v []pkg2_v1.Capability, e *codec1 z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } -func (x codecSelfer1234) decSlicev1_Capability(v *[]pkg2_v1.Capability, d *codec1978.Decoder) { +func (x codecSelfer1234) decSlicev1_Capability(v *[]pkg4_v1.Capability, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r @@ -21909,7 +22149,7 @@ func (x codecSelfer1234) decSlicev1_Capability(v *[]pkg2_v1.Capability, d *codec _ = yyc1 if yyl1 == 0 { if yyv1 == nil { - yyv1 = []pkg2_v1.Capability{} + yyv1 = []pkg4_v1.Capability{} yyc1 = true } else if len(yyv1) != 0 { yyv1 = yyv1[:0] @@ -21927,10 +22167,10 @@ func (x codecSelfer1234) decSlicev1_Capability(v *[]pkg2_v1.Capability, d *codec if yyrl1 <= cap(yyv1) { yyv1 = yyv1[:yyrl1] } else { - yyv1 = make([]pkg2_v1.Capability, yyrl1) + yyv1 = make([]pkg4_v1.Capability, yyrl1) } } else { - yyv1 = make([]pkg2_v1.Capability, yyrl1) + yyv1 = make([]pkg4_v1.Capability, yyrl1) } yyc1 = true yyrr1 = len(yyv1) @@ -21968,7 +22208,7 @@ func (x codecSelfer1234) decSlicev1_Capability(v *[]pkg2_v1.Capability, d *codec for ; !r.CheckBreak(); yyj1++ { if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, "") // var yyz1 pkg2_v1.Capability + yyv1 = append(yyv1, "") // var yyz1 pkg4_v1.Capability yyc1 = true } yyh1.ElemContainerState(yyj1) @@ -21989,7 +22229,7 @@ func (x codecSelfer1234) decSlicev1_Capability(v *[]pkg2_v1.Capability, d *codec yyv1 = yyv1[:yyj1] yyc1 = true } else if yyj1 == 0 && yyv1 == nil { - yyv1 = []pkg2_v1.Capability{} + yyv1 = []pkg4_v1.Capability{} yyc1 = true } } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/extensions/v1beta1/types.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/extensions/v1beta1/types.go index 4e7f426e..2624372a 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/extensions/v1beta1/types.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/extensions/v1beta1/types.go @@ -57,7 +57,7 @@ type Scale struct { metav1.TypeMeta `json:",inline"` // Standard object metadata; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata. // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // defines the behavior of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. // +optional @@ -162,7 +162,7 @@ type HorizontalPodAutoscaler struct { metav1.TypeMeta `json:",inline"` // Standard object metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // behaviour of autoscaler. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. // +optional @@ -194,7 +194,7 @@ type ThirdPartyResource struct { // Standard object metadata // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Description is the description of this object. // +optional @@ -229,7 +229,7 @@ type ThirdPartyResourceData struct { metav1.TypeMeta `json:",inline"` // Standard object metadata. // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Data is the raw JSON data for this data. // +optional @@ -243,7 +243,7 @@ type Deployment struct { metav1.TypeMeta `json:",inline"` // Standard object metadata. // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Specification of the desired behavior of the Deployment. // +optional @@ -582,7 +582,7 @@ type DaemonSet struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec defines the desired behavior of this daemon set. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -633,7 +633,7 @@ type Ingress struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec is the desired state of the Ingress. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -798,7 +798,7 @@ type ReplicaSet struct { // be the same as the Pod(s) that the ReplicaSet manages. // Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec defines the specification of the desired behavior of the ReplicaSet. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status @@ -920,7 +920,7 @@ type PodSecurityPolicy struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // spec defines the policy enforced. // +optional @@ -1128,7 +1128,7 @@ type NetworkPolicy struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Specification of the desired behavior for this NetworkPolicy. // +optional diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/extensions/v1beta1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/extensions/v1beta1/zz_generated.conversion.go index 86511575..2c94127e 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/extensions/v1beta1/zz_generated.conversion.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/extensions/v1beta1/zz_generated.conversion.go @@ -258,10 +258,7 @@ func Convert_extensions_CustomMetricTargetList_To_v1beta1_CustomMetricTargetList } func autoConvert_v1beta1_DaemonSet_To_extensions_DaemonSet(in *DaemonSet, out *extensions.DaemonSet, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_DaemonSetSpec_To_extensions_DaemonSetSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -276,10 +273,7 @@ func Convert_v1beta1_DaemonSet_To_extensions_DaemonSet(in *DaemonSet, out *exten } func autoConvert_extensions_DaemonSet_To_v1beta1_DaemonSet(in *extensions.DaemonSet, out *DaemonSet, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_extensions_DaemonSetSpec_To_v1beta1_DaemonSetSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -384,10 +378,7 @@ func Convert_extensions_DaemonSetStatus_To_v1beta1_DaemonSetStatus(in *extension } func autoConvert_v1beta1_Deployment_To_extensions_Deployment(in *Deployment, out *extensions.Deployment, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_DeploymentSpec_To_extensions_DeploymentSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -402,10 +393,7 @@ func Convert_v1beta1_Deployment_To_extensions_Deployment(in *Deployment, out *ex } func autoConvert_extensions_Deployment_To_v1beta1_Deployment(in *extensions.Deployment, out *Deployment, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_extensions_DeploymentSpec_To_v1beta1_DeploymentSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -672,10 +660,7 @@ func Convert_extensions_HTTPIngressRuleValue_To_v1beta1_HTTPIngressRuleValue(in } func autoConvert_v1beta1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler(in *HorizontalPodAutoscaler, out *autoscaling.HorizontalPodAutoscaler, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -690,10 +675,7 @@ func Convert_v1beta1_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutosca } func autoConvert_autoscaling_HorizontalPodAutoscaler_To_v1beta1_HorizontalPodAutoscaler(in *autoscaling.HorizontalPodAutoscaler, out *HorizontalPodAutoscaler, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_autoscaling_HorizontalPodAutoscalerSpec_To_v1beta1_HorizontalPodAutoscalerSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -830,10 +812,7 @@ func Convert_extensions_IDRange_To_v1beta1_IDRange(in *extensions.IDRange, out * } func autoConvert_v1beta1_Ingress_To_extensions_Ingress(in *Ingress, out *extensions.Ingress, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_IngressSpec_To_extensions_IngressSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -848,10 +827,7 @@ func Convert_v1beta1_Ingress_To_extensions_Ingress(in *Ingress, out *extensions. } func autoConvert_extensions_Ingress_To_v1beta1_Ingress(in *extensions.Ingress, out *Ingress, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_extensions_IngressSpec_To_v1beta1_IngressSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -1014,10 +990,7 @@ func Convert_extensions_IngressTLS_To_v1beta1_IngressTLS(in *extensions.IngressT } func autoConvert_v1beta1_NetworkPolicy_To_extensions_NetworkPolicy(in *NetworkPolicy, out *extensions.NetworkPolicy, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_NetworkPolicySpec_To_extensions_NetworkPolicySpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -1029,10 +1002,7 @@ func Convert_v1beta1_NetworkPolicy_To_extensions_NetworkPolicy(in *NetworkPolicy } func autoConvert_extensions_NetworkPolicy_To_v1beta1_NetworkPolicy(in *extensions.NetworkPolicy, out *NetworkPolicy, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_extensions_NetworkPolicySpec_To_v1beta1_NetworkPolicySpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -1144,10 +1114,7 @@ func Convert_extensions_NetworkPolicySpec_To_v1beta1_NetworkPolicySpec(in *exten } func autoConvert_v1beta1_PodSecurityPolicy_To_extensions_PodSecurityPolicy(in *PodSecurityPolicy, out *extensions.PodSecurityPolicy, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_PodSecurityPolicySpec_To_extensions_PodSecurityPolicySpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -1159,10 +1126,7 @@ func Convert_v1beta1_PodSecurityPolicy_To_extensions_PodSecurityPolicy(in *PodSe } func autoConvert_extensions_PodSecurityPolicy_To_v1beta1_PodSecurityPolicy(in *extensions.PodSecurityPolicy, out *PodSecurityPolicy, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_extensions_PodSecurityPolicySpec_To_v1beta1_PodSecurityPolicySpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -1294,10 +1258,7 @@ func Convert_extensions_PodSecurityPolicySpec_To_v1beta1_PodSecurityPolicySpec(i } func autoConvert_v1beta1_ReplicaSet_To_extensions_ReplicaSet(in *ReplicaSet, out *extensions.ReplicaSet, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_ReplicaSetSpec_To_extensions_ReplicaSetSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -1312,10 +1273,7 @@ func Convert_v1beta1_ReplicaSet_To_extensions_ReplicaSet(in *ReplicaSet, out *ex } func autoConvert_extensions_ReplicaSet_To_v1beta1_ReplicaSet(in *extensions.ReplicaSet, out *ReplicaSet, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_extensions_ReplicaSetSpec_To_v1beta1_ReplicaSetSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -1534,10 +1492,7 @@ func Convert_extensions_SELinuxStrategyOptions_To_v1beta1_SELinuxStrategyOptions } func autoConvert_v1beta1_Scale_To_extensions_Scale(in *Scale, out *extensions.Scale, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_ScaleSpec_To_extensions_ScaleSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -1552,10 +1507,7 @@ func Convert_v1beta1_Scale_To_extensions_Scale(in *Scale, out *extensions.Scale, } func autoConvert_extensions_Scale_To_v1beta1_Scale(in *extensions.Scale, out *Scale, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_extensions_ScaleSpec_To_v1beta1_ScaleSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -1621,10 +1573,7 @@ func Convert_extensions_SupplementalGroupsStrategyOptions_To_v1beta1_Supplementa } func autoConvert_v1beta1_ThirdPartyResource_To_extensions_ThirdPartyResource(in *ThirdPartyResource, out *extensions.ThirdPartyResource, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.Description = in.Description out.Versions = *(*[]extensions.APIVersion)(unsafe.Pointer(&in.Versions)) return nil @@ -1635,10 +1584,7 @@ func Convert_v1beta1_ThirdPartyResource_To_extensions_ThirdPartyResource(in *Thi } func autoConvert_extensions_ThirdPartyResource_To_v1beta1_ThirdPartyResource(in *extensions.ThirdPartyResource, out *ThirdPartyResource, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.Description = in.Description out.Versions = *(*[]APIVersion)(unsafe.Pointer(&in.Versions)) return nil @@ -1649,10 +1595,7 @@ func Convert_extensions_ThirdPartyResource_To_v1beta1_ThirdPartyResource(in *ext } func autoConvert_v1beta1_ThirdPartyResourceData_To_extensions_ThirdPartyResourceData(in *ThirdPartyResourceData, out *extensions.ThirdPartyResourceData, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.Data = *(*[]byte)(unsafe.Pointer(&in.Data)) return nil } @@ -1662,10 +1605,7 @@ func Convert_v1beta1_ThirdPartyResourceData_To_extensions_ThirdPartyResourceData } func autoConvert_extensions_ThirdPartyResourceData_To_v1beta1_ThirdPartyResourceData(in *extensions.ThirdPartyResourceData, out *ThirdPartyResourceData, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.Data = *(*[]byte)(unsafe.Pointer(&in.Data)) return nil } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/extensions/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/extensions/v1beta1/zz_generated.deepcopy.go index a0fd1ce5..f7a3d292 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/extensions/v1beta1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/extensions/v1beta1/zz_generated.deepcopy.go @@ -21,10 +21,10 @@ limitations under the License. package v1beta1 import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - v1 "k8s.io/client-go/pkg/api/v1" + api_v1 "k8s.io/client-go/pkg/api/v1" intstr "k8s.io/client-go/pkg/util/intstr" reflect "reflect" ) @@ -181,8 +181,10 @@ func DeepCopy_v1beta1_DaemonSet(in interface{}, out interface{}, c *conversion.C in := in.(*DaemonSet) out := out.(*DaemonSet) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v1beta1_DaemonSetSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -219,10 +221,10 @@ func DeepCopy_v1beta1_DaemonSetSpec(in interface{}, out interface{}, c *conversi if newVal, err := c.DeepCopy(*in); err != nil { return err } else { - *out = newVal.(*meta_v1.LabelSelector) + *out = newVal.(*v1.LabelSelector) } } - if err := v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil { + if err := api_v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil { return err } return nil @@ -243,8 +245,10 @@ func DeepCopy_v1beta1_Deployment(in interface{}, out interface{}, c *conversion. in := in.(*Deployment) out := out.(*Deployment) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v1beta1_DeploymentSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -316,10 +320,10 @@ func DeepCopy_v1beta1_DeploymentSpec(in interface{}, out interface{}, c *convers if newVal, err := c.DeepCopy(*in); err != nil { return err } else { - *out = newVal.(*meta_v1.LabelSelector) + *out = newVal.(*v1.LabelSelector) } } - if err := v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil { + if err := api_v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil { return err } if err := DeepCopy_v1beta1_DeploymentStrategy(&in.Strategy, &out.Strategy, c); err != nil { @@ -386,9 +390,7 @@ func DeepCopy_v1beta1_FSGroupStrategyOptions(in interface{}, out interface{}, c if in.Ranges != nil { in, out := &in.Ranges, &out.Ranges *out = make([]IDRange, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } @@ -411,9 +413,7 @@ func DeepCopy_v1beta1_HTTPIngressRuleValue(in interface{}, out interface{}, c *c if in.Paths != nil { in, out := &in.Paths, &out.Paths *out = make([]HTTPIngressPath, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } @@ -424,8 +424,10 @@ func DeepCopy_v1beta1_HorizontalPodAutoscaler(in interface{}, out interface{}, c in := in.(*HorizontalPodAutoscaler) out := out.(*HorizontalPodAutoscaler) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v1beta1_HorizontalPodAutoscalerSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -486,7 +488,7 @@ func DeepCopy_v1beta1_HorizontalPodAutoscalerStatus(in interface{}, out interfac } if in.LastScaleTime != nil { in, out := &in.LastScaleTime, &out.LastScaleTime - *out = new(meta_v1.Time) + *out = new(v1.Time) **out = (*in).DeepCopy() } if in.CurrentCPUUtilizationPercentage != nil { @@ -521,8 +523,10 @@ func DeepCopy_v1beta1_Ingress(in interface{}, out interface{}, c *conversion.Clo in := in.(*Ingress) out := out.(*Ingress) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v1beta1_IngressSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -626,7 +630,7 @@ func DeepCopy_v1beta1_IngressStatus(in interface{}, out interface{}, c *conversi in := in.(*IngressStatus) out := out.(*IngressStatus) *out = *in - if err := v1.DeepCopy_v1_LoadBalancerStatus(&in.LoadBalancer, &out.LoadBalancer, c); err != nil { + if err := api_v1.DeepCopy_v1_LoadBalancerStatus(&in.LoadBalancer, &out.LoadBalancer, c); err != nil { return err } return nil @@ -652,8 +656,10 @@ func DeepCopy_v1beta1_NetworkPolicy(in interface{}, out interface{}, c *conversi in := in.(*NetworkPolicy) out := out.(*NetworkPolicy) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v1beta1_NetworkPolicySpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -717,7 +723,7 @@ func DeepCopy_v1beta1_NetworkPolicyPeer(in interface{}, out interface{}, c *conv if newVal, err := c.DeepCopy(*in); err != nil { return err } else { - *out = newVal.(*meta_v1.LabelSelector) + *out = newVal.(*v1.LabelSelector) } } if in.NamespaceSelector != nil { @@ -725,7 +731,7 @@ func DeepCopy_v1beta1_NetworkPolicyPeer(in interface{}, out interface{}, c *conv if newVal, err := c.DeepCopy(*in); err != nil { return err } else { - *out = newVal.(*meta_v1.LabelSelector) + *out = newVal.(*v1.LabelSelector) } } return nil @@ -739,7 +745,7 @@ func DeepCopy_v1beta1_NetworkPolicyPort(in interface{}, out interface{}, c *conv *out = *in if in.Protocol != nil { in, out := &in.Protocol, &out.Protocol - *out = new(v1.Protocol) + *out = new(api_v1.Protocol) **out = **in } if in.Port != nil { @@ -759,7 +765,7 @@ func DeepCopy_v1beta1_NetworkPolicySpec(in interface{}, out interface{}, c *conv if newVal, err := c.DeepCopy(&in.PodSelector); err != nil { return err } else { - out.PodSelector = *newVal.(*meta_v1.LabelSelector) + out.PodSelector = *newVal.(*v1.LabelSelector) } if in.Ingress != nil { in, out := &in.Ingress, &out.Ingress @@ -779,8 +785,10 @@ func DeepCopy_v1beta1_PodSecurityPolicy(in interface{}, out interface{}, c *conv in := in.(*PodSecurityPolicy) out := out.(*PodSecurityPolicy) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v1beta1_PodSecurityPolicySpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -814,38 +822,28 @@ func DeepCopy_v1beta1_PodSecurityPolicySpec(in interface{}, out interface{}, c * *out = *in if in.DefaultAddCapabilities != nil { in, out := &in.DefaultAddCapabilities, &out.DefaultAddCapabilities - *out = make([]v1.Capability, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + *out = make([]api_v1.Capability, len(*in)) + copy(*out, *in) } if in.RequiredDropCapabilities != nil { in, out := &in.RequiredDropCapabilities, &out.RequiredDropCapabilities - *out = make([]v1.Capability, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + *out = make([]api_v1.Capability, len(*in)) + copy(*out, *in) } if in.AllowedCapabilities != nil { in, out := &in.AllowedCapabilities, &out.AllowedCapabilities - *out = make([]v1.Capability, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + *out = make([]api_v1.Capability, len(*in)) + copy(*out, *in) } if in.Volumes != nil { in, out := &in.Volumes, &out.Volumes *out = make([]FSType, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.HostPorts != nil { in, out := &in.HostPorts, &out.HostPorts *out = make([]HostPortRange, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if err := DeepCopy_v1beta1_SELinuxStrategyOptions(&in.SELinux, &out.SELinux, c); err != nil { return err @@ -868,8 +866,10 @@ func DeepCopy_v1beta1_ReplicaSet(in interface{}, out interface{}, c *conversion. in := in.(*ReplicaSet) out := out.(*ReplicaSet) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v1beta1_ReplicaSetSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -924,10 +924,10 @@ func DeepCopy_v1beta1_ReplicaSetSpec(in interface{}, out interface{}, c *convers if newVal, err := c.DeepCopy(*in); err != nil { return err } else { - *out = newVal.(*meta_v1.LabelSelector) + *out = newVal.(*v1.LabelSelector) } } - if err := v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil { + if err := api_v1.DeepCopy_v1_PodTemplateSpec(&in.Template, &out.Template, c); err != nil { return err } return nil @@ -997,9 +997,7 @@ func DeepCopy_v1beta1_RunAsUserStrategyOptions(in interface{}, out interface{}, if in.Ranges != nil { in, out := &in.Ranges, &out.Ranges *out = make([]IDRange, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } @@ -1012,7 +1010,7 @@ func DeepCopy_v1beta1_SELinuxStrategyOptions(in interface{}, out interface{}, c *out = *in if in.SELinuxOptions != nil { in, out := &in.SELinuxOptions, &out.SELinuxOptions - *out = new(v1.SELinuxOptions) + *out = new(api_v1.SELinuxOptions) **out = **in } return nil @@ -1024,8 +1022,10 @@ func DeepCopy_v1beta1_Scale(in interface{}, out interface{}, c *conversion.Clone in := in.(*Scale) out := out.(*Scale) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v1beta1_ScaleStatus(&in.Status, &out.Status, c); err != nil { return err @@ -1076,9 +1076,7 @@ func DeepCopy_v1beta1_SupplementalGroupsStrategyOptions(in interface{}, out inte if in.Ranges != nil { in, out := &in.Ranges, &out.Ranges *out = make([]IDRange, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } @@ -1089,15 +1087,15 @@ func DeepCopy_v1beta1_ThirdPartyResource(in interface{}, out interface{}, c *con in := in.(*ThirdPartyResource) out := out.(*ThirdPartyResource) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.Versions != nil { in, out := &in.Versions, &out.Versions *out = make([]APIVersion, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } @@ -1108,8 +1106,10 @@ func DeepCopy_v1beta1_ThirdPartyResourceData(in interface{}, out interface{}, c in := in.(*ThirdPartyResourceData) out := out.(*ThirdPartyResourceData) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.Data != nil { in, out := &in.Data, &out.Data diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/extensions/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/extensions/zz_generated.deepcopy.go index 68f8185d..56fd8fd0 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/extensions/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/extensions/zz_generated.deepcopy.go @@ -166,8 +166,10 @@ func DeepCopy_extensions_DaemonSet(in interface{}, out interface{}, c *conversio in := in.(*DaemonSet) out := out.(*DaemonSet) *out = *in - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_extensions_DaemonSetSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -228,8 +230,10 @@ func DeepCopy_extensions_Deployment(in interface{}, out interface{}, c *conversi in := in.(*Deployment) out := out.(*Deployment) *out = *in - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_extensions_DeploymentSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -364,9 +368,7 @@ func DeepCopy_extensions_FSGroupStrategyOptions(in interface{}, out interface{}, if in.Ranges != nil { in, out := &in.Ranges, &out.Ranges *out = make([]IDRange, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } @@ -389,9 +391,7 @@ func DeepCopy_extensions_HTTPIngressRuleValue(in interface{}, out interface{}, c if in.Paths != nil { in, out := &in.Paths, &out.Paths *out = make([]HTTPIngressPath, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } @@ -420,8 +420,10 @@ func DeepCopy_extensions_Ingress(in interface{}, out interface{}, c *conversion. in := in.(*Ingress) out := out.(*Ingress) *out = *in - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_extensions_IngressSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -551,8 +553,10 @@ func DeepCopy_extensions_NetworkPolicy(in interface{}, out interface{}, c *conve in := in.(*NetworkPolicy) out := out.(*NetworkPolicy) *out = *in - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_extensions_NetworkPolicySpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -678,8 +682,10 @@ func DeepCopy_extensions_PodSecurityPolicy(in interface{}, out interface{}, c *c in := in.(*PodSecurityPolicy) out := out.(*PodSecurityPolicy) *out = *in - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_extensions_PodSecurityPolicySpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -714,37 +720,27 @@ func DeepCopy_extensions_PodSecurityPolicySpec(in interface{}, out interface{}, if in.DefaultAddCapabilities != nil { in, out := &in.DefaultAddCapabilities, &out.DefaultAddCapabilities *out = make([]api.Capability, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.RequiredDropCapabilities != nil { in, out := &in.RequiredDropCapabilities, &out.RequiredDropCapabilities *out = make([]api.Capability, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.AllowedCapabilities != nil { in, out := &in.AllowedCapabilities, &out.AllowedCapabilities *out = make([]api.Capability, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.Volumes != nil { in, out := &in.Volumes, &out.Volumes *out = make([]FSType, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.HostPorts != nil { in, out := &in.HostPorts, &out.HostPorts *out = make([]HostPortRange, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if err := DeepCopy_extensions_SELinuxStrategyOptions(&in.SELinux, &out.SELinux, c); err != nil { return err @@ -767,8 +763,10 @@ func DeepCopy_extensions_ReplicaSet(in interface{}, out interface{}, c *conversi in := in.(*ReplicaSet) out := out.(*ReplicaSet) *out = *in - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_extensions_ReplicaSetSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -881,9 +879,7 @@ func DeepCopy_extensions_RunAsUserStrategyOptions(in interface{}, out interface{ if in.Ranges != nil { in, out := &in.Ranges, &out.Ranges *out = make([]IDRange, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } @@ -908,8 +904,10 @@ func DeepCopy_extensions_Scale(in interface{}, out interface{}, c *conversion.Cl in := in.(*Scale) out := out.(*Scale) *out = *in - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_extensions_ScaleStatus(&in.Status, &out.Status, c); err != nil { return err @@ -952,9 +950,7 @@ func DeepCopy_extensions_SupplementalGroupsStrategyOptions(in interface{}, out i if in.Ranges != nil { in, out := &in.Ranges, &out.Ranges *out = make([]IDRange, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } @@ -965,15 +961,15 @@ func DeepCopy_extensions_ThirdPartyResource(in interface{}, out interface{}, c * in := in.(*ThirdPartyResource) out := out.(*ThirdPartyResource) *out = *in - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.Versions != nil { in, out := &in.Versions, &out.Versions *out = make([]APIVersion, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } @@ -984,8 +980,10 @@ func DeepCopy_extensions_ThirdPartyResourceData(in interface{}, out interface{}, in := in.(*ThirdPartyResourceData) out := out.(*ThirdPartyResourceData) *out = *in - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.Data != nil { in, out := &in.Data, &out.Data diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/imagepolicy/install/install.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/imagepolicy/install/install.go index c1232e0c..67a857a5 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/imagepolicy/install/install.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/imagepolicy/install/install.go @@ -19,13 +19,21 @@ limitations under the License. package install import ( + "k8s.io/apimachinery/pkg/apimachinery/announced" + "k8s.io/apimachinery/pkg/apimachinery/registered" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/client-go/pkg/apimachinery/announced" + "k8s.io/client-go/pkg/api" "k8s.io/client-go/pkg/apis/imagepolicy" "k8s.io/client-go/pkg/apis/imagepolicy/v1alpha1" ) func init() { + Install(api.GroupFactoryRegistry, api.Registry, api.Scheme) +} + +// Install registers the API group and adds types to a scheme +func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) { if err := announced.NewGroupMetaFactory( &announced.GroupMetaFactoryArgs{ GroupName: imagepolicy.GroupName, @@ -37,7 +45,7 @@ func init() { announced.VersionToSchemeFunc{ v1alpha1.SchemeGroupVersion.Version: v1alpha1.AddToScheme, }, - ).Announce().RegisterAndEnable(); err != nil { + ).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil { panic(err) } } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/imagepolicy/register.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/imagepolicy/register.go index 0978171b..4f1f6e0d 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/imagepolicy/register.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/imagepolicy/register.go @@ -46,7 +46,6 @@ var ( func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, - &api.ListOptions{}, &api.DeleteOptions{}, &metav1.ExportOptions{}, &metav1.GetOptions{}, diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/imagepolicy/types.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/imagepolicy/types.go index 4f99a865..d23d2c8a 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/imagepolicy/types.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/imagepolicy/types.go @@ -18,7 +18,6 @@ package imagepolicy import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/client-go/pkg/api" ) // +genclient=true @@ -28,7 +27,7 @@ import ( // ImageReview checks if the set of images in a pod are allowed. type ImageReview struct { metav1.TypeMeta - api.ObjectMeta + metav1.ObjectMeta // Spec holds information about the pod being evaluated Spec ImageReviewSpec diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/imagepolicy/v1alpha1/generated.pb.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/imagepolicy/v1alpha1/generated.pb.go index 4d5b0d59..84abf0f5 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/imagepolicy/v1alpha1/generated.pb.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/imagepolicy/v1alpha1/generated.pb.go @@ -316,7 +316,7 @@ func (this *ImageReview) String() string { return "nil" } s := strings.Join([]string{`&ImageReview{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ImageReviewSpec", "ImageReviewSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ImageReviewStatus", "ImageReviewStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -1019,42 +1019,43 @@ var ( ) var fileDescriptorGenerated = []byte{ - // 588 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xa4, 0x92, 0xbf, 0x6f, 0x13, 0x31, - 0x14, 0xc7, 0x73, 0x49, 0x7f, 0xc5, 0x01, 0xda, 0x1a, 0x86, 0x28, 0xc3, 0xb5, 0x0a, 0x12, 0x2a, - 0x08, 0x6c, 0xa5, 0x42, 0xa8, 0x62, 0xa0, 0xf4, 0x10, 0x43, 0x07, 0x40, 0x98, 0x05, 0xb1, 0x39, - 0xd7, 0xd7, 0x8b, 0x9b, 0x3b, 0xfb, 0x74, 0xf6, 0xa5, 0xca, 0x80, 0xc4, 0xc8, 0xc0, 0xc0, 0x7f, - 0xc3, 0xbf, 0xd0, 0xb1, 0x23, 0x53, 0x45, 0xc3, 0x3f, 0x82, 0xce, 0x77, 0xe9, 0x1d, 0x4d, 0x23, - 0x84, 0xb2, 0xf9, 0xf9, 0xf9, 0x7d, 0xbe, 0x5f, 0xbf, 0xf7, 0xd0, 0xfe, 0x70, 0x4f, 0x13, 0xa1, - 0xe8, 0x30, 0xed, 0x43, 0x22, 0xc1, 0x80, 0xa6, 0xf1, 0x30, 0xa0, 0x3c, 0x16, 0x9a, 0x8a, 0x88, - 0x07, 0x10, 0xab, 0x50, 0xf8, 0x63, 0x3a, 0xea, 0xf1, 0x30, 0x1e, 0xf0, 0x1e, 0x0d, 0x40, 0x42, - 0xc2, 0x0d, 0x1c, 0x91, 0x38, 0x51, 0x46, 0x61, 0x9a, 0x03, 0x48, 0x09, 0x20, 0xf1, 0x30, 0x20, - 0x19, 0x80, 0x54, 0x00, 0x64, 0x0a, 0xe8, 0x3c, 0x09, 0x84, 0x19, 0xa4, 0x7d, 0xe2, 0xab, 0x88, - 0x06, 0x2a, 0x50, 0xd4, 0x72, 0xfa, 0xe9, 0xb1, 0x8d, 0x6c, 0x60, 0x4f, 0x39, 0xbf, 0xf3, 0xb4, - 0x30, 0xc8, 0x63, 0x11, 0x71, 0x7f, 0x20, 0x24, 0x24, 0xe3, 0xd2, 0x62, 0x04, 0x86, 0xd3, 0xd1, - 0x8c, 0xab, 0x0e, 0x9d, 0x57, 0x95, 0xa4, 0xd2, 0x88, 0x08, 0x66, 0x0a, 0x9e, 0xfd, 0xab, 0x40, - 0xfb, 0x03, 0x88, 0xf8, 0x4c, 0xdd, 0xee, 0xdc, 0xfe, 0xd1, 0x04, 0xb4, 0x4a, 0x13, 0x7f, 0x56, - 0xeb, 0xf1, 0xfc, 0x9a, 0x1b, 0xbe, 0xd2, 0xbb, 0xf9, 0x75, 0x6a, 0x44, 0x48, 0x85, 0x34, 0xda, - 0x24, 0xd7, 0x4b, 0xba, 0x3f, 0xea, 0xa8, 0x75, 0x98, 0xf5, 0x9e, 0xc1, 0x48, 0xc0, 0x29, 0xfe, - 0x88, 0xd6, 0xb2, 0x46, 0x1d, 0x71, 0xc3, 0xdb, 0xce, 0xb6, 0xb3, 0xd3, 0xda, 0xdd, 0x21, 0x73, - 0xc7, 0x46, 0x46, 0x3d, 0xf2, 0xae, 0x7f, 0x02, 0xbe, 0x79, 0x03, 0x86, 0x7b, 0xf8, 0xec, 0x62, - 0xab, 0x36, 0xb9, 0xd8, 0x42, 0xe5, 0x1d, 0xbb, 0xa2, 0xe1, 0x3e, 0x5a, 0xd2, 0x31, 0xf8, 0xed, - 0xba, 0xa5, 0xbe, 0x24, 0xff, 0xb9, 0x0c, 0xa4, 0xe2, 0xf2, 0x43, 0x0c, 0xbe, 0x77, 0xab, 0x50, - 0x5b, 0xca, 0x22, 0x66, 0xd9, 0xf8, 0x04, 0xad, 0x68, 0xc3, 0x4d, 0xaa, 0xdb, 0x0d, 0xab, 0xe2, - 0x2d, 0xa4, 0x62, 0x49, 0xde, 0x9d, 0x42, 0x67, 0x25, 0x8f, 0x59, 0xa1, 0xd0, 0xdd, 0x47, 0xed, - 0xca, 0xe3, 0x57, 0x4a, 0x1a, 0x9e, 0xad, 0x42, 0xe6, 0x06, 0xdf, 0x47, 0xcb, 0x96, 0x6e, 0x5b, - 0xd8, 0xf4, 0x6e, 0x17, 0x88, 0xe5, 0xbc, 0x20, 0xcf, 0x75, 0xbf, 0x35, 0xd0, 0xfa, 0xb5, 0x4f, - 0xe1, 0xcf, 0x08, 0xf9, 0x53, 0x92, 0x6e, 0x3b, 0xdb, 0x8d, 0x9d, 0xd6, 0xee, 0xe1, 0x22, 0x9f, - 0xf8, 0xcb, 0x57, 0x39, 0xa1, 0xab, 0x6b, 0xcd, 0x2a, 0x82, 0xf8, 0xab, 0x83, 0x5a, 0x5c, 0x4a, - 0x65, 0xb8, 0x11, 0x4a, 0xea, 0x76, 0xdd, 0x1a, 0x78, 0xbf, 0xe8, 0xac, 0xc8, 0x41, 0xc9, 0x7c, - 0x2d, 0x4d, 0x32, 0xf6, 0xee, 0x16, 0x46, 0x5a, 0x95, 0x0c, 0xab, 0x4a, 0x63, 0x8a, 0x9a, 0x92, - 0x47, 0xa0, 0x63, 0xee, 0x83, 0x9d, 0x66, 0xd3, 0xdb, 0x2c, 0x8a, 0x9a, 0x6f, 0xa7, 0x09, 0x56, - 0xbe, 0xe9, 0xbc, 0x40, 0x1b, 0xd7, 0x65, 0xf0, 0x06, 0x6a, 0x0c, 0x61, 0x9c, 0x4f, 0x81, 0x65, - 0x47, 0x7c, 0x0f, 0x2d, 0x8f, 0x78, 0x98, 0x82, 0x5d, 0xc3, 0x26, 0xcb, 0x83, 0xe7, 0xf5, 0x3d, - 0xa7, 0x7b, 0x8c, 0x36, 0x67, 0x86, 0x8f, 0x1f, 0xa2, 0x55, 0x1e, 0x86, 0xea, 0x14, 0x8e, 0x2c, - 0x64, 0xcd, 0x5b, 0x2f, 0x3c, 0xac, 0x1e, 0xe4, 0xd7, 0x6c, 0x9a, 0xc7, 0x0f, 0xd0, 0x4a, 0x02, - 0x5c, 0x2b, 0x99, 0xa3, 0xcb, 0xbd, 0x61, 0xf6, 0x96, 0x15, 0x59, 0xef, 0xd1, 0xd9, 0xa5, 0x5b, - 0x3b, 0xbf, 0x74, 0x6b, 0x3f, 0x2f, 0xdd, 0xda, 0x97, 0x89, 0xeb, 0x9c, 0x4d, 0x5c, 0xe7, 0x7c, - 0xe2, 0x3a, 0xbf, 0x26, 0xae, 0xf3, 0xfd, 0xb7, 0x5b, 0xfb, 0xb4, 0x36, 0xed, 0xe3, 0x9f, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x85, 0x95, 0xf8, 0x16, 0x73, 0x05, 0x00, 0x00, + // 594 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xa4, 0x92, 0x3f, 0x6f, 0x13, 0x4d, + 0x10, 0xc6, 0x7d, 0x76, 0xfe, 0x79, 0xfd, 0xbe, 0x24, 0x59, 0x28, 0x4e, 0x2e, 0x2e, 0x91, 0x91, + 0x50, 0x40, 0xb0, 0x8b, 0x23, 0x84, 0x22, 0x0a, 0x42, 0x0e, 0x51, 0xa4, 0x00, 0xc4, 0xd2, 0x51, + 0xb1, 0xbe, 0x4c, 0xce, 0x1b, 0xdf, 0xed, 0x9e, 0x6e, 0xf7, 0x1c, 0xb9, 0x40, 0xa2, 0xa4, 0xa0, + 0xe0, 0x1b, 0xd1, 0xa6, 0x4c, 0x49, 0x15, 0x11, 0xf3, 0x45, 0xd0, 0xed, 0x9d, 0x73, 0x47, 0x9c, + 0x08, 0xa1, 0x74, 0x3b, 0x3b, 0x3b, 0xbf, 0xe7, 0x99, 0x99, 0x45, 0xbb, 0xa3, 0x1d, 0x4d, 0x84, + 0xa2, 0xa3, 0x6c, 0x00, 0xa9, 0x04, 0x03, 0x9a, 0x26, 0xa3, 0x90, 0xf2, 0x44, 0x68, 0x2a, 0x62, + 0x1e, 0x42, 0xa2, 0x22, 0x11, 0x4c, 0xe8, 0xb8, 0xcf, 0xa3, 0x64, 0xc8, 0xfb, 0x34, 0x04, 0x09, + 0x29, 0x37, 0x70, 0x40, 0x92, 0x54, 0x19, 0x85, 0x69, 0x01, 0x20, 0x15, 0x80, 0x24, 0xa3, 0x90, + 0xe4, 0x00, 0x52, 0x03, 0x90, 0x19, 0xa0, 0xfb, 0x28, 0x14, 0x66, 0x98, 0x0d, 0x48, 0xa0, 0x62, + 0x1a, 0xaa, 0x50, 0x51, 0xcb, 0x19, 0x64, 0x87, 0x36, 0xb2, 0x81, 0x3d, 0x15, 0xfc, 0xee, 0x93, + 0xd2, 0x20, 0x4f, 0x44, 0xcc, 0x83, 0xa1, 0x90, 0x90, 0x4e, 0x2a, 0x8b, 0x31, 0x18, 0x4e, 0xc7, + 0x73, 0xae, 0xba, 0xf4, 0xba, 0xaa, 0x34, 0x93, 0x46, 0xc4, 0x30, 0x57, 0xf0, 0xf4, 0x6f, 0x05, + 0x3a, 0x18, 0x42, 0xcc, 0xe7, 0xea, 0xb6, 0xaf, 0x9d, 0x1f, 0x4d, 0x41, 0xab, 0x2c, 0x0d, 0xe6, + 0xb5, 0x1e, 0x5e, 0x5f, 0x73, 0x45, 0x2b, 0xfd, 0xab, 0x5f, 0x67, 0x46, 0x44, 0x54, 0x48, 0xa3, + 0x4d, 0x7a, 0xb9, 0xa4, 0xf7, 0xbd, 0x89, 0x3a, 0xfb, 0xf9, 0xec, 0x19, 0x8c, 0x05, 0x1c, 0xe3, + 0x8f, 0x68, 0x25, 0x1f, 0xd4, 0x01, 0x37, 0xdc, 0x75, 0x36, 0x9d, 0xad, 0xce, 0xf6, 0x63, 0x52, + 0xae, 0xad, 0xde, 0x6f, 0xb5, 0xb8, 0xfc, 0x35, 0x19, 0xf7, 0xc9, 0xdb, 0xc1, 0x11, 0x04, 0xe6, + 0x35, 0x18, 0xee, 0xe3, 0x93, 0xb3, 0x8d, 0xc6, 0xf4, 0x6c, 0x03, 0x55, 0x77, 0xec, 0x82, 0x8a, + 0x07, 0x68, 0x41, 0x27, 0x10, 0xb8, 0x4d, 0x4b, 0x7f, 0x41, 0xfe, 0xf1, 0x53, 0x90, 0x9a, 0xdb, + 0xf7, 0x09, 0x04, 0xfe, 0x7f, 0xa5, 0xda, 0x42, 0x1e, 0x31, 0xcb, 0xc6, 0x47, 0x68, 0x49, 0x1b, + 0x6e, 0x32, 0xed, 0xb6, 0xac, 0x8a, 0x7f, 0x23, 0x15, 0x4b, 0xf2, 0x6f, 0x95, 0x3a, 0x4b, 0x45, + 0xcc, 0x4a, 0x85, 0xde, 0x2e, 0x72, 0x6b, 0x8f, 0x5f, 0x2a, 0x69, 0x78, 0x3e, 0xa2, 0xdc, 0x0d, + 0xbe, 0x8b, 0x16, 0x2d, 0xdd, 0x8e, 0xb2, 0xed, 0xff, 0x5f, 0x22, 0x16, 0x8b, 0x82, 0x22, 0xd7, + 0xfb, 0xda, 0x42, 0xab, 0x97, 0x9a, 0xc2, 0x9f, 0x10, 0x0a, 0x66, 0x24, 0xed, 0x3a, 0x9b, 0xad, + 0xad, 0xce, 0xf6, 0xfe, 0x4d, 0x9a, 0xf8, 0xc3, 0x57, 0xb5, 0xa1, 0x8b, 0x6b, 0xcd, 0x6a, 0x82, + 0xf8, 0x8b, 0x83, 0x3a, 0x5c, 0x4a, 0x65, 0xb8, 0x11, 0x4a, 0x6a, 0xb7, 0x69, 0x0d, 0xbc, 0xbb, + 0xe9, 0xae, 0xc8, 0x5e, 0xc5, 0x7c, 0x25, 0x4d, 0x3a, 0xf1, 0x6f, 0x97, 0x46, 0x3a, 0xb5, 0x0c, + 0xab, 0x4b, 0x63, 0x8a, 0xda, 0x92, 0xc7, 0xa0, 0x13, 0x1e, 0x80, 0xdd, 0x66, 0xdb, 0x5f, 0x2f, + 0x8b, 0xda, 0x6f, 0x66, 0x09, 0x56, 0xbd, 0xe9, 0x3e, 0x47, 0x6b, 0x97, 0x65, 0xf0, 0x1a, 0x6a, + 0x8d, 0x60, 0x52, 0x6c, 0x81, 0xe5, 0x47, 0x7c, 0x07, 0x2d, 0x8e, 0x79, 0x94, 0x81, 0xfd, 0x86, + 0x6d, 0x56, 0x04, 0xcf, 0x9a, 0x3b, 0x4e, 0xef, 0x10, 0xad, 0xcf, 0x2d, 0x1f, 0xdf, 0x47, 0xcb, + 0x3c, 0x8a, 0xd4, 0x31, 0x1c, 0x58, 0xc8, 0x8a, 0xbf, 0x5a, 0x7a, 0x58, 0xde, 0x2b, 0xae, 0xd9, + 0x2c, 0x8f, 0xef, 0xa1, 0xa5, 0x14, 0xb8, 0x56, 0xb2, 0x40, 0x57, 0xff, 0x86, 0xd9, 0x5b, 0x56, + 0x66, 0xfd, 0x07, 0x27, 0xe7, 0x5e, 0xe3, 0xf4, 0xdc, 0x6b, 0xfc, 0x38, 0xf7, 0x1a, 0x9f, 0xa7, + 0x9e, 0x73, 0x32, 0xf5, 0x9c, 0xd3, 0xa9, 0xe7, 0xfc, 0x9c, 0x7a, 0xce, 0xb7, 0x5f, 0x5e, 0xe3, + 0xc3, 0xca, 0x6c, 0x8e, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x3f, 0x81, 0x72, 0x5a, 0x7b, 0x05, + 0x00, 0x00, } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/imagepolicy/v1alpha1/generated.proto b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/imagepolicy/v1alpha1/generated.proto index 8e72f540..42d5a606 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/imagepolicy/v1alpha1/generated.proto +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/imagepolicy/v1alpha1/generated.proto @@ -34,7 +34,7 @@ option go_package = "v1alpha1"; // ImageReview checks if the set of images in a pod are allowed. message ImageReview { // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec holds information about the pod being evaluated optional ImageReviewSpec spec = 2; diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/imagepolicy/v1alpha1/register.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/imagepolicy/v1alpha1/register.go index be5112f5..aa95b244 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/imagepolicy/v1alpha1/register.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/imagepolicy/v1alpha1/register.go @@ -42,12 +42,12 @@ var ( // Adds the list of known types to api.Scheme. func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, - &v1.ListOptions{}, &v1.DeleteOptions{}, &metav1.ExportOptions{}, &metav1.GetOptions{}, &ImageReview{}, ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/imagepolicy/v1alpha1/types.generated.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/imagepolicy/v1alpha1/types.generated.go index ced3ba37..3a4372e3 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/imagepolicy/v1alpha1/types.generated.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/imagepolicy/v1alpha1/types.generated.go @@ -26,8 +26,7 @@ import ( "fmt" codec1978 "github.com/ugorji/go/codec" pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - pkg3_types "k8s.io/apimachinery/pkg/types" - pkg2_v1 "k8s.io/client-go/pkg/api/v1" + pkg2_types "k8s.io/apimachinery/pkg/types" "reflect" "runtime" time "time" @@ -64,10 +63,9 @@ func init() { } if false { // reference the types, but skip this branch at build/run time var v0 pkg1_v1.TypeMeta - var v1 pkg3_types.UID - var v2 pkg2_v1.ObjectMeta - var v3 time.Time - _, _, _, _ = v0, v1, v2, v3 + var v1 pkg2_types.UID + var v2 time.Time + _, _, _ = v0, v1, v2 } } @@ -159,7 +157,13 @@ func (x *ImageReview) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -169,7 +173,13 @@ func (x *ImageReview) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -287,24 +297,30 @@ func (x *ImageReview) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = ImageReviewSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = ImageReviewStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -317,16 +333,16 @@ func (x *ImageReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -334,21 +350,21 @@ func (x *ImageReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -356,38 +372,44 @@ func (x *ImageReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -395,16 +417,16 @@ func (x *ImageReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = ImageReviewSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -412,21 +434,21 @@ func (x *ImageReview) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = ImageReviewStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/imagepolicy/v1alpha1/types.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/imagepolicy/v1alpha1/types.go index 40e7face..483e18ff 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/imagepolicy/v1alpha1/types.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/imagepolicy/v1alpha1/types.go @@ -18,7 +18,6 @@ package v1alpha1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/client-go/pkg/api/v1" ) // +genclient=true @@ -29,7 +28,7 @@ import ( type ImageReview struct { metav1.TypeMeta `json:",inline"` // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec holds information about the pod being evaluated Spec ImageReviewSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/imagepolicy/v1alpha1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/imagepolicy/v1alpha1/zz_generated.conversion.go index 0a35376c..b5c47dbd 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/imagepolicy/v1alpha1/zz_generated.conversion.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/imagepolicy/v1alpha1/zz_generated.conversion.go @@ -47,10 +47,7 @@ func RegisterConversions(scheme *runtime.Scheme) error { } func autoConvert_v1alpha1_ImageReview_To_imagepolicy_ImageReview(in *ImageReview, out *imagepolicy.ImageReview, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1alpha1_ImageReviewSpec_To_imagepolicy_ImageReviewSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -65,10 +62,7 @@ func Convert_v1alpha1_ImageReview_To_imagepolicy_ImageReview(in *ImageReview, ou } func autoConvert_imagepolicy_ImageReview_To_v1alpha1_ImageReview(in *imagepolicy.ImageReview, out *ImageReview, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_imagepolicy_ImageReviewSpec_To_v1alpha1_ImageReviewSpec(&in.Spec, &out.Spec, s); err != nil { return err } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/imagepolicy/v1alpha1/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/imagepolicy/v1alpha1/zz_generated.deepcopy.go index 9780190b..e306af0d 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/imagepolicy/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/imagepolicy/v1alpha1/zz_generated.deepcopy.go @@ -21,9 +21,9 @@ limitations under the License. package v1alpha1 import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - v1 "k8s.io/client-go/pkg/api/v1" reflect "reflect" ) @@ -47,8 +47,10 @@ func DeepCopy_v1alpha1_ImageReview(in interface{}, out interface{}, c *conversio in := in.(*ImageReview) out := out.(*ImageReview) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v1alpha1_ImageReviewSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -74,9 +76,7 @@ func DeepCopy_v1alpha1_ImageReviewSpec(in interface{}, out interface{}, c *conve if in.Containers != nil { in, out := &in.Containers, &out.Containers *out = make([]ImageReviewContainerSpec, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.Annotations != nil { in, out := &in.Annotations, &out.Annotations diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/imagepolicy/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/imagepolicy/zz_generated.deepcopy.go index 8b514ebb..a2fa6c2e 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/imagepolicy/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/imagepolicy/zz_generated.deepcopy.go @@ -21,9 +21,9 @@ limitations under the License. package imagepolicy import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - api "k8s.io/client-go/pkg/api" reflect "reflect" ) @@ -47,8 +47,10 @@ func DeepCopy_imagepolicy_ImageReview(in interface{}, out interface{}, c *conver in := in.(*ImageReview) out := out.(*ImageReview) *out = *in - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_imagepolicy_ImageReviewSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -74,9 +76,7 @@ func DeepCopy_imagepolicy_ImageReviewSpec(in interface{}, out interface{}, c *co if in.Containers != nil { in, out := &in.Containers, &out.Containers *out = make([]ImageReviewContainerSpec, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.Annotations != nil { in, out := &in.Annotations, &out.Annotations diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/kubeadm/install/install.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/kubeadm/install/install.go index 88ff7b7f..b8178644 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/kubeadm/install/install.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/kubeadm/install/install.go @@ -17,12 +17,20 @@ limitations under the License. package install import ( - "k8s.io/client-go/pkg/apimachinery/announced" + "k8s.io/apimachinery/pkg/apimachinery/announced" + "k8s.io/apimachinery/pkg/apimachinery/registered" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/client-go/pkg/api" "k8s.io/client-go/pkg/apis/kubeadm" "k8s.io/client-go/pkg/apis/kubeadm/v1alpha1" ) func init() { + Install(api.GroupFactoryRegistry, api.Registry, api.Scheme) +} + +// Install registers the API group and adds types to a scheme +func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) { if err := announced.NewGroupMetaFactory( &announced.GroupMetaFactoryArgs{ GroupName: kubeadm.GroupName, @@ -33,7 +41,7 @@ func init() { announced.VersionToSchemeFunc{ v1alpha1.SchemeGroupVersion.Version: v1alpha1.AddToScheme, }, - ).Announce().RegisterAndEnable(); err != nil { + ).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil { panic(err) } } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/kubeadm/register.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/kubeadm/register.go index 22fdc0c4..34e2e07e 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/kubeadm/register.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/kubeadm/register.go @@ -49,7 +49,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { &MasterConfiguration{}, &NodeConfiguration{}, &ClusterInfo{}, - &api.ListOptions{}, &api.DeleteOptions{}, &metav1.ExportOptions{}, ) diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/kubeadm/types.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/kubeadm/types.go index f922bf0e..aa6f6e00 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/kubeadm/types.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/kubeadm/types.go @@ -39,6 +39,7 @@ type MasterConfiguration struct { Networking Networking KubernetesVersion string CloudProvider string + AuthorizationMode string } type API struct { diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/kubeadm/v1alpha1/defaults.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/kubeadm/v1alpha1/defaults.go index f676020e..23785f3a 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/kubeadm/v1alpha1/defaults.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/kubeadm/v1alpha1/defaults.go @@ -16,17 +16,18 @@ limitations under the License. package v1alpha1 -import ( - "k8s.io/apimachinery/pkg/runtime" -) +import "k8s.io/apimachinery/pkg/runtime" const ( - DefaultServiceDNSDomain = "cluster.local" - DefaultServicesSubnet = "10.96.0.0/12" - DefaultKubernetesVersion = "stable" - DefaultKubernetesFallbackVersion = "v1.5.0" + DefaultServiceDNSDomain = "cluster.local" + DefaultServicesSubnet = "10.96.0.0/12" + DefaultKubernetesVersion = "stable" + // This is only for clusters without internet, were the latest stable version can't be determined + DefaultKubernetesFallbackVersion = "v1.5.2" DefaultAPIBindPort = 6443 DefaultDiscoveryBindPort = 9898 + // TODO: Default this to RBAC when DefaultKubernetesFallbackVersion is v1.6-something + DefaultAuthorizationMode = "AlwaysAllow" ) func addDefaultingFuncs(scheme *runtime.Scheme) error { @@ -56,4 +57,8 @@ func SetDefaults_MasterConfiguration(obj *MasterConfiguration) { if obj.Discovery.Token == nil && obj.Discovery.File == nil && obj.Discovery.HTTPS == nil { obj.Discovery.Token = &TokenDiscovery{} } + + if obj.AuthorizationMode == "" { + obj.AuthorizationMode = DefaultAuthorizationMode + } } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/kubeadm/v1alpha1/register.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/kubeadm/v1alpha1/register.go index 3d8d63a2..3298cbbc 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/kubeadm/v1alpha1/register.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/kubeadm/v1alpha1/register.go @@ -49,10 +49,10 @@ func addKnownTypes(scheme *runtime.Scheme) error { &MasterConfiguration{}, &NodeConfiguration{}, &ClusterInfo{}, - &v1.ListOptions{}, &v1.DeleteOptions{}, &metav1.ExportOptions{}, ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/kubeadm/v1alpha1/types.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/kubeadm/v1alpha1/types.go index cc26c3de..91dca1f9 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/kubeadm/v1alpha1/types.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/kubeadm/v1alpha1/types.go @@ -29,6 +29,7 @@ type MasterConfiguration struct { Networking Networking `json:"networking"` KubernetesVersion string `json:"kubernetesVersion"` CloudProvider string `json:"cloudProvider"` + AuthorizationMode string `json:"authorizationMode"` } type API struct { diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/policy/install/install.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/policy/install/install.go index 674b9043..6253d5bc 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/policy/install/install.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/policy/install/install.go @@ -19,12 +19,20 @@ limitations under the License. package install import ( - "k8s.io/client-go/pkg/apimachinery/announced" + "k8s.io/apimachinery/pkg/apimachinery/announced" + "k8s.io/apimachinery/pkg/apimachinery/registered" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/client-go/pkg/api" "k8s.io/client-go/pkg/apis/policy" "k8s.io/client-go/pkg/apis/policy/v1beta1" ) func init() { + Install(api.GroupFactoryRegistry, api.Registry, api.Scheme) +} + +// Install registers the API group and adds types to a scheme +func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) { if err := announced.NewGroupMetaFactory( &announced.GroupMetaFactoryArgs{ GroupName: policy.GroupName, @@ -35,7 +43,7 @@ func init() { announced.VersionToSchemeFunc{ v1beta1.SchemeGroupVersion.Version: v1beta1.AddToScheme, }, - ).Announce().RegisterAndEnable(); err != nil { + ).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil { panic(err) } } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/policy/register.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/policy/register.go index 9e867a80..1e3c7d30 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/policy/register.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/policy/register.go @@ -48,7 +48,6 @@ var ( func addKnownTypes(scheme *runtime.Scheme) error { // TODO this gets cleaned up when the types are fixed scheme.AddKnownTypes(SchemeGroupVersion, - &api.ListOptions{}, &api.DeleteOptions{}, &metav1.ExportOptions{}, &metav1.GetOptions{}, diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/policy/types.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/policy/types.go index b8e74c5e..73cebecc 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/policy/types.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/policy/types.go @@ -77,7 +77,7 @@ type PodDisruptionBudgetStatus struct { type PodDisruptionBudget struct { metav1.TypeMeta // +optional - api.ObjectMeta + metav1.ObjectMeta // Specification of the desired behavior of the PodDisruptionBudget. // +optional @@ -106,7 +106,7 @@ type Eviction struct { // ObjectMeta describes the pod that is being evicted. // +optional - api.ObjectMeta + metav1.ObjectMeta // DeleteOptions may be provided // +optional diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/policy/v1alpha1/doc.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/policy/v1alpha1/doc.go deleted file mode 100644 index 65d58233..00000000 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/policy/v1alpha1/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Package policy is for any kind of policy object. Suitable examples, even if -// they aren't all here, are PodDisruptionBudget, PodSecurityPolicy, -// NetworkPolicy, etc. -package v1alpha1 diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/policy/v1alpha1/types.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/policy/v1alpha1/types.go deleted file mode 100644 index 5d38d5cf..00000000 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/policy/v1alpha1/types.go +++ /dev/null @@ -1,93 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/client-go/pkg/api/v1" - "k8s.io/client-go/pkg/util/intstr" -) - -// PodDisruptionBudgetSpec is a description of a PodDisruptionBudget. -type PodDisruptionBudgetSpec struct { - // An eviction is allowed if at least "minAvailable" pods selected by - // "selector" will still be available after the eviction, i.e. even in the - // absence of the evicted pod. So for example you can prevent all voluntary - // evictions by specifying "100%". - // +optional - MinAvailable intstr.IntOrString `json:"minAvailable,omitempty" protobuf:"bytes,1,opt,name=minAvailable"` - - // Label query over pods whose evictions are managed by the disruption - // budget. - // +optional - Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,2,opt,name=selector"` -} - -// PodDisruptionBudgetStatus represents information about the status of a -// PodDisruptionBudget. Status may trail the actual state of a system. -type PodDisruptionBudgetStatus struct { - // Whether or not a disruption is currently allowed. - PodDisruptionAllowed bool `json:"disruptionAllowed" protobuf:"varint,1,opt,name=disruptionAllowed"` - - // current number of healthy pods - CurrentHealthy int32 `json:"currentHealthy" protobuf:"varint,2,opt,name=currentHealthy"` - - // minimum desired number of healthy pods - DesiredHealthy int32 `json:"desiredHealthy" protobuf:"varint,3,opt,name=desiredHealthy"` - - // total number of pods counted by this disruption budget - ExpectedPods int32 `json:"expectedPods" protobuf:"varint,4,opt,name=expectedPods"` -} - -// +genclient=true - -// PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods -type PodDisruptionBudget struct { - metav1.TypeMeta `json:",inline"` - // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // Specification of the desired behavior of the PodDisruptionBudget. - // +optional - Spec PodDisruptionBudgetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` - // Most recently observed status of the PodDisruptionBudget. - // +optional - Status PodDisruptionBudgetStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` -} - -// PodDisruptionBudgetList is a collection of PodDisruptionBudgets. -type PodDisruptionBudgetList struct { - metav1.TypeMeta `json:",inline"` - // +optional - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - Items []PodDisruptionBudget `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// Eviction evicts a pod from its node subject to certain policies and safety constraints. -// This is a subresource of Pod. A request to cause such an eviction is -// created by POSTing to .../pods//eviction. -type Eviction struct { - metav1.TypeMeta `json:",inline"` - - // ObjectMeta describes the pod that is being evicted. - // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // DeleteOptions may be provided - // +optional - DeleteOptions *v1.DeleteOptions `json:"deleteOptions,omitempty" protobuf:"bytes,2,opt,name=deleteOptions"` -} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/policy/v1beta1/generated.pb.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/policy/v1beta1/generated.pb.go index e78ef7d5..9128d6d1 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/policy/v1beta1/generated.pb.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/policy/v1beta1/generated.pb.go @@ -407,7 +407,7 @@ func (this *Eviction) String() string { return "nil" } s := strings.Join([]string{`&Eviction{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `DeleteOptions:` + strings.Replace(fmt.Sprintf("%v", this.DeleteOptions), "DeleteOptions", "k8s_io_kubernetes_pkg_api_v1.DeleteOptions", 1) + `,`, `}`, }, "") @@ -418,7 +418,7 @@ func (this *PodDisruptionBudget) String() string { return "nil" } s := strings.Join([]string{`&PodDisruptionBudget{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PodDisruptionBudgetSpec", "PodDisruptionBudgetSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "PodDisruptionBudgetStatus", "PodDisruptionBudgetStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -1324,54 +1324,54 @@ var ( ) var fileDescriptorGenerated = []byte{ - // 777 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xb4, 0x94, 0x4d, 0x6f, 0xe3, 0x44, + // 776 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xbc, 0x94, 0x4d, 0x6f, 0xe3, 0x44, 0x18, 0xc7, 0xe3, 0x26, 0x29, 0x61, 0x9a, 0x54, 0x65, 0xa0, 0x10, 0x22, 0xe1, 0xa2, 0x9c, 0x5a, - 0x5e, 0xc6, 0x4a, 0x41, 0xa8, 0x70, 0xa8, 0xa8, 0x49, 0x05, 0x45, 0x54, 0xa9, 0x5c, 0x24, 0x10, - 0x82, 0xc3, 0xd8, 0x7e, 0x70, 0x86, 0xf8, 0x4d, 0x33, 0xe3, 0x40, 0x6e, 0x7c, 0x84, 0x3d, 0xec, - 0x37, 0xda, 0x4b, 0xb5, 0xa7, 0x1e, 0xf7, 0xb0, 0xaa, 0xb6, 0xd9, 0xcf, 0xb0, 0xf7, 0x95, 0xed, - 0xc9, 0x8b, 0xf3, 0xb2, 0x5b, 0xa9, 0xbb, 0x37, 0xcf, 0xcc, 0xf3, 0xfb, 0xff, 0x9f, 0xe7, 0x99, - 0x67, 0x8c, 0xbe, 0x1d, 0x1c, 0x09, 0xc2, 0x22, 0x63, 0x90, 0xd8, 0xc0, 0x43, 0x90, 0x20, 0x8c, - 0x78, 0xe0, 0x19, 0x34, 0x66, 0xc2, 0x88, 0x23, 0x9f, 0x39, 0x23, 0x63, 0xd8, 0xb1, 0x41, 0xd2, - 0x8e, 0xe1, 0x41, 0x08, 0x9c, 0x4a, 0x70, 0x49, 0xcc, 0x23, 0x19, 0xe1, 0x83, 0x1c, 0x25, 0x33, - 0x94, 0xc4, 0x03, 0x8f, 0xa4, 0x28, 0xc9, 0x51, 0xa2, 0xd0, 0xd6, 0x97, 0x1e, 0x93, 0xfd, 0xc4, - 0x26, 0x4e, 0x14, 0x18, 0x5e, 0xe4, 0x45, 0x46, 0xa6, 0x60, 0x27, 0x7f, 0x67, 0xab, 0x6c, 0x91, - 0x7d, 0xe5, 0xca, 0xad, 0xaf, 0x55, 0x52, 0x34, 0x66, 0x01, 0x75, 0xfa, 0x2c, 0x04, 0x3e, 0x9a, - 0xa5, 0x15, 0x80, 0xa4, 0xc6, 0x70, 0x29, 0x9f, 0x96, 0xb1, 0x8e, 0xe2, 0x49, 0x28, 0x59, 0x00, - 0x4b, 0xc0, 0x37, 0xaf, 0x03, 0x84, 0xd3, 0x87, 0x80, 0x2e, 0x71, 0x87, 0x6b, 0x7b, 0x66, 0x70, - 0x10, 0x51, 0xc2, 0x9d, 0x65, 0xaf, 0x2f, 0xd6, 0x33, 0x2b, 0x4a, 0xe9, 0xac, 0x8e, 0x4e, 0x24, - 0xf3, 0x0d, 0x16, 0x4a, 0x21, 0xf9, 0x22, 0xd2, 0x7e, 0xac, 0xa1, 0xda, 0xe9, 0x90, 0x39, 0x92, - 0x45, 0x21, 0xfe, 0x1d, 0xd5, 0xd2, 0x2e, 0xb9, 0x54, 0xd2, 0xa6, 0xf6, 0xa9, 0xb6, 0xbf, 0x75, - 0xb8, 0x4f, 0xd6, 0xde, 0x16, 0x19, 0x76, 0x48, 0xcf, 0xfe, 0x07, 0x1c, 0x79, 0x0e, 0x92, 0x9a, - 0xf8, 0xea, 0x66, 0xaf, 0x34, 0xbe, 0xd9, 0x43, 0xb3, 0x3d, 0x6b, 0xaa, 0x86, 0x5d, 0xd4, 0x70, - 0xc1, 0x07, 0x09, 0xbd, 0x38, 0x75, 0x12, 0xcd, 0x8d, 0x4c, 0xfe, 0xf3, 0x57, 0xcb, 0x77, 0xe7, - 0x11, 0xf3, 0xbd, 0xf1, 0xcd, 0x5e, 0xa3, 0xb0, 0x65, 0x15, 0x45, 0xdb, 0x8f, 0x36, 0xd0, 0xfb, - 0x17, 0x91, 0xdb, 0x65, 0x82, 0x27, 0xd9, 0x96, 0x99, 0xb8, 0x1e, 0xc8, 0xb7, 0x5a, 0x57, 0x45, - 0xc4, 0xe0, 0xa8, 0x72, 0x4c, 0x72, 0xe7, 0xd9, 0x26, 0x2b, 0xf2, 0xbc, 0x8c, 0xc1, 0x31, 0xeb, - 0xca, 0xaf, 0x92, 0xae, 0xac, 0x4c, 0x1d, 0xfb, 0x68, 0x53, 0x48, 0x2a, 0x13, 0xd1, 0x2c, 0x67, - 0x3e, 0xdd, 0x7b, 0xfa, 0x64, 0x5a, 0xe6, 0xb6, 0x72, 0xda, 0xcc, 0xd7, 0x96, 0xf2, 0x68, 0x3f, - 0xd5, 0xd0, 0x47, 0x2b, 0xa8, 0x5f, 0x98, 0x90, 0xf8, 0xcf, 0xa5, 0x4e, 0x92, 0x49, 0x2e, 0xf3, - 0xcf, 0x61, 0x96, 0x4d, 0x1a, 0x9d, 0x76, 0x34, 0xa5, 0xb3, 0x7e, 0xee, 0x28, 0xd7, 0xda, 0x64, - 0x67, 0xae, 0x9b, 0x0e, 0xaa, 0x32, 0x09, 0x41, 0x3a, 0x1d, 0xe5, 0xfd, 0xad, 0xc3, 0xe3, 0xfb, - 0x95, 0x69, 0x36, 0x94, 0x55, 0xf5, 0x2c, 0x15, 0xb5, 0x72, 0xed, 0xf6, 0x78, 0x75, 0x79, 0x69, - 0xbb, 0x71, 0x1f, 0xd5, 0x03, 0x16, 0x9e, 0x0c, 0x29, 0xf3, 0xa9, 0xed, 0xc3, 0x62, 0x89, 0x0b, - 0x79, 0xa4, 0xef, 0x8a, 0xe4, 0xef, 0x8a, 0x9c, 0x85, 0xb2, 0xc7, 0x2f, 0x25, 0x67, 0xa1, 0x67, - 0x7e, 0xa0, 0x7c, 0xeb, 0xe7, 0x73, 0x5a, 0x56, 0x41, 0x19, 0xff, 0x85, 0x6a, 0x02, 0x7c, 0x70, - 0x64, 0xc4, 0xd5, 0xf0, 0x7c, 0x75, 0xc7, 0x46, 0x52, 0x1b, 0xfc, 0x4b, 0x85, 0x9a, 0xf5, 0xb4, - 0x93, 0x93, 0x95, 0x35, 0x95, 0x6c, 0xbf, 0xa8, 0xa0, 0x8f, 0xd7, 0xde, 0x3c, 0xfe, 0x19, 0xe1, - 0xc8, 0x16, 0xc0, 0x87, 0xe0, 0xfe, 0x98, 0xff, 0x0f, 0x58, 0x14, 0x66, 0xc5, 0x96, 0xcd, 0x96, - 0x4a, 0x1e, 0xf7, 0x96, 0x22, 0xac, 0x15, 0x14, 0x7e, 0xa8, 0xa1, 0x86, 0x9b, 0xdb, 0x80, 0x7b, - 0x11, 0xb9, 0x93, 0xcb, 0xfb, 0xed, 0x4d, 0xcc, 0x28, 0xe9, 0xce, 0x2b, 0x9f, 0x86, 0x92, 0x8f, - 0xcc, 0x5d, 0x95, 0x60, 0xa3, 0x70, 0x66, 0x15, 0x93, 0xc0, 0xe7, 0x08, 0xbb, 0x53, 0x49, 0x71, - 0xe2, 0xfb, 0xd1, 0xbf, 0xe0, 0x66, 0xcf, 0xa7, 0x6a, 0x7e, 0xa2, 0x14, 0x76, 0x0b, 0xbe, 0x93, - 0x20, 0x6b, 0x05, 0x88, 0x8f, 0xd1, 0xb6, 0x93, 0x70, 0x0e, 0xa1, 0xfc, 0x09, 0xa8, 0x2f, 0xfb, - 0xa3, 0x66, 0x25, 0x93, 0xfa, 0x50, 0x49, 0x6d, 0xff, 0x50, 0x38, 0xb5, 0x16, 0xa2, 0x53, 0xde, - 0x05, 0xc1, 0x38, 0xb8, 0x13, 0xbe, 0x5a, 0xe4, 0xbb, 0x85, 0x53, 0x6b, 0x21, 0x1a, 0x1f, 0xa1, - 0x3a, 0xfc, 0x17, 0x83, 0x33, 0xe9, 0xf1, 0x66, 0x46, 0x4f, 0x07, 0xed, 0x74, 0xee, 0xcc, 0x2a, - 0x44, 0xb6, 0x7c, 0x84, 0x97, 0x9b, 0x88, 0x77, 0x50, 0x79, 0x00, 0xa3, 0xec, 0xca, 0xdf, 0xb5, - 0xd2, 0x4f, 0xfc, 0x3d, 0xaa, 0x0e, 0xa9, 0x9f, 0x80, 0x9a, 0xc6, 0xcf, 0xee, 0x36, 0x8d, 0xbf, - 0xb2, 0x00, 0xac, 0x1c, 0xfc, 0x6e, 0xe3, 0x48, 0x33, 0x0f, 0xae, 0x6e, 0xf5, 0xd2, 0xf5, 0xad, - 0x5e, 0x7a, 0x72, 0xab, 0x97, 0xfe, 0x1f, 0xeb, 0xda, 0xd5, 0x58, 0xd7, 0xae, 0xc7, 0xba, 0xf6, - 0x6c, 0xac, 0x6b, 0x0f, 0x9e, 0xeb, 0xa5, 0x3f, 0xde, 0x51, 0x97, 0xfe, 0x32, 0x00, 0x00, 0xff, - 0xff, 0xf9, 0xf8, 0x35, 0x20, 0x43, 0x08, 0x00, 0x00, + 0x5e, 0xc6, 0xa4, 0x20, 0x54, 0x38, 0x54, 0xd4, 0xa4, 0x82, 0x22, 0xaa, 0x54, 0x2e, 0x12, 0x12, + 0x02, 0x89, 0xb1, 0xfd, 0xe0, 0x0c, 0xf1, 0x9b, 0x66, 0xc6, 0x81, 0xdc, 0xf8, 0x08, 0x1c, 0xf8, + 0x50, 0x95, 0xb8, 0x54, 0x7b, 0xda, 0xc3, 0xaa, 0xda, 0x66, 0x3f, 0xc3, 0xde, 0x57, 0xb6, 0x27, + 0x2f, 0xce, 0x8b, 0x36, 0x52, 0x57, 0x7b, 0xcb, 0xcc, 0x3c, 0xbf, 0xff, 0xff, 0x79, 0x73, 0xd0, + 0x57, 0x83, 0x13, 0x41, 0x58, 0x64, 0x0c, 0x12, 0x1b, 0x78, 0x08, 0x12, 0x84, 0x11, 0x0f, 0x3c, + 0x83, 0xc6, 0x4c, 0x18, 0x71, 0xe4, 0x33, 0x67, 0x64, 0x0c, 0x3b, 0x36, 0x48, 0xda, 0x31, 0x3c, + 0x08, 0x81, 0x53, 0x09, 0x2e, 0x89, 0x79, 0x24, 0x23, 0x7c, 0x94, 0xa3, 0x64, 0x86, 0x92, 0x78, + 0xe0, 0x91, 0x14, 0x25, 0x39, 0x4a, 0x14, 0xda, 0xfa, 0xd4, 0x63, 0xb2, 0x9f, 0xd8, 0xc4, 0x89, + 0x02, 0xc3, 0x8b, 0xbc, 0xc8, 0xc8, 0x14, 0xec, 0xe4, 0x8f, 0xec, 0x94, 0x1d, 0xb2, 0x5f, 0xb9, + 0x72, 0xeb, 0x0b, 0x95, 0x14, 0x8d, 0x59, 0x40, 0x9d, 0x3e, 0x0b, 0x81, 0x8f, 0x66, 0x69, 0x05, + 0x20, 0xa9, 0x31, 0x5c, 0xca, 0xa7, 0x65, 0xac, 0xa3, 0x78, 0x12, 0x4a, 0x16, 0xc0, 0x12, 0xf0, + 0xe5, 0xcb, 0x00, 0xe1, 0xf4, 0x21, 0xa0, 0x4b, 0xdc, 0xf1, 0xda, 0x9e, 0x19, 0x1c, 0x44, 0x94, + 0x70, 0x67, 0xd9, 0xeb, 0x93, 0xf5, 0xcc, 0x8a, 0x52, 0x3a, 0xab, 0xa3, 0x13, 0xc9, 0x7c, 0x83, + 0x85, 0x52, 0x48, 0xbe, 0x88, 0xb4, 0x1f, 0x69, 0xa8, 0x76, 0x3e, 0x64, 0x8e, 0x64, 0x51, 0x88, + 0x7f, 0x47, 0xb5, 0xb4, 0x4b, 0x2e, 0x95, 0xb4, 0xa9, 0x7d, 0xa8, 0x1d, 0xee, 0x1c, 0x7f, 0x46, + 0xd4, 0xb4, 0xe6, 0x8b, 0x9d, 0xcd, 0x2b, 0x8d, 0x26, 0xc3, 0x0e, 0xe9, 0xd9, 0x7f, 0x82, 0x23, + 0x2f, 0x41, 0x52, 0x13, 0xdf, 0xdc, 0x1d, 0x94, 0xc6, 0x77, 0x07, 0x68, 0x76, 0x67, 0x4d, 0x55, + 0xb1, 0x8b, 0x1a, 0x2e, 0xf8, 0x20, 0xa1, 0x17, 0xa7, 0x8e, 0xa2, 0xb9, 0x95, 0xd9, 0x7c, 0x4c, + 0xd6, 0x2e, 0x45, 0x2a, 0xdf, 0x9d, 0x47, 0xcc, 0xb7, 0xc6, 0x77, 0x07, 0x8d, 0xc2, 0x95, 0x55, + 0x14, 0x6d, 0xff, 0xbf, 0x85, 0xde, 0xbe, 0x8a, 0xdc, 0x2e, 0x13, 0x3c, 0xc9, 0xae, 0xcc, 0xc4, + 0xf5, 0x40, 0xbe, 0x96, 0xfa, 0x2a, 0x22, 0x06, 0x47, 0x95, 0x65, 0x92, 0x8d, 0x77, 0x9d, 0xac, + 0xc8, 0xf7, 0x3a, 0x06, 0xc7, 0xac, 0x2b, 0xbf, 0x4a, 0x7a, 0xb2, 0x32, 0x75, 0xec, 0xa3, 0x6d, + 0x21, 0xa9, 0x4c, 0x44, 0xb3, 0x9c, 0xf9, 0x74, 0x1f, 0xe8, 0x93, 0x69, 0x99, 0xbb, 0xca, 0x69, + 0x3b, 0x3f, 0x5b, 0xca, 0xa3, 0xfd, 0x44, 0x43, 0xef, 0xad, 0xa0, 0x7e, 0x64, 0x42, 0xe2, 0x5f, + 0x97, 0x3a, 0x4a, 0x36, 0xeb, 0x68, 0x4a, 0x67, 0xfd, 0xdc, 0x53, 0xae, 0xb5, 0xc9, 0xcd, 0x5c, + 0x37, 0x1d, 0x54, 0x65, 0x12, 0x82, 0x74, 0x4b, 0xca, 0x87, 0x3b, 0xc7, 0xa7, 0x0f, 0x2b, 0xd3, + 0x6c, 0x28, 0xab, 0xea, 0x45, 0x2a, 0x6a, 0xe5, 0xda, 0xed, 0xf1, 0xea, 0xf2, 0xd2, 0x76, 0xe3, + 0x3e, 0xaa, 0x07, 0x2c, 0x3c, 0x1b, 0x52, 0xe6, 0x53, 0xdb, 0x87, 0xc5, 0x12, 0x17, 0xf2, 0x48, + 0xbf, 0x33, 0x92, 0x7f, 0x67, 0xe4, 0x22, 0x94, 0x3d, 0x7e, 0x2d, 0x39, 0x0b, 0x3d, 0xf3, 0x1d, + 0xe5, 0x5b, 0xbf, 0x9c, 0xd3, 0xb2, 0x0a, 0xca, 0xf8, 0x37, 0x54, 0x13, 0xe0, 0x83, 0x23, 0x23, + 0xae, 0x96, 0xe7, 0xf3, 0x0d, 0x1b, 0x49, 0x6d, 0xf0, 0xaf, 0x15, 0x6a, 0xd6, 0xd3, 0x4e, 0x4e, + 0x4e, 0xd6, 0x54, 0xb2, 0xfd, 0xbc, 0x82, 0xde, 0x5f, 0x3b, 0x79, 0xfc, 0x03, 0xc2, 0x91, 0x2d, + 0x80, 0x0f, 0xc1, 0xfd, 0x2e, 0xff, 0x7f, 0x60, 0x51, 0x98, 0x15, 0x5b, 0x36, 0x5b, 0x2a, 0x79, + 0xdc, 0x5b, 0x8a, 0xb0, 0x56, 0x50, 0xf8, 0x3f, 0x0d, 0x35, 0xdc, 0xdc, 0x06, 0xdc, 0xab, 0xc8, + 0x9d, 0x0c, 0xef, 0xe7, 0x57, 0xb1, 0xa3, 0xa4, 0x3b, 0xaf, 0x7c, 0x1e, 0x4a, 0x3e, 0x32, 0xf7, + 0x55, 0x82, 0x8d, 0xc2, 0x9b, 0x55, 0x4c, 0x02, 0x5f, 0x22, 0xec, 0x4e, 0x25, 0xc5, 0x99, 0xef, + 0x47, 0x7f, 0x81, 0x9b, 0x7d, 0x3e, 0x55, 0xf3, 0x03, 0xa5, 0xb0, 0x5f, 0xf0, 0x9d, 0x04, 0x59, + 0x2b, 0x40, 0x7c, 0x8a, 0x76, 0x9d, 0x84, 0x73, 0x08, 0xe5, 0xf7, 0x40, 0x7d, 0xd9, 0x1f, 0x35, + 0x2b, 0x99, 0xd4, 0xbb, 0x4a, 0x6a, 0xf7, 0xdb, 0xc2, 0xab, 0xb5, 0x10, 0x9d, 0xf2, 0x2e, 0x08, + 0xc6, 0xc1, 0x9d, 0xf0, 0xd5, 0x22, 0xdf, 0x2d, 0xbc, 0x5a, 0x0b, 0xd1, 0xf8, 0x04, 0xd5, 0xe1, + 0xef, 0x18, 0x9c, 0x49, 0x8f, 0xb7, 0x33, 0x7a, 0xba, 0x68, 0xe7, 0x73, 0x6f, 0x56, 0x21, 0xb2, + 0xe5, 0x23, 0xbc, 0xdc, 0x44, 0xbc, 0x87, 0xca, 0x03, 0x18, 0x65, 0x23, 0x7f, 0xd3, 0x4a, 0x7f, + 0xe2, 0x6f, 0x50, 0x75, 0x48, 0xfd, 0x04, 0xd4, 0x36, 0x7e, 0xb4, 0xd9, 0x36, 0xfe, 0xc4, 0x02, + 0xb0, 0x72, 0xf0, 0xeb, 0xad, 0x13, 0xcd, 0x3c, 0xba, 0xb9, 0xd7, 0x4b, 0xb7, 0xf7, 0x7a, 0xe9, + 0xf1, 0xbd, 0x5e, 0xfa, 0x67, 0xac, 0x6b, 0x37, 0x63, 0x5d, 0xbb, 0x1d, 0xeb, 0xda, 0xd3, 0xb1, + 0xae, 0xfd, 0xfb, 0x4c, 0x2f, 0xfd, 0xf2, 0x86, 0x1a, 0xfa, 0x8b, 0x00, 0x00, 0x00, 0xff, 0xff, + 0x9b, 0xdc, 0x98, 0x55, 0x53, 0x08, 0x00, 0x00, } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/policy/v1beta1/generated.proto b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/policy/v1beta1/generated.proto index 8f172d3b..51e1451c 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/policy/v1beta1/generated.proto +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/policy/v1beta1/generated.proto @@ -36,7 +36,7 @@ option go_package = "v1beta1"; // created by POSTing to .../pods//evictions. message Eviction { // ObjectMeta describes the pod that is being evicted. - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // DeleteOptions may be provided optional k8s.io.kubernetes.pkg.api.v1.DeleteOptions deleteOptions = 2; @@ -44,7 +44,7 @@ message Eviction { // PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods message PodDisruptionBudget { - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Specification of the desired behavior of the PodDisruptionBudget. optional PodDisruptionBudgetSpec spec = 2; diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/policy/v1beta1/register.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/policy/v1beta1/register.go index eeef893a..83493e2f 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/policy/v1beta1/register.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/policy/v1beta1/register.go @@ -45,7 +45,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { &PodDisruptionBudget{}, &PodDisruptionBudgetList{}, &Eviction{}, - &v1.ListOptions{}, &v1.DeleteOptions{}, &metav1.ExportOptions{}, &metav1.GetOptions{}, diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/policy/v1beta1/types.generated.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/policy/v1beta1/types.generated.go index 8cb0c12f..cdd6db24 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/policy/v1beta1/types.generated.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/policy/v1beta1/types.generated.go @@ -26,8 +26,8 @@ import ( "fmt" codec1978 "github.com/ugorji/go/codec" pkg2_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - pkg4_types "k8s.io/apimachinery/pkg/types" - pkg3_v1 "k8s.io/client-go/pkg/api/v1" + pkg3_types "k8s.io/apimachinery/pkg/types" + pkg4_v1 "k8s.io/client-go/pkg/api/v1" pkg1_intstr "k8s.io/client-go/pkg/util/intstr" "reflect" "runtime" @@ -65,8 +65,8 @@ func init() { } if false { // reference the types, but skip this branch at build/run time var v0 pkg2_v1.LabelSelector - var v1 pkg4_types.UID - var v2 pkg3_v1.ObjectMeta + var v1 pkg3_types.UID + var v2 pkg4_v1.DeleteOptions var v3 pkg1_intstr.IntOrString var v4 time.Time _, _, _, _, _ = v0, v1, v2, v3, v4 @@ -891,7 +891,13 @@ func (x *PodDisruptionBudget) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -901,7 +907,13 @@ func (x *PodDisruptionBudget) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -1025,24 +1037,30 @@ func (x *PodDisruptionBudget) codecDecodeSelfFromMap(l int, d *codec1978.Decoder } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg3_v1.ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = PodDisruptionBudgetSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = PodDisruptionBudgetStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -1055,16 +1073,16 @@ func (x *PodDisruptionBudget) codecDecodeSelfFromArray(l int, d *codec1978.Decod var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1072,21 +1090,21 @@ func (x *PodDisruptionBudget) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1094,38 +1112,44 @@ func (x *PodDisruptionBudget) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg3_v1.ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1133,16 +1157,16 @@ func (x *PodDisruptionBudget) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.Spec = PodDisruptionBudgetSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1150,21 +1174,21 @@ func (x *PodDisruptionBudget) codecDecodeSelfFromArray(l int, d *codec1978.Decod if r.TryDecodeAsNil() { x.Status = PodDisruptionBudgetStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -1625,7 +1649,13 @@ func (x *Eviction) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -1635,7 +1665,13 @@ func (x *Eviction) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -1748,10 +1784,16 @@ func (x *Eviction) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg3_v1.ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "deleteOptions": if r.TryDecodeAsNil() { @@ -1760,7 +1802,7 @@ func (x *Eviction) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } } else { if x.DeleteOptions == nil { - x.DeleteOptions = new(pkg3_v1.DeleteOptions) + x.DeleteOptions = new(pkg4_v1.DeleteOptions) } x.DeleteOptions.CodecDecodeSelf(d) } @@ -1775,16 +1817,16 @@ func (x *Eviction) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + var yyj11 int + var yyb11 bool + var yyhl11 bool = l >= 0 + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1792,21 +1834,21 @@ func (x *Eviction) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv11 := &x.Kind - yym12 := z.DecBinary() - _ = yym12 + yyv12 := &x.Kind + yym13 := z.DecBinary() + _ = yym13 if false { } else { - *((*string)(yyv11)) = r.DecodeString() + *((*string)(yyv12)) = r.DecodeString() } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1814,38 +1856,44 @@ func (x *Eviction) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv13 := &x.APIVersion - yym14 := z.DecBinary() - _ = yym14 + yyv14 := &x.APIVersion + yym15 := z.DecBinary() + _ = yym15 if false { } else { - *((*string)(yyv13)) = r.DecodeString() + *((*string)(yyv14)) = r.DecodeString() } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg3_v1.ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv15 := &x.ObjectMeta - yyv15.CodecDecodeSelf(d) + yyv16 := &x.ObjectMeta + yym17 := z.DecBinary() + _ = yym17 + if false { + } else if z.HasExtensions() && z.DecExt(yyv16) { + } else { + z.DecFallback(yyv16, false) + } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1856,22 +1904,22 @@ func (x *Eviction) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } } else { if x.DeleteOptions == nil { - x.DeleteOptions = new(pkg3_v1.DeleteOptions) + x.DeleteOptions = new(pkg4_v1.DeleteOptions) } x.DeleteOptions.CodecDecodeSelf(d) } for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj11++ + if yyhl11 { + yyb11 = yyj11 > l } else { - yyb10 = r.CheckBreak() + yyb11 = r.CheckBreak() } - if yyb10 { + if yyb11 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj10-1, "") + z.DecStructFieldNotFound(yyj11-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/policy/v1beta1/types.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/policy/v1beta1/types.go index 9aefac7d..0ec6b94c 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/policy/v1beta1/types.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/policy/v1beta1/types.go @@ -73,8 +73,8 @@ type PodDisruptionBudgetStatus struct { // PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods type PodDisruptionBudget struct { - metav1.TypeMeta `json:",inline"` - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Specification of the desired behavior of the PodDisruptionBudget. Spec PodDisruptionBudgetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` @@ -99,7 +99,7 @@ type Eviction struct { metav1.TypeMeta `json:",inline"` // ObjectMeta describes the pod that is being evicted. - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // DeleteOptions may be provided DeleteOptions *v1.DeleteOptions `json:"deleteOptions,omitempty" protobuf:"bytes,2,opt,name=deleteOptions"` diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/policy/v1beta1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/policy/v1beta1/zz_generated.conversion.go index 04efa307..47facf79 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/policy/v1beta1/zz_generated.conversion.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/policy/v1beta1/zz_generated.conversion.go @@ -52,10 +52,7 @@ func RegisterConversions(scheme *runtime.Scheme) error { } func autoConvert_v1beta1_Eviction_To_policy_Eviction(in *Eviction, out *policy.Eviction, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.DeleteOptions = (*api.DeleteOptions)(unsafe.Pointer(in.DeleteOptions)) return nil } @@ -65,10 +62,7 @@ func Convert_v1beta1_Eviction_To_policy_Eviction(in *Eviction, out *policy.Evict } func autoConvert_policy_Eviction_To_v1beta1_Eviction(in *policy.Eviction, out *Eviction, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.DeleteOptions = (*v1.DeleteOptions)(unsafe.Pointer(in.DeleteOptions)) return nil } @@ -78,10 +72,7 @@ func Convert_policy_Eviction_To_v1beta1_Eviction(in *policy.Eviction, out *Evict } func autoConvert_v1beta1_PodDisruptionBudget_To_policy_PodDisruptionBudget(in *PodDisruptionBudget, out *policy.PodDisruptionBudget, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_PodDisruptionBudgetSpec_To_policy_PodDisruptionBudgetSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -96,10 +87,7 @@ func Convert_v1beta1_PodDisruptionBudget_To_policy_PodDisruptionBudget(in *PodDi } func autoConvert_policy_PodDisruptionBudget_To_v1beta1_PodDisruptionBudget(in *policy.PodDisruptionBudget, out *PodDisruptionBudget, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_policy_PodDisruptionBudgetSpec_To_v1beta1_PodDisruptionBudgetSpec(&in.Spec, &out.Spec, s); err != nil { return err } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/policy/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/policy/v1beta1/zz_generated.deepcopy.go index 92376f53..99b5378f 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/policy/v1beta1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/policy/v1beta1/zz_generated.deepcopy.go @@ -21,10 +21,10 @@ limitations under the License. package v1beta1 import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - v1 "k8s.io/client-go/pkg/api/v1" + api_v1 "k8s.io/client-go/pkg/api/v1" reflect "reflect" ) @@ -49,13 +49,15 @@ func DeepCopy_v1beta1_Eviction(in interface{}, out interface{}, c *conversion.Cl in := in.(*Eviction) out := out.(*Eviction) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.DeleteOptions != nil { in, out := &in.DeleteOptions, &out.DeleteOptions - *out = new(v1.DeleteOptions) - if err := v1.DeepCopy_v1_DeleteOptions(*in, *out, c); err != nil { + *out = new(api_v1.DeleteOptions) + if err := api_v1.DeepCopy_v1_DeleteOptions(*in, *out, c); err != nil { return err } } @@ -68,8 +70,10 @@ func DeepCopy_v1beta1_PodDisruptionBudget(in interface{}, out interface{}, c *co in := in.(*PodDisruptionBudget) out := out.(*PodDisruptionBudget) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v1beta1_PodDisruptionBudgetSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -109,7 +113,7 @@ func DeepCopy_v1beta1_PodDisruptionBudgetSpec(in interface{}, out interface{}, c if newVal, err := c.DeepCopy(*in); err != nil { return err } else { - *out = newVal.(*meta_v1.LabelSelector) + *out = newVal.(*v1.LabelSelector) } } return nil @@ -123,7 +127,7 @@ func DeepCopy_v1beta1_PodDisruptionBudgetStatus(in interface{}, out interface{}, *out = *in if in.DisruptedPods != nil { in, out := &in.DisruptedPods, &out.DisruptedPods - *out = make(map[string]meta_v1.Time) + *out = make(map[string]v1.Time) for key, val := range *in { (*out)[key] = val.DeepCopy() } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/policy/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/policy/zz_generated.deepcopy.go index 0eac5e60..c4dd5833 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/policy/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/policy/zz_generated.deepcopy.go @@ -49,8 +49,10 @@ func DeepCopy_policy_Eviction(in interface{}, out interface{}, c *conversion.Clo in := in.(*Eviction) out := out.(*Eviction) *out = *in - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.DeleteOptions != nil { in, out := &in.DeleteOptions, &out.DeleteOptions @@ -68,8 +70,10 @@ func DeepCopy_policy_PodDisruptionBudget(in interface{}, out interface{}, c *con in := in.(*PodDisruptionBudget) out := out.(*PodDisruptionBudget) *out = *in - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_policy_PodDisruptionBudgetSpec(&in.Spec, &out.Spec, c); err != nil { return err diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/helpers.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/helpers.go index 760a14a6..f1444061 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/helpers.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/helpers.go @@ -20,9 +20,9 @@ import ( "fmt" "strings" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/client-go/pkg/api" ) func RoleRefGroupKind(roleRef RoleRef) schema.GroupKind { @@ -206,7 +206,7 @@ type ClusterRoleBindingBuilder struct { func NewClusterBinding(clusterRoleName string) *ClusterRoleBindingBuilder { return &ClusterRoleBindingBuilder{ ClusterRoleBinding: ClusterRoleBinding{ - ObjectMeta: api.ObjectMeta{Name: clusterRoleName}, + ObjectMeta: metav1.ObjectMeta{Name: clusterRoleName}, RoleRef: RoleRef{ APIGroup: GroupName, Kind: "ClusterRole", diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/install/install.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/install/install.go index 808c90c1..f92c11e0 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/install/install.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/install/install.go @@ -19,25 +19,35 @@ limitations under the License. package install import ( + "k8s.io/apimachinery/pkg/apimachinery/announced" + "k8s.io/apimachinery/pkg/apimachinery/registered" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/client-go/pkg/apimachinery/announced" + "k8s.io/client-go/pkg/api" "k8s.io/client-go/pkg/apis/rbac" "k8s.io/client-go/pkg/apis/rbac/v1alpha1" + "k8s.io/client-go/pkg/apis/rbac/v1beta1" ) func init() { + Install(api.GroupFactoryRegistry, api.Registry, api.Scheme) +} + +// Install registers the API group and adds types to a scheme +func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) { if err := announced.NewGroupMetaFactory( &announced.GroupMetaFactoryArgs{ GroupName: rbac.GroupName, - VersionPreferenceOrder: []string{v1alpha1.SchemeGroupVersion.Version}, + VersionPreferenceOrder: []string{v1beta1.SchemeGroupVersion.Version, v1alpha1.SchemeGroupVersion.Version}, ImportPrefix: "k8s.io/client-go/pkg/apis/rbac", RootScopedKinds: sets.NewString("ClusterRole", "ClusterRoleBinding"), AddInternalObjectsToScheme: rbac.AddToScheme, }, announced.VersionToSchemeFunc{ + v1beta1.SchemeGroupVersion.Version: v1beta1.AddToScheme, v1alpha1.SchemeGroupVersion.Version: v1alpha1.AddToScheme, }, - ).Announce().RegisterAndEnable(); err != nil { + ).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil { panic(err) } } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/register.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/register.go index c9b69072..8642b9d7 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/register.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/register.go @@ -56,7 +56,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { &ClusterRoleBindingList{}, &ClusterRoleList{}, - &api.ListOptions{}, &api.DeleteOptions{}, &metav1.ExportOptions{}, &metav1.GetOptions{}, diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/types.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/types.go index 702f660c..87abe1a7 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/types.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/types.go @@ -18,8 +18,6 @@ package rbac import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/client-go/pkg/api" ) // Authorization is calculated against @@ -43,12 +41,9 @@ const ( type PolicyRule struct { // Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds. Verbs []string - // AttributeRestrictions will vary depending on what the Authorizer/AuthorizationAttributeBuilder pair supports. - // If the Authorizer does not recognize how to handle the AttributeRestrictions, the Authorizer should report an error. - AttributeRestrictions runtime.Object + // APIGroups is the name of the APIGroup that contains the resources. // If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed. - APIGroups []string // Resources is a list of resources this rule applies to. ResourceAll represents all resources. Resources []string @@ -94,7 +89,7 @@ type RoleRef struct { type Role struct { metav1.TypeMeta // Standard object's metadata. - api.ObjectMeta + metav1.ObjectMeta // Rules holds all the PolicyRules for this Role Rules []PolicyRule @@ -107,7 +102,7 @@ type Role struct { // namespace only have effect in that namespace. type RoleBinding struct { metav1.TypeMeta - api.ObjectMeta + metav1.ObjectMeta // Subjects holds references to the objects the role applies to. Subjects []Subject @@ -144,7 +139,7 @@ type RoleList struct { type ClusterRole struct { metav1.TypeMeta // Standard object's metadata. - api.ObjectMeta + metav1.ObjectMeta // Rules holds all the PolicyRules for this ClusterRole Rules []PolicyRule @@ -158,7 +153,7 @@ type ClusterRole struct { type ClusterRoleBinding struct { metav1.TypeMeta // Standard object's metadata. - api.ObjectMeta + metav1.ObjectMeta // Subjects holds references to the objects the role applies to. Subjects []Subject diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1alpha1/generated.pb.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1alpha1/generated.pb.go index fb3faffe..9be44b61 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1alpha1/generated.pb.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1alpha1/generated.pb.go @@ -344,14 +344,6 @@ func (m *PolicyRule) MarshalTo(data []byte) (int, error) { i += copy(data[i:], s) } } - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64(m.AttributeRestrictions.Size())) - n7, err := m.AttributeRestrictions.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n7 if len(m.APIGroups) > 0 { for _, s := range m.APIGroups { data[i] = 0x1a @@ -433,11 +425,11 @@ func (m *PolicyRuleBuilder) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.PolicyRule.Size())) - n8, err := m.PolicyRule.MarshalTo(data[i:]) + n7, err := m.PolicyRule.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n8 + i += n7 return i, nil } @@ -459,11 +451,11 @@ func (m *Role) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n9, err := m.ObjectMeta.MarshalTo(data[i:]) + n8, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n9 + i += n8 if len(m.Rules) > 0 { for _, msg := range m.Rules { data[i] = 0x12 @@ -497,11 +489,11 @@ func (m *RoleBinding) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) - n10, err := m.ObjectMeta.MarshalTo(data[i:]) + n9, err := m.ObjectMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n10 + i += n9 if len(m.Subjects) > 0 { for _, msg := range m.Subjects { data[i] = 0x12 @@ -517,11 +509,11 @@ func (m *RoleBinding) MarshalTo(data []byte) (int, error) { data[i] = 0x1a i++ i = encodeVarintGenerated(data, i, uint64(m.RoleRef.Size())) - n11, err := m.RoleRef.MarshalTo(data[i:]) + n10, err := m.RoleRef.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n11 + i += n10 return i, nil } @@ -543,11 +535,11 @@ func (m *RoleBindingList) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n12, err := m.ListMeta.MarshalTo(data[i:]) + n11, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n12 + i += n11 if len(m.Items) > 0 { for _, msg := range m.Items { data[i] = 0x12 @@ -581,11 +573,11 @@ func (m *RoleList) MarshalTo(data []byte) (int, error) { data[i] = 0xa i++ i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) - n13, err := m.ListMeta.MarshalTo(data[i:]) + n12, err := m.ListMeta.MarshalTo(data[i:]) if err != nil { return 0, err } - i += n13 + i += n12 if len(m.Items) > 0 { for _, msg := range m.Items { data[i] = 0x12 @@ -767,8 +759,6 @@ func (m *PolicyRule) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) } } - l = m.AttributeRestrictions.Size() - n += 1 + l + sovGenerated(uint64(l)) if len(m.APIGroups) > 0 { for _, s := range m.APIGroups { l = len(s) @@ -906,7 +896,7 @@ func (this *ClusterRole) String() string { return "nil" } s := strings.Join([]string{`&ClusterRole{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Rules:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Rules), "PolicyRule", "PolicyRule", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -917,7 +907,7 @@ func (this *ClusterRoleBinding) String() string { return "nil" } s := strings.Join([]string{`&ClusterRoleBinding{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Subjects:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Subjects), "Subject", "Subject", 1), `&`, ``, 1) + `,`, `RoleRef:` + strings.Replace(strings.Replace(this.RoleRef.String(), "RoleRef", "RoleRef", 1), `&`, ``, 1) + `,`, `}`, @@ -962,7 +952,6 @@ func (this *PolicyRule) String() string { } s := strings.Join([]string{`&PolicyRule{`, `Verbs:` + fmt.Sprintf("%v", this.Verbs) + `,`, - `AttributeRestrictions:` + strings.Replace(strings.Replace(this.AttributeRestrictions.String(), "RawExtension", "k8s_io_apimachinery_pkg_runtime.RawExtension", 1), `&`, ``, 1) + `,`, `APIGroups:` + fmt.Sprintf("%v", this.APIGroups) + `,`, `Resources:` + fmt.Sprintf("%v", this.Resources) + `,`, `ResourceNames:` + fmt.Sprintf("%v", this.ResourceNames) + `,`, @@ -986,7 +975,7 @@ func (this *Role) String() string { return "nil" } s := strings.Join([]string{`&Role{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Rules:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Rules), "PolicyRule", "PolicyRule", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -997,7 +986,7 @@ func (this *RoleBinding) String() string { return "nil" } s := strings.Join([]string{`&RoleBinding{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Subjects:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Subjects), "Subject", "Subject", 1), `&`, ``, 1) + `,`, `RoleRef:` + strings.Replace(strings.Replace(this.RoleRef.String(), "RoleRef", "RoleRef", 1), `&`, ``, 1) + `,`, `}`, @@ -1671,36 +1660,6 @@ func (m *PolicyRule) Unmarshal(data []byte) error { } m.Verbs = append(m.Verbs, string(data[iNdEx:postIndex])) iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AttributeRestrictions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.AttributeRestrictions.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field APIGroups", wireType) @@ -2801,61 +2760,58 @@ var ( ) var fileDescriptorGenerated = []byte{ - // 895 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x55, 0xcf, 0x8b, 0x23, 0x45, - 0x14, 0x4e, 0x4d, 0x12, 0x27, 0x79, 0xe3, 0x30, 0x4e, 0xc9, 0x4a, 0x3b, 0x60, 0x32, 0xe4, 0x14, - 0x74, 0xb7, 0x9b, 0x0c, 0xab, 0xee, 0x41, 0x0f, 0xd3, 0x22, 0x32, 0xb8, 0x8e, 0x43, 0x2d, 0x2e, - 0xba, 0x2c, 0x48, 0xa5, 0x53, 0x9b, 0x94, 0xe9, 0x74, 0x37, 0x55, 0xd5, 0xa3, 0x8b, 0x08, 0x22, - 0x1e, 0x3c, 0xfa, 0x57, 0xec, 0xcd, 0x8b, 0x57, 0xf1, 0xe2, 0x69, 0xc0, 0xcb, 0x1e, 0xf5, 0x12, - 0x9c, 0xf8, 0x8f, 0x48, 0x75, 0xaa, 0x7f, 0xcc, 0x76, 0x87, 0xf9, 0x21, 0x0e, 0x08, 0x7b, 0x4a, - 0xea, 0xbd, 0xef, 0x7b, 0xf5, 0xbd, 0x7a, 0x55, 0x5f, 0xc3, 0x9d, 0xe9, 0x1d, 0x69, 0xf3, 0xd0, - 0x99, 0xc6, 0x43, 0x26, 0x02, 0xa6, 0x98, 0x74, 0xa2, 0xe9, 0xd8, 0xa1, 0x11, 0x97, 0x8e, 0x18, - 0x52, 0xcf, 0x39, 0x1e, 0x50, 0x3f, 0x9a, 0xd0, 0x81, 0x33, 0x66, 0x01, 0x13, 0x54, 0xb1, 0x91, - 0x1d, 0x89, 0x50, 0x85, 0xb8, 0xbf, 0x64, 0xda, 0x39, 0xd3, 0x8e, 0xa6, 0x63, 0x5b, 0x33, 0x6d, - 0xcd, 0xb4, 0x53, 0xe6, 0xce, 0xad, 0x31, 0x57, 0x93, 0x78, 0x68, 0x7b, 0xe1, 0xcc, 0x19, 0x87, - 0xe3, 0xd0, 0x49, 0x0a, 0x0c, 0xe3, 0x47, 0xc9, 0x2a, 0x59, 0x24, 0xff, 0x96, 0x85, 0x77, 0x6e, - 0x1b, 0x49, 0x34, 0xe2, 0x33, 0xea, 0x4d, 0x78, 0xc0, 0xc4, 0xe3, 0x5c, 0xd4, 0x8c, 0x29, 0xea, - 0x1c, 0x97, 0xe4, 0xec, 0x38, 0xab, 0x58, 0x22, 0x0e, 0x14, 0x9f, 0xb1, 0x12, 0xe1, 0xad, 0xf3, - 0x08, 0xd2, 0x9b, 0xb0, 0x19, 0x2d, 0xf1, 0xf6, 0x56, 0x9e, 0x98, 0x23, 0x98, 0x0c, 0x63, 0xe1, - 0x95, 0xf7, 0xba, 0xb9, 0x9a, 0x53, 0xd1, 0xca, 0xa0, 0x1a, 0x1d, 0x2b, 0xee, 0x3b, 0x3c, 0x50, - 0x52, 0x89, 0x67, 0x29, 0xbd, 0xdf, 0x10, 0x6c, 0xbc, 0xe7, 0xc7, 0x52, 0x31, 0x41, 0x42, 0x9f, - 0xe1, 0x4f, 0xa1, 0xa5, 0x0f, 0x6a, 0x44, 0x15, 0xb5, 0xd0, 0x2e, 0xea, 0x6f, 0xec, 0xf5, 0xed, - 0x95, 0xf3, 0xb2, 0x8f, 0x07, 0xf6, 0xc7, 0xc3, 0x2f, 0x98, 0xa7, 0x3e, 0x62, 0x8a, 0xba, 0xf8, - 0x64, 0xde, 0xad, 0x2d, 0xe6, 0x5d, 0xc8, 0x63, 0x24, 0xab, 0x86, 0x3f, 0x83, 0xa6, 0x88, 0x7d, - 0x26, 0xad, 0xb5, 0xdd, 0x7a, 0x7f, 0x63, 0xef, 0xb6, 0x7d, 0xd1, 0x6b, 0x60, 0x1f, 0x85, 0x3e, - 0xf7, 0x1e, 0x93, 0xd8, 0x67, 0xee, 0xa6, 0xd9, 0xa2, 0xa9, 0x57, 0x92, 0x2c, 0x2b, 0xf6, 0x7e, - 0x5a, 0x03, 0x5c, 0x68, 0xc2, 0xe5, 0xc1, 0x88, 0x07, 0xe3, 0xff, 0xb0, 0x97, 0xcf, 0xa1, 0x25, - 0xe3, 0x24, 0x91, 0xb6, 0x33, 0xb8, 0x78, 0x3b, 0xf7, 0x96, 0x4c, 0xf7, 0x25, 0xb3, 0x45, 0xcb, - 0x04, 0x24, 0xc9, 0x8a, 0xe2, 0x87, 0xb0, 0x2e, 0x42, 0x9f, 0x11, 0xf6, 0xc8, 0xaa, 0x27, 0xca, - 0x2f, 0x51, 0x9f, 0x2c, 0x89, 0xee, 0x96, 0xa9, 0xbf, 0x6e, 0x02, 0x24, 0x2d, 0xd9, 0x7b, 0x82, - 0xe0, 0xd5, 0xf2, 0x79, 0xb9, 0x31, 0xf7, 0x47, 0x4c, 0xe0, 0x1f, 0x10, 0x60, 0xaf, 0x94, 0x35, - 0x27, 0xf8, 0xce, 0xc5, 0x75, 0x54, 0xec, 0xb0, 0x63, 0x24, 0x55, 0x4c, 0x8b, 0x54, 0xec, 0xd9, - 0xfb, 0x13, 0xc1, 0x2b, 0x65, 0xe8, 0x5d, 0x2e, 0x15, 0x7e, 0x58, 0x1a, 0xae, 0x9d, 0x4a, 0x2b, - 0x3e, 0xcc, 0x5c, 0x9c, 0x46, 0xeb, 0x21, 0x6b, 0x76, 0x32, 0xe2, 0xec, 0xfc, 0xd3, 0x48, 0x61, - 0xc0, 0x14, 0x9a, 0x5c, 0xb1, 0x59, 0x3a, 0xdd, 0x7f, 0xd7, 0x75, 0x76, 0x69, 0x0f, 0x74, 0x49, - 0xb2, 0xac, 0xdc, 0xfb, 0x1d, 0xc1, 0x56, 0x01, 0x7c, 0x0d, 0x4d, 0x3d, 0x38, 0xdb, 0xd4, 0x9b, - 0x57, 0x6b, 0xaa, 0xba, 0x9b, 0xef, 0xeb, 0x00, 0xf9, 0x3b, 0xc5, 0x5d, 0x68, 0x1e, 0x33, 0x31, - 0x94, 0x16, 0xda, 0xad, 0xf7, 0xdb, 0x6e, 0x5b, 0xe3, 0xef, 0xeb, 0x00, 0x59, 0xc6, 0xf1, 0x77, - 0x08, 0x6e, 0x50, 0xa5, 0x04, 0x1f, 0xc6, 0x8a, 0x11, 0x26, 0x95, 0xe0, 0x9e, 0xe2, 0x61, 0xa0, - 0xc5, 0xe9, 0xbe, 0x6f, 0xad, 0xec, 0xdb, 0xb8, 0xac, 0x4d, 0xe8, 0x97, 0xef, 0x7f, 0xa5, 0x58, - 0x20, 0x79, 0x18, 0xb8, 0xaf, 0x19, 0x51, 0x37, 0xf6, 0xab, 0x6a, 0x92, 0xea, 0xad, 0xf0, 0x1b, - 0xd0, 0xa6, 0x11, 0xff, 0x40, 0x84, 0x71, 0x24, 0xad, 0x7a, 0xa2, 0x74, 0x73, 0x31, 0xef, 0xb6, - 0xf7, 0x8f, 0x0e, 0x96, 0x41, 0x92, 0xe7, 0x35, 0x38, 0xb5, 0x69, 0x69, 0x35, 0x72, 0x30, 0x49, - 0x83, 0x24, 0xcf, 0xe3, 0xb7, 0x61, 0x33, 0x5d, 0x1c, 0xd2, 0x19, 0x93, 0x56, 0x33, 0x21, 0x6c, - 0x2f, 0xe6, 0xdd, 0x4d, 0x52, 0x4c, 0x90, 0xb3, 0x38, 0xfc, 0x2e, 0x6c, 0x05, 0x61, 0x90, 0x42, - 0x3e, 0x21, 0x77, 0xa5, 0xf5, 0x42, 0x42, 0x7d, 0x79, 0x31, 0xef, 0x6e, 0x1d, 0x9e, 0x4d, 0x91, - 0x67, 0xb1, 0xbd, 0x6f, 0x60, 0xbb, 0xe0, 0x96, 0xe6, 0x41, 0x4f, 0x00, 0xa2, 0x2c, 0x68, 0xee, - 0xd5, 0xd5, 0xec, 0x37, 0x73, 0xc5, 0x3c, 0x46, 0x0a, 0xb5, 0x7b, 0xbf, 0x20, 0x68, 0xfc, 0x7f, - 0x3f, 0x23, 0x4f, 0xd6, 0x60, 0xe3, 0xf9, 0xf7, 0xe3, 0x02, 0xdf, 0x0f, 0x6d, 0x5d, 0xd7, 0xeb, - 0xc7, 0x57, 0xb7, 0xae, 0xf3, 0x8d, 0xf8, 0x57, 0x04, 0xad, 0x6b, 0x72, 0xe0, 0x7b, 0x67, 0xdb, - 0xb0, 0x2f, 0xd9, 0x46, 0xb5, 0xfe, 0xaf, 0x21, 0x9d, 0x10, 0xbe, 0x09, 0xad, 0xd4, 0xb0, 0x12, - 0xf5, 0xed, 0x5c, 0x4d, 0xea, 0x69, 0x24, 0x43, 0xe0, 0x5d, 0x68, 0x4c, 0x79, 0x30, 0x4a, 0x1c, - 0xb7, 0xed, 0xbe, 0x68, 0x90, 0x8d, 0x0f, 0x79, 0x30, 0x22, 0x49, 0x46, 0x23, 0x02, 0x3a, 0x63, - 0xc9, 0x1d, 0x2a, 0x20, 0xb4, 0x55, 0x91, 0x24, 0xd3, 0xfb, 0x19, 0xc1, 0xba, 0xb9, 0x7f, 0x59, - 0x3d, 0xb4, 0xb2, 0xde, 0x1e, 0x00, 0x8d, 0xf8, 0x7d, 0x26, 0xb4, 0x69, 0x9b, 0x7d, 0xb3, 0x97, - 0xb2, 0x7f, 0x74, 0x60, 0x32, 0xa4, 0x80, 0x3a, 0x5f, 0x03, 0x76, 0xa0, 0xad, 0x7f, 0x65, 0x44, - 0x3d, 0x66, 0x35, 0x12, 0xd8, 0xb6, 0x81, 0xb5, 0x0f, 0xd3, 0x04, 0xc9, 0x31, 0xee, 0xeb, 0x27, - 0xa7, 0x9d, 0xda, 0xd3, 0xd3, 0x4e, 0xed, 0x8f, 0xd3, 0x4e, 0xed, 0xdb, 0x45, 0x07, 0x9d, 0x2c, - 0x3a, 0xe8, 0xe9, 0xa2, 0x83, 0xfe, 0x5a, 0x74, 0xd0, 0x8f, 0x7f, 0x77, 0x6a, 0x0f, 0x5a, 0xe9, - 0xc1, 0xff, 0x13, 0x00, 0x00, 0xff, 0xff, 0xf9, 0x52, 0x01, 0xe6, 0xe8, 0x0c, 0x00, 0x00, + // 840 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x54, 0xcf, 0x6b, 0x24, 0x45, + 0x14, 0x9e, 0x4a, 0x66, 0xcc, 0xcc, 0x8b, 0x21, 0xa6, 0x04, 0x69, 0x73, 0xe8, 0x09, 0x7d, 0x0a, + 0xba, 0x76, 0x3b, 0x61, 0xd5, 0x3d, 0xe8, 0x61, 0xdb, 0x83, 0x04, 0xd7, 0x18, 0x6a, 0x71, 0xc1, + 0x65, 0x41, 0x6b, 0x7a, 0x6a, 0x67, 0xca, 0xe9, 0x5f, 0x54, 0x75, 0x07, 0x16, 0x11, 0x3c, 0x7a, + 0xf4, 0xaf, 0xf0, 0xe8, 0x41, 0xf0, 0xe8, 0xc9, 0x4b, 0xd0, 0xcb, 0x1e, 0xf5, 0x32, 0x98, 0xf6, + 0x0f, 0x51, 0xba, 0xba, 0xfa, 0x47, 0xd2, 0x13, 0xf2, 0x43, 0x18, 0x10, 0xf6, 0x34, 0x53, 0xef, + 0x7d, 0xdf, 0xab, 0xf7, 0xbd, 0x57, 0xfd, 0xc1, 0xbd, 0xf9, 0x3d, 0x69, 0xf3, 0xc8, 0x99, 0xa7, + 0x63, 0x26, 0x42, 0x96, 0x30, 0xe9, 0xc4, 0xf3, 0xa9, 0x43, 0x63, 0x2e, 0x1d, 0x31, 0xa6, 0x9e, + 0x73, 0x32, 0xa2, 0x7e, 0x3c, 0xa3, 0x23, 0x67, 0xca, 0x42, 0x26, 0x68, 0xc2, 0x26, 0x76, 0x2c, + 0xa2, 0x24, 0xc2, 0xfb, 0x05, 0xd3, 0xae, 0x99, 0x76, 0x3c, 0x9f, 0xda, 0x39, 0xd3, 0xce, 0x99, + 0x76, 0xc9, 0xdc, 0x7d, 0x6b, 0xca, 0x93, 0x59, 0x3a, 0xb6, 0xbd, 0x28, 0x70, 0xa6, 0xd1, 0x34, + 0x72, 0x54, 0x81, 0x71, 0xfa, 0x54, 0x9d, 0xd4, 0x41, 0xfd, 0x2b, 0x0a, 0xef, 0xde, 0xd5, 0x2d, + 0xd1, 0x98, 0x07, 0xd4, 0x9b, 0xf1, 0x90, 0x89, 0x67, 0x75, 0x53, 0x01, 0x4b, 0xa8, 0x73, 0xd2, + 0x6a, 0x67, 0xd7, 0xb9, 0x8c, 0x25, 0xd2, 0x30, 0xe1, 0x01, 0x6b, 0x11, 0xde, 0xbd, 0x8a, 0x20, + 0xbd, 0x19, 0x0b, 0x68, 0x8b, 0x77, 0x70, 0xe9, 0xc4, 0x1c, 0xc1, 0x64, 0x94, 0x0a, 0xaf, 0x7d, + 0xd7, 0x9d, 0xcb, 0x39, 0x4b, 0xa4, 0x8c, 0x96, 0xa3, 0xd3, 0x84, 0xfb, 0x0e, 0x0f, 0x13, 0x99, + 0x88, 0x8b, 0x14, 0xeb, 0x37, 0x04, 0x9b, 0x1f, 0xfa, 0xa9, 0x4c, 0x98, 0x20, 0x91, 0xcf, 0xf0, + 0x97, 0xd0, 0xcf, 0x07, 0x35, 0xa1, 0x09, 0x35, 0xd0, 0x1e, 0xda, 0xdf, 0x3c, 0x78, 0xdb, 0xd6, + 0xfb, 0x6a, 0xea, 0xad, 0x37, 0x96, 0xa3, 0xed, 0x93, 0x91, 0xfd, 0xe9, 0xf8, 0x2b, 0xe6, 0x25, + 0x9f, 0xb0, 0x84, 0xba, 0xf8, 0x74, 0x31, 0xec, 0x64, 0x8b, 0x21, 0xd4, 0x31, 0x52, 0x55, 0xc5, + 0x9f, 0x43, 0x4f, 0xa4, 0x3e, 0x93, 0xc6, 0xda, 0xde, 0xfa, 0xfe, 0xe6, 0xc1, 0x5d, 0xfb, 0xba, + 0xcf, 0xc1, 0x3e, 0x8e, 0x7c, 0xee, 0x3d, 0x23, 0xa9, 0xcf, 0xdc, 0x2d, 0x7d, 0x45, 0x2f, 0x3f, + 0x49, 0x52, 0x54, 0xb4, 0x7e, 0x5e, 0x03, 0xdc, 0x10, 0xe3, 0xf2, 0x70, 0xc2, 0xc3, 0xe9, 0x0a, + 0x34, 0x7d, 0x01, 0x7d, 0x99, 0xaa, 0x44, 0x29, 0x6b, 0x74, 0x7d, 0x59, 0x0f, 0x0b, 0xa6, 0xfb, + 0x8a, 0xbe, 0xa2, 0xaf, 0x03, 0x92, 0x54, 0x45, 0xf1, 0x13, 0xd8, 0x10, 0x91, 0xcf, 0x08, 0x7b, + 0x6a, 0xac, 0x2b, 0x05, 0x37, 0xa8, 0x4f, 0x0a, 0xa2, 0xbb, 0xad, 0xeb, 0x6f, 0xe8, 0x00, 0x29, + 0x4b, 0x5a, 0x3f, 0x20, 0x78, 0xbd, 0x3d, 0x37, 0x37, 0xe5, 0xfe, 0x84, 0x09, 0xfc, 0x1d, 0x02, + 0xec, 0xb5, 0xb2, 0x7a, 0x92, 0xef, 0x5f, 0xbf, 0x8f, 0x25, 0x37, 0xec, 0xea, 0x96, 0x96, 0x6c, + 0x8d, 0x2c, 0xb9, 0xd3, 0xfa, 0x13, 0xc1, 0x6b, 0x6d, 0xe8, 0x03, 0x2e, 0x13, 0xfc, 0xa4, 0xb5, + 0x64, 0xfb, 0x7a, 0x4b, 0xce, 0xd9, 0x6a, 0xc5, 0xd5, 0xfc, 0xcb, 0x48, 0x63, 0xc1, 0x14, 0x7a, + 0x3c, 0x61, 0x41, 0xb9, 0xdd, 0xff, 0xa6, 0xba, 0x7a, 0xbc, 0x87, 0x79, 0x49, 0x52, 0x54, 0xb6, + 0x7e, 0x47, 0xb0, 0xdd, 0x00, 0xaf, 0x40, 0xd4, 0xe3, 0xf3, 0xa2, 0xde, 0xb9, 0x9d, 0xa8, 0xe5, + 0x6a, 0xfe, 0x41, 0x00, 0xf5, 0xf7, 0x8a, 0x87, 0xd0, 0x3b, 0x61, 0x62, 0x2c, 0x0d, 0xb4, 0xb7, + 0xbe, 0x3f, 0x70, 0x07, 0x39, 0xfe, 0x51, 0x1e, 0x20, 0x45, 0x1c, 0xbf, 0x09, 0x03, 0x1a, 0xf3, + 0x8f, 0x44, 0x94, 0xc6, 0xd2, 0x58, 0x57, 0xa0, 0xad, 0x6c, 0x31, 0x1c, 0xdc, 0x3f, 0x3e, 0x2c, + 0x82, 0xa4, 0xce, 0xe7, 0xe0, 0xd2, 0x31, 0xa5, 0xd1, 0xad, 0xc1, 0xa4, 0x0c, 0x92, 0x3a, 0x8f, + 0xdf, 0x83, 0xad, 0xf2, 0x70, 0x44, 0x03, 0x26, 0x8d, 0x9e, 0x22, 0xec, 0x64, 0x8b, 0xe1, 0x16, + 0x69, 0x26, 0xc8, 0x79, 0x1c, 0xfe, 0x00, 0xb6, 0xc3, 0x28, 0x2c, 0x21, 0x9f, 0x91, 0x07, 0xd2, + 0x78, 0x49, 0x51, 0x5f, 0xcd, 0x16, 0xc3, 0xed, 0xa3, 0xf3, 0x29, 0x72, 0x11, 0x6b, 0x7d, 0x03, + 0x3b, 0x0d, 0xc3, 0xd2, 0xdf, 0xd2, 0x0c, 0x20, 0xae, 0x82, 0x7a, 0xa5, 0xb7, 0x73, 0xc0, 0xca, + 0x90, 0xea, 0x18, 0x69, 0xd4, 0xb6, 0x7e, 0x45, 0xd0, 0xfd, 0xff, 0x3b, 0xfa, 0x8f, 0x6b, 0xb0, + 0xf9, 0xc2, 0xca, 0x6f, 0x60, 0xe5, 0xb9, 0x8b, 0xac, 0xd6, 0x1a, 0x6f, 0xef, 0x22, 0x57, 0x7b, + 0xe2, 0x2f, 0x08, 0xfa, 0x2b, 0x32, 0xc3, 0x87, 0xe7, 0x65, 0xd8, 0x37, 0x94, 0xb1, 0xbc, 0xff, + 0xaf, 0xa1, 0xdc, 0x10, 0xbe, 0x03, 0xfd, 0xd2, 0xc0, 0x54, 0xf7, 0x83, 0xba, 0x9b, 0xd2, 0xe3, + 0x48, 0x85, 0xc0, 0x7b, 0xd0, 0x9d, 0xf3, 0x70, 0x62, 0xac, 0x29, 0xe4, 0xcb, 0x1a, 0xd9, 0xfd, + 0x98, 0x87, 0x13, 0xa2, 0x32, 0x39, 0x22, 0xa4, 0x01, 0x53, 0x6f, 0xa8, 0x81, 0xc8, 0xad, 0x8b, + 0xa8, 0x8c, 0xf5, 0x13, 0x82, 0x0d, 0xfd, 0xfe, 0xaa, 0x7a, 0xe8, 0xd2, 0x7a, 0x07, 0x00, 0x34, + 0xe6, 0x8f, 0x98, 0x90, 0x3c, 0x0a, 0xf5, 0xbd, 0xd5, 0x97, 0x72, 0xff, 0xf8, 0x50, 0x67, 0x48, + 0x03, 0x75, 0x75, 0x0f, 0xd8, 0x81, 0x41, 0xfe, 0x2b, 0x63, 0xea, 0x31, 0xa3, 0xab, 0x60, 0x3b, + 0x1a, 0x36, 0x38, 0x2a, 0x13, 0xa4, 0xc6, 0xb8, 0x6f, 0x9c, 0x9e, 0x99, 0x9d, 0xe7, 0x67, 0x66, + 0xe7, 0x8f, 0x33, 0xb3, 0xf3, 0x6d, 0x66, 0xa2, 0xd3, 0xcc, 0x44, 0xcf, 0x33, 0x13, 0xfd, 0x95, + 0x99, 0xe8, 0xfb, 0xbf, 0xcd, 0xce, 0xe3, 0x7e, 0x39, 0xf8, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, + 0x57, 0x75, 0x75, 0xfb, 0x83, 0x0c, 0x00, 0x00, } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1alpha1/generated.proto b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1alpha1/generated.proto index 8e6d4013..6837061e 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1alpha1/generated.proto +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1alpha1/generated.proto @@ -35,7 +35,7 @@ option go_package = "v1alpha1"; message ClusterRole { // Standard object's metadata. // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Rules holds all the PolicyRules for this ClusterRole repeated PolicyRule rules = 2; @@ -46,7 +46,7 @@ message ClusterRole { message ClusterRoleBinding { // Standard object's metadata. // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Subjects holds references to the objects the role applies to. repeated Subject subjects = 2; @@ -90,11 +90,6 @@ message PolicyRule { // Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds. repeated string verbs = 1; - // AttributeRestrictions will vary depending on what the Authorizer/AuthorizationAttributeBuilder pair supports. - // If the Authorizer does not recognize how to handle the AttributeRestrictions, the Authorizer should report an error. - // +optional - optional k8s.io.apimachinery.pkg.runtime.RawExtension attributeRestrictions = 2; - // APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of // the enumerated resources in any API group will be allowed. // +optional @@ -128,7 +123,7 @@ message PolicyRuleBuilder { message Role { // Standard object's metadata. // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Rules holds all the PolicyRules for this Role repeated PolicyRule rules = 2; @@ -140,7 +135,7 @@ message Role { message RoleBinding { // Standard object's metadata. // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Subjects holds references to the objects the role applies to. repeated Subject subjects = 2; diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1alpha1/helpers.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1alpha1/helpers.go index a85fc015..f417f3be 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1alpha1/helpers.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1alpha1/helpers.go @@ -19,7 +19,7 @@ package v1alpha1 import ( "fmt" - "k8s.io/client-go/pkg/api/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // PolicyRuleBuilder let's us attach methods. A no-no for API types. @@ -98,7 +98,7 @@ type ClusterRoleBindingBuilder struct { func NewClusterBinding(clusterRoleName string) *ClusterRoleBindingBuilder { return &ClusterRoleBindingBuilder{ ClusterRoleBinding: ClusterRoleBinding{ - ObjectMeta: v1.ObjectMeta{Name: clusterRoleName}, + ObjectMeta: metav1.ObjectMeta{Name: clusterRoleName}, RoleRef: RoleRef{ APIGroup: GroupName, Kind: "ClusterRole", diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1alpha1/register.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1alpha1/register.go index 98c084dc..1395592f 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1alpha1/register.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1alpha1/register.go @@ -51,7 +51,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { &ClusterRoleBindingList{}, &ClusterRoleList{}, - &v1.ListOptions{}, &v1.DeleteOptions{}, &metav1.ExportOptions{}, &metav1.GetOptions{}, diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1alpha1/types.generated.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1alpha1/types.generated.go index 23a7f573..64ba53a9 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1alpha1/types.generated.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1alpha1/types.generated.go @@ -25,10 +25,8 @@ import ( "errors" "fmt" codec1978 "github.com/ugorji/go/codec" - pkg2_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - pkg1_runtime "k8s.io/apimachinery/pkg/runtime" - pkg4_types "k8s.io/apimachinery/pkg/types" - pkg3_v1 "k8s.io/client-go/pkg/api/v1" + pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + pkg2_types "k8s.io/apimachinery/pkg/types" "reflect" "runtime" time "time" @@ -64,12 +62,10 @@ func init() { panic(err) } if false { // reference the types, but skip this branch at build/run time - var v0 pkg2_v1.TypeMeta - var v1 pkg1_runtime.RawExtension - var v2 pkg4_types.UID - var v3 pkg3_v1.ObjectMeta - var v4 time.Time - _, _, _, _, _ = v0, v1, v2, v3, v4 + var v0 pkg1_v1.TypeMeta + var v1 pkg2_types.UID + var v2 time.Time + _, _, _ = v0, v1, v2 } } @@ -87,17 +83,16 @@ func (x *PolicyRule) CodecEncodeSelf(e *codec1978.Encoder) { } else { yysep2 := !z.EncBinary() yy2arr2 := z.EncBasicHandle().StructToArray - var yyq2 [6]bool + var yyq2 [5]bool _, _, _ = yysep2, yyq2, yy2arr2 const yyr2 bool = false - yyq2[1] = true - yyq2[2] = len(x.APIGroups) != 0 - yyq2[3] = len(x.Resources) != 0 - yyq2[4] = len(x.ResourceNames) != 0 - yyq2[5] = len(x.NonResourceURLs) != 0 + yyq2[1] = len(x.APIGroups) != 0 + yyq2[2] = len(x.Resources) != 0 + yyq2[3] = len(x.ResourceNames) != 0 + yyq2[4] = len(x.NonResourceURLs) != 0 var yynn2 int if yyr2 || yy2arr2 { - r.EncodeArrayStart(6) + r.EncodeArrayStart(5) } else { yynn2 = 1 for _, b := range yyq2 { @@ -138,62 +133,29 @@ func (x *PolicyRule) CodecEncodeSelf(e *codec1978.Encoder) { if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[1] { - yy7 := &x.AttributeRestrictions - yym8 := z.EncBinary() - _ = yym8 - if false { - } else if z.HasExtensions() && z.EncExt(yy7) { - } else if !yym8 && z.IsJSONHandle() { - z.EncJSONMarshal(yy7) + if x.APIGroups == nil { + r.EncodeNil() } else { - z.EncFallback(yy7) + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + z.F.EncSliceStringV(x.APIGroups, false, e) + } } } else { r.EncodeNil() } } else { if yyq2[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("attributeRestrictions")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy9 := &x.AttributeRestrictions - yym10 := z.EncBinary() - _ = yym10 - if false { - } else if z.HasExtensions() && z.EncExt(yy9) { - } else if !yym10 && z.IsJSONHandle() { - z.EncJSONMarshal(yy9) - } else { - z.EncFallback(yy9) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[2] { - if x.APIGroups == nil { - r.EncodeNil() - } else { - yym12 := z.EncBinary() - _ = yym12 - if false { - } else { - z.F.EncSliceStringV(x.APIGroups, false, e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("apiGroups")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.APIGroups == nil { r.EncodeNil() } else { - yym13 := z.EncBinary() - _ = yym13 + yym8 := z.EncBinary() + _ = yym8 if false { } else { z.F.EncSliceStringV(x.APIGroups, false, e) @@ -203,12 +165,12 @@ func (x *PolicyRule) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[3] { + if yyq2[2] { if x.Resources == nil { r.EncodeNil() } else { - yym15 := z.EncBinary() - _ = yym15 + yym10 := z.EncBinary() + _ = yym10 if false { } else { z.F.EncSliceStringV(x.Resources, false, e) @@ -218,15 +180,15 @@ func (x *PolicyRule) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq2[3] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("resources")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Resources == nil { r.EncodeNil() } else { - yym16 := z.EncBinary() - _ = yym16 + yym11 := z.EncBinary() + _ = yym11 if false { } else { z.F.EncSliceStringV(x.Resources, false, e) @@ -236,12 +198,12 @@ func (x *PolicyRule) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[4] { + if yyq2[3] { if x.ResourceNames == nil { r.EncodeNil() } else { - yym18 := z.EncBinary() - _ = yym18 + yym13 := z.EncBinary() + _ = yym13 if false { } else { z.F.EncSliceStringV(x.ResourceNames, false, e) @@ -251,15 +213,15 @@ func (x *PolicyRule) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq2[4] { + if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("resourceNames")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.ResourceNames == nil { r.EncodeNil() } else { - yym19 := z.EncBinary() - _ = yym19 + yym14 := z.EncBinary() + _ = yym14 if false { } else { z.F.EncSliceStringV(x.ResourceNames, false, e) @@ -269,12 +231,12 @@ func (x *PolicyRule) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[5] { + if yyq2[4] { if x.NonResourceURLs == nil { r.EncodeNil() } else { - yym21 := z.EncBinary() - _ = yym21 + yym16 := z.EncBinary() + _ = yym16 if false { } else { z.F.EncSliceStringV(x.NonResourceURLs, false, e) @@ -284,15 +246,15 @@ func (x *PolicyRule) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeNil() } } else { - if yyq2[5] { + if yyq2[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("nonResourceURLs")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.NonResourceURLs == nil { r.EncodeNil() } else { - yym22 := z.EncBinary() - _ = yym22 + yym17 := z.EncBinary() + _ = yym17 if false { } else { z.F.EncSliceStringV(x.NonResourceURLs, false, e) @@ -373,26 +335,23 @@ func (x *PolicyRule) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { z.F.DecSliceStringX(yyv4, false, d) } } - case "attributeRestrictions": - if r.TryDecodeAsNil() { - x.AttributeRestrictions = pkg1_runtime.RawExtension{} - } else { - yyv6 := &x.AttributeRestrictions - yym7 := z.DecBinary() - _ = yym7 - if false { - } else if z.HasExtensions() && z.DecExt(yyv6) { - } else if !yym7 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv6) - } else { - z.DecFallback(yyv6, false) - } - } case "apiGroups": if r.TryDecodeAsNil() { x.APIGroups = nil } else { - yyv8 := &x.APIGroups + yyv6 := &x.APIGroups + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + z.F.DecSliceStringX(yyv6, false, d) + } + } + case "resources": + if r.TryDecodeAsNil() { + x.Resources = nil + } else { + yyv8 := &x.Resources yym9 := z.DecBinary() _ = yym9 if false { @@ -400,11 +359,11 @@ func (x *PolicyRule) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { z.F.DecSliceStringX(yyv8, false, d) } } - case "resources": + case "resourceNames": if r.TryDecodeAsNil() { - x.Resources = nil + x.ResourceNames = nil } else { - yyv10 := &x.Resources + yyv10 := &x.ResourceNames yym11 := z.DecBinary() _ = yym11 if false { @@ -412,11 +371,11 @@ func (x *PolicyRule) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { z.F.DecSliceStringX(yyv10, false, d) } } - case "resourceNames": + case "nonResourceURLs": if r.TryDecodeAsNil() { - x.ResourceNames = nil + x.NonResourceURLs = nil } else { - yyv12 := &x.ResourceNames + yyv12 := &x.NonResourceURLs yym13 := z.DecBinary() _ = yym13 if false { @@ -424,18 +383,6 @@ func (x *PolicyRule) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { z.F.DecSliceStringX(yyv12, false, d) } } - case "nonResourceURLs": - if r.TryDecodeAsNil() { - x.NonResourceURLs = nil - } else { - yyv14 := &x.NonResourceURLs - yym15 := z.DecBinary() - _ = yym15 - if false { - } else { - z.F.DecSliceStringX(yyv14, false, d) - } - } default: z.DecStructFieldNotFound(-1, yys3) } // end switch yys3 @@ -447,16 +394,16 @@ func (x *PolicyRule) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj16 int - var yyb16 bool - var yyhl16 bool = l >= 0 - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l + var yyj14 int + var yyb14 bool + var yyhl14 bool = l >= 0 + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb16 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb16 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -464,46 +411,21 @@ func (x *PolicyRule) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Verbs = nil } else { - yyv17 := &x.Verbs - yym18 := z.DecBinary() - _ = yym18 + yyv15 := &x.Verbs + yym16 := z.DecBinary() + _ = yym16 if false { } else { - z.F.DecSliceStringX(yyv17, false, d) + z.F.DecSliceStringX(yyv15, false, d) } } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb16 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb16 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.AttributeRestrictions = pkg1_runtime.RawExtension{} - } else { - yyv19 := &x.AttributeRestrictions - yym20 := z.DecBinary() - _ = yym20 - if false { - } else if z.HasExtensions() && z.DecExt(yyv19) { - } else if !yym20 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv19) - } else { - z.DecFallback(yyv19, false) - } - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -511,21 +433,21 @@ func (x *PolicyRule) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIGroups = nil } else { - yyv21 := &x.APIGroups - yym22 := z.DecBinary() - _ = yym22 + yyv17 := &x.APIGroups + yym18 := z.DecBinary() + _ = yym18 if false { } else { - z.F.DecSliceStringX(yyv21, false, d) + z.F.DecSliceStringX(yyv17, false, d) } } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb16 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb16 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -533,21 +455,21 @@ func (x *PolicyRule) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Resources = nil } else { - yyv23 := &x.Resources - yym24 := z.DecBinary() - _ = yym24 + yyv19 := &x.Resources + yym20 := z.DecBinary() + _ = yym20 if false { } else { - z.F.DecSliceStringX(yyv23, false, d) + z.F.DecSliceStringX(yyv19, false, d) } } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb16 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb16 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -555,21 +477,21 @@ func (x *PolicyRule) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ResourceNames = nil } else { - yyv25 := &x.ResourceNames - yym26 := z.DecBinary() - _ = yym26 + yyv21 := &x.ResourceNames + yym22 := z.DecBinary() + _ = yym22 if false { } else { - z.F.DecSliceStringX(yyv25, false, d) + z.F.DecSliceStringX(yyv21, false, d) } } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb16 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb16 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -577,26 +499,26 @@ func (x *PolicyRule) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.NonResourceURLs = nil } else { - yyv27 := &x.NonResourceURLs - yym28 := z.DecBinary() - _ = yym28 + yyv23 := &x.NonResourceURLs + yym24 := z.DecBinary() + _ = yym24 if false { } else { - z.F.DecSliceStringX(yyv27, false, d) + z.F.DecSliceStringX(yyv23, false, d) } } for { - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb16 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb16 { + if yyb14 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj16-1, "") + z.DecStructFieldNotFound(yyj14-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -1315,7 +1237,13 @@ func (x *Role) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -1325,7 +1253,13 @@ func (x *Role) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -1442,21 +1376,27 @@ func (x *Role) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg3_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "rules": if r.TryDecodeAsNil() { x.Rules = nil } else { - yyv9 := &x.Rules - yym10 := z.DecBinary() - _ = yym10 + yyv10 := &x.Rules + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decSlicePolicyRule((*[]PolicyRule)(yyv9), d) + h.decSlicePolicyRule((*[]PolicyRule)(yyv10), d) } } default: @@ -1470,16 +1410,16 @@ func (x *Role) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1487,21 +1427,21 @@ func (x *Role) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1509,38 +1449,44 @@ func (x *Role) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg3_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1548,26 +1494,26 @@ func (x *Role) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Rules = nil } else { - yyv17 := &x.Rules - yym18 := z.DecBinary() - _ = yym18 + yyv19 := &x.Rules + yym20 := z.DecBinary() + _ = yym20 if false { } else { - h.decSlicePolicyRule((*[]PolicyRule)(yyv17), d) + h.decSlicePolicyRule((*[]PolicyRule)(yyv19), d) } } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -1659,7 +1605,13 @@ func (x *RoleBinding) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -1669,7 +1621,13 @@ func (x *RoleBinding) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -1797,29 +1755,35 @@ func (x *RoleBinding) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg3_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "subjects": if r.TryDecodeAsNil() { x.Subjects = nil } else { - yyv9 := &x.Subjects - yym10 := z.DecBinary() - _ = yym10 + yyv10 := &x.Subjects + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decSliceSubject((*[]Subject)(yyv9), d) + h.decSliceSubject((*[]Subject)(yyv10), d) } } case "roleRef": if r.TryDecodeAsNil() { x.RoleRef = RoleRef{} } else { - yyv11 := &x.RoleRef - yyv11.CodecDecodeSelf(d) + yyv12 := &x.RoleRef + yyv12.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -1832,16 +1796,16 @@ func (x *RoleBinding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj12 int - var yyb12 bool - var yyhl12 bool = l >= 0 - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l + var yyj13 int + var yyb13 bool + var yyhl13 bool = l >= 0 + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb12 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb12 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1849,21 +1813,21 @@ func (x *RoleBinding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv13 := &x.Kind - yym14 := z.DecBinary() - _ = yym14 + yyv14 := &x.Kind + yym15 := z.DecBinary() + _ = yym15 if false { } else { - *((*string)(yyv13)) = r.DecodeString() + *((*string)(yyv14)) = r.DecodeString() } } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb12 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb12 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1871,38 +1835,44 @@ func (x *RoleBinding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv15 := &x.APIVersion - yym16 := z.DecBinary() - _ = yym16 + yyv16 := &x.APIVersion + yym17 := z.DecBinary() + _ = yym17 if false { } else { - *((*string)(yyv15)) = r.DecodeString() + *((*string)(yyv16)) = r.DecodeString() } } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb12 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb12 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg3_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv17 := &x.ObjectMeta - yyv17.CodecDecodeSelf(d) + yyv18 := &x.ObjectMeta + yym19 := z.DecBinary() + _ = yym19 + if false { + } else if z.HasExtensions() && z.DecExt(yyv18) { + } else { + z.DecFallback(yyv18, false) + } } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb12 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb12 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1910,21 +1880,21 @@ func (x *RoleBinding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Subjects = nil } else { - yyv18 := &x.Subjects - yym19 := z.DecBinary() - _ = yym19 + yyv20 := &x.Subjects + yym21 := z.DecBinary() + _ = yym21 if false { } else { - h.decSliceSubject((*[]Subject)(yyv18), d) + h.decSliceSubject((*[]Subject)(yyv20), d) } } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb12 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb12 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1932,21 +1902,21 @@ func (x *RoleBinding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.RoleRef = RoleRef{} } else { - yyv20 := &x.RoleRef - yyv20.CodecDecodeSelf(d) + yyv22 := &x.RoleRef + yyv22.CodecDecodeSelf(d) } for { - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb12 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb12 { + if yyb13 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj12-1, "") + z.DecStructFieldNotFound(yyj13-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -2177,7 +2147,7 @@ func (x *RoleBindingList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ListMeta = pkg2_v1.ListMeta{} + x.ListMeta = pkg1_v1.ListMeta{} } else { yyv8 := &x.ListMeta yym9 := z.DecBinary() @@ -2270,7 +2240,7 @@ func (x *RoleBindingList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ListMeta = pkg2_v1.ListMeta{} + x.ListMeta = pkg1_v1.ListMeta{} } else { yyv17 := &x.ListMeta yym18 := z.DecBinary() @@ -2545,7 +2515,7 @@ func (x *RoleList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ListMeta = pkg2_v1.ListMeta{} + x.ListMeta = pkg1_v1.ListMeta{} } else { yyv8 := &x.ListMeta yym9 := z.DecBinary() @@ -2638,7 +2608,7 @@ func (x *RoleList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ListMeta = pkg2_v1.ListMeta{} + x.ListMeta = pkg1_v1.ListMeta{} } else { yyv17 := &x.ListMeta yym18 := z.DecBinary() @@ -2774,7 +2744,13 @@ func (x *ClusterRole) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -2784,7 +2760,13 @@ func (x *ClusterRole) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -2901,21 +2883,27 @@ func (x *ClusterRole) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg3_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "rules": if r.TryDecodeAsNil() { x.Rules = nil } else { - yyv9 := &x.Rules - yym10 := z.DecBinary() - _ = yym10 + yyv10 := &x.Rules + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decSlicePolicyRule((*[]PolicyRule)(yyv9), d) + h.decSlicePolicyRule((*[]PolicyRule)(yyv10), d) } } default: @@ -2929,16 +2917,16 @@ func (x *ClusterRole) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2946,21 +2934,21 @@ func (x *ClusterRole) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -2968,38 +2956,44 @@ func (x *ClusterRole) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg3_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3007,26 +3001,26 @@ func (x *ClusterRole) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Rules = nil } else { - yyv17 := &x.Rules - yym18 := z.DecBinary() - _ = yym18 + yyv19 := &x.Rules + yym20 := z.DecBinary() + _ = yym20 if false { } else { - h.decSlicePolicyRule((*[]PolicyRule)(yyv17), d) + h.decSlicePolicyRule((*[]PolicyRule)(yyv19), d) } } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -3118,7 +3112,13 @@ func (x *ClusterRoleBinding) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -3128,7 +3128,13 @@ func (x *ClusterRoleBinding) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -3256,29 +3262,35 @@ func (x *ClusterRoleBinding) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg3_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "subjects": if r.TryDecodeAsNil() { x.Subjects = nil } else { - yyv9 := &x.Subjects - yym10 := z.DecBinary() - _ = yym10 + yyv10 := &x.Subjects + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decSliceSubject((*[]Subject)(yyv9), d) + h.decSliceSubject((*[]Subject)(yyv10), d) } } case "roleRef": if r.TryDecodeAsNil() { x.RoleRef = RoleRef{} } else { - yyv11 := &x.RoleRef - yyv11.CodecDecodeSelf(d) + yyv12 := &x.RoleRef + yyv12.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -3291,16 +3303,16 @@ func (x *ClusterRoleBinding) codecDecodeSelfFromArray(l int, d *codec1978.Decode var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj12 int - var yyb12 bool - var yyhl12 bool = l >= 0 - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l + var yyj13 int + var yyb13 bool + var yyhl13 bool = l >= 0 + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb12 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb12 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3308,21 +3320,21 @@ func (x *ClusterRoleBinding) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv13 := &x.Kind - yym14 := z.DecBinary() - _ = yym14 + yyv14 := &x.Kind + yym15 := z.DecBinary() + _ = yym15 if false { } else { - *((*string)(yyv13)) = r.DecodeString() + *((*string)(yyv14)) = r.DecodeString() } } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb12 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb12 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3330,38 +3342,44 @@ func (x *ClusterRoleBinding) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv15 := &x.APIVersion - yym16 := z.DecBinary() - _ = yym16 + yyv16 := &x.APIVersion + yym17 := z.DecBinary() + _ = yym17 if false { } else { - *((*string)(yyv15)) = r.DecodeString() + *((*string)(yyv16)) = r.DecodeString() } } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb12 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb12 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg3_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv17 := &x.ObjectMeta - yyv17.CodecDecodeSelf(d) + yyv18 := &x.ObjectMeta + yym19 := z.DecBinary() + _ = yym19 + if false { + } else if z.HasExtensions() && z.DecExt(yyv18) { + } else { + z.DecFallback(yyv18, false) + } } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb12 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb12 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3369,21 +3387,21 @@ func (x *ClusterRoleBinding) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.Subjects = nil } else { - yyv18 := &x.Subjects - yym19 := z.DecBinary() - _ = yym19 + yyv20 := &x.Subjects + yym21 := z.DecBinary() + _ = yym21 if false { } else { - h.decSliceSubject((*[]Subject)(yyv18), d) + h.decSliceSubject((*[]Subject)(yyv20), d) } } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb12 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb12 { + if yyb13 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -3391,21 +3409,21 @@ func (x *ClusterRoleBinding) codecDecodeSelfFromArray(l int, d *codec1978.Decode if r.TryDecodeAsNil() { x.RoleRef = RoleRef{} } else { - yyv20 := &x.RoleRef - yyv20.CodecDecodeSelf(d) + yyv22 := &x.RoleRef + yyv22.CodecDecodeSelf(d) } for { - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l } else { - yyb12 = r.CheckBreak() + yyb13 = r.CheckBreak() } - if yyb12 { + if yyb13 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj12-1, "") + z.DecStructFieldNotFound(yyj13-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -3636,7 +3654,7 @@ func (x *ClusterRoleBindingList) codecDecodeSelfFromMap(l int, d *codec1978.Deco } case "metadata": if r.TryDecodeAsNil() { - x.ListMeta = pkg2_v1.ListMeta{} + x.ListMeta = pkg1_v1.ListMeta{} } else { yyv8 := &x.ListMeta yym9 := z.DecBinary() @@ -3729,7 +3747,7 @@ func (x *ClusterRoleBindingList) codecDecodeSelfFromArray(l int, d *codec1978.De } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ListMeta = pkg2_v1.ListMeta{} + x.ListMeta = pkg1_v1.ListMeta{} } else { yyv17 := &x.ListMeta yym18 := z.DecBinary() @@ -4004,7 +4022,7 @@ func (x *ClusterRoleList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ListMeta = pkg2_v1.ListMeta{} + x.ListMeta = pkg1_v1.ListMeta{} } else { yyv8 := &x.ListMeta yym9 := z.DecBinary() @@ -4097,7 +4115,7 @@ func (x *ClusterRoleList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ListMeta = pkg2_v1.ListMeta{} + x.ListMeta = pkg1_v1.ListMeta{} } else { yyv17 := &x.ListMeta yym18 := z.DecBinary() @@ -4185,7 +4203,7 @@ func (x codecSelfer1234) decSlicePolicyRule(v *[]PolicyRule, d *codec1978.Decode yyrg1 := len(yyv1) > 0 yyv21 := yyv1 - yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 160) + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 120) if yyrt1 { if yyrl1 <= cap(yyv1) { yyv1 = yyv1[:yyrl1] diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1alpha1/types.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1alpha1/types.go index 9b00a073..6649d601 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1alpha1/types.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1alpha1/types.go @@ -18,8 +18,6 @@ package v1alpha1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/client-go/pkg/api/v1" ) // Authorization is calculated against @@ -48,10 +46,6 @@ const ( type PolicyRule struct { // Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds. Verbs []string `json:"verbs" protobuf:"bytes,1,rep,name=verbs"` - // AttributeRestrictions will vary depending on what the Authorizer/AuthorizationAttributeBuilder pair supports. - // If the Authorizer does not recognize how to handle the AttributeRestrictions, the Authorizer should report an error. - // +optional - AttributeRestrictions runtime.RawExtension `json:"attributeRestrictions,omitempty" protobuf:"bytes,2,opt,name=attributeRestrictions"` // APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of // the enumerated resources in any API group will be allowed. @@ -106,7 +100,7 @@ type Role struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Rules holds all the PolicyRules for this Role Rules []PolicyRule `json:"rules" protobuf:"bytes,2,rep,name=rules"` @@ -121,7 +115,7 @@ type RoleBinding struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Subjects holds references to the objects the role applies to. Subjects []Subject `json:"subjects" protobuf:"bytes,2,rep,name=subjects"` @@ -161,7 +155,7 @@ type ClusterRole struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Rules holds all the PolicyRules for this ClusterRole Rules []PolicyRule `json:"rules" protobuf:"bytes,2,rep,name=rules"` @@ -176,7 +170,7 @@ type ClusterRoleBinding struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Subjects holds references to the objects the role applies to. Subjects []Subject `json:"subjects" protobuf:"bytes,2,rep,name=subjects"` diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1alpha1/types_swagger_doc_generated.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1alpha1/types_swagger_doc_generated.go index 633bae97..79cc0294 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1alpha1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1alpha1/types_swagger_doc_generated.go @@ -69,13 +69,12 @@ func (ClusterRoleList) SwaggerDoc() map[string]string { } var map_PolicyRule = map[string]string{ - "": "PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.", - "verbs": "Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.", - "attributeRestrictions": "AttributeRestrictions will vary depending on what the Authorizer/AuthorizationAttributeBuilder pair supports. If the Authorizer does not recognize how to handle the AttributeRestrictions, the Authorizer should report an error.", - "apiGroups": "APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed.", - "resources": "Resources is a list of resources this rule applies to. ResourceAll represents all resources.", - "resourceNames": "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.", - "nonResourceURLs": "NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path This name is intentionally different than the internal type so that the DefaultConvert works nicely and because the ordering may be different. Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as \"pods\" or \"secrets\") or non-resource URL paths (such as \"/api\"), but not both.", + "": "PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.", + "verbs": "Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.", + "apiGroups": "APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed.", + "resources": "Resources is a list of resources this rule applies to. ResourceAll represents all resources.", + "resourceNames": "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.", + "nonResourceURLs": "NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path This name is intentionally different than the internal type so that the DefaultConvert works nicely and because the ordering may be different. Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as \"pods\" or \"secrets\") or non-resource URL paths (such as \"/api\"), but not both.", } func (PolicyRule) SwaggerDoc() map[string]string { diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1alpha1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1alpha1/zz_generated.conversion.go index 00db2647..a8f1ff65 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1alpha1/zz_generated.conversion.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1alpha1/zz_generated.conversion.go @@ -65,21 +65,8 @@ func RegisterConversions(scheme *runtime.Scheme) error { } func autoConvert_v1alpha1_ClusterRole_To_rbac_ClusterRole(in *ClusterRole, out *rbac.ClusterRole, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } - if in.Rules != nil { - in, out := &in.Rules, &out.Rules - *out = make([]rbac.PolicyRule, len(*in)) - for i := range *in { - if err := Convert_v1alpha1_PolicyRule_To_rbac_PolicyRule(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Rules = nil - } + out.ObjectMeta = in.ObjectMeta + out.Rules = *(*[]rbac.PolicyRule)(unsafe.Pointer(&in.Rules)) return nil } @@ -88,21 +75,8 @@ func Convert_v1alpha1_ClusterRole_To_rbac_ClusterRole(in *ClusterRole, out *rbac } func autoConvert_rbac_ClusterRole_To_v1alpha1_ClusterRole(in *rbac.ClusterRole, out *ClusterRole, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } - if in.Rules != nil { - in, out := &in.Rules, &out.Rules - *out = make([]PolicyRule, len(*in)) - for i := range *in { - if err := Convert_rbac_PolicyRule_To_v1alpha1_PolicyRule(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Rules = nil - } + out.ObjectMeta = in.ObjectMeta + out.Rules = *(*[]PolicyRule)(unsafe.Pointer(&in.Rules)) return nil } @@ -111,10 +85,7 @@ func Convert_rbac_ClusterRole_To_v1alpha1_ClusterRole(in *rbac.ClusterRole, out } func autoConvert_v1alpha1_ClusterRoleBinding_To_rbac_ClusterRoleBinding(in *ClusterRoleBinding, out *rbac.ClusterRoleBinding, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if in.Subjects != nil { in, out := &in.Subjects, &out.Subjects *out = make([]rbac.Subject, len(*in)) @@ -137,10 +108,7 @@ func Convert_v1alpha1_ClusterRoleBinding_To_rbac_ClusterRoleBinding(in *ClusterR } func autoConvert_rbac_ClusterRoleBinding_To_v1alpha1_ClusterRoleBinding(in *rbac.ClusterRoleBinding, out *ClusterRoleBinding, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if in.Subjects != nil { in, out := &in.Subjects, &out.Subjects *out = make([]Subject, len(*in)) @@ -226,17 +194,7 @@ func Convert_rbac_ClusterRoleBindingList_To_v1alpha1_ClusterRoleBindingList(in * func autoConvert_v1alpha1_ClusterRoleList_To_rbac_ClusterRoleList(in *ClusterRoleList, out *rbac.ClusterRoleList, s conversion.Scope) error { out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]rbac.ClusterRole, len(*in)) - for i := range *in { - if err := Convert_v1alpha1_ClusterRole_To_rbac_ClusterRole(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } + out.Items = *(*[]rbac.ClusterRole)(unsafe.Pointer(&in.Items)) return nil } @@ -246,17 +204,7 @@ func Convert_v1alpha1_ClusterRoleList_To_rbac_ClusterRoleList(in *ClusterRoleLis func autoConvert_rbac_ClusterRoleList_To_v1alpha1_ClusterRoleList(in *rbac.ClusterRoleList, out *ClusterRoleList, s conversion.Scope) error { out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ClusterRole, len(*in)) - for i := range *in { - if err := Convert_rbac_ClusterRole_To_v1alpha1_ClusterRole(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } + out.Items = *(*[]ClusterRole)(unsafe.Pointer(&in.Items)) return nil } @@ -266,9 +214,6 @@ func Convert_rbac_ClusterRoleList_To_v1alpha1_ClusterRoleList(in *rbac.ClusterRo func autoConvert_v1alpha1_PolicyRule_To_rbac_PolicyRule(in *PolicyRule, out *rbac.PolicyRule, s conversion.Scope) error { out.Verbs = *(*[]string)(unsafe.Pointer(&in.Verbs)) - if err := runtime.Convert_runtime_RawExtension_To_runtime_Object(&in.AttributeRestrictions, &out.AttributeRestrictions, s); err != nil { - return err - } out.APIGroups = *(*[]string)(unsafe.Pointer(&in.APIGroups)) out.Resources = *(*[]string)(unsafe.Pointer(&in.Resources)) out.ResourceNames = *(*[]string)(unsafe.Pointer(&in.ResourceNames)) @@ -282,9 +227,6 @@ func Convert_v1alpha1_PolicyRule_To_rbac_PolicyRule(in *PolicyRule, out *rbac.Po func autoConvert_rbac_PolicyRule_To_v1alpha1_PolicyRule(in *rbac.PolicyRule, out *PolicyRule, s conversion.Scope) error { out.Verbs = *(*[]string)(unsafe.Pointer(&in.Verbs)) - if err := runtime.Convert_runtime_Object_To_runtime_RawExtension(&in.AttributeRestrictions, &out.AttributeRestrictions, s); err != nil { - return err - } out.APIGroups = *(*[]string)(unsafe.Pointer(&in.APIGroups)) out.Resources = *(*[]string)(unsafe.Pointer(&in.Resources)) out.ResourceNames = *(*[]string)(unsafe.Pointer(&in.ResourceNames)) @@ -319,21 +261,8 @@ func Convert_rbac_PolicyRuleBuilder_To_v1alpha1_PolicyRuleBuilder(in *rbac.Polic } func autoConvert_v1alpha1_Role_To_rbac_Role(in *Role, out *rbac.Role, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } - if in.Rules != nil { - in, out := &in.Rules, &out.Rules - *out = make([]rbac.PolicyRule, len(*in)) - for i := range *in { - if err := Convert_v1alpha1_PolicyRule_To_rbac_PolicyRule(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Rules = nil - } + out.ObjectMeta = in.ObjectMeta + out.Rules = *(*[]rbac.PolicyRule)(unsafe.Pointer(&in.Rules)) return nil } @@ -342,21 +271,8 @@ func Convert_v1alpha1_Role_To_rbac_Role(in *Role, out *rbac.Role, s conversion.S } func autoConvert_rbac_Role_To_v1alpha1_Role(in *rbac.Role, out *Role, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } - if in.Rules != nil { - in, out := &in.Rules, &out.Rules - *out = make([]PolicyRule, len(*in)) - for i := range *in { - if err := Convert_rbac_PolicyRule_To_v1alpha1_PolicyRule(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Rules = nil - } + out.ObjectMeta = in.ObjectMeta + out.Rules = *(*[]PolicyRule)(unsafe.Pointer(&in.Rules)) return nil } @@ -365,10 +281,7 @@ func Convert_rbac_Role_To_v1alpha1_Role(in *rbac.Role, out *Role, s conversion.S } func autoConvert_v1alpha1_RoleBinding_To_rbac_RoleBinding(in *RoleBinding, out *rbac.RoleBinding, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if in.Subjects != nil { in, out := &in.Subjects, &out.Subjects *out = make([]rbac.Subject, len(*in)) @@ -391,10 +304,7 @@ func Convert_v1alpha1_RoleBinding_To_rbac_RoleBinding(in *RoleBinding, out *rbac } func autoConvert_rbac_RoleBinding_To_v1alpha1_RoleBinding(in *rbac.RoleBinding, out *RoleBinding, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if in.Subjects != nil { in, out := &in.Subjects, &out.Subjects *out = make([]Subject, len(*in)) @@ -458,17 +368,7 @@ func Convert_rbac_RoleBindingList_To_v1alpha1_RoleBindingList(in *rbac.RoleBindi func autoConvert_v1alpha1_RoleList_To_rbac_RoleList(in *RoleList, out *rbac.RoleList, s conversion.Scope) error { out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]rbac.Role, len(*in)) - for i := range *in { - if err := Convert_v1alpha1_Role_To_rbac_Role(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } + out.Items = *(*[]rbac.Role)(unsafe.Pointer(&in.Items)) return nil } @@ -478,17 +378,7 @@ func Convert_v1alpha1_RoleList_To_rbac_RoleList(in *RoleList, out *rbac.RoleList func autoConvert_rbac_RoleList_To_v1alpha1_RoleList(in *rbac.RoleList, out *RoleList, s conversion.Scope) error { out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Role, len(*in)) - for i := range *in { - if err := Convert_rbac_Role_To_v1alpha1_Role(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } + out.Items = *(*[]Role)(unsafe.Pointer(&in.Items)) return nil } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1alpha1/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1alpha1/zz_generated.deepcopy.go index b34e2ae7..f4dfd3ca 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1alpha1/zz_generated.deepcopy.go @@ -21,9 +21,9 @@ limitations under the License. package v1alpha1 import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - v1 "k8s.io/client-go/pkg/api/v1" reflect "reflect" ) @@ -54,8 +54,10 @@ func DeepCopy_v1alpha1_ClusterRole(in interface{}, out interface{}, c *conversio in := in.(*ClusterRole) out := out.(*ClusterRole) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.Rules != nil { in, out := &in.Rules, &out.Rules @@ -75,15 +77,15 @@ func DeepCopy_v1alpha1_ClusterRoleBinding(in interface{}, out interface{}, c *co in := in.(*ClusterRoleBinding) out := out.(*ClusterRoleBinding) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.Subjects != nil { in, out := &in.Subjects, &out.Subjects *out = make([]Subject, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } @@ -135,11 +137,6 @@ func DeepCopy_v1alpha1_PolicyRule(in interface{}, out interface{}, c *conversion *out = make([]string, len(*in)) copy(*out, *in) } - if newVal, err := c.DeepCopy(&in.AttributeRestrictions); err != nil { - return err - } else { - out.AttributeRestrictions = *newVal.(*runtime.RawExtension) - } if in.APIGroups != nil { in, out := &in.APIGroups, &out.APIGroups *out = make([]string, len(*in)) @@ -169,8 +166,10 @@ func DeepCopy_v1alpha1_Role(in interface{}, out interface{}, c *conversion.Clone in := in.(*Role) out := out.(*Role) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.Rules != nil { in, out := &in.Rules, &out.Rules @@ -190,15 +189,15 @@ func DeepCopy_v1alpha1_RoleBinding(in interface{}, out interface{}, c *conversio in := in.(*RoleBinding) out := out.(*RoleBinding) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.Subjects != nil { in, out := &in.Subjects, &out.Subjects *out = make([]Subject, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1beta1/defaults.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1beta1/defaults.go new file mode 100644 index 00000000..76638eef --- /dev/null +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1beta1/defaults.go @@ -0,0 +1,40 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + "k8s.io/apimachinery/pkg/runtime" +) + +func addDefaultingFuncs(scheme *runtime.Scheme) error { + RegisterDefaults(scheme) + return scheme.AddDefaultingFuncs( + SetDefaults_ClusterRoleBinding, + SetDefaults_RoleBinding, + ) +} + +func SetDefaults_ClusterRoleBinding(obj *ClusterRoleBinding) { + if len(obj.RoleRef.APIGroup) == 0 { + obj.RoleRef.APIGroup = GroupName + } +} +func SetDefaults_RoleBinding(obj *RoleBinding) { + if len(obj.RoleRef.APIGroup) == 0 { + obj.RoleRef.APIGroup = GroupName + } +} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1alpha1/generated_expansion.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1beta1/doc.go similarity index 83% rename from vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1alpha1/generated_expansion.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1beta1/doc.go index a2e74c84..a9ad4296 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/kubernetes/typed/policy/v1alpha1/generated_expansion.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1beta1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,5 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 - -type PodDisruptionBudgetExpansion interface{} +// +groupName=rbac.authorization.k8s.io +package v1beta1 diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1beta1/generated.pb.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1beta1/generated.pb.go new file mode 100644 index 00000000..1a18353b --- /dev/null +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1beta1/generated.pb.go @@ -0,0 +1,2817 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by protoc-gen-gogo. +// source: k8s.io/kubernetes/pkg/apis/rbac/v1beta1/generated.proto +// DO NOT EDIT! + +/* + Package v1beta1 is a generated protocol buffer package. + + It is generated from these files: + k8s.io/kubernetes/pkg/apis/rbac/v1beta1/generated.proto + + It has these top-level messages: + ClusterRole + ClusterRoleBinding + ClusterRoleBindingBuilder + ClusterRoleBindingList + ClusterRoleList + PolicyRule + PolicyRuleBuilder + Role + RoleBinding + RoleBindingList + RoleList + RoleRef + Subject +*/ +package v1beta1 + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +import strings "strings" +import reflect "reflect" + +import io "io" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +const _ = proto.GoGoProtoPackageIsVersion1 + +func (m *ClusterRole) Reset() { *m = ClusterRole{} } +func (*ClusterRole) ProtoMessage() {} +func (*ClusterRole) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} } + +func (m *ClusterRoleBinding) Reset() { *m = ClusterRoleBinding{} } +func (*ClusterRoleBinding) ProtoMessage() {} +func (*ClusterRoleBinding) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} } + +func (m *ClusterRoleBindingBuilder) Reset() { *m = ClusterRoleBindingBuilder{} } +func (*ClusterRoleBindingBuilder) ProtoMessage() {} +func (*ClusterRoleBindingBuilder) Descriptor() ([]byte, []int) { + return fileDescriptorGenerated, []int{2} +} + +func (m *ClusterRoleBindingList) Reset() { *m = ClusterRoleBindingList{} } +func (*ClusterRoleBindingList) ProtoMessage() {} +func (*ClusterRoleBindingList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} } + +func (m *ClusterRoleList) Reset() { *m = ClusterRoleList{} } +func (*ClusterRoleList) ProtoMessage() {} +func (*ClusterRoleList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} } + +func (m *PolicyRule) Reset() { *m = PolicyRule{} } +func (*PolicyRule) ProtoMessage() {} +func (*PolicyRule) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} } + +func (m *PolicyRuleBuilder) Reset() { *m = PolicyRuleBuilder{} } +func (*PolicyRuleBuilder) ProtoMessage() {} +func (*PolicyRuleBuilder) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} } + +func (m *Role) Reset() { *m = Role{} } +func (*Role) ProtoMessage() {} +func (*Role) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} } + +func (m *RoleBinding) Reset() { *m = RoleBinding{} } +func (*RoleBinding) ProtoMessage() {} +func (*RoleBinding) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} } + +func (m *RoleBindingList) Reset() { *m = RoleBindingList{} } +func (*RoleBindingList) ProtoMessage() {} +func (*RoleBindingList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} } + +func (m *RoleList) Reset() { *m = RoleList{} } +func (*RoleList) ProtoMessage() {} +func (*RoleList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{10} } + +func (m *RoleRef) Reset() { *m = RoleRef{} } +func (*RoleRef) ProtoMessage() {} +func (*RoleRef) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{11} } + +func (m *Subject) Reset() { *m = Subject{} } +func (*Subject) ProtoMessage() {} +func (*Subject) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{12} } + +func init() { + proto.RegisterType((*ClusterRole)(nil), "k8s.io.client-go.pkg.apis.rbac.v1beta1.ClusterRole") + proto.RegisterType((*ClusterRoleBinding)(nil), "k8s.io.client-go.pkg.apis.rbac.v1beta1.ClusterRoleBinding") + proto.RegisterType((*ClusterRoleBindingBuilder)(nil), "k8s.io.client-go.pkg.apis.rbac.v1beta1.ClusterRoleBindingBuilder") + proto.RegisterType((*ClusterRoleBindingList)(nil), "k8s.io.client-go.pkg.apis.rbac.v1beta1.ClusterRoleBindingList") + proto.RegisterType((*ClusterRoleList)(nil), "k8s.io.client-go.pkg.apis.rbac.v1beta1.ClusterRoleList") + proto.RegisterType((*PolicyRule)(nil), "k8s.io.client-go.pkg.apis.rbac.v1beta1.PolicyRule") + proto.RegisterType((*PolicyRuleBuilder)(nil), "k8s.io.client-go.pkg.apis.rbac.v1beta1.PolicyRuleBuilder") + proto.RegisterType((*Role)(nil), "k8s.io.client-go.pkg.apis.rbac.v1beta1.Role") + proto.RegisterType((*RoleBinding)(nil), "k8s.io.client-go.pkg.apis.rbac.v1beta1.RoleBinding") + proto.RegisterType((*RoleBindingList)(nil), "k8s.io.client-go.pkg.apis.rbac.v1beta1.RoleBindingList") + proto.RegisterType((*RoleList)(nil), "k8s.io.client-go.pkg.apis.rbac.v1beta1.RoleList") + proto.RegisterType((*RoleRef)(nil), "k8s.io.client-go.pkg.apis.rbac.v1beta1.RoleRef") + proto.RegisterType((*Subject)(nil), "k8s.io.client-go.pkg.apis.rbac.v1beta1.Subject") +} +func (m *ClusterRole) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ClusterRole) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) + n1, err := m.ObjectMeta.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n1 + if len(m.Rules) > 0 { + for _, msg := range m.Rules { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *ClusterRoleBinding) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ClusterRoleBinding) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) + n2, err := m.ObjectMeta.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n2 + if len(m.Subjects) > 0 { + for _, msg := range m.Subjects { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.RoleRef.Size())) + n3, err := m.RoleRef.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n3 + return i, nil +} + +func (m *ClusterRoleBindingBuilder) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ClusterRoleBindingBuilder) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.ClusterRoleBinding.Size())) + n4, err := m.ClusterRoleBinding.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n4 + return i, nil +} + +func (m *ClusterRoleBindingList) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ClusterRoleBindingList) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) + n5, err := m.ListMeta.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n5 + if len(m.Items) > 0 { + for _, msg := range m.Items { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *ClusterRoleList) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *ClusterRoleList) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) + n6, err := m.ListMeta.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n6 + if len(m.Items) > 0 { + for _, msg := range m.Items { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *PolicyRule) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *PolicyRule) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Verbs) > 0 { + for _, s := range m.Verbs { + data[i] = 0xa + i++ + l = len(s) + for l >= 1<<7 { + data[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + data[i] = uint8(l) + i++ + i += copy(data[i:], s) + } + } + if len(m.APIGroups) > 0 { + for _, s := range m.APIGroups { + data[i] = 0x12 + i++ + l = len(s) + for l >= 1<<7 { + data[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + data[i] = uint8(l) + i++ + i += copy(data[i:], s) + } + } + if len(m.Resources) > 0 { + for _, s := range m.Resources { + data[i] = 0x1a + i++ + l = len(s) + for l >= 1<<7 { + data[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + data[i] = uint8(l) + i++ + i += copy(data[i:], s) + } + } + if len(m.ResourceNames) > 0 { + for _, s := range m.ResourceNames { + data[i] = 0x22 + i++ + l = len(s) + for l >= 1<<7 { + data[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + data[i] = uint8(l) + i++ + i += copy(data[i:], s) + } + } + if len(m.NonResourceURLs) > 0 { + for _, s := range m.NonResourceURLs { + data[i] = 0x2a + i++ + l = len(s) + for l >= 1<<7 { + data[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + data[i] = uint8(l) + i++ + i += copy(data[i:], s) + } + } + return i, nil +} + +func (m *PolicyRuleBuilder) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *PolicyRuleBuilder) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.PolicyRule.Size())) + n7, err := m.PolicyRule.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n7 + return i, nil +} + +func (m *Role) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Role) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) + n8, err := m.ObjectMeta.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n8 + if len(m.Rules) > 0 { + for _, msg := range m.Rules { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *RoleBinding) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *RoleBinding) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) + n9, err := m.ObjectMeta.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n9 + if len(m.Subjects) > 0 { + for _, msg := range m.Subjects { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.RoleRef.Size())) + n10, err := m.RoleRef.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n10 + return i, nil +} + +func (m *RoleBindingList) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *RoleBindingList) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) + n11, err := m.ListMeta.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n11 + if len(m.Items) > 0 { + for _, msg := range m.Items { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *RoleList) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *RoleList) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) + n12, err := m.ListMeta.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n12 + if len(m.Items) > 0 { + for _, msg := range m.Items { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *RoleRef) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *RoleRef) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.APIGroup))) + i += copy(data[i:], m.APIGroup) + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Kind))) + i += copy(data[i:], m.Kind) + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Name))) + i += copy(data[i:], m.Name) + return i, nil +} + +func (m *Subject) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *Subject) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Kind))) + i += copy(data[i:], m.Kind) + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.APIVersion))) + i += copy(data[i:], m.APIVersion) + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Name))) + i += copy(data[i:], m.Name) + data[i] = 0x22 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Namespace))) + i += copy(data[i:], m.Namespace) + return i, nil +} + +func encodeFixed64Generated(data []byte, offset int, v uint64) int { + data[offset] = uint8(v) + data[offset+1] = uint8(v >> 8) + data[offset+2] = uint8(v >> 16) + data[offset+3] = uint8(v >> 24) + data[offset+4] = uint8(v >> 32) + data[offset+5] = uint8(v >> 40) + data[offset+6] = uint8(v >> 48) + data[offset+7] = uint8(v >> 56) + return offset + 8 +} +func encodeFixed32Generated(data []byte, offset int, v uint32) int { + data[offset] = uint8(v) + data[offset+1] = uint8(v >> 8) + data[offset+2] = uint8(v >> 16) + data[offset+3] = uint8(v >> 24) + return offset + 4 +} +func encodeVarintGenerated(data []byte, offset int, v uint64) int { + for v >= 1<<7 { + data[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + data[offset] = uint8(v) + return offset + 1 +} +func (m *ClusterRole) Size() (n int) { + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Rules) > 0 { + for _, e := range m.Rules { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *ClusterRoleBinding) Size() (n int) { + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Subjects) > 0 { + for _, e := range m.Subjects { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + l = m.RoleRef.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *ClusterRoleBindingBuilder) Size() (n int) { + var l int + _ = l + l = m.ClusterRoleBinding.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *ClusterRoleBindingList) Size() (n int) { + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *ClusterRoleList) Size() (n int) { + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *PolicyRule) Size() (n int) { + var l int + _ = l + if len(m.Verbs) > 0 { + for _, s := range m.Verbs { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.APIGroups) > 0 { + for _, s := range m.APIGroups { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.Resources) > 0 { + for _, s := range m.Resources { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.ResourceNames) > 0 { + for _, s := range m.ResourceNames { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.NonResourceURLs) > 0 { + for _, s := range m.NonResourceURLs { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *PolicyRuleBuilder) Size() (n int) { + var l int + _ = l + l = m.PolicyRule.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *Role) Size() (n int) { + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Rules) > 0 { + for _, e := range m.Rules { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *RoleBinding) Size() (n int) { + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Subjects) > 0 { + for _, e := range m.Subjects { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + l = m.RoleRef.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *RoleBindingList) Size() (n int) { + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *RoleList) Size() (n int) { + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *RoleRef) Size() (n int) { + var l int + _ = l + l = len(m.APIGroup) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Kind) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *Subject) Size() (n int) { + var l int + _ = l + l = len(m.Kind) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.APIVersion) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Namespace) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func sovGenerated(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozGenerated(x uint64) (n int) { + return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *ClusterRole) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ClusterRole{`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Rules:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Rules), "PolicyRule", "PolicyRule", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ClusterRoleBinding) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ClusterRoleBinding{`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Subjects:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Subjects), "Subject", "Subject", 1), `&`, ``, 1) + `,`, + `RoleRef:` + strings.Replace(strings.Replace(this.RoleRef.String(), "RoleRef", "RoleRef", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ClusterRoleBindingBuilder) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ClusterRoleBindingBuilder{`, + `ClusterRoleBinding:` + strings.Replace(strings.Replace(this.ClusterRoleBinding.String(), "ClusterRoleBinding", "ClusterRoleBinding", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ClusterRoleBindingList) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ClusterRoleBindingList{`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "ClusterRoleBinding", "ClusterRoleBinding", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ClusterRoleList) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ClusterRoleList{`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "ClusterRole", "ClusterRole", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *PolicyRule) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PolicyRule{`, + `Verbs:` + fmt.Sprintf("%v", this.Verbs) + `,`, + `APIGroups:` + fmt.Sprintf("%v", this.APIGroups) + `,`, + `Resources:` + fmt.Sprintf("%v", this.Resources) + `,`, + `ResourceNames:` + fmt.Sprintf("%v", this.ResourceNames) + `,`, + `NonResourceURLs:` + fmt.Sprintf("%v", this.NonResourceURLs) + `,`, + `}`, + }, "") + return s +} +func (this *PolicyRuleBuilder) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PolicyRuleBuilder{`, + `PolicyRule:` + strings.Replace(strings.Replace(this.PolicyRule.String(), "PolicyRule", "PolicyRule", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *Role) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Role{`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Rules:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Rules), "PolicyRule", "PolicyRule", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *RoleBinding) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RoleBinding{`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Subjects:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Subjects), "Subject", "Subject", 1), `&`, ``, 1) + `,`, + `RoleRef:` + strings.Replace(strings.Replace(this.RoleRef.String(), "RoleRef", "RoleRef", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *RoleBindingList) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RoleBindingList{`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "RoleBinding", "RoleBinding", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *RoleList) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RoleList{`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "Role", "Role", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *RoleRef) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RoleRef{`, + `APIGroup:` + fmt.Sprintf("%v", this.APIGroup) + `,`, + `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `}`, + }, "") + return s +} +func (this *Subject) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Subject{`, + `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`, + `APIVersion:` + fmt.Sprintf("%v", this.APIVersion) + `,`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, + `}`, + }, "") + return s +} +func valueToStringGenerated(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *ClusterRole) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ClusterRole: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ClusterRole: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Rules = append(m.Rules, PolicyRule{}) + if err := m.Rules[len(m.Rules)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ClusterRoleBinding) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ClusterRoleBinding: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ClusterRoleBinding: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Subjects", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Subjects = append(m.Subjects, Subject{}) + if err := m.Subjects[len(m.Subjects)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RoleRef", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.RoleRef.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ClusterRoleBindingBuilder) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ClusterRoleBindingBuilder: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ClusterRoleBindingBuilder: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClusterRoleBinding", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ClusterRoleBinding.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ClusterRoleBindingList) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ClusterRoleBindingList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ClusterRoleBindingList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ListMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, ClusterRoleBinding{}) + if err := m.Items[len(m.Items)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ClusterRoleList) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ClusterRoleList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ClusterRoleList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ListMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, ClusterRole{}) + if err := m.Items[len(m.Items)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PolicyRule) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PolicyRule: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PolicyRule: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Verbs", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Verbs = append(m.Verbs, string(data[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field APIGroups", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.APIGroups = append(m.APIGroups, string(data[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Resources = append(m.Resources, string(data[iNdEx:postIndex])) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceNames", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ResourceNames = append(m.ResourceNames, string(data[iNdEx:postIndex])) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonResourceURLs", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NonResourceURLs = append(m.NonResourceURLs, string(data[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PolicyRuleBuilder) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PolicyRuleBuilder: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PolicyRuleBuilder: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PolicyRule", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.PolicyRule.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Role) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Role: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Role: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Rules = append(m.Rules, PolicyRule{}) + if err := m.Rules[len(m.Rules)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RoleBinding) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RoleBinding: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RoleBinding: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Subjects", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Subjects = append(m.Subjects, Subject{}) + if err := m.Subjects[len(m.Subjects)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RoleRef", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.RoleRef.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RoleBindingList) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RoleBindingList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RoleBindingList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ListMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, RoleBinding{}) + if err := m.Items[len(m.Items)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RoleList) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RoleList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RoleList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ListMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, Role{}) + if err := m.Items[len(m.Items)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RoleRef) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RoleRef: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RoleRef: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field APIGroup", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.APIGroup = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Kind = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Subject) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Subject: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Subject: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Kind = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field APIVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.APIVersion = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Namespace = string(data[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenerated(data []byte) (n int, err error) { + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if data[iNdEx-1] < 0x80 { + break + } + } + return iNdEx, nil + case 1: + iNdEx += 8 + return iNdEx, nil + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + iNdEx += length + if length < 0 { + return 0, ErrInvalidLengthGenerated + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skipGenerated(data[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + } + return iNdEx, nil + case 4: + return iNdEx, nil + case 5: + iNdEx += 4 + return iNdEx, nil + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + } + panic("unreachable") +} + +var ( + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") +) + +var fileDescriptorGenerated = []byte{ + // 838 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xec, 0x54, 0xbf, 0x6f, 0xe4, 0x44, + 0x14, 0xde, 0x49, 0x76, 0x95, 0xdd, 0x17, 0xa2, 0x90, 0x41, 0x42, 0x26, 0x85, 0x37, 0x72, 0x43, + 0x10, 0x77, 0xf6, 0x25, 0x9c, 0x38, 0x24, 0x44, 0x71, 0xa6, 0x40, 0x11, 0x47, 0x88, 0x06, 0x71, + 0xe2, 0x97, 0xd0, 0xcd, 0x7a, 0xe7, 0x9c, 0x61, 0xfd, 0x4b, 0x33, 0xe3, 0x48, 0x27, 0x28, 0xe8, + 0x68, 0xf9, 0x27, 0xe8, 0xa8, 0xa0, 0xa5, 0xa2, 0x0a, 0x54, 0x57, 0x5e, 0xb5, 0x22, 0xe6, 0x0f, + 0x01, 0xd9, 0x1e, 0xff, 0xd8, 0xf3, 0x46, 0x59, 0x82, 0x14, 0x09, 0x89, 0x6a, 0x77, 0xde, 0xfb, + 0xbe, 0x37, 0xef, 0x7b, 0x6f, 0xfc, 0xc1, 0xbd, 0xd9, 0x5b, 0xd2, 0xe6, 0xb1, 0x33, 0x4b, 0x27, + 0x4c, 0x44, 0x4c, 0x31, 0xe9, 0x24, 0x33, 0xdf, 0xa1, 0x09, 0x97, 0x8e, 0x98, 0x50, 0xcf, 0x39, + 0x3b, 0x98, 0x30, 0x45, 0x0f, 0x1c, 0x9f, 0x45, 0x4c, 0x50, 0xc5, 0xa6, 0x76, 0x22, 0x62, 0x15, + 0xe3, 0x57, 0x4b, 0xa2, 0xdd, 0x10, 0xed, 0x64, 0xe6, 0xdb, 0x39, 0xd1, 0xce, 0x89, 0xb6, 0x26, + 0xee, 0xde, 0xf6, 0xb9, 0x3a, 0x4d, 0x27, 0xb6, 0x17, 0x87, 0x8e, 0x1f, 0xfb, 0xb1, 0x53, 0xf0, + 0x27, 0xe9, 0xe3, 0xe2, 0x54, 0x1c, 0x8a, 0x7f, 0x65, 0xdd, 0xdd, 0xbb, 0xba, 0x21, 0x9a, 0xf0, + 0x90, 0x7a, 0xa7, 0x3c, 0x62, 0xe2, 0x49, 0xd3, 0x52, 0xc8, 0x14, 0x75, 0xce, 0x3a, 0xdd, 0xec, + 0x3a, 0x97, 0xb1, 0x44, 0x1a, 0x29, 0x1e, 0xb2, 0x0e, 0xe1, 0xcd, 0xab, 0x08, 0xd2, 0x3b, 0x65, + 0x21, 0xed, 0xf0, 0x0e, 0x2f, 0x9d, 0x97, 0x23, 0x98, 0x8c, 0x53, 0xe1, 0x75, 0xef, 0xba, 0x75, + 0x39, 0x67, 0x89, 0x94, 0x83, 0xe5, 0xe8, 0x54, 0xf1, 0xc0, 0xe1, 0x91, 0x92, 0x4a, 0x3c, 0x4f, + 0xb1, 0x7e, 0x43, 0xb0, 0xf9, 0x6e, 0x90, 0x4a, 0xc5, 0x04, 0x89, 0x03, 0x86, 0x1f, 0xc1, 0x30, + 0x1f, 0xd4, 0x94, 0x2a, 0x6a, 0xa0, 0x3d, 0xb4, 0xbf, 0x79, 0x78, 0xc7, 0xd6, 0xeb, 0x6a, 0xeb, + 0x6d, 0x16, 0x96, 0xa3, 0xed, 0xb3, 0x03, 0xfb, 0xc3, 0xc9, 0x57, 0xcc, 0x53, 0x1f, 0x30, 0x45, + 0x5d, 0x7c, 0x3e, 0x1f, 0xf7, 0xb2, 0xf9, 0x18, 0x9a, 0x18, 0xa9, 0xab, 0xe2, 0x4f, 0x60, 0x20, + 0xd2, 0x80, 0x49, 0x63, 0x6d, 0x6f, 0x7d, 0x7f, 0xf3, 0xf0, 0x0d, 0x7b, 0xc5, 0xd7, 0x60, 0x9f, + 0xc4, 0x01, 0xf7, 0x9e, 0x90, 0x34, 0x60, 0xee, 0x96, 0xbe, 0x61, 0x90, 0x9f, 0x24, 0x29, 0x0b, + 0x5a, 0x3f, 0xaf, 0x01, 0x6e, 0x69, 0x71, 0x79, 0x34, 0xe5, 0x91, 0x7f, 0x03, 0x92, 0xbe, 0x84, + 0xa1, 0x4c, 0x8b, 0x44, 0xa5, 0xea, 0xce, 0xca, 0xaa, 0x3e, 0x2a, 0x89, 0xee, 0x8b, 0xfa, 0x86, + 0xa1, 0x0e, 0x48, 0x52, 0xd7, 0xc4, 0x9f, 0xc3, 0x86, 0x88, 0x03, 0x46, 0xd8, 0x63, 0x63, 0x7d, + 0x51, 0xc0, 0x95, 0xe5, 0x49, 0xc9, 0x73, 0xb7, 0x75, 0xf9, 0x0d, 0x1d, 0x20, 0x55, 0x45, 0xeb, + 0x07, 0x04, 0xaf, 0x74, 0xa7, 0xe6, 0xa6, 0x3c, 0x98, 0x32, 0x81, 0xbf, 0x43, 0x80, 0xbd, 0x4e, + 0x56, 0xcf, 0xf1, 0xed, 0x95, 0xdb, 0x58, 0x72, 0xc1, 0xae, 0xee, 0x68, 0xc9, 0xca, 0xc8, 0x92, + 0x2b, 0xad, 0x67, 0x08, 0x5e, 0xee, 0x42, 0x1f, 0x70, 0xa9, 0xf0, 0x17, 0x9d, 0x0d, 0xdb, 0xab, + 0x6d, 0x38, 0x67, 0x17, 0xfb, 0xad, 0xa7, 0x5f, 0x45, 0x5a, 0xdb, 0x7d, 0x04, 0x03, 0xae, 0x58, + 0x58, 0xad, 0xf6, 0x5f, 0x89, 0xae, 0x1f, 0xee, 0x51, 0x5e, 0x91, 0x94, 0x85, 0xad, 0xdf, 0x11, + 0x6c, 0xb7, 0xc0, 0x37, 0xa0, 0xe9, 0xd3, 0x45, 0x4d, 0x77, 0xaf, 0xa5, 0x69, 0xb9, 0x98, 0xbf, + 0x10, 0x40, 0xf3, 0xa9, 0xe2, 0x31, 0x0c, 0xce, 0x98, 0x98, 0x48, 0x03, 0xed, 0xad, 0xef, 0x8f, + 0xdc, 0x51, 0x8e, 0x7f, 0x98, 0x07, 0x48, 0x19, 0xc7, 0xaf, 0xc3, 0x88, 0x26, 0xfc, 0x3d, 0x11, + 0xa7, 0x49, 0xd9, 0xce, 0xc8, 0xdd, 0xca, 0xe6, 0xe3, 0xd1, 0xfd, 0x93, 0xa3, 0x32, 0x48, 0x9a, + 0x7c, 0x0e, 0xae, 0xbc, 0x52, 0x1a, 0xeb, 0x0d, 0x98, 0x54, 0x41, 0xd2, 0xe4, 0xf1, 0x3d, 0xd8, + 0xaa, 0x0e, 0xc7, 0x34, 0x64, 0xd2, 0xe8, 0x17, 0x84, 0x9d, 0x6c, 0x3e, 0xde, 0x22, 0xed, 0x04, + 0x59, 0xc4, 0xe1, 0x77, 0x60, 0x3b, 0x8a, 0xa3, 0x0a, 0xf2, 0x31, 0x79, 0x20, 0x8d, 0x41, 0x41, + 0x7d, 0x29, 0x9b, 0x8f, 0xb7, 0x8f, 0x17, 0x53, 0xe4, 0x79, 0xac, 0xf5, 0x0d, 0xec, 0xb4, 0xbc, + 0x4a, 0x7f, 0x48, 0x3e, 0x40, 0x52, 0x07, 0xf5, 0x46, 0xaf, 0xe5, 0x7d, 0xb5, 0x15, 0x35, 0x31, + 0xd2, 0x2a, 0x6d, 0xfd, 0x8a, 0xa0, 0xff, 0x9f, 0xb7, 0xf2, 0x1f, 0xd7, 0x60, 0xf3, 0x7f, 0x0f, + 0x5f, 0xd9, 0xc3, 0x73, 0x03, 0xb9, 0x59, 0x53, 0xbc, 0xb6, 0x81, 0x5c, 0xed, 0x86, 0xbf, 0x20, + 0x18, 0xde, 0x90, 0x0d, 0x92, 0x45, 0x15, 0xb7, 0xff, 0x99, 0x8a, 0xe5, 0xed, 0x7f, 0x0d, 0xd5, + 0x7e, 0xf0, 0x2d, 0x18, 0x56, 0xd6, 0x55, 0x34, 0x3f, 0x6a, 0x9a, 0xa9, 0xdc, 0x8d, 0xd4, 0x08, + 0xbc, 0x07, 0xfd, 0x19, 0x8f, 0xa6, 0xc6, 0x5a, 0x81, 0x7c, 0x41, 0x23, 0xfb, 0xef, 0xf3, 0x68, + 0x4a, 0x8a, 0x4c, 0x8e, 0x88, 0x68, 0xc8, 0x8a, 0x07, 0xd4, 0x42, 0xe4, 0xa6, 0x45, 0x8a, 0x8c, + 0xf5, 0x13, 0x82, 0x0d, 0xfd, 0xf8, 0xea, 0x7a, 0xe8, 0xd2, 0x7a, 0x87, 0x00, 0x34, 0xe1, 0x0f, + 0x99, 0x90, 0x3c, 0x8e, 0xf4, 0xbd, 0xf5, 0x57, 0x72, 0xff, 0xe4, 0x48, 0x67, 0x48, 0x0b, 0x75, + 0x75, 0x0f, 0xd8, 0x81, 0x51, 0xfe, 0x2b, 0x13, 0xea, 0x31, 0xa3, 0x5f, 0xc0, 0x76, 0x34, 0x6c, + 0x74, 0x5c, 0x25, 0x48, 0x83, 0x71, 0x5f, 0x3b, 0xbf, 0x30, 0x7b, 0x4f, 0x2f, 0xcc, 0xde, 0xb3, + 0x0b, 0xb3, 0xf7, 0x6d, 0x66, 0xa2, 0xf3, 0xcc, 0x44, 0x4f, 0x33, 0x13, 0xfd, 0x91, 0x99, 0xe8, + 0xfb, 0x3f, 0xcd, 0xde, 0x67, 0x1b, 0x7a, 0xee, 0x7f, 0x07, 0x00, 0x00, 0xff, 0xff, 0x2f, 0x1d, + 0x32, 0x0f, 0x74, 0x0c, 0x00, 0x00, +} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1beta1/generated.proto b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1beta1/generated.proto new file mode 100644 index 00000000..c2cb2c74 --- /dev/null +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1beta1/generated.proto @@ -0,0 +1,198 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + + +// This file was autogenerated by go-to-protobuf. Do not edit it manually! + +syntax = 'proto2'; + +package k8s.io.kubernetes.pkg.apis.rbac.v1beta1; + +import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; +import "k8s.io/kubernetes/pkg/api/resource/generated.proto"; +import "k8s.io/kubernetes/pkg/api/v1/generated.proto"; +import "k8s.io/kubernetes/pkg/util/intstr/generated.proto"; + +// Package-wide variables from generator "generated". +option go_package = "v1beta1"; + +// ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. +message ClusterRole { + // Standard object's metadata. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // Rules holds all the PolicyRules for this ClusterRole + repeated PolicyRule rules = 2; +} + +// ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, +// and adds who information via Subject. +message ClusterRoleBinding { + // Standard object's metadata. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // Subjects holds references to the objects the role applies to. + repeated Subject subjects = 2; + + // RoleRef can only reference a ClusterRole in the global namespace. + // If the RoleRef cannot be resolved, the Authorizer must return an error. + optional RoleRef roleRef = 3; +} + +// +k8s:deepcopy-gen=false +// ClusterRoleBindingBuilder let's us attach methods. A no-no for API types. +// We use it to construct bindings in code. It's more compact than trying to write them +// out in a literal. +message ClusterRoleBindingBuilder { + optional ClusterRoleBinding clusterRoleBinding = 1; +} + +// ClusterRoleBindingList is a collection of ClusterRoleBindings +message ClusterRoleBindingList { + // Standard object's metadata. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // Items is a list of ClusterRoleBindings + repeated ClusterRoleBinding items = 2; +} + +// ClusterRoleList is a collection of ClusterRoles +message ClusterRoleList { + // Standard object's metadata. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // Items is a list of ClusterRoles + repeated ClusterRole items = 2; +} + +// PolicyRule holds information that describes a policy rule, but does not contain information +// about who the rule applies to or which namespace the rule applies to. +message PolicyRule { + // Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds. + repeated string verbs = 1; + + // APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of + // the enumerated resources in any API group will be allowed. + // +optional + repeated string apiGroups = 2; + + // Resources is a list of resources this rule applies to. ResourceAll represents all resources. + // +optional + repeated string resources = 3; + + // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. + // +optional + repeated string resourceNames = 4; + + // NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path + // Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. + // Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both. + // +optional + repeated string nonResourceURLs = 5; +} + +// +k8s:deepcopy-gen=false +// PolicyRuleBuilder let's us attach methods. A no-no for API types. +// We use it to construct rules in code. It's more compact than trying to write them +// out in a literal and allows us to perform some basic checking during construction +message PolicyRuleBuilder { + optional PolicyRule policyRule = 1; +} + +// Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. +message Role { + // Standard object's metadata. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // Rules holds all the PolicyRules for this Role + repeated PolicyRule rules = 2; +} + +// RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. +// It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given +// namespace only have effect in that namespace. +message RoleBinding { + // Standard object's metadata. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // Subjects holds references to the objects the role applies to. + repeated Subject subjects = 2; + + // RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. + // If the RoleRef cannot be resolved, the Authorizer must return an error. + optional RoleRef roleRef = 3; +} + +// RoleBindingList is a collection of RoleBindings +message RoleBindingList { + // Standard object's metadata. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // Items is a list of RoleBindings + repeated RoleBinding items = 2; +} + +// RoleList is a collection of Roles +message RoleList { + // Standard object's metadata. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // Items is a list of Roles + repeated Role items = 2; +} + +// RoleRef contains information that points to the role being used +message RoleRef { + // APIGroup is the group for the resource being referenced + optional string apiGroup = 1; + + // Kind is the type of resource being referenced + optional string kind = 2; + + // Name is the name of resource being referenced + optional string name = 3; +} + +// Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, +// or a value for non-objects such as user and group names. +message Subject { + // Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount". + // If the Authorizer does not recognized the kind value, the Authorizer should report an error. + optional string kind = 1; + + // APIVersion holds the API group and version of the referenced object. + // +optional + optional string apiVersion = 2; + + // Name of the object being referenced. + optional string name = 3; + + // Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty + // the Authorizer should report an error. + // +optional + optional string namespace = 4; +} + diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1beta1/helpers.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1beta1/helpers.go new file mode 100644 index 00000000..063b9ed3 --- /dev/null +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1beta1/helpers.go @@ -0,0 +1,146 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + "fmt" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// PolicyRuleBuilder let's us attach methods. A no-no for API types. +// We use it to construct rules in code. It's more compact than trying to write them +// out in a literal and allows us to perform some basic checking during construction +type PolicyRuleBuilder struct { + PolicyRule PolicyRule `protobuf:"bytes,1,opt,name=policyRule"` +} + +func NewRule(verbs ...string) *PolicyRuleBuilder { + return &PolicyRuleBuilder{ + PolicyRule: PolicyRule{Verbs: verbs}, + } +} + +func (r *PolicyRuleBuilder) Groups(groups ...string) *PolicyRuleBuilder { + r.PolicyRule.APIGroups = append(r.PolicyRule.APIGroups, groups...) + return r +} + +func (r *PolicyRuleBuilder) Resources(resources ...string) *PolicyRuleBuilder { + r.PolicyRule.Resources = append(r.PolicyRule.Resources, resources...) + return r +} + +func (r *PolicyRuleBuilder) Names(names ...string) *PolicyRuleBuilder { + r.PolicyRule.ResourceNames = append(r.PolicyRule.ResourceNames, names...) + return r +} + +func (r *PolicyRuleBuilder) URLs(urls ...string) *PolicyRuleBuilder { + r.PolicyRule.NonResourceURLs = append(r.PolicyRule.NonResourceURLs, urls...) + return r +} + +func (r *PolicyRuleBuilder) RuleOrDie() PolicyRule { + ret, err := r.Rule() + if err != nil { + panic(err) + } + return ret +} + +func (r *PolicyRuleBuilder) Rule() (PolicyRule, error) { + if len(r.PolicyRule.Verbs) == 0 { + return PolicyRule{}, fmt.Errorf("verbs are required: %#v", r.PolicyRule) + } + + switch { + case len(r.PolicyRule.NonResourceURLs) > 0: + if len(r.PolicyRule.APIGroups) != 0 || len(r.PolicyRule.Resources) != 0 || len(r.PolicyRule.ResourceNames) != 0 { + return PolicyRule{}, fmt.Errorf("non-resource rule may not have apiGroups, resources, or resourceNames: %#v", r.PolicyRule) + } + case len(r.PolicyRule.Resources) > 0: + if len(r.PolicyRule.NonResourceURLs) != 0 { + return PolicyRule{}, fmt.Errorf("resource rule may not have nonResourceURLs: %#v", r.PolicyRule) + } + if len(r.PolicyRule.APIGroups) == 0 { + // this a common bug + return PolicyRule{}, fmt.Errorf("resource rule must have apiGroups: %#v", r.PolicyRule) + } + default: + return PolicyRule{}, fmt.Errorf("a rule must have either nonResourceURLs or resources: %#v", r.PolicyRule) + } + + return r.PolicyRule, nil +} + +// ClusterRoleBindingBuilder let's us attach methods. A no-no for API types. +// We use it to construct bindings in code. It's more compact than trying to write them +// out in a literal. +type ClusterRoleBindingBuilder struct { + ClusterRoleBinding ClusterRoleBinding `protobuf:"bytes,1,opt,name=clusterRoleBinding"` +} + +func NewClusterBinding(clusterRoleName string) *ClusterRoleBindingBuilder { + return &ClusterRoleBindingBuilder{ + ClusterRoleBinding: ClusterRoleBinding{ + ObjectMeta: metav1.ObjectMeta{Name: clusterRoleName}, + RoleRef: RoleRef{ + APIGroup: GroupName, + Kind: "ClusterRole", + Name: clusterRoleName, + }, + }, + } +} + +func (r *ClusterRoleBindingBuilder) Groups(groups ...string) *ClusterRoleBindingBuilder { + for _, group := range groups { + r.ClusterRoleBinding.Subjects = append(r.ClusterRoleBinding.Subjects, Subject{Kind: GroupKind, Name: group}) + } + return r +} + +func (r *ClusterRoleBindingBuilder) Users(users ...string) *ClusterRoleBindingBuilder { + for _, user := range users { + r.ClusterRoleBinding.Subjects = append(r.ClusterRoleBinding.Subjects, Subject{Kind: UserKind, Name: user}) + } + return r +} + +func (r *ClusterRoleBindingBuilder) SAs(namespace string, serviceAccountNames ...string) *ClusterRoleBindingBuilder { + for _, saName := range serviceAccountNames { + r.ClusterRoleBinding.Subjects = append(r.ClusterRoleBinding.Subjects, Subject{Kind: ServiceAccountKind, Namespace: namespace, Name: saName}) + } + return r +} + +func (r *ClusterRoleBindingBuilder) BindingOrDie() ClusterRoleBinding { + ret, err := r.Binding() + if err != nil { + panic(err) + } + return ret +} + +func (r *ClusterRoleBindingBuilder) Binding() (ClusterRoleBinding, error) { + if len(r.ClusterRoleBinding.Subjects) == 0 { + return ClusterRoleBinding{}, fmt.Errorf("subjects are required: %#v", r.ClusterRoleBinding) + } + + return r.ClusterRoleBinding, nil +} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/policy/v1alpha1/register.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1beta1/register.go similarity index 79% rename from vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/policy/v1alpha1/register.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1beta1/register.go index ac924635..bc3a694c 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/policy/v1alpha1/register.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1beta1/register.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package v1beta1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -23,11 +23,10 @@ import ( "k8s.io/client-go/pkg/api/v1" ) -// GroupName is the group name use in this package -const GroupName = "policy" +const GroupName = "rbac.authorization.k8s.io" // SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"} // Resource takes an unqualified resource and returns a Group qualified GroupResource func Resource(resource string) schema.GroupResource { @@ -35,22 +34,27 @@ func Resource(resource string) schema.GroupResource { } var ( - SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) + SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, addDefaultingFuncs) AddToScheme = SchemeBuilder.AddToScheme ) // Adds the list of known types to api.Scheme. func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, - &PodDisruptionBudget{}, - &PodDisruptionBudgetList{}, - &Eviction{}, - &v1.ListOptions{}, + &Role{}, + &RoleBinding{}, + &RoleBindingList{}, + &RoleList{}, + + &ClusterRole{}, + &ClusterRoleBinding{}, + &ClusterRoleBindingList{}, + &ClusterRoleList{}, + &v1.DeleteOptions{}, &metav1.ExportOptions{}, &metav1.GetOptions{}, ) - // Add the watch version that applies metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1beta1/types.generated.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1beta1/types.generated.go new file mode 100644 index 00000000..db87af94 --- /dev/null +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1beta1/types.generated.go @@ -0,0 +1,4879 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// ************************************************************ +// DO NOT EDIT. +// THIS FILE IS AUTO-GENERATED BY codecgen. +// ************************************************************ + +package v1beta1 + +import ( + "errors" + "fmt" + codec1978 "github.com/ugorji/go/codec" + pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + pkg2_types "k8s.io/apimachinery/pkg/types" + "reflect" + "runtime" + time "time" +) + +const ( + // ----- content types ---- + codecSelferC_UTF81234 = 1 + codecSelferC_RAW1234 = 0 + // ----- value types used ---- + codecSelferValueTypeArray1234 = 10 + codecSelferValueTypeMap1234 = 9 + // ----- containerStateValues ---- + codecSelfer_containerMapKey1234 = 2 + codecSelfer_containerMapValue1234 = 3 + codecSelfer_containerMapEnd1234 = 4 + codecSelfer_containerArrayElem1234 = 6 + codecSelfer_containerArrayEnd1234 = 7 +) + +var ( + codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits()) + codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`) +) + +type codecSelfer1234 struct{} + +func init() { + if codec1978.GenVersion != 5 { + _, file, _, _ := runtime.Caller(0) + err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v", + 5, codec1978.GenVersion, file) + panic(err) + } + if false { // reference the types, but skip this branch at build/run time + var v0 pkg1_v1.TypeMeta + var v1 pkg2_types.UID + var v2 time.Time + _, _, _ = v0, v1, v2 + } +} + +func (x *PolicyRule) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[1] = len(x.APIGroups) != 0 + yyq2[2] = len(x.Resources) != 0 + yyq2[3] = len(x.ResourceNames) != 0 + yyq2[4] = len(x.NonResourceURLs) != 0 + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(5) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.Verbs == nil { + r.EncodeNil() + } else { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + z.F.EncSliceStringV(x.Verbs, false, e) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("verbs")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Verbs == nil { + r.EncodeNil() + } else { + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + z.F.EncSliceStringV(x.Verbs, false, e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + if x.APIGroups == nil { + r.EncodeNil() + } else { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + z.F.EncSliceStringV(x.APIGroups, false, e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiGroups")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.APIGroups == nil { + r.EncodeNil() + } else { + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + z.F.EncSliceStringV(x.APIGroups, false, e) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + if x.Resources == nil { + r.EncodeNil() + } else { + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + z.F.EncSliceStringV(x.Resources, false, e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("resources")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Resources == nil { + r.EncodeNil() + } else { + yym11 := z.EncBinary() + _ = yym11 + if false { + } else { + z.F.EncSliceStringV(x.Resources, false, e) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { + if x.ResourceNames == nil { + r.EncodeNil() + } else { + yym13 := z.EncBinary() + _ = yym13 + if false { + } else { + z.F.EncSliceStringV(x.ResourceNames, false, e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("resourceNames")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.ResourceNames == nil { + r.EncodeNil() + } else { + yym14 := z.EncBinary() + _ = yym14 + if false { + } else { + z.F.EncSliceStringV(x.ResourceNames, false, e) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[4] { + if x.NonResourceURLs == nil { + r.EncodeNil() + } else { + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + z.F.EncSliceStringV(x.NonResourceURLs, false, e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[4] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("nonResourceURLs")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.NonResourceURLs == nil { + r.EncodeNil() + } else { + yym17 := z.EncBinary() + _ = yym17 + if false { + } else { + z.F.EncSliceStringV(x.NonResourceURLs, false, e) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *PolicyRule) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *PolicyRule) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "verbs": + if r.TryDecodeAsNil() { + x.Verbs = nil + } else { + yyv4 := &x.Verbs + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + z.F.DecSliceStringX(yyv4, false, d) + } + } + case "apiGroups": + if r.TryDecodeAsNil() { + x.APIGroups = nil + } else { + yyv6 := &x.APIGroups + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + z.F.DecSliceStringX(yyv6, false, d) + } + } + case "resources": + if r.TryDecodeAsNil() { + x.Resources = nil + } else { + yyv8 := &x.Resources + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + z.F.DecSliceStringX(yyv8, false, d) + } + } + case "resourceNames": + if r.TryDecodeAsNil() { + x.ResourceNames = nil + } else { + yyv10 := &x.ResourceNames + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + z.F.DecSliceStringX(yyv10, false, d) + } + } + case "nonResourceURLs": + if r.TryDecodeAsNil() { + x.NonResourceURLs = nil + } else { + yyv12 := &x.NonResourceURLs + yym13 := z.DecBinary() + _ = yym13 + if false { + } else { + z.F.DecSliceStringX(yyv12, false, d) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *PolicyRule) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj14 int + var yyb14 bool + var yyhl14 bool = l >= 0 + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Verbs = nil + } else { + yyv15 := &x.Verbs + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + z.F.DecSliceStringX(yyv15, false, d) + } + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIGroups = nil + } else { + yyv17 := &x.APIGroups + yym18 := z.DecBinary() + _ = yym18 + if false { + } else { + z.F.DecSliceStringX(yyv17, false, d) + } + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Resources = nil + } else { + yyv19 := &x.Resources + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + z.F.DecSliceStringX(yyv19, false, d) + } + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ResourceNames = nil + } else { + yyv21 := &x.ResourceNames + yym22 := z.DecBinary() + _ = yym22 + if false { + } else { + z.F.DecSliceStringX(yyv21, false, d) + } + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.NonResourceURLs = nil + } else { + yyv23 := &x.NonResourceURLs + yym24 := z.DecBinary() + _ = yym24 + if false { + } else { + z.F.DecSliceStringX(yyv23, false, d) + } + } + for { + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj14-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *Subject) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[1] = x.APIVersion != "" + yyq2[3] = x.Namespace != "" + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(4) + } else { + yynn2 = 2 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Name)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("name")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Name)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { + yym13 := z.EncBinary() + _ = yym13 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Namespace)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("namespace")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym14 := z.EncBinary() + _ = yym14 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Namespace)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *Subject) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *Subject) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "name": + if r.TryDecodeAsNil() { + x.Name = "" + } else { + yyv8 := &x.Name + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*string)(yyv8)) = r.DecodeString() + } + } + case "namespace": + if r.TryDecodeAsNil() { + x.Namespace = "" + } else { + yyv10 := &x.Namespace + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + *((*string)(yyv10)) = r.DecodeString() + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *Subject) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Name = "" + } else { + yyv17 := &x.Name + yym18 := z.DecBinary() + _ = yym18 + if false { + } else { + *((*string)(yyv17)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Namespace = "" + } else { + yyv19 := &x.Namespace + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + *((*string)(yyv19)) = r.DecodeString() + } + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj12-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *RoleRef) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [3]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(3) + } else { + yynn2 = 3 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIGroup)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiGroup")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIGroup)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Name)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("name")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Name)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *RoleRef) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *RoleRef) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "apiGroup": + if r.TryDecodeAsNil() { + x.APIGroup = "" + } else { + yyv4 := &x.APIGroup + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv6 := &x.Kind + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "name": + if r.TryDecodeAsNil() { + x.Name = "" + } else { + yyv8 := &x.Name + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + *((*string)(yyv8)) = r.DecodeString() + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *RoleRef) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj10 int + var yyb10 bool + var yyhl10 bool = l >= 0 + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIGroup = "" + } else { + yyv11 := &x.APIGroup + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *((*string)(yyv11)) = r.DecodeString() + } + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Name = "" + } else { + yyv15 := &x.Name + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + for { + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj10-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *Role) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(4) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.Rules == nil { + r.EncodeNil() + } else { + yym15 := z.EncBinary() + _ = yym15 + if false { + } else { + h.encSlicePolicyRule(([]PolicyRule)(x.Rules), e) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("rules")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Rules == nil { + r.EncodeNil() + } else { + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + h.encSlicePolicyRule(([]PolicyRule)(x.Rules), e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *Role) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *Role) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "metadata": + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg1_v1.ObjectMeta{} + } else { + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } + } + case "rules": + if r.TryDecodeAsNil() { + x.Rules = nil + } else { + yyv10 := &x.Rules + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + h.decSlicePolicyRule((*[]PolicyRule)(yyv10), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *Role) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg1_v1.ObjectMeta{} + } else { + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Rules = nil + } else { + yyv19 := &x.Rules + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + h.decSlicePolicyRule((*[]PolicyRule)(yyv19), d) + } + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj12-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *RoleBinding) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(5) + } else { + yynn2 = 2 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.Subjects == nil { + r.EncodeNil() + } else { + yym15 := z.EncBinary() + _ = yym15 + if false { + } else { + h.encSliceSubject(([]Subject)(x.Subjects), e) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("subjects")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Subjects == nil { + r.EncodeNil() + } else { + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + h.encSliceSubject(([]Subject)(x.Subjects), e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy18 := &x.RoleRef + yy18.CodecEncodeSelf(e) + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("roleRef")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy20 := &x.RoleRef + yy20.CodecEncodeSelf(e) + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *RoleBinding) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *RoleBinding) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "metadata": + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg1_v1.ObjectMeta{} + } else { + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } + } + case "subjects": + if r.TryDecodeAsNil() { + x.Subjects = nil + } else { + yyv10 := &x.Subjects + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + h.decSliceSubject((*[]Subject)(yyv10), d) + } + } + case "roleRef": + if r.TryDecodeAsNil() { + x.RoleRef = RoleRef{} + } else { + yyv12 := &x.RoleRef + yyv12.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *RoleBinding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj13 int + var yyb13 bool + var yyhl13 bool = l >= 0 + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv14 := &x.Kind + yym15 := z.DecBinary() + _ = yym15 + if false { + } else { + *((*string)(yyv14)) = r.DecodeString() + } + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv16 := &x.APIVersion + yym17 := z.DecBinary() + _ = yym17 + if false { + } else { + *((*string)(yyv16)) = r.DecodeString() + } + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg1_v1.ObjectMeta{} + } else { + yyv18 := &x.ObjectMeta + yym19 := z.DecBinary() + _ = yym19 + if false { + } else if z.HasExtensions() && z.DecExt(yyv18) { + } else { + z.DecFallback(yyv18, false) + } + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Subjects = nil + } else { + yyv20 := &x.Subjects + yym21 := z.DecBinary() + _ = yym21 + if false { + } else { + h.decSliceSubject((*[]Subject)(yyv20), d) + } + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.RoleRef = RoleRef{} + } else { + yyv22 := &x.RoleRef + yyv22.CodecDecodeSelf(d) + } + for { + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj13-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *RoleBindingList) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(4) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yy10 := &x.ListMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy12 := &x.ListMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym15 := z.EncBinary() + _ = yym15 + if false { + } else { + h.encSliceRoleBinding(([]RoleBinding)(x.Items), e) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("items")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + h.encSliceRoleBinding(([]RoleBinding)(x.Items), e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *RoleBindingList) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *RoleBindingList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "metadata": + if r.TryDecodeAsNil() { + x.ListMeta = pkg1_v1.ListMeta{} + } else { + yyv8 := &x.ListMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } + } + case "items": + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv10 := &x.Items + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + h.decSliceRoleBinding((*[]RoleBinding)(yyv10), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *RoleBindingList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ListMeta = pkg1_v1.ListMeta{} + } else { + yyv17 := &x.ListMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv19 := &x.Items + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + h.decSliceRoleBinding((*[]RoleBinding)(yyv19), d) + } + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj12-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *RoleList) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(4) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yy10 := &x.ListMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy12 := &x.ListMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym15 := z.EncBinary() + _ = yym15 + if false { + } else { + h.encSliceRole(([]Role)(x.Items), e) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("items")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + h.encSliceRole(([]Role)(x.Items), e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *RoleList) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *RoleList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "metadata": + if r.TryDecodeAsNil() { + x.ListMeta = pkg1_v1.ListMeta{} + } else { + yyv8 := &x.ListMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } + } + case "items": + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv10 := &x.Items + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + h.decSliceRole((*[]Role)(yyv10), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *RoleList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ListMeta = pkg1_v1.ListMeta{} + } else { + yyv17 := &x.ListMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv19 := &x.Items + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + h.decSliceRole((*[]Role)(yyv19), d) + } + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj12-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *ClusterRole) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(4) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.Rules == nil { + r.EncodeNil() + } else { + yym15 := z.EncBinary() + _ = yym15 + if false { + } else { + h.encSlicePolicyRule(([]PolicyRule)(x.Rules), e) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("rules")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Rules == nil { + r.EncodeNil() + } else { + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + h.encSlicePolicyRule(([]PolicyRule)(x.Rules), e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *ClusterRole) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *ClusterRole) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "metadata": + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg1_v1.ObjectMeta{} + } else { + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } + } + case "rules": + if r.TryDecodeAsNil() { + x.Rules = nil + } else { + yyv10 := &x.Rules + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + h.decSlicePolicyRule((*[]PolicyRule)(yyv10), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *ClusterRole) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg1_v1.ObjectMeta{} + } else { + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Rules = nil + } else { + yyv19 := &x.Rules + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + h.decSlicePolicyRule((*[]PolicyRule)(yyv19), d) + } + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj12-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *ClusterRoleBinding) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(5) + } else { + yynn2 = 2 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yy10 := &x.ObjectMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy12 := &x.ObjectMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.Subjects == nil { + r.EncodeNil() + } else { + yym15 := z.EncBinary() + _ = yym15 + if false { + } else { + h.encSliceSubject(([]Subject)(x.Subjects), e) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("subjects")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Subjects == nil { + r.EncodeNil() + } else { + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + h.encSliceSubject(([]Subject)(x.Subjects), e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy18 := &x.RoleRef + yy18.CodecEncodeSelf(e) + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("roleRef")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy20 := &x.RoleRef + yy20.CodecEncodeSelf(e) + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *ClusterRoleBinding) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *ClusterRoleBinding) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "metadata": + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg1_v1.ObjectMeta{} + } else { + yyv8 := &x.ObjectMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } + } + case "subjects": + if r.TryDecodeAsNil() { + x.Subjects = nil + } else { + yyv10 := &x.Subjects + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + h.decSliceSubject((*[]Subject)(yyv10), d) + } + } + case "roleRef": + if r.TryDecodeAsNil() { + x.RoleRef = RoleRef{} + } else { + yyv12 := &x.RoleRef + yyv12.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *ClusterRoleBinding) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj13 int + var yyb13 bool + var yyhl13 bool = l >= 0 + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv14 := &x.Kind + yym15 := z.DecBinary() + _ = yym15 + if false { + } else { + *((*string)(yyv14)) = r.DecodeString() + } + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv16 := &x.APIVersion + yym17 := z.DecBinary() + _ = yym17 + if false { + } else { + *((*string)(yyv16)) = r.DecodeString() + } + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg1_v1.ObjectMeta{} + } else { + yyv18 := &x.ObjectMeta + yym19 := z.DecBinary() + _ = yym19 + if false { + } else if z.HasExtensions() && z.DecExt(yyv18) { + } else { + z.DecFallback(yyv18, false) + } + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Subjects = nil + } else { + yyv20 := &x.Subjects + yym21 := z.DecBinary() + _ = yym21 + if false { + } else { + h.decSliceSubject((*[]Subject)(yyv20), d) + } + } + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.RoleRef = RoleRef{} + } else { + yyv22 := &x.RoleRef + yyv22.CodecDecodeSelf(d) + } + for { + yyj13++ + if yyhl13 { + yyb13 = yyj13 > l + } else { + yyb13 = r.CheckBreak() + } + if yyb13 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj13-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *ClusterRoleBindingList) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(4) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yy10 := &x.ListMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy12 := &x.ListMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym15 := z.EncBinary() + _ = yym15 + if false { + } else { + h.encSliceClusterRoleBinding(([]ClusterRoleBinding)(x.Items), e) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("items")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + h.encSliceClusterRoleBinding(([]ClusterRoleBinding)(x.Items), e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *ClusterRoleBindingList) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *ClusterRoleBindingList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "metadata": + if r.TryDecodeAsNil() { + x.ListMeta = pkg1_v1.ListMeta{} + } else { + yyv8 := &x.ListMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } + } + case "items": + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv10 := &x.Items + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + h.decSliceClusterRoleBinding((*[]ClusterRoleBinding)(yyv10), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *ClusterRoleBindingList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ListMeta = pkg1_v1.ListMeta{} + } else { + yyv17 := &x.ListMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv19 := &x.Items + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + h.decSliceClusterRoleBinding((*[]ClusterRoleBinding)(yyv19), d) + } + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj12-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *ClusterRoleList) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = x.Kind != "" + yyq2[1] = x.APIVersion != "" + yyq2[2] = true + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(4) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yy10 := &x.ListMeta + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy12 := &x.ListMeta + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym15 := z.EncBinary() + _ = yym15 + if false { + } else { + h.encSliceClusterRole(([]ClusterRole)(x.Items), e) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("items")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + h.encSliceClusterRole(([]ClusterRole)(x.Items), e) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *ClusterRoleList) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *ClusterRoleList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv4 := &x.Kind + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *((*string)(yyv4)) = r.DecodeString() + } + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv6 := &x.APIVersion + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *((*string)(yyv6)) = r.DecodeString() + } + } + case "metadata": + if r.TryDecodeAsNil() { + x.ListMeta = pkg1_v1.ListMeta{} + } else { + yyv8 := &x.ListMeta + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } + } + case "items": + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv10 := &x.Items + yym11 := z.DecBinary() + _ = yym11 + if false { + } else { + h.decSliceClusterRole((*[]ClusterRole)(yyv10), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *ClusterRoleList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + *((*string)(yyv13)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + *((*string)(yyv15)) = r.DecodeString() + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ListMeta = pkg1_v1.ListMeta{} + } else { + yyv17 := &x.ListMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv19 := &x.Items + yym20 := z.DecBinary() + _ = yym20 + if false { + } else { + h.decSliceClusterRole((*[]ClusterRole)(yyv19), d) + } + } + for { + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj12-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) encSlicePolicyRule(v []PolicyRule, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSlicePolicyRule(v *[]PolicyRule, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []PolicyRule{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true + } + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { + + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 120) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] + } else { + yyv1 = make([]PolicyRule, yyrl1) + } + } else { + yyv1 = make([]PolicyRule, yyrl1) + } + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) + } + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true + } + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = PolicyRule{} + } else { + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) + } + + } + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, PolicyRule{}) + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = PolicyRule{} + } else { + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { + + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, PolicyRule{}) // var yyz1 PolicyRule + yyc1 = true + } + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { + if r.TryDecodeAsNil() { + yyv1[yyj1] = PolicyRule{} + } else { + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []PolicyRule{} + yyc1 = true + } + } + yyh1.End() + if yyc1 { + *v = yyv1 + } +} + +func (x codecSelfer1234) encSliceSubject(v []Subject, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceSubject(v *[]Subject, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []Subject{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true + } + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { + + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 64) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] + } else { + yyv1 = make([]Subject, yyrl1) + } + } else { + yyv1 = make([]Subject, yyrl1) + } + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) + } + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true + } + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = Subject{} + } else { + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) + } + + } + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, Subject{}) + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = Subject{} + } else { + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { + + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, Subject{}) // var yyz1 Subject + yyc1 = true + } + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { + if r.TryDecodeAsNil() { + yyv1[yyj1] = Subject{} + } else { + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []Subject{} + yyc1 = true + } + } + yyh1.End() + if yyc1 { + *v = yyv1 + } +} + +func (x codecSelfer1234) encSliceRoleBinding(v []RoleBinding, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceRoleBinding(v *[]RoleBinding, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []RoleBinding{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true + } + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { + + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 328) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] + } else { + yyv1 = make([]RoleBinding, yyrl1) + } + } else { + yyv1 = make([]RoleBinding, yyrl1) + } + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) + } + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true + } + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = RoleBinding{} + } else { + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) + } + + } + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, RoleBinding{}) + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = RoleBinding{} + } else { + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { + + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, RoleBinding{}) // var yyz1 RoleBinding + yyc1 = true + } + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { + if r.TryDecodeAsNil() { + yyv1[yyj1] = RoleBinding{} + } else { + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []RoleBinding{} + yyc1 = true + } + } + yyh1.End() + if yyc1 { + *v = yyv1 + } +} + +func (x codecSelfer1234) encSliceRole(v []Role, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceRole(v *[]Role, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []Role{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true + } + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { + + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 280) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] + } else { + yyv1 = make([]Role, yyrl1) + } + } else { + yyv1 = make([]Role, yyrl1) + } + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) + } + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true + } + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = Role{} + } else { + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) + } + + } + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, Role{}) + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = Role{} + } else { + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { + + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, Role{}) // var yyz1 Role + yyc1 = true + } + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { + if r.TryDecodeAsNil() { + yyv1[yyj1] = Role{} + } else { + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []Role{} + yyc1 = true + } + } + yyh1.End() + if yyc1 { + *v = yyv1 + } +} + +func (x codecSelfer1234) encSliceClusterRoleBinding(v []ClusterRoleBinding, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceClusterRoleBinding(v *[]ClusterRoleBinding, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []ClusterRoleBinding{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true + } + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { + + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 328) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] + } else { + yyv1 = make([]ClusterRoleBinding, yyrl1) + } + } else { + yyv1 = make([]ClusterRoleBinding, yyrl1) + } + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) + } + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true + } + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = ClusterRoleBinding{} + } else { + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) + } + + } + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, ClusterRoleBinding{}) + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = ClusterRoleBinding{} + } else { + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { + + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, ClusterRoleBinding{}) // var yyz1 ClusterRoleBinding + yyc1 = true + } + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { + if r.TryDecodeAsNil() { + yyv1[yyj1] = ClusterRoleBinding{} + } else { + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []ClusterRoleBinding{} + yyc1 = true + } + } + yyh1.End() + if yyc1 { + *v = yyv1 + } +} + +func (x codecSelfer1234) encSliceClusterRole(v []ClusterRole, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceClusterRole(v *[]ClusterRole, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []ClusterRole{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true + } + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { + + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 280) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] + } else { + yyv1 = make([]ClusterRole, yyrl1) + } + } else { + yyv1 = make([]ClusterRole, yyrl1) + } + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) + } + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true + } + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = ClusterRole{} + } else { + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) + } + + } + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, ClusterRole{}) + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = ClusterRole{} + } else { + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { + + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, ClusterRole{}) // var yyz1 ClusterRole + yyc1 = true + } + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { + if r.TryDecodeAsNil() { + yyv1[yyj1] = ClusterRole{} + } else { + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []ClusterRole{} + yyc1 = true + } + } + yyh1.End() + if yyc1 { + *v = yyv1 + } +} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1beta1/types.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1beta1/types.go new file mode 100644 index 00000000..8d0fd032 --- /dev/null +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1beta1/types.go @@ -0,0 +1,202 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// Authorization is calculated against +// 1. evaluation of ClusterRoleBindings - short circuit on match +// 2. evaluation of RoleBindings in the namespace requested - short circuit on match +// 3. deny by default + +const ( + APIGroupAll = "*" + ResourceAll = "*" + VerbAll = "*" + NonResourceAll = "*" + + GroupKind = "Group" + ServiceAccountKind = "ServiceAccount" + UserKind = "User" +) + +// Authorization is calculated against +// 1. evaluation of ClusterRoleBindings - short circuit on match +// 2. evaluation of RoleBindings in the namespace requested - short circuit on match +// 3. deny by default + +// PolicyRule holds information that describes a policy rule, but does not contain information +// about who the rule applies to or which namespace the rule applies to. +type PolicyRule struct { + // Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds. + Verbs []string `json:"verbs" protobuf:"bytes,1,rep,name=verbs"` + + // APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of + // the enumerated resources in any API group will be allowed. + // +optional + APIGroups []string `json:"apiGroups,omitempty" protobuf:"bytes,2,rep,name=apiGroups"` + // Resources is a list of resources this rule applies to. ResourceAll represents all resources. + // +optional + Resources []string `json:"resources,omitempty" protobuf:"bytes,3,rep,name=resources"` + // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. + // +optional + ResourceNames []string `json:"resourceNames,omitempty" protobuf:"bytes,4,rep,name=resourceNames"` + + // NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path + // Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. + // Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both. + // +optional + NonResourceURLs []string `json:"nonResourceURLs,omitempty" protobuf:"bytes,5,rep,name=nonResourceURLs"` +} + +// Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, +// or a value for non-objects such as user and group names. +type Subject struct { + // Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount". + // If the Authorizer does not recognized the kind value, the Authorizer should report an error. + Kind string `json:"kind" protobuf:"bytes,1,opt,name=kind"` + // APIVersion holds the API group and version of the referenced object. + // +optional + APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,2,opt.name=apiVersion"` + // Name of the object being referenced. + Name string `json:"name" protobuf:"bytes,3,opt,name=name"` + // Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty + // the Authorizer should report an error. + // +optional + Namespace string `json:"namespace,omitempty" protobuf:"bytes,4,opt,name=namespace"` +} + +// RoleRef contains information that points to the role being used +type RoleRef struct { + // APIGroup is the group for the resource being referenced + APIGroup string `json:"apiGroup" protobuf:"bytes,1,opt,name=apiGroup"` + // Kind is the type of resource being referenced + Kind string `json:"kind" protobuf:"bytes,2,opt,name=kind"` + // Name is the name of resource being referenced + Name string `json:"name" protobuf:"bytes,3,opt,name=name"` +} + +// +genclient=true + +// Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. +type Role struct { + metav1.TypeMeta `json:",inline"` + // Standard object's metadata. + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Rules holds all the PolicyRules for this Role + Rules []PolicyRule `json:"rules" protobuf:"bytes,2,rep,name=rules"` +} + +// +genclient=true + +// RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. +// It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given +// namespace only have effect in that namespace. +type RoleBinding struct { + metav1.TypeMeta `json:",inline"` + // Standard object's metadata. + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Subjects holds references to the objects the role applies to. + Subjects []Subject `json:"subjects" protobuf:"bytes,2,rep,name=subjects"` + + // RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. + // If the RoleRef cannot be resolved, the Authorizer must return an error. + RoleRef RoleRef `json:"roleRef" protobuf:"bytes,3,opt,name=roleRef"` +} + +// RoleBindingList is a collection of RoleBindings +type RoleBindingList struct { + metav1.TypeMeta `json:",inline"` + // Standard object's metadata. + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Items is a list of RoleBindings + Items []RoleBinding `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// RoleList is a collection of Roles +type RoleList struct { + metav1.TypeMeta `json:",inline"` + // Standard object's metadata. + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Items is a list of Roles + Items []Role `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// +genclient=true +// +nonNamespaced=true + +// ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. +type ClusterRole struct { + metav1.TypeMeta `json:",inline"` + // Standard object's metadata. + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Rules holds all the PolicyRules for this ClusterRole + Rules []PolicyRule `json:"rules" protobuf:"bytes,2,rep,name=rules"` +} + +// +genclient=true +// +nonNamespaced=true + +// ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, +// and adds who information via Subject. +type ClusterRoleBinding struct { + metav1.TypeMeta `json:",inline"` + // Standard object's metadata. + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Subjects holds references to the objects the role applies to. + Subjects []Subject `json:"subjects" protobuf:"bytes,2,rep,name=subjects"` + + // RoleRef can only reference a ClusterRole in the global namespace. + // If the RoleRef cannot be resolved, the Authorizer must return an error. + RoleRef RoleRef `json:"roleRef" protobuf:"bytes,3,opt,name=roleRef"` +} + +// ClusterRoleBindingList is a collection of ClusterRoleBindings +type ClusterRoleBindingList struct { + metav1.TypeMeta `json:",inline"` + // Standard object's metadata. + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Items is a list of ClusterRoleBindings + Items []ClusterRoleBinding `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// ClusterRoleList is a collection of ClusterRoles +type ClusterRoleList struct { + metav1.TypeMeta `json:",inline"` + // Standard object's metadata. + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Items is a list of ClusterRoles + Items []ClusterRole `json:"items" protobuf:"bytes,2,rep,name=items"` +} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1beta1/types_swagger_doc_generated.go new file mode 100644 index 00000000..a6682bd3 --- /dev/null +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1beta1/types_swagger_doc_generated.go @@ -0,0 +1,148 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +// This file contains a collection of methods that can be used from go-restful to +// generate Swagger API documentation for its models. Please read this PR for more +// information on the implementation: https://github.com/emicklei/go-restful/pull/215 +// +// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if +// they are on one line! For multiple line or blocks that you want to ignore use ---. +// Any context after a --- is ignored. +// +// Those methods can be generated by using hack/update-generated-swagger-docs.sh + +// AUTO-GENERATED FUNCTIONS START HERE +var map_ClusterRole = map[string]string{ + "": "ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.", + "metadata": "Standard object's metadata.", + "rules": "Rules holds all the PolicyRules for this ClusterRole", +} + +func (ClusterRole) SwaggerDoc() map[string]string { + return map_ClusterRole +} + +var map_ClusterRoleBinding = map[string]string{ + "": "ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject.", + "metadata": "Standard object's metadata.", + "subjects": "Subjects holds references to the objects the role applies to.", + "roleRef": "RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", +} + +func (ClusterRoleBinding) SwaggerDoc() map[string]string { + return map_ClusterRoleBinding +} + +var map_ClusterRoleBindingList = map[string]string{ + "": "ClusterRoleBindingList is a collection of ClusterRoleBindings", + "metadata": "Standard object's metadata.", + "items": "Items is a list of ClusterRoleBindings", +} + +func (ClusterRoleBindingList) SwaggerDoc() map[string]string { + return map_ClusterRoleBindingList +} + +var map_ClusterRoleList = map[string]string{ + "": "ClusterRoleList is a collection of ClusterRoles", + "metadata": "Standard object's metadata.", + "items": "Items is a list of ClusterRoles", +} + +func (ClusterRoleList) SwaggerDoc() map[string]string { + return map_ClusterRoleList +} + +var map_PolicyRule = map[string]string{ + "": "PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.", + "verbs": "Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.", + "apiGroups": "APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed.", + "resources": "Resources is a list of resources this rule applies to. ResourceAll represents all resources.", + "resourceNames": "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.", + "nonResourceURLs": "NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as \"pods\" or \"secrets\") or non-resource URL paths (such as \"/api\"), but not both.", +} + +func (PolicyRule) SwaggerDoc() map[string]string { + return map_PolicyRule +} + +var map_Role = map[string]string{ + "": "Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.", + "metadata": "Standard object's metadata.", + "rules": "Rules holds all the PolicyRules for this Role", +} + +func (Role) SwaggerDoc() map[string]string { + return map_Role +} + +var map_RoleBinding = map[string]string{ + "": "RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace.", + "metadata": "Standard object's metadata.", + "subjects": "Subjects holds references to the objects the role applies to.", + "roleRef": "RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", +} + +func (RoleBinding) SwaggerDoc() map[string]string { + return map_RoleBinding +} + +var map_RoleBindingList = map[string]string{ + "": "RoleBindingList is a collection of RoleBindings", + "metadata": "Standard object's metadata.", + "items": "Items is a list of RoleBindings", +} + +func (RoleBindingList) SwaggerDoc() map[string]string { + return map_RoleBindingList +} + +var map_RoleList = map[string]string{ + "": "RoleList is a collection of Roles", + "metadata": "Standard object's metadata.", + "items": "Items is a list of Roles", +} + +func (RoleList) SwaggerDoc() map[string]string { + return map_RoleList +} + +var map_RoleRef = map[string]string{ + "": "RoleRef contains information that points to the role being used", + "apiGroup": "APIGroup is the group for the resource being referenced", + "kind": "Kind is the type of resource being referenced", + "name": "Name is the name of resource being referenced", +} + +func (RoleRef) SwaggerDoc() map[string]string { + return map_RoleRef +} + +var map_Subject = map[string]string{ + "": "Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names.", + "kind": "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\". If the Authorizer does not recognized the kind value, the Authorizer should report an error.", + "apiVersion": "APIVersion holds the API group and version of the referenced object.", + "name": "Name of the object being referenced.", + "namespace": "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty the Authorizer should report an error.", +} + +func (Subject) SwaggerDoc() map[string]string { + return map_Subject +} + +// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1beta1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1beta1/zz_generated.conversion.go new file mode 100644 index 00000000..c9c5e6f5 --- /dev/null +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1beta1/zz_generated.conversion.go @@ -0,0 +1,353 @@ +// +build !ignore_autogenerated + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was autogenerated by conversion-gen. Do not edit it manually! + +package v1beta1 + +import ( + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + rbac "k8s.io/client-go/pkg/apis/rbac" + unsafe "unsafe" +) + +func init() { + SchemeBuilder.Register(RegisterConversions) +} + +// RegisterConversions adds conversion functions to the given scheme. +// Public to allow building arbitrary schemes. +func RegisterConversions(scheme *runtime.Scheme) error { + return scheme.AddGeneratedConversionFuncs( + Convert_v1beta1_ClusterRole_To_rbac_ClusterRole, + Convert_rbac_ClusterRole_To_v1beta1_ClusterRole, + Convert_v1beta1_ClusterRoleBinding_To_rbac_ClusterRoleBinding, + Convert_rbac_ClusterRoleBinding_To_v1beta1_ClusterRoleBinding, + Convert_v1beta1_ClusterRoleBindingBuilder_To_rbac_ClusterRoleBindingBuilder, + Convert_rbac_ClusterRoleBindingBuilder_To_v1beta1_ClusterRoleBindingBuilder, + Convert_v1beta1_ClusterRoleBindingList_To_rbac_ClusterRoleBindingList, + Convert_rbac_ClusterRoleBindingList_To_v1beta1_ClusterRoleBindingList, + Convert_v1beta1_ClusterRoleList_To_rbac_ClusterRoleList, + Convert_rbac_ClusterRoleList_To_v1beta1_ClusterRoleList, + Convert_v1beta1_PolicyRule_To_rbac_PolicyRule, + Convert_rbac_PolicyRule_To_v1beta1_PolicyRule, + Convert_v1beta1_PolicyRuleBuilder_To_rbac_PolicyRuleBuilder, + Convert_rbac_PolicyRuleBuilder_To_v1beta1_PolicyRuleBuilder, + Convert_v1beta1_Role_To_rbac_Role, + Convert_rbac_Role_To_v1beta1_Role, + Convert_v1beta1_RoleBinding_To_rbac_RoleBinding, + Convert_rbac_RoleBinding_To_v1beta1_RoleBinding, + Convert_v1beta1_RoleBindingList_To_rbac_RoleBindingList, + Convert_rbac_RoleBindingList_To_v1beta1_RoleBindingList, + Convert_v1beta1_RoleList_To_rbac_RoleList, + Convert_rbac_RoleList_To_v1beta1_RoleList, + Convert_v1beta1_RoleRef_To_rbac_RoleRef, + Convert_rbac_RoleRef_To_v1beta1_RoleRef, + Convert_v1beta1_Subject_To_rbac_Subject, + Convert_rbac_Subject_To_v1beta1_Subject, + ) +} + +func autoConvert_v1beta1_ClusterRole_To_rbac_ClusterRole(in *ClusterRole, out *rbac.ClusterRole, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Rules = *(*[]rbac.PolicyRule)(unsafe.Pointer(&in.Rules)) + return nil +} + +func Convert_v1beta1_ClusterRole_To_rbac_ClusterRole(in *ClusterRole, out *rbac.ClusterRole, s conversion.Scope) error { + return autoConvert_v1beta1_ClusterRole_To_rbac_ClusterRole(in, out, s) +} + +func autoConvert_rbac_ClusterRole_To_v1beta1_ClusterRole(in *rbac.ClusterRole, out *ClusterRole, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Rules = *(*[]PolicyRule)(unsafe.Pointer(&in.Rules)) + return nil +} + +func Convert_rbac_ClusterRole_To_v1beta1_ClusterRole(in *rbac.ClusterRole, out *ClusterRole, s conversion.Scope) error { + return autoConvert_rbac_ClusterRole_To_v1beta1_ClusterRole(in, out, s) +} + +func autoConvert_v1beta1_ClusterRoleBinding_To_rbac_ClusterRoleBinding(in *ClusterRoleBinding, out *rbac.ClusterRoleBinding, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Subjects = *(*[]rbac.Subject)(unsafe.Pointer(&in.Subjects)) + if err := Convert_v1beta1_RoleRef_To_rbac_RoleRef(&in.RoleRef, &out.RoleRef, s); err != nil { + return err + } + return nil +} + +func Convert_v1beta1_ClusterRoleBinding_To_rbac_ClusterRoleBinding(in *ClusterRoleBinding, out *rbac.ClusterRoleBinding, s conversion.Scope) error { + return autoConvert_v1beta1_ClusterRoleBinding_To_rbac_ClusterRoleBinding(in, out, s) +} + +func autoConvert_rbac_ClusterRoleBinding_To_v1beta1_ClusterRoleBinding(in *rbac.ClusterRoleBinding, out *ClusterRoleBinding, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Subjects = *(*[]Subject)(unsafe.Pointer(&in.Subjects)) + if err := Convert_rbac_RoleRef_To_v1beta1_RoleRef(&in.RoleRef, &out.RoleRef, s); err != nil { + return err + } + return nil +} + +func Convert_rbac_ClusterRoleBinding_To_v1beta1_ClusterRoleBinding(in *rbac.ClusterRoleBinding, out *ClusterRoleBinding, s conversion.Scope) error { + return autoConvert_rbac_ClusterRoleBinding_To_v1beta1_ClusterRoleBinding(in, out, s) +} + +func autoConvert_v1beta1_ClusterRoleBindingBuilder_To_rbac_ClusterRoleBindingBuilder(in *ClusterRoleBindingBuilder, out *rbac.ClusterRoleBindingBuilder, s conversion.Scope) error { + if err := Convert_v1beta1_ClusterRoleBinding_To_rbac_ClusterRoleBinding(&in.ClusterRoleBinding, &out.ClusterRoleBinding, s); err != nil { + return err + } + return nil +} + +func Convert_v1beta1_ClusterRoleBindingBuilder_To_rbac_ClusterRoleBindingBuilder(in *ClusterRoleBindingBuilder, out *rbac.ClusterRoleBindingBuilder, s conversion.Scope) error { + return autoConvert_v1beta1_ClusterRoleBindingBuilder_To_rbac_ClusterRoleBindingBuilder(in, out, s) +} + +func autoConvert_rbac_ClusterRoleBindingBuilder_To_v1beta1_ClusterRoleBindingBuilder(in *rbac.ClusterRoleBindingBuilder, out *ClusterRoleBindingBuilder, s conversion.Scope) error { + if err := Convert_rbac_ClusterRoleBinding_To_v1beta1_ClusterRoleBinding(&in.ClusterRoleBinding, &out.ClusterRoleBinding, s); err != nil { + return err + } + return nil +} + +func Convert_rbac_ClusterRoleBindingBuilder_To_v1beta1_ClusterRoleBindingBuilder(in *rbac.ClusterRoleBindingBuilder, out *ClusterRoleBindingBuilder, s conversion.Scope) error { + return autoConvert_rbac_ClusterRoleBindingBuilder_To_v1beta1_ClusterRoleBindingBuilder(in, out, s) +} + +func autoConvert_v1beta1_ClusterRoleBindingList_To_rbac_ClusterRoleBindingList(in *ClusterRoleBindingList, out *rbac.ClusterRoleBindingList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]rbac.ClusterRoleBinding)(unsafe.Pointer(&in.Items)) + return nil +} + +func Convert_v1beta1_ClusterRoleBindingList_To_rbac_ClusterRoleBindingList(in *ClusterRoleBindingList, out *rbac.ClusterRoleBindingList, s conversion.Scope) error { + return autoConvert_v1beta1_ClusterRoleBindingList_To_rbac_ClusterRoleBindingList(in, out, s) +} + +func autoConvert_rbac_ClusterRoleBindingList_To_v1beta1_ClusterRoleBindingList(in *rbac.ClusterRoleBindingList, out *ClusterRoleBindingList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]ClusterRoleBinding)(unsafe.Pointer(&in.Items)) + return nil +} + +func Convert_rbac_ClusterRoleBindingList_To_v1beta1_ClusterRoleBindingList(in *rbac.ClusterRoleBindingList, out *ClusterRoleBindingList, s conversion.Scope) error { + return autoConvert_rbac_ClusterRoleBindingList_To_v1beta1_ClusterRoleBindingList(in, out, s) +} + +func autoConvert_v1beta1_ClusterRoleList_To_rbac_ClusterRoleList(in *ClusterRoleList, out *rbac.ClusterRoleList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]rbac.ClusterRole)(unsafe.Pointer(&in.Items)) + return nil +} + +func Convert_v1beta1_ClusterRoleList_To_rbac_ClusterRoleList(in *ClusterRoleList, out *rbac.ClusterRoleList, s conversion.Scope) error { + return autoConvert_v1beta1_ClusterRoleList_To_rbac_ClusterRoleList(in, out, s) +} + +func autoConvert_rbac_ClusterRoleList_To_v1beta1_ClusterRoleList(in *rbac.ClusterRoleList, out *ClusterRoleList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]ClusterRole)(unsafe.Pointer(&in.Items)) + return nil +} + +func Convert_rbac_ClusterRoleList_To_v1beta1_ClusterRoleList(in *rbac.ClusterRoleList, out *ClusterRoleList, s conversion.Scope) error { + return autoConvert_rbac_ClusterRoleList_To_v1beta1_ClusterRoleList(in, out, s) +} + +func autoConvert_v1beta1_PolicyRule_To_rbac_PolicyRule(in *PolicyRule, out *rbac.PolicyRule, s conversion.Scope) error { + out.Verbs = *(*[]string)(unsafe.Pointer(&in.Verbs)) + out.APIGroups = *(*[]string)(unsafe.Pointer(&in.APIGroups)) + out.Resources = *(*[]string)(unsafe.Pointer(&in.Resources)) + out.ResourceNames = *(*[]string)(unsafe.Pointer(&in.ResourceNames)) + out.NonResourceURLs = *(*[]string)(unsafe.Pointer(&in.NonResourceURLs)) + return nil +} + +func Convert_v1beta1_PolicyRule_To_rbac_PolicyRule(in *PolicyRule, out *rbac.PolicyRule, s conversion.Scope) error { + return autoConvert_v1beta1_PolicyRule_To_rbac_PolicyRule(in, out, s) +} + +func autoConvert_rbac_PolicyRule_To_v1beta1_PolicyRule(in *rbac.PolicyRule, out *PolicyRule, s conversion.Scope) error { + out.Verbs = *(*[]string)(unsafe.Pointer(&in.Verbs)) + out.APIGroups = *(*[]string)(unsafe.Pointer(&in.APIGroups)) + out.Resources = *(*[]string)(unsafe.Pointer(&in.Resources)) + out.ResourceNames = *(*[]string)(unsafe.Pointer(&in.ResourceNames)) + out.NonResourceURLs = *(*[]string)(unsafe.Pointer(&in.NonResourceURLs)) + return nil +} + +func Convert_rbac_PolicyRule_To_v1beta1_PolicyRule(in *rbac.PolicyRule, out *PolicyRule, s conversion.Scope) error { + return autoConvert_rbac_PolicyRule_To_v1beta1_PolicyRule(in, out, s) +} + +func autoConvert_v1beta1_PolicyRuleBuilder_To_rbac_PolicyRuleBuilder(in *PolicyRuleBuilder, out *rbac.PolicyRuleBuilder, s conversion.Scope) error { + if err := Convert_v1beta1_PolicyRule_To_rbac_PolicyRule(&in.PolicyRule, &out.PolicyRule, s); err != nil { + return err + } + return nil +} + +func Convert_v1beta1_PolicyRuleBuilder_To_rbac_PolicyRuleBuilder(in *PolicyRuleBuilder, out *rbac.PolicyRuleBuilder, s conversion.Scope) error { + return autoConvert_v1beta1_PolicyRuleBuilder_To_rbac_PolicyRuleBuilder(in, out, s) +} + +func autoConvert_rbac_PolicyRuleBuilder_To_v1beta1_PolicyRuleBuilder(in *rbac.PolicyRuleBuilder, out *PolicyRuleBuilder, s conversion.Scope) error { + if err := Convert_rbac_PolicyRule_To_v1beta1_PolicyRule(&in.PolicyRule, &out.PolicyRule, s); err != nil { + return err + } + return nil +} + +func Convert_rbac_PolicyRuleBuilder_To_v1beta1_PolicyRuleBuilder(in *rbac.PolicyRuleBuilder, out *PolicyRuleBuilder, s conversion.Scope) error { + return autoConvert_rbac_PolicyRuleBuilder_To_v1beta1_PolicyRuleBuilder(in, out, s) +} + +func autoConvert_v1beta1_Role_To_rbac_Role(in *Role, out *rbac.Role, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Rules = *(*[]rbac.PolicyRule)(unsafe.Pointer(&in.Rules)) + return nil +} + +func Convert_v1beta1_Role_To_rbac_Role(in *Role, out *rbac.Role, s conversion.Scope) error { + return autoConvert_v1beta1_Role_To_rbac_Role(in, out, s) +} + +func autoConvert_rbac_Role_To_v1beta1_Role(in *rbac.Role, out *Role, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Rules = *(*[]PolicyRule)(unsafe.Pointer(&in.Rules)) + return nil +} + +func Convert_rbac_Role_To_v1beta1_Role(in *rbac.Role, out *Role, s conversion.Scope) error { + return autoConvert_rbac_Role_To_v1beta1_Role(in, out, s) +} + +func autoConvert_v1beta1_RoleBinding_To_rbac_RoleBinding(in *RoleBinding, out *rbac.RoleBinding, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Subjects = *(*[]rbac.Subject)(unsafe.Pointer(&in.Subjects)) + if err := Convert_v1beta1_RoleRef_To_rbac_RoleRef(&in.RoleRef, &out.RoleRef, s); err != nil { + return err + } + return nil +} + +func Convert_v1beta1_RoleBinding_To_rbac_RoleBinding(in *RoleBinding, out *rbac.RoleBinding, s conversion.Scope) error { + return autoConvert_v1beta1_RoleBinding_To_rbac_RoleBinding(in, out, s) +} + +func autoConvert_rbac_RoleBinding_To_v1beta1_RoleBinding(in *rbac.RoleBinding, out *RoleBinding, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Subjects = *(*[]Subject)(unsafe.Pointer(&in.Subjects)) + if err := Convert_rbac_RoleRef_To_v1beta1_RoleRef(&in.RoleRef, &out.RoleRef, s); err != nil { + return err + } + return nil +} + +func Convert_rbac_RoleBinding_To_v1beta1_RoleBinding(in *rbac.RoleBinding, out *RoleBinding, s conversion.Scope) error { + return autoConvert_rbac_RoleBinding_To_v1beta1_RoleBinding(in, out, s) +} + +func autoConvert_v1beta1_RoleBindingList_To_rbac_RoleBindingList(in *RoleBindingList, out *rbac.RoleBindingList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]rbac.RoleBinding)(unsafe.Pointer(&in.Items)) + return nil +} + +func Convert_v1beta1_RoleBindingList_To_rbac_RoleBindingList(in *RoleBindingList, out *rbac.RoleBindingList, s conversion.Scope) error { + return autoConvert_v1beta1_RoleBindingList_To_rbac_RoleBindingList(in, out, s) +} + +func autoConvert_rbac_RoleBindingList_To_v1beta1_RoleBindingList(in *rbac.RoleBindingList, out *RoleBindingList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]RoleBinding)(unsafe.Pointer(&in.Items)) + return nil +} + +func Convert_rbac_RoleBindingList_To_v1beta1_RoleBindingList(in *rbac.RoleBindingList, out *RoleBindingList, s conversion.Scope) error { + return autoConvert_rbac_RoleBindingList_To_v1beta1_RoleBindingList(in, out, s) +} + +func autoConvert_v1beta1_RoleList_To_rbac_RoleList(in *RoleList, out *rbac.RoleList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]rbac.Role)(unsafe.Pointer(&in.Items)) + return nil +} + +func Convert_v1beta1_RoleList_To_rbac_RoleList(in *RoleList, out *rbac.RoleList, s conversion.Scope) error { + return autoConvert_v1beta1_RoleList_To_rbac_RoleList(in, out, s) +} + +func autoConvert_rbac_RoleList_To_v1beta1_RoleList(in *rbac.RoleList, out *RoleList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]Role)(unsafe.Pointer(&in.Items)) + return nil +} + +func Convert_rbac_RoleList_To_v1beta1_RoleList(in *rbac.RoleList, out *RoleList, s conversion.Scope) error { + return autoConvert_rbac_RoleList_To_v1beta1_RoleList(in, out, s) +} + +func autoConvert_v1beta1_RoleRef_To_rbac_RoleRef(in *RoleRef, out *rbac.RoleRef, s conversion.Scope) error { + out.APIGroup = in.APIGroup + out.Kind = in.Kind + out.Name = in.Name + return nil +} + +func Convert_v1beta1_RoleRef_To_rbac_RoleRef(in *RoleRef, out *rbac.RoleRef, s conversion.Scope) error { + return autoConvert_v1beta1_RoleRef_To_rbac_RoleRef(in, out, s) +} + +func autoConvert_rbac_RoleRef_To_v1beta1_RoleRef(in *rbac.RoleRef, out *RoleRef, s conversion.Scope) error { + out.APIGroup = in.APIGroup + out.Kind = in.Kind + out.Name = in.Name + return nil +} + +func Convert_rbac_RoleRef_To_v1beta1_RoleRef(in *rbac.RoleRef, out *RoleRef, s conversion.Scope) error { + return autoConvert_rbac_RoleRef_To_v1beta1_RoleRef(in, out, s) +} + +func autoConvert_v1beta1_Subject_To_rbac_Subject(in *Subject, out *rbac.Subject, s conversion.Scope) error { + out.Kind = in.Kind + out.APIVersion = in.APIVersion + out.Name = in.Name + out.Namespace = in.Namespace + return nil +} + +func Convert_v1beta1_Subject_To_rbac_Subject(in *Subject, out *rbac.Subject, s conversion.Scope) error { + return autoConvert_v1beta1_Subject_To_rbac_Subject(in, out, s) +} + +func autoConvert_rbac_Subject_To_v1beta1_Subject(in *rbac.Subject, out *Subject, s conversion.Scope) error { + out.Kind = in.Kind + out.APIVersion = in.APIVersion + out.Name = in.Name + out.Namespace = in.Namespace + return nil +} + +func Convert_rbac_Subject_To_v1beta1_Subject(in *rbac.Subject, out *Subject, s conversion.Scope) error { + return autoConvert_rbac_Subject_To_v1beta1_Subject(in, out, s) +} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1beta1/zz_generated.deepcopy.go new file mode 100644 index 00000000..dccae9b4 --- /dev/null +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1beta1/zz_generated.deepcopy.go @@ -0,0 +1,258 @@ +// +build !ignore_autogenerated + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was autogenerated by deepcopy-gen. Do not edit it manually! + +package v1beta1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + reflect "reflect" +) + +func init() { + SchemeBuilder.Register(RegisterDeepCopies) +} + +// RegisterDeepCopies adds deep-copy functions to the given scheme. Public +// to allow building arbitrary schemes. +func RegisterDeepCopies(scheme *runtime.Scheme) error { + return scheme.AddGeneratedDeepCopyFuncs( + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ClusterRole, InType: reflect.TypeOf(&ClusterRole{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ClusterRoleBinding, InType: reflect.TypeOf(&ClusterRoleBinding{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ClusterRoleBindingList, InType: reflect.TypeOf(&ClusterRoleBindingList{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ClusterRoleList, InType: reflect.TypeOf(&ClusterRoleList{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_PolicyRule, InType: reflect.TypeOf(&PolicyRule{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_Role, InType: reflect.TypeOf(&Role{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_RoleBinding, InType: reflect.TypeOf(&RoleBinding{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_RoleBindingList, InType: reflect.TypeOf(&RoleBindingList{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_RoleList, InType: reflect.TypeOf(&RoleList{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_RoleRef, InType: reflect.TypeOf(&RoleRef{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_Subject, InType: reflect.TypeOf(&Subject{})}, + ) +} + +func DeepCopy_v1beta1_ClusterRole(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*ClusterRole) + out := out.(*ClusterRole) + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { + return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) + } + if in.Rules != nil { + in, out := &in.Rules, &out.Rules + *out = make([]PolicyRule, len(*in)) + for i := range *in { + if err := DeepCopy_v1beta1_PolicyRule(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } + } + return nil + } +} + +func DeepCopy_v1beta1_ClusterRoleBinding(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*ClusterRoleBinding) + out := out.(*ClusterRoleBinding) + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { + return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) + } + if in.Subjects != nil { + in, out := &in.Subjects, &out.Subjects + *out = make([]Subject, len(*in)) + copy(*out, *in) + } + return nil + } +} + +func DeepCopy_v1beta1_ClusterRoleBindingList(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*ClusterRoleBindingList) + out := out.(*ClusterRoleBindingList) + *out = *in + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ClusterRoleBinding, len(*in)) + for i := range *in { + if err := DeepCopy_v1beta1_ClusterRoleBinding(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } + } + return nil + } +} + +func DeepCopy_v1beta1_ClusterRoleList(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*ClusterRoleList) + out := out.(*ClusterRoleList) + *out = *in + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ClusterRole, len(*in)) + for i := range *in { + if err := DeepCopy_v1beta1_ClusterRole(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } + } + return nil + } +} + +func DeepCopy_v1beta1_PolicyRule(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*PolicyRule) + out := out.(*PolicyRule) + *out = *in + if in.Verbs != nil { + in, out := &in.Verbs, &out.Verbs + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.APIGroups != nil { + in, out := &in.APIGroups, &out.APIGroups + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Resources != nil { + in, out := &in.Resources, &out.Resources + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.ResourceNames != nil { + in, out := &in.ResourceNames, &out.ResourceNames + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.NonResourceURLs != nil { + in, out := &in.NonResourceURLs, &out.NonResourceURLs + *out = make([]string, len(*in)) + copy(*out, *in) + } + return nil + } +} + +func DeepCopy_v1beta1_Role(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*Role) + out := out.(*Role) + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { + return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) + } + if in.Rules != nil { + in, out := &in.Rules, &out.Rules + *out = make([]PolicyRule, len(*in)) + for i := range *in { + if err := DeepCopy_v1beta1_PolicyRule(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } + } + return nil + } +} + +func DeepCopy_v1beta1_RoleBinding(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*RoleBinding) + out := out.(*RoleBinding) + *out = *in + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { + return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) + } + if in.Subjects != nil { + in, out := &in.Subjects, &out.Subjects + *out = make([]Subject, len(*in)) + copy(*out, *in) + } + return nil + } +} + +func DeepCopy_v1beta1_RoleBindingList(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*RoleBindingList) + out := out.(*RoleBindingList) + *out = *in + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]RoleBinding, len(*in)) + for i := range *in { + if err := DeepCopy_v1beta1_RoleBinding(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } + } + return nil + } +} + +func DeepCopy_v1beta1_RoleList(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*RoleList) + out := out.(*RoleList) + *out = *in + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Role, len(*in)) + for i := range *in { + if err := DeepCopy_v1beta1_Role(&(*in)[i], &(*out)[i], c); err != nil { + return err + } + } + } + return nil + } +} + +func DeepCopy_v1beta1_RoleRef(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*RoleRef) + out := out.(*RoleRef) + *out = *in + return nil + } +} + +func DeepCopy_v1beta1_Subject(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*Subject) + out := out.(*Subject) + *out = *in + return nil + } +} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1beta1/zz_generated.defaults.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1beta1/zz_generated.defaults.go new file mode 100644 index 00000000..2529a633 --- /dev/null +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/v1beta1/zz_generated.defaults.go @@ -0,0 +1,58 @@ +// +build !ignore_autogenerated + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was autogenerated by defaulter-gen. Do not edit it manually! + +package v1beta1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + scheme.AddTypeDefaultingFunc(&ClusterRoleBinding{}, func(obj interface{}) { SetObjectDefaults_ClusterRoleBinding(obj.(*ClusterRoleBinding)) }) + scheme.AddTypeDefaultingFunc(&ClusterRoleBindingList{}, func(obj interface{}) { SetObjectDefaults_ClusterRoleBindingList(obj.(*ClusterRoleBindingList)) }) + scheme.AddTypeDefaultingFunc(&RoleBinding{}, func(obj interface{}) { SetObjectDefaults_RoleBinding(obj.(*RoleBinding)) }) + scheme.AddTypeDefaultingFunc(&RoleBindingList{}, func(obj interface{}) { SetObjectDefaults_RoleBindingList(obj.(*RoleBindingList)) }) + return nil +} + +func SetObjectDefaults_ClusterRoleBinding(in *ClusterRoleBinding) { + SetDefaults_ClusterRoleBinding(in) +} + +func SetObjectDefaults_ClusterRoleBindingList(in *ClusterRoleBindingList) { + for i := range in.Items { + a := &in.Items[i] + SetObjectDefaults_ClusterRoleBinding(a) + } +} + +func SetObjectDefaults_RoleBinding(in *RoleBinding) { + SetDefaults_RoleBinding(in) +} + +func SetObjectDefaults_RoleBindingList(in *RoleBindingList) { + for i := range in.Items { + a := &in.Items[i] + SetObjectDefaults_RoleBinding(a) + } +} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/zz_generated.deepcopy.go index 36400c6f..db5d08cd 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/rbac/zz_generated.deepcopy.go @@ -21,9 +21,9 @@ limitations under the License. package rbac import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - api "k8s.io/client-go/pkg/api" reflect "reflect" ) @@ -54,8 +54,10 @@ func DeepCopy_rbac_ClusterRole(in interface{}, out interface{}, c *conversion.Cl in := in.(*ClusterRole) out := out.(*ClusterRole) *out = *in - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.Rules != nil { in, out := &in.Rules, &out.Rules @@ -75,15 +77,15 @@ func DeepCopy_rbac_ClusterRoleBinding(in interface{}, out interface{}, c *conver in := in.(*ClusterRoleBinding) out := out.(*ClusterRoleBinding) *out = *in - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.Subjects != nil { in, out := &in.Subjects, &out.Subjects *out = make([]Subject, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } @@ -135,14 +137,6 @@ func DeepCopy_rbac_PolicyRule(in interface{}, out interface{}, c *conversion.Clo *out = make([]string, len(*in)) copy(*out, *in) } - // in.AttributeRestrictions is kind 'Interface' - if in.AttributeRestrictions != nil { - if newVal, err := c.DeepCopy(&in.AttributeRestrictions); err != nil { - return err - } else { - out.AttributeRestrictions = *newVal.(*runtime.Object) - } - } if in.APIGroups != nil { in, out := &in.APIGroups, &out.APIGroups *out = make([]string, len(*in)) @@ -172,8 +166,10 @@ func DeepCopy_rbac_Role(in interface{}, out interface{}, c *conversion.Cloner) e in := in.(*Role) out := out.(*Role) *out = *in - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.Rules != nil { in, out := &in.Rules, &out.Rules @@ -193,15 +189,15 @@ func DeepCopy_rbac_RoleBinding(in interface{}, out interface{}, c *conversion.Cl in := in.(*RoleBinding) out := out.(*RoleBinding) *out = *in - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.Subjects != nil { in, out := &in.Subjects, &out.Subjects *out = make([]Subject, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } return nil } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/storage/install/install.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/storage/install/install.go index ef28f6ed..907e3faf 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/storage/install/install.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/storage/install/install.go @@ -19,13 +19,21 @@ limitations under the License. package install import ( + "k8s.io/apimachinery/pkg/apimachinery/announced" + "k8s.io/apimachinery/pkg/apimachinery/registered" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/client-go/pkg/apimachinery/announced" + "k8s.io/client-go/pkg/api" "k8s.io/client-go/pkg/apis/storage" "k8s.io/client-go/pkg/apis/storage/v1beta1" ) func init() { + Install(api.GroupFactoryRegistry, api.Registry, api.Scheme) +} + +// Install registers the API group and adds types to a scheme +func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) { if err := announced.NewGroupMetaFactory( &announced.GroupMetaFactoryArgs{ GroupName: storage.GroupName, @@ -37,7 +45,7 @@ func init() { announced.VersionToSchemeFunc{ v1beta1.SchemeGroupVersion.Version: v1beta1.AddToScheme, }, - ).Announce().RegisterAndEnable(); err != nil { + ).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil { panic(err) } } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/storage/register.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/storage/register.go index 003f3f8c..65171364 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/storage/register.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/storage/register.go @@ -46,7 +46,6 @@ var ( func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, - &api.ListOptions{}, &api.DeleteOptions{}, &metav1.ExportOptions{}, &metav1.GetOptions{}, diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/storage/types.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/storage/types.go index 0efa0abc..3d589de5 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/storage/types.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/storage/types.go @@ -16,10 +16,7 @@ limitations under the License. package storage -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/client-go/pkg/api" -) +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" // +genclient=true // +nonNamespaced=true @@ -33,7 +30,7 @@ import ( type StorageClass struct { metav1.TypeMeta // +optional - api.ObjectMeta + metav1.ObjectMeta // provisioner is the driver expected to handle this StorageClass. // This is an optionally-prefixed name, like a label key. diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/storage/v1beta1/generated.pb.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/storage/v1beta1/generated.pb.go index 46206fa8..fb84125f 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/storage/v1beta1/generated.pb.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/storage/v1beta1/generated.pb.go @@ -233,7 +233,7 @@ func (this *StorageClass) String() string { } mapStringForParameters += "}" s := strings.Join([]string{`&StorageClass{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Provisioner:` + fmt.Sprintf("%v", this.Provisioner) + `,`, `Parameters:` + mapStringForParameters + `,`, `}`, @@ -696,36 +696,36 @@ var ( ) var fileDescriptorGenerated = []byte{ - // 483 bytes of a gzipped FileDescriptorProto + // 481 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x9c, 0x92, 0xcf, 0x8b, 0xd3, 0x40, 0x14, 0xc7, 0x93, 0x96, 0xe2, 0xee, 0x54, 0xb1, 0x44, 0x0f, 0xa5, 0x87, 0x6c, 0xd9, 0x53, 0x15, - 0x9d, 0xa1, 0x45, 0xa5, 0x2c, 0x78, 0xa9, 0x08, 0x0a, 0x8a, 0x4b, 0xbc, 0x88, 0xe8, 0x61, 0x92, - 0x7d, 0xa6, 0x63, 0x9a, 0x4c, 0x98, 0x79, 0x09, 0x14, 0x3c, 0xf8, 0x27, 0xf8, 0x67, 0xf5, 0xe6, - 0x1e, 0x3d, 0xc8, 0x62, 0xe3, 0x3f, 0x22, 0xf9, 0xb1, 0x9b, 0xb0, 0x69, 0x51, 0xbc, 0xe5, 0xcd, - 0xbc, 0xcf, 0xf7, 0xbd, 0xef, 0x37, 0x43, 0x4e, 0x82, 0xb9, 0xa6, 0x42, 0xb2, 0x20, 0x71, 0x41, - 0x45, 0x80, 0xa0, 0x59, 0x1c, 0xf8, 0x8c, 0xc7, 0x42, 0x33, 0x8d, 0x52, 0x71, 0x1f, 0x58, 0x3a, - 0x75, 0x01, 0xf9, 0x94, 0xf9, 0x10, 0x81, 0xe2, 0x08, 0x67, 0x34, 0x56, 0x12, 0xa5, 0x75, 0xbf, - 0x64, 0x69, 0xcd, 0xd2, 0x38, 0xf0, 0x69, 0xce, 0xd2, 0x8a, 0xa5, 0x15, 0x3b, 0x7a, 0xe8, 0x0b, - 0x5c, 0x26, 0x2e, 0xf5, 0x64, 0xc8, 0x7c, 0xe9, 0x4b, 0x56, 0x48, 0xb8, 0xc9, 0xa7, 0xa2, 0x2a, - 0x8a, 0xe2, 0xab, 0x94, 0x1e, 0x3d, 0xaa, 0xd6, 0xe2, 0xb1, 0x08, 0xb9, 0xb7, 0x14, 0x11, 0xa8, - 0x75, 0xbd, 0x58, 0x08, 0xc8, 0x59, 0xda, 0x5a, 0x68, 0xc4, 0xf6, 0x51, 0x2a, 0x89, 0x50, 0x84, - 0xd0, 0x02, 0x9e, 0xfc, 0x0d, 0xd0, 0xde, 0x12, 0x42, 0xde, 0xe2, 0x66, 0x7b, 0x53, 0x63, 0x0a, - 0xb4, 0x4c, 0x94, 0xd7, 0x9e, 0xf5, 0x60, 0x3f, 0xb3, 0xc3, 0xca, 0x74, 0x77, 0x77, 0x82, 0x62, - 0xc5, 0x44, 0x84, 0x1a, 0xd5, 0x75, 0xe4, 0xf8, 0x67, 0x87, 0xdc, 0x7c, 0x5b, 0xc6, 0xfe, 0x6c, - 0xc5, 0xb5, 0xb6, 0xde, 0x91, 0x83, 0x3c, 0xa9, 0x33, 0x8e, 0x7c, 0x68, 0x8e, 0xcd, 0x49, 0x7f, - 0x36, 0xa1, 0x7b, 0x7f, 0x19, 0x4d, 0xa7, 0xf4, 0x8d, 0xfb, 0x19, 0x3c, 0x7c, 0x0d, 0xc8, 0x17, - 0xd6, 0xe6, 0xe2, 0xc8, 0xc8, 0x2e, 0x8e, 0x48, 0x7d, 0xe6, 0x5c, 0xa9, 0x59, 0x8f, 0x49, 0x3f, - 0x56, 0x32, 0x15, 0x5a, 0xc8, 0x08, 0xd4, 0xb0, 0x33, 0x36, 0x27, 0x87, 0x8b, 0x3b, 0x15, 0xd2, - 0x3f, 0xad, 0xaf, 0x9c, 0x66, 0x9f, 0xf5, 0x85, 0x90, 0x98, 0x2b, 0x1e, 0x02, 0x82, 0xd2, 0xc3, - 0xee, 0xb8, 0x3b, 0xe9, 0xcf, 0x5e, 0xd0, 0x7f, 0x7f, 0x45, 0xb4, 0x69, 0x8f, 0x9e, 0x5e, 0x49, - 0x3d, 0x8f, 0x50, 0xad, 0xeb, 0x95, 0xeb, 0x0b, 0xa7, 0x31, 0x6f, 0xf4, 0x94, 0xdc, 0xbe, 0x86, - 0x58, 0x03, 0xd2, 0x0d, 0x60, 0x5d, 0x84, 0x73, 0xe8, 0xe4, 0x9f, 0xd6, 0x5d, 0xd2, 0x4b, 0xf9, - 0x2a, 0x81, 0xd2, 0x93, 0x53, 0x16, 0x27, 0x9d, 0xb9, 0x79, 0xfc, 0xdd, 0x24, 0x83, 0xe6, 0xfc, - 0x57, 0x42, 0xa3, 0xf5, 0xa1, 0x15, 0x31, 0xbd, 0xf4, 0xd3, 0x7c, 0x53, 0xb5, 0xa3, 0xbc, 0x3b, - 0x8f, 0x3a, 0xa7, 0x8b, 0xa0, 0x07, 0xd5, 0xd6, 0x07, 0x97, 0x27, 0x8d, 0x98, 0x3f, 0x92, 0x9e, - 0x40, 0x08, 0xf5, 0xb0, 0x53, 0x44, 0x35, 0xff, 0xdf, 0xa8, 0x16, 0xb7, 0xaa, 0x21, 0xbd, 0x97, - 0xb9, 0x9c, 0x53, 0xaa, 0x2e, 0xee, 0x6d, 0xb6, 0xb6, 0x71, 0xbe, 0xb5, 0x8d, 0x1f, 0x5b, 0xdb, - 0xf8, 0x9a, 0xd9, 0xe6, 0x26, 0xb3, 0xcd, 0xf3, 0xcc, 0x36, 0x7f, 0x65, 0xb6, 0xf9, 0xed, 0xb7, - 0x6d, 0xbc, 0xbf, 0x51, 0xa9, 0xfd, 0x09, 0x00, 0x00, 0xff, 0xff, 0x7c, 0x5e, 0x19, 0x8e, 0x27, - 0x04, 0x00, 0x00, + 0x9d, 0xb1, 0x45, 0xa5, 0x2c, 0x78, 0xa9, 0x08, 0x0a, 0x8a, 0x4b, 0xbc, 0x89, 0x82, 0x93, 0xec, + 0x33, 0x1d, 0xd3, 0x64, 0xc2, 0xcc, 0x4b, 0xa0, 0xe0, 0xc1, 0x3f, 0xc1, 0x3f, 0xab, 0x37, 0xf7, + 0xe8, 0x69, 0xb1, 0xd1, 0x3f, 0x44, 0xf2, 0xc3, 0x4d, 0xd8, 0x6c, 0x71, 0xd9, 0x5b, 0xde, 0xcc, + 0xfb, 0x7c, 0xdf, 0xf7, 0x7d, 0x27, 0xe4, 0x28, 0x98, 0x6b, 0x2a, 0x24, 0x0b, 0x12, 0x17, 0x54, + 0x04, 0x08, 0x9a, 0xc5, 0x81, 0xcf, 0x78, 0x2c, 0x34, 0xd3, 0x28, 0x15, 0xf7, 0x81, 0xa5, 0x53, + 0x17, 0x90, 0x4f, 0x99, 0x0f, 0x11, 0x28, 0x8e, 0x70, 0x42, 0x63, 0x25, 0x51, 0x5a, 0xf7, 0x4b, + 0x96, 0xd6, 0x2c, 0x8d, 0x03, 0x9f, 0xe6, 0x2c, 0xad, 0x58, 0x5a, 0xb1, 0xa3, 0x87, 0xbe, 0xc0, + 0x65, 0xe2, 0x52, 0x4f, 0x86, 0xcc, 0x97, 0xbe, 0x64, 0x85, 0x84, 0x9b, 0x7c, 0x2e, 0xaa, 0xa2, + 0x28, 0xbe, 0x4a, 0xe9, 0xd1, 0xe3, 0xca, 0x16, 0x8f, 0x45, 0xc8, 0xbd, 0xa5, 0x88, 0x40, 0xad, + 0x6b, 0x63, 0x21, 0x20, 0x67, 0x69, 0xcb, 0xd0, 0x88, 0xed, 0xa2, 0x54, 0x12, 0xa1, 0x08, 0xa1, + 0x05, 0x3c, 0xfd, 0x1f, 0xa0, 0xbd, 0x25, 0x84, 0xbc, 0xc5, 0xcd, 0x76, 0xa6, 0xc6, 0x14, 0x68, + 0x99, 0x28, 0xaf, 0x3d, 0xeb, 0xc1, 0x6e, 0xe6, 0x92, 0x55, 0xa6, 0x97, 0x77, 0x27, 0x28, 0x56, + 0x4c, 0x44, 0xa8, 0x51, 0x5d, 0x44, 0x0e, 0xff, 0x74, 0xc8, 0xcd, 0x77, 0x65, 0xec, 0xcf, 0x57, + 0x5c, 0x6b, 0xeb, 0x13, 0xd9, 0xcb, 0x93, 0x3a, 0xe1, 0xc8, 0x87, 0xe6, 0xd8, 0x9c, 0xf4, 0x67, + 0x8f, 0x68, 0xf5, 0x64, 0xcd, 0x85, 0xeb, 0x47, 0xcb, 0xbb, 0x69, 0x3a, 0xa5, 0x6f, 0xdd, 0x2f, + 0xe0, 0xe1, 0x1b, 0x40, 0xbe, 0xb0, 0x36, 0x67, 0x07, 0x46, 0x76, 0x76, 0x40, 0xea, 0x33, 0xe7, + 0x5c, 0xd5, 0x7a, 0x42, 0xfa, 0xb1, 0x92, 0xa9, 0xd0, 0x42, 0x46, 0xa0, 0x86, 0x9d, 0xb1, 0x39, + 0xd9, 0x5f, 0xdc, 0xa9, 0x90, 0xfe, 0x71, 0x7d, 0xe5, 0x34, 0xfb, 0xac, 0xaf, 0x84, 0xc4, 0x5c, + 0xf1, 0x10, 0x10, 0x94, 0x1e, 0x76, 0xc7, 0xdd, 0x49, 0x7f, 0xf6, 0x92, 0x5e, 0xfd, 0x6f, 0xa2, + 0xcd, 0x35, 0xe9, 0xf1, 0xb9, 0xd4, 0x8b, 0x08, 0xd5, 0xba, 0xb6, 0x5c, 0x5f, 0x38, 0x8d, 0x79, + 0xa3, 0x67, 0xe4, 0xf6, 0x05, 0xc4, 0x1a, 0x90, 0x6e, 0x00, 0xeb, 0x22, 0xa4, 0x7d, 0x27, 0xff, + 0xb4, 0xee, 0x92, 0x5e, 0xca, 0x57, 0x09, 0x94, 0x3b, 0x39, 0x65, 0x71, 0xd4, 0x99, 0x9b, 0x87, + 0x3f, 0x4c, 0x32, 0x68, 0xce, 0x7f, 0x2d, 0x34, 0x5a, 0x1f, 0x5a, 0x51, 0xd3, 0xab, 0x45, 0x9d, + 0xd3, 0x45, 0xd0, 0x83, 0xca, 0xf5, 0xde, 0xbf, 0x93, 0x46, 0xcc, 0x1f, 0x49, 0x4f, 0x20, 0x84, + 0x7a, 0xd8, 0x29, 0xa2, 0x9a, 0x5f, 0x37, 0xaa, 0xc5, 0xad, 0x6a, 0x48, 0xef, 0x55, 0x2e, 0xe7, + 0x94, 0xaa, 0x8b, 0x7b, 0x9b, 0xad, 0x6d, 0x9c, 0x6e, 0x6d, 0xe3, 0xe7, 0xd6, 0x36, 0xbe, 0x65, + 0xb6, 0xb9, 0xc9, 0x6c, 0xf3, 0x34, 0xb3, 0xcd, 0x5f, 0x99, 0x6d, 0x7e, 0xff, 0x6d, 0x1b, 0xef, + 0x6f, 0x54, 0x6a, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xfe, 0xb6, 0x02, 0x5f, 0x2f, 0x04, 0x00, + 0x00, } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/storage/v1beta1/generated.proto b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/storage/v1beta1/generated.proto index 6b3c7b84..8c89490b 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/storage/v1beta1/generated.proto +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/storage/v1beta1/generated.proto @@ -40,7 +40,7 @@ message StorageClass { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Provisioner indicates the type of the provisioner. optional string provisioner = 2; diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/storage/v1beta1/register.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/storage/v1beta1/register.go index 122fc92a..6e87105c 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/storage/v1beta1/register.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/storage/v1beta1/register.go @@ -42,7 +42,6 @@ var ( // Adds the list of known types to api.Scheme. func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, - &v1.ListOptions{}, &v1.DeleteOptions{}, &metav1.ExportOptions{}, &metav1.GetOptions{}, diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/storage/v1beta1/types.generated.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/storage/v1beta1/types.generated.go index 59533ac8..ddc516b2 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/storage/v1beta1/types.generated.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/storage/v1beta1/types.generated.go @@ -26,8 +26,7 @@ import ( "fmt" codec1978 "github.com/ugorji/go/codec" pkg1_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - pkg3_types "k8s.io/apimachinery/pkg/types" - pkg2_v1 "k8s.io/client-go/pkg/api/v1" + pkg2_types "k8s.io/apimachinery/pkg/types" "reflect" "runtime" time "time" @@ -64,10 +63,9 @@ func init() { } if false { // reference the types, but skip this branch at build/run time var v0 pkg1_v1.TypeMeta - var v1 pkg3_types.UID - var v2 pkg2_v1.ObjectMeta - var v3 time.Time - _, _, _, _ = v0, v1, v2, v3 + var v1 pkg2_types.UID + var v2 time.Time + _, _, _ = v0, v1, v2 } } @@ -159,7 +157,13 @@ func (x *StorageClass) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -169,7 +173,13 @@ func (x *StorageClass) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -311,33 +321,39 @@ func (x *StorageClass) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "provisioner": if r.TryDecodeAsNil() { x.Provisioner = "" } else { - yyv9 := &x.Provisioner - yym10 := z.DecBinary() - _ = yym10 + yyv10 := &x.Provisioner + yym11 := z.DecBinary() + _ = yym11 if false { } else { - *((*string)(yyv9)) = r.DecodeString() + *((*string)(yyv10)) = r.DecodeString() } } case "parameters": if r.TryDecodeAsNil() { x.Parameters = nil } else { - yyv11 := &x.Parameters - yym12 := z.DecBinary() - _ = yym12 + yyv12 := &x.Parameters + yym13 := z.DecBinary() + _ = yym13 if false { } else { - z.F.DecMapStringStringX(yyv11, false, d) + z.F.DecMapStringStringX(yyv12, false, d) } } default: @@ -351,16 +367,16 @@ func (x *StorageClass) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj13 int - var yyb13 bool - var yyhl13 bool = l >= 0 - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + var yyj14 int + var yyb14 bool + var yyhl14 bool = l >= 0 + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -368,21 +384,21 @@ func (x *StorageClass) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv14 := &x.Kind - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.Kind + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -390,38 +406,44 @@ func (x *StorageClass) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv16 := &x.APIVersion - yym17 := z.DecBinary() - _ = yym17 + yyv17 := &x.APIVersion + yym18 := z.DecBinary() + _ = yym18 if false { } else { - *((*string)(yyv16)) = r.DecodeString() + *((*string)(yyv17)) = r.DecodeString() } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg2_v1.ObjectMeta{} + x.ObjectMeta = pkg1_v1.ObjectMeta{} } else { - yyv18 := &x.ObjectMeta - yyv18.CodecDecodeSelf(d) + yyv19 := &x.ObjectMeta + yym20 := z.DecBinary() + _ = yym20 + if false { + } else if z.HasExtensions() && z.DecExt(yyv19) { + } else { + z.DecFallback(yyv19, false) + } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -429,21 +451,21 @@ func (x *StorageClass) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Provisioner = "" } else { - yyv19 := &x.Provisioner - yym20 := z.DecBinary() - _ = yym20 + yyv21 := &x.Provisioner + yym22 := z.DecBinary() + _ = yym22 if false { } else { - *((*string)(yyv19)) = r.DecodeString() + *((*string)(yyv21)) = r.DecodeString() } } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -451,26 +473,26 @@ func (x *StorageClass) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Parameters = nil } else { - yyv21 := &x.Parameters - yym22 := z.DecBinary() - _ = yym22 + yyv23 := &x.Parameters + yym24 := z.DecBinary() + _ = yym24 if false { } else { - z.F.DecMapStringStringX(yyv21, false, d) + z.F.DecMapStringStringX(yyv23, false, d) } } for { - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l } else { - yyb13 = r.CheckBreak() + yyb14 = r.CheckBreak() } - if yyb13 { + if yyb14 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj13-1, "") + z.DecStructFieldNotFound(yyj14-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/storage/v1beta1/types.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/storage/v1beta1/types.go index 1d66db09..afbd5bcd 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/storage/v1beta1/types.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/storage/v1beta1/types.go @@ -18,7 +18,6 @@ package v1beta1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/client-go/pkg/api/v1" ) // +genclient=true @@ -34,7 +33,7 @@ type StorageClass struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Provisioner indicates the type of the provisioner. Provisioner string `json:"provisioner" protobuf:"bytes,2,opt,name=provisioner"` diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/storage/v1beta1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/storage/v1beta1/zz_generated.conversion.go index 42056baf..867a528d 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/storage/v1beta1/zz_generated.conversion.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/storage/v1beta1/zz_generated.conversion.go @@ -43,10 +43,7 @@ func RegisterConversions(scheme *runtime.Scheme) error { } func autoConvert_v1beta1_StorageClass_To_storage_StorageClass(in *StorageClass, out *storage.StorageClass, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.Provisioner = in.Provisioner out.Parameters = *(*map[string]string)(unsafe.Pointer(&in.Parameters)) return nil @@ -57,10 +54,7 @@ func Convert_v1beta1_StorageClass_To_storage_StorageClass(in *StorageClass, out } func autoConvert_storage_StorageClass_To_v1beta1_StorageClass(in *storage.StorageClass, out *StorageClass, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta out.Provisioner = in.Provisioner out.Parameters = *(*map[string]string)(unsafe.Pointer(&in.Parameters)) return nil diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/storage/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/storage/v1beta1/zz_generated.deepcopy.go index 55726243..f2ea4f2f 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/storage/v1beta1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/storage/v1beta1/zz_generated.deepcopy.go @@ -21,9 +21,9 @@ limitations under the License. package v1beta1 import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - v1 "k8s.io/client-go/pkg/api/v1" reflect "reflect" ) @@ -45,8 +45,10 @@ func DeepCopy_v1beta1_StorageClass(in interface{}, out interface{}, c *conversio in := in.(*StorageClass) out := out.(*StorageClass) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.Parameters != nil { in, out := &in.Parameters, &out.Parameters diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/storage/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/storage/zz_generated.deepcopy.go index b4e5ec3d..2ef9f176 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/storage/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/apis/storage/zz_generated.deepcopy.go @@ -21,9 +21,9 @@ limitations under the License. package storage import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - api "k8s.io/client-go/pkg/api" reflect "reflect" ) @@ -45,8 +45,10 @@ func DeepCopy_storage_StorageClass(in interface{}, out interface{}, c *conversio in := in.(*StorageClass) out := out.(*StorageClass) *out = *in - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if in.Parameters != nil { in, out := &in.Parameters, &out.Parameters diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/federation/apis/federation/install/install.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/federation/apis/federation/install/install.go index bffc2a62..2590d2eb 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/federation/apis/federation/install/install.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/federation/apis/federation/install/install.go @@ -92,7 +92,7 @@ func newRESTMapper(externalVersions []schema.GroupVersion) meta.RESTMapper { ignoredKinds := sets.NewString() - return api.NewDefaultRESTMapper(externalVersions, interfacesFor, importPrefix, ignoredKinds, rootScoped) + return meta.NewDefaultRESTMapperFromScheme(externalVersions, interfacesFor, importPrefix, ignoredKinds, rootScoped, api.Scheme) } // interfacesFor returns the default Codec and ResourceVersioner for a given version diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/federation/apis/federation/register.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/federation/apis/federation/register.go index 34e24bd5..d8122aff 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/federation/apis/federation/register.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/federation/apis/federation/register.go @@ -47,7 +47,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &Cluster{}, &ClusterList{}, - &api.ListOptions{}, &api.DeleteOptions{}, ) return nil diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/federation/apis/federation/types.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/federation/apis/federation/types.go index 51f7bbbd..c778ab3d 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/federation/apis/federation/types.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/federation/apis/federation/types.go @@ -99,7 +99,7 @@ type Cluster struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - api.ObjectMeta + metav1.ObjectMeta // Spec defines the behavior of the Cluster. // +optional diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/federation/apis/federation/v1beta1/generated.pb.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/federation/apis/federation/v1beta1/generated.pb.go index bd7b390a..2c0affa1 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/federation/apis/federation/v1beta1/generated.pb.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/federation/apis/federation/v1beta1/generated.pb.go @@ -468,7 +468,7 @@ func (this *Cluster) String() string { return "nil" } s := strings.Join([]string{`&Cluster{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_kubernetes_pkg_api_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ClusterSpec", "ClusterSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ClusterStatus", "ClusterStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -1487,56 +1487,56 @@ var ( ) var fileDescriptorGenerated = []byte{ - // 806 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xa4, 0x54, 0xcd, 0x6a, 0xeb, 0x46, - 0x14, 0xb6, 0xfc, 0x7b, 0x3d, 0xa9, 0xdb, 0xcb, 0xd0, 0x82, 0xeb, 0x85, 0x7c, 0x31, 0xa5, 0xf8, - 0x96, 0x56, 0xc2, 0xa6, 0x94, 0x0b, 0xa5, 0x85, 0x2b, 0x5f, 0x0a, 0x01, 0x87, 0x94, 0x49, 0x28, - 0x25, 0x14, 0x8a, 0x2c, 0x1f, 0x2b, 0xaa, 0xad, 0x1f, 0x66, 0x46, 0x06, 0x67, 0xd5, 0x07, 0xe8, - 0xa2, 0x0f, 0xd1, 0x37, 0x28, 0x7d, 0x87, 0xec, 0x9a, 0x45, 0x17, 0x59, 0x99, 0xc6, 0x7d, 0x8b, - 0xac, 0xca, 0x8c, 0x46, 0xb2, 0x15, 0xc5, 0x69, 0x6f, 0xb2, 0xd3, 0x39, 0x3a, 0xe7, 0xfb, 0xbe, - 0x39, 0x7f, 0xe8, 0xcd, 0xfc, 0x15, 0x33, 0xbc, 0xd0, 0x9c, 0xc7, 0x13, 0xa0, 0x01, 0x70, 0x60, - 0xe6, 0x0c, 0xa6, 0x40, 0x6d, 0xee, 0x85, 0x81, 0x69, 0x47, 0x5e, 0xce, 0x5e, 0x0e, 0x26, 0xc0, - 0xed, 0x81, 0xe9, 0x42, 0x20, 0x5c, 0x30, 0x35, 0x22, 0x1a, 0xf2, 0x10, 0x7f, 0x9e, 0xa0, 0x18, - 0x5b, 0x14, 0x63, 0x9b, 0x65, 0x08, 0x94, 0x5d, 0x5b, 0xa1, 0x74, 0x3e, 0x73, 0x3d, 0x7e, 0x1e, - 0x4f, 0x0c, 0x27, 0xf4, 0x4d, 0x37, 0x74, 0x43, 0x53, 0x82, 0x4d, 0xe2, 0x99, 0xb4, 0xa4, 0x21, - 0xbf, 0x12, 0x92, 0x8e, 0x22, 0x11, 0xa2, 0x7c, 0xdb, 0x39, 0xf7, 0x02, 0xa0, 0x2b, 0x33, 0x9a, - 0xbb, 0x89, 0x4a, 0x1f, 0xb8, 0x6d, 0x2e, 0x0b, 0xd2, 0x3a, 0xe6, 0xbe, 0x2c, 0x1a, 0x07, 0xdc, - 0xf3, 0xa1, 0x90, 0xf0, 0xc5, 0x7f, 0x25, 0x30, 0xe7, 0x1c, 0x7c, 0xbb, 0x90, 0x37, 0x2c, 0x56, - 0x52, 0x89, 0x33, 0x29, 0xb0, 0x30, 0xa6, 0x4e, 0x91, 0xeb, 0xd3, 0xfd, 0x39, 0xf7, 0x3c, 0x65, - 0x70, 0x7f, 0x74, 0xcc, 0xbd, 0x85, 0xe9, 0x05, 0x9c, 0x71, 0x7a, 0x37, 0xa5, 0xf7, 0x47, 0x19, - 0x35, 0x46, 0x8b, 0x98, 0x71, 0xa0, 0xf8, 0x7b, 0xf4, 0x4c, 0x14, 0x69, 0x6a, 0x73, 0xbb, 0xad, - 0xbd, 0xd0, 0xfa, 0x07, 0xc3, 0xbe, 0x51, 0xec, 0x5b, 0x34, 0x77, 0x45, 0xc3, 0x8c, 0xe5, 0xc0, - 0x38, 0x9e, 0xfc, 0x04, 0x0e, 0x3f, 0x02, 0x6e, 0x5b, 0xf8, 0x72, 0xdd, 0x2d, 0x6d, 0xd6, 0x5d, - 0xb4, 0xf5, 0x91, 0x0c, 0x0d, 0x3b, 0xa8, 0xca, 0x22, 0x70, 0xda, 0x65, 0x89, 0xfa, 0xda, 0x78, - 0xcc, 0x34, 0x18, 0x4a, 0xe6, 0x49, 0x04, 0x8e, 0xf5, 0x8e, 0xa2, 0xab, 0x0a, 0x8b, 0x48, 0x70, - 0x3c, 0x47, 0x75, 0xc6, 0x6d, 0x1e, 0xb3, 0x76, 0x45, 0xd2, 0x8c, 0x9e, 0x46, 0x23, 0xa1, 0xac, - 0x77, 0x15, 0x51, 0x3d, 0xb1, 0x89, 0xa2, 0xe8, 0x5d, 0x57, 0xd0, 0x73, 0x15, 0x39, 0x0a, 0x83, - 0xa9, 0x27, 0x20, 0xf0, 0x2b, 0x54, 0xe5, 0xab, 0x08, 0x64, 0xf1, 0x9a, 0xd6, 0x47, 0xa9, 0xc6, - 0xd3, 0x55, 0x04, 0xb7, 0xeb, 0xee, 0xfb, 0x77, 0xe3, 0x85, 0x9f, 0xc8, 0x0c, 0xfc, 0x5d, 0xa6, - 0xbd, 0x2c, 0x73, 0xbf, 0xce, 0xd3, 0xde, 0xae, 0xbb, 0x0f, 0x4e, 0x82, 0x91, 0x61, 0xe6, 0x65, - 0x62, 0x17, 0xb5, 0x16, 0x36, 0xe3, 0xdf, 0xd2, 0x70, 0x02, 0xa7, 0x9e, 0x0f, 0xaa, 0x34, 0x9f, - 0xa4, 0xa5, 0xd9, 0x9d, 0xe1, 0xb4, 0xb3, 0xcc, 0x10, 0x7d, 0x13, 0xfd, 0x15, 0x19, 0xd6, 0x07, - 0x4a, 0x4a, 0x6b, 0xbc, 0x0b, 0x44, 0xf2, 0xb8, 0x78, 0x89, 0xb0, 0x70, 0x9c, 0x52, 0x3b, 0x60, - 0xc9, 0xe3, 0x04, 0x5b, 0xf5, 0xad, 0xd9, 0x3a, 0x8a, 0x0d, 0x8f, 0x0b, 0x68, 0xe4, 0x1e, 0x06, - 0xfc, 0x31, 0xaa, 0x53, 0xb0, 0x59, 0x18, 0xb4, 0x6b, 0xb2, 0x70, 0x59, 0xbf, 0x88, 0xf4, 0x12, - 0xf5, 0x17, 0xbf, 0x44, 0x0d, 0x1f, 0x18, 0xb3, 0x5d, 0x68, 0xd7, 0x65, 0xe0, 0x7b, 0x2a, 0xb0, - 0x71, 0x94, 0xb8, 0x49, 0xfa, 0xbf, 0xf7, 0xa7, 0x86, 0x0e, 0x54, 0xab, 0xc6, 0x1e, 0xe3, 0xf8, - 0x87, 0xc2, 0x5a, 0x18, 0xff, 0xef, 0x41, 0x22, 0x5b, 0x2e, 0xc7, 0x73, 0xc5, 0xf5, 0x2c, 0xf5, - 0xec, 0xac, 0xc6, 0x04, 0xd5, 0x3c, 0x0e, 0xbe, 0x68, 0x7c, 0xa5, 0x7f, 0x30, 0xfc, 0xea, 0x49, - 0x43, 0x6b, 0xb5, 0x14, 0x53, 0xed, 0x50, 0x60, 0x92, 0x04, 0xba, 0xf7, 0x5b, 0x39, 0x7b, 0x91, - 0xd8, 0x17, 0xfc, 0xbb, 0x86, 0x3a, 0x0c, 0xe8, 0x12, 0xe8, 0xeb, 0xe9, 0x94, 0x02, 0x63, 0xd6, - 0x6a, 0xb4, 0xf0, 0x20, 0xe0, 0xa3, 0xc3, 0x37, 0x84, 0xb5, 0x35, 0xa9, 0xe4, 0xf8, 0x71, 0x4a, - 0x4e, 0xf6, 0xe1, 0x5a, 0x3d, 0xa5, 0xad, 0xb3, 0x37, 0x84, 0x91, 0x07, 0x64, 0xe1, 0x1f, 0x51, - 0x93, 0x81, 0x43, 0x81, 0x13, 0x98, 0xa9, 0x4b, 0x32, 0x7c, 0xf8, 0x3e, 0x8d, 0x43, 0xc7, 0x5e, - 0x24, 0x07, 0x89, 0xc0, 0x0c, 0x28, 0x04, 0x0e, 0x58, 0xad, 0xcd, 0xba, 0xdb, 0x3c, 0x49, 0x81, - 0xc8, 0x16, 0xb3, 0xf7, 0x97, 0x86, 0x5a, 0xb9, 0xed, 0xc7, 0x17, 0x08, 0x39, 0xe9, 0x66, 0xa5, - 0x75, 0xf9, 0xe6, 0x49, 0x1d, 0xca, 0x16, 0x75, 0x7b, 0x31, 0x33, 0x17, 0x23, 0x3b, 0x6c, 0xb8, - 0x8b, 0x6a, 0x17, 0x61, 0x00, 0xac, 0x5d, 0x7b, 0x51, 0xe9, 0x37, 0xad, 0xa6, 0xe8, 0xea, 0x99, - 0x70, 0x90, 0xc4, 0x9f, 0x8c, 0xbe, 0xeb, 0x85, 0x81, 0x9a, 0xe8, 0x9d, 0xd1, 0x17, 0x5e, 0xa2, - 0xfe, 0xf6, 0x7e, 0xd1, 0xd0, 0x87, 0x7b, 0x4b, 0x8e, 0x87, 0x08, 0x39, 0x99, 0xa5, 0x2e, 0xd7, - 0x56, 0x5a, 0xf6, 0x87, 0xec, 0x44, 0xe1, 0x2f, 0x51, 0x2b, 0xd7, 0x27, 0x75, 0xb4, 0xb2, 0x4b, - 0x91, 0x63, 0x23, 0xf9, 0x58, 0xeb, 0xe5, 0xe5, 0x8d, 0x5e, 0xba, 0xba, 0xd1, 0x4b, 0xd7, 0x37, - 0x7a, 0xe9, 0xe7, 0x8d, 0xae, 0x5d, 0x6e, 0x74, 0xed, 0x6a, 0xa3, 0x6b, 0x7f, 0x6f, 0x74, 0xed, - 0xd7, 0x7f, 0xf4, 0xd2, 0x59, 0x43, 0xd5, 0xec, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x15, 0xe8, - 0xc4, 0x9a, 0x7c, 0x08, 0x00, 0x00, + // 802 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xa4, 0x54, 0x4d, 0x6b, 0x33, 0x55, + 0x14, 0xce, 0xe4, 0xb3, 0xb9, 0x35, 0x5a, 0x2e, 0x0a, 0x31, 0x8b, 0x49, 0x09, 0x22, 0xad, 0xe8, + 0x8c, 0x09, 0x22, 0x05, 0x51, 0xe8, 0xa4, 0x08, 0x85, 0x96, 0xca, 0x6d, 0x71, 0x51, 0x04, 0x9d, + 0x4c, 0x4e, 0xa6, 0x63, 0x32, 0x1f, 0xdc, 0x7b, 0x27, 0x90, 0xae, 0xfc, 0x01, 0x2e, 0xfc, 0x11, + 0xfe, 0x03, 0xd7, 0xee, 0xbb, 0xb3, 0x0b, 0x17, 0x5d, 0x05, 0x1b, 0xff, 0x45, 0x57, 0x2f, 0xf7, + 0xce, 0xcd, 0x24, 0xd3, 0x24, 0x7d, 0xfb, 0xb6, 0xbb, 0x39, 0x67, 0xce, 0x79, 0x9e, 0xe7, 0x9e, + 0x2f, 0x74, 0x34, 0x3c, 0x60, 0x86, 0x17, 0x9a, 0xc3, 0xb8, 0x07, 0x34, 0x00, 0x0e, 0xcc, 0x1c, + 0x40, 0x1f, 0xa8, 0xcd, 0xbd, 0x30, 0x30, 0xed, 0xc8, 0xcb, 0xd8, 0xe3, 0x76, 0x0f, 0xb8, 0xdd, + 0x36, 0x5d, 0x08, 0x84, 0x0b, 0xfa, 0x46, 0x44, 0x43, 0x1e, 0xe2, 0xaf, 0x12, 0x14, 0x63, 0x81, + 0x62, 0x2c, 0xb2, 0x0c, 0x81, 0xb2, 0x6c, 0x2b, 0x94, 0xc6, 0x17, 0xae, 0xc7, 0xaf, 0xe2, 0x9e, + 0xe1, 0x84, 0xbe, 0xe9, 0x86, 0x6e, 0x68, 0x4a, 0xb0, 0x5e, 0x3c, 0x90, 0x96, 0x34, 0xe4, 0x57, + 0x42, 0xd2, 0x50, 0x24, 0x42, 0x94, 0x6f, 0x3b, 0x57, 0x5e, 0x00, 0x74, 0x62, 0x46, 0x43, 0x37, + 0x51, 0xe9, 0x03, 0xb7, 0xcd, 0xf1, 0x8a, 0xb4, 0x86, 0xb9, 0x29, 0x8b, 0xc6, 0x01, 0xf7, 0x7c, + 0x58, 0x49, 0xf8, 0xfa, 0x6d, 0x09, 0xcc, 0xb9, 0x02, 0xdf, 0x5e, 0xc9, 0xeb, 0xac, 0x56, 0x52, + 0x89, 0x33, 0x29, 0xb0, 0x30, 0xa6, 0xce, 0x2a, 0xd7, 0xe7, 0x9b, 0x73, 0xd6, 0x3c, 0xa5, 0xbd, + 0x3e, 0x3a, 0xe6, 0xde, 0xc8, 0xf4, 0x02, 0xce, 0x38, 0x7d, 0x9c, 0xd2, 0xfa, 0x3b, 0x8f, 0x2a, + 0xdd, 0x51, 0xcc, 0x38, 0x50, 0xfc, 0x0b, 0xda, 0x12, 0x45, 0xea, 0xdb, 0xdc, 0xae, 0x6b, 0xbb, + 0xda, 0xde, 0x76, 0xe7, 0x4b, 0x43, 0xf5, 0x6d, 0xf9, 0xad, 0x46, 0x34, 0x74, 0x93, 0x96, 0x89, + 0x68, 0x63, 0xdc, 0x36, 0xce, 0x7a, 0xbf, 0x82, 0xc3, 0x4f, 0x81, 0xdb, 0x16, 0xbe, 0x99, 0x36, + 0x73, 0xb3, 0x69, 0x13, 0x2d, 0x7c, 0x24, 0x45, 0xc5, 0x0e, 0x2a, 0xb2, 0x08, 0x9c, 0x7a, 0x5e, + 0xa2, 0x1f, 0x1a, 0x2f, 0x99, 0x0a, 0x43, 0xc9, 0x3d, 0x8f, 0xc0, 0xb1, 0xde, 0x53, 0x74, 0x45, + 0x61, 0x11, 0x09, 0x8e, 0x87, 0xa8, 0xcc, 0xb8, 0xcd, 0x63, 0x56, 0x2f, 0x48, 0x9a, 0xee, 0xeb, + 0x68, 0x24, 0x94, 0xf5, 0xbe, 0x22, 0x2a, 0x27, 0x36, 0x51, 0x14, 0xad, 0xbb, 0x02, 0xda, 0x51, + 0x91, 0xdd, 0x30, 0xe8, 0x7b, 0x02, 0x02, 0x1f, 0xa0, 0x22, 0x9f, 0x44, 0x20, 0x8b, 0x58, 0xb5, + 0x3e, 0x99, 0x6b, 0xbc, 0x98, 0x44, 0xf0, 0x30, 0x6d, 0x7e, 0xf8, 0x38, 0x5e, 0xf8, 0x89, 0xcc, + 0xc0, 0x3f, 0xa6, 0xda, 0xf3, 0x32, 0xf7, 0xbb, 0x2c, 0xed, 0xc3, 0xb4, 0xf9, 0xe4, 0x44, 0x18, + 0x29, 0x66, 0x56, 0x26, 0x76, 0x51, 0x6d, 0x64, 0x33, 0xfe, 0x03, 0x0d, 0x7b, 0x70, 0xe1, 0xf9, + 0xa0, 0x4a, 0xf3, 0xd9, 0xf3, 0xfa, 0x2b, 0x32, 0xac, 0x8f, 0x94, 0x94, 0xda, 0xc9, 0x32, 0x10, + 0xc9, 0xe2, 0xe2, 0x31, 0xc2, 0xc2, 0x71, 0x41, 0xed, 0x80, 0x25, 0x8f, 0x13, 0x6c, 0xc5, 0x77, + 0x66, 0x6b, 0x28, 0x36, 0x7c, 0xb2, 0x82, 0x46, 0xd6, 0x30, 0xe0, 0x4f, 0x51, 0x99, 0x82, 0xcd, + 0xc2, 0xa0, 0x5e, 0x92, 0x85, 0x4b, 0xfb, 0x45, 0xa4, 0x97, 0xa8, 0xbf, 0x78, 0x1f, 0x55, 0x7c, + 0x60, 0xcc, 0x76, 0xa1, 0x5e, 0x96, 0x81, 0x1f, 0xa8, 0xc0, 0xca, 0x69, 0xe2, 0x26, 0xf3, 0xff, + 0xad, 0x7f, 0x34, 0xb4, 0xad, 0x5a, 0x75, 0xe2, 0x31, 0x8e, 0x7f, 0x5a, 0x59, 0x0f, 0xe3, 0x79, + 0x0f, 0x12, 0xd9, 0x72, 0x39, 0x76, 0x14, 0xd7, 0xd6, 0xdc, 0xb3, 0xb4, 0x1a, 0x3d, 0x54, 0xf2, + 0x38, 0xf8, 0xa2, 0xf1, 0x85, 0xbd, 0xed, 0xce, 0xb7, 0xaf, 0x1a, 0x5a, 0xab, 0xa6, 0x98, 0x4a, + 0xc7, 0x02, 0x93, 0x24, 0xd0, 0xad, 0x3f, 0xf3, 0xe9, 0x8b, 0xc4, 0xbe, 0xe0, 0xbf, 0x34, 0xd4, + 0x60, 0x40, 0xc7, 0x40, 0x0f, 0xfb, 0x7d, 0x0a, 0x8c, 0x59, 0x93, 0xee, 0xc8, 0x83, 0x80, 0x77, + 0x8f, 0x8f, 0x08, 0xab, 0x6b, 0x52, 0xc9, 0xd9, 0xcb, 0x94, 0x9c, 0x6f, 0xc2, 0xb5, 0x5a, 0x4a, + 0x5b, 0x63, 0x63, 0x08, 0x23, 0x4f, 0xc8, 0xc2, 0x3f, 0xa3, 0x2a, 0x03, 0x87, 0x02, 0x27, 0x30, + 0x50, 0x97, 0xa4, 0xb3, 0x46, 0xa3, 0x6a, 0x83, 0x6c, 0x40, 0xe8, 0xd8, 0xa3, 0xe4, 0x20, 0x11, + 0x18, 0x00, 0x85, 0xc0, 0x01, 0xab, 0x36, 0x9b, 0x36, 0xab, 0xe7, 0x73, 0x20, 0xb2, 0xc0, 0x6c, + 0xfd, 0xab, 0xa1, 0x5a, 0x66, 0xfb, 0xf1, 0x35, 0x42, 0xce, 0x7c, 0xb3, 0xe6, 0x75, 0xf9, 0xfe, + 0x55, 0x1d, 0x4a, 0x17, 0x75, 0x71, 0x31, 0x53, 0x17, 0x23, 0x4b, 0x6c, 0xb8, 0x89, 0x4a, 0xd7, + 0x61, 0x00, 0xac, 0x5e, 0xda, 0x2d, 0xec, 0x55, 0xad, 0xaa, 0xe8, 0xea, 0xa5, 0x70, 0x90, 0xc4, + 0x9f, 0x8c, 0xbe, 0xeb, 0x85, 0x81, 0x9a, 0xe8, 0xa5, 0xd1, 0x17, 0x5e, 0xa2, 0xfe, 0xb6, 0x7e, + 0xd7, 0xd0, 0xc7, 0x1b, 0x4b, 0x8e, 0x3b, 0x08, 0x39, 0xa9, 0xa5, 0x2e, 0xd7, 0x42, 0x5a, 0xfa, + 0x87, 0x2c, 0x45, 0xe1, 0x6f, 0x50, 0x2d, 0xd3, 0x27, 0x75, 0xb4, 0xd2, 0x4b, 0x91, 0x61, 0x23, + 0xd9, 0x58, 0x6b, 0xff, 0xe6, 0x5e, 0xcf, 0xdd, 0xde, 0xeb, 0xb9, 0xbb, 0x7b, 0x3d, 0xf7, 0xdb, + 0x4c, 0xd7, 0x6e, 0x66, 0xba, 0x76, 0x3b, 0xd3, 0xb5, 0xff, 0x66, 0xba, 0xf6, 0xc7, 0xff, 0x7a, + 0xee, 0xb2, 0xa2, 0x6a, 0xf6, 0x26, 0x00, 0x00, 0xff, 0xff, 0x4c, 0x52, 0x01, 0x24, 0x84, 0x08, + 0x00, 0x00, } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/federation/apis/federation/v1beta1/generated.proto b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/federation/apis/federation/v1beta1/generated.proto index c37f7b96..0be7a854 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/federation/apis/federation/v1beta1/generated.proto +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/federation/apis/federation/v1beta1/generated.proto @@ -36,7 +36,7 @@ message Cluster { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec defines the behavior of the Cluster. // +optional diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/federation/apis/federation/v1beta1/register.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/federation/apis/federation/v1beta1/register.go index c5f3fffc..bcad5cc5 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/federation/apis/federation/v1beta1/register.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/federation/apis/federation/v1beta1/register.go @@ -38,7 +38,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &Cluster{}, &ClusterList{}, - &v1.ListOptions{}, &v1.DeleteOptions{}, &metav1.ExportOptions{}, &metav1.GetOptions{}, diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/federation/apis/federation/v1beta1/types.generated.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/federation/apis/federation/v1beta1/types.generated.go index 6c57c2b4..dd0fa3cd 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/federation/apis/federation/v1beta1/types.generated.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/federation/apis/federation/v1beta1/types.generated.go @@ -1441,7 +1441,13 @@ func (x *Cluster) CodecEncodeSelf(e *codec1978.Encoder) { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { yy10 := &x.ObjectMeta - yy10.CodecEncodeSelf(e) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else if z.HasExtensions() && z.EncExt(yy10) { + } else { + z.EncFallback(yy10) + } } else { r.EncodeNil() } @@ -1451,7 +1457,13 @@ func (x *Cluster) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, string("metadata")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yy12 := &x.ObjectMeta - yy12.CodecEncodeSelf(e) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(yy12) { + } else { + z.EncFallback(yy12) + } } } if yyr2 || yy2arr2 { @@ -1575,24 +1587,30 @@ func (x *Cluster) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } case "metadata": if r.TryDecodeAsNil() { - x.ObjectMeta = pkg1_v1.ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { yyv8 := &x.ObjectMeta - yyv8.CodecDecodeSelf(d) + yym9 := z.DecBinary() + _ = yym9 + if false { + } else if z.HasExtensions() && z.DecExt(yyv8) { + } else { + z.DecFallback(yyv8, false) + } } case "spec": if r.TryDecodeAsNil() { x.Spec = ClusterSpec{} } else { - yyv9 := &x.Spec - yyv9.CodecDecodeSelf(d) + yyv10 := &x.Spec + yyv10.CodecDecodeSelf(d) } case "status": if r.TryDecodeAsNil() { x.Status = ClusterStatus{} } else { - yyv10 := &x.Status - yyv10.CodecDecodeSelf(d) + yyv11 := &x.Status + yyv11.CodecDecodeSelf(d) } default: z.DecStructFieldNotFound(-1, yys3) @@ -1605,16 +1623,16 @@ func (x *Cluster) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1622,21 +1640,21 @@ func (x *Cluster) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Kind = "" } else { - yyv12 := &x.Kind - yym13 := z.DecBinary() - _ = yym13 + yyv13 := &x.Kind + yym14 := z.DecBinary() + _ = yym14 if false { } else { - *((*string)(yyv12)) = r.DecodeString() + *((*string)(yyv13)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1644,38 +1662,44 @@ func (x *Cluster) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.APIVersion = "" } else { - yyv14 := &x.APIVersion - yym15 := z.DecBinary() - _ = yym15 + yyv15 := &x.APIVersion + yym16 := z.DecBinary() + _ = yym16 if false { } else { - *((*string)(yyv14)) = r.DecodeString() + *((*string)(yyv15)) = r.DecodeString() } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ObjectMeta = pkg1_v1.ObjectMeta{} + x.ObjectMeta = pkg2_v1.ObjectMeta{} } else { - yyv16 := &x.ObjectMeta - yyv16.CodecDecodeSelf(d) + yyv17 := &x.ObjectMeta + yym18 := z.DecBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.DecExt(yyv17) { + } else { + z.DecFallback(yyv17, false) + } } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1683,16 +1707,16 @@ func (x *Cluster) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Spec = ClusterSpec{} } else { - yyv17 := &x.Spec - yyv17.CodecDecodeSelf(d) + yyv19 := &x.Spec + yyv19.CodecDecodeSelf(d) } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1700,21 +1724,21 @@ func (x *Cluster) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Status = ClusterStatus{} } else { - yyv18 := &x.Status - yyv18.CodecDecodeSelf(d) + yyv20 := &x.Status + yyv20.CodecDecodeSelf(d) } for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb11 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb11 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj11-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/federation/apis/federation/v1beta1/types.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/federation/apis/federation/v1beta1/types.go index b59ce232..d26c12ee 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/federation/apis/federation/v1beta1/types.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/federation/apis/federation/v1beta1/types.go @@ -99,7 +99,7 @@ type Cluster struct { // Standard object's metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec defines the behavior of the Cluster. // +optional diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/federation/apis/federation/v1beta1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/federation/apis/federation/v1beta1/zz_generated.conversion.go index 8774ac10..250439a6 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/federation/apis/federation/v1beta1/zz_generated.conversion.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/federation/apis/federation/v1beta1/zz_generated.conversion.go @@ -53,10 +53,7 @@ func RegisterConversions(scheme *runtime.Scheme) error { } func autoConvert_v1beta1_Cluster_To_federation_Cluster(in *Cluster, out *federation.Cluster, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_v1beta1_ClusterSpec_To_federation_ClusterSpec(&in.Spec, &out.Spec, s); err != nil { return err } @@ -71,10 +68,7 @@ func Convert_v1beta1_Cluster_To_federation_Cluster(in *Cluster, out *federation. } func autoConvert_federation_Cluster_To_v1beta1_Cluster(in *federation.Cluster, out *Cluster, s conversion.Scope) error { - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } + out.ObjectMeta = in.ObjectMeta if err := Convert_federation_ClusterSpec_To_v1beta1_ClusterSpec(&in.Spec, &out.Spec, s); err != nil { return err } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/federation/apis/federation/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/federation/apis/federation/v1beta1/zz_generated.deepcopy.go index 3cbe8032..ab673117 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/federation/apis/federation/v1beta1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/federation/apis/federation/v1beta1/zz_generated.deepcopy.go @@ -21,9 +21,10 @@ limitations under the License. package v1beta1 import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" - v1 "k8s.io/client-go/pkg/api/v1" + api_v1 "k8s.io/client-go/pkg/api/v1" reflect "reflect" ) @@ -49,8 +50,10 @@ func DeepCopy_v1beta1_Cluster(in interface{}, out interface{}, c *conversion.Clo in := in.(*Cluster) out := out.(*Cluster) *out = *in - if err := v1.DeepCopy_v1_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_v1beta1_ClusterSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -99,13 +102,11 @@ func DeepCopy_v1beta1_ClusterSpec(in interface{}, out interface{}, c *conversion if in.ServerAddressByClientCIDRs != nil { in, out := &in.ServerAddressByClientCIDRs, &out.ServerAddressByClientCIDRs *out = make([]ServerAddressByClientCIDR, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.SecretRef != nil { in, out := &in.SecretRef, &out.SecretRef - *out = new(v1.LocalObjectReference) + *out = new(api_v1.LocalObjectReference) **out = **in } return nil diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/federation/apis/federation/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/federation/apis/federation/zz_generated.deepcopy.go index 7809ff7a..03fe8e4d 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/federation/apis/federation/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/federation/apis/federation/zz_generated.deepcopy.go @@ -21,6 +21,7 @@ limitations under the License. package federation import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" api "k8s.io/client-go/pkg/api" @@ -51,8 +52,10 @@ func DeepCopy_federation_Cluster(in interface{}, out interface{}, c *conversion. in := in.(*Cluster) out := out.(*Cluster) *out = *in - if err := api.DeepCopy_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, c); err != nil { + if newVal, err := c.DeepCopy(&in.ObjectMeta); err != nil { return err + } else { + out.ObjectMeta = *newVal.(*v1.ObjectMeta) } if err := DeepCopy_federation_ClusterSpec(&in.Spec, &out.Spec, c); err != nil { return err @@ -115,9 +118,7 @@ func DeepCopy_federation_ClusterSpec(in interface{}, out interface{}, c *convers if in.ServerAddressByClientCIDRs != nil { in, out := &in.ServerAddressByClientCIDRs, &out.ServerAddressByClientCIDRs *out = make([]ServerAddressByClientCIDR, len(*in)) - for i := range *in { - (*out)[i] = (*in)[i] - } + copy(*out, *in) } if in.SecretRef != nil { in, out := &in.SecretRef, &out.SecretRef diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/kubelet/types/pod_update.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/kubelet/types/pod_update.go index 6228b715..6962fa71 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/kubelet/types/pod_update.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/kubelet/types/pod_update.go @@ -19,6 +19,7 @@ package types import ( "fmt" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/pkg/api/v1" ) @@ -64,7 +65,7 @@ const ( // Updates from all sources AllSource = "*" - NamespaceDefault = v1.NamespaceDefault + NamespaceDefault = metav1.NamespaceDefault ) // PodUpdate defines an operation sent on the channel. You can add or remove single services by diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/cert/cert.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/cert/cert.go deleted file mode 100644 index fff5b38d..00000000 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/cert/cert.go +++ /dev/null @@ -1,207 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package cert - -import ( - "bytes" - "crypto/ecdsa" - "crypto/elliptic" - cryptorand "crypto/rand" - "crypto/rsa" - "crypto/x509" - "crypto/x509/pkix" - "encoding/pem" - "fmt" - "math" - "math/big" - "net" - "time" -) - -const ( - rsaKeySize = 2048 - duration365d = time.Hour * 24 * 365 -) - -// Config containes the basic fields required for creating a certificate -type Config struct { - CommonName string - Organization []string - AltNames AltNames -} - -// AltNames contains the domain names and IP addresses that will be added -// to the API Server's x509 certificate SubAltNames field. The values will -// be passed directly to the x509.Certificate object. -type AltNames struct { - DNSNames []string - IPs []net.IP -} - -// NewPrivateKey creates an RSA private key -func NewPrivateKey() (*rsa.PrivateKey, error) { - return rsa.GenerateKey(cryptorand.Reader, rsaKeySize) -} - -// NewSelfSignedCACert creates a CA certificate -func NewSelfSignedCACert(cfg Config, key *rsa.PrivateKey) (*x509.Certificate, error) { - now := time.Now() - tmpl := x509.Certificate{ - SerialNumber: new(big.Int).SetInt64(0), - Subject: pkix.Name{ - CommonName: cfg.CommonName, - Organization: cfg.Organization, - }, - NotBefore: now.UTC(), - NotAfter: now.Add(duration365d * 10).UTC(), - KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature | x509.KeyUsageCertSign, - BasicConstraintsValid: true, - IsCA: true, - } - - certDERBytes, err := x509.CreateCertificate(cryptorand.Reader, &tmpl, &tmpl, key.Public(), key) - if err != nil { - return nil, err - } - return x509.ParseCertificate(certDERBytes) -} - -// NewSignedCert creates a signed certificate using the given CA certificate and key -func NewSignedCert(cfg Config, key *rsa.PrivateKey, caCert *x509.Certificate, caKey *rsa.PrivateKey) (*x509.Certificate, error) { - serial, err := cryptorand.Int(cryptorand.Reader, new(big.Int).SetInt64(math.MaxInt64)) - if err != nil { - return nil, err - } - - certTmpl := x509.Certificate{ - Subject: pkix.Name{ - CommonName: cfg.CommonName, - Organization: caCert.Subject.Organization, - }, - DNSNames: cfg.AltNames.DNSNames, - IPAddresses: cfg.AltNames.IPs, - SerialNumber: serial, - NotBefore: caCert.NotBefore, - NotAfter: time.Now().Add(duration365d).UTC(), - KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature, - ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth, x509.ExtKeyUsageClientAuth}, - } - certDERBytes, err := x509.CreateCertificate(cryptorand.Reader, &certTmpl, caCert, key.Public(), caKey) - if err != nil { - return nil, err - } - return x509.ParseCertificate(certDERBytes) -} - -// MakeEllipticPrivateKeyPEM creates an ECDSA private key -func MakeEllipticPrivateKeyPEM() ([]byte, error) { - privateKey, err := ecdsa.GenerateKey(elliptic.P256(), cryptorand.Reader) - if err != nil { - return nil, err - } - - derBytes, err := x509.MarshalECPrivateKey(privateKey) - if err != nil { - return nil, err - } - - privateKeyPemBlock := &pem.Block{ - Type: "EC PRIVATE KEY", - Bytes: derBytes, - } - return pem.EncodeToMemory(privateKeyPemBlock), nil -} - -// GenerateSelfSignedCertKey creates a self-signed certificate and key for the given host. -// Host may be an IP or a DNS name -// You may also specify additional subject alt names (either ip or dns names) for the certificate -func GenerateSelfSignedCertKey(host string, alternateIPs []net.IP, alternateDNS []string) ([]byte, []byte, error) { - priv, err := rsa.GenerateKey(cryptorand.Reader, 2048) - if err != nil { - return nil, nil, err - } - - template := x509.Certificate{ - SerialNumber: big.NewInt(1), - Subject: pkix.Name{ - CommonName: fmt.Sprintf("%s@%d", host, time.Now().Unix()), - }, - NotBefore: time.Now(), - NotAfter: time.Now().Add(time.Hour * 24 * 365), - - KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature | x509.KeyUsageCertSign, - ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth}, - BasicConstraintsValid: true, - IsCA: true, - } - - if ip := net.ParseIP(host); ip != nil { - template.IPAddresses = append(template.IPAddresses, ip) - } else { - template.DNSNames = append(template.DNSNames, host) - } - - template.IPAddresses = append(template.IPAddresses, alternateIPs...) - template.DNSNames = append(template.DNSNames, alternateDNS...) - - derBytes, err := x509.CreateCertificate(cryptorand.Reader, &template, &template, &priv.PublicKey, priv) - if err != nil { - return nil, nil, err - } - - // Generate cert - certBuffer := bytes.Buffer{} - if err := pem.Encode(&certBuffer, &pem.Block{Type: "CERTIFICATE", Bytes: derBytes}); err != nil { - return nil, nil, err - } - - // Generate key - keyBuffer := bytes.Buffer{} - if err := pem.Encode(&keyBuffer, &pem.Block{Type: "RSA PRIVATE KEY", Bytes: x509.MarshalPKCS1PrivateKey(priv)}); err != nil { - return nil, nil, err - } - - return certBuffer.Bytes(), keyBuffer.Bytes(), nil -} - -// FormatBytesCert receives byte array certificate and formats in human-readable format -func FormatBytesCert(cert []byte) (string, error) { - block, _ := pem.Decode(cert) - c, err := x509.ParseCertificate(block.Bytes) - if err != nil { - return "", fmt.Errorf("failed to parse certificate [%v]", err) - } - return FormatCert(c), nil -} - -// FormatCert receives certificate and formats in human-readable format -func FormatCert(c *x509.Certificate) string { - var ips []string - for _, ip := range c.IPAddresses { - ips = append(ips, ip.String()) - } - altNames := append(ips, c.DNSNames...) - res := fmt.Sprintf( - "Issuer: CN=%s | Subject: CN=%s | CA: %t\n", - c.Issuer.CommonName, c.Subject.CommonName, c.IsCA, - ) - res += fmt.Sprintf("Not before: %s Not After: %s", c.NotBefore, c.NotAfter) - if len(altNames) > 0 { - res += fmt.Sprintf("\nAlternate Names: %v", altNames) - } - return res -} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/cert/csr.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/cert/csr.go deleted file mode 100644 index 9a0f628b..00000000 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/cert/csr.go +++ /dev/null @@ -1,97 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package cert - -import ( - cryptorand "crypto/rand" - "crypto/rsa" - "crypto/x509" - "crypto/x509/pkix" - "encoding/pem" - "errors" - "net" - - "k8s.io/client-go/pkg/apis/certificates" - "k8s.io/client-go/pkg/apis/certificates/v1alpha1" -) - -// ParseCSR extracts the CSR from the API object and decodes it. -func ParseCSR(obj *certificates.CertificateSigningRequest) (*x509.CertificateRequest, error) { - // extract PEM from request object - pemBytes := obj.Spec.Request - block, _ := pem.Decode(pemBytes) - if block == nil || block.Type != "CERTIFICATE REQUEST" { - return nil, errors.New("PEM block type must be CERTIFICATE REQUEST") - } - csr, err := x509.ParseCertificateRequest(block.Bytes) - if err != nil { - return nil, err - } - return csr, nil -} - -// ParseCSRV1alpha1 extracts the CSR from the API object and decodes it. -func ParseCSRV1alpha1(obj *v1alpha1.CertificateSigningRequest) (*x509.CertificateRequest, error) { - // extract PEM from request object - pemBytes := obj.Spec.Request - block, _ := pem.Decode(pemBytes) - if block == nil || block.Type != "CERTIFICATE REQUEST" { - return nil, errors.New("PEM block type must be CERTIFICATE REQUEST") - } - csr, err := x509.ParseCertificateRequest(block.Bytes) - if err != nil { - return nil, err - } - return csr, nil -} - -// MakeCSR generates a PEM-encoded CSR using the supplied private key, subject, and SANs. -// All key types that are implemented via crypto.Signer are supported (This includes *rsa.PrivateKey and *ecdsa.PrivateKey.) -func MakeCSR(privateKey interface{}, subject *pkix.Name, dnsSANs []string, ipSANs []net.IP) (csr []byte, err error) { - // Customize the signature for RSA keys, depending on the key size - var sigType x509.SignatureAlgorithm - if privateKey, ok := privateKey.(*rsa.PrivateKey); ok { - keySize := privateKey.N.BitLen() - switch { - case keySize >= 4096: - sigType = x509.SHA512WithRSA - case keySize >= 3072: - sigType = x509.SHA384WithRSA - default: - sigType = x509.SHA256WithRSA - } - } - - template := &x509.CertificateRequest{ - Subject: *subject, - SignatureAlgorithm: sigType, - DNSNames: dnsSANs, - IPAddresses: ipSANs, - } - - csr, err = x509.CreateCertificateRequest(cryptorand.Reader, template, privateKey) - if err != nil { - return nil, err - } - - csrPemBlock := &pem.Block{ - Type: "CERTIFICATE REQUEST", - Bytes: csr, - } - - return pem.EncodeToMemory(csrPemBlock), nil -} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/cert/io.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/cert/io.go deleted file mode 100644 index c2bde8ef..00000000 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/cert/io.go +++ /dev/null @@ -1,129 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package cert - -import ( - "crypto/x509" - "fmt" - "io/ioutil" - "os" - "path/filepath" -) - -// CanReadCertAndKey returns true if the certificate and key files already exists, -// otherwise returns false. If lost one of cert and key, returns error. -func CanReadCertAndKey(certPath, keyPath string) (bool, error) { - certReadable := canReadFile(certPath) - keyReadable := canReadFile(keyPath) - - if certReadable == false && keyReadable == false { - return false, nil - } - - if certReadable == false { - return false, fmt.Errorf("error reading %s, certificate and key must be supplied as a pair", certPath) - } - - if keyReadable == false { - return false, fmt.Errorf("error reading %s, certificate and key must be supplied as a pair", keyPath) - } - - return true, nil -} - -// If the file represented by path exists and -// readable, returns true otherwise returns false. -func canReadFile(path string) bool { - f, err := os.Open(path) - if err != nil { - return false - } - - defer f.Close() - - return true -} - -// WriteCert writes the pem-encoded certificate data to certPath. -// The certificate file will be created with file mode 0644. -// If the certificate file already exists, it will be overwritten. -// The parent directory of the certPath will be created as needed with file mode 0755. -func WriteCert(certPath string, data []byte) error { - if err := os.MkdirAll(filepath.Dir(certPath), os.FileMode(0755)); err != nil { - return err - } - if err := ioutil.WriteFile(certPath, data, os.FileMode(0644)); err != nil { - return err - } - return nil -} - -// WriteKey writes the pem-encoded key data to keyPath. -// The key file will be created with file mode 0600. -// If the key file already exists, it will be overwritten. -// The parent directory of the keyPath will be created as needed with file mode 0755. -func WriteKey(keyPath string, data []byte) error { - if err := os.MkdirAll(filepath.Dir(keyPath), os.FileMode(0755)); err != nil { - return err - } - if err := ioutil.WriteFile(keyPath, data, os.FileMode(0600)); err != nil { - return err - } - return nil -} - -// NewPool returns an x509.CertPool containing the certificates in the given PEM-encoded file. -// Returns an error if the file could not be read, a certificate could not be parsed, or if the file does not contain any certificates -func NewPool(filename string) (*x509.CertPool, error) { - certs, err := CertsFromFile(filename) - if err != nil { - return nil, err - } - pool := x509.NewCertPool() - for _, cert := range certs { - pool.AddCert(cert) - } - return pool, nil -} - -// CertsFromFile returns the x509.Certificates contained in the given PEM-encoded file. -// Returns an error if the file could not be read, a certificate could not be parsed, or if the file does not contain any certificates -func CertsFromFile(file string) ([]*x509.Certificate, error) { - pemBlock, err := ioutil.ReadFile(file) - if err != nil { - return nil, err - } - certs, err := ParseCertsPEM(pemBlock) - if err != nil { - return nil, fmt.Errorf("error reading %s: %s", file, err) - } - return certs, nil -} - -// PrivateKeyFromFile returns the private key in rsa.PrivateKey or ecdsa.PrivateKey format from a given PEM-encoded file. -// Returns an error if the file could not be read or if the private key could not be parsed. -func PrivateKeyFromFile(file string) (interface{}, error) { - pemBlock, err := ioutil.ReadFile(file) - if err != nil { - return nil, err - } - key, err := ParsePrivateKeyPEM(pemBlock) - if err != nil { - return nil, fmt.Errorf("error reading %s: %v", file, err) - } - return key, nil -} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/cert/pem.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/cert/pem.go deleted file mode 100644 index 59e602d2..00000000 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/cert/pem.go +++ /dev/null @@ -1,107 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package cert - -import ( - "crypto/rsa" - "crypto/x509" - "encoding/pem" - "errors" - "fmt" -) - -// EncodePublicKeyPEM returns PEM-endcode public data -func EncodePublicKeyPEM(key *rsa.PublicKey) ([]byte, error) { - der, err := x509.MarshalPKIXPublicKey(key) - if err != nil { - return []byte{}, err - } - block := pem.Block{ - Type: "PUBLIC KEY", - Bytes: der, - } - return pem.EncodeToMemory(&block), nil -} - -// EncodePrivateKeyPEM returns PEM-encoded private key data -func EncodePrivateKeyPEM(key *rsa.PrivateKey) []byte { - block := pem.Block{ - Type: "RSA PRIVATE KEY", - Bytes: x509.MarshalPKCS1PrivateKey(key), - } - return pem.EncodeToMemory(&block) -} - -// EncodeCertPEM returns PEM-endcoded certificate data -func EncodeCertPEM(cert *x509.Certificate) []byte { - block := pem.Block{ - Type: "CERTIFICATE", - Bytes: cert.Raw, - } - return pem.EncodeToMemory(&block) -} - -// ParsePrivateKeyPEM returns a private key parsed from a PEM block in the supplied data. -// Recognizes PEM blocks for "EC PRIVATE KEY" and "RSA PRIVATE KEY" -func ParsePrivateKeyPEM(keyData []byte) (interface{}, error) { - for { - var privateKeyPemBlock *pem.Block - privateKeyPemBlock, keyData = pem.Decode(keyData) - if privateKeyPemBlock == nil { - // we read all the PEM blocks and didn't recognize one - return nil, fmt.Errorf("no private key PEM block found") - } - - switch privateKeyPemBlock.Type { - case "EC PRIVATE KEY": - return x509.ParseECPrivateKey(privateKeyPemBlock.Bytes) - case "RSA PRIVATE KEY": - return x509.ParsePKCS1PrivateKey(privateKeyPemBlock.Bytes) - } - } -} - -// ParseCertsPEM returns the x509.Certificates contained in the given PEM-encoded byte array -// Returns an error if a certificate could not be parsed, or if the data does not contain any certificates -func ParseCertsPEM(pemCerts []byte) ([]*x509.Certificate, error) { - ok := false - certs := []*x509.Certificate{} - for len(pemCerts) > 0 { - var block *pem.Block - block, pemCerts = pem.Decode(pemCerts) - if block == nil { - break - } - // Only use PEM "CERTIFICATE" blocks without extra headers - if block.Type != "CERTIFICATE" || len(block.Headers) != 0 { - continue - } - - cert, err := x509.ParseCertificate(block.Bytes) - if err != nil { - return certs, err - } - - certs = append(certs, cert) - ok = true - } - - if !ok { - return certs, errors.New("could not read any certificates") - } - return certs, nil -} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/clock/clock.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/clock/clock.go deleted file mode 100644 index 2ea1b53c..00000000 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/clock/clock.go +++ /dev/null @@ -1,218 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package clock - -import ( - "sync" - "time" -) - -// Clock allows for injecting fake or real clocks into code that -// needs to do arbitrary things based on time. -type Clock interface { - Now() time.Time - Since(time.Time) time.Duration - After(d time.Duration) <-chan time.Time - Sleep(d time.Duration) - Tick(d time.Duration) <-chan time.Time -} - -var ( - _ = Clock(RealClock{}) - _ = Clock(&FakeClock{}) - _ = Clock(&IntervalClock{}) -) - -// RealClock really calls time.Now() -type RealClock struct{} - -// Now returns the current time. -func (RealClock) Now() time.Time { - return time.Now() -} - -// Since returns time since the specified timestamp. -func (RealClock) Since(ts time.Time) time.Duration { - return time.Since(ts) -} - -// Same as time.After(d). -func (RealClock) After(d time.Duration) <-chan time.Time { - return time.After(d) -} - -func (RealClock) Tick(d time.Duration) <-chan time.Time { - return time.Tick(d) -} - -func (RealClock) Sleep(d time.Duration) { - time.Sleep(d) -} - -// FakeClock implements Clock, but returns an arbitrary time. -type FakeClock struct { - lock sync.RWMutex - time time.Time - - // waiters are waiting for the fake time to pass their specified time - waiters []fakeClockWaiter -} - -type fakeClockWaiter struct { - targetTime time.Time - stepInterval time.Duration - skipIfBlocked bool - destChan chan<- time.Time -} - -func NewFakeClock(t time.Time) *FakeClock { - return &FakeClock{ - time: t, - } -} - -// Now returns f's time. -func (f *FakeClock) Now() time.Time { - f.lock.RLock() - defer f.lock.RUnlock() - return f.time -} - -// Since returns time since the time in f. -func (f *FakeClock) Since(ts time.Time) time.Duration { - f.lock.RLock() - defer f.lock.RUnlock() - return f.time.Sub(ts) -} - -// Fake version of time.After(d). -func (f *FakeClock) After(d time.Duration) <-chan time.Time { - f.lock.Lock() - defer f.lock.Unlock() - stopTime := f.time.Add(d) - ch := make(chan time.Time, 1) // Don't block! - f.waiters = append(f.waiters, fakeClockWaiter{ - targetTime: stopTime, - destChan: ch, - }) - return ch -} - -func (f *FakeClock) Tick(d time.Duration) <-chan time.Time { - f.lock.Lock() - defer f.lock.Unlock() - tickTime := f.time.Add(d) - ch := make(chan time.Time, 1) // hold one tick - f.waiters = append(f.waiters, fakeClockWaiter{ - targetTime: tickTime, - stepInterval: d, - skipIfBlocked: true, - destChan: ch, - }) - - return ch -} - -// Move clock by Duration, notify anyone that's called After or Tick -func (f *FakeClock) Step(d time.Duration) { - f.lock.Lock() - defer f.lock.Unlock() - f.setTimeLocked(f.time.Add(d)) -} - -// Sets the time. -func (f *FakeClock) SetTime(t time.Time) { - f.lock.Lock() - defer f.lock.Unlock() - f.setTimeLocked(t) -} - -// Actually changes the time and checks any waiters. f must be write-locked. -func (f *FakeClock) setTimeLocked(t time.Time) { - f.time = t - newWaiters := make([]fakeClockWaiter, 0, len(f.waiters)) - for i := range f.waiters { - w := &f.waiters[i] - if !w.targetTime.After(t) { - - if w.skipIfBlocked { - select { - case w.destChan <- t: - default: - } - } else { - w.destChan <- t - } - - if w.stepInterval > 0 { - for !w.targetTime.After(t) { - w.targetTime = w.targetTime.Add(w.stepInterval) - } - newWaiters = append(newWaiters, *w) - } - - } else { - newWaiters = append(newWaiters, f.waiters[i]) - } - } - f.waiters = newWaiters -} - -// Returns true if After has been called on f but not yet satisfied (so you can -// write race-free tests). -func (f *FakeClock) HasWaiters() bool { - f.lock.RLock() - defer f.lock.RUnlock() - return len(f.waiters) > 0 -} - -func (f *FakeClock) Sleep(d time.Duration) { - f.Step(d) -} - -// IntervalClock implements Clock, but each invocation of Now steps the clock forward the specified duration -type IntervalClock struct { - Time time.Time - Duration time.Duration -} - -// Now returns i's time. -func (i *IntervalClock) Now() time.Time { - i.Time = i.Time.Add(i.Duration) - return i.Time -} - -// Since returns time since the time in i. -func (i *IntervalClock) Since(ts time.Time) time.Duration { - return i.Time.Sub(ts) -} - -// Unimplemented, will panic. -// TODO: make interval clock use FakeClock so this can be implemented. -func (*IntervalClock) After(d time.Duration) <-chan time.Time { - panic("IntervalClock doesn't implement After") -} - -// Unimplemented, will panic. -// TODO: make interval clock use FakeClock so this can be implemented. -func (*IntervalClock) Tick(d time.Duration) <-chan time.Time { - panic("IntervalClock doesn't implement Tick") -} - -func (*IntervalClock) Sleep(d time.Duration) { - panic("IntervalClock doesn't implement Sleep") -} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/config/feature_gate.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/config/feature_gate.go index ff90f2fb..ea01833f 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/config/feature_gate.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/config/feature_gate.go @@ -61,7 +61,7 @@ var ( appArmor: {true, beta}, dynamicKubeletConfig: {false, alpha}, dynamicVolumeProvisioning: {true, alpha}, - streamingProxyRedirects: {false, alpha}, + streamingProxyRedirects: {true, beta}, experimentalHostUserNamespaceDefaultingGate: {false, alpha}, } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/flowcontrol/throttle.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/flowcontrol/throttle.go deleted file mode 100644 index 881a2f57..00000000 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/flowcontrol/throttle.go +++ /dev/null @@ -1,132 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package flowcontrol - -import ( - "sync" - - "github.com/juju/ratelimit" -) - -type RateLimiter interface { - // TryAccept returns true if a token is taken immediately. Otherwise, - // it returns false. - TryAccept() bool - // Accept returns once a token becomes available. - Accept() - // Stop stops the rate limiter, subsequent calls to CanAccept will return false - Stop() - // Saturation returns a percentage number which describes how saturated - // this rate limiter is. - // Usually we use token bucket rate limiter. In that case, - // 1.0 means no tokens are available; 0.0 means we have a full bucket of tokens to use. - Saturation() float64 - // QPS returns QPS of this rate limiter - QPS() float32 -} - -type tokenBucketRateLimiter struct { - limiter *ratelimit.Bucket - qps float32 -} - -// NewTokenBucketRateLimiter creates a rate limiter which implements a token bucket approach. -// The rate limiter allows bursts of up to 'burst' to exceed the QPS, while still maintaining a -// smoothed qps rate of 'qps'. -// The bucket is initially filled with 'burst' tokens, and refills at a rate of 'qps'. -// The maximum number of tokens in the bucket is capped at 'burst'. -func NewTokenBucketRateLimiter(qps float32, burst int) RateLimiter { - limiter := ratelimit.NewBucketWithRate(float64(qps), int64(burst)) - return &tokenBucketRateLimiter{ - limiter: limiter, - qps: qps, - } -} - -func (t *tokenBucketRateLimiter) TryAccept() bool { - return t.limiter.TakeAvailable(1) == 1 -} - -func (t *tokenBucketRateLimiter) Saturation() float64 { - capacity := t.limiter.Capacity() - avail := t.limiter.Available() - return float64(capacity-avail) / float64(capacity) -} - -// Accept will block until a token becomes available -func (t *tokenBucketRateLimiter) Accept() { - t.limiter.Wait(1) -} - -func (t *tokenBucketRateLimiter) Stop() { -} - -func (t *tokenBucketRateLimiter) QPS() float32 { - return t.qps -} - -type fakeAlwaysRateLimiter struct{} - -func NewFakeAlwaysRateLimiter() RateLimiter { - return &fakeAlwaysRateLimiter{} -} - -func (t *fakeAlwaysRateLimiter) TryAccept() bool { - return true -} - -func (t *fakeAlwaysRateLimiter) Saturation() float64 { - return 0 -} - -func (t *fakeAlwaysRateLimiter) Stop() {} - -func (t *fakeAlwaysRateLimiter) Accept() {} - -func (t *fakeAlwaysRateLimiter) QPS() float32 { - return 1 -} - -type fakeNeverRateLimiter struct { - wg sync.WaitGroup -} - -func NewFakeNeverRateLimiter() RateLimiter { - rl := fakeNeverRateLimiter{} - rl.wg.Add(1) - return &rl -} - -func (t *fakeNeverRateLimiter) TryAccept() bool { - return false -} - -func (t *fakeNeverRateLimiter) Saturation() float64 { - return 1 -} - -func (t *fakeNeverRateLimiter) Stop() { - t.wg.Done() -} - -func (t *fakeNeverRateLimiter) Accept() { - t.wg.Wait() -} - -func (t *fakeNeverRateLimiter) QPS() float32 { - return 1 -} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/homedir/homedir.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/homedir/homedir.go deleted file mode 100644 index 816db57f..00000000 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/homedir/homedir.go +++ /dev/null @@ -1,47 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package homedir - -import ( - "os" - "runtime" -) - -// HomeDir returns the home directory for the current user -func HomeDir() string { - if runtime.GOOS == "windows" { - - // First prefer the HOME environmental variable - if home := os.Getenv("HOME"); len(home) > 0 { - if _, err := os.Stat(home); err == nil { - return home - } - } - if homeDrive, homePath := os.Getenv("HOMEDRIVE"), os.Getenv("HOMEPATH"); len(homeDrive) > 0 && len(homePath) > 0 { - homeDir := homeDrive + homePath - if _, err := os.Stat(homeDir); err == nil { - return homeDir - } - } - if userProfile := os.Getenv("USERPROFILE"); len(userProfile) > 0 { - if _, err := os.Stat(userProfile); err == nil { - return userProfile - } - } - } - return os.Getenv("HOME") -} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/httpstream/spdy/roundtripper.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/httpstream/spdy/roundtripper.go index a02506a4..dc5ad13c 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/httpstream/spdy/roundtripper.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/httpstream/spdy/roundtripper.go @@ -28,11 +28,11 @@ import ( "net/url" "strings" + apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/pkg/api" - apierrors "k8s.io/client-go/pkg/api/errors" - "k8s.io/client-go/pkg/third_party/forked/golang/netutil" "k8s.io/client-go/pkg/util/httpstream" + "k8s.io/client-go/third_party/forked/golang/netutil" ) // SpdyRoundTripper knows how to upgrade an HTTP request to one that supports diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/integer/integer.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/integer/integer.go deleted file mode 100644 index c6ea106f..00000000 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/integer/integer.go +++ /dev/null @@ -1,67 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package integer - -func IntMax(a, b int) int { - if b > a { - return b - } - return a -} - -func IntMin(a, b int) int { - if b < a { - return b - } - return a -} - -func Int32Max(a, b int32) int32 { - if b > a { - return b - } - return a -} - -func Int32Min(a, b int32) int32 { - if b < a { - return b - } - return a -} - -func Int64Max(a, b int64) int64 { - if b > a { - return b - } - return a -} - -func Int64Min(a, b int64) int64 { - if b < a { - return b - } - return a -} - -// RoundToInt32 rounds floats into integer numbers. -func RoundToInt32(a float64) int32 { - if a < 0 { - return int32(a - 0.5) - } - return int32(a + 0.5) -} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/jsonpath/node.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/jsonpath/node.go deleted file mode 100644 index f0a27853..00000000 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/jsonpath/node.go +++ /dev/null @@ -1,239 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package jsonpath - -import "fmt" - -// NodeType identifies the type of a parse tree node. -type NodeType int - -// Type returns itself and provides an easy default implementation -func (t NodeType) Type() NodeType { - return t -} - -func (t NodeType) String() string { - return NodeTypeName[t] -} - -const ( - NodeText NodeType = iota - NodeArray - NodeList - NodeField - NodeIdentifier - NodeFilter - NodeInt - NodeFloat - NodeWildcard - NodeRecursive - NodeUnion -) - -var NodeTypeName = map[NodeType]string{ - NodeText: "NodeText", - NodeArray: "NodeArray", - NodeList: "NodeList", - NodeField: "NodeField", - NodeIdentifier: "NodeIdentifier", - NodeFilter: "NodeFilter", - NodeInt: "NodeInt", - NodeFloat: "NodeFloat", - NodeWildcard: "NodeWildcard", - NodeRecursive: "NodeRecursive", - NodeUnion: "NodeUnion", -} - -type Node interface { - Type() NodeType - String() string -} - -// ListNode holds a sequence of nodes. -type ListNode struct { - NodeType - Nodes []Node // The element nodes in lexical order. -} - -func newList() *ListNode { - return &ListNode{NodeType: NodeList} -} - -func (l *ListNode) append(n Node) { - l.Nodes = append(l.Nodes, n) -} - -func (l *ListNode) String() string { - return fmt.Sprintf("%s", l.Type()) -} - -// TextNode holds plain text. -type TextNode struct { - NodeType - Text string // The text; may span newlines. -} - -func newText(text string) *TextNode { - return &TextNode{NodeType: NodeText, Text: text} -} - -func (t *TextNode) String() string { - return fmt.Sprintf("%s: %s", t.Type(), t.Text) -} - -// FieldNode holds field of struct -type FieldNode struct { - NodeType - Value string -} - -func newField(value string) *FieldNode { - return &FieldNode{NodeType: NodeField, Value: value} -} - -func (f *FieldNode) String() string { - return fmt.Sprintf("%s: %s", f.Type(), f.Value) -} - -// IdentifierNode holds an identifier -type IdentifierNode struct { - NodeType - Name string -} - -func newIdentifier(value string) *IdentifierNode { - return &IdentifierNode{ - NodeType: NodeIdentifier, - Name: value, - } -} - -func (f *IdentifierNode) String() string { - return fmt.Sprintf("%s: %s", f.Type(), f.Name) -} - -// ParamsEntry holds param information for ArrayNode -type ParamsEntry struct { - Value int - Known bool //whether the value is known when parse it -} - -// ArrayNode holds start, end, step information for array index selection -type ArrayNode struct { - NodeType - Params [3]ParamsEntry //start, end, step -} - -func newArray(params [3]ParamsEntry) *ArrayNode { - return &ArrayNode{ - NodeType: NodeArray, - Params: params, - } -} - -func (a *ArrayNode) String() string { - return fmt.Sprintf("%s: %v", a.Type(), a.Params) -} - -// FilterNode holds operand and operator information for filter -type FilterNode struct { - NodeType - Left *ListNode - Right *ListNode - Operator string -} - -func newFilter(left, right *ListNode, operator string) *FilterNode { - return &FilterNode{ - NodeType: NodeFilter, - Left: left, - Right: right, - Operator: operator, - } -} - -func (f *FilterNode) String() string { - return fmt.Sprintf("%s: %s %s %s", f.Type(), f.Left, f.Operator, f.Right) -} - -// IntNode holds integer value -type IntNode struct { - NodeType - Value int -} - -func newInt(num int) *IntNode { - return &IntNode{NodeType: NodeInt, Value: num} -} - -func (i *IntNode) String() string { - return fmt.Sprintf("%s: %d", i.Type(), i.Value) -} - -// FloatNode holds float value -type FloatNode struct { - NodeType - Value float64 -} - -func newFloat(num float64) *FloatNode { - return &FloatNode{NodeType: NodeFloat, Value: num} -} - -func (i *FloatNode) String() string { - return fmt.Sprintf("%s: %f", i.Type(), i.Value) -} - -// WildcardNode means a wildcard -type WildcardNode struct { - NodeType -} - -func newWildcard() *WildcardNode { - return &WildcardNode{NodeType: NodeWildcard} -} - -func (i *WildcardNode) String() string { - return fmt.Sprintf("%s", i.Type()) -} - -// RecursiveNode means a recursive descent operator -type RecursiveNode struct { - NodeType -} - -func newRecursive() *RecursiveNode { - return &RecursiveNode{NodeType: NodeRecursive} -} - -func (r *RecursiveNode) String() string { - return fmt.Sprintf("%s", r.Type()) -} - -// UnionNode is union of ListNode -type UnionNode struct { - NodeType - Nodes []*ListNode -} - -func newUnion(nodes []*ListNode) *UnionNode { - return &UnionNode{NodeType: NodeUnion, Nodes: nodes} -} - -func (u *UnionNode) String() string { - return fmt.Sprintf("%s", u.Type()) -} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/jsonpath/parser.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/jsonpath/parser.go deleted file mode 100644 index 7dc38d31..00000000 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/jsonpath/parser.go +++ /dev/null @@ -1,433 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package jsonpath - -import ( - "fmt" - "regexp" - "strconv" - "strings" - "unicode" - "unicode/utf8" -) - -const eof = -1 - -const ( - leftDelim = "{" - rightDelim = "}" -) - -type Parser struct { - Name string - Root *ListNode - input string - cur *ListNode - pos int - start int - width int -} - -// Parse parsed the given text and return a node Parser. -// If an error is encountered, parsing stops and an empty -// Parser is returned with the error -func Parse(name, text string) (*Parser, error) { - p := NewParser(name) - err := p.Parse(text) - if err != nil { - p = nil - } - return p, err -} - -func NewParser(name string) *Parser { - return &Parser{ - Name: name, - } -} - -// parseAction parsed the expression inside delimiter -func parseAction(name, text string) (*Parser, error) { - p, err := Parse(name, fmt.Sprintf("%s%s%s", leftDelim, text, rightDelim)) - // when error happens, p will be nil, so we need to return here - if err != nil { - return p, err - } - p.Root = p.Root.Nodes[0].(*ListNode) - return p, nil -} - -func (p *Parser) Parse(text string) error { - p.input = text - p.Root = newList() - p.pos = 0 - return p.parseText(p.Root) -} - -// consumeText return the parsed text since last cosumeText -func (p *Parser) consumeText() string { - value := p.input[p.start:p.pos] - p.start = p.pos - return value -} - -// next returns the next rune in the input. -func (p *Parser) next() rune { - if int(p.pos) >= len(p.input) { - p.width = 0 - return eof - } - r, w := utf8.DecodeRuneInString(p.input[p.pos:]) - p.width = w - p.pos += p.width - return r -} - -// peek returns but does not consume the next rune in the input. -func (p *Parser) peek() rune { - r := p.next() - p.backup() - return r -} - -// backup steps back one rune. Can only be called once per call of next. -func (p *Parser) backup() { - p.pos -= p.width -} - -func (p *Parser) parseText(cur *ListNode) error { - for { - if strings.HasPrefix(p.input[p.pos:], leftDelim) { - if p.pos > p.start { - cur.append(newText(p.consumeText())) - } - return p.parseLeftDelim(cur) - } - if p.next() == eof { - break - } - } - // Correctly reached EOF. - if p.pos > p.start { - cur.append(newText(p.consumeText())) - } - return nil -} - -// parseLeftDelim scans the left delimiter, which is known to be present. -func (p *Parser) parseLeftDelim(cur *ListNode) error { - p.pos += len(leftDelim) - p.consumeText() - newNode := newList() - cur.append(newNode) - cur = newNode - return p.parseInsideAction(cur) -} - -func (p *Parser) parseInsideAction(cur *ListNode) error { - prefixMap := map[string]func(*ListNode) error{ - rightDelim: p.parseRightDelim, - "[?(": p.parseFilter, - "..": p.parseRecursive, - } - for prefix, parseFunc := range prefixMap { - if strings.HasPrefix(p.input[p.pos:], prefix) { - return parseFunc(cur) - } - } - - switch r := p.next(); { - case r == eof || isEndOfLine(r): - return fmt.Errorf("unclosed action") - case r == ' ': - p.consumeText() - case r == '@' || r == '$': //the current object, just pass it - p.consumeText() - case r == '[': - return p.parseArray(cur) - case r == '"': - return p.parseQuote(cur) - case r == '.': - return p.parseField(cur) - case r == '+' || r == '-' || unicode.IsDigit(r): - p.backup() - return p.parseNumber(cur) - case isAlphaNumeric(r): - p.backup() - return p.parseIdentifier(cur) - default: - return fmt.Errorf("unrecognized character in action: %#U", r) - } - return p.parseInsideAction(cur) -} - -// parseRightDelim scans the right delimiter, which is known to be present. -func (p *Parser) parseRightDelim(cur *ListNode) error { - p.pos += len(rightDelim) - p.consumeText() - cur = p.Root - return p.parseText(cur) -} - -// parseIdentifier scans build-in keywords, like "range" "end" -func (p *Parser) parseIdentifier(cur *ListNode) error { - var r rune - for { - r = p.next() - if isTerminator(r) { - p.backup() - break - } - } - value := p.consumeText() - cur.append(newIdentifier(value)) - return p.parseInsideAction(cur) -} - -// parseRecursive scans the recursive desent operator .. -func (p *Parser) parseRecursive(cur *ListNode) error { - p.pos += len("..") - p.consumeText() - cur.append(newRecursive()) - if r := p.peek(); isAlphaNumeric(r) { - return p.parseField(cur) - } - return p.parseInsideAction(cur) -} - -// parseNumber scans number -func (p *Parser) parseNumber(cur *ListNode) error { - r := p.peek() - if r == '+' || r == '-' { - r = p.next() - } - for { - r = p.next() - if r != '.' && !unicode.IsDigit(r) { - p.backup() - break - } - } - value := p.consumeText() - i, err := strconv.Atoi(value) - if err == nil { - cur.append(newInt(i)) - return p.parseInsideAction(cur) - } - d, err := strconv.ParseFloat(value, 64) - if err == nil { - cur.append(newFloat(d)) - return p.parseInsideAction(cur) - } - return fmt.Errorf("cannot parse number %s", value) -} - -// parseArray scans array index selection -func (p *Parser) parseArray(cur *ListNode) error { -Loop: - for { - switch p.next() { - case eof, '\n': - return fmt.Errorf("unterminated array") - case ']': - break Loop - } - } - text := p.consumeText() - text = string(text[1 : len(text)-1]) - if text == "*" { - text = ":" - } - - //union operator - strs := strings.Split(text, ",") - if len(strs) > 1 { - union := []*ListNode{} - for _, str := range strs { - parser, err := parseAction("union", fmt.Sprintf("[%s]", strings.Trim(str, " "))) - if err != nil { - return err - } - union = append(union, parser.Root) - } - cur.append(newUnion(union)) - return p.parseInsideAction(cur) - } - - // dict key - reg := regexp.MustCompile(`^'([^']*)'$`) - value := reg.FindStringSubmatch(text) - if value != nil { - parser, err := parseAction("arraydict", fmt.Sprintf(".%s", value[1])) - if err != nil { - return err - } - for _, node := range parser.Root.Nodes { - cur.append(node) - } - return p.parseInsideAction(cur) - } - - //slice operator - reg = regexp.MustCompile(`^(-?[\d]*)(:-?[\d]*)?(:[\d]*)?$`) - value = reg.FindStringSubmatch(text) - if value == nil { - return fmt.Errorf("invalid array index %s", text) - } - value = value[1:] - params := [3]ParamsEntry{} - for i := 0; i < 3; i++ { - if value[i] != "" { - if i > 0 { - value[i] = value[i][1:] - } - if i > 0 && value[i] == "" { - params[i].Known = false - } else { - var err error - params[i].Known = true - params[i].Value, err = strconv.Atoi(value[i]) - if err != nil { - return fmt.Errorf("array index %s is not a number", value[i]) - } - } - } else { - if i == 1 { - params[i].Known = true - params[i].Value = params[0].Value + 1 - } else { - params[i].Known = false - params[i].Value = 0 - } - } - } - cur.append(newArray(params)) - return p.parseInsideAction(cur) -} - -// parseFilter scans filter inside array selection -func (p *Parser) parseFilter(cur *ListNode) error { - p.pos += len("[?(") - p.consumeText() -Loop: - for { - switch p.next() { - case eof, '\n': - return fmt.Errorf("unterminated filter") - case ')': - break Loop - } - } - if p.next() != ']' { - return fmt.Errorf("unclosed array expect ]") - } - reg := regexp.MustCompile(`^([^!<>=]+)([!<>=]+)(.+?)$`) - text := p.consumeText() - text = string(text[:len(text)-2]) - value := reg.FindStringSubmatch(text) - if value == nil { - parser, err := parseAction("text", text) - if err != nil { - return err - } - cur.append(newFilter(parser.Root, newList(), "exists")) - } else { - leftParser, err := parseAction("left", value[1]) - if err != nil { - return err - } - rightParser, err := parseAction("right", value[3]) - if err != nil { - return err - } - cur.append(newFilter(leftParser.Root, rightParser.Root, value[2])) - } - return p.parseInsideAction(cur) -} - -// parseQuote unquotes string inside double quote -func (p *Parser) parseQuote(cur *ListNode) error { -Loop: - for { - switch p.next() { - case eof, '\n': - return fmt.Errorf("unterminated quoted string") - case '"': - break Loop - } - } - value := p.consumeText() - s, err := strconv.Unquote(value) - if err != nil { - return fmt.Errorf("unquote string %s error %v", value, err) - } - cur.append(newText(s)) - return p.parseInsideAction(cur) -} - -// parseField scans a field until a terminator -func (p *Parser) parseField(cur *ListNode) error { - p.consumeText() - for p.advance() { - } - value := p.consumeText() - if value == "*" { - cur.append(newWildcard()) - } else { - cur.append(newField(strings.Replace(value, "\\", "", -1))) - } - return p.parseInsideAction(cur) -} - -// advance scans until next non-escaped terminator -func (p *Parser) advance() bool { - r := p.next() - if r == '\\' { - p.next() - } else if isTerminator(r) { - p.backup() - return false - } - return true -} - -// isTerminator reports whether the input is at valid termination character to appear after an identifier. -func isTerminator(r rune) bool { - if isSpace(r) || isEndOfLine(r) { - return true - } - switch r { - case eof, '.', ',', '[', ']', '$', '@', '{', '}': - return true - } - return false -} - -// isSpace reports whether r is a space character. -func isSpace(r rune) bool { - return r == ' ' || r == '\t' -} - -// isEndOfLine reports whether r is an end-of-line character. -func isEndOfLine(r rune) bool { - return r == '\r' || r == '\n' -} - -// isAlphaNumeric reports whether r is an alphabetic, digit, or underscore. -func isAlphaNumeric(r rune) bool { - return r == '_' || unicode.IsLetter(r) || unicode.IsDigit(r) -} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/strategicpatch/patch.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/strategicpatch/patch.go index 49179313..31b66c36 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/strategicpatch/patch.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/strategicpatch/patch.go @@ -23,7 +23,7 @@ import ( "strings" "k8s.io/apimachinery/pkg/util/json" - forkedjson "k8s.io/client-go/pkg/third_party/forked/golang/json" + forkedjson "k8s.io/client-go/third_party/forked/golang/json" "github.com/davecgh/go-spew/spew" "github.com/ghodss/yaml" @@ -48,6 +48,13 @@ const ( deleteFromPrimitiveListDirectivePrefix = "$deleteFromPrimitiveList" ) +// JSONMap is a representations of JSON object encoded as map[string]interface{} +// where the children can be either map[string]interface{}, []interface{} or +// primitive type). +// Operating on JSONMap representation is much faster as it doesn't require any +// json marshaling and/or unmarshaling operations. +type JSONMap map[string]interface{} + // IsPreconditionFailed returns true if the provided error indicates // a precondition failed. func IsPreconditionFailed(err error) bool { @@ -136,11 +143,6 @@ func RequireMetadataKeyUnchanged(key string) PreconditionFunc { } } -// Deprecated: Use the synonym CreateTwoWayMergePatch, instead. -func CreateStrategicMergePatch(original, modified []byte, dataStruct interface{}) ([]byte, error) { - return CreateTwoWayMergePatch(original, modified, dataStruct) -} - // CreateTwoWayMergePatch creates a patch that can be passed to StrategicMergePatch from an original // document and a modified document, which are passed to the method as json encoded content. It will // return a patch that yields the modified document when applied to the original document, or an error @@ -160,12 +162,24 @@ func CreateTwoWayMergePatch(original, modified []byte, dataStruct interface{}, f } } + patchMap, err := CreateTwoWayMergeMapPatch(originalMap, modifiedMap, dataStruct, fns...) + if err != nil { + return nil, err + } + + return json.Marshal(patchMap) +} + +// CreateTwoWayMergeMapPatch creates a patch from an original and modified JSON objects, +// encoded JSONMap. +// The serialized version of the map can then be passed to StrategicMergeMapPatch. +func CreateTwoWayMergeMapPatch(original, modified JSONMap, dataStruct interface{}, fns ...PreconditionFunc) (JSONMap, error) { t, err := getTagStructType(dataStruct) if err != nil { return nil, err } - patchMap, err := diffMaps(originalMap, modifiedMap, t, false, false) + patchMap, err := diffMaps(original, modified, t, false, false) if err != nil { return nil, err } @@ -177,7 +191,7 @@ func CreateTwoWayMergePatch(original, modified []byte, dataStruct interface{}, f } } - return json.Marshal(patchMap) + return patchMap, nil } // Returns a (recursive) strategic merge patch that yields modified when applied to original. @@ -494,12 +508,6 @@ loopB: return patch, nil } -// Deprecated: StrategicMergePatchData is deprecated. Use the synonym StrategicMergePatch, -// instead, which follows the naming convention of evanphx/json-patch. -func StrategicMergePatchData(original, patch []byte, dataStruct interface{}) ([]byte, error) { - return StrategicMergePatch(original, patch, dataStruct) -} - // StrategicMergePatch applies a strategic merge patch. The patch and the original document // must be json encoded content. A patch can be created from an original and a modified document // by calling CreateStrategicMergePatch. @@ -524,12 +532,7 @@ func StrategicMergePatch(original, patch []byte, dataStruct interface{}) ([]byte return nil, errBadJSONDoc } - t, err := getTagStructType(dataStruct) - if err != nil { - return nil, err - } - - result, err := mergeMap(originalMap, patchMap, t, true) + result, err := StrategicMergeMapPatch(originalMap, patchMap, dataStruct) if err != nil { return nil, err } @@ -537,6 +540,17 @@ func StrategicMergePatch(original, patch []byte, dataStruct interface{}) ([]byte return json.Marshal(result) } +// StrategicMergePatch applies a strategic merge patch. The original and patch documents +// must be JSONMap. A patch can be created from an original and modified document by +// calling CreateTwoWayMergeMapPatch. +func StrategicMergeMapPatch(original, patch JSONMap, dataStruct interface{}) (JSONMap, error) { + t, err := getTagStructType(dataStruct) + if err != nil { + return nil, err + } + return mergeMap(original, patch, t, true) +} + func getTagStructType(dataStruct interface{}) (reflect.Type, error) { if dataStruct == nil { return nil, fmt.Errorf(errBadArgTypeFmt, "struct", "nil") diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/testing/fake_handler.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/testing/fake_handler.go deleted file mode 100644 index 6790cfd8..00000000 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/testing/fake_handler.go +++ /dev/null @@ -1,139 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package testing - -import ( - "io/ioutil" - "net/http" - "net/url" - "reflect" - "sync" -) - -// TestInterface is a simple interface providing Errorf, to make injection for -// testing easier (insert 'yo dawg' meme here). -type TestInterface interface { - Errorf(format string, args ...interface{}) - Logf(format string, args ...interface{}) -} - -// LogInterface is a simple interface to allow injection of Logf to report serving errors. -type LogInterface interface { - Logf(format string, args ...interface{}) -} - -// FakeHandler is to assist in testing HTTP requests. Notice that FakeHandler is -// not thread safe and you must not direct traffic to except for the request -// you want to test. You can do this by hiding it in an http.ServeMux. -type FakeHandler struct { - RequestReceived *http.Request - RequestBody string - StatusCode int - ResponseBody string - // For logging - you can use a *testing.T - // This will keep log messages associated with the test. - T LogInterface - - // Enforce "only one use" constraint. - lock sync.Mutex - requestCount int - hasBeenChecked bool - - SkipRequestFn func(verb string, url url.URL) bool -} - -func (f *FakeHandler) SetResponseBody(responseBody string) { - f.lock.Lock() - defer f.lock.Unlock() - f.ResponseBody = responseBody -} - -func (f *FakeHandler) ServeHTTP(response http.ResponseWriter, request *http.Request) { - f.lock.Lock() - defer f.lock.Unlock() - - if f.SkipRequestFn != nil && f.SkipRequestFn(request.Method, *request.URL) { - response.Header().Set("Content-Type", "application/json") - response.WriteHeader(f.StatusCode) - response.Write([]byte(f.ResponseBody)) - return - } - - f.requestCount++ - if f.hasBeenChecked { - panic("got request after having been validated") - } - - f.RequestReceived = request - response.Header().Set("Content-Type", "application/json") - response.WriteHeader(f.StatusCode) - response.Write([]byte(f.ResponseBody)) - - bodyReceived, err := ioutil.ReadAll(request.Body) - if err != nil && f.T != nil { - f.T.Logf("Received read error: %v", err) - } - f.RequestBody = string(bodyReceived) - if f.T != nil { - f.T.Logf("request body: %s", f.RequestBody) - } -} - -func (f *FakeHandler) ValidateRequestCount(t TestInterface, count int) bool { - ok := true - f.lock.Lock() - defer f.lock.Unlock() - if f.requestCount != count { - ok = false - t.Errorf("Expected %d call, but got %d. Only the last call is recorded and checked.", count, f.requestCount) - } - f.hasBeenChecked = true - return ok -} - -// ValidateRequest verifies that FakeHandler received a request with expected path, method, and body. -func (f *FakeHandler) ValidateRequest(t TestInterface, expectedPath, expectedMethod string, body *string) { - f.lock.Lock() - defer f.lock.Unlock() - if f.requestCount != 1 { - t.Logf("Expected 1 call, but got %v. Only the last call is recorded and checked.", f.requestCount) - } - f.hasBeenChecked = true - - expectURL, err := url.Parse(expectedPath) - if err != nil { - t.Errorf("Couldn't parse %v as a URL.", expectedPath) - } - if f.RequestReceived == nil { - t.Errorf("Unexpected nil request received for %s", expectedPath) - return - } - if f.RequestReceived.URL.Path != expectURL.Path { - t.Errorf("Unexpected request path for request %#v, received: %q, expected: %q", f.RequestReceived, f.RequestReceived.URL.Path, expectURL.Path) - } - if e, a := expectURL.Query(), f.RequestReceived.URL.Query(); !reflect.DeepEqual(e, a) { - t.Errorf("Unexpected query for request %#v, received: %q, expected: %q", f.RequestReceived, a, e) - } - if f.RequestReceived.Method != expectedMethod { - t.Errorf("Unexpected method: %q, expected: %q", f.RequestReceived.Method, expectedMethod) - } - if body != nil { - if *body != f.RequestBody { - t.Errorf("Received body:\n%s\n Doesn't match expected body:\n%s", f.RequestBody, *body) - } - } -} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/testing/tmpdir.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/testing/tmpdir.go deleted file mode 100644 index 3b2d885f..00000000 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/testing/tmpdir.go +++ /dev/null @@ -1,44 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package testing - -import ( - "io/ioutil" - "os" -) - -// MkTmpdir creates a temporary directory based upon the prefix passed in. -// If successful, it returns the temporary directory path. The directory can be -// deleted with a call to "os.RemoveAll(...)". -// In case of error, it'll return an empty string and the error. -func MkTmpdir(prefix string) (string, error) { - tmpDir, err := ioutil.TempDir(os.TempDir(), prefix) - if err != nil { - return "", err - } - return tmpDir, nil -} - -// MkTmpdir does the same work as "MkTmpdir", except in case of -// errors, it'll trigger a panic. -func MkTmpdirOrDie(prefix string) string { - tmpDir, err := MkTmpdir(prefix) - if err != nil { - panic(err) - } - return tmpDir -} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/workqueue/delaying_queue.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/workqueue/delaying_queue.go index 9203a8f3..593ad9ad 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/workqueue/delaying_queue.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/workqueue/delaying_queue.go @@ -21,7 +21,7 @@ import ( "time" utilruntime "k8s.io/apimachinery/pkg/util/runtime" - "k8s.io/client-go/pkg/util/clock" + "k8s.io/client-go/util/clock" ) // DelayingInterface is an Interface that can Add an item at a later time. This makes it easier to diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/workqueue/delaying_queue_test.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/workqueue/delaying_queue_test.go index 727949c1..1b766106 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/workqueue/delaying_queue_test.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/workqueue/delaying_queue_test.go @@ -23,7 +23,7 @@ import ( "time" "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/client-go/pkg/util/clock" + "k8s.io/client-go/util/clock" ) func TestSimpleQueue(t *testing.T) { diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/workqueue/rate_limitting_queue_test.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/workqueue/rate_limitting_queue_test.go index f09d2ec9..47100689 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/workqueue/rate_limitting_queue_test.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/workqueue/rate_limitting_queue_test.go @@ -20,7 +20,7 @@ import ( "testing" "time" - "k8s.io/client-go/pkg/util/clock" + "k8s.io/client-go/util/clock" ) func TestRateLimitingQueue(t *testing.T) { diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/version/version.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/version/version.go index 0da3aadd..8c8350d1 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/version/version.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/version/version.go @@ -19,29 +19,16 @@ package version import ( "fmt" "runtime" -) -// Info contains versioning information. -// TODO: Add []string of api versions supported? It's still unclear -// how we'll want to distribute that information. -type Info struct { - Major string `json:"major"` - Minor string `json:"minor"` - GitVersion string `json:"gitVersion"` - GitCommit string `json:"gitCommit"` - GitTreeState string `json:"gitTreeState"` - BuildDate string `json:"buildDate"` - GoVersion string `json:"goVersion"` - Compiler string `json:"compiler"` - Platform string `json:"platform"` -} + apimachineryversion "k8s.io/apimachinery/pkg/version" +) // Get returns the overall codebase version. It's for detecting // what code a binary was built from. -func Get() Info { +func Get() apimachineryversion.Info { // These variables typically come from -ldflags settings and in // their absence fallback to the settings in pkg/version/base.go - return Info{ + return apimachineryversion.Info{ Major: gitMajor, Minor: gitMinor, GitVersion: gitVersion, @@ -53,8 +40,3 @@ func Get() Info { Platform: fmt.Sprintf("%s/%s", runtime.GOOS, runtime.GOARCH), } } - -// String returns info as a human-friendly version string. -func (info Info) String() string { - return info.GitVersion -} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/plugin/pkg/client/auth/gcp/OWNERS b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/plugin/pkg/client/auth/gcp/OWNERS index d75421c5..6cf8db8a 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/plugin/pkg/client/auth/gcp/OWNERS +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/plugin/pkg/client/auth/gcp/OWNERS @@ -1,3 +1,6 @@ -assignees: - - cjcullen - - jlowdermilk +approvers: +- cjcullen +- jlowdermilk +reviewers: +- cjcullen +- jlowdermilk diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/plugin/pkg/client/auth/gcp/gcp.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/plugin/pkg/client/auth/gcp/gcp.go index 84a95767..ac9faf46 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/plugin/pkg/client/auth/gcp/gcp.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/plugin/pkg/client/auth/gcp/gcp.go @@ -31,12 +31,12 @@ import ( "golang.org/x/oauth2" "golang.org/x/oauth2/google" "k8s.io/apimachinery/pkg/util/yaml" - "k8s.io/client-go/pkg/util/jsonpath" - "k8s.io/client-go/rest" + restclient "k8s.io/client-go/rest" + "k8s.io/client-go/util/jsonpath" ) func init() { - if err := rest.RegisterAuthProviderPlugin("gcp", newGCPAuthProvider); err != nil { + if err := restclient.RegisterAuthProviderPlugin("gcp", newGCPAuthProvider); err != nil { glog.Fatalf("Failed to register gcp auth plugin: %v", err) } } @@ -85,10 +85,10 @@ func init() { // type gcpAuthProvider struct { tokenSource oauth2.TokenSource - persister rest.AuthProviderConfigPersister + persister restclient.AuthProviderConfigPersister } -func newGCPAuthProvider(_ string, gcpConfig map[string]string, persister rest.AuthProviderConfigPersister) (rest.AuthProvider, error) { +func newGCPAuthProvider(_ string, gcpConfig map[string]string, persister restclient.AuthProviderConfigPersister) (restclient.AuthProvider, error) { cmd, useCmd := gcpConfig["cmd-path"] var ts oauth2.TokenSource var err error @@ -121,11 +121,11 @@ type cachedTokenSource struct { source oauth2.TokenSource accessToken string expiry time.Time - persister rest.AuthProviderConfigPersister + persister restclient.AuthProviderConfigPersister cache map[string]string } -func newCachedTokenSource(accessToken, expiry string, persister rest.AuthProviderConfigPersister, ts oauth2.TokenSource, cache map[string]string) (*cachedTokenSource, error) { +func newCachedTokenSource(accessToken, expiry string, persister restclient.AuthProviderConfigPersister, ts oauth2.TokenSource, cache map[string]string) (*cachedTokenSource, error) { var expiryTime time.Time if parsedTime, err := time.Parse(time.RFC3339Nano, expiry); err == nil { expiryTime = parsedTime diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/plugin/pkg/client/auth/oidc/OWNERS b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/plugin/pkg/client/auth/oidc/OWNERS index 2f80bc7e..d2210cb8 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/plugin/pkg/client/auth/oidc/OWNERS +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/plugin/pkg/client/auth/oidc/OWNERS @@ -1,2 +1,4 @@ -assignees: - - ericchiang +approvers: +- ericchiang +reviewers: +- ericchiang diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/plugin/pkg/client/auth/oidc/oidc.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/plugin/pkg/client/auth/oidc/oidc.go index 606be453..ca5b72cb 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/plugin/pkg/client/auth/oidc/oidc.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/plugin/pkg/client/auth/oidc/oidc.go @@ -30,7 +30,7 @@ import ( "github.com/coreos/go-oidc/oidc" "github.com/golang/glog" - "k8s.io/client-go/rest" + restclient "k8s.io/client-go/rest" ) const ( @@ -45,7 +45,7 @@ const ( ) func init() { - if err := rest.RegisterAuthProviderPlugin("oidc", newOIDCAuthProvider); err != nil { + if err := restclient.RegisterAuthProviderPlugin("oidc", newOIDCAuthProvider); err != nil { glog.Fatalf("Failed to register oidc auth plugin: %v", err) } } @@ -106,7 +106,7 @@ func (c *clientCache) setClient(issuer, clientID, clientSecret string, client *o return client } -func newOIDCAuthProvider(_ string, cfg map[string]string, persister rest.AuthProviderConfigPersister) (rest.AuthProvider, error) { +func newOIDCAuthProvider(_ string, cfg map[string]string, persister restclient.AuthProviderConfigPersister) (restclient.AuthProvider, error) { issuer := cfg[cfgIssuerUrl] if issuer == "" { return nil, fmt.Errorf("Must provide %s", cfgIssuerUrl) @@ -136,14 +136,14 @@ func newOIDCAuthProvider(_ string, cfg map[string]string, persister rest.AuthPro } } - clientConfig := rest.Config{ - TLSClientConfig: rest.TLSClientConfig{ + clientConfig := restclient.Config{ + TLSClientConfig: restclient.TLSClientConfig{ CAFile: cfg[cfgCertificateAuthority], CAData: certAuthData, }, } - trans, err := rest.TransportFor(&clientConfig) + trans, err := restclient.TransportFor(&clientConfig) if err != nil { return nil, err } @@ -191,7 +191,7 @@ type oidcAuthProvider struct { // the RoundTripper only trigger a single refresh request. mu sync.Mutex cfg map[string]string - persister rest.AuthProviderConfigPersister + persister restclient.AuthProviderConfigPersister } func (p *oidcAuthProvider) WrapTransport(rt http.RoundTripper) http.RoundTripper { diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/rest/client.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/rest/client.go index b5325bf5..524e0d8e 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/rest/client.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/rest/client.go @@ -28,8 +28,8 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/client-go/pkg/api" - "k8s.io/client-go/pkg/util/flowcontrol" + "k8s.io/apimachinery/pkg/types" + "k8s.io/client-go/util/flowcontrol" ) const ( @@ -45,7 +45,7 @@ type Interface interface { Verb(verb string) *Request Post() *Request Put() *Request - Patch(pt api.PatchType) *Request + Patch(pt types.PatchType) *Request Get() *Request Delete() *Request APIVersion() schema.GroupVersion @@ -238,7 +238,7 @@ func (c *RESTClient) Put() *Request { } // Patch begins a PATCH request. Short for c.Verb("Patch"). -func (c *RESTClient) Patch(pt api.PatchType) *Request { +func (c *RESTClient) Patch(pt types.PatchType) *Request { return c.Verb("PATCH").SetHeader("Content-Type", string(pt)) } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/rest/client_test.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/rest/client_test.go index b095b34e..51dd61b9 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/rest/client_test.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/rest/client_test.go @@ -27,14 +27,15 @@ import ( "fmt" + "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/diff" "k8s.io/client-go/pkg/api" - "k8s.io/client-go/pkg/api/errors" "k8s.io/client-go/pkg/api/testapi" - utiltesting "k8s.io/client-go/pkg/util/testing" + utiltesting "k8s.io/client-go/util/testing" ) type TestParam struct { @@ -271,7 +272,7 @@ func TestHttpMethods(t *testing.T) { t.Errorf("Delete : Object returned should not be nil") } - request = c.Patch(api.JSONPatchType) + request = c.Patch(types.JSONPatchType) if request == nil { t.Errorf("Patch : Object returned should not be nil") } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/rest/config.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/rest/config.go index 53a2385c..e491d0b1 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/rest/config.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/rest/config.go @@ -33,10 +33,10 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/client-go/pkg/api" - certutil "k8s.io/client-go/pkg/util/cert" - "k8s.io/client-go/pkg/util/flowcontrol" "k8s.io/client-go/pkg/version" clientcmdapi "k8s.io/client-go/tools/clientcmd/api" + certutil "k8s.io/client-go/util/cert" + "k8s.io/client-go/util/flowcontrol" ) const ( diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/rest/config_test.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/rest/config_test.go index 1447ab67..e1ee26b4 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/rest/config_test.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/rest/config_test.go @@ -30,8 +30,8 @@ import ( "k8s.io/apimachinery/pkg/util/diff" "k8s.io/client-go/pkg/api" "k8s.io/client-go/pkg/api/testapi" - "k8s.io/client-go/pkg/util/flowcontrol" clientcmdapi "k8s.io/client-go/tools/clientcmd/api" + "k8s.io/client-go/util/flowcontrol" ) func TestIsConfigTransportTLS(t *testing.T) { diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/rest/fake/fake.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/rest/fake/fake.go index 84f04783..8903a458 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/rest/fake/fake.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/rest/fake/fake.go @@ -24,10 +24,11 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/pkg/api" "k8s.io/client-go/pkg/api/testapi" - "k8s.io/client-go/pkg/util/flowcontrol" - "k8s.io/client-go/rest" + restclient "k8s.io/client-go/rest" + "k8s.io/client-go/util/flowcontrol" ) func CreateHTTPClient(roundTripper func(*http.Request) (*http.Response, error)) *http.Client { @@ -53,27 +54,27 @@ type RESTClient struct { Err error } -func (c *RESTClient) Get() *rest.Request { +func (c *RESTClient) Get() *restclient.Request { return c.request("GET") } -func (c *RESTClient) Put() *rest.Request { +func (c *RESTClient) Put() *restclient.Request { return c.request("PUT") } -func (c *RESTClient) Patch(_ api.PatchType) *rest.Request { +func (c *RESTClient) Patch(_ types.PatchType) *restclient.Request { return c.request("PATCH") } -func (c *RESTClient) Post() *rest.Request { +func (c *RESTClient) Post() *restclient.Request { return c.request("POST") } -func (c *RESTClient) Delete() *rest.Request { +func (c *RESTClient) Delete() *restclient.Request { return c.request("DELETE") } -func (c *RESTClient) Verb(verb string) *rest.Request { +func (c *RESTClient) Verb(verb string) *restclient.Request { return c.request(verb) } @@ -85,8 +86,8 @@ func (c *RESTClient) GetRateLimiter() flowcontrol.RateLimiter { return nil } -func (c *RESTClient) request(verb string) *rest.Request { - config := rest.ContentConfig{ +func (c *RESTClient) request(verb string) *restclient.Request { + config := restclient.ContentConfig{ ContentType: runtime.ContentTypeJSON, GroupVersion: &api.Registry.GroupOrDie(api.GroupName).GroupVersion, NegotiatedSerializer: c.NegotiatedSerializer, @@ -103,7 +104,7 @@ func (c *RESTClient) request(verb string) *rest.Request { Version: runtime.APIVersionInternal, } internalVersion.Version = runtime.APIVersionInternal - serializers := rest.Serializers{ + serializers := restclient.Serializers{ Encoder: ns.EncoderForVersion(info.Serializer, api.Registry.GroupOrDie(api.GroupName).GroupVersion), Decoder: ns.DecoderToVersion(info.Serializer, internalVersion), } @@ -111,7 +112,7 @@ func (c *RESTClient) request(verb string) *rest.Request { serializers.StreamingSerializer = info.StreamSerializer.Serializer serializers.Framer = info.StreamSerializer.Framer } - return rest.NewRequest(c, verb, &url.URL{Host: "localhost"}, "", config, serializers, nil, nil) + return restclient.NewRequest(c, verb, &url.URL{Host: "localhost"}, "", config, serializers, nil, nil) } func (c *RESTClient) Do(req *http.Request) (*http.Response, error) { diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/rest/request.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/rest/request.go index 28464950..7641af32 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/rest/request.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/rest/request.go @@ -18,6 +18,7 @@ package rest import ( "bytes" + "context" "encoding/hex" "fmt" "io" @@ -32,7 +33,9 @@ import ( "time" "github.com/golang/glog" + "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" @@ -40,13 +43,10 @@ import ( "k8s.io/apimachinery/pkg/util/net" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/watch" - "k8s.io/client-go/pkg/api/errors" "k8s.io/client-go/pkg/api/v1" - pathvalidation "k8s.io/client-go/pkg/api/validation/path" - "k8s.io/client-go/pkg/fields" - "k8s.io/client-go/pkg/util/flowcontrol" restclientwatch "k8s.io/client-go/rest/watch" "k8s.io/client-go/tools/metrics" + "k8s.io/client-go/util/flowcontrol" ) var ( @@ -105,16 +105,14 @@ type Request struct { resource string resourceName string subresource string - selector labels.Selector timeout time.Duration // output err error body io.Reader - // The constructed request and the response - req *http.Request - resp *http.Response + // This is only used for per-request timeouts, deadlines, and cancellations. + ctx context.Context backoffMgr BackoffManager throttle flowcontrol.RateLimiter @@ -180,7 +178,7 @@ func (r *Request) Resource(resource string) *Request { r.err = fmt.Errorf("resource already set to %q, cannot change to %q", r.resource, resource) return r } - if msgs := pathvalidation.IsValidPathSegmentName(resource); len(msgs) != 0 { + if msgs := IsValidPathSegmentName(resource); len(msgs) != 0 { r.err = fmt.Errorf("invalid resource %q: %v", resource, msgs) return r } @@ -200,7 +198,7 @@ func (r *Request) SubResource(subresources ...string) *Request { return r } for _, s := range subresources { - if msgs := pathvalidation.IsValidPathSegmentName(s); len(msgs) != 0 { + if msgs := IsValidPathSegmentName(s); len(msgs) != 0 { r.err = fmt.Errorf("invalid subresource %q: %v", s, msgs) return r } @@ -222,7 +220,7 @@ func (r *Request) Name(resourceName string) *Request { r.err = fmt.Errorf("resource name already set to %q, cannot change to %q", r.resourceName, resourceName) return r } - if msgs := pathvalidation.IsValidPathSegmentName(resourceName); len(msgs) != 0 { + if msgs := IsValidPathSegmentName(resourceName); len(msgs) != 0 { r.err = fmt.Errorf("invalid resource name %q: %v", resourceName, msgs) return r } @@ -239,7 +237,7 @@ func (r *Request) Namespace(namespace string) *Request { r.err = fmt.Errorf("namespace already set to %q, cannot change to %q", r.namespace, namespace) return r } - if msgs := pathvalidation.IsValidPathSegmentName(namespace); len(msgs) != 0 { + if msgs := IsValidPathSegmentName(namespace); len(msgs) != 0 { r.err = fmt.Errorf("invalid namespace %q: %v", namespace, msgs) return r } @@ -566,6 +564,13 @@ func (r *Request) Body(obj interface{}) *Request { return r } +// Context adds a context to the request. Contexts are only used for +// timeouts, deadlines, and cancellations. +func (r *Request) Context(ctx context.Context) *Request { + r.ctx = ctx + return r +} + // URL returns the current working URL. func (r *Request) URL() *url.URL { p := r.pathPrefix @@ -651,6 +656,9 @@ func (r *Request) Watch() (watch.Interface, error) { if err != nil { return nil, err } + if r.ctx != nil { + req = req.WithContext(r.ctx) + } req.Header = r.headers client := r.client if client == nil { @@ -720,6 +728,9 @@ func (r *Request) Stream() (io.ReadCloser, error) { if err != nil { return nil, err } + if r.ctx != nil { + req = req.WithContext(r.ctx) + } req.Header = r.headers client := r.client if client == nil { @@ -748,10 +759,11 @@ func (r *Request) Stream() (io.ReadCloser, error) { defer resp.Body.Close() result := r.transformResponse(resp, req) - if result.err != nil { - return nil, result.err + err := result.Error() + if err == nil { + err = fmt.Errorf("%d while accessing %v: %s", result.statusCode, url, string(result.body)) } - return nil, fmt.Errorf("%d while accessing %v: %s", result.statusCode, url, string(result.body)) + return nil, err } } @@ -794,6 +806,9 @@ func (r *Request) request(fn func(*http.Request, *http.Response)) error { if err != nil { return err } + if r.ctx != nil { + req = req.WithContext(r.ctx) + } req.Header = r.headers r.backoffMgr.Sleep(r.backoffMgr.CalculateBackoff(r.URL())) @@ -1182,3 +1197,49 @@ func (r Result) Error() error { } return r.err } + +// NameMayNotBe specifies strings that cannot be used as names specified as path segments (like the REST API or etcd store) +var NameMayNotBe = []string{".", ".."} + +// NameMayNotContain specifies substrings that cannot be used in names specified as path segments (like the REST API or etcd store) +var NameMayNotContain = []string{"/", "%"} + +// IsValidPathSegmentName validates the name can be safely encoded as a path segment +func IsValidPathSegmentName(name string) []string { + for _, illegalName := range NameMayNotBe { + if name == illegalName { + return []string{fmt.Sprintf(`may not be '%s'`, illegalName)} + } + } + + var errors []string + for _, illegalContent := range NameMayNotContain { + if strings.Contains(name, illegalContent) { + errors = append(errors, fmt.Sprintf(`may not contain '%s'`, illegalContent)) + } + } + + return errors +} + +// IsValidPathSegmentPrefix validates the name can be used as a prefix for a name which will be encoded as a path segment +// It does not check for exact matches with disallowed names, since an arbitrary suffix might make the name valid +func IsValidPathSegmentPrefix(name string) []string { + var errors []string + for _, illegalContent := range NameMayNotContain { + if strings.Contains(name, illegalContent) { + errors = append(errors, fmt.Sprintf(`may not contain '%s'`, illegalContent)) + } + } + + return errors +} + +// ValidatePathSegmentName validates the name can be safely encoded as a path segment +func ValidatePathSegmentName(name string, prefix bool) []string { + if prefix { + return IsValidPathSegmentPrefix(name) + } else { + return IsValidPathSegmentName(name) + } +} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/rest/request_test.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/rest/request_test.go index 7ab9e9cd..e7b68c0e 100755 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/rest/request_test.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/rest/request_test.go @@ -18,6 +18,7 @@ package rest import ( "bytes" + "context" "errors" "fmt" "io" @@ -33,6 +34,7 @@ import ( "testing" "time" + apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" @@ -41,15 +43,14 @@ import ( "k8s.io/apimachinery/pkg/util/diff" "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/pkg/api" - apierrors "k8s.io/client-go/pkg/api/errors" "k8s.io/client-go/pkg/api/testapi" "k8s.io/client-go/pkg/api/v1" - "k8s.io/client-go/pkg/util/clock" - "k8s.io/client-go/pkg/util/flowcontrol" "k8s.io/client-go/pkg/util/httpstream" "k8s.io/client-go/pkg/util/intstr" - utiltesting "k8s.io/client-go/pkg/util/testing" restclientwatch "k8s.io/client-go/rest/watch" + "k8s.io/client-go/util/clock" + "k8s.io/client-go/util/flowcontrol" + utiltesting "k8s.io/client-go/util/testing" ) func TestNewRequestSetsAccept(t *testing.T) { @@ -241,7 +242,7 @@ func TestRequestVersionedParams(t *testing.T) { func TestRequestVersionedParamsFromListOptions(t *testing.T) { r := &Request{content: ContentConfig{GroupVersion: &v1.SchemeGroupVersion}} - r.VersionedParams(&api.ListOptions{ResourceVersion: "1"}, api.ParameterCodec) + r.VersionedParams(&metav1.ListOptions{ResourceVersion: "1"}, api.ParameterCodec) if !reflect.DeepEqual(r.params, url.Values{ "resourceVersion": []string{"1"}, }) { @@ -249,7 +250,7 @@ func TestRequestVersionedParamsFromListOptions(t *testing.T) { } var timeout int64 = 10 - r.VersionedParams(&api.ListOptions{ResourceVersion: "2", TimeoutSeconds: &timeout}, api.ParameterCodec) + r.VersionedParams(&metav1.ListOptions{ResourceVersion: "2", TimeoutSeconds: &timeout}, api.ParameterCodec) if !reflect.DeepEqual(r.params, url.Values{ "resourceVersion": []string{"1", "2"}, "timeoutSeconds": []string{"10"}, @@ -867,6 +868,7 @@ func TestRequestStream(t *testing.T) { testCases := []struct { Request *Request Err bool + ErrFn func(error) bool }{ { Request: &Request{err: errors.New("bail")}, @@ -902,6 +904,26 @@ func TestRequestStream(t *testing.T) { }, Err: true, }, + { + Request: &Request{ + client: clientFunc(func(req *http.Request) (*http.Response, error) { + return &http.Response{ + StatusCode: http.StatusBadRequest, + Body: ioutil.NopCloser(bytes.NewReader([]byte(`{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"a container name must be specified for pod kube-dns-v20-mz5cv, choose one of: [kubedns dnsmasq healthz]","reason":"BadRequest","code":400}`))), + }, nil + }), + content: defaultContentConfig(), + serializers: defaultSerializers(), + baseURL: &url.URL{}, + }, + Err: true, + ErrFn: func(err error) bool { + if err.Error() == "a container name must be specified for pod kube-dns-v20-mz5cv, choose one of: [kubedns dnsmasq healthz]" { + return true + } + return false + }, + }, } for i, testCase := range testCases { testCase.Request.backoffMgr = &NoBackoff{} @@ -913,6 +935,12 @@ func TestRequestStream(t *testing.T) { if hasErr && body != nil { t.Errorf("%d: body should be nil when error is returned", i) } + + if hasErr { + if testCase.ErrFn != nil && !testCase.ErrFn(err) { + t.Errorf("unexpected error: %v", err) + } + } } } @@ -1217,7 +1245,7 @@ func BenchmarkCheckRetryClosesBody(b *testing.B) { } func TestDoRequestNewWayReader(t *testing.T) { - reqObj := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}} + reqObj := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} reqBodyExpected, _ := runtime.Encode(testapi.Default.Codec(), reqObj) expectedObj := &api.Service{Spec: api.ServiceSpec{Ports: []api.ServicePort{{ Protocol: "TCP", @@ -1257,7 +1285,7 @@ func TestDoRequestNewWayReader(t *testing.T) { } func TestDoRequestNewWayObj(t *testing.T) { - reqObj := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}} + reqObj := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} reqBodyExpected, _ := runtime.Encode(testapi.Default.Codec(), reqObj) expectedObj := &api.Service{Spec: api.ServiceSpec{Ports: []api.ServicePort{{ Protocol: "TCP", @@ -1297,7 +1325,7 @@ func TestDoRequestNewWayObj(t *testing.T) { } func TestDoRequestNewWayFile(t *testing.T) { - reqObj := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}} + reqObj := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} reqBodyExpected, err := runtime.Encode(testapi.Default.Codec(), reqObj) if err != nil { t.Errorf("unexpected error: %v", err) @@ -1354,7 +1382,7 @@ func TestDoRequestNewWayFile(t *testing.T) { } func TestWasCreated(t *testing.T) { - reqObj := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}} + reqObj := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} reqBodyExpected, err := runtime.Encode(testapi.Default.Codec(), reqObj) if err != nil { t.Errorf("unexpected error: %v", err) @@ -1491,7 +1519,7 @@ func TestUnacceptableParamNames(t *testing.T) { func TestBody(t *testing.T) { const data = "test payload" - obj := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}} + obj := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} bodyExpected, _ := runtime.Encode(testapi.Default.Codec(), obj) f, err := ioutil.TempFile("", "test_body") @@ -1555,9 +1583,9 @@ func TestWatch(t *testing.T) { t watch.EventType obj runtime.Object }{ - {watch.Added, &api.Pod{ObjectMeta: api.ObjectMeta{Name: "first"}}}, - {watch.Modified, &api.Pod{ObjectMeta: api.ObjectMeta{Name: "second"}}}, - {watch.Deleted, &api.Pod{ObjectMeta: api.ObjectMeta{Name: "last"}}}, + {watch.Added, &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "first"}}}, + {watch.Modified, &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "second"}}}, + {watch.Deleted, &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "last"}}}, } testServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { @@ -1651,3 +1679,32 @@ func testRESTClient(t testing.TB, srv *httptest.Server) *RESTClient { } return client } + +func TestDoContext(t *testing.T) { + receivedCh := make(chan struct{}) + block := make(chan struct{}) + testServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + close(receivedCh) + <-block + w.WriteHeader(http.StatusOK) + })) + defer testServer.Close() + defer close(block) + + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + + go func() { + <-receivedCh + cancel() + }() + + c := testRESTClient(t, testServer) + _, err := c.Verb("GET"). + Context(ctx). + Prefix("foo"). + DoRaw() + if err == nil { + t.Fatal("Expected context cancellation error") + } +} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/rest/urlbackoff.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/rest/urlbackoff.go index 3ccb2140..eff848ab 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/rest/urlbackoff.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/rest/urlbackoff.go @@ -22,7 +22,7 @@ import ( "github.com/golang/glog" "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/client-go/pkg/util/flowcontrol" + "k8s.io/client-go/util/flowcontrol" ) // Set of resp. Codes that we backoff for. diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/rest/urlbackoff_test.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/rest/urlbackoff_test.go index c01d40c7..c5f43923 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/rest/urlbackoff_test.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/rest/urlbackoff_test.go @@ -21,7 +21,7 @@ import ( "testing" "time" - "k8s.io/client-go/pkg/util/flowcontrol" + "k8s.io/client-go/util/flowcontrol" ) func parse(raw string) *url.URL { diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/rest/watch/decoder_test.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/rest/watch/decoder_test.go index e84d51c0..312c2875 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/rest/watch/decoder_test.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/rest/watch/decoder_test.go @@ -40,7 +40,7 @@ func TestDecoder(t *testing.T) { codec := testapi.Default.Codec() decoder := restclientwatch.NewDecoder(streaming.NewDecoder(out, codec), codec) - expect := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}} + expect := &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} encoder := json.NewEncoder(in) go func() { data, err := runtime.Encode(testapi.Default.Codec(), expect) diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/rest/watch/encoder_test.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/rest/watch/encoder_test.go index d0341ce4..31f3610c 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/rest/watch/encoder_test.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/rest/watch/encoder_test.go @@ -21,6 +21,7 @@ import ( "io/ioutil" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/serializer/streaming" "k8s.io/apimachinery/pkg/watch" @@ -37,17 +38,17 @@ func TestEncodeDecodeRoundTrip(t *testing.T) { }{ { watch.Added, - &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}}, + &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}, testapi.Default.Codec(), }, { watch.Modified, - &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}}, + &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}, testapi.Default.Codec(), }, { watch.Deleted, - &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}}, + &api.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}, testapi.Default.Codec(), }, } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/testing/actions.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/testing/actions.go index 3af5f74d..fdcebc9b 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/testing/actions.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/testing/actions.go @@ -21,12 +21,11 @@ import ( "path" "strings" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/client-go/pkg/api" - "k8s.io/client-go/pkg/api/v1" - "k8s.io/client-go/pkg/fields" ) func NewRootGetAction(resource schema.GroupVersionResource, name string) GetActionImpl { @@ -224,22 +223,18 @@ func NewRootWatchAction(resource schema.GroupVersionResource, opts interface{}) func ExtractFromListOptions(opts interface{}) (labelSelector labels.Selector, fieldSelector fields.Selector, resourceVersion string) { var err error switch t := opts.(type) { - case api.ListOptions: - labelSelector = t.LabelSelector - fieldSelector = t.FieldSelector - resourceVersion = t.ResourceVersion - case v1.ListOptions: + case metav1.ListOptions: labelSelector, err = labels.Parse(t.LabelSelector) if err != nil { - panic(err) + panic(fmt.Errorf("invalid selector %q: %v", t.LabelSelector, err)) } fieldSelector, err = fields.ParseSelector(t.FieldSelector) if err != nil { - panic(err) + panic(fmt.Errorf("invalid selector %q: %v", t.FieldSelector, err)) } resourceVersion = t.ResourceVersion default: - panic(fmt.Errorf("expect a ListOptions")) + panic(fmt.Errorf("expect a ListOptions %T", opts)) } if labelSelector == nil { labelSelector = labels.Everything() diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/testing/fake.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/testing/fake.go index e18814b3..da47b23b 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/testing/fake.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/testing/fake.go @@ -23,9 +23,10 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/version" "k8s.io/apimachinery/pkg/watch" - "k8s.io/client-go/pkg/version" - "k8s.io/client-go/rest" + kubeversion "k8s.io/client-go/pkg/version" + restclient "k8s.io/client-go/rest" ) // Fake implements client.Interface. Meant to be embedded into a struct to get @@ -76,7 +77,7 @@ type ProxyReactor interface { Handles(action Action) bool // React handles a watch action and returns results. It may choose to // delegate by indicating handled=false. - React(action Action) (handled bool, ret rest.ResponseWrapper, err error) + React(action Action) (handled bool, ret restclient.ResponseWrapper, err error) } // ReactionFunc is a function that returns an object or error for a given @@ -94,7 +95,7 @@ type WatchReactionFunc func(action Action) (handled bool, ret watch.Interface, e // ProxyReactionFunc is a function that returns a ResponseWrapper interface // for a given Action. If "handled" is false, then the test client will // ignore the results and continue to the next ProxyReactionFunc. -type ProxyReactionFunc func(action Action) (handled bool, ret rest.ResponseWrapper, err error) +type ProxyReactionFunc func(action Action) (handled bool, ret restclient.ResponseWrapper, err error) // AddReactor appends a reactor to the end of the chain. func (c *Fake) AddReactor(verb, resource string, reaction ReactionFunc) { @@ -175,7 +176,7 @@ func (c *Fake) InvokesWatch(action Action) (watch.Interface, error) { // InvokesProxy records the provided Action and then invokes the ReactionFunc // that handles the action if one exists. -func (c *Fake) InvokesProxy(action Action) rest.ResponseWrapper { +func (c *Fake) InvokesProxy(action Action) restclient.ResponseWrapper { c.Lock() defer c.Unlock() @@ -253,6 +254,6 @@ func (c *FakeDiscovery) ServerVersion() (*version.Info, error) { action.Resource = schema.GroupVersionResource{Resource: "version"} c.Invokes(action, nil) - versionInfo := version.Get() + versionInfo := kubeversion.Get() return &versionInfo, nil } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/testing/fixture.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/testing/fixture.go index 555ec478..64a617cf 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/testing/fixture.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/testing/fixture.go @@ -20,14 +20,14 @@ import ( "fmt" "sync" + "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/pkg/api" - "k8s.io/client-go/pkg/api/errors" - "k8s.io/client-go/rest" + restclient "k8s.io/client-go/rest" ) // ObjectTracker keeps track of objects. It is intended to be used to @@ -511,6 +511,6 @@ func (r *SimpleProxyReactor) Handles(action Action) bool { return true } -func (r *SimpleProxyReactor) React(action Action) (bool, rest.ResponseWrapper, error) { +func (r *SimpleProxyReactor) React(action Action) (bool, restclient.ResponseWrapper, error) { return r.Reaction(action) } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/third_party/forked/golang/json/fields.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/third_party/forked/golang/json/fields.go new file mode 100644 index 00000000..1d17270e --- /dev/null +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/third_party/forked/golang/json/fields.go @@ -0,0 +1,501 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package json is forked from the Go standard library to enable us to find the +// field of a struct that a given JSON key maps to. +package json + +import ( + "bytes" + "fmt" + "reflect" + "sort" + "strings" + "sync" + "unicode" + "unicode/utf8" +) + +// Finds the patchStrategy and patchMergeKey struct tag fields on a given +// struct field given the struct type and the JSON name of the field. +// TODO: fix the returned errors to be introspectable. +func LookupPatchMetadata(t reflect.Type, jsonField string) (reflect.Type, string, string, error) { + if t.Kind() == reflect.Map { + return t.Elem(), "", "", nil + } + if t.Kind() != reflect.Struct { + return nil, "", "", fmt.Errorf("merging an object in json but data type is not map or struct, instead is: %s", + t.Kind().String()) + } + jf := []byte(jsonField) + // Find the field that the JSON library would use. + var f *field + fields := cachedTypeFields(t) + for i := range fields { + ff := &fields[i] + if bytes.Equal(ff.nameBytes, jf) { + f = ff + break + } + // Do case-insensitive comparison. + if f == nil && ff.equalFold(ff.nameBytes, jf) { + f = ff + } + } + if f != nil { + // Find the reflect.Value of the most preferential struct field. + tjf := t.Field(f.index[0]) + // we must navigate down all the anonymously included structs in the chain + for i := 1; i < len(f.index); i++ { + tjf = tjf.Type.Field(f.index[i]) + } + patchStrategy := tjf.Tag.Get("patchStrategy") + patchMergeKey := tjf.Tag.Get("patchMergeKey") + return tjf.Type, patchStrategy, patchMergeKey, nil + } + return nil, "", "", fmt.Errorf("unable to find api field in struct %s for the json field %q", t.Name(), jsonField) +} + +// A field represents a single field found in a struct. +type field struct { + name string + nameBytes []byte // []byte(name) + equalFold func(s, t []byte) bool // bytes.EqualFold or equivalent + + tag bool + // index is the sequence of indexes from the containing type fields to this field. + // it is a slice because anonymous structs will need multiple navigation steps to correctly + // resolve the proper fields + index []int + typ reflect.Type + omitEmpty bool + quoted bool +} + +func (f field) String() string { + return fmt.Sprintf("{name: %s, type: %v, tag: %v, index: %v, omitEmpty: %v, quoted: %v}", f.name, f.typ, f.tag, f.index, f.omitEmpty, f.quoted) +} + +func fillField(f field) field { + f.nameBytes = []byte(f.name) + f.equalFold = foldFunc(f.nameBytes) + return f +} + +// byName sorts field by name, breaking ties with depth, +// then breaking ties with "name came from json tag", then +// breaking ties with index sequence. +type byName []field + +func (x byName) Len() int { return len(x) } + +func (x byName) Swap(i, j int) { x[i], x[j] = x[j], x[i] } + +func (x byName) Less(i, j int) bool { + if x[i].name != x[j].name { + return x[i].name < x[j].name + } + if len(x[i].index) != len(x[j].index) { + return len(x[i].index) < len(x[j].index) + } + if x[i].tag != x[j].tag { + return x[i].tag + } + return byIndex(x).Less(i, j) +} + +// byIndex sorts field by index sequence. +type byIndex []field + +func (x byIndex) Len() int { return len(x) } + +func (x byIndex) Swap(i, j int) { x[i], x[j] = x[j], x[i] } + +func (x byIndex) Less(i, j int) bool { + for k, xik := range x[i].index { + if k >= len(x[j].index) { + return false + } + if xik != x[j].index[k] { + return xik < x[j].index[k] + } + } + return len(x[i].index) < len(x[j].index) +} + +// typeFields returns a list of fields that JSON should recognize for the given type. +// The algorithm is breadth-first search over the set of structs to include - the top struct +// and then any reachable anonymous structs. +func typeFields(t reflect.Type) []field { + // Anonymous fields to explore at the current level and the next. + current := []field{} + next := []field{{typ: t}} + + // Count of queued names for current level and the next. + count := map[reflect.Type]int{} + nextCount := map[reflect.Type]int{} + + // Types already visited at an earlier level. + visited := map[reflect.Type]bool{} + + // Fields found. + var fields []field + + for len(next) > 0 { + current, next = next, current[:0] + count, nextCount = nextCount, map[reflect.Type]int{} + + for _, f := range current { + if visited[f.typ] { + continue + } + visited[f.typ] = true + + // Scan f.typ for fields to include. + for i := 0; i < f.typ.NumField(); i++ { + sf := f.typ.Field(i) + if sf.PkgPath != "" { // unexported + continue + } + tag := sf.Tag.Get("json") + if tag == "-" { + continue + } + name, opts := parseTag(tag) + if !isValidTag(name) { + name = "" + } + index := make([]int, len(f.index)+1) + copy(index, f.index) + index[len(f.index)] = i + + ft := sf.Type + if ft.Name() == "" && ft.Kind() == reflect.Ptr { + // Follow pointer. + ft = ft.Elem() + } + + // Record found field and index sequence. + if name != "" || !sf.Anonymous || ft.Kind() != reflect.Struct { + tagged := name != "" + if name == "" { + name = sf.Name + } + fields = append(fields, fillField(field{ + name: name, + tag: tagged, + index: index, + typ: ft, + omitEmpty: opts.Contains("omitempty"), + quoted: opts.Contains("string"), + })) + if count[f.typ] > 1 { + // If there were multiple instances, add a second, + // so that the annihilation code will see a duplicate. + // It only cares about the distinction between 1 or 2, + // so don't bother generating any more copies. + fields = append(fields, fields[len(fields)-1]) + } + continue + } + + // Record new anonymous struct to explore in next round. + nextCount[ft]++ + if nextCount[ft] == 1 { + next = append(next, fillField(field{name: ft.Name(), index: index, typ: ft})) + } + } + } + } + + sort.Sort(byName(fields)) + + // Delete all fields that are hidden by the Go rules for embedded fields, + // except that fields with JSON tags are promoted. + + // The fields are sorted in primary order of name, secondary order + // of field index length. Loop over names; for each name, delete + // hidden fields by choosing the one dominant field that survives. + out := fields[:0] + for advance, i := 0, 0; i < len(fields); i += advance { + // One iteration per name. + // Find the sequence of fields with the name of this first field. + fi := fields[i] + name := fi.name + for advance = 1; i+advance < len(fields); advance++ { + fj := fields[i+advance] + if fj.name != name { + break + } + } + if advance == 1 { // Only one field with this name + out = append(out, fi) + continue + } + dominant, ok := dominantField(fields[i : i+advance]) + if ok { + out = append(out, dominant) + } + } + + fields = out + sort.Sort(byIndex(fields)) + + return fields +} + +// dominantField looks through the fields, all of which are known to +// have the same name, to find the single field that dominates the +// others using Go's embedding rules, modified by the presence of +// JSON tags. If there are multiple top-level fields, the boolean +// will be false: This condition is an error in Go and we skip all +// the fields. +func dominantField(fields []field) (field, bool) { + // The fields are sorted in increasing index-length order. The winner + // must therefore be one with the shortest index length. Drop all + // longer entries, which is easy: just truncate the slice. + length := len(fields[0].index) + tagged := -1 // Index of first tagged field. + for i, f := range fields { + if len(f.index) > length { + fields = fields[:i] + break + } + if f.tag { + if tagged >= 0 { + // Multiple tagged fields at the same level: conflict. + // Return no field. + return field{}, false + } + tagged = i + } + } + if tagged >= 0 { + return fields[tagged], true + } + // All remaining fields have the same length. If there's more than one, + // we have a conflict (two fields named "X" at the same level) and we + // return no field. + if len(fields) > 1 { + return field{}, false + } + return fields[0], true +} + +var fieldCache struct { + sync.RWMutex + m map[reflect.Type][]field +} + +// cachedTypeFields is like typeFields but uses a cache to avoid repeated work. +func cachedTypeFields(t reflect.Type) []field { + fieldCache.RLock() + f := fieldCache.m[t] + fieldCache.RUnlock() + if f != nil { + return f + } + + // Compute fields without lock. + // Might duplicate effort but won't hold other computations back. + f = typeFields(t) + if f == nil { + f = []field{} + } + + fieldCache.Lock() + if fieldCache.m == nil { + fieldCache.m = map[reflect.Type][]field{} + } + fieldCache.m[t] = f + fieldCache.Unlock() + return f +} + +func isValidTag(s string) bool { + if s == "" { + return false + } + for _, c := range s { + switch { + case strings.ContainsRune("!#$%&()*+-./:<=>?@[]^_{|}~ ", c): + // Backslash and quote chars are reserved, but + // otherwise any punctuation chars are allowed + // in a tag name. + default: + if !unicode.IsLetter(c) && !unicode.IsDigit(c) { + return false + } + } + } + return true +} + +const ( + caseMask = ^byte(0x20) // Mask to ignore case in ASCII. + kelvin = '\u212a' + smallLongEss = '\u017f' +) + +// foldFunc returns one of four different case folding equivalence +// functions, from most general (and slow) to fastest: +// +// 1) bytes.EqualFold, if the key s contains any non-ASCII UTF-8 +// 2) equalFoldRight, if s contains special folding ASCII ('k', 'K', 's', 'S') +// 3) asciiEqualFold, no special, but includes non-letters (including _) +// 4) simpleLetterEqualFold, no specials, no non-letters. +// +// The letters S and K are special because they map to 3 runes, not just 2: +// * S maps to s and to U+017F 'ſ' Latin small letter long s +// * k maps to K and to U+212A 'K' Kelvin sign +// See http://play.golang.org/p/tTxjOc0OGo +// +// The returned function is specialized for matching against s and +// should only be given s. It's not curried for performance reasons. +func foldFunc(s []byte) func(s, t []byte) bool { + nonLetter := false + special := false // special letter + for _, b := range s { + if b >= utf8.RuneSelf { + return bytes.EqualFold + } + upper := b & caseMask + if upper < 'A' || upper > 'Z' { + nonLetter = true + } else if upper == 'K' || upper == 'S' { + // See above for why these letters are special. + special = true + } + } + if special { + return equalFoldRight + } + if nonLetter { + return asciiEqualFold + } + return simpleLetterEqualFold +} + +// equalFoldRight is a specialization of bytes.EqualFold when s is +// known to be all ASCII (including punctuation), but contains an 's', +// 'S', 'k', or 'K', requiring a Unicode fold on the bytes in t. +// See comments on foldFunc. +func equalFoldRight(s, t []byte) bool { + for _, sb := range s { + if len(t) == 0 { + return false + } + tb := t[0] + if tb < utf8.RuneSelf { + if sb != tb { + sbUpper := sb & caseMask + if 'A' <= sbUpper && sbUpper <= 'Z' { + if sbUpper != tb&caseMask { + return false + } + } else { + return false + } + } + t = t[1:] + continue + } + // sb is ASCII and t is not. t must be either kelvin + // sign or long s; sb must be s, S, k, or K. + tr, size := utf8.DecodeRune(t) + switch sb { + case 's', 'S': + if tr != smallLongEss { + return false + } + case 'k', 'K': + if tr != kelvin { + return false + } + default: + return false + } + t = t[size:] + + } + if len(t) > 0 { + return false + } + return true +} + +// asciiEqualFold is a specialization of bytes.EqualFold for use when +// s is all ASCII (but may contain non-letters) and contains no +// special-folding letters. +// See comments on foldFunc. +func asciiEqualFold(s, t []byte) bool { + if len(s) != len(t) { + return false + } + for i, sb := range s { + tb := t[i] + if sb == tb { + continue + } + if ('a' <= sb && sb <= 'z') || ('A' <= sb && sb <= 'Z') { + if sb&caseMask != tb&caseMask { + return false + } + } else { + return false + } + } + return true +} + +// simpleLetterEqualFold is a specialization of bytes.EqualFold for +// use when s is all ASCII letters (no underscores, etc) and also +// doesn't contain 'k', 'K', 's', or 'S'. +// See comments on foldFunc. +func simpleLetterEqualFold(s, t []byte) bool { + if len(s) != len(t) { + return false + } + for i, b := range s { + if b&caseMask != t[i]&caseMask { + return false + } + } + return true +} + +// tagOptions is the string following a comma in a struct field's "json" +// tag, or the empty string. It does not include the leading comma. +type tagOptions string + +// parseTag splits a struct field's json tag into its name and +// comma-separated options. +func parseTag(tag string) (string, tagOptions) { + if idx := strings.Index(tag, ","); idx != -1 { + return tag[:idx], tagOptions(tag[idx+1:]) + } + return tag, tagOptions("") +} + +// Contains reports whether a comma-separated list of options +// contains a particular substr flag. substr must be surrounded by a +// string boundary or commas. +func (o tagOptions) Contains(optionName string) bool { + if len(o) == 0 { + return false + } + s := string(o) + for s != "" { + var next string + i := strings.Index(s, ",") + if i >= 0 { + s, next = s[:i], s[i+1:] + } + if s == optionName { + return true + } + s = next + } + return false +} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/third_party/forked/golang/netutil/addr.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/third_party/forked/golang/netutil/addr.go new file mode 100644 index 00000000..c70f431c --- /dev/null +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/third_party/forked/golang/netutil/addr.go @@ -0,0 +1,27 @@ +package netutil + +import ( + "net/url" + "strings" +) + +// FROM: http://golang.org/src/net/http/client.go +// Given a string of the form "host", "host:port", or "[ipv6::address]:port", +// return true if the string includes a port. +func hasPort(s string) bool { return strings.LastIndex(s, ":") > strings.LastIndex(s, "]") } + +// FROM: http://golang.org/src/net/http/transport.go +var portMap = map[string]string{ + "http": "80", + "https": "443", +} + +// FROM: http://golang.org/src/net/http/transport.go +// canonicalAddr returns url.Host but always with a ":port" suffix +func CanonicalAddr(url *url.URL) string { + addr := url.Host + if !hasPort(addr) { + return addr + ":" + portMap[url.Scheme] + } + return addr +} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/auth/clientauth.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/auth/clientauth.go index d820adca..2213b987 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/auth/clientauth.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/auth/clientauth.go @@ -68,7 +68,7 @@ import ( "io/ioutil" "os" - "k8s.io/client-go/rest" + restclient "k8s.io/client-go/rest" ) // Info holds Kubernetes API authorization config. It is intended @@ -104,8 +104,8 @@ func LoadFromFile(path string) (*Info, error) { // MergeWithConfig returns a copy of a client.Config with values from the Info. // The fields of client.Config with a corresponding field in the Info are set // with the value from the Info. -func (info Info) MergeWithConfig(c rest.Config) (rest.Config, error) { - var config rest.Config = c +func (info Info) MergeWithConfig(c restclient.Config) (restclient.Config, error) { + var config restclient.Config = c config.Username = info.User config.Password = info.Password config.CAFile = info.CAFile diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/cache/controller_test.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/cache/controller_test.go index 4f36aac8..56a48c0d 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/cache/controller_test.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/cache/controller_test.go @@ -23,6 +23,7 @@ import ( "testing" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/wait" @@ -101,7 +102,7 @@ func Example() { for _, name := range testIDs { // Note that these pods are not valid-- the fake source doesn't // call validation or anything. - source.Add(&v1.Pod{ObjectMeta: v1.ObjectMeta{Name: name}}) + source.Add(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: name}}) } // Let's wait for the controller to process the things we just added. @@ -158,7 +159,7 @@ func ExampleNewInformer() { for _, name := range testIDs { // Note that these pods are not valid-- the fake source doesn't // call validation or anything. - source.Add(&v1.Pod{ObjectMeta: v1.ObjectMeta{Name: name}}) + source.Add(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: name}}) } // Let's wait for the controller to process the things we just added. @@ -317,7 +318,7 @@ func TestUpdate(t *testing.T) { pod := func(name, check string, final bool) *v1.Pod { p := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Labels: map[string]string{"check": check}, }, @@ -350,12 +351,12 @@ func TestUpdate(t *testing.T) { watchCh := make(chan struct{}) _, controller := NewInformer( &testLW{ - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { watch, err := source.Watch(options) close(watchCh) return watch, err }, - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { return source.List(options) }, }, diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/cache/expiration_cache.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/cache/expiration_cache.go index 10d68c53..befac1c7 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/cache/expiration_cache.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/cache/expiration_cache.go @@ -21,7 +21,7 @@ import ( "time" "github.com/golang/glog" - "k8s.io/client-go/pkg/util/clock" + "k8s.io/client-go/util/clock" ) // ExpirationCache implements the store interface diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/cache/expiration_cache_fakes.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/cache/expiration_cache_fakes.go index e4d4063c..ab2f5768 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/cache/expiration_cache_fakes.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/cache/expiration_cache_fakes.go @@ -18,7 +18,7 @@ package cache import ( "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/client-go/pkg/util/clock" + "k8s.io/client-go/util/clock" ) type fakeThreadSafeMap struct { diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/cache/expiration_cache_test.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/cache/expiration_cache_test.go index 0938e9fc..17139d59 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/cache/expiration_cache_test.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/cache/expiration_cache_test.go @@ -23,7 +23,7 @@ import ( "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/client-go/pkg/util/clock" + "k8s.io/client-go/util/clock" ) func TestTTLExpirationBasic(t *testing.T) { diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/cache/index_test.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/cache/index_test.go index 07cb8ac5..efb21ab9 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/cache/index_test.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/cache/index_test.go @@ -20,6 +20,7 @@ import ( "strings" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/pkg/api" "k8s.io/client-go/pkg/api/v1" ) @@ -32,9 +33,9 @@ func testIndexFunc(obj interface{}) ([]string, error) { func TestGetIndexFuncValues(t *testing.T) { index := NewIndexer(MetaNamespaceKeyFunc, Indexers{"testmodes": testIndexFunc}) - pod1 := &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "one", Labels: map[string]string{"foo": "bar"}}} - pod2 := &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "two", Labels: map[string]string{"foo": "bar"}}} - pod3 := &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "tre", Labels: map[string]string{"foo": "biz"}}} + pod1 := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "one", Labels: map[string]string{"foo": "bar"}}} + pod2 := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "two", Labels: map[string]string{"foo": "bar"}}} + pod3 := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "tre", Labels: map[string]string{"foo": "biz"}}} index.Add(pod1) index.Add(pod2) @@ -62,9 +63,9 @@ func testUsersIndexFunc(obj interface{}) ([]string, error) { func TestMultiIndexKeys(t *testing.T) { index := NewIndexer(MetaNamespaceKeyFunc, Indexers{"byUser": testUsersIndexFunc}) - pod1 := &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "one", Annotations: map[string]string{"users": "ernie,bert"}}} - pod2 := &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "two", Annotations: map[string]string{"users": "bert,oscar"}}} - pod3 := &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "tre", Annotations: map[string]string{"users": "ernie,elmo"}}} + pod1 := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "one", Annotations: map[string]string{"users": "ernie,bert"}}} + pod2 := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "two", Annotations: map[string]string{"users": "bert,oscar"}}} + pod3 := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "tre", Annotations: map[string]string{"users": "ernie,elmo"}}} index.Add(pod1) index.Add(pod2) diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/cache/listers.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/cache/listers.go index 751f1365..27d51a6b 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/cache/listers.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/cache/listers.go @@ -17,22 +17,14 @@ limitations under the License. package cache import ( - "fmt" - "github.com/golang/glog" + + "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/client-go/pkg/api/errors" - "k8s.io/client-go/pkg/api/v1" - apps "k8s.io/client-go/pkg/apis/apps/v1beta1" - certificates "k8s.io/client-go/pkg/apis/certificates/v1alpha1" - extensions "k8s.io/client-go/pkg/apis/extensions/v1beta1" - policy "k8s.io/client-go/pkg/apis/policy/v1beta1" - storageinternal "k8s.io/client-go/pkg/apis/storage" - storage "k8s.io/client-go/pkg/apis/storage/v1beta1" ) // AppendFunc is used to add a matching item to whatever list the caller is using @@ -52,7 +44,7 @@ func ListAll(store Store, selector labels.Selector, appendFn AppendFunc) error { } func ListAllByNamespace(indexer Indexer, namespace string, selector labels.Selector, appendFn AppendFunc) error { - if namespace == v1.NamespaceAll { + if namespace == metav1.NamespaceAll { for _, m := range indexer.List() { metadata, err := meta.Accessor(m) if err != nil { @@ -65,7 +57,7 @@ func ListAllByNamespace(indexer Indexer, namespace string, selector labels.Selec return nil } - items, err := indexer.Index(NamespaceIndex, &v1.ObjectMeta{Namespace: namespace}) + items, err := indexer.Index(NamespaceIndex, &metav1.ObjectMeta{Namespace: namespace}) if err != nil { // Ignore error; do slow search without index. glog.Warningf("can not retrieve list of objects using index : %v", err) @@ -166,315 +158,3 @@ func (s *genericNamespaceLister) Get(name string) (runtime.Object, error) { } return obj.(runtime.Object), nil } - -// TODO: generate these classes and methods for all resources of interest using -// a script. Can use "go generate" once 1.4 is supported by all users. - -// NodeConditionPredicate is a function that indicates whether the given node's conditions meet -// some set of criteria defined by the function. -type NodeConditionPredicate func(node *v1.Node) bool - -// StoreToNodeLister makes a Store have the List method of the client.NodeInterface -// The Store must contain (only) Nodes. -type StoreToNodeLister struct { - Store -} - -func (s *StoreToNodeLister) List() (machines v1.NodeList, err error) { - for _, m := range s.Store.List() { - machines.Items = append(machines.Items, *(m.(*v1.Node))) - } - return machines, nil -} - -// NodeCondition returns a storeToNodeConditionLister -func (s *StoreToNodeLister) NodeCondition(predicate NodeConditionPredicate) storeToNodeConditionLister { - // TODO: Move this filtering server side. Currently our selectors don't facilitate searching through a list so we - // have the reflector filter out the Unschedulable field and sift through node conditions in the lister. - return storeToNodeConditionLister{s.Store, predicate} -} - -// storeToNodeConditionLister filters and returns nodes matching the given type and status from the store. -type storeToNodeConditionLister struct { - store Store - predicate NodeConditionPredicate -} - -// List returns a list of nodes that match the conditions defined by the predicate functions in the storeToNodeConditionLister. -func (s storeToNodeConditionLister) List() (nodes []*v1.Node, err error) { - for _, m := range s.store.List() { - node := m.(*v1.Node) - if s.predicate(node) { - nodes = append(nodes, node) - } else { - glog.V(5).Infof("Node %s matches none of the conditions", node.Name) - } - } - return -} - -// StoreToDaemonSetLister gives a store List and Exists methods. The store must contain only DaemonSets. -type StoreToDaemonSetLister struct { - Store -} - -// Exists checks if the given daemon set exists in the store. -func (s *StoreToDaemonSetLister) Exists(ds *extensions.DaemonSet) (bool, error) { - _, exists, err := s.Store.Get(ds) - if err != nil { - return false, err - } - return exists, nil -} - -// List lists all daemon sets in the store. -// TODO: converge on the interface in pkg/client -func (s *StoreToDaemonSetLister) List() (dss extensions.DaemonSetList, err error) { - for _, c := range s.Store.List() { - dss.Items = append(dss.Items, *(c.(*extensions.DaemonSet))) - } - return dss, nil -} - -// GetPodDaemonSets returns a list of daemon sets managing a pod. -// Returns an error if and only if no matching daemon sets are found. -func (s *StoreToDaemonSetLister) GetPodDaemonSets(pod *v1.Pod) (daemonSets []extensions.DaemonSet, err error) { - var selector labels.Selector - var daemonSet extensions.DaemonSet - - if len(pod.Labels) == 0 { - err = fmt.Errorf("no daemon sets found for pod %v because it has no labels", pod.Name) - return - } - - for _, m := range s.Store.List() { - daemonSet = *m.(*extensions.DaemonSet) - if daemonSet.Namespace != pod.Namespace { - continue - } - selector, err = metav1.LabelSelectorAsSelector(daemonSet.Spec.Selector) - if err != nil { - // this should not happen if the DaemonSet passed validation - return nil, err - } - - // If a daemonSet with a nil or empty selector creeps in, it should match nothing, not everything. - if selector.Empty() || !selector.Matches(labels.Set(pod.Labels)) { - continue - } - daemonSets = append(daemonSets, daemonSet) - } - if len(daemonSets) == 0 { - err = fmt.Errorf("could not find daemon set for pod %s in namespace %s with labels: %v", pod.Name, pod.Namespace, pod.Labels) - } - return -} - -// StoreToEndpointsLister makes a Store that lists endpoints. -type StoreToEndpointsLister struct { - Store -} - -// List lists all endpoints in the store. -func (s *StoreToEndpointsLister) List() (services v1.EndpointsList, err error) { - for _, m := range s.Store.List() { - services.Items = append(services.Items, *(m.(*v1.Endpoints))) - } - return services, nil -} - -// GetServiceEndpoints returns the endpoints of a service, matched on service name. -func (s *StoreToEndpointsLister) GetServiceEndpoints(svc *v1.Service) (ep v1.Endpoints, err error) { - for _, m := range s.Store.List() { - ep = *m.(*v1.Endpoints) - if svc.Name == ep.Name && svc.Namespace == ep.Namespace { - return ep, nil - } - } - err = fmt.Errorf("could not find endpoints for service: %v", svc.Name) - return -} - -// Typed wrapper around a store of PersistentVolumes -type StoreToPVFetcher struct { - Store -} - -// GetPersistentVolumeInfo returns cached data for the PersistentVolume 'id'. -func (s *StoreToPVFetcher) GetPersistentVolumeInfo(id string) (*v1.PersistentVolume, error) { - o, exists, err := s.Get(&v1.PersistentVolume{ObjectMeta: v1.ObjectMeta{Name: id}}) - - if err != nil { - return nil, fmt.Errorf("error retrieving PersistentVolume '%v' from cache: %v", id, err) - } - - if !exists { - return nil, fmt.Errorf("PersistentVolume '%v' not found", id) - } - - return o.(*v1.PersistentVolume), nil -} - -// StoreToStatefulSetLister gives a store List and Exists methods. The store must contain only StatefulSets. -type StoreToStatefulSetLister struct { - Store -} - -// Exists checks if the given StatefulSet exists in the store. -func (s *StoreToStatefulSetLister) Exists(ps *apps.StatefulSet) (bool, error) { - _, exists, err := s.Store.Get(ps) - if err != nil { - return false, err - } - return exists, nil -} - -// List lists all StatefulSets in the store. -func (s *StoreToStatefulSetLister) List() (psList []apps.StatefulSet, err error) { - for _, ps := range s.Store.List() { - psList = append(psList, *(ps.(*apps.StatefulSet))) - } - return psList, nil -} - -type storeStatefulSetsNamespacer struct { - store Store - namespace string -} - -func (s *StoreToStatefulSetLister) StatefulSets(namespace string) storeStatefulSetsNamespacer { - return storeStatefulSetsNamespacer{s.Store, namespace} -} - -// GetPodStatefulSets returns a list of StatefulSets managing a pod. Returns an error only if no matching StatefulSets are found. -func (s *StoreToStatefulSetLister) GetPodStatefulSets(pod *v1.Pod) (psList []apps.StatefulSet, err error) { - var selector labels.Selector - var ps apps.StatefulSet - - if len(pod.Labels) == 0 { - err = fmt.Errorf("no StatefulSets found for pod %v because it has no labels", pod.Name) - return - } - - for _, m := range s.Store.List() { - ps = *m.(*apps.StatefulSet) - if ps.Namespace != pod.Namespace { - continue - } - selector, err = metav1.LabelSelectorAsSelector(ps.Spec.Selector) - if err != nil { - err = fmt.Errorf("invalid selector: %v", err) - return - } - - // If a StatefulSet with a nil or empty selector creeps in, it should match nothing, not everything. - if selector.Empty() || !selector.Matches(labels.Set(pod.Labels)) { - continue - } - psList = append(psList, ps) - } - if len(psList) == 0 { - err = fmt.Errorf("could not find StatefulSet for pod %s in namespace %s with labels: %v", pod.Name, pod.Namespace, pod.Labels) - } - return -} - -// StoreToCertificateRequestLister gives a store List and Exists methods. The store must contain only CertificateRequests. -type StoreToCertificateRequestLister struct { - Store -} - -// Exists checks if the given csr exists in the store. -func (s *StoreToCertificateRequestLister) Exists(csr *certificates.CertificateSigningRequest) (bool, error) { - _, exists, err := s.Store.Get(csr) - if err != nil { - return false, err - } - return exists, nil -} - -// StoreToCertificateRequestLister lists all csrs in the store. -func (s *StoreToCertificateRequestLister) List() (csrs certificates.CertificateSigningRequestList, err error) { - for _, c := range s.Store.List() { - csrs.Items = append(csrs.Items, *(c.(*certificates.CertificateSigningRequest))) - } - return csrs, nil -} - -type StoreToPodDisruptionBudgetLister struct { - Store -} - -// GetPodPodDisruptionBudgets returns a list of PodDisruptionBudgets matching a pod. Returns an error only if no matching PodDisruptionBudgets are found. -func (s *StoreToPodDisruptionBudgetLister) GetPodPodDisruptionBudgets(pod *v1.Pod) (pdbList []policy.PodDisruptionBudget, err error) { - var selector labels.Selector - - if len(pod.Labels) == 0 { - err = fmt.Errorf("no PodDisruptionBudgets found for pod %v because it has no labels", pod.Name) - return - } - - for _, m := range s.Store.List() { - pdb, ok := m.(*policy.PodDisruptionBudget) - if !ok { - glog.Errorf("Unexpected: %v is not a PodDisruptionBudget", m) - continue - } - if pdb.Namespace != pod.Namespace { - continue - } - selector, err = metav1.LabelSelectorAsSelector(pdb.Spec.Selector) - if err != nil { - glog.Warningf("invalid selector: %v", err) - // TODO(mml): add an event to the PDB - continue - } - - // If a PDB with a nil or empty selector creeps in, it should match nothing, not everything. - if selector.Empty() || !selector.Matches(labels.Set(pod.Labels)) { - continue - } - pdbList = append(pdbList, *pdb) - } - if len(pdbList) == 0 { - err = fmt.Errorf("could not find PodDisruptionBudget for pod %s in namespace %s with labels: %v", pod.Name, pod.Namespace, pod.Labels) - } - return -} - -// StorageClassLister knows how to list storage classes -type StorageClassLister interface { - List(selector labels.Selector) (ret []*storage.StorageClass, err error) - Get(name string) (*storage.StorageClass, error) -} - -// storageClassLister implements StorageClassLister -type storageClassLister struct { - indexer Indexer -} - -// NewStorageClassLister returns a new lister. -func NewStorageClassLister(indexer Indexer) StorageClassLister { - return &storageClassLister{indexer: indexer} -} - -// List returns a list of storage classes -func (s *storageClassLister) List(selector labels.Selector) (ret []*storage.StorageClass, err error) { - err = ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*storage.StorageClass)) - }) - return ret, err -} - -// Get returns storage class with name 'name'. -func (s *storageClassLister) Get(name string) (*storage.StorageClass, error) { - key := &storage.StorageClass{ObjectMeta: v1.ObjectMeta{Name: name}} - obj, exists, err := s.indexer.Get(key) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(storageinternal.Resource("storageclass"), name) - } - return obj.(*storage.StorageClass), nil -} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/cache/listers_core.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/cache/listers_core.go deleted file mode 100644 index e6257819..00000000 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/cache/listers_core.go +++ /dev/null @@ -1,349 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package cache - -import ( - "fmt" - - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/pkg/api" - "k8s.io/client-go/pkg/api/errors" - "k8s.io/client-go/pkg/api/v1" -) - -// TODO: generate these classes and methods for all resources of interest using -// a script. Can use "go generate" once 1.4 is supported by all users. - -// Lister makes an Index have the List method. The Stores must contain only the expected type -// Example: -// s := cache.NewStore() -// lw := cache.ListWatch{Client: c, FieldSelector: sel, Resource: "pods"} -// r := cache.NewReflector(lw, &api.Pod{}, s).Run() -// l := StoreToPodLister{s} -// l.List() - -// StoreToPodLister helps list pods -type StoreToPodLister struct { - Indexer Indexer -} - -func (s *StoreToPodLister) List(selector labels.Selector) (ret []*v1.Pod, err error) { - err = ListAll(s.Indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.Pod)) - }) - return ret, err -} - -func (s *StoreToPodLister) Pods(namespace string) storePodsNamespacer { - return storePodsNamespacer{Indexer: s.Indexer, namespace: namespace} -} - -type storePodsNamespacer struct { - Indexer Indexer - namespace string -} - -func (s storePodsNamespacer) List(selector labels.Selector) (ret []*v1.Pod, err error) { - err = ListAllByNamespace(s.Indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1.Pod)) - }) - return ret, err -} - -func (s storePodsNamespacer) Get(name string) (*v1.Pod, error) { - obj, exists, err := s.Indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(api.Resource("pod"), name) - } - return obj.(*v1.Pod), nil -} - -// StoreToServiceLister helps list services -type StoreToServiceLister struct { - Indexer Indexer -} - -func (s *StoreToServiceLister) List(selector labels.Selector) (ret []*v1.Service, err error) { - err = ListAll(s.Indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.Service)) - }) - return ret, err -} - -func (s *StoreToServiceLister) Services(namespace string) storeServicesNamespacer { - return storeServicesNamespacer{s.Indexer, namespace} -} - -type storeServicesNamespacer struct { - indexer Indexer - namespace string -} - -func (s storeServicesNamespacer) List(selector labels.Selector) (ret []*v1.Service, err error) { - err = ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1.Service)) - }) - return ret, err -} - -func (s storeServicesNamespacer) Get(name string) (*v1.Service, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(api.Resource("service"), name) - } - return obj.(*v1.Service), nil -} - -// TODO: Move this back to scheduler as a helper function that takes a Store, -// rather than a method of StoreToServiceLister. -func (s *StoreToServiceLister) GetPodServices(pod *v1.Pod) (services []*v1.Service, err error) { - allServices, err := s.Services(pod.Namespace).List(labels.Everything()) - if err != nil { - return nil, err - } - - for i := range allServices { - service := allServices[i] - if service.Spec.Selector == nil { - // services with nil selectors match nothing, not everything. - continue - } - selector := labels.Set(service.Spec.Selector).AsSelectorPreValidated() - if selector.Matches(labels.Set(pod.Labels)) { - services = append(services, service) - } - } - - return services, nil -} - -// StoreToReplicationControllerLister helps list rcs -type StoreToReplicationControllerLister struct { - Indexer Indexer -} - -func (s *StoreToReplicationControllerLister) List(selector labels.Selector) (ret []*v1.ReplicationController, err error) { - err = ListAll(s.Indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.ReplicationController)) - }) - return ret, err -} - -func (s *StoreToReplicationControllerLister) ReplicationControllers(namespace string) storeReplicationControllersNamespacer { - return storeReplicationControllersNamespacer{s.Indexer, namespace} -} - -type storeReplicationControllersNamespacer struct { - indexer Indexer - namespace string -} - -func (s storeReplicationControllersNamespacer) List(selector labels.Selector) (ret []*v1.ReplicationController, err error) { - err = ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1.ReplicationController)) - }) - return ret, err -} - -func (s storeReplicationControllersNamespacer) Get(name string) (*v1.ReplicationController, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(api.Resource("replicationcontroller"), name) - } - return obj.(*v1.ReplicationController), nil -} - -// GetPodControllers returns a list of replication controllers managing a pod. Returns an error only if no matching controllers are found. -func (s *StoreToReplicationControllerLister) GetPodControllers(pod *v1.Pod) (controllers []*v1.ReplicationController, err error) { - if len(pod.Labels) == 0 { - err = fmt.Errorf("no controllers found for pod %v because it has no labels", pod.Name) - return - } - - key := &v1.ReplicationController{ObjectMeta: v1.ObjectMeta{Namespace: pod.Namespace}} - items, err := s.Indexer.Index(NamespaceIndex, key) - if err != nil { - return - } - - for _, m := range items { - rc := m.(*v1.ReplicationController) - selector := labels.Set(rc.Spec.Selector).AsSelectorPreValidated() - - // If an rc with a nil or empty selector creeps in, it should match nothing, not everything. - if selector.Empty() || !selector.Matches(labels.Set(pod.Labels)) { - continue - } - controllers = append(controllers, rc) - } - if len(controllers) == 0 { - err = fmt.Errorf("could not find controller for pod %s in namespace %s with labels: %v", pod.Name, pod.Namespace, pod.Labels) - } - return -} - -// StoreToServiceAccountLister helps list service accounts -type StoreToServiceAccountLister struct { - Indexer Indexer -} - -func (s *StoreToServiceAccountLister) List(selector labels.Selector) (ret []*v1.ServiceAccount, err error) { - err = ListAll(s.Indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.ServiceAccount)) - }) - return ret, err -} - -func (s *StoreToServiceAccountLister) ServiceAccounts(namespace string) storeServiceAccountsNamespacer { - return storeServiceAccountsNamespacer{s.Indexer, namespace} -} - -type storeServiceAccountsNamespacer struct { - indexer Indexer - namespace string -} - -func (s storeServiceAccountsNamespacer) List(selector labels.Selector) (ret []*v1.ServiceAccount, err error) { - err = ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1.ServiceAccount)) - }) - return ret, err -} - -func (s storeServiceAccountsNamespacer) Get(name string) (*v1.ServiceAccount, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(api.Resource("serviceaccount"), name) - } - return obj.(*v1.ServiceAccount), nil -} - -// StoreToLimitRangeLister helps list limit ranges -type StoreToLimitRangeLister struct { - Indexer Indexer -} - -func (s *StoreToLimitRangeLister) List(selector labels.Selector) (ret []*v1.LimitRange, err error) { - err = ListAll(s.Indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.LimitRange)) - }) - return ret, err -} - -// StoreToPersistentVolumeClaimLister helps list pvcs -type StoreToPersistentVolumeClaimLister struct { - Indexer Indexer -} - -// List returns all persistentvolumeclaims that match the specified selector -func (s *StoreToPersistentVolumeClaimLister) List(selector labels.Selector) (ret []*v1.PersistentVolumeClaim, err error) { - err = ListAll(s.Indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.PersistentVolumeClaim)) - }) - return ret, err -} - -func (s *StoreToLimitRangeLister) LimitRanges(namespace string) storeLimitRangesNamespacer { - return storeLimitRangesNamespacer{s.Indexer, namespace} -} - -type storeLimitRangesNamespacer struct { - indexer Indexer - namespace string -} - -func (s storeLimitRangesNamespacer) List(selector labels.Selector) (ret []*v1.LimitRange, err error) { - err = ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1.LimitRange)) - }) - return ret, err -} - -func (s storeLimitRangesNamespacer) Get(name string) (*v1.LimitRange, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(api.Resource("limitrange"), name) - } - return obj.(*v1.LimitRange), nil -} - -// PersistentVolumeClaims returns all claims in a specified namespace. -func (s *StoreToPersistentVolumeClaimLister) PersistentVolumeClaims(namespace string) storePersistentVolumeClaimsNamespacer { - return storePersistentVolumeClaimsNamespacer{Indexer: s.Indexer, namespace: namespace} -} - -type storePersistentVolumeClaimsNamespacer struct { - Indexer Indexer - namespace string -} - -func (s storePersistentVolumeClaimsNamespacer) List(selector labels.Selector) (ret []*v1.PersistentVolumeClaim, err error) { - err = ListAllByNamespace(s.Indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1.PersistentVolumeClaim)) - }) - return ret, err -} - -func (s storePersistentVolumeClaimsNamespacer) Get(name string) (*v1.PersistentVolumeClaim, error) { - obj, exists, err := s.Indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(api.Resource("persistentvolumeclaims"), name) - } - return obj.(*v1.PersistentVolumeClaim), nil -} - -// IndexerToNamespaceLister gives an Indexer List method -type IndexerToNamespaceLister struct { - Indexer -} - -// List returns a list of namespaces -func (i *IndexerToNamespaceLister) List(selector labels.Selector) (ret []*v1.Namespace, err error) { - err = ListAll(i.Indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.Namespace)) - }) - return ret, err -} - -func (i *IndexerToNamespaceLister) Get(name string) (*v1.Namespace, error) { - obj, exists, err := i.Indexer.GetByKey(name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(api.Resource("namespace"), name) - } - return obj.(*v1.Namespace), nil -} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/cache/listers_extensions.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/cache/listers_extensions.go deleted file mode 100644 index c3d739ef..00000000 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/cache/listers_extensions.go +++ /dev/null @@ -1,211 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package cache - -import ( - "fmt" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/pkg/api/errors" - "k8s.io/client-go/pkg/api/v1" - extensionsinternal "k8s.io/client-go/pkg/apis/extensions" - extensions "k8s.io/client-go/pkg/apis/extensions/v1beta1" -) - -// TODO: generate these classes and methods for all resources of interest using -// a script. Can use "go generate" once 1.4 is supported by all users. - -// Lister makes an Index have the List method. The Stores must contain only the expected type -// Example: -// s := cache.NewStore() -// lw := cache.ListWatch{Client: c, FieldSelector: sel, Resource: "pods"} -// r := cache.NewReflector(lw, &extensions.Deployment{}, s).Run() -// l := StoreToDeploymentLister{s} -// l.List() - -// StoreToDeploymentLister helps list deployments -type StoreToDeploymentLister struct { - Indexer Indexer -} - -func (s *StoreToDeploymentLister) List(selector labels.Selector) (ret []*extensions.Deployment, err error) { - err = ListAll(s.Indexer, selector, func(m interface{}) { - ret = append(ret, m.(*extensions.Deployment)) - }) - return ret, err -} - -func (s *StoreToDeploymentLister) Deployments(namespace string) storeDeploymentsNamespacer { - return storeDeploymentsNamespacer{Indexer: s.Indexer, namespace: namespace} -} - -type storeDeploymentsNamespacer struct { - Indexer Indexer - namespace string -} - -func (s storeDeploymentsNamespacer) List(selector labels.Selector) (ret []*extensions.Deployment, err error) { - err = ListAllByNamespace(s.Indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*extensions.Deployment)) - }) - return ret, err -} - -func (s storeDeploymentsNamespacer) Get(name string) (*extensions.Deployment, error) { - obj, exists, err := s.Indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(extensionsinternal.Resource("deployment"), name) - } - return obj.(*extensions.Deployment), nil -} - -// GetDeploymentsForReplicaSet returns a list of deployments managing a replica set. Returns an error only if no matching deployments are found. -func (s *StoreToDeploymentLister) GetDeploymentsForReplicaSet(rs *extensions.ReplicaSet) (deployments []*extensions.Deployment, err error) { - if len(rs.Labels) == 0 { - err = fmt.Errorf("no deployments found for ReplicaSet %v because it has no labels", rs.Name) - return - } - - // TODO: MODIFY THIS METHOD so that it checks for the podTemplateSpecHash label - dList, err := s.Deployments(rs.Namespace).List(labels.Everything()) - if err != nil { - return - } - for _, d := range dList { - selector, err := metav1.LabelSelectorAsSelector(d.Spec.Selector) - if err != nil { - return nil, fmt.Errorf("invalid label selector: %v", err) - } - // If a deployment with a nil or empty selector creeps in, it should match nothing, not everything. - if selector.Empty() || !selector.Matches(labels.Set(rs.Labels)) { - continue - } - deployments = append(deployments, d) - } - if len(deployments) == 0 { - err = fmt.Errorf("could not find deployments set for ReplicaSet %s in namespace %s with labels: %v", rs.Name, rs.Namespace, rs.Labels) - } - return -} - -// GetDeploymentsForDeployments returns a list of deployments managing a pod. Returns an error only if no matching deployments are found. -// TODO eliminate shallow copies -func (s *StoreToDeploymentLister) GetDeploymentsForPod(pod *v1.Pod) (deployments []*extensions.Deployment, err error) { - if len(pod.Labels) == 0 { - err = fmt.Errorf("no deployments found for Pod %v because it has no labels", pod.Name) - return - } - - if len(pod.Labels[extensions.DefaultDeploymentUniqueLabelKey]) == 0 { - return - } - - dList, err := s.Deployments(pod.Namespace).List(labels.Everything()) - if err != nil { - return - } - for _, d := range dList { - selector, err := metav1.LabelSelectorAsSelector(d.Spec.Selector) - if err != nil { - return nil, fmt.Errorf("invalid label selector: %v", err) - } - // If a deployment with a nil or empty selector creeps in, it should match nothing, not everything. - if selector.Empty() || !selector.Matches(labels.Set(pod.Labels)) { - continue - } - deployments = append(deployments, d) - } - if len(deployments) == 0 { - err = fmt.Errorf("could not find deployments set for Pod %s in namespace %s with labels: %v", pod.Name, pod.Namespace, pod.Labels) - } - return -} - -// StoreToReplicaSetLister helps list replicasets -type StoreToReplicaSetLister struct { - Indexer Indexer -} - -func (s *StoreToReplicaSetLister) List(selector labels.Selector) (ret []*extensions.ReplicaSet, err error) { - err = ListAll(s.Indexer, selector, func(m interface{}) { - ret = append(ret, m.(*extensions.ReplicaSet)) - }) - return ret, err -} - -func (s *StoreToReplicaSetLister) ReplicaSets(namespace string) storeReplicaSetsNamespacer { - return storeReplicaSetsNamespacer{Indexer: s.Indexer, namespace: namespace} -} - -type storeReplicaSetsNamespacer struct { - Indexer Indexer - namespace string -} - -func (s storeReplicaSetsNamespacer) List(selector labels.Selector) (ret []*extensions.ReplicaSet, err error) { - err = ListAllByNamespace(s.Indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*extensions.ReplicaSet)) - }) - return ret, err -} - -func (s storeReplicaSetsNamespacer) Get(name string) (*extensions.ReplicaSet, error) { - obj, exists, err := s.Indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(extensionsinternal.Resource("replicaset"), name) - } - return obj.(*extensions.ReplicaSet), nil -} - -// GetPodReplicaSets returns a list of ReplicaSets managing a pod. Returns an error only if no matching ReplicaSets are found. -func (s *StoreToReplicaSetLister) GetPodReplicaSets(pod *v1.Pod) (rss []*extensions.ReplicaSet, err error) { - if len(pod.Labels) == 0 { - err = fmt.Errorf("no ReplicaSets found for pod %v because it has no labels", pod.Name) - return - } - - list, err := s.ReplicaSets(pod.Namespace).List(labels.Everything()) - if err != nil { - return - } - for _, rs := range list { - if rs.Namespace != pod.Namespace { - continue - } - selector, err := metav1.LabelSelectorAsSelector(rs.Spec.Selector) - if err != nil { - return nil, fmt.Errorf("invalid selector: %v", err) - } - - // If a ReplicaSet with a nil or empty selector creeps in, it should match nothing, not everything. - if selector.Empty() || !selector.Matches(labels.Set(pod.Labels)) { - continue - } - rss = append(rss, rs) - } - if len(rss) == 0 { - err = fmt.Errorf("could not find ReplicaSet for pod %s in namespace %s with labels: %v", pod.Name, pod.Namespace, pod.Labels) - } - return -} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/cache/listers_rbac.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/cache/listers_rbac.go deleted file mode 100644 index d9bddc1b..00000000 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/cache/listers_rbac.go +++ /dev/null @@ -1,234 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package cache - -import ( - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/pkg/api/errors" - rbac "k8s.io/client-go/pkg/apis/rbac" -) - -// TODO: generate these classes and methods for all resources of interest using -// a script. Can use "go generate" once 1.4 is supported by all users. - -// Lister makes an Index have the List method. The Stores must contain only the expected type -// Example: -// s := cache.NewStore() -// lw := cache.ListWatch{Client: c, FieldSelector: sel, Resource: "pods"} -// r := cache.NewReflector(lw, &rbac.ClusterRole{}, s).Run() -// l := clusterRoleLister{s} -// l.List() - -func NewClusterRoleLister(indexer Indexer) ClusterRoleLister { - return &clusterRoleLister{indexer: indexer} -} -func NewClusterRoleBindingLister(indexer Indexer) ClusterRoleBindingLister { - return &clusterRoleBindingLister{indexer: indexer} -} -func NewRoleLister(indexer Indexer) RoleLister { - return &roleLister{indexer: indexer} -} -func NewRoleBindingLister(indexer Indexer) RoleBindingLister { - return &roleBindingLister{indexer: indexer} -} - -// these interfaces are used by the rbac authorizer -type authorizerClusterRoleGetter interface { - GetClusterRole(name string) (*rbac.ClusterRole, error) -} - -type authorizerClusterRoleBindingLister interface { - ListClusterRoleBindings() ([]*rbac.ClusterRoleBinding, error) -} - -type authorizerRoleGetter interface { - GetRole(namespace, name string) (*rbac.Role, error) -} - -type authorizerRoleBindingLister interface { - ListRoleBindings(namespace string) ([]*rbac.RoleBinding, error) -} - -type ClusterRoleLister interface { - authorizerClusterRoleGetter - List(selector labels.Selector) (ret []*rbac.ClusterRole, err error) - Get(name string) (*rbac.ClusterRole, error) -} - -type clusterRoleLister struct { - indexer Indexer -} - -func (s *clusterRoleLister) List(selector labels.Selector) (ret []*rbac.ClusterRole, err error) { - err = ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*rbac.ClusterRole)) - }) - return ret, err -} - -func (s clusterRoleLister) Get(name string) (*rbac.ClusterRole, error) { - obj, exists, err := s.indexer.GetByKey(name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(rbac.Resource("clusterrole"), name) - } - return obj.(*rbac.ClusterRole), nil -} - -func (s clusterRoleLister) GetClusterRole(name string) (*rbac.ClusterRole, error) { - return s.Get(name) -} - -type ClusterRoleBindingLister interface { - authorizerClusterRoleBindingLister - List(selector labels.Selector) (ret []*rbac.ClusterRoleBinding, err error) - Get(name string) (*rbac.ClusterRoleBinding, error) -} - -type clusterRoleBindingLister struct { - indexer Indexer -} - -func (s *clusterRoleBindingLister) List(selector labels.Selector) (ret []*rbac.ClusterRoleBinding, err error) { - err = ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*rbac.ClusterRoleBinding)) - }) - return ret, err -} - -func (s clusterRoleBindingLister) Get(name string) (*rbac.ClusterRoleBinding, error) { - obj, exists, err := s.indexer.GetByKey(name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(rbac.Resource("clusterrolebinding"), name) - } - return obj.(*rbac.ClusterRoleBinding), nil -} - -func (s clusterRoleBindingLister) ListClusterRoleBindings() ([]*rbac.ClusterRoleBinding, error) { - return s.List(labels.Everything()) -} - -type RoleLister interface { - authorizerRoleGetter - List(selector labels.Selector) (ret []*rbac.Role, err error) - Roles(namespace string) RoleNamespaceLister -} - -type RoleNamespaceLister interface { - List(selector labels.Selector) (ret []*rbac.Role, err error) - Get(name string) (*rbac.Role, error) -} - -type roleLister struct { - indexer Indexer -} - -func (s *roleLister) List(selector labels.Selector) (ret []*rbac.Role, err error) { - err = ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*rbac.Role)) - }) - return ret, err -} - -func (s *roleLister) Roles(namespace string) RoleNamespaceLister { - return roleNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -func (s roleLister) GetRole(namespace, name string) (*rbac.Role, error) { - return s.Roles(namespace).Get(name) -} - -type roleNamespaceLister struct { - indexer Indexer - namespace string -} - -func (s roleNamespaceLister) List(selector labels.Selector) (ret []*rbac.Role, err error) { - err = ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*rbac.Role)) - }) - return ret, err -} - -func (s roleNamespaceLister) Get(name string) (*rbac.Role, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(rbac.Resource("role"), name) - } - return obj.(*rbac.Role), nil -} - -type RoleBindingLister interface { - authorizerRoleBindingLister - List(selector labels.Selector) (ret []*rbac.RoleBinding, err error) - RoleBindings(namespace string) RoleBindingNamespaceLister -} - -type RoleBindingNamespaceLister interface { - List(selector labels.Selector) (ret []*rbac.RoleBinding, err error) - Get(name string) (*rbac.RoleBinding, error) -} - -type roleBindingLister struct { - indexer Indexer -} - -func (s *roleBindingLister) List(selector labels.Selector) (ret []*rbac.RoleBinding, err error) { - err = ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*rbac.RoleBinding)) - }) - return ret, err -} - -func (s *roleBindingLister) RoleBindings(namespace string) RoleBindingNamespaceLister { - return roleBindingNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -func (s roleBindingLister) ListRoleBindings(namespace string) ([]*rbac.RoleBinding, error) { - return s.RoleBindings(namespace).List(labels.Everything()) -} - -type roleBindingNamespaceLister struct { - indexer Indexer - namespace string -} - -func (s roleBindingNamespaceLister) List(selector labels.Selector) (ret []*rbac.RoleBinding, err error) { - err = ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*rbac.RoleBinding)) - }) - return ret, err -} - -func (s roleBindingNamespaceLister) Get(name string) (*rbac.RoleBinding, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(rbac.Resource("rolebinding"), name) - } - return obj.(*rbac.RoleBinding), nil -} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/cache/listers_test.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/cache/listers_test.go deleted file mode 100644 index 1eda854f..00000000 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/cache/listers_test.go +++ /dev/null @@ -1,613 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package cache - -import ( - "testing" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/apimachinery/pkg/util/sets" - apierrors "k8s.io/client-go/pkg/api/errors" - "k8s.io/client-go/pkg/api/v1" - extensions "k8s.io/client-go/pkg/apis/extensions/v1beta1" -) - -func TestStoreToNodeLister(t *testing.T) { - store := NewStore(MetaNamespaceKeyFunc) - ids := sets.NewString("foo", "bar", "baz") - for id := range ids { - store.Add(&v1.Node{ObjectMeta: v1.ObjectMeta{Name: id}}) - } - sml := StoreToNodeLister{store} - - gotNodes, err := sml.List() - if err != nil { - t.Fatalf("Unexpected error: %v", err) - } - got := make([]string, len(gotNodes.Items)) - for ix := range gotNodes.Items { - got[ix] = gotNodes.Items[ix].Name - } - if !ids.HasAll(got...) || len(got) != len(ids) { - t.Errorf("Expected %v, got %v", ids, got) - } -} - -func TestStoreToNodeConditionLister(t *testing.T) { - store := NewStore(MetaNamespaceKeyFunc) - nodes := []*v1.Node{ - { - ObjectMeta: v1.ObjectMeta{Name: "foo"}, - Status: v1.NodeStatus{ - Conditions: []v1.NodeCondition{ - { - Type: v1.NodeReady, - Status: v1.ConditionTrue, - }, - { - Type: v1.NodeOutOfDisk, - Status: v1.ConditionFalse, - }, - }, - }, - }, - { - ObjectMeta: v1.ObjectMeta{Name: "bar"}, - Status: v1.NodeStatus{ - Conditions: []v1.NodeCondition{ - { - Type: v1.NodeOutOfDisk, - Status: v1.ConditionTrue, - }, - }, - }, - }, - { - ObjectMeta: v1.ObjectMeta{Name: "baz"}, - Status: v1.NodeStatus{ - Conditions: []v1.NodeCondition{ - { - Type: v1.NodeReady, - Status: v1.ConditionFalse, - }, - { - Type: v1.NodeOutOfDisk, - Status: v1.ConditionUnknown, - }, - }, - }, - }, - } - for _, n := range nodes { - store.Add(n) - } - - predicate := func(node *v1.Node) bool { - for _, cond := range node.Status.Conditions { - if cond.Type == v1.NodeOutOfDisk && cond.Status == v1.ConditionTrue { - return false - } - } - return true - } - - snl := StoreToNodeLister{store} - sncl := snl.NodeCondition(predicate) - - want := sets.NewString("foo", "baz") - gotNodes, err := sncl.List() - if err != nil { - t.Fatalf("Unexpected error: %v", err) - } - got := make([]string, len(gotNodes)) - for ix := range gotNodes { - got[ix] = gotNodes[ix].Name - } - if !want.HasAll(got...) || len(got) != len(want) { - t.Errorf("Expected %v, got %v", want, got) - } -} - -func TestStoreToReplicationControllerLister(t *testing.T) { - testCases := []struct { - description string - inRCs []*v1.ReplicationController - list func(StoreToReplicationControllerLister) ([]*v1.ReplicationController, error) - outRCNames sets.String - expectErr bool - onlyIfIndexedByNamespace bool - }{ - { - description: "Verify we can search all namespaces", - inRCs: []*v1.ReplicationController{ - { - ObjectMeta: v1.ObjectMeta{Name: "foo", Namespace: "bar"}, - }, - { - ObjectMeta: v1.ObjectMeta{Name: "hmm", Namespace: "hmm"}, - }, - }, - list: func(lister StoreToReplicationControllerLister) ([]*v1.ReplicationController, error) { - return lister.ReplicationControllers(v1.NamespaceAll).List(labels.Set{}.AsSelectorPreValidated()) - }, - outRCNames: sets.NewString("hmm", "foo"), - }, - { - description: "Verify we can search a specific namespace", - inRCs: []*v1.ReplicationController{ - { - ObjectMeta: v1.ObjectMeta{Name: "foo", Namespace: "bar"}, - }, - { - ObjectMeta: v1.ObjectMeta{Name: "hmm", Namespace: "hmm"}, - }, - }, - list: func(lister StoreToReplicationControllerLister) ([]*v1.ReplicationController, error) { - return lister.ReplicationControllers("hmm").List(labels.Set{}.AsSelectorPreValidated()) - }, - outRCNames: sets.NewString("hmm"), - }, - { - description: "Basic listing with all labels and no selectors", - inRCs: []*v1.ReplicationController{ - {ObjectMeta: v1.ObjectMeta{Name: "basic"}}, - }, - list: func(lister StoreToReplicationControllerLister) ([]*v1.ReplicationController, error) { - return lister.List(labels.Everything()) - }, - outRCNames: sets.NewString("basic"), - }, - { - description: "No pod labels", - inRCs: []*v1.ReplicationController{ - { - ObjectMeta: v1.ObjectMeta{Name: "basic", Namespace: "ns"}, - Spec: v1.ReplicationControllerSpec{ - Selector: map[string]string{"foo": "baz"}, - }, - }, - }, - list: func(lister StoreToReplicationControllerLister) ([]*v1.ReplicationController, error) { - pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{Name: "pod1", Namespace: "ns"}, - } - return lister.GetPodControllers(pod) - }, - outRCNames: sets.NewString(), - expectErr: true, - }, - { - description: "No RC selectors", - inRCs: []*v1.ReplicationController{ - { - ObjectMeta: v1.ObjectMeta{Name: "basic", Namespace: "ns"}, - }, - }, - list: func(lister StoreToReplicationControllerLister) ([]*v1.ReplicationController, error) { - pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ - Name: "pod1", - Namespace: "ns", - Labels: map[string]string{"foo": "bar"}, - }, - } - return lister.GetPodControllers(pod) - }, - outRCNames: sets.NewString(), - expectErr: true, - }, - { - description: "Matching labels to selectors and namespace", - inRCs: []*v1.ReplicationController{ - { - ObjectMeta: v1.ObjectMeta{Name: "foo"}, - Spec: v1.ReplicationControllerSpec{ - Selector: map[string]string{"foo": "bar"}, - }, - }, - { - ObjectMeta: v1.ObjectMeta{Name: "bar", Namespace: "ns"}, - Spec: v1.ReplicationControllerSpec{ - Selector: map[string]string{"foo": "bar"}, - }, - }, - }, - list: func(lister StoreToReplicationControllerLister) ([]*v1.ReplicationController, error) { - pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ - Name: "pod1", - Labels: map[string]string{"foo": "bar"}, - Namespace: "ns", - }, - } - return lister.GetPodControllers(pod) - }, - outRCNames: sets.NewString("bar"), - onlyIfIndexedByNamespace: true, - }, - } - for _, c := range testCases { - for _, withIndex := range []bool{true, false} { - if c.onlyIfIndexedByNamespace && !withIndex { - continue - } - var store Indexer - if withIndex { - store = NewIndexer(MetaNamespaceKeyFunc, Indexers{NamespaceIndex: MetaNamespaceIndexFunc}) - } else { - store = NewIndexer(MetaNamespaceKeyFunc, Indexers{}) - } - - for _, r := range c.inRCs { - store.Add(r) - } - - gotControllers, err := c.list(StoreToReplicationControllerLister{store}) - if err != nil && c.expectErr { - continue - } else if c.expectErr { - t.Errorf("(%q, withIndex=%v) Expected error, got none", c.description, withIndex) - continue - } else if err != nil { - t.Errorf("(%q, withIndex=%v) Unexpected error %#v", c.description, withIndex, err) - continue - } - gotNames := make([]string, len(gotControllers)) - for ix := range gotControllers { - gotNames[ix] = gotControllers[ix].Name - } - if !c.outRCNames.HasAll(gotNames...) || len(gotNames) != len(c.outRCNames) { - t.Errorf("(%q, withIndex=%v) Unexpected got controllers %+v expected %+v", c.description, withIndex, gotNames, c.outRCNames) - } - } - } -} - -func TestStoreToReplicaSetLister(t *testing.T) { - store := NewIndexer(MetaNamespaceKeyFunc, Indexers{NamespaceIndex: MetaNamespaceIndexFunc}) - lister := StoreToReplicaSetLister{store} - testCases := []struct { - inRSs []*extensions.ReplicaSet - list func() ([]*extensions.ReplicaSet, error) - outRSNames sets.String - expectErr bool - }{ - // Basic listing with all labels and no selectors - { - inRSs: []*extensions.ReplicaSet{ - {ObjectMeta: v1.ObjectMeta{Name: "basic"}}, - }, - list: func() ([]*extensions.ReplicaSet, error) { - return lister.List(labels.Everything()) - }, - outRSNames: sets.NewString("basic"), - }, - // No pod labels - { - inRSs: []*extensions.ReplicaSet{ - { - ObjectMeta: v1.ObjectMeta{Name: "basic", Namespace: "ns"}, - Spec: extensions.ReplicaSetSpec{ - Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"foo": "baz"}}, - }, - }, - }, - list: func() ([]*extensions.ReplicaSet, error) { - pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{Name: "pod1", Namespace: "ns"}, - } - return lister.GetPodReplicaSets(pod) - }, - outRSNames: sets.NewString(), - expectErr: true, - }, - // No ReplicaSet selectors - { - inRSs: []*extensions.ReplicaSet{ - { - ObjectMeta: v1.ObjectMeta{Name: "basic", Namespace: "ns"}, - }, - }, - list: func() ([]*extensions.ReplicaSet, error) { - pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ - Name: "pod1", - Namespace: "ns", - Labels: map[string]string{"foo": "bar"}, - }, - } - return lister.GetPodReplicaSets(pod) - }, - outRSNames: sets.NewString(), - expectErr: true, - }, - // Matching labels to selectors and namespace - { - inRSs: []*extensions.ReplicaSet{ - { - ObjectMeta: v1.ObjectMeta{Name: "foo"}, - Spec: extensions.ReplicaSetSpec{ - Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"foo": "bar"}}, - }, - }, - { - ObjectMeta: v1.ObjectMeta{Name: "bar", Namespace: "ns"}, - Spec: extensions.ReplicaSetSpec{ - Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"foo": "bar"}}, - }, - }, - }, - list: func() ([]*extensions.ReplicaSet, error) { - pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ - Name: "pod1", - Labels: map[string]string{"foo": "bar"}, - Namespace: "ns", - }, - } - return lister.GetPodReplicaSets(pod) - }, - outRSNames: sets.NewString("bar"), - }, - } - for _, c := range testCases { - for _, r := range c.inRSs { - store.Add(r) - } - - gotRSs, err := c.list() - if err != nil && c.expectErr { - continue - } else if c.expectErr { - t.Error("Expected error, got none") - continue - } else if err != nil { - t.Errorf("Unexpected error %#v", err) - continue - } - gotNames := make([]string, len(gotRSs)) - for ix := range gotRSs { - gotNames[ix] = gotRSs[ix].Name - } - if !c.outRSNames.HasAll(gotNames...) || len(gotNames) != len(c.outRSNames) { - t.Errorf("Unexpected got ReplicaSets %+v expected %+v", gotNames, c.outRSNames) - } - } -} - -func TestStoreToDaemonSetLister(t *testing.T) { - store := NewStore(MetaNamespaceKeyFunc) - lister := StoreToDaemonSetLister{store} - testCases := []struct { - inDSs []*extensions.DaemonSet - list func() ([]extensions.DaemonSet, error) - outDaemonSetNames sets.String - expectErr bool - }{ - // Basic listing - { - inDSs: []*extensions.DaemonSet{ - {ObjectMeta: v1.ObjectMeta{Name: "basic"}}, - }, - list: func() ([]extensions.DaemonSet, error) { - list, err := lister.List() - return list.Items, err - }, - outDaemonSetNames: sets.NewString("basic"), - }, - // Listing multiple daemon sets - { - inDSs: []*extensions.DaemonSet{ - {ObjectMeta: v1.ObjectMeta{Name: "basic"}}, - {ObjectMeta: v1.ObjectMeta{Name: "complex"}}, - {ObjectMeta: v1.ObjectMeta{Name: "complex2"}}, - }, - list: func() ([]extensions.DaemonSet, error) { - list, err := lister.List() - return list.Items, err - }, - outDaemonSetNames: sets.NewString("basic", "complex", "complex2"), - }, - // No pod labels - { - inDSs: []*extensions.DaemonSet{ - { - ObjectMeta: v1.ObjectMeta{Name: "basic", Namespace: "ns"}, - Spec: extensions.DaemonSetSpec{ - Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"foo": "baz"}}, - }, - }, - }, - list: func() ([]extensions.DaemonSet, error) { - pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{Name: "pod1", Namespace: "ns"}, - } - return lister.GetPodDaemonSets(pod) - }, - outDaemonSetNames: sets.NewString(), - expectErr: true, - }, - // No DS selectors - { - inDSs: []*extensions.DaemonSet{ - { - ObjectMeta: v1.ObjectMeta{Name: "basic", Namespace: "ns"}, - }, - }, - list: func() ([]extensions.DaemonSet, error) { - pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ - Name: "pod1", - Namespace: "ns", - Labels: map[string]string{"foo": "bar"}, - }, - } - return lister.GetPodDaemonSets(pod) - }, - outDaemonSetNames: sets.NewString(), - expectErr: true, - }, - // Matching labels to selectors and namespace - { - inDSs: []*extensions.DaemonSet{ - { - ObjectMeta: v1.ObjectMeta{Name: "foo"}, - Spec: extensions.DaemonSetSpec{ - Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"foo": "bar"}}, - }, - }, - { - ObjectMeta: v1.ObjectMeta{Name: "bar", Namespace: "ns"}, - Spec: extensions.DaemonSetSpec{ - Selector: &metav1.LabelSelector{MatchLabels: map[string]string{"foo": "bar"}}, - }, - }, - }, - list: func() ([]extensions.DaemonSet, error) { - pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ - Name: "pod1", - Labels: map[string]string{"foo": "bar"}, - Namespace: "ns", - }, - } - return lister.GetPodDaemonSets(pod) - }, - outDaemonSetNames: sets.NewString("bar"), - }, - } - for _, c := range testCases { - for _, r := range c.inDSs { - store.Add(r) - } - - daemonSets, err := c.list() - if err != nil && c.expectErr { - continue - } else if c.expectErr { - t.Error("Expected error, got none") - continue - } else if err != nil { - t.Errorf("Unexpected error %#v", err) - continue - } - daemonSetNames := make([]string, len(daemonSets)) - for ix := range daemonSets { - daemonSetNames[ix] = daemonSets[ix].Name - } - if !c.outDaemonSetNames.HasAll(daemonSetNames...) || len(daemonSetNames) != len(c.outDaemonSetNames) { - t.Errorf("Unexpected got controllers %+v expected %+v", daemonSetNames, c.outDaemonSetNames) - } - } -} - -func TestStoreToPodLister(t *testing.T) { - // We test with and without a namespace index, because StoreToPodLister has - // special logic to work on namespaces even when no namespace index is - // present. - stores := []Indexer{ - NewIndexer(MetaNamespaceKeyFunc, Indexers{NamespaceIndex: MetaNamespaceIndexFunc}), - NewIndexer(MetaNamespaceKeyFunc, Indexers{}), - } - for _, store := range stores { - ids := []string{"foo", "bar", "baz"} - for _, id := range ids { - store.Add(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ - Namespace: "other", - Name: id, - Labels: map[string]string{"name": id}, - }, - }) - } - store.Add(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ - Name: "quux", - Namespace: v1.NamespaceDefault, - Labels: map[string]string{"name": "quux"}, - }, - }) - spl := StoreToPodLister{store} - - // Verify that we can always look up by Namespace. - defaultPods, err := spl.Pods(v1.NamespaceDefault).List(labels.Set{}.AsSelectorPreValidated()) - if err != nil { - t.Errorf("Unexpected error: %v", err) - } else if e, a := 1, len(defaultPods); e != a { - t.Errorf("Expected %v, got %v", e, a) - } else if e, a := "quux", defaultPods[0].Name; e != a { - t.Errorf("Expected %v, got %v", e, a) - } - - for _, id := range ids { - got, err := spl.List(labels.Set{"name": id}.AsSelectorPreValidated()) - if err != nil { - t.Errorf("Unexpected error: %v", err) - continue - } - if e, a := 1, len(got); e != a { - t.Errorf("Expected %v, got %v", e, a) - continue - } - if e, a := id, got[0].Name; e != a { - t.Errorf("Expected %v, got %v", e, a) - continue - } - - _, err = spl.Pods("other").Get(id) - if err != nil { - t.Errorf("unexpected error: %v", err) - } - } - - if _, err := spl.Pods("").Get("qux"); !apierrors.IsNotFound(err) { - t.Error("Unexpected pod exists") - } - } -} - -func TestStoreToServiceLister(t *testing.T) { - store := NewIndexer(MetaNamespaceKeyFunc, Indexers{NamespaceIndex: MetaNamespaceIndexFunc}) - store.Add(&v1.Service{ - ObjectMeta: v1.ObjectMeta{Name: "foo"}, - Spec: v1.ServiceSpec{ - Selector: map[string]string{}, - }, - }) - store.Add(&v1.Service{ObjectMeta: v1.ObjectMeta{Name: "bar"}}) - ssl := StoreToServiceLister{store} - - pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ - Name: "foopod", - Labels: map[string]string{"role": "foo"}, - }, - } - - services, err := ssl.GetPodServices(pod) - if err != nil { - t.Errorf("Unexpected error: %v", err) - } - - if len(services) != 1 { - t.Fatalf("Expected 1 service, got %v", len(services)) - } - if e, a := "foo", services[0].Name; e != a { - t.Errorf("Expected service %q, got %q", e, a) - } -} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/cache/listwatch.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/cache/listwatch.go index c3b6177a..1261e758 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/cache/listwatch.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/cache/listwatch.go @@ -20,28 +20,27 @@ import ( "time" "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" - "k8s.io/client-go/pkg/api" - "k8s.io/client-go/pkg/api/v1" - "k8s.io/client-go/pkg/fields" - "k8s.io/client-go/rest" + restclient "k8s.io/client-go/rest" ) // ListerWatcher is any object that knows how to perform an initial list and start a watch on a resource. type ListerWatcher interface { // List should return a list type object; the Items field will be extracted, and the // ResourceVersion field will be used to start the watch in the right place. - List(options v1.ListOptions) (runtime.Object, error) + List(options metav1.ListOptions) (runtime.Object, error) // Watch should begin a watch at the specified version. - Watch(options v1.ListOptions) (watch.Interface, error) + Watch(options metav1.ListOptions) (watch.Interface, error) } // ListFunc knows how to list resources -type ListFunc func(options v1.ListOptions) (runtime.Object, error) +type ListFunc func(options metav1.ListOptions) (runtime.Object, error) // WatchFunc knows how to watch resources -type WatchFunc func(options v1.ListOptions) (watch.Interface, error) +type WatchFunc func(options metav1.ListOptions) (watch.Interface, error) // ListWatch knows how to list and watch a set of apiserver resources. It satisfies the ListerWatcher interface. // It is a convenience function for users of NewReflector, etc. @@ -53,33 +52,33 @@ type ListWatch struct { // Getter interface knows how to access Get method from RESTClient. type Getter interface { - Get() *rest.Request + Get() *restclient.Request } // NewListWatchFromClient creates a new ListWatch from the specified client, resource, namespace and field selector. func NewListWatchFromClient(c Getter, resource string, namespace string, fieldSelector fields.Selector) *ListWatch { - listFunc := func(options v1.ListOptions) (runtime.Object, error) { + listFunc := func(options metav1.ListOptions) (runtime.Object, error) { return c.Get(). Namespace(namespace). Resource(resource). - VersionedParams(&options, api.ParameterCodec). + VersionedParams(&options, metav1.ParameterCodec). FieldsSelectorParam(fieldSelector). Do(). Get() } - watchFunc := func(options v1.ListOptions) (watch.Interface, error) { + watchFunc := func(options metav1.ListOptions) (watch.Interface, error) { return c.Get(). Prefix("watch"). Namespace(namespace). Resource(resource). - VersionedParams(&options, api.ParameterCodec). + VersionedParams(&options, metav1.ParameterCodec). FieldsSelectorParam(fieldSelector). Watch() } return &ListWatch{ListFunc: listFunc, WatchFunc: watchFunc} } -func timeoutFromListOptions(options v1.ListOptions) time.Duration { +func timeoutFromListOptions(options metav1.ListOptions) time.Duration { if options.TimeoutSeconds != nil { return time.Duration(*options.TimeoutSeconds) * time.Second } @@ -87,12 +86,12 @@ func timeoutFromListOptions(options v1.ListOptions) time.Duration { } // List a set of apiserver resources -func (lw *ListWatch) List(options v1.ListOptions) (runtime.Object, error) { +func (lw *ListWatch) List(options metav1.ListOptions) (runtime.Object, error) { return lw.ListFunc(options) } // Watch a set of apiserver resources -func (lw *ListWatch) Watch(options v1.ListOptions) (watch.Interface, error) { +func (lw *ListWatch) Watch(options metav1.ListOptions) (watch.Interface, error) { return lw.WatchFunc(options) } @@ -102,7 +101,7 @@ func ListWatchUntil(timeout time.Duration, lw ListerWatcher, conditions ...watch return nil, nil } - list, err := lw.List(v1.ListOptions{}) + list, err := lw.List(metav1.ListOptions{}) if err != nil { return nil, err } @@ -154,7 +153,7 @@ func ListWatchUntil(timeout time.Duration, lw ListerWatcher, conditions ...watch } currResourceVersion := metaObj.GetResourceVersion() - watchInterface, err := lw.Watch(v1.ListOptions{ResourceVersion: currResourceVersion}) + watchInterface, err := lw.Watch(metav1.ListOptions{ResourceVersion: currResourceVersion}) if err != nil { return nil, err } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/cache/mutation_detector_test.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/cache/mutation_detector_test.go index 708826e4..b2fe5fb9 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/cache/mutation_detector_test.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/cache/mutation_detector_test.go @@ -22,6 +22,7 @@ import ( "testing" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/pkg/api/v1" @@ -30,15 +31,15 @@ import ( func TestMutationDetector(t *testing.T) { fakeWatch := watch.NewFake() lw := &testLW{ - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { return fakeWatch, nil }, - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { return &v1.PodList{}, nil }, } pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "anything", Labels: map[string]string{"check": "foo"}, }, diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/cache/reflector.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/cache/reflector.go index ba7b688f..77565d00 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/cache/reflector.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/cache/reflector.go @@ -34,13 +34,13 @@ import ( "time" "github.com/golang/glog" + apierrs "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apimachinery/pkg/watch" - apierrs "k8s.io/client-go/pkg/api/errors" - "k8s.io/client-go/pkg/api/v1" ) // Reflector watches a specified resource and causes all changes to be reflected in the given store. @@ -239,7 +239,7 @@ func (r *Reflector) ListAndWatch(stopCh <-chan struct{}) error { // Explicitly set "0" as resource version - it's fine for the List() // to be served from cache and potentially be delayed relative to // etcd contents. Reflector framework will catch up via Watch() eventually. - options := v1.ListOptions{ResourceVersion: "0"} + options := metav1.ListOptions{ResourceVersion: "0"} list, err := r.listerWatcher.List(options) if err != nil { return fmt.Errorf("%s: Failed to list %v: %v", r.name, r.expectedType, err) @@ -282,7 +282,7 @@ func (r *Reflector) ListAndWatch(stopCh <-chan struct{}) error { for { timemoutseconds := int64(minWatchTimeout.Seconds() * (rand.Float64() + 1.0)) - options = v1.ListOptions{ + options = metav1.ListOptions{ ResourceVersion: resourceVersion, // We want to avoid situations of hanging watchers. Stop any wachers that do not // receive any events within the timeout window. diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/cache/reflector_test.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/cache/reflector_test.go index 2eae0c33..ae2b75fa 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/cache/reflector_test.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/cache/reflector_test.go @@ -34,26 +34,26 @@ import ( var nevererrc chan error type testLW struct { - ListFunc func(options v1.ListOptions) (runtime.Object, error) - WatchFunc func(options v1.ListOptions) (watch.Interface, error) + ListFunc func(options metav1.ListOptions) (runtime.Object, error) + WatchFunc func(options metav1.ListOptions) (watch.Interface, error) } -func (t *testLW) List(options v1.ListOptions) (runtime.Object, error) { +func (t *testLW) List(options metav1.ListOptions) (runtime.Object, error) { return t.ListFunc(options) } -func (t *testLW) Watch(options v1.ListOptions) (watch.Interface, error) { +func (t *testLW) Watch(options metav1.ListOptions) (watch.Interface, error) { return t.WatchFunc(options) } func TestCloseWatchChannelOnError(t *testing.T) { r := NewReflector(&testLW{}, &v1.Pod{}, NewStore(MetaNamespaceKeyFunc), 0) - pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "bar"}} + pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "bar"}} fw := watch.NewFake() r.listerWatcher = &testLW{ - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { return fw, nil }, - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { return &v1.PodList{ListMeta: metav1.ListMeta{ResourceVersion: "1"}}, nil }, } @@ -76,17 +76,17 @@ func TestRunUntil(t *testing.T) { r := NewReflector(&testLW{}, &v1.Pod{}, store, 0) fw := watch.NewFake() r.listerWatcher = &testLW{ - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { return fw, nil }, - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { return &v1.PodList{ListMeta: metav1.ListMeta{ResourceVersion: "1"}}, nil }, } r.RunUntil(stopCh) // Synchronously add a dummy pod into the watch channel so we // know the RunUntil go routine is in the watch handler. - fw.Add(&v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "bar"}}) + fw.Add(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "bar"}}) close(stopCh) select { case _, ok := <-fw.ResultChan(): @@ -142,13 +142,13 @@ func TestReflectorWatchHandler(t *testing.T) { s := NewStore(MetaNamespaceKeyFunc) g := NewReflector(&testLW{}, &v1.Pod{}, s, 0) fw := watch.NewFake() - s.Add(&v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "foo"}}) - s.Add(&v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "bar"}}) + s.Add(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}) + s.Add(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "bar"}}) go func() { - fw.Add(&v1.Service{ObjectMeta: v1.ObjectMeta{Name: "rejected"}}) - fw.Delete(&v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "foo"}}) - fw.Modify(&v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "bar", ResourceVersion: "55"}}) - fw.Add(&v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "baz", ResourceVersion: "32"}}) + fw.Add(&v1.Service{ObjectMeta: metav1.ObjectMeta{Name: "rejected"}}) + fw.Delete(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}}) + fw.Modify(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "bar", ResourceVersion: "55"}}) + fw.Add(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "baz", ResourceVersion: "32"}}) fw.Stop() }() var resumeRV string @@ -158,7 +158,7 @@ func TestReflectorWatchHandler(t *testing.T) { } mkPod := func(id string, rv string) *v1.Pod { - return &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: id, ResourceVersion: rv}} + return &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: id, ResourceVersion: rv}} } table := []struct { @@ -215,7 +215,7 @@ func TestReflectorListAndWatch(t *testing.T) { // inject an error. expectedRVs := []string{"1", "3"} lw := &testLW{ - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { rv := options.ResourceVersion fw := watch.NewFake() if e, a := expectedRVs[0], rv; e != a { @@ -227,7 +227,7 @@ func TestReflectorListAndWatch(t *testing.T) { go func() { createdFakes <- fw }() return fw, nil }, - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { return &v1.PodList{ListMeta: metav1.ListMeta{ResourceVersion: "1"}}, nil }, } @@ -242,7 +242,7 @@ func TestReflectorListAndWatch(t *testing.T) { fw = <-createdFakes } sendingRV := strconv.FormatUint(uint64(i+2), 10) - fw.Add(&v1.Pod{ObjectMeta: v1.ObjectMeta{Name: id, ResourceVersion: sendingRV}}) + fw.Add(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: id, ResourceVersion: sendingRV}}) if sendingRV == "3" { // Inject a failure. fw.Stop() @@ -268,7 +268,7 @@ func TestReflectorListAndWatch(t *testing.T) { func TestReflectorListAndWatchWithErrors(t *testing.T) { mkPod := func(id string, rv string) *v1.Pod { - return &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: id, ResourceVersion: rv}} + return &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: id, ResourceVersion: rv}} } mkList := func(rv string, pods ...*v1.Pod) *v1.PodList { list := &v1.PodList{ListMeta: metav1.ListMeta{ResourceVersion: rv}} @@ -331,7 +331,7 @@ func TestReflectorListAndWatchWithErrors(t *testing.T) { } watchRet, watchErr := item.events, item.watchErr lw := &testLW{ - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if watchErr != nil { return nil, watchErr } @@ -345,7 +345,7 @@ func TestReflectorListAndWatchWithErrors(t *testing.T) { }() return fw, nil }, - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { return item.list, item.listErr }, } @@ -369,11 +369,11 @@ func TestReflectorResync(t *testing.T) { } lw := &testLW{ - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { fw := watch.NewFake() return fw, nil }, - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { return &v1.PodList{ListMeta: metav1.ListMeta{ResourceVersion: "0"}}, nil }, } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/cache/testing/fake_controller_source.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/cache/testing/fake_controller_source.go index c0b04ad3..c88a353f 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/cache/testing/fake_controller_source.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/cache/testing/fake_controller_source.go @@ -23,6 +23,7 @@ import ( "sync" "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/watch" @@ -114,7 +115,7 @@ func (f *FakeControllerSource) DeleteDropWatch(lastValue runtime.Object) { f.Change(watch.Event{Type: watch.Deleted, Object: lastValue}, 0) } -func (f *FakeControllerSource) key(accessor meta.Object) nnu { +func (f *FakeControllerSource) key(accessor metav1.Object) nnu { return nnu{accessor.GetNamespace(), accessor.GetName(), accessor.GetUID()} } @@ -162,7 +163,7 @@ func (f *FakeControllerSource) getListItemsLocked() ([]runtime.Object, error) { } // List returns a list object, with its resource version set. -func (f *FakeControllerSource) List(options v1.ListOptions) (runtime.Object, error) { +func (f *FakeControllerSource) List(options metav1.ListOptions) (runtime.Object, error) { f.lock.RLock() defer f.lock.RUnlock() list, err := f.getListItemsLocked() @@ -173,7 +174,7 @@ func (f *FakeControllerSource) List(options v1.ListOptions) (runtime.Object, err if err := meta.SetList(listObj, list); err != nil { return nil, err } - objMeta, err := api.ListMetaFor(listObj) + objMeta, err := metav1.ListMetaFor(listObj) if err != nil { return nil, err } @@ -183,7 +184,7 @@ func (f *FakeControllerSource) List(options v1.ListOptions) (runtime.Object, err } // List returns a list object, with its resource version set. -func (f *FakePVControllerSource) List(options v1.ListOptions) (runtime.Object, error) { +func (f *FakePVControllerSource) List(options metav1.ListOptions) (runtime.Object, error) { f.lock.RLock() defer f.lock.RUnlock() list, err := f.FakeControllerSource.getListItemsLocked() @@ -194,7 +195,7 @@ func (f *FakePVControllerSource) List(options v1.ListOptions) (runtime.Object, e if err := meta.SetList(listObj, list); err != nil { return nil, err } - objMeta, err := api.ListMetaFor(listObj) + objMeta, err := metav1.ListMetaFor(listObj) if err != nil { return nil, err } @@ -204,7 +205,7 @@ func (f *FakePVControllerSource) List(options v1.ListOptions) (runtime.Object, e } // List returns a list object, with its resource version set. -func (f *FakePVCControllerSource) List(options v1.ListOptions) (runtime.Object, error) { +func (f *FakePVCControllerSource) List(options metav1.ListOptions) (runtime.Object, error) { f.lock.RLock() defer f.lock.RUnlock() list, err := f.FakeControllerSource.getListItemsLocked() @@ -215,7 +216,7 @@ func (f *FakePVCControllerSource) List(options v1.ListOptions) (runtime.Object, if err := meta.SetList(listObj, list); err != nil { return nil, err } - objMeta, err := api.ListMetaFor(listObj) + objMeta, err := metav1.ListMetaFor(listObj) if err != nil { return nil, err } @@ -226,7 +227,7 @@ func (f *FakePVCControllerSource) List(options v1.ListOptions) (runtime.Object, // Watch returns a watch, which will be pre-populated with all changes // after resourceVersion. -func (f *FakeControllerSource) Watch(options v1.ListOptions) (watch.Interface, error) { +func (f *FakeControllerSource) Watch(options metav1.ListOptions) (watch.Interface, error) { f.lock.RLock() defer f.lock.RUnlock() rc, err := strconv.Atoi(options.ResourceVersion) diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/cache/testing/fake_controller_source_test.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/cache/testing/fake_controller_source_test.go index 55af8c53..6911abc4 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/cache/testing/fake_controller_source_test.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/cache/testing/fake_controller_source_test.go @@ -20,6 +20,7 @@ import ( "sync" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/pkg/api" "k8s.io/client-go/pkg/api/v1" @@ -51,7 +52,7 @@ func consume(t *testing.T, w watch.Interface, rvs []string, done *sync.WaitGroup func TestRCNumber(t *testing.T) { pod := func(name string) *v1.Pod { return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, } @@ -65,13 +66,13 @@ func TestRCNumber(t *testing.T) { source.Modify(pod("foo")) source.Modify(pod("foo")) - w, err := source.Watch(v1.ListOptions{ResourceVersion: "1"}) + w, err := source.Watch(metav1.ListOptions{ResourceVersion: "1"}) if err != nil { t.Fatalf("Unexpected error: %v", err) } go consume(t, w, []string{"2", "3"}, wg) - list, err := source.List(v1.ListOptions{}) + list, err := source.List(metav1.ListOptions{}) if err != nil { t.Fatalf("Unexpected error: %v", err) } @@ -79,13 +80,13 @@ func TestRCNumber(t *testing.T) { t.Errorf("wanted %v, got %v", e, a) } - w2, err := source.Watch(v1.ListOptions{ResourceVersion: "2"}) + w2, err := source.Watch(metav1.ListOptions{ResourceVersion: "2"}) if err != nil { t.Fatalf("Unexpected error: %v", err) } go consume(t, w2, []string{"3"}, wg) - w3, err := source.Watch(v1.ListOptions{ResourceVersion: "3"}) + w3, err := source.Watch(metav1.ListOptions{ResourceVersion: "3"}) if err != nil { t.Fatalf("Unexpected error: %v", err) } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/clientcmd/client_config.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/clientcmd/client_config.go index 66206879..39e923ea 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/clientcmd/client_config.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/clientcmd/client_config.go @@ -28,7 +28,7 @@ import ( "github.com/imdario/mergo" "k8s.io/client-go/pkg/api" - "k8s.io/client-go/rest" + restclient "k8s.io/client-go/rest" clientauth "k8s.io/client-go/tools/auth" clientcmdapi "k8s.io/client-go/tools/clientcmd/api" ) @@ -58,7 +58,7 @@ type ClientConfig interface { // RawConfig returns the merged result of all overrides RawConfig() (clientcmdapi.Config, error) // ClientConfig returns a complete client config - ClientConfig() (*rest.Config, error) + ClientConfig() (*restclient.Config, error) // Namespace returns the namespace resulting from the merged // result of all overrides and a boolean indicating if it was // overridden @@ -67,7 +67,7 @@ type ClientConfig interface { ConfigAccess() ConfigAccess } -type PersistAuthProviderConfigForUser func(user string) rest.AuthProviderConfigPersister +type PersistAuthProviderConfigForUser func(user string) restclient.AuthProviderConfigPersister type promptedCredentials struct { username string @@ -105,7 +105,7 @@ func (config *DirectClientConfig) RawConfig() (clientcmdapi.Config, error) { } // ClientConfig implements ClientConfig -func (config *DirectClientConfig) ClientConfig() (*rest.Config, error) { +func (config *DirectClientConfig) ClientConfig() (*restclient.Config, error) { // check that getAuthInfo, getContext, and getCluster do not return an error. // Do this before checking if the curent config is usable in the event that an // AuthInfo, Context, or Cluster config with user-defined names are not found. @@ -129,7 +129,7 @@ func (config *DirectClientConfig) ClientConfig() (*rest.Config, error) { return nil, err } - clientConfig := &rest.Config{} + clientConfig := &restclient.Config{} clientConfig.Host = configClusterInfo.Server if len(config.overrides.Timeout) > 0 { @@ -146,17 +146,17 @@ func (config *DirectClientConfig) ClientConfig() (*rest.Config, error) { clientConfig.Host = u.String() } if len(configAuthInfo.Impersonate) > 0 { - clientConfig.Impersonate = rest.ImpersonationConfig{UserName: configAuthInfo.Impersonate} + clientConfig.Impersonate = restclient.ImpersonationConfig{UserName: configAuthInfo.Impersonate} } // only try to read the auth information if we are secure - if rest.IsConfigTransportTLS(*clientConfig) { + if restclient.IsConfigTransportTLS(*clientConfig) { var err error // mergo is a first write wins for map value and a last writing wins for interface values // NOTE: This behavior changed with https://github.com/imdario/mergo/commit/d304790b2ed594794496464fadd89d2bb266600a. // Our mergo.Merge version is older than this change. - var persister rest.AuthProviderConfigPersister + var persister restclient.AuthProviderConfigPersister if config.configAccess != nil { authInfoName, _ := config.getAuthInfoName() persister = PersisterForUser(config.configAccess, authInfoName) @@ -183,11 +183,11 @@ func (config *DirectClientConfig) ClientConfig() (*rest.Config, error) { // 1. configClusterInfo (the final result of command line flags and merged .kubeconfig files) // 2. configAuthInfo.auth-path (this file can contain information that conflicts with #1, and we want #1 to win the priority) // 3. load the ~/.kubernetes_auth file as a default -func getServerIdentificationPartialConfig(configAuthInfo clientcmdapi.AuthInfo, configClusterInfo clientcmdapi.Cluster) (*rest.Config, error) { - mergedConfig := &rest.Config{} +func getServerIdentificationPartialConfig(configAuthInfo clientcmdapi.AuthInfo, configClusterInfo clientcmdapi.Cluster) (*restclient.Config, error) { + mergedConfig := &restclient.Config{} // configClusterInfo holds the information identify the server provided by .kubeconfig - configClientConfig := &rest.Config{} + configClientConfig := &restclient.Config{} configClientConfig.CAFile = configClusterInfo.CertificateAuthority configClientConfig.CAData = configClusterInfo.CertificateAuthorityData configClientConfig.Insecure = configClusterInfo.InsecureSkipTLSVerify @@ -203,8 +203,8 @@ func getServerIdentificationPartialConfig(configAuthInfo clientcmdapi.AuthInfo, // 2. configAuthInfo.auth-path (this file can contain information that conflicts with #1, and we want #1 to win the priority) // 3. if there is not enough information to idenfity the user, load try the ~/.kubernetes_auth file // 4. if there is not enough information to identify the user, prompt if possible -func (config *DirectClientConfig) getUserIdentificationPartialConfig(configAuthInfo clientcmdapi.AuthInfo, fallbackReader io.Reader, persistAuthConfig rest.AuthProviderConfigPersister) (*rest.Config, error) { - mergedConfig := &rest.Config{} +func (config *DirectClientConfig) getUserIdentificationPartialConfig(configAuthInfo clientcmdapi.AuthInfo, fallbackReader io.Reader, persistAuthConfig restclient.AuthProviderConfigPersister) (*restclient.Config, error) { + mergedConfig := &restclient.Config{} // blindly overwrite existing values based on precedence if len(configAuthInfo.Token) > 0 { @@ -217,7 +217,7 @@ func (config *DirectClientConfig) getUserIdentificationPartialConfig(configAuthI mergedConfig.BearerToken = string(tokenBytes) } if len(configAuthInfo.Impersonate) > 0 { - mergedConfig.Impersonate = rest.ImpersonationConfig{UserName: configAuthInfo.Impersonate} + mergedConfig.Impersonate = restclient.ImpersonationConfig{UserName: configAuthInfo.Impersonate} } if len(configAuthInfo.ClientCertificate) > 0 || len(configAuthInfo.ClientCertificateData) > 0 { mergedConfig.CertFile = configAuthInfo.ClientCertificate @@ -248,7 +248,7 @@ func (config *DirectClientConfig) getUserIdentificationPartialConfig(configAuthI } promptedConfig := makeUserIdentificationConfig(*promptedAuthInfo) previouslyMergedConfig := mergedConfig - mergedConfig = &rest.Config{} + mergedConfig = &restclient.Config{} mergo.Merge(mergedConfig, promptedConfig) mergo.Merge(mergedConfig, previouslyMergedConfig) config.promptedCredentials.username = mergedConfig.Username @@ -259,8 +259,8 @@ func (config *DirectClientConfig) getUserIdentificationPartialConfig(configAuthI } // makeUserIdentificationFieldsConfig returns a client.Config capable of being merged using mergo for only user identification information -func makeUserIdentificationConfig(info clientauth.Info) *rest.Config { - config := &rest.Config{} +func makeUserIdentificationConfig(info clientauth.Info) *restclient.Config { + config := &restclient.Config{} config.Username = info.User config.Password = info.Password config.CertFile = info.CertFile @@ -270,8 +270,8 @@ func makeUserIdentificationConfig(info clientauth.Info) *rest.Config { } // makeUserIdentificationFieldsConfig returns a client.Config capable of being merged using mergo for only server identification information -func makeServerIdentificationConfig(info clientauth.Info) rest.Config { - config := rest.Config{} +func makeServerIdentificationConfig(info clientauth.Info) restclient.Config { + config := restclient.Config{} config.CAFile = info.CAFile if info.Insecure != nil { config.Insecure = *info.Insecure @@ -279,7 +279,7 @@ func makeServerIdentificationConfig(info clientauth.Info) rest.Config { return config } -func canIdentifyUser(config rest.Config) bool { +func canIdentifyUser(config restclient.Config) bool { return len(config.Username) > 0 || (len(config.CertFile) > 0 || len(config.CertData) > 0) || len(config.BearerToken) > 0 || @@ -442,7 +442,7 @@ func (config *DirectClientConfig) getCluster() (clientcmdapi.Cluster, error) { // Can take options overrides for flags explicitly provided to the command inside the cluster container. type inClusterClientConfig struct { overrides *ConfigOverrides - inClusterConfigProvider func() (*rest.Config, error) + inClusterConfigProvider func() (*restclient.Config, error) } var _ ClientConfig = &inClusterClientConfig{} @@ -451,9 +451,9 @@ func (config *inClusterClientConfig) RawConfig() (clientcmdapi.Config, error) { return clientcmdapi.Config{}, fmt.Errorf("inCluster environment config doesn't support multiple clusters") } -func (config *inClusterClientConfig) ClientConfig() (*rest.Config, error) { +func (config *inClusterClientConfig) ClientConfig() (*restclient.Config, error) { if config.inClusterConfigProvider == nil { - config.inClusterConfigProvider = rest.InClusterConfig + config.inClusterConfigProvider = restclient.InClusterConfig } icc, err := config.inClusterConfigProvider() @@ -512,10 +512,10 @@ func (config *inClusterClientConfig) Possible() bool { // components. Warnings should reflect this usage. If neither masterUrl or kubeconfigPath // are passed in we fallback to inClusterConfig. If inClusterConfig fails, we fallback // to the default config. -func BuildConfigFromFlags(masterUrl, kubeconfigPath string) (*rest.Config, error) { +func BuildConfigFromFlags(masterUrl, kubeconfigPath string) (*restclient.Config, error) { if kubeconfigPath == "" && masterUrl == "" { glog.Warningf("Neither --kubeconfig nor --master was specified. Using the inClusterConfig. This might not work.") - kubeconfig, err := rest.InClusterConfig() + kubeconfig, err := restclient.InClusterConfig() if err == nil { return kubeconfig, nil } @@ -528,7 +528,7 @@ func BuildConfigFromFlags(masterUrl, kubeconfigPath string) (*rest.Config, error // BuildConfigFromKubeconfigGetter is a helper function that builds configs from a master // url and a kubeconfigGetter. -func BuildConfigFromKubeconfigGetter(masterUrl string, kubeconfigGetter KubeconfigGetter) (*rest.Config, error) { +func BuildConfigFromKubeconfigGetter(masterUrl string, kubeconfigGetter KubeconfigGetter) (*restclient.Config, error) { // TODO: We do not need a DeferredLoader here. Refactor code and see if we can use DirectClientConfig here. cc := NewNonInteractiveDeferredLoadingClientConfig( &ClientConfigGetter{kubeconfigGetter: kubeconfigGetter}, diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/clientcmd/client_config_test.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/clientcmd/client_config_test.go index c78cca27..0cbff3f8 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/clientcmd/client_config_test.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/clientcmd/client_config_test.go @@ -24,7 +24,7 @@ import ( "testing" "github.com/imdario/mergo" - "k8s.io/client-go/rest" + restclient "k8s.io/client-go/rest" clientcmdapi "k8s.io/client-go/tools/clientcmd/api" ) @@ -448,11 +448,11 @@ func TestInClusterClientConfigPrecedence(t *testing.T) { expectedCAFile := "/path/to/ca-from-cluster.crt" icc := &inClusterClientConfig{ - inClusterConfigProvider: func() (*rest.Config, error) { - return &rest.Config{ + inClusterConfigProvider: func() (*restclient.Config, error) { + return &restclient.Config{ Host: expectedServer, BearerToken: expectedToken, - TLSClientConfig: rest.TLSClientConfig{ + TLSClientConfig: restclient.TLSClientConfig{ CAFile: expectedCAFile, }, }, nil diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/clientcmd/config.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/clientcmd/config.go index 3e5aa49a..16ccdaf2 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/clientcmd/config.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/clientcmd/config.go @@ -26,7 +26,7 @@ import ( "github.com/golang/glog" - "k8s.io/client-go/rest" + restclient "k8s.io/client-go/rest" clientcmdapi "k8s.io/client-go/tools/clientcmd/api" ) @@ -325,7 +325,7 @@ func ModifyConfig(configAccess ConfigAccess, newConfig clientcmdapi.Config, rela return nil } -func PersisterForUser(configAccess ConfigAccess, user string) rest.AuthProviderConfigPersister { +func PersisterForUser(configAccess ConfigAccess, user string) restclient.AuthProviderConfigPersister { return &persister{configAccess, user} } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/clientcmd/loader.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/clientcmd/loader.go index 5fcc0ad5..1fcc5103 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/clientcmd/loader.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/clientcmd/loader.go @@ -33,10 +33,10 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" utilerrors "k8s.io/apimachinery/pkg/util/errors" - "k8s.io/client-go/pkg/util/homedir" - "k8s.io/client-go/rest" + restclient "k8s.io/client-go/rest" clientcmdapi "k8s.io/client-go/tools/clientcmd/api" clientcmdlatest "k8s.io/client-go/tools/clientcmd/api/latest" + "k8s.io/client-go/util/homedir" ) const ( @@ -68,7 +68,7 @@ func currentMigrationRules() map[string]string { type ClientConfigLoader interface { ConfigAccess // IsDefaultConfig returns true if the returned config matches the defaults. - IsDefaultConfig(*rest.Config) bool + IsDefaultConfig(*restclient.Config) bool // Load returns the latest config Load() (*clientcmdapi.Config, error) } @@ -101,7 +101,7 @@ func (g *ClientConfigGetter) IsExplicitFile() bool { func (g *ClientConfigGetter) GetExplicitFile() string { return "" } -func (g *ClientConfigGetter) IsDefaultConfig(config *rest.Config) bool { +func (g *ClientConfigGetter) IsDefaultConfig(config *restclient.Config) bool { return false } @@ -330,7 +330,7 @@ func (rules *ClientConfigLoadingRules) GetExplicitFile() string { } // IsDefaultConfig returns true if the provided configuration matches the default -func (rules *ClientConfigLoadingRules) IsDefaultConfig(config *rest.Config) bool { +func (rules *ClientConfigLoadingRules) IsDefaultConfig(config *restclient.Config) bool { if rules.DefaultClientConfig == nil { return false } diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/clientcmd/loader_test.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/clientcmd/loader_test.go index 2558243d..74319788 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/clientcmd/loader_test.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/clientcmd/loader_test.go @@ -129,7 +129,7 @@ func TestErrorReadingNonFile(t *testing.T) { if err != nil { t.Fatalf("Couldn't create tmpdir") } - defer os.Remove(tmpdir) + defer os.RemoveAll(tmpdir) loadingRules := ClientConfigLoadingRules{ ExplicitPath: tmpdir, @@ -224,14 +224,15 @@ func TestResolveRelativePaths(t *testing.T) { } configDir1, _ := ioutil.TempDir("", "") + defer os.RemoveAll(configDir1) configFile1 := path.Join(configDir1, ".kubeconfig") configDir1, _ = filepath.Abs(configDir1) - defer os.Remove(configFile1) + configDir2, _ := ioutil.TempDir("", "") + defer os.RemoveAll(configDir2) configDir2, _ = ioutil.TempDir(configDir2, "") configFile2 := path.Join(configDir2, ".kubeconfig") configDir2, _ = filepath.Abs(configDir2) - defer os.Remove(configFile2) WriteToFile(pathResolutionConfig1, configFile1) WriteToFile(pathResolutionConfig2, configFile2) diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/clientcmd/merged_client_builder.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/clientcmd/merged_client_builder.go index ef15deed..92c1a5a0 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/clientcmd/merged_client_builder.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/clientcmd/merged_client_builder.go @@ -22,7 +22,7 @@ import ( "github.com/golang/glog" - "k8s.io/client-go/rest" + restclient "k8s.io/client-go/rest" clientcmdapi "k8s.io/client-go/tools/clientcmd/api" ) @@ -94,7 +94,7 @@ func (config *DeferredLoadingClientConfig) RawConfig() (clientcmdapi.Config, err } // ClientConfig implements ClientConfig -func (config *DeferredLoadingClientConfig) ClientConfig() (*rest.Config, error) { +func (config *DeferredLoadingClientConfig) ClientConfig() (*restclient.Config, error) { mergedClientConfig, err := config.createClientConfig() if err != nil { return nil, err diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/clientcmd/merged_client_builder_test.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/clientcmd/merged_client_builder_test.go index e73fc93b..8b038676 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/clientcmd/merged_client_builder_test.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/clientcmd/merged_client_builder_test.go @@ -20,7 +20,7 @@ import ( "fmt" "testing" - "k8s.io/client-go/rest" + restclient "k8s.io/client-go/rest" clientcmdapi "k8s.io/client-go/tools/clientcmd/api" ) @@ -38,7 +38,7 @@ func (l *testLoader) Load() (*clientcmdapi.Config, error) { } type testClientConfig struct { - config *rest.Config + config *restclient.Config namespace string namespaceSpecified bool err error @@ -47,7 +47,7 @@ type testClientConfig struct { func (c *testClientConfig) RawConfig() (clientcmdapi.Config, error) { return clientcmdapi.Config{}, fmt.Errorf("unexpected call") } -func (c *testClientConfig) ClientConfig() (*rest.Config, error) { +func (c *testClientConfig) ClientConfig() (*restclient.Config, error) { return c.config, c.err } func (c *testClientConfig) Namespace() (string, bool, error) { @@ -95,7 +95,7 @@ func TestInClusterConfig(t *testing.T) { if err != nil { t.Fatal(err) } - config2 := &rest.Config{Host: "config2"} + config2 := &restclient.Config{Host: "config2"} err1 := fmt.Errorf("unique error") testCases := map[string]struct { @@ -104,7 +104,7 @@ func TestInClusterConfig(t *testing.T) { defaultConfig *DirectClientConfig checkedICC bool - result *rest.Config + result *restclient.Config err error }{ "in-cluster checked on other error": { diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/record/event.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/record/event.go index 200c33df..154cb288 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/record/event.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/record/event.go @@ -21,14 +21,14 @@ import ( "math/rand" "time" + "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/watch" - "k8s.io/client-go/pkg/api/errors" "k8s.io/client-go/pkg/api/v1" - "k8s.io/client-go/pkg/util/clock" - "k8s.io/client-go/rest" + restclient "k8s.io/client-go/rest" + "k8s.io/client-go/util/clock" "net/http" @@ -188,7 +188,7 @@ func recordEvent(sink EventSink, event *v1.Event, patch []byte, updateExistingEv // If we can't contact the server, then hold everything while we keep trying. // Otherwise, something about the event is malformed and we should abandon it. switch err.(type) { - case *rest.RequestConstructionError: + case *restclient.RequestConstructionError: // We will construct the request the same next time, so don't keep trying. glog.Errorf("Unable to construct event '%#v': '%v' (will not retry!)", event, err) return true @@ -298,10 +298,10 @@ func (recorder *recorderImpl) makeEvent(ref *v1.ObjectReference, eventtype, reas t := metav1.Time{Time: recorder.clock.Now()} namespace := ref.Namespace if namespace == "" { - namespace = v1.NamespaceDefault + namespace = metav1.NamespaceDefault } return &v1.Event{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: fmt.Sprintf("%v.%x", ref.Name, t.UnixNano()), Namespace: namespace, }, diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/record/event_test.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/record/event_test.go index b9835e34..7d3f38dc 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/record/event_test.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/record/event_test.go @@ -25,14 +25,14 @@ import ( "testing" "time" + "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" k8sruntime "k8s.io/apimachinery/pkg/runtime" - "k8s.io/client-go/pkg/api/errors" _ "k8s.io/client-go/pkg/api/install" // To register api.Pod used in tests below "k8s.io/client-go/pkg/api/v1" - "k8s.io/client-go/pkg/util/clock" "k8s.io/client-go/pkg/util/strategicpatch" - "k8s.io/client-go/rest" + restclient "k8s.io/client-go/rest" + "k8s.io/client-go/util/clock" ) type testEventSink struct { @@ -103,7 +103,7 @@ func OnPatchFactory(testCache map[string]*v1.Event, patchEvent chan<- *v1.Event) func TestEventf(t *testing.T) { testPod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ SelfLink: "/api/version/pods/foo", Name: "foo", Namespace: "baz", @@ -111,7 +111,7 @@ func TestEventf(t *testing.T) { }, } testPod2 := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ SelfLink: "/api/version/pods/foo", Name: "foo", Namespace: "baz", @@ -140,7 +140,7 @@ func TestEventf(t *testing.T) { messageFmt: "some verbose message: %v", elements: []interface{}{1}, expect: &v1.Event{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "baz", }, @@ -168,7 +168,7 @@ func TestEventf(t *testing.T) { messageFmt: "some other verbose message: %v", elements: []interface{}{1}, expect: &v1.Event{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "baz", }, @@ -195,7 +195,7 @@ func TestEventf(t *testing.T) { messageFmt: "some verbose message: %v", elements: []interface{}{1}, expect: &v1.Event{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "baz", }, @@ -223,7 +223,7 @@ func TestEventf(t *testing.T) { messageFmt: "some verbose message: %v", elements: []interface{}{1}, expect: &v1.Event{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "baz", }, @@ -251,7 +251,7 @@ func TestEventf(t *testing.T) { messageFmt: "some verbose message: %v", elements: []interface{}{1}, expect: &v1.Event{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "baz", }, @@ -279,7 +279,7 @@ func TestEventf(t *testing.T) { messageFmt: "some verbose message: %v", elements: []interface{}{1}, expect: &v1.Event{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "baz", }, @@ -307,7 +307,7 @@ func TestEventf(t *testing.T) { messageFmt: "some verbose message: %v", elements: []interface{}{1}, expect: &v1.Event{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "baz", }, @@ -387,7 +387,7 @@ func TestWriteEventError(t *testing.T) { "giveUp1": { timesToSendError: 1000, attemptsWanted: 1, - err: &rest.RequestConstructionError{}, + err: &restclient.RequestConstructionError{}, }, "giveUp2": { timesToSendError: 1000, @@ -524,7 +524,7 @@ func TestLotsOfEvents(t *testing.T) { func TestEventfNoNamespace(t *testing.T) { testPod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ SelfLink: "/api/version/pods/foo", Name: "foo", UID: "bar", @@ -551,7 +551,7 @@ func TestEventfNoNamespace(t *testing.T) { messageFmt: "some verbose message: %v", elements: []interface{}{1}, expect: &v1.Event{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "default", }, @@ -621,7 +621,7 @@ func TestEventfNoNamespace(t *testing.T) { func TestMultiSinkCache(t *testing.T) { testPod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ SelfLink: "/api/version/pods/foo", Name: "foo", Namespace: "baz", @@ -629,7 +629,7 @@ func TestMultiSinkCache(t *testing.T) { }, } testPod2 := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ SelfLink: "/api/version/pods/foo", Name: "foo", Namespace: "baz", @@ -658,7 +658,7 @@ func TestMultiSinkCache(t *testing.T) { messageFmt: "some verbose message: %v", elements: []interface{}{1}, expect: &v1.Event{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "baz", }, @@ -686,7 +686,7 @@ func TestMultiSinkCache(t *testing.T) { messageFmt: "some other verbose message: %v", elements: []interface{}{1}, expect: &v1.Event{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "baz", }, @@ -713,7 +713,7 @@ func TestMultiSinkCache(t *testing.T) { messageFmt: "some verbose message: %v", elements: []interface{}{1}, expect: &v1.Event{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "baz", }, @@ -741,7 +741,7 @@ func TestMultiSinkCache(t *testing.T) { messageFmt: "some verbose message: %v", elements: []interface{}{1}, expect: &v1.Event{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "baz", }, @@ -769,7 +769,7 @@ func TestMultiSinkCache(t *testing.T) { messageFmt: "some verbose message: %v", elements: []interface{}{1}, expect: &v1.Event{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "baz", }, @@ -797,7 +797,7 @@ func TestMultiSinkCache(t *testing.T) { messageFmt: "some verbose message: %v", elements: []interface{}{1}, expect: &v1.Event{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "baz", }, @@ -825,7 +825,7 @@ func TestMultiSinkCache(t *testing.T) { messageFmt: "some verbose message: %v", elements: []interface{}{1}, expect: &v1.Event{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "baz", }, diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/record/events_cache.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/record/events_cache.go index 0565f89b..0fe1a38d 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/record/events_cache.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/record/events_cache.go @@ -28,8 +28,8 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/client-go/pkg/api/v1" - "k8s.io/client-go/pkg/util/clock" "k8s.io/client-go/pkg/util/strategicpatch" + "k8s.io/client-go/util/clock" ) const ( @@ -172,7 +172,7 @@ func (e *EventAggregator) EventAggregate(newEvent *v1.Event) (*v1.Event, error) // create a new aggregate event eventCopy := &v1.Event{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: fmt.Sprintf("%v.%x", newEvent.InvolvedObject.Name, now.UnixNano()), Namespace: newEvent.Namespace, }, @@ -244,7 +244,7 @@ func (e *eventLogger) eventObserve(newEvent *v1.Event) (*v1.Event, []byte, error newData, _ := json.Marshal(event) oldData, _ := json.Marshal(eventCopy2) - patch, err = strategicpatch.CreateStrategicMergePatch(oldData, newData, event) + patch, err = strategicpatch.CreateTwoWayMergePatch(oldData, newData, event) } // record our new observation diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/record/events_cache_test.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/record/events_cache_test.go index 1b60cb66..b6b52881 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/record/events_cache_test.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/tools/record/events_cache_test.go @@ -25,7 +25,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/diff" "k8s.io/client-go/pkg/api/v1" - "k8s.io/client-go/pkg/util/clock" + "k8s.io/client-go/util/clock" ) func makeObjectReference(kind, name, namespace string) v1.ObjectReference { diff --git a/vendor/k8s.io/kubernetes/pkg/util/cert/cert.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/util/cert/cert.go similarity index 95% rename from vendor/k8s.io/kubernetes/pkg/util/cert/cert.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/util/cert/cert.go index fff5b38d..941d6db6 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/cert/cert.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/util/cert/cert.go @@ -25,6 +25,7 @@ import ( "crypto/x509" "crypto/x509/pkix" "encoding/pem" + "errors" "fmt" "math" "math/big" @@ -42,6 +43,7 @@ type Config struct { CommonName string Organization []string AltNames AltNames + Usages []x509.ExtKeyUsage } // AltNames contains the domain names and IP addresses that will be added @@ -86,11 +88,17 @@ func NewSignedCert(cfg Config, key *rsa.PrivateKey, caCert *x509.Certificate, ca if err != nil { return nil, err } + if len(cfg.CommonName) == 0 { + return nil, errors.New("must specify a CommonName") + } + if len(cfg.Usages) == 0 { + return nil, errors.New("must specify at least one ExtKeyUsage") + } certTmpl := x509.Certificate{ Subject: pkix.Name{ CommonName: cfg.CommonName, - Organization: caCert.Subject.Organization, + Organization: cfg.Organization, }, DNSNames: cfg.AltNames.DNSNames, IPAddresses: cfg.AltNames.IPs, @@ -98,7 +106,7 @@ func NewSignedCert(cfg Config, key *rsa.PrivateKey, caCert *x509.Certificate, ca NotBefore: caCert.NotBefore, NotAfter: time.Now().Add(duration365d).UTC(), KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature, - ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth, x509.ExtKeyUsageClientAuth}, + ExtKeyUsage: cfg.Usages, } certDERBytes, err := x509.CreateCertificate(cryptorand.Reader, &certTmpl, caCert, key.Public(), caKey) if err != nil { diff --git a/vendor/k8s.io/kubernetes/pkg/util/cert/csr.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/util/cert/csr.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/util/cert/csr.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/util/cert/csr.go diff --git a/vendor/k8s.io/kubernetes/pkg/util/cert/csr_test.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/util/cert/csr_test.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/util/cert/csr_test.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/util/cert/csr_test.go diff --git a/vendor/k8s.io/kubernetes/pkg/util/cert/io.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/util/cert/io.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/util/cert/io.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/util/cert/io.go diff --git a/vendor/k8s.io/kubernetes/pkg/util/cert/pem.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/util/cert/pem.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/util/cert/pem.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/util/cert/pem.go diff --git a/vendor/k8s.io/kubernetes/pkg/util/cert/testdata/dontUseThisKey.pem b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/util/cert/testdata/dontUseThisKey.pem similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/util/cert/testdata/dontUseThisKey.pem rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/util/cert/testdata/dontUseThisKey.pem diff --git a/vendor/k8s.io/kubernetes/pkg/util/cert/triple/triple.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/util/cert/triple/triple.go similarity index 89% rename from vendor/k8s.io/kubernetes/pkg/util/cert/triple/triple.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/util/cert/triple/triple.go index d226ed8d..b89ef724 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/cert/triple/triple.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/util/cert/triple/triple.go @@ -24,7 +24,7 @@ import ( "fmt" "net" - certutil "k8s.io/kubernetes/pkg/util/cert" + certutil "k8s.io/client-go/util/cert" ) type KeyPair struct { @@ -80,6 +80,7 @@ func NewServerKeyPair(ca *KeyPair, commonName, svcName, svcNamespace, dnsDomain config := certutil.Config{ CommonName: commonName, AltNames: altNames, + Usages: []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth}, } cert, err := certutil.NewSignedCert(config, key, ca.Cert, ca.Key) if err != nil { @@ -92,14 +93,16 @@ func NewServerKeyPair(ca *KeyPair, commonName, svcName, svcNamespace, dnsDomain }, nil } -func NewClientKeyPair(ca *KeyPair, commonName string) (*KeyPair, error) { +func NewClientKeyPair(ca *KeyPair, commonName string, organizations []string) (*KeyPair, error) { key, err := certutil.NewPrivateKey() if err != nil { return nil, fmt.Errorf("unable to create a client private key: %v", err) } config := certutil.Config{ - CommonName: commonName, + CommonName: commonName, + Organization: organizations, + Usages: []x509.ExtKeyUsage{x509.ExtKeyUsageClientAuth}, } cert, err := certutil.NewSignedCert(config, key, ca.Cert, ca.Key) if err != nil { diff --git a/vendor/k8s.io/kubernetes/pkg/util/clock/clock.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/util/clock/clock.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/util/clock/clock.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/util/clock/clock.go diff --git a/vendor/k8s.io/kubernetes/pkg/util/clock/clock_test.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/util/clock/clock_test.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/util/clock/clock_test.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/util/clock/clock_test.go diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/flowcontrol/backoff.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/util/flowcontrol/backoff.go similarity index 98% rename from vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/flowcontrol/backoff.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/util/flowcontrol/backoff.go index c3bf9582..030b15a5 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/flowcontrol/backoff.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/util/flowcontrol/backoff.go @@ -20,8 +20,8 @@ import ( "sync" "time" - "k8s.io/client-go/pkg/util/clock" - "k8s.io/client-go/pkg/util/integer" + "k8s.io/client-go/util/clock" + "k8s.io/client-go/util/integer" ) type backoffEntry struct { diff --git a/vendor/k8s.io/kubernetes/pkg/util/flowcontrol/backoff_test.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/util/flowcontrol/backoff_test.go similarity index 99% rename from vendor/k8s.io/kubernetes/pkg/util/flowcontrol/backoff_test.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/util/flowcontrol/backoff_test.go index df663221..5d1e4134 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/flowcontrol/backoff_test.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/util/flowcontrol/backoff_test.go @@ -20,7 +20,7 @@ import ( "testing" "time" - "k8s.io/kubernetes/pkg/util/clock" + "k8s.io/client-go/util/clock" ) func TestSlowBackoff(t *testing.T) { diff --git a/vendor/k8s.io/kubernetes/pkg/util/flowcontrol/throttle.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/util/flowcontrol/throttle.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/util/flowcontrol/throttle.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/util/flowcontrol/throttle.go diff --git a/vendor/k8s.io/kubernetes/pkg/util/flowcontrol/throttle_test.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/util/flowcontrol/throttle_test.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/util/flowcontrol/throttle_test.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/util/flowcontrol/throttle_test.go diff --git a/vendor/k8s.io/kubernetes/pkg/util/homedir/homedir.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/util/homedir/homedir.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/util/homedir/homedir.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/util/homedir/homedir.go diff --git a/vendor/k8s.io/kubernetes/pkg/util/integer/integer.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/util/integer/integer.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/util/integer/integer.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/util/integer/integer.go diff --git a/vendor/k8s.io/kubernetes/pkg/util/integer/integer_test.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/util/integer/integer_test.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/util/integer/integer_test.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/util/integer/integer_test.go diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/jsonpath/doc.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/util/jsonpath/doc.go similarity index 92% rename from vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/jsonpath/doc.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/util/jsonpath/doc.go index 2a6e1706..0effb15c 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/jsonpath/doc.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/util/jsonpath/doc.go @@ -17,4 +17,4 @@ limitations under the License. // package jsonpath is a template engine using jsonpath syntax, // which can be seen at http://goessner.net/articles/JsonPath/. // In addition, it has {range} {end} function to iterate list and slice. -package jsonpath +package jsonpath // import "k8s.io/client-go/util/jsonpath" diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/jsonpath/jsonpath.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/util/jsonpath/jsonpath.go similarity index 100% rename from vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/pkg/util/jsonpath/jsonpath.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/util/jsonpath/jsonpath.go diff --git a/vendor/k8s.io/kubernetes/pkg/util/jsonpath/jsonpath_test.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/util/jsonpath/jsonpath_test.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/util/jsonpath/jsonpath_test.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/util/jsonpath/jsonpath_test.go diff --git a/vendor/k8s.io/kubernetes/pkg/util/jsonpath/node.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/util/jsonpath/node.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/util/jsonpath/node.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/util/jsonpath/node.go diff --git a/vendor/k8s.io/kubernetes/pkg/util/jsonpath/parser.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/util/jsonpath/parser.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/util/jsonpath/parser.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/util/jsonpath/parser.go diff --git a/vendor/k8s.io/kubernetes/pkg/util/jsonpath/parser_test.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/util/jsonpath/parser_test.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/util/jsonpath/parser_test.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/util/jsonpath/parser_test.go diff --git a/vendor/k8s.io/kubernetes/pkg/util/testing/fake_handler.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/util/testing/fake_handler.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/util/testing/fake_handler.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/util/testing/fake_handler.go diff --git a/vendor/k8s.io/kubernetes/pkg/util/testing/fake_handler_test.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/util/testing/fake_handler_test.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/util/testing/fake_handler_test.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/util/testing/fake_handler_test.go diff --git a/vendor/k8s.io/kubernetes/pkg/util/testing/tmpdir.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/util/testing/tmpdir.go similarity index 100% rename from vendor/k8s.io/kubernetes/pkg/util/testing/tmpdir.go rename to vendor/k8s.io/kubernetes/staging/src/k8s.io/client-go/util/testing/tmpdir.go diff --git a/vendor/k8s.io/kubernetes/test/BUILD b/vendor/k8s.io/kubernetes/test/BUILD index 5063f9bf..9c4c19ec 100644 --- a/vendor/k8s.io/kubernetes/test/BUILD +++ b/vendor/k8s.io/kubernetes/test/BUILD @@ -14,10 +14,12 @@ filegroup( srcs = [ ":package-srcs", "//test/e2e:all-srcs", + "//test/e2e_federation:all-srcs", "//test/e2e_node:all-srcs", "//test/fixtures:all-srcs", "//test/images:all-srcs", "//test/integration:all-srcs", + "//test/kubemark:all-srcs", "//test/list:all-srcs", "//test/soak/cauldron:all-srcs", "//test/soak/serve_hostnames:all-srcs", diff --git a/vendor/k8s.io/kubernetes/test/OWNERS b/vendor/k8s.io/kubernetes/test/OWNERS index 0cd4be1b..1345dfb0 100644 --- a/vendor/k8s.io/kubernetes/test/OWNERS +++ b/vendor/k8s.io/kubernetes/test/OWNERS @@ -1,4 +1,20 @@ -assignees: +reviewers: + - deads2k - fejta - ixdy + - krousey + - liggitt + - madhusudancs + - smarterclayton - spxtr + - sttts +approvers: + - deads2k + - fejta + - ixdy + - krousey + - liggitt + - madhusudancs + - smarterclayton + - spxtr + - sttts diff --git a/vendor/k8s.io/kubernetes/test/e2e/BUILD b/vendor/k8s.io/kubernetes/test/e2e/BUILD index 9f7cba5a..b6087fac 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/BUILD +++ b/vendor/k8s.io/kubernetes/test/e2e/BUILD @@ -38,17 +38,6 @@ go_library( "example_cluster_dns.go", "example_k8petstore.go", "examples.go", - "federated-ingress.go", - "federated-namespace.go", - "federated-secret.go", - "federated-service.go", - "federation-apiserver.go", - "federation-authn.go", - "federation-daemonset.go", - "federation-deployment.go", - "federation-event.go", - "federation-replicaset.go", - "federation-util.go", "firewall.go", "garbage_collector.go", "generated_clientset.go", @@ -80,7 +69,6 @@ go_library( "pd.go", "persistent_volumes.go", "persistent_volumes-disruptive.go", - "petset.go", "pod_gc.go", "pods.go", "portforward.go", @@ -100,6 +88,7 @@ go_library( "service_latency.go", "serviceloadbalancers.go", "ssh.go", + "statefulset.go", "third-party.go", "ubernetes_lite.go", "util_iperf.go", @@ -109,9 +98,6 @@ go_library( tags = ["automanaged"], deps = [ "//federation/apis/federation/v1beta1:go_default_library", - "//federation/client/clientset_generated/federation_clientset:go_default_library", - "//federation/client/clientset_generated/federation_clientset/typed/core/v1:go_default_library", - "//federation/pkg/federation-controller/util:go_default_library", "//pkg/api:go_default_library", "//pkg/api/annotations:go_default_library", "//pkg/api/resource:go_default_library", @@ -125,7 +111,7 @@ go_library( "//pkg/apis/batch/v2alpha1:go_default_library", "//pkg/apis/extensions:go_default_library", "//pkg/apis/extensions/v1beta1:go_default_library", - "//pkg/apis/rbac/v1alpha1:go_default_library", + "//pkg/apis/rbac/v1beta1:go_default_library", "//pkg/apis/storage/util:go_default_library", "//pkg/apis/storage/v1beta1:go_default_library", "//pkg/apis/storage/v1beta1/util:go_default_library", @@ -134,10 +120,6 @@ go_library( "//pkg/client/clientset_generated/clientset/typed/core/v1:go_default_library", "//pkg/client/clientset_generated/clientset/typed/extensions/v1beta1:go_default_library", "//pkg/client/clientset_generated/internalclientset:go_default_library", - "//pkg/client/restclient:go_default_library", - "//pkg/client/transport:go_default_library", - "//pkg/client/unversioned/clientcmd:go_default_library", - "//pkg/client/unversioned/clientcmd/api:go_default_library", "//pkg/cloudprovider:go_default_library", "//pkg/cloudprovider/providers/aws:go_default_library", "//pkg/cloudprovider/providers/gce:go_default_library", @@ -145,10 +127,10 @@ go_library( "//pkg/controller/deployment/util:go_default_library", "//pkg/controller/endpoint:go_default_library", "//pkg/controller/job:go_default_library", - "//pkg/controller/petset:go_default_library", "//pkg/controller/replicaset:go_default_library", "//pkg/controller/replication:go_default_library", - "//pkg/fields:go_default_library", + "//pkg/controller/statefulset:go_default_library", + "//pkg/genericapiserver/registry/generic/registry:go_default_library", "//pkg/kubectl:go_default_library", "//pkg/kubectl/cmd/util:go_default_library", "//pkg/kubelet/api/v1alpha1/stats:go_default_library", @@ -156,12 +138,9 @@ go_library( "//pkg/master/ports:go_default_library", "//pkg/metrics:go_default_library", "//pkg/quota/evaluator/core:go_default_library", - "//pkg/registry/generic/registry:go_default_library", "//pkg/security/apparmor:go_default_library", - "//pkg/serviceaccount:go_default_library", "//pkg/util:go_default_library", "//pkg/util/exec:go_default_library", - "//pkg/util/flowcontrol:go_default_library", "//pkg/util/intstr:go_default_library", "//pkg/util/logs:go_default_library", "//pkg/util/system:go_default_library", @@ -174,6 +153,7 @@ go_library( "//test/e2e/common:go_default_library", "//test/e2e/framework:go_default_library", "//test/e2e/generated:go_default_library", + "//test/e2e_federation:go_default_library", "//test/images/net/nat:go_default_library", "//test/utils:go_default_library", "//vendor:github.com/aws/aws-sdk-go/aws", @@ -197,6 +177,7 @@ go_library( "//vendor:gopkg.in/inf.v0", "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", @@ -208,11 +189,15 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/util/wait", "//vendor:k8s.io/apimachinery/pkg/util/yaml", "//vendor:k8s.io/apimachinery/pkg/watch", + "//vendor:k8s.io/apiserver/pkg/authentication/serviceaccount", "//vendor:k8s.io/client-go/kubernetes", "//vendor:k8s.io/client-go/pkg/api/v1", "//vendor:k8s.io/client-go/pkg/apis/extensions/v1beta1", "//vendor:k8s.io/client-go/pkg/apis/policy/v1beta1", "//vendor:k8s.io/client-go/pkg/util/intstr", + "//vendor:k8s.io/client-go/rest", + "//vendor:k8s.io/client-go/transport", + "//vendor:k8s.io/client-go/util/flowcontrol", ], ) @@ -228,12 +213,12 @@ go_test( "integration", ], deps = [ - "//pkg/api/v1:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", "//pkg/metrics:go_default_library", "//test/e2e/framework:go_default_library", "//vendor:github.com/onsi/ginkgo", "//vendor:github.com/onsi/gomega", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", ], ) diff --git a/vendor/k8s.io/kubernetes/test/e2e/addon_update.go b/vendor/k8s.io/kubernetes/test/e2e/addon_update.go index 922090c8..666a2217 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/addon_update.go +++ b/vendor/k8s.io/kubernetes/test/e2e/addon_update.go @@ -26,7 +26,6 @@ import ( "golang.org/x/crypto/ssh" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/test/e2e/framework" @@ -206,7 +205,7 @@ spec: const ( addonTestPollInterval = 3 * time.Second addonTestPollTimeout = 5 * time.Minute - defaultNsName = v1.NamespaceDefault + defaultNsName = metav1.NamespaceDefault addonNsName = "kube-system" ) diff --git a/vendor/k8s.io/kubernetes/test/e2e/apparmor.go b/vendor/k8s.io/kubernetes/test/e2e/apparmor.go index 9b0378f6..6a61d65f 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/apparmor.go +++ b/vendor/k8s.io/kubernetes/test/e2e/apparmor.go @@ -19,6 +19,7 @@ package e2e import ( "fmt" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" api "k8s.io/kubernetes/pkg/api/v1" extensions "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" "k8s.io/kubernetes/pkg/security/apparmor" @@ -52,7 +53,7 @@ elif ! touch %[2]s; then exit 2 fi`, deniedPath, allowedPath) pod := &api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test-apparmor", Annotations: map[string]string{ apparmor.ContainerAnnotationKeyPrefix + "test": profile, @@ -99,7 +100,7 @@ profile %s flags=(attach_disconnected) { `, profileName, deniedPath, allowedPath) cm := &api.ConfigMap{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "apparmor-profiles", Namespace: f.Namespace.Name, }, @@ -114,13 +115,13 @@ func createAppArmorProfileLoader(f *framework.Framework) (*extensions.DaemonSet, True := true // Copied from https://github.com/kubernetes/contrib/blob/master/apparmor/loader/example-configmap.yaml loader := &extensions.DaemonSet{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "apparmor-loader", Namespace: f.Namespace.Name, }, Spec: extensions.DaemonSetSpec{ Template: api.PodTemplateSpec{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"name": "apparmor-loader"}, }, Spec: api.PodSpec{ diff --git a/vendor/k8s.io/kubernetes/test/e2e/autoscaling_utils.go b/vendor/k8s.io/kubernetes/test/e2e/autoscaling_utils.go index 965f5d7a..4c58c012 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/autoscaling_utils.go +++ b/vendor/k8s.io/kubernetes/test/e2e/autoscaling_utils.go @@ -330,7 +330,7 @@ func (rc *ResourceConsumer) CleanUp() { func runServiceAndWorkloadForResourceConsumer(c clientset.Interface, internalClient internalclientset.Interface, ns, name, kind string, replicas int, cpuLimitMillis, memLimitMb int64) { By(fmt.Sprintf("Running consuming RC %s via %s with %v replicas", name, kind, replicas)) _, err := c.Core().Services(ns).Create(&v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Spec: v1.ServiceSpec{ @@ -384,7 +384,7 @@ func runServiceAndWorkloadForResourceConsumer(c clientset.Interface, internalCli By(fmt.Sprintf("Running controller")) controllerName := name + "-ctrl" _, err = c.Core().Services(ns).Create(&v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: controllerName, }, Spec: v1.ServiceSpec{ diff --git a/vendor/k8s.io/kubernetes/test/e2e/cadvisor.go b/vendor/k8s.io/kubernetes/test/e2e/cadvisor.go index fe7568a7..8fc5c017 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/cadvisor.go +++ b/vendor/k8s.io/kubernetes/test/e2e/cadvisor.go @@ -20,7 +20,7 @@ import ( "fmt" "time" - "k8s.io/kubernetes/pkg/api/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/test/e2e/framework" @@ -39,7 +39,7 @@ var _ = framework.KubeDescribe("Cadvisor", func() { func CheckCadvisorHealthOnAllNodes(c clientset.Interface, timeout time.Duration) { // It should be OK to list unschedulable Nodes here. By("getting list of nodes") - nodeList, err := c.Core().Nodes().List(v1.ListOptions{}) + nodeList, err := c.Core().Nodes().List(metav1.ListOptions{}) framework.ExpectNoError(err) var errors []error diff --git a/vendor/k8s.io/kubernetes/test/e2e/cluster_logging_es.go b/vendor/k8s.io/kubernetes/test/e2e/cluster_logging_es.go index 9663f2de..11095244 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/cluster_logging_es.go +++ b/vendor/k8s.io/kubernetes/test/e2e/cluster_logging_es.go @@ -26,8 +26,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" - "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/test/e2e/framework" . "github.com/onsi/ginkgo" @@ -55,7 +53,7 @@ var _ = framework.KubeDescribe("Cluster level logging using Elasticsearch [Featu By("Running synthetic logger") createSynthLogger(f, expectedLinesCount) - defer f.PodClient().Delete(synthLoggerPodName, &v1.DeleteOptions{}) + defer f.PodClient().Delete(synthLoggerPodName, &metav1.DeleteOptions{}) err = framework.WaitForPodSuccessInNamespace(f.ClientSet, synthLoggerPodName, f.Namespace.Name) framework.ExpectNoError(err, fmt.Sprintf("Should've successfully waited for pod %s to succeed", synthLoggerPodName)) @@ -89,7 +87,7 @@ var _ = framework.KubeDescribe("Cluster level logging using Elasticsearch [Featu func checkElasticsearchReadiness(f *framework.Framework) error { // Check for the existence of the Elasticsearch service. By("Checking the Elasticsearch service exists.") - s := f.ClientSet.Core().Services(api.NamespaceSystem) + s := f.ClientSet.Core().Services(metav1.NamespaceSystem) // Make a few attempts to connect. This makes the test robust against // being run as the first e2e test just after the e2e cluster has been created. var err error @@ -104,8 +102,8 @@ func checkElasticsearchReadiness(f *framework.Framework) error { // Wait for the Elasticsearch pods to enter the running state. By("Checking to make sure the Elasticsearch pods are running") label := labels.SelectorFromSet(labels.Set(map[string]string{"k8s-app": "elasticsearch-logging"})) - options := v1.ListOptions{LabelSelector: label.String()} - pods, err := f.ClientSet.Core().Pods(api.NamespaceSystem).List(options) + options := metav1.ListOptions{LabelSelector: label.String()} + pods, err := f.ClientSet.Core().Pods(metav1.NamespaceSystem).List(options) Expect(err).NotTo(HaveOccurred()) for _, pod := range pods.Items { err = framework.WaitForPodRunningInNamespace(f.ClientSet, &pod) @@ -128,7 +126,7 @@ func checkElasticsearchReadiness(f *framework.Framework) error { defer cancel() // Query against the root URL for Elasticsearch. - response := proxyRequest.Namespace(api.NamespaceSystem). + response := proxyRequest.Namespace(metav1.NamespaceSystem). Context(ctx). Name("elasticsearch-logging"). Do() @@ -168,7 +166,7 @@ func checkElasticsearchReadiness(f *framework.Framework) error { ctx, cancel := context.WithTimeout(context.Background(), framework.SingleCallTimeout) defer cancel() - body, err = proxyRequest.Namespace(api.NamespaceSystem). + body, err = proxyRequest.Namespace(metav1.NamespaceSystem). Context(ctx). Name("elasticsearch-logging"). Suffix("_cluster/health"). @@ -219,7 +217,7 @@ func getMissingLinesCountElasticsearch(f *framework.Framework, expectedCount int // Ask Elasticsearch to return all the log lines that were tagged with the // pod name. Ask for ten times as many log lines because duplication is possible. - body, err := proxyRequest.Namespace(api.NamespaceSystem). + body, err := proxyRequest.Namespace(metav1.NamespaceSystem). Context(ctx). Name("elasticsearch-logging"). Suffix("_search"). diff --git a/vendor/k8s.io/kubernetes/test/e2e/cluster_logging_gcl.go b/vendor/k8s.io/kubernetes/test/e2e/cluster_logging_gcl.go index fd1c6ccf..71282aeb 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/cluster_logging_gcl.go +++ b/vendor/k8s.io/kubernetes/test/e2e/cluster_logging_gcl.go @@ -23,8 +23,8 @@ import ( "strings" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/json" - "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/test/e2e/framework" . "github.com/onsi/ginkgo" @@ -41,7 +41,7 @@ var _ = framework.KubeDescribe("Cluster level logging using GCL", func() { It("should check that logs from containers are ingested in GCL", func() { By("Running synthetic logger") createSynthLogger(f, expectedLinesCount) - defer f.PodClient().Delete(synthLoggerPodName, &v1.DeleteOptions{}) + defer f.PodClient().Delete(synthLoggerPodName, &metav1.DeleteOptions{}) err := framework.WaitForPodSuccessInNamespace(f.ClientSet, synthLoggerPodName, f.Namespace.Name) framework.ExpectNoError(err, fmt.Sprintf("Should've successfully waited for pod %s to succeed", synthLoggerPodName)) diff --git a/vendor/k8s.io/kubernetes/test/e2e/cluster_logging_utils.go b/vendor/k8s.io/kubernetes/test/e2e/cluster_logging_utils.go index e7744976..62f7899b 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/cluster_logging_utils.go +++ b/vendor/k8s.io/kubernetes/test/e2e/cluster_logging_utils.go @@ -23,7 +23,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" - "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/test/e2e/framework" ) @@ -44,7 +43,7 @@ const ( func createSynthLogger(f *framework.Framework, linesCount int) { f.PodClient().Create(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: synthLoggerPodName, Namespace: f.Namespace.Name, }, @@ -74,13 +73,13 @@ func reportLogsFromFluentdPod(f *framework.Framework) error { } label := labels.SelectorFromSet(labels.Set(map[string]string{"k8s-app": "fluentd-logging"})) - options := v1.ListOptions{LabelSelector: label.String()} - fluentdPods, err := f.ClientSet.Core().Pods(api.NamespaceSystem).List(options) + options := metav1.ListOptions{LabelSelector: label.String()} + fluentdPods, err := f.ClientSet.Core().Pods(metav1.NamespaceSystem).List(options) for _, fluentdPod := range fluentdPods.Items { if fluentdPod.Spec.NodeName == synthLoggerNodeName { containerName := fluentdPod.Spec.Containers[0].Name - logs, err := framework.GetPodLogs(f.ClientSet, api.NamespaceSystem, fluentdPod.Name, containerName) + logs, err := framework.GetPodLogs(f.ClientSet, metav1.NamespaceSystem, fluentdPod.Name, containerName) if err != nil { return fmt.Errorf("Failed to get logs from fluentd pod %s due to %v", fluentdPod.Name, err) } diff --git a/vendor/k8s.io/kubernetes/test/e2e/cluster_size_autoscaling.go b/vendor/k8s.io/kubernetes/test/e2e/cluster_size_autoscaling.go index df7c41e8..55ebca22 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/cluster_size_autoscaling.go +++ b/vendor/k8s.io/kubernetes/test/e2e/cluster_size_autoscaling.go @@ -27,10 +27,10 @@ import ( "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/fields" "k8s.io/kubernetes/test/e2e/framework" testutils "k8s.io/kubernetes/test/utils" @@ -107,7 +107,7 @@ var _ = framework.KubeDescribe("Cluster size autoscaling [Slow]", func() { EventsLoop: for start := time.Now(); time.Since(start) < scaleUpTimeout; time.Sleep(20 * time.Second) { By("Waiting for NotTriggerScaleUp event") - events, err := f.ClientSet.Core().Events(f.Namespace.Name).List(v1.ListOptions{}) + events, err := f.ClientSet.Core().Events(f.Namespace.Name).List(metav1.ListOptions{}) framework.ExpectNoError(err) for _, e := range events.Items { @@ -565,7 +565,7 @@ func ReserveMemory(f *framework.Framework, id string, replicas, megabytes int, e // WaitForClusterSize waits until the cluster size matches the given function. func WaitForClusterSizeFunc(c clientset.Interface, sizeFunc func(int) bool, timeout time.Duration) error { for start := time.Now(); time.Since(start) < timeout; time.Sleep(20 * time.Second) { - nodes, err := c.Core().Nodes().List(v1.ListOptions{FieldSelector: fields.Set{ + nodes, err := c.Core().Nodes().List(metav1.ListOptions{FieldSelector: fields.Set{ "spec.unschedulable": "false", }.AsSelector().String()}) if err != nil { @@ -592,7 +592,7 @@ func WaitForClusterSizeFunc(c clientset.Interface, sizeFunc func(int) bool, time func waitForAllCaPodsReadyInNamespace(f *framework.Framework, c clientset.Interface) error { var notready []string for start := time.Now(); time.Now().Before(start.Add(scaleUpTimeout)); time.Sleep(20 * time.Second) { - pods, err := c.Core().Pods(f.Namespace.Name).List(v1.ListOptions{}) + pods, err := c.Core().Pods(f.Namespace.Name).List(metav1.ListOptions{}) if err != nil { return fmt.Errorf("failed to get pods: %v", err) } diff --git a/vendor/k8s.io/kubernetes/test/e2e/common/configmap.go b/vendor/k8s.io/kubernetes/test/e2e/common/configmap.go index 25dfb701..6ee0cc1c 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/common/configmap.go +++ b/vendor/k8s.io/kubernetes/test/e2e/common/configmap.go @@ -19,8 +19,10 @@ package common import ( "fmt" "os" + "path" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/util/uuid" "k8s.io/kubernetes/test/e2e/framework" @@ -85,7 +87,7 @@ var _ = framework.KubeDescribe("ConfigMap", func() { containerName := "configmap-volume-test" configMap := &v1.ConfigMap{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: f.Namespace.Name, Name: name, }, @@ -101,7 +103,7 @@ var _ = framework.KubeDescribe("ConfigMap", func() { } pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod-configmaps-" + string(uuid.NewUUID()), }, Spec: v1.PodSpec{ @@ -153,6 +155,189 @@ var _ = framework.KubeDescribe("ConfigMap", func() { Eventually(pollLogs, podLogTimeout, framework.Poll).Should(ContainSubstring("value-2")) }) + It("optional updates should be reflected in volume [Conformance] [Volume]", func() { + + // We may have to wait or a full sync period to elapse before the + // Kubelet projects the update into the volume and the container picks + // it up. This timeout is based on the default Kubelet sync period (1 + // minute) plus additional time for fudge factor. + const podLogTimeout = 300 * time.Second + trueVal := true + + volumeMountPath := "/etc/configmap-volumes" + + deleteName := "cm-test-opt-del-" + string(uuid.NewUUID()) + deleteContainerName := "delcm-volume-test" + deleteVolumeName := "deletecm-volume" + deleteConfigMap := &v1.ConfigMap{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: f.Namespace.Name, + Name: deleteName, + }, + Data: map[string]string{ + "data-1": "value-1", + }, + } + + updateName := "cm-test-opt-upd-" + string(uuid.NewUUID()) + updateContainerName := "updcm-volume-test" + updateVolumeName := "updatecm-volume" + updateConfigMap := &v1.ConfigMap{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: f.Namespace.Name, + Name: updateName, + }, + Data: map[string]string{ + "data-1": "value-1", + }, + } + + createName := "cm-test-opt-create-" + string(uuid.NewUUID()) + createContainerName := "createcm-volume-test" + createVolumeName := "createcm-volume" + createConfigMap := &v1.ConfigMap{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: f.Namespace.Name, + Name: createName, + }, + Data: map[string]string{ + "data-1": "value-1", + }, + } + + By(fmt.Sprintf("Creating configMap with name %s", deleteConfigMap.Name)) + var err error + if deleteConfigMap, err = f.ClientSet.Core().ConfigMaps(f.Namespace.Name).Create(deleteConfigMap); err != nil { + framework.Failf("unable to create test configMap %s: %v", deleteConfigMap.Name, err) + } + + By(fmt.Sprintf("Creating configMap with name %s", updateConfigMap.Name)) + if updateConfigMap, err = f.ClientSet.Core().ConfigMaps(f.Namespace.Name).Create(updateConfigMap); err != nil { + framework.Failf("unable to create test configMap %s: %v", updateConfigMap.Name, err) + } + + pod := &v1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "pod-configmaps-" + string(uuid.NewUUID()), + }, + Spec: v1.PodSpec{ + Volumes: []v1.Volume{ + { + Name: deleteVolumeName, + VolumeSource: v1.VolumeSource{ + ConfigMap: &v1.ConfigMapVolumeSource{ + LocalObjectReference: v1.LocalObjectReference{ + Name: deleteName, + }, + Optional: &trueVal, + }, + }, + }, + { + Name: updateVolumeName, + VolumeSource: v1.VolumeSource{ + ConfigMap: &v1.ConfigMapVolumeSource{ + LocalObjectReference: v1.LocalObjectReference{ + Name: updateName, + }, + Optional: &trueVal, + }, + }, + }, + { + Name: createVolumeName, + VolumeSource: v1.VolumeSource{ + ConfigMap: &v1.ConfigMapVolumeSource{ + LocalObjectReference: v1.LocalObjectReference{ + Name: createName, + }, + Optional: &trueVal, + }, + }, + }, + }, + Containers: []v1.Container{ + { + Name: deleteContainerName, + Image: "gcr.io/google_containers/mounttest:0.7", + Command: []string{"/mt", "--break_on_expected_content=false", "--retry_time=120", "--file_content_in_loop=/etc/configmap-volumes/delete/data-1"}, + VolumeMounts: []v1.VolumeMount{ + { + Name: deleteVolumeName, + MountPath: path.Join(volumeMountPath, "delete"), + ReadOnly: true, + }, + }, + }, + { + Name: updateContainerName, + Image: "gcr.io/google_containers/mounttest:0.7", + Command: []string{"/mt", "--break_on_expected_content=false", "--retry_time=120", "--file_content_in_loop=/etc/configmap-volumes/update/data-3"}, + VolumeMounts: []v1.VolumeMount{ + { + Name: updateVolumeName, + MountPath: path.Join(volumeMountPath, "update"), + ReadOnly: true, + }, + }, + }, + { + Name: createContainerName, + Image: "gcr.io/google_containers/mounttest:0.7", + Command: []string{"/mt", "--break_on_expected_content=false", "--retry_time=120", "--file_content_in_loop=/etc/configmap-volumes/create/data-1"}, + VolumeMounts: []v1.VolumeMount{ + { + Name: createVolumeName, + MountPath: path.Join(volumeMountPath, "create"), + ReadOnly: true, + }, + }, + }, + }, + RestartPolicy: v1.RestartPolicyNever, + }, + } + By("Creating the pod") + f.PodClient().CreateSync(pod) + + pollCreateLogs := func() (string, error) { + return framework.GetPodLogs(f.ClientSet, f.Namespace.Name, pod.Name, createContainerName) + } + Eventually(pollCreateLogs, podLogTimeout, framework.Poll).Should(ContainSubstring("Error reading file /etc/configmap-volumes/create/data-1")) + + pollUpdateLogs := func() (string, error) { + return framework.GetPodLogs(f.ClientSet, f.Namespace.Name, pod.Name, updateContainerName) + } + Eventually(pollUpdateLogs, podLogTimeout, framework.Poll).Should(ContainSubstring("Error reading file /etc/configmap-volumes/update/data-3")) + + pollDeleteLogs := func() (string, error) { + return framework.GetPodLogs(f.ClientSet, f.Namespace.Name, pod.Name, deleteContainerName) + } + Eventually(pollDeleteLogs, podLogTimeout, framework.Poll).Should(ContainSubstring("value-1")) + + By(fmt.Sprintf("Deleting configmap %v", deleteConfigMap.Name)) + err = f.ClientSet.Core().ConfigMaps(f.Namespace.Name).Delete(deleteConfigMap.Name, &metav1.DeleteOptions{}) + Expect(err).NotTo(HaveOccurred(), "Failed to delete configmap %q in namespace %q", deleteConfigMap.Name, f.Namespace.Name) + + By(fmt.Sprintf("Updating configmap %v", updateConfigMap.Name)) + updateConfigMap.ResourceVersion = "" // to force update + delete(updateConfigMap.Data, "data-1") + updateConfigMap.Data["data-3"] = "value-3" + _, err = f.ClientSet.Core().ConfigMaps(f.Namespace.Name).Update(updateConfigMap) + Expect(err).NotTo(HaveOccurred(), "Failed to update configmap %q in namespace %q", updateConfigMap.Name, f.Namespace.Name) + + By(fmt.Sprintf("Creating configMap with name %s", createConfigMap.Name)) + if createConfigMap, err = f.ClientSet.Core().ConfigMaps(f.Namespace.Name).Create(createConfigMap); err != nil { + framework.Failf("unable to create test configMap %s: %v", createConfigMap.Name, err) + } + + By("waiting to observe update in volume") + + Eventually(pollCreateLogs, podLogTimeout, framework.Poll).Should(ContainSubstring("value-1")) + Eventually(pollUpdateLogs, podLogTimeout, framework.Poll).Should(ContainSubstring("value-3")) + Eventually(pollDeleteLogs, podLogTimeout, framework.Poll).Should(ContainSubstring("Error reading file /etc/configmap-volumes/delete/data-1")) + }) + It("should be consumable via environment variable [Conformance]", func() { name := "configmap-test-" + string(uuid.NewUUID()) configMap := newConfigMap(f, name) @@ -163,7 +348,7 @@ var _ = framework.KubeDescribe("ConfigMap", func() { } pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod-configmaps-" + string(uuid.NewUUID()), }, Spec: v1.PodSpec{ @@ -206,7 +391,7 @@ var _ = framework.KubeDescribe("ConfigMap", func() { } pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod-configmaps-" + string(uuid.NewUUID()), }, Spec: v1.PodSpec{ @@ -253,7 +438,7 @@ var _ = framework.KubeDescribe("ConfigMap", func() { } pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod-configmaps-" + string(uuid.NewUUID()), }, Spec: v1.PodSpec{ @@ -311,7 +496,7 @@ var _ = framework.KubeDescribe("ConfigMap", func() { func newConfigMap(f *framework.Framework, name string) *v1.ConfigMap { return &v1.ConfigMap{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: f.Namespace.Name, Name: name, }, @@ -325,7 +510,7 @@ func newConfigMap(f *framework.Framework, name string) *v1.ConfigMap { func newEnvFromConfigMap(f *framework.Framework, name string) *v1.ConfigMap { return &v1.ConfigMap{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: f.Namespace.Name, Name: name, }, @@ -352,7 +537,7 @@ func doConfigMapE2EWithoutMappings(f *framework.Framework, uid, fsGroup int64, d } pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod-configmaps-" + string(uuid.NewUUID()), }, Spec: v1.PodSpec{ @@ -426,7 +611,7 @@ func doConfigMapE2EWithMappings(f *framework.Framework, uid, fsGroup int64, item } pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod-configmaps-" + string(uuid.NewUUID()), }, Spec: v1.PodSpec{ diff --git a/vendor/k8s.io/kubernetes/test/e2e/common/container_probe.go b/vendor/k8s.io/kubernetes/test/e2e/common/container_probe.go index 5655ad94..d94fe00a 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/common/container_probe.go +++ b/vendor/k8s.io/kubernetes/test/e2e/common/container_probe.go @@ -96,7 +96,7 @@ var _ = framework.KubeDescribe("Probing container", func() { It("should be restarted with a exec \"cat /tmp/health\" liveness probe [Conformance]", func() { runLivenessTest(f, &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "liveness-exec", Labels: map[string]string{"test": "liveness"}, }, @@ -123,7 +123,7 @@ var _ = framework.KubeDescribe("Probing container", func() { It("should *not* be restarted with a exec \"cat /tmp/health\" liveness probe [Conformance]", func() { runLivenessTest(f, &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "liveness-exec", Labels: map[string]string{"test": "liveness"}, }, @@ -150,7 +150,7 @@ var _ = framework.KubeDescribe("Probing container", func() { It("should be restarted with a /healthz http liveness probe [Conformance]", func() { runLivenessTest(f, &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "liveness-http", Labels: map[string]string{"test": "liveness"}, }, @@ -179,7 +179,7 @@ var _ = framework.KubeDescribe("Probing container", func() { // Slow by design (5 min) It("should have monotonically increasing restart count [Conformance] [Slow]", func() { runLivenessTest(f, &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "liveness-http", Labels: map[string]string{"test": "liveness"}, }, @@ -207,7 +207,7 @@ var _ = framework.KubeDescribe("Probing container", func() { It("should *not* be restarted with a /healthz http liveness probe [Conformance]", func() { runLivenessTest(f, &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "liveness-http", Labels: map[string]string{"test": "liveness"}, }, @@ -238,7 +238,7 @@ var _ = framework.KubeDescribe("Probing container", func() { // TODO: enable this test once the default exec handler supports timeout. Skip("The default exec handler, dockertools.NativeExecHandler, does not support timeouts due to a limitation in the Docker Remote API") runLivenessTest(f, &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "liveness-exec", Labels: map[string]string{"test": "liveness"}, }, @@ -297,7 +297,7 @@ func getRestartCount(p *v1.Pod) int { func makePodSpec(readinessProbe, livenessProbe *v1.Probe) *v1.Pod { pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{Name: "test-webserver-" + string(uuid.NewUUID())}, + ObjectMeta: metav1.ObjectMeta{Name: "test-webserver-" + string(uuid.NewUUID())}, Spec: v1.PodSpec{ Containers: []v1.Container{ { @@ -353,7 +353,7 @@ func runLivenessTest(f *framework.Framework, pod *v1.Pod, expectNumRestarts int, // At the end of the test, clean up by removing the pod. defer func() { By("deleting the pod") - podClient.Delete(pod.Name, v1.NewDeleteOptions(0)) + podClient.Delete(pod.Name, metav1.NewDeleteOptions(0)) }() By(fmt.Sprintf("Creating pod %s in namespace %s", pod.Name, ns)) podClient.Create(pod) diff --git a/vendor/k8s.io/kubernetes/test/e2e/common/docker_containers.go b/vendor/k8s.io/kubernetes/test/e2e/common/docker_containers.go index 896178f7..5affc39d 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/common/docker_containers.go +++ b/vendor/k8s.io/kubernetes/test/e2e/common/docker_containers.go @@ -17,6 +17,7 @@ limitations under the License. package common import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/util/uuid" "k8s.io/kubernetes/test/e2e/framework" @@ -71,7 +72,7 @@ func entrypointTestPod() *v1.Pod { podName := "client-containers-" + string(uuid.NewUUID()) return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, }, Spec: v1.PodSpec{ diff --git a/vendor/k8s.io/kubernetes/test/e2e/common/downward_api.go b/vendor/k8s.io/kubernetes/test/e2e/common/downward_api.go index f8ee9cb1..05ed9369 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/common/downward_api.go +++ b/vendor/k8s.io/kubernetes/test/e2e/common/downward_api.go @@ -19,6 +19,7 @@ package common import ( "fmt" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/util/uuid" @@ -153,7 +154,7 @@ var _ = framework.KubeDescribe("Downward API", func() { fmt.Sprintf("MEMORY_LIMIT=[1-9]"), } pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, Labels: map[string]string{"name": podName}, }, @@ -176,7 +177,7 @@ var _ = framework.KubeDescribe("Downward API", func() { func testDownwardAPI(f *framework.Framework, podName string, env []v1.EnvVar, expectations []string) { pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, Labels: map[string]string{"name": podName}, }, diff --git a/vendor/k8s.io/kubernetes/test/e2e/common/downwardapi_volume.go b/vendor/k8s.io/kubernetes/test/e2e/common/downwardapi_volume.go index 34210779..5747df56 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/common/downwardapi_volume.go +++ b/vendor/k8s.io/kubernetes/test/e2e/common/downwardapi_volume.go @@ -333,7 +333,7 @@ func downwardAPIVolumePodForUpdateTest(name string, labels, annotations map[stri func downwardAPIVolumeBasePod(name string, labels, annotations map[string]string) *v1.Pod { pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Labels: labels, Annotations: annotations, diff --git a/vendor/k8s.io/kubernetes/test/e2e/common/empty_dir.go b/vendor/k8s.io/kubernetes/test/e2e/common/empty_dir.go index 9034736e..6ef352fc 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/common/empty_dir.go +++ b/vendor/k8s.io/kubernetes/test/e2e/common/empty_dir.go @@ -317,7 +317,7 @@ func testPodWithVolume(image, path string, source *v1.EmptyDirVolumeSource) *v1. Kind: "Pod", APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String(), }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, }, Spec: v1.PodSpec{ diff --git a/vendor/k8s.io/kubernetes/test/e2e/common/expansion.go b/vendor/k8s.io/kubernetes/test/e2e/common/expansion.go index 27154792..17a181c4 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/common/expansion.go +++ b/vendor/k8s.io/kubernetes/test/e2e/common/expansion.go @@ -17,6 +17,7 @@ limitations under the License. package common import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/util/uuid" "k8s.io/kubernetes/test/e2e/framework" @@ -32,7 +33,7 @@ var _ = framework.KubeDescribe("Variable Expansion", func() { It("should allow composing env vars into new env vars [Conformance]", func() { podName := "var-expansion-" + string(uuid.NewUUID()) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, Labels: map[string]string{"name": podName}, }, @@ -72,7 +73,7 @@ var _ = framework.KubeDescribe("Variable Expansion", func() { It("should allow substituting values in a container's command [Conformance]", func() { podName := "var-expansion-" + string(uuid.NewUUID()) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, Labels: map[string]string{"name": podName}, }, @@ -102,7 +103,7 @@ var _ = framework.KubeDescribe("Variable Expansion", func() { It("should allow substituting values in a container's args [Conformance]", func() { podName := "var-expansion-" + string(uuid.NewUUID()) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, Labels: map[string]string{"name": podName}, }, diff --git a/vendor/k8s.io/kubernetes/test/e2e/common/host_path.go b/vendor/k8s.io/kubernetes/test/e2e/common/host_path.go index 02d8e781..24b93c19 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/common/host_path.go +++ b/vendor/k8s.io/kubernetes/test/e2e/common/host_path.go @@ -139,7 +139,7 @@ func testPodWithHostVol(path string, source *v1.HostPathVolumeSource) *v1.Pod { Kind: "Pod", APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String(), }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, }, Spec: v1.PodSpec{ diff --git a/vendor/k8s.io/kubernetes/test/e2e/common/init_container.go b/vendor/k8s.io/kubernetes/test/e2e/common/init_container.go index f4b8fd4d..f6072f66 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/common/init_container.go +++ b/vendor/k8s.io/kubernetes/test/e2e/common/init_container.go @@ -21,6 +21,7 @@ import ( "strconv" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/watch" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" @@ -47,7 +48,7 @@ var _ = framework.KubeDescribe("InitContainer", func() { name := "pod-init-" + string(uuid.NewUUID()) value := strconv.Itoa(time.Now().Nanosecond()) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Labels: map[string]string{ "name": "foo", @@ -81,7 +82,7 @@ var _ = framework.KubeDescribe("InitContainer", func() { Expect(err).To(BeNil()) } startedPod := podClient.Create(pod) - w, err := podClient.Watch(v1.SingleObject(startedPod.ObjectMeta)) + w, err := podClient.Watch(metav1.SingleObject(startedPod.ObjectMeta)) Expect(err).NotTo(HaveOccurred(), "error watching a pod") wr := watch.NewRecorder(w) event, err := watch.Until(framework.PodStartTimeout, wr, conditions.PodCompleted) @@ -112,7 +113,7 @@ var _ = framework.KubeDescribe("InitContainer", func() { name := "pod-init-" + string(uuid.NewUUID()) value := strconv.Itoa(time.Now().Nanosecond()) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Labels: map[string]string{ "name": "foo", @@ -150,7 +151,7 @@ var _ = framework.KubeDescribe("InitContainer", func() { Expect(err).To(BeNil()) } startedPod := podClient.Create(pod) - w, err := podClient.Watch(v1.SingleObject(startedPod.ObjectMeta)) + w, err := podClient.Watch(metav1.SingleObject(startedPod.ObjectMeta)) Expect(err).NotTo(HaveOccurred(), "error watching a pod") wr := watch.NewRecorder(w) event, err := watch.Until(framework.PodStartTimeout, wr, conditions.PodRunning) @@ -182,7 +183,7 @@ var _ = framework.KubeDescribe("InitContainer", func() { value := strconv.Itoa(time.Now().Nanosecond()) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Labels: map[string]string{ "name": "foo", @@ -220,7 +221,7 @@ var _ = framework.KubeDescribe("InitContainer", func() { Expect(err).To(BeNil()) } startedPod := podClient.Create(pod) - w, err := podClient.Watch(v1.SingleObject(startedPod.ObjectMeta)) + w, err := podClient.Watch(metav1.SingleObject(startedPod.ObjectMeta)) Expect(err).NotTo(HaveOccurred(), "error watching a pod") wr := watch.NewRecorder(w) @@ -303,7 +304,7 @@ var _ = framework.KubeDescribe("InitContainer", func() { name := "pod-init-" + string(uuid.NewUUID()) value := strconv.Itoa(time.Now().Nanosecond()) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Labels: map[string]string{ "name": "foo", @@ -344,7 +345,7 @@ var _ = framework.KubeDescribe("InitContainer", func() { } startedPod := podClient.Create(pod) - w, err := podClient.Watch(v1.SingleObject(startedPod.ObjectMeta)) + w, err := podClient.Watch(metav1.SingleObject(startedPod.ObjectMeta)) Expect(err).NotTo(HaveOccurred(), "error watching a pod") wr := watch.NewRecorder(w) diff --git a/vendor/k8s.io/kubernetes/test/e2e/common/kubelet_etc_hosts.go b/vendor/k8s.io/kubernetes/test/e2e/common/kubelet_etc_hosts.go index ae0bb806..c4de1b0f 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/common/kubelet_etc_hosts.go +++ b/vendor/k8s.io/kubernetes/test/e2e/common/kubelet_etc_hosts.go @@ -22,6 +22,7 @@ import ( "github.com/golang/glog" . "github.com/onsi/ginkgo" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/test/e2e/framework" ) @@ -130,7 +131,7 @@ func (config *KubeletManagedHostConfig) getEtcHostsContent(podName, containerNam func (config *KubeletManagedHostConfig) createPodSpec(podName string) *v1.Pod { pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, }, Spec: v1.PodSpec{ @@ -186,7 +187,7 @@ func (config *KubeletManagedHostConfig) createPodSpec(podName string) *v1.Pod { func (config *KubeletManagedHostConfig) createPodSpecWithHostNetwork(podName string) *v1.Pod { pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, }, Spec: v1.PodSpec{ diff --git a/vendor/k8s.io/kubernetes/test/e2e/common/pods.go b/vendor/k8s.io/kubernetes/test/e2e/common/pods.go index df83e0b5..2dcec7a8 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/common/pods.go +++ b/vendor/k8s.io/kubernetes/test/e2e/common/pods.go @@ -129,7 +129,7 @@ var _ = framework.KubeDescribe("Pods", func() { It("should get a host IP [Conformance]", func() { name := "pod-hostip-" + string(uuid.NewUUID()) testHostIP(podClient, &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Spec: v1.PodSpec{ @@ -148,7 +148,7 @@ var _ = framework.KubeDescribe("Pods", func() { name := "pod-submit-remove-" + string(uuid.NewUUID()) value := strconv.Itoa(time.Now().Nanosecond()) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Labels: map[string]string{ "name": "foo", @@ -167,11 +167,11 @@ var _ = framework.KubeDescribe("Pods", func() { By("setting up watch") selector := labels.SelectorFromSet(labels.Set(map[string]string{"time": value})) - options := v1.ListOptions{LabelSelector: selector.String()} + options := metav1.ListOptions{LabelSelector: selector.String()} pods, err := podClient.List(options) Expect(err).NotTo(HaveOccurred(), "failed to query for pods") Expect(len(pods.Items)).To(Equal(0)) - options = v1.ListOptions{ + options = metav1.ListOptions{ LabelSelector: selector.String(), ResourceVersion: pods.ListMeta.ResourceVersion, } @@ -183,7 +183,7 @@ var _ = framework.KubeDescribe("Pods", func() { By("verifying the pod is in kubernetes") selector = labels.SelectorFromSet(labels.Set(map[string]string{"time": value})) - options = v1.ListOptions{LabelSelector: selector.String()} + options = metav1.ListOptions{LabelSelector: selector.String()} pods, err = podClient.List(options) Expect(err).NotTo(HaveOccurred(), "failed to query for pods") Expect(len(pods.Items)).To(Equal(1)) @@ -207,7 +207,7 @@ var _ = framework.KubeDescribe("Pods", func() { framework.Logf("running pod: %#v", pod) By("deleting the pod gracefully") - err = podClient.Delete(pod.Name, v1.NewDeleteOptions(30)) + err = podClient.Delete(pod.Name, metav1.NewDeleteOptions(30)) Expect(err).NotTo(HaveOccurred(), "failed to delete pod") By("verifying the kubelet observed the termination notice") @@ -255,7 +255,7 @@ var _ = framework.KubeDescribe("Pods", func() { Expect(lastPod.Spec.TerminationGracePeriodSeconds).ToNot(BeZero()) selector = labels.SelectorFromSet(labels.Set(map[string]string{"time": value})) - options = v1.ListOptions{LabelSelector: selector.String()} + options = metav1.ListOptions{LabelSelector: selector.String()} pods, err = podClient.List(options) Expect(err).NotTo(HaveOccurred(), "failed to query for pods") Expect(len(pods.Items)).To(Equal(0)) @@ -266,7 +266,7 @@ var _ = framework.KubeDescribe("Pods", func() { name := "pod-update-" + string(uuid.NewUUID()) value := strconv.Itoa(time.Now().Nanosecond()) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Labels: map[string]string{ "name": "foo", @@ -288,7 +288,7 @@ var _ = framework.KubeDescribe("Pods", func() { By("verifying the pod is in kubernetes") selector := labels.SelectorFromSet(labels.Set(map[string]string{"time": value})) - options := v1.ListOptions{LabelSelector: selector.String()} + options := metav1.ListOptions{LabelSelector: selector.String()} pods, err := podClient.List(options) Expect(err).NotTo(HaveOccurred(), "failed to query for pods") Expect(len(pods.Items)).To(Equal(1)) @@ -303,7 +303,7 @@ var _ = framework.KubeDescribe("Pods", func() { By("verifying the updated pod is in kubernetes") selector = labels.SelectorFromSet(labels.Set(map[string]string{"time": value})) - options = v1.ListOptions{LabelSelector: selector.String()} + options = metav1.ListOptions{LabelSelector: selector.String()} pods, err = podClient.List(options) Expect(err).NotTo(HaveOccurred(), "failed to query for pods") Expect(len(pods.Items)).To(Equal(1)) @@ -315,7 +315,7 @@ var _ = framework.KubeDescribe("Pods", func() { name := "pod-update-activedeadlineseconds-" + string(uuid.NewUUID()) value := strconv.Itoa(time.Now().Nanosecond()) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Labels: map[string]string{ "name": "foo", @@ -337,7 +337,7 @@ var _ = framework.KubeDescribe("Pods", func() { By("verifying the pod is in kubernetes") selector := labels.SelectorFromSet(labels.Set(map[string]string{"time": value})) - options := v1.ListOptions{LabelSelector: selector.String()} + options := metav1.ListOptions{LabelSelector: selector.String()} pods, err := podClient.List(options) Expect(err).NotTo(HaveOccurred(), "failed to query for pods") Expect(len(pods.Items)).To(Equal(1)) @@ -356,7 +356,7 @@ var _ = framework.KubeDescribe("Pods", func() { // This pod serves its hostname via HTTP. serverName := "server-envvars-" + string(uuid.NewUUID()) serverPod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: serverName, Labels: map[string]string{"name": serverName}, }, @@ -381,7 +381,7 @@ var _ = framework.KubeDescribe("Pods", func() { // allow overriding the prefix in the service manifest. svcName := "fooservice" svc := &v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: svcName, Labels: map[string]string{ "name": svcName, @@ -404,7 +404,7 @@ var _ = framework.KubeDescribe("Pods", func() { podName := "client-envvars-" + string(uuid.NewUUID()) const containerName = "env3cont" pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, Labels: map[string]string{"name": podName}, }, @@ -444,7 +444,7 @@ var _ = framework.KubeDescribe("Pods", func() { By("creating the pod") name := "pod-exec-websocket-" + string(uuid.NewUUID()) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Spec: v1.PodSpec{ @@ -514,7 +514,7 @@ var _ = framework.KubeDescribe("Pods", func() { By("creating the pod") name := "pod-logs-websocket-" + string(uuid.NewUUID()) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Spec: v1.PodSpec{ @@ -568,7 +568,7 @@ var _ = framework.KubeDescribe("Pods", func() { podName := "pod-back-off-image" containerName := "back-off" pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, Labels: map[string]string{"test": "back-off-image"}, }, @@ -609,7 +609,7 @@ var _ = framework.KubeDescribe("Pods", func() { podName := "back-off-cap" containerName := "back-off-cap" pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, Labels: map[string]string{"test": "liveness"}, }, diff --git a/vendor/k8s.io/kubernetes/test/e2e/common/privileged.go b/vendor/k8s.io/kubernetes/test/e2e/common/privileged.go index 7697b18a..900ad676 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/common/privileged.go +++ b/vendor/k8s.io/kubernetes/test/e2e/common/privileged.go @@ -21,6 +21,7 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/test/e2e/framework" ) @@ -83,7 +84,7 @@ func (c *PrivilegedPodTestConfig) createPodsSpec() *v1.Pod { const image = "gcr.io/google_containers/busybox:1.24" return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: c.privilegedPod, Namespace: c.f.Namespace.Name, }, diff --git a/vendor/k8s.io/kubernetes/test/e2e/common/secrets.go b/vendor/k8s.io/kubernetes/test/e2e/common/secrets.go index e3e16b14..bfccce88 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/common/secrets.go +++ b/vendor/k8s.io/kubernetes/test/e2e/common/secrets.go @@ -19,12 +19,16 @@ package common import ( "fmt" "os" + "path" + "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/util/uuid" "k8s.io/kubernetes/test/e2e/framework" . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" ) var _ = framework.KubeDescribe("Secrets", func() { @@ -96,7 +100,7 @@ var _ = framework.KubeDescribe("Secrets", func() { } pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod-secrets-" + string(uuid.NewUUID()), }, Spec: v1.PodSpec{ @@ -149,6 +153,183 @@ var _ = framework.KubeDescribe("Secrets", func() { }) }) + It("optional updates should be reflected in volume [Conformance] [Volume]", func() { + + // We may have to wait or a full sync period to elapse before the + // Kubelet projects the update into the volume and the container picks + // it up. This timeout is based on the default Kubelet sync period (1 + // minute) plus additional time for fudge factor. + const podLogTimeout = 300 * time.Second + trueVal := true + + volumeMountPath := "/etc/secret-volumes" + + deleteName := "s-test-opt-del-" + string(uuid.NewUUID()) + deleteContainerName := "dels-volume-test" + deleteVolumeName := "deletes-volume" + deleteSecret := &v1.Secret{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: f.Namespace.Name, + Name: deleteName, + }, + Data: map[string][]byte{ + "data-1": []byte("value-1"), + }, + } + + updateName := "s-test-opt-upd-" + string(uuid.NewUUID()) + updateContainerName := "upds-volume-test" + updateVolumeName := "updates-volume" + updateSecret := &v1.Secret{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: f.Namespace.Name, + Name: updateName, + }, + Data: map[string][]byte{ + "data-1": []byte("value-1"), + }, + } + + createName := "s-test-opt-create-" + string(uuid.NewUUID()) + createContainerName := "creates-volume-test" + createVolumeName := "creates-volume" + createSecret := &v1.Secret{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: f.Namespace.Name, + Name: createName, + }, + Data: map[string][]byte{ + "data-1": []byte("value-1"), + }, + } + + By(fmt.Sprintf("Creating secret with name %s", deleteSecret.Name)) + var err error + if deleteSecret, err = f.ClientSet.Core().Secrets(f.Namespace.Name).Create(deleteSecret); err != nil { + framework.Failf("unable to create test secret %s: %v", deleteSecret.Name, err) + } + + By(fmt.Sprintf("Creating secret with name %s", updateSecret.Name)) + if updateSecret, err = f.ClientSet.Core().Secrets(f.Namespace.Name).Create(updateSecret); err != nil { + framework.Failf("unable to create test secret %s: %v", updateSecret.Name, err) + } + + pod := &v1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "pod-secrets-" + string(uuid.NewUUID()), + }, + Spec: v1.PodSpec{ + Volumes: []v1.Volume{ + { + Name: deleteVolumeName, + VolumeSource: v1.VolumeSource{ + Secret: &v1.SecretVolumeSource{ + SecretName: deleteName, + Optional: &trueVal, + }, + }, + }, + { + Name: updateVolumeName, + VolumeSource: v1.VolumeSource{ + Secret: &v1.SecretVolumeSource{ + SecretName: updateName, + Optional: &trueVal, + }, + }, + }, + { + Name: createVolumeName, + VolumeSource: v1.VolumeSource{ + Secret: &v1.SecretVolumeSource{ + SecretName: createName, + Optional: &trueVal, + }, + }, + }, + }, + Containers: []v1.Container{ + { + Name: deleteContainerName, + Image: "gcr.io/google_containers/mounttest:0.7", + Command: []string{"/mt", "--break_on_expected_content=false", "--retry_time=120", "--file_content_in_loop=/etc/secret-volumes/delete/data-1"}, + VolumeMounts: []v1.VolumeMount{ + { + Name: deleteVolumeName, + MountPath: path.Join(volumeMountPath, "delete"), + ReadOnly: true, + }, + }, + }, + { + Name: updateContainerName, + Image: "gcr.io/google_containers/mounttest:0.7", + Command: []string{"/mt", "--break_on_expected_content=false", "--retry_time=120", "--file_content_in_loop=/etc/secret-volumes/update/data-3"}, + VolumeMounts: []v1.VolumeMount{ + { + Name: updateVolumeName, + MountPath: path.Join(volumeMountPath, "update"), + ReadOnly: true, + }, + }, + }, + { + Name: createContainerName, + Image: "gcr.io/google_containers/mounttest:0.7", + Command: []string{"/mt", "--break_on_expected_content=false", "--retry_time=120", "--file_content_in_loop=/etc/secret-volumes/create/data-1"}, + VolumeMounts: []v1.VolumeMount{ + { + Name: createVolumeName, + MountPath: path.Join(volumeMountPath, "create"), + ReadOnly: true, + }, + }, + }, + }, + RestartPolicy: v1.RestartPolicyNever, + }, + } + By("Creating the pod") + f.PodClient().CreateSync(pod) + + pollCreateLogs := func() (string, error) { + return framework.GetPodLogs(f.ClientSet, f.Namespace.Name, pod.Name, createContainerName) + } + Eventually(pollCreateLogs, podLogTimeout, framework.Poll).Should(ContainSubstring("Error reading file /etc/secret-volumes/create/data-1")) + + pollUpdateLogs := func() (string, error) { + return framework.GetPodLogs(f.ClientSet, f.Namespace.Name, pod.Name, updateContainerName) + } + Eventually(pollUpdateLogs, podLogTimeout, framework.Poll).Should(ContainSubstring("Error reading file /etc/secret-volumes/update/data-3")) + + pollDeleteLogs := func() (string, error) { + return framework.GetPodLogs(f.ClientSet, f.Namespace.Name, pod.Name, deleteContainerName) + } + Eventually(pollDeleteLogs, podLogTimeout, framework.Poll).Should(ContainSubstring("value-1")) + + By(fmt.Sprintf("Deleting secret %v", deleteSecret.Name)) + err = f.ClientSet.Core().Secrets(f.Namespace.Name).Delete(deleteSecret.Name, &metav1.DeleteOptions{}) + Expect(err).NotTo(HaveOccurred(), "Failed to delete secret %q in namespace %q", deleteSecret.Name, f.Namespace.Name) + + By(fmt.Sprintf("Updating secret %v", updateSecret.Name)) + updateSecret.ResourceVersion = "" // to force update + delete(updateSecret.Data, "data-1") + updateSecret.Data["data-3"] = []byte("value-3") + _, err = f.ClientSet.Core().Secrets(f.Namespace.Name).Update(updateSecret) + Expect(err).NotTo(HaveOccurred(), "Failed to update secret %q in namespace %q", updateSecret.Name, f.Namespace.Name) + + By(fmt.Sprintf("Creating secret with name %s", createSecret.Name)) + if createSecret, err = f.ClientSet.Core().Secrets(f.Namespace.Name).Create(createSecret); err != nil { + framework.Failf("unable to create test secret %s: %v", createSecret.Name, err) + } + + By("waiting to observe update in volume") + + Eventually(pollCreateLogs, podLogTimeout, framework.Poll).Should(ContainSubstring("value-1")) + Eventually(pollUpdateLogs, podLogTimeout, framework.Poll).Should(ContainSubstring("value-3")) + Eventually(pollDeleteLogs, podLogTimeout, framework.Poll).Should(ContainSubstring("Error reading file /etc/secret-volumes/delete/data-1")) + }) + It("should be consumable from pods in env vars [Conformance]", func() { name := "secret-test-" + string(uuid.NewUUID()) secret := secretForTest(f.Namespace.Name, name) @@ -160,7 +341,7 @@ var _ = framework.KubeDescribe("Secrets", func() { } pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod-secrets-" + string(uuid.NewUUID()), }, Spec: v1.PodSpec{ @@ -192,11 +373,65 @@ var _ = framework.KubeDescribe("Secrets", func() { "SECRET_DATA=value-1", }) }) + + It("should be consumable via the environment [Conformance]", func() { + name := "secret-test-" + string(uuid.NewUUID()) + secret := newEnvFromSecret(f.Namespace.Name, name) + By(fmt.Sprintf("creating secret %v/%v", f.Namespace.Name, secret.Name)) + var err error + if secret, err = f.ClientSet.Core().Secrets(f.Namespace.Name).Create(secret); err != nil { + framework.Failf("unable to create test secret %s: %v", secret.Name, err) + } + + pod := &v1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "pod-configmaps-" + string(uuid.NewUUID()), + }, + Spec: v1.PodSpec{ + Containers: []v1.Container{ + { + Name: "env-test", + Image: "gcr.io/google_containers/busybox:1.24", + Command: []string{"sh", "-c", "env"}, + EnvFrom: []v1.EnvFromSource{ + { + SecretRef: &v1.SecretEnvSource{LocalObjectReference: v1.LocalObjectReference{Name: name}}, + }, + { + Prefix: "p_", + SecretRef: &v1.SecretEnvSource{LocalObjectReference: v1.LocalObjectReference{Name: name}}, + }, + }, + }, + }, + RestartPolicy: v1.RestartPolicyNever, + }, + } + + f.TestContainerOutput("consume secrets", pod, 0, []string{ + "data_1=value-1", "data_2=value-2", "data_3=value-3", + "p_data_1=value-1", "p_data_2=value-2", "p_data_3=value-3", + }) + }) }) +func newEnvFromSecret(namespace, name string) *v1.Secret { + return &v1.Secret{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: namespace, + Name: name, + }, + Data: map[string][]byte{ + "data_1": []byte("value-1\n"), + "data_2": []byte("value-2\n"), + "data_3": []byte("value-3\n"), + }, + } +} + func secretForTest(namespace, name string) *v1.Secret { return &v1.Secret{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: namespace, Name: name, }, @@ -222,7 +457,7 @@ func doSecretE2EWithoutMapping(f *framework.Framework, defaultMode *int32, secre } pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod-secrets-" + string(uuid.NewUUID()), Namespace: f.Namespace.Name, }, @@ -294,7 +529,7 @@ func doSecretE2EWithMapping(f *framework.Framework, mode *int32) { } pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod-secrets-" + string(uuid.NewUUID()), }, Spec: v1.PodSpec{ diff --git a/vendor/k8s.io/kubernetes/test/e2e/common/sysctl.go b/vendor/k8s.io/kubernetes/test/e2e/common/sysctl.go index 4216ef91..0bab46da 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/common/sysctl.go +++ b/vendor/k8s.io/kubernetes/test/e2e/common/sysctl.go @@ -38,7 +38,7 @@ var _ = framework.KubeDescribe("Sysctls", func() { testPod := func() *v1.Pod { podName := "sysctl-" + string(uuid.NewUUID()) pod := v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, Annotations: map[string]string{}, }, diff --git a/vendor/k8s.io/kubernetes/test/e2e/common/util.go b/vendor/k8s.io/kubernetes/test/e2e/common/util.go index 9db11885..e687067c 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/common/util.go +++ b/vendor/k8s.io/kubernetes/test/e2e/common/util.go @@ -23,8 +23,9 @@ import ( type Suite string const ( - E2E Suite = "e2e" - NodeE2E Suite = "node e2e" + E2E Suite = "e2e" + NodeE2E Suite = "node e2e" + FederationE2E Suite = "federation e2e" ) var CurrentSuite Suite diff --git a/vendor/k8s.io/kubernetes/test/e2e/common/volumes.go b/vendor/k8s.io/kubernetes/test/e2e/common/volumes.go index 18104e96..8daad193 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/common/volumes.go +++ b/vendor/k8s.io/kubernetes/test/e2e/common/volumes.go @@ -122,7 +122,7 @@ func startVolumeServer(f *framework.Framework, config VolumeTestConfig) *v1.Pod Kind: "Pod", APIVersion: "v1", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: config.prefix + "-server", Labels: map[string]string{ "role": config.prefix + "-server", @@ -198,7 +198,7 @@ func testVolumeClient(f *framework.Framework, config VolumeTestConfig, volume v1 Kind: "Pod", APIVersion: "v1", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: config.prefix + "-client", Labels: map[string]string{ "role": config.prefix + "-client", @@ -274,7 +274,7 @@ func injectHtml(client clientset.Interface, config VolumeTestConfig, volume v1.V Kind: "Pod", APIVersion: "v1", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: config.prefix + "-injector", Labels: map[string]string{ "role": config.prefix + "-injector", @@ -421,7 +421,7 @@ var _ = framework.KubeDescribe("GCP Volumes", func() { Kind: "Endpoints", APIVersion: "v1", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: config.prefix + "-server", }, Subsets: []v1.EndpointSubset{ diff --git a/vendor/k8s.io/kubernetes/test/e2e/cronjob.go b/vendor/k8s.io/kubernetes/test/e2e/cronjob.go index 7ed4ca0d..4b649d8d 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/cronjob.go +++ b/vendor/k8s.io/kubernetes/test/e2e/cronjob.go @@ -27,7 +27,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" batchinternal "k8s.io/kubernetes/pkg/apis/batch" batchv1 "k8s.io/kubernetes/pkg/apis/batch/v1" @@ -68,7 +67,7 @@ var _ = framework.KubeDescribe("CronJob", func() { Expect(err).NotTo(HaveOccurred()) By("Ensuring at least two running jobs exists by listing jobs explicitly") - jobs, err := f.ClientSet.Batch().Jobs(f.Namespace.Name).List(v1.ListOptions{}) + jobs, err := f.ClientSet.Batch().Jobs(f.Namespace.Name).List(metav1.ListOptions{}) Expect(err).NotTo(HaveOccurred()) activeJobs := filterActiveJobs(jobs) Expect(len(activeJobs) >= 2).To(BeTrue()) @@ -91,7 +90,7 @@ var _ = framework.KubeDescribe("CronJob", func() { Expect(err).To(HaveOccurred()) By("Ensuring no job exists by listing jobs explicitly") - jobs, err := f.ClientSet.Batch().Jobs(f.Namespace.Name).List(v1.ListOptions{}) + jobs, err := f.ClientSet.Batch().Jobs(f.Namespace.Name).List(metav1.ListOptions{}) Expect(err).NotTo(HaveOccurred()) Expect(jobs.Items).To(HaveLen(0)) @@ -117,7 +116,7 @@ var _ = framework.KubeDescribe("CronJob", func() { Expect(cronJob.Status.Active).Should(HaveLen(1)) By("Ensuring exaclty one running job exists by listing jobs explicitly") - jobs, err := f.ClientSet.Batch().Jobs(f.Namespace.Name).List(v1.ListOptions{}) + jobs, err := f.ClientSet.Batch().Jobs(f.Namespace.Name).List(metav1.ListOptions{}) Expect(err).NotTo(HaveOccurred()) activeJobs := filterActiveJobs(jobs) Expect(activeJobs).To(HaveLen(1)) @@ -148,7 +147,7 @@ var _ = framework.KubeDescribe("CronJob", func() { Expect(cronJob.Status.Active).Should(HaveLen(1)) By("Ensuring exaclty one running job exists by listing jobs explicitly") - jobs, err := f.ClientSet.Batch().Jobs(f.Namespace.Name).List(v1.ListOptions{}) + jobs, err := f.ClientSet.Batch().Jobs(f.Namespace.Name).List(metav1.ListOptions{}) Expect(err).NotTo(HaveOccurred()) activeJobs := filterActiveJobs(jobs) Expect(activeJobs).To(HaveLen(1)) @@ -205,7 +204,7 @@ var _ = framework.KubeDescribe("CronJob", func() { reaper, err := kubectl.ReaperFor(batchinternal.Kind("Job"), f.InternalClientset) Expect(err).NotTo(HaveOccurred()) timeout := 1 * time.Minute - err = reaper.Stop(f.Namespace.Name, job.Name, timeout, api.NewDeleteOptions(0)) + err = reaper.Stop(f.Namespace.Name, job.Name, timeout, metav1.NewDeleteOptions(0)) Expect(err).NotTo(HaveOccurred()) By("Ensuring job was deleted") @@ -232,7 +231,7 @@ func newTestCronJob(name, schedule string, concurrencyPolicy batch.ConcurrencyPo parallelism := int32(1) completions := int32(1) sj := &batch.CronJob{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Spec: batch.CronJobSpec{ @@ -322,7 +321,7 @@ func waitForNoJobs(c clientset.Interface, ns, jobName string, failIfNonEmpty boo // Wait for a job to be replaced with a new one. func waitForJobReplaced(c clientset.Interface, ns, previousJobName string) error { return wait.Poll(framework.Poll, cronJobTimeout, func() (bool, error) { - jobs, err := c.Batch().Jobs(ns).List(v1.ListOptions{}) + jobs, err := c.Batch().Jobs(ns).List(metav1.ListOptions{}) if err != nil { return false, err } @@ -339,7 +338,7 @@ func waitForJobReplaced(c clientset.Interface, ns, previousJobName string) error // waitForJobsAtLeast waits for at least a number of jobs to appear. func waitForJobsAtLeast(c clientset.Interface, ns string, atLeast int) error { return wait.Poll(framework.Poll, cronJobTimeout, func() (bool, error) { - jobs, err := c.Batch().Jobs(ns).List(v1.ListOptions{}) + jobs, err := c.Batch().Jobs(ns).List(metav1.ListOptions{}) if err != nil { return false, err } @@ -350,7 +349,7 @@ func waitForJobsAtLeast(c clientset.Interface, ns string, atLeast int) error { // waitForAnyFinishedJob waits for any completed job to appear. func waitForAnyFinishedJob(c clientset.Interface, ns string) error { return wait.Poll(framework.Poll, cronJobTimeout, func() (bool, error) { - jobs, err := c.Batch().Jobs(ns).List(v1.ListOptions{}) + jobs, err := c.Batch().Jobs(ns).List(metav1.ListOptions{}) if err != nil { return false, err } diff --git a/vendor/k8s.io/kubernetes/test/e2e/daemon_restart.go b/vendor/k8s.io/kubernetes/test/e2e/daemon_restart.go index d1f5284c..990d7824 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/daemon_restart.go +++ b/vendor/k8s.io/kubernetes/test/e2e/daemon_restart.go @@ -21,6 +21,7 @@ import ( "strconv" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/sets" @@ -170,7 +171,7 @@ func replacePods(pods []*v1.Pod, store cache.Store) { // getContainerRestarts returns the count of container restarts across all pods matching the given labelSelector, // and a list of nodenames across which these containers restarted. func getContainerRestarts(c clientset.Interface, ns string, labelSelector labels.Selector) (int, []string) { - options := v1.ListOptions{LabelSelector: labelSelector.String()} + options := metav1.ListOptions{LabelSelector: labelSelector.String()} pods, err := c.Core().Pods(ns).List(options) framework.ExpectNoError(err) failedContainers := 0 @@ -220,12 +221,12 @@ var _ = framework.KubeDescribe("DaemonRestart [Disruptive]", func() { tracker = newPodTracker() newPods, controller = cache.NewInformer( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { options.LabelSelector = labelSelector.String() obj, err := f.ClientSet.Core().Pods(ns).List(options) return runtime.Object(obj), err }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { options.LabelSelector = labelSelector.String() return f.ClientSet.Core().Pods(ns).Watch(options) }, diff --git a/vendor/k8s.io/kubernetes/test/e2e/daemon_set.go b/vendor/k8s.io/kubernetes/test/e2e/daemon_set.go index 1ba3806e..201c9eaf 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/daemon_set.go +++ b/vendor/k8s.io/kubernetes/test/e2e/daemon_set.go @@ -59,12 +59,12 @@ var _ = framework.KubeDescribe("Daemon set [Serial]", func() { var f *framework.Framework AfterEach(func() { - if daemonsets, err := f.ClientSet.Extensions().DaemonSets(f.Namespace.Name).List(v1.ListOptions{}); err == nil { + if daemonsets, err := f.ClientSet.Extensions().DaemonSets(f.Namespace.Name).List(metav1.ListOptions{}); err == nil { framework.Logf("daemonset: %s", runtime.EncodeOrDie(api.Codecs.LegacyCodec(api.Registry.EnabledVersions()...), daemonsets)) } else { framework.Logf("unable to dump daemonsets: %v", err) } - if pods, err := f.ClientSet.Core().Pods(f.Namespace.Name).List(v1.ListOptions{}); err == nil { + if pods, err := f.ClientSet.Core().Pods(f.Namespace.Name).List(metav1.ListOptions{}); err == nil { framework.Logf("pods: %s", runtime.EncodeOrDie(api.Codecs.LegacyCodec(api.Registry.EnabledVersions()...), pods)) } else { framework.Logf("unable to dump pods: %v", err) @@ -94,12 +94,12 @@ var _ = framework.KubeDescribe("Daemon set [Serial]", func() { framework.Logf("Creating simple daemon set %s", dsName) _, err := c.Extensions().DaemonSets(ns).Create(&extensions.DaemonSet{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: dsName, }, Spec: extensions.DaemonSetSpec{ Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: label, }, Spec: v1.PodSpec{ @@ -136,7 +136,7 @@ var _ = framework.KubeDescribe("Daemon set [Serial]", func() { podClient := c.Core().Pods(ns) selector := labels.Set(label).AsSelector() - options := v1.ListOptions{LabelSelector: selector.String()} + options := metav1.ListOptions{LabelSelector: selector.String()} podList, err := podClient.List(options) Expect(err).NotTo(HaveOccurred()) Expect(len(podList.Items)).To(BeNumerically(">", 0)) @@ -153,13 +153,13 @@ var _ = framework.KubeDescribe("Daemon set [Serial]", func() { nodeSelector := map[string]string{daemonsetColorLabel: "blue"} framework.Logf("Creating daemon with a node selector %s", dsName) _, err := c.Extensions().DaemonSets(ns).Create(&extensions.DaemonSet{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: dsName, }, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: complexLabel}, Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: complexLabel, }, Spec: v1.PodSpec{ @@ -226,13 +226,13 @@ var _ = framework.KubeDescribe("Daemon set [Serial]", func() { }, } _, err := c.Extensions().DaemonSets(ns).Create(&extensions.DaemonSet{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: dsName, }, Spec: extensions.DaemonSetSpec{ Selector: &metav1.LabelSelector{MatchLabels: complexLabel}, Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: complexLabel, }, Spec: v1.PodSpec{ @@ -345,7 +345,7 @@ func setDaemonSetNodeLabels(c clientset.Interface, nodeName string, labels map[s func checkDaemonPodOnNodes(f *framework.Framework, selector map[string]string, nodeNames []string) func() (bool, error) { return func() (bool, error) { selector := labels.Set(selector).AsSelector() - options := v1.ListOptions{LabelSelector: selector.String()} + options := metav1.ListOptions{LabelSelector: selector.String()} podList, err := f.ClientSet.Core().Pods(f.Namespace.Name).List(options) if err != nil { return false, nil @@ -374,7 +374,7 @@ func checkDaemonPodOnNodes(f *framework.Framework, selector map[string]string, n func checkRunningOnAllNodes(f *framework.Framework, selector map[string]string) func() (bool, error) { return func() (bool, error) { - nodeList, err := f.ClientSet.Core().Nodes().List(v1.ListOptions{}) + nodeList, err := f.ClientSet.Core().Nodes().List(metav1.ListOptions{}) framework.ExpectNoError(err) nodeNames := make([]string, 0) for _, node := range nodeList.Items { diff --git a/vendor/k8s.io/kubernetes/test/e2e/dashboard.go b/vendor/k8s.io/kubernetes/test/e2e/dashboard.go index 724432df..f0558da4 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/dashboard.go +++ b/vendor/k8s.io/kubernetes/test/e2e/dashboard.go @@ -21,9 +21,9 @@ import ( "net/http" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/test/e2e/framework" testutils "k8s.io/kubernetes/test/utils" @@ -35,7 +35,7 @@ var _ = framework.KubeDescribe("Kubernetes Dashboard", func() { const ( uiServiceName = "kubernetes-dashboard" uiAppName = uiServiceName - uiNamespace = api.NamespaceSystem + uiNamespace = metav1.NamespaceSystem serverStartTimeout = 1 * time.Minute ) diff --git a/vendor/k8s.io/kubernetes/test/e2e/density.go b/vendor/k8s.io/kubernetes/test/e2e/density.go index 857cf53c..8a55e006 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/density.go +++ b/vendor/k8s.io/kubernetes/test/e2e/density.go @@ -26,6 +26,7 @@ import ( "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" @@ -39,7 +40,6 @@ import ( "k8s.io/kubernetes/pkg/client/cache" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" - "k8s.io/kubernetes/pkg/fields" utiluuid "k8s.io/kubernetes/pkg/util/uuid" "k8s.io/kubernetes/pkg/util/workqueue" "k8s.io/kubernetes/test/e2e/framework" @@ -171,7 +171,7 @@ func density30AddonResourceVerifier(numNodes int) map[string]framework.ResourceC func logPodStartupStatus(c clientset.Interface, expectedPods int, observedLabels map[string]string, period time.Duration, stopCh chan struct{}) { label := labels.SelectorFromSet(labels.Set(observedLabels)) - podStore := testutils.NewPodStore(c, v1.NamespaceAll, label, fields.Everything()) + podStore := testutils.NewPodStore(c, metav1.NamespaceAll, label, fields.Everything()) defer podStore.Stop() ticker := time.NewTicker(period) defer ticker.Stop() @@ -228,12 +228,12 @@ func runDensityTest(dtc DensityTestConfig) time.Duration { // Print some data about Pod to Node allocation By("Printing Pod to Node allocation data") - podList, err := dtc.ClientSet.Core().Pods(v1.NamespaceAll).List(v1.ListOptions{}) + podList, err := dtc.ClientSet.Core().Pods(metav1.NamespaceAll).List(metav1.ListOptions{}) framework.ExpectNoError(err) pausePodAllocation := make(map[string]int) systemPodAllocation := make(map[string][]string) for _, pod := range podList.Items { - if pod.Namespace == api.NamespaceSystem { + if pod.Namespace == metav1.NamespaceSystem { systemPodAllocation[pod.Spec.NodeName] = append(systemPodAllocation[pod.Spec.NodeName], pod.Name) } else { pausePodAllocation[pod.Spec.NodeName]++ @@ -565,12 +565,12 @@ var _ = framework.KubeDescribe("Density", func() { nsName := namespaces[i].Name latencyPodsStore, controller := cache.NewInformer( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { options.LabelSelector = labels.SelectorFromSet(labels.Set{"type": additionalPodsPrefix}).String() obj, err := c.Core().Pods(nsName).List(options) return runtime.Object(obj), err }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { options.LabelSelector = labels.SelectorFromSet(labels.Set{"type": additionalPodsPrefix}).String() return c.Core().Pods(nsName).Watch(options) }, @@ -655,7 +655,7 @@ var _ = framework.KubeDescribe("Density", func() { "involvedObject.namespace": nsName, "source": v1.DefaultSchedulerName, }.AsSelector().String() - options := v1.ListOptions{FieldSelector: selector} + options := metav1.ListOptions{FieldSelector: selector} schedEvents, err := c.Core().Events(nsName).List(options) framework.ExpectNoError(err) for k := range createTimes { @@ -785,7 +785,7 @@ func createRunningPodFromRC(wg *sync.WaitGroup, c clientset.Interface, name, ns, "name": name, } rc := &v1.ReplicationController{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Labels: labels, }, @@ -793,7 +793,7 @@ func createRunningPodFromRC(wg *sync.WaitGroup, c clientset.Interface, name, ns, Replicas: func(i int) *int32 { x := int32(i); return &x }(1), Selector: labels, Template: &v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: labels, }, Spec: v1.PodSpec{ diff --git a/vendor/k8s.io/kubernetes/test/e2e/deployment.go b/vendor/k8s.io/kubernetes/test/e2e/deployment.go index 125ba623..105bcae4 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/deployment.go +++ b/vendor/k8s.io/kubernetes/test/e2e/deployment.go @@ -29,7 +29,6 @@ import ( "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apimachinery/pkg/watch" - "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/annotations" "k8s.io/kubernetes/pkg/api/v1" extensionsinternal "k8s.io/kubernetes/pkg/apis/extensions" @@ -109,7 +108,7 @@ var _ = framework.KubeDescribe("Deployment", func() { func newDeployment(deploymentName string, replicas int32, podLabels map[string]string, imageName string, image string, strategyType extensions.DeploymentStrategyType, revisionHistoryLimit *int32) *extensions.Deployment { zero := int64(0) return &extensions.Deployment{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: deploymentName, }, Spec: extensions.DeploymentSpec{ @@ -120,7 +119,7 @@ func newDeployment(deploymentName string, replicas int32, podLabels map[string]s }, RevisionHistoryLimit: revisionHistoryLimit, Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: podLabels, }, Spec: v1.PodSpec{ @@ -185,7 +184,7 @@ func stopDeploymentMaybeOverlap(c clientset.Interface, internalClient internalcl Expect(err).NotTo(HaveOccurred()) timeout := 1 * time.Minute - err = reaper.Stop(ns, deployment.Name, timeout, api.NewDeleteOptions(0)) + err = reaper.Stop(ns, deployment.Name, timeout, metav1.NewDeleteOptions(0)) Expect(err).NotTo(HaveOccurred()) framework.Logf("Ensuring deployment %s was deleted", deploymentName) @@ -195,7 +194,7 @@ func stopDeploymentMaybeOverlap(c clientset.Interface, internalClient internalcl framework.Logf("Ensuring deployment %s's RSes were deleted", deploymentName) selector, err := metav1.LabelSelectorAsSelector(deployment.Spec.Selector) Expect(err).NotTo(HaveOccurred()) - options := v1.ListOptions{LabelSelector: selector.String()} + options := metav1.ListOptions{LabelSelector: selector.String()} rss, err := c.Extensions().ReplicaSets(ns).List(options) Expect(err).NotTo(HaveOccurred()) // RSes may be created by overlapping deployments right after this deployment is deleted, ignore them @@ -412,11 +411,11 @@ func testDeploymentCleanUpPolicy(f *framework.Framework) { deploymentName := "test-cleanup-deployment" framework.Logf("Creating deployment %s", deploymentName) - pods, err := c.Core().Pods(ns).List(v1.ListOptions{LabelSelector: labels.Everything().String()}) + pods, err := c.Core().Pods(ns).List(metav1.ListOptions{LabelSelector: labels.Everything().String()}) if err != nil { Expect(err).NotTo(HaveOccurred(), "Failed to query for pods: %v", err) } - options := v1.ListOptions{ + options := metav1.ListOptions{ ResourceVersion: pods.ListMeta.ResourceVersion, } stopCh := make(chan struct{}) @@ -572,7 +571,7 @@ func testPausedDeployment(f *framework.Framework) { if err != nil { Expect(err).NotTo(HaveOccurred()) } - opts := v1.ListOptions{LabelSelector: selector.String()} + opts := metav1.ListOptions{LabelSelector: selector.String()} w, err := c.Extensions().ReplicaSets(ns).Watch(opts) Expect(err).NotTo(HaveOccurred()) @@ -916,7 +915,7 @@ func testDeploymentLabelAdopted(f *framework.Framework) { // All pods targeted by the deployment should contain pod-template-hash in their labels, and there should be only 3 pods selector, err := metav1.LabelSelectorAsSelector(deployment.Spec.Selector) Expect(err).NotTo(HaveOccurred()) - options := v1.ListOptions{LabelSelector: selector.String()} + options := metav1.ListOptions{LabelSelector: selector.String()} pods, err := c.Core().Pods(ns).List(options) Expect(err).NotTo(HaveOccurred()) err = framework.CheckPodHashLabel(pods) @@ -1163,7 +1162,7 @@ func testOverlappingDeployment(f *framework.Framework) { // Only the first deployment is synced By("Checking only the first overlapping deployment is synced") - options := v1.ListOptions{} + options := metav1.ListOptions{} rsList, err := c.Extensions().ReplicaSets(ns).List(options) Expect(err).NotTo(HaveOccurred(), "Failed listing all replica sets in namespace %s", ns) Expect(rsList.Items).To(HaveLen(int(replicas))) @@ -1365,7 +1364,7 @@ func testIterativeDeployments(f *framework.Framework) { framework.Logf("%02d: arbitrarily deleting one or more deployment pods for deployment %q", i, deployment.Name) selector, err := metav1.LabelSelectorAsSelector(deployment.Spec.Selector) Expect(err).NotTo(HaveOccurred()) - opts := v1.ListOptions{LabelSelector: selector.String()} + opts := metav1.ListOptions{LabelSelector: selector.String()} podList, err := c.Core().Pods(ns).List(opts) Expect(err).NotTo(HaveOccurred()) if len(podList.Items) == 0 { diff --git a/vendor/k8s.io/kubernetes/test/e2e/disruption.go b/vendor/k8s.io/kubernetes/test/e2e/disruption.go index 52fc9462..f5d80ac1 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/disruption.go +++ b/vendor/k8s.io/kubernetes/test/e2e/disruption.go @@ -136,7 +136,7 @@ var _ = framework.KubeDescribe("DisruptionController", func() { // Locate a running pod. var pod v1.Pod err := wait.PollImmediate(framework.Poll, schedulingTimeout, func() (bool, error) { - podList, err := cs.Pods(ns).List(v1.ListOptions{}) + podList, err := cs.Pods(ns).List(metav1.ListOptions{}) if err != nil { return false, err } @@ -153,7 +153,7 @@ var _ = framework.KubeDescribe("DisruptionController", func() { Expect(err).NotTo(HaveOccurred()) e := &policy.Eviction{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: pod.Name, Namespace: ns, }, @@ -191,7 +191,7 @@ var _ = framework.KubeDescribe("DisruptionController", func() { func createPodDisruptionBudgetOrDie(cs *kubernetes.Clientset, ns string, minAvailable intstr.IntOrString) { pdb := policy.PodDisruptionBudget{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: ns, }, @@ -207,7 +207,7 @@ func createPodDisruptionBudgetOrDie(cs *kubernetes.Clientset, ns string, minAvai func createPodsOrDie(cs *kubernetes.Clientset, ns string, n int) { for i := 0; i < n; i++ { pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: fmt.Sprintf("pod-%d", i), Namespace: ns, Labels: map[string]string{"foo": "bar"}, @@ -231,7 +231,7 @@ func createPodsOrDie(cs *kubernetes.Clientset, ns string, n int) { func waitForPodsOrDie(cs *kubernetes.Clientset, ns string, n int) { By("Waiting for all pods to be running") err := wait.PollImmediate(framework.Poll, schedulingTimeout, func() (bool, error) { - pods, err := cs.Core().Pods(ns).List(v1.ListOptions{LabelSelector: "foo=bar"}) + pods, err := cs.Core().Pods(ns).List(metav1.ListOptions{LabelSelector: "foo=bar"}) if err != nil { return false, err } @@ -269,7 +269,7 @@ func createReplicaSetOrDie(cs *kubernetes.Clientset, ns string, size int32, excl } rs := &extensions.ReplicaSet{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "rs", Namespace: ns, }, @@ -279,7 +279,7 @@ func createReplicaSetOrDie(cs *kubernetes.Clientset, ns string, size int32, excl MatchLabels: map[string]string{"foo": "bar"}, }, Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"foo": "bar"}, }, Spec: v1.PodSpec{ diff --git a/vendor/k8s.io/kubernetes/test/e2e/dns.go b/vendor/k8s.io/kubernetes/test/e2e/dns.go index 9a9445e2..8b6a266e 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/dns.go +++ b/vendor/k8s.io/kubernetes/test/e2e/dns.go @@ -49,7 +49,7 @@ func createDNSPod(namespace, wheezyProbeCmd, jessieProbeCmd string, useAnnotatio Kind: "Pod", APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String(), }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "dns-test-" + string(uuid.NewUUID()), Namespace: namespace, }, @@ -238,7 +238,7 @@ func validateDNSResults(f *framework.Framework, pod *v1.Pod, fileNames []string) defer func() { By("deleting the pod") defer GinkgoRecover() - podClient.Delete(pod.Name, v1.NewDeleteOptions(0)) + podClient.Delete(pod.Name, metav1.NewDeleteOptions(0)) }() if _, err := podClient.Create(pod); err != nil { framework.Failf("Failed to create %s pod: %v", pod.Name, err) @@ -267,7 +267,7 @@ func validateTargetedProbeOutput(f *framework.Framework, pod *v1.Pod, fileNames defer func() { By("deleting the pod") defer GinkgoRecover() - podClient.Delete(pod.Name, v1.NewDeleteOptions(0)) + podClient.Delete(pod.Name, metav1.NewDeleteOptions(0)) }() if _, err := podClient.Create(pod); err != nil { framework.Failf("Failed to create %s pod: %v", pod.Name, err) @@ -288,9 +288,9 @@ func validateTargetedProbeOutput(f *framework.Framework, pod *v1.Pod, fileNames } func verifyDNSPodIsRunning(f *framework.Framework) { - systemClient := f.ClientSet.Core().Pods(api.NamespaceSystem) + systemClient := f.ClientSet.Core().Pods(metav1.NamespaceSystem) By("Waiting for DNS Service to be Running") - options := v1.ListOptions{LabelSelector: dnsServiceLabelSelector.String()} + options := metav1.ListOptions{LabelSelector: dnsServiceLabelSelector.String()} dnsPods, err := systemClient.List(options) if err != nil { framework.Failf("Failed to list all dns service pods") @@ -304,7 +304,7 @@ func verifyDNSPodIsRunning(f *framework.Framework) { func createServiceSpec(serviceName, externalName string, isHeadless bool, selector map[string]string) *v1.Service { headlessService := &v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: serviceName, }, Spec: v1.ServiceSpec{ diff --git a/vendor/k8s.io/kubernetes/test/e2e/dns_autoscaling.go b/vendor/k8s.io/kubernetes/test/e2e/dns_autoscaling.go index c3868378..04a05a54 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/dns_autoscaling.go +++ b/vendor/k8s.io/kubernetes/test/e2e/dns_autoscaling.go @@ -26,7 +26,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" @@ -89,7 +88,7 @@ var _ = framework.KubeDescribe("DNS horizontal autoscaling", func() { By("Wait for number of running and ready kube-dns pods recover") label := labels.SelectorFromSet(labels.Set(map[string]string{ClusterAddonLabelKey: DNSLabelName})) - _, err := framework.WaitForPodsWithLabelRunningReady(c, api.NamespaceSystem, label, originDNSReplicasCount, DNSdefaultTimeout) + _, err := framework.WaitForPodsWithLabelRunningReady(c, metav1.NamespaceSystem, label, originDNSReplicasCount, DNSdefaultTimeout) Expect(err).NotTo(HaveOccurred()) }() By("Wait for kube-dns scaled to expected number") @@ -231,7 +230,7 @@ func getScheduableCores(nodes []v1.Node) int64 { } func fetchDNSScalingConfigMap(c clientset.Interface) (*v1.ConfigMap, error) { - cm, err := c.Core().ConfigMaps(api.NamespaceSystem).Get(DNSAutoscalerLabelName, metav1.GetOptions{}) + cm, err := c.Core().ConfigMaps(metav1.NamespaceSystem).Get(DNSAutoscalerLabelName, metav1.GetOptions{}) if err != nil { return nil, err } @@ -239,7 +238,7 @@ func fetchDNSScalingConfigMap(c clientset.Interface) (*v1.ConfigMap, error) { } func deleteDNSScalingConfigMap(c clientset.Interface) error { - if err := c.Core().ConfigMaps(api.NamespaceSystem).Delete(DNSAutoscalerLabelName, nil); err != nil { + if err := c.Core().ConfigMaps(metav1.NamespaceSystem).Delete(DNSAutoscalerLabelName, nil); err != nil { return err } framework.Logf("DNS autoscaling ConfigMap deleted.") @@ -259,13 +258,13 @@ func packLinearParams(params *DNSParamsLinear) map[string]string { func packDNSScalingConfigMap(params map[string]string) *v1.ConfigMap { configMap := v1.ConfigMap{} configMap.ObjectMeta.Name = DNSAutoscalerLabelName - configMap.ObjectMeta.Namespace = api.NamespaceSystem + configMap.ObjectMeta.Namespace = metav1.NamespaceSystem configMap.Data = params return &configMap } func updateDNSScalingConfigMap(c clientset.Interface, configMap *v1.ConfigMap) error { - _, err := c.Core().ConfigMaps(api.NamespaceSystem).Update(configMap) + _, err := c.Core().ConfigMaps(metav1.NamespaceSystem).Update(configMap) if err != nil { return err } @@ -275,8 +274,8 @@ func updateDNSScalingConfigMap(c clientset.Interface, configMap *v1.ConfigMap) e func getDNSReplicas(c clientset.Interface) (int, error) { label := labels.SelectorFromSet(labels.Set(map[string]string{ClusterAddonLabelKey: DNSLabelName})) - listOpts := v1.ListOptions{LabelSelector: label.String()} - deployments, err := c.Extensions().Deployments(api.NamespaceSystem).List(listOpts) + listOpts := metav1.ListOptions{LabelSelector: label.String()} + deployments, err := c.Extensions().Deployments(metav1.NamespaceSystem).List(listOpts) if err != nil { return 0, err } @@ -290,8 +289,8 @@ func getDNSReplicas(c clientset.Interface) (int, error) { func deleteDNSAutoscalerPod(c clientset.Interface) error { label := labels.SelectorFromSet(labels.Set(map[string]string{ClusterAddonLabelKey: DNSAutoscalerLabelName})) - listOpts := v1.ListOptions{LabelSelector: label.String()} - pods, err := c.Core().Pods(api.NamespaceSystem).List(listOpts) + listOpts := metav1.ListOptions{LabelSelector: label.String()} + pods, err := c.Core().Pods(metav1.NamespaceSystem).List(listOpts) if err != nil { return err } @@ -300,7 +299,7 @@ func deleteDNSAutoscalerPod(c clientset.Interface) error { } podName := pods.Items[0].Name - if err := c.Core().Pods(api.NamespaceSystem).Delete(podName, nil); err != nil { + if err := c.Core().Pods(metav1.NamespaceSystem).Delete(podName, nil); err != nil { return err } framework.Logf("DNS autoscaling pod %v deleted.", podName) diff --git a/vendor/k8s.io/kubernetes/test/e2e/dns_configmap.go b/vendor/k8s.io/kubernetes/test/e2e/dns_configmap.go index 5746de50..8f03a5db 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/dns_configmap.go +++ b/vendor/k8s.io/kubernetes/test/e2e/dns_configmap.go @@ -22,11 +22,11 @@ import ( "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/fields" "k8s.io/kubernetes/pkg/util/intstr" "k8s.io/kubernetes/test/e2e/framework" @@ -69,7 +69,7 @@ var _ = framework.KubeDescribe("DNS config map", func() { func (t *dnsConfigMapTest) init() { By("Finding a DNS pod") label := labels.SelectorFromSet(labels.Set(map[string]string{"k8s-app": "kube-dns"})) - options := v1.ListOptions{LabelSelector: label.String()} + options := metav1.ListOptions{LabelSelector: label.String()} pods, err := t.f.ClientSet.Core().Pods("kube-system").List(options) Expect(err).NotTo(HaveOccurred()) @@ -218,7 +218,7 @@ func (t *dnsConfigMapTest) setConfigMap(cm *v1.ConfigMap, fedMap map[string]stri cm.ObjectMeta.Namespace = t.ns cm.ObjectMeta.Name = t.name - options := v1.ListOptions{ + options := metav1.ListOptions{ FieldSelector: fields.Set{ "metadata.namespace": t.ns, "metadata.name": t.name, @@ -256,7 +256,7 @@ func (t *dnsConfigMapTest) createUtilPod() { TypeMeta: metav1.TypeMeta{ Kind: "Pod", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: t.f.Namespace.Name, Labels: map[string]string{"app": "e2e-dns-configmap"}, GenerateName: "e2e-dns-configmap-", @@ -285,7 +285,7 @@ func (t *dnsConfigMapTest) createUtilPod() { TypeMeta: metav1.TypeMeta{ Kind: "Service", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: t.f.Namespace.Name, Name: "e2e-dns-configmap", }, @@ -308,7 +308,7 @@ func (t *dnsConfigMapTest) createUtilPod() { func (t *dnsConfigMapTest) deleteUtilPod() { podClient := t.c.Core().Pods(t.f.Namespace.Name) - if err := podClient.Delete(t.utilPod.Name, v1.NewDeleteOptions(0)); err != nil { + if err := podClient.Delete(t.utilPod.Name, metav1.NewDeleteOptions(0)); err != nil { framework.Logf("Delete of pod %v:%v failed: %v", t.utilPod.Namespace, t.utilPod.Name, err) } diff --git a/vendor/k8s.io/kubernetes/test/e2e/e2e.go b/vendor/k8s.io/kubernetes/test/e2e/e2e.go index 687d1e61..962d2901 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/e2e.go +++ b/vendor/k8s.io/kubernetes/test/e2e/e2e.go @@ -30,6 +30,7 @@ import ( "github.com/onsi/ginkgo/reporters" "github.com/onsi/gomega" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" runtimeutils "k8s.io/apimachinery/pkg/util/runtime" utilyaml "k8s.io/apimachinery/pkg/util/yaml" @@ -42,6 +43,7 @@ import ( commontest "k8s.io/kubernetes/test/e2e/common" "k8s.io/kubernetes/test/e2e/framework" "k8s.io/kubernetes/test/e2e/generated" + federationtest "k8s.io/kubernetes/test/e2e_federation" testutils "k8s.io/kubernetes/test/utils" ) @@ -109,7 +111,7 @@ var _ = ginkgo.SynchronizedBeforeSuite(func() []byte { // Delete any namespaces except default and kube-system. This ensures no // lingering resources are left over from a previous test run. if framework.TestContext.CleanStart { - deleted, err := framework.DeleteNamespaces(c, nil /* deleteFilter */, []string{api.NamespaceSystem, v1.NamespaceDefault, federationapi.FederationNamespaceSystem}) + deleted, err := framework.DeleteNamespaces(c, nil /* deleteFilter */, []string{metav1.NamespaceSystem, metav1.NamespaceDefault, federationapi.FederationNamespaceSystem}) if err != nil { framework.Failf("Error deleting orphaned namespaces: %v", err) } @@ -129,14 +131,14 @@ var _ = ginkgo.SynchronizedBeforeSuite(func() []byte { // test pods from running, and tests that ensure all pods are running and // ready will fail). podStartupTimeout := framework.TestContext.SystemPodsStartupTimeout - if err := framework.WaitForPodsRunningReady(c, api.NamespaceSystem, int32(framework.TestContext.MinStartupPods), podStartupTimeout, framework.ImagePullerLabels, true); err != nil { - framework.DumpAllNamespaceInfo(c, api.NamespaceSystem) - framework.LogFailedContainers(c, api.NamespaceSystem, framework.Logf) - runKubernetesServiceTestContainer(c, v1.NamespaceDefault) + if err := framework.WaitForPodsRunningReady(c, metav1.NamespaceSystem, int32(framework.TestContext.MinStartupPods), podStartupTimeout, framework.ImagePullerLabels, true); err != nil { + framework.DumpAllNamespaceInfo(c, metav1.NamespaceSystem) + framework.LogFailedContainers(c, metav1.NamespaceSystem, framework.Logf) + runKubernetesServiceTestContainer(c, metav1.NamespaceDefault) framework.Failf("Error waiting for all pods to be running and ready: %v", err) } - if err := framework.WaitForPodsSuccess(c, api.NamespaceSystem, framework.ImagePullerLabels, imagePrePullingTimeout); err != nil { + if err := framework.WaitForPodsSuccess(c, metav1.NamespaceSystem, framework.ImagePullerLabels, imagePrePullingTimeout); err != nil { // There is no guarantee that the image pulling will succeed in 3 minutes // and we don't even run the image puller on all platforms (including GKE). // We wait for it so we get an indication of failures in the logs, and to @@ -147,12 +149,15 @@ var _ = ginkgo.SynchronizedBeforeSuite(func() []byte { // Dump the output of the nethealth containers only once per run if framework.TestContext.DumpLogsOnFailure { framework.Logf("Dumping network health container logs from all nodes") - framework.LogContainersInPodsWithLabels(c, api.NamespaceSystem, framework.ImagePullerLabels, "nethealth", framework.Logf) + framework.LogContainersInPodsWithLabels(c, metav1.NamespaceSystem, framework.ImagePullerLabels, "nethealth", framework.Logf) } // Reference common test to make the import valid. commontest.CurrentSuite = commontest.E2E + // Reference federation test to make the import valid. + federationtest.FederationSuite = commontest.FederationE2E + return nil }, func(data []byte) { diff --git a/vendor/k8s.io/kubernetes/test/e2e/empty_dir_wrapper.go b/vendor/k8s.io/kubernetes/test/e2e/empty_dir_wrapper.go index 9fa1c4aa..e1f82657 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/empty_dir_wrapper.go +++ b/vendor/k8s.io/kubernetes/test/e2e/empty_dir_wrapper.go @@ -17,6 +17,7 @@ limitations under the License. package e2e import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/util/intstr" @@ -58,7 +59,7 @@ var _ = framework.KubeDescribe("EmptyDir wrapper volumes", func() { volumeMountPath := "/etc/secret-volume" secret := &v1.Secret{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: f.Namespace.Name, Name: name, }, @@ -78,7 +79,7 @@ var _ = framework.KubeDescribe("EmptyDir wrapper volumes", func() { defer gitCleanup() pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod-secrets-" + string(uuid.NewUUID()), }, Spec: v1.PodSpec{ @@ -128,7 +129,7 @@ var _ = framework.KubeDescribe("EmptyDir wrapper volumes", func() { framework.Failf("unable to delete secret %v: %v", secret.Name, err) } By("Cleaning up the git vol pod") - if err = f.ClientSet.Core().Pods(f.Namespace.Name).Delete(pod.Name, v1.NewDeleteOptions(0)); err != nil { + if err = f.ClientSet.Core().Pods(f.Namespace.Name).Delete(pod.Name, metav1.NewDeleteOptions(0)); err != nil { framework.Failf("unable to delete git vol pod %v: %v", pod.Name, err) } }() @@ -178,7 +179,7 @@ func createGitServer(f *framework.Framework) (gitURL string, gitRepo string, cle labels := map[string]string{"name": gitServerPodName} gitServerPod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: gitServerPodName, Labels: labels, }, @@ -201,7 +202,7 @@ func createGitServer(f *framework.Framework) (gitURL string, gitRepo string, cle httpPort := 2345 gitServerSvc := &v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "git-server-svc", }, Spec: v1.ServiceSpec{ @@ -222,7 +223,7 @@ func createGitServer(f *framework.Framework) (gitURL string, gitRepo string, cle return "http://" + gitServerSvc.Spec.ClusterIP + ":" + strconv.Itoa(httpPort), "test", func() { By("Cleaning up the git server pod") - if err := f.ClientSet.Core().Pods(f.Namespace.Name).Delete(gitServerPod.Name, v1.NewDeleteOptions(0)); err != nil { + if err := f.ClientSet.Core().Pods(f.Namespace.Name).Delete(gitServerPod.Name, metav1.NewDeleteOptions(0)); err != nil { framework.Failf("unable to delete git server pod %v: %v", gitServerPod.Name, err) } By("Cleaning up the git server svc") @@ -258,7 +259,7 @@ func createConfigmapsForRace(f *framework.Framework) (configMapNames []string) { configMapName := fmt.Sprintf("racey-configmap-%d", i) configMapNames = append(configMapNames, configMapName) configMap := &v1.ConfigMap{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: f.Namespace.Name, Name: configMapName, }, @@ -333,7 +334,7 @@ func testNoWrappedVolumeRace(f *framework.Framework, volumes []v1.Volume, volume } rc := &v1.ReplicationController{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: rcName, }, Spec: v1.ReplicationControllerSpec{ @@ -342,7 +343,7 @@ func testNoWrappedVolumeRace(f *framework.Framework, volumes []v1.Volume, volume "name": rcName, }, Template: &v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"name": rcName}, }, Spec: v1.PodSpec{ diff --git a/vendor/k8s.io/kubernetes/test/e2e/etcd_failure.go b/vendor/k8s.io/kubernetes/test/e2e/etcd_failure.go index 20ade3ad..fe98fba0 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/etcd_failure.go +++ b/vendor/k8s.io/kubernetes/test/e2e/etcd_failure.go @@ -19,6 +19,7 @@ package e2e import ( "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/kubernetes/pkg/api/v1" @@ -106,7 +107,7 @@ func checkExistingRCRecovers(f *framework.Framework) { By("deleting pods from existing replication controller") framework.ExpectNoError(wait.Poll(time.Millisecond*500, time.Second*60, func() (bool, error) { - options := v1.ListOptions{LabelSelector: rcSelector.String()} + options := metav1.ListOptions{LabelSelector: rcSelector.String()} pods, err := podClient.List(options) if err != nil { framework.Logf("apiserver returned error, as expected before recovery: %v", err) @@ -116,7 +117,7 @@ func checkExistingRCRecovers(f *framework.Framework) { return false, nil } for _, pod := range pods.Items { - err = podClient.Delete(pod.Name, v1.NewDeleteOptions(0)) + err = podClient.Delete(pod.Name, metav1.NewDeleteOptions(0)) Expect(err).NotTo(HaveOccurred()) } framework.Logf("apiserver has recovered") @@ -125,7 +126,7 @@ func checkExistingRCRecovers(f *framework.Framework) { By("waiting for replication controller to recover") framework.ExpectNoError(wait.Poll(time.Millisecond*500, time.Second*60, func() (bool, error) { - options := v1.ListOptions{LabelSelector: rcSelector.String()} + options := metav1.ListOptions{LabelSelector: rcSelector.String()} pods, err := podClient.List(options) Expect(err).NotTo(HaveOccurred()) for _, pod := range pods.Items { diff --git a/vendor/k8s.io/kubernetes/test/e2e/events.go b/vendor/k8s.io/kubernetes/test/e2e/events.go index 3117d558..05768330 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/events.go +++ b/vendor/k8s.io/kubernetes/test/e2e/events.go @@ -22,10 +22,10 @@ import ( "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/kubernetes/pkg/api/v1" - "k8s.io/kubernetes/pkg/fields" "k8s.io/kubernetes/pkg/util/uuid" "k8s.io/kubernetes/test/e2e/framework" @@ -44,7 +44,7 @@ var _ = framework.KubeDescribe("Events", func() { name := "send-events-" + string(uuid.NewUUID()) value := strconv.Itoa(time.Now().Nanosecond()) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Labels: map[string]string{ "name": "foo", @@ -75,7 +75,7 @@ var _ = framework.KubeDescribe("Events", func() { By("verifying the pod is in kubernetes") selector := labels.SelectorFromSet(labels.Set(map[string]string{"time": value})) - options := v1.ListOptions{LabelSelector: selector.String()} + options := metav1.ListOptions{LabelSelector: selector.String()} pods, err := podClient.List(options) Expect(len(pods.Items)).To(Equal(1)) @@ -95,7 +95,7 @@ var _ = framework.KubeDescribe("Events", func() { "involvedObject.namespace": f.Namespace.Name, "source": v1.DefaultSchedulerName, }.AsSelector().String() - options := v1.ListOptions{FieldSelector: selector} + options := metav1.ListOptions{FieldSelector: selector} events, err := f.ClientSet.Core().Events(f.Namespace.Name).List(options) if err != nil { return false, err @@ -115,7 +115,7 @@ var _ = framework.KubeDescribe("Events", func() { "involvedObject.namespace": f.Namespace.Name, "source": "kubelet", }.AsSelector().String() - options := v1.ListOptions{FieldSelector: selector} + options := metav1.ListOptions{FieldSelector: selector} events, err = f.ClientSet.Core().Events(f.Namespace.Name).List(options) if err != nil { return false, err diff --git a/vendor/k8s.io/kubernetes/test/e2e/example_cluster_dns.go b/vendor/k8s.io/kubernetes/test/e2e/example_cluster_dns.go index e2d06e65..251ec652 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/example_cluster_dns.go +++ b/vendor/k8s.io/kubernetes/test/e2e/example_cluster_dns.go @@ -21,6 +21,7 @@ import ( "path/filepath" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" @@ -98,7 +99,7 @@ var _ = framework.KubeDescribe("ClusterDns [Feature:Example]", func() { // the application itself may have not been initialized. Just query the application. for _, ns := range namespaces { label := labels.SelectorFromSet(labels.Set(map[string]string{"name": backendRcName})) - options := v1.ListOptions{LabelSelector: label.String()} + options := metav1.ListOptions{LabelSelector: label.String()} pods, err := c.Core().Pods(ns.Name).List(options) Expect(err).NotTo(HaveOccurred()) err = framework.PodsResponding(c, ns.Name, backendPodName, false, pods) @@ -118,7 +119,7 @@ var _ = framework.KubeDescribe("ClusterDns [Feature:Example]", func() { // dns error or timeout. // This code is probably unnecessary, but let's stay on the safe side. label := labels.SelectorFromSet(labels.Set(map[string]string{"name": backendPodName})) - options := v1.ListOptions{LabelSelector: label.String()} + options := metav1.ListOptions{LabelSelector: label.String()} pods, err := c.Core().Pods(namespaces[0].Name).List(options) if err != nil || pods == nil || len(pods.Items) == 0 { diff --git a/vendor/k8s.io/kubernetes/test/e2e/examples.go b/vendor/k8s.io/kubernetes/test/e2e/examples.go index bfbae704..bb1b76a1 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/examples.go +++ b/vendor/k8s.io/kubernetes/test/e2e/examples.go @@ -31,10 +31,10 @@ import ( "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/apiserver/pkg/authentication/serviceaccount" "k8s.io/kubernetes/pkg/api/v1" - rbacv1alpha1 "k8s.io/kubernetes/pkg/apis/rbac/v1alpha1" + rbacv1beta1 "k8s.io/kubernetes/pkg/apis/rbac/v1beta1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/serviceaccount" "k8s.io/kubernetes/test/e2e/framework" "k8s.io/kubernetes/test/e2e/generated" testutils "k8s.io/kubernetes/test/utils" @@ -72,7 +72,7 @@ var _ = framework.KubeDescribe("[Feature:Example]", func() { // this test wants powerful permissions. Since the namespace names are unique, we can leave this // lying around so we don't have to race any caches framework.BindClusterRoleInNamespace(c.Rbac(), "edit", f.Namespace.Name, - rbacv1alpha1.Subject{Kind: rbacv1alpha1.ServiceAccountKind, Namespace: f.Namespace.Name, Name: "default"}) + rbacv1beta1.Subject{Kind: rbacv1beta1.ServiceAccountKind, Namespace: f.Namespace.Name, Name: "default"}) err := framework.WaitForAuthorizationUpdate(c.Authorization(), serviceaccount.MakeUsername(f.Namespace.Name, "default"), @@ -298,7 +298,7 @@ var _ = framework.KubeDescribe("[Feature:Example]", func() { label := labels.SelectorFromSet(labels.Set(map[string]string{"app": "cassandra"})) err = wait.PollImmediate(statefulsetPoll, statefulsetTimeout, func() (bool, error) { - podList, err := c.Core().Pods(ns).List(v1.ListOptions{LabelSelector: label.String()}) + podList, err := c.Core().Pods(ns).List(metav1.ListOptions{LabelSelector: label.String()}) if err != nil { return false, fmt.Errorf("Unable to get list of pods in statefulset %s", label) } diff --git a/vendor/k8s.io/kubernetes/test/e2e/framework/BUILD b/vendor/k8s.io/kubernetes/test/e2e/framework/BUILD index 1affc515..f01f62a4 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/framework/BUILD +++ b/vendor/k8s.io/kubernetes/test/e2e/framework/BUILD @@ -32,8 +32,6 @@ go_library( ], tags = ["automanaged"], deps = [ - "//federation/apis/federation/v1beta1:go_default_library", - "//federation/client/clientset_generated/federation_clientset:go_default_library", "//pkg/api:go_default_library", "//pkg/api/v1:go_default_library", "//pkg/api/v1/service:go_default_library", @@ -45,24 +43,20 @@ go_library( "//pkg/apis/componentconfig:go_default_library", "//pkg/apis/extensions:go_default_library", "//pkg/apis/extensions/v1beta1:go_default_library", - "//pkg/apis/rbac/v1alpha1:go_default_library", + "//pkg/apis/rbac/v1beta1:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", "//pkg/client/clientset_generated/clientset/typed/authorization/v1beta1:go_default_library", "//pkg/client/clientset_generated/clientset/typed/core/v1:go_default_library", - "//pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1:go_default_library", + "//pkg/client/clientset_generated/clientset/typed/rbac/v1beta1:go_default_library", "//pkg/client/clientset_generated/internalclientset:go_default_library", "//pkg/client/conditions:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/typed/discovery:go_default_library", "//pkg/client/typed/dynamic:go_default_library", - "//pkg/client/unversioned/clientcmd:go_default_library", - "//pkg/client/unversioned/clientcmd/api:go_default_library", "//pkg/client/unversioned/remotecommand:go_default_library", "//pkg/cloudprovider:go_default_library", "//pkg/cloudprovider/providers/gce:go_default_library", "//pkg/controller:go_default_library", "//pkg/controller/deployment/util:go_default_library", - "//pkg/fields:go_default_library", "//pkg/kubectl:go_default_library", "//pkg/kubelet/api/v1alpha1/stats:go_default_library", "//pkg/kubelet/metrics:go_default_library", @@ -95,10 +89,10 @@ go_library( "//vendor:golang.org/x/net/websocket", "//vendor:google.golang.org/api/compute/v1", "//vendor:google.golang.org/api/googleapi", - "//vendor:gopkg.in/yaml.v2", "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1/unstructured", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", @@ -113,6 +107,8 @@ go_library( "//vendor:k8s.io/apimachinery/pkg/watch", "//vendor:k8s.io/client-go/kubernetes", "//vendor:k8s.io/client-go/rest", + "//vendor:k8s.io/client-go/tools/clientcmd", + "//vendor:k8s.io/client-go/tools/clientcmd/api", ], ) diff --git a/vendor/k8s.io/kubernetes/test/e2e/framework/authorizer_util.go b/vendor/k8s.io/kubernetes/test/e2e/framework/authorizer_util.go index d7249eeb..2d348ece 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/framework/authorizer_util.go +++ b/vendor/k8s.io/kubernetes/test/e2e/framework/authorizer_util.go @@ -21,13 +21,13 @@ import ( "time" apierrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/wait" - legacyv1 "k8s.io/kubernetes/pkg/api/v1" authorizationv1beta1 "k8s.io/kubernetes/pkg/apis/authorization/v1beta1" - rbacv1alpha1 "k8s.io/kubernetes/pkg/apis/rbac/v1alpha1" + rbacv1beta1 "k8s.io/kubernetes/pkg/apis/rbac/v1beta1" v1beta1authorization "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1" - v1alpha1rbac "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1" + v1beta1rbac "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1" ) const ( @@ -70,13 +70,13 @@ func WaitForAuthorizationUpdate(c v1beta1authorization.SubjectAccessReviewsGette } // BindClusterRole binds the cluster role at the cluster scope -func BindClusterRole(c v1alpha1rbac.ClusterRoleBindingsGetter, clusterRole, ns string, subjects ...rbacv1alpha1.Subject) { +func BindClusterRole(c v1beta1rbac.ClusterRoleBindingsGetter, clusterRole, ns string, subjects ...rbacv1beta1.Subject) { // Since the namespace names are unique, we can leave this lying around so we don't have to race any caches - _, err := c.ClusterRoleBindings().Create(&rbacv1alpha1.ClusterRoleBinding{ - ObjectMeta: legacyv1.ObjectMeta{ + _, err := c.ClusterRoleBindings().Create(&rbacv1beta1.ClusterRoleBinding{ + ObjectMeta: metav1.ObjectMeta{ Name: ns + "--" + clusterRole, }, - RoleRef: rbacv1alpha1.RoleRef{ + RoleRef: rbacv1beta1.RoleRef{ APIGroup: "rbac.authorization.k8s.io", Kind: "ClusterRole", Name: clusterRole, @@ -91,13 +91,13 @@ func BindClusterRole(c v1alpha1rbac.ClusterRoleBindingsGetter, clusterRole, ns s } // BindClusterRoleInNamespace binds the cluster role at the namespace scope -func BindClusterRoleInNamespace(c v1alpha1rbac.RoleBindingsGetter, clusterRole, ns string, subjects ...rbacv1alpha1.Subject) { +func BindClusterRoleInNamespace(c v1beta1rbac.RoleBindingsGetter, clusterRole, ns string, subjects ...rbacv1beta1.Subject) { // Since the namespace names are unique, we can leave this lying around so we don't have to race any caches - _, err := c.RoleBindings(ns).Create(&rbacv1alpha1.RoleBinding{ - ObjectMeta: legacyv1.ObjectMeta{ + _, err := c.RoleBindings(ns).Create(&rbacv1beta1.RoleBinding{ + ObjectMeta: metav1.ObjectMeta{ Name: ns + "--" + clusterRole, }, - RoleRef: rbacv1alpha1.RoleRef{ + RoleRef: rbacv1beta1.RoleRef{ APIGroup: "rbac.authorization.k8s.io", Kind: "ClusterRole", Name: clusterRole, diff --git a/vendor/k8s.io/kubernetes/test/e2e/framework/exec_util.go b/vendor/k8s.io/kubernetes/test/e2e/framework/exec_util.go index d4b84e9e..d032ed72 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/framework/exec_util.go +++ b/vendor/k8s.io/kubernetes/test/e2e/framework/exec_util.go @@ -23,9 +23,9 @@ import ( "strings" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/unversioned/remotecommand" remotecommandserver "k8s.io/kubernetes/pkg/kubelet/server/remotecommand" diff --git a/vendor/k8s.io/kubernetes/test/e2e/framework/framework.go b/vendor/k8s.io/kubernetes/test/e2e/framework/framework.go index da183ff5..a3e4874b 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/framework/framework.go +++ b/vendor/k8s.io/kubernetes/test/e2e/framework/framework.go @@ -20,7 +20,6 @@ import ( "bytes" "encoding/json" "fmt" - "io/ioutil" "reflect" "strings" "sync" @@ -28,27 +27,25 @@ import ( apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/wait" staging "k8s.io/client-go/kubernetes" clientreporestclient "k8s.io/client-go/rest" - "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/typed/dynamic" - "k8s.io/kubernetes/pkg/fields" "k8s.io/kubernetes/pkg/metrics" "k8s.io/kubernetes/pkg/util/intstr" testutils "k8s.io/kubernetes/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - yaml "gopkg.in/yaml.v2" ) const ( @@ -88,13 +85,6 @@ type Framework struct { // configuration for framework's client options FrameworkOptions - - // will this framework exercise a federated cluster as well - federated bool - - // Federation specific params. These are set only if federated = true. - FederationClientset_1_5 *federation_clientset.Clientset - FederationNamespace *v1.Namespace } type TestDataSummary interface { @@ -118,12 +108,6 @@ func NewDefaultFramework(baseName string) *Framework { return NewFramework(baseName, options, nil) } -func NewDefaultFederatedFramework(baseName string) *Framework { - f := NewDefaultFramework(baseName) - f.federated = true - return f -} - func NewDefaultGroupVersionFramework(baseName string, groupVersion schema.GroupVersion) *Framework { f := NewDefaultFramework(baseName) f.options.GroupVersion = &groupVersion @@ -203,25 +187,6 @@ func (f *Framework) BeforeEach() { f.ClientPool = dynamic.NewClientPool(config, api.Registry.RESTMapper(), dynamic.LegacyAPIPathResolverFunc) } - if f.federated { - if f.FederationClientset_1_5 == nil { - By("Creating a release 1.4 federation Clientset") - var err error - f.FederationClientset_1_5, err = LoadFederationClientset_1_5() - Expect(err).NotTo(HaveOccurred()) - } - By("Waiting for federation-apiserver to be ready") - err := WaitForFederationApiserverReady(f.FederationClientset_1_5) - Expect(err).NotTo(HaveOccurred()) - By("federation-apiserver is ready") - - By("Creating a federation namespace") - ns, err := f.createFederationNamespace(f.BaseName) - Expect(err).NotTo(HaveOccurred()) - f.FederationNamespace = ns - By(fmt.Sprintf("Created federation namespace %s", ns.Name)) - } - By("Building a namespace api object") namespace, err := f.CreateNamespace(f.BaseName, map[string]string{ "e2e-framework": f.BaseName, @@ -262,45 +227,6 @@ func (f *Framework) BeforeEach() { } } -func (f *Framework) deleteFederationNs() { - if !f.federated { - // Nothing to do if this is not a federation setup. - return - } - ns := f.FederationNamespace - By(fmt.Sprintf("Destroying federation namespace %q for this suite.", ns.Name)) - timeout := 5 * time.Minute - if f.NamespaceDeletionTimeout != 0 { - timeout = f.NamespaceDeletionTimeout - } - - clientset := f.FederationClientset_1_5 - // First delete the namespace from federation apiserver. - // Also delete the corresponding namespaces from underlying clusters. - orphanDependents := false - if err := clientset.Core().Namespaces().Delete(ns.Name, &v1.DeleteOptions{OrphanDependents: &orphanDependents}); err != nil { - Failf("Error while deleting federation namespace %s: %s", ns.Name, err) - } - // Verify that it got deleted. - err := wait.PollImmediate(5*time.Second, timeout, func() (bool, error) { - if _, err := clientset.Core().Namespaces().Get(ns.Name, metav1.GetOptions{}); err != nil { - if apierrors.IsNotFound(err) { - return true, nil - } - Logf("Error while waiting for namespace to be terminated: %v", err) - return false, nil - } - return false, nil - }) - if err != nil { - if !apierrors.IsNotFound(err) { - Failf("Couldn't delete ns %q: %s", ns.Name, err) - } else { - Logf("Namespace %v was already deleted", ns.Name) - } - } -} - // AfterEach deletes the namespace, after reading its events. func (f *Framework) AfterEach() { RemoveCleanupAction(f.cleanupHandle) @@ -327,8 +253,6 @@ func (f *Framework) AfterEach() { } } } - // Delete the federation namespace. - f.deleteFederationNs() } else { if TestContext.DeleteNamespace { Logf("Found DeleteNamespace=false, skipping namespace deletion!") @@ -340,7 +264,6 @@ func (f *Framework) AfterEach() { // Paranoia-- prevent reuse! f.Namespace = nil - f.FederationNamespace = nil f.ClientSet = nil f.namespacesToDelete = nil @@ -354,34 +277,12 @@ func (f *Framework) AfterEach() { } }() - if f.federated { - defer func() { - if f.FederationClientset_1_5 == nil { - Logf("Warning: framework is marked federated, but has no federation 1.4 clientset") - return - } - if err := f.FederationClientset_1_5.Federation().Clusters().DeleteCollection(nil, v1.ListOptions{}); err != nil { - Logf("Error: failed to delete Clusters: %+v", err) - } - }() - } - // Print events if the test failed. if CurrentGinkgoTestDescription().Failed && TestContext.DumpLogsOnFailure { // Pass both unversioned client and and versioned clientset, till we have removed all uses of the unversioned client. DumpAllNamespaceInfo(f.ClientSet, f.Namespace.Name) By(fmt.Sprintf("Dumping a list of prepulled images on each node")) - LogContainersInPodsWithLabels(f.ClientSet, api.NamespaceSystem, ImagePullerLabels, "image-puller", Logf) - if f.federated { - // Dump federation events in federation namespace. - DumpEventsInNamespace(func(opts v1.ListOptions, ns string) (*v1.EventList, error) { - return f.FederationClientset_1_5.Core().Events(ns).List(opts) - }, f.FederationNamespace.Name) - // Print logs of federation control plane pods (federation-apiserver and federation-controller-manager) - LogPodsWithLabels(f.ClientSet, "federation", map[string]string{"app": "federated-cluster"}, Logf) - // Print logs of kube-dns pod - LogPodsWithLabels(f.ClientSet, "kube-system", map[string]string{"k8s-app": "kube-dns"}, Logf) - } + LogContainersInPodsWithLabels(f.ClientSet, metav1.NamespaceSystem, ImagePullerLabels, "image-puller", Logf) } summaries := make([]TestDataSummary, 0) @@ -456,29 +357,6 @@ func (f *Framework) CreateNamespace(baseName string, labels map[string]string) ( return ns, err } -func (f *Framework) createFederationNamespace(baseName string) (*v1.Namespace, error) { - clientset := f.FederationClientset_1_5 - namespaceObj := &v1.Namespace{ - ObjectMeta: v1.ObjectMeta{ - GenerateName: fmt.Sprintf("e2e-tests-%v-", baseName), - }, - } - // Be robust about making the namespace creation call. - var got *v1.Namespace - if err := wait.PollImmediate(Poll, SingleCallTimeout, func() (bool, error) { - var err error - got, err = clientset.Core().Namespaces().Create(namespaceObj) - if err != nil { - Logf("Unexpected error while creating namespace: %v", err) - return false, nil - } - return true, nil - }); err != nil { - return nil, err - } - return got, nil -} - // WaitForPodTerminated waits for the pod to be terminated with the given reason. func (f *Framework) WaitForPodTerminated(podName, reason string) error { return waitForPodTerminatedInNamespace(f.ClientSet, podName, reason, f.Namespace.Name) @@ -526,7 +404,7 @@ func (f *Framework) WaitForAnEndpoint(serviceName string) error { for { // TODO: Endpoints client should take a field selector so we // don't have to list everything. - list, err := f.ClientSet.Core().Endpoints(f.Namespace.Name).List(v1.ListOptions{}) + list, err := f.ClientSet.Core().Endpoints(f.Namespace.Name).List(metav1.ListOptions{}) if err != nil { return err } @@ -541,7 +419,7 @@ func (f *Framework) WaitForAnEndpoint(serviceName string) error { } } - options := v1.ListOptions{ + options := metav1.ListOptions{ FieldSelector: fields.Set{"metadata.name": serviceName}.AsSelector().String(), ResourceVersion: rv, } @@ -640,7 +518,7 @@ func (f *Framework) CreateServiceForSimpleApp(contPort, svcPort int, appName str } Logf("Creating a service-for-%v for selecting app=%v-pod", appName, appName) service, err := f.ClientSet.Core().Services(f.Namespace.Name).Create(&v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "service-for-" + appName, Labels: map[string]string{ "app": appName + "-service", @@ -666,7 +544,7 @@ func (f *Framework) CreatePodsPerNodeForSimpleApp(appName string, podSpec func(n if i <= maxCount { Logf("%v/%v : Creating container with label app=%v-pod", i, maxCount, appName) _, err := f.ClientSet.Core().Pods(f.Namespace.Name).Create(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: fmt.Sprintf(appName+"-pod-%v", i), Labels: labels, }, @@ -709,7 +587,7 @@ type KubeConfig struct { Users []KubeUser `yaml:"users"` } -func (kc *KubeConfig) findUser(name string) *KubeUser { +func (kc *KubeConfig) FindUser(name string) *KubeUser { for _, user := range kc.Users { if user.Name == name { return &user @@ -718,7 +596,7 @@ func (kc *KubeConfig) findUser(name string) *KubeUser { return nil } -func (kc *KubeConfig) findCluster(name string) *KubeCluster { +func (kc *KubeConfig) FindCluster(name string) *KubeCluster { for _, cluster := range kc.Clusters { if cluster.Name == name { return &cluster @@ -727,55 +605,6 @@ func (kc *KubeConfig) findCluster(name string) *KubeCluster { return nil } -type E2EContext struct { - // Raw context name, - RawName string `yaml:"rawName"` - // A valid dns subdomain which can be used as the name of kubernetes resources. - Name string `yaml:"name"` - Cluster *KubeCluster `yaml:"cluster"` - User *KubeUser `yaml:"user"` -} - -func (f *Framework) GetUnderlyingFederatedContexts() []E2EContext { - if !f.federated { - Failf("getUnderlyingFederatedContexts called on non-federated framework") - } - - kubeconfig := KubeConfig{} - configBytes, err := ioutil.ReadFile(TestContext.KubeConfig) - ExpectNoError(err) - err = yaml.Unmarshal(configBytes, &kubeconfig) - ExpectNoError(err) - - e2eContexts := []E2EContext{} - for _, context := range kubeconfig.Contexts { - if strings.HasPrefix(context.Name, "federation") && context.Name != federatedKubeContext { - user := kubeconfig.findUser(context.Context.User) - if user == nil { - Failf("Could not find user for context %+v", context) - } - - cluster := kubeconfig.findCluster(context.Context.Cluster) - if cluster == nil { - Failf("Could not find cluster for context %+v", context) - } - - dnsSubdomainName, err := GetValidDNSSubdomainName(context.Name) - if err != nil { - Failf("Could not convert context name %s to a valid dns subdomain name, error: %s", context.Name, err) - } - e2eContexts = append(e2eContexts, E2EContext{ - RawName: context.Name, - Name: dnsSubdomainName, - Cluster: cluster, - User: user, - }) - } - } - - return e2eContexts -} - func kubectlExecWithRetry(namespace string, podName, containerName string, args ...string) ([]byte, []byte, error) { for numRetries := 0; numRetries < maxKubectlExecRetries; numRetries++ { if numRetries > 0 { @@ -899,10 +728,10 @@ func filterLabels(selectors map[string]string, cli clientset.Interface, ns strin // everything manually. if len(selectors) > 0 { selector = labels.SelectorFromSet(labels.Set(selectors)) - options := v1.ListOptions{LabelSelector: selector.String()} + options := metav1.ListOptions{LabelSelector: selector.String()} pl, err = cli.Core().Pods(ns).List(options) } else { - pl, err = cli.Core().Pods(ns).List(v1.ListOptions{}) + pl, err = cli.Core().Pods(ns).List(metav1.ListOptions{}) } return pl, err } diff --git a/vendor/k8s.io/kubernetes/test/e2e/framework/kubelet_stats.go b/vendor/k8s.io/kubernetes/test/e2e/framework/kubelet_stats.go index 25a1cfcb..04571ef8 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/framework/kubelet_stats.go +++ b/vendor/k8s.io/kubernetes/test/e2e/framework/kubelet_stats.go @@ -30,10 +30,10 @@ import ( cadvisorapi "github.com/google/cadvisor/info/v1" "github.com/prometheus/common/model" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" utilerrors "k8s.io/apimachinery/pkg/util/errors" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/pkg/kubelet/api/v1alpha1/stats" kubeletmetrics "k8s.io/kubernetes/pkg/kubelet/metrics" @@ -158,7 +158,7 @@ func NewRuntimeOperationMonitor(c clientset.Interface) *RuntimeOperationMonitor client: c, nodesRuntimeOps: make(map[string]NodeRuntimeOperationErrorRate), } - nodes, err := m.client.Core().Nodes().List(v1.ListOptions{}) + nodes, err := m.client.Core().Nodes().List(metav1.ListOptions{}) if err != nil { Failf("RuntimeOperationMonitor: unable to get list of nodes: %v", err) } @@ -701,7 +701,7 @@ func NewResourceMonitor(c clientset.Interface, containerNames []string, pollingI func (r *ResourceMonitor) Start() { // It should be OK to monitor unschedulable Nodes - nodes, err := r.client.Core().Nodes().List(v1.ListOptions{}) + nodes, err := r.client.Core().Nodes().List(metav1.ListOptions{}) if err != nil { Failf("ResourceMonitor: unable to get list of nodes: %v", err) } diff --git a/vendor/k8s.io/kubernetes/test/e2e/framework/metrics_util.go b/vendor/k8s.io/kubernetes/test/e2e/framework/metrics_util.go index 19f9ecdf..9b94bdcb 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/framework/metrics_util.go +++ b/vendor/k8s.io/kubernetes/test/e2e/framework/metrics_util.go @@ -28,9 +28,8 @@ import ( "strings" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/pkg/master/ports" "k8s.io/kubernetes/pkg/metrics" @@ -325,7 +324,7 @@ func getSchedulingLatency(c clientset.Interface) (SchedulingLatency, error) { result := SchedulingLatency{} // Check if master Node is registered - nodes, err := c.Core().Nodes().List(v1.ListOptions{}) + nodes, err := c.Core().Nodes().List(metav1.ListOptions{}) ExpectNoError(err) var data string @@ -342,7 +341,7 @@ func getSchedulingLatency(c clientset.Interface) (SchedulingLatency, error) { rawData, err := c.Core().RESTClient().Get(). Context(ctx). Prefix("proxy"). - Namespace(api.NamespaceSystem). + Namespace(metav1.NamespaceSystem). Resource("pods"). Name(fmt.Sprintf("kube-scheduler-%v:%v", TestContext.CloudConfig.MasterName, ports.SchedulerPort)). Suffix("metrics"). diff --git a/vendor/k8s.io/kubernetes/test/e2e/framework/networking_utils.go b/vendor/k8s.io/kubernetes/test/e2e/framework/networking_utils.go index 997de015..f11e04e8 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/framework/networking_utils.go +++ b/vendor/k8s.io/kubernetes/test/e2e/framework/networking_utils.go @@ -323,7 +323,7 @@ func (config *NetworkingTestConfig) createNetShellPodSpec(podName string, node s Kind: "Pod", APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String(), }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, Namespace: config.Namespace, }, @@ -367,7 +367,7 @@ func (config *NetworkingTestConfig) createTestPodSpec() *v1.Pod { Kind: "Pod", APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String(), }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: testPodName, Namespace: config.Namespace, }, @@ -397,7 +397,7 @@ func (config *NetworkingTestConfig) createTestPodSpec() *v1.Pod { func (config *NetworkingTestConfig) createNodePortService(selector map[string]string) { serviceSpec := &v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: nodePortServiceName, }, Spec: v1.ServiceSpec{ @@ -501,7 +501,7 @@ func (config *NetworkingTestConfig) setup(selector map[string]string) { func (config *NetworkingTestConfig) cleanup() { nsClient := config.getNamespacesClient() - nsList, err := nsClient.List(v1.ListOptions{}) + nsList, err := nsClient.List(metav1.ListOptions{}) if err == nil { for _, ns := range nsList.Items { if strings.Contains(ns.Name, config.f.BaseName) && ns.Name != config.Namespace { @@ -558,7 +558,7 @@ func (config *NetworkingTestConfig) createNetProxyPods(podName string, selector func (config *NetworkingTestConfig) DeleteNetProxyPod() { pod := config.EndpointPods[0] - config.getPodClient().Delete(pod.Name, v1.NewDeleteOptions(0)) + config.getPodClient().Delete(pod.Name, metav1.NewDeleteOptions(0)) config.EndpointPods = config.EndpointPods[1:] // wait for pod being deleted. err := WaitForPodToDisappear(config.f.ClientSet, config.Namespace, pod.Name, labels.Everything(), time.Second, wait.ForeverTestTimeout) diff --git a/vendor/k8s.io/kubernetes/test/e2e/framework/nodes_util.go b/vendor/k8s.io/kubernetes/test/e2e/framework/nodes_util.go index 554e4f88..272e3780 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/framework/nodes_util.go +++ b/vendor/k8s.io/kubernetes/test/e2e/framework/nodes_util.go @@ -23,10 +23,11 @@ import ( "strings" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/fields" ) // The following upgrade functions are passed into the framework below and used @@ -153,7 +154,7 @@ func CheckNodesReady(c clientset.Interface, nt time.Duration, expect int) ([]str // A rolling-update (GCE/GKE implementation of restart) can complete before the apiserver // knows about all of the nodes. Thus, we retry the list nodes call // until we get the expected number of nodes. - nodeList, errLast = c.Core().Nodes().List(v1.ListOptions{ + nodeList, errLast = c.Core().Nodes().List(metav1.ListOptions{ FieldSelector: fields.Set{"spec.unschedulable": "false"}.AsSelector().String()}) if errLast != nil { return false, nil diff --git a/vendor/k8s.io/kubernetes/test/e2e/framework/pods.go b/vendor/k8s.io/kubernetes/test/e2e/framework/pods.go index 5191c2ee..7907e63f 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/framework/pods.go +++ b/vendor/k8s.io/kubernetes/test/e2e/framework/pods.go @@ -113,7 +113,7 @@ func (c *PodClient) Update(name string, updateFn func(pod *v1.Pod)) { // DeleteSync deletes the pod and wait for the pod to disappear for `timeout`. If the pod doesn't // disappear before the timeout, it will fail the test. -func (c *PodClient) DeleteSync(name string, options *v1.DeleteOptions, timeout time.Duration) { +func (c *PodClient) DeleteSync(name string, options *metav1.DeleteOptions, timeout time.Duration) { err := c.Delete(name, options) if err != nil && !errors.IsNotFound(err) { Failf("Failed to delete pod %q: %v", name, err) diff --git a/vendor/k8s.io/kubernetes/test/e2e/framework/resource_usage_gatherer.go b/vendor/k8s.io/kubernetes/test/e2e/framework/resource_usage_gatherer.go index 135b26c6..96f4375c 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/framework/resource_usage_gatherer.go +++ b/vendor/k8s.io/kubernetes/test/e2e/framework/resource_usage_gatherer.go @@ -27,8 +27,8 @@ import ( "text/tabwriter" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" utilruntime "k8s.io/apimachinery/pkg/util/runtime" - "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/pkg/util/system" ) @@ -232,7 +232,7 @@ func NewResourceUsageGatherer(c clientset.Interface, options ResourceGathererOpt finished: false, }) } else { - pods, err := c.Core().Pods("kube-system").List(v1.ListOptions{}) + pods, err := c.Core().Pods("kube-system").List(metav1.ListOptions{}) if err != nil { Logf("Error while listing Pods: %v", err) return nil, err @@ -244,7 +244,7 @@ func NewResourceUsageGatherer(c clientset.Interface, options ResourceGathererOpt g.containerIDs = append(g.containerIDs, containerID) } } - nodeList, err := c.Core().Nodes().List(v1.ListOptions{}) + nodeList, err := c.Core().Nodes().List(metav1.ListOptions{}) if err != nil { Logf("Error while listing Nodes: %v", err) return nil, err diff --git a/vendor/k8s.io/kubernetes/test/e2e/framework/service_util.go b/vendor/k8s.io/kubernetes/test/e2e/framework/service_util.go index cb6eda4c..0bc030fa 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/framework/service_util.go +++ b/vendor/k8s.io/kubernetes/test/e2e/framework/service_util.go @@ -109,7 +109,7 @@ func NewServiceTestJig(client clientset.Interface, name string) *ServiceTestJig // as the jig and exposes the given port. func (j *ServiceTestJig) newServiceTemplate(namespace string, proto v1.Protocol, port int32) *v1.Service { service := &v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: namespace, Name: j.Name, Labels: j.Labels, @@ -487,7 +487,7 @@ func (j *ServiceTestJig) WaitForLoadBalancerDestroyOrFail(namespace, name string // name as the jig and runs the "netexec" container. func (j *ServiceTestJig) newRCTemplate(namespace string) *v1.ReplicationController { rc := &v1.ReplicationController{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: namespace, Name: j.Name, Labels: j.Labels, @@ -496,7 +496,7 @@ func (j *ServiceTestJig) newRCTemplate(namespace string) *v1.ReplicationControll Replicas: func(i int) *int32 { x := int32(i); return &x }(1), Selector: j.Labels, Template: &v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: j.Labels, }, Spec: v1.PodSpec{ @@ -552,7 +552,7 @@ func (j *ServiceTestJig) waitForPodsCreated(namespace string, replicas int) ([]s label := labels.SelectorFromSet(labels.Set(j.Labels)) Logf("Waiting up to %v for %d pods to be created", timeout, replicas) for start := time.Now(); time.Since(start) < timeout; time.Sleep(2 * time.Second) { - options := v1.ListOptions{LabelSelector: label.String()} + options := metav1.ListOptions{LabelSelector: label.String()} pods, err := j.Client.Core().Pods(namespace).List(options) if err != nil { return nil, err @@ -585,7 +585,7 @@ func (j *ServiceTestJig) waitForPodsReady(namespace string, pods []string) error // newNetexecPodSpec returns the pod spec of netexec pod func newNetexecPodSpec(podName string, httpPort, udpPort int32, hostNetwork bool) *v1.Pod { pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, }, Spec: v1.PodSpec{ @@ -632,7 +632,7 @@ func (j *ServiceTestJig) LaunchNetexecPodOnNode(f *Framework, nodeName, podName func newEchoServerPodSpec(podName string) *v1.Pod { port := 8080 pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, }, Spec: v1.PodSpec{ @@ -783,7 +783,7 @@ func NewServerTest(client clientset.Interface, namespace string, serviceName str // Build default config for a service (which can then be changed) func (t *ServiceTestFixture) BuildServiceSpec() *v1.Service { service := &v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: t.ServiceName, Namespace: t.Namespace, }, @@ -1001,7 +1001,7 @@ func ValidateEndpointsOrFail(c clientset.Interface, namespace, serviceName strin i++ } - if pods, err := c.Core().Pods(v1.NamespaceAll).List(v1.ListOptions{}); err == nil { + if pods, err := c.Core().Pods(metav1.NamespaceAll).List(metav1.ListOptions{}); err == nil { for _, pod := range pods.Items { Logf("Pod %s\t%s\t%s\t%s", pod.Namespace, pod.Name, pod.Spec.NodeName, pod.DeletionTimestamp) } @@ -1017,7 +1017,7 @@ func StartServeHostnameService(c clientset.Interface, internalClient internalcli By("creating service " + name + " in namespace " + ns) _, err := c.Core().Services(ns).Create(&v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Spec: v1.ServiceSpec{ diff --git a/vendor/k8s.io/kubernetes/test/e2e/framework/test_context.go b/vendor/k8s.io/kubernetes/test/e2e/framework/test_context.go index 8b0b6dff..ceddefcb 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/framework/test_context.go +++ b/vendor/k8s.io/kubernetes/test/e2e/framework/test_context.go @@ -23,8 +23,8 @@ import ( "github.com/onsi/ginkgo/config" "github.com/spf13/viper" + "k8s.io/client-go/tools/clientcmd" "k8s.io/kubernetes/pkg/apis/componentconfig" - "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" "k8s.io/kubernetes/pkg/cloudprovider" ) @@ -81,6 +81,8 @@ type TestContextType struct { FeatureGates string // Node e2e specific test context NodeTestContextType + // Federation e2e context + FederatedKubeContext string // Viper-only parameters. These will in time replace all flags. @@ -129,7 +131,6 @@ type CloudConfig struct { } var TestContext TestContextType -var federatedKubeContext string // Register flags common to all e2e test suites. func RegisterCommonFlags() { @@ -163,7 +164,7 @@ func RegisterClusterFlags() { flag.StringVar(&TestContext.KubeConfig, clientcmd.RecommendedConfigPathFlag, os.Getenv(clientcmd.RecommendedConfigPathEnvVar), "Path to kubeconfig containing embedded authinfo.") flag.StringVar(&TestContext.KubeContext, clientcmd.FlagContext, "", "kubeconfig context to use/override. If unset, will use value from 'current-context'") flag.StringVar(&TestContext.KubeAPIContentType, "kube-api-content-type", "application/vnd.kubernetes.protobuf", "ContentType used to communicate with apiserver") - flag.StringVar(&federatedKubeContext, "federated-kube-context", "e2e-federation", "kubeconfig context for federation.") + flag.StringVar(&TestContext.FederatedKubeContext, "federated-kube-context", "e2e-federation", "kubeconfig context for federation.") flag.StringVar(&TestContext.KubeVolumeDir, "volume-dir", "/var/lib/kubelet", "Path to the directory containing the kubelet volumes.") flag.StringVar(&TestContext.CertDir, "cert-dir", "", "Path to the directory containing the certs. Default is empty, which doesn't use certs.") diff --git a/vendor/k8s.io/kubernetes/test/e2e/framework/util.go b/vendor/k8s.io/kubernetes/test/e2e/framework/util.go index fc0e22d2..75b03a5c 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/framework/util.go +++ b/vendor/k8s.io/kubernetes/test/e2e/framework/util.go @@ -23,6 +23,7 @@ import ( "errors" "fmt" "io" + "io/ioutil" "math/rand" "net" "net/http" @@ -53,6 +54,7 @@ import ( apierrs "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" @@ -60,8 +62,9 @@ import ( "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apimachinery/pkg/watch" - federationapi "k8s.io/kubernetes/federation/apis/federation/v1beta1" - "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset" + restclient "k8s.io/client-go/rest" + "k8s.io/client-go/tools/clientcmd" + clientcmdapi "k8s.io/client-go/tools/clientcmd/api" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" apps "k8s.io/kubernetes/pkg/apis/apps/v1beta1" @@ -72,15 +75,11 @@ import ( "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" "k8s.io/kubernetes/pkg/client/conditions" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/typed/discovery" "k8s.io/kubernetes/pkg/client/typed/dynamic" - "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" - clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api" gcecloud "k8s.io/kubernetes/pkg/cloudprovider/providers/gce" "k8s.io/kubernetes/pkg/controller" deploymentutil "k8s.io/kubernetes/pkg/controller/deployment/util" - "k8s.io/kubernetes/pkg/fields" "k8s.io/kubernetes/pkg/kubectl" "k8s.io/kubernetes/pkg/kubelet/util/format" "k8s.io/kubernetes/pkg/master/ports" @@ -360,30 +359,13 @@ func SkipUnlessServerVersionGTE(v *utilversion.Version, c discovery.ServerVersio } } -// Detects whether the federation namespace exists in the underlying cluster -func SkipUnlessFederated(c clientset.Interface) { - federationNS := os.Getenv("FEDERATION_NAMESPACE") - if federationNS == "" { - federationNS = federationapi.FederationNamespaceSystem - } - - _, err := c.Core().Namespaces().Get(federationNS, metav1.GetOptions{}) - if err != nil { - if apierrs.IsNotFound(err) { - Skipf("Could not find federation namespace %s: skipping federated test", federationNS) - } else { - Failf("Unexpected error getting namespace: %v", err) - } - } -} - func SkipIfMissingResource(clientPool dynamic.ClientPool, gvr schema.GroupVersionResource, namespace string) { dynamicClient, err := clientPool.ClientForGroupVersionResource(gvr) if err != nil { Failf("Unexpected error getting dynamic client for %v: %v", gvr.GroupVersion(), err) } apiResource := metav1.APIResource{Name: gvr.Resource, Namespaced: true} - _, err = dynamicClient.Resource(&apiResource, namespace).List(&v1.ListOptions{}) + _, err = dynamicClient.Resource(&apiResource, namespace).List(&metav1.ListOptions{}) if err != nil { // not all resources support list, so we ignore those if apierrs.IsMethodNotSupported(err) || apierrs.IsNotFound(err) || apierrs.IsForbidden(err) { @@ -469,7 +451,7 @@ func WaitForPodsSuccess(c clientset.Interface, ns string, successPodLabels map[s start, badPods, desiredPods := time.Now(), []v1.Pod{}, 0 if wait.PollImmediate(30*time.Second, timeout, func() (bool, error) { - podList, err := c.Core().Pods(ns).List(v1.ListOptions{LabelSelector: successPodSelector.String()}) + podList, err := c.Core().Pods(ns).List(metav1.ListOptions{LabelSelector: successPodSelector.String()}) if err != nil { Logf("Error getting pods in namespace %q: %v", ns, err) return false, nil @@ -538,7 +520,7 @@ func WaitForPodsRunningReady(c clientset.Interface, ns string, minPods int32, ti // checked. replicas, replicaOk := int32(0), int32(0) - rcList, err := c.Core().ReplicationControllers(ns).List(v1.ListOptions{}) + rcList, err := c.Core().ReplicationControllers(ns).List(metav1.ListOptions{}) if err != nil { Logf("Error getting replication controllers in namespace '%s': %v", ns, err) return false, nil @@ -548,7 +530,7 @@ func WaitForPodsRunningReady(c clientset.Interface, ns string, minPods int32, ti replicaOk += rc.Status.ReadyReplicas } - rsList, err := c.Extensions().ReplicaSets(ns).List(v1.ListOptions{}) + rsList, err := c.Extensions().ReplicaSets(ns).List(metav1.ListOptions{}) if err != nil { Logf("Error getting replication sets in namespace %q: %v", ns, err) return false, nil @@ -558,7 +540,7 @@ func WaitForPodsRunningReady(c clientset.Interface, ns string, minPods int32, ti replicaOk += rs.Status.ReadyReplicas } - podList, err := c.Core().Pods(ns).List(v1.ListOptions{}) + podList, err := c.Core().Pods(ns).List(metav1.ListOptions{}) if err != nil { Logf("Error getting pods in namespace '%s': %v", ns, err) return false, nil @@ -631,7 +613,7 @@ func kubectlLogPod(c clientset.Interface, pod v1.Pod, containerNameSubstr string } func LogFailedContainers(c clientset.Interface, ns string, logFunc func(ftm string, args ...interface{})) { - podList, err := c.Core().Pods(ns).List(v1.ListOptions{}) + podList, err := c.Core().Pods(ns).List(metav1.ListOptions{}) if err != nil { logFunc("Error getting pods in namespace '%s': %v", ns, err) return @@ -645,7 +627,7 @@ func LogFailedContainers(c clientset.Interface, ns string, logFunc func(ftm stri } func LogPodsWithLabels(c clientset.Interface, ns string, match map[string]string, logFunc func(ftm string, args ...interface{})) { - podList, err := c.Core().Pods(ns).List(v1.ListOptions{LabelSelector: labels.SelectorFromSet(match).String()}) + podList, err := c.Core().Pods(ns).List(metav1.ListOptions{LabelSelector: labels.SelectorFromSet(match).String()}) if err != nil { logFunc("Error getting pods in namespace %q: %v", ns, err) return @@ -657,7 +639,7 @@ func LogPodsWithLabels(c clientset.Interface, ns string, match map[string]string } func LogContainersInPodsWithLabels(c clientset.Interface, ns string, match map[string]string, containerSubstr string, logFunc func(ftm string, args ...interface{})) { - podList, err := c.Core().Pods(ns).List(v1.ListOptions{LabelSelector: labels.SelectorFromSet(match).String()}) + podList, err := c.Core().Pods(ns).List(metav1.ListOptions{LabelSelector: labels.SelectorFromSet(match).String()}) if err != nil { Logf("Error getting pods in namespace %q: %v", ns, err) return @@ -672,7 +654,7 @@ func LogContainersInPodsWithLabels(c clientset.Interface, ns string, match map[s // Returns the list of deleted namespaces or an error. func DeleteNamespaces(c clientset.Interface, deleteFilter, skipFilter []string) ([]string, error) { By("Deleting namespaces") - nsList, err := c.Core().Namespaces().List(v1.ListOptions{}) + nsList, err := c.Core().Namespaces().List(metav1.ListOptions{}) Expect(err).NotTo(HaveOccurred()) var deleted []string var wg sync.WaitGroup @@ -719,7 +701,7 @@ func WaitForNamespacesDeleted(c clientset.Interface, namespaces []string, timeou //Now POLL until all namespaces have been eradicated. return wait.Poll(2*time.Second, timeout, func() (bool, error) { - nsList, err := c.Core().Namespaces().List(v1.ListOptions{}) + nsList, err := c.Core().Namespaces().List(metav1.ListOptions{}) if err != nil { return false, err } @@ -733,7 +715,7 @@ func WaitForNamespacesDeleted(c clientset.Interface, namespaces []string, timeou } func waitForServiceAccountInNamespace(c clientset.Interface, ns, serviceAccountName string, timeout time.Duration) error { - w, err := c.Core().ServiceAccounts(ns).Watch(v1.SingleObject(v1.ObjectMeta{Name: serviceAccountName})) + w, err := c.Core().ServiceAccounts(ns).Watch(metav1.SingleObject(metav1.ObjectMeta{Name: serviceAccountName})) if err != nil { return err } @@ -768,10 +750,10 @@ func WaitForPodCondition(c clientset.Interface, ns, podName, desc string, timeou // WaitForMatchPodsCondition finds match pods based on the input ListOptions. // waits and checks if all match pods are in the given podCondition -func WaitForMatchPodsCondition(c clientset.Interface, opts v1.ListOptions, desc string, timeout time.Duration, condition podCondition) error { +func WaitForMatchPodsCondition(c clientset.Interface, opts metav1.ListOptions, desc string, timeout time.Duration, condition podCondition) error { Logf("Waiting up to %v for matching pods' status to be %s", timeout, desc) for start := time.Now(); time.Since(start) < timeout; time.Sleep(Poll) { - pods, err := c.Core().Pods(v1.NamespaceAll).List(opts) + pods, err := c.Core().Pods(metav1.NamespaceAll).List(opts) if err != nil { return err } @@ -800,18 +782,6 @@ func WaitForDefaultServiceAccountInNamespace(c clientset.Interface, namespace st return waitForServiceAccountInNamespace(c, namespace, "default", ServiceAccountProvisionTimeout) } -// WaitForFederationApiserverReady waits for the federation apiserver to be ready. -// It tests the readiness by sending a GET request and expecting a non error response. -func WaitForFederationApiserverReady(c *federation_clientset.Clientset) error { - return wait.PollImmediate(time.Second, 1*time.Minute, func() (bool, error) { - _, err := c.Federation().Clusters().List(v1.ListOptions{}) - if err != nil { - return false, nil - } - return true, nil - }) -} - // WaitForPersistentVolumePhase waits for a PersistentVolume to be in a specific phase or until timeout occurs, whichever comes first. func WaitForPersistentVolumePhase(phase v1.PersistentVolumePhase, c clientset.Interface, pvName string, Poll, timeout time.Duration) error { Logf("Waiting up to %v for PersistentVolume %s to have phase %s", timeout, pvName, phase) @@ -881,7 +851,7 @@ func CreateTestingNS(baseName string, c clientset.Interface, labels map[string]s labels["e2e-run"] = string(RunId) namespaceObj := &v1.Namespace{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ GenerateName: fmt.Sprintf("e2e-tests-%v-", baseName), Namespace: "", Labels: labels, @@ -931,7 +901,7 @@ func CheckTestingNSDeletedExcept(c clientset.Interface, skip string) error { Logf("Waiting for terminating namespaces to be deleted...") for start := time.Now(); time.Since(start) < timeout; time.Sleep(15 * time.Second) { - namespaces, err := c.Core().Namespaces().List(v1.ListOptions{}) + namespaces, err := c.Core().Namespaces().List(metav1.ListOptions{}) if err != nil { Logf("Listing namespaces failed: %v", err) continue @@ -1014,7 +984,7 @@ func deleteNS(c clientset.Interface, clientPool dynamic.ClientPool, namespace st // logNamespaces logs the number of namespaces by phase // namespace is the namespace the test was operating against that failed to delete so it can be grepped in logs func logNamespaces(c clientset.Interface, namespace string) { - namespaceList, err := c.Core().Namespaces().List(v1.ListOptions{}) + namespaceList, err := c.Core().Namespaces().List(metav1.ListOptions{}) if err != nil { Logf("namespace: %v, unable to list namespaces: %v", namespace, err) return @@ -1049,7 +1019,7 @@ func logNamespace(c clientset.Interface, namespace string) { // countRemainingPods queries the server to count number of remaining pods, and number of pods that had a missing deletion timestamp. func countRemainingPods(c clientset.Interface, namespace string) (int, int, error) { // check for remaining pods - pods, err := c.Core().Pods(namespace).List(v1.ListOptions{}) + pods, err := c.Core().Pods(namespace).List(metav1.ListOptions{}) if err != nil { return 0, 0, err } @@ -1112,7 +1082,7 @@ func hasRemainingContent(c clientset.Interface, clientPool dynamic.ClientPool, n Logf("namespace: %s, resource: %s, ignored listing per whitelist", namespace, apiResource.Name) continue } - obj, err := dynamicClient.Resource(&apiResource, namespace).List(&v1.ListOptions{}) + obj, err := dynamicClient.Resource(&apiResource, namespace).List(&metav1.ListOptions{}) if err != nil { // not all resources support list, so we ignore those if apierrs.IsMethodNotSupported(err) || apierrs.IsNotFound(err) || apierrs.IsForbidden(err) { @@ -1261,7 +1231,7 @@ func waitForPodRunningInNamespaceSlow(c clientset.Interface, podName, namespace, } func waitTimeoutForPodRunningInNamespace(c clientset.Interface, podName, namespace, resourceVersion string, timeout time.Duration) error { - w, err := c.Core().Pods(namespace).Watch(v1.SingleObject(v1.ObjectMeta{Name: podName, ResourceVersion: resourceVersion})) + w, err := c.Core().Pods(namespace).Watch(metav1.SingleObject(metav1.ObjectMeta{Name: podName, ResourceVersion: resourceVersion})) if err != nil { return err } @@ -1276,7 +1246,7 @@ func WaitForPodNoLongerRunningInNamespace(c clientset.Interface, podName, namesp } func WaitTimeoutForPodNoLongerRunningInNamespace(c clientset.Interface, podName, namespace, resourceVersion string, timeout time.Duration) error { - w, err := c.Core().Pods(namespace).Watch(v1.SingleObject(v1.ObjectMeta{Name: podName, ResourceVersion: resourceVersion})) + w, err := c.Core().Pods(namespace).Watch(metav1.SingleObject(metav1.ObjectMeta{Name: podName, ResourceVersion: resourceVersion})) if err != nil { return err } @@ -1285,7 +1255,7 @@ func WaitTimeoutForPodNoLongerRunningInNamespace(c clientset.Interface, podName, } func waitTimeoutForPodReadyInNamespace(c clientset.Interface, podName, namespace, resourceVersion string, timeout time.Duration) error { - w, err := c.Core().Pods(namespace).Watch(v1.SingleObject(v1.ObjectMeta{Name: podName, ResourceVersion: resourceVersion})) + w, err := c.Core().Pods(namespace).Watch(metav1.SingleObject(metav1.ObjectMeta{Name: podName, ResourceVersion: resourceVersion})) if err != nil { return err } @@ -1297,7 +1267,7 @@ func waitTimeoutForPodReadyInNamespace(c clientset.Interface, podName, namespace // The resourceVersion is used when Watching object changes, it tells since when we care // about changes to the pod. func WaitForPodNotPending(c clientset.Interface, ns, podName, resourceVersion string) error { - w, err := c.Core().Pods(ns).Watch(v1.SingleObject(v1.ObjectMeta{Name: podName, ResourceVersion: resourceVersion})) + w, err := c.Core().Pods(ns).Watch(metav1.SingleObject(metav1.ObjectMeta{Name: podName, ResourceVersion: resourceVersion})) if err != nil { return err } @@ -1356,7 +1326,7 @@ func waitForRCPodOnNode(c clientset.Interface, ns, rcName, node string) (*v1.Pod var p *v1.Pod = nil err := wait.PollImmediate(10*time.Second, 5*time.Minute, func() (bool, error) { Logf("Waiting for pod %s to appear on node %s", rcName, node) - options := v1.ListOptions{LabelSelector: label.String()} + options := metav1.ListOptions{LabelSelector: label.String()} pods, err := c.Core().Pods(ns).List(options) if err != nil { return false, err @@ -1375,7 +1345,7 @@ func waitForRCPodOnNode(c clientset.Interface, ns, rcName, node string) (*v1.Pod // WaitForRCToStabilize waits till the RC has a matching generation/replica count between spec and status. func WaitForRCToStabilize(c clientset.Interface, ns, name string, timeout time.Duration) error { - options := v1.ListOptions{FieldSelector: fields.Set{ + options := metav1.ListOptions{FieldSelector: fields.Set{ "metadata.name": name, "metadata.namespace": ns, }.AsSelector().String()} @@ -1406,7 +1376,7 @@ func WaitForRCToStabilize(c clientset.Interface, ns, name string, timeout time.D func WaitForPodToDisappear(c clientset.Interface, ns, podName string, label labels.Selector, interval, timeout time.Duration) error { return wait.PollImmediate(interval, timeout, func() (bool, error) { Logf("Waiting for pod %s to disappear", podName) - options := v1.ListOptions{LabelSelector: label.String()} + options := metav1.ListOptions{LabelSelector: label.String()} pods, err := c.Core().Pods(ns).List(options) if err != nil { return false, err @@ -1470,7 +1440,7 @@ func WaitForService(c clientset.Interface, namespace, name string, exist bool, i func WaitForServiceEndpointsNum(c clientset.Interface, namespace, serviceName string, expectNum int, interval, timeout time.Duration) error { return wait.Poll(interval, timeout, func() (bool, error) { Logf("Waiting for amount of service:%s endpoints to be %d", serviceName, expectNum) - list, err := c.Core().Endpoints(namespace).List(v1.ListOptions{}) + list, err := c.Core().Endpoints(namespace).List(metav1.ListOptions{}) if err != nil { return false, err } @@ -1544,7 +1514,7 @@ func PodProxyResponseChecker(c clientset.Interface, ns string, label labels.Sele // reply with their own pod name. func (r podProxyResponseChecker) CheckAllResponses() (done bool, err error) { successes := 0 - options := v1.ListOptions{LabelSelector: r.label.String()} + options := metav1.ListOptions{LabelSelector: r.label.String()} currentPods, err := r.c.Core().Pods(r.ns).List(options) Expect(err).NotTo(HaveOccurred()) for i, pod := range r.pods.Items { @@ -1681,7 +1651,7 @@ func PodsCreated(c clientset.Interface, ns, name string, replicas int32) (*v1.Po func PodsCreatedByLabel(c clientset.Interface, ns, name string, replicas int32, label labels.Selector) (*v1.PodList, error) { timeout := 2 * time.Minute for start := time.Now(); time.Since(start) < timeout; time.Sleep(5 * time.Second) { - options := v1.ListOptions{LabelSelector: label.String()} + options := metav1.ListOptions{LabelSelector: label.String()} // List the pods, making sure we observe all the replicas. pods, err := c.Core().Pods(ns).List(options) @@ -1781,7 +1751,7 @@ func ServiceResponding(c clientset.Interface, ns, name string) error { }) } -func restclientConfig(kubeContext string) (*clientcmdapi.Config, error) { +func RestclientConfig(kubeContext string) (*clientcmdapi.Config, error) { Logf(">>> kubeConfig: %s\n", TestContext.KubeConfig) if TestContext.KubeConfig == "" { return nil, fmt.Errorf("KubeConfig must be specified to load client config") @@ -1804,43 +1774,13 @@ func LoadConfig() (*restclient.Config, error) { // This is a node e2e test, apply the node e2e configuration return &restclient.Config{Host: TestContext.Host}, nil } - c, err := restclientConfig(TestContext.KubeContext) + c, err := RestclientConfig(TestContext.KubeContext) if err != nil { return nil, err } return clientcmd.NewDefaultClientConfig(*c, &clientcmd.ConfigOverrides{ClusterInfo: clientcmdapi.Cluster{Server: TestContext.Host}}).ClientConfig() } - -func LoadFederatedConfig(overrides *clientcmd.ConfigOverrides) (*restclient.Config, error) { - c, err := restclientConfig(federatedKubeContext) - if err != nil { - return nil, fmt.Errorf("error creating federation client config: %v", err.Error()) - } - cfg, err := clientcmd.NewDefaultClientConfig(*c, overrides).ClientConfig() - if cfg != nil { - //TODO(colhom): this is only here because https://github.com/kubernetes/kubernetes/issues/25422 - cfg.NegotiatedSerializer = api.Codecs - } - if err != nil { - return cfg, fmt.Errorf("error creating federation client config: %v", err.Error()) - } - return cfg, nil -} - -func LoadFederationClientset_1_5() (*federation_clientset.Clientset, error) { - config, err := LoadFederatedConfig(&clientcmd.ConfigOverrides{}) - if err != nil { - return nil, err - } - - c, err := federation_clientset.NewForConfig(config) - if err != nil { - return nil, fmt.Errorf("error creating federation clientset: %v", err.Error()) - } - return c, nil -} - func LoadInternalClientset() (*internalclientset.Clientset, error) { config, err := LoadConfig() if err != nil { @@ -2176,7 +2116,7 @@ func (f *Framework) MatchContainerOutput( createdPod := podClient.Create(pod) defer func() { By("delete the pod") - podClient.DeleteSync(createdPod.Name, &v1.DeleteOptions{}, podNoLongerRunningTimeout) + podClient.DeleteSync(createdPod.Name, &metav1.DeleteOptions{}, podNoLongerRunningTimeout) }() // Wait for client pod to complete. @@ -2235,11 +2175,11 @@ func RunRC(config testutils.RCConfig) error { return testutils.RunRC(config) } -type EventsLister func(opts v1.ListOptions, ns string) (*v1.EventList, error) +type EventsLister func(opts metav1.ListOptions, ns string) (*v1.EventList, error) func DumpEventsInNamespace(eventsLister EventsLister, namespace string) { By(fmt.Sprintf("Collecting events from namespace %q.", namespace)) - events, err := eventsLister(v1.ListOptions{}, namespace) + events, err := eventsLister(metav1.ListOptions{}, namespace) Expect(err).NotTo(HaveOccurred()) By(fmt.Sprintf("Found %d events.", len(events.Items))) @@ -2257,7 +2197,7 @@ func DumpEventsInNamespace(eventsLister EventsLister, namespace string) { } func DumpAllNamespaceInfo(c clientset.Interface, namespace string) { - DumpEventsInNamespace(func(opts v1.ListOptions, ns string) (*v1.EventList, error) { + DumpEventsInNamespace(func(opts metav1.ListOptions, ns string) (*v1.EventList, error) { return c.Core().Events(ns).List(opts) }, namespace) @@ -2266,7 +2206,7 @@ func DumpAllNamespaceInfo(c clientset.Interface, namespace string) { // 2. there are so many of them that working with them are mostly impossible // So we dump them only if the cluster is relatively small. maxNodesForDump := 20 - if nodes, err := c.Core().Nodes().List(v1.ListOptions{}); err == nil { + if nodes, err := c.Core().Nodes().List(metav1.ListOptions{}); err == nil { if len(nodes.Items) <= maxNodesForDump { dumpAllPodInfo(c) dumpAllNodeInfo(c) @@ -2292,7 +2232,7 @@ func (o byFirstTimestamp) Less(i, j int) bool { } func dumpAllPodInfo(c clientset.Interface) { - pods, err := c.Core().Pods("").List(v1.ListOptions{}) + pods, err := c.Core().Pods("").List(metav1.ListOptions{}) if err != nil { Logf("unable to fetch pod debug info: %v", err) } @@ -2301,7 +2241,7 @@ func dumpAllPodInfo(c clientset.Interface) { func dumpAllNodeInfo(c clientset.Interface) { // It should be OK to list unschedulable Nodes here. - nodes, err := c.Core().Nodes().List(v1.ListOptions{}) + nodes, err := c.Core().Nodes().List(metav1.ListOptions{}) if err != nil { Logf("unable to fetch node list: %v", err) return @@ -2356,11 +2296,11 @@ func getNodeEvents(c clientset.Interface, nodeName string) []v1.Event { selector := fields.Set{ "involvedObject.kind": "Node", "involvedObject.name": nodeName, - "involvedObject.namespace": v1.NamespaceAll, + "involvedObject.namespace": metav1.NamespaceAll, "source": "kubelet", }.AsSelector().String() - options := v1.ListOptions{FieldSelector: selector} - events, err := c.Core().Events(api.NamespaceSystem).List(options) + options := metav1.ListOptions{FieldSelector: selector} + events, err := c.Core().Events(metav1.NamespaceSystem).List(options) if err != nil { Logf("Unexpected error retrieving node events %v", err) return []v1.Event{} @@ -2373,7 +2313,7 @@ func waitListSchedulableNodesOrDie(c clientset.Interface) *v1.NodeList { var nodes *v1.NodeList var err error if wait.PollImmediate(Poll, SingleCallTimeout, func() (bool, error) { - nodes, err = c.Core().Nodes().List(v1.ListOptions{FieldSelector: fields.Set{ + nodes, err = c.Core().Nodes().List(metav1.ListOptions{FieldSelector: fields.Set{ "spec.unschedulable": "false", }.AsSelector().String()}) return err == nil, nil @@ -2401,7 +2341,7 @@ func isNodeUntainted(node *v1.Node) bool { Kind: "Pod", APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String(), }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "fake-not-scheduled", Namespace: "fake-not-scheduled", }, @@ -2446,7 +2386,7 @@ func WaitForAllNodesSchedulable(c clientset.Interface, timeout time.Duration) er return wait.PollImmediate(30*time.Second, timeout, func() (bool, error) { attempt++ notSchedulable = nil - opts := v1.ListOptions{ + opts := metav1.ListOptions{ ResourceVersion: "0", FieldSelector: fields.Set{"spec.unschedulable": "false"}.AsSelector().String(), } @@ -2736,7 +2676,7 @@ func WaitForPodsWithLabelScheduled(c clientset.Interface, ns string, label label // Wait up to PodListTimeout for getting pods with certain label func WaitForPodsWithLabel(c clientset.Interface, ns string, label labels.Selector) (pods *v1.PodList, err error) { for t := time.Now(); time.Since(t) < PodListTimeout; time.Sleep(Poll) { - options := v1.ListOptions{LabelSelector: label.String()} + options := metav1.ListOptions{LabelSelector: label.String()} pods, err = c.Core().Pods(ns).List(options) Expect(err).NotTo(HaveOccurred()) if len(pods.Items) > 0 { @@ -2792,7 +2732,7 @@ func getRuntimeObjectForKind(c clientset.Interface, kind schema.GroupKind, ns, n } } -func deleteResource(c clientset.Interface, kind schema.GroupKind, ns, name string, deleteOption *v1.DeleteOptions) error { +func deleteResource(c clientset.Interface, kind schema.GroupKind, ns, name string, deleteOption *metav1.DeleteOptions) error { switch kind { case api.Kind("ReplicationController"): return c.Core().ReplicationControllers(ns).Delete(name, deleteOption) @@ -2944,7 +2884,7 @@ func DeleteResourceAndWaitForGC(c clientset.Interface, kind schema.GroupKind, ns defer ps.Stop() startTime := time.Now() falseVar := false - deleteOption := &v1.DeleteOptions{OrphanDependents: &falseVar} + deleteOption := &metav1.DeleteOptions{OrphanDependents: &falseVar} err = deleteResource(c, kind, ns, name, deleteOption) if err != nil && apierrs.IsNotFound(err) { Logf("%v %s was already deleted: %v", kind, name, err) @@ -3072,7 +3012,7 @@ func waitForReplicaSetPodsGone(c clientset.Interface, rs *extensions.ReplicaSet) return wait.PollImmediate(Poll, 2*time.Minute, func() (bool, error) { selector, err := metav1.LabelSelectorAsSelector(rs.Spec.Selector) ExpectNoError(err) - options := v1.ListOptions{LabelSelector: selector.String()} + options := metav1.ListOptions{LabelSelector: selector.String()} if pods, err := c.Core().Pods(rs.Namespace).List(options); err == nil && len(pods.Items) == 0 { return true, nil } @@ -3090,7 +3030,7 @@ func WaitForReadyReplicaSet(c clientset.Interface, ns, name string) error { if err != nil { return err } - options := v1.ListOptions{LabelSelector: selector.String()} + options := metav1.ListOptions{LabelSelector: selector.String()} podList, err := c.Core().Pods(rs.Namespace).List(options) if err != nil { return err @@ -3316,7 +3256,7 @@ func WatchRecreateDeployment(c clientset.Interface, d *extensions.Deployment) er return fmt.Errorf("deployment %q does not use a Recreate strategy: %s", d.Name, d.Spec.Strategy.Type) } - w, err := c.Extensions().Deployments(d.Namespace).Watch(v1.SingleObject(v1.ObjectMeta{Name: d.Name, ResourceVersion: d.ResourceVersion})) + w, err := c.Extensions().Deployments(d.Namespace).Watch(metav1.SingleObject(metav1.ObjectMeta{Name: d.Name, ResourceVersion: d.ResourceVersion})) if err != nil { return err } @@ -3440,7 +3380,7 @@ func CheckNewRSAnnotations(c clientset.Interface, ns, deploymentName string, exp func WaitForPodsReady(c clientset.Interface, ns, name string, minReadySeconds int) error { label := labels.SelectorFromSet(labels.Set(map[string]string{"name": name})) - options := v1.ListOptions{LabelSelector: label.String()} + options := metav1.ListOptions{LabelSelector: label.String()} return wait.Poll(Poll, 5*time.Minute, func() (bool, error) { pods, err := c.Core().Pods(ns).List(options) if err != nil { @@ -3510,7 +3450,7 @@ func WaitForDeploymentWithCondition(c clientset.Interface, ns, deploymentName, r func logPodsOfDeployment(c clientset.Interface, deployment *extensions.Deployment) { minReadySeconds := deployment.Spec.MinReadySeconds podList, err := deploymentutil.ListPods(deployment, - func(namespace string, options v1.ListOptions) (*v1.PodList, error) { + func(namespace string, options metav1.ListOptions) (*v1.PodList, error) { return c.Core().Pods(namespace).List(options) }) if err != nil { @@ -3804,7 +3744,7 @@ func IssueSSHCommand(cmd, provider string, node *v1.Node) error { // NewHostExecPodSpec returns the pod spec of hostexec pod func NewHostExecPodSpec(ns, name string) *v1.Pod { pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: ns, }, @@ -3852,7 +3792,7 @@ func LaunchHostExecPod(client clientset.Interface, ns, name string) *v1.Pod { func newExecPodSpec(ns, generateName string) *v1.Pod { immediate := int64(0) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ GenerateName: generateName, Namespace: ns, }, @@ -3895,7 +3835,7 @@ func CreateExecPodOrFail(client clientset.Interface, ns, generateName string, tw func CreatePodOrFail(c clientset.Interface, ns, name string, labels map[string]string, containerPorts []v1.ContainerPort) { By(fmt.Sprintf("Creating pod %s in namespace %s", name, ns)) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Labels: labels, }, @@ -4098,7 +4038,7 @@ func AllNodesReady(c clientset.Interface, timeout time.Duration) error { err := wait.PollImmediate(Poll, timeout, func() (bool, error) { notReady = nil // It should be OK to list unschedulable Nodes here. - nodes, err := c.Core().Nodes().List(v1.ListOptions{}) + nodes, err := c.Core().Nodes().List(metav1.ListOptions{}) if err != nil { return false, err } @@ -4144,7 +4084,7 @@ func WaitForAllNodesHealthy(c clientset.Interface, timeout time.Duration) error err := wait.PollImmediate(Poll, timeout, func() (bool, error) { notReady = nil // It should be OK to list unschedulable Nodes here. - nodes, err := c.Core().Nodes().List(v1.ListOptions{ResourceVersion: "0"}) + nodes, err := c.Core().Nodes().List(metav1.ListOptions{ResourceVersion: "0"}) if err != nil { return false, err } @@ -4153,14 +4093,14 @@ func WaitForAllNodesHealthy(c clientset.Interface, timeout time.Duration) error notReady = append(notReady, node) } } - pods, err := c.Core().Pods(v1.NamespaceAll).List(v1.ListOptions{ResourceVersion: "0"}) + pods, err := c.Core().Pods(metav1.NamespaceAll).List(metav1.ListOptions{ResourceVersion: "0"}) if err != nil { return false, err } systemPodsPerNode := make(map[string][]string) for _, pod := range pods.Items { - if pod.Namespace == api.NamespaceSystem && pod.Status.Phase == v1.PodRunning { + if pod.Namespace == metav1.NamespaceSystem && pod.Status.Phase == v1.PodRunning { if pod.Spec.NodeName != "" { systemPodsPerNode[pod.Spec.NodeName] = append(systemPodsPerNode[pod.Spec.NodeName], pod.Name) } @@ -4318,7 +4258,7 @@ func WaitForApiserverUp(c clientset.Interface) error { // By cluster size we mean number of Nodes excluding Master Node. func WaitForClusterSize(c clientset.Interface, size int, timeout time.Duration) error { for start := time.Now(); time.Since(start) < timeout; time.Sleep(20 * time.Second) { - nodes, err := c.Core().Nodes().List(v1.ListOptions{FieldSelector: fields.Set{ + nodes, err := c.Core().Nodes().List(metav1.ListOptions{FieldSelector: fields.Set{ "spec.unschedulable": "false", }.AsSelector().String()}) if err != nil { @@ -4349,7 +4289,7 @@ func GenerateMasterRegexp(prefix string) string { // waitForMasters waits until the cluster has the desired number of ready masters in it. func WaitForMasters(masterPrefix string, c clientset.Interface, size int, timeout time.Duration) error { for start := time.Now(); time.Since(start) < timeout; time.Sleep(20 * time.Second) { - nodes, err := c.Core().Nodes().List(v1.ListOptions{}) + nodes, err := c.Core().Nodes().List(metav1.ListOptions{}) if err != nil { Logf("Failed to list nodes: %v", err) continue @@ -4560,7 +4500,7 @@ func GetNodePortURL(client clientset.Interface, ns, name string, svcPort int) (s // kube-proxy NodePorts won't work. var nodes *v1.NodeList if wait.PollImmediate(Poll, SingleCallTimeout, func() (bool, error) { - nodes, err = client.Core().Nodes().List(v1.ListOptions{FieldSelector: fields.Set{ + nodes, err = client.Core().Nodes().List(metav1.ListOptions{FieldSelector: fields.Set{ "spec.unschedulable": "false", }.AsSelector().String()}) return err == nil, nil @@ -4585,7 +4525,7 @@ func GetNodePortURL(client clientset.Interface, ns, name string, svcPort int) (s // ScaleRCByLabels scales an RC via ns/label lookup. If replicas == 0 it waits till // none are running, otherwise it does what a synchronous scale operation would do. func ScaleRCByLabels(clientset clientset.Interface, internalClientset internalclientset.Interface, ns string, l map[string]string, replicas uint) error { - listOpts := v1.ListOptions{LabelSelector: labels.SelectorFromSet(labels.Set(l)).String()} + listOpts := metav1.ListOptions{LabelSelector: labels.SelectorFromSet(labels.Set(l)).String()} rcs, err := clientset.Core().ReplicationControllers(ns).List(listOpts) if err != nil { return err @@ -4847,7 +4787,7 @@ func LaunchWebserverPod(f *Framework, podName, nodeName string) (ip string) { containerName := fmt.Sprintf("%s-container", podName) port := 8080 pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, }, Spec: v1.PodSpec{ @@ -4880,7 +4820,7 @@ func LaunchWebserverPod(f *Framework, podName, nodeName string) (ip string) { func CheckConnectivityToHost(f *Framework, nodeName, podName, host string, timeout int) error { contName := fmt.Sprintf("%s-container", podName) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, }, Spec: v1.PodSpec{ @@ -4944,7 +4884,7 @@ func UpdatePodWithRetries(client clientset.Interface, ns, name string, update fu } func GetPodsInNamespace(c clientset.Interface, ns string, ignoreLabels map[string]string) ([]*v1.Pod, error) { - pods, err := c.Core().Pods(ns).List(v1.ListOptions{}) + pods, err := c.Core().Pods(ns).List(metav1.ListOptions{}) if err != nil { return []*v1.Pod{}, err } @@ -5033,7 +4973,7 @@ func WaitForStableCluster(c clientset.Interface, masterNodes sets.String) int { timeout := 10 * time.Minute startTime := time.Now() - allPods, err := c.Core().Pods(v1.NamespaceAll).List(v1.ListOptions{}) + allPods, err := c.Core().Pods(metav1.NamespaceAll).List(metav1.ListOptions{}) ExpectNoError(err) // API server returns also Pods that succeeded. We need to filter them out. currentPods := make([]v1.Pod, 0, len(allPods.Items)) @@ -5048,7 +4988,7 @@ func WaitForStableCluster(c clientset.Interface, masterNodes sets.String) int { for len(currentlyNotScheduledPods) != 0 { time.Sleep(2 * time.Second) - allPods, err := c.Core().Pods(v1.NamespaceAll).List(v1.ListOptions{}) + allPods, err := c.Core().Pods(metav1.NamespaceAll).List(metav1.ListOptions{}) ExpectNoError(err) scheduledPods, currentlyNotScheduledPods = GetPodsScheduled(masterNodes, allPods) @@ -5064,7 +5004,7 @@ func WaitForStableCluster(c clientset.Interface, masterNodes sets.String) int { func GetMasterAndWorkerNodesOrDie(c clientset.Interface) (sets.String, *v1.NodeList) { nodes := &v1.NodeList{} masters := sets.NewString() - all, _ := c.Core().Nodes().List(v1.ListOptions{}) + all, _ := c.Core().Nodes().List(metav1.ListOptions{}) for _, n := range all.Items { if system.IsMasterNode(n.Name) { masters.Insert(n.Name) @@ -5076,7 +5016,7 @@ func GetMasterAndWorkerNodesOrDie(c clientset.Interface) (sets.String, *v1.NodeL } func ListNamespaceEvents(c clientset.Interface, ns string) error { - ls, err := c.Core().Events(ns).List(v1.ListOptions{}) + ls, err := c.Core().Events(ns).List(metav1.ListOptions{}) if err != nil { return err } @@ -5197,7 +5137,7 @@ func getMaster(c clientset.Interface) Address { master := Address{} // Populate the internal IP. - eps, err := c.Core().Endpoints(v1.NamespaceDefault).Get("kubernetes", metav1.GetOptions{}) + eps, err := c.Core().Endpoints(metav1.NamespaceDefault).Get("kubernetes", metav1.GetOptions{}) if err != nil { Failf("Failed to get kubernetes endpoints: %v", err) } @@ -5280,7 +5220,7 @@ func RcByNameContainer(name string, replicas int32, image string, labels map[str Kind: "ReplicationController", APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String(), }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Spec: v1.ReplicationControllerSpec{ @@ -5289,7 +5229,7 @@ func RcByNameContainer(name string, replicas int32, image string, labels map[str "name": name, }, Template: &v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: labels, }, Spec: v1.PodSpec{ @@ -5300,3 +5240,54 @@ func RcByNameContainer(name string, replicas int32, image string, labels map[str }, } } + +// SimpleGET executes a get on the given url, returns error if non-200 returned. +func SimpleGET(c *http.Client, url, host string) (string, error) { + req, err := http.NewRequest("GET", url, nil) + if err != nil { + return "", err + } + req.Host = host + res, err := c.Do(req) + if err != nil { + return "", err + } + defer res.Body.Close() + rawBody, err := ioutil.ReadAll(res.Body) + if err != nil { + return "", err + } + body := string(rawBody) + if res.StatusCode != http.StatusOK { + err = fmt.Errorf( + "GET returned http error %v", res.StatusCode) + } + return body, err +} + +// PollURL polls till the url responds with a healthy http code. If +// expectUnreachable is true, it breaks on first non-healthy http code instead. +func PollURL(route, host string, timeout time.Duration, interval time.Duration, httpClient *http.Client, expectUnreachable bool) error { + var lastBody string + pollErr := wait.PollImmediate(interval, timeout, func() (bool, error) { + var err error + lastBody, err = SimpleGET(httpClient, route, host) + if err != nil { + Logf("host %v path %v: %v unreachable", host, route, err) + return expectUnreachable, nil + } + return !expectUnreachable, nil + }) + if pollErr != nil { + return fmt.Errorf("Failed to execute a successful GET within %v, Last response body for %v, host %v:\n%v\n\n%v\n", + timeout, route, host, lastBody, pollErr) + } + return nil +} + +func DescribeIng(ns string) { + Logf("\nOutput of kubectl describe ing:\n") + desc, _ := RunKubectl( + "describe", "ing", fmt.Sprintf("--namespace=%v", ns)) + Logf(desc) +} diff --git a/vendor/k8s.io/kubernetes/test/e2e/garbage_collector.go b/vendor/k8s.io/kubernetes/test/e2e/garbage_collector.go index 102075db..a9d011c3 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/garbage_collector.go +++ b/vendor/k8s.io/kubernetes/test/e2e/garbage_collector.go @@ -32,20 +32,20 @@ import ( . "github.com/onsi/ginkgo" ) -func getOrphanOptions() *v1.DeleteOptions { +func getOrphanOptions() *metav1.DeleteOptions { var trueVar = true - return &v1.DeleteOptions{OrphanDependents: &trueVar} + return &metav1.DeleteOptions{OrphanDependents: &trueVar} } -func getNonOrphanOptions() *v1.DeleteOptions { +func getNonOrphanOptions() *metav1.DeleteOptions { var falseVar = false - return &v1.DeleteOptions{OrphanDependents: &falseVar} + return &metav1.DeleteOptions{OrphanDependents: &falseVar} } var zero = int64(0) var deploymentLabels = map[string]string{"app": "gc-test"} var podTemplateSpec = v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: deploymentLabels, }, Spec: v1.PodSpec{ @@ -62,7 +62,7 @@ var podTemplateSpec = v1.PodTemplateSpec{ func newOwnerDeployment(f *framework.Framework, deploymentName string) *v1beta1.Deployment { replicas := int32(2) return &v1beta1.Deployment{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: deploymentName, }, Spec: v1beta1.DeploymentSpec{ @@ -84,7 +84,7 @@ func newOwnerRC(f *framework.Framework, name string) *v1.ReplicationController { Kind: "ReplicationController", APIVersion: "v1", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: f.Namespace.Name, Name: name, }, @@ -106,7 +106,7 @@ func verifyRemainingDeploymentsAndReplicaSets( deploymentNum, rsNum int, ) (bool, error) { var ret = true - rs, err := clientSet.Extensions().ReplicaSets(f.Namespace.Name).List(v1.ListOptions{}) + rs, err := clientSet.Extensions().ReplicaSets(f.Namespace.Name).List(metav1.ListOptions{}) if err != nil { return false, fmt.Errorf("Failed to list rs: %v", err) } @@ -114,7 +114,7 @@ func verifyRemainingDeploymentsAndReplicaSets( ret = false By(fmt.Sprintf("expected %d rs, got %d rs", rsNum, len(rs.Items))) } - deployments, err := clientSet.Extensions().Deployments(f.Namespace.Name).List(v1.ListOptions{}) + deployments, err := clientSet.Extensions().Deployments(f.Namespace.Name).List(metav1.ListOptions{}) if err != nil { return false, fmt.Errorf("Failed to list deployments: %v", err) } @@ -130,7 +130,7 @@ func verifyRemainingDeploymentsAndReplicaSets( // communication with the API server fails. func verifyRemainingObjects(f *framework.Framework, clientSet clientset.Interface, rcNum, podNum int) (bool, error) { rcClient := clientSet.Core().ReplicationControllers(f.Namespace.Name) - pods, err := clientSet.Core().Pods(f.Namespace.Name).List(v1.ListOptions{}) + pods, err := clientSet.Core().Pods(f.Namespace.Name).List(metav1.ListOptions{}) if err != nil { return false, fmt.Errorf("Failed to list pods: %v", err) } @@ -139,7 +139,7 @@ func verifyRemainingObjects(f *framework.Framework, clientSet clientset.Interfac ret = false By(fmt.Sprintf("expected %d pods, got %d pods", podNum, len(pods.Items))) } - rcs, err := rcClient.List(v1.ListOptions{}) + rcs, err := rcClient.List(metav1.ListOptions{}) if err != nil { return false, fmt.Errorf("Failed to list replication controllers: %v", err) } @@ -182,7 +182,7 @@ var _ = framework.KubeDescribe("Garbage collector", func() { } // wait for rc to create some pods if err := wait.Poll(5*time.Second, 30*time.Second, func() (bool, error) { - pods, err := podClient.List(v1.ListOptions{}) + pods, err := podClient.List(metav1.ListOptions{}) if err != nil { return false, fmt.Errorf("Failed to list pods: %v", err) } @@ -200,7 +200,7 @@ var _ = framework.KubeDescribe("Garbage collector", func() { } By("delete the rc") deleteOptions := getNonOrphanOptions() - deleteOptions.Preconditions = v1.NewUIDPreconditions(string(rc.UID)) + deleteOptions.Preconditions = metav1.NewUIDPreconditions(string(rc.UID)) if err := rcClient.Delete(rc.ObjectMeta.Name, deleteOptions); err != nil { framework.Failf("failed to delete the rc: %v", err) } @@ -210,7 +210,7 @@ var _ = framework.KubeDescribe("Garbage collector", func() { return verifyRemainingObjects(f, clientSet, 0, 0) }); err != nil { framework.Failf("failed to wait for all pods to be deleted: %v", err) - remainingPods, err := podClient.List(v1.ListOptions{}) + remainingPods, err := podClient.List(metav1.ListOptions{}) if err != nil { framework.Failf("failed to list pods post mortem: %v", err) } else { @@ -249,13 +249,13 @@ var _ = framework.KubeDescribe("Garbage collector", func() { } By("delete the rc") deleteOptions := getOrphanOptions() - deleteOptions.Preconditions = v1.NewUIDPreconditions(string(rc.UID)) + deleteOptions.Preconditions = metav1.NewUIDPreconditions(string(rc.UID)) if err := rcClient.Delete(rc.ObjectMeta.Name, deleteOptions); err != nil { framework.Failf("failed to delete the rc: %v", err) } By("wait for the rc to be deleted") if err := wait.Poll(5*time.Second, 30*time.Second, func() (bool, error) { - rcs, err := rcClient.List(v1.ListOptions{}) + rcs, err := rcClient.List(metav1.ListOptions{}) if err != nil { return false, fmt.Errorf("Failed to list rcs: %v", err) } @@ -268,7 +268,7 @@ var _ = framework.KubeDescribe("Garbage collector", func() { } By("wait for 30 seconds to see if the garbage collector mistakenly deletes the pods") if err := wait.Poll(5*time.Second, 30*time.Second, func() (bool, error) { - pods, err := podClient.List(v1.ListOptions{}) + pods, err := podClient.List(metav1.ListOptions{}) if err != nil { return false, fmt.Errorf("Failed to list pods: %v", err) } @@ -308,14 +308,14 @@ var _ = framework.KubeDescribe("Garbage collector", func() { framework.Failf("failed to wait for the rc.Status.Replicas to reach rc.Spec.Replicas: %v", err) } By("delete the rc") - deleteOptions := &v1.DeleteOptions{} - deleteOptions.Preconditions = v1.NewUIDPreconditions(string(rc.UID)) + deleteOptions := &metav1.DeleteOptions{} + deleteOptions.Preconditions = metav1.NewUIDPreconditions(string(rc.UID)) if err := rcClient.Delete(rc.ObjectMeta.Name, deleteOptions); err != nil { framework.Failf("failed to delete the rc: %v", err) } By("wait for 30 seconds to see if the garbage collector mistakenly deletes the pods") if err := wait.Poll(5*time.Second, 30*time.Second, func() (bool, error) { - pods, err := podClient.List(v1.ListOptions{}) + pods, err := podClient.List(metav1.ListOptions{}) if err != nil { return false, fmt.Errorf("Failed to list pods: %v", err) } @@ -343,7 +343,7 @@ var _ = framework.KubeDescribe("Garbage collector", func() { // wait for deployment to create some rs By("Wait for the Deployment to create new ReplicaSet") err = wait.PollImmediate(500*time.Millisecond, 1*time.Minute, func() (bool, error) { - rsList, err := rsClient.List(v1.ListOptions{}) + rsList, err := rsClient.List(metav1.ListOptions{}) if err != nil { return false, fmt.Errorf("Failed to list rs: %v", err) } @@ -356,7 +356,7 @@ var _ = framework.KubeDescribe("Garbage collector", func() { By("delete the deployment") deleteOptions := getNonOrphanOptions() - deleteOptions.Preconditions = v1.NewUIDPreconditions(string(createdDeployment.UID)) + deleteOptions.Preconditions = metav1.NewUIDPreconditions(string(createdDeployment.UID)) if err := deployClient.Delete(deployment.ObjectMeta.Name, deleteOptions); err != nil { framework.Failf("failed to delete the deployment: %v", err) } @@ -366,7 +366,7 @@ var _ = framework.KubeDescribe("Garbage collector", func() { }) if err == wait.ErrWaitTimeout { err = fmt.Errorf("Failed to wait for all rs to be garbage collected: %v", err) - remainingRSs, err := rsClient.List(v1.ListOptions{}) + remainingRSs, err := rsClient.List(metav1.ListOptions{}) if err != nil { framework.Failf("failed to list RSs post mortem: %v", err) } else { @@ -392,7 +392,7 @@ var _ = framework.KubeDescribe("Garbage collector", func() { // wait for deployment to create some rs By("Wait for the Deployment to create new ReplicaSet") err = wait.PollImmediate(500*time.Millisecond, 1*time.Minute, func() (bool, error) { - rsList, err := rsClient.List(v1.ListOptions{}) + rsList, err := rsClient.List(metav1.ListOptions{}) if err != nil { return false, fmt.Errorf("Failed to list rs: %v", err) } @@ -405,7 +405,7 @@ var _ = framework.KubeDescribe("Garbage collector", func() { By("delete the deployment") deleteOptions := getOrphanOptions() - deleteOptions.Preconditions = v1.NewUIDPreconditions(string(createdDeployment.UID)) + deleteOptions.Preconditions = metav1.NewUIDPreconditions(string(createdDeployment.UID)) if err := deployClient.Delete(deployment.ObjectMeta.Name, deleteOptions); err != nil { framework.Failf("failed to delete the deployment: %v", err) } @@ -415,20 +415,20 @@ var _ = framework.KubeDescribe("Garbage collector", func() { }) if err != nil { err = fmt.Errorf("Failed to wait to see if the garbage collecter mistakenly deletes the rs: %v", err) - remainingRSs, err := rsClient.List(v1.ListOptions{}) + remainingRSs, err := rsClient.List(metav1.ListOptions{}) if err != nil { framework.Failf("failed to list RSs post mortem: %v", err) } else { framework.Failf("remaining rs post mortem: %#v", remainingRSs) } - remainingDSs, err := deployClient.List(v1.ListOptions{}) + remainingDSs, err := deployClient.List(metav1.ListOptions{}) if err != nil { framework.Failf("failed to list Deployments post mortem: %v", err) } else { framework.Failf("remaining deployment's post mortem: %#v", remainingDSs) } } - rs, err := clientSet.Extensions().ReplicaSets(f.Namespace.Name).List(v1.ListOptions{}) + rs, err := clientSet.Extensions().ReplicaSets(f.Namespace.Name).List(metav1.ListOptions{}) if err != nil { framework.Failf("Failed to list ReplicaSet %v", err) } diff --git a/vendor/k8s.io/kubernetes/test/e2e/generated_clientset.go b/vendor/k8s.io/kubernetes/test/e2e/generated_clientset.go index d346a1a2..6efcc8bb 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/generated_clientset.go +++ b/vendor/k8s.io/kubernetes/test/e2e/generated_clientset.go @@ -20,6 +20,7 @@ import ( "strconv" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/wait" @@ -37,7 +38,7 @@ import ( func stagingClientPod(name, value string) clientv1.Pod { return clientv1.Pod{ - ObjectMeta: clientv1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Labels: map[string]string{ "name": "foo", @@ -58,7 +59,7 @@ func stagingClientPod(name, value string) clientv1.Pod { func testingPod(name, value string) v1.Pod { return v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Labels: map[string]string{ "name": "foo", @@ -129,13 +130,13 @@ var _ = framework.KubeDescribe("Generated release_1_5 clientset", func() { pod := &podCopy By("setting up watch") selector := labels.SelectorFromSet(labels.Set(map[string]string{"time": value})).String() - options := v1.ListOptions{LabelSelector: selector} + options := metav1.ListOptions{LabelSelector: selector} pods, err := podClient.List(options) if err != nil { framework.Failf("Failed to query for pods: %v", err) } Expect(len(pods.Items)).To(Equal(0)) - options = v1.ListOptions{ + options = metav1.ListOptions{ LabelSelector: selector, ResourceVersion: pods.ListMeta.ResourceVersion, } @@ -151,7 +152,7 @@ var _ = framework.KubeDescribe("Generated release_1_5 clientset", func() { } By("verifying the pod is in kubernetes") - options = v1.ListOptions{ + options = metav1.ListOptions{ LabelSelector: selector, ResourceVersion: pod.ResourceVersion, } @@ -169,7 +170,7 @@ var _ = framework.KubeDescribe("Generated release_1_5 clientset", func() { framework.ExpectNoError(f.WaitForPodRunning(pod.Name)) By("deleting the pod gracefully") - if err := podClient.Delete(pod.Name, v1.NewDeleteOptions(30)); err != nil { + if err := podClient.Delete(pod.Name, metav1.NewDeleteOptions(30)); err != nil { framework.Failf("Failed to delete pod: %v", err) } @@ -179,7 +180,7 @@ var _ = framework.KubeDescribe("Generated release_1_5 clientset", func() { Expect(lastPod.DeletionTimestamp).ToNot(BeNil()) Expect(lastPod.Spec.TerminationGracePeriodSeconds).ToNot(BeZero()) - options = v1.ListOptions{LabelSelector: selector} + options = metav1.ListOptions{LabelSelector: selector} pods, err = podClient.List(options) if err != nil { framework.Failf("Failed to list pods to verify deletion: %v", err) @@ -192,7 +193,7 @@ func newTestingCronJob(name string, value string) *v2alpha1.CronJob { parallelism := int32(1) completions := int32(1) return &v2alpha1.CronJob{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Labels: map[string]string{ "time": value, @@ -263,13 +264,13 @@ var _ = framework.KubeDescribe("Generated release_1_5 clientset", func() { cronJob := newTestingCronJob(name, value) By("setting up watch") selector := labels.SelectorFromSet(labels.Set(map[string]string{"time": value})).String() - options := v1.ListOptions{LabelSelector: selector} + options := metav1.ListOptions{LabelSelector: selector} cronJobs, err := cronJobClient.List(options) if err != nil { framework.Failf("Failed to query for cronJobs: %v", err) } Expect(len(cronJobs.Items)).To(Equal(0)) - options = v1.ListOptions{ + options = metav1.ListOptions{ LabelSelector: selector, ResourceVersion: cronJobs.ListMeta.ResourceVersion, } @@ -285,7 +286,7 @@ var _ = framework.KubeDescribe("Generated release_1_5 clientset", func() { } By("verifying the cronJob is in kubernetes") - options = v1.ListOptions{ + options = metav1.ListOptions{ LabelSelector: selector, ResourceVersion: cronJob.ResourceVersion, } @@ -303,7 +304,7 @@ var _ = framework.KubeDescribe("Generated release_1_5 clientset", func() { framework.Failf("Failed to delete cronJob: %v", err) } - options = v1.ListOptions{LabelSelector: selector} + options = metav1.ListOptions{LabelSelector: selector} cronJobs, err = cronJobClient.List(options) if err != nil { framework.Failf("Failed to list cronJobs to verify deletion: %v", err) @@ -322,7 +323,7 @@ var _ = framework.KubeDescribe("Staging client repo client", func() { podCopy := stagingClientPod(name, value) pod := &podCopy By("verifying no pod exists before the test") - pods, err := podClient.List(clientv1.ListOptions{}) + pods, err := podClient.List(metav1.ListOptions{}) if err != nil { framework.Failf("Failed to query for pods: %v", err) } @@ -336,7 +337,7 @@ var _ = framework.KubeDescribe("Staging client repo client", func() { By("verifying the pod is in kubernetes") timeout := 1 * time.Minute if err := wait.PollImmediate(time.Second, timeout, func() (bool, error) { - pods, err = podClient.List(clientv1.ListOptions{}) + pods, err = podClient.List(metav1.ListOptions{}) if err != nil { return false, err } diff --git a/vendor/k8s.io/kubernetes/test/e2e/gke_local_ssd.go b/vendor/k8s.io/kubernetes/test/e2e/gke_local_ssd.go index 08456169..63b399da 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/gke_local_ssd.go +++ b/vendor/k8s.io/kubernetes/test/e2e/gke_local_ssd.go @@ -76,7 +76,7 @@ func testPodWithSsd(command string) *v1.Pod { Kind: "Pod", APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String(), }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, }, Spec: v1.PodSpec{ diff --git a/vendor/k8s.io/kubernetes/test/e2e/horizontal_pod_autoscaling.go b/vendor/k8s.io/kubernetes/test/e2e/horizontal_pod_autoscaling.go index 4e721e1b..dc1fd87e 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/horizontal_pod_autoscaling.go +++ b/vendor/k8s.io/kubernetes/test/e2e/horizontal_pod_autoscaling.go @@ -19,7 +19,7 @@ package e2e import ( "time" - "k8s.io/kubernetes/pkg/api/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" autoscaling "k8s.io/kubernetes/pkg/apis/autoscaling/v1" "k8s.io/kubernetes/test/e2e/framework" @@ -177,7 +177,7 @@ func scaleDown(name, kind string, checkStability bool, rc *ResourceConsumer, f * func createCPUHorizontalPodAutoscaler(rc *ResourceConsumer, cpu, minReplicas, maxRepl int32) { hpa := &autoscaling.HorizontalPodAutoscaler{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: rc.name, Namespace: rc.framework.Namespace.Name, }, diff --git a/vendor/k8s.io/kubernetes/test/e2e/ingress.go b/vendor/k8s.io/kubernetes/test/e2e/ingress.go index c2f47173..58f31e19 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/ingress.go +++ b/vendor/k8s.io/kubernetes/test/e2e/ingress.go @@ -22,8 +22,8 @@ import ( "time" "k8s.io/apimachinery/pkg/runtime/schema" - rbacv1alpha1 "k8s.io/kubernetes/pkg/apis/rbac/v1alpha1" - "k8s.io/kubernetes/pkg/serviceaccount" + "k8s.io/apiserver/pkg/authentication/serviceaccount" + rbacv1beta1 "k8s.io/kubernetes/pkg/apis/rbac/v1beta1" "k8s.io/kubernetes/test/e2e/framework" . "github.com/onsi/ginkgo" @@ -69,7 +69,7 @@ var _ = framework.KubeDescribe("Loadbalancing: L7", func() { // this test wants powerful permissions. Since the namespace names are unique, we can leave this // lying around so we don't have to race any caches framework.BindClusterRole(jig.client.Rbac(), "cluster-admin", f.Namespace.Name, - rbacv1alpha1.Subject{Kind: rbacv1alpha1.ServiceAccountKind, Namespace: f.Namespace.Name, Name: "default"}) + rbacv1beta1.Subject{Kind: rbacv1beta1.ServiceAccountKind, Namespace: f.Namespace.Name, Name: "default"}) err := framework.WaitForAuthorizationUpdate(jig.client.Authorization(), serviceaccount.MakeUsername(f.Namespace.Name, "default"), @@ -102,7 +102,7 @@ var _ = framework.KubeDescribe("Loadbalancing: L7", func() { // Platform specific cleanup AfterEach(func() { if CurrentGinkgoTestDescription().Failed { - describeIng(ns) + framework.DescribeIng(ns) } if jig.ing == nil { By("No ingress created, no cleanup necessary") @@ -137,10 +137,10 @@ var _ = framework.KubeDescribe("Loadbalancing: L7", func() { By("waiting for Ingress to come up with ip: " + ip) httpClient := buildInsecureClient(reqTimeout) - framework.ExpectNoError(pollURL(fmt.Sprintf("https://%v/", ip), "", framework.LoadBalancerPollTimeout, jig.pollInterval, httpClient, false)) + framework.ExpectNoError(framework.PollURL(fmt.Sprintf("https://%v/", ip), "", framework.LoadBalancerPollTimeout, jig.pollInterval, httpClient, false)) By("should reject HTTP traffic") - framework.ExpectNoError(pollURL(fmt.Sprintf("http://%v/", ip), "", framework.LoadBalancerPollTimeout, jig.pollInterval, httpClient, true)) + framework.ExpectNoError(framework.PollURL(fmt.Sprintf("http://%v/", ip), "", framework.LoadBalancerPollTimeout, jig.pollInterval, httpClient, true)) By("should have correct firewall rule for ingress") fw := gceController.getFirewallRule() @@ -192,7 +192,7 @@ var _ = framework.KubeDescribe("Loadbalancing: L7", func() { framework.ExpectNoError(gcloudDelete("firewall-rules", fmt.Sprintf("ingress-80-443-%v", ns), framework.TestContext.CloudConfig.ProjectID)) } if CurrentGinkgoTestDescription().Failed { - describeIng(ns) + framework.DescribeIng(ns) } if jig.ing == nil { By("No ingress created, no cleanup necessary") diff --git a/vendor/k8s.io/kubernetes/test/e2e/ingress_utils.go b/vendor/k8s.io/kubernetes/test/e2e/ingress_utils.go index f7266eb6..f2bf1377 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/ingress_utils.go +++ b/vendor/k8s.io/kubernetes/test/e2e/ingress_utils.go @@ -181,33 +181,13 @@ func createComformanceTests(jig *testJig, ns string) []conformanceTests { }) By("Checking that " + pathToFail + " is not exposed by polling for failure") route := fmt.Sprintf("http://%v%v", jig.address, pathToFail) - framework.ExpectNoError(pollURL(route, updateURLMapHost, framework.LoadBalancerCleanupTimeout, jig.pollInterval, &http.Client{Timeout: reqTimeout}, true)) + framework.ExpectNoError(framework.PollURL(route, updateURLMapHost, framework.LoadBalancerCleanupTimeout, jig.pollInterval, &http.Client{Timeout: reqTimeout}, true)) }, fmt.Sprintf("Waiting for path updates to reflect in L7"), }, } } -// pollURL polls till the url responds with a healthy http code. If -// expectUnreachable is true, it breaks on first non-healthy http code instead. -func pollURL(route, host string, timeout time.Duration, interval time.Duration, httpClient *http.Client, expectUnreachable bool) error { - var lastBody string - pollErr := wait.PollImmediate(interval, timeout, func() (bool, error) { - var err error - lastBody, err = simpleGET(httpClient, route, host) - if err != nil { - framework.Logf("host %v path %v: %v unreachable", host, route, err) - return expectUnreachable, nil - } - return !expectUnreachable, nil - }) - if pollErr != nil { - return fmt.Errorf("Failed to execute a successful GET within %v, Last response body for %v, host %v:\n%v\n\n%v\n", - timeout, route, host, lastBody, pollErr) - } - return nil -} - // generateRSACerts generates a basic self signed certificate using a key length // of rsaBits, valid for validFor time. func generateRSACerts(host string, isCA bool, keyOut, certOut io.Writer) error { @@ -306,7 +286,7 @@ func createSecret(kubeClient clientset.Interface, ing *extensions.Ingress) (host cert := c.Bytes() key := k.Bytes() secret := &v1.Secret{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: tls.SecretName, }, Data: map[string][]byte{ @@ -327,13 +307,6 @@ func createSecret(kubeClient clientset.Interface, ing *extensions.Ingress) (host return host, cert, key, err } -func describeIng(ns string) { - framework.Logf("\nOutput of kubectl describe ing:\n") - desc, _ := framework.RunKubectl( - "describe", "ing", fmt.Sprintf("--namespace=%v", ns)) - framework.Logf(desc) -} - func cleanupGCE(gceController *GCEIngressController) { pollErr := wait.Poll(5*time.Second, framework.LoadBalancerCleanupTimeout, func() (bool, error) { if err := gceController.Cleanup(false); err != nil { @@ -821,7 +794,7 @@ func (j *testJig) update(update func(ing *extensions.Ingress)) { update(j.ing) j.ing, err = j.client.Extensions().Ingresses(ns).Update(j.ing) if err == nil { - describeIng(j.ing.Namespace) + framework.DescribeIng(j.ing.Namespace) return } if !apierrs.IsConflict(err) && !apierrs.IsServerTimeout(err) { @@ -889,7 +862,7 @@ func (j *testJig) waitForIngress(waitForNodePort bool) { } route := fmt.Sprintf("%v://%v%v", proto, address, p.Path) framework.Logf("Testing route %v host %v with simple GET", route, rules.Host) - framework.ExpectNoError(pollURL(route, rules.Host, framework.LoadBalancerPollTimeout, j.pollInterval, timeoutClient, false)) + framework.ExpectNoError(framework.PollURL(route, rules.Host, framework.LoadBalancerPollTimeout, j.pollInterval, timeoutClient, false)) } } } @@ -898,7 +871,7 @@ func (j *testJig) waitForIngress(waitForNodePort bool) { // given url returns a non-healthy http code even once. func (j *testJig) verifyURL(route, host string, iterations int, interval time.Duration, httpClient *http.Client) error { for i := 0; i < iterations; i++ { - b, err := simpleGET(httpClient, route, host) + b, err := framework.SimpleGET(httpClient, route, host) if err != nil { framework.Logf(b) return err @@ -913,7 +886,7 @@ func (j *testJig) curlServiceNodePort(ns, name string, port int) { // TODO: Curl all nodes? u, err := framework.GetNodePortURL(j.client, ns, name, port) framework.ExpectNoError(err) - framework.ExpectNoError(pollURL(u, "", 30*time.Second, j.pollInterval, &http.Client{Timeout: reqTimeout}, false)) + framework.ExpectNoError(framework.PollURL(u, "", 30*time.Second, j.pollInterval, &http.Client{Timeout: reqTimeout}, false)) } // getIngressNodePorts returns all related backend services' nodePorts. @@ -921,7 +894,7 @@ func (j *testJig) curlServiceNodePort(ns, name string, port int) { // by default, so retrieve its nodePort as well. func (j *testJig) getIngressNodePorts() []string { nodePorts := []string{} - defaultSvc, err := j.client.Core().Services(api.NamespaceSystem).Get(defaultBackendName, metav1.GetOptions{}) + defaultSvc, err := j.client.Core().Services(metav1.NamespaceSystem).Get(defaultBackendName, metav1.GetOptions{}) Expect(err).NotTo(HaveOccurred()) nodePorts = append(nodePorts, strconv.Itoa(int(defaultSvc.Spec.Ports[0].NodePort))) @@ -975,8 +948,8 @@ func ingFromManifest(fileName string) *extensions.Ingress { } func (cont *GCEIngressController) getL7AddonUID() (string, error) { - framework.Logf("Retrieving UID from config map: %v/%v", api.NamespaceSystem, uidConfigMap) - cm, err := cont.c.Core().ConfigMaps(api.NamespaceSystem).Get(uidConfigMap, metav1.GetOptions{}) + framework.Logf("Retrieving UID from config map: %v/%v", metav1.NamespaceSystem, uidConfigMap) + cm, err := cont.c.Core().ConfigMaps(metav1.NamespaceSystem).Get(uidConfigMap, metav1.GetOptions{}) if err != nil { return "", err } @@ -1037,7 +1010,7 @@ func (cont *NginxIngressController) init() { framework.Logf("waiting for pods with label %v", rc.Spec.Selector) sel := labels.SelectorFromSet(labels.Set(rc.Spec.Selector)) framework.ExpectNoError(testutils.WaitForPodsWithLabelRunning(cont.c, cont.ns, sel)) - pods, err := cont.c.Core().Pods(cont.ns).List(v1.ListOptions{LabelSelector: sel.String()}) + pods, err := cont.c.Core().Pods(cont.ns).List(metav1.ListOptions{LabelSelector: sel.String()}) framework.ExpectNoError(err) if len(pods.Items) == 0 { framework.Failf("Failed to find nginx ingress controller pods with selector %v", sel) diff --git a/vendor/k8s.io/kubernetes/test/e2e/initial_resources.go b/vendor/k8s.io/kubernetes/test/e2e/initial_resources.go index 6d590bcd..39c7ff24 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/initial_resources.go +++ b/vendor/k8s.io/kubernetes/test/e2e/initial_resources.go @@ -22,6 +22,7 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/test/e2e/framework" ) @@ -53,7 +54,7 @@ var _ = framework.KubeDescribe("Initial Resources [Feature:InitialResources] [Fl func runPod(f *framework.Framework, name, image string) *v1.Pod { pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Spec: v1.PodSpec{ diff --git a/vendor/k8s.io/kubernetes/test/e2e/job.go b/vendor/k8s.io/kubernetes/test/e2e/job.go index 791b1bfa..2ae7a67e 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/job.go +++ b/vendor/k8s.io/kubernetes/test/e2e/job.go @@ -23,7 +23,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" batchinternal "k8s.io/kubernetes/pkg/apis/batch" batch "k8s.io/kubernetes/pkg/apis/batch/v1" @@ -178,7 +177,7 @@ var _ = framework.KubeDescribe("Job", func() { reaper, err := kubectl.ReaperFor(batchinternal.Kind("Job"), f.InternalClientset) Expect(err).NotTo(HaveOccurred()) timeout := 1 * time.Minute - err = reaper.Stop(f.Namespace.Name, job.Name, timeout, api.NewDeleteOptions(0)) + err = reaper.Stop(f.Namespace.Name, job.Name, timeout, metav1.NewDeleteOptions(0)) Expect(err).NotTo(HaveOccurred()) By("Ensuring job was deleted") @@ -216,7 +215,7 @@ var _ = framework.KubeDescribe("Job", func() { // newTestJob returns a job which does one of several testing behaviors. func newTestJob(behavior, name string, rPol v1.RestartPolicy, parallelism, completions int32) *batch.Job { job := &batch.Job{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Spec: batch.JobSpec{ @@ -224,7 +223,7 @@ func newTestJob(behavior, name string, rPol v1.RestartPolicy, parallelism, compl Completions: &completions, ManualSelector: newBool(false), Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{jobSelectorKey: name}, }, Spec: v1.PodSpec{ @@ -296,7 +295,7 @@ func deleteJob(c clientset.Interface, ns, name string) error { func waitForAllPodsRunning(c clientset.Interface, ns, jobName string, parallelism int32) error { label := labels.SelectorFromSet(labels.Set(map[string]string{jobSelectorKey: jobName})) return wait.Poll(framework.Poll, jobTimeout, func() (bool, error) { - options := v1.ListOptions{LabelSelector: label.String()} + options := metav1.ListOptions{LabelSelector: label.String()} pods, err := c.Core().Pods(ns).List(options) if err != nil { return false, err diff --git a/vendor/k8s.io/kubernetes/test/e2e/kibana_logging.go b/vendor/k8s.io/kubernetes/test/e2e/kibana_logging.go index 6e477fab..bf1565cf 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/kibana_logging.go +++ b/vendor/k8s.io/kubernetes/test/e2e/kibana_logging.go @@ -22,8 +22,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" - "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/test/e2e/framework" . "github.com/onsi/ginkgo" @@ -57,7 +55,7 @@ func ClusterLevelLoggingWithKibana(f *framework.Framework) { // Check for the existence of the Kibana service. By("Checking the Kibana service exists.") - s := f.ClientSet.Core().Services(api.NamespaceSystem) + s := f.ClientSet.Core().Services(metav1.NamespaceSystem) // Make a few attempts to connect. This makes the test robust against // being run as the first e2e test just after the e2e cluster has been created. var err error @@ -72,8 +70,8 @@ func ClusterLevelLoggingWithKibana(f *framework.Framework) { // Wait for the Kibana pod(s) to enter the running state. By("Checking to make sure the Kibana pods are running") label := labels.SelectorFromSet(labels.Set(map[string]string{kibanaKey: kibanaValue})) - options := v1.ListOptions{LabelSelector: label.String()} - pods, err := f.ClientSet.Core().Pods(api.NamespaceSystem).List(options) + options := metav1.ListOptions{LabelSelector: label.String()} + pods, err := f.ClientSet.Core().Pods(metav1.NamespaceSystem).List(options) Expect(err).NotTo(HaveOccurred()) for _, pod := range pods.Items { err = framework.WaitForPodRunningInNamespace(f.ClientSet, &pod) @@ -94,7 +92,7 @@ func ClusterLevelLoggingWithKibana(f *framework.Framework) { defer cancel() // Query against the root URL for Kibana. - _, err = proxyRequest.Namespace(api.NamespaceSystem). + _, err = proxyRequest.Namespace(metav1.NamespaceSystem). Context(ctx). Name("kibana-logging"). DoRaw() diff --git a/vendor/k8s.io/kubernetes/test/e2e/kube_proxy.go b/vendor/k8s.io/kubernetes/test/e2e/kube_proxy.go index 6c997fac..aedd95ab 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/kube_proxy.go +++ b/vendor/k8s.io/kubernetes/test/e2e/kube_proxy.go @@ -24,6 +24,7 @@ import ( "strings" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/test/e2e/framework" @@ -76,7 +77,7 @@ var _ = framework.KubeDescribe("Network", func() { zero := int64(0) clientPodSpec := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "e2e-net-client", Namespace: fr.Namespace.Name, Labels: map[string]string{"app": "e2e-net-client"}, @@ -98,7 +99,7 @@ var _ = framework.KubeDescribe("Network", func() { } serverPodSpec := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "e2e-net-server", Namespace: fr.Namespace.Name, Labels: map[string]string{"app": "e2e-net-server"}, diff --git a/vendor/k8s.io/kubernetes/test/e2e/kubectl.go b/vendor/k8s.io/kubernetes/test/e2e/kubectl.go index b2438464..7d4635c2 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/kubectl.go +++ b/vendor/k8s.io/kubernetes/test/e2e/kubectl.go @@ -48,15 +48,15 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" utilnet "k8s.io/apimachinery/pkg/util/net" "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/apiserver/pkg/authentication/serviceaccount" "k8s.io/kubernetes/pkg/api/annotations" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" - rbacv1alpha1 "k8s.io/kubernetes/pkg/apis/rbac/v1alpha1" + rbacv1beta1 "k8s.io/kubernetes/pkg/apis/rbac/v1beta1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/pkg/controller" + genericregistry "k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry" "k8s.io/kubernetes/pkg/kubectl/cmd/util" - genericregistry "k8s.io/kubernetes/pkg/registry/generic/registry" - "k8s.io/kubernetes/pkg/serviceaccount" uexec "k8s.io/kubernetes/pkg/util/exec" "k8s.io/kubernetes/pkg/util/uuid" utilversion "k8s.io/kubernetes/pkg/util/version" @@ -581,7 +581,7 @@ var _ = framework.KubeDescribe("Kubectl client", func() { By("adding rbac permissions") // grant the view permission widely to allow inspection of the `invalid` namespace. framework.BindClusterRole(f.ClientSet.Rbac(), "view", f.Namespace.Name, - rbacv1alpha1.Subject{Kind: rbacv1alpha1.ServiceAccountKind, Namespace: f.Namespace.Name, Name: "default"}) + rbacv1beta1.Subject{Kind: rbacv1beta1.ServiceAccountKind, Namespace: f.Namespace.Name, Name: "default"}) err := framework.WaitForAuthorizationUpdate(f.ClientSet.Authorization(), serviceaccount.MakeUsername(f.Namespace.Name, "default"), @@ -764,7 +764,7 @@ var _ = framework.KubeDescribe("Kubectl client", func() { // Node // It should be OK to list unschedulable Nodes here. - nodes, err := c.Core().Nodes().List(v1.ListOptions{}) + nodes, err := c.Core().Nodes().List(metav1.ListOptions{}) Expect(err).NotTo(HaveOccurred()) node := nodes.Items[0] output = framework.RunKubectlOrDie("describe", "node", node.Name) @@ -1736,7 +1736,7 @@ func forEachReplicationController(c clientset.Interface, ns, selectorKey, select var err error for t := time.Now(); time.Since(t) < framework.PodListTimeout; time.Sleep(framework.Poll) { label := labels.SelectorFromSet(labels.Set(map[string]string{selectorKey: selectorValue})) - options := v1.ListOptions{LabelSelector: label.String()} + options := metav1.ListOptions{LabelSelector: label.String()} rcs, err = c.Core().ReplicationControllers(ns).List(options) Expect(err).NotTo(HaveOccurred()) if len(rcs.Items) > 0 { diff --git a/vendor/k8s.io/kubernetes/test/e2e/kubelet_perf.go b/vendor/k8s.io/kubernetes/test/e2e/kubelet_perf.go index 069c5122..5dd174bd 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/kubelet_perf.go +++ b/vendor/k8s.io/kubernetes/test/e2e/kubelet_perf.go @@ -21,8 +21,8 @@ import ( "strings" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/pkg/kubelet/api/v1alpha1/stats" "k8s.io/kubernetes/pkg/util/uuid" @@ -201,7 +201,7 @@ var _ = framework.KubeDescribe("Kubelet [Serial] [Slow]", func() { // Wait until image prepull pod has completed so that they wouldn't // affect the runtime cpu usage. Fail the test if prepulling cannot // finish in time. - if err := framework.WaitForPodsSuccess(f.ClientSet, api.NamespaceSystem, framework.ImagePullerLabels, imagePrePullingLongTimeout); err != nil { + if err := framework.WaitForPodsSuccess(f.ClientSet, metav1.NamespaceSystem, framework.ImagePullerLabels, imagePrePullingLongTimeout); err != nil { framework.Failf("Image puller didn't complete in %v, not running resource usage test since the metrics might be adultrated", imagePrePullingLongTimeout) } nodes := framework.GetReadySchedulableNodesOrDie(f.ClientSet) diff --git a/vendor/k8s.io/kubernetes/test/e2e/limit_range.go b/vendor/k8s.io/kubernetes/test/e2e/limit_range.go index e97074a3..b9b3116c 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/limit_range.go +++ b/vendor/k8s.io/kubernetes/test/e2e/limit_range.go @@ -149,7 +149,7 @@ func newLimitRange(name string, limitType v1.LimitType, defaultLimit, defaultRequest, maxLimitRequestRatio v1.ResourceList) *v1.LimitRange { return &v1.LimitRange{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Spec: v1.LimitRangeSpec{ @@ -170,7 +170,7 @@ func newLimitRange(name string, limitType v1.LimitType, // newTestPod returns a pod that has the specified requests and limits func newTestPod(f *framework.Framework, name string, requests v1.ResourceList, limits v1.ResourceList) *v1.Pod { return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Spec: v1.PodSpec{ diff --git a/vendor/k8s.io/kubernetes/test/e2e/load.go b/vendor/k8s.io/kubernetes/test/e2e/load.go index 2d531bff..29399347 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/load.go +++ b/vendor/k8s.io/kubernetes/test/e2e/load.go @@ -27,17 +27,18 @@ import ( "sync" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime/schema" utilnet "k8s.io/apimachinery/pkg/util/net" + restclient "k8s.io/client-go/rest" + "k8s.io/client-go/transport" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/apis/batch" "k8s.io/kubernetes/pkg/apis/extensions" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" - "k8s.io/kubernetes/pkg/client/restclient" - "k8s.io/kubernetes/pkg/client/transport" "k8s.io/kubernetes/pkg/util/intstr" "k8s.io/kubernetes/test/e2e/framework" testutils "k8s.io/kubernetes/test/utils" @@ -423,7 +424,7 @@ func generateServicesForConfigs(configs []testutils.RunObjectConfig) []*v1.Servi serviceName := config.GetName() + "-svc" labels := map[string]string{"name": config.GetName()} service := &v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: serviceName, Namespace: config.GetNamespace(), }, @@ -483,7 +484,7 @@ func scaleResource(wg *sync.WaitGroup, config testutils.RunObjectConfig, scaling fmt.Sprintf("scaling rc %s for the first time", config.GetName())) selector := labels.SelectorFromSet(labels.Set(map[string]string{"name": config.GetName()})) - options := v1.ListOptions{ + options := metav1.ListOptions{ LabelSelector: selector.String(), ResourceVersion: "0", } diff --git a/vendor/k8s.io/kubernetes/test/e2e/mesos.go b/vendor/k8s.io/kubernetes/test/e2e/mesos.go index f64ba7af..09b87d8f 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/mesos.go +++ b/vendor/k8s.io/kubernetes/test/e2e/mesos.go @@ -45,7 +45,7 @@ var _ = framework.KubeDescribe("Mesos", func() { nodeClient := f.ClientSet.Core().Nodes() rackA := labels.SelectorFromSet(map[string]string{"k8s.mesosphere.io/attribute-rack": "1"}) - options := v1.ListOptions{LabelSelector: rackA.String()} + options := metav1.ListOptions{LabelSelector: rackA.String()} nodes, err := nodeClient.List(options) if err != nil { framework.Failf("Failed to query for node: %v", err) @@ -83,7 +83,7 @@ var _ = framework.KubeDescribe("Mesos", func() { TypeMeta: metav1.TypeMeta{ Kind: "Pod", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, Annotations: map[string]string{ "k8s.mesosphere.io/roles": "public", @@ -110,7 +110,7 @@ var _ = framework.KubeDescribe("Mesos", func() { rack2 := labels.SelectorFromSet(map[string]string{ "k8s.mesosphere.io/attribute-rack": "2", }) - options := v1.ListOptions{LabelSelector: rack2.String()} + options := metav1.ListOptions{LabelSelector: rack2.String()} nodes, err := nodeClient.List(options) framework.ExpectNoError(err) diff --git a/vendor/k8s.io/kubernetes/test/e2e/metrics_grabber_test.go b/vendor/k8s.io/kubernetes/test/e2e/metrics_grabber_test.go index ab3804a2..60d4af08 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/metrics_grabber_test.go +++ b/vendor/k8s.io/kubernetes/test/e2e/metrics_grabber_test.go @@ -19,7 +19,7 @@ package e2e import ( "strings" - "k8s.io/kubernetes/pkg/api/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/pkg/metrics" "k8s.io/kubernetes/test/e2e/framework" @@ -59,7 +59,7 @@ var _ = framework.KubeDescribe("MetricsGrabber", func() { It("should grab all metrics from a Scheduler.", func() { By("Proxying to Pod through the API server") // Check if master Node is registered - nodes, err := c.Core().Nodes().List(v1.ListOptions{}) + nodes, err := c.Core().Nodes().List(metav1.ListOptions{}) framework.ExpectNoError(err) var masterRegistered = false @@ -80,7 +80,7 @@ var _ = framework.KubeDescribe("MetricsGrabber", func() { It("should grab all metrics from a ControllerManager.", func() { By("Proxying to Pod through the API server") // Check if master Node is registered - nodes, err := c.Core().Nodes().List(v1.ListOptions{}) + nodes, err := c.Core().Nodes().List(metav1.ListOptions{}) framework.ExpectNoError(err) var masterRegistered = false diff --git a/vendor/k8s.io/kubernetes/test/e2e/monitoring.go b/vendor/k8s.io/kubernetes/test/e2e/monitoring.go index 3d963f01..0d0f2c97 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/monitoring.go +++ b/vendor/k8s.io/kubernetes/test/e2e/monitoring.go @@ -24,9 +24,8 @@ import ( "time" influxdb "github.com/influxdata/influxdb/client" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" - "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/test/e2e/framework" @@ -110,16 +109,16 @@ func verifyExpectedRcsExistAndGetExpectedPods(c clientset.Interface) ([]string, // is running (which would be an error except during a rolling update). for _, rcLabel := range rcLabels { selector := labels.Set{"k8s-app": rcLabel}.AsSelector() - options := v1.ListOptions{LabelSelector: selector.String()} - deploymentList, err := c.Extensions().Deployments(api.NamespaceSystem).List(options) + options := metav1.ListOptions{LabelSelector: selector.String()} + deploymentList, err := c.Extensions().Deployments(metav1.NamespaceSystem).List(options) if err != nil { return nil, err } - rcList, err := c.Core().ReplicationControllers(api.NamespaceSystem).List(options) + rcList, err := c.Core().ReplicationControllers(metav1.NamespaceSystem).List(options) if err != nil { return nil, err } - psList, err := c.Apps().StatefulSets(api.NamespaceSystem).List(options) + psList, err := c.Apps().StatefulSets(metav1.NamespaceSystem).List(options) if err != nil { return nil, err } @@ -130,8 +129,8 @@ func verifyExpectedRcsExistAndGetExpectedPods(c clientset.Interface) ([]string, // Check all the replication controllers. for _, rc := range rcList.Items { selector := labels.Set(rc.Spec.Selector).AsSelector() - options := v1.ListOptions{LabelSelector: selector.String()} - podList, err := c.Core().Pods(api.NamespaceSystem).List(options) + options := metav1.ListOptions{LabelSelector: selector.String()} + podList, err := c.Core().Pods(metav1.NamespaceSystem).List(options) if err != nil { return nil, err } @@ -145,8 +144,8 @@ func verifyExpectedRcsExistAndGetExpectedPods(c clientset.Interface) ([]string, // Do the same for all deployments. for _, rc := range deploymentList.Items { selector := labels.Set(rc.Spec.Selector.MatchLabels).AsSelector() - options := v1.ListOptions{LabelSelector: selector.String()} - podList, err := c.Core().Pods(api.NamespaceSystem).List(options) + options := metav1.ListOptions{LabelSelector: selector.String()} + podList, err := c.Core().Pods(metav1.NamespaceSystem).List(options) if err != nil { return nil, err } @@ -160,8 +159,8 @@ func verifyExpectedRcsExistAndGetExpectedPods(c clientset.Interface) ([]string, // And for pet sets. for _, ps := range psList.Items { selector := labels.Set(ps.Spec.Selector.MatchLabels).AsSelector() - options := v1.ListOptions{LabelSelector: selector.String()} - podList, err := c.Core().Pods(api.NamespaceSystem).List(options) + options := metav1.ListOptions{LabelSelector: selector.String()} + podList, err := c.Core().Pods(metav1.NamespaceSystem).List(options) if err != nil { return nil, err } @@ -177,7 +176,7 @@ func verifyExpectedRcsExistAndGetExpectedPods(c clientset.Interface) ([]string, } func expectedServicesExist(c clientset.Interface) error { - serviceList, err := c.Core().Services(api.NamespaceSystem).List(v1.ListOptions{}) + serviceList, err := c.Core().Services(metav1.NamespaceSystem).List(metav1.ListOptions{}) if err != nil { return err } @@ -196,7 +195,7 @@ func expectedServicesExist(c clientset.Interface) error { func getAllNodesInCluster(c clientset.Interface) ([]string, error) { // It should be OK to list unschedulable Nodes here. - nodeList, err := c.Core().Nodes().List(v1.ListOptions{}) + nodeList, err := c.Core().Nodes().List(metav1.ListOptions{}) if err != nil { return nil, err } @@ -290,8 +289,8 @@ func testMonitoringUsingHeapsterInfluxdb(c clientset.Interface) { func printDebugInfo(c clientset.Interface) { set := labels.Set{"k8s-app": "heapster"} - options := v1.ListOptions{LabelSelector: set.AsSelector().String()} - podList, err := c.Core().Pods(api.NamespaceSystem).List(options) + options := metav1.ListOptions{LabelSelector: set.AsSelector().String()} + podList, err := c.Core().Pods(metav1.NamespaceSystem).List(options) if err != nil { framework.Logf("Error while listing pods %v", err) return diff --git a/vendor/k8s.io/kubernetes/test/e2e/namespace.go b/vendor/k8s.io/kubernetes/test/e2e/namespace.go index 143eafa0..2e609d31 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/namespace.go +++ b/vendor/k8s.io/kubernetes/test/e2e/namespace.go @@ -61,7 +61,7 @@ func extinguish(f *framework.Framework, totalNS int, maxAllowedAfterDel int, max framework.ExpectNoError(wait.Poll(2*time.Second, time.Duration(maxSeconds)*time.Second, func() (bool, error) { var cnt = 0 - nsList, err := f.ClientSet.Core().Namespaces().List(v1.ListOptions{}) + nsList, err := f.ClientSet.Core().Namespaces().List(metav1.ListOptions{}) if err != nil { return false, err } @@ -91,7 +91,7 @@ func ensurePodsAreRemovedWhenNamespaceIsDeleted(f *framework.Framework) { By("Creating a pod in the namespace") pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test-pod", }, Spec: v1.PodSpec{ @@ -147,7 +147,7 @@ func ensureServicesAreRemovedWhenNamespaceIsDeleted(f *framework.Framework) { "baz": "blah", } service := &v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: serviceName, }, Spec: v1.ServiceSpec{ diff --git a/vendor/k8s.io/kubernetes/test/e2e/network_partition.go b/vendor/k8s.io/kubernetes/test/e2e/network_partition.go index d2666761..8d4c07b5 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/network_partition.go +++ b/vendor/k8s.io/kubernetes/test/e2e/network_partition.go @@ -22,6 +22,7 @@ import ( "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/wait" @@ -30,7 +31,6 @@ import ( "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/cache" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/fields" "k8s.io/kubernetes/test/e2e/framework" testutils "k8s.io/kubernetes/test/utils" @@ -93,7 +93,7 @@ func expectNodeReadiness(isReady bool, newNode chan *v1.Node) { func podOnNode(podName, nodeName string, image string) *v1.Pod { return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, Labels: map[string]string{ "name": podName, @@ -160,16 +160,16 @@ var _ = framework.KubeDescribe("Network Partition [Disruptive] [Slow]", func() { It("All pods on the unreachable node should be marked as NotReady upon the node turn NotReady "+ "AND all pods should be mark back to Ready when the node get back to Ready before pod eviction timeout", func() { By("choose a node - we will block all network traffic on this node") - var podOpts v1.ListOptions - nodeOpts := v1.ListOptions{} + var podOpts metav1.ListOptions + nodeOpts := metav1.ListOptions{} nodes, err := c.Core().Nodes().List(nodeOpts) Expect(err).NotTo(HaveOccurred()) framework.FilterNodes(nodes, func(node v1.Node) bool { if !framework.IsNodeConditionSetAsExpected(&node, v1.NodeReady, true) { return false } - podOpts = v1.ListOptions{FieldSelector: fields.OneTermEqualSelector(api.PodHostField, node.Name).String()} - pods, err := c.Core().Pods(v1.NamespaceAll).List(podOpts) + podOpts = metav1.ListOptions{FieldSelector: fields.OneTermEqualSelector(api.PodHostField, node.Name).String()} + pods, err := c.Core().Pods(metav1.NamespaceAll).List(podOpts) if err != nil || len(pods.Items) <= 0 { return false } @@ -179,7 +179,7 @@ var _ = framework.KubeDescribe("Network Partition [Disruptive] [Slow]", func() { framework.Failf("No eligible node were found: %d", len(nodes.Items)) } node := nodes.Items[0] - podOpts = v1.ListOptions{FieldSelector: fields.OneTermEqualSelector(api.PodHostField, node.Name).String()} + podOpts = metav1.ListOptions{FieldSelector: fields.OneTermEqualSelector(api.PodHostField, node.Name).String()} if err = framework.WaitForMatchPodsCondition(c, podOpts, "Running and Ready", podReadyTimeout, testutils.PodRunningReady); err != nil { framework.Failf("Pods on node %s are not ready and running within %v: %v", node.Name, podReadyTimeout, err) } @@ -191,12 +191,12 @@ var _ = framework.KubeDescribe("Network Partition [Disruptive] [Slow]", func() { var controller cache.Controller _, controller = cache.NewInformer( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { options.FieldSelector = nodeSelector.String() obj, err := f.ClientSet.Core().Nodes().List(options) return runtime.Object(obj), err }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { options.FieldSelector = nodeSelector.String() return f.ClientSet.Core().Nodes().Watch(options) }, @@ -264,7 +264,7 @@ var _ = framework.KubeDescribe("Network Partition [Disruptive] [Slow]", func() { By("choose a node with at least one pod - we will block some network traffic on this node") label := labels.SelectorFromSet(labels.Set(map[string]string{"name": name})) - options := v1.ListOptions{LabelSelector: label.String()} + options := metav1.ListOptions{LabelSelector: label.String()} pods, err := c.Core().Pods(ns).List(options) // list pods after all have been scheduled Expect(err).NotTo(HaveOccurred()) nodeName := pods.Items[0].Spec.NodeName @@ -329,7 +329,7 @@ var _ = framework.KubeDescribe("Network Partition [Disruptive] [Slow]", func() { By("choose a node with at least one pod - we will block some network traffic on this node") label := labels.SelectorFromSet(labels.Set(map[string]string{"name": name})) - options := v1.ListOptions{LabelSelector: label.String()} + options := metav1.ListOptions{LabelSelector: label.String()} pods, err := c.Core().Pods(ns).List(options) // list pods after all have been scheduled Expect(err).NotTo(HaveOccurred()) nodeName := pods.Items[0].Spec.NodeName @@ -449,7 +449,7 @@ var _ = framework.KubeDescribe("Network Partition [Disruptive] [Slow]", func() { Expect(err).NotTo(HaveOccurred()) By("choose a node with at least one pod - we will block some network traffic on this node") - options := v1.ListOptions{LabelSelector: label.String()} + options := metav1.ListOptions{LabelSelector: label.String()} pods, err := c.Core().Pods(ns).List(options) // list pods after all have been scheduled Expect(err).NotTo(HaveOccurred()) nodeName := pods.Items[0].Spec.NodeName diff --git a/vendor/k8s.io/kubernetes/test/e2e/node_problem_detector.go b/vendor/k8s.io/kubernetes/test/e2e/node_problem_detector.go index 279d8d97..227ec811 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/node_problem_detector.go +++ b/vendor/k8s.io/kubernetes/test/e2e/node_problem_detector.go @@ -23,15 +23,15 @@ import ( "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/kubernetes/pkg/api" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apiserver/pkg/authentication/serviceaccount" "k8s.io/kubernetes/pkg/api/v1" - rbacv1alpha1 "k8s.io/kubernetes/pkg/apis/rbac/v1alpha1" + rbacv1beta1 "k8s.io/kubernetes/pkg/apis/rbac/v1beta1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" coreclientset "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1" - "k8s.io/kubernetes/pkg/fields" - "k8s.io/kubernetes/pkg/serviceaccount" "k8s.io/kubernetes/pkg/util/system" "k8s.io/kubernetes/pkg/util/uuid" "k8s.io/kubernetes/test/e2e/framework" @@ -59,12 +59,12 @@ var _ = framework.KubeDescribe("NodeProblemDetector", func() { name = "node-problem-detector-" + uid configName = "node-problem-detector-config-" + uid // There is no namespace for Node, event recorder will set default namespace for node events. - eventNamespace = v1.NamespaceDefault + eventNamespace = metav1.NamespaceDefault // this test wants extra permissions. Since the namespace names are unique, we can leave this // lying around so we don't have to race any caches framework.BindClusterRole(f.ClientSet.Rbac(), "cluster-admin", f.Namespace.Name, - rbacv1alpha1.Subject{Kind: rbacv1alpha1.ServiceAccountKind, Namespace: f.Namespace.Name, Name: "default"}) + rbacv1beta1.Subject{Kind: rbacv1beta1.ServiceAccountKind, Namespace: f.Namespace.Name, Name: "default"}) err := framework.WaitForAuthorizationUpdate(f.ClientSet.Authorization(), serviceaccount.MakeUsername(f.Namespace.Name, "default"), @@ -104,7 +104,7 @@ var _ = framework.KubeDescribe("NodeProblemDetector", func() { ) var source, config, tmpDir string var node *v1.Node - var eventListOptions v1.ListOptions + var eventListOptions metav1.ListOptions injectCommand := func(timestamp time.Time, log string, num int) string { var commands []string for i := 0; i < num; i++ { @@ -147,7 +147,7 @@ var _ = framework.KubeDescribe("NodeProblemDetector", func() { ] }` By("Get a non master node to run the pod") - nodes, err := c.Core().Nodes().List(v1.ListOptions{}) + nodes, err := c.Core().Nodes().List(metav1.ListOptions{}) Expect(err).NotTo(HaveOccurred()) node = nil for _, n := range nodes.Items { @@ -161,17 +161,17 @@ var _ = framework.KubeDescribe("NodeProblemDetector", func() { selector := fields.Set{ "involvedObject.kind": "Node", "involvedObject.name": node.Name, - "involvedObject.namespace": v1.NamespaceAll, + "involvedObject.namespace": metav1.NamespaceAll, "source": source, }.AsSelector().String() - eventListOptions = v1.ListOptions{FieldSelector: selector} + eventListOptions = metav1.ListOptions{FieldSelector: selector} By("Create the test log file") tmpDir = "/tmp/" + name cmd := fmt.Sprintf("mkdir %s; > %s/%s", tmpDir, tmpDir, logFile) Expect(framework.IssueSSHCommand(cmd, framework.TestContext.Provider, node)).To(Succeed()) By("Create config map for the node problem detector") _, err = c.Core().ConfigMaps(ns).Create(&v1.ConfigMap{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: configName, }, Data: map[string]string{configFile: config}, @@ -179,7 +179,7 @@ var _ = framework.KubeDescribe("NodeProblemDetector", func() { Expect(err).NotTo(HaveOccurred()) By("Create the node problem detector") _, err = c.Core().Pods(ns).Create(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Spec: v1.PodSpec{ @@ -376,16 +376,16 @@ var _ = framework.KubeDescribe("NodeProblemDetector", func() { framework.Logf("Node Problem Detector logs:\n %s", log) } By("Delete the node problem detector") - c.Core().Pods(ns).Delete(name, v1.NewDeleteOptions(0)) + c.Core().Pods(ns).Delete(name, metav1.NewDeleteOptions(0)) By("Wait for the node problem detector to disappear") Expect(framework.WaitForPodToDisappear(c, ns, name, labels.Everything(), pollInterval, pollTimeout)).To(Succeed()) By("Delete the config map") c.Core().ConfigMaps(ns).Delete(configName, nil) By("Clean up the events") - Expect(c.Core().Events(eventNamespace).DeleteCollection(v1.NewDeleteOptions(0), eventListOptions)).To(Succeed()) + Expect(c.Core().Events(eventNamespace).DeleteCollection(metav1.NewDeleteOptions(0), eventListOptions)).To(Succeed()) By("Clean up the node condition") patch := []byte(fmt.Sprintf(`{"status":{"conditions":[{"$patch":"delete","type":"%s"}]}}`, condition)) - c.Core().RESTClient().Patch(api.StrategicMergePatchType).Resource("nodes").Name(node.Name).SubResource("status").Body(patch).Do() + c.Core().RESTClient().Patch(types.StrategicMergePatchType).Resource("nodes").Name(node.Name).SubResource("status").Body(patch).Do() By("Clean up the temporary directory") framework.IssueSSHCommand(fmt.Sprintf("rm -r %s", tmpDir), framework.TestContext.Provider, node) }) @@ -393,7 +393,7 @@ var _ = framework.KubeDescribe("NodeProblemDetector", func() { }) // verifyEvents verifies there are num specific events generated -func verifyEvents(e coreclientset.EventInterface, options v1.ListOptions, num int, reason, message string) error { +func verifyEvents(e coreclientset.EventInterface, options metav1.ListOptions, num int, reason, message string) error { events, err := e.List(options) if err != nil { return err @@ -412,7 +412,7 @@ func verifyEvents(e coreclientset.EventInterface, options v1.ListOptions, num in } // verifyNoEvents verifies there is no event generated -func verifyNoEvents(e coreclientset.EventInterface, options v1.ListOptions) error { +func verifyNoEvents(e coreclientset.EventInterface, options metav1.ListOptions) error { events, err := e.List(options) if err != nil { return err diff --git a/vendor/k8s.io/kubernetes/test/e2e/nodeoutofdisk.go b/vendor/k8s.io/kubernetes/test/e2e/nodeoutofdisk.go index 9135462f..a8d08d89 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/nodeoutofdisk.go +++ b/vendor/k8s.io/kubernetes/test/e2e/nodeoutofdisk.go @@ -23,11 +23,11 @@ import ( cadvisorapi "github.com/google/cadvisor/info/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/fields" "k8s.io/kubernetes/test/e2e/framework" . "github.com/onsi/ginkgo" @@ -140,7 +140,7 @@ var _ = framework.KubeDescribe("NodeOutOfDisk [Serial] [Flaky] [Disruptive]", fu "source": v1.DefaultSchedulerName, "reason": "FailedScheduling", }.AsSelector().String() - options := v1.ListOptions{FieldSelector: selector} + options := metav1.ListOptions{FieldSelector: selector} schedEvents, err := c.Core().Events(ns).List(options) framework.ExpectNoError(err) @@ -173,7 +173,7 @@ func createOutOfDiskPod(c clientset.Interface, ns, name string, milliCPU int64) podClient := c.Core().Pods(ns) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Spec: v1.PodSpec{ @@ -199,10 +199,10 @@ func createOutOfDiskPod(c clientset.Interface, ns, name string, milliCPU int64) // availCpu calculates the available CPU on a given node by subtracting the CPU requested by // all the pods from the total available CPU capacity on the node. func availCpu(c clientset.Interface, node *v1.Node) (int64, error) { - podClient := c.Core().Pods(v1.NamespaceAll) + podClient := c.Core().Pods(metav1.NamespaceAll) selector := fields.Set{"spec.nodeName": node.Name}.AsSelector().String() - options := v1.ListOptions{FieldSelector: selector} + options := metav1.ListOptions{FieldSelector: selector} pods, err := podClient.List(options) if err != nil { return 0, fmt.Errorf("failed to retrieve all the pods on node %s: %v", node.Name, err) diff --git a/vendor/k8s.io/kubernetes/test/e2e/opaque_resource.go b/vendor/k8s.io/kubernetes/test/e2e/opaque_resource.go index d2f91ccb..8d63acd7 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/opaque_resource.go +++ b/vendor/k8s.io/kubernetes/test/e2e/opaque_resource.go @@ -22,14 +22,15 @@ import ( "sync" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apimachinery/pkg/watch" - "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/cache" - "k8s.io/kubernetes/pkg/fields" "k8s.io/kubernetes/pkg/util/system" "k8s.io/kubernetes/test/e2e/framework" @@ -45,7 +46,7 @@ var _ = framework.KubeDescribe("Opaque resources [Feature:OpaqueResources]", fun BeforeEach(func() { if node == nil { // Priming invocation; select the first non-master node. - nodes, err := f.ClientSet.Core().Nodes().List(v1.ListOptions{}) + nodes, err := f.ClientSet.Core().Nodes().List(metav1.ListOptions{}) Expect(err).NotTo(HaveOccurred()) for _, n := range nodes.Items { if !system.IsMasterNode(n.Name) { @@ -139,7 +140,7 @@ var _ = framework.KubeDescribe("Opaque resources [Feature:OpaqueResources]", fun image := framework.GetPauseImageName(f.ClientSet) // This pod consumes 2 "foo" resources. pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "mult-container-oir", }, Spec: v1.PodSpec{ @@ -183,7 +184,7 @@ var _ = framework.KubeDescribe("Opaque resources [Feature:OpaqueResources]", fun limits = v1.ResourceList{} // This pod consumes 6 "foo" resources. pod = &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "mult-container-over-max-oir", }, Spec: v1.PodSpec{ @@ -228,7 +229,7 @@ var _ = framework.KubeDescribe("Opaque resources [Feature:OpaqueResources]", fun func addOpaqueResource(f *framework.Framework, nodeName string, opaqueResName v1.ResourceName) { action := func() error { patch := []byte(fmt.Sprintf(`[{"op": "add", "path": "/status/capacity/%s", "value": "5"}]`, escapeForJSONPatch(opaqueResName))) - return f.ClientSet.Core().RESTClient().Patch(api.JSONPatchType).Resource("nodes").Name(nodeName).SubResource("status").Body(patch).Do().Error() + return f.ClientSet.Core().RESTClient().Patch(types.JSONPatchType).Resource("nodes").Name(nodeName).SubResource("status").Body(patch).Do().Error() } predicate := func(n *v1.Node) bool { capacity, foundCap := n.Status.Capacity[opaqueResName] @@ -245,7 +246,7 @@ func addOpaqueResource(f *framework.Framework, nodeName string, opaqueResName v1 func removeOpaqueResource(f *framework.Framework, nodeName string, opaqueResName v1.ResourceName) { action := func() error { patch := []byte(fmt.Sprintf(`[{"op": "remove", "path": "/status/capacity/%s"}]`, escapeForJSONPatch(opaqueResName))) - f.ClientSet.Core().RESTClient().Patch(api.JSONPatchType).Resource("nodes").Name(nodeName).SubResource("status").Body(patch).Do() + f.ClientSet.Core().RESTClient().Patch(types.JSONPatchType).Resource("nodes").Name(nodeName).SubResource("status").Body(patch).Do() return nil // Ignore error -- the opaque resource may not exist. } predicate := func(n *v1.Node) bool { @@ -274,12 +275,12 @@ func observeNodeUpdateAfterAction(f *framework.Framework, nodeName string, nodeP _, controller := cache.NewInformer( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { options.FieldSelector = nodeSelector.String() ls, err := f.ClientSet.Core().Nodes().List(options) return ls, err }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { options.FieldSelector = nodeSelector.String() w, err := f.ClientSet.Core().Nodes().Watch(options) // Signal parent goroutine that watching has begun. @@ -330,11 +331,11 @@ func observeEventAfterAction(f *framework.Framework, eventPredicate func(*v1.Eve // Create an informer to list/watch events from the test framework namespace. _, controller := cache.NewInformer( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { ls, err := f.ClientSet.Core().Events(f.Namespace.Name).List(options) return ls, err }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { w, err := f.ClientSet.Core().Events(f.Namespace.Name).Watch(options) return w, err }, diff --git a/vendor/k8s.io/kubernetes/test/e2e/pd.go b/vendor/k8s.io/kubernetes/test/e2e/pd.go index 7bd9aa04..ce94e33b 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/pd.go +++ b/vendor/k8s.io/kubernetes/test/e2e/pd.go @@ -93,8 +93,8 @@ var _ = framework.KubeDescribe("Pod Disks", func() { // Teardown pods, PD. Ignore errors. // Teardown should do nothing unless test failed. By("cleaning up PD-RW test environment") - podClient.Delete(host0Pod.Name, v1.NewDeleteOptions(0)) - podClient.Delete(host1Pod.Name, v1.NewDeleteOptions(0)) + podClient.Delete(host0Pod.Name, metav1.NewDeleteOptions(0)) + podClient.Delete(host1Pod.Name, metav1.NewDeleteOptions(0)) detachAndDeletePDs(diskName, []types.NodeName{host0Name, host1Name}) }() @@ -115,7 +115,7 @@ var _ = framework.KubeDescribe("Pod Disks", func() { By("deleting host0Pod") // Delete pod with 0 grace period - framework.ExpectNoError(podClient.Delete(host0Pod.Name, v1.NewDeleteOptions(0)), "Failed to delete host0Pod") + framework.ExpectNoError(podClient.Delete(host0Pod.Name, metav1.NewDeleteOptions(0)), "Failed to delete host0Pod") By("submitting host1Pod to kubernetes") _, err = podClient.Create(host1Pod) @@ -133,7 +133,7 @@ var _ = framework.KubeDescribe("Pod Disks", func() { framework.ExpectNoError(waitForPDInVolumesInUse(nodeClient, diskName, host0Name, nodeStatusTimeout, false /* shouldExist */)) By("deleting host1Pod") - framework.ExpectNoError(podClient.Delete(host1Pod.Name, v1.NewDeleteOptions(0)), "Failed to delete host1Pod") + framework.ExpectNoError(podClient.Delete(host1Pod.Name, metav1.NewDeleteOptions(0)), "Failed to delete host1Pod") By("Test completed successfully, waiting for PD to safely detach") waitForPDDetach(diskName, host0Name) @@ -157,8 +157,8 @@ var _ = framework.KubeDescribe("Pod Disks", func() { // Teardown pods, PD. Ignore errors. // Teardown should do nothing unless test failed. By("cleaning up PD-RW test environment") - podClient.Delete(host0Pod.Name, &v1.DeleteOptions{}) - podClient.Delete(host1Pod.Name, &v1.DeleteOptions{}) + podClient.Delete(host0Pod.Name, &metav1.DeleteOptions{}) + podClient.Delete(host1Pod.Name, &metav1.DeleteOptions{}) detachAndDeletePDs(diskName, []types.NodeName{host0Name, host1Name}) }() @@ -179,7 +179,7 @@ var _ = framework.KubeDescribe("Pod Disks", func() { By("deleting host0Pod") // Delete pod with default grace period 30s - framework.ExpectNoError(podClient.Delete(host0Pod.Name, &v1.DeleteOptions{}), "Failed to delete host0Pod") + framework.ExpectNoError(podClient.Delete(host0Pod.Name, &metav1.DeleteOptions{}), "Failed to delete host0Pod") By("submitting host1Pod to kubernetes") _, err = podClient.Create(host1Pod) @@ -197,7 +197,7 @@ var _ = framework.KubeDescribe("Pod Disks", func() { framework.ExpectNoError(waitForPDInVolumesInUse(nodeClient, diskName, host0Name, nodeStatusTimeout, false /* shouldExist */)) By("deleting host1Pod") - framework.ExpectNoError(podClient.Delete(host1Pod.Name, &v1.DeleteOptions{}), "Failed to delete host1Pod") + framework.ExpectNoError(podClient.Delete(host1Pod.Name, &metav1.DeleteOptions{}), "Failed to delete host1Pod") By("Test completed successfully, waiting for PD to safely detach") waitForPDDetach(diskName, host0Name) @@ -221,9 +221,9 @@ var _ = framework.KubeDescribe("Pod Disks", func() { By("cleaning up PD-RO test environment") // Teardown pods, PD. Ignore errors. // Teardown should do nothing unless test failed. - podClient.Delete(rwPod.Name, v1.NewDeleteOptions(0)) - podClient.Delete(host0ROPod.Name, v1.NewDeleteOptions(0)) - podClient.Delete(host1ROPod.Name, v1.NewDeleteOptions(0)) + podClient.Delete(rwPod.Name, metav1.NewDeleteOptions(0)) + podClient.Delete(host0ROPod.Name, metav1.NewDeleteOptions(0)) + podClient.Delete(host1ROPod.Name, metav1.NewDeleteOptions(0)) detachAndDeletePDs(diskName, []types.NodeName{host0Name, host1Name}) }() @@ -232,7 +232,7 @@ var _ = framework.KubeDescribe("Pod Disks", func() { framework.ExpectNoError(err, "Failed to create rwPod") framework.ExpectNoError(f.WaitForPodRunningSlow(rwPod.Name)) // Delete pod with 0 grace period - framework.ExpectNoError(podClient.Delete(rwPod.Name, v1.NewDeleteOptions(0)), "Failed to delete host0Pod") + framework.ExpectNoError(podClient.Delete(rwPod.Name, metav1.NewDeleteOptions(0)), "Failed to delete host0Pod") framework.ExpectNoError(waitForPDDetach(diskName, host0Name)) By("submitting host0ROPod to kubernetes") @@ -248,10 +248,10 @@ var _ = framework.KubeDescribe("Pod Disks", func() { framework.ExpectNoError(f.WaitForPodRunningSlow(host1ROPod.Name)) By("deleting host0ROPod") - framework.ExpectNoError(podClient.Delete(host0ROPod.Name, v1.NewDeleteOptions(0)), "Failed to delete host0ROPod") + framework.ExpectNoError(podClient.Delete(host0ROPod.Name, metav1.NewDeleteOptions(0)), "Failed to delete host0ROPod") By("deleting host1ROPod") - framework.ExpectNoError(podClient.Delete(host1ROPod.Name, v1.NewDeleteOptions(0)), "Failed to delete host1ROPod") + framework.ExpectNoError(podClient.Delete(host1ROPod.Name, metav1.NewDeleteOptions(0)), "Failed to delete host1ROPod") By("Test completed successfully, waiting for PD to safely detach") waitForPDDetach(diskName, host0Name) @@ -273,9 +273,9 @@ var _ = framework.KubeDescribe("Pod Disks", func() { By("cleaning up PD-RO test environment") // Teardown pods, PD. Ignore errors. // Teardown should do nothing unless test failed. - podClient.Delete(rwPod.Name, &v1.DeleteOptions{}) - podClient.Delete(host0ROPod.Name, &v1.DeleteOptions{}) - podClient.Delete(host1ROPod.Name, &v1.DeleteOptions{}) + podClient.Delete(rwPod.Name, &metav1.DeleteOptions{}) + podClient.Delete(host0ROPod.Name, &metav1.DeleteOptions{}) + podClient.Delete(host1ROPod.Name, &metav1.DeleteOptions{}) detachAndDeletePDs(diskName, []types.NodeName{host0Name, host1Name}) }() @@ -284,7 +284,7 @@ var _ = framework.KubeDescribe("Pod Disks", func() { framework.ExpectNoError(err, "Failed to create rwPod") framework.ExpectNoError(f.WaitForPodRunningSlow(rwPod.Name)) // Delete pod with default grace period 30s - framework.ExpectNoError(podClient.Delete(rwPod.Name, &v1.DeleteOptions{}), "Failed to delete host0Pod") + framework.ExpectNoError(podClient.Delete(rwPod.Name, &metav1.DeleteOptions{}), "Failed to delete host0Pod") framework.ExpectNoError(waitForPDDetach(diskName, host0Name)) By("submitting host0ROPod to kubernetes") @@ -300,10 +300,10 @@ var _ = framework.KubeDescribe("Pod Disks", func() { framework.ExpectNoError(f.WaitForPodRunningSlow(host1ROPod.Name)) By("deleting host0ROPod") - framework.ExpectNoError(podClient.Delete(host0ROPod.Name, &v1.DeleteOptions{}), "Failed to delete host0ROPod") + framework.ExpectNoError(podClient.Delete(host0ROPod.Name, &metav1.DeleteOptions{}), "Failed to delete host0ROPod") By("deleting host1ROPod") - framework.ExpectNoError(podClient.Delete(host1ROPod.Name, &v1.DeleteOptions{}), "Failed to delete host1ROPod") + framework.ExpectNoError(podClient.Delete(host1ROPod.Name, &metav1.DeleteOptions{}), "Failed to delete host1ROPod") By("Test completed successfully, waiting for PD to safely detach") waitForPDDetach(diskName, host0Name) @@ -324,7 +324,7 @@ var _ = framework.KubeDescribe("Pod Disks", func() { // Teardown pods, PD. Ignore errors. // Teardown should do nothing unless test failed. if host0Pod != nil { - podClient.Delete(host0Pod.Name, v1.NewDeleteOptions(0)) + podClient.Delete(host0Pod.Name, metav1.NewDeleteOptions(0)) } detachAndDeletePDs(diskName, []types.NodeName{host0Name}) }() @@ -356,7 +356,7 @@ var _ = framework.KubeDescribe("Pod Disks", func() { verifyPDContentsViaContainer(f, host0Pod.Name, containerName, fileAndContentToVerify) By("deleting host0Pod") - framework.ExpectNoError(podClient.Delete(host0Pod.Name, v1.NewDeleteOptions(0)), "Failed to delete host0Pod") + framework.ExpectNoError(podClient.Delete(host0Pod.Name, metav1.NewDeleteOptions(0)), "Failed to delete host0Pod") } By("Test completed successfully, waiting for PD to safely detach") @@ -379,7 +379,7 @@ var _ = framework.KubeDescribe("Pod Disks", func() { // Teardown pods, PD. Ignore errors. // Teardown should do nothing unless test failed. if host0Pod != nil { - podClient.Delete(host0Pod.Name, v1.NewDeleteOptions(0)) + podClient.Delete(host0Pod.Name, metav1.NewDeleteOptions(0)) } detachAndDeletePDs(disk1Name, []types.NodeName{host0Name}) detachAndDeletePDs(disk2Name, []types.NodeName{host0Name}) @@ -415,7 +415,7 @@ var _ = framework.KubeDescribe("Pod Disks", func() { verifyPDContentsViaContainer(f, host0Pod.Name, containerName, fileAndContentToVerify) By("deleting host0Pod") - framework.ExpectNoError(podClient.Delete(host0Pod.Name, v1.NewDeleteOptions(0)), "Failed to delete host0Pod") + framework.ExpectNoError(podClient.Delete(host0Pod.Name, metav1.NewDeleteOptions(0)), "Failed to delete host0Pod") } By("Test completed successfully, waiting for PD to safely detach") @@ -439,7 +439,7 @@ var _ = framework.KubeDescribe("Pod Disks", func() { defer func() { By("Cleaning up PD-RW test env") - podClient.Delete(host0Pod.Name, v1.NewDeleteOptions(0)) + podClient.Delete(host0Pod.Name, metav1.NewDeleteOptions(0)) detachAndDeletePDs(diskName, []types.NodeName{host0Name}) }() @@ -521,10 +521,10 @@ var _ = framework.KubeDescribe("Pod Disks", func() { framework.ExpectNoError(waitForPDInVolumesInUse(nodeClient, diskName, host0Name, nodeStatusTimeout, true /* should exist*/)) By("deleting api object of host0") - framework.ExpectNoError(nodeClient.Delete(string(host0Name), v1.NewDeleteOptions(0)), "Unable to delete host0") + framework.ExpectNoError(nodeClient.Delete(string(host0Name), metav1.NewDeleteOptions(0)), "Unable to delete host0") By("deleting host0pod") - framework.ExpectNoError(podClient.Delete(host0Pod.Name, v1.NewDeleteOptions(0)), "Unable to delete host0Pod") + framework.ExpectNoError(podClient.Delete(host0Pod.Name, metav1.NewDeleteOptions(0)), "Unable to delete host0Pod") // The disk should be detached from host0 on its deletion By("Waiting for pd to detach from host0") framework.ExpectNoError(waitForPDDetach(diskName, host0Name), "Timed out waiting for detach pd") @@ -727,7 +727,7 @@ func testPDPod(diskNames []string, targetNode types.NodeName, readOnly bool, num Kind: "Pod", APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String(), }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pd-test-" + string(uuid.NewUUID()), }, Spec: v1.PodSpec{ diff --git a/vendor/k8s.io/kubernetes/test/e2e/persistent_volumes-disruptive.go b/vendor/k8s.io/kubernetes/test/e2e/persistent_volumes-disruptive.go index 2ef8fff6..b7ad48e3 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/persistent_volumes-disruptive.go +++ b/vendor/k8s.io/kubernetes/test/e2e/persistent_volumes-disruptive.go @@ -60,7 +60,7 @@ var _ = framework.KubeDescribe("PersistentVolumes [Disruptive]", func() { ) nfsServerConfig := VolumeTestConfig{ - namespace: v1.NamespaceDefault, + namespace: metav1.NamespaceDefault, prefix: "nfs", serverImage: NfsServerImage, serverPorts: []int{2049}, diff --git a/vendor/k8s.io/kubernetes/test/e2e/persistent_volumes.go b/vendor/k8s.io/kubernetes/test/e2e/persistent_volumes.go index 5a58fb44..b492ece9 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/persistent_volumes.go +++ b/vendor/k8s.io/kubernetes/test/e2e/persistent_volumes.go @@ -507,7 +507,7 @@ var _ = framework.KubeDescribe("PersistentVolumes", func() { // config for the nfs-server pod in the default namespace NFSconfig = VolumeTestConfig{ - namespace: v1.NamespaceDefault, + namespace: metav1.NamespaceDefault, prefix: "nfs", serverImage: NfsServerImage, serverPorts: []int{2049}, @@ -775,7 +775,7 @@ func makePersistentVolume(pvConfig persistentVolumeConfig) *v1.PersistentVolume } return &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ GenerateName: pvConfig.namePrefix, Annotations: map[string]string{ volumehelper.VolumeGidAnnotationKey: "777", @@ -805,7 +805,7 @@ func makePersistentVolumeClaim(ns string) *v1.PersistentVolumeClaim { // Specs are expected to match this test's PersistentVolume return &v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ GenerateName: "pvc-", Namespace: ns, Annotations: map[string]string{ @@ -846,7 +846,7 @@ func makePod(ns string, pvcName string, command ...string) *v1.Pod { Kind: "Pod", APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String(), }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ GenerateName: "client-", Namespace: ns, }, diff --git a/vendor/k8s.io/kubernetes/test/e2e/pod_gc.go b/vendor/k8s.io/kubernetes/test/e2e/pod_gc.go index 8da6ee8d..796e92d5 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/pod_gc.go +++ b/vendor/k8s.io/kubernetes/test/e2e/pod_gc.go @@ -22,6 +22,7 @@ import ( . "github.com/onsi/ginkgo" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/util/uuid" @@ -61,7 +62,7 @@ var _ = framework.KubeDescribe("Pod garbage collector [Feature:PodGarbageCollect By(fmt.Sprintf("Waiting for gc controller to gc all but %d pods", gcThreshold)) pollErr := wait.Poll(1*time.Minute, timeout, func() (bool, error) { - pods, err = f.ClientSet.Core().Pods(f.Namespace.Name).List(v1.ListOptions{}) + pods, err = f.ClientSet.Core().Pods(f.Namespace.Name).List(metav1.ListOptions{}) if err != nil { framework.Logf("Failed to list pod %v", err) return false, nil @@ -81,11 +82,8 @@ var _ = framework.KubeDescribe("Pod garbage collector [Feature:PodGarbageCollect func createTerminatingPod(f *framework.Framework) (*v1.Pod, error) { uuid := uuid.NewUUID() pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: string(uuid), - Annotations: map[string]string{ - "scheduler.alpha.kubernetes.io/name": "please don't schedule my pods", - }, }, Spec: v1.PodSpec{ Containers: []v1.Container{ @@ -94,6 +92,7 @@ func createTerminatingPod(f *framework.Framework) (*v1.Pod, error) { Image: "gcr.io/google_containers/busybox:1.24", }, }, + SchedulerName: "please don't schedule my pods", }, } return f.ClientSet.Core().Pods(f.Namespace.Name).Create(pod) diff --git a/vendor/k8s.io/kubernetes/test/e2e/pods.go b/vendor/k8s.io/kubernetes/test/e2e/pods.go index efdc0da5..09f0d5c8 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/pods.go +++ b/vendor/k8s.io/kubernetes/test/e2e/pods.go @@ -50,7 +50,7 @@ var _ = framework.KubeDescribe("Pods Extended", func() { name := "pod-submit-remove-" + string(uuid.NewUUID()) value := strconv.Itoa(time.Now().Nanosecond()) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Labels: map[string]string{ "name": "foo", @@ -69,11 +69,11 @@ var _ = framework.KubeDescribe("Pods Extended", func() { By("setting up watch") selector := labels.SelectorFromSet(labels.Set(map[string]string{"time": value})) - options := v1.ListOptions{LabelSelector: selector.String()} + options := metav1.ListOptions{LabelSelector: selector.String()} pods, err := podClient.List(options) Expect(err).NotTo(HaveOccurred(), "failed to query for pod") Expect(len(pods.Items)).To(Equal(0)) - options = v1.ListOptions{ + options = metav1.ListOptions{ LabelSelector: selector.String(), ResourceVersion: pods.ListMeta.ResourceVersion, } @@ -85,7 +85,7 @@ var _ = framework.KubeDescribe("Pods Extended", func() { By("verifying the pod is in kubernetes") selector = labels.SelectorFromSet(labels.Set(map[string]string{"time": value})) - options = v1.ListOptions{LabelSelector: selector.String()} + options = metav1.ListOptions{LabelSelector: selector.String()} pods, err = podClient.List(options) Expect(err).NotTo(HaveOccurred(), "failed to query for pod") Expect(len(pods.Items)).To(Equal(1)) @@ -184,7 +184,7 @@ var _ = framework.KubeDescribe("Pods Extended", func() { Expect(lastPod.Spec.TerminationGracePeriodSeconds).ToNot(BeZero()) selector = labels.SelectorFromSet(labels.Set(map[string]string{"time": value})) - options = v1.ListOptions{LabelSelector: selector.String()} + options = metav1.ListOptions{LabelSelector: selector.String()} pods, err = podClient.List(options) Expect(err).NotTo(HaveOccurred(), "failed to query for pods") Expect(len(pods.Items)).To(Equal(0)) @@ -201,7 +201,7 @@ var _ = framework.KubeDescribe("Pods Extended", func() { By("creating the pod") name := "pod-qos-class-" + string(uuid.NewUUID()) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Labels: map[string]string{ "name": name, diff --git a/vendor/k8s.io/kubernetes/test/e2e/portforward.go b/vendor/k8s.io/kubernetes/test/e2e/portforward.go index d719952a..55af281e 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/portforward.go +++ b/vendor/k8s.io/kubernetes/test/e2e/portforward.go @@ -28,6 +28,7 @@ import ( "syscall" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/kubernetes/pkg/api/v1" utilversion "k8s.io/kubernetes/pkg/util/version" @@ -49,7 +50,7 @@ var ( func pfPod(expectedClientData, chunks, chunkSize, chunkIntervalMillis string, bindAddress string) *v1.Pod { return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, Labels: map[string]string{"name": podName}, }, diff --git a/vendor/k8s.io/kubernetes/test/e2e/pre_stop.go b/vendor/k8s.io/kubernetes/test/e2e/pre_stop.go index 7cebfdec..cdd7d05a 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/pre_stop.go +++ b/vendor/k8s.io/kubernetes/test/e2e/pre_stop.go @@ -25,10 +25,10 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/apiserver/pkg/authentication/serviceaccount" "k8s.io/kubernetes/pkg/api/v1" - rbacv1alpha1 "k8s.io/kubernetes/pkg/apis/rbac/v1alpha1" + rbacv1beta1 "k8s.io/kubernetes/pkg/apis/rbac/v1beta1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/serviceaccount" "k8s.io/kubernetes/test/e2e/framework" . "github.com/onsi/ginkgo" @@ -42,7 +42,7 @@ type State struct { func testPreStop(c clientset.Interface, ns string) { // This is the server that will receive the preStop notification podDescr := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "server", }, Spec: v1.PodSpec{ @@ -75,7 +75,7 @@ func testPreStop(c clientset.Interface, ns string) { framework.ExpectNoError(err, "getting pod info") preStopDescr := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "tester", }, Spec: v1.PodSpec{ @@ -181,7 +181,7 @@ var _ = framework.KubeDescribe("PreStop", func() { // this test wants extra permissions. Since the namespace names are unique, we can leave this // lying around so we don't have to race any caches framework.BindClusterRole(f.ClientSet.Rbac(), "cluster-admin", f.Namespace.Name, - rbacv1alpha1.Subject{Kind: rbacv1alpha1.ServiceAccountKind, Namespace: f.Namespace.Name, Name: "default"}) + rbacv1beta1.Subject{Kind: rbacv1beta1.ServiceAccountKind, Namespace: f.Namespace.Name, Name: "default"}) err := framework.WaitForAuthorizationUpdate(f.ClientSet.Authorization(), serviceaccount.MakeUsername(f.Namespace.Name, "default"), diff --git a/vendor/k8s.io/kubernetes/test/e2e/proxy.go b/vendor/k8s.io/kubernetes/test/e2e/proxy.go index dab5daba..fb57c6f6 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/proxy.go +++ b/vendor/k8s.io/kubernetes/test/e2e/proxy.go @@ -25,6 +25,7 @@ import ( "time" "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/net" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" @@ -72,7 +73,7 @@ var _ = framework.KubeDescribe("Proxy", func() { start := time.Now() labels := map[string]string{"proxy-service-target": "true"} service, err := f.ClientSet.Core().Services(f.Namespace.Name).Create(&v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ GenerateName: "proxy-service-", }, Spec: v1.ServiceSpec{ diff --git a/vendor/k8s.io/kubernetes/test/e2e/rc.go b/vendor/k8s.io/kubernetes/test/e2e/rc.go index b2e43a9a..b3d9d546 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/rc.go +++ b/vendor/k8s.io/kubernetes/test/e2e/rc.go @@ -55,13 +55,13 @@ var _ = framework.KubeDescribe("ReplicationController", func() { func newRC(rsName string, replicas int32, rcPodLabels map[string]string, imageName string, image string) *v1.ReplicationController { zero := int64(0) return &v1.ReplicationController{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: rsName, }, Spec: v1.ReplicationControllerSpec{ Replicas: func(i int32) *int32 { return &i }(replicas), Template: &v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: rcPodLabels, }, Spec: v1.PodSpec{ @@ -91,7 +91,7 @@ func ServeImageOrFail(f *framework.Framework, test string, image string) { // in contrib/for-demos/serve_hostname By(fmt.Sprintf("Creating replication controller %s", name)) controller, err := f.ClientSet.Core().ReplicationControllers(f.Namespace.Name).Create(&v1.ReplicationController{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Spec: v1.ReplicationControllerSpec{ @@ -100,7 +100,7 @@ func ServeImageOrFail(f *framework.Framework, test string, image string) { "name": name, }, Template: &v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"name": name}, }, Spec: v1.PodSpec{ diff --git a/vendor/k8s.io/kubernetes/test/e2e/reboot.go b/vendor/k8s.io/kubernetes/test/e2e/reboot.go index 04b5d54a..6980a9ae 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/reboot.go +++ b/vendor/k8s.io/kubernetes/test/e2e/reboot.go @@ -23,12 +23,12 @@ import ( "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/fields" "k8s.io/kubernetes/test/e2e/framework" testutils "k8s.io/kubernetes/test/utils" @@ -65,9 +65,9 @@ var _ = framework.KubeDescribe("Reboot [Disruptive] [Feature:Reboot]", func() { if CurrentGinkgoTestDescription().Failed { // Most of the reboot tests just make sure that addon/system pods are running, so dump // events for the kube-system namespace on failures - namespaceName := api.NamespaceSystem + namespaceName := metav1.NamespaceSystem By(fmt.Sprintf("Collecting events from namespace %q.", namespaceName)) - events, err := f.ClientSet.Core().Events(namespaceName).List(v1.ListOptions{}) + events, err := f.ClientSet.Core().Events(namespaceName).List(metav1.ListOptions{}) Expect(err).NotTo(HaveOccurred()) for _, e := range events.Items { @@ -218,7 +218,7 @@ func printStatusAndLogsForNotReadyPods(c clientset.Interface, ns string, podName // failed step, it will return false through result and not run the rest. func rebootNode(c clientset.Interface, provider, name, rebootCmd string) bool { // Setup - ns := api.NamespaceSystem + ns := metav1.NamespaceSystem ps := testutils.NewPodStore(c, ns, labels.Everything(), fields.OneTermEqualSelector(api.PodHostField, name)) defer ps.Stop() diff --git a/vendor/k8s.io/kubernetes/test/e2e/replica_set.go b/vendor/k8s.io/kubernetes/test/e2e/replica_set.go index b6ba370e..6bd7fb9d 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/replica_set.go +++ b/vendor/k8s.io/kubernetes/test/e2e/replica_set.go @@ -37,13 +37,13 @@ import ( func newRS(rsName string, replicas int32, rsPodLabels map[string]string, imageName string, image string) *extensions.ReplicaSet { zero := int64(0) return &extensions.ReplicaSet{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: rsName, }, Spec: extensions.ReplicaSetSpec{ Replicas: func(i int32) *int32 { return &i }(replicas), Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: rsPodLabels, }, Spec: v1.PodSpec{ @@ -62,7 +62,7 @@ func newRS(rsName string, replicas int32, rsPodLabels map[string]string, imageNa func newPodQuota(name, number string) *v1.ResourceQuota { return &v1.ResourceQuota{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Spec: v1.ResourceQuotaSpec{ @@ -103,7 +103,7 @@ func ReplicaSetServeImageOrFail(f *framework.Framework, test string, image strin // in contrib/for-demos/serve_hostname By(fmt.Sprintf("Creating ReplicaSet %s", name)) rs, err := f.ClientSet.Extensions().ReplicaSets(f.Namespace.Name).Create(&extensions.ReplicaSet{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Spec: extensions.ReplicaSetSpec{ @@ -112,7 +112,7 @@ func ReplicaSetServeImageOrFail(f *framework.Framework, test string, image strin "name": name, }}, Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"name": name}, }, Spec: v1.PodSpec{ diff --git a/vendor/k8s.io/kubernetes/test/e2e/rescheduler.go b/vendor/k8s.io/kubernetes/test/e2e/rescheduler.go index 7b524d4c..48af919d 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/rescheduler.go +++ b/vendor/k8s.io/kubernetes/test/e2e/rescheduler.go @@ -20,8 +20,8 @@ import ( "fmt" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" - "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/test/e2e/framework" testutils "k8s.io/kubernetes/test/utils" @@ -55,16 +55,16 @@ var _ = framework.KubeDescribe("Rescheduler [Serial]", func() { By("creating a new instance of Dashboard and waiting for Dashboard to be scheduled") label := labels.SelectorFromSet(labels.Set(map[string]string{"k8s-app": "kubernetes-dashboard"})) - listOpts := v1.ListOptions{LabelSelector: label.String()} - deployments, err := f.ClientSet.Extensions().Deployments(api.NamespaceSystem).List(listOpts) + listOpts := metav1.ListOptions{LabelSelector: label.String()} + deployments, err := f.ClientSet.Extensions().Deployments(metav1.NamespaceSystem).List(listOpts) framework.ExpectNoError(err) Expect(len(deployments.Items)).Should(Equal(1)) deployment := deployments.Items[0] replicas := uint(*(deployment.Spec.Replicas)) - err = framework.ScaleDeployment(f.ClientSet, f.InternalClientset, api.NamespaceSystem, deployment.Name, replicas+1, true) - defer framework.ExpectNoError(framework.ScaleDeployment(f.ClientSet, f.InternalClientset, api.NamespaceSystem, deployment.Name, replicas, true)) + err = framework.ScaleDeployment(f.ClientSet, f.InternalClientset, metav1.NamespaceSystem, deployment.Name, replicas+1, true) + defer framework.ExpectNoError(framework.ScaleDeployment(f.ClientSet, f.InternalClientset, metav1.NamespaceSystem, deployment.Name, replicas, true)) framework.ExpectNoError(err) }) diff --git a/vendor/k8s.io/kubernetes/test/e2e/resize_nodes.go b/vendor/k8s.io/kubernetes/test/e2e/resize_nodes.go index 6ce277c5..e15841cd 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/resize_nodes.go +++ b/vendor/k8s.io/kubernetes/test/e2e/resize_nodes.go @@ -24,7 +24,6 @@ import ( "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/pkg/util/intstr" @@ -138,7 +137,7 @@ func WaitForGroupSize(group string, size int32) error { func svcByName(name string, port int) *v1.Service { return &v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Spec: v1.ServiceSpec{ @@ -238,10 +237,10 @@ var _ = framework.KubeDescribe("Nodes [Disruptive]", func() { // Many e2e tests assume that the cluster is fully healthy before they start. Wait until // the cluster is restored to health. By("waiting for system pods to successfully restart") - err := framework.WaitForPodsRunningReady(c, api.NamespaceSystem, systemPodsNo, framework.PodReadyBeforeTimeout, ignoreLabels, true) + err := framework.WaitForPodsRunningReady(c, metav1.NamespaceSystem, systemPodsNo, framework.PodReadyBeforeTimeout, ignoreLabels, true) Expect(err).NotTo(HaveOccurred()) By("waiting for image prepulling pods to complete") - framework.WaitForPodsSuccess(c, api.NamespaceSystem, framework.ImagePullerLabels, imagePrePullingTimeout) + framework.WaitForPodsSuccess(c, metav1.NamespaceSystem, framework.ImagePullerLabels, imagePrePullingTimeout) }) It("should be able to delete nodes", func() { diff --git a/vendor/k8s.io/kubernetes/test/e2e/resource_quota.go b/vendor/k8s.io/kubernetes/test/e2e/resource_quota.go index 693fceca..00a798ac 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/resource_quota.go +++ b/vendor/k8s.io/kubernetes/test/e2e/resource_quota.go @@ -93,7 +93,7 @@ var _ = framework.KubeDescribe("ResourceQuota", func() { It("should create a ResourceQuota and capture the life of a secret.", func() { By("Discovering how many secrets are in namespace by default") - secrets, err := f.ClientSet.Core().Secrets(f.Namespace.Name).List(v1.ListOptions{}) + secrets, err := f.ClientSet.Core().Secrets(f.Namespace.Name).List(metav1.ListOptions{}) Expect(err).NotTo(HaveOccurred()) defaultSecrets := fmt.Sprintf("%d", len(secrets.Items)) hardSecrets := fmt.Sprintf("%d", len(secrets.Items)+1) @@ -188,7 +188,7 @@ var _ = framework.KubeDescribe("ResourceQuota", func() { Expect(err).NotTo(HaveOccurred()) By("Deleting the pod") - err = f.ClientSet.Core().Pods(f.Namespace.Name).Delete(podName, v1.NewDeleteOptions(0)) + err = f.ClientSet.Core().Pods(f.Namespace.Name).Delete(podName, metav1.NewDeleteOptions(0)) Expect(err).NotTo(HaveOccurred()) By("Ensuring resource quota status released the pod usage") @@ -410,7 +410,7 @@ var _ = framework.KubeDescribe("ResourceQuota", func() { Expect(err).NotTo(HaveOccurred()) By("Deleting the pod") - err = f.ClientSet.Core().Pods(f.Namespace.Name).Delete(podName, v1.NewDeleteOptions(0)) + err = f.ClientSet.Core().Pods(f.Namespace.Name).Delete(podName, metav1.NewDeleteOptions(0)) Expect(err).NotTo(HaveOccurred()) By("Ensuring resource quota status released the pod usage") @@ -449,7 +449,7 @@ var _ = framework.KubeDescribe("ResourceQuota", func() { Expect(err).NotTo(HaveOccurred()) By("Deleting the pod") - err = f.ClientSet.Core().Pods(f.Namespace.Name).Delete(podName, v1.NewDeleteOptions(0)) + err = f.ClientSet.Core().Pods(f.Namespace.Name).Delete(podName, metav1.NewDeleteOptions(0)) Expect(err).NotTo(HaveOccurred()) By("Ensuring resource quota status released the pod usage") @@ -497,7 +497,7 @@ var _ = framework.KubeDescribe("ResourceQuota", func() { Expect(err).NotTo(HaveOccurred()) By("Deleting the pod") - err = f.ClientSet.Core().Pods(f.Namespace.Name).Delete(pod.Name, v1.NewDeleteOptions(0)) + err = f.ClientSet.Core().Pods(f.Namespace.Name).Delete(pod.Name, metav1.NewDeleteOptions(0)) Expect(err).NotTo(HaveOccurred()) By("Ensuring resource quota status released the pod usage") @@ -527,7 +527,7 @@ var _ = framework.KubeDescribe("ResourceQuota", func() { Expect(err).NotTo(HaveOccurred()) By("Deleting the pod") - err = f.ClientSet.Core().Pods(f.Namespace.Name).Delete(pod.Name, v1.NewDeleteOptions(0)) + err = f.ClientSet.Core().Pods(f.Namespace.Name).Delete(pod.Name, metav1.NewDeleteOptions(0)) Expect(err).NotTo(HaveOccurred()) By("Ensuring resource quota status released the pod usage") @@ -549,7 +549,7 @@ func newTestResourceQuotaWithScope(name string, scope v1.ResourceQuotaScope) *v1 hard[v1.ResourceLimitsMemory] = resource.MustParse("1Gi") } return &v1.ResourceQuota{ - ObjectMeta: v1.ObjectMeta{Name: name}, + ObjectMeta: metav1.ObjectMeta{Name: name}, Spec: v1.ResourceQuotaSpec{Hard: hard, Scopes: []v1.ResourceQuotaScope{scope}}, } } @@ -572,7 +572,7 @@ func newTestResourceQuota(name string) *v1.ResourceQuota { hard[core.V1ResourceByStorageClass("gold", v1.ResourcePersistentVolumeClaims)] = resource.MustParse("10") hard[core.V1ResourceByStorageClass("gold", v1.ResourceRequestsStorage)] = resource.MustParse("10Gi") return &v1.ResourceQuota{ - ObjectMeta: v1.ObjectMeta{Name: name}, + ObjectMeta: metav1.ObjectMeta{Name: name}, Spec: v1.ResourceQuotaSpec{Hard: hard}, } } @@ -580,7 +580,7 @@ func newTestResourceQuota(name string) *v1.ResourceQuota { // newTestPodForQuota returns a pod that has the specified requests and limits func newTestPodForQuota(f *framework.Framework, name string, requests v1.ResourceList, limits v1.ResourceList) *v1.Pod { return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Spec: v1.PodSpec{ @@ -601,7 +601,7 @@ func newTestPodForQuota(f *framework.Framework, name string, requests v1.Resourc // newTestPersistentVolumeClaimForQuota returns a simple persistent volume claim func newTestPersistentVolumeClaimForQuota(name string) *v1.PersistentVolumeClaim { return &v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Spec: v1.PersistentVolumeClaimSpec{ @@ -622,7 +622,7 @@ func newTestPersistentVolumeClaimForQuota(name string) *v1.PersistentVolumeClaim // newTestReplicationControllerForQuota returns a simple replication controller func newTestReplicationControllerForQuota(name, image string, replicas int32) *v1.ReplicationController { return &v1.ReplicationController{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Spec: v1.ReplicationControllerSpec{ @@ -631,7 +631,7 @@ func newTestReplicationControllerForQuota(name, image string, replicas int32) *v "name": name, }, Template: &v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"name": name}, }, Spec: v1.PodSpec{ @@ -650,7 +650,7 @@ func newTestReplicationControllerForQuota(name, image string, replicas int32) *v // newTestServiceForQuota returns a simple service func newTestServiceForQuota(name string, serviceType v1.ServiceType) *v1.Service { return &v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Spec: v1.ServiceSpec{ @@ -665,7 +665,7 @@ func newTestServiceForQuota(name string, serviceType v1.ServiceType) *v1.Service func newTestConfigMapForQuota(name string) *v1.ConfigMap { return &v1.ConfigMap{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Data: map[string]string{ @@ -676,7 +676,7 @@ func newTestConfigMapForQuota(name string) *v1.ConfigMap { func newTestSecretForQuota(name string) *v1.Secret { return &v1.Secret{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Data: map[string][]byte{ diff --git a/vendor/k8s.io/kubernetes/test/e2e/restart.go b/vendor/k8s.io/kubernetes/test/e2e/restart.go index 962f46c5..a710e68d 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/restart.go +++ b/vendor/k8s.io/kubernetes/test/e2e/restart.go @@ -21,11 +21,10 @@ import ( "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" - "k8s.io/kubernetes/pkg/fields" kubepod "k8s.io/kubernetes/pkg/kubelet/pod" "k8s.io/kubernetes/test/e2e/framework" testutils "k8s.io/kubernetes/test/utils" @@ -65,7 +64,7 @@ var _ = framework.KubeDescribe("Restart [Disruptive]", func() { // check must be identical to that call. framework.SkipUnlessProviderIs("gce", "gke") - ps = testutils.NewPodStore(f.ClientSet, api.NamespaceSystem, labels.Everything(), fields.Everything()) + ps = testutils.NewPodStore(f.ClientSet, metav1.NamespaceSystem, labels.Everything(), fields.Everything()) }) AfterEach(func() { @@ -90,7 +89,7 @@ var _ = framework.KubeDescribe("Restart [Disruptive]", func() { for i, p := range pods { podNamesBefore[i] = p.ObjectMeta.Name } - ns := api.NamespaceSystem + ns := metav1.NamespaceSystem if !framework.CheckPodsRunningReadyOrSucceeded(f.ClientSet, ns, podNamesBefore, framework.PodReadyBeforeTimeout) { framework.Failf("At least one pod wasn't running and ready or succeeded at test start.") } diff --git a/vendor/k8s.io/kubernetes/test/e2e/scheduler_predicates.go b/vendor/k8s.io/kubernetes/test/e2e/scheduler_predicates.go index a65d2d5d..79e9a806 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/scheduler_predicates.go +++ b/vendor/k8s.io/kubernetes/test/e2e/scheduler_predicates.go @@ -23,7 +23,6 @@ import ( "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" @@ -91,7 +90,7 @@ var _ = framework.KubeDescribe("SchedulerPredicates [Serial]", func() { } } - err = framework.WaitForPodsRunningReady(cs, api.NamespaceSystem, int32(systemPodsNo), framework.PodReadyBeforeTimeout, ignoreLabels, true) + err = framework.WaitForPodsRunningReady(cs, metav1.NamespaceSystem, int32(systemPodsNo), framework.PodReadyBeforeTimeout, ignoreLabels, true) Expect(err).NotTo(HaveOccurred()) for _, node := range nodeList.Items { @@ -158,7 +157,7 @@ var _ = framework.KubeDescribe("SchedulerPredicates [Serial]", func() { } framework.WaitForStableCluster(cs, masterNodes) - pods, err := cs.Core().Pods(v1.NamespaceAll).List(v1.ListOptions{}) + pods, err := cs.Core().Pods(metav1.NamespaceAll).List(metav1.ListOptions{}) framework.ExpectNoError(err) for _, pod := range pods.Items { _, found := nodeToCapacityMap[pod.Spec.NodeName] @@ -506,7 +505,7 @@ var _ = framework.KubeDescribe("SchedulerPredicates [Serial]", func() { By("Launching two pods on two distinct nodes to get two node names") CreateHostPortPods(f, "host-port", 2, true) defer framework.DeleteRCAndPods(f.ClientSet, f.InternalClientset, ns, "host-port") - podList, err := cs.Core().Pods(ns).List(v1.ListOptions{}) + podList, err := cs.Core().Pods(ns).List(metav1.ListOptions{}) framework.ExpectNoError(err) Expect(len(podList.Items)).To(Equal(2)) nodeNames := []string{podList.Items[0].Spec.NodeName, podList.Items[1].Spec.NodeName} @@ -759,7 +758,7 @@ var _ = framework.KubeDescribe("SchedulerPredicates [Serial]", func() { func initPausePod(f *framework.Framework, conf pausePodConfig) *v1.Pod { pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: conf.Name, Labels: conf.Labels, Annotations: conf.Annotations, @@ -803,7 +802,7 @@ func runPodAndGetNodeName(f *framework.Framework, conf pausePodConfig) string { pod := runPausePod(f, conf) By("Explicitly delete pod here to free the resource it takes.") - err := f.ClientSet.Core().Pods(f.Namespace.Name).Delete(pod.Name, v1.NewDeleteOptions(0)) + err := f.ClientSet.Core().Pods(f.Namespace.Name).Delete(pod.Name, metav1.NewDeleteOptions(0)) framework.ExpectNoError(err) return pod.Spec.NodeName @@ -917,7 +916,7 @@ func waitForScheduler() { // TODO: upgrade calls in PodAffinity tests when we're able to run them func verifyResult(c clientset.Interface, expectedScheduled int, expectedNotScheduled int, ns string) { - allPods, err := c.Core().Pods(ns).List(v1.ListOptions{}) + allPods, err := c.Core().Pods(ns).List(metav1.ListOptions{}) framework.ExpectNoError(err) scheduledPods, notScheduledPods := framework.GetPodsScheduled(masterNodes, allPods) diff --git a/vendor/k8s.io/kubernetes/test/e2e/security_context.go b/vendor/k8s.io/kubernetes/test/e2e/security_context.go index ef4867a4..dd41f707 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/security_context.go +++ b/vendor/k8s.io/kubernetes/test/e2e/security_context.go @@ -37,7 +37,7 @@ import ( func scTestPod(hostIPC bool, hostPID bool) *v1.Pod { podName := "security-context-" + string(uuid.NewUUID()) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, Labels: map[string]string{"name": podName}, Annotations: map[string]string{}, diff --git a/vendor/k8s.io/kubernetes/test/e2e/service.go b/vendor/k8s.io/kubernetes/test/e2e/service.go index 9403da5f..48a87412 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/service.go +++ b/vendor/k8s.io/kubernetes/test/e2e/service.go @@ -66,7 +66,7 @@ var _ = framework.KubeDescribe("Services", func() { // TODO: We get coverage of TCP/UDP and multi-port services through the DNS test. We should have a simpler test for multi-port TCP here. It("should provide secure master service [Conformance]", func() { - _, err := cs.Core().Services(v1.NamespaceDefault).Get("kubernetes", metav1.GetOptions{}) + _, err := cs.Core().Services(metav1.NamespaceDefault).Get("kubernetes", metav1.GetOptions{}) Expect(err).NotTo(HaveOccurred()) }) @@ -86,7 +86,7 @@ var _ = framework.KubeDescribe("Services", func() { }() service := &v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: serviceName, }, Spec: v1.ServiceSpec{ @@ -148,7 +148,7 @@ var _ = framework.KubeDescribe("Services", func() { By("creating service " + serviceName + " in namespace " + ns) service := &v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: serviceName, }, Spec: v1.ServiceSpec{ @@ -791,7 +791,7 @@ var _ = framework.KubeDescribe("Services", func() { By("creating service " + serviceName + " with same NodePort but different protocols in namespace " + ns) service := &v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: t.ServiceName, Namespace: t.Namespace, }, @@ -1027,7 +1027,7 @@ var _ = framework.KubeDescribe("Services", func() { terminateSeconds := int64(600) service := &v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: t.ServiceName, Namespace: t.Namespace, Annotations: map[string]string{endpoint.TolerateUnreadyEndpointsAnnotation: "true"}, @@ -1137,7 +1137,7 @@ var _ = framework.KubeDescribe("Services", func() { By("Remove pods immediately") label := labels.SelectorFromSet(labels.Set(t.Labels)) - options := v1.ListOptions{LabelSelector: label.String()} + options := metav1.ListOptions{LabelSelector: label.String()} podClient := t.Client.Core().Pods(f.Namespace.Name) pods, err := podClient.List(options) if err != nil { @@ -1145,7 +1145,7 @@ var _ = framework.KubeDescribe("Services", func() { } else { for _, pod := range pods.Items { var gracePeriodSeconds int64 = 0 - err := podClient.Delete(pod.Name, &v1.DeleteOptions{GracePeriodSeconds: &gracePeriodSeconds}) + err := podClient.Delete(pod.Name, &metav1.DeleteOptions{GracePeriodSeconds: &gracePeriodSeconds}) if err != nil { framework.Logf("warning: error force deleting pod '%s': %s", pod.Name, err) } diff --git a/vendor/k8s.io/kubernetes/test/e2e/service_accounts.go b/vendor/k8s.io/kubernetes/test/e2e/service_accounts.go index 599c8076..e595ec4e 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/service_accounts.go +++ b/vendor/k8s.io/kubernetes/test/e2e/service_accounts.go @@ -191,7 +191,7 @@ var _ = framework.KubeDescribe("ServiceAccounts", func() { })) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ GenerateName: "pod-service-account-" + string(uuid.NewUUID()) + "-", }, Spec: v1.PodSpec{ diff --git a/vendor/k8s.io/kubernetes/test/e2e/service_latency.go b/vendor/k8s.io/kubernetes/test/e2e/service_latency.go index 912c2e02..868a9ddb 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/service_latency.go +++ b/vendor/k8s.io/kubernetes/test/e2e/service_latency.go @@ -22,13 +22,14 @@ import ( "strings" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/watch" + restclient "k8s.io/client-go/rest" + "k8s.io/client-go/util/flowcontrol" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/cache" - "k8s.io/kubernetes/pkg/client/restclient" - "k8s.io/kubernetes/pkg/util/flowcontrol" "k8s.io/kubernetes/test/e2e/framework" testutils "k8s.io/kubernetes/test/utils" @@ -278,11 +279,11 @@ func (eq *endpointQueries) added(e *v1.Endpoints) { func startEndpointWatcher(f *framework.Framework, q *endpointQueries) { _, controller := cache.NewInformer( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { obj, err := f.ClientSet.Core().Endpoints(f.Namespace.Name).List(options) return runtime.Object(obj), err }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { return f.ClientSet.Core().Endpoints(f.Namespace.Name).Watch(options) }, }, @@ -317,7 +318,7 @@ func startEndpointWatcher(f *framework.Framework, q *endpointQueries) { func singleServiceLatency(f *framework.Framework, name string, q *endpointQueries) (time.Duration, error) { // Make a service that points to that pod. svc := &v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ GenerateName: "latency-svc-", }, Spec: v1.ServiceSpec{ diff --git a/vendor/k8s.io/kubernetes/test/e2e/serviceloadbalancers.go b/vendor/k8s.io/kubernetes/test/e2e/serviceloadbalancers.go index 8bd4fa99..6192c34c 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/serviceloadbalancers.go +++ b/vendor/k8s.io/kubernetes/test/e2e/serviceloadbalancers.go @@ -18,9 +18,9 @@ package e2e import ( "fmt" - "io/ioutil" "net/http" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/wait" @@ -113,7 +113,7 @@ func (h *haproxyControllerTester) start(namespace string) (err error) { // Find the pods of the rc we just created. labelSelector := labels.SelectorFromSet( labels.Set(map[string]string{"name": h.rcName})) - options := v1.ListOptions{LabelSelector: labelSelector.String()} + options := metav1.ListOptions{LabelSelector: labelSelector.String()} pods, err := h.client.Core().Pods(h.rcNamespace).List(options) if err != nil { return err @@ -197,7 +197,7 @@ func (s *ingManager) test(path string) error { url := fmt.Sprintf("%v/hostName", path) httpClient := &http.Client{} return wait.Poll(pollInterval, framework.ServiceRespondingTimeout, func() (bool, error) { - body, err := simpleGET(httpClient, url, "") + body, err := framework.SimpleGET(httpClient, url, "") if err != nil { framework.Logf("%v\n%v\n%v", url, body, err) return false, nil @@ -239,30 +239,6 @@ var _ = framework.KubeDescribe("ServiceLoadBalancer [Feature:ServiceLoadBalancer }) }) -// simpleGET executes a get on the given url, returns error if non-200 returned. -func simpleGET(c *http.Client, url, host string) (string, error) { - req, err := http.NewRequest("GET", url, nil) - if err != nil { - return "", err - } - req.Host = host - res, err := c.Do(req) - if err != nil { - return "", err - } - defer res.Body.Close() - rawBody, err := ioutil.ReadAll(res.Body) - if err != nil { - return "", err - } - body := string(rawBody) - if res.StatusCode != http.StatusOK { - err = fmt.Errorf( - "GET returned http error %v", res.StatusCode) - } - return body, err -} - // rcFromManifest reads a .json/yaml file and returns the rc in it. func rcFromManifest(fileName string) *v1.ReplicationController { var controller v1.ReplicationController diff --git a/vendor/k8s.io/kubernetes/test/e2e/petset.go b/vendor/k8s.io/kubernetes/test/e2e/statefulset.go similarity index 61% rename from vendor/k8s.io/kubernetes/test/e2e/petset.go rename to vendor/k8s.io/kubernetes/test/e2e/statefulset.go index e240ae56..a9097138 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/petset.go +++ b/vendor/k8s.io/kubernetes/test/e2e/statefulset.go @@ -43,21 +43,21 @@ import ( "k8s.io/kubernetes/pkg/api/v1" apps "k8s.io/kubernetes/pkg/apis/apps/v1beta1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/controller/petset" + "k8s.io/kubernetes/pkg/controller/statefulset" "k8s.io/kubernetes/pkg/util/intstr" "k8s.io/kubernetes/test/e2e/framework" ) const ( statefulsetPoll = 10 * time.Second - // Some pets install base packages via wget + // Some statefulPods install base packages via wget statefulsetTimeout = 10 * time.Minute // Timeout for stateful pods to change state - petPodTimeout = 5 * time.Minute - zookeeperManifestPath = "test/e2e/testing-manifests/petset/zookeeper" - mysqlGaleraManifestPath = "test/e2e/testing-manifests/petset/mysql-galera" - redisManifestPath = "test/e2e/testing-manifests/petset/redis" - cockroachDBManifestPath = "test/e2e/testing-manifests/petset/cockroachdb" + statefulPodTimeout = 5 * time.Minute + zookeeperManifestPath = "test/e2e/testing-manifests/statefulset/zookeeper" + mysqlGaleraManifestPath = "test/e2e/testing-manifests/statefulset/mysql-galera" + redisManifestPath = "test/e2e/testing-manifests/statefulset/redis" + cockroachDBManifestPath = "test/e2e/testing-manifests/statefulset/cockroachdb" // We don't restart MySQL cluster regardless of restartCluster, since MySQL doesn't handle restart well restartCluster = true @@ -78,19 +78,19 @@ var _ = framework.KubeDescribe("StatefulSet", func() { }) framework.KubeDescribe("Basic StatefulSet functionality", func() { - psName := "ss" + ssName := "ss" labels := map[string]string{ "foo": "bar", "baz": "blah", } headlessSvcName := "test" - var petMounts, podMounts []v1.VolumeMount - var ps *apps.StatefulSet + var statefulPodMounts, podMounts []v1.VolumeMount + var ss *apps.StatefulSet BeforeEach(func() { - petMounts = []v1.VolumeMount{{Name: "datadir", MountPath: "/data/"}} + statefulPodMounts = []v1.VolumeMount{{Name: "datadir", MountPath: "/data/"}} podMounts = []v1.VolumeMount{{Name: "home", MountPath: "/home"}} - ps = newStatefulSet(psName, ns, headlessSvcName, 2, petMounts, podMounts, labels) + ss = newStatefulSet(ssName, ns, headlessSvcName, 2, statefulPodMounts, podMounts, labels) By("Creating service " + headlessSvcName + " in namespace " + ns) headlessService := createServiceSpec(headlessSvcName, "", true, labels) @@ -107,143 +107,143 @@ var _ = framework.KubeDescribe("StatefulSet", func() { }) It("should provide basic identity", func() { - By("Creating statefulset " + psName + " in namespace " + ns) - *(ps.Spec.Replicas) = 3 - setInitializedAnnotation(ps, "false") + By("Creating statefulset " + ssName + " in namespace " + ns) + *(ss.Spec.Replicas) = 3 + setInitializedAnnotation(ss, "false") - _, err := c.Apps().StatefulSets(ns).Create(ps) + _, err := c.Apps().StatefulSets(ns).Create(ss) Expect(err).NotTo(HaveOccurred()) - pst := statefulSetTester{c: c} + sst := statefulSetTester{c: c} - By("Saturating stateful set " + ps.Name) - pst.saturate(ps) + By("Saturating stateful set " + ss.Name) + sst.saturate(ss) By("Verifying statefulset mounted data directory is usable") - framework.ExpectNoError(pst.checkMount(ps, "/data")) + framework.ExpectNoError(sst.checkMount(ss, "/data")) By("Verifying statefulset provides a stable hostname for each pod") - framework.ExpectNoError(pst.checkHostname(ps)) + framework.ExpectNoError(sst.checkHostname(ss)) cmd := "echo $(hostname) > /data/hostname; sync;" By("Running " + cmd + " in all stateful pods") - framework.ExpectNoError(pst.execInPets(ps, cmd)) + framework.ExpectNoError(sst.execInStatefulPods(ss, cmd)) - By("Restarting statefulset " + ps.Name) - pst.restart(ps) - pst.saturate(ps) + By("Restarting statefulset " + ss.Name) + sst.restart(ss) + sst.saturate(ss) By("Verifying statefulset mounted data directory is usable") - framework.ExpectNoError(pst.checkMount(ps, "/data")) + framework.ExpectNoError(sst.checkMount(ss, "/data")) cmd = "if [ \"$(cat /data/hostname)\" = \"$(hostname)\" ]; then exit 0; else exit 1; fi" By("Running " + cmd + " in all stateful pods") - framework.ExpectNoError(pst.execInPets(ps, cmd)) + framework.ExpectNoError(sst.execInStatefulPods(ss, cmd)) }) It("should handle healthy stateful pod restarts during scale", func() { - By("Creating statefulset " + psName + " in namespace " + ns) - *(ps.Spec.Replicas) = 2 - setInitializedAnnotation(ps, "false") + By("Creating statefulset " + ssName + " in namespace " + ns) + *(ss.Spec.Replicas) = 2 + setInitializedAnnotation(ss, "false") - _, err := c.Apps().StatefulSets(ns).Create(ps) + _, err := c.Apps().StatefulSets(ns).Create(ss) Expect(err).NotTo(HaveOccurred()) - pst := statefulSetTester{c: c} + sst := statefulSetTester{c: c} - pst.waitForRunningAndReady(1, ps) + sst.waitForRunningAndReady(1, ss) By("Marking stateful pod at index 0 as healthy.") - pst.setHealthy(ps) + sst.setHealthy(ss) By("Waiting for stateful pod at index 1 to enter running.") - pst.waitForRunningAndReady(2, ps) + sst.waitForRunningAndReady(2, ss) // Now we have 1 healthy and 1 unhealthy stateful pod. Deleting the healthy stateful pod should *not* // create a new stateful pod till the remaining stateful pod becomes healthy, which won't happen till // we set the healthy bit. By("Deleting healthy stateful pod at index 0.") - pst.deletePetAtIndex(0, ps) + sst.deleteStatefulPodAtIndex(0, ss) By("Confirming stateful pod at index 0 is not recreated.") - pst.confirmPetCount(1, ps, 10*time.Second) + sst.confirmStatefulPodCount(1, ss, 10*time.Second) By("Deleting unhealthy stateful pod at index 1.") - pst.deletePetAtIndex(1, ps) + sst.deleteStatefulPodAtIndex(1, ss) By("Confirming all stateful pods in statefulset are created.") - pst.saturate(ps) + sst.saturate(ss) }) It("should allow template updates", func() { - By("Creating stateful set " + psName + " in namespace " + ns) - *(ps.Spec.Replicas) = 2 + By("Creating stateful set " + ssName + " in namespace " + ns) + *(ss.Spec.Replicas) = 2 - ps, err := c.Apps().StatefulSets(ns).Create(ps) + ss, err := c.Apps().StatefulSets(ns).Create(ss) Expect(err).NotTo(HaveOccurred()) - pst := statefulSetTester{c: c} + sst := statefulSetTester{c: c} - pst.waitForRunningAndReady(*ps.Spec.Replicas, ps) + sst.waitForRunningAndReady(*ss.Spec.Replicas, ss) newImage := newNginxImage - oldImage := ps.Spec.Template.Spec.Containers[0].Image + oldImage := ss.Spec.Template.Spec.Containers[0].Image By(fmt.Sprintf("Updating stateful set template: update image from %s to %s", oldImage, newImage)) Expect(oldImage).NotTo(Equal(newImage), "Incorrect test setup: should update to a different image") - _, err = framework.UpdateStatefulSetWithRetries(c, ns, ps.Name, func(update *apps.StatefulSet) { + _, err = framework.UpdateStatefulSetWithRetries(c, ns, ss.Name, func(update *apps.StatefulSet) { update.Spec.Template.Spec.Containers[0].Image = newImage }) Expect(err).NotTo(HaveOccurred()) updateIndex := 0 By(fmt.Sprintf("Deleting stateful pod at index %d", updateIndex)) - pst.deletePetAtIndex(updateIndex, ps) + sst.deleteStatefulPodAtIndex(updateIndex, ss) By("Waiting for all stateful pods to be running again") - pst.waitForRunningAndReady(*ps.Spec.Replicas, ps) + sst.waitForRunningAndReady(*ss.Spec.Replicas, ss) By(fmt.Sprintf("Verifying stateful pod at index %d is updated", updateIndex)) verify := func(pod *v1.Pod) { podImage := pod.Spec.Containers[0].Image Expect(podImage).To(Equal(newImage), fmt.Sprintf("Expected stateful pod image %s updated to %s", podImage, newImage)) } - pst.verifyPodAtIndex(updateIndex, ps, verify) + sst.verifyPodAtIndex(updateIndex, ss, verify) }) It("Scaling down before scale up is finished should wait until current pod will be running and ready before it will be removed", func() { - By("Creating stateful set " + psName + " in namespace " + ns + ", and pausing scale operations after each pod") + By("Creating stateful set " + ssName + " in namespace " + ns + ", and pausing scale operations after each pod") testProbe := &v1.Probe{Handler: v1.Handler{HTTPGet: &v1.HTTPGetAction{ Path: "/index.html", Port: intstr.IntOrString{IntVal: 80}}}} - ps := newStatefulSet(psName, ns, headlessSvcName, 1, nil, nil, labels) - ps.Spec.Template.Spec.Containers[0].ReadinessProbe = testProbe - setInitializedAnnotation(ps, "false") - ps, err := c.Apps().StatefulSets(ns).Create(ps) + ss := newStatefulSet(ssName, ns, headlessSvcName, 1, nil, nil, labels) + ss.Spec.Template.Spec.Containers[0].ReadinessProbe = testProbe + setInitializedAnnotation(ss, "false") + ss, err := c.Apps().StatefulSets(ns).Create(ss) Expect(err).NotTo(HaveOccurred()) - pst := &statefulSetTester{c: c} - pst.waitForRunningAndReady(1, ps) + sst := &statefulSetTester{c: c} + sst.waitForRunningAndReady(1, ss) - By("Scaling up stateful set " + psName + " to 3 replicas and pausing after 2nd pod") - pst.setHealthy(ps) - pst.updateReplicas(ps, 3) - pst.waitForRunningAndReady(2, ps) + By("Scaling up stateful set " + ssName + " to 3 replicas and pausing after 2nd pod") + sst.setHealthy(ss) + sst.updateReplicas(ss, 3) + sst.waitForRunningAndReady(2, ss) By("Before scale up finished setting 2nd pod to be not ready by breaking readiness probe") - pst.breakProbe(ps, testProbe) - pst.waitForRunningAndNotReady(2, ps) + sst.breakProbe(ss, testProbe) + sst.waitForRunningAndNotReady(2, ss) By("Continue scale operation after the 2nd pod, and scaling down to 1 replica") - pst.setHealthy(ps) - pst.updateReplicas(ps, 1) + sst.setHealthy(ss) + sst.updateReplicas(ss, 1) By("Verifying that the 2nd pod wont be removed if it is not running and ready") - pst.confirmPetCount(2, ps, 10*time.Second) - expectedPodName := ps.Name + "-1" + sst.confirmStatefulPodCount(2, ss, 10*time.Second) + expectedPodName := ss.Name + "-1" expectedPod, err := f.ClientSet.Core().Pods(ns).Get(expectedPodName, metav1.GetOptions{}) Expect(err).NotTo(HaveOccurred()) - watcher, err := f.ClientSet.Core().Pods(ns).Watch(v1.SingleObject( - v1.ObjectMeta{ + watcher, err := f.ClientSet.Core().Pods(ns).Watch(metav1.SingleObject( + metav1.ObjectMeta{ Name: expectedPod.Name, ResourceVersion: expectedPod.ResourceVersion, }, @@ -251,7 +251,7 @@ var _ = framework.KubeDescribe("StatefulSet", func() { Expect(err).NotTo(HaveOccurred()) By("Verifying the 2nd pod is removed only when it becomes running and ready") - pst.restoreProbe(ps, testProbe) + sst.restoreProbe(ss, testProbe) _, err = watch.Until(statefulsetTimeout, watcher, func(event watch.Event) (bool, error) { pod := event.Object.(*v1.Pod) if event.Type == watch.Deleted && pod.Name == expectedPodName { @@ -273,36 +273,36 @@ var _ = framework.KubeDescribe("StatefulSet", func() { It("Scaling should happen in predictable order and halt if any stateful pod is unhealthy", func() { psLabels := klabels.Set(labels) By("Initializing watcher for selector " + psLabels.String()) - watcher, err := f.ClientSet.Core().Pods(ns).Watch(v1.ListOptions{ + watcher, err := f.ClientSet.Core().Pods(ns).Watch(metav1.ListOptions{ LabelSelector: psLabels.AsSelector().String(), }) Expect(err).NotTo(HaveOccurred()) - By("Creating stateful set " + psName + " in namespace " + ns) + By("Creating stateful set " + ssName + " in namespace " + ns) testProbe := &v1.Probe{Handler: v1.Handler{HTTPGet: &v1.HTTPGetAction{ Path: "/index.html", Port: intstr.IntOrString{IntVal: 80}}}} - ps := newStatefulSet(psName, ns, headlessSvcName, 1, nil, nil, psLabels) - ps.Spec.Template.Spec.Containers[0].ReadinessProbe = testProbe - ps, err = c.Apps().StatefulSets(ns).Create(ps) + ss := newStatefulSet(ssName, ns, headlessSvcName, 1, nil, nil, psLabels) + ss.Spec.Template.Spec.Containers[0].ReadinessProbe = testProbe + ss, err = c.Apps().StatefulSets(ns).Create(ss) Expect(err).NotTo(HaveOccurred()) - By("Waiting until all stateful set " + psName + " replicas will be running in namespace " + ns) - pst := &statefulSetTester{c: c} - pst.waitForRunningAndReady(*ps.Spec.Replicas, ps) + By("Waiting until all stateful set " + ssName + " replicas will be running in namespace " + ns) + sst := &statefulSetTester{c: c} + sst.waitForRunningAndReady(*ss.Spec.Replicas, ss) By("Confirming that stateful set scale up will halt with unhealthy stateful pod") - pst.breakProbe(ps, testProbe) - pst.waitForRunningAndNotReady(*ps.Spec.Replicas, ps) - pst.updateReplicas(ps, 3) - pst.confirmPetCount(1, ps, 10*time.Second) + sst.breakProbe(ss, testProbe) + sst.waitForRunningAndNotReady(*ss.Spec.Replicas, ss) + sst.updateReplicas(ss, 3) + sst.confirmStatefulPodCount(1, ss, 10*time.Second) - By("Scaling up stateful set " + psName + " to 3 replicas and waiting until all of them will be running in namespace " + ns) - pst.restoreProbe(ps, testProbe) - pst.waitForRunningAndReady(3, ps) + By("Scaling up stateful set " + ssName + " to 3 replicas and waiting until all of them will be running in namespace " + ns) + sst.restoreProbe(ss, testProbe) + sst.waitForRunningAndReady(3, ss) - By("Verifying that stateful set " + psName + " was scaled up in order") - expectedOrder := []string{psName + "-0", psName + "-1", psName + "-2"} + By("Verifying that stateful set " + ssName + " was scaled up in order") + expectedOrder := []string{ssName + "-0", ssName + "-1", ssName + "-2"} _, err = watch.Until(statefulsetTimeout, watcher, func(event watch.Event) (bool, error) { if event.Type != watch.Added { return false, nil @@ -317,22 +317,22 @@ var _ = framework.KubeDescribe("StatefulSet", func() { Expect(err).NotTo(HaveOccurred()) By("Scale down will halt with unhealthy stateful pod") - watcher, err = f.ClientSet.Core().Pods(ns).Watch(v1.ListOptions{ + watcher, err = f.ClientSet.Core().Pods(ns).Watch(metav1.ListOptions{ LabelSelector: psLabels.AsSelector().String(), }) Expect(err).NotTo(HaveOccurred()) - pst.breakProbe(ps, testProbe) - pst.waitForRunningAndNotReady(3, ps) - pst.updateReplicas(ps, 0) - pst.confirmPetCount(3, ps, 10*time.Second) + sst.breakProbe(ss, testProbe) + sst.waitForRunningAndNotReady(3, ss) + sst.updateReplicas(ss, 0) + sst.confirmStatefulPodCount(3, ss, 10*time.Second) - By("Scaling down stateful set " + psName + " to 0 replicas and waiting until none of pods will run in namespace" + ns) - pst.restoreProbe(ps, testProbe) - pst.scale(ps, 0) + By("Scaling down stateful set " + ssName + " to 0 replicas and waiting until none of pods will run in namespace" + ns) + sst.restoreProbe(ss, testProbe) + sst.scale(ss, 0) - By("Verifying that stateful set " + psName + " was scaled down in reverse order") - expectedOrder = []string{psName + "-2", psName + "-1", psName + "-0"} + By("Verifying that stateful set " + ssName + " was scaled down in reverse order") + expectedOrder = []string{ssName + "-2", ssName + "-1", ssName + "-0"} _, err = watch.Until(statefulsetTimeout, watcher, func(event watch.Event) (bool, error) { if event.Type != watch.Deleted { return false, nil @@ -349,7 +349,7 @@ var _ = framework.KubeDescribe("StatefulSet", func() { It("Should recreate evicted statefulset", func() { podName := "test-pod" - petPodName := psName + "-0" + statefulPodName := ssName + "-0" By("Looking for a node to schedule stateful set and pod") nodes := framework.GetReadySchedulableNodesOrDie(f.ClientSet) node := nodes.Items[0] @@ -357,7 +357,7 @@ var _ = framework.KubeDescribe("StatefulSet", func() { By("Creating pod with conflicting port in namespace " + f.Namespace.Name) conflictingPort := v1.ContainerPort{HostPort: 21017, ContainerPort: 21017, Name: "conflict"} pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, }, Spec: v1.PodSpec{ @@ -375,11 +375,11 @@ var _ = framework.KubeDescribe("StatefulSet", func() { framework.ExpectNoError(err) By("Creating statefulset with conflicting port in namespace " + f.Namespace.Name) - ps := newStatefulSet(psName, f.Namespace.Name, headlessSvcName, 1, nil, nil, labels) - petContainer := &ps.Spec.Template.Spec.Containers[0] - petContainer.Ports = append(petContainer.Ports, conflictingPort) - ps.Spec.Template.Spec.NodeName = node.Name - _, err = f.ClientSet.Apps().StatefulSets(f.Namespace.Name).Create(ps) + ss := newStatefulSet(ssName, f.Namespace.Name, headlessSvcName, 1, nil, nil, labels) + statefulPodContainer := &ss.Spec.Template.Spec.Containers[0] + statefulPodContainer.Ports = append(statefulPodContainer.Ports, conflictingPort) + ss.Spec.Template.Spec.NodeName = node.Name + _, err = f.ClientSet.Apps().StatefulSets(f.Namespace.Name).Create(ss) framework.ExpectNoError(err) By("Waiting until pod " + podName + " will start running in namespace " + f.Namespace.Name) @@ -387,58 +387,58 @@ var _ = framework.KubeDescribe("StatefulSet", func() { framework.Failf("Pod %v did not start running: %v", podName, err) } - var initialPetPodUID types.UID - By("Waiting until stateful pod " + petPodName + " will be recreated and deleted at least once in namespace " + f.Namespace.Name) - w, err := f.ClientSet.Core().Pods(f.Namespace.Name).Watch(v1.SingleObject(v1.ObjectMeta{Name: petPodName})) + var initialStatefulPodUID types.UID + By("Waiting until stateful pod " + statefulPodName + " will be recreated and deleted at least once in namespace " + f.Namespace.Name) + w, err := f.ClientSet.Core().Pods(f.Namespace.Name).Watch(metav1.SingleObject(metav1.ObjectMeta{Name: statefulPodName})) framework.ExpectNoError(err) // we need to get UID from pod in any state and wait until stateful set controller will remove pod atleast once - _, err = watch.Until(petPodTimeout, w, func(event watch.Event) (bool, error) { + _, err = watch.Until(statefulPodTimeout, w, func(event watch.Event) (bool, error) { pod := event.Object.(*v1.Pod) switch event.Type { case watch.Deleted: framework.Logf("Observed delete event for stateful pod %v in namespace %v", pod.Name, pod.Namespace) - if initialPetPodUID == "" { + if initialStatefulPodUID == "" { return false, nil } return true, nil } framework.Logf("Observed stateful pod in namespace: %v, name: %v, uid: %v, status phase: %v. Waiting for statefulset controller to delete.", pod.Namespace, pod.Name, pod.UID, pod.Status.Phase) - initialPetPodUID = pod.UID + initialStatefulPodUID = pod.UID return false, nil }) if err != nil { - framework.Failf("Pod %v expected to be re-created at least once", petPodName) + framework.Failf("Pod %v expected to be re-created at least once", statefulPodName) } By("Removing pod with conflicting port in namespace " + f.Namespace.Name) - err = f.ClientSet.Core().Pods(f.Namespace.Name).Delete(pod.Name, v1.NewDeleteOptions(0)) + err = f.ClientSet.Core().Pods(f.Namespace.Name).Delete(pod.Name, metav1.NewDeleteOptions(0)) framework.ExpectNoError(err) - By("Waiting when stateful pod " + petPodName + " will be recreated in namespace " + f.Namespace.Name + " and will be in running state") + By("Waiting when stateful pod " + statefulPodName + " will be recreated in namespace " + f.Namespace.Name + " and will be in running state") // we may catch delete event, thats why we are waiting for running phase like this, and not with watch.Until Eventually(func() error { - petPod, err := f.ClientSet.Core().Pods(f.Namespace.Name).Get(petPodName, metav1.GetOptions{}) + statefulPod, err := f.ClientSet.Core().Pods(f.Namespace.Name).Get(statefulPodName, metav1.GetOptions{}) if err != nil { return err } - if petPod.Status.Phase != v1.PodRunning { - return fmt.Errorf("Pod %v is not in running phase: %v", petPod.Name, petPod.Status.Phase) - } else if petPod.UID == initialPetPodUID { - return fmt.Errorf("Pod %v wasn't recreated: %v == %v", petPod.Name, petPod.UID, initialPetPodUID) + if statefulPod.Status.Phase != v1.PodRunning { + return fmt.Errorf("Pod %v is not in running phase: %v", statefulPod.Name, statefulPod.Status.Phase) + } else if statefulPod.UID == initialStatefulPodUID { + return fmt.Errorf("Pod %v wasn't recreated: %v == %v", statefulPod.Name, statefulPod.UID, initialStatefulPodUID) } return nil - }, petPodTimeout, 2*time.Second).Should(BeNil()) + }, statefulPodTimeout, 2*time.Second).Should(BeNil()) }) }) framework.KubeDescribe("Deploy clustered applications [Feature:StatefulSet] [Slow]", func() { - var pst *statefulSetTester + var sst *statefulSetTester var appTester *clusterAppTester BeforeEach(func() { - pst = &statefulSetTester{c: c} - appTester = &clusterAppTester{tester: pst, ns: ns} + sst = &statefulSetTester{c: c} + appTester = &clusterAppTester{tester: sst, ns: ns} }) AfterEach(func() { @@ -450,35 +450,35 @@ var _ = framework.KubeDescribe("StatefulSet", func() { }) It("should creating a working zookeeper cluster", func() { - appTester.pet = &zookeeperTester{tester: pst} + appTester.statefulPod = &zookeeperTester{tester: sst} appTester.run() }) It("should creating a working redis cluster", func() { - appTester.pet = &redisTester{tester: pst} + appTester.statefulPod = &redisTester{tester: sst} appTester.run() }) It("should creating a working mysql cluster", func() { - appTester.pet = &mysqlGaleraTester{tester: pst} + appTester.statefulPod = &mysqlGaleraTester{tester: sst} appTester.run() }) It("should creating a working CockroachDB cluster", func() { - appTester.pet = &cockroachDBTester{tester: pst} + appTester.statefulPod = &cockroachDBTester{tester: sst} appTester.run() }) }) }) func dumpDebugInfo(c clientset.Interface, ns string) { - pl, _ := c.Core().Pods(ns).List(v1.ListOptions{LabelSelector: labels.Everything().String()}) - for _, p := range pl.Items { - desc, _ := framework.RunKubectl("describe", "po", p.Name, fmt.Sprintf("--namespace=%v", ns)) - framework.Logf("\nOutput of kubectl describe %v:\n%v", p.Name, desc) + sl, _ := c.Core().Pods(ns).List(metav1.ListOptions{LabelSelector: labels.Everything().String()}) + for _, s := range sl.Items { + desc, _ := framework.RunKubectl("describe", "po", s.Name, fmt.Sprintf("--namespace=%v", ns)) + framework.Logf("\nOutput of kubectl describe %v:\n%v", s.Name, desc) - l, _ := framework.RunKubectl("logs", p.Name, fmt.Sprintf("--namespace=%v", ns), "--tail=100") - framework.Logf("\nLast 100 log lines of %v:\n%v", p.Name, l) + l, _ := framework.RunKubectl("logs", s.Name, fmt.Sprintf("--namespace=%v", ns), "--tail=100") + framework.Logf("\nLast 100 log lines of %v:\n%v", s.Name, l) } } @@ -494,45 +494,45 @@ func kubectlExecWithRetries(args ...string) (out string) { return } -type petTester interface { +type statefulPodTester interface { deploy(ns string) *apps.StatefulSet - write(petIndex int, kv map[string]string) - read(petIndex int, key string) string + write(statefulPodIndex int, kv map[string]string) + read(statefulPodIndex int, key string) string name() string } type clusterAppTester struct { - ns string - pet petTester - tester *statefulSetTester + ns string + statefulPod statefulPodTester + tester *statefulSetTester } func (c *clusterAppTester) run() { - By("Deploying " + c.pet.name()) - ps := c.pet.deploy(c.ns) + By("Deploying " + c.statefulPod.name()) + ss := c.statefulPod.deploy(c.ns) By("Creating foo:bar in member with index 0") - c.pet.write(0, map[string]string{"foo": "bar"}) + c.statefulPod.write(0, map[string]string{"foo": "bar"}) - switch c.pet.(type) { + switch c.statefulPod.(type) { case *mysqlGaleraTester: // Don't restart MySQL cluster since it doesn't handle restarts well default: if restartCluster { - By("Restarting stateful set " + ps.Name) - c.tester.restart(ps) - c.tester.waitForRunningAndReady(*ps.Spec.Replicas, ps) + By("Restarting stateful set " + ss.Name) + c.tester.restart(ss) + c.tester.waitForRunningAndReady(*ss.Spec.Replicas, ss) } } By("Reading value under foo from member with index 2") - if err := pollReadWithTimeout(c.pet, 2, "foo", "bar"); err != nil { + if err := pollReadWithTimeout(c.statefulPod, 2, "foo", "bar"); err != nil { framework.Failf("%v", err) } } type zookeeperTester struct { - ps *apps.StatefulSet + ss *apps.StatefulSet tester *statefulSetTester } @@ -541,28 +541,28 @@ func (z *zookeeperTester) name() string { } func (z *zookeeperTester) deploy(ns string) *apps.StatefulSet { - z.ps = z.tester.createStatefulSet(zookeeperManifestPath, ns) - return z.ps + z.ss = z.tester.createStatefulSet(zookeeperManifestPath, ns) + return z.ss } -func (z *zookeeperTester) write(petIndex int, kv map[string]string) { - name := fmt.Sprintf("%v-%d", z.ps.Name, petIndex) - ns := fmt.Sprintf("--namespace=%v", z.ps.Namespace) +func (z *zookeeperTester) write(statefulPodIndex int, kv map[string]string) { + name := fmt.Sprintf("%v-%d", z.ss.Name, statefulPodIndex) + ns := fmt.Sprintf("--namespace=%v", z.ss.Namespace) for k, v := range kv { cmd := fmt.Sprintf("/opt/zookeeper/bin/zkCli.sh create /%v %v", k, v) framework.Logf(framework.RunKubectlOrDie("exec", ns, name, "--", "/bin/sh", "-c", cmd)) } } -func (z *zookeeperTester) read(petIndex int, key string) string { - name := fmt.Sprintf("%v-%d", z.ps.Name, petIndex) - ns := fmt.Sprintf("--namespace=%v", z.ps.Namespace) +func (z *zookeeperTester) read(statefulPodIndex int, key string) string { + name := fmt.Sprintf("%v-%d", z.ss.Name, statefulPodIndex) + ns := fmt.Sprintf("--namespace=%v", z.ss.Namespace) cmd := fmt.Sprintf("/opt/zookeeper/bin/zkCli.sh get /%v", key) return lastLine(framework.RunKubectlOrDie("exec", ns, name, "--", "/bin/sh", "-c", cmd)) } type mysqlGaleraTester struct { - ps *apps.StatefulSet + ss *apps.StatefulSet tester *statefulSetTester } @@ -579,33 +579,33 @@ func (m *mysqlGaleraTester) mysqlExec(cmd, ns, podName string) string { } func (m *mysqlGaleraTester) deploy(ns string) *apps.StatefulSet { - m.ps = m.tester.createStatefulSet(mysqlGaleraManifestPath, ns) + m.ss = m.tester.createStatefulSet(mysqlGaleraManifestPath, ns) - framework.Logf("Deployed statefulset %v, initializing database", m.ps.Name) + framework.Logf("Deployed statefulset %v, initializing database", m.ss.Name) for _, cmd := range []string{ "create database statefulset;", "use statefulset; create table foo (k varchar(20), v varchar(20));", } { - framework.Logf(m.mysqlExec(cmd, ns, fmt.Sprintf("%v-0", m.ps.Name))) + framework.Logf(m.mysqlExec(cmd, ns, fmt.Sprintf("%v-0", m.ss.Name))) } - return m.ps + return m.ss } -func (m *mysqlGaleraTester) write(petIndex int, kv map[string]string) { - name := fmt.Sprintf("%v-%d", m.ps.Name, petIndex) +func (m *mysqlGaleraTester) write(statefulPodIndex int, kv map[string]string) { + name := fmt.Sprintf("%v-%d", m.ss.Name, statefulPodIndex) for k, v := range kv { cmd := fmt.Sprintf("use statefulset; insert into foo (k, v) values (\"%v\", \"%v\");", k, v) - framework.Logf(m.mysqlExec(cmd, m.ps.Namespace, name)) + framework.Logf(m.mysqlExec(cmd, m.ss.Namespace, name)) } } -func (m *mysqlGaleraTester) read(petIndex int, key string) string { - name := fmt.Sprintf("%v-%d", m.ps.Name, petIndex) - return lastLine(m.mysqlExec(fmt.Sprintf("use statefulset; select v from foo where k=\"%v\";", key), m.ps.Namespace, name)) +func (m *mysqlGaleraTester) read(statefulPodIndex int, key string) string { + name := fmt.Sprintf("%v-%d", m.ss.Name, statefulPodIndex) + return lastLine(m.mysqlExec(fmt.Sprintf("use statefulset; select v from foo where k=\"%v\";", key), m.ss.Namespace, name)) } type redisTester struct { - ps *apps.StatefulSet + ss *apps.StatefulSet tester *statefulSetTester } @@ -619,24 +619,24 @@ func (m *redisTester) redisExec(cmd, ns, podName string) string { } func (m *redisTester) deploy(ns string) *apps.StatefulSet { - m.ps = m.tester.createStatefulSet(redisManifestPath, ns) - return m.ps + m.ss = m.tester.createStatefulSet(redisManifestPath, ns) + return m.ss } -func (m *redisTester) write(petIndex int, kv map[string]string) { - name := fmt.Sprintf("%v-%d", m.ps.Name, petIndex) +func (m *redisTester) write(statefulPodIndex int, kv map[string]string) { + name := fmt.Sprintf("%v-%d", m.ss.Name, statefulPodIndex) for k, v := range kv { - framework.Logf(m.redisExec(fmt.Sprintf("SET %v %v", k, v), m.ps.Namespace, name)) + framework.Logf(m.redisExec(fmt.Sprintf("SET %v %v", k, v), m.ss.Namespace, name)) } } -func (m *redisTester) read(petIndex int, key string) string { - name := fmt.Sprintf("%v-%d", m.ps.Name, petIndex) - return lastLine(m.redisExec(fmt.Sprintf("GET %v", key), m.ps.Namespace, name)) +func (m *redisTester) read(statefulPodIndex int, key string) string { + name := fmt.Sprintf("%v-%d", m.ss.Name, statefulPodIndex) + return lastLine(m.redisExec(fmt.Sprintf("GET %v", key), m.ss.Namespace, name)) } type cockroachDBTester struct { - ps *apps.StatefulSet + ss *apps.StatefulSet tester *statefulSetTester } @@ -650,27 +650,27 @@ func (c *cockroachDBTester) cockroachDBExec(cmd, ns, podName string) string { } func (c *cockroachDBTester) deploy(ns string) *apps.StatefulSet { - c.ps = c.tester.createStatefulSet(cockroachDBManifestPath, ns) - framework.Logf("Deployed statefulset %v, initializing database", c.ps.Name) + c.ss = c.tester.createStatefulSet(cockroachDBManifestPath, ns) + framework.Logf("Deployed statefulset %v, initializing database", c.ss.Name) for _, cmd := range []string{ "CREATE DATABASE IF NOT EXISTS foo;", "CREATE TABLE IF NOT EXISTS foo.bar (k STRING PRIMARY KEY, v STRING);", } { - framework.Logf(c.cockroachDBExec(cmd, ns, fmt.Sprintf("%v-0", c.ps.Name))) + framework.Logf(c.cockroachDBExec(cmd, ns, fmt.Sprintf("%v-0", c.ss.Name))) } - return c.ps + return c.ss } -func (c *cockroachDBTester) write(petIndex int, kv map[string]string) { - name := fmt.Sprintf("%v-%d", c.ps.Name, petIndex) +func (c *cockroachDBTester) write(statefulPodIndex int, kv map[string]string) { + name := fmt.Sprintf("%v-%d", c.ss.Name, statefulPodIndex) for k, v := range kv { cmd := fmt.Sprintf("UPSERT INTO foo.bar VALUES ('%v', '%v');", k, v) - framework.Logf(c.cockroachDBExec(cmd, c.ps.Namespace, name)) + framework.Logf(c.cockroachDBExec(cmd, c.ss.Namespace, name)) } } -func (c *cockroachDBTester) read(petIndex int, key string) string { - name := fmt.Sprintf("%v-%d", c.ps.Name, petIndex) - return lastLine(c.cockroachDBExec(fmt.Sprintf("SELECT v FROM foo.bar WHERE k='%v';", key), c.ps.Namespace, name)) +func (c *cockroachDBTester) read(statefulPodIndex int, key string) string { + name := fmt.Sprintf("%v-%d", c.ss.Name, statefulPodIndex) + return lastLine(c.cockroachDBExec(fmt.Sprintf("SELECT v FROM foo.bar WHERE k='%v';", key), c.ss.Namespace, name)) } func lastLine(out string) string { @@ -679,21 +679,21 @@ func lastLine(out string) string { } func statefulSetFromManifest(fileName, ns string) *apps.StatefulSet { - var ps apps.StatefulSet + var ss apps.StatefulSet framework.Logf("Parsing statefulset from %v", fileName) data, err := ioutil.ReadFile(fileName) Expect(err).NotTo(HaveOccurred()) json, err := utilyaml.ToJSON(data) Expect(err).NotTo(HaveOccurred()) - Expect(runtime.DecodeInto(api.Codecs.UniversalDecoder(), json, &ps)).NotTo(HaveOccurred()) - ps.Namespace = ns - if ps.Spec.Selector == nil { - ps.Spec.Selector = &metav1.LabelSelector{ - MatchLabels: ps.Spec.Template.Labels, + Expect(runtime.DecodeInto(api.Codecs.UniversalDecoder(), json, &ss)).NotTo(HaveOccurred()) + ss.Namespace = ns + if ss.Spec.Selector == nil { + ss.Spec.Selector = &metav1.LabelSelector{ + MatchLabels: ss.Spec.Template.Labels, } } - return &ps + return &ss } // statefulSetTester has all methods required to test a single statefulset. @@ -701,22 +701,22 @@ type statefulSetTester struct { c clientset.Interface } -func (p *statefulSetTester) createStatefulSet(manifestPath, ns string) *apps.StatefulSet { +func (s *statefulSetTester) createStatefulSet(manifestPath, ns string) *apps.StatefulSet { mkpath := func(file string) string { return filepath.Join(framework.TestContext.RepoRoot, manifestPath, file) } - ps := statefulSetFromManifest(mkpath("petset.yaml"), ns) + ss := statefulSetFromManifest(mkpath("statefulset.yaml"), ns) - framework.Logf(fmt.Sprintf("creating " + ps.Name + " service")) + framework.Logf(fmt.Sprintf("creating " + ss.Name + " service")) framework.RunKubectlOrDie("create", "-f", mkpath("service.yaml"), fmt.Sprintf("--namespace=%v", ns)) - framework.Logf(fmt.Sprintf("creating statefulset %v/%v with %d replicas and selector %+v", ps.Namespace, ps.Name, *(ps.Spec.Replicas), ps.Spec.Selector)) - framework.RunKubectlOrDie("create", "-f", mkpath("petset.yaml"), fmt.Sprintf("--namespace=%v", ns)) - p.waitForRunningAndReady(*ps.Spec.Replicas, ps) - return ps + framework.Logf(fmt.Sprintf("creating statefulset %v/%v with %d replicas and selector %+v", ss.Namespace, ss.Name, *(ss.Spec.Replicas), ss.Spec.Selector)) + framework.RunKubectlOrDie("create", "-f", mkpath("statefulset.yaml"), fmt.Sprintf("--namespace=%v", ns)) + s.waitForRunningAndReady(*ss.Spec.Replicas, ss) + return ss } -func (p *statefulSetTester) checkMount(ps *apps.StatefulSet, mountPath string) error { +func (s *statefulSetTester) checkMount(ss *apps.StatefulSet, mountPath string) error { for _, cmd := range []string{ // Print inode, size etc fmt.Sprintf("ls -idlh %v", mountPath), @@ -725,18 +725,18 @@ func (p *statefulSetTester) checkMount(ps *apps.StatefulSet, mountPath string) e // Try writing fmt.Sprintf("touch %v", filepath.Join(mountPath, fmt.Sprintf("%v", time.Now().UnixNano()))), } { - if err := p.execInPets(ps, cmd); err != nil { + if err := s.execInStatefulPods(ss, cmd); err != nil { return fmt.Errorf("failed to execute %v, error: %v", cmd, err) } } return nil } -func (p *statefulSetTester) execInPets(ps *apps.StatefulSet, cmd string) error { - podList := p.getPodList(ps) - for _, pet := range podList.Items { - stdout, err := framework.RunHostCmd(pet.Namespace, pet.Name, cmd) - framework.Logf("stdout of %v on %v: %v", cmd, pet.Name, stdout) +func (s *statefulSetTester) execInStatefulPods(ss *apps.StatefulSet, cmd string) error { + podList := s.getPodList(ss) + for _, statefulPod := range podList.Items { + stdout, err := framework.RunHostCmd(statefulPod.Namespace, statefulPod.Name, cmd) + framework.Logf("stdout of %v on %v: %v", cmd, statefulPod.Name, stdout) if err != nil { return err } @@ -744,73 +744,73 @@ func (p *statefulSetTester) execInPets(ps *apps.StatefulSet, cmd string) error { return nil } -func (p *statefulSetTester) checkHostname(ps *apps.StatefulSet) error { +func (s *statefulSetTester) checkHostname(ss *apps.StatefulSet) error { cmd := "printf $(hostname)" - podList := p.getPodList(ps) - for _, pet := range podList.Items { - hostname, err := framework.RunHostCmd(pet.Namespace, pet.Name, cmd) + podList := s.getPodList(ss) + for _, statefulPod := range podList.Items { + hostname, err := framework.RunHostCmd(statefulPod.Namespace, statefulPod.Name, cmd) if err != nil { return err } - if hostname != pet.Name { - return fmt.Errorf("unexpected hostname (%s) and stateful pod name (%s) not equal", hostname, pet.Name) + if hostname != statefulPod.Name { + return fmt.Errorf("unexpected hostname (%s) and stateful pod name (%s) not equal", hostname, statefulPod.Name) } } return nil } -func (p *statefulSetTester) saturate(ps *apps.StatefulSet) { - // TODO: Watch events and check that creation timestamps don't overlap +func (s *statefulSetTester) saturate(ss *apps.StatefulSet) { + // TODO: Watch events and check that creation timestamss don't overlap var i int32 - for i = 0; i < *(ps.Spec.Replicas); i++ { + for i = 0; i < *(ss.Spec.Replicas); i++ { framework.Logf("Waiting for stateful pod at index " + fmt.Sprintf("%v", i+1) + " to enter Running") - p.waitForRunningAndReady(i+1, ps) + s.waitForRunningAndReady(i+1, ss) framework.Logf("Marking stateful pod at index " + fmt.Sprintf("%v", i) + " healthy") - p.setHealthy(ps) + s.setHealthy(ss) } } -func (p *statefulSetTester) deletePetAtIndex(index int, ps *apps.StatefulSet) { - name := getPodNameAtIndex(index, ps) +func (s *statefulSetTester) deleteStatefulPodAtIndex(index int, ss *apps.StatefulSet) { + name := getPodNameAtIndex(index, ss) noGrace := int64(0) - if err := p.c.Core().Pods(ps.Namespace).Delete(name, &v1.DeleteOptions{GracePeriodSeconds: &noGrace}); err != nil { - framework.Failf("Failed to delete stateful pod %v for StatefulSet %v/%v: %v", name, ps.Namespace, ps.Name, err) + if err := s.c.Core().Pods(ss.Namespace).Delete(name, &metav1.DeleteOptions{GracePeriodSeconds: &noGrace}); err != nil { + framework.Failf("Failed to delete stateful pod %v for StatefulSet %v/%v: %v", name, ss.Namespace, ss.Name, err) } } type verifyPodFunc func(*v1.Pod) -func (p *statefulSetTester) verifyPodAtIndex(index int, ps *apps.StatefulSet, verify verifyPodFunc) { - name := getPodNameAtIndex(index, ps) - pod, err := p.c.Core().Pods(ps.Namespace).Get(name, metav1.GetOptions{}) - Expect(err).NotTo(HaveOccurred(), fmt.Sprintf("Failed to get stateful pod %s for StatefulSet %s/%s", name, ps.Namespace, ps.Name)) +func (s *statefulSetTester) verifyPodAtIndex(index int, ss *apps.StatefulSet, verify verifyPodFunc) { + name := getPodNameAtIndex(index, ss) + pod, err := s.c.Core().Pods(ss.Namespace).Get(name, metav1.GetOptions{}) + Expect(err).NotTo(HaveOccurred(), fmt.Sprintf("Failed to get stateful pod %s for StatefulSet %s/%s", name, ss.Namespace, ss.Name)) verify(pod) } -func getPodNameAtIndex(index int, ps *apps.StatefulSet) string { +func getPodNameAtIndex(index int, ss *apps.StatefulSet) string { // TODO: we won't use "-index" as the name strategy forever, // pull the name out from an identity mapper. - return fmt.Sprintf("%v-%v", ps.Name, index) + return fmt.Sprintf("%v-%v", ss.Name, index) } -func (p *statefulSetTester) scale(ps *apps.StatefulSet, count int32) error { - name := ps.Name - ns := ps.Namespace - p.update(ns, name, func(ps *apps.StatefulSet) { *(ps.Spec.Replicas) = count }) +func (s *statefulSetTester) scale(ss *apps.StatefulSet, count int32) error { + name := ss.Name + ns := ss.Namespace + s.update(ns, name, func(ss *apps.StatefulSet) { *(ss.Spec.Replicas) = count }) - var petList *v1.PodList + var statefulPodList *v1.PodList pollErr := wait.PollImmediate(statefulsetPoll, statefulsetTimeout, func() (bool, error) { - petList = p.getPodList(ps) - if int32(len(petList.Items)) == count { + statefulPodList = s.getPodList(ss) + if int32(len(statefulPodList.Items)) == count { return true, nil } return false, nil }) if pollErr != nil { unhealthy := []string{} - for _, pet := range petList.Items { - delTs, phase, readiness := pet.DeletionTimestamp, pet.Status.Phase, v1.IsPodReady(&pet) + for _, statefulPod := range statefulPodList.Items { + delTs, phase, readiness := statefulPod.DeletionTimestamp, statefulPod.Status.Phase, v1.IsPodReady(&statefulPod) if delTs != nil || phase != v1.PodRunning || !readiness { - unhealthy = append(unhealthy, fmt.Sprintf("%v: deletion %v, phase %v, readiness %v", pet.Name, delTs, phase, readiness)) + unhealthy = append(unhealthy, fmt.Sprintf("%v: deletion %v, phase %v, readiness %v", statefulPod.Name, delTs, phase, readiness)) } } return fmt.Errorf("Failed to scale statefulset to %d in %v. Remaining pods:\n%v", count, statefulsetTimeout, unhealthy) @@ -818,24 +818,24 @@ func (p *statefulSetTester) scale(ps *apps.StatefulSet, count int32) error { return nil } -func (p *statefulSetTester) updateReplicas(ps *apps.StatefulSet, count int32) { - p.update(ps.Namespace, ps.Name, func(ps *apps.StatefulSet) { ps.Spec.Replicas = &count }) +func (s *statefulSetTester) updateReplicas(ss *apps.StatefulSet, count int32) { + s.update(ss.Namespace, ss.Name, func(ss *apps.StatefulSet) { ss.Spec.Replicas = &count }) } -func (p *statefulSetTester) restart(ps *apps.StatefulSet) { - oldReplicas := *(ps.Spec.Replicas) - framework.ExpectNoError(p.scale(ps, 0)) - p.update(ps.Namespace, ps.Name, func(ps *apps.StatefulSet) { *(ps.Spec.Replicas) = oldReplicas }) +func (s *statefulSetTester) restart(ss *apps.StatefulSet) { + oldReplicas := *(ss.Spec.Replicas) + framework.ExpectNoError(s.scale(ss, 0)) + s.update(ss.Namespace, ss.Name, func(ss *apps.StatefulSet) { *(ss.Spec.Replicas) = oldReplicas }) } -func (p *statefulSetTester) update(ns, name string, update func(ps *apps.StatefulSet)) { +func (s *statefulSetTester) update(ns, name string, update func(ss *apps.StatefulSet)) { for i := 0; i < 3; i++ { - ps, err := p.c.Apps().StatefulSets(ns).Get(name, metav1.GetOptions{}) + ss, err := s.c.Apps().StatefulSets(ns).Get(name, metav1.GetOptions{}) if err != nil { framework.Failf("failed to get statefulset %q: %v", name, err) } - update(ps) - ps, err = p.c.Apps().StatefulSets(ns).Update(ps) + update(ss) + ss, err = s.c.Apps().StatefulSets(ns).Update(ss) if err == nil { return } @@ -846,38 +846,38 @@ func (p *statefulSetTester) update(ns, name string, update func(ps *apps.Statefu framework.Failf("too many retries draining statefulset %q", name) } -func (p *statefulSetTester) getPodList(ps *apps.StatefulSet) *v1.PodList { - selector, err := metav1.LabelSelectorAsSelector(ps.Spec.Selector) +func (s *statefulSetTester) getPodList(ss *apps.StatefulSet) *v1.PodList { + selector, err := metav1.LabelSelectorAsSelector(ss.Spec.Selector) framework.ExpectNoError(err) - podList, err := p.c.Core().Pods(ps.Namespace).List(v1.ListOptions{LabelSelector: selector.String()}) + podList, err := s.c.Core().Pods(ss.Namespace).List(metav1.ListOptions{LabelSelector: selector.String()}) framework.ExpectNoError(err) return podList } -func (p *statefulSetTester) confirmPetCount(count int, ps *apps.StatefulSet, timeout time.Duration) { +func (s *statefulSetTester) confirmStatefulPodCount(count int, ss *apps.StatefulSet, timeout time.Duration) { start := time.Now() deadline := start.Add(timeout) for t := time.Now(); t.Before(deadline); t = time.Now() { - podList := p.getPodList(ps) - petCount := len(podList.Items) - if petCount != count { - framework.Failf("StatefulSet %v scaled unexpectedly scaled to %d -> %d replicas: %+v", ps.Name, count, len(podList.Items), podList) + podList := s.getPodList(ss) + statefulPodCount := len(podList.Items) + if statefulPodCount != count { + framework.Failf("StatefulSet %v scaled unexpectedly scaled to %d -> %d replicas: %+v", ss.Name, count, len(podList.Items), podList) } - framework.Logf("Verifying statefulset %v doesn't scale past %d for another %+v", ps.Name, count, deadline.Sub(t)) + framework.Logf("Verifying statefulset %v doesn't scale past %d for another %+v", ss.Name, count, deadline.Sub(t)) time.Sleep(1 * time.Second) } } -func (p *statefulSetTester) waitForRunning(numPets int32, ps *apps.StatefulSet, shouldBeReady bool) { +func (s *statefulSetTester) waitForRunning(numStatefulPods int32, ss *apps.StatefulSet, shouldBeReady bool) { pollErr := wait.PollImmediate(statefulsetPoll, statefulsetTimeout, func() (bool, error) { - podList := p.getPodList(ps) - if int32(len(podList.Items)) < numPets { - framework.Logf("Found %d stateful pods, waiting for %d", len(podList.Items), numPets) + podList := s.getPodList(ss) + if int32(len(podList.Items)) < numStatefulPods { + framework.Logf("Found %d stateful pods, waiting for %d", len(podList.Items), numStatefulPods) return false, nil } - if int32(len(podList.Items)) > numPets { - return false, fmt.Errorf("Too many pods scheduled, expected %d got %d", numPets, len(podList.Items)) + if int32(len(podList.Items)) > numStatefulPods { + return false, fmt.Errorf("Too many pods scheduled, expected %d got %d", numStatefulPods, len(podList.Items)) } for _, p := range podList.Items { isReady := v1.IsPodReady(&p) @@ -894,34 +894,34 @@ func (p *statefulSetTester) waitForRunning(numPets int32, ps *apps.StatefulSet, } } -func (p *statefulSetTester) waitForRunningAndReady(numPets int32, ps *apps.StatefulSet) { - p.waitForRunning(numPets, ps, true) +func (s *statefulSetTester) waitForRunningAndReady(numStatefulPods int32, ss *apps.StatefulSet) { + s.waitForRunning(numStatefulPods, ss, true) } -func (p *statefulSetTester) waitForRunningAndNotReady(numPets int32, ps *apps.StatefulSet) { - p.waitForRunning(numPets, ps, false) +func (s *statefulSetTester) waitForRunningAndNotReady(numStatefulPods int32, ss *apps.StatefulSet) { + s.waitForRunning(numStatefulPods, ss, false) } -func (p *statefulSetTester) breakProbe(ps *apps.StatefulSet, probe *v1.Probe) error { +func (s *statefulSetTester) breakProbe(ss *apps.StatefulSet, probe *v1.Probe) error { path := probe.HTTPGet.Path if path == "" { return fmt.Errorf("Path expected to be not empty: %v", path) } cmd := fmt.Sprintf("mv -v /usr/share/nginx/html%v /tmp/", path) - return p.execInPets(ps, cmd) + return s.execInStatefulPods(ss, cmd) } -func (p *statefulSetTester) restoreProbe(ps *apps.StatefulSet, probe *v1.Probe) error { +func (s *statefulSetTester) restoreProbe(ss *apps.StatefulSet, probe *v1.Probe) error { path := probe.HTTPGet.Path if path == "" { return fmt.Errorf("Path expected to be not empty: %v", path) } cmd := fmt.Sprintf("mv -v /tmp%v /usr/share/nginx/html/", path) - return p.execInPets(ps, cmd) + return s.execInStatefulPods(ss, cmd) } -func (p *statefulSetTester) setHealthy(ps *apps.StatefulSet) { - podList := p.getPodList(ps) +func (s *statefulSetTester) setHealthy(ss *apps.StatefulSet) { + podList := s.getPodList(ss) markedHealthyPod := "" for _, pod := range podList.Items { if pod.Status.Phase != v1.PodRunning { @@ -933,27 +933,27 @@ func (p *statefulSetTester) setHealthy(ps *apps.StatefulSet) { if markedHealthyPod != "" { framework.Failf("Found multiple non-healthy stateful pods: %v and %v", pod.Name, markedHealthyPod) } - p, err := framework.UpdatePodWithRetries(p.c, pod.Namespace, pod.Name, func(up *v1.Pod) { - up.Annotations[petset.StatefulSetInitAnnotation] = "true" + p, err := framework.UpdatePodWithRetries(s.c, pod.Namespace, pod.Name, func(update *v1.Pod) { + update.Annotations[statefulset.StatefulSetInitAnnotation] = "true" }) framework.ExpectNoError(err) - framework.Logf("Set annotation %v to %v on pod %v", petset.StatefulSetInitAnnotation, p.Annotations[petset.StatefulSetInitAnnotation], pod.Name) + framework.Logf("Set annotation %v to %v on pod %v", statefulset.StatefulSetInitAnnotation, p.Annotations[statefulset.StatefulSetInitAnnotation], pod.Name) markedHealthyPod = pod.Name } } -func (p *statefulSetTester) waitForStatus(ps *apps.StatefulSet, expectedReplicas int32) { +func (s *statefulSetTester) waitForStatus(ss *apps.StatefulSet, expectedReplicas int32) { framework.Logf("Waiting for statefulset status.replicas updated to %d", expectedReplicas) - ns, name := ps.Namespace, ps.Name + ns, name := ss.Namespace, ss.Name pollErr := wait.PollImmediate(statefulsetPoll, statefulsetTimeout, func() (bool, error) { - psGet, err := p.c.Apps().StatefulSets(ns).Get(name, metav1.GetOptions{}) + ssGet, err := s.c.Apps().StatefulSets(ns).Get(name, metav1.GetOptions{}) if err != nil { return false, err } - if psGet.Status.Replicas != expectedReplicas { - framework.Logf("Waiting for stateful set status to become %d, currently %d", expectedReplicas, psGet.Status.Replicas) + if ssGet.Status.Replicas != expectedReplicas { + framework.Logf("Waiting for stateful set status to become %d, currently %d", expectedReplicas, ssGet.Status.Replicas) return false, nil } return true, nil @@ -964,21 +964,21 @@ func (p *statefulSetTester) waitForStatus(ps *apps.StatefulSet, expectedReplicas } func deleteAllStatefulSets(c clientset.Interface, ns string) { - pst := &statefulSetTester{c: c} - psList, err := c.Apps().StatefulSets(ns).List(v1.ListOptions{LabelSelector: labels.Everything().String()}) + sst := &statefulSetTester{c: c} + ssList, err := c.Apps().StatefulSets(ns).List(metav1.ListOptions{LabelSelector: labels.Everything().String()}) framework.ExpectNoError(err) // Scale down each statefulset, then delete it completely. // Deleting a pvc without doing this will leak volumes, #25101. errList := []string{} - for _, ps := range psList.Items { - framework.Logf("Scaling statefulset %v to 0", ps.Name) - if err := pst.scale(&ps, 0); err != nil { + for _, ss := range ssList.Items { + framework.Logf("Scaling statefulset %v to 0", ss.Name) + if err := sst.scale(&ss, 0); err != nil { errList = append(errList, fmt.Sprintf("%v", err)) } - pst.waitForStatus(&ps, 0) - framework.Logf("Deleting statefulset %v", ps.Name) - if err := c.Apps().StatefulSets(ps.Namespace).Delete(ps.Name, nil); err != nil { + sst.waitForStatus(&ss, 0) + framework.Logf("Deleting statefulset %v", ss.Name) + if err := c.Apps().StatefulSets(ss.Namespace).Delete(ss.Name, nil); err != nil { errList = append(errList, fmt.Sprintf("%v", err)) } } @@ -987,7 +987,7 @@ func deleteAllStatefulSets(c clientset.Interface, ns string) { pvNames := sets.NewString() // TODO: Don't assume all pvcs in the ns belong to a statefulset pvcPollErr := wait.PollImmediate(statefulsetPoll, statefulsetTimeout, func() (bool, error) { - pvcList, err := c.Core().PersistentVolumeClaims(ns).List(v1.ListOptions{LabelSelector: labels.Everything().String()}) + pvcList, err := c.Core().PersistentVolumeClaims(ns).List(metav1.ListOptions{LabelSelector: labels.Everything().String()}) if err != nil { framework.Logf("WARNING: Failed to list pvcs, retrying %v", err) return false, nil @@ -1007,7 +1007,7 @@ func deleteAllStatefulSets(c clientset.Interface, ns string) { } pollErr := wait.PollImmediate(statefulsetPoll, statefulsetTimeout, func() (bool, error) { - pvList, err := c.Core().PersistentVolumes().List(v1.ListOptions{LabelSelector: labels.Everything().String()}) + pvList, err := c.Core().PersistentVolumes().List(metav1.ListOptions{LabelSelector: labels.Everything().String()}) if err != nil { framework.Logf("WARNING: Failed to list pvs, retrying %v", err) return false, nil @@ -1032,9 +1032,9 @@ func deleteAllStatefulSets(c clientset.Interface, ns string) { } } -func pollReadWithTimeout(pet petTester, petNumber int, key, expectedVal string) error { +func pollReadWithTimeout(statefulPod statefulPodTester, statefulPodNumber int, key, expectedVal string) error { err := wait.PollImmediate(time.Second, readTimeout, func() (bool, error) { - val := pet.read(petNumber, key) + val := statefulPod.read(statefulPodNumber, key) if val == "" { return false, nil } else if val != expectedVal { @@ -1044,13 +1044,13 @@ func pollReadWithTimeout(pet petTester, petNumber int, key, expectedVal string) }) if err == wait.ErrWaitTimeout { - return fmt.Errorf("timed out when trying to read value for key %v from stateful pod %d", key, petNumber) + return fmt.Errorf("timed out when trying to read value for key %v from stateful pod %d", key, statefulPodNumber) } return err } func isInitialized(pod v1.Pod) bool { - initialized, ok := pod.Annotations[petset.StatefulSetInitAnnotation] + initialized, ok := pod.Annotations[statefulset.StatefulSetInitAnnotation] if !ok { return false } @@ -1067,7 +1067,7 @@ func dec(i int64, exponent int) *inf.Dec { func newPVC(name string) v1.PersistentVolumeClaim { return v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Annotations: map[string]string{ "volume.alpha.kubernetes.io/storage-class": "anything", @@ -1086,10 +1086,10 @@ func newPVC(name string) v1.PersistentVolumeClaim { } } -func newStatefulSet(name, ns, governingSvcName string, replicas int32, petMounts []v1.VolumeMount, podMounts []v1.VolumeMount, labels map[string]string) *apps.StatefulSet { - mounts := append(petMounts, podMounts...) +func newStatefulSet(name, ns, governingSvcName string, replicas int32, statefulPodMounts []v1.VolumeMount, podMounts []v1.VolumeMount, labels map[string]string) *apps.StatefulSet { + mounts := append(statefulPodMounts, podMounts...) claims := []v1.PersistentVolumeClaim{} - for _, m := range petMounts { + for _, m := range statefulPodMounts { claims = append(claims, newPVC(m.Name)) } @@ -1110,7 +1110,7 @@ func newStatefulSet(name, ns, governingSvcName string, replicas int32, petMounts Kind: "StatefulSet", APIVersion: "apps/v1beta1", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: ns, }, @@ -1120,7 +1120,7 @@ func newStatefulSet(name, ns, governingSvcName string, replicas int32, petMounts }, Replicas: func(i int32) *int32 { return &i }(replicas), Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: labels, Annotations: map[string]string{}, }, diff --git a/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/petset/cockroachdb/service.yaml b/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/statefulset/cockroachdb/service.yaml similarity index 100% rename from vendor/k8s.io/kubernetes/test/e2e/testing-manifests/petset/cockroachdb/service.yaml rename to vendor/k8s.io/kubernetes/test/e2e/testing-manifests/statefulset/cockroachdb/service.yaml diff --git a/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/petset/cockroachdb/petset.yaml b/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/statefulset/cockroachdb/statefulset.yaml similarity index 100% rename from vendor/k8s.io/kubernetes/test/e2e/testing-manifests/petset/cockroachdb/petset.yaml rename to vendor/k8s.io/kubernetes/test/e2e/testing-manifests/statefulset/cockroachdb/statefulset.yaml diff --git a/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/petset/mysql-galera/service.yaml b/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/statefulset/mysql-galera/service.yaml similarity index 100% rename from vendor/k8s.io/kubernetes/test/e2e/testing-manifests/petset/mysql-galera/service.yaml rename to vendor/k8s.io/kubernetes/test/e2e/testing-manifests/statefulset/mysql-galera/service.yaml diff --git a/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/petset/mysql-galera/petset.yaml b/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/statefulset/mysql-galera/statefulset.yaml similarity index 100% rename from vendor/k8s.io/kubernetes/test/e2e/testing-manifests/petset/mysql-galera/petset.yaml rename to vendor/k8s.io/kubernetes/test/e2e/testing-manifests/statefulset/mysql-galera/statefulset.yaml diff --git a/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/petset/redis/service.yaml b/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/statefulset/redis/service.yaml similarity index 100% rename from vendor/k8s.io/kubernetes/test/e2e/testing-manifests/petset/redis/service.yaml rename to vendor/k8s.io/kubernetes/test/e2e/testing-manifests/statefulset/redis/service.yaml diff --git a/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/petset/redis/petset.yaml b/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/statefulset/redis/statefulset.yaml similarity index 100% rename from vendor/k8s.io/kubernetes/test/e2e/testing-manifests/petset/redis/petset.yaml rename to vendor/k8s.io/kubernetes/test/e2e/testing-manifests/statefulset/redis/statefulset.yaml diff --git a/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/petset/zookeeper/service.yaml b/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/statefulset/zookeeper/service.yaml similarity index 100% rename from vendor/k8s.io/kubernetes/test/e2e/testing-manifests/petset/zookeeper/service.yaml rename to vendor/k8s.io/kubernetes/test/e2e/testing-manifests/statefulset/zookeeper/service.yaml diff --git a/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/petset/zookeeper/petset.yaml b/vendor/k8s.io/kubernetes/test/e2e/testing-manifests/statefulset/zookeeper/statefulset.yaml similarity index 100% rename from vendor/k8s.io/kubernetes/test/e2e/testing-manifests/petset/zookeeper/petset.yaml rename to vendor/k8s.io/kubernetes/test/e2e/testing-manifests/statefulset/zookeeper/statefulset.yaml diff --git a/vendor/k8s.io/kubernetes/test/e2e/third-party.go b/vendor/k8s.io/kubernetes/test/e2e/third-party.go index 6e83760c..13a792ae 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/third-party.go +++ b/vendor/k8s.io/kubernetes/test/e2e/third-party.go @@ -26,7 +26,6 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/api/v1" extensions "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" "k8s.io/kubernetes/test/e2e/framework" @@ -44,8 +43,8 @@ var data = `{ }` type Foo struct { - metav1.TypeMeta `json:",inline"` - v1.ObjectMeta `json:"metadata,omitempty" description:"standard object metadata"` + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty" description:"standard object metadata"` SomeField string `json:"someField"` OtherField int `json:"otherField"` @@ -64,7 +63,7 @@ var _ = Describe("ThirdParty resources [Flaky] [Disruptive]", func() { f := framework.NewDefaultFramework("thirdparty") rsrc := &extensions.ThirdPartyResource{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo.company.com", }, Versions: []extensions.APIVersion{ @@ -120,7 +119,7 @@ var _ = Describe("ThirdParty resources [Flaky] [Disruptive]", func() { TypeMeta: metav1.TypeMeta{ Kind: "Foo", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, SomeField: "bar", @@ -163,7 +162,7 @@ var _ = Describe("ThirdParty resources [Flaky] [Disruptive]", func() { // Need to manually do the serialization because otherwise the // Content-Type header is set to protobuf, the thirdparty codec in // the API server side only accepts JSON. - deleteOptionsData, err := json.Marshal(v1.NewDeleteOptions(10)) + deleteOptionsData, err := json.Marshal(metav1.NewDeleteOptions(10)) framework.ExpectNoError(err) if _, err := f.ClientSet.Core().RESTClient().Delete(). AbsPath("/apis/company.com/v1/namespaces/default/foos/foo"). diff --git a/vendor/k8s.io/kubernetes/test/e2e/ubernetes_lite.go b/vendor/k8s.io/kubernetes/test/e2e/ubernetes_lite.go index 8c41db1d..0b5933ae 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/ubernetes_lite.go +++ b/vendor/k8s.io/kubernetes/test/e2e/ubernetes_lite.go @@ -63,7 +63,7 @@ func SpreadServiceOrFail(f *framework.Framework, replicaCount int, image string) // First create the service serviceName := "test-service" serviceSpec := &v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: serviceName, Namespace: f.Namespace.Name, }, @@ -82,7 +82,7 @@ func SpreadServiceOrFail(f *framework.Framework, replicaCount int, image string) // Now create some pods behind the service podSpec := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: serviceName, Labels: map[string]string{"service": serviceName}, }, @@ -127,7 +127,7 @@ func getZoneNameForNode(node v1.Node) (string, error) { // Find the names of all zones in which we have nodes in this cluster. func getZoneNames(c clientset.Interface) ([]string, error) { zoneNames := sets.NewString() - nodes, err := c.Core().Nodes().List(v1.ListOptions{}) + nodes, err := c.Core().Nodes().List(metav1.ListOptions{}) if err != nil { return nil, err } @@ -192,7 +192,7 @@ func SpreadRCOrFail(f *framework.Framework, replicaCount int32, image string) { name := "ubelite-spread-rc-" + string(uuid.NewUUID()) By(fmt.Sprintf("Creating replication controller %s", name)) controller, err := f.ClientSet.Core().ReplicationControllers(f.Namespace.Name).Create(&v1.ReplicationController{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: f.Namespace.Name, Name: name, }, @@ -202,7 +202,7 @@ func SpreadRCOrFail(f *framework.Framework, replicaCount int32, image string) { "name": name, }, Template: &v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"name": name}, }, Spec: v1.PodSpec{ diff --git a/vendor/k8s.io/kubernetes/test/e2e/volume_provisioning.go b/vendor/k8s.io/kubernetes/test/e2e/volume_provisioning.go index 431aaaad..65d52347 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/volume_provisioning.go +++ b/vendor/k8s.io/kubernetes/test/e2e/volume_provisioning.go @@ -142,7 +142,7 @@ var _ = framework.KubeDescribe("Dynamic provisioning", func() { func newClaim(ns string, alpha bool) *v1.PersistentVolumeClaim { claim := v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ GenerateName: "pvc-", Namespace: ns, }, @@ -179,7 +179,7 @@ func runInPodWithVolume(c clientset.Interface, ns, claimName, command string) { Kind: "Pod", APIVersion: "v1", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ GenerateName: "pvc-volume-tester-", }, Spec: v1.PodSpec{ @@ -235,7 +235,7 @@ func newStorageClass() *storage.StorageClass { TypeMeta: metav1.TypeMeta{ Kind: "StorageClass", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "fast", }, Provisioner: pluginName, diff --git a/vendor/k8s.io/kubernetes/test/e2e/volumes.go b/vendor/k8s.io/kubernetes/test/e2e/volumes.go index 05fe5f42..c5cf1d66 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/volumes.go +++ b/vendor/k8s.io/kubernetes/test/e2e/volumes.go @@ -138,7 +138,7 @@ func startVolumeServer(client clientset.Interface, config VolumeTestConfig) *v1. Kind: "Pod", APIVersion: "v1", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: config.prefix + "-server", Labels: map[string]string{ "role": config.prefix + "-server", @@ -220,7 +220,7 @@ func testVolumeClient(client clientset.Interface, config VolumeTestConfig, fsGro Kind: "Pod", APIVersion: "v1", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: config.prefix + "-client", Labels: map[string]string{ "role": config.prefix + "-client", @@ -300,7 +300,7 @@ func injectHtml(client clientset.Interface, config VolumeTestConfig, volume v1.V Kind: "Pod", APIVersion: "v1", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: config.prefix + "-injector", Labels: map[string]string{ "role": config.prefix + "-injector", @@ -452,7 +452,7 @@ var _ = framework.KubeDescribe("Volumes [Feature:Volumes]", func() { Kind: "Endpoints", APIVersion: "v1", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: config.prefix + "-server", }, Subsets: []v1.EndpointSubset{ @@ -589,7 +589,7 @@ var _ = framework.KubeDescribe("Volumes [Feature:Volumes]", func() { Kind: "Secret", APIVersion: "v1", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: config.prefix + "-secret", }, Data: map[string][]byte{ @@ -664,7 +664,7 @@ var _ = framework.KubeDescribe("Volumes [Feature:Volumes]", func() { Kind: "Secret", APIVersion: "v1", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: config.prefix + "-secret", }, // Must use the ceph keyring at contrib/for-tests/volumes-ceph/ceph/init.sh @@ -859,7 +859,7 @@ var _ = framework.KubeDescribe("Volumes [Feature:Volumes]", func() { Kind: "ConfigMap", APIVersion: "v1", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: config.prefix + "-map", }, Data: map[string]string{ diff --git a/vendor/k8s.io/kubernetes/test/e2e_federation/BUILD b/vendor/k8s.io/kubernetes/test/e2e_federation/BUILD new file mode 100644 index 00000000..aac855ee --- /dev/null +++ b/vendor/k8s.io/kubernetes/test/e2e_federation/BUILD @@ -0,0 +1,64 @@ +package(default_visibility = ["//visibility:public"]) + +licenses(["notice"]) + +load( + "@io_bazel_rules_go//go:def.bzl", + "go_library", +) + +go_library( + name = "go_default_library", + srcs = [ + "federated-daemonset.go", + "federated-deployment.go", + "federated-ingress.go", + "federated-namespace.go", + "federated-replicaset.go", + "federated-secret.go", + "federated-service.go", + "federation-apiserver.go", + "federation-authn.go", + "federation-event.go", + "federation-util.go", + ], + tags = ["automanaged"], + deps = [ + "//federation/apis/federation/v1beta1:go_default_library", + "//federation/client/clientset_generated/federation_clientset:go_default_library", + "//federation/client/clientset_generated/federation_clientset/typed/core/v1:go_default_library", + "//federation/pkg/federation-controller/util:go_default_library", + "//pkg/api:go_default_library", + "//pkg/api/v1:go_default_library", + "//pkg/apis/extensions/v1beta1:go_default_library", + "//pkg/client/clientset_generated/clientset:go_default_library", + "//pkg/util/intstr:go_default_library", + "//test/e2e/common:go_default_library", + "//test/e2e/framework:go_default_library", + "//test/e2e_federation/framework:go_default_library", + "//vendor:github.com/onsi/ginkgo", + "//vendor:github.com/onsi/gomega", + "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/util/wait", + "//vendor:k8s.io/client-go/rest", + "//vendor:k8s.io/client-go/tools/clientcmd", + "//vendor:k8s.io/client-go/tools/clientcmd/api", + ], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [ + ":package-srcs", + "//test/e2e_federation/framework:all-srcs", + ], + tags = ["automanaged"], +) diff --git a/vendor/k8s.io/kubernetes/test/e2e_federation/OWNERS b/vendor/k8s.io/kubernetes/test/e2e_federation/OWNERS new file mode 100644 index 00000000..95a79198 --- /dev/null +++ b/vendor/k8s.io/kubernetes/test/e2e_federation/OWNERS @@ -0,0 +1,13 @@ +reviewers: + - colhom + - csbell + - irfanurrehman + - madhusudancs + - mwielgus + - nikhiljindal + - shashidharatd +approvers: + - csbell + - madhusudancs + - mwielgus + - nikhiljindal diff --git a/vendor/k8s.io/kubernetes/test/e2e/federation-daemonset.go b/vendor/k8s.io/kubernetes/test/e2e_federation/federated-daemonset.go similarity index 91% rename from vendor/k8s.io/kubernetes/test/e2e/federation-daemonset.go rename to vendor/k8s.io/kubernetes/test/e2e_federation/federated-daemonset.go index 09b66e5d..ef7187c2 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/federation-daemonset.go +++ b/vendor/k8s.io/kubernetes/test/e2e_federation/federated-daemonset.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package e2e +package e2e_federation import ( "fmt" @@ -32,6 +32,7 @@ import ( "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" kubeclientset "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/test/e2e/framework" + fedframework "k8s.io/kubernetes/test/e2e_federation/framework" ) const ( @@ -44,58 +45,58 @@ const ( var _ = framework.KubeDescribe("Federation daemonsets [Feature:Federation]", func() { var clusters map[string]*cluster // All clusters, keyed by cluster name - f := framework.NewDefaultFederatedFramework("federated-daemonset") + f := fedframework.NewDefaultFederatedFramework("federated-daemonset") Describe("DaemonSet objects", func() { BeforeEach(func() { - framework.SkipUnlessFederated(f.ClientSet) + fedframework.SkipUnlessFederated(f.ClientSet) clusters = map[string]*cluster{} registerClusters(clusters, UserAgentName, "", f) }) AfterEach(func() { - framework.SkipUnlessFederated(f.ClientSet) + fedframework.SkipUnlessFederated(f.ClientSet) // Delete all daemonsets. nsName := f.FederationNamespace.Name - deleteAllDaemonSetsOrFail(f.FederationClientset_1_5, nsName) + deleteAllDaemonSetsOrFail(f.FederationClientset, nsName) unregisterClusters(clusters, f) }) It("should be created and deleted successfully", func() { - framework.SkipUnlessFederated(f.ClientSet) + fedframework.SkipUnlessFederated(f.ClientSet) nsName := f.FederationNamespace.Name - daemonset := createDaemonSetOrFail(f.FederationClientset_1_5, nsName) + daemonset := createDaemonSetOrFail(f.FederationClientset, nsName) defer func() { // Cleanup By(fmt.Sprintf("Deleting daemonset %q in namespace %q", daemonset.Name, nsName)) - err := f.FederationClientset_1_5.Extensions().DaemonSets(nsName).Delete(daemonset.Name, &v1.DeleteOptions{}) + err := f.FederationClientset.Extensions().DaemonSets(nsName).Delete(daemonset.Name, &metav1.DeleteOptions{}) framework.ExpectNoError(err, "Error deleting daemonset %q in namespace %q", daemonset.Name, nsName) }() // wait for daemonset shards being created waitForDaemonSetShardsOrFail(nsName, daemonset, clusters) - daemonset = updateDaemonSetOrFail(f.FederationClientset_1_5, nsName) + daemonset = updateDaemonSetOrFail(f.FederationClientset, nsName) waitForDaemonSetShardsUpdatedOrFail(nsName, daemonset, clusters) }) It("should be deleted from underlying clusters when OrphanDependents is false", func() { - framework.SkipUnlessFederated(f.ClientSet) + fedframework.SkipUnlessFederated(f.ClientSet) nsName := f.FederationNamespace.Name orphanDependents := false - verifyCascadingDeletionForDS(f.FederationClientset_1_5, clusters, &orphanDependents, nsName) + verifyCascadingDeletionForDS(f.FederationClientset, clusters, &orphanDependents, nsName) By(fmt.Sprintf("Verified that daemonsets were deleted from underlying clusters")) }) It("should not be deleted from underlying clusters when OrphanDependents is true", func() { - framework.SkipUnlessFederated(f.ClientSet) + fedframework.SkipUnlessFederated(f.ClientSet) nsName := f.FederationNamespace.Name orphanDependents := true - verifyCascadingDeletionForDS(f.FederationClientset_1_5, clusters, &orphanDependents, nsName) + verifyCascadingDeletionForDS(f.FederationClientset, clusters, &orphanDependents, nsName) By(fmt.Sprintf("Verified that daemonsets were not deleted from underlying clusters")) }) It("should not be deleted from underlying clusters when OrphanDependents is nil", func() { - framework.SkipUnlessFederated(f.ClientSet) + fedframework.SkipUnlessFederated(f.ClientSet) nsName := f.FederationNamespace.Name - verifyCascadingDeletionForDS(f.FederationClientset_1_5, clusters, nil, nsName) + verifyCascadingDeletionForDS(f.FederationClientset, clusters, nil, nsName) By(fmt.Sprintf("Verified that daemonsets were not deleted from underlying clusters")) }) }) @@ -103,7 +104,7 @@ var _ = framework.KubeDescribe("Federation daemonsets [Feature:Federation]", fun // deleteAllDaemonSetsOrFail deletes all DaemonSets in the given namespace name. func deleteAllDaemonSetsOrFail(clientset *fedclientset.Clientset, nsName string) { - DaemonSetList, err := clientset.Extensions().DaemonSets(nsName).List(v1.ListOptions{}) + DaemonSetList, err := clientset.Extensions().DaemonSets(nsName).List(metav1.ListOptions{}) Expect(err).NotTo(HaveOccurred()) orphanDependents := false for _, daemonSet := range DaemonSetList.Items { @@ -159,13 +160,13 @@ func createDaemonSetOrFail(clientset *fedclientset.Clientset, namespace string) } daemonset := &v1beta1.DaemonSet{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: FederatedDaemonSetName, Namespace: namespace, }, Spec: v1beta1.DaemonSetSpec{ Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"aaa": "bbb"}, }, Spec: v1.PodSpec{ @@ -189,7 +190,7 @@ func createDaemonSetOrFail(clientset *fedclientset.Clientset, namespace string) func deleteDaemonSetOrFail(clientset *fedclientset.Clientset, nsName string, daemonsetName string, orphanDependents *bool) { By(fmt.Sprintf("Deleting daemonset %q in namespace %q", daemonsetName, nsName)) - err := clientset.Extensions().DaemonSets(nsName).Delete(daemonsetName, &v1.DeleteOptions{OrphanDependents: orphanDependents}) + err := clientset.Extensions().DaemonSets(nsName).Delete(daemonsetName, &metav1.DeleteOptions{OrphanDependents: orphanDependents}) framework.ExpectNoError(err, "Error deleting daemonset %q in namespace %q", daemonsetName, nsName) // Wait for the daemonset to be deleted. diff --git a/vendor/k8s.io/kubernetes/test/e2e/federation-deployment.go b/vendor/k8s.io/kubernetes/test/e2e_federation/federated-deployment.go similarity index 86% rename from vendor/k8s.io/kubernetes/test/e2e/federation-deployment.go rename to vendor/k8s.io/kubernetes/test/e2e_federation/federated-deployment.go index 9f084bae..ba976723 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/federation-deployment.go +++ b/vendor/k8s.io/kubernetes/test/e2e_federation/federated-deployment.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package e2e +package e2e_federation import ( "fmt" @@ -29,6 +29,7 @@ import ( "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" "k8s.io/kubernetes/test/e2e/framework" + fedframework "k8s.io/kubernetes/test/e2e_federation/framework" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" @@ -42,25 +43,25 @@ const ( // Create/delete deployment api objects var _ = framework.KubeDescribe("Federation deployments [Feature:Federation]", func() { - f := framework.NewDefaultFederatedFramework("federation-deployment") + f := fedframework.NewDefaultFederatedFramework("federation-deployment") Describe("Deployment objects", func() { AfterEach(func() { - framework.SkipUnlessFederated(f.ClientSet) + fedframework.SkipUnlessFederated(f.ClientSet) // Delete all deployments. nsName := f.FederationNamespace.Name - deleteAllDeploymentsOrFail(f.FederationClientset_1_5, nsName) + deleteAllDeploymentsOrFail(f.FederationClientset, nsName) }) It("should be created and deleted successfully", func() { - framework.SkipUnlessFederated(f.ClientSet) + fedframework.SkipUnlessFederated(f.ClientSet) nsName := f.FederationNamespace.Name - deployment := createDeploymentOrFail(f.FederationClientset_1_5, nsName) + deployment := createDeploymentOrFail(f.FederationClientset, nsName) By(fmt.Sprintf("Creation of deployment %q in namespace %q succeeded. Deleting deployment.", deployment.Name, nsName)) // Cleanup - err := f.FederationClientset_1_5.Extensions().Deployments(nsName).Delete(deployment.Name, &v1.DeleteOptions{}) + err := f.FederationClientset.Extensions().Deployments(nsName).Delete(deployment.Name, &metav1.DeleteOptions{}) framework.ExpectNoError(err, "Error deleting deployment %q in namespace %q", deployment.Name, deployment.Namespace) By(fmt.Sprintf("Deletion of deployment %q in namespace %q succeeded.", deployment.Name, nsName)) }) @@ -74,7 +75,7 @@ var _ = framework.KubeDescribe("Federation deployments [Feature:Federation]", fu federationName string ) BeforeEach(func() { - framework.SkipUnlessFederated(f.ClientSet) + fedframework.SkipUnlessFederated(f.ClientSet) if federationName = os.Getenv("FEDERATION_NAME"); federationName == "" { federationName = DefaultFederationName } @@ -84,50 +85,50 @@ var _ = framework.KubeDescribe("Federation deployments [Feature:Federation]", fu AfterEach(func() { nsName := f.FederationNamespace.Name - deleteAllDeploymentsOrFail(f.FederationClientset_1_5, nsName) + deleteAllDeploymentsOrFail(f.FederationClientset, nsName) unregisterClusters(clusters, f) }) It("should create and update matching deployments in underling clusters", func() { nsName := f.FederationNamespace.Name - dep := createDeploymentOrFail(f.FederationClientset_1_5, nsName) + dep := createDeploymentOrFail(f.FederationClientset, nsName) defer func() { // cleanup. deletion of deployments is not supported for underlying clusters By(fmt.Sprintf("Preparing deployment %q/%q for deletion by setting replicas to zero", nsName, dep.Name)) replicas := int32(0) dep.Spec.Replicas = &replicas - f.FederationClientset_1_5.Deployments(nsName).Update(dep) - waitForDeploymentOrFail(f.FederationClientset_1_5, nsName, dep.Name, clusters) - f.FederationClientset_1_5.Deployments(nsName).Delete(dep.Name, &v1.DeleteOptions{}) + f.FederationClientset.Deployments(nsName).Update(dep) + waitForDeploymentOrFail(f.FederationClientset, nsName, dep.Name, clusters) + f.FederationClientset.Deployments(nsName).Delete(dep.Name, &metav1.DeleteOptions{}) }() - waitForDeploymentOrFail(f.FederationClientset_1_5, nsName, dep.Name, clusters) + waitForDeploymentOrFail(f.FederationClientset, nsName, dep.Name, clusters) By(fmt.Sprintf("Successfuly created and synced deployment %q/%q to clusters", nsName, dep.Name)) - updateDeploymentOrFail(f.FederationClientset_1_5, nsName) - waitForDeploymentOrFail(f.FederationClientset_1_5, nsName, dep.Name, clusters) + updateDeploymentOrFail(f.FederationClientset, nsName) + waitForDeploymentOrFail(f.FederationClientset, nsName, dep.Name, clusters) By(fmt.Sprintf("Successfuly updated and synced deployment %q/%q to clusters", nsName, dep.Name)) }) It("should be deleted from underlying clusters when OrphanDependents is false", func() { - framework.SkipUnlessFederated(f.ClientSet) + fedframework.SkipUnlessFederated(f.ClientSet) nsName := f.FederationNamespace.Name orphanDependents := false - verifyCascadingDeletionForDeployment(f.FederationClientset_1_5, clusters, &orphanDependents, nsName) + verifyCascadingDeletionForDeployment(f.FederationClientset, clusters, &orphanDependents, nsName) By(fmt.Sprintf("Verified that deployments were deleted from underlying clusters")) }) It("should not be deleted from underlying clusters when OrphanDependents is true", func() { - framework.SkipUnlessFederated(f.ClientSet) + fedframework.SkipUnlessFederated(f.ClientSet) nsName := f.FederationNamespace.Name orphanDependents := true - verifyCascadingDeletionForDeployment(f.FederationClientset_1_5, clusters, &orphanDependents, nsName) + verifyCascadingDeletionForDeployment(f.FederationClientset, clusters, &orphanDependents, nsName) By(fmt.Sprintf("Verified that deployments were not deleted from underlying clusters")) }) It("should not be deleted from underlying clusters when OrphanDependents is nil", func() { - framework.SkipUnlessFederated(f.ClientSet) + fedframework.SkipUnlessFederated(f.ClientSet) nsName := f.FederationNamespace.Name - verifyCascadingDeletionForDeployment(f.FederationClientset_1_5, clusters, nil, nsName) + verifyCascadingDeletionForDeployment(f.FederationClientset, clusters, nil, nsName) By(fmt.Sprintf("Verified that deployments were not deleted from underlying clusters")) }) @@ -136,7 +137,7 @@ var _ = framework.KubeDescribe("Federation deployments [Feature:Federation]", fu // deleteAllDeploymentsOrFail deletes all deployments in the given namespace name. func deleteAllDeploymentsOrFail(clientset *fedclientset.Clientset, nsName string) { - deploymentList, err := clientset.Extensions().Deployments(nsName).List(v1.ListOptions{}) + deploymentList, err := clientset.Extensions().Deployments(nsName).List(metav1.ListOptions{}) Expect(err).NotTo(HaveOccurred()) orphanDependents := false for _, deployment := range deploymentList.Items { @@ -260,7 +261,7 @@ func updateDeploymentOrFail(clientset *fedclientset.Clientset, namespace string) func deleteDeploymentOrFail(clientset *fedclientset.Clientset, nsName string, deploymentName string, orphanDependents *bool) { By(fmt.Sprintf("Deleting deployment %q in namespace %q", deploymentName, nsName)) - err := clientset.Extensions().Deployments(nsName).Delete(deploymentName, &v1.DeleteOptions{OrphanDependents: orphanDependents}) + err := clientset.Extensions().Deployments(nsName).Delete(deploymentName, &metav1.DeleteOptions{OrphanDependents: orphanDependents}) framework.ExpectNoError(err, "Error deleting deployment %q in namespace %q", deploymentName, nsName) // Wait for the deployment to be deleted. @@ -278,7 +279,7 @@ func deleteDeploymentOrFail(clientset *fedclientset.Clientset, nsName string, de func newDeploymentForFed(namespace string, name string, replicas int32) *v1beta1.Deployment { return &v1beta1.Deployment{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: namespace, }, @@ -288,7 +289,7 @@ func newDeploymentForFed(namespace string, name string, replicas int32) *v1beta1 MatchLabels: map[string]string{"name": "myrs"}, }, Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"name": "myrs"}, }, Spec: v1.PodSpec{ diff --git a/vendor/k8s.io/kubernetes/test/e2e/federated-ingress.go b/vendor/k8s.io/kubernetes/test/e2e_federation/federated-ingress.go similarity index 90% rename from vendor/k8s.io/kubernetes/test/e2e/federated-ingress.go rename to vendor/k8s.io/kubernetes/test/e2e_federation/federated-ingress.go index f490fa9d..42541d32 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/federated-ingress.go +++ b/vendor/k8s.io/kubernetes/test/e2e_federation/federated-ingress.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package e2e +package e2e_federation import ( "fmt" @@ -34,6 +34,7 @@ import ( kubeclientset "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/pkg/util/intstr" "k8s.io/kubernetes/test/e2e/framework" + fedframework "k8s.io/kubernetes/test/e2e_federation/framework" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" @@ -47,8 +48,13 @@ const ( FederatedIngressServicePodName = "federated-ingress-service-test-pod" ) +const ( + // timeout on a single http request. + reqTimeout = 10 * time.Second +) + var _ = framework.KubeDescribe("Federated ingresses [Feature:Federation]", func() { - f := framework.NewDefaultFederatedFramework("federated-ingress") + f := fedframework.NewDefaultFederatedFramework("federated-ingress") // Create/delete ingress api objects // Validate federation apiserver, does not rely on underlying clusters or federation ingress controller. @@ -56,17 +62,17 @@ var _ = framework.KubeDescribe("Federated ingresses [Feature:Federation]", func( AfterEach(func() { nsName := f.FederationNamespace.Name // Delete all ingresses. - deleteAllIngressesOrFail(f.FederationClientset_1_5, nsName) + deleteAllIngressesOrFail(f.FederationClientset, nsName) }) It("should be created and deleted successfully", func() { - framework.SkipUnlessFederated(f.ClientSet) + fedframework.SkipUnlessFederated(f.ClientSet) framework.SkipUnlessProviderIs("gce", "gke") // TODO: Federated ingress is not yet supported on non-GCP platforms. nsName := f.FederationNamespace.Name - ingress := createIngressOrFail(f.FederationClientset_1_5, nsName) + ingress := createIngressOrFail(f.FederationClientset, nsName) By(fmt.Sprintf("Creation of ingress %q in namespace %q succeeded. Deleting ingress.", ingress.Name, nsName)) // Cleanup - err := f.FederationClientset_1_5.Extensions().Ingresses(nsName).Delete(ingress.Name, &v1.DeleteOptions{}) + err := f.FederationClientset.Extensions().Ingresses(nsName).Delete(ingress.Name, &metav1.DeleteOptions{}) framework.ExpectNoError(err, "Error deleting ingress %q in namespace %q", ingress.Name, ingress.Namespace) By(fmt.Sprintf("Deletion of ingress %q in namespace %q succeeded.", ingress.Name, nsName)) }) @@ -82,12 +88,12 @@ var _ = framework.KubeDescribe("Federated ingresses [Feature:Federation]", func( // register clusters in federation apiserver BeforeEach(func() { - framework.SkipUnlessFederated(f.ClientSet) + fedframework.SkipUnlessFederated(f.ClientSet) framework.SkipUnlessProviderIs("gce", "gke") // TODO: Federated ingress is not yet supported on non-GCP platforms. if federationName = os.Getenv("FEDERATION_NAME"); federationName == "" { federationName = DefaultFederationName } - jig = newFederationTestJig(f.FederationClientset_1_5) + jig = newFederationTestJig(f.FederationClientset) clusters = map[string]*cluster{} primaryClusterName = registerClusters(clusters, UserAgentName, federationName, f) ns = f.FederationNamespace.Name @@ -96,38 +102,38 @@ var _ = framework.KubeDescribe("Federated ingresses [Feature:Federation]", func( AfterEach(func() { // Delete all ingresses. nsName := f.FederationNamespace.Name - deleteAllIngressesOrFail(f.FederationClientset_1_5, nsName) + deleteAllIngressesOrFail(f.FederationClientset, nsName) unregisterClusters(clusters, f) }) It("should create and update matching ingresses in underlying clusters", func() { - ingress := createIngressOrFail(f.FederationClientset_1_5, ns) + ingress := createIngressOrFail(f.FederationClientset, ns) // wait for ingress shards being created waitForIngressShardsOrFail(ns, ingress, clusters) - ingress = updateIngressOrFail(f.FederationClientset_1_5, ns) + ingress = updateIngressOrFail(f.FederationClientset, ns) waitForIngressShardsUpdatedOrFail(ns, ingress, clusters) }) It("should be deleted from underlying clusters when OrphanDependents is false", func() { - framework.SkipUnlessFederated(f.ClientSet) + fedframework.SkipUnlessFederated(f.ClientSet) nsName := f.FederationNamespace.Name orphanDependents := false - verifyCascadingDeletionForIngress(f.FederationClientset_1_5, clusters, &orphanDependents, nsName) + verifyCascadingDeletionForIngress(f.FederationClientset, clusters, &orphanDependents, nsName) By(fmt.Sprintf("Verified that ingresses were deleted from underlying clusters")) }) It("should not be deleted from underlying clusters when OrphanDependents is true", func() { - framework.SkipUnlessFederated(f.ClientSet) + fedframework.SkipUnlessFederated(f.ClientSet) nsName := f.FederationNamespace.Name orphanDependents := true - verifyCascadingDeletionForIngress(f.FederationClientset_1_5, clusters, &orphanDependents, nsName) + verifyCascadingDeletionForIngress(f.FederationClientset, clusters, &orphanDependents, nsName) By(fmt.Sprintf("Verified that ingresses were not deleted from underlying clusters")) }) It("should not be deleted from underlying clusters when OrphanDependents is nil", func() { - framework.SkipUnlessFederated(f.ClientSet) + fedframework.SkipUnlessFederated(f.ClientSet) nsName := f.FederationNamespace.Name - verifyCascadingDeletionForIngress(f.FederationClientset_1_5, clusters, nil, nsName) + verifyCascadingDeletionForIngress(f.FederationClientset, clusters, nil, nsName) By(fmt.Sprintf("Verified that ingresses were not deleted from underlying clusters")) }) @@ -138,13 +144,13 @@ var _ = framework.KubeDescribe("Federated ingresses [Feature:Federation]", func( ) BeforeEach(func() { - framework.SkipUnlessFederated(f.ClientSet) + fedframework.SkipUnlessFederated(f.ClientSet) // create backend pod createBackendPodsOrFail(clusters, ns, FederatedIngressServicePodName) // create backend service - service = createServiceOrFail(f.FederationClientset_1_5, ns, FederatedIngressServiceName) + service = createServiceOrFail(f.FederationClientset, ns, FederatedIngressServiceName) // create ingress object - jig.ing = createIngressOrFail(f.FederationClientset_1_5, ns) + jig.ing = createIngressOrFail(f.FederationClientset, ns) // wait for services objects sync waitForServiceShardsOrFail(ns, service, clusters) // wait for ingress objects sync @@ -154,14 +160,14 @@ var _ = framework.KubeDescribe("Federated ingresses [Feature:Federation]", func( AfterEach(func() { deleteBackendPodsOrFail(clusters, ns) if service != nil { - deleteServiceOrFail(f.FederationClientset_1_5, ns, service.Name, nil) + deleteServiceOrFail(f.FederationClientset, ns, service.Name, nil) cleanupServiceShardsAndProviderResources(ns, service, clusters) service = nil } else { By("No service to delete. Service is nil") } if jig.ing != nil { - deleteIngressOrFail(f.FederationClientset_1_5, ns, jig.ing.Name, nil) + deleteIngressOrFail(f.FederationClientset, ns, jig.ing.Name, nil) for clusterName, cluster := range clusters { deleteClusterIngressOrFail(clusterName, cluster.Clientset, ns, jig.ing.Name) } @@ -199,7 +205,7 @@ var _ = framework.KubeDescribe("Federated ingresses [Feature:Federation]", func( // Deletes all Ingresses in the given namespace name. func deleteAllIngressesOrFail(clientset *fedclientset.Clientset, nsName string) { orphanDependents := false - err := clientset.Extensions().Ingresses(nsName).DeleteCollection(&v1.DeleteOptions{OrphanDependents: &orphanDependents}, v1.ListOptions{}) + err := clientset.Extensions().Ingresses(nsName).DeleteCollection(&metav1.DeleteOptions{OrphanDependents: &orphanDependents}, metav1.ListOptions{}) Expect(err).NotTo(HaveOccurred(), fmt.Sprintf("Error in deleting ingresses in namespace: %s", nsName)) } @@ -323,7 +329,7 @@ func deleteIngressOrFail(clientset *fedclientset.Clientset, namespace string, in if clientset == nil || len(namespace) == 0 || len(ingressName) == 0 { Fail(fmt.Sprintf("Internal error: invalid parameters passed to deleteIngressOrFail: clientset: %v, namespace: %v, ingress: %v", clientset, namespace, ingressName)) } - err := clientset.Ingresses(namespace).Delete(ingressName, &v1.DeleteOptions{OrphanDependents: orphanDependents}) + err := clientset.Ingresses(namespace).Delete(ingressName, &metav1.DeleteOptions{OrphanDependents: orphanDependents}) framework.ExpectNoError(err, "Error deleting ingress %q from namespace %q", ingressName, namespace) // Wait for the ingress to be deleted. err = wait.Poll(framework.Poll, wait.ForeverTestTimeout, func() (bool, error) { @@ -343,7 +349,7 @@ func deleteClusterIngressOrFail(clusterName string, clientset *kubeclientset.Cli if clientset == nil || len(namespace) == 0 || len(ingressName) == 0 { Fail(fmt.Sprintf("Internal error: invalid parameters passed to deleteClusterIngressOrFail: cluster: %q, clientset: %v, namespace: %v, ingress: %v", clusterName, clientset, namespace, ingressName)) } - err := clientset.Ingresses(namespace).Delete(ingressName, v1.NewDeleteOptions(0)) + err := clientset.Ingresses(namespace).Delete(ingressName, metav1.NewDeleteOptions(0)) framework.ExpectNoError(err, "Error deleting cluster ingress %q/%q from cluster %q", namespace, ingressName, clusterName) } @@ -354,7 +360,7 @@ func createIngressOrFail(clientset *fedclientset.Clientset, namespace string) *v By(fmt.Sprintf("Creating federated ingress %q in namespace %q", FederatedIngressName, namespace)) ingress := &v1beta1.Ingress{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: FederatedIngressName, }, Spec: v1beta1.IngressSpec{ @@ -377,7 +383,7 @@ func updateIngressOrFail(clientset *fedclientset.Clientset, namespace string) (n Fail(fmt.Sprintf("Internal error: invalid parameters passed to createIngressOrFail: clientset: %v, namespace: %v", clientset, namespace)) } ingress := &v1beta1.Ingress{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: FederatedIngressName, }, Spec: v1beta1.IngressSpec{ @@ -395,7 +401,7 @@ func updateIngressOrFail(clientset *fedclientset.Clientset, namespace string) (n for i := 0; i < MaxRetriesOnFederatedApiserver; i++ { newIng, err = clientset.Extensions().Ingresses(namespace).Update(ingress) if err == nil { - describeIng(namespace) + framework.DescribeIng(namespace) return newIng } if !errors.IsConflict(err) && !errors.IsServerTimeout(err) { @@ -422,7 +428,7 @@ func (j *federationTestJig) waitForFederatedIngress() { for _, p := range rules.IngressRuleValue.HTTP.Paths { route := fmt.Sprintf("%v://%v%v", proto, address, p.Path) framework.Logf("Testing route %v host %v with simple GET", route, rules.Host) - framework.ExpectNoError(pollURL(route, rules.Host, framework.LoadBalancerPollTimeout, framework.LoadBalancerPollInterval, timeoutClient, false)) + framework.ExpectNoError(framework.PollURL(route, rules.Host, framework.LoadBalancerPollTimeout, framework.LoadBalancerPollInterval, timeoutClient, false)) } } } diff --git a/vendor/k8s.io/kubernetes/test/e2e/federated-namespace.go b/vendor/k8s.io/kubernetes/test/e2e_federation/federated-namespace.go similarity index 79% rename from vendor/k8s.io/kubernetes/test/e2e/federated-namespace.go rename to vendor/k8s.io/kubernetes/test/e2e_federation/federated-namespace.go index 1cf7f585..7cd19a85 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/federated-namespace.go +++ b/vendor/k8s.io/kubernetes/test/e2e_federation/federated-namespace.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package e2e +package e2e_federation import ( "fmt" @@ -29,6 +29,7 @@ import ( "k8s.io/kubernetes/pkg/api/v1" api_v1 "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/test/e2e/framework" + fedframework "k8s.io/kubernetes/test/e2e_federation/framework" . "github.com/onsi/ginkgo" ) @@ -40,14 +41,14 @@ const ( // Create/delete ingress api objects var _ = framework.KubeDescribe("Federation namespace [Feature:Federation]", func() { - f := framework.NewDefaultFederatedFramework("federation-namespace") + f := fedframework.NewDefaultFederatedFramework("federation-namespace") Describe("Namespace objects", func() { var federationName string var clusters map[string]*cluster // All clusters, keyed by cluster name BeforeEach(func() { - framework.SkipUnlessFederated(f.ClientSet) + fedframework.SkipUnlessFederated(f.ClientSet) // TODO: Federation API server should be able to answer this. if federationName = os.Getenv("FEDERATION_NAME"); federationName == "" { @@ -59,10 +60,10 @@ var _ = framework.KubeDescribe("Federation namespace [Feature:Federation]", func }) AfterEach(func() { - framework.SkipUnlessFederated(f.ClientSet) + fedframework.SkipUnlessFederated(f.ClientSet) deleteAllTestNamespaces(nil, - f.FederationClientset_1_5.Core().Namespaces().List, - f.FederationClientset_1_5.Core().Namespaces().Delete) + f.FederationClientset.Core().Namespaces().List, + f.FederationClientset.Core().Namespaces().Delete) for _, cluster := range clusters { deleteAllTestNamespaces(nil, cluster.Core().Namespaces().List, @@ -72,46 +73,46 @@ var _ = framework.KubeDescribe("Federation namespace [Feature:Federation]", func }) It("should be created and deleted successfully", func() { - framework.SkipUnlessFederated(f.ClientSet) + fedframework.SkipUnlessFederated(f.ClientSet) - nsName := createNamespace(f.FederationClientset_1_5.Core().Namespaces()) + nsName := createNamespace(f.FederationClientset.Core().Namespaces()) By(fmt.Sprintf("Deleting namespace %s", nsName)) deleteAllTestNamespaces(nil, - f.FederationClientset_1_5.Core().Namespaces().List, - f.FederationClientset_1_5.Core().Namespaces().Delete) + f.FederationClientset.Core().Namespaces().List, + f.FederationClientset.Core().Namespaces().Delete) By(fmt.Sprintf("Verified that deletion succeeded")) }) It("should be deleted from underlying clusters when OrphanDependents is false", func() { - framework.SkipUnlessFederated(f.ClientSet) + fedframework.SkipUnlessFederated(f.ClientSet) orphanDependents := false - verifyNsCascadingDeletion(f.FederationClientset_1_5.Core().Namespaces(), clusters, &orphanDependents) + verifyNsCascadingDeletion(f.FederationClientset.Core().Namespaces(), clusters, &orphanDependents) By(fmt.Sprintf("Verified that namespaces were deleted from underlying clusters")) }) It("should not be deleted from underlying clusters when OrphanDependents is true", func() { - framework.SkipUnlessFederated(f.ClientSet) + fedframework.SkipUnlessFederated(f.ClientSet) orphanDependents := true - verifyNsCascadingDeletion(f.FederationClientset_1_5.Core().Namespaces(), clusters, &orphanDependents) + verifyNsCascadingDeletion(f.FederationClientset.Core().Namespaces(), clusters, &orphanDependents) By(fmt.Sprintf("Verified that namespaces were not deleted from underlying clusters")) }) It("should not be deleted from underlying clusters when OrphanDependents is nil", func() { - framework.SkipUnlessFederated(f.ClientSet) + fedframework.SkipUnlessFederated(f.ClientSet) - verifyNsCascadingDeletion(f.FederationClientset_1_5.Core().Namespaces(), clusters, nil) + verifyNsCascadingDeletion(f.FederationClientset.Core().Namespaces(), clusters, nil) By(fmt.Sprintf("Verified that namespaces were not deleted from underlying clusters")) }) It("all resources in the namespace should be deleted when namespace is deleted", func() { - framework.SkipUnlessFederated(f.ClientSet) + fedframework.SkipUnlessFederated(f.ClientSet) - nsName := createNamespace(f.FederationClientset_1_5.Core().Namespaces()) + nsName := createNamespace(f.FederationClientset.Core().Namespaces()) // Create resources in the namespace. event := api_v1.Event{ - ObjectMeta: api_v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: v1.SimpleNameGenerator.GenerateName(eventNamePrefix), Namespace: nsName, }, @@ -122,18 +123,18 @@ var _ = framework.KubeDescribe("Federation namespace [Feature:Federation]", func }, } By(fmt.Sprintf("Creating event %s in namespace %s", event.Name, nsName)) - _, err := f.FederationClientset_1_5.Core().Events(nsName).Create(&event) + _, err := f.FederationClientset.Core().Events(nsName).Create(&event) if err != nil { framework.Failf("Failed to create event %v in namespace %s, err: %s", event, nsName, err) } By(fmt.Sprintf("Deleting namespace %s", nsName)) deleteAllTestNamespaces(nil, - f.FederationClientset_1_5.Core().Namespaces().List, - f.FederationClientset_1_5.Core().Namespaces().Delete) + f.FederationClientset.Core().Namespaces().List, + f.FederationClientset.Core().Namespaces().Delete) By(fmt.Sprintf("Verify that event %s was deleted as well", event.Name)) - latestEvent, err := f.FederationClientset_1_5.Core().Events(nsName).Get(event.Name, metav1.GetOptions{}) + latestEvent, err := f.FederationClientset.Core().Events(nsName).Get(event.Name, metav1.GetOptions{}) if !errors.IsNotFound(err) { framework.Failf("Event %s should have been deleted. Found: %v", event.Name, latestEvent) } @@ -185,7 +186,7 @@ func verifyNsCascadingDeletion(nsClient clientset.NamespaceInterface, clusters m func createNamespace(nsClient clientset.NamespaceInterface) string { ns := api_v1.Namespace{ - ObjectMeta: api_v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: v1.SimpleNameGenerator.GenerateName(namespacePrefix), }, } @@ -196,8 +197,8 @@ func createNamespace(nsClient clientset.NamespaceInterface) string { return ns.Name } -func deleteAllTestNamespaces(orphanDependents *bool, lister func(api_v1.ListOptions) (*api_v1.NamespaceList, error), deleter func(string, *api_v1.DeleteOptions) error) { - list, err := lister(api_v1.ListOptions{}) +func deleteAllTestNamespaces(orphanDependents *bool, lister func(metav1.ListOptions) (*api_v1.NamespaceList, error), deleter func(string, *metav1.DeleteOptions) error) { + list, err := lister(metav1.ListOptions{}) if err != nil { framework.Failf("Failed to get all namespaes: %v", err) return @@ -205,7 +206,7 @@ func deleteAllTestNamespaces(orphanDependents *bool, lister func(api_v1.ListOpti for _, namespace := range list.Items { if strings.HasPrefix(namespace.Name, namespacePrefix) { By(fmt.Sprintf("Deleting ns: %s, found by listing", namespace.Name)) - err := deleter(namespace.Name, &api_v1.DeleteOptions{OrphanDependents: orphanDependents}) + err := deleter(namespace.Name, &metav1.DeleteOptions{OrphanDependents: orphanDependents}) if err != nil { framework.Failf("Failed to set %s for deletion: %v", namespace.Name, err) } @@ -214,9 +215,9 @@ func deleteAllTestNamespaces(orphanDependents *bool, lister func(api_v1.ListOpti waitForNoTestNamespaces(lister) } -func waitForNoTestNamespaces(lister func(api_v1.ListOptions) (*api_v1.NamespaceList, error)) { +func waitForNoTestNamespaces(lister func(metav1.ListOptions) (*api_v1.NamespaceList, error)) { err := wait.Poll(5*time.Second, 2*time.Minute, func() (bool, error) { - list, err := lister(api_v1.ListOptions{}) + list, err := lister(metav1.ListOptions{}) if err != nil { return false, err } diff --git a/vendor/k8s.io/kubernetes/test/e2e/federation-replicaset.go b/vendor/k8s.io/kubernetes/test/e2e_federation/federated-replicaset.go similarity index 86% rename from vendor/k8s.io/kubernetes/test/e2e/federation-replicaset.go rename to vendor/k8s.io/kubernetes/test/e2e_federation/federated-replicaset.go index 9d281945..09ca8e6a 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/federation-replicaset.go +++ b/vendor/k8s.io/kubernetes/test/e2e_federation/federated-replicaset.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package e2e +package e2e_federation import ( "fmt" @@ -29,6 +29,7 @@ import ( "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" "k8s.io/kubernetes/test/e2e/framework" + fedframework "k8s.io/kubernetes/test/e2e_federation/framework" "reflect" @@ -44,25 +45,25 @@ const ( // Create/delete replicaset api objects var _ = framework.KubeDescribe("Federation replicasets [Feature:Federation]", func() { - f := framework.NewDefaultFederatedFramework("federation-replicaset") + f := fedframework.NewDefaultFederatedFramework("federation-replicaset") Describe("ReplicaSet objects", func() { AfterEach(func() { - framework.SkipUnlessFederated(f.ClientSet) + fedframework.SkipUnlessFederated(f.ClientSet) // Delete all replicasets. nsName := f.FederationNamespace.Name - deleteAllReplicaSetsOrFail(f.FederationClientset_1_5, nsName) + deleteAllReplicaSetsOrFail(f.FederationClientset, nsName) }) It("should be created and deleted successfully", func() { - framework.SkipUnlessFederated(f.ClientSet) + fedframework.SkipUnlessFederated(f.ClientSet) nsName := f.FederationNamespace.Name - replicaset := createReplicaSetOrFail(f.FederationClientset_1_5, nsName) + replicaset := createReplicaSetOrFail(f.FederationClientset, nsName) By(fmt.Sprintf("Creation of replicaset %q in namespace %q succeeded. Deleting replicaset.", replicaset.Name, nsName)) // Cleanup - err := f.FederationClientset_1_5.Extensions().ReplicaSets(nsName).Delete(replicaset.Name, &v1.DeleteOptions{}) + err := f.FederationClientset.Extensions().ReplicaSets(nsName).Delete(replicaset.Name, &metav1.DeleteOptions{}) framework.ExpectNoError(err, "Error deleting replicaset %q in namespace %q", replicaset.Name, replicaset.Namespace) By(fmt.Sprintf("Deletion of replicaset %q in namespace %q succeeded.", replicaset.Name, nsName)) }) @@ -76,7 +77,7 @@ var _ = framework.KubeDescribe("Federation replicasets [Feature:Federation]", fu federationName string ) BeforeEach(func() { - framework.SkipUnlessFederated(f.ClientSet) + fedframework.SkipUnlessFederated(f.ClientSet) if federationName = os.Getenv("FEDERATION_NAME"); federationName == "" { federationName = DefaultFederationName } @@ -87,50 +88,50 @@ var _ = framework.KubeDescribe("Federation replicasets [Feature:Federation]", fu AfterEach(func() { // Delete all replicasets. nsName := f.FederationNamespace.Name - deleteAllReplicaSetsOrFail(f.FederationClientset_1_5, nsName) + deleteAllReplicaSetsOrFail(f.FederationClientset, nsName) unregisterClusters(clusters, f) }) It("should create and update matching replicasets in underling clusters", func() { nsName := f.FederationNamespace.Name - rs := createReplicaSetOrFail(f.FederationClientset_1_5, nsName) + rs := createReplicaSetOrFail(f.FederationClientset, nsName) defer func() { // cleanup. deletion of replicasets is not supported for underlying clusters By(fmt.Sprintf("Preparing replicaset %q/%q for deletion by setting replicas to zero", nsName, rs.Name)) replicas := int32(0) rs.Spec.Replicas = &replicas - f.FederationClientset_1_5.ReplicaSets(nsName).Update(rs) - waitForReplicaSetOrFail(f.FederationClientset_1_5, nsName, rs.Name, clusters) - f.FederationClientset_1_5.ReplicaSets(nsName).Delete(rs.Name, &v1.DeleteOptions{}) + f.FederationClientset.ReplicaSets(nsName).Update(rs) + waitForReplicaSetOrFail(f.FederationClientset, nsName, rs.Name, clusters) + f.FederationClientset.ReplicaSets(nsName).Delete(rs.Name, &metav1.DeleteOptions{}) }() - waitForReplicaSetOrFail(f.FederationClientset_1_5, nsName, rs.Name, clusters) + waitForReplicaSetOrFail(f.FederationClientset, nsName, rs.Name, clusters) By(fmt.Sprintf("Successfuly created and synced replicaset %q/%q to clusters", nsName, rs.Name)) - updateReplicaSetOrFail(f.FederationClientset_1_5, nsName) - waitForReplicaSetOrFail(f.FederationClientset_1_5, nsName, rs.Name, clusters) + updateReplicaSetOrFail(f.FederationClientset, nsName) + waitForReplicaSetOrFail(f.FederationClientset, nsName, rs.Name, clusters) By(fmt.Sprintf("Successfuly updated and synced replicaset %q/%q to clusters", nsName, rs.Name)) }) It("should be deleted from underlying clusters when OrphanDependents is false", func() { - framework.SkipUnlessFederated(f.ClientSet) + fedframework.SkipUnlessFederated(f.ClientSet) nsName := f.FederationNamespace.Name orphanDependents := false - verifyCascadingDeletionForReplicaSet(f.FederationClientset_1_5, clusters, &orphanDependents, nsName) + verifyCascadingDeletionForReplicaSet(f.FederationClientset, clusters, &orphanDependents, nsName) By(fmt.Sprintf("Verified that replica sets were deleted from underlying clusters")) }) It("should not be deleted from underlying clusters when OrphanDependents is true", func() { - framework.SkipUnlessFederated(f.ClientSet) + fedframework.SkipUnlessFederated(f.ClientSet) nsName := f.FederationNamespace.Name orphanDependents := true - verifyCascadingDeletionForReplicaSet(f.FederationClientset_1_5, clusters, &orphanDependents, nsName) + verifyCascadingDeletionForReplicaSet(f.FederationClientset, clusters, &orphanDependents, nsName) By(fmt.Sprintf("Verified that replica sets were not deleted from underlying clusters")) }) It("should not be deleted from underlying clusters when OrphanDependents is nil", func() { - framework.SkipUnlessFederated(f.ClientSet) + fedframework.SkipUnlessFederated(f.ClientSet) nsName := f.FederationNamespace.Name - verifyCascadingDeletionForReplicaSet(f.FederationClientset_1_5, clusters, nil, nsName) + verifyCascadingDeletionForReplicaSet(f.FederationClientset, clusters, nil, nsName) By(fmt.Sprintf("Verified that replica sets were not deleted from underlying clusters")) }) }) @@ -138,7 +139,7 @@ var _ = framework.KubeDescribe("Federation replicasets [Feature:Federation]", fu // deleteAllReplicaSetsOrFail deletes all replicasets in the given namespace name. func deleteAllReplicaSetsOrFail(clientset *fedclientset.Clientset, nsName string) { - replicasetList, err := clientset.Extensions().ReplicaSets(nsName).List(v1.ListOptions{}) + replicasetList, err := clientset.Extensions().ReplicaSets(nsName).List(metav1.ListOptions{}) Expect(err).NotTo(HaveOccurred()) orphanDependents := false for _, replicaset := range replicasetList.Items { @@ -246,7 +247,7 @@ func createReplicaSetOrFail(clientset *fedclientset.Clientset, namespace string) func deleteReplicaSetOrFail(clientset *fedclientset.Clientset, nsName string, replicaSetName string, orphanDependents *bool) { By(fmt.Sprintf("Deleting replica set %q in namespace %q", replicaSetName, nsName)) - err := clientset.Extensions().ReplicaSets(nsName).Delete(replicaSetName, &v1.DeleteOptions{OrphanDependents: orphanDependents}) + err := clientset.Extensions().ReplicaSets(nsName).Delete(replicaSetName, &metav1.DeleteOptions{OrphanDependents: orphanDependents}) framework.ExpectNoError(err, "Error deleting replica set %q in namespace %q", replicaSetName, nsName) // Wait for the replicaSet to be deleted. @@ -279,7 +280,7 @@ func updateReplicaSetOrFail(clientset *fedclientset.Clientset, namespace string) func newReplicaSet(namespace string, name string, replicas int32) *v1beta1.ReplicaSet { return &v1beta1.ReplicaSet{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: namespace, }, @@ -289,7 +290,7 @@ func newReplicaSet(namespace string, name string, replicas int32) *v1beta1.Repli MatchLabels: map[string]string{"name": "myrs"}, }, Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"name": "myrs"}, }, Spec: v1.PodSpec{ diff --git a/vendor/k8s.io/kubernetes/test/e2e/federated-secret.go b/vendor/k8s.io/kubernetes/test/e2e_federation/federated-secret.go similarity index 90% rename from vendor/k8s.io/kubernetes/test/e2e/federated-secret.go rename to vendor/k8s.io/kubernetes/test/e2e_federation/federated-secret.go index 1664301a..7190c97e 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/federated-secret.go +++ b/vendor/k8s.io/kubernetes/test/e2e_federation/federated-secret.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package e2e +package e2e_federation import ( "fmt" @@ -31,6 +31,7 @@ import ( "k8s.io/kubernetes/pkg/api/v1" kubeclientset "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/test/e2e/framework" + fedframework "k8s.io/kubernetes/test/e2e_federation/framework" ) const ( @@ -43,55 +44,55 @@ const ( var _ = framework.KubeDescribe("Federation secrets [Feature:Federation]", func() { var clusters map[string]*cluster // All clusters, keyed by cluster name - f := framework.NewDefaultFederatedFramework("federated-secret") + f := fedframework.NewDefaultFederatedFramework("federated-secret") Describe("Secret objects", func() { BeforeEach(func() { - framework.SkipUnlessFederated(f.ClientSet) + fedframework.SkipUnlessFederated(f.ClientSet) clusters = map[string]*cluster{} registerClusters(clusters, UserAgentName, "", f) }) AfterEach(func() { - framework.SkipUnlessFederated(f.ClientSet) + fedframework.SkipUnlessFederated(f.ClientSet) // Delete all secrets. nsName := f.FederationNamespace.Name - deleteAllSecretsOrFail(f.FederationClientset_1_5, nsName) + deleteAllSecretsOrFail(f.FederationClientset, nsName) unregisterClusters(clusters, f) }) It("should be created and deleted successfully", func() { - framework.SkipUnlessFederated(f.ClientSet) + fedframework.SkipUnlessFederated(f.ClientSet) nsName := f.FederationNamespace.Name - secret := createSecretOrFail(f.FederationClientset_1_5, nsName) + secret := createSecretOrFail(f.FederationClientset, nsName) // wait for secret shards being created waitForSecretShardsOrFail(nsName, secret, clusters) - secret = updateSecretOrFail(f.FederationClientset_1_5, nsName, secret.Name) + secret = updateSecretOrFail(f.FederationClientset, nsName, secret.Name) waitForSecretShardsUpdatedOrFail(nsName, secret, clusters) }) It("should be deleted from underlying clusters when OrphanDependents is false", func() { - framework.SkipUnlessFederated(f.ClientSet) + fedframework.SkipUnlessFederated(f.ClientSet) nsName := f.FederationNamespace.Name orphanDependents := false - verifyCascadingDeletionForSecret(f.FederationClientset_1_5, clusters, &orphanDependents, nsName) + verifyCascadingDeletionForSecret(f.FederationClientset, clusters, &orphanDependents, nsName) By(fmt.Sprintf("Verified that secrets were deleted from underlying clusters")) }) It("should not be deleted from underlying clusters when OrphanDependents is true", func() { - framework.SkipUnlessFederated(f.ClientSet) + fedframework.SkipUnlessFederated(f.ClientSet) nsName := f.FederationNamespace.Name orphanDependents := true - verifyCascadingDeletionForSecret(f.FederationClientset_1_5, clusters, &orphanDependents, nsName) + verifyCascadingDeletionForSecret(f.FederationClientset, clusters, &orphanDependents, nsName) By(fmt.Sprintf("Verified that secrets were not deleted from underlying clusters")) }) It("should not be deleted from underlying clusters when OrphanDependents is nil", func() { - framework.SkipUnlessFederated(f.ClientSet) + fedframework.SkipUnlessFederated(f.ClientSet) nsName := f.FederationNamespace.Name - verifyCascadingDeletionForSecret(f.FederationClientset_1_5, clusters, nil, nsName) + verifyCascadingDeletionForSecret(f.FederationClientset, clusters, nil, nsName) By(fmt.Sprintf("Verified that secrets were not deleted from underlying clusters")) }) }) @@ -99,7 +100,7 @@ var _ = framework.KubeDescribe("Federation secrets [Feature:Federation]", func() // deleteAllSecretsOrFail deletes all secrets in the given namespace name. func deleteAllSecretsOrFail(clientset *fedclientset.Clientset, nsName string) { - SecretList, err := clientset.Core().Secrets(nsName).List(v1.ListOptions{}) + SecretList, err := clientset.Core().Secrets(nsName).List(metav1.ListOptions{}) Expect(err).NotTo(HaveOccurred()) orphanDependents := false for _, Secret := range SecretList.Items { @@ -155,7 +156,7 @@ func createSecretOrFail(clientset *fedclientset.Clientset, nsName string) *v1.Se } secret := &v1.Secret{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: v1.SimpleNameGenerator.GenerateName(secretNamePrefix), Namespace: nsName, }, @@ -169,7 +170,7 @@ func createSecretOrFail(clientset *fedclientset.Clientset, nsName string) *v1.Se func deleteSecretOrFail(clientset *fedclientset.Clientset, nsName string, secretName string, orphanDependents *bool) { By(fmt.Sprintf("Deleting secret %q in namespace %q", secretName, nsName)) - err := clientset.Core().Secrets(nsName).Delete(secretName, &v1.DeleteOptions{OrphanDependents: orphanDependents}) + err := clientset.Core().Secrets(nsName).Delete(secretName, &metav1.DeleteOptions{OrphanDependents: orphanDependents}) framework.ExpectNoError(err, "Error deleting secret %q in namespace %q", secretName, nsName) // Wait for the secret to be deleted. diff --git a/vendor/k8s.io/kubernetes/test/e2e/federated-service.go b/vendor/k8s.io/kubernetes/test/e2e_federation/federated-service.go similarity index 88% rename from vendor/k8s.io/kubernetes/test/e2e/federated-service.go rename to vendor/k8s.io/kubernetes/test/e2e_federation/federated-service.go index ee3555ad..e240446f 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/federated-service.go +++ b/vendor/k8s.io/kubernetes/test/e2e_federation/federated-service.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package e2e +package e2e_federation import ( "fmt" @@ -31,6 +31,7 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/test/e2e/framework" + fedframework "k8s.io/kubernetes/test/e2e_federation/framework" . "github.com/onsi/ginkgo" ) @@ -50,14 +51,14 @@ var FederatedServiceLabels = map[string]string{ } var _ = framework.KubeDescribe("[Feature:Federation]", func() { - f := framework.NewDefaultFederatedFramework("federated-service") + f := fedframework.NewDefaultFederatedFramework("federated-service") var clusters map[string]*cluster // All clusters, keyed by cluster name var federationName string var primaryClusterName string // The name of the "primary" cluster var _ = Describe("Federated Services", func() { BeforeEach(func() { - framework.SkipUnlessFederated(f.ClientSet) + fedframework.SkipUnlessFederated(f.ClientSet) // TODO: Federation API server should be able to answer this. if federationName = os.Getenv("FEDERATION_NAME"); federationName == "" { @@ -79,12 +80,12 @@ var _ = framework.KubeDescribe("[Feature:Federation]", func() { ) BeforeEach(func() { - framework.SkipUnlessFederated(f.ClientSet) + fedframework.SkipUnlessFederated(f.ClientSet) // Placeholder }) AfterEach(func() { - framework.SkipUnlessFederated(f.ClientSet) + fedframework.SkipUnlessFederated(f.ClientSet) if service != nil { By(fmt.Sprintf("Deleting service shards and their provider resources in underlying clusters for service %q in namespace %q", service.Name, nsName)) @@ -95,51 +96,51 @@ var _ = framework.KubeDescribe("[Feature:Federation]", func() { }) It("should succeed", func() { - framework.SkipUnlessFederated(f.ClientSet) + fedframework.SkipUnlessFederated(f.ClientSet) nsName = f.FederationNamespace.Name - service = createServiceOrFail(f.FederationClientset_1_5, nsName, FederatedServiceName) + service = createServiceOrFail(f.FederationClientset, nsName, FederatedServiceName) By(fmt.Sprintf("Creation of service %q in namespace %q succeeded. Deleting service.", service.Name, nsName)) // Cleanup - err := f.FederationClientset_1_5.Services(nsName).Delete(service.Name, &v1.DeleteOptions{}) + err := f.FederationClientset.Services(nsName).Delete(service.Name, &metav1.DeleteOptions{}) framework.ExpectNoError(err, "Error deleting service %q in namespace %q", service.Name, service.Namespace) By(fmt.Sprintf("Deletion of service %q in namespace %q succeeded.", service.Name, nsName)) }) It("should create matching services in underlying clusters", func() { - framework.SkipUnlessFederated(f.ClientSet) + fedframework.SkipUnlessFederated(f.ClientSet) nsName = f.FederationNamespace.Name - service = createServiceOrFail(f.FederationClientset_1_5, nsName, FederatedServiceName) + service = createServiceOrFail(f.FederationClientset, nsName, FederatedServiceName) defer func() { // Cleanup By(fmt.Sprintf("Deleting service %q in namespace %q", service.Name, nsName)) - err := f.FederationClientset_1_5.Services(nsName).Delete(service.Name, &v1.DeleteOptions{}) + err := f.FederationClientset.Services(nsName).Delete(service.Name, &metav1.DeleteOptions{}) framework.ExpectNoError(err, "Error deleting service %q in namespace %q", service.Name, nsName) }() waitForServiceShardsOrFail(nsName, service, clusters) }) It("should be deleted from underlying clusters when OrphanDependents is false", func() { - framework.SkipUnlessFederated(f.ClientSet) + fedframework.SkipUnlessFederated(f.ClientSet) nsName := f.FederationNamespace.Name orphanDependents := false - verifyCascadingDeletionForService(f.FederationClientset_1_5, clusters, &orphanDependents, nsName) + verifyCascadingDeletionForService(f.FederationClientset, clusters, &orphanDependents, nsName) By(fmt.Sprintf("Verified that services were deleted from underlying clusters")) }) It("should not be deleted from underlying clusters when OrphanDependents is true", func() { - framework.SkipUnlessFederated(f.ClientSet) + fedframework.SkipUnlessFederated(f.ClientSet) nsName := f.FederationNamespace.Name orphanDependents := true - verifyCascadingDeletionForService(f.FederationClientset_1_5, clusters, &orphanDependents, nsName) + verifyCascadingDeletionForService(f.FederationClientset, clusters, &orphanDependents, nsName) By(fmt.Sprintf("Verified that services were not deleted from underlying clusters")) }) It("should not be deleted from underlying clusters when OrphanDependents is nil", func() { - framework.SkipUnlessFederated(f.ClientSet) + fedframework.SkipUnlessFederated(f.ClientSet) nsName := f.FederationNamespace.Name - verifyCascadingDeletionForService(f.FederationClientset_1_5, clusters, nil, nsName) + verifyCascadingDeletionForService(f.FederationClientset, clusters, nil, nsName) By(fmt.Sprintf("Verified that services were not deleted from underlying clusters")) }) }) @@ -151,7 +152,7 @@ var _ = framework.KubeDescribe("[Feature:Federation]", func() { ) BeforeEach(func() { - framework.SkipUnlessFederated(f.ClientSet) + fedframework.SkipUnlessFederated(f.ClientSet) nsName := f.FederationNamespace.Name // Create kube-dns configmap for kube-dns to accept federation queries. @@ -160,7 +161,7 @@ var _ = framework.KubeDescribe("[Feature:Federation]", func() { framework.Failf("missing required env var FEDERATIONS_DOMAIN_MAP") } kubeDNSConfigMap := v1.ConfigMap{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: KubeDNSConfigMapName, Namespace: KubeDNSConfigMapNamespace, }, @@ -177,7 +178,7 @@ var _ = framework.KubeDescribe("[Feature:Federation]", func() { createBackendPodsOrFail(clusters, nsName, FederatedServicePodName) - service = createServiceOrFail(f.FederationClientset_1_5, nsName, FederatedServiceName) + service = createServiceOrFail(f.FederationClientset, nsName, FederatedServiceName) obj, err := api.Scheme.DeepCopy(service) // Cloning shouldn't fail. On the off-chance it does, we // should shallow copy service to serviceShard before @@ -210,13 +211,13 @@ var _ = framework.KubeDescribe("[Feature:Federation]", func() { }) AfterEach(func() { - framework.SkipUnlessFederated(f.ClientSet) + fedframework.SkipUnlessFederated(f.ClientSet) nsName := f.FederationNamespace.Name deleteBackendPodsOrFail(clusters, nsName) if service != nil { - deleteServiceOrFail(f.FederationClientset_1_5, nsName, service.Name, nil) + deleteServiceOrFail(f.FederationClientset, nsName, service.Name, nil) service = nil } else { By("No service to delete. Service is nil") @@ -239,7 +240,7 @@ var _ = framework.KubeDescribe("[Feature:Federation]", func() { }) It("should be able to discover a federated service", func() { - framework.SkipUnlessFederated(f.ClientSet) + fedframework.SkipUnlessFederated(f.ClientSet) nsName := f.FederationNamespace.Name svcDNSNames := []string{ @@ -258,7 +259,7 @@ var _ = framework.KubeDescribe("[Feature:Federation]", func() { By("Verified that DNS rules are working as expected") By("Deleting the service to verify that DNS rules still work") - err := f.FederationClientset_1_5.Services(nsName).Delete(FederatedServiceName, &v1.DeleteOptions{}) + err := f.FederationClientset.Services(nsName).Delete(FederatedServiceName, &metav1.DeleteOptions{}) framework.ExpectNoError(err, "Error deleting service %q in namespace %q", service.Name, service.Namespace) // Service is deleted, unset the test block-global service variable. service = nil @@ -271,7 +272,7 @@ var _ = framework.KubeDescribe("[Feature:Federation]", func() { Context("non-local federated service", func() { BeforeEach(func() { - framework.SkipUnlessFederated(f.ClientSet) + fedframework.SkipUnlessFederated(f.ClientSet) // Delete all the backend pods from the shard which is local to the discovery pod. deleteOneBackendPodOrFail(clusters[primaryClusterName]) @@ -279,7 +280,7 @@ var _ = framework.KubeDescribe("[Feature:Federation]", func() { }) It("should be able to discover a non-local federated service", func() { - framework.SkipUnlessFederated(f.ClientSet) + fedframework.SkipUnlessFederated(f.ClientSet) nsName := f.FederationNamespace.Name svcDNSNames := []string{ @@ -295,7 +296,7 @@ var _ = framework.KubeDescribe("[Feature:Federation]", func() { // TTL and/or running the pods in parallel. Context("[Slow] missing local service", func() { It("should never find DNS entries for a missing local service", func() { - framework.SkipUnlessFederated(f.ClientSet) + fedframework.SkipUnlessFederated(f.ClientSet) nsName := f.FederationNamespace.Name localSvcDNSNames := []string{ diff --git a/vendor/k8s.io/kubernetes/test/e2e/federation-apiserver.go b/vendor/k8s.io/kubernetes/test/e2e_federation/federation-apiserver.go similarity index 83% rename from vendor/k8s.io/kubernetes/test/e2e/federation-apiserver.go rename to vendor/k8s.io/kubernetes/test/e2e_federation/federation-apiserver.go index 05a160af..70971085 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/federation-apiserver.go +++ b/vendor/k8s.io/kubernetes/test/e2e_federation/federation-apiserver.go @@ -14,43 +14,43 @@ See the License for the specific language governing permissions and limitations under the License. */ -package e2e +package e2e_federation import ( "fmt" "time" . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/wait" federationapi "k8s.io/kubernetes/federation/apis/federation/v1beta1" "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/test/e2e/framework" - - . "github.com/onsi/gomega" + fedframework "k8s.io/kubernetes/test/e2e_federation/framework" ) // Create/delete cluster api objects var _ = framework.KubeDescribe("Federation apiserver [Feature:Federation]", func() { - f := framework.NewDefaultFederatedFramework("federation-cluster") + f := fedframework.NewDefaultFederatedFramework("federation-cluster") Describe("Cluster objects", func() { AfterEach(func() { - framework.SkipUnlessFederated(f.ClientSet) + fedframework.SkipUnlessFederated(f.ClientSet) // Delete registered clusters. // This is if a test failed, it should not affect other tests. - clusterList, err := f.FederationClientset_1_5.Federation().Clusters().List(v1.ListOptions{}) + clusterList, err := f.FederationClientset.Federation().Clusters().List(metav1.ListOptions{}) Expect(err).NotTo(HaveOccurred()) for _, cluster := range clusterList.Items { - err := f.FederationClientset_1_5.Federation().Clusters().Delete(cluster.Name, &v1.DeleteOptions{}) + err := f.FederationClientset.Federation().Clusters().Delete(cluster.Name, &metav1.DeleteOptions{}) Expect(err).NotTo(HaveOccurred()) } }) It("should be created and deleted successfully", func() { - framework.SkipUnlessFederated(f.ClientSet) + fedframework.SkipUnlessFederated(f.ClientSet) contexts := f.GetUnderlyingFederatedContexts() @@ -69,14 +69,14 @@ var _ = framework.KubeDescribe("Federation apiserver [Feature:Federation]", func framework.Logf("Deleting %d clusters", len(contexts)) for _, context := range contexts { framework.Logf("Deleting cluster object: %s (%s, secret: %s)", context.Name, context.Cluster.Cluster.Server, context.Name) - err := f.FederationClientset_1_5.Federation().Clusters().Delete(context.Name, &v1.DeleteOptions{}) + err := f.FederationClientset.Federation().Clusters().Delete(context.Name, &metav1.DeleteOptions{}) framework.ExpectNoError(err, fmt.Sprintf("unexpected error in deleting cluster %s: %+v", context.Name, err)) framework.Logf("Successfully deleted cluster object: %s (%s, secret: %s)", context.Name, context.Cluster.Cluster.Server, context.Name) } // There should not be any remaining cluster. framework.Logf("Verifying that zero clusters remain") - clusterList, err := f.FederationClientset_1_5.Federation().Clusters().List(v1.ListOptions{}) + clusterList, err := f.FederationClientset.Federation().Clusters().List(metav1.ListOptions{}) Expect(err).NotTo(HaveOccurred()) if len(clusterList.Items) != 0 { framework.Failf("there should not have been any remaining clusters. Found: %+v", clusterList) @@ -86,16 +86,16 @@ var _ = framework.KubeDescribe("Federation apiserver [Feature:Federation]", func }) Describe("Admission control", func() { AfterEach(func() { - framework.SkipUnlessFederated(f.ClientSet) + fedframework.SkipUnlessFederated(f.ClientSet) }) It("should not be able to create resources if namespace does not exist", func() { - framework.SkipUnlessFederated(f.ClientSet) + fedframework.SkipUnlessFederated(f.ClientSet) // Creating a service in a non-existing namespace should fail. svcNamespace := "federation-admission-test-ns" svcName := "myns" - clientset := f.FederationClientset_1_5 + clientset := f.FederationClientset framework.Logf("Trying to create service %s in namespace %s, expect to get error", svcName, svcNamespace) if _, err := clientset.Core().Services(svcNamespace).Create(newService(svcName, svcNamespace)); err == nil { framework.Failf("Expected to get an error while creating a service in a non-existing namespace") @@ -108,7 +108,7 @@ var _ = framework.KubeDescribe("Federation apiserver [Feature:Federation]", func func newService(name, namespace string) *v1.Service { return &v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: namespace, }, diff --git a/vendor/k8s.io/kubernetes/test/e2e/federation-authn.go b/vendor/k8s.io/kubernetes/test/e2e_federation/federation-authn.go similarity index 82% rename from vendor/k8s.io/kubernetes/test/e2e/federation-authn.go rename to vendor/k8s.io/kubernetes/test/e2e_federation/federation-authn.go index 1f0e8e86..dee2b95b 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/federation-authn.go +++ b/vendor/k8s.io/kubernetes/test/e2e_federation/federation-authn.go @@ -14,39 +14,40 @@ See the License for the specific language governing permissions and limitations under the License. */ -package e2e +package e2e_federation import ( "fmt" "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/client-go/tools/clientcmd" + clientcmdapi "k8s.io/client-go/tools/clientcmd/api" "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset" - "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" - clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api" "k8s.io/kubernetes/test/e2e/framework" + fedframework "k8s.io/kubernetes/test/e2e_federation/framework" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) var _ = framework.KubeDescribe("[Feature:Federation]", func() { - f := framework.NewDefaultFederatedFramework("federation-apiserver-authn") + f := fedframework.NewDefaultFederatedFramework("federation-apiserver-authn") var _ = Describe("Federation API server authentication", func() { BeforeEach(func() { - framework.SkipUnlessFederated(f.ClientSet) + fedframework.SkipUnlessFederated(f.ClientSet) }) It("should accept cluster resources when the client has right authentication credentials", func() { - framework.SkipUnlessFederated(f.ClientSet) + fedframework.SkipUnlessFederated(f.ClientSet) nsName := f.FederationNamespace.Name - svc := createServiceOrFail(f.FederationClientset_1_5, nsName, FederatedServiceName) - deleteServiceOrFail(f.FederationClientset_1_5, nsName, svc.Name, nil) + svc := createServiceOrFail(f.FederationClientset, nsName, FederatedServiceName) + deleteServiceOrFail(f.FederationClientset, nsName, svc.Name, nil) }) It("should not accept cluster resources when the client has invalid authentication credentials", func() { - framework.SkipUnlessFederated(f.ClientSet) + fedframework.SkipUnlessFederated(f.ClientSet) contexts := f.GetUnderlyingFederatedContexts() @@ -67,7 +68,7 @@ var _ = framework.KubeDescribe("[Feature:Federation]", func() { }) It("should not accept cluster resources when the client has no authentication credentials", func() { - framework.SkipUnlessFederated(f.ClientSet) + fedframework.SkipUnlessFederated(f.ClientSet) fcs, err := invalidAuthFederationClientSet(nil) framework.ExpectNoError(err) @@ -94,7 +95,7 @@ func invalidAuthFederationClientSet(user *framework.KubeUser) (*federation_clien } } - config, err := framework.LoadFederatedConfig(overrides) + config, err := fedframework.LoadFederatedConfig(overrides) if err != nil { return nil, err } diff --git a/vendor/k8s.io/kubernetes/test/e2e/federation-event.go b/vendor/k8s.io/kubernetes/test/e2e_federation/federation-event.go similarity index 79% rename from vendor/k8s.io/kubernetes/test/e2e/federation-event.go rename to vendor/k8s.io/kubernetes/test/e2e_federation/federation-event.go index d4c12efb..30f8ddb5 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/federation-event.go +++ b/vendor/k8s.io/kubernetes/test/e2e_federation/federation-event.go @@ -14,15 +14,17 @@ See the License for the specific language governing permissions and limitations under the License. */ -package e2e +package e2e_federation import ( "fmt" . "github.com/onsi/ginkgo" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/test/e2e/framework" + fedframework "k8s.io/kubernetes/test/e2e_federation/framework" . "github.com/onsi/gomega" ) @@ -33,30 +35,30 @@ const ( // Create/delete event api objects. var _ = framework.KubeDescribe("Federation events [Feature:Federation]", func() { - f := framework.NewDefaultFederatedFramework("federation-event") + f := fedframework.NewDefaultFederatedFramework("federation-event") Describe("Event objects", func() { AfterEach(func() { - framework.SkipUnlessFederated(f.ClientSet) + fedframework.SkipUnlessFederated(f.ClientSet) nsName := f.FederationNamespace.Name // Delete registered events. - eventList, err := f.FederationClientset_1_5.Core().Events(nsName).List(v1.ListOptions{}) + eventList, err := f.FederationClientset.Core().Events(nsName).List(metav1.ListOptions{}) Expect(err).NotTo(HaveOccurred()) for _, event := range eventList.Items { - err := f.FederationClientset_1_5.Core().Events(nsName).Delete(event.Name, &v1.DeleteOptions{}) + err := f.FederationClientset.Core().Events(nsName).Delete(event.Name, &metav1.DeleteOptions{}) Expect(err).NotTo(HaveOccurred()) } }) It("should be created and deleted successfully", func() { - framework.SkipUnlessFederated(f.ClientSet) + fedframework.SkipUnlessFederated(f.ClientSet) nsName := f.FederationNamespace.Name - event := createEventOrFail(f.FederationClientset_1_5, nsName) + event := createEventOrFail(f.FederationClientset, nsName) By(fmt.Sprintf("Creation of event %q in namespace %q succeeded. Deleting event.", event.Name, nsName)) // Cleanup - err := f.FederationClientset_1_5.Core().Events(nsName).Delete(event.Name, &v1.DeleteOptions{}) + err := f.FederationClientset.Core().Events(nsName).Delete(event.Name, &metav1.DeleteOptions{}) framework.ExpectNoError(err, "Error deleting event %q in namespace %q", event.Name, event.Namespace) By(fmt.Sprintf("Deletion of event %q in namespace %q succeeded.", event.Name, nsName)) }) @@ -71,7 +73,7 @@ func createEventOrFail(clientset *federation_clientset.Clientset, namespace stri By(fmt.Sprintf("Creating federated event %q in namespace %q", FederationEventName, namespace)) event := &v1.Event{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: FederationEventName, Namespace: namespace, }, diff --git a/vendor/k8s.io/kubernetes/test/e2e/federation-util.go b/vendor/k8s.io/kubernetes/test/e2e_federation/federation-util.go similarity index 90% rename from vendor/k8s.io/kubernetes/test/e2e/federation-util.go rename to vendor/k8s.io/kubernetes/test/e2e_federation/federation-util.go index ac6e4620..6b21644c 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/federation-util.go +++ b/vendor/k8s.io/kubernetes/test/e2e_federation/federation-util.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package e2e +package e2e_federation import ( "fmt" @@ -25,15 +25,17 @@ import ( "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/wait" + restclient "k8s.io/client-go/rest" + "k8s.io/client-go/tools/clientcmd" + clientcmdapi "k8s.io/client-go/tools/clientcmd/api" federationapi "k8s.io/kubernetes/federation/apis/federation/v1beta1" fedclientset "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" kubeclientset "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/client/restclient" - "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" - clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api" + "k8s.io/kubernetes/test/e2e/common" "k8s.io/kubernetes/test/e2e/framework" + fedframework "k8s.io/kubernetes/test/e2e_federation/framework" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" @@ -48,6 +50,8 @@ var ( DNSTTL = 180 * time.Second // TODO: make k8s.io/kubernetes/federation/pkg/federation-controller/service.minDnsTtl exported, and import it here. ) +var FederationSuite common.Suite + /* cluster keeps track of the assorted objects and state related to each cluster in the federation @@ -59,10 +63,10 @@ type cluster struct { backendPod *v1.Pod // The backend pod, if one's been created. } -func createClusterObjectOrFail(f *framework.Framework, context *framework.E2EContext) { +func createClusterObjectOrFail(f *fedframework.Framework, context *fedframework.E2EContext) { framework.Logf("Creating cluster object: %s (%s, secret: %s)", context.Name, context.Cluster.Cluster.Server, context.Name) cluster := federationapi.Cluster{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: context.Name, }, Spec: federationapi.ClusterSpec{ @@ -80,29 +84,29 @@ func createClusterObjectOrFail(f *framework.Framework, context *framework.E2ECon }, }, } - _, err := f.FederationClientset_1_5.Federation().Clusters().Create(&cluster) + _, err := f.FederationClientset.Federation().Clusters().Create(&cluster) framework.ExpectNoError(err, fmt.Sprintf("creating cluster: %+v", err)) framework.Logf("Successfully created cluster object: %s (%s, secret: %s)", context.Name, context.Cluster.Cluster.Server, context.Name) } -func clusterIsReadyOrFail(f *framework.Framework, context *framework.E2EContext) { - c, err := f.FederationClientset_1_5.Federation().Clusters().Get(context.Name, metav1.GetOptions{}) +func clusterIsReadyOrFail(f *fedframework.Framework, context *fedframework.E2EContext) { + c, err := f.FederationClientset.Federation().Clusters().Get(context.Name, metav1.GetOptions{}) framework.ExpectNoError(err, fmt.Sprintf("get cluster: %+v", err)) if c.ObjectMeta.Name != context.Name { framework.Failf("cluster name does not match input context: actual=%+v, expected=%+v", c, context) } - err = isReady(context.Name, f.FederationClientset_1_5) + err = isReady(context.Name, f.FederationClientset) framework.ExpectNoError(err, fmt.Sprintf("unexpected error in verifying if cluster %s is ready: %+v", context.Name, err)) framework.Logf("Cluster %s is Ready", context.Name) } // waitForAllClustersReady wait for all clusters defined in e2e context to be created // return ClusterList until the listed cluster items equals clusterCount -func waitForAllClustersReady(f *framework.Framework, clusterCount int) *federationapi.ClusterList { +func waitForAllClustersReady(f *fedframework.Framework, clusterCount int) *federationapi.ClusterList { var clusterList *federationapi.ClusterList if err := wait.PollImmediate(framework.Poll, FederatedServiceTimeout, func() (bool, error) { var err error - clusterList, err = f.FederationClientset_1_5.Federation().Clusters().List(v1.ListOptions{}) + clusterList, err = f.FederationClientset.Federation().Clusters().List(metav1.ListOptions{}) if err != nil { return false, err } @@ -136,14 +140,14 @@ func createClientsetForCluster(c federationapi.Cluster, i int, userAgentName str } // Creates the federation namespace in all underlying clusters. -func createNamespaceInClusters(clusters map[string]*cluster, f *framework.Framework) { +func createNamespaceInClusters(clusters map[string]*cluster, f *fedframework.Framework) { nsName := f.FederationNamespace.Name for name, c := range clusters { // The e2e Framework created the required namespace in federation control plane, but we need to create it in all the others, if it doesn't yet exist. // TODO(nikhiljindal): remove this once we have the namespace controller working as expected. if _, err := c.Clientset.Core().Namespaces().Get(nsName, metav1.GetOptions{}); errors.IsNotFound(err) { ns := &v1.Namespace{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: nsName, }, } @@ -161,12 +165,12 @@ func createNamespaceInClusters(clusters map[string]*cluster, f *framework.Framew // Unregisters the given clusters from federation control plane. // Also deletes the federation namespace from each cluster. -func unregisterClusters(clusters map[string]*cluster, f *framework.Framework) { +func unregisterClusters(clusters map[string]*cluster, f *fedframework.Framework) { nsName := f.FederationNamespace.Name for name, c := range clusters { if c.namespaceCreated { if _, err := c.Clientset.Core().Namespaces().Get(nsName, metav1.GetOptions{}); !errors.IsNotFound(err) { - err := c.Clientset.Core().Namespaces().Delete(nsName, &v1.DeleteOptions{}) + err := c.Clientset.Core().Namespaces().Delete(nsName, &metav1.DeleteOptions{}) framework.ExpectNoError(err, "Couldn't delete the namespace %s in cluster %q: %v", nsName, name, err) } framework.Logf("Namespace %s deleted in cluster %q", nsName, name) @@ -174,16 +178,16 @@ func unregisterClusters(clusters map[string]*cluster, f *framework.Framework) { } // Delete the registered clusters in the federation API server. - clusterList, err := f.FederationClientset_1_5.Federation().Clusters().List(v1.ListOptions{}) + clusterList, err := f.FederationClientset.Federation().Clusters().List(metav1.ListOptions{}) framework.ExpectNoError(err, "Error listing clusters") for _, cluster := range clusterList.Items { - err := f.FederationClientset_1_5.Federation().Clusters().Delete(cluster.Name, &v1.DeleteOptions{}) + err := f.FederationClientset.Federation().Clusters().Delete(cluster.Name, &metav1.DeleteOptions{}) framework.ExpectNoError(err, "Error deleting cluster %q", cluster.Name) } } // can not be moved to util, as By and Expect must be put in Ginkgo test unit -func registerClusters(clusters map[string]*cluster, userAgentName, federationName string, f *framework.Framework) string { +func registerClusters(clusters map[string]*cluster, userAgentName, federationName string, f *fedframework.Framework) string { contexts := f.GetUnderlyingFederatedContexts() for _, context := range contexts { @@ -254,7 +258,7 @@ func createService(clientset *fedclientset.Clientset, namespace, name string) (* By(fmt.Sprintf("Creating federated service %q in namespace %q", name, namespace)) service := &v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: namespace, }, @@ -287,7 +291,7 @@ func deleteServiceOrFail(clientset *fedclientset.Clientset, namespace string, se if clientset == nil || len(namespace) == 0 || len(serviceName) == 0 { Fail(fmt.Sprintf("Internal error: invalid parameters passed to deleteServiceOrFail: clientset: %v, namespace: %v, service: %v", clientset, namespace, serviceName)) } - err := clientset.Services(namespace).Delete(serviceName, &v1.DeleteOptions{OrphanDependents: orphanDependents}) + err := clientset.Services(namespace).Delete(serviceName, &metav1.DeleteOptions{OrphanDependents: orphanDependents}) framework.ExpectNoError(err, "Error deleting service %q from namespace %q", serviceName, namespace) // Wait for the service to be deleted. err = wait.Poll(5*time.Second, 3*wait.ForeverTestTimeout, func() (bool, error) { @@ -341,7 +345,7 @@ func cleanupServiceShardsAndProviderResources(namespace string, service *v1.Serv func cleanupServiceShard(clientset *kubeclientset.Clientset, clusterName, namespace string, service *v1.Service, timeout time.Duration) error { err := wait.PollImmediate(framework.Poll, timeout, func() (bool, error) { - err := clientset.Services(namespace).Delete(service.Name, &v1.DeleteOptions{}) + err := clientset.Services(namespace).Delete(service.Name, &metav1.DeleteOptions{}) if err != nil && !errors.IsNotFound(err) { // Deletion failed with an error, try again. framework.Logf("Failed to delete service %q in namespace %q, in cluster %q", service.Name, namespace, clusterName) @@ -382,7 +386,7 @@ func cleanupServiceShardLoadBalancer(clusterName string, service *v1.Service, ti return err } -func podExitCodeDetector(f *framework.Framework, name, namespace string, code int32) func() error { +func podExitCodeDetector(f *fedframework.Framework, name, namespace string, code int32) func() error { // If we ever get any container logs, stash them here. logs := "" @@ -423,12 +427,12 @@ func podExitCodeDetector(f *framework.Framework, name, namespace string, code in } } -func discoverService(f *framework.Framework, name string, exists bool, podName string) { +func discoverService(f *fedframework.Framework, name string, exists bool, podName string) { command := []string{"sh", "-c", fmt.Sprintf("until nslookup '%s'; do sleep 10; done", name)} By(fmt.Sprintf("Looking up %q", name)) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, }, Spec: v1.PodSpec{ @@ -450,7 +454,7 @@ func discoverService(f *framework.Framework, name string, exists bool, podName s By(fmt.Sprintf("Successfully created pod %q in namespace %q", pod.Name, nsName)) defer func() { By(fmt.Sprintf("Deleting pod %q from namespace %q", podName, nsName)) - err := f.ClientSet.Core().Pods(nsName).Delete(podName, v1.NewDeleteOptions(0)) + err := f.ClientSet.Core().Pods(nsName).Delete(podName, metav1.NewDeleteOptions(0)) framework.ExpectNoError(err, "Deleting pod %q from namespace %q", podName, nsName) By(fmt.Sprintf("Deleted pod %q from namespace %q", podName, nsName)) }() @@ -471,7 +475,7 @@ If creation of any pod fails, the test fails (possibly with a partially created */ func createBackendPodsOrFail(clusters map[string]*cluster, namespace string, name string) { pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, // Namespace: namespace, Labels: FederatedServiceLabels, @@ -502,7 +506,7 @@ The test fails if there are any errors. func deleteOneBackendPodOrFail(c *cluster) { pod := c.backendPod Expect(pod).ToNot(BeNil()) - err := c.Clientset.Core().Pods(pod.Namespace).Delete(pod.Name, v1.NewDeleteOptions(0)) + err := c.Clientset.Core().Pods(pod.Namespace).Delete(pod.Name, metav1.NewDeleteOptions(0)) if errors.IsNotFound(err) { By(fmt.Sprintf("Pod %q in namespace %q in cluster %q does not exist. No need to delete it.", pod.Name, pod.Namespace, c.name)) } else { diff --git a/vendor/k8s.io/kubernetes/test/e2e_federation/framework/BUILD b/vendor/k8s.io/kubernetes/test/e2e_federation/framework/BUILD new file mode 100644 index 00000000..3d98d575 --- /dev/null +++ b/vendor/k8s.io/kubernetes/test/e2e_federation/framework/BUILD @@ -0,0 +1,48 @@ +package(default_visibility = ["//visibility:public"]) + +licenses(["notice"]) + +load( + "@io_bazel_rules_go//go:def.bzl", + "go_library", +) + +go_library( + name = "go_default_library", + srcs = [ + "framework.go", + "util.go", + ], + tags = ["automanaged"], + deps = [ + "//federation/apis/federation/v1beta1:go_default_library", + "//federation/client/clientset_generated/federation_clientset:go_default_library", + "//pkg/api:go_default_library", + "//pkg/api/v1:go_default_library", + "//pkg/api/validation:go_default_library", + "//pkg/client/clientset_generated/clientset:go_default_library", + "//test/e2e/framework:go_default_library", + "//vendor:github.com/onsi/ginkgo", + "//vendor:github.com/onsi/gomega", + "//vendor:gopkg.in/yaml.v2", + "//vendor:k8s.io/apimachinery/pkg/api/errors", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/util/validation", + "//vendor:k8s.io/apimachinery/pkg/util/wait", + "//vendor:k8s.io/client-go/rest", + "//vendor:k8s.io/client-go/tools/clientcmd", + ], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], +) diff --git a/vendor/k8s.io/kubernetes/test/e2e_federation/framework/framework.go b/vendor/k8s.io/kubernetes/test/e2e_federation/framework/framework.go new file mode 100644 index 00000000..cf0b0144 --- /dev/null +++ b/vendor/k8s.io/kubernetes/test/e2e_federation/framework/framework.go @@ -0,0 +1,213 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package framework + +import ( + "fmt" + "io/ioutil" + "strings" + "time" + + apierrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset" + "k8s.io/kubernetes/pkg/api/v1" + "k8s.io/kubernetes/test/e2e/framework" + + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" + yaml "gopkg.in/yaml.v2" +) + +// Framework extends e2e Framework and adds federation specific fields +type Framework struct { + *framework.Framework + + FederationClientset *federation_clientset.Clientset + FederationNamespace *v1.Namespace +} + +func NewDefaultFederatedFramework(baseName string) *Framework { + f := &Framework{framework.NewDefaultFramework(baseName), nil, &v1.Namespace{}} + + BeforeEach(f.FederationBeforeEach) + AfterEach(f.FederationAfterEach) + + return f +} + +// FederationBeforeEach checks for federation apiserver is ready and makes a namespace. +func (f *Framework) FederationBeforeEach() { + if f.FederationClientset == nil { + By("Creating a release 1.5 federation Clientset") + var err error + f.FederationClientset, err = LoadFederationClientset() + Expect(err).NotTo(HaveOccurred()) + } + By("Waiting for federation-apiserver to be ready") + err := WaitForFederationApiserverReady(f.FederationClientset) + Expect(err).NotTo(HaveOccurred()) + By("federation-apiserver is ready") + + By("Creating a federation namespace") + ns, err := f.createFederationNamespace(f.BaseName) + Expect(err).NotTo(HaveOccurred()) + f.FederationNamespace = ns + By(fmt.Sprintf("Created federation namespace %s", ns.Name)) +} + +func (f *Framework) deleteFederationNs() { + ns := f.FederationNamespace + By(fmt.Sprintf("Destroying federation namespace %q for this suite.", ns.Name)) + timeout := 5 * time.Minute + if f.NamespaceDeletionTimeout != 0 { + timeout = f.NamespaceDeletionTimeout + } + + clientset := f.FederationClientset + // First delete the namespace from federation apiserver. + // Also delete the corresponding namespaces from underlying clusters. + orphanDependents := false + if err := clientset.Core().Namespaces().Delete(ns.Name, &metav1.DeleteOptions{OrphanDependents: &orphanDependents}); err != nil { + framework.Failf("Error while deleting federation namespace %s: %s", ns.Name, err) + } + // Verify that it got deleted. + err := wait.PollImmediate(5*time.Second, timeout, func() (bool, error) { + if _, err := clientset.Core().Namespaces().Get(ns.Name, metav1.GetOptions{}); err != nil { + if apierrors.IsNotFound(err) { + return true, nil + } + framework.Logf("Error while waiting for namespace to be terminated: %v", err) + return false, nil + } + return false, nil + }) + if err != nil { + if !apierrors.IsNotFound(err) { + framework.Failf("Couldn't delete ns %q: %s", ns.Name, err) + } else { + framework.Logf("Namespace %v was already deleted", ns.Name) + } + } +} + +// FederationAfterEach deletes the namespace, after reading its events. +func (f *Framework) FederationAfterEach() { + // DeleteNamespace at the very end in defer, to avoid any + // expectation failures preventing deleting the namespace. + defer func() { + // Whether to delete namespace is determined by 3 factors: delete-namespace flag, delete-namespace-on-failure flag and the test result + // if delete-namespace set to false, namespace will always be preserved. + // if delete-namespace is true and delete-namespace-on-failure is false, namespace will be preserved if test failed. + if framework.TestContext.DeleteNamespace && (framework.TestContext.DeleteNamespaceOnFailure || !CurrentGinkgoTestDescription().Failed) { + // Delete the federation namespace. + f.deleteFederationNs() + } + + // Paranoia-- prevent reuse! + f.FederationNamespace = nil + + if f.FederationClientset == nil { + framework.Logf("Warning: framework is marked federated, but has no federation 1.5 clientset") + return + } + if err := f.FederationClientset.Federation().Clusters().DeleteCollection(nil, metav1.ListOptions{}); err != nil { + framework.Logf("Error: failed to delete Clusters: %+v", err) + } + }() + + // Print events if the test failed. + if CurrentGinkgoTestDescription().Failed && framework.TestContext.DumpLogsOnFailure { + // Dump federation events in federation namespace. + framework.DumpEventsInNamespace(func(opts metav1.ListOptions, ns string) (*v1.EventList, error) { + return f.FederationClientset.Core().Events(ns).List(opts) + }, f.FederationNamespace.Name) + // Print logs of federation control plane pods (federation-apiserver and federation-controller-manager) + framework.LogPodsWithLabels(f.ClientSet, "federation", map[string]string{"app": "federated-cluster"}, framework.Logf) + // Print logs of kube-dns pod + framework.LogPodsWithLabels(f.ClientSet, "kube-system", map[string]string{"k8s-app": "kube-dns"}, framework.Logf) + } +} + +func (f *Framework) createFederationNamespace(baseName string) (*v1.Namespace, error) { + clientset := f.FederationClientset + namespaceObj := &v1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + GenerateName: fmt.Sprintf("e2e-tests-%v-", baseName), + }, + } + // Be robust about making the namespace creation call. + var got *v1.Namespace + if err := wait.PollImmediate(framework.Poll, framework.SingleCallTimeout, func() (bool, error) { + var err error + got, err = clientset.Core().Namespaces().Create(namespaceObj) + if err != nil { + framework.Logf("Unexpected error while creating namespace: %v", err) + return false, nil + } + return true, nil + }); err != nil { + return nil, err + } + return got, nil +} + +type E2EContext struct { + // Raw context name, + RawName string `yaml:"rawName"` + // A valid dns subdomain which can be used as the name of kubernetes resources. + Name string `yaml:"name"` + Cluster *framework.KubeCluster `yaml:"cluster"` + User *framework.KubeUser `yaml:"user"` +} + +func (f *Framework) GetUnderlyingFederatedContexts() []E2EContext { + kubeconfig := framework.KubeConfig{} + configBytes, err := ioutil.ReadFile(framework.TestContext.KubeConfig) + framework.ExpectNoError(err) + err = yaml.Unmarshal(configBytes, &kubeconfig) + framework.ExpectNoError(err) + + e2eContexts := []E2EContext{} + for _, context := range kubeconfig.Contexts { + if strings.HasPrefix(context.Name, "federation") && context.Name != framework.TestContext.FederatedKubeContext { + user := kubeconfig.FindUser(context.Context.User) + if user == nil { + framework.Failf("Could not find user for context %+v", context) + } + + cluster := kubeconfig.FindCluster(context.Context.Cluster) + if cluster == nil { + framework.Failf("Could not find cluster for context %+v", context) + } + + dnsSubdomainName, err := GetValidDNSSubdomainName(context.Name) + if err != nil { + framework.Failf("Could not convert context name %s to a valid dns subdomain name, error: %s", context.Name, err) + } + e2eContexts = append(e2eContexts, E2EContext{ + RawName: context.Name, + Name: dnsSubdomainName, + Cluster: cluster, + User: user, + }) + } + } + + return e2eContexts +} diff --git a/vendor/k8s.io/kubernetes/test/e2e_federation/framework/util.go b/vendor/k8s.io/kubernetes/test/e2e_federation/framework/util.go new file mode 100644 index 00000000..55f583b6 --- /dev/null +++ b/vendor/k8s.io/kubernetes/test/e2e_federation/framework/util.go @@ -0,0 +1,112 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package framework + +import ( + "fmt" + "os" + "regexp" + "time" + + apierrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + validationutil "k8s.io/apimachinery/pkg/util/validation" + "k8s.io/apimachinery/pkg/util/wait" + restclient "k8s.io/client-go/rest" + "k8s.io/client-go/tools/clientcmd" + federationapi "k8s.io/kubernetes/federation/apis/federation/v1beta1" + "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset" + "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/api/validation" + "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" + "k8s.io/kubernetes/test/e2e/framework" +) + +// Detects whether the federation namespace exists in the underlying cluster +func SkipUnlessFederated(c clientset.Interface) { + federationNS := os.Getenv("FEDERATION_NAMESPACE") + if federationNS == "" { + federationNS = federationapi.FederationNamespaceSystem + } + + _, err := c.Core().Namespaces().Get(federationNS, metav1.GetOptions{}) + if err != nil { + if apierrors.IsNotFound(err) { + framework.Skipf("Could not find federation namespace %s: skipping federated test", federationNS) + } else { + framework.Failf("Unexpected error getting namespace: %v", err) + } + } +} + +// WaitForFederationApiserverReady waits for the federation apiserver to be ready. +// It tests the readiness by sending a GET request and expecting a non error response. +func WaitForFederationApiserverReady(c *federation_clientset.Clientset) error { + return wait.PollImmediate(time.Second, 1*time.Minute, func() (bool, error) { + _, err := c.Federation().Clusters().List(metav1.ListOptions{}) + if err != nil { + return false, nil + } + return true, nil + }) +} + +func LoadFederationClientset() (*federation_clientset.Clientset, error) { + config, err := LoadFederatedConfig(&clientcmd.ConfigOverrides{}) + if err != nil { + return nil, err + } + + c, err := federation_clientset.NewForConfig(config) + if err != nil { + return nil, fmt.Errorf("error creating federation clientset: %v", err.Error()) + } + return c, nil +} + +func LoadFederatedConfig(overrides *clientcmd.ConfigOverrides) (*restclient.Config, error) { + c, err := framework.RestclientConfig(framework.TestContext.FederatedKubeContext) + if err != nil { + return nil, fmt.Errorf("error creating federation client config: %v", err.Error()) + } + cfg, err := clientcmd.NewDefaultClientConfig(*c, overrides).ClientConfig() + if cfg != nil { + //TODO(colhom): this is only here because https://github.com/kubernetes/kubernetes/issues/25422 + cfg.NegotiatedSerializer = api.Codecs + } + if err != nil { + return cfg, fmt.Errorf("error creating federation default client config: %v", err.Error()) + } + return cfg, nil +} + +// GetValidDNSSubdomainName massages the given name to be a valid dns subdomain name. +// Most resources (such as secrets, clusters) require the names to be valid dns subdomain. +// This is a generic function (not specific to federation). Should be moved to a more generic location if others want to use it. +func GetValidDNSSubdomainName(name string) (string, error) { + // "_" are not allowed. Replace them by "-". + name = regexp.MustCompile("_").ReplaceAllLiteralString(name, "-") + maxLength := validationutil.DNS1123SubdomainMaxLength + if len(name) > maxLength { + name = name[0 : maxLength-1] + } + // Verify that name now passes the validation. + if errors := validation.NameIsDNSSubdomain(name, false); len(errors) != 0 { + return "", fmt.Errorf("errors in converting name to a valid DNS subdomain %s", errors) + } + return name, nil +} diff --git a/vendor/k8s.io/kubernetes/test/e2e_node/BUILD b/vendor/k8s.io/kubernetes/test/e2e_node/BUILD index ed446a85..0e01e137 100644 --- a/vendor/k8s.io/kubernetes/test/e2e_node/BUILD +++ b/vendor/k8s.io/kubernetes/test/e2e_node/BUILD @@ -71,7 +71,10 @@ go_test( "volume_manager_test.go", ], library = ":go_default_library", - tags = ["automanaged"], + tags = [ + "automanaged", + "integration", + ], deps = [ "//pkg/api/resource:go_default_library", "//pkg/api/v1:go_default_library", @@ -114,6 +117,15 @@ go_test( ], ) +genrule( + name = "gen_e2e_node.test", + testonly = 1, + srcs = [":go_default_test"], + outs = ["e2e_node.test"], + cmd = "srcs=($(SRCS)); cp $$(dirname $${srcs[0]})/go_default_test $@;", + output_to_bindir = 1, +) + filegroup( name = "package-srcs", srcs = glob(["**"]), diff --git a/vendor/k8s.io/kubernetes/test/e2e_node/OWNERS b/vendor/k8s.io/kubernetes/test/e2e_node/OWNERS index d5187a99..039736d2 100644 --- a/vendor/k8s.io/kubernetes/test/e2e_node/OWNERS +++ b/vendor/k8s.io/kubernetes/test/e2e_node/OWNERS @@ -1,4 +1,6 @@ -assignees: - - vishh - - timstclair - - Random-Liu +approvers: +- Random-Liu +- timstclair +- vishh +reviewers: +- sig-node-reviewers diff --git a/vendor/k8s.io/kubernetes/test/e2e_node/apparmor_test.go b/vendor/k8s.io/kubernetes/test/e2e_node/apparmor_test.go index 2b9bc042..792f971b 100644 --- a/vendor/k8s.io/kubernetes/test/e2e_node/apparmor_test.go +++ b/vendor/k8s.io/kubernetes/test/e2e_node/apparmor_test.go @@ -147,7 +147,7 @@ func runAppArmorTest(f *framework.Framework, shouldRun bool, profile string) v1. f.ClientSet, pod.Name, f.Namespace.Name, "", framework.PodStartTimeout)) } else { // Pod should remain in the pending state. Wait for the Reason to be set to "AppArmor". - w, err := f.PodClient().Watch(v1.SingleObject(v1.ObjectMeta{Name: pod.Name})) + w, err := f.PodClient().Watch(metav1.SingleObject(metav1.ObjectMeta{Name: pod.Name})) framework.ExpectNoError(err) _, err = watch.Until(framework.PodStartTimeout, w, func(e watch.Event) (bool, error) { switch e.Type { @@ -171,7 +171,7 @@ func runAppArmorTest(f *framework.Framework, shouldRun bool, profile string) v1. func createPodWithAppArmor(f *framework.Framework, profile string) *v1.Pod { pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: fmt.Sprintf("test-apparmor-%s", strings.Replace(profile, "/", "-", -1)), Annotations: map[string]string{ apparmor.ContainerAnnotationKeyPrefix + "test": profile, diff --git a/vendor/k8s.io/kubernetes/test/e2e_node/cgroup_manager_test.go b/vendor/k8s.io/kubernetes/test/e2e_node/cgroup_manager_test.go index f812e584..2ac54208 100644 --- a/vendor/k8s.io/kubernetes/test/e2e_node/cgroup_manager_test.go +++ b/vendor/k8s.io/kubernetes/test/e2e_node/cgroup_manager_test.go @@ -17,6 +17,7 @@ limitations under the License. package e2e_node import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/kubelet/cm" @@ -68,7 +69,7 @@ func makePodToVerifyCgroups(cgroupNames []cm.CgroupName) *v1.Pod { } pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod" + string(uuid.NewUUID()), }, Spec: v1.PodSpec{ @@ -106,7 +107,7 @@ func makePodToVerifyCgroupRemoved(cgroupName cm.CgroupName) *v1.Pod { cgroupFsName = cm.ConvertCgroupNameToSystemd(cm.CgroupName(cgroupName), true) } pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod" + string(uuid.NewUUID()), }, Spec: v1.PodSpec{ @@ -166,7 +167,7 @@ var _ = framework.KubeDescribe("Kubelet Cgroup Manager", func() { ) By("Creating a Guaranteed pod in Namespace", func() { guaranteedPod = f.PodClient().Create(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod" + string(uuid.NewUUID()), Namespace: f.Namespace.Name, }, @@ -191,7 +192,7 @@ var _ = framework.KubeDescribe("Kubelet Cgroup Manager", func() { }) By("Checking if the pod cgroup was deleted", func() { gp := int64(1) - Expect(f.PodClient().Delete(guaranteedPod.Name, &v1.DeleteOptions{GracePeriodSeconds: &gp})).NotTo(HaveOccurred()) + Expect(f.PodClient().Delete(guaranteedPod.Name, &metav1.DeleteOptions{GracePeriodSeconds: &gp})).NotTo(HaveOccurred()) pod := makePodToVerifyCgroupRemoved(cm.CgroupName("pod" + podUID)) f.PodClient().Create(pod) err := framework.WaitForPodSuccessInNamespace(f.ClientSet, pod.Name, f.Namespace.Name) @@ -210,7 +211,7 @@ var _ = framework.KubeDescribe("Kubelet Cgroup Manager", func() { ) By("Creating a BestEffort pod in Namespace", func() { bestEffortPod = f.PodClient().Create(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod" + string(uuid.NewUUID()), Namespace: f.Namespace.Name, }, @@ -235,7 +236,7 @@ var _ = framework.KubeDescribe("Kubelet Cgroup Manager", func() { }) By("Checking if the pod cgroup was deleted", func() { gp := int64(1) - Expect(f.PodClient().Delete(bestEffortPod.Name, &v1.DeleteOptions{GracePeriodSeconds: &gp})).NotTo(HaveOccurred()) + Expect(f.PodClient().Delete(bestEffortPod.Name, &metav1.DeleteOptions{GracePeriodSeconds: &gp})).NotTo(HaveOccurred()) pod := makePodToVerifyCgroupRemoved(cm.CgroupName("BestEffort/pod" + podUID)) f.PodClient().Create(pod) err := framework.WaitForPodSuccessInNamespace(f.ClientSet, pod.Name, f.Namespace.Name) @@ -254,7 +255,7 @@ var _ = framework.KubeDescribe("Kubelet Cgroup Manager", func() { ) By("Creating a Burstable pod in Namespace", func() { burstablePod = f.PodClient().Create(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod" + string(uuid.NewUUID()), Namespace: f.Namespace.Name, }, @@ -279,7 +280,7 @@ var _ = framework.KubeDescribe("Kubelet Cgroup Manager", func() { }) By("Checking if the pod cgroup was deleted", func() { gp := int64(1) - Expect(f.PodClient().Delete(burstablePod.Name, &v1.DeleteOptions{GracePeriodSeconds: &gp})).NotTo(HaveOccurred()) + Expect(f.PodClient().Delete(burstablePod.Name, &metav1.DeleteOptions{GracePeriodSeconds: &gp})).NotTo(HaveOccurred()) pod := makePodToVerifyCgroupRemoved(cm.CgroupName("Burstable/pod" + podUID)) f.PodClient().Create(pod) err := framework.WaitForPodSuccessInNamespace(f.ClientSet, pod.Name, f.Namespace.Name) diff --git a/vendor/k8s.io/kubernetes/test/e2e_node/container.go b/vendor/k8s.io/kubernetes/test/e2e_node/container.go index 74538ff4..a7815492 100644 --- a/vendor/k8s.io/kubernetes/test/e2e_node/container.go +++ b/vendor/k8s.io/kubernetes/test/e2e_node/container.go @@ -46,7 +46,7 @@ func (cc *ConformanceContainer) Create() { imagePullSecrets = append(imagePullSecrets, v1.LocalObjectReference{Name: s}) } pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: cc.podName, }, Spec: v1.PodSpec{ @@ -63,7 +63,7 @@ func (cc *ConformanceContainer) Create() { } func (cc *ConformanceContainer) Delete() error { - return cc.PodClient.Delete(cc.podName, v1.NewDeleteOptions(0)) + return cc.PodClient.Delete(cc.podName, metav1.NewDeleteOptions(0)) } func (cc *ConformanceContainer) IsReady() (bool, error) { diff --git a/vendor/k8s.io/kubernetes/test/e2e_node/container_manager_test.go b/vendor/k8s.io/kubernetes/test/e2e_node/container_manager_test.go index 3f8cbaf8..0111060d 100644 --- a/vendor/k8s.io/kubernetes/test/e2e_node/container_manager_test.go +++ b/vendor/k8s.io/kubernetes/test/e2e_node/container_manager_test.go @@ -26,6 +26,7 @@ import ( "strings" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/util/uuid" @@ -96,7 +97,7 @@ var _ = framework.KubeDescribe("Kubelet Container Manager [Serial]", func() { podClient := f.PodClient() podName := "besteffort" + string(uuid.NewUUID()) podClient.Create(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, }, Spec: v1.PodSpec{ @@ -140,7 +141,7 @@ var _ = framework.KubeDescribe("Kubelet Container Manager [Serial]", func() { podClient := f.PodClient() podName := "guaranteed" + string(uuid.NewUUID()) podClient.Create(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, }, Spec: v1.PodSpec{ @@ -181,7 +182,7 @@ var _ = framework.KubeDescribe("Kubelet Container Manager [Serial]", func() { podClient := f.PodClient() podName := "burstable" + string(uuid.NewUUID()) podClient.Create(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, }, Spec: v1.PodSpec{ diff --git a/vendor/k8s.io/kubernetes/test/e2e_node/density_test.go b/vendor/k8s.io/kubernetes/test/e2e_node/density_test.go index 4ce9f07e..b1f39685 100644 --- a/vendor/k8s.io/kubernetes/test/e2e_node/density_test.go +++ b/vendor/k8s.io/kubernetes/test/e2e_node/density_test.go @@ -492,12 +492,12 @@ func newInformerWatchPod(f *framework.Framework, mutex *sync.Mutex, watchTimes m _, controller := cache.NewInformer( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { options.LabelSelector = labels.SelectorFromSet(labels.Set{"type": podType}).String() obj, err := f.ClientSet.Core().Pods(ns).List(options) return runtime.Object(obj), err }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { options.LabelSelector = labels.SelectorFromSet(labels.Set{"type": podType}).String() return f.ClientSet.Core().Pods(ns).Watch(options) }, diff --git a/vendor/k8s.io/kubernetes/test/e2e_node/disk_eviction_test.go b/vendor/k8s.io/kubernetes/test/e2e_node/disk_eviction_test.go index cfffbae2..e814e693 100644 --- a/vendor/k8s.io/kubernetes/test/e2e_node/disk_eviction_test.go +++ b/vendor/k8s.io/kubernetes/test/e2e_node/disk_eviction_test.go @@ -74,7 +74,7 @@ var _ = framework.KubeDescribe("Kubelet Eviction Manager [Serial] [Disruptive]", verifyPodName = "verify" + string(uuid.NewUUID()) createIdlePod(idlePodName, podClient) podClient.Create(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: busyPodName, }, Spec: v1.PodSpec{ @@ -97,9 +97,9 @@ var _ = framework.KubeDescribe("Kubelet Eviction Manager [Serial] [Disruptive]", if !isImageSupported() || !evictionOptionIsSet() { // Skip the after each return } - podClient.DeleteSync(busyPodName, &v1.DeleteOptions{}, podDisappearTimeout) - podClient.DeleteSync(idlePodName, &v1.DeleteOptions{}, podDisappearTimeout) - podClient.DeleteSync(verifyPodName, &v1.DeleteOptions{}, podDisappearTimeout) + podClient.DeleteSync(busyPodName, &metav1.DeleteOptions{}, podDisappearTimeout) + podClient.DeleteSync(idlePodName, &metav1.DeleteOptions{}, podDisappearTimeout) + podClient.DeleteSync(verifyPodName, &metav1.DeleteOptions{}, podDisappearTimeout) // Wait for 2 container gc loop to ensure that the containers are deleted. The containers // created in this test consume a lot of disk, we don't want them to trigger disk eviction @@ -188,7 +188,7 @@ var _ = framework.KubeDescribe("Kubelet Eviction Manager [Serial] [Disruptive]", func createIdlePod(podName string, podClient *framework.PodClient) { podClient.Create(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, }, Spec: v1.PodSpec{ diff --git a/vendor/k8s.io/kubernetes/test/e2e_node/e2e_node_suite_test.go b/vendor/k8s.io/kubernetes/test/e2e_node/e2e_node_suite_test.go index c5296a9d..596dd3e9 100644 --- a/vendor/k8s.io/kubernetes/test/e2e_node/e2e_node_suite_test.go +++ b/vendor/k8s.io/kubernetes/test/e2e_node/e2e_node_suite_test.go @@ -31,6 +31,7 @@ import ( "testing" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" commontest "k8s.io/kubernetes/test/e2e/common" @@ -252,7 +253,7 @@ func updateTestContext() error { // getNode gets node object from the apiserver. func getNode(c *clientset.Clientset) (*v1.Node, error) { - nodes, err := c.Nodes().List(v1.ListOptions{}) + nodes, err := c.Nodes().List(metav1.ListOptions{}) Expect(err).NotTo(HaveOccurred(), "should be able to list nodes.") if nodes == nil { return nil, fmt.Errorf("the node list is nil.") diff --git a/vendor/k8s.io/kubernetes/test/e2e_node/garbage_collector_test.go b/vendor/k8s.io/kubernetes/test/e2e_node/garbage_collector_test.go index 3d40e226..a463079a 100644 --- a/vendor/k8s.io/kubernetes/test/e2e_node/garbage_collector_test.go +++ b/vendor/k8s.io/kubernetes/test/e2e_node/garbage_collector_test.go @@ -231,7 +231,7 @@ func containerGCTest(f *framework.Framework, test testRun) { AfterEach(func() { for _, pod := range test.testPods { By(fmt.Sprintf("Deleting Pod %v", pod.podName)) - f.PodClient().DeleteSync(pod.podName, &v1.DeleteOptions{}, defaultRuntimeRequestTimeoutDuration) + f.PodClient().DeleteSync(pod.podName, &metav1.DeleteOptions{}, defaultRuntimeRequestTimeoutDuration) } By("Making sure all containers get cleaned up") @@ -309,7 +309,7 @@ func getPods(specs []*testPodSpec) (pods []*v1.Pod) { }) } pods = append(pods, &v1.Pod{ - ObjectMeta: v1.ObjectMeta{Name: spec.podName}, + ObjectMeta: metav1.ObjectMeta{Name: spec.podName}, Spec: v1.PodSpec{ RestartPolicy: v1.RestartPolicyAlways, Containers: containers, diff --git a/vendor/k8s.io/kubernetes/test/e2e_node/image_id_test.go b/vendor/k8s.io/kubernetes/test/e2e_node/image_id_test.go index 0a27951e..3e680afb 100644 --- a/vendor/k8s.io/kubernetes/test/e2e_node/image_id_test.go +++ b/vendor/k8s.io/kubernetes/test/e2e_node/image_id_test.go @@ -35,7 +35,7 @@ var _ = framework.KubeDescribe("ImageID", func() { It("should be set to the manifest digest (from RepoDigests) when available", func() { podDesc := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod-with-repodigest", }, Spec: v1.PodSpec{ diff --git a/vendor/k8s.io/kubernetes/test/e2e_node/inode_eviction_test.go b/vendor/k8s.io/kubernetes/test/e2e_node/inode_eviction_test.go index 8b88a0ef..2fe20b38 100644 --- a/vendor/k8s.io/kubernetes/test/e2e_node/inode_eviction_test.go +++ b/vendor/k8s.io/kubernetes/test/e2e_node/inode_eviction_test.go @@ -20,6 +20,7 @@ import ( "fmt" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/test/e2e/framework" @@ -45,7 +46,7 @@ var _ = framework.KubeDescribe("InodeEviction [Slow] [Serial] [Disruptive] [Flak { evictionPriority: 1, // This pod should be evicted before the normal memory usage pod pod: v1.Pod{ - ObjectMeta: v1.ObjectMeta{Name: "container-inode-hog-pod"}, + ObjectMeta: metav1.ObjectMeta{Name: "container-inode-hog-pod"}, Spec: v1.PodSpec{ RestartPolicy: v1.RestartPolicyNever, Containers: []v1.Container{ @@ -65,7 +66,7 @@ var _ = framework.KubeDescribe("InodeEviction [Slow] [Serial] [Disruptive] [Flak { evictionPriority: 1, // This pod should be evicted before the normal memory usage pod pod: v1.Pod{ - ObjectMeta: v1.ObjectMeta{Name: "volume-inode-hog-pod"}, + ObjectMeta: metav1.ObjectMeta{Name: "volume-inode-hog-pod"}, Spec: v1.PodSpec{ RestartPolicy: v1.RestartPolicyNever, Containers: []v1.Container{ @@ -91,7 +92,7 @@ var _ = framework.KubeDescribe("InodeEviction [Slow] [Serial] [Disruptive] [Flak { evictionPriority: 0, // This pod should never be evicted pod: v1.Pod{ - ObjectMeta: v1.ObjectMeta{Name: "normal-memory-usage-pod"}, + ObjectMeta: metav1.ObjectMeta{Name: "normal-memory-usage-pod"}, Spec: v1.PodSpec{ RestartPolicy: v1.RestartPolicyNever, Containers: []v1.Container{ @@ -160,7 +161,7 @@ func runEvictionTest(f *framework.Framework, testCondition string, podTestSpecs Eventually(func() error { // Gather current information - updatedPodList, err := f.ClientSet.Core().Pods(f.Namespace.Name).List(v1.ListOptions{}) + updatedPodList, err := f.ClientSet.Core().Pods(f.Namespace.Name).List(metav1.ListOptions{}) updatedPods := updatedPodList.Items for _, p := range updatedPods { framework.Logf("fetching pod %s; phase= %v", p.Name, p.Status.Phase) @@ -250,7 +251,7 @@ func runEvictionTest(f *framework.Framework, testCondition string, podTestSpecs By("making sure we can start a new pod after the test") podName := "test-admit-pod" f.PodClient().CreateSync(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, }, Spec: v1.PodSpec{ @@ -269,7 +270,7 @@ func runEvictionTest(f *framework.Framework, testCondition string, podTestSpecs By("deleting pods") for _, spec := range podTestSpecs { By(fmt.Sprintf("deleting pod: %s", spec.pod.Name)) - f.PodClient().DeleteSync(spec.pod.Name, &v1.DeleteOptions{}, podDisappearTimeout) + f.PodClient().DeleteSync(spec.pod.Name, &metav1.DeleteOptions{}, podDisappearTimeout) } if CurrentGinkgoTestDescription().Failed { @@ -287,7 +288,7 @@ func runEvictionTest(f *framework.Framework, testCondition string, podTestSpecs // Returns TRUE if the node has disk pressure due to inodes exists on the node, FALSE otherwise func hasInodePressure(f *framework.Framework, testCondition string) (bool, error) { - nodeList, err := f.ClientSet.Core().Nodes().List(v1.ListOptions{}) + nodeList, err := f.ClientSet.Core().Nodes().List(metav1.ListOptions{}) framework.ExpectNoError(err, "getting node list") if len(nodeList.Items) != 1 { return false, fmt.Errorf("expected 1 node, but see %d. List: %v", len(nodeList.Items), nodeList.Items) diff --git a/vendor/k8s.io/kubernetes/test/e2e_node/jenkins/conformance/conformance-jenkins.sh b/vendor/k8s.io/kubernetes/test/e2e_node/jenkins/conformance/conformance-jenkins.sh index 751768eb..bcf66d79 100755 --- a/vendor/k8s.io/kubernetes/test/e2e_node/jenkins/conformance/conformance-jenkins.sh +++ b/vendor/k8s.io/kubernetes/test/e2e_node/jenkins/conformance/conformance-jenkins.sh @@ -33,7 +33,7 @@ TIMEOUT=${TIMEOUT:-"45m"} mkdir -p ${ARTIFACTS} go run test/e2e_node/runner/remote/run_remote.go conformance \ - --logtostderr --vmodule=*=4 --ssh-env="gce" \ + --logtostderr --vmodule=*=4 --ssh-env="gce" --ssh-user="$GCE_USER" \ --zone="$GCE_ZONE" --project="$GCE_PROJECT" --hosts="$GCE_HOSTS" \ --images="$GCE_IMAGES" --image-project="$GCE_IMAGE_PROJECT" \ --image-config-file="$GCE_IMAGE_CONFIG_PATH" --cleanup="$CLEANUP" \ diff --git a/vendor/k8s.io/kubernetes/test/e2e_node/jenkins/jenkins-flaky.properties b/vendor/k8s.io/kubernetes/test/e2e_node/jenkins/jenkins-flaky.properties index 6dd75341..737533e0 100644 --- a/vendor/k8s.io/kubernetes/test/e2e_node/jenkins/jenkins-flaky.properties +++ b/vendor/k8s.io/kubernetes/test/e2e_node/jenkins/jenkins-flaky.properties @@ -4,4 +4,5 @@ GCE_ZONE=us-central1-f GCE_PROJECT=k8s-jkns-ci-node-e2e CLEANUP=true GINKGO_FLAGS='--focus="\[Flaky\]"' +TEST_ARGS='--feature-gates=DynamicKubeletConfig=true' KUBELET_ARGS='--experimental-cgroups-per-qos=true --cgroup-root=/' diff --git a/vendor/k8s.io/kubernetes/test/e2e_node/kubelet_test.go b/vendor/k8s.io/kubernetes/test/e2e_node/kubelet_test.go index 672f543f..d76185f5 100644 --- a/vendor/k8s.io/kubernetes/test/e2e_node/kubelet_test.go +++ b/vendor/k8s.io/kubernetes/test/e2e_node/kubelet_test.go @@ -40,7 +40,7 @@ var _ = framework.KubeDescribe("Kubelet", func() { podName := "busybox-scheduling-" + string(uuid.NewUUID()) It("it should print the output to logs [Conformance]", func() { podClient.CreateSync(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, }, Spec: v1.PodSpec{ @@ -74,7 +74,7 @@ var _ = framework.KubeDescribe("Kubelet", func() { BeforeEach(func() { podName = "bin-false" + string(uuid.NewUUID()) podClient.Create(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, }, Spec: v1.PodSpec{ @@ -112,7 +112,7 @@ var _ = framework.KubeDescribe("Kubelet", func() { }) It("should be possible to delete", func() { - err := podClient.Delete(podName, &v1.DeleteOptions{}) + err := podClient.Delete(podName, &metav1.DeleteOptions{}) Expect(err).To(BeNil(), fmt.Sprintf("Error deleting Pod %v", err)) }) }) @@ -121,7 +121,7 @@ var _ = framework.KubeDescribe("Kubelet", func() { It("it should not write to root filesystem [Conformance]", func() { isReadOnly := true podClient.CreateSync(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, }, Spec: v1.PodSpec{ diff --git a/vendor/k8s.io/kubernetes/test/e2e_node/lifecycle_hook_test.go b/vendor/k8s.io/kubernetes/test/e2e_node/lifecycle_hook_test.go index 2417e07f..ffe29a6e 100644 --- a/vendor/k8s.io/kubernetes/test/e2e_node/lifecycle_hook_test.go +++ b/vendor/k8s.io/kubernetes/test/e2e_node/lifecycle_hook_test.go @@ -20,6 +20,7 @@ import ( "fmt" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/util/intstr" "k8s.io/kubernetes/pkg/util/uuid" @@ -59,7 +60,7 @@ var _ = framework.KubeDescribe("Container Lifecycle Hook", func() { podClient.WaitForSuccess(podCheckHook.Name, postStartWaitTimeout) } By("delete the pod with lifecycle hook") - podClient.DeleteSync(podWithHook.Name, v1.NewDeleteOptions(15), podWaitTimeout) + podClient.DeleteSync(podWithHook.Name, metav1.NewDeleteOptions(15), podWaitTimeout) if podWithHook.Spec.Containers[0].Lifecycle.PreStop != nil { By("create the hook check pod") podClient.Create(podCheckHook) @@ -109,7 +110,7 @@ var _ = framework.KubeDescribe("Container Lifecycle Hook", func() { Context("when it is http hook", func() { var targetIP string podHandleHookRequest := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod-handle-http-request", }, Spec: v1.PodSpec{ @@ -143,7 +144,7 @@ var _ = framework.KubeDescribe("Container Lifecycle Hook", func() { }, postStartWaitTimeout, podCheckInterval).Should(BeNil()) } By("delete the pod with lifecycle hook") - podClient.DeleteSync(podWithHook.Name, v1.NewDeleteOptions(15), podWaitTimeout) + podClient.DeleteSync(podWithHook.Name, metav1.NewDeleteOptions(15), podWaitTimeout) if podWithHook.Spec.Containers[0].Lifecycle.PreStop != nil { By("check prestop hook") Eventually(func() error { @@ -154,7 +155,7 @@ var _ = framework.KubeDescribe("Container Lifecycle Hook", func() { } It("should execute poststart http hook properly [Conformance]", func() { podWithHook := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod-with-poststart-http-hook", }, Spec: v1.PodSpec{ @@ -179,7 +180,7 @@ var _ = framework.KubeDescribe("Container Lifecycle Hook", func() { }) It("should execute prestop http hook properly [Conformance]", func() { podWithHook := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod-with-prestop-http-hook", }, Spec: v1.PodSpec{ @@ -208,7 +209,7 @@ var _ = framework.KubeDescribe("Container Lifecycle Hook", func() { func getExecHookTestPod(name string, cmd []string) *v1.Pod { return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Spec: v1.PodSpec{ diff --git a/vendor/k8s.io/kubernetes/test/e2e_node/log_path_test.go b/vendor/k8s.io/kubernetes/test/e2e_node/log_path_test.go index 44466132..6bbbed62 100644 --- a/vendor/k8s.io/kubernetes/test/e2e_node/log_path_test.go +++ b/vendor/k8s.io/kubernetes/test/e2e_node/log_path_test.go @@ -47,7 +47,7 @@ var _ = framework.KubeDescribe("ContainerLogPath", func() { logDir := kubelet.ContainerLogsDir logPod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: logPodName, }, Spec: v1.PodSpec{ @@ -75,7 +75,7 @@ var _ = framework.KubeDescribe("ContainerLogPath", func() { expectedlogFile := logDir + "/" + logPodName + "_" + ns + "_" + logContName + "-" + logConID.ID + ".log" checkPod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: checkPodName, }, Spec: v1.PodSpec{ diff --git a/vendor/k8s.io/kubernetes/test/e2e_node/memory_eviction_test.go b/vendor/k8s.io/kubernetes/test/e2e_node/memory_eviction_test.go index b892d4c8..71d13e42 100644 --- a/vendor/k8s.io/kubernetes/test/e2e_node/memory_eviction_test.go +++ b/vendor/k8s.io/kubernetes/test/e2e_node/memory_eviction_test.go @@ -51,7 +51,7 @@ var _ = framework.KubeDescribe("MemoryEviction [Slow] [Serial] [Disruptive]", fu // Wait for the memory pressure condition to disappear from the node status before continuing. By("waiting for the memory pressure condition on the node to disappear before ending the test.") Eventually(func() error { - nodeList, err := f.ClientSet.Core().Nodes().List(v1.ListOptions{}) + nodeList, err := f.ClientSet.Core().Nodes().List(metav1.ListOptions{}) if err != nil { return fmt.Errorf("tried to get node list but got error: %v", err) } @@ -106,7 +106,7 @@ var _ = framework.KubeDescribe("MemoryEviction [Slow] [Serial] [Disruptive]", fu // This is the final check to try to prevent interference with subsequent tests. podName := "admit-best-effort-pod" f.PodClient().CreateSync(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, }, Spec: v1.PodSpec{ @@ -175,7 +175,7 @@ var _ = framework.KubeDescribe("MemoryEviction [Slow] [Serial] [Disruptive]", fu // see the eviction manager reporting a pressure condition for a while without the besteffort failing, // and we see that the manager did in fact evict the besteffort (this should be in the Kubelet log), we // will have more reason to believe the phase is out of date. - nodeList, err := f.ClientSet.Core().Nodes().List(v1.ListOptions{}) + nodeList, err := f.ClientSet.Core().Nodes().List(metav1.ListOptions{}) if err != nil { glog.Errorf("tried to get node list but got error: %v", err) } @@ -245,7 +245,7 @@ func createMemhogPod(f *framework.Framework, genName string, ctnName string, res } pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ GenerateName: genName, }, Spec: v1.PodSpec{ diff --git a/vendor/k8s.io/kubernetes/test/e2e_node/mirror_pod_test.go b/vendor/k8s.io/kubernetes/test/e2e_node/mirror_pod_test.go index 4f4d0063..3460ce21 100644 --- a/vendor/k8s.io/kubernetes/test/e2e_node/mirror_pod_test.go +++ b/vendor/k8s.io/kubernetes/test/e2e_node/mirror_pod_test.go @@ -85,7 +85,7 @@ var _ = framework.KubeDescribe("MirrorPod", func() { uid := pod.UID By("delete the mirror pod with grace period 30s") - err = f.ClientSet.Core().Pods(ns).Delete(mirrorPodName, v1.NewDeleteOptions(30)) + err = f.ClientSet.Core().Pods(ns).Delete(mirrorPodName, metav1.NewDeleteOptions(30)) Expect(err).ShouldNot(HaveOccurred()) By("wait for the mirror pod to be recreated") @@ -100,7 +100,7 @@ var _ = framework.KubeDescribe("MirrorPod", func() { uid := pod.UID By("delete the mirror pod with grace period 0s") - err = f.ClientSet.Core().Pods(ns).Delete(mirrorPodName, v1.NewDeleteOptions(0)) + err = f.ClientSet.Core().Pods(ns).Delete(mirrorPodName, metav1.NewDeleteOptions(0)) Expect(err).ShouldNot(HaveOccurred()) By("wait for the mirror pod to be recreated") diff --git a/vendor/k8s.io/kubernetes/test/e2e_node/resource_collector.go b/vendor/k8s.io/kubernetes/test/e2e_node/resource_collector.go index 1dfff821..a152d754 100644 --- a/vendor/k8s.io/kubernetes/test/e2e_node/resource_collector.go +++ b/vendor/k8s.io/kubernetes/test/e2e_node/resource_collector.go @@ -34,6 +34,7 @@ import ( cadvisorclient "github.com/google/cadvisor/client/v2" cadvisorapiv2 "github.com/google/cadvisor/info/v2" "github.com/opencontainers/runc/libcontainer/cgroups" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/wait" @@ -294,7 +295,7 @@ func formatCPUSummary(summary framework.ContainersCPUSummary) string { // createCadvisorPod creates a standalone cadvisor pod for fine-grain resource monitoring. func getCadvisorPod() *v1.Pod { return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: cadvisorPodName, }, Spec: v1.PodSpec{ @@ -373,7 +374,7 @@ func deletePodsSync(f *framework.Framework, pods []*v1.Pod) { go func(pod *v1.Pod) { defer wg.Done() - err := f.PodClient().Delete(pod.ObjectMeta.Name, v1.NewDeleteOptions(30)) + err := f.PodClient().Delete(pod.ObjectMeta.Name, metav1.NewDeleteOptions(30)) Expect(err).NotTo(HaveOccurred()) Expect(framework.WaitForPodToDisappear(f.ClientSet, f.Namespace.Name, pod.ObjectMeta.Name, labels.Everything(), @@ -395,7 +396,7 @@ func newTestPods(numPods int, imageName, podType string) []*v1.Pod { } pods = append(pods, &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, Labels: labels, }, diff --git a/vendor/k8s.io/kubernetes/test/e2e_node/restart_test.go b/vendor/k8s.io/kubernetes/test/e2e_node/restart_test.go index 13dea0ac..572634cc 100644 --- a/vendor/k8s.io/kubernetes/test/e2e_node/restart_test.go +++ b/vendor/k8s.io/kubernetes/test/e2e_node/restart_test.go @@ -21,6 +21,7 @@ package e2e_node import ( "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/test/e2e/framework" "fmt" @@ -35,7 +36,7 @@ import ( // If the timeout is hit, it returns the list of currently running pods. func waitForPods(f *framework.Framework, pod_count int, timeout time.Duration) (runningPods []*v1.Pod) { for start := time.Now(); time.Since(start) < timeout; time.Sleep(10 * time.Second) { - podList, err := f.PodClient().List(v1.ListOptions{}) + podList, err := f.PodClient().List(metav1.ListOptions{}) if err != nil { framework.Logf("Failed to list pods on node: %v", err) continue diff --git a/vendor/k8s.io/kubernetes/test/e2e_node/runtime_conformance_test.go b/vendor/k8s.io/kubernetes/test/e2e_node/runtime_conformance_test.go index b9aa852a..1e3471e3 100644 --- a/vendor/k8s.io/kubernetes/test/e2e_node/runtime_conformance_test.go +++ b/vendor/k8s.io/kubernetes/test/e2e_node/runtime_conformance_test.go @@ -28,6 +28,7 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" + gomegatypes "github.com/onsi/gomega/types" ) const ( @@ -128,46 +129,112 @@ while true; do sleep 1; done } }) - It("should report termination message if TerminationMessagePath is set [Conformance]", func() { - name := "termination-message-container" - terminationMessage := "DONE" - terminationMessagePath := "/dev/termination-log" - priv := true - c := ConformanceContainer{ - PodClient: f.PodClient(), - Container: v1.Container{ + rootUser := int64(0) + nonRootUser := int64(10000) + for _, testCase := range []struct { + name string + container v1.Container + phase v1.PodPhase + message gomegatypes.GomegaMatcher + }{ + { + name: "if TerminationMessagePath is set [Conformance]", + container: v1.Container{ Image: "gcr.io/google_containers/busybox:1.24", - Name: name, Command: []string{"/bin/sh", "-c"}, - Args: []string{fmt.Sprintf("/bin/echo -n %s > %s", terminationMessage, terminationMessagePath)}, - TerminationMessagePath: terminationMessagePath, + Args: []string{"/bin/echo -n DONE > /dev/termination-log"}, + TerminationMessagePath: "/dev/termination-log", SecurityContext: &v1.SecurityContext{ - Privileged: &priv, + RunAsUser: &rootUser, }, }, - RestartPolicy: v1.RestartPolicyNever, - } + phase: v1.PodSucceeded, + message: Equal("DONE"), + }, - By("create the container") - c.Create() - defer c.Delete() + { + name: "if TerminationMessagePath is set as non-root user and at a non-default path [Conformance]", + container: v1.Container{ + Image: "gcr.io/google_containers/busybox:1.24", + Command: []string{"/bin/sh", "-c"}, + Args: []string{"/bin/echo -n DONE > /dev/termination-custom-log"}, + TerminationMessagePath: "/dev/termination-custom-log", + SecurityContext: &v1.SecurityContext{ + RunAsUser: &nonRootUser, + }, + }, + phase: v1.PodSucceeded, + message: Equal("DONE"), + }, - By("wait for the container to succeed") - Eventually(c.GetPhase, retryTimeout, pollInterval).Should(Equal(v1.PodSucceeded)) + { + name: "from log output if TerminationMessagePolicy FallbackToLogOnError is set [Conformance]", + container: v1.Container{ + Image: "gcr.io/google_containers/busybox:1.24", + Command: []string{"/bin/sh", "-c"}, + Args: []string{"/bin/echo -n DONE; /bin/false"}, + TerminationMessagePath: "/dev/termination-log", + TerminationMessagePolicy: v1.TerminationMessageFallbackToLogsOnError, + }, + phase: v1.PodFailed, + message: Equal("DONE\n"), + }, - By("get the container status") - status, err := c.GetStatus() - Expect(err).NotTo(HaveOccurred()) + { + name: "as empty when pod succeeds and TerminationMessagePolicy FallbackToLogOnError is set", + container: v1.Container{ + Image: "gcr.io/google_containers/busybox:1.24", + Command: []string{"/bin/sh", "-c"}, + Args: []string{"/bin/echo DONE; /bin/true"}, + TerminationMessagePath: "/dev/termination-log", + TerminationMessagePolicy: v1.TerminationMessageFallbackToLogsOnError, + }, + phase: v1.PodSucceeded, + message: Equal(""), + }, - By("the container should be terminated") - Expect(GetContainerState(status.State)).To(Equal(ContainerStateTerminated)) + { + name: "from file when pod succeeds and TerminationMessagePolicy FallbackToLogOnError is set [Conformance]", + container: v1.Container{ + Image: "gcr.io/google_containers/busybox:1.24", + Command: []string{"/bin/sh", "-c"}, + Args: []string{"/bin/echo -n OK > /dev/termination-log; /bin/echo DONE; /bin/true"}, + TerminationMessagePath: "/dev/termination-log", + TerminationMessagePolicy: v1.TerminationMessageFallbackToLogsOnError, + }, + phase: v1.PodSucceeded, + message: Equal("OK"), + }, + } { + It(fmt.Sprintf("should report termination message %s", testCase.name), func() { + testCase.container.Name = "termination-message-container" + c := ConformanceContainer{ + PodClient: f.PodClient(), + Container: testCase.container, + RestartPolicy: v1.RestartPolicyNever, + } - By("the termination message should be set") - Expect(status.State.Terminated.Message).Should(Equal(terminationMessage)) + By("create the container") + c.Create() + defer c.Delete() - By("delete the container") - Expect(c.Delete()).To(Succeed()) - }) + By(fmt.Sprintf("wait for the container to reach %s", testCase.phase)) + Eventually(c.GetPhase, retryTimeout, pollInterval).Should(Equal(testCase.phase)) + + By("get the container status") + status, err := c.GetStatus() + Expect(err).NotTo(HaveOccurred()) + + By("the container should be terminated") + Expect(GetContainerState(status.State)).To(Equal(ContainerStateTerminated)) + + By("the termination message should be set") + Expect(status.State.Terminated.Message).Should(testCase.message) + + By("delete the container") + Expect(c.Delete()).To(Succeed()) + }) + } }) Context("when running a container with a new image", func() { diff --git a/vendor/k8s.io/kubernetes/test/e2e_node/services/BUILD b/vendor/k8s.io/kubernetes/test/e2e_node/services/BUILD index 254146bb..9754e5cc 100644 --- a/vendor/k8s.io/kubernetes/test/e2e_node/services/BUILD +++ b/vendor/k8s.io/kubernetes/test/e2e_node/services/BUILD @@ -26,7 +26,6 @@ go_library( "//pkg/api:go_default_library", "//pkg/api/v1:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/client/typed/dynamic:go_default_library", "//pkg/controller/namespace:go_default_library", "//pkg/util/config:go_default_library", @@ -39,6 +38,7 @@ go_library( "//vendor:github.com/coreos/pkg/capnslog", "//vendor:github.com/golang/glog", "//vendor:github.com/kardianos/osext", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/test/e2e_node/services/namespace_controller.go b/vendor/k8s.io/kubernetes/test/e2e_node/services/namespace_controller.go index bb2f6288..4db1f6cd 100644 --- a/vendor/k8s.io/kubernetes/test/e2e_node/services/namespace_controller.go +++ b/vendor/k8s.io/kubernetes/test/e2e_node/services/namespace_controller.go @@ -19,10 +19,10 @@ package services import ( "time" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/typed/dynamic" namespacecontroller "k8s.io/kubernetes/pkg/controller/namespace" "k8s.io/kubernetes/test/e2e/framework" diff --git a/vendor/k8s.io/kubernetes/test/e2e_node/simple_mount.go b/vendor/k8s.io/kubernetes/test/e2e_node/simple_mount.go index 37f6022a..3d9dc430 100644 --- a/vendor/k8s.io/kubernetes/test/e2e_node/simple_mount.go +++ b/vendor/k8s.io/kubernetes/test/e2e_node/simple_mount.go @@ -35,7 +35,7 @@ var _ = framework.KubeDescribe("SimpleMount", func() { Kind: "Pod", APIVersion: "v1", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "simple-mount-pod", }, Spec: v1.PodSpec{ diff --git a/vendor/k8s.io/kubernetes/test/e2e_node/summary_test.go b/vendor/k8s.io/kubernetes/test/e2e_node/summary_test.go index fb1cb527..660339d6 100644 --- a/vendor/k8s.io/kubernetes/test/e2e_node/summary_test.go +++ b/vendor/k8s.io/kubernetes/test/e2e_node/summary_test.go @@ -221,7 +221,7 @@ func createSummaryTestPods(f *framework.Framework, names ...string) { pods := make([]*v1.Pod, 0, len(names)) for _, name := range names { pods = append(pods, &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Spec: v1.PodSpec{ diff --git a/vendor/k8s.io/kubernetes/test/e2e_node/util.go b/vendor/k8s.io/kubernetes/test/e2e_node/util.go index 15c08f8d..1bbd4d1d 100644 --- a/vendor/k8s.io/kubernetes/test/e2e_node/util.go +++ b/vendor/k8s.io/kubernetes/test/e2e_node/util.go @@ -251,7 +251,7 @@ func makeKubeletConfigMap(nodeName string, kubeCfg *componentconfig.KubeletConfi framework.ExpectNoError(err) cmap := &v1.ConfigMap{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: fmt.Sprintf("kubelet-%s", nodeName), }, Data: map[string]string{ diff --git a/vendor/k8s.io/kubernetes/test/e2e_node/volume_manager_test.go b/vendor/k8s.io/kubernetes/test/e2e_node/volume_manager_test.go index a3ba69d2..2f6a198b 100644 --- a/vendor/k8s.io/kubernetes/test/e2e_node/volume_manager_test.go +++ b/vendor/k8s.io/kubernetes/test/e2e_node/volume_manager_test.go @@ -19,6 +19,7 @@ package e2e_node import ( "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/util/uuid" "k8s.io/kubernetes/test/e2e/framework" @@ -41,7 +42,7 @@ var _ = framework.KubeDescribe("Kubelet Volume Manager", func() { By("Creating a pod with a memory backed volume that exits success without restart", func() { volumeName = "memory-volume" memoryBackedPod = f.PodClient().Create(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod" + string(uuid.NewUUID()), Namespace: f.Namespace.Name, }, @@ -80,7 +81,7 @@ var _ = framework.KubeDescribe("Kubelet Volume Manager", func() { // need to create a new verification pod on each pass since updates //to the HostPath volume aren't propogated to the pod pod := f.PodClient().Create(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "pod" + string(uuid.NewUUID()), Namespace: f.Namespace.Name, }, @@ -113,7 +114,7 @@ var _ = framework.KubeDescribe("Kubelet Volume Manager", func() { }) err = framework.WaitForPodSuccessInNamespace(f.ClientSet, pod.Name, f.Namespace.Name) gp := int64(1) - f.PodClient().Delete(pod.Name, &v1.DeleteOptions{GracePeriodSeconds: &gp}) + f.PodClient().Delete(pod.Name, &metav1.DeleteOptions{GracePeriodSeconds: &gp}) if err == nil { break } diff --git a/vendor/k8s.io/kubernetes/test/images/clusterapi-tester/BUILD b/vendor/k8s.io/kubernetes/test/images/clusterapi-tester/BUILD index 1ba41c21..36f19f37 100644 --- a/vendor/k8s.io/kubernetes/test/images/clusterapi-tester/BUILD +++ b/vendor/k8s.io/kubernetes/test/images/clusterapi-tester/BUILD @@ -19,11 +19,9 @@ go_library( srcs = ["main.go"], tags = ["automanaged"], deps = [ - "//pkg/api:go_default_library", "//pkg/client/clientset_generated/internalclientset:go_default_library", - "//pkg/client/restclient:go_default_library", - "//pkg/fields:go_default_library", - "//vendor:k8s.io/apimachinery/pkg/labels", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/test/images/clusterapi-tester/main.go b/vendor/k8s.io/kubernetes/test/images/clusterapi-tester/main.go index 139ae574..1e24ec6f 100644 --- a/vendor/k8s.io/kubernetes/test/images/clusterapi-tester/main.go +++ b/vendor/k8s.io/kubernetes/test/images/clusterapi-tester/main.go @@ -24,11 +24,9 @@ import ( "fmt" "net/http" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/kubernetes/pkg/api" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + restclient "k8s.io/client-go/rest" clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" - "k8s.io/kubernetes/pkg/client/restclient" - "k8s.io/kubernetes/pkg/fields" ) func main() { @@ -41,7 +39,7 @@ func main() { if err != nil { log.Fatalf("Failed to create client: %v", err) } - listAll := api.ListOptions{LabelSelector: labels.Everything(), FieldSelector: fields.Everything()} + listAll := metav1.ListOptions{} nodes, err := kubeClient.Core().Nodes().List(listAll) if err != nil { log.Fatalf("Failed to list nodes: %v", err) @@ -50,7 +48,7 @@ func main() { for _, node := range nodes.Items { log.Printf("\t%v", node.Name) } - services, err := kubeClient.Core().Services(api.NamespaceDefault).List(listAll) + services, err := kubeClient.Core().Services(metav1.NamespaceDefault).List(listAll) if err != nil { log.Fatalf("Failed to list services: %v", err) } diff --git a/vendor/k8s.io/kubernetes/test/images/network-tester/BUILD b/vendor/k8s.io/kubernetes/test/images/network-tester/BUILD index b5f3d58d..2802e035 100644 --- a/vendor/k8s.io/kubernetes/test/images/network-tester/BUILD +++ b/vendor/k8s.io/kubernetes/test/images/network-tester/BUILD @@ -20,9 +20,9 @@ go_library( tags = ["automanaged"], deps = [ "//pkg/client/clientset_generated/internalclientset:go_default_library", - "//pkg/client/restclient:go_default_library", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/util/sets", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/test/images/network-tester/webserver.go b/vendor/k8s.io/kubernetes/test/images/network-tester/webserver.go index 2156b095..bc065f83 100644 --- a/vendor/k8s.io/kubernetes/test/images/network-tester/webserver.go +++ b/vendor/k8s.io/kubernetes/test/images/network-tester/webserver.go @@ -45,8 +45,8 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/sets" + restclient "k8s.io/client-go/rest" clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" - "k8s.io/kubernetes/pkg/client/restclient" ) var ( diff --git a/vendor/k8s.io/kubernetes/test/integration/auth/accessreview_test.go b/vendor/k8s.io/kubernetes/test/integration/auth/accessreview_test.go index b2e37f20..3e577c94 100644 --- a/vendor/k8s.io/kubernetes/test/integration/auth/accessreview_test.go +++ b/vendor/k8s.io/kubernetes/test/integration/auth/accessreview_test.go @@ -24,13 +24,14 @@ import ( "strings" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apiserver/pkg/authentication/authenticator" "k8s.io/apiserver/pkg/authentication/user" "k8s.io/apiserver/pkg/authorization/authorizer" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" authorizationapi "k8s.io/kubernetes/pkg/apis/authorization" clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/plugin/pkg/admission/admit" "k8s.io/kubernetes/test/integration/framework" ) @@ -248,7 +249,7 @@ func TestLocalSubjectAccessReview(t *testing.T) { name: "simple allow", namespace: "foo", sar: &authorizationapi.LocalSubjectAccessReview{ - ObjectMeta: api.ObjectMeta{Namespace: "foo"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "foo"}, Spec: authorizationapi.SubjectAccessReviewSpec{ ResourceAttributes: &authorizationapi.ResourceAttributes{ Verb: "list", @@ -269,7 +270,7 @@ func TestLocalSubjectAccessReview(t *testing.T) { name: "simple deny", namespace: "foo", sar: &authorizationapi.LocalSubjectAccessReview{ - ObjectMeta: api.ObjectMeta{Namespace: "foo"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "foo"}, Spec: authorizationapi.SubjectAccessReviewSpec{ ResourceAttributes: &authorizationapi.ResourceAttributes{ Verb: "list", @@ -291,7 +292,7 @@ func TestLocalSubjectAccessReview(t *testing.T) { name: "conflicting namespace", namespace: "foo", sar: &authorizationapi.LocalSubjectAccessReview{ - ObjectMeta: api.ObjectMeta{Namespace: "foo"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "foo"}, Spec: authorizationapi.SubjectAccessReviewSpec{ ResourceAttributes: &authorizationapi.ResourceAttributes{ Verb: "list", @@ -309,7 +310,7 @@ func TestLocalSubjectAccessReview(t *testing.T) { name: "missing namespace", namespace: "foo", sar: &authorizationapi.LocalSubjectAccessReview{ - ObjectMeta: api.ObjectMeta{Namespace: "foo"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "foo"}, Spec: authorizationapi.SubjectAccessReviewSpec{ ResourceAttributes: &authorizationapi.ResourceAttributes{ Verb: "list", diff --git a/vendor/k8s.io/kubernetes/test/integration/auth/auth_test.go b/vendor/k8s.io/kubernetes/test/integration/auth/auth_test.go index 889cd82d..fd9d05b1 100644 --- a/vendor/k8s.io/kubernetes/test/integration/auth/auth_test.go +++ b/vendor/k8s.io/kubernetes/test/integration/auth/auth_test.go @@ -36,20 +36,21 @@ import ( "testing" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apiserver/pkg/authentication/authenticator" "k8s.io/apiserver/pkg/authentication/group" "k8s.io/apiserver/pkg/authentication/request/bearertoken" + "k8s.io/apiserver/pkg/authentication/serviceaccount" "k8s.io/apiserver/pkg/authentication/user" "k8s.io/apiserver/pkg/authorization/authorizer" + "k8s.io/client-go/tools/clientcmd/api/v1" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" authenticationv1beta1 "k8s.io/kubernetes/pkg/apis/authentication/v1beta1" "k8s.io/kubernetes/pkg/apis/autoscaling" "k8s.io/kubernetes/pkg/apis/extensions" "k8s.io/kubernetes/pkg/auth/authorizer/abac" - "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api/v1" apiserverauthorizer "k8s.io/kubernetes/pkg/genericapiserver/authorizer" - "k8s.io/kubernetes/pkg/serviceaccount" "k8s.io/kubernetes/plugin/pkg/admission/admit" "k8s.io/kubernetes/plugin/pkg/auth/authenticator/token/tokentest" "k8s.io/kubernetes/plugin/pkg/auth/authenticator/token/webhook" @@ -968,10 +969,10 @@ func TestNamespaceAuthorization(t *testing.T) { {"GET", path("pods", "foo", "a"), "bar", "", integration.Code403}, {"DELETE", timeoutPath("pods", "foo", "a"), "bar", "", integration.Code403}, - {"POST", timeoutPath("pods", api.NamespaceDefault, ""), "", aPod, integration.Code403}, + {"POST", timeoutPath("pods", metav1.NamespaceDefault, ""), "", aPod, integration.Code403}, {"GET", path("pods", "", ""), "", "", integration.Code403}, - {"GET", path("pods", api.NamespaceDefault, "a"), "", "", integration.Code403}, - {"DELETE", timeoutPath("pods", api.NamespaceDefault, "a"), "", "", integration.Code403}, + {"GET", path("pods", metav1.NamespaceDefault, "a"), "", "", integration.Code403}, + {"DELETE", timeoutPath("pods", metav1.NamespaceDefault, "a"), "", "", integration.Code403}, } for _, r := range requests { @@ -1139,7 +1140,7 @@ func TestReadOnlyAuthorization(t *testing.T) { }{ {"POST", path("pods", ns.Name, ""), aPod, integration.Code403}, {"GET", path("pods", ns.Name, ""), "", integration.Code200}, - {"GET", path("pods", api.NamespaceDefault, "a"), "", integration.Code404}, + {"GET", path("pods", metav1.NamespaceDefault, "a"), "", integration.Code404}, } for _, r := range requests { diff --git a/vendor/k8s.io/kubernetes/test/integration/auth/rbac_test.go b/vendor/k8s.io/kubernetes/test/integration/auth/rbac_test.go index 66dabcfc..0664afdb 100644 --- a/vendor/k8s.io/kubernetes/test/integration/auth/rbac_test.go +++ b/vendor/k8s.io/kubernetes/test/integration/auth/rbac_test.go @@ -30,19 +30,20 @@ import ( "github.com/golang/glog" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/watch" "k8s.io/apiserver/pkg/authentication/authenticator" "k8s.io/apiserver/pkg/authentication/request/bearertoken" "k8s.io/apiserver/pkg/authorization/authorizer" + restclient "k8s.io/client-go/rest" + "k8s.io/client-go/transport" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" rbacapi "k8s.io/kubernetes/pkg/apis/rbac" clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" - "k8s.io/kubernetes/pkg/client/restclient" - "k8s.io/kubernetes/pkg/client/transport" + "k8s.io/kubernetes/pkg/genericapiserver/registry/generic" "k8s.io/kubernetes/pkg/master" - "k8s.io/kubernetes/pkg/registry/generic" "k8s.io/kubernetes/pkg/registry/rbac/clusterrole" clusterrolestore "k8s.io/kubernetes/pkg/registry/rbac/clusterrole/storage" "k8s.io/kubernetes/pkg/registry/rbac/clusterrolebinding" @@ -169,7 +170,7 @@ func (s statusCode) String() string { var ( writeJobsRoleBinding = ` { - "apiVersion": "rbac.authorization.k8s.io/v1alpha1", + "apiVersion": "rbac.authorization.k8s.io/v1beta1", "kind": "RoleBinding", "metadata": { "name": "pi"%s @@ -268,17 +269,17 @@ func TestRBAC(t *testing.T) { bootstrapRoles: bootstrapRoles{ clusterRoles: []rbacapi.ClusterRole{ { - ObjectMeta: api.ObjectMeta{Name: "allow-all"}, + ObjectMeta: metav1.ObjectMeta{Name: "allow-all"}, Rules: []rbacapi.PolicyRule{ruleAllowAll}, }, { - ObjectMeta: api.ObjectMeta{Name: "read-pods"}, + ObjectMeta: metav1.ObjectMeta{Name: "read-pods"}, Rules: []rbacapi.PolicyRule{ruleReadPods}, }, }, clusterRoleBindings: []rbacapi.ClusterRoleBinding{ { - ObjectMeta: api.ObjectMeta{Name: "read-pods"}, + ObjectMeta: metav1.ObjectMeta{Name: "read-pods"}, Subjects: []rbacapi.Subject{ {Kind: "User", Name: "pod-reader"}, }, @@ -306,17 +307,17 @@ func TestRBAC(t *testing.T) { bootstrapRoles: bootstrapRoles{ clusterRoles: []rbacapi.ClusterRole{ { - ObjectMeta: api.ObjectMeta{Name: "write-jobs"}, + ObjectMeta: metav1.ObjectMeta{Name: "write-jobs"}, Rules: []rbacapi.PolicyRule{ruleWriteJobs}, }, { - ObjectMeta: api.ObjectMeta{Name: "create-rolebindings"}, + ObjectMeta: metav1.ObjectMeta{Name: "create-rolebindings"}, Rules: []rbacapi.PolicyRule{ rbacapi.NewRule("create").Groups("rbac.authorization.k8s.io").Resources("rolebindings").RuleOrDie(), }, }, { - ObjectMeta: api.ObjectMeta{Name: "bind-any-clusterrole"}, + ObjectMeta: metav1.ObjectMeta{Name: "bind-any-clusterrole"}, Rules: []rbacapi.PolicyRule{ rbacapi.NewRule("bind").Groups("rbac.authorization.k8s.io").Resources("clusterroles").RuleOrDie(), }, @@ -324,12 +325,12 @@ func TestRBAC(t *testing.T) { }, clusterRoleBindings: []rbacapi.ClusterRoleBinding{ { - ObjectMeta: api.ObjectMeta{Name: "write-jobs"}, + ObjectMeta: metav1.ObjectMeta{Name: "write-jobs"}, Subjects: []rbacapi.Subject{{Kind: "User", Name: "job-writer"}}, RoleRef: rbacapi.RoleRef{Kind: "ClusterRole", Name: "write-jobs"}, }, { - ObjectMeta: api.ObjectMeta{Name: "create-rolebindings"}, + ObjectMeta: metav1.ObjectMeta{Name: "create-rolebindings"}, Subjects: []rbacapi.Subject{ {Kind: "User", Name: "job-writer"}, {Kind: "User", Name: "nonescalating-rolebinding-writer"}, @@ -338,19 +339,19 @@ func TestRBAC(t *testing.T) { RoleRef: rbacapi.RoleRef{Kind: "ClusterRole", Name: "create-rolebindings"}, }, { - ObjectMeta: api.ObjectMeta{Name: "bind-any-clusterrole"}, + ObjectMeta: metav1.ObjectMeta{Name: "bind-any-clusterrole"}, Subjects: []rbacapi.Subject{{Kind: "User", Name: "any-rolebinding-writer"}}, RoleRef: rbacapi.RoleRef{Kind: "ClusterRole", Name: "bind-any-clusterrole"}, }, }, roleBindings: []rbacapi.RoleBinding{ { - ObjectMeta: api.ObjectMeta{Name: "write-jobs", Namespace: "job-namespace"}, + ObjectMeta: metav1.ObjectMeta{Name: "write-jobs", Namespace: "job-namespace"}, Subjects: []rbacapi.Subject{{Kind: "User", Name: "job-writer-namespace"}}, RoleRef: rbacapi.RoleRef{Kind: "ClusterRole", Name: "write-jobs"}, }, { - ObjectMeta: api.ObjectMeta{Name: "create-rolebindings", Namespace: "job-namespace"}, + ObjectMeta: metav1.ObjectMeta{Name: "create-rolebindings", Namespace: "job-namespace"}, Subjects: []rbacapi.Subject{{Kind: "User", Name: "job-writer-namespace"}}, RoleRef: rbacapi.RoleRef{Kind: "ClusterRole", Name: "create-rolebindings"}, }, @@ -507,7 +508,7 @@ func TestBootstrapping(t *testing.T) { clientset := clientset.NewForConfigOrDie(&restclient.Config{BearerToken: superUser, Host: s.URL, ContentConfig: restclient.ContentConfig{GroupVersion: &api.Registry.GroupOrDie(api.GroupName).GroupVersion}}) - watcher, err := clientset.Rbac().ClusterRoles().Watch(api.ListOptions{ResourceVersion: "0"}) + watcher, err := clientset.Rbac().ClusterRoles().Watch(metav1.ListOptions{ResourceVersion: "0"}) if err != nil { t.Fatalf("unexpected error: %v", err) } @@ -521,7 +522,7 @@ func TestBootstrapping(t *testing.T) { t.Fatalf("unexpected error: %v", err) } - clusterRoles, err := clientset.Rbac().ClusterRoles().List(api.ListOptions{}) + clusterRoles, err := clientset.Rbac().ClusterRoles().List(metav1.ListOptions{}) if err != nil { t.Fatalf("unexpected error: %v", err) } diff --git a/vendor/k8s.io/kubernetes/test/integration/client/client_test.go b/vendor/k8s.io/kubernetes/test/integration/client/client_test.go index a839c4b9..89d1013d 100644 --- a/vendor/k8s.io/kubernetes/test/integration/client/client_test.go +++ b/vendor/k8s.io/kubernetes/test/integration/client/client_test.go @@ -32,12 +32,13 @@ import ( "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apimachinery/pkg/watch" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/version" e2e "k8s.io/kubernetes/test/e2e/framework" "k8s.io/kubernetes/test/integration/framework" @@ -60,7 +61,7 @@ func TestClient(t *testing.T) { t.Errorf("expected %#v, got %#v", e, a) } - pods, err := client.Core().Pods(ns.Name).List(v1.ListOptions{}) + pods, err := client.Core().Pods(ns.Name).List(metav1.ListOptions{}) if err != nil { t.Fatalf("unexpected error: %v", err) } @@ -70,7 +71,7 @@ func TestClient(t *testing.T) { // get a validation error pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ GenerateName: "test", Namespace: ns.Name, }, @@ -99,7 +100,7 @@ func TestClient(t *testing.T) { } // pod is shown, but not scheduled - pods, err = client.Core().Pods(ns.Name).List(v1.ListOptions{}) + pods, err = client.Core().Pods(ns.Name).List(metav1.ListOptions{}) if err != nil { t.Fatalf("unexpected error: %v", err) } @@ -128,7 +129,7 @@ func TestAtomicPut(t *testing.T) { TypeMeta: metav1.TypeMeta{ APIVersion: c.Core().RESTClient().APIVersion().String(), }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "atomicrc", Namespace: ns.Name, Labels: map[string]string{ @@ -141,7 +142,7 @@ func TestAtomicPut(t *testing.T) { "foo": "bar", }, Template: &v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "foo": "bar", }, @@ -222,7 +223,7 @@ func TestPatch(t *testing.T) { TypeMeta: metav1.TypeMeta{ APIVersion: c.Core().RESTClient().APIVersion().String(), }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: ns.Name, Labels: map[string]string{}, @@ -239,23 +240,23 @@ func TestPatch(t *testing.T) { t.Fatalf("Failed creating patchpods: %v", err) } - patchBodies := map[schema.GroupVersion]map[api.PatchType]struct { + patchBodies := map[schema.GroupVersion]map[types.PatchType]struct { AddLabelBody []byte RemoveLabelBody []byte RemoveAllLabelsBody []byte }{ v1.SchemeGroupVersion: { - api.JSONPatchType: { + types.JSONPatchType: { []byte(`[{"op":"add","path":"/metadata/labels","value":{"foo":"bar","baz":"qux"}}]`), []byte(`[{"op":"remove","path":"/metadata/labels/foo"}]`), []byte(`[{"op":"remove","path":"/metadata/labels"}]`), }, - api.MergePatchType: { + types.MergePatchType: { []byte(`{"metadata":{"labels":{"foo":"bar","baz":"qux"}}}`), []byte(`{"metadata":{"labels":{"foo":null}}}`), []byte(`{"metadata":{"labels":null}}`), }, - api.StrategicMergePatchType: { + types.StrategicMergePatchType: { []byte(`{"metadata":{"labels":{"foo":"bar","baz":"qux"}}}`), []byte(`{"metadata":{"labels":{"foo":null}}}`), []byte(`{"metadata":{"labels":{"$patch":"replace"}}}`), @@ -265,7 +266,7 @@ func TestPatch(t *testing.T) { pb := patchBodies[c.Core().RESTClient().APIVersion()] - execPatch := func(pt api.PatchType, body []byte) error { + execPatch := func(pt types.PatchType, body []byte) error { return c.Core().RESTClient().Patch(pt). Resource(resource). Namespace(ns.Name). @@ -326,7 +327,7 @@ func TestPatchWithCreateOnUpdate(t *testing.T) { defer framework.DeleteTestingNamespace(ns, s, t) endpointTemplate := &v1.Endpoints{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "patchendpoint", Namespace: ns.Name, }, @@ -339,7 +340,7 @@ func TestPatchWithCreateOnUpdate(t *testing.T) { } patchEndpoint := func(json []byte) (runtime.Object, error) { - return c.Core().RESTClient().Patch(api.MergePatchType).Resource("endpoints").Namespace(ns.Name).Name("patchendpoint").Body(json).Do().Get() + return c.Core().RESTClient().Patch(types.MergePatchType).Resource("endpoints").Namespace(ns.Name).Name("patchendpoint").Body(json).Do().Get() } // Make sure patch doesn't get to CreateOnUpdate @@ -461,7 +462,7 @@ func TestSingleWatch(t *testing.T) { mkEvent := func(i int) *v1.Event { name := fmt.Sprintf("event-%v", i) return &v1.Event{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: ns.Name, Name: name, }, @@ -546,7 +547,7 @@ func TestMultiWatch(t *testing.T) { dummyEvent := func(i int) *v1.Event { name := fmt.Sprintf("unrelated-%v", i) return &v1.Event{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: fmt.Sprintf("%v.%x", name, time.Now().UnixNano()), Namespace: ns.Name, }, @@ -571,7 +572,7 @@ func TestMultiWatch(t *testing.T) { watchesStarted.Add(1) name := fmt.Sprintf("multi-watch-%v", i) got, err := client.Core().Pods(ns.Name).Create(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Labels: labels.Set{"watchlabel": name}, }, @@ -587,7 +588,7 @@ func TestMultiWatch(t *testing.T) { t.Fatalf("Couldn't make %v: %v", name, err) } go func(name, rv string) { - options := v1.ListOptions{ + options := metav1.ListOptions{ LabelSelector: labels.Set{"watchlabel": name}.AsSelector().String(), ResourceVersion: rv, } @@ -678,7 +679,7 @@ func TestMultiWatch(t *testing.T) { } name := fmt.Sprintf("unrelated-%v", i) _, err := client.Core().Pods(ns.Name).Create(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, }, Spec: v1.PodSpec{ @@ -742,7 +743,7 @@ func TestMultiWatch(t *testing.T) { func runSelfLinkTestOnNamespace(t *testing.T, c clientset.Interface, namespace string) { podBody := v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "selflinktest", Namespace: namespace, Labels: map[string]string{ @@ -763,7 +764,7 @@ func runSelfLinkTestOnNamespace(t *testing.T, c clientset.Interface, namespace s t.Errorf("Failed listing pod with supplied self link '%v': %v", pod.SelfLink, err) } - podList, err := c.Core().Pods(namespace).List(v1.ListOptions{}) + podList, err := c.Core().Pods(namespace).List(metav1.ListOptions{}) if err != nil { t.Errorf("Failed listing pods: %v", err) } diff --git a/vendor/k8s.io/kubernetes/test/integration/client/dynamic_client_test.go b/vendor/k8s.io/kubernetes/test/integration/client/dynamic_client_test.go index 07e1dc4a..c48b1e7e 100644 --- a/vendor/k8s.io/kubernetes/test/integration/client/dynamic_client_test.go +++ b/vendor/k8s.io/kubernetes/test/integration/client/dynamic_client_test.go @@ -25,11 +25,11 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/typed/dynamic" "k8s.io/kubernetes/test/integration/framework" ) @@ -74,7 +74,7 @@ func TestDynamicClient(t *testing.T) { // Create a Pod with the normal client pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ GenerateName: "test", }, Spec: v1.PodSpec{ @@ -93,7 +93,7 @@ func TestDynamicClient(t *testing.T) { } // check dynamic list - obj, err := dynamicClient.Resource(&resource, ns.Name).List(&v1.ListOptions{}) + obj, err := dynamicClient.Resource(&resource, ns.Name).List(&metav1.ListOptions{}) unstructuredList, ok := obj.(*unstructured.UnstructuredList) if !ok { t.Fatalf("expected *unstructured.UnstructuredList, got %#v", obj) @@ -136,7 +136,7 @@ func TestDynamicClient(t *testing.T) { t.Fatalf("unexpected error when deleting pod: %v", err) } - list, err := client.Core().Pods(ns.Name).List(v1.ListOptions{}) + list, err := client.Core().Pods(ns.Name).List(metav1.ListOptions{}) if err != nil { t.Fatalf("unexpected error when listing pods: %v", err) } diff --git a/vendor/k8s.io/kubernetes/test/integration/configmap/configmap_test.go b/vendor/k8s.io/kubernetes/test/integration/configmap/configmap_test.go index ba059c39..cc826a54 100644 --- a/vendor/k8s.io/kubernetes/test/integration/configmap/configmap_test.go +++ b/vendor/k8s.io/kubernetes/test/integration/configmap/configmap_test.go @@ -23,10 +23,11 @@ package configmap import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/test/integration" "k8s.io/kubernetes/test/integration/framework" ) @@ -46,7 +47,7 @@ func TestConfigMap(t *testing.T) { func DoTestConfigMap(t *testing.T, client clientset.Interface, ns *v1.Namespace) { cfg := v1.ConfigMap{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "configmap", Namespace: ns.Name, }, @@ -63,7 +64,7 @@ func DoTestConfigMap(t *testing.T, client clientset.Interface, ns *v1.Namespace) defer deleteConfigMapOrErrorf(t, client, cfg.Namespace, cfg.Name) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "XXX", Namespace: ns.Name, }, diff --git a/vendor/k8s.io/kubernetes/test/integration/evictions/evictions_test.go b/vendor/k8s.io/kubernetes/test/integration/evictions/evictions_test.go index 0b27b074..b8ca98fa 100644 --- a/vendor/k8s.io/kubernetes/test/integration/evictions/evictions_test.go +++ b/vendor/k8s.io/kubernetes/test/integration/evictions/evictions_test.go @@ -30,11 +30,11 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" utilerrors "k8s.io/apimachinery/pkg/util/errors" "k8s.io/apimachinery/pkg/util/wait" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/apis/policy/v1beta1" "k8s.io/kubernetes/pkg/client/cache" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/controller/disruption" "k8s.io/kubernetes/pkg/controller/informers" "k8s.io/kubernetes/pkg/util/intstr" @@ -68,7 +68,7 @@ func TestConcurrentEvictionRequests(t *testing.T) { } var gracePeriodSeconds int64 = 30 - deleteOption := &v1.DeleteOptions{ + deleteOption := &metav1.DeleteOptions{ GracePeriodSeconds: &gracePeriodSeconds, } @@ -169,7 +169,7 @@ func TestConcurrentEvictionRequests(t *testing.T) { func newPod(podName string) *v1.Pod { return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, Labels: map[string]string{"app": "test-evictions"}, }, @@ -198,7 +198,7 @@ func addPodConditionReady(pod *v1.Pod) { func newPDB() *v1beta1.PodDisruptionBudget { return &v1beta1.PodDisruptionBudget{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test-pdb", }, Spec: v1beta1.PodDisruptionBudgetSpec{ @@ -213,13 +213,13 @@ func newPDB() *v1beta1.PodDisruptionBudget { } } -func newEviction(ns, evictionName string, deleteOption *v1.DeleteOptions) *v1beta1.Eviction { +func newEviction(ns, evictionName string, deleteOption *metav1.DeleteOptions) *v1beta1.Eviction { return &v1beta1.Eviction{ TypeMeta: metav1.TypeMeta{ APIVersion: "Policy/v1beta1", Kind: "Eviction", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: evictionName, Namespace: ns, }, diff --git a/vendor/k8s.io/kubernetes/test/integration/federation/BUILD b/vendor/k8s.io/kubernetes/test/integration/federation/BUILD index 20435db1..d4c17139 100644 --- a/vendor/k8s.io/kubernetes/test/integration/federation/BUILD +++ b/vendor/k8s.io/kubernetes/test/integration/federation/BUILD @@ -16,6 +16,7 @@ go_test( "//federation/cmd/federation-apiserver/app:go_default_library", "//federation/cmd/federation-apiserver/app/options:go_default_library", "//pkg/api/v1:go_default_library", + "//pkg/apis/autoscaling/v1:go_default_library", "//pkg/apis/batch/v1:go_default_library", "//pkg/apis/extensions/v1beta1:go_default_library", "//vendor:github.com/stretchr/testify/assert", diff --git a/vendor/k8s.io/kubernetes/test/integration/federation/server_test.go b/vendor/k8s.io/kubernetes/test/integration/federation/server_test.go index cc6469a5..15ecfc1f 100644 --- a/vendor/k8s.io/kubernetes/test/integration/federation/server_test.go +++ b/vendor/k8s.io/kubernetes/test/integration/federation/server_test.go @@ -33,6 +33,7 @@ import ( "k8s.io/kubernetes/federation/cmd/federation-apiserver/app" "k8s.io/kubernetes/federation/cmd/federation-apiserver/app/options" "k8s.io/kubernetes/pkg/api/v1" + autoscaling_v1 "k8s.io/kubernetes/pkg/apis/autoscaling/v1" batch_v1 "k8s.io/kubernetes/pkg/apis/batch/v1" ext_v1b1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" ) @@ -44,6 +45,7 @@ var groupVersions = []schema.GroupVersion{ fed_v1b1.SchemeGroupVersion, ext_v1b1.SchemeGroupVersion, batch_v1.SchemeGroupVersion, + autoscaling_v1.SchemeGroupVersion, } func TestRun(t *testing.T) { @@ -214,6 +216,7 @@ func testAPIResourceList(t *testing.T) { testCoreResourceList(t) testExtensionsResourceList(t) testBatchResourceList(t) + testAutoscalingResourceList(t) } func testFederationResourceList(t *testing.T) { @@ -373,3 +376,29 @@ func testBatchResourceList(t *testing.T) { assert.NotNil(t, found) assert.True(t, found.Namespaced) } + +func testAutoscalingResourceList(t *testing.T) { + serverURL := serverIP + "/apis/" + autoscaling_v1.SchemeGroupVersion.String() + contents, err := readResponse(serverURL) + if err != nil { + t.Fatalf("%v", err) + } + var apiResourceList metav1.APIResourceList + err = json.Unmarshal(contents, &apiResourceList) + if err != nil { + t.Fatalf("Error in unmarshalling response from server %s: %v", serverURL, err) + } + // empty APIVersion for extensions group + assert.Equal(t, "v1", apiResourceList.APIVersion) + assert.Equal(t, autoscaling_v1.SchemeGroupVersion.String(), apiResourceList.GroupVersion) + // Assert that there are exactly this number of resources. + assert.Equal(t, 2, len(apiResourceList.APIResources)) + + // Verify hpa + found := findResource(apiResourceList.APIResources, "horizontalpodautoscalers") + assert.NotNil(t, found) + assert.True(t, found.Namespaced) + found = findResource(apiResourceList.APIResources, "horizontalpodautoscalers/status") + assert.NotNil(t, found) + assert.True(t, found.Namespaced) +} diff --git a/vendor/k8s.io/kubernetes/test/integration/framework/BUILD b/vendor/k8s.io/kubernetes/test/integration/framework/BUILD index fbe923f1..8c304e96 100644 --- a/vendor/k8s.io/kubernetes/test/integration/framework/BUILD +++ b/vendor/k8s.io/kubernetes/test/integration/framework/BUILD @@ -23,7 +23,7 @@ go_library( "//pkg/apis/apps/v1beta1:go_default_library", "//pkg/apis/autoscaling/v1:go_default_library", "//pkg/apis/batch:go_default_library", - "//pkg/apis/certificates/v1alpha1:go_default_library", + "//pkg/apis/certificates/v1beta1:go_default_library", "//pkg/apis/extensions/v1beta1:go_default_library", "//pkg/apis/policy/v1alpha1:go_default_library", "//pkg/apis/rbac/v1alpha1:go_default_library", @@ -32,13 +32,12 @@ go_library( "//pkg/client/clientset_generated/clientset/typed/core/v1:go_default_library", "//pkg/client/clientset_generated/internalclientset:go_default_library", "//pkg/client/record:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/controller:go_default_library", "//pkg/controller/replication:go_default_library", "//pkg/generated/openapi:go_default_library", - "//pkg/genericapiserver:go_default_library", "//pkg/genericapiserver/authenticator:go_default_library", "//pkg/genericapiserver/authorizer:go_default_library", + "//pkg/genericapiserver/server:go_default_library", "//pkg/kubectl:go_default_library", "//pkg/kubelet/client:go_default_library", "//pkg/master:go_default_library", @@ -62,6 +61,7 @@ go_library( "//vendor:k8s.io/apiserver/pkg/authentication/user", "//vendor:k8s.io/apiserver/pkg/authorization/authorizer", "//vendor:k8s.io/apiserver/pkg/authorization/union", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/test/integration/framework/master_utils.go b/vendor/k8s.io/kubernetes/test/integration/framework/master_utils.go index 978367b4..f803c80e 100644 --- a/vendor/k8s.io/kubernetes/test/integration/framework/master_utils.go +++ b/vendor/k8s.io/kubernetes/test/integration/framework/master_utils.go @@ -37,13 +37,14 @@ import ( "k8s.io/apiserver/pkg/authentication/user" authauthorizer "k8s.io/apiserver/pkg/authorization/authorizer" authorizerunion "k8s.io/apiserver/pkg/authorization/union" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" "k8s.io/kubernetes/pkg/api/v1" apps "k8s.io/kubernetes/pkg/apis/apps/v1beta1" autoscaling "k8s.io/kubernetes/pkg/apis/autoscaling/v1" "k8s.io/kubernetes/pkg/apis/batch" - certificates "k8s.io/kubernetes/pkg/apis/certificates/v1alpha1" + certificates "k8s.io/kubernetes/pkg/apis/certificates/v1beta1" extensions "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" policy "k8s.io/kubernetes/pkg/apis/policy/v1alpha1" rbac "k8s.io/kubernetes/pkg/apis/rbac/v1alpha1" @@ -52,13 +53,12 @@ import ( coreclient "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" "k8s.io/kubernetes/pkg/client/record" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/controller" replicationcontroller "k8s.io/kubernetes/pkg/controller/replication" "k8s.io/kubernetes/pkg/generated/openapi" - "k8s.io/kubernetes/pkg/genericapiserver" "k8s.io/kubernetes/pkg/genericapiserver/authenticator" "k8s.io/kubernetes/pkg/genericapiserver/authorizer" + genericapiserver "k8s.io/kubernetes/pkg/genericapiserver/server" "k8s.io/kubernetes/pkg/kubectl" kubeletclient "k8s.io/kubernetes/pkg/kubelet/client" "k8s.io/kubernetes/pkg/master" @@ -267,7 +267,7 @@ func startMasterOrDie(masterConfig *master.Config, incomingServer *httptest.Serv if masterConfig.EnableCoreControllers { // TODO Once /healthz is updated for posthooks, we'll wait for good health coreClient := coreclient.NewForConfigOrDie(&cfg) - svcWatch, err := coreClient.Services(v1.NamespaceDefault).Watch(v1.ListOptions{}) + svcWatch, err := coreClient.Services(metav1.NamespaceDefault).Watch(metav1.ListOptions{}) if err != nil { glog.Fatal(err) } @@ -403,7 +403,7 @@ func CreateTestingNamespace(baseName string, apiserver *httptest.Server, t *test // Currently we neither create the namespace nor delete all its contents at the end. // But as long as tests are not using the same namespaces, this should work fine. return &v1.Namespace{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ // TODO: Once we start creating namespaces, switch to GenerateName. Name: baseName, }, diff --git a/vendor/k8s.io/kubernetes/test/integration/framework/perf_utils.go b/vendor/k8s.io/kubernetes/test/integration/framework/perf_utils.go index 904265f8..d4f15c90 100644 --- a/vendor/k8s.io/kubernetes/test/integration/framework/perf_utils.go +++ b/vendor/k8s.io/kubernetes/test/integration/framework/perf_utils.go @@ -17,6 +17,7 @@ limitations under the License. package framework import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" @@ -52,7 +53,7 @@ func (p *IntegrationTestNodePreparer) PrepareNodes() error { glog.Infof("Making %d nodes", numNodes) baseNode := &v1.Node{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ GenerateName: p.nodeNamePrefix, }, Spec: v1.NodeSpec{ @@ -95,7 +96,7 @@ func (p *IntegrationTestNodePreparer) PrepareNodes() error { func (p *IntegrationTestNodePreparer) CleanupNodes() error { nodes := e2eframework.GetReadySchedulableNodesOrDie(p.client) for i := range nodes.Items { - if err := p.client.Core().Nodes().Delete(nodes.Items[i].Name, &v1.DeleteOptions{}); err != nil { + if err := p.client.Core().Nodes().Delete(nodes.Items[i].Name, &metav1.DeleteOptions{}); err != nil { glog.Errorf("Error while deleting Node: %v", err) } } diff --git a/vendor/k8s.io/kubernetes/test/integration/garbagecollector/garbage_collector_test.go b/vendor/k8s.io/kubernetes/test/integration/garbagecollector/garbage_collector_test.go index 1c7342b2..85018541 100644 --- a/vendor/k8s.io/kubernetes/test/integration/garbagecollector/garbage_collector_test.go +++ b/vendor/k8s.io/kubernetes/test/integration/garbagecollector/garbage_collector_test.go @@ -34,10 +34,10 @@ import ( "k8s.io/apimachinery/pkg/runtime/serializer" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/wait" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/typed/discovery" "k8s.io/kubernetes/pkg/client/typed/dynamic" "k8s.io/kubernetes/pkg/controller/garbagecollector" @@ -46,14 +46,14 @@ import ( "k8s.io/kubernetes/test/integration/framework" ) -func getOrphanOptions() *v1.DeleteOptions { +func getOrphanOptions() *metav1.DeleteOptions { var trueVar = true - return &v1.DeleteOptions{OrphanDependents: &trueVar} + return &metav1.DeleteOptions{OrphanDependents: &trueVar} } -func getNonOrphanOptions() *v1.DeleteOptions { +func getNonOrphanOptions() *metav1.DeleteOptions { var falseVar = false - return &v1.DeleteOptions{OrphanDependents: &falseVar} + return &metav1.DeleteOptions{OrphanDependents: &falseVar} } const garbageCollectedPodName = "test.pod.1" @@ -74,7 +74,7 @@ func newPod(podName, podNamespace string, ownerReferences []metav1.OwnerReferenc Kind: "Pod", APIVersion: "v1", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, Namespace: podNamespace, OwnerReferences: ownerReferences, @@ -96,14 +96,14 @@ func newOwnerRC(name, namespace string) *v1.ReplicationController { Kind: "ReplicationController", APIVersion: "v1", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: namespace, Name: name, }, Spec: v1.ReplicationControllerSpec{ Selector: map[string]string{"name": "test"}, Template: &v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"name": "test"}, }, Spec: v1.PodSpec{ @@ -172,7 +172,7 @@ func TestCascadingDeletion(t *testing.T) { t.Fatalf("Failed to create replication controller: %v", err) } - rcs, err := rcClient.List(v1.ListOptions{}) + rcs, err := rcClient.List(metav1.ListOptions{}) if err != nil { t.Fatalf("Failed to list replication controllers: %v", err) } @@ -205,7 +205,7 @@ func TestCascadingDeletion(t *testing.T) { } // set up watch - pods, err := podClient.List(v1.ListOptions{}) + pods, err := podClient.List(metav1.ListOptions{}) if err != nil { t.Fatalf("Failed to list pods: %v", err) } @@ -257,7 +257,7 @@ func TestCreateWithNonExistentOwner(t *testing.T) { } // set up watch - pods, err := podClient.List(v1.ListOptions{}) + pods, err := podClient.List(metav1.ListOptions{}) if err != nil { t.Fatalf("Failed to list pods: %v", err) } @@ -273,7 +273,7 @@ func TestCreateWithNonExistentOwner(t *testing.T) { } } -func setupRCsPods(t *testing.T, gc *garbagecollector.GarbageCollector, clientSet clientset.Interface, nameSuffix, namespace string, initialFinalizers []string, options *v1.DeleteOptions, wg *sync.WaitGroup, rcUIDs chan types.UID) { +func setupRCsPods(t *testing.T, gc *garbagecollector.GarbageCollector, clientSet clientset.Interface, nameSuffix, namespace string, initialFinalizers []string, options *metav1.DeleteOptions, wg *sync.WaitGroup, rcUIDs chan types.UID) { defer wg.Done() rcClient := clientSet.Core().ReplicationControllers(namespace) podClient := clientSet.Core().Pods(namespace) @@ -313,7 +313,7 @@ func setupRCsPods(t *testing.T, gc *garbagecollector.GarbageCollector, clientSet func verifyRemainingObjects(t *testing.T, clientSet clientset.Interface, namespace string, rcNum, podNum int) (bool, error) { rcClient := clientSet.Core().ReplicationControllers(namespace) podClient := clientSet.Core().Pods(namespace) - pods, err := podClient.List(v1.ListOptions{}) + pods, err := podClient.List(metav1.ListOptions{}) if err != nil { return false, fmt.Errorf("Failed to list pods: %v", err) } @@ -322,7 +322,7 @@ func verifyRemainingObjects(t *testing.T, clientSet clientset.Interface, namespa ret = false t.Logf("expect %d pods, got %d pods", podNum, len(pods.Items)) } - rcs, err := rcClient.List(v1.ListOptions{}) + rcs, err := rcClient.List(metav1.ListOptions{}) if err != nil { return false, fmt.Errorf("Failed to list replication controllers: %v", err) } @@ -377,7 +377,7 @@ func TestStressingCascadingDeletion(t *testing.T) { // verify the remaining pods all have "orphan" in their names. podClient := clientSet.Core().Pods(ns.Name) - pods, err := podClient.List(v1.ListOptions{}) + pods, err := podClient.List(metav1.ListOptions{}) if err != nil { t.Fatal(err) } @@ -454,7 +454,7 @@ func TestOrphaning(t *testing.T) { } // verify the toBeDeleteRC is deleted if err := wait.PollImmediate(5*time.Second, 30*time.Second, func() (bool, error) { - rcs, err := rcClient.List(v1.ListOptions{}) + rcs, err := rcClient.List(metav1.ListOptions{}) if err != nil { return false, err } @@ -468,7 +468,7 @@ func TestOrphaning(t *testing.T) { } // verify pods don't have the ownerPod as an owner anymore - pods, err := podClient.List(v1.ListOptions{}) + pods, err := podClient.List(metav1.ListOptions{}) if err != nil { t.Fatalf("Failed to list pods: %v", err) } diff --git a/vendor/k8s.io/kubernetes/test/integration/kubectl/kubectl_test.go b/vendor/k8s.io/kubernetes/test/integration/kubectl/kubectl_test.go index 0918a22c..f1202b31 100644 --- a/vendor/k8s.io/kubernetes/test/integration/kubectl/kubectl_test.go +++ b/vendor/k8s.io/kubernetes/test/integration/kubectl/kubectl_test.go @@ -21,8 +21,8 @@ package kubectl import ( "testing" - "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" - clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api" + "k8s.io/client-go/tools/clientcmd" + clientcmdapi "k8s.io/client-go/tools/clientcmd/api" "k8s.io/kubernetes/pkg/kubectl/cmd/util" "k8s.io/kubernetes/test/integration/framework" ) diff --git a/vendor/k8s.io/kubernetes/test/integration/master/master_benchmark_test.go b/vendor/k8s.io/kubernetes/test/integration/master/master_benchmark_test.go index 4441910e..56b290dc 100644 --- a/vendor/k8s.io/kubernetes/test/integration/master/master_benchmark_test.go +++ b/vendor/k8s.io/kubernetes/test/integration/master/master_benchmark_test.go @@ -26,10 +26,11 @@ import ( "time" "github.com/golang/glog" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/kubernetes/pkg/api" clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" - "k8s.io/kubernetes/pkg/fields" "k8s.io/kubernetes/test/integration/framework" ) @@ -137,7 +138,7 @@ func BenchmarkPodList(b *testing.B) { defer func() { glog.V(3).Infof("Worker %d: Node %v listing pods took %v", id, host, time.Since(now)) }() - if pods, err := m.ClientSet.Core().Pods(ns.Name).List(api.ListOptions{ + if pods, err := m.ClientSet.Core().Pods(ns.Name).List(metav1.ListOptions{ LabelSelector: labels.Everything(), FieldSelector: fields.OneTermEqualSelector(api.PodHostField, host), }); err != nil { @@ -180,7 +181,7 @@ func BenchmarkPodListEtcd(b *testing.B) { defer func() { glog.V(3).Infof("Worker %d: listing pods took %v", id, time.Since(now)) }() - pods, err := m.ClientSet.Core().Pods(ns.Name).List(api.ListOptions{ + pods, err := m.ClientSet.Core().Pods(ns.Name).List(metav1.ListOptions{ LabelSelector: labels.Everything(), FieldSelector: fields.Everything(), }) diff --git a/vendor/k8s.io/kubernetes/test/integration/master/master_test.go b/vendor/k8s.io/kubernetes/test/integration/master/master_test.go index 7886e23f..63aded0e 100644 --- a/vendor/k8s.io/kubernetes/test/integration/master/master_test.go +++ b/vendor/k8s.io/kubernetes/test/integration/master/master_test.go @@ -36,12 +36,12 @@ import ( "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/wait" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" "k8s.io/kubernetes/pkg/api/v1" clienttypedv1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1" clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/test/integration" "k8s.io/kubernetes/test/integration/framework" ) @@ -162,9 +162,9 @@ func TestAutoscalingGroupBackwardCompatibility(t *testing.T) { expectedStatusCodes map[int]bool expectedVersion string }{ - {"POST", autoscalingPath("horizontalpodautoscalers", api.NamespaceDefault, ""), hpaV1, integration.Code201, ""}, - {"GET", autoscalingPath("horizontalpodautoscalers", api.NamespaceDefault, ""), "", integration.Code200, testapi.Autoscaling.GroupVersion().String()}, - {"GET", extensionsPath("horizontalpodautoscalers", api.NamespaceDefault, ""), "", integration.Code200, testapi.Extensions.GroupVersion().String()}, + {"POST", autoscalingPath("horizontalpodautoscalers", metav1.NamespaceDefault, ""), hpaV1, integration.Code201, ""}, + {"GET", autoscalingPath("horizontalpodautoscalers", metav1.NamespaceDefault, ""), "", integration.Code200, testapi.Autoscaling.GroupVersion().String()}, + {"GET", extensionsPath("horizontalpodautoscalers", metav1.NamespaceDefault, ""), "", integration.Code200, testapi.Extensions.GroupVersion().String()}, } for _, r := range requests { @@ -281,7 +281,7 @@ func TestMasterService(t *testing.T) { client := clientset.NewForConfigOrDie(&restclient.Config{Host: s.URL, ContentConfig: restclient.ContentConfig{GroupVersion: &api.Registry.GroupOrDie(api.GroupName).GroupVersion}}) err := wait.Poll(time.Second, time.Minute, func() (bool, error) { - svcList, err := client.Core().Services(api.NamespaceDefault).List(api.ListOptions{}) + svcList, err := client.Core().Services(metav1.NamespaceDefault).List(metav1.ListOptions{}) if err != nil { t.Errorf("unexpected error: %v", err) return false, nil @@ -294,7 +294,7 @@ func TestMasterService(t *testing.T) { } } if found { - ep, err := client.Core().Endpoints(api.NamespaceDefault).Get("kubernetes", metav1.GetOptions{}) + ep, err := client.Core().Endpoints(metav1.NamespaceDefault).Get("kubernetes", metav1.GetOptions{}) if err != nil { return false, nil } @@ -324,7 +324,7 @@ func TestServiceAlloc(t *testing.T) { svc := func(i int) *api.Service { return &api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: fmt.Sprintf("svc-%v", i), }, Spec: api.ServiceSpec{ @@ -338,7 +338,7 @@ func TestServiceAlloc(t *testing.T) { // Wait until the default "kubernetes" service is created. if err = wait.Poll(250*time.Millisecond, time.Minute, func() (bool, error) { - _, err := client.Core().Services(api.NamespaceDefault).Get("kubernetes", metav1.GetOptions{}) + _, err := client.Core().Services(metav1.NamespaceDefault).Get("kubernetes", metav1.GetOptions{}) if err != nil && !errors.IsNotFound(err) { return false, err } @@ -349,18 +349,18 @@ func TestServiceAlloc(t *testing.T) { // make 5 more services to take up all IPs for i := 0; i < 5; i++ { - if _, err := client.Core().Services(api.NamespaceDefault).Create(svc(i)); err != nil { + if _, err := client.Core().Services(metav1.NamespaceDefault).Create(svc(i)); err != nil { t.Error(err) } } // Make another service. It will fail because we're out of cluster IPs - if _, err := client.Core().Services(api.NamespaceDefault).Create(svc(8)); err != nil { + if _, err := client.Core().Services(metav1.NamespaceDefault).Create(svc(8)); err != nil { if !strings.Contains(err.Error(), "range is full") { t.Errorf("unexpected error text: %v", err) } } else { - svcs, err := client.Core().Services(api.NamespaceAll).List(api.ListOptions{}) + svcs, err := client.Core().Services(metav1.NamespaceAll).List(metav1.ListOptions{}) if err != nil { t.Fatalf("unexpected success, and error getting the services: %v", err) } @@ -372,12 +372,12 @@ func TestServiceAlloc(t *testing.T) { } // Delete the first service. - if err := client.Core().Services(api.NamespaceDefault).Delete(svc(1).ObjectMeta.Name, nil); err != nil { + if err := client.Core().Services(metav1.NamespaceDefault).Delete(svc(1).ObjectMeta.Name, nil); err != nil { t.Fatalf("got unexpected error: %v", err) } // This time creating the second service should work. - if _, err := client.Core().Services(api.NamespaceDefault).Create(svc(8)); err != nil { + if _, err := client.Core().Services(metav1.NamespaceDefault).Create(svc(8)); err != nil { t.Fatalf("got unexpected error: %v", err) } } @@ -408,7 +408,7 @@ func TestUpdateNodeObjects(t *testing.T) { for i := 0; i < nodes*6; i++ { c.Nodes().Delete(fmt.Sprintf("node-%d", i), nil) _, err := c.Nodes().Create(&v1.Node{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: fmt.Sprintf("node-%d", i), }, }) @@ -420,7 +420,7 @@ func TestUpdateNodeObjects(t *testing.T) { for k := 0; k < listers; k++ { go func(lister int) { for i := 0; i < iterations; i++ { - _, err := c.Nodes().List(v1.ListOptions{}) + _, err := c.Nodes().List(metav1.ListOptions{}) if err != nil { fmt.Printf("[list:%d] error after %d: %v\n", lister, i, err) break @@ -432,7 +432,7 @@ func TestUpdateNodeObjects(t *testing.T) { for k := 0; k < watchers; k++ { go func(lister int) { - w, err := c.Nodes().Watch(v1.ListOptions{}) + w, err := c.Nodes().Watch(metav1.ListOptions{}) if err != nil { fmt.Printf("[watch:%d] error: %v", k, err) return @@ -462,14 +462,14 @@ func TestUpdateNodeObjects(t *testing.T) { fmt.Printf("[%d] iteration %d ...\n", node, i) } if i%20 == 0 { - _, err := c.Nodes().List(v1.ListOptions{}) + _, err := c.Nodes().List(metav1.ListOptions{}) if err != nil { fmt.Printf("[%d] error after %d: %v\n", node, i, err) break } } - r, err := c.Nodes().List(v1.ListOptions{ + r, err := c.Nodes().List(metav1.ListOptions{ FieldSelector: fmt.Sprintf("metadata.name=node-%d", node), ResourceVersion: "0", }) diff --git a/vendor/k8s.io/kubernetes/test/integration/metrics/metrics_test.go b/vendor/k8s.io/kubernetes/test/integration/metrics/metrics_test.go index 305c8fb3..bb7b76f5 100644 --- a/vendor/k8s.io/kubernetes/test/integration/metrics/metrics_test.go +++ b/vendor/k8s.io/kubernetes/test/integration/metrics/metrics_test.go @@ -25,10 +25,11 @@ import ( "net/http/httptest" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/test/integration/framework" "github.com/golang/glog" @@ -109,7 +110,7 @@ func TestApiserverMetrics(t *testing.T) { // Make a request to the apiserver to ensure there's at least one data point // for the metrics we're expecting -- otherwise, they won't be exported. client := clientset.NewForConfigOrDie(&restclient.Config{Host: s.URL, ContentConfig: restclient.ContentConfig{GroupVersion: &api.Registry.GroupOrDie(v1.GroupName).GroupVersion}}) - if _, err := client.Core().Pods(v1.NamespaceDefault).List(v1.ListOptions{}); err != nil { + if _, err := client.Core().Pods(metav1.NamespaceDefault).List(metav1.ListOptions{}); err != nil { t.Fatalf("unexpected error getting pods: %v", err) } diff --git a/vendor/k8s.io/kubernetes/test/integration/objectmeta/BUILD b/vendor/k8s.io/kubernetes/test/integration/objectmeta/BUILD index 14c2391f..9fe6eb85 100644 --- a/vendor/k8s.io/kubernetes/test/integration/objectmeta/BUILD +++ b/vendor/k8s.io/kubernetes/test/integration/objectmeta/BUILD @@ -15,9 +15,10 @@ go_test( "//pkg/api:go_default_library", "//pkg/api/v1:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", - "//pkg/client/restclient:go_default_library", "//test/integration/framework:go_default_library", "//vendor:github.com/stretchr/testify/assert", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/test/integration/objectmeta/objectmeta_test.go b/vendor/k8s.io/kubernetes/test/integration/objectmeta/objectmeta_test.go index c9ba5a5a..bc3460c7 100644 --- a/vendor/k8s.io/kubernetes/test/integration/objectmeta/objectmeta_test.go +++ b/vendor/k8s.io/kubernetes/test/integration/objectmeta/objectmeta_test.go @@ -21,10 +21,11 @@ import ( "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/test/integration/framework" ) @@ -35,7 +36,7 @@ func TestIgnoreClusterName(t *testing.T) { client := clientset.NewForConfigOrDie(&restclient.Config{Host: s.URL, ContentConfig: restclient.ContentConfig{GroupVersion: &api.Registry.GroupOrDie(v1.GroupName).GroupVersion}}) ns := v1.Namespace{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test-namespace", ClusterName: "cluster-name-to-ignore", }, diff --git a/vendor/k8s.io/kubernetes/test/integration/openshift/BUILD b/vendor/k8s.io/kubernetes/test/integration/openshift/BUILD index f8d4a810..3580c545 100644 --- a/vendor/k8s.io/kubernetes/test/integration/openshift/BUILD +++ b/vendor/k8s.io/kubernetes/test/integration/openshift/BUILD @@ -12,7 +12,7 @@ go_test( srcs = ["openshift_test.go"], tags = ["automanaged"], deps = [ - "//pkg/genericapiserver:go_default_library", + "//pkg/genericapiserver/server:go_default_library", "//pkg/master:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/test/integration/openshift/openshift_test.go b/vendor/k8s.io/kubernetes/test/integration/openshift/openshift_test.go index 1f1137ad..0502889b 100644 --- a/vendor/k8s.io/kubernetes/test/integration/openshift/openshift_test.go +++ b/vendor/k8s.io/kubernetes/test/integration/openshift/openshift_test.go @@ -19,7 +19,7 @@ package openshift import ( "testing" - "k8s.io/kubernetes/pkg/genericapiserver" + genericapiserver "k8s.io/kubernetes/pkg/genericapiserver/server" "k8s.io/kubernetes/pkg/master" ) diff --git a/vendor/k8s.io/kubernetes/test/integration/pods/pods_test.go b/vendor/k8s.io/kubernetes/test/integration/pods/pods_test.go index 59b5d349..dd2bebcc 100644 --- a/vendor/k8s.io/kubernetes/test/integration/pods/pods_test.go +++ b/vendor/k8s.io/kubernetes/test/integration/pods/pods_test.go @@ -22,10 +22,11 @@ import ( "fmt" "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/test/integration" "k8s.io/kubernetes/test/integration/framework" ) @@ -48,7 +49,7 @@ func TestPodUpdateActiveDeadlineSeconds(t *testing.T) { prototypePod := func() *v1.Pod { return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "xxx", }, Spec: v1.PodSpec{ @@ -158,7 +159,7 @@ func TestPodReadOnlyFilesystem(t *testing.T) { client := clientset.NewForConfigOrDie(&restclient.Config{Host: s.URL, ContentConfig: restclient.ContentConfig{GroupVersion: &api.Registry.GroupOrDie(v1.GroupName).GroupVersion}}) pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "xxx", }, Spec: v1.PodSpec{ diff --git a/vendor/k8s.io/kubernetes/test/integration/quota/quota_test.go b/vendor/k8s.io/kubernetes/test/integration/quota/quota_test.go index 9eb7205c..c5b58ce1 100644 --- a/vendor/k8s.io/kubernetes/test/integration/quota/quota_test.go +++ b/vendor/k8s.io/kubernetes/test/integration/quota/quota_test.go @@ -25,21 +25,22 @@ import ( "testing" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/watch" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" "k8s.io/kubernetes/pkg/client/record" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/controller" "k8s.io/kubernetes/pkg/controller/informers" replicationcontroller "k8s.io/kubernetes/pkg/controller/replication" resourcequotacontroller "k8s.io/kubernetes/pkg/controller/resourcequota" - "k8s.io/kubernetes/pkg/fields" kubeadmission "k8s.io/kubernetes/pkg/kubeapiserver/admission" quotainstall "k8s.io/kubernetes/pkg/quota/install" "k8s.io/kubernetes/plugin/pkg/admission/resourcequota" @@ -111,7 +112,7 @@ func TestQuota(t *testing.T) { t.Logf("Took %v to scale up without quota", endTime.Sub(startTime)) quota := &v1.ResourceQuota{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "quota", Namespace: ns.Name, }, @@ -130,7 +131,7 @@ func TestQuota(t *testing.T) { } func waitForQuota(t *testing.T, quota *v1.ResourceQuota, clientset *clientset.Clientset) { - w, err := clientset.Core().ResourceQuotas(quota.Namespace).Watch(v1.SingleObject(v1.ObjectMeta{Name: quota.Name})) + w, err := clientset.Core().ResourceQuotas(quota.Namespace).Watch(metav1.SingleObject(metav1.ObjectMeta{Name: quota.Name})) if err != nil { t.Fatalf("unexpected error: %v", err) } @@ -163,7 +164,7 @@ func waitForQuota(t *testing.T, quota *v1.ResourceQuota, clientset *clientset.Cl func scale(t *testing.T, namespace string, clientset *clientset.Clientset) { target := int32(100) rc := &v1.ReplicationController{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: namespace, }, @@ -171,7 +172,7 @@ func scale(t *testing.T, namespace string, clientset *clientset.Clientset) { Replicas: &target, Selector: map[string]string{"foo": "bar"}, Template: &v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "foo": "bar", }, @@ -188,7 +189,7 @@ func scale(t *testing.T, namespace string, clientset *clientset.Clientset) { }, } - w, err := clientset.Core().ReplicationControllers(namespace).Watch(v1.SingleObject(v1.ObjectMeta{Name: rc.Name})) + w, err := clientset.Core().ReplicationControllers(namespace).Watch(metav1.SingleObject(metav1.ObjectMeta{Name: rc.Name})) if err != nil { t.Fatalf("unexpected error: %v", err) } @@ -215,7 +216,7 @@ func scale(t *testing.T, namespace string, clientset *clientset.Clientset) { return false, nil }) if err != nil { - pods, _ := clientset.Core().Pods(namespace).List(v1.ListOptions{LabelSelector: labels.Everything().String(), FieldSelector: fields.Everything().String()}) + pods, _ := clientset.Core().Pods(namespace).List(metav1.ListOptions{LabelSelector: labels.Everything().String(), FieldSelector: fields.Everything().String()}) t.Fatalf("unexpected error: %v, ended with %v pods", err, len(pods.Items)) } } diff --git a/vendor/k8s.io/kubernetes/test/integration/replicaset/replicaset_test.go b/vendor/k8s.io/kubernetes/test/integration/replicaset/replicaset_test.go index 30ad4c39..987d49be 100644 --- a/vendor/k8s.io/kubernetes/test/integration/replicaset/replicaset_test.go +++ b/vendor/k8s.io/kubernetes/test/integration/replicaset/replicaset_test.go @@ -26,13 +26,13 @@ import ( "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/kubernetes/pkg/api" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" "k8s.io/kubernetes/pkg/client/cache" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/controller/informers" "k8s.io/kubernetes/pkg/controller/replicaset" "k8s.io/kubernetes/test/integration/framework" @@ -49,7 +49,7 @@ func newRS(name, namespace string, replicas int) *v1beta1.ReplicaSet { Kind: "ReplicaSet", APIVersion: "extensions/v1beta1", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: namespace, Name: name, }, @@ -59,7 +59,7 @@ func newRS(name, namespace string, replicas int) *v1beta1.ReplicaSet { }, Replicas: &replicasCopy, Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: testLabels(), }, Spec: v1.PodSpec{ @@ -81,7 +81,7 @@ func newMatchingPod(podName, namespace string) *v1.Pod { Kind: "Pod", APIVersion: "v1", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, Namespace: namespace, Labels: testLabels(), @@ -106,7 +106,7 @@ func newMatchingPod(podName, namespace string) *v1.Pod { func verifyRemainingObjects(t *testing.T, clientSet clientset.Interface, namespace string, rsNum, podNum int) (bool, error) { rsClient := clientSet.Extensions().ReplicaSets(namespace) podClient := clientSet.Core().Pods(namespace) - pods, err := podClient.List(v1.ListOptions{}) + pods, err := podClient.List(metav1.ListOptions{}) if err != nil { return false, fmt.Errorf("Failed to list pods: %v", err) } @@ -115,7 +115,7 @@ func verifyRemainingObjects(t *testing.T, clientSet clientset.Interface, namespa ret = false t.Logf("expect %d pods, got %d pods", podNum, len(pods.Items)) } - rss, err := rsClient.List(v1.ListOptions{}) + rss, err := rsClient.List(metav1.ListOptions{}) if err != nil { return false, fmt.Errorf("Failed to list replica sets: %v", err) } @@ -320,7 +320,7 @@ func TestUpdateSelectorToAdopt(t *testing.T) { // change the rs's selector to match both pods patch := `{"spec":{"selector":{"matchLabels": {"uniqueKey":null}}}}` rsClient := clientSet.Extensions().ReplicaSets(ns.Name) - rs, err := rsClient.Patch(rs.Name, api.StrategicMergePatchType, []byte(patch)) + rs, err := rsClient.Patch(rs.Name, types.StrategicMergePatchType, []byte(patch)) if err != nil { t.Fatalf("Failed to patch replica set: %v", err) } @@ -359,7 +359,7 @@ func TestUpdateSelectorToRemoveControllerRef(t *testing.T) { // change the rs's selector to match both pods patch := `{"spec":{"selector":{"matchLabels": {"uniqueKey":"1"}},"template":{"metadata":{"labels":{"uniqueKey":"1"}}}}}` rsClient := clientSet.Extensions().ReplicaSets(ns.Name) - rs, err := rsClient.Patch(rs.Name, api.StrategicMergePatchType, []byte(patch)) + rs, err := rsClient.Patch(rs.Name, types.StrategicMergePatchType, []byte(patch)) if err != nil { t.Fatalf("Failed to patch replica set: %v", err) } @@ -403,7 +403,7 @@ func TestUpdateLabelToRemoveControllerRef(t *testing.T) { // change the rs's selector to match both pods patch := `{"metadata":{"labels":{"name":null}}}` podClient := clientSet.Core().Pods(ns.Name) - pod2, err := podClient.Patch(pod2.Name, api.StrategicMergePatchType, []byte(patch)) + pod2, err := podClient.Patch(pod2.Name, types.StrategicMergePatchType, []byte(patch)) if err != nil { t.Fatalf("Failed to patch pod2: %v", err) } @@ -451,7 +451,7 @@ func TestUpdateLabelToBeAdopted(t *testing.T) { // change the rs's selector to match both pods patch := `{"metadata":{"labels":{"uniqueKey":"1"}}}` podClient := clientSet.Core().Pods(ns.Name) - pod2, err := podClient.Patch(pod2.Name, api.StrategicMergePatchType, []byte(patch)) + pod2, err := podClient.Patch(pod2.Name, types.StrategicMergePatchType, []byte(patch)) if err != nil { t.Fatalf("Failed to patch pod2: %v", err) } diff --git a/vendor/k8s.io/kubernetes/test/integration/replicationcontroller/replicationcontroller_test.go b/vendor/k8s.io/kubernetes/test/integration/replicationcontroller/replicationcontroller_test.go index 47a6ddc7..c5aca792 100644 --- a/vendor/k8s.io/kubernetes/test/integration/replicationcontroller/replicationcontroller_test.go +++ b/vendor/k8s.io/kubernetes/test/integration/replicationcontroller/replicationcontroller_test.go @@ -26,12 +26,12 @@ import ( "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/kubernetes/pkg/api" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/cache" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/controller/informers" "k8s.io/kubernetes/pkg/controller/replication" "k8s.io/kubernetes/test/integration/framework" @@ -48,7 +48,7 @@ func newRC(name, namespace string, replicas int) *v1.ReplicationController { Kind: "ReplicationController", APIVersion: "v1", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: namespace, Name: name, }, @@ -56,7 +56,7 @@ func newRC(name, namespace string, replicas int) *v1.ReplicationController { Selector: testLabels(), Replicas: &replicasCopy, Template: &v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: testLabels(), }, Spec: v1.PodSpec{ @@ -78,7 +78,7 @@ func newMatchingPod(podName, namespace string) *v1.Pod { Kind: "Pod", APIVersion: "v1", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, Namespace: namespace, Labels: testLabels(), @@ -103,7 +103,7 @@ func newMatchingPod(podName, namespace string) *v1.Pod { func verifyRemainingObjects(t *testing.T, clientSet clientset.Interface, namespace string, rcNum, podNum int) (bool, error) { rcClient := clientSet.Core().ReplicationControllers(namespace) podClient := clientSet.Core().Pods(namespace) - pods, err := podClient.List(v1.ListOptions{}) + pods, err := podClient.List(metav1.ListOptions{}) if err != nil { return false, fmt.Errorf("Failed to list pods: %v", err) } @@ -112,7 +112,7 @@ func verifyRemainingObjects(t *testing.T, clientSet clientset.Interface, namespa ret = false t.Logf("expect %d pods, got %d pods", podNum, len(pods.Items)) } - rcs, err := rcClient.List(v1.ListOptions{}) + rcs, err := rcClient.List(metav1.ListOptions{}) if err != nil { return false, fmt.Errorf("Failed to list replication controllers: %v", err) } @@ -307,7 +307,7 @@ func TestUpdateSelectorToAdopt(t *testing.T) { // change the rc's selector to match both pods patch := `{"spec":{"selector":{"uniqueKey":null}}}` rcClient := clientSet.Core().ReplicationControllers(ns.Name) - rc, err := rcClient.Patch(rc.Name, api.StrategicMergePatchType, []byte(patch)) + rc, err := rcClient.Patch(rc.Name, types.StrategicMergePatchType, []byte(patch)) if err != nil { t.Fatalf("Failed to patch replication controller: %v", err) } @@ -344,7 +344,7 @@ func TestUpdateSelectorToRemoveControllerRef(t *testing.T) { // change the rc's selector to match both pods patch := `{"spec":{"selector":{"uniqueKey":"1"},"template":{"metadata":{"labels":{"uniqueKey":"1"}}}}}` rcClient := clientSet.Core().ReplicationControllers(ns.Name) - rc, err := rcClient.Patch(rc.Name, api.StrategicMergePatchType, []byte(patch)) + rc, err := rcClient.Patch(rc.Name, types.StrategicMergePatchType, []byte(patch)) if err != nil { t.Fatalf("Failed to patch replication controller: %v", err) } @@ -386,7 +386,7 @@ func TestUpdateLabelToRemoveControllerRef(t *testing.T) { // change the rc's selector to match both pods patch := `{"metadata":{"labels":{"name":null}}}` podClient := clientSet.Core().Pods(ns.Name) - pod2, err := podClient.Patch(pod2.Name, api.StrategicMergePatchType, []byte(patch)) + pod2, err := podClient.Patch(pod2.Name, types.StrategicMergePatchType, []byte(patch)) if err != nil { t.Fatalf("Failed to patch pod2: %v", err) } @@ -432,7 +432,7 @@ func TestUpdateLabelToBeAdopted(t *testing.T) { // change the rc's selector to match both pods patch := `{"metadata":{"labels":{"uniqueKey":"1"}}}` podClient := clientSet.Core().Pods(ns.Name) - pod2, err := podClient.Patch(pod2.Name, api.StrategicMergePatchType, []byte(patch)) + pod2, err := podClient.Patch(pod2.Name, types.StrategicMergePatchType, []byte(patch)) if err != nil { t.Fatalf("Failed to patch pod2: %v", err) } diff --git a/vendor/k8s.io/kubernetes/test/integration/scheduler/extender_test.go b/vendor/k8s.io/kubernetes/test/integration/scheduler/extender_test.go index 08ba421c..0fdeedc5 100644 --- a/vendor/k8s.io/kubernetes/test/integration/scheduler/extender_test.go +++ b/vendor/k8s.io/kubernetes/test/integration/scheduler/extender_test.go @@ -31,13 +31,13 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/wait" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" v1core "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1" "k8s.io/kubernetes/pkg/client/record" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/plugin/pkg/scheduler" _ "k8s.io/kubernetes/plugin/pkg/scheduler/algorithmprovider" schedulerapi "k8s.io/kubernetes/plugin/pkg/scheduler/api" @@ -256,7 +256,7 @@ func TestSchedulerExtender(t *testing.T) { func DoTestPodScheduling(ns *v1.Namespace, t *testing.T, cs clientset.Interface) { // NOTE: This test cannot run in parallel, because it is creating and deleting // non-namespaced objects (Nodes). - defer cs.Core().Nodes().DeleteCollection(nil, v1.ListOptions{}) + defer cs.Core().Nodes().DeleteCollection(nil, metav1.ListOptions{}) goodCondition := v1.NodeCondition{ Type: v1.NodeReady, @@ -282,7 +282,7 @@ func DoTestPodScheduling(ns *v1.Namespace, t *testing.T, cs clientset.Interface) } pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{Name: "extender-test-pod"}, + ObjectMeta: metav1.ObjectMeta{Name: "extender-test-pod"}, Spec: v1.PodSpec{ Containers: []v1.Container{{Name: "container", Image: e2e.GetPauseImageName(cs)}}, }, diff --git a/vendor/k8s.io/kubernetes/test/integration/scheduler/scheduler_test.go b/vendor/k8s.io/kubernetes/test/integration/scheduler/scheduler_test.go index 11c24b11..a3ecc414 100644 --- a/vendor/k8s.io/kubernetes/test/integration/scheduler/scheduler_test.go +++ b/vendor/k8s.io/kubernetes/test/integration/scheduler/scheduler_test.go @@ -28,6 +28,7 @@ import ( "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/wait" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" @@ -35,7 +36,6 @@ import ( "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" v1core "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1" "k8s.io/kubernetes/pkg/client/record" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/plugin/pkg/scheduler" _ "k8s.io/kubernetes/plugin/pkg/scheduler/algorithmprovider" "k8s.io/kubernetes/plugin/pkg/scheduler/factory" @@ -71,7 +71,7 @@ func TestUnschedulableNodes(t *testing.T) { defer close(schedulerConfig.StopEverything) - DoTestUnschedulableNodes(t, clientSet, ns, schedulerConfigFactory.NodeLister.Store) + DoTestUnschedulableNodes(t, clientSet, ns, schedulerConfigFactory.GetNodeStore()) } func podScheduled(c clientset.Interface, podNamespace, podName string) wait.ConditionFunc { @@ -123,7 +123,7 @@ func waitForReflection(t *testing.T, s cache.Store, key string, passFunc func(n func DoTestUnschedulableNodes(t *testing.T, cs clientset.Interface, ns *v1.Namespace, nodeStore cache.Store) { // NOTE: This test cannot run in parallel, because it is creating and deleting // non-namespaced objects (Nodes). - defer cs.Core().Nodes().DeleteCollection(nil, v1.ListOptions{}) + defer cs.Core().Nodes().DeleteCollection(nil, metav1.ListOptions{}) goodCondition := v1.NodeCondition{ Type: v1.NodeReady, @@ -140,7 +140,7 @@ func DoTestUnschedulableNodes(t *testing.T, cs clientset.Interface, ns *v1.Names // Create a new schedulable node, since we're first going to apply // the unschedulable condition and verify that pods aren't scheduled. node := &v1.Node{ - ObjectMeta: v1.ObjectMeta{Name: "node-scheduling-test-node"}, + ObjectMeta: metav1.ObjectMeta{Name: "node-scheduling-test-node"}, Spec: v1.NodeSpec{Unschedulable: false}, Status: v1.NodeStatus{ Capacity: v1.ResourceList{ @@ -246,7 +246,7 @@ func DoTestUnschedulableNodes(t *testing.T, cs clientset.Interface, ns *v1.Names // Create the new pod, note that this needs to happen post unschedulable // modification or we have a race in the test. pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{Name: "node-scheduling-test-pod"}, + ObjectMeta: metav1.ObjectMeta{Name: "node-scheduling-test-pod"}, Spec: v1.PodSpec{ Containers: []v1.Container{{Name: "container", Image: e2e.GetPauseImageName(cs)}}, }, @@ -282,7 +282,7 @@ func DoTestUnschedulableNodes(t *testing.T, cs clientset.Interface, ns *v1.Names t.Logf("Test %d: Pod got scheduled on a schedulable node", i) } - err = cs.Core().Pods(ns.Name).Delete(myPod.Name, v1.NewDeleteOptions(0)) + err = cs.Core().Pods(ns.Name).Delete(myPod.Name, metav1.NewDeleteOptions(0)) if err != nil { t.Errorf("Failed to delete pod: %v", err) } @@ -326,7 +326,7 @@ func TestMultiScheduler(t *testing.T) { // NOTE: This test cannot run in parallel, because it is creating and deleting // non-namespaced objects (Nodes). - defer clientSet.Core().Nodes().DeleteCollection(nil, v1.ListOptions{}) + defer clientSet.Core().Nodes().DeleteCollection(nil, metav1.ListOptions{}) schedulerConfigFactory := factory.NewConfigFactory(clientSet, v1.DefaultSchedulerName, v1.DefaultHardPodAffinitySymmetricWeight, v1.DefaultFailureDomains) schedulerConfig, err := schedulerConfigFactory.Create() @@ -341,7 +341,7 @@ func TestMultiScheduler(t *testing.T) { // 2. create a node node := &v1.Node{ - ObjectMeta: v1.ObjectMeta{Name: "node-multi-scheduler-test-node"}, + ObjectMeta: metav1.ObjectMeta{Name: "node-multi-scheduler-test-node"}, Spec: v1.NodeSpec{Unschedulable: false}, Status: v1.NodeStatus{ Capacity: v1.ResourceList{ @@ -352,48 +352,48 @@ func TestMultiScheduler(t *testing.T) { clientSet.Core().Nodes().Create(node) // 3. create 3 pods for testing - podWithNoAnnotation := createPod(clientSet, "pod-with-no-annotation", nil) - testPodNoAnnotation, err := clientSet.Core().Pods(ns.Name).Create(podWithNoAnnotation) + podWithoutSchedulerName := createPod(clientSet, "pod-without-scheduler-name", "") + testPod, err := clientSet.Core().Pods(ns.Name).Create(podWithoutSchedulerName) if err != nil { t.Fatalf("Failed to create pod: %v", err) } - schedulerAnnotationFitsDefault := map[string]string{"scheduler.alpha.kubernetes.io/name": "default-scheduler"} - podWithAnnotationFitsDefault := createPod(clientSet, "pod-with-annotation-fits-default", schedulerAnnotationFitsDefault) - testPodWithAnnotationFitsDefault, err := clientSet.Core().Pods(ns.Name).Create(podWithAnnotationFitsDefault) + schedulerFitsDefault := "default-scheduler" + podFitsDefault := createPod(clientSet, "pod-fits-default", schedulerFitsDefault) + testPodFitsDefault, err := clientSet.Core().Pods(ns.Name).Create(podFitsDefault) if err != nil { t.Fatalf("Failed to create pod: %v", err) } - schedulerAnnotationFitsFoo := map[string]string{"scheduler.alpha.kubernetes.io/name": "foo-scheduler"} - podWithAnnotationFitsFoo := createPod(clientSet, "pod-with-annotation-fits-foo", schedulerAnnotationFitsFoo) - testPodWithAnnotationFitsFoo, err := clientSet.Core().Pods(ns.Name).Create(podWithAnnotationFitsFoo) + schedulerFitsFoo := "foo-scheduler" + podFitsFoo := createPod(clientSet, "pod-fits-foo", schedulerFitsFoo) + testPodFitsFoo, err := clientSet.Core().Pods(ns.Name).Create(podFitsFoo) if err != nil { t.Fatalf("Failed to create pod: %v", err) } // 4. **check point-1**: - // - testPodNoAnnotation, testPodWithAnnotationFitsDefault should be scheduled - // - testPodWithAnnotationFitsFoo should NOT be scheduled - err = wait.Poll(time.Second, time.Second*5, podScheduled(clientSet, testPodNoAnnotation.Namespace, testPodNoAnnotation.Name)) + // - testPod, testPodFitsDefault should be scheduled + // - testPodFitsFoo should NOT be scheduled + err = wait.Poll(time.Second, time.Second*5, podScheduled(clientSet, testPod.Namespace, testPod.Name)) if err != nil { - t.Errorf("Test MultiScheduler: %s Pod not scheduled: %v", testPodNoAnnotation.Name, err) + t.Errorf("Test MultiScheduler: %s Pod not scheduled: %v", testPod.Name, err) } else { - t.Logf("Test MultiScheduler: %s Pod scheduled", testPodNoAnnotation.Name) + t.Logf("Test MultiScheduler: %s Pod scheduled", testPod.Name) } - err = wait.Poll(time.Second, time.Second*5, podScheduled(clientSet, testPodWithAnnotationFitsDefault.Namespace, testPodWithAnnotationFitsDefault.Name)) + err = wait.Poll(time.Second, time.Second*5, podScheduled(clientSet, testPodFitsDefault.Namespace, testPodFitsDefault.Name)) if err != nil { - t.Errorf("Test MultiScheduler: %s Pod not scheduled: %v", testPodWithAnnotationFitsDefault.Name, err) + t.Errorf("Test MultiScheduler: %s Pod not scheduled: %v", testPodFitsDefault.Name, err) } else { - t.Logf("Test MultiScheduler: %s Pod scheduled", testPodWithAnnotationFitsDefault.Name) + t.Logf("Test MultiScheduler: %s Pod scheduled", testPodFitsDefault.Name) } - err = wait.Poll(time.Second, time.Second*5, podScheduled(clientSet, testPodWithAnnotationFitsFoo.Namespace, testPodWithAnnotationFitsFoo.Name)) + err = wait.Poll(time.Second, time.Second*5, podScheduled(clientSet, testPodFitsFoo.Namespace, testPodFitsFoo.Name)) if err == nil { - t.Errorf("Test MultiScheduler: %s Pod got scheduled, %v", testPodWithAnnotationFitsFoo.Name, err) + t.Errorf("Test MultiScheduler: %s Pod got scheduled, %v", testPodFitsFoo.Name, err) } else { - t.Logf("Test MultiScheduler: %s Pod not scheduled", testPodWithAnnotationFitsFoo.Name) + t.Logf("Test MultiScheduler: %s Pod not scheduled", testPodFitsFoo.Name) } // 5. create and start a scheduler with name "foo-scheduler" @@ -413,19 +413,19 @@ func TestMultiScheduler(t *testing.T) { // 6. **check point-2**: // - testPodWithAnnotationFitsFoo should be scheduled - err = wait.Poll(time.Second, time.Second*5, podScheduled(clientSet, testPodWithAnnotationFitsFoo.Namespace, testPodWithAnnotationFitsFoo.Name)) + err = wait.Poll(time.Second, time.Second*5, podScheduled(clientSet, testPodFitsFoo.Namespace, testPodFitsFoo.Name)) if err != nil { - t.Errorf("Test MultiScheduler: %s Pod not scheduled, %v", testPodWithAnnotationFitsFoo.Name, err) + t.Errorf("Test MultiScheduler: %s Pod not scheduled, %v", testPodFitsFoo.Name, err) } else { - t.Logf("Test MultiScheduler: %s Pod scheduled", testPodWithAnnotationFitsFoo.Name) + t.Logf("Test MultiScheduler: %s Pod scheduled", testPodFitsFoo.Name) } // 7. delete the pods that were scheduled by the default scheduler, and stop the default scheduler - err = clientSet.Core().Pods(ns.Name).Delete(testPodNoAnnotation.Name, v1.NewDeleteOptions(0)) + err = clientSet.Core().Pods(ns.Name).Delete(testPod.Name, metav1.NewDeleteOptions(0)) if err != nil { t.Errorf("Failed to delete pod: %v", err) } - err = clientSet.Core().Pods(ns.Name).Delete(testPodWithAnnotationFitsDefault.Name, v1.NewDeleteOptions(0)) + err = clientSet.Core().Pods(ns.Name).Delete(testPodFitsDefault.Name, metav1.NewDeleteOptions(0)) if err != nil { t.Errorf("Failed to delete pod: %v", err) } @@ -469,11 +469,12 @@ func TestMultiScheduler(t *testing.T) { */ } -func createPod(client clientset.Interface, name string, annotation map[string]string) *v1.Pod { +func createPod(client clientset.Interface, name string, scheduler string) *v1.Pod { return &v1.Pod{ - ObjectMeta: v1.ObjectMeta{Name: name, Annotations: annotation}, + ObjectMeta: metav1.ObjectMeta{Name: name}, Spec: v1.PodSpec{ - Containers: []v1.Container{{Name: "container", Image: e2e.GetPauseImageName(client)}}, + Containers: []v1.Container{{Name: "container", Image: e2e.GetPauseImageName(client)}}, + SchedulerName: scheduler, }, } } @@ -491,7 +492,7 @@ func TestAllocatable(t *testing.T) { // NOTE: This test cannot run in parallel, because it is creating and deleting // non-namespaced objects (Nodes). - defer clientSet.Core().Nodes().DeleteCollection(nil, v1.ListOptions{}) + defer clientSet.Core().Nodes().DeleteCollection(nil, metav1.ListOptions{}) schedulerConfigFactory := factory.NewConfigFactory(clientSet, v1.DefaultSchedulerName, v1.DefaultHardPodAffinitySymmetricWeight, v1.DefaultFailureDomains) schedulerConfig, err := schedulerConfigFactory.Create() @@ -507,7 +508,7 @@ func TestAllocatable(t *testing.T) { // 2. create a node without allocatable awareness node := &v1.Node{ - ObjectMeta: v1.ObjectMeta{Name: "node-allocatable-scheduler-test-node"}, + ObjectMeta: metav1.ObjectMeta{Name: "node-allocatable-scheduler-test-node"}, Spec: v1.NodeSpec{Unschedulable: false}, Status: v1.NodeStatus{ Capacity: v1.ResourceList{ @@ -525,7 +526,7 @@ func TestAllocatable(t *testing.T) { // 3. create resource pod which requires less than Capacity podResource := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{Name: "pod-test-allocatable"}, + ObjectMeta: metav1.ObjectMeta{Name: "pod-test-allocatable"}, Spec: v1.PodSpec{ Containers: []v1.Container{ { @@ -573,7 +574,7 @@ func TestAllocatable(t *testing.T) { t.Fatalf("Failed to update node with Status.Allocatable: %v", err) } - if err := clientSet.Core().Pods(ns.Name).Delete(podResource.Name, &v1.DeleteOptions{}); err != nil { + if err := clientSet.Core().Pods(ns.Name).Delete(podResource.Name, &metav1.DeleteOptions{}); err != nil { t.Fatalf("Failed to remove first resource pod: %v", err) } diff --git a/vendor/k8s.io/kubernetes/test/integration/scheduler_perf/BUILD b/vendor/k8s.io/kubernetes/test/integration/scheduler_perf/BUILD index 6c45316e..263b5506 100644 --- a/vendor/k8s.io/kubernetes/test/integration/scheduler_perf/BUILD +++ b/vendor/k8s.io/kubernetes/test/integration/scheduler_perf/BUILD @@ -18,12 +18,12 @@ go_library( "//pkg/client/clientset_generated/clientset:go_default_library", "//pkg/client/clientset_generated/clientset/typed/core/v1:go_default_library", "//pkg/client/record:go_default_library", - "//pkg/client/restclient:go_default_library", "//plugin/pkg/scheduler:go_default_library", "//plugin/pkg/scheduler/algorithmprovider:go_default_library", "//plugin/pkg/scheduler/factory:go_default_library", "//test/integration/framework:go_default_library", "//vendor:github.com/golang/glog", + "//vendor:k8s.io/client-go/rest", ], ) @@ -37,11 +37,12 @@ go_test( tags = ["automanaged"], deps = [ "//pkg/api/v1:go_default_library", - "//plugin/pkg/scheduler/factory:go_default_library", + "//plugin/pkg/scheduler:go_default_library", "//test/integration/framework:go_default_library", "//test/utils:go_default_library", "//vendor:github.com/golang/glog", "//vendor:github.com/renstrom/dedent", + "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", ], ) diff --git a/vendor/k8s.io/kubernetes/test/integration/scheduler_perf/scheduler_bench_test.go b/vendor/k8s.io/kubernetes/test/integration/scheduler_perf/scheduler_bench_test.go index 44e289aa..b4f43190 100644 --- a/vendor/k8s.io/kubernetes/test/integration/scheduler_perf/scheduler_bench_test.go +++ b/vendor/k8s.io/kubernetes/test/integration/scheduler_perf/scheduler_bench_test.go @@ -56,7 +56,7 @@ func BenchmarkScheduling1000Nodes1000Pods(b *testing.B) { func benchmarkScheduling(numNodes, numScheduledPods int, b *testing.B) { schedulerConfigFactory, finalFunc := mustSetupScheduler() defer finalFunc() - c := schedulerConfigFactory.Client + c := schedulerConfigFactory.GetClient() nodePreparer := framework.NewIntegrationTestNodePreparer( c, @@ -74,7 +74,7 @@ func benchmarkScheduling(numNodes, numScheduledPods int, b *testing.B) { podCreator.CreatePods() for { - scheduled := schedulerConfigFactory.ScheduledPodLister.Indexer.List() + scheduled := schedulerConfigFactory.GetScheduledPodListerIndexer().List() if len(scheduled) >= numScheduledPods { break } @@ -89,7 +89,7 @@ func benchmarkScheduling(numNodes, numScheduledPods int, b *testing.B) { for { // This can potentially affect performance of scheduler, since List() is done under mutex. // TODO: Setup watch on apiserver and wait until all pods scheduled. - scheduled := schedulerConfigFactory.ScheduledPodLister.Indexer.List() + scheduled := schedulerConfigFactory.GetScheduledPodListerIndexer().List() if len(scheduled) >= numScheduledPods+b.N { break } diff --git a/vendor/k8s.io/kubernetes/test/integration/scheduler_perf/scheduler_test.go b/vendor/k8s.io/kubernetes/test/integration/scheduler_perf/scheduler_test.go index 73f82078..46436d64 100644 --- a/vendor/k8s.io/kubernetes/test/integration/scheduler_perf/scheduler_test.go +++ b/vendor/k8s.io/kubernetes/test/integration/scheduler_perf/scheduler_test.go @@ -22,13 +22,14 @@ import ( "testing" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/api/v1" - "k8s.io/kubernetes/plugin/pkg/scheduler/factory" "k8s.io/kubernetes/test/integration/framework" testutils "k8s.io/kubernetes/test/utils" "github.com/golang/glog" "github.com/renstrom/dedent" + "k8s.io/kubernetes/plugin/pkg/scheduler" ) const ( @@ -73,7 +74,7 @@ func TestSchedule100Node3KNodeAffinityPods(t *testing.T) { }) } config.nodePreparer = framework.NewIntegrationTestNodePreparer( - config.schedulerConfigFactory.Client, + config.schedulerSupportFunctions.GetClient(), nodeStrategies, "scheduler-perf-", ) @@ -97,7 +98,7 @@ func TestSchedule100Node3KNodeAffinityPods(t *testing.T) { for i := 0; i < numGroups; i++ { podCreatorConfig.AddStrategy("sched-perf-node-affinity", config.numPods/numGroups, testutils.NewCustomCreatePodStrategy(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ GenerateName: "sched-perf-node-affinity-pod-", Annotations: map[string]string{v1.AffinityAnnotationKey: fmt.Sprintf(affinityTemplate, i)}, }, @@ -105,7 +106,7 @@ func TestSchedule100Node3KNodeAffinityPods(t *testing.T) { }), ) } - config.podCreator = testutils.NewTestPodCreator(config.schedulerConfigFactory.Client, podCreatorConfig) + config.podCreator = testutils.NewTestPodCreator(config.schedulerSupportFunctions.GetClient(), podCreatorConfig) if min := schedulePods(config); min < threshold30K { t.Errorf("Too small pod scheduling throughput for 30k pods. Expected %v got %v", threshold30K, min) @@ -143,19 +144,19 @@ func TestSchedule1000Node30KPods(t *testing.T) { // } type testConfig struct { - numPods int - numNodes int - nodePreparer testutils.TestNodePreparer - podCreator *testutils.TestPodCreator - schedulerConfigFactory *factory.ConfigFactory - destroyFunc func() + numPods int + numNodes int + nodePreparer testutils.TestNodePreparer + podCreator *testutils.TestPodCreator + schedulerSupportFunctions scheduler.Configurator + destroyFunc func() } func baseConfig() *testConfig { schedulerConfigFactory, destroyFunc := mustSetupScheduler() return &testConfig{ - schedulerConfigFactory: schedulerConfigFactory, - destroyFunc: destroyFunc, + schedulerSupportFunctions: schedulerConfigFactory, + destroyFunc: destroyFunc, } } @@ -163,14 +164,14 @@ func defaultSchedulerBenchmarkConfig(numNodes, numPods int) *testConfig { baseConfig := baseConfig() nodePreparer := framework.NewIntegrationTestNodePreparer( - baseConfig.schedulerConfigFactory.Client, + baseConfig.schedulerSupportFunctions.GetClient(), []testutils.CountToStrategy{{Count: numNodes, Strategy: &testutils.TrivialNodePrepareStrategy{}}}, "scheduler-perf-", ) config := testutils.NewTestPodCreatorConfig() config.AddStrategy("sched-test", numPods, testutils.NewSimpleWithControllerCreatePodStrategy("rc1")) - podCreator := testutils.NewTestPodCreator(baseConfig.schedulerConfigFactory.Client, config) + podCreator := testutils.NewTestPodCreator(baseConfig.schedulerSupportFunctions.GetClient(), config) baseConfig.nodePreparer = nodePreparer baseConfig.podCreator = podCreator @@ -202,7 +203,7 @@ func schedulePods(config *testConfig) int32 { // Bake in time for the first pod scheduling event. for { time.Sleep(50 * time.Millisecond) - scheduled := config.schedulerConfigFactory.ScheduledPodLister.Indexer.List() + scheduled := config.schedulerSupportFunctions.GetScheduledPodListerIndexer().List() // 30,000 pods -> wait till @ least 300 are scheduled to start measuring. // TODO Find out why sometimes there may be scheduling blips in the beggining. if len(scheduled) > config.numPods/100 { @@ -217,7 +218,7 @@ func schedulePods(config *testConfig) int32 { // This can potentially affect performance of scheduler, since List() is done under mutex. // Listing 10000 pods is an expensive operation, so running it frequently may impact scheduler. // TODO: Setup watch on apiserver and wait until all pods scheduled. - scheduled := config.schedulerConfigFactory.ScheduledPodLister.Indexer.List() + scheduled := config.schedulerSupportFunctions.GetScheduledPodListerIndexer().List() // We will be completed when all pods are done being scheduled. // return the worst-case-scenario interval that was seen during this time. diff --git a/vendor/k8s.io/kubernetes/test/integration/scheduler_perf/util.go b/vendor/k8s.io/kubernetes/test/integration/scheduler_perf/util.go index aed8e15f..efd789c6 100644 --- a/vendor/k8s.io/kubernetes/test/integration/scheduler_perf/util.go +++ b/vendor/k8s.io/kubernetes/test/integration/scheduler_perf/util.go @@ -21,12 +21,12 @@ import ( "net/http/httptest" "github.com/golang/glog" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" v1core "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1" "k8s.io/kubernetes/pkg/client/record" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/plugin/pkg/scheduler" _ "k8s.io/kubernetes/plugin/pkg/scheduler/algorithmprovider" "k8s.io/kubernetes/plugin/pkg/scheduler/factory" @@ -40,7 +40,7 @@ import ( // remove resources after finished. // Notes on rate limiter: // - client rate limit is set to 5000. -func mustSetupScheduler() (schedulerConfigFactory *factory.ConfigFactory, destroyFunc func()) { +func mustSetupScheduler() (schedulerConfigFactory scheduler.Configurator, destroyFunc func()) { h := &framework.MasterHolder{Initialized: make(chan struct{})} s := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { diff --git a/vendor/k8s.io/kubernetes/test/integration/secrets/secrets_test.go b/vendor/k8s.io/kubernetes/test/integration/secrets/secrets_test.go index 8a6755cc..f7c23e14 100644 --- a/vendor/k8s.io/kubernetes/test/integration/secrets/secrets_test.go +++ b/vendor/k8s.io/kubernetes/test/integration/secrets/secrets_test.go @@ -23,10 +23,11 @@ package secrets import ( "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/test/integration" "k8s.io/kubernetes/test/integration/framework" ) @@ -54,7 +55,7 @@ func TestSecrets(t *testing.T) { func DoTestSecrets(t *testing.T, client clientset.Interface, ns *v1.Namespace) { // Make a secret object. s := v1.Secret{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "secret", Namespace: ns.Name, }, @@ -70,7 +71,7 @@ func DoTestSecrets(t *testing.T, client clientset.Interface, ns *v1.Namespace) { // Template for pods that use a secret. pod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "XXX", Namespace: ns.Name, }, diff --git a/vendor/k8s.io/kubernetes/test/integration/serviceaccount/service_account_test.go b/vendor/k8s.io/kubernetes/test/integration/serviceaccount/service_account_test.go index 57df0133..07dff8ab 100644 --- a/vendor/k8s.io/kubernetes/test/integration/serviceaccount/service_account_test.go +++ b/vendor/k8s.io/kubernetes/test/integration/serviceaccount/service_account_test.go @@ -38,13 +38,14 @@ import ( "k8s.io/apiserver/pkg/authentication/authenticator" "k8s.io/apiserver/pkg/authentication/request/bearertoken" "k8s.io/apiserver/pkg/authentication/request/union" + serviceaccountapiserver "k8s.io/apiserver/pkg/authentication/serviceaccount" "k8s.io/apiserver/pkg/authentication/user" "k8s.io/apiserver/pkg/authorization/authorizer" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/controller" "k8s.io/kubernetes/pkg/controller/informers" serviceaccountcontroller "k8s.io/kubernetes/pkg/controller/serviceaccount" @@ -68,7 +69,7 @@ func TestServiceAccountAutoCreate(t *testing.T) { ns := "test-service-account-creation" // Create namespace - _, err := c.Core().Namespaces().Create(&v1.Namespace{ObjectMeta: v1.ObjectMeta{Name: ns}}) + _, err := c.Core().Namespaces().Create(&v1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: ns}}) if err != nil { t.Fatalf("could not create namespace: %v", err) } @@ -103,13 +104,13 @@ func TestServiceAccountTokenAutoCreate(t *testing.T) { name := "my-service-account" // Create namespace - _, err := c.Core().Namespaces().Create(&v1.Namespace{ObjectMeta: v1.ObjectMeta{Name: ns}}) + _, err := c.Core().Namespaces().Create(&v1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: ns}}) if err != nil { t.Fatalf("could not create namespace: %v", err) } // Create service account - serviceAccount, err := c.Core().ServiceAccounts(ns).Create(&v1.ServiceAccount{ObjectMeta: v1.ObjectMeta{Name: name}}) + serviceAccount, err := c.Core().ServiceAccounts(ns).Create(&v1.ServiceAccount{ObjectMeta: metav1.ObjectMeta{Name: name}}) if err != nil { t.Fatalf("Service Account not created: %v", err) } @@ -171,7 +172,7 @@ func TestServiceAccountTokenAutoCreate(t *testing.T) { tokensToCleanup := sets.NewString(token1Name, token2Name, token3Name) err = wait.Poll(time.Second, 10*time.Second, func() (bool, error) { // Get all secrets in the namespace - secrets, err := c.Core().Secrets(ns).List(v1.ListOptions{}) + secrets, err := c.Core().Secrets(ns).List(metav1.ListOptions{}) // Retrieval errors should fail if err != nil { return false, err @@ -197,7 +198,7 @@ func TestServiceAccountTokenAutoMount(t *testing.T) { ns := "auto-mount-ns" // Create "my" namespace - _, err := c.Core().Namespaces().Create(&v1.Namespace{ObjectMeta: v1.ObjectMeta{Name: ns}}) + _, err := c.Core().Namespaces().Create(&v1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: ns}}) if err != nil && !errors.IsAlreadyExists(err) { t.Fatalf("could not create namespace: %v", err) } @@ -210,7 +211,7 @@ func TestServiceAccountTokenAutoMount(t *testing.T) { // Pod to create protoPod := v1.Pod{ - ObjectMeta: v1.ObjectMeta{Name: "protopod"}, + ObjectMeta: metav1.ObjectMeta{Name: "protopod"}, Spec: v1.PodSpec{ Containers: []v1.Container{ { @@ -277,19 +278,19 @@ func TestServiceAccountTokenAuthentication(t *testing.T) { otherns := "other-ns" // Create "my" namespace - _, err := c.Core().Namespaces().Create(&v1.Namespace{ObjectMeta: v1.ObjectMeta{Name: myns}}) + _, err := c.Core().Namespaces().Create(&v1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: myns}}) if err != nil && !errors.IsAlreadyExists(err) { t.Fatalf("could not create namespace: %v", err) } // Create "other" namespace - _, err = c.Core().Namespaces().Create(&v1.Namespace{ObjectMeta: v1.ObjectMeta{Name: otherns}}) + _, err = c.Core().Namespaces().Create(&v1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: otherns}}) if err != nil && !errors.IsAlreadyExists(err) { t.Fatalf("could not create namespace: %v", err) } // Create "ro" user in myns - _, err = c.Core().ServiceAccounts(myns).Create(&v1.ServiceAccount{ObjectMeta: v1.ObjectMeta{Name: readOnlyServiceAccountName}}) + _, err = c.Core().ServiceAccounts(myns).Create(&v1.ServiceAccount{ObjectMeta: metav1.ObjectMeta{Name: readOnlyServiceAccountName}}) if err != nil { t.Fatalf("Service Account not created: %v", err) } @@ -309,7 +310,7 @@ func TestServiceAccountTokenAuthentication(t *testing.T) { doServiceAccountAPIRequests(t, roClient, myns, false, false, false) // Create "rw" user in myns - _, err = c.Core().ServiceAccounts(myns).Create(&v1.ServiceAccount{ObjectMeta: v1.ObjectMeta{Name: readWriteServiceAccountName}}) + _, err = c.Core().ServiceAccounts(myns).Create(&v1.ServiceAccount{ObjectMeta: metav1.ObjectMeta{Name: readWriteServiceAccountName}}) if err != nil { t.Fatalf("Service Account not created: %v", err) } @@ -385,7 +386,7 @@ func startServiceAccountTestServer(t *testing.T) (*clientset.Clientset, restclie } // If the user is a service account... - if serviceAccountNamespace, serviceAccountName, err := serviceaccount.SplitUsername(username); err == nil { + if serviceAccountNamespace, serviceAccountName, err := serviceaccountapiserver.SplitUsername(username); err == nil { // Limit them to their own namespace if serviceAccountNamespace == ns { switch serviceAccountName { @@ -512,17 +513,17 @@ type testOperation func() error func doServiceAccountAPIRequests(t *testing.T, c *clientset.Clientset, ns string, authenticated bool, canRead bool, canWrite bool) { testSecret := &v1.Secret{ - ObjectMeta: v1.ObjectMeta{Name: "testSecret"}, + ObjectMeta: metav1.ObjectMeta{Name: "testSecret"}, Data: map[string][]byte{"test": []byte("data")}, } readOps := []testOperation{ func() error { - _, err := c.Core().Secrets(ns).List(v1.ListOptions{}) + _, err := c.Core().Secrets(ns).List(metav1.ListOptions{}) return err }, func() error { - _, err := c.Core().Pods(ns).List(v1.ListOptions{}) + _, err := c.Core().Pods(ns).List(metav1.ListOptions{}) return err }, } diff --git a/vendor/k8s.io/kubernetes/test/integration/storageclasses/storage_classes_test.go b/vendor/k8s.io/kubernetes/test/integration/storageclasses/storage_classes_test.go index 533a0707..a8b0f85a 100644 --- a/vendor/k8s.io/kubernetes/test/integration/storageclasses/storage_classes_test.go +++ b/vendor/k8s.io/kubernetes/test/integration/storageclasses/storage_classes_test.go @@ -24,13 +24,13 @@ import ( "testing" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" storage "k8s.io/kubernetes/pkg/apis/storage/v1beta1" storageutil "k8s.io/kubernetes/pkg/apis/storage/v1beta1/util" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/test/integration/framework" ) @@ -56,7 +56,7 @@ func DoTestStorageClasses(t *testing.T, client clientset.Interface, ns *v1.Names TypeMeta: metav1.TypeMeta{ Kind: "StorageClass", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "gold", }, Provisioner: provisionerPluginName, @@ -69,7 +69,7 @@ func DoTestStorageClasses(t *testing.T, client clientset.Interface, ns *v1.Names // Template for pvcs that specify a storage class pvc := &v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "XXX", Namespace: ns.Name, Annotations: map[string]string{ diff --git a/vendor/k8s.io/kubernetes/test/integration/thirdparty/thirdparty_test.go b/vendor/k8s.io/kubernetes/test/integration/thirdparty/thirdparty_test.go index 9d5237de..ede5b134 100644 --- a/vendor/k8s.io/kubernetes/test/integration/thirdparty/thirdparty_test.go +++ b/vendor/k8s.io/kubernetes/test/integration/thirdparty/thirdparty_test.go @@ -33,11 +33,10 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/diff" "k8s.io/apimachinery/pkg/util/wait" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/api/v1" extensions "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/test/integration/framework" ) @@ -54,7 +53,7 @@ func TestThirdPartyDiscovery(t *testing.T) { once := sync.Once{} deleteFoo := installThirdParty(t, client, clientConfig, &extensions.ThirdPartyResource{ - ObjectMeta: v1.ObjectMeta{Name: "foo.company.com"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo.company.com"}, Versions: []extensions.APIVersion{{Name: version}}, }, group, version, "foos", ) @@ -117,8 +116,8 @@ func TestThirdPartyMultiple(t *testing.T) { var versionsToTest = []string{"v1"} type Foo struct { - metav1.TypeMeta `json:",inline"` - v1.ObjectMeta `json:"metadata,omitempty" description:"standard object metadata"` + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty" description:"standard object metadata"` SomeField string `json:"someField"` OtherField int `json:"otherField"` @@ -184,7 +183,7 @@ func DoTestInstallMultipleAPIs(t *testing.T, client clientset.Interface, clientC deleteFoo := installThirdParty(t, client, clientConfig, &extensions.ThirdPartyResource{ - ObjectMeta: v1.ObjectMeta{Name: "foo.company.com"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo.company.com"}, Versions: []extensions.APIVersion{{Name: version}}, }, group, version, "foos", ) @@ -193,7 +192,7 @@ func DoTestInstallMultipleAPIs(t *testing.T, client clientset.Interface, clientC // TODO make multiple resources in one version work // deleteBar = installThirdParty(t, client, clientConfig, // &extensions.ThirdPartyResource{ - // ObjectMeta: v1.ObjectMeta{Name: "bar.company.com"}, + // ObjectMeta: metav1.ObjectMeta{Name: "bar.company.com"}, // Versions: []extensions.APIVersion{{Name: version}}, // }, group, version, "bars", // ) @@ -211,7 +210,7 @@ func testInstallThirdPartyAPIDeleteVersion(t *testing.T, client clientset.Interf deleteFoo := installThirdParty(t, client, clientConfig, &extensions.ThirdPartyResource{ - ObjectMeta: v1.ObjectMeta{Name: "foo.company.com"}, + ObjectMeta: metav1.ObjectMeta{Name: "foo.company.com"}, Versions: []extensions.APIVersion{{Name: version}}, }, group, version, "foos", ) @@ -226,7 +225,7 @@ func testInstallThirdPartyAPIDeleteVersion(t *testing.T, client clientset.Interf } expectedObj := Foo{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "test", Namespace: "default", }, diff --git a/vendor/k8s.io/kubernetes/test/integration/volume/attach_detach_test.go b/vendor/k8s.io/kubernetes/test/integration/volume/attach_detach_test.go index 89b532e6..bd25edcd 100644 --- a/vendor/k8s.io/kubernetes/test/integration/volume/attach_detach_test.go +++ b/vendor/k8s.io/kubernetes/test/integration/volume/attach_detach_test.go @@ -23,12 +23,13 @@ import ( "testing" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/wait" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/cache" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/client/restclient" fakecloud "k8s.io/kubernetes/pkg/cloudprovider/providers/fake" "k8s.io/kubernetes/pkg/controller/informers" "k8s.io/kubernetes/pkg/controller/volume/attachdetach" @@ -40,7 +41,7 @@ import ( func fakePodWithVol(namespace string) *v1.Pod { fakePod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Namespace: namespace, Name: "fakepod", }, @@ -82,7 +83,7 @@ func TestPodDeletionWithDswp(t *testing.T) { namespaceName := "test-pod-deletion" node := &v1.Node{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "node-sandbox", Annotations: map[string]string{ volumehelper.ControllerManagedAttachAnnotation: "true", diff --git a/vendor/k8s.io/kubernetes/test/integration/volume/persistent_volumes_test.go b/vendor/k8s.io/kubernetes/test/integration/volume/persistent_volumes_test.go index 452e844b..5451fcc8 100644 --- a/vendor/k8s.io/kubernetes/test/integration/volume/persistent_volumes_test.go +++ b/vendor/k8s.io/kubernetes/test/integration/volume/persistent_volumes_test.go @@ -29,13 +29,13 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/watch" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/v1" storage "k8s.io/kubernetes/pkg/apis/storage/v1beta1" storageutil "k8s.io/kubernetes/pkg/apis/storage/v1beta1/util" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/client/restclient" fakecloud "k8s.io/kubernetes/pkg/cloudprovider/providers/fake" persistentvolumecontroller "k8s.io/kubernetes/pkg/controller/volume/persistentvolume" "k8s.io/kubernetes/pkg/volume" @@ -116,7 +116,7 @@ func TestPersistentVolumeRecycler(t *testing.T) { // NOTE: This test cannot run in parallel, because it is creating and deleting // non-namespaced objects (PersistenceVolumes). - defer testClient.Core().PersistentVolumes().DeleteCollection(nil, v1.ListOptions{}) + defer testClient.Core().PersistentVolumes().DeleteCollection(nil, metav1.ListOptions{}) stopCh := make(chan struct{}) go ctrl.Run(stopCh) @@ -170,7 +170,7 @@ func TestPersistentVolumeDeleter(t *testing.T) { // NOTE: This test cannot run in parallel, because it is creating and deleting // non-namespaced objects (PersistenceVolumes). - defer testClient.Core().PersistentVolumes().DeleteCollection(nil, v1.ListOptions{}) + defer testClient.Core().PersistentVolumes().DeleteCollection(nil, metav1.ListOptions{}) stopCh := make(chan struct{}) go ctrl.Run(stopCh) @@ -229,7 +229,7 @@ func TestPersistentVolumeBindRace(t *testing.T) { // NOTE: This test cannot run in parallel, because it is creating and deleting // non-namespaced objects (PersistenceVolumes). - defer testClient.Core().PersistentVolumes().DeleteCollection(nil, v1.ListOptions{}) + defer testClient.Core().PersistentVolumes().DeleteCollection(nil, metav1.ListOptions{}) stopCh := make(chan struct{}) go ctrl.Run(stopCh) @@ -244,7 +244,7 @@ func TestPersistentVolumeBindRace(t *testing.T) { counter += 1 clone, _ := api.Scheme.DeepCopy(pvc) newPvc, _ := clone.(*v1.PersistentVolumeClaim) - newPvc.ObjectMeta = v1.ObjectMeta{Name: fmt.Sprintf("fake-pvc-race-%d", counter)} + newPvc.ObjectMeta = metav1.ObjectMeta{Name: fmt.Sprintf("fake-pvc-race-%d", counter)} claim, err := testClient.PersistentVolumeClaims(ns.Name).Create(newPvc) if err != nil { t.Fatalf("Error creating newPvc: %v", err) @@ -300,7 +300,7 @@ func TestPersistentVolumeClaimLabelSelector(t *testing.T) { // NOTE: This test cannot run in parallel, because it is creating and deleting // non-namespaced objects (PersistenceVolumes). - defer testClient.Core().PersistentVolumes().DeleteCollection(nil, v1.ListOptions{}) + defer testClient.Core().PersistentVolumes().DeleteCollection(nil, metav1.ListOptions{}) stopCh := make(chan struct{}) go controller.Run(stopCh) @@ -380,7 +380,7 @@ func TestPersistentVolumeClaimLabelSelectorMatchExpressions(t *testing.T) { // NOTE: This test cannot run in parallel, because it is creating and deleting // non-namespaced objects (PersistenceVolumes). - defer testClient.Core().PersistentVolumes().DeleteCollection(nil, v1.ListOptions{}) + defer testClient.Core().PersistentVolumes().DeleteCollection(nil, metav1.ListOptions{}) stopCh := make(chan struct{}) go controller.Run(stopCh) @@ -479,7 +479,7 @@ func TestPersistentVolumeMultiPVs(t *testing.T) { // NOTE: This test cannot run in parallel, because it is creating and deleting // non-namespaced objects (PersistenceVolumes). - defer testClient.Core().PersistentVolumes().DeleteCollection(nil, v1.ListOptions{}) + defer testClient.Core().PersistentVolumes().DeleteCollection(nil, metav1.ListOptions{}) stopCh := make(chan struct{}) go controller.Run(stopCh) @@ -568,7 +568,7 @@ func TestPersistentVolumeMultiPVsPVCs(t *testing.T) { // NOTE: This test cannot run in parallel, because it is creating and deleting // non-namespaced objects (PersistenceVolumes). - defer testClient.Core().PersistentVolumes().DeleteCollection(nil, v1.ListOptions{}) + defer testClient.Core().PersistentVolumes().DeleteCollection(nil, metav1.ListOptions{}) controllerStopCh := make(chan struct{}) go binder.Run(controllerStopCh) @@ -637,7 +637,7 @@ func TestPersistentVolumeMultiPVsPVCs(t *testing.T) { // Modify PVC i := rand.Intn(objCount) name := "pvc-" + strconv.Itoa(i) - pvc, err := testClient.PersistentVolumeClaims(v1.NamespaceDefault).Get(name, metav1.GetOptions{}) + pvc, err := testClient.PersistentVolumeClaims(metav1.NamespaceDefault).Get(name, metav1.GetOptions{}) if err != nil { // Silently ignore error, the PVC may have be already // deleted or not exists yet. @@ -649,7 +649,7 @@ func TestPersistentVolumeMultiPVsPVCs(t *testing.T) { } else { pvc.Annotations["TestAnnotation"] = fmt.Sprint(rand.Int()) } - _, err = testClient.PersistentVolumeClaims(v1.NamespaceDefault).Update(pvc) + _, err = testClient.PersistentVolumeClaims(metav1.NamespaceDefault).Update(pvc) if err != nil { // Silently ignore error, the PVC may have been updated by // the controller. @@ -856,14 +856,14 @@ func TestPersistentVolumeProvisionMultiPVCs(t *testing.T) { // NOTE: This test cannot run in parallel, because it is creating and deleting // non-namespaced objects (PersistenceVolumes and StorageClasses). - defer testClient.Core().PersistentVolumes().DeleteCollection(nil, v1.ListOptions{}) - defer testClient.Storage().StorageClasses().DeleteCollection(nil, v1.ListOptions{}) + defer testClient.Core().PersistentVolumes().DeleteCollection(nil, metav1.ListOptions{}) + defer testClient.Storage().StorageClasses().DeleteCollection(nil, metav1.ListOptions{}) storageClass := storage.StorageClass{ TypeMeta: metav1.TypeMeta{ Kind: "StorageClass", }, - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "gold", }, Provisioner: provisionerPluginName, @@ -901,7 +901,7 @@ func TestPersistentVolumeProvisionMultiPVCs(t *testing.T) { glog.V(2).Infof("TestPersistentVolumeProvisionMultiPVCs: claims are bound") // check that we have enough bound PVs - pvList, err := testClient.PersistentVolumes().List(v1.ListOptions{}) + pvList, err := testClient.PersistentVolumes().List(metav1.ListOptions{}) if err != nil { t.Fatalf("Failed to list volumes: %s", err) } @@ -924,7 +924,7 @@ func TestPersistentVolumeProvisionMultiPVCs(t *testing.T) { // Wait for the PVs to get deleted by listing remaining volumes // (delete events were unreliable) for { - volumes, err := testClient.PersistentVolumes().List(v1.ListOptions{}) + volumes, err := testClient.PersistentVolumes().List(metav1.ListOptions{}) if err != nil { t.Fatalf("Failed to list volumes: %v", err) } @@ -953,7 +953,7 @@ func TestPersistentVolumeMultiPVsDiffAccessModes(t *testing.T) { // NOTE: This test cannot run in parallel, because it is creating and deleting // non-namespaced objects (PersistenceVolumes). - defer testClient.Core().PersistentVolumes().DeleteCollection(nil, v1.ListOptions{}) + defer testClient.Core().PersistentVolumes().DeleteCollection(nil, metav1.ListOptions{}) stopCh := make(chan struct{}) go controller.Run(stopCh) @@ -1128,11 +1128,11 @@ func createClients(ns *v1.Namespace, t *testing.T, s *httptest.Server, syncPerio EnableDynamicProvisioning: true, }) - watchPV, err := testClient.PersistentVolumes().Watch(v1.ListOptions{}) + watchPV, err := testClient.PersistentVolumes().Watch(metav1.ListOptions{}) if err != nil { t.Fatalf("Failed to watch PersistentVolumes: %v", err) } - watchPVC, err := testClient.PersistentVolumeClaims(ns.Name).Watch(v1.ListOptions{}) + watchPVC, err := testClient.PersistentVolumeClaims(ns.Name).Watch(metav1.ListOptions{}) if err != nil { t.Fatalf("Failed to watch PersistentVolumeClaims: %v", err) } @@ -1142,7 +1142,7 @@ func createClients(ns *v1.Namespace, t *testing.T, s *httptest.Server, syncPerio func createPV(name, path, cap string, mode []v1.PersistentVolumeAccessMode, reclaim v1.PersistentVolumeReclaimPolicy) *v1.PersistentVolume { return &v1.PersistentVolume{ - ObjectMeta: v1.ObjectMeta{Name: name}, + ObjectMeta: metav1.ObjectMeta{Name: name}, Spec: v1.PersistentVolumeSpec{ PersistentVolumeSource: v1.PersistentVolumeSource{HostPath: &v1.HostPathVolumeSource{Path: path}}, Capacity: v1.ResourceList{v1.ResourceName(v1.ResourceStorage): resource.MustParse(cap)}, @@ -1154,7 +1154,7 @@ func createPV(name, path, cap string, mode []v1.PersistentVolumeAccessMode, recl func createPVC(name, namespace, cap string, mode []v1.PersistentVolumeAccessMode) *v1.PersistentVolumeClaim { return &v1.PersistentVolumeClaim{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: namespace, }, diff --git a/vendor/k8s.io/kubernetes/test/kubemark/BUILD b/vendor/k8s.io/kubernetes/test/kubemark/BUILD new file mode 100644 index 00000000..6cc62052 --- /dev/null +++ b/vendor/k8s.io/kubernetes/test/kubemark/BUILD @@ -0,0 +1,16 @@ +package(default_visibility = ["//visibility:public"]) + +licenses(["notice"]) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], +) diff --git a/vendor/k8s.io/kubernetes/test/kubemark/resources/heapster_template.json b/vendor/k8s.io/kubernetes/test/kubemark/resources/heapster_template.json index f3fde2da..f1021cea 100644 --- a/vendor/k8s.io/kubernetes/test/kubemark/resources/heapster_template.json +++ b/vendor/k8s.io/kubernetes/test/kubemark/resources/heapster_template.json @@ -44,7 +44,7 @@ "/heapster" ], "args": [ - "--source=kubernetes:https://{{MASTER_IP}}:443?inClusterConfig=0&useServiceAccount=0&auth=/kubeconfig/kubeconfig" + "--source=kubernetes:https://{{MASTER_IP}}:443?inClusterConfig=0&useServiceAccount=0&auth=/kubeconfig/heapster.kubeconfig" ], "volumeMounts": [ { @@ -66,7 +66,7 @@ "/eventer" ], "args": [ - "--source=kubernetes:https://104.197.233.84:443?inClusterConfig=0&useServiceAccount=0&auth=/kubeconfig/kubeconfig" + "--source=kubernetes:https://104.197.233.84:443?inClusterConfig=0&useServiceAccount=0&auth=/kubeconfig/heapster.kubeconfig" ], "volumeMounts": [ { diff --git a/vendor/k8s.io/kubernetes/test/kubemark/resources/hollow-node_template.json b/vendor/k8s.io/kubernetes/test/kubemark/resources/hollow-node_template.json index 93d20560..f998b17b 100644 --- a/vendor/k8s.io/kubernetes/test/kubemark/resources/hollow-node_template.json +++ b/vendor/k8s.io/kubernetes/test/kubemark/resources/hollow-node_template.json @@ -27,9 +27,9 @@ } }, { - "name": "npdconfig-volume", + "name": "kernelmonitorconfig-volume", "configMap": { - "name": "node-problem-detector-config" + "name": "node-configmap" } }, { @@ -43,6 +43,10 @@ "hostPath": { "path": "/var/log" } + }, + { + "name": "no-serviceaccount-access-to-real-master", + "emptyDir": {} } ], "containers": [ @@ -65,7 +69,7 @@ } }, { - "name": "MY_POD_NAME", + "name": "NODE_NAME", "valueFrom": { "fieldRef": { "fieldPath": "metadata.name" @@ -76,12 +80,13 @@ "command": [ "/bin/sh", "-c", - "./kubemark.sh --morph=kubelet $(CONTENT_TYPE) --v=2 1>>/var/logs/kubelet_$(MY_POD_NAME).log 2>&1" + "./kubemark.sh --morph=kubelet --name=$(NODE_NAME) --kubeconfig=/kubeconfig/kubelet.kubeconfig $(CONTENT_TYPE) --v=2 1>>/var/logs/kubelet_$(MY_POD_NAME).log 2>&1" ], "volumeMounts": [ { "name": "kubeconfig-volume", - "mountPath": "/kubeconfig" + "mountPath": "/kubeconfig", + "readOnly": true }, { "name": "logs-volume", @@ -113,7 +118,7 @@ } }, { - "name": "MY_POD_NAME", + "name": "NODE_NAME", "valueFrom": { "fieldRef": { "fieldPath": "metadata.name" @@ -124,12 +129,13 @@ "command": [ "/bin/sh", "-c", - "./kubemark.sh --morph=proxy $(CONTENT_TYPE) --v=2 1>>/var/logs/kube_proxy_$(MY_POD_NAME).log 2>&1" + "./kubemark.sh --morph=proxy --name=$(NODE_NAME) --kubeconfig=/kubeconfig/kubeproxy.kubeconfig $(CONTENT_TYPE) --v=2 1>>/var/logs/kube_proxy_$(MY_POD_NAME).log 2>&1" ], "volumeMounts": [ { "name": "kubeconfig-volume", - "mountPath": "/kubeconfig" + "mountPath": "/kubeconfig", + "readOnly": true }, { "name": "logs-volume", @@ -145,20 +151,32 @@ }, { "name": "hollow-node-problem-detector", - "image": "gcr.io/google_containers/node-problem-detector:v0.2", + "image": "gcr.io/google_containers/node-problem-detector:v0.3", "env": [ { "name": "NODE_NAME", "valueFrom": { "fieldRef": { - "fieldPath": "spec.nodeName" + "fieldPath": "metadata.name" } } } ], + "command": [ + "/node-problem-detector", + "--kernel-monitor=/config/kernel.monitor", + "--apiserver-override=https://{{master_ip}}:443?inClusterConfig=false&auth=/kubeconfig/npd.kubeconfig", + "--alsologtostderr", + "1>>/var/logs/npd_$(NODE_NAME).log 2>&1" + ], "volumeMounts": [ { - "name": "npdconfig-volume", + "name": "kubeconfig-volume", + "mountPath": "/kubeconfig", + "readOnly": true + }, + { + "name": "kernelmonitorconfig-volume", "mountPath": "/config", "readOnly": true }, @@ -166,6 +184,15 @@ "name": "kernellog-volume", "mountPath": "/log", "readOnly": true + }, + { + "name": "no-serviceaccount-access-to-real-master", + "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount", + "readOnly": true + }, + { + "name": "logs-volume", + "mountPath": "/var/logs" } ], "resources": { diff --git a/vendor/k8s.io/kubernetes/test/kubemark/resources/manifests/addons/kubemark-rbac-bindings/heapster-binding.yaml b/vendor/k8s.io/kubernetes/test/kubemark/resources/manifests/addons/kubemark-rbac-bindings/heapster-binding.yaml new file mode 100644 index 00000000..179b2402 --- /dev/null +++ b/vendor/k8s.io/kubernetes/test/kubemark/resources/manifests/addons/kubemark-rbac-bindings/heapster-binding.yaml @@ -0,0 +1,15 @@ +# This is the role binding for the kubemark heapster. +apiVersion: rbac.authorization.k8s.io/v1alpha1 +kind: ClusterRoleBinding +metadata: + name: heapster-view-binding + labels: + kubernetes.io/cluster-service: "true" +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: system:heapster +subjects: +- apiVersion: rbac/v1alpha1 + kind: User + name: system:heapster diff --git a/vendor/k8s.io/kubernetes/test/kubemark/resources/manifests/addons/kubemark-rbac-bindings/npd-binding.yaml b/vendor/k8s.io/kubernetes/test/kubemark/resources/manifests/addons/kubemark-rbac-bindings/npd-binding.yaml new file mode 100644 index 00000000..8dd97f85 --- /dev/null +++ b/vendor/k8s.io/kubernetes/test/kubemark/resources/manifests/addons/kubemark-rbac-bindings/npd-binding.yaml @@ -0,0 +1,15 @@ +# This is the role binding for the node-problem-detector. +apiVersion: rbac.authorization.k8s.io/v1alpha1 +kind: ClusterRoleBinding +metadata: + name: node-problem-detector-binding + labels: + kubernetes.io/cluster-service: "true" +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: system:node-problem-detector +subjects: +- apiVersion: rbac/v1alpha1 + kind: User + name: system:node-problem-detector diff --git a/vendor/k8s.io/kubernetes/test/kubemark/resources/start-kubemark-master.sh b/vendor/k8s.io/kubernetes/test/kubemark/resources/start-kubemark-master.sh index 3c97eb3d..5ea66d96 100644 --- a/vendor/k8s.io/kubernetes/test/kubemark/resources/start-kubemark-master.sh +++ b/vendor/k8s.io/kubernetes/test/kubemark/resources/start-kubemark-master.sh @@ -90,7 +90,7 @@ function safe-format-and-mount() { # Format only if the disk is not already formatted. if ! tune2fs -l "${device}" ; then echo "Formatting '${device}'" - mkfs.ext4 -F -E lazy_itable_init=0,lazy_journal_init=0,discard "${device}" + mkfs.ext4 -F "${device}" fi mkdir -p "${mountpoint}" diff --git a/vendor/k8s.io/kubernetes/test/kubemark/start-kubemark.sh b/vendor/k8s.io/kubernetes/test/kubemark/start-kubemark.sh index af0de3a5..3e9c0aeb 100755 --- a/vendor/k8s.io/kubernetes/test/kubemark/start-kubemark.sh +++ b/vendor/k8s.io/kubernetes/test/kubemark/start-kubemark.sh @@ -51,35 +51,6 @@ EOF writeEnvironmentFile -MAKE_DIR="${KUBE_ROOT}/cluster/images/kubemark" - -KUBEMARK_BIN="$(kube::util::find-binary-for-platform kubemark linux/amd64)" -if [[ -z "${KUBEMARK_BIN}" ]]; then - echo 'Cannot find cmd/kubemark binary' - exit 1 -fi - -echo "Copying kubemark to ${MAKE_DIR}" -cp "${KUBEMARK_BIN}" "${MAKE_DIR}" - -CURR_DIR=`pwd` -cd "${MAKE_DIR}" -RETRIES=3 -for attempt in $(seq 1 ${RETRIES}); do - if ! make; then - if [[ $((attempt)) -eq "${RETRIES}" ]]; then - echo "${color_red}Make failed. Exiting.${color_norm}" - exit 1 - fi - echo -e "${color_yellow}Make attempt $(($attempt)) failed. Retrying.${color_norm}" >& 2 - sleep $(($attempt * 5)) - else - break - fi -done -rm kubemark -cd $CURR_DIR - GCLOUD_COMMON_ARGS="--project ${PROJECT} --zone ${ZONE}" run-gcloud-compute-with-retries disks create "${MASTER_NAME}-pd" \ @@ -133,10 +104,8 @@ gen-kube-bearertoken create-certs ${MASTER_IP} KUBELET_TOKEN=$(dd if=/dev/urandom bs=128 count=1 2>/dev/null | base64 | tr -d "=+/" | dd bs=32 count=1 2>/dev/null) KUBE_PROXY_TOKEN=$(dd if=/dev/urandom bs=128 count=1 2>/dev/null | base64 | tr -d "=+/" | dd bs=32 count=1 2>/dev/null) - -echo "${CA_CERT_BASE64}" | base64 --decode > "${RESOURCE_DIRECTORY}/ca.crt" -echo "${KUBECFG_CERT_BASE64}" | base64 --decode > "${RESOURCE_DIRECTORY}/kubecfg.crt" -echo "${KUBECFG_KEY_BASE64}" | base64 --decode > "${RESOURCE_DIRECTORY}/kubecfg.key" +HEAPSTER_TOKEN=$(dd if=/dev/urandom bs=128 count=1 2>/dev/null | base64 | tr -d "=+/" | dd bs=32 count=1 2>/dev/null) +NODE_PROBLEM_DETECTOR_TOKEN=$(dd if=/dev/urandom bs=128 count=1 2>/dev/null | base64 | tr -d "=+/" | dd bs=32 count=1 2>/dev/null) until gcloud compute ssh --zone="${ZONE}" --project="${PROJECT}" "${MASTER_NAME}" --command="ls" &> /dev/null; do sleep 1 @@ -154,6 +123,8 @@ run-gcloud-compute-with-retries ssh --zone="${ZONE}" --project="${PROJECT}" "${M sudo bash -c \"echo \"${KUBE_BEARER_TOKEN},admin,admin\" > /etc/srv/kubernetes/known_tokens.csv\" && \ sudo bash -c \"echo \"${KUBELET_TOKEN},system:node:node-name,uid:kubelet,system:nodes\" >> /etc/srv/kubernetes/known_tokens.csv\" && \ sudo bash -c \"echo \"${KUBE_PROXY_TOKEN},system:kube-proxy,uid:kube_proxy\" >> /etc/srv/kubernetes/known_tokens.csv\" && \ + sudo bash -c \"echo \"${HEAPSTER_TOKEN},system:heapster,uid:heapster\" >> /etc/srv/kubernetes/known_tokens.csv\" && \ + sudo bash -c \"echo \"${NODE_PROBLEM_DETECTOR_TOKEN},system:node-problem-detector,uid:system:node-problem-detector\" >> /etc/srv/kubernetes/known_tokens.csv\" && \ sudo bash -c \"echo ${password},admin,admin > /etc/srv/kubernetes/basic_auth.csv\"" run-gcloud-compute-with-retries copy-files --zone="${ZONE}" --project="${PROJECT}" \ @@ -175,8 +146,36 @@ gcloud compute ssh "${MASTER_NAME}" --zone="${ZONE}" --project="${PROJECT}" \ sudo chmod a+x /home/kubernetes/start-kubemark-master.sh && \ sudo bash /home/kubernetes/start-kubemark-master.sh" -# create kubeconfig for Kubelet: -KUBECONFIG_CONTENTS=$(echo "apiVersion: v1 +# Setup the docker image for kubemark hollow-node. +MAKE_DIR="${KUBE_ROOT}/cluster/images/kubemark" +KUBEMARK_BIN="$(kube::util::find-binary-for-platform kubemark linux/amd64)" +if [[ -z "${KUBEMARK_BIN}" ]]; then + echo 'Cannot find cmd/kubemark binary' + exit 1 +fi + +echo "Copying kubemark to ${MAKE_DIR}" +cp "${KUBEMARK_BIN}" "${MAKE_DIR}" +CURR_DIR=`pwd` +cd "${MAKE_DIR}" +RETRIES=3 +for attempt in $(seq 1 ${RETRIES}); do + if ! make; then + if [[ $((attempt)) -eq "${RETRIES}" ]]; then + echo "${color_red}Make failed. Exiting.${color_norm}" + exit 1 + fi + echo -e "${color_yellow}Make attempt $(($attempt)) failed. Retrying.${color_norm}" >& 2 + sleep $(($attempt * 5)) + else + break + fi +done +rm kubemark +cd $CURR_DIR + +# Create kubeconfig for Kubelet. +KUBELET_KUBECONFIG_CONTENTS=$(echo "apiVersion: v1 kind: Config users: - name: kubelet @@ -193,37 +192,66 @@ contexts: cluster: kubemark user: kubelet name: kubemark-context -current-context: kubemark-context" | base64 | tr -d "\n\r") +current-context: kubemark-context") -KUBECONFIG_SECRET="${RESOURCE_DIRECTORY}/kubeconfig_secret.json" -cat > "${KUBECONFIG_SECRET}" << EOF -{ - "apiVersion": "v1", - "kind": "Secret", - "metadata": { - "name": "kubeconfig" - }, - "type": "Opaque", - "data": { - "kubeconfig": "${KUBECONFIG_CONTENTS}" - } -} -EOF +# Create kubeconfig for Kubeproxy. +KUBEPROXY_KUBECONFIG_CONTENTS=$(echo "apiVersion: v1 +kind: Config +users: +- name: kube-proxy + user: + token: ${KUBE_PROXY_TOKEN} +clusters: +- name: kubemark + cluster: + insecure-skip-tls-verify: true + server: https://${MASTER_IP} +contexts: +- context: + cluster: kubemark + user: kube-proxy + name: kubemark-context +current-context: kubemark-context") -NODE_CONFIGMAP="${RESOURCE_DIRECTORY}/node_config_map.json" -cat > "${NODE_CONFIGMAP}" << EOF -{ - "apiVersion": "v1", - "kind": "ConfigMap", - "metadata": { - "name": "node-configmap" - }, - "data": { - "content.type": "${TEST_CLUSTER_API_CONTENT_TYPE}" - } -} -EOF +# Create kubeconfig for Heapster. +HEAPSTER_KUBECONFIG_CONTENTS=$(echo "apiVersion: v1 +kind: Config +users: +- name: heapster + user: + token: ${HEAPSTER_TOKEN} +clusters: +- name: kubemark + cluster: + insecure-skip-tls-verify: true + server: https://${MASTER_IP} +contexts: +- context: + cluster: kubemark + user: heapster + name: kubemark-context +current-context: kubemark-context") +# Create kubeconfig for NodeProblemDetector. +NPD_KUBECONFIG_CONTENTS=$(echo "apiVersion: v1 +kind: Config +users: +- name: node-problem-detector + user: + token: ${NODE_PROBLEM_DETECTOR_TOKEN} +clusters: +- name: kubemark + cluster: + insecure-skip-tls-verify: true + server: https://${MASTER_IP} +contexts: +- context: + cluster: kubemark + user: node-problem-detector + name: kubemark-npd-context +current-context: kubemark-npd-context") + +# Create kubeconfig for local kubectl. LOCAL_KUBECONFIG="${RESOURCE_DIRECTORY}/kubeconfig.kubemark" cat > "${LOCAL_KUBECONFIG}" << EOF apiVersion: v1 @@ -250,6 +278,7 @@ EOF sed "s/{{numreplicas}}/${NUM_NODES:-10}/g" "${RESOURCE_DIRECTORY}/hollow-node_template.json" > "${RESOURCE_DIRECTORY}/hollow-node.json" sed -i'' -e "s/{{project}}/${PROJECT}/g" "${RESOURCE_DIRECTORY}/hollow-node.json" +sed -i'' -e "s/{{master_ip}}/${MASTER_IP}/g" "${RESOURCE_DIRECTORY}/hollow-node.json" mkdir "${RESOURCE_DIRECTORY}/addons" || true @@ -261,16 +290,23 @@ eventer_mem_per_node=500 eventer_mem=$((200 * 1024 + ${eventer_mem_per_node}*${NUM_NODES:-10})) sed -i'' -e "s/{{EVENTER_MEM}}/${eventer_mem}/g" "${RESOURCE_DIRECTORY}/addons/heapster.json" +# Create kubemark namespace. "${KUBECTL}" create -f "${RESOURCE_DIRECTORY}/kubemark-ns.json" -"${KUBECTL}" create -f "${KUBECONFIG_SECRET}" --namespace="kubemark" -"${KUBECTL}" create -f "${NODE_CONFIGMAP}" --namespace="kubemark" +# Create configmap for configuring hollow- kubelet, proxy and npd. +"${KUBECTL}" create configmap "node-configmap" --namespace="kubemark" \ + --from-literal=content.type="${TEST_CLUSTER_API_CONTENT_TYPE}" \ + --from-file=kernel.monitor="${RESOURCE_DIRECTORY}/kernel-monitor.json" +# Create secret for passing kubeconfigs to kubelet, kubeproxy and npd. +"${KUBECTL}" create secret generic "kubeconfig" --type=Opaque --namespace="kubemark" \ + --from-literal=kubelet.kubeconfig="${KUBELET_KUBECONFIG_CONTENTS}" \ + --from-literal=kubeproxy.kubeconfig="${KUBEPROXY_KUBECONFIG_CONTENTS}" \ + --from-literal=heapster.kubeconfig="${HEAPSTER_KUBECONFIG_CONTENTS}" \ + --from-literal=npd.kubeconfig="${NPD_KUBECONFIG_CONTENTS}" +# Create addon pods. "${KUBECTL}" create -f "${RESOURCE_DIRECTORY}/addons" --namespace="kubemark" -"${KUBECTL}" create configmap node-problem-detector-config --from-file="${RESOURCE_DIRECTORY}/kernel-monitor.json" --namespace="kubemark" +# Create the replication controller for hollow-nodes. "${KUBECTL}" create -f "${RESOURCE_DIRECTORY}/hollow-node.json" --namespace="kubemark" -rm "${KUBECONFIG_SECRET}" -rm "${NODE_CONFIGMAP}" - echo "Waiting for all HollowNodes to become Running..." start=$(date +%s) nodes=$("${KUBECTL}" --kubeconfig="${LOCAL_KUBECONFIG}" get node 2> /dev/null) || true diff --git a/vendor/k8s.io/kubernetes/test/soak/cauldron/BUILD b/vendor/k8s.io/kubernetes/test/soak/cauldron/BUILD index 3d9d0739..abfdb524 100644 --- a/vendor/k8s.io/kubernetes/test/soak/cauldron/BUILD +++ b/vendor/k8s.io/kubernetes/test/soak/cauldron/BUILD @@ -21,11 +21,11 @@ go_library( deps = [ "//pkg/api:go_default_library", "//pkg/client/clientset_generated/internalclientset:go_default_library", - "//pkg/client/restclient:go_default_library", "//pkg/util/intstr:go_default_library", "//vendor:github.com/golang/glog", "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/client-go/rest", ], ) diff --git a/vendor/k8s.io/kubernetes/test/soak/cauldron/cauldron.go b/vendor/k8s.io/kubernetes/test/soak/cauldron/cauldron.go index 511d144d..cfe73f32 100644 --- a/vendor/k8s.io/kubernetes/test/soak/cauldron/cauldron.go +++ b/vendor/k8s.io/kubernetes/test/soak/cauldron/cauldron.go @@ -31,10 +31,10 @@ import ( "github.com/golang/glog" "k8s.io/apimachinery/pkg/api/errors" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + restclient "k8s.io/client-go/rest" "k8s.io/kubernetes/pkg/api" clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" - "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/util/intstr" ) @@ -73,7 +73,7 @@ func main() { var nodes *api.NodeList for start := time.Now(); time.Since(start) < nodeListTimeout; time.Sleep(2 * time.Second) { - nodes, err = client.Core().Nodes().List(api.ListOptions{}) + nodes, err = client.Core().Nodes().List(metav1.ListOptions{}) if err == nil { break } @@ -95,7 +95,7 @@ func main() { queries := *queriesAverage * len(nodes.Items) * *podsPerNode // Create a uniquely named namespace. - got, err := client.Core().Namespaces().Create(&api.Namespace{ObjectMeta: api.ObjectMeta{GenerateName: "serve-hostnames-"}}) + got, err := client.Core().Namespaces().Create(&api.Namespace{ObjectMeta: metav1.ObjectMeta{GenerateName: "serve-hostnames-"}}) if err != nil { glog.Fatalf("Failed to create namespace: %v", err) } @@ -106,7 +106,7 @@ func main() { } else { // wait until the namespace disappears for i := 0; i < int(namespaceDeleteTimeout/time.Second); i++ { - if _, err := client.Core().Namespaces().Get(ns, v1.GetOptions{}); err != nil { + if _, err := client.Core().Namespaces().Get(ns, metav1.GetOptions{}); err != nil { if errors.IsNotFound(err) { return } @@ -124,7 +124,7 @@ func main() { for start := time.Now(); time.Since(start) < serviceCreateTimeout; time.Sleep(2 * time.Second) { t := time.Now() svc, err = client.Core().Services(ns).Create(&api.Service{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "serve-hostnames", Labels: map[string]string{ "name": "serve-hostname", @@ -174,7 +174,7 @@ func main() { glog.Infof("Creating pod %s/%s on node %s", ns, podName, node.Name) t := time.Now() _, err = client.Core().Pods(ns).Create(&api.Pod{ - ObjectMeta: api.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, Labels: map[string]string{ "name": "serve-hostname", @@ -221,7 +221,7 @@ func main() { for _, podName := range podNames { var pod *api.Pod for start := time.Now(); time.Since(start) < podStartTimeout; time.Sleep(5 * time.Second) { - pod, err = client.Core().Pods(ns).Get(podName, v1.GetOptions{}) + pod, err = client.Core().Pods(ns).Get(podName, metav1.GetOptions{}) if err != nil { glog.Warningf("Get pod %s/%s failed, ignoring for %v: %v", ns, podName, err, podStartTimeout) continue diff --git a/vendor/k8s.io/kubernetes/test/soak/serve_hostnames/BUILD b/vendor/k8s.io/kubernetes/test/soak/serve_hostnames/BUILD index 1a3b5d7b..337b7d39 100644 --- a/vendor/k8s.io/kubernetes/test/soak/serve_hostnames/BUILD +++ b/vendor/k8s.io/kubernetes/test/soak/serve_hostnames/BUILD @@ -22,14 +22,14 @@ go_library( "//pkg/api:go_default_library", "//pkg/api/v1:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", - "//pkg/client/restclient:go_default_library", - "//pkg/client/unversioned/clientcmd:go_default_library", "//pkg/util/intstr:go_default_library", "//test/e2e/framework:go_default_library", "//vendor:github.com/golang/glog", "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", "//vendor:k8s.io/apimachinery/pkg/runtime", + "//vendor:k8s.io/client-go/rest", + "//vendor:k8s.io/client-go/tools/clientcmd", ], ) diff --git a/vendor/k8s.io/kubernetes/test/soak/serve_hostnames/serve_hostnames.go b/vendor/k8s.io/kubernetes/test/soak/serve_hostnames/serve_hostnames.go index 1b6c7dbc..90ca2fec 100644 --- a/vendor/k8s.io/kubernetes/test/soak/serve_hostnames/serve_hostnames.go +++ b/vendor/k8s.io/kubernetes/test/soak/serve_hostnames/serve_hostnames.go @@ -32,11 +32,11 @@ import ( "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" + restclient "k8s.io/client-go/rest" + "k8s.io/client-go/tools/clientcmd" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/client/restclient" - "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" "k8s.io/kubernetes/pkg/util/intstr" e2e "k8s.io/kubernetes/test/e2e/framework" @@ -92,7 +92,7 @@ func main() { var nodes *v1.NodeList for start := time.Now(); time.Since(start) < nodeListTimeout; time.Sleep(2 * time.Second) { - nodes, err = client.Nodes().List(v1.ListOptions{}) + nodes, err = client.Nodes().List(metav1.ListOptions{}) if err == nil { break } @@ -114,7 +114,7 @@ func main() { queries := *queriesAverage * len(nodes.Items) * *podsPerNode // Create the namespace - got, err := client.Namespaces().Create(&v1.Namespace{ObjectMeta: v1.ObjectMeta{GenerateName: "serve-hostnames-"}}) + got, err := client.Namespaces().Create(&v1.Namespace{ObjectMeta: metav1.ObjectMeta{GenerateName: "serve-hostnames-"}}) if err != nil { glog.Fatalf("Failed to create namespace: %v", err) } @@ -143,7 +143,7 @@ func main() { for start := time.Now(); time.Since(start) < serviceCreateTimeout; time.Sleep(2 * time.Second) { t := time.Now() svc, err = client.Services(ns).Create(&v1.Service{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: "serve-hostnames", Labels: map[string]string{ "name": "serve-hostname", @@ -193,7 +193,7 @@ func main() { glog.Infof("Creating pod %s/%s on node %s", ns, podName, node.Name) t := time.Now() _, err = client.Pods(ns).Create(&v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: podName, Labels: map[string]string{ "name": "serve-hostname", diff --git a/vendor/k8s.io/kubernetes/test/test_owners.csv b/vendor/k8s.io/kubernetes/test/test_owners.csv index f4432444..baede512 100644 --- a/vendor/k8s.io/kubernetes/test/test_owners.csv +++ b/vendor/k8s.io/kubernetes/test/test_owners.csv @@ -672,17 +672,17 @@ k8s.io/kubernetes/pkg/credentialprovider/azure,brendandburns,0 k8s.io/kubernetes/pkg/credentialprovider/gcp,mml,1 k8s.io/kubernetes/pkg/fieldpath,childsb,1 k8s.io/kubernetes/pkg/fields,jsafrane,1 -k8s.io/kubernetes/pkg/genericapiserver,nikhiljindal,0 -k8s.io/kubernetes/pkg/genericapiserver/api,nikhiljindal,0 -k8s.io/kubernetes/pkg/genericapiserver/api/filters,dchen1107,1 -k8s.io/kubernetes/pkg/genericapiserver/api/handlers,rkouj,0 -k8s.io/kubernetes/pkg/genericapiserver/api/handlers/negotiation,rkouj,0 -k8s.io/kubernetes/pkg/genericapiserver/api/handlers/responsewriters,rkouj,0 -k8s.io/kubernetes/pkg/genericapiserver/api/request,lavalamp,1 +k8s.io/kubernetes/pkg/genericapiserver/server,nikhiljindal,0 +k8s.io/kubernetes/pkg/genericapiserver/endpoints,nikhiljindal,0 +k8s.io/kubernetes/pkg/genericapiserver/endpoints/filters,dchen1107,1 +k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers,rkouj,0 +k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers/negotiation,rkouj,0 +k8s.io/kubernetes/pkg/genericapiserver/endpoints/handlers/responsewriters,rkouj,0 +k8s.io/kubernetes/pkg/genericapiserver/endpoints/request,lavalamp,1 k8s.io/kubernetes/pkg/genericapiserver/authorizer,lavalamp,1 -k8s.io/kubernetes/pkg/genericapiserver/filters,dchen1107,1 -k8s.io/kubernetes/pkg/genericapiserver/mux,spxtr,1 -k8s.io/kubernetes/pkg/genericapiserver/openapi,davidopp,1 +k8s.io/kubernetes/pkg/genericapiserver/server/filters,dchen1107,1 +k8s.io/kubernetes/pkg/genericapiserver/server/mux,spxtr,1 +k8s.io/kubernetes/pkg/genericapiserver/server/openapi,davidopp,1 k8s.io/kubernetes/pkg/httplog,mtaufen,1 k8s.io/kubernetes/pkg/kubeapiserver/admission,rkouj,0 k8s.io/kubernetes/pkg/kubeapiserver/authorizer,rkouj,0 diff --git a/vendor/k8s.io/kubernetes/test/utils/BUILD b/vendor/k8s.io/kubernetes/test/utils/BUILD index 363cc011..147e7e8b 100644 --- a/vendor/k8s.io/kubernetes/test/utils/BUILD +++ b/vendor/k8s.io/kubernetes/test/utils/BUILD @@ -28,15 +28,16 @@ go_library( "//pkg/client/cache:go_default_library", "//pkg/client/clientset_generated/clientset:go_default_library", "//pkg/client/clientset_generated/internalclientset:go_default_library", - "//pkg/fields:go_default_library", "//pkg/util/uuid:go_default_library", "//pkg/util/workqueue:go_default_library", "//vendor:github.com/golang/glog", "//vendor:k8s.io/apimachinery/pkg/api/errors", "//vendor:k8s.io/apimachinery/pkg/apis/meta/v1", + "//vendor:k8s.io/apimachinery/pkg/fields", "//vendor:k8s.io/apimachinery/pkg/labels", "//vendor:k8s.io/apimachinery/pkg/runtime", "//vendor:k8s.io/apimachinery/pkg/runtime/schema", + "//vendor:k8s.io/apimachinery/pkg/types", "//vendor:k8s.io/apimachinery/pkg/util/sets", "//vendor:k8s.io/apimachinery/pkg/util/wait", "//vendor:k8s.io/apimachinery/pkg/watch", diff --git a/vendor/k8s.io/kubernetes/test/utils/density_utils.go b/vendor/k8s.io/kubernetes/test/utils/density_utils.go index af1a81a9..3af3e927 100644 --- a/vendor/k8s.io/kubernetes/test/utils/density_utils.go +++ b/vendor/k8s.io/kubernetes/test/utils/density_utils.go @@ -24,7 +24,7 @@ import ( "github.com/golang/glog" apierrs "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/kubernetes/pkg/api" + "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" ) @@ -42,7 +42,7 @@ func AddLabelsToNode(c clientset.Interface, nodeName string, labels map[string]s patch := fmt.Sprintf(`{"metadata":{"labels":%v}}`, labelString) var err error for attempt := 0; attempt < retries; attempt++ { - _, err = c.Core().Nodes().Patch(nodeName, api.MergePatchType, []byte(patch)) + _, err = c.Core().Nodes().Patch(nodeName, types.MergePatchType, []byte(patch)) if err != nil { if !apierrs.IsConflict(err) { return err diff --git a/vendor/k8s.io/kubernetes/test/utils/pod_store.go b/vendor/k8s.io/kubernetes/test/utils/pod_store.go index c974b75b..76763181 100644 --- a/vendor/k8s.io/kubernetes/test/utils/pod_store.go +++ b/vendor/k8s.io/kubernetes/test/utils/pod_store.go @@ -17,13 +17,14 @@ limitations under the License. package utils import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/cache" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" - "k8s.io/kubernetes/pkg/fields" ) // Convenient wrapper around cache.Store that returns list of v1.Pod instead of interface{}. @@ -35,13 +36,13 @@ type PodStore struct { func NewPodStore(c clientset.Interface, namespace string, label labels.Selector, field fields.Selector) *PodStore { lw := &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { options.LabelSelector = label.String() options.FieldSelector = field.String() obj, err := c.Core().Pods(namespace).List(options) return runtime.Object(obj), err }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { options.LabelSelector = label.String() options.FieldSelector = field.String() return c.Core().Pods(namespace).Watch(options) diff --git a/vendor/k8s.io/kubernetes/test/utils/runners.go b/vendor/k8s.io/kubernetes/test/utils/runners.go index 945765a5..9a1f4e78 100644 --- a/vendor/k8s.io/kubernetes/test/utils/runners.go +++ b/vendor/k8s.io/kubernetes/test/utils/runners.go @@ -25,8 +25,10 @@ import ( apierrs "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/kubernetes/pkg/api" @@ -38,7 +40,6 @@ import ( extensions "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" - "k8s.io/kubernetes/pkg/fields" "k8s.io/kubernetes/pkg/util/uuid" "k8s.io/kubernetes/pkg/util/workqueue" @@ -227,7 +228,7 @@ func (config *DeploymentConfig) GetKind() schema.GroupKind { func (config *DeploymentConfig) create() error { deployment := &extensions.Deployment{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: config.Name, }, Spec: extensions.DeploymentSpec{ @@ -238,7 +239,7 @@ func (config *DeploymentConfig) create() error { }, }, Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"name": config.Name}, }, Spec: v1.PodSpec{ @@ -291,7 +292,7 @@ func (config *ReplicaSetConfig) GetKind() schema.GroupKind { func (config *ReplicaSetConfig) create() error { rs := &extensions.ReplicaSet{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: config.Name, }, Spec: extensions.ReplicaSetSpec{ @@ -302,7 +303,7 @@ func (config *ReplicaSetConfig) create() error { }, }, Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"name": config.Name}, }, Spec: v1.PodSpec{ @@ -355,14 +356,14 @@ func (config *JobConfig) GetKind() schema.GroupKind { func (config *JobConfig) create() error { job := &batch.Job{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: config.Name, }, Spec: batch.JobSpec{ Parallelism: func(i int) *int32 { x := int32(i); return &x }(config.Replicas), Completions: func(i int) *int32 { x := int32(i); return &x }(config.Replicas), Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"name": config.Name}, }, Spec: v1.PodSpec{ @@ -447,7 +448,7 @@ func (config *RCConfig) create() error { config.DNSPolicy = &dnsDefault } rc := &v1.ReplicationController{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: config.Name, }, Spec: v1.ReplicationControllerSpec{ @@ -456,7 +457,7 @@ func (config *RCConfig) create() error { "name": config.Name, }, Template: &v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"name": config.Name}, }, Spec: v1.PodSpec{ @@ -688,8 +689,8 @@ func (config *RCConfig) start() error { if oldRunning != config.Replicas { // List only pods from a given replication controller. - options := v1.ListOptions{LabelSelector: label.String()} - if pods, err := config.Client.Core().Pods(v1.NamespaceAll).List(options); err == nil { + options := metav1.ListOptions{LabelSelector: label.String()} + if pods, err := config.Client.Core().Pods(metav1.NamespaceAll).List(options); err == nil { for _, pod := range pods.Items { config.RCConfigLog("Pod %s\t%s\t%s\t%s", pod.Name, pod.Spec.NodeName, pod.Status.Phase, pod.DeletionTimestamp) @@ -826,7 +827,7 @@ func DoPrepareNode(client clientset.Interface, node *v1.Node, strategy PrepareNo return nil } for attempt := 0; attempt < retries; attempt++ { - if _, err = client.Core().Nodes().Patch(node.Name, api.MergePatchType, []byte(patch)); err == nil { + if _, err = client.Core().Nodes().Patch(node.Name, types.MergePatchType, []byte(patch)); err == nil { return nil } if !apierrs.IsConflict(err) { @@ -953,14 +954,14 @@ func createPod(client clientset.Interface, namespace string, podCount int, podTe func createController(client clientset.Interface, controllerName, namespace string, podCount int, podTemplate *v1.Pod) error { rc := &v1.ReplicationController{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: controllerName, }, Spec: v1.ReplicationControllerSpec{ Replicas: func(i int) *int32 { x := int32(i); return &x }(podCount), Selector: map[string]string{"name": controllerName}, Template: &v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"name": controllerName}, }, Spec: podTemplate.Spec, @@ -985,7 +986,7 @@ func NewCustomCreatePodStrategy(podTemplate *v1.Pod) TestPodCreateStrategy { func NewSimpleCreatePodStrategy() TestPodCreateStrategy { basePod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ GenerateName: "simple-pod-", }, Spec: MakePodSpec(), @@ -996,7 +997,7 @@ func NewSimpleCreatePodStrategy() TestPodCreateStrategy { func NewSimpleWithControllerCreatePodStrategy(controllerName string) TestPodCreateStrategy { return func(client clientset.Interface, namespace string, podCount int) error { basePod := &v1.Pod{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ GenerateName: controllerName + "-pod-", Labels: map[string]string{"name": controllerName}, }, @@ -1020,7 +1021,7 @@ type SecretConfig struct { func (config *SecretConfig) Run() error { secret := &v1.Secret{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: config.Name, }, StringData: map[string]string{}, @@ -1038,7 +1039,7 @@ func (config *SecretConfig) Run() error { } func (config *SecretConfig) Stop() error { - if err := config.Client.Core().Secrets(config.Namespace).Delete(config.Name, &v1.DeleteOptions{}); err != nil { + if err := config.Client.Core().Secrets(config.Namespace).Delete(config.Name, &metav1.DeleteOptions{}); err != nil { return fmt.Errorf("Error deleting secret: %v", err) } config.LogFunc("Deleted secret %v/%v", config.Namespace, config.Name) @@ -1087,12 +1088,12 @@ func (config *DaemonConfig) Run() error { "name": config.Name + "-daemon", } daemon := &extensions.DaemonSet{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Name: config.Name, }, Spec: extensions.DaemonSetSpec{ Template: v1.PodTemplateSpec{ - ObjectMeta: v1.ObjectMeta{ + ObjectMeta: metav1.ObjectMeta{ Labels: nameLabel, }, Spec: v1.PodSpec{ @@ -1115,7 +1116,7 @@ func (config *DaemonConfig) Run() error { var nodes *v1.NodeList for i := 0; i < retries; i++ { // Wait for all daemons to be running - nodes, err = config.Client.Core().Nodes().List(v1.ListOptions{ResourceVersion: "0"}) + nodes, err = config.Client.Core().Nodes().List(metav1.ListOptions{ResourceVersion: "0"}) if err == nil { break } else if i+1 == retries { diff --git a/vendor/k8s.io/kubernetes/third_party/BUILD b/vendor/k8s.io/kubernetes/third_party/BUILD index 6250e35d..40e69849 100644 --- a/vendor/k8s.io/kubernetes/third_party/BUILD +++ b/vendor/k8s.io/kubernetes/third_party/BUILD @@ -20,6 +20,7 @@ filegroup( "//third_party/forked/golang/netutil:all-srcs", "//third_party/forked/golang/reflect:all-srcs", "//third_party/forked/golang/template:all-srcs", + "//third_party/htpasswd:all-srcs", ], tags = ["automanaged"], ) diff --git a/vendor/k8s.io/kubernetes/third_party/htpasswd/BUILD b/vendor/k8s.io/kubernetes/third_party/htpasswd/BUILD new file mode 100644 index 00000000..6cc62052 --- /dev/null +++ b/vendor/k8s.io/kubernetes/third_party/htpasswd/BUILD @@ -0,0 +1,16 @@ +package(default_visibility = ["//visibility:public"]) + +licenses(["notice"]) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], +)